@simplybusiness/mobius 5.3.1 → 5.5.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.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/components/Checkbox/Checkbox.js +16 -22
- package/dist/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/Checkbox/CheckboxGroup.js +29 -11
- package/dist/cjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/cjs/components/Combobox/Combobox.js +129 -0
- package/dist/cjs/components/Combobox/Combobox.js.map +1 -0
- package/dist/cjs/components/Combobox/fixtures.js +244 -0
- package/dist/cjs/components/Combobox/fixtures.js.map +1 -0
- package/dist/cjs/components/Combobox/index.js +21 -0
- package/dist/cjs/components/Combobox/index.js.map +1 -0
- package/dist/cjs/components/Combobox/types.js +6 -0
- package/dist/cjs/components/Combobox/types.js.map +1 -0
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/hooks/index.js +1 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useRenderCount/index.js +20 -0
- package/dist/cjs/hooks/useRenderCount/index.js.map +1 -0
- package/dist/cjs/hooks/useRenderCount/useRenderCount.js +20 -0
- package/dist/cjs/hooks/useRenderCount/useRenderCount.js.map +1 -0
- package/dist/cjs/hooks/useTextField/useTextField.js +1 -0
- package/dist/cjs/hooks/useTextField/useTextField.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +17 -23
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Checkbox/CheckboxGroup.js +29 -11
- package/dist/esm/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/esm/components/Checkbox/types.js.map +1 -1
- package/dist/esm/components/Combobox/Combobox.js +114 -0
- package/dist/esm/components/Combobox/Combobox.js.map +1 -0
- package/dist/esm/components/Combobox/fixtures.js +226 -0
- package/dist/esm/components/Combobox/fixtures.js.map +1 -0
- package/dist/esm/components/Combobox/index.js +4 -0
- package/dist/esm/components/Combobox/index.js.map +1 -0
- package/dist/esm/components/Combobox/types.js +3 -0
- package/dist/esm/components/Combobox/types.js.map +1 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useRenderCount/index.js +3 -0
- package/dist/esm/hooks/useRenderCount/index.js.map +1 -0
- package/dist/esm/hooks/useRenderCount/useRenderCount.js +10 -0
- package/dist/esm/hooks/useRenderCount/useRenderCount.js.map +1 -0
- package/dist/esm/hooks/useTextField/types.js.map +1 -1
- package/dist/esm/hooks/useTextField/useTextField.js +1 -0
- package/dist/esm/hooks/useTextField/useTextField.js.map +1 -1
- package/dist/types/components/Checkbox/CheckboxGroup.stories.d.ts +1 -0
- package/dist/types/components/Checkbox/types.d.ts +10 -6
- package/dist/types/components/Combobox/Combobox.d.ts +3 -0
- package/dist/types/components/Combobox/Combobox.stories.d.ts +7 -0
- package/dist/types/components/Combobox/Combobox.test.d.ts +1 -0
- package/dist/types/components/Combobox/fixtures.d.ts +5 -0
- package/dist/types/components/Combobox/index.d.ts +2 -0
- package/dist/types/components/Combobox/types.d.ts +16 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useRenderCount/index.d.ts +1 -0
- package/dist/types/hooks/useRenderCount/useRenderCount.d.ts +1 -0
- package/dist/types/hooks/useRenderCount/useRenderCount.test.d.ts +1 -0
- package/dist/types/hooks/useTextField/types.d.ts +3 -2
- package/package.json +17 -17
- package/src/components/Checkbox/Checkbox.tsx +18 -28
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +15 -0
- package/src/components/Checkbox/CheckboxGroup.test.tsx +107 -1
- package/src/components/Checkbox/CheckboxGroup.tsx +45 -15
- package/src/components/Checkbox/types.ts +13 -6
- package/src/components/Combobox/Combobox.css +30 -0
- package/src/components/Combobox/Combobox.stories.tsx +26 -0
- package/src/components/Combobox/Combobox.test.tsx +578 -0
- package/src/components/Combobox/Combobox.tsx +154 -0
- package/src/components/Combobox/fixtures.tsx +93 -0
- package/src/components/Combobox/index.tsx +2 -0
- package/src/components/Combobox/types.tsx +20 -0
- package/src/components/index.tsx +1 -0
- package/src/hooks/index.tsx +1 -0
- package/src/hooks/useRenderCount/index.ts +1 -0
- package/src/hooks/useRenderCount/useRenderCount.test.ts +26 -0
- package/src/hooks/useRenderCount/useRenderCount.ts +9 -0
- package/src/hooks/useTextField/types.tsx +7 -1
- package/src/hooks/useTextField/useTextField.test.tsx +1 -0
- package/src/hooks/useTextField/useTextField.tsx +1 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
FRUITS: function() {
|
|
13
|
+
return FRUITS;
|
|
14
|
+
},
|
|
15
|
+
FRUITS_OBJECTS: function() {
|
|
16
|
+
return FRUITS_OBJECTS;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const FRUITS = [
|
|
20
|
+
"Apple",
|
|
21
|
+
"Apricot",
|
|
22
|
+
"Avocado",
|
|
23
|
+
"Banana",
|
|
24
|
+
"Blackberry",
|
|
25
|
+
"Blueberry",
|
|
26
|
+
"Cantaloupe",
|
|
27
|
+
"Cherry",
|
|
28
|
+
"Clementine",
|
|
29
|
+
"Coconut",
|
|
30
|
+
"Cranberry",
|
|
31
|
+
"Date",
|
|
32
|
+
"Dragonfruit",
|
|
33
|
+
"Durian",
|
|
34
|
+
"Elderberry",
|
|
35
|
+
"Fig",
|
|
36
|
+
"Grape",
|
|
37
|
+
"Grapefruit",
|
|
38
|
+
"Guava",
|
|
39
|
+
"Honeydew",
|
|
40
|
+
"Jackfruit",
|
|
41
|
+
"Kiwi",
|
|
42
|
+
"Kumquat",
|
|
43
|
+
"Lemon",
|
|
44
|
+
"Lime",
|
|
45
|
+
"Lychee",
|
|
46
|
+
"Mango",
|
|
47
|
+
"Mulberry",
|
|
48
|
+
"Nectarine",
|
|
49
|
+
"Orange",
|
|
50
|
+
"Papaya",
|
|
51
|
+
"Passionfruit",
|
|
52
|
+
"Peach",
|
|
53
|
+
"Pear",
|
|
54
|
+
"Persimmon",
|
|
55
|
+
"Pineapple",
|
|
56
|
+
"Plum",
|
|
57
|
+
"Pomegranate",
|
|
58
|
+
"Raspberry",
|
|
59
|
+
"Redcurrant",
|
|
60
|
+
"Starfruit",
|
|
61
|
+
"Strawberry",
|
|
62
|
+
"Tangerine",
|
|
63
|
+
"Watermelon"
|
|
64
|
+
];
|
|
65
|
+
const FRUITS_OBJECTS = [
|
|
66
|
+
{
|
|
67
|
+
label: "Apple",
|
|
68
|
+
value: "apple"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: "Apricot",
|
|
72
|
+
value: "apricot"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: "Avocado",
|
|
76
|
+
value: "avocado"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: "Banana",
|
|
80
|
+
value: "banana"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: "Blackberry",
|
|
84
|
+
value: "blackberry"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: "Blueberry",
|
|
88
|
+
value: "blueberry"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: "Cantaloupe",
|
|
92
|
+
value: "cantaloupe"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: "Cherry",
|
|
96
|
+
value: "cherry"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: "Clementine",
|
|
100
|
+
value: "clementine"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: "Coconut",
|
|
104
|
+
value: "coconut"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: "Cranberry",
|
|
108
|
+
value: "cranberry"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
label: "Date",
|
|
112
|
+
value: "date"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label: "Dragonfruit",
|
|
116
|
+
value: "dragonfruit"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label: "Durian",
|
|
120
|
+
value: "durian"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
label: "Elderberry",
|
|
124
|
+
value: "elderberry"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: "Fig",
|
|
128
|
+
value: "fig"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: "Grape",
|
|
132
|
+
value: "grape"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
label: "Grapefruit",
|
|
136
|
+
value: "grapefruit"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: "Guava",
|
|
140
|
+
value: "guava"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: "Honeydew",
|
|
144
|
+
value: "honeydew"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: "Jackfruit",
|
|
148
|
+
value: "jackfruit"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
label: "Kiwi",
|
|
152
|
+
value: "kiwi"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
label: "Kumquat",
|
|
156
|
+
value: "kumquat"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: "Lemon",
|
|
160
|
+
value: "lemon"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: "Lime",
|
|
164
|
+
value: "lime"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: "Lychee",
|
|
168
|
+
value: "lychee"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
label: "Mango",
|
|
172
|
+
value: "mango"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: "Mulberry",
|
|
176
|
+
value: "mulberry"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
label: "Nectarine",
|
|
180
|
+
value: "nectarine"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
label: "Orange",
|
|
184
|
+
value: "orange"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
label: "Papaya",
|
|
188
|
+
value: "papaya"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
label: "Passionfruit",
|
|
192
|
+
value: "passionfruit"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
label: "Peach",
|
|
196
|
+
value: "peach"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
label: "Pear",
|
|
200
|
+
value: "pear"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
label: "Persimmon",
|
|
204
|
+
value: "persimmon"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
label: "Pineapple",
|
|
208
|
+
value: "pineapple"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
label: "Plum",
|
|
212
|
+
value: "plum"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
label: "Pomegranate",
|
|
216
|
+
value: "pomegranate"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
label: "Raspberry",
|
|
220
|
+
value: "raspberry"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
label: "Redcurrant",
|
|
224
|
+
value: "redcurrant"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
label: "Starfruit",
|
|
228
|
+
value: "starfruit"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
label: "Strawberry",
|
|
232
|
+
value: "strawberry"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
label: "Tangerine",
|
|
236
|
+
value: "tangerine"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
label: "Watermelon",
|
|
240
|
+
value: "watermelon"
|
|
241
|
+
}
|
|
242
|
+
];
|
|
243
|
+
|
|
244
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Combobox/fixtures.tsx"],"sourcesContent":["export const FRUITS = [\n \"Apple\",\n \"Apricot\",\n \"Avocado\",\n \"Banana\",\n \"Blackberry\",\n \"Blueberry\",\n \"Cantaloupe\",\n \"Cherry\",\n \"Clementine\",\n \"Coconut\",\n \"Cranberry\",\n \"Date\",\n \"Dragonfruit\",\n \"Durian\",\n \"Elderberry\",\n \"Fig\",\n \"Grape\",\n \"Grapefruit\",\n \"Guava\",\n \"Honeydew\",\n \"Jackfruit\",\n \"Kiwi\",\n \"Kumquat\",\n \"Lemon\",\n \"Lime\",\n \"Lychee\",\n \"Mango\",\n \"Mulberry\",\n \"Nectarine\",\n \"Orange\",\n \"Papaya\",\n \"Passionfruit\",\n \"Peach\",\n \"Pear\",\n \"Persimmon\",\n \"Pineapple\",\n \"Plum\",\n \"Pomegranate\",\n \"Raspberry\",\n \"Redcurrant\",\n \"Starfruit\",\n \"Strawberry\",\n \"Tangerine\",\n \"Watermelon\",\n];\n\nexport const FRUITS_OBJECTS = [\n { label: \"Apple\", value: \"apple\" },\n { label: \"Apricot\", value: \"apricot\" },\n { label: \"Avocado\", value: \"avocado\" },\n { label: \"Banana\", value: \"banana\" },\n { label: \"Blackberry\", value: \"blackberry\" },\n { label: \"Blueberry\", value: \"blueberry\" },\n { label: \"Cantaloupe\", value: \"cantaloupe\" },\n { label: \"Cherry\", value: \"cherry\" },\n { label: \"Clementine\", value: \"clementine\" },\n { label: \"Coconut\", value: \"coconut\" },\n { label: \"Cranberry\", value: \"cranberry\" },\n { label: \"Date\", value: \"date\" },\n { label: \"Dragonfruit\", value: \"dragonfruit\" },\n { label: \"Durian\", value: \"durian\" },\n { label: \"Elderberry\", value: \"elderberry\" },\n { label: \"Fig\", value: \"fig\" },\n { label: \"Grape\", value: \"grape\" },\n { label: \"Grapefruit\", value: \"grapefruit\" },\n { label: \"Guava\", value: \"guava\" },\n { label: \"Honeydew\", value: \"honeydew\" },\n { label: \"Jackfruit\", value: \"jackfruit\" },\n { label: \"Kiwi\", value: \"kiwi\" },\n { label: \"Kumquat\", value: \"kumquat\" },\n { label: \"Lemon\", value: \"lemon\" },\n { label: \"Lime\", value: \"lime\" },\n { label: \"Lychee\", value: \"lychee\" },\n { label: \"Mango\", value: \"mango\" },\n { label: \"Mulberry\", value: \"mulberry\" },\n { label: \"Nectarine\", value: \"nectarine\" },\n { label: \"Orange\", value: \"orange\" },\n { label: \"Papaya\", value: \"papaya\" },\n { label: \"Passionfruit\", value: \"passionfruit\" },\n { label: \"Peach\", value: \"peach\" },\n { label: \"Pear\", value: \"pear\" },\n { label: \"Persimmon\", value: \"persimmon\" },\n { label: \"Pineapple\", value: \"pineapple\" },\n { label: \"Plum\", value: \"plum\" },\n { label: \"Pomegranate\", value: \"pomegranate\" },\n { label: \"Raspberry\", value: \"raspberry\" },\n { label: \"Redcurrant\", value: \"redcurrant\" },\n { label: \"Starfruit\", value: \"starfruit\" },\n { label: \"Strawberry\", value: \"strawberry\" },\n { label: \"Tangerine\", value: \"tangerine\" },\n { label: \"Watermelon\", value: \"watermelon\" },\n];\n"],"names":["FRUITS","FRUITS_OBJECTS","label","value"],"mappings":";;;;;;;;;;;IAAaA,MAAM;eAANA;;IA+CAC,cAAc;eAAdA;;;AA/CN,MAAMD,SAAS;IACpB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAC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,OAAO;IAAY;IACzC;QAAED,OAAO;QAAUC,OAAO;IAAS;IACnC;QAAED,OAAO;QAAUC,OAAO;IAAS;IACnC;QAAED,OAAO;QAAgBC,OAAO;IAAe;IAC/C;QAAED,OAAO;QAASC,OAAO;IAAQ;IACjC;QAAED,OAAO;QAAQC,OAAO;IAAO;IAC/B;QAAED,OAAO;QAAaC,OAAO;IAAY;IACzC;QAAED,OAAO;QAAaC,OAAO;IAAY;IACzC;QAAED,OAAO;QAAQC,OAAO;IAAO;IAC/B;QAAED,OAAO;QAAeC,OAAO;IAAc;IAC7C;QAAED,OAAO;QAAaC,OAAO;IAAY;IACzC;QAAED,OAAO;QAAcC,OAAO;IAAa;IAC3C;QAAED,OAAO;QAAaC,OAAO;IAAY;IACzC;QAAED,OAAO;QAAcC,OAAO;IAAa;IAC3C;QAAED,OAAO;QAAaC,OAAO;IAAY;IACzC;QAAED,OAAO;QAAcC,OAAO;IAAa;CAC5C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
_export_star(require("./Combobox"), exports);
|
|
6
|
+
_export_star(require("./types"), exports);
|
|
7
|
+
function _export_star(from, to) {
|
|
8
|
+
Object.keys(from).forEach(function(k) {
|
|
9
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
10
|
+
Object.defineProperty(to, k, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function() {
|
|
13
|
+
return from[k];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return from;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Combobox/index.tsx"],"sourcesContent":["export * from \"./Combobox\";\nexport * from \"./types\";\n"],"names":[],"mappings":";;;;qBAAc;qBACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Combobox/types.tsx"],"names":[],"mappings":""}
|
|
@@ -8,6 +8,7 @@ _export_star(require("./Box"), exports);
|
|
|
8
8
|
_export_star(require("./Breadcrumbs"), exports);
|
|
9
9
|
_export_star(require("./Button"), exports);
|
|
10
10
|
_export_star(require("./Checkbox"), exports);
|
|
11
|
+
_export_star(require("./Combobox"), exports);
|
|
11
12
|
_export_star(require("./Container"), exports);
|
|
12
13
|
_export_star(require("./Divider"), exports);
|
|
13
14
|
_export_star(require("./Drawer"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.tsx"],"sourcesContent":["export * from \"./Accordion\";\nexport * from \"./Alert\";\nexport * from \"./Box\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./Button\";\nexport * from \"./Checkbox\";\nexport * from \"./Container\";\nexport * from \"./Divider\";\nexport * from \"./Drawer\";\nexport * from \"./DropdownMenu\";\nexport * from \"./ErrorMessage\";\nexport * from \"./Fieldset\";\nexport * from \"./Flex\";\nexport * from \"./Grid\";\nexport * from \"./Icon\";\nexport * from \"./Image\";\nexport * from \"./Label\";\nexport * from \"./Link\";\nexport * from \"./LinkButton\";\nexport * from \"./List\";\nexport * from \"./LoadingIndicator\";\nexport * from \"./Logo\";\nexport * from \"./Modal\";\nexport * from \"./NumberField\";\nexport * from \"./Option\";\nexport * from \"./PasswordField\";\nexport * from \"./Popover\";\nexport * from \"./Progress\";\nexport * from \"./Radio\";\nexport * from \"./Segment\";\nexport * from \"./Select\";\nexport * from \"./Slider\";\nexport * from \"./Stack\";\nexport * from \"./SVG\";\nexport * from \"./Table\";\nexport * from \"./Text\";\nexport * from \"./TextArea\";\nexport * from \"./TextAreaInput\";\nexport * from \"./TextField\";\nexport * from \"./Title\";\nexport * from \"./Trust\";\nexport * from \"./VisuallyHidden\";\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.tsx"],"sourcesContent":["export * from \"./Accordion\";\nexport * from \"./Alert\";\nexport * from \"./Box\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./Button\";\nexport * from \"./Checkbox\";\nexport * from \"./Combobox\";\nexport * from \"./Container\";\nexport * from \"./Divider\";\nexport * from \"./Drawer\";\nexport * from \"./DropdownMenu\";\nexport * from \"./ErrorMessage\";\nexport * from \"./Fieldset\";\nexport * from \"./Flex\";\nexport * from \"./Grid\";\nexport * from \"./Icon\";\nexport * from \"./Image\";\nexport * from \"./Label\";\nexport * from \"./Link\";\nexport * from \"./LinkButton\";\nexport * from \"./List\";\nexport * from \"./LoadingIndicator\";\nexport * from \"./Logo\";\nexport * from \"./Modal\";\nexport * from \"./NumberField\";\nexport * from \"./Option\";\nexport * from \"./PasswordField\";\nexport * from \"./Popover\";\nexport * from \"./Progress\";\nexport * from \"./Radio\";\nexport * from \"./Segment\";\nexport * from \"./Select\";\nexport * from \"./Slider\";\nexport * from \"./Stack\";\nexport * from \"./SVG\";\nexport * from \"./Table\";\nexport * from \"./Text\";\nexport * from \"./TextArea\";\nexport * from \"./TextAreaInput\";\nexport * from \"./TextField\";\nexport * from \"./Title\";\nexport * from \"./Trust\";\nexport * from \"./VisuallyHidden\";\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
package/dist/cjs/hooks/index.js
CHANGED
|
@@ -11,6 +11,7 @@ _export_star(require("./useDialogPolyfill"), exports);
|
|
|
11
11
|
_export_star(require("./useLabel"), exports);
|
|
12
12
|
_export_star(require("./useOnClickOutside"), exports);
|
|
13
13
|
_export_star(require("./usePrefersReducedMotion"), exports);
|
|
14
|
+
_export_star(require("./useRenderCount"), exports);
|
|
14
15
|
_export_star(require("./useTextField"), exports);
|
|
15
16
|
_export_star(require("./useValidationClasses"), exports);
|
|
16
17
|
_export_star(require("./useWindowEvent"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hooks/index.tsx"],"sourcesContent":["export * from \"./useBodyScrollLock\";\nexport * from \"./useBreakpoint\";\nexport * from \"./useButton\";\nexport * from \"./useDeprecationWarning\";\nexport * from \"./useDialog\";\nexport * from \"./useDialogPolyfill\";\nexport * from \"./useLabel\";\nexport * from \"./useOnClickOutside\";\nexport * from \"./usePrefersReducedMotion\";\nexport * from \"./useTextField\";\nexport * from \"./useValidationClasses\";\nexport * from \"./useWindowEvent\";\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
1
|
+
{"version":3,"sources":["../../../src/hooks/index.tsx"],"sourcesContent":["export * from \"./useBodyScrollLock\";\nexport * from \"./useBreakpoint\";\nexport * from \"./useButton\";\nexport * from \"./useDeprecationWarning\";\nexport * from \"./useDialog\";\nexport * from \"./useDialogPolyfill\";\nexport * from \"./useLabel\";\nexport * from \"./useOnClickOutside\";\nexport * from \"./usePrefersReducedMotion\";\nexport * from \"./useRenderCount\";\nexport * from \"./useTextField\";\nexport * from \"./useValidationClasses\";\nexport * from \"./useWindowEvent\";\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
_export_star(require("./useRenderCount"), exports);
|
|
6
|
+
function _export_star(from, to) {
|
|
7
|
+
Object.keys(from).forEach(function(k) {
|
|
8
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
9
|
+
Object.defineProperty(to, k, {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return from[k];
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return from;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/hooks/useRenderCount/index.ts"],"sourcesContent":["export * from \"./useRenderCount\";\n"],"names":[],"mappings":";;;;qBAAc"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useRenderCount", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useRenderCount;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _react = require("react");
|
|
12
|
+
function useRenderCount() {
|
|
13
|
+
const count = (0, _react.useRef)(1);
|
|
14
|
+
(0, _react.useEffect)(()=>{
|
|
15
|
+
count.current += 1;
|
|
16
|
+
});
|
|
17
|
+
return count.current;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=useRenderCount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/hooks/useRenderCount/useRenderCount.ts"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nexport function useRenderCount() {\n const count = useRef(1);\n useEffect(() => {\n count.current += 1;\n });\n return count.current;\n}\n"],"names":["useRenderCount","count","useRef","useEffect","current"],"mappings":";;;;+BAEgBA;;;eAAAA;;;uBAFkB;AAE3B,SAASA;IACd,MAAMC,QAAQC,IAAAA,aAAM,EAAC;IACrBC,IAAAA,gBAAS,EAAC;QACRF,MAAMG,OAAO,IAAI;IACnB;IACA,OAAOH,MAAMG,OAAO;AACtB"}
|
|
@@ -41,6 +41,7 @@ function useTextField(props) {
|
|
|
41
41
|
"aria-invalid": props.isInvalid,
|
|
42
42
|
"aria-describedby": ariaDescribedBy,
|
|
43
43
|
"aria-errormessage": props["aria-errormessage"],
|
|
44
|
+
role: props.role,
|
|
44
45
|
type: inputElementType === "input" ? props.type : undefined,
|
|
45
46
|
pattern: inputElementType === "input" ? props.pattern : undefined,
|
|
46
47
|
autoComplete: props.autoComplete,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/hooks/useTextField/useTextField.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { useLabel } from \"../useLabel/useLabel\";\nimport { UseTextFieldProps, UseTextFieldReturn } from \"./types\";\n\nexport function useTextField(props: UseTextFieldProps): UseTextFieldReturn {\n const {\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n inputElementType = \"input\",\n } = props;\n const { labelProps, fieldProps } = useLabel(props);\n\n const descriptionId = useId();\n const descriptionProps = { id: descriptionId };\n\n const errorMessageId = useId();\n const errorMessageProps = { id: errorMessageId };\n\n const ariaDescribedBy = spaceDelimitedList([\n props.description && descriptionId,\n props.errorMessage && errorMessageId,\n props[\"aria-describedby\"],\n ]);\n\n return {\n descriptionProps,\n errorMessageProps,\n labelProps,\n inputProps: {\n defaultValue: props.defaultValue,\n value: props.value,\n onChange: props.onChange,\n disabled: isDisabled,\n readOnly: isReadOnly,\n \"aria-required\": isRequired === true ? true : undefined,\n \"aria-invalid\": props.isInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-errormessage\": props[\"aria-errormessage\"],\n\n type: inputElementType === \"input\" ? props.type : undefined,\n pattern: inputElementType === \"input\" ? props.pattern : undefined,\n\n autoComplete: props.autoComplete,\n maxLength: props.maxLength,\n minLength: props.minLength,\n name: props.name,\n placeholder: props.placeholder,\n inputMode: props.inputMode,\n\n // Clipboard events\n onCopy: props.onCopy,\n onCut: props.onCut,\n onPaste: props.onPaste,\n\n // Composition events\n onCompositionEnd: props.onCompositionEnd,\n onCompositionStart: props.onCompositionStart,\n onCompositionUpdate: props.onCompositionUpdate,\n\n // Selection events\n onSelect: props.onSelect,\n\n // Input events\n onBeforeInput: props.onBeforeInput,\n onInput: props.onInput,\n\n // Focus events\n onFocus: props.onFocus,\n onBlur: props.onBlur,\n\n ...fieldProps,\n },\n };\n}\n"],"names":["useTextField","props","isDisabled","isReadOnly","isRequired","inputElementType","labelProps","fieldProps","useLabel","descriptionId","useId","descriptionProps","id","errorMessageId","errorMessageProps","ariaDescribedBy","spaceDelimitedList","description","errorMessage","inputProps","defaultValue","value","onChange","disabled","readOnly","undefined","isInvalid","type","pattern","autoComplete","maxLength","minLength","name","placeholder","inputMode","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onSelect","onBeforeInput","onInput","onFocus","onBlur"],"mappings":";;;;+BAKgBA;;;eAAAA;;;uBALM;oCACa;0BACV;AAGlB,SAASA,aAAaC,KAAwB;IACnD,MAAM,EACJC,aAAa,KAAK,EAClBC,aAAa,KAAK,EAClBC,aAAa,KAAK,EAClBC,mBAAmB,OAAO,EAC3B,GAAGJ;IACJ,MAAM,EAAEK,UAAU,EAAEC,UAAU,EAAE,GAAGC,IAAAA,kBAAQ,EAACP;IAE5C,MAAMQ,gBAAgBC,IAAAA,YAAK;IAC3B,MAAMC,mBAAmB;QAAEC,IAAIH;IAAc;IAE7C,MAAMI,iBAAiBH,IAAAA,YAAK;IAC5B,MAAMI,oBAAoB;QAAEF,IAAIC;IAAe;IAE/C,MAAME,kBAAkBC,IAAAA,sCAAkB,EAAC;QACzCf,MAAMgB,WAAW,IAAIR;QACrBR,MAAMiB,YAAY,IAAIL;QACtBZ,KAAK,CAAC,mBAAmB;KAC1B;IAED,OAAO;QACLU;QACAG;QACAR;QACAa,YAAY;YACVC,cAAcnB,MAAMmB,YAAY;YAChCC,OAAOpB,MAAMoB,KAAK;YAClBC,UAAUrB,MAAMqB,QAAQ;YACxBC,UAAUrB;YACVsB,UAAUrB;YACV,iBAAiBC,eAAe,OAAO,OAAOqB;YAC9C,gBAAgBxB,MAAMyB,SAAS;YAC/B,oBAAoBX;YACpB,qBAAqBd,KAAK,CAAC,oBAAoB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/hooks/useTextField/useTextField.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { useLabel } from \"../useLabel/useLabel\";\nimport { UseTextFieldProps, UseTextFieldReturn } from \"./types\";\n\nexport function useTextField(props: UseTextFieldProps): UseTextFieldReturn {\n const {\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n inputElementType = \"input\",\n } = props;\n const { labelProps, fieldProps } = useLabel(props);\n\n const descriptionId = useId();\n const descriptionProps = { id: descriptionId };\n\n const errorMessageId = useId();\n const errorMessageProps = { id: errorMessageId };\n\n const ariaDescribedBy = spaceDelimitedList([\n props.description && descriptionId,\n props.errorMessage && errorMessageId,\n props[\"aria-describedby\"],\n ]);\n\n return {\n descriptionProps,\n errorMessageProps,\n labelProps,\n inputProps: {\n defaultValue: props.defaultValue,\n value: props.value,\n onChange: props.onChange,\n disabled: isDisabled,\n readOnly: isReadOnly,\n \"aria-required\": isRequired === true ? true : undefined,\n \"aria-invalid\": props.isInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-errormessage\": props[\"aria-errormessage\"],\n role: props.role,\n\n type: inputElementType === \"input\" ? props.type : undefined,\n pattern: inputElementType === \"input\" ? props.pattern : undefined,\n\n autoComplete: props.autoComplete,\n maxLength: props.maxLength,\n minLength: props.minLength,\n name: props.name,\n placeholder: props.placeholder,\n inputMode: props.inputMode,\n\n // Clipboard events\n onCopy: props.onCopy,\n onCut: props.onCut,\n onPaste: props.onPaste,\n\n // Composition events\n onCompositionEnd: props.onCompositionEnd,\n onCompositionStart: props.onCompositionStart,\n onCompositionUpdate: props.onCompositionUpdate,\n\n // Selection events\n onSelect: props.onSelect,\n\n // Input events\n onBeforeInput: props.onBeforeInput,\n onInput: props.onInput,\n\n // Focus events\n onFocus: props.onFocus,\n onBlur: props.onBlur,\n\n ...fieldProps,\n },\n };\n}\n"],"names":["useTextField","props","isDisabled","isReadOnly","isRequired","inputElementType","labelProps","fieldProps","useLabel","descriptionId","useId","descriptionProps","id","errorMessageId","errorMessageProps","ariaDescribedBy","spaceDelimitedList","description","errorMessage","inputProps","defaultValue","value","onChange","disabled","readOnly","undefined","isInvalid","role","type","pattern","autoComplete","maxLength","minLength","name","placeholder","inputMode","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onSelect","onBeforeInput","onInput","onFocus","onBlur"],"mappings":";;;;+BAKgBA;;;eAAAA;;;uBALM;oCACa;0BACV;AAGlB,SAASA,aAAaC,KAAwB;IACnD,MAAM,EACJC,aAAa,KAAK,EAClBC,aAAa,KAAK,EAClBC,aAAa,KAAK,EAClBC,mBAAmB,OAAO,EAC3B,GAAGJ;IACJ,MAAM,EAAEK,UAAU,EAAEC,UAAU,EAAE,GAAGC,IAAAA,kBAAQ,EAACP;IAE5C,MAAMQ,gBAAgBC,IAAAA,YAAK;IAC3B,MAAMC,mBAAmB;QAAEC,IAAIH;IAAc;IAE7C,MAAMI,iBAAiBH,IAAAA,YAAK;IAC5B,MAAMI,oBAAoB;QAAEF,IAAIC;IAAe;IAE/C,MAAME,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