@spark-ui/components 10.9.0 → 10.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/accordion/index.d.mts +13 -25
- package/dist/accordion/index.d.ts +13 -25
- package/dist/accordion/index.js +114 -250
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +92 -134
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/alert-dialog/index.js +65 -12
- package/dist/alert-dialog/index.js.map +1 -1
- package/dist/alert-dialog/index.mjs +3 -3
- package/dist/avatar/index.js +65 -12
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar/index.mjs +2 -2
- package/dist/button/index.d.mts +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +65 -12
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +1 -1
- package/dist/carousel/index.js +65 -12
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +2 -2
- package/dist/{chunk-7A5MVJB3.mjs → chunk-3PTXYZYN.mjs} +66 -13
- package/dist/chunk-3PTXYZYN.mjs.map +1 -0
- package/dist/{chunk-I7UIKCZK.mjs → chunk-5VKP2RR6.mjs} +2 -2
- package/dist/{chunk-QNYSDG6F.mjs → chunk-MKN2Y3W6.mjs} +2 -2
- package/dist/{chunk-ESSJY557.mjs → chunk-Z45YCYPH.mjs} +2 -2
- package/dist/collapsible/index.d.mts +18 -35
- package/dist/collapsible/index.d.ts +18 -35
- package/dist/collapsible/index.js +47 -78
- package/dist/collapsible/index.js.map +1 -1
- package/dist/collapsible/index.mjs +73 -4
- package/dist/collapsible/index.mjs.map +1 -1
- package/dist/combobox/index.js +65 -12
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +3 -3
- package/dist/dialog/index.js +65 -12
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +3 -3
- package/dist/drawer/index.js +65 -12
- package/dist/drawer/index.js.map +1 -1
- package/dist/drawer/index.mjs +2 -2
- package/dist/dropdown/index.js +65 -12
- package/dist/dropdown/index.js.map +1 -1
- package/dist/dropdown/index.mjs +3 -3
- package/dist/icon-button/index.js +65 -12
- package/dist/icon-button/index.js.map +1 -1
- package/dist/icon-button/index.mjs +2 -2
- package/dist/pagination/index.js +65 -12
- package/dist/pagination/index.js.map +1 -1
- package/dist/pagination/index.mjs +2 -2
- package/dist/popover/index.js +65 -12
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +3 -3
- package/dist/scrolling-list/index.js +65 -12
- package/dist/scrolling-list/index.js.map +1 -1
- package/dist/scrolling-list/index.mjs +2 -2
- package/dist/snackbar/index.js +65 -12
- package/dist/snackbar/index.js.map +1 -1
- package/dist/snackbar/index.mjs +2 -2
- package/dist/stepper/index.js +65 -12
- package/dist/stepper/index.js.map +1 -1
- package/dist/stepper/index.mjs +2 -2
- package/dist/tabs/index.js +65 -12
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/package.json +6 -7
- package/dist/chunk-3LEFXZNI.mjs +0 -97
- package/dist/chunk-3LEFXZNI.mjs.map +0 -1
- package/dist/chunk-7A5MVJB3.mjs.map +0 -1
- /package/dist/{chunk-I7UIKCZK.mjs.map → chunk-5VKP2RR6.mjs.map} +0 -0
- /package/dist/{chunk-QNYSDG6F.mjs.map → chunk-MKN2Y3W6.mjs.map} +0 -0
- /package/dist/{chunk-ESSJY557.mjs.map → chunk-Z45YCYPH.mjs.map} +0 -0
|
@@ -132,6 +132,17 @@ var filledVariants = [
|
|
|
132
132
|
"enabled:active:bg-surface-hovered",
|
|
133
133
|
"focus-visible:bg-surface-hovered"
|
|
134
134
|
])
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
intent: "surfaceInverse",
|
|
138
|
+
design: "filled",
|
|
139
|
+
class: tw([
|
|
140
|
+
"bg-surface-inverse",
|
|
141
|
+
"text-on-surface-inverse",
|
|
142
|
+
"hover:bg-surface-inverse-hovered",
|
|
143
|
+
"enabled:active:bg-surface-inverse-hovered",
|
|
144
|
+
"focus-visible:bg-surface-inverse-hovered"
|
|
145
|
+
])
|
|
135
146
|
}
|
|
136
147
|
];
|
|
137
148
|
|
|
@@ -237,6 +248,16 @@ var ghostVariants = [
|
|
|
237
248
|
"enabled:active:bg-surface/dim-5",
|
|
238
249
|
"focus-visible:bg-surface/dim-5"
|
|
239
250
|
])
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
intent: "surfaceInverse",
|
|
254
|
+
design: "ghost",
|
|
255
|
+
class: tw2([
|
|
256
|
+
"text-surface-inverse",
|
|
257
|
+
"hover:bg-surface-inverse/dim-5",
|
|
258
|
+
"enabled:active:bg-surface-inverse/dim-5",
|
|
259
|
+
"focus-visible:bg-surface-inverse/dim-5"
|
|
260
|
+
])
|
|
240
261
|
}
|
|
241
262
|
];
|
|
242
263
|
|
|
@@ -342,6 +363,16 @@ var outlinedVariants = [
|
|
|
342
363
|
"focus-visible:bg-surface/dim-5",
|
|
343
364
|
"text-surface"
|
|
344
365
|
])
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
intent: "surfaceInverse",
|
|
369
|
+
design: "outlined",
|
|
370
|
+
class: tw3([
|
|
371
|
+
"hover:bg-surface-inverse/dim-5",
|
|
372
|
+
"enabled:active:bg-surface-inverse/dim-5",
|
|
373
|
+
"focus-visible:bg-surface-inverse/dim-5",
|
|
374
|
+
"text-surface-inverse"
|
|
375
|
+
])
|
|
345
376
|
}
|
|
346
377
|
];
|
|
347
378
|
|
|
@@ -457,6 +488,17 @@ var tintedVariants = [
|
|
|
457
488
|
"enabled:active:bg-surface-hovered",
|
|
458
489
|
"focus-visible:bg-surface-hovered"
|
|
459
490
|
])
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
intent: "surfaceInverse",
|
|
494
|
+
design: "tinted",
|
|
495
|
+
class: tw4([
|
|
496
|
+
"bg-surface-inverse",
|
|
497
|
+
"text-on-surface-inverse",
|
|
498
|
+
"hover:bg-surface-inverse-hovered",
|
|
499
|
+
"enabled:active:bg-surface-inverse-hovered",
|
|
500
|
+
"focus-visible:bg-surface-inverse-hovered"
|
|
501
|
+
])
|
|
460
502
|
}
|
|
461
503
|
];
|
|
462
504
|
|
|
@@ -467,7 +509,7 @@ var contrastVariants = [
|
|
|
467
509
|
intent: "main",
|
|
468
510
|
design: "contrast",
|
|
469
511
|
class: tw5([
|
|
470
|
-
"text-main",
|
|
512
|
+
"text-main bg-surface",
|
|
471
513
|
"hover:bg-main-container-hovered",
|
|
472
514
|
"enabled:active:bg-main-container-hovered",
|
|
473
515
|
"focus-visible:bg-main-container-hovered"
|
|
@@ -477,7 +519,7 @@ var contrastVariants = [
|
|
|
477
519
|
intent: "support",
|
|
478
520
|
design: "contrast",
|
|
479
521
|
class: tw5([
|
|
480
|
-
"text-support",
|
|
522
|
+
"text-support bg-surface",
|
|
481
523
|
"hover:bg-support-container-hovered",
|
|
482
524
|
"enabled:active:bg-support-container-hovered",
|
|
483
525
|
"focus-visible:bg-support-container-hovered"
|
|
@@ -487,7 +529,7 @@ var contrastVariants = [
|
|
|
487
529
|
intent: "accent",
|
|
488
530
|
design: "contrast",
|
|
489
531
|
class: tw5([
|
|
490
|
-
"text-accent",
|
|
532
|
+
"text-accent bg-surface",
|
|
491
533
|
"hover:bg-accent-container-hovered",
|
|
492
534
|
"enabled:active:bg-accent-container-hovered",
|
|
493
535
|
"focus-visible:bg-accent-container-hovered"
|
|
@@ -497,7 +539,7 @@ var contrastVariants = [
|
|
|
497
539
|
intent: "basic",
|
|
498
540
|
design: "contrast",
|
|
499
541
|
class: tw5([
|
|
500
|
-
"text-basic",
|
|
542
|
+
"text-basic bg-surface",
|
|
501
543
|
"hover:bg-basic-container-hovered",
|
|
502
544
|
"enabled:active:bg-basic-container-hovered",
|
|
503
545
|
"focus-visible:bg-basic-container-hovered"
|
|
@@ -507,7 +549,7 @@ var contrastVariants = [
|
|
|
507
549
|
intent: "success",
|
|
508
550
|
design: "contrast",
|
|
509
551
|
class: tw5([
|
|
510
|
-
"text-success",
|
|
552
|
+
"text-success bg-surface",
|
|
511
553
|
"hover:bg-success-container-hovered",
|
|
512
554
|
"enabled:active:bg-success-container-hovered",
|
|
513
555
|
"focus-visible:bg-success-container-hovered"
|
|
@@ -517,7 +559,7 @@ var contrastVariants = [
|
|
|
517
559
|
intent: "alert",
|
|
518
560
|
design: "contrast",
|
|
519
561
|
class: tw5([
|
|
520
|
-
"text-alert",
|
|
562
|
+
"text-alert bg-surface",
|
|
521
563
|
"hover:bg-alert-container-hovered",
|
|
522
564
|
"enabled:active:bg-alert-container-hovered",
|
|
523
565
|
"focus-visible:bg-alert-container-hovered"
|
|
@@ -527,7 +569,7 @@ var contrastVariants = [
|
|
|
527
569
|
intent: "danger",
|
|
528
570
|
design: "contrast",
|
|
529
571
|
class: tw5([
|
|
530
|
-
"text-error",
|
|
572
|
+
"text-error bg-surface",
|
|
531
573
|
"hover:bg-error-container-hovered",
|
|
532
574
|
"enabled:active:bg-error-container-hovered",
|
|
533
575
|
"focus-visible:bg-error-container-hovered"
|
|
@@ -537,7 +579,7 @@ var contrastVariants = [
|
|
|
537
579
|
intent: "info",
|
|
538
580
|
design: "contrast",
|
|
539
581
|
class: tw5([
|
|
540
|
-
"text-info",
|
|
582
|
+
"text-info bg-surface",
|
|
541
583
|
"hover:bg-info-container-hovered",
|
|
542
584
|
"enabled:active:bg-info-container-hovered",
|
|
543
585
|
"focus-visible:bg-info-container-hovered"
|
|
@@ -547,7 +589,7 @@ var contrastVariants = [
|
|
|
547
589
|
intent: "neutral",
|
|
548
590
|
design: "contrast",
|
|
549
591
|
class: tw5([
|
|
550
|
-
"text-neutral",
|
|
592
|
+
"text-neutral bg-surface",
|
|
551
593
|
"hover:bg-neutral-container-hovered",
|
|
552
594
|
"enabled:active:bg-neutral-container-hovered",
|
|
553
595
|
"focus-visible:bg-neutral-container-hovered"
|
|
@@ -557,11 +599,21 @@ var contrastVariants = [
|
|
|
557
599
|
intent: "surface",
|
|
558
600
|
design: "contrast",
|
|
559
601
|
class: tw5([
|
|
560
|
-
"text-on-surface",
|
|
602
|
+
"text-on-surface bg-surface",
|
|
561
603
|
"hover:bg-surface-hovered",
|
|
562
604
|
"enabled:active:bg-surface-hovered",
|
|
563
605
|
"focus-visible:bg-surface-hovered"
|
|
564
606
|
])
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
intent: "surfaceInverse",
|
|
610
|
+
design: "contrast",
|
|
611
|
+
class: tw5([
|
|
612
|
+
"text-on-surface-inverse bg-surface-inverse",
|
|
613
|
+
"hover:bg-surface-inverse-hovered",
|
|
614
|
+
"enabled:active:bg-surface-inverse-hovered",
|
|
615
|
+
"focus-visible:bg-surface-inverse-hovered"
|
|
616
|
+
])
|
|
565
617
|
}
|
|
566
618
|
];
|
|
567
619
|
|
|
@@ -595,7 +647,7 @@ var buttonStyles = cva(
|
|
|
595
647
|
outlined: ["bg-transparent", "border-sm", "border-current"],
|
|
596
648
|
tinted: [],
|
|
597
649
|
ghost: ["default:-mx-md px-md hover:bg-main/dim-5"],
|
|
598
|
-
contrast: [
|
|
650
|
+
contrast: []
|
|
599
651
|
}),
|
|
600
652
|
underline: {
|
|
601
653
|
true: ["underline"]
|
|
@@ -613,7 +665,8 @@ var buttonStyles = cva(
|
|
|
613
665
|
danger: [],
|
|
614
666
|
info: [],
|
|
615
667
|
neutral: [],
|
|
616
|
-
surface: []
|
|
668
|
+
surface: [],
|
|
669
|
+
surfaceInverse: []
|
|
617
670
|
}),
|
|
618
671
|
/**
|
|
619
672
|
* Size of the button.
|
|
@@ -744,4 +797,4 @@ Button.displayName = "Button";
|
|
|
744
797
|
export {
|
|
745
798
|
Button
|
|
746
799
|
};
|
|
747
|
-
//# sourceMappingURL=chunk-
|
|
800
|
+
//# sourceMappingURL=chunk-3PTXYZYN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/button/Button.tsx","../src/button/Button.styles.tsx","../src/button/variants/filled.ts","../src/button/variants/ghost.ts","../src/button/variants/outlined.ts","../src/button/variants/tinted.ts","../src/button/variants/contrast.ts"],"sourcesContent":["import { cx } from 'class-variance-authority'\nimport { ComponentPropsWithoutRef, type DOMAttributes, Ref, useMemo } from 'react'\n\nimport { Slot, wrapPolymorphicSlot } from '../slot'\nimport { Spinner, type SpinnerProps } from '../spinner'\nimport { buttonStyles, type ButtonStylesProps } from './Button.styles'\n\nexport interface ButtonProps\n extends Omit<ComponentPropsWithoutRef<'button'>, 'disabled'>,\n ButtonStylesProps {\n /**\n * Change the component to the HTML tag or custom component of the only child.\n */\n asChild?: boolean\n /**\n * Display a spinner to indicate to the user that the button is loading something after they interacted with it.\n */\n isLoading?: boolean\n /**\n * If your loading state should only display a spinner, it's better to specify a label for it (a11y).\n */\n loadingLabel?: string\n /**\n * If your loading state should also display a label, you can use this prop instead of `loadingLabel`.\n * **Please note that using this can result in layout shifting when the Button goes from loading state to normal state.**\n */\n loadingText?: string\n ref?: Ref<HTMLButtonElement>\n}\n\ntype DOMAttributesEventHandler = keyof Omit<\n DOMAttributes<HTMLButtonElement>,\n 'children' | 'dangerouslySetInnerHTML'\n>\n\nconst blockedEventHandlers: DOMAttributesEventHandler[] = [\n 'onClick',\n 'onMouseDown',\n 'onMouseUp',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseOver',\n 'onMouseOut',\n 'onKeyDown',\n 'onKeyPress',\n 'onKeyUp',\n 'onSubmit',\n]\n\nexport const Button = ({\n children,\n design = 'filled',\n disabled = false,\n intent = 'main',\n isLoading = false,\n loadingLabel,\n loadingText,\n shape = 'rounded',\n size = 'md',\n asChild,\n className,\n underline = false,\n ref,\n ...others\n}: ButtonProps) => {\n const Component = asChild ? Slot : 'button'\n\n const shouldNotInteract = !!disabled || isLoading\n\n const disabledEventHandlers = useMemo(() => {\n const result: Partial<Record<DOMAttributesEventHandler, () => void>> = {}\n\n if (shouldNotInteract) {\n blockedEventHandlers.forEach(eventHandler => (result[eventHandler] = undefined))\n }\n\n return result\n }, [shouldNotInteract])\n\n const spinnerProps = {\n size: 'current' as SpinnerProps['size'],\n className: loadingText ? 'inline-block' : 'absolute',\n ...(loadingLabel && { 'aria-label': loadingLabel }),\n }\n\n return (\n <Component\n data-spark-component=\"button\"\n {...(Component === 'button' && { type: 'button' })}\n ref={ref}\n className={buttonStyles({\n className,\n design,\n disabled: shouldNotInteract,\n intent,\n shape,\n size,\n underline,\n })}\n disabled={!!disabled}\n aria-busy={isLoading}\n aria-live={isLoading ? 'assertive' : 'off'}\n {...others}\n {...disabledEventHandlers}\n >\n {wrapPolymorphicSlot(asChild, children, slotted =>\n isLoading ? (\n <>\n <Spinner {...spinnerProps} />\n {loadingText && loadingText}\n\n <div\n aria-hidden\n className={cx('gap-md', loadingText ? 'hidden' : 'inline-flex opacity-0')}\n >\n {slotted}\n </div>\n </>\n ) : (\n slotted\n )\n )}\n </Component>\n )\n}\n\nButton.displayName = 'Button'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport {\n contrastVariants,\n filledVariants,\n ghostVariants,\n outlinedVariants,\n tintedVariants,\n} from './variants'\n\nexport const buttonStyles = cva(\n [\n 'u-shadow-border-transition',\n 'box-border inline-flex items-center justify-center gap-md whitespace-nowrap',\n 'default:px-lg',\n 'text-body-1 font-bold',\n 'focus-visible:u-outline',\n ],\n {\n variants: {\n /**\n * Main style of the button.\n *\n * - `filled`: Button will be plain.\n *\n * - `outlined`: Button will be transparent with an outline.\n *\n * - `tinted`: Button will be filled but using a lighter color scheme.\n *\n * - `ghost`: Button will look like a link. No borders, plain text.\n *\n * - `contrast`: Button will be surface filled. No borders, plain text.\n *\n */\n design: makeVariants<'design', ['filled', 'outlined', 'tinted', 'ghost', 'contrast']>({\n filled: [],\n outlined: ['bg-transparent', 'border-sm', 'border-current'],\n tinted: [],\n ghost: ['default:-mx-md px-md hover:bg-main/dim-5'],\n contrast: [],\n }),\n underline: {\n true: ['underline'],\n },\n /**\n * Color scheme of the button.\n */\n intent: makeVariants<\n 'intent',\n [\n 'main',\n 'support',\n 'accent',\n 'basic',\n 'success',\n 'alert',\n 'danger',\n 'info',\n 'neutral',\n 'surface',\n 'surfaceInverse',\n ]\n >({\n main: [],\n support: [],\n accent: [],\n basic: [],\n success: [],\n alert: [],\n danger: [],\n info: [],\n neutral: [],\n surface: [],\n surfaceInverse: [],\n }),\n /**\n * Size of the button.\n */\n size: makeVariants<'size', ['sm', 'md', 'lg']>({\n sm: ['min-w-sz-32', 'h-sz-32'],\n md: ['min-w-sz-44', 'h-sz-44'],\n lg: ['min-w-sz-56', 'h-sz-56'],\n }),\n /**\n * Shape of the button.\n */\n shape: makeVariants<'shape', ['rounded', 'square', 'pill']>({\n rounded: ['rounded-lg'],\n square: ['rounded-0'],\n pill: ['rounded-full'],\n }),\n /**\n * Disable the button, preventing user interaction and adding opacity.\n */\n disabled: {\n true: ['cursor-not-allowed', 'opacity-dim-3'],\n false: ['cursor-pointer'],\n },\n },\n compoundVariants: [\n ...filledVariants,\n ...outlinedVariants,\n ...tintedVariants,\n ...ghostVariants,\n ...contrastVariants,\n ],\n defaultVariants: {\n design: 'filled',\n intent: 'main',\n size: 'md',\n shape: 'rounded',\n },\n }\n)\n\nexport type ButtonStylesProps = VariantProps<typeof buttonStyles>\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const filledVariants = [\n // Main\n {\n intent: 'main',\n design: 'filled',\n class: tw([\n 'bg-main',\n 'text-on-main',\n 'hover:bg-main-hovered',\n 'enabled:active:bg-main-hovered',\n 'focus-visible:bg-main-hovered',\n ]),\n },\n // Support\n {\n intent: 'support',\n design: 'filled',\n class: tw([\n 'bg-support',\n 'text-on-support',\n 'hover:bg-support-hovered',\n 'enabled:active:bg-support-hovered',\n 'focus-visible:bg-support-hovered',\n ]),\n },\n // Accent\n {\n intent: 'accent',\n design: 'filled',\n class: tw([\n 'bg-accent',\n 'text-on-accent',\n 'hover:bg-accent-hovered',\n 'enabled:active:bg-accent-hovered',\n 'focus-visible:bg-accent-hovered',\n ]),\n },\n // Basic\n {\n intent: 'basic',\n design: 'filled',\n class: tw([\n 'bg-basic',\n 'text-on-basic',\n 'hover:bg-basic-hovered',\n 'enabled:active:bg-basic-hovered',\n 'focus-visible:bg-basic-hovered',\n ]),\n },\n // Success\n {\n intent: 'success',\n design: 'filled',\n class: tw([\n 'bg-success',\n 'text-on-success',\n 'hover:bg-success-hovered',\n 'enabled:active:bg-success-hovered',\n 'focus-visible:bg-success-hovered',\n ]),\n },\n // Alert\n {\n intent: 'alert',\n design: 'filled',\n class: tw([\n 'bg-alert',\n 'text-on-alert',\n 'hover:bg-alert-hovered',\n 'enabled:active:bg-alert-hovered',\n 'focus-visible:bg-alert-hovered',\n ]),\n },\n // Danger\n {\n intent: 'danger',\n design: 'filled',\n class: tw([\n 'text-on-error bg-error',\n 'hover:bg-error-hovered enabled:active:bg-error-hovered',\n 'focus-visible:bg-error-hovered',\n ]),\n },\n // Info\n {\n intent: 'info',\n design: 'filled',\n class: tw([\n 'text-on-error bg-info',\n 'hover:bg-info-hovered enabled:active:bg-info-hovered',\n 'focus-visible:bg-info-hovered',\n ]),\n },\n // Neutral\n {\n intent: 'neutral',\n design: 'filled',\n class: tw([\n 'bg-neutral',\n 'text-on-neutral',\n 'hover:bg-neutral-hovered',\n 'enabled:active:bg-neutral-hovered',\n 'focus-visible:bg-neutral-hovered',\n ]),\n },\n // Surface\n {\n intent: 'surface',\n design: 'filled',\n class: tw([\n 'bg-surface',\n 'text-on-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n {\n intent: 'surfaceInverse',\n design: 'filled',\n class: tw([\n 'bg-surface-inverse',\n 'text-on-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-hovered',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const ghostVariants = [\n {\n intent: 'main',\n design: 'ghost',\n class: tw([\n 'text-main',\n 'hover:bg-main/dim-5',\n 'enabled:active:bg-main/dim-5',\n 'focus-visible:bg-main/dim-5',\n ]),\n },\n {\n intent: 'support',\n design: 'ghost',\n class: tw([\n 'text-support',\n 'hover:bg-support/dim-5',\n 'enabled:active:bg-support/dim-5',\n 'focus-visible:bg-support/dim-5',\n ]),\n },\n {\n intent: 'accent',\n design: 'ghost',\n class: tw([\n 'text-accent',\n 'hover:bg-accent/dim-5',\n 'enabled:active:bg-accent/dim-5',\n 'focus-visible:bg-accent/dim-5',\n ]),\n },\n {\n intent: 'basic',\n design: 'ghost',\n class: tw([\n 'text-basic',\n 'hover:bg-basic/dim-5',\n 'enabled:active:bg-basic/dim-5',\n 'focus-visible:bg-basic/dim-5',\n ]),\n },\n {\n intent: 'success',\n design: 'ghost',\n class: tw([\n 'text-success',\n 'hover:bg-success/dim-5',\n 'enabled:active:bg-success/dim-5',\n 'focus-visible:bg-success/dim-5',\n ]),\n },\n {\n intent: 'alert',\n design: 'ghost',\n class: tw([\n 'text-alert',\n 'hover:bg-alert/dim-5',\n 'enabled:active:bg-alert/dim-5',\n 'focus-visible:bg-alert/dim-5',\n ]),\n },\n {\n intent: 'danger',\n design: 'ghost',\n class: tw([\n 'text-error',\n 'hover:bg-error/dim-5',\n 'enabled:active:bg-error/dim-5',\n 'focus-visible:bg-error/dim-5',\n ]),\n },\n {\n intent: 'info',\n design: 'ghost',\n class: tw([\n 'text-info',\n 'hover:bg-info/dim-5',\n 'enabled:active:bg-info/dim-5',\n 'focus-visible:bg-info/dim-5',\n ]),\n },\n {\n intent: 'neutral',\n design: 'ghost',\n class: tw([\n 'text-neutral',\n 'hover:bg-neutral/dim-5',\n 'enabled:active:bg-neutral/dim-5',\n 'focus-visible:bg-neutral/dim-5',\n ]),\n },\n {\n intent: 'surface',\n design: 'ghost',\n class: tw([\n 'text-surface',\n 'hover:bg-surface/dim-5',\n 'enabled:active:bg-surface/dim-5',\n 'focus-visible:bg-surface/dim-5',\n ]),\n },\n {\n intent: 'surfaceInverse',\n design: 'ghost',\n class: tw([\n 'text-surface-inverse',\n 'hover:bg-surface-inverse/dim-5',\n 'enabled:active:bg-surface-inverse/dim-5',\n 'focus-visible:bg-surface-inverse/dim-5',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const outlinedVariants = [\n {\n intent: 'main',\n design: 'outlined',\n class: tw([\n 'hover:bg-main/dim-5',\n 'enabled:active:bg-main/dim-5',\n 'focus-visible:bg-main/dim-5',\n 'text-main',\n ]),\n },\n {\n intent: 'support',\n design: 'outlined',\n class: tw([\n 'hover:bg-support/dim-5',\n 'enabled:active:bg-support/dim-5',\n 'focus-visible:bg-support/dim-5',\n 'text-support',\n ]),\n },\n {\n intent: 'accent',\n design: 'outlined',\n class: tw([\n 'hover:bg-accent/dim-5',\n 'enabled:active:bg-accent/dim-5',\n 'focus-visible:bg-accent/dim-5',\n 'text-accent',\n ]),\n },\n {\n intent: 'basic',\n design: 'outlined',\n class: tw([\n 'hover:bg-basic/dim-5',\n 'enabled:active:bg-basic/dim-5',\n 'focus-visible:bg-basic/dim-5',\n 'text-basic',\n ]),\n },\n {\n intent: 'success',\n design: 'outlined',\n class: tw([\n 'hover:bg-success/dim-5',\n 'enabled:active:bg-success/dim-5',\n 'focus-visible:bg-success/dim-5',\n 'text-success',\n ]),\n },\n {\n intent: 'alert',\n design: 'outlined',\n class: tw([\n 'hover:bg-alert/dim-5',\n 'enabled:active:bg-alert/dim-5',\n 'focus-visible:bg-alert/dim-5',\n 'text-alert',\n ]),\n },\n {\n intent: 'danger',\n design: 'outlined',\n class: tw([\n 'hover:bg-error/dim-5',\n 'enabled:active:bg-error/dim-5',\n 'focus-visible:bg-error/dim-5',\n 'text-error',\n ]),\n },\n {\n intent: 'info',\n design: 'outlined',\n class: tw([\n 'hover:bg-info/dim-5',\n 'enabled:active:bg-info/dim-5',\n 'focus-visible:bg-info/dim-5',\n 'text-info',\n ]),\n },\n {\n intent: 'neutral',\n design: 'outlined',\n class: tw([\n 'hover:bg-neutral/dim-5',\n 'enabled:active:bg-neutral/dim-5',\n 'focus-visible:bg-neutral/dim-5',\n 'text-neutral',\n ]),\n },\n {\n intent: 'surface',\n design: 'outlined',\n class: tw([\n 'hover:bg-surface/dim-5',\n 'enabled:active:bg-surface/dim-5',\n 'focus-visible:bg-surface/dim-5',\n 'text-surface',\n ]),\n },\n {\n intent: 'surfaceInverse',\n design: 'outlined',\n class: tw([\n 'hover:bg-surface-inverse/dim-5',\n 'enabled:active:bg-surface-inverse/dim-5',\n 'focus-visible:bg-surface-inverse/dim-5',\n 'text-surface-inverse',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const tintedVariants = [\n {\n intent: 'main',\n design: 'tinted',\n class: tw([\n 'bg-main-container',\n 'text-on-main-container',\n 'hover:bg-main-container-hovered',\n 'enabled:active:bg-main-container-hovered',\n 'focus-visible:bg-main-container-hovered',\n ]),\n },\n {\n intent: 'support',\n design: 'tinted',\n class: tw([\n 'bg-support-container',\n 'text-on-support-container',\n 'hover:bg-support-container-hovered',\n 'enabled:active:bg-support-container-hovered',\n 'focus-visible:bg-support-container-hovered',\n ]),\n },\n {\n intent: 'accent',\n design: 'tinted',\n class: tw([\n 'bg-accent-container',\n 'text-on-accent-container',\n 'hover:bg-accent-container-hovered',\n 'enabled:active:bg-accent-container-hovered',\n 'focus-visible:bg-accent-container-hovered',\n ]),\n },\n {\n intent: 'basic',\n design: 'tinted',\n class: tw([\n 'bg-basic-container',\n 'text-on-basic-container',\n 'hover:bg-basic-container-hovered',\n 'enabled:active:bg-basic-container-hovered',\n 'focus-visible:bg-basic-container-hovered',\n ]),\n },\n {\n intent: 'success',\n design: 'tinted',\n class: tw([\n 'bg-success-container',\n 'text-on-success-container',\n 'hover:bg-success-container-hovered',\n 'enabled:active:bg-success-container-hovered',\n 'focus-visible:bg-success-container-hovered',\n ]),\n },\n {\n intent: 'alert',\n design: 'tinted',\n class: tw([\n 'bg-alert-container',\n 'text-on-alert-container',\n 'hover:bg-alert-container-hovered',\n 'enabled:active:bg-alert-container-hovered',\n 'focus-visible:bg-alert-container-hovered',\n ]),\n },\n {\n intent: 'danger',\n design: 'tinted',\n class: tw([\n 'bg-error-container',\n 'text-on-error-container',\n 'hover:bg-error-container-hovered',\n 'enabled:active:bg-error-container-hovered',\n 'focus-visible:bg-error-container-hovered',\n ]),\n },\n {\n intent: 'info',\n design: 'tinted',\n class: tw([\n 'bg-info-container',\n 'text-on-info-container',\n 'hover:bg-info-container-hovered',\n 'enabled:active:bg-info-container-hovered',\n 'focus-visible:bg-info-container-hovered',\n ]),\n },\n {\n intent: 'neutral',\n design: 'tinted',\n class: tw([\n 'bg-neutral-container',\n 'text-on-neutral-container',\n 'hover:bg-neutral-container-hovered',\n 'enabled:active:bg-neutral-container-hovered',\n 'focus-visible:bg-neutral-container-hovered',\n ]),\n },\n {\n intent: 'surface',\n design: 'tinted',\n class: tw([\n 'bg-surface',\n 'text-on-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n {\n intent: 'surfaceInverse',\n design: 'tinted',\n class: tw([\n 'bg-surface-inverse',\n 'text-on-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-hovered',\n ]),\n },\n] as const\n","import { tw } from '@spark-ui/internal-utils'\n\nexport const contrastVariants = [\n {\n intent: 'main',\n design: 'contrast',\n class: tw([\n 'text-main bg-surface',\n 'hover:bg-main-container-hovered',\n 'enabled:active:bg-main-container-hovered',\n 'focus-visible:bg-main-container-hovered',\n ]),\n },\n {\n intent: 'support',\n design: 'contrast',\n class: tw([\n 'text-support bg-surface',\n 'hover:bg-support-container-hovered',\n 'enabled:active:bg-support-container-hovered',\n 'focus-visible:bg-support-container-hovered',\n ]),\n },\n {\n intent: 'accent',\n design: 'contrast',\n class: tw([\n 'text-accent bg-surface',\n 'hover:bg-accent-container-hovered',\n 'enabled:active:bg-accent-container-hovered',\n 'focus-visible:bg-accent-container-hovered',\n ]),\n },\n {\n intent: 'basic',\n design: 'contrast',\n class: tw([\n 'text-basic bg-surface',\n 'hover:bg-basic-container-hovered',\n 'enabled:active:bg-basic-container-hovered',\n 'focus-visible:bg-basic-container-hovered',\n ]),\n },\n {\n intent: 'success',\n design: 'contrast',\n class: tw([\n 'text-success bg-surface',\n 'hover:bg-success-container-hovered',\n 'enabled:active:bg-success-container-hovered',\n 'focus-visible:bg-success-container-hovered',\n ]),\n },\n {\n intent: 'alert',\n design: 'contrast',\n class: tw([\n 'text-alert bg-surface',\n 'hover:bg-alert-container-hovered',\n 'enabled:active:bg-alert-container-hovered',\n 'focus-visible:bg-alert-container-hovered',\n ]),\n },\n {\n intent: 'danger',\n design: 'contrast',\n class: tw([\n 'text-error bg-surface',\n 'hover:bg-error-container-hovered',\n 'enabled:active:bg-error-container-hovered',\n 'focus-visible:bg-error-container-hovered',\n ]),\n },\n {\n intent: 'info',\n design: 'contrast',\n class: tw([\n 'text-info bg-surface',\n 'hover:bg-info-container-hovered',\n 'enabled:active:bg-info-container-hovered',\n 'focus-visible:bg-info-container-hovered',\n ]),\n },\n {\n intent: 'neutral',\n design: 'contrast',\n class: tw([\n 'text-neutral bg-surface',\n 'hover:bg-neutral-container-hovered',\n 'enabled:active:bg-neutral-container-hovered',\n 'focus-visible:bg-neutral-container-hovered',\n ]),\n },\n {\n intent: 'surface',\n design: 'contrast',\n class: tw([\n 'text-on-surface bg-surface',\n 'hover:bg-surface-hovered',\n 'enabled:active:bg-surface-hovered',\n 'focus-visible:bg-surface-hovered',\n ]),\n },\n {\n intent: 'surfaceInverse',\n design: 'contrast',\n class: tw([\n 'text-on-surface-inverse bg-surface-inverse',\n 'hover:bg-surface-inverse-hovered',\n 'enabled:active:bg-surface-inverse-hovered',\n 'focus-visible:bg-surface-inverse-hovered',\n ]),\n },\n] as const\n"],"mappings":";;;;;;;;;AAAA,SAAS,UAAU;AACnB,SAA4D,eAAe;;;ACD3E,SAAS,oBAAoB;AAC7B,SAAS,WAAyB;;;ACDlC,SAAS,UAAU;AAEZ,IAAM,iBAAiB;AAAA;AAAA,EAE5B;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,GAAG;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA,EAEA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,GAAG;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA,EAEA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,GAAG;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA,EAEA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,GAAG;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA,EAEA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,GAAG;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA,EAEA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,GAAG;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAAA;AAAA,EAEA;AAAA,IACE,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO,G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pC,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA,QAAoB;AAAA,QAAS;AAAA,QAAU,aACtC,YACE,iCACE;AAAA,8BAAC,WAAS,GAAG,cAAc;AAAA,UAC1B,eAAe;AAAA,UAEhB;AAAA,YAAC;AAAA;AAAA,cACC,eAAW;AAAA,cACX,WAAW,GAAG,UAAU,cAAc,WAAW,uBAAuB;AAAA,cAEvE;AAAA;AAAA,UACH;AAAA,WACF,IAEA;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;AAEA,OAAO,cAAc;","names":["tw","tw","tw","tw"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IconButton
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MKN2Y3W6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Icon
|
|
6
6
|
} from "./chunk-UMUMFMFB.mjs";
|
|
@@ -355,4 +355,4 @@ Description.displayName = "Dialog.Description";
|
|
|
355
355
|
export {
|
|
356
356
|
Dialog2 as Dialog
|
|
357
357
|
};
|
|
358
|
-
//# sourceMappingURL=chunk-
|
|
358
|
+
//# sourceMappingURL=chunk-5VKP2RR6.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3PTXYZYN.mjs";
|
|
4
4
|
|
|
5
5
|
// src/icon-button/IconButton.styles.tsx
|
|
6
6
|
import { makeVariants } from "@spark-ui/internal-utils";
|
|
@@ -50,4 +50,4 @@ IconButton.displayName = "IconButton";
|
|
|
50
50
|
export {
|
|
51
51
|
IconButton
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-MKN2Y3W6.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IconButton
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MKN2Y3W6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Icon
|
|
6
6
|
} from "./chunk-UMUMFMFB.mjs";
|
|
@@ -305,4 +305,4 @@ Trigger.displayName = "Popover.Trigger";
|
|
|
305
305
|
export {
|
|
306
306
|
Popover2 as Popover
|
|
307
307
|
};
|
|
308
|
-
//# sourceMappingURL=chunk-
|
|
308
|
+
//# sourceMappingURL=chunk-Z45YCYPH.mjs.map
|
|
@@ -1,60 +1,43 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import { ComponentProps
|
|
2
|
+
import { Collapsible as Collapsible$1 } from '@base-ui-components/react/collapsible';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
4
|
|
|
5
|
-
interface
|
|
5
|
+
interface ContentProps extends ComponentProps<typeof Collapsible$1.Panel> {
|
|
6
6
|
/**
|
|
7
7
|
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
8
8
|
*/
|
|
9
9
|
asChild?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* The open state of the collapsible when it is initially rendered. Use when you do not need to control its open state.
|
|
12
|
-
*/
|
|
13
|
-
defaultOpen?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* When `true`, prevents the user from interacting with the collapsible.
|
|
16
|
-
*/
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Event handler called when the open state of the collapsible changes.
|
|
20
|
-
*/
|
|
21
|
-
onOpenChange?: (open: boolean) => void;
|
|
22
|
-
/**
|
|
23
|
-
* The controlled open state of the collapsible. Must be used in conjunction with `onOpenChange`.
|
|
24
|
-
*/
|
|
25
|
-
open?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The ids of the elements in the collapsible. Useful for composition
|
|
28
|
-
*/
|
|
29
|
-
ids?: collapsible.Props['ids'];
|
|
30
|
-
ref?: Ref<HTMLDivElement>;
|
|
31
10
|
}
|
|
32
|
-
declare const
|
|
33
|
-
({ asChild,
|
|
11
|
+
declare const Content: {
|
|
12
|
+
({ asChild, className, children, hiddenUntilFound, ...props }: ContentProps): react_jsx_runtime.JSX.Element;
|
|
34
13
|
displayName: string;
|
|
35
14
|
};
|
|
36
15
|
|
|
37
|
-
interface
|
|
16
|
+
interface RootProps extends ComponentProps<typeof Collapsible$1.Root> {
|
|
17
|
+
/**
|
|
18
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
19
|
+
*/
|
|
38
20
|
asChild?: boolean;
|
|
39
|
-
ref?: Ref<HTMLDivElement>;
|
|
40
21
|
}
|
|
41
|
-
declare const
|
|
42
|
-
({ asChild,
|
|
22
|
+
declare const Root: {
|
|
23
|
+
({ asChild, children, ...props }: RootProps): react_jsx_runtime.JSX.Element;
|
|
43
24
|
displayName: string;
|
|
44
25
|
};
|
|
45
26
|
|
|
46
|
-
interface
|
|
27
|
+
interface TriggerProps extends ComponentProps<'button'> {
|
|
28
|
+
/**
|
|
29
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
30
|
+
*/
|
|
47
31
|
asChild?: boolean;
|
|
48
|
-
ref?: Ref<HTMLButtonElement>;
|
|
49
32
|
}
|
|
50
33
|
declare const Trigger: {
|
|
51
|
-
({ asChild, children,
|
|
34
|
+
({ asChild, children, ...props }: TriggerProps): react_jsx_runtime.JSX.Element;
|
|
52
35
|
displayName: string;
|
|
53
36
|
};
|
|
54
37
|
|
|
55
|
-
declare const Collapsible: typeof
|
|
38
|
+
declare const Collapsible: typeof Root & {
|
|
56
39
|
Trigger: typeof Trigger;
|
|
57
40
|
Content: typeof Content;
|
|
58
41
|
};
|
|
59
42
|
|
|
60
|
-
export { Collapsible
|
|
43
|
+
export { Collapsible };
|
|
@@ -1,60 +1,43 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import { ComponentProps
|
|
2
|
+
import { Collapsible as Collapsible$1 } from '@base-ui-components/react/collapsible';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
4
|
|
|
5
|
-
interface
|
|
5
|
+
interface ContentProps extends ComponentProps<typeof Collapsible$1.Panel> {
|
|
6
6
|
/**
|
|
7
7
|
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
8
8
|
*/
|
|
9
9
|
asChild?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* The open state of the collapsible when it is initially rendered. Use when you do not need to control its open state.
|
|
12
|
-
*/
|
|
13
|
-
defaultOpen?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* When `true`, prevents the user from interacting with the collapsible.
|
|
16
|
-
*/
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Event handler called when the open state of the collapsible changes.
|
|
20
|
-
*/
|
|
21
|
-
onOpenChange?: (open: boolean) => void;
|
|
22
|
-
/**
|
|
23
|
-
* The controlled open state of the collapsible. Must be used in conjunction with `onOpenChange`.
|
|
24
|
-
*/
|
|
25
|
-
open?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The ids of the elements in the collapsible. Useful for composition
|
|
28
|
-
*/
|
|
29
|
-
ids?: collapsible.Props['ids'];
|
|
30
|
-
ref?: Ref<HTMLDivElement>;
|
|
31
10
|
}
|
|
32
|
-
declare const
|
|
33
|
-
({ asChild,
|
|
11
|
+
declare const Content: {
|
|
12
|
+
({ asChild, className, children, hiddenUntilFound, ...props }: ContentProps): react_jsx_runtime.JSX.Element;
|
|
34
13
|
displayName: string;
|
|
35
14
|
};
|
|
36
15
|
|
|
37
|
-
interface
|
|
16
|
+
interface RootProps extends ComponentProps<typeof Collapsible$1.Root> {
|
|
17
|
+
/**
|
|
18
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
19
|
+
*/
|
|
38
20
|
asChild?: boolean;
|
|
39
|
-
ref?: Ref<HTMLDivElement>;
|
|
40
21
|
}
|
|
41
|
-
declare const
|
|
42
|
-
({ asChild,
|
|
22
|
+
declare const Root: {
|
|
23
|
+
({ asChild, children, ...props }: RootProps): react_jsx_runtime.JSX.Element;
|
|
43
24
|
displayName: string;
|
|
44
25
|
};
|
|
45
26
|
|
|
46
|
-
interface
|
|
27
|
+
interface TriggerProps extends ComponentProps<'button'> {
|
|
28
|
+
/**
|
|
29
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
30
|
+
*/
|
|
47
31
|
asChild?: boolean;
|
|
48
|
-
ref?: Ref<HTMLButtonElement>;
|
|
49
32
|
}
|
|
50
33
|
declare const Trigger: {
|
|
51
|
-
({ asChild, children,
|
|
34
|
+
({ asChild, children, ...props }: TriggerProps): react_jsx_runtime.JSX.Element;
|
|
52
35
|
displayName: string;
|
|
53
36
|
};
|
|
54
37
|
|
|
55
|
-
declare const Collapsible: typeof
|
|
38
|
+
declare const Collapsible: typeof Root & {
|
|
56
39
|
Trigger: typeof Trigger;
|
|
57
40
|
Content: typeof Content;
|
|
58
41
|
};
|
|
59
42
|
|
|
60
|
-
export { Collapsible
|
|
43
|
+
export { Collapsible };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,27 +15,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
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
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/collapsible/index.ts
|
|
31
21
|
var collapsible_exports = {};
|
|
32
22
|
__export(collapsible_exports, {
|
|
33
|
-
Collapsible: () =>
|
|
23
|
+
Collapsible: () => Collapsible4
|
|
34
24
|
});
|
|
35
25
|
module.exports = __toCommonJS(collapsible_exports);
|
|
36
26
|
|
|
37
|
-
// src/collapsible/
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var import_react3 = require("react");
|
|
27
|
+
// src/collapsible/Content.tsx
|
|
28
|
+
var import_collapsible = require("@base-ui-components/react/collapsible");
|
|
29
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
41
30
|
|
|
42
31
|
// src/slot/Slot.tsx
|
|
43
32
|
var import_radix_ui = require("radix-ui");
|
|
@@ -48,89 +37,69 @@ var Slot = ({ ref, ...props }) => {
|
|
|
48
37
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_radix_ui.Slot.Root, { ref, ...props });
|
|
49
38
|
};
|
|
50
39
|
|
|
51
|
-
// src/collapsible/
|
|
40
|
+
// src/collapsible/useRenderSlot.tsx
|
|
52
41
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
asChild
|
|
56
|
-
|
|
57
|
-
defaultOpen = false,
|
|
58
|
-
disabled = false,
|
|
59
|
-
onOpenChange,
|
|
60
|
-
open,
|
|
61
|
-
ids,
|
|
62
|
-
ref,
|
|
63
|
-
...props
|
|
64
|
-
}) => {
|
|
65
|
-
const service = (0, import_react2.useMachine)(collapsible.machine, {
|
|
66
|
-
open,
|
|
67
|
-
defaultOpen,
|
|
68
|
-
disabled,
|
|
69
|
-
id: (0, import_react3.useId)(),
|
|
70
|
-
ids,
|
|
71
|
-
onOpenChange(details) {
|
|
72
|
-
onOpenChange?.(details.open);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
const api = collapsible.connect(service, import_react2.normalizeProps);
|
|
76
|
-
const Component = asChild ? Slot : "div";
|
|
77
|
-
const mergedProps = (0, import_react2.mergeProps)(api.getRootProps(), props);
|
|
78
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CollapsibleContext.Provider, { value: api, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, { "data-spark-component": "collapsible", ref, ...mergedProps, children }) });
|
|
79
|
-
};
|
|
80
|
-
Collapsible.displayName = "Collapsible";
|
|
81
|
-
var useCollapsibleContext = () => {
|
|
82
|
-
const context = (0, import_react3.useContext)(CollapsibleContext);
|
|
83
|
-
if (!context) {
|
|
84
|
-
throw Error("useCollapsibleContext must be used within a Collapsible provider");
|
|
85
|
-
}
|
|
86
|
-
return context;
|
|
87
|
-
};
|
|
42
|
+
function useRenderSlot(asChild, defaultTag) {
|
|
43
|
+
const Component = asChild ? Slot : defaultTag;
|
|
44
|
+
return asChild ? ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, { ...props }) : void 0;
|
|
45
|
+
}
|
|
88
46
|
|
|
89
|
-
// src/collapsible/
|
|
90
|
-
var import_react4 = require("@zag-js/react");
|
|
91
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
47
|
+
// src/collapsible/Content.tsx
|
|
92
48
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
93
49
|
var Content = ({
|
|
94
50
|
asChild = false,
|
|
95
51
|
className,
|
|
96
52
|
children,
|
|
97
|
-
|
|
53
|
+
hiddenUntilFound = true,
|
|
98
54
|
...props
|
|
99
55
|
}) => {
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
56
|
+
const renderSlot = useRenderSlot(asChild, "div");
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
58
|
+
import_collapsible.Collapsible.Panel,
|
|
59
|
+
{
|
|
60
|
+
"data-spark-component": "collapsible-content",
|
|
61
|
+
className: (0, import_class_variance_authority.cx)(
|
|
62
|
+
"overflow-hidden",
|
|
63
|
+
"h-[var(--collapsible-panel-height)]",
|
|
64
|
+
"transition-all duration-200",
|
|
65
|
+
"motion-reduce:transition-none",
|
|
66
|
+
"data-[starting-style]:h-0",
|
|
67
|
+
"data-[ending-style]:h-0",
|
|
68
|
+
className
|
|
69
|
+
),
|
|
70
|
+
render: renderSlot,
|
|
71
|
+
hiddenUntilFound,
|
|
72
|
+
...props,
|
|
73
|
+
children
|
|
74
|
+
}
|
|
75
|
+
);
|
|
114
76
|
};
|
|
115
77
|
Content.displayName = "Collapsible.Content";
|
|
116
78
|
|
|
117
|
-
// src/collapsible/
|
|
118
|
-
var
|
|
79
|
+
// src/collapsible/Root.tsx
|
|
80
|
+
var import_collapsible2 = require("@base-ui-components/react/collapsible");
|
|
119
81
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
120
|
-
var
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
82
|
+
var Root = ({ asChild = false, children, ...props }) => {
|
|
83
|
+
const renderSlot = useRenderSlot(asChild, "div");
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_collapsible2.Collapsible.Root, { "data-spark-component": "collapsible", render: renderSlot, ...props, children });
|
|
85
|
+
};
|
|
86
|
+
Root.displayName = "Collapsible";
|
|
87
|
+
|
|
88
|
+
// src/collapsible/Trigger.tsx
|
|
89
|
+
var import_collapsible3 = require("@base-ui-components/react/collapsible");
|
|
90
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
91
|
+
var Trigger = ({ asChild = false, children, ...props }) => {
|
|
92
|
+
const renderSlot = useRenderSlot(asChild, "button");
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_collapsible3.Collapsible.Trigger, { "data-spark-component": "collapsible-trigger", render: renderSlot, ...props, children });
|
|
125
94
|
};
|
|
126
95
|
Trigger.displayName = "Collapsible.Trigger";
|
|
127
96
|
|
|
128
97
|
// src/collapsible/index.ts
|
|
129
|
-
var
|
|
98
|
+
var Collapsible4 = Object.assign(Root, {
|
|
130
99
|
Trigger,
|
|
131
100
|
Content
|
|
132
101
|
});
|
|
133
|
-
|
|
102
|
+
Collapsible4.displayName = "Collapsible";
|
|
134
103
|
Trigger.displayName = "Collapsible.Trigger";
|
|
135
104
|
Content.displayName = "Collapsible.Content";
|
|
136
105
|
// Annotate the CommonJS export names for ESM import in node:
|