@midas-ds/components 16.2.3 → 16.2.5

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 (56) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/assets/Layout.css +1 -1
  3. package/calendar/index.js +1 -1
  4. package/character-counter/CharacterCounter.d.ts +3 -2
  5. package/character-counter/index.js +1 -1
  6. package/checkbox/Checkbox.d.ts +2 -4
  7. package/checkbox/CheckboxGroupItem.d.ts +1 -2
  8. package/checkbox/CheckboxInner.d.ts +2 -2
  9. package/checkbox/SingleCheckbox.d.ts +1 -2
  10. package/checkbox/index.js +2 -2
  11. package/checkbox/types.d.ts +2 -1
  12. package/chunks/CharacterCounter-_m-SgTMV.js +20 -0
  13. package/chunks/Checkbox-gsEu5wcB.js +119 -0
  14. package/chunks/{CheckboxGroup-C5kaqBcn.js → CheckboxGroup-A7UJMi5J.js} +3 -3
  15. package/chunks/{ComboBox-N97lv5kN.js → ComboBox-yl5zHYPk.js} +1 -1
  16. package/chunks/{DateField-DeuLPe1Y.js → DateField-BsT1K-bB.js} +1 -1
  17. package/chunks/{DateRangePicker-BqjLArNi.js → DateRangePicker-BsK7pMRv.js} +2 -2
  18. package/chunks/FieldError-Bc0acYNs.js +21 -0
  19. package/chunks/Layout-DX3HUm5b.js +466 -0
  20. package/chunks/{Radio-Dro99zCs.js → Radio-CSFYbin8.js} +1 -1
  21. package/chunks/{RangeCalendar-CGk2btOp.js → RangeCalendar-BF-6p7u2.js} +1 -1
  22. package/chunks/{SearchField-BfpeANM6.js → SearchField-mBHZ9pFg.js} +1 -1
  23. package/chunks/{Select-nL9iJMlf.js → Select-BjD5iQvX.js} +2 -2
  24. package/chunks/{Select-D-LtFSZX.js → Select-Df4333VV.js} +2 -2
  25. package/chunks/{Table-CgBjwlIi.js → Table-t3rVzb31.js} +1 -1
  26. package/chunks/TextArea-B2BePnZz.js +136 -0
  27. package/combobox/index.js +1 -1
  28. package/date-field/index.js +1 -1
  29. package/date-picker/index.js +1 -1
  30. package/field-error/FieldError.d.ts +3 -2
  31. package/field-error/index.js +1 -1
  32. package/index.js +15 -15
  33. package/layout/components/SidebarLink.d.ts +1 -2
  34. package/layout/index.js +1 -1
  35. package/legacy-select/HiddenMultiSelect.d.ts +2 -2
  36. package/legacy-select/MultiSelectValueTag.d.ts +3 -3
  37. package/legacy-select/Select.d.ts +2 -4
  38. package/legacy-select/index.js +1 -1
  39. package/legacy-select/types.d.ts +2 -1
  40. package/legacy-select/useMultiSelect.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/radio/index.js +1 -1
  43. package/search-field/index.js +1 -1
  44. package/select/index.js +1 -1
  45. package/table/index.js +1 -1
  46. package/textfield/Input.d.ts +3 -2
  47. package/textfield/PasswordField.d.ts +1 -2
  48. package/textfield/TextArea.d.ts +5 -3
  49. package/textfield/TextField.d.ts +5 -3
  50. package/textfield/TextFieldBase.d.ts +3 -3
  51. package/textfield/index.js +1 -1
  52. package/chunks/CharacterCounter-DeuE2det.js +0 -21
  53. package/chunks/Checkbox-CP6Nv9yx.js +0 -122
  54. package/chunks/FieldError-C0HRIcAx.js +0 -23
  55. package/chunks/Layout-LjCfmVhQ.js +0 -465
  56. package/chunks/TextArea-CRvbqqVZ.js +0 -124
@@ -0,0 +1,466 @@
1
+ import { jsx as e, jsxs as r, Fragment as H } from "react/jsx-runtime";
2
+ import { G as S } from "./GridItem-5t1Z14sM.js";
3
+ import * as N from "react";
4
+ import { useState as G, useEffect as W } from "react";
5
+ import { c as u } from "./clsx-AexbMWKp.js";
6
+ import { Link as L, RouterProvider as O } from "react-aria-components";
7
+ import { B as M } from "./Button-wBgWrXj3.js";
8
+ import { a as j, T as D } from "./Tooltip-m032jGgF.js";
9
+ import { a as y, B as I } from "./BadgeContainer-CKVsfTlF.js";
10
+ import { c as E } from "./createLucideIcon-D4r5Phnh.js";
11
+ import { u as C } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
12
+ import { variables as q } from "@midas-ds/theme";
13
+ import { L as g } from "./Logo-InDSslpO.js";
14
+ import { X as A } from "./x-BXShoIAM.js";
15
+ import '../assets/Layout.css';const R = [
16
+ ["path", { d: "M4 12h16", key: "1lakjw" }],
17
+ ["path", { d: "M4 18h16", key: "19g7jn" }],
18
+ ["path", { d: "M4 6h16", key: "1o0s65" }]
19
+ ], $ = E("menu", R);
20
+ const F = [
21
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
22
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
23
+ ["path", { d: "m16 15-3-3 3-3", key: "14y99z" }]
24
+ ], X = E("panel-left-close", F);
25
+ const J = [
26
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
27
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
28
+ ["path", { d: "m14 9 3 3-3 3", key: "8010ee" }]
29
+ ], K = E("panel-left-open", J), Q = "_baseLayout_1n71v_1", U = "_mainContent_1n71v_10", V = "_header_1n71v_15", Y = "_headerExternal_1n71v_26", Z = "_headerContent_1n71v_41", ee = "_logo_1n71v_60", ae = "_headerItems_1n71v_69", ne = "_toggleButton_1n71v_75", te = "_sidebar_1n71v_83", se = "_main_1n71v_10", ie = "_app_1n71v_116", re = "_sidebarOpened_1n71v_124", oe = "_sidebarHeader_1n71v_128", le = "_appName_1n71v_140", de = "_collapseButton_1n71v_147", ce = "_sidebarCollapsed_1n71v_156", me = "_userName_1n71v_166", pe = "_userTitle_1n71v_184", _e = "_title_1n71v_196", ve = "_sidebarNav_1n71v_207", ue = "_list_1n71v_213", he = "_listGroupTitle_1n71v_219", be = "_listItem_1n71v_226", Ne = "_listItemCollapsed_1n71v_231", fe = "_listLink_1n71v_235", ke = "_listLinkCollapsed_1n71v_298", Ce = "_active_1n71v_303", xe = "_backdrop_1n71v_321", ge = "_backdropOpened_1n71v_331", Le = "_skipToContent_1n71v_349", ye = "_navbar_1n71v_363", Ie = "_navbarList_1n71v_375", Me = "_navbarItem_1n71v_397", Ee = "_headerContentExternal_1n71v_448", Te = "_logoExternalContainer_1n71v_456", Se = "_logoExternal_1n71v_456", ze = "_logoExternalDesktop_1n71v_468", Be = "_navbarWrapper_1n71v_477", a = {
30
+ baseLayout: Q,
31
+ mainContent: U,
32
+ header: V,
33
+ headerExternal: Y,
34
+ headerContent: Z,
35
+ logo: ee,
36
+ headerItems: ae,
37
+ toggleButton: ne,
38
+ sidebar: te,
39
+ main: se,
40
+ app: ie,
41
+ sidebarOpened: re,
42
+ sidebarHeader: oe,
43
+ appName: le,
44
+ collapseButton: de,
45
+ sidebarCollapsed: ce,
46
+ userName: me,
47
+ userTitle: pe,
48
+ title: _e,
49
+ sidebarNav: ve,
50
+ list: ue,
51
+ listGroupTitle: he,
52
+ listItem: be,
53
+ listItemCollapsed: Ne,
54
+ listLink: fe,
55
+ listLinkCollapsed: ke,
56
+ active: Ce,
57
+ backdrop: xe,
58
+ backdropOpened: ge,
59
+ skipToContent: Le,
60
+ navbar: ye,
61
+ navbarList: Ie,
62
+ navbarItem: Me,
63
+ headerContentExternal: Ee,
64
+ logoExternalContainer: Te,
65
+ logoExternal: Se,
66
+ logoExternalDesktop: ze,
67
+ navbarWrapper: Be
68
+ }, w = N.createContext(
69
+ void 0
70
+ ), Oe = ({
71
+ items: t,
72
+ title: s,
73
+ user: i,
74
+ app: n,
75
+ children: o,
76
+ clientSideRouter: m,
77
+ clientSideHref: d,
78
+ headerChildren: v,
79
+ isCollapsed: _,
80
+ setIsCollapsed: p,
81
+ isOpened: h,
82
+ setIsOpened: l,
83
+ variant: b,
84
+ id: f
85
+ }) => /* @__PURE__ */ e(
86
+ w.Provider,
87
+ {
88
+ value: {
89
+ items: t,
90
+ title: s,
91
+ user: i,
92
+ app: n,
93
+ headerChildren: v,
94
+ isCollapsed: _,
95
+ setIsCollapsed: p,
96
+ isOpened: h,
97
+ setIsOpened: l,
98
+ clientSideRouter: m,
99
+ clientSideHref: d,
100
+ variant: b,
101
+ id: f
102
+ },
103
+ children: o
104
+ }
105
+ ), k = () => {
106
+ const t = N.useContext(w);
107
+ if (!t)
108
+ throw new Error("useLayoutContext must be used within a LayoutProvider");
109
+ return t;
110
+ }, P = ({
111
+ title: t,
112
+ href: s,
113
+ icon: i,
114
+ active: n,
115
+ hasBadge: o
116
+ }) => {
117
+ const { isCollapsed: m, setIsOpened: d, clientSideHref: v } = k(), _ = v ? v(s) : s, [p, h] = G(!1);
118
+ return W(() => {
119
+ if (typeof window < "u") {
120
+ const l = window.location.pathname === _ || window.location.pathname.startsWith(_ + "/");
121
+ h(n ?? l);
122
+ }
123
+ }, [n, _]), m ? /* @__PURE__ */ r(j, { children: [
124
+ /* @__PURE__ */ e(
125
+ L,
126
+ {
127
+ href: s,
128
+ "aria-label": t,
129
+ className: u(
130
+ a.listLink,
131
+ a.listLinkCollapsed,
132
+ p && a.active
133
+ ),
134
+ onPress: () => d?.(!1),
135
+ children: /* @__PURE__ */ r(y, { children: [
136
+ /* @__PURE__ */ e(
137
+ i,
138
+ {
139
+ size: 20,
140
+ "aria-label": t
141
+ }
142
+ ),
143
+ o && /* @__PURE__ */ e(I, {})
144
+ ] })
145
+ }
146
+ ),
147
+ /* @__PURE__ */ e(D, { placement: "right", children: t })
148
+ ] }) : /* @__PURE__ */ r(
149
+ L,
150
+ {
151
+ href: s,
152
+ "aria-label": t,
153
+ className: u(a.listLink, p && a.active),
154
+ onPress: () => d?.(!1),
155
+ children: [
156
+ /* @__PURE__ */ r(y, { children: [
157
+ /* @__PURE__ */ e(i, { size: 20 }),
158
+ o && /* @__PURE__ */ e(I, {})
159
+ ] }),
160
+ t
161
+ ]
162
+ }
163
+ );
164
+ }, we = { closeMenu: "Close menu", openMenu: "Open menu", maximizeMenu: "Maximize menu", minimizeMenu: "Minimize menu", sidebarMenu: "Sidebar menu", bottomMenu: "Bottom menu", skipToContent: "Skip to main content" }, Pe = { closeMenu: "Stäng meny", openMenu: "Öppna meny", maximizeMenu: "Maximera meny", minimizeMenu: "Minimera meny", sidebarMenu: "Sidomeny", bottomMenu: "Bottenmeny", skipToContent: "Hoppa till huvudinnehåll" }, x = {
165
+ en: we,
166
+ sv: Pe
167
+ }, He = () => {
168
+ const {
169
+ items: t,
170
+ app: s,
171
+ isOpened: i,
172
+ isCollapsed: n,
173
+ setIsCollapsed: o,
174
+ setIsOpened: m,
175
+ clientSideRouter: d,
176
+ clientSideHref: v,
177
+ id: _
178
+ } = k(), p = C(x), h = ({ group: l }) => /* @__PURE__ */ e("ul", { className: a.list, children: l.items.map((b, f) => /* @__PURE__ */ e(
179
+ "li",
180
+ {
181
+ className: u(
182
+ a.listItem,
183
+ n && a.listItemCollapsed
184
+ ),
185
+ children: /* @__PURE__ */ e(P, { ...b })
186
+ },
187
+ "link_" + f
188
+ )) });
189
+ return N.useEffect(() => {
190
+ const l = (b) => {
191
+ b.key === "Escape" && m !== void 0 && m(!1);
192
+ };
193
+ return window.addEventListener("keydown", l), () => {
194
+ window.removeEventListener("keydown", l);
195
+ };
196
+ }, [m]), /* @__PURE__ */ r(
197
+ "aside",
198
+ {
199
+ id: _,
200
+ className: u(
201
+ a.sidebar,
202
+ n && a.sidebarCollapsed,
203
+ i && a.sidebarOpened
204
+ ),
205
+ children: [
206
+ /* @__PURE__ */ r("div", { className: a.sidebarHeader, children: [
207
+ !n && /* @__PURE__ */ e("p", { className: a.appName, children: s.name }),
208
+ /* @__PURE__ */ e(
209
+ M,
210
+ {
211
+ variant: "icon",
212
+ "aria-label": n ? p.format("maximizeMenu") : p.format("minimizeMenu"),
213
+ onPress: () => o(!n),
214
+ className: a.collapseButton,
215
+ children: n ? /* @__PURE__ */ e(K, { size: 20 }) : /* @__PURE__ */ e(X, { size: 20 })
216
+ }
217
+ )
218
+ ] }),
219
+ /* @__PURE__ */ e(
220
+ "nav",
221
+ {
222
+ className: a.sidebarNav,
223
+ "aria-label": p.format("sidebarMenu"),
224
+ children: /* @__PURE__ */ e("ul", { className: a.list, children: t.map((l, b) => /* @__PURE__ */ r("li", { children: [
225
+ l.title && !n && /* @__PURE__ */ e("p", { className: a.listGroupTitle, children: l.title }),
226
+ d ? /* @__PURE__ */ e(
227
+ O,
228
+ {
229
+ navigate: d,
230
+ useHref: v,
231
+ children: /* @__PURE__ */ e(h, { group: l })
232
+ }
233
+ ) : /* @__PURE__ */ e(h, { group: l })
234
+ ] }, "list_" + b)) })
235
+ }
236
+ )
237
+ ]
238
+ }
239
+ );
240
+ }, Ge = () => {
241
+ const {
242
+ title: t,
243
+ user: s,
244
+ app: i,
245
+ isOpened: n,
246
+ setIsOpened: o,
247
+ setIsCollapsed: m,
248
+ headerChildren: d,
249
+ variant: v,
250
+ id: _
251
+ } = k(), p = C(x);
252
+ return v === "external" ? /* @__PURE__ */ e("header", { className: u(a.header, a.headerExternal), children: /* @__PURE__ */ r("div", { className: a.headerContentExternal, children: [
253
+ /* @__PURE__ */ r("div", { className: a.logoExternalContainer, children: [
254
+ /* @__PURE__ */ e(
255
+ g,
256
+ {
257
+ size: "x-small",
258
+ padding: !1,
259
+ className: a.logoExternal
260
+ }
261
+ ),
262
+ /* @__PURE__ */ e(
263
+ g,
264
+ {
265
+ size: "small",
266
+ padding: !1,
267
+ className: a.logoExternalDesktop
268
+ }
269
+ ),
270
+ /* @__PURE__ */ r("div", { children: [
271
+ /* @__PURE__ */ e("p", { className: a.userName, children: s.name }),
272
+ /* @__PURE__ */ e("p", { className: a.userTitle, children: s.title })
273
+ ] })
274
+ ] }),
275
+ /* @__PURE__ */ e("div", { className: a.headerItems, children: d })
276
+ ] }) }) : /* @__PURE__ */ r(
277
+ "header",
278
+ {
279
+ className: a.header,
280
+ style: {
281
+ borderTop: `solid 4px ${i.color ? i.color : q.brandPrimary}`
282
+ },
283
+ children: [
284
+ /* @__PURE__ */ r("div", { className: a.headerContent, children: [
285
+ /* @__PURE__ */ e("div", { className: a.logo, children: /* @__PURE__ */ e(
286
+ g,
287
+ {
288
+ size: "small",
289
+ padding: !1
290
+ }
291
+ ) }),
292
+ n !== void 0 && /* @__PURE__ */ e(
293
+ M,
294
+ {
295
+ variant: "icon",
296
+ className: a.toggleButton,
297
+ "aria-label": n ? p.format("closeMenu") : p.format("openMenu"),
298
+ "aria-controls": _,
299
+ onPressStart: () => {
300
+ m(!1), o?.(!0);
301
+ },
302
+ children: n ? /* @__PURE__ */ e(
303
+ A,
304
+ {
305
+ size: 20,
306
+ "aria-hidden": "true"
307
+ }
308
+ ) : /* @__PURE__ */ e(
309
+ $,
310
+ {
311
+ size: 20,
312
+ "aria-hidden": "true"
313
+ }
314
+ )
315
+ }
316
+ ),
317
+ /* @__PURE__ */ r("div", { children: [
318
+ /* @__PURE__ */ e("p", { className: a.userName, children: s.name }),
319
+ /* @__PURE__ */ e("p", { className: a.userTitle, children: s.title }),
320
+ /* @__PURE__ */ e("p", { className: a.title, children: t })
321
+ ] })
322
+ ] }),
323
+ /* @__PURE__ */ e("div", { className: a.headerItems, children: d })
324
+ ]
325
+ }
326
+ );
327
+ }, z = ({
328
+ id: t = "main:first-of-type"
329
+ }) => {
330
+ const s = () => {
331
+ const n = document.querySelector(t);
332
+ n && (n.tabIndex = -1, n.focus(), setTimeout(() => n.removeAttribute("tabindex"), 1e3));
333
+ }, i = C(x);
334
+ return /* @__PURE__ */ e(
335
+ M,
336
+ {
337
+ onPress: s,
338
+ className: a.skipToContent,
339
+ children: i.format("skipToContent")
340
+ }
341
+ );
342
+ }, We = () => {
343
+ const { isOpened: t, setIsOpened: s } = k();
344
+ return t ? /* @__PURE__ */ e(
345
+ "div",
346
+ {
347
+ className: u(a.backdrop, a.backdropOpened),
348
+ onClick: () => {
349
+ s?.(!1);
350
+ },
351
+ "aria-hidden": !0
352
+ }
353
+ ) : null;
354
+ }, je = () => {
355
+ const { items: t, clientSideRouter: s, clientSideHref: i } = k(), n = C(x), o = t.at(0)?.items;
356
+ return /* @__PURE__ */ e(
357
+ "nav",
358
+ {
359
+ className: a.navbar,
360
+ "aria-label": n.format("bottomMenu"),
361
+ children: o && /* @__PURE__ */ e("ul", { className: u(a.navbarList), children: s ? /* @__PURE__ */ e(
362
+ O,
363
+ {
364
+ navigate: s,
365
+ useHref: i,
366
+ children: /* @__PURE__ */ e(B, { items: o })
367
+ }
368
+ ) : /* @__PURE__ */ e(B, { items: o }) })
369
+ }
370
+ );
371
+ }, B = ({
372
+ items: t
373
+ }) => /* @__PURE__ */ e(H, { children: t.map(({ href: s, active: i, icon: n, title: o, hasBadge: m }, d) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ r(
374
+ L,
375
+ {
376
+ href: s,
377
+ className: u(a.navbarItem),
378
+ "data-active": i,
379
+ "aria-current": i && "page",
380
+ children: [
381
+ /* @__PURE__ */ r(y, { children: [
382
+ /* @__PURE__ */ e(n, { size: 20 }),
383
+ m && /* @__PURE__ */ e(I, {})
384
+ ] }),
385
+ o
386
+ ]
387
+ }
388
+ ) }, d)) }), c = ({
389
+ items: t,
390
+ title: s,
391
+ user: i,
392
+ app: n,
393
+ children: o,
394
+ headerChildren: m,
395
+ clientSideRouter: d,
396
+ clientSideHref: v,
397
+ variant: _,
398
+ className: p
399
+ }) => {
400
+ const [h, l] = N.useState(!1), [b, f] = N.useState(!1), T = N.useId();
401
+ return _ === "external" ? /* @__PURE__ */ e(
402
+ c.Provider,
403
+ {
404
+ items: t,
405
+ title: s,
406
+ user: i,
407
+ app: n,
408
+ clientSideRouter: d,
409
+ clientSideHref: v,
410
+ headerChildren: m,
411
+ isCollapsed: h,
412
+ setIsCollapsed: l,
413
+ variant: _,
414
+ id: T,
415
+ children: /* @__PURE__ */ r("div", { className: u(a.baseLayout, p), children: [
416
+ /* @__PURE__ */ e(z, {}),
417
+ /* @__PURE__ */ e(c.Header, {}),
418
+ /* @__PURE__ */ r("div", { className: a.mainContent, children: [
419
+ /* @__PURE__ */ e(c.Sidebar, {}),
420
+ /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: o }) }) }),
421
+ /* @__PURE__ */ e(c.Backdrop, {})
422
+ ] }),
423
+ /* @__PURE__ */ e("div", { className: a.navbarWrapper, children: /* @__PURE__ */ e(c.Navbar, {}) })
424
+ ] })
425
+ }
426
+ ) : /* @__PURE__ */ e(
427
+ c.Provider,
428
+ {
429
+ items: t,
430
+ title: s,
431
+ user: i,
432
+ app: n,
433
+ clientSideRouter: d,
434
+ clientSideHref: v,
435
+ headerChildren: m,
436
+ isCollapsed: h,
437
+ setIsCollapsed: l,
438
+ isOpened: b,
439
+ setIsOpened: f,
440
+ variant: _,
441
+ id: T,
442
+ children: /* @__PURE__ */ r("div", { className: u(a.baseLayout, p), children: [
443
+ /* @__PURE__ */ e(z, {}),
444
+ /* @__PURE__ */ e(c.Header, {}),
445
+ /* @__PURE__ */ r("div", { className: a.mainContent, children: [
446
+ /* @__PURE__ */ e(c.Sidebar, {}),
447
+ /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("main", { className: a.main, children: /* @__PURE__ */ e("div", { className: a.app, children: o }) }) }),
448
+ /* @__PURE__ */ e(c.Backdrop, {})
449
+ ] })
450
+ ] })
451
+ }
452
+ );
453
+ };
454
+ c.Provider = Oe;
455
+ c.Header = Ge;
456
+ c.Sidebar = He;
457
+ c.SidebarLink = P;
458
+ c.Navbar = je;
459
+ c.Backdrop = We;
460
+ export {
461
+ Ge as H,
462
+ c as L,
463
+ je as N,
464
+ He as S,
465
+ P as a
466
+ };
@@ -3,7 +3,7 @@ import { Radio as u, RadioGroup as _, Group as f } from "react-aria-components";
3
3
  import { c as p } from "./clsx-AexbMWKp.js";
4
4
  import { a as G, L as R } from "./Label-Dup4lWaR.js";
5
5
  import { T as h } from "./Text-TWzJxnto.js";
6
- import { F as t } from "./FieldError-C0HRIcAx.js";
6
+ import { F as t } from "./FieldError-Bc0acYNs.js";
7
7
  import '../assets/Radio.css';const x = "_radioGroup_1ls9z_1", w = "_wrap_1ls9z_12", z = "_radio_1ls9z_1", s = {
8
8
  radioGroup: x,
9
9
  wrap: w,
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
2
  import { RangeCalendarContext as h, CalendarGrid as C, CalendarCell as g, Calendar as v, RangeCalendar as _ } from "react-aria-components";
3
3
  import { c as p, a as l } from "./clsx-AexbMWKp.js";
4
- import { F as c } from "./FieldError-C0HRIcAx.js";
4
+ import { F as c } from "./FieldError-Bc0acYNs.js";
5
5
  import * as y from "react";
6
6
  import { B as i } from "./Button-wBgWrXj3.js";
7
7
  import { H as f } from "./Heading-D8tNNJkt.js";
@@ -5,7 +5,7 @@ import { c as l } from "./clsx-AexbMWKp.js";
5
5
  import * as x from "react";
6
6
  import { useSearchFieldState as j } from "react-stately";
7
7
  import { useSearchField as C } from "react-aria";
8
- import { F as f } from "./FieldError-C0HRIcAx.js";
8
+ import { F as f } from "./FieldError-Bc0acYNs.js";
9
9
  import { c as p } from "./createLucideIcon-D4r5Phnh.js";
10
10
  import { X as B } from "./x-BXShoIAM.js";
11
11
  import { u as D } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
@@ -19,11 +19,11 @@ import { useFormValidation as ce } from "@react-aria/form";
19
19
  import { useVisuallyHidden as de } from "@react-aria/visually-hidden";
20
20
  import { a as ue, L as me } from "./Label-Dup4lWaR.js";
21
21
  import { T as ge } from "./Text-TWzJxnto.js";
22
- import { C as fe } from "./Checkbox-CP6Nv9yx.js";
22
+ import { C as fe } from "./Checkbox-gsEu5wcB.js";
23
23
  import { X as pe } from "./x-BXShoIAM.js";
24
24
  import { u as B } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
25
25
  import { C as ye } from "./chevron-down-DgT-uSF9.js";
26
- import { F as he } from "./FieldError-C0HRIcAx.js";
26
+ import { F as he } from "./FieldError-Bc0acYNs.js";
27
27
  import '../assets/Select2.css';const T = ({ item: e }) => /* @__PURE__ */ o(
28
28
  X,
29
29
  {
@@ -4,9 +4,9 @@ import { FocusScope as b } from "@react-aria/focus";
4
4
  import { a as T, L as N } from "./Label-Dup4lWaR.js";
5
5
  import { a as y, c as h } from "./clsx-AexbMWKp.js";
6
6
  import { T as B } from "./Text-TWzJxnto.js";
7
- import { F as _ } from "./FieldError-C0HRIcAx.js";
7
+ import { F as _ } from "./FieldError-Bc0acYNs.js";
8
8
  import f, { useContext as p } from "react";
9
- import { C as L } from "./Checkbox-CP6Nv9yx.js";
9
+ import { C as L } from "./Checkbox-gsEu5wcB.js";
10
10
  import { u } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
11
11
  import { useFocusManager as M } from "react-aria";
12
12
  import { X as F } from "./x-BXShoIAM.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as i, Fragment as b } from "react/jsx-runtime";
2
2
  import { Table as w, useTableOptions as u, TableHeader as g, Collection as p, Row as N, Button as k, Column as f, Cell as x, TableBody as T } from "react-aria-components";
3
- import { C as h } from "./Checkbox-CP6Nv9yx.js";
3
+ import { C as h } from "./Checkbox-gsEu5wcB.js";
4
4
  import { c as a } from "./clsx-AexbMWKp.js";
5
5
  import { c as d } from "./createLucideIcon-D4r5Phnh.js";
6
6
  import '../assets/Table.css';const C = [
@@ -0,0 +1,136 @@
1
+ import { jsxs as l, jsx as e, Fragment as T } from "react/jsx-runtime";
2
+ import { TextField as F, useContextProps as h, InputContext as u, Input as N, TextArea as P } from "react-aria-components";
3
+ import { a as b, c as m } from "./clsx-AexbMWKp.js";
4
+ import { s as c } from "./TextField.module-DZslrEPC.js";
5
+ import { useState as g } from "react";
6
+ import { T as x } from "./Text-TWzJxnto.js";
7
+ import { B as C } from "./Button-wBgWrXj3.js";
8
+ import { u as v } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
9
+ import { F as p } from "./FieldError-Bc0acYNs.js";
10
+ import { C as I } from "./CharacterCounter-_m-SgTMV.js";
11
+ import { a as L, L as y } from "./Label-Dup4lWaR.js";
12
+ const f = (t) => {
13
+ const {
14
+ label: s,
15
+ description: r,
16
+ errorMessage: a,
17
+ showCounter: n,
18
+ errorPosition: o = "top",
19
+ size: i = "large",
20
+ popover: d,
21
+ children: w
22
+ } = t;
23
+ return /* @__PURE__ */ l(
24
+ F,
25
+ {
26
+ ...t,
27
+ className: b(c.textField, {
28
+ [c.medium]: i === "medium"
29
+ }),
30
+ children: [
31
+ /* @__PURE__ */ e(L, { popover: d, children: s && /* @__PURE__ */ e(y, { children: s }) }),
32
+ r && /* @__PURE__ */ e(x, { slot: "description", children: r }),
33
+ n && /* @__PURE__ */ e(I, { isLonely: !r }),
34
+ o === "top" && /* @__PURE__ */ e(p, { "data-testid": "fieldError", children: a }),
35
+ w,
36
+ o === "bottom" && /* @__PURE__ */ e(
37
+ p,
38
+ {
39
+ "data-testid": "fieldError",
40
+ className: c.bottomError,
41
+ children: a
42
+ }
43
+ )
44
+ ]
45
+ }
46
+ );
47
+ }, A = { hide: "Hide", show: "Show" }, B = { hide: "Dölj", show: "Visa" }, E = {
48
+ en: A,
49
+ sv: B
50
+ }, S = ({ ref: t, ...s }) => {
51
+ [s, t] = h(s, t, u);
52
+ const [r, a] = g(!1), n = () => a((i) => !i), o = v(E);
53
+ return /* @__PURE__ */ l(T, { children: [
54
+ r && /* @__PURE__ */ e(
55
+ x,
56
+ {
57
+ slot: "description",
58
+ className: c.passwordText,
59
+ children: s.value
60
+ }
61
+ ),
62
+ /* @__PURE__ */ e(
63
+ C,
64
+ {
65
+ variant: "tertiary",
66
+ onPress: n,
67
+ className: c.passwordButton,
68
+ children: r ? o.format("hide") : o.format("show")
69
+ }
70
+ )
71
+ ] });
72
+ }, $ = ({
73
+ ref: t,
74
+ skipContext: s = !1,
75
+ ...r
76
+ }) => {
77
+ const [a, n] = h(
78
+ r,
79
+ t,
80
+ u
81
+ ), o = s ? t : n, i = s ? r : a;
82
+ return /* @__PURE__ */ l("div", { className: c.wrap, children: [
83
+ /* @__PURE__ */ e(
84
+ N,
85
+ {
86
+ ...i,
87
+ ref: o,
88
+ className: m(c.input, i.className)
89
+ }
90
+ ),
91
+ i.type === "password" && /* @__PURE__ */ e(S, { ...i })
92
+ ] });
93
+ }, K = ({
94
+ className: t,
95
+ form: s,
96
+ list: r,
97
+ min: a,
98
+ max: n,
99
+ ref: o,
100
+ type: i,
101
+ ...d
102
+ }) => /* @__PURE__ */ e(f, { ...d, children: /* @__PURE__ */ e(
103
+ $,
104
+ {
105
+ className: m(t),
106
+ form: s,
107
+ list: r,
108
+ min: a,
109
+ max: n,
110
+ ref: o,
111
+ type: i,
112
+ skipContext: !0
113
+ }
114
+ ) }), O = ({
115
+ className: t,
116
+ form: s,
117
+ rows: r,
118
+ wrap: a,
119
+ ref: n,
120
+ ...o
121
+ }) => /* @__PURE__ */ e(f, { ...o, children: /* @__PURE__ */ e(
122
+ P,
123
+ {
124
+ className: m(c.textArea, t),
125
+ form: s,
126
+ ref: n,
127
+ rows: r,
128
+ wrap: a
129
+ }
130
+ ) });
131
+ export {
132
+ $ as I,
133
+ f as T,
134
+ K as a,
135
+ O as b
136
+ };
package/combobox/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as a, a as b, b as x } from "../chunks/ComboBox-N97lv5kN.js";
1
+ import { C as a, a as b, b as x } from "../chunks/ComboBox-yl5zHYPk.js";
2
2
  export {
3
3
  a as ComboBox,
4
4
  b as ComboBoxItem,
@@ -1,4 +1,4 @@
1
- import { D as t } from "../chunks/DateField-DeuLPe1Y.js";
1
+ import { D as t } from "../chunks/DateField-BsT1K-bB.js";
2
2
  import { a as r, b as o, D as p } from "../chunks/DateInputDivider-CkTB5q5k.js";
3
3
  export {
4
4
  t as DateField,
@@ -1,4 +1,4 @@
1
- import { D as r, a as t } from "../chunks/DateRangePicker-BqjLArNi.js";
1
+ import { D as r, a as t } from "../chunks/DateRangePicker-BsK7pMRv.js";
2
2
  export {
3
3
  r as DatePicker,
4
4
  t as DateRangePicker