@oneplatformdev/ui 0.1.99-beta.242 → 0.1.99-beta.243

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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.1.99-beta.243 (2026-03-05)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated @oneplatformdev/utils to 0.1.99-beta.243
6
+ - Updated @oneplatformdev/hooks to 0.1.99-beta.243
7
+ - Updated @oneplatformdev/tokens to 0.1.99-beta.243
8
+
1
9
  ## 0.1.99-beta.242 (2026-03-05)
2
10
 
3
11
  ### 🧱 Updated Dependencies
@@ -0,0 +1,154 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useState as n } from "react";
3
+ import { Search as s, Mail as c } from "lucide-react";
4
+ import { Input as l } from "./Input.js";
5
+ const h = {
6
+ title: "Input/Input",
7
+ component: l,
8
+ tags: ["autodocs"],
9
+ parameters: {
10
+ layout: "centered"
11
+ },
12
+ args: {
13
+ placeholder: "Enter text...",
14
+ variant: "default",
15
+ fullSize: !1,
16
+ counter: !1,
17
+ disabled: !1
18
+ },
19
+ argTypes: {
20
+ variant: {
21
+ control: "select",
22
+ options: ["default", "grey"]
23
+ },
24
+ type: {
25
+ control: "select",
26
+ options: ["text", "password", "email", "search", "number"]
27
+ },
28
+ fullSize: {
29
+ control: "boolean"
30
+ },
31
+ counter: {
32
+ control: "boolean"
33
+ },
34
+ disabled: {
35
+ control: "boolean"
36
+ },
37
+ maxLength: {
38
+ control: "number"
39
+ },
40
+ onChange: { action: "changed" },
41
+ onBlur: { action: "blurred" },
42
+ onFocus: { action: "focused" }
43
+ }
44
+ }, m = {
45
+ args: {
46
+ type: "text",
47
+ placeholder: "Default input"
48
+ }
49
+ }, g = {
50
+ args: {
51
+ variant: "grey",
52
+ type: "text",
53
+ placeholder: "Grey input"
54
+ }
55
+ }, f = {
56
+ args: {
57
+ placeholder: "Search...",
58
+ slotProps: {
59
+ input: {
60
+ startAdornment: /* @__PURE__ */ e(s, { size: 16 })
61
+ }
62
+ }
63
+ }
64
+ }, v = {
65
+ args: {
66
+ type: "email",
67
+ placeholder: "Email address",
68
+ slotProps: {
69
+ input: {
70
+ startAdornment: /* @__PURE__ */ e(c, { size: 16 })
71
+ }
72
+ }
73
+ }
74
+ }, y = {
75
+ args: {
76
+ type: "password",
77
+ placeholder: "Password"
78
+ }
79
+ }, b = {
80
+ render: (t) => {
81
+ const [r, o] = n("");
82
+ return /* @__PURE__ */ e("div", { className: "w-[320px]", children: /* @__PURE__ */ e(
83
+ l,
84
+ {
85
+ ...t,
86
+ value: r,
87
+ onChange: (a) => o(a.target.value)
88
+ }
89
+ ) });
90
+ },
91
+ args: {
92
+ placeholder: "Type something...",
93
+ counter: !0,
94
+ maxLength: 50
95
+ }
96
+ }, x = {
97
+ render: (t) => /* @__PURE__ */ e("div", { className: "w-[480px]", children: /* @__PURE__ */ e(l, { ...t }) }),
98
+ args: {
99
+ placeholder: "Full width input",
100
+ fullSize: !0
101
+ }
102
+ }, w = {
103
+ args: {
104
+ placeholder: "Disabled input",
105
+ disabled: !0,
106
+ value: "Disabled value"
107
+ }
108
+ }, S = {
109
+ render: (t) => {
110
+ const [r, o] = n("");
111
+ return /* @__PURE__ */ e("div", { className: "w-[320px]", children: /* @__PURE__ */ e(
112
+ l,
113
+ {
114
+ ...t,
115
+ value: r,
116
+ onTransform: (a) => a.replace(/\D/g, ""),
117
+ onChange: (a) => o(a.target.value)
118
+ }
119
+ ) });
120
+ },
121
+ args: {
122
+ placeholder: "Only numbers allowed"
123
+ }
124
+ }, D = {
125
+ render: (t) => {
126
+ const [r, o] = n("");
127
+ return /* @__PURE__ */ e("div", { className: "w-[360px]", children: /* @__PURE__ */ e(
128
+ l,
129
+ {
130
+ ...t,
131
+ value: r,
132
+ onChange: (a) => o(a.target.value)
133
+ }
134
+ ) });
135
+ },
136
+ args: {
137
+ placeholder: "Play with controls",
138
+ maxLength: 100
139
+ }
140
+ };
141
+ export {
142
+ m as Default,
143
+ w as Disabled,
144
+ v as Email,
145
+ x as FullWidth,
146
+ g as GreyVariant,
147
+ y as Password,
148
+ D as Playground,
149
+ b as WithCounter,
150
+ f as WithStartAdornment,
151
+ S as WithTransform,
152
+ h as default
153
+ };
154
+ //# sourceMappingURL=Input.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.stories.js","sources":["../../src/Input/Input.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react';\nimport React, { useState } from 'react';\nimport { Mail, Search } from 'lucide-react';\n\nimport { Input } from './Input';\n\nconst meta = {\n title: 'Input/Input',\n component: Input,\n tags: ['autodocs'],\n parameters: {\n layout: 'centered',\n },\n args: {\n placeholder: 'Enter text...',\n variant: 'default',\n fullSize: false,\n counter: false,\n disabled: false,\n },\n argTypes: {\n variant: {\n control: 'select',\n options: ['default', 'grey'],\n },\n type: {\n control: 'select',\n options: ['text', 'password', 'email', 'search', 'number'],\n },\n fullSize: {\n control: 'boolean',\n },\n counter: {\n control: 'boolean',\n },\n disabled: {\n control: 'boolean',\n },\n maxLength: {\n control: 'number',\n },\n onChange: { action: 'changed' },\n onBlur: { action: 'blurred' },\n onFocus: { action: 'focused' },\n },\n} satisfies Meta<typeof Input>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {\n args: {\n type: 'text',\n placeholder: 'Default input',\n },\n};\n\nexport const GreyVariant: Story = {\n args: {\n variant: 'grey',\n type: 'text',\n placeholder: 'Grey input',\n },\n};\n\nexport const WithStartAdornment: Story = {\n args: {\n placeholder: 'Search...',\n slotProps: {\n input: {\n startAdornment: <Search size={16} />,\n },\n },\n },\n};\n\nexport const Email: Story = {\n args: {\n type: 'email',\n placeholder: 'Email address',\n slotProps: {\n input: {\n startAdornment: <Mail size={16} />,\n },\n },\n },\n};\n\nexport const Password: Story = {\n args: {\n type: 'password',\n placeholder: 'Password',\n },\n};\n\nexport const WithCounter: Story = {\n render: (args) => {\n const [value, setValue] = useState('');\n\n return (\n <div className=\"w-[320px]\">\n <Input\n {...args}\n value={value}\n onChange={(e) => setValue(e.target.value)}\n />\n </div>\n );\n },\n args: {\n placeholder: 'Type something...',\n counter: true,\n maxLength: 50,\n },\n};\n\nexport const FullWidth: Story = {\n render: (args) => (\n <div className=\"w-[480px]\">\n <Input {...args} />\n </div>\n ),\n args: {\n placeholder: 'Full width input',\n fullSize: true,\n },\n};\n\nexport const Disabled: Story = {\n args: {\n placeholder: 'Disabled input',\n disabled: true,\n value: 'Disabled value',\n },\n};\n\nexport const WithTransform: Story = {\n render: (args) => {\n const [value, setValue] = useState('');\n\n return (\n <div className=\"w-[320px]\">\n <Input\n {...args}\n value={value}\n onTransform={(next) => next.replace(/\\D/g, '')}\n onChange={(e) => setValue(e.target.value)}\n />\n </div>\n );\n },\n args: {\n placeholder: 'Only numbers allowed',\n },\n};\n\nexport const Playground: Story = {\n render: (args) => {\n const [value, setValue] = useState('');\n\n return (\n <div className=\"w-[360px]\">\n <Input\n {...args}\n value={value}\n onChange={(e) => setValue(e.target.value)}\n />\n </div>\n );\n },\n args: {\n placeholder: 'Play with controls',\n maxLength: 100,\n },\n};\n"],"names":["meta","Input","Default","GreyVariant","WithStartAdornment","jsx","Search","Email","Mail","Password","WithCounter","args","value","setValue","useState","e","FullWidth","Disabled","WithTransform","next","Playground"],"mappings":";;;;AAMA,MAAMA,IAAO;AAAA,EACX,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,MAAM,CAAC,UAAU;AAAA,EACjB,YAAY;AAAA,IACV,QAAQ;AAAA,EAAA;AAAA,EAEV,MAAM;AAAA,IACJ,aAAa;AAAA,IACb,SAAS;AAAA,IACT,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,EAAA;AAAA,EAEZ,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,SAAS,CAAC,WAAW,MAAM;AAAA,IAAA;AAAA,IAE7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,QACJ,OAAAC;AAAA,QACA,UAAU,CAACG,MAAMF,EAASE,EAAE,OAAO,KAAK;AAAA,MAAA;AAAA,IAAA,GAE5C;AAAA,EAEJ;AAAA,EACA,MAAM;AAAA,IACJ,aAAa;AAAA,IACb,WAAW;AAAA,EAAA;AAEf;"}
@@ -17,7 +17,7 @@ function w({
17
17
  }) {
18
18
  return /* @__PURE__ */ t(a.Value, { "data-slot": "select-value", ...e });
19
19
  }
20
- function y(e) {
20
+ function S(e) {
21
21
  const {
22
22
  className: r,
23
23
  size: o = "default",
@@ -41,12 +41,12 @@ function y(e) {
41
41
  ...c,
42
42
  children: [
43
43
  n,
44
- l && /* @__PURE__ */ t(a.Icon, { asChild: !0, children: /* @__PURE__ */ t(d, { className: "size-4 opacity-50" }) })
44
+ l && /* @__PURE__ */ t(a.Icon, { asChild: !0, children: /* @__PURE__ */ t(d, { className: "size-6 text-[#06080D]" }) })
45
45
  ]
46
46
  }
47
47
  );
48
48
  }
49
- function S({
49
+ function y({
50
50
  className: e,
51
51
  children: r,
52
52
  position: o = "popper",
@@ -165,7 +165,7 @@ function f({
165
165
  );
166
166
  }
167
167
  export {
168
- S as SelectContent,
168
+ y as SelectContent,
169
169
  b as SelectGroup,
170
170
  N as SelectItem,
171
171
  z as SelectLabel,
@@ -174,7 +174,7 @@ export {
174
174
  f as SelectScrollDownButton,
175
175
  m as SelectScrollUpButton,
176
176
  I as SelectSeparator,
177
- y as SelectTrigger,
177
+ S as SelectTrigger,
178
178
  w as SelectValue
179
179
  };
180
180
  //# sourceMappingURL=SelectRoot.js.map
@@ -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(props: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\";\n showIcon?: boolean;\n}) {\n const {\n className,\n size = \"default\",\n children,\n showIcon = true,\n ...rest\n } = props\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-lg 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 'cursor-pointer',\n 'disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-8',\n className\n )}\n {...rest}\n >\n {children}\n {showIcon && (\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n )}\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","showIcon","rest","jsxs","cn","jsx","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator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AAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU,EAAG,iDAAiDN,CAAS;AAAA,MACvE,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASiB,EAAqB;AAAA,EACE,WAAAZ;AAAA,EACA,GAAGL;AACL,GAAgE;AAC5F,SACE,gBAAAY;AAAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAA,gBAAAY,EAACW,GAAA,EAAc,WAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGxC;AAEA,SAASL,EAAuB;AAAA,EACE,WAAAb;AAAA,EACA,GAAGL;AACL,GAAkE;AAChG,SACE,gBAAAY;AAAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAA,gBAAAY,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(props: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: \"sm\" | \"default\";\n showIcon?: boolean;\n}) {\n const {\n className,\n size = \"default\",\n children,\n showIcon = true,\n ...rest\n } = props\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-lg 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 'cursor-pointer',\n 'disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-8',\n className\n )}\n {...rest}\n >\n {children}\n {showIcon && (\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-6 text-[#06080D]\" />\n </SelectPrimitive.Icon>\n )}\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","showIcon","rest","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,g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AACX,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAA,gBAAAY,EAACW,GAAA,EAAc,WAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGxC;AAEA,SAASL,EAAuB;AAAA,EACE,WAAAb;AAAA,EACA,GAAGL;AACL,GAAkE;AAChG,SACE,gBAAAY;AAAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAA,gBAAAY,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.99-beta.242",
3
+ "version": "0.1.99-beta.243",
4
4
  "description": "UI component library for OnePlatform",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [
@@ -106,9 +106,9 @@
106
106
  "recharts": "^3.2.0",
107
107
  "sonner": "^2.0.7",
108
108
  "vaul": "^1.1.2",
109
- "@oneplatformdev/tokens": "^0.1.99-beta.242",
110
- "@oneplatformdev/utils": "^0.1.99-beta.242",
111
- "@oneplatformdev/hooks": "^0.1.99-beta.242"
109
+ "@oneplatformdev/hooks": "^0.1.99-beta.243",
110
+ "@oneplatformdev/utils": "^0.1.99-beta.243",
111
+ "@oneplatformdev/tokens": "^0.1.99-beta.243"
112
112
  },
113
113
  "scripts": {
114
114
  "chromatic": "chromatic"