@cocso-ui/react 0.2.21 → 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
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { link } from '../../ecosystem/codegen/generated/link.mjs';
|
|
2
|
+
import { ExternalLinkIcon } from '@cocso-ui/react-icons';
|
|
3
|
+
import { cn } from '../../cn.mjs';
|
|
4
|
+
import styles from './link.module.css.mjs';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
import { Typography } from '../typography/typography.mjs';
|
|
7
|
+
|
|
8
|
+
function LinkComponent({
|
|
9
|
+
ref,
|
|
10
|
+
render: renderProp,
|
|
11
|
+
className,
|
|
12
|
+
style: _style,
|
|
13
|
+
size,
|
|
14
|
+
type = "body",
|
|
15
|
+
weight,
|
|
16
|
+
lineHeight,
|
|
17
|
+
variant = "inline",
|
|
18
|
+
indicator,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
const showIndicator = indicator ?? variant !== "plain";
|
|
22
|
+
const style = {
|
|
23
|
+
..._style
|
|
24
|
+
};
|
|
25
|
+
const mergedClassName = cn(link({
|
|
26
|
+
variant
|
|
27
|
+
}), styles.link, variant === "current" && styles.current, showIndicator && styles.indicator, className);
|
|
28
|
+
const typographyProps = {
|
|
29
|
+
className: mergedClassName,
|
|
30
|
+
lineHeight,
|
|
31
|
+
ref,
|
|
32
|
+
render: renderProp ?? (renderProps => /*#__PURE__*/jsx("a", {
|
|
33
|
+
...renderProps
|
|
34
|
+
})),
|
|
35
|
+
size,
|
|
36
|
+
style,
|
|
37
|
+
type,
|
|
38
|
+
weight,
|
|
39
|
+
...props
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/jsx(Typography, {
|
|
42
|
+
...typographyProps
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function ExternalIcon({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
return /*#__PURE__*/jsx(ExternalLinkIcon, {
|
|
50
|
+
className: cn(styles.externalIcon, className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Styled anchor/link component with inline, current, and plain variants. */
|
|
56
|
+
const Link = Object.assign(LinkComponent, {
|
|
57
|
+
displayName: "Link",
|
|
58
|
+
ExternalIcon
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export { Link };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Locale } from 'date-fns';
|
|
3
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
4
|
+
|
|
5
|
+
interface MonthPickerProps extends Omit<ComponentProps<"div">, "children"> {
|
|
6
|
+
dateFormat?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
locale?: Locale;
|
|
9
|
+
maxDate?: Date;
|
|
10
|
+
minDate?: Date;
|
|
11
|
+
onValueChange?: (value: Date | null) => void;
|
|
12
|
+
trigger?: ReactElement;
|
|
13
|
+
value?: Date;
|
|
14
|
+
}
|
|
15
|
+
declare function MonthPicker({ ref, className, value, onValueChange, trigger, locale, dateFormat, minDate, maxDate, disabled, ...props }: MonthPickerProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { MonthPicker };
|
|
18
|
+
export type { MonthPickerProps };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ArrowIOSBackwardIcon, ArrowIOSForwardIcon } from '@cocso-ui/react-icons';
|
|
3
|
+
import { format } from 'date-fns';
|
|
4
|
+
import { ko } from 'date-fns/locale';
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import DatePicker from 'react-datepicker';
|
|
7
|
+
import { cn } from '../../cn.mjs';
|
|
8
|
+
import styles from './month-picker.module.css.mjs';
|
|
9
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
import { Dropdown } from '../dropdown/dropdown.mjs';
|
|
11
|
+
import { Button } from '../button/button.mjs';
|
|
12
|
+
import { Typography } from '../typography/typography.mjs';
|
|
13
|
+
|
|
14
|
+
function MonthPicker({
|
|
15
|
+
ref,
|
|
16
|
+
className,
|
|
17
|
+
value,
|
|
18
|
+
onValueChange,
|
|
19
|
+
trigger,
|
|
20
|
+
locale = ko,
|
|
21
|
+
dateFormat = "yyyy년 MM월",
|
|
22
|
+
minDate,
|
|
23
|
+
maxDate,
|
|
24
|
+
disabled,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
const [open, setOpen] = useState(false);
|
|
28
|
+
const handleChange = date => {
|
|
29
|
+
onValueChange?.(date);
|
|
30
|
+
setOpen(false);
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/jsx("div", {
|
|
33
|
+
className: cn(styles.root, className),
|
|
34
|
+
ref: ref,
|
|
35
|
+
...props,
|
|
36
|
+
children: /*#__PURE__*/jsxs(Dropdown, {
|
|
37
|
+
onOpenChange: setOpen,
|
|
38
|
+
open: open,
|
|
39
|
+
children: [/*#__PURE__*/jsx(Dropdown.Trigger, {
|
|
40
|
+
render: trigger ?? /*#__PURE__*/jsx(Button, {
|
|
41
|
+
disabled: disabled,
|
|
42
|
+
size: "small",
|
|
43
|
+
variant: "outline",
|
|
44
|
+
children: value ? format(value, dateFormat, {
|
|
45
|
+
locale
|
|
46
|
+
}) : "Select month"
|
|
47
|
+
})
|
|
48
|
+
}), /*#__PURE__*/jsx(Dropdown.Content, {
|
|
49
|
+
"aria-label": "Select month",
|
|
50
|
+
className: styles.content,
|
|
51
|
+
children: /*#__PURE__*/jsx(DatePicker, {
|
|
52
|
+
dateFormat: dateFormat,
|
|
53
|
+
disabled: disabled,
|
|
54
|
+
inline: true,
|
|
55
|
+
locale: locale,
|
|
56
|
+
maxDate: maxDate,
|
|
57
|
+
minDate: minDate,
|
|
58
|
+
onChange: handleChange,
|
|
59
|
+
renderCustomHeader: ({
|
|
60
|
+
date,
|
|
61
|
+
decreaseYear,
|
|
62
|
+
increaseYear,
|
|
63
|
+
prevYearButtonDisabled,
|
|
64
|
+
nextYearButtonDisabled
|
|
65
|
+
}) => /*#__PURE__*/jsxs(Fragment, {
|
|
66
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
67
|
+
size: "small",
|
|
68
|
+
type: "body",
|
|
69
|
+
weight: "semibold",
|
|
70
|
+
children: date.toLocaleDateString(locale.code ?? "ko-KR", {
|
|
71
|
+
year: "numeric"
|
|
72
|
+
})
|
|
73
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
74
|
+
className: styles.menu,
|
|
75
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
76
|
+
className: styles.arrow,
|
|
77
|
+
disabled: prevYearButtonDisabled,
|
|
78
|
+
onClick: decreaseYear,
|
|
79
|
+
size: "x-small",
|
|
80
|
+
svgOnly: true,
|
|
81
|
+
type: "button",
|
|
82
|
+
variant: "outline",
|
|
83
|
+
children: /*#__PURE__*/jsx(ArrowIOSBackwardIcon, {})
|
|
84
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
85
|
+
className: styles.arrow,
|
|
86
|
+
disabled: nextYearButtonDisabled,
|
|
87
|
+
onClick: increaseYear,
|
|
88
|
+
size: "x-small",
|
|
89
|
+
svgOnly: true,
|
|
90
|
+
type: "button",
|
|
91
|
+
variant: "outline",
|
|
92
|
+
children: /*#__PURE__*/jsx(ArrowIOSForwardIcon, {})
|
|
93
|
+
})]
|
|
94
|
+
})]
|
|
95
|
+
}),
|
|
96
|
+
selected: value,
|
|
97
|
+
showFourColumnMonthYearPicker: true,
|
|
98
|
+
showMonthYearPicker: true,
|
|
99
|
+
showPopperArrow: false
|
|
100
|
+
})
|
|
101
|
+
})]
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export { MonthPicker };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { OTPInput } from 'input-otp';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
|
|
5
|
+
interface OneTimePasswordFieldProps extends Omit<ComponentProps<typeof OTPInput>, "onChange" | "render" | "children"> {
|
|
6
|
+
className?: string;
|
|
7
|
+
onValueChange?: (value: string) => void;
|
|
8
|
+
slotClassName?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function OneTimePasswordField({ className, slotClassName, onValueChange, ref, ...props }: OneTimePasswordFieldProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { OneTimePasswordField };
|
|
13
|
+
export type { OneTimePasswordFieldProps };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OTPInput } from 'input-otp';
|
|
2
|
+
import { cn } from '../../cn.mjs';
|
|
3
|
+
import styles from './one-time-password-field.module.css.mjs';
|
|
4
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const Slot = ({
|
|
7
|
+
char,
|
|
8
|
+
className,
|
|
9
|
+
hasFakeCaret,
|
|
10
|
+
isActive,
|
|
11
|
+
placeholderChar
|
|
12
|
+
}) => /*#__PURE__*/jsxs("div", {
|
|
13
|
+
className: cn(styles.slot, isActive && styles.slotActive, className),
|
|
14
|
+
"data-active": isActive || undefined,
|
|
15
|
+
children: [char ?? placeholderChar, hasFakeCaret && /*#__PURE__*/jsx("div", {
|
|
16
|
+
className: styles.caret
|
|
17
|
+
})]
|
|
18
|
+
});
|
|
19
|
+
function OneTimePasswordField({
|
|
20
|
+
className,
|
|
21
|
+
slotClassName,
|
|
22
|
+
onValueChange,
|
|
23
|
+
ref,
|
|
24
|
+
...props
|
|
25
|
+
}) {
|
|
26
|
+
return /*#__PURE__*/jsx(OTPInput, {
|
|
27
|
+
containerClassName: cn(styles.otp, className),
|
|
28
|
+
onChange: onValueChange,
|
|
29
|
+
ref: ref,
|
|
30
|
+
render: ({
|
|
31
|
+
slots
|
|
32
|
+
}) => /*#__PURE__*/jsx(Fragment, {
|
|
33
|
+
children: [...slots.entries()].map(([i, slot]) => /*#__PURE__*/jsx(Slot, {
|
|
34
|
+
...slot,
|
|
35
|
+
className: slotClassName
|
|
36
|
+
}, `otp-slot-${i}`))
|
|
37
|
+
}),
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { OneTimePasswordField };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
|
|
4
|
+
interface PaginationLabels {
|
|
5
|
+
navigation?: string;
|
|
6
|
+
next?: string;
|
|
7
|
+
page?: (n: number) => string;
|
|
8
|
+
previous?: string;
|
|
9
|
+
}
|
|
10
|
+
interface PaginationProps extends Omit<ComponentProps<"nav">, "onChange"> {
|
|
11
|
+
labels?: PaginationLabels;
|
|
12
|
+
maxVisible?: number;
|
|
13
|
+
onChange: (pageNumber: number) => void;
|
|
14
|
+
page: number;
|
|
15
|
+
totalPages: number;
|
|
16
|
+
}
|
|
17
|
+
/** Page navigation component with previous/next controls and truncated page range. */
|
|
18
|
+
declare function Pagination({ ref, className, page, totalPages, maxVisible, onChange, labels, ...props }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { Pagination };
|
|
21
|
+
export type { PaginationLabels, PaginationProps };
|
|
@@ -1,54 +1,69 @@
|
|
|
1
1
|
import { ArrowIOSBackwardIcon, MoreHorizIcon, ArrowIOSForwardIcon } from '@cocso-ui/react-icons';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import styles from './Pagination.module.css.mjs';
|
|
2
|
+
import { cn } from '../../cn.mjs';
|
|
3
|
+
import styles from './pagination.module.css.mjs';
|
|
5
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
/** Page navigation component with previous/next controls and truncated page range. */
|
|
7
|
+
function Pagination({
|
|
8
|
+
ref,
|
|
8
9
|
className,
|
|
9
10
|
page,
|
|
10
11
|
totalPages,
|
|
11
12
|
maxVisible = 5,
|
|
12
13
|
onChange,
|
|
14
|
+
labels,
|
|
13
15
|
...props
|
|
14
|
-
}
|
|
16
|
+
}) {
|
|
15
17
|
const halfVisible = Math.ceil(maxVisible / 2);
|
|
18
|
+
const navigationLabel = labels?.navigation ?? "Page navigation";
|
|
19
|
+
const previousLabel = labels?.previous ?? "Previous page";
|
|
20
|
+
const nextLabel = labels?.next ?? "Next page";
|
|
21
|
+
const pageLabel = labels?.page ?? (n => `Page ${n}`);
|
|
16
22
|
const renderPageButton = pageNumber => /*#__PURE__*/jsx("button", {
|
|
17
|
-
|
|
23
|
+
"aria-current": page === pageNumber ? "page" : undefined,
|
|
24
|
+
"aria-label": pageLabel(pageNumber),
|
|
18
25
|
className: styles.item,
|
|
19
|
-
onClick: () => onChange(pageNumber),
|
|
20
26
|
"data-active": page === pageNumber,
|
|
27
|
+
onClick: () => onChange(pageNumber),
|
|
28
|
+
type: "button",
|
|
21
29
|
children: pageNumber
|
|
22
30
|
}, pageNumber);
|
|
23
|
-
return /*#__PURE__*/jsxs("
|
|
31
|
+
return /*#__PURE__*/jsxs("nav", {
|
|
32
|
+
"aria-label": navigationLabel,
|
|
33
|
+
className: cn(styles.pagination, className),
|
|
24
34
|
ref: ref,
|
|
25
|
-
className: clsx(styles.pagination, className),
|
|
26
35
|
...props,
|
|
27
36
|
children: [totalPages > 1 && /*#__PURE__*/jsx("button", {
|
|
37
|
+
"aria-label": previousLabel,
|
|
28
38
|
className: styles.arrow,
|
|
29
|
-
type: "button",
|
|
30
39
|
disabled: page === 1,
|
|
31
40
|
onClick: () => page > 1 && onChange(page - 1),
|
|
41
|
+
type: "button",
|
|
32
42
|
children: /*#__PURE__*/jsx(ArrowIOSBackwardIcon, {})
|
|
33
|
-
}), totalPages <= maxVisible + 2 ? Array
|
|
43
|
+
}), totalPages <= maxVisible + 2 ? Array.from({
|
|
44
|
+
length: totalPages
|
|
45
|
+
}, (_, index) => renderPageButton(index + 1)) : /*#__PURE__*/jsxs(Fragment, {
|
|
34
46
|
children: [renderPageButton(1), page > 1 + halfVisible && /*#__PURE__*/jsx("span", {
|
|
35
47
|
className: styles.trunc,
|
|
36
48
|
children: /*#__PURE__*/jsx(MoreHorizIcon, {})
|
|
37
|
-
}), Array
|
|
49
|
+
}), Array.from({
|
|
50
|
+
length: maxVisible
|
|
51
|
+
}, (_, index) => {
|
|
38
52
|
const pageNumber = page - halfVisible + index + 1;
|
|
39
|
-
return pageNumber > 1 && pageNumber < totalPages ? renderPageButton(pageNumber) :
|
|
53
|
+
return pageNumber > 1 && pageNumber < totalPages ? renderPageButton(pageNumber) : null;
|
|
40
54
|
}), page < totalPages - halfVisible && /*#__PURE__*/jsx("span", {
|
|
41
55
|
className: styles.trunc,
|
|
42
56
|
children: /*#__PURE__*/jsx(MoreHorizIcon, {})
|
|
43
57
|
}), renderPageButton(totalPages)]
|
|
44
58
|
}), totalPages > 1 && /*#__PURE__*/jsx("button", {
|
|
59
|
+
"aria-label": nextLabel,
|
|
45
60
|
className: styles.arrow,
|
|
46
|
-
type: "button",
|
|
47
61
|
disabled: page === totalPages,
|
|
48
62
|
onClick: () => page < totalPages && onChange(page + 1),
|
|
63
|
+
type: "button",
|
|
49
64
|
children: /*#__PURE__*/jsx(ArrowIOSForwardIcon, {})
|
|
50
65
|
})]
|
|
51
66
|
});
|
|
52
|
-
}
|
|
67
|
+
}
|
|
53
68
|
|
|
54
69
|
export { Pagination };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
4
|
+
|
|
5
|
+
declare function PopoverArrow({ className, ...props }: ComponentProps<typeof Popover$1.Arrow>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function PopoverContent({ className, side, sideOffset, align, alignOffset, arrowPadding, ...props }: ComponentProps<typeof Popover$1.Popup> & Pick<ComponentProps<typeof Popover$1.Positioner>, "side" | "sideOffset" | "align" | "alignOffset" | "arrowPadding">): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare const Popover: typeof Popover$1.Root & {
|
|
8
|
+
displayName: "Popover";
|
|
9
|
+
Trigger: Popover$1.Trigger;
|
|
10
|
+
Content: typeof PopoverContent;
|
|
11
|
+
Arrow: typeof PopoverArrow;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Popover };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cn } from '../../cn.mjs';
|
|
2
|
+
import styles from './popover.module.css.mjs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
5
|
+
|
|
6
|
+
function PopoverArrow({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /*#__PURE__*/jsx(Popover$1.Arrow, {
|
|
11
|
+
className: cn(styles.arrow, className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function PopoverContent({
|
|
16
|
+
className,
|
|
17
|
+
side,
|
|
18
|
+
sideOffset,
|
|
19
|
+
align,
|
|
20
|
+
alignOffset,
|
|
21
|
+
arrowPadding,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
return /*#__PURE__*/jsx(Popover$1.Portal, {
|
|
25
|
+
children: /*#__PURE__*/jsx(Popover$1.Positioner, {
|
|
26
|
+
align: align,
|
|
27
|
+
alignOffset: alignOffset,
|
|
28
|
+
arrowPadding: arrowPadding,
|
|
29
|
+
side: side,
|
|
30
|
+
sideOffset: sideOffset,
|
|
31
|
+
children: /*#__PURE__*/jsx(Popover$1.Popup, {
|
|
32
|
+
className: cn(styles.content, className),
|
|
33
|
+
...props
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const Popover = Object.assign(Popover$1.Root, {
|
|
39
|
+
displayName: "Popover",
|
|
40
|
+
Trigger: Popover$1.Trigger,
|
|
41
|
+
Content: PopoverContent,
|
|
42
|
+
Arrow: PopoverArrow
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export { Popover };
|
|
@@ -0,0 +1,17 @@
|
|
|
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 ProgressVariant = "primary" | "secondary" | "success" | "danger" | "warning" | "info";
|
|
6
|
+
type ProgressSize = "sm" | "md" | "lg";
|
|
7
|
+
interface ProgressProps extends ComponentProps<"div"> {
|
|
8
|
+
max?: number;
|
|
9
|
+
size?: ProgressSize;
|
|
10
|
+
value: number;
|
|
11
|
+
variant?: ProgressVariant;
|
|
12
|
+
}
|
|
13
|
+
/** Determinate progress indicator showing completion percentage. */
|
|
14
|
+
declare function Progress({ ref, className, style, variant, size, value, max, ...props }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { Progress };
|
|
17
|
+
export type { ProgressProps, ProgressSize, ProgressVariant };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { progress } from '../../ecosystem/codegen/generated/progress.mjs';
|
|
2
|
+
import { cn } from '../../cn.mjs';
|
|
3
|
+
import styles from './progress.module.css.mjs';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
/** Determinate progress indicator showing completion percentage. */
|
|
7
|
+
function Progress({
|
|
8
|
+
ref,
|
|
9
|
+
className,
|
|
10
|
+
style,
|
|
11
|
+
variant = "primary",
|
|
12
|
+
size = "md",
|
|
13
|
+
value,
|
|
14
|
+
max = 100,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
const safeMax = max > 0 ? max : 100;
|
|
18
|
+
const percentage = Math.min(100, Math.max(0, value / safeMax * 100));
|
|
19
|
+
return /*#__PURE__*/jsx("div", {
|
|
20
|
+
"aria-valuemax": safeMax,
|
|
21
|
+
"aria-valuemin": 0,
|
|
22
|
+
"aria-valuenow": Math.min(Math.max(0, value), safeMax),
|
|
23
|
+
className: cn(progress({
|
|
24
|
+
variant,
|
|
25
|
+
size
|
|
26
|
+
}), styles.track, className),
|
|
27
|
+
ref: ref,
|
|
28
|
+
role: "progressbar",
|
|
29
|
+
style: style,
|
|
30
|
+
...props,
|
|
31
|
+
children: /*#__PURE__*/jsx("div", {
|
|
32
|
+
className: styles.fill,
|
|
33
|
+
style: {
|
|
34
|
+
width: `${percentage}%`
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { Progress };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { Radio } from '@base-ui/react/radio';
|
|
4
|
+
import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group';
|
|
5
|
+
|
|
6
|
+
/** Inline type alias — codegen is a devDependency and must not leak into published .d.ts */
|
|
7
|
+
type RadioSize = "large" | "medium" | "small";
|
|
8
|
+
declare function RadioGroupRoot({ className, ...props }: ComponentProps<typeof RadioGroup$1>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function RadioGroupItem({ className, size, style, ...props }: ComponentProps<typeof Radio.Root> & {
|
|
10
|
+
size?: RadioSize;
|
|
11
|
+
}): react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare function RadioGroupIndicator({ className, ...props }: ComponentProps<typeof Radio.Indicator>): react_jsx_runtime.JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Single-selection radio group. Compose with `RadioGroup.Item` and `RadioGroup.Indicator`.
|
|
15
|
+
*/
|
|
16
|
+
declare const RadioGroup: typeof RadioGroupRoot & {
|
|
17
|
+
displayName: "RadioGroup";
|
|
18
|
+
Item: typeof RadioGroupItem;
|
|
19
|
+
Indicator: typeof RadioGroupIndicator;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { RadioGroup };
|
|
23
|
+
export type { RadioSize };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { radio } from '../../ecosystem/codegen/generated/radio.mjs';
|
|
2
|
+
import { cn } from '../../cn.mjs';
|
|
3
|
+
import styles from './radio-group.module.css.mjs';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group';
|
|
6
|
+
import { Radio } from '@base-ui/react/radio';
|
|
7
|
+
|
|
8
|
+
function RadioGroupRoot({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /*#__PURE__*/jsx(RadioGroup$1, {
|
|
13
|
+
className: cn(styles.root, className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function RadioGroupItem({
|
|
18
|
+
className,
|
|
19
|
+
size = "medium",
|
|
20
|
+
style,
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
return /*#__PURE__*/jsx(Radio.Root, {
|
|
24
|
+
className: cn(radio({
|
|
25
|
+
size
|
|
26
|
+
}), styles.item, className),
|
|
27
|
+
style: style,
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function RadioGroupIndicator({
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}) {
|
|
35
|
+
return /*#__PURE__*/jsx(Radio.Indicator, {
|
|
36
|
+
className: cn(styles.indicator, className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Single-selection radio group. Compose with `RadioGroup.Item` and `RadioGroup.Indicator`.
|
|
43
|
+
*/
|
|
44
|
+
const RadioGroup = Object.assign(RadioGroupRoot, {
|
|
45
|
+
displayName: "RadioGroup",
|
|
46
|
+
Item: RadioGroupItem,
|
|
47
|
+
Indicator: RadioGroupIndicator
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export { RadioGroup };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
|
|
4
|
+
type SelectSize = "large" | "medium" | "small" | "x-small";
|
|
5
|
+
interface SelectProps extends Omit<ComponentProps<"select">, "size"> {
|
|
6
|
+
description?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
error?: boolean | string;
|
|
9
|
+
label?: string;
|
|
10
|
+
size?: SelectSize;
|
|
11
|
+
stretch?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Dropdown select component wrapping native select. */
|
|
14
|
+
declare function Select({ ref, className, style: _style, size, disabled, error, stretch, label, description, id: _id, children, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { Select };
|
|
17
|
+
export type { SelectProps, SelectSize };
|