@cocso-ui/react 0.2.21 → 1.0.1
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/README.md +2 -2
- package/dist/cjs/cn.d.ts +12 -0
- package/dist/cjs/cn.js +17 -0
- package/dist/cjs/components/accordion/accordion.d.ts +25 -0
- package/dist/cjs/components/accordion/accordion.js +54 -0
- package/dist/cjs/components/accordion/accordion.module.css.js +9 -0
- package/dist/cjs/components/alert/alert.d.ts +15 -0
- package/dist/cjs/components/alert/alert.js +44 -0
- package/dist/cjs/components/alert/alert.module.css.js +9 -0
- package/dist/cjs/components/avatar/avatar.d.ts +18 -0
- package/dist/cjs/components/avatar/avatar.js +52 -0
- package/dist/cjs/components/avatar/avatar.module.css.js +9 -0
- package/dist/cjs/components/badge/badge.d.ts +16 -0
- package/dist/cjs/components/badge/badge.js +60 -0
- package/dist/cjs/components/badge/badge.module.css.js +9 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.d.ts +14 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.js +50 -0
- package/dist/cjs/components/breadcrumb/breadcrumb.module.css.js +9 -0
- package/dist/cjs/components/button/button.d.ts +27 -0
- package/dist/cjs/components/button/button.js +83 -0
- package/dist/cjs/components/button/button.module.css.js +9 -0
- package/dist/cjs/components/card/card.d.ts +13 -0
- package/dist/cjs/components/card/card.js +30 -0
- package/dist/cjs/components/card/card.module.css.js +9 -0
- package/dist/cjs/components/checkbox/checkbox.d.ts +20 -0
- package/dist/cjs/components/checkbox/checkbox.js +116 -0
- package/dist/cjs/components/checkbox/checkbox.module.css.js +9 -0
- package/dist/cjs/components/day-picker/day-picker.d.ts +18 -0
- package/dist/cjs/components/day-picker/day-picker.js +117 -0
- package/dist/cjs/components/day-picker/day-picker.module.css.js +9 -0
- package/dist/cjs/components/dialog/dialog.d.ts +29 -0
- package/dist/cjs/components/dialog/dialog.js +105 -0
- package/dist/cjs/components/dialog/dialog.module.css.js +9 -0
- package/dist/cjs/components/dropdown/dropdown.d.ts +16 -0
- package/dist/cjs/components/dropdown/dropdown.js +56 -0
- package/dist/cjs/components/dropdown/dropdown.module.css.js +9 -0
- package/dist/cjs/components/field/field.d.ts +26 -0
- package/dist/cjs/components/field/field.js +49 -0
- package/dist/cjs/components/field/field.module.css.js +9 -0
- package/dist/cjs/components/input/input.d.ts +17 -0
- package/dist/cjs/components/input/input.js +70 -0
- package/dist/cjs/components/input/input.module.css.js +9 -0
- package/dist/cjs/components/input-trigger/input-trigger.d.ts +25 -0
- package/dist/cjs/components/input-trigger/input-trigger.js +54 -0
- package/dist/cjs/components/input-trigger/input-trigger.module.css.js +9 -0
- package/dist/cjs/components/link/link.d.ts +28 -0
- package/dist/cjs/components/link/link.js +64 -0
- package/dist/cjs/components/link/link.module.css.js +9 -0
- package/dist/cjs/components/month-picker/month-picker.d.ts +18 -0
- package/dist/cjs/components/month-picker/month-picker.js +108 -0
- package/dist/cjs/components/month-picker/month-picker.module.css.js +9 -0
- package/dist/cjs/components/one-time-password-field/one-time-password-field.d.ts +13 -0
- package/dist/cjs/components/one-time-password-field/one-time-password-field.js +44 -0
- package/dist/cjs/components/one-time-password-field/one-time-password-field.module.css.js +9 -0
- package/dist/cjs/components/pagination/pagination.d.ts +23 -0
- package/dist/cjs/components/pagination/pagination.js +87 -0
- package/dist/cjs/components/pagination/pagination.module.css.js +9 -0
- package/dist/cjs/components/popover/popover.d.ts +14 -0
- package/dist/cjs/components/popover/popover.js +49 -0
- package/dist/cjs/components/popover/popover.module.css.js +9 -0
- package/dist/cjs/components/progress/progress.d.ts +17 -0
- package/dist/cjs/components/progress/progress.js +43 -0
- package/dist/cjs/components/progress/progress.module.css.js +9 -0
- package/dist/cjs/components/radio-group/radio-group.d.ts +23 -0
- package/dist/cjs/components/radio-group/radio-group.js +53 -0
- package/dist/cjs/components/radio-group/radio-group.module.css.js +9 -0
- package/dist/cjs/components/select/select.d.ts +17 -0
- package/dist/cjs/components/select/select.js +86 -0
- package/dist/cjs/components/select/select.module.css.js +9 -0
- package/dist/cjs/components/skeleton/skeleton.d.ts +15 -0
- package/dist/cjs/components/skeleton/skeleton.js +30 -0
- package/dist/cjs/components/skeleton/skeleton.module.css.js +9 -0
- package/dist/cjs/components/spinner/spinner.d.ts +17 -0
- package/dist/cjs/components/spinner/spinner.js +70 -0
- package/dist/cjs/components/spinner/spinner.module.css.js +9 -0
- package/dist/cjs/components/stock-quantity-status/stock-quantity-status.d.ts +12 -0
- package/dist/cjs/components/stock-quantity-status/stock-quantity-status.js +119 -0
- package/dist/cjs/components/stock-quantity-status/stock-quantity-status.module.css.js +9 -0
- package/dist/cjs/components/switch/switch.d.ts +19 -0
- package/dist/cjs/components/switch/switch.js +74 -0
- package/dist/cjs/components/switch/switch.module.css.js +9 -0
- package/dist/cjs/components/tab/tab.d.ts +21 -0
- package/dist/cjs/components/tab/tab.js +33 -0
- package/dist/cjs/components/tooltip/tooltip.d.ts +17 -0
- package/dist/cjs/components/tooltip/tooltip.js +50 -0
- package/dist/cjs/components/tooltip/tooltip.module.css.js +9 -0
- package/dist/cjs/components/typography/typography.d.ts +30 -0
- package/dist/cjs/components/typography/typography.js +81 -0
- package/dist/cjs/components/typography/typography.module.css.js +9 -0
- package/dist/cjs/ecosystem/codegen/generated/alert.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/alert.js +12 -0
- package/dist/cjs/ecosystem/codegen/generated/avatar.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/avatar.js +13 -0
- package/dist/cjs/ecosystem/codegen/generated/badge.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/badge.js +14 -0
- package/dist/cjs/ecosystem/codegen/generated/breadcrumb.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/breadcrumb.js +12 -0
- package/dist/cjs/ecosystem/codegen/generated/button.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/button.js +14 -0
- package/dist/cjs/ecosystem/codegen/generated/card.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/card.js +13 -0
- package/dist/cjs/ecosystem/codegen/generated/checkbox.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/checkbox.js +13 -0
- package/dist/cjs/ecosystem/codegen/generated/input.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/input.js +12 -0
- package/dist/cjs/ecosystem/codegen/generated/link.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/link.js +12 -0
- package/dist/cjs/ecosystem/codegen/generated/progress.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/progress.js +13 -0
- package/dist/cjs/ecosystem/codegen/generated/radio.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/radio.js +13 -0
- package/dist/cjs/ecosystem/codegen/generated/select.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/select.js +12 -0
- package/dist/cjs/ecosystem/codegen/generated/skeleton.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/skeleton.js +13 -0
- package/dist/cjs/ecosystem/codegen/generated/spinner-geometry.js +33 -0
- package/dist/cjs/ecosystem/codegen/generated/spinner.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/spinner.js +13 -0
- package/dist/cjs/ecosystem/codegen/generated/stock-quantity-status.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/stock-quantity-status.js +12 -0
- package/dist/cjs/ecosystem/codegen/generated/switch.css.js +6 -0
- package/dist/cjs/ecosystem/codegen/generated/switch.js +14 -0
- package/dist/cjs/index.d.ts +32 -19
- package/dist/cjs/index.js +67 -43
- package/dist/cjs/primitives/use-render.d.ts +11 -0
- package/dist/cjs/token/color.d.ts +12 -0
- package/dist/cjs/token/color.js +93 -81
- package/dist/cjs/token/radius.d.ts +12 -0
- package/dist/cjs/token/radius.js +14 -0
- package/dist/cjs/token/spacing.d.ts +24 -23
- package/dist/cjs/token/spacing.js +24 -23
- package/dist/cjs/token/typography.d.ts +17 -0
- package/dist/cjs/token/typography.js +17 -6
- package/dist/esm/cn.d.mts +12 -0
- package/dist/esm/cn.mjs +15 -0
- package/dist/esm/components/accordion/accordion.d.mts +25 -0
- package/dist/esm/components/accordion/accordion.mjs +52 -0
- package/dist/esm/components/accordion/accordion.module.css.mjs +3 -0
- package/dist/esm/components/alert/alert.d.mts +15 -0
- package/dist/esm/components/alert/alert.mjs +41 -0
- package/dist/esm/components/alert/alert.module.css.mjs +3 -0
- package/dist/esm/components/avatar/avatar.d.mts +18 -0
- package/dist/esm/components/avatar/avatar.mjs +49 -0
- package/dist/esm/components/avatar/avatar.module.css.mjs +3 -0
- package/dist/esm/components/badge/badge.d.mts +16 -0
- package/dist/esm/components/badge/badge.mjs +57 -0
- package/dist/esm/components/badge/badge.module.css.mjs +3 -0
- package/dist/esm/components/breadcrumb/breadcrumb.d.mts +14 -0
- package/dist/esm/components/breadcrumb/breadcrumb.mjs +47 -0
- package/dist/esm/components/breadcrumb/breadcrumb.module.css.mjs +3 -0
- package/dist/esm/components/button/button.d.mts +27 -0
- package/dist/esm/components/button/button.mjs +80 -0
- package/dist/esm/components/button/button.module.css.mjs +3 -0
- package/dist/esm/components/card/card.d.mts +13 -0
- package/dist/esm/components/card/card.mjs +27 -0
- package/dist/esm/components/card/card.module.css.mjs +3 -0
- package/dist/esm/components/checkbox/checkbox.d.mts +20 -0
- package/dist/esm/components/checkbox/checkbox.mjs +113 -0
- package/dist/esm/components/checkbox/checkbox.module.css.mjs +3 -0
- package/dist/esm/components/day-picker/day-picker.d.mts +18 -0
- package/dist/esm/components/day-picker/day-picker.mjs +115 -0
- package/dist/esm/components/day-picker/day-picker.module.css.mjs +3 -0
- package/dist/esm/components/dialog/dialog.d.mts +29 -0
- package/dist/esm/components/dialog/dialog.mjs +103 -0
- package/dist/esm/components/dialog/dialog.module.css.mjs +3 -0
- package/dist/esm/components/dropdown/dropdown.d.mts +16 -0
- package/dist/esm/components/dropdown/dropdown.mjs +54 -0
- package/dist/esm/components/dropdown/dropdown.module.css.mjs +3 -0
- package/dist/esm/components/field/field.d.mts +26 -0
- package/dist/esm/components/field/field.mjs +46 -0
- package/dist/esm/components/field/field.module.css.mjs +3 -0
- package/dist/esm/components/input/input.d.mts +17 -0
- package/dist/esm/components/input/input.mjs +67 -0
- package/dist/esm/components/input/input.module.css.mjs +3 -0
- package/dist/esm/components/input-trigger/input-trigger.d.mts +25 -0
- package/dist/esm/components/input-trigger/input-trigger.mjs +51 -0
- package/dist/esm/components/input-trigger/input-trigger.module.css.mjs +3 -0
- package/dist/esm/components/link/link.d.mts +28 -0
- package/dist/esm/components/link/link.mjs +61 -0
- package/dist/esm/components/link/link.module.css.mjs +3 -0
- package/dist/esm/components/month-picker/month-picker.d.mts +18 -0
- package/dist/esm/components/month-picker/month-picker.mjs +106 -0
- package/dist/esm/components/month-picker/month-picker.module.css.mjs +3 -0
- package/dist/esm/components/one-time-password-field/one-time-password-field.d.mts +13 -0
- package/dist/esm/components/one-time-password-field/one-time-password-field.mjs +42 -0
- package/dist/esm/components/one-time-password-field/one-time-password-field.module.css.mjs +3 -0
- package/dist/esm/components/pagination/pagination.d.mts +23 -0
- package/dist/esm/{pagination/Pagination.mjs → components/pagination/pagination.mjs} +46 -15
- package/dist/esm/components/pagination/pagination.module.css.mjs +3 -0
- package/dist/esm/components/popover/popover.d.mts +14 -0
- package/dist/esm/components/popover/popover.mjs +47 -0
- package/dist/esm/components/popover/popover.module.css.mjs +3 -0
- package/dist/esm/components/progress/progress.d.mts +17 -0
- package/dist/esm/components/progress/progress.mjs +40 -0
- package/dist/esm/components/progress/progress.module.css.mjs +3 -0
- package/dist/esm/components/radio-group/radio-group.d.mts +23 -0
- package/dist/esm/components/radio-group/radio-group.mjs +50 -0
- package/dist/esm/components/radio-group/radio-group.module.css.mjs +3 -0
- package/dist/esm/components/select/select.d.mts +17 -0
- package/dist/esm/components/select/select.mjs +83 -0
- package/dist/esm/components/select/select.module.css.mjs +3 -0
- package/dist/esm/components/skeleton/skeleton.d.mts +15 -0
- package/dist/esm/components/skeleton/skeleton.mjs +27 -0
- package/dist/esm/components/skeleton/skeleton.module.css.mjs +3 -0
- package/dist/esm/components/spinner/spinner.d.mts +17 -0
- package/dist/esm/components/spinner/spinner.mjs +67 -0
- package/dist/esm/components/spinner/spinner.module.css.mjs +3 -0
- package/dist/esm/components/stock-quantity-status/stock-quantity-status.d.mts +12 -0
- package/dist/esm/components/stock-quantity-status/stock-quantity-status.mjs +116 -0
- package/dist/esm/components/stock-quantity-status/stock-quantity-status.module.css.mjs +3 -0
- package/dist/esm/components/switch/switch.d.mts +19 -0
- package/dist/esm/components/switch/switch.mjs +71 -0
- package/dist/esm/components/switch/switch.module.css.mjs +3 -0
- package/dist/esm/components/tab/tab.d.mts +21 -0
- package/dist/esm/components/tab/tab.mjs +31 -0
- package/dist/esm/components/tooltip/tooltip.d.mts +17 -0
- package/dist/esm/components/tooltip/tooltip.mjs +48 -0
- package/dist/esm/components/tooltip/tooltip.module.css.mjs +3 -0
- package/dist/esm/components/typography/typography.d.mts +30 -0
- package/dist/esm/components/typography/typography.mjs +79 -0
- package/dist/esm/components/typography/typography.module.css.mjs +3 -0
- package/dist/esm/ecosystem/codegen/generated/alert.mjs +10 -0
- package/dist/esm/ecosystem/codegen/generated/avatar.mjs +11 -0
- package/dist/esm/ecosystem/codegen/generated/badge.mjs +12 -0
- package/dist/esm/ecosystem/codegen/generated/breadcrumb.mjs +10 -0
- package/dist/esm/ecosystem/codegen/generated/button.mjs +12 -0
- package/dist/esm/ecosystem/codegen/generated/card.mjs +11 -0
- package/dist/esm/ecosystem/codegen/generated/checkbox.mjs +11 -0
- package/dist/esm/ecosystem/codegen/generated/input.mjs +10 -0
- package/dist/esm/ecosystem/codegen/generated/link.mjs +10 -0
- package/dist/esm/ecosystem/codegen/generated/progress.mjs +11 -0
- package/dist/esm/ecosystem/codegen/generated/radio.mjs +11 -0
- package/dist/esm/ecosystem/codegen/generated/select.mjs +10 -0
- package/dist/esm/ecosystem/codegen/generated/skeleton.mjs +11 -0
- package/dist/esm/ecosystem/codegen/generated/spinner-geometry.mjs +30 -0
- package/dist/esm/ecosystem/codegen/generated/spinner.mjs +11 -0
- package/dist/esm/ecosystem/codegen/generated/stock-quantity-status.mjs +10 -0
- package/dist/esm/ecosystem/codegen/generated/switch.mjs +12 -0
- package/dist/esm/index.css +7 -1
- package/dist/esm/index.d.mts +32 -19
- package/dist/esm/index.mjs +32 -20
- package/dist/esm/primitives/use-render.d.mts +11 -0
- package/dist/esm/token/color.d.mts +12 -0
- package/dist/esm/token/color.mjs +93 -81
- package/dist/esm/token/radius.d.mts +12 -0
- package/dist/esm/token/radius.mjs +12 -0
- package/dist/esm/token/spacing.d.mts +24 -23
- package/dist/esm/token/spacing.mjs +24 -23
- package/dist/esm/token/typography.d.mts +17 -0
- package/dist/esm/token/typography.mjs +17 -6
- package/package.json +29 -26
- package/dist/cjs/accordion/Accordion.d.ts +0 -15
- package/dist/cjs/accordion/Accordion.js +0 -71
- package/dist/cjs/accordion/Accordion.module.css.js +0 -9
- package/dist/cjs/badge/Badge.d.ts +0 -13
- package/dist/cjs/badge/Badge.js +0 -50
- package/dist/cjs/badge/Badge.module.css.js +0 -9
- package/dist/cjs/button/Button.d.ts +0 -23
- package/dist/cjs/button/Button.js +0 -117
- package/dist/cjs/button/Button.module.css.js +0 -9
- package/dist/cjs/checkbox/Checkbox.d.ts +0 -18
- package/dist/cjs/checkbox/Checkbox.js +0 -117
- package/dist/cjs/checkbox/Checkbox.module.css.js +0 -9
- package/dist/cjs/day-picker/DayPicker.d.ts +0 -14
- package/dist/cjs/day-picker/DayPicker.js +0 -98
- package/dist/cjs/day-picker/DayPicker.module.css.js +0 -9
- package/dist/cjs/dropdown/Dropdown.d.ts +0 -11
- package/dist/cjs/dropdown/Dropdown.js +0 -55
- package/dist/cjs/dropdown/Dropdown.module.css.js +0 -9
- package/dist/cjs/link/Link.d.ts +0 -16
- package/dist/cjs/link/Link.js +0 -35
- package/dist/cjs/link/Link.module.css.js +0 -9
- package/dist/cjs/modal/Modal.d.ts +0 -12
- package/dist/cjs/modal/Modal.js +0 -106
- package/dist/cjs/modal/Modal.module.css.js +0 -9
- package/dist/cjs/month-picker/MonthPicker.d.ts +0 -14
- package/dist/cjs/month-picker/MonthPicker.js +0 -91
- package/dist/cjs/month-picker/MonthPicker.module.css.js +0 -9
- package/dist/cjs/one-time-password-field/OneTimePasswordField.d.ts +0 -8
- package/dist/cjs/one-time-password-field/OneTimePasswordField.js +0 -52
- package/dist/cjs/one-time-password-field/OneTimePasswordField.module.css.js +0 -9
- package/dist/cjs/pagination/Pagination.d.ts +0 -13
- package/dist/cjs/pagination/Pagination.js +0 -56
- package/dist/cjs/pagination/Pagination.module.css.js +0 -9
- package/dist/cjs/popover/Popover.d.ts +0 -10
- package/dist/cjs/popover/Popover.js +0 -44
- package/dist/cjs/popover/Popover.module.css.js +0 -9
- package/dist/cjs/radio-group/RadioGroup.d.ts +0 -9
- package/dist/cjs/radio-group/RadioGroup.js +0 -66
- package/dist/cjs/radio-group/RadioGroup.module.css.js +0 -9
- package/dist/cjs/select/Select.d.ts +0 -13
- package/dist/cjs/select/Select.js +0 -85
- package/dist/cjs/select/Select.module.css.js +0 -9
- package/dist/cjs/spinner/Spinner.d.ts +0 -14
- package/dist/cjs/spinner/Spinner.js +0 -40
- package/dist/cjs/spinner/Spinner.module.css.js +0 -9
- package/dist/cjs/stock-quantity-status/StockQuantityStatus.d.ts +0 -12
- package/dist/cjs/stock-quantity-status/StockQuantityStatus.js +0 -105
- package/dist/cjs/stock-quantity-status/StockQuantityStatus.module.css.js +0 -9
- package/dist/cjs/switch/Switch.d.ts +0 -16
- package/dist/cjs/switch/Switch.js +0 -89
- package/dist/cjs/switch/Switch.module.css.js +0 -9
- package/dist/cjs/tab/Tab.d.ts +0 -10
- package/dist/cjs/tab/Tab.js +0 -64
- package/dist/cjs/typography/Typography.d.ts +0 -33
- package/dist/cjs/typography/Typography.js +0 -90
- package/dist/cjs/typography/Typography.module.css.js +0 -9
- package/dist/esm/accordion/Accordion.d.mts +0 -15
- package/dist/esm/accordion/Accordion.mjs +0 -50
- package/dist/esm/accordion/Accordion.module.css.mjs +0 -3
- package/dist/esm/badge/Badge.d.mts +0 -13
- package/dist/esm/badge/Badge.mjs +0 -48
- package/dist/esm/badge/Badge.module.css.mjs +0 -3
- package/dist/esm/button/Button.d.mts +0 -23
- package/dist/esm/button/Button.mjs +0 -115
- package/dist/esm/button/Button.module.css.mjs +0 -3
- package/dist/esm/checkbox/Checkbox.d.mts +0 -18
- package/dist/esm/checkbox/Checkbox.mjs +0 -96
- package/dist/esm/checkbox/Checkbox.module.css.mjs +0 -3
- package/dist/esm/day-picker/DayPicker.d.mts +0 -14
- package/dist/esm/day-picker/DayPicker.mjs +0 -96
- package/dist/esm/day-picker/DayPicker.module.css.mjs +0 -3
- package/dist/esm/dropdown/Dropdown.d.mts +0 -11
- package/dist/esm/dropdown/Dropdown.mjs +0 -34
- package/dist/esm/dropdown/Dropdown.module.css.mjs +0 -3
- package/dist/esm/link/Link.d.mts +0 -16
- package/dist/esm/link/Link.mjs +0 -33
- package/dist/esm/link/Link.module.css.mjs +0 -3
- package/dist/esm/modal/Modal.d.mts +0 -12
- package/dist/esm/modal/Modal.mjs +0 -85
- package/dist/esm/modal/Modal.module.css.mjs +0 -3
- package/dist/esm/month-picker/MonthPicker.d.mts +0 -14
- package/dist/esm/month-picker/MonthPicker.mjs +0 -89
- package/dist/esm/month-picker/MonthPicker.module.css.mjs +0 -3
- package/dist/esm/one-time-password-field/OneTimePasswordField.d.mts +0 -8
- package/dist/esm/one-time-password-field/OneTimePasswordField.mjs +0 -31
- package/dist/esm/one-time-password-field/OneTimePasswordField.module.css.mjs +0 -3
- package/dist/esm/pagination/Pagination.d.mts +0 -13
- package/dist/esm/pagination/Pagination.module.css.mjs +0 -3
- package/dist/esm/popover/Popover.d.mts +0 -10
- package/dist/esm/popover/Popover.mjs +0 -23
- package/dist/esm/popover/Popover.module.css.mjs +0 -3
- package/dist/esm/radio-group/RadioGroup.d.mts +0 -9
- package/dist/esm/radio-group/RadioGroup.mjs +0 -45
- package/dist/esm/radio-group/RadioGroup.module.css.mjs +0 -3
- package/dist/esm/select/Select.d.mts +0 -13
- package/dist/esm/select/Select.mjs +0 -83
- package/dist/esm/select/Select.module.css.mjs +0 -3
- package/dist/esm/spinner/Spinner.d.mts +0 -14
- package/dist/esm/spinner/Spinner.mjs +0 -38
- package/dist/esm/spinner/Spinner.module.css.mjs +0 -3
- package/dist/esm/stock-quantity-status/StockQuantityStatus.d.mts +0 -12
- package/dist/esm/stock-quantity-status/StockQuantityStatus.mjs +0 -102
- package/dist/esm/stock-quantity-status/StockQuantityStatus.module.css.mjs +0 -3
- package/dist/esm/switch/Switch.d.mts +0 -16
- package/dist/esm/switch/Switch.mjs +0 -68
- package/dist/esm/switch/Switch.module.css.mjs +0 -3
- package/dist/esm/tab/Tab.d.mts +0 -10
- package/dist/esm/tab/Tab.mjs +0 -43
- package/dist/esm/typography/Typography.d.mts +0 -33
- package/dist/esm/typography/Typography.mjs +0 -88
- package/dist/esm/typography/Typography.module.css.mjs +0 -3
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var reactPrimitive = require('@radix-ui/react-primitive');
|
|
4
|
-
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var tsPattern = require('ts-pattern');
|
|
8
|
-
var Switch_module = require('./Switch.module.css.js');
|
|
9
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
-
var color = require('../token/color.js');
|
|
11
|
-
var Typography = require('../typography/Typography.js');
|
|
12
|
-
var spacing = require('../token/spacing.js');
|
|
13
|
-
|
|
14
|
-
function _interopNamespaceDefault(e) {
|
|
15
|
-
var n = Object.create(null);
|
|
16
|
-
if (e) {
|
|
17
|
-
Object.keys(e).forEach(function (k) {
|
|
18
|
-
if (k !== 'default') {
|
|
19
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () { return e[k]; }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
n.default = e;
|
|
28
|
-
return Object.freeze(n);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(SwitchPrimitive);
|
|
32
|
-
|
|
33
|
-
const Switch = /*#__PURE__*/react.forwardRef(({
|
|
34
|
-
id: _id,
|
|
35
|
-
className,
|
|
36
|
-
style: _style,
|
|
37
|
-
size = 'md',
|
|
38
|
-
position = 'right',
|
|
39
|
-
disabled,
|
|
40
|
-
label,
|
|
41
|
-
...props
|
|
42
|
-
}, ref) => {
|
|
43
|
-
const generatedId = react.useId();
|
|
44
|
-
const id = _id ?? generatedId;
|
|
45
|
-
const style = {
|
|
46
|
-
..._style,
|
|
47
|
-
'--cocso-switch-width': getSwitchWidth(size),
|
|
48
|
-
'--cocso-switch-height': getSwitchHeight(size),
|
|
49
|
-
'--cocso-switch-thumb-width': getThumbSize(size),
|
|
50
|
-
'--cocso-switch-thumb-height': getThumbSize(size),
|
|
51
|
-
'--cocso-switch-bg-color': color.colors.neutral100
|
|
52
|
-
};
|
|
53
|
-
return /*#__PURE__*/jsxRuntime.jsxs(reactPrimitive.Primitive.div, {
|
|
54
|
-
className: clsx.clsx(Switch_module.wrapper, className),
|
|
55
|
-
"aria-disabled": disabled,
|
|
56
|
-
style: style,
|
|
57
|
-
children: [position === 'left' && /*#__PURE__*/jsxRuntime.jsx(Typography.Typography, {
|
|
58
|
-
type: "body",
|
|
59
|
-
size: size,
|
|
60
|
-
asChild: true,
|
|
61
|
-
children: /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
62
|
-
htmlFor: id,
|
|
63
|
-
children: label
|
|
64
|
-
})
|
|
65
|
-
}), /*#__PURE__*/jsxRuntime.jsx(SwitchPrimitive__namespace.Root, {
|
|
66
|
-
ref: ref,
|
|
67
|
-
className: Switch_module.switch,
|
|
68
|
-
disabled: disabled,
|
|
69
|
-
...props,
|
|
70
|
-
children: /*#__PURE__*/jsxRuntime.jsx(SwitchPrimitive__namespace.Thumb, {
|
|
71
|
-
className: Switch_module.thumb
|
|
72
|
-
})
|
|
73
|
-
}), position === 'right' && /*#__PURE__*/jsxRuntime.jsx(Typography.Typography, {
|
|
74
|
-
type: "body",
|
|
75
|
-
size: size,
|
|
76
|
-
"aria-disabled": disabled,
|
|
77
|
-
asChild: true,
|
|
78
|
-
children: /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
79
|
-
htmlFor: id,
|
|
80
|
-
children: label
|
|
81
|
-
})
|
|
82
|
-
})]
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
const getSwitchWidth = size => tsPattern.match(size).with('md', () => spacing.spacing.s14).with('sm', () => spacing.spacing.s12).exhaustive();
|
|
86
|
-
const getSwitchHeight = size => tsPattern.match(size).with('md', () => spacing.spacing.s10).with('sm', () => spacing.spacing.s9).exhaustive();
|
|
87
|
-
const getThumbSize = size => tsPattern.match(size).with('md', () => spacing.spacing.s9).with('sm', () => spacing.spacing.s8).exhaustive();
|
|
88
|
-
|
|
89
|
-
exports.Switch = Switch;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var styleInject_es = require('../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js');
|
|
4
|
-
|
|
5
|
-
var css_248z = ".Switch-module_wrapper__qcI9-{align-items:center;display:flex;gap:var(--ds-spacing-5)}.Switch-module_wrapper__qcI9-[aria-disabled=true]{cursor:not-allowed;opacity:.4}.Switch-module_switch__pwmft{--cocso-switch-width:inherit;--cocso-switch-height:inherit;--cocso-switch-bg-color:inherit;background-color:var(--cocso-switch-bg-color);border-radius:var(--ds-spacing-max);cursor:pointer;height:var(--cocso-switch-height);opacity:1;position:relative;width:var(--cocso-switch-width)}.Switch-module_switch__pwmft[data-disabled=true],.Switch-module_switch__pwmft[disabled]{cursor:not-allowed;opacity:.4}.Switch-module_switch__pwmft[data-state=checked]{--cocso-switch-bg-color:var(--ds-color-primary-500)}.Switch-module_thumb__pQGDy{--cocso-switch-thumb-width:inherit;--cocso-switch-thumb-height:inherit;background-color:var(--ds-color-white);border-radius:var(--ds-spacing-max);display:block;height:var(--cocso-switch-thumb-width);transform:translateX(var(--ds-spacing-2));transition:transform .15s ease;width:var(--cocso-switch-thumb-width);will-change:transform}.Switch-module_thumb__pQGDy[data-state=checked]{transform:translateX(calc(var(--cocso-switch-width) - var(--cocso-switch-thumb-width) - var(--ds-spacing-2)))}";
|
|
6
|
-
var styles = {"wrapper":"Switch-module_wrapper__qcI9-","switch":"Switch-module_switch__pwmft","thumb":"Switch-module_thumb__pQGDy"};
|
|
7
|
-
styleInject_es(css_248z);
|
|
8
|
-
|
|
9
|
-
module.exports = styles;
|
package/dist/cjs/tab/Tab.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import * as TabPrimitive from '@radix-ui/react-tabs';
|
|
3
|
-
|
|
4
|
-
declare const Tab: react.ForwardRefExoticComponent<Omit<TabPrimitive.TabsProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>> & {
|
|
5
|
-
List: react.ForwardRefExoticComponent<Omit<TabPrimitive.TabsListProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
Trigger: react.ForwardRefExoticComponent<Omit<TabPrimitive.TabsTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
Content: react.ForwardRefExoticComponent<Omit<TabPrimitive.TabsContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export { Tab };
|
package/dist/cjs/tab/Tab.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var TabPrimitive = require('@radix-ui/react-tabs');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
|
|
7
|
-
function _interopNamespaceDefault(e) {
|
|
8
|
-
var n = Object.create(null);
|
|
9
|
-
if (e) {
|
|
10
|
-
Object.keys(e).forEach(function (k) {
|
|
11
|
-
if (k !== 'default') {
|
|
12
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return e[k]; }
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var TabPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(TabPrimitive);
|
|
25
|
-
|
|
26
|
-
const TabPrimitiveRoot = /*#__PURE__*/react.forwardRef(({
|
|
27
|
-
...props
|
|
28
|
-
}, ref) => {
|
|
29
|
-
return /*#__PURE__*/jsxRuntime.jsx(TabPrimitive__namespace.Root, {
|
|
30
|
-
ref: ref,
|
|
31
|
-
...props
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
const TabPrimitiveList = /*#__PURE__*/react.forwardRef(({
|
|
35
|
-
...props
|
|
36
|
-
}, ref) => {
|
|
37
|
-
return /*#__PURE__*/jsxRuntime.jsx(TabPrimitive__namespace.List, {
|
|
38
|
-
ref: ref,
|
|
39
|
-
...props
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
const TabPrimitiveTrigger = /*#__PURE__*/react.forwardRef(({
|
|
43
|
-
...props
|
|
44
|
-
}, ref) => {
|
|
45
|
-
return /*#__PURE__*/jsxRuntime.jsx(TabPrimitive__namespace.Trigger, {
|
|
46
|
-
ref: ref,
|
|
47
|
-
...props
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
const TabPrimitiveContent = /*#__PURE__*/react.forwardRef(({
|
|
51
|
-
...props
|
|
52
|
-
}, ref) => {
|
|
53
|
-
return /*#__PURE__*/jsxRuntime.jsx(TabPrimitive__namespace.Content, {
|
|
54
|
-
ref: ref,
|
|
55
|
-
...props
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
const Tab = Object.assign(TabPrimitiveRoot, {
|
|
59
|
-
List: TabPrimitiveList,
|
|
60
|
-
Trigger: TabPrimitiveTrigger,
|
|
61
|
-
Content: TabPrimitiveContent
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
exports.Tab = Tab;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import { FontWeight, LineHeight, ResponsiveFontSize } from '../token/typography.js';
|
|
4
|
-
|
|
5
|
-
type BodySize = 'lg' | 'md' | 'sm' | 'xs';
|
|
6
|
-
type DisplaySize = 'lg' | 'md' | 'sm';
|
|
7
|
-
type HeadingSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
8
|
-
type TypographyPropsBase = {
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
weight?: FontWeight;
|
|
11
|
-
lineHeight?: LineHeight;
|
|
12
|
-
} & ComponentPropsWithoutRef<'p'>;
|
|
13
|
-
type CustomTypographyProps = TypographyPropsBase & {
|
|
14
|
-
type?: 'custom';
|
|
15
|
-
size?: ResponsiveFontSize;
|
|
16
|
-
};
|
|
17
|
-
type BodyTypographyProps = TypographyPropsBase & {
|
|
18
|
-
type: 'body';
|
|
19
|
-
size?: BodySize;
|
|
20
|
-
};
|
|
21
|
-
type DisplayTypographyProps = TypographyPropsBase & {
|
|
22
|
-
type: 'display';
|
|
23
|
-
size?: DisplaySize;
|
|
24
|
-
};
|
|
25
|
-
type HeadingTypographyProps = TypographyPropsBase & {
|
|
26
|
-
type: 'heading';
|
|
27
|
-
size?: HeadingSize;
|
|
28
|
-
};
|
|
29
|
-
type TypographyProps = CustomTypographyProps | BodyTypographyProps | DisplayTypographyProps | HeadingTypographyProps;
|
|
30
|
-
declare const Typography: react.ForwardRefExoticComponent<TypographyProps & react.RefAttributes<HTMLElement>>;
|
|
31
|
-
|
|
32
|
-
export { Typography };
|
|
33
|
-
export type { BodySize, DisplaySize, HeadingSize, TypographyProps };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var reactPrimitive = require('@radix-ui/react-primitive');
|
|
4
|
-
var reactSlot = require('@radix-ui/react-slot');
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var tsPattern = require('ts-pattern');
|
|
8
|
-
var Typography_module = require('./Typography.module.css.js');
|
|
9
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
-
var typography = require('../token/typography.js');
|
|
11
|
-
|
|
12
|
-
const Typography = /*#__PURE__*/react.forwardRef(({
|
|
13
|
-
asChild,
|
|
14
|
-
className,
|
|
15
|
-
style: _style,
|
|
16
|
-
color,
|
|
17
|
-
type = 'custom',
|
|
18
|
-
weight = type === 'heading' ? 'bold' : 'normal',
|
|
19
|
-
lineHeight = 'normal',
|
|
20
|
-
...props
|
|
21
|
-
}, ref) => {
|
|
22
|
-
const Comp = tsPattern.match({
|
|
23
|
-
asChild,
|
|
24
|
-
type
|
|
25
|
-
}).with({
|
|
26
|
-
asChild: true
|
|
27
|
-
}, () => reactSlot.Slot).with({
|
|
28
|
-
type: 'display'
|
|
29
|
-
}, () => 'h1').with({
|
|
30
|
-
type: 'heading'
|
|
31
|
-
}, () => reactPrimitive.Primitive.h2).otherwise(() => reactPrimitive.Primitive.p);
|
|
32
|
-
const fontSize = tsPattern.match(type).with('custom', () => props.size ?? 16).with('body', () => tsPattern.match(props.size ?? 'md').with('lg', () => 18).with('md', () => 16).with('sm', () => 14).with('xs', () => 12).exhaustive()).with('display', () => tsPattern.match(props.size ?? 'md').with('lg', () => ({
|
|
33
|
-
base: 44,
|
|
34
|
-
tablet: 60
|
|
35
|
-
})).with('md', () => ({
|
|
36
|
-
base: 32,
|
|
37
|
-
tablet: 44
|
|
38
|
-
})).with('sm', () => ({
|
|
39
|
-
base: 28,
|
|
40
|
-
tablet: 36
|
|
41
|
-
})).exhaustive()).with('heading', () => tsPattern.match(props.size ?? 'md').with('xl', () => ({
|
|
42
|
-
base: 28,
|
|
43
|
-
tablet: 36
|
|
44
|
-
})).with('lg', () => ({
|
|
45
|
-
base: 24,
|
|
46
|
-
tablet: 32
|
|
47
|
-
})).with('md', () => ({
|
|
48
|
-
base: 20,
|
|
49
|
-
tablet: 24
|
|
50
|
-
})).with('sm', () => 18).with('xs', () => 16).exhaustive()).otherwise(() => 16);
|
|
51
|
-
let base;
|
|
52
|
-
let tablet;
|
|
53
|
-
let desktop;
|
|
54
|
-
if (Array.isArray(fontSize)) {
|
|
55
|
-
[base, tablet, desktop] = fontSize;
|
|
56
|
-
} else if (typeof fontSize === 'object') {
|
|
57
|
-
({
|
|
58
|
-
base,
|
|
59
|
-
tablet,
|
|
60
|
-
desktop
|
|
61
|
-
} = fontSize);
|
|
62
|
-
} else {
|
|
63
|
-
base = fontSize;
|
|
64
|
-
}
|
|
65
|
-
const style = {
|
|
66
|
-
..._style,
|
|
67
|
-
'--cocso-typography-font-color': color,
|
|
68
|
-
'--cocso-typography-font-size': `${typography.fontSize[base]}px`,
|
|
69
|
-
...(tablet !== undefined && {
|
|
70
|
-
'--cocso-tablet-typography-font-size': `${typography.fontSize[tablet]}px`
|
|
71
|
-
}),
|
|
72
|
-
...(desktop !== undefined && {
|
|
73
|
-
'--cocso-desktop-typography-font-size': `${typography.fontSize[desktop]}px`
|
|
74
|
-
}),
|
|
75
|
-
'--cocso-typography-font-weight': typography.fontWeight[weight],
|
|
76
|
-
'--cocso-typography-line-height': typography.lineHeight[lineHeight]
|
|
77
|
-
};
|
|
78
|
-
return /*#__PURE__*/jsxRuntime.jsx(Comp
|
|
79
|
-
// biome-ignore lint/suspicious/noExplicitAny: Polymorphic component with multiple element types (h1, h2, p, Slot) requires type assertion for ref compatibility
|
|
80
|
-
, {
|
|
81
|
-
...(ref && {
|
|
82
|
-
ref: ref
|
|
83
|
-
}),
|
|
84
|
-
className: clsx.clsx(Typography_module.typography, className),
|
|
85
|
-
style: style,
|
|
86
|
-
...props
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
exports.Typography = Typography;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var styleInject_es = require('../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js');
|
|
4
|
-
|
|
5
|
-
var css_248z = ".Typography-module_typography__45lnt{--cocso-typography-font-color:inherit;--cocso-typography-font-size:inherit;--cocso-typography-font-weight:inherit;--cocso-typography-line-height:inherit;color:var(--cocso-typography-font-color);font-size:var(--cocso-typography-font-size);font-weight:var(--cocso-typography-font-weight);line-height:var(--cocso-typography-line-height)}.Typography-module_typography__45lnt[aria-disabled=true]{cursor:not-allowed;opacity:.4}@media (min-width:768px){.Typography-module_typography__45lnt{font-size:var(--cocso-tablet-typography-font-size,var(--cocso-typography-font-size))}}@media (min-width:1024px){.Typography-module_typography__45lnt{font-size:var(--cocso-desktop-typography-font-size,var(--cocso-tablet-typography-font-size,var(--cocso-typography-font-size)))}}";
|
|
6
|
-
var styles = {"typography":"Typography-module_typography__45lnt"};
|
|
7
|
-
styleInject_es(css_248z);
|
|
8
|
-
|
|
9
|
-
module.exports = styles;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
|
-
|
|
5
|
-
interface TriggerProps extends ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> {
|
|
6
|
-
chevron?: boolean;
|
|
7
|
-
}
|
|
8
|
-
declare const Accordion: react.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & react.RefAttributes<HTMLDivElement>> & {
|
|
9
|
-
Item: react.ForwardRefExoticComponent<Omit<Omit<AccordionPrimitive.AccordionItemProps & react.RefAttributes<HTMLDivElement>, "ref">, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
Header: react.ForwardRefExoticComponent<AccordionPrimitive.AccordionHeaderProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
11
|
-
Trigger: react.ForwardRefExoticComponent<TriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
12
|
-
Content: react.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { Accordion };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { KeyboardArrowDownIcon } from '@cocso-ui/react-icons';
|
|
2
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import { forwardRef } from 'react';
|
|
5
|
-
import styles from './Accordion.module.css.mjs';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
const AccordionItem = /*#__PURE__*/forwardRef(({
|
|
9
|
-
className,
|
|
10
|
-
...props
|
|
11
|
-
}, ref) => {
|
|
12
|
-
return /*#__PURE__*/jsx(AccordionPrimitive.Item, {
|
|
13
|
-
ref: ref,
|
|
14
|
-
className: clsx(styles.item, className),
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
const AccordionTrigger = /*#__PURE__*/forwardRef(({
|
|
19
|
-
className,
|
|
20
|
-
children,
|
|
21
|
-
chevron = true,
|
|
22
|
-
...props
|
|
23
|
-
}, ref) => {
|
|
24
|
-
return /*#__PURE__*/jsxs(AccordionPrimitive.Trigger, {
|
|
25
|
-
ref: ref,
|
|
26
|
-
className: clsx(styles.trigger, className),
|
|
27
|
-
...props,
|
|
28
|
-
children: [children, chevron && /*#__PURE__*/jsx(KeyboardArrowDownIcon, {
|
|
29
|
-
className: styles.chevron
|
|
30
|
-
})]
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
const AccordionContent = /*#__PURE__*/forwardRef(({
|
|
34
|
-
className,
|
|
35
|
-
...props
|
|
36
|
-
}, ref) => {
|
|
37
|
-
return /*#__PURE__*/jsx(AccordionPrimitive.Content, {
|
|
38
|
-
ref: ref,
|
|
39
|
-
className: clsx(styles.content, className),
|
|
40
|
-
...props
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
const Accordion = Object.assign(AccordionPrimitive.Root, {
|
|
44
|
-
Item: AccordionItem,
|
|
45
|
-
Header: AccordionPrimitive.Header,
|
|
46
|
-
Trigger: AccordionTrigger,
|
|
47
|
-
Content: AccordionContent
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export { Accordion };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
type BadgeSize = 'sm' | 'md' | 'lg';
|
|
5
|
-
type BadgeVariant = 'default' | 'danger' | 'primary' | 'success' | 'warning';
|
|
6
|
-
interface BadgeProps extends ComponentProps<'div'> {
|
|
7
|
-
size?: BadgeSize;
|
|
8
|
-
variant?: BadgeVariant;
|
|
9
|
-
}
|
|
10
|
-
declare const Badge: react.ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
|
|
12
|
-
export { Badge };
|
|
13
|
-
export type { BadgeProps };
|
package/dist/esm/badge/Badge.mjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
import { match } from 'ts-pattern';
|
|
4
|
-
import styles from './Badge.module.css.mjs';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import { Typography } from '../typography/Typography.mjs';
|
|
7
|
-
import { colors } from '../token/color.mjs';
|
|
8
|
-
|
|
9
|
-
const Badge = /*#__PURE__*/forwardRef(({
|
|
10
|
-
className,
|
|
11
|
-
children,
|
|
12
|
-
size = 'md',
|
|
13
|
-
variant = 'default',
|
|
14
|
-
style: _style,
|
|
15
|
-
...props
|
|
16
|
-
}, ref) => {
|
|
17
|
-
const style = {
|
|
18
|
-
..._style,
|
|
19
|
-
'--cocso-badge-padding': getPadding(size),
|
|
20
|
-
'--cocso-badge-border-radius': '6px',
|
|
21
|
-
'--cocso-badge-bg-color': getBackgroundColor(variant)
|
|
22
|
-
};
|
|
23
|
-
const fontColor = getFontColor(variant);
|
|
24
|
-
const fontSize = getFontSize(size);
|
|
25
|
-
return /*#__PURE__*/jsx("div", {
|
|
26
|
-
ref: ref,
|
|
27
|
-
className: clsx(styles.badge, className),
|
|
28
|
-
style: style,
|
|
29
|
-
...props,
|
|
30
|
-
children: /*#__PURE__*/jsx(Typography, {
|
|
31
|
-
color: fontColor,
|
|
32
|
-
size: fontSize,
|
|
33
|
-
weight: "medium",
|
|
34
|
-
lineHeight: "tight",
|
|
35
|
-
asChild: true,
|
|
36
|
-
children: /*#__PURE__*/jsx("span", {
|
|
37
|
-
className: styles.inner,
|
|
38
|
-
children: children
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
const getPadding = size => match(size).with('sm', () => '4px 8px').with('md', () => '6px 10px').with('lg', () => '8px 12px').exhaustive();
|
|
44
|
-
const getFontSize = size => match(size).with('sm', () => 12).with('md', () => 14).with('lg', () => 16).exhaustive();
|
|
45
|
-
const getFontColor = variant => match(variant).with('default', () => colors.neutral600).with('danger', () => colors.danger600).with('primary', () => colors.primary600).with('success', () => colors.success600).with('warning', () => colors.warning600).exhaustive();
|
|
46
|
-
const getBackgroundColor = variant => match(variant).with('default', () => colors.neutral50).with('danger', () => colors.danger50).with('primary', () => colors.primary50).with('success', () => colors.success50).with('warning', () => colors.warning50).exhaustive();
|
|
47
|
-
|
|
48
|
-
export { Badge };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
-
import { FontWeight } from '../token/typography.mjs';
|
|
4
|
-
|
|
5
|
-
type ButtonSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
6
|
-
type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'success' | 'error' | 'warning' | 'neutral';
|
|
7
|
-
type ButtonShape = 'square' | 'circle' | 'rounded';
|
|
8
|
-
interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'prefix'> {
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
size?: ButtonSize;
|
|
11
|
-
variant?: ButtonVariant;
|
|
12
|
-
weight?: FontWeight;
|
|
13
|
-
shape?: ButtonShape;
|
|
14
|
-
prefix?: ReactNode;
|
|
15
|
-
suffix?: ReactNode;
|
|
16
|
-
svgOnly?: boolean;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
loading?: boolean;
|
|
19
|
-
}
|
|
20
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
21
|
-
|
|
22
|
-
export { Button };
|
|
23
|
-
export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant };
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { Primitive } from '@radix-ui/react-primitive';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
import { forwardRef, isValidElement, cloneElement } from 'react';
|
|
4
|
-
import { match } from 'ts-pattern';
|
|
5
|
-
import styles from './Button.module.css.mjs';
|
|
6
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
import { Spinner } from '../spinner/Spinner.mjs';
|
|
8
|
-
import { fontWeight } from '../token/typography.mjs';
|
|
9
|
-
import { colors } from '../token/color.mjs';
|
|
10
|
-
|
|
11
|
-
const Button = /*#__PURE__*/forwardRef(({
|
|
12
|
-
asChild,
|
|
13
|
-
className,
|
|
14
|
-
style: _style,
|
|
15
|
-
children,
|
|
16
|
-
size = 'md',
|
|
17
|
-
variant = 'primary',
|
|
18
|
-
weight = 'medium',
|
|
19
|
-
shape = 'square',
|
|
20
|
-
prefix,
|
|
21
|
-
suffix,
|
|
22
|
-
svgOnly = false,
|
|
23
|
-
disabled = false,
|
|
24
|
-
loading = false,
|
|
25
|
-
...props
|
|
26
|
-
}, ref) => {
|
|
27
|
-
const style = {
|
|
28
|
-
..._style,
|
|
29
|
-
...getSizeStyles(size),
|
|
30
|
-
'--cocso-button-font-color': getColor(variant),
|
|
31
|
-
'--cocso-button-font-weight': fontWeight[weight],
|
|
32
|
-
'--cocso-button-border': getBorder(variant),
|
|
33
|
-
'--cocso-button-border-radius': getBorderRadius(shape, size),
|
|
34
|
-
'--cocso-button-bg-color': getBackgroundColor(variant),
|
|
35
|
-
'--cocso-button-bg-color-hover': getBackgroundColorHover(variant),
|
|
36
|
-
'--cocso-button-bg-color-active': getBackgroundColorActive(variant)
|
|
37
|
-
};
|
|
38
|
-
const isDisabled = disabled || loading;
|
|
39
|
-
const cn = clsx(styles.button, isDisabled && styles.disabled, svgOnly && styles.svgOnly, className);
|
|
40
|
-
const renderButtonContent = ctx => /*#__PURE__*/jsxs(Fragment, {
|
|
41
|
-
children: [loading && /*#__PURE__*/jsx(Spinner, {
|
|
42
|
-
size: "sm",
|
|
43
|
-
color: "white"
|
|
44
|
-
}), prefix && /*#__PURE__*/jsx("span", {
|
|
45
|
-
className: styles.prefix,
|
|
46
|
-
children: prefix
|
|
47
|
-
}), /*#__PURE__*/jsx("span", {
|
|
48
|
-
className: styles.content,
|
|
49
|
-
children: ctx
|
|
50
|
-
}), suffix && /*#__PURE__*/jsx("span", {
|
|
51
|
-
className: styles.suffix,
|
|
52
|
-
children: suffix
|
|
53
|
-
})]
|
|
54
|
-
});
|
|
55
|
-
if (asChild) {
|
|
56
|
-
if (! /*#__PURE__*/isValidElement(children)) {
|
|
57
|
-
throw new Error('Button: asChild requires a single React element as a child');
|
|
58
|
-
}
|
|
59
|
-
const target = children;
|
|
60
|
-
const ctx = target.props.children;
|
|
61
|
-
return /*#__PURE__*/cloneElement(target, {
|
|
62
|
-
ref,
|
|
63
|
-
...props,
|
|
64
|
-
...target.props,
|
|
65
|
-
className: clsx(cn, target.props.className),
|
|
66
|
-
style: {
|
|
67
|
-
...style,
|
|
68
|
-
...target.props.style
|
|
69
|
-
},
|
|
70
|
-
children: renderButtonContent(ctx)
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return /*#__PURE__*/jsx(Primitive.button, {
|
|
74
|
-
ref: ref,
|
|
75
|
-
className: cn,
|
|
76
|
-
disabled: isDisabled,
|
|
77
|
-
style: style,
|
|
78
|
-
...props,
|
|
79
|
-
children: renderButtonContent(children)
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
const getSizeStyles = size => {
|
|
83
|
-
const height = match(size).with('xl', () => 56).with('lg', () => 48).with('md', () => 40).with('sm', () => 32).with('xs', () => 28).exhaustive();
|
|
84
|
-
const inlinePadding = match(size).with('xl', () => 16).with('lg', () => 14).with('md', () => 10).with('sm', () => 8).with('xs', () => 6).exhaustive();
|
|
85
|
-
const contentPadding = match(size).with('xl', () => '0 6px').with('lg', () => '0 6px').with('md', () => '0 6px').with('sm', () => '0 2px').with('xs', () => '0').exhaustive();
|
|
86
|
-
const fontSize = match(size).with('xl', () => 16).with('lg', () => 16).with('xs', () => 12).otherwise(() => 14);
|
|
87
|
-
return {
|
|
88
|
-
'--cocso-button-height': `${height}px`,
|
|
89
|
-
'--cocso-button-padding-inline': `${inlinePadding}px`,
|
|
90
|
-
'--cocso-button-content-padding': contentPadding,
|
|
91
|
-
'--cocso-button-font-size': `${fontSize}px`
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
const getBorderRadius = (shape, size) => {
|
|
95
|
-
return match(shape).with('square', () => {
|
|
96
|
-
return match(size).with('xs', () => '4px').otherwise(() => '6px');
|
|
97
|
-
}).with('circle', () => '100%').with('rounded', () => '100px').exhaustive();
|
|
98
|
-
};
|
|
99
|
-
const getColor = variant => {
|
|
100
|
-
return match(variant).with('primary', 'success', 'error', 'neutral', () => colors.white).with('secondary', 'tertiary', 'warning', () => colors.neutral950).exhaustive();
|
|
101
|
-
};
|
|
102
|
-
const getBorder = variant => {
|
|
103
|
-
return match(variant).with('tertiary', () => `1px solid ${colors.neutral100}`).otherwise(() => 'none');
|
|
104
|
-
};
|
|
105
|
-
const getBackgroundColor = variant => {
|
|
106
|
-
return match(variant).with('primary', () => colors.primary500).with('secondary', () => colors.white).with('tertiary', () => colors.transparent).with('success', () => colors.success500).with('error', () => colors.danger500).with('warning', () => colors.warning300).with('neutral', () => colors.neutral950).exhaustive();
|
|
107
|
-
};
|
|
108
|
-
const getBackgroundColorHover = variant => {
|
|
109
|
-
return match(variant).with('primary', () => colors.primary600).with('secondary', () => colors.neutral50).with('tertiary', () => colors.neutral50).with('success', () => colors.success600).with('error', () => colors.danger600).with('warning', () => colors.warning400).with('neutral', () => colors.neutral800).exhaustive();
|
|
110
|
-
};
|
|
111
|
-
const getBackgroundColorActive = variant => {
|
|
112
|
-
return match(variant).with('primary', () => colors.primary700).with('secondary', () => colors.neutral100).with('tertiary', () => colors.neutral100).with('success', () => colors.success700).with('error', () => colors.danger700).with('warning', () => colors.warning500).with('neutral', () => colors.neutral700).exhaustive();
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export { Button };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var styles = {"button":"Button-module_button__eiKKZ","disabled":"Button-module_disabled__M6r1w","content":"Button-module_content__SVjwi","prefix":"Button-module_prefix__d7ljt","suffix":"Button-module_suffix__9oysT","svgOnly":"Button-module_svgOnly__8RcZ7"};
|
|
2
|
-
|
|
3
|
-
export { styles as default };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
|
-
|
|
5
|
-
type CheckboxSize = 'lg' | 'md' | 'sm';
|
|
6
|
-
type CheckboxStatus = 'on' | 'off' | 'intermediate';
|
|
7
|
-
interface CheckboxProps extends Omit<ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, 'checked' | 'onCheckedChange' | 'onChange'> {
|
|
8
|
-
id?: string;
|
|
9
|
-
size?: CheckboxSize;
|
|
10
|
-
status: CheckboxStatus;
|
|
11
|
-
onChange: (status: CheckboxStatus) => void;
|
|
12
|
-
label?: string;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
}
|
|
15
|
-
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLButtonElement>>;
|
|
16
|
-
|
|
17
|
-
export { Checkbox };
|
|
18
|
-
export type { CheckboxProps, CheckboxSize, CheckboxStatus };
|