@cocso-ui/react 0.2.20 → 1.0.0
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 +103 -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 +43 -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 +69 -0
- package/dist/cjs/components/input/input.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 +21 -0
- package/dist/cjs/{pagination/Pagination.js → components/pagination/pagination.js} +35 -20
- 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 +47 -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 +85 -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 +16 -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 +48 -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 +30 -19
- package/dist/cjs/index.js +65 -43
- 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 +101 -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 +41 -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 +66 -0
- package/dist/esm/components/input/input.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 +21 -0
- package/dist/esm/{pagination/Pagination.mjs → components/pagination/pagination.mjs} +30 -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 +45 -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 +82 -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 +16 -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 +46 -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 +30 -19
- package/dist/esm/index.mjs +31 -20
- 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.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
package/dist/cjs/badge/Badge.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var clsx = require('clsx');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
var tsPattern = require('ts-pattern');
|
|
6
|
-
var Badge_module = require('./Badge.module.css.js');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var Typography = require('../typography/Typography.js');
|
|
9
|
-
var color = require('../token/color.js');
|
|
10
|
-
|
|
11
|
-
const Badge = /*#__PURE__*/react.forwardRef(({
|
|
12
|
-
className,
|
|
13
|
-
children,
|
|
14
|
-
size = 'md',
|
|
15
|
-
variant = 'default',
|
|
16
|
-
style: _style,
|
|
17
|
-
...props
|
|
18
|
-
}, ref) => {
|
|
19
|
-
const style = {
|
|
20
|
-
..._style,
|
|
21
|
-
'--cocso-badge-padding': getPadding(size),
|
|
22
|
-
'--cocso-badge-border-radius': '6px',
|
|
23
|
-
'--cocso-badge-bg-color': getBackgroundColor(variant)
|
|
24
|
-
};
|
|
25
|
-
const fontColor = getFontColor(variant);
|
|
26
|
-
const fontSize = getFontSize(size);
|
|
27
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
28
|
-
ref: ref,
|
|
29
|
-
className: clsx.clsx(Badge_module.badge, className),
|
|
30
|
-
style: style,
|
|
31
|
-
...props,
|
|
32
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Typography.Typography, {
|
|
33
|
-
color: fontColor,
|
|
34
|
-
size: fontSize,
|
|
35
|
-
weight: "medium",
|
|
36
|
-
lineHeight: "tight",
|
|
37
|
-
asChild: true,
|
|
38
|
-
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
39
|
-
className: Badge_module.inner,
|
|
40
|
-
children: children
|
|
41
|
-
})
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
const getPadding = size => tsPattern.match(size).with('sm', () => '4px 8px').with('md', () => '6px 10px').with('lg', () => '8px 12px').exhaustive();
|
|
46
|
-
const getFontSize = size => tsPattern.match(size).with('sm', () => 12).with('md', () => 14).with('lg', () => 16).exhaustive();
|
|
47
|
-
const getFontColor = variant => tsPattern.match(variant).with('default', () => color.colors.neutral600).with('danger', () => color.colors.danger600).with('primary', () => color.colors.primary600).with('success', () => color.colors.success600).with('warning', () => color.colors.warning600).exhaustive();
|
|
48
|
-
const getBackgroundColor = variant => tsPattern.match(variant).with('default', () => color.colors.neutral50).with('danger', () => color.colors.danger50).with('primary', () => color.colors.primary50).with('success', () => color.colors.success50).with('warning', () => color.colors.warning50).exhaustive();
|
|
49
|
-
|
|
50
|
-
exports.Badge = Badge;
|
|
@@ -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 = ".Badge-module_badge__ikDSa{--cocso-badge-padding:inherit;--cocso-badge-border-radius:inherit;--cocso-badge-bg-color:inherit;background-color:var(--cocso-badge-bg-color);border-radius:var(--cocso-badge-border-radius);display:inline-flex;padding:var(--cocso-badge-padding);user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.Badge-module_inner__-g0sp{align-items:center;display:inline-flex;gap:2px}";
|
|
6
|
-
var styles = {"badge":"Badge-module_badge__ikDSa","inner":"Badge-module_inner__-g0sp"};
|
|
7
|
-
styleInject_es(css_248z);
|
|
8
|
-
|
|
9
|
-
module.exports = styles;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
-
import { FontWeight } from '../token/typography.js';
|
|
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,117 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var reactPrimitive = require('@radix-ui/react-primitive');
|
|
4
|
-
var clsx = require('clsx');
|
|
5
|
-
var react = require('react');
|
|
6
|
-
var tsPattern = require('ts-pattern');
|
|
7
|
-
var Button_module = require('./Button.module.css.js');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var Spinner = require('../spinner/Spinner.js');
|
|
10
|
-
var typography = require('../token/typography.js');
|
|
11
|
-
var color = require('../token/color.js');
|
|
12
|
-
|
|
13
|
-
const Button = /*#__PURE__*/react.forwardRef(({
|
|
14
|
-
asChild,
|
|
15
|
-
className,
|
|
16
|
-
style: _style,
|
|
17
|
-
children,
|
|
18
|
-
size = 'md',
|
|
19
|
-
variant = 'primary',
|
|
20
|
-
weight = 'medium',
|
|
21
|
-
shape = 'square',
|
|
22
|
-
prefix,
|
|
23
|
-
suffix,
|
|
24
|
-
svgOnly = false,
|
|
25
|
-
disabled = false,
|
|
26
|
-
loading = false,
|
|
27
|
-
...props
|
|
28
|
-
}, ref) => {
|
|
29
|
-
const style = {
|
|
30
|
-
..._style,
|
|
31
|
-
...getSizeStyles(size),
|
|
32
|
-
'--cocso-button-font-color': getColor(variant),
|
|
33
|
-
'--cocso-button-font-weight': typography.fontWeight[weight],
|
|
34
|
-
'--cocso-button-border': getBorder(variant),
|
|
35
|
-
'--cocso-button-border-radius': getBorderRadius(shape, size),
|
|
36
|
-
'--cocso-button-bg-color': getBackgroundColor(variant),
|
|
37
|
-
'--cocso-button-bg-color-hover': getBackgroundColorHover(variant),
|
|
38
|
-
'--cocso-button-bg-color-active': getBackgroundColorActive(variant)
|
|
39
|
-
};
|
|
40
|
-
const isDisabled = disabled || loading;
|
|
41
|
-
const cn = clsx.clsx(Button_module.button, isDisabled && Button_module.disabled, svgOnly && Button_module.svgOnly, className);
|
|
42
|
-
const renderButtonContent = ctx => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
43
|
-
children: [loading && /*#__PURE__*/jsxRuntime.jsx(Spinner.Spinner, {
|
|
44
|
-
size: "sm",
|
|
45
|
-
color: "white"
|
|
46
|
-
}), prefix && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
47
|
-
className: Button_module.prefix,
|
|
48
|
-
children: prefix
|
|
49
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
50
|
-
className: Button_module.content,
|
|
51
|
-
children: ctx
|
|
52
|
-
}), suffix && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53
|
-
className: Button_module.suffix,
|
|
54
|
-
children: suffix
|
|
55
|
-
})]
|
|
56
|
-
});
|
|
57
|
-
if (asChild) {
|
|
58
|
-
if (! /*#__PURE__*/react.isValidElement(children)) {
|
|
59
|
-
throw new Error('Button: asChild requires a single React element as a child');
|
|
60
|
-
}
|
|
61
|
-
const target = children;
|
|
62
|
-
const ctx = target.props.children;
|
|
63
|
-
return /*#__PURE__*/react.cloneElement(target, {
|
|
64
|
-
ref,
|
|
65
|
-
...props,
|
|
66
|
-
...target.props,
|
|
67
|
-
className: clsx.clsx(cn, target.props.className),
|
|
68
|
-
style: {
|
|
69
|
-
...style,
|
|
70
|
-
...target.props.style
|
|
71
|
-
},
|
|
72
|
-
children: renderButtonContent(ctx)
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
return /*#__PURE__*/jsxRuntime.jsx(reactPrimitive.Primitive.button, {
|
|
76
|
-
ref: ref,
|
|
77
|
-
className: cn,
|
|
78
|
-
disabled: isDisabled,
|
|
79
|
-
style: style,
|
|
80
|
-
...props,
|
|
81
|
-
children: renderButtonContent(children)
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
const getSizeStyles = size => {
|
|
85
|
-
const height = tsPattern.match(size).with('xl', () => 56).with('lg', () => 48).with('md', () => 40).with('sm', () => 32).with('xs', () => 28).exhaustive();
|
|
86
|
-
const inlinePadding = tsPattern.match(size).with('xl', () => 16).with('lg', () => 14).with('md', () => 10).with('sm', () => 8).with('xs', () => 6).exhaustive();
|
|
87
|
-
const contentPadding = tsPattern.match(size).with('xl', () => '0 6px').with('lg', () => '0 6px').with('md', () => '0 6px').with('sm', () => '0 2px').with('xs', () => '0').exhaustive();
|
|
88
|
-
const fontSize = tsPattern.match(size).with('xl', () => 16).with('lg', () => 16).with('xs', () => 12).otherwise(() => 14);
|
|
89
|
-
return {
|
|
90
|
-
'--cocso-button-height': `${height}px`,
|
|
91
|
-
'--cocso-button-padding-inline': `${inlinePadding}px`,
|
|
92
|
-
'--cocso-button-content-padding': contentPadding,
|
|
93
|
-
'--cocso-button-font-size': `${fontSize}px`
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
const getBorderRadius = (shape, size) => {
|
|
97
|
-
return tsPattern.match(shape).with('square', () => {
|
|
98
|
-
return tsPattern.match(size).with('xs', () => '4px').otherwise(() => '6px');
|
|
99
|
-
}).with('circle', () => '100%').with('rounded', () => '100px').exhaustive();
|
|
100
|
-
};
|
|
101
|
-
const getColor = variant => {
|
|
102
|
-
return tsPattern.match(variant).with('primary', 'success', 'error', 'neutral', () => color.colors.white).with('secondary', 'tertiary', 'warning', () => color.colors.neutral950).exhaustive();
|
|
103
|
-
};
|
|
104
|
-
const getBorder = variant => {
|
|
105
|
-
return tsPattern.match(variant).with('tertiary', () => `1px solid ${color.colors.neutral100}`).otherwise(() => 'none');
|
|
106
|
-
};
|
|
107
|
-
const getBackgroundColor = variant => {
|
|
108
|
-
return tsPattern.match(variant).with('primary', () => color.colors.primary500).with('secondary', () => color.colors.white).with('tertiary', () => color.colors.transparent).with('success', () => color.colors.success500).with('error', () => color.colors.danger500).with('warning', () => color.colors.warning300).with('neutral', () => color.colors.neutral950).exhaustive();
|
|
109
|
-
};
|
|
110
|
-
const getBackgroundColorHover = variant => {
|
|
111
|
-
return tsPattern.match(variant).with('primary', () => color.colors.primary600).with('secondary', () => color.colors.neutral50).with('tertiary', () => color.colors.neutral50).with('success', () => color.colors.success600).with('error', () => color.colors.danger600).with('warning', () => color.colors.warning400).with('neutral', () => color.colors.neutral800).exhaustive();
|
|
112
|
-
};
|
|
113
|
-
const getBackgroundColorActive = variant => {
|
|
114
|
-
return tsPattern.match(variant).with('primary', () => color.colors.primary700).with('secondary', () => color.colors.neutral100).with('tertiary', () => color.colors.neutral100).with('success', () => color.colors.success700).with('error', () => color.colors.danger700).with('warning', () => color.colors.warning500).with('neutral', () => color.colors.neutral700).exhaustive();
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
exports.Button = Button;
|
|
@@ -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 = ".Button-module_button__eiKKZ{--cocso-button-height:inherit;--cocso-button-padding-inline:inherit;--cocso-button-content-padding:inherit;--cocso-button-font-color:inherit;--cocso-button-font-size:inherit;--cocso-button-font-weight:inherit;--cocso-button-border:inherit;--cocso-button-border-radius:inherit;--cocso-button-bg-color:inherit;align-items:center;background-color:var(--cocso-button-bg-color);border:var(--cocso-button-border);border-radius:var(--cocso-button-border-radius);color:var(--cocso-button-font-color);cursor:pointer;display:inline-flex;font-size:var(--cocso-button-font-size);font-weight:var(--cocso-button-font-weight);height:var(--cocso-button-height);justify-content:center;opacity:1;padding-inline:var(--cocso-button-padding-inline);position:relative;transform:translateZ(0);transition:background-color .15s ease-in-out,transform .15s ease-in-out}.Button-module_button__eiKKZ:not(.Button-module_disabled__M6r1w):hover{--cocso-button-bg-color-hover:inherit;background-color:var(--cocso-button-bg-color-hover)}.Button-module_button__eiKKZ:not(.Button-module_disabled__M6r1w):active{--cocso-button-bg-color-active:inherit;background-color:var(--cocso-button-bg-color-active);transform:scale(.98)}.Button-module_content__SVjwi{padding:var(--cocso-button-content-padding)}.Button-module_prefix__d7ljt{margin-right:2px}.Button-module_prefix__d7ljt,.Button-module_suffix__9oysT{align-items:center;display:inline-flex;flex-shrink:0;justify-content:center}.Button-module_suffix__9oysT{margin-left:2px}.Button-module_disabled__M6r1w{cursor:not-allowed;opacity:.4}.Button-module_svgOnly__8RcZ7{aspect-ratio:1/1;padding:0}";
|
|
6
|
-
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"};
|
|
7
|
-
styleInject_es(css_248z);
|
|
8
|
-
|
|
9
|
-
module.exports = styles;
|
|
@@ -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 };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var reactIcons = require('@cocso-ui/react-icons');
|
|
4
|
-
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var react = require('react');
|
|
7
|
-
var tsPattern = require('ts-pattern');
|
|
8
|
-
var Checkbox_module = require('./Checkbox.module.css.js');
|
|
9
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
-
var spacing = require('../token/spacing.js');
|
|
11
|
-
var color = require('../token/color.js');
|
|
12
|
-
var Typography = require('../typography/Typography.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 CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(CheckboxPrimitive);
|
|
32
|
-
|
|
33
|
-
const Checkbox = /*#__PURE__*/react.forwardRef(({
|
|
34
|
-
id: _id,
|
|
35
|
-
className,
|
|
36
|
-
style: _style,
|
|
37
|
-
size = 'md',
|
|
38
|
-
status,
|
|
39
|
-
onChange,
|
|
40
|
-
label,
|
|
41
|
-
disabled,
|
|
42
|
-
...props
|
|
43
|
-
}, ref) => {
|
|
44
|
-
const generatedId = react.useId();
|
|
45
|
-
const id = _id ?? generatedId;
|
|
46
|
-
const handleCheckedChange = checked => {
|
|
47
|
-
if (!disabled) {
|
|
48
|
-
const nextStatus = tsPattern.match(checked).with(true, () => 'on').with('indeterminate', () => 'intermediate').with(false, () => 'off').exhaustive();
|
|
49
|
-
onChange(nextStatus);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const getCheckedState = () => {
|
|
53
|
-
return tsPattern.match(status).with('on', () => true).with('intermediate', () => 'indeterminate').with('off', () => false).exhaustive();
|
|
54
|
-
};
|
|
55
|
-
const style = {
|
|
56
|
-
..._style,
|
|
57
|
-
'--cocso-checkbox-size': getSize(size),
|
|
58
|
-
'--cocso-checkbox-color': color.colors.white,
|
|
59
|
-
'--cocso-checkbox-border-color': getBorderColor(status),
|
|
60
|
-
'--cocso-checkbox-bg-color': getBackgroundColor(status)
|
|
61
|
-
};
|
|
62
|
-
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
63
|
-
className: clsx.clsx(Checkbox_module.wrapper, className),
|
|
64
|
-
style: style,
|
|
65
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(CheckboxPrimitive__namespace.Root, {
|
|
66
|
-
ref: ref,
|
|
67
|
-
id: id,
|
|
68
|
-
className: Checkbox_module.checkbox,
|
|
69
|
-
checked: getCheckedState(),
|
|
70
|
-
onCheckedChange: handleCheckedChange,
|
|
71
|
-
disabled: disabled,
|
|
72
|
-
...props,
|
|
73
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(CheckboxPrimitive__namespace.Indicator, {
|
|
74
|
-
className: Checkbox_module.indicator,
|
|
75
|
-
style: {
|
|
76
|
-
opacity: status === 'on' ? 1 : 0
|
|
77
|
-
},
|
|
78
|
-
"aria-hidden": "true",
|
|
79
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactIcons.CheckIcon, {
|
|
80
|
-
className: Checkbox_module.icon,
|
|
81
|
-
size: 24
|
|
82
|
-
})
|
|
83
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
84
|
-
className: Checkbox_module.indicator,
|
|
85
|
-
style: {
|
|
86
|
-
opacity: status === 'intermediate' ? 1 : 0
|
|
87
|
-
},
|
|
88
|
-
"aria-hidden": "true",
|
|
89
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactIcons.CheckIcon, {
|
|
90
|
-
className: Checkbox_module.icon,
|
|
91
|
-
size: 24
|
|
92
|
-
})
|
|
93
|
-
})]
|
|
94
|
-
}), label && /*#__PURE__*/jsxRuntime.jsx(Typography.Typography, {
|
|
95
|
-
type: "body",
|
|
96
|
-
className: Checkbox_module.label,
|
|
97
|
-
size: size,
|
|
98
|
-
"aria-disabled": disabled,
|
|
99
|
-
asChild: true,
|
|
100
|
-
children: /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
101
|
-
htmlFor: id,
|
|
102
|
-
children: label
|
|
103
|
-
})
|
|
104
|
-
})]
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
const getSize = size => {
|
|
108
|
-
return tsPattern.match(size).with('lg', () => spacing.spacing.s10).with('md', () => spacing.spacing.s9).with('sm', () => spacing.spacing.s8).exhaustive();
|
|
109
|
-
};
|
|
110
|
-
const getBorderColor = status => {
|
|
111
|
-
return tsPattern.match(status).with('on', () => color.colors.primary500).with('intermediate', () => color.colors.primary500).with('off', () => color.colors.neutral100).exhaustive();
|
|
112
|
-
};
|
|
113
|
-
const getBackgroundColor = status => {
|
|
114
|
-
return tsPattern.match(status).with('on', () => color.colors.primary500).with('intermediate', () => color.colors.primary500).with('off', () => color.colors.white).exhaustive();
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
exports.Checkbox = Checkbox;
|
|
@@ -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 = ".Checkbox-module_wrapper__5uqJp{align-items:center;display:flex;gap:var(--ds-spacing-5)}.Checkbox-module_checkbox__05Z5t{--cocso-checkbox-size:inherit;--cocso-checkbox-color:inherit;--cocso-checkbox-border-color:inherit;--cocso-checkbox-bg-color:inherit;align-items:center;background-color:var(--cocso-checkbox-bg-color);border:1px solid var(--cocso-checkbox-border-color);border-radius:4px;color:var(--cocso-checkbox-color);cursor:pointer;display:inline-flex;height:var(--cocso-checkbox-size);justify-content:center;opacity:1;position:relative;transition:color .15s ease-in-out,border-color .15s ease-in-out,background-color .15s ease-in-out;width:var(--cocso-checkbox-size)}.Checkbox-module_icon__hEcKq{stroke:var(--cocso-checkbox-color);display:block;height:auto;max-width:100%;transition:stroke .15s ease-in-out}.Checkbox-module_checkbox__05Z5t input[type=checkbox]{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.Checkbox-module_indicator__MLpNt{bottom:var(--ds-spacing-1);left:var(--ds-spacing-1);position:absolute;right:var(--ds-spacing-1);top:var(--ds-spacing-1);transition:opacity .15s ease-in-out}.Checkbox-module_label__ubb5U{cursor:pointer;opacity:1}.Checkbox-module_checkbox__05Z5t[disabled],.Checkbox-module_label__ubb5U[aria-disabled=true]{cursor:not-allowed;opacity:.4}";
|
|
6
|
-
var styles = {"wrapper":"Checkbox-module_wrapper__5uqJp","checkbox":"Checkbox-module_checkbox__05Z5t","icon":"Checkbox-module_icon__hEcKq","indicator":"Checkbox-module_indicator__MLpNt","label":"Checkbox-module_label__ubb5U"};
|
|
7
|
-
styleInject_es(css_248z);
|
|
8
|
-
|
|
9
|
-
module.exports = styles;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
|
|
4
|
-
interface DayPickerProps extends ComponentPropsWithoutRef<'div'> {
|
|
5
|
-
value?: Date;
|
|
6
|
-
onValueChange?: (value: Date | null) => void;
|
|
7
|
-
minDate?: Date;
|
|
8
|
-
maxDate?: Date;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const DayPicker: react.ForwardRefExoticComponent<DayPickerProps & react.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
|
|
13
|
-
export { DayPicker };
|
|
14
|
-
export type { DayPickerProps };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var reactIcons = require('@cocso-ui/react-icons');
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var locale = require('date-fns/locale');
|
|
7
|
-
var react = require('react');
|
|
8
|
-
var DatePicker = require('react-datepicker');
|
|
9
|
-
var DayPicker_module = require('./DayPicker.module.css.js');
|
|
10
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
11
|
-
var Dropdown = require('../dropdown/Dropdown.js');
|
|
12
|
-
var Button = require('../button/Button.js');
|
|
13
|
-
var Typography = require('../typography/Typography.js');
|
|
14
|
-
|
|
15
|
-
const DayPicker = /*#__PURE__*/react.forwardRef(({
|
|
16
|
-
className,
|
|
17
|
-
value,
|
|
18
|
-
onValueChange,
|
|
19
|
-
disabled,
|
|
20
|
-
children,
|
|
21
|
-
minDate,
|
|
22
|
-
maxDate,
|
|
23
|
-
...props
|
|
24
|
-
}, ref) => {
|
|
25
|
-
const [open, setOpen] = react.useState(false);
|
|
26
|
-
const handleChange = date => {
|
|
27
|
-
onValueChange?.(date);
|
|
28
|
-
setOpen(false);
|
|
29
|
-
};
|
|
30
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
31
|
-
ref: ref,
|
|
32
|
-
className: clsx.clsx(DayPicker_module.root, className),
|
|
33
|
-
...props,
|
|
34
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(Dropdown.Dropdown, {
|
|
35
|
-
open: open,
|
|
36
|
-
onOpenChange: setOpen,
|
|
37
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Dropdown.Dropdown.Trigger, {
|
|
38
|
-
asChild: true,
|
|
39
|
-
children: children
|
|
40
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Dropdown.Dropdown.Portal, {
|
|
41
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Dropdown.Dropdown.Content, {
|
|
42
|
-
className: DayPicker_module.content,
|
|
43
|
-
"aria-label": "\uB0A0\uC9DC \uC120\uD0DD",
|
|
44
|
-
children: /*#__PURE__*/jsxRuntime.jsx(DatePicker, {
|
|
45
|
-
selected: value,
|
|
46
|
-
onChange: handleChange,
|
|
47
|
-
disabled: disabled,
|
|
48
|
-
locale: locale.ko,
|
|
49
|
-
minDate: minDate,
|
|
50
|
-
maxDate: maxDate,
|
|
51
|
-
dateFormat: "yyyy\uB144 MM\uC6D4 dd\uC77C",
|
|
52
|
-
showPopperArrow: false,
|
|
53
|
-
dayClassName: date => {
|
|
54
|
-
const day = date.getDay();
|
|
55
|
-
if (day === 0) return DayPicker_module.sunday;
|
|
56
|
-
if (day === 6) return DayPicker_module.saturday;
|
|
57
|
-
return '';
|
|
58
|
-
},
|
|
59
|
-
renderCustomHeader: ({
|
|
60
|
-
date,
|
|
61
|
-
decreaseMonth,
|
|
62
|
-
increaseMonth,
|
|
63
|
-
prevMonthButtonDisabled,
|
|
64
|
-
nextMonthButtonDisabled
|
|
65
|
-
}) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
66
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Button.Button, {
|
|
67
|
-
type: "button",
|
|
68
|
-
variant: "secondary",
|
|
69
|
-
size: "xs",
|
|
70
|
-
onClick: decreaseMonth,
|
|
71
|
-
disabled: prevMonthButtonDisabled,
|
|
72
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactIcons.ArrowIOSBackwardIcon, {})
|
|
73
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Typography.Typography, {
|
|
74
|
-
type: "body",
|
|
75
|
-
weight: "semibold",
|
|
76
|
-
children: date.toLocaleDateString('ko-KR', {
|
|
77
|
-
year: 'numeric',
|
|
78
|
-
month: 'long'
|
|
79
|
-
})
|
|
80
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Button.Button, {
|
|
81
|
-
type: "button",
|
|
82
|
-
variant: "secondary",
|
|
83
|
-
size: "xs",
|
|
84
|
-
onClick: increaseMonth,
|
|
85
|
-
disabled: nextMonthButtonDisabled,
|
|
86
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactIcons.ArrowIOSForwardIcon, {})
|
|
87
|
-
})]
|
|
88
|
-
}),
|
|
89
|
-
inline: true
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
})]
|
|
93
|
-
})
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
DayPicker.displayName = 'DayPicker';
|
|
97
|
-
|
|
98
|
-
exports.DayPicker = DayPicker;
|
|
@@ -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 = ".DayPicker-module_root__lDrAw{display:inline-block;transform:translateZ(0)}.DayPicker-module_content__VVh4Y{min-width:260px;overflow:hidden}.DayPicker-module_sunday__RaZuV{color:var(--ds-color-danger-600)!important}.DayPicker-module_saturday__e-AQO{color:var(--ds-color-primary-600)!important}.react-datepicker{background-color:var(--ds-color-white);color:var(--ds-color-text-primary);display:inline-block;font-size:.8rem;position:relative}.react-datepicker__aria-live{height:1px;left:-10000px;overflow:hidden;position:absolute;top:auto;width:1px}.react-datepicker__sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.react-datepicker__month-container{padding-block:var(--ds-spacing-8);width:100%}.react-datepicker__header--custom{align-items:center;display:flex;justify-content:space-between;padding-bottom:var(--ds-spacing-5);width:100%}.react-datepicker__day-names,.react-datepicker__week{text-align:center;white-space:nowrap}.react-datepicker__day,.react-datepicker__day-name{color:var(--ds-color-text-primary);display:inline-block;line-height:1.7rem;margin:.166rem;text-align:center;width:1.7rem}.react-datepicker__day{border-radius:8px;cursor:pointer;font-weight:500}.react-datepicker__day:hover{background-color:var(--ds-color-neutral-50)}.react-datepicker__day--selected{background-color:var(--ds-color-primary-500);color:var(--ds-color-white)!important}.react-datepicker__day--selected:hover{background-color:var(--ds-color-primary-600)!important}.react-datepicker__day-name:first-child{color:var(--ds-color-danger-600)}.react-datepicker__day-name:nth-child(7){color:var(--ds-color-primary-600)}.react-datepicker__day--disabled{cursor:not-allowed;opacity:.3}";
|
|
6
|
-
var styles = {"root":"DayPicker-module_root__lDrAw","content":"DayPicker-module_content__VVh4Y","sunday":"DayPicker-module_sunday__RaZuV","saturday":"DayPicker-module_saturday__e-AQO"};
|
|
7
|
-
styleInject_es(css_248z);
|
|
8
|
-
|
|
9
|
-
module.exports = styles;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import * as DropdownPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
-
|
|
4
|
-
declare const Dropdown: react.FC<DropdownPrimitive.DropdownMenuProps> & {
|
|
5
|
-
Trigger: react.ForwardRefExoticComponent<DropdownPrimitive.DropdownMenuTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
Portal: react.FC<DropdownPrimitive.DropdownMenuPortalProps>;
|
|
7
|
-
Content: react.ForwardRefExoticComponent<Omit<Omit<DropdownPrimitive.DropdownMenuContentProps & react.RefAttributes<HTMLDivElement>, "ref">, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
Item: react.ForwardRefExoticComponent<Omit<DropdownPrimitive.DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { Dropdown };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var DropdownPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
4
|
-
var clsx = require('clsx');
|
|
5
|
-
var react = require('react');
|
|
6
|
-
var Dropdown_module = require('./Dropdown.module.css.js');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
|
|
9
|
-
function _interopNamespaceDefault(e) {
|
|
10
|
-
var n = Object.create(null);
|
|
11
|
-
if (e) {
|
|
12
|
-
Object.keys(e).forEach(function (k) {
|
|
13
|
-
if (k !== 'default') {
|
|
14
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return e[k]; }
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
n.default = e;
|
|
23
|
-
return Object.freeze(n);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
var DropdownPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(DropdownPrimitive);
|
|
27
|
-
|
|
28
|
-
const DropdownContent = /*#__PURE__*/react.forwardRef(({
|
|
29
|
-
className,
|
|
30
|
-
...props
|
|
31
|
-
}, ref) => {
|
|
32
|
-
return /*#__PURE__*/jsxRuntime.jsx(DropdownPrimitive__namespace.Content, {
|
|
33
|
-
ref: ref,
|
|
34
|
-
className: clsx.clsx(Dropdown_module.content, className),
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
const DropdownItem = /*#__PURE__*/react.forwardRef(({
|
|
39
|
-
className,
|
|
40
|
-
...props
|
|
41
|
-
}, ref) => {
|
|
42
|
-
return /*#__PURE__*/jsxRuntime.jsx(DropdownPrimitive__namespace.Item, {
|
|
43
|
-
ref: ref,
|
|
44
|
-
className: clsx.clsx(Dropdown_module.item, className),
|
|
45
|
-
...props
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
const Dropdown = Object.assign(DropdownPrimitive__namespace.Root, {
|
|
49
|
-
Trigger: DropdownPrimitive__namespace.Trigger,
|
|
50
|
-
Portal: DropdownPrimitive__namespace.Portal,
|
|
51
|
-
Content: DropdownContent,
|
|
52
|
-
Item: DropdownItem
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
exports.Dropdown = Dropdown;
|
|
@@ -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 = "@keyframes Dropdown-module_dropdown-slide-up__2uVH3{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@keyframes Dropdown-module_dropdown-slide-down__T5LLc{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}.Dropdown-module_content__S3TRi{background-color:var(--ds-color-white);border-radius:var(--ds-spacing-3);box-shadow:var(--ds-shadow-2);display:flex;flex-direction:column;will-change:transform,opacity;z-index:var(--ds-z-index-overlay)}.Dropdown-module_content__S3TRi[data-side=top]{animation:Dropdown-module_dropdown-slide-up__2uVH3 .4s cubic-bezier(.16,1,.3,1)}.Dropdown-module_content__S3TRi[data-side=bottom]{animation:Dropdown-module_dropdown-slide-down__T5LLc .4s cubic-bezier(.16,1,.3,1)}.Dropdown-module_item__MIltz{display:flex;flex-direction:column}";
|
|
6
|
-
var styles = {"content":"Dropdown-module_content__S3TRi","item":"Dropdown-module_item__MIltz"};
|
|
7
|
-
styleInject_es(css_248z);
|
|
8
|
-
|
|
9
|
-
module.exports = styles;
|
package/dist/cjs/link/Link.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import { FontWeight, LineHeight } from '../token/typography.js';
|
|
4
|
-
|
|
5
|
-
type LinkSize = 'lg' | 'md' | 'sm' | 'xs';
|
|
6
|
-
interface LinkProps extends ComponentPropsWithoutRef<'a'> {
|
|
7
|
-
asChild?: boolean;
|
|
8
|
-
size?: LinkSize;
|
|
9
|
-
weight?: FontWeight;
|
|
10
|
-
lineHeight?: LineHeight;
|
|
11
|
-
indicator?: boolean;
|
|
12
|
-
}
|
|
13
|
-
declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
14
|
-
|
|
15
|
-
export { Link };
|
|
16
|
-
export type { LinkProps, LinkSize };
|
package/dist/cjs/link/Link.js
DELETED
|
@@ -1,35 +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 Link_module = require('./Link.module.css.js');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var Typography = require('../typography/Typography.js');
|
|
10
|
-
|
|
11
|
-
const Link = /*#__PURE__*/react.forwardRef(({
|
|
12
|
-
asChild,
|
|
13
|
-
className,
|
|
14
|
-
size,
|
|
15
|
-
weight,
|
|
16
|
-
lineHeight,
|
|
17
|
-
indicator = true,
|
|
18
|
-
...props
|
|
19
|
-
}, ref) => {
|
|
20
|
-
const Comp = asChild ? reactSlot.Slot : reactPrimitive.Primitive.a;
|
|
21
|
-
return /*#__PURE__*/jsxRuntime.jsx(Typography.Typography, {
|
|
22
|
-
type: "body",
|
|
23
|
-
size: size,
|
|
24
|
-
weight: weight,
|
|
25
|
-
lineHeight: lineHeight,
|
|
26
|
-
asChild: true,
|
|
27
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Comp, {
|
|
28
|
-
ref: ref,
|
|
29
|
-
className: clsx.clsx(Link_module.link, indicator && Link_module.indicator, className),
|
|
30
|
-
...props
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
exports.Link = Link;
|
|
@@ -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 = ".Link-module_link__J9CFb{align-items:center;cursor:pointer;display:inline-flex;gap:var(--ds-spacing-2);justify-content:center;text-decoration:none;transition:color .15s ease-in-out;width:fit-content}.Link-module_link__J9CFb>svg{flex-shrink:0;height:var(--ds-spacing-8);width:var(--ds-spacing-8)}.Link-module_indicator__DIUaW{text-decoration:underline}";
|
|
6
|
-
var styles = {"link":"Link-module_link__J9CFb","indicator":"Link-module_indicator__DIUaW"};
|
|
7
|
-
styleInject_es(css_248z);
|
|
8
|
-
|
|
9
|
-
module.exports = styles;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import * as ModalPrimitive from '@radix-ui/react-dialog';
|
|
3
|
-
|
|
4
|
-
declare const Modal: react.FC<ModalPrimitive.DialogProps> & {
|
|
5
|
-
Trigger: react.ForwardRefExoticComponent<ModalPrimitive.DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
Content: react.ForwardRefExoticComponent<Omit<Omit<ModalPrimitive.DialogContentProps & react.RefAttributes<HTMLDivElement>, "ref">, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
Close: react.ForwardRefExoticComponent<Omit<ModalPrimitive.DialogCloseProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
Title: react.ForwardRefExoticComponent<Omit<ModalPrimitive.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
|
|
9
|
-
Description: react.ForwardRefExoticComponent<Omit<ModalPrimitive.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>>;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { Modal };
|