@arolariu/components 0.5.0 → 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} +25 -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 +387 -51
- 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 +222 -23
- package/dist/components/ui/field.d.ts.map +1 -1
- 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 -5363
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +38 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +89 -72
- 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 +154 -67
- 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 -114
- 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 +196 -18
- 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
- package/src/hooks/useIsMobile.test.tsx +0 -96
- package/src/hooks/useWindowSize.test.tsx +0 -57
- package/src/index.test.ts +0 -537
- package/src/lib/color-conversion-utilities.test.ts +0 -225
- package/src/lib/utilities.test.ts +0 -37
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Controller, FormProvider, useFormContext } from "react-hook-form";
|
|
6
|
-
import { Label } from "./label.js";
|
|
3
|
+
import { cloneElement, createContext, forwardRef, isValidElement, useContext, useId } from "react";
|
|
4
|
+
import { Controller, FormProvider, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch } from "react-hook-form";
|
|
7
5
|
import { cn } from "../../lib/utilities.js";
|
|
8
|
-
|
|
6
|
+
import form_module from "./form.module.js";
|
|
7
|
+
const Form = Object.assign(FormProvider, {
|
|
8
|
+
displayName: "Form"
|
|
9
|
+
});
|
|
10
|
+
function assignRef(ref, value) {
|
|
11
|
+
if ("function" == typeof ref) return void ref(value);
|
|
12
|
+
if (ref) ref.current = value;
|
|
13
|
+
}
|
|
14
|
+
function composeRefs(...refs) {
|
|
15
|
+
return (value)=>{
|
|
16
|
+
for (const ref of refs)assignRef(ref, value);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function mergeAriaDescribedBy(...describedByValues) {
|
|
20
|
+
const tokens = describedByValues.flatMap((describedByValue)=>describedByValue?.split(/\s+/u) ?? []).filter((token)=>token.length > 0);
|
|
21
|
+
return tokens.length > 0 ? [
|
|
22
|
+
...new Set(tokens)
|
|
23
|
+
].join(" ") : void 0;
|
|
24
|
+
}
|
|
9
25
|
const FormFieldContext = /*#__PURE__*/ createContext(null);
|
|
10
26
|
const FormField = ({ ...props })=>/*#__PURE__*/ jsx(FormFieldContext.Provider, {
|
|
11
27
|
value: {
|
|
@@ -24,12 +40,16 @@ const useFormField = ()=>{
|
|
|
24
40
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
25
41
|
const { id } = itemContext;
|
|
26
42
|
return {
|
|
27
|
-
|
|
28
|
-
name: fieldContext.name,
|
|
29
|
-
formItemId: `${id}-form-item`,
|
|
43
|
+
error: fieldState.error,
|
|
30
44
|
formDescriptionId: `${id}-form-item-description`,
|
|
45
|
+
formItemId: `${id}-form-item`,
|
|
31
46
|
formMessageId: `${id}-form-item-message`,
|
|
32
|
-
|
|
47
|
+
id,
|
|
48
|
+
invalid: fieldState.invalid,
|
|
49
|
+
isDirty: fieldState.isDirty,
|
|
50
|
+
isTouched: fieldState.isTouched,
|
|
51
|
+
isValidating: fieldState.isValidating,
|
|
52
|
+
name: fieldContext.name
|
|
33
53
|
};
|
|
34
54
|
};
|
|
35
55
|
const FormItemContext = /*#__PURE__*/ createContext(null);
|
|
@@ -41,7 +61,7 @@ const FormItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
|
41
61
|
},
|
|
42
62
|
children: /*#__PURE__*/ jsx("div", {
|
|
43
63
|
ref: ref,
|
|
44
|
-
className: cn(
|
|
64
|
+
className: cn(form_module.item, className),
|
|
45
65
|
...props
|
|
46
66
|
})
|
|
47
67
|
});
|
|
@@ -49,22 +69,35 @@ const FormItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
|
49
69
|
FormItem.displayName = "FormItem";
|
|
50
70
|
const FormLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
51
71
|
const { error, formItemId } = useFormField();
|
|
52
|
-
return /*#__PURE__*/ jsx(
|
|
72
|
+
return /*#__PURE__*/ jsx("label", {
|
|
53
73
|
ref: ref,
|
|
54
|
-
className: cn(error &&
|
|
74
|
+
className: cn(error && form_module.labelError, className),
|
|
55
75
|
htmlFor: formItemId,
|
|
56
76
|
...props
|
|
57
77
|
});
|
|
58
78
|
});
|
|
59
79
|
FormLabel.displayName = "FormLabel";
|
|
60
|
-
const FormControl = /*#__PURE__*/ forwardRef(({ ...props }, ref)=>{
|
|
61
|
-
const { error,
|
|
62
|
-
|
|
80
|
+
const FormControl = /*#__PURE__*/ forwardRef(({ children, ...props }, ref)=>{
|
|
81
|
+
const { error, formDescriptionId, formItemId, formMessageId } = useFormField();
|
|
82
|
+
const describedBy = mergeAriaDescribedBy("string" == typeof props["aria-describedby"] ? props["aria-describedby"] : void 0, formDescriptionId, error ? formMessageId : void 0);
|
|
83
|
+
if (/*#__PURE__*/ isValidElement(children)) {
|
|
84
|
+
const child = children;
|
|
85
|
+
const childDescribedBy = "string" == typeof child.props["aria-describedby"] ? child.props["aria-describedby"] : void 0;
|
|
86
|
+
return /*#__PURE__*/ cloneElement(child, {
|
|
87
|
+
...props,
|
|
88
|
+
ref: composeRefs(ref, child.props.ref),
|
|
89
|
+
id: formItemId,
|
|
90
|
+
"aria-describedby": mergeAriaDescribedBy(childDescribedBy, describedBy),
|
|
91
|
+
"aria-invalid": Boolean(error)
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return /*#__PURE__*/ jsx("div", {
|
|
63
95
|
ref: ref,
|
|
64
96
|
id: formItemId,
|
|
65
|
-
"aria-describedby":
|
|
97
|
+
"aria-describedby": describedBy,
|
|
66
98
|
"aria-invalid": Boolean(error),
|
|
67
|
-
...props
|
|
99
|
+
...props,
|
|
100
|
+
children: children
|
|
68
101
|
});
|
|
69
102
|
});
|
|
70
103
|
FormControl.displayName = "FormControl";
|
|
@@ -73,24 +106,25 @@ const FormDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=
|
|
|
73
106
|
return /*#__PURE__*/ jsx("p", {
|
|
74
107
|
ref: ref,
|
|
75
108
|
id: formDescriptionId,
|
|
76
|
-
className: cn(
|
|
109
|
+
className: cn(form_module.description, className),
|
|
77
110
|
...props
|
|
78
111
|
});
|
|
79
112
|
});
|
|
80
113
|
FormDescription.displayName = "FormDescription";
|
|
81
114
|
const FormMessage = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
|
|
82
115
|
const { error, formMessageId } = useFormField();
|
|
83
|
-
const body = error ? String(error
|
|
116
|
+
const body = error ? String(error.message ?? "") : children;
|
|
84
117
|
if (!body) return null;
|
|
85
118
|
return /*#__PURE__*/ jsx("p", {
|
|
86
119
|
ref: ref,
|
|
87
120
|
id: formMessageId,
|
|
88
|
-
className: cn(
|
|
121
|
+
className: cn(form_module.message, className),
|
|
89
122
|
...props,
|
|
90
123
|
children: body
|
|
91
124
|
});
|
|
92
125
|
});
|
|
93
126
|
FormMessage.displayName = "FormMessage";
|
|
94
|
-
|
|
127
|
+
FormField.displayName = "FormField";
|
|
128
|
+
export { Controller, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useController, useFieldArray, useForm, useFormContext, useFormField, useFormState, useWatch };
|
|
95
129
|
|
|
96
130
|
//# sourceMappingURL=form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/form.js","sources":["../../../src/components/ui/form.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\r\nimport {Slot} from \"@radix-ui/react-slot\";\r\nimport * as React from \"react\";\r\nimport {Controller, FormProvider, useFormContext, type ControllerProps, type FieldPath, type FieldValues} from \"react-hook-form\";\r\n\r\nimport {Label} from \"@/components/ui/label\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Form = FormProvider;\r\n\r\ntype FormFieldContextValue<\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\r\n> = {\r\n name: TName;\r\n};\r\n\r\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\r\n\r\nconst FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({\r\n ...props\r\n}: ControllerProps<TFieldValues, TName>) => {\r\n return (\r\n <FormFieldContext.Provider value={{name: props.name}}>\r\n <Controller {...props} />\r\n </FormFieldContext.Provider>\r\n );\r\n};\r\n\r\nconst useFormField = () => {\r\n const fieldContext = React.useContext(FormFieldContext);\r\n const itemContext = React.useContext(FormItemContext);\r\n const {getFieldState, formState} = useFormContext();\r\n\r\n if (!fieldContext) {\r\n throw new Error(\"useFormField should be used within <FormField>\");\r\n }\r\n\r\n if (!itemContext) {\r\n throw new Error(\"useFormField should be used within <FormItem>\");\r\n }\r\n\r\n const fieldState = getFieldState(fieldContext.name, formState);\r\n\r\n const {id} = itemContext;\r\n\r\n return {\r\n id,\r\n name: fieldContext.name,\r\n formItemId: `${id}-form-item`,\r\n formDescriptionId: `${id}-form-item-description`,\r\n formMessageId: `${id}-form-item-message`,\r\n ...fieldState,\r\n };\r\n};\r\n\r\ntype FormItemContextValue = {\r\n id: string;\r\n};\r\n\r\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\r\n\r\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const id = React.useId();\r\n\r\n return (\r\n <FormItemContext.Provider value={{id}}>\r\n <div\r\n ref={ref}\r\n className={cn(\"space-y-2\", className)}\r\n {...props}\r\n />\r\n </FormItemContext.Provider>\r\n );\r\n});\r\nFormItem.displayName = \"FormItem\";\r\n\r\nconst FormLabel = React.forwardRef<\r\n React.ComponentRef<typeof LabelPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\r\n>(({className, ...props}, ref) => {\r\n const {error, formItemId} = useFormField();\r\n\r\n return (\r\n <Label\r\n ref={ref}\r\n className={cn(error && \"text-red-500 dark:text-red-900\", className)}\r\n htmlFor={formItemId}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormLabel.displayName = \"FormLabel\";\r\n\r\nconst FormControl = React.forwardRef<React.ComponentRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(({...props}, ref) => {\r\n const {error, formItemId, formDescriptionId, formMessageId} = useFormField();\r\n\r\n return (\r\n <Slot\r\n ref={ref}\r\n id={formItemId}\r\n aria-describedby={error ? `${formDescriptionId} ${formMessageId}` : `${formDescriptionId}`}\r\n aria-invalid={Boolean(error)}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormControl.displayName = \"FormControl\";\r\n\r\nconst FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({className, ...props}, ref) => {\r\n const {formDescriptionId} = useFormField();\r\n\r\n return (\r\n <p\r\n ref={ref}\r\n id={formDescriptionId}\r\n className={cn(\"text-[0.8rem] text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormDescription.displayName = \"FormDescription\";\r\n\r\nconst FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\r\n ({className, children, ...props}, ref) => {\r\n const {error, formMessageId} = useFormField();\r\n const body = error ? String(error?.message ?? \"\") : children;\r\n\r\n if (!body) {\r\n return null;\r\n }\r\n\r\n return (\r\n <p\r\n ref={ref}\r\n id={formMessageId}\r\n className={cn(\"text-[0.8rem] font-medium text-red-500 dark:text-red-900\", className)}\r\n {...props}>\r\n {body}\r\n </p>\r\n );\r\n },\r\n);\r\nFormMessage.displayName = \"FormMessage\";\r\n\r\nexport {Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField};\r\n"],"names":["Form","FormProvider","FormFieldContext","React","FormField","props","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","Error","fieldState","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","Boolean","FormDescription","FormMessage","children","body","String"],"mappings":";;;;;;;AAUA,MAAMA,OAAOC;AASb,MAAMC,mBAAmB,WAAnBA,GAAmBC,cAAkD;AAE3E,MAAMC,YAAY,CAAkH,EAClI,GAAGC,OACkC,GAC9B,WAAP,GACE,IAACH,iBAAiB,QAAQ;QAAC,OAAO;YAAC,MAAMG,MAAM,IAAI;QAAA;kBACjD,kBAACC,YAAUA;YAAE,GAAGD,KAAK;;;AAK3B,MAAME,eAAe;IACnB,MAAMC,eAAeL,WAAiBD;IACtC,MAAMO,cAAcN,WAAiBO;IACrC,MAAM,EAACC,aAAa,EAAEC,SAAS,EAAC,GAAGC;IAEnC,IAAI,CAACL,cACH,MAAM,IAAIM,MAAM;IAGlB,IAAI,CAACL,aACH,MAAM,IAAIK,MAAM;IAGlB,MAAMC,aAAaJ,cAAcH,aAAa,IAAI,EAAEI;IAEpD,MAAM,EAACI,EAAE,EAAC,GAAGP;IAEb,OAAO;QACLO;QACA,MAAMR,aAAa,IAAI;QACvB,YAAY,GAAGQ,GAAG,UAAU,CAAC;QAC7B,mBAAmB,GAAGA,GAAG,sBAAsB,CAAC;QAChD,eAAe,GAAGA,GAAG,kBAAkB,CAAC;QACxC,GAAGD,UAAU;IACf;AACF;AAMA,MAAML,kBAAkB,WAAlBA,GAAkBP,cAAiD;AAEzE,MAAMc,WAAW,WAAXA,GAAWd,WAAuE,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IAC9G,MAAMH,KAAKb;IAEX,OAAO,WAAP,GACE,IAACO,gBAAgB,QAAQ;QAAC,OAAO;YAACM;QAAE;kBAClC,kBAAC;YACC,KAAKG;YACL,WAAWC,GAAG,aAAaF;YAC1B,GAAGb,KAAK;;;AAIjB;AACAY,SAAS,WAAW,GAAG;AAEvB,MAAMI,YAAY,WAAZA,GAAYlB,WAGhB,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IACxB,MAAM,EAACG,KAAK,EAAEC,UAAU,EAAC,GAAGhB;IAE5B,OAAO,WAAP,GACE,IAACiB,OAAKA;QACJ,KAAKL;QACL,WAAWC,GAAGE,SAAS,kCAAkCJ;QACzD,SAASK;QACR,GAAGlB,KAAK;;AAGf;AACAgB,UAAU,WAAW,GAAG;AAExB,MAAMI,cAAc,WAAdA,GAActB,WAA+F,CAAC,EAAC,GAAGE,OAAM,EAAEc;IAC9H,MAAM,EAACG,KAAK,EAAEC,UAAU,EAAEG,iBAAiB,EAAEC,aAAa,EAAC,GAAGpB;IAE9D,OAAO,WAAP,GACE,IAACqB,MAAIA;QACH,KAAKT;QACL,IAAII;QACJ,oBAAkBD,QAAQ,GAAGI,kBAAkB,CAAC,EAAEC,eAAe,GAAG,GAAGD,mBAAmB;QAC1F,gBAAcG,QAAQP;QACrB,GAAGjB,KAAK;;AAGf;AACAoB,YAAY,WAAW,GAAG;AAE1B,MAAMK,kBAAkB,WAAlBA,GAAkB3B,WAAmF,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IACjI,MAAM,EAACO,iBAAiB,EAAC,GAAGnB;IAE5B,OAAO,WAAP,GACE,IAAC;QACC,KAAKY;QACL,IAAIO;QACJ,WAAWN,GAAG,wDAAwDF;QACrE,GAAGb,KAAK;;AAGf;AACAyB,gBAAgB,WAAW,GAAG;AAE9B,MAAMC,cAAc,WAAdA,GAAc5B,WAClB,CAAC,EAACe,SAAS,EAAEc,QAAQ,EAAE,GAAG3B,OAAM,EAAEc;IAChC,MAAM,EAACG,KAAK,EAAEK,aAAa,EAAC,GAAGpB;IAC/B,MAAM0B,OAAOX,QAAQY,OAAOZ,OAAO,WAAW,MAAMU;IAEpD,IAAI,CAACC,MACH,OAAO;IAGT,OAAO,WAAP,GACE,IAAC;QACC,KAAKd;QACL,IAAIQ;QACJ,WAAWP,GAAG,4DAA4DF;QACzE,GAAGb,KAAK;kBACR4B;;AAGP;AAEFF,YAAY,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components/ui/form.js","sources":["../../../src/components/ui/form.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable react/prop-types */\r\n\r\nimport * as React from \"react\";\r\nimport {Controller, FormProvider, useFormContext, type ControllerProps, type FieldPath, type FieldValues} from \"react-hook-form\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./form.module.css\";\r\n\r\n/**\r\n * Provides the `react-hook-form` context to nested form primitives.\r\n *\r\n * @remarks\r\n * - Renders the `FormProvider` component from `react-hook-form`\r\n * - Built on `react-hook-form`\r\n *\r\n * @example\r\n * ```tsx\r\n * <Form {...form}>\r\n * <form>...</form>\r\n * </Form>\r\n * ```\r\n *\r\n * @see {@link https://react-hook-form.com/docs/formprovider | React Hook Form FormProvider Docs}\r\n */\r\nconst Form = Object.assign(FormProvider, {displayName: \"Form\"});\r\n\r\ntype FormControlElementProps = React.HTMLAttributes<HTMLElement> & {\r\n ref?: React.Ref<HTMLElement>;\r\n};\r\n\r\ninterface FormControlProps extends Omit<React.HTMLAttributes<HTMLElement>, \"children\"> {\r\n /**\r\n * Single form control element or fallback content to receive field accessibility attributes.\r\n * @default undefined\r\n */\r\n children: React.ReactNode;\r\n}\r\n\r\nfunction assignRef<TValue>(ref: React.Ref<TValue> | undefined, value: TValue | null): void {\r\n if (typeof ref === \"function\") {\r\n ref(value);\r\n return;\r\n }\r\n\r\n if (ref) {\r\n ref.current = value;\r\n }\r\n}\r\n\r\nfunction composeRefs<TValue>(...refs: Array<React.Ref<TValue> | undefined>): React.RefCallback<TValue> {\r\n return (value: TValue | null): void => {\r\n for (const ref of refs) {\r\n assignRef(ref, value);\r\n }\r\n };\r\n}\r\n\r\nfunction mergeAriaDescribedBy(...describedByValues: Array<string | undefined>): string | undefined {\r\n const tokens = describedByValues\r\n .flatMap((describedByValue) => describedByValue?.split(/\\s+/u) ?? [])\r\n .filter((token): token is string => token.length > 0);\r\n\r\n return tokens.length > 0 ? [...new Set(tokens)].join(\" \") : undefined;\r\n}\r\n\r\ntype FormFieldContextValue<\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\r\n> = {\r\n name: TName;\r\n};\r\n\r\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\r\n\r\n/**\r\n * Binds a single field name to the shared form field context.\r\n *\r\n * @remarks\r\n * - Renders the `Controller` component from `react-hook-form`\r\n * - Built on `react-hook-form` controller primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <FormField\r\n * control={form.control}\r\n * name='email'\r\n * render={({field}) => <input {...field} />}\r\n * />\r\n * ```\r\n *\r\n * @see {@link https://react-hook-form.com/docs/usecontroller/controller | React Hook Form Controller Docs}\r\n */\r\nconst FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({\r\n ...props\r\n}: ControllerProps<TFieldValues, TName>): React.JSX.Element => {\r\n return (\r\n <FormFieldContext.Provider value={{name: props.name}}>\r\n <Controller {...props} />\r\n </FormFieldContext.Provider>\r\n );\r\n};\r\n\r\ntype UseFormFieldReturn = {\r\n id: string;\r\n name: FieldPath<FieldValues>;\r\n formItemId: string;\r\n formDescriptionId: string;\r\n formMessageId: string;\r\n invalid: boolean;\r\n isDirty: boolean;\r\n isTouched: boolean;\r\n isValidating: boolean;\r\n error?: ReturnType<ReturnType<typeof useFormContext>[\"getFieldState\"]>[\"error\"];\r\n};\r\n\r\n/**\r\n * Returns the resolved form field metadata for nested form primitives.\r\n *\r\n * @remarks\r\n * Reads the nearest {@link FormField} and {@link FormItem} contexts, then combines them\r\n * with `react-hook-form` field state to expose stable IDs and validation metadata.\r\n *\r\n * @example\r\n * ```tsx\r\n * const field = useFormField();\r\n * ```\r\n *\r\n * @see {@link https://react-hook-form.com/docs/useformcontext | React Hook Form useFormContext Docs}\r\n */\r\nconst useFormField = (): UseFormFieldReturn => {\r\n const fieldContext = React.useContext(FormFieldContext);\r\n const itemContext = React.useContext(FormItemContext);\r\n const {getFieldState, formState} = useFormContext();\r\n\r\n if (!fieldContext) {\r\n throw new Error(\"useFormField should be used within <FormField>\");\r\n }\r\n\r\n if (!itemContext) {\r\n throw new Error(\"useFormField should be used within <FormItem>\");\r\n }\r\n\r\n const fieldState = getFieldState(fieldContext.name, formState);\r\n const {id} = itemContext;\r\n\r\n return {\r\n error: fieldState.error,\r\n formDescriptionId: `${id}-form-item-description`,\r\n formItemId: `${id}-form-item`,\r\n formMessageId: `${id}-form-item-message`,\r\n id,\r\n invalid: fieldState.invalid,\r\n isDirty: fieldState.isDirty,\r\n isTouched: fieldState.isTouched,\r\n isValidating: fieldState.isValidating,\r\n name: fieldContext.name as FieldPath<FieldValues>,\r\n };\r\n};\r\n\r\ntype FormItemContextValue = {\r\n id: string;\r\n};\r\n\r\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\r\n\r\n/**\r\n * Wraps a label, control, description, and message into a single form item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element\r\n * - Built on the shared form item context\r\n *\r\n * @example\r\n * ```tsx\r\n * <FormItem>\r\n * <FormLabel>Email</FormLabel>\r\n * </FormItem>\r\n * ```\r\n *\r\n * @see {@link https://react-hook-form.com/docs/useformcontext | React Hook Form Docs}\r\n */\r\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const id = React.useId();\r\n\r\n return (\r\n <FormItemContext.Provider value={{id}}>\r\n <div\r\n ref={ref}\r\n className={cn(styles.item, className)}\r\n {...props}\r\n />\r\n </FormItemContext.Provider>\r\n );\r\n});\r\nFormItem.displayName = \"FormItem\";\r\n\r\n/**\r\n * Renders the accessible label for the current form item.\r\n *\r\n * @remarks\r\n * - Renders a `<label>` element\r\n * - Built on the shared form field metadata hook\r\n *\r\n * @example\r\n * ```tsx\r\n * <FormLabel>Email</FormLabel>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/HTML/Element/label | HTML label element}\r\n */\r\nconst FormLabel = React.forwardRef<HTMLLabelElement, React.LabelHTMLAttributes<HTMLLabelElement>>(({className, ...props}, ref) => {\r\n const {error, formItemId} = useFormField();\r\n\r\n return (\r\n <label\r\n ref={ref}\r\n className={cn(error && styles.labelError, className)}\r\n htmlFor={formItemId}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormLabel.displayName = \"FormLabel\";\r\n\r\n/**\r\n * Provides react-hook-form field metadata to a single control element.\r\n *\r\n * @remarks\r\n * This replaces the former Radix Slot-based implementation by cloning the\r\n * direct child element and merging the accessibility attributes required by the\r\n * surrounding form primitives. A fallback wrapper is rendered only when the\r\n * child is not a valid React element.\r\n */\r\nconst FormControl = React.forwardRef<HTMLElement, FormControlProps>(\r\n ({children, ...props}: Readonly<FormControlProps>, ref): React.JSX.Element => {\r\n const {error, formDescriptionId, formItemId, formMessageId} = useFormField();\r\n const describedBy = mergeAriaDescribedBy(\r\n typeof props[\"aria-describedby\"] === \"string\" ? props[\"aria-describedby\"] : undefined,\r\n formDescriptionId,\r\n error ? formMessageId : undefined,\r\n );\r\n\r\n if (React.isValidElement(children)) {\r\n const child = children as React.ReactElement<FormControlElementProps>;\r\n const childDescribedBy = typeof child.props[\"aria-describedby\"] === \"string\" ? child.props[\"aria-describedby\"] : undefined;\r\n\r\n // eslint-disable-next-line react-x/no-clone-element -- removes Radix Slot while preserving child element semantics\r\n return React.cloneElement(child, {\r\n ...props,\r\n ref: composeRefs(ref, child.props.ref),\r\n id: formItemId,\r\n \"aria-describedby\": mergeAriaDescribedBy(childDescribedBy, describedBy),\r\n \"aria-invalid\": Boolean(error),\r\n });\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref as React.Ref<HTMLDivElement>}\r\n id={formItemId}\r\n aria-describedby={describedBy}\r\n aria-invalid={Boolean(error)}\r\n {...props}>\r\n {children}\r\n </div>\r\n );\r\n },\r\n);\r\nFormControl.displayName = \"FormControl\";\r\n\r\n/**\r\n * Renders helper text that describes the current form control.\r\n *\r\n * @remarks\r\n * - Renders a `<p>` element\r\n * - Built on the shared form field metadata hook\r\n *\r\n * @example\r\n * ```tsx\r\n * <FormDescription>We'll never share your email.</FormDescription>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/HTML/Element/p | HTML paragraph element}\r\n */\r\nconst FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({className, ...props}, ref) => {\r\n const {formDescriptionId} = useFormField();\r\n\r\n return (\r\n <p\r\n ref={ref}\r\n id={formDescriptionId}\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormDescription.displayName = \"FormDescription\";\r\n\r\n/**\r\n * Renders the validation message or fallback message for the current form control.\r\n *\r\n * @remarks\r\n * - Renders a `<p>` element when content is available\r\n * - Built on the shared form field metadata hook\r\n *\r\n * @example\r\n * ```tsx\r\n * <FormMessage />\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-invalid | ARIA invalid state}\r\n */\r\nconst FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\r\n ({className, children, ...props}, ref) => {\r\n const {error, formMessageId} = useFormField();\r\n const body = error ? String(error.message ?? \"\") : children;\r\n\r\n if (!body) {\r\n return null;\r\n }\r\n\r\n return (\r\n <p\r\n ref={ref}\r\n id={formMessageId}\r\n className={cn(styles.message, className)}\r\n {...props}>\r\n {body}\r\n </p>\r\n );\r\n },\r\n);\r\nFormMessage.displayName = \"FormMessage\";\r\nFormField.displayName = \"FormField\";\r\n\r\nexport {Controller, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch} from \"react-hook-form\";\r\nexport type {\r\n Control,\r\n ControllerFieldState,\r\n ControllerProps,\r\n ControllerRenderProps,\r\n DefaultValues,\r\n FieldError,\r\n FieldErrors,\r\n FieldPath,\r\n FieldValues,\r\n Path,\r\n RegisterOptions,\r\n Resolver,\r\n SubmitHandler,\r\n UseControllerReturn,\r\n UseFieldArrayReturn,\r\n UseFormReturn,\r\n} from \"react-hook-form\";\r\nexport {Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField};\r\nexport type {FormControlProps};\r\n"],"names":["Form","Object","FormProvider","assignRef","ref","value","composeRefs","refs","mergeAriaDescribedBy","describedByValues","tokens","describedByValue","token","Set","undefined","FormFieldContext","React","FormField","props","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","Error","fieldState","id","FormItem","className","cn","styles","FormLabel","error","formItemId","FormControl","children","formDescriptionId","formMessageId","describedBy","child","childDescribedBy","Boolean","FormDescription","FormMessage","body","String"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/ui/form.module.js","sources":["../../../src/components/ui/form.module.css"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./form_module.css\"\nexport default {\"item\":\"item-kXRJ67\",\"labelError\":\"labelError-R0Bie6\",\"description\":\"description-yOLp5t\",\"message\":\"message-yxAxP5\"};"],"names":[],"mappings":";AAEA,oBAAe;IAAC,MAAO;IAAc,YAAa;IAAoB,aAAc;IAAqB,SAAU;AAAgB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.item-kXRJ67 {
|
|
2
|
+
gap: var(--ac-space-2);
|
|
3
|
+
display: grid;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.labelError-R0Bie6 {
|
|
7
|
+
color: var(--ac-destructive);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.description-yOLp5t {
|
|
11
|
+
color: var(--ac-muted-foreground);
|
|
12
|
+
font-size: .8rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.message-yxAxP5 {
|
|
16
|
+
color: var(--ac-destructive);
|
|
17
|
+
font-size: .8rem;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
/*# sourceMappingURL=form_module.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/form.module.css","webpack://./src/components/ui/form.module.css"],"names":[],"mappings":"AADA;ECEE,sBAAsB;EACtB,aAAa;AACf;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,iCAAiC;EACjC,gBAAgB;AAClB;;AAEA;EACE,4BAA4B;EAC5B,gBAAgB;EAChB,gBAAgB;AAClB","sourcesContent":[".item{display:grid;gap:var(--ac-space-2)}.labelError{color:var(--ac-destructive)}.description{color:var(--ac-muted-foreground);font-size:.8rem}.message{color:var(--ac-destructive);font-size:.8rem;font-weight:500}",".item {\n gap: var(--ac-space-2);\n display: grid;\n}\n\n.labelError {\n color: var(--ac-destructive);\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: .8rem;\n}\n\n.message {\n color: var(--ac-destructive);\n font-size: .8rem;\n font-weight: 500;\n}\n"],"sourceRoot":""}
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
import { HTMLMotionProps, type Transition } from "motion/react";
|
|
1
|
+
import { type HTMLMotionProps, type Transition } from "motion/react";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
3
|
+
/** Props accepted by {@link GradientBackground}. */
|
|
4
|
+
export interface GradientBackgroundProps extends HTMLMotionProps<"div"> {
|
|
5
|
+
/** Motion timing used for the animated background-position sweep. @default {duration: 15, ease: "easeInOut", repeat: Infinity} */
|
|
4
6
|
transition?: Transition;
|
|
5
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Renders a continuously shifting multicolor gradient background.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* - Animated component using the `motion` library
|
|
13
|
+
* - Renders a `<div>` element
|
|
14
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
15
|
+
* - Client-side only (`"use client"` directive)
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <GradientBackground />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @see {@link GradientBackgroundProps} for available props
|
|
23
|
+
*/
|
|
6
24
|
declare const GradientBackground: React.ForwardRefExoticComponent<Omit<GradientBackgroundProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export { GradientBackground
|
|
25
|
+
export { GradientBackground };
|
|
8
26
|
//# sourceMappingURL=gradient-background.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradient-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-background.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"gradient-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-background.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,eAAe,EAAE,KAAK,UAAU,EAAC,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,oDAAoD;AACpD,MAAM,WAAW,uBAAwB,SAAQ,eAAe,CAAC,KAAK,CAAC;IACrE,kIAAkI;IAClI,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,kBAAkB,6GAiBvB,CAAC;AAIF,OAAO,EAAC,kBAAkB,EAAC,CAAC"}
|
|
@@ -3,13 +3,16 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
import gradient_background_module from "./gradient-background.module.js";
|
|
6
7
|
const GradientBackground = /*#__PURE__*/ forwardRef(({ className, transition = {
|
|
7
8
|
duration: 15,
|
|
8
9
|
ease: "easeInOut",
|
|
9
10
|
repeat: 1 / 0
|
|
10
|
-
}, ...props }, ref)
|
|
11
|
+
}, ...props }, ref)=>{
|
|
12
|
+
const { key: _ignoredKey, ...restProps } = props;
|
|
13
|
+
return /*#__PURE__*/ jsx(motion.div, {
|
|
11
14
|
ref: ref,
|
|
12
|
-
className: cn(
|
|
15
|
+
className: cn(gradient_background_module.root, className),
|
|
13
16
|
animate: {
|
|
14
17
|
backgroundPosition: [
|
|
15
18
|
"0% 50%",
|
|
@@ -18,8 +21,9 @@ const GradientBackground = /*#__PURE__*/ forwardRef(({ className, transition = {
|
|
|
18
21
|
]
|
|
19
22
|
},
|
|
20
23
|
transition: transition,
|
|
21
|
-
...
|
|
22
|
-
})
|
|
24
|
+
...restProps
|
|
25
|
+
});
|
|
26
|
+
});
|
|
23
27
|
GradientBackground.displayName = "GradientBackground";
|
|
24
28
|
export { GradientBackground };
|
|
25
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/gradient-background.js","sources":["../../../src/components/ui/gradient-background.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {
|
|
1
|
+
{"version":3,"file":"components/ui/gradient-background.js","sources":["../../../src/components/ui/gradient-background.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type HTMLMotionProps, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./gradient-background.module.css\";\r\n\r\n/** Props accepted by {@link GradientBackground}. */\r\nexport interface GradientBackgroundProps extends HTMLMotionProps<\"div\"> {\r\n /** Motion timing used for the animated background-position sweep. @default {duration: 15, ease: \"easeInOut\", repeat: Infinity} */\r\n transition?: Transition;\r\n}\r\n\r\n/**\r\n * Renders a continuously shifting multicolor gradient background.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <GradientBackground />\r\n * ```\r\n *\r\n * @see {@link GradientBackgroundProps} for available props\r\n */\r\nconst GradientBackground = React.forwardRef<HTMLDivElement, GradientBackgroundProps>(\r\n ({className, transition = {duration: 15, ease: \"easeInOut\", repeat: Infinity}, ...props}, ref) => {\r\n // eslint-disable-next-line sonarjs/no-unused-vars -- removing React key avoids implicit key spreading\r\n const {key: _ignoredKey, ...restProps} = props;\r\n\r\n return (\r\n <motion.div\r\n ref={ref}\r\n className={cn(styles.root, className)}\r\n animate={{\r\n backgroundPosition: [\"0% 50%\", \"100% 50%\", \"0% 50%\"],\r\n }}\r\n transition={transition}\r\n {...restProps}\r\n />\r\n );\r\n },\r\n);\r\n\r\nGradientBackground.displayName = \"GradientBackground\";\r\n\r\nexport {GradientBackground};\r\n"],"names":["GradientBackground","React","className","transition","Infinity","props","ref","_ignoredKey","restProps","motion","cn","styles"],"mappings":";;;;;;AA8BA,MAAMA,qBAAqB,WAAHA,GAAGC,WACzB,CAAC,EAACC,SAAS,EAAEC,aAAa;IAAC,UAAU;IAAI,MAAM;IAAa,QAAQC;AAAQ,CAAC,EAAE,GAAGC,OAAM,EAAEC;IAExF,MAAM,EAAC,KAAKC,WAAW,EAAE,GAAGC,WAAU,GAAGH;IAEzC,OAAO,WAAP,GACE,IAACI,OAAO,GAAG;QACT,KAAKH;QACL,WAAWI,GAAGC,2BAAAA,IAAW,EAAET;QAC3B,SAAS;YACP,oBAAoB;gBAAC;gBAAU;gBAAY;aAAS;QACtD;QACA,YAAYC;QACX,GAAGK,SAAS;;AAGnB;AAGFR,mBAAmB,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/ui/gradient-background.module.js","sources":["../../../src/components/ui/gradient-background.module.css"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./gradient-background_module.css\"\nexport default {\"root\":\"root-k726lA\"};"],"names":[],"mappings":";AAEA,mCAAe;IAAC,MAAO;AAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/gradient-background.module.css","webpack://./src/components/ui/gradient-background.module.css"],"names":[],"mappings":"AADA;ECEE,wEAAwE;EACxE,0BAA0B;EAC1B,WAAW;EACX,YAAY;AACd","sourcesContent":[".root{background-image:linear-gradient(135deg,#3b82f6,#a855f7 50%,#ec4899);background-size:400% 400%;height:100%;width:100%}",".root {\n background-image: linear-gradient(135deg, #3b82f6, #a855f7 50%, #ec4899);\n background-size: 400% 400%;\n width: 100%;\n height: 100%;\n}\n"],"sourceRoot":""}
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { type Transition } from "motion/react";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
3
|
+
/** Props accepted by {@link GradientText}. */
|
|
4
|
+
export interface GradientTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
/** Text content rendered with the animated gradient fill. @default undefined */
|
|
4
6
|
text: string;
|
|
7
|
+
/** CSS gradient string assigned to the animated text fill. @default "linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)" */
|
|
5
8
|
gradient?: string;
|
|
9
|
+
/** Adds a blurred neon duplicate behind the primary text layer. @default false */
|
|
6
10
|
neon?: boolean;
|
|
11
|
+
/** Motion timing used for the animated gradient background. @default {duration: 50, repeat: Infinity, ease: "linear"} */
|
|
7
12
|
transition?: Transition;
|
|
8
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders animated gradient-filled text with an optional neon glow layer.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* - Animated component using the `motion` library
|
|
19
|
+
* - Renders a `<span>` element
|
|
20
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
21
|
+
* - Client-side only (`"use client"` directive)
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <GradientText text="Launch ready" />
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @see {@link GradientTextProps} for available props
|
|
29
|
+
*/
|
|
9
30
|
declare const GradientText: React.ForwardRefExoticComponent<GradientTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
10
|
-
export { GradientText
|
|
31
|
+
export { GradientText };
|
|
11
32
|
//# sourceMappingURL=gradient-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradient-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,UAAU,EAAC,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"gradient-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,UAAU,EAAC,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,8CAA8C;AAC9C,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IAC9E,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,iKAAiK;IACjK,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,yHAAyH;IACzH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAMD;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,YAAY,2FA4CjB,CAAC;AAIF,OAAO,EAAC,YAAY,EAAC,CAAC"}
|
|
@@ -3,21 +3,22 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
import gradient_text_module from "./gradient-text.module.js";
|
|
6
7
|
const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)", neon = false, transition = {
|
|
7
8
|
duration: 50,
|
|
8
9
|
repeat: 1 / 0,
|
|
9
10
|
ease: "linear"
|
|
10
11
|
}, ...props }, ref)=>{
|
|
11
12
|
const baseStyle = {
|
|
12
|
-
|
|
13
|
+
"--ac-gradient-text-background": gradient
|
|
13
14
|
};
|
|
14
15
|
return /*#__PURE__*/ jsxs("span", {
|
|
15
16
|
ref: ref,
|
|
16
|
-
className: cn(
|
|
17
|
+
className: cn(gradient_text_module.root, className),
|
|
17
18
|
...props,
|
|
18
19
|
children: [
|
|
19
20
|
/*#__PURE__*/ jsx(motion.span, {
|
|
20
|
-
className:
|
|
21
|
+
className: gradient_text_module.text,
|
|
21
22
|
style: baseStyle,
|
|
22
23
|
initial: {
|
|
23
24
|
backgroundPosition: "0% 0%"
|
|
@@ -28,8 +29,9 @@ const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "li
|
|
|
28
29
|
transition: transition,
|
|
29
30
|
children: text
|
|
30
31
|
}),
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
neon ? /*#__PURE__*/ jsx(motion.span, {
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
className: gradient_text_module.neon,
|
|
33
35
|
style: baseStyle,
|
|
34
36
|
initial: {
|
|
35
37
|
backgroundPosition: "0% 0%"
|
|
@@ -39,7 +41,7 @@ const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "li
|
|
|
39
41
|
},
|
|
40
42
|
transition: transition,
|
|
41
43
|
children: text
|
|
42
|
-
})
|
|
44
|
+
}) : null
|
|
43
45
|
]
|
|
44
46
|
});
|
|
45
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/gradient-text.js","sources":["../../../src/components/ui/gradient-text.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"components/ui/gradient-text.js","sources":["../../../src/components/ui/gradient-text.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./gradient-text.module.css\";\r\n\r\n/** Props accepted by {@link GradientText}. */\r\nexport interface GradientTextProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n /** Text content rendered with the animated gradient fill. @default undefined */\r\n text: string;\r\n /** CSS gradient string assigned to the animated text fill. @default \"linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)\" */\r\n gradient?: string;\r\n /** Adds a blurred neon duplicate behind the primary text layer. @default false */\r\n neon?: boolean;\r\n /** Motion timing used for the animated gradient background. @default {duration: 50, repeat: Infinity, ease: \"linear\"} */\r\n transition?: Transition;\r\n}\r\n\r\ntype GradientStyleProperties = React.CSSProperties & {\r\n \"--ac-gradient-text-background\": string;\r\n};\r\n\r\n/**\r\n * Renders animated gradient-filled text with an optional neon glow layer.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<span>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <GradientText text=\"Launch ready\" />\r\n * ```\r\n *\r\n * @see {@link GradientTextProps} for available props\r\n */\r\nconst GradientText = React.forwardRef<HTMLSpanElement, GradientTextProps>(\r\n (\r\n {\r\n text,\r\n className,\r\n gradient = \"linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)\",\r\n neon = false,\r\n transition = {duration: 50, repeat: Infinity, ease: \"linear\"},\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const baseStyle: GradientStyleProperties = {\r\n \"--ac-gradient-text-background\": gradient,\r\n };\r\n\r\n return (\r\n <span\r\n ref={ref}\r\n className={cn(styles.root, className)}\r\n {...props}>\r\n <motion.span\r\n className={styles.text}\r\n style={baseStyle}\r\n initial={{backgroundPosition: \"0% 0%\"}}\r\n animate={{backgroundPosition: \"500% 100%\"}}\r\n transition={transition}>\r\n {text}\r\n </motion.span>\r\n\r\n {neon ? (\r\n <motion.span\r\n aria-hidden='true'\r\n className={styles.neon}\r\n style={baseStyle}\r\n initial={{backgroundPosition: \"0% 0%\"}}\r\n animate={{backgroundPosition: \"500% 100%\"}}\r\n transition={transition}>\r\n {text}\r\n </motion.span>\r\n ) : null}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nGradientText.displayName = \"GradientText\";\r\n\r\nexport {GradientText};\r\n"],"names":["GradientText","React","text","className","gradient","neon","transition","Infinity","props","ref","baseStyle","cn","styles","motion"],"mappings":";;;;;;AAwCA,MAAMA,eAAe,WAAHA,GAAGC,WACnB,CACE,EACEC,IAAI,EACJC,SAAS,EACTC,WAAW,yFAAyF,EACpGC,OAAO,KAAK,EACZC,aAAa;IAAC,UAAU;IAAI,QAAQC;IAAU,MAAM;AAAQ,CAAC,EAC7D,GAAGC,OACJ,EACDC;IAEA,MAAMC,YAAqC;QACzC,iCAAiCN;IACnC;IAEA,OAAO,WAAP,GACE,KAAC;QACC,KAAKK;QACL,WAAWE,GAAGC,qBAAAA,IAAW,EAAET;QAC1B,GAAGK,KAAK;;0BACT,IAACK,OAAO,IAAI;gBACV,WAAWD,qBAAAA,IAAW;gBACtB,OAAOF;gBACP,SAAS;oBAAC,oBAAoB;gBAAO;gBACrC,SAAS;oBAAC,oBAAoB;gBAAW;gBACzC,YAAYJ;0BACXJ;;YAGFG,OAAO,WAAPA,GACC,IAACQ,OAAO,IAAI;gBACV,eAAY;gBACZ,WAAWD,qBAAAA,IAAW;gBACtB,OAAOF;gBACP,SAAS;oBAAC,oBAAoB;gBAAO;gBACrC,SAAS;oBAAC,oBAAoB;gBAAW;gBACzC,YAAYJ;0BACXJ;iBAED;;;AAGV;AAGFF,aAAa,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/ui/gradient-text.module.js","sources":["../../../src/components/ui/gradient-text.module.css"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./gradient-text_module.css\"\nexport default {\"root\":\"root-lzRVsJ\",\"neon\":\"neon-gZ2mQJ\",\"text\":\"text-P04R0z\"};"],"names":[],"mappings":";AAEA,6BAAe;IAAC,MAAO;IAAc,MAAO;IAAc,MAAO;AAAa"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.root-lzRVsJ {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.neon-gZ2mQJ, .text-P04R0z {
|
|
7
|
+
background-clip: text;
|
|
8
|
+
background-image: var(--ac-gradient-text-background);
|
|
9
|
+
color: #0000;
|
|
10
|
+
background-position: 0 0;
|
|
11
|
+
background-size: 700% 100%;
|
|
12
|
+
margin: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.neon-gZ2mQJ {
|
|
16
|
+
filter: blur(8px);
|
|
17
|
+
mix-blend-mode: plus-lighter;
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/*# sourceMappingURL=gradient-text_module.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/gradient-text.module.css","webpack://./src/components/ui/gradient-text.module.css"],"names":[],"mappings":"AADA;ECEE,qBAAqB;EACrB,kBAAkB;AACpB;;AAEA;EACE,qBAAqB;EACrB,oDAAoD;EACpD,YAAY;EACZ,wBAAwB;EACxB,0BAA0B;EAC1B,SAAS;AACX;;AAEA;EACE,iBAAiB;EACjB,4BAA4B;EAC5B,oBAAoB;EACpB,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".root{display:inline-block;position:relative}.neon,.text{-webkit-background-clip:text;background-clip:text;background-image:var(--ac-gradient-text-background);background-position:0 0;background-size:700% 100%;color:transparent;margin:0}.neon{filter:blur(8px);inset:0;mix-blend-mode:plus-lighter;pointer-events:none;position:absolute}",".root {\n display: inline-block;\n position: relative;\n}\n\n.neon, .text {\n background-clip: text;\n background-image: var(--ac-gradient-text-background);\n color: #0000;\n background-position: 0 0;\n background-size: 700% 100%;\n margin: 0;\n}\n\n.neon {\n filter: blur(8px);\n mix-blend-mode: plus-lighter;\n pointer-events: none;\n position: absolute;\n inset: 0;\n}\n"],"sourceRoot":""}
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import { type HTMLMotionProps, type Transition, type UseInViewOptions } from "motion/react";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
3
|
+
/** Props accepted by {@link HighlightText}. */
|
|
4
|
+
export interface HighlightTextProps extends HTMLMotionProps<"span"> {
|
|
5
|
+
/** Inline text content that receives the animated highlight sweep. @default undefined */
|
|
4
6
|
text: string;
|
|
7
|
+
/** Delays the highlight animation until the text enters the viewport. @default false */
|
|
5
8
|
inView?: boolean;
|
|
9
|
+
/** Margin passed to the in-view observer when `inView` is enabled. @default "0px" */
|
|
6
10
|
inViewMargin?: UseInViewOptions["margin"];
|
|
11
|
+
/** Prevents the in-view animation from replaying after the first reveal. @default true */
|
|
7
12
|
inViewOnce?: boolean;
|
|
13
|
+
/** Motion timing used for the highlight fill animation. @default {duration: 2, ease: "easeInOut"} */
|
|
8
14
|
transition?: Transition;
|
|
9
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Animates a gradient highlight fill behind inline text content.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* - Animated component using the `motion` library
|
|
21
|
+
* - Renders a `<span>` element
|
|
22
|
+
* - Styling via CSS Modules with `--ac-*` custom properties
|
|
23
|
+
* - Client-side only (`"use client"` directive)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <HighlightText text="Highlighted copy" />
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @see {@link HighlightTextProps} for available props
|
|
31
|
+
*/
|
|
10
32
|
declare const HighlightText: React.ForwardRefExoticComponent<Omit<HighlightTextProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
-
export { HighlightText
|
|
33
|
+
export { HighlightText };
|
|
12
34
|
//# sourceMappingURL=highlight-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/highlight-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC7G,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"highlight-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/highlight-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC7G,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,+CAA+C;AAC/C,MAAM,WAAW,kBAAmB,SAAQ,eAAe,CAAC,MAAM,CAAC;IACjE,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,wFAAwF;IACxF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qFAAqF;IACrF,YAAY,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,0FAA0F;IAC1F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qGAAqG;IACrG,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAID;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,aAAa,yGA+BlB,CAAC;AAIF,OAAO,EAAC,aAAa,EAAC,CAAC"}
|
|
@@ -3,17 +3,19 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { motion, useInView } from "motion/react";
|
|
4
4
|
import { forwardRef, useImperativeHandle, useRef } from "react";
|
|
5
5
|
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
import highlight_text_module from "./highlight-text.module.js";
|
|
6
7
|
const animation = {
|
|
7
8
|
backgroundSize: "100% 100%"
|
|
8
9
|
};
|
|
9
|
-
const HighlightText = /*#__PURE__*/ forwardRef(({ text, className, inView = false, inViewMargin = "0px", transition = {
|
|
10
|
+
const HighlightText = /*#__PURE__*/ forwardRef(({ text, className, inView = false, inViewMargin = "0px", inViewOnce = true, transition = {
|
|
10
11
|
duration: 2,
|
|
11
12
|
ease: "easeInOut"
|
|
12
13
|
}, ...props }, ref)=>{
|
|
14
|
+
const { key: _ignoredKey, ...restProps } = props;
|
|
13
15
|
const localRef = useRef(null);
|
|
14
|
-
useImperativeHandle(ref, ()=>localRef.current);
|
|
16
|
+
useImperativeHandle(ref, ()=>localRef.current, []);
|
|
15
17
|
const inViewResult = useInView(localRef, {
|
|
16
|
-
once:
|
|
18
|
+
once: inViewOnce,
|
|
17
19
|
margin: inViewMargin
|
|
18
20
|
});
|
|
19
21
|
const isInView = !inView || inViewResult;
|
|
@@ -24,13 +26,8 @@ const HighlightText = /*#__PURE__*/ forwardRef(({ text, className, inView = fals
|
|
|
24
26
|
},
|
|
25
27
|
animate: isInView ? animation : void 0,
|
|
26
28
|
transition: transition,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
backgroundPosition: "left center",
|
|
30
|
-
display: "inline"
|
|
31
|
-
},
|
|
32
|
-
className: cn("relative inline-block rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 px-2 py-1 dark:from-blue-500 dark:to-purple-500", className),
|
|
33
|
-
...props,
|
|
29
|
+
className: cn(highlight_text_module.highlight, className),
|
|
30
|
+
...restProps,
|
|
34
31
|
children: text
|
|
35
32
|
});
|
|
36
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/highlight-text.js","sources":["../../../src/components/ui/highlight-text.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, useInView, type HTMLMotionProps, type Transition, type UseInViewOptions} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"components/ui/highlight-text.js","sources":["../../../src/components/ui/highlight-text.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, useInView, type HTMLMotionProps, type Transition, type UseInViewOptions} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./highlight-text.module.css\";\r\n\r\n/** Props accepted by {@link HighlightText}. */\r\nexport interface HighlightTextProps extends HTMLMotionProps<\"span\"> {\r\n /** Inline text content that receives the animated highlight sweep. @default undefined */\r\n text: string;\r\n /** Delays the highlight animation until the text enters the viewport. @default false */\r\n inView?: boolean;\r\n /** Margin passed to the in-view observer when `inView` is enabled. @default \"0px\" */\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n /** Prevents the in-view animation from replaying after the first reveal. @default true */\r\n inViewOnce?: boolean;\r\n /** Motion timing used for the highlight fill animation. @default {duration: 2, ease: \"easeInOut\"} */\r\n transition?: Transition;\r\n}\r\n\r\nconst animation = {backgroundSize: \"100% 100%\"};\r\n\r\n/**\r\n * Animates a gradient highlight fill behind inline text content.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<span>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <HighlightText text=\"Highlighted copy\" />\r\n * ```\r\n *\r\n * @see {@link HighlightTextProps} for available props\r\n */\r\nconst HighlightText = React.forwardRef<HTMLSpanElement, HighlightTextProps>(\r\n (\r\n {text, className, inView = false, inViewMargin = \"0px\", inViewOnce = true, transition = {duration: 2, ease: \"easeInOut\"}, ...props},\r\n ref,\r\n ) => {\r\n // eslint-disable-next-line sonarjs/no-unused-vars -- removing React key avoids implicit key spreading\r\n const {key: _ignoredKey, ...restProps} = props;\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n\r\n React.useImperativeHandle(ref, () => localRef.current!, []);\r\n\r\n const inViewResult = useInView(localRef, {\r\n once: inViewOnce,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n return (\r\n <motion.span\r\n ref={localRef}\r\n initial={{\r\n backgroundSize: \"0% 100%\",\r\n }}\r\n animate={isInView ? animation : undefined}\r\n transition={transition}\r\n className={cn(styles.highlight, className)}\r\n {...restProps}>\r\n {text}\r\n </motion.span>\r\n );\r\n },\r\n);\r\n\r\nHighlightText.displayName = \"HighlightText\";\r\n\r\nexport {HighlightText};\r\n"],"names":["animation","HighlightText","React","text","className","inView","inViewMargin","inViewOnce","transition","props","ref","_ignoredKey","restProps","localRef","inViewResult","useInView","isInView","motion","undefined","cn","styles"],"mappings":";;;;;;AAsBA,MAAMA,YAAY;IAAC,gBAAgB;AAAW;AAkB9C,MAAMC,gBAAgB,WAAHA,GAAGC,WACpB,CACE,EAACC,IAAI,EAAEC,SAAS,EAAEC,SAAS,KAAK,EAAEC,eAAe,KAAK,EAAEC,aAAa,IAAI,EAAEC,aAAa;IAAC,UAAU;IAAG,MAAM;AAAW,CAAC,EAAE,GAAGC,OAAM,EACnIC;IAGA,MAAM,EAAC,KAAKC,WAAW,EAAE,GAAGC,WAAU,GAAGH;IACzC,MAAMI,WAAWX,OAA8B;IAE/CA,oBAA0BQ,KAAK,IAAMG,SAAS,OAAO,EAAG,EAAE;IAE1D,MAAMC,eAAeC,UAAUF,UAAU;QACvC,MAAMN;QACN,QAAQD;IACV;IACA,MAAMU,WAAW,CAACX,UAAUS;IAE5B,OAAO,WAAP,GACE,IAACG,OAAO,IAAI;QACV,KAAKJ;QACL,SAAS;YACP,gBAAgB;QAClB;QACA,SAASG,WAAWhB,YAAYkB;QAChC,YAAYV;QACZ,WAAWW,GAAGC,sBAAAA,SAAgB,EAAEhB;QAC/B,GAAGQ,SAAS;kBACZT;;AAGP;AAGFF,cAAc,WAAW,GAAG"}
|