@moduix/solid-tailwind 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/Accordion.js +2 -2
- package/dist/components/accordion/Accordion.jsx +1 -1
- package/dist/components/alert/Alert.js +15 -15
- package/dist/components/alert/Alert.jsx +7 -7
- package/dist/components/angle-slider/AngleSlider.js +15 -8
- package/dist/components/angle-slider/AngleSlider.jsx +13 -6
- package/dist/components/avatar/Avatar.js +3 -3
- package/dist/components/avatar/Avatar.jsx +2 -2
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/dist/components/breadcrumbs/Breadcrumbs.js +34 -29
- package/dist/components/breadcrumbs/Breadcrumbs.jsx +12 -11
- package/dist/components/carousel/Carousel.js +3 -3
- package/dist/components/carousel/Carousel.jsx +3 -3
- package/dist/components/command-palette/CommandPalette.js +1 -1
- package/dist/components/command-palette/CommandPalette.jsx +1 -1
- package/dist/components/drawer/Drawer.js +3 -3
- package/dist/components/drawer/Drawer.jsx +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/highlight/Highlight.jsx +1 -1
- package/dist/components/image-cropper/ImageCropper.d.ts +1 -1
- package/dist/components/json-tree-view/JsonTreeView.js +3 -2
- package/dist/components/json-tree-view/JsonTreeView.jsx +3 -2
- package/dist/components/menu/Menu.d.ts +3 -1
- package/dist/components/menu/Menu.js +18 -25
- package/dist/components/menu/Menu.jsx +14 -15
- package/dist/components/native-select/NativeSelect.d.ts +0 -1
- package/dist/components/native-select/NativeSelect.js +2 -7
- package/dist/components/native-select/NativeSelect.jsx +2 -4
- package/dist/components/navigation-menu/NavigationMenu.d.ts +1 -0
- package/dist/components/navigation-menu/NavigationMenu.js +2 -1
- package/dist/components/navigation-menu/NavigationMenu.jsx +2 -1
- package/dist/components/number-input/NumberInput.js +3 -3
- package/dist/components/number-input/NumberInput.jsx +3 -3
- package/dist/components/pagination/Pagination.js +6 -6
- package/dist/components/pagination/Pagination.jsx +6 -6
- package/dist/components/password-input/PasswordInput.js +6 -15
- package/dist/components/password-input/PasswordInput.jsx +5 -13
- package/dist/components/pin-input/PinInput.js +2 -2
- package/dist/components/pin-input/PinInput.jsx +2 -2
- package/dist/components/popover/Popover.js +6 -6
- package/dist/components/popover/Popover.jsx +6 -6
- package/dist/components/progress-circular/ProgressCircular.js +3 -3
- package/dist/components/progress-circular/ProgressCircular.jsx +3 -3
- package/dist/components/qr-code/QrCode.js +1 -1
- package/dist/components/qr-code/QrCode.jsx +1 -1
- package/dist/components/radio-group/RadioGroup.d.ts +2 -2
- package/dist/components/radio-group/RadioGroup.js +1 -1
- package/dist/components/radio-group/RadioGroup.jsx +1 -1
- package/dist/components/rating-group/RatingGroup.js +11 -11
- package/dist/components/rating-group/RatingGroup.jsx +4 -4
- package/dist/components/scroll-area/ScrollArea.d.ts +1 -1
- package/dist/components/scroll-area/ScrollArea.js +2 -2
- package/dist/components/scroll-area/ScrollArea.jsx +2 -2
- package/dist/components/segment-group/SegmentGroup.d.ts +1 -1
- package/dist/components/segment-group/SegmentGroup.js +2 -1
- package/dist/components/segment-group/SegmentGroup.jsx +2 -1
- package/dist/components/select/Select.js +6 -6
- package/dist/components/select/Select.jsx +7 -8
- package/dist/components/separator/Separator.js +1 -1
- package/dist/components/separator/Separator.jsx +1 -1
- package/dist/components/sidebar/Sidebar.js +50 -56
- package/dist/components/sidebar/Sidebar.jsx +25 -27
- package/dist/components/signature-pad/SignaturePad.d.ts +1 -1
- package/dist/components/signature-pad/SignaturePad.js +1 -1
- package/dist/components/signature-pad/SignaturePad.jsx +1 -1
- package/dist/components/slider/Slider.js +5 -5
- package/dist/components/slider/Slider.jsx +3 -3
- package/dist/components/split-button/SplitButton.js +12 -11
- package/dist/components/split-button/SplitButton.jsx +10 -10
- package/dist/components/splitter/Splitter.js +2 -2
- package/dist/components/splitter/Splitter.jsx +2 -2
- package/dist/components/steps/Steps.js +2 -2
- package/dist/components/steps/Steps.jsx +2 -2
- package/dist/components/swap/Swap.js +9 -9
- package/dist/components/swap/Swap.jsx +3 -3
- package/dist/components/switch/Switch.js +7 -7
- package/dist/components/switch/Switch.jsx +3 -3
- package/dist/components/table/Table.js +3 -3
- package/dist/components/table/Table.jsx +3 -3
- package/dist/components/tabs/Tabs.js +7 -7
- package/dist/components/tabs/Tabs.jsx +3 -3
- package/dist/components/tag/Tag.js +1 -1
- package/dist/components/tag/Tag.jsx +1 -1
- package/dist/components/tags-input/TagsInput.js +3 -3
- package/dist/components/tags-input/TagsInput.jsx +3 -3
- package/dist/components/text/Text.js +1 -1
- package/dist/components/text/Text.jsx +1 -1
- package/dist/components/timer/Timer.js +1 -1
- package/dist/components/timer/Timer.jsx +1 -1
- package/dist/components/toast/Toast.js +2 -2
- package/dist/components/toast/Toast.jsx +2 -2
- package/dist/components/toc/Toc.d.ts +2 -2
- package/dist/components/toc/Toc.js +5 -6
- package/dist/components/toc/Toc.jsx +5 -6
- package/dist/components/toggle/Toggle.d.ts +5 -1
- package/dist/components/toggle/Toggle.js +2 -2
- package/dist/components/toggle/Toggle.jsx +2 -2
- package/dist/components/toggle-group/ToggleGroup.d.ts +1 -2
- package/dist/components/toggle-group/ToggleGroup.js +4 -25
- package/dist/components/toggle-group/ToggleGroup.jsx +4 -25
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/components/tooltip/Tooltip.jsx +2 -2
- package/dist/components/tour/Tour.js +1 -1
- package/dist/components/tour/Tour.jsx +1 -1
- package/dist/components/tree-view/TreeView.js +4 -2
- package/dist/components/tree-view/TreeView.jsx +4 -2
- package/dist/components/typeset/Typeset_module.css +6 -4
- package/dist/styles/animations.css +10 -0
- package/dist/styles/style.css +2 -0
- package/package.json +10 -11
|
@@ -8,7 +8,7 @@ function HighlightRoot(props) {
|
|
|
8
8
|
'data-part',
|
|
9
9
|
'data-slot'
|
|
10
10
|
]);
|
|
11
|
-
return <Highlight {...others} data-scope="highlight" data-part="root" data-slot="highlight-root" class={cn('rounded-xs bg-[color-mix(in_oklab,var(--color-warning)_40%,var(--color-accent))]
|
|
11
|
+
return <Highlight {...others} data-scope="highlight" data-part="root" data-slot="highlight-root" class={cn('rounded-xs bg-[color-mix(in_oklab,var(--color-warning)_40%,var(--color-accent))] box-decoration-clone px-1 py-px font-medium text-foreground no-underline shadow-none', local.class)}/>;
|
|
12
12
|
}
|
|
13
13
|
const Highlight_Highlight = Object.assign(HighlightRoot, {
|
|
14
14
|
Root: HighlightRoot
|
|
@@ -22,6 +22,6 @@ declare const ImageCropper: typeof ImageCropperRoot & {
|
|
|
22
22
|
Grid: typeof ImageCropperGrid;
|
|
23
23
|
Handle: typeof ImageCropperHandle;
|
|
24
24
|
CropArea: typeof ImageCropperCropArea;
|
|
25
|
-
handles: import("@ark-ui/solid").ImageCropperHandlePosition[];
|
|
25
|
+
handles: import("@ark-ui/solid/image-cropper").ImageCropperHandlePosition[];
|
|
26
26
|
};
|
|
27
27
|
export { ImageCropper, useImageCropper, useImageCropperContext };
|
|
@@ -3,6 +3,7 @@ import { JsonTreeView, useJsonTreeView } from "@ark-ui/solid/json-tree-view";
|
|
|
3
3
|
import { splitProps } from "solid-js";
|
|
4
4
|
import { cn } from "../../internal/cn.js";
|
|
5
5
|
import { ChevronRightIcon } from "../../internal/icons/ui/Icons.js";
|
|
6
|
+
const rootClassName = "box-border flex w-full min-w-0 flex-col font-mono text-xs leading-4 text-foreground data-disabled:opacity-50 [&_[data-kind='brace']]:font-medium [&_[data-kind='brace']]:text-muted-foreground [&_[data-kind='colon']]:text-muted-foreground [&_[data-kind='constructor']]:font-medium [&_[data-kind='constructor']]:text-muted-foreground [&_[data-kind='error-stack']]:text-destructive [&_[data-kind='function-body']]:text-[color-mix(in_oklab,var(--color-chart-5)_72%,var(--color-foreground))] [&_[data-kind='function-body']]:italic [&_[data-kind='function-type']]:text-[color-mix(in_oklab,var(--color-chart-5)_72%,var(--color-foreground))] [&_[data-kind='function-type']]:italic [&_[data-kind='key']]:font-medium [&_[data-kind='key']]:text-[color-mix(in_oklab,var(--color-chart-1)_72%,var(--color-foreground))] [&_[data-kind='operator']]:text-destructive [&_[data-kind='preview'][data-type='bigint']]:text-[color-mix(in_oklab,var(--color-chart-3)_78%,var(--color-foreground))] [&_[data-kind='preview'][data-type='boolean']]:font-medium [&_[data-kind='preview'][data-type='boolean']]:text-[color-mix(in_oklab,var(--color-chart-4)_74%,var(--color-foreground))] [&_[data-kind='preview'][data-type='error']]:text-destructive [&_[data-kind='preview'][data-type='function']]:text-[color-mix(in_oklab,var(--color-chart-5)_72%,var(--color-foreground))] [&_[data-kind='preview'][data-type='null']]:font-medium [&_[data-kind='preview'][data-type='null']]:text-muted-foreground [&_[data-kind='preview'][data-type='null']]:italic [&_[data-kind='preview'][data-type='number']]:text-[color-mix(in_oklab,var(--color-chart-3)_78%,var(--color-foreground))] [&_[data-kind='preview'][data-type='string']]:text-[color-mix(in_oklab,var(--color-success)_78%,var(--color-foreground))] [&_[data-kind='preview'][data-type='undefined']]:font-medium [&_[data-kind='preview'][data-type='undefined']]:text-muted-foreground [&_[data-kind='preview'][data-type='undefined']]:italic [&_[data-kind='preview-text']]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch']]:flex [&_[data-scope='json-tree-view'][data-part='branch']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex [&_[data-scope='json-tree-view'][data-part='branch-content']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch-content']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:overflow-hidden [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:relative [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:z-0 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:box-border [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:flex [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:w-full [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:pe-1 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:text-start [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:text-inherit [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:outline-none [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:select-none [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:absolute [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='branch-control']:focus-visible,&_[data-scope='json-tree-view'][data-part='item']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled],&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled],&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch-control'][data-focus],&_[data-scope='json-tree-view'][data-part='item'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-selected],&_[data-scope='json-tree-view'][data-part='item'][data-selected]]:before:bg-[color-mix(in_oklab,var(--color-accent)_72%,var(--color-background))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:inline-flex [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:shrink-0 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:justify-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:text-[color-mix(in_oklab,var(--color-muted-foreground)_42%,var(--color-foreground))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-transform [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:ease-in-out motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-none [&_[data-scope='json-tree-view'][data-part='branch-indicator']_svg]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator'][data-state='open']]:rotate-90 [&_[data-scope='json-tree-view'][data-part='branch-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-text']]:wrap-anywhere [&_[data-scope='json-tree-view'][data-part='item-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item-text']]:wrap-anywhere [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='branch-control']:not([data-disabled]):hover,&_[data-scope='json-tree-view'][data-part='item']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,var(--color-accent)_72%,var(--color-background))]";
|
|
6
7
|
function JsonTreeViewRoot(props) {
|
|
7
8
|
const [local, others] = splitProps(props, [
|
|
8
9
|
'asChild',
|
|
@@ -16,7 +17,7 @@ function JsonTreeViewRoot(props) {
|
|
|
16
17
|
}, others, {
|
|
17
18
|
"data-slot": "json-tree-view-root",
|
|
18
19
|
get ["class"] () {
|
|
19
|
-
return cn("box-border flex w-full min-w-0 flex-col font-mono text-xs leading-4 text-foreground data-disabled:opacity-50 [&_[data-kind='brace']]:font-medium [&_[data-kind='brace']]:text-muted-foreground [&_[data-kind='colon']]:text-muted-foreground [&_[data-kind='constructor']]:font-medium [&_[data-kind='constructor']]:text-muted-foreground [&_[data-kind='error-stack']]:text-destructive [&_[data-kind='function-body']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='function-body']]:italic [&_[data-kind='function-type']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='function-type']]:italic [&_[data-kind='key']]:font-medium [&_[data-kind='key']]:text-[color-mix(in_oklab,theme(--color-chart-1)_72%,theme(--color-foreground))] [&_[data-kind='operator']]:text-destructive [&_[data-kind='preview'][data-type='bigint']]:text-[color-mix(in_oklab,theme(--color-chart-3)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='boolean']]:font-medium [&_[data-kind='preview'][data-type='boolean']]:text-[color-mix(in_oklab,theme(--color-chart-4)_74%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='error']]:text-destructive [&_[data-kind='preview'][data-type='function']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='null']]:font-medium [&_[data-kind='preview'][data-type='null']]:text-muted-foreground [&_[data-kind='preview'][data-type='null']]:italic [&_[data-kind='preview'][data-type='number']]:text-[color-mix(in_oklab,theme(--color-chart-3)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='string']]:text-[color-mix(in_oklab,theme(--color-success)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='undefined']]:font-medium [&_[data-kind='preview'][data-type='undefined']]:text-muted-foreground [&_[data-kind='preview'][data-type='undefined']]:italic [&_[data-kind='preview-text']]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch']]:flex [&_[data-scope='json-tree-view'][data-part='branch']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex [&_[data-scope='json-tree-view'][data-part='branch-content']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch-content']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:overflow-hidden [&_[data-scope='json-tree-view'][data-part='branch-control']]:relative [&_[data-scope='json-tree-view'][data-part='branch-control']]:z-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:box-border [&_[data-scope='json-tree-view'][data-part='branch-control']]:flex [&_[data-scope='json-tree-view'][data-part='branch-control']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:w-full [&_[data-scope='json-tree-view'][data-part='branch-control']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='branch-control']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-control']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='branch-control']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control']]:pe-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:text-start [&_[data-scope='json-tree-view'][data-part='branch-control']]:text-inherit [&_[data-scope='json-tree-view'][data-part='branch-control']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='branch-control']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control']]:outline-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:select-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:absolute [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='branch-control']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch-control'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-selected]]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:inline-flex [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:shrink-0 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:justify-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:text-[color-mix(in_oklab,theme(--color-muted-foreground)_42%,theme(--color-foreground))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-transform [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:ease-in-out motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-none [&_[data-scope='json-tree-view'][data-part='branch-indicator']_svg]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator'][data-state='open']]:rotate-90 [&_[data-scope='json-tree-view'][data-part='branch-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-text']]:wrap-anywhere [&_[data-scope='json-tree-view'][data-part='item']]:relative [&_[data-scope='json-tree-view'][data-part='item']]:z-0 [&_[data-scope='json-tree-view'][data-part='item']]:box-border [&_[data-scope='json-tree-view'][data-part='item']]:flex [&_[data-scope='json-tree-view'][data-part='item']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='item']]:w-full [&_[data-scope='json-tree-view'][data-part='item']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='item']]:items-center [&_[data-scope='json-tree-view'][data-part='item']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='item']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='item']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='item']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='item']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='item']]:pe-1 [&_[data-scope='json-tree-view'][data-part='item']]:text-start [&_[data-scope='json-tree-view'][data-part='item']]:text-inherit [&_[data-scope='json-tree-view'][data-part='item']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='item']]:duration-200 [&_[data-scope='json-tree-view'][data-part='item']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='item']]:outline-none [&_[data-scope='json-tree-view'][data-part='item']]:select-none [&_[data-scope='json-tree-view'][data-part='item']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='item']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='item']]:before:absolute [&_[data-scope='json-tree-view'][data-part='item']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='item']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='item']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='item']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='item']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='item']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='item']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='item']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='item']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='item']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='item']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='item']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='item']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='item'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='item'][data-selected]]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [&_[data-scope='json-tree-view'][data-part='item-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item-text']]:wrap-anywhere [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='branch-control']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='item']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))]", local.class);
|
|
20
|
+
return cn(rootClassName, local.class);
|
|
20
21
|
},
|
|
21
22
|
get children () {
|
|
22
23
|
return local.children;
|
|
@@ -35,7 +36,7 @@ function JsonTreeViewRootProvider(props) {
|
|
|
35
36
|
}
|
|
36
37
|
}, others, {
|
|
37
38
|
get ["class"] () {
|
|
38
|
-
return cn("box-border flex w-full min-w-0 flex-col font-mono text-xs leading-4 text-foreground data-disabled:opacity-50 [&_[data-kind='brace']]:font-medium [&_[data-kind='brace']]:text-muted-foreground [&_[data-kind='colon']]:text-muted-foreground [&_[data-kind='constructor']]:font-medium [&_[data-kind='constructor']]:text-muted-foreground [&_[data-kind='error-stack']]:text-destructive [&_[data-kind='function-body']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='function-body']]:italic [&_[data-kind='function-type']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='function-type']]:italic [&_[data-kind='key']]:font-medium [&_[data-kind='key']]:text-[color-mix(in_oklab,theme(--color-chart-1)_72%,theme(--color-foreground))] [&_[data-kind='operator']]:text-destructive [&_[data-kind='preview'][data-type='bigint']]:text-[color-mix(in_oklab,theme(--color-chart-3)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='boolean']]:font-medium [&_[data-kind='preview'][data-type='boolean']]:text-[color-mix(in_oklab,theme(--color-chart-4)_74%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='error']]:text-destructive [&_[data-kind='preview'][data-type='function']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='null']]:font-medium [&_[data-kind='preview'][data-type='null']]:text-muted-foreground [&_[data-kind='preview'][data-type='null']]:italic [&_[data-kind='preview'][data-type='number']]:text-[color-mix(in_oklab,theme(--color-chart-3)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='string']]:text-[color-mix(in_oklab,theme(--color-success)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='undefined']]:font-medium [&_[data-kind='preview'][data-type='undefined']]:text-muted-foreground [&_[data-kind='preview'][data-type='undefined']]:italic [&_[data-kind='preview-text']]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch']]:flex [&_[data-scope='json-tree-view'][data-part='branch']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex [&_[data-scope='json-tree-view'][data-part='branch-content']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch-content']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:overflow-hidden [&_[data-scope='json-tree-view'][data-part='branch-control']]:relative [&_[data-scope='json-tree-view'][data-part='branch-control']]:z-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:box-border [&_[data-scope='json-tree-view'][data-part='branch-control']]:flex [&_[data-scope='json-tree-view'][data-part='branch-control']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:w-full [&_[data-scope='json-tree-view'][data-part='branch-control']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='branch-control']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-control']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='branch-control']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control']]:pe-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:text-start [&_[data-scope='json-tree-view'][data-part='branch-control']]:text-inherit [&_[data-scope='json-tree-view'][data-part='branch-control']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='branch-control']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control']]:outline-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:select-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:absolute [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='branch-control']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch-control'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-selected]]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:inline-flex [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:shrink-0 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:justify-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:text-[color-mix(in_oklab,theme(--color-muted-foreground)_42%,theme(--color-foreground))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-transform [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:ease-in-out motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-none [&_[data-scope='json-tree-view'][data-part='branch-indicator']_svg]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator'][data-state='open']]:rotate-90 [&_[data-scope='json-tree-view'][data-part='branch-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-text']]:wrap-anywhere [&_[data-scope='json-tree-view'][data-part='item']]:relative [&_[data-scope='json-tree-view'][data-part='item']]:z-0 [&_[data-scope='json-tree-view'][data-part='item']]:box-border [&_[data-scope='json-tree-view'][data-part='item']]:flex [&_[data-scope='json-tree-view'][data-part='item']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='item']]:w-full [&_[data-scope='json-tree-view'][data-part='item']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='item']]:items-center [&_[data-scope='json-tree-view'][data-part='item']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='item']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='item']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='item']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='item']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='item']]:pe-1 [&_[data-scope='json-tree-view'][data-part='item']]:text-start [&_[data-scope='json-tree-view'][data-part='item']]:text-inherit [&_[data-scope='json-tree-view'][data-part='item']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='item']]:duration-200 [&_[data-scope='json-tree-view'][data-part='item']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='item']]:outline-none [&_[data-scope='json-tree-view'][data-part='item']]:select-none [&_[data-scope='json-tree-view'][data-part='item']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='item']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='item']]:before:absolute [&_[data-scope='json-tree-view'][data-part='item']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='item']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='item']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='item']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='item']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='item']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='item']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='item']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='item']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='item']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='item']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='item']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='item']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='item'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='item'][data-selected]]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [&_[data-scope='json-tree-view'][data-part='item-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item-text']]:wrap-anywhere [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='branch-control']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='item']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))]", local.class);
|
|
39
|
+
return cn(rootClassName, local.class);
|
|
39
40
|
}
|
|
40
41
|
}, others, {
|
|
41
42
|
"data-slot": "json-tree-view-root-provider",
|
|
@@ -2,13 +2,14 @@ import { JsonTreeView, useJsonTreeView } from "@ark-ui/solid/json-tree-view";
|
|
|
2
2
|
import { splitProps } from "solid-js";
|
|
3
3
|
import { cn } from "../../internal/cn.jsx";
|
|
4
4
|
import { ChevronRightIcon } from "../../internal/icons/ui/Icons.jsx";
|
|
5
|
+
const rootClassName = "box-border flex w-full min-w-0 flex-col font-mono text-xs leading-4 text-foreground data-disabled:opacity-50 [&_[data-kind='brace']]:font-medium [&_[data-kind='brace']]:text-muted-foreground [&_[data-kind='colon']]:text-muted-foreground [&_[data-kind='constructor']]:font-medium [&_[data-kind='constructor']]:text-muted-foreground [&_[data-kind='error-stack']]:text-destructive [&_[data-kind='function-body']]:text-[color-mix(in_oklab,var(--color-chart-5)_72%,var(--color-foreground))] [&_[data-kind='function-body']]:italic [&_[data-kind='function-type']]:text-[color-mix(in_oklab,var(--color-chart-5)_72%,var(--color-foreground))] [&_[data-kind='function-type']]:italic [&_[data-kind='key']]:font-medium [&_[data-kind='key']]:text-[color-mix(in_oklab,var(--color-chart-1)_72%,var(--color-foreground))] [&_[data-kind='operator']]:text-destructive [&_[data-kind='preview'][data-type='bigint']]:text-[color-mix(in_oklab,var(--color-chart-3)_78%,var(--color-foreground))] [&_[data-kind='preview'][data-type='boolean']]:font-medium [&_[data-kind='preview'][data-type='boolean']]:text-[color-mix(in_oklab,var(--color-chart-4)_74%,var(--color-foreground))] [&_[data-kind='preview'][data-type='error']]:text-destructive [&_[data-kind='preview'][data-type='function']]:text-[color-mix(in_oklab,var(--color-chart-5)_72%,var(--color-foreground))] [&_[data-kind='preview'][data-type='null']]:font-medium [&_[data-kind='preview'][data-type='null']]:text-muted-foreground [&_[data-kind='preview'][data-type='null']]:italic [&_[data-kind='preview'][data-type='number']]:text-[color-mix(in_oklab,var(--color-chart-3)_78%,var(--color-foreground))] [&_[data-kind='preview'][data-type='string']]:text-[color-mix(in_oklab,var(--color-success)_78%,var(--color-foreground))] [&_[data-kind='preview'][data-type='undefined']]:font-medium [&_[data-kind='preview'][data-type='undefined']]:text-muted-foreground [&_[data-kind='preview'][data-type='undefined']]:italic [&_[data-kind='preview-text']]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch']]:flex [&_[data-scope='json-tree-view'][data-part='branch']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex [&_[data-scope='json-tree-view'][data-part='branch-content']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch-content']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:overflow-hidden [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:relative [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:z-0 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:box-border [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:flex [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:w-full [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:pe-1 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:text-start [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:text-inherit [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:outline-none [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:select-none [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:absolute [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control'],&_[data-scope='json-tree-view'][data-part='item']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='branch-control']:focus-visible,&_[data-scope='json-tree-view'][data-part='item']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled],&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled],&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch-control'][data-focus],&_[data-scope='json-tree-view'][data-part='item'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-selected],&_[data-scope='json-tree-view'][data-part='item'][data-selected]]:before:bg-[color-mix(in_oklab,var(--color-accent)_72%,var(--color-background))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:inline-flex [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:shrink-0 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:justify-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:text-[color-mix(in_oklab,var(--color-muted-foreground)_42%,var(--color-foreground))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-transform [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:ease-in-out motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-none [&_[data-scope='json-tree-view'][data-part='branch-indicator']_svg]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator'][data-state='open']]:rotate-90 [&_[data-scope='json-tree-view'][data-part='branch-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-text']]:wrap-anywhere [&_[data-scope='json-tree-view'][data-part='item-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item-text']]:wrap-anywhere [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='branch-control']:not([data-disabled]):hover,&_[data-scope='json-tree-view'][data-part='item']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,var(--color-accent)_72%,var(--color-background))]";
|
|
5
6
|
function JsonTreeViewRoot(props) {
|
|
6
7
|
const [local, others] = splitProps(props, [
|
|
7
8
|
'asChild',
|
|
8
9
|
'children',
|
|
9
10
|
'class'
|
|
10
11
|
]);
|
|
11
|
-
return <JsonTreeView.Root asChild={local.asChild} {...others} data-slot="json-tree-view-root" class={cn("box-border flex w-full min-w-0 flex-col font-mono text-xs leading-4 text-foreground data-disabled:opacity-50 [&_[data-kind='brace']]:font-medium [&_[data-kind='brace']]:text-muted-foreground [&_[data-kind='colon']]:text-muted-foreground [&_[data-kind='constructor']]:font-medium [&_[data-kind='constructor']]:text-muted-foreground [&_[data-kind='error-stack']]:text-destructive [&_[data-kind='function-body']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='function-body']]:italic [&_[data-kind='function-type']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='function-type']]:italic [&_[data-kind='key']]:font-medium [&_[data-kind='key']]:text-[color-mix(in_oklab,theme(--color-chart-1)_72%,theme(--color-foreground))] [&_[data-kind='operator']]:text-destructive [&_[data-kind='preview'][data-type='bigint']]:text-[color-mix(in_oklab,theme(--color-chart-3)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='boolean']]:font-medium [&_[data-kind='preview'][data-type='boolean']]:text-[color-mix(in_oklab,theme(--color-chart-4)_74%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='error']]:text-destructive [&_[data-kind='preview'][data-type='function']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='null']]:font-medium [&_[data-kind='preview'][data-type='null']]:text-muted-foreground [&_[data-kind='preview'][data-type='null']]:italic [&_[data-kind='preview'][data-type='number']]:text-[color-mix(in_oklab,theme(--color-chart-3)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='string']]:text-[color-mix(in_oklab,theme(--color-success)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='undefined']]:font-medium [&_[data-kind='preview'][data-type='undefined']]:text-muted-foreground [&_[data-kind='preview'][data-type='undefined']]:italic [&_[data-kind='preview-text']]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch']]:flex [&_[data-scope='json-tree-view'][data-part='branch']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex [&_[data-scope='json-tree-view'][data-part='branch-content']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch-content']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:overflow-hidden [&_[data-scope='json-tree-view'][data-part='branch-control']]:relative [&_[data-scope='json-tree-view'][data-part='branch-control']]:z-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:box-border [&_[data-scope='json-tree-view'][data-part='branch-control']]:flex [&_[data-scope='json-tree-view'][data-part='branch-control']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:w-full [&_[data-scope='json-tree-view'][data-part='branch-control']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='branch-control']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-control']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='branch-control']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control']]:pe-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:text-start [&_[data-scope='json-tree-view'][data-part='branch-control']]:text-inherit [&_[data-scope='json-tree-view'][data-part='branch-control']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='branch-control']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control']]:outline-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:select-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:absolute [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='branch-control']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch-control'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-selected]]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:inline-flex [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:shrink-0 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:justify-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:text-[color-mix(in_oklab,theme(--color-muted-foreground)_42%,theme(--color-foreground))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-transform [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:ease-in-out motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-none [&_[data-scope='json-tree-view'][data-part='branch-indicator']_svg]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator'][data-state='open']]:rotate-90 [&_[data-scope='json-tree-view'][data-part='branch-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-text']]:wrap-anywhere [&_[data-scope='json-tree-view'][data-part='item']]:relative [&_[data-scope='json-tree-view'][data-part='item']]:z-0 [&_[data-scope='json-tree-view'][data-part='item']]:box-border [&_[data-scope='json-tree-view'][data-part='item']]:flex [&_[data-scope='json-tree-view'][data-part='item']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='item']]:w-full [&_[data-scope='json-tree-view'][data-part='item']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='item']]:items-center [&_[data-scope='json-tree-view'][data-part='item']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='item']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='item']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='item']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='item']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='item']]:pe-1 [&_[data-scope='json-tree-view'][data-part='item']]:text-start [&_[data-scope='json-tree-view'][data-part='item']]:text-inherit [&_[data-scope='json-tree-view'][data-part='item']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='item']]:duration-200 [&_[data-scope='json-tree-view'][data-part='item']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='item']]:outline-none [&_[data-scope='json-tree-view'][data-part='item']]:select-none [&_[data-scope='json-tree-view'][data-part='item']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='item']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='item']]:before:absolute [&_[data-scope='json-tree-view'][data-part='item']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='item']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='item']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='item']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='item']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='item']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='item']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='item']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='item']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='item']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='item']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='item']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='item']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='item'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='item'][data-selected]]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [&_[data-scope='json-tree-view'][data-part='item-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item-text']]:wrap-anywhere [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='branch-control']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='item']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))]", local.class)}>
|
|
12
|
+
return <JsonTreeView.Root asChild={local.asChild} {...others} data-slot="json-tree-view-root" class={cn(rootClassName, local.class)}>
|
|
12
13
|
{local.children}
|
|
13
14
|
</JsonTreeView.Root>;
|
|
14
15
|
}
|
|
@@ -18,7 +19,7 @@ function JsonTreeViewRootProvider(props) {
|
|
|
18
19
|
'children',
|
|
19
20
|
'class'
|
|
20
21
|
]);
|
|
21
|
-
return <JsonTreeView.RootProvider asChild={local.asChild} {...others} class={cn("box-border flex w-full min-w-0 flex-col font-mono text-xs leading-4 text-foreground data-disabled:opacity-50 [&_[data-kind='brace']]:font-medium [&_[data-kind='brace']]:text-muted-foreground [&_[data-kind='colon']]:text-muted-foreground [&_[data-kind='constructor']]:font-medium [&_[data-kind='constructor']]:text-muted-foreground [&_[data-kind='error-stack']]:text-destructive [&_[data-kind='function-body']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='function-body']]:italic [&_[data-kind='function-type']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='function-type']]:italic [&_[data-kind='key']]:font-medium [&_[data-kind='key']]:text-[color-mix(in_oklab,theme(--color-chart-1)_72%,theme(--color-foreground))] [&_[data-kind='operator']]:text-destructive [&_[data-kind='preview'][data-type='bigint']]:text-[color-mix(in_oklab,theme(--color-chart-3)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='boolean']]:font-medium [&_[data-kind='preview'][data-type='boolean']]:text-[color-mix(in_oklab,theme(--color-chart-4)_74%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='error']]:text-destructive [&_[data-kind='preview'][data-type='function']]:text-[color-mix(in_oklab,theme(--color-chart-5)_72%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='null']]:font-medium [&_[data-kind='preview'][data-type='null']]:text-muted-foreground [&_[data-kind='preview'][data-type='null']]:italic [&_[data-kind='preview'][data-type='number']]:text-[color-mix(in_oklab,theme(--color-chart-3)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='string']]:text-[color-mix(in_oklab,theme(--color-success)_78%,theme(--color-foreground))] [&_[data-kind='preview'][data-type='undefined']]:font-medium [&_[data-kind='preview'][data-type='undefined']]:text-muted-foreground [&_[data-kind='preview'][data-type='undefined']]:italic [&_[data-kind='preview-text']]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch']]:flex [&_[data-scope='json-tree-view'][data-part='branch']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex [&_[data-scope='json-tree-view'][data-part='branch-content']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-content']]:flex-col [&_[data-scope='json-tree-view'][data-part='branch-content']]:gap-1 [&_[data-scope='json-tree-view'][data-part='branch-content']]:overflow-hidden [&_[data-scope='json-tree-view'][data-part='branch-control']]:relative [&_[data-scope='json-tree-view'][data-part='branch-control']]:z-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:box-border [&_[data-scope='json-tree-view'][data-part='branch-control']]:flex [&_[data-scope='json-tree-view'][data-part='branch-control']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:w-full [&_[data-scope='json-tree-view'][data-part='branch-control']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='branch-control']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-control']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='branch-control']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='branch-control']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control']]:pe-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:text-start [&_[data-scope='json-tree-view'][data-part='branch-control']]:text-inherit [&_[data-scope='json-tree-view'][data-part='branch-control']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='branch-control']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control']]:outline-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:select-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:absolute [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='branch-control']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-control']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='branch-control']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='branch-control'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='branch-control'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='branch-control'][data-selected]]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:inline-flex [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:shrink-0 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:items-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:justify-center [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:text-[color-mix(in_oklab,theme(--color-muted-foreground)_42%,theme(--color-foreground))] [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-transform [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:duration-200 [&_[data-scope='json-tree-view'][data-part='branch-indicator']]:ease-in-out motion-reduce:[&_[data-scope='json-tree-view'][data-part='branch-indicator']]:transition-none [&_[data-scope='json-tree-view'][data-part='branch-indicator']_svg]:size-3 [&_[data-scope='json-tree-view'][data-part='branch-indicator'][data-state='open']]:rotate-90 [&_[data-scope='json-tree-view'][data-part='branch-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='branch-text']]:wrap-anywhere [&_[data-scope='json-tree-view'][data-part='item']]:relative [&_[data-scope='json-tree-view'][data-part='item']]:z-0 [&_[data-scope='json-tree-view'][data-part='item']]:box-border [&_[data-scope='json-tree-view'][data-part='item']]:flex [&_[data-scope='json-tree-view'][data-part='item']]:min-h-5 [&_[data-scope='json-tree-view'][data-part='item']]:w-full [&_[data-scope='json-tree-view'][data-part='item']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item']]:cursor-pointer [&_[data-scope='json-tree-view'][data-part='item']]:items-center [&_[data-scope='json-tree-view'][data-part='item']]:gap-0.5 [&_[data-scope='json-tree-view'][data-part='item']]:rounded-xs [&_[data-scope='json-tree-view'][data-part='item']]:bg-transparent [&_[data-scope='json-tree-view'][data-part='item']]:py-0.5 [&_[data-scope='json-tree-view'][data-part='item']]:ps-[calc(0.5rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='item']]:pe-1 [&_[data-scope='json-tree-view'][data-part='item']]:text-start [&_[data-scope='json-tree-view'][data-part='item']]:text-inherit [&_[data-scope='json-tree-view'][data-part='item']]:transition-[color,opacity] [&_[data-scope='json-tree-view'][data-part='item']]:duration-200 [&_[data-scope='json-tree-view'][data-part='item']]:ease-in-out [&_[data-scope='json-tree-view'][data-part='item']]:outline-none [&_[data-scope='json-tree-view'][data-part='item']]:select-none [&_[data-scope='json-tree-view'][data-part='item']]:[font:inherit] [&_[data-scope='json-tree-view'][data-part='item']]:before:pointer-events-none [&_[data-scope='json-tree-view'][data-part='item']]:before:absolute [&_[data-scope='json-tree-view'][data-part='item']]:before:inset-y-0 [&_[data-scope='json-tree-view'][data-part='item']]:before:start-[calc(0.25rem+((var(--depth,1)-1)*1rem))] [&_[data-scope='json-tree-view'][data-part='item']]:before:end-0 [&_[data-scope='json-tree-view'][data-part='item']]:before:-z-1 [&_[data-scope='json-tree-view'][data-part='item']]:before:rounded-[inherit] [&_[data-scope='json-tree-view'][data-part='item']]:before:bg-transparent [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-1 [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-transparent [&_[data-scope='json-tree-view'][data-part='item']]:before:transition-[background-color,box-shadow] [&_[data-scope='json-tree-view'][data-part='item']]:before:duration-200 [&_[data-scope='json-tree-view'][data-part='item']]:before:ease-in-out [&_[data-scope='json-tree-view'][data-part='item']]:before:content-[''] [&_[data-scope='json-tree-view'][data-part='item']]:before:ring-inset motion-reduce:[&_[data-scope='json-tree-view'][data-part='item']]:transition-none motion-reduce:[&_[data-scope='json-tree-view'][data-part='item']]:before:transition-none [&_[data-scope='json-tree-view'][data-part='item']:focus-visible]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:cursor-default [&_[data-scope='json-tree-view'][data-part='item'][data-disabled]]:text-muted-foreground [&_[data-scope='json-tree-view'][data-part='item'][data-focus]]:before:ring-ring [&_[data-scope='json-tree-view'][data-part='item'][data-selected]]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [&_[data-scope='json-tree-view'][data-part='item-text']]:min-w-0 [&_[data-scope='json-tree-view'][data-part='item-text']]:wrap-anywhere [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='branch-control']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))] [@media(hover:hover)]:[&_[data-scope='json-tree-view'][data-part='item']:not([data-disabled]):hover]:before:bg-[color-mix(in_oklab,theme(--color-accent)_72%,theme(--color-background))]", local.class)} {...others} data-slot="json-tree-view-root-provider">
|
|
22
|
+
return <JsonTreeView.RootProvider asChild={local.asChild} {...others} class={cn(rootClassName, local.class)} {...others} data-slot="json-tree-view-root-provider">
|
|
22
23
|
{local.children}
|
|
23
24
|
</JsonTreeView.RootProvider>;
|
|
24
25
|
}
|
|
@@ -15,6 +15,8 @@ type MenuRadioItemProps = ComponentProps<typeof MenuPrimitive.RadioItem> & {
|
|
|
15
15
|
};
|
|
16
16
|
type MenuRootProps = ComponentProps<typeof MenuPrimitive.Root> & OverlayPortalProps;
|
|
17
17
|
type MenuRootProviderProps = ComponentProps<typeof MenuPrimitive.RootProvider> & OverlayPortalProps;
|
|
18
|
+
declare const menuPositionerVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
19
|
+
declare const menuContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
18
20
|
declare function MenuRoot(props: MenuRootProps): import("solid-js").JSX.Element;
|
|
19
21
|
declare function MenuRootProvider(props: MenuRootProviderProps): import("solid-js").JSX.Element;
|
|
20
22
|
declare function MenuTrigger(props: ComponentProps<typeof MenuPrimitive.Trigger>): import("solid-js").JSX.Element;
|
|
@@ -71,4 +73,4 @@ declare const Menu: typeof MenuRoot & {
|
|
|
71
73
|
ItemShortcut: typeof MenuItemShortcut;
|
|
72
74
|
ItemContext: (props: MenuPrimitive.ItemContextProps) => import("solid-js").JSX.Element;
|
|
73
75
|
};
|
|
74
|
-
export { Menu, useMenu, useMenuContext, useMenuItemContext };
|
|
76
|
+
export { Menu, menuContentVariants, menuPositionerVariants, useMenu, useMenuContext, useMenuItemContext, };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
|
|
2
|
-
import { useFocusVisible } from "@ark-ui/solid";
|
|
3
2
|
import { ark } from "@ark-ui/solid/factory";
|
|
4
3
|
import { Menu, useMenu, useMenuContext, useMenuItemContext } from "@ark-ui/solid/menu";
|
|
5
4
|
import { cva } from "class-variance-authority";
|
|
@@ -29,6 +28,8 @@ const menuItemStyles = cva("relative z-0 min-h-control-sm cursor-default rounded
|
|
|
29
28
|
tone: 'default'
|
|
30
29
|
}
|
|
31
30
|
});
|
|
31
|
+
const menuPositionerVariants = cva('z-[var(--z-index)] w-[var(--positioner-width,auto)] max-w-[var(--available-width)] outline-0');
|
|
32
|
+
const menuContentVariants = cva('relative z-[calc(var(--moduix-z-popup)+var(--layer-index,0))] flex max-w-[min(20rem,var(--available-width,100vw))] min-w-[min(max(var(--reference-width,0px),12rem),var(--available-width,100vw))] origin-[var(--transform-origin)] flex-col overflow-visible rounded-md bg-popover py-1 text-popover-foreground shadow-lg outline-1 outline-border [--arrow-background:var(--color-popover)] [--arrow-size:0.625rem] data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]');
|
|
32
33
|
function MenuRoot(props) {
|
|
33
34
|
const [local, others] = splitProps(props, [
|
|
34
35
|
'children',
|
|
@@ -92,7 +93,6 @@ function MenuRootProvider(props) {
|
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
95
|
function MenuTrigger(props) {
|
|
95
|
-
const focusVisible = useFocusVisible();
|
|
96
96
|
const [local, others] = splitProps(props, [
|
|
97
97
|
'asChild',
|
|
98
98
|
'class'
|
|
@@ -101,11 +101,8 @@ function MenuTrigger(props) {
|
|
|
101
101
|
get asChild () {
|
|
102
102
|
return local.asChild;
|
|
103
103
|
},
|
|
104
|
-
get ["data-focus-visible"] () {
|
|
105
|
-
return focusVisible() ? '' : void 0;
|
|
106
|
-
},
|
|
107
104
|
get ["class"] () {
|
|
108
|
-
return cn(!local.asChild && 'inline-flex min-h-control-md cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-4 py-1 text-sm font-medium text-foreground outline-0 transition-colors duration-200 ease-in-out select-none active:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50 data-[current]:data-[state=open]:bg-muted motion-reduce:transition-none [
|
|
105
|
+
return cn(!local.asChild && 'inline-flex min-h-control-md cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-4 py-1 text-sm font-medium text-foreground outline-0 transition-colors duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring active:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50 data-[current]:data-[state=open]:bg-muted motion-reduce:transition-none [@media(hover:hover)]:hover:bg-muted', local.class);
|
|
109
106
|
}
|
|
110
107
|
}, others, {
|
|
111
108
|
"data-slot": "menu-trigger"
|
|
@@ -148,7 +145,6 @@ function MenuIndicator(props) {
|
|
|
148
145
|
}));
|
|
149
146
|
}
|
|
150
147
|
function MenuContextTrigger(props) {
|
|
151
|
-
const focusVisible = useFocusVisible();
|
|
152
148
|
const [local, others] = splitProps(props, [
|
|
153
149
|
'asChild',
|
|
154
150
|
'class'
|
|
@@ -157,11 +153,8 @@ function MenuContextTrigger(props) {
|
|
|
157
153
|
get asChild () {
|
|
158
154
|
return local.asChild;
|
|
159
155
|
},
|
|
160
|
-
get ["data-focus-visible"] () {
|
|
161
|
-
return focusVisible() ? '' : void 0;
|
|
162
|
-
},
|
|
163
156
|
get ["class"] () {
|
|
164
|
-
return cn(!local.asChild && 'inline-flex min-h-control-md cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-4 py-1 text-sm font-medium text-foreground outline-0 transition-colors duration-200 ease-in-out select-none active:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50 data-[current]:data-[state=open]:bg-muted motion-reduce:transition-none [
|
|
157
|
+
return cn(!local.asChild && 'inline-flex min-h-control-md cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-4 py-1 text-sm font-medium text-foreground outline-0 transition-colors duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring active:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50 data-[current]:data-[state=open]:bg-muted motion-reduce:transition-none [@media(hover:hover)]:hover:bg-muted', local.class);
|
|
165
158
|
}
|
|
166
159
|
}, others, {
|
|
167
160
|
"data-slot": "menu-context-trigger"
|
|
@@ -175,7 +168,7 @@ function MenuPositioner(props) {
|
|
|
175
168
|
get children () {
|
|
176
169
|
return createComponent(Menu.Positioner, mergeProps({
|
|
177
170
|
get ["class"] () {
|
|
178
|
-
return cn(
|
|
171
|
+
return cn(menuPositionerVariants(), local.class);
|
|
179
172
|
}
|
|
180
173
|
}, others, {
|
|
181
174
|
"data-slot": "menu-positioner"
|
|
@@ -194,7 +187,7 @@ function MenuContent(props) {
|
|
|
194
187
|
return local.asChild;
|
|
195
188
|
},
|
|
196
189
|
get ["class"] () {
|
|
197
|
-
return cn(
|
|
190
|
+
return cn(menuContentVariants(), local.class);
|
|
198
191
|
}
|
|
199
192
|
}, others, {
|
|
200
193
|
"data-slot": "menu-content",
|
|
@@ -212,12 +205,12 @@ function MenuViewport(props) {
|
|
|
212
205
|
get asChild () {
|
|
213
206
|
return local.asChild;
|
|
214
207
|
},
|
|
215
|
-
"data-scope": "menu",
|
|
216
|
-
"data-part": "viewport",
|
|
217
208
|
get ["class"] () {
|
|
218
209
|
return cn('flex max-h-[min(24rem,var(--available-height,100dvh))] flex-col overflow-auto', local.class);
|
|
219
210
|
}
|
|
220
211
|
}, others, {
|
|
212
|
+
"data-scope": "menu",
|
|
213
|
+
"data-part": "viewport",
|
|
221
214
|
"data-slot": "menu-viewport"
|
|
222
215
|
}));
|
|
223
216
|
}
|
|
@@ -256,9 +249,6 @@ function MenuItem(props) {
|
|
|
256
249
|
'tone'
|
|
257
250
|
]);
|
|
258
251
|
return createComponent(Menu.Item, mergeProps({
|
|
259
|
-
get ["data-tone"] () {
|
|
260
|
-
return local.tone ?? 'default';
|
|
261
|
-
},
|
|
262
252
|
get ["class"] () {
|
|
263
253
|
return cn(menuItemStyles({
|
|
264
254
|
layout: 'item',
|
|
@@ -266,6 +256,9 @@ function MenuItem(props) {
|
|
|
266
256
|
}), local.class);
|
|
267
257
|
}
|
|
268
258
|
}, others, {
|
|
259
|
+
get ["data-tone"] () {
|
|
260
|
+
return local.tone ?? 'default';
|
|
261
|
+
},
|
|
269
262
|
"data-slot": "menu-item"
|
|
270
263
|
}));
|
|
271
264
|
}
|
|
@@ -356,9 +349,6 @@ function MenuRadioItem(props) {
|
|
|
356
349
|
'indicator'
|
|
357
350
|
]);
|
|
358
351
|
return createComponent(Menu.RadioItem, mergeProps({
|
|
359
|
-
get ["data-indicator-position"] () {
|
|
360
|
-
return local.indicator ?? 'start';
|
|
361
|
-
},
|
|
362
352
|
get ["class"] () {
|
|
363
353
|
return cn(menuItemStyles({
|
|
364
354
|
layout: 'indicatorItem',
|
|
@@ -366,6 +356,9 @@ function MenuRadioItem(props) {
|
|
|
366
356
|
}), local.class);
|
|
367
357
|
}
|
|
368
358
|
}, others, {
|
|
359
|
+
get ["data-indicator-position"] () {
|
|
360
|
+
return local.indicator ?? 'start';
|
|
361
|
+
},
|
|
369
362
|
"data-slot": "menu-radio-item"
|
|
370
363
|
}));
|
|
371
364
|
}
|
|
@@ -375,9 +368,6 @@ function MenuCheckboxItem(props) {
|
|
|
375
368
|
'indicator'
|
|
376
369
|
]);
|
|
377
370
|
return createComponent(Menu.CheckboxItem, mergeProps({
|
|
378
|
-
get ["data-indicator-position"] () {
|
|
379
|
-
return local.indicator ?? 'start';
|
|
380
|
-
},
|
|
381
371
|
get ["class"] () {
|
|
382
372
|
return cn(menuItemStyles({
|
|
383
373
|
layout: 'indicatorItem',
|
|
@@ -385,6 +375,9 @@ function MenuCheckboxItem(props) {
|
|
|
385
375
|
}), local.class);
|
|
386
376
|
}
|
|
387
377
|
}, others, {
|
|
378
|
+
get ["data-indicator-position"] () {
|
|
379
|
+
return local.indicator ?? 'start';
|
|
380
|
+
},
|
|
388
381
|
"data-slot": "menu-checkbox-item"
|
|
389
382
|
}));
|
|
390
383
|
}
|
|
@@ -495,4 +488,4 @@ const Menu_Menu = Object.assign(MenuRoot, {
|
|
|
495
488
|
ItemShortcut: MenuItemShortcut,
|
|
496
489
|
ItemContext: Menu.ItemContext
|
|
497
490
|
});
|
|
498
|
-
export { Menu_Menu as Menu, useMenu, useMenuContext, useMenuItemContext };
|
|
491
|
+
export { Menu_Menu as Menu, menuContentVariants, menuPositionerVariants, useMenu, useMenuContext, useMenuItemContext };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useFocusVisible } from "@ark-ui/solid";
|
|
2
1
|
import { ark } from "@ark-ui/solid/factory";
|
|
3
2
|
import { Menu, useMenu, useMenuContext, useMenuItemContext } from "@ark-ui/solid/menu";
|
|
4
3
|
import { cva } from "class-variance-authority";
|
|
@@ -27,6 +26,8 @@ const menuItemStyles = cva("relative z-0 min-h-control-sm cursor-default rounded
|
|
|
27
26
|
tone: 'default'
|
|
28
27
|
}
|
|
29
28
|
});
|
|
29
|
+
const menuPositionerVariants = cva('z-[var(--z-index)] w-[var(--positioner-width,auto)] max-w-[var(--available-width)] outline-0');
|
|
30
|
+
const menuContentVariants = cva('relative z-[calc(var(--moduix-z-popup)+var(--layer-index,0))] flex max-w-[min(20rem,var(--available-width,100vw))] min-w-[min(max(var(--reference-width,0px),12rem),var(--available-width,100vw))] origin-[var(--transform-origin)] flex-col overflow-visible rounded-md bg-popover py-1 text-popover-foreground shadow-lg outline-1 outline-border [--arrow-background:var(--color-popover)] [--arrow-size:0.625rem] data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]');
|
|
30
31
|
function MenuRoot(props) {
|
|
31
32
|
const [local, others] = splitProps(props, [
|
|
32
33
|
'children',
|
|
@@ -56,12 +57,11 @@ function MenuRootProvider(props) {
|
|
|
56
57
|
</OverlayPortalProvider>;
|
|
57
58
|
}
|
|
58
59
|
function MenuTrigger(props) {
|
|
59
|
-
const focusVisible = useFocusVisible();
|
|
60
60
|
const [local, others] = splitProps(props, [
|
|
61
61
|
'asChild',
|
|
62
62
|
'class'
|
|
63
63
|
]);
|
|
64
|
-
return <Menu.Trigger asChild={local.asChild}
|
|
64
|
+
return <Menu.Trigger asChild={local.asChild} class={cn(!local.asChild && 'inline-flex min-h-control-md cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-4 py-1 text-sm font-medium text-foreground outline-0 transition-colors duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring active:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50 data-[current]:data-[state=open]:bg-muted motion-reduce:transition-none [@media(hover:hover)]:hover:bg-muted', local.class)} {...others} data-slot="menu-trigger"/>;
|
|
65
65
|
}
|
|
66
66
|
function MenuTriggerIcon(props) {
|
|
67
67
|
const [local, others] = splitProps(props, [
|
|
@@ -84,19 +84,18 @@ function MenuIndicator(props) {
|
|
|
84
84
|
</Menu.Indicator>;
|
|
85
85
|
}
|
|
86
86
|
function MenuContextTrigger(props) {
|
|
87
|
-
const focusVisible = useFocusVisible();
|
|
88
87
|
const [local, others] = splitProps(props, [
|
|
89
88
|
'asChild',
|
|
90
89
|
'class'
|
|
91
90
|
]);
|
|
92
|
-
return <Menu.ContextTrigger asChild={local.asChild}
|
|
91
|
+
return <Menu.ContextTrigger asChild={local.asChild} class={cn(!local.asChild && 'inline-flex min-h-control-md cursor-pointer items-center justify-center gap-2 rounded-md border border-border bg-background px-4 py-1 text-sm font-medium text-foreground outline-0 transition-colors duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring active:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50 data-[current]:data-[state=open]:bg-muted motion-reduce:transition-none [@media(hover:hover)]:hover:bg-muted', local.class)} {...others} data-slot="menu-context-trigger"/>;
|
|
93
92
|
}
|
|
94
93
|
function MenuPositioner(props) {
|
|
95
94
|
const [local, others] = splitProps(props, [
|
|
96
95
|
'class'
|
|
97
96
|
]);
|
|
98
97
|
return <OverlayPortal>
|
|
99
|
-
<Menu.Positioner class={cn(
|
|
98
|
+
<Menu.Positioner class={cn(menuPositionerVariants(), local.class)} {...others} data-slot="menu-positioner"/>
|
|
100
99
|
</OverlayPortal>;
|
|
101
100
|
}
|
|
102
101
|
function MenuContent(props) {
|
|
@@ -105,7 +104,7 @@ function MenuContent(props) {
|
|
|
105
104
|
'children',
|
|
106
105
|
'class'
|
|
107
106
|
]);
|
|
108
|
-
return <Menu.Content asChild={local.asChild} class={cn(
|
|
107
|
+
return <Menu.Content asChild={local.asChild} class={cn(menuContentVariants(), local.class)} {...others} data-slot="menu-content">
|
|
109
108
|
{local.children}
|
|
110
109
|
</Menu.Content>;
|
|
111
110
|
}
|
|
@@ -114,7 +113,7 @@ function MenuViewport(props) {
|
|
|
114
113
|
'asChild',
|
|
115
114
|
'class'
|
|
116
115
|
]);
|
|
117
|
-
return <ark.div asChild={local.asChild}
|
|
116
|
+
return <ark.div asChild={local.asChild} class={cn('flex max-h-[min(24rem,var(--available-height,100dvh))] flex-col overflow-auto', local.class)} {...others} data-scope="menu" data-part="viewport" data-slot="menu-viewport"/>;
|
|
118
117
|
}
|
|
119
118
|
function MenuArrow(props) {
|
|
120
119
|
const [local, others] = splitProps(props, [
|
|
@@ -137,10 +136,10 @@ function MenuItem(props) {
|
|
|
137
136
|
'class',
|
|
138
137
|
'tone'
|
|
139
138
|
]);
|
|
140
|
-
return <Menu.Item
|
|
139
|
+
return <Menu.Item class={cn(menuItemStyles({
|
|
141
140
|
layout: 'item',
|
|
142
141
|
tone: local.tone
|
|
143
|
-
}), local.class)} {...others} data-slot="menu-item"/>;
|
|
142
|
+
}), local.class)} {...others} data-tone={local.tone ?? 'default'} data-slot="menu-item"/>;
|
|
144
143
|
}
|
|
145
144
|
function MenuTriggerItem(props) {
|
|
146
145
|
const [local, others] = splitProps(props, [
|
|
@@ -189,20 +188,20 @@ function MenuRadioItem(props) {
|
|
|
189
188
|
'class',
|
|
190
189
|
'indicator'
|
|
191
190
|
]);
|
|
192
|
-
return <Menu.RadioItem
|
|
191
|
+
return <Menu.RadioItem class={cn(menuItemStyles({
|
|
193
192
|
layout: 'indicatorItem',
|
|
194
193
|
indicator: local.indicator ?? 'start'
|
|
195
|
-
}), local.class)} {...others} data-slot="menu-radio-item"/>;
|
|
194
|
+
}), local.class)} {...others} data-indicator-position={local.indicator ?? 'start'} data-slot="menu-radio-item"/>;
|
|
196
195
|
}
|
|
197
196
|
function MenuCheckboxItem(props) {
|
|
198
197
|
const [local, others] = splitProps(props, [
|
|
199
198
|
'class',
|
|
200
199
|
'indicator'
|
|
201
200
|
]);
|
|
202
|
-
return <Menu.CheckboxItem
|
|
201
|
+
return <Menu.CheckboxItem class={cn(menuItemStyles({
|
|
203
202
|
layout: 'indicatorItem',
|
|
204
203
|
indicator: local.indicator ?? 'start'
|
|
205
|
-
}), local.class)} {...others} data-slot="menu-checkbox-item"/>;
|
|
204
|
+
}), local.class)} {...others} data-indicator-position={local.indicator ?? 'start'} data-slot="menu-checkbox-item"/>;
|
|
206
205
|
}
|
|
207
206
|
function MenuItemIndicator(props) {
|
|
208
207
|
const [local, others] = splitProps(props, [
|
|
@@ -274,4 +273,4 @@ const Menu_Menu = Object.assign(MenuRoot, {
|
|
|
274
273
|
ItemShortcut: MenuItemShortcut,
|
|
275
274
|
ItemContext: Menu.ItemContext
|
|
276
275
|
});
|
|
277
|
-
export { Menu_Menu as Menu, useMenu, useMenuContext, useMenuItemContext };
|
|
276
|
+
export { Menu_Menu as Menu, menuContentVariants, menuPositionerVariants, useMenu, useMenuContext, useMenuItemContext };
|
|
@@ -2,7 +2,6 @@ import type { FieldSelectProps } from '@ark-ui/solid/field';
|
|
|
2
2
|
import type { JSX } from 'solid-js';
|
|
3
3
|
type NativeSelectRootProps = FieldSelectProps & {
|
|
4
4
|
controlProps?: JSX.HTMLAttributes<HTMLSpanElement>;
|
|
5
|
-
defaultValue?: FieldSelectProps['value'];
|
|
6
5
|
};
|
|
7
6
|
declare function NativeSelectRoot(props: NativeSelectRootProps): JSX.Element;
|
|
8
7
|
declare const NativeSelect: typeof NativeSelectRoot & {
|
|
@@ -4,13 +4,11 @@ import { splitProps } from "solid-js";
|
|
|
4
4
|
import { cn } from "../../internal/cn.js";
|
|
5
5
|
import { ChevronDownIcon } from "../../internal/icons/ui/Icons.js";
|
|
6
6
|
var _tmpl$ = /*#__PURE__*/ template("<span><span aria-hidden=true data-scope=native-select data-part=indicator data-slot=native-select-indicator>");
|
|
7
|
-
const NativeFieldSelect = Field.Select;
|
|
8
7
|
function NativeSelectRoot(props) {
|
|
9
8
|
const [local, others] = splitProps(props, [
|
|
10
9
|
'asChild',
|
|
11
10
|
'class',
|
|
12
|
-
'controlProps'
|
|
13
|
-
'defaultValue'
|
|
11
|
+
'controlProps'
|
|
14
12
|
]);
|
|
15
13
|
const isList = ()=>props.multiple || void 0 !== props.size && Number(props.size) > 1;
|
|
16
14
|
return (()=>{
|
|
@@ -23,7 +21,7 @@ function NativeSelectRoot(props) {
|
|
|
23
21
|
return cn('relative inline-grid w-fit max-w-full min-w-0', local.controlProps?.class);
|
|
24
22
|
}
|
|
25
23
|
}), false, true);
|
|
26
|
-
insert(_el$, createComponent(
|
|
24
|
+
insert(_el$, createComponent(Field.Select, mergeProps({
|
|
27
25
|
get asChild () {
|
|
28
26
|
return local.asChild;
|
|
29
27
|
}
|
|
@@ -33,9 +31,6 @@ function NativeSelectRoot(props) {
|
|
|
33
31
|
"data-slot": "native-select-root",
|
|
34
32
|
get ["class"] () {
|
|
35
33
|
return cn('peer/native-select box-border h-control-md w-56 max-w-full min-w-0 cursor-pointer appearance-none rounded-md border border-border bg-background ps-3 pe-11 text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,outline-color,opacity] duration-200 ease-in-out [font:inherit] focus-visible:border-ring focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:outline-destructive aria-invalid:focus-visible:outline-destructive data-disabled:pointer-events-none data-disabled:opacity-50 data-invalid:border-destructive data-invalid:outline-destructive data-invalid:focus-visible:outline-destructive motion-reduce:transition-none forced-colors:appearance-auto forced-colors:pe-3', isList() && 'h-auto appearance-auto px-3 py-2', local.class);
|
|
36
|
-
},
|
|
37
|
-
get ["prop:defaultValue"] () {
|
|
38
|
-
return local.defaultValue;
|
|
39
34
|
}
|
|
40
35
|
})), _el$2);
|
|
41
36
|
insert(_el$2, createComponent(ChevronDownIcon, {}));
|
|
@@ -2,17 +2,15 @@ import { Field } from "@ark-ui/solid/field";
|
|
|
2
2
|
import { splitProps } from "solid-js";
|
|
3
3
|
import { cn } from "../../internal/cn.jsx";
|
|
4
4
|
import { ChevronDownIcon } from "../../internal/icons/ui/Icons.jsx";
|
|
5
|
-
const NativeFieldSelect = Field.Select;
|
|
6
5
|
function NativeSelectRoot(props) {
|
|
7
6
|
const [local, others] = splitProps(props, [
|
|
8
7
|
'asChild',
|
|
9
8
|
'class',
|
|
10
|
-
'controlProps'
|
|
11
|
-
'defaultValue'
|
|
9
|
+
'controlProps'
|
|
12
10
|
]);
|
|
13
11
|
const isList = ()=>props.multiple || void 0 !== props.size && Number(props.size) > 1;
|
|
14
12
|
return <span {...local.controlProps} data-scope="native-select" data-part="control" data-slot="native-select-control" class={cn('relative inline-grid w-fit max-w-full min-w-0', local.controlProps?.class)}>
|
|
15
|
-
<
|
|
13
|
+
<Field.Select asChild={local.asChild} {...others} data-scope="field" data-part="select" data-slot="native-select-root" class={cn('peer/native-select box-border h-control-md w-56 max-w-full min-w-0 cursor-pointer appearance-none rounded-md border border-border bg-background ps-3 pe-11 text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,outline-color,opacity] duration-200 ease-in-out [font:inherit] focus-visible:border-ring focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:outline-destructive aria-invalid:focus-visible:outline-destructive data-disabled:pointer-events-none data-disabled:opacity-50 data-invalid:border-destructive data-invalid:outline-destructive data-invalid:focus-visible:outline-destructive motion-reduce:transition-none forced-colors:appearance-auto forced-colors:pe-3', isList() && 'h-auto appearance-auto px-3 py-2', local.class)}/>
|
|
16
14
|
<span aria-hidden="true" data-scope="native-select" data-part="indicator" data-slot="native-select-indicator" class={cn('pointer-events-none absolute end-2 top-1/2 inline-flex size-6 -translate-y-1/2 items-center justify-center rounded-sm bg-transparent leading-none text-muted-foreground transition-[background-color,color,opacity] duration-200 ease-in-out peer-disabled/native-select:opacity-50 peer-data-disabled/native-select:opacity-50 motion-reduce:transition-none forced-colors:hidden [&>svg]:block [&>svg]:size-4 [@media(hover:hover)]:peer-[:not([disabled]):not([data-disabled]):hover]/native-select:bg-muted [@media(hover:hover)]:peer-[:not([disabled]):not([data-disabled]):hover]/native-select:text-foreground', isList() && 'hidden')}>
|
|
17
15
|
<ChevronDownIcon/>
|
|
18
16
|
</span>
|