@midas-ds/components 16.2.4 → 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.
- package/CHANGELOG.md +14 -0
- package/calendar/index.js +1 -1
- package/character-counter/CharacterCounter.d.ts +3 -2
- package/character-counter/index.js +1 -1
- package/checkbox/Checkbox.d.ts +2 -4
- package/checkbox/CheckboxGroupItem.d.ts +1 -2
- package/checkbox/CheckboxInner.d.ts +2 -2
- package/checkbox/SingleCheckbox.d.ts +1 -2
- package/checkbox/index.js +2 -2
- package/checkbox/types.d.ts +2 -1
- package/chunks/CharacterCounter-_m-SgTMV.js +20 -0
- package/chunks/Checkbox-gsEu5wcB.js +119 -0
- package/chunks/{CheckboxGroup-C5kaqBcn.js → CheckboxGroup-A7UJMi5J.js} +3 -3
- package/chunks/{ComboBox-N97lv5kN.js → ComboBox-yl5zHYPk.js} +1 -1
- package/chunks/{DateField-DeuLPe1Y.js → DateField-BsT1K-bB.js} +1 -1
- package/chunks/{DateRangePicker-BqjLArNi.js → DateRangePicker-BsK7pMRv.js} +2 -2
- package/chunks/FieldError-Bc0acYNs.js +21 -0
- package/chunks/{Layout-ClW2Lbvq.js → Layout-DX3HUm5b.js} +72 -71
- package/chunks/{Radio-Dro99zCs.js → Radio-CSFYbin8.js} +1 -1
- package/chunks/{RangeCalendar-CGk2btOp.js → RangeCalendar-BF-6p7u2.js} +1 -1
- package/chunks/{SearchField-BfpeANM6.js → SearchField-mBHZ9pFg.js} +1 -1
- package/chunks/{Select-nL9iJMlf.js → Select-BjD5iQvX.js} +2 -2
- package/chunks/{Select-D-LtFSZX.js → Select-Df4333VV.js} +2 -2
- package/chunks/{Table-CgBjwlIi.js → Table-t3rVzb31.js} +1 -1
- package/chunks/TextArea-B2BePnZz.js +136 -0
- package/combobox/index.js +1 -1
- package/date-field/index.js +1 -1
- package/date-picker/index.js +1 -1
- package/field-error/FieldError.d.ts +3 -2
- package/field-error/index.js +1 -1
- package/index.js +15 -15
- package/layout/components/SidebarLink.d.ts +1 -2
- package/layout/index.js +1 -1
- package/legacy-select/HiddenMultiSelect.d.ts +2 -2
- package/legacy-select/MultiSelectValueTag.d.ts +3 -3
- package/legacy-select/Select.d.ts +2 -4
- package/legacy-select/index.js +1 -1
- package/legacy-select/types.d.ts +2 -1
- package/legacy-select/useMultiSelect.d.ts +1 -1
- package/package.json +1 -1
- package/radio/index.js +1 -1
- package/search-field/index.js +1 -1
- package/select/index.js +1 -1
- package/table/index.js +1 -1
- package/textfield/Input.d.ts +3 -2
- package/textfield/PasswordField.d.ts +1 -2
- package/textfield/TextArea.d.ts +5 -3
- package/textfield/TextField.d.ts +5 -3
- package/textfield/TextFieldBase.d.ts +3 -3
- package/textfield/index.js +1 -1
- package/chunks/CharacterCounter-DeuE2det.js +0 -21
- package/chunks/Checkbox-CP6Nv9yx.js +0 -122
- package/chunks/FieldError-C0HRIcAx.js +0 -23
- 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
|
-
};
|