@pixpilot/shadcn 0.10.1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/OrContinueWithSeparator.d.ts +2 -2
- package/dist/components/ui/alert-dialog.d.ts +12 -12
- package/dist/components/ui/alert-dialog.js +0 -2
- package/dist/components/ui/alert.d.ts +4 -4
- package/dist/components/ui/alert.js +0 -1
- package/dist/components/ui/avatar.d.ts +4 -4
- package/dist/components/ui/avatar.js +0 -1
- package/dist/components/ui/badge.d.ts +2 -2
- package/dist/components/ui/badge.js +0 -1
- package/dist/components/ui/button-group.d.ts +4 -4
- package/dist/components/ui/button-group.js +0 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +0 -1
- package/dist/components/ui/calendar.d.ts +3 -3
- package/dist/components/ui/calendar.js +0 -1
- package/dist/components/ui/card.d.ts +8 -8
- package/dist/components/ui/card.js +0 -1
- package/dist/components/ui/checkbox.d.ts +2 -2
- package/dist/components/ui/checkbox.js +0 -1
- package/dist/components/ui/color-picker.d.ts +11 -11
- package/dist/components/ui/color-picker.js +0 -1
- package/dist/components/ui/command.d.ts +10 -10
- package/dist/components/ui/command.js +0 -1
- package/dist/components/ui/dialog.d.ts +11 -11
- package/dist/components/ui/dialog.js +0 -1
- package/dist/components/ui/dropdown-menu.d.ts +16 -16
- package/dist/components/ui/dropdown-menu.js +0 -1
- package/dist/components/ui/file-upload.d.ts +11 -11
- package/dist/components/ui/file-upload.js +0 -1
- package/dist/components/ui/form.d.ts +45 -0
- package/dist/components/ui/form.js +88 -0
- package/dist/components/ui/input-group.d.ts +7 -7
- package/dist/components/ui/input-group.js +0 -1
- package/dist/components/ui/input.d.ts +2 -2
- package/dist/components/ui/input.js +0 -1
- package/dist/components/ui/label.d.ts +2 -2
- package/dist/components/ui/label.js +0 -1
- package/dist/components/ui/pagination.d.ts +8 -8
- package/dist/components/ui/pagination.js +0 -2
- package/dist/components/ui/popover.d.ts +5 -5
- package/dist/components/ui/popover.js +0 -1
- package/dist/components/ui/radio-group.d.ts +3 -3
- package/dist/components/ui/radio-group.js +0 -1
- package/dist/components/ui/select.d.ts +11 -11
- package/dist/components/ui/select.js +0 -1
- package/dist/components/ui/separator.d.ts +2 -2
- package/dist/components/ui/separator.js +0 -1
- package/dist/components/ui/shadcn-io/tags/index.d.ts +9 -9
- package/dist/components/ui/shadcn-io/tags/index.js +0 -1
- package/dist/components/ui/shadcn-io/tags-input-inline/index.d.ts +7 -7
- package/dist/components/ui/sheet.d.ts +9 -9
- package/dist/components/ui/sheet.js +0 -1
- package/dist/components/ui/slider.d.ts +2 -2
- package/dist/components/ui/slider.js +0 -1
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/switch.js +0 -1
- package/dist/components/ui/tabs.d.ts +5 -5
- package/dist/components/ui/tabs.js +0 -1
- package/dist/components/ui/textarea.d.ts +2 -2
- package/dist/components/ui/textarea.js +0 -1
- package/dist/components/ui/toggle-group.d.ts +3 -3
- package/dist/components/ui/toggle-group.js +0 -1
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/components/ui/toggle.js +0 -1
- package/dist/components/ui/tooltip.d.ts +5 -5
- package/dist/components/ui/tooltip.js +0 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +3 -0
- package/dist/index.js +0 -2
- package/package.json +6 -1
- package/dist/_virtual/rolldown_runtime.cjs +0 -25
- package/dist/components/index.cjs +0 -34
- package/dist/components/index.d.cts +0 -34
- package/dist/components/index.js +0 -34
- package/dist/components/ui/OrContinueWithSeparator.cjs +0 -30
- package/dist/components/ui/OrContinueWithSeparator.d.cts +0 -11
- package/dist/components/ui/alert-dialog.cjs +0 -101
- package/dist/components/ui/alert-dialog.d.cts +0 -48
- package/dist/components/ui/alert.cjs +0 -45
- package/dist/components/ui/alert.d.cts +0 -24
- package/dist/components/ui/avatar.cjs +0 -37
- package/dist/components/ui/avatar.d.cts +0 -19
- package/dist/components/ui/badge.cjs +0 -33
- package/dist/components/ui/badge.d.cts +0 -19
- package/dist/components/ui/button-group.cjs +0 -48
- package/dist/components/ui/button-group.d.cts +0 -28
- package/dist/components/ui/button.cjs +0 -56
- package/dist/components/ui/button.d.cts +0 -21
- package/dist/components/ui/calendar.cjs +0 -113
- package/dist/components/ui/calendar.d.cts +0 -26
- package/dist/components/ui/card.cjs +0 -67
- package/dist/components/ui/card.d.cts +0 -34
- package/dist/components/ui/checkbox.cjs +0 -31
- package/dist/components/ui/checkbox.d.cts +0 -11
- package/dist/components/ui/color-picker.cjs +0 -1171
- package/dist/components/ui/color-picker.d.cts +0 -94
- package/dist/components/ui/command.cjs +0 -104
- package/dist/components/ui/command.d.cts +0 -52
- package/dist/components/ui/dialog.cjs +0 -102
- package/dist/components/ui/dialog.d.cts +0 -47
- package/dist/components/ui/dropdown-menu.cjs +0 -144
- package/dist/components/ui/dropdown-menu.d.cts +0 -77
- package/dist/components/ui/file-upload.cjs +0 -926
- package/dist/components/ui/file-upload.d.cts +0 -95
- package/dist/components/ui/index.cjs +0 -33
- package/dist/components/ui/index.d.cts +0 -33
- package/dist/components/ui/index.js +0 -33
- package/dist/components/ui/input-group.cjs +0 -90
- package/dist/components/ui/input-group.d.cts +0 -43
- package/dist/components/ui/input.cjs +0 -20
- package/dist/components/ui/input.d.cts +0 -12
- package/dist/components/ui/label.cjs +0 -21
- package/dist/components/ui/label.d.cts +0 -11
- package/dist/components/ui/pagination.cjs +0 -92
- package/dist/components/ui/pagination.d.cts +0 -40
- package/dist/components/ui/popover.cjs +0 -44
- package/dist/components/ui/popover.d.cts +0 -22
- package/dist/components/ui/radio-group.cjs +0 -36
- package/dist/components/ui/radio-group.d.cts +0 -15
- package/dist/components/ui/select.cjs +0 -116
- package/dist/components/ui/select.d.cts +0 -52
- package/dist/components/ui/separator.cjs +0 -23
- package/dist/components/ui/separator.d.cts +0 -13
- package/dist/components/ui/shadcn-io/tags/index.cjs +0 -146
- package/dist/components/ui/shadcn-io/tags/index.d.cts +0 -70
- package/dist/components/ui/shadcn-io/tags-input-inline/index.cjs +0 -66
- package/dist/components/ui/shadcn-io/tags-input-inline/index.d.cts +0 -31
- package/dist/components/ui/sheet.cjs +0 -96
- package/dist/components/ui/sheet.d.cts +0 -40
- package/dist/components/ui/slider.cjs +0 -42
- package/dist/components/ui/slider.d.cts +0 -15
- package/dist/components/ui/switch.cjs +0 -28
- package/dist/components/ui/switch.d.cts +0 -11
- package/dist/components/ui/tabs.cjs +0 -65
- package/dist/components/ui/tabs.d.cts +0 -33
- package/dist/components/ui/textarea.cjs +0 -19
- package/dist/components/ui/textarea.d.cts +0 -10
- package/dist/components/ui/toggle-group.cjs +0 -59
- package/dist/components/ui/toggle-group.d.cts +0 -30
- package/dist/components/ui/toggle.cjs +0 -45
- package/dist/components/ui/toggle.d.cts +0 -19
- package/dist/components/ui/tooltip.cjs +0 -45
- package/dist/components/ui/tooltip.d.cts +0 -23
- package/dist/components/visually-hidden-input.cjs +0 -116
- package/dist/hooks/use-as-ref.cjs +0 -16
- package/dist/hooks/use-isomorphic-layout-effect.cjs +0 -9
- package/dist/hooks/use-lazy-ref.cjs +0 -13
- package/dist/index.cjs +0 -211
- package/dist/index.d.cts +0 -37
- package/dist/lib/compose-refs.cjs +0 -44
- package/dist/lib/index.cjs +0 -1
- package/dist/lib/index.d.cts +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/utils.cjs +0 -13
- package/dist/lib/utils.d.cts +0 -6
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime136 from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ui/sheet.d.ts
|
|
6
|
-
declare function Sheet({
|
|
7
|
-
...props
|
|
8
|
-
}: React.ComponentProps<typeof SheetPrimitive.Root>): react_jsx_runtime136.JSX.Element;
|
|
9
|
-
declare function SheetTrigger({
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof SheetPrimitive.Trigger>): react_jsx_runtime136.JSX.Element;
|
|
12
|
-
declare function SheetClose({
|
|
13
|
-
...props
|
|
14
|
-
}: React.ComponentProps<typeof SheetPrimitive.Close>): react_jsx_runtime136.JSX.Element;
|
|
15
|
-
declare function SheetContent({
|
|
16
|
-
className,
|
|
17
|
-
children,
|
|
18
|
-
side,
|
|
19
|
-
...props
|
|
20
|
-
}: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
21
|
-
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
22
|
-
}): react_jsx_runtime136.JSX.Element;
|
|
23
|
-
declare function SheetHeader({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<'div'>): react_jsx_runtime136.JSX.Element;
|
|
27
|
-
declare function SheetFooter({
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<'div'>): react_jsx_runtime136.JSX.Element;
|
|
31
|
-
declare function SheetTitle({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<typeof SheetPrimitive.Title>): react_jsx_runtime136.JSX.Element;
|
|
35
|
-
declare function SheetDescription({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: React.ComponentProps<typeof SheetPrimitive.Description>): react_jsx_runtime136.JSX.Element;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
-
require('../../lib/index.cjs');
|
|
4
|
-
let react = require("react");
|
|
5
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
-
let __radix_ui_react_slider = require("@radix-ui/react-slider");
|
|
9
|
-
__radix_ui_react_slider = require_rolldown_runtime.__toESM(__radix_ui_react_slider);
|
|
10
|
-
|
|
11
|
-
//#region src/components/ui/slider.tsx
|
|
12
|
-
function Slider({ className, defaultValue, value, min = 0, max = 100,...props }) {
|
|
13
|
-
const _values = react.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
14
|
-
value,
|
|
15
|
-
defaultValue,
|
|
16
|
-
min,
|
|
17
|
-
max
|
|
18
|
-
]);
|
|
19
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_slider.Root, {
|
|
20
|
-
"data-slot": "slider",
|
|
21
|
-
defaultValue,
|
|
22
|
-
value,
|
|
23
|
-
min,
|
|
24
|
-
max,
|
|
25
|
-
className: require_utils.cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
|
|
26
|
-
...props,
|
|
27
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slider.Track, {
|
|
28
|
-
"data-slot": "slider-track",
|
|
29
|
-
className: require_utils.cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
30
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slider.Range, {
|
|
31
|
-
"data-slot": "slider-range",
|
|
32
|
-
className: require_utils.cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
33
|
-
})
|
|
34
|
-
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slider.Thumb, {
|
|
35
|
-
"data-slot": "slider-thumb",
|
|
36
|
-
className: "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
37
|
-
}, index))]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
exports.Slider = Slider;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime144 from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ui/slider.d.ts
|
|
6
|
-
declare function Slider({
|
|
7
|
-
className,
|
|
8
|
-
defaultValue,
|
|
9
|
-
value,
|
|
10
|
-
min,
|
|
11
|
-
max,
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<typeof SliderPrimitive.Root>): react_jsx_runtime144.JSX.Element;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { Slider };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
5
|
-
const require_utils = require('../../lib/utils.cjs');
|
|
6
|
-
require('../../lib/index.cjs');
|
|
7
|
-
let react = require("react");
|
|
8
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
9
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
-
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
11
|
-
let __radix_ui_react_switch = require("@radix-ui/react-switch");
|
|
12
|
-
__radix_ui_react_switch = require_rolldown_runtime.__toESM(__radix_ui_react_switch);
|
|
13
|
-
|
|
14
|
-
//#region src/components/ui/switch.tsx
|
|
15
|
-
function Switch({ className,...props }) {
|
|
16
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_switch.Root, {
|
|
17
|
-
"data-slot": "switch",
|
|
18
|
-
className: require_utils.cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
19
|
-
...props,
|
|
20
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_switch.Thumb, {
|
|
21
|
-
"data-slot": "switch-thumb",
|
|
22
|
-
className: require_utils.cn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
exports.Switch = Switch;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime145 from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ui/switch.d.ts
|
|
6
|
-
declare function Switch({
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof SwitchPrimitive.Root>): react_jsx_runtime145.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { Switch };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
-
require('../../lib/index.cjs');
|
|
4
|
-
let class_variance_authority = require("class-variance-authority");
|
|
5
|
-
class_variance_authority = require_rolldown_runtime.__toESM(class_variance_authority);
|
|
6
|
-
let react = require("react");
|
|
7
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
8
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
-
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
|
-
let __radix_ui_react_tabs = require("@radix-ui/react-tabs");
|
|
11
|
-
__radix_ui_react_tabs = require_rolldown_runtime.__toESM(__radix_ui_react_tabs);
|
|
12
|
-
|
|
13
|
-
//#region src/components/ui/tabs.tsx
|
|
14
|
-
const tabsListVariants = (0, class_variance_authority.cva)("inline-flex items-center justify-center", {
|
|
15
|
-
variants: { variant: {
|
|
16
|
-
default: "bg-muted text-muted-foreground h-9 w-fit rounded-lg p-[3px]",
|
|
17
|
-
outline: "border border-input bg-background h-9 w-fit rounded-lg p-[3px]",
|
|
18
|
-
ghost: "h-9 w-fit rounded-lg p-[3px]",
|
|
19
|
-
pill: "bg-muted text-muted-foreground h-10 w-fit rounded-full p-1"
|
|
20
|
-
} },
|
|
21
|
-
defaultVariants: { variant: "default" }
|
|
22
|
-
});
|
|
23
|
-
const tabsTriggerVariants = (0, class_variance_authority.cva)("inline-flex items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
24
|
-
variants: { variant: {
|
|
25
|
-
default: "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground h-[calc(100%-1px)] flex-1 data-[state=active]:shadow-sm",
|
|
26
|
-
outline: "data-[state=active]:bg-background data-[state=active]:border-input focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-muted-foreground data-[state=active]:text-foreground h-[calc(100%-1px)] flex-1 data-[state=active]:shadow-sm border-input",
|
|
27
|
-
ghost: "data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-muted-foreground hover:text-foreground h-[calc(100%-1px)] flex-1",
|
|
28
|
-
pill: "data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground h-[calc(100%-2px)] flex-1 rounded-full data-[state=active]:shadow-sm"
|
|
29
|
-
} },
|
|
30
|
-
defaultVariants: { variant: "default" }
|
|
31
|
-
});
|
|
32
|
-
function Tabs({ className,...props }) {
|
|
33
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.Root, {
|
|
34
|
-
"data-slot": "tabs",
|
|
35
|
-
className: require_utils.cn("flex flex-col gap-2", className),
|
|
36
|
-
...props
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function TabsList({ className, variant,...props }) {
|
|
40
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.List, {
|
|
41
|
-
"data-slot": "tabs-list",
|
|
42
|
-
className: require_utils.cn(tabsListVariants({ variant }), className),
|
|
43
|
-
...props
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function TabsTrigger({ className, variant,...props }) {
|
|
47
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.Trigger, {
|
|
48
|
-
"data-slot": "tabs-trigger",
|
|
49
|
-
className: require_utils.cn(tabsTriggerVariants({ variant }), className),
|
|
50
|
-
...props
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
function TabsContent({ className,...props }) {
|
|
54
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tabs.Content, {
|
|
55
|
-
"data-slot": "tabs-content",
|
|
56
|
-
className: require_utils.cn("flex-1 outline-none", className),
|
|
57
|
-
...props
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
exports.Tabs = Tabs;
|
|
63
|
-
exports.TabsContent = TabsContent;
|
|
64
|
-
exports.TabsList = TabsList;
|
|
65
|
-
exports.TabsTrigger = TabsTrigger;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as class_variance_authority_types5 from "class-variance-authority/types";
|
|
2
|
-
import * as react_jsx_runtime146 from "react/jsx-runtime";
|
|
3
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
6
|
-
|
|
7
|
-
//#region src/components/ui/tabs.d.ts
|
|
8
|
-
declare const tabsListVariants: (props?: ({
|
|
9
|
-
variant?: "default" | "outline" | "ghost" | "pill" | null | undefined;
|
|
10
|
-
} & class_variance_authority_types5.ClassProp) | undefined) => string;
|
|
11
|
-
declare const tabsTriggerVariants: (props?: ({
|
|
12
|
-
variant?: "default" | "outline" | "ghost" | "pill" | null | undefined;
|
|
13
|
-
} & class_variance_authority_types5.ClassProp) | undefined) => string;
|
|
14
|
-
declare function Tabs({
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime146.JSX.Element;
|
|
18
|
-
declare function TabsList({
|
|
19
|
-
className,
|
|
20
|
-
variant,
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>): react_jsx_runtime146.JSX.Element;
|
|
23
|
-
declare function TabsTrigger({
|
|
24
|
-
className,
|
|
25
|
-
variant,
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof TabsPrimitive.Trigger> & VariantProps<typeof tabsTriggerVariants>): react_jsx_runtime146.JSX.Element;
|
|
28
|
-
declare function TabsContent({
|
|
29
|
-
className,
|
|
30
|
-
...props
|
|
31
|
-
}: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime146.JSX.Element;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
-
require('../../lib/index.cjs');
|
|
4
|
-
let react = require("react");
|
|
5
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
-
|
|
9
|
-
//#region src/components/ui/textarea.tsx
|
|
10
|
-
function Textarea({ className,...props }) {
|
|
11
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
12
|
-
"data-slot": "textarea",
|
|
13
|
-
className: require_utils.cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
14
|
-
...props
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
exports.Textarea = Textarea;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime150 from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/ui/textarea.d.ts
|
|
5
|
-
declare function Textarea({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: React.ComponentProps<'textarea'>): react_jsx_runtime150.JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { Textarea };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
5
|
-
const require_utils = require('../../lib/utils.cjs');
|
|
6
|
-
require('../../lib/index.cjs');
|
|
7
|
-
const require_toggle = require('./toggle.cjs');
|
|
8
|
-
let react = require("react");
|
|
9
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
10
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
-
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
12
|
-
let __radix_ui_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
13
|
-
__radix_ui_react_toggle_group = require_rolldown_runtime.__toESM(__radix_ui_react_toggle_group);
|
|
14
|
-
|
|
15
|
-
//#region src/components/ui/toggle-group.tsx
|
|
16
|
-
const ToggleGroupContext = react.createContext({
|
|
17
|
-
size: "default",
|
|
18
|
-
variant: "default",
|
|
19
|
-
spacing: 0
|
|
20
|
-
});
|
|
21
|
-
function ToggleGroup({ className, variant, size, spacing = 0, children, ref,...props }) {
|
|
22
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_toggle_group.Root, {
|
|
23
|
-
"data-slot": "toggle-group",
|
|
24
|
-
ref,
|
|
25
|
-
"data-variant": variant,
|
|
26
|
-
"data-size": size,
|
|
27
|
-
"data-spacing": spacing,
|
|
28
|
-
style: { "--gap": spacing },
|
|
29
|
-
className: require_utils.cn("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs", className),
|
|
30
|
-
...props,
|
|
31
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleGroupContext.Provider, {
|
|
32
|
-
value: {
|
|
33
|
-
variant,
|
|
34
|
-
size,
|
|
35
|
-
spacing
|
|
36
|
-
},
|
|
37
|
-
children
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function ToggleGroupItem({ className, children, variant, size,...props }) {
|
|
42
|
-
const context = react.use(ToggleGroupContext);
|
|
43
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_toggle_group.Item, {
|
|
44
|
-
"data-slot": "toggle-group-item",
|
|
45
|
-
"data-variant": context.variant || variant,
|
|
46
|
-
"data-size": context.size || size,
|
|
47
|
-
"data-spacing": context.spacing,
|
|
48
|
-
className: require_utils.cn(require_toggle.toggleVariants({
|
|
49
|
-
variant: context.variant || variant,
|
|
50
|
-
size: context.size || size
|
|
51
|
-
}), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l", className),
|
|
52
|
-
...props,
|
|
53
|
-
children
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
//#endregion
|
|
58
|
-
exports.ToggleGroup = ToggleGroup;
|
|
59
|
-
exports.ToggleGroupItem = ToggleGroupItem;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { toggleVariants } from "./toggle.cjs";
|
|
2
|
-
import * as react_jsx_runtime152 from "react/jsx-runtime";
|
|
3
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
6
|
-
|
|
7
|
-
//#region src/components/ui/toggle-group.d.ts
|
|
8
|
-
type ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
|
|
9
|
-
spacing?: number;
|
|
10
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
11
|
-
};
|
|
12
|
-
type ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>;
|
|
13
|
-
declare function ToggleGroup({
|
|
14
|
-
className,
|
|
15
|
-
variant,
|
|
16
|
-
size,
|
|
17
|
-
spacing,
|
|
18
|
-
children,
|
|
19
|
-
ref,
|
|
20
|
-
...props
|
|
21
|
-
}: ToggleGroupProps): react_jsx_runtime152.JSX.Element;
|
|
22
|
-
declare function ToggleGroupItem({
|
|
23
|
-
className,
|
|
24
|
-
children,
|
|
25
|
-
variant,
|
|
26
|
-
size,
|
|
27
|
-
...props
|
|
28
|
-
}: ToggleGroupItemProps): react_jsx_runtime152.JSX.Element;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
-
require('../../lib/index.cjs');
|
|
4
|
-
let class_variance_authority = require("class-variance-authority");
|
|
5
|
-
class_variance_authority = require_rolldown_runtime.__toESM(class_variance_authority);
|
|
6
|
-
let react = require("react");
|
|
7
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
8
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
-
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
|
-
let __radix_ui_react_toggle = require("@radix-ui/react-toggle");
|
|
11
|
-
__radix_ui_react_toggle = require_rolldown_runtime.__toESM(__radix_ui_react_toggle);
|
|
12
|
-
|
|
13
|
-
//#region src/components/ui/toggle.tsx
|
|
14
|
-
const toggleVariants = (0, class_variance_authority.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-muted [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
default: "bg-transparent",
|
|
18
|
-
outline: "border border-input bg-transparent shadow-xs hover:bg-muted"
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
default: "h-9 px-2 min-w-9",
|
|
22
|
-
sm: "h-8 px-1.5 min-w-8",
|
|
23
|
-
lg: "h-10 px-2.5 min-w-10"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
variant: "default",
|
|
28
|
-
size: "default"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
function Toggle({ className, variant, size,...props }) {
|
|
32
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_toggle.Root, {
|
|
33
|
-
"data-slot": "toggle",
|
|
34
|
-
className: require_utils.cn(toggleVariants({
|
|
35
|
-
variant,
|
|
36
|
-
size,
|
|
37
|
-
className
|
|
38
|
-
})),
|
|
39
|
-
...props
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
exports.Toggle = Toggle;
|
|
45
|
-
exports.toggleVariants = toggleVariants;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as class_variance_authority_types7 from "class-variance-authority/types";
|
|
2
|
-
import * as react_jsx_runtime151 from "react/jsx-runtime";
|
|
3
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
6
|
-
|
|
7
|
-
//#region src/components/ui/toggle.d.ts
|
|
8
|
-
declare const toggleVariants: (props?: ({
|
|
9
|
-
variant?: "default" | "outline" | null | undefined;
|
|
10
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
11
|
-
} & class_variance_authority_types7.ClassProp) | undefined) => string;
|
|
12
|
-
declare function Toggle({
|
|
13
|
-
className,
|
|
14
|
-
variant,
|
|
15
|
-
size,
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime151.JSX.Element;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { Toggle, toggleVariants };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
-
require('../../lib/index.cjs');
|
|
4
|
-
let react = require("react");
|
|
5
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
-
let __radix_ui_react_tooltip = require("@radix-ui/react-tooltip");
|
|
9
|
-
__radix_ui_react_tooltip = require_rolldown_runtime.__toESM(__radix_ui_react_tooltip);
|
|
10
|
-
|
|
11
|
-
//#region src/components/ui/tooltip.tsx
|
|
12
|
-
function TooltipProvider({ delayDuration = 0,...props }) {
|
|
13
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Provider, {
|
|
14
|
-
"data-slot": "tooltip-provider",
|
|
15
|
-
delayDuration,
|
|
16
|
-
...props
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function Tooltip({ ...props }) {
|
|
20
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Root, {
|
|
21
|
-
"data-slot": "tooltip",
|
|
22
|
-
...props
|
|
23
|
-
}) });
|
|
24
|
-
}
|
|
25
|
-
function TooltipTrigger({ ...props }) {
|
|
26
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Trigger, {
|
|
27
|
-
"data-slot": "tooltip-trigger",
|
|
28
|
-
...props
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function TooltipContent({ className, sideOffset = 0, children,...props }) {
|
|
32
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_tooltip.Content, {
|
|
33
|
-
"data-slot": "tooltip-content",
|
|
34
|
-
sideOffset,
|
|
35
|
-
className: require_utils.cn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", className),
|
|
36
|
-
...props,
|
|
37
|
-
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_tooltip.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
|
|
38
|
-
}) });
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
//#endregion
|
|
42
|
-
exports.Tooltip = Tooltip;
|
|
43
|
-
exports.TooltipContent = TooltipContent;
|
|
44
|
-
exports.TooltipProvider = TooltipProvider;
|
|
45
|
-
exports.TooltipTrigger = TooltipTrigger;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
|
-
|
|
5
|
-
//#region src/components/ui/tooltip.d.ts
|
|
6
|
-
declare function TooltipProvider({
|
|
7
|
-
delayDuration,
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime0.JSX.Element;
|
|
10
|
-
declare function Tooltip({
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime0.JSX.Element;
|
|
13
|
-
declare function TooltipTrigger({
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime0.JSX.Element;
|
|
16
|
-
declare function TooltipContent({
|
|
17
|
-
className,
|
|
18
|
-
sideOffset,
|
|
19
|
-
children,
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime0.JSX.Element;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
5
|
-
let react = require("react");
|
|
6
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
7
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
9
|
-
|
|
10
|
-
//#region src/components/visually-hidden-input.tsx
|
|
11
|
-
function VisuallyHiddenInput(props) {
|
|
12
|
-
const { control, value, checked, bubbles = true, type = "hidden", style,...inputProps } = props;
|
|
13
|
-
const isCheckInput = react.useMemo(() => type === "checkbox" || type === "radio" || type === "switch", [type]);
|
|
14
|
-
const inputRef = react.useRef(null);
|
|
15
|
-
const prevValueRef = react.useRef({
|
|
16
|
-
value: isCheckInput ? checked : value,
|
|
17
|
-
previous: isCheckInput ? checked : value
|
|
18
|
-
});
|
|
19
|
-
const prevValue = react.useMemo(() => {
|
|
20
|
-
const currentValue = isCheckInput ? checked : value;
|
|
21
|
-
if (prevValueRef.current.value !== currentValue) {
|
|
22
|
-
prevValueRef.current.previous = prevValueRef.current.value;
|
|
23
|
-
prevValueRef.current.value = currentValue;
|
|
24
|
-
}
|
|
25
|
-
return prevValueRef.current.previous;
|
|
26
|
-
}, [
|
|
27
|
-
isCheckInput,
|
|
28
|
-
value,
|
|
29
|
-
checked
|
|
30
|
-
]);
|
|
31
|
-
const [controlSize, setControlSize] = react.useState({});
|
|
32
|
-
react.useLayoutEffect(() => {
|
|
33
|
-
if (!control) {
|
|
34
|
-
setControlSize({});
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
setControlSize({
|
|
38
|
-
width: control.offsetWidth,
|
|
39
|
-
height: control.offsetHeight
|
|
40
|
-
});
|
|
41
|
-
if (typeof window === "undefined") return;
|
|
42
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
43
|
-
if (!Array.isArray(entries) || !entries.length) return;
|
|
44
|
-
const entry = entries[0];
|
|
45
|
-
if (!entry) return;
|
|
46
|
-
let width;
|
|
47
|
-
let height;
|
|
48
|
-
if ("borderBoxSize" in entry) {
|
|
49
|
-
const borderSizeEntry = entry.borderBoxSize;
|
|
50
|
-
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
51
|
-
width = borderSize.inlineSize;
|
|
52
|
-
height = borderSize.blockSize;
|
|
53
|
-
} else {
|
|
54
|
-
width = control.offsetWidth;
|
|
55
|
-
height = control.offsetHeight;
|
|
56
|
-
}
|
|
57
|
-
setControlSize({
|
|
58
|
-
width,
|
|
59
|
-
height
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
resizeObserver.observe(control, { box: "border-box" });
|
|
63
|
-
return () => {
|
|
64
|
-
resizeObserver.disconnect();
|
|
65
|
-
};
|
|
66
|
-
}, [control]);
|
|
67
|
-
react.useEffect(() => {
|
|
68
|
-
const input = inputRef.current;
|
|
69
|
-
if (!input) return;
|
|
70
|
-
const inputProto = window.HTMLInputElement.prototype;
|
|
71
|
-
const propertyKey = isCheckInput ? "checked" : "value";
|
|
72
|
-
const eventType = isCheckInput ? "click" : "input";
|
|
73
|
-
const currentValue = isCheckInput ? checked : value;
|
|
74
|
-
const serializedCurrentValue = isCheckInput ? checked : typeof value === "object" && value !== null ? JSON.stringify(value) : value;
|
|
75
|
-
const setter = Object.getOwnPropertyDescriptor(inputProto, propertyKey)?.set;
|
|
76
|
-
if (prevValue !== currentValue && setter) {
|
|
77
|
-
const event = new Event(eventType, { bubbles });
|
|
78
|
-
setter.call(input, serializedCurrentValue);
|
|
79
|
-
input.dispatchEvent(event);
|
|
80
|
-
}
|
|
81
|
-
}, [
|
|
82
|
-
prevValue,
|
|
83
|
-
value,
|
|
84
|
-
checked,
|
|
85
|
-
bubbles,
|
|
86
|
-
isCheckInput
|
|
87
|
-
]);
|
|
88
|
-
const composedStyle = react.useMemo(() => {
|
|
89
|
-
return {
|
|
90
|
-
...style,
|
|
91
|
-
...controlSize.width !== void 0 && controlSize.height !== void 0 ? controlSize : {},
|
|
92
|
-
border: 0,
|
|
93
|
-
clip: "rect(0 0 0 0)",
|
|
94
|
-
clipPath: "inset(50%)",
|
|
95
|
-
height: "1px",
|
|
96
|
-
margin: "-1px",
|
|
97
|
-
overflow: "hidden",
|
|
98
|
-
padding: 0,
|
|
99
|
-
position: "absolute",
|
|
100
|
-
whiteSpace: "nowrap",
|
|
101
|
-
width: "1px"
|
|
102
|
-
};
|
|
103
|
-
}, [style, controlSize]);
|
|
104
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
105
|
-
type,
|
|
106
|
-
...inputProps,
|
|
107
|
-
ref: inputRef,
|
|
108
|
-
"aria-hidden": isCheckInput,
|
|
109
|
-
tabIndex: -1,
|
|
110
|
-
defaultChecked: isCheckInput ? checked : void 0,
|
|
111
|
-
style: composedStyle
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
//#endregion
|
|
116
|
-
exports.VisuallyHiddenInput = VisuallyHiddenInput;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_use_isomorphic_layout_effect = require('./use-isomorphic-layout-effect.cjs');
|
|
3
|
-
let react = require("react");
|
|
4
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
5
|
-
|
|
6
|
-
//#region src/hooks/use-as-ref.ts
|
|
7
|
-
function useAsRef(props) {
|
|
8
|
-
const ref = react.useRef(props);
|
|
9
|
-
require_use_isomorphic_layout_effect.useIsomorphicLayoutEffect(() => {
|
|
10
|
-
ref.current = props;
|
|
11
|
-
});
|
|
12
|
-
return ref;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.useAsRef = useAsRef;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let react = require("react");
|
|
3
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
4
|
-
|
|
5
|
-
//#region src/hooks/use-isomorphic-layout-effect.ts
|
|
6
|
-
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? react.useLayoutEffect : react.useEffect;
|
|
7
|
-
|
|
8
|
-
//#endregion
|
|
9
|
-
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let react = require("react");
|
|
3
|
-
react = require_rolldown_runtime.__toESM(react);
|
|
4
|
-
|
|
5
|
-
//#region src/hooks/use-lazy-ref.ts
|
|
6
|
-
function useLazyRef(fn) {
|
|
7
|
-
const ref = react.useRef(null);
|
|
8
|
-
if (ref.current === null) ref.current = fn();
|
|
9
|
-
return ref;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
exports.useLazyRef = useLazyRef;
|