@oneplatformdev/ui 0.1.10-66 → 0.1.10-68
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/Button/Button.js +9 -9
- package/Button/Button.js.map +1 -1
- package/Button/buttonVariants.js +1 -1
- package/Button/buttonVariants.js.map +1 -1
- package/CHANGELOG.md +16 -0
- package/Select/SelectRoot.js +5 -5
- package/Select/SelectRoot.js.map +1 -1
- package/package.json +4 -4
package/Button/Button.js
CHANGED
|
@@ -20,15 +20,6 @@ const N = g.forwardRef(
|
|
|
20
20
|
}, a) => {
|
|
21
21
|
const s = c ? x : "button", o = b || y || l;
|
|
22
22
|
return o ? /* @__PURE__ */ m(
|
|
23
|
-
s,
|
|
24
|
-
{
|
|
25
|
-
type: "button",
|
|
26
|
-
ref: a,
|
|
27
|
-
disabled: t,
|
|
28
|
-
className: u(i({ variant: n, size: e, className: r })),
|
|
29
|
-
...p
|
|
30
|
-
}
|
|
31
|
-
) : /* @__PURE__ */ m(
|
|
32
23
|
B,
|
|
33
24
|
{
|
|
34
25
|
...f || {},
|
|
@@ -45,6 +36,15 @@ const N = g.forwardRef(
|
|
|
45
36
|
}
|
|
46
37
|
)
|
|
47
38
|
}
|
|
39
|
+
) : /* @__PURE__ */ m(
|
|
40
|
+
s,
|
|
41
|
+
{
|
|
42
|
+
type: "button",
|
|
43
|
+
ref: a,
|
|
44
|
+
disabled: t,
|
|
45
|
+
className: u(i({ variant: n, size: e, className: r })),
|
|
46
|
+
...p
|
|
47
|
+
}
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
);
|
package/Button/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { buttonVariants } from './buttonVariants';\nimport { ButtonProps } from './Button.types';\n\nimport { Tooltip } from '../Tooltip';\n\n// TODO: create ButtonIcon component | update button | add start/end icon\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({\n disabled,\n className,\n variant,\n size,\n asChild = false,\n title = '',\n tooltip,\n tooltipProps = {},\n message,\n ...props\n }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n const msg = message || tooltip || title;\n\n if(msg) {\n return <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n }\n\n return (\n <Tooltip\n {...(tooltipProps || {})}\n open={tooltipProps.open ?? (disabled || !msg) ? false : undefined}\n message={msg}\n >\n <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n </Tooltip>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport default Button;\n"],"names":["Button","React","disabled","className","variant","size","asChild","title","tooltip","tooltipProps","message","props","ref","Comp","Slot","msg","jsx","
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { cn } from \"@oneplatformdev/utils\"\nimport { buttonVariants } from './buttonVariants';\nimport { ButtonProps } from './Button.types';\n\nimport { Tooltip } from '../Tooltip';\n\n// TODO: create ButtonIcon component | update button | add start/end icon\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({\n disabled,\n className,\n variant,\n size,\n asChild = false,\n title = '',\n tooltip,\n tooltipProps = {},\n message,\n ...props\n }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n const msg = message || tooltip || title;\n\n if(!msg) {\n return <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n }\n\n return (\n <Tooltip\n {...(tooltipProps || {})}\n open={tooltipProps.open ?? (disabled || !msg) ? false : undefined}\n message={msg}\n >\n <Comp\n type='button'\n ref={ref}\n disabled={disabled}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n </Tooltip>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport default Button;\n"],"names":["Button","React","disabled","className","variant","size","asChild","title","tooltip","tooltipProps","message","props","ref","Comp","Slot","msg","jsx","Tooltip","cn","buttonVariants"],"mappings":";;;;;;;AAUO,MAAMA,IAASC,EAAM;AAAA,EAC1B,CAAC;AAAA,IACE,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,OAAAC,IAAQ;AAAA,IACR,SAAAC;AAAA,IACA,cAAAC,IAAe,CAAA;AAAA,IACf,SAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GACFC,MAAQ;AACV,UAAMC,IAAOP,IAAUQ,IAAO,UACxBC,IAAML,KAAWF,KAAWD;AAElC,WAAIQ,IAWF,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACE,GAAIR,KAAgB,CAAA;AAAA,QACrB,MAAMA,EAAa,SAASP,KAAY,CAACa,KAAO,KAAQ;AAAA,QACxD,SAASA;AAAA,QAET,UAAA,gBAAAC;AAAA,UAACH;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,KAAAD;AAAA,YACA,UAAAV;AAAA,YACA,WAAWgB,EAAGC,EAAe,EAAE,SAAAf,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,YACzD,GAAGQ;AAAA,UAAA;AAAA,QAAA;AAAA,MACN;AAAA,IAAA,IArBK,gBAAAK;AAAA,MAACH;AAAA,MAAA;AAAA,QACN,MAAK;AAAA,QACL,KAAAD;AAAA,QACA,UAAAV;AAAA,QACA,WAAWgB,EAAGC,EAAe,EAAE,SAAAf,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QACzD,GAAGQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAmBV;AACF;AACAX,EAAO,cAAc;"}
|
package/Button/buttonVariants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonVariants.js","sources":["../../src/Button/buttonVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n// TODO: refactor btn variants | ask me about mnc next pwa\nexport const buttonVariants = cva(\n [\n \"inline-flex items-center justify-center gap-2\",\n \"whitespace-nowrap rounded-lg text-sm font-medium\",\n \"transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n 'cursor-pointer'\n ],\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-sm hover:opacity-[.8]\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n transparent: \"bg-transparent hover:bg-transparent hover:text-accent-foreground\",\n none: \"\",\n },\n size: {\n default: \"h-
|
|
1
|
+
{"version":3,"file":"buttonVariants.js","sources":["../../src/Button/buttonVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\n// TODO: refactor btn variants | ask me about mnc next pwa\nexport const buttonVariants = cva(\n [\n \"inline-flex items-center justify-center gap-2\",\n \"whitespace-nowrap rounded-lg text-sm font-medium\",\n \"transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n 'cursor-pointer'\n ],\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow-sm hover:opacity-[.8]\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n transparent: \"bg-transparent hover:bg-transparent hover:text-accent-foreground\",\n none: \"\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs [&_svg]:size-4\",\n lg: \"h-10 px-8 [&_svg]:size-5 px-3 py-2\",\n icon: \"h-9 w-9 [&_svg]:size-5!\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"lg\",\n },\n }\n)\n"],"names":["buttonVariants","cva"],"mappings":";AAGO,MAAMA,IAAiBC;AAAA,EAC5B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,QACN,aAAa;AAAA,QACb,MAAM;AAAA,MAAA;AAAA,MAER,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;"}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 0.1.10-68 (2025-10-21)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @oneplatformdev/utils to 0.1.1-117
|
|
6
|
+
- Updated @oneplatformdev/hooks to 0.1.0-103
|
|
7
|
+
- Updated @oneplatformdev/tokens to 0.0.1-90
|
|
8
|
+
|
|
9
|
+
## 0.1.10-67 (2025-10-21)
|
|
10
|
+
|
|
11
|
+
### 🧱 Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated @oneplatformdev/utils to 0.1.1-116
|
|
14
|
+
- Updated @oneplatformdev/hooks to 0.1.0-102
|
|
15
|
+
- Updated @oneplatformdev/tokens to 0.0.1-89
|
|
16
|
+
|
|
1
17
|
## 0.1.10-66 (2025-10-21)
|
|
2
18
|
|
|
3
19
|
### 🧱 Updated Dependencies
|
package/Select/SelectRoot.js
CHANGED
|
@@ -2,12 +2,12 @@ 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 o } from "@oneplatformdev/utils";
|
|
5
|
-
function
|
|
5
|
+
function h({
|
|
6
6
|
...e
|
|
7
7
|
}) {
|
|
8
8
|
return /* @__PURE__ */ t(a.Root, { "data-slot": "select", ...e });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function v({
|
|
11
11
|
...e
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */ t(a.Group, { "data-slot": "select-group", ...e });
|
|
@@ -29,7 +29,7 @@ function w({
|
|
|
29
29
|
"data-slot": "select-trigger",
|
|
30
30
|
"data-size": r,
|
|
31
31
|
className: o(
|
|
32
|
-
"flex w-
|
|
32
|
+
"flex w-inherit items-center justify-between gap-2 rounded-md bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs",
|
|
33
33
|
"border border-input outline-none",
|
|
34
34
|
"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 transition-[color,box-shadow] focus-visible:ring-[3px] *: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",
|
|
35
35
|
"disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-8",
|
|
@@ -163,11 +163,11 @@ function m({
|
|
|
163
163
|
}
|
|
164
164
|
export {
|
|
165
165
|
y as SelectContent,
|
|
166
|
-
|
|
166
|
+
v as SelectGroup,
|
|
167
167
|
z as SelectItem,
|
|
168
168
|
S as SelectLabel,
|
|
169
169
|
a as SelectPrimitive,
|
|
170
|
-
|
|
170
|
+
h as SelectRoot,
|
|
171
171
|
m as SelectScrollDownButton,
|
|
172
172
|
p as SelectScrollUpButton,
|
|
173
173
|
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 'flex w-fit items-center justify-between gap-2 rounded-md bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs',\n 'border border-input outline-none',\n \"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 transition-[color,box-shadow] focus-visible:ring-[3px] *: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 'disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-8',\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-lg 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,E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AAU;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 'flex w-inherit items-center justify-between gap-2 rounded-md bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs',\n 'border border-input outline-none',\n \"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 transition-[color,box-shadow] focus-visible:ring-[3px] *: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 'disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-8',\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-lg 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,QACA;AAAA,QACA;AAAA,QACA;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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68",
|
|
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/
|
|
109
|
-
"@oneplatformdev/
|
|
110
|
-
"@oneplatformdev/
|
|
108
|
+
"@oneplatformdev/tokens": "^0.0.1-90",
|
|
109
|
+
"@oneplatformdev/hooks": "^0.1.0-103",
|
|
110
|
+
"@oneplatformdev/utils": "^0.1.1-117"
|
|
111
111
|
}
|
|
112
112
|
}
|