-
Notifications
You must be signed in to change notification settings - Fork 17
[CPS-2606] Migrate to Tailwind 4 #4898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
| '@toptal/picasso-rich-text-editor': major | ||
| '@toptal/picasso-input-adornment': major | ||
| '@toptal/picasso-account-select': major | ||
| '@toptal/picasso-outlined-input': major | ||
| '@toptal/picasso-overview-block': major | ||
| '@toptal/picasso-autocomplete': major | ||
| '@toptal/picasso-avatar-upload': major | ||
| '@toptal/picasso-notification': major | ||
| '@toptal/picasso-number-input': major | ||
| '@toptal/picasso-prompt-modal': major | ||
| '@toptal/picasso-tagselector': major | ||
| '@toptal/picasso-tailwind': major | ||
| '@toptal/picasso-date-picker': major | ||
| '@toptal/picasso-date-select': major | ||
| '@toptal/picasso-pagination': major | ||
| '@toptal/picasso-test-utils': major | ||
| '@toptal/picasso-timepicker': major | ||
| '@toptal/picasso-typography': major | ||
| '@toptal/picasso-accordion': major | ||
| '@toptal/picasso-file-input': major | ||
| '@toptal/base-tailwind': major | ||
| '@toptal/picasso-backdrop': major | ||
| '@toptal/picasso-calendar': major | ||
| '@toptal/picasso-dropdown': major | ||
| '@toptal/picasso-show-more': major | ||
| '@toptal/picasso-forms': major | ||
| '@toptal/picasso-helpbox': major | ||
| '@toptal/picasso-section': major | ||
| '@toptal/picasso-avatar': major | ||
| '@toptal/picasso-button': major | ||
| '@toptal/picasso-select': major | ||
| '@toptal/picasso-slider': major | ||
| '@toptal/picasso-alert': major | ||
| '@toptal/picasso-badge': major | ||
| '@toptal/picasso-input': major | ||
| '@toptal/picasso-modal': major | ||
| '@toptal/picasso-table': major | ||
| '@toptal/picasso-utils': major | ||
| '@toptal/picasso-form': major | ||
| '@toptal/picasso-link': major | ||
| '@toptal/picasso-menu': major | ||
| '@toptal/picasso-page': major | ||
| '@toptal/picasso-tabs': major | ||
| '@toptal/picasso-tag': major | ||
| --- | ||
|
|
||
| Upgraded Tailwind CSS from v3 to v4: | ||
|
|
||
| - updated `tailwindcss` peer dependency from `^3.4.10` to `^4.2.1` | ||
| - updated deprecated utility classes | ||
| - min node version is 20 or higher |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 20 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; | ||
| @layer theme, base, components; | ||
| @import 'tailwindcss/theme.css' layer(theme); | ||
| @import 'tailwindcss/utilities.css'; | ||
| @config "../tailwind.config.js"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; | ||
| @layer theme, base, components; | ||
| @import 'tailwindcss/theme.css' layer(theme); | ||
| @import 'tailwindcss/utilities.css'; | ||
| @config "../../tailwind.config.js"; |
|
MrBra1nwash marked this conversation as resolved.
javier-delgado marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,10 @@ | ||
| /** @type {import('tailwindcss').Config} */ | ||
| module.exports = { | ||
| theme: {}, | ||
| theme: { | ||
| extend: { | ||
| lineHeight: { | ||
| 5: '1.25rem', | ||
| }, | ||
| }, | ||
| }, | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -145,7 +145,9 @@ export const Accordion = forwardRef<HTMLElement, Props>(function Accordion( | |
| > | ||
| {children} | ||
| {expandIcon ? ( | ||
| decorateWithExpandIconClasses(expandIcon, expandIconClass) | ||
| <ButtonAction | ||
| icon={decorateWithExpandIconClasses(expandIcon, expandIconClass)} | ||
| /> | ||
|
Comment on lines
+148
to
+150
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need a dedicated button here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your other comment about an icon with the wrong tint in happo screenshots was caused by this. Basically this code was a bit incosistent, when an icon was provided it was used "as is" but when it was not, it was wrapped in a
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd suggest to leave it as it was before 🤔 and changing it in a separate PR if we want to |
||
| ) : ( | ||
| <div className={classes.expandIconAlignTop}> | ||
| <ButtonAction | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ exports[`Accordion renders collapsed by default 1`] = ` | |
| > | ||
| <button | ||
| aria-disabled="false" | ||
| class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm" | ||
| class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm" | ||
| data-component-type="button" | ||
| role="button" | ||
| tabindex="0" | ||
|
|
@@ -108,10 +108,23 @@ exports[`Accordion renders custom icon when passed 1`] = ` | |
| > | ||
| What is a dog? | ||
| </div> | ||
| <span | ||
| class="PicassoAccordion-expandIcon" | ||
| data-testid="custom-expand-icon" | ||
| /> | ||
| <button | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need this change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before this change, there was a happo diff on the accordion because the icon color was different in the new version. I noticed that this component treated the default icon and the prop icon in different ways: The default icon is wrapped in a If you think it's not worth it, i can take it back, but we will have the color difference problem again |
||
| aria-disabled="false" | ||
| class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm" | ||
| data-component-type="button" | ||
| role="button" | ||
| tabindex="0" | ||
| type="button" | ||
| > | ||
| <span | ||
| class="items-center inline-flex font-semibold text-blue text-md" | ||
| > | ||
| <span | ||
| class="text-[1.2em] flex-1 w-4 h-4 text-graphite PicassoAccordion-expandIcon" | ||
| data-testid="custom-expand-icon" | ||
| /> | ||
| </span> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| <div | ||
|
|
@@ -175,7 +188,7 @@ exports[`Accordion renders disabled 1`] = ` | |
| > | ||
| <button | ||
| aria-disabled="false" | ||
| class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm" | ||
| class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm" | ||
| data-component-type="button" | ||
| role="button" | ||
| tabindex="0" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.