@alfadocs/ui-kit 0.23.0 → 0.24.0

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 (69) hide show
  1. package/dist/_chunks/{autocomplete-BxfabhZ8.js → autocomplete-C7xq06bP.js} +40 -40
  2. package/dist/_chunks/editable-currency-cell-renderer-DJB5MxAI.js +2349 -0
  3. package/dist/_chunks/locale-picker-CYBhgSHR.js +575 -0
  4. package/dist/_chunks/{patient-shell-DavGODt9.js → patient-shell-B164drIa.js} +40 -55
  5. package/dist/_chunks/settings-ca2Yi9R8.js +21 -0
  6. package/dist/_chunks/sun-Eweh5fvi.js +50 -0
  7. package/dist/_chunks/{theme-toggle-BswYl0Yp.js → theme-toggle-FrotC2VI.js} +85 -127
  8. package/dist/_chunks/use-locale-BkCIHujH.js +20 -0
  9. package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +55 -0
  10. package/dist/_chunks/{whatsapp-button-CtlLwM3M.js → whatsapp-button-DUjlWGKf.js} +26 -25
  11. package/dist/agent-catalog.json +59 -1
  12. package/dist/components/autocomplete/index.js +1 -1
  13. package/dist/components/data-table/filters/number-filter.d.ts +56 -0
  14. package/dist/components/data-table/filters/text-filter.d.ts +49 -0
  15. package/dist/components/data-table/index.d.ts +4 -0
  16. package/dist/components/data-table/index.js +25 -21
  17. package/dist/components/header-settings/index.js +205 -0
  18. package/dist/components/locale-picker/index.js +7 -0
  19. package/dist/components/theme-toggle/index.js +1 -1
  20. package/dist/components/whatsapp-button/index.js +1 -1
  21. package/dist/components/whatsapp-button/whatsapp-button.d.ts +14 -1
  22. package/dist/fonts/Lexend-VF-latin-ext.woff2 +0 -0
  23. package/dist/fonts/Lexend-VF-latin.woff2 +0 -0
  24. package/dist/fonts/Lexend-VF-vietnamese.woff2 +0 -0
  25. package/dist/fonts/NotoSansArabic-VF-arabic.woff2 +0 -0
  26. package/dist/fonts/NotoSansDevanagari-VF-devanagari.woff2 +0 -0
  27. package/dist/hooks/index.js +29 -28
  28. package/dist/i18n/config.js +2726 -134
  29. package/dist/i18n/locales/ar.d.ts +147 -3
  30. package/dist/i18n/locales/de.d.ts +147 -3
  31. package/dist/i18n/locales/el.d.ts +147 -3
  32. package/dist/i18n/locales/es.d.ts +147 -3
  33. package/dist/i18n/locales/fr.d.ts +147 -3
  34. package/dist/i18n/locales/hi.d.ts +147 -3
  35. package/dist/i18n/locales/ja.d.ts +147 -3
  36. package/dist/i18n/locales/nl.d.ts +147 -3
  37. package/dist/i18n/locales/pl.d.ts +149 -5
  38. package/dist/i18n/locales/pt.d.ts +147 -3
  39. package/dist/i18n/locales/ro.d.ts +147 -3
  40. package/dist/i18n/locales/ru.d.ts +148 -4
  41. package/dist/i18n/locales/sq.d.ts +147 -3
  42. package/dist/i18n/locales/sv.d.ts +147 -3
  43. package/dist/i18n/locales/tr.d.ts +147 -3
  44. package/dist/i18n/locales/zh.d.ts +147 -3
  45. package/dist/i18n/resources.d.ts +294 -6
  46. package/dist/index.js +512 -507
  47. package/dist/locales/ar.json +149 -5
  48. package/dist/locales/de.json +149 -5
  49. package/dist/locales/el.json +149 -5
  50. package/dist/locales/en.json +147 -3
  51. package/dist/locales/es.json +149 -5
  52. package/dist/locales/fr.json +149 -5
  53. package/dist/locales/hi.json +149 -5
  54. package/dist/locales/it.json +147 -3
  55. package/dist/locales/ja.json +149 -5
  56. package/dist/locales/nl.json +149 -5
  57. package/dist/locales/pl.json +151 -7
  58. package/dist/locales/pt.json +149 -5
  59. package/dist/locales/ro.json +149 -5
  60. package/dist/locales/ru.json +150 -6
  61. package/dist/locales/sq.json +149 -5
  62. package/dist/locales/sv.json +149 -5
  63. package/dist/locales/tr.json +149 -5
  64. package/dist/locales/zh.json +149 -5
  65. package/dist/patterns/patient-shell/index.js +1 -1
  66. package/dist/tokens.css +2 -2
  67. package/package.json +10 -1
  68. package/dist/_chunks/editable-currency-cell-renderer-1t42gENX.js +0 -1972
  69. package/dist/_chunks/use-locale-C5rS3Xon.js +0 -71
@@ -0,0 +1,20 @@
1
+ import { useState as r, useEffect as u, useCallback as c } from "react";
2
+ import "../i18n/config.js";
3
+ import a from "i18next";
4
+ function m() {
5
+ const [e, n] = r(() => a.language);
6
+ u(() => {
7
+ const t = (l) => n(l);
8
+ return a.on("languageChanged", t), a.language !== e && n(a.language), () => {
9
+ a.off("languageChanged", t);
10
+ };
11
+ }, [e]);
12
+ const o = c(async (t) => {
13
+ await a.changeLanguage(t);
14
+ }, []), g = a.dir(e) === "rtl" ? "rtl" : "ltr";
15
+ return { locale: e, dir: g, setLocale: o };
16
+ }
17
+ export {
18
+ m as u
19
+ };
20
+ //# sourceMappingURL=use-locale-BkCIHujH.js.map
@@ -0,0 +1,55 @@
1
+ import { useState as h, useEffect as w, useRef as m } from "react";
2
+ function v(e) {
3
+ const [i, r] = h(() => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(e).matches);
4
+ return w(() => {
5
+ if (typeof window > "u" || typeof window.matchMedia != "function")
6
+ return;
7
+ const n = window.matchMedia(e);
8
+ r(n.matches);
9
+ const t = (u) => r(u.matches);
10
+ return typeof n.addEventListener == "function" ? (n.addEventListener("change", t), () => n.removeEventListener("change", t)) : (n.addListener(t), () => n.removeListener(t));
11
+ }, [e]), i;
12
+ }
13
+ function p(e) {
14
+ return e != null && e.current ? e.current : typeof document > "u" ? null : document;
15
+ }
16
+ function S(e, i) {
17
+ const r = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : (
18
+ // SSR / jsdom fallback — drop every character that's
19
+ // significant in a CSS attribute selector. Conservative but
20
+ // robust enough for the test environment.
21
+ e.replace(/["'\\[\]]/g, "")
22
+ ), n = `[data-error-anchor="${r}"], [name="${r}"], [name$="[${r}]"]`, t = Array.from(i.querySelectorAll(n));
23
+ return t.length === 0 ? null : t.find((f) => f.offsetParent !== null) ?? t[0];
24
+ }
25
+ function E(e, i, r = {}) {
26
+ const {
27
+ scope: n,
28
+ scrollOptions: t = { behavior: "smooth", block: "center" },
29
+ focus: u = !0,
30
+ skipInitialMount: f = !0
31
+ } = r, l = m(!0), c = m(null), o = i.find((s) => !!e[s]) ?? null;
32
+ w(() => {
33
+ if (l.current && (l.current = !1, f)) {
34
+ c.current = o;
35
+ return;
36
+ }
37
+ if (!o) {
38
+ c.current = null;
39
+ return;
40
+ }
41
+ if (o === c.current || typeof window > "u") return;
42
+ const s = window.requestAnimationFrame(() => {
43
+ const d = p(n);
44
+ if (!d) return;
45
+ const a = S(o, d);
46
+ a && (a.scrollIntoView(t), u && a.focus({ preventScroll: !0 }), c.current = o);
47
+ });
48
+ return () => window.cancelAnimationFrame(s);
49
+ }, [o]);
50
+ }
51
+ export {
52
+ E as a,
53
+ v as u
54
+ };
55
+ //# sourceMappingURL=use-scroll-to-first-error-BrK7dKB_.js.map
@@ -1,7 +1,7 @@
1
1
  import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as y, useMemo as A } from "react";
2
+ import { forwardRef as A, useMemo as C } from "react";
3
3
  import { c as m } from "./index-D2ZczOXr.js";
4
- import { useTranslation as C } from "react-i18next";
4
+ import { useTranslation as _ } from "react-i18next";
5
5
  function u({ className: a }) {
6
6
  return /* @__PURE__ */ i(
7
7
  "svg",
@@ -15,7 +15,7 @@ function u({ className: a }) {
15
15
  }
16
16
  );
17
17
  }
18
- const _ = m(
18
+ const j = m(
19
19
  [
20
20
  // `position` is provided by `positionVariants` below — `static`
21
21
  // sets `ds:relative` (so the pseudo-element touch-target anchors),
@@ -103,7 +103,7 @@ const _ = m(
103
103
  size: "md"
104
104
  }
105
105
  }
106
- ), j = m("", {
106
+ ), B = m("", {
107
107
  variants: {
108
108
  position: {
109
109
  // `relative` so the `::before` pseudo touch-target (defined in
@@ -118,47 +118,48 @@ const _ = m(
118
118
  },
119
119
  defaultVariants: { position: "static" }
120
120
  });
121
- function B(a, o) {
121
+ function L(a, o) {
122
122
  const s = a.replace(/\D/g, "");
123
123
  if (s.length === 0)
124
124
  return null;
125
- const r = `https://wa.me/${s}`;
126
- return o ? `${r}?text=${encodeURIComponent(o)}` : r;
125
+ const d = `https://wa.me/${s}`;
126
+ return o ? `${d}?text=${encodeURIComponent(o)}` : d;
127
127
  }
128
- const N = y(
128
+ const N = A(
129
129
  ({
130
130
  phoneNumber: a,
131
131
  message: o,
132
132
  variant: s = "pill",
133
- size: r = "md",
133
+ size: d = "md",
134
134
  position: h,
135
135
  label: g,
136
- className: w,
136
+ tone: w = "standard",
137
+ className: z,
137
138
  ...n
138
- }, z) => {
139
- const { t: p } = C(), f = A(
140
- () => B(a, o),
139
+ }, x) => {
140
+ const { t: p } = _(), f = C(
141
+ () => L(a, o),
141
142
  [a, o]
142
- ), e = g ?? p(s === "fab" ? "whatsApp.fabLabel" : "whatsApp.label"), x = [
143
- _({ variant: s, size: r }),
144
- j({ position: h }),
145
- w
146
- ].filter(Boolean).join(" "), d = f === null, v = {
147
- ref: z,
148
- ...d ? {} : {
143
+ ), e = g ?? p(s === "fab" ? "whatsApp.fabLabel" : w === "question" ? "whatsApp.questionPrompt" : "whatsApp.label"), y = [
144
+ j({ variant: s, size: d }),
145
+ B({ position: h }),
146
+ z
147
+ ].filter(Boolean).join(" "), r = f === null, v = {
148
+ ref: x,
149
+ ...r ? {} : {
149
150
  href: f,
150
151
  target: "_blank",
151
152
  rel: "noopener noreferrer"
152
153
  },
153
- "aria-disabled": d ? !0 : void 0,
154
+ "aria-disabled": r ? !0 : void 0,
154
155
  "data-component": "whatsapp-button",
155
156
  "data-variant": s,
156
157
  onClick: (l) => {
157
158
  var b;
158
- d && l.preventDefault(), (b = n.onClick) == null || b.call(n, l);
159
+ r && l.preventDefault(), (b = n.onClick) == null || b.call(n, l);
159
160
  },
160
- className: x
161
- }, t = d ? null : p("link.opensInNewTab", "Opens in a new tab");
161
+ className: y
162
+ }, t = r ? null : p("link.opensInNewTab", "Opens in a new tab");
162
163
  if (s === "fab") {
163
164
  const l = typeof e == "string" ? t ? `${e} — ${t}` : e : void 0;
164
165
  return /* @__PURE__ */ c("a", { ...n, ...v, "aria-label": l, children: [
@@ -183,4 +184,4 @@ N.displayName = "WhatsAppButton";
183
184
  export {
184
185
  N as W
185
186
  };
186
- //# sourceMappingURL=whatsapp-button-CtlLwM3M.js.map
187
+ //# sourceMappingURL=whatsapp-button-DUjlWGKf.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.23.0",
3
+ "packageVersion": "0.24.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1617,6 +1617,41 @@
1617
1617
  }
1618
1618
  }
1619
1619
  },
1620
+ {
1621
+ "kind": "component",
1622
+ "id": "header-settings",
1623
+ "capabilities": [
1624
+ "view_change"
1625
+ ],
1626
+ "state": [],
1627
+ "actions": [
1628
+ {
1629
+ "name": "set_locale",
1630
+ "safety": "write",
1631
+ "argsType": "{ locale: string }",
1632
+ "description": "Switch the active locale to the given IETF tag."
1633
+ },
1634
+ {
1635
+ "name": "set_theme",
1636
+ "safety": "write",
1637
+ "argsType": "{ theme: \"light\" | \"dark\" | \"system\" }",
1638
+ "description": "Switch the theme preference."
1639
+ },
1640
+ {
1641
+ "name": "set_accessibility",
1642
+ "safety": "write",
1643
+ "argsType": "{ accessibility: \"default\" | \"accessible\" }",
1644
+ "description": "Switch the accessibility preference."
1645
+ }
1646
+ ],
1647
+ "domHooks": {
1648
+ "root": {
1649
+ "attr": "data-component",
1650
+ "value": "header-settings",
1651
+ "description": "Marks the HeaderSettings wrapper."
1652
+ }
1653
+ }
1654
+ },
1620
1655
  {
1621
1656
  "kind": "component",
1622
1657
  "id": "icon-button",
@@ -1747,6 +1782,29 @@
1747
1782
  }
1748
1783
  }
1749
1784
  },
1785
+ {
1786
+ "kind": "component",
1787
+ "id": "locale-picker",
1788
+ "capabilities": [
1789
+ "view_change"
1790
+ ],
1791
+ "state": [],
1792
+ "actions": [
1793
+ {
1794
+ "name": "set_locale",
1795
+ "safety": "write",
1796
+ "argsType": "{ locale: string }",
1797
+ "description": "Switch the active locale to the given IETF tag."
1798
+ }
1799
+ ],
1800
+ "domHooks": {
1801
+ "root": {
1802
+ "attr": "data-component",
1803
+ "value": "locale-picker",
1804
+ "description": "Marks the LocalePicker wrapper."
1805
+ }
1806
+ }
1807
+ },
1750
1808
  {
1751
1809
  "kind": "component",
1752
1810
  "id": "logo",
@@ -1,4 +1,4 @@
1
- import { A as e, a as o, b as m } from "../../_chunks/autocomplete-BxfabhZ8.js";
1
+ import { A as e, a as o, b as m } from "../../_chunks/autocomplete-C7xq06bP.js";
2
2
  export {
3
3
  e as Autocomplete,
4
4
  o as autocompleteAgent,
@@ -0,0 +1,56 @@
1
+ import type { CustomFilterProps, CustomFloatingFilterProps } from 'ag-grid-react';
2
+ import type { IFilter } from 'ag-grid-community';
3
+ /**
4
+ * Custom AG Grid filter component for numeric columns. AG Grid Community's
5
+ * built-in `agNumberColumnFilter` paints a stock browser-skinned
6
+ * `<input type="number">` that does not match the kit's form language —
7
+ * this wraps the DS `<NumberInput>` + `<Select>` so totals, prices,
8
+ * quantities, etc. line up visually with neighbouring DS-styled cells.
9
+ *
10
+ * Wire on a colDef:
11
+ * ```tsx
12
+ * {
13
+ * field: 'total',
14
+ * filter: NumberFilter,
15
+ * floatingFilterComponent: NumberFloatingFilter,
16
+ * filterParams: { defaultOperator: 'greaterThan', min: 0 },
17
+ * }
18
+ * ```
19
+ *
20
+ * The full-popover variant exposes the operator dropdown (equals,
21
+ * greaterThan, inRange, blank, …); the floating-filter row is a single
22
+ * compact input whose operator is fixed to `defaultOperator`. Both speak
23
+ * the same `NumberFilterModel` so server-side adapters can read either.
24
+ *
25
+ * Model shape `{ type, filter, filterTo? }` matches AG Grid's own
26
+ * `agNumberColumnFilter` vocabulary so adapters can interchange.
27
+ */
28
+ export type NumberFilterOperator = 'equals' | 'notEqual' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual' | 'inRange' | 'blank' | 'notBlank';
29
+ export interface NumberFilterModel {
30
+ type: NumberFilterOperator;
31
+ filter: number;
32
+ filterTo?: number;
33
+ }
34
+ export interface NumberFilterParams {
35
+ defaultOperator?: NumberFilterOperator;
36
+ min?: number;
37
+ max?: number;
38
+ step?: number;
39
+ placeholder?: string;
40
+ }
41
+ export declare function NumberFilter(props: CustomFilterProps<unknown, unknown, NumberFilterModel> & NumberFilterParams): import("react/jsx-runtime").JSX.Element;
42
+ /**
43
+ * Floating-filter companion for `NumberFilter`.
44
+ *
45
+ * Renders the kit's `<NumberInput>` directly as the inline filter input
46
+ * with a fixed operator (`defaultOperator`, or `'equals'`). The operator
47
+ * dropdown lives only in the full popover — the floating-filter row is
48
+ * deliberately compact, matching the way `agNumberColumnFilter` ships
49
+ * with AG Grid Community.
50
+ *
51
+ * Debounced commit at 200 ms so each keystroke does not re-run the grid
52
+ * filter. Empty input or invalid number commits `null` so the column
53
+ * reverts to "no filter" rather than `filter: NaN`.
54
+ */
55
+ export declare function NumberFloatingFilter(props: CustomFloatingFilterProps<IFilter, unknown, unknown, NumberFilterModel>): import("react/jsx-runtime").JSX.Element;
56
+ //# sourceMappingURL=number-filter.d.ts.map
@@ -0,0 +1,49 @@
1
+ import type { CustomFilterProps, CustomFloatingFilterProps } from 'ag-grid-react';
2
+ import type { IFilter } from 'ag-grid-community';
3
+ /**
4
+ * Custom AG Grid filter component — text-comparison filter.
5
+ *
6
+ * Fills the gap left by `agTextColumnFilter`'s stock browser-skinned
7
+ * input by wrapping the kit's `<TextInput>` and `<Select>` so the
8
+ * column-header menu (`TextFilter`) and the inline floating row
9
+ * (`TextFloatingFilter`) match the DS form language.
10
+ *
11
+ * Wire on a colDef:
12
+ * ```tsx
13
+ * {
14
+ * field: 'description',
15
+ * filter: TextFilter,
16
+ * floatingFilter: true,
17
+ * floatingFilterComponent: TextFloatingFilter,
18
+ * filterParams: { defaultOperator: 'contains' },
19
+ * }
20
+ * ```
21
+ *
22
+ * Model shape `{ type, filter }` mirrors AG Grid's `agTextColumnFilter`
23
+ * text-operator vocabulary (`contains`, `equals`, `startsWith`,
24
+ * `endsWith`, `notContains`) so server-side adapters that already
25
+ * understand the stock filter can read this one identically.
26
+ */
27
+ export type TextFilterOperator = 'contains' | 'equals' | 'startsWith' | 'endsWith' | 'notContains';
28
+ export interface TextFilterModel {
29
+ type: TextFilterOperator;
30
+ filter: string;
31
+ }
32
+ export interface TextFilterParams {
33
+ placeholder?: string;
34
+ defaultOperator?: TextFilterOperator;
35
+ }
36
+ export declare function TextFilter(props: CustomFilterProps<unknown, unknown, TextFilterModel> & TextFilterParams): import("react/jsx-runtime").JSX.Element;
37
+ /**
38
+ * Floating-filter companion for `TextFilter`.
39
+ *
40
+ * Renders a `<TextInput size="sm">` directly as the inline floating
41
+ * filter — leading search icon, optional trailing clear button, fixed
42
+ * operator (the popover version owns operator selection so the inline
43
+ * row stays compact).
44
+ *
45
+ * Commits debounce at 200ms; empty input commits `null` so the grid
46
+ * stops filtering as soon as the field is blank.
47
+ */
48
+ export declare function TextFloatingFilter(props: CustomFloatingFilterProps<IFilter, unknown, unknown, TextFilterModel>): import("react/jsx-runtime").JSX.Element;
49
+ //# sourceMappingURL=text-filter.d.ts.map
@@ -10,6 +10,10 @@ export { SelectFilter, SelectFloatingFilter } from './filters/select-filter';
10
10
  export type { SelectFilterModel, SelectFilterOption, SelectFilterParams, } from './filters/select-filter';
11
11
  export { TypeaheadFilter, TypeaheadFloatingFilter, } from './filters/typeahead-filter';
12
12
  export type { TypeaheadFilterModel, TypeaheadFilterOption, TypeaheadFilterParams, } from './filters/typeahead-filter';
13
+ export { TextFilter, TextFloatingFilter } from './filters/text-filter';
14
+ export type { TextFilterModel, TextFilterOperator, TextFilterParams, } from './filters/text-filter';
15
+ export { NumberFilter, NumberFloatingFilter } from './filters/number-filter';
16
+ export type { NumberFilterModel, NumberFilterOperator, NumberFilterParams, } from './filters/number-filter';
13
17
  export { StatusCellRenderer } from './cell-renderers/status-cell-renderer';
14
18
  export type { BadgeVariant, StatusCellRendererParams, } from './cell-renderers/status-cell-renderer';
15
19
  export { UserCellRenderer } from './cell-renderers/user-cell-renderer';
@@ -1,29 +1,33 @@
1
- import { A as l, B as r, C as s, a as t, D as n, b as d, c as o, d as C, E as i, e as R, I as g, L as T, S as F, f as b, g as c, T as u, h as D, i as f, j as p, k as y, l as E, U as S, m as h, n as m, u as x } from "../../_chunks/editable-currency-cell-renderer-1t42gENX.js";
1
+ import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-DJB5MxAI.js";
2
2
  export {
3
3
  l as ActionsCellRenderer,
4
4
  r as BalanceCellRenderer,
5
- s as ColorDotCellRenderer,
6
- t as CurrencyCellRenderer,
5
+ t as ColorDotCellRenderer,
6
+ s as CurrencyCellRenderer,
7
7
  n as DataTable,
8
8
  d as DateCellRenderer,
9
- o as DateRangeFilter,
10
- C as DateRangeFloatingFilter,
11
- i as EditableCurrencyCellRenderer,
9
+ i as DateRangeFilter,
10
+ o as DateRangeFloatingFilter,
11
+ C as EditableCurrencyCellRenderer,
12
12
  R as EditableTextCellRenderer,
13
- g as ImageCellRenderer,
14
- T as LinkCellRenderer,
15
- F as SelectFilter,
16
- b as SelectFloatingFilter,
17
- c as StatusCellRenderer,
18
- u as TagListCellRenderer,
19
- D as ToggleCellRenderer,
20
- f as Toolbar,
21
- p as ToolbarProvider,
22
- y as TypeaheadFilter,
23
- E as TypeaheadFloatingFilter,
24
- S as UserCellRenderer,
25
- h as dataTableAgent,
26
- m as defaultExportPdf,
27
- x as useTotalRow
13
+ F as ImageCellRenderer,
14
+ g as LinkCellRenderer,
15
+ T as NumberFilter,
16
+ b as NumberFloatingFilter,
17
+ u as SelectFilter,
18
+ c as SelectFloatingFilter,
19
+ D as StatusCellRenderer,
20
+ m as TagListCellRenderer,
21
+ p as TextFilter,
22
+ x as TextFloatingFilter,
23
+ f as ToggleCellRenderer,
24
+ y as Toolbar,
25
+ E as ToolbarProvider,
26
+ S as TypeaheadFilter,
27
+ h as TypeaheadFloatingFilter,
28
+ A as UserCellRenderer,
29
+ L as dataTableAgent,
30
+ N as defaultExportPdf,
31
+ k as useTotalRow
28
32
  };
29
33
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,205 @@
1
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
+ import { forwardRef as k, useRef as l, useImperativeHandle as T, useCallback as A, useMemo as C } from "react";
3
+ import { c as R } from "../../_chunks/index-D2ZczOXr.js";
4
+ import { useTranslation as N } from "react-i18next";
5
+ import { I } from "../../_chunks/icon-button-C4CGcYuz.js";
6
+ import { D as i } from "../../_chunks/dropdown-menu-DZxwF23X.js";
7
+ import { S as E } from "../../_chunks/switch-D916VW86.js";
8
+ import { c as b, a as M, L as _ } from "../../_chunks/locale-picker-CYBhgSHR.js";
9
+ import { u as H } from "../../_chunks/use-locale-BkCIHujH.js";
10
+ import { u as O } from "../../_chunks/use-theme-B1cwAXJR.js";
11
+ import { u as P } from "../../_chunks/registry-C9nwlNyL.js";
12
+ import { S as x } from "../../_chunks/settings-ca2Yi9R8.js";
13
+ import { S as K, M as j, a as z } from "../../_chunks/sun-Eweh5fvi.js";
14
+ const D = {
15
+ id: "header-settings",
16
+ capabilities: ["view_change"],
17
+ state: {},
18
+ actions: {
19
+ set_locale: {
20
+ safety: "write",
21
+ argsType: "{ locale: string }",
22
+ descriptionKey: "ui.agent.headerSettings.actions.setLocale",
23
+ description: "Switch the active locale to the given IETF tag.",
24
+ invoke: (t, s) => {
25
+ t.setLocale(s.locale);
26
+ }
27
+ },
28
+ set_theme: {
29
+ safety: "write",
30
+ argsType: '{ theme: "light" | "dark" | "system" }',
31
+ descriptionKey: "ui.agent.headerSettings.actions.setTheme",
32
+ description: "Switch the theme preference.",
33
+ invoke: (t, s) => {
34
+ t.setTheme(s.theme);
35
+ }
36
+ },
37
+ set_accessibility: {
38
+ safety: "write",
39
+ argsType: '{ accessibility: "default" | "accessible" }',
40
+ descriptionKey: "ui.agent.headerSettings.actions.setAccessibility",
41
+ description: "Switch the accessibility preference.",
42
+ invoke: (t, s) => {
43
+ t.setAccessibility(s.accessibility);
44
+ }
45
+ }
46
+ },
47
+ domHooks: {
48
+ root: {
49
+ attr: "data-component",
50
+ value: "header-settings",
51
+ description: "Marks the HeaderSettings wrapper."
52
+ }
53
+ }
54
+ };
55
+ function V(t, s) {
56
+ if (!(typeof window > "u"))
57
+ try {
58
+ window.localStorage.setItem(t, s);
59
+ } catch {
60
+ }
61
+ }
62
+ function G(t) {
63
+ if (typeof document > "u") return;
64
+ const s = document.documentElement;
65
+ s.lang = t, s.dir = b[t].dir;
66
+ }
67
+ const W = R("ds:inline-flex ds:items-center", {
68
+ variants: {
69
+ align: {
70
+ start: "",
71
+ end: ""
72
+ }
73
+ },
74
+ defaultVariants: { align: "end" }
75
+ }), B = [
76
+ "ds:w-[20rem] ds:p-[var(--spacing-xs)]",
77
+ "ds:rounded-[var(--radius-md)] ds:border ds:border-border",
78
+ "ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]"
79
+ ].join(" "), F = k(
80
+ (t, s) => {
81
+ const {
82
+ align: g = "end",
83
+ disabled: y = !1,
84
+ className: S,
85
+ id: p,
86
+ ...v
87
+ } = t, { t: r } = N(), n = O(), { setLocale: m } = H(), h = l(null);
88
+ T(s, () => h.current, []);
89
+ const u = A(
90
+ (e) => {
91
+ m(e), G(e), V(_, e);
92
+ },
93
+ [m]
94
+ ), f = l(u);
95
+ f.current = u;
96
+ const c = l(n);
97
+ c.current = n;
98
+ const w = C(
99
+ () => ({
100
+ setLocale: (e) => {
101
+ Object.prototype.hasOwnProperty.call(b, e) && f.current(e);
102
+ },
103
+ setTheme: (e) => c.current.setTheme(e),
104
+ setAccessibility: (e) => c.current.setAccessibility(e)
105
+ }),
106
+ []
107
+ );
108
+ P(D, w, p);
109
+ const L = n.accessibility === "accessible";
110
+ return /* @__PURE__ */ a(
111
+ "div",
112
+ {
113
+ ref: h,
114
+ "data-component": "header-settings",
115
+ "data-component-id": p,
116
+ className: W({ align: g, className: S }),
117
+ ...v,
118
+ children: /* @__PURE__ */ o(i.Root, { children: [
119
+ /* @__PURE__ */ a(i.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
120
+ I,
121
+ {
122
+ disabled: y,
123
+ icon: /* @__PURE__ */ a(x, { "aria-hidden": !0 }),
124
+ "aria-label": r("navigation.headerSettings.trigger")
125
+ }
126
+ ) }),
127
+ /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ o(
128
+ i.Content,
129
+ {
130
+ align: g,
131
+ sideOffset: 8,
132
+ className: B,
133
+ onKeyDownCapture: (e) => {
134
+ const d = e.target;
135
+ (d == null ? void 0 : d.tagName) === "INPUT" && // Always allow Escape so the menu can close.
136
+ e.key !== "Escape" && e.stopPropagation();
137
+ },
138
+ children: [
139
+ /* @__PURE__ */ a(i.Label, { children: r("navigation.headerSettings.language.label") }),
140
+ /* @__PURE__ */ a(
141
+ "div",
142
+ {
143
+ role: "group",
144
+ "aria-label": r("navigation.headerSettings.language.label"),
145
+ className: "ds:py-[var(--spacing-xs)]",
146
+ children: /* @__PURE__ */ a(M.SearchList, {})
147
+ }
148
+ ),
149
+ /* @__PURE__ */ a(i.Separator, {}),
150
+ /* @__PURE__ */ a(i.Label, { children: r("navigation.headerSettings.appearance.label") }),
151
+ /* @__PURE__ */ o(
152
+ i.RadioGroup,
153
+ {
154
+ value: n.theme,
155
+ onValueChange: (e) => n.setTheme(e),
156
+ children: [
157
+ /* @__PURE__ */ o(i.RadioItem, { value: "light", children: [
158
+ /* @__PURE__ */ a(K, { "aria-hidden": !0, className: "ds:size-4" }),
159
+ r("navigation.headerSettings.appearance.light")
160
+ ] }),
161
+ /* @__PURE__ */ o(i.RadioItem, { value: "dark", children: [
162
+ /* @__PURE__ */ a(j, { "aria-hidden": !0, className: "ds:size-4" }),
163
+ r("navigation.headerSettings.appearance.dark")
164
+ ] }),
165
+ /* @__PURE__ */ o(i.RadioItem, { value: "system", children: [
166
+ /* @__PURE__ */ a(z, { "aria-hidden": !0, className: "ds:size-4" }),
167
+ r("navigation.headerSettings.appearance.system")
168
+ ] })
169
+ ]
170
+ }
171
+ ),
172
+ /* @__PURE__ */ a(i.Separator, {}),
173
+ /* @__PURE__ */ a(
174
+ "div",
175
+ {
176
+ role: "group",
177
+ "aria-label": r(
178
+ "navigation.headerSettings.appearance.accessible"
179
+ ),
180
+ className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]",
181
+ children: /* @__PURE__ */ a(
182
+ E,
183
+ {
184
+ label: r("navigation.headerSettings.appearance.accessible"),
185
+ labelSide: "start",
186
+ size: "sm",
187
+ checked: L,
188
+ onCheckedChange: (e) => n.setAccessibility(e ? "accessible" : "default")
189
+ }
190
+ )
191
+ }
192
+ )
193
+ ]
194
+ }
195
+ ) })
196
+ ] })
197
+ }
198
+ );
199
+ }
200
+ );
201
+ F.displayName = "HeaderSettings";
202
+ export {
203
+ F as HeaderSettings
204
+ };
205
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ import { L, a as c, b as r } from "../../_chunks/locale-picker-CYBhgSHR.js";
2
+ export {
3
+ L as LOCALE_STORAGE_KEY,
4
+ c as LocalePicker,
5
+ r as LocalePickerSearchList
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { T as o, t } from "../../_chunks/theme-toggle-BswYl0Yp.js";
1
+ import { T as o, t } from "../../_chunks/theme-toggle-FrotC2VI.js";
2
2
  export {
3
3
  o as ThemeToggle,
4
4
  t as themeToggleAgent
@@ -1,4 +1,4 @@
1
- import { W as p } from "../../_chunks/whatsapp-button-CtlLwM3M.js";
1
+ import { W as p } from "../../_chunks/whatsapp-button-DUjlWGKf.js";
2
2
  export {
3
3
  p as WhatsAppButton
4
4
  };