@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,97 @@
|
|
|
1
|
+
import { ReactElement, ReactNode, MouseEvent, MouseEventHandler } from 'react';
|
|
2
|
+
import { HTMLCladUIProps, ReactRef } from '../../types';
|
|
3
|
+
export type TabsOnChangeHandler<ValueType = number | string> = (event: MouseEvent<HTMLElement>, value: ValueType) => void;
|
|
4
|
+
export type TabsProps = {
|
|
5
|
+
/** Tab children. */
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Extra class for the tabs container. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Callback when the selected tab changes. */
|
|
10
|
+
onChange?: TabsOnChangeHandler;
|
|
11
|
+
/** Currently selected tab value. */
|
|
12
|
+
value?: number | string;
|
|
13
|
+
/**
|
|
14
|
+
* Layout behavior.
|
|
15
|
+
* - `standard`: tabs are natural width and scroll horizontally.
|
|
16
|
+
* - `fullWidth`: tabs stretch to fill the container.
|
|
17
|
+
* @default 'standard'
|
|
18
|
+
*/
|
|
19
|
+
variant?: 'fullWidth' | 'standard';
|
|
20
|
+
/** Show a bottom divider line. @default false */
|
|
21
|
+
showDivider?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Font weight for inactive tabs (active tab is always bold).
|
|
24
|
+
* @default 'bold'
|
|
25
|
+
*/
|
|
26
|
+
fontWeight?: 'bold' | 'normal';
|
|
27
|
+
/** Custom height for the container and tabs (e.g. `"70px"`). */
|
|
28
|
+
height?: string;
|
|
29
|
+
/** Number of lines to clamp long tab labels. @default 1 */
|
|
30
|
+
lineClamp?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Show left/right scroll buttons when tabs overflow (only applies to `variant="standard"`).
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
showScrollBtn?: boolean;
|
|
36
|
+
/** Pixels to scroll per click. Defaults to one tab width. */
|
|
37
|
+
widthScroll?: number;
|
|
38
|
+
};
|
|
39
|
+
export type TabProps = HTMLCladUIProps<'button', 'onClick'> & {
|
|
40
|
+
/** Ref to the DOM node. */
|
|
41
|
+
ref?: ReactRef<HTMLButtonElement | null>;
|
|
42
|
+
/** Tab icon element. */
|
|
43
|
+
icon?: ReactElement;
|
|
44
|
+
/** Tab label text. */
|
|
45
|
+
label?: string;
|
|
46
|
+
/** Tab value — used to match the `value` prop on the parent `Tabs`. */
|
|
47
|
+
value: number | string;
|
|
48
|
+
/** Disable this tab. @default false */
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
/** Extra class for the tab element. */
|
|
51
|
+
className?: string;
|
|
52
|
+
/**
|
|
53
|
+
* On click handler. Internally managed by the parent `Tabs` component.
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
onClick?: (event: MouseEvent<HTMLElement>, value: number | string) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Tab index. Internally managed by the parent `Tabs` component.
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
tabIndex?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether this tab is selected. Internally managed by the parent `Tabs` component.
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
active?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Indicator element. Internally managed by the parent `Tabs` component.
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
indicator?: ReactElement | null;
|
|
72
|
+
/**
|
|
73
|
+
* Font weight for inactive tabs. Internally managed by the parent `Tabs` component.
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
fontWeight?: 'bold' | 'normal';
|
|
77
|
+
/** Custom tab width (e.g. `"100px"`). */
|
|
78
|
+
width?: string;
|
|
79
|
+
/** Custom tab height (e.g. `"70px"`). */
|
|
80
|
+
height?: string;
|
|
81
|
+
/** Number of lines to clamp the label. @default 1 */
|
|
82
|
+
lineClamp?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Layout variant inherited from parent `Tabs`. Internally managed.
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
variant?: 'fullWidth' | 'standard';
|
|
88
|
+
};
|
|
89
|
+
export type TabIndicatorProps = {
|
|
90
|
+
/** @default false */
|
|
91
|
+
primary?: boolean;
|
|
92
|
+
};
|
|
93
|
+
export type ScrollButtonProps = {
|
|
94
|
+
isHidden: boolean;
|
|
95
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
96
|
+
'data-value': 'left' | 'right';
|
|
97
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TagCloudProps } from './types';
|
|
2
|
+
declare const TagCloud: {
|
|
3
|
+
({ className, options, label, value, onChange, required, multiple, maxSelection, tagCloudRef, status, helptext, variant, selectedTextStyle, }: TagCloudProps): import('react').DetailedReactHTMLElement<{
|
|
4
|
+
ref: import('react').RefObject<HTMLDivElement>;
|
|
5
|
+
className: string;
|
|
6
|
+
'data-clad': string;
|
|
7
|
+
}, HTMLDivElement>;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export { TagCloud };
|
|
11
|
+
export default TagCloud;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VariantProps } from 'tailwind-variants/lite';
|
|
2
|
+
export declare const tagCloudVariants: import('tailwind-variants').TVReturnType<{
|
|
3
|
+
status: {
|
|
4
|
+
default: "";
|
|
5
|
+
error: "tag-cloud--error";
|
|
6
|
+
};
|
|
7
|
+
}, undefined, "tag-cloud", {
|
|
8
|
+
status: {
|
|
9
|
+
default: "";
|
|
10
|
+
error: "tag-cloud--error";
|
|
11
|
+
};
|
|
12
|
+
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
13
|
+
status: {
|
|
14
|
+
default: "";
|
|
15
|
+
error: "tag-cloud--error";
|
|
16
|
+
};
|
|
17
|
+
}, undefined>>;
|
|
18
|
+
export type TagCloudVariants = VariantProps<typeof tagCloudVariants>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TagCloudVariants } from './tagcloud.styles';
|
|
3
|
+
export type TagCloudOption = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export type TagCloudValue<T extends boolean | undefined = undefined> = T extends true ? string[] : string;
|
|
8
|
+
export interface TagCloudChangeEvent<Multi extends boolean | undefined = undefined> extends Event {
|
|
9
|
+
target: Omit<EventTarget, 'value'> & {
|
|
10
|
+
value: TagCloudValue<Multi>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export type TagCloudProps = TagCloudVariants & {
|
|
14
|
+
className?: string;
|
|
15
|
+
options?: TagCloudOption[];
|
|
16
|
+
label?: string;
|
|
17
|
+
value?: string | string[];
|
|
18
|
+
onChange?: (event: TagCloudChangeEvent<any>) => void;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
multiple?: boolean;
|
|
21
|
+
maxSelection?: number;
|
|
22
|
+
tagCloudRef?: React.Ref<HTMLDivElement>;
|
|
23
|
+
helptext?: string;
|
|
24
|
+
variant?: 'fill' | 'normal' | 'outline';
|
|
25
|
+
selectedTextStyle?: 'bold' | 'normal';
|
|
26
|
+
};
|
|
@@ -1,102 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export interface TextAreaProps {
|
|
4
|
-
/**
|
|
5
|
-
* TextArea name
|
|
6
|
-
*/
|
|
7
|
-
name?: string;
|
|
8
|
-
/**
|
|
9
|
-
* TextArea label
|
|
10
|
-
*/
|
|
11
|
-
label?: string;
|
|
12
|
-
/**
|
|
13
|
-
* TextArea ref (implement with useRef() hooks)
|
|
14
|
-
*/
|
|
15
|
-
inputRef?: React.RefObject<HTMLTextAreaElement> | React.RefCallback<HTMLTextAreaElement>;
|
|
16
|
-
/**
|
|
17
|
-
* The TextArea content value
|
|
18
|
-
*/
|
|
19
|
-
value?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Callback when user input
|
|
22
|
-
*/
|
|
23
|
-
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
24
|
-
/**
|
|
25
|
-
* Callback when user blur
|
|
26
|
-
*/
|
|
27
|
-
onBlur?: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
28
|
-
/**
|
|
29
|
-
* Callback when user focus
|
|
30
|
-
*/
|
|
31
|
-
onFocus?: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
32
|
-
/**
|
|
33
|
-
* Disabled TextArea
|
|
34
|
-
*/
|
|
35
|
-
disabled?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Whether this TextArea is required or not
|
|
38
|
-
*/
|
|
39
|
-
required?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* The id of TextArea.
|
|
42
|
-
*/
|
|
43
|
-
id?: string;
|
|
44
|
-
/**
|
|
45
|
-
* TextArea status (useful when implemented with form validation)
|
|
46
|
-
*/
|
|
47
|
-
status?: 'default' | 'error';
|
|
48
|
-
/**
|
|
49
|
-
* Prompt a helptext below TextArea (useful when implemented with form validation)
|
|
50
|
-
*/
|
|
51
|
-
helptext?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Custom helptext
|
|
54
|
-
*/
|
|
55
|
-
helptextClassName?: string;
|
|
56
|
-
/**
|
|
57
|
-
* Allow user to resize TextArea
|
|
58
|
-
*/
|
|
59
|
-
resize?: 'both' | 'horizontal' | 'none' | 'vertical';
|
|
60
|
-
/**
|
|
61
|
-
* Auto resize the TextArea based on content
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
autoSize?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Number of lines
|
|
67
|
-
*/
|
|
68
|
-
lines?: number;
|
|
69
|
-
/**
|
|
70
|
-
* TextArea placeholder
|
|
71
|
-
*/
|
|
72
|
-
placeholder?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Enumerated attribute that hints at the type of data that might be entered by the user
|
|
75
|
-
*/
|
|
76
|
-
inputMode?: 'decimal' | 'email' | 'none' | 'numeric' | 'search' | 'tel' | 'text' | 'url';
|
|
77
|
-
/**
|
|
78
|
-
* TextArea width
|
|
79
|
-
*/
|
|
80
|
-
width?: Sizes;
|
|
81
|
-
/**
|
|
82
|
-
* Maximum number of characters allowed. 0, null and undefined mean no limitation
|
|
83
|
-
*/
|
|
84
|
-
characterLimit?: number;
|
|
85
|
-
/**
|
|
86
|
-
* Resizeable on focus event ?
|
|
87
|
-
*/
|
|
88
|
-
isResizeableOnFocus?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* If allow to remove input content with clear icon
|
|
91
|
-
* @default true
|
|
92
|
-
*/
|
|
93
|
-
allowClear?: boolean;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* TextArea component that has floating label, caption and resizability.
|
|
97
|
-
*
|
|
98
|
-
* `✅ Stable`
|
|
99
|
-
*/
|
|
1
|
+
import { TextAreaProps } from './types';
|
|
2
|
+
import type * as React from 'react';
|
|
100
3
|
declare const TextArea: React.FC<TextAreaProps>;
|
|
4
|
+
export { TextArea };
|
|
101
5
|
export default TextArea;
|
|
102
|
-
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { VariantProps } from 'tailwind-variants/lite';
|
|
2
|
+
export declare const textAreaVariants: import('tailwind-variants').TVReturnType<{
|
|
3
|
+
status: {
|
|
4
|
+
default: "";
|
|
5
|
+
warning: "warning";
|
|
6
|
+
error: "error";
|
|
7
|
+
};
|
|
8
|
+
}, undefined, "text-area", {
|
|
9
|
+
status: {
|
|
10
|
+
default: "";
|
|
11
|
+
warning: "warning";
|
|
12
|
+
error: "error";
|
|
13
|
+
};
|
|
14
|
+
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
15
|
+
status: {
|
|
16
|
+
default: "";
|
|
17
|
+
warning: "warning";
|
|
18
|
+
error: "error";
|
|
19
|
+
};
|
|
20
|
+
}, undefined>>;
|
|
21
|
+
export type TextAreaVariants = VariantProps<typeof textAreaVariants>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { CladSize } from '../../utils/sizes';
|
|
2
|
+
import { TextAreaVariants } from './text-area.styles';
|
|
3
|
+
import type * as React from 'react';
|
|
4
|
+
export interface TextAreaProps extends TextAreaVariants {
|
|
5
|
+
/**
|
|
6
|
+
* TextArea name
|
|
7
|
+
*/
|
|
8
|
+
name?: string;
|
|
9
|
+
/**
|
|
10
|
+
* TextArea label
|
|
11
|
+
*/
|
|
12
|
+
label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* TextArea ref (implement with useRef() hooks)
|
|
15
|
+
*/
|
|
16
|
+
inputRef?: React.RefObject<HTMLTextAreaElement> | React.RefCallback<HTMLTextAreaElement>;
|
|
17
|
+
/**
|
|
18
|
+
* The TextArea content value
|
|
19
|
+
*/
|
|
20
|
+
value?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Callback when user input
|
|
23
|
+
*/
|
|
24
|
+
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
25
|
+
/**
|
|
26
|
+
* Callback when user blur
|
|
27
|
+
*/
|
|
28
|
+
onBlur?: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
29
|
+
/**
|
|
30
|
+
* Callback when user focus
|
|
31
|
+
*/
|
|
32
|
+
onFocus?: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
33
|
+
/**
|
|
34
|
+
* Disabled TextArea
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether this TextArea is required or not
|
|
39
|
+
*/
|
|
40
|
+
required?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The id of TextArea.
|
|
43
|
+
*/
|
|
44
|
+
id?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Prompt a helptext below TextArea (useful when implemented with form validation)
|
|
47
|
+
*/
|
|
48
|
+
helptext?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Custom helptext className
|
|
51
|
+
*/
|
|
52
|
+
helptextClassName?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Allow user to resize TextArea
|
|
55
|
+
* @default 'none'
|
|
56
|
+
*/
|
|
57
|
+
resize?: 'both' | 'horizontal' | 'none' | 'vertical';
|
|
58
|
+
/**
|
|
59
|
+
* Auto resize the TextArea based on content
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
autoSize?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Number of lines
|
|
65
|
+
* @default 5
|
|
66
|
+
*/
|
|
67
|
+
lines?: number;
|
|
68
|
+
/**
|
|
69
|
+
* TextArea placeholder
|
|
70
|
+
*/
|
|
71
|
+
placeholder?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Enumerated attribute that hints at the type of data that might be entered by the user
|
|
74
|
+
*/
|
|
75
|
+
inputMode?: 'decimal' | 'email' | 'none' | 'numeric' | 'search' | 'tel' | 'text' | 'url';
|
|
76
|
+
/**
|
|
77
|
+
* TextArea width
|
|
78
|
+
* @default 'full'
|
|
79
|
+
*/
|
|
80
|
+
width?: CladSize;
|
|
81
|
+
/**
|
|
82
|
+
* Maximum number of characters allowed. 0, null and undefined mean no limitation
|
|
83
|
+
*/
|
|
84
|
+
characterLimit?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Resizeable on focus event
|
|
87
|
+
*/
|
|
88
|
+
isResizeableOnFocus?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* If allow to remove input content with clear icon
|
|
91
|
+
* @default true
|
|
92
|
+
*/
|
|
93
|
+
allowClear?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Additional className for the outer container
|
|
96
|
+
*/
|
|
97
|
+
className?: string;
|
|
98
|
+
}
|
|
@@ -1,36 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Size of Text Label
|
|
5
|
-
* @default 'md'
|
|
6
|
-
*/
|
|
7
|
-
size?: 'md' | 'sm';
|
|
8
|
-
/**
|
|
9
|
-
* Badge Label
|
|
10
|
-
*/
|
|
11
|
-
label?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Badge Background Color
|
|
14
|
-
*/
|
|
15
|
-
color?: 'info' | 'success' | 'error' | 'warning' | 'neutral';
|
|
16
|
-
/**
|
|
17
|
-
* Types
|
|
18
|
-
*/
|
|
19
|
-
type?: 'text' | 'status';
|
|
20
|
-
/**
|
|
21
|
-
* Classname
|
|
22
|
-
*/
|
|
23
|
-
className?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Custom icon
|
|
26
|
-
*/
|
|
27
|
-
icon?: React.ReactNode;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Text Label Component
|
|
31
|
-
*
|
|
32
|
-
* `✅ Stable`
|
|
33
|
-
*/
|
|
34
|
-
declare const TextLabel: React.FC<TextLabelProps>;
|
|
1
|
+
import { TextLabelProps } from './types';
|
|
2
|
+
declare const TextLabel: import('../../types').InternalForwardRefRenderFunction<"div", TextLabelProps>;
|
|
3
|
+
export { TextLabel };
|
|
35
4
|
export default TextLabel;
|
|
36
|
-
//# sourceMappingURL=TextLabel.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { VariantProps } from 'tailwind-variants/lite';
|
|
2
|
+
export declare const textlabelVariants: import('tailwind-variants').TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
md: "textlabel--md";
|
|
5
|
+
sm: "textlabel--sm";
|
|
6
|
+
};
|
|
7
|
+
color: {
|
|
8
|
+
info: "textlabel--info";
|
|
9
|
+
success: "textlabel--success";
|
|
10
|
+
error: "textlabel--error";
|
|
11
|
+
warning: "textlabel--warning";
|
|
12
|
+
neutral: "textlabel--neutral";
|
|
13
|
+
};
|
|
14
|
+
type: {
|
|
15
|
+
text: "textlabel--text";
|
|
16
|
+
status: "textlabel--status";
|
|
17
|
+
};
|
|
18
|
+
}, undefined, "textlabel", {
|
|
19
|
+
size: {
|
|
20
|
+
md: "textlabel--md";
|
|
21
|
+
sm: "textlabel--sm";
|
|
22
|
+
};
|
|
23
|
+
color: {
|
|
24
|
+
info: "textlabel--info";
|
|
25
|
+
success: "textlabel--success";
|
|
26
|
+
error: "textlabel--error";
|
|
27
|
+
warning: "textlabel--warning";
|
|
28
|
+
neutral: "textlabel--neutral";
|
|
29
|
+
};
|
|
30
|
+
type: {
|
|
31
|
+
text: "textlabel--text";
|
|
32
|
+
status: "textlabel--status";
|
|
33
|
+
};
|
|
34
|
+
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
35
|
+
size: {
|
|
36
|
+
md: "textlabel--md";
|
|
37
|
+
sm: "textlabel--sm";
|
|
38
|
+
};
|
|
39
|
+
color: {
|
|
40
|
+
info: "textlabel--info";
|
|
41
|
+
success: "textlabel--success";
|
|
42
|
+
error: "textlabel--error";
|
|
43
|
+
warning: "textlabel--warning";
|
|
44
|
+
neutral: "textlabel--neutral";
|
|
45
|
+
};
|
|
46
|
+
type: {
|
|
47
|
+
text: "textlabel--text";
|
|
48
|
+
status: "textlabel--status";
|
|
49
|
+
};
|
|
50
|
+
}, undefined>>;
|
|
51
|
+
export type TextLabelVariants = VariantProps<typeof textlabelVariants>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { HTMLCladUIProps, ReactRef } from '../../types';
|
|
3
|
+
import { TextLabelVariants } from './textlabel.styles';
|
|
4
|
+
export type TextLabelProps = HTMLCladUIProps<'div'> & Omit<TextLabelVariants, 'color' | 'size' | 'type'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Color palette — sets background, icon, and text colors.
|
|
7
|
+
* @default 'info'
|
|
8
|
+
*/
|
|
9
|
+
color?: 'info' | 'success' | 'error' | 'warning' | 'neutral';
|
|
10
|
+
/**
|
|
11
|
+
* Size of the label.
|
|
12
|
+
* @default 'md'
|
|
13
|
+
*/
|
|
14
|
+
size?: 'md' | 'sm';
|
|
15
|
+
/**
|
|
16
|
+
* Visual type. `text` shows colored text only; `status` shows a leading icon with text-primary text.
|
|
17
|
+
* @default 'text'
|
|
18
|
+
*/
|
|
19
|
+
type?: 'text' | 'status';
|
|
20
|
+
/**
|
|
21
|
+
* Label text content.
|
|
22
|
+
*/
|
|
23
|
+
label?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Custom icon rendered when type="status". Defaults to the color-specific icon.
|
|
26
|
+
*/
|
|
27
|
+
icon?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Ref to the DOM node.
|
|
30
|
+
*/
|
|
31
|
+
ref?: ReactRef<HTMLDivElement | null>;
|
|
32
|
+
};
|
|
@@ -1,43 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Checkbox id
|
|
5
|
-
*/
|
|
6
|
-
id?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Checkbox name
|
|
9
|
-
*/
|
|
10
|
-
name?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Checkbox value
|
|
13
|
-
*/
|
|
14
|
-
value?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Whether this checkbox is checked initially or not
|
|
17
|
-
*/
|
|
18
|
-
checked?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Change radio buttons active state color
|
|
21
|
-
*/
|
|
22
|
-
color?: 'accent' | 'caution' | 'critical' | 'info' | 'neutral' | 'positive' | 'primary' | 'secondary';
|
|
23
|
-
/**
|
|
24
|
-
* Toggle Size
|
|
25
|
-
*/
|
|
26
|
-
size?: 'md' | 'sm';
|
|
27
|
-
/**
|
|
28
|
-
* Whether this checkbox is disabled initially or not
|
|
29
|
-
*/
|
|
30
|
-
disabled?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Change event
|
|
33
|
-
*/
|
|
34
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Renders a checkbox element.
|
|
38
|
-
*
|
|
39
|
-
* `✅ Stable`
|
|
40
|
-
*/
|
|
1
|
+
import { ToggleSwitchProps } from './types';
|
|
2
|
+
import type * as React from 'react';
|
|
41
3
|
declare const ToggleSwitch: React.FC<ToggleSwitchProps>;
|
|
4
|
+
export { ToggleSwitch };
|
|
42
5
|
export default ToggleSwitch;
|
|
43
|
-
//# sourceMappingURL=ToggleSwitch.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { VariantProps } from 'tailwind-variants/lite';
|
|
2
|
+
export declare const toggleSwitchVariants: import('tailwind-variants').TVReturnType<{
|
|
3
|
+
size: {
|
|
4
|
+
md: "toggle-switch--md";
|
|
5
|
+
sm: "toggle-switch--sm";
|
|
6
|
+
};
|
|
7
|
+
color: {
|
|
8
|
+
primary: "toggle-switch--primary";
|
|
9
|
+
info: "toggle-switch--info";
|
|
10
|
+
success: "toggle-switch--success";
|
|
11
|
+
error: "toggle-switch--error";
|
|
12
|
+
neutral: "toggle-switch--neutral";
|
|
13
|
+
};
|
|
14
|
+
}, undefined, "toggle-switch", {
|
|
15
|
+
size: {
|
|
16
|
+
md: "toggle-switch--md";
|
|
17
|
+
sm: "toggle-switch--sm";
|
|
18
|
+
};
|
|
19
|
+
color: {
|
|
20
|
+
primary: "toggle-switch--primary";
|
|
21
|
+
info: "toggle-switch--info";
|
|
22
|
+
success: "toggle-switch--success";
|
|
23
|
+
error: "toggle-switch--error";
|
|
24
|
+
neutral: "toggle-switch--neutral";
|
|
25
|
+
};
|
|
26
|
+
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
27
|
+
size: {
|
|
28
|
+
md: "toggle-switch--md";
|
|
29
|
+
sm: "toggle-switch--sm";
|
|
30
|
+
};
|
|
31
|
+
color: {
|
|
32
|
+
primary: "toggle-switch--primary";
|
|
33
|
+
info: "toggle-switch--info";
|
|
34
|
+
success: "toggle-switch--success";
|
|
35
|
+
error: "toggle-switch--error";
|
|
36
|
+
neutral: "toggle-switch--neutral";
|
|
37
|
+
};
|
|
38
|
+
}, undefined>>;
|
|
39
|
+
export type ToggleSwitchVariants = VariantProps<typeof toggleSwitchVariants>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ToggleSwitchVariants } from './toggle-switch.styles';
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
export interface ToggleSwitchProps extends ToggleSwitchVariants {
|
|
4
|
+
/**
|
|
5
|
+
* ToggleSwitch input id
|
|
6
|
+
*/
|
|
7
|
+
id?: string;
|
|
8
|
+
/**
|
|
9
|
+
* ToggleSwitch input name
|
|
10
|
+
*/
|
|
11
|
+
name?: string;
|
|
12
|
+
/**
|
|
13
|
+
* ToggleSwitch input value
|
|
14
|
+
*/
|
|
15
|
+
value?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the toggle is checked
|
|
18
|
+
*/
|
|
19
|
+
checked?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the toggle is disabled
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Additional className for the wrapper
|
|
27
|
+
*/
|
|
28
|
+
className?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Change event handler
|
|
31
|
+
*/
|
|
32
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
33
|
+
}
|