@spark-ui/components 13.1.3 → 13.1.4
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/dist/Input-N8AWWSmt.d.mts +41 -0
- package/dist/Input-N8AWWSmt.d.ts +41 -0
- package/dist/InputTrailingIcon-BBp7sE6D.d.mts +20 -0
- package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +20 -0
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.mts +19 -0
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +19 -0
- package/dist/accordion/index.d.mts +73 -0
- package/dist/accordion/index.d.ts +68 -10
- package/dist/accordion/index.js +325 -2
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +154 -632
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/alert-dialog/index.d.mts +159 -0
- package/dist/alert-dialog/index.d.ts +147 -26
- package/dist/alert-dialog/index.js +405 -35
- package/dist/alert-dialog/index.js.map +1 -1
- package/dist/alert-dialog/index.mjs +258 -2513
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/avatar/index.d.mts +66 -0
- package/dist/avatar/index.d.ts +59 -8
- package/dist/avatar/index.js +1323 -2
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar/index.mjs +207 -149
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/badge/index.d.mts +47 -0
- package/dist/badge/index.d.ts +47 -1
- package/dist/badge/index.js +122 -2
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +44 -32
- package/dist/badge/index.mjs.map +1 -1
- package/dist/breadcrumb/index.d.mts +64 -0
- package/dist/breadcrumb/index.d.ts +59 -7
- package/dist/breadcrumb/index.js +327 -2
- package/dist/breadcrumb/index.js.map +1 -1
- package/dist/breadcrumb/index.mjs +146 -106
- package/dist/breadcrumb/index.mjs.map +1 -1
- package/dist/button/index.d.mts +41 -0
- package/dist/button/index.d.ts +41 -1
- package/dist/button/index.js +935 -2
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +8 -3
- package/dist/button/index.mjs.map +1 -1
- package/dist/card/index.d.mts +61 -0
- package/dist/card/index.d.ts +58 -5
- package/dist/card/index.js +502 -2
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +178 -125
- package/dist/card/index.mjs.map +1 -1
- package/dist/carousel/{types.d.ts → index.d.mts} +112 -13
- package/dist/carousel/index.d.ts +263 -18
- package/dist/carousel/index.js +1882 -2
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +650 -428
- package/dist/carousel/index.mjs.map +1 -1
- package/dist/checkbox/index.d.mts +120 -0
- package/dist/checkbox/index.d.ts +120 -2
- package/dist/checkbox/index.js +511 -2
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs +226 -371
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chip/index.d.mts +97 -0
- package/dist/chip/index.d.ts +92 -10
- package/dist/chip/index.js +908 -2
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/index.mjs +322 -390
- package/dist/chip/index.mjs.map +1 -1
- package/dist/{Button-D32Avk2j.mjs → chunk-2YM6GKWW.mjs} +173 -130
- package/dist/chunk-2YM6GKWW.mjs.map +1 -0
- package/dist/chunk-6QCEPQ3U.mjs +26 -0
- package/dist/chunk-6QCEPQ3U.mjs.map +1 -0
- package/dist/chunk-7EWSMIZU.mjs +214 -0
- package/dist/chunk-7EWSMIZU.mjs.map +1 -0
- package/dist/chunk-DCXWGQVZ.mjs +53 -0
- package/dist/chunk-DCXWGQVZ.mjs.map +1 -0
- package/dist/{Spinner-CYL5kyzM.mjs → chunk-GAK4SC2F.mjs} +40 -29
- package/dist/chunk-GAK4SC2F.mjs.map +1 -0
- package/dist/chunk-GPJMLIHC.mjs +308 -0
- package/dist/chunk-GPJMLIHC.mjs.map +1 -0
- package/dist/chunk-HLXYG643.mjs +52 -0
- package/dist/chunk-HLXYG643.mjs.map +1 -0
- package/dist/chunk-KEGAAGJW.mjs +36 -0
- package/dist/chunk-KEGAAGJW.mjs.map +1 -0
- package/dist/{TextLink-3MEVs3No.mjs → chunk-RKPP7ZOK.mjs} +36 -27
- package/dist/chunk-RKPP7ZOK.mjs.map +1 -0
- package/dist/chunk-UMUMFMFB.mjs +68 -0
- package/dist/chunk-UMUMFMFB.mjs.map +1 -0
- package/dist/chunk-VBX7BTNU.mjs +614 -0
- package/dist/chunk-VBX7BTNU.mjs.map +1 -0
- package/dist/{DialogContent.styles-WGWJS9dj.mjs → chunk-XZ47F6TP.mjs} +8 -6
- package/dist/chunk-XZ47F6TP.mjs.map +1 -0
- package/dist/collapsible/index.d.mts +43 -0
- package/dist/collapsible/index.d.ts +40 -4
- package/dist/collapsible/index.js +109 -2
- package/dist/collapsible/index.js.map +1 -1
- package/dist/collapsible/index.mjs +58 -214
- package/dist/collapsible/index.mjs.map +1 -1
- package/dist/combobox/index.d.mts +287 -0
- package/dist/combobox/index.d.ts +271 -19
- package/dist/combobox/index.js +2588 -2
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +1017 -623
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/dialog/index.d.mts +166 -0
- package/dist/dialog/index.d.ts +154 -25
- package/dist/dialog/index.js +1389 -2
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +258 -163
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/divider/index.d.mts +61 -0
- package/dist/divider/index.d.ts +59 -4
- package/dist/divider/index.js +224 -2
- package/dist/divider/index.js.map +1 -1
- package/dist/divider/index.mjs +100 -97
- package/dist/divider/index.mjs.map +1 -1
- package/dist/drawer/index.d.mts +152 -0
- package/dist/drawer/index.d.ts +141 -24
- package/dist/drawer/index.js +1400 -2
- package/dist/drawer/index.js.map +1 -1
- package/dist/drawer/index.mjs +230 -141
- package/dist/drawer/index.mjs.map +1 -1
- package/dist/dropdown/index.d.mts +233 -0
- package/dist/dropdown/index.d.ts +220 -16
- package/dist/dropdown/index.js +2051 -2
- package/dist/dropdown/index.js.map +1 -1
- package/dist/dropdown/index.mjs +584 -352
- package/dist/dropdown/index.mjs.map +1 -1
- package/dist/file-upload/index.d.mts +270 -0
- package/dist/file-upload/index.d.ts +262 -14
- package/dist/file-upload/index.js +2255 -2
- package/dist/file-upload/index.js.map +1 -1
- package/dist/file-upload/index.mjs +834 -506
- package/dist/file-upload/index.mjs.map +1 -1
- package/dist/form-field/index.d.mts +186 -0
- package/dist/form-field/index.d.ts +176 -21
- package/dist/form-field/index.js +553 -2
- package/dist/form-field/index.js.map +1 -1
- package/dist/form-field/index.mjs +349 -246
- package/dist/form-field/index.mjs.map +1 -1
- package/dist/icon/index.d.mts +28 -0
- package/dist/icon/index.d.ts +28 -1
- package/dist/icon/index.js +127 -2
- package/dist/icon/index.js.map +1 -1
- package/dist/icon/index.mjs +7 -3
- package/dist/icon/index.mjs.map +1 -1
- package/dist/icon-button/index.d.mts +16 -0
- package/dist/icon-button/index.d.ts +16 -1
- package/dist/icon-button/index.js +980 -2
- package/dist/icon-button/index.js.map +1 -1
- package/dist/icon-button/index.mjs +9 -3
- package/dist/icon-button/index.mjs.map +1 -1
- package/dist/index-Cno_GFuW.d.mts +93 -0
- package/dist/index-Cno_GFuW.d.ts +93 -0
- package/dist/input/index.d.mts +78 -0
- package/dist/input/index.d.ts +72 -15
- package/dist/input/index.js +724 -2
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +12 -453
- package/dist/input/index.mjs.map +1 -1
- package/dist/input-otp/{InputOTP.d.ts → index.d.mts} +50 -3
- package/dist/input-otp/index.d.ts +128 -10
- package/dist/input-otp/index.js +668 -2
- package/dist/input-otp/index.js.map +1 -1
- package/dist/input-otp/index.mjs +463 -294
- package/dist/input-otp/index.mjs.map +1 -1
- package/dist/kbd/index.d.mts +9 -0
- package/dist/kbd/index.d.ts +9 -1
- package/dist/kbd/index.js +47 -2
- package/dist/kbd/index.js.map +1 -1
- package/dist/kbd/index.mjs +18 -15
- package/dist/kbd/index.mjs.map +1 -1
- package/dist/label/index.d.mts +11 -0
- package/dist/label/index.d.ts +9 -5
- package/dist/label/index.js +78 -2
- package/dist/label/index.js.map +1 -1
- package/dist/label/index.mjs +5 -3
- package/dist/label/index.mjs.map +1 -1
- package/dist/link-box/index.d.mts +34 -0
- package/dist/link-box/index.d.ts +31 -6
- package/dist/link-box/index.js +92 -2
- package/dist/link-box/index.js.map +1 -1
- package/dist/link-box/index.mjs +56 -34
- package/dist/link-box/index.mjs.map +1 -1
- package/dist/pagination/index.d.mts +143 -0
- package/dist/pagination/index.d.ts +135 -10
- package/dist/pagination/index.js +1353 -2
- package/dist/pagination/index.js.map +1 -1
- package/dist/pagination/index.mjs +268 -833
- package/dist/pagination/index.mjs.map +1 -1
- package/dist/popover/index.d.mts +6 -0
- package/dist/popover/index.d.ts +6 -17
- package/dist/popover/index.js +1339 -2
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +11 -1868
- package/dist/popover/index.mjs.map +1 -1
- package/dist/portal/{Portal.d.ts → index.d.mts} +5 -2
- package/dist/portal/index.d.ts +13 -1
- package/dist/portal/index.js +37 -2
- package/dist/portal/index.js.map +1 -1
- package/dist/portal/index.mjs +8 -5
- package/dist/portal/index.mjs.map +1 -1
- package/dist/progress/index.d.mts +52 -0
- package/dist/progress/index.d.ts +48 -9
- package/dist/progress/index.js +239 -6
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/index.mjs +5 -241
- package/dist/progress/index.mjs.map +1 -1
- package/dist/progress-tracker/index.d.mts +80 -0
- package/dist/progress-tracker/index.d.ts +80 -10
- package/dist/progress-tracker/index.js +571 -2
- package/dist/progress-tracker/index.js.map +1 -1
- package/dist/progress-tracker/index.mjs +183 -115
- package/dist/progress-tracker/index.mjs.map +1 -1
- package/dist/radio-group/index.d.mts +100 -0
- package/dist/radio-group/index.d.ts +98 -5
- package/dist/radio-group/index.js +318 -2
- package/dist/radio-group/index.js.map +1 -1
- package/dist/radio-group/index.mjs +174 -332
- package/dist/radio-group/index.mjs.map +1 -1
- package/dist/rating/index.d.mts +78 -0
- package/dist/rating/index.d.ts +78 -1
- package/dist/rating/index.js +363 -2
- package/dist/rating/index.js.map +1 -1
- package/dist/rating/index.mjs +170 -125
- package/dist/rating/index.mjs.map +1 -1
- package/dist/scrolling-list/index.d.mts +118 -0
- package/dist/scrolling-list/index.d.ts +117 -14
- package/dist/scrolling-list/index.js +1428 -2
- package/dist/scrolling-list/index.js.map +1 -1
- package/dist/scrolling-list/index.mjs +325 -358
- package/dist/scrolling-list/index.mjs.map +1 -1
- package/dist/segmented-gauge/{SegmentedGauge.d.ts → index.d.mts} +43 -4
- package/dist/segmented-gauge/index.d.ts +101 -9
- package/dist/segmented-gauge/index.js +274 -2
- package/dist/segmented-gauge/index.js.map +1 -1
- package/dist/segmented-gauge/index.mjs +178 -132
- package/dist/segmented-gauge/index.mjs.map +1 -1
- package/dist/select/index.d.mts +167 -0
- package/dist/select/index.d.ts +158 -12
- package/dist/select/index.js +581 -2
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +339 -207
- package/dist/select/index.mjs.map +1 -1
- package/dist/skeleton/index.d.mts +67 -0
- package/dist/skeleton/index.d.ts +67 -8
- package/dist/skeleton/index.js +206 -2
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs +96 -64
- package/dist/skeleton/index.mjs.map +1 -1
- package/dist/slider/index.d.mts +97 -0
- package/dist/slider/index.d.ts +97 -8
- package/dist/slider/index.js +220 -2
- package/dist/slider/index.js.map +1 -1
- package/dist/slider/index.mjs +107 -490
- package/dist/slider/index.mjs.map +1 -1
- package/dist/slot/index.d.mts +16 -0
- package/dist/slot/index.d.ts +16 -1
- package/dist/slot/index.js +51 -2
- package/dist/slot/index.js.map +1 -1
- package/dist/slot/index.mjs +9 -5
- package/dist/slot/index.mjs.map +1 -1
- package/dist/snackbar/index.d.mts +158 -0
- package/dist/snackbar/index.d.ts +158 -13
- package/dist/snackbar/index.js +1756 -2
- package/dist/snackbar/index.js.map +1 -1
- package/dist/snackbar/index.mjs +429 -1153
- package/dist/snackbar/index.mjs.map +1 -1
- package/dist/spinner/index.d.mts +21 -0
- package/dist/spinner/index.d.ts +21 -1
- package/dist/spinner/index.js +139 -2
- package/dist/spinner/index.js.map +1 -1
- package/dist/spinner/index.mjs +7 -3
- package/dist/spinner/index.mjs.map +1 -1
- package/dist/stepper/index.d.mts +81 -0
- package/dist/stepper/index.d.ts +81 -9
- package/dist/stepper/index.js +1847 -8
- package/dist/stepper/index.js.map +1 -1
- package/dist/stepper/index.mjs +197 -2325
- package/dist/stepper/index.mjs.map +1 -1
- package/dist/switch/{SwitchInput.d.ts → index.d.mts} +17 -4
- package/dist/switch/index.d.ts +64 -1
- package/dist/switch/index.js +327 -2
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/index.mjs +130 -213
- package/dist/switch/index.mjs.map +1 -1
- package/dist/tabs/index.d.mts +137 -0
- package/dist/tabs/index.d.ts +137 -13
- package/dist/tabs/index.js +1830 -2
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +350 -374
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/tag/index.d.mts +29 -0
- package/dist/tag/index.d.ts +29 -1
- package/dist/tag/index.js +283 -2
- package/dist/tag/index.js.map +1 -1
- package/dist/tag/index.mjs +90 -66
- package/dist/tag/index.mjs.map +1 -1
- package/dist/text-link/index.d.mts +20 -0
- package/dist/text-link/index.d.ts +20 -1
- package/dist/text-link/index.js +100 -2
- package/dist/text-link/index.js.map +1 -1
- package/dist/text-link/index.mjs +6 -3
- package/dist/text-link/index.mjs.map +1 -1
- package/dist/textarea/index.d.mts +57 -0
- package/dist/textarea/index.d.ts +53 -10
- package/dist/textarea/index.js +797 -2
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +83 -50
- package/dist/textarea/index.mjs.map +1 -1
- package/dist/toast/index.d.mts +63 -0
- package/dist/toast/index.d.ts +53 -10
- package/dist/toast/index.js +1454 -2
- package/dist/toast/index.js.map +1 -1
- package/dist/toast/index.mjs +208 -1016
- package/dist/toast/index.mjs.map +1 -1
- package/dist/visually-hidden/index.d.mts +16 -0
- package/dist/visually-hidden/index.d.ts +16 -1
- package/dist/visually-hidden/index.js +67 -2
- package/dist/visually-hidden/index.js.map +1 -1
- package/dist/visually-hidden/index.mjs +6 -3
- package/dist/visually-hidden/index.mjs.map +1 -1
- package/package.json +6 -5
- package/dist/Button-C3xHNaGl.js +0 -2
- package/dist/Button-C3xHNaGl.js.map +0 -1
- package/dist/Button-D32Avk2j.mjs.map +0 -1
- package/dist/DialogContent.styles-BrhKaHc_.js +0 -2
- package/dist/DialogContent.styles-BrhKaHc_.js.map +0 -1
- package/dist/DialogContent.styles-WGWJS9dj.mjs.map +0 -1
- package/dist/Icon-Bf0XrmiR.js +0 -2
- package/dist/Icon-Bf0XrmiR.js.map +0 -1
- package/dist/Icon-D1RueiPY.mjs +0 -58
- package/dist/Icon-D1RueiPY.mjs.map +0 -1
- package/dist/IconButton-BY3gYXtU.mjs +0 -43
- package/dist/IconButton-BY3gYXtU.mjs.map +0 -1
- package/dist/IconButton-Bf-EDzpI.js +0 -2
- package/dist/IconButton-Bf-EDzpI.js.map +0 -1
- package/dist/Slot-C98rL4yy.mjs +0 -14
- package/dist/Slot-C98rL4yy.mjs.map +0 -1
- package/dist/Slot-ghrohQLA.js +0 -2
- package/dist/Slot-ghrohQLA.js.map +0 -1
- package/dist/Spinner-CYL5kyzM.mjs.map +0 -1
- package/dist/Spinner-DK8VEsaR.js +0 -2
- package/dist/Spinner-DK8VEsaR.js.map +0 -1
- package/dist/TextLink-3MEVs3No.mjs.map +0 -1
- package/dist/TextLink-DD0VO37q.js +0 -2
- package/dist/TextLink-DD0VO37q.js.map +0 -1
- package/dist/VisuallyHidden-AoRh4WRK.js +0 -2
- package/dist/VisuallyHidden-AoRh4WRK.js.map +0 -1
- package/dist/VisuallyHidden-ByNP7ZUI.mjs +0 -28
- package/dist/VisuallyHidden-ByNP7ZUI.mjs.map +0 -1
- package/dist/accordion/Accordion.d.ts +0 -27
- package/dist/accordion/AccordionItem.d.ts +0 -12
- package/dist/accordion/AccordionItemContent.d.ts +0 -12
- package/dist/accordion/AccordionItemHeader.d.ts +0 -9
- package/dist/accordion/AccordionItemTrigger.d.ts +0 -12
- package/dist/accordion/useRenderSlot.d.ts +0 -3
- package/dist/alert-dialog/AlertDialog.d.ts +0 -29
- package/dist/alert-dialog/AlertDialogAction.d.ts +0 -13
- package/dist/alert-dialog/AlertDialogBody.d.ts +0 -12
- package/dist/alert-dialog/AlertDialogCancel.d.ts +0 -13
- package/dist/alert-dialog/AlertDialogContent.d.ts +0 -9
- package/dist/alert-dialog/AlertDialogContext.d.ts +0 -12
- package/dist/alert-dialog/AlertDialogDescription.d.ts +0 -9
- package/dist/alert-dialog/AlertDialogFooter.d.ts +0 -10
- package/dist/alert-dialog/AlertDialogHeader.d.ts +0 -10
- package/dist/alert-dialog/AlertDialogOverlay.d.ts +0 -9
- package/dist/alert-dialog/AlertDialogPortal.d.ts +0 -7
- package/dist/alert-dialog/AlertDialogTitle.d.ts +0 -9
- package/dist/alert-dialog/AlertDialogTrigger.d.ts +0 -13
- package/dist/alert-dialog/useRenderSlot.d.ts +0 -3
- package/dist/avatar/Avatar.d.ts +0 -3
- package/dist/avatar/AvatarAction.d.ts +0 -9
- package/dist/avatar/AvatarImage.d.ts +0 -7
- package/dist/avatar/AvatarOnlineBadge.d.ts +0 -9
- package/dist/avatar/AvatarPlaceholder.d.ts +0 -8
- package/dist/avatar/AvatarUser.d.ts +0 -7
- package/dist/avatar/context.d.ts +0 -5
- package/dist/avatar/types.d.ts +0 -24
- package/dist/badge/Badge.d.ts +0 -9
- package/dist/badge/BadgeItem.d.ts +0 -31
- package/dist/badge/BadgeItem.styles.d.ts +0 -7
- package/dist/breadcrumb/Breadcrumb.d.ts +0 -10
- package/dist/breadcrumb/Breadcrumb.styles.d.ts +0 -0
- package/dist/breadcrumb/BreadcrumbCurrentPage.d.ts +0 -11
- package/dist/breadcrumb/BreadcrumbItem.d.ts +0 -9
- package/dist/breadcrumb/BreadcrumbLink.d.ts +0 -12
- package/dist/breadcrumb/BreadcrumbSeparator.d.ts +0 -10
- package/dist/button/Button.d.ts +0 -26
- package/dist/button/Button.styles.d.ts +0 -10
- package/dist/button/variants/contrast.d.ts +0 -45
- package/dist/button/variants/filled.d.ts +0 -45
- package/dist/button/variants/ghost.d.ts +0 -45
- package/dist/button/variants/index.d.ts +0 -5
- package/dist/button/variants/outlined.d.ts +0 -45
- package/dist/button/variants/tinted.d.ts +0 -45
- package/dist/card/Backdrop.d.ts +0 -14
- package/dist/card/Card.d.ts +0 -16
- package/dist/card/Card.styles.d.ts +0 -7
- package/dist/card/Content.d.ts +0 -15
- package/dist/card/Content.styles.d.ts +0 -8
- package/dist/card/context.d.ts +0 -11
- package/dist/card/utils.d.ts +0 -3
- package/dist/carousel/Carousel.d.ts +0 -12
- package/dist/carousel/CarouselControls.d.ts +0 -9
- package/dist/carousel/CarouselNextButton.d.ts +0 -5
- package/dist/carousel/CarouselPageIndicator.d.ts +0 -14
- package/dist/carousel/CarouselPagePicker.d.ts +0 -14
- package/dist/carousel/CarouselPrevButton.d.ts +0 -5
- package/dist/carousel/CarouselSlide.d.ts +0 -12
- package/dist/carousel/CarouselSlides.d.ts +0 -10
- package/dist/carousel/CarouselViewport.d.ts +0 -9
- package/dist/carousel/useCarousel.d.ts +0 -2
- package/dist/carousel/useCarouselVisibility.d.ts +0 -13
- package/dist/carousel/useEvent.d.ts +0 -7
- package/dist/carousel/useIsMounted.d.ts +0 -1
- package/dist/carousel/useIsVisible.d.ts +0 -6
- package/dist/carousel/useResizeObserver.d.ts +0 -2
- package/dist/carousel/useScrollEnd.d.ts +0 -3
- package/dist/carousel/useSnapPoints.d.ts +0 -10
- package/dist/carousel/utils.d.ts +0 -24
- package/dist/checkbox/Checkbox.d.ts +0 -10
- package/dist/checkbox/CheckboxGroup.d.ts +0 -18
- package/dist/checkbox/CheckboxGroup.styles.d.ts +0 -5
- package/dist/checkbox/CheckboxGroupContext.d.ts +0 -41
- package/dist/checkbox/CheckboxIndicator.d.ts +0 -9
- package/dist/checkbox/CheckboxInput.d.ts +0 -47
- package/dist/checkbox/CheckboxInput.styles.d.ts +0 -5
- package/dist/checkbox/CheckboxLabel.d.ts +0 -12
- package/dist/checkbox/CheckboxLabel.styles.d.ts +0 -5
- package/dist/chip/Chip.d.ts +0 -34
- package/dist/chip/Chip.styles.d.ts +0 -8
- package/dist/chip/ChipClearButton.d.ts +0 -10
- package/dist/chip/ChipClearButton.styles.d.ts +0 -10
- package/dist/chip/ChipContent.d.ts +0 -8
- package/dist/chip/ChipIcon.d.ts +0 -8
- package/dist/chip/ChipLeadingIcon.d.ts +0 -9
- package/dist/chip/ChipTrailingIcon.d.ts +0 -9
- package/dist/chip/useChipContext.d.ts +0 -4
- package/dist/chip/useChipElement.d.ts +0 -41
- package/dist/chip/variants/dashed.d.ts +0 -49
- package/dist/chip/variants/index.d.ts +0 -3
- package/dist/chip/variants/outlined.d.ts +0 -49
- package/dist/chip/variants/tinted.d.ts +0 -49
- package/dist/collapsible/Content.d.ts +0 -12
- package/dist/collapsible/Root.d.ts +0 -12
- package/dist/collapsible/Trigger.d.ts +0 -11
- package/dist/collapsible/useRenderSlot.d.ts +0 -3
- package/dist/combobox/Combobox.d.ts +0 -6
- package/dist/combobox/ComboboxClearButton.d.ts +0 -9
- package/dist/combobox/ComboboxContext.d.ts +0 -108
- package/dist/combobox/ComboboxDisclosure.d.ts +0 -13
- package/dist/combobox/ComboboxEmpty.d.ts +0 -11
- package/dist/combobox/ComboboxGroup.d.ts +0 -11
- package/dist/combobox/ComboboxInput.d.ts +0 -15
- package/dist/combobox/ComboboxItem.d.ts +0 -12
- package/dist/combobox/ComboboxItemContext.d.ts +0 -17
- package/dist/combobox/ComboboxItemIndicator.d.ts +0 -11
- package/dist/combobox/ComboboxItemText.d.ts +0 -10
- package/dist/combobox/ComboboxItems.d.ts +0 -11
- package/dist/combobox/ComboboxItemsGroupContext.d.ts +0 -8
- package/dist/combobox/ComboboxLabel.d.ts +0 -11
- package/dist/combobox/ComboboxLeadingIcon.d.ts +0 -7
- package/dist/combobox/ComboboxPopover.d.ts +0 -10
- package/dist/combobox/ComboboxPortal.d.ts +0 -2
- package/dist/combobox/ComboboxSelectedItems.d.ts +0 -4
- package/dist/combobox/ComboboxTrigger.d.ts +0 -11
- package/dist/combobox/ComboboxTrigger.styles.d.ts +0 -6
- package/dist/combobox/tests/test-utils.d.ts +0 -8
- package/dist/combobox/types.d.ts +0 -8
- package/dist/combobox/useCombobox/multipleSelectionReducer.d.ts +0 -13
- package/dist/combobox/useCombobox/singleSelectionReducer.d.ts +0 -8
- package/dist/combobox/utils/index.d.ts +0 -14
- package/dist/combobox/utils/useWidthIncreaseCallback.d.ts +0 -2
- package/dist/composite-Br3kM5N9.mjs +0 -40
- package/dist/composite-Br3kM5N9.mjs.map +0 -1
- package/dist/composite-fJD9R7R0.js +0 -2
- package/dist/composite-fJD9R7R0.js.map +0 -1
- package/dist/detectBrowser-Bc7rk5fI.mjs +0 -44
- package/dist/detectBrowser-Bc7rk5fI.mjs.map +0 -1
- package/dist/detectBrowser-DTbs_30X.js +0 -2
- package/dist/detectBrowser-DTbs_30X.js.map +0 -1
- package/dist/dialog/Dialog.d.ts +0 -32
- package/dist/dialog/DialogBody.d.ts +0 -12
- package/dist/dialog/DialogClose.d.ts +0 -9
- package/dist/dialog/DialogCloseButton.d.ts +0 -9
- package/dist/dialog/DialogContent.d.ts +0 -14
- package/dist/dialog/DialogContent.styles.d.ts +0 -6
- package/dist/dialog/DialogContext.d.ts +0 -11
- package/dist/dialog/DialogDescription.d.ts +0 -9
- package/dist/dialog/DialogFooter.d.ts +0 -10
- package/dist/dialog/DialogHeader.d.ts +0 -10
- package/dist/dialog/DialogOverlay.d.ts +0 -9
- package/dist/dialog/DialogPortal.d.ts +0 -7
- package/dist/dialog/DialogTitle.d.ts +0 -9
- package/dist/dialog/DialogTrigger.d.ts +0 -17
- package/dist/divider/Divider.d.ts +0 -30
- package/dist/divider/Divider.styles.d.ts +0 -9
- package/dist/divider/DividerContent.d.ts +0 -13
- package/dist/divider/variants/intents.d.ts +0 -17
- package/dist/downshift.esm-Ncwetv0s.mjs +0 -3038
- package/dist/downshift.esm-Ncwetv0s.mjs.map +0 -1
- package/dist/downshift.esm-PfCOUbxq.js +0 -37
- package/dist/downshift.esm-PfCOUbxq.js.map +0 -1
- package/dist/drawer/Drawer.d.ts +0 -39
- package/dist/drawer/DrawerBody.d.ts +0 -11
- package/dist/drawer/DrawerBody.styles.d.ts +0 -5
- package/dist/drawer/DrawerClose.d.ts +0 -9
- package/dist/drawer/DrawerCloseButton.d.ts +0 -7
- package/dist/drawer/DrawerContent.d.ts +0 -10
- package/dist/drawer/DrawerContent.styles.d.ts +0 -6
- package/dist/drawer/DrawerContext.d.ts +0 -9
- package/dist/drawer/DrawerDescription.d.ts +0 -9
- package/dist/drawer/DrawerFooter.d.ts +0 -8
- package/dist/drawer/DrawerHeader.d.ts +0 -10
- package/dist/drawer/DrawerOverlay.d.ts +0 -9
- package/dist/drawer/DrawerPortal.d.ts +0 -7
- package/dist/drawer/DrawerTitle.d.ts +0 -9
- package/dist/drawer/DrawerTrigger.d.ts +0 -13
- package/dist/dropdown/Dropdown.d.ts +0 -6
- package/dist/dropdown/DropdownContext.d.ts +0 -81
- package/dist/dropdown/DropdownDivider.d.ts +0 -10
- package/dist/dropdown/DropdownGroup.d.ts +0 -11
- package/dist/dropdown/DropdownItem.d.ts +0 -12
- package/dist/dropdown/DropdownItemContext.d.ts +0 -17
- package/dist/dropdown/DropdownItemIndicator.d.ts +0 -11
- package/dist/dropdown/DropdownItemText.d.ts +0 -9
- package/dist/dropdown/DropdownItems.d.ts +0 -21
- package/dist/dropdown/DropdownItemsGroupContext.d.ts +0 -8
- package/dist/dropdown/DropdownLabel.d.ts +0 -11
- package/dist/dropdown/DropdownLeadingIcon.d.ts +0 -7
- package/dist/dropdown/DropdownPopover.d.ts +0 -6
- package/dist/dropdown/DropdownPortal.d.ts +0 -2
- package/dist/dropdown/DropdownTrigger.d.ts +0 -12
- package/dist/dropdown/DropdownTrigger.styles.d.ts +0 -5
- package/dist/dropdown/DropdownValue.d.ts +0 -11
- package/dist/dropdown/types.d.ts +0 -8
- package/dist/dropdown/useDropdown.d.ts +0 -41
- package/dist/dropdown/utils.d.ts +0 -13
- package/dist/file-upload/FileUpload.d.ts +0 -130
- package/dist/file-upload/FileUploadAcceptedFile.d.ts +0 -25
- package/dist/file-upload/FileUploadContext.d.ts +0 -17
- package/dist/file-upload/FileUploadDropzone.d.ts +0 -10
- package/dist/file-upload/FileUploadItemDeleteTrigger.d.ts +0 -11
- package/dist/file-upload/FileUploadPreviewImage.d.ts +0 -17
- package/dist/file-upload/FileUploadRejectedFile.d.ts +0 -24
- package/dist/file-upload/FileUploadRejectedFileDeleteTrigger.d.ts +0 -12
- package/dist/file-upload/FileUploadTrigger.d.ts +0 -12
- package/dist/file-upload/constants.d.ts +0 -29
- package/dist/file-upload/test-utils.d.ts +0 -9
- package/dist/file-upload/useFileUploadState.d.ts +0 -88
- package/dist/file-upload/utils.d.ts +0 -40
- package/dist/floating-ui.utils.dom-CCN4I08l.js +0 -2
- package/dist/floating-ui.utils.dom-CCN4I08l.js.map +0 -1
- package/dist/floating-ui.utils.dom-uiDUZc_y.mjs +0 -136
- package/dist/floating-ui.utils.dom-uiDUZc_y.mjs.map +0 -1
- package/dist/form-field/FormField.d.ts +0 -21
- package/dist/form-field/FormFieldAlertMessage.d.ts +0 -9
- package/dist/form-field/FormFieldCharactersCount.d.ts +0 -26
- package/dist/form-field/FormFieldContext.d.ts +0 -49
- package/dist/form-field/FormFieldControl.d.ts +0 -12
- package/dist/form-field/FormFieldErrorMessage.d.ts +0 -9
- package/dist/form-field/FormFieldHelperMessage.d.ts +0 -9
- package/dist/form-field/FormFieldLabel.d.ts +0 -13
- package/dist/form-field/FormFieldMessage.d.ts +0 -8
- package/dist/form-field/FormFieldProvider.d.ts +0 -9
- package/dist/form-field/FormFieldRequiredIndicator.d.ts +0 -9
- package/dist/form-field/FormFieldStateMessage.d.ts +0 -10
- package/dist/form-field/FormFieldSuccessMessage.d.ts +0 -9
- package/dist/icon/Icon.d.ts +0 -17
- package/dist/icon/Icon.styles.d.ts +0 -6
- package/dist/icon-button/IconButton.d.ts +0 -10
- package/dist/icon-button/IconButton.styles.d.ts +0 -5
- package/dist/index-0KYGKeVg.js +0 -2
- package/dist/index-0KYGKeVg.js.map +0 -1
- package/dist/index-1WIgmEZh.js +0 -2
- package/dist/index-1WIgmEZh.js.map +0 -1
- package/dist/index-BRi38DTc.mjs +0 -21
- package/dist/index-BRi38DTc.mjs.map +0 -1
- package/dist/index-BZAtNKwE.mjs +0 -71
- package/dist/index-BZAtNKwE.mjs.map +0 -1
- package/dist/index-BZPx6jYI.mjs +0 -9
- package/dist/index-BZPx6jYI.mjs.map +0 -1
- package/dist/index-BlkdpEIe.mjs +0 -55
- package/dist/index-BlkdpEIe.mjs.map +0 -1
- package/dist/index-BmAFn37q.mjs +0 -49
- package/dist/index-BmAFn37q.mjs.map +0 -1
- package/dist/index-C-J_tHdS.js +0 -6
- package/dist/index-C-J_tHdS.js.map +0 -1
- package/dist/index-C1qb0595.mjs +0 -28
- package/dist/index-C1qb0595.mjs.map +0 -1
- package/dist/index-C34GgsKQ.mjs +0 -54
- package/dist/index-C34GgsKQ.mjs.map +0 -1
- package/dist/index-CCKe-Mpx.mjs +0 -7
- package/dist/index-CCKe-Mpx.mjs.map +0 -1
- package/dist/index-CDBBjNXc.js +0 -2
- package/dist/index-CDBBjNXc.js.map +0 -1
- package/dist/index-CYjGhVvU.mjs +0 -243
- package/dist/index-CYjGhVvU.mjs.map +0 -1
- package/dist/index-ChLwd62c.js +0 -2
- package/dist/index-ChLwd62c.js.map +0 -1
- package/dist/index-Cjj_rUPu.js +0 -2
- package/dist/index-Cjj_rUPu.js.map +0 -1
- package/dist/index-CyMbLkj0.js +0 -2
- package/dist/index-CyMbLkj0.js.map +0 -1
- package/dist/index-DFZozV_h.mjs +0 -69
- package/dist/index-DFZozV_h.mjs.map +0 -1
- package/dist/index-DKuHkHFX.js +0 -2
- package/dist/index-DKuHkHFX.js.map +0 -1
- package/dist/index-DLHLIYPI.mjs +0 -16
- package/dist/index-DLHLIYPI.mjs.map +0 -1
- package/dist/index-DO-atGp-.js +0 -2
- package/dist/index-DO-atGp-.js.map +0 -1
- package/dist/index-DWlg8lkk.mjs +0 -179
- package/dist/index-DWlg8lkk.mjs.map +0 -1
- package/dist/index-DYxWvftI.js +0 -2
- package/dist/index-DYxWvftI.js.map +0 -1
- package/dist/index-D_lWkK39.mjs +0 -803
- package/dist/index-D_lWkK39.mjs.map +0 -1
- package/dist/index-DdkVj7D0.js +0 -18
- package/dist/index-DdkVj7D0.js.map +0 -1
- package/dist/index-De-6atSi.js +0 -2
- package/dist/index-De-6atSi.js.map +0 -1
- package/dist/index-DhGWNzsz.mjs +0 -83
- package/dist/index-DhGWNzsz.mjs.map +0 -1
- package/dist/index-Dkj4QRX8.js +0 -2
- package/dist/index-Dkj4QRX8.js.map +0 -1
- package/dist/index-DlIFg0Eu.mjs +0 -60
- package/dist/index-DlIFg0Eu.mjs.map +0 -1
- package/dist/index-DnaHaH_0.js +0 -2
- package/dist/index-DnaHaH_0.js.map +0 -1
- package/dist/index-MHF2-CYX.js +0 -2
- package/dist/index-MHF2-CYX.js.map +0 -1
- package/dist/index-MQ0c3ZX_.js +0 -2
- package/dist/index-MQ0c3ZX_.js.map +0 -1
- package/dist/index-MSR-vgWR.mjs +0 -37
- package/dist/index-MSR-vgWR.mjs.map +0 -1
- package/dist/index-VL0YEmOW.mjs +0 -125
- package/dist/index-VL0YEmOW.mjs.map +0 -1
- package/dist/index-tXqxYME3.js +0 -42
- package/dist/index-tXqxYME3.js.map +0 -1
- package/dist/inertValue-Bif5Sqs6.mjs +0 -522
- package/dist/inertValue-Bif5Sqs6.mjs.map +0 -1
- package/dist/inertValue-ShwihJSN.js +0 -5
- package/dist/inertValue-ShwihJSN.js.map +0 -1
- package/dist/input/Input.d.ts +0 -14
- package/dist/input/Input.styles.d.ts +0 -11
- package/dist/input/InputAddon.d.ts +0 -9
- package/dist/input/InputAddon.styles.d.ts +0 -9
- package/dist/input/InputClearButton.d.ts +0 -12
- package/dist/input/InputGroup.d.ts +0 -17
- package/dist/input/InputGroup.styles.d.ts +0 -6
- package/dist/input/InputGroupContext.d.ts +0 -14
- package/dist/input/InputIcon.d.ts +0 -6
- package/dist/input/InputLeadingAddon.d.ts +0 -11
- package/dist/input/InputLeadingIcon.d.ts +0 -7
- package/dist/input/InputTrailingAddon.d.ts +0 -11
- package/dist/input/InputTrailingIcon.d.ts +0 -7
- package/dist/input-otp/InputOTP.styles.d.ts +0 -10
- package/dist/input-otp/InputOTPContext.d.ts +0 -16
- package/dist/input-otp/InputOTPGroup.d.ts +0 -7
- package/dist/input-otp/InputOTPSeparator.d.ts +0 -7
- package/dist/input-otp/InputOTPSlot.d.ts +0 -12
- package/dist/input-otp/useInputOTP.d.ts +0 -45
- package/dist/kbd/Kbd.d.ts +0 -5
- package/dist/label/Label.d.ts +0 -9
- package/dist/label/LabelRequiredIndicator.d.ts +0 -6
- package/dist/link-box/LinkBox.d.ts +0 -8
- package/dist/link-box/LinkBoxLink.d.ts +0 -8
- package/dist/link-box/LinkBoxRaised.d.ts +0 -9
- package/dist/pagination/Pagination.d.ts +0 -8
- package/dist/pagination/PaginationContext.d.ts +0 -43
- package/dist/pagination/PaginationEllipsis.d.ts +0 -9
- package/dist/pagination/PaginationFirstPageTrigger.d.ts +0 -16
- package/dist/pagination/PaginationItem.d.ts +0 -17
- package/dist/pagination/PaginationLastPageTrigger.d.ts +0 -16
- package/dist/pagination/PaginationNextTrigger.d.ts +0 -16
- package/dist/pagination/PaginationPages.d.ts +0 -16
- package/dist/pagination/PaginationPrevTrigger.d.ts +0 -16
- package/dist/pagination/utils.d.ts +0 -1
- package/dist/popover/Popover.d.ts +0 -9
- package/dist/popover/PopoverAnchor.d.ts +0 -9
- package/dist/popover/PopoverArrow.d.ts +0 -9
- package/dist/popover/PopoverCloseButton.d.ts +0 -10
- package/dist/popover/PopoverContent.d.ts +0 -10
- package/dist/popover/PopoverContent.styles.d.ts +0 -9
- package/dist/popover/PopoverContext.d.ts +0 -15
- package/dist/popover/PopoverHeader.d.ts +0 -10
- package/dist/popover/PopoverPortal.d.ts +0 -7
- package/dist/popover/PopoverTrigger.d.ts +0 -9
- package/dist/progress/Progress.d.ts +0 -16
- package/dist/progress/ProgressBar.d.ts +0 -6
- package/dist/progress/ProgressBar.styles.d.ts +0 -5
- package/dist/progress/ProgressContext.d.ts +0 -13
- package/dist/progress/ProgressIndicator.d.ts +0 -6
- package/dist/progress/ProgressIndicator.styles.d.ts +0 -7
- package/dist/progress/ProgressLabel.d.ts +0 -6
- package/dist/progress-tracker/ProgressTracker.d.ts +0 -27
- package/dist/progress-tracker/ProgressTracker.styles.d.ts +0 -1
- package/dist/progress-tracker/ProgressTrackerContext.d.ts +0 -15
- package/dist/progress-tracker/ProgressTrackerStep.d.ts +0 -12
- package/dist/progress-tracker/ProgressTrackerStep.styles.d.ts +0 -10
- package/dist/progress-tracker/ProgressTrackerStepIndicator.d.ts +0 -15
- package/dist/progress-tracker/ProgressTrackerStepIndicator.styles.d.ts +0 -7
- package/dist/progress-tracker/ProgressTrackerStepLabel.d.ts +0 -9
- package/dist/radio-group/Radio.d.ts +0 -9
- package/dist/radio-group/RadioGroup.d.ts +0 -54
- package/dist/radio-group/RadioGroup.styles.d.ts +0 -5
- package/dist/radio-group/RadioGroupContext.d.ts +0 -5
- package/dist/radio-group/RadioGroupProvider.d.ts +0 -7
- package/dist/radio-group/RadioIndicator.d.ts +0 -18
- package/dist/radio-group/RadioIndicator.styles.d.ts +0 -5
- package/dist/radio-group/RadioInput.d.ts +0 -25
- package/dist/radio-group/RadioInput.styles.d.ts +0 -5
- package/dist/radio-group/RadioLabel.d.ts +0 -20
- package/dist/radio-group/RadioLabel.styles.d.ts +0 -5
- package/dist/rating/Rating.d.ts +0 -52
- package/dist/rating/RatingStar.d.ts +0 -10
- package/dist/rating/RatingStar.styles.d.ts +0 -14
- package/dist/rating/types.d.ts +0 -1
- package/dist/rating/utils.d.ts +0 -8
- package/dist/scrolling-list/ScrollingList.d.ts +0 -57
- package/dist/scrolling-list/ScrollingListControls.d.ts +0 -18
- package/dist/scrolling-list/ScrollingListItem.d.ts +0 -17
- package/dist/scrolling-list/ScrollingListItems.d.ts +0 -11
- package/dist/scrolling-list/ScrollingListNextButton.d.ts +0 -5
- package/dist/scrolling-list/ScrollingListPrevButton.d.ts +0 -5
- package/dist/scrolling-list/ScrollingListSkipButton.d.ts +0 -9
- package/dist/scrolling-list/useFocusWithinScroll.d.ts +0 -3
- package/dist/segmented-gauge/SegmentedGaugeContext.d.ts +0 -14
- package/dist/segmented-gauge/SegmentedGaugeLabel.d.ts +0 -9
- package/dist/segmented-gauge/SegmentedGaugeSegment.d.ts +0 -12
- package/dist/segmented-gauge/SegmentedGaugeTrack.d.ts +0 -8
- package/dist/select/Select.d.ts +0 -6
- package/dist/select/SelectContext.d.ts +0 -59
- package/dist/select/SelectGroup.d.ts +0 -11
- package/dist/select/SelectItem.d.ts +0 -11
- package/dist/select/SelectItems.d.ts +0 -10
- package/dist/select/SelectItemsGroupContext.d.ts +0 -9
- package/dist/select/SelectLabel.d.ts +0 -8
- package/dist/select/SelectLeadingIcon.d.ts +0 -7
- package/dist/select/SelectPlaceholder.d.ts +0 -10
- package/dist/select/SelectTrigger.d.ts +0 -16
- package/dist/select/SelectTrigger.styles.d.ts +0 -5
- package/dist/select/SelectValue.d.ts +0 -15
- package/dist/select/types.d.ts +0 -6
- package/dist/select/utils.d.ts +0 -4
- package/dist/skeleton/Skeleton.d.ts +0 -17
- package/dist/skeleton/Skeleton.styles.d.ts +0 -5
- package/dist/skeleton/SkeletonItem.d.ts +0 -31
- package/dist/skeleton/SkeletonItem.styles.d.ts +0 -8
- package/dist/slider/Slider.d.ts +0 -55
- package/dist/slider/Slider.styles.d.ts +0 -1
- package/dist/slider/SliderContext.d.ts +0 -4
- package/dist/slider/SliderThumb.d.ts +0 -14
- package/dist/slider/SliderThumb.styles.d.ts +0 -5
- package/dist/slider/SliderTrack.d.ts +0 -14
- package/dist/slider/SliderTrack.styles.d.ts +0 -9
- package/dist/slot/Slot.d.ts +0 -12
- package/dist/snackbar/Snackbar.d.ts +0 -29
- package/dist/snackbar/SnackbarItem.d.ts +0 -49
- package/dist/snackbar/SnackbarItem.styles.d.ts +0 -10
- package/dist/snackbar/SnackbarItemAction.d.ts +0 -10
- package/dist/snackbar/SnackbarItemClose.d.ts +0 -9
- package/dist/snackbar/SnackbarItemContext.d.ts +0 -8
- package/dist/snackbar/SnackbarItemIcon.d.ts +0 -7
- package/dist/snackbar/SnackbarRegion.d.ts +0 -30
- package/dist/snackbar/SnackbarRegion.styles.d.ts +0 -5
- package/dist/snackbar/snackbarVariants.d.ts +0 -82
- package/dist/snackbar/useSnackbarGlobalStore.d.ts +0 -18
- package/dist/snackbar/useSwipe.d.ts +0 -15
- package/dist/spinner/Spinner.d.ts +0 -9
- package/dist/spinner/Spinner.styles.d.ts +0 -7
- package/dist/stepper/Stepper.d.ts +0 -9
- package/dist/stepper/StepperButton.d.ts +0 -14
- package/dist/stepper/StepperInput.d.ts +0 -7
- package/dist/stepper/types.d.ts +0 -46
- package/dist/stepper/useStepper.d.ts +0 -2
- package/dist/switch/Switch.d.ts +0 -6
- package/dist/switch/SwitchInput.styles.d.ts +0 -16
- package/dist/switch/SwitchLabel.d.ts +0 -17
- package/dist/switch/SwitchLabel.styles.d.ts +0 -5
- package/dist/tabs/Tabs.d.ts +0 -24
- package/dist/tabs/TabsContent.d.ts +0 -22
- package/dist/tabs/TabsContent.styles.d.ts +0 -3
- package/dist/tabs/TabsContext.d.ts +0 -7
- package/dist/tabs/TabsList.d.ts +0 -20
- package/dist/tabs/TabsList.styles.d.ts +0 -3
- package/dist/tabs/TabsPopover.d.ts +0 -29
- package/dist/tabs/TabsPopoverAbstraction.d.ts +0 -27
- package/dist/tabs/TabsRoot.styles.d.ts +0 -1
- package/dist/tabs/TabsTrigger.d.ts +0 -41
- package/dist/tabs/TabsTrigger.styles.d.ts +0 -8
- package/dist/tabs/useResizeObserver.d.ts +0 -8
- package/dist/tag/Tag.d.ts +0 -17
- package/dist/tag/Tag.styles.d.ts +0 -8
- package/dist/tag/variants/filled.d.ts +0 -41
- package/dist/tag/variants/index.d.ts +0 -3
- package/dist/tag/variants/outlined.d.ts +0 -37
- package/dist/tag/variants/tinted.d.ts +0 -37
- package/dist/text-link/TextLink.d.ts +0 -16
- package/dist/textarea/Textarea.d.ts +0 -14
- package/dist/textarea/TextareaClearButton.d.ts +0 -10
- package/dist/textarea/TextareaGroup.d.ts +0 -6
- package/dist/textarea/TextareaLeadingIcon.d.ts +0 -7
- package/dist/textarea/TextareaTrailingIcon.d.ts +0 -7
- package/dist/toast/Toast.d.ts +0 -4
- package/dist/toast/Toast.styles.d.ts +0 -10
- package/dist/toast/types.d.ts +0 -41
- package/dist/toast/useRenderSlot.d.ts +0 -3
- package/dist/toast/useToastManager.d.ts +0 -2
- package/dist/useCollapsiblePanel-D1dCo0lf.js +0 -4
- package/dist/useCollapsiblePanel-D1dCo0lf.js.map +0 -1
- package/dist/useCollapsiblePanel-kbMNl4Z4.mjs +0 -287
- package/dist/useCollapsiblePanel-kbMNl4Z4.mjs.map +0 -1
- package/dist/useFocusWithin-CFNEka2I.js +0 -2
- package/dist/useFocusWithin-CFNEka2I.js.map +0 -1
- package/dist/useFocusWithin-CoL4390f.mjs +0 -796
- package/dist/useFocusWithin-CoL4390f.mjs.map +0 -1
- package/dist/useOpenChangeComplete-Dk-u_f2y.js +0 -2
- package/dist/useOpenChangeComplete-Dk-u_f2y.js.map +0 -1
- package/dist/useOpenChangeComplete-RUbg6RBw.mjs +0 -582
- package/dist/useOpenChangeComplete-RUbg6RBw.mjs.map +0 -1
- package/dist/useTransitionStatus-CktVVKxz.mjs +0 -46
- package/dist/useTransitionStatus-CktVVKxz.mjs.map +0 -1
- package/dist/useTransitionStatus-CqbEyvIj.js +0 -2
- package/dist/useTransitionStatus-CqbEyvIj.js.map +0 -1
- package/dist/visually-hidden/VisuallyHidden.d.ts +0 -12
package/dist/pagination/index.js
CHANGED
|
@@ -1,2 +1,1353 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),P=require("react"),K=require("react-dom"),be=require("../index-DnaHaH_0.js"),Te=require("@spark-ui/icons/ArrowDoubleLeft"),B=require("../Icon-Bf0XrmiR.js"),A=require("../IconButton-Bf-EDzpI.js"),ie=require("../Button-C3xHNaGl.js"),Se=require("@spark-ui/icons/ArrowDoubleRight"),je=require("@spark-ui/icons/ArrowVerticalRight"),Re=require("@spark-ui/icons/ArrowVerticalLeft");var z=(e,t=[])=>({parts:(...n)=>{if(Ne(t))return z(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>z(e,[...t,...n]),omit:(...n)=>z(e,t.filter(o=>!n.includes(o))),rename:n=>z(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,o)=>Object.assign(n,{[o]:{selector:[`&[data-scope="${w(e)}"][data-part="${w(o)}"]`,`& [data-scope="${w(e)}"][data-part="${w(o)}"]`].join(", "),attrs:{"data-scope":w(e),"data-part":w(o)}}}),{})}),w=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Ne=e=>e.length===0,de=e=>typeof e=="object"&&e!==null,W=e=>e?"":void 0,Ae=9,Ie=e=>de(e)&&e.nodeType===Ae,ke=e=>de(e)&&e===e.window;function we(e){if(!e)return!1;const t=e.getRootNode();return pe(t)===e}function Ce(e){return Ie(e)?e:ke(e)?e.document:e?.ownerDocument??document}function pe(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function Le(e){return e==null?[]:Array.isArray(e)?e:[e]}var se=e=>e?.constructor.name==="Array",_e=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!X(e[n],t[n]))return!1;return!0},X=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual=="function"&&typeof t?.isEqual=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(se(e)&&se(t))return _e(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(t??Object.create(null)),o=n.length;for(let r=0;r<o;r++)if(!Reflect.has(e,n[r]))return!1;for(let r=0;r<o;r++){const a=n[r];if(!X(e[a],t[a]))return!1}return!0},Oe=e=>e!=null&&typeof e=="object",D=e=>typeof e=="string",M=e=>typeof e=="function",$e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ze=e=>Object.prototype.toString.call(e),fe=Function.prototype.toString,Me=fe.call(Object),Ve=e=>{if(!Oe(e)||ze(e)!="[object Object]"||De(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=$e(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fe.call(n)==Me},qe=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Ge=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,De=e=>qe(e)||Ge(e),Fe=e=>e(),Be=(...e)=>(...t)=>{e.forEach(function(n){n?.(...t)})};function Pe(e){if(!Ve(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(o=>typeof o=="string"),n={};for(const o of t){const r=e[o];r!==void 0&&(n[o]=Pe(r))}return n}function ce(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function We(e,t){if(e==null)throw new Error(t())}var Ue=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),Ze=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,ge=e=>{const t={};let n;for(;n=Ze.exec(e);)t[n[1]]=n[2];return t},Ke=(e,t)=>{if(D(e)){if(D(t))return`${e};${t}`;e=ge(e)}else D(t)&&(t=ge(t));return Object.assign({},e??{},t??{})};function L(...e){let t={};for(let n of e){if(!n)continue;for(let r in t){if(r.startsWith("on")&&typeof t[r]=="function"&&typeof n[r]=="function"){t[r]=Be(n[r],t[r]);continue}if(r==="className"||r==="class"){t[r]=Ue(t[r],n[r]);continue}if(r==="style"){t[r]=Ke(t[r],n[r]);continue}t[r]=n[r]!==void 0?n[r]:t[r]}for(let r in n)t[r]===void 0&&(t[r]=n[r]);const o=Object.getOwnPropertySymbols(n);for(let r of o)t[r]=n[r]}return t}function ue(e,t,n){let o=[],r;return a=>{const g=e(a);return(g.length!==o.length||g.some((u,p)=>!X(o[p],u)))&&(o=g,r=t(g,a)),r}}var C=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(C||{}),U="__init__";function Xe(e){const t=()=>e.getRootNode?.()??document,n=()=>Ce(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>pe(t()),isActiveElement:we,getById:g=>t().getElementById(g)}}function Je(e){return new Proxy({},{get(t,n){return n==="style"?o=>e({style:o}).style:e}})}var J=()=>e=>Array.from(new Set(e)),He=z("pagination").parts("root","item","ellipsis","prevTrigger","nextTrigger"),$=He.build(),Qe=e=>e.ids?.root??`pagination:${e.id}`,Ye=e=>e.ids?.prevTrigger??`pagination:${e.id}:prev`,et=e=>e.ids?.nextTrigger??`pagination:${e.id}:next`,tt=(e,t)=>e.ids?.ellipsis?.(t)??`pagination:${e.id}:ellipsis:${t}`,nt=(e,t)=>e.ids?.item?.(t)??`pagination:${e.id}:item:${t}`,q=(e,t)=>{let n=t-e+1;return Array.from({length:n},(o,r)=>r+e)},rt=e=>e.map(t=>typeof t=="number"?{type:"page",value:t}:{type:"ellipsis"}),G="ellipsis",ot=e=>{const{page:t,totalPages:n,siblingCount:o}=e,r=Math.min(2*o+5,n),a=1,g=n,c=Math.max(t-o,a),u=Math.min(t+o,g),p=c>a+1,f=u<g-1,s=r-2;if(!p&&f)return[...q(1,s),G,g];if(p&&!f){const y=q(g-s+1,g);return[a,G,...y]}if(p&&f){const y=q(c,u);return[a,G,...y,G,g]}return q(a,g)},at=e=>rt(ot(e));function it(e,t){const{send:n,scope:o,prop:r,computed:a,context:g}=e,c=a("totalPages"),u=g.get("page"),p=g.get("pageSize"),f=r("translations"),s=r("count"),m=r("getPageUrl"),y=r("type"),k=a("previousPage"),R=a("nextPage"),E=a("pageRange"),j=u===1,_=u===c,V=at({page:u,totalPages:c,siblingCount:r("siblingCount")});return{count:s,page:u,pageSize:p,totalPages:c,pages:V,previousPage:k,nextPage:R,pageRange:E,slice(b){return b.slice(E.start,E.end)},setPageSize(b){n({type:"SET_PAGE_SIZE",size:b})},setPage(b){n({type:"SET_PAGE",page:b})},goToNextPage(){n({type:"NEXT_PAGE"})},goToPrevPage(){n({type:"PREVIOUS_PAGE"})},goToFirstPage(){n({type:"FIRST_PAGE"})},goToLastPage(){n({type:"LAST_PAGE"})},getRootProps(){return t.element({id:Qe(o),...$.root.attrs,dir:r("dir"),"aria-label":f.rootLabel})},getEllipsisProps(b){return t.element({id:tt(o,b.index),...$.ellipsis.attrs,dir:r("dir")})},getItemProps(b){const S=b.value,x=S===u;return t.element({id:nt(o,S),...$.item.attrs,dir:r("dir"),"data-index":S,"data-selected":W(x),"aria-current":x?"page":void 0,"aria-label":f.itemLabel?.({page:S,totalPages:c}),onClick(){n({type:"SET_PAGE",page:S})},...y==="button"&&{type:"button"},...y==="link"&&m&&{href:m({page:S,pageSize:p})}})},getPrevTriggerProps(){return t.element({id:Ye(o),...$.prevTrigger.attrs,dir:r("dir"),"data-disabled":W(j),"aria-label":f.prevTriggerLabel,onClick(){n({type:"PREVIOUS_PAGE"})},...y==="button"&&{disabled:j,type:"button"},...y==="link"&&m&&k&&{href:m({page:k,pageSize:p})}})},getNextTriggerProps(){return t.element({id:et(o),...$.nextTrigger.attrs,dir:r("dir"),"data-disabled":W(_),"aria-label":f.nextTriggerLabel,onClick(){n({type:"NEXT_PAGE"})},...y==="button"&&{disabled:_,type:"button"},...y==="link"&&m&&R&&{href:m({page:R,pageSize:p})}})}}}var st={props({props:e}){return{defaultPageSize:10,siblingCount:1,defaultPage:1,type:"button",count:1,...e,translations:{rootLabel:"pagination",prevTriggerLabel:"previous page",nextTriggerLabel:"next page",itemLabel({page:t,totalPages:n}){return`${n>1&&t===n?"last page, ":""}page ${t}`},...e.translations}}},initialState(){return"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({value:e("page"),defaultValue:e("defaultPage"),onChange(o){const r=n();e("onPageChange")?.({page:o,pageSize:r.get("pageSize")})}})),pageSize:t(()=>({value:e("pageSize"),defaultValue:e("defaultPageSize"),onChange(o){e("onPageSizeChange")?.({pageSize:o})}}))}},watch({track:e,context:t,action:n}){e([()=>t.get("pageSize")],()=>{n(["setPageIfNeeded"])})},computed:{totalPages:ue(({prop:e,context:t})=>[t.get("pageSize"),e("count")],([e,t])=>Math.ceil(t/e)),pageRange:ue(({context:e,prop:t})=>[e.get("page"),e.get("pageSize"),t("count")],([e,t,n])=>{const o=(e-1)*t;return{start:o,end:Math.min(o+t,n)}}),previousPage:({context:e})=>e.get("page")===1?null:e.get("page")-1,nextPage:({context:e,computed:t})=>e.get("page")===t("totalPages")?null:e.get("page")+1,isValidPage:({context:e,computed:t})=>e.get("page")>=1&&e.get("page")<=t("totalPages")},on:{SET_PAGE:{guard:"isValidPage",actions:["setPage"]},SET_PAGE_SIZE:{actions:["setPageSize"]},FIRST_PAGE:{actions:["goToFirstPage"]},LAST_PAGE:{actions:["goToLastPage"]},PREVIOUS_PAGE:{guard:"canGoToPrevPage",actions:["goToPrevPage"]},NEXT_PAGE:{guard:"canGoToNextPage",actions:["goToNextPage"]}},states:{idle:{}},implementations:{guards:{isValidPage:({event:e,computed:t})=>e.page>=1&&e.page<=t("totalPages"),isValidCount:({context:e,event:t})=>e.get("page")>t.count,canGoToNextPage:({context:e,computed:t})=>e.get("page")<t("totalPages"),canGoToPrevPage:({context:e})=>e.get("page")>1},actions:{setPage({context:e,event:t,computed:n}){const o=Z(t.page,n("totalPages"));e.set("page",o)},setPageSize({context:e,event:t}){e.set("pageSize",t.size)},goToFirstPage({context:e}){e.set("page",1)},goToLastPage({context:e,computed:t}){e.set("page",t("totalPages"))},goToPrevPage({context:e,computed:t}){e.set("page",n=>Z(n-1,t("totalPages")))},goToNextPage({context:e,computed:t}){e.set("page",n=>Z(n+1,t("totalPages")))},setPageIfNeeded({context:e,computed:t}){t("isValidPage")||e.set("page",1)}}}},Z=(e,t)=>Math.min(Math.max(e,1),t);J()(["count","dir","getRootNode","id","ids","onPageChange","onPageSizeChange","page","defaultPage","pageSize","defaultPageSize","siblingCount","translations","type","getPageUrl"]);J()(["value","type"]);J()(["index"]);var me=typeof globalThis.document<"u"?P.useLayoutEffect:P.useEffect;function F(e){const t=e().value??e().defaultValue,n=e().isEqual??Object.is,[o]=P.useState(t),[r,a]=P.useState(o),g=e().value!==void 0,c=P.useRef(r);c.current=g?e().value:r;const u=P.useRef(c.current);me(()=>{u.current=c.current},[r,e().value]);const p=s=>{const m=u.current,y=M(s)?s(m):s;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:y,prev:m}),g||a(y),n(y,m)||e().onChange?.(y,m)};function f(){return g?e().value:r}return{initial:o,ref:c,get:f,set(s){(e().sync?K.flushSync:Fe)(()=>p(s))},invoke(s,m){e().onChange?.(s,m)},hash(s){return e().hash?.(s)??String(s)}}}F.cleanup=e=>{P.useEffect(()=>e,[])};F.ref=e=>{const t=P.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function ct(e){const t=P.useRef(e);return{get(n){return t.current[n]},set(n,o){t.current[n]=o}}}var gt=(e,t)=>{const n=P.useRef(!1),o=P.useRef(!1);P.useEffect(()=>{if(n.current&&o.current)return t();o.current=!0},[...(e??[]).map(r=>typeof r=="function"?r():r)]),P.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ut(e,t={}){const n=P.useMemo(()=>{const{id:i,ids:l,getRootNode:v}=t;return Xe({id:i,ids:l,getRootNode:v})},[t]),o=(...i)=>{e.debug&&console.log(...i)},r=e.props?.({props:Pe(t),scope:n})??t,a=lt(r),g=e.context?.({prop:a,bindable:F,scope:n,flush:le,getContext(){return u},getComputed(){return S},getRefs(){return R},getEvent(){return y()}}),c=ye(g),u={get(i){return c.current?.[i].ref.current},set(i,l){c.current?.[i].set(l)},initial(i){return c.current?.[i].initial},hash(i){const l=c.current?.[i].get();return c.current?.[i].hash(l)}},p=P.useRef(new Map),f=P.useRef(null),s=P.useRef(null),m=P.useRef({type:""}),y=()=>({...m.current,current(){return m.current},previous(){return s.current}}),k=()=>({...x,matches(...i){return i.includes(x.ref.current)},hasTag(i){return!!e.states[x.ref.current]?.tags?.includes(i)}}),R=ct(e.refs?.({prop:a,context:u})??{}),E=()=>({state:k(),context:u,event:y(),prop:a,send:ae,action:j,guard:_,track:gt,refs:R,computed:S,flush:le,scope:n,choose:b}),j=i=>{const l=M(i)?i(E()):i;if(!l)return;const v=l.map(h=>{const T=e.implementations?.actions?.[h];return T||ce(`[zag-js] No implementation found for action "${JSON.stringify(h)}"`),T});for(const h of v)h?.(E())},_=i=>M(i)?i(E()):e.implementations?.guards?.[i](E()),V=i=>{const l=M(i)?i(E()):i;if(!l)return;const v=l.map(T=>{const N=e.implementations?.effects?.[T];return N||ce(`[zag-js] No implementation found for effect "${JSON.stringify(T)}"`),N}),h=[];for(const T of v){const N=T?.(E());N&&h.push(N)}return()=>h.forEach(T=>T?.())},b=i=>Le(i).find(l=>{let v=!l.guard;return D(l.guard)?v=!!_(l.guard):M(l.guard)&&(v=l.guard(E())),v}),S=i=>{We(e.computed,()=>"[zag-js] No computed object found on machine");const l=e.computed[i];return l({context:u,event:y(),prop:a,refs:R,scope:n,computed:S})},x=F(()=>({defaultValue:e.initialState({prop:a}),onChange(i,l){l&&(p.current.get(l)?.(),p.current.delete(l)),l&&j(e.states[l]?.exit),j(f.current?.actions);const v=V(e.states[i]?.effects);if(v&&p.current.set(i,v),l===U){j(e.entry);const h=V(e.effects);h&&p.current.set(U,h)}j(e.states[i]?.entry)}})),oe=P.useRef(void 0),O=P.useRef(C.NotStarted);me(()=>{queueMicrotask(()=>{const v=O.current===C.Started;O.current=C.Started,o(v?"rehydrating...":"initializing...");const h=oe.current??x.initial;x.invoke(h,v?x.get():U)});const i=p.current,l=x.ref.current;return()=>{o("unmounting..."),oe.current=l,O.current=C.Stopped,i.forEach(v=>v?.()),p.current=new Map,f.current=null,queueMicrotask(()=>{j(e.exit)})}},[]);const Ee=()=>"ref"in x?x.ref.current:x.get(),ae=i=>{queueMicrotask(()=>{if(O.current!==C.Started)return;s.current=m.current,m.current=i;let l=Ee();const v=e.states[l].on?.[i.type]??e.on?.[i.type],h=b(v);if(!h)return;f.current=h;const T=h.target??l;o("transition",i.type,h.target||l,`(${h.actions})`);const N=T!==l;N?K.flushSync(()=>x.set(T)):h.reenter&&!N?x.invoke(l,l):j(h.actions??[])})};return e.watch?.(E()),{state:k(),send:ae,context:u,prop:a,scope:n,refs:R,computed:S,event:y(),getStatus:()=>O.current}}function ye(e){const t=P.useRef(e);return t.current=e,t}function lt(e){const t=ye(e);return function(o){return t.current[o]}}function le(e){queueMicrotask(()=>{K.flushSync(()=>e())})}var dt=Je(e=>e);function pt(e,t,n){const o=(n-1)/2;let r=Math.max(0,t-o),a=Math.min(e.length,t+o+1);return a-r<n&&(r=Math.max(0,Math.min(r,e.length-n)),a=Math.min(e.length,r+n)),e.slice(r,a)}const he=P.createContext(null),ft=({children:e,count:t,visiblePageItems:n=7,pageSize:o,page:r,onPageChange:a,noEllipsis:g,type:c="link"})=>{const u=g?1/0:Math.max(0,Math.floor((n-5)/2)),p=P.useId(),f=ut(st,{id:p,count:t,siblingCount:u,pageSize:o,page:r,onPageChange:a,type:c}),s=it(f,dt),m=g?pt(s.pages,s.page-1,n):s.pages;return d.jsx(he.Provider,{value:{type:c,pagination:{...s,pages:m,getFirstPageTriggerProps:()=>({...s.getPrevTriggerProps(),id:`${s.getRootProps().id}:first`,"data-part":"first-page-trigger",onClick:s.goToFirstPage}),getLastPageTriggerProps:()=>({...s.getNextTriggerProps(),id:`${s.getRootProps().id}:last`,"data-part":"last-page-trigger",onClick:s.goToLastPage})}},children:e})},I=()=>{const e=P.useContext(he);if(!e)throw Error("usePagination must be used within a Pagination provider");return e},ve=({children:e,visiblePageItems:t=5,type:n="link",noEllipsis:o=!1,className:r,...a})=>d.jsx(ft,{visiblePageItems:t,noEllipsis:o,type:n,...a,children:d.jsx(Pt,{className:r,children:e})}),Pt=({children:e,className:t})=>{const{pagination:n}=I(),o=n.getRootProps();return d.jsx("nav",{"data-spark-component":"pagination",...o,className:t,children:d.jsx("ul",{className:"gap-md flex flex-wrap",children:e})})};ve.displayName="Pagination";const H=({children:e,index:t,className:n,ref:o,...r})=>{const{pagination:a}=I(),g=a.getEllipsisProps({index:t}),c={className:be.cx("flex size-sz-44 items-center justify-center",n),...r},u=L(g,c);return d.jsx("li",{children:d.jsx("span",{"data-spark-component":"pagination-ellipsis",ref:o,...u,children:e||"…"})})};H.displayName="Pagination.Ellipsis";const Q=({children:e,className:t,href:n,ref:o,...r})=>{const{pagination:a,type:g}=I(),c=a.getFirstPageTriggerProps(),u=g==="link"&&c["data-disabled"]==="",p={"data-spark-component":"pagination-first-page-trigger",intent:"support",design:"contrast",...r,className:t,...u&&{disabled:!0,role:"link","aria-disabled":!0}},f=L(c,p),s=e||d.jsx(B.Icon,{children:d.jsx(Te.ArrowDoubleLeft,{})});return d.jsx("li",{children:n?d.jsx(A.IconButton,{ref:o,...f,asChild:!0,children:d.jsx("a",{href:u?void 0:n,children:s})}):d.jsx(A.IconButton,{ref:o,...f,children:s})})};Q.displayName="Pagination.FirstPageTrigger";const Y=({children:e,value:t,className:n,href:o,ref:r,...a})=>{const{pagination:g}=I(),c=g.getItemProps({type:"page",value:t}),u={"data-spark-component":"pagination-item",intent:"support",design:c["aria-current"]==="page"?"filled":"contrast",className:n,...a},p=L(c,u);return d.jsx("li",{children:o?d.jsx(ie.Button,{ref:r,...p,asChild:!0,children:d.jsx("a",{href:o,children:e||t})}):d.jsx(ie.Button,{ref:r,...p,children:e||t})})};Y.displayName="Pagination.Item";const ee=({children:e,className:t,href:n,ref:o,...r})=>{const{pagination:a,type:g}=I(),c=a.getLastPageTriggerProps(),u=g==="link"&&c["data-disabled"]==="",p={"data-spark-component":"pagination-last-page-trigger",intent:"support",design:"contrast",...r,className:t,...u&&{disabled:!0,role:"link","aria-disabled":!0}},f=L(c,p),s=e||d.jsx(B.Icon,{children:d.jsx(Se.ArrowDoubleRight,{})});return d.jsx("li",{children:n?d.jsx(A.IconButton,{ref:o,...f,asChild:!0,children:d.jsx("a",{href:u?void 0:n,children:s})}):d.jsx(A.IconButton,{ref:o,...f,children:s})})};ee.displayName="Pagination.LastPageTrigger";const te=({children:e,className:t,href:n,ref:o,...r})=>{const{pagination:a,type:g}=I(),c=a.getNextTriggerProps(),u=g==="link"&&c["data-disabled"]==="",p={"data-spark-component":"pagination-next-trigger",intent:"support",design:"contrast",...r,className:t,...u&&{disabled:!0,role:"link","aria-disabled":!0}},f=L(c,p),s=e||d.jsx(B.Icon,{children:d.jsx(je.ArrowVerticalRight,{})});return d.jsx("li",{children:n?d.jsx(A.IconButton,{ref:o,...f,asChild:!0,children:d.jsx("a",{href:u?void 0:n,children:s})}):d.jsx(A.IconButton,{ref:o,...f,children:s})})};te.displayName="Pagination.NextTrigger";const ne=({children:e})=>{const{pagination:t}=I();return e(t)};ne.displayName="Pagination.Pages";const re=({children:e,className:t,href:n,ref:o,...r})=>{const{pagination:a,type:g}=I(),c=a.getPrevTriggerProps(),u=g==="link"&&c["data-disabled"]==="",p={"data-spark-component":"pagination-prev-trigger",intent:"support",design:"contrast",...r,className:t,...u&&{disabled:!0,role:"link","aria-disabled":!0}},f=L(c,p),s=e||d.jsx(B.Icon,{children:d.jsx(Re.ArrowVerticalLeft,{})});return d.jsx("li",{children:n?d.jsx(A.IconButton,{ref:o,...f,asChild:!0,children:d.jsx("a",{href:u?void 0:n,children:s})}):d.jsx(A.IconButton,{ref:o,...f,children:s})})};re.displayName="Pagination.PrevTrigger";const xe=Object.assign(ve,{PrevTrigger:re,NextTrigger:te,Pages:ne,Item:Y,Ellipsis:H,FirstPageTrigger:Q,LastPageTrigger:ee});xe.displayName="Pagination";re.displayName="Pagination.PrevTrigger";te.displayName="Pagination.NextTrigger";ne.displayName="Pagination.Pages";Y.displayName="Pagination.Item";H.displayName="Pagination.Ellipsis";Q.displayName="Pagination.FirstPageTrigger";ee.displayName="Pagination.LastPageTrigger";exports.Pagination=xe;
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/pagination/index.ts
|
|
31
|
+
var pagination_exports = {};
|
|
32
|
+
__export(pagination_exports, {
|
|
33
|
+
Pagination: () => Pagination2
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(pagination_exports);
|
|
36
|
+
|
|
37
|
+
// src/pagination/PaginationContext.tsx
|
|
38
|
+
var pagination = __toESM(require("@zag-js/pagination"));
|
|
39
|
+
var import_react = require("@zag-js/react");
|
|
40
|
+
var import_react2 = require("react");
|
|
41
|
+
|
|
42
|
+
// src/pagination/utils.ts
|
|
43
|
+
function sliceArrayWithIndex(arr, index, length) {
|
|
44
|
+
const relativeElements = (length - 1) / 2;
|
|
45
|
+
let start = Math.max(0, index - relativeElements);
|
|
46
|
+
let end = Math.min(arr.length, index + relativeElements + 1);
|
|
47
|
+
if (end - start < length) {
|
|
48
|
+
start = Math.max(0, Math.min(start, arr.length - length));
|
|
49
|
+
end = Math.min(arr.length, start + length);
|
|
50
|
+
}
|
|
51
|
+
return arr.slice(start, end);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// src/pagination/PaginationContext.tsx
|
|
55
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
56
|
+
var PaginationContext = (0, import_react2.createContext)(null);
|
|
57
|
+
var PaginationProvider = ({
|
|
58
|
+
children,
|
|
59
|
+
count,
|
|
60
|
+
visiblePageItems = 7,
|
|
61
|
+
pageSize,
|
|
62
|
+
page,
|
|
63
|
+
onPageChange,
|
|
64
|
+
noEllipsis,
|
|
65
|
+
type = "link"
|
|
66
|
+
}) => {
|
|
67
|
+
const siblingCount = noEllipsis ? Infinity : Math.max(0, Math.floor((visiblePageItems - 5) / 2));
|
|
68
|
+
const id = (0, import_react2.useId)();
|
|
69
|
+
const service = (0, import_react.useMachine)(pagination.machine, {
|
|
70
|
+
id,
|
|
71
|
+
count,
|
|
72
|
+
siblingCount,
|
|
73
|
+
pageSize,
|
|
74
|
+
page,
|
|
75
|
+
onPageChange,
|
|
76
|
+
type
|
|
77
|
+
});
|
|
78
|
+
const api = pagination.connect(service, import_react.normalizeProps);
|
|
79
|
+
const pages = noEllipsis ? sliceArrayWithIndex(api.pages, api.page - 1, visiblePageItems) : api.pages;
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
PaginationContext.Provider,
|
|
82
|
+
{
|
|
83
|
+
value: {
|
|
84
|
+
type,
|
|
85
|
+
pagination: {
|
|
86
|
+
...api,
|
|
87
|
+
pages,
|
|
88
|
+
// Extending ZagJS anatomy
|
|
89
|
+
getFirstPageTriggerProps: () => {
|
|
90
|
+
return {
|
|
91
|
+
...api.getPrevTriggerProps(),
|
|
92
|
+
id: `${api.getRootProps().id}:first`,
|
|
93
|
+
"data-part": "first-page-trigger",
|
|
94
|
+
onClick: api.goToFirstPage
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
getLastPageTriggerProps: () => {
|
|
98
|
+
return {
|
|
99
|
+
...api.getNextTriggerProps(),
|
|
100
|
+
id: `${api.getRootProps().id}:last`,
|
|
101
|
+
"data-part": "last-page-trigger",
|
|
102
|
+
onClick: api.goToLastPage
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
children
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
var usePagination = () => {
|
|
112
|
+
const context = (0, import_react2.useContext)(PaginationContext);
|
|
113
|
+
if (!context) {
|
|
114
|
+
throw Error("usePagination must be used within a Pagination provider");
|
|
115
|
+
}
|
|
116
|
+
return context;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// src/pagination/Pagination.tsx
|
|
120
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
121
|
+
var Pagination = ({
|
|
122
|
+
children,
|
|
123
|
+
visiblePageItems = 5,
|
|
124
|
+
type = "link",
|
|
125
|
+
noEllipsis = false,
|
|
126
|
+
className,
|
|
127
|
+
...rest
|
|
128
|
+
}) => {
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
130
|
+
PaginationProvider,
|
|
131
|
+
{
|
|
132
|
+
visiblePageItems,
|
|
133
|
+
noEllipsis,
|
|
134
|
+
type,
|
|
135
|
+
...rest,
|
|
136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationWrapper, { className, children })
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
var PaginationWrapper = ({
|
|
141
|
+
children,
|
|
142
|
+
className
|
|
143
|
+
}) => {
|
|
144
|
+
const { pagination: pagination2 } = usePagination();
|
|
145
|
+
const props = pagination2.getRootProps();
|
|
146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("nav", { "data-spark-component": "pagination", ...props, className, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "gap-md flex flex-wrap", children }) });
|
|
147
|
+
};
|
|
148
|
+
Pagination.displayName = "Pagination";
|
|
149
|
+
|
|
150
|
+
// src/pagination/PaginationEllipsis.tsx
|
|
151
|
+
var import_react3 = require("@zag-js/react");
|
|
152
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
153
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
154
|
+
var Ellipsis = ({ children, index, className, ref, ...rest }) => {
|
|
155
|
+
const { pagination: pagination2 } = usePagination();
|
|
156
|
+
const apiProps = pagination2.getEllipsisProps({ index });
|
|
157
|
+
const localProps = {
|
|
158
|
+
className: (0, import_class_variance_authority.cx)("flex size-sz-44 items-center justify-center", className),
|
|
159
|
+
...rest
|
|
160
|
+
};
|
|
161
|
+
const mergedProps = (0, import_react3.mergeProps)(apiProps, localProps);
|
|
162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "data-spark-component": "pagination-ellipsis", ref, ...mergedProps, children: children || "\u2026" }) });
|
|
163
|
+
};
|
|
164
|
+
Ellipsis.displayName = "Pagination.Ellipsis";
|
|
165
|
+
|
|
166
|
+
// src/pagination/PaginationFirstPageTrigger.tsx
|
|
167
|
+
var import_ArrowDoubleLeft = require("@spark-ui/icons/ArrowDoubleLeft");
|
|
168
|
+
var import_react7 = require("@zag-js/react");
|
|
169
|
+
|
|
170
|
+
// src/icon/Icon.tsx
|
|
171
|
+
var import_react5 = require("react");
|
|
172
|
+
|
|
173
|
+
// src/slot/Slot.tsx
|
|
174
|
+
var import_radix_ui = require("radix-ui");
|
|
175
|
+
var import_react4 = require("react");
|
|
176
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
177
|
+
var Slottable = import_radix_ui.Slot.Slottable;
|
|
178
|
+
var Slot = ({ ref, ...props }) => {
|
|
179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_radix_ui.Slot.Root, { ref, ...props });
|
|
180
|
+
};
|
|
181
|
+
var wrapPolymorphicSlot = (asChild, children, callback) => {
|
|
182
|
+
if (!asChild) return callback(children);
|
|
183
|
+
return (0, import_react4.isValidElement)(children) ? (0, import_react4.cloneElement)(
|
|
184
|
+
children,
|
|
185
|
+
void 0,
|
|
186
|
+
callback(children.props.children)
|
|
187
|
+
) : null;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// src/visually-hidden/VisuallyHidden.tsx
|
|
191
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
192
|
+
var VisuallyHidden = ({ asChild = false, ref, ...props }) => {
|
|
193
|
+
const Component = asChild ? Slot : "span";
|
|
194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
195
|
+
Component,
|
|
196
|
+
{
|
|
197
|
+
...props,
|
|
198
|
+
ref,
|
|
199
|
+
style: {
|
|
200
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
201
|
+
position: "absolute",
|
|
202
|
+
border: 0,
|
|
203
|
+
width: 1,
|
|
204
|
+
height: 1,
|
|
205
|
+
padding: 0,
|
|
206
|
+
margin: -1,
|
|
207
|
+
overflow: "hidden",
|
|
208
|
+
clip: "rect(0, 0, 0, 0)",
|
|
209
|
+
whiteSpace: "nowrap",
|
|
210
|
+
wordWrap: "normal",
|
|
211
|
+
...props.style
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
};
|
|
216
|
+
VisuallyHidden.displayName = "VisuallyHidden";
|
|
217
|
+
|
|
218
|
+
// src/icon/Icon.styles.tsx
|
|
219
|
+
var import_internal_utils = require("@spark-ui/internal-utils");
|
|
220
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
221
|
+
var iconStyles = (0, import_class_variance_authority2.cva)(["fill-current shrink-0"], {
|
|
222
|
+
variants: {
|
|
223
|
+
/**
|
|
224
|
+
* Color scheme of the icon.
|
|
225
|
+
*/
|
|
226
|
+
intent: (0, import_internal_utils.makeVariants)({
|
|
227
|
+
current: ["text-current"],
|
|
228
|
+
main: ["text-main"],
|
|
229
|
+
support: ["text-support"],
|
|
230
|
+
accent: ["text-accent"],
|
|
231
|
+
basic: ["text-basic"],
|
|
232
|
+
success: ["text-success"],
|
|
233
|
+
alert: ["text-alert"],
|
|
234
|
+
error: ["text-error"],
|
|
235
|
+
info: ["text-info"],
|
|
236
|
+
neutral: ["text-neutral"]
|
|
237
|
+
}),
|
|
238
|
+
/**
|
|
239
|
+
* Sets the size of the icon.
|
|
240
|
+
*/
|
|
241
|
+
size: (0, import_internal_utils.makeVariants)({
|
|
242
|
+
current: ["u-current-font-size"],
|
|
243
|
+
sm: ["w-sz-16", "h-sz-16"],
|
|
244
|
+
md: ["w-sz-24", "h-sz-24"],
|
|
245
|
+
lg: ["w-sz-32", "h-sz-32"],
|
|
246
|
+
xl: ["w-sz-40", "h-sz-40"]
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// src/icon/Icon.tsx
|
|
252
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
253
|
+
var Icon = ({
|
|
254
|
+
label,
|
|
255
|
+
className,
|
|
256
|
+
size = "current",
|
|
257
|
+
intent = "current",
|
|
258
|
+
children,
|
|
259
|
+
...others
|
|
260
|
+
}) => {
|
|
261
|
+
const child = import_react5.Children.only(children);
|
|
262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
263
|
+
(0, import_react5.cloneElement)(child, {
|
|
264
|
+
className: iconStyles({ className, size, intent }),
|
|
265
|
+
"data-spark-component": "icon",
|
|
266
|
+
"aria-hidden": "true",
|
|
267
|
+
focusable: "false",
|
|
268
|
+
...others
|
|
269
|
+
}),
|
|
270
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(VisuallyHidden, { children: label })
|
|
271
|
+
] });
|
|
272
|
+
};
|
|
273
|
+
Icon.displayName = "Icon";
|
|
274
|
+
|
|
275
|
+
// src/button/Button.tsx
|
|
276
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
277
|
+
var import_react6 = require("react");
|
|
278
|
+
|
|
279
|
+
// src/spinner/Spinner.styles.tsx
|
|
280
|
+
var import_internal_utils2 = require("@spark-ui/internal-utils");
|
|
281
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
282
|
+
var defaultVariants = {
|
|
283
|
+
intent: "current",
|
|
284
|
+
size: "current",
|
|
285
|
+
isBackgroundVisible: false
|
|
286
|
+
};
|
|
287
|
+
var spinnerStyles = (0, import_class_variance_authority3.cva)(
|
|
288
|
+
["inline-block", "border-solid", "rounded-full", "border-md", "animate-spin"],
|
|
289
|
+
{
|
|
290
|
+
variants: {
|
|
291
|
+
/**
|
|
292
|
+
* Use `size` prop to set the size of the spinner. If you want to set the full size for the spinner, don't forget to add a wrapping container with its own size.
|
|
293
|
+
*/
|
|
294
|
+
size: {
|
|
295
|
+
current: ["u-current-font-size"],
|
|
296
|
+
sm: ["w-sz-20", "h-sz-20"],
|
|
297
|
+
md: ["w-sz-28", "h-sz-28"],
|
|
298
|
+
full: ["w-full", "h-full"]
|
|
299
|
+
},
|
|
300
|
+
/**
|
|
301
|
+
* Color scheme of the spinner.
|
|
302
|
+
*/
|
|
303
|
+
intent: (0, import_internal_utils2.makeVariants)({
|
|
304
|
+
current: ["border-current"],
|
|
305
|
+
main: ["border-main"],
|
|
306
|
+
support: ["border-support"],
|
|
307
|
+
accent: ["border-accent"],
|
|
308
|
+
basic: ["border-basic"],
|
|
309
|
+
success: ["border-success"],
|
|
310
|
+
alert: ["border-alert"],
|
|
311
|
+
error: ["border-error"],
|
|
312
|
+
info: ["border-info"],
|
|
313
|
+
neutral: ["border-neutral"]
|
|
314
|
+
}),
|
|
315
|
+
/**
|
|
316
|
+
* Size of the button.
|
|
317
|
+
*/
|
|
318
|
+
isBackgroundVisible: {
|
|
319
|
+
true: ["border-b-neutral-container", "border-l-neutral-container"],
|
|
320
|
+
false: ["border-b-transparent", "border-l-transparent"]
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
defaultVariants
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
// src/spinner/Spinner.tsx
|
|
328
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
329
|
+
var Spinner = ({
|
|
330
|
+
className,
|
|
331
|
+
size = "current",
|
|
332
|
+
intent = "current",
|
|
333
|
+
label,
|
|
334
|
+
isBackgroundVisible,
|
|
335
|
+
ref,
|
|
336
|
+
...others
|
|
337
|
+
}) => {
|
|
338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
339
|
+
"span",
|
|
340
|
+
{
|
|
341
|
+
role: "status",
|
|
342
|
+
"data-spark-component": "spinner",
|
|
343
|
+
ref,
|
|
344
|
+
className: spinnerStyles({ className, size, intent, isBackgroundVisible }),
|
|
345
|
+
...others,
|
|
346
|
+
children: label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(VisuallyHidden, { children: label })
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
// src/button/Button.styles.tsx
|
|
352
|
+
var import_internal_utils8 = require("@spark-ui/internal-utils");
|
|
353
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
354
|
+
|
|
355
|
+
// src/button/variants/filled.ts
|
|
356
|
+
var import_internal_utils3 = require("@spark-ui/internal-utils");
|
|
357
|
+
var filledVariants = [
|
|
358
|
+
// Main
|
|
359
|
+
{
|
|
360
|
+
intent: "main",
|
|
361
|
+
design: "filled",
|
|
362
|
+
class: (0, import_internal_utils3.tw)([
|
|
363
|
+
"bg-main",
|
|
364
|
+
"text-on-main",
|
|
365
|
+
"hover:bg-main-hovered",
|
|
366
|
+
"enabled:active:bg-main-hovered",
|
|
367
|
+
"focus-visible:bg-main-hovered"
|
|
368
|
+
])
|
|
369
|
+
},
|
|
370
|
+
// Support
|
|
371
|
+
{
|
|
372
|
+
intent: "support",
|
|
373
|
+
design: "filled",
|
|
374
|
+
class: (0, import_internal_utils3.tw)([
|
|
375
|
+
"bg-support",
|
|
376
|
+
"text-on-support",
|
|
377
|
+
"hover:bg-support-hovered",
|
|
378
|
+
"enabled:active:bg-support-hovered",
|
|
379
|
+
"focus-visible:bg-support-hovered"
|
|
380
|
+
])
|
|
381
|
+
},
|
|
382
|
+
// Accent
|
|
383
|
+
{
|
|
384
|
+
intent: "accent",
|
|
385
|
+
design: "filled",
|
|
386
|
+
class: (0, import_internal_utils3.tw)([
|
|
387
|
+
"bg-accent",
|
|
388
|
+
"text-on-accent",
|
|
389
|
+
"hover:bg-accent-hovered",
|
|
390
|
+
"enabled:active:bg-accent-hovered",
|
|
391
|
+
"focus-visible:bg-accent-hovered"
|
|
392
|
+
])
|
|
393
|
+
},
|
|
394
|
+
// Basic
|
|
395
|
+
{
|
|
396
|
+
intent: "basic",
|
|
397
|
+
design: "filled",
|
|
398
|
+
class: (0, import_internal_utils3.tw)([
|
|
399
|
+
"bg-basic",
|
|
400
|
+
"text-on-basic",
|
|
401
|
+
"hover:bg-basic-hovered",
|
|
402
|
+
"enabled:active:bg-basic-hovered",
|
|
403
|
+
"focus-visible:bg-basic-hovered"
|
|
404
|
+
])
|
|
405
|
+
},
|
|
406
|
+
// Success
|
|
407
|
+
{
|
|
408
|
+
intent: "success",
|
|
409
|
+
design: "filled",
|
|
410
|
+
class: (0, import_internal_utils3.tw)([
|
|
411
|
+
"bg-success",
|
|
412
|
+
"text-on-success",
|
|
413
|
+
"hover:bg-success-hovered",
|
|
414
|
+
"enabled:active:bg-success-hovered",
|
|
415
|
+
"focus-visible:bg-success-hovered"
|
|
416
|
+
])
|
|
417
|
+
},
|
|
418
|
+
// Alert
|
|
419
|
+
{
|
|
420
|
+
intent: "alert",
|
|
421
|
+
design: "filled",
|
|
422
|
+
class: (0, import_internal_utils3.tw)([
|
|
423
|
+
"bg-alert",
|
|
424
|
+
"text-on-alert",
|
|
425
|
+
"hover:bg-alert-hovered",
|
|
426
|
+
"enabled:active:bg-alert-hovered",
|
|
427
|
+
"focus-visible:bg-alert-hovered"
|
|
428
|
+
])
|
|
429
|
+
},
|
|
430
|
+
// Danger
|
|
431
|
+
{
|
|
432
|
+
intent: "danger",
|
|
433
|
+
design: "filled",
|
|
434
|
+
class: (0, import_internal_utils3.tw)([
|
|
435
|
+
"text-on-error bg-error",
|
|
436
|
+
"hover:bg-error-hovered enabled:active:bg-error-hovered",
|
|
437
|
+
"focus-visible:bg-error-hovered"
|
|
438
|
+
])
|
|
439
|
+
},
|
|
440
|
+
// Info
|
|
441
|
+
{
|
|
442
|
+
intent: "info",
|
|
443
|
+
design: "filled",
|
|
444
|
+
class: (0, import_internal_utils3.tw)([
|
|
445
|
+
"text-on-error bg-info",
|
|
446
|
+
"hover:bg-info-hovered enabled:active:bg-info-hovered",
|
|
447
|
+
"focus-visible:bg-info-hovered"
|
|
448
|
+
])
|
|
449
|
+
},
|
|
450
|
+
// Neutral
|
|
451
|
+
{
|
|
452
|
+
intent: "neutral",
|
|
453
|
+
design: "filled",
|
|
454
|
+
class: (0, import_internal_utils3.tw)([
|
|
455
|
+
"bg-neutral",
|
|
456
|
+
"text-on-neutral",
|
|
457
|
+
"hover:bg-neutral-hovered",
|
|
458
|
+
"enabled:active:bg-neutral-hovered",
|
|
459
|
+
"focus-visible:bg-neutral-hovered"
|
|
460
|
+
])
|
|
461
|
+
},
|
|
462
|
+
// Surface
|
|
463
|
+
{
|
|
464
|
+
intent: "surface",
|
|
465
|
+
design: "filled",
|
|
466
|
+
class: (0, import_internal_utils3.tw)([
|
|
467
|
+
"bg-surface",
|
|
468
|
+
"text-on-surface",
|
|
469
|
+
"hover:bg-surface-hovered",
|
|
470
|
+
"enabled:active:bg-surface-hovered",
|
|
471
|
+
"focus-visible:bg-surface-hovered"
|
|
472
|
+
])
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
intent: "surfaceInverse",
|
|
476
|
+
design: "filled",
|
|
477
|
+
class: (0, import_internal_utils3.tw)([
|
|
478
|
+
"bg-surface-inverse",
|
|
479
|
+
"text-on-surface-inverse",
|
|
480
|
+
"hover:bg-surface-inverse-hovered",
|
|
481
|
+
"enabled:active:bg-surface-inverse-hovered",
|
|
482
|
+
"focus-visible:bg-surface-inverse-hovered"
|
|
483
|
+
])
|
|
484
|
+
}
|
|
485
|
+
];
|
|
486
|
+
|
|
487
|
+
// src/button/variants/ghost.ts
|
|
488
|
+
var import_internal_utils4 = require("@spark-ui/internal-utils");
|
|
489
|
+
var ghostVariants = [
|
|
490
|
+
{
|
|
491
|
+
intent: "main",
|
|
492
|
+
design: "ghost",
|
|
493
|
+
class: (0, import_internal_utils4.tw)([
|
|
494
|
+
"text-on-main-container",
|
|
495
|
+
"hover:bg-main/dim-5",
|
|
496
|
+
"enabled:active:bg-main/dim-5",
|
|
497
|
+
"focus-visible:bg-main/dim-5"
|
|
498
|
+
])
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
intent: "support",
|
|
502
|
+
design: "ghost",
|
|
503
|
+
class: (0, import_internal_utils4.tw)([
|
|
504
|
+
"text-on-support-container",
|
|
505
|
+
"hover:bg-support/dim-5",
|
|
506
|
+
"enabled:active:bg-support/dim-5",
|
|
507
|
+
"focus-visible:bg-support/dim-5"
|
|
508
|
+
])
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
intent: "accent",
|
|
512
|
+
design: "ghost",
|
|
513
|
+
class: (0, import_internal_utils4.tw)([
|
|
514
|
+
"text-on-accent-container",
|
|
515
|
+
"hover:bg-accent/dim-5",
|
|
516
|
+
"enabled:active:bg-accent/dim-5",
|
|
517
|
+
"focus-visible:bg-accent/dim-5"
|
|
518
|
+
])
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
intent: "basic",
|
|
522
|
+
design: "ghost",
|
|
523
|
+
class: (0, import_internal_utils4.tw)([
|
|
524
|
+
"text-on-basic-container",
|
|
525
|
+
"hover:bg-basic/dim-5",
|
|
526
|
+
"enabled:active:bg-basic/dim-5",
|
|
527
|
+
"focus-visible:bg-basic/dim-5"
|
|
528
|
+
])
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
intent: "success",
|
|
532
|
+
design: "ghost",
|
|
533
|
+
class: (0, import_internal_utils4.tw)([
|
|
534
|
+
"text-on-success-container",
|
|
535
|
+
"hover:bg-success/dim-5",
|
|
536
|
+
"enabled:active:bg-success/dim-5",
|
|
537
|
+
"focus-visible:bg-success/dim-5"
|
|
538
|
+
])
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
intent: "alert",
|
|
542
|
+
design: "ghost",
|
|
543
|
+
class: (0, import_internal_utils4.tw)([
|
|
544
|
+
"text-on-alert-container",
|
|
545
|
+
"hover:bg-alert/dim-5",
|
|
546
|
+
"enabled:active:bg-alert/dim-5",
|
|
547
|
+
"focus-visible:bg-alert/dim-5"
|
|
548
|
+
])
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
intent: "danger",
|
|
552
|
+
design: "ghost",
|
|
553
|
+
class: (0, import_internal_utils4.tw)([
|
|
554
|
+
"text-on-error-container",
|
|
555
|
+
"hover:bg-error/dim-5",
|
|
556
|
+
"enabled:active:bg-error/dim-5",
|
|
557
|
+
"focus-visible:bg-error/dim-5"
|
|
558
|
+
])
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
intent: "info",
|
|
562
|
+
design: "ghost",
|
|
563
|
+
class: (0, import_internal_utils4.tw)([
|
|
564
|
+
"text-on-info-container",
|
|
565
|
+
"hover:bg-info/dim-5",
|
|
566
|
+
"enabled:active:bg-info/dim-5",
|
|
567
|
+
"focus-visible:bg-info/dim-5"
|
|
568
|
+
])
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
intent: "neutral",
|
|
572
|
+
design: "ghost",
|
|
573
|
+
class: (0, import_internal_utils4.tw)([
|
|
574
|
+
"text-on-neutral-container",
|
|
575
|
+
"hover:bg-neutral/dim-5",
|
|
576
|
+
"enabled:active:bg-neutral/dim-5",
|
|
577
|
+
"focus-visible:bg-neutral/dim-5"
|
|
578
|
+
])
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
intent: "surface",
|
|
582
|
+
design: "ghost",
|
|
583
|
+
class: (0, import_internal_utils4.tw)([
|
|
584
|
+
"text-surface",
|
|
585
|
+
"hover:bg-surface/dim-5",
|
|
586
|
+
"enabled:active:bg-surface/dim-5",
|
|
587
|
+
"focus-visible:bg-surface/dim-5"
|
|
588
|
+
])
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
intent: "surfaceInverse",
|
|
592
|
+
design: "ghost",
|
|
593
|
+
class: (0, import_internal_utils4.tw)([
|
|
594
|
+
"text-surface-inverse",
|
|
595
|
+
"hover:bg-surface-inverse/dim-5",
|
|
596
|
+
"enabled:active:bg-surface-inverse/dim-5",
|
|
597
|
+
"focus-visible:bg-surface-inverse/dim-5"
|
|
598
|
+
])
|
|
599
|
+
}
|
|
600
|
+
];
|
|
601
|
+
|
|
602
|
+
// src/button/variants/outlined.ts
|
|
603
|
+
var import_internal_utils5 = require("@spark-ui/internal-utils");
|
|
604
|
+
var outlinedVariants = [
|
|
605
|
+
{
|
|
606
|
+
intent: "main",
|
|
607
|
+
design: "outlined",
|
|
608
|
+
class: (0, import_internal_utils5.tw)([
|
|
609
|
+
"hover:bg-main/dim-5",
|
|
610
|
+
"enabled:active:bg-main/dim-5",
|
|
611
|
+
"focus-visible:bg-main/dim-5",
|
|
612
|
+
"text-main"
|
|
613
|
+
])
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
intent: "support",
|
|
617
|
+
design: "outlined",
|
|
618
|
+
class: (0, import_internal_utils5.tw)([
|
|
619
|
+
"hover:bg-support/dim-5",
|
|
620
|
+
"enabled:active:bg-support/dim-5",
|
|
621
|
+
"focus-visible:bg-support/dim-5",
|
|
622
|
+
"text-support"
|
|
623
|
+
])
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
intent: "accent",
|
|
627
|
+
design: "outlined",
|
|
628
|
+
class: (0, import_internal_utils5.tw)([
|
|
629
|
+
"hover:bg-accent/dim-5",
|
|
630
|
+
"enabled:active:bg-accent/dim-5",
|
|
631
|
+
"focus-visible:bg-accent/dim-5",
|
|
632
|
+
"text-accent"
|
|
633
|
+
])
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
intent: "basic",
|
|
637
|
+
design: "outlined",
|
|
638
|
+
class: (0, import_internal_utils5.tw)([
|
|
639
|
+
"hover:bg-basic/dim-5",
|
|
640
|
+
"enabled:active:bg-basic/dim-5",
|
|
641
|
+
"focus-visible:bg-basic/dim-5",
|
|
642
|
+
"text-basic"
|
|
643
|
+
])
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
intent: "success",
|
|
647
|
+
design: "outlined",
|
|
648
|
+
class: (0, import_internal_utils5.tw)([
|
|
649
|
+
"hover:bg-success/dim-5",
|
|
650
|
+
"enabled:active:bg-success/dim-5",
|
|
651
|
+
"focus-visible:bg-success/dim-5",
|
|
652
|
+
"text-success"
|
|
653
|
+
])
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
intent: "alert",
|
|
657
|
+
design: "outlined",
|
|
658
|
+
class: (0, import_internal_utils5.tw)([
|
|
659
|
+
"hover:bg-alert/dim-5",
|
|
660
|
+
"enabled:active:bg-alert/dim-5",
|
|
661
|
+
"focus-visible:bg-alert/dim-5",
|
|
662
|
+
"text-alert"
|
|
663
|
+
])
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
intent: "danger",
|
|
667
|
+
design: "outlined",
|
|
668
|
+
class: (0, import_internal_utils5.tw)([
|
|
669
|
+
"hover:bg-error/dim-5",
|
|
670
|
+
"enabled:active:bg-error/dim-5",
|
|
671
|
+
"focus-visible:bg-error/dim-5",
|
|
672
|
+
"text-error"
|
|
673
|
+
])
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
intent: "info",
|
|
677
|
+
design: "outlined",
|
|
678
|
+
class: (0, import_internal_utils5.tw)([
|
|
679
|
+
"hover:bg-info/dim-5",
|
|
680
|
+
"enabled:active:bg-info/dim-5",
|
|
681
|
+
"focus-visible:bg-info/dim-5",
|
|
682
|
+
"text-info"
|
|
683
|
+
])
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
intent: "neutral",
|
|
687
|
+
design: "outlined",
|
|
688
|
+
class: (0, import_internal_utils5.tw)([
|
|
689
|
+
"hover:bg-neutral/dim-5",
|
|
690
|
+
"enabled:active:bg-neutral/dim-5",
|
|
691
|
+
"focus-visible:bg-neutral/dim-5",
|
|
692
|
+
"text-neutral"
|
|
693
|
+
])
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
intent: "surface",
|
|
697
|
+
design: "outlined",
|
|
698
|
+
class: (0, import_internal_utils5.tw)([
|
|
699
|
+
"hover:bg-surface/dim-5",
|
|
700
|
+
"enabled:active:bg-surface/dim-5",
|
|
701
|
+
"focus-visible:bg-surface/dim-5",
|
|
702
|
+
"text-surface"
|
|
703
|
+
])
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
intent: "surfaceInverse",
|
|
707
|
+
design: "outlined",
|
|
708
|
+
class: (0, import_internal_utils5.tw)([
|
|
709
|
+
"hover:bg-surface-inverse/dim-5",
|
|
710
|
+
"enabled:active:bg-surface-inverse/dim-5",
|
|
711
|
+
"focus-visible:bg-surface-inverse/dim-5",
|
|
712
|
+
"text-surface-inverse"
|
|
713
|
+
])
|
|
714
|
+
}
|
|
715
|
+
];
|
|
716
|
+
|
|
717
|
+
// src/button/variants/tinted.ts
|
|
718
|
+
var import_internal_utils6 = require("@spark-ui/internal-utils");
|
|
719
|
+
var tintedVariants = [
|
|
720
|
+
{
|
|
721
|
+
intent: "main",
|
|
722
|
+
design: "tinted",
|
|
723
|
+
class: (0, import_internal_utils6.tw)([
|
|
724
|
+
"bg-main-container",
|
|
725
|
+
"text-on-main-container",
|
|
726
|
+
"hover:bg-main-container-hovered",
|
|
727
|
+
"enabled:active:bg-main-container-hovered",
|
|
728
|
+
"focus-visible:bg-main-container-hovered"
|
|
729
|
+
])
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
intent: "support",
|
|
733
|
+
design: "tinted",
|
|
734
|
+
class: (0, import_internal_utils6.tw)([
|
|
735
|
+
"bg-support-container",
|
|
736
|
+
"text-on-support-container",
|
|
737
|
+
"hover:bg-support-container-hovered",
|
|
738
|
+
"enabled:active:bg-support-container-hovered",
|
|
739
|
+
"focus-visible:bg-support-container-hovered"
|
|
740
|
+
])
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
intent: "accent",
|
|
744
|
+
design: "tinted",
|
|
745
|
+
class: (0, import_internal_utils6.tw)([
|
|
746
|
+
"bg-accent-container",
|
|
747
|
+
"text-on-accent-container",
|
|
748
|
+
"hover:bg-accent-container-hovered",
|
|
749
|
+
"enabled:active:bg-accent-container-hovered",
|
|
750
|
+
"focus-visible:bg-accent-container-hovered"
|
|
751
|
+
])
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
intent: "basic",
|
|
755
|
+
design: "tinted",
|
|
756
|
+
class: (0, import_internal_utils6.tw)([
|
|
757
|
+
"bg-basic-container",
|
|
758
|
+
"text-on-basic-container",
|
|
759
|
+
"hover:bg-basic-container-hovered",
|
|
760
|
+
"enabled:active:bg-basic-container-hovered",
|
|
761
|
+
"focus-visible:bg-basic-container-hovered"
|
|
762
|
+
])
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
intent: "success",
|
|
766
|
+
design: "tinted",
|
|
767
|
+
class: (0, import_internal_utils6.tw)([
|
|
768
|
+
"bg-success-container",
|
|
769
|
+
"text-on-success-container",
|
|
770
|
+
"hover:bg-success-container-hovered",
|
|
771
|
+
"enabled:active:bg-success-container-hovered",
|
|
772
|
+
"focus-visible:bg-success-container-hovered"
|
|
773
|
+
])
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
intent: "alert",
|
|
777
|
+
design: "tinted",
|
|
778
|
+
class: (0, import_internal_utils6.tw)([
|
|
779
|
+
"bg-alert-container",
|
|
780
|
+
"text-on-alert-container",
|
|
781
|
+
"hover:bg-alert-container-hovered",
|
|
782
|
+
"enabled:active:bg-alert-container-hovered",
|
|
783
|
+
"focus-visible:bg-alert-container-hovered"
|
|
784
|
+
])
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
intent: "danger",
|
|
788
|
+
design: "tinted",
|
|
789
|
+
class: (0, import_internal_utils6.tw)([
|
|
790
|
+
"bg-error-container",
|
|
791
|
+
"text-on-error-container",
|
|
792
|
+
"hover:bg-error-container-hovered",
|
|
793
|
+
"enabled:active:bg-error-container-hovered",
|
|
794
|
+
"focus-visible:bg-error-container-hovered"
|
|
795
|
+
])
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
intent: "info",
|
|
799
|
+
design: "tinted",
|
|
800
|
+
class: (0, import_internal_utils6.tw)([
|
|
801
|
+
"bg-info-container",
|
|
802
|
+
"text-on-info-container",
|
|
803
|
+
"hover:bg-info-container-hovered",
|
|
804
|
+
"enabled:active:bg-info-container-hovered",
|
|
805
|
+
"focus-visible:bg-info-container-hovered"
|
|
806
|
+
])
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
intent: "neutral",
|
|
810
|
+
design: "tinted",
|
|
811
|
+
class: (0, import_internal_utils6.tw)([
|
|
812
|
+
"bg-neutral-container",
|
|
813
|
+
"text-on-neutral-container",
|
|
814
|
+
"hover:bg-neutral-container-hovered",
|
|
815
|
+
"enabled:active:bg-neutral-container-hovered",
|
|
816
|
+
"focus-visible:bg-neutral-container-hovered"
|
|
817
|
+
])
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
intent: "surface",
|
|
821
|
+
design: "tinted",
|
|
822
|
+
class: (0, import_internal_utils6.tw)([
|
|
823
|
+
"bg-surface",
|
|
824
|
+
"text-on-surface",
|
|
825
|
+
"hover:bg-surface-hovered",
|
|
826
|
+
"enabled:active:bg-surface-hovered",
|
|
827
|
+
"focus-visible:bg-surface-hovered"
|
|
828
|
+
])
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
intent: "surfaceInverse",
|
|
832
|
+
design: "tinted",
|
|
833
|
+
class: (0, import_internal_utils6.tw)([
|
|
834
|
+
"bg-surface-inverse",
|
|
835
|
+
"text-on-surface-inverse",
|
|
836
|
+
"hover:bg-surface-inverse-hovered",
|
|
837
|
+
"enabled:active:bg-surface-inverse-hovered",
|
|
838
|
+
"focus-visible:bg-surface-inverse-hovered"
|
|
839
|
+
])
|
|
840
|
+
}
|
|
841
|
+
];
|
|
842
|
+
|
|
843
|
+
// src/button/variants/contrast.ts
|
|
844
|
+
var import_internal_utils7 = require("@spark-ui/internal-utils");
|
|
845
|
+
var contrastVariants = [
|
|
846
|
+
{
|
|
847
|
+
intent: "main",
|
|
848
|
+
design: "contrast",
|
|
849
|
+
class: (0, import_internal_utils7.tw)([
|
|
850
|
+
"text-on-main-contaier bg-surface",
|
|
851
|
+
"hover:bg-main-container-hovered",
|
|
852
|
+
"enabled:active:bg-main-container-hovered",
|
|
853
|
+
"focus-visible:bg-main-container-hovered"
|
|
854
|
+
])
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
intent: "support",
|
|
858
|
+
design: "contrast",
|
|
859
|
+
class: (0, import_internal_utils7.tw)([
|
|
860
|
+
"text-on-support-container bg-surface",
|
|
861
|
+
"hover:bg-support-container-hovered",
|
|
862
|
+
"enabled:active:bg-support-container-hovered",
|
|
863
|
+
"focus-visible:bg-support-container-hovered"
|
|
864
|
+
])
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
intent: "accent",
|
|
868
|
+
design: "contrast",
|
|
869
|
+
class: (0, import_internal_utils7.tw)([
|
|
870
|
+
"text-on-accent-container bg-surface",
|
|
871
|
+
"hover:bg-accent-container-hovered",
|
|
872
|
+
"enabled:active:bg-accent-container-hovered",
|
|
873
|
+
"focus-visible:bg-accent-container-hovered"
|
|
874
|
+
])
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
intent: "basic",
|
|
878
|
+
design: "contrast",
|
|
879
|
+
class: (0, import_internal_utils7.tw)([
|
|
880
|
+
"text-on-basic-container bg-surface",
|
|
881
|
+
"hover:bg-basic-container-hovered",
|
|
882
|
+
"enabled:active:bg-basic-container-hovered",
|
|
883
|
+
"focus-visible:bg-basic-container-hovered"
|
|
884
|
+
])
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
intent: "success",
|
|
888
|
+
design: "contrast",
|
|
889
|
+
class: (0, import_internal_utils7.tw)([
|
|
890
|
+
"text-on-success-container bg-surface",
|
|
891
|
+
"hover:bg-success-container-hovered",
|
|
892
|
+
"enabled:active:bg-success-container-hovered",
|
|
893
|
+
"focus-visible:bg-success-container-hovered"
|
|
894
|
+
])
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
intent: "alert",
|
|
898
|
+
design: "contrast",
|
|
899
|
+
class: (0, import_internal_utils7.tw)([
|
|
900
|
+
"text-on-alert-container bg-surface",
|
|
901
|
+
"hover:bg-alert-container-hovered",
|
|
902
|
+
"enabled:active:bg-alert-container-hovered",
|
|
903
|
+
"focus-visible:bg-alert-container-hovered"
|
|
904
|
+
])
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
intent: "danger",
|
|
908
|
+
design: "contrast",
|
|
909
|
+
class: (0, import_internal_utils7.tw)([
|
|
910
|
+
"text-on-error-container bg-surface",
|
|
911
|
+
"hover:bg-error-container-hovered",
|
|
912
|
+
"enabled:active:bg-error-container-hovered",
|
|
913
|
+
"focus-visible:bg-error-container-hovered"
|
|
914
|
+
])
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
intent: "info",
|
|
918
|
+
design: "contrast",
|
|
919
|
+
class: (0, import_internal_utils7.tw)([
|
|
920
|
+
"text-on-info-container bg-surface",
|
|
921
|
+
"hover:bg-info-container-hovered",
|
|
922
|
+
"enabled:active:bg-info-container-hovered",
|
|
923
|
+
"focus-visible:bg-info-container-hovered"
|
|
924
|
+
])
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
intent: "neutral",
|
|
928
|
+
design: "contrast",
|
|
929
|
+
class: (0, import_internal_utils7.tw)([
|
|
930
|
+
"text-on-neutral-container bg-surface",
|
|
931
|
+
"hover:bg-neutral-container-hovered",
|
|
932
|
+
"enabled:active:bg-neutral-container-hovered",
|
|
933
|
+
"focus-visible:bg-neutral-container-hovered"
|
|
934
|
+
])
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
intent: "surface",
|
|
938
|
+
design: "contrast",
|
|
939
|
+
class: (0, import_internal_utils7.tw)([
|
|
940
|
+
"text-on-surface bg-surface",
|
|
941
|
+
"hover:bg-surface-hovered",
|
|
942
|
+
"enabled:active:bg-surface-hovered",
|
|
943
|
+
"focus-visible:bg-surface-hovered"
|
|
944
|
+
])
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
intent: "surfaceInverse",
|
|
948
|
+
design: "contrast",
|
|
949
|
+
class: (0, import_internal_utils7.tw)([
|
|
950
|
+
"text-on-surface-inverse bg-surface-inverse",
|
|
951
|
+
"hover:bg-surface-inverse-hovered",
|
|
952
|
+
"enabled:active:bg-surface-inverse-hovered",
|
|
953
|
+
"focus-visible:bg-surface-inverse-hovered"
|
|
954
|
+
])
|
|
955
|
+
}
|
|
956
|
+
];
|
|
957
|
+
|
|
958
|
+
// src/button/Button.styles.tsx
|
|
959
|
+
var buttonStyles = (0, import_class_variance_authority4.cva)(
|
|
960
|
+
[
|
|
961
|
+
"u-shadow-border-transition",
|
|
962
|
+
"box-border inline-flex items-center justify-center gap-md whitespace-nowrap",
|
|
963
|
+
"default:px-lg",
|
|
964
|
+
"text-body-1 font-bold",
|
|
965
|
+
"focus-visible:u-outline"
|
|
966
|
+
],
|
|
967
|
+
{
|
|
968
|
+
variants: {
|
|
969
|
+
/**
|
|
970
|
+
* Main style of the button.
|
|
971
|
+
*
|
|
972
|
+
* - `filled`: Button will be plain.
|
|
973
|
+
*
|
|
974
|
+
* - `outlined`: Button will be transparent with an outline.
|
|
975
|
+
*
|
|
976
|
+
* - `tinted`: Button will be filled but using a lighter color scheme.
|
|
977
|
+
*
|
|
978
|
+
* - `ghost`: Button will look like a link. No borders, plain text.
|
|
979
|
+
*
|
|
980
|
+
* - `contrast`: Button will be surface filled. No borders, plain text.
|
|
981
|
+
*
|
|
982
|
+
*/
|
|
983
|
+
design: (0, import_internal_utils8.makeVariants)({
|
|
984
|
+
filled: [],
|
|
985
|
+
outlined: ["bg-transparent", "border-sm", "border-current"],
|
|
986
|
+
tinted: [],
|
|
987
|
+
ghost: ["default:-mx-md px-md hover:bg-main/dim-5"],
|
|
988
|
+
contrast: []
|
|
989
|
+
}),
|
|
990
|
+
underline: {
|
|
991
|
+
true: ["underline"]
|
|
992
|
+
},
|
|
993
|
+
/**
|
|
994
|
+
* Color scheme of the button.
|
|
995
|
+
*/
|
|
996
|
+
intent: (0, import_internal_utils8.makeVariants)({
|
|
997
|
+
main: [],
|
|
998
|
+
support: [],
|
|
999
|
+
accent: [],
|
|
1000
|
+
basic: [],
|
|
1001
|
+
success: [],
|
|
1002
|
+
alert: [],
|
|
1003
|
+
danger: [],
|
|
1004
|
+
info: [],
|
|
1005
|
+
neutral: [],
|
|
1006
|
+
surface: [],
|
|
1007
|
+
surfaceInverse: []
|
|
1008
|
+
}),
|
|
1009
|
+
/**
|
|
1010
|
+
* Size of the button.
|
|
1011
|
+
*/
|
|
1012
|
+
size: (0, import_internal_utils8.makeVariants)({
|
|
1013
|
+
sm: ["min-w-sz-32", "h-sz-32"],
|
|
1014
|
+
md: ["min-w-sz-44", "h-sz-44"],
|
|
1015
|
+
lg: ["min-w-sz-56", "h-sz-56"]
|
|
1016
|
+
}),
|
|
1017
|
+
/**
|
|
1018
|
+
* Shape of the button.
|
|
1019
|
+
*/
|
|
1020
|
+
shape: (0, import_internal_utils8.makeVariants)({
|
|
1021
|
+
rounded: ["rounded-lg"],
|
|
1022
|
+
square: ["rounded-0"],
|
|
1023
|
+
pill: ["rounded-full"]
|
|
1024
|
+
}),
|
|
1025
|
+
/**
|
|
1026
|
+
* Disable the button, preventing user interaction and adding opacity.
|
|
1027
|
+
*/
|
|
1028
|
+
disabled: {
|
|
1029
|
+
true: ["cursor-not-allowed", "opacity-dim-3"],
|
|
1030
|
+
false: ["cursor-pointer"]
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
compoundVariants: [
|
|
1034
|
+
...filledVariants,
|
|
1035
|
+
...outlinedVariants,
|
|
1036
|
+
...tintedVariants,
|
|
1037
|
+
...ghostVariants,
|
|
1038
|
+
...contrastVariants
|
|
1039
|
+
],
|
|
1040
|
+
defaultVariants: {
|
|
1041
|
+
design: "filled",
|
|
1042
|
+
intent: "main",
|
|
1043
|
+
size: "md",
|
|
1044
|
+
shape: "rounded"
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
);
|
|
1048
|
+
|
|
1049
|
+
// src/button/Button.tsx
|
|
1050
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1051
|
+
var blockedEventHandlers = [
|
|
1052
|
+
"onClick",
|
|
1053
|
+
"onMouseDown",
|
|
1054
|
+
"onMouseUp",
|
|
1055
|
+
"onMouseEnter",
|
|
1056
|
+
"onMouseLeave",
|
|
1057
|
+
"onMouseOver",
|
|
1058
|
+
"onMouseOut",
|
|
1059
|
+
"onKeyDown",
|
|
1060
|
+
"onKeyPress",
|
|
1061
|
+
"onKeyUp",
|
|
1062
|
+
"onSubmit"
|
|
1063
|
+
];
|
|
1064
|
+
var Button = ({
|
|
1065
|
+
children,
|
|
1066
|
+
design = "filled",
|
|
1067
|
+
disabled = false,
|
|
1068
|
+
intent = "main",
|
|
1069
|
+
isLoading = false,
|
|
1070
|
+
loadingLabel,
|
|
1071
|
+
loadingText,
|
|
1072
|
+
shape = "rounded",
|
|
1073
|
+
size = "md",
|
|
1074
|
+
asChild,
|
|
1075
|
+
className,
|
|
1076
|
+
underline = false,
|
|
1077
|
+
ref,
|
|
1078
|
+
...others
|
|
1079
|
+
}) => {
|
|
1080
|
+
const Component = asChild ? Slot : "button";
|
|
1081
|
+
const shouldNotInteract = !!disabled || isLoading;
|
|
1082
|
+
const disabledEventHandlers = (0, import_react6.useMemo)(() => {
|
|
1083
|
+
const result = {};
|
|
1084
|
+
if (shouldNotInteract) {
|
|
1085
|
+
blockedEventHandlers.forEach((eventHandler) => result[eventHandler] = void 0);
|
|
1086
|
+
}
|
|
1087
|
+
return result;
|
|
1088
|
+
}, [shouldNotInteract]);
|
|
1089
|
+
const spinnerProps = {
|
|
1090
|
+
size: "current",
|
|
1091
|
+
className: loadingText ? "inline-block" : "absolute",
|
|
1092
|
+
...loadingLabel && { "aria-label": loadingLabel }
|
|
1093
|
+
};
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1095
|
+
Component,
|
|
1096
|
+
{
|
|
1097
|
+
"data-spark-component": "button",
|
|
1098
|
+
...Component === "button" && { type: "button" },
|
|
1099
|
+
ref,
|
|
1100
|
+
className: buttonStyles({
|
|
1101
|
+
className,
|
|
1102
|
+
design,
|
|
1103
|
+
disabled: shouldNotInteract,
|
|
1104
|
+
intent,
|
|
1105
|
+
shape,
|
|
1106
|
+
size,
|
|
1107
|
+
underline
|
|
1108
|
+
}),
|
|
1109
|
+
disabled: !!disabled,
|
|
1110
|
+
"aria-busy": isLoading,
|
|
1111
|
+
"aria-live": isLoading ? "assertive" : "off",
|
|
1112
|
+
...others,
|
|
1113
|
+
...disabledEventHandlers,
|
|
1114
|
+
children: wrapPolymorphicSlot(
|
|
1115
|
+
asChild,
|
|
1116
|
+
children,
|
|
1117
|
+
(slotted) => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Spinner, { ...spinnerProps }),
|
|
1119
|
+
loadingText && loadingText,
|
|
1120
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1121
|
+
"div",
|
|
1122
|
+
{
|
|
1123
|
+
"aria-hidden": true,
|
|
1124
|
+
className: (0, import_class_variance_authority5.cx)("gap-md", loadingText ? "hidden" : "inline-flex opacity-0"),
|
|
1125
|
+
children: slotted
|
|
1126
|
+
}
|
|
1127
|
+
)
|
|
1128
|
+
] }) : slotted
|
|
1129
|
+
)
|
|
1130
|
+
}
|
|
1131
|
+
);
|
|
1132
|
+
};
|
|
1133
|
+
Button.displayName = "Button";
|
|
1134
|
+
|
|
1135
|
+
// src/icon-button/IconButton.styles.tsx
|
|
1136
|
+
var import_internal_utils9 = require("@spark-ui/internal-utils");
|
|
1137
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
1138
|
+
var iconButtonStyles = (0, import_class_variance_authority6.cva)(["pl-0 pr-0"], {
|
|
1139
|
+
variants: {
|
|
1140
|
+
/**
|
|
1141
|
+
* Sets the size of the icon.
|
|
1142
|
+
*/
|
|
1143
|
+
size: (0, import_internal_utils9.makeVariants)({
|
|
1144
|
+
sm: ["text-body-1"],
|
|
1145
|
+
md: ["text-body-1"],
|
|
1146
|
+
lg: ["text-display-3"]
|
|
1147
|
+
})
|
|
1148
|
+
}
|
|
1149
|
+
});
|
|
1150
|
+
|
|
1151
|
+
// src/icon-button/IconButton.tsx
|
|
1152
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1153
|
+
var IconButton = ({
|
|
1154
|
+
design = "filled",
|
|
1155
|
+
disabled = false,
|
|
1156
|
+
intent = "main",
|
|
1157
|
+
shape = "rounded",
|
|
1158
|
+
size = "md",
|
|
1159
|
+
className,
|
|
1160
|
+
ref,
|
|
1161
|
+
...others
|
|
1162
|
+
}) => {
|
|
1163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1164
|
+
Button,
|
|
1165
|
+
{
|
|
1166
|
+
"data-spark-component": "icon-button",
|
|
1167
|
+
ref,
|
|
1168
|
+
className: iconButtonStyles({ size, className }),
|
|
1169
|
+
design,
|
|
1170
|
+
disabled,
|
|
1171
|
+
intent,
|
|
1172
|
+
shape,
|
|
1173
|
+
size,
|
|
1174
|
+
...others
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
};
|
|
1178
|
+
IconButton.displayName = "IconButton";
|
|
1179
|
+
|
|
1180
|
+
// src/pagination/PaginationFirstPageTrigger.tsx
|
|
1181
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1182
|
+
var FirstPageTrigger = ({
|
|
1183
|
+
children,
|
|
1184
|
+
className,
|
|
1185
|
+
href,
|
|
1186
|
+
ref,
|
|
1187
|
+
...props
|
|
1188
|
+
}) => {
|
|
1189
|
+
const { pagination: pagination2, type } = usePagination();
|
|
1190
|
+
const apiProps = pagination2.getFirstPageTriggerProps();
|
|
1191
|
+
const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
|
|
1192
|
+
const localProps = {
|
|
1193
|
+
"data-spark-component": "pagination-first-page-trigger",
|
|
1194
|
+
intent: "support",
|
|
1195
|
+
design: "contrast",
|
|
1196
|
+
...props,
|
|
1197
|
+
className,
|
|
1198
|
+
...shouldDisableLink && {
|
|
1199
|
+
disabled: true,
|
|
1200
|
+
role: "link",
|
|
1201
|
+
"aria-disabled": true
|
|
1202
|
+
}
|
|
1203
|
+
};
|
|
1204
|
+
const mergedProps = (0, import_react7.mergeProps)(
|
|
1205
|
+
apiProps,
|
|
1206
|
+
localProps
|
|
1207
|
+
);
|
|
1208
|
+
const content = children || /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ArrowDoubleLeft.ArrowDoubleLeft, {}) });
|
|
1209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconButton, { ref, ...mergedProps, children: content }) });
|
|
1210
|
+
};
|
|
1211
|
+
FirstPageTrigger.displayName = "Pagination.FirstPageTrigger";
|
|
1212
|
+
|
|
1213
|
+
// src/pagination/PaginationItem.tsx
|
|
1214
|
+
var import_react8 = require("@zag-js/react");
|
|
1215
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1216
|
+
var Item = ({ children, value, className, href, ref, ...props }) => {
|
|
1217
|
+
const { pagination: pagination2 } = usePagination();
|
|
1218
|
+
const apiProps = pagination2.getItemProps({ type: "page", value });
|
|
1219
|
+
const localProps = {
|
|
1220
|
+
"data-spark-component": "pagination-item",
|
|
1221
|
+
intent: "support",
|
|
1222
|
+
design: apiProps["aria-current"] === "page" ? "filled" : "contrast",
|
|
1223
|
+
className,
|
|
1224
|
+
...props
|
|
1225
|
+
};
|
|
1226
|
+
const mergedProps = (0, import_react8.mergeProps)(apiProps, localProps);
|
|
1227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("a", { href, children: children || value }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { ref, ...mergedProps, children: children || value }) });
|
|
1228
|
+
};
|
|
1229
|
+
Item.displayName = "Pagination.Item";
|
|
1230
|
+
|
|
1231
|
+
// src/pagination/PaginationLastPageTrigger.tsx
|
|
1232
|
+
var import_ArrowDoubleRight = require("@spark-ui/icons/ArrowDoubleRight");
|
|
1233
|
+
var import_react9 = require("@zag-js/react");
|
|
1234
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1235
|
+
var LastPageTrigger = ({
|
|
1236
|
+
children,
|
|
1237
|
+
className,
|
|
1238
|
+
href,
|
|
1239
|
+
ref,
|
|
1240
|
+
...props
|
|
1241
|
+
}) => {
|
|
1242
|
+
const { pagination: pagination2, type } = usePagination();
|
|
1243
|
+
const apiProps = pagination2.getLastPageTriggerProps();
|
|
1244
|
+
const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
|
|
1245
|
+
const localProps = {
|
|
1246
|
+
"data-spark-component": "pagination-last-page-trigger",
|
|
1247
|
+
intent: "support",
|
|
1248
|
+
design: "contrast",
|
|
1249
|
+
...props,
|
|
1250
|
+
className,
|
|
1251
|
+
...shouldDisableLink && {
|
|
1252
|
+
disabled: true,
|
|
1253
|
+
role: "link",
|
|
1254
|
+
"aria-disabled": true
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1257
|
+
const mergedProps = (0, import_react9.mergeProps)(
|
|
1258
|
+
apiProps,
|
|
1259
|
+
localProps
|
|
1260
|
+
);
|
|
1261
|
+
const content = children || /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ArrowDoubleRight.ArrowDoubleRight, {}) });
|
|
1262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { ref, ...mergedProps, children: content }) });
|
|
1263
|
+
};
|
|
1264
|
+
LastPageTrigger.displayName = "Pagination.LastPageTrigger";
|
|
1265
|
+
|
|
1266
|
+
// src/pagination/PaginationNextTrigger.tsx
|
|
1267
|
+
var import_ArrowVerticalRight = require("@spark-ui/icons/ArrowVerticalRight");
|
|
1268
|
+
var import_react10 = require("@zag-js/react");
|
|
1269
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1270
|
+
var NextTrigger = ({ children, className, href, ref, ...props }) => {
|
|
1271
|
+
const { pagination: pagination2, type } = usePagination();
|
|
1272
|
+
const apiProps = pagination2.getNextTriggerProps();
|
|
1273
|
+
const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
|
|
1274
|
+
const localProps = {
|
|
1275
|
+
"data-spark-component": "pagination-next-trigger",
|
|
1276
|
+
intent: "support",
|
|
1277
|
+
design: "contrast",
|
|
1278
|
+
...props,
|
|
1279
|
+
className,
|
|
1280
|
+
...shouldDisableLink && {
|
|
1281
|
+
disabled: true,
|
|
1282
|
+
role: "link",
|
|
1283
|
+
"aria-disabled": true
|
|
1284
|
+
}
|
|
1285
|
+
};
|
|
1286
|
+
const mergedProps = (0, import_react10.mergeProps)(
|
|
1287
|
+
apiProps,
|
|
1288
|
+
localProps
|
|
1289
|
+
);
|
|
1290
|
+
const content = children || /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ArrowVerticalRight.ArrowVerticalRight, {}) });
|
|
1291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { ref, ...mergedProps, children: content }) });
|
|
1292
|
+
};
|
|
1293
|
+
NextTrigger.displayName = "Pagination.NextTrigger";
|
|
1294
|
+
|
|
1295
|
+
// src/pagination/PaginationPages.tsx
|
|
1296
|
+
var Pages = ({ children }) => {
|
|
1297
|
+
const { pagination: pagination2 } = usePagination();
|
|
1298
|
+
return children(pagination2);
|
|
1299
|
+
};
|
|
1300
|
+
Pages.displayName = "Pagination.Pages";
|
|
1301
|
+
|
|
1302
|
+
// src/pagination/PaginationPrevTrigger.tsx
|
|
1303
|
+
var import_ArrowVerticalLeft = require("@spark-ui/icons/ArrowVerticalLeft");
|
|
1304
|
+
var import_react11 = require("@zag-js/react");
|
|
1305
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1306
|
+
var PrevTrigger = ({ children, className, href, ref, ...props }) => {
|
|
1307
|
+
const { pagination: pagination2, type } = usePagination();
|
|
1308
|
+
const apiProps = pagination2.getPrevTriggerProps();
|
|
1309
|
+
const shouldDisableLink = type === "link" && apiProps["data-disabled"] === "";
|
|
1310
|
+
const localProps = {
|
|
1311
|
+
"data-spark-component": "pagination-prev-trigger",
|
|
1312
|
+
intent: "support",
|
|
1313
|
+
design: "contrast",
|
|
1314
|
+
...props,
|
|
1315
|
+
className,
|
|
1316
|
+
...shouldDisableLink && {
|
|
1317
|
+
disabled: true,
|
|
1318
|
+
role: "link",
|
|
1319
|
+
"aria-disabled": true
|
|
1320
|
+
}
|
|
1321
|
+
};
|
|
1322
|
+
const mergedProps = (0, import_react11.mergeProps)(
|
|
1323
|
+
apiProps,
|
|
1324
|
+
localProps
|
|
1325
|
+
);
|
|
1326
|
+
const content = children || /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ArrowVerticalLeft.ArrowVerticalLeft, {}) });
|
|
1327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: href ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconButton, { ref, ...mergedProps, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href: shouldDisableLink ? void 0 : href, children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconButton, { ref, ...mergedProps, children: content }) });
|
|
1328
|
+
};
|
|
1329
|
+
PrevTrigger.displayName = "Pagination.PrevTrigger";
|
|
1330
|
+
|
|
1331
|
+
// src/pagination/index.ts
|
|
1332
|
+
var Pagination2 = Object.assign(Pagination, {
|
|
1333
|
+
PrevTrigger,
|
|
1334
|
+
NextTrigger,
|
|
1335
|
+
Pages,
|
|
1336
|
+
Item,
|
|
1337
|
+
Ellipsis,
|
|
1338
|
+
FirstPageTrigger,
|
|
1339
|
+
LastPageTrigger
|
|
1340
|
+
});
|
|
1341
|
+
Pagination2.displayName = "Pagination";
|
|
1342
|
+
PrevTrigger.displayName = "Pagination.PrevTrigger";
|
|
1343
|
+
NextTrigger.displayName = "Pagination.NextTrigger";
|
|
1344
|
+
Pages.displayName = "Pagination.Pages";
|
|
1345
|
+
Item.displayName = "Pagination.Item";
|
|
1346
|
+
Ellipsis.displayName = "Pagination.Ellipsis";
|
|
1347
|
+
FirstPageTrigger.displayName = "Pagination.FirstPageTrigger";
|
|
1348
|
+
LastPageTrigger.displayName = "Pagination.LastPageTrigger";
|
|
1349
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1350
|
+
0 && (module.exports = {
|
|
1351
|
+
Pagination
|
|
1352
|
+
});
|
|
1353
|
+
//# sourceMappingURL=index.js.map
|