@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
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## `@cocso-ui/react`
|
|
2
2
|
|
|
3
|
-
이 Package는 리액트 기반 컴포넌트를
|
|
3
|
+
이 Package는 리액트 기반 컴포넌트를 제공합니다.
|
|
4
4
|
|
|
5
5
|
### Installation
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ pnpm install @cocso-ui/react
|
|
|
10
10
|
|
|
11
11
|
### Usage
|
|
12
12
|
|
|
13
|
-
컴포넌트를 아래와 같은 형태로 import 할 수
|
|
13
|
+
컴포넌트를 아래와 같은 형태로 import 할 수 있습니다.
|
|
14
14
|
|
|
15
15
|
```javascript
|
|
16
16
|
import { Button } from '@cocso-ui/react';
|
package/dist/cjs/cn.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Merges class names using `clsx` for conditional joining and
|
|
5
|
+
* `tailwind-merge` to resolve Tailwind CSS class conflicts.
|
|
6
|
+
*
|
|
7
|
+
* @param inputs - Any number of class values (strings, arrays, objects).
|
|
8
|
+
* @returns A single deduplicated, conflict-resolved class name string.
|
|
9
|
+
*/
|
|
10
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
11
|
+
|
|
12
|
+
export { cn };
|
package/dist/cjs/cn.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var clsx = require('clsx');
|
|
4
|
+
var tailwindMerge = require('tailwind-merge');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Merges class names using `clsx` for conditional joining and
|
|
8
|
+
* `tailwind-merge` to resolve Tailwind CSS class conflicts.
|
|
9
|
+
*
|
|
10
|
+
* @param inputs - Any number of class values (strings, arrays, objects).
|
|
11
|
+
* @returns A single deduplicated, conflict-resolved class name string.
|
|
12
|
+
*/
|
|
13
|
+
function cn(...inputs) {
|
|
14
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.cn = cn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import * as _base_ui_react from '@base-ui/react';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
6
|
+
|
|
7
|
+
declare function AccordionItem({ className, ...props }: ComponentProps<typeof Accordion$1.Item>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
interface AccordionTriggerProps extends ComponentProps<typeof Accordion$1.Trigger> {
|
|
9
|
+
chevron?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare function AccordionTrigger({ className, children, chevron, ...props }: AccordionTriggerProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare function AccordionPanel({ className, ...props }: ComponentProps<typeof Accordion$1.Panel>): react_jsx_runtime.JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Collapsible content sections. Compose with `Accordion.Item`, `Accordion.Header`,
|
|
15
|
+
* `Accordion.Trigger`, and `Accordion.Content`.
|
|
16
|
+
*/
|
|
17
|
+
declare const Accordion: (<Value = any>(props: Accordion$1.Root.Props<Value>) => React.JSX.Element) & {
|
|
18
|
+
Item: typeof AccordionItem;
|
|
19
|
+
Header: react.ForwardRefExoticComponent<Omit<_base_ui_react.AccordionHeaderProps, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
Trigger: typeof AccordionTrigger;
|
|
21
|
+
Content: typeof AccordionPanel;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { Accordion };
|
|
25
|
+
export type { AccordionTriggerProps };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var reactIcons = require('@cocso-ui/react-icons');
|
|
4
|
+
var cn = require('../../cn.js');
|
|
5
|
+
var accordion_module = require('./accordion.module.css.js');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var accordion = require('@base-ui/react/accordion');
|
|
8
|
+
|
|
9
|
+
function AccordionItem({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
return /*#__PURE__*/jsxRuntime.jsx(accordion.Accordion.Item, {
|
|
14
|
+
className: cn.cn(accordion_module.item, className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function AccordionTrigger({
|
|
19
|
+
className,
|
|
20
|
+
children,
|
|
21
|
+
chevron = true,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
return /*#__PURE__*/jsxRuntime.jsxs(accordion.Accordion.Trigger, {
|
|
25
|
+
className: cn.cn(accordion_module.trigger, className),
|
|
26
|
+
...props,
|
|
27
|
+
children: [children, chevron && /*#__PURE__*/jsxRuntime.jsx(reactIcons.KeyboardArrowDownIcon, {
|
|
28
|
+
className: accordion_module.chevron
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function AccordionPanel({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}) {
|
|
36
|
+
return /*#__PURE__*/jsxRuntime.jsx(accordion.Accordion.Panel, {
|
|
37
|
+
className: cn.cn(accordion_module.content, className),
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Collapsible content sections. Compose with `Accordion.Item`, `Accordion.Header`,
|
|
44
|
+
* `Accordion.Trigger`, and `Accordion.Content`.
|
|
45
|
+
*/
|
|
46
|
+
const Accordion = Object.assign(accordion.Accordion.Root, {
|
|
47
|
+
Item: AccordionItem,
|
|
48
|
+
Header: accordion.Accordion.Header,
|
|
49
|
+
Trigger: AccordionTrigger,
|
|
50
|
+
Content: AccordionPanel
|
|
51
|
+
});
|
|
52
|
+
Accordion.displayName = "Accordion";
|
|
53
|
+
|
|
54
|
+
exports.Accordion = Accordion;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 = "@layer components{.accordion-module_content__1WTaS,.accordion-module_item__qfZXb{overflow:hidden}.accordion-module_content__1WTaS[data-open]{animation:accordion-module_slide-down__0ZzAE var(--cocso-duration-slow) var(--cocso-easing-accordion)}.accordion-module_content__1WTaS:not([data-open]){animation:accordion-module_slide-up__txwke var(--cocso-duration-slow) var(--cocso-easing-accordion)}.accordion-module_trigger__p5Nek{cursor:pointer;display:flex;justify-content:space-between;width:100%}.accordion-module_trigger__p5Nek:focus-visible{outline:2px solid var(--cocso-color-focus-ring);outline-offset:2px}.accordion-module_chevron__yZOb8{display:inline-block;height:var(--cocso-spacing-10);transition:transform var(--cocso-duration-normal) var(--cocso-easing-default);width:var(--cocso-spacing-10)}.accordion-module_trigger__p5Nek:not([data-panel-open])>.accordion-module_chevron__yZOb8{transform:rotate(0deg)}.accordion-module_trigger__p5Nek[data-panel-open]>.accordion-module_chevron__yZOb8{transform:rotate(180deg)}@keyframes accordion-module_slide-up__txwke{0%{height:var(--accordion-panel-height);opacity:1;transform:perspective(800px) rotateX(0deg) translateZ(0)}to{height:0;opacity:0;transform:perspective(800px) rotateX(-3deg) translateZ(-10px)}}@keyframes accordion-module_slide-down__0ZzAE{0%{height:0;opacity:0;transform:perspective(800px) rotateX(-3deg) translateZ(-10px)}to{height:var(--accordion-panel-height);opacity:1;transform:perspective(800px) rotateX(0deg) translateZ(0)}}@media (prefers-reduced-motion:reduce){.accordion-module_content__1WTaS:not([data-open]),.accordion-module_content__1WTaS[data-open]{animation:none}}}";
|
|
6
|
+
var styles = {"item":"accordion-module_item__qfZXb","content":"accordion-module_content__1WTaS","trigger":"accordion-module_trigger__p5Nek","chevron":"accordion-module_chevron__yZOb8"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
/** Inline type alias — codegen is a devDependency and must not leak into published .d.ts */
|
|
5
|
+
type AlertVariant = "info" | "success" | "warning" | "error";
|
|
6
|
+
interface AlertProps extends ComponentProps<"div"> {
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
variant?: AlertVariant;
|
|
10
|
+
}
|
|
11
|
+
/** Contextual feedback message with optional icon and close button. */
|
|
12
|
+
declare function Alert({ ref, className, style, variant, icon, onClose, children, ...props }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { Alert };
|
|
15
|
+
export type { AlertProps, AlertVariant };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var alert = require('../../ecosystem/codegen/generated/alert.js');
|
|
4
|
+
require('../../ecosystem/codegen/generated/alert.css.js');
|
|
5
|
+
var cn = require('../../cn.js');
|
|
6
|
+
var alert_module = require('./alert.module.css.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
/** Contextual feedback message with optional icon and close button. */
|
|
10
|
+
function Alert({
|
|
11
|
+
ref,
|
|
12
|
+
className,
|
|
13
|
+
style,
|
|
14
|
+
variant = "info",
|
|
15
|
+
icon,
|
|
16
|
+
onClose,
|
|
17
|
+
children,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
21
|
+
className: cn.cn(alert.alert({
|
|
22
|
+
variant
|
|
23
|
+
}), alert_module.alert, className),
|
|
24
|
+
ref: ref,
|
|
25
|
+
role: "alert",
|
|
26
|
+
style: style,
|
|
27
|
+
...props,
|
|
28
|
+
children: [icon && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
29
|
+
className: alert_module.icon,
|
|
30
|
+
children: icon
|
|
31
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
32
|
+
className: alert_module.content,
|
|
33
|
+
children: children
|
|
34
|
+
}), onClose && /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
35
|
+
"aria-label": "Close",
|
|
36
|
+
className: alert_module.close,
|
|
37
|
+
onClick: onClose,
|
|
38
|
+
type: "button",
|
|
39
|
+
children: "\xD7"
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
exports.Alert = Alert;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 = "@layer components{.alert-module_alert__7Bt6c{align-items:flex-start;background-color:var(--cocso-alert-bg-color);border:1px solid var(--cocso-alert-border-color);border-radius:var(--cocso-alert-border-radius);color:var(--cocso-alert-font-color);display:flex;font-size:var(--cocso-alert-font-size);gap:var(--cocso-spacing-3);padding:var(--cocso-alert-padding)}.alert-module_icon__Ue8Rs{align-items:center;display:inline-flex;flex-shrink:0}.alert-module_content__-bCFU{flex:1;min-width:0}.alert-module_close__6VtOe{align-items:center;background:none;border:none;border-radius:var(--cocso-radius-2);color:currentColor;cursor:pointer;display:inline-flex;flex-shrink:0;height:20px;justify-content:center;opacity:.7;padding:0;width:20px}.alert-module_close__6VtOe:hover{opacity:1}}";
|
|
6
|
+
var styles = {"alert":"alert-module_alert__7Bt6c","icon":"alert-module_icon__Ue8Rs","content":"alert-module_content__-bCFU","close":"alert-module_close__6VtOe"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
|
|
4
|
+
/** Inline type aliases — codegen is a devDependency and must not leak into published .d.ts */
|
|
5
|
+
type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
6
|
+
type AvatarShape = "circle" | "square";
|
|
7
|
+
interface AvatarProps extends ComponentProps<"div"> {
|
|
8
|
+
alt?: string;
|
|
9
|
+
fallback?: string;
|
|
10
|
+
shape?: AvatarShape;
|
|
11
|
+
size?: AvatarSize;
|
|
12
|
+
src?: string;
|
|
13
|
+
}
|
|
14
|
+
/** User or entity visual identifier with image, initials fallback, or icon. */
|
|
15
|
+
declare function Avatar({ ref, className, style, size, shape, src, alt, fallback, children, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { Avatar };
|
|
18
|
+
export type { AvatarProps, AvatarShape, AvatarSize };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var avatar = require('../../ecosystem/codegen/generated/avatar.js');
|
|
4
|
+
require('../../ecosystem/codegen/generated/avatar.css.js');
|
|
5
|
+
var cn = require('../../cn.js');
|
|
6
|
+
var avatar_module = require('./avatar.module.css.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
/** User or entity visual identifier with image, initials fallback, or icon. */
|
|
10
|
+
function Avatar({
|
|
11
|
+
ref,
|
|
12
|
+
className,
|
|
13
|
+
style,
|
|
14
|
+
size = "md",
|
|
15
|
+
shape = "circle",
|
|
16
|
+
src,
|
|
17
|
+
alt,
|
|
18
|
+
fallback,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
const initials = fallback ?? alt?.charAt(0).toUpperCase();
|
|
23
|
+
function renderContent() {
|
|
24
|
+
if (src) {
|
|
25
|
+
// biome-ignore lint/correctness/useImageSize: avatar image is sized by CSS (100% width/height)
|
|
26
|
+
return /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
27
|
+
alt: alt ?? "",
|
|
28
|
+
className: avatar_module.image,
|
|
29
|
+
src: src
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (initials) {
|
|
33
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
34
|
+
className: avatar_module.fallback,
|
|
35
|
+
children: initials
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return children;
|
|
39
|
+
}
|
|
40
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
41
|
+
className: cn.cn(avatar.avatar({
|
|
42
|
+
size,
|
|
43
|
+
shape
|
|
44
|
+
}), avatar_module.avatar, className),
|
|
45
|
+
ref: ref,
|
|
46
|
+
style: style,
|
|
47
|
+
...props,
|
|
48
|
+
children: renderContent()
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
exports.Avatar = Avatar;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 = "@layer components{.avatar-module_avatar__yPIOs{align-items:center;background-color:var(--cocso-avatar-bg-color);border-radius:var(--cocso-avatar-border-radius);color:var(--cocso-avatar-font-color);display:inline-flex;font-size:var(--cocso-avatar-font-size);font-weight:var(--cocso-avatar-font-weight);height:var(--cocso-avatar-height);justify-content:center;overflow:hidden;width:var(--cocso-avatar-width)}.avatar-module_image__Ngo7A{height:100%;object-fit:cover;width:100%}.avatar-module_fallback__Tf3oZ{align-items:center;display:inline-flex;justify-content:center;line-height:1;-moz-user-select:none;-webkit-user-select:none;user-select:none}}";
|
|
6
|
+
var styles = {"avatar":"avatar-module_avatar__yPIOs","image":"avatar-module_image__Ngo7A","fallback":"avatar-module_fallback__Tf3oZ"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
|
|
4
|
+
type BadgeSize = "large" | "medium" | "small";
|
|
5
|
+
type BadgeVariant = "primary" | "secondary" | "success" | "error" | "warning" | "info" | "outline";
|
|
6
|
+
type BadgeShape = "square" | "circle" | "rounded";
|
|
7
|
+
interface BadgeProps extends ComponentProps<"div"> {
|
|
8
|
+
shape?: BadgeShape;
|
|
9
|
+
size?: BadgeSize;
|
|
10
|
+
variant?: BadgeVariant;
|
|
11
|
+
}
|
|
12
|
+
/** Inline badge/tag component with color and variant options. */
|
|
13
|
+
declare function Badge({ ref, className, children, size, variant, shape, style: _style, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { Badge };
|
|
16
|
+
export type { BadgeProps, BadgeSize };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var badge = require('../../ecosystem/codegen/generated/badge.js');
|
|
4
|
+
require('../../ecosystem/codegen/generated/badge.css.js');
|
|
5
|
+
var cn = require('../../cn.js');
|
|
6
|
+
var badge_module = require('./badge.module.css.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var typography = require('../typography/typography.js');
|
|
9
|
+
|
|
10
|
+
const BADGE_FONT_SIZES = {
|
|
11
|
+
large: 14,
|
|
12
|
+
medium: 12,
|
|
13
|
+
small: 11
|
|
14
|
+
};
|
|
15
|
+
const BADGE_PADDING_Y = {
|
|
16
|
+
large: "5px",
|
|
17
|
+
medium: "4px",
|
|
18
|
+
small: "3px"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** Inline badge/tag component with color and variant options. */
|
|
22
|
+
function Badge({
|
|
23
|
+
ref,
|
|
24
|
+
className,
|
|
25
|
+
children,
|
|
26
|
+
size = "medium",
|
|
27
|
+
variant = "secondary",
|
|
28
|
+
shape = "square",
|
|
29
|
+
style: _style,
|
|
30
|
+
...props
|
|
31
|
+
}) {
|
|
32
|
+
const style = {
|
|
33
|
+
..._style,
|
|
34
|
+
"--cocso-badge-padding-y": BADGE_PADDING_Y[size]
|
|
35
|
+
};
|
|
36
|
+
const fontSize = BADGE_FONT_SIZES[size];
|
|
37
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38
|
+
className: cn.cn(badge.badge({
|
|
39
|
+
variant,
|
|
40
|
+
size,
|
|
41
|
+
shape
|
|
42
|
+
}), badge_module.badge, shape === "circle" && badge_module.circle, className),
|
|
43
|
+
ref: ref,
|
|
44
|
+
style: style,
|
|
45
|
+
...props,
|
|
46
|
+
children: /*#__PURE__*/jsxRuntime.jsx(typography.Typography, {
|
|
47
|
+
color: "currentColor",
|
|
48
|
+
lineHeight: "tight",
|
|
49
|
+
render: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
50
|
+
className: badge_module.inner,
|
|
51
|
+
children: children
|
|
52
|
+
}),
|
|
53
|
+
size: fontSize,
|
|
54
|
+
type: "custom",
|
|
55
|
+
weight: "medium"
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
exports.Badge = Badge;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 = "@layer components{.badge-module_badge__4Tx0D{--cocso-badge-padding:inherit;--cocso-badge-border-radius:inherit;--cocso-badge-bg-color:inherit;--cocso-badge-border:none;background-color:var(--cocso-badge-bg-color);border:var(--cocso-badge-border);border-radius:var(--cocso-badge-border-radius);color:var(--cocso-badge-font-color);display:inline-flex;padding:var(--cocso-badge-padding);-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.badge-module_circle__NP4-2{aspect-ratio:1;justify-content:center;padding:var(--cocso-badge-padding-y)}.badge-module_inner__YYjpI{align-items:center;display:inline-flex;gap:var(--cocso-spacing-2)}}";
|
|
6
|
+
var styles = {"badge":"badge-module_badge__4Tx0D","circle":"badge-module_circle__NP4-2","inner":"badge-module_inner__YYjpI"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
/** Inline type aliases — codegen is a devDependency and must not leak into published .d.ts */
|
|
5
|
+
type BreadcrumbSize = "sm" | "md" | "lg";
|
|
6
|
+
interface BreadcrumbProps extends ComponentProps<"nav"> {
|
|
7
|
+
separator?: ReactNode;
|
|
8
|
+
size?: BreadcrumbSize;
|
|
9
|
+
}
|
|
10
|
+
/** Navigation hierarchy indicator with configurable separator. */
|
|
11
|
+
declare function Breadcrumb({ ref, className, style, size, separator, children, ...props }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { Breadcrumb };
|
|
14
|
+
export type { BreadcrumbProps, BreadcrumbSize };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var breadcrumb = require('../../ecosystem/codegen/generated/breadcrumb.js');
|
|
4
|
+
require('../../ecosystem/codegen/generated/breadcrumb.css.js');
|
|
5
|
+
var reactIcons = require('@cocso-ui/react-icons');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var cn = require('../../cn.js');
|
|
8
|
+
var breadcrumb_module = require('./breadcrumb.module.css.js');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
/** Navigation hierarchy indicator with configurable separator. */
|
|
12
|
+
function Breadcrumb({
|
|
13
|
+
ref,
|
|
14
|
+
className,
|
|
15
|
+
style,
|
|
16
|
+
size = "md",
|
|
17
|
+
separator = /*#__PURE__*/jsxRuntime.jsx(reactIcons.ChevronRightIcon, {
|
|
18
|
+
height: "1em",
|
|
19
|
+
width: "1em"
|
|
20
|
+
}),
|
|
21
|
+
children,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
const items = react.Children.toArray(children);
|
|
25
|
+
return /*#__PURE__*/jsxRuntime.jsx("nav", {
|
|
26
|
+
"aria-label": "Breadcrumb",
|
|
27
|
+
className: cn.cn(breadcrumb.breadcrumb({
|
|
28
|
+
size
|
|
29
|
+
}), breadcrumb_module.breadcrumb, className),
|
|
30
|
+
ref: ref,
|
|
31
|
+
style: style,
|
|
32
|
+
...props,
|
|
33
|
+
children: /*#__PURE__*/jsxRuntime.jsx("ol", {
|
|
34
|
+
className: breadcrumb_module.list,
|
|
35
|
+
children: items.map((child, index) =>
|
|
36
|
+
/*#__PURE__*/
|
|
37
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breadcrumb items are ordered children without reordering
|
|
38
|
+
jsxRuntime.jsxs("li", {
|
|
39
|
+
className: breadcrumb_module.item,
|
|
40
|
+
children: [child, index < items.length - 1 && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
className: breadcrumb_module.separator,
|
|
43
|
+
children: separator
|
|
44
|
+
})]
|
|
45
|
+
}, index))
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
exports.Breadcrumb = Breadcrumb;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 = "@layer components{.breadcrumb-module_breadcrumb__dW5v-{color:var(--cocso-breadcrumb-font-color);font-size:var(--cocso-breadcrumb-font-size)}.breadcrumb-module_list__mLCBo{align-items:center;display:flex;flex-wrap:wrap;gap:var(--cocso-spacing-2);list-style:none;margin:0;padding:0}.breadcrumb-module_item__G0t2y{align-items:center;display:inline-flex;gap:var(--cocso-spacing-2)}.breadcrumb-module_item__G0t2y:last-child{color:var(--cocso-color-neutral-950);font-weight:500}.breadcrumb-module_separator__wMAks{color:var(--cocso-color-neutral-300);user-select:none}}";
|
|
6
|
+
var styles = {"breadcrumb":"breadcrumb-module_breadcrumb__dW5v-","list":"breadcrumb-module_list__mLCBo","item":"breadcrumb-module_item__G0t2y","separator":"breadcrumb-module_separator__wMAks"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { RenderProp } from '../../primitives/use-render.js';
|
|
4
|
+
import { FontWeight } from '../../token/typography.js';
|
|
5
|
+
import { SpinnerVariant } from '../spinner/spinner.js';
|
|
6
|
+
|
|
7
|
+
type ButtonSize = "large" | "medium" | "small" | "x-small";
|
|
8
|
+
type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "success" | "error" | "warning" | "info";
|
|
9
|
+
type ButtonShape = "square" | "circle" | "rounded";
|
|
10
|
+
interface ButtonProps extends Omit<ComponentProps<"button">, "prefix"> {
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
prefix?: ReactNode;
|
|
14
|
+
render?: RenderProp;
|
|
15
|
+
shape?: ButtonShape;
|
|
16
|
+
size?: ButtonSize;
|
|
17
|
+
spinnerVariant?: SpinnerVariant;
|
|
18
|
+
suffix?: ReactNode;
|
|
19
|
+
svgOnly?: boolean;
|
|
20
|
+
variant?: ButtonVariant;
|
|
21
|
+
weight?: FontWeight;
|
|
22
|
+
}
|
|
23
|
+
/** Polymorphic button component with variant, color, and size options. */
|
|
24
|
+
declare function Button({ render: renderProp, ref, className, style: _style, children, size, variant, weight, shape, prefix, suffix, svgOnly, disabled, loading, spinnerVariant, ...props }: ButtonProps): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
25
|
+
|
|
26
|
+
export { Button };
|
|
27
|
+
export type { ButtonProps, ButtonShape, ButtonSize, ButtonVariant };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var button = require('../../ecosystem/codegen/generated/button.js');
|
|
4
|
+
require('../../ecosystem/codegen/generated/button.css.js');
|
|
5
|
+
var cn = require('../../cn.js');
|
|
6
|
+
var button_module = require('./button.module.css.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var typography = require('../../token/typography.js');
|
|
9
|
+
var spinner = require('../spinner/spinner.js');
|
|
10
|
+
var useRender = require('@base-ui/react/use-render');
|
|
11
|
+
var mergeProps = require('@base-ui/react/merge-props');
|
|
12
|
+
|
|
13
|
+
function getButtonSpinnerVariant(variant) {
|
|
14
|
+
return ["primary", "success", "error", "info"].includes(variant) ? "white" : "secondary";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Polymorphic button component with variant, color, and size options. */
|
|
18
|
+
function Button({
|
|
19
|
+
render: renderProp,
|
|
20
|
+
ref,
|
|
21
|
+
className,
|
|
22
|
+
style: _style,
|
|
23
|
+
children,
|
|
24
|
+
size = "medium",
|
|
25
|
+
variant = "primary",
|
|
26
|
+
weight = "medium",
|
|
27
|
+
shape = "square",
|
|
28
|
+
prefix,
|
|
29
|
+
suffix,
|
|
30
|
+
svgOnly = false,
|
|
31
|
+
disabled = false,
|
|
32
|
+
loading = false,
|
|
33
|
+
spinnerVariant,
|
|
34
|
+
...props
|
|
35
|
+
}) {
|
|
36
|
+
const style = {
|
|
37
|
+
..._style,
|
|
38
|
+
"--cocso-button-font-weight": typography.fontWeight[weight]
|
|
39
|
+
};
|
|
40
|
+
const isDisabled = disabled || loading;
|
|
41
|
+
const mergedClassName = cn.cn(button.button({
|
|
42
|
+
variant,
|
|
43
|
+
size,
|
|
44
|
+
shape
|
|
45
|
+
}), button_module.button, svgOnly && button_module.svgOnly, className);
|
|
46
|
+
const renderButtonContent = ctx => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
47
|
+
children: [loading && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
48
|
+
className: button_module.spinnerOverlay,
|
|
49
|
+
children: /*#__PURE__*/jsxRuntime.jsx(spinner.Spinner, {
|
|
50
|
+
size: "medium",
|
|
51
|
+
variant: spinnerVariant ?? getButtonSpinnerVariant(variant)
|
|
52
|
+
})
|
|
53
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
54
|
+
className: cn.cn(button_module.buttonInner, loading && button_module.invisible),
|
|
55
|
+
children: [prefix && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
56
|
+
className: button_module.prefix,
|
|
57
|
+
children: prefix
|
|
58
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
59
|
+
className: button_module.content,
|
|
60
|
+
children: ctx
|
|
61
|
+
}), suffix && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
62
|
+
className: button_module.suffix,
|
|
63
|
+
children: suffix
|
|
64
|
+
})]
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
return useRender.useRender({
|
|
68
|
+
render: renderProp,
|
|
69
|
+
ref,
|
|
70
|
+
props: mergeProps.mergeProps({
|
|
71
|
+
className: mergedClassName,
|
|
72
|
+
style,
|
|
73
|
+
disabled: isDisabled,
|
|
74
|
+
"aria-busy": loading || undefined,
|
|
75
|
+
type: "button"
|
|
76
|
+
}, props, {
|
|
77
|
+
children: renderButtonContent(children)
|
|
78
|
+
}),
|
|
79
|
+
defaultTagName: "button"
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
exports.Button = Button;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 = "@layer components{.button-module_button__5dzDN{--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,none);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;transition:background-color var(--cocso-duration-fast) var(--cocso-easing-default)}@media (hover:hover) and (pointer:fine){.button-module_button__5dzDN:not([disabled]):hover{--cocso-button-bg-color-hover:inherit;background-color:var(--cocso-button-bg-color-hover)}}.button-module_button__5dzDN:not([disabled]):active{--cocso-button-bg-color-active:inherit;background-color:var(--cocso-button-bg-color-active)}.button-module_content__q0g4H{padding:var(--cocso-button-content-padding)}.button-module_prefix__836bE{margin-right:var(--cocso-spacing-2)}.button-module_prefix__836bE,.button-module_suffix__6k1TK{align-items:center;display:inline-flex;flex-shrink:0;justify-content:center}.button-module_suffix__6k1TK{margin-left:var(--cocso-spacing-2)}.button-module_button__5dzDN:focus-visible{outline:2px solid var(--cocso-color-primary-950);outline-offset:2px}.button-module_button__5dzDN[disabled]{cursor:not-allowed;opacity:.4}.button-module_svgOnly__QHNx6{aspect-ratio:1/1;padding:0}.button-module_spinnerOverlay__kbemq{inset:0;position:absolute}.button-module_buttonInner__aXpaa,.button-module_spinnerOverlay__kbemq{align-items:center;display:inline-flex;justify-content:center}.button-module_invisible__esdRe{opacity:0}}";
|
|
6
|
+
var styles = {"button":"button-module_button__5dzDN","content":"button-module_content__q0g4H","prefix":"button-module_prefix__836bE","suffix":"button-module_suffix__6k1TK","svgOnly":"button-module_svgOnly__QHNx6","spinnerOverlay":"button-module_spinnerOverlay__kbemq","buttonInner":"button-module_buttonInner__aXpaa","invisible":"button-module_invisible__esdRe"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
|
|
4
|
+
type CardVariant = "elevated" | "outlined" | "filled";
|
|
5
|
+
type CardPadding = "sm" | "md" | "lg";
|
|
6
|
+
interface CardProps extends ComponentProps<"div"> {
|
|
7
|
+
padding?: CardPadding;
|
|
8
|
+
variant?: CardVariant;
|
|
9
|
+
}
|
|
10
|
+
declare function Card({ ref, className, style, variant, padding, children, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { Card };
|
|
13
|
+
export type { CardPadding, CardProps, CardVariant };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var card = require('../../ecosystem/codegen/generated/card.js');
|
|
4
|
+
require('../../ecosystem/codegen/generated/card.css.js');
|
|
5
|
+
var cn = require('../../cn.js');
|
|
6
|
+
var card_module = require('./card.module.css.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function Card({
|
|
10
|
+
ref,
|
|
11
|
+
className,
|
|
12
|
+
style,
|
|
13
|
+
variant = "elevated",
|
|
14
|
+
padding = "md",
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
19
|
+
className: cn.cn(card.card({
|
|
20
|
+
variant,
|
|
21
|
+
padding
|
|
22
|
+
}), card_module.card, variant === "elevated" && card_module.elevated, className),
|
|
23
|
+
ref: ref,
|
|
24
|
+
style: style,
|
|
25
|
+
...props,
|
|
26
|
+
children: children
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.Card = Card;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 = "@layer components{.card-module_card__ZPFTz{background-color:var(--cocso-card-bg-color);border:var(--cocso-card-border,none);border-radius:var(--cocso-card-border-radius);display:flex;flex-direction:column;padding:var(--cocso-card-padding)}.card-module_elevated__Gua8s{box-shadow:var(--cocso-shadow-card)}}";
|
|
6
|
+
var styles = {"card":"card-module_card__ZPFTz","elevated":"card-module_elevated__Gua8s"};
|
|
7
|
+
styleInject_es(css_248z);
|
|
8
|
+
|
|
9
|
+
module.exports = styles;
|