@arolariu/components 0.4.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{changelog.md → CHANGELOG.md} +36 -0
- package/CONTRIBUTING.md +344 -265
- package/DEBUGGING.md +185 -103
- package/EXAMPLES.md +470 -345
- package/{readme.md → README.md} +306 -203
- package/dist/components/ui/accordion.d.ts +157 -5
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +100 -22
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/accordion.module.js +12 -0
- package/dist/components/ui/accordion.module.js.map +1 -0
- package/dist/components/ui/accordion_module.css +72 -0
- package/dist/components/ui/accordion_module.css.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +321 -18
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +145 -52
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert-dialog.module.js +13 -0
- package/dist/components/ui/alert-dialog.module.js.map +1 -0
- package/dist/components/ui/alert-dialog_module.css +89 -0
- package/dist/components/ui/alert-dialog_module.css.map +1 -0
- package/dist/components/ui/alert.d.ts +109 -6
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +12 -21
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/alert.module.js +11 -0
- package/dist/components/ui/alert.module.js.map +1 -0
- package/dist/components/ui/alert_module.css +59 -0
- package/dist/components/ui/alert_module.css.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +24 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +14 -3
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/aspect-ratio.module.js +7 -0
- package/dist/components/ui/aspect-ratio.module.js.map +1 -0
- package/dist/components/ui/aspect-ratio_module.css +10 -0
- package/dist/components/ui/aspect-ratio_module.css.map +1 -0
- package/dist/components/ui/async-boundary.js +17 -0
- package/dist/components/ui/async-boundary.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +97 -4
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +50 -21
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/avatar.module.js +9 -0
- package/dist/components/ui/avatar.module.js.map +1 -0
- package/dist/components/ui/avatar_module.css +35 -0
- package/dist/components/ui/avatar_module.css.map +1 -0
- package/dist/components/ui/background-beams.d.ts +21 -3
- package/dist/components/ui/background-beams.d.ts.map +1 -1
- package/dist/components/ui/background-beams.js +22 -11
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/background-beams.module.js +8 -0
- package/dist/components/ui/background-beams.module.js.map +1 -0
- package/dist/components/ui/background-beams_module.css +22 -0
- package/dist/components/ui/background-beams_module.css.map +1 -0
- package/dist/components/ui/badge.d.ts +79 -6
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +19 -23
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/badge.module.js +11 -0
- package/dist/components/ui/badge.module.js.map +1 -0
- package/dist/components/ui/badge_module.css +63 -0
- package/dist/components/ui/badge_module.css.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +158 -13
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +39 -30
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/breadcrumb.module.js +14 -0
- package/dist/components/ui/breadcrumb.module.js.map +1 -0
- package/dist/components/ui/breadcrumb_module.css +90 -0
- package/dist/components/ui/breadcrumb_module.css.map +1 -0
- package/dist/components/ui/bubble-background.d.ts +38 -10
- package/dist/components/ui/bubble-background.d.ts.map +1 -1
- package/dist/components/ui/bubble-background.js +33 -35
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/bubble-background.module.js +20 -0
- package/dist/components/ui/bubble-background.module.js.map +1 -0
- package/dist/components/ui/bubble-background_module.css +99 -0
- package/dist/components/ui/bubble-background_module.css.map +1 -0
- package/dist/components/ui/button-group.d.ts +88 -8
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/button-group.js +35 -32
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button-group.module.js +11 -0
- package/dist/components/ui/button-group.module.js.map +1 -0
- package/dist/components/ui/button-group_module.css +79 -0
- package/dist/components/ui/button-group_module.css.map +1 -0
- package/dist/components/ui/button.d.ts +82 -7
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +69 -34
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/button.module.js +17 -0
- package/dist/components/ui/button.module.js.map +1 -0
- package/dist/components/ui/button_module.css +137 -0
- package/dist/components/ui/button_module.css.map +1 -0
- package/dist/components/ui/calendar.d.ts +39 -5
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +72 -61
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/calendar.module.js +35 -0
- package/dist/components/ui/calendar.module.js.map +1 -0
- package/dist/components/ui/calendar_module.css +245 -0
- package/dist/components/ui/calendar_module.css.map +1 -0
- package/dist/components/ui/card-skeleton.js +41 -0
- package/dist/components/ui/card-skeleton.js.map +1 -0
- package/dist/components/ui/card-skeleton.module.js +15 -0
- package/dist/components/ui/card-skeleton.module.js.map +1 -0
- package/dist/components/ui/card-skeleton_module.css +54 -0
- package/dist/components/ui/card-skeleton_module.css.map +1 -0
- package/dist/components/ui/card.d.ts +162 -7
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +13 -13
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/card.module.js +13 -0
- package/dist/components/ui/card.module.js.map +1 -0
- package/dist/components/ui/card_module.css +43 -0
- package/dist/components/ui/card_module.css.map +1 -0
- package/dist/components/ui/carousel.d.ts +127 -3
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +63 -36
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/carousel.module.js +17 -0
- package/dist/components/ui/carousel.module.js.map +1 -0
- package/dist/components/ui/carousel_module.css +82 -0
- package/dist/components/ui/carousel_module.css.map +1 -0
- package/dist/components/ui/chart.d.ts +323 -13
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +158 -53
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/chart.module.js +27 -0
- package/dist/components/ui/chart.module.js.map +1 -0
- package/dist/components/ui/chart_module.css +159 -0
- package/dist/components/ui/chart_module.css.map +1 -0
- package/dist/components/ui/checkbox-group.d.ts +31 -0
- package/dist/components/ui/checkbox-group.d.ts.map +1 -0
- package/dist/components/ui/checkbox-group.js +25 -0
- package/dist/components/ui/checkbox-group.js.map +1 -0
- package/dist/components/ui/checkbox-group.module.js +7 -0
- package/dist/components/ui/checkbox-group.module.js.map +1 -0
- package/dist/components/ui/checkbox-group_module.css +11 -0
- package/dist/components/ui/checkbox-group_module.css.map +1 -0
- package/dist/components/ui/checkbox.d.ts +33 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +37 -12
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/checkbox.module.js +8 -0
- package/dist/components/ui/checkbox.module.js.map +1 -0
- package/dist/components/ui/checkbox_module.css +45 -0
- package/dist/components/ui/checkbox_module.css.map +1 -0
- package/dist/components/ui/collapsible.d.ts +87 -3
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +46 -32
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/collapsible.module.js +8 -0
- package/dist/components/ui/collapsible.module.js.map +1 -0
- package/dist/components/ui/collapsible_module.css +26 -0
- package/dist/components/ui/collapsible_module.css.map +1 -0
- package/dist/components/ui/command.d.ts +284 -51
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +391 -50
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/command.module.js +20 -0
- package/dist/components/ui/command.module.js.map +1 -0
- package/dist/components/ui/command_module.css +194 -0
- package/dist/components/ui/command_module.css.map +1 -0
- package/dist/components/ui/context-menu.d.ts +414 -21
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +190 -68
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/context-menu.module.js +19 -0
- package/dist/components/ui/context-menu.module.js.map +1 -0
- package/dist/components/ui/context-menu_module.css +114 -0
- package/dist/components/ui/context-menu_module.css.map +1 -0
- package/dist/components/ui/copy-button.d.ts +41 -0
- package/dist/components/ui/copy-button.d.ts.map +1 -0
- package/dist/components/ui/copy-button.js +51 -0
- package/dist/components/ui/copy-button.js.map +1 -0
- package/dist/components/ui/copy-button.module.js +8 -0
- package/dist/components/ui/copy-button.module.js.map +1 -0
- package/dist/components/ui/copy-button_module.css +37 -0
- package/dist/components/ui/copy-button_module.css.map +1 -0
- package/dist/components/ui/counting-number.d.ts +28 -2
- package/dist/components/ui/counting-number.d.ts.map +1 -1
- package/dist/components/ui/counting-number.js +31 -27
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/counting-number.module.js +7 -0
- package/dist/components/ui/counting-number.module.js.map +1 -0
- package/dist/components/ui/counting-number_module.css +7 -0
- package/dist/components/ui/counting-number_module.css.map +1 -0
- package/dist/components/ui/dialog.d.ts +287 -17
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +129 -52
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dialog.module.js +13 -0
- package/dist/components/ui/dialog.module.js.map +1 -0
- package/dist/components/ui/dialog_module.css +114 -0
- package/dist/components/ui/dialog_module.css.map +1 -0
- package/dist/components/ui/dot-background.d.ts +25 -35
- package/dist/components/ui/dot-background.d.ts.map +1 -1
- package/dist/components/ui/dot-background.js +31 -22
- package/dist/components/ui/dot-background.js.map +1 -1
- package/dist/components/ui/dot-background.module.js +8 -0
- package/dist/components/ui/dot-background.module.js.map +1 -0
- package/dist/components/ui/dot-background_module.css +15 -0
- package/dist/components/ui/dot-background_module.css.map +1 -0
- package/dist/components/ui/drawer.d.ts +287 -18
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +117 -40
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/drawer.module.js +14 -0
- package/dist/components/ui/drawer.module.js.map +1 -0
- package/dist/components/ui/drawer_module.css +86 -0
- package/dist/components/ui/drawer_module.css.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +414 -21
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +189 -68
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu.module.js +19 -0
- package/dist/components/ui/dropdown-menu.module.js.map +1 -0
- package/dist/components/ui/dropdown-menu_module.css +114 -0
- package/dist/components/ui/dropdown-menu_module.css.map +1 -0
- package/dist/components/ui/dropdrawer.d.ts +313 -17
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +423 -159
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/dropdrawer.module.js +43 -0
- package/dist/components/ui/dropdrawer.module.js.map +1 -0
- package/dist/components/ui/dropdrawer_module.css +307 -0
- package/dist/components/ui/dropdrawer_module.css.map +1 -0
- package/dist/components/ui/empty.d.ts +129 -10
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +32 -47
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/empty.module.js +13 -0
- package/dist/components/ui/empty.module.js.map +1 -0
- package/dist/components/ui/empty_module.css +85 -0
- package/dist/components/ui/empty_module.css.map +1 -0
- package/dist/components/ui/error-boundary.js +61 -0
- package/dist/components/ui/error-boundary.js.map +1 -0
- package/dist/components/ui/error-boundary.module.js +10 -0
- package/dist/components/ui/error-boundary.module.js.map +1 -0
- package/dist/components/ui/error-boundary_module.css +41 -0
- package/dist/components/ui/error-boundary_module.css.map +1 -0
- package/dist/components/ui/field.d.ts +225 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +76 -86
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/field.module.js +24 -0
- package/dist/components/ui/field.module.js.map +1 -0
- package/dist/components/ui/field_module.css +185 -0
- package/dist/components/ui/field_module.css.map +1 -0
- package/dist/components/ui/fireworks-background.d.ts +27 -3
- package/dist/components/ui/fireworks-background.d.ts.map +1 -1
- package/dist/components/ui/fireworks-background.js +36 -35
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/fireworks-background.module.js +8 -0
- package/dist/components/ui/fireworks-background.module.js.map +1 -0
- package/dist/components/ui/fireworks-background_module.css +17 -0
- package/dist/components/ui/fireworks-background_module.css.map +1 -0
- package/dist/components/ui/flip-button.d.ts +27 -3
- package/dist/components/ui/flip-button.d.ts.map +1 -1
- package/dist/components/ui/flip-button.js +27 -17
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/flip-button.module.js +11 -0
- package/dist/components/ui/flip-button.module.js.map +1 -0
- package/dist/components/ui/flip-button_module.css +47 -0
- package/dist/components/ui/flip-button_module.css.map +1 -0
- package/dist/components/ui/focus-scope.js +70 -0
- package/dist/components/ui/focus-scope.js.map +1 -0
- package/dist/components/ui/focus-scope.module.js +7 -0
- package/dist/components/ui/focus-scope.module.js.map +1 -0
- package/dist/components/ui/focus-scope_module.css +6 -0
- package/dist/components/ui/focus-scope_module.css.map +1 -0
- package/dist/components/ui/form-skeleton.js +32 -0
- package/dist/components/ui/form-skeleton.js.map +1 -0
- package/dist/components/ui/form-skeleton.module.js +11 -0
- package/dist/components/ui/form-skeleton.module.js.map +1 -0
- package/dist/components/ui/form-skeleton_module.css +30 -0
- package/dist/components/ui/form-skeleton_module.css.map +1 -0
- package/dist/components/ui/form.d.ts +143 -13
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +55 -21
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/form.module.js +10 -0
- package/dist/components/ui/form.module.js.map +1 -0
- package/dist/components/ui/form_module.css +22 -0
- package/dist/components/ui/form_module.css.map +1 -0
- package/dist/components/ui/gradient-background.d.ts +21 -3
- package/dist/components/ui/gradient-background.d.ts.map +1 -1
- package/dist/components/ui/gradient-background.js +8 -4
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-background.module.js +7 -0
- package/dist/components/ui/gradient-background.module.js.map +1 -0
- package/dist/components/ui/gradient-background_module.css +9 -0
- package/dist/components/ui/gradient-background_module.css.map +1 -0
- package/dist/components/ui/gradient-text.d.ts +23 -2
- package/dist/components/ui/gradient-text.d.ts.map +1 -1
- package/dist/components/ui/gradient-text.js +8 -6
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/gradient-text.module.js +9 -0
- package/dist/components/ui/gradient-text.module.js.map +1 -0
- package/dist/components/ui/gradient-text_module.css +24 -0
- package/dist/components/ui/gradient-text_module.css.map +1 -0
- package/dist/components/ui/highlight-text.d.ts +24 -2
- package/dist/components/ui/highlight-text.d.ts.map +1 -1
- package/dist/components/ui/highlight-text.js +7 -10
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/highlight-text.module.js +7 -0
- package/dist/components/ui/highlight-text.module.js.map +1 -0
- package/dist/components/ui/highlight-text_module.css +16 -0
- package/dist/components/ui/highlight-text_module.css.map +1 -0
- package/dist/components/ui/hole-background.d.ts +23 -2
- package/dist/components/ui/hole-background.d.ts.map +1 -1
- package/dist/components/ui/hole-background.js +155 -118
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hole-background.module.js +10 -0
- package/dist/components/ui/hole-background.module.js.map +1 -0
- package/dist/components/ui/hole-background_module.css +85 -0
- package/dist/components/ui/hole-background_module.css.map +1 -0
- package/dist/components/ui/hover-card.d.ts +85 -4
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +52 -10
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/hover-card.module.js +8 -0
- package/dist/components/ui/hover-card.module.js.map +1 -0
- package/dist/components/ui/hover-card_module.css +23 -0
- package/dist/components/ui/hover-card_module.css.map +1 -0
- package/dist/components/ui/input-group.d.ts +132 -13
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js +62 -66
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-group.module.js +20 -0
- package/dist/components/ui/input-group.module.js.map +1 -0
- package/dist/components/ui/input-group_module.css +150 -0
- package/dist/components/ui/input-group_module.css.map +1 -0
- package/dist/components/ui/input-otp.d.ts +110 -30
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +24 -15
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input-otp.module.js +17 -0
- package/dist/components/ui/input-otp.module.js.map +1 -0
- package/dist/components/ui/input-otp_module.css +89 -0
- package/dist/components/ui/input-otp_module.css.map +1 -0
- package/dist/components/ui/input.d.ts +31 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +21 -8
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/input.module.js +7 -0
- package/dist/components/ui/input.module.js.map +1 -0
- package/dist/components/ui/input_module.css +40 -0
- package/dist/components/ui/input_module.css.map +1 -0
- package/dist/components/ui/item.d.ts +221 -19
- package/dist/components/ui/item.d.ts.map +1 -1
- package/dist/components/ui/item.js +66 -90
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/item.module.js +22 -0
- package/dist/components/ui/item.module.js.map +1 -0
- package/dist/components/ui/item_module.css +143 -0
- package/dist/components/ui/item_module.css.map +1 -0
- package/dist/components/ui/kbd.d.ts +43 -2
- package/dist/components/ui/kbd.d.ts.map +1 -1
- package/dist/components/ui/kbd.js +12 -12
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/kbd.module.js +8 -0
- package/dist/components/ui/kbd.module.js.map +1 -0
- package/dist/components/ui/kbd_module.css +35 -0
- package/dist/components/ui/kbd_module.css.map +1 -0
- package/dist/components/ui/label.d.ts +30 -3
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +7 -8
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/label.module.js +7 -0
- package/dist/components/ui/label.module.js.map +1 -0
- package/dist/components/ui/label_module.css +17 -0
- package/dist/components/ui/label_module.css.map +1 -0
- package/dist/components/ui/list-skeleton.js +35 -0
- package/dist/components/ui/list-skeleton.js.map +1 -0
- package/dist/components/ui/list-skeleton.module.js +12 -0
- package/dist/components/ui/list-skeleton.module.js.map +1 -0
- package/dist/components/ui/list-skeleton_module.css +39 -0
- package/dist/components/ui/list-skeleton_module.css.map +1 -0
- package/dist/components/ui/loading-overlay.js +21 -0
- package/dist/components/ui/loading-overlay.js.map +1 -0
- package/dist/components/ui/loading-overlay.module.js +9 -0
- package/dist/components/ui/loading-overlay.module.js.map +1 -0
- package/dist/components/ui/loading-overlay_module.css +22 -0
- package/dist/components/ui/loading-overlay_module.css.map +1 -0
- package/dist/components/ui/menubar.d.ts +422 -22
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +199 -100
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/menubar.module.js +21 -0
- package/dist/components/ui/menubar.module.js.map +1 -0
- package/dist/components/ui/menubar_module.css +145 -0
- package/dist/components/ui/menubar_module.css.map +1 -0
- package/dist/components/ui/meter.d.ts +101 -0
- package/dist/components/ui/meter.d.ts.map +1 -0
- package/dist/components/ui/meter.js +71 -0
- package/dist/components/ui/meter.js.map +1 -0
- package/dist/components/ui/meter.module.js +10 -0
- package/dist/components/ui/meter.module.js.map +1 -0
- package/dist/components/ui/meter_module.css +31 -0
- package/dist/components/ui/meter_module.css.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +242 -11
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +135 -49
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/navigation-menu.module.js +18 -0
- package/dist/components/ui/navigation-menu.module.js.map +1 -0
- package/dist/components/ui/navigation-menu_module.css +112 -0
- package/dist/components/ui/navigation-menu_module.css.map +1 -0
- package/dist/components/ui/number-field.d.ts +144 -0
- package/dist/components/ui/number-field.d.ts.map +1 -0
- package/dist/components/ui/number-field.js +111 -0
- package/dist/components/ui/number-field.js.map +1 -0
- package/dist/components/ui/number-field.module.js +15 -0
- package/dist/components/ui/number-field.module.js.map +1 -0
- package/dist/components/ui/number-field_module.css +125 -0
- package/dist/components/ui/number-field_module.css.map +1 -0
- package/dist/components/ui/pagination.d.ts +150 -24
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +41 -38
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/pagination.module.js +14 -0
- package/dist/components/ui/pagination.module.js.map +1 -0
- package/dist/components/ui/pagination_module.css +66 -0
- package/dist/components/ui/pagination_module.css.map +1 -0
- package/dist/components/ui/popover.d.ts +133 -5
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +68 -14
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/popover.module.js +9 -0
- package/dist/components/ui/popover.module.js.map +1 -0
- package/dist/components/ui/popover_module.css +28 -0
- package/dist/components/ui/popover_module.css.map +1 -0
- package/dist/components/ui/progress.d.ts +34 -2
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +22 -14
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/progress.module.js +8 -0
- package/dist/components/ui/progress.module.js.map +1 -0
- package/dist/components/ui/progress_module.css +20 -0
- package/dist/components/ui/progress_module.css.map +1 -0
- package/dist/components/ui/radio-group.d.ts +44 -3
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +38 -16
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/radio-group.module.js +10 -0
- package/dist/components/ui/radio-group.module.js.map +1 -0
- package/dist/components/ui/radio-group_module.css +44 -0
- package/dist/components/ui/radio-group_module.css.map +1 -0
- package/dist/components/ui/resizable.d.ts +79 -6
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +23 -13
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/resizable.module.js +10 -0
- package/dist/components/ui/resizable.module.js.map +1 -0
- package/dist/components/ui/resizable_module.css +70 -0
- package/dist/components/ui/resizable_module.css.map +1 -0
- package/dist/components/ui/ripple-button.d.ts +23 -2
- package/dist/components/ui/ripple-button.d.ts.map +1 -1
- package/dist/components/ui/ripple-button.js +26 -11
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/ripple-button.module.js +9 -0
- package/dist/components/ui/ripple-button.module.js.map +1 -0
- package/dist/components/ui/ripple-button_module.css +38 -0
- package/dist/components/ui/ripple-button_module.css.map +1 -0
- package/dist/components/ui/scratcher.d.ts +25 -2
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +85 -87
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scratcher.module.js +8 -0
- package/dist/components/ui/scratcher.module.js.map +1 -0
- package/dist/components/ui/scratcher_module.css +13 -0
- package/dist/components/ui/scratcher_module.css.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +46 -3
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +44 -19
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/scroll-area.module.js +14 -0
- package/dist/components/ui/scroll-area.module.js.map +1 -0
- package/dist/components/ui/scroll-area_module.css +51 -0
- package/dist/components/ui/scroll-area_module.css.map +1 -0
- package/dist/components/ui/select.d.ts +269 -11
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +152 -67
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/select.module.js +20 -0
- package/dist/components/ui/select.module.js.map +1 -0
- package/dist/components/ui/select_module.css +134 -0
- package/dist/components/ui/select_module.css.map +1 -0
- package/dist/components/ui/separator.d.ts +36 -2
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +20 -10
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/separator.module.js +9 -0
- package/dist/components/ui/separator.module.js.map +1 -0
- package/dist/components/ui/separator_module.css +17 -0
- package/dist/components/ui/separator_module.css.map +1 -0
- package/dist/components/ui/sheet.d.ts +297 -23
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +121 -63
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sheet.module.js +18 -0
- package/dist/components/ui/sheet.module.js.map +1 -0
- package/dist/components/ui/sheet_module.css +136 -0
- package/dist/components/ui/sheet_module.css.map +1 -0
- package/dist/components/ui/sidebar.d.ts +491 -23
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +214 -143
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/sidebar.module.js +50 -0
- package/dist/components/ui/sidebar.module.js.map +1 -0
- package/dist/components/ui/sidebar_module.css +569 -0
- package/dist/components/ui/sidebar_module.css.map +1 -0
- package/dist/components/ui/skeleton.d.ts +30 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +7 -7
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/skeleton.module.js +8 -0
- package/dist/components/ui/skeleton.module.js.map +1 -0
- package/dist/components/ui/skeleton_module.css +18 -0
- package/dist/components/ui/skeleton_module.css.map +1 -0
- package/dist/components/ui/slider.d.ts +48 -2
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +44 -17
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/slider.module.js +11 -0
- package/dist/components/ui/slider.module.js.map +1 -0
- package/dist/components/ui/slider_module.css +55 -0
- package/dist/components/ui/slider_module.css.map +1 -0
- package/dist/components/ui/sonner.d.ts +137 -4
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +450 -18
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/sonner.module.js +34 -0
- package/dist/components/ui/sonner.module.js.map +1 -0
- package/dist/components/ui/sonner_module.css +233 -0
- package/dist/components/ui/sonner_module.css.map +1 -0
- package/dist/components/ui/spinner.d.ts +20 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +29 -11
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/spinner.module.js +10 -0
- package/dist/components/ui/spinner.module.js.map +1 -0
- package/dist/components/ui/spinner_module.css +28 -0
- package/dist/components/ui/spinner_module.css.map +1 -0
- package/dist/components/ui/stepper.d.ts +48 -0
- package/dist/components/ui/stepper.d.ts.map +1 -0
- package/dist/components/ui/stepper.js +41 -0
- package/dist/components/ui/stepper.js.map +1 -0
- package/dist/components/ui/stepper.module.js +12 -0
- package/dist/components/ui/stepper.module.js.map +1 -0
- package/dist/components/ui/stepper_module.css +75 -0
- package/dist/components/ui/stepper_module.css.map +1 -0
- package/dist/components/ui/switch.d.ts +29 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +21 -9
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/switch.module.js +8 -0
- package/dist/components/ui/switch.module.js.map +1 -0
- package/dist/components/ui/switch_module.css +45 -0
- package/dist/components/ui/switch_module.css.map +1 -0
- package/dist/components/ui/table-skeleton.js +34 -0
- package/dist/components/ui/table-skeleton.js.map +1 -0
- package/dist/components/ui/table-skeleton.module.js +11 -0
- package/dist/components/ui/table-skeleton.module.js.map +1 -0
- package/dist/components/ui/table-skeleton_module.css +32 -0
- package/dist/components/ui/table-skeleton_module.css.map +1 -0
- package/dist/components/ui/table.d.ts +170 -8
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +17 -17
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/table.module.js +15 -0
- package/dist/components/ui/table.module.js.map +1 -0
- package/dist/components/ui/table_module.css +71 -0
- package/dist/components/ui/table_module.css.map +1 -0
- package/dist/components/ui/tabs.d.ts +114 -5
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +71 -20
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/tabs.module.js +10 -0
- package/dist/components/ui/tabs.module.js.map +1 -0
- package/dist/components/ui/tabs_module.css +89 -0
- package/dist/components/ui/tabs_module.css.map +1 -0
- package/dist/components/ui/textarea.d.ts +24 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/textarea.module.js +7 -0
- package/dist/components/ui/textarea.module.js.map +1 -0
- package/dist/components/ui/textarea_module.css +33 -0
- package/dist/components/ui/textarea_module.css.map +1 -0
- package/dist/components/ui/timeline.d.ts +111 -0
- package/dist/components/ui/timeline.d.ts.map +1 -0
- package/dist/components/ui/timeline.js +34 -0
- package/dist/components/ui/timeline.js.map +1 -0
- package/dist/components/ui/timeline.module.js +10 -0
- package/dist/components/ui/timeline.module.js.map +1 -0
- package/dist/components/ui/timeline_module.css +47 -0
- package/dist/components/ui/timeline_module.css.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +81 -10
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +32 -23
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle-group.module.js +7 -0
- package/dist/components/ui/toggle-group.module.js.map +1 -0
- package/dist/components/ui/toggle-group_module.css +8 -0
- package/dist/components/ui/toggle-group_module.css.map +1 -0
- package/dist/components/ui/toggle.d.ts +60 -11
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +29 -29
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/toggle.module.js +12 -0
- package/dist/components/ui/toggle.module.js.map +1 -0
- package/dist/components/ui/toggle_module.css +62 -0
- package/dist/components/ui/toggle_module.css.map +1 -0
- package/dist/components/ui/toolbar.d.ts +127 -0
- package/dist/components/ui/toolbar.d.ts.map +1 -0
- package/dist/components/ui/toolbar.js +85 -0
- package/dist/components/ui/toolbar.js.map +1 -0
- package/dist/components/ui/toolbar.module.js +12 -0
- package/dist/components/ui/toolbar.module.js.map +1 -0
- package/dist/components/ui/toolbar_module.css +115 -0
- package/dist/components/ui/toolbar_module.css.map +1 -0
- package/dist/components/ui/tooltip.d.ts +119 -5
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +48 -13
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/tooltip.module.js +9 -0
- package/dist/components/ui/tooltip.module.js.map +1 -0
- package/dist/components/ui/tooltip_module.css +35 -0
- package/dist/components/ui/tooltip_module.css.map +1 -0
- package/dist/components/ui/typewriter.d.ts +48 -13
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +46 -49
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/components/ui/typewriter.module.js +16 -0
- package/dist/components/ui/typewriter.module.js.map +1 -0
- package/dist/components/ui/typewriter_module.css +102 -0
- package/dist/components/ui/typewriter_module.css.map +1 -0
- package/dist/components/ui/visually-hidden.d.ts +38 -0
- package/dist/components/ui/visually-hidden.d.ts.map +1 -0
- package/dist/components/ui/visually-hidden.js +13 -0
- package/dist/components/ui/visually-hidden.js.map +1 -0
- package/dist/components/ui/visually-hidden.module.js +7 -0
- package/dist/components/ui/visually-hidden.module.js.map +1 -0
- package/dist/components/ui/visually-hidden_module.css +14 -0
- package/dist/components/ui/visually-hidden_module.css.map +1 -0
- package/dist/hooks/useAnnounce.js +46 -0
- package/dist/hooks/useAnnounce.js.map +1 -0
- package/dist/hooks/useBreakpoint.d.ts +17 -0
- package/dist/hooks/useBreakpoint.d.ts.map +1 -0
- package/dist/hooks/useBreakpoint.js +16 -0
- package/dist/hooks/useBreakpoint.js.map +1 -0
- package/dist/hooks/useColorScheme.d.ts +14 -0
- package/dist/hooks/useColorScheme.d.ts.map +1 -0
- package/dist/hooks/useColorScheme.js +9 -0
- package/dist/hooks/useColorScheme.js.map +1 -0
- package/dist/hooks/useFocusManager.js +51 -0
- package/dist/hooks/useFocusManager.js.map +1 -0
- package/dist/hooks/useFocusVisible.d.ts +50 -0
- package/dist/hooks/useFocusVisible.d.ts.map +1 -0
- package/dist/hooks/useFocusVisible.js +35 -0
- package/dist/hooks/useFocusVisible.js.map +1 -0
- package/dist/hooks/useIsMobile.d.ts +5 -11
- package/dist/hooks/useIsMobile.d.ts.map +1 -1
- package/dist/hooks/useIsMobile.js +2 -13
- package/dist/hooks/useIsMobile.js.map +1 -1
- package/dist/hooks/useMediaQuery.d.ts +14 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.js +20 -0
- package/dist/hooks/useMediaQuery.js.map +1 -0
- package/dist/hooks/usePrefersContrast.d.ts +19 -0
- package/dist/hooks/usePrefersContrast.d.ts.map +1 -0
- package/dist/hooks/usePrefersContrast.js +8 -0
- package/dist/hooks/usePrefersContrast.js.map +1 -0
- package/dist/hooks/useReducedMotion.d.ts +19 -0
- package/dist/hooks/useReducedMotion.d.ts.map +1 -0
- package/dist/hooks/useReducedMotion.js +2 -0
- package/dist/index.css +104 -5355
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +40 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +89 -70
- package/dist/lib/color-conversion-utilities.d.ts +82 -0
- package/dist/lib/color-conversion-utilities.d.ts.map +1 -0
- package/dist/lib/color-conversion-utilities.js +94 -0
- package/dist/lib/color-conversion-utilities.js.map +1 -0
- package/dist/lib/utilities.d.ts +5 -4
- package/dist/lib/utilities.d.ts.map +1 -1
- package/dist/lib/utilities.js +1 -2
- package/dist/lib/utilities.js.map +1 -1
- package/dist/motion/Collapse.js +19 -0
- package/dist/motion/Collapse.js.map +1 -0
- package/dist/motion/Collapse.module.js +8 -0
- package/dist/motion/Collapse.module.js.map +1 -0
- package/dist/motion/Collapse_module.css +25 -0
- package/dist/motion/Collapse_module.css.map +1 -0
- package/dist/motion/Presence.js +14 -0
- package/dist/motion/Presence.js.map +1 -0
- package/dist/motion/index.js +5 -0
- package/dist/motion/presets.js +117 -0
- package/dist/motion/presets.js.map +1 -0
- package/dist/motion/tokens.js +41 -0
- package/dist/motion/tokens.js.map +1 -0
- package/package.json +159 -65
- package/src/components/ui/accordion.module.css +70 -0
- package/src/components/ui/accordion.tsx +278 -44
- package/src/components/ui/alert-dialog.module.css +87 -0
- package/src/components/ui/alert-dialog.tsx +474 -99
- package/src/components/ui/alert.module.css +57 -0
- package/src/components/ui/alert.tsx +136 -43
- package/src/components/ui/aspect-ratio.module.css +7 -0
- package/src/components/ui/aspect-ratio.tsx +38 -3
- package/src/components/ui/async-boundary.tsx +56 -0
- package/src/components/ui/avatar.module.css +31 -0
- package/src/components/ui/avatar.tsx +146 -36
- package/src/components/ui/background-beams.module.css +20 -0
- package/src/components/ui/background-beams.tsx +173 -134
- package/src/components/ui/badge.module.css +60 -0
- package/src/components/ui/badge.tsx +100 -32
- package/src/components/ui/breadcrumb.module.css +87 -0
- package/src/components/ui/breadcrumb.tsx +256 -74
- package/src/components/ui/bubble-background.module.css +97 -0
- package/src/components/ui/bubble-background.tsx +92 -52
- package/src/components/ui/button-group.module.css +76 -0
- package/src/components/ui/button-group.tsx +135 -46
- package/src/components/ui/button.module.css +138 -0
- package/src/components/ui/button.tsx +159 -41
- package/src/components/ui/calendar.module.css +250 -0
- package/src/components/ui/calendar.tsx +133 -103
- package/src/components/ui/card-skeleton.module.css +50 -0
- package/src/components/ui/card-skeleton.tsx +69 -0
- package/src/components/ui/card.module.css +41 -0
- package/src/components/ui/card.tsx +175 -22
- package/src/components/ui/carousel.module.css +80 -0
- package/src/components/ui/carousel.tsx +184 -43
- package/src/components/ui/chart.module.css +164 -0
- package/src/components/ui/chart.tsx +444 -102
- package/src/components/ui/checkbox-group.module.css +8 -0
- package/src/components/ui/checkbox-group.tsx +54 -0
- package/src/components/ui/checkbox.module.css +43 -0
- package/src/components/ui/checkbox.tsx +73 -19
- package/src/components/ui/collapsible.module.css +24 -0
- package/src/components/ui/collapsible.tsx +139 -3
- package/src/components/ui/command.module.css +193 -0
- package/src/components/ui/command.tsx +877 -113
- package/src/components/ui/context-menu.module.css +113 -0
- package/src/components/ui/context-menu.tsx +616 -157
- package/src/components/ui/copy-button.module.css +34 -0
- package/src/components/ui/copy-button.tsx +116 -0
- package/src/components/ui/counting-number.module.css +4 -0
- package/src/components/ui/counting-number.tsx +69 -31
- package/src/components/ui/dialog.module.css +113 -0
- package/src/components/ui/dialog.tsx +427 -81
- package/src/components/ui/dot-background.module.css +12 -0
- package/src/components/ui/dot-background.tsx +134 -126
- package/src/components/ui/drawer.module.css +85 -0
- package/src/components/ui/drawer.tsx +408 -80
- package/src/components/ui/dropdown-menu.module.css +113 -0
- package/src/components/ui/dropdown-menu.tsx +616 -159
- package/src/components/ui/dropdrawer.module.css +322 -0
- package/src/components/ui/dropdrawer.tsx +850 -398
- package/src/components/ui/empty.module.css +84 -0
- package/src/components/ui/empty.tsx +176 -52
- package/src/components/ui/error-boundary.module.css +36 -0
- package/src/components/ui/error-boundary.tsx +127 -0
- package/src/components/ui/field.module.css +179 -0
- package/src/components/ui/field.tsx +345 -139
- package/src/components/ui/fireworks-background.module.css +13 -0
- package/src/components/ui/fireworks-background.tsx +89 -51
- package/src/components/ui/flip-button.module.css +44 -0
- package/src/components/ui/flip-button.tsx +59 -28
- package/src/components/ui/focus-scope.module.css +3 -0
- package/src/components/ui/focus-scope.tsx +160 -0
- package/src/components/ui/form-skeleton.module.css +28 -0
- package/src/components/ui/form-skeleton.tsx +62 -0
- package/src/components/ui/form.module.css +20 -0
- package/src/components/ui/form.tsx +244 -33
- package/src/components/ui/gradient-background.module.css +6 -0
- package/src/components/ui/gradient-background.tsx +27 -5
- package/src/components/ui/gradient-text.module.css +23 -0
- package/src/components/ui/gradient-text.tsx +36 -9
- package/src/components/ui/highlight-text.module.css +14 -0
- package/src/components/ui/highlight-text.tsx +37 -15
- package/src/components/ui/hole-background.module.css +84 -0
- package/src/components/ui/hole-background.tsx +290 -162
- package/src/components/ui/hover-card.module.css +21 -0
- package/src/components/ui/hover-card.tsx +142 -21
- package/src/components/ui/input-group.module.css +148 -0
- package/src/components/ui/input-group.tsx +222 -98
- package/src/components/ui/input-otp.module.css +92 -0
- package/src/components/ui/input-otp.tsx +159 -33
- package/src/components/ui/input.module.css +37 -0
- package/src/components/ui/input.tsx +56 -14
- package/src/components/ui/item.module.css +143 -0
- package/src/components/ui/item.tsx +331 -104
- package/src/components/ui/kbd.module.css +31 -0
- package/src/components/ui/kbd.tsx +60 -17
- package/src/components/ui/label.module.css +13 -0
- package/src/components/ui/label.tsx +38 -14
- package/src/components/ui/list-skeleton.module.css +35 -0
- package/src/components/ui/list-skeleton.tsx +70 -0
- package/src/components/ui/loading-overlay.module.css +19 -0
- package/src/components/ui/loading-overlay.tsx +72 -0
- package/src/components/ui/menubar.module.css +144 -0
- package/src/components/ui/menubar.tsx +605 -192
- package/src/components/ui/meter.module.css +32 -0
- package/src/components/ui/meter.tsx +170 -0
- package/src/components/ui/navigation-menu.module.css +110 -0
- package/src/components/ui/navigation-menu.tsx +375 -101
- package/src/components/ui/number-field.module.css +126 -0
- package/src/components/ui/number-field.tsx +254 -0
- package/src/components/ui/pagination.module.css +64 -0
- package/src/components/ui/pagination.tsx +250 -72
- package/src/components/ui/popover.module.css +26 -0
- package/src/components/ui/popover.tsx +207 -25
- package/src/components/ui/progress.module.css +15 -0
- package/src/components/ui/progress.tsx +53 -16
- package/src/components/ui/radio-group.module.css +41 -0
- package/src/components/ui/radio-group.tsx +91 -34
- package/src/components/ui/resizable.module.css +67 -0
- package/src/components/ui/resizable.tsx +106 -26
- package/src/components/ui/ripple-button.module.css +35 -0
- package/src/components/ui/ripple-button.tsx +55 -21
- package/src/components/ui/scratcher.module.css +9 -0
- package/src/components/ui/scratcher.tsx +129 -99
- package/src/components/ui/scroll-area.module.css +47 -0
- package/src/components/ui/scroll-area.tsx +96 -34
- package/src/components/ui/select.module.css +131 -0
- package/src/components/ui/select.tsx +435 -124
- package/src/components/ui/separator.module.css +14 -0
- package/src/components/ui/separator.tsx +59 -18
- package/src/components/ui/sheet.module.css +138 -0
- package/src/components/ui/sheet.tsx +424 -95
- package/src/components/ui/sidebar.module.css +594 -0
- package/src/components/ui/sidebar.tsx +899 -425
- package/src/components/ui/skeleton.module.css +14 -0
- package/src/components/ui/skeleton.tsx +39 -9
- package/src/components/ui/slider.module.css +48 -0
- package/src/components/ui/slider.tsx +89 -16
- package/src/components/ui/sonner.module.css +246 -0
- package/src/components/ui/sonner.tsx +769 -25
- package/src/components/ui/spinner.module.css +25 -0
- package/src/components/ui/spinner.tsx +51 -12
- package/src/components/ui/stepper.module.css +72 -0
- package/src/components/ui/stepper.tsx +95 -0
- package/src/components/ui/switch.module.css +42 -0
- package/src/components/ui/switch.tsx +53 -20
- package/src/components/ui/table-skeleton.module.css +29 -0
- package/src/components/ui/table-skeleton.tsx +79 -0
- package/src/components/ui/table.module.css +66 -0
- package/src/components/ui/table.tsx +235 -61
- package/src/components/ui/tabs.module.css +89 -0
- package/src/components/ui/tabs.tsx +192 -45
- package/src/components/ui/textarea.module.css +30 -0
- package/src/components/ui/textarea.tsx +30 -10
- package/src/components/ui/timeline.module.css +43 -0
- package/src/components/ui/timeline.tsx +153 -0
- package/src/components/ui/toggle-group.module.css +5 -0
- package/src/components/ui/toggle-group.tsx +116 -35
- package/src/components/ui/toggle.module.css +57 -0
- package/src/components/ui/toggle.tsx +89 -33
- package/src/components/ui/toolbar.module.css +112 -0
- package/src/components/ui/toolbar.tsx +210 -0
- package/src/components/ui/tooltip.module.css +39 -0
- package/src/components/ui/tooltip.tsx +181 -24
- package/src/components/ui/typewriter.module.css +101 -0
- package/src/components/ui/typewriter.tsx +130 -128
- package/src/components/ui/visually-hidden.module.css +11 -0
- package/src/components/ui/visually-hidden.tsx +50 -0
- package/src/css-modules.d.ts +9 -0
- package/src/hooks/useAnnounce.tsx +73 -0
- package/src/hooks/useBreakpoint.tsx +41 -0
- package/src/hooks/useColorScheme.tsx +23 -0
- package/src/hooks/useFocusManager.tsx +89 -0
- package/src/hooks/useFocusVisible.tsx +88 -0
- package/src/hooks/useIsMobile.tsx +7 -28
- package/src/hooks/useMediaQuery.tsx +34 -0
- package/src/hooks/usePrefersContrast.tsx +24 -0
- package/src/hooks/useReducedMotion.tsx +20 -0
- package/src/index.css +127 -65
- package/src/index.ts +223 -16
- package/src/lib/color-conversion-utilities.ts +165 -0
- package/src/lib/utilities.ts +7 -6
- package/src/motion/Collapse.module.css +22 -0
- package/src/motion/Collapse.tsx +52 -0
- package/src/motion/Presence.tsx +44 -0
- package/src/motion/index.ts +13 -0
- package/src/motion/presets.ts +77 -0
- package/src/motion/tokens.ts +37 -0
|
@@ -1,24 +1,456 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import "react";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Toast } from "@base-ui/react/toast";
|
|
4
|
+
import { AlertCircle, BellRing, CheckCircle2, Info, LoaderCircle, TriangleAlert, X } from "lucide-react";
|
|
5
|
+
import { isValidElement, useEffect, useId } from "react";
|
|
6
|
+
import { cn } from "../../lib/utilities.js";
|
|
7
|
+
import sonner_module from "./sonner.module.js";
|
|
8
|
+
const DEFAULT_TOAST_DURATION = 5000;
|
|
9
|
+
const DEFAULT_TOAST_LIMIT = 3;
|
|
10
|
+
const DEFAULT_TOAST_CLOSE_LABEL = "Close notification";
|
|
11
|
+
const DEFAULT_VIEWPORT_ARIA_LABEL = "Notifications";
|
|
12
|
+
const positionStyles = {
|
|
13
|
+
"bottom-center": sonner_module.viewportBottomCenter,
|
|
14
|
+
"bottom-left": sonner_module.viewportBottomLeft,
|
|
15
|
+
"bottom-right": sonner_module.viewportBottomRight,
|
|
16
|
+
"top-center": sonner_module.viewportTopCenter,
|
|
17
|
+
"top-left": sonner_module.viewportTopLeft,
|
|
18
|
+
"top-right": sonner_module.viewportTopRight
|
|
19
|
+
};
|
|
20
|
+
const variantStyles = {
|
|
21
|
+
default: sonner_module["default"],
|
|
22
|
+
error: sonner_module.error,
|
|
23
|
+
info: sonner_module.info,
|
|
24
|
+
loading: sonner_module.loading,
|
|
25
|
+
success: sonner_module.success,
|
|
26
|
+
warning: sonner_module.warning
|
|
27
|
+
};
|
|
28
|
+
const toastManager = Toast.createToastManager();
|
|
29
|
+
const toastHistory = [];
|
|
30
|
+
const activeToasts = new Map();
|
|
31
|
+
const toastRecords = new Map();
|
|
32
|
+
const toasterRegistrations = new Map();
|
|
33
|
+
let toastSequence = 0;
|
|
34
|
+
function createToastIdentifier(identifier) {
|
|
35
|
+
if (void 0 !== identifier) return String(identifier);
|
|
36
|
+
if ("function" == typeof globalThis.crypto?.randomUUID) return globalThis.crypto.randomUUID();
|
|
37
|
+
toastSequence += 1;
|
|
38
|
+
return `toast-${String(toastSequence)}`;
|
|
39
|
+
}
|
|
40
|
+
function isRenderableFactory(value) {
|
|
41
|
+
return "function" == typeof value;
|
|
42
|
+
}
|
|
43
|
+
function resolveRenderable(value) {
|
|
44
|
+
const resolvedValue = isRenderableFactory(value) ? value() : value;
|
|
45
|
+
return resolvedValue;
|
|
46
|
+
}
|
|
47
|
+
function getSnapshot(id, variant, title, description) {
|
|
48
|
+
return {
|
|
49
|
+
description,
|
|
50
|
+
id,
|
|
51
|
+
title,
|
|
52
|
+
variant
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function registerToast(snapshot) {
|
|
56
|
+
activeToasts.set(snapshot.id, snapshot);
|
|
57
|
+
toastHistory.push(snapshot);
|
|
58
|
+
}
|
|
59
|
+
function registerToastRecord(record) {
|
|
60
|
+
toastRecords.set(record.snapshot.id, record);
|
|
61
|
+
registerToast(record.snapshot);
|
|
62
|
+
}
|
|
63
|
+
function replaceToastHistorySnapshot(snapshot) {
|
|
64
|
+
for(let index = toastHistory.length - 1; index >= 0; index -= 1)if (toastHistory[index]?.id === snapshot.id) {
|
|
65
|
+
toastHistory[index] = snapshot;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
toastHistory.push(snapshot);
|
|
69
|
+
}
|
|
70
|
+
function replaceToastRecord(record) {
|
|
71
|
+
toastRecords.set(record.snapshot.id, record);
|
|
72
|
+
activeToasts.set(record.snapshot.id, record.snapshot);
|
|
73
|
+
replaceToastHistorySnapshot(record.snapshot);
|
|
74
|
+
}
|
|
75
|
+
function unregisterToast(toastId) {
|
|
76
|
+
if (!toastId) {
|
|
77
|
+
activeToasts.clear();
|
|
78
|
+
toastRecords.clear();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
activeToasts.delete(toastId);
|
|
82
|
+
toastRecords.delete(toastId);
|
|
83
|
+
}
|
|
84
|
+
function getActiveToasterRegistration() {
|
|
85
|
+
const registrations = [
|
|
86
|
+
...toasterRegistrations.values()
|
|
87
|
+
];
|
|
88
|
+
return registrations.at(-1) ?? {
|
|
89
|
+
closeButton: true,
|
|
90
|
+
toastOptions: {}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function mergeToastOptions(options) {
|
|
94
|
+
return {
|
|
95
|
+
...getActiveToasterRegistration().toastOptions,
|
|
96
|
+
...options
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function isToastVariant(value) {
|
|
100
|
+
return "default" === value || "error" === value || "info" === value || "loading" === value || "success" === value || "warning" === value;
|
|
101
|
+
}
|
|
102
|
+
function createToastMetadata(variant, options, closeButton, customContent) {
|
|
103
|
+
return {
|
|
104
|
+
action: options.action,
|
|
105
|
+
cancel: options.cancel,
|
|
106
|
+
className: options.className,
|
|
107
|
+
closeButton,
|
|
108
|
+
closeButtonAriaLabel: options.closeButtonAriaLabel ?? DEFAULT_TOAST_CLOSE_LABEL,
|
|
109
|
+
customContent,
|
|
110
|
+
descriptionClassName: options.descriptionClassName,
|
|
111
|
+
style: options.style,
|
|
112
|
+
variant
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
function createToastRecord({ id, message, options, variant, customContent }) {
|
|
116
|
+
const activeRegistration = getActiveToasterRegistration();
|
|
117
|
+
const closeButton = options.closeButton ?? activeRegistration.closeButton;
|
|
118
|
+
const title = void 0 === message ? void 0 : resolveRenderable(message);
|
|
119
|
+
const description = resolveRenderable(options.description);
|
|
120
|
+
const snapshot = getSnapshot(id, variant, title, description);
|
|
121
|
+
return {
|
|
122
|
+
metadata: createToastMetadata(variant, options, closeButton, customContent),
|
|
123
|
+
options,
|
|
124
|
+
snapshot
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function createToastLifecycleHandlers(toastId, record) {
|
|
128
|
+
return {
|
|
129
|
+
onClose: ()=>{
|
|
130
|
+
record.options.onDismiss?.(activeToasts.get(toastId) ?? record.snapshot);
|
|
18
131
|
},
|
|
19
|
-
|
|
132
|
+
onRemove: ()=>{
|
|
133
|
+
const snapshot = activeToasts.get(toastId) ?? record.snapshot;
|
|
134
|
+
unregisterToast(toastId);
|
|
135
|
+
record.options.onAutoClose?.(snapshot);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function createToastAddPayload(record) {
|
|
140
|
+
const lifecycleHandlers = createToastLifecycleHandlers(record.snapshot.id, record);
|
|
141
|
+
return {
|
|
142
|
+
description: record.snapshot.description,
|
|
143
|
+
id: record.snapshot.id,
|
|
144
|
+
priority: record.options.priority,
|
|
145
|
+
timeout: record.options.duration,
|
|
146
|
+
title: record.snapshot.title,
|
|
147
|
+
type: record.snapshot.variant,
|
|
148
|
+
data: record.metadata,
|
|
149
|
+
...lifecycleHandlers
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function buildToastOptions(message, variant, options) {
|
|
153
|
+
const mergedOptions = mergeToastOptions(options);
|
|
154
|
+
const toastId = createToastIdentifier(mergedOptions.id);
|
|
155
|
+
const record = createToastRecord({
|
|
156
|
+
id: toastId,
|
|
157
|
+
message,
|
|
158
|
+
options: mergedOptions,
|
|
159
|
+
variant
|
|
160
|
+
});
|
|
161
|
+
registerToastRecord(record);
|
|
162
|
+
return createToastAddPayload(record);
|
|
163
|
+
}
|
|
164
|
+
function showToast(message, variant, options) {
|
|
165
|
+
const payload = buildToastOptions(message, variant, options);
|
|
166
|
+
return toastManager.add(payload);
|
|
167
|
+
}
|
|
168
|
+
function dismissToast(toastId) {
|
|
169
|
+
if (void 0 === toastId) {
|
|
170
|
+
unregisterToast();
|
|
171
|
+
toastManager.close();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const normalizedToastId = String(toastId);
|
|
175
|
+
unregisterToast(normalizedToastId);
|
|
176
|
+
toastManager.close(normalizedToastId);
|
|
177
|
+
return normalizedToastId;
|
|
178
|
+
}
|
|
179
|
+
function updateToast(toastId, options) {
|
|
180
|
+
const normalizedToastId = String(toastId);
|
|
181
|
+
const existingRecord = toastRecords.get(normalizedToastId);
|
|
182
|
+
const mergedOptions = {
|
|
183
|
+
...existingRecord?.options ?? {},
|
|
184
|
+
...options
|
|
185
|
+
};
|
|
186
|
+
const variant = options.variant ?? existingRecord?.snapshot.variant ?? "default";
|
|
187
|
+
const nextMessage = void 0 === options.message ? existingRecord?.snapshot.title : resolveRenderable(options.message);
|
|
188
|
+
const nextDescription = void 0 === options.description ? existingRecord?.snapshot.description : resolveRenderable(options.description);
|
|
189
|
+
const metadata = createToastMetadata(variant, mergedOptions, mergedOptions.closeButton ?? existingRecord?.metadata.closeButton ?? getActiveToasterRegistration().closeButton, existingRecord?.metadata.customContent);
|
|
190
|
+
const record = {
|
|
191
|
+
metadata,
|
|
192
|
+
options: mergedOptions,
|
|
193
|
+
snapshot: getSnapshot(normalizedToastId, variant, nextMessage, nextDescription)
|
|
194
|
+
};
|
|
195
|
+
replaceToastRecord(record);
|
|
196
|
+
const payload = {
|
|
197
|
+
description: record.snapshot.description,
|
|
198
|
+
priority: record.options.priority,
|
|
199
|
+
timeout: record.options.duration,
|
|
200
|
+
title: record.snapshot.title,
|
|
201
|
+
type: record.snapshot.variant,
|
|
202
|
+
data: record.metadata,
|
|
203
|
+
...createToastLifecycleHandlers(normalizedToastId, record)
|
|
204
|
+
};
|
|
205
|
+
toastManager.update(normalizedToastId, payload);
|
|
206
|
+
return normalizedToastId;
|
|
207
|
+
}
|
|
208
|
+
function resolvePromiseState(state, value) {
|
|
209
|
+
if ("function" == typeof state) return Promise.resolve(state(value));
|
|
210
|
+
return Promise.resolve(state);
|
|
211
|
+
}
|
|
212
|
+
function isPromiseResolvedOptions(value) {
|
|
213
|
+
return "object" == typeof value && null !== value && "message" in value;
|
|
214
|
+
}
|
|
215
|
+
function isToastAction(value) {
|
|
216
|
+
if (/*#__PURE__*/ isValidElement(value)) return false;
|
|
217
|
+
return "object" == typeof value && null !== value && "label" in value && "onClick" in value;
|
|
218
|
+
}
|
|
219
|
+
function getVariantIcon(variant) {
|
|
220
|
+
const icons = {
|
|
221
|
+
default: /*#__PURE__*/ jsx(BellRing, {
|
|
222
|
+
"aria-hidden": "true",
|
|
223
|
+
className: sonner_module.icon
|
|
224
|
+
}),
|
|
225
|
+
error: /*#__PURE__*/ jsx(AlertCircle, {
|
|
226
|
+
"aria-hidden": "true",
|
|
227
|
+
className: sonner_module.icon
|
|
228
|
+
}),
|
|
229
|
+
info: /*#__PURE__*/ jsx(Info, {
|
|
230
|
+
"aria-hidden": "true",
|
|
231
|
+
className: sonner_module.icon
|
|
232
|
+
}),
|
|
233
|
+
loading: /*#__PURE__*/ jsx(LoaderCircle, {
|
|
234
|
+
"aria-hidden": "true",
|
|
235
|
+
className: cn(sonner_module.icon, sonner_module.iconSpin)
|
|
236
|
+
}),
|
|
237
|
+
success: /*#__PURE__*/ jsx(CheckCircle2, {
|
|
238
|
+
"aria-hidden": "true",
|
|
239
|
+
className: sonner_module.icon
|
|
240
|
+
}),
|
|
241
|
+
warning: /*#__PURE__*/ jsx(TriangleAlert, {
|
|
242
|
+
"aria-hidden": "true",
|
|
243
|
+
className: sonner_module.icon
|
|
244
|
+
})
|
|
245
|
+
};
|
|
246
|
+
return icons[variant];
|
|
247
|
+
}
|
|
248
|
+
function ToastActions({ toastId, action, cancel }) {
|
|
249
|
+
if (!action && !cancel) return null;
|
|
250
|
+
const renderAction = (value, className)=>{
|
|
251
|
+
if (!value) return null;
|
|
252
|
+
if (/*#__PURE__*/ isValidElement(value)) return value;
|
|
253
|
+
if (isToastAction(value)) return /*#__PURE__*/ jsx("button", {
|
|
254
|
+
className: className,
|
|
255
|
+
type: "button",
|
|
256
|
+
onClick: (event)=>{
|
|
257
|
+
value.onClick(event);
|
|
258
|
+
dismissToast(toastId);
|
|
259
|
+
},
|
|
260
|
+
children: value.label
|
|
261
|
+
});
|
|
262
|
+
return null;
|
|
263
|
+
};
|
|
264
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
265
|
+
className: sonner_module.actions,
|
|
266
|
+
children: [
|
|
267
|
+
renderAction(cancel, sonner_module.secondaryAction),
|
|
268
|
+
renderAction(action, sonner_module.primaryAction)
|
|
269
|
+
]
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
function ToastViewportContent() {
|
|
273
|
+
const { toasts } = Toast.useToastManager();
|
|
274
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
275
|
+
children: toasts.map((toastItem)=>{
|
|
276
|
+
const variant = isToastVariant(toastItem.type) ? toastItem.type : "default";
|
|
277
|
+
const action = toastItem.data?.action;
|
|
278
|
+
const cancel = toastItem.data?.cancel;
|
|
279
|
+
return /*#__PURE__*/ jsx(Toast.Root, {
|
|
280
|
+
toast: toastItem,
|
|
281
|
+
className: cn(sonner_module.root, variantStyles[variant], toastItem.data?.className),
|
|
282
|
+
"data-variant": variant,
|
|
283
|
+
style: toastItem.data?.style,
|
|
284
|
+
children: /*#__PURE__*/ jsx(Toast.Content, {
|
|
285
|
+
className: sonner_module.content,
|
|
286
|
+
children: toastItem.data?.customContent ?? /*#__PURE__*/ jsxs(Fragment, {
|
|
287
|
+
children: [
|
|
288
|
+
/*#__PURE__*/ jsx("div", {
|
|
289
|
+
className: sonner_module.leading,
|
|
290
|
+
children: getVariantIcon(variant)
|
|
291
|
+
}),
|
|
292
|
+
/*#__PURE__*/ jsxs("div", {
|
|
293
|
+
className: sonner_module.body,
|
|
294
|
+
children: [
|
|
295
|
+
toastItem.title ? /*#__PURE__*/ jsx(Toast.Title, {
|
|
296
|
+
className: sonner_module.title,
|
|
297
|
+
children: toastItem.title
|
|
298
|
+
}) : null,
|
|
299
|
+
toastItem.description ? /*#__PURE__*/ jsx(Toast.Description, {
|
|
300
|
+
className: cn(sonner_module.description, toastItem.data?.descriptionClassName),
|
|
301
|
+
children: toastItem.description
|
|
302
|
+
}) : null,
|
|
303
|
+
/*#__PURE__*/ jsx(ToastActions, {
|
|
304
|
+
action: action,
|
|
305
|
+
cancel: cancel,
|
|
306
|
+
toastId: toastItem.id
|
|
307
|
+
})
|
|
308
|
+
]
|
|
309
|
+
}),
|
|
310
|
+
toastItem.data?.closeButton ? /*#__PURE__*/ jsx(Toast.Close, {
|
|
311
|
+
"aria-label": toastItem.data.closeButtonAriaLabel,
|
|
312
|
+
className: sonner_module.close,
|
|
313
|
+
children: /*#__PURE__*/ jsx(X, {
|
|
314
|
+
"aria-hidden": "true",
|
|
315
|
+
className: sonner_module.closeIcon
|
|
316
|
+
})
|
|
317
|
+
}) : null
|
|
318
|
+
]
|
|
319
|
+
})
|
|
320
|
+
})
|
|
321
|
+
}, toastItem.id);
|
|
322
|
+
})
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
function Toaster({ className, closeButton = true, containerAriaLabel = DEFAULT_VIEWPORT_ARIA_LABEL, duration = DEFAULT_TOAST_DURATION, position = "bottom-right", style, toastOptions, visibleToasts = DEFAULT_TOAST_LIMIT }) {
|
|
326
|
+
const toasterId = useId();
|
|
327
|
+
useEffect(()=>{
|
|
328
|
+
toasterRegistrations.set(toasterId, {
|
|
329
|
+
closeButton,
|
|
330
|
+
toastOptions: toastOptions ?? {}
|
|
331
|
+
});
|
|
332
|
+
return ()=>{
|
|
333
|
+
toasterRegistrations.delete(toasterId);
|
|
334
|
+
};
|
|
335
|
+
}, [
|
|
336
|
+
closeButton,
|
|
337
|
+
toastOptions,
|
|
338
|
+
toasterId
|
|
339
|
+
]);
|
|
340
|
+
return /*#__PURE__*/ jsx(Toast.Provider, {
|
|
341
|
+
limit: visibleToasts,
|
|
342
|
+
timeout: duration,
|
|
343
|
+
toastManager: toastManager,
|
|
344
|
+
children: /*#__PURE__*/ jsx(Toast.Portal, {
|
|
345
|
+
children: /*#__PURE__*/ jsx(Toast.Viewport, {
|
|
346
|
+
"aria-label": containerAriaLabel,
|
|
347
|
+
className: cn(sonner_module.viewport, positionStyles[position], className),
|
|
348
|
+
style: style,
|
|
349
|
+
children: /*#__PURE__*/ jsx(ToastViewportContent, {})
|
|
350
|
+
})
|
|
351
|
+
})
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
Toaster.displayName = "Toaster";
|
|
355
|
+
const toast = (message, options)=>showToast(message, "default", options);
|
|
356
|
+
toast.success = (message, options)=>showToast(message, "success", options);
|
|
357
|
+
toast.error = (message, options)=>showToast(message, "error", options);
|
|
358
|
+
toast.info = (message, options)=>showToast(message, "info", options);
|
|
359
|
+
toast.warning = (message, options)=>showToast(message, "warning", options);
|
|
360
|
+
toast.loading = (message, options)=>showToast(message, "loading", options);
|
|
361
|
+
toast.message = (message, options)=>showToast(message, "default", options);
|
|
362
|
+
toast.update = (toastId, options)=>updateToast(toastId, options);
|
|
363
|
+
toast.dismiss = (toastId)=>dismissToast(toastId);
|
|
364
|
+
toast.custom = (renderer, options)=>{
|
|
365
|
+
const mergedOptions = mergeToastOptions(options);
|
|
366
|
+
const toastId = createToastIdentifier(mergedOptions.id);
|
|
367
|
+
const record = createToastRecord({
|
|
368
|
+
customContent: renderer(toastId),
|
|
369
|
+
id: toastId,
|
|
370
|
+
options: mergedOptions,
|
|
371
|
+
variant: "default"
|
|
372
|
+
});
|
|
373
|
+
registerToastRecord(record);
|
|
374
|
+
toastManager.add(createToastAddPayload(record));
|
|
375
|
+
return toastId;
|
|
376
|
+
};
|
|
377
|
+
function mergePromiseToastOptions(baseOptions, override) {
|
|
378
|
+
if (!override) return baseOptions;
|
|
379
|
+
return {
|
|
380
|
+
action: override.action ?? baseOptions.action,
|
|
381
|
+
cancel: override.cancel ?? baseOptions.cancel,
|
|
382
|
+
className: override.className ?? baseOptions.className,
|
|
383
|
+
closeButton: override.closeButton ?? baseOptions.closeButton,
|
|
384
|
+
closeButtonAriaLabel: override.closeButtonAriaLabel ?? baseOptions.closeButtonAriaLabel,
|
|
385
|
+
description: override.description ?? baseOptions.description,
|
|
386
|
+
descriptionClassName: override.descriptionClassName ?? baseOptions.descriptionClassName,
|
|
387
|
+
duration: override.duration ?? baseOptions.duration,
|
|
388
|
+
id: override.id ?? baseOptions.id,
|
|
389
|
+
onAutoClose: override.onAutoClose ?? baseOptions.onAutoClose,
|
|
390
|
+
onDismiss: override.onDismiss ?? baseOptions.onDismiss,
|
|
391
|
+
priority: override.priority ?? baseOptions.priority,
|
|
392
|
+
style: override.style ?? baseOptions.style
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function getPromiseBaseOptions(options) {
|
|
396
|
+
return {
|
|
397
|
+
action: options?.action,
|
|
398
|
+
cancel: options?.cancel,
|
|
399
|
+
className: options?.className,
|
|
400
|
+
closeButton: options?.closeButton,
|
|
401
|
+
closeButtonAriaLabel: options?.closeButtonAriaLabel,
|
|
402
|
+
description: options?.description,
|
|
403
|
+
descriptionClassName: options?.descriptionClassName,
|
|
404
|
+
duration: options?.duration,
|
|
405
|
+
id: options?.id,
|
|
406
|
+
onAutoClose: options?.onAutoClose,
|
|
407
|
+
onDismiss: options?.onDismiss,
|
|
408
|
+
priority: options?.priority,
|
|
409
|
+
style: options?.style
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
function showResolvedPromiseToast(loadingToastId, variant, resolvedState, baseOptions) {
|
|
413
|
+
if (!resolvedState) {
|
|
414
|
+
if (loadingToastId) dismissToast(loadingToastId);
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const overrideOptions = isPromiseResolvedOptions(resolvedState) ? resolvedState : void 0;
|
|
418
|
+
const message = isPromiseResolvedOptions(resolvedState) ? resolvedState.message : resolvedState;
|
|
419
|
+
const mergedOptions = mergePromiseToastOptions(baseOptions, overrideOptions);
|
|
420
|
+
if (loadingToastId) return void toast.update(loadingToastId, {
|
|
421
|
+
...mergedOptions,
|
|
422
|
+
message,
|
|
423
|
+
variant
|
|
20
424
|
});
|
|
425
|
+
showToast(message, variant, mergedOptions);
|
|
426
|
+
}
|
|
427
|
+
toast.promise = async function(promiseValue, options) {
|
|
428
|
+
const pendingPromise = "function" == typeof promiseValue ? promiseValue() : promiseValue;
|
|
429
|
+
const baseOptions = getPromiseBaseOptions(options);
|
|
430
|
+
const loadingState = options?.loading;
|
|
431
|
+
const loadingOptions = isPromiseResolvedOptions(loadingState) ? loadingState : void 0;
|
|
432
|
+
const loadingMessage = isPromiseResolvedOptions(loadingState) ? loadingState.message : loadingState;
|
|
433
|
+
const loadingToastId = loadingMessage ? toast.loading(loadingMessage, mergePromiseToastOptions(baseOptions, loadingOptions)) : void 0;
|
|
434
|
+
try {
|
|
435
|
+
const result = await pendingPromise;
|
|
436
|
+
const successState = await resolvePromiseState(options?.success, result);
|
|
437
|
+
showResolvedPromiseToast(loadingToastId, "success", successState, baseOptions);
|
|
438
|
+
return result;
|
|
439
|
+
} catch (error) {
|
|
440
|
+
const errorState = await resolvePromiseState(options?.error, error);
|
|
441
|
+
showResolvedPromiseToast(loadingToastId, "error", errorState, baseOptions);
|
|
442
|
+
throw error;
|
|
443
|
+
} finally{
|
|
444
|
+
const handleFinally = options?.finally;
|
|
445
|
+
if (handleFinally) await handleFinally();
|
|
446
|
+
}
|
|
21
447
|
};
|
|
22
|
-
|
|
448
|
+
toast.getToasts = ()=>[
|
|
449
|
+
...activeToasts.values()
|
|
450
|
+
];
|
|
451
|
+
toast.getHistory = ()=>[
|
|
452
|
+
...toastHistory
|
|
453
|
+
];
|
|
454
|
+
export { Toaster, toast };
|
|
23
455
|
|
|
24
456
|
//# sourceMappingURL=sonner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/sonner.js","sources":["../../../src/components/ui/sonner.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {useTheme} from \"next-themes\";\r\nimport * as React from \"react\";\r\nimport {Toaster as Sonner, toast} from \"sonner\";\r\n\r\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\r\n\r\nconst Toaster = ({...props}: ToasterProps) => {\r\n const {theme = \"system\"} = useTheme();\r\n\r\n return (\r\n <Sonner\r\n theme={theme as ToasterProps[\"theme\"]}\r\n className='toaster group'\r\n toastOptions={{\r\n classNames: {\r\n toast:\r\n \"group toast group-[.toaster]:bg-white group-[.toaster]:text-neutral-950 group-[.toaster]:border-neutral-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-neutral-950 dark:group-[.toaster]:text-neutral-50 dark:group-[.toaster]:border-neutral-800\",\r\n description: \"group-[.toast]:text-neutral-500 dark:group-[.toast]:text-neutral-400\",\r\n actionButton:\r\n \"group-[.toast]:bg-neutral-900 group-[.toast]:text-neutral-50 dark:group-[.toast]:bg-neutral-50 dark:group-[.toast]:text-neutral-900\",\r\n cancelButton:\r\n \"group-[.toast]:bg-neutral-100 group-[.toast]:text-neutral-500 dark:group-[.toast]:bg-neutral-800 dark:group-[.toast]:text-neutral-400\",\r\n },\r\n }}\r\n {...props}\r\n />\r\n );\r\n};\r\n\r\nexport {\r\n // eslint-disable-next-line unicorn/prefer-export-from -- same export style.\r\n toast,\r\n Toaster,\r\n};\r\n"],"names":["Toaster","props","theme","useTheme","Sonner"],"mappings":";;;;;AAQA,MAAMA,iBAAU,CAAC,EAAC,GAAGC,OAAoB;IACvC,MAAM,EAACC,QAAQ,QAAQ,EAAC,GAAGC;IAE3B,OAAO,WAAP,GACE,IAACC,SAAMA;QACL,OAAOF;QACP,WAAU;QACV,cAAc;YACZ,YAAY;gBACV,OACE;gBACF,aAAa;gBACb,cACE;gBACF,cACE;YACJ;QACF;QACC,GAAGD,KAAK;;AAGf"}
|
|
1
|
+
{"version":3,"file":"components/ui/sonner.js","sources":["../../../src/components/ui/sonner.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/**\r\n * @fileoverview Base UI-backed toast provider and imperative toast bridge.\r\n *\r\n * Replaces the previous `sonner` runtime dependency while preserving the existing public exports:\r\n * `Toaster` for container rendering and `toast` for imperative notifications used throughout the\r\n * website and component consumers.\r\n */\r\n\r\nimport {Toast} from \"@base-ui/react/toast\";\r\nimport {AlertCircle, BellRing, CheckCircle2, Info, LoaderCircle, TriangleAlert, X} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./sonner.module.css\";\r\n\r\nconst DEFAULT_TOAST_DURATION = 5000;\r\nconst DEFAULT_TOAST_LIMIT = 3;\r\nconst DEFAULT_TOAST_CLOSE_LABEL = \"Close notification\";\r\nconst DEFAULT_VIEWPORT_ARIA_LABEL = \"Notifications\";\r\n\r\ntype ToastPosition = \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\" | \"top-center\" | \"bottom-center\";\r\ntype ToastVariant = \"default\" | \"success\" | \"error\" | \"info\" | \"warning\" | \"loading\";\r\ntype ToastIdentifier = number | string;\r\ntype ToastRenderable = React.ReactNode | (() => React.ReactNode);\r\ntype ToastPromise<Value> = Promise<Value> | (() => Promise<Value>);\r\ntype ResolvedPromiseState = ToastRenderable | ToastPromiseResolvedOptions | undefined;\r\n\r\ninterface ToastAction {\r\n label: React.ReactNode;\r\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;\r\n}\r\n\r\ntype ToastActionRenderable = React.ReactNode | ToastAction;\r\n\r\ninterface ToastOptions {\r\n id?: ToastIdentifier;\r\n description?: ToastRenderable;\r\n duration?: number;\r\n className?: string;\r\n descriptionClassName?: string;\r\n closeButton?: boolean;\r\n closeButtonAriaLabel?: string;\r\n style?: React.CSSProperties;\r\n priority?: \"high\" | \"low\";\r\n action?: ToastActionRenderable;\r\n cancel?: ToastActionRenderable;\r\n onDismiss?: (toast: ToastSnapshot) => void;\r\n onAutoClose?: (toast: ToastSnapshot) => void;\r\n}\r\n\r\ninterface ToastPromiseResolvedOptions extends ToastOptions {\r\n message: ToastRenderable;\r\n}\r\n\r\ntype ToastPromiseState<Value> =\r\n | ToastRenderable\r\n | ToastPromiseResolvedOptions\r\n | ((value: Value) => ToastRenderable | ToastPromiseResolvedOptions | Promise<ToastRenderable | ToastPromiseResolvedOptions>);\r\n\r\ninterface ToastPromiseOptions<Value> extends ToastOptions {\r\n loading?: ToastRenderable | ToastPromiseResolvedOptions;\r\n success?: ToastPromiseState<Value>;\r\n error?: ToastPromiseState<unknown>;\r\n finally?: () => void | Promise<void>;\r\n}\r\n\r\ninterface ToasterProps {\r\n /**\r\n * Screen position used for the toast viewport.\r\n * @default \"bottom-right\"\r\n */\r\n position?: ToastPosition;\r\n /**\r\n * Default auto-dismiss duration, in milliseconds, for each toast.\r\n * @default 5000\r\n */\r\n duration?: number;\r\n /**\r\n * Maximum number of simultaneously visible toasts.\r\n * @default 3\r\n */\r\n visibleToasts?: number;\r\n /**\r\n * Whether to render a close button for each toast by default.\r\n * @default true\r\n */\r\n closeButton?: boolean;\r\n /**\r\n * Accessible label announced for the toast viewport container.\r\n * @default \"Notifications\"\r\n */\r\n containerAriaLabel?: string;\r\n /**\r\n * Additional CSS classes merged with the toast viewport.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Inline styles applied to the toast viewport.\r\n * @default undefined\r\n */\r\n style?: React.CSSProperties;\r\n /**\r\n * Default options merged into each toast created while this toaster is mounted.\r\n * @default undefined\r\n */\r\n toastOptions?: ToastOptions;\r\n}\r\n\r\ninterface ToastSnapshot {\r\n id: string;\r\n variant: ToastVariant;\r\n title?: React.ReactNode;\r\n description?: React.ReactNode;\r\n}\r\n\r\ninterface ToastMetadata {\r\n variant: ToastVariant;\r\n className?: string;\r\n descriptionClassName?: string;\r\n closeButton: boolean;\r\n closeButtonAriaLabel: string;\r\n style?: React.CSSProperties;\r\n action?: ToastActionRenderable;\r\n cancel?: ToastActionRenderable;\r\n customContent?: React.ReactNode;\r\n}\r\n\r\ninterface ToastUpdateOptions extends ToastOptions {\r\n message?: ToastRenderable;\r\n variant?: ToastVariant;\r\n}\r\n\r\ninterface ToasterRegistration {\r\n closeButton: boolean;\r\n toastOptions: ToastOptions;\r\n}\r\n\r\ninterface ToastRecord {\r\n metadata: ToastMetadata;\r\n options: ToastOptions;\r\n snapshot: ToastSnapshot;\r\n}\r\n\r\ninterface ToastApi {\r\n (message: ToastRenderable, options?: ToastOptions): string;\r\n success: (message: ToastRenderable, options?: ToastOptions) => string;\r\n error: (message: ToastRenderable, options?: ToastOptions) => string;\r\n info: (message: ToastRenderable, options?: ToastOptions) => string;\r\n warning: (message: ToastRenderable, options?: ToastOptions) => string;\r\n loading: (message: ToastRenderable, options?: ToastOptions) => string;\r\n message: (message: ToastRenderable, options?: ToastOptions) => string;\r\n update: (toastId: ToastIdentifier, options: ToastUpdateOptions) => string;\r\n dismiss: (toastId?: ToastIdentifier) => string | undefined;\r\n promise: <Value>(promise: ToastPromise<Value>, options?: ToastPromiseOptions<Value>) => Promise<Value>;\r\n custom: (renderer: (toastId: string) => React.ReactElement, options?: ToastOptions) => string;\r\n getToasts: () => ReadonlyArray<ToastSnapshot>;\r\n getHistory: () => ReadonlyArray<ToastSnapshot>;\r\n}\r\n\r\nconst positionStyles: Record<ToastPosition, string> = {\r\n \"bottom-center\": styles.viewportBottomCenter,\r\n \"bottom-left\": styles.viewportBottomLeft,\r\n \"bottom-right\": styles.viewportBottomRight,\r\n \"top-center\": styles.viewportTopCenter,\r\n \"top-left\": styles.viewportTopLeft,\r\n \"top-right\": styles.viewportTopRight,\r\n};\r\n\r\nconst variantStyles: Record<ToastVariant, string> = {\r\n default: styles.default,\r\n error: styles.error,\r\n info: styles.info,\r\n loading: styles.loading,\r\n success: styles.success,\r\n warning: styles.warning,\r\n};\r\n\r\nconst toastManager = Toast.createToastManager<ToastMetadata>();\r\ntype ToastAddOptions = Parameters<typeof toastManager.add>[0];\r\ntype ToastUpdatePayload = Parameters<typeof toastManager.update>[1];\r\nconst toastHistory: ToastSnapshot[] = [];\r\nconst activeToasts = new Map<string, ToastSnapshot>();\r\nconst toastRecords = new Map<string, ToastRecord>();\r\nconst toasterRegistrations = new Map<string, ToasterRegistration>();\r\n\r\nlet toastSequence = 0;\r\n\r\nfunction createToastIdentifier(identifier?: ToastIdentifier): string {\r\n if (identifier !== undefined) {\r\n return String(identifier);\r\n }\r\n\r\n if (typeof globalThis.crypto?.randomUUID === \"function\") {\r\n return globalThis.crypto.randomUUID();\r\n }\r\n\r\n toastSequence += 1;\r\n return `toast-${String(toastSequence)}`;\r\n}\r\n\r\nfunction isRenderableFactory(value: ToastRenderable | undefined): value is () => React.ReactNode {\r\n return typeof value === \"function\";\r\n}\r\n\r\n// eslint-disable-next-line sonarjs/function-return-type -- React renderables intentionally normalize to one public node type.\r\nfunction resolveRenderable(value?: ToastRenderable): React.ReactNode | undefined {\r\n const resolvedValue = isRenderableFactory(value) ? value() : value;\r\n return resolvedValue;\r\n}\r\n\r\nfunction getSnapshot(id: string, variant: ToastVariant, title?: React.ReactNode, description?: React.ReactNode): ToastSnapshot {\r\n return {\r\n description,\r\n id,\r\n title,\r\n variant,\r\n };\r\n}\r\n\r\nfunction registerToast(snapshot: ToastSnapshot): void {\r\n activeToasts.set(snapshot.id, snapshot);\r\n toastHistory.push(snapshot);\r\n}\r\n\r\nfunction registerToastRecord(record: ToastRecord): void {\r\n toastRecords.set(record.snapshot.id, record);\r\n registerToast(record.snapshot);\r\n}\r\n\r\nfunction replaceToastHistorySnapshot(snapshot: ToastSnapshot): void {\r\n for (let index = toastHistory.length - 1; index >= 0; index -= 1) {\r\n if (toastHistory[index]?.id === snapshot.id) {\r\n toastHistory[index] = snapshot;\r\n return;\r\n }\r\n }\r\n\r\n toastHistory.push(snapshot);\r\n}\r\n\r\nfunction replaceToastRecord(record: ToastRecord): void {\r\n toastRecords.set(record.snapshot.id, record);\r\n activeToasts.set(record.snapshot.id, record.snapshot);\r\n replaceToastHistorySnapshot(record.snapshot);\r\n}\r\n\r\nfunction unregisterToast(toastId?: string): void {\r\n if (!toastId) {\r\n activeToasts.clear();\r\n toastRecords.clear();\r\n return;\r\n }\r\n\r\n activeToasts.delete(toastId);\r\n toastRecords.delete(toastId);\r\n}\r\n\r\nfunction getActiveToasterRegistration(): ToasterRegistration {\r\n const registrations = [...toasterRegistrations.values()];\r\n return registrations.at(-1) ?? {closeButton: true, toastOptions: {}};\r\n}\r\n\r\nfunction mergeToastOptions(options?: ToastOptions): ToastOptions {\r\n return {\r\n ...getActiveToasterRegistration().toastOptions,\r\n ...options,\r\n };\r\n}\r\n\r\nfunction isToastVariant(value: string | undefined): value is ToastVariant {\r\n return value === \"default\" || value === \"error\" || value === \"info\" || value === \"loading\" || value === \"success\" || value === \"warning\";\r\n}\r\n\r\nfunction createToastMetadata(\r\n variant: ToastVariant,\r\n options: ToastOptions,\r\n closeButton: boolean,\r\n customContent?: React.ReactNode,\r\n): ToastMetadata {\r\n return {\r\n action: options.action,\r\n cancel: options.cancel,\r\n className: options.className,\r\n closeButton,\r\n closeButtonAriaLabel: options.closeButtonAriaLabel ?? DEFAULT_TOAST_CLOSE_LABEL,\r\n customContent,\r\n descriptionClassName: options.descriptionClassName,\r\n style: options.style,\r\n variant,\r\n };\r\n}\r\n\r\nfunction createToastRecord({\r\n id,\r\n message,\r\n options,\r\n variant,\r\n customContent,\r\n}: Readonly<{\r\n customContent?: React.ReactNode;\r\n id: string;\r\n message?: ToastRenderable;\r\n options: ToastOptions;\r\n variant: ToastVariant;\r\n}>): ToastRecord {\r\n const activeRegistration = getActiveToasterRegistration();\r\n const closeButton = options.closeButton ?? activeRegistration.closeButton;\r\n const title = message === undefined ? undefined : resolveRenderable(message);\r\n const description = resolveRenderable(options.description);\r\n const snapshot = getSnapshot(id, variant, title, description);\r\n\r\n return {\r\n metadata: createToastMetadata(variant, options, closeButton, customContent),\r\n options,\r\n snapshot,\r\n };\r\n}\r\n\r\nfunction createToastLifecycleHandlers(toastId: string, record: ToastRecord): Pick<ToastAddOptions, \"onClose\" | \"onRemove\"> {\r\n return {\r\n onClose: () => {\r\n record.options.onDismiss?.(activeToasts.get(toastId) ?? record.snapshot);\r\n },\r\n onRemove: () => {\r\n const snapshot = activeToasts.get(toastId) ?? record.snapshot;\r\n unregisterToast(toastId);\r\n record.options.onAutoClose?.(snapshot);\r\n },\r\n };\r\n}\r\n\r\nfunction createToastAddPayload(record: ToastRecord): ToastAddOptions {\r\n const lifecycleHandlers = createToastLifecycleHandlers(record.snapshot.id, record);\r\n\r\n return {\r\n description: record.snapshot.description,\r\n id: record.snapshot.id,\r\n priority: record.options.priority,\r\n timeout: record.options.duration,\r\n title: record.snapshot.title,\r\n type: record.snapshot.variant,\r\n data: record.metadata,\r\n ...lifecycleHandlers,\r\n };\r\n}\r\n\r\nfunction buildToastOptions(message: ToastRenderable, variant: ToastVariant, options?: ToastOptions): ToastAddOptions {\r\n const mergedOptions = mergeToastOptions(options);\r\n const toastId = createToastIdentifier(mergedOptions.id);\r\n const record = createToastRecord({\r\n id: toastId,\r\n message,\r\n options: mergedOptions,\r\n variant,\r\n });\r\n\r\n registerToastRecord(record);\r\n\r\n return createToastAddPayload(record);\r\n}\r\n\r\nfunction showToast(message: ToastRenderable, variant: ToastVariant, options?: ToastOptions): string {\r\n const payload = buildToastOptions(message, variant, options);\r\n return toastManager.add(payload);\r\n}\r\n\r\nfunction dismissToast(toastId?: ToastIdentifier): string | undefined {\r\n if (toastId === undefined) {\r\n unregisterToast();\r\n toastManager.close();\r\n return undefined;\r\n }\r\n\r\n const normalizedToastId = String(toastId);\r\n unregisterToast(normalizedToastId);\r\n toastManager.close(normalizedToastId);\r\n return normalizedToastId;\r\n}\r\n\r\nfunction updateToast(toastId: ToastIdentifier, options: ToastUpdateOptions): string {\r\n const normalizedToastId = String(toastId);\r\n const existingRecord = toastRecords.get(normalizedToastId);\r\n const mergedOptions: ToastOptions = {\r\n ...(existingRecord?.options ?? {}),\r\n ...options,\r\n };\r\n const variant = options.variant ?? existingRecord?.snapshot.variant ?? \"default\";\r\n const nextMessage = options.message === undefined ? existingRecord?.snapshot.title : resolveRenderable(options.message);\r\n const nextDescription = options.description === undefined ? existingRecord?.snapshot.description : resolveRenderable(options.description);\r\n const metadata = createToastMetadata(\r\n variant,\r\n mergedOptions,\r\n mergedOptions.closeButton ?? existingRecord?.metadata.closeButton ?? getActiveToasterRegistration().closeButton,\r\n existingRecord?.metadata.customContent,\r\n );\r\n const record: ToastRecord = {\r\n metadata,\r\n options: mergedOptions,\r\n snapshot: getSnapshot(normalizedToastId, variant, nextMessage, nextDescription),\r\n };\r\n\r\n replaceToastRecord(record);\r\n\r\n const payload: ToastUpdatePayload = {\r\n description: record.snapshot.description,\r\n priority: record.options.priority,\r\n timeout: record.options.duration,\r\n title: record.snapshot.title,\r\n type: record.snapshot.variant,\r\n data: record.metadata,\r\n ...createToastLifecycleHandlers(normalizedToastId, record),\r\n };\r\n\r\n toastManager.update(normalizedToastId, payload);\r\n\r\n return normalizedToastId;\r\n}\r\n\r\nfunction resolvePromiseState<Value>(state: ToastPromiseState<Value> | ResolvedPromiseState, value: Value): Promise<ResolvedPromiseState> {\r\n if (typeof state === \"function\") {\r\n return Promise.resolve(state(value));\r\n }\r\n\r\n return Promise.resolve(state);\r\n}\r\n\r\nfunction isPromiseResolvedOptions(value: ToastRenderable | ToastPromiseResolvedOptions | undefined): value is ToastPromiseResolvedOptions {\r\n return typeof value === \"object\" && value !== null && \"message\" in value;\r\n}\r\n\r\nfunction isToastAction(value: ToastActionRenderable | undefined): value is ToastAction {\r\n if (React.isValidElement(value)) {\r\n return false;\r\n }\r\n\r\n return typeof value === \"object\" && value !== null && \"label\" in value && \"onClick\" in value;\r\n}\r\n\r\n// eslint-disable-next-line sonarjs/function-return-type -- Variant selection intentionally maps to React nodes for a single icon slot.\r\nfunction getVariantIcon(variant: ToastVariant): React.ReactNode {\r\n const icons: Record<ToastVariant, React.ReactNode> = {\r\n default: (\r\n <BellRing\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ),\r\n error: (\r\n <AlertCircle\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ),\r\n info: (\r\n <Info\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ),\r\n loading: (\r\n <LoaderCircle\r\n aria-hidden='true'\r\n className={cn(styles.icon, styles.iconSpin)}\r\n />\r\n ),\r\n success: (\r\n <CheckCircle2\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ),\r\n warning: (\r\n <TriangleAlert\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ),\r\n };\r\n\r\n return icons[variant];\r\n}\r\n\r\nfunction ToastActions({\r\n toastId,\r\n action,\r\n cancel,\r\n}: Readonly<{toastId: string; action?: ToastActionRenderable; cancel?: ToastActionRenderable}>): React.JSX.Element | null {\r\n if (!action && !cancel) {\r\n return null;\r\n }\r\n\r\n const renderAction = (value: ToastActionRenderable | undefined, className: string): React.ReactElement | null => {\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n if (React.isValidElement(value)) {\r\n return value;\r\n }\r\n\r\n if (isToastAction(value)) {\r\n return (\r\n <button\r\n className={className}\r\n type='button'\r\n onClick={(event) => {\r\n value.onClick(event);\r\n dismissToast(toastId);\r\n }}>\r\n {value.label}\r\n </button>\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n return (\r\n <div className={styles.actions}>\r\n {renderAction(cancel, styles.secondaryAction)}\r\n {renderAction(action, styles.primaryAction)}\r\n </div>\r\n );\r\n}\r\n\r\nfunction ToastViewportContent(): React.JSX.Element {\r\n const {toasts} = Toast.useToastManager<ToastMetadata>();\r\n\r\n return (\r\n <>\r\n {toasts.map((toastItem) => {\r\n const variant = isToastVariant(toastItem.type) ? toastItem.type : \"default\";\r\n const action = toastItem.data?.action;\r\n const cancel = toastItem.data?.cancel;\r\n\r\n return (\r\n <Toast.Root\r\n key={toastItem.id}\r\n toast={toastItem}\r\n className={cn(styles.root, variantStyles[variant], toastItem.data?.className)}\r\n data-variant={variant}\r\n style={toastItem.data?.style}>\r\n <Toast.Content className={styles.content}>\r\n {toastItem.data?.customContent ?? (\r\n <>\r\n <div className={styles.leading}>{getVariantIcon(variant)}</div>\r\n <div className={styles.body}>\r\n {toastItem.title ? <Toast.Title className={styles.title}>{toastItem.title}</Toast.Title> : null}\r\n {toastItem.description ? (\r\n <Toast.Description className={cn(styles.description, toastItem.data?.descriptionClassName)}>\r\n {toastItem.description}\r\n </Toast.Description>\r\n ) : null}\r\n <ToastActions\r\n action={action}\r\n cancel={cancel}\r\n toastId={toastItem.id}\r\n />\r\n </div>\r\n {toastItem.data?.closeButton ? (\r\n <Toast.Close\r\n aria-label={toastItem.data.closeButtonAriaLabel}\r\n className={styles.close}>\r\n <X\r\n aria-hidden='true'\r\n className={styles.closeIcon}\r\n />\r\n </Toast.Close>\r\n ) : null}\r\n </>\r\n )}\r\n </Toast.Content>\r\n </Toast.Root>\r\n );\r\n })}\r\n </>\r\n );\r\n}\r\n\r\n/**\r\n * Toast notification container.\r\n *\r\n * @remarks\r\n * Renders the Base UI provider, portal, and viewport with defaults that preserve the previous\r\n * shared `Toaster` export behavior used by the website.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Toaster position='top-right' visibleToasts={5} />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/toast | Base UI Toast Docs}\r\n */\r\nfunction Toaster({\r\n className,\r\n closeButton = true,\r\n containerAriaLabel = DEFAULT_VIEWPORT_ARIA_LABEL,\r\n duration = DEFAULT_TOAST_DURATION,\r\n position = \"bottom-right\",\r\n style,\r\n toastOptions,\r\n visibleToasts = DEFAULT_TOAST_LIMIT,\r\n}: Readonly<ToasterProps>): React.JSX.Element {\r\n const toasterId = React.useId();\r\n\r\n React.useEffect(() => {\r\n toasterRegistrations.set(toasterId, {\r\n closeButton,\r\n toastOptions: toastOptions ?? {},\r\n });\r\n\r\n return () => {\r\n toasterRegistrations.delete(toasterId);\r\n };\r\n }, [closeButton, toastOptions, toasterId]);\r\n\r\n return (\r\n <Toast.Provider\r\n limit={visibleToasts}\r\n timeout={duration}\r\n toastManager={toastManager}>\r\n <Toast.Portal>\r\n <Toast.Viewport\r\n aria-label={containerAriaLabel}\r\n className={cn(styles.viewport, positionStyles[position], className)}\r\n style={style}>\r\n <ToastViewportContent />\r\n </Toast.Viewport>\r\n </Toast.Portal>\r\n </Toast.Provider>\r\n );\r\n}\r\n\r\nToaster.displayName = \"Toaster\";\r\n\r\n/**\r\n * Imperative toast API for creating transient notifications outside React render flows.\r\n *\r\n * @remarks\r\n * Built on Base UI's toast manager and preserved as a drop-in replacement for the previous\r\n * `sonner` export surface.\r\n *\r\n * @example\r\n * ```tsx\r\n * toast.success(\"Profile updated\");\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/toast | Base UI Toast Docs}\r\n */\r\nconst toast = ((message: ToastRenderable, options?: ToastOptions): string => showToast(message, \"default\", options)) as ToastApi;\r\n\r\ntoast.success = (message: ToastRenderable, options?: ToastOptions): string => showToast(message, \"success\", options);\r\ntoast.error = (message: ToastRenderable, options?: ToastOptions): string => showToast(message, \"error\", options);\r\ntoast.info = (message: ToastRenderable, options?: ToastOptions): string => showToast(message, \"info\", options);\r\ntoast.warning = (message: ToastRenderable, options?: ToastOptions): string => showToast(message, \"warning\", options);\r\ntoast.loading = (message: ToastRenderable, options?: ToastOptions): string => showToast(message, \"loading\", options);\r\ntoast.message = (message: ToastRenderable, options?: ToastOptions): string => showToast(message, \"default\", options);\r\ntoast.update = (toastId: ToastIdentifier, options: ToastUpdateOptions): string => updateToast(toastId, options);\r\ntoast.dismiss = (toastId?: ToastIdentifier): string | undefined => dismissToast(toastId);\r\ntoast.custom = (renderer: (toastId: string) => React.ReactElement, options?: ToastOptions): string => {\r\n const mergedOptions = mergeToastOptions(options);\r\n const toastId = createToastIdentifier(mergedOptions.id);\r\n const record = createToastRecord({\r\n customContent: renderer(toastId),\r\n id: toastId,\r\n options: mergedOptions,\r\n variant: \"default\",\r\n });\r\n\r\n registerToastRecord(record);\r\n\r\n toastManager.add(createToastAddPayload(record));\r\n\r\n return toastId;\r\n};\r\nfunction mergePromiseToastOptions(baseOptions: ToastOptions, override?: ToastPromiseResolvedOptions): ToastOptions {\r\n if (!override) {\r\n return baseOptions;\r\n }\r\n\r\n return {\r\n action: override.action ?? baseOptions.action,\r\n cancel: override.cancel ?? baseOptions.cancel,\r\n className: override.className ?? baseOptions.className,\r\n closeButton: override.closeButton ?? baseOptions.closeButton,\r\n closeButtonAriaLabel: override.closeButtonAriaLabel ?? baseOptions.closeButtonAriaLabel,\r\n description: override.description ?? baseOptions.description,\r\n descriptionClassName: override.descriptionClassName ?? baseOptions.descriptionClassName,\r\n duration: override.duration ?? baseOptions.duration,\r\n id: override.id ?? baseOptions.id,\r\n onAutoClose: override.onAutoClose ?? baseOptions.onAutoClose,\r\n onDismiss: override.onDismiss ?? baseOptions.onDismiss,\r\n priority: override.priority ?? baseOptions.priority,\r\n style: override.style ?? baseOptions.style,\r\n };\r\n}\r\n\r\nfunction getPromiseBaseOptions<Value>(options?: ToastPromiseOptions<Value>): ToastOptions {\r\n return {\r\n action: options?.action,\r\n cancel: options?.cancel,\r\n className: options?.className,\r\n closeButton: options?.closeButton,\r\n closeButtonAriaLabel: options?.closeButtonAriaLabel,\r\n description: options?.description,\r\n descriptionClassName: options?.descriptionClassName,\r\n duration: options?.duration,\r\n id: options?.id,\r\n onAutoClose: options?.onAutoClose,\r\n onDismiss: options?.onDismiss,\r\n priority: options?.priority,\r\n style: options?.style,\r\n };\r\n}\r\n\r\nfunction showResolvedPromiseToast(\r\n loadingToastId: string | undefined,\r\n variant: Exclude<ToastVariant, \"default\">,\r\n resolvedState: ToastRenderable | ToastPromiseResolvedOptions | undefined,\r\n baseOptions: ToastOptions,\r\n): void {\r\n if (!resolvedState) {\r\n if (loadingToastId) {\r\n dismissToast(loadingToastId);\r\n }\r\n\r\n return;\r\n }\r\n\r\n const overrideOptions = isPromiseResolvedOptions(resolvedState) ? resolvedState : undefined;\r\n const message = isPromiseResolvedOptions(resolvedState) ? resolvedState.message : resolvedState;\r\n const mergedOptions = mergePromiseToastOptions(baseOptions, overrideOptions);\r\n\r\n if (loadingToastId) {\r\n toast.update(loadingToastId, {\r\n ...mergedOptions,\r\n message,\r\n variant,\r\n });\r\n\r\n return;\r\n }\r\n\r\n showToast(message, variant, mergedOptions);\r\n}\r\n\r\ntoast.promise = async function promise<Value>(promiseValue: ToastPromise<Value>, options?: ToastPromiseOptions<Value>): Promise<Value> {\r\n const pendingPromise = typeof promiseValue === \"function\" ? promiseValue() : promiseValue;\r\n const baseOptions = getPromiseBaseOptions(options);\r\n const loadingState = options?.loading;\r\n const loadingOptions = isPromiseResolvedOptions(loadingState) ? loadingState : undefined;\r\n const loadingMessage = isPromiseResolvedOptions(loadingState) ? loadingState.message : loadingState;\r\n const loadingToastId = loadingMessage ? toast.loading(loadingMessage, mergePromiseToastOptions(baseOptions, loadingOptions)) : undefined;\r\n\r\n try {\r\n const result = await pendingPromise;\r\n const successState = await resolvePromiseState(options?.success, result);\r\n showResolvedPromiseToast(loadingToastId, \"success\", successState, baseOptions);\r\n\r\n return result;\r\n } catch (error: unknown) {\r\n const errorState = await resolvePromiseState(options?.error, error);\r\n showResolvedPromiseToast(loadingToastId, \"error\", errorState, baseOptions);\r\n\r\n throw error;\r\n } finally {\r\n const handleFinally = options?.finally;\r\n if (handleFinally) {\r\n await handleFinally();\r\n }\r\n }\r\n};\r\ntoast.getToasts = (): ReadonlyArray<ToastSnapshot> => [...activeToasts.values()];\r\ntoast.getHistory = (): ReadonlyArray<ToastSnapshot> => [...toastHistory];\r\n\r\nexport type {Toast} from \"@base-ui/react/toast\";\r\nexport {toast, Toaster};\r\n"],"names":["DEFAULT_TOAST_DURATION","DEFAULT_TOAST_LIMIT","DEFAULT_TOAST_CLOSE_LABEL","DEFAULT_VIEWPORT_ARIA_LABEL","positionStyles","styles","variantStyles","toastManager","Toast","toastHistory","activeToasts","Map","toastRecords","toasterRegistrations","toastSequence","createToastIdentifier","identifier","undefined","String","globalThis","isRenderableFactory","value","resolveRenderable","resolvedValue","getSnapshot","id","variant","title","description","registerToast","snapshot","registerToastRecord","record","replaceToastHistorySnapshot","index","replaceToastRecord","unregisterToast","toastId","getActiveToasterRegistration","registrations","mergeToastOptions","options","isToastVariant","createToastMetadata","closeButton","customContent","createToastRecord","message","activeRegistration","createToastLifecycleHandlers","createToastAddPayload","lifecycleHandlers","buildToastOptions","mergedOptions","showToast","payload","dismissToast","normalizedToastId","updateToast","existingRecord","nextMessage","nextDescription","metadata","resolvePromiseState","state","Promise","isPromiseResolvedOptions","isToastAction","React","getVariantIcon","icons","BellRing","AlertCircle","Info","LoaderCircle","cn","CheckCircle2","TriangleAlert","ToastActions","action","cancel","renderAction","className","event","ToastViewportContent","toasts","toastItem","X","Toaster","containerAriaLabel","duration","position","style","toastOptions","visibleToasts","toasterId","toast","renderer","mergePromiseToastOptions","baseOptions","override","getPromiseBaseOptions","showResolvedPromiseToast","loadingToastId","resolvedState","overrideOptions","promiseValue","pendingPromise","loadingState","loadingOptions","loadingMessage","result","successState","error","errorState","handleFinally"],"mappings":";;;;;;;AAiBA,MAAMA,yBAAyB;AAC/B,MAAMC,sBAAsB;AAC5B,MAAMC,4BAA4B;AAClC,MAAMC,8BAA8B;AA8IpC,MAAMC,iBAAgD;IACpD,iBAAiBC,cAAAA,oBAA2B;IAC5C,eAAeA,cAAAA,kBAAyB;IACxC,gBAAgBA,cAAAA,mBAA0B;IAC1C,cAAcA,cAAAA,iBAAwB;IACtC,YAAYA,cAAAA,eAAsB;IAClC,aAAaA,cAAAA,gBAAuB;AACtC;AAEA,MAAMC,gBAA8C;IAClD,SAASD,aAAAA,CAAAA,UAAc;IACvB,OAAOA,cAAAA,KAAY;IACnB,MAAMA,cAAAA,IAAW;IACjB,SAASA,cAAAA,OAAc;IACvB,SAASA,cAAAA,OAAc;IACvB,SAASA,cAAAA,OAAc;AACzB;AAEA,MAAME,eAAeC,MAAM,kBAAkB;AAG7C,MAAMC,eAAgC,EAAE;AACxC,MAAMC,eAAe,IAAIC;AACzB,MAAMC,eAAe,IAAID;AACzB,MAAME,uBAAuB,IAAIF;AAEjC,IAAIG,gBAAgB;AAEpB,SAASC,sBAAsBC,UAA4B;IACzD,IAAIA,AAAeC,WAAfD,YACF,OAAOE,OAAOF;IAGhB,IAAI,AAAyC,cAAzC,OAAOG,WAAW,MAAM,EAAE,YAC5B,OAAOA,WAAW,MAAM,CAAC,UAAU;IAGrCL,iBAAiB;IACjB,OAAO,CAAC,MAAM,EAAEI,OAAOJ,gBAAgB;AACzC;AAEA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BAAoBtB,SAAS,OAAOwE;QAC7DX,yBAAyBC,gBAAgB,SAASW,YAAYf;QAE9D,MAAMc;IACR,SAAU;QACR,MAAME,gBAAgB1E,SAAS;QAC/B,IAAI0E,eACF,MAAMA;IAEV;AACF;AACAnB,MAAM,SAAS,GAAG,IAAoC;WAAItF,aAAa,MAAM;KAAG;AAChFsF,MAAM,UAAU,GAAG,IAAoC;WAAIvF;KAAa"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "./sonner_module.css";
|
|
2
|
+
const sonner_module = {
|
|
3
|
+
viewport: "viewport-H8aveR",
|
|
4
|
+
viewportTopLeft: "viewportTopLeft-xM6PF1",
|
|
5
|
+
viewportTopRight: "viewportTopRight-J7LgEN",
|
|
6
|
+
viewportBottomLeft: "viewportBottomLeft-gduLsn",
|
|
7
|
+
viewportBottomRight: "viewportBottomRight-cgRbCY",
|
|
8
|
+
viewportTopCenter: "viewportTopCenter-GmipAX",
|
|
9
|
+
viewportBottomCenter: "viewportBottomCenter-iNRY6t",
|
|
10
|
+
root: "root-Rvm8fE",
|
|
11
|
+
content: "content-y92flZ",
|
|
12
|
+
leading: "leading-GRRnqU",
|
|
13
|
+
body: "body-Lw99EO",
|
|
14
|
+
title: "title-ymKu15",
|
|
15
|
+
description: "description-ZtIAQh",
|
|
16
|
+
close: "close-n3q99W",
|
|
17
|
+
closeIcon: "closeIcon-gqyKiy",
|
|
18
|
+
icon: "icon-vXiuPh",
|
|
19
|
+
iconSpin: "iconSpin-ly7P4C",
|
|
20
|
+
"toast-spin": "toast-spin-u5gKWc",
|
|
21
|
+
toastSpin: "toast-spin-u5gKWc",
|
|
22
|
+
actions: "actions-wq9nP1",
|
|
23
|
+
primaryAction: "primaryAction-IbtEiI",
|
|
24
|
+
secondaryAction: "secondaryAction-DWySkL",
|
|
25
|
+
default: "default-ecwLjq",
|
|
26
|
+
success: "success-pLAR9p",
|
|
27
|
+
error: "error-pOqy4L",
|
|
28
|
+
info: "info-t5y2YI",
|
|
29
|
+
warning: "warning-M6kW38",
|
|
30
|
+
loading: "loading-pRuJz9"
|
|
31
|
+
};
|
|
32
|
+
export default sonner_module;
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=sonner.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/ui/sonner.module.js","sources":["../../../src/components/ui/sonner.module.css"],"sourcesContent":["// extracted by LIB_CSS_EXTRACT_LOADER\nimport \"./sonner_module.css\"\nexport default {\"viewport\":\"viewport-H8aveR\",\"viewportTopLeft\":\"viewportTopLeft-xM6PF1\",\"viewportTopRight\":\"viewportTopRight-J7LgEN\",\"viewportBottomLeft\":\"viewportBottomLeft-gduLsn\",\"viewportBottomRight\":\"viewportBottomRight-cgRbCY\",\"viewportTopCenter\":\"viewportTopCenter-GmipAX\",\"viewportBottomCenter\":\"viewportBottomCenter-iNRY6t\",\"root\":\"root-Rvm8fE\",\"content\":\"content-y92flZ\",\"leading\":\"leading-GRRnqU\",\"body\":\"body-Lw99EO\",\"title\":\"title-ymKu15\",\"description\":\"description-ZtIAQh\",\"close\":\"close-n3q99W\",\"closeIcon\":\"closeIcon-gqyKiy\",\"icon\":\"icon-vXiuPh\",\"iconSpin\":\"iconSpin-ly7P4C\",\"toast-spin\":\"toast-spin-u5gKWc\",\"toastSpin\":\"toast-spin-u5gKWc\",\"actions\":\"actions-wq9nP1\",\"primaryAction\":\"primaryAction-IbtEiI\",\"secondaryAction\":\"secondaryAction-DWySkL\",\"default\":\"default-ecwLjq\",\"success\":\"success-pLAR9p\",\"error\":\"error-pOqy4L\",\"info\":\"info-t5y2YI\",\"warning\":\"warning-M6kW38\",\"loading\":\"loading-pRuJz9\"};"],"names":[],"mappings":";AAEA,sBAAe;IAAC,UAAW;IAAkB,iBAAkB;IAAyB,kBAAmB;IAA0B,oBAAqB;IAA4B,qBAAsB;IAA6B,mBAAoB;IAA2B,sBAAuB;IAA8B,MAAO;IAAc,SAAU;IAAiB,SAAU;IAAiB,MAAO;IAAc,OAAQ;IAAe,aAAc;IAAqB,OAAQ;IAAe,WAAY;IAAmB,MAAO;IAAc,UAAW;IAAkB,cAAa;IAAoB,WAAY;IAAoB,SAAU;IAAiB,eAAgB;IAAuB,iBAAkB;IAAyB,SAAU;IAAiB,SAAU;IAAiB,OAAQ;IAAe,MAAO;IAAc,SAAU;IAAiB,SAAU;AAAgB"}
|