zaravand-ui 7.1.0 → 7.1.2

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.
Files changed (61) hide show
  1. package/README.md +9 -0
  2. package/dist/components/Accordion/Accordion.variant.cjs +1 -1
  3. package/dist/components/Accordion/Accordion.variant.js +1 -1
  4. package/dist/components/DatePicker/DatePicker.cjs +1 -1
  5. package/dist/components/DatePicker/DatePicker.js +1 -1
  6. package/dist/components/Dialog/DialogDragHandle.cjs +1 -1
  7. package/dist/components/Dialog/DialogDragHandle.js +1 -1
  8. package/dist/components/Input/Input.variant.cjs +1 -1
  9. package/dist/components/Input/Input.variant.js +1 -1
  10. package/dist/components/Pagination/Pagination.variant.cjs +1 -1
  11. package/dist/components/Pagination/Pagination.variant.js +1 -1
  12. package/dist/components/Select/Select.cjs +1 -1
  13. package/dist/components/Select/Select.js +1 -1
  14. package/dist/components/Select/Select.variant.cjs +1 -1
  15. package/dist/components/Select/Select.variant.d.cts +1 -1
  16. package/dist/components/Select/Select.variant.d.ts +1 -1
  17. package/dist/components/Select/Select.variant.js +1 -1
  18. package/dist/components/Table/Table.cjs +1 -1
  19. package/dist/components/Table/Table.interface.d.cts +41 -0
  20. package/dist/components/Table/Table.interface.d.ts +41 -0
  21. package/dist/components/Table/Table.js +335 -318
  22. package/dist/components/Table/Table.utils.cjs +1 -1
  23. package/dist/components/Table/Table.utils.d.cts +2 -0
  24. package/dist/components/Table/Table.utils.d.ts +2 -0
  25. package/dist/components/Table/Table.utils.js +20 -16
  26. package/dist/components/Table/Table.variant.cjs +1 -1
  27. package/dist/components/Table/Table.variant.js +2 -2
  28. package/dist/components/Table/TableActionsContext.cjs +1 -0
  29. package/dist/components/Table/TableActionsContext.d.cts +26 -0
  30. package/dist/components/Table/TableActionsContext.d.ts +26 -0
  31. package/dist/components/Table/TableActionsContext.js +5 -0
  32. package/dist/components/Table/TableParts.cjs +1 -1
  33. package/dist/components/Table/TableParts.js +56 -34
  34. package/dist/components/Table/TableRowActions.cjs +1 -0
  35. package/dist/components/Table/TableRowActions.d.cts +14 -0
  36. package/dist/components/Table/TableRowActions.d.ts +14 -0
  37. package/dist/components/Table/TableRowActions.js +110 -0
  38. package/dist/components/Tabs/Tabs.variant.cjs +1 -1
  39. package/dist/components/Tabs/Tabs.variant.js +4 -4
  40. package/dist/components/Textarea/Textarea.variant.cjs +1 -1
  41. package/dist/components/Textarea/Textarea.variant.js +1 -1
  42. package/dist/components/TimePicker/TimePicker.variant.cjs +1 -1
  43. package/dist/components/TimePicker/TimePicker.variant.js +2 -2
  44. package/dist/components/VerticalTabs/VerticalTabs.cjs +1 -1
  45. package/dist/components/VerticalTabs/VerticalTabs.js +1 -1
  46. package/dist/components/VerticalTabs/VerticalTabs.variant.cjs +1 -1
  47. package/dist/components/VerticalTabs/VerticalTabs.variant.js +5 -5
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.css +1 -1
  50. package/dist/index.d.cts +2 -1
  51. package/dist/index.d.ts +2 -1
  52. package/dist/index.js +9 -8
  53. package/dist/shared/theme.cjs +1 -1
  54. package/dist/shared/theme.d.cts +1 -1
  55. package/dist/shared/theme.d.ts +1 -1
  56. package/dist/shared/theme.js +28 -26
  57. package/dist/shared/themeChannels.cjs +1 -0
  58. package/dist/shared/themeChannels.d.cts +3 -0
  59. package/dist/shared/themeChannels.d.ts +3 -0
  60. package/dist/shared/themeChannels.js +20 -0
  61. package/package.json +7 -3
package/dist/index.d.cts CHANGED
@@ -46,7 +46,8 @@ export { default as Switch } from "./components/Switch/Switch.cjs";
46
46
  export type { SwitchProps } from "./components/Switch/Switch.interface.cjs";
47
47
  export { default as Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/Table/Table.cjs";
48
48
  export { default as TableColumnFilter } from "./components/Table/TableColumnFilter.cjs";
49
- export type { DynamicTableRow, TableAction, TableActiveSort, TableAddRowHandler, TableBodyProps, TableCellProps, TableCellSelectChangeHandler, TableCellSelectChangeHandlerInput, TableColumnAlign, TableColumnFilterProps, TableColumnViewType, TableDeleteRowHandler, TableEditRowHandler, TableFieldType, TableFieldValue, TableFilterValue, TableFilterValues, TableFooterProps, TableHeaderProps, TableHeadProps, TableImportExcelHandler, TableMutationHookResult, TablePagingMode, TablePrintHandler, TablePrintHandlerInput, TableProps, TableRowActionInput, TableRowId, TableRowIdResolver, TableRowProps, TableRowState, TableSchema, TableSchemaColumn, TableSchemaFilter, TableSchemaPagination, TableSchemaSort, TableSelectOption, TableSelectOptionsSource, TableSortDirection, } from "./components/Table/Table.interface.cjs";
49
+ export { TableActionsHead, TableRowActions } from "./components/Table/TableRowActions.cjs";
50
+ export type { DynamicTableRow, TableAction, TableActionsHeadProps, TableActiveSort, TableAddRowHandler, TableBodyProps, TableCellProps, TableCellSelectChangeHandler, TableCellSelectChangeHandlerInput, TableColumnAlign, TableColumnFilterProps, TableColumnViewType, TableDefaultActionOptions, TableDeleteRowHandler, TableEditRowHandler, TableFieldType, TableFieldValue, TableFilterValue, TableFilterValues, TableFooterProps, TableHeaderProps, TableHeadProps, TableImportExcelHandler, TableMutationHookResult, TablePagingMode, TablePrintHandler, TablePrintHandlerInput, TableProps, TableRowActionInput, TableRowActionsProps, TableRowId, TableRowIdResolver, TableRowProps, TableRowState, TableSchema, TableSchemaColumn, TableSchemaFilter, TableSchemaPagination, TableSchemaSort, TableSelectOption, TableSelectOptionsSource, TableSortDirection, } from "./components/Table/Table.interface.cjs";
50
51
  export { default as VerticalTabs } from "./components/VerticalTabs/VerticalTabs.cjs";
51
52
  export type { VerticalTabsBadgeTone, VerticalTabsItem, VerticalTabsProps, VerticalTabsVariant, } from "./components/VerticalTabs/VerticalTabs.interface.cjs";
52
53
  export { default as Tabs } from "./components/Tabs/Tabs.cjs";
package/dist/index.d.ts CHANGED
@@ -46,7 +46,8 @@ export { default as Switch } from "./components/Switch/Switch.js";
46
46
  export type { SwitchProps } from "./components/Switch/Switch.interface.js";
47
47
  export { default as Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/Table/Table.js";
48
48
  export { default as TableColumnFilter } from "./components/Table/TableColumnFilter.js";
49
- export type { DynamicTableRow, TableAction, TableActiveSort, TableAddRowHandler, TableBodyProps, TableCellProps, TableCellSelectChangeHandler, TableCellSelectChangeHandlerInput, TableColumnAlign, TableColumnFilterProps, TableColumnViewType, TableDeleteRowHandler, TableEditRowHandler, TableFieldType, TableFieldValue, TableFilterValue, TableFilterValues, TableFooterProps, TableHeaderProps, TableHeadProps, TableImportExcelHandler, TableMutationHookResult, TablePagingMode, TablePrintHandler, TablePrintHandlerInput, TableProps, TableRowActionInput, TableRowId, TableRowIdResolver, TableRowProps, TableRowState, TableSchema, TableSchemaColumn, TableSchemaFilter, TableSchemaPagination, TableSchemaSort, TableSelectOption, TableSelectOptionsSource, TableSortDirection, } from "./components/Table/Table.interface.js";
49
+ export { TableActionsHead, TableRowActions } from "./components/Table/TableRowActions.js";
50
+ export type { DynamicTableRow, TableAction, TableActionsHeadProps, TableActiveSort, TableAddRowHandler, TableBodyProps, TableCellProps, TableCellSelectChangeHandler, TableCellSelectChangeHandlerInput, TableColumnAlign, TableColumnFilterProps, TableColumnViewType, TableDefaultActionOptions, TableDeleteRowHandler, TableEditRowHandler, TableFieldType, TableFieldValue, TableFilterValue, TableFilterValues, TableFooterProps, TableHeaderProps, TableHeadProps, TableImportExcelHandler, TableMutationHookResult, TablePagingMode, TablePrintHandler, TablePrintHandlerInput, TableProps, TableRowActionInput, TableRowActionsProps, TableRowId, TableRowIdResolver, TableRowProps, TableRowState, TableSchema, TableSchemaColumn, TableSchemaFilter, TableSchemaPagination, TableSchemaSort, TableSelectOption, TableSelectOptionsSource, TableSortDirection, } from "./components/Table/Table.interface.js";
50
51
  export { default as VerticalTabs } from "./components/VerticalTabs/VerticalTabs.js";
51
52
  export type { VerticalTabsBadgeTone, VerticalTabsItem, VerticalTabsProps, VerticalTabsVariant, } from "./components/VerticalTabs/VerticalTabs.interface.js";
52
53
  export { default as Tabs } from "./components/Tabs/Tabs.js";
package/dist/index.js CHANGED
@@ -27,11 +27,12 @@ import Z from "./components/Switch/Switch.js";
27
27
  import Q from "./components/Table/TableColumnFilter.js";
28
28
  import { TableBody as $, TableCell as ee, TableFooter as te, TableHead as ne, TableHeader as re, TableRow as ie } from "./components/Table/TableParts.js";
29
29
  import ae from "./components/Table/Table.js";
30
- import oe from "./components/VerticalTabs/VerticalTabs.js";
31
- import se from "./components/Textarea/Textarea.js";
32
- import ce from "./components/TimePicker/TimePicker.js";
33
- import le, { ToastAction as ue, ToastClose as de, ToastDescription as fe, ToastProvider as pe, ToastTitle as me, ToastViewport as he } from "./components/Toast/Toast.js";
34
- import ge from "./components/Toast/ToastHost.js";
35
- import _e from "./components/Toggle/Toggle.js";
36
- import ve from "./components/Uploader/Uploader.js";
37
- export { v as Accordion, y as AccordionContent, b as AccordionItem, x as AccordionTrigger, D as Avatar, O as AvatarGroup, p as Button, k as Checkbox, S as DEFAULT_TOAST_DURATION, M as DatePicker, m as Dialog, _ as Input, N as OtpInput, C as PERSISTENT_DURATION, P as Pagination, F as RadioGroup, I as RadioGroupItem, H as Select, U as SelectContent, W as SelectGroup, G as SelectItem, K as SelectLabel, q as SelectSeparator, J as SelectTrigger, Y as SelectValue, X as Sheet, L as Skeleton, f as Spinner, Z as Switch, ae as Table, $ as TableBody, ee as TableCell, Q as TableColumnFilter, te as TableFooter, ne as TableHead, re as TableHeader, ie as TableRow, R as Tabs, z as TabsContent, B as TabsList, V as TabsTrigger, se as Textarea, ce as TimePicker, le as Toast, ue as ToastAction, de as ToastClose, fe as ToastDescription, ge as ToastHost, pe as ToastProvider, me as ToastTitle, he as ToastViewport, _e as Toggle, h as Tooltip, g as TooltipProvider, ve as Uploader, oe as VerticalTabs, u as ZUI_SCALE_CSS_VARIABLE, s as ZuiConfigProvider, d as applyScale, e as applyTheme, t as createThemeCssVariables, a as enMessages, o as faMessages, A as formatPersianDate, j as formatPersianDateRangeLabel, w as hasToastListeners, l as localizeDigits, n as resolveTheme, T as showToast, E as subscribeToast, r as theme, i as themeCssVariables, c as useZuiConfig };
30
+ import { TableActionsHead as oe, TableRowActions as se } from "./components/Table/TableRowActions.js";
31
+ import ce from "./components/VerticalTabs/VerticalTabs.js";
32
+ import le from "./components/Textarea/Textarea.js";
33
+ import ue from "./components/TimePicker/TimePicker.js";
34
+ import de, { ToastAction as fe, ToastClose as pe, ToastDescription as me, ToastProvider as he, ToastTitle as ge, ToastViewport as _e } from "./components/Toast/Toast.js";
35
+ import ve from "./components/Toast/ToastHost.js";
36
+ import ye from "./components/Toggle/Toggle.js";
37
+ import be from "./components/Uploader/Uploader.js";
38
+ export { v as Accordion, y as AccordionContent, b as AccordionItem, x as AccordionTrigger, D as Avatar, O as AvatarGroup, p as Button, k as Checkbox, S as DEFAULT_TOAST_DURATION, M as DatePicker, m as Dialog, _ as Input, N as OtpInput, C as PERSISTENT_DURATION, P as Pagination, F as RadioGroup, I as RadioGroupItem, H as Select, U as SelectContent, W as SelectGroup, G as SelectItem, K as SelectLabel, q as SelectSeparator, J as SelectTrigger, Y as SelectValue, X as Sheet, L as Skeleton, f as Spinner, Z as Switch, ae as Table, oe as TableActionsHead, $ as TableBody, ee as TableCell, Q as TableColumnFilter, te as TableFooter, ne as TableHead, re as TableHeader, ie as TableRow, se as TableRowActions, R as Tabs, z as TabsContent, B as TabsList, V as TabsTrigger, le as Textarea, ue as TimePicker, de as Toast, fe as ToastAction, pe as ToastClose, me as ToastDescription, ve as ToastHost, he as ToastProvider, ge as ToastTitle, _e as ToastViewport, ye as Toggle, h as Tooltip, g as TooltipProvider, be as Uploader, ce as VerticalTabs, u as ZUI_SCALE_CSS_VARIABLE, s as ZuiConfigProvider, d as applyScale, e as applyTheme, t as createThemeCssVariables, a as enMessages, o as faMessages, A as formatPersianDate, j as formatPersianDateRangeLabel, w as hasToastListeners, l as localizeDigits, n as resolveTheme, T as showToast, E as subscribeToast, r as theme, i as themeCssVariables, c as useZuiConfig };
@@ -1 +1 @@
1
- var e=require(`./theme.json.cjs`).default,t=[`theme-light`,`theme-dark`],n=[`zui-theme-light`,`zui-theme-dark`],r=a(),i=o();function a(t={}){let n={...e,...t};return{...n,tooltipSurface:n.tooltipSurface??n.mutedSurface}}function o(e={}){let t=a(e);return{"--zui-color-primary":t.primary,"--zui-color-secondary":t.secondary,"--zui-color-text":t.text,"--zui-color-success":t.success,"--zui-color-warning":t.warning,"--zui-color-danger":t.danger,"--zui-color-border":t.border,"--zui-color-surface":t.surface,"--zui-color-muted-surface":t.mutedSurface,"--zui-color-tooltip-surface":t.tooltipSurface,"--zui-color-on-solid":t.surface}}function s(e={},r={}){let i=o(e),a=r.target??(typeof document<`u`?document.documentElement:void 0);if(!a)return i;for(let[e,t]of Object.entries(i))a.style.setProperty(e,t);return r.mode&&(a.classList.remove(...t,...n),a.classList.add(r.mode===`dark`?`zui-theme-dark`:`zui-theme-light`),a.setAttribute(`data-zui-theme`,r.mode)),i}exports.applyTheme=s,exports.createThemeCssVariables=o,exports.resolveTheme=a,exports.theme=r,exports.themeCssVariables=i;
1
+ const e=require(`./theme.json.cjs`),t=require(`./themeChannels.cjs`);var n=e.default,r=[`theme-light`,`theme-dark`],i=[`zui-theme-light`,`zui-theme-dark`],a=s(),o=c();function s(e={}){let t={...n,...e};return{...t,tooltipSurface:t.tooltipSurface??t.mutedSurface}}function c(e={}){let n=s(e),r={"--zui-color-primary":n.primary,"--zui-color-secondary":n.secondary,"--zui-color-text":n.text,"--zui-color-success":n.success,"--zui-color-warning":n.warning,"--zui-color-danger":n.danger,"--zui-color-border":n.border,"--zui-color-surface":n.surface,"--zui-color-muted-surface":n.mutedSurface,"--zui-color-tooltip-surface":n.tooltipSurface,"--zui-color-on-solid":n.surface};for(let[e,n]of Object.entries(r))Object.assign(r,t.createColorChannels(e,n));return r}function l(e={},t={}){let n=c(e),a=t.target??(typeof document<`u`?document.documentElement:void 0);if(!a)return n;for(let[e,t]of Object.entries(n))a.style.setProperty(e,t);return t.mode&&(a.classList.remove(...r,...i),a.classList.add(t.mode===`dark`?`zui-theme-dark`:`zui-theme-light`),a.setAttribute(`data-zui-theme`,t.mode)),n}exports.applyTheme=l,exports.createThemeCssVariables=c,exports.resolveTheme=s,exports.theme=a,exports.themeCssVariables=o;
@@ -12,7 +12,7 @@ type ThemeTokenMap = {
12
12
  };
13
13
  type ThemeOverrides = Partial<ThemeTokenMap>;
14
14
  type ThemeMode = "light" | "dark";
15
- type ThemeCssVariables = Record<"--zui-color-primary" | "--zui-color-secondary" | "--zui-color-text" | "--zui-color-success" | "--zui-color-warning" | "--zui-color-danger" | "--zui-color-border" | "--zui-color-surface" | "--zui-color-muted-surface" | "--zui-color-tooltip-surface" | "--zui-color-on-solid", string>;
15
+ type ThemeCssVariables = Record<"--zui-color-primary" | "--zui-color-secondary" | "--zui-color-text" | "--zui-color-success" | "--zui-color-warning" | "--zui-color-danger" | "--zui-color-border" | "--zui-color-surface" | "--zui-color-muted-surface" | "--zui-color-tooltip-surface" | "--zui-color-on-solid" | `--zui-color-${string}-${"r" | "g" | "b" | "a"}`, string>;
16
16
  type ApplyThemeOptions = {
17
17
  mode?: ThemeMode;
18
18
  target?: HTMLElement;
@@ -12,7 +12,7 @@ type ThemeTokenMap = {
12
12
  };
13
13
  type ThemeOverrides = Partial<ThemeTokenMap>;
14
14
  type ThemeMode = "light" | "dark";
15
- type ThemeCssVariables = Record<"--zui-color-primary" | "--zui-color-secondary" | "--zui-color-text" | "--zui-color-success" | "--zui-color-warning" | "--zui-color-danger" | "--zui-color-border" | "--zui-color-surface" | "--zui-color-muted-surface" | "--zui-color-tooltip-surface" | "--zui-color-on-solid", string>;
15
+ type ThemeCssVariables = Record<"--zui-color-primary" | "--zui-color-secondary" | "--zui-color-text" | "--zui-color-success" | "--zui-color-warning" | "--zui-color-danger" | "--zui-color-border" | "--zui-color-surface" | "--zui-color-muted-surface" | "--zui-color-tooltip-surface" | "--zui-color-on-solid" | `--zui-color-${string}-${"r" | "g" | "b" | "a"}`, string>;
16
16
  type ApplyThemeOptions = {
17
17
  mode?: ThemeMode;
18
18
  target?: HTMLElement;
@@ -1,37 +1,39 @@
1
1
  import e from "./theme.json.js";
2
+ import { createColorChannels as t } from "./themeChannels.js";
2
3
  //#region src/shared/theme.ts
3
- var t = e, n = ["theme-light", "theme-dark"], r = ["zui-theme-light", "zui-theme-dark"], i = o(), a = s();
4
- function o(e = {}) {
5
- let n = {
6
- ...t,
4
+ var n = e, r = ["theme-light", "theme-dark"], i = ["zui-theme-light", "zui-theme-dark"], a = s(), o = c();
5
+ function s(e = {}) {
6
+ let t = {
7
+ ...n,
7
8
  ...e
8
9
  };
9
10
  return {
10
- ...n,
11
- tooltipSurface: n.tooltipSurface ?? n.mutedSurface
11
+ ...t,
12
+ tooltipSurface: t.tooltipSurface ?? t.mutedSurface
12
13
  };
13
14
  }
14
- function s(e = {}) {
15
- let t = o(e);
16
- return {
17
- "--zui-color-primary": t.primary,
18
- "--zui-color-secondary": t.secondary,
19
- "--zui-color-text": t.text,
20
- "--zui-color-success": t.success,
21
- "--zui-color-warning": t.warning,
22
- "--zui-color-danger": t.danger,
23
- "--zui-color-border": t.border,
24
- "--zui-color-surface": t.surface,
25
- "--zui-color-muted-surface": t.mutedSurface,
26
- "--zui-color-tooltip-surface": t.tooltipSurface,
27
- "--zui-color-on-solid": t.surface
15
+ function c(e = {}) {
16
+ let n = s(e), r = {
17
+ "--zui-color-primary": n.primary,
18
+ "--zui-color-secondary": n.secondary,
19
+ "--zui-color-text": n.text,
20
+ "--zui-color-success": n.success,
21
+ "--zui-color-warning": n.warning,
22
+ "--zui-color-danger": n.danger,
23
+ "--zui-color-border": n.border,
24
+ "--zui-color-surface": n.surface,
25
+ "--zui-color-muted-surface": n.mutedSurface,
26
+ "--zui-color-tooltip-surface": n.tooltipSurface,
27
+ "--zui-color-on-solid": n.surface
28
28
  };
29
+ for (let [e, n] of Object.entries(r)) Object.assign(r, t(e, n));
30
+ return r;
29
31
  }
30
- function c(e = {}, t = {}) {
31
- let i = s(e), a = t.target ?? (typeof document < "u" ? document.documentElement : void 0);
32
- if (!a) return i;
33
- for (let [e, t] of Object.entries(i)) a.style.setProperty(e, t);
34
- return t.mode && (a.classList.remove(...n, ...r), a.classList.add(t.mode === "dark" ? "zui-theme-dark" : "zui-theme-light"), a.setAttribute("data-zui-theme", t.mode)), i;
32
+ function l(e = {}, t = {}) {
33
+ let n = c(e), a = t.target ?? (typeof document < "u" ? document.documentElement : void 0);
34
+ if (!a) return n;
35
+ for (let [e, t] of Object.entries(n)) a.style.setProperty(e, t);
36
+ return t.mode && (a.classList.remove(...r, ...i), a.classList.add(t.mode === "dark" ? "zui-theme-dark" : "zui-theme-light"), a.setAttribute("data-zui-theme", t.mode)), n;
35
37
  }
36
38
  //#endregion
37
- export { c as applyTheme, s as createThemeCssVariables, o as resolveTheme, i as theme, a as themeCssVariables };
39
+ export { l as applyTheme, c as createThemeCssVariables, s as resolveTheme, a as theme, o as themeCssVariables };
@@ -0,0 +1 @@
1
+ const e=require(`../_virtual/_rolldown/runtime.cjs`);let t=require(`colord`),n=require(`colord/plugins/names`);n=e.__toESM(n,1),(0,t.extend)([n.default]);var r=[`r`,`g`,`b`,`a`];function i(e,n){let i=n.trim().match(/^var\(\s*(--[\w-]+)\s*\)$/);if(i)return Object.fromEntries(r.map(t=>[`${e}-${t}`,`var(${i[1]}-${t})`]));let a=(0,t.colord)(n);if(!a.isValid())throw TypeError(`Invalid theme color for ${e}: ${n}`);let o=a.rgba;return Object.fromEntries(r.map(t=>[`${e}-${t}`,String(o[t])]))}exports.createColorChannels=i;
@@ -0,0 +1,3 @@
1
+ /** RGB channels let CSS combine runtime palettes without color-mix() or relative colors. */
2
+ declare function createColorChannels(name: string, value: string): Record<string, string>;
3
+ export { createColorChannels };
@@ -0,0 +1,3 @@
1
+ /** RGB channels let CSS combine runtime palettes without color-mix() or relative colors. */
2
+ declare function createColorChannels(name: string, value: string): Record<string, string>;
3
+ export { createColorChannels };
@@ -0,0 +1,20 @@
1
+ import { colord as e, extend as t } from "colord";
2
+ import n from "colord/plugins/names";
3
+ //#region src/shared/themeChannels.ts
4
+ t([n]);
5
+ var r = [
6
+ "r",
7
+ "g",
8
+ "b",
9
+ "a"
10
+ ];
11
+ function i(t, n) {
12
+ let i = n.trim().match(/^var\(\s*(--[\w-]+)\s*\)$/);
13
+ if (i) return Object.fromEntries(r.map((e) => [`${t}-${e}`, `var(${i[1]}-${e})`]));
14
+ let a = e(n);
15
+ if (!a.isValid()) throw TypeError(`Invalid theme color for ${t}: ${n}`);
16
+ let o = a.rgba;
17
+ return Object.fromEntries(r.map((e) => [`${t}-${e}`, String(o[e])]));
18
+ }
19
+ //#endregion
20
+ export { i as createColorChannels };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zaravand-ui",
3
- "version": "7.1.0",
3
+ "version": "7.1.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -30,9 +30,10 @@
30
30
  "dev": "vite",
31
31
  "dev:lib": "vite build --watch",
32
32
  "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
33
- "build": "npm run clean && npm run generate:theme && vite build && tsc -p tsconfig.build.json && node scripts/finalize-types.mjs",
34
- "build:demo": "vite build --config vite.demo.config.ts",
33
+ "build": "npm run clean && npm run generate:theme && vite build && tsc -p tsconfig.build.json && node scripts/finalize-types.mjs && npm run check:compat",
34
+ "build:demo": "npm run generate:theme && vite build --config vite.demo.config.ts && node scripts/check-browser-compatibility.mjs --demo",
35
35
  "check:package": "publint --strict && attw --pack . --exclude-entrypoints styles.css",
36
+ "check:compat": "node scripts/check-browser-compatibility.mjs",
36
37
  "prepublishOnly": "npm run build && npm run check:package",
37
38
  "lint": "eslint .",
38
39
  "test": "vitest run",
@@ -57,6 +58,7 @@
57
58
  "@tanstack/react-virtual": "^3.14.25",
58
59
  "class-variance-authority": "^0.7.1",
59
60
  "clsx": "^2.1.1",
61
+ "colord": "^2.14.0",
60
62
  "lucide-react": "^1.12.0",
61
63
  "react-day-picker": "^9.11.1",
62
64
  "tailwind-merge": "^3.7.0"
@@ -83,6 +85,8 @@
83
85
  "eslint-plugin-react-refresh": "^0.5.2",
84
86
  "globals": "^17.5.0",
85
87
  "jsdom": "^29.1.1",
88
+ "lightningcss": "1.32.0",
89
+ "postcss": "8.5.15",
86
90
  "prettier": "^3.9.9",
87
91
  "publint": "^0.3.24",
88
92
  "react": "^19.2.5",