@arolariu/components 0.4.2 → 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/{changelog.md → CHANGELOG.md} +36 -0
- package/CONTRIBUTING.md +344 -265
- package/DEBUGGING.md +185 -103
- package/EXAMPLES.md +470 -345
- package/{readme.md → README.md} +306 -203
- package/dist/components/ui/accordion.d.ts +157 -5
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +100 -22
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/accordion.module.js +12 -0
- package/dist/components/ui/accordion.module.js.map +1 -0
- package/dist/components/ui/accordion_module.css +72 -0
- package/dist/components/ui/accordion_module.css.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +321 -18
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +145 -52
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert-dialog.module.js +13 -0
- package/dist/components/ui/alert-dialog.module.js.map +1 -0
- package/dist/components/ui/alert-dialog_module.css +89 -0
- package/dist/components/ui/alert-dialog_module.css.map +1 -0
- package/dist/components/ui/alert.d.ts +109 -6
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +12 -21
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/alert.module.js +11 -0
- package/dist/components/ui/alert.module.js.map +1 -0
- package/dist/components/ui/alert_module.css +59 -0
- package/dist/components/ui/alert_module.css.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +24 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +14 -3
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/aspect-ratio.module.js +7 -0
- package/dist/components/ui/aspect-ratio.module.js.map +1 -0
- package/dist/components/ui/aspect-ratio_module.css +10 -0
- package/dist/components/ui/aspect-ratio_module.css.map +1 -0
- package/dist/components/ui/async-boundary.js +17 -0
- package/dist/components/ui/async-boundary.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +97 -4
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +50 -21
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/avatar.module.js +9 -0
- package/dist/components/ui/avatar.module.js.map +1 -0
- package/dist/components/ui/avatar_module.css +35 -0
- package/dist/components/ui/avatar_module.css.map +1 -0
- package/dist/components/ui/background-beams.d.ts +21 -3
- package/dist/components/ui/background-beams.d.ts.map +1 -1
- package/dist/components/ui/background-beams.js +22 -11
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/background-beams.module.js +8 -0
- package/dist/components/ui/background-beams.module.js.map +1 -0
- package/dist/components/ui/background-beams_module.css +22 -0
- package/dist/components/ui/background-beams_module.css.map +1 -0
- package/dist/components/ui/badge.d.ts +79 -6
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +19 -23
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/badge.module.js +11 -0
- package/dist/components/ui/badge.module.js.map +1 -0
- package/dist/components/ui/badge_module.css +63 -0
- package/dist/components/ui/badge_module.css.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +158 -13
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +39 -30
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/breadcrumb.module.js +14 -0
- package/dist/components/ui/breadcrumb.module.js.map +1 -0
- package/dist/components/ui/breadcrumb_module.css +90 -0
- package/dist/components/ui/breadcrumb_module.css.map +1 -0
- package/dist/components/ui/bubble-background.d.ts +38 -10
- package/dist/components/ui/bubble-background.d.ts.map +1 -1
- package/dist/components/ui/bubble-background.js +33 -35
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/bubble-background.module.js +20 -0
- package/dist/components/ui/bubble-background.module.js.map +1 -0
- package/dist/components/ui/bubble-background_module.css +99 -0
- package/dist/components/ui/bubble-background_module.css.map +1 -0
- package/dist/components/ui/button-group.d.ts +88 -8
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/button-group.js +35 -32
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button-group.module.js +11 -0
- package/dist/components/ui/button-group.module.js.map +1 -0
- package/dist/components/ui/button-group_module.css +79 -0
- package/dist/components/ui/button-group_module.css.map +1 -0
- package/dist/components/ui/button.d.ts +82 -7
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +69 -34
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/button.module.js +17 -0
- package/dist/components/ui/button.module.js.map +1 -0
- package/dist/components/ui/button_module.css +137 -0
- package/dist/components/ui/button_module.css.map +1 -0
- package/dist/components/ui/calendar.d.ts +39 -5
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +72 -61
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/calendar.module.js +35 -0
- package/dist/components/ui/calendar.module.js.map +1 -0
- package/dist/components/ui/calendar_module.css +245 -0
- package/dist/components/ui/calendar_module.css.map +1 -0
- package/dist/components/ui/card-skeleton.js +41 -0
- package/dist/components/ui/card-skeleton.js.map +1 -0
- package/dist/components/ui/card-skeleton.module.js +15 -0
- package/dist/components/ui/card-skeleton.module.js.map +1 -0
- package/dist/components/ui/card-skeleton_module.css +54 -0
- package/dist/components/ui/card-skeleton_module.css.map +1 -0
- package/dist/components/ui/card.d.ts +162 -7
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +13 -13
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/card.module.js +13 -0
- package/dist/components/ui/card.module.js.map +1 -0
- package/dist/components/ui/card_module.css +43 -0
- package/dist/components/ui/card_module.css.map +1 -0
- package/dist/components/ui/carousel.d.ts +127 -3
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +63 -36
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/carousel.module.js +17 -0
- package/dist/components/ui/carousel.module.js.map +1 -0
- package/dist/components/ui/carousel_module.css +82 -0
- package/dist/components/ui/carousel_module.css.map +1 -0
- package/dist/components/ui/chart.d.ts +323 -13
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +158 -53
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/chart.module.js +27 -0
- package/dist/components/ui/chart.module.js.map +1 -0
- package/dist/components/ui/chart_module.css +159 -0
- package/dist/components/ui/chart_module.css.map +1 -0
- package/dist/components/ui/checkbox-group.d.ts +31 -0
- package/dist/components/ui/checkbox-group.d.ts.map +1 -0
- package/dist/components/ui/checkbox-group.js +25 -0
- package/dist/components/ui/checkbox-group.js.map +1 -0
- package/dist/components/ui/checkbox-group.module.js +7 -0
- package/dist/components/ui/checkbox-group.module.js.map +1 -0
- package/dist/components/ui/checkbox-group_module.css +11 -0
- package/dist/components/ui/checkbox-group_module.css.map +1 -0
- package/dist/components/ui/checkbox.d.ts +33 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +37 -12
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/checkbox.module.js +8 -0
- package/dist/components/ui/checkbox.module.js.map +1 -0
- package/dist/components/ui/checkbox_module.css +45 -0
- package/dist/components/ui/checkbox_module.css.map +1 -0
- package/dist/components/ui/collapsible.d.ts +87 -3
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +46 -32
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/collapsible.module.js +8 -0
- package/dist/components/ui/collapsible.module.js.map +1 -0
- package/dist/components/ui/collapsible_module.css +26 -0
- package/dist/components/ui/collapsible_module.css.map +1 -0
- package/dist/components/ui/command.d.ts +284 -51
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +391 -50
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/command.module.js +20 -0
- package/dist/components/ui/command.module.js.map +1 -0
- package/dist/components/ui/command_module.css +194 -0
- package/dist/components/ui/command_module.css.map +1 -0
- package/dist/components/ui/context-menu.d.ts +414 -21
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +190 -68
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/context-menu.module.js +19 -0
- package/dist/components/ui/context-menu.module.js.map +1 -0
- package/dist/components/ui/context-menu_module.css +114 -0
- package/dist/components/ui/context-menu_module.css.map +1 -0
- package/dist/components/ui/copy-button.d.ts +41 -0
- package/dist/components/ui/copy-button.d.ts.map +1 -0
- package/dist/components/ui/copy-button.js +51 -0
- package/dist/components/ui/copy-button.js.map +1 -0
- package/dist/components/ui/copy-button.module.js +8 -0
- package/dist/components/ui/copy-button.module.js.map +1 -0
- package/dist/components/ui/copy-button_module.css +37 -0
- package/dist/components/ui/copy-button_module.css.map +1 -0
- package/dist/components/ui/counting-number.d.ts +28 -2
- package/dist/components/ui/counting-number.d.ts.map +1 -1
- package/dist/components/ui/counting-number.js +31 -27
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/counting-number.module.js +7 -0
- package/dist/components/ui/counting-number.module.js.map +1 -0
- package/dist/components/ui/counting-number_module.css +7 -0
- package/dist/components/ui/counting-number_module.css.map +1 -0
- package/dist/components/ui/dialog.d.ts +287 -17
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +129 -52
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dialog.module.js +13 -0
- package/dist/components/ui/dialog.module.js.map +1 -0
- package/dist/components/ui/dialog_module.css +114 -0
- package/dist/components/ui/dialog_module.css.map +1 -0
- package/dist/components/ui/dot-background.d.ts +25 -35
- package/dist/components/ui/dot-background.d.ts.map +1 -1
- package/dist/components/ui/dot-background.js +31 -22
- package/dist/components/ui/dot-background.js.map +1 -1
- package/dist/components/ui/dot-background.module.js +8 -0
- package/dist/components/ui/dot-background.module.js.map +1 -0
- package/dist/components/ui/dot-background_module.css +15 -0
- package/dist/components/ui/dot-background_module.css.map +1 -0
- package/dist/components/ui/drawer.d.ts +287 -18
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +117 -40
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/drawer.module.js +14 -0
- package/dist/components/ui/drawer.module.js.map +1 -0
- package/dist/components/ui/drawer_module.css +86 -0
- package/dist/components/ui/drawer_module.css.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +414 -21
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +189 -68
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu.module.js +19 -0
- package/dist/components/ui/dropdown-menu.module.js.map +1 -0
- package/dist/components/ui/dropdown-menu_module.css +114 -0
- package/dist/components/ui/dropdown-menu_module.css.map +1 -0
- package/dist/components/ui/dropdrawer.d.ts +313 -17
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +423 -159
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/dropdrawer.module.js +43 -0
- package/dist/components/ui/dropdrawer.module.js.map +1 -0
- package/dist/components/ui/dropdrawer_module.css +307 -0
- package/dist/components/ui/dropdrawer_module.css.map +1 -0
- package/dist/components/ui/empty.d.ts +129 -10
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +32 -47
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/empty.module.js +13 -0
- package/dist/components/ui/empty.module.js.map +1 -0
- package/dist/components/ui/empty_module.css +85 -0
- package/dist/components/ui/empty_module.css.map +1 -0
- package/dist/components/ui/error-boundary.js +61 -0
- package/dist/components/ui/error-boundary.js.map +1 -0
- package/dist/components/ui/error-boundary.module.js +10 -0
- package/dist/components/ui/error-boundary.module.js.map +1 -0
- package/dist/components/ui/error-boundary_module.css +41 -0
- package/dist/components/ui/error-boundary_module.css.map +1 -0
- package/dist/components/ui/field.d.ts +225 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +76 -86
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/field.module.js +24 -0
- package/dist/components/ui/field.module.js.map +1 -0
- package/dist/components/ui/field_module.css +185 -0
- package/dist/components/ui/field_module.css.map +1 -0
- package/dist/components/ui/fireworks-background.d.ts +27 -3
- package/dist/components/ui/fireworks-background.d.ts.map +1 -1
- package/dist/components/ui/fireworks-background.js +36 -35
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/fireworks-background.module.js +8 -0
- package/dist/components/ui/fireworks-background.module.js.map +1 -0
- package/dist/components/ui/fireworks-background_module.css +17 -0
- package/dist/components/ui/fireworks-background_module.css.map +1 -0
- package/dist/components/ui/flip-button.d.ts +27 -3
- package/dist/components/ui/flip-button.d.ts.map +1 -1
- package/dist/components/ui/flip-button.js +27 -17
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/flip-button.module.js +11 -0
- package/dist/components/ui/flip-button.module.js.map +1 -0
- package/dist/components/ui/flip-button_module.css +47 -0
- package/dist/components/ui/flip-button_module.css.map +1 -0
- package/dist/components/ui/focus-scope.js +70 -0
- package/dist/components/ui/focus-scope.js.map +1 -0
- package/dist/components/ui/focus-scope.module.js +7 -0
- package/dist/components/ui/focus-scope.module.js.map +1 -0
- package/dist/components/ui/focus-scope_module.css +6 -0
- package/dist/components/ui/focus-scope_module.css.map +1 -0
- package/dist/components/ui/form-skeleton.js +32 -0
- package/dist/components/ui/form-skeleton.js.map +1 -0
- package/dist/components/ui/form-skeleton.module.js +11 -0
- package/dist/components/ui/form-skeleton.module.js.map +1 -0
- package/dist/components/ui/form-skeleton_module.css +30 -0
- package/dist/components/ui/form-skeleton_module.css.map +1 -0
- package/dist/components/ui/form.d.ts +143 -13
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +55 -21
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/form.module.js +10 -0
- package/dist/components/ui/form.module.js.map +1 -0
- package/dist/components/ui/form_module.css +22 -0
- package/dist/components/ui/form_module.css.map +1 -0
- package/dist/components/ui/gradient-background.d.ts +21 -3
- package/dist/components/ui/gradient-background.d.ts.map +1 -1
- package/dist/components/ui/gradient-background.js +8 -4
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-background.module.js +7 -0
- package/dist/components/ui/gradient-background.module.js.map +1 -0
- package/dist/components/ui/gradient-background_module.css +9 -0
- package/dist/components/ui/gradient-background_module.css.map +1 -0
- package/dist/components/ui/gradient-text.d.ts +23 -2
- package/dist/components/ui/gradient-text.d.ts.map +1 -1
- package/dist/components/ui/gradient-text.js +8 -6
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/gradient-text.module.js +9 -0
- package/dist/components/ui/gradient-text.module.js.map +1 -0
- package/dist/components/ui/gradient-text_module.css +24 -0
- package/dist/components/ui/gradient-text_module.css.map +1 -0
- package/dist/components/ui/highlight-text.d.ts +24 -2
- package/dist/components/ui/highlight-text.d.ts.map +1 -1
- package/dist/components/ui/highlight-text.js +7 -10
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/highlight-text.module.js +7 -0
- package/dist/components/ui/highlight-text.module.js.map +1 -0
- package/dist/components/ui/highlight-text_module.css +16 -0
- package/dist/components/ui/highlight-text_module.css.map +1 -0
- package/dist/components/ui/hole-background.d.ts +23 -2
- package/dist/components/ui/hole-background.d.ts.map +1 -1
- package/dist/components/ui/hole-background.js +155 -118
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hole-background.module.js +10 -0
- package/dist/components/ui/hole-background.module.js.map +1 -0
- package/dist/components/ui/hole-background_module.css +85 -0
- package/dist/components/ui/hole-background_module.css.map +1 -0
- package/dist/components/ui/hover-card.d.ts +85 -4
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +52 -10
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/hover-card.module.js +8 -0
- package/dist/components/ui/hover-card.module.js.map +1 -0
- package/dist/components/ui/hover-card_module.css +23 -0
- package/dist/components/ui/hover-card_module.css.map +1 -0
- package/dist/components/ui/input-group.d.ts +132 -13
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js +62 -66
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-group.module.js +20 -0
- package/dist/components/ui/input-group.module.js.map +1 -0
- package/dist/components/ui/input-group_module.css +150 -0
- package/dist/components/ui/input-group_module.css.map +1 -0
- package/dist/components/ui/input-otp.d.ts +110 -30
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +24 -15
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input-otp.module.js +17 -0
- package/dist/components/ui/input-otp.module.js.map +1 -0
- package/dist/components/ui/input-otp_module.css +89 -0
- package/dist/components/ui/input-otp_module.css.map +1 -0
- package/dist/components/ui/input.d.ts +31 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +21 -8
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/input.module.js +7 -0
- package/dist/components/ui/input.module.js.map +1 -0
- package/dist/components/ui/input_module.css +40 -0
- package/dist/components/ui/input_module.css.map +1 -0
- package/dist/components/ui/item.d.ts +221 -19
- package/dist/components/ui/item.d.ts.map +1 -1
- package/dist/components/ui/item.js +66 -90
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/item.module.js +22 -0
- package/dist/components/ui/item.module.js.map +1 -0
- package/dist/components/ui/item_module.css +143 -0
- package/dist/components/ui/item_module.css.map +1 -0
- package/dist/components/ui/kbd.d.ts +43 -2
- package/dist/components/ui/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd.js +12 -12
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/kbd.module.js +8 -0
- package/dist/components/ui/kbd.module.js.map +1 -0
- package/dist/components/ui/kbd_module.css +35 -0
- package/dist/components/ui/kbd_module.css.map +1 -0
- package/dist/components/ui/label.d.ts +30 -3
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +7 -8
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/label.module.js +7 -0
- package/dist/components/ui/label.module.js.map +1 -0
- package/dist/components/ui/label_module.css +17 -0
- package/dist/components/ui/label_module.css.map +1 -0
- package/dist/components/ui/list-skeleton.js +35 -0
- package/dist/components/ui/list-skeleton.js.map +1 -0
- package/dist/components/ui/list-skeleton.module.js +12 -0
- package/dist/components/ui/list-skeleton.module.js.map +1 -0
- package/dist/components/ui/list-skeleton_module.css +39 -0
- package/dist/components/ui/list-skeleton_module.css.map +1 -0
- package/dist/components/ui/loading-overlay.js +21 -0
- package/dist/components/ui/loading-overlay.js.map +1 -0
- package/dist/components/ui/loading-overlay.module.js +9 -0
- package/dist/components/ui/loading-overlay.module.js.map +1 -0
- package/dist/components/ui/loading-overlay_module.css +22 -0
- package/dist/components/ui/loading-overlay_module.css.map +1 -0
- package/dist/components/ui/menubar.d.ts +422 -22
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +199 -100
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/menubar.module.js +21 -0
- package/dist/components/ui/menubar.module.js.map +1 -0
- package/dist/components/ui/menubar_module.css +145 -0
- package/dist/components/ui/menubar_module.css.map +1 -0
- package/dist/components/ui/meter.d.ts +101 -0
- package/dist/components/ui/meter.d.ts.map +1 -0
- package/dist/components/ui/meter.js +71 -0
- package/dist/components/ui/meter.js.map +1 -0
- package/dist/components/ui/meter.module.js +10 -0
- package/dist/components/ui/meter.module.js.map +1 -0
- package/dist/components/ui/meter_module.css +31 -0
- package/dist/components/ui/meter_module.css.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +242 -11
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +135 -49
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/navigation-menu.module.js +18 -0
- package/dist/components/ui/navigation-menu.module.js.map +1 -0
- package/dist/components/ui/navigation-menu_module.css +112 -0
- package/dist/components/ui/navigation-menu_module.css.map +1 -0
- package/dist/components/ui/number-field.d.ts +144 -0
- package/dist/components/ui/number-field.d.ts.map +1 -0
- package/dist/components/ui/number-field.js +111 -0
- package/dist/components/ui/number-field.js.map +1 -0
- package/dist/components/ui/number-field.module.js +15 -0
- package/dist/components/ui/number-field.module.js.map +1 -0
- package/dist/components/ui/number-field_module.css +125 -0
- package/dist/components/ui/number-field_module.css.map +1 -0
- package/dist/components/ui/pagination.d.ts +150 -24
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +41 -38
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/pagination.module.js +14 -0
- package/dist/components/ui/pagination.module.js.map +1 -0
- package/dist/components/ui/pagination_module.css +66 -0
- package/dist/components/ui/pagination_module.css.map +1 -0
- package/dist/components/ui/popover.d.ts +133 -5
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +68 -14
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/popover.module.js +9 -0
- package/dist/components/ui/popover.module.js.map +1 -0
- package/dist/components/ui/popover_module.css +28 -0
- package/dist/components/ui/popover_module.css.map +1 -0
- package/dist/components/ui/progress.d.ts +34 -2
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +22 -14
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/progress.module.js +8 -0
- package/dist/components/ui/progress.module.js.map +1 -0
- package/dist/components/ui/progress_module.css +20 -0
- package/dist/components/ui/progress_module.css.map +1 -0
- package/dist/components/ui/radio-group.d.ts +44 -3
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +38 -16
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/radio-group.module.js +10 -0
- package/dist/components/ui/radio-group.module.js.map +1 -0
- package/dist/components/ui/radio-group_module.css +44 -0
- package/dist/components/ui/radio-group_module.css.map +1 -0
- package/dist/components/ui/resizable.d.ts +79 -6
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +23 -13
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/resizable.module.js +10 -0
- package/dist/components/ui/resizable.module.js.map +1 -0
- package/dist/components/ui/resizable_module.css +70 -0
- package/dist/components/ui/resizable_module.css.map +1 -0
- package/dist/components/ui/ripple-button.d.ts +23 -2
- package/dist/components/ui/ripple-button.d.ts.map +1 -1
- package/dist/components/ui/ripple-button.js +26 -11
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/ripple-button.module.js +9 -0
- package/dist/components/ui/ripple-button.module.js.map +1 -0
- package/dist/components/ui/ripple-button_module.css +38 -0
- package/dist/components/ui/ripple-button_module.css.map +1 -0
- package/dist/components/ui/scratcher.d.ts +25 -2
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +85 -87
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scratcher.module.js +8 -0
- package/dist/components/ui/scratcher.module.js.map +1 -0
- package/dist/components/ui/scratcher_module.css +13 -0
- package/dist/components/ui/scratcher_module.css.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +46 -3
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +44 -19
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/scroll-area.module.js +14 -0
- package/dist/components/ui/scroll-area.module.js.map +1 -0
- package/dist/components/ui/scroll-area_module.css +51 -0
- package/dist/components/ui/scroll-area_module.css.map +1 -0
- package/dist/components/ui/select.d.ts +269 -11
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +152 -67
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/select.module.js +20 -0
- package/dist/components/ui/select.module.js.map +1 -0
- package/dist/components/ui/select_module.css +134 -0
- package/dist/components/ui/select_module.css.map +1 -0
- package/dist/components/ui/separator.d.ts +36 -2
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +20 -10
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/separator.module.js +9 -0
- package/dist/components/ui/separator.module.js.map +1 -0
- package/dist/components/ui/separator_module.css +17 -0
- package/dist/components/ui/separator_module.css.map +1 -0
- package/dist/components/ui/sheet.d.ts +297 -23
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +121 -63
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sheet.module.js +18 -0
- package/dist/components/ui/sheet.module.js.map +1 -0
- package/dist/components/ui/sheet_module.css +136 -0
- package/dist/components/ui/sheet_module.css.map +1 -0
- package/dist/components/ui/sidebar.d.ts +491 -23
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +214 -143
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/sidebar.module.js +50 -0
- package/dist/components/ui/sidebar.module.js.map +1 -0
- package/dist/components/ui/sidebar_module.css +569 -0
- package/dist/components/ui/sidebar_module.css.map +1 -0
- package/dist/components/ui/skeleton.d.ts +30 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +7 -7
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/skeleton.module.js +8 -0
- package/dist/components/ui/skeleton.module.js.map +1 -0
- package/dist/components/ui/skeleton_module.css +18 -0
- package/dist/components/ui/skeleton_module.css.map +1 -0
- package/dist/components/ui/slider.d.ts +48 -2
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +44 -17
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/slider.module.js +11 -0
- package/dist/components/ui/slider.module.js.map +1 -0
- package/dist/components/ui/slider_module.css +55 -0
- package/dist/components/ui/slider_module.css.map +1 -0
- package/dist/components/ui/sonner.d.ts +137 -4
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +450 -18
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/sonner.module.js +34 -0
- package/dist/components/ui/sonner.module.js.map +1 -0
- package/dist/components/ui/sonner_module.css +233 -0
- package/dist/components/ui/sonner_module.css.map +1 -0
- package/dist/components/ui/spinner.d.ts +20 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +29 -11
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/spinner.module.js +10 -0
- package/dist/components/ui/spinner.module.js.map +1 -0
- package/dist/components/ui/spinner_module.css +28 -0
- package/dist/components/ui/spinner_module.css.map +1 -0
- package/dist/components/ui/stepper.d.ts +48 -0
- package/dist/components/ui/stepper.d.ts.map +1 -0
- package/dist/components/ui/stepper.js +41 -0
- package/dist/components/ui/stepper.js.map +1 -0
- package/dist/components/ui/stepper.module.js +12 -0
- package/dist/components/ui/stepper.module.js.map +1 -0
- package/dist/components/ui/stepper_module.css +75 -0
- package/dist/components/ui/stepper_module.css.map +1 -0
- package/dist/components/ui/switch.d.ts +29 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +21 -9
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/switch.module.js +8 -0
- package/dist/components/ui/switch.module.js.map +1 -0
- package/dist/components/ui/switch_module.css +45 -0
- package/dist/components/ui/switch_module.css.map +1 -0
- package/dist/components/ui/table-skeleton.js +34 -0
- package/dist/components/ui/table-skeleton.js.map +1 -0
- package/dist/components/ui/table-skeleton.module.js +11 -0
- package/dist/components/ui/table-skeleton.module.js.map +1 -0
- package/dist/components/ui/table-skeleton_module.css +32 -0
- package/dist/components/ui/table-skeleton_module.css.map +1 -0
- package/dist/components/ui/table.d.ts +170 -8
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +17 -17
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/table.module.js +15 -0
- package/dist/components/ui/table.module.js.map +1 -0
- package/dist/components/ui/table_module.css +71 -0
- package/dist/components/ui/table_module.css.map +1 -0
- package/dist/components/ui/tabs.d.ts +114 -5
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +71 -20
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/tabs.module.js +10 -0
- package/dist/components/ui/tabs.module.js.map +1 -0
- package/dist/components/ui/tabs_module.css +89 -0
- package/dist/components/ui/tabs_module.css.map +1 -0
- package/dist/components/ui/textarea.d.ts +24 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/textarea.module.js +7 -0
- package/dist/components/ui/textarea.module.js.map +1 -0
- package/dist/components/ui/textarea_module.css +33 -0
- package/dist/components/ui/textarea_module.css.map +1 -0
- package/dist/components/ui/timeline.d.ts +111 -0
- package/dist/components/ui/timeline.d.ts.map +1 -0
- package/dist/components/ui/timeline.js +34 -0
- package/dist/components/ui/timeline.js.map +1 -0
- package/dist/components/ui/timeline.module.js +10 -0
- package/dist/components/ui/timeline.module.js.map +1 -0
- package/dist/components/ui/timeline_module.css +47 -0
- package/dist/components/ui/timeline_module.css.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +81 -10
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +32 -23
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle-group.module.js +7 -0
- package/dist/components/ui/toggle-group.module.js.map +1 -0
- package/dist/components/ui/toggle-group_module.css +8 -0
- package/dist/components/ui/toggle-group_module.css.map +1 -0
- package/dist/components/ui/toggle.d.ts +60 -11
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +29 -29
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/toggle.module.js +12 -0
- package/dist/components/ui/toggle.module.js.map +1 -0
- package/dist/components/ui/toggle_module.css +62 -0
- package/dist/components/ui/toggle_module.css.map +1 -0
- package/dist/components/ui/toolbar.d.ts +127 -0
- package/dist/components/ui/toolbar.d.ts.map +1 -0
- package/dist/components/ui/toolbar.js +85 -0
- package/dist/components/ui/toolbar.js.map +1 -0
- package/dist/components/ui/toolbar.module.js +12 -0
- package/dist/components/ui/toolbar.module.js.map +1 -0
- package/dist/components/ui/toolbar_module.css +115 -0
- package/dist/components/ui/toolbar_module.css.map +1 -0
- package/dist/components/ui/tooltip.d.ts +119 -5
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +48 -13
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/tooltip.module.js +9 -0
- package/dist/components/ui/tooltip.module.js.map +1 -0
- package/dist/components/ui/tooltip_module.css +35 -0
- package/dist/components/ui/tooltip_module.css.map +1 -0
- package/dist/components/ui/typewriter.d.ts +48 -13
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +46 -49
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/components/ui/typewriter.module.js +16 -0
- package/dist/components/ui/typewriter.module.js.map +1 -0
- package/dist/components/ui/typewriter_module.css +102 -0
- package/dist/components/ui/typewriter_module.css.map +1 -0
- package/dist/components/ui/visually-hidden.d.ts +38 -0
- package/dist/components/ui/visually-hidden.d.ts.map +1 -0
- package/dist/components/ui/visually-hidden.js +13 -0
- package/dist/components/ui/visually-hidden.js.map +1 -0
- package/dist/components/ui/visually-hidden.module.js +7 -0
- package/dist/components/ui/visually-hidden.module.js.map +1 -0
- package/dist/components/ui/visually-hidden_module.css +14 -0
- package/dist/components/ui/visually-hidden_module.css.map +1 -0
- package/dist/hooks/useAnnounce.js +46 -0
- package/dist/hooks/useAnnounce.js.map +1 -0
- package/dist/hooks/useBreakpoint.d.ts +17 -0
- package/dist/hooks/useBreakpoint.d.ts.map +1 -0
- package/dist/hooks/useBreakpoint.js +16 -0
- package/dist/hooks/useBreakpoint.js.map +1 -0
- package/dist/hooks/useColorScheme.d.ts +14 -0
- package/dist/hooks/useColorScheme.d.ts.map +1 -0
- package/dist/hooks/useColorScheme.js +9 -0
- package/dist/hooks/useColorScheme.js.map +1 -0
- package/dist/hooks/useFocusManager.js +51 -0
- package/dist/hooks/useFocusManager.js.map +1 -0
- package/dist/hooks/useFocusVisible.d.ts +50 -0
- package/dist/hooks/useFocusVisible.d.ts.map +1 -0
- package/dist/hooks/useFocusVisible.js +35 -0
- package/dist/hooks/useFocusVisible.js.map +1 -0
- package/dist/hooks/useIsMobile.d.ts +5 -11
- package/dist/hooks/useIsMobile.d.ts.map +1 -1
- package/dist/hooks/useIsMobile.js +2 -13
- package/dist/hooks/useIsMobile.js.map +1 -1
- package/dist/hooks/useMediaQuery.d.ts +14 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.js +20 -0
- package/dist/hooks/useMediaQuery.js.map +1 -0
- package/dist/hooks/usePrefersContrast.d.ts +19 -0
- package/dist/hooks/usePrefersContrast.d.ts.map +1 -0
- package/dist/hooks/usePrefersContrast.js +8 -0
- package/dist/hooks/usePrefersContrast.js.map +1 -0
- package/dist/hooks/useReducedMotion.d.ts +19 -0
- package/dist/hooks/useReducedMotion.d.ts.map +1 -0
- package/dist/hooks/useReducedMotion.js +2 -0
- package/dist/index.css +104 -5355
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +40 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +89 -70
- package/dist/lib/color-conversion-utilities.d.ts +82 -0
- package/dist/lib/color-conversion-utilities.d.ts.map +1 -0
- package/dist/lib/color-conversion-utilities.js +94 -0
- package/dist/lib/color-conversion-utilities.js.map +1 -0
- package/dist/lib/utilities.d.ts +5 -4
- package/dist/lib/utilities.d.ts.map +1 -1
- package/dist/lib/utilities.js +1 -2
- package/dist/lib/utilities.js.map +1 -1
- package/dist/motion/Collapse.js +19 -0
- package/dist/motion/Collapse.js.map +1 -0
- package/dist/motion/Collapse.module.js +8 -0
- package/dist/motion/Collapse.module.js.map +1 -0
- package/dist/motion/Collapse_module.css +25 -0
- package/dist/motion/Collapse_module.css.map +1 -0
- package/dist/motion/Presence.js +14 -0
- package/dist/motion/Presence.js.map +1 -0
- package/dist/motion/index.js +5 -0
- package/dist/motion/presets.js +117 -0
- package/dist/motion/presets.js.map +1 -0
- package/dist/motion/tokens.js +41 -0
- package/dist/motion/tokens.js.map +1 -0
- package/package.json +159 -65
- package/src/components/ui/accordion.module.css +70 -0
- package/src/components/ui/accordion.tsx +278 -44
- package/src/components/ui/alert-dialog.module.css +87 -0
- package/src/components/ui/alert-dialog.tsx +474 -99
- package/src/components/ui/alert.module.css +57 -0
- package/src/components/ui/alert.tsx +136 -43
- package/src/components/ui/aspect-ratio.module.css +7 -0
- package/src/components/ui/aspect-ratio.tsx +38 -3
- package/src/components/ui/async-boundary.tsx +56 -0
- package/src/components/ui/avatar.module.css +31 -0
- package/src/components/ui/avatar.tsx +146 -36
- package/src/components/ui/background-beams.module.css +20 -0
- package/src/components/ui/background-beams.tsx +173 -134
- package/src/components/ui/badge.module.css +60 -0
- package/src/components/ui/badge.tsx +100 -32
- package/src/components/ui/breadcrumb.module.css +87 -0
- package/src/components/ui/breadcrumb.tsx +256 -74
- package/src/components/ui/bubble-background.module.css +97 -0
- package/src/components/ui/bubble-background.tsx +92 -52
- package/src/components/ui/button-group.module.css +76 -0
- package/src/components/ui/button-group.tsx +135 -46
- package/src/components/ui/button.module.css +138 -0
- package/src/components/ui/button.tsx +159 -41
- package/src/components/ui/calendar.module.css +250 -0
- package/src/components/ui/calendar.tsx +133 -103
- package/src/components/ui/card-skeleton.module.css +50 -0
- package/src/components/ui/card-skeleton.tsx +69 -0
- package/src/components/ui/card.module.css +41 -0
- package/src/components/ui/card.tsx +175 -22
- package/src/components/ui/carousel.module.css +80 -0
- package/src/components/ui/carousel.tsx +184 -43
- package/src/components/ui/chart.module.css +164 -0
- package/src/components/ui/chart.tsx +444 -102
- package/src/components/ui/checkbox-group.module.css +8 -0
- package/src/components/ui/checkbox-group.tsx +54 -0
- package/src/components/ui/checkbox.module.css +43 -0
- package/src/components/ui/checkbox.tsx +73 -19
- package/src/components/ui/collapsible.module.css +24 -0
- package/src/components/ui/collapsible.tsx +139 -3
- package/src/components/ui/command.module.css +193 -0
- package/src/components/ui/command.tsx +877 -113
- package/src/components/ui/context-menu.module.css +113 -0
- package/src/components/ui/context-menu.tsx +616 -157
- package/src/components/ui/copy-button.module.css +34 -0
- package/src/components/ui/copy-button.tsx +116 -0
- package/src/components/ui/counting-number.module.css +4 -0
- package/src/components/ui/counting-number.tsx +69 -31
- package/src/components/ui/dialog.module.css +113 -0
- package/src/components/ui/dialog.tsx +427 -81
- package/src/components/ui/dot-background.module.css +12 -0
- package/src/components/ui/dot-background.tsx +134 -126
- package/src/components/ui/drawer.module.css +85 -0
- package/src/components/ui/drawer.tsx +408 -80
- package/src/components/ui/dropdown-menu.module.css +113 -0
- package/src/components/ui/dropdown-menu.tsx +616 -159
- package/src/components/ui/dropdrawer.module.css +322 -0
- package/src/components/ui/dropdrawer.tsx +850 -398
- package/src/components/ui/empty.module.css +84 -0
- package/src/components/ui/empty.tsx +176 -52
- package/src/components/ui/error-boundary.module.css +36 -0
- package/src/components/ui/error-boundary.tsx +127 -0
- package/src/components/ui/field.module.css +179 -0
- package/src/components/ui/field.tsx +345 -139
- package/src/components/ui/fireworks-background.module.css +13 -0
- package/src/components/ui/fireworks-background.tsx +89 -51
- package/src/components/ui/flip-button.module.css +44 -0
- package/src/components/ui/flip-button.tsx +59 -28
- package/src/components/ui/focus-scope.module.css +3 -0
- package/src/components/ui/focus-scope.tsx +160 -0
- package/src/components/ui/form-skeleton.module.css +28 -0
- package/src/components/ui/form-skeleton.tsx +62 -0
- package/src/components/ui/form.module.css +20 -0
- package/src/components/ui/form.tsx +244 -33
- package/src/components/ui/gradient-background.module.css +6 -0
- package/src/components/ui/gradient-background.tsx +27 -5
- package/src/components/ui/gradient-text.module.css +23 -0
- package/src/components/ui/gradient-text.tsx +36 -9
- package/src/components/ui/highlight-text.module.css +14 -0
- package/src/components/ui/highlight-text.tsx +37 -15
- package/src/components/ui/hole-background.module.css +84 -0
- package/src/components/ui/hole-background.tsx +290 -162
- package/src/components/ui/hover-card.module.css +21 -0
- package/src/components/ui/hover-card.tsx +142 -21
- package/src/components/ui/input-group.module.css +148 -0
- package/src/components/ui/input-group.tsx +222 -98
- package/src/components/ui/input-otp.module.css +92 -0
- package/src/components/ui/input-otp.tsx +159 -33
- package/src/components/ui/input.module.css +37 -0
- package/src/components/ui/input.tsx +56 -14
- package/src/components/ui/item.module.css +143 -0
- package/src/components/ui/item.tsx +331 -104
- package/src/components/ui/kbd.module.css +31 -0
- package/src/components/ui/kbd.tsx +60 -17
- package/src/components/ui/label.module.css +13 -0
- package/src/components/ui/label.tsx +38 -14
- package/src/components/ui/list-skeleton.module.css +35 -0
- package/src/components/ui/list-skeleton.tsx +70 -0
- package/src/components/ui/loading-overlay.module.css +19 -0
- package/src/components/ui/loading-overlay.tsx +72 -0
- package/src/components/ui/menubar.module.css +144 -0
- package/src/components/ui/menubar.tsx +605 -192
- package/src/components/ui/meter.module.css +32 -0
- package/src/components/ui/meter.tsx +170 -0
- package/src/components/ui/navigation-menu.module.css +110 -0
- package/src/components/ui/navigation-menu.tsx +375 -101
- package/src/components/ui/number-field.module.css +126 -0
- package/src/components/ui/number-field.tsx +254 -0
- package/src/components/ui/pagination.module.css +64 -0
- package/src/components/ui/pagination.tsx +250 -72
- package/src/components/ui/popover.module.css +26 -0
- package/src/components/ui/popover.tsx +207 -25
- package/src/components/ui/progress.module.css +15 -0
- package/src/components/ui/progress.tsx +53 -16
- package/src/components/ui/radio-group.module.css +41 -0
- package/src/components/ui/radio-group.tsx +91 -34
- package/src/components/ui/resizable.module.css +67 -0
- package/src/components/ui/resizable.tsx +106 -26
- package/src/components/ui/ripple-button.module.css +35 -0
- package/src/components/ui/ripple-button.tsx +55 -21
- package/src/components/ui/scratcher.module.css +9 -0
- package/src/components/ui/scratcher.tsx +129 -99
- package/src/components/ui/scroll-area.module.css +47 -0
- package/src/components/ui/scroll-area.tsx +96 -34
- package/src/components/ui/select.module.css +131 -0
- package/src/components/ui/select.tsx +435 -124
- package/src/components/ui/separator.module.css +14 -0
- package/src/components/ui/separator.tsx +59 -18
- package/src/components/ui/sheet.module.css +138 -0
- package/src/components/ui/sheet.tsx +424 -95
- package/src/components/ui/sidebar.module.css +594 -0
- package/src/components/ui/sidebar.tsx +899 -425
- package/src/components/ui/skeleton.module.css +14 -0
- package/src/components/ui/skeleton.tsx +39 -9
- package/src/components/ui/slider.module.css +48 -0
- package/src/components/ui/slider.tsx +89 -16
- package/src/components/ui/sonner.module.css +246 -0
- package/src/components/ui/sonner.tsx +769 -25
- package/src/components/ui/spinner.module.css +25 -0
- package/src/components/ui/spinner.tsx +51 -12
- package/src/components/ui/stepper.module.css +72 -0
- package/src/components/ui/stepper.tsx +95 -0
- package/src/components/ui/switch.module.css +42 -0
- package/src/components/ui/switch.tsx +53 -20
- package/src/components/ui/table-skeleton.module.css +29 -0
- package/src/components/ui/table-skeleton.tsx +79 -0
- package/src/components/ui/table.module.css +66 -0
- package/src/components/ui/table.tsx +235 -61
- package/src/components/ui/tabs.module.css +89 -0
- package/src/components/ui/tabs.tsx +192 -45
- package/src/components/ui/textarea.module.css +30 -0
- package/src/components/ui/textarea.tsx +30 -10
- package/src/components/ui/timeline.module.css +43 -0
- package/src/components/ui/timeline.tsx +153 -0
- package/src/components/ui/toggle-group.module.css +5 -0
- package/src/components/ui/toggle-group.tsx +116 -35
- package/src/components/ui/toggle.module.css +57 -0
- package/src/components/ui/toggle.tsx +89 -33
- package/src/components/ui/toolbar.module.css +112 -0
- package/src/components/ui/toolbar.tsx +210 -0
- package/src/components/ui/tooltip.module.css +39 -0
- package/src/components/ui/tooltip.tsx +181 -24
- package/src/components/ui/typewriter.module.css +101 -0
- package/src/components/ui/typewriter.tsx +130 -128
- package/src/components/ui/visually-hidden.module.css +11 -0
- package/src/components/ui/visually-hidden.tsx +50 -0
- package/src/css-modules.d.ts +9 -0
- package/src/hooks/useAnnounce.tsx +73 -0
- package/src/hooks/useBreakpoint.tsx +41 -0
- package/src/hooks/useColorScheme.tsx +23 -0
- package/src/hooks/useFocusManager.tsx +89 -0
- package/src/hooks/useFocusVisible.tsx +88 -0
- package/src/hooks/useIsMobile.tsx +7 -28
- package/src/hooks/useMediaQuery.tsx +34 -0
- package/src/hooks/usePrefersContrast.tsx +24 -0
- package/src/hooks/useReducedMotion.tsx +20 -0
- package/src/index.css +127 -65
- package/src/index.ts +223 -16
- package/src/lib/color-conversion-utilities.ts +165 -0
- package/src/lib/utilities.ts +7 -6
- package/src/motion/Collapse.module.css +22 -0
- package/src/motion/Collapse.tsx +52 -0
- package/src/motion/Presence.tsx +44 -0
- package/src/motion/index.ts +13 -0
- package/src/motion/presets.ts +77 -0
- package/src/motion/tokens.ts +37 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Supported layouts for {@link Field}. */
|
|
3
|
+
export type FieldOrientation = "vertical" | "horizontal" | "responsive";
|
|
4
|
+
/** Supported legend render styles for {@link FieldLegend}. */
|
|
5
|
+
export type FieldLegendVariant = "legend" | "label";
|
|
6
|
+
/** Shape of error objects accepted by {@link FieldError}. */
|
|
7
|
+
export interface FieldErrorItem {
|
|
8
|
+
/** Human-readable validation error message. @default undefined */
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Props for the {@link FieldSet} component.
|
|
13
|
+
*/
|
|
14
|
+
export type FieldSetProps = React.ComponentPropsWithoutRef<"fieldset">;
|
|
15
|
+
/**
|
|
16
|
+
* Props for the {@link FieldLegend} component.
|
|
17
|
+
*/
|
|
18
|
+
export interface FieldLegendProps extends React.ComponentPropsWithoutRef<"legend"> {
|
|
19
|
+
/** Visual treatment used for the legend content. @default "legend" */
|
|
20
|
+
variant?: FieldLegendVariant;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Props for the {@link FieldGroup} component.
|
|
24
|
+
*/
|
|
25
|
+
export type FieldGroupProps = React.ComponentPropsWithoutRef<"div">;
|
|
26
|
+
/**
|
|
27
|
+
* Props for the {@link Field} component.
|
|
28
|
+
*/
|
|
29
|
+
export interface FieldProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
30
|
+
/** Layout used to arrange labels and controls. @default "vertical" */
|
|
31
|
+
orientation?: FieldOrientation;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Props for the {@link FieldContent} component.
|
|
35
|
+
*/
|
|
36
|
+
export type FieldContentProps = React.ComponentPropsWithoutRef<"div">;
|
|
37
|
+
/**
|
|
38
|
+
* Props for the {@link FieldLabel} component.
|
|
39
|
+
*/
|
|
40
|
+
export type FieldLabelProps = React.ComponentPropsWithoutRef<"label">;
|
|
41
|
+
/**
|
|
42
|
+
* Props for the {@link FieldTitle} component.
|
|
43
|
+
*/
|
|
44
|
+
export type FieldTitleProps = React.ComponentPropsWithoutRef<"div">;
|
|
45
|
+
/**
|
|
46
|
+
* Props for the {@link FieldDescription} component.
|
|
47
|
+
*/
|
|
48
|
+
export type FieldDescriptionProps = React.ComponentPropsWithoutRef<"p">;
|
|
49
|
+
/**
|
|
50
|
+
* Props for the {@link FieldSeparator} component.
|
|
51
|
+
*/
|
|
52
|
+
export type FieldSeparatorProps = React.ComponentPropsWithoutRef<"div">;
|
|
53
|
+
/**
|
|
54
|
+
* Props for the {@link FieldError} component.
|
|
55
|
+
*/
|
|
56
|
+
export interface FieldErrorProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
57
|
+
/** Validation errors rendered when children are not provided. @default undefined */
|
|
58
|
+
errors?: Array<FieldErrorItem | undefined>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Groups related controls within a semantic fieldset.
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* - Pure CSS component (no Base UI primitive)
|
|
65
|
+
* - Renders a `<fieldset>` element
|
|
66
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* <FieldSet>
|
|
71
|
+
* <FieldLegend>Preferences</FieldLegend>
|
|
72
|
+
* </FieldSet>
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @see {@link FieldSetProps} for available props
|
|
76
|
+
*/
|
|
77
|
+
declare const FieldSet: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref"> & React.RefAttributes<HTMLFieldSetElement>>;
|
|
78
|
+
/**
|
|
79
|
+
* Labels a grouped set of controls within {@link FieldSet}.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* - Pure CSS component (no Base UI primitive)
|
|
83
|
+
* - Renders a `<legend>` element
|
|
84
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```tsx
|
|
88
|
+
* <FieldLegend variant='label'>Billing address</FieldLegend>
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @see {@link FieldLegendProps} for available props
|
|
92
|
+
*/
|
|
93
|
+
declare const FieldLegend: React.ForwardRefExoticComponent<FieldLegendProps & React.RefAttributes<HTMLLegendElement>>;
|
|
94
|
+
/**
|
|
95
|
+
* Stacks multiple field rows under a shared container.
|
|
96
|
+
*
|
|
97
|
+
* @remarks
|
|
98
|
+
* - Pure CSS component (no Base UI primitive)
|
|
99
|
+
* - Renders a `<div>` element
|
|
100
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```tsx
|
|
104
|
+
* <FieldGroup>
|
|
105
|
+
* <Field />
|
|
106
|
+
* </FieldGroup>
|
|
107
|
+
* ```
|
|
108
|
+
*
|
|
109
|
+
* @see {@link FieldGroupProps} for available props
|
|
110
|
+
*/
|
|
111
|
+
declare const FieldGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
112
|
+
/**
|
|
113
|
+
* Creates a styled field row for labels, descriptions, and controls.
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* - Pure CSS component (no Base UI primitive)
|
|
117
|
+
* - Renders a `<div>` element
|
|
118
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```tsx
|
|
122
|
+
* <Field orientation='responsive'>...</Field>
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* @see {@link FieldProps} for available props
|
|
126
|
+
*/
|
|
127
|
+
declare const Field: React.ForwardRefExoticComponent<FieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
128
|
+
/**
|
|
129
|
+
* Wraps field controls and supporting content.
|
|
130
|
+
*
|
|
131
|
+
* @remarks
|
|
132
|
+
* - Pure CSS component (no Base UI primitive)
|
|
133
|
+
* - Renders a `<div>` element
|
|
134
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```tsx
|
|
138
|
+
* <FieldContent>{control}</FieldContent>
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see {@link FieldContentProps} for available props
|
|
142
|
+
*/
|
|
143
|
+
declare const FieldContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
144
|
+
/**
|
|
145
|
+
* Renders the label associated with a form control.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* - Pure CSS component (no Base UI primitive)
|
|
149
|
+
* - Renders a `<label>` element
|
|
150
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```tsx
|
|
154
|
+
* <FieldLabel htmlFor='email'>Email</FieldLabel>
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* @see {@link FieldLabelProps} for available props
|
|
158
|
+
*/
|
|
159
|
+
declare const FieldLabel: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
160
|
+
/**
|
|
161
|
+
* Displays the leading title content for a field row.
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* - Pure CSS component (no Base UI primitive)
|
|
165
|
+
* - Renders a `<div>` element
|
|
166
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```tsx
|
|
170
|
+
* <FieldTitle>Account</FieldTitle>
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
* @see {@link FieldTitleProps} for available props
|
|
174
|
+
*/
|
|
175
|
+
declare const FieldTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
176
|
+
/**
|
|
177
|
+
* Renders supplementary descriptive text for a field.
|
|
178
|
+
*
|
|
179
|
+
* @remarks
|
|
180
|
+
* - Pure CSS component (no Base UI primitive)
|
|
181
|
+
* - Renders a `<p>` element
|
|
182
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```tsx
|
|
186
|
+
* <FieldDescription>Used for account recovery.</FieldDescription>
|
|
187
|
+
* ```
|
|
188
|
+
*
|
|
189
|
+
* @see {@link FieldDescriptionProps} for available props
|
|
190
|
+
*/
|
|
191
|
+
declare const FieldDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
192
|
+
/**
|
|
193
|
+
* Separates field sections with optional inline content.
|
|
194
|
+
*
|
|
195
|
+
* @remarks
|
|
196
|
+
* - Pure CSS component (no Base UI primitive)
|
|
197
|
+
* - Renders a `<div>` element
|
|
198
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```tsx
|
|
202
|
+
* <FieldSeparator>or</FieldSeparator>
|
|
203
|
+
* ```
|
|
204
|
+
*
|
|
205
|
+
* @see {@link FieldSeparatorProps} for available props
|
|
206
|
+
*/
|
|
207
|
+
declare const FieldSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
208
|
+
/**
|
|
209
|
+
* Presents validation feedback for a field.
|
|
210
|
+
*
|
|
211
|
+
* @remarks
|
|
212
|
+
* - Pure CSS component (no Base UI primitive)
|
|
213
|
+
* - Renders a `<div>` element when content exists
|
|
214
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```tsx
|
|
218
|
+
* <FieldError errors={[{message: "Required"}]} />
|
|
219
|
+
* ```
|
|
220
|
+
*
|
|
221
|
+
* @see {@link FieldErrorProps} for available props
|
|
222
|
+
*/
|
|
223
|
+
declare const FieldError: React.ForwardRefExoticComponent<FieldErrorProps & React.RefAttributes<HTMLDivElement>>;
|
|
224
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
225
|
+
//# sourceMappingURL=field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/ui/field.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,2CAA2C;AAC3C,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,CAAC;AAExE,8DAA8D;AAC9D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC;IAChF,sEAAsE;IACtE,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACvE,sEAAsE;IACtE,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC5E,oFAAoF;IACpF,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;CAC5C;AAgBD;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,QAAQ,0LASb,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,WAAW,4FAUhB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,UAAU,mKASf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,KAAK,mFAWV,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,YAAY,mKASjB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU,8KAWf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU,mKASf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,gBAAgB,qLASrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,cAAc,mKAYnB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU,wFAmCf,CAAC;AAaF,OAAO,EAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAC,CAAC"}
|
|
@@ -1,121 +1,100 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { useMemo } from "react";
|
|
5
|
-
import { Label } from "./label.js";
|
|
3
|
+
import { forwardRef, useMemo } from "react";
|
|
6
4
|
import { Separator } from "./separator.js";
|
|
7
5
|
import { cn } from "../../lib/utilities.js";
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import field_module from "./field.module.js";
|
|
7
|
+
function getFieldOrientationClass(orientation) {
|
|
8
|
+
switch(orientation){
|
|
9
|
+
case "horizontal":
|
|
10
|
+
return field_module.horizontal;
|
|
11
|
+
case "responsive":
|
|
12
|
+
return field_module.responsive;
|
|
13
|
+
default:
|
|
14
|
+
return field_module.vertical;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const FieldSet = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("fieldset", {
|
|
18
|
+
ref: ref,
|
|
10
19
|
"data-slot": "field-set",
|
|
11
|
-
className: cn(
|
|
20
|
+
className: cn(field_module.fieldSet, className),
|
|
12
21
|
...props
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return /*#__PURE__*/ jsx("legend", {
|
|
22
|
+
}));
|
|
23
|
+
const FieldLegend = /*#__PURE__*/ forwardRef(({ className, variant = "legend", ...props }, ref)=>/*#__PURE__*/ jsx("legend", {
|
|
24
|
+
ref: ref,
|
|
17
25
|
"data-slot": "field-legend",
|
|
18
26
|
"data-variant": variant,
|
|
19
|
-
className: cn(
|
|
27
|
+
className: cn(field_module.legend, "label" === variant ? field_module.legendLabel : field_module.legendDefault, className),
|
|
20
28
|
...props
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return /*#__PURE__*/ jsx("div", {
|
|
29
|
+
}));
|
|
30
|
+
const FieldGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
31
|
+
ref: ref,
|
|
25
32
|
"data-slot": "field-group",
|
|
26
|
-
className: cn(
|
|
33
|
+
className: cn(field_module.group, className),
|
|
27
34
|
...props
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
variants: {
|
|
32
|
-
orientation: {
|
|
33
|
-
vertical: [
|
|
34
|
-
"flex-col [&>*]:w-full [&>.sr-only]:w-auto"
|
|
35
|
-
],
|
|
36
|
-
horizontal: [
|
|
37
|
-
"flex-row items-center",
|
|
38
|
-
"[&>[data-slot=field-label]]:flex-auto",
|
|
39
|
-
"has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
|
|
40
|
-
],
|
|
41
|
-
responsive: [
|
|
42
|
-
"@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
|
|
43
|
-
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
44
|
-
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
defaultVariants: {
|
|
49
|
-
orientation: "vertical"
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
function Field({ className, orientation = "vertical", ...props }) {
|
|
53
|
-
return /*#__PURE__*/ jsx("div", {
|
|
35
|
+
}));
|
|
36
|
+
const Field = /*#__PURE__*/ forwardRef(({ className, orientation = "vertical", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
37
|
+
ref: ref,
|
|
54
38
|
role: "group",
|
|
55
39
|
"data-slot": "field",
|
|
56
40
|
"data-orientation": orientation,
|
|
57
|
-
className: cn(
|
|
58
|
-
orientation
|
|
59
|
-
}), className),
|
|
41
|
+
className: cn(field_module.field, getFieldOrientationClass(orientation), className),
|
|
60
42
|
...props
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return /*#__PURE__*/ jsx("div", {
|
|
43
|
+
}));
|
|
44
|
+
const FieldContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
45
|
+
ref: ref,
|
|
65
46
|
"data-slot": "field-content",
|
|
66
|
-
className: cn(
|
|
47
|
+
className: cn(field_module.content, className),
|
|
67
48
|
...props
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return /*#__PURE__*/ jsx(Label, {
|
|
49
|
+
}));
|
|
50
|
+
const FieldLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("label", {
|
|
51
|
+
ref: ref,
|
|
72
52
|
"data-slot": "field-label",
|
|
73
|
-
className: cn(
|
|
53
|
+
className: cn(field_module.label, className),
|
|
74
54
|
...props
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return /*#__PURE__*/ jsx("div", {
|
|
55
|
+
}));
|
|
56
|
+
const FieldTitle = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
57
|
+
ref: ref,
|
|
79
58
|
"data-slot": "field-label",
|
|
80
|
-
className: cn(
|
|
59
|
+
className: cn(field_module.title, className),
|
|
81
60
|
...props
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return /*#__PURE__*/ jsx("p", {
|
|
61
|
+
}));
|
|
62
|
+
const FieldDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("p", {
|
|
63
|
+
ref: ref,
|
|
86
64
|
"data-slot": "field-description",
|
|
87
|
-
className: cn(
|
|
65
|
+
className: cn(field_module.description, className),
|
|
88
66
|
...props
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
67
|
+
}));
|
|
68
|
+
const FieldSeparator = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsxs("div", {
|
|
69
|
+
ref: ref,
|
|
93
70
|
"data-slot": "field-separator",
|
|
94
|
-
"data-content":
|
|
95
|
-
className: cn(
|
|
71
|
+
"data-content": children ? "true" : void 0,
|
|
72
|
+
className: cn(field_module.separator, className),
|
|
96
73
|
...props,
|
|
97
74
|
children: [
|
|
98
75
|
/*#__PURE__*/ jsx(Separator, {
|
|
99
|
-
className:
|
|
76
|
+
className: field_module.separatorLine
|
|
100
77
|
}),
|
|
101
|
-
|
|
102
|
-
className:
|
|
103
|
-
"data-slot": "field-separator-content",
|
|
78
|
+
children ? /*#__PURE__*/ jsx("span", {
|
|
79
|
+
className: field_module.separatorContent,
|
|
104
80
|
children: children
|
|
105
|
-
})
|
|
81
|
+
}) : null
|
|
106
82
|
]
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function FieldError({ className, children, errors, ...props }) {
|
|
83
|
+
}));
|
|
84
|
+
const FieldError = /*#__PURE__*/ forwardRef(({ className, children, errors, ...props }, ref)=>{
|
|
110
85
|
const content = useMemo(()=>{
|
|
111
|
-
if (children) return
|
|
86
|
+
if (children) return /*#__PURE__*/ jsx("span", {
|
|
87
|
+
children: children
|
|
88
|
+
});
|
|
112
89
|
if (!errors) return null;
|
|
113
|
-
if (
|
|
90
|
+
if (1 === errors.length && errors[0]?.message) return /*#__PURE__*/ jsx("span", {
|
|
91
|
+
children: errors[0].message
|
|
92
|
+
});
|
|
114
93
|
return /*#__PURE__*/ jsx("ul", {
|
|
115
|
-
className:
|
|
116
|
-
children: errors.map((error, index)=>error?.message
|
|
94
|
+
className: field_module.errorList,
|
|
95
|
+
children: errors.map((error, index)=>error?.message ? /*#__PURE__*/ jsx("li", {
|
|
117
96
|
children: error.message
|
|
118
|
-
}, index))
|
|
97
|
+
}, index) : null)
|
|
119
98
|
});
|
|
120
99
|
}, [
|
|
121
100
|
children,
|
|
@@ -123,13 +102,24 @@ function FieldError({ className, children, errors, ...props }) {
|
|
|
123
102
|
]);
|
|
124
103
|
if (!content) return null;
|
|
125
104
|
return /*#__PURE__*/ jsx("div", {
|
|
105
|
+
ref: ref,
|
|
126
106
|
role: "alert",
|
|
127
107
|
"data-slot": "field-error",
|
|
128
|
-
className: cn(
|
|
108
|
+
className: cn(field_module.error, className),
|
|
129
109
|
...props,
|
|
130
110
|
children: content
|
|
131
111
|
});
|
|
132
|
-
}
|
|
112
|
+
});
|
|
113
|
+
FieldSet.displayName = "FieldSet";
|
|
114
|
+
FieldLegend.displayName = "FieldLegend";
|
|
115
|
+
FieldGroup.displayName = "FieldGroup";
|
|
116
|
+
Field.displayName = "Field";
|
|
117
|
+
FieldContent.displayName = "FieldContent";
|
|
118
|
+
FieldLabel.displayName = "FieldLabel";
|
|
119
|
+
FieldTitle.displayName = "FieldTitle";
|
|
120
|
+
FieldDescription.displayName = "FieldDescription";
|
|
121
|
+
FieldSeparator.displayName = "FieldSeparator";
|
|
122
|
+
FieldError.displayName = "FieldError";
|
|
133
123
|
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
|
|
134
124
|
|
|
135
125
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/field.js","sources":["../../../src/components/ui/field.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {cva, type VariantProps} from \"class-variance-authority\";\r\nimport * as React from \"react\";\r\n\r\nimport {Label} from \"@/components/ui/label\";\r\nimport {Separator} from \"@/components/ui/separator\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nfunction FieldSet({className, ...props}: React.ComponentProps<\"fieldset\">) {\r\n return (\r\n <fieldset\r\n data-slot='field-set'\r\n className={cn(\"flex flex-col gap-6\", \"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction FieldLegend({className, variant = \"legend\", ...props}: React.ComponentProps<\"legend\"> & {variant?: \"legend\" | \"label\"}) {\r\n return (\r\n <legend\r\n data-slot='field-legend'\r\n data-variant={variant}\r\n className={cn(\"mb-3 font-medium\", \"data-[variant=legend]:text-base\", \"data-[variant=label]:text-sm\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction FieldGroup({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='field-group'\r\n className={cn(\r\n \"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nconst fieldVariants = cva(\"group/field data-[invalid=true]:text-red-500 flex w-full gap-3 dark:data-[invalid=true]:text-red-900\", {\r\n variants: {\r\n orientation: {\r\n vertical: [\"flex-col [&>*]:w-full [&>.sr-only]:w-auto\"],\r\n horizontal: [\r\n \"flex-row items-center\",\r\n \"[&>[data-slot=field-label]]:flex-auto\",\r\n \"has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start\",\r\n ],\r\n responsive: [\r\n \"@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto\",\r\n \"@md/field-group:[&>[data-slot=field-label]]:flex-auto\",\r\n \"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\r\n ],\r\n },\r\n },\r\n defaultVariants: {\r\n orientation: \"vertical\",\r\n },\r\n});\r\n\r\nfunction Field({className, orientation = \"vertical\", ...props}: React.ComponentProps<\"div\"> & VariantProps<typeof fieldVariants>) {\r\n return (\r\n <div\r\n role='group'\r\n data-slot='field'\r\n data-orientation={orientation}\r\n className={cn(fieldVariants({orientation}), className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction FieldContent({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='field-content'\r\n className={cn(\"group/field-content flex flex-1 flex-col gap-1.5 leading-snug\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction FieldLabel({className, ...props}: React.ComponentProps<typeof Label>) {\r\n return (\r\n <Label\r\n data-slot='field-label'\r\n className={cn(\r\n \"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50\",\r\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4\",\r\n \"has-data-[state=checked]:border-neutral-900 has-data-[state=checked]:bg-neutral-900/5 dark:has-data-[state=checked]:border-neutral-50 dark:dark:has-data-[state=checked]:bg-neutral-50/10 dark:has-data-[state=checked]:bg-neutral-50/5 dark:has-data-[state=checked]:bg-neutral-900/10\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction FieldTitle({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='field-label'\r\n className={cn(\r\n \"flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction FieldDescription({className, ...props}: React.ComponentProps<\"p\">) {\r\n return (\r\n <p\r\n data-slot='field-description'\r\n className={cn(\r\n \"text-sm leading-normal font-normal text-neutral-500 group-has-[[data-orientation=horizontal]]/field:text-balance dark:text-neutral-400\",\r\n \"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5\",\r\n \"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-neutral-900 dark:[&>a:hover]:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction FieldSeparator({\r\n children,\r\n className,\r\n ...props\r\n}: React.ComponentProps<\"div\"> & {\r\n children?: React.ReactNode;\r\n}) {\r\n return (\r\n <div\r\n data-slot='field-separator'\r\n data-content={Boolean(children) || undefined}\r\n className={cn(\"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2\", className)}\r\n {...props}>\r\n <Separator className='absolute inset-0 top-1/2' />\r\n {Boolean(children) && (\r\n <span\r\n className='relative mx-auto block w-fit bg-white px-2 text-neutral-500 dark:bg-neutral-950 dark:text-neutral-400'\r\n data-slot='field-separator-content'>\r\n {children}\r\n </span>\r\n )}\r\n </div>\r\n );\r\n}\r\n\r\nfunction FieldError({\r\n className,\r\n children,\r\n errors,\r\n ...props\r\n}: React.ComponentProps<\"div\"> & {\r\n errors?: Array<{message?: string} | undefined>;\r\n}) {\r\n // eslint-disable-next-line sonarjs/function-return-type -- expected different return type.\r\n const content = React.useMemo(() => {\r\n if (children) {\r\n return children;\r\n }\r\n\r\n if (!errors) {\r\n return null;\r\n }\r\n\r\n if (errors?.length === 1 && errors[0]?.message) {\r\n return errors[0].message;\r\n }\r\n\r\n return (\r\n <ul className='ml-4 flex list-disc flex-col gap-1'>\r\n {errors.map((error, index) => error?.message && <li key={index}>{error.message}</li>)}\r\n </ul>\r\n );\r\n }, [children, errors]);\r\n\r\n if (!content) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n role='alert'\r\n data-slot='field-error'\r\n className={cn(\"text-sm font-normal text-red-500 dark:text-red-900\", className)}\r\n {...props}>\r\n {content}\r\n </div>\r\n );\r\n}\r\n\r\nexport {Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle};\r\n"],"names":["FieldSet","className","props","cn","FieldLegend","variant","FieldGroup","fieldVariants","cva","Field","orientation","FieldContent","FieldLabel","Label","FieldTitle","FieldDescription","FieldSeparator","children","Boolean","undefined","Separator","FieldError","errors","content","React","error","index"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"components/ui/field.js","sources":["../../../src/components/ui/field.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable jsx-a11y/label-has-associated-control */\r\n\r\nimport * as React from \"react\";\r\n\r\nimport {Separator} from \"@/components/ui/separator\";\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./field.module.css\";\r\n\r\n/** Supported layouts for {@link Field}. */\r\nexport type FieldOrientation = \"vertical\" | \"horizontal\" | \"responsive\";\r\n\r\n/** Supported legend render styles for {@link FieldLegend}. */\r\nexport type FieldLegendVariant = \"legend\" | \"label\";\r\n\r\n/** Shape of error objects accepted by {@link FieldError}. */\r\nexport interface FieldErrorItem {\r\n /** Human-readable validation error message. @default undefined */\r\n message?: string;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldSet} component.\r\n */\r\nexport type FieldSetProps = React.ComponentPropsWithoutRef<\"fieldset\">;\r\n\r\n/**\r\n * Props for the {@link FieldLegend} component.\r\n */\r\nexport interface FieldLegendProps extends React.ComponentPropsWithoutRef<\"legend\"> {\r\n /** Visual treatment used for the legend content. @default \"legend\" */\r\n variant?: FieldLegendVariant;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldGroup} component.\r\n */\r\nexport type FieldGroupProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link Field} component.\r\n */\r\nexport interface FieldProps extends React.ComponentPropsWithoutRef<\"div\"> {\r\n /** Layout used to arrange labels and controls. @default \"vertical\" */\r\n orientation?: FieldOrientation;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldContent} component.\r\n */\r\nexport type FieldContentProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldLabel} component.\r\n */\r\nexport type FieldLabelProps = React.ComponentPropsWithoutRef<\"label\">;\r\n\r\n/**\r\n * Props for the {@link FieldTitle} component.\r\n */\r\nexport type FieldTitleProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldDescription} component.\r\n */\r\nexport type FieldDescriptionProps = React.ComponentPropsWithoutRef<\"p\">;\r\n\r\n/**\r\n * Props for the {@link FieldSeparator} component.\r\n */\r\nexport type FieldSeparatorProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldError} component.\r\n */\r\nexport interface FieldErrorProps extends React.ComponentPropsWithoutRef<\"div\"> {\r\n /** Validation errors rendered when children are not provided. @default undefined */\r\n errors?: Array<FieldErrorItem | undefined>;\r\n}\r\n\r\nfunction getFieldOrientationClass(orientation: FieldOrientation): string {\r\n switch (orientation) {\r\n case \"horizontal\": {\r\n return styles.horizontal;\r\n }\r\n case \"responsive\": {\r\n return styles.responsive;\r\n }\r\n default: {\r\n return styles.vertical;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Groups related controls within a semantic fieldset.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<fieldset>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldSet>\r\n * <FieldLegend>Preferences</FieldLegend>\r\n * </FieldSet>\r\n * ```\r\n *\r\n * @see {@link FieldSetProps} for available props\r\n */\r\nconst FieldSet = React.forwardRef<HTMLFieldSetElement, FieldSetProps>(\r\n ({className, ...props}: Readonly<FieldSetProps>, ref): React.JSX.Element => (\r\n <fieldset\r\n ref={ref}\r\n data-slot='field-set'\r\n className={cn(styles.fieldSet, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Labels a grouped set of controls within {@link FieldSet}.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<legend>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldLegend variant='label'>Billing address</FieldLegend>\r\n * ```\r\n *\r\n * @see {@link FieldLegendProps} for available props\r\n */\r\nconst FieldLegend = React.forwardRef<HTMLLegendElement, FieldLegendProps>(\r\n ({className, variant = \"legend\", ...props}: Readonly<FieldLegendProps>, ref): React.JSX.Element => (\r\n <legend\r\n ref={ref}\r\n data-slot='field-legend'\r\n data-variant={variant}\r\n className={cn(styles.legend, variant === \"label\" ? styles.legendLabel : styles.legendDefault, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Stacks multiple field rows under a shared container.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldGroup>\r\n * <Field />\r\n * </FieldGroup>\r\n * ```\r\n *\r\n * @see {@link FieldGroupProps} for available props\r\n */\r\nconst FieldGroup = React.forwardRef<HTMLDivElement, FieldGroupProps>(\r\n ({className, ...props}: Readonly<FieldGroupProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-group'\r\n className={cn(styles.group, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Creates a styled field row for labels, descriptions, and controls.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <Field orientation='responsive'>...</Field>\r\n * ```\r\n *\r\n * @see {@link FieldProps} for available props\r\n */\r\nconst Field = React.forwardRef<HTMLDivElement, FieldProps>(\r\n ({className, orientation = \"vertical\", ...props}: Readonly<FieldProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n role='group'\r\n data-slot='field'\r\n data-orientation={orientation}\r\n className={cn(styles.field, getFieldOrientationClass(orientation), className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps field controls and supporting content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldContent>{control}</FieldContent>\r\n * ```\r\n *\r\n * @see {@link FieldContentProps} for available props\r\n */\r\nconst FieldContent = React.forwardRef<HTMLDivElement, FieldContentProps>(\r\n ({className, ...props}: Readonly<FieldContentProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-content'\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders the label associated with a form control.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<label>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldLabel htmlFor='email'>Email</FieldLabel>\r\n * ```\r\n *\r\n * @see {@link FieldLabelProps} for available props\r\n */\r\nconst FieldLabel = React.forwardRef<HTMLLabelElement, FieldLabelProps>(\r\n ({className, ...props}: Readonly<FieldLabelProps>, ref): React.JSX.Element => {\r\n return (\r\n <label\r\n ref={ref}\r\n data-slot='field-label'\r\n className={cn(styles.label, className)}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Displays the leading title content for a field row.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldTitle>Account</FieldTitle>\r\n * ```\r\n *\r\n * @see {@link FieldTitleProps} for available props\r\n */\r\nconst FieldTitle = React.forwardRef<HTMLDivElement, FieldTitleProps>(\r\n ({className, ...props}: Readonly<FieldTitleProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-label'\r\n className={cn(styles.title, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders supplementary descriptive text for a field.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<p>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldDescription>Used for account recovery.</FieldDescription>\r\n * ```\r\n *\r\n * @see {@link FieldDescriptionProps} for available props\r\n */\r\nconst FieldDescription = React.forwardRef<HTMLParagraphElement, FieldDescriptionProps>(\r\n ({className, ...props}: Readonly<FieldDescriptionProps>, ref): React.JSX.Element => (\r\n <p\r\n ref={ref}\r\n data-slot='field-description'\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Separates field sections with optional inline content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldSeparator>or</FieldSeparator>\r\n * ```\r\n *\r\n * @see {@link FieldSeparatorProps} for available props\r\n */\r\nconst FieldSeparator = React.forwardRef<HTMLDivElement, FieldSeparatorProps>(\r\n ({children, className, ...props}: Readonly<FieldSeparatorProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-separator'\r\n data-content={children ? \"true\" : undefined}\r\n className={cn(styles.separator, className)}\r\n {...props}>\r\n <Separator className={styles.separatorLine} />\r\n {children ? <span className={styles.separatorContent}>{children}</span> : null}\r\n </div>\r\n ),\r\n);\r\n\r\n/**\r\n * Presents validation feedback for a field.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element when content exists\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldError errors={[{message: \"Required\"}]} />\r\n * ```\r\n *\r\n * @see {@link FieldErrorProps} for available props\r\n */\r\nconst FieldError = React.forwardRef<HTMLDivElement, FieldErrorProps>(\r\n ({className, children, errors, ...props}: Readonly<FieldErrorProps>, ref): React.JSX.Element | null => {\r\n const content = React.useMemo((): React.JSX.Element | null => {\r\n if (children) {\r\n return <span>{children}</span>;\r\n }\r\n\r\n if (!errors) {\r\n return null;\r\n }\r\n\r\n if (errors.length === 1 && errors[0]?.message) {\r\n return <span>{errors[0].message}</span>;\r\n }\r\n\r\n return (\r\n <ul className={styles.errorList}>{errors.map((error, index) => (error?.message ? <li key={index}>{error.message}</li> : null))}</ul>\r\n );\r\n }, [children, errors]);\r\n\r\n if (!content) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n role='alert'\r\n data-slot='field-error'\r\n className={cn(styles.error, className)}\r\n {...props}>\r\n {content}\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nFieldSet.displayName = \"FieldSet\";\r\nFieldLegend.displayName = \"FieldLegend\";\r\nFieldGroup.displayName = \"FieldGroup\";\r\nField.displayName = \"Field\";\r\nFieldContent.displayName = \"FieldContent\";\r\nFieldLabel.displayName = \"FieldLabel\";\r\nFieldTitle.displayName = \"FieldTitle\";\r\nFieldDescription.displayName = \"FieldDescription\";\r\nFieldSeparator.displayName = \"FieldSeparator\";\r\nFieldError.displayName = \"FieldError\";\r\n\r\nexport {Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle};\r\n"],"names":["getFieldOrientationClass","orientation","styles","FieldSet","React","className","props","ref","cn","FieldLegend","variant","FieldGroup","Field","FieldContent","FieldLabel","FieldTitle","FieldDescription","FieldSeparator","children","undefined","Separator","FieldError","errors","content","error","index"],"mappings":"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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "./field_module.css";
|
|
2
|
+
const field_module = {
|
|
3
|
+
fieldSet: "fieldSet-ZsYf1y",
|
|
4
|
+
legend: "legend-cxaotK",
|
|
5
|
+
legendDefault: "legendDefault-za5qgw",
|
|
6
|
+
legendLabel: "legendLabel-dxy8Ra",
|
|
7
|
+
group: "group-jMAZ6P",
|
|
8
|
+
field: "field-xkpXUG",
|
|
9
|
+
vertical: "vertical-teIgkd",
|
|
10
|
+
horizontal: "horizontal-xEGT3H",
|
|
11
|
+
responsive: "responsive-KhsIcd",
|
|
12
|
+
content: "content-wtS4mt",
|
|
13
|
+
label: "label-aBLDfE",
|
|
14
|
+
title: "title-yyNFE9",
|
|
15
|
+
description: "description-wbkoMV",
|
|
16
|
+
separator: "separator-ZduEsC",
|
|
17
|
+
separatorLine: "separatorLine-cueT3n",
|
|
18
|
+
separatorContent: "separatorContent-naPPmD",
|
|
19
|
+
error: "error-zfXC1o",
|
|
20
|
+
errorList: "errorList-SVbSW8"
|
|
21
|
+
};
|
|
22
|
+
export default field_module;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=field.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/ui/field.module.js","sources":["../../../src/components/ui/field.module.css"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./field_module.css\"\nexport default {\"fieldSet\":\"fieldSet-ZsYf1y\",\"legend\":\"legend-cxaotK\",\"legendDefault\":\"legendDefault-za5qgw\",\"legendLabel\":\"legendLabel-dxy8Ra\",\"group\":\"group-jMAZ6P\",\"field\":\"field-xkpXUG\",\"vertical\":\"vertical-teIgkd\",\"horizontal\":\"horizontal-xEGT3H\",\"responsive\":\"responsive-KhsIcd\",\"content\":\"content-wtS4mt\",\"label\":\"label-aBLDfE\",\"title\":\"title-yyNFE9\",\"description\":\"description-wbkoMV\",\"separator\":\"separator-ZduEsC\",\"separatorLine\":\"separatorLine-cueT3n\",\"separatorContent\":\"separatorContent-naPPmD\",\"error\":\"error-zfXC1o\",\"errorList\":\"errorList-SVbSW8\"};"],"names":[],"mappings":";AAEA,qBAAe;IAAC,UAAW;IAAkB,QAAS;IAAgB,eAAgB;IAAuB,aAAc;IAAqB,OAAQ;IAAe,OAAQ;IAAe,UAAW;IAAkB,YAAa;IAAoB,YAAa;IAAoB,SAAU;IAAiB,OAAQ;IAAe,OAAQ;IAAe,aAAc;IAAqB,WAAY;IAAmB,eAAgB;IAAuB,kBAAmB;IAA0B,OAAQ;IAAe,WAAY;AAAkB"}
|