@tedi-design-system/react 18.0.0-rc.5 → 18.0.0-rc.7

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 (42) hide show
  1. package/bundle-stats.html +1 -1
  2. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
  3. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
  4. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
  5. package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
  6. package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
  7. package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
  8. package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
  9. package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
  10. package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
  11. package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
  12. package/external/prop-types/external/react-is/index.cjs.js +1 -1
  13. package/external/prop-types/external/react-is/index.es.js +1 -1
  14. package/index.css +1 -1
  15. package/package.json +1 -1
  16. package/src/tedi/components/content/calendar/calendar.cjs.js +1 -1
  17. package/src/tedi/components/content/calendar/calendar.d.ts +9 -1
  18. package/src/tedi/components/content/calendar/calendar.es.js +72 -71
  19. package/src/tedi/components/content/calendar/calendar.module.scss.cjs.js +1 -1
  20. package/src/tedi/components/content/calendar/calendar.module.scss.es.js +3 -2
  21. package/src/tedi/components/filter/filter/filter-group-context.cjs.js +1 -0
  22. package/src/tedi/components/filter/filter/filter-group-context.d.ts +8 -0
  23. package/src/tedi/components/filter/filter/filter-group-context.es.js +5 -0
  24. package/src/tedi/components/filter/filter/filter-group.cjs.js +1 -0
  25. package/src/tedi/components/filter/filter/filter-group.d.ts +94 -0
  26. package/src/tedi/components/filter/filter/filter-group.es.js +64 -0
  27. package/src/tedi/components/filter/filter/filter.cjs.js +1 -0
  28. package/src/tedi/components/filter/filter/filter.d.ts +98 -0
  29. package/src/tedi/components/filter/filter/filter.es.js +236 -0
  30. package/src/tedi/components/filter/filter/filter.module.scss.cjs.js +1 -0
  31. package/src/tedi/components/filter/filter/filter.module.scss.es.js +21 -0
  32. package/src/tedi/components/filter/filter/index.d.ts +3 -0
  33. package/src/tedi/components/form/search/search.cjs.js +1 -1
  34. package/src/tedi/components/form/search/search.es.js +22 -20
  35. package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
  36. package/src/tedi/components/overlays/overlay/overlay-content.es.js +35 -32
  37. package/src/tedi/index.d.ts +1 -0
  38. package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
  39. package/src/tedi/providers/label-provider/labels-map.d.ts +14 -0
  40. package/src/tedi/providers/label-provider/labels-map.es.js +17 -3
  41. package/tedi.cjs.js +1 -1
  42. package/tedi.es.js +116 -110
@@ -0,0 +1,236 @@
1
+ import { jsxs as p, Fragment as g, jsx as t } from "react/jsx-runtime";
2
+ import ue from "../../../../../external/classnames/index.es.js";
3
+ import Je, { forwardRef as Ke, useContext as Qe, useRef as Ue, useState as O, useMemo as S, useEffect as Ve, useCallback as C } from "react";
4
+ import { Icon as fe } from "../../base/icon/icon.es.js";
5
+ import { Button as J } from "../../buttons/button/button.es.js";
6
+ import { Checkbox as me } from "../../form/checkbox/checkbox.es.js";
7
+ import { Search as Xe } from "../../form/search/search.es.js";
8
+ import { Dropdown as c } from "../../overlays/dropdown/dropdown.es.js";
9
+ import { StatusBadge as Ye } from "../../tags/status-badge/status-badge.es.js";
10
+ import i from "./filter.module.scss.es.js";
11
+ import { FilterGroupContext as et } from "./filter-group-context.es.js";
12
+ import { useBreakpointProps as tt } from "../../../helpers/hooks/use-breakpoint-props.es.js";
13
+ import { useLabels as lt } from "../../../providers/label-provider/use-labels.es.js";
14
+ const he = (_) => _ === "large" ? 24 : 18, rt = (_) => {
15
+ const v = Je.useId();
16
+ return _ ?? `tedi-filter-${v.replace(/[^a-zA-Z0-9-]/g, "")}`;
17
+ }, it = Ke((_, v) => {
18
+ const { getCurrentBreakpointProps: pe } = tt(_.defaultServerBreakpoint), {
19
+ text: w,
20
+ value: k,
21
+ disabled: ve = !1,
22
+ className: be,
23
+ id: K,
24
+ selected: y,
25
+ defaultSelected: Q = !1,
26
+ onSelectedChange: I,
27
+ selectedValue: L,
28
+ defaultSelectedValue: ge,
29
+ onSelectedValueChange: d,
30
+ multiselect: U = !1,
31
+ selectedValues: u,
32
+ defaultSelectedValues: Se,
33
+ onSelectedValuesChange: s,
34
+ options: N = [],
35
+ searchable: _e = !1,
36
+ showSelectAll: we = !1,
37
+ selectAllLabel: Le,
38
+ showClear: V = !1,
39
+ clearLabel: Ne,
40
+ preserveLabel: X = !1,
41
+ children: Y,
42
+ onClear: P,
43
+ prepend: A,
44
+ hidePrependWhenSelected: xe = !0,
45
+ append: R,
46
+ placement: Ce = "bottom-start",
47
+ variant: ke = "primary",
48
+ size: M = "default",
49
+ searchLabel: ee
50
+ } = pe(_), { getLabel: te } = lt(), ye = Le ?? te("filter.select-all"), le = Ne ?? te("filter.clear-selection"), n = Qe(et), B = rt(K), Ie = Ue(null), G = N.length > 0, $ = !!Y, b = G || $, f = G && !U, m = G && U, F = !!(n != null && n.isManaged) && k !== void 0 && !b, D = F && !(n != null && n.multiselect), re = ve || ((n == null ? void 0 : n.disabled) ?? !1), [Be, $e] = O(Q), [Fe, ie] = O(ge ?? ""), [Oe, j] = O(Se ?? []);
51
+ $ && (Q || I) && y === void 0 && console.warn(
52
+ "[Filter] `defaultSelected` and `onSelectedChange` are not honoured in custom-content mode (when `children` is provided). Drive the selected state yourself via the controlled `selected` prop, e.g. `selected={Boolean(value)}`."
53
+ );
54
+ const T = y !== void 0 ? y : Be, h = L !== void 0 ? L : Fe, r = u !== void 0 ? u : Oe, x = S(() => F ? n.isSelected(k) : m ? r.length > 0 : f ? h !== "" : T, [F, k, n, m, r, f, h, T]), z = S(() => {
55
+ var e;
56
+ return !f || !h ? null : ((e = N.find((l) => l.value === h)) == null ? void 0 : e.label) ?? null;
57
+ }, [f, h, N]), Pe = S(() => f ? z && X ? `${w}: ${z}` : z ?? w : w, [f, z, X, w]), [E, ne] = O(!1), [W, se] = O("");
58
+ Ve(() => {
59
+ E || se("");
60
+ }, [E]);
61
+ const Z = S(() => {
62
+ const e = W.trim().toLowerCase();
63
+ return e ? N.filter((l) => l.label.toLowerCase().includes(e)) : N;
64
+ }, [W, N]), a = S(() => Z.filter((e) => !e.disabled), [Z]), q = S(() => a.length === 0 ? !1 : a.every((e) => r.includes(e.value)), [a, r]), Te = S(() => {
65
+ if (a.length === 0) return !1;
66
+ const e = a.filter((l) => r.includes(l.value)).length;
67
+ return e > 0 && e < a.length;
68
+ }, [a, r]), ze = C(
69
+ (e) => {
70
+ Ie.current = e, typeof v == "function" ? v(e) : v && (v.current = e);
71
+ },
72
+ [v]
73
+ ), Ae = C(() => {
74
+ if (F) {
75
+ n.selectFilter(k);
76
+ return;
77
+ }
78
+ const e = !T;
79
+ y === void 0 && $e(e), I == null || I(e);
80
+ }, [F, n, k, T, y, I]), Re = C(
81
+ (e) => {
82
+ const l = h === e ? "" : e;
83
+ L === void 0 && ie(l), d == null || d(l);
84
+ },
85
+ [h, L, d]
86
+ ), Me = C(
87
+ (e) => {
88
+ const l = r.includes(e) ? r.filter((o) => o !== e) : [...r, e];
89
+ u === void 0 && j(l), s == null || s(l);
90
+ },
91
+ [r, u, s]
92
+ ), Ge = C(() => {
93
+ let e;
94
+ if (q) {
95
+ const l = new Set(a.map((o) => o.value));
96
+ e = r.filter((o) => !l.has(o));
97
+ } else {
98
+ const l = new Set(r);
99
+ a.forEach((o) => l.add(o.value)), e = [...l];
100
+ }
101
+ u === void 0 && j(e), s == null || s(e);
102
+ }, [q, a, r, u, s]), ae = C(() => {
103
+ $ ? P == null || P() : m ? (u === void 0 && j([]), s == null || s([])) : f && (L === void 0 && ie(""), d == null || d("")), ne(!1);
104
+ }, [
105
+ $,
106
+ P,
107
+ m,
108
+ u,
109
+ s,
110
+ f,
111
+ L,
112
+ d
113
+ ]), De = x && xe, je = D ? "radio" : void 0, Ee = D ? x : void 0, We = !b && !D ? x : void 0, Ze = /* @__PURE__ */ p(g, { children: [
114
+ !b && x && /* @__PURE__ */ t(fe, { className: i["tedi-filter__icon"], name: "check", size: he(M), color: "inherit" }),
115
+ A != null && /* @__PURE__ */ t(
116
+ "span",
117
+ {
118
+ className: ue(i["tedi-filter__prepend"], {
119
+ [i["tedi-filter__prepend--hidden"]]: De
120
+ }),
121
+ children: A
122
+ }
123
+ ),
124
+ /* @__PURE__ */ t("span", { className: i["tedi-filter__text"], children: Pe }),
125
+ R != null && /* @__PURE__ */ t("span", { className: i["tedi-filter__append"], children: R }),
126
+ m && x && r.length > 0 && /* @__PURE__ */ t(Ye, { className: i["tedi-filter__count"], color: re ? "neutral" : "brand", children: String(r.length) }),
127
+ b && /* @__PURE__ */ t(
128
+ fe,
129
+ {
130
+ className: i["tedi-filter__icon"],
131
+ name: "arrow_drop_down",
132
+ filled: !0,
133
+ size: he(M),
134
+ color: "inherit"
135
+ }
136
+ )
137
+ ] }), oe = ue(
138
+ i["tedi-filter"],
139
+ i[`tedi-filter--${ke}`],
140
+ M === "large" && i["tedi-filter--large"],
141
+ x && i["tedi-filter--selected"],
142
+ be
143
+ ), ce = /* @__PURE__ */ t(
144
+ J,
145
+ {
146
+ ref: ze,
147
+ id: K,
148
+ type: "button",
149
+ disabled: re,
150
+ className: i["tedi-filter__button"],
151
+ onClick: b ? void 0 : Ae,
152
+ role: b ? void 0 : je,
153
+ "aria-checked": Ee,
154
+ "aria-pressed": We,
155
+ noStyle: !0,
156
+ children: Ze
157
+ }
158
+ );
159
+ if (!b)
160
+ return /* @__PURE__ */ t("div", { className: oe, children: ce });
161
+ const H = m && we ? 0 : null, qe = H !== null ? 1 : 0, He = () => Z.map((e, l) => {
162
+ const o = m ? r.includes(e.value) : h === e.value, de = l + qe;
163
+ return m ? /* @__PURE__ */ t(c.Item, { index: de, asChild: !0, disabled: e.disabled, closeOnSelect: !1, children: /* @__PURE__ */ t(
164
+ me,
165
+ {
166
+ id: `${B}-option-${l}`,
167
+ label: e.label,
168
+ value: e.value,
169
+ checked: o,
170
+ disabled: e.disabled,
171
+ onChange: () => Me(e.value),
172
+ name: `${B}-options`
173
+ }
174
+ ) }, e.value) : /* @__PURE__ */ t(
175
+ c.Item,
176
+ {
177
+ index: de,
178
+ disabled: e.disabled,
179
+ active: o,
180
+ onClick: () => Re(e.value),
181
+ children: e.label
182
+ },
183
+ e.value
184
+ );
185
+ });
186
+ return /* @__PURE__ */ t("div", { className: oe, children: /* @__PURE__ */ p(c, { open: E, onOpenChange: ne, placement: Ce, width: "auto", children: [
187
+ /* @__PURE__ */ t(c.Trigger, { children: ce }),
188
+ /* @__PURE__ */ t(c.Content, { children: $ ? /* @__PURE__ */ p(g, { children: [
189
+ /* @__PURE__ */ t("div", { className: i["tedi-filter-dropdown__custom-content"], children: Y }),
190
+ V && /* @__PURE__ */ p(g, { children: [
191
+ /* @__PURE__ */ t(c.Separator, {}),
192
+ /* @__PURE__ */ t("div", { className: i["tedi-filter-dropdown__clear"], children: /* @__PURE__ */ t(J, { visualType: "neutral", size: "small", type: "button", iconLeft: "refresh", onClick: ae, children: le }) })
193
+ ] })
194
+ ] }) : /* @__PURE__ */ p(g, { children: [
195
+ _e && /* @__PURE__ */ p(g, { children: [
196
+ /* @__PURE__ */ t("div", { className: i["tedi-filter-dropdown__search"], children: /* @__PURE__ */ t(
197
+ Xe,
198
+ {
199
+ id: `${B}-search`,
200
+ label: ee ?? w,
201
+ hideLabel: !0,
202
+ ariaLabel: ee ?? w,
203
+ value: W,
204
+ onChange: se
205
+ }
206
+ ) }),
207
+ /* @__PURE__ */ t(c.Separator, {})
208
+ ] }),
209
+ H !== null && /* @__PURE__ */ p(g, { children: [
210
+ /* @__PURE__ */ t(c.Item, { index: H, asChild: !0, closeOnSelect: !1, children: /* @__PURE__ */ t(
211
+ me,
212
+ {
213
+ id: `${B}-select-all`,
214
+ label: ye,
215
+ value: "select-all",
216
+ checked: q,
217
+ indeterminate: Te,
218
+ onChange: Ge,
219
+ name: `${B}-select-all`
220
+ }
221
+ ) }),
222
+ /* @__PURE__ */ t(c.Separator, {})
223
+ ] }),
224
+ He(),
225
+ V && /* @__PURE__ */ p(g, { children: [
226
+ /* @__PURE__ */ t(c.Separator, {}),
227
+ /* @__PURE__ */ t("div", { className: i["tedi-filter-dropdown__clear"], children: /* @__PURE__ */ t(J, { visualType: "neutral", size: "small", type: "button", iconLeft: "refresh", onClick: ae, children: le }) })
228
+ ] })
229
+ ] }) })
230
+ ] }) });
231
+ });
232
+ it.displayName = "Filter";
233
+ export {
234
+ it as Filter,
235
+ it as default
236
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-filter":"tedi-filter-e3f2f618","tedi-filter__button":"tedi-filter__button-b7abc5ed","tedi-filter__text":"tedi-filter__text-2c4eaab6","tedi-filter__icon":"tedi-filter__icon-1b8e93f2","tedi-filter__prepend":"tedi-filter__prepend-68dc0007","tedi-filter__append":"tedi-filter__append-bdb27679","tedi-filter__prepend--hidden":"tedi-filter__prepend--hidden-5039af1e","tedi-filter__count":"tedi-filter__count-d72acead","tedi-filter--primary":"tedi-filter--primary-837108e8","tedi-filter--selected":"tedi-filter--selected-7273f310","tedi-filter--secondary":"tedi-filter--secondary-8aaf488e","tedi-filter--large":"tedi-filter--large-f7f46174","tedi-filter-group":"tedi-filter-group-9d16304d","tedi-filter-dropdown__custom-content":"tedi-filter-dropdown__custom-content-6e851b26","tedi-filter-dropdown__search":"tedi-filter-dropdown__search-dbb4e1a3","tedi-filter-dropdown__clear":"tedi-filter-dropdown__clear-fa4e6a11"};exports.default=e;
@@ -0,0 +1,21 @@
1
+ const e = {
2
+ "tedi-filter": "tedi-filter-e3f2f618",
3
+ "tedi-filter__button": "tedi-filter__button-b7abc5ed",
4
+ "tedi-filter__text": "tedi-filter__text-2c4eaab6",
5
+ "tedi-filter__icon": "tedi-filter__icon-1b8e93f2",
6
+ "tedi-filter__prepend": "tedi-filter__prepend-68dc0007",
7
+ "tedi-filter__append": "tedi-filter__append-bdb27679",
8
+ "tedi-filter__prepend--hidden": "tedi-filter__prepend--hidden-5039af1e",
9
+ "tedi-filter__count": "tedi-filter__count-d72acead",
10
+ "tedi-filter--primary": "tedi-filter--primary-837108e8",
11
+ "tedi-filter--selected": "tedi-filter--selected-7273f310",
12
+ "tedi-filter--secondary": "tedi-filter--secondary-8aaf488e",
13
+ "tedi-filter--large": "tedi-filter--large-f7f46174",
14
+ "tedi-filter-group": "tedi-filter-group-9d16304d",
15
+ "tedi-filter-dropdown__custom-content": "tedi-filter-dropdown__custom-content-6e851b26",
16
+ "tedi-filter-dropdown__search": "tedi-filter-dropdown__search-dbb4e1a3",
17
+ "tedi-filter-dropdown__clear": "tedi-filter-dropdown__clear-fa4e6a11"
18
+ };
19
+ export {
20
+ e as default
21
+ };
@@ -0,0 +1,3 @@
1
+ export * from './filter';
2
+ export * from './filter-group';
3
+ export * from './filter-group-context';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("../../../../../external/classnames/index.cjs.js"),j=require("react"),v=require("../../buttons/button/button.cjs.js"),L=require("../textfield/textfield.cjs.js"),s=require("./search.module.scss.cjs.js"),N=require("../../../providers/label-provider/use-labels.cjs.js"),u=j.forwardRef(({placeholder:c,isClearable:d=!0,searchIcon:n="search",onSearch:a,onChange:o,button:e,ariaLabel:f,className:h,...t},_)=>{const{getLabel:l}=N.useLabels(),m=y=>{y.key==="Enter"&&(a==null||a(t.value))},x=()=>{a==null||a(t.value)},b={...t,ref:_,inputClassName:i.default(s.default["tedi-search__input"],e&&s.default["tedi-search__input--has-button"],h),placeholder:c,isClearable:d,onKeyDown:m,onChange:o,...e?{}:{icon:n}},p=c||l("search"),q=f??p;return r.jsxs("div",{className:i.default(s.default["tedi-search__wrapper"]),role:"search","aria-label":q,children:[r.jsx(L.TextField,{...b}),e&&r.jsx(v.Button,{...e,onClick:x,className:i.default(s.default["tedi-search__button"],e.className),"aria-label":e.children?void 0:l("search"),children:e.children??l("search")})]})});u.displayName="Search";exports.Search=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),i=require("../../../../../external/classnames/index.cjs.js"),v=require("react"),L=require("../../buttons/button/button.cjs.js"),N=require("../textfield/textfield.cjs.js"),s=require("./search.module.scss.cjs.js"),w=require("../../../providers/label-provider/use-labels.cjs.js"),u=v.forwardRef(({placeholder:c,isClearable:d=!0,searchIcon:n="search",onSearch:a,onChange:o,button:e,ariaLabel:f,className:h,input:x,...t},_)=>{const{getLabel:r}=w.useLabels(),b=j=>{j.key==="Enter"&&(a==null||a(t.value))},m=()=>{a==null||a(t.value)},p={...t,ref:_,inputClassName:i.default(s.default["tedi-search__input"],e&&s.default["tedi-search__input--has-button"],h),placeholder:c,isClearable:d,onKeyDown:b,onChange:o,input:{...x,role:"searchbox"},...e?{}:{icon:n}},q=c||r("search"),y=f??q;return l.jsxs("div",{className:i.default(s.default["tedi-search__wrapper"]),role:"search","aria-label":y,children:[l.jsx(N.TextField,{...p}),e&&l.jsx(L.Button,{...e,onClick:m,className:i.default(s.default["tedi-search__button"],e.className),"aria-label":e.children?void 0:r("search"),children:e.children??r("search")})]})});u.displayName="Search";exports.Search=u;
@@ -1,40 +1,42 @@
1
- import { jsxs as v, jsx as c } from "react/jsx-runtime";
1
+ import { jsxs as w, jsx as c } from "react/jsx-runtime";
2
2
  import l from "../../../../../external/classnames/index.es.js";
3
- import { forwardRef as w } from "react";
4
- import { Button as L } from "../../buttons/button/button.es.js";
3
+ import { forwardRef as L } from "react";
4
+ import { Button as b } from "../../buttons/button/button.es.js";
5
5
  import { TextField as k } from "../textfield/textfield.es.js";
6
6
  import a from "./search.module.scss.es.js";
7
7
  import { useLabels as C } from "../../../providers/label-provider/use-labels.es.js";
8
- const b = w(
8
+ const j = L(
9
9
  ({
10
10
  placeholder: t,
11
- isClearable: m = !0,
12
- searchIcon: o = "search",
11
+ isClearable: o = !0,
12
+ searchIcon: m = "search",
13
13
  onSearch: s,
14
14
  onChange: d,
15
15
  button: e,
16
16
  ariaLabel: p,
17
17
  className: n,
18
+ input: f,
18
19
  ...r
19
- }, f) => {
20
- const { getLabel: i } = C(), h = (y) => {
21
- y.key === "Enter" && (s == null || s(r.value));
20
+ }, h) => {
21
+ const { getLabel: i } = C(), u = (v) => {
22
+ v.key === "Enter" && (s == null || s(r.value));
22
23
  }, _ = () => {
23
24
  s == null || s(r.value);
24
- }, u = {
25
+ }, x = {
25
26
  ...r,
26
- ref: f,
27
+ ref: h,
27
28
  inputClassName: l(a["tedi-search__input"], e && a["tedi-search__input--has-button"], n),
28
29
  placeholder: t,
29
- isClearable: m,
30
- onKeyDown: h,
30
+ isClearable: o,
31
+ onKeyDown: u,
31
32
  onChange: d,
32
- ...e ? {} : { icon: o }
33
- }, N = t || i("search"), x = p ?? N;
34
- return /* @__PURE__ */ v("div", { className: l(a["tedi-search__wrapper"]), role: "search", "aria-label": x, children: [
35
- /* @__PURE__ */ c(k, { ...u }),
33
+ input: { ...f, role: "searchbox" },
34
+ ...e ? {} : { icon: m }
35
+ }, N = t || i("search"), y = p ?? N;
36
+ return /* @__PURE__ */ w("div", { className: l(a["tedi-search__wrapper"]), role: "search", "aria-label": y, children: [
37
+ /* @__PURE__ */ c(k, { ...x }),
36
38
  e && /* @__PURE__ */ c(
37
- L,
39
+ b,
38
40
  {
39
41
  ...e,
40
42
  onClick: _,
@@ -46,7 +48,7 @@ const b = w(
46
48
  ] });
47
49
  }
48
50
  );
49
- b.displayName = "Search";
51
+ j.displayName = "Search";
50
52
  export {
51
- b as Search
53
+ j as Search
52
54
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),d=require("react"),j=require("./overlay.cjs.js"),F=s=>{const{children:u,classNames:e,labelledBy:y,describedBy:f}=s,{open:l,x:m,y:h,strategy:g,focusManager:o,floating:b,arrowRef:v,getFloatingProps:x,placement:w,context:i,arrow:t,scrollLock:c,contentId:p}=d.useContext(j.OverlayContext);return d.useEffect(()=>{c&&(l?(document.documentElement.style.overflow="hidden",document.documentElement.scrollHeight>window.innerHeight&&(document.body.style.overflow="scroll")):(document.documentElement.style.overflow="",document.body.style.overflow=""))},[l,c]),l?n.jsx(r.FloatingPortal,{children:n.jsx(r.FloatingFocusManager,{modal:(o==null?void 0:o.modal)||!1,...o,context:i,children:n.jsxs("div",{...x({ref:b,tabIndex:-1,id:p,"aria-labelledby":y,"aria-describedby":f,style:{position:g,left:m,top:h},className:e==null?void 0:e.content}),"data-placement":w,"data-testid":"overlay-content",children:[n.jsx(r.FloatingArrow,{ref:a=>v.current=a,context:i,className:e==null?void 0:e.arrow,height:t==null?void 0:t.height,width:t==null?void 0:t.width,"data-testid":"overlay-arrow"}),u]})})}):null};exports.OverlayContent=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),s=require("react"),q=require("./overlay.cjs.js"),C=u=>{const{children:y,classNames:e,labelledBy:f,describedBy:m}=u,{open:l,x:g,y:h,strategy:b,focusManager:o,floating:v,arrowRef:x,getFloatingProps:w,placement:p,context:i,arrow:t,scrollLock:c,contentId:j,role:F}=s.useContext(q.OverlayContext);if(s.useEffect(()=>{c&&(l?(document.documentElement.style.overflow="hidden",document.documentElement.scrollHeight>window.innerHeight&&(document.body.style.overflow="scroll")):(document.documentElement.style.overflow="",document.body.style.overflow=""))},[l,c]),!l)return null;const a=n.jsxs("div",{...w({ref:v,tabIndex:-1,id:j,"aria-labelledby":f,"aria-describedby":m,style:{position:b,left:g,top:h},className:e==null?void 0:e.content}),"data-placement":p,"data-testid":"overlay-content",children:[n.jsx(r.FloatingArrow,{ref:d=>x.current=d,context:i,className:e==null?void 0:e.arrow,height:t==null?void 0:t.height,width:t==null?void 0:t.width,"data-testid":"overlay-arrow"}),y]});return n.jsx(r.FloatingPortal,{children:F==="tooltip"?a:n.jsx(r.FloatingFocusManager,{modal:(o==null?void 0:o.modal)||!1,...o,context:i,children:a})})};exports.OverlayContent=C;
@@ -1,48 +1,50 @@
1
- import { jsx as n, jsxs as w } from "react/jsx-runtime";
2
- import { FloatingPortal as x, FloatingFocusManager as F, FloatingArrow as E } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
- import { useContext as C, useEffect as j } from "react";
4
- import { OverlayContext as B } from "./overlay.es.js";
5
- const S = (a) => {
6
- const { children: c, classNames: e, labelledBy: s, describedBy: m } = a, {
1
+ import { jsxs as F, jsx as n } from "react/jsx-runtime";
2
+ import { FloatingArrow as E, FloatingPortal as C, FloatingFocusManager as j } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
+ import { useContext as B, useEffect as H } from "react";
4
+ import { OverlayContext as I } from "./overlay.es.js";
5
+ const A = (c) => {
6
+ const { children: s, classNames: e, labelledBy: m, describedBy: f } = c, {
7
7
  open: l,
8
- x: f,
9
- y,
10
- strategy: h,
8
+ x: y,
9
+ y: h,
10
+ strategy: u,
11
11
  focusManager: o,
12
- floating: u,
13
- arrowRef: b,
14
- getFloatingProps: g,
15
- placement: p,
12
+ floating: g,
13
+ arrowRef: p,
14
+ getFloatingProps: b,
15
+ placement: v,
16
16
  context: r,
17
17
  arrow: t,
18
- scrollLock: d,
19
- contentId: v
20
- } = C(B);
21
- return j(() => {
22
- d && (l ? (document.documentElement.style.overflow = "hidden", document.documentElement.scrollHeight > window.innerHeight && (document.body.style.overflow = "scroll")) : (document.documentElement.style.overflow = "", document.body.style.overflow = ""));
23
- }, [l, d]), l ? /* @__PURE__ */ n(x, { children: /* @__PURE__ */ n(F, { modal: (o == null ? void 0 : o.modal) || !1, ...o, context: r, children: /* @__PURE__ */ w(
18
+ scrollLock: i,
19
+ contentId: w,
20
+ role: x
21
+ } = B(I);
22
+ if (H(() => {
23
+ i && (l ? (document.documentElement.style.overflow = "hidden", document.documentElement.scrollHeight > window.innerHeight && (document.body.style.overflow = "scroll")) : (document.documentElement.style.overflow = "", document.body.style.overflow = ""));
24
+ }, [l, i]), !l) return null;
25
+ const d = /* @__PURE__ */ F(
24
26
  "div",
25
27
  {
26
- ...g({
27
- ref: u,
28
+ ...b({
29
+ ref: g,
28
30
  tabIndex: -1,
29
- id: v,
30
- "aria-labelledby": s,
31
- "aria-describedby": m,
31
+ id: w,
32
+ "aria-labelledby": m,
33
+ "aria-describedby": f,
32
34
  style: {
33
- position: h,
34
- left: f,
35
- top: y
35
+ position: u,
36
+ left: y,
37
+ top: h
36
38
  },
37
39
  className: e == null ? void 0 : e.content
38
40
  }),
39
- "data-placement": p,
41
+ "data-placement": v,
40
42
  "data-testid": "overlay-content",
41
43
  children: [
42
44
  /* @__PURE__ */ n(
43
45
  E,
44
46
  {
45
- ref: (i) => b.current = i,
47
+ ref: (a) => p.current = a,
46
48
  context: r,
47
49
  className: e == null ? void 0 : e.arrow,
48
50
  height: t == null ? void 0 : t.height,
@@ -50,11 +52,12 @@ const S = (a) => {
50
52
  "data-testid": "overlay-arrow"
51
53
  }
52
54
  ),
53
- c
55
+ s
54
56
  ]
55
57
  }
56
- ) }) }) : null;
58
+ );
59
+ return /* @__PURE__ */ n(C, { children: x === "tooltip" ? d : /* @__PURE__ */ n(j, { modal: (o == null ? void 0 : o.modal) || !1, ...o, context: r, children: d }) });
57
60
  };
58
61
  export {
59
- S as OverlayContent
62
+ A as OverlayContent
60
63
  };
@@ -47,6 +47,7 @@ export * from './components/form/time-picker/time-picker';
47
47
  export * from './components/form/checkbox/checkbox';
48
48
  export * from './components/form/slider/slider';
49
49
  export * from './components/form/date-field/date-field';
50
+ export * from './components/filter/filter';
50
51
  export * from './components/form/input-group';
51
52
  export * from './components/form/field/field';
52
53
  export * from './components/overlays/tooltip';