@hortiview/default-components 1.3.0 → 1.4.1

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 (41) hide show
  1. package/dist/{HealthCheckFailed-BA_vyKwG.js → HealthCheckFailed-DoqoTvwZ.js} +12 -11
  2. package/dist/Iconify-Cjdr-ccS.js +82 -0
  3. package/dist/{LoadingSpinner-5JYKhDod.js → LoadingSpinner-FRQEZvxs.js} +26 -25
  4. package/dist/OfflineView-HbuDPpQL-BX2tMPh9.js +46 -0
  5. package/dist/assets/DefaultFormSelect.css +1 -0
  6. package/dist/{component-DsB0poTj-uxpi4oSj.js → component-DsB0poTj-BZ89hFvY.js} +3 -3
  7. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +239 -251
  8. package/dist/components/DefaultFormSelect/DefaultFormSelect.d.ts +14 -0
  9. package/dist/components/DefaultFormSelect/DefaultFormSelect.js +189 -0
  10. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +2 -2
  11. package/dist/components/GenericTable/GenericTable.js +9928 -23562
  12. package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
  13. package/dist/components/HealthChecks/DefaultHealthCheck.js +2 -2
  14. package/dist/components/HealthChecks/IotServiceHealthCheck.js +2 -2
  15. package/dist/components/HealthChecks/PlatformHealthCheck.js +2 -2
  16. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +2 -2
  17. package/dist/components/OfflineView/OfflineView.js +2 -2
  18. package/dist/index.es--yyG47az-DBKBm3yD.js +825 -0
  19. package/dist/{index.es-CiqbARoC-D-muiSwa.js → index.es-Bx1E5MPK-BWa0n8W0.js} +31 -31
  20. package/dist/index.es-CzUKBF7E-BPJhlGEA.js +13567 -0
  21. package/dist/{index.es-D-CKRzIB-DPq2PQz-.js → index.es-D-ph6ImM-CWxTa_iD.js} +15 -15
  22. package/dist/index.es-DDo_AHL0-Bnqdxr8c.js +1033 -0
  23. package/dist/index.es-Kg9soDed-DUORjY8X.js +440 -0
  24. package/dist/index.es-U5-b20Gv-Bta-iNSF.js +1010 -0
  25. package/dist/locales/en-US.js +9 -7
  26. package/dist/locales/en-US.json.d.ts +8 -2
  27. package/dist/locales/es-MX.js +8 -6
  28. package/dist/locales/es-MX.json.d.ts +8 -2
  29. package/dist/locales/tr-TR.js +15 -13
  30. package/dist/locales/tr-TR.json.d.ts +8 -2
  31. package/dist/main.d.ts +6 -3
  32. package/dist/main.js +22 -20
  33. package/dist/{index.es-25EARqhH-CciUgLci.js → omit-1Eom1PmQ-DluRHOwa.js} +748 -1314
  34. package/dist/useHelperText-BjFihJ7h.js +21 -0
  35. package/dist/useTranslation-B_ODv8uN.js +4306 -0
  36. package/package.json +3 -3
  37. package/dist/Iconify-B42tJF6q.js +0 -979
  38. package/dist/OfflineView-BW19N4Cu-CpgiY6nC.js +0 -45
  39. package/dist/index.es-6TJ1S8Jr-C4X_iaSC.js +0 -1468
  40. package/dist/useTranslation-v0qSkb40.js +0 -4223
  41. /package/dist/assets/{OfflineView-BW19N4Cu.css → OfflineView-HbuDPpQL.css} +0 -0
@@ -1,1468 +0,0 @@
1
- import { _ as m, N as b, R as e, b as x, L as pe, r as G, h as ge, f as Ae, p as me, a as Ne, q as K, I as ye } from "./useTranslation-v0qSkb40.js";
2
- import d, { forwardRef as v, useRef as L, useImperativeHandle as w, useEffect as D, useState as J, useMemo as U, createContext as Te, useLayoutEffect as ke } from "react";
3
- import { O as Be } from "./index.es-CiqbARoC-D-muiSwa.js";
4
- import { U as ue } from "./component-DsB0poTj-uxpi4oSj.js";
5
- import { n as Le } from "./Iconify-B42tJF6q.js";
6
- const Ee = {
7
- /**
8
- * The css class name to be passed through to the component markup.
9
- *
10
- * Defaults to **undefined**.
11
- */
12
- className: e.string,
13
- /**
14
- * @deprecated _Use `themeColor` instead._
15
- *
16
- * The name of the desired Element color like 'primary'
17
- *
18
- * Defaults to **undefined**.
19
- */
20
- dividerColor: x(e.string, "Divider", "Use `themeColor` instead."),
21
- /**
22
- * @deprecated _Use `themeColorImportant` instead._
23
- *
24
- * If the border-color should be set with !important
25
- *
26
- * Defaults to **undefined**.
27
- */
28
- dividerColorImportant: x(e.bool, "Divider", "Use `themeColorImportant` instead."),
29
- /**
30
- * @deprecated _Use `variant` instead._
31
- *
32
- * Choose between dense and tall variants.
33
- *
34
- * Defaults to **undefined**.
35
- */
36
- dividerHeight: x(e.string, "Divider", "Use `variant` instead."),
37
- /**
38
- * Set the border-style with default browser styles. In general, avoid using.
39
- *
40
- * Defaults to **empty string**.
41
- */
42
- dividerStyle: e.string,
43
- /**
44
- * The name of the desired Element color like 'primary'
45
- *
46
- * Defaults to **'on-surface-stroke'**.
47
- */
48
- themeColor: e.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"]),
49
- /**
50
- * @deprecated _No longer needed._
51
- *
52
- * In some cases `themeColor` may be inadvertently overridden by another style, this will ensure the selected color is applied.
53
- *
54
- * Defaults to **undefined**.
55
- */
56
- themeColorImportant: x(e.bool, "Divider", "No longer needed."),
57
- /**
58
- * Choose between dense and tall variants.
59
- *
60
- * Defaults to **'dense'**.
61
- */
62
- variant: e.oneOf(["dense", "tall"]),
63
- /**
64
- * Adds top and bottom margin.
65
- *
66
- * Defaults to **'none'**.
67
- */
68
- verticalMargin: e.oneOf(["none", "dense", "standard", "airy"])
69
- }, Ie = {
70
- className: void 0,
71
- dividerColor: void 0,
72
- dividerColorImportant: void 0,
73
- dividerHeight: void 0,
74
- dividerStyle: "",
75
- themeColor: "on-surface-stroke",
76
- themeColorImportant: void 0,
77
- variant: "dense",
78
- verticalMargin: "none"
79
- }, z = /* @__PURE__ */ v((o, n) => {
80
- const {
81
- dividerColor: a,
82
- dividerColorImportant: r,
83
- dividerHeight: t,
84
- dividerStyle: l,
85
- themeColor: c,
86
- themeColorImportant: y,
87
- variant: i,
88
- className: u,
89
- verticalMargin: f,
90
- ...h
91
- } = o, O = r || y, p = t || i, _ = a || c, C = L();
92
- w(n, () => C.current, []);
93
- const E = m("lmnt", "lmnt-divider", O && "lmnt-divider--color-important", p && `lmnt-divider--${p}`, l && `lmnt-divider--${l}`, _ && `lmnt-divider--${_}`, f && f !== "none" && `lmnt-divider--margin-${f}`, u);
94
- return /* @__PURE__ */ d.createElement("hr", b({
95
- ref: C,
96
- className: E
97
- }, h));
98
- });
99
- z.displayName = "Divider";
100
- z.propTypes = Ee;
101
- z.defaultProps = Ie;
102
- /**
103
- * @license
104
- * Copyright 2018 Google Inc.
105
- *
106
- * Permission is hereby granted, free of charge, to any person obtaining a copy
107
- * of this software and associated documentation files (the "Software"), to deal
108
- * in the Software without restriction, including without limitation the rights
109
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
110
- * copies of the Software, and to permit persons to whom the Software is
111
- * furnished to do so, subject to the following conditions:
112
- *
113
- * The above copyright notice and this permission notice shall be included in
114
- * all copies or substantial portions of the Software.
115
- *
116
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
117
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
119
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
120
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
121
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
122
- * THE SOFTWARE.
123
- */
124
- var S = {
125
- ICON_BUTTON_ON: "mdc-icon-button--on",
126
- ROOT: "mdc-icon-button"
127
- }, T = {
128
- ARIA_LABEL: "aria-label",
129
- ARIA_PRESSED: "aria-pressed",
130
- DATA_ARIA_LABEL_OFF: "data-aria-label-off",
131
- DATA_ARIA_LABEL_ON: "data-aria-label-on",
132
- CHANGE_EVENT: "MDCIconButtonToggle:change"
133
- };
134
- /**
135
- * @license
136
- * Copyright 2018 Google Inc.
137
- *
138
- * Permission is hereby granted, free of charge, to any person obtaining a copy
139
- * of this software and associated documentation files (the "Software"), to deal
140
- * in the Software without restriction, including without limitation the rights
141
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
142
- * copies of the Software, and to permit persons to whom the Software is
143
- * furnished to do so, subject to the following conditions:
144
- *
145
- * The above copyright notice and this permission notice shall be included in
146
- * all copies or substantial portions of the Software.
147
- *
148
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
149
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
150
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
151
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
152
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
153
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
154
- * THE SOFTWARE.
155
- */
156
- var fe = (
157
- /** @class */
158
- function(o) {
159
- ge(n, o);
160
- function n(a) {
161
- var r = o.call(this, me(me({}, n.defaultAdapter), a)) || this;
162
- return r.hasToggledAriaLabel = !1, r;
163
- }
164
- return Object.defineProperty(n, "cssClasses", {
165
- get: function() {
166
- return S;
167
- },
168
- enumerable: !1,
169
- configurable: !0
170
- }), Object.defineProperty(n, "strings", {
171
- get: function() {
172
- return T;
173
- },
174
- enumerable: !1,
175
- configurable: !0
176
- }), Object.defineProperty(n, "defaultAdapter", {
177
- get: function() {
178
- return {
179
- addClass: function() {
180
- },
181
- hasClass: function() {
182
- return !1;
183
- },
184
- notifyChange: function() {
185
- },
186
- removeClass: function() {
187
- },
188
- getAttr: function() {
189
- return null;
190
- },
191
- setAttr: function() {
192
- }
193
- };
194
- },
195
- enumerable: !1,
196
- configurable: !0
197
- }), n.prototype.init = function() {
198
- var a = this.adapter.getAttr(T.DATA_ARIA_LABEL_ON), r = this.adapter.getAttr(T.DATA_ARIA_LABEL_OFF);
199
- if (a && r) {
200
- if (this.adapter.getAttr(T.ARIA_PRESSED) !== null)
201
- throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");
202
- this.hasToggledAriaLabel = !0;
203
- } else
204
- this.adapter.setAttr(T.ARIA_PRESSED, String(this.isOn()));
205
- }, n.prototype.handleClick = function() {
206
- this.toggle(), this.adapter.notifyChange({ isOn: this.isOn() });
207
- }, n.prototype.isOn = function() {
208
- return this.adapter.hasClass(S.ICON_BUTTON_ON);
209
- }, n.prototype.toggle = function(a) {
210
- if (a === void 0 && (a = !this.isOn()), a ? this.adapter.addClass(S.ICON_BUTTON_ON) : this.adapter.removeClass(S.ICON_BUTTON_ON), this.hasToggledAriaLabel) {
211
- var r = a ? this.adapter.getAttr(T.DATA_ARIA_LABEL_ON) : this.adapter.getAttr(T.DATA_ARIA_LABEL_OFF);
212
- this.adapter.setAttr(T.ARIA_LABEL, r || "");
213
- } else
214
- this.adapter.setAttr(T.ARIA_PRESSED, "" + a);
215
- }, n;
216
- }(Ne)
217
- );
218
- /**
219
- * @license
220
- * Copyright 2018 Google Inc.
221
- *
222
- * Permission is hereby granted, free of charge, to any person obtaining a copy
223
- * of this software and associated documentation files (the "Software"), to deal
224
- * in the Software without restriction, including without limitation the rights
225
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
226
- * copies of the Software, and to permit persons to whom the Software is
227
- * furnished to do so, subject to the following conditions:
228
- *
229
- * The above copyright notice and this permission notice shall be included in
230
- * all copies or substantial portions of the Software.
231
- *
232
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
233
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
234
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
235
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
236
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
237
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
238
- * THE SOFTWARE.
239
- */
240
- var we = fe.strings, Pe = (
241
- /** @class */
242
- function(o) {
243
- ge(n, o);
244
- function n() {
245
- var a = o !== null && o.apply(this, arguments) || this;
246
- return a.rippleComponent = a.createRipple(), a;
247
- }
248
- return n.attachTo = function(a) {
249
- return new n(a);
250
- }, n.prototype.initialSyncWithDOM = function() {
251
- var a = this;
252
- this.handleClick = function() {
253
- a.foundation.handleClick();
254
- }, this.listen("click", this.handleClick);
255
- }, n.prototype.destroy = function() {
256
- this.unlisten("click", this.handleClick), this.ripple.destroy(), o.prototype.destroy.call(this);
257
- }, n.prototype.getDefaultFoundation = function() {
258
- var a = this, r = {
259
- addClass: function(t) {
260
- return a.root.classList.add(t);
261
- },
262
- hasClass: function(t) {
263
- return a.root.classList.contains(t);
264
- },
265
- notifyChange: function(t) {
266
- a.emit(we.CHANGE_EVENT, t);
267
- },
268
- removeClass: function(t) {
269
- return a.root.classList.remove(t);
270
- },
271
- getAttr: function(t) {
272
- return a.root.getAttribute(t);
273
- },
274
- setAttr: function(t, l) {
275
- return a.root.setAttribute(t, l);
276
- }
277
- };
278
- return new fe(r);
279
- }, Object.defineProperty(n.prototype, "ripple", {
280
- get: function() {
281
- return this.rippleComponent;
282
- },
283
- enumerable: !1,
284
- configurable: !0
285
- }), Object.defineProperty(n.prototype, "on", {
286
- get: function() {
287
- return this.foundation.isOn();
288
- },
289
- set: function(a) {
290
- this.foundation.toggle(a);
291
- },
292
- enumerable: !1,
293
- configurable: !0
294
- }), n.prototype.createRipple = function() {
295
- var a = new ue(this.root);
296
- return a.unbounded = !0, a;
297
- }, n;
298
- }(Ae)
299
- );
300
- const xe = {
301
- /**
302
- * Programmatically sets the toggle state of the button when used as a toggle button. If not set, the toggle state will be managed internally.
303
- *
304
- * Defaults to **false**.
305
- */
306
- active: e.bool,
307
- /**
308
- * Accessibility label for assistive technologies.
309
- *
310
- * Defaults to **null**.
311
- */
312
- ariaLabel: e.string,
313
- /**
314
- * Id of an element serving as a label for this IconButton instance. Used by assistive technologies.
315
- *
316
- * Defaults to **null**.
317
- */
318
- ariaLabelledBy: e.string,
319
- /**
320
- * The custom icon button notification badge to be rendered.
321
- *
322
- * Defaults to **undefined**.
323
- */
324
- badge: e.node,
325
- /**
326
- * The placement of the notification badge on the icon to start. It will flip to the opposite side if there is no room.
327
- *
328
- * Defaults to **'right-start'**.
329
- */
330
- badgePlacement: e.oneOf(["right-start", "left-start"]),
331
- /**
332
- * The content when when using the IconButton normally. Expects an `Icon` component. For toggle button functionality, use `toggleOn` and `toggleOff` instead.
333
- *
334
- * Defaults to **null**.
335
- */
336
- children: e.node,
337
- /**
338
- * The css class name to be passed through to the component markup.
339
- *
340
- * Defaults to **undefined**.
341
- */
342
- className: e.string,
343
- /**
344
- * @deprecated _Use iconSize='small' instead._
345
- *
346
- * Enables a smaller IconButton.
347
- *
348
- * Defaults to **undefined**.
349
- */
350
- dense: x(e.bool, "IconButton", 'Use iconSize="small" instead.'),
351
- /**
352
- * Disables the icon button.
353
- *
354
- * Defaults to **false**.
355
- */
356
- disabled: e.bool,
357
- /**
358
- * For simple use-cases, this will automatically create the icon object. Does not work with `toggle='true'`
359
- *
360
- * Defaults to **null**.
361
- */
362
- icon: e.oneOfType([e.string, e.node]),
363
- /**
364
- * One of 'xsmall', 'small', 'medium', 'large', and 'xlarge' will change the size of the icon. Defaults to medium.
365
- *
366
- * Defaults to **'medium'**.
367
- */
368
- iconSize: e.oneOf(["xsmall", "small", "medium", "large", "xlarge"]),
369
- /**
370
- * The icon type to be rendered. Not all icons have every type. To see which icons are available for different types see [Material Icons docs](https://material.io/tools/icons)
371
- *
372
- * Defaults to **'filled'**.
373
- */
374
- iconType: e.oneOf(["filled", "outlined", "rounded", "two-tone", "sharp"]),
375
- /**
376
- * Fired when the user clicks the IconButton, will return toggle state, if applicable.
377
- *
378
- * Defaults to **null**.
379
- */
380
- onClick: e.func,
381
- /**
382
- * TabIndex of the button.
383
- *
384
- * Defaults to **0**.
385
- */
386
- tabIndex: e.number,
387
- /**
388
- * By default a button will be rendered, this allows another tag/component to be used instead. A block type element/component is suggested.
389
- *
390
- * Defaults to **null**.
391
- */
392
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(d.Component)]),
393
- /**
394
- * The content to be rendered when the `IconButton` is toggled off. Expects an `Icon` component. The typical use case for a toggle button would be to set an Icon for `toggleOn` and `toggleOff`, leaving children blank.
395
- *
396
- * Defaults to **null**.
397
- */
398
- toggleOff: e.node,
399
- /**
400
- * 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.
401
- *
402
- * Defaults to **null**.
403
- */
404
- toggleOffAriaLabel: e.string,
405
- /**
406
- * 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`.
407
- *
408
- * Defaults to **null**.
409
- */
410
- toggleOffAriaLabelledBy: e.string,
411
- /**
412
- * The content to be rendered when the `IconButton` is toggled on. Expects an `Icon` component. The typical use case for a toggle button would be to set an Icon for `toggleOn` and `toggleOff`, leaving children blank.
413
- *
414
- * Defaults to **null**.
415
- */
416
- toggleOn: e.node,
417
- /**
418
- * 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.
419
- *
420
- * Defaults to **null**.
421
- */
422
- toggleOnAriaLabel: e.string,
423
- /**
424
- * 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`.
425
- *
426
- * Defaults to **null**.
427
- */
428
- toggleOnAriaLabelledBy: e.string,
429
- /**
430
- * 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.
431
- *
432
- * Defaults to **empty string**.
433
- */
434
- variant: K(e.oneOf(["", "filled-danger-alt", "filled-danger", "filled-primary", "filled-secondary", "color-primary", "color-secondary", "color-on-dark", "color-on-unknown-black", "secondary-on-surface"]), ["primary-alt", "secondary-alt", "primary", "danger-alt", "danger"], "IconButton", "Please use one of '','filled-danger-alt','filled-danger','filled-primary','filled-secondary','color-primary','color-secondary','color-on-dark','color-on-unknown-black','secondary-on-surface'.")
435
- }, Re = {
436
- active: !1,
437
- ariaLabel: null,
438
- ariaLabelledBy: null,
439
- badge: void 0,
440
- badgePlacement: "right-start",
441
- children: null,
442
- className: void 0,
443
- dense: void 0,
444
- disabled: !1,
445
- icon: null,
446
- iconSize: "medium",
447
- iconType: "filled",
448
- tabIndex: 0,
449
- tag: null,
450
- toggleOff: null,
451
- toggleOffAriaLabel: null,
452
- toggleOffAriaLabelledBy: null,
453
- toggleOn: null,
454
- toggleOnAriaLabel: null,
455
- toggleOnAriaLabelledBy: null,
456
- variant: ""
457
- }, F = /* @__PURE__ */ v((o, n) => {
458
- const {
459
- active: a,
460
- ariaLabel: r,
461
- ariaLabelledBy: t,
462
- badge: l,
463
- badgePlacement: c,
464
- children: y,
465
- className: i,
466
- dense: u,
467
- disabled: f,
468
- icon: h,
469
- iconSize: O,
470
- iconType: p,
471
- onClick: _,
472
- noHover: C,
473
- tabIndex: E,
474
- tag: q,
475
- toggleOff: ce,
476
- toggleOffAriaLabel: H,
477
- toggleOffAriaLabelledBy: j,
478
- toggleOn: se,
479
- toggleOnAriaLabel: W,
480
- toggleOnAriaLabelledBy: V,
481
- variant: s,
482
- ...ve
483
- } = o, R = L(), $ = L(), P = L(), k = se && ce;
484
- let B = O;
485
- B === "medium" && u && (B = "small"), l && (B === "small" || B === "xsmall") && (B = "medium"), w(n, () => R.current, []);
486
- const _e = m("lmnt", "lmnt-icon-button", "mdc-icon-button", C && "lmnt-icon-button__no-hover", (s === "primary" || s === "primary-alt" || s === "secondary" || s === "danger" || s === "danger-alt" || s === "filled-primary" || s === "filled-primary-alt" || s === "filled-secondary" || s === "filled-danger" || s === "filled-danger-alt") && "lmnt-icon-button--fill", (s === "danger-alt" || s === "filled-danger-alt") && "lmnt-icon-button--fill-danger-alt", (s === "danger" || s === "filled-danger") && "lmnt-icon-button--fill-danger", (s === "primary" || s === "filled-primary") && "lmnt-icon-button--fill-primary", (s === "primary-alt" || s === "filled-secondary") && "lmnt-icon-button--fill-secondary", (s === "secondary-alt" || s === "color-on-dark") && "lmnt-icon-button--color-on-dark", s === "color-primary" && "lmnt-icon-button--color-primary", s === "color-secondary" && "lmnt-icon-button--color-secondary", s === "color-on-unknown-black" && "lmnt-icon-button--on-unknown-black", s === "secondary-on-surface" && "lmnt-icon-button--secondary-on-surface", B && `lmnt-icon-button--${B}`, i);
487
- D(() => (k ? P.current = Pe.attachTo(R.current) : ($.current = ue.attachTo(R.current), $.current.unbounded = !0), () => {
488
- k ? P.current.destroy() : $.current.destroy();
489
- }), [P, k, $]), D(() => {
490
- k && (P.current.on = a);
491
- }, [a, k, P]);
492
- const Oe = (g) => {
493
- _ && _(k ? P.current.on : g);
494
- }, Ce = q || "button";
495
- return /* @__PURE__ */ d.createElement(Ce, b({
496
- "aria-label": r,
497
- "aria-labelledby": t,
498
- "data-aria-label-on": W || V || r,
499
- "data-aria-label-off": H || j || r,
500
- onClick: Oe,
501
- ref: R,
502
- className: _e,
503
- disabled: f,
504
- tabIndex: E
505
- }, ve), h && /* @__PURE__ */ d.createElement(pe, {
506
- badge: l,
507
- badgePlacement: c,
508
- icon: h,
509
- iconSize: B,
510
- iconType: p
511
- }), y && G(y, (g) => {
512
- var A, N;
513
- return {
514
- className: m("mdc-icon-button__icon", g == null || (A = g.props) === null || A === void 0 ? void 0 : A.className),
515
- "aria-hidden": (g == null || (N = g.props) === null || N === void 0 ? void 0 : N["aria-hidden"]) || r || t
516
- };
517
- }), k && a && G(se, (g) => {
518
- var A, N, I;
519
- return {
520
- className: m("mdc-icon-button__icon", g == null || (A = g.props) === null || A === void 0 ? void 0 : A.className),
521
- "aria-label": (g == null || (N = g.props) === null || N === void 0 ? void 0 : N["aria-label"]) || W || V || r,
522
- "aria-hidden": (g == null || (I = g.props) === null || I === void 0 ? void 0 : I["aria-hidden"]) || W || V || r
523
- };
524
- }), k && !a && G(ce, (g) => {
525
- var A, N, I;
526
- return {
527
- className: m("mdc-icon-button__icon", g == null || (A = g.props) === null || A === void 0 ? void 0 : A.className),
528
- "aria-label": (g == null || (N = g.props) === null || N === void 0 ? void 0 : N["aria-label"]) || H || j || r,
529
- "aria-hidden": (g == null || (I = g.props) === null || I === void 0 ? void 0 : I["aria-hidden"]) || H || j || r
530
- };
531
- }));
532
- });
533
- F.displayName = "IconButton";
534
- F.propTypes = xe;
535
- F.defaultProps = Re;
536
- var $e = function() {
537
- }, he = typeof window < "u", Se = he ? ke : D, be = {
538
- x: 0,
539
- y: 0,
540
- width: 0,
541
- height: 0,
542
- top: 0,
543
- left: 0,
544
- bottom: 0,
545
- right: 0
546
- };
547
- function De() {
548
- var o = J(null), n = o[0], a = o[1], r = J(be), t = r[0], l = r[1], c = U(function() {
549
- return new window.ResizeObserver(function(y) {
550
- if (y[0]) {
551
- var i = y[0].contentRect, u = i.x, f = i.y, h = i.width, O = i.height, p = i.top, _ = i.left, C = i.bottom, E = i.right;
552
- l({ x: u, y: f, width: h, height: O, top: p, left: _, bottom: C, right: E });
553
- }
554
- });
555
- }, []);
556
- return Se(function() {
557
- if (n)
558
- return c.observe(n), function() {
559
- c.disconnect();
560
- };
561
- }, [n]), [a, t];
562
- }
563
- const Ue = he && typeof window.ResizeObserver < "u" ? De : function() {
564
- return [$e, be];
565
- }, ze = {
566
- /**
567
- * Alignment of the Card Body.
568
- *
569
- * Defaults to **'left-top'**.
570
- */
571
- bodyAlignment: e.oneOf(["left-center", "left-top", "left-bottom", "centered", "right-center", "right-top", "right-bottom"]),
572
- /**
573
- * Content to be rendered inside the Card. Should be one of CardActions, CardBody, CardContent, CardDivider, CardFilter, CardMedia, or CardTitle.
574
- *
575
- * Defaults to **null**.
576
- */
577
- children: e.node,
578
- /**
579
- * Height style property of card.
580
- *
581
- * Defaults to **'auto'**.
582
- */
583
- height: e.string,
584
- /**
585
- * If true the card will be styled for a loading spinner
586
- *
587
- * Defaults to **false**.
588
- */
589
- loadingCard: e.bool,
590
- /**
591
- * Passthrough style object.
592
- *
593
- * Defaults to **null**.
594
- */
595
- style: e.object,
596
- /**
597
- * Background color of the card. It is recommended to set to transparent if setting theme color on the Card Title or Card Body.
598
- *
599
- * Defaults to **'surface'**.
600
- */
601
- themeColor: e.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"]),
602
- /**
603
- * 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.
604
- *
605
- * Defaults to **'default'**.
606
- */
607
- variant: e.oneOf(["default", "flat", "outlined", "raised"])
608
- }, Fe = {
609
- bodyAlignment: "left-top",
610
- children: null,
611
- height: "auto",
612
- loadingCard: !1,
613
- style: null,
614
- themeColor: "surface",
615
- variant: "default"
616
- }, Me = {
617
- /**
618
- * Override the default (`primary`) color with the `secondary` color. Most commonly used when the control is placed on a darker surface.
619
- *
620
- * Defaults to **'primary'**.
621
- */
622
- actionButtonThemeColor: e.oneOf(["primary", "secondary"]),
623
- /**
624
- * 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._
625
- *
626
- * Defaults to **null**.
627
- */
628
- children: e.node,
629
- /**
630
- * The css class name to be passed through to the component markup.
631
- *
632
- * Defaults to **undefined**.
633
- */
634
- className: e.string,
635
- /**
636
- * Reference to the DOM button. This enables a greater level of integration.
637
- *
638
- * Defaults to **undefined**.
639
- */
640
- customRef: e.oneOfType([
641
- e.func,
642
- // eslint-disable-next-line react/forbid-prop-types
643
- e.shape({
644
- current: e.any
645
- })
646
- ]),
647
- /**
648
- * Prevent the user from interacting with the component.
649
- *
650
- * Defaults to **false**.
651
- */
652
- disabled: e.bool,
653
- /**
654
- * Applies a full-width style where the button will fill it's container.
655
- *
656
- * Defaults to **false**.
657
- */
658
- fullWidth: e.bool,
659
- /**
660
- * The button will render as an anchor tag.
661
- *
662
- * Defaults to **null**.
663
- */
664
- href: e.string,
665
- /**
666
- * The displayed text. Expects a valid string. If label and children are both set, label will take priority.
667
- *
668
- * Defaults to **null**.
669
- */
670
- label: e.string,
671
- /**
672
- * 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,
673
- *
674
- * Defaults to **null**.
675
- */
676
- leadingIcon: e.oneOfType([e.string, e.node]),
677
- /**
678
- * The primary interaction event for button.
679
- *
680
- * Defaults to **null**.
681
- */
682
- onClick: e.func,
683
- /**
684
- * 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.
685
- *
686
- * Defaults to **null**.
687
- */
688
- trailingIcon: e.oneOfType([e.string, e.node]),
689
- /**
690
- * This applies the html button type (button, submit, reset) or the anchor media type when used with the href property.
691
- *
692
- * Defaults to **'button'**.
693
- */
694
- type: e.oneOf(["button", "submit", "reset"])
695
- }, qe = {
696
- actionButtonThemeColor: "primary",
697
- children: null,
698
- className: void 0,
699
- customRef: void 0,
700
- disabled: !1,
701
- fullWidth: !1,
702
- href: null,
703
- label: null,
704
- leadingIcon: null,
705
- trailingIcon: null,
706
- type: "button"
707
- }, He = {
708
- /**
709
- * Programmatically sets the toggle state of the button when used as a toggle button. If not set, the toggle state will be managed internally.
710
- *
711
- * Defaults to **false**.
712
- */
713
- active: e.bool,
714
- /**
715
- * Accessibility label for assistive technologies.
716
- *
717
- * Defaults to **null**.
718
- */
719
- ariaLabel: e.string,
720
- /**
721
- * Id of the component being labeled for assistive technologies.
722
- *
723
- * Defaults to **null**.
724
- */
725
- ariaLabelledBy: e.string,
726
- /**
727
- * 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.
728
- *
729
- * Defaults to **null**.
730
- */
731
- children: e.node,
732
- /**
733
- * The css class name to be passed through to the component markup.
734
- *
735
- * Defaults to **undefined**.
736
- */
737
- className: e.string,
738
- /**
739
- * Disables the icon button.
740
- *
741
- * Defaults to **false**.
742
- */
743
- disabled: e.bool,
744
- /**
745
- * Fired when the user clicks the Card Action Icon Button, will return toggle state, if applicable.
746
- *
747
- * Defaults to **null**.
748
- */
749
- onClick: e.func,
750
- /**
751
- * 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.
752
- *
753
- * Defaults to **null**.
754
- */
755
- toggleOff: e.node,
756
- /**
757
- * 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.
758
- *
759
- * Defaults to **null**.
760
- */
761
- toggleOffAriaLabel: e.string,
762
- /**
763
- * 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`.
764
- *
765
- * Defaults to **null**.
766
- */
767
- toggleOffAriaLabelledBy: e.string,
768
- /**
769
- * 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.
770
- *
771
- * Defaults to **null**.
772
- */
773
- toggleOn: e.node,
774
- /**
775
- * 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.
776
- *
777
- * Defaults to **null**.
778
- */
779
- toggleOnAriaLabel: e.string,
780
- /**
781
- * 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`.
782
- *
783
- * Defaults to **null**.
784
- */
785
- toggleOnAriaLabelledBy: e.string,
786
- /**
787
- * 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.
788
- *
789
- * Defaults to **empty string**.
790
- */
791
- variant: K(e.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'.")
792
- }, je = {
793
- active: !1,
794
- ariaLabel: null,
795
- ariaLabelledBy: null,
796
- children: null,
797
- className: void 0,
798
- disabled: !1,
799
- toggleOff: null,
800
- toggleOffAriaLabel: null,
801
- toggleOffAriaLabelledBy: null,
802
- toggleOn: null,
803
- toggleOnAriaLabel: null,
804
- toggleOnAriaLabelledBy: null,
805
- variant: ""
806
- }, We = {
807
- /**
808
- * Add buttons to card actions.
809
- *
810
- * Defaults to **null**.
811
- */
812
- actionButtons: e.node,
813
- /**
814
- * Add icons to card actions.
815
- *
816
- * Defaults to **null**.
817
- */
818
- actionIcons: e.node,
819
- /**
820
- * Aligns action buttons and icon buttons. 'center' and 'trailing' only allow buttons.
821
- *
822
- * Defaults to **'leading'**.
823
- */
824
- alignment: e.oneOf(["leading", "center", "trailing"])
825
- }, Ve = {
826
- actionButtons: null,
827
- actionIcons: null,
828
- alignment: "leading"
829
- }, Ge = {
830
- /**
831
- * Content to be rendered inside the title block. Accepts any valid markup.
832
- *
833
- * Defaults to **null**.
834
- */
835
- children: e.node,
836
- /**
837
- * Background color of the card body. It is recommended to set to the Card themeColor to transparent if setting the Card Body color.
838
- *
839
- * Defaults to **'surface'**.
840
- */
841
- themeColor: e.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"]),
842
- /**
843
- * Sets typography class for Card Body. This can be overwritten by the children markup
844
- *
845
- * Defaults to **'body2'**.
846
- */
847
- typographyType: K(e.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'.")
848
- }, Je = {
849
- children: null,
850
- themeColor: "surface",
851
- typographyType: "body2"
852
- }, Ke = {
853
- /**
854
- * Content to be rendered inside the content block. Accepts any valid markup.
855
- *
856
- * Defaults to **null**.
857
- */
858
- children: e.node
859
- }, Qe = {
860
- children: null
861
- }, Xe = {
862
- /**
863
- * Theme color for the Card Divider. Leave empty for gray.
864
- *
865
- * Defaults to **'on-surface-stroke'**.
866
- */
867
- dividerThemeColor: e.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"]),
868
- /**
869
- * Choose between dense and tall variants.
870
- *
871
- * Defaults to **'dense'**.
872
- */
873
- dividerVariant: e.oneOf(["dense", "tall"])
874
- }, Ye = {
875
- dividerThemeColor: "on-surface-stroke",
876
- dividerVariant: "dense"
877
- }, Ze = {
878
- /**
879
- * Content to be rendered inside the title block. Mostly commonly a Select, Textfield component, however any valid components or markup may be used.
880
- *
881
- * Defaults to **null**.
882
- */
883
- children: e.node,
884
- /**
885
- * The css class name to be passed through to the component markup.
886
- *
887
- * Defaults to **undefined**.
888
- */
889
- className: e.string,
890
- /**
891
- * Type of filter being used.
892
- *
893
- * Defaults to **'tabs'**.
894
- */
895
- filterType: e.oneOf(["tabs", "chips", "select", "select-2"])
896
- }, ea = {
897
- children: null,
898
- className: void 0,
899
- filterType: "tabs"
900
- }, aa = {
901
- /**
902
- * Most commonly text or a Typography component, but accepts any valid markup.
903
- *
904
- * Defaults to **null**.
905
- */
906
- children: e.node,
907
- /**
908
- * The css class name to be passed through to the component markup.
909
- *
910
- * Defaults to **undefined**.
911
- */
912
- className: e.string,
913
- /**
914
- * Changes which side of content the Card side media renders on. Improves layout for right-to-left languages.
915
- *
916
- * Defaults to **false**.
917
- */
918
- rtl: e.bool
919
- }, ra = {
920
- children: null,
921
- className: void 0,
922
- rtl: !1
923
- }, na = {
924
- /**
925
- * Url for Card media
926
- *
927
- * Defaults to **null**.
928
- */
929
- mediaUrl: e.string,
930
- /**
931
- * Applies aspect ratio style to the card media.
932
- *
933
- * Defaults to **'square'**.
934
- */
935
- ratio: e.oneOf(["square"]),
936
- /**
937
- * Width for Card media
938
- *
939
- * Defaults to **'30%'**.
940
- */
941
- width: e.oneOfType([e.number, e.string])
942
- }, ta = {
943
- mediaUrl: null,
944
- ratio: "square",
945
- width: "30%"
946
- }, la = {
947
- /**
948
- * Child components will be rendered on top of the provided image. Use `contentBottom` and `contentTop` to control content positioning. Accepts any valid markup.
949
- *
950
- * Defaults to **null**.
951
- */
952
- children: e.node,
953
- /**
954
- * Adjust placement of the media content.
955
- *
956
- * Defaults to **'bottom'**.
957
- */
958
- contentPlacement: e.oneOf(["bottom", "top"]),
959
- /**
960
- * Image Url for card background image
961
- *
962
- * Defaults to **null**.
963
- */
964
- imageUrl: e.string,
965
- /**
966
- * Adds an overlay over to the Card Media.
967
- *
968
- * Defaults to **false**.
969
- */
970
- overlay: e.bool,
971
- /**
972
- * Overlay theme color.
973
- *
974
- * Defaults to **'dark'**.
975
- */
976
- overlayThemeColor: e.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"]),
977
- /**
978
- * Applies aspect ratio style to the card media.
979
- *
980
- * Defaults to **'square'**.
981
- */
982
- ratio: e.oneOf(["square", "sixteen-nine", "four-three", "four-five", "two-one"])
983
- }, oa = {
984
- children: null,
985
- contentPlacement: "bottom",
986
- imageUrl: null,
987
- overlay: !1,
988
- overlayThemeColor: "dark",
989
- ratio: "square"
990
- }, ia = {
991
- /**
992
- * Content to be rendered inside the Card Overlay. Useful for angles or other non semantic elements displayed in the Card.
993
- *
994
- * Defaults to **null**.
995
- */
996
- children: e.node,
997
- /**
998
- * The css class name to be passed through to the component markup.
999
- *
1000
- * Defaults to **undefined**.
1001
- */
1002
- className: e.string,
1003
- /**
1004
- * Overlay theme color.
1005
- *
1006
- * Defaults to **'dark'**.
1007
- */
1008
- overlayThemeColor: e.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"]),
1009
- /**
1010
- * 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.
1011
- *
1012
- * Defaults to **'full'**.
1013
- */
1014
- position: e.oneOf(["full", "leading", "trailing"])
1015
- }, da = {
1016
- children: null,
1017
- className: void 0,
1018
- overlayThemeColor: "dark",
1019
- position: "full"
1020
- }, ca = {
1021
- /**
1022
- * Content to be rendered as the primary action.
1023
- *
1024
- * Defaults to **null**.
1025
- */
1026
- children: e.node,
1027
- /**
1028
- * The primary interaction event for card.
1029
- *
1030
- * Defaults to **null**.
1031
- */
1032
- onClick: e.func,
1033
- /**
1034
- * By default a div will be rendered, this allows another tag/component to be used instead. A block type element/component is suggested.
1035
- *
1036
- * Defaults to **'div'**.
1037
- */
1038
- tag: e.oneOfType([e.string, e.elementType, e.instanceOf(d.Component)])
1039
- }, sa = {
1040
- children: null,
1041
- tag: "div"
1042
- }, ma = {
1043
- /**
1044
- * The css class name to be passed through to the component markup.
1045
- *
1046
- * Defaults to **undefined**.
1047
- */
1048
- className: e.string,
1049
- /**
1050
- * Content to be displayed in the leading block container. See README for types supported.
1051
- *
1052
- * Defaults to **null**.
1053
- */
1054
- leadingBlock: ye(e.node, "CardTitle", "leadingBlockType"),
1055
- /**
1056
- * The type of media that will render in the leading block. See README for size constraints.
1057
- *
1058
- * Defaults to **empty string**.
1059
- */
1060
- leadingBlockType: e.oneOf(["", "avatar", "icon", "icon-with-background", "thumbnail"]),
1061
- /**
1062
- * Content to be displayed in the Overline text of the title. Expects a string, but can be any valid markup.
1063
- *
1064
- * Defaults to **null**.
1065
- */
1066
- overlineText: e.node,
1067
- /**
1068
- * Where title appears in card.
1069
- *
1070
- * Defaults to **'top'**.
1071
- */
1072
- placement: e.oneOf(["top", "middle", "bottom"]),
1073
- /**
1074
- * Content to be displayed in the Primary text of the title. Expects a string, but can be any valid markup.
1075
- *
1076
- * Defaults to **null**.
1077
- */
1078
- primaryText: e.node,
1079
- /**
1080
- * Content to be displayed in the Secondary text of the title. Expects a string, but can be any valid markup.
1081
- *
1082
- * Defaults to **null**.
1083
- */
1084
- secondaryText: e.node,
1085
- /**
1086
- * Prop that makes card title stackable.
1087
- *
1088
- * Defaults to **false**.
1089
- */
1090
- stacked: e.bool,
1091
- /**
1092
- * 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.
1093
- *
1094
- * Defaults to **null**.
1095
- */
1096
- stackedSecondaryText: e.node,
1097
- /**
1098
- * Background color of the `CardTitle`.
1099
- *
1100
- * Defaults to **'surface'**.
1101
- */
1102
- themeColor: e.oneOf(["surface", "primary", "secondary"]),
1103
- /**
1104
- * Content to be displayed in the trailing block container. See README for types supported.
1105
- *
1106
- * Defaults to **null**.
1107
- */
1108
- trailingBlock: ye(e.node, "CardTitle", "trailingBlockType"),
1109
- /**
1110
- * The type of media that will render in the trailing block. See README for size constraints.
1111
- *
1112
- * Defaults to **empty string**.
1113
- */
1114
- trailingBlockType: e.oneOf(["", "title-actions", "avatar", "badge", "icon", "icon-with-background", "thumbnail"])
1115
- }, ya = {
1116
- className: void 0,
1117
- leadingBlock: null,
1118
- leadingBlockType: "",
1119
- overlineText: null,
1120
- placement: "top",
1121
- primaryText: null,
1122
- secondaryText: null,
1123
- stacked: !1,
1124
- stackedSecondaryText: null,
1125
- themeColor: "surface",
1126
- trailingBlock: null,
1127
- trailingBlockType: ""
1128
- }, Q = /* @__PURE__ */ v((o, n) => {
1129
- const {
1130
- bodyAlignment: a,
1131
- children: r,
1132
- className: t,
1133
- direction: l,
1134
- height: c,
1135
- loadingCard: y,
1136
- outlined: i,
1137
- style: u,
1138
- themeColor: f,
1139
- variant: h,
1140
- ...O
1141
- } = o, [p, _] = J({
1142
- height: c,
1143
- direction: l,
1144
- ...u
1145
- }), C = L();
1146
- return w(n, () => C.current, []), D(() => {
1147
- _({
1148
- height: c,
1149
- // display: 'flex', do we need this?
1150
- direction: l,
1151
- ...u
1152
- });
1153
- }, [c, l, u]), /* @__PURE__ */ d.createElement("div", b({
1154
- ref: C,
1155
- className: m("lmnt", "lmnt-card", "mdc-card", h === "outlined" && "mdc-card--outlined", h === "flat" && "lmnt-card--flat", h === "raised" && "lmnt-card--raised", y && "lmnt-card--loading", `lmnt-card--${a}`, `lmnt-theme-${f}-bg`, t),
1156
- style: p
1157
- }, O), r);
1158
- });
1159
- Q.displayName = "Card";
1160
- Q.propTypes = ze;
1161
- Q.defaultProps = Fe;
1162
- const X = /* @__PURE__ */ v((o, n) => {
1163
- const {
1164
- children: a,
1165
- className: r,
1166
- customRef: t,
1167
- disabled: l,
1168
- fullWidth: c,
1169
- href: y,
1170
- label: i,
1171
- leadingIcon: u,
1172
- actionButtonThemeColor: f,
1173
- trailingIcon: h,
1174
- type: O,
1175
- ...p
1176
- } = o, _ = U(() => i || a, [i, a]);
1177
- return /* @__PURE__ */ d.createElement(Be, b({
1178
- ref: n,
1179
- customRef: t,
1180
- disabled: l,
1181
- fullWidth: c,
1182
- href: y,
1183
- label: i,
1184
- leadingIcon: u,
1185
- themeColor: f,
1186
- trailingIcon: h,
1187
- type: O,
1188
- variant: "text",
1189
- className: m("mdc-card__action mdc-card__action--button", r)
1190
- }, p), _);
1191
- });
1192
- X.displayName = "CardActionButton";
1193
- X.propTypes = Me;
1194
- X.defaultProps = qe;
1195
- const Y = /* @__PURE__ */ v((o, n) => {
1196
- const {
1197
- active: a,
1198
- ariaLabel: r,
1199
- ariaLabelledBy: t,
1200
- children: l,
1201
- className: c,
1202
- disabled: y,
1203
- onClick: i,
1204
- toggleOff: u,
1205
- toggleOffAriaLabel: f,
1206
- toggleOffAriaLabelledBy: h,
1207
- toggleOn: O,
1208
- toggleOnAriaLabel: p,
1209
- toggleOnAriaLabelledBy: _,
1210
- variant: C,
1211
- ...E
1212
- } = o, q = U(() => typeof l == "string" ? /* @__PURE__ */ d.createElement(pe, {
1213
- icon: l
1214
- }) : l, [l]);
1215
- return /* @__PURE__ */ d.createElement(F, b({
1216
- ref: n,
1217
- variant: C,
1218
- disabled: y,
1219
- onClick: i,
1220
- ariaLabel: r,
1221
- toggleOffAriaLabel: f,
1222
- toggleOffAriaLabelledBy: h,
1223
- toggleOnAriaLabel: p,
1224
- toggleOnAriaLabelledBy: _,
1225
- toggleOn: O,
1226
- toggleOff: u,
1227
- className: m("mdc-card__action mdc-card__action--icon", c)
1228
- }, E), q);
1229
- });
1230
- Y.displayName = "CardActionIcon";
1231
- Y.propTypes = He;
1232
- Y.defaultProps = je;
1233
- const Z = /* @__PURE__ */ v((o, n) => {
1234
- const {
1235
- alignment: a,
1236
- actionIcons: r,
1237
- actionButtons: t,
1238
- className: l,
1239
- ...c
1240
- } = o;
1241
- return /* @__PURE__ */ d.createElement("div", b({
1242
- ref: n,
1243
- className: m("lmnt", "mdc-card__actions", a === "leading" && "lmnt-card__actions--leading", a === "center" && "lmnt-card__actions--center", a === "trailing" && "lmnt-card__actions--trailing", l)
1244
- }, c), t && /* @__PURE__ */ d.createElement("div", {
1245
- className: "mdc-card__action-buttons"
1246
- }, t), r && a === "leading" && /* @__PURE__ */ d.createElement("div", {
1247
- className: "mdc-card__action-icons"
1248
- }, r));
1249
- });
1250
- Z.displayName = "CardActions";
1251
- Z.propTypes = We;
1252
- Z.defaultProps = Ve;
1253
- const ee = /* @__PURE__ */ v((o, n) => {
1254
- const {
1255
- children: a,
1256
- typographyType: r,
1257
- themeColor: t,
1258
- className: l,
1259
- ...c
1260
- } = o;
1261
- return /* @__PURE__ */ d.createElement("div", b({
1262
- ref: n,
1263
- className: m("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-${t}-bg`, l)
1264
- }, c), a);
1265
- });
1266
- ee.displayName = "CardBody";
1267
- ee.propTypes = Ge;
1268
- ee.defaultProps = Je;
1269
- const ae = /* @__PURE__ */ v((o, n) => {
1270
- const {
1271
- children: a,
1272
- className: r,
1273
- ...t
1274
- } = o;
1275
- return /* @__PURE__ */ d.createElement("div", b({
1276
- ref: n,
1277
- className: m(["lmnt", "mdc-card__content"], r)
1278
- }, t), a);
1279
- });
1280
- ae.displayName = "CardContent";
1281
- ae.propTypes = Ke;
1282
- ae.defaultProps = Qe;
1283
- const re = /* @__PURE__ */ v((o, n) => {
1284
- const {
1285
- className: a,
1286
- dividerVariant: r,
1287
- dividerThemeColor: t,
1288
- ...l
1289
- } = o;
1290
- return /* @__PURE__ */ d.createElement(z, b({
1291
- ref: n,
1292
- variant: r,
1293
- themeColor: t,
1294
- className: m("mdc-card__divider", "lmnt-card-divider", a)
1295
- }, l));
1296
- });
1297
- re.displayName = "CardDivider";
1298
- re.propTypes = Xe;
1299
- re.defaultProps = Ye;
1300
- const ne = /* @__PURE__ */ v((o, n) => {
1301
- const {
1302
- children: a,
1303
- className: r,
1304
- filterType: t,
1305
- ...l
1306
- } = o;
1307
- return /* @__PURE__ */ d.createElement("div", b({
1308
- ref: n,
1309
- className: m("lmnt", "lmnt-card__filters", t === "chips" && "lmnt-card__filters--chips", t === "select" && "lmnt-card__filters--select", t === "select-2" && "lmnt-card__filters--select lmnt-card__filters--select-2", r)
1310
- }, l), a);
1311
- });
1312
- ne.displayName = "CardFilter";
1313
- ne.propTypes = Ze;
1314
- ne.defaultProps = ea;
1315
- const pa = /* @__PURE__ */ Te({
1316
- groupRect: {}
1317
- }), te = /* @__PURE__ */ v((o, n) => {
1318
- const {
1319
- children: a,
1320
- className: r,
1321
- rtl: t,
1322
- ...l
1323
- } = o, [c, y] = Ue(), i = L(c);
1324
- return w(n, () => i.current, []), w(c, () => i.current, []), // eslint-disable-next-line react/jsx-no-constructed-context-values
1325
- /* @__PURE__ */ d.createElement(pa.Provider, {
1326
- value: {
1327
- groupRect: y
1328
- }
1329
- }, /* @__PURE__ */ d.createElement(Le, b({
1330
- className: m("lmnt-card__horizontal-group", "lmnt-card--horizontal", r),
1331
- ref: i,
1332
- gap: "none",
1333
- direction: t ? "horizontal-reverse" : "horizontal",
1334
- secondaryAlign: "start"
1335
- }, l), a));
1336
- });
1337
- te.propTypes = aa;
1338
- te.defaultProps = ra;
1339
- te.displayName = "CardHorizontalGroup";
1340
- const M = /* @__PURE__ */ v((o, n) => {
1341
- const {
1342
- children: a,
1343
- className: r,
1344
- position: t,
1345
- overlayThemeColor: l,
1346
- ...c
1347
- } = o, y = L();
1348
- w(n, () => y.current, []);
1349
- const i = U(() => t !== "none" && m("lmnt", "lmnt-card-overlay ", !l.includes("gradient") && l !== "surface" && `lmnt-card-overlay__${l}`, l.includes("gradient") && l !== "surface" && `lmnt-theme--bg-${l}`, l === "surface" && "lmnt-theme-surface-bg", `lmnt-card-overlay__${t}`, r), [l, t, r]);
1350
- return /* @__PURE__ */ d.createElement("div", b({
1351
- className: i
1352
- }, c), a && a);
1353
- });
1354
- M.displayName = "CardOverlay";
1355
- M.propTypes = ia;
1356
- M.defaultProps = da;
1357
- const le = /* @__PURE__ */ v((o, n) => {
1358
- const {
1359
- children: a,
1360
- className: r,
1361
- contentPlacement: t,
1362
- imageUrl: l,
1363
- overlay: c,
1364
- overlayThemeColor: y,
1365
- ratio: i,
1366
- style: u,
1367
- ...f
1368
- } = o;
1369
- return /* @__PURE__ */ d.createElement("div", b({
1370
- ref: n,
1371
- className: m("lmnt", "mdc-card__media", (i === "square" || !i) && "mdc-card__media--square", i === "sixteen-nine" && "mdc-card__media--16-9", i === "four-three" && "lmnt-card__media--4-3", i === "four-five" && "lmnt-card__media--4-5", i === "two-one" && "lmnt-card__media--2-1", r),
1372
- style: {
1373
- backgroundImage: `url(${l})`,
1374
- ...u
1375
- }
1376
- }, f), c && /* @__PURE__ */ d.createElement(M, {
1377
- overlayThemeColor: y
1378
- }), a && /* @__PURE__ */ d.createElement("div", {
1379
- className: m("mdc-card__media-content", c && "lmnt-card__media-content--with-overlay", t === "bottom" && "lmnt-card__content--bottom", t === "top" && "lmnt-card__content--top")
1380
- }, /* @__PURE__ */ d.createElement("div", {
1381
- className: "lmnt-card__media-inner-content"
1382
- }, a)));
1383
- });
1384
- le.displayName = "CardMedia";
1385
- le.propTypes = la;
1386
- le.defaultProps = oa;
1387
- const oe = /* @__PURE__ */ v((o, n) => {
1388
- const {
1389
- children: a,
1390
- className: r,
1391
- tag: t = "div",
1392
- ...l
1393
- } = o;
1394
- return /* @__PURE__ */ d.createElement(t, b({
1395
- ref: n,
1396
- tabIndex: "0",
1397
- className: m(["lmnt", "mdc-card__primary-action"], r)
1398
- }, l), a);
1399
- });
1400
- oe.displayName = "CardPrimaryAction";
1401
- oe.propTypes = ca;
1402
- oe.defaultProps = sa;
1403
- const ie = /* @__PURE__ */ v((o, n) => {
1404
- const {
1405
- className: a,
1406
- leadingBlock: r,
1407
- leadingBlockType: t,
1408
- overlineText: l,
1409
- placement: c,
1410
- primaryText: y,
1411
- secondaryText: i,
1412
- stackedSecondaryText: u,
1413
- stacked: f,
1414
- themeColor: h,
1415
- trailingBlock: O,
1416
- trailingBlockType: p,
1417
- ..._
1418
- } = o;
1419
- return /* @__PURE__ */ d.createElement("div", b({
1420
- ref: n,
1421
- className: m("lmnt", "lmnt-card-title", f && "lmnt-card-title--stacked", c === "top" && "lmnt-card-title--top-placement", c === "bottom" && "lmnt-card-title--bottom-placement", h === "primary" && "lmnt-theme-primary-bg", h === "secondary" && "lmnt-theme-secondary-bg", a)
1422
- }, _), t ? /* @__PURE__ */ d.createElement("div", {
1423
- className: m("lmnt-card-title__leadingBlock", t === "avatar" && "lmnt-card-title__leadingBlock--avatar", t === "icon" && "lmnt-card-title__leadingBlock--icon", t === "icon-with-background" && "lmnt-card-title__leadingBlock--icon-with-background", t === "thumbnail" && "lmnt-card-title__leadingBlock--thumbnail")
1424
- }, r) : null, /* @__PURE__ */ d.createElement("div", {
1425
- className: "lmnt-card-title__text"
1426
- }, l && /* @__PURE__ */ d.createElement("div", {
1427
- className: "lmnt-card-title__overlineText"
1428
- }, l), y, (i || u) && /* @__PURE__ */ d.createElement("div", {
1429
- className: m("lmnt-card-title-secondaryText-container", !f && "lmnt-card-title__items")
1430
- }, i && /* @__PURE__ */ d.createElement("div", {
1431
- className: "lmnt-card-title__secondaryText"
1432
- }, i), u && /* @__PURE__ */ d.createElement("div", {
1433
- className: "lmnt-card-title__secondaryText"
1434
- }, u))), p ? /* @__PURE__ */ d.createElement("div", {
1435
- className: m("lmnt-card-title__trailingBlock", p === "title-actions" && "lmnt-card-title__trailingBlock--title-actions", p === "avatar" && "lmnt-card-title__trailingBlock--avatar", p === "icon" && "lmnt-card-title__trailingBlock--icon", p === "icon-with-background" && "lmnt-card-title__trailingBlock--icon-with-background", p === "thumbnail" && "lmnt-card-title__trailingBlock--thumbnail", p === "badge" && "lmnt-card-title__trailingBlock--badge")
1436
- }, O) : null);
1437
- });
1438
- ie.displayName = "CardTitle";
1439
- ie.propTypes = ma;
1440
- ie.defaultProps = ya;
1441
- const de = /* @__PURE__ */ v((o, n) => {
1442
- const {
1443
- style: a,
1444
- mediaUrl: r,
1445
- width: t,
1446
- ...l
1447
- } = o, c = L();
1448
- return w(n, () => c.current, []), /* @__PURE__ */ d.createElement("img", b({
1449
- src: r,
1450
- alt: "leadingCardMedia",
1451
- width: t,
1452
- style: {
1453
- flexShrink: 0,
1454
- ...a
1455
- }
1456
- }, l));
1457
- });
1458
- de.propTypes = na;
1459
- de.defaultProps = ta;
1460
- de.displayName = "CardLeadingMedia";
1461
- export {
1462
- ie as $,
1463
- Q as B,
1464
- re as I,
1465
- F as a,
1466
- ae as w,
1467
- ee as x
1468
- };