@altinn/altinn-components 0.56.0 → 0.56.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.
- package/dist/{SearchField-BUp4_VIq.js → SearchField-CN2mo8ck.js} +42 -42
- package/dist/assets/DatepickerTable.css +1 -1
- package/dist/assets/Dropdown.css +1 -1
- package/dist/assets/QueryLabel.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/components/Account/AccountMenu.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/Datepicker/DatepickerTable.js +6 -6
- package/dist/components/Dialog/DialogActions.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +32 -32
- package/dist/components/Forms/SearchField.js +1 -1
- package/dist/components/Forms/index.js +1 -1
- package/dist/components/GlobalHeader/AccountSelector.js +1 -1
- package/dist/components/GlobalMenu/GlobalMenu.js +1 -1
- package/dist/components/GlobalMenu/LocaleSwitcher.js +1 -1
- package/dist/components/GlobalMenu_old/GlobalMenu.js +1 -1
- package/dist/components/Header/LocaleSwitcher.js +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuItems.js +1 -1
- package/dist/components/Menu/MenuListSearch.js +1 -1
- package/dist/components/Menu/VirtualizedMenuItems.js +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Searchbar/QueryLabel.js +5 -5
- package/dist/components/Settings/BookmarksSettingsList.js +25 -25
- package/dist/components/Toolbar/SelectDateFilter.js +20 -20
- package/dist/components/Toolbar/ToolbarFilter.js +33 -34
- package/dist/components/Toolbar/ToolbarFilterAddMenu.js +24 -22
- package/dist/components/Toolbar/ToolbarFilterMenu.js +53 -50
- package/dist/components/Toolbar/ToolbarMenu.js +19 -17
- package/dist/components/Toolbar/ToolbarSearch.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilterAddMenu.d.ts +3 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilterMenu.d.ts +3 -1
- package/dist/types/lib/components/Toolbar/ToolbarMenu.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as L } from "react/jsx-runtime";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as fe } from "./index-p1eeF8LQ.js";
|
|
4
4
|
import { useRef as W, useState as X, useMemo as R, useEffect as j, Fragment as me, useLayoutEffect as oe, useId as ne } from "react";
|
|
5
5
|
import { Icon as he } from "./components/Icon/Icon.js";
|
|
6
6
|
import { Button as ye } from "./components/Button/Button.js";
|
|
@@ -27,7 +27,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
27
27
|
index: b,
|
|
28
28
|
name: M,
|
|
29
29
|
value: _,
|
|
30
|
-
placeholder:
|
|
30
|
+
placeholder: p = "Search",
|
|
31
31
|
clearButtonAltText: a = "Clear search",
|
|
32
32
|
onChange: A,
|
|
33
33
|
onClear: D,
|
|
@@ -50,7 +50,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
50
50
|
className: te.searchInput,
|
|
51
51
|
name: M,
|
|
52
52
|
value: _,
|
|
53
|
-
placeholder:
|
|
53
|
+
placeholder: p,
|
|
54
54
|
onChange: A,
|
|
55
55
|
onClear: D,
|
|
56
56
|
clearButtonAltText: a,
|
|
@@ -76,7 +76,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
76
76
|
className: te.searchInput,
|
|
77
77
|
name: M,
|
|
78
78
|
value: _,
|
|
79
|
-
placeholder:
|
|
79
|
+
placeholder: p,
|
|
80
80
|
onChange: A,
|
|
81
81
|
onClear: D,
|
|
82
82
|
clearButtonAltText: a,
|
|
@@ -91,12 +91,12 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
91
91
|
onFocus: w,
|
|
92
92
|
...k
|
|
93
93
|
}
|
|
94
|
-
) }),
|
|
94
|
+
) }), pe = ({
|
|
95
95
|
level: v = 0,
|
|
96
96
|
maxLevels: b,
|
|
97
97
|
expanded: M,
|
|
98
98
|
a11yMode: _ = "menu",
|
|
99
|
-
open:
|
|
99
|
+
open: p,
|
|
100
100
|
scrollToTopOnOpen: a = !1,
|
|
101
101
|
autoActivateFirstItem: A = !0,
|
|
102
102
|
autoFocusList: D = !0,
|
|
@@ -116,7 +116,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
116
116
|
}) => {
|
|
117
117
|
if (b && v >= b)
|
|
118
118
|
return null;
|
|
119
|
-
const
|
|
119
|
+
const f = _ === "combobox", u = f && s ? `${s}-listbox` : s, B = W(p), z = W(p), [Y, n] = X(!1), P = R(
|
|
120
120
|
() => g.map((o, x) => ({
|
|
121
121
|
...o,
|
|
122
122
|
id: o.id || `${s}-item-${x}`
|
|
@@ -135,20 +135,20 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
135
135
|
I?.($?.id);
|
|
136
136
|
}, [$?.id, I]), j(() => {
|
|
137
137
|
if (!a) {
|
|
138
|
-
B.current =
|
|
138
|
+
B.current = p;
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
const o = B.current;
|
|
142
|
-
B.current =
|
|
143
|
-
}, [
|
|
142
|
+
B.current = p, p && !o && G.current?.scrollTo({ top: 0 });
|
|
143
|
+
}, [p, a]), j(() => {
|
|
144
144
|
const o = z.current;
|
|
145
|
-
z.current =
|
|
146
|
-
}, [
|
|
147
|
-
if (
|
|
145
|
+
z.current = p, !(!y || l || !D) && p && !o && requestAnimationFrame(() => G.current?.focus?.({ preventScroll: !0 }));
|
|
146
|
+
}, [p, y, l]), j(() => {
|
|
147
|
+
if (f && m) {
|
|
148
148
|
H(0), n(!0);
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
}, [m,
|
|
151
|
+
}, [m, f, H]), /* @__PURE__ */ L(
|
|
152
152
|
Z,
|
|
153
153
|
{
|
|
154
154
|
variant: k,
|
|
@@ -156,17 +156,17 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
156
156
|
ref: G,
|
|
157
157
|
style: c,
|
|
158
158
|
id: u,
|
|
159
|
-
role:
|
|
159
|
+
role: f ? "listbox" : void 0,
|
|
160
160
|
tabIndex: y ? -1 : void 0,
|
|
161
161
|
children: [
|
|
162
162
|
l && /* @__PURE__ */ r(
|
|
163
163
|
de,
|
|
164
164
|
{
|
|
165
165
|
...l,
|
|
166
|
-
combobox:
|
|
166
|
+
combobox: f,
|
|
167
167
|
listId: u,
|
|
168
|
-
"aria-activedescendant":
|
|
169
|
-
onNavigate:
|
|
168
|
+
"aria-activedescendant": f && Y ? $?.id : void 0,
|
|
169
|
+
onNavigate: f ? () => n(!0) : void 0,
|
|
170
170
|
onChange: (o) => {
|
|
171
171
|
n(!1), l.onChange?.(o);
|
|
172
172
|
},
|
|
@@ -178,7 +178,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
178
178
|
},
|
|
179
179
|
onKeyDown: (o) => {
|
|
180
180
|
const x = o.key === "ArrowUp" || o.key === "ArrowDown", O = o.key.length === 1 || o.key === "Backspace" || o.key === "Delete";
|
|
181
|
-
|
|
181
|
+
f && !x && O && n(!1), l.onKeyDown?.(o);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
),
|
|
@@ -189,13 +189,13 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
189
189
|
/* @__PURE__ */ r(ce, { hidden: q, children: /* @__PURE__ */ L(Z, { role: "presentation", children: [
|
|
190
190
|
F && /* @__PURE__ */ r(ue, { title: F, level: v }),
|
|
191
191
|
o?.items.filter((U) => !U.props?.hidden).map((U, e) => {
|
|
192
|
-
const { active: t, onMouseEnter: d } = U, { groupId: N, ...i } = U.props || {}, { expanded: K } = i, V = Array.isArray(i?.items) && i.items.length > 0, Q = i.role === "checkbox" || i.role === "radio", ee =
|
|
192
|
+
const { active: t, onMouseEnter: d } = U, { groupId: N, ...i } = U.props || {}, { expanded: K } = i, V = Array.isArray(i?.items) && i.items.length > 0, Q = i.role === "checkbox" || i.role === "radio", ee = f && !Q ? "option" : i.role;
|
|
193
193
|
return /* @__PURE__ */ L(
|
|
194
194
|
ae,
|
|
195
195
|
{
|
|
196
196
|
expanded: K,
|
|
197
197
|
onMouseLeave: () => H(-1),
|
|
198
|
-
role:
|
|
198
|
+
role: f || Q ? "presentation" : void 0,
|
|
199
199
|
children: [
|
|
200
200
|
/* @__PURE__ */ r(
|
|
201
201
|
ie,
|
|
@@ -206,7 +206,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
206
206
|
variant: i?.variant || O?.variant || k,
|
|
207
207
|
active: t,
|
|
208
208
|
role: ee,
|
|
209
|
-
selected:
|
|
209
|
+
selected: f && !Q ? t : i.selected,
|
|
210
210
|
tabIndex: i?.disabled || y ? -1 : i.tabIndex ?? 0,
|
|
211
211
|
onMouseEnter: d,
|
|
212
212
|
"aria-haspopup": V ? "menu" : void 0,
|
|
@@ -215,7 +215,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
215
215
|
}
|
|
216
216
|
),
|
|
217
217
|
K && i?.items && /* @__PURE__ */ r(
|
|
218
|
-
|
|
218
|
+
pe,
|
|
219
219
|
{
|
|
220
220
|
id: i.id + "-menu",
|
|
221
221
|
expanded: K,
|
|
@@ -240,7 +240,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
240
240
|
}
|
|
241
241
|
);
|
|
242
242
|
}, Ae = (v) => {
|
|
243
|
-
const b = W(null), M = W(null), [_,
|
|
243
|
+
const b = W(null), M = W(null), [_, p] = X(0), {
|
|
244
244
|
search: a,
|
|
245
245
|
items: A,
|
|
246
246
|
groups: D = {},
|
|
@@ -256,7 +256,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
256
256
|
scrollToTopOnOpen: y = !1,
|
|
257
257
|
autoActivateFirstItem: S = !0,
|
|
258
258
|
announceNoResults: I = !1,
|
|
259
|
-
onActiveItemIdChange:
|
|
259
|
+
onActiveItemIdChange: f
|
|
260
260
|
} = v, u = k === "combobox", B = u && s ? `${s}-listbox` : s, z = W(c), [Y, n] = X(!1), P = R(
|
|
261
261
|
() => A.map((e, t) => ({
|
|
262
262
|
...e,
|
|
@@ -278,7 +278,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
278
278
|
const e = M.current;
|
|
279
279
|
if (!e) return;
|
|
280
280
|
const t = Math.round(e.offsetTop);
|
|
281
|
-
|
|
281
|
+
p((d) => d === t ? d : t);
|
|
282
282
|
});
|
|
283
283
|
const F = R(() => {
|
|
284
284
|
const e = T?.id;
|
|
@@ -320,8 +320,8 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
320
320
|
}), { positions: e, total: t };
|
|
321
321
|
}, [o]);
|
|
322
322
|
j(() => {
|
|
323
|
-
|
|
324
|
-
}, [T?.id,
|
|
323
|
+
f?.(T?.id);
|
|
324
|
+
}, [T?.id, f]), j(() => {
|
|
325
325
|
if (u && I) {
|
|
326
326
|
H(0), n(!0);
|
|
327
327
|
return;
|
|
@@ -451,7 +451,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
451
451
|
search: b,
|
|
452
452
|
items: M = [],
|
|
453
453
|
groups: _ = {},
|
|
454
|
-
variant:
|
|
454
|
+
variant: p = "default",
|
|
455
455
|
size: a,
|
|
456
456
|
level: A = 0,
|
|
457
457
|
maxLevels: D = 3,
|
|
@@ -465,16 +465,16 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
465
465
|
autoFocusList: k,
|
|
466
466
|
id: c
|
|
467
467
|
}) => {
|
|
468
|
-
const y = we({ ...b, items: M, groups: _ }), S = v ? y.search : b, I = v && y.hasQuery && y.resultCount === 0,
|
|
468
|
+
const y = we({ ...b, items: M, groups: _ }), S = v ? y.search : b, I = v && y.hasQuery && y.resultCount === 0, f = v ? y.items : M, u = v ? { ..._, ...y.groups } : _, B = h !== "combobox";
|
|
469
469
|
return m ? /* @__PURE__ */ r(
|
|
470
470
|
Ae,
|
|
471
471
|
{
|
|
472
472
|
id: c,
|
|
473
473
|
search: S,
|
|
474
474
|
announceNoResults: I,
|
|
475
|
-
items:
|
|
475
|
+
items: f,
|
|
476
476
|
groups: u,
|
|
477
|
-
variant:
|
|
477
|
+
variant: p,
|
|
478
478
|
size: a,
|
|
479
479
|
level: A,
|
|
480
480
|
maxLevels: D,
|
|
@@ -488,14 +488,14 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
488
488
|
autoFocusList: k
|
|
489
489
|
}
|
|
490
490
|
) : /* @__PURE__ */ r(
|
|
491
|
-
|
|
491
|
+
pe,
|
|
492
492
|
{
|
|
493
493
|
id: c,
|
|
494
494
|
search: S,
|
|
495
495
|
announceNoResults: I,
|
|
496
|
-
items:
|
|
496
|
+
items: f,
|
|
497
497
|
groups: u,
|
|
498
|
-
variant:
|
|
498
|
+
variant: p,
|
|
499
499
|
size: a,
|
|
500
500
|
level: A,
|
|
501
501
|
maxLevels: D,
|
|
@@ -509,7 +509,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
509
509
|
autoFocusList: k
|
|
510
510
|
}
|
|
511
511
|
);
|
|
512
|
-
}, Ce = "
|
|
512
|
+
}, Ce = "_field_lyp0p_1", De = "_container_lyp0p_5", Be = "_icon_lyp0p_11", Fe = "_input_lyp0p_35", Se = "_clear_lyp0p_54", Ne = "_clearButton_lyp0p_66", ze = "_autocomplete_lyp0p_95", E = {
|
|
513
513
|
field: Ce,
|
|
514
514
|
container: De,
|
|
515
515
|
icon: Be,
|
|
@@ -522,7 +522,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
522
522
|
collapsible: b,
|
|
523
523
|
size: M,
|
|
524
524
|
color: _ = "neutral",
|
|
525
|
-
label:
|
|
525
|
+
label: p,
|
|
526
526
|
value: a,
|
|
527
527
|
onClear: A,
|
|
528
528
|
clearButtonAltText: D = "Clear search",
|
|
@@ -530,7 +530,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
530
530
|
minLength: l,
|
|
531
531
|
...g
|
|
532
532
|
}) => {
|
|
533
|
-
const C = ne(), [h, s] = X(!1), w = g.id || `search-field-${C}`, k = `${w}-listbox`, [c, y] = X(void 0), S = "searchfield-clear-button-" + ne(), I = R(() => !a || typeof l == "number" && typeof a == "string" && a.length < l ? !1 : h, [h, l, a]),
|
|
533
|
+
const C = ne(), [h, s] = X(!1), w = g.id || `search-field-${C}`, k = `${w}-listbox`, [c, y] = X(void 0), S = "searchfield-clear-button-" + ne(), I = R(() => !a || typeof l == "number" && typeof a == "string" && a.length < l ? !1 : h, [h, l, a]), f = R(() => (m?.items ?? []).map((n) => ({
|
|
534
534
|
...n,
|
|
535
535
|
onClick: () => {
|
|
536
536
|
n.onClick?.(), s(!1);
|
|
@@ -559,8 +559,8 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
559
559
|
{
|
|
560
560
|
size: M,
|
|
561
561
|
color: _,
|
|
562
|
-
label:
|
|
563
|
-
className:
|
|
562
|
+
label: p,
|
|
563
|
+
className: fe(E.field, v),
|
|
564
564
|
onBlurCapture: z,
|
|
565
565
|
children: [
|
|
566
566
|
/* @__PURE__ */ L("div", { className: E.container, children: [
|
|
@@ -614,7 +614,7 @@ import './assets/SearchField.css';const _e = "_search_18jfe_1", ke = "_searchInp
|
|
|
614
614
|
{
|
|
615
615
|
...m,
|
|
616
616
|
id: k,
|
|
617
|
-
items:
|
|
617
|
+
items: f,
|
|
618
618
|
groups: m?.groups,
|
|
619
619
|
keyboardEvents: !0,
|
|
620
620
|
a11yMode: "combobox",
|
|
@@ -631,6 +631,6 @@ export {
|
|
|
631
631
|
Me as M,
|
|
632
632
|
re as S,
|
|
633
633
|
Ae as V,
|
|
634
|
-
|
|
634
|
+
pe as a,
|
|
635
635
|
de as b
|
|
636
636
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._table_1k8nb_1{border-collapse:collapse;table-layout:fixed;width:100%}._weekday_1k8nb_7{font-size:.75rem;text-align:center;padding:.25rem 0}._date_1k8nb_13{background-color:transparent;color:var(--ds-color-text-subtle)}._date_1k8nb_13[data-current-month=true]{background-color:var(--ds-color-background-tinted);color:var(--ds-color-text-default)}._button_1k8nb_23{font-size:.875rem;width:100%;text-align:center;height:2.25rem}._button_1k8nb_23[aria-selected=true]{background-color:var(--ds-color-surface-active);color:var(--ds-color-text-default)}._button_1k8nb_23[aria-selected=true]:hover,._button_1k8nb_23:hover{background-color:var(--ds-color-surface-hover)}
|
package/dist/assets/Dropdown.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._dropdown_15prw_1{background-color:var(--ds-color-background-default);color:var(--ds-color-text-default);box-shadow:var(--ds-shadow-sm);display:flex;flex-direction:column;row-gap:.5rem;padding:.5rem;white-space:unset}._dropdown_15prw_1:focus{outline:none}._content_15prw_17{flex-grow:1}._dropdown_15prw_1[data-size=sm]{--var-width: 16rem;--var-min-width: 16rem;--var-max-width: 20rem}._dropdown_15prw_1[data-size=md]{--var-width: 20rem;--var-min-width: 20rem;--var-max-width: 24rem}._dropdown_15prw_1[data-size=lg]{--var-width: 24rem;--var-min-width: 24rem;--var-max-width: 28rem}._dropdown_15prw_1[aria-hidden=true]{display:none}._backdrop_15prw_47{z-index:1;background-color:#111d4640;position:fixed;inset:0;width:100%;height:100%}._backdrop_15prw_47[aria-hidden=true]{display:none}._dropdown_15prw_1{position:absolute;margin-top:.5rem;margin-bottom:.5rem;border-radius:.375rem}._dropdown_15prw_1[data-variant=dropdown] ._header_15prw_72,._dropdown_15prw_1[data-variant=dropdown] ._footer_15prw_73{display:none}._dropdown_15prw_1[data-variant=dropdown]{min-width:var(--var-min-width);max-width:var(--var-max-width);width:var(--var-width);max-height:80vh}._dropdown_15prw_1[data-variant=drawer]{position:fixed!important;inset:0!important;max-width:none!important;max-height:100vh!important;width:100%!important;margin-top:1rem;margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-top:0}@media(max-width:1023px){._dropdown_15prw_1[data-variant=drawer-dropdown]{position:fixed!important;inset:0!important;max-width:none!important;max-height:100vh!important;width:100%!important;margin-top:1rem;margin-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-top:0}}@media(min-width:1024px){._dropdown_15prw_1[data-variant=drawer-dropdown]{min-width:var(--var-min-width);max-width:var(--var-max-width);width:var(--var-width);max-height:80vh}._dropdown_15prw_1[data-variant=drawer-dropdown] ._header_15prw_72,._dropdown_15prw_1[data-variant=drawer-dropdown] ._footer_15prw_73{display:none}}._header_15prw_72{position:sticky;top:0;left:0;right:0;padding:1rem .5rem;display:flex;align-items:center;justify-content:space-between;background-color:var(--ds-color-background-default);border-bottom:1px solid var(--ds-color-border-subtle);z-index:999}._title_15prw_146{font-size:1.125rem;font-weight:500;margin:0}._footer_15prw_73{position:sticky;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center}._footer_15prw_73>*{margin:1rem auto}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_yf5z4_1{--dsc-item-font-size: .875rem;--dsc-item-padding-x: .5em;--dsc-item-padding-y: .25em;overflow:hidden;text-overflow:ellipsis;max-width:100%}._label_yf5z4_1[data-size=xs]{--dsc-item-font-size: .75rem;--dsc-item-padding-x: .25em;--dsc-item-padding-y: 0}._label_yf5z4_1{font-size:var(--dsc-item-font-size);display:flex;flex-wrap:wrap;align-items:center;column-gap:.25rem;row-gap:.25rem}._group_yf5z4_25{display:inline-flex;align-items:center;column-gap:.25rem}._plus_yf5z4_31{color:var(--ds-color-text-subtle)}._item_yf5z4_35{display:block;overflow:hidden;text-overflow:ellipsis;max-width:100%}._item_yf5z4_35[data-type=search]{background-color:transparent;font-weight:500;border-bottom:1px solid;padding:var(--dsc-item-padding-y) 0}._item_yf5z4_35[data-type=search]:before{content:"«"}._item_yf5z4_35[data-type=search]:after{content:"»"}._item_yf5z4_35[data-type=filter]{background-color:transparent;border:1px solid;font-weight:500;padding:var(--dsc-item-padding-y) var(--dsc-item-padding-x);border-radius:2px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._search_18jfe_1{position:sticky;top:0;z-index:1;background-color:var(--ds-color-surface-default)}._searchInput_18jfe_8{width:100%}._search_18jfe_1 input:focus-visible{outline-offset:0;outline-width:2px}.
|
|
1
|
+
._search_18jfe_1{position:sticky;top:0;z-index:1;background-color:var(--ds-color-surface-default)}._searchInput_18jfe_8{width:100%}._search_18jfe_1 input:focus-visible{outline-offset:0;outline-width:2px}._field_lyp0p_1{position:relative}._container_lyp0p_5{position:relative;display:inline-flex;width:100%}._icon_lyp0p_11{position:absolute;top:0;bottom:0;left:0;width:2.5em;height:100%;color:var(--ds-color-text-subtle);display:flex;justify-content:center;align-items:center;pointer-events:none}._icon_lyp0p_11>*{pointer-events:none}._icon_lyp0p_11>svg{font-size:1.25em;width:1.25em;height:1.25em}._input_lyp0p_35{padding-left:2.25em;padding-right:2.25em}._input_lyp0p_35[type=search]::-webkit-search-decoration,._input_lyp0p_35[type=search]::-webkit-search-cancel-button{appearance:none}@media(max-width:1023px){._field_lyp0p_1[data-size=xs] input[type=search]{font-size:1rem;padding-left:2em;padding-right:2em}}._clear_lyp0p_54{position:absolute;top:0;right:0;bottom:0;width:2.5em;height:100%;display:flex;justify-content:center;align-items:center}._clearButton_lyp0p_66[data-size=xs]{--dsc-button-size: 2.5em;--dsc-button-padding: 0;font-size:.75em;border:none}._clearButton_lyp0p_66:focus-visible{outline-offset:0;outline-width:2px}._input_lyp0p_35[data-collapsible=true]{transition:width .5s ease-in-out}._input_lyp0p_35[data-collapsible=true]:placeholder-shown{background-color:transparent;width:8rem}._input_lyp0p_35[data-collapsible=true]:focus,._input_lyp0p_35[data-collapsible=true]:not(:placeholder-shown){width:auto;background-color:var(--ds-color-background-default)}._autocomplete_lyp0p_95{--var-min-width: 100%;--var-max-width: 20rem;--var-width: 20rem;min-width:var(--var-min-width);max-width:var(--var-max-width);width:var(--var-width);position:absolute;top:100%;left:0;z-index:1;border-radius:.375rem;margin-top:.5rem;margin-bottom:.5rem;background-color:var(--ds-color-background-default);color:var(--ds-color-text-default);box-shadow:var(--ds-shadow-sm);display:flex;flex-direction:column;row-gap:.5rem;padding:.5rem;white-space:unset}@media(max-width:1023px){._autocomplete_lyp0p_95{--var-max-width: 100%;--var-width: 100%}}._autocomplete_lyp0p_95[aria-hidden=true]{display:none}
|
|
@@ -4,7 +4,7 @@ import { useState as M, useEffect as w, useMemo as L } from "react";
|
|
|
4
4
|
import "../../index-p1eeF8LQ.js";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { M as S } from "../../SearchField-
|
|
7
|
+
import { M as S } from "../../SearchField-CN2mo8ck.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
9
|
const F = (n) => `${n} hits`, E = ({
|
|
10
10
|
items: n = [],
|
|
@@ -5,7 +5,7 @@ import "../../index-p1eeF8LQ.js";
|
|
|
5
5
|
import u, { forwardRef as s } from "react";
|
|
6
6
|
import { Dropdown as m } from "../Dropdown/Dropdown.js";
|
|
7
7
|
import { useRootContext as c } from "../RootProvider/RootProvider.js";
|
|
8
|
-
import { M as f } from "../../SearchField-
|
|
8
|
+
import { M as f } from "../../SearchField-CN2mo8ck.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
10
|
import { useDropdownMenuController as g } from "../Menu/useDropdownMenuController.js";
|
|
11
11
|
import { Tooltip as b } from "../Tooltip/Tooltip.js";
|
|
@@ -4,29 +4,29 @@ import "../../index-p1eeF8LQ.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import '../../assets/DatepickerTable.css';const u = "
|
|
7
|
+
import '../../assets/DatepickerTable.css';const u = "_table_1k8nb_1", y = "_weekday_1k8nb_7", _ = "_date_1k8nb_13", p = "_button_1k8nb_23", a = {
|
|
8
8
|
table: u,
|
|
9
9
|
weekday: y,
|
|
10
10
|
date: _,
|
|
11
11
|
button: p
|
|
12
12
|
}, g = ({
|
|
13
|
-
weekdays:
|
|
13
|
+
weekdays: r = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
|
|
14
14
|
rows: d = [],
|
|
15
15
|
onSelect: s
|
|
16
16
|
}) => /* @__PURE__ */ m("table", { className: a.table, children: [
|
|
17
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children:
|
|
17
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: r.map((e) => /* @__PURE__ */ t("th", { className: a.weekday, children: e.substring(0, 3) }, e)) }) }),
|
|
18
18
|
/* @__PURE__ */ t("tbody", { children: d.map((e, o) => /* @__PURE__ */ t("tr", { children: e.map((c) => {
|
|
19
|
-
const { day: l, date:
|
|
19
|
+
const { day: l, date: n, selected: i, isCurrentMonth: b } = c;
|
|
20
20
|
return /* @__PURE__ */ t("td", { className: a.date, "data-current-month": b, children: /* @__PURE__ */ t(
|
|
21
21
|
h,
|
|
22
22
|
{
|
|
23
23
|
variant: "ghost",
|
|
24
24
|
"aria-selected": i,
|
|
25
25
|
className: a.button,
|
|
26
|
-
onClick: () => s(
|
|
26
|
+
onClick: () => s(n),
|
|
27
27
|
children: l
|
|
28
28
|
}
|
|
29
|
-
) },
|
|
29
|
+
) }, n);
|
|
30
30
|
}) }, o)) })
|
|
31
31
|
] });
|
|
32
32
|
export {
|
|
@@ -7,7 +7,7 @@ import { ButtonGroup as C } from "../Button/ButtonGroup.js";
|
|
|
7
7
|
import { ButtonGroupDivider as B } from "../Button/ButtonGroupDivider.js";
|
|
8
8
|
import { DropdownBase as x } from "../Dropdown/DropdownBase.js";
|
|
9
9
|
import { useRootContext as _ } from "../RootProvider/RootProvider.js";
|
|
10
|
-
import { M as v } from "../../SearchField-
|
|
10
|
+
import { M as v } from "../../SearchField-CN2mo8ck.js";
|
|
11
11
|
import "../Snackbar/useSnackbar.js";
|
|
12
12
|
import { S as k, a as D } from "../../ChevronUp-_BBfEirx.js";
|
|
13
13
|
import '../../assets/DialogActions.css';const I = "_action_1n930_1", M = "_comboButton_1n930_8", m = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as U, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { c as Y } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { useRef as _, useEffect as
|
|
3
|
+
import { useRef as _, useEffect as y, useState as M, useCallback as O, useLayoutEffect as W } from "react";
|
|
4
4
|
import { Button as F } from "../Button/Button.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
7
|
import { S as G } from "../../XMark-tKk6aExO.js";
|
|
8
|
-
import '../../assets/Dropdown.css';const P = "
|
|
8
|
+
import '../../assets/Dropdown.css';const P = "_dropdown_15prw_1", $ = "_content_15prw_17", J = "_backdrop_15prw_47", Q = "_header_15prw_72", V = "_footer_15prw_73", Z = "_title_15prw_146", a = {
|
|
9
9
|
dropdown: P,
|
|
10
10
|
content: $,
|
|
11
11
|
backdrop: J,
|
|
@@ -13,7 +13,7 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
13
13
|
footer: V,
|
|
14
14
|
title: Z
|
|
15
15
|
}, tt = "data-focus-guard", A = (l) => {
|
|
16
|
-
const
|
|
16
|
+
const w = [
|
|
17
17
|
"a[href]",
|
|
18
18
|
"button:not([disabled])",
|
|
19
19
|
"input:not([disabled])",
|
|
@@ -22,7 +22,7 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
22
22
|
'[tabindex]:not([tabindex="-1"])',
|
|
23
23
|
'[contenteditable="true"]'
|
|
24
24
|
].join(",");
|
|
25
|
-
return Array.from(l.querySelectorAll(
|
|
25
|
+
return Array.from(l.querySelectorAll(w)).filter((o) => !o.hasAttribute(tt)).filter((o) => !o.hasAttribute("disabled")).filter((o) => o.getAttribute("aria-hidden") !== "true").filter((o) => o.tabIndex !== -1).filter((o) => {
|
|
26
26
|
const u = o.getClientRects();
|
|
27
27
|
return u.length > 0 && u[0].width > 0 && u[0].height > 0;
|
|
28
28
|
});
|
|
@@ -30,41 +30,41 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
30
30
|
A(l)[0]?.focus({ preventScroll: !0 });
|
|
31
31
|
}, lt = ({
|
|
32
32
|
id: l = "dropdown",
|
|
33
|
-
size:
|
|
33
|
+
size: w = "sm",
|
|
34
34
|
className: o,
|
|
35
35
|
backdrop: u = !0,
|
|
36
36
|
placement: k = "bottom-left",
|
|
37
37
|
variant: D = "dropdown",
|
|
38
38
|
title: L = "Title",
|
|
39
|
-
closeLabel:
|
|
39
|
+
closeLabel: z = "Close",
|
|
40
40
|
submitLabel: E,
|
|
41
|
-
trigger:
|
|
42
|
-
children:
|
|
41
|
+
trigger: H,
|
|
42
|
+
children: C,
|
|
43
43
|
open: e,
|
|
44
44
|
onClose: f,
|
|
45
|
-
onSubmit:
|
|
46
|
-
activeDescendantId:
|
|
45
|
+
onSubmit: N,
|
|
46
|
+
activeDescendantId: B
|
|
47
47
|
}) => {
|
|
48
48
|
const h = _(null), m = _(null), R = _(e);
|
|
49
|
-
|
|
49
|
+
y(() => {
|
|
50
50
|
R.current = e;
|
|
51
51
|
}, [e]);
|
|
52
|
-
const [
|
|
52
|
+
const [x, I] = M({
|
|
53
53
|
yDir: k.includes("top") ? "top" : "bottom",
|
|
54
54
|
xDir: k.includes("right") ? "right" : "left",
|
|
55
55
|
maxHeight: 300
|
|
56
|
-
}),
|
|
56
|
+
}), v = O(() => {
|
|
57
57
|
if (e && h.current && m.current) {
|
|
58
|
-
const t = h.current.getBoundingClientRect(), i = m.current.getBoundingClientRect(), n = window.innerHeight, r = window.innerWidth, s = 16, d = n - t.bottom, p = t.top, b = r - t.right - i.width, S = d < 250 && p > d,
|
|
59
|
-
|
|
58
|
+
const t = h.current.getBoundingClientRect(), i = m.current.getBoundingClientRect(), n = window.innerHeight, r = window.innerWidth, s = 16, d = n - t.bottom, p = t.top, b = r - t.right - i.width, S = d < 250 && p > d, X = S ? "top" : "bottom", j = (S ? p : d) - s, q = b < s ? "right" : "left";
|
|
59
|
+
I((K) => ({
|
|
60
60
|
...K,
|
|
61
|
-
yDir:
|
|
62
|
-
maxHeight:
|
|
63
|
-
xDir:
|
|
61
|
+
yDir: X,
|
|
62
|
+
maxHeight: j,
|
|
63
|
+
xDir: q
|
|
64
64
|
}));
|
|
65
65
|
}
|
|
66
66
|
}, [e]);
|
|
67
|
-
W(() => (
|
|
67
|
+
W(() => (v(), window.addEventListener("resize", v), () => window.removeEventListener("resize", v)), [v]), y(() => {
|
|
68
68
|
if (!e) return;
|
|
69
69
|
const t = requestAnimationFrame(() => {
|
|
70
70
|
const i = m.current;
|
|
@@ -84,7 +84,7 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
84
84
|
i.focus?.({ preventScroll: !0 });
|
|
85
85
|
});
|
|
86
86
|
return () => cancelAnimationFrame(t);
|
|
87
|
-
}, [e]),
|
|
87
|
+
}, [e]), y(() => {
|
|
88
88
|
const t = (n) => {
|
|
89
89
|
n.key === "Escape" && f();
|
|
90
90
|
}, i = (n) => {
|
|
@@ -93,7 +93,7 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
93
93
|
return e && (document.addEventListener("mousedown", i), document.addEventListener("keydown", t)), () => {
|
|
94
94
|
document.removeEventListener("mousedown", i), document.removeEventListener("keydown", t);
|
|
95
95
|
};
|
|
96
|
-
}, [e, f]),
|
|
96
|
+
}, [e, f]), y(() => {
|
|
97
97
|
if (!e) return;
|
|
98
98
|
const t = m.current;
|
|
99
99
|
if (!t) return;
|
|
@@ -116,39 +116,39 @@ import '../../assets/Dropdown.css';const P = "_dropdown_4f5qx_1", $ = "_content_
|
|
|
116
116
|
document.removeEventListener("focusin", i), document.removeEventListener("keydown", n);
|
|
117
117
|
};
|
|
118
118
|
}, [e]);
|
|
119
|
-
const
|
|
119
|
+
const T = {
|
|
120
120
|
position: "absolute",
|
|
121
121
|
zIndex: 50,
|
|
122
122
|
width: "max-content",
|
|
123
|
-
maxHeight: `${
|
|
123
|
+
maxHeight: `${x.maxHeight}px`,
|
|
124
124
|
overflowY: "auto",
|
|
125
|
-
[
|
|
126
|
-
[
|
|
125
|
+
[x.xDir]: 0,
|
|
126
|
+
[x.yDir === "bottom" ? "top" : "bottom"]: "100%"
|
|
127
127
|
};
|
|
128
128
|
return /* @__PURE__ */ g(U, { children: [
|
|
129
129
|
u && /* @__PURE__ */ c("div", { className: a.backdrop, "aria-hidden": !e }),
|
|
130
130
|
/* @__PURE__ */ g("div", { id: l + "-root", ref: h, style: { position: "relative", display: "inline-block" }, children: [
|
|
131
|
-
|
|
131
|
+
H,
|
|
132
132
|
/* @__PURE__ */ g(
|
|
133
133
|
"div",
|
|
134
134
|
{
|
|
135
135
|
ref: m,
|
|
136
136
|
className: Y(a.dropdown, o),
|
|
137
|
-
style:
|
|
137
|
+
style: T,
|
|
138
138
|
"aria-hidden": !e,
|
|
139
139
|
"data-variant": D,
|
|
140
|
-
"data-size":
|
|
140
|
+
"data-size": w,
|
|
141
141
|
tabIndex: -1,
|
|
142
142
|
role: "menu",
|
|
143
143
|
"aria-modal": D === "drawer-dropdown" ? !0 : void 0,
|
|
144
|
-
"aria-activedescendant":
|
|
144
|
+
"aria-activedescendant": B,
|
|
145
145
|
children: [
|
|
146
146
|
/* @__PURE__ */ g("header", { className: a.header, children: [
|
|
147
147
|
/* @__PURE__ */ c("h2", { className: a.title, children: L }),
|
|
148
|
-
/* @__PURE__ */ c(F, { size: "sm", variant: "outline", onClick: f, "aria-label":
|
|
148
|
+
/* @__PURE__ */ c(F, { size: "sm", variant: "outline", onClick: f, "aria-label": z, children: /* @__PURE__ */ c(G, {}) })
|
|
149
149
|
] }),
|
|
150
|
-
/* @__PURE__ */ c("div", { className: a.content, children:
|
|
151
|
-
E && /* @__PURE__ */ c("footer", { className: a.footer, children: /* @__PURE__ */ c(F, { size: "lg", variant: "solid", onClick:
|
|
150
|
+
/* @__PURE__ */ c("div", { className: a.content, children: C }),
|
|
151
|
+
E && /* @__PURE__ */ c("footer", { className: a.footer, children: /* @__PURE__ */ c(F, { size: "lg", variant: "solid", onClick: N || f, rounded: !0, children: /* @__PURE__ */ c("span", { "data-size": "md", children: E }) }) })
|
|
152
152
|
]
|
|
153
153
|
}
|
|
154
154
|
)
|
|
@@ -4,7 +4,7 @@ import "react";
|
|
|
4
4
|
import "../Icon/Icon.js";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { S as l } from "../../SearchField-
|
|
7
|
+
import { S as l } from "../../SearchField-CN2mo8ck.js";
|
|
8
8
|
import "./Input.js";
|
|
9
9
|
import "./FieldBase.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
@@ -12,7 +12,7 @@ import { FieldBase as B } from "./FieldBase.js";
|
|
|
12
12
|
import { TextField as C } from "./TextField.js";
|
|
13
13
|
import { TextareaField as R } from "./TextareaField.js";
|
|
14
14
|
import { SelectField as u } from "./SelectField.js";
|
|
15
|
-
import { S as I } from "../../SearchField-
|
|
15
|
+
import { S as I } from "../../SearchField-CN2mo8ck.js";
|
|
16
16
|
import { TextFieldDropdown as q } from "./TextFieldDropdown.js";
|
|
17
17
|
import { FieldsetBase as y } from "./FieldsetBase.js";
|
|
18
18
|
import { OptionsBase as A } from "./OptionsBase.js";
|
|
@@ -7,7 +7,7 @@ import { AccountMenu as L } from "../Account/AccountMenu.js";
|
|
|
7
7
|
import { Button as A } from "../Button/Button.js";
|
|
8
8
|
import { useRootContext as P } from "../RootProvider/RootProvider.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { S as H } from "../../SearchField-
|
|
10
|
+
import { S as H } from "../../SearchField-CN2mo8ck.js";
|
|
11
11
|
import { S as T } from "../../button-BB5sYVKY.js";
|
|
12
12
|
import { H as V, S as B } from "../../switch-Cemfhx0H.js";
|
|
13
13
|
import { u as j } from "../../useId-BVFxCjkq.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { useState as d, useCallback as G, useEffect as L, useMemo as C } from "react";
|
|
4
|
-
import { M as S } from "../../SearchField-
|
|
4
|
+
import { M as S } from "../../SearchField-CN2mo8ck.js";
|
|
5
5
|
import "../../index-p1eeF8LQ.js";
|
|
6
6
|
import "../Button/Button.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { useRef as g, useMemo as l } from "react";
|
|
4
4
|
import { useEnterKey as v } from "../../hooks/useEnterKey.js";
|
|
5
|
-
import { a as h } from "../../SearchField-
|
|
5
|
+
import { a as h } from "../../SearchField-CN2mo8ck.js";
|
|
6
6
|
import "../../index-p1eeF8LQ.js";
|
|
7
7
|
import "../Button/Button.js";
|
|
8
8
|
import { useRootContext as b } from "../RootProvider/RootProvider.js";
|
|
@@ -5,7 +5,7 @@ import "../../index-p1eeF8LQ.js";
|
|
|
5
5
|
import { AccountMenu as x } from "../Account/AccountMenu.js";
|
|
6
6
|
import "../Button/Button.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { M as f } from "../../SearchField-
|
|
8
|
+
import { M as f } from "../../SearchField-CN2mo8ck.js";
|
|
9
9
|
import { MenuListItem as h } from "../Menu/MenuListItem.js";
|
|
10
10
|
import { CurrentAccount as y } from "./CurrentAccount.js";
|
|
11
11
|
import { BackButton as j } from "./BackButton.js";
|
|
@@ -6,7 +6,7 @@ import { useIsDesktop as b } from "../../hooks/useIsDesktop.js";
|
|
|
6
6
|
import { DropdownBase as x } from "../Dropdown/DropdownBase.js";
|
|
7
7
|
import "../../index-p1eeF8LQ.js";
|
|
8
8
|
import "../Button/Button.js";
|
|
9
|
-
import { a as p } from "../../SearchField-
|
|
9
|
+
import { a as p } from "../../SearchField-CN2mo8ck.js";
|
|
10
10
|
import { useRootContext as I } from "../RootProvider/RootProvider.js";
|
|
11
11
|
import { LocaleButton as S } from "./LocaleButton.js";
|
|
12
12
|
import "../Snackbar/useSnackbar.js";
|
|
@@ -9,7 +9,7 @@ import { GlobalHeader as d } from "../GlobalHeader/GlobalHeader.js";
|
|
|
9
9
|
import "../../index-p1eeF8LQ.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "../Button/Button.js";
|
|
12
|
-
import { M as S } from "../../SearchField-
|
|
12
|
+
import { M as S } from "../../SearchField-CN2mo8ck.js";
|
|
13
13
|
import { useRootContext as j } from "../RootProvider/RootProvider.js";
|
|
14
14
|
import { Header as B } from "../Header/Header.js";
|
|
15
15
|
import "../Snackbar/useSnackbar.js";
|