@jbpark/ui-kit 5.4.5 → 5.4.7
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/Button.d.mts +8 -7
- package/dist/Button.d.mts.map +1 -1
- package/dist/Button.mjs +17 -11
- package/dist/Button.mjs.map +1 -1
- package/dist/Tag.d.mts +6 -5
- package/dist/Tag.d.mts.map +1 -1
- package/dist/Tag.mjs +8 -6
- package/dist/Tag.mjs.map +1 -1
- package/dist/components/atoms/checkbox/checkbox.mjs +1 -1
- package/dist/components/atoms/date-picker.mjs +2 -2
- package/dist/components/atoms/float-button/back-top.mjs +1 -1
- package/dist/components/atoms/input/search.mjs +2 -2
- package/dist/components/atoms/radio/group.mjs +1 -1
- package/dist/components/atoms/radio/radio.mjs +1 -1
- package/dist/components/molecules/menu/item/item.mjs +1 -1
- package/dist/components/molecules/upload.d.mts.map +1 -1
- package/dist/components/molecules/upload.mjs +4 -3
- package/dist/components/molecules/upload.mjs.map +1 -1
- package/dist/components/organisms/drawer.mjs +2 -2
- package/dist/components/organisms/imperative-stack.mjs +3 -2
- package/dist/components/organisms/imperative-stack.mjs.map +1 -1
- package/dist/components/organisms/modal.mjs +2 -2
- package/dist/components/organisms/toast.mjs +1 -1
- package/dist/components/templates/container.mjs +1 -1
- package/dist/components/templates/layout/content.mjs +1 -1
- package/dist/components/templates/layout/sider.mjs +1 -1
- package/dist/core/accordion.mjs +2 -2
- package/dist/core/badge.d.mts +1 -1
- package/dist/core/badge.mjs +1 -1
- package/dist/core/button.d.mts +2 -2
- package/dist/core/button.mjs +1 -1
- package/dist/core/calendar.mjs +1 -1
- package/dist/core/checkbox.mjs +1 -1
- package/dist/core/dialog.mjs +1 -1
- package/dist/core/label.d.mts +4 -4
- package/dist/core/label.d.mts.map +1 -1
- package/dist/core/label.mjs +5 -5
- package/dist/core/label.mjs.map +1 -1
- package/dist/core/radio-group.d.mts +5 -5
- package/dist/core/radio-group.d.mts.map +1 -1
- package/dist/core/radio-group.mjs +9 -9
- package/dist/core/radio-group.mjs.map +1 -1
- package/dist/core/select.d.mts +13 -13
- package/dist/core/select.d.mts.map +1 -1
- package/dist/core/select.mjs +20 -20
- package/dist/core/select.mjs.map +1 -1
- package/dist/core/separator.d.mts +4 -4
- package/dist/core/separator.d.mts.map +1 -1
- package/dist/core/separator.mjs +5 -5
- package/dist/core/separator.mjs.map +1 -1
- package/dist/lib/chassis.mjs +23 -0
- package/dist/lib/chassis.mjs.map +1 -0
- package/dist/providers/config/config.mjs +1 -1
- package/package.json +10 -5
package/dist/core/dialog.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
3
3
|
import { cn } from "../utils.mjs";
|
|
4
4
|
import { useConfig } from "../providers/config/context.mjs";
|
|
5
5
|
import Button from "../Button.mjs";
|
|
6
|
-
import { XIcon } from "lucide-react";
|
|
7
6
|
import "react";
|
|
7
|
+
import { XIcon } from "lucide-react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
10
10
|
//#region src/core/dialog.tsx
|
package/dist/core/label.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
3
|
declare namespace label_d_exports {
|
|
4
|
-
export { Label
|
|
4
|
+
export { Label };
|
|
5
5
|
}
|
|
6
|
-
declare function Label
|
|
6
|
+
declare function Label({ className, ...props }: React$1.ComponentProps<typeof LabelPrimitive.Root>): React$1.JSX.Element;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { Label
|
|
8
|
+
export { Label, label_d_exports };
|
|
9
9
|
//# sourceMappingURL=label.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.mts","names":[],"sources":["../../src/core/label.tsx"],"mappings":";;;;;iBAQS,
|
|
1
|
+
{"version":3,"file":"label.d.mts","names":[],"sources":["../../src/core/label.tsx"],"mappings":";;;;;iBAQS,QACP,cACG,SACF,QAAM,sBAAsB,eAAe,QAAK,QAAA,IAAA"}
|
package/dist/core/label.mjs
CHANGED
|
@@ -3,11 +3,11 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
3
3
|
import { cn } from "../utils.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
6
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
7
7
|
//#region src/core/label.tsx
|
|
8
|
-
var label_exports = /* @__PURE__ */ __exportAll({ Label: () => Label
|
|
9
|
-
function Label
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
+
var label_exports = /* @__PURE__ */ __exportAll({ Label: () => Label });
|
|
9
|
+
function Label({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
|
|
11
11
|
"data-slot": "label",
|
|
12
12
|
className: cn(`flex items-center gap-2 text-sm leading-none font-medium select-none
|
|
13
13
|
group-data-[disabled=true]:pointer-events-none
|
|
@@ -17,6 +17,6 @@ function Label$1({ className, ...props }) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Label
|
|
20
|
+
export { Label, label_exports };
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=label.mjs.map
|
package/dist/core/label.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.mjs","names":[
|
|
1
|
+
{"version":3,"file":"label.mjs","names":[],"sources":["../../src/core/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@repo/ui/utils';\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n `flex items-center gap-2 text-sm leading-none font-medium select-none\n group-data-[disabled=true]:pointer-events-none\n group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed\n peer-disabled:opacity-50`,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":";;;;;;;;AAQA,SAAS,MAAM,EACb,WACA,GAAG,SACgD;CACnD,OACE,oBAAC,eAAe,MAAhB;EACE,aAAU;EACV,WAAW,GACT;;;mCAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
3
|
declare namespace radio_group_d_exports {
|
|
4
|
-
export { RadioGroup
|
|
4
|
+
export { RadioGroup, RadioGroupItem };
|
|
5
5
|
}
|
|
6
|
-
declare function RadioGroup
|
|
7
|
-
declare function RadioGroupItem({ className, asChild, children, ...props }: React$1.ComponentProps<typeof
|
|
6
|
+
declare function RadioGroup({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Root>): React$1.JSX.Element;
|
|
7
|
+
declare function RadioGroupItem({ className, asChild, children, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Item> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}): React$1.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { RadioGroup
|
|
11
|
+
export { RadioGroup, RadioGroupItem, radio_group_d_exports };
|
|
12
12
|
//# sourceMappingURL=radio-group.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.mts","names":[],"sources":["../../src/core/radio-group.tsx"],"mappings":";;;;;iBASS,
|
|
1
|
+
{"version":3,"file":"radio-group.d.mts","names":[],"sources":["../../src/core/radio-group.tsx"],"mappings":";;;;;iBASS,aACP,cACG,SACF,QAAM,sBAAsB,oBAAoB,QAAK,QAAA,IAAA;iBAU/C,iBACP,WACA,SACA,aACG,SACF,QAAM,sBAAsB,oBAAoB;EACjD;IACD,QAAA,IAAA"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
3
3
|
import { cn } from "../utils.mjs";
|
|
4
|
-
import { CircleIcon } from "lucide-react";
|
|
5
4
|
import "react";
|
|
5
|
+
import { CircleIcon } from "lucide-react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import
|
|
7
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
8
8
|
//#region src/core/radio-group.tsx
|
|
9
9
|
var radio_group_exports = /* @__PURE__ */ __exportAll({
|
|
10
|
-
RadioGroup: () => RadioGroup
|
|
10
|
+
RadioGroup: () => RadioGroup,
|
|
11
11
|
RadioGroupItem: () => RadioGroupItem
|
|
12
12
|
});
|
|
13
|
-
function RadioGroup
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
13
|
+
function RadioGroup({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, {
|
|
15
15
|
"data-slot": "radio-group",
|
|
16
16
|
className: cn("grid gap-3", className),
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function RadioGroupItem({ className, asChild, children, ...props }) {
|
|
21
|
-
if (asChild) return /* @__PURE__ */ jsx(
|
|
21
|
+
if (asChild) return /* @__PURE__ */ jsx(RadioGroupPrimitive.Item, {
|
|
22
22
|
asChild: true,
|
|
23
23
|
"data-slot": "radio-group-item",
|
|
24
24
|
...props,
|
|
25
25
|
children
|
|
26
26
|
});
|
|
27
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
+
return /* @__PURE__ */ jsx(RadioGroupPrimitive.Item, {
|
|
28
28
|
"data-slot": "radio-group-item",
|
|
29
29
|
className: cn(`border-input text-primary focus-visible:border-ring
|
|
30
30
|
focus-visible:ring-ring/50 aria-invalid:ring-destructive/20
|
|
@@ -34,7 +34,7 @@ function RadioGroupItem({ className, asChild, children, ...props }) {
|
|
|
34
34
|
focus-visible:ring-[3px] disabled:cursor-not-allowed
|
|
35
35
|
disabled:opacity-50`, className),
|
|
36
36
|
...props,
|
|
37
|
-
children: /* @__PURE__ */ jsx(
|
|
37
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, {
|
|
38
38
|
"data-slot": "radio-group-indicator",
|
|
39
39
|
className: "relative flex items-center justify-center",
|
|
40
40
|
children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2\n -translate-x-1/2 -translate-y-1/2" })
|
|
@@ -42,6 +42,6 @@ function RadioGroupItem({ className, asChild, children, ...props }) {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
|
-
export { RadioGroup
|
|
45
|
+
export { RadioGroup, RadioGroupItem, radio_group_exports };
|
|
46
46
|
|
|
47
47
|
//# sourceMappingURL=radio-group.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.mjs","names":[
|
|
1
|
+
{"version":3,"file":"radio-group.mjs","names":[],"sources":["../../src/core/radio-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { CircleIcon } from 'lucide-react';\n\nimport { cn } from '@repo/ui/utils';\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn('grid gap-3', className)}\n {...props}\n />\n );\n}\n\nfunction RadioGroupItem({\n className,\n asChild,\n children,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item> & {\n asChild?: boolean;\n}) {\n // `asChild` hands the rendered element to `children` entirely (e.g. a\n // `Button`), so the default dot indicator doesn't apply — Radix clones\n // its own role/aria-checked/keyboard handling onto that single child\n // instead of onto its own `<button>`.\n if (asChild) {\n return (\n <RadioGroupPrimitive.Item asChild data-slot=\"radio-group-item\" {...props}>\n {children}\n </RadioGroupPrimitive.Item>\n );\n }\n\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n `border-input text-primary focus-visible:border-ring\n focus-visible:ring-ring/50 aria-invalid:ring-destructive/20\n dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\n dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border\n shadow-xs transition-[color,box-shadow] outline-none\n focus-visible:ring-[3px] disabled:cursor-not-allowed\n disabled:opacity-50`,\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <CircleIcon\n className=\"fill-primary absolute top-1/2 left-1/2 size-2\n -translate-x-1/2 -translate-y-1/2\"\n />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\nexport { RadioGroup, RadioGroupItem };\n"],"mappings":";;;;;;;;;;;;AASA,SAAS,WAAW,EAClB,WACA,GAAG,SACqD;CACxD,OACE,oBAAC,oBAAoB,MAArB;EACE,aAAU;EACV,WAAW,GAAG,cAAc,SAAS;EACrC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EACtB,WACA,SACA,UACA,GAAG,SAGF;CAKD,IAAI,SACF,OACE,oBAAC,oBAAoB,MAArB;EAA0B,SAAA;EAAQ,aAAU;EAAmB,GAAI;EAChE;CACuB,CAAA;CAI9B,OACE,oBAAC,oBAAoB,MAArB;EACE,aAAU;EACV,WAAW,GACT;;;;;;8BAOA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,oBAAoB,WAArB;GACE,aAAU;GACV,WAAU;GAEV,UAAA,oBAAC,YAAD,EACE,WAAU,+FAEX,CAAA;EAC4B,CAAA;CACP,CAAA;AAE9B"}
|
package/dist/core/select.d.mts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
3
|
declare namespace select_d_exports {
|
|
4
|
-
export { Select
|
|
4
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
5
5
|
}
|
|
6
|
-
declare function Select
|
|
7
|
-
declare function SelectGroup({ ...props }: React$1.ComponentProps<typeof
|
|
8
|
-
declare function SelectValue({ ...props }: React$1.ComponentProps<typeof
|
|
9
|
-
declare function SelectTrigger({ className, size, children, ...props }: React$1.ComponentProps<typeof
|
|
6
|
+
declare function Select({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Root>): React$1.JSX.Element;
|
|
7
|
+
declare function SelectGroup({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Group>): React$1.JSX.Element;
|
|
8
|
+
declare function SelectValue({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Value>): React$1.JSX.Element;
|
|
9
|
+
declare function SelectTrigger({ className, size, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
10
10
|
size?: 'sm' | 'default';
|
|
11
11
|
}): React$1.JSX.Element;
|
|
12
|
-
declare function SelectContent({ className, children, position, align, container, ...props }: React$1.ComponentProps<typeof
|
|
12
|
+
declare function SelectContent({ className, children, position, align, container, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Content> & {
|
|
13
13
|
container?: HTMLElement;
|
|
14
14
|
}): React$1.JSX.Element;
|
|
15
|
-
declare function SelectLabel({ className, ...props }: React$1.ComponentProps<typeof
|
|
16
|
-
declare function SelectItem({ className, children, ...props }: React$1.ComponentProps<typeof
|
|
17
|
-
declare function SelectSeparator({ className, ...props }: React$1.ComponentProps<typeof
|
|
18
|
-
declare function SelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof
|
|
19
|
-
declare function SelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof
|
|
15
|
+
declare function SelectLabel({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Label>): React$1.JSX.Element;
|
|
16
|
+
declare function SelectItem({ className, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Item>): React$1.JSX.Element;
|
|
17
|
+
declare function SelectSeparator({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Separator>): React$1.JSX.Element;
|
|
18
|
+
declare function SelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React$1.JSX.Element;
|
|
19
|
+
declare function SelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React$1.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
|
-
export { Select
|
|
21
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, select_d_exports };
|
|
22
22
|
//# sourceMappingURL=select.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.mts","names":[],"sources":["../../src/core/select.tsx"],"mappings":";;;;;iBAUS,
|
|
1
|
+
{"version":3,"file":"select.d.mts","names":[],"sources":["../../src/core/select.tsx"],"mappings":";;;;;iBAUS,YACJ,SACF,QAAM,sBAAsB,gBAAgB,QAAK,QAAA,IAAA;iBAI3C,iBACJ,SACF,QAAM,sBAAsB,gBAAgB,SAAM,QAAA,IAAA;iBAI5C,iBACJ,SACF,QAAM,sBAAsB,gBAAgB,SAAM,QAAA,IAAA;iBAI5C,gBACP,WACA,MACA,aACG,SACF,QAAM,sBAAsB,gBAAgB;EAC7C;IACD,QAAA,IAAA;iBA+BQ,gBACP,WACA,UACA,UACA,OACA,cACG,SACF,QAAM,sBAAsB,gBAAgB;EAC7C,YAAY;IACb,QAAA,IAAA;iBA4CQ,cACP,cACG,SACF,QAAM,sBAAsB,gBAAgB,SAAM,QAAA,IAAA;iBAU5C,aACP,WACA,aACG,SACF,QAAM,sBAAsB,gBAAgB,QAAK,QAAA,IAAA;iBA6B3C,kBACP,cACG,SACF,QAAM,sBAAsB,gBAAgB,aAAU,QAAA,IAAA;iBAUhD,uBACP,cACG,SACF,QAAM,sBAAsB,gBAAgB,kBAAe,QAAA,IAAA;iBAerD,yBACP,cACG,SACF,QAAM,sBAAsB,gBAAgB,oBAAiB,QAAA,IAAA"}
|
package/dist/core/select.mjs
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
3
3
|
import { cn } from "../utils.mjs";
|
|
4
4
|
import { useConfig } from "../providers/config/context.mjs";
|
|
5
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
5
|
import "react";
|
|
6
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import
|
|
8
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
9
9
|
//#region src/core/select.tsx
|
|
10
10
|
var select_exports = /* @__PURE__ */ __exportAll({
|
|
11
|
-
Select: () => Select
|
|
11
|
+
Select: () => Select,
|
|
12
12
|
SelectContent: () => SelectContent,
|
|
13
13
|
SelectGroup: () => SelectGroup,
|
|
14
14
|
SelectItem: () => SelectItem,
|
|
@@ -19,26 +19,26 @@ var select_exports = /* @__PURE__ */ __exportAll({
|
|
|
19
19
|
SelectTrigger: () => SelectTrigger,
|
|
20
20
|
SelectValue: () => SelectValue
|
|
21
21
|
});
|
|
22
|
-
function Select
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
22
|
+
function Select({ ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, {
|
|
24
24
|
"data-slot": "select",
|
|
25
25
|
...props
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
function SelectGroup({ ...props }) {
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
29
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, {
|
|
30
30
|
"data-slot": "select-group",
|
|
31
31
|
...props
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
function SelectValue({ ...props }) {
|
|
35
|
-
return /* @__PURE__ */ jsx(
|
|
35
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, {
|
|
36
36
|
"data-slot": "select-value",
|
|
37
37
|
...props
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
41
|
-
return /* @__PURE__ */ jsxs(
|
|
41
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
42
42
|
"data-slot": "select-trigger",
|
|
43
43
|
"data-size": size,
|
|
44
44
|
className: cn(`border-input data-[placeholder]:text-muted-foreground
|
|
@@ -55,7 +55,7 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
55
55
|
*:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none
|
|
56
56
|
[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`, className),
|
|
57
57
|
...props,
|
|
58
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
58
|
+
children: [children, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
59
59
|
asChild: true,
|
|
60
60
|
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
61
61
|
})]
|
|
@@ -63,9 +63,9 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
63
63
|
}
|
|
64
64
|
function SelectContent({ className, children, position = "item-aligned", align = "center", container, ...props }) {
|
|
65
65
|
const { getContainer } = useConfig();
|
|
66
|
-
return /* @__PURE__ */ jsx(
|
|
66
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, {
|
|
67
67
|
container: container ?? getContainer(),
|
|
68
|
-
children: /* @__PURE__ */ jsxs(
|
|
68
|
+
children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
|
|
69
69
|
"data-slot": "select-content",
|
|
70
70
|
className: cn(`bg-popover text-popover-foreground data-[state=open]:animate-in
|
|
71
71
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
@@ -83,7 +83,7 @@ function SelectContent({ className, children, position = "item-aligned", align =
|
|
|
83
83
|
...props,
|
|
84
84
|
children: [
|
|
85
85
|
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
86
|
-
/* @__PURE__ */ jsx(
|
|
86
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
87
87
|
className: cn("p-1", position === "popper" && `h-[var(--radix-select-trigger-height)] w-full
|
|
88
88
|
min-w-[var(--radix-select-trigger-width)] scroll-my-1`),
|
|
89
89
|
children
|
|
@@ -94,14 +94,14 @@ function SelectContent({ className, children, position = "item-aligned", align =
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
function SelectLabel({ className, ...props }) {
|
|
97
|
-
return /* @__PURE__ */ jsx(
|
|
97
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Label, {
|
|
98
98
|
"data-slot": "select-label",
|
|
99
99
|
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
100
100
|
...props
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
function SelectItem({ className, children, ...props }) {
|
|
104
|
-
return /* @__PURE__ */ jsxs(
|
|
104
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
105
105
|
"data-slot": "select-item",
|
|
106
106
|
className: cn(`focus:bg-accent focus:text-accent-foreground
|
|
107
107
|
[&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full
|
|
@@ -114,19 +114,19 @@ function SelectItem({ className, children, ...props }) {
|
|
|
114
114
|
children: [/* @__PURE__ */ jsx("span", {
|
|
115
115
|
"data-slot": "select-item-indicator",
|
|
116
116
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
117
|
-
children: /* @__PURE__ */ jsx(
|
|
118
|
-
}), /* @__PURE__ */ jsx(
|
|
117
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
118
|
+
}), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })]
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
function SelectSeparator({ className, ...props }) {
|
|
122
|
-
return /* @__PURE__ */ jsx(
|
|
122
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Separator, {
|
|
123
123
|
"data-slot": "select-separator",
|
|
124
124
|
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
125
125
|
...props
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
function SelectScrollUpButton({ className, ...props }) {
|
|
129
|
-
return /* @__PURE__ */ jsx(
|
|
129
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, {
|
|
130
130
|
"data-slot": "select-scroll-up-button",
|
|
131
131
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
132
132
|
...props,
|
|
@@ -134,7 +134,7 @@ function SelectScrollUpButton({ className, ...props }) {
|
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
function SelectScrollDownButton({ className, ...props }) {
|
|
137
|
-
return /* @__PURE__ */ jsx(
|
|
137
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, {
|
|
138
138
|
"data-slot": "select-scroll-down-button",
|
|
139
139
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
140
140
|
...props,
|
|
@@ -142,6 +142,6 @@ function SelectScrollDownButton({ className, ...props }) {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
|
-
export { Select
|
|
145
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, select_exports };
|
|
146
146
|
|
|
147
147
|
//# sourceMappingURL=select.mjs.map
|
package/dist/core/select.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.mjs","names":[
|
|
1
|
+
{"version":3,"file":"select.mjs","names":[],"sources":["../../src/core/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n `border-input data-[placeholder]:text-muted-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground\n focus-visible:border-ring focus-visible:ring-ring/50\n aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\n aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50\n flex w-fit items-center justify-between gap-2 rounded-md border\n bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs\n transition-[color,box-shadow] outline-none focus-visible:ring-[3px]\n disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9\n data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1\n *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center\n *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n container,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content> & {\n container?: HTMLElement;\n}) {\n const { getContainer } = useConfig();\n\n return (\n <SelectPrimitive.Portal container={container ?? getContainer()}>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n `bg-popover text-popover-foreground data-[state=open]:animate-in\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95\n data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2\n data-[side=left]:slide-in-from-right-2\n data-[side=right]:slide-in-from-left-2\n data-[side=top]:slide-in-from-bottom-2 relative z-50\n max-h-(--radix-select-content-available-height) min-w-[8rem]\n origin-(--radix-select-content-transform-origin) overflow-x-hidden\n overflow-y-auto rounded-md border shadow-md`,\n position === 'popper' &&\n `data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1\n data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,\n className,\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n `h-[var(--radix-select-trigger-height)] w-full\n min-w-[var(--radix-select-trigger-width)] scroll-my-1`,\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n `focus:bg-accent focus:text-accent-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full\n cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm\n outline-hidden select-none data-[disabled]:pointer-events-none\n data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\n [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex\n *:[span]:last:items-center *:[span]:last:gap-2`,\n className,\n )}\n {...props}\n >\n <span\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAUA,SAAS,OAAO,EACd,GAAG,SACiD;CACpD,OAAO,oBAAC,gBAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;AAEA,SAAS,YAAY,EACnB,GAAG,SACkD;CACrD,OAAO,oBAAC,gBAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,YAAY,EACnB,GAAG,SACkD;CACrD,OAAO,oBAAC,gBAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,UACA,GAAG,SAGF;CACD,OACE,qBAAC,gBAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT;;;;;;;;;;;;gEAaA,SACF;EACA,GAAI;EAnBN,UAAA,CAqBG,UACD,oBAAC,gBAAgB,MAAjB;GAAsB,SAAA;GACpB,UAAA,oBAAC,iBAAD,EAAiB,WAAU,oBAAqB,CAAA;EAC5B,CAAA,CACC;;AAE7B;AAEA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,gBACX,QAAQ,UACR,WACA,GAAG,SAGF;CACD,MAAM,EAAE,iBAAiB,UAAU;CAEnC,OACE,oBAAC,gBAAgB,QAAjB;EAAwB,WAAW,aAAa,aAAa;EAC3D,UAAA,qBAAC,gBAAgB,SAAjB;GACE,aAAU;GACV,WAAW,GACT;;;;;;;;;wDAUA,aAAa,YACX;6EAEF,SACF;GACU;GACH;GACP,GAAI;GApBN,UAAA;IAsBE,oBAAC,sBAAD,CAAuB,CAAA;IACvB,oBAAC,gBAAgB,UAAjB;KACE,WAAW,GACT,OACA,aAAa,YACX;oEAEJ;KAEC;IACuB,CAAA;IAC1B,oBAAC,wBAAD,CAAyB,CAAA;GACF;;CACH,CAAA;AAE5B;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;CACrD,OACE,oBAAC,gBAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,qBAAC,gBAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT;;;;;;yDAOA,SACF;EACA,GAAI;EAZN,UAAA,CAcE,oBAAC,QAAD;GACE,aAAU;GACV,WAAU;GAEV,UAAA,oBAAC,gBAAgB,eAAjB,EAAA,UACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,EACF,CAAA;EAC3B,CAAA,GACN,oBAAC,gBAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;AAEA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,oBAAC,gBAAgB,WAAjB;EACE,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAAC,gBAAgB,gBAAjB;EACE,aAAU;EACV,WAAW,GACT,wDACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,eAAD,EAAe,WAAU,SAAU,CAAA;CACL,CAAA;AAEpC;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAAC,gBAAgB,kBAAjB;EACE,aAAU;EACV,WAAW,GACT,wDACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,iBAAD,EAAiB,WAAU,SAAU,CAAA;CACL,CAAA;AAEtC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React$1 from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
3
|
declare namespace separator_d_exports {
|
|
4
|
-
export { Separator
|
|
4
|
+
export { Separator };
|
|
5
5
|
}
|
|
6
|
-
declare function Separator
|
|
6
|
+
declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof SeparatorPrimitive.Root>): React$1.JSX.Element;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { Separator
|
|
8
|
+
export { Separator, separator_d_exports };
|
|
9
9
|
//# sourceMappingURL=separator.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.d.mts","names":[],"sources":["../../src/core/separator.tsx"],"mappings":";;;;;iBAQS,
|
|
1
|
+
{"version":3,"file":"separator.d.mts","names":[],"sources":["../../src/core/separator.tsx"],"mappings":";;;;;iBAQS,YACP,WACA,aACA,eACG,SACF,QAAM,sBAAsB,mBAAmB,QAAK,QAAA,IAAA"}
|
package/dist/core/separator.mjs
CHANGED
|
@@ -3,11 +3,11 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
3
3
|
import { cn } from "../utils.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
6
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
7
7
|
//#region src/core/separator.tsx
|
|
8
|
-
var separator_exports = /* @__PURE__ */ __exportAll({ Separator: () => Separator
|
|
9
|
-
function Separator
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
+
var separator_exports = /* @__PURE__ */ __exportAll({ Separator: () => Separator });
|
|
9
|
+
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(SeparatorPrimitive.Root, {
|
|
11
11
|
"data-slot": "separator",
|
|
12
12
|
decorative,
|
|
13
13
|
orientation,
|
|
@@ -18,6 +18,6 @@ function Separator$1({ className, orientation = "horizontal", decorative = true,
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
|
-
export { Separator
|
|
21
|
+
export { Separator, separator_exports };
|
|
22
22
|
|
|
23
23
|
//# sourceMappingURL=separator.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.mjs","names":[
|
|
1
|
+
{"version":3,"file":"separator.mjs","names":[],"sources":["../../src/core/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@repo/ui/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n `bg-border shrink-0 data-[orientation=horizontal]:h-px\n data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full\n data-[orientation=vertical]:w-px`,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"mappings":";;;;;;;;AAQA,SAAS,UAAU,EACjB,WACA,cAAc,cACd,aAAa,MACb,GAAG,SACoD;CACvD,OACE,oBAAC,mBAAmB,MAApB;EACE,aAAU;EACE;EACC;EACb,WAAW,GACT;;2CAGA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "../utils.mjs";
|
|
2
|
+
//#region src/lib/chassis.ts
|
|
3
|
+
/**
|
|
4
|
+
* Shared a11y/state chassis for interactive single-element atoms (Button, Tag).
|
|
5
|
+
*
|
|
6
|
+
* Extracted from `core/button` and `core/badge`'s cva base strings during the
|
|
7
|
+
* #278 step ③ absorb (see #294 Phase 4). When an atom stops wrapping its core
|
|
8
|
+
* primitive it must carry this chassis itself — the focus ring, the
|
|
9
|
+
* `aria-invalid` treatment and the flex centering are load-bearing and have no
|
|
10
|
+
* type- or lint-level signal, so dropping them regresses silently (the #177
|
|
11
|
+
* class of bug the regression net in #300/#301 guards).
|
|
12
|
+
*
|
|
13
|
+
* Common set only. A Tag is not disableable, does not size icons and (as a
|
|
14
|
+
* non-focusable `span`) carries no `outline-none`, so those live on the Button
|
|
15
|
+
* extension in `atoms/button`, NOT here — folding them into one shared constant
|
|
16
|
+
* would push `disabled:*` onto Tag, which is semantically wrong (#301's
|
|
17
|
+
* per-component chassis finding).
|
|
18
|
+
*/
|
|
19
|
+
const INTERACTIVE_CHASSIS = cn("inline-flex items-center justify-center shrink-0", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive");
|
|
20
|
+
//#endregion
|
|
21
|
+
export { INTERACTIVE_CHASSIS };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=chassis.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chassis.mjs","names":[],"sources":["../../src/lib/chassis.ts"],"sourcesContent":["import { cn } from '@repo/ui/utils';\n\n/**\n * Shared a11y/state chassis for interactive single-element atoms (Button, Tag).\n *\n * Extracted from `core/button` and `core/badge`'s cva base strings during the\n * #278 step ③ absorb (see #294 Phase 4). When an atom stops wrapping its core\n * primitive it must carry this chassis itself — the focus ring, the\n * `aria-invalid` treatment and the flex centering are load-bearing and have no\n * type- or lint-level signal, so dropping them regresses silently (the #177\n * class of bug the regression net in #300/#301 guards).\n *\n * Common set only. A Tag is not disableable, does not size icons and (as a\n * non-focusable `span`) carries no `outline-none`, so those live on the Button\n * extension in `atoms/button`, NOT here — folding them into one shared constant\n * would push `disabled:*` onto Tag, which is semantically wrong (#301's\n * per-component chassis finding).\n */\nexport const INTERACTIVE_CHASSIS = cn(\n 'inline-flex items-center justify-center shrink-0',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,sBAAsB,GACjC,oDACA,iFACA,wGACF"}
|
|
@@ -3,8 +3,8 @@ import { cn } from "../../utils.mjs";
|
|
|
3
3
|
import { Context, DEFAULT_LOCALE, useConfig } from "./context.mjs";
|
|
4
4
|
import { registerRootConfig } from "./registry.mjs";
|
|
5
5
|
import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { DirectionProvider } from "@radix-ui/react-direction";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/providers/config/config.tsx
|
|
9
9
|
const DARK_MEDIA_QUERY = "(prefers-color-scheme: dark)";
|
|
10
10
|
const subscribeToSystemColorScheme = (callback) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbpark/ui-kit",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.7",
|
|
4
4
|
"description": "Modern React UI component library built with TypeScript, Tailwind CSS, and Radix UI. Featuring atoms, molecules, organisms and layout templates for building beautiful interfaces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -108,6 +108,10 @@
|
|
|
108
108
|
"build": "tsdown",
|
|
109
109
|
"lint": "eslint .",
|
|
110
110
|
"check-dynamic-classes": "node scripts/check-dynamic-tailwind-classes.mjs",
|
|
111
|
+
"check-api-surface": "node scripts/check-api-surface.mjs",
|
|
112
|
+
"check-preflight-reset": "node scripts/check-preflight-reset.mjs",
|
|
113
|
+
"check-ssr-smoke": "node --import ./scripts/loaders/css-stub.mjs scripts/check-ssr-smoke.mjs",
|
|
114
|
+
"check-regression-net": "pnpm run check-api-surface && pnpm run check-preflight-reset && pnpm run check-ssr-smoke",
|
|
111
115
|
"generate:component": "turbo gen react-component",
|
|
112
116
|
"check-types": "tsc -b",
|
|
113
117
|
"prepublishOnly": "node scripts/prepare-publish.mjs",
|
|
@@ -122,7 +126,9 @@
|
|
|
122
126
|
"@types/react": "19.2.18",
|
|
123
127
|
"@types/react-dom": "19.2.4",
|
|
124
128
|
"eslint": "^9.39.5",
|
|
129
|
+
"postcss": "^8.5.26",
|
|
125
130
|
"rollup-plugin-postcss": "^4.0.2",
|
|
131
|
+
"tailwindcss": "^4.3.3",
|
|
126
132
|
"tsdown": "^0.22.14",
|
|
127
133
|
"typescript": "6.0.3"
|
|
128
134
|
},
|
|
@@ -136,6 +142,9 @@
|
|
|
136
142
|
"@radix-ui/react-label": "^2.1.15",
|
|
137
143
|
"@radix-ui/react-popover": "^1.1.23",
|
|
138
144
|
"@radix-ui/react-progress": "^1.1.16",
|
|
145
|
+
"@radix-ui/react-radio-group": "^1.4.7",
|
|
146
|
+
"@radix-ui/react-select": "^2.3.7",
|
|
147
|
+
"@radix-ui/react-separator": "^1.1.15",
|
|
139
148
|
"@radix-ui/react-slot": "^1.3.3",
|
|
140
149
|
"@radix-ui/react-switch": "^1.3.7",
|
|
141
150
|
"class-variance-authority": "^0.7.1",
|
|
@@ -144,15 +153,11 @@
|
|
|
144
153
|
"gsap": "^3.15.0",
|
|
145
154
|
"lucide-react": "^1.31.0",
|
|
146
155
|
"motion": "^13.1.0",
|
|
147
|
-
"postcss": "^8.5.26",
|
|
148
|
-
"radix-ui": "^1.6.7",
|
|
149
156
|
"react-colorful": "^5.8.0",
|
|
150
157
|
"react-day-picker": "^10.0.1",
|
|
151
158
|
"react-resizable-panels": "^4.12.2",
|
|
152
159
|
"swiper": "^14.1.0",
|
|
153
160
|
"tailwind-merge": "^3.6.0",
|
|
154
|
-
"tailwindcss": "^4.3.3",
|
|
155
|
-
"uuid": "^14.0.1",
|
|
156
161
|
"vaul": "^1.1.2"
|
|
157
162
|
},
|
|
158
163
|
"peerDependencies": {
|