@oneplatformdev/ui 0.1.99-beta.40 → 0.1.99-beta.41

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.41 (2026-01-14)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated @oneplatformdev/utils to 0.1.99-beta.41
6
+ - Updated @oneplatformdev/hooks to 0.1.99-beta.41
7
+ - Updated @oneplatformdev/tokens to 0.1.99-beta.41
8
+
1
9
  ## 0.1.99-beta.40 (2026-01-14)
2
10
 
3
11
  ### 🧱 Updated Dependencies
@@ -62,7 +62,7 @@ function l({ initialValue: e = "", ...n }) {
62
62
  ] });
63
63
  }
64
64
  const w = {
65
- title: "UI/Combobox",
65
+ title: "Combobox",
66
66
  component: f,
67
67
  parameters: {
68
68
  layout: "centered"
@@ -91,21 +91,21 @@ const w = {
91
91
  render: (e) => /* @__PURE__ */ t(l, { ...e })
92
92
  }, L = {
93
93
  render: (e) => /* @__PURE__ */ t(l, { ...e, initialValue: "pl" })
94
- }, I = {
94
+ }, M = {
95
95
  args: { disabled: !0 },
96
96
  render: (e) => /* @__PURE__ */ t(l, { ...e, initialValue: "de" })
97
- }, M = {
97
+ }, P = {
98
98
  args: {
99
99
  options: r,
100
100
  fetchOptions: async () => r
101
101
  },
102
102
  render: (e) => /* @__PURE__ */ t(l, { ...e })
103
- }, P = {
103
+ }, T = {
104
104
  args: {
105
105
  fetchOptions: d(r, 1200)
106
106
  },
107
107
  render: (e) => /* @__PURE__ */ t(l, { ...e })
108
- }, T = {
108
+ }, k = {
109
109
  args: {
110
110
  emptyLabel: "Nothing found",
111
111
  emptyAction: (e) => {
@@ -126,7 +126,7 @@ const w = {
126
126
  }
127
127
  },
128
128
  render: (e) => /* @__PURE__ */ t(l, { ...e })
129
- }, k = {
129
+ }, I = {
130
130
  args: {
131
131
  commandInputAction: (e) => /* @__PURE__ */ u("div", { className: "px-3 py-2 flex items-center justify-between text-xs text-muted-foreground", children: [
132
132
  /* @__PURE__ */ u("span", { children: [
@@ -178,14 +178,14 @@ const w = {
178
178
  };
179
179
  export {
180
180
  A as Default,
181
- I as Disabled,
182
- T as EmptyStateWithAction,
181
+ M as Disabled,
182
+ k as EmptyStateWithAction,
183
183
  F as NestedOptions,
184
184
  V as OnMountPrefetch,
185
- P as SlowFetchLoading,
186
- k as WithCommandInputAction,
185
+ T as SlowFetchLoading,
186
+ I as WithCommandInputAction,
187
187
  E as WithListHeadAction,
188
- M as WithStaticOptionsProp,
188
+ P as WithStaticOptionsProp,
189
189
  L as WithValueSelected,
190
190
  w as default
191
191
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.stories.js","sources":["../../src/Combobox/Combobox.stories.tsx"],"sourcesContent":["import React, { useMemo, useState } from 'react';\nimport type { Meta, StoryObj } from '@storybook/react';\n\nimport { Combobox } from './Combobox';\nimport type {\n ComboboxCallbackStateParams,\n ComboboxOption,\n ComboboxProps,\n} from './Combobox.types';\n\nconst sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));\n\nconst flatten = (nodes: ComboboxOption[] = []): ComboboxOption[] => {\n const res: ComboboxOption[] = [];\n const walk = (list?: ComboboxOption[]) => {\n if (!list?.length) return;\n for (const n of list) {\n res.push(n);\n if (n.items?.length) walk(n.items);\n }\n };\n walk(nodes);\n return res;\n};\n\nconst createFetchOptions =\n (all: ComboboxOption[], delayMs = 350): ComboboxProps['fetchOptions'] =>\n async (search?: string) => {\n await sleep(delayMs);\n\n const q = (search ?? '').trim().toLowerCase();\n if (!q) return all;\n\n // simple \"contains\" search across flattened options; then return top-level filtered\n // (enough for Storybook demos; your real API can do better)\n const allFlat = flatten(all);\n const matchedValues = new Set(\n allFlat\n .filter((o) => String(o.label).toLowerCase().includes(q))\n .map((o) => String(o.value)),\n );\n\n const filterTree = (list: ComboboxOption[]): ComboboxOption[] => {\n return list\n .map((n) => {\n const items = n.items?.length ? filterTree(n.items) : undefined;\n const selfMatch =\n matchedValues.has(String(n.value)) ||\n String(n.label).toLowerCase().includes(q);\n\n if (!selfMatch && !items?.length) return null;\n return { ...n, items };\n })\n .filter(Boolean) as ComboboxOption[];\n };\n\n return filterTree(all);\n };\n\nconst BASE_OPTIONS: ComboboxOption[] = [\n { value: 'ua', label: 'Ukraine' },\n { value: 'pl', label: 'Poland' },\n { value: 'de', label: 'Germany' },\n { value: 'fr', label: 'France' },\n { value: 'es', label: 'Spain' },\n { value: 'it', label: 'Italy' },\n];\n\nconst NESTED_OPTIONS: ComboboxOption[] = [\n {\n value: 'europe',\n label: 'Europe',\n items: [\n { value: 'ua', label: 'Ukraine' },\n { value: 'pl', label: 'Poland' },\n { value: 'de', label: 'Germany' },\n { value: 'fr', label: 'France' },\n ],\n },\n {\n value: 'north-america',\n label: 'North America',\n items: [\n { value: 'us', label: 'United States' },\n { value: 'ca', label: 'Canada' },\n { value: 'mx', label: 'Mexico' },\n ],\n },\n];\n\ntype ControlledProps = Omit<ComboboxProps, 'value' | 'onChange'> & {\n initialValue?: ComboboxProps['value'];\n};\n\nfunction ControlledCombobox({ initialValue = '', ...args }: ControlledProps) {\n const [value, setValue] = useState<ComboboxProps['value']>(initialValue);\n\n // keep stable reference if someone passes inline fetchOptions\n const fetchOptions = useMemo(\n () => args.fetchOptions,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n return (\n <div className=\"max-w-sm\">\n <Combobox {...args} value={value} onChange={setValue} fetchOptions={fetchOptions} />\n <div className=\"mt-3 text-xs text-muted-foreground\">\n value: <span className=\"font-mono\">{String(value || '')}</span>\n </div>\n </div>\n );\n}\n\nconst meta = {\n title: 'UI/Combobox',\n component: Combobox,\n parameters: {\n layout: 'centered',\n },\n args: {\n placeholder: 'Select option...',\n searchLabel: 'Type to search...',\n emptyLabel: 'No options',\n disabled: false,\n fetchOptions: createFetchOptions(BASE_OPTIONS, 250),\n },\n argTypes: {\n fetchOptions: { control: false },\n onChange: { control: false },\n onMount: { control: false },\n emptyAction: { control: false },\n commandInputAction: { control: false },\n listHeadAction: { control: false },\n options: { control: false },\n value: { control: false },\n },\n decorators: [\n (Story) => (\n <div className=\"p-6 w-[420px]\">\n <Story />\n </div>\n ),\n ],\n} satisfies Meta<typeof Combobox>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\n/** 1) Default (async options) */\nexport const Default: Story = {\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 2) With initial selected value */\nexport const WithValueSelected: Story = {\n render: (args) => <ControlledCombobox {...args} initialValue=\"pl\" />,\n};\n\n/** 3) Disabled */\nexport const Disabled: Story = {\n args: { disabled: true },\n render: (args) => <ControlledCombobox {...args} initialValue=\"de\" />,\n};\n\n/** 4) Static options via `options` prop (no async needed, but fetchOptions still required) */\nexport const WithStaticOptionsProp: Story = {\n args: {\n options: BASE_OPTIONS,\n fetchOptions: async () => BASE_OPTIONS,\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 5) Slow fetch to show loading state on open/search */\nexport const SlowFetchLoading: Story = {\n args: {\n fetchOptions: createFetchOptions(BASE_OPTIONS, 1200),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 6) Empty state with action (search something like \"zzz\") */\nexport const EmptyStateWithAction: Story = {\n args: {\n emptyLabel: 'Nothing found',\n emptyAction: (st: ComboboxCallbackStateParams) => {\n const canCreate = Boolean(st.search?.trim());\n return (\n <button\n type=\"button\"\n className=\"inline-flex items-center justify-center rounded-md border px-3 py-1.5 text-sm\"\n disabled={!canCreate}\n onClick={() => {\n const v = st.search.trim();\n const next: ComboboxOption = { value: v, label: `Create \"${v}\"` };\n st.setOptions([next]);\n st.setLoading(false);\n }}\n >\n Create option\n </button>\n );\n },\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 7) commandInputAction (helper row under input) */\nexport const WithCommandInputAction: Story = {\n args: {\n commandInputAction: (st: ComboboxCallbackStateParams) => (\n <div className=\"px-3 py-2 flex items-center justify-between text-xs text-muted-foreground\">\n <span>\n results: <span className=\"font-mono\">{st.options.length}</span>\n </span>\n <button\n type=\"button\"\n className=\"underline\"\n onClick={() => {\n st.setSearch('');\n st.setLoading(false);\n }}\n >\n Clear search\n </button>\n </div>\n ),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 8) listHeadAction (top action inside list) */\nexport const WithListHeadAction: Story = {\n args: {\n listHeadAction: (st: ComboboxCallbackStateParams) => (\n <button\n type=\"button\"\n className=\"w-full text-left px-3 py-2 text-sm\"\n onClick={() => {\n st.setSearch('');\n st.setOpen(false);\n }}\n >\n Close list\n </button>\n ),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 9) Nested options tree */\nexport const NestedOptions: Story = {\n args: {\n fetchOptions: createFetchOptions(NESTED_OPTIONS, 250),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 10) onMount initial loading (simulate prefetch on mount) */\nexport const OnMountPrefetch: Story = {\n args: {\n fetchOptions: createFetchOptions(BASE_OPTIONS, 250),\n onMount: async (st: ComboboxCallbackStateParams) => {\n await sleep(900);\n st.setOptions(BASE_OPTIONS);\n st.setLoading(false);\n },\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n"],"names":["sleep","ms","r","flatten","nodes","res","walk","list","n","createFetchOptions","all","delayMs","search","q","allFlat","matchedValues","o","filterTree","items","BASE_OPTIONS","NESTED_OPTIONS","ControlledCombobox","initialValue","args","value","setValue","useState","fetchOptions","useMemo","jsxs","jsx","Combobox","meta","Story","Default","WithValueSelected","Disabled","WithStaticOptionsProp","SlowFetchLoading","EmptyStateWithAction","st","canCreate","v","next","WithCommandInputAction","WithListHeadAction","NestedOptions","OnMountPrefetch"],"mappings":";;;AAUA,MAAMA,IAAQ,CAACC,MAAe,IAAI,QAAQ,CAACC,MAAM,WAAWA,GAAGD,CAAE,CAAC,GAE5DE,IAAU,CAACC,IAA0B,OAAyB;AAClE,QAAMC,IAAwB,CAA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AAU,EAAE,GACfA,EAAG,QAAQ,EAAK;AAAA,QAClB;AAAA,QACD,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAED;AAAA,EAGJ,QAAQ,CAACjB,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD,GAGauB,IAAuB;AAAA,EAClC,MAAM;AAAA,IACJ,cAAcrC,EAAmBW,GAAgB,GAAG;AAAA,EAAA;AAAA,EAEtD,QAAQ,CAACG,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD,GAGawB,IAAyB;AAAA,EACpC,MAAM;AAAA,IACJ,cAActC,EAAmBU,GAAc,GAAG;AAAA,IAClD,SAAS,OAAOqB,MAAoC;AAClD,YAAMxC,EAAM,GAAG,GACfwC,EAAG,WAAWrB,CAAY,GAC1BqB,EAAG,WAAW,EAAK;AAAA,IACrB;AAAA,EAAA;AAAA,EAEF,QAAQ,CAACjB,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD;"}
1
+ {"version":3,"file":"Combobox.stories.js","sources":["../../src/Combobox/Combobox.stories.tsx"],"sourcesContent":["import React, { useMemo, useState } from 'react';\nimport type { Meta, StoryObj } from '@storybook/react';\n\nimport { Combobox } from './Combobox';\nimport type {\n ComboboxCallbackStateParams,\n ComboboxOption,\n ComboboxProps,\n} from './Combobox.types';\n\nconst sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));\n\nconst flatten = (nodes: ComboboxOption[] = []): ComboboxOption[] => {\n const res: ComboboxOption[] = [];\n const walk = (list?: ComboboxOption[]) => {\n if (!list?.length) return;\n for (const n of list) {\n res.push(n);\n if (n.items?.length) walk(n.items);\n }\n };\n walk(nodes);\n return res;\n};\n\nconst createFetchOptions =\n (all: ComboboxOption[], delayMs = 350): ComboboxProps['fetchOptions'] =>\n async (search?: string) => {\n await sleep(delayMs);\n\n const q = (search ?? '').trim().toLowerCase();\n if (!q) return all;\n\n // simple \"contains\" search across flattened options; then return top-level filtered\n // (enough for Storybook demos; your real API can do better)\n const allFlat = flatten(all);\n const matchedValues = new Set(\n allFlat\n .filter((o) => String(o.label).toLowerCase().includes(q))\n .map((o) => String(o.value)),\n );\n\n const filterTree = (list: ComboboxOption[]): ComboboxOption[] => {\n return list\n .map((n) => {\n const items = n.items?.length ? filterTree(n.items) : undefined;\n const selfMatch =\n matchedValues.has(String(n.value)) ||\n String(n.label).toLowerCase().includes(q);\n\n if (!selfMatch && !items?.length) return null;\n return { ...n, items };\n })\n .filter(Boolean) as ComboboxOption[];\n };\n\n return filterTree(all);\n };\n\nconst BASE_OPTIONS: ComboboxOption[] = [\n { value: 'ua', label: 'Ukraine' },\n { value: 'pl', label: 'Poland' },\n { value: 'de', label: 'Germany' },\n { value: 'fr', label: 'France' },\n { value: 'es', label: 'Spain' },\n { value: 'it', label: 'Italy' },\n];\n\nconst NESTED_OPTIONS: ComboboxOption[] = [\n {\n value: 'europe',\n label: 'Europe',\n items: [\n { value: 'ua', label: 'Ukraine' },\n { value: 'pl', label: 'Poland' },\n { value: 'de', label: 'Germany' },\n { value: 'fr', label: 'France' },\n ],\n },\n {\n value: 'north-america',\n label: 'North America',\n items: [\n { value: 'us', label: 'United States' },\n { value: 'ca', label: 'Canada' },\n { value: 'mx', label: 'Mexico' },\n ],\n },\n];\n\ntype ControlledProps = Omit<ComboboxProps, 'value' | 'onChange'> & {\n initialValue?: ComboboxProps['value'];\n};\n\nfunction ControlledCombobox({ initialValue = '', ...args }: ControlledProps) {\n const [value, setValue] = useState<ComboboxProps['value']>(initialValue);\n\n // keep stable reference if someone passes inline fetchOptions\n const fetchOptions = useMemo(\n () => args.fetchOptions,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n return (\n <div className=\"max-w-sm\">\n <Combobox {...args} value={value} onChange={setValue} fetchOptions={fetchOptions} />\n <div className=\"mt-3 text-xs text-muted-foreground\">\n value: <span className=\"font-mono\">{String(value || '')}</span>\n </div>\n </div>\n );\n}\n\nconst meta = {\n title: 'Combobox',\n component: Combobox,\n parameters: {\n layout: 'centered',\n },\n args: {\n placeholder: 'Select option...',\n searchLabel: 'Type to search...',\n emptyLabel: 'No options',\n disabled: false,\n fetchOptions: createFetchOptions(BASE_OPTIONS, 250),\n },\n argTypes: {\n fetchOptions: { control: false },\n onChange: { control: false },\n onMount: { control: false },\n emptyAction: { control: false },\n commandInputAction: { control: false },\n listHeadAction: { control: false },\n options: { control: false },\n value: { control: false },\n },\n decorators: [\n (Story) => (\n <div className=\"p-6 w-[420px]\">\n <Story />\n </div>\n ),\n ],\n} satisfies Meta<typeof Combobox>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\n/** 1) Default (async options) */\nexport const Default: Story = {\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 2) With initial selected value */\nexport const WithValueSelected: Story = {\n render: (args) => <ControlledCombobox {...args} initialValue=\"pl\" />,\n};\n\n/** 3) Disabled */\nexport const Disabled: Story = {\n args: { disabled: true },\n render: (args) => <ControlledCombobox {...args} initialValue=\"de\" />,\n};\n\n/** 4) Static options via `options` prop (no async needed, but fetchOptions still required) */\nexport const WithStaticOptionsProp: Story = {\n args: {\n options: BASE_OPTIONS,\n fetchOptions: async () => BASE_OPTIONS,\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 5) Slow fetch to show loading state on open/search */\nexport const SlowFetchLoading: Story = {\n args: {\n fetchOptions: createFetchOptions(BASE_OPTIONS, 1200),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 6) Empty state with action (search something like \"zzz\") */\nexport const EmptyStateWithAction: Story = {\n args: {\n emptyLabel: 'Nothing found',\n emptyAction: (st: ComboboxCallbackStateParams) => {\n const canCreate = Boolean(st.search?.trim());\n return (\n <button\n type=\"button\"\n className=\"inline-flex items-center justify-center rounded-md border px-3 py-1.5 text-sm\"\n disabled={!canCreate}\n onClick={() => {\n const v = st.search.trim();\n const next: ComboboxOption = { value: v, label: `Create \"${v}\"` };\n st.setOptions([next]);\n st.setLoading(false);\n }}\n >\n Create option\n </button>\n );\n },\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 7) commandInputAction (helper row under input) */\nexport const WithCommandInputAction: Story = {\n args: {\n commandInputAction: (st: ComboboxCallbackStateParams) => (\n <div className=\"px-3 py-2 flex items-center justify-between text-xs text-muted-foreground\">\n <span>\n results: <span className=\"font-mono\">{st.options.length}</span>\n </span>\n <button\n type=\"button\"\n className=\"underline\"\n onClick={() => {\n st.setSearch('');\n st.setLoading(false);\n }}\n >\n Clear search\n </button>\n </div>\n ),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 8) listHeadAction (top action inside list) */\nexport const WithListHeadAction: Story = {\n args: {\n listHeadAction: (st: ComboboxCallbackStateParams) => (\n <button\n type=\"button\"\n className=\"w-full text-left px-3 py-2 text-sm\"\n onClick={() => {\n st.setSearch('');\n st.setOpen(false);\n }}\n >\n Close list\n </button>\n ),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 9) Nested options tree */\nexport const NestedOptions: Story = {\n args: {\n fetchOptions: createFetchOptions(NESTED_OPTIONS, 250),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 10) onMount initial loading (simulate prefetch on mount) */\nexport const OnMountPrefetch: Story = {\n args: {\n fetchOptions: createFetchOptions(BASE_OPTIONS, 250),\n onMount: async (st: ComboboxCallbackStateParams) => {\n await sleep(900);\n st.setOptions(BASE_OPTIONS);\n st.setLoading(false);\n },\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n"],"names":["sleep","ms","r","flatten","nodes","res","walk","list","n","createFetchOptions","all","delayMs","search","q","allFlat","matchedValues","o","filterTree","items","BASE_OPTIONS","NESTED_OPTIONS","ControlledCombobox","initialValue","args","value","setValue","useState","fetchOptions","useMemo","jsxs","jsx","Combobox","meta","Story","Default","WithValueSelected","Disabled","WithStaticOptionsProp","SlowFetchLoading","EmptyStateWithAction","st","canCreate","v","next","WithCommandInputAction","WithListHeadAction","NestedOptions","OnMountPrefetch"],"mappings":";;;AAUA,MAAMA,IAAQ,CAACC,MAAe,IAAI,QAAQ,CAACC,MAAM,WAAWA,GAAGD,CAAE,CAAC,GAE5DE,IAAU,CAACC,IAA0B,OAAyB;AAClE,QAAMC,IAAwB,CAAA,GACxBC,IAAO,CAACC,MAA4B;AACxC,QAAKA,GAAM;AACX,iBAAWC,KAAKD;AACd,QAAAF,EAAI,KAAKG,CAAC,GACNA,EAAE,OAAO,UAAQF,EAAKE,EAAE,KAAK;AAAA,EAErC;AACA,SAAAF,EAAKF,CAAK,GACHC;AACT,GAEMI,IACJ,CAACC,GAAuBC,IAAU,QAChC,OAAOC,MAAoB;AACzB,QAAMZ,EAAMW,CAAO;AAEnB,QAAME,KAAKD,KAAU,IAAI,KAAA,EAAO,YAAA;AAChC,MAAI,CAACC,EAAG,QAAOH;AAIf,QAAMI,IAAUX,EAAQO,CAAG,GACrBK,IAAgB,IAAI;AAAA,IACxBD,EACG,OAAO,CAACE,MAAM,OAAOA,EAAE,KAAK,EAAE,YAAA,EAAc,SAASH,CAAC,CAAC,EACvD,IAAI,CAACG,MAAM,OAAOA,EAAE,KAAK,CAAC;AAAA,EAAA,GAGzBC,IAAa,CAACV,MACXA,EACJ,IAAI,CAACC,MAAM;AACV,UAAMU,IAAQV,EAAE,OAAO,SAASS,EAAWT,EAAE,KAAK,IAAI;AAKtD,WAAI,EAHFO,EAAc,IAAI,OAAOP,EAAE,KAAK,CAAC,KACjC,OAAOA,EAAE,KAAK,EAAE,YAAA,EAAc,SAASK,CAAC,MAExB,CAACK,GAAO,SAAe,OAClC,EAAE,GAAGV,GAAG,OAAAU,EAAA;AAAA,EACjB,CAAC,EACA,OAAO,OAAO;AAGnB,SAAOD,EAAWP,CAAG;AACvB,GAEES,IAAiC;AAAA,EACrC,EAAE,OAAO,MAAM,OAAO,UAAA;AAAA,EACtB,EAAE,OAAO,MAAM,OAAO,SAAA;AAAA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AAA,EAAoB,GAAGE,EAAA,CAAM;AAClD,GAGasB,IAA4B;AAAA,EACvC,MAAM;AAAA,IACJ,gBAAgB,CAACL,MACf,gBAAAV;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAU;AAAA,QACV,SAAS,MAAM;AACb,UAAAU,EAAG,UAAU,EAAE,GACfA,EAAG,QAAQ,EAAK;AAAA,QAClB;AAAA,QACD,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAED;AAAA,EAGJ,QAAQ,CAACjB,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD,GAGauB,IAAuB;AAAA,EAClC,MAAM;AAAA,IACJ,cAAcrC,EAAmBW,GAAgB,GAAG;AAAA,EAAA;AAAA,EAEtD,QAAQ,CAACG,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD,GAGawB,IAAyB;AAAA,EACpC,MAAM;AAAA,IACJ,cAActC,EAAmBU,GAAc,GAAG;AAAA,IAClD,SAAS,OAAOqB,MAAoC;AAClD,YAAMxC,EAAM,GAAG,GACfwC,EAAG,WAAWrB,CAAY,GAC1BqB,EAAG,WAAW,EAAK;AAAA,IACrB;AAAA,EAAA;AAAA,EAEF,QAAQ,CAACjB,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD;"}
package/Dialog/Dialog.js CHANGED
@@ -17,7 +17,7 @@ function u({
17
17
  }) {
18
18
  return /* @__PURE__ */ e(a.Portal, { "data-slot": "dialog-portal", ...t });
19
19
  }
20
- function h({
20
+ function D({
21
21
  ...t
22
22
  }) {
23
23
  return /* @__PURE__ */ e(a.Close, { "data-slot": "dialog-close", ...t });
@@ -38,7 +38,7 @@ function f({
38
38
  }
39
39
  );
40
40
  }
41
- function D(t) {
41
+ function h(t) {
42
42
  const {
43
43
  className: o,
44
44
  children: i,
@@ -133,15 +133,15 @@ function z({
133
133
  a.Description,
134
134
  {
135
135
  "data-slot": "dialog-description",
136
- className: n("text-[#363B4E] font-medium text-base", t),
136
+ className: n("text-[#06080D] font-medium text-base", t),
137
137
  ...o
138
138
  }
139
139
  );
140
140
  }
141
141
  export {
142
142
  x as Dialog,
143
- h as DialogClose,
144
- D as DialogContent,
143
+ D as DialogClose,
144
+ h as DialogContent,
145
145
  z as DialogDescription,
146
146
  y as DialogFooter,
147
147
  b as DialogHeader,
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Dialog({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent(props: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n const {\n className,\n children,\n showCloseButton = true,\n style,\n ...rest\n } = props;\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay>\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]',\n 'flex flex-col w-full max-w-[calc(100%-2rem)] sm:max-w-2xl gap-3',\n 'bg-background rounded-lg border p-4 shadow-lg duration-200',\n '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',\n \"focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus:ring-transparent\",\n 'outline-none focus:outline-none focus-visible:outline-none',\n className\n )}\n {...rest}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n 'absolute top-4 right-4 rounded-2xl opacity-70 transition-opacity hover:opacity-100',\n 'data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',\n 'ring-offset-background focus:ring-transparent focus:ring-0 focus:ring-offset-0 focus:outline-hidden',\n 'focus:outline-none focus:ring-0',\n 'disabled:pointer-events-none [&_svg]:pointer-events-none',\n '[&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-5',\n 'cursor-pointer size-10 flex items-center justify-center',\n )}\n >\n <XIcon className='size-6 text-[#06080D]'/>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogOverlay>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-4 justify-center text-center sm:text-left min-h-10\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end pt-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-bold text-[#06080D]\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-[#363B4E] font-medium text-base\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogPrimitive\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","style","rest","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;AAQA,SAASA,EAAO;AAAA,EACE,GAAGC;AACL,GAAsD;AACpE,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAc;AAAA,EACE,GAAGF;AACL,GAAyD;AAC9E,2BAAQC,EAAgB,SAAhB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;AAEA,SAASG,EAAa;AAAA,EACE,GAAGH;AACL,GAAwD;AAC5E,2BAAQC,EAAgB,QAAhB,EAAuB,aAAU,iBAAiB,GAAGD,GAAO;AACtE;AAEA,SAASI,EAAY;AAAA,EACE,GAAGJ;AACL,GAAuD;AAC1E,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASK,EAAc;AAAA,EACE,WAAAC;AAAA,EACA,GAAGN;AACL,GAAyD;AAC9E,SACE,gBAAA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AG,wEAAwEF,CAAS;AAAA,MAC9F,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASiB,EAAa,EAAE,WAAAX,GAAW,GAAGN,KAAsC;AAC1E,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASkB,EAAY;AAAA,EACE,WAAAZ;AAAA,EACA,GAAGN;AACL,GAAuD;AAC1E,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,iDAAiDF,CAAS;AAAA,MACvE,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASmB,EAAkB;AAAA,EACE,WAAAb;AAAA,EACA,GAAGN;AACL,GAA6D;AACtF,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,wCAAwCF,CAAS;AAAA,MAC9D,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"Dialog.js","sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Dialog({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent(props: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n const {\n className,\n children,\n showCloseButton = true,\n style,\n ...rest\n } = props;\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay>\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]',\n 'flex flex-col w-full max-w-[calc(100%-2rem)] sm:max-w-2xl gap-3',\n 'bg-background rounded-lg border p-4 shadow-lg duration-200',\n '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',\n \"focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus:ring-transparent\",\n 'outline-none focus:outline-none focus-visible:outline-none',\n className\n )}\n {...rest}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n 'absolute top-4 right-4 rounded-2xl opacity-70 transition-opacity hover:opacity-100',\n 'data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',\n 'ring-offset-background focus:ring-transparent focus:ring-0 focus:ring-offset-0 focus:outline-hidden',\n 'focus:outline-none focus:ring-0',\n 'disabled:pointer-events-none [&_svg]:pointer-events-none',\n '[&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-5',\n 'cursor-pointer size-10 flex items-center justify-center',\n )}\n >\n <XIcon className='size-6 text-[#06080D]'/>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogOverlay>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-4 justify-center text-center sm:text-left min-h-10\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end pt-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-bold text-[#06080D]\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-[#06080D] font-medium text-base\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogPrimitive\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","style","rest","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;AAQA,SAASA,EAAO;AAAA,EACE,GAAGC;AACL,GAAsD;AACpE,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU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import { InfoBlockProps } from './InfoBlock.types';
2
+ export declare const InfoBlock: {
3
+ (props: InfoBlockProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default InfoBlock;
7
+ //# sourceMappingURL=InfoBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoBlock.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBtE,eAAO,MAAM,SAAS;YAAW,cAAc;;CAW9C,CAAA;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
+ import { cn as s } from "@oneplatformdev/utils";
3
+ import { infoBlockVariants as c } from "./infoBlockVariants.js";
4
+ import { isValidElement as m, createElement as f } from "react";
5
+ import { TriangleAlertIcon as p } from "lucide-react";
6
+ const d = (r) => r ? m(r) ? r : f(r) : null, u = {
7
+ error: /* @__PURE__ */ n(p, { className: "fill-[#DC2626] text-white!" })
8
+ }, x = (r) => {
9
+ const { className: t, variant: e = "error", content: o, icon: i, ...a } = r;
10
+ return /* @__PURE__ */ l(
11
+ "div",
12
+ {
13
+ ...a,
14
+ className: s(c({ className: t, variant: e })),
15
+ children: [
16
+ d(i ?? u[e]),
17
+ /* @__PURE__ */ n("span", { children: o })
18
+ ]
19
+ }
20
+ );
21
+ };
22
+ x.displayName = "InfoBlock";
23
+ export {
24
+ x as InfoBlock,
25
+ x as default
26
+ };
27
+ //# sourceMappingURL=InfoBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoBlock.js","sources":["../../src/InfoBlock/InfoBlock.tsx"],"sourcesContent":["import { InfoBlockIconType, InfoBlockProps } from \"./InfoBlock.types\";\nimport { cn } from \"@oneplatformdev/utils\";\nimport { infoBlockVariants } from \"./infoBlockVariants\";\nimport { createElement, isValidElement } from \"react\";\nimport { TriangleAlertIcon } from \"lucide-react\";\n\nconst renderInnerIcon = (Icon?: InfoBlockIconType) => {\n if (!Icon) return null;\n if (isValidElement(Icon)) return Icon;\n return createElement(Icon);\n};\n\nconst iconByVariant: Record<NonNullable<InfoBlockProps['variant']>, InfoBlockIconType> = {\n error: <TriangleAlertIcon className='fill-[#DC2626] text-white!'/>\n}\n\nexport const InfoBlock = (props: InfoBlockProps) => {\n const { className, variant = 'error', content, icon, ...rest } = props;\n return (\n <div\n {...rest}\n className={cn(infoBlockVariants({ className, variant }))}\n >\n {renderInnerIcon(icon ?? iconByVariant[variant!])}\n <span>{content}</span>\n </div>\n )\n}\nInfoBlock.displayName = 'InfoBlock';\nexport default InfoBlock;\n\n"],"names":["renderInnerIcon","Icon","isValidElement","createElement","iconByVariant","jsx","TriangleAlertIcon","InfoBlock","props","className","variant","content","icon","rest","jsxs","cn","infoBlockVariants"],"mappings":";;;;;AAMA,MAAMA,IAAkB,CAACC,MAClBA,IACDC,EAAeD,CAAI,IAAUA,IAC1BE,EAAcF,CAAI,IAFP,MAKdG,IAAmF;AAAA,EACvF,OAAO,gBAAAC,EAACC,GAAA,EAAkB,WAAU,6BAAA,CAA4B;AAClE,GAEaC,IAAY,CAACC,MAA0B;AAClD,QAAM,EAAE,WAAAC,GAAW,SAAAC,IAAU,SAAS,SAAAC,GAAS,MAAAC,GAAM,GAAGC,MAASL;AACjE,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,WAAWE,EAAGC,EAAkB,EAAE,WAAAP,GAAW,SAAAC,EAAA,CAAS,CAAC;AAAA,MAEtD,UAAA;AAAA,QAAAV,EAAgBY,KAAQR,EAAcM,CAAQ,CAAC;AAAA,QAChD,gBAAAL,EAAC,UAAM,UAAAM,EAAA,CAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGrB;AACAJ,EAAU,cAAc;"}
@@ -0,0 +1,14 @@
1
+ import { InfoBlock as o } from "./InfoBlock.js";
2
+ const n = {
3
+ title: "UI/InfoBlock",
4
+ component: o
5
+ }, e = {
6
+ args: {
7
+ content: "Увага! Перш ніж архівувати підрозділ “Підрозділ дизану”, переведіть співробітників до іншого - інакше вони будуть автоматично звільнені. Підрозділ буде преміщено до розділу “Архів”."
8
+ }
9
+ };
10
+ export {
11
+ e as Default,
12
+ n as default
13
+ };
14
+ //# sourceMappingURL=InfoBlock.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoBlock.stories.js","sources":["../../src/InfoBlock/InfoBlock.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react-vite';\n\nimport { InfoBlock } from './InfoBlock';\n\nconst meta = {\n title: 'UI/InfoBlock',\n component: InfoBlock,\n} satisfies Meta<typeof InfoBlock>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {\n args: {\n content: 'Увага! Перш ніж архівувати підрозділ “Підрозділ дизану”, переведіть співробітників до іншого - інакше вони будуть автоматично звільнені. Підрозділ буде преміщено до розділу “Архів”.'\n }\n};\n"],"names":["meta","InfoBlock","Default"],"mappings":";AAIA,MAAMA,IAAO;AAAA,EACX,OAAO;AAAA,EACP,WAAWC;AACb,GAMaC,IAAiB;AAAA,EAC5B,MAAM;AAAA,IACJ,SAAS;AAAA,EAAA;AAEb;"}
@@ -0,0 +1,8 @@
1
+ import { InfoBlockVariantsProps } from './infoBlockVariants';
2
+ import { ComponentType, HTMLAttributes, ReactElement, ReactNode, SVGProps } from 'react';
3
+ export type InfoBlockIconType = ComponentType<SVGProps<SVGSVGElement>> | ReactElement<SVGProps<SVGSVGElement>>;
4
+ export interface InfoBlockProps extends InfoBlockVariantsProps, Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
5
+ content?: ReactNode;
6
+ icon?: InfoBlockIconType;
7
+ }
8
+ //# sourceMappingURL=InfoBlock.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoBlock.types.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzF,MAAM,MAAM,iBAAiB,GACzB,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GACtC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE1C,MAAM,WAAW,cACf,SAAQ,sBAAsB,EAC5B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=InfoBlock.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoBlock.types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './InfoBlock';
2
+ export type * from './InfoBlock.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,mBAAmB,mBAAmB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { InfoBlock as r } from "./InfoBlock.js";
2
+ export {
3
+ r as InfoBlock
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,6 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ export declare const infoBlockVariants: (props?: ({
3
+ variant?: "error" | null | undefined;
4
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
+ export type InfoBlockVariantsProps = VariantProps<typeof infoBlockVariants>;
6
+ //# sourceMappingURL=infoBlockVariants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infoBlockVariants.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/infoBlockVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,iBAAiB;;8EAoB7B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { cva as r } from "class-variance-authority";
2
+ const a = r(
3
+ [
4
+ "flex items-start gap-2",
5
+ "p-2.5 rounded-lg",
6
+ "font-medium text-base leading-normal text-[#06080D]",
7
+ "whitespace-pre-wrap break-words",
8
+ "[&>p]:m-0 [&>p]:p-0",
9
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-5",
10
+ "transition-transform duration-200 [&_svg]:transition-transform [&_svg]:duration-200"
11
+ ],
12
+ {
13
+ variants: {
14
+ variant: {
15
+ error: "bg-[#DC26260F] [&>svg]:text-[#DC2626]"
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ variant: "error"
20
+ }
21
+ }
22
+ );
23
+ export {
24
+ a as infoBlockVariants
25
+ };
26
+ //# sourceMappingURL=infoBlockVariants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"infoBlockVariants.js","sources":["../../src/InfoBlock/infoBlockVariants.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const infoBlockVariants = cva(\n [\n 'flex items-start gap-2',\n 'p-2.5 rounded-lg',\n 'font-medium text-base leading-normal text-[#06080D]',\n 'whitespace-pre-wrap break-words',\n '[&>p]:m-0 [&>p]:p-0',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-5\",\n 'transition-transform duration-200 [&_svg]:transition-transform [&_svg]:duration-200',\n ],\n {\n variants: {\n variant: {\n error: 'bg-[#DC26260F] [&>svg]:text-[#DC2626]',\n },\n },\n defaultVariants: {\n variant: 'error',\n },\n }\n)\n\nexport type InfoBlockVariantsProps = VariantProps<typeof infoBlockVariants>;\n"],"names":["infoBlockVariants","cva"],"mappings":";AAEO,MAAMA,IAAoBC;AAAA,EAC/B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;"}
package/index.d.ts CHANGED
@@ -31,6 +31,7 @@ export * from './FormSelect';
31
31
  export * from './FormTextarea';
32
32
  export * from './Header';
33
33
  export * from './HoverCard';
34
+ export * from './InfoBlock';
34
35
  export * from './Input';
35
36
  export * from './InputOTP';
36
37
  export * from './Label';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CA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CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Accordion as d, AccordionContent as u, AccordionItem as x, AccordionTrigger as g } from "./Accordion/Accordion.js";
2
2
  import { Alert as f, AlertDescription as s, AlertTitle as S } from "./Alert/Alert.js";
3
3
  import { AlertDialogAction as T, AlertDialogCancel as D, AlertDialogContent as c, AlertDialogDescription as M, AlertDialogFooter as P, AlertDialogHeader as v, AlertDialogOverlay as I, AlertDialogPortal as A, AlertDialogRoot as w, AlertDialogTitle as h, AlertDialogTrigger as F } from "./AlertDialog/AlertDialogRoot.js";
4
- import { AlertDialog as R } from "./AlertDialog/AlertDialog.js";
4
+ import { AlertDialog as B } from "./AlertDialog/AlertDialog.js";
5
5
  import { AreaChart as G } from "./AreaChart/AreaChart.js";
6
6
  import { Aside as H } from "./Aside/Aside.js";
7
7
  import { AsideSidebar as N } from "./Aside/AsideSidebar.js";
@@ -17,7 +17,7 @@ import { buttonIconVariants as uo } from "./ButtonIcon/buttonIconVariants.js";
17
17
  import { Calendar as go } from "./Calendar/Calendar.js";
18
18
  import { Card as fo, CardContent as so, CardDescription as So, CardFooter as Co, CardHeader as To, CardTitle as Do } from "./Card/Card.js";
19
19
  import { Carousel as Mo, CarouselContent as Po, CarouselItem as vo, CarouselNext as Io, CarouselPrevious as Ao } from "./Carousel/Carousel.js";
20
- import { ChartContainer as ho, ChartLegend as Fo, ChartLegendContent as Lo, ChartStyle as Ro, ChartTooltip as Bo, ChartTooltipContent as Go } from "./Chart/Chart.js";
20
+ import { ChartContainer as ho, ChartLegend as Fo, ChartLegendContent as Lo, ChartStyle as Bo, ChartTooltip as Ro, ChartTooltipContent as Go } from "./Chart/Chart.js";
21
21
  import { Checkbox as Ho, CheckboxLabel as yo } from "./Checkbox/Checkbox.js";
22
22
  import { Collapsible as Oo, CollapsibleContent as Vo, CollapsibleTrigger as Eo } from "./Collapsible/Collapsible.js";
23
23
  import { Combobox as _o } from "./Combobox/Combobox.js";
@@ -27,7 +27,7 @@ import { DatePicker as er } from "./DatePicker/DatePicker.js";
27
27
  import { Dialog as ar, DialogClose as ir, DialogContent as nr, DialogDescription as pr, DialogFooter as mr, DialogHeader as lr, DialogOverlay as dr, DialogPortal as ur, DialogTitle as xr, DialogTrigger as gr } from "./Dialog/Dialog.js";
28
28
  import { DialogOverlayContainerContext as fr, DialogOverlayScope as sr, useDialogOverlayContainer as Sr } from "./Dialog/DialogOverlayScope.js";
29
29
  import { Drawer as Tr, DrawerClose as Dr, DrawerContent as cr, DrawerDescription as Mr, DrawerFooter as Pr, DrawerHeader as vr, DrawerOverlay as Ir, DrawerPortal as Ar, DrawerTitle as wr, DrawerTrigger as hr } from "./Drawer/Drawer.js";
30
- import { DropdownMenu as Lr, DropdownMenuCheckboxItem as Rr, DropdownMenuContent as Br, DropdownMenuGroup as Gr, DropdownMenuItem as kr, DropdownMenuLabel as Hr, DropdownMenuPortal as yr, DropdownMenuRadioGroup as Nr, DropdownMenuRadioItem as Or, DropdownMenuSeparator as Vr, DropdownMenuShortcut as Er, DropdownMenuSub as zr, DropdownMenuSubContent as _r, DropdownMenuSubTrigger as Ur, DropdownMenuTrigger as Yr } from "./DropdownMenu/DropdownMenu.js";
30
+ import { DropdownMenu as Lr, DropdownMenuCheckboxItem as Br, DropdownMenuContent as Rr, DropdownMenuGroup as Gr, DropdownMenuItem as kr, DropdownMenuLabel as Hr, DropdownMenuPortal as yr, DropdownMenuRadioGroup as Nr, DropdownMenuRadioItem as Or, DropdownMenuSeparator as Vr, DropdownMenuShortcut as Er, DropdownMenuSub as zr, DropdownMenuSubContent as _r, DropdownMenuSubTrigger as Ur, DropdownMenuTrigger as Yr } from "./DropdownMenu/DropdownMenu.js";
31
31
  import { Form as qr, FormControl as Jr, FormDescription as Kr, FormField as Qr, FormItem as Wr, FormLabel as Xr, FormMessage as Zr, useFormField as $r } from "./Form/Form.js";
32
32
  import { FormRenderControl as re } from "./Form/FormRenderControl.js";
33
33
  import { FormCheckbox as te } from "./FormCheckbox/FormCheckbox.js";
@@ -38,53 +38,54 @@ import { FormSelect as ue } from "./FormSelect/FormSelect.js";
38
38
  import { FormTextarea as ge } from "./FormTextarea/FormTextarea.js";
39
39
  import { Header as fe } from "./Header/Header.js";
40
40
  import { HoverCard as Se, HoverCardContent as Ce, HoverCardTrigger as Te } from "./HoverCard/HoverCard.js";
41
- import { BaseInput as ce, Input as Me, PasswordInput as Pe } from "./Input/Input.js";
42
- import { InputOTP as Ie, InputOTPGroup as Ae, InputOTPSeparator as we, InputOTPSlot as he } from "./InputOTP/InputOTP.js";
43
- import { Label as Le } from "./Label/Label.js";
44
- import { labelVariants as Be } from "./Label/labelVariants.js";
45
- import { LazyLoader as ke } from "./LazyLoader/LazyLoader.js";
46
- import { LoadedIcon as ye } from "./LoadedIcon/LoadedIcon.js";
47
- import { LoadingMask as Oe } from "./LoadingMask/LoadingMask.js";
48
- import { RenderLoadingMask as Ee } from "./LoadingMask/RenderLoadingMask.js";
49
- import { LoadingProgress as _e } from "./LoadingProgress/LoadingProgress.js";
50
- import { loadingProgressVariants as Ye } from "./LoadingProgress/loadingProgressVariants.js";
51
- import { Menubar as qe, MenubarCheckboxItem as Je, MenubarContent as Ke, MenubarGroup as Qe, MenubarItem as We, MenubarLabel as Xe, MenubarMenu as Ze, MenubarPortal as $e, MenubarRadioGroup as ot, MenubarRadioItem as rt, MenubarSeparator as et, MenubarShortcut as tt, MenubarSub as at, MenubarSubContent as it, MenubarSubTrigger as nt, MenubarTrigger as pt } from "./Menubar/Menubar.js";
52
- import { NavigationMenu as lt, NavigationMenuContent as dt, NavigationMenuIndicator as ut, NavigationMenuItem as xt, NavigationMenuLink as gt, NavigationMenuList as bt, NavigationMenuTrigger as ft, NavigationMenuViewport as st } from "./NavigationMenu/NavigationMenu.js";
53
- import { navigationMenuVariants as Ct } from "./NavigationMenu/navigationMenuVariants.js";
54
- import { Pagination as Dt, PaginationContent as ct, PaginationEllipsis as Mt, PaginationItem as Pt, PaginationLink as vt, PaginationNext as It, PaginationPrevious as At } from "./Pagination/Pagination.js";
55
- import { Popover as ht, PopoverAnchor as Ft, PopoverContent as Lt, PopoverTrigger as Rt } from "./Popover/Popover.js";
56
- import { Progress as Gt } from "./Progress/Progress.js";
57
- import { RadioGroup as Ht, RadioGroupItem as yt, RadioGroupLabel as Nt } from "./RadioGroup/RadioGroup.js";
58
- import { ResizableHandle as Vt, ResizablePanel as Et, ResizablePanelGroup as zt } from "./Resizable/Resizable.js";
59
- import { ScrollArea as Ut, ScrollBar as Yt } from "./ScrollArea/ScrollArea.js";
60
- import { Search as qt } from "./Search/Search.js";
61
- import { SelectContent as Kt, SelectGroup as Qt, SelectItem as Wt, SelectLabel as Xt, SelectRoot as Zt, SelectScrollDownButton as $t, SelectScrollUpButton as oa, SelectSeparator as ra, SelectTrigger as ea, SelectValue as ta } from "./Select/SelectRoot.js";
62
- import { Select as ia } from "./Select/Select.js";
63
- import { Separator as pa } from "./Separator/Separator.js";
64
- import { Sheet as la, SheetClose as da, SheetContent as ua, SheetDescription as xa, SheetFooter as ga, SheetHeader as ba, SheetOverlay as fa, SheetPortal as sa, SheetTitle as Sa, SheetTrigger as Ca } from "./Sheet/Sheet.js";
65
- import { Sidebar as Da, SidebarContent as ca, SidebarFooter as Ma, SidebarGroup as Pa, SidebarGroupAction as va, SidebarGroupContent as Ia, SidebarGroupLabel as Aa, SidebarHeader as wa, SidebarInput as ha, SidebarInset as Fa, SidebarMenu as La, SidebarMenuAction as Ra, SidebarMenuBadge as Ba, SidebarMenuButton as Ga, SidebarMenuItem as ka, SidebarMenuSkeleton as Ha, SidebarMenuSub as ya, SidebarMenuSubButton as Na, SidebarMenuSubItem as Oa, SidebarProvider as Va, SidebarRail as Ea, SidebarSeparator as za, SidebarTrigger as _a, useSidebar as Ua } from "./Sidebar/Sidebar.js";
66
- import { Skeleton as ja } from "./Skeleton/Skeleton.js";
67
- import { Slider as Ja } from "./Slider/Slider.js";
68
- import { Sonner as Qa } from "./Sonner/Sonner.js";
69
- import { Switch as Xa } from "./Switch/Switch.js";
70
- import { Table as $a, TableBody as oi, TableCaption as ri, TableCell as ei, TableFooter as ti, TableHead as ai, TableHeader as ii, TableRow as ni } from "./Table/Table.js";
71
- import { TabsContent as mi, TabsList as li, TabsRoot as di, TabsTrigger as ui } from "./Tabs/TabsRoot.js";
72
- import { TabRender as gi, Tabs as bi } from "./Tabs/Tabs.js";
73
- import { Textarea as si } from "./Textarea/Textarea.js";
74
- import { ThemeProvider as Ci } from "./Theme/ThemeProvider.js";
75
- import { ThemeModeToggle as Di } from "./Theme/ThemeModeToggle.js";
76
- import { Toast as Mi, ToastAction as Pi, ToastClose as vi, ToastDescription as Ii, ToastProvider as Ai, ToastTitle as wi, ToastViewport as hi } from "./Toast/Toast.js";
77
- import { reducer as Li, toast as Ri, useNotify as Bi, useToast as Gi } from "./Toast/useToast.js";
78
- import { Toaster as Hi } from "./Toaster/Toaster.js";
79
- import { Toggle as Ni, toggleVariants as Oi } from "./Toggle/Toggle.js";
80
- import { ToggleGroup as Ei, ToggleGroupItem as zi } from "./ToggleGroup/ToggleGroup.js";
81
- import { TooltipContent as Ui, TooltipProvider as Yi, TooltipRoot as ji, TooltipTrigger as qi } from "./Tooltip/TooltipRoot.js";
82
- import { Tooltip as Ki, TooltipInner as Qi } from "./Tooltip/Tooltip.js";
83
- import { Dropzone as Xi } from "./Dropzone/Dropzone.js";
84
- import { DEFAULT_FILE_TYPES as $i, DEFAULT_IMAGES_TYPES as on } from "./Dropzone/Dropzone.types.js";
85
- import { FormDropzone as en } from "./FormDropzone/FormDropzone.js";
86
- import { TablePagination as an } from "./TablePagination/TablePagination.js";
87
- import { Command as pn } from "cmdk";
41
+ import { InfoBlock as ce } from "./InfoBlock/InfoBlock.js";
42
+ import { BaseInput as Pe, Input as ve, PasswordInput as Ie } from "./Input/Input.js";
43
+ import { InputOTP as we, InputOTPGroup as he, InputOTPSeparator as Fe, InputOTPSlot as Le } from "./InputOTP/InputOTP.js";
44
+ import { Label as Re } from "./Label/Label.js";
45
+ import { labelVariants as ke } from "./Label/labelVariants.js";
46
+ import { LazyLoader as ye } from "./LazyLoader/LazyLoader.js";
47
+ import { LoadedIcon as Oe } from "./LoadedIcon/LoadedIcon.js";
48
+ import { LoadingMask as Ee } from "./LoadingMask/LoadingMask.js";
49
+ import { RenderLoadingMask as _e } from "./LoadingMask/RenderLoadingMask.js";
50
+ import { LoadingProgress as Ye } from "./LoadingProgress/LoadingProgress.js";
51
+ import { loadingProgressVariants as qe } from "./LoadingProgress/loadingProgressVariants.js";
52
+ import { Menubar as Ke, MenubarCheckboxItem as Qe, MenubarContent as We, MenubarGroup as Xe, MenubarItem as Ze, MenubarLabel as $e, MenubarMenu as ot, MenubarPortal as rt, MenubarRadioGroup as et, MenubarRadioItem as tt, MenubarSeparator as at, MenubarShortcut as it, MenubarSub as nt, MenubarSubContent as pt, MenubarSubTrigger as mt, MenubarTrigger as lt } from "./Menubar/Menubar.js";
53
+ import { NavigationMenu as ut, NavigationMenuContent as xt, NavigationMenuIndicator as gt, NavigationMenuItem as bt, NavigationMenuLink as ft, NavigationMenuList as st, NavigationMenuTrigger as St, NavigationMenuViewport as Ct } from "./NavigationMenu/NavigationMenu.js";
54
+ import { navigationMenuVariants as Dt } from "./NavigationMenu/navigationMenuVariants.js";
55
+ import { Pagination as Mt, PaginationContent as Pt, PaginationEllipsis as vt, PaginationItem as It, PaginationLink as At, PaginationNext as wt, PaginationPrevious as ht } from "./Pagination/Pagination.js";
56
+ import { Popover as Lt, PopoverAnchor as Bt, PopoverContent as Rt, PopoverTrigger as Gt } from "./Popover/Popover.js";
57
+ import { Progress as Ht } from "./Progress/Progress.js";
58
+ import { RadioGroup as Nt, RadioGroupItem as Ot, RadioGroupLabel as Vt } from "./RadioGroup/RadioGroup.js";
59
+ import { ResizableHandle as zt, ResizablePanel as _t, ResizablePanelGroup as Ut } from "./Resizable/Resizable.js";
60
+ import { ScrollArea as jt, ScrollBar as qt } from "./ScrollArea/ScrollArea.js";
61
+ import { Search as Kt } from "./Search/Search.js";
62
+ import { SelectContent as Wt, SelectGroup as Xt, SelectItem as Zt, SelectLabel as $t, SelectRoot as oa, SelectScrollDownButton as ra, SelectScrollUpButton as ea, SelectSeparator as ta, SelectTrigger as aa, SelectValue as ia } from "./Select/SelectRoot.js";
63
+ import { Select as pa } from "./Select/Select.js";
64
+ import { Separator as la } from "./Separator/Separator.js";
65
+ import { Sheet as ua, SheetClose as xa, SheetContent as ga, SheetDescription as ba, SheetFooter as fa, SheetHeader as sa, SheetOverlay as Sa, SheetPortal as Ca, SheetTitle as Ta, SheetTrigger as Da } from "./Sheet/Sheet.js";
66
+ import { Sidebar as Ma, SidebarContent as Pa, SidebarFooter as va, SidebarGroup as Ia, SidebarGroupAction as Aa, SidebarGroupContent as wa, SidebarGroupLabel as ha, SidebarHeader as Fa, SidebarInput as La, SidebarInset as Ba, SidebarMenu as Ra, SidebarMenuAction as Ga, SidebarMenuBadge as ka, SidebarMenuButton as Ha, SidebarMenuItem as ya, SidebarMenuSkeleton as Na, SidebarMenuSub as Oa, SidebarMenuSubButton as Va, SidebarMenuSubItem as Ea, SidebarProvider as za, SidebarRail as _a, SidebarSeparator as Ua, SidebarTrigger as Ya, useSidebar as ja } from "./Sidebar/Sidebar.js";
67
+ import { Skeleton as Ja } from "./Skeleton/Skeleton.js";
68
+ import { Slider as Qa } from "./Slider/Slider.js";
69
+ import { Sonner as Xa } from "./Sonner/Sonner.js";
70
+ import { Switch as $a } from "./Switch/Switch.js";
71
+ import { Table as ri, TableBody as ei, TableCaption as ti, TableCell as ai, TableFooter as ii, TableHead as ni, TableHeader as pi, TableRow as mi } from "./Table/Table.js";
72
+ import { TabsContent as di, TabsList as ui, TabsRoot as xi, TabsTrigger as gi } from "./Tabs/TabsRoot.js";
73
+ import { TabRender as fi, Tabs as si } from "./Tabs/Tabs.js";
74
+ import { Textarea as Ci } from "./Textarea/Textarea.js";
75
+ import { ThemeProvider as Di } from "./Theme/ThemeProvider.js";
76
+ import { ThemeModeToggle as Mi } from "./Theme/ThemeModeToggle.js";
77
+ import { Toast as vi, ToastAction as Ii, ToastClose as Ai, ToastDescription as wi, ToastProvider as hi, ToastTitle as Fi, ToastViewport as Li } from "./Toast/Toast.js";
78
+ import { reducer as Ri, toast as Gi, useNotify as ki, useToast as Hi } from "./Toast/useToast.js";
79
+ import { Toaster as Ni } from "./Toaster/Toaster.js";
80
+ import { Toggle as Vi, toggleVariants as Ei } from "./Toggle/Toggle.js";
81
+ import { ToggleGroup as _i, ToggleGroupItem as Ui } from "./ToggleGroup/ToggleGroup.js";
82
+ import { TooltipContent as ji, TooltipProvider as qi, TooltipRoot as Ji, TooltipTrigger as Ki } from "./Tooltip/TooltipRoot.js";
83
+ import { Tooltip as Wi, TooltipInner as Xi } from "./Tooltip/Tooltip.js";
84
+ import { Dropzone as $i } from "./Dropzone/Dropzone.js";
85
+ import { DEFAULT_FILE_TYPES as rn, DEFAULT_IMAGES_TYPES as en } from "./Dropzone/Dropzone.types.js";
86
+ import { FormDropzone as an } from "./FormDropzone/FormDropzone.js";
87
+ import { TablePagination as pn } from "./TablePagination/TablePagination.js";
88
+ import { Command as ln } from "cmdk";
88
89
  import * as o from "@radix-ui/react-dialog";
89
90
  import * as r from "@radix-ui/react-dropdown-menu";
90
91
  import * as e from "@radix-ui/react-label";
@@ -100,7 +101,7 @@ export {
100
101
  g as AccordionTrigger,
101
102
  f as Alert,
102
103
  s as AlertDescription,
103
- R as AlertDialog,
104
+ B as AlertDialog,
104
105
  T as AlertDialogAction,
105
106
  D as AlertDialogCancel,
106
107
  c as AlertDialogContent,
@@ -121,7 +122,7 @@ export {
121
122
  _ as AvatarFallback,
122
123
  U as AvatarImage,
123
124
  j as Badge,
124
- ce as BaseInput,
125
+ Pe as BaseInput,
125
126
  Q as Breadcrumb,
126
127
  W as BreadcrumbEllipsis,
127
128
  X as BreadcrumbItem,
@@ -146,8 +147,8 @@ export {
146
147
  ho as ChartContainer,
147
148
  Fo as ChartLegend,
148
149
  Lo as ChartLegendContent,
149
- Ro as ChartStyle,
150
- Bo as ChartTooltip,
150
+ Bo as ChartStyle,
151
+ Ro as ChartTooltip,
151
152
  Go as ChartTooltipContent,
152
153
  Ho as Checkbox,
153
154
  yo as CheckboxLabel,
@@ -162,11 +163,11 @@ export {
162
163
  Ko as CommandInput,
163
164
  Qo as CommandItem,
164
165
  Wo as CommandList,
165
- pn as CommandPrimitive,
166
+ ln as CommandPrimitive,
166
167
  Xo as CommandSeparator,
167
168
  Zo as CommandShortcut,
168
- $i as DEFAULT_FILE_TYPES,
169
- on as DEFAULT_IMAGES_TYPES,
169
+ rn as DEFAULT_FILE_TYPES,
170
+ en as DEFAULT_IMAGES_TYPES,
170
171
  or as DataTable,
171
172
  er as DatePicker,
172
173
  ar as Dialog,
@@ -193,8 +194,8 @@ export {
193
194
  wr as DrawerTitle,
194
195
  hr as DrawerTrigger,
195
196
  Lr as DropdownMenu,
196
- Rr as DropdownMenuCheckboxItem,
197
- Br as DropdownMenuContent,
197
+ Br as DropdownMenuCheckboxItem,
198
+ Rr as DropdownMenuContent,
198
199
  Gr as DropdownMenuGroup,
199
200
  kr as DropdownMenuItem,
200
201
  Hr as DropdownMenuLabel,
@@ -208,14 +209,14 @@ export {
208
209
  _r as DropdownMenuSubContent,
209
210
  Ur as DropdownMenuSubTrigger,
210
211
  Yr as DropdownMenuTrigger,
211
- Xi as Dropzone,
212
+ $i as Dropzone,
212
213
  qr as Form,
213
214
  te as FormCheckbox,
214
215
  ie as FormCombobox,
215
216
  Jr as FormControl,
216
217
  pe as FormDatePicker,
217
218
  Kr as FormDescription,
218
- en as FormDropzone,
219
+ an as FormDropzone,
219
220
  Qr as FormField,
220
221
  le as FormInput,
221
222
  Wr as FormItem,
@@ -228,167 +229,168 @@ export {
228
229
  Se as HoverCard,
229
230
  Ce as HoverCardContent,
230
231
  Te as HoverCardTrigger,
231
- Me as Input,
232
- Ie as InputOTP,
233
- Ae as InputOTPGroup,
234
- we as InputOTPSeparator,
235
- he as InputOTPSlot,
236
- Le as Label,
232
+ ce as InfoBlock,
233
+ ve as Input,
234
+ we as InputOTP,
235
+ he as InputOTPGroup,
236
+ Fe as InputOTPSeparator,
237
+ Le as InputOTPSlot,
238
+ Re as Label,
237
239
  e as LabelPrimitive,
238
- ke as LazyLoader,
239
- ye as LoadedIcon,
240
- Oe as LoadingMask,
241
- _e as LoadingProgress,
242
- qe as Menubar,
243
- Je as MenubarCheckboxItem,
244
- Ke as MenubarContent,
245
- Qe as MenubarGroup,
246
- We as MenubarItem,
247
- Xe as MenubarLabel,
248
- Ze as MenubarMenu,
249
- $e as MenubarPortal,
250
- ot as MenubarRadioGroup,
251
- rt as MenubarRadioItem,
252
- et as MenubarSeparator,
253
- tt as MenubarShortcut,
254
- at as MenubarSub,
255
- it as MenubarSubContent,
256
- nt as MenubarSubTrigger,
257
- pt as MenubarTrigger,
258
- lt as NavigationMenu,
259
- dt as NavigationMenuContent,
260
- ut as NavigationMenuIndicator,
261
- xt as NavigationMenuItem,
262
- gt as NavigationMenuLink,
263
- bt as NavigationMenuList,
264
- ft as NavigationMenuTrigger,
265
- st as NavigationMenuViewport,
266
- Dt as Pagination,
267
- ct as PaginationContent,
268
- Mt as PaginationEllipsis,
269
- Pt as PaginationItem,
270
- vt as PaginationLink,
271
- It as PaginationNext,
272
- At as PaginationPrevious,
273
- Pe as PasswordInput,
274
- ht as Popover,
275
- Ft as PopoverAnchor,
276
- Lt as PopoverContent,
240
+ ye as LazyLoader,
241
+ Oe as LoadedIcon,
242
+ Ee as LoadingMask,
243
+ Ye as LoadingProgress,
244
+ Ke as Menubar,
245
+ Qe as MenubarCheckboxItem,
246
+ We as MenubarContent,
247
+ Xe as MenubarGroup,
248
+ Ze as MenubarItem,
249
+ $e as MenubarLabel,
250
+ ot as MenubarMenu,
251
+ rt as MenubarPortal,
252
+ et as MenubarRadioGroup,
253
+ tt as MenubarRadioItem,
254
+ at as MenubarSeparator,
255
+ it as MenubarShortcut,
256
+ nt as MenubarSub,
257
+ pt as MenubarSubContent,
258
+ mt as MenubarSubTrigger,
259
+ lt as MenubarTrigger,
260
+ ut as NavigationMenu,
261
+ xt as NavigationMenuContent,
262
+ gt as NavigationMenuIndicator,
263
+ bt as NavigationMenuItem,
264
+ ft as NavigationMenuLink,
265
+ st as NavigationMenuList,
266
+ St as NavigationMenuTrigger,
267
+ Ct as NavigationMenuViewport,
268
+ Mt as Pagination,
269
+ Pt as PaginationContent,
270
+ vt as PaginationEllipsis,
271
+ It as PaginationItem,
272
+ At as PaginationLink,
273
+ wt as PaginationNext,
274
+ ht as PaginationPrevious,
275
+ Ie as PasswordInput,
276
+ Lt as Popover,
277
+ Bt as PopoverAnchor,
278
+ Rt as PopoverContent,
277
279
  t as PopoverPrimitive,
278
- Rt as PopoverTrigger,
279
- Gt as Progress,
280
+ Gt as PopoverTrigger,
281
+ Ht as Progress,
280
282
  a as ProgressPrimitive,
281
- Ht as RadioGroup,
282
- yt as RadioGroupItem,
283
- Nt as RadioGroupLabel,
284
- Ee as RenderLoadingMask,
285
- Vt as ResizableHandle,
286
- Et as ResizablePanel,
287
- zt as ResizablePanelGroup,
288
- Ut as ScrollArea,
283
+ Nt as RadioGroup,
284
+ Ot as RadioGroupItem,
285
+ Vt as RadioGroupLabel,
286
+ _e as RenderLoadingMask,
287
+ zt as ResizableHandle,
288
+ _t as ResizablePanel,
289
+ Ut as ResizablePanelGroup,
290
+ jt as ScrollArea,
289
291
  i as ScrollAreaPrimitive,
290
- Yt as ScrollBar,
291
- qt as Search,
292
- ia as Select,
293
- Kt as SelectContent,
294
- Qt as SelectGroup,
295
- Wt as SelectItem,
296
- Xt as SelectLabel,
292
+ qt as ScrollBar,
293
+ Kt as Search,
294
+ pa as Select,
295
+ Wt as SelectContent,
296
+ Xt as SelectGroup,
297
+ Zt as SelectItem,
298
+ $t as SelectLabel,
297
299
  n as SelectPrimitive,
298
- Zt as SelectRoot,
299
- $t as SelectScrollDownButton,
300
- oa as SelectScrollUpButton,
301
- ra as SelectSeparator,
302
- ea as SelectTrigger,
303
- ta as SelectValue,
304
- pa as Separator,
305
- la as Sheet,
306
- da as SheetClose,
307
- ua as SheetContent,
308
- xa as SheetDescription,
309
- ga as SheetFooter,
310
- ba as SheetHeader,
311
- fa as SheetOverlay,
312
- sa as SheetPortal,
313
- Sa as SheetTitle,
314
- Ca as SheetTrigger,
315
- Da as Sidebar,
316
- ca as SidebarContent,
317
- Ma as SidebarFooter,
318
- Pa as SidebarGroup,
319
- va as SidebarGroupAction,
320
- Ia as SidebarGroupContent,
321
- Aa as SidebarGroupLabel,
322
- wa as SidebarHeader,
323
- ha as SidebarInput,
324
- Fa as SidebarInset,
325
- La as SidebarMenu,
326
- Ra as SidebarMenuAction,
327
- Ba as SidebarMenuBadge,
328
- Ga as SidebarMenuButton,
329
- ka as SidebarMenuItem,
330
- Ha as SidebarMenuSkeleton,
331
- ya as SidebarMenuSub,
332
- Na as SidebarMenuSubButton,
333
- Oa as SidebarMenuSubItem,
334
- Va as SidebarProvider,
335
- Ea as SidebarRail,
336
- za as SidebarSeparator,
337
- _a as SidebarTrigger,
338
- ja as Skeleton,
339
- Ja as Slider,
340
- Qa as Sonner,
341
- Xa as Switch,
342
- gi as TabRender,
343
- $a as Table,
344
- oi as TableBody,
345
- ri as TableCaption,
346
- ei as TableCell,
347
- ti as TableFooter,
348
- ai as TableHead,
349
- ii as TableHeader,
350
- an as TablePagination,
351
- ni as TableRow,
352
- bi as Tabs,
353
- mi as TabsContent,
354
- li as TabsList,
355
- di as TabsRoot,
356
- ui as TabsTrigger,
357
- si as Textarea,
358
- Di as ThemeModeToggle,
359
- Ci as ThemeProvider,
360
- Mi as Toast,
361
- Pi as ToastAction,
362
- vi as ToastClose,
363
- Ii as ToastDescription,
364
- Ai as ToastProvider,
365
- wi as ToastTitle,
366
- hi as ToastViewport,
367
- Hi as Toaster,
368
- Ni as Toggle,
369
- Ei as ToggleGroup,
370
- zi as ToggleGroupItem,
371
- Ki as Tooltip,
372
- Ui as TooltipContent,
373
- Qi as TooltipInner,
300
+ oa as SelectRoot,
301
+ ra as SelectScrollDownButton,
302
+ ea as SelectScrollUpButton,
303
+ ta as SelectSeparator,
304
+ aa as SelectTrigger,
305
+ ia as SelectValue,
306
+ la as Separator,
307
+ ua as Sheet,
308
+ xa as SheetClose,
309
+ ga as SheetContent,
310
+ ba as SheetDescription,
311
+ fa as SheetFooter,
312
+ sa as SheetHeader,
313
+ Sa as SheetOverlay,
314
+ Ca as SheetPortal,
315
+ Ta as SheetTitle,
316
+ Da as SheetTrigger,
317
+ Ma as Sidebar,
318
+ Pa as SidebarContent,
319
+ va as SidebarFooter,
320
+ Ia as SidebarGroup,
321
+ Aa as SidebarGroupAction,
322
+ wa as SidebarGroupContent,
323
+ ha as SidebarGroupLabel,
324
+ Fa as SidebarHeader,
325
+ La as SidebarInput,
326
+ Ba as SidebarInset,
327
+ Ra as SidebarMenu,
328
+ Ga as SidebarMenuAction,
329
+ ka as SidebarMenuBadge,
330
+ Ha as SidebarMenuButton,
331
+ ya as SidebarMenuItem,
332
+ Na as SidebarMenuSkeleton,
333
+ Oa as SidebarMenuSub,
334
+ Va as SidebarMenuSubButton,
335
+ Ea as SidebarMenuSubItem,
336
+ za as SidebarProvider,
337
+ _a as SidebarRail,
338
+ Ua as SidebarSeparator,
339
+ Ya as SidebarTrigger,
340
+ Ja as Skeleton,
341
+ Qa as Slider,
342
+ Xa as Sonner,
343
+ $a as Switch,
344
+ fi as TabRender,
345
+ ri as Table,
346
+ ei as TableBody,
347
+ ti as TableCaption,
348
+ ai as TableCell,
349
+ ii as TableFooter,
350
+ ni as TableHead,
351
+ pi as TableHeader,
352
+ pn as TablePagination,
353
+ mi as TableRow,
354
+ si as Tabs,
355
+ di as TabsContent,
356
+ ui as TabsList,
357
+ xi as TabsRoot,
358
+ gi as TabsTrigger,
359
+ Ci as Textarea,
360
+ Mi as ThemeModeToggle,
361
+ Di as ThemeProvider,
362
+ vi as Toast,
363
+ Ii as ToastAction,
364
+ Ai as ToastClose,
365
+ wi as ToastDescription,
366
+ hi as ToastProvider,
367
+ Fi as ToastTitle,
368
+ Li as ToastViewport,
369
+ Ni as Toaster,
370
+ Vi as Toggle,
371
+ _i as ToggleGroup,
372
+ Ui as ToggleGroupItem,
373
+ Wi as Tooltip,
374
+ ji as TooltipContent,
375
+ Xi as TooltipInner,
374
376
  p as TooltipPrimitive,
375
- Yi as TooltipProvider,
376
- ji as TooltipRoot,
377
- qi as TooltipTrigger,
377
+ qi as TooltipProvider,
378
+ Ji as TooltipRoot,
379
+ Ki as TooltipTrigger,
378
380
  J as badgeVariants,
379
381
  io as buttonBadgeVariants,
380
382
  uo as buttonIconVariants,
381
383
  no as buttonVariants,
382
- Be as labelVariants,
383
- Ye as loadingProgressVariants,
384
- Ct as navigationMenuVariants,
385
- Li as reducer,
386
- Ri as toast,
387
- Oi as toggleVariants,
384
+ ke as labelVariants,
385
+ qe as loadingProgressVariants,
386
+ Dt as navigationMenuVariants,
387
+ Ri as reducer,
388
+ Gi as toast,
389
+ Ei as toggleVariants,
388
390
  Sr as useDialogOverlayContainer,
389
391
  $r as useFormField,
390
- Bi as useNotify,
391
- Ua as useSidebar,
392
- Gi as useToast
392
+ ki as useNotify,
393
+ ja as useSidebar,
394
+ Hi as useToast
393
395
  };
394
396
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.1.99-beta.40",
3
+ "version": "0.1.99-beta.41",
4
4
  "description": "UI component library for OnePlatform",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [
@@ -105,9 +105,9 @@
105
105
  "recharts": "^3.2.0",
106
106
  "sonner": "^2.0.7",
107
107
  "vaul": "^1.1.2",
108
- "@oneplatformdev/tokens": "^0.1.99-beta.40",
109
- "@oneplatformdev/hooks": "^0.1.99-beta.40",
110
- "@oneplatformdev/utils": "^0.1.99-beta.40"
108
+ "@oneplatformdev/utils": "^0.1.99-beta.41",
109
+ "@oneplatformdev/tokens": "^0.1.99-beta.41",
110
+ "@oneplatformdev/hooks": "^0.1.99-beta.41"
111
111
  },
112
112
  "scripts": {
113
113
  "chromatic": "chromatic"