@chotot/clad-ui 3.0.0-next.2 → 3.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +675 -0
- package/README.md +173 -131
- package/dist/brand/ChototLogoText.d.ts +5 -0
- package/dist/brand/CtC2C.d.ts +5 -0
- package/dist/brand/CtProperty.d.ts +5 -0
- package/dist/brand/CtVehicle.d.ts +5 -0
- package/dist/brand/Tot.d.ts +5 -0
- package/dist/brand/index.d.ts +5 -0
- package/dist/chunk-Bmb41Sf3.cjs +1 -0
- package/dist/clad-ui.cjs +2 -0
- package/dist/clad-ui.d.ts +2 -0
- package/dist/clad-ui.es.js +9000 -4224
- package/dist/components/Announcer/Announcer.d.ts +3 -54
- package/dist/components/Announcer/announcer.styles.d.ts +39 -0
- package/dist/components/Announcer/index.d.ts +2 -0
- package/dist/components/Announcer/types.d.ts +41 -0
- package/dist/components/Badge/Badge.d.ts +2 -44
- package/dist/components/Badge/badge.styles.d.ts +57 -0
- package/dist/components/Badge/index.d.ts +4 -0
- package/dist/components/Badge/types.d.ts +33 -0
- package/dist/components/Box/Box.d.ts +7 -99
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Box/types.d.ts +89 -0
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +3 -5
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -17
- package/dist/components/Breadcrumbs/breadcrumbs.styles.d.ts +2 -0
- package/dist/components/Breadcrumbs/index.d.ts +3 -0
- package/dist/components/Breadcrumbs/types.d.ts +18 -0
- package/dist/components/Button/Button.d.ts +3 -76
- package/dist/components/Button/ButtonLink.d.ts +2 -3
- package/dist/components/Button/GhostButton.d.ts +3 -47
- package/dist/components/Button/IconButton.d.ts +2 -10
- package/dist/components/Button/button.styles.d.ts +242 -0
- package/dist/components/Button/constant.d.ts +1 -2
- package/dist/components/Button/index.d.ts +5 -0
- package/dist/components/Button/types.d.ts +72 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -46
- package/dist/components/Checkbox/checkbox.styles.d.ts +27 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/types.d.ts +40 -0
- package/dist/components/Chip/Chip.d.ts +3 -70
- package/dist/components/Chip/chip.styles.d.ts +66 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Chip/types.d.ts +22 -0
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +3 -39
- package/dist/components/CurrencyInput/currency-input.styles.d.ts +21 -0
- package/dist/components/CurrencyInput/index.d.ts +5 -0
- package/dist/components/CurrencyInput/types.d.ts +96 -0
- package/dist/components/CurrencyInput/utils.d.ts +18 -0
- package/dist/components/DatePicker/DatePicker.d.ts +2 -138
- package/dist/components/DatePicker/DateTimePicker.d.ts +2 -137
- package/dist/components/DatePicker/date-picker.styles.d.ts +9 -0
- package/dist/components/DatePicker/date-time-picker.styles.d.ts +10 -0
- package/dist/components/DatePicker/index.d.ts +4 -0
- package/dist/components/DatePicker/types.d.ts +286 -0
- package/dist/components/Drawer/Drawer.d.ts +36 -0
- package/dist/components/Drawer/Drawer.pw.fixtures.d.ts +9 -0
- package/dist/components/Drawer/index.d.ts +3 -0
- package/dist/components/Drawer/types.d.ts +191 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -94
- package/dist/components/Dropdown/dropdown.styles.d.ts +18 -0
- package/dist/components/Dropdown/index.d.ts +4 -0
- package/dist/components/Dropdown/types.d.ts +89 -0
- package/dist/components/EmptyState/EmptyState.d.ts +4 -0
- package/dist/components/EmptyState/empty-state.styles.d.ts +3 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EmptyState/types.d.ts +55 -0
- package/dist/components/Grid/Col.d.ts +4 -35
- package/dist/components/Grid/Grid.d.ts +8 -55
- package/dist/components/Grid/Grid.pw.fixtures.d.ts +3 -0
- package/dist/components/Grid/index.d.ts +3 -0
- package/dist/components/Grid/types.d.ts +66 -0
- package/dist/components/Input/Input.d.ts +3 -116
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/input.styles.d.ts +24 -0
- package/dist/components/Input/types.d.ts +55 -0
- package/dist/components/InputGroup/InputGroup.d.ts +4 -0
- package/dist/components/InputGroup/index.d.ts +4 -0
- package/dist/components/InputGroup/input-group.styles.d.ts +18 -0
- package/dist/components/InputGroup/types.d.ts +20 -0
- package/dist/components/LegacyDialog/DialogMainIcon.d.ts +3 -0
- package/dist/components/LegacyDialog/LegacyDialog.d.ts +5 -0
- package/dist/components/LegacyDialog/index.d.ts +3 -0
- package/dist/{patterns/LegacyDialog/LegacyDialog.d.ts → components/LegacyDialog/types.d.ts} +2 -10
- package/dist/components/LegacyPopup/LegacyPopup.d.ts +6 -0
- package/dist/components/LegacyPopup/index.d.ts +2 -0
- package/dist/{patterns/LegacyPopup/LegacyPopup.d.ts → components/LegacyPopup/types.d.ts} +4 -15
- package/dist/components/MultiSearchDropdown/MultiSearchDropdown.d.ts +10 -0
- package/dist/components/MultiSearchDropdown/index.d.ts +4 -0
- package/dist/components/MultiSearchDropdown/multi-search-dropdown.styles.d.ts +18 -0
- package/dist/{patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts → components/MultiSearchDropdown/types.d.ts} +6 -19
- package/dist/components/Pagination/PageItem.d.ts +3 -21
- package/dist/components/Pagination/Pagination.d.ts +2 -46
- package/dist/components/Pagination/index.d.ts +5 -0
- package/dist/components/Pagination/pagination.styles.d.ts +37 -0
- package/dist/components/Pagination/types.d.ts +66 -0
- package/dist/components/Popover/Popover.d.ts +4 -44
- package/dist/components/Popover/Popover.pw.fixtures.d.ts +6 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/popover.styles.d.ts +1 -0
- package/dist/components/Popover/types.d.ts +44 -0
- package/dist/components/Popup/Popup.d.ts +31 -0
- package/dist/components/Popup/Popup.pw.fixtures.d.ts +5 -0
- package/dist/components/Popup/index.d.ts +3 -0
- package/dist/components/Popup/types.d.ts +145 -0
- package/dist/components/RadioButton/RadioButton.d.ts +3 -51
- package/dist/components/RadioButton/index.d.ts +4 -0
- package/dist/components/RadioButton/radio-button.styles.d.ts +27 -0
- package/dist/components/RadioButton/types.d.ts +46 -0
- package/dist/components/RangeInput/RangeInput.d.ts +4 -0
- package/dist/components/RangeInput/index.d.ts +3 -0
- package/dist/components/RangeInput/range-input.styles.d.ts +1 -0
- package/dist/{patterns/RangeInput/RangeInput.d.ts → components/RangeInput/types.d.ts} +1 -4
- package/dist/components/RowItem/RowItem.d.ts +8 -76
- package/dist/components/RowItem/index.d.ts +2 -0
- package/dist/components/RowItem/rowitem.styles.d.ts +36 -0
- package/dist/components/RowItem/types.d.ts +66 -0
- package/dist/components/SearchInput/SearchInput.d.ts +5 -0
- package/dist/components/SearchInput/index.d.ts +3 -0
- package/dist/components/SearchInput/search-input.styles.d.ts +18 -0
- package/dist/{patterns/SearchInput/SearchInput.d.ts → components/SearchInput/types.d.ts} +19 -25
- package/dist/components/Searchbar/Searchbar.d.ts +3 -0
- package/dist/components/Searchbar/index.d.ts +3 -0
- package/dist/components/Searchbar/searchbar.styles.d.ts +1 -0
- package/dist/{patterns/Searchbar/Searchbar.d.ts → components/Searchbar/types.d.ts} +6 -9
- package/dist/components/ShapeIcon/ShapeIcon.d.ts +3 -53
- package/dist/components/ShapeIcon/index.d.ts +2 -0
- package/dist/components/ShapeIcon/shape-icon.styles.d.ts +156 -0
- package/dist/components/ShapeIcon/types.d.ts +5 -0
- package/dist/components/Slider/Slider.d.ts +3 -57
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/slider.styles.d.ts +1 -0
- package/dist/components/Slider/types.d.ts +59 -0
- package/dist/components/Snack/Snack.d.ts +4 -48
- package/dist/components/Snack/index.d.ts +3 -0
- package/dist/components/Snack/snack.styles.d.ts +21 -0
- package/dist/components/Snack/types.d.ts +48 -0
- package/dist/components/Tabs/Tab.d.ts +3 -67
- package/dist/components/Tabs/Tabs.d.ts +14 -61
- package/dist/components/Tabs/index.d.ts +4 -0
- package/dist/components/Tabs/tabs.styles.d.ts +59 -0
- package/dist/components/Tabs/types.d.ts +97 -0
- package/dist/components/TagCloud/TagCloud.d.ts +11 -0
- package/dist/components/TagCloud/index.d.ts +2 -0
- package/dist/components/TagCloud/tagcloud.styles.d.ts +18 -0
- package/dist/components/TagCloud/types.d.ts +26 -0
- package/dist/components/TextArea/TextArea.d.ts +3 -100
- package/dist/components/TextArea/index.d.ts +4 -0
- package/dist/components/TextArea/text-area.styles.d.ts +21 -0
- package/dist/components/TextArea/types.d.ts +98 -0
- package/dist/components/TextLabel/TextLabel.d.ts +3 -35
- package/dist/components/TextLabel/index.d.ts +2 -0
- package/dist/components/TextLabel/textlabel.styles.d.ts +51 -0
- package/dist/components/TextLabel/types.d.ts +32 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +3 -41
- package/dist/components/ToggleSwitch/index.d.ts +4 -0
- package/dist/components/ToggleSwitch/toggle-switch.styles.d.ts +39 -0
- package/dist/components/ToggleSwitch/types.d.ts +33 -0
- package/dist/components/Tooltip/Tooltip.d.ts +4 -98
- package/dist/components/Tooltip/Tooltip.pw.fixtures.d.ts +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/tooltip.styles.d.ts +18 -0
- package/dist/components/Tooltip/types.d.ts +24 -0
- package/dist/forge/index.cjs +0 -0
- package/dist/forge/index.d.ts +8 -0
- package/dist/forge/index.es.js +0 -0
- package/dist/icons.cjs +1 -0
- package/dist/icons.d.ts +1 -0
- package/dist/icons.es.js +1 -0
- package/dist/index.d.ts +82 -71
- package/dist/styles.css +2 -0
- package/dist/{utils/types.d.ts → types/index.d.ts} +0 -1
- package/dist/typography/BodyAnnotation.d.ts +8 -6
- package/dist/typography/BodyCaption.d.ts +8 -6
- package/dist/typography/BodyPage.d.ts +8 -6
- package/dist/typography/BodySection.d.ts +8 -6
- package/dist/typography/DisplayAnnotation.d.ts +8 -6
- package/dist/typography/DisplayCaption.d.ts +8 -6
- package/dist/typography/DisplayPage.d.ts +8 -6
- package/dist/typography/DisplayPrice.d.ts +21 -0
- package/dist/typography/DisplaySection.d.ts +8 -6
- package/dist/typography/HeaderAnnotation.d.ts +8 -6
- package/dist/typography/HeaderCaption.d.ts +8 -6
- package/dist/typography/HeaderPage.d.ts +8 -6
- package/dist/typography/HeaderSection.d.ts +8 -6
- package/dist/typography/LabelAnnotation.d.ts +8 -6
- package/dist/typography/LabelCaption.d.ts +8 -6
- package/dist/typography/LabelPage.d.ts +8 -6
- package/dist/typography/LabelSection.d.ts +8 -6
- package/dist/typography/NoteCaption.d.ts +8 -6
- package/dist/typography/NotePage.d.ts +8 -6
- package/dist/typography/NoteSection.d.ts +8 -6
- package/dist/typography/TaglineAnnotation.d.ts +8 -6
- package/dist/typography/TaglineCaption.d.ts +8 -6
- package/dist/typography/TaglineFootext.d.ts +8 -6
- package/dist/typography/TaglineSection.d.ts +8 -6
- package/dist/typography/index.d.ts +25 -24
- package/dist/utils/_inlineCreatePortal.d.ts +0 -1
- package/dist/utils/bundleCss.cjs +1 -0
- package/dist/utils/bundleCss.d.ts +6 -0
- package/dist/utils/bundleCss.es.js +18 -0
- package/dist/utils/cleanHtml.d.ts +4 -7
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/createUniversalPortal.d.ts +4 -14
- package/dist/utils/floating.d.ts +52 -0
- package/dist/utils/getBreakpointsValues.d.ts +4 -9
- package/dist/utils/sizes.d.ts +28 -0
- package/dist/utils/storyStyles.d.ts +21 -0
- package/dist/utils/themeTokens.d.ts +327 -0
- package/dist/utils/{scrollLock/useBodyScrollLock.d.ts → useBodyScrollLock.d.ts} +0 -1
- package/dist/utils/useScrollTop.d.ts +8 -0
- package/package.json +99 -99
- package/scripts/postinstall.cjs +180 -0
- package/skills/clad-ui/SKILL.md +109 -0
- package/skills/clad-ui/agents/openai.yaml +4 -0
- package/skills/clad-ui/references/components-display-layout.md +295 -0
- package/skills/clad-ui/references/components-inputs.md +449 -0
- package/skills/clad-ui/references/components-overlays-nav.md +314 -0
- package/skills/clad-ui/references/tokens.md +134 -0
- package/skills/clad-ui-feedback/SKILL.md +128 -0
- package/skills/migrate-clad-ui-v3/SKILL.md +123 -0
- package/skills/migrate-clad-ui-v3/agents/openai.yaml +4 -0
- package/skills/migrate-clad-ui-v3/references/component-api-changes.md +139 -0
- package/skills/migrate-clad-ui-v3/references/token-and-linaria-mapping.md +186 -0
- package/src/styles/base/base.css +440 -0
- package/src/styles/components/announcer.css +182 -0
- package/src/styles/components/badge.css +102 -0
- package/src/styles/components/box.css +61 -0
- package/src/styles/components/breadcrumbs.css +75 -0
- package/src/styles/components/button.css +527 -0
- package/src/styles/components/checkbox.css +115 -0
- package/src/styles/components/chip.css +155 -0
- package/src/styles/components/currency-input.css +146 -0
- package/src/styles/components/date-picker.css +305 -0
- package/src/styles/components/date-time-picker.css +64 -0
- package/src/styles/components/drawer.css +496 -0
- package/src/styles/components/dropdown.css +186 -0
- package/src/styles/components/empty-state.css +30 -0
- package/src/styles/components/grid.css +212 -0
- package/src/styles/components/index.css +36 -0
- package/src/styles/components/input-group.css +85 -0
- package/src/styles/components/input.css +255 -0
- package/src/styles/components/legacy-dialog.css +129 -0
- package/src/styles/components/legacy-popup.css +209 -0
- package/src/styles/components/multi-search-dropdown.css +240 -0
- package/src/styles/components/pagination.css +68 -0
- package/src/styles/components/popover.css +8 -0
- package/src/styles/components/popup.css +331 -0
- package/src/styles/components/radio-button.css +130 -0
- package/src/styles/components/range-input.css +40 -0
- package/src/styles/components/rowitem.css +75 -0
- package/src/styles/components/search-input.css +89 -0
- package/src/styles/components/searchbar.css +46 -0
- package/src/styles/components/shape-icon.css +199 -0
- package/src/styles/components/slider.css +232 -0
- package/src/styles/components/snack.css +144 -0
- package/src/styles/components/tabs.css +128 -0
- package/src/styles/components/tagcloud.css +50 -0
- package/src/styles/components/text-area.css +176 -0
- package/src/styles/components/textlabel.css +75 -0
- package/src/styles/components/toggle-switch.css +147 -0
- package/src/styles/components/tooltip.css +93 -0
- package/src/styles/index.css +10 -0
- package/src/styles/preset.css +6 -0
- package/src/styles/theme/colors/base.css +108 -0
- package/src/styles/theme/colors/semantic.css +135 -0
- package/src/styles/theme/index.css +57 -0
- package/src/styles/theme/typography/base.css +53 -0
- package/src/styles/theme/typography/semantic.css +176 -0
- package/src/styles/theme/variables.css +83 -0
- package/dist/components/Announcer/Announcer.d.ts.map +0 -1
- package/dist/components/Announcer/Announcer.styles.d.ts +0 -30
- package/dist/components/Announcer/Announcer.styles.d.ts.map +0 -1
- package/dist/components/Badge/Badge.d.ts.map +0 -1
- package/dist/components/Badge/Badge.styles.d.ts +0 -26
- package/dist/components/Badge/Badge.styles.d.ts.map +0 -1
- package/dist/components/Box/Box.d.ts.map +0 -1
- package/dist/components/Box/Box.styles.d.ts +0 -21
- package/dist/components/Box/Box.styles.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.styles.d.ts +0 -10
- package/dist/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +0 -1
- package/dist/components/Button/Button.d.ts.map +0 -1
- package/dist/components/Button/Button.styles.d.ts +0 -3
- package/dist/components/Button/Button.styles.d.ts.map +0 -1
- package/dist/components/Button/ButtonLink.d.ts.map +0 -1
- package/dist/components/Button/GhostButton.d.ts.map +0 -1
- package/dist/components/Button/GhostButton.styles.d.ts +0 -3
- package/dist/components/Button/GhostButton.styles.d.ts.map +0 -1
- package/dist/components/Button/IconButton.d.ts.map +0 -1
- package/dist/components/Button/constant.d.ts.map +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/dist/components/Checkbox/Checkbox.styles.d.ts +0 -5
- package/dist/components/Checkbox/Checkbox.styles.d.ts.map +0 -1
- package/dist/components/Chip/Chip.d.ts.map +0 -1
- package/dist/components/Chip/Chip.styles.d.ts +0 -13
- package/dist/components/Chip/Chip.styles.d.ts.map +0 -1
- package/dist/components/CurrencyInput/CurrencyInput.d.ts.map +0 -1
- package/dist/components/CurrencyInput/CurrencyInput.styles.d.ts +0 -27
- package/dist/components/CurrencyInput/CurrencyInput.styles.d.ts.map +0 -1
- package/dist/components/CurrencyInput/utils/_cleanValue.d.ts +0 -12
- package/dist/components/CurrencyInput/utils/_cleanValue.d.ts.map +0 -1
- package/dist/components/CurrencyInput/utils/_formatValue.d.ts +0 -6
- package/dist/components/CurrencyInput/utils/_formatValue.d.ts.map +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +0 -1
- package/dist/components/DatePicker/DateTimePicker.d.ts.map +0 -1
- package/dist/components/DatePicker/DateTimePicker.styles.d.ts +0 -61
- package/dist/components/DatePicker/DateTimePicker.styles.d.ts.map +0 -1
- package/dist/components/Dropdown/Dropdown.d.ts.map +0 -1
- package/dist/components/Dropdown/Dropdown.styles.d.ts +0 -11
- package/dist/components/Dropdown/Dropdown.styles.d.ts.map +0 -1
- package/dist/components/Grid/Col.d.ts.map +0 -1
- package/dist/components/Grid/Grid.d.ts.map +0 -1
- package/dist/components/Grid/Grid.styles.d.ts +0 -33
- package/dist/components/Grid/Grid.styles.d.ts.map +0 -1
- package/dist/components/Input/Input.d.ts.map +0 -1
- package/dist/components/Input/Input.styles.d.ts +0 -36
- package/dist/components/Input/Input.styles.d.ts.map +0 -1
- package/dist/components/Pagination/PageItem.d.ts.map +0 -1
- package/dist/components/Pagination/Pagination.d.ts.map +0 -1
- package/dist/components/Pagination/Pagination.style.d.ts +0 -7
- package/dist/components/Pagination/Pagination.style.d.ts.map +0 -1
- package/dist/components/Popover/Popover.d.ts.map +0 -1
- package/dist/components/Popover/Popover.styles.d.ts +0 -4
- package/dist/components/Popover/Popover.styles.d.ts.map +0 -1
- package/dist/components/RadioButton/RadioButton.d.ts.map +0 -1
- package/dist/components/RadioButton/RadioButton.styles.d.ts +0 -12
- package/dist/components/RadioButton/RadioButton.styles.d.ts.map +0 -1
- package/dist/components/RowItem/RowItem.d.ts.map +0 -1
- package/dist/components/RowItem/RowItem.styles.d.ts +0 -33
- package/dist/components/RowItem/RowItem.styles.d.ts.map +0 -1
- package/dist/components/ShapeIcon/ShapeIcon.d.ts.map +0 -1
- package/dist/components/ShapeIcon/ShapeIcon.styles.d.ts +0 -15
- package/dist/components/ShapeIcon/ShapeIcon.styles.d.ts.map +0 -1
- package/dist/components/Slider/Slider.d.ts.map +0 -1
- package/dist/components/Slider/Slider.styles.d.ts +0 -24
- package/dist/components/Slider/Slider.styles.d.ts.map +0 -1
- package/dist/components/Snack/Snack.d.ts.map +0 -1
- package/dist/components/Snack/Snack.styles.d.ts +0 -20
- package/dist/components/Snack/Snack.styles.d.ts.map +0 -1
- package/dist/components/Tabs/Tab.d.ts.map +0 -1
- package/dist/components/Tabs/Tabs.d.ts.map +0 -1
- package/dist/components/Tabs/Tabs.styles.d.ts +0 -43
- package/dist/components/Tabs/Tabs.styles.d.ts.map +0 -1
- package/dist/components/TextArea/TextArea.d.ts.map +0 -1
- package/dist/components/TextArea/TextArea.styles.d.ts +0 -19
- package/dist/components/TextArea/TextArea.styles.d.ts.map +0 -1
- package/dist/components/TextLabel/TextLabel.d.ts.map +0 -1
- package/dist/components/TextLabel/TextLabel.styles.d.ts +0 -10
- package/dist/components/TextLabel/TextLabel.styles.d.ts.map +0 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts.map +0 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.styles.d.ts +0 -22
- package/dist/components/ToggleSwitch/ToggleSwitch.styles.d.ts.map +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +0 -1
- package/dist/components/Tooltip/Tooltip.styles.d.ts +0 -33
- package/dist/components/Tooltip/Tooltip.styles.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -62
- package/dist/components/index.d.ts.map +0 -1
- package/dist/css/baseline.d.ts +0 -15
- package/dist/css/baseline.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/patterns/Drawer/Drawer.d.ts +0 -110
- package/dist/patterns/Drawer/Drawer.d.ts.map +0 -1
- package/dist/patterns/Drawer/Drawer.styles.d.ts +0 -39
- package/dist/patterns/Drawer/Drawer.styles.d.ts.map +0 -1
- package/dist/patterns/EmptyState/EmptyState.d.ts +0 -36
- package/dist/patterns/EmptyState/EmptyState.d.ts.map +0 -1
- package/dist/patterns/EmptyState/EmptyState.styles.d.ts +0 -4
- package/dist/patterns/EmptyState/EmptyState.styles.d.ts.map +0 -1
- package/dist/patterns/InputGroup/InputGroup.d.ts +0 -26
- package/dist/patterns/InputGroup/InputGroup.d.ts.map +0 -1
- package/dist/patterns/InputGroup/InputGroup.styles.d.ts +0 -8
- package/dist/patterns/InputGroup/InputGroup.styles.d.ts.map +0 -1
- package/dist/patterns/LegacyDialog/DialogMainIcon.d.ts +0 -2
- package/dist/patterns/LegacyDialog/DialogMainIcon.d.ts.map +0 -1
- package/dist/patterns/LegacyDialog/LegacyDialog.d.ts.map +0 -1
- package/dist/patterns/LegacyDialog/LegacyDialog.styles.d.ts +0 -13
- package/dist/patterns/LegacyDialog/LegacyDialog.styles.d.ts.map +0 -1
- package/dist/patterns/LegacyPopup/LegacyPopup.d.ts.map +0 -1
- package/dist/patterns/LegacyPopup/LegacyPopup.styles.d.ts +0 -27
- package/dist/patterns/LegacyPopup/LegacyPopup.styles.d.ts.map +0 -1
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts.map +0 -1
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.styles.d.ts +0 -26
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.styles.d.ts.map +0 -1
- package/dist/patterns/Popup/Popup.d.ts +0 -92
- package/dist/patterns/Popup/Popup.d.ts.map +0 -1
- package/dist/patterns/Popup/Popup.styles.d.ts +0 -41
- package/dist/patterns/Popup/Popup.styles.d.ts.map +0 -1
- package/dist/patterns/RangeInput/RangeInput.d.ts.map +0 -1
- package/dist/patterns/RangeInput/RangeInput.styles.d.ts +0 -5
- package/dist/patterns/RangeInput/RangeInput.styles.d.ts.map +0 -1
- package/dist/patterns/SearchInput/SearchInput.d.ts.map +0 -1
- package/dist/patterns/SearchInput/SearchInput.styles.d.ts +0 -10
- package/dist/patterns/SearchInput/SearchInput.styles.d.ts.map +0 -1
- package/dist/patterns/Searchbar/Searchbar.d.ts.map +0 -1
- package/dist/patterns/Searchbar/Searchbar.styles.d.ts +0 -3
- package/dist/patterns/Searchbar/Searchbar.styles.d.ts.map +0 -1
- package/dist/patterns/TagCloud/TagCloud.d.ts +0 -76
- package/dist/patterns/TagCloud/TagCloud.d.ts.map +0 -1
- package/dist/patterns/TagCloud/TagCloud.styles.d.ts +0 -15
- package/dist/patterns/TagCloud/TagCloud.styles.d.ts.map +0 -1
- package/dist/patterns/TagCloud/TagCloudMultiActive.d.ts +0 -25
- package/dist/patterns/TagCloud/TagCloudMultiActive.d.ts.map +0 -1
- package/dist/patterns/TagCloud/TagCloudSingleActive.d.ts +0 -22
- package/dist/patterns/TagCloud/TagCloudSingleActive.d.ts.map +0 -1
- package/dist/patterns/index.d.ts +0 -23
- package/dist/patterns/index.d.ts.map +0 -1
- package/dist/theme/chotot.d.ts +0 -1371
- package/dist/theme/chotot.d.ts.map +0 -1
- package/dist/theme/ct-job.d.ts +0 -826
- package/dist/theme/ct-job.d.ts.map +0 -1
- package/dist/theme/ct-pty.d.ts +0 -826
- package/dist/theme/ct-pty.d.ts.map +0 -1
- package/dist/theme/ct-veh.d.ts +0 -591
- package/dist/theme/ct-veh.d.ts.map +0 -1
- package/dist/theme/index.d.ts +0 -5
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/mudah.d.ts +0 -248
- package/dist/theme/mudah.d.ts.map +0 -1
- package/dist/theme/types.d.ts +0 -58
- package/dist/theme/types.d.ts.map +0 -1
- package/dist/theme-chotot.css +0 -2
- package/dist/theme-job.css +0 -2
- package/dist/theme-pty.css +0 -2
- package/dist/theme-veh.css +0 -2
- package/dist/typography/BodyAnnotation.d.ts.map +0 -1
- package/dist/typography/BodyCaption.d.ts.map +0 -1
- package/dist/typography/BodyPage.d.ts.map +0 -1
- package/dist/typography/BodySection.d.ts.map +0 -1
- package/dist/typography/DisplayAnnotation.d.ts.map +0 -1
- package/dist/typography/DisplayCaption.d.ts.map +0 -1
- package/dist/typography/DisplayPage.d.ts.map +0 -1
- package/dist/typography/DisplaySection.d.ts.map +0 -1
- package/dist/typography/HeaderAnnotation.d.ts.map +0 -1
- package/dist/typography/HeaderCaption.d.ts.map +0 -1
- package/dist/typography/HeaderPage.d.ts.map +0 -1
- package/dist/typography/HeaderSection.d.ts.map +0 -1
- package/dist/typography/LabelAnnotation.d.ts.map +0 -1
- package/dist/typography/LabelCaption.d.ts.map +0 -1
- package/dist/typography/LabelPage.d.ts.map +0 -1
- package/dist/typography/LabelSection.d.ts.map +0 -1
- package/dist/typography/NoteCaption.d.ts.map +0 -1
- package/dist/typography/NotePage.d.ts.map +0 -1
- package/dist/typography/NoteSection.d.ts.map +0 -1
- package/dist/typography/TaglineAnnotation.d.ts.map +0 -1
- package/dist/typography/TaglineCaption.d.ts.map +0 -1
- package/dist/typography/TaglineFootext.d.ts.map +0 -1
- package/dist/typography/TaglineSection.d.ts.map +0 -1
- package/dist/typography/index.d.ts.map +0 -1
- package/dist/utils/_inlineCreatePortal.d.ts.map +0 -1
- package/dist/utils/_normalizeArrowKey.d.ts +0 -10
- package/dist/utils/_normalizeArrowKey.d.ts.map +0 -1
- package/dist/utils/_simulateChangeEvent.d.ts +0 -25
- package/dist/utils/_simulateChangeEvent.d.ts.map +0 -1
- package/dist/utils/cleanHtml.d.ts.map +0 -1
- package/dist/utils/createUniversalPortal.d.ts.map +0 -1
- package/dist/utils/cx.d.ts +0 -22
- package/dist/utils/cx.d.ts.map +0 -1
- package/dist/utils/getBreakpointsValues.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -7
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/noop.d.ts +0 -9
- package/dist/utils/noop.d.ts.map +0 -1
- package/dist/utils/scrollLock/index.d.ts +0 -7
- package/dist/utils/scrollLock/index.d.ts.map +0 -1
- package/dist/utils/scrollLock/scrollLock.styles.d.ts +0 -6
- package/dist/utils/scrollLock/scrollLock.styles.d.ts.map +0 -1
- package/dist/utils/scrollLock/useBodyScrollLock.d.ts.map +0 -1
- package/dist/utils/scrollTop.d.ts +0 -8
- package/dist/utils/scrollTop.d.ts.map +0 -1
- package/dist/utils/sx.d.ts +0 -174
- package/dist/utils/sx.d.ts.map +0 -1
- package/dist/utils/types.d.ts.map +0 -1
- package/theme/__snapshots__/chotot.spec.js.snap +0 -519
- package/theme/__snapshots__/mudah.spec.js.snap +0 -161
- package/theme/chotot.js +0 -1336
- package/theme/chotot.spec.js +0 -72
- package/theme/ct-job.js +0 -92
- package/theme/ct-pty.js +0 -92
- package/theme/ct-veh.js +0 -92
- package/theme/index.ts +0 -10
- package/theme/mudah.js +0 -333
- package/theme/mudah.spec.js +0 -9
- package/theme/types.ts +0 -61
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-clad-ui-v3
|
|
3
|
+
description: Migrate consumer React/Next.js code from @chotot/clad-ui v2 (Linaria) to @chotot/clad-ui v3 (Tailwind CSS v4) and @chotot/icons. Supports incremental file/feature migration (coexistence via @chotot/clad-ui-v2 alias) and full-repo cutover. Not for building new v3 UI from scratch, use clad-ui instead.
|
|
4
|
+
metadata:
|
|
5
|
+
purpose: Migrate consumer React/Next.js code from @chotot/clad-ui v2 (Linaria) to @chotot/clad-ui v3 (Tailwind CSS v4) and @chotot/icons. Supports incremental file/feature migration (coexistence via @chotot/clad-ui-v2 alias) and full-repo cutover. Not for building new v3 UI from scratch, use clad-ui instead.
|
|
6
|
+
type: lifecycle
|
|
7
|
+
library: '@chotot/clad-ui'
|
|
8
|
+
library_version: '3.0.0-next.4'
|
|
9
|
+
requires:
|
|
10
|
+
- clad-ui
|
|
11
|
+
sources:
|
|
12
|
+
- 'carousell/clad-ui:packages/clad-ui/src/**'
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Migrate `@chotot/clad-ui` v2 (Linaria) → `@chotot/clad-ui` v3 (Tailwind CSS v4)
|
|
16
|
+
|
|
17
|
+
## Role
|
|
18
|
+
|
|
19
|
+
You are a Clad UI v2-to-v3 migration operator for consumer repositories.
|
|
20
|
+
You convert `@chotot/clad-ui` v2 (or `@chotot/clad-ui-v2` alias) imports, legacy component props, and Linaria `css`/`styled` blocks to `@chotot/clad-ui` v3 and `@chotot/icons` without breaking visual parity or unmigrated files.
|
|
21
|
+
|
|
22
|
+
## Purpose
|
|
23
|
+
|
|
24
|
+
Use this skill to migrate a specific file, feature folder, or an entire consumer repository from `@chotot/clad-ui` v2 (Linaria) to `@chotot/clad-ui` v3 (Tailwind CSS v4) + `@chotot/icons`.
|
|
25
|
+
|
|
26
|
+
## Inputs
|
|
27
|
+
|
|
28
|
+
Required:
|
|
29
|
+
- `target`: file path, directory path, or `"repo"` (full repository migration)
|
|
30
|
+
|
|
31
|
+
Optional:
|
|
32
|
+
- `theme`: vertical theme (`"chotot"` | `"pty"` | `"job"` | `"veh"`, defaults to existing repo theme or `"chotot"`)
|
|
33
|
+
|
|
34
|
+
Missing required input:
|
|
35
|
+
- do not continue with unresolved required input
|
|
36
|
+
- try to infer `target` from the explicit user request or currently open/modified files
|
|
37
|
+
- if one safe candidate exists, use it and report the assumption
|
|
38
|
+
- if multiple risky candidates exist, ask one clear question
|
|
39
|
+
- if it still cannot be resolved safely, return a stop output
|
|
40
|
+
|
|
41
|
+
## Read Path
|
|
42
|
+
|
|
43
|
+
Required reads:
|
|
44
|
+
- [references/component-api-changes.md](references/component-api-changes.md) — import path rewrites, `data-theme` setup, `extraClasses` → `className`, and per-component prop/variant migrations.
|
|
45
|
+
|
|
46
|
+
Conditional reads:
|
|
47
|
+
- [references/token-and-linaria-mapping.md](references/token-and-linaria-mapping.md) — read when target files contain `@linaria/core` (`css`), `@linaria/react` (`styled`), `theme.*` tokens, or `var(--clad-*)` CSS variables.
|
|
48
|
+
- `../clad-ui/SKILL.md` (and its `references/*.md`) — read when verifying v3 component props or event payloads during complex rewrites.
|
|
49
|
+
|
|
50
|
+
Discovery reads:
|
|
51
|
+
- Root `package.json` and root layout (`_app.tsx`, `layout.tsx`, or global `.css`) to check whether `@chotot/clad-ui` v3 and its stylesheet are already wired.
|
|
52
|
+
- `node_modules/@chotot/clad-ui/dist/components/<Name>/types.d.ts` when an edge-case component prop is unclear.
|
|
53
|
+
|
|
54
|
+
## Workflow
|
|
55
|
+
|
|
56
|
+
1. **Verify root package & stylesheet setup (`package.json` + root layout).**
|
|
57
|
+
- Inspect `package.json`. Ensure `@chotot/clad-ui` (`^3.0.0`) is installed (`pnpm add @chotot/clad-ui@^3.0.0`; `@chotot/icons` is automatically installed as a direct dependency of `@chotot/clad-ui`) and `"@chotot/clad-ui"` is listed in `pnpm.onlyBuiltDependencies`. (For **Incremental Coexistence mode** where unmigrated files still rely on v2 Linaria, alias v2 as `"@chotot/clad-ui-v2": "npm:@chotot/clad-ui@^2"` per [references/component-api-changes.md](references/component-api-changes.md)).
|
|
58
|
+
- Check the root layout (`_app.tsx` / `layout.tsx` / global CSS):
|
|
59
|
+
- Ensure `@chotot/clad-ui/styles.css` (or `@import "@chotot/clad-ui/preset.css"`) is imported once.
|
|
60
|
+
- Ensure the root wrapper sets `data-theme="chotot|pty|job|veh"` (coexisting with or replacing legacy `chototTheme`/`baselineStyles` per [references/component-api-changes.md](references/component-api-changes.md)).
|
|
61
|
+
|
|
62
|
+
2. **Rewrite imports in `target` files.**
|
|
63
|
+
- Follow [references/component-api-changes.md](references/component-api-changes.md) Section 1:
|
|
64
|
+
- `@chotot/clad-ui/components/*`, `@chotot/clad-ui/patterns/*`, `@chotot/clad-ui/typography`, `@chotot/clad-ui/brand` (and any `@chotot/clad-ui-v2*` alias imports) → named imports from root `@chotot/clad-ui`.
|
|
65
|
+
- `@chotot/clad-ui/icons` named imports stay unchanged (`import { Close } from '@chotot/clad-ui/icons'`); rewrite any deep icon imports (`@chotot/clad-ui/icons/<Name>` or `/icons/index`) to named imports from `@chotot/clad-ui/icons`.
|
|
66
|
+
- `@chotot/clad-ui/utils/bundleCss` → `import { getBundledCss } from '@chotot/clad-ui/utils/bundleCss'`.
|
|
67
|
+
|
|
68
|
+
3. **Migrate component props & variants in `target` files.**
|
|
69
|
+
- Apply [references/component-api-changes.md](references/component-api-changes.md) Sections 3–4:
|
|
70
|
+
- Rename `extraClasses` → `className`.
|
|
71
|
+
- Map deprecated `Button` colors (`critical` → `error`, `positive` → `success`, `chotot`/`caution`/`accent` → `primary`); both shorthand (`sm` | `md` | `lg` | `xl`) and word (`small` | `medium` | `large` | `xlarge`) sizes are supported.
|
|
72
|
+
- Map `Chip` / `TagCloud` `variant="normal"` → `variant="fill"` (and review `Chip` `size`: v3 default `'md'` is 32px, `'sm'` is 24px, `'lg'` is 40px).
|
|
73
|
+
- Map `RowItem` `type="menu"` → `type="chevron"`.
|
|
74
|
+
- Map `Badge` `bg` → `backgroundColor`.
|
|
75
|
+
|
|
76
|
+
4. **Convert Linaria `css` / `styled` blocks and `theme.*` tokens in `target` files.**
|
|
77
|
+
- If the file imports `@linaria/core`, `@linaria/react`, or `@chotot/clad-ui/theme/*`, read [references/token-and-linaria-mapping.md](references/token-and-linaria-mapping.md).
|
|
78
|
+
- Replace `styled.<tag>` and `css\`...\`` with Tailwind utility classes and Clad semantic tokens (`bg-background-*`, `text-text-*`, `border-border-*`, `text-icon-*`, `text-{display,header,label,body}-*`), merging conditional classes via `cn` from `@chotot/clad-ui`.
|
|
79
|
+
- Map `theme.mediaQueries.tablet` → `md:` (`768px`) and `theme.mediaQueries.desktop` → `min-[992px]:`.
|
|
80
|
+
|
|
81
|
+
5. **Run Coexistence vs Full-Repo Cutover check and verify.**
|
|
82
|
+
- Run across the entire repo:
|
|
83
|
+
```bash
|
|
84
|
+
rg "@chotot/clad-ui-v2|@chotot/clad-ui/(components|patterns|typography|brand|theme)|@linaria/(core|react)" src/ pages/ app/ components/ 2>/dev/null
|
|
85
|
+
```
|
|
86
|
+
- **If matches remain outside `target` (Incremental Coexistence mode):** do **not** remove `@chotot/clad-ui-v2`, `@linaria/*`, `next-linaria`, `.babelrc`, `@clad-ui/theme` aliases, or `withCladUi` / `withLinaria` in `next.config.js`.
|
|
87
|
+
- **If 0 matches remain across the entire repo (Full-Repo Cutover mode):** remove `@chotot/clad-ui-v2` (if aliased), `@linaria/*`, `next-linaria`, `react-laag`, `@chotot/clad-ui/babel`, `@clad-ui/theme` aliases, and `withCladUi` / `withLinaria` from `package.json`, `.babelrc` / `babel.config.js`, and `next.config.js` per [references/component-api-changes.md](references/component-api-changes.md) Section 5.
|
|
88
|
+
- Verify `target` has 0 remaining v2 subpath/alias or `@linaria/*` imports, then run the repo's typecheck (`pnpm type-check` / `tsc --noEmit`) and lint (`pnpm lint`).
|
|
89
|
+
|
|
90
|
+
## Guardrails
|
|
91
|
+
|
|
92
|
+
- Do not remove `@chotot/clad-ui-v2`, `@linaria/*`, `next-linaria`, or Babel/Next Linaria plugins while any file in the repository still imports them.
|
|
93
|
+
- Do not replace `theme.colors.*` with raw hex values (`bg-[#ffd400]`) or base Tailwind palette colors (`bg-gray-100`); always use Clad semantic tokens from [references/token-and-linaria-mapping.md](references/token-and-linaria-mapping.md).
|
|
94
|
+
- Do not map `theme.mediaQueries.desktop` (`992px`) to default `md:` (`768px`); use `min-[992px]:`.
|
|
95
|
+
- Do not invent component props; verify against `references/` or `node_modules/@chotot/clad-ui/dist/components/<Name>/types.d.ts`.
|
|
96
|
+
- Do not commit, push, or publish unless the user explicitly asks.
|
|
97
|
+
|
|
98
|
+
## Feedback Protocol (Consumer Persona)
|
|
99
|
+
|
|
100
|
+
Only when you hit a real migration gap, component parity bug, or missing prop/icon in `@chotot/clad-ui` / `@chotot/icons` during consumer migration:
|
|
101
|
+
- Finish the current migration step first (stay silent if migration worked cleanly; max 1 callout per turn).
|
|
102
|
+
- Append a 1-line callout at the very end of your response:
|
|
103
|
+
> 💡 **clad-ui**: <1-sentence description of the migration gap or bug>. Bạn có muốn tạo GitHub issue lên `carousell/clad-ui` (qua skill `clad-ui-feedback`) không?
|
|
104
|
+
- If the user agrees, follow [../clad-ui-feedback/SKILL.md](../clad-ui-feedback/SKILL.md).
|
|
105
|
+
|
|
106
|
+
## Output
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
- step: <completed workflow step>
|
|
110
|
+
- result: continue | waiting_for_user | stop
|
|
111
|
+
- mode: incremental-coexistence | full-repo-cutover
|
|
112
|
+
- files_migrated:
|
|
113
|
+
- <path>
|
|
114
|
+
- remaining_v2_files_in_repo: <count>
|
|
115
|
+
- verification:
|
|
116
|
+
- v2_imports_in_target: 0
|
|
117
|
+
- typecheck: pass | fail | skipped
|
|
118
|
+
- lint: pass | fail | skipped
|
|
119
|
+
- open_questions:
|
|
120
|
+
- <question if any>
|
|
121
|
+
- next_action:
|
|
122
|
+
- <suggested next action>
|
|
123
|
+
```
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Migrate Clad UI v2 to v3"
|
|
3
|
+
short_description: "Migrate consumer React/Next.js files or repositories from @chotot/clad-ui v2 (Linaria) to @chotot/clad-ui v3 (Tailwind CSS v4) and @chotot/icons."
|
|
4
|
+
default_prompt: "Use $migrate-clad-ui-v3 to migrate the target files or repository from @chotot/clad-ui v2 (Linaria) to @chotot/clad-ui v3 and @chotot/icons following the 5-step dual-mode workflow."
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Clad UI v2 → v3 Component & Import API Changes
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- [1. Import Path Rewrites](#1-import-path-rewrites)
|
|
6
|
+
- [2. Theme Provider & Global CSS Setup](#2-theme-provider--global-css-setup)
|
|
7
|
+
- [3. Universal Component Prop Changes](#3-universal-component-prop-changes)
|
|
8
|
+
- [4. Per-Component Prop & Variant Migrations](#4-per-component-prop--variant-migrations)
|
|
9
|
+
- [5. Full-Repo Dependency & Build Config Cleanup](#5-full-repo-dependency--build-config-cleanup)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Import Path Rewrites
|
|
14
|
+
|
|
15
|
+
All components, 24 Typography components, layout primitives, and utilities are exported from the root `@chotot/clad-ui` (v3) entry point. Icons are exported from `@chotot/clad-ui/icons` (backed by `@chotot/icons` as a direct dependency of `@chotot/clad-ui`).
|
|
16
|
+
*(If migrating incrementally while v2 and v3 coexist in `package.json`, alias v2 as `"@chotot/clad-ui-v2": "npm:@chotot/clad-ui@^2"` while installing v3 as `"@chotot/clad-ui": "^3.0.0"`).*
|
|
17
|
+
|
|
18
|
+
| v2 Import Path | v3 Import Path |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `import { Button, Drawer, cx } from '@chotot/clad-ui'` | `import { Button, Drawer, cn } from '@chotot/clad-ui'` |
|
|
21
|
+
| `import Button from '@chotot/clad-ui/components/Button'` | `import { Button } from '@chotot/clad-ui'` (named export) |
|
|
22
|
+
| `import { BodySection, HeaderPage } from '@chotot/clad-ui/typography'` | `import { BodySection, HeaderPage } from '@chotot/clad-ui'` |
|
|
23
|
+
| `import { ChototLogoText, CtC2C, CtProperty, CtVehicle, Tot } from '@chotot/clad-ui/brand'` | `import { ChototLogoText, CtC2C, CtProperty, CtVehicle, Tot } from '@chotot/clad-ui'` |
|
|
24
|
+
| `import { Close, ChevronRight } from '@chotot/clad-ui/icons'` | `import { Close, ChevronRight } from '@chotot/clad-ui/icons'` (unchanged!) |
|
|
25
|
+
| `import Close from '@chotot/clad-ui/icons/Close'` (or `/icons/index`) | `import { Close } from '@chotot/clad-ui/icons'` (named export) |
|
|
26
|
+
| `import bundleCss from '@chotot/clad-ui/utils/bundleCss'` | `import { getBundledCss } from '@chotot/clad-ui/utils/bundleCss'` |
|
|
27
|
+
| `import clsx from 'clsx'` / `import { twMerge } from 'tailwind-merge'` | `import { cn } from '@chotot/clad-ui'` (token-aware `shadcn-ui/cn`) |
|
|
28
|
+
|
|
29
|
+
> **Important:** v2 allowed default imports from deep paths (`import Button from '@chotot/clad-ui/components/Button'`). In v3, always use **named imports** from `'@chotot/clad-ui'`.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 2. Theme Provider & Global CSS Setup
|
|
34
|
+
|
|
35
|
+
### 2.1 Stylesheet Import (Root `_app.tsx` or `layout.tsx`)
|
|
36
|
+
- Pre-compiled CSS (any bundler):
|
|
37
|
+
```tsx
|
|
38
|
+
import '@chotot/clad-ui/styles.css';
|
|
39
|
+
```
|
|
40
|
+
- Tailwind CSS v4 preset (inside global `.css`, omitting Tailwind preflight so Clad UI's `baseline.css` is not overridden):
|
|
41
|
+
```css
|
|
42
|
+
@layer theme, base, components, utilities;
|
|
43
|
+
@import "tailwindcss/theme.css" layer(theme);
|
|
44
|
+
@import "tailwindcss/utilities.css" layer(utilities);
|
|
45
|
+
@import "@chotot/clad-ui/preset.css";
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2.2 Replace `chototTheme` / `baselineStyles` with `data-theme`
|
|
49
|
+
```tsx
|
|
50
|
+
// @ts-nocheck — legacy v2 example
|
|
51
|
+
// BEFORE (v2)
|
|
52
|
+
import { baselineStyles, cx } from '@chotot/clad-ui';
|
|
53
|
+
import ptyTheme from '@chotot/clad-ui/theme/ct-pty';
|
|
54
|
+
|
|
55
|
+
<div className={cx(String(ptyTheme), baselineStyles)}>{children}</div>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
// AFTER (v3)
|
|
60
|
+
// Values: "chotot" (default), "pty" (Nhà Tốt), "job" (Việc Làm Tốt), "veh" (Chợ Tốt Xe)
|
|
61
|
+
<div data-theme="pty">{children}</div>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 3. Universal Component Prop Changes
|
|
67
|
+
|
|
68
|
+
| v2 Pattern | v3 Replacement |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `extraClasses="my-class"` | `className="my-class"` (`className` is merged after variant classes via `cn`) |
|
|
71
|
+
| `import { cx } from '@chotot/clad-ui/utils'` (or `@chotot/clad-ui`) | `import { cn } from '@chotot/clad-ui'` |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 4. Per-Component Prop & Variant Migrations
|
|
76
|
+
|
|
77
|
+
### Button (`IconButton`, `GhostButton`, `ButtonLink`)
|
|
78
|
+
- **Dropped deprecated `color` values:**
|
|
79
|
+
- `color="chotot"` → `color="primary"`
|
|
80
|
+
- `color="critical"` → `color="error"`
|
|
81
|
+
- `color="positive"` → `color="success"`
|
|
82
|
+
- `color="caution"` / `color="accent"` → `color="primary"` (or `color="neutral"`)
|
|
83
|
+
- Valid v3 `color` values: `'primary' | 'info' | 'success' | 'error' | 'neutral' | 'tertiary'`.
|
|
84
|
+
- **Valid `variant` values:** `'solid' | 'outline' | 'tonal'`.
|
|
85
|
+
- **Valid `size` values:** `'sm' | 'md' | 'lg' | 'xl'` (or `'small' | 'medium' | 'large' | 'xlarge'`).
|
|
86
|
+
|
|
87
|
+
### Chip & TagCloud
|
|
88
|
+
- `variant="normal"` → `variant="fill"` (`'normal'` is kept as a backward-compatible alias).
|
|
89
|
+
- `Chip` `size` is standardized to `'sm'` (24px) | `'md'` (32px, default) | `'lg'` (40px, with `'xl'` kept as a backward-compatible alias for 40px). Note that in v2 `size="lg"` was 32px; in v3 32px is `size="md"` (default) and `size="lg"` is 40px.
|
|
90
|
+
- `TagCloud` also accepts `variant?: 'fill' | 'normal' | 'outline'` (defaults to `'fill'`).
|
|
91
|
+
|
|
92
|
+
### Input Family (`Input`, `CurrencyInput`, `TextArea`, `Dropdown`, `MultiSearchDropdown`, `SearchInput`, `InputGroup`)
|
|
93
|
+
- `Input`, `CurrencyInput`, and `TextArea` now support `status?: 'default' | 'error' | 'warning' | 'success'` (adds `'warning'` with `--color-border-warning` / `--color-text-warning`).
|
|
94
|
+
- Across the entire input family, resting border is unified to `1px solid var(--color-border-thin)` (`#e8e8e8`), disabled border is `2px solid var(--color-border-disabled)` (`#c0c0c0`), and default helptext color is `var(--color-text-secondary)` (`#595959`).
|
|
95
|
+
|
|
96
|
+
### Checkbox
|
|
97
|
+
- Supports `indeterminate?: boolean` (renders the minus indicator, applies `.checkbox--indeterminate`, sets `aria-checked="mixed"`, and syncs the native `input.indeterminate` DOM property).
|
|
98
|
+
|
|
99
|
+
### EmptyState
|
|
100
|
+
- `type` now supports 4 additional Figma v3.0 presets alongside the original 8 types: `'notFoundWhite' | 'working' | 'waitingCv' | 'noReward'`.
|
|
101
|
+
- Supports optional visibility toggles: `showTitle?: boolean`, `showDescription?: boolean`, `showButton?: boolean` (all default to `true`).
|
|
102
|
+
|
|
103
|
+
### Box & Grid
|
|
104
|
+
- Style-prop token maps (`themeTokens.ts`) additionally accept v3 semantic keys on `borderRadius` (`'adSmall' | 'ad' | 'cardSmall' | 'card' | 'decoration' | 'modal'`), `boxShadow` (`'below' | 'floating'`), and `color` / `bg` (`'backgroundApp' | 'backgroundBrandLightSecondary' | 'backgroundDisable' | 'buttonNeutral' | 'skeletonBackground' | 'skeletonItem' | 'logoPrimary' | 'logoSecondary' | 'logoOnBlack'`).
|
|
105
|
+
|
|
106
|
+
### RowItem
|
|
107
|
+
- `type="menu"` (v2 alias) → `type="chevron"` (valid v3 `type` values: `'list' | 'radio' | 'checkbox' | 'chevron' | 'accordion'`).
|
|
108
|
+
- Main row title is passed as `children`; secondary text is `description="..."`.
|
|
109
|
+
- `onChange` signature for `checkbox`/`radio`: `(e: { value: string, checked: boolean }) => void`.
|
|
110
|
+
|
|
111
|
+
### Badge
|
|
112
|
+
- `bg` prop → `backgroundColor` (`'error' | 'warning' | 'info' | 'success' | 'neutral'`).
|
|
113
|
+
- Uses `variant` (`'solid' | 'tonal'`), `size` (`'sm' | 'md' | 'lg' | 'dot'`), `position` (`'topRight' | 'topLeft' | 'right'`), and `borderRadius` (`'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'pill' | 'circle'`).
|
|
114
|
+
|
|
115
|
+
### TextLabel
|
|
116
|
+
- Valid props: `color` (`'info' | 'success' | 'error' | 'warning' | 'neutral'`), `size` (`'md' | 'sm'`), `type` (`'text' | 'status'`), `label` (`string`), `icon` (`ReactNode`).
|
|
117
|
+
|
|
118
|
+
### Drawer & Popup
|
|
119
|
+
- Both legacy monolithic props (`<Drawer open={open} title="..." primaryBtnLabel="..." onClose={fn}>`) and compound slots (`<Drawer.Container>`, `<Drawer.Header>`, `<Drawer.Body>`, `<Drawer.Button>`) are supported in v3.
|
|
120
|
+
- `LegacyDialog` (`DialogMainIcon`) and `LegacyPopup` are also exported from `@chotot/clad-ui` for 1:1 drop-in compatibility.
|
|
121
|
+
|
|
122
|
+
### Floating Components (`Tooltip`, `Popover`, `Dropdown`, `MultiSearchDropdown`, `SearchInput`, `DatePicker`, `DateTimePicker`)
|
|
123
|
+
- Migrated internally from `react-laag` to `@floating-ui/react-dom`.
|
|
124
|
+
- Public React props (`placement`, `open`, `anchorEl`, `onOutsideClick`, etc.) remain 100% compatible; consumer repos no longer need `react-laag` in `package.json`.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 5. Full-Repo Dependency & Build Config Cleanup
|
|
129
|
+
|
|
130
|
+
**Only run this step when `rg "@chotot/clad-ui-v2|@chotot/clad-ui/(components|patterns|typography|brand|theme)|@linaria/"` returns 0 matches across the entire repository:**
|
|
131
|
+
|
|
132
|
+
1. **`package.json`:**
|
|
133
|
+
- Remove `@chotot/clad-ui-v2` (if aliased), `@linaria/core`, `@linaria/react`, `@linaria/babel-preset`, `@linaria/webpack-loader`, `next-linaria`, `react-laag`.
|
|
134
|
+
- Ensure `@chotot/clad-ui` (`^3.0.0`) is present in `dependencies`.
|
|
135
|
+
- Ensure `"@chotot/clad-ui"` is listed in `pnpm.onlyBuiltDependencies`.
|
|
136
|
+
2. **Babel (`.babelrc` / `babel.config.js`):**
|
|
137
|
+
- Remove `@chotot/clad-ui/babel`, `@linaria` presets/plugins, and any `module-resolver` alias for `@clad-ui/theme`.
|
|
138
|
+
3. **Next.js (`next.config.js` / `next.config.mjs` / `withCladUi.js`):**
|
|
139
|
+
- Remove `withCladUi(...)` / `withLinaria(...)` wrappers, `@clad-ui/theme` webpack aliases, and `transpilePackages: ['@chotot/clad-ui']`.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Clad UI v2 (Linaria) → v3 (Tailwind) Token & Style Mapping
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- [1. Replacing Linaria `css` and `styled` Blocks](#1-replacing-linaria-css-and-styled-blocks)
|
|
6
|
+
- [2. Semantic Color Tokens (`theme.colors.*` & `var(--clad-*)`)](#2-semantic-color-tokens-themecolors--var--clad-)
|
|
7
|
+
- [3. Legacy `@deprecated` v2 Colors → v3 Semantic Tokens](#3-legacy-deprecated-v2-colors--v3-semantic-tokens)
|
|
8
|
+
- [4. Interaction State Tokens](#4-interaction-state-tokens)
|
|
9
|
+
- [5. Typography (`theme.typo.*` & `theme.fontSizes.*`)](#5-typography-themetypo--themefontsizes)
|
|
10
|
+
- [6. Spacing, Sizes, Radii, Strokes, Shadows & Z-Index](#6-spacing-sizes-radii-strokes-shadows--z-index)
|
|
11
|
+
- [7. Breakpoints & Media Queries (`theme.mediaQueries.*`)](#7-breakpoints--media-queries-thememediaqueries)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 1. Replacing Linaria `css` and `styled` Blocks
|
|
16
|
+
|
|
17
|
+
Remove `import { css } from '@linaria/core'` and `import { styled } from '@linaria/react'`. Convert static styles to Tailwind utility classes and `cn` from `@chotot/clad-ui`:
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
// @ts-nocheck — legacy v2 example
|
|
21
|
+
// BEFORE (v2 Linaria)
|
|
22
|
+
import { css } from '@linaria/core';
|
|
23
|
+
import { styled } from '@linaria/react';
|
|
24
|
+
import { cx } from '@chotot/clad-ui';
|
|
25
|
+
import theme from '@chotot/clad-ui/theme/chotot';
|
|
26
|
+
|
|
27
|
+
const Card = styled.div`
|
|
28
|
+
background-color: ${theme.colors.backgroundPrimary};
|
|
29
|
+
border: 1px solid ${theme.colors.borderRegular};
|
|
30
|
+
border-radius: ${theme.radii.md};
|
|
31
|
+
padding: ${theme.space.md};
|
|
32
|
+
@media ${theme.mediaQueries.tablet} {
|
|
33
|
+
padding: ${theme.space.lg};
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const titleStyle = css`
|
|
38
|
+
${theme.typo.header.section};
|
|
39
|
+
color: ${theme.colors.textPrimary};
|
|
40
|
+
`;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
// AFTER (v3 Tailwind)
|
|
45
|
+
import { cn } from '@chotot/clad-ui';
|
|
46
|
+
|
|
47
|
+
<div className={cn('bg-background-primary border border-border-regular rounded-lg p-4 md:p-6', className)}>
|
|
48
|
+
<h2 className="text-header-section text-text-primary">{title}</h2>
|
|
49
|
+
</div>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 2. Semantic Color Tokens (`theme.colors.*` & `var(--clad-*)`)
|
|
55
|
+
|
|
56
|
+
General rule: `theme.colors.fooBarBaz` / `var(--clad-foo-bar-baz)` → CSS variable `var(--color-foo-bar-baz)`.
|
|
57
|
+
|
|
58
|
+
| v2 `theme.colors.*` | v2 CSS Variable | v3 Tailwind Utility | v3 CSS Variable |
|
|
59
|
+
|---|---|---|---|
|
|
60
|
+
| `backgroundApp` *(new in v3)* | — | `bg-background-app` | `var(--color-background-app)` (`#f7f7f7`) |
|
|
61
|
+
| `backgroundBrand` | `var(--clad-background-brand)` | `bg-background-brand` | `var(--color-background-brand)` |
|
|
62
|
+
| `backgroundBrandLight` | `var(--clad-background-brand-light)` | `bg-background-brand-light` | `var(--color-background-brand-light)` |
|
|
63
|
+
| `backgroundBrandLightSecondary` *(new in v3)* | — | `bg-background-brand-light-secondary` | `var(--color-background-brand-light-secondary)` |
|
|
64
|
+
| `backgroundChotot` | `var(--clad-background-chotot)` | `bg-background-chotot` | `var(--color-background-chotot)` |
|
|
65
|
+
| `backgroundAppwrapper` | `var(--clad-background-appwrapper)` | `bg-background-appwrapper` | `var(--color-background-appwrapper)` (`#ffd400`) |
|
|
66
|
+
| `backgroundPrimary` | `var(--clad-background-primary)` | `bg-background-primary` | `var(--color-background-primary)` |
|
|
67
|
+
| `backgroundSecondary` | `var(--clad-background-secondary)` | `bg-background-secondary` | `var(--color-background-secondary)` |
|
|
68
|
+
| `backgroundTertiary` | `var(--clad-background-tertiary)` | `bg-background-tertiary` | `var(--color-background-tertiary)` |
|
|
69
|
+
| `backgroundInverted` | `var(--clad-background-inverted)` | `bg-background-inverted` | `var(--color-background-inverted)` |
|
|
70
|
+
| `backgroundDisabled` / `backgroundDisable` | `var(--clad-background-disabled)` | `bg-background-disabled` / `bg-background-disable` | `var(--color-background-disabled)` (`#c0c0c0`) |
|
|
71
|
+
| `backgroundOverlay` | `var(--clad-background-overlay)` | `bg-background-overlay` | `var(--color-background-overlay)` |
|
|
72
|
+
| `backgroundInfo` / `backgroundInfoLight` | `var(--clad-background-info*)` | `bg-background-info` / `bg-background-info-light` | `var(--color-background-info*)` |
|
|
73
|
+
| `backgroundSuccess` / `backgroundSuccessLight` | `var(--clad-background-success*)` | `bg-background-success` / `bg-background-success-light` | `var(--color-background-success*)` |
|
|
74
|
+
| `backgroundError` / `backgroundErrorLight` | `var(--clad-background-error*)` | `bg-background-error` / `bg-background-error-light` | `var(--color-background-error*)` |
|
|
75
|
+
| `backgroundWarning` / `backgroundWarningLight` | `var(--clad-background-warning*)` | `bg-background-warning` / `bg-background-warning-light` | `var(--color-background-warning*)` |
|
|
76
|
+
| `buttonPrimary` / `buttonSecondary` / `buttonNeutral` | `var(--clad-button-*)` | `bg-button-primary` / `bg-button-secondary` / `bg-button-neutral` | `var(--color-button-*)` |
|
|
77
|
+
| `skeletonBackground` / `skeletonItem` *(new in v3)* | — | `bg-skeleton-background` / `bg-skeleton-item` | `var(--color-skeleton-background)` / `var(--color-skeleton-item)` |
|
|
78
|
+
| `logoPrimary` / `logoSecondary` / `logoOnBlack` *(new in v3)* | — | `text-logo-primary` / `text-logo-secondary` / `text-logo-on-black` | `var(--color-logo-*)` |
|
|
79
|
+
| `textPrimary` | `var(--clad-text-primary)` | `text-text-primary` | `var(--color-text-primary)` |
|
|
80
|
+
| `textSecondary` | `var(--clad-text-secondary)` | `text-text-secondary` | `var(--color-text-secondary)` |
|
|
81
|
+
| `textTertiary` | `var(--clad-text-tertiary)` | `text-text-tertiary` | `var(--color-text-tertiary)` |
|
|
82
|
+
| `textDisabled` | `var(--clad-text-disabled)` | `text-text-disabled` | `var(--color-text-disabled)` |
|
|
83
|
+
| `textBlank` | `var(--clad-text-blank)` | `text-text-blank` | `var(--color-text-blank)` |
|
|
84
|
+
| `textBrand` / `textChotot` | `var(--clad-text-brand)` | `text-text-brand` / `text-text-chotot` | `var(--color-text-brand)` |
|
|
85
|
+
| `textOnBackground` | `var(--clad-text-on-background)` | `text-text-on-background` | `var(--color-text-on-background)` |
|
|
86
|
+
| `textLink` / `textInfo` | `var(--clad-text-link)` | `text-text-link` / `text-text-info` | `var(--color-text-link)` |
|
|
87
|
+
| `textSuccess` / `textError` / `textWarning` | `var(--clad-text-*)` | `text-text-success` / `text-text-error` / `text-text-warning` | `var(--color-text-*)` (`text-warning`: `#fb7328`) |
|
|
88
|
+
| `borderDivider` | `var(--clad-border-divider)` | `border-border-divider` | `var(--color-border-divider)` |
|
|
89
|
+
| `borderThin` | `var(--clad-border-thin)` | `border-border-thin` | `var(--color-border-thin)` |
|
|
90
|
+
| `borderRegular` | `var(--clad-border-regular)` | `border-border-regular` | `var(--color-border-regular)` (`#dddddd`) |
|
|
91
|
+
| `borderBold` | `var(--clad-border-bold)` | `border-border-bold` | `var(--color-border-bold)` |
|
|
92
|
+
| `borderActive` / `borderBrand` | `var(--clad-border-active)` | `border-border-active` / `border-border-brand` | `var(--color-border-active)` |
|
|
93
|
+
| `borderError` / `borderSuccess` / `borderWarning` / `borderInfo` | `var(--clad-border-*)` | `border-border-{error,success,warning,info}` | `var(--color-border-*)` |
|
|
94
|
+
| `iconPrimary` / `iconSecondary` / `iconTertiary` | `var(--clad-icon-*)` | `text-icon-{primary,secondary,tertiary}` | `var(--color-icon-*)` |
|
|
95
|
+
| `iconBrand` / `iconError` / `iconSuccess` / `iconWarning` / `iconInfo` | `var(--clad-icon-*)` | `text-icon-{brand,error,success,warning,info}` | `var(--color-icon-*)` |
|
|
96
|
+
|
|
97
|
+
> **v3.0 Palette Refinements:** `--color-gray100` (`border-regular`) is updated from `#dadada` to `#dddddd`; `--color-yellow75` is updated from `#ffe884` to `#ffed9f`; `--color-background-disabled` is `#c0c0c0` (`gray200`); `--color-text-warning` is `#fb7328` (`orange300`); `--color-interaction-brand-pressed` is `#ffba00` (`vertical300`); `--color-interaction-brand-light-pressed` is `#ffd400` (`vertical100`); and `[data-theme="pty"]` light vertical steps (`vertical50`–`vertical200`) are `#fff1e3`, `#ffe5cf`, `#ffcfab`, `#ffaf7a`.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 3. Legacy `@deprecated` v2 Colors → v3 Semantic Tokens
|
|
102
|
+
|
|
103
|
+
Many older consumer files reference v1/v2 deprecated keys on `theme.colors`. Map them to their non-deprecated v3 semantic equivalents:
|
|
104
|
+
|
|
105
|
+
| Legacy v2 `theme.colors.*` | v3 Background Utility | v3 Text / Icon Utility | v3 Border Utility |
|
|
106
|
+
|---|---|---|---|
|
|
107
|
+
| `critical`, `criticalDark`, `negative` (`red500`) | `bg-background-error` | `text-text-error` / `text-icon-error` | `border-border-error` |
|
|
108
|
+
| `criticalBG`, `criticalBGLight` (`red50`/`red75`) | `bg-background-error-light` | — | — |
|
|
109
|
+
| `positive`, `secondary` (`green400`) | `bg-background-success` | `text-text-success` / `text-icon-success` | `border-border-success` |
|
|
110
|
+
| `positiveBG`, `positiveBGLight`, `secondaryBGLight` | `bg-background-success-light` | — | — |
|
|
111
|
+
| `accent`, `accentDark` (`orange300`/`400`) | `bg-background-warning` | `text-text-warning` / `text-icon-warning` | `border-border-warning` |
|
|
112
|
+
| `accentBG`, `accentBGLight` (`orange50`) | `bg-background-warning-light` | — | — |
|
|
113
|
+
| `caution`, `cautionLight` (`yellow100`/`200`) | `bg-background-brand` | `text-text-brand` | `border-border-brand` |
|
|
114
|
+
| `cautionBG`, `cautionBGLight` (`yellow50`) | `bg-background-brand-light` | — | — |
|
|
115
|
+
| `info`, `infoDark` (`blue400`/`500`) | `bg-background-info` | `text-text-info` / `text-icon-info` | `border-border-info` |
|
|
116
|
+
| `infoBG`, `infoBGLight` (`blue50`) | `bg-background-info-light` | — | — |
|
|
117
|
+
| `neutralBG`, `neutralBGLight` (`gray50`) | `bg-background-secondary` | — | `border-border-divider` |
|
|
118
|
+
| `neutralLight` (`gray75`) | `bg-background-tertiary` | — | `border-border-thin` |
|
|
119
|
+
| `neutral` (`gray200`) | `bg-background-disabled` | `text-text-disabled` | `border-border-disabled` |
|
|
120
|
+
| `neutralDark` (`gray400`) | — | `text-text-tertiary` | `border-border-bold` |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 4. Interaction State Tokens
|
|
125
|
+
|
|
126
|
+
| v2 `theme.colors.*` | v3 Tailwind Utility |
|
|
127
|
+
|---|---|
|
|
128
|
+
| `interactionBrandHover` / `interactionBrandPressed` | `hover:bg-interaction-brand-hover` / `active:bg-interaction-brand-pressed` |
|
|
129
|
+
| `interactionBrandLightHover` / `interactionBrandLightPressed` | `hover:bg-interaction-brand-light-hover` / `active:bg-interaction-brand-light-pressed` |
|
|
130
|
+
| `interactionInfoHover` / `interactionInfoPressed` | `hover:bg-interaction-info-hover` / `active:bg-interaction-info-pressed` |
|
|
131
|
+
| `interactionSuccessHover` / `interactionSuccessPressed` | `hover:bg-interaction-success-hover` / `active:bg-interaction-success-pressed` |
|
|
132
|
+
| `interactionErrorHover` / `interactionErrorPressed` | `hover:bg-interaction-error-hover` / `active:bg-interaction-error-pressed` |
|
|
133
|
+
| `interactionNeutralLightHover` / `interactionNeutralLightPressed` | `hover:bg-interaction-neutral-light-hover` / `active:bg-interaction-neutral-light-pressed` |
|
|
134
|
+
| `interactionPrimaryHover` | `hover:bg-interaction-primary-hover` |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 5. Typography (`theme.typo.*` & `theme.fontSizes.*`)
|
|
139
|
+
|
|
140
|
+
| v2 Linaria Spread / Token | v3 Tailwind Utility | v3 React Component |
|
|
141
|
+
|---|---|---|
|
|
142
|
+
| `${theme.typo.display.page}` (`32px` bold) | `text-display-page` | `<DisplayPage>` |
|
|
143
|
+
| `${theme.typo.display.section}` (`24px` bold) | `text-display-section` | `<DisplaySection>` |
|
|
144
|
+
| `${theme.typo.display.caption}` (`20px` bold) | `text-display-caption` | `<DisplayCaption>` |
|
|
145
|
+
| `${theme.typo.display.annotation}` (`18px` bold) | `text-display-annotation` | `<DisplayAnnotation>` |
|
|
146
|
+
| `${theme.typo.header.page}` (`20px` semiBold) | `text-header-page` | `<HeaderPage>` |
|
|
147
|
+
| `${theme.typo.header.section}` (`16px` semiBold) | `text-header-section` | `<HeaderSection>` |
|
|
148
|
+
| `${theme.typo.header.caption}` (`14px` semiBold) | `text-header-caption` | `<HeaderCaption>` |
|
|
149
|
+
| `${theme.typo.header.annotation}` (`12px` semiBold) | `text-header-annotation` | `<HeaderAnnotation>` |
|
|
150
|
+
| `${theme.typo.label.page}` (`16px` bold) | `text-label-page` | `<LabelPage>` |
|
|
151
|
+
| `${theme.typo.label.section}` (`14px` bold) | `text-label-section` | `<LabelSection>` |
|
|
152
|
+
| `${theme.typo.label.caption}` (`12px` bold) | `text-label-caption` | `<LabelCaption>` |
|
|
153
|
+
| `${theme.typo.label.annotation}` (`10px` bold) | `text-label-annotation` | `<LabelAnnotation>` |
|
|
154
|
+
| `${theme.typo.body.page}` (`16px` regular) | `text-body-page` | `<BodyPage>` |
|
|
155
|
+
| `${theme.typo.body.section}` (`14px` regular) | `text-body-section` | `<BodySection>` |
|
|
156
|
+
| `${theme.typo.body.caption}` (`12px` regular) | `text-body-caption` | `<BodyCaption>` |
|
|
157
|
+
| `${theme.typo.body.annotation}` (`10px` regular) | `text-body-annotation` | `<BodyAnnotation>` |
|
|
158
|
+
| `${theme.typo.note.page\|section\|caption}` | `text-note-{page,section,caption}` | `<NotePage>`, `<NoteSection>`, `<NoteCaption>` |
|
|
159
|
+
| `${theme.typo.tagline.section\|caption\|annotation\|footext}` | `text-tagline-{section,caption,annotation,footext}` | `<TaglineSection>`, `<TaglineCaption>`, `<TaglineAnnotation>`, `<TaglineFootext>` |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 6. Spacing, Sizes, Radii, Strokes, Shadows & Z-Index
|
|
164
|
+
|
|
165
|
+
| v2 Token | Value | v3 Tailwind Utility / Semantic Token |
|
|
166
|
+
|---|---|---|
|
|
167
|
+
| `space.none` / `space.xxxs` / `space.xxs` / `space.xs` | `0px` / `2px` / `4px` / `8px` | `p-0` / `p-0.5` / `p-1` / `p-2` (also `m-*`, `gap-*`, or `--spacing-tiny-2`, `--spacing-tiny-4`, `--spacing-extra-small-8`) |
|
|
168
|
+
| `space.sm` / `space.md` / `space.mdl` / `space.lg` | `12px` / `16px` / `20px` / `24px` | `p-3` / `p-4` / `p-5` / `p-6` (or `--spacing-small-12`, `--spacing-medium-16`, `--spacing-large-20`, `--spacing-extra-large-24`) |
|
|
169
|
+
| `space.xl` / `space.xxl` / `space.xxxl` / `space.xxxxl` | `32px` / `48px` / `64px` / `96px` | `p-8` / `p-12` / `p-16` / `p-24` (or `--spacing-huge-32`, `--spacing-massive-40`) |
|
|
170
|
+
| `sizes.xxxs` / `xxs` / `xs` / `sm` / `md` / `lg` / `lxl` / `xl` / `xxl` | `12` / `16` / `20` / `24` / `28` / `32` / `40` / `48` / `64px` | `h-3` / `h-4` / `h-5` / `h-6` / `h-7` / `h-8` / `h-10` / `h-12` / `h-16` (also `w-*`, `size-*`) |
|
|
171
|
+
| `radii.sm` / `radii.$sm` / `radii.md` / `radii.lg` / `radii.xl` / `radii.pill` | `4px` / `6px` / `8px` / `12px` / `20px` / `999px` | `rounded-ad-small` (`4px`) / `rounded-ad` (`6px`) / `rounded-card-small` (`8px`) / `rounded-card` (`12px`) / `rounded-decoration` (`16px`) / `rounded-modal` (`20px`) / `rounded-pill` (`999px`) |
|
|
172
|
+
| `borderWidths.strokeDivider` / `strokeAction` / `strokeEmphasize` | `1px` / `2px` / `3px` | `border` (`var(--stroke-divider)`) / `border-2` (`var(--stroke-action)`) / `border-[3px]` (`var(--stroke-emphasize)`) |
|
|
173
|
+
| `shadows.sm` / `shadows.md` / `shadows.lg` | Elevation shadows | `shadow-below` (`var(--shadow-below)`) / `shadow-floating` (`var(--shadow-floating)`) |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 7. Breakpoints & Media Queries (`theme.mediaQueries.*`)
|
|
178
|
+
|
|
179
|
+
| v2 Media Query / Breakpoint | Viewport Width | v3 Tailwind Responsive Prefix |
|
|
180
|
+
|---|---|---|
|
|
181
|
+
| `theme.mediaQueries.ip5` | `max-width: 320px` | `max-[320px]:` |
|
|
182
|
+
| `theme.breakpoints.sm` (`breakpoints[0]`) | `min-width: 576px` | `min-[576px]:` (or `sm:` if Tailwind `sm` is configured to 576px) |
|
|
183
|
+
| `theme.mediaQueries.tablet` / `breakpoints.md` (`breakpoints[1]`) | `min-width: 768px` | `md:` (`768px`) |
|
|
184
|
+
| `theme.mediaQueries.desktop` / `breakpoints.lg` (`breakpoints[2]`) | `min-width: 992px` | `min-[992px]:` (note: default Tailwind `lg:` is `1024px`) |
|
|
185
|
+
| `theme.breakpoints.xl` (`breakpoints[3]`) | `min-width: 1280px` | `xl:` (`1280px`) |
|
|
186
|
+
| `theme.breakpoints.xxl` (`breakpoints[4]`) | `min-width: 1440px` | `min-[1440px]:` |
|