@hortiview/default-components 1.2.0 → 1.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 (39) hide show
  1. package/README.md +12 -0
  2. package/dist/{HealthCheckFailed-BfzG8Esl.js → HealthCheckFailed-BA_vyKwG.js} +6 -6
  3. package/dist/Iconify-B42tJF6q.js +979 -0
  4. package/dist/{LoadingSpinner-BCdWKiWZ.js → LoadingSpinner-5JYKhDod.js} +12 -12
  5. package/dist/OfflineView-BW19N4Cu-CpgiY6nC.js +45 -0
  6. package/dist/assets/GenericTable.css +1 -1
  7. package/dist/assets/OfflineView-BW19N4Cu.css +1 -0
  8. package/dist/{component-DsB0poTj-CmUZ4Kqw.js → component-DsB0poTj-uxpi4oSj.js} +1 -1
  9. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +5 -6
  10. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +7 -8
  11. package/dist/components/GenericTable/GenericTable.js +5083 -5054
  12. package/dist/components/HealthChecks/DataBaseHealthCheck.js +4 -5
  13. package/dist/components/HealthChecks/DefaultHealthCheck.js +4 -5
  14. package/dist/components/HealthChecks/IotServiceHealthCheck.js +4 -5
  15. package/dist/components/HealthChecks/PlatformHealthCheck.js +5 -6
  16. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +7 -8
  17. package/dist/components/InternationalizationWrapper/InternationalizationWrapper.js +1 -1
  18. package/dist/components/OfflineView/OfflineView.d.ts +4 -0
  19. package/dist/components/OfflineView/OfflineView.js +18 -0
  20. package/dist/{i18n-BhmFdUcK.js → i18n-CCQpJsQK.js} +8 -8
  21. package/dist/i18n.js +2 -3
  22. package/dist/{i18nInstance-l1IFPZ5d.js → i18nInstance-D_96ADqd.js} +1 -1
  23. package/dist/{index.es-25EARqhH-By1Ap282.js → index.es-25EARqhH-CciUgLci.js} +2 -2
  24. package/dist/{index.es-6TJ1S8Jr-BFJPMGBn.js → index.es-6TJ1S8Jr-C4X_iaSC.js} +493 -831
  25. package/dist/index.es-CiqbARoC-D-muiSwa.js +344 -0
  26. package/dist/index.es-D-CKRzIB-DPq2PQz-.js +63 -0
  27. package/dist/locales/en-US.js +6 -4
  28. package/dist/locales/en-US.json.d.ts +4 -0
  29. package/dist/locales/es-MX.js +6 -4
  30. package/dist/locales/es-MX.json.d.ts +4 -0
  31. package/dist/locales/tr-TR.js +6 -4
  32. package/dist/locales/tr-TR.json.d.ts +4 -0
  33. package/dist/main.d.ts +1 -0
  34. package/dist/main.js +12 -10
  35. package/dist/{useTranslation-B6E1rHIA.js → useTranslation-v0qSkb40.js} +280 -280
  36. package/package.json +3 -3
  37. package/dist/Iconify-DQUxnnUE.js +0 -81
  38. package/dist/assets/i18nInstance.css +0 -1
  39. package/dist/index.es-D-CKRzIB-C6Z-ohcV.js +0 -959
@@ -1,959 +0,0 @@
1
- import { N as g, _ as b, R as e, b as le, p as re, q as O, i as de, V as ce, F as se, $ as ge, k as ue, j as pe, O as L, m as E } from "./useTranslation-B6E1rHIA.js";
2
- import s, { forwardRef as h, useRef as m, useImperativeHandle as x, useEffect as ye, useMemo as he } from "react";
3
- const me = {
4
- /**
5
- * Children to be rendered. Expects multiple components of a similar type.
6
- *
7
- * Defaults to **null**.
8
- */
9
- children: e.node,
10
- /**
11
- * The grouping direction.
12
- *
13
- * Defaults to **'horizontal'**.
14
- */
15
- direction: e.oneOf(["horizontal", "vertical", "horizontal-reverse", "vertical-reverse"]),
16
- /**
17
- * Sets the Group width to be 100%.
18
- *
19
- * Defaults to **false**.
20
- */
21
- fullWidth: e.bool,
22
- /**
23
- * How much spacing between items. Dense is 8p, standard is 16px and airy is 24px.
24
- *
25
- * Defaults to **'standard'**.
26
- */
27
- gap: e.oneOf(["dense", "standard", "airy", "none"]),
28
- /**
29
- * @deprecated _Renamed for improved clarity. See `gap`._
30
- *
31
- * How much spacing between items. Dense is 8p, standard is 16px and airy is 24px.
32
- *
33
- * Defaults to **undefined**.
34
- */
35
- padding: le(e.oneOf(["dense", "standard", "airy", "none"]), "Group", "Renamed for improved clarity. See `gap`."),
36
- /**
37
- * Alignment along the primary axis. 'For `horizontal` grouping this means the x-axis positioning, for `vertical`, this means the y-axis positioning.Equivalent to flexbox 'justify-content.
38
- *
39
- * Defaults to **'start'**.
40
- */
41
- primaryAlign: e.oneOf(["start", "end", "center", "space-evenly", "space-between", "space-around"]),
42
- /**
43
- * Alignment along the secondary axis. For horizontal grouping this means the y-axis positioning, for vertical, this means the x-axis positioning.Equivalent to flexbox 'align-items.
44
- *
45
- * Defaults to **'baseline'**.
46
- */
47
- secondaryAlign: e.oneOf(["start", "end", "center", "stretch", "baseline"])
48
- }, xe = {
49
- children: null,
50
- direction: "horizontal",
51
- fullWidth: !1,
52
- gap: "standard",
53
- padding: void 0,
54
- primaryAlign: "start",
55
- secondaryAlign: "baseline"
56
- }, be = (t) => {
57
- switch (t) {
58
- case "end":
59
- return "flex-end";
60
- case "start":
61
- return "flex-start";
62
- case "center":
63
- return "center";
64
- case "stretch":
65
- return "stretch";
66
- case "baseline":
67
- default:
68
- return "baseline";
69
- }
70
- }, fe = (t) => {
71
- switch (t) {
72
- case "end":
73
- return "flex-end";
74
- case "center":
75
- return "center";
76
- case "space-evenly":
77
- return "space-evenly";
78
- case "space-between":
79
- return "space-between";
80
- case "space-around":
81
- return "space-around";
82
- case "start":
83
- default:
84
- return "flex-start";
85
- }
86
- }, Oe = (t) => {
87
- switch (t) {
88
- case "dense":
89
- return "8px";
90
- case "airy":
91
- return "24px";
92
- case "standard":
93
- return "16px";
94
- case "none":
95
- default:
96
- return "0px";
97
- }
98
- }, ke = (t) => {
99
- switch (t) {
100
- case "horizontal":
101
- return "row";
102
- case "vertical":
103
- return "column";
104
- case "horizontal-reverse":
105
- return "row-reverse";
106
- case "vertical-reverse":
107
- return "column-reverse";
108
- default:
109
- return "row";
110
- }
111
- }, z = /* @__PURE__ */ h((t, n) => {
112
- const {
113
- children: d,
114
- className: o,
115
- direction: c,
116
- fullWidth: a,
117
- gap: r,
118
- padding: i,
119
- primaryAlign: l,
120
- secondaryAlign: u,
121
- style: p,
122
- variant: y,
123
- ...k
124
- } = t;
125
- let T = {
126
- display: "flex",
127
- flexDirection: ke(c),
128
- justifyContent: fe(l),
129
- alignItems: be(u),
130
- gap: Oe(i || r)
131
- };
132
- a && (T = {
133
- ...T,
134
- width: "100%"
135
- }), T = {
136
- ...T,
137
- ...p
138
- };
139
- const $ = m();
140
- return x(n, () => $.current, []), /* @__PURE__ */ s.createElement("div", g({
141
- ref: $,
142
- className: b(
143
- "lmnt",
144
- "lmnt-group",
145
- // variant === 'dense' && 'lmnt-button-group--dense',
146
- // variant === 'standard' && 'lmnt-button-group--standard',
147
- // variant === 'airy' && 'lmnt-button-group--airy',
148
- o
149
- ),
150
- style: T
151
- }, k), d);
152
- });
153
- z.displayName = "Group";
154
- z.propTypes = me;
155
- z.defaultProps = xe;
156
- function ve(t) {
157
- return t.toLowerCase();
158
- }
159
- var Ce = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], Te = /[^A-Z0-9]+/gi;
160
- function Ne(t, n) {
161
- n === void 0 && (n = {});
162
- for (var d = n.splitRegexp, o = d === void 0 ? Ce : d, c = n.stripRegexp, a = c === void 0 ? Te : c, r = n.transform, i = r === void 0 ? ve : r, l = n.delimiter, u = l === void 0 ? " " : l, p = K(K(t, o, "$1\0$2"), a, "\0"), y = 0, k = p.length; p.charAt(y) === "\0"; )
163
- y++;
164
- for (; p.charAt(k - 1) === "\0"; )
165
- k--;
166
- return p.slice(y, k).split("\0").map(i).join(u);
167
- }
168
- function K(t, n, d) {
169
- return n instanceof RegExp ? t.replace(n, d) : n.reduce(function(o, c) {
170
- return o.replace(c, d);
171
- }, t);
172
- }
173
- function Be(t, n) {
174
- return n === void 0 && (n = {}), Ne(t, re({ delimiter: "." }, n));
175
- }
176
- function C(t, n) {
177
- return n === void 0 && (n = {}), Be(t, re({ delimiter: "-" }, n));
178
- }
179
- const Pe = {
180
- /**
181
- * If true the typography will be bold. Applies to 1body, body2, caption, subtitle1, subtitle2
182
- *
183
- * Defaults to **false**.
184
- */
185
- bold: e.bool,
186
- /**
187
- * Expects a string, accepts any valid markup.
188
- *
189
- * Defaults to **null**.
190
- */
191
- children: e.node,
192
- /**
193
- * The css class name to be passed through to the component markup.
194
- *
195
- * Defaults to **undefined**.
196
- */
197
- className: e.string,
198
- /**
199
- * The DOM element to display the typography.
200
- *
201
- * Defaults to **'span'**.
202
- */
203
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)]),
204
- /**
205
- * Sets theme color for the typography. Does not apply to Link.
206
- *
207
- * Defaults to **undefined**.
208
- */
209
- themeColor: O(e.oneOf(["primary", "secondary", "error", "text-primary-on-background", "text-secondary-on-background", "text-hint-on-background", "text-disabled-on-background", "text-icon-on-background", "text-primary-on-light", "text-secondary-on-light", "text-hint-on-light", "text-disabled-on-light", "text-icon-on-light"]), ["textPrimaryOnBackground", "textSecondaryOnBackground", "textHintOnBackground", "textDisabledOnBackground", "textIconOnBackground", "textPrimaryOnLight", "textSecondaryOnLight", "textHintOnLight", "textDisabledOnLight", "textIconOnLight"], "Typography", "Please use one of 'primary','secondary','error','text-primary-on-background','text-secondary-on-background','text-hint-on-background','text-disabled-on-background','text-icon-on-background','text-primary-on-light','text-secondary-on-light','text-hint-on-light','text-disabled-on-light','text-icon-on-light'."),
210
- /**
211
- * Sets typography class for the element.
212
- *
213
- * Defaults to **'body1'**.
214
- */
215
- type: O(e.oneOf(["body1", "body1-bold", "body2", "body2-bold", "button", "caption", "caption-bold", "display1", "display2", "display3", "display4", "display5", "display6", "link", "overline", "subtitle1", "subtitle1-bold", "subtitle2", "subtitle2-bold"]), ["headline1", "headline2", "headline3", "headline4", "headline5", "headline6"], "Typography", "Please use one of 'body1','body1-bold','body2','body2-bold','button','caption','caption-bold','display1','display2','display3','display4','display5','display6','link','overline','subtitle1','subtitle1-bold','subtitle2','subtitle2-bold'.")
216
- }, $e = {
217
- bold: !1,
218
- children: null,
219
- className: void 0,
220
- tag: "span",
221
- themeColor: void 0,
222
- type: "body1"
223
- }, Le = {
224
- /**
225
- * If true the typography will be bold.
226
- *
227
- * Defaults to **false**.
228
- */
229
- bold: e.bool,
230
- /**
231
- * Expects a string, accepts any valid markup.
232
- *
233
- * Defaults to **null**.
234
- */
235
- children: e.node,
236
- /**
237
- * The css class name to be passed through to the component markup.
238
- *
239
- * Defaults to **undefined**.
240
- */
241
- className: e.string,
242
- /**
243
- * Sets font properties for body. Acceptable values range from 1 - 2. Higher levels produce smaller type.
244
- *
245
- * Defaults to **1**.
246
- */
247
- level: e.oneOf([1, 2]),
248
- /**
249
- * The DOM element to display the typography.
250
- *
251
- * Defaults to **'span'**.
252
- */
253
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)]),
254
- /**
255
- * Sets theme color for the typography.
256
- *
257
- * Defaults to **undefined**.
258
- */
259
- themeColor: O(e.oneOf(["primary", "secondary", "error", "text-primary-on-background", "text-secondary-on-background", "text-hint-on-background", "text-disabled-on-background", "text-icon-on-background", "text-primary-on-light", "text-secondary-on-light", "text-hint-on-light", "text-disabled-on-light", "text-icon-on-light"]), ["textPrimaryOnBackground", "textSecondaryOnBackground", "textHintOnBackground", "textDisabledOnBackground", "textIconOnBackground", "textPrimaryOnLight", "textSecondaryOnLight", "textHintOnLight", "textDisabledOnLight", "textIconOnLight"], "TypoBody", "Please use one of 'primary','secondary','error','text-primary-on-background','text-secondary-on-background','text-hint-on-background','text-disabled-on-background','text-icon-on-background','text-primary-on-light','text-secondary-on-light','text-hint-on-light','text-disabled-on-light','text-icon-on-light'.")
260
- }, Ee = {
261
- bold: !1,
262
- children: null,
263
- className: void 0,
264
- level: 1,
265
- tag: "span",
266
- themeColor: void 0
267
- }, we = {
268
- /**
269
- * Expects a string, accepts any valid markup.
270
- *
271
- * Defaults to **null**.
272
- */
273
- children: e.node,
274
- /**
275
- * The css class name to be passed through to the component markup.
276
- *
277
- * Defaults to **undefined**.
278
- */
279
- className: e.string,
280
- /**
281
- * The DOM element to display the typography.
282
- *
283
- * Defaults to **'span'**.
284
- */
285
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)]),
286
- /**
287
- * Sets theme color for the typography.
288
- *
289
- * Defaults to **undefined**.
290
- */
291
- themeColor: O(e.oneOf(["primary", "secondary", "error", "text-primary-on-background", "text-secondary-on-background", "text-hint-on-background", "text-disabled-on-background", "text-icon-on-background", "text-primary-on-light", "text-secondary-on-light", "text-hint-on-light", "text-disabled-on-light", "text-icon-on-light"]), ["textPrimaryOnBackground", "textSecondaryOnBackground", "textHintOnBackground", "textDisabledOnBackground", "textIconOnBackground", "textPrimaryOnLight", "textSecondaryOnLight", "textHintOnLight", "textDisabledOnLight", "textIconOnLight"], "TypoButton", "Please use one of 'primary','secondary','error','text-primary-on-background','text-secondary-on-background','text-hint-on-background','text-disabled-on-background','text-icon-on-background','text-primary-on-light','text-secondary-on-light','text-hint-on-light','text-disabled-on-light','text-icon-on-light'.")
292
- }, De = {
293
- children: null,
294
- className: void 0,
295
- tag: "span",
296
- themeColor: void 0
297
- }, He = {
298
- /**
299
- * If true the typography will be bold.
300
- *
301
- * Defaults to **false**.
302
- */
303
- bold: e.bool,
304
- /**
305
- * Expects a string, accepts any valid markup.
306
- *
307
- * Defaults to **null**.
308
- */
309
- children: e.node,
310
- /**
311
- * The css class name to be passed through to the component markup.
312
- *
313
- * Defaults to **undefined**.
314
- */
315
- className: e.string,
316
- /**
317
- * The DOM element to display the typography.
318
- *
319
- * Defaults to **'span'**.
320
- */
321
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)]),
322
- /**
323
- * Sets theme color for the typography.
324
- *
325
- * Defaults to **undefined**.
326
- */
327
- themeColor: O(e.oneOf(["primary", "secondary", "error", "text-primary-on-background", "text-secondary-on-background", "text-hint-on-background", "text-disabled-on-background", "text-icon-on-background", "text-primary-on-light", "text-secondary-on-light", "text-hint-on-light", "text-disabled-on-light", "text-icon-on-light"]), ["textPrimaryOnBackground", "textSecondaryOnBackground", "textHintOnBackground", "textDisabledOnBackground", "textIconOnBackground", "textPrimaryOnLight", "textSecondaryOnLight", "textHintOnLight", "textDisabledOnLight", "textIconOnLight"], "TypoCaption", "Please use one of 'primary','secondary','error','text-primary-on-background','text-secondary-on-background','text-hint-on-background','text-disabled-on-background','text-icon-on-background','text-primary-on-light','text-secondary-on-light','text-hint-on-light','text-disabled-on-light','text-icon-on-light'.")
328
- }, Se = {
329
- bold: !1,
330
- children: null,
331
- className: void 0,
332
- tag: "span",
333
- themeColor: void 0
334
- }, Ie = {
335
- /**
336
- * Expects a string, accepts any valid markup.
337
- *
338
- * Defaults to **null**.
339
- */
340
- children: e.node,
341
- /**
342
- * The css class name to be passed through to the component markup.
343
- *
344
- * Defaults to **undefined**.
345
- */
346
- className: e.string,
347
- /**
348
- * Sets font properties for body. Acceptable values range from 1 to 6. Higher levels produce smaller type.
349
- *
350
- * Defaults to **1**.
351
- */
352
- level: e.oneOfType([e.oneOf([1, 2, 3, 4, 5, 6, "1", "2", "3", "4", "5", "6"]), e.oneOf([1, 2, 3, 4, 5, 6, "1", "2", "3", "4", "5", "6"])]),
353
- /**
354
- * The DOM element to display the typography.
355
- *
356
- * Defaults to **'span'**.
357
- */
358
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)]),
359
- /**
360
- * Sets theme color for the typography.
361
- *
362
- * Defaults to **undefined**.
363
- */
364
- themeColor: O(e.oneOf(["primary", "secondary", "error", "text-primary-on-background", "text-secondary-on-background", "text-hint-on-background", "text-disabled-on-background", "text-icon-on-background", "text-primary-on-light", "text-secondary-on-light", "text-hint-on-light", "text-disabled-on-light", "text-icon-on-light"]), ["textPrimaryOnBackground", "textSecondaryOnBackground", "textHintOnBackground", "textDisabledOnBackground", "textIconOnBackground", "textPrimaryOnLight", "textSecondaryOnLight", "textHintOnLight", "textDisabledOnLight", "textIconOnLight"], "TypoDisplay", "Please use one of 'primary','secondary','error','text-primary-on-background','text-secondary-on-background','text-hint-on-background','text-disabled-on-background','text-icon-on-background','text-primary-on-light','text-secondary-on-light','text-hint-on-light','text-disabled-on-light','text-icon-on-light'.")
365
- }, je = {
366
- children: null,
367
- className: void 0,
368
- level: 1,
369
- tag: "span",
370
- themeColor: void 0
371
- }, Ae = {
372
- /**
373
- * Expects a string, accepts any valid markup.
374
- *
375
- * Defaults to **null**.
376
- */
377
- children: e.node,
378
- /**
379
- * The css class name to be passed through to the component markup.
380
- *
381
- * Defaults to **undefined**.
382
- */
383
- className: e.string,
384
- /**
385
- * Sets font properties for body. Acceptable values range from 1 to 6. Higher levels produce smaller type.
386
- *
387
- * Defaults to **1**.
388
- */
389
- level: e.oneOfType([e.oneOf([1, 2, 3, 4, 5, 6, "1", "2", "3", "4", "5", "6"]), e.oneOf([1, 2, 3, 4, 5, 6, "1", "2", "3", "4", "5", "6"])]),
390
- /**
391
- * The DOM element to display the typography.
392
- *
393
- * Defaults to **'span'**.
394
- */
395
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)]),
396
- /**
397
- * Sets theme color for the typography.
398
- *
399
- * Defaults to **undefined**.
400
- */
401
- themeColor: O(e.oneOf(["primary", "secondary", "error", "text-primary-on-background", "text-secondary-on-background", "text-hint-on-background", "text-disabled-on-background", "text-icon-on-background", "text-primary-on-light", "text-secondary-on-light", "text-hint-on-light", "text-disabled-on-light", "text-icon-on-light"]), ["textPrimaryOnBackground", "textSecondaryOnBackground", "textHintOnBackground", "textDisabledOnBackground", "textIconOnBackground", "textPrimaryOnLight", "textSecondaryOnLight", "textHintOnLight", "textDisabledOnLight", "textIconOnLight"], "TypoHeadline", "Please use one of 'primary','secondary','error','text-primary-on-background','text-secondary-on-background','text-hint-on-background','text-disabled-on-background','text-icon-on-background','text-primary-on-light','text-secondary-on-light','text-hint-on-light','text-disabled-on-light','text-icon-on-light'.")
402
- }, Re = {
403
- children: null,
404
- className: void 0,
405
- level: 1,
406
- tag: "span",
407
- themeColor: void 0
408
- }, _e = {
409
- /**
410
- * Expects a string, accepts any valid markup.
411
- *
412
- * Defaults to **null**.
413
- */
414
- children: e.node,
415
- /**
416
- * The css class name to be passed through to the component markup.
417
- *
418
- * Defaults to **undefined**.
419
- */
420
- className: e.string,
421
- /**
422
- * The DOM element to display the typography.
423
- *
424
- * Defaults to **'a'**.
425
- */
426
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)])
427
- }, ze = {
428
- children: null,
429
- className: void 0,
430
- tag: "a"
431
- }, We = {
432
- /**
433
- * Expects a string, accepts any valid markup.
434
- *
435
- * Defaults to **null**.
436
- */
437
- children: e.node,
438
- /**
439
- * The css class name to be passed through to the component markup.
440
- *
441
- * Defaults to **undefined**.
442
- */
443
- className: e.string,
444
- /**
445
- * The DOM element to display the typography.
446
- *
447
- * Defaults to **'span'**.
448
- */
449
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)]),
450
- /**
451
- * Sets theme color for the typography.
452
- *
453
- * Defaults to **undefined**.
454
- */
455
- themeColor: O(e.oneOf(["primary", "secondary", "error", "text-primary-on-background", "text-secondary-on-background", "text-hint-on-background", "text-disabled-on-background", "text-icon-on-background", "text-primary-on-light", "text-secondary-on-light", "text-hint-on-light", "text-disabled-on-light", "text-icon-on-light"]), ["textPrimaryOnBackground", "textSecondaryOnBackground", "textHintOnBackground", "textDisabledOnBackground", "textIconOnBackground", "textPrimaryOnLight", "textSecondaryOnLight", "textHintOnLight", "textDisabledOnLight", "textIconOnLight"], "TypoOverline", "Please use one of 'primary','secondary','error','text-primary-on-background','text-secondary-on-background','text-hint-on-background','text-disabled-on-background','text-icon-on-background','text-primary-on-light','text-secondary-on-light','text-hint-on-light','text-disabled-on-light','text-icon-on-light'.")
456
- }, Ve = {
457
- children: null,
458
- className: void 0,
459
- tag: "span",
460
- themeColor: void 0
461
- }, qe = {
462
- /**
463
- * If true the typography will be bold.
464
- *
465
- * Defaults to **false**.
466
- */
467
- bold: e.bool,
468
- /**
469
- * Expects a string, accepts any valid markup.
470
- *
471
- * Defaults to **null**.
472
- */
473
- children: e.node,
474
- /**
475
- * The css class name to be passed through to the component markup.
476
- *
477
- * Defaults to **undefined**.
478
- */
479
- className: e.string,
480
- /**
481
- * Sets font properties for body.
482
- *
483
- * Defaults to **1**.
484
- */
485
- level: e.oneOf([1, 2]),
486
- /**
487
- * The DOM element to display the typography.
488
- *
489
- * Defaults to **'span'**.
490
- */
491
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(s.Component)]),
492
- /**
493
- * Sets theme color for the typography.
494
- *
495
- * Defaults to **undefined**.
496
- */
497
- themeColor: O(e.oneOf(["primary", "secondary", "error", "text-primary-on-background", "text-secondary-on-background", "text-hint-on-background", "text-disabled-on-background", "text-icon-on-background", "text-primary-on-light", "text-secondary-on-light", "text-hint-on-light", "text-disabled-on-light", "text-icon-on-light"]), ["textPrimaryOnBackground", "textSecondaryOnBackground", "textHintOnBackground", "textDisabledOnBackground", "textIconOnBackground", "textPrimaryOnLight", "textSecondaryOnLight", "textHintOnLight", "textDisabledOnLight", "textIconOnLight"], "TypoSubtitle", "Please use one of 'primary','secondary','error','text-primary-on-background','text-secondary-on-background','text-hint-on-background','text-disabled-on-background','text-icon-on-background','text-primary-on-light','text-secondary-on-light','text-hint-on-light','text-disabled-on-light','text-icon-on-light'.")
498
- }, Ge = {
499
- bold: !1,
500
- children: null,
501
- className: void 0,
502
- level: 1,
503
- tag: "span",
504
- themeColor: void 0
505
- }, v = /* @__PURE__ */ h((t, n) => {
506
- const {
507
- className: d,
508
- children: o,
509
- themeColor: c,
510
- level: a,
511
- bold: r,
512
- tag: i,
513
- ...l
514
- } = t, u = m();
515
- x(n, () => u.current, []);
516
- const p = b("mdc-typography", `lmnt mdc-typography--body${a}`, r && `mdc-typography--body${a}-bold`, c && `mdc-theme--${C(c)}`, d), y = i;
517
- return /* @__PURE__ */ s.createElement(y, g({
518
- className: p
519
- }, l, {
520
- ref: u
521
- }), o);
522
- });
523
- v.displayName = "TypoBody";
524
- v.propTypes = Le;
525
- v.defaultProps = Ee;
526
- const w = /* @__PURE__ */ h((t, n) => {
527
- const {
528
- className: d,
529
- children: o,
530
- themeColor: c,
531
- tag: a,
532
- ...r
533
- } = t, i = b("mdc-typography", "lmnt mdc-typography--button", c && `mdc-theme--${C(c)}`, d), l = m();
534
- x(n, () => l.current, []);
535
- const u = a;
536
- return /* @__PURE__ */ s.createElement(u, g({
537
- ref: l,
538
- className: i
539
- }, r), o);
540
- });
541
- w.displayName = "TypoButton";
542
- w.propTypes = we;
543
- w.defaultProps = De;
544
- const P = /* @__PURE__ */ h((t, n) => {
545
- const {
546
- className: d,
547
- children: o,
548
- themeColor: c,
549
- tag: a,
550
- bold: r,
551
- ...i
552
- } = t, l = b("mdc-typography", "lmnt mdc-typography--caption", r && "mdc-typography--caption-bold", c && `mdc-theme--${C(c)}`, d), u = m();
553
- x(n, () => u.current, []);
554
- const p = a;
555
- return /* @__PURE__ */ s.createElement(p, g({
556
- ref: u,
557
- className: l
558
- }, i), o);
559
- });
560
- P.displayName = "TypoCaption";
561
- P.propTypes = He;
562
- P.defaultProps = Se;
563
- const f = /* @__PURE__ */ h((t, n) => {
564
- const {
565
- className: d,
566
- children: o,
567
- themeColor: c,
568
- level: a,
569
- tag: r,
570
- ...i
571
- } = t, l = b("mdc-typography", `lmnt mdc-typography--headline${a}`, c && `mdc-theme--${C(c)}`, d), u = m();
572
- x(n, () => u.current, []);
573
- const p = r;
574
- return /* @__PURE__ */ s.createElement(p, g({
575
- ref: u,
576
- className: l
577
- }, i), o);
578
- });
579
- f.displayName = "TypoDisplay";
580
- f.propTypes = Ie;
581
- f.defaultProps = je;
582
- const W = /* @__PURE__ */ h((t, n) => {
583
- const {
584
- className: d,
585
- children: o,
586
- themeColor: c,
587
- level: a,
588
- tag: r,
589
- ...i
590
- } = t;
591
- ye(() => de("TypoHeadline", "This component is being replaced with TypoDisplay and will be removed in a future version. Please use TypoDisplay instead."), []);
592
- const l = b("mdc-typography", `lmnt mdc-typography--headline${a}`, c && `mdc-theme--${C(c)}`, d), u = m();
593
- x(n, () => u.current, []);
594
- const p = r;
595
- return /* @__PURE__ */ s.createElement(p, g({
596
- ref: u,
597
- className: l
598
- }, i), o);
599
- });
600
- W.displayName = "TypoHeadline";
601
- W.propTypes = Ae;
602
- W.defaultProps = Re;
603
- const V = /* @__PURE__ */ h((t, n) => {
604
- const {
605
- className: d,
606
- children: o,
607
- themeColor: c,
608
- tag: a,
609
- ...r
610
- } = t, i = b("mdc-typography lmnt-theme-link", c && `mdc-theme--${C(c)}`, d), l = m();
611
- x(n, () => l.current, []);
612
- const u = a;
613
- return /* @__PURE__ */ s.createElement(u, g({
614
- ref: l,
615
- className: i
616
- }, r), o);
617
- });
618
- V.displayName = "TypoLink";
619
- V.propTypes = _e;
620
- V.defaultProps = ze;
621
- const D = /* @__PURE__ */ h((t, n) => {
622
- const {
623
- className: d,
624
- children: o,
625
- themeColor: c,
626
- tag: a,
627
- ...r
628
- } = t, i = b("mdc-typography", "lmnt mdc-typography--overline", c && `mdc-theme--${C(c)}`, d), l = m();
629
- x(n, () => l.current, []);
630
- const u = a;
631
- return /* @__PURE__ */ s.createElement(u, g({
632
- ref: l,
633
- className: i
634
- }, r), o);
635
- });
636
- D.displayName = "TypoOverline";
637
- D.propTypes = We;
638
- D.defaultProps = Ve;
639
- const B = /* @__PURE__ */ h((t, n) => {
640
- const {
641
- className: d,
642
- children: o,
643
- themeColor: c,
644
- level: a,
645
- tag: r,
646
- bold: i,
647
- ...l
648
- } = t, u = b("mdc-typography", `lmnt mdc-typography--subtitle${a || ""}`, i && `mdc-typography--subtitle${a}-bold`, c && `mdc-theme--${C(c)}`, d), p = m();
649
- x(n, () => p.current, []);
650
- const y = r;
651
- return /* @__PURE__ */ s.createElement(y, g({
652
- ref: p,
653
- className: u
654
- }, l), o);
655
- });
656
- B.displayName = "TypoSubtitle";
657
- B.propTypes = qe;
658
- B.defaultProps = Ge;
659
- const q = /* @__PURE__ */ h((t, n) => {
660
- const {
661
- bold: d,
662
- children: o,
663
- type: c,
664
- themeColor: a,
665
- tag: r,
666
- ...i
667
- } = t, l = m();
668
- switch (x(n, () => l.current, []), c) {
669
- case "body1":
670
- return /* @__PURE__ */ s.createElement(v, g({
671
- level: 1,
672
- tag: r,
673
- ref: l,
674
- themeColor: a
675
- }, i), o);
676
- case "body1-bold":
677
- return /* @__PURE__ */ s.createElement(v, g({
678
- bold: !0,
679
- level: 1,
680
- tag: r,
681
- ref: l,
682
- themeColor: a
683
- }, i), o);
684
- case "body2-bold":
685
- return /* @__PURE__ */ s.createElement(v, g({
686
- bold: !0,
687
- level: 2,
688
- tag: r,
689
- ref: l,
690
- themeColor: a
691
- }, i), o);
692
- case "body2":
693
- return /* @__PURE__ */ s.createElement(v, g({
694
- level: 2,
695
- tag: r,
696
- ref: l,
697
- themeColor: a
698
- }, i), o);
699
- case "button":
700
- return /* @__PURE__ */ s.createElement(w, g({
701
- tag: r,
702
- ref: l,
703
- themeColor: a
704
- }, i), o);
705
- case "caption":
706
- return /* @__PURE__ */ s.createElement(P, g({
707
- tag: r,
708
- ref: l,
709
- themeColor: a
710
- }, i), o);
711
- case "caption-bold":
712
- return /* @__PURE__ */ s.createElement(P, g({
713
- bold: !0,
714
- tag: r,
715
- ref: l,
716
- themeColor: a
717
- }, i), o);
718
- case "display1":
719
- case "headline1":
720
- return /* @__PURE__ */ s.createElement(f, g({
721
- level: 1,
722
- tag: r,
723
- ref: l,
724
- themeColor: a
725
- }, i), o);
726
- case "display2":
727
- case "headline2":
728
- return /* @__PURE__ */ s.createElement(f, g({
729
- level: 2,
730
- tag: r,
731
- ref: l,
732
- themeColor: a
733
- }, i), o);
734
- case "display3":
735
- case "headline3":
736
- return /* @__PURE__ */ s.createElement(f, g({
737
- level: 3,
738
- tag: r,
739
- ref: l,
740
- themeColor: a
741
- }, i), o);
742
- case "display4":
743
- case "headline4":
744
- return /* @__PURE__ */ s.createElement(f, g({
745
- level: 4,
746
- tag: r,
747
- ref: l,
748
- themeColor: a
749
- }, i), o);
750
- case "display5":
751
- case "headline5":
752
- return /* @__PURE__ */ s.createElement(f, g({
753
- level: 5,
754
- tag: r,
755
- ref: l,
756
- themeColor: a
757
- }, i), o);
758
- case "display6":
759
- case "headline6":
760
- return /* @__PURE__ */ s.createElement(f, g({
761
- level: 6,
762
- tag: r,
763
- ref: l,
764
- themeColor: a
765
- }, i), o);
766
- case "overline":
767
- return /* @__PURE__ */ s.createElement(D, g({
768
- tag: r,
769
- ref: l,
770
- themeColor: a
771
- }, i), o);
772
- case "subtitle1":
773
- return /* @__PURE__ */ s.createElement(B, g({
774
- tag: r,
775
- ref: l,
776
- themeColor: a
777
- }, i, {
778
- level: 1
779
- }), o);
780
- case "subtitle1-bold":
781
- return /* @__PURE__ */ s.createElement(B, g({
782
- bold: !0,
783
- tag: r,
784
- ref: l,
785
- themeColor: a
786
- }, i, {
787
- level: 1
788
- }), o);
789
- case "subtitle2-bold":
790
- return /* @__PURE__ */ s.createElement(B, g({
791
- bold: !0,
792
- tag: r,
793
- ref: l,
794
- themeColor: a
795
- }, i, {
796
- level: 2
797
- }), o);
798
- case "subtitle2":
799
- return /* @__PURE__ */ s.createElement(B, g({
800
- level: 2,
801
- tag: r,
802
- ref: l,
803
- themeColor: a
804
- }, i), o);
805
- default:
806
- return /* @__PURE__ */ s.createElement(v, g({
807
- tag: r,
808
- ref: l,
809
- themeColor: a
810
- }, i, {
811
- level: 1
812
- }), o);
813
- }
814
- });
815
- q.displayName = "Typography";
816
- q.propTypes = Pe;
817
- q.defaultProps = $e;
818
- var H, Q;
819
- function Ze() {
820
- if (Q) return H;
821
- Q = 1;
822
- var t = ue(), n = t(Object.keys, Object);
823
- return H = n, H;
824
- }
825
- var S, U;
826
- function et() {
827
- if (U) return S;
828
- U = 1;
829
- var t = pe(), n = Ze(), d = Object.prototype, o = d.hasOwnProperty;
830
- function c(a) {
831
- if (!t(a))
832
- return n(a);
833
- var r = [];
834
- for (var i in Object(a))
835
- o.call(a, i) && i != "constructor" && r.push(i);
836
- return r;
837
- }
838
- return S = c, S;
839
- }
840
- var I, X;
841
- function Me() {
842
- if (X) return I;
843
- X = 1;
844
- var t = L(), n = E(), d = t(n, "DataView");
845
- return I = d, I;
846
- }
847
- var j, Y;
848
- function Fe() {
849
- if (Y) return j;
850
- Y = 1;
851
- var t = L(), n = E(), d = t(n, "Promise");
852
- return j = d, j;
853
- }
854
- var A, ee;
855
- function Je() {
856
- if (ee) return A;
857
- ee = 1;
858
- var t = L(), n = E(), d = t(n, "Set");
859
- return A = d, A;
860
- }
861
- var R, te;
862
- function Ke() {
863
- if (te) return R;
864
- te = 1;
865
- var t = L(), n = E(), d = t(n, "WeakMap");
866
- return R = d, R;
867
- }
868
- var _, ne;
869
- function tt() {
870
- if (ne) return _;
871
- ne = 1;
872
- var t = Me(), n = ce(), d = Fe(), o = Je(), c = Ke(), a = se(), r = ge(), i = "[object Map]", l = "[object Object]", u = "[object Promise]", p = "[object Set]", y = "[object WeakMap]", k = "[object DataView]", T = r(t), $ = r(n), oe = r(d), ae = r(o), ie = r(c), N = a;
873
- return (t && N(new t(new ArrayBuffer(1))) != k || n && N(new n()) != i || d && N(d.resolve()) != u || o && N(new o()) != p || c && N(new c()) != y) && (N = function(Z) {
874
- var M = a(Z), F = M == l ? Z.constructor : void 0, J = F ? r(F) : "";
875
- if (J)
876
- switch (J) {
877
- case T:
878
- return k;
879
- case $:
880
- return i;
881
- case oe:
882
- return u;
883
- case ae:
884
- return p;
885
- case ie:
886
- return y;
887
- }
888
- return M;
889
- }), _ = N, _;
890
- }
891
- const Qe = {
892
- /**
893
- * Content to be rendered inside the padding component. Accepts any valid markup.
894
- *
895
- * Defaults to **null**.
896
- */
897
- children: e.node.isRequired,
898
- /**
899
- * The css class name to be passed through to the component markup.
900
- *
901
- * Defaults to **undefined**.
902
- */
903
- className: e.string,
904
- /**
905
- * Adds a custom padding style to the child content. Must be a valid CSS padding declaration. i.e. 38px 30px
906
- *
907
- * Defaults to **null**.
908
- */
909
- customPadding: e.string,
910
- /**
911
- * By default a div will be rendered, this allow another tag to be used instead. A block type component is suggested.
912
- *
913
- * Defaults to **'div'**.
914
- */
915
- tag: e.oneOfType([e.string, e.elementType]),
916
- /**
917
- * Applies the specified padding amount. `dense` is 8px, `standard` is 16px, and `airy` is 24px. If `customPadding` is used, this will be ignored.
918
- *
919
- * Defaults to **'standard'**.
920
- */
921
- variant: e.oneOf(["dense", "standard", "airy"])
922
- }, Ue = {
923
- children: null,
924
- className: void 0,
925
- customPadding: null,
926
- tag: "div",
927
- variant: "standard"
928
- }, G = /* @__PURE__ */ h((t, n) => {
929
- const {
930
- tag: d,
931
- variant: o,
932
- children: c,
933
- className: a,
934
- customPadding: r,
935
- style: i,
936
- ...l
937
- } = t, u = he(() => ({
938
- ...i,
939
- padding: r
940
- }), [i, r]), p = d || "div", y = m();
941
- return x(n, () => y.current, []), /* @__PURE__ */ s.createElement(p, g({
942
- className: b("lmnt", "lmnt-padding", o === "dense" && "lmnt-padding--dense", o === "standard" && "lmnt-padding--standard", o === "airy" && "lmnt-padding--airy", a),
943
- style: u
944
- }, l), c);
945
- });
946
- G.displayName = "Padding";
947
- G.propTypes = Qe;
948
- G.defaultProps = Ue;
949
- export {
950
- et as $,
951
- B as C,
952
- q as D,
953
- P,
954
- z as a,
955
- v as f,
956
- f as h,
957
- G as n,
958
- tt as r
959
- };