@oneplatformdev/ui 0.1.10-53 → 0.1.10-55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/Select/Select.d.ts.map +1 -1
- package/Select/Select.js +46 -45
- package/Select/Select.js.map +1 -1
- package/Select/Select.types.d.ts +3 -0
- package/Select/Select.types.d.ts.map +1 -1
- package/Select/SelectRoot.d.ts.map +1 -1
- package/Select/SelectRoot.js +3 -2
- package/Select/SelectRoot.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## 0.1.10-55 (2025-10-13)
|
2
|
+
|
3
|
+
### 🧱 Updated Dependencies
|
4
|
+
|
5
|
+
- Updated @oneplatformdev/utils to 0.1.1-104
|
6
|
+
- Updated @oneplatformdev/hooks to 0.1.0-90
|
7
|
+
- Updated @oneplatformdev/tokens to 0.0.1-77
|
8
|
+
|
9
|
+
## 0.1.10-54 (2025-10-13)
|
10
|
+
|
11
|
+
### 🧱 Updated Dependencies
|
12
|
+
|
13
|
+
- Updated @oneplatformdev/utils to 0.1.1-103
|
14
|
+
- Updated @oneplatformdev/hooks to 0.1.0-89
|
15
|
+
- Updated @oneplatformdev/tokens to 0.0.1-76
|
16
|
+
|
1
17
|
## 0.1.10-53 (2025-10-06)
|
2
18
|
|
3
19
|
### 🧱 Updated Dependencies
|
package/Select/Select.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,EAIL,WAAW,EAIZ,MAAM,WAAW,CAAC;AAsHnB,eAAO,MAAM,MAAM,GAAI,gBAAgB,EACrC,OAAO,WAAW,CAAC,gBAAgB,CAAC,
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,EAIL,WAAW,EAIZ,MAAM,WAAW,CAAC;AAsHnB,eAAO,MAAM,MAAM,GAAI,gBAAgB,EACrC,OAAO,WAAW,CAAC,gBAAgB,CAAC,4CAwCrC,CAAC"}
|
package/Select/Select.js
CHANGED
@@ -1,77 +1,78 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { createElement as
|
1
|
+
import { jsxs as s, jsx as r, Fragment as h } from "react/jsx-runtime";
|
2
|
+
import { createElement as f, isValidElement as v } from "react";
|
3
3
|
import { Button as x } from "../Button/Button.js";
|
4
4
|
import "../Button/buttonVariants.js";
|
5
|
-
import { SelectRoot as S, SelectContent as y, SelectTrigger as b, SelectValue as C, SelectItem as
|
5
|
+
import { SelectRoot as S, SelectContent as y, SelectTrigger as b, SelectValue as C, SelectItem as p } from "./SelectRoot.js";
|
6
6
|
import { isValidReactElement as R } from "@oneplatformdev/utils";
|
7
|
-
const
|
8
|
-
const { placeholder:
|
9
|
-
return e && typeof e == "function" && R(e(
|
10
|
-
},
|
11
|
-
const { children:
|
12
|
-
return /* @__PURE__ */
|
13
|
-
|
7
|
+
const P = (t) => {
|
8
|
+
const { placeholder: n, renderTrigger: e, slotProps: o } = t, l = /* @__PURE__ */ r(b, { ...o?.triggerProps || {}, children: /* @__PURE__ */ r(C, { placeholder: n }) });
|
9
|
+
return e && typeof e == "function" && R(e(t, l)) ? e(t, l) : l;
|
10
|
+
}, d = (t) => {
|
11
|
+
const { children: n, option: e, deep: o = 0 } = t;
|
12
|
+
return /* @__PURE__ */ s(
|
13
|
+
p,
|
14
14
|
{
|
15
15
|
value: e.value,
|
16
16
|
disabled: e.disabled,
|
17
17
|
className: "cursor-pointer",
|
18
18
|
style: { paddingLeft: `calc(8px + ${(o || 0) * 8}px)` },
|
19
19
|
children: [
|
20
|
-
!
|
21
|
-
|
20
|
+
!n && e.label,
|
21
|
+
n && /* @__PURE__ */ r(h, { children: typeof n == "function" ? n({ ...t }) : n })
|
22
22
|
]
|
23
23
|
},
|
24
24
|
e.value
|
25
25
|
);
|
26
|
-
},
|
27
|
-
const { renderOption:
|
28
|
-
return
|
29
|
-
|
26
|
+
}, g = (t) => {
|
27
|
+
const { renderOption: n, option: e, index: o, options: l, deep: u = 0, ...i } = t;
|
28
|
+
return n && typeof n == "function" && v(
|
29
|
+
n(
|
30
30
|
e,
|
31
31
|
o,
|
32
32
|
l,
|
33
|
-
{ ...
|
34
|
-
/* @__PURE__ */ r(
|
33
|
+
{ ...i, options: l },
|
34
|
+
/* @__PURE__ */ r(d, { ...t })
|
35
35
|
)
|
36
|
-
) ? /* @__PURE__ */ r(
|
36
|
+
) ? /* @__PURE__ */ r(p, { value: e.value, children: n(
|
37
37
|
e,
|
38
38
|
o,
|
39
39
|
l,
|
40
|
-
{ ...
|
41
|
-
/* @__PURE__ */ r(
|
42
|
-
) }, e.value) : e.children?.length ? /* @__PURE__ */
|
40
|
+
{ ...i, options: l },
|
41
|
+
/* @__PURE__ */ r(d, { ...t })
|
42
|
+
) }, e.value) : e.children?.length ? /* @__PURE__ */ s(
|
43
43
|
"div",
|
44
44
|
{
|
45
45
|
className: "flex flex-col gap-1 truncate line-clamp-2",
|
46
46
|
children: [
|
47
|
-
/* @__PURE__ */ r(
|
48
|
-
e.children?.map((
|
49
|
-
|
47
|
+
/* @__PURE__ */ r(d, { ...t }),
|
48
|
+
e.children?.map((a, c, m) => /* @__PURE__ */ f(
|
49
|
+
g,
|
50
50
|
{
|
51
|
-
...
|
52
|
-
key:
|
53
|
-
option:
|
54
|
-
options:
|
55
|
-
index:
|
51
|
+
...t,
|
52
|
+
key: a.value,
|
53
|
+
option: a,
|
54
|
+
options: m,
|
55
|
+
index: c,
|
56
56
|
deep: (u || 0) + 1
|
57
57
|
}
|
58
58
|
))
|
59
59
|
]
|
60
60
|
},
|
61
61
|
e.value
|
62
|
-
) : /* @__PURE__ */ r(
|
63
|
-
},
|
62
|
+
) : /* @__PURE__ */ r(d, { ...t });
|
63
|
+
}, T = (t) => {
|
64
64
|
const {
|
65
|
-
value:
|
65
|
+
value: n,
|
66
66
|
options: e,
|
67
67
|
onChange: o,
|
68
68
|
nullable: l = !1,
|
69
69
|
clearLabel: u = "Clear",
|
70
|
-
disabled:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
/* @__PURE__ */
|
70
|
+
disabled: i,
|
71
|
+
slotProps: a
|
72
|
+
} = t;
|
73
|
+
return /* @__PURE__ */ s(S, { value: n, onValueChange: o, disabled: i, children: [
|
74
|
+
/* @__PURE__ */ r(P, { ...t }),
|
75
|
+
/* @__PURE__ */ s(y, { ...a?.selectProps || {}, children: [
|
75
76
|
l && /* @__PURE__ */ r(
|
76
77
|
x,
|
77
78
|
{
|
@@ -84,13 +85,13 @@ const V = (n) => {
|
|
84
85
|
children: u
|
85
86
|
}
|
86
87
|
),
|
87
|
-
e.map((
|
88
|
-
|
88
|
+
e.map((c, m) => /* @__PURE__ */ f(
|
89
|
+
g,
|
89
90
|
{
|
90
|
-
...
|
91
|
-
key:
|
92
|
-
option:
|
93
|
-
index:
|
91
|
+
...t,
|
92
|
+
key: c.value,
|
93
|
+
option: c,
|
94
|
+
index: m,
|
94
95
|
deep: 0
|
95
96
|
}
|
96
97
|
))
|
@@ -98,6 +99,6 @@ const V = (n) => {
|
|
98
99
|
] });
|
99
100
|
};
|
100
101
|
export {
|
101
|
-
|
102
|
+
T as Select
|
102
103
|
};
|
103
104
|
//# sourceMappingURL=Select.js.map
|
package/Select/Select.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../src/Select/Select.tsx"],"sourcesContent":["import { isValidElement, ReactNode } from 'react';\n\nimport { Button } from '../Button';\nimport {\n SelectContent,\n SelectItem,\n SelectOption,\n SelectProps,\n SelectRoot,\n SelectTrigger,\n SelectValue,\n} from '../Select';\nimport { isValidReactElement } from '@oneplatformdev/utils';\n\nconst RenderSelectTrigger = <ExtendOptionData,>(\n props: SelectProps<ExtendOptionData>\n) => {\n const { placeholder, renderTrigger, slotProps } = props;\n const defaultComponent = (\n <SelectTrigger {...(slotProps?.triggerProps || {})}>\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n );\n\n if (\n Boolean(renderTrigger) &&\n typeof renderTrigger === 'function' &&\n isValidReactElement(renderTrigger(props, defaultComponent))\n ) {\n return renderTrigger(props, defaultComponent);\n }\n\n return defaultComponent;\n};\n\nconst DefaultRenderSelectOption = <ExtendOptionData,>(\n props: SelectProps<ExtendOptionData> & {\n option: SelectOption<ExtendOptionData>;\n index: number;\n deep?: number;\n children?: ((params: SelectProps<ExtendOptionData> & {\n option: SelectOption<ExtendOptionData>;\n index: number;\n }) => ReactNode) | ReactNode;\n }\n) => {\n const { children, option, deep = 0 } = props;\n\n return (\n <SelectItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n className='cursor-pointer'\n style={{ paddingLeft: `calc(8px + ${(deep || 0) * 8}px)` }}\n >\n {!children && option.label}\n {children && (\n <>\n {typeof children === 'function'\n ? children({ ...props })\n : children\n }\n </>\n )}\n </SelectItem>\n )\n};\n\nconst RenderSelectOption = <ExtendOptionData,>(\n props: SelectProps<ExtendOptionData> & {\n option: SelectOption<ExtendOptionData>;\n index: number;\n deep?: number;\n }\n) => {\n const { renderOption, option, index, options, deep = 0, ...rest } = props;\n\n if (\n Boolean(renderOption) &&\n typeof renderOption === 'function' &&\n isValidElement(\n renderOption(\n option,\n index,\n options,\n { ...rest, options },\n <DefaultRenderSelectOption {...props} />\n )\n )\n ) {\n return (\n <SelectItem key={option.value} value={option.value}>\n {renderOption(\n option,\n index,\n options,\n { ...rest, options },\n <DefaultRenderSelectOption {...props} />\n )}\n </SelectItem>\n );\n }\n\n if(!option.children?.length) {\n return <DefaultRenderSelectOption {...props} />;\n }\n\n return (\n <div\n key={option.value}\n className=\"flex flex-col gap-1 truncate line-clamp-2\"\n >\n <DefaultRenderSelectOption {...props} />\n {option.children?.map((child, idx, arr) => (\n <RenderSelectOption\n {...props}\n key={child.value}\n option={child}\n options={arr}\n index={idx}\n deep={(deep || 0) + 1}\n />\n ))}\n </div>\n )\n};\n\n// TODO: add description\nexport const Select = <ExtendOptionData,>(\n props: SelectProps<ExtendOptionData>\n) => {\n const {\n value,\n options,\n onChange,\n nullable = false,\n clearLabel = 'Clear',\n disabled,\n } = props;\n\n return (\n <SelectRoot value={value} onValueChange={onChange} disabled={disabled}>\n <RenderSelectTrigger {...props} />\n <SelectContent>\n {nullable && (\n <Button\n className=\"w-full px-2\"\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => {\n onChange?.('');\n }}\n >\n {clearLabel}\n </Button>\n )}\n {options.map((option, index) => (\n <RenderSelectOption\n {...props}\n key={option.value}\n option={option}\n index={index}\n deep={0}\n />\n ))}\n </SelectContent>\n </SelectRoot>\n );\n};\n"],"names":["RenderSelectTrigger","props","placeholder","renderTrigger","slotProps","defaultComponent","jsx","SelectTrigger","SelectValue","isValidReactElement","DefaultRenderSelectOption","children","option","deep","jsxs","SelectItem","Fragment","RenderSelectOption","renderOption","index","options","rest","isValidElement","child","idx","arr","createElement","Select","value","onChange","nullable","clearLabel","disabled","SelectRoot","SelectContent","Button"],"mappings":";;;;;;AAcA,MAAMA,IAAsB,CAC1BC,MACG;AACH,QAAM,EAAE,aAAAC,GAAa,eAAAC,GAAe,WAAAC,EAAA,IAAcH,GAC5CI,IACJ,gBAAAC,EAACC,GAAA,EAAe,GAAIH,GAAW,gBAAgB,IAC7C,UAAA,gBAAAE,EAACE,GAAA,EAAY,aAAAN,EAAA,CAA0B,EAAA,CACzC;AAGF,SACUC,KACR,OAAOA,KAAkB,cACzBM,EAAoBN,EAAcF,GAAOI,CAAgB,CAAC,IAEnDF,EAAcF,GAAOI,CAAgB,IAGvCA;AACT,GAEMK,IAA4B,CAChCT,MASG;AACH,QAAM,EAAE,UAAAU,GAAU,QAAAC,GAAQ,MAAAC,IAAO,MAAMZ;AAEvC,SACE,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MAEC,OAAOH,EAAO;AAAA,M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,YACR,SAASE;AAAA,YACT,OAAOD;AAAA,YACP,OAAOX,KAAQ,KAAK;AAAA,UAAA;AAAA,QAAA,CAEvB;AAAA,MAAA;AAAA,IAAA;AAAA,IAbID,EAAO;AAAA,EAAA,IALP,gBAAAN,EAACI,GAAA,EAA2B,GAAGT,EAAA,CAAO;AAqBjD,GAGa0B,IAAS,CACpB1B,MACG;AACH,QAAM;AAAA,IACJ,OAAA2B;AAAA,IACA,SAAAR;AAAA,IACA,UAAAS;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,YAAAC,IAAa;AAAA,IACb,UAAAC;AAAA,EAAA,
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../src/Select/Select.tsx"],"sourcesContent":["import { isValidElement, ReactNode } from 'react';\n\nimport { Button } from '../Button';\nimport {\n SelectContent,\n SelectItem,\n SelectOption,\n SelectProps,\n SelectRoot,\n SelectTrigger,\n SelectValue,\n} from '../Select';\nimport { isValidReactElement } from '@oneplatformdev/utils';\n\nconst RenderSelectTrigger = <ExtendOptionData,>(\n props: SelectProps<ExtendOptionData>\n) => {\n const { placeholder, renderTrigger, slotProps } = props;\n const defaultComponent = (\n <SelectTrigger {...(slotProps?.triggerProps || {})}>\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n );\n\n if (\n Boolean(renderTrigger) &&\n typeof renderTrigger === 'function' &&\n isValidReactElement(renderTrigger(props, defaultComponent))\n ) {\n return renderTrigger(props, defaultComponent);\n }\n\n return defaultComponent;\n};\n\nconst DefaultRenderSelectOption = <ExtendOptionData,>(\n props: SelectProps<ExtendOptionData> & {\n option: SelectOption<ExtendOptionData>;\n index: number;\n deep?: number;\n children?: ((params: SelectProps<ExtendOptionData> & {\n option: SelectOption<ExtendOptionData>;\n index: number;\n }) => ReactNode) | ReactNode;\n }\n) => {\n const { children, option, deep = 0 } = props;\n\n return (\n <SelectItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n className='cursor-pointer'\n style={{ paddingLeft: `calc(8px + ${(deep || 0) * 8}px)` }}\n >\n {!children && option.label}\n {children && (\n <>\n {typeof children === 'function'\n ? children({ ...props })\n : children\n }\n </>\n )}\n </SelectItem>\n )\n};\n\nconst RenderSelectOption = <ExtendOptionData,>(\n props: SelectProps<ExtendOptionData> & {\n option: SelectOption<ExtendOptionData>;\n index: number;\n deep?: number;\n }\n) => {\n const { renderOption, option, index, options, deep = 0, ...rest } = props;\n\n if (\n Boolean(renderOption) &&\n typeof renderOption === 'function' &&\n isValidElement(\n renderOption(\n option,\n index,\n options,\n { ...rest, options },\n <DefaultRenderSelectOption {...props} />\n )\n )\n ) {\n return (\n <SelectItem key={option.value} value={option.value}>\n {renderOption(\n option,\n index,\n options,\n { ...rest, options },\n <DefaultRenderSelectOption {...props} />\n )}\n </SelectItem>\n );\n }\n\n if(!option.children?.length) {\n return <DefaultRenderSelectOption {...props} />;\n }\n\n return (\n <div\n key={option.value}\n className=\"flex flex-col gap-1 truncate line-clamp-2\"\n >\n <DefaultRenderSelectOption {...props} />\n {option.children?.map((child, idx, arr) => (\n <RenderSelectOption\n {...props}\n key={child.value}\n option={child}\n options={arr}\n index={idx}\n deep={(deep || 0) + 1}\n />\n ))}\n </div>\n )\n};\n\n// TODO: add description\nexport const Select = <ExtendOptionData,>(\n props: SelectProps<ExtendOptionData>\n) => {\n const {\n value,\n options,\n onChange,\n nullable = false,\n clearLabel = 'Clear',\n disabled,\n slotProps,\n } = props;\n\n return (\n <SelectRoot value={value} onValueChange={onChange} disabled={disabled}>\n <RenderSelectTrigger {...props} />\n <SelectContent {...(slotProps?.selectProps || {})}>\n {nullable && (\n <Button\n className=\"w-full px-2\"\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => {\n onChange?.('');\n }}\n >\n {clearLabel}\n </Button>\n )}\n {options.map((option, index) => (\n <RenderSelectOption\n {...props}\n key={option.value}\n option={option}\n index={index}\n deep={0}\n />\n ))}\n </SelectContent>\n </SelectRoot>\n );\n};\n"],"names":["RenderSelectTrigger","props","placeholder","renderTrigger","slotProps","defaultComponent","jsx","SelectTrigger","SelectValue","isValidReactElement","DefaultRenderSelectOption","children","option","deep","jsxs","SelectItem","Fragment","RenderSelectOption","renderOption","index","options","rest","isValidElement","child","idx","arr","createElement","Select","value","onChange","nullable","clearLabel","disabled","SelectRoot","SelectContent","Button"],"mappings":";;;;;;AAcA,MAAMA,IAAsB,CAC1BC,MACG;AACH,QAAM,EAAE,aAAAC,GAAa,eAAAC,GAAe,WAAAC,EAAA,IAAcH,GAC5CI,IACJ,gBAAAC,EAACC,GAAA,EAAe,GAAIH,GAAW,gBAAgB,IAC7C,UAAA,gBAAAE,EAACE,GAAA,EAAY,aAAAN,EAAA,CAA0B,EAAA,CACzC;AAGF,SACUC,KACR,OAAOA,KAAkB,cACzBM,EAAoBN,EAAcF,GAAOI,CAAgB,CAAC,IAEnDF,EAAcF,GAAOI,CAAgB,IAGvCA;AACT,GAEMK,IAA4B,CAChCT,MASG;AACH,QAAM,EAAE,UAAAU,GAAU,QAAAC,GAAQ,MAAAC,IAAO,MAAMZ;AAEvC,SACE,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MAEC,OAAOH,EAAO;AAAA,MACd,UAAUA,EAAO;AAAA,MACjB,WAAU;AAAA,MACV,OAAO,EAAE,aAAa,eAAeC,KAAQ,KAAK,CAAC,MAAA;AAAA,MAElD,UAAA;AAAA,QAAA,CAACF,KAAYC,EAAO;AAAA,QACpBD,KACC,gBAAAL,EAAAU,GAAA,EACG,UAAA,OAAOL,KAAa,aACjBA,EAAS,EAAE,GAAGV,EAAA,CAAO,IACrBU,EAAA,CAEN;AAAA,MAAA;AAAA,IAAA;AAAA,IAbGC,EAAO;AAAA,EAAA;AAiBlB,GAEMK,IAAqB,CACzBhB,MAKG;AACH,QAAM,EAAE,cAAAiB,GAAc,QAAAN,GAAQ,OAAAO,GAAO,SAAAC,GAAS,MAAAP,IAAO,GAAG,GAAGQ,EAAA,IAASpB;AAEpE,SACUiB,KACR,OAAOA,KAAiB,cACxBI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EAACN,GAAA,EAAqB,GAAGC,GAAO;AAAA,sBAC/BiC,GAAA,EAAe,GAAI9B,GAAW,eAAe,CAAA,GAC3C,UAAA;AAAA,MAAA0B,KACC,gBAAAxB;AAAA,QAAC6B;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,SAAS,MAAM;AACb,YAAAN,IAAW,EAAE;AAAA,UACf;AAAA,UAEC,UAAAE;AAAA,QAAA;AAAA,MAAA;AAAA,MAGJX,EAAQ,IAAI,CAACR,GAAQO,MACpB,gBAAAO;AAAA,QAACT;AAAA,QAAA;AAAA,UACE,GAAGhB;AAAA,UACJ,KAAKW,EAAO;AAAA,UACZ,QAAAA;AAAA,UACA,OAAAO;AAAA,UACA,MAAM;AAAA,QAAA;AAAA,MAAA,CAET;AAAA,IAAA,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
|
package/Select/Select.types.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
2
|
+
import { SelectContent } from './SelectRoot';
|
2
3
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
3
4
|
export interface SelectOption<ExtendOptionData = unknown> {
|
4
5
|
value: string;
|
@@ -32,6 +33,8 @@ export interface SelectProps<ExtendOptionData> {
|
|
32
33
|
slotProps?: {
|
33
34
|
/** Select Default Trigger Props */
|
34
35
|
triggerProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>;
|
36
|
+
/** Select Content Props */
|
37
|
+
selectProps?: ComponentPropsWithoutRef<typeof SelectContent>;
|
35
38
|
};
|
36
39
|
}
|
37
40
|
//# sourceMappingURL=Select.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.types.d.ts","sourceRoot":"","sources":["../../src/Select/Select.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC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A8B7E;AAED,iBAAS,WAAW,CAAC,EACE,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,UAAU,CAAC,EACE,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAkBvE;AAED,iBAAS,eAAe,CAAC,EACE,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,2CAQjF;AAED,iBAAS,oBAAoB,CAAC,EACE,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,cAAc,CAAC,2CAa3F;AAED,iBAAS,sBAAsB,CAAC,EACE,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,2CAa/F;AAED,OAAO,EACL,UAAU,EACV,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,EACX,eAAe,GAChB,CAAA"}
|
package/Select/SelectRoot.js
CHANGED
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "@radix-ui/react-select";
|
3
3
|
import { CheckIcon as c, ChevronDownIcon as i, ChevronUpIcon as u } from "lucide-react";
|
4
4
|
import { cn as s } from "@oneplatformdev/utils";
|
5
|
-
function
|
5
|
+
function v({
|
6
6
|
...e
|
7
7
|
}) {
|
8
8
|
return /* @__PURE__ */ t(a.Root, { "data-slot": "select", ...e });
|
@@ -54,6 +54,7 @@ function y({
|
|
54
54
|
className: s(
|
55
55
|
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
56
56
|
o === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
57
|
+
"p-1 rounded-xl shadow-md",
|
57
58
|
e
|
58
59
|
),
|
59
60
|
position: o,
|
@@ -163,7 +164,7 @@ export {
|
|
163
164
|
z as SelectItem,
|
164
165
|
S as SelectLabel,
|
165
166
|
a as SelectPrimitive,
|
166
|
-
|
167
|
+
v as SelectRoot,
|
167
168
|
m as SelectScrollDownButton,
|
168
169
|
p as SelectScrollUpButton,
|
169
170
|
N as SelectSeparator,
|
package/Select/SelectRoot.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SelectRoot.js","sources":["../../src/Select/SelectRoot.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction SelectRoot({\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 [&_svg:not([class*='text-'])]: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 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_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 = \"popper\",\n align = \"center\",\n ...props\n }: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 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 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 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\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 SelectRoot,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n SelectPrimitive,\n}\n"],"names":["SelectRoot","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","size","children","jsxs","cn","jsx","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":";;;;AAQA,SAASA,EAAW;AAAA,EACF,GAAGC;AACL,GAAsD;AACpE,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAY;AAAA,EACE,GAAGF;AACL,GAAuD;AAC1E,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASG,EAAY;AAAA,EACE,GAAGH;AACL,GAAuD;AAC1E,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASI,EAAc;AAAA,EACE,WAAAC;AAAA,EACA,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AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWQ;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAA,gBAAAU,EAACC,GAAA,EAAgB,WAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAG1C;"}
|
1
|
+
{"version":3,"file":"SelectRoot.js","sources":["../../src/Select/SelectRoot.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction SelectRoot({\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 [&_svg:not([class*='text-'])]: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 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_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 = \"popper\",\n align = \"center\",\n ...props\n }: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n 'p-1 rounded-xl shadow-md',\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 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 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\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 SelectRoot,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n SelectPrimitive,\n}\n"],"names":["SelectRoot","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","size","children","jsxs","cn","jsx","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":";;;;AAQA,SAASA,EAAW;AAAA,EACF,GAAGC;AACL,GAAsD;AACpE,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAY;AAAA,EACE,GAAGF;AACL,GAAuD;AAC1E,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASG,EAAY;AAAA,EACE,GAAGH;AACL,GAAuD;AAC1E,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASI,EAAc;AAAA,EACE,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,GAAGP;AACL,GAEpB;AACD,SACE,gBAAAQ;AAAA,IAACP,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,aAAWK;AAAA,MACX,WAAWG;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEH,UAAA;AAAA,QAAAO;AAAA,QACD,gBAAAG,EAACT,EAAgB,MAAhB,EAAqB,SAAO,IAC3B,UAAA,gBAAAS,EAACC,GAAA,EAAgB,WAAU,oBAAA,CAAoB,EAAA,CACjD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,SA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AAgB,eAAhB,EACC,UAAA,gBAAAS,EAACS,GAAA,EAAU,WAAU,SAAA,CAAS,EAAA,CAChC,GACF;AAAA,QACA,gBAAAT,EAACT,EAAgB,UAAhB,EAA0B,UAAAM,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1C;AAEA,SAASa,EAAgB;AAAA,EACE,WAAAf;AAAA,EACA,GAAGL;AACL,GAA2D;AAClF,SACE,gBAAAU;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWQ,EAAG,iDAAiDJ,CAAS;AAAA,MACvE,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASe,EAAqB;AAAA,EACE,WAAAV;AAAA,EACA,GAAGL;AACL,GAAgE;AAC5F,SACE,gBAAAU;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWQ;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAA,gBAAAU,EAACW,GAAA,EAAc,WAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGxC;AAEA,SAASL,EAAuB;AAAA,EACE,WAAAX;AAAA,EACA,GAAGL;AACL,GAAkE;AAChG,SACE,gBAAAU;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWQ;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAA,gBAAAU,EAACC,GAAA,EAAgB,WAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAG1C;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@oneplatformdev/ui",
|
3
|
-
"version": "0.1.10-
|
3
|
+
"version": "0.1.10-55",
|
4
4
|
"description": "UI component library for OnePlatform",
|
5
5
|
"author": "One Platform Development Team",
|
6
6
|
"keywords": [
|
@@ -105,8 +105,8 @@
|
|
105
105
|
"recharts": "^3.2.0",
|
106
106
|
"sonner": "^2.0.7",
|
107
107
|
"vaul": "^1.1.2",
|
108
|
-
"@oneplatformdev/tokens": "^0.0.1-
|
109
|
-
"@oneplatformdev/
|
110
|
-
"@oneplatformdev/
|
108
|
+
"@oneplatformdev/tokens": "^0.0.1-77",
|
109
|
+
"@oneplatformdev/utils": "^0.1.1-104",
|
110
|
+
"@oneplatformdev/hooks": "^0.1.0-90"
|
111
111
|
}
|
112
112
|
}
|