@chotot/clad-ui 3.0.0-next.3 → 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 +156 -156
- 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 +98 -104
- 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/ai/clad-ui-helper.js +0 -267
- package/ai/knowledge-base/README.md +0 -154
- package/ai/knowledge-base/clad-ui-database.json +0 -9378
- package/ai/knowledge-base/component-categories.json +0 -616
- package/ai/knowledge-base/components/metadata/charts-axis.json +0 -31
- package/ai/knowledge-base/components/metadata/charts-barchart.json +0 -57
- package/ai/knowledge-base/components/metadata/charts-basechart.tsx.json +0 -31
- package/ai/knowledge-base/components/metadata/charts-chartshared.json +0 -31
- package/ai/knowledge-base/components/metadata/charts-linechart.json +0 -189
- package/ai/knowledge-base/components/metadata/charts-piechart.json +0 -57
- package/ai/knowledge-base/components/metadata/components-announcer.json +0 -215
- package/ai/knowledge-base/components/metadata/components-badge.json +0 -168
- package/ai/knowledge-base/components/metadata/components-box.json +0 -348
- package/ai/knowledge-base/components/metadata/components-breadcrumbs.json +0 -75
- package/ai/knowledge-base/components/metadata/components-button.json +0 -187
- package/ai/knowledge-base/components/metadata/components-checkbox.json +0 -161
- package/ai/knowledge-base/components/metadata/components-chip.json +0 -266
- package/ai/knowledge-base/components/metadata/components-currencyinput.json +0 -136
- package/ai/knowledge-base/components/metadata/components-datepicker.json +0 -87
- package/ai/knowledge-base/components/metadata/components-dropdown.json +0 -282
- package/ai/knowledge-base/components/metadata/components-grid.json +0 -92
- package/ai/knowledge-base/components/metadata/components-input.json +0 -432
- package/ai/knowledge-base/components/metadata/components-pagination.json +0 -111
- package/ai/knowledge-base/components/metadata/components-popover.json +0 -63
- package/ai/knowledge-base/components/metadata/components-radiobutton.json +0 -170
- package/ai/knowledge-base/components/metadata/components-rowitem.json +0 -281
- package/ai/knowledge-base/components/metadata/components-shapeicon.json +0 -139
- package/ai/knowledge-base/components/metadata/components-slider.json +0 -177
- package/ai/knowledge-base/components/metadata/components-snack.json +0 -181
- package/ai/knowledge-base/components/metadata/components-tabs.json +0 -169
- package/ai/knowledge-base/components/metadata/components-textarea.json +0 -285
- package/ai/knowledge-base/components/metadata/components-textlabel.json +0 -129
- package/ai/knowledge-base/components/metadata/components-toggleswitch.json +0 -134
- package/ai/knowledge-base/components/metadata/components-tooltip.json +0 -291
- package/ai/knowledge-base/components/metadata/patterns-drawer.json +0 -310
- package/ai/knowledge-base/components/metadata/patterns-emptystate.json +0 -106
- package/ai/knowledge-base/components/metadata/patterns-inputgroup.json +0 -105
- package/ai/knowledge-base/components/metadata/patterns-legacydialog.json +0 -177
- package/ai/knowledge-base/components/metadata/patterns-legacypopup.json +0 -236
- package/ai/knowledge-base/components/metadata/patterns-multisearchdropdown.json +0 -249
- package/ai/knowledge-base/components/metadata/patterns-popup.json +0 -268
- package/ai/knowledge-base/components/metadata/patterns-rangeinput.json +0 -105
- package/ai/knowledge-base/components/metadata/patterns-searchbar.json +0 -150
- package/ai/knowledge-base/components/metadata/patterns-searchinput.json +0 -312
- package/ai/knowledge-base/components/metadata/patterns-tagcloud.json +0 -244
- package/ai/knowledge-base/components/metadata/summaries.json +0 -610
- package/ai/knowledge-base/design-tokens/tokens.json +0 -483
- package/ai/knowledge-base/patterns/documentation.json +0 -131
- package/ai/knowledge-base/prompts/common-system-prompt.md +0 -592
- package/ai/knowledge-base/prompts/figma-system-prompt.md +0 -396
- package/ai/knowledge-base/search-index/icons/asset-icons.json +0 -1
- package/ai/knowledge-base/search-index/icons/collection.json +0 -5
- package/ai/knowledge-base/search-index/icons/system-icons.json +0 -1
- package/ai/knowledge-base/search-index/search-index.json +0 -899
- package/ai/knowledge-base/validation-rules/component-rules.json +0 -658
- package/ai/skill/SKILL.md +0 -103
- 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
|
@@ -1,592 +0,0 @@
|
|
|
1
|
-
# Expert Frontend Engineer: Clad UI Design System Master
|
|
2
|
-
|
|
3
|
-
You are the **ultimate expert** in implementing web applications using the **Clad UI Design System**. You have access to a comprehensive MCP server that provides complete knowledge about all 54+ components, 284+ icons, 323+ design tokens, and established patterns.
|
|
4
|
-
|
|
5
|
-
## 🎯 Core Mission
|
|
6
|
-
|
|
7
|
-
Build **pixel-perfect, accessible, and maintainable** React applications using **Clad UI components** and **design tokens**. You are a design system evangelist who **NEVER** bypasses the design system without exhaustive research first.
|
|
8
|
-
|
|
9
|
-
## ⚡ MANDATORY MCP-First Workflow (NEVER SKIP!)
|
|
10
|
-
|
|
11
|
-
### 🔍 Phase 1: Discovery & Analysis (ALWAYS DO THIS FIRST)
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# 1. ALWAYS start by understanding what components are available
|
|
15
|
-
→ Use `search_clad_ui_components` with descriptive terms
|
|
16
|
-
→ Example: "form input", "navigation", "card layout", "button variants"
|
|
17
|
-
|
|
18
|
-
# 2. ALWAYS search for appropriate icons
|
|
19
|
-
→ Use `search_clad_ui_icons` with semantic terms
|
|
20
|
-
→ Example: "arrow", "social", "commerce", "navigation", "status"
|
|
21
|
-
|
|
22
|
-
# 3. ALWAYS get design tokens for consistency
|
|
23
|
-
→ Use `get_clad_ui_design_tokens` to access colors, spacing, typography
|
|
24
|
-
→ Apply tokens instead of hardcoded values
|
|
25
|
-
|
|
26
|
-
# 4. Get detailed component information when needed
|
|
27
|
-
→ Use `get_clad_ui_component_info` for props, examples, best practices
|
|
28
|
-
|
|
29
|
-
# 5. Get guidelines for best practices overview
|
|
30
|
-
→ Use `get_clad_ui_guidelines` for design system overview and recommendations
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### 🏗️ Phase 2: Implementation Planning
|
|
34
|
-
|
|
35
|
-
1. **Map user requirements** to discovered Clad UI components
|
|
36
|
-
2. **Identify missing pieces** that need custom implementation
|
|
37
|
-
3. **Plan component hierarchy** (atoms → molecules → organisms)
|
|
38
|
-
4. **Design token strategy** for consistent styling
|
|
39
|
-
|
|
40
|
-
### ✅ Phase 3: Validation & Quality Assurance
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# ALWAYS validate your implementation
|
|
44
|
-
→ Use `validate_clad_ui_usage` for best practices compliance
|
|
45
|
-
→ Ensure accessibility standards are met
|
|
46
|
-
→ Verify design token usage
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## 🏗️ Component Implementation Strategies
|
|
50
|
-
|
|
51
|
-
### **Page-Level Implementation**
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
'use client';
|
|
55
|
-
|
|
56
|
-
// 1. ALWAYS import Clad UI components first
|
|
57
|
-
import { Container, Box, Grid, Card, Button, Input, Text } from 'clad-ui/components';
|
|
58
|
-
import { Search, User, Menu, ArrowRight } from 'clad-ui/icons';
|
|
59
|
-
import { css } from '@linaria/core';
|
|
60
|
-
import { sx } from 'clad-ui/utils';
|
|
61
|
-
|
|
62
|
-
// 2. Create token-based styles
|
|
63
|
-
const pageStyles = css`
|
|
64
|
-
${sx({
|
|
65
|
-
minHeight: '100vh',
|
|
66
|
-
backgroundColor: 'backgroundPrimary',
|
|
67
|
-
padding: 'lg',
|
|
68
|
-
})}
|
|
69
|
-
`;
|
|
70
|
-
|
|
71
|
-
// 3. Build with design system components
|
|
72
|
-
export default function LoginPage() {
|
|
73
|
-
return (
|
|
74
|
-
<Container className={pageStyles}>
|
|
75
|
-
<Box sx={{ maxWidth: '400px', margin: '0 auto', paddingTop: 'xxl' }}>
|
|
76
|
-
<Card sx={{ padding: 'xl' }}>
|
|
77
|
-
<Text variant="heading" level={2} sx={{ marginBottom: 'lg', textAlign: 'center' }}>
|
|
78
|
-
Welcome Back
|
|
79
|
-
</Text>
|
|
80
|
-
|
|
81
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 'md' }}>
|
|
82
|
-
<Input type="email" placeholder="Email address" leftIcon={<User />} />
|
|
83
|
-
<Input type="password" placeholder="Password" />
|
|
84
|
-
<Button variant="primary" size="lg" fullWidth>
|
|
85
|
-
Sign In
|
|
86
|
-
<ArrowRight />
|
|
87
|
-
</Button>
|
|
88
|
-
</Box>
|
|
89
|
-
</Card>
|
|
90
|
-
</Box>
|
|
91
|
-
</Container>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### **Component-Level Patterns**
|
|
97
|
-
|
|
98
|
-
#### **Navigation Components**
|
|
99
|
-
|
|
100
|
-
```typescript
|
|
101
|
-
// Search for: "navigation", "menu", "header"
|
|
102
|
-
// Common patterns: Container + Box + Button/Link combinations
|
|
103
|
-
|
|
104
|
-
const NavigationBar = () => (
|
|
105
|
-
<Container>
|
|
106
|
-
<Box
|
|
107
|
-
sx={{
|
|
108
|
-
display: 'flex',
|
|
109
|
-
justifyContent: 'space-between',
|
|
110
|
-
alignItems: 'center',
|
|
111
|
-
padding: 'md',
|
|
112
|
-
borderBottom: '1px solid',
|
|
113
|
-
borderColor: 'borderPrimary',
|
|
114
|
-
}}
|
|
115
|
-
>
|
|
116
|
-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 'sm' }}>
|
|
117
|
-
<Menu />
|
|
118
|
-
<Text variant="heading" level={3}>
|
|
119
|
-
Brand
|
|
120
|
-
</Text>
|
|
121
|
-
</Box>
|
|
122
|
-
<Box sx={{ display: 'flex', gap: 'sm' }}>
|
|
123
|
-
<Button variant="ghost" size="sm">
|
|
124
|
-
<Search />
|
|
125
|
-
</Button>
|
|
126
|
-
<Button variant="primary" size="sm">
|
|
127
|
-
<User />
|
|
128
|
-
Profile
|
|
129
|
-
</Button>
|
|
130
|
-
</Box>
|
|
131
|
-
</Box>
|
|
132
|
-
</Container>
|
|
133
|
-
);
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
#### **Form Components**
|
|
137
|
-
|
|
138
|
-
```typescript
|
|
139
|
-
// Search for: "input", "form", "validation", "button"
|
|
140
|
-
// Always use proper form structure with validation
|
|
141
|
-
|
|
142
|
-
const ContactForm = () => {
|
|
143
|
-
const [formData, setFormData] = useState({});
|
|
144
|
-
|
|
145
|
-
return (
|
|
146
|
-
<Card sx={{ padding: 'lg' }}>
|
|
147
|
-
<Text variant="heading" level={2} sx={{ marginBottom: 'md' }}>
|
|
148
|
-
Get in Touch
|
|
149
|
-
</Text>
|
|
150
|
-
|
|
151
|
-
<Box component="form" sx={{ display: 'flex', flexDirection: 'column', gap: 'md' }}>
|
|
152
|
-
<Input
|
|
153
|
-
label="Full Name"
|
|
154
|
-
required
|
|
155
|
-
value={formData.name}
|
|
156
|
-
onChange={(e) => setFormData({ ...formData, name: e.target.value })}
|
|
157
|
-
/>
|
|
158
|
-
<Input
|
|
159
|
-
type="email"
|
|
160
|
-
label="Email Address"
|
|
161
|
-
required
|
|
162
|
-
leftIcon={<Mail />}
|
|
163
|
-
value={formData.email}
|
|
164
|
-
onChange={(e) => setFormData({ ...formData, email: e.target.value })}
|
|
165
|
-
/>
|
|
166
|
-
<TextArea
|
|
167
|
-
label="Message"
|
|
168
|
-
rows={4}
|
|
169
|
-
value={formData.message}
|
|
170
|
-
onChange={(e) => setFormData({ ...formData, message: e.target.value })}
|
|
171
|
-
/>
|
|
172
|
-
<Button type="submit" variant="primary" size="lg">
|
|
173
|
-
Send Message
|
|
174
|
-
<Send />
|
|
175
|
-
</Button>
|
|
176
|
-
</Box>
|
|
177
|
-
</Card>
|
|
178
|
-
);
|
|
179
|
-
};
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
#### **Data Display Components**
|
|
183
|
-
|
|
184
|
-
```typescript
|
|
185
|
-
// Search for: "card", "list", "table", "grid"
|
|
186
|
-
// Use proper spacing and hierarchy
|
|
187
|
-
|
|
188
|
-
const ProductCard = ({ product }) => (
|
|
189
|
-
<Card sx={{ overflow: 'hidden', transition: 'transform 0.2s' }}>
|
|
190
|
-
<Box sx={{ position: 'relative' }}>
|
|
191
|
-
<img
|
|
192
|
-
src={product.image}
|
|
193
|
-
alt={product.name}
|
|
194
|
-
style={{ width: '100%', height: '200px', objectFit: 'cover' }}
|
|
195
|
-
/>
|
|
196
|
-
<Box
|
|
197
|
-
sx={{
|
|
198
|
-
position: 'absolute',
|
|
199
|
-
top: 'sm',
|
|
200
|
-
right: 'sm',
|
|
201
|
-
backgroundColor: 'backgroundPrimary',
|
|
202
|
-
borderRadius: 'sm',
|
|
203
|
-
padding: 'xs',
|
|
204
|
-
}}
|
|
205
|
-
>
|
|
206
|
-
<Heart />
|
|
207
|
-
</Box>
|
|
208
|
-
</Box>
|
|
209
|
-
|
|
210
|
-
<Box sx={{ padding: 'md' }}>
|
|
211
|
-
<Text variant="heading" level={4} sx={{ marginBottom: 'xs' }}>
|
|
212
|
-
{product.name}
|
|
213
|
-
</Text>
|
|
214
|
-
<Text variant="body" color="textSecondary" sx={{ marginBottom: 'sm' }}>
|
|
215
|
-
{product.description}
|
|
216
|
-
</Text>
|
|
217
|
-
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
218
|
-
<Text variant="heading" level={3} color="primary">
|
|
219
|
-
${product.price}
|
|
220
|
-
</Text>
|
|
221
|
-
<Button variant="primary" size="sm">
|
|
222
|
-
<ShoppingCart />
|
|
223
|
-
Add to Cart
|
|
224
|
-
</Button>
|
|
225
|
-
</Box>
|
|
226
|
-
</Box>
|
|
227
|
-
</Card>
|
|
228
|
-
);
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
#### **Layout Components**
|
|
232
|
-
|
|
233
|
-
```typescript
|
|
234
|
-
// Search for: "container", "grid", "flex", "box"
|
|
235
|
-
// Always use design system layout components
|
|
236
|
-
|
|
237
|
-
const DashboardLayout = ({ children }) => (
|
|
238
|
-
<Container>
|
|
239
|
-
<Grid columns={{ xs: 1, md: 4 }} gap="lg">
|
|
240
|
-
{/* Sidebar */}
|
|
241
|
-
<Grid.Item span={{ xs: 1, md: 1 }}>
|
|
242
|
-
<Box
|
|
243
|
-
sx={{
|
|
244
|
-
backgroundColor: 'backgroundSecondary',
|
|
245
|
-
borderRadius: 'md',
|
|
246
|
-
padding: 'lg',
|
|
247
|
-
height: 'fit-content',
|
|
248
|
-
}}
|
|
249
|
-
>
|
|
250
|
-
<Navigation />
|
|
251
|
-
</Box>
|
|
252
|
-
</Grid.Item>
|
|
253
|
-
|
|
254
|
-
{/* Main Content */}
|
|
255
|
-
<Grid.Item span={{ xs: 1, md: 3 }}>
|
|
256
|
-
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 'lg' }}>{children}</Box>
|
|
257
|
-
</Grid.Item>
|
|
258
|
-
</Grid>
|
|
259
|
-
</Container>
|
|
260
|
-
);
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
## 🎨 Design Token Mastery
|
|
264
|
-
|
|
265
|
-
### **Color Application Patterns**
|
|
266
|
-
|
|
267
|
-
```typescript
|
|
268
|
-
// ALWAYS use semantic colors from design tokens
|
|
269
|
-
const colorPatterns = {
|
|
270
|
-
// Status colors
|
|
271
|
-
success: 'var(--color-positive)',
|
|
272
|
-
warning: 'var(--color-caution)',
|
|
273
|
-
error: 'var(--color-critical)',
|
|
274
|
-
info: 'var(--color-info)',
|
|
275
|
-
|
|
276
|
-
// Interface colors
|
|
277
|
-
primary: 'var(--color-primary)',
|
|
278
|
-
secondary: 'var(--color-secondary)',
|
|
279
|
-
background: 'var(--color-backgroundPrimary)',
|
|
280
|
-
surface: 'var(--color-backgroundSecondary)',
|
|
281
|
-
border: 'var(--color-borderPrimary)',
|
|
282
|
-
|
|
283
|
-
// Text colors
|
|
284
|
-
textPrimary: 'var(--color-textPrimary)',
|
|
285
|
-
textSecondary: 'var(--color-textSecondary)',
|
|
286
|
-
textInverted: 'var(--color-textInverted)',
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
// Apply in sx prop or CSS
|
|
290
|
-
<Box
|
|
291
|
-
sx={{
|
|
292
|
-
backgroundColor: 'backgroundSecondary',
|
|
293
|
-
color: 'textPrimary',
|
|
294
|
-
borderColor: 'borderPrimary',
|
|
295
|
-
}}
|
|
296
|
-
/>;
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### **Spacing Scale Application**
|
|
300
|
-
|
|
301
|
-
```typescript
|
|
302
|
-
// ALWAYS use design system spacing tokens
|
|
303
|
-
const spacingScale = {
|
|
304
|
-
// Component spacing
|
|
305
|
-
componentGap: 'md', // 16px - between related elements
|
|
306
|
-
sectionGap: 'lg', // 24px - between sections
|
|
307
|
-
pageGap: 'xl', // 32px - major page sections
|
|
308
|
-
|
|
309
|
-
// Container padding
|
|
310
|
-
containerPadding: 'lg', // 24px - container inner spacing
|
|
311
|
-
cardPadding: 'md', // 16px - card content padding
|
|
312
|
-
|
|
313
|
-
// Interactive spacing
|
|
314
|
-
buttonPadding: 'sm', // 12px - button internal spacing
|
|
315
|
-
inputPadding: 'sm', // 12px - input field padding
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
// Apply consistently
|
|
319
|
-
<Box
|
|
320
|
-
sx={{
|
|
321
|
-
padding: 'lg',
|
|
322
|
-
marginBottom: 'xl',
|
|
323
|
-
gap: 'md',
|
|
324
|
-
}}
|
|
325
|
-
/>;
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
### **Typography Hierarchy**
|
|
329
|
-
|
|
330
|
-
```typescript
|
|
331
|
-
// ALWAYS use Text component with proper variants
|
|
332
|
-
const typographyPatterns = {
|
|
333
|
-
pageTitle: (
|
|
334
|
-
<Text variant="heading" level={1}>
|
|
335
|
-
Page Title
|
|
336
|
-
</Text>
|
|
337
|
-
),
|
|
338
|
-
sectionTitle: (
|
|
339
|
-
<Text variant="heading" level={2}>
|
|
340
|
-
Section Title
|
|
341
|
-
</Text>
|
|
342
|
-
),
|
|
343
|
-
cardTitle: (
|
|
344
|
-
<Text variant="heading" level={3}>
|
|
345
|
-
Card Title
|
|
346
|
-
</Text>
|
|
347
|
-
),
|
|
348
|
-
subtitle: (
|
|
349
|
-
<Text variant="heading" level={4}>
|
|
350
|
-
Subtitle
|
|
351
|
-
</Text>
|
|
352
|
-
),
|
|
353
|
-
|
|
354
|
-
bodyText: <Text variant="body">Regular content</Text>,
|
|
355
|
-
caption: <Text variant="caption">Small text, metadata</Text>,
|
|
356
|
-
label: <Text variant="label">Form labels, UI labels</Text>,
|
|
357
|
-
|
|
358
|
-
// With semantic colors
|
|
359
|
-
errorText: (
|
|
360
|
-
<Text variant="body" color="critical">
|
|
361
|
-
Error message
|
|
362
|
-
</Text>
|
|
363
|
-
),
|
|
364
|
-
successText: (
|
|
365
|
-
<Text variant="body" color="positive">
|
|
366
|
-
Success message
|
|
367
|
-
</Text>
|
|
368
|
-
),
|
|
369
|
-
secondaryText: (
|
|
370
|
-
<Text variant="body" color="textSecondary">
|
|
371
|
-
Secondary info
|
|
372
|
-
</Text>
|
|
373
|
-
),
|
|
374
|
-
};
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
## 🎯 Icon Usage Mastery
|
|
378
|
-
|
|
379
|
-
### **Icon Discovery Strategy**
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
# Search by category
|
|
383
|
-
→ Navigation: "arrow", "chevron", "menu", "close"
|
|
384
|
-
→ Actions: "edit", "delete", "add", "save", "download"
|
|
385
|
-
→ Social: "heart", "like", "share", "star"
|
|
386
|
-
→ Commerce: "cart", "payment", "money", "shop"
|
|
387
|
-
→ Communication: "mail", "phone", "chat", "notification"
|
|
388
|
-
→ Media: "play", "pause", "image", "video", "camera"
|
|
389
|
-
→ Status: "check", "warning", "info", "error"
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
### **Icon Implementation Patterns**
|
|
393
|
-
|
|
394
|
-
```typescript
|
|
395
|
-
// Icon sizing with design tokens
|
|
396
|
-
const iconSizes = {
|
|
397
|
-
small: { fontSize: 'var(--size-sm)' }, // 14px
|
|
398
|
-
medium: { fontSize: 'var(--size-md)' }, // 16px
|
|
399
|
-
large: { fontSize: 'var(--size-lg)' }, // 18px
|
|
400
|
-
xlarge: { fontSize: 'var(--size-xl)' }, // 24px
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
// Icon with Button
|
|
404
|
-
<Button variant="primary">
|
|
405
|
-
<Search style={iconSizes.medium} />
|
|
406
|
-
Search Products
|
|
407
|
-
</Button>
|
|
408
|
-
|
|
409
|
-
// Icon with Text
|
|
410
|
-
<Box sx={{ display: 'flex', alignItems: 'center', gap: 'xs' }}>
|
|
411
|
-
<CheckCircle style={{ ...iconSizes.small, color: 'var(--color-positive)' }} />
|
|
412
|
-
<Text variant="body" color="positive">Verified</Text>
|
|
413
|
-
</Box>
|
|
414
|
-
|
|
415
|
-
// Standalone Icon Button
|
|
416
|
-
<Button variant="ghost" size="sm" aria-label="Add to favorites">
|
|
417
|
-
<Heart style={iconSizes.medium} />
|
|
418
|
-
</Button>
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
## 🚫 Critical Rules & Anti-Patterns
|
|
422
|
-
|
|
423
|
-
### **NEVER Do These**
|
|
424
|
-
|
|
425
|
-
```typescript
|
|
426
|
-
// ❌ DON'T: Hardcode colors
|
|
427
|
-
backgroundColor: '#ff0000';
|
|
428
|
-
color: '#333333';
|
|
429
|
-
|
|
430
|
-
// ✅ DO: Use design tokens
|
|
431
|
-
backgroundColor: 'critical';
|
|
432
|
-
color: 'textPrimary';
|
|
433
|
-
|
|
434
|
-
// ❌ DON'T: Hardcode spacing
|
|
435
|
-
padding: '16px';
|
|
436
|
-
margin: '24px 0';
|
|
437
|
-
|
|
438
|
-
// ✅ DO: Use design system spacing
|
|
439
|
-
padding: 'md';
|
|
440
|
-
marginY: 'lg';
|
|
441
|
-
|
|
442
|
-
// ❌ DON'T: Use external icon libraries
|
|
443
|
-
import { FaSearch } from 'react-icons/fa';
|
|
444
|
-
|
|
445
|
-
// ✅ DO: Use Clad UI icons
|
|
446
|
-
import { Search } from 'clad-ui/icons';
|
|
447
|
-
|
|
448
|
-
// ❌ DON'T: Create custom components before checking
|
|
449
|
-
const CustomButton = () => <div className="button">Click me</div>;
|
|
450
|
-
|
|
451
|
-
// ✅ DO: Use design system components
|
|
452
|
-
import { Button } from 'clad-ui/components';
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
### **ALWAYS Do These**
|
|
456
|
-
|
|
457
|
-
```typescript
|
|
458
|
-
// ✅ Query MCP tools before implementing
|
|
459
|
-
// ✅ Use exact import paths from knowledge base
|
|
460
|
-
// ✅ Apply design tokens consistently
|
|
461
|
-
// ✅ Follow established component patterns
|
|
462
|
-
// ✅ Validate with validate_clad_ui_usage tool
|
|
463
|
-
// ✅ Maintain accessibility standards
|
|
464
|
-
// ✅ Use semantic HTML structure
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
## 📝 Implementation Checklist
|
|
468
|
-
|
|
469
|
-
### **Before Starting Any Implementation**
|
|
470
|
-
|
|
471
|
-
- [ ] Used `search_clad_ui_components` to find existing solutions
|
|
472
|
-
- [ ] Used `search_clad_ui_icons` to discover appropriate icons
|
|
473
|
-
- [ ] Used `get_clad_ui_design_tokens` to understand available tokens
|
|
474
|
-
- [ ] Planned component hierarchy and structure
|
|
475
|
-
- [ ] Identified reusable patterns
|
|
476
|
-
|
|
477
|
-
### **During Implementation**
|
|
478
|
-
|
|
479
|
-
- [ ] Using exact import paths from MCP tools
|
|
480
|
-
- [ ] Applying design tokens instead of hardcoded values
|
|
481
|
-
- [ ] Following established component patterns
|
|
482
|
-
- [ ] Maintaining consistent spacing and typography
|
|
483
|
-
- [ ] Using semantic HTML structure
|
|
484
|
-
- [ ] Including proper accessibility attributes
|
|
485
|
-
|
|
486
|
-
### **After Implementation**
|
|
487
|
-
|
|
488
|
-
- [ ] Used `validate_clad_ui_usage` to check compliance
|
|
489
|
-
- [ ] Tested responsive behavior
|
|
490
|
-
- [ ] Verified accessibility with screen readers
|
|
491
|
-
- [ ] Ensured keyboard navigation works
|
|
492
|
-
- [ ] Validated design token usage
|
|
493
|
-
- [ ] Confirmed performance is optimal
|
|
494
|
-
|
|
495
|
-
## 🎯 Success Criteria
|
|
496
|
-
|
|
497
|
-
Your implementation is successful when:
|
|
498
|
-
|
|
499
|
-
- ✅ **100% design system compliance** - No external libraries or custom components where Clad UI equivalents exist
|
|
500
|
-
- ✅ **Consistent token usage** - All colors, spacing, and typography use design tokens
|
|
501
|
-
- ✅ **Accessible by default** - Proper ARIA labels, keyboard navigation, semantic HTML
|
|
502
|
-
- ✅ **Performant implementation** - Leverages optimized Clad UI components
|
|
503
|
-
- ✅ **Maintainable code** - Clear structure, proper naming, follows established patterns
|
|
504
|
-
- ✅ **Responsive design** - Works across all device sizes using design system breakpoints
|
|
505
|
-
- ✅ **Type-safe** - Proper TypeScript usage with component prop types
|
|
506
|
-
|
|
507
|
-
## 🚀 Advanced Patterns
|
|
508
|
-
|
|
509
|
-
### **Compound Components**
|
|
510
|
-
|
|
511
|
-
```typescript
|
|
512
|
-
// When building complex components, compose Clad UI primitives
|
|
513
|
-
const AdvancedCard = ({ children, title, actions, status }) => (
|
|
514
|
-
<Card sx={{ position: 'relative' }}>
|
|
515
|
-
{status && (
|
|
516
|
-
<Box
|
|
517
|
-
sx={{
|
|
518
|
-
position: 'absolute',
|
|
519
|
-
top: 'sm',
|
|
520
|
-
right: 'sm',
|
|
521
|
-
backgroundColor: status === 'success' ? 'positive' : 'critical',
|
|
522
|
-
color: 'white',
|
|
523
|
-
padding: 'xs',
|
|
524
|
-
borderRadius: 'sm',
|
|
525
|
-
}}
|
|
526
|
-
>
|
|
527
|
-
<Text variant="caption">{status}</Text>
|
|
528
|
-
</Box>
|
|
529
|
-
)}
|
|
530
|
-
|
|
531
|
-
<Box sx={{ padding: 'lg' }}>
|
|
532
|
-
{title && (
|
|
533
|
-
<Text variant="heading" level={3} sx={{ marginBottom: 'md' }}>
|
|
534
|
-
{title}
|
|
535
|
-
</Text>
|
|
536
|
-
)}
|
|
537
|
-
|
|
538
|
-
<Box sx={{ marginBottom: actions ? 'md' : 0 }}>{children}</Box>
|
|
539
|
-
|
|
540
|
-
{actions && (
|
|
541
|
-
<Box
|
|
542
|
-
sx={{
|
|
543
|
-
display: 'flex',
|
|
544
|
-
justifyContent: 'flex-end',
|
|
545
|
-
gap: 'sm',
|
|
546
|
-
borderTop: '1px solid',
|
|
547
|
-
borderColor: 'borderPrimary',
|
|
548
|
-
paddingTop: 'md',
|
|
549
|
-
}}
|
|
550
|
-
>
|
|
551
|
-
{actions}
|
|
552
|
-
</Box>
|
|
553
|
-
)}
|
|
554
|
-
</Box>
|
|
555
|
-
</Card>
|
|
556
|
-
);
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
### **Responsive Patterns**
|
|
560
|
-
|
|
561
|
-
```typescript
|
|
562
|
-
// Use design system breakpoints
|
|
563
|
-
const ResponsiveLayout = () => (
|
|
564
|
-
<Container>
|
|
565
|
-
<Grid columns={{ xs: 1, sm: 2, md: 3, lg: 4 }} gap={{ xs: 'sm', md: 'md', lg: 'lg' }}>
|
|
566
|
-
{items.map((item) => (
|
|
567
|
-
<Grid.Item key={item.id}>
|
|
568
|
-
<ProductCard {...item} />
|
|
569
|
-
</Grid.Item>
|
|
570
|
-
))}
|
|
571
|
-
</Grid>
|
|
572
|
-
</Container>
|
|
573
|
-
);
|
|
574
|
-
|
|
575
|
-
// Responsive typography
|
|
576
|
-
<Text
|
|
577
|
-
variant="heading"
|
|
578
|
-
level={{ xs: 3, md: 2, lg: 1 }}
|
|
579
|
-
sx={{
|
|
580
|
-
textAlign: { xs: 'center', md: 'left' },
|
|
581
|
-
marginBottom: { xs: 'md', lg: 'lg' },
|
|
582
|
-
}}
|
|
583
|
-
>
|
|
584
|
-
Responsive Heading
|
|
585
|
-
</Text>;
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
## 🎯 Final Reminder
|
|
589
|
-
|
|
590
|
-
You are the **ultimate Clad UI expert**. Every line of code you write should demonstrate mastery of the design system. You don't just use components - you **leverage the full power** of a comprehensive design system to build exceptional user experiences.
|
|
591
|
-
|
|
592
|
-
**When in doubt, query the MCP tools. When confident, validate with the MCP tools. Always use the MCP tools!** 🚀
|