@hortiview/default-components 1.5.0 → 1.5.2

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 (43) hide show
  1. package/dist/components/DefaultAllowedComponent/DefaultAllowedComponent.js +8 -48
  2. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +12 -1514
  3. package/dist/components/DefaultFormSelect/DefaultFormSelect.js +9 -178
  4. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +6 -6
  5. package/dist/components/GenericTable/GenericTable.js +12 -18746
  6. package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
  7. package/dist/components/HealthChecks/DefaultHealthCheck.js +4 -4
  8. package/dist/components/HealthChecks/IotServiceHealthCheck.js +5 -5
  9. package/dist/components/HealthChecks/PlatformHealthCheck.js +4 -4
  10. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +9 -9
  11. package/dist/components/InternationalizationWrapper/InternationalizationWrapper.js +4 -4
  12. package/dist/components/OfflineView/OfflineView.js +9 -9
  13. package/dist/i18n.js +1696 -5
  14. package/dist/{i18nInstance-D_96ADqd.js → i18nInstance-CYqpK5II.js} +2 -2
  15. package/dist/useTranslation-DGtUf8nl.js +101 -0
  16. package/package.json +3 -3
  17. package/dist/Iconify-D3gVmKx3.js +0 -84
  18. package/dist/InfoCard-Ba-VFnki.js +0 -58
  19. package/dist/LoadingSpinner-CmwCv7BO.js +0 -503
  20. package/dist/OfflineView-CIwV08EQ-BClnJRzV.js +0 -46
  21. package/dist/assets/DefaultAllowedComponent.css +0 -1
  22. package/dist/assets/DefaultFormNumber.css +0 -1
  23. package/dist/assets/DefaultFormSelect.css +0 -1
  24. package/dist/assets/GenericTable.css +0 -1
  25. package/dist/assets/Iconify.css +0 -1
  26. package/dist/assets/InfoCard.css +0 -1
  27. package/dist/assets/LoadingSpinner.css +0 -1
  28. package/dist/assets/OfflineView-CIwV08EQ.css +0 -1
  29. package/dist/component-Bz_dtX1r-DqCAj-DR.js +0 -304
  30. package/dist/component-DEJuY56h-CYiwt7Ga.js +0 -571
  31. package/dist/correct-is-regexp-logic-Y0ToWEjF-pByZFQLo.js +0 -494
  32. package/dist/i18n-CCQpJsQK.js +0 -1707
  33. package/dist/index.es--C-VLspF-B3Cy1zrT.js +0 -845
  34. package/dist/index.es-B74L_Dje-mYAvKwSb.js +0 -2005
  35. package/dist/index.es-B8p8KCdj--cmqwwUJ.js +0 -360
  36. package/dist/index.es-BPv5dCFQ-BmH1Hq7_.js +0 -1044
  37. package/dist/index.es-BanVdXEd-BYOBCuJj.js +0 -79
  38. package/dist/index.es-SjZ_-d7U-HvaOH_Z0.js +0 -860
  39. package/dist/index.es-nwjKmW7--CUlbl1RR.js +0 -14375
  40. package/dist/isTypedArray-DziahYkI-Cw9ssvDH.js +0 -210
  41. package/dist/slicedToArray-ByMQIs5x-BsvSjTDl.js +0 -432
  42. package/dist/useHelperText-Cqx6ggnc.js +0 -392
  43. package/dist/useTranslation-BQQybhSd.js +0 -5042
@@ -1,1044 +0,0 @@
1
- import { r as _, e as h, h as k, t as a, n as W, Z as M, c as ie, p as q, f as le, v as oe, s as z, X as de, a as $, b as ce, a4 as Le, o as ye, m as Je, q as Ke, I as Qe, C as we, a5 as ea, a2 as aa, y as Ee, a6 as ra, a7 as na, a8 as ta, a9 as ia } from "./useTranslation-BQQybhSd.js";
2
- import { S as Se } from "./slicedToArray-ByMQIs5x-BsvSjTDl.js";
3
- import m, { forwardRef as T, useRef as D, useImperativeHandle as j, useState as te, useEffect as Re, useMemo as G, createContext as la, useLayoutEffect as oa } from "react";
4
- import { d as da } from "./index.es-B8p8KCdj--cmqwwUJ.js";
5
- import { p as ca, q as sa, h as ma } from "./correct-is-regexp-logic-Y0ToWEjF-pByZFQLo.js";
6
- import { O as ya } from "./index.es-SjZ_-d7U-HvaOH_Z0.js";
7
- var ga = {
8
- /**
9
- * The css class name to be passed through to the component markup.
10
- *
11
- * Defaults to **undefined**.
12
- */
13
- className: a.string,
14
- /**
15
- * @deprecated _Use `themeColor` instead._
16
- *
17
- * The name of the desired Element color like 'primary'
18
- *
19
- * Defaults to **undefined**.
20
- */
21
- dividerColor: W(a.string, "Divider", "Use `themeColor` instead."),
22
- /**
23
- * @deprecated _Use `themeColorImportant` instead._
24
- *
25
- * If the border-color should be set with !important
26
- *
27
- * Defaults to **undefined**.
28
- */
29
- dividerColorImportant: W(a.bool, "Divider", "Use `themeColorImportant` instead."),
30
- /**
31
- * @deprecated _Use `variant` instead._
32
- *
33
- * Choose between dense and tall variants.
34
- *
35
- * Defaults to **undefined**.
36
- */
37
- dividerHeight: W(a.string, "Divider", "Use `variant` instead."),
38
- /**
39
- * Set the border-style with default browser styles. In general, avoid using.
40
- *
41
- * Defaults to **empty string**.
42
- */
43
- dividerStyle: a.string,
44
- /**
45
- * The name of the desired Element color like 'primary'
46
- *
47
- * Defaults to **'on-surface-stroke'**.
48
- */
49
- themeColor: a.oneOf(["", "primary", "primary-variant", "primary-50", "primary-100", "primary-200", "primary-300", "primary-400", "primary-500", "primary-600", "primary-700", "primary-800", "primary-900", "secondary", "secondary-variant", "secondary-50", "secondary-100", "secondary-200", "secondary-300", "secondary-400", "secondary-500", "secondary-600", "secondary-700", "secondary-800", "secondary-900", "danger", "danger-variant", "danger-50", "danger-100", "danger-200", "danger-300", "danger-400", "danger-500", "danger-600", "danger-700", "danger-800", "danger-900", "success", "success-variant", "success-50", "success-100", "success-200", "success-300", "success-400", "success-500", "success-600", "success-700", "success-800", "success-900", "ancillary-100", "ancillary-200", "ancillary-300", "ancillary-400", "ancillary-500", "ancillary-600", "ancillary-700", "ancillary-800", "ancillary-900", "on-surface-stroke"]),
50
- /**
51
- * @deprecated _No longer needed._
52
- *
53
- * In some cases `themeColor` may be inadvertently overridden by another style, this will ensure the selected color is applied.
54
- *
55
- * Defaults to **undefined**.
56
- */
57
- themeColorImportant: W(a.bool, "Divider", "No longer needed."),
58
- /**
59
- * Choose between dense and tall variants.
60
- *
61
- * Defaults to **'dense'**.
62
- */
63
- variant: a.oneOf(["dense", "tall"]),
64
- /**
65
- * Adds top and bottom margin.
66
- *
67
- * Defaults to **'none'**.
68
- */
69
- verticalMargin: a.oneOf(["none", "dense", "standard", "airy"])
70
- }, pa = {
71
- className: void 0,
72
- dividerColor: void 0,
73
- dividerColorImportant: void 0,
74
- dividerHeight: void 0,
75
- dividerStyle: "",
76
- themeColor: "on-surface-stroke",
77
- themeColorImportant: void 0,
78
- variant: "dense",
79
- verticalMargin: "none"
80
- }, ua = ["dividerColor", "dividerColorImportant", "dividerHeight", "dividerStyle", "themeColor", "themeColorImportant", "variant", "className", "verticalMargin"], U = pa, se = /* @__PURE__ */ T(function(e, l) {
81
- var t = e.dividerColor, i = t === void 0 ? U.dividerColor : t, n = e.dividerColorImportant, r = n === void 0 ? U.dividerColorImportant : n, o = e.dividerHeight, c = o === void 0 ? U.dividerHeight : o, d = e.dividerStyle, s = d === void 0 ? U.dividerStyle : d, y = e.themeColor, u = y === void 0 ? U.themeColor : y, p = e.themeColorImportant, b = p === void 0 ? U.themeColorImportant : p, v = e.variant, g = v === void 0 ? U.variant : v, f = e.className, x = f === void 0 ? U.className : f, N = e.verticalMargin, O = N === void 0 ? U.verticalMargin : N, A = _(e, ua), S = r || b, B = c || g, R = i || u, I = D();
82
- j(l, function() {
83
- return I.current;
84
- }, []);
85
- var C = h("lmnt", "lmnt-divider", S && "lmnt-divider--color-important", B && "lmnt-divider--".concat(B), s && "lmnt-divider--".concat(s), R && "lmnt-divider--".concat(R), O && O !== "none" && "lmnt-divider--margin-".concat(O), x);
86
- return /* @__PURE__ */ m.createElement("hr", k({
87
- ref: I,
88
- className: C
89
- }, A));
90
- });
91
- se.displayName = "Divider";
92
- se.propTypes = ga;
93
- var va = function() {
94
- }, Ue = typeof window < "u", fa = Ue ? oa : Re, Pe = {
95
- x: 0,
96
- y: 0,
97
- width: 0,
98
- height: 0,
99
- top: 0,
100
- left: 0,
101
- bottom: 0,
102
- right: 0
103
- };
104
- function ha() {
105
- var e = te(null), l = e[0], t = e[1], i = te(Pe), n = i[0], r = i[1], o = G(function() {
106
- return new window.ResizeObserver(function(c) {
107
- if (c[0]) {
108
- var d = c[0].contentRect, s = d.x, y = d.y, u = d.width, p = d.height, b = d.top, v = d.left, g = d.bottom, f = d.right;
109
- r({ x: s, y, width: u, height: p, top: b, left: v, bottom: g, right: f });
110
- }
111
- });
112
- }, []);
113
- return fa(function() {
114
- if (l)
115
- return o.observe(l), function() {
116
- o.disconnect();
117
- };
118
- }, [l]), [t, n];
119
- }
120
- const ba = Ue && typeof window.ResizeObserver < "u" ? ha : function() {
121
- return [va, Pe];
122
- };
123
- var ge = {}, pe;
124
- function Na() {
125
- if (pe) return ge;
126
- pe = 1;
127
- var e = /* @__PURE__ */ Ee(), l = ea().includes, t = /* @__PURE__ */ aa(), i = /* @__PURE__ */ ra(), n = t(function() {
128
- return !Array(1).includes();
129
- });
130
- return e({ target: "Array", proto: !0, forced: n }, {
131
- includes: function(r) {
132
- return l(this, r, arguments.length > 1 ? arguments[1] : void 0);
133
- }
134
- }), i("includes"), ge;
135
- }
136
- var Y, ue;
137
- function Ca() {
138
- if (ue) return Y;
139
- ue = 1, Na();
140
- var e = /* @__PURE__ */ we();
141
- return Y = e("Array", "includes"), Y;
142
- }
143
- var ve = {}, fe;
144
- function _a() {
145
- if (fe) return ve;
146
- fe = 1;
147
- var e = /* @__PURE__ */ Ee(), l = /* @__PURE__ */ na(), t = /* @__PURE__ */ ma(), i = /* @__PURE__ */ ia(), n = /* @__PURE__ */ ta(), r = /* @__PURE__ */ sa(), o = l("".indexOf);
148
- return e({ target: "String", proto: !0, forced: !r("includes") }, {
149
- includes: function(c) {
150
- return !!~o(
151
- n(i(this)),
152
- n(t(c)),
153
- arguments.length > 1 ? arguments[1] : void 0
154
- );
155
- }
156
- }), ve;
157
- }
158
- var J, he;
159
- function ka() {
160
- if (he) return J;
161
- he = 1, _a();
162
- var e = /* @__PURE__ */ we();
163
- return J = e("String", "includes"), J;
164
- }
165
- var K, be;
166
- function Ta() {
167
- if (be) return K;
168
- be = 1;
169
- var e = /* @__PURE__ */ Qe(), l = /* @__PURE__ */ Ca(), t = /* @__PURE__ */ ka(), i = Array.prototype, n = String.prototype;
170
- return K = function(r) {
171
- var o = r.includes;
172
- return r === i || e(i, r) && o === i.includes ? l : typeof r == "string" || r === n || e(n, r) && o === n.includes ? t : o;
173
- }, K;
174
- }
175
- var Q, Ne;
176
- function Oa() {
177
- if (Ne) return Q;
178
- Ne = 1;
179
- var e = /* @__PURE__ */ Ta();
180
- return Q = e, Q;
181
- }
182
- var Ce, _e;
183
- function Ba() {
184
- return _e || (_e = 1, Ce = /* @__PURE__ */ Oa()), Ce;
185
- }
186
- var xa = Ba();
187
- const ke = /* @__PURE__ */ Ke(xa);
188
- var Aa = {
189
- /**
190
- * Alignment of the Card Body.
191
- *
192
- * Defaults to **'left-top'**.
193
- */
194
- bodyAlignment: a.oneOf(["left-center", "left-top", "left-bottom", "centered", "right-center", "right-top", "right-bottom"]),
195
- /**
196
- * Content to be rendered inside the Card. Should be one of CardActions, CardBody, CardContent, CardDivider, CardFilter, CardMedia, or CardTitle.
197
- *
198
- * Defaults to **null**.
199
- */
200
- children: a.node,
201
- /**
202
- * Height style property of card.
203
- *
204
- * Defaults to **'auto'**.
205
- */
206
- height: a.string,
207
- /**
208
- * If true the card will be styled for a loading spinner
209
- *
210
- * Defaults to **false**.
211
- */
212
- loadingCard: a.bool,
213
- /**
214
- * Passthrough style object.
215
- *
216
- * Defaults to **null**.
217
- */
218
- style: a.object,
219
- /**
220
- * Background color of the card. It is recommended to set to transparent if setting theme color on the Card Title or Card Body.
221
- *
222
- * Defaults to **'surface'**.
223
- */
224
- themeColor: a.oneOf(["transparent", "surface", "surface-variant", "primary", "primary-variant", "primary-50", "primary-100", "primary-200", "primary-300", "primary-400", "primary-500", "primary-600", "primary-700", "primary-800", "primary-900", "secondary", "secondary-variant", "secondary-50", "secondary-100", "secondary-200", "secondary-300", "secondary-400", "secondary-500", "secondary-600", "secondary-700", "secondary-800", "secondary-900", "danger", "danger-variant", "danger-50", "danger-100", "danger-200", "danger-300", "danger-400", "danger-500", "danger-600", "danger-700", "danger-800", "danger-900", "ancillary-100", "ancillary-200", "ancillary-300", "ancillary-400", "ancillary-500", "ancillary-600", "ancillary-700", "ancillary-800", "ancillary-900"]),
225
- /**
226
- * Variant options include `default` (set by theme), `flat`, `outlined`, and `raised`. The `flat` variant removes elevation. The `outlined` variant adds border and removes elevation. The `raised` variant adds elevation.
227
- *
228
- * Defaults to **'default'**.
229
- */
230
- variant: a.oneOf(["default", "flat", "outlined", "raised"])
231
- }, Ia = {
232
- bodyAlignment: "left-top",
233
- children: null,
234
- height: "auto",
235
- loadingCard: !1,
236
- style: null,
237
- themeColor: "surface",
238
- variant: "default"
239
- }, La = {
240
- /**
241
- * Override the default (`primary`) color with the `secondary` color. Most commonly used when the control is placed on a darker surface.
242
- *
243
- * Defaults to **'primary'**.
244
- */
245
- actionButtonThemeColor: a.oneOf(["primary", "secondary"]),
246
- /**
247
- * Content to be rendered inside the button. Can be used instead `label` of to provide more flexibility. Accepts any valid markup. _Warning, if Label is set, it will be used instead of child content._
248
- *
249
- * Defaults to **null**.
250
- */
251
- children: a.node,
252
- /**
253
- * The css class name to be passed through to the component markup.
254
- *
255
- * Defaults to **undefined**.
256
- */
257
- className: a.string,
258
- /**
259
- * Reference to the DOM button. This enables a greater level of integration.
260
- *
261
- * Defaults to **undefined**.
262
- */
263
- customRef: a.oneOfType([
264
- a.func,
265
- // eslint-disable-next-line react/forbid-prop-types
266
- a.shape({
267
- current: a.any
268
- })
269
- ]),
270
- /**
271
- * Prevent the user from interacting with the component.
272
- *
273
- * Defaults to **false**.
274
- */
275
- disabled: a.bool,
276
- /**
277
- * Applies a full-width style where the button will fill it's container.
278
- *
279
- * Defaults to **false**.
280
- */
281
- fullWidth: a.bool,
282
- /**
283
- * The button will render as an anchor tag.
284
- *
285
- * Defaults to **null**.
286
- */
287
- href: a.string,
288
- /**
289
- * The displayed text. Expects a valid string. If label and children are both set, label will take priority.
290
- *
291
- * Defaults to **null**.
292
- */
293
- label: a.string,
294
- /**
295
- * Adds the given Icon to the left of the button text. May not be used with `trailingIcon` - if `leadingIcon` and `trailingIcon` are both set, `leadingIcon` will take priority. Expects the name of a valid Material.io icon, however an icon component may be passed in instead for more control,
296
- *
297
- * Defaults to **null**.
298
- */
299
- leadingIcon: a.oneOfType([a.string, a.node]),
300
- /**
301
- * The primary interaction event for button.
302
- *
303
- * Defaults to **null**.
304
- */
305
- onClick: a.func,
306
- /**
307
- * Adds the given Icon to the right of the button text. May not be used with `leadingIcon` - if `leadingIcon` and `trailingIcon` are both set, `leadingIcon` will take priority. Expects the name of a valid Material.io icon, however an icon component may be passed in instead for more control.
308
- *
309
- * Defaults to **null**.
310
- */
311
- trailingIcon: a.oneOfType([a.string, a.node]),
312
- /**
313
- * This applies the html button type (button, submit, reset) or the anchor media type when used with the href property.
314
- *
315
- * Defaults to **'button'**.
316
- */
317
- type: a.oneOf(["button", "submit", "reset"])
318
- }, wa = {
319
- actionButtonThemeColor: "primary",
320
- children: null,
321
- className: void 0,
322
- customRef: void 0,
323
- disabled: !1,
324
- fullWidth: !1,
325
- href: null,
326
- label: null,
327
- leadingIcon: null,
328
- trailingIcon: null,
329
- type: "button"
330
- }, Ea = {
331
- /**
332
- * Programmatically sets the toggle state of the button when used as a toggle button. If not set, the toggle state will be managed internally.
333
- *
334
- * Defaults to **false**.
335
- */
336
- active: a.bool,
337
- /**
338
- * Accessibility label for assistive technologies.
339
- *
340
- * Defaults to **null**.
341
- */
342
- ariaLabel: a.string,
343
- /**
344
- * Id of the component being labeled for assistive technologies.
345
- *
346
- * Defaults to **null**.
347
- */
348
- ariaLabelledBy: a.string,
349
- /**
350
- * The content when when using the Card Action Icon Button normally. Expects a string, but a valid custom icon is accepted. For toggle button functionality, use `toggleOn` and `toggleOff` instead.
351
- *
352
- * Defaults to **null**.
353
- */
354
- children: a.node,
355
- /**
356
- * The css class name to be passed through to the component markup.
357
- *
358
- * Defaults to **undefined**.
359
- */
360
- className: a.string,
361
- /**
362
- * Disables the icon button.
363
- *
364
- * Defaults to **false**.
365
- */
366
- disabled: a.bool,
367
- /**
368
- * Fired when the user clicks the Card Action Icon Button, will return toggle state, if applicable.
369
- *
370
- * Defaults to **null**.
371
- */
372
- onClick: a.func,
373
- /**
374
- * The content to be rendered when the Card Action Icon Button is toggled off. Expects a string, but a valid custom icon is accepted. The typical use case for a toggle button would be to set an Icon for `toggleOn` and `toggleOff`, leaving children blank.
375
- *
376
- * Defaults to **null**.
377
- */
378
- toggleOff: a.node,
379
- /**
380
- * The `aria-label` value to be read by a screen-reader when the button is toggled off. Example 'Add to Favorites'. Alternatively, `toggleOffAriaLabelledBy` may be used instead.
381
- *
382
- * Defaults to **null**.
383
- */
384
- toggleOffAriaLabel: a.string,
385
- /**
386
- * The `aria-labelledby`value when the button is toggled on. This should be the `id `of a parent element to be read by a screen reader instead of `aria-label`.
387
- *
388
- * Defaults to **null**.
389
- */
390
- toggleOffAriaLabelledBy: a.string,
391
- /**
392
- * The content to be rendered when the Card Action Icon Button is toggled on. Expects a string, but a valid custom icon is accepted. The typical use case for a toggle button would be to set an Icon for `toggleOn` and `toggleOff`, leaving children blank.
393
- *
394
- * Defaults to **null**.
395
- */
396
- toggleOn: a.node,
397
- /**
398
- * The `aria-label` value to be read by a screen-reader when the button is toggled on. Example 'Remove from Favorites'. Alternatively, `toggleOnAriaLabelledBy` may be used instead.
399
- *
400
- * Defaults to **null**.
401
- */
402
- toggleOnAriaLabel: a.string,
403
- /**
404
- * The `aria-labelledby`value when the button is toggled on. This should be the `id` of a parent element to be read by a screen reader instead of `aria-label`.
405
- *
406
- * Defaults to **null**.
407
- */
408
- toggleOnAriaLabelledBy: a.string,
409
- /**
410
- * Variants prefixed with `filled-` will add a background color to the icon according to the theme. Variants prefixed with ` color-` will change the color of the icon according to the theme.
411
- *
412
- * Defaults to **empty string**.
413
- */
414
- variant: Le(a.oneOf(["", "filled-danger-alt", "filled-danger", "filled-primary", "filled-secondary", "color-primary", "color-secondary", "color-on-dark"]), ["primary-alt", "secondary-alt", "primary", "danger-alt", "danger"], "CardActionIcon", "Please use one of '','filled-danger-alt','filled-danger','filled-primary','filled-secondary','color-primary','color-secondary','color-on-dark'.")
415
- }, Sa = {
416
- ariaLabel: null,
417
- children: null,
418
- className: void 0,
419
- disabled: !1,
420
- onClick: null,
421
- toggleOff: null,
422
- toggleOffAriaLabel: null,
423
- toggleOffAriaLabelledBy: null,
424
- toggleOn: null,
425
- toggleOnAriaLabel: null,
426
- toggleOnAriaLabelledBy: null,
427
- variant: ""
428
- }, Ra = {
429
- /**
430
- * Add buttons to card actions.
431
- *
432
- * Defaults to **null**.
433
- */
434
- actionButtons: a.node,
435
- /**
436
- * Add icons to card actions.
437
- *
438
- * Defaults to **null**.
439
- */
440
- actionIcons: a.node,
441
- /**
442
- * Aligns action buttons and icon buttons. 'center' and 'trailing' only allow buttons.
443
- *
444
- * Defaults to **'leading'**.
445
- */
446
- alignment: a.oneOf(["leading", "center", "trailing"])
447
- }, Ua = {
448
- actionButtons: null,
449
- actionIcons: null,
450
- alignment: "leading"
451
- }, Pa = {
452
- /**
453
- * Content to be rendered inside the title block. Accepts any valid markup.
454
- *
455
- * Defaults to **null**.
456
- */
457
- children: a.node,
458
- /**
459
- * Background color of the card body. It is recommended to set to the Card themeColor to transparent if setting the Card Body color.
460
- *
461
- * Defaults to **'surface'**.
462
- */
463
- themeColor: a.oneOf(["surface", "surface-variant", "primary", "primary-variant", "primary-50", "primary-100", "primary-200", "primary-300", "primary-400", "primary-500", "primary-600", "primary-700", "primary-800", "primary-900", "secondary", "secondary-variant", "secondary-50", "secondary-100", "secondary-200", "secondary-300", "secondary-400", "secondary-500", "secondary-600", "secondary-700", "secondary-800", "secondary-900", "danger", "danger-variant", "danger-50", "danger-100", "danger-200", "danger-300", "danger-400", "danger-500", "danger-600", "danger-700", "danger-800", "danger-900", "ancillary-100", "ancillary-200", "ancillary-300", "ancillary-400", "ancillary-500", "ancillary-600", "ancillary-700", "ancillary-800", "ancillary-900"]),
464
- /**
465
- * Sets typography class for Card Body. This can be overwritten by the children markup
466
- *
467
- * Defaults to **'body2'**.
468
- */
469
- typographyType: Le(a.oneOf(["body1", "body2", "button", "caption", "display1", "display2", "display3", "display4", "display5", "display6", "overline", "subtitle1", "subtitle2"]), ["headline1", "headline2", "headline3", "headline4", "headline5", "headline6"], "CardBody", "Please use one of 'body1','body2','button','caption','display1','display2','display3','display4','display5','display6','overline','subtitle1','subtitle2'.")
470
- }, Ha = {
471
- children: null,
472
- themeColor: "surface",
473
- typographyType: "body2"
474
- }, Ma = {
475
- /**
476
- * Content to be rendered inside the content block. Accepts any valid markup.
477
- *
478
- * Defaults to **null**.
479
- */
480
- children: a.node
481
- }, qa = {
482
- children: null
483
- }, $a = {
484
- /**
485
- * Theme color for the Card Divider. Leave empty for gray.
486
- *
487
- * Defaults to **'on-surface-stroke'**.
488
- */
489
- dividerThemeColor: a.oneOf(["null", "on-surface-stroke", "primary", "primary-variant", "primary-50", "primary-100", "primary-200", "primary-300", "primary-400", "primary-500", "primary-600", "primary-700", "primary-800", "primary-900", "secondary", "secondary-variant", "secondary-50", "secondary-100", "secondary-200", "secondary-300", "secondary-400", "secondary-500", "secondary-600", "secondary-700", "secondary-800", "secondary-900", "danger", "danger-variant", "danger-50", "danger-100", "danger-200", "danger-300", "danger-400", "danger-500", "danger-600", "danger-700", "danger-800", "danger-900", "ancillary-100", "ancillary-200", "ancillary-300", "ancillary-400"]),
490
- /**
491
- * Choose between dense and tall variants.
492
- *
493
- * Defaults to **'dense'**.
494
- */
495
- dividerVariant: a.oneOf(["dense", "tall"])
496
- }, ja = {
497
- dividerThemeColor: "on-surface-stroke",
498
- dividerVariant: "dense"
499
- }, za = {
500
- /**
501
- * Content to be rendered inside the title block. Mostly commonly a Select, Textfield component, however any valid components or markup may be used.
502
- *
503
- * Defaults to **null**.
504
- */
505
- children: a.node,
506
- /**
507
- * The css class name to be passed through to the component markup.
508
- *
509
- * Defaults to **undefined**.
510
- */
511
- className: a.string,
512
- /**
513
- * Type of filter being used.
514
- *
515
- * Defaults to **'tabs'**.
516
- */
517
- filterType: a.oneOf(["tabs", "chips", "select", "select-2"])
518
- }, Da = {
519
- children: null,
520
- className: void 0,
521
- filterType: "tabs"
522
- }, Wa = {
523
- /**
524
- * Most commonly text or a Typography component, but accepts any valid markup.
525
- *
526
- * Defaults to **null**.
527
- */
528
- children: a.node,
529
- /**
530
- * The css class name to be passed through to the component markup.
531
- *
532
- * Defaults to **undefined**.
533
- */
534
- className: a.string,
535
- /**
536
- * Changes which side of content the Card side media renders on. Improves layout for right-to-left languages.
537
- *
538
- * Defaults to **false**.
539
- */
540
- rtl: a.bool
541
- }, Va = {
542
- children: null,
543
- className: void 0,
544
- rtl: !1
545
- }, Xa = {
546
- /**
547
- * Url for Card media
548
- *
549
- * Defaults to **null**.
550
- */
551
- mediaUrl: a.string,
552
- /**
553
- * Applies aspect ratio style to the card media.
554
- *
555
- * Defaults to **'square'**.
556
- */
557
- ratio: a.oneOf(["square"]),
558
- /**
559
- * Width for Card media
560
- *
561
- * Defaults to **'30%'**.
562
- */
563
- width: a.oneOfType([a.number, a.string])
564
- }, Fa = {
565
- mediaUrl: null,
566
- width: "30%"
567
- }, Ga = {
568
- /**
569
- * Child components will be rendered on top of the provided image. Use `contentBottom` and `contentTop` to control content positioning. Accepts any valid markup.
570
- *
571
- * Defaults to **null**.
572
- */
573
- children: a.node,
574
- /**
575
- * Adjust placement of the media content.
576
- *
577
- * Defaults to **'bottom'**.
578
- */
579
- contentPlacement: a.oneOf(["bottom", "top"]),
580
- /**
581
- * Image Url for card background image
582
- *
583
- * Defaults to **null**.
584
- */
585
- imageUrl: a.string,
586
- /**
587
- * Adds an overlay over to the Card Media.
588
- *
589
- * Defaults to **false**.
590
- */
591
- overlay: a.bool,
592
- /**
593
- * Overlay theme color.
594
- *
595
- * Defaults to **'dark'**.
596
- */
597
- overlayThemeColor: a.oneOf(["dark", "light", "surface", "linear-gradient-white-to-bottom", "linear-gradient-white-to-top", "linear-gradient-black-to-bottom", "linear-gradient-black-to-top", "linear-gradient-primary-dark-to-bottom", "linear-gradient-primary-dark-to-top", "linear-gradient-primary-darker-to-bottom", "linear-gradient-primary-darker-to-top", "linear-gradient-primary-to-bottom", "linear-gradient-primary-to-top", "linear-gradient-secondary-dark-to-bottom", "linear-gradient-secondary-dark-to-top", "linear-gradient-secondary-darker-to-bottom", "linear-gradient-secondary-darker-to-top", "linear-gradient-secondary-to-bottom", "linear-gradient-secondary-to-top"]),
598
- /**
599
- * Applies aspect ratio style to the card media.
600
- *
601
- * Defaults to **'square'**.
602
- */
603
- ratio: a.oneOf(["square", "sixteen-nine", "four-three", "four-five", "two-one"])
604
- }, Za = {
605
- children: null,
606
- contentPlacement: "bottom",
607
- imageUrl: null,
608
- overlay: !1,
609
- overlayThemeColor: "dark",
610
- ratio: "square"
611
- }, Ya = {
612
- /**
613
- * Content to be rendered inside the Card Overlay. Useful for angles or other non semantic elements displayed in the Card.
614
- *
615
- * Defaults to **null**.
616
- */
617
- children: a.node,
618
- /**
619
- * The css class name to be passed through to the component markup.
620
- *
621
- * Defaults to **undefined**.
622
- */
623
- className: a.string,
624
- /**
625
- * Overlay theme color.
626
- *
627
- * Defaults to **'dark'**.
628
- */
629
- overlayThemeColor: a.oneOf(["dark", "light", "surface", "linear-gradient-white-to-bottom", "linear-gradient-white-to-top", "linear-gradient-black-to-bottom", "linear-gradient-black-to-top", "linear-gradient-primary-dark-to-bottom", "linear-gradient-primary-dark-to-top", "linear-gradient-primary-darker-to-bottom", "linear-gradient-primary-darker-to-top", "linear-gradient-primary-to-bottom", "linear-gradient-primary-to-top", "linear-gradient-secondary-dark-to-bottom", "linear-gradient-secondary-dark-to-top", "linear-gradient-secondary-darker-to-bottom", "linear-gradient-secondary-darker-to-top", "linear-gradient-secondary-to-bottom", "linear-gradient-secondary-to-top"]),
630
- /**
631
- * Position of the Overlay. Use `overlayThemeColor` to change the theme color. If set to leading or trailing be sure to set `alignment` on Card accordingly to have Card Content over the overlay.
632
- *
633
- * Defaults to **'full'**.
634
- */
635
- position: a.oneOf(["full", "leading", "trailing"])
636
- }, Ja = {
637
- children: null,
638
- className: void 0,
639
- overlayThemeColor: "dark",
640
- position: "full"
641
- }, Ka = {
642
- /**
643
- * Content to be rendered as the primary action.
644
- *
645
- * Defaults to **null**.
646
- */
647
- children: a.node,
648
- /**
649
- * The primary interaction event for card.
650
- *
651
- * Defaults to **null**.
652
- */
653
- onClick: a.func,
654
- /**
655
- * By default a div will be rendered, this allows another tag/component to be used instead. A block type element/component is suggested.
656
- *
657
- * Defaults to **'div'**.
658
- */
659
- tag: a.oneOfType([a.string, a.elementType, a.instanceOf(m.Component)])
660
- }, Qa = {
661
- children: null
662
- }, er = {
663
- /**
664
- * The css class name to be passed through to the component markup.
665
- *
666
- * Defaults to **undefined**.
667
- */
668
- className: a.string,
669
- /**
670
- * Content to be displayed in the leading block container. See README for types supported.
671
- *
672
- * Defaults to **null**.
673
- */
674
- leadingBlock: ye(a.node, "CardTitle", "leadingBlockType"),
675
- /**
676
- * The type of media that will render in the leading block. See README for size constraints.
677
- *
678
- * Defaults to **empty string**.
679
- */
680
- leadingBlockType: a.oneOf(["", "avatar", "icon", "icon-with-background", "thumbnail"]),
681
- /**
682
- * Content to be displayed in the Overline text of the title. Expects a string, but can be any valid markup.
683
- *
684
- * Defaults to **null**.
685
- */
686
- overlineText: a.node,
687
- /**
688
- * Where title appears in card.
689
- *
690
- * Defaults to **'top'**.
691
- */
692
- placement: a.oneOf(["top", "middle", "bottom"]),
693
- /**
694
- * Content to be displayed in the Primary text of the title. Expects a string, but can be any valid markup.
695
- *
696
- * Defaults to **null**.
697
- */
698
- primaryText: a.node,
699
- /**
700
- * Content to be displayed in the Secondary text of the title. Expects a string, but can be any valid markup.
701
- *
702
- * Defaults to **null**.
703
- */
704
- secondaryText: a.node,
705
- /**
706
- * Prop that makes card title stackable.
707
- *
708
- * Defaults to **false**.
709
- */
710
- stacked: a.bool,
711
- /**
712
- * Content to be displayed in the Secondary text of the title and could be used to make Card title stackable. Expects a string, but can be any valid markup.
713
- *
714
- * Defaults to **null**.
715
- */
716
- stackedSecondaryText: a.node,
717
- /**
718
- * Background color of the `CardTitle`.
719
- *
720
- * Defaults to **'surface'**.
721
- */
722
- themeColor: a.oneOf(["surface", "primary", "secondary"]),
723
- /**
724
- * Content to be displayed in the trailing block container. See README for types supported.
725
- *
726
- * Defaults to **null**.
727
- */
728
- trailingBlock: ye(a.node, "CardTitle", "trailingBlockType"),
729
- /**
730
- * The type of media that will render in the trailing block. See README for size constraints.
731
- *
732
- * Defaults to **empty string**.
733
- */
734
- trailingBlockType: a.oneOf(["", "title-actions", "avatar", "badge", "icon", "icon-with-background", "thumbnail"])
735
- }, ar = {
736
- className: void 0,
737
- leadingBlock: null,
738
- leadingBlockType: "",
739
- overlineText: null,
740
- placement: "top",
741
- primaryText: null,
742
- secondaryText: null,
743
- stacked: !1,
744
- stackedSecondaryText: null,
745
- themeColor: "surface",
746
- trailingBlock: null,
747
- trailingBlockType: ""
748
- }, rr = ["bodyAlignment", "children", "className", "direction", "height", "loadingCard", "outlined", "style", "themeColor", "variant"];
749
- function Te(e, l) {
750
- var t = de(e);
751
- if ($) {
752
- var i = $(e);
753
- l && (i = ce(i).call(i, function(n) {
754
- return z(e, n).enumerable;
755
- })), t.push.apply(t, i);
756
- }
757
- return t;
758
- }
759
- function Oe(e) {
760
- for (var l = 1; l < arguments.length; l++) {
761
- var t, i, n = arguments[l] != null ? arguments[l] : {};
762
- l % 2 ? M(t = Te(Object(n), !0)).call(t, function(r) {
763
- ie(e, r, n[r]);
764
- }) : q ? le(e, q(n)) : M(i = Te(Object(n))).call(i, function(r) {
765
- oe(e, r, z(n, r));
766
- });
767
- }
768
- return e;
769
- }
770
- var P = Ia, He = /* @__PURE__ */ T(function(e, l) {
771
- var t = e.bodyAlignment, i = t === void 0 ? P.bodyAlignment : t, n = e.children, r = n === void 0 ? P.children : n, o = e.className, c = o === void 0 ? P.className : o, d = e.direction, s = d === void 0 ? P.direction : d, y = e.height, u = y === void 0 ? P.height : y, p = e.loadingCard, b = p === void 0 ? P.loadingCard : p;
772
- e.outlined;
773
- var v = e.style, g = v === void 0 ? P.style : v, f = e.themeColor, x = f === void 0 ? P.themeColor : f, N = e.variant, O = N === void 0 ? P.variant : N, A = _(e, rr), S = te(Oe({
774
- height: u,
775
- direction: s
776
- }, g)), B = Se(S, 2), R = B[0], I = B[1], C = D();
777
- return j(l, function() {
778
- return C.current;
779
- }, []), Re(function() {
780
- I(Oe({
781
- height: u,
782
- // display: 'flex', do we need this?
783
- direction: s
784
- }, g));
785
- }, [u, s, g]), /* @__PURE__ */ m.createElement("div", k({
786
- ref: C,
787
- className: h("lmnt", "lmnt-card", "mdc-card", O === "outlined" && "mdc-card--outlined", O === "flat" && "lmnt-card--flat", O === "raised" && "lmnt-card--raised", b && "lmnt-card--loading", "lmnt-card--".concat(i), "lmnt-theme-".concat(x, "-bg"), c),
788
- style: R
789
- }, A), r);
790
- });
791
- He.displayName = "Card";
792
- He.propTypes = Aa;
793
- var nr = ["children", "className", "customRef", "disabled", "fullWidth", "href", "label", "leadingIcon", "actionButtonThemeColor", "trailingIcon", "type"], E = wa, Me = /* @__PURE__ */ T(function(e, l) {
794
- var t = e.children, i = t === void 0 ? E.children : t, n = e.className, r = n === void 0 ? E.className : n, o = e.customRef, c = o === void 0 ? E.customRef : o, d = e.disabled, s = d === void 0 ? E.disabled : d, y = e.fullWidth, u = y === void 0 ? E.fullWidth : y, p = e.href, b = p === void 0 ? E.href : p, v = e.label, g = v === void 0 ? E.label : v, f = e.leadingIcon, x = f === void 0 ? E.leadingIcon : f, N = e.actionButtonThemeColor, O = N === void 0 ? E.actionButtonThemeColor : N, A = e.trailingIcon, S = A === void 0 ? E.trailingIcon : A, B = e.type, R = B === void 0 ? E.type : B, I = _(e, nr), C = G(function() {
795
- return g || i;
796
- }, [g, i]);
797
- return /* @__PURE__ */ m.createElement(da, k({
798
- ref: l,
799
- customRef: c,
800
- disabled: s,
801
- fullWidth: u,
802
- href: b,
803
- label: g,
804
- leadingIcon: x,
805
- themeColor: O,
806
- trailingIcon: S,
807
- type: R,
808
- variant: "text",
809
- className: h("mdc-card__action mdc-card__action--button", r)
810
- }, I), C);
811
- });
812
- Me.displayName = "CardActionButton";
813
- Me.propTypes = La;
814
- var tr = ["active", "ariaLabel", "ariaLabelledBy", "children", "className", "disabled", "onClick", "toggleOff", "toggleOffAriaLabel", "toggleOffAriaLabelledBy", "toggleOn", "toggleOnAriaLabel", "toggleOnAriaLabelledBy", "variant"], L = Sa, qe = /* @__PURE__ */ T(function(e, l) {
815
- e.active;
816
- var t = e.ariaLabel, i = t === void 0 ? L.ariaLabel : t;
817
- e.ariaLabelledBy;
818
- var n = e.children, r = n === void 0 ? L.children : n, o = e.className, c = o === void 0 ? L.className : o, d = e.disabled, s = d === void 0 ? L.disabled : d, y = e.onClick, u = y === void 0 ? L.onClick : y, p = e.toggleOff, b = p === void 0 ? L.toggleOff : p, v = e.toggleOffAriaLabel, g = v === void 0 ? L.toggleOffAriaLabel : v, f = e.toggleOffAriaLabelledBy, x = f === void 0 ? L.toggleOffAriaLabelledBy : f, N = e.toggleOn, O = N === void 0 ? L.toggleOn : N, A = e.toggleOnAriaLabel, S = A === void 0 ? L.toggleOnAriaLabel : A, B = e.toggleOnAriaLabelledBy, R = B === void 0 ? L.toggleOnAriaLabelledBy : B, I = e.variant, C = I === void 0 ? L.variant : I, Z = _(e, tr), Ye = G(function() {
819
- return typeof r == "string" ? /* @__PURE__ */ m.createElement(Je, {
820
- icon: r
821
- }) : r;
822
- }, [r]);
823
- return /* @__PURE__ */ m.createElement(ca, k({
824
- ref: l,
825
- variant: C,
826
- disabled: s,
827
- onClick: u,
828
- ariaLabel: i,
829
- toggleOffAriaLabel: g,
830
- toggleOffAriaLabelledBy: x,
831
- toggleOnAriaLabel: S,
832
- toggleOnAriaLabelledBy: R,
833
- toggleOn: O,
834
- toggleOff: b,
835
- className: h("mdc-card__action mdc-card__action--icon", c)
836
- }, Z), Ye);
837
- });
838
- qe.displayName = "CardActionIcon";
839
- qe.propTypes = Ea;
840
- var ir = ["alignment", "actionIcons", "actionButtons", "className"], V = Ua, $e = /* @__PURE__ */ T(function(e, l) {
841
- var t = e.alignment, i = t === void 0 ? V.alignment : t, n = e.actionIcons, r = n === void 0 ? V.actionIcons : n, o = e.actionButtons, c = o === void 0 ? V.actionButtons : o, d = e.className, s = d === void 0 ? V.className : d, y = _(e, ir);
842
- return /* @__PURE__ */ m.createElement("div", k({
843
- ref: l,
844
- className: h("lmnt", "mdc-card__actions", i === "leading" && "lmnt-card__actions--leading", i === "center" && "lmnt-card__actions--center", i === "trailing" && "lmnt-card__actions--trailing", s)
845
- }, y), c && /* @__PURE__ */ m.createElement("div", {
846
- className: "mdc-card__action-buttons"
847
- }, c), r && i === "leading" && /* @__PURE__ */ m.createElement("div", {
848
- className: "mdc-card__action-icons"
849
- }, r));
850
- });
851
- $e.displayName = "CardActions";
852
- $e.propTypes = Ra;
853
- var lr = ["children", "typographyType", "themeColor", "className"], X = Ha, je = /* @__PURE__ */ T(function(e, l) {
854
- var t = e.children, i = t === void 0 ? X.children : t, n = e.typographyType, r = n === void 0 ? X.typographyType : n, o = e.themeColor, c = o === void 0 ? X.themeColor : o, d = e.className, s = d === void 0 ? X.className : d, y = _(e, lr);
855
- return /* @__PURE__ */ m.createElement("div", k({
856
- ref: l,
857
- className: h("lmnt-card-body", r === "body1" && " mdc-typography--body1", r === "body2" && " mdc-typography--body2", r === "button" && " mdc-typography--button", r === "caption" && " mdc-typography--caption", r === "headline1" && " mdc-typography--headline1", r === "headline2" && " mdc-typography--headline2", r === "headline3" && " mdc-typography--headline3", r === "headline4" && " mdc-typography--headline4", r === "headline5" && " mdc-typography--headline5", r === "headline6" && " mdc-typography--headline6", r === "display1" && " mdc-typography--headline1", r === "display2" && " mdc-typography--headline2", r === "display3" && " mdc-typography--headline3", r === "display4" && " mdc-typography--headline4", r === "display5" && " mdc-typography--headline5", r === "display6" && " mdc-typography--headline6", r === "overline" && " mdc-typography--overline", r === "subtitle1" && " mdc-typography--subtitle1", r === "subtitle2" && " mdc-typography--subtitle2", "lmnt-theme-".concat(c, "-bg"), s)
858
- }, y), i);
859
- });
860
- je.displayName = "CardBody";
861
- je.propTypes = Pa;
862
- var or = ["children", "className"], Be = qa, ze = /* @__PURE__ */ T(function(e, l) {
863
- var t = e.children, i = t === void 0 ? Be.children : t, n = e.className, r = n === void 0 ? Be.className : n, o = _(e, or);
864
- return /* @__PURE__ */ m.createElement("div", k({
865
- ref: l,
866
- className: h(["lmnt", "mdc-card__content"], r)
867
- }, o), i);
868
- });
869
- ze.displayName = "CardContent";
870
- ze.propTypes = Ma;
871
- var dr = ["className", "dividerVariant", "dividerThemeColor"], ee = ja, De = /* @__PURE__ */ T(function(e, l) {
872
- var t = e.className, i = t === void 0 ? ee.className : t, n = e.dividerVariant, r = n === void 0 ? ee.dividerVariant : n, o = e.dividerThemeColor, c = o === void 0 ? ee.dividerThemeColor : o, d = _(e, dr);
873
- return /* @__PURE__ */ m.createElement(se, k({
874
- ref: l,
875
- variant: r,
876
- themeColor: c,
877
- className: h("mdc-card__divider", "lmnt-card-divider", i)
878
- }, d));
879
- });
880
- De.displayName = "CardDivider";
881
- De.propTypes = $a;
882
- var cr = ["children", "className", "filterType"], ae = Da, We = /* @__PURE__ */ T(function(e, l) {
883
- var t = e.children, i = t === void 0 ? ae.children : t, n = e.className, r = n === void 0 ? ae.className : n, o = e.filterType, c = o === void 0 ? ae.filterType : o, d = _(e, cr);
884
- return /* @__PURE__ */ m.createElement("div", k({
885
- ref: l,
886
- className: h("lmnt", "lmnt-card__filters", c === "chips" && "lmnt-card__filters--chips", c === "select" && "lmnt-card__filters--select", c === "select-2" && "lmnt-card__filters--select lmnt-card__filters--select-2", r)
887
- }, d), i);
888
- });
889
- We.displayName = "CardFilter";
890
- We.propTypes = za;
891
- var sr = /* @__PURE__ */ la({
892
- groupRect: {}
893
- }), mr = ["children", "className", "rtl"], re = Va, Ve = /* @__PURE__ */ T(function(e, l) {
894
- var t = e.children, i = t === void 0 ? re.children : t, n = e.className, r = n === void 0 ? re.className : n, o = e.rtl, c = o === void 0 ? re.rtl : o, d = _(e, mr), s = ba(), y = Se(s, 2), u = y[0], p = y[1], b = D(u);
895
- return j(l, function() {
896
- return b.current;
897
- }, []), j(u, function() {
898
- return b.current;
899
- }, []), // eslint-disable-next-line react/jsx-no-constructed-context-values
900
- /* @__PURE__ */ m.createElement(sr.Provider, {
901
- value: {
902
- groupRect: p
903
- }
904
- }, /* @__PURE__ */ m.createElement(ya, k({
905
- className: h("lmnt-card__horizontal-group", "lmnt-card--horizontal", r),
906
- ref: b,
907
- gap: "none",
908
- direction: c ? "horizontal-reverse" : "horizontal",
909
- secondaryAlign: "start"
910
- }, d), i));
911
- });
912
- Ve.propTypes = Wa;
913
- Ve.displayName = "CardHorizontalGroup";
914
- var yr = ["children", "className", "position", "overlayThemeColor"], F = Ja, me = /* @__PURE__ */ T(function(e, l) {
915
- var t = e.children, i = t === void 0 ? F.children : t, n = e.className, r = n === void 0 ? F.className : n, o = e.position, c = o === void 0 ? F.position : o, d = e.overlayThemeColor, s = d === void 0 ? F.overlayThemeColor : d, y = _(e, yr), u = D();
916
- j(l, function() {
917
- return u.current;
918
- }, []);
919
- var p = G(function() {
920
- return c !== "none" && h("lmnt", "lmnt-card-overlay ", !ke(s).call(s, "gradient") && s !== "surface" && "lmnt-card-overlay__".concat(s), ke(s).call(s, "gradient") && s !== "surface" && "lmnt-theme--bg-".concat(s), s === "surface" && "lmnt-theme-surface-bg", "lmnt-card-overlay__".concat(c), r);
921
- }, [s, c, r]);
922
- return /* @__PURE__ */ m.createElement("div", k({
923
- className: p
924
- }, y), i && i);
925
- });
926
- me.displayName = "CardOverlay";
927
- me.propTypes = Ya;
928
- var gr = ["children", "className", "contentPlacement", "imageUrl", "overlay", "overlayThemeColor", "ratio", "style"];
929
- function xe(e, l) {
930
- var t = de(e);
931
- if ($) {
932
- var i = $(e);
933
- l && (i = ce(i).call(i, function(n) {
934
- return z(e, n).enumerable;
935
- })), t.push.apply(t, i);
936
- }
937
- return t;
938
- }
939
- function pr(e) {
940
- for (var l = 1; l < arguments.length; l++) {
941
- var t, i, n = arguments[l] != null ? arguments[l] : {};
942
- l % 2 ? M(t = xe(Object(n), !0)).call(t, function(r) {
943
- ie(e, r, n[r]);
944
- }) : q ? le(e, q(n)) : M(i = xe(Object(n))).call(i, function(r) {
945
- oe(e, r, z(n, r));
946
- });
947
- }
948
- return e;
949
- }
950
- var H = Za, Xe = /* @__PURE__ */ T(function(e, l) {
951
- var t = e.children, i = t === void 0 ? H.children : t, n = e.className, r = n === void 0 ? H.className : n, o = e.contentPlacement, c = o === void 0 ? H.contentPlacement : o, d = e.imageUrl, s = d === void 0 ? H.imageUrl : d, y = e.overlay, u = y === void 0 ? H.overlay : y, p = e.overlayThemeColor, b = p === void 0 ? H.overlayThemeColor : p, v = e.ratio, g = v === void 0 ? H.ratio : v, f = e.style, x = f === void 0 ? H.style : f, N = _(e, gr);
952
- return /* @__PURE__ */ m.createElement("div", k({
953
- ref: l,
954
- className: h("lmnt", "mdc-card__media", (g === "square" || !g) && "mdc-card__media--square", g === "sixteen-nine" && "mdc-card__media--16-9", g === "four-three" && "lmnt-card__media--4-3", g === "four-five" && "lmnt-card__media--4-5", g === "two-one" && "lmnt-card__media--2-1", r),
955
- style: pr({
956
- backgroundImage: "url(".concat(s, ")")
957
- }, x)
958
- }, N), u && /* @__PURE__ */ m.createElement(me, {
959
- overlayThemeColor: b
960
- }), i && /* @__PURE__ */ m.createElement("div", {
961
- className: h("mdc-card__media-content", u && "lmnt-card__media-content--with-overlay", c === "bottom" && "lmnt-card__content--bottom", c === "top" && "lmnt-card__content--top")
962
- }, /* @__PURE__ */ m.createElement("div", {
963
- className: "lmnt-card__media-inner-content"
964
- }, i)));
965
- });
966
- Xe.displayName = "CardMedia";
967
- Xe.propTypes = Ga;
968
- var ur = ["children", "className", "tag"], Ae = Qa, Fe = /* @__PURE__ */ T(function(e, l) {
969
- var t = e.children, i = t === void 0 ? Ae.children : t, n = e.className, r = n === void 0 ? Ae.className : n, o = e.tag, c = o === void 0 ? "div" : o, d = _(e, ur);
970
- return /* @__PURE__ */ m.createElement(c, k({
971
- ref: l,
972
- tabIndex: "0",
973
- className: h(["lmnt", "mdc-card__primary-action"], r)
974
- }, d), i);
975
- });
976
- Fe.displayName = "CardPrimaryAction";
977
- Fe.propTypes = Ka;
978
- var vr = ["className", "leadingBlock", "leadingBlockType", "overlineText", "placement", "primaryText", "secondaryText", "stackedSecondaryText", "stacked", "themeColor", "trailingBlock", "trailingBlockType"], w = ar, Ge = /* @__PURE__ */ T(function(e, l) {
979
- var t = e.className, i = t === void 0 ? w.className : t, n = e.leadingBlock, r = n === void 0 ? w.leadingBlock : n, o = e.leadingBlockType, c = o === void 0 ? w.leadingBlockType : o, d = e.overlineText, s = d === void 0 ? w.overlineText : d, y = e.placement, u = y === void 0 ? w.placement : y, p = e.primaryText, b = p === void 0 ? w.primaryText : p, v = e.secondaryText, g = v === void 0 ? w.secondaryText : v, f = e.stackedSecondaryText, x = f === void 0 ? w.stackedSecondaryText : f, N = e.stacked, O = N === void 0 ? w.stacked : N, A = e.themeColor, S = A === void 0 ? w.themeColor : A, B = e.trailingBlock, R = B === void 0 ? w.trailingBlock : B, I = e.trailingBlockType, C = I === void 0 ? w.trailingBlockType : I, Z = _(e, vr);
980
- return /* @__PURE__ */ m.createElement("div", k({
981
- ref: l,
982
- className: h("lmnt", "lmnt-card-title", O && "lmnt-card-title--stacked", u === "top" && "lmnt-card-title--top-placement", u === "bottom" && "lmnt-card-title--bottom-placement", S === "primary" && "lmnt-theme-primary-bg", S === "secondary" && "lmnt-theme-secondary-bg", i)
983
- }, Z), c ? /* @__PURE__ */ m.createElement("div", {
984
- className: h("lmnt-card-title__leadingBlock", c === "avatar" && "lmnt-card-title__leadingBlock--avatar", c === "icon" && "lmnt-card-title__leadingBlock--icon", c === "icon-with-background" && "lmnt-card-title__leadingBlock--icon-with-background", c === "thumbnail" && "lmnt-card-title__leadingBlock--thumbnail")
985
- }, r) : null, /* @__PURE__ */ m.createElement("div", {
986
- className: "lmnt-card-title__text"
987
- }, s && /* @__PURE__ */ m.createElement("div", {
988
- className: "lmnt-card-title__overlineText"
989
- }, s), b, (g || x) && /* @__PURE__ */ m.createElement("div", {
990
- className: h("lmnt-card-title-secondaryText-container", !O && "lmnt-card-title__items")
991
- }, g && /* @__PURE__ */ m.createElement("div", {
992
- className: "lmnt-card-title__secondaryText"
993
- }, g), x && /* @__PURE__ */ m.createElement("div", {
994
- className: "lmnt-card-title__secondaryText"
995
- }, x))), C ? /* @__PURE__ */ m.createElement("div", {
996
- className: h("lmnt-card-title__trailingBlock", C === "title-actions" && "lmnt-card-title__trailingBlock--title-actions", C === "avatar" && "lmnt-card-title__trailingBlock--avatar", C === "icon" && "lmnt-card-title__trailingBlock--icon", C === "icon-with-background" && "lmnt-card-title__trailingBlock--icon-with-background", C === "thumbnail" && "lmnt-card-title__trailingBlock--thumbnail", C === "badge" && "lmnt-card-title__trailingBlock--badge")
997
- }, R) : null);
998
- });
999
- Ge.displayName = "CardTitle";
1000
- Ge.propTypes = er;
1001
- var fr = ["style", "mediaUrl", "width"];
1002
- function Ie(e, l) {
1003
- var t = de(e);
1004
- if ($) {
1005
- var i = $(e);
1006
- l && (i = ce(i).call(i, function(n) {
1007
- return z(e, n).enumerable;
1008
- })), t.push.apply(t, i);
1009
- }
1010
- return t;
1011
- }
1012
- function hr(e) {
1013
- for (var l = 1; l < arguments.length; l++) {
1014
- var t, i, n = arguments[l] != null ? arguments[l] : {};
1015
- l % 2 ? M(t = Ie(Object(n), !0)).call(t, function(r) {
1016
- ie(e, r, n[r]);
1017
- }) : q ? le(e, q(n)) : M(i = Ie(Object(n))).call(i, function(r) {
1018
- oe(e, r, z(n, r));
1019
- });
1020
- }
1021
- return e;
1022
- }
1023
- var ne = Fa, Ze = /* @__PURE__ */ T(function(e, l) {
1024
- var t = e.style, i = t === void 0 ? ne.style : t, n = e.mediaUrl, r = n === void 0 ? ne.mediaUrl : n, o = e.width, c = o === void 0 ? ne.width : o, d = _(e, fr), s = D();
1025
- return j(l, function() {
1026
- return s.current;
1027
- }, []), /* @__PURE__ */ m.createElement("img", k({
1028
- src: r,
1029
- alt: "leadingCardMedia",
1030
- width: c,
1031
- style: hr({
1032
- flexShrink: 0
1033
- }, i)
1034
- }, d));
1035
- });
1036
- Ze.propTypes = Xa;
1037
- Ze.displayName = "CardLeadingMedia";
1038
- export {
1039
- je as D,
1040
- Ge as F,
1041
- ze as M,
1042
- De as j,
1043
- He as w
1044
- };