@hortiview/shared-components 0.0.11528 → 0.0.11589

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 (118) hide show
  1. package/README.md +21 -4
  2. package/dist/{BigLoadingSpinner-D7H28pr5.js → BigLoadingSpinner-iegTbDcD.js} +6 -6
  3. package/dist/GenericCard-6J558OgP.js +350 -0
  4. package/dist/{ListAreaService-YS_UUPh5.js → ListAreaService-DOwtdRa4.js} +18 -16
  5. package/dist/_MapCache-B75yWNNd.js +376 -0
  6. package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
  7. package/dist/_getTag-BCf9b56Z.js +81 -0
  8. package/dist/animationframe-EMBh6XeO.js +54 -0
  9. package/dist/component-DsB0poTj.js +571 -0
  10. package/dist/component-neHBNHRu.js +114 -0
  11. package/dist/components/AlertBanner/AlertBanner.js +16 -15
  12. package/dist/components/BaseView/BaseView.js +5 -5
  13. package/dist/components/BasicHeading/BasicHeading.js +25 -24
  14. package/dist/components/BasicHeading/BasicHeading.test.js +9 -9
  15. package/dist/components/BlockView/BlockView.js +5 -5
  16. package/dist/components/ChipCard/ChipCard.js +1765 -14
  17. package/dist/components/ContextMenu/ContextMenu.d.ts +1 -1
  18. package/dist/components/ContextMenu/ContextMenu.js +28 -27
  19. package/dist/components/DeleteModal/DeleteModal.js +37 -34
  20. package/dist/components/Disclaimer/Disclaimer.js +11 -9
  21. package/dist/components/EmptyView/EmptyView.js +258 -19
  22. package/dist/components/Filter/Filter.js +58 -54
  23. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
  24. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +1 -1
  25. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5974 -6387
  26. package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +1 -1
  27. package/dist/components/FormComponents/FormNumber/CustomTextField.js +5 -5
  28. package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +1 -1
  29. package/dist/components/FormComponents/FormNumber/FormNumber.js +1 -1
  30. package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
  31. package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +1 -1
  32. package/dist/components/FormComponents/FormSelect/FormSelect.js +3 -3
  33. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
  34. package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
  35. package/dist/components/FormComponents/FormText/FormText.d.ts +1 -1
  36. package/dist/components/FormComponents/FormText/FormText.js +33 -32
  37. package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +1 -1
  38. package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
  39. package/dist/components/GenericTable/GenericTable.js +10486 -74
  40. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
  41. package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
  42. package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
  43. package/dist/components/HashTabView/HashTabView.js +1805 -72
  44. package/dist/components/HeaderFilter/HeaderFilter.d.ts +1 -1
  45. package/dist/components/HeaderFilter/HeaderFilter.js +4 -4
  46. package/dist/components/HealthCheckFailed/HealthCheckFailed.js +20 -17
  47. package/dist/components/Iconify/Iconify.d.ts +1 -2
  48. package/dist/components/Iconify/Iconify.js +42 -42
  49. package/dist/components/InfoGroup/InfoGroup.js +30 -28
  50. package/dist/components/ListArea/ListArea.js +29 -27
  51. package/dist/components/ListArea/ListArea.test.js +2 -2
  52. package/dist/components/ListArea/ListAreaService.js +7 -5
  53. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  54. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  55. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -37
  56. package/dist/components/Modal/Modal.d.ts +1 -1
  57. package/dist/components/Modal/Modal.js +926 -9
  58. package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
  59. package/dist/components/ModulePadding/ModulePadding.js +28 -0
  60. package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
  61. package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
  62. package/dist/components/OverflowTooltip/OverflowTooltip.js +6 -6
  63. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
  64. package/dist/components/SearchBar/SearchBar.js +7 -6
  65. package/dist/components/Select/Select.d.ts +1 -1
  66. package/dist/components/Select/Select.js +13 -13
  67. package/dist/floating-ui.dom-CeD8zknG.js +978 -0
  68. package/dist/get-7ACccM2X.js +114 -0
  69. package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
  70. package/dist/hooks/useHelperText.js +1 -1
  71. package/dist/identity-DLWZln-X.js +1763 -0
  72. package/dist/index.es-0lQcz8m1.js +444 -0
  73. package/dist/index.es-25EARqhH.js +2027 -0
  74. package/dist/index.es-3043KTnb.js +1066 -0
  75. package/dist/index.es-41ztjcFT.js +724 -0
  76. package/dist/index.es-6TJ1S8Jr.js +954 -0
  77. package/dist/index.es-8GOVkuo-.js +374 -0
  78. package/dist/index.es-B-_jXDuz.js +216 -0
  79. package/dist/index.es-BWgXLqXn.js +102 -0
  80. package/dist/index.es-BtjV0oNv.js +360 -0
  81. package/dist/index.es-BvrQnJ3j.js +509 -0
  82. package/dist/index.es-CF_xy2ns.js +674 -0
  83. package/dist/index.es-CL_Heu1n.js +54 -0
  84. package/dist/index.es-CiqbARoC.js +306 -0
  85. package/dist/index.es-D-CKRzIB.js +63 -0
  86. package/dist/index.es-D6N-XWHe.js +56 -0
  87. package/dist/index.es-DKDgy7Kt.js +45 -0
  88. package/dist/index.es-DntoATwO.js +159 -0
  89. package/dist/index.es-UHKFl8Da.js +7075 -0
  90. package/dist/index.es-d5xhUpJZ.js +3242 -0
  91. package/dist/index.es-da0cf7oE.js +569 -0
  92. package/dist/index.es-h2lMdt7G.js +107 -0
  93. package/dist/index.es-zr101OF5.js +4853 -0
  94. package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
  95. package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
  96. package/dist/isEmpty-B4GG2s-V.js +31 -0
  97. package/dist/isPlainObject-C273y67K.js +40 -0
  98. package/dist/isString-BW9UHONv.js +21 -0
  99. package/dist/keyboard-Bpt0aBqQ.js +107 -0
  100. package/dist/main.d.ts +1 -0
  101. package/dist/main.js +57 -55
  102. package/dist/orderBy-Bd48bw88.js +316 -0
  103. package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
  104. package/dist/services/UtilService.js +2 -2
  105. package/dist/toString-CrgB_7Pe.js +54 -0
  106. package/dist/tslib.es6-BDCynO9F.js +162 -0
  107. package/dist/types/GenericTable.d.ts +1 -1
  108. package/dist/uniqueId-NU3-C36A.js +18 -0
  109. package/dist/util-DA21pZXj.js +78 -0
  110. package/package.json +1 -1
  111. package/dist/GenericCard-jlt8ZsHi.js +0 -80
  112. package/dist/_Map-Dtlps7IZ.js +0 -113
  113. package/dist/_overArg-_0pUmCsX.js +0 -14
  114. package/dist/get-P-5PYZOE.js +0 -426
  115. package/dist/isEmpty-BimaZd5G.js +0 -225
  116. package/dist/isString-BOHPtrlm.js +0 -44
  117. package/dist/orderBy-BVQIswlJ.js +0 -765
  118. package/dist/react-tooltip.min-Czs4RGD1.js +0 -1400
@@ -0,0 +1,374 @@
1
+ import { _ as w, c as v, P as r } from "./identity-DLWZln-X.js";
2
+ import l, { forwardRef as F, useState as H, useRef as S, useImperativeHandle as M, useEffect as R } from "react";
3
+ import { F as j } from "./index.es-B-_jXDuz.js";
4
+ import { f as x, d as B } from "./index.es-da0cf7oE.js";
5
+ import { b as L, c as f, _ as K, a as U } from "./tslib.es6-BDCynO9F.js";
6
+ import { M as V, a as q } from "./component-neHBNHRu.js";
7
+ import { M as A, a as D, m as $, b as W } from "./component-DsB0poTj.js";
8
+ /**
9
+ * @license
10
+ * Copyright 2018 Google Inc.
11
+ *
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+ *
19
+ * The above copyright notice and this permission notice shall be included in
20
+ * all copies or substantial portions of the Software.
21
+ *
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
+ * THE SOFTWARE.
29
+ */
30
+ var u = {
31
+ /** Class used for a switch that is in the "checked" (on) position. */
32
+ CHECKED: "mdc-switch--checked",
33
+ /** Class used for a switch that is disabled. */
34
+ DISABLED: "mdc-switch--disabled"
35
+ }, k = {
36
+ /** Aria attribute for checked or unchecked state of switch */
37
+ ARIA_CHECKED_ATTR: "aria-checked",
38
+ /** A CSS selector used to locate the native HTML control for the switch. */
39
+ NATIVE_CONTROL_SELECTOR: ".mdc-switch__native-control",
40
+ /** A CSS selector used to locate the ripple surface element for the switch. */
41
+ RIPPLE_SURFACE_SELECTOR: ".mdc-switch__thumb-underlay"
42
+ };
43
+ /**
44
+ * @license
45
+ * Copyright 2018 Google Inc.
46
+ *
47
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
48
+ * of this software and associated documentation files (the "Software"), to deal
49
+ * in the Software without restriction, including without limitation the rights
50
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51
+ * copies of the Software, and to permit persons to whom the Software is
52
+ * furnished to do so, subject to the following conditions:
53
+ *
54
+ * The above copyright notice and this permission notice shall be included in
55
+ * all copies or substantial portions of the Software.
56
+ *
57
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
63
+ * THE SOFTWARE.
64
+ */
65
+ var _ = (
66
+ /** @class */
67
+ function(s) {
68
+ L(t, s);
69
+ function t(e) {
70
+ return s.call(this, f(f({}, t.defaultAdapter), e)) || this;
71
+ }
72
+ return Object.defineProperty(t, "strings", {
73
+ /** The string constants used by the switch. */
74
+ get: function() {
75
+ return k;
76
+ },
77
+ enumerable: !1,
78
+ configurable: !0
79
+ }), Object.defineProperty(t, "cssClasses", {
80
+ /** The CSS classes used by the switch. */
81
+ get: function() {
82
+ return u;
83
+ },
84
+ enumerable: !1,
85
+ configurable: !0
86
+ }), Object.defineProperty(t, "defaultAdapter", {
87
+ /** The default Adapter for the switch. */
88
+ get: function() {
89
+ return {
90
+ addClass: function() {
91
+ },
92
+ removeClass: function() {
93
+ },
94
+ setNativeControlChecked: function() {
95
+ },
96
+ setNativeControlDisabled: function() {
97
+ },
98
+ setNativeControlAttr: function() {
99
+ }
100
+ };
101
+ },
102
+ enumerable: !1,
103
+ configurable: !0
104
+ }), t.prototype.setChecked = function(e) {
105
+ this.adapter.setNativeControlChecked(e), this.updateAriaChecked_(e), this.updateCheckedStyling_(e);
106
+ }, t.prototype.setDisabled = function(e) {
107
+ this.adapter.setNativeControlDisabled(e), e ? this.adapter.addClass(u.DISABLED) : this.adapter.removeClass(u.DISABLED);
108
+ }, t.prototype.handleChange = function(e) {
109
+ var a = e.target;
110
+ this.updateAriaChecked_(a.checked), this.updateCheckedStyling_(a.checked);
111
+ }, t.prototype.updateCheckedStyling_ = function(e) {
112
+ e ? this.adapter.addClass(u.CHECKED) : this.adapter.removeClass(u.CHECKED);
113
+ }, t.prototype.updateAriaChecked_ = function(e) {
114
+ this.adapter.setNativeControlAttr(k.ARIA_CHECKED_ATTR, "" + !!e);
115
+ }, t;
116
+ }(V)
117
+ );
118
+ /**
119
+ * @license
120
+ * Copyright 2018 Google Inc.
121
+ *
122
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
123
+ * of this software and associated documentation files (the "Software"), to deal
124
+ * in the Software without restriction, including without limitation the rights
125
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
126
+ * copies of the Software, and to permit persons to whom the Software is
127
+ * furnished to do so, subject to the following conditions:
128
+ *
129
+ * The above copyright notice and this permission notice shall be included in
130
+ * all copies or substantial portions of the Software.
131
+ *
132
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
133
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
134
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
135
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
136
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
137
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
138
+ * THE SOFTWARE.
139
+ */
140
+ var z = (
141
+ /** @class */
142
+ function(s) {
143
+ L(t, s);
144
+ function t() {
145
+ var e = s !== null && s.apply(this, arguments) || this;
146
+ return e.ripple_ = e.createRipple_(), e;
147
+ }
148
+ return t.attachTo = function(e) {
149
+ return new t(e);
150
+ }, t.prototype.destroy = function() {
151
+ s.prototype.destroy.call(this), this.ripple_.destroy(), this.nativeControl_.removeEventListener("change", this.changeHandler_);
152
+ }, t.prototype.initialSyncWithDOM = function() {
153
+ var e = this;
154
+ this.changeHandler_ = function() {
155
+ for (var a, n = [], o = 0; o < arguments.length; o++)
156
+ n[o] = arguments[o];
157
+ return (a = e.foundation).handleChange.apply(a, K([], U(n)));
158
+ }, this.nativeControl_.addEventListener("change", this.changeHandler_), this.checked = this.checked;
159
+ }, t.prototype.getDefaultFoundation = function() {
160
+ var e = this, a = {
161
+ addClass: function(n) {
162
+ return e.root.classList.add(n);
163
+ },
164
+ removeClass: function(n) {
165
+ return e.root.classList.remove(n);
166
+ },
167
+ setNativeControlChecked: function(n) {
168
+ return e.nativeControl_.checked = n;
169
+ },
170
+ setNativeControlDisabled: function(n) {
171
+ return e.nativeControl_.disabled = n;
172
+ },
173
+ setNativeControlAttr: function(n, o) {
174
+ return e.nativeControl_.setAttribute(n, o);
175
+ }
176
+ };
177
+ return new _(a);
178
+ }, Object.defineProperty(t.prototype, "ripple", {
179
+ get: function() {
180
+ return this.ripple_;
181
+ },
182
+ enumerable: !1,
183
+ configurable: !0
184
+ }), Object.defineProperty(t.prototype, "checked", {
185
+ get: function() {
186
+ return this.nativeControl_.checked;
187
+ },
188
+ set: function(e) {
189
+ this.foundation.setChecked(e);
190
+ },
191
+ enumerable: !1,
192
+ configurable: !0
193
+ }), Object.defineProperty(t.prototype, "disabled", {
194
+ get: function() {
195
+ return this.nativeControl_.disabled;
196
+ },
197
+ set: function(e) {
198
+ this.foundation.setDisabled(e);
199
+ },
200
+ enumerable: !1,
201
+ configurable: !0
202
+ }), t.prototype.createRipple_ = function() {
203
+ var e = this, a = _.strings.RIPPLE_SURFACE_SELECTOR, n = this.root.querySelector(a), o = f(f({}, A.createAdapter(this)), { addClass: function(i) {
204
+ return n.classList.add(i);
205
+ }, computeBoundingRect: function() {
206
+ return n.getBoundingClientRect();
207
+ }, deregisterInteractionHandler: function(i, c) {
208
+ e.nativeControl_.removeEventListener(i, c, D());
209
+ }, isSurfaceActive: function() {
210
+ return $(e.nativeControl_, ":active");
211
+ }, isUnbounded: function() {
212
+ return !0;
213
+ }, registerInteractionHandler: function(i, c) {
214
+ e.nativeControl_.addEventListener(i, c, D());
215
+ }, removeClass: function(i) {
216
+ n.classList.remove(i);
217
+ }, updateCssVariable: function(i, c) {
218
+ n.style.setProperty(i, c);
219
+ } });
220
+ return new A(this.root, new W(o));
221
+ }, Object.defineProperty(t.prototype, "nativeControl_", {
222
+ get: function() {
223
+ var e = _.strings.NATIVE_CONTROL_SELECTOR;
224
+ return this.root.querySelector(e);
225
+ },
226
+ enumerable: !1,
227
+ configurable: !0
228
+ }), t;
229
+ }(q)
230
+ );
231
+ const G = {
232
+ /**
233
+ * Aligns switch to the right of the label.
234
+ *
235
+ * Defaults to **false**.
236
+ */
237
+ alignEnd: r.bool,
238
+ /**
239
+ * The current value of the switch.
240
+ *
241
+ * Defaults to **false**.
242
+ */
243
+ checked: r.bool,
244
+ /**
245
+ * @deprecated _Use `label` instead._
246
+ *
247
+ * Primary content of the switch. Expects a valid string. If `children` and `label` are both set, `label` will take priority.
248
+ *
249
+ * Defaults to **undefined**.
250
+ */
251
+ children: B(r.node, "Switch", "Use `label` instead."),
252
+ /**
253
+ * The css class name to be passed through to the component markup.
254
+ *
255
+ * Defaults to **undefined**.
256
+ */
257
+ className: r.string,
258
+ /**
259
+ * Prevent the user from interacting with the control.
260
+ *
261
+ * Defaults to **false**.
262
+ */
263
+ disabled: r.bool,
264
+ /**
265
+ * The label not be displayed, but will still be available to screen readers.
266
+ *
267
+ * Defaults to **false**.
268
+ */
269
+ hideLabel: r.bool,
270
+ /**
271
+ * The html id for the input.
272
+ *
273
+ * Defaults to **undefined**.
274
+ */
275
+ id: r.string,
276
+ /**
277
+ * Props to send to the html input
278
+ *
279
+ * Defaults to **undefined**.
280
+ */
281
+ inputProps: r.object,
282
+ /**
283
+ * Display label. The `label` should always be set even when using `hideLabel` - it will be used by screen readers.
284
+ *
285
+ * Defaults to **'Off|On'**.
286
+ */
287
+ label: r.string.isRequired,
288
+ /**
289
+ * Fired when the control is clicked.
290
+ *
291
+ * Defaults to **null**.
292
+ */
293
+ onChange: r.func,
294
+ /**
295
+ * Color of the switch according to the theme.
296
+ *
297
+ * Defaults to **'primary'**.
298
+ */
299
+ themeColor: r.oneOf(["primary", "secondary", "danger", "success"]),
300
+ /**
301
+ * When a switch button is checked, this value will be returned as the second parameter of the `change` handler.
302
+ *
303
+ * Defaults to **null**.
304
+ */
305
+ value: r.oneOfType([r.string, r.number, r.bool, r.object])
306
+ }, J = {
307
+ alignEnd: !1,
308
+ checked: !1,
309
+ children: void 0,
310
+ className: void 0,
311
+ disabled: !1,
312
+ hideLabel: !1,
313
+ id: void 0,
314
+ inputProps: void 0,
315
+ label: "Off|On",
316
+ themeColor: "primary",
317
+ value: null
318
+ }, b = /* @__PURE__ */ F((s, t) => {
319
+ const {
320
+ alignEnd: e,
321
+ checked: a,
322
+ children: n,
323
+ className: o,
324
+ disabled: i,
325
+ hideLabel: c,
326
+ id: N,
327
+ inputProps: h,
328
+ label: P,
329
+ onChange: m,
330
+ themeColor: g,
331
+ value: E,
332
+ ...O
333
+ } = s, [y] = H(() => N || x()), C = S(), p = S(), T = P || n;
334
+ M(t, () => C.current, []);
335
+ const I = (d) => {
336
+ m?.(d.target.checked, E, d);
337
+ };
338
+ return R(() => (p.current = z.attachTo(C.current), () => {
339
+ var d;
340
+ (d = p.current) === null || d === void 0 || d.destroy();
341
+ }), []), R(() => {
342
+ p.current.checked = !!a;
343
+ }, [a]), /* @__PURE__ */ l.createElement(j, {
344
+ inputRef: p,
345
+ alignEnd: e
346
+ }, /* @__PURE__ */ l.createElement("div", w({
347
+ ref: C,
348
+ className: v("lmnt mdc-switch lmnt-switch", i && "mdc-switch--disabled", a && "mdc-switch--checked", g && `lmnt-switch--${g}`, o)
349
+ }, O), /* @__PURE__ */ l.createElement("div", {
350
+ className: "mdc-switch__track"
351
+ }), /* @__PURE__ */ l.createElement("div", {
352
+ className: "mdc-switch__thumb-underlay"
353
+ }, /* @__PURE__ */ l.createElement("div", {
354
+ className: "mdc-switch__thumb"
355
+ }), /* @__PURE__ */ l.createElement("input", w({
356
+ onChange: I,
357
+ disabled: i,
358
+ type: "checkbox",
359
+ id: y,
360
+ role: "switch"
361
+ }, h, {
362
+ className: v("mdc-switch__native-control", h?.className),
363
+ value: E
364
+ })))), /* @__PURE__ */ l.createElement("label", {
365
+ className: v("lmnt-switch-label mdc-switch-label", c && "sr-only", i && "lmnt-switch-label--disabled"),
366
+ htmlFor: y
367
+ }, T));
368
+ });
369
+ b.displayName = "Switch";
370
+ b.propTypes = G;
371
+ b.SwitchDefaultProps = J;
372
+ export {
373
+ b as S
374
+ };
@@ -0,0 +1,216 @@
1
+ import { _ as F, c as g, P as a } from "./identity-DLWZln-X.js";
2
+ import h, { forwardRef as E, useRef as d, useImperativeHandle as y, useEffect as f } from "react";
3
+ import { b as v, c as p } from "./tslib.es6-BDCynO9F.js";
4
+ import { M as b, a as R } from "./component-neHBNHRu.js";
5
+ /**
6
+ * @license
7
+ * Copyright 2017 Google Inc.
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in
17
+ * all copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
+ * THE SOFTWARE.
26
+ */
27
+ var C = {
28
+ ROOT: "mdc-form-field"
29
+ }, I = {
30
+ LABEL_SELECTOR: ".mdc-form-field > label"
31
+ };
32
+ /**
33
+ * @license
34
+ * Copyright 2017 Google Inc.
35
+ *
36
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
37
+ * of this software and associated documentation files (the "Software"), to deal
38
+ * in the Software without restriction, including without limitation the rights
39
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
40
+ * copies of the Software, and to permit persons to whom the Software is
41
+ * furnished to do so, subject to the following conditions:
42
+ *
43
+ * The above copyright notice and this permission notice shall be included in
44
+ * all copies or substantial portions of the Software.
45
+ *
46
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
49
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
50
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
51
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
52
+ * THE SOFTWARE.
53
+ */
54
+ var m = (
55
+ /** @class */
56
+ function(r) {
57
+ v(e, r);
58
+ function e(t) {
59
+ var n = r.call(this, p(p({}, e.defaultAdapter), t)) || this;
60
+ return n.click = function() {
61
+ n.handleClick();
62
+ }, n;
63
+ }
64
+ return Object.defineProperty(e, "cssClasses", {
65
+ get: function() {
66
+ return C;
67
+ },
68
+ enumerable: !1,
69
+ configurable: !0
70
+ }), Object.defineProperty(e, "strings", {
71
+ get: function() {
72
+ return I;
73
+ },
74
+ enumerable: !1,
75
+ configurable: !0
76
+ }), Object.defineProperty(e, "defaultAdapter", {
77
+ get: function() {
78
+ return {
79
+ activateInputRipple: function() {
80
+ },
81
+ deactivateInputRipple: function() {
82
+ },
83
+ deregisterInteractionHandler: function() {
84
+ },
85
+ registerInteractionHandler: function() {
86
+ }
87
+ };
88
+ },
89
+ enumerable: !1,
90
+ configurable: !0
91
+ }), e.prototype.init = function() {
92
+ this.adapter.registerInteractionHandler("click", this.click);
93
+ }, e.prototype.destroy = function() {
94
+ this.adapter.deregisterInteractionHandler("click", this.click);
95
+ }, e.prototype.handleClick = function() {
96
+ var t = this;
97
+ this.adapter.activateInputRipple(), requestAnimationFrame(function() {
98
+ t.adapter.deactivateInputRipple();
99
+ });
100
+ }, e;
101
+ }(b)
102
+ );
103
+ /**
104
+ * @license
105
+ * Copyright 2017 Google Inc.
106
+ *
107
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
108
+ * of this software and associated documentation files (the "Software"), to deal
109
+ * in the Software without restriction, including without limitation the rights
110
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
111
+ * copies of the Software, and to permit persons to whom the Software is
112
+ * furnished to do so, subject to the following conditions:
113
+ *
114
+ * The above copyright notice and this permission notice shall be included in
115
+ * all copies or substantial portions of the Software.
116
+ *
117
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
118
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
119
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
120
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
121
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
122
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
123
+ * THE SOFTWARE.
124
+ */
125
+ var L = (
126
+ /** @class */
127
+ function(r) {
128
+ v(e, r);
129
+ function e() {
130
+ return r !== null && r.apply(this, arguments) || this;
131
+ }
132
+ return e.attachTo = function(t) {
133
+ return new e(t);
134
+ }, e.prototype.labelEl = function() {
135
+ var t = m.strings.LABEL_SELECTOR;
136
+ return this.root.querySelector(t);
137
+ }, e.prototype.getDefaultFoundation = function() {
138
+ var t = this, n = {
139
+ activateInputRipple: function() {
140
+ t.input && t.input.ripple && t.input.ripple.activate();
141
+ },
142
+ deactivateInputRipple: function() {
143
+ t.input && t.input.ripple && t.input.ripple.deactivate();
144
+ },
145
+ deregisterInteractionHandler: function(o, l) {
146
+ var i = t.labelEl();
147
+ i && i.removeEventListener(o, l);
148
+ },
149
+ registerInteractionHandler: function(o, l) {
150
+ var i = t.labelEl();
151
+ i && i.addEventListener(o, l);
152
+ }
153
+ };
154
+ return new m(n);
155
+ }, e;
156
+ }(R)
157
+ );
158
+ const _ = {
159
+ /**
160
+ * Reverse the order of the input and label.
161
+ *
162
+ * Defaults to **false**.
163
+ */
164
+ alignEnd: a.bool,
165
+ /**
166
+ * Content to be rendered inside the FormField. Accepts any valid markup.
167
+ *
168
+ * Defaults to **null**.
169
+ */
170
+ children: a.node,
171
+ /**
172
+ * The css class name to be passed through to the component markup.
173
+ *
174
+ * Defaults to **undefined**.
175
+ */
176
+ className: a.string,
177
+ /**
178
+ * The reference of the input the form field will be associated with. It enables a greater level of integration with parent components.
179
+ *
180
+ * Defaults to **null**.
181
+ */
182
+ inputRef: a.oneOfType([
183
+ a.func,
184
+ // eslint-disable-next-line react/forbid-prop-types
185
+ a.shape({
186
+ current: a.any
187
+ })
188
+ ])
189
+ }, T = {
190
+ alignEnd: !1,
191
+ children: null,
192
+ className: void 0,
193
+ inputRef: null
194
+ }, s = /* @__PURE__ */ E((r, e) => {
195
+ const {
196
+ children: t,
197
+ inputRef: n,
198
+ className: o,
199
+ alignEnd: l,
200
+ ...i
201
+ } = r, c = d(), u = d();
202
+ return y(e, () => c.current, []), f(() => (u.current = L.attachTo(c.current), () => {
203
+ u.current.destroy();
204
+ })), f(() => {
205
+ n && (u.current.input = n.current);
206
+ }, [n]), /* @__PURE__ */ h.createElement("div", F({
207
+ ref: c,
208
+ className: g("lmnt mdc-form-field lmnt-form-field", l && "mdc-form-field--align-end", o)
209
+ }, i), t);
210
+ });
211
+ s.displayName = "FormField";
212
+ s.propTypes = _;
213
+ s.defaultProps = T;
214
+ export {
215
+ s as F
216
+ };
@@ -0,0 +1,102 @@
1
+ import { c as D, _ as I, P as r } from "./identity-DLWZln-X.js";
2
+ import N, { forwardRef as P, useRef as T, useImperativeHandle as H } from "react";
3
+ import { d as e } from "./index.es-da0cf7oE.js";
4
+ const _ = {
5
+ /**
6
+ * The css class name to be passed through to the component markup.
7
+ *
8
+ * Defaults to **undefined**.
9
+ */
10
+ className: r.string,
11
+ /**
12
+ * @deprecated _Use `themeColor` instead._
13
+ *
14
+ * The name of the desired Element color like 'primary'
15
+ *
16
+ * Defaults to **undefined**.
17
+ */
18
+ dividerColor: e(r.string, "Divider", "Use `themeColor` instead."),
19
+ /**
20
+ * @deprecated _Use `themeColorImportant` instead._
21
+ *
22
+ * If the border-color should be set with !important
23
+ *
24
+ * Defaults to **undefined**.
25
+ */
26
+ dividerColorImportant: e(r.bool, "Divider", "Use `themeColorImportant` instead."),
27
+ /**
28
+ * @deprecated _Use `variant` instead._
29
+ *
30
+ * Choose between dense and tall variants.
31
+ *
32
+ * Defaults to **undefined**.
33
+ */
34
+ dividerHeight: e(r.string, "Divider", "Use `variant` instead."),
35
+ /**
36
+ * Set the border-style with default browser styles. In general, avoid using.
37
+ *
38
+ * Defaults to **empty string**.
39
+ */
40
+ dividerStyle: r.string,
41
+ /**
42
+ * The name of the desired Element color like 'primary'
43
+ *
44
+ * Defaults to **'on-surface-stroke'**.
45
+ */
46
+ themeColor: r.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"]),
47
+ /**
48
+ * @deprecated _No longer needed._
49
+ *
50
+ * In some cases `themeColor` may be inadvertently overridden by another style, this will ensure the selected color is applied.
51
+ *
52
+ * Defaults to **undefined**.
53
+ */
54
+ themeColorImportant: e(r.bool, "Divider", "No longer needed."),
55
+ /**
56
+ * Choose between dense and tall variants.
57
+ *
58
+ * Defaults to **'dense'**.
59
+ */
60
+ variant: r.oneOf(["dense", "tall"]),
61
+ /**
62
+ * Adds top and bottom margin.
63
+ *
64
+ * Defaults to **'none'**.
65
+ */
66
+ verticalMargin: r.oneOf(["none", "dense", "standard", "airy"])
67
+ }, $ = {
68
+ className: void 0,
69
+ dividerColor: void 0,
70
+ dividerColorImportant: void 0,
71
+ dividerHeight: void 0,
72
+ dividerStyle: "",
73
+ themeColor: "on-surface-stroke",
74
+ themeColorImportant: void 0,
75
+ variant: "dense",
76
+ verticalMargin: "none"
77
+ }, n = /* @__PURE__ */ P((t, c) => {
78
+ const {
79
+ dividerColor: l,
80
+ dividerColorImportant: m,
81
+ dividerHeight: y,
82
+ dividerStyle: i,
83
+ themeColor: p,
84
+ themeColorImportant: v,
85
+ variant: u,
86
+ className: g,
87
+ verticalMargin: a,
88
+ ...f
89
+ } = t, C = m || v, s = y || u, d = l || p, o = T();
90
+ H(c, () => o.current, []);
91
+ const h = D("lmnt", "lmnt-divider", C && "lmnt-divider--color-important", s && `lmnt-divider--${s}`, i && `lmnt-divider--${i}`, d && `lmnt-divider--${d}`, a && a !== "none" && `lmnt-divider--margin-${a}`, g);
92
+ return /* @__PURE__ */ N.createElement("hr", I({
93
+ ref: o,
94
+ className: h
95
+ }, f));
96
+ });
97
+ n.displayName = "Divider";
98
+ n.propTypes = _;
99
+ n.defaultProps = $;
100
+ export {
101
+ n as D
102
+ };