@midas-ds/components 16.2.4 → 16.3.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 (51) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/calendar/index.js +1 -1
  3. package/character-counter/CharacterCounter.d.ts +1 -2
  4. package/character-counter/index.js +1 -1
  5. package/checkbox/Checkbox.d.ts +2 -3
  6. package/checkbox/CheckboxGroupItem.d.ts +1 -2
  7. package/checkbox/CheckboxInner.d.ts +1 -2
  8. package/checkbox/SingleCheckbox.d.ts +1 -2
  9. package/checkbox/index.js +2 -2
  10. package/checkbox/types.d.ts +1 -1
  11. package/chunks/{CharacterCounter-DeuE2det.js → CharacterCounter-R6vh7AE5.js} +7 -6
  12. package/chunks/Checkbox-BTAfwDxU.js +130 -0
  13. package/chunks/{CheckboxGroup-C5kaqBcn.js → CheckboxGroup-BQ8EpX7O.js} +3 -3
  14. package/chunks/{ComboBox-N97lv5kN.js → ComboBox-DVK0dL2W.js} +1 -1
  15. package/chunks/{DateField-DeuLPe1Y.js → DateField-06YL8tj_.js} +1 -1
  16. package/chunks/{DateRangePicker-BqjLArNi.js → DateRangePicker-CZRWDV_g.js} +2 -2
  17. package/chunks/FieldError-Bra5aRT3.js +24 -0
  18. package/chunks/{Layout-ClW2Lbvq.js → Layout-DX3HUm5b.js} +72 -71
  19. package/chunks/{Radio-Dro99zCs.js → Radio-BDHczAt5.js} +1 -1
  20. package/chunks/{RangeCalendar-CGk2btOp.js → RangeCalendar-BSth1Fmv.js} +1 -1
  21. package/chunks/{SearchField-BfpeANM6.js → SearchField-DTkfUFwn.js} +1 -1
  22. package/chunks/{Select-D-LtFSZX.js → Select-C8Fr7Vn3.js} +2 -2
  23. package/chunks/{Select-nL9iJMlf.js → Select-CPM82ww2.js} +2 -2
  24. package/chunks/{Table-CgBjwlIi.js → Table-BgsgXhC_.js} +1 -1
  25. package/chunks/TextArea-DQ_dAC-2.js +137 -0
  26. package/combobox/index.js +1 -1
  27. package/date-field/index.js +1 -1
  28. package/date-picker/index.js +1 -1
  29. package/field-error/FieldError.d.ts +1 -2
  30. package/field-error/index.js +1 -1
  31. package/index.js +15 -15
  32. package/layout/components/SidebarLink.d.ts +1 -2
  33. package/layout/index.js +1 -1
  34. package/legacy-select/HiddenMultiSelect.d.ts +2 -2
  35. package/legacy-select/MultiSelectValueTag.d.ts +3 -3
  36. package/legacy-select/index.js +1 -1
  37. package/legacy-select/useMultiSelect.d.ts +1 -1
  38. package/package.json +1 -1
  39. package/radio/index.js +1 -1
  40. package/search-field/index.js +1 -1
  41. package/select/index.js +1 -1
  42. package/table/index.js +1 -1
  43. package/textfield/Input.d.ts +1 -2
  44. package/textfield/PasswordField.d.ts +1 -2
  45. package/textfield/TextArea.d.ts +1 -2
  46. package/textfield/TextField.d.ts +1 -2
  47. package/textfield/TextFieldBase.d.ts +3 -3
  48. package/textfield/index.js +1 -1
  49. package/chunks/Checkbox-CP6Nv9yx.js +0 -122
  50. package/chunks/FieldError-C0HRIcAx.js +0 -23
  51. package/chunks/TextArea-CRvbqqVZ.js +0 -124
@@ -1,124 +0,0 @@
1
- import { jsxs as l, jsx as s, Fragment as N } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import { useContextProps as m, TextFieldContext as C, TextField as P, InputContext as p, Input as b, TextArea as g } from "react-aria-components";
4
- import { a as R, c as f } from "./clsx-AexbMWKp.js";
5
- import { s as d } from "./TextField.module-DZslrEPC.js";
6
- import { T as x } from "./Text-TWzJxnto.js";
7
- import { B as v } from "./Button-wBgWrXj3.js";
8
- import { u as I } from "./useLocalizedStringFormatter-ZgRJmvHC.js";
9
- import { F as h } from "./FieldError-C0HRIcAx.js";
10
- import { C as L } from "./CharacterCounter-DeuE2det.js";
11
- import { a as y, L as A } from "./Label-Dup4lWaR.js";
12
- const u = c.forwardRef((e, t) => {
13
- [e] = m(e, t, C);
14
- const {
15
- label: r,
16
- description: o,
17
- errorMessage: i,
18
- showCounter: n,
19
- errorPosition: a = "top",
20
- size: w = "large",
21
- popover: T,
22
- children: F
23
- } = e;
24
- return /* @__PURE__ */ l(
25
- P,
26
- {
27
- ...e,
28
- className: R(d.textField, {
29
- [d.medium]: w === "medium"
30
- }),
31
- children: [
32
- /* @__PURE__ */ s(y, { popover: T, children: r && /* @__PURE__ */ s(A, { children: r }) }),
33
- o && /* @__PURE__ */ s(x, { slot: "description", children: o }),
34
- n && /* @__PURE__ */ s(L, { isLonely: !o }),
35
- a === "top" && /* @__PURE__ */ s(h, { "data-testid": "fieldError", children: i }),
36
- F,
37
- a === "bottom" && /* @__PURE__ */ s(
38
- h,
39
- {
40
- "data-testid": "fieldError",
41
- className: d.bottomError,
42
- children: i
43
- }
44
- )
45
- ]
46
- }
47
- );
48
- }), B = { hide: "Hide", show: "Show" }, E = { hide: "Dölj", show: "Visa" }, S = {
49
- en: B,
50
- sv: E
51
- }, $ = c.forwardRef(
52
- (e, t) => {
53
- [e, t] = m(e, t, p);
54
- const [r, o] = c.useState(!1), i = () => o((a) => !a), n = I(S);
55
- return /* @__PURE__ */ l(N, { children: [
56
- r && /* @__PURE__ */ s(
57
- x,
58
- {
59
- slot: "description",
60
- className: d.passwordText,
61
- children: e.value
62
- }
63
- ),
64
- /* @__PURE__ */ s(
65
- v,
66
- {
67
- variant: "tertiary",
68
- onPress: i,
69
- className: d.passwordButton,
70
- children: r ? n.format("hide") : n.format("show")
71
- }
72
- )
73
- ] });
74
- }
75
- ), j = c.forwardRef(
76
- ({ skipContext: e = !1, ...t }, r) => {
77
- const [o, i] = m(
78
- t,
79
- r,
80
- p
81
- ), n = e ? r : i, a = e ? t : o;
82
- return /* @__PURE__ */ l("div", { className: d.wrap, children: [
83
- /* @__PURE__ */ s(
84
- b,
85
- {
86
- ...a,
87
- ref: n,
88
- className: f(d.input, a.className)
89
- }
90
- ),
91
- a.type === "password" && /* @__PURE__ */ s($, { ...a })
92
- ] });
93
- }
94
- ), K = c.forwardRef(
95
- ({ className: e, list: t, type: r, min: o, max: i, ...n }, a) => /* @__PURE__ */ s(u, { ...n, children: /* @__PURE__ */ s(
96
- j,
97
- {
98
- className: f(e),
99
- list: t,
100
- min: o,
101
- max: i,
102
- ref: a,
103
- type: r,
104
- skipContext: !0
105
- }
106
- ) })
107
- ), O = c.forwardRef(
108
- ({ className: e, cols: t, rows: r, wrap: o, ...i }, n) => /* @__PURE__ */ s(u, { ...i, children: /* @__PURE__ */ s(
109
- g,
110
- {
111
- className: f(d.textArea, e),
112
- cols: t,
113
- ref: n,
114
- rows: r,
115
- wrap: o
116
- }
117
- ) })
118
- );
119
- export {
120
- j as I,
121
- u as T,
122
- K as a,
123
- O as b
124
- };