@hortiview/shared-components 2.26.0 → 2.26.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 (97) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/{AlertBanner-BFzaGOer.js → AlertBanner-C9TvBTkH.js} +3 -3
  3. package/dist/{GenericCard-grpa3KJR.js → GenericCard-2v0lBsVu.js} +3 -3
  4. package/dist/{ListAreaService-B0x97Jin.js → ListAreaService-PaN1DrXf.js} +5 -5
  5. package/dist/assets/FormSelect.css +1 -1
  6. package/dist/components/AlertBanner/AlertBanner.js +4 -4
  7. package/dist/components/AlertBanner/LinkBanner.js +3 -3
  8. package/dist/components/AllowedButton/AllowedButton.js +1 -1
  9. package/dist/components/AllowedIconButton/AllowedIconButton.js +1 -1
  10. package/dist/components/BaseView/BaseView.js +4 -4
  11. package/dist/components/BasicHeading/BasicHeading.js +4 -4
  12. package/dist/components/BlockView/BlockView.js +2 -2
  13. package/dist/components/ButtonCard/ButtonCard.js +3 -3
  14. package/dist/components/ChipCard/ChipCard.js +10 -10
  15. package/dist/components/ConfirmationModal/ConfirmationModal.js +3 -3
  16. package/dist/components/ContextMenu/ContextMenu.js +3 -3
  17. package/dist/components/DeleteModal/DeleteModal.js +4 -4
  18. package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
  19. package/dist/components/Disclaimer/Disclaimer.js +3 -3
  20. package/dist/components/EmptyView/EmptyView.js +3 -3
  21. package/dist/components/ErrorBanner/ErrorBanner.js +5 -5
  22. package/dist/components/Filter/Filter.js +6 -6
  23. package/dist/components/FloatingActionButton/FloatingActionButton.js +3 -3
  24. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  25. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +4 -4
  26. package/dist/components/FormComponents/FormNumber/CustomTextField.js +1 -1
  27. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  28. package/dist/components/FormComponents/FormSelect/FormSelect.js +104 -99
  29. package/dist/components/FormComponents/FormSelect/FormSelectService.d.ts +34 -0
  30. package/dist/components/FormComponents/FormSelect/FormSelectService.js +20 -0
  31. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
  32. package/dist/components/FormComponents/FormSlider/FormSlider.js +6 -6
  33. package/dist/components/FormComponents/FormText/FormText.js +2 -2
  34. package/dist/components/FormComponents/FormToggle/FormToggle.js +3 -3
  35. package/dist/components/GenericTable/GenericTable.js +5349 -5409
  36. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
  37. package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
  38. package/dist/components/HashTabView/HashTabView.js +6 -6
  39. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  40. package/dist/components/Iconify/Iconify.js +1 -1
  41. package/dist/components/InfoCard/InfoCard.js +4 -4
  42. package/dist/components/InfoGroup/InfoGroup.js +3 -3
  43. package/dist/components/ListArea/ListArea.js +5 -5
  44. package/dist/components/ListArea/ListAreaService.js +6 -6
  45. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
  46. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +5 -5
  47. package/dist/components/Modal/Modal.js +150 -142
  48. package/dist/components/ModulePadding/ModulePadding.js +1 -1
  49. package/dist/components/OfflineView/OfflineView.js +3 -3
  50. package/dist/components/OnboardingBanner/OnboardingBanner.js +7 -7
  51. package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
  52. package/dist/components/SearchBar/SearchBar.js +2 -2
  53. package/dist/components/Select/Select.js +1 -1
  54. package/dist/components/Stepper/Stepper.js +1 -1
  55. package/dist/components/Stepper/components/StepperButton.js +1 -1
  56. package/dist/components/Stepper/components/StepperHeader.js +2 -2
  57. package/dist/components/Stepper/components/StepperItem.js +2 -2
  58. package/dist/{defineProperty-B7N9EBBI.js → defineProperty-SoB5opr-.js} +51 -51
  59. package/dist/{es.string.iterator-DBx2A42F.js → es.string.iterator-BrOvr7F6.js} +78 -78
  60. package/dist/{find-eU9ab_u7.js → find-OaLSg5iu.js} +35 -35
  61. package/dist/includes-CSD_V_RY.js +112 -0
  62. package/dist/{index-Df2FYN-K.js → index-_-9ybP20.js} +76 -76
  63. package/dist/{index.es-C27R5Xae.js → index.es-0SkNh4dU.js} +2 -2
  64. package/dist/{index.es-B19PQgzU.js → index.es-B1cewJEy.js} +4 -4
  65. package/dist/{index.es-Z0aF-7Cn.js → index.es-BE1XL1dD.js} +3 -3
  66. package/dist/{index.es-BcnmoCEg.js → index.es-BSaDtduL.js} +6 -6
  67. package/dist/{index.es-Ci3O23C_.js → index.es-BVW2k-5y.js} +4 -4
  68. package/dist/index.es-BZkGOjEo.js +383 -0
  69. package/dist/{index.es-Cr1PSTyq.js → index.es-C2ejWpji.js} +3 -3
  70. package/dist/{index.es-DgncYOqO.js → index.es-C8AExypY.js} +2 -2
  71. package/dist/{index.es-BOvO8moE.js → index.es-CNrSvjAv.js} +5 -6
  72. package/dist/{index.es-l_3PNohs.js → index.es-CTKwa3Es.js} +1 -1
  73. package/dist/{index.es-BwafUoK3.js → index.es-CVPUG1pf.js} +785 -781
  74. package/dist/index.es-CpPnZRt7.js +604 -0
  75. package/dist/{index.es-DHoIQ8lu.js → index.es-CwgwR6SB.js} +1 -1
  76. package/dist/{index.es-BOG3_7IM.js → index.es-DHL1mFb3.js} +249 -317
  77. package/dist/{index.es-DHnCVuQ8.js → index.es-DPGGEmi5.js} +5 -5
  78. package/dist/{index.es-C6I3L4U4.js → index.es-DRC-9PLs.js} +43 -43
  79. package/dist/{index.es-C2IOpX7R.js → index.es-DVgCBhVx.js} +3020 -2798
  80. package/dist/{index.es-B9BUXRQn.js → index.es-DsOSfaF5.js} +39 -39
  81. package/dist/{index.es-DUrjyxNI.js → index.es-EXzC8zuP.js} +2 -2
  82. package/dist/index.es-LckFzDz-.js +1069 -0
  83. package/dist/{index.es-DdeCB7LW.js → index.es-Pc5KKhcb.js} +1 -1
  84. package/dist/{index.es-Cg57snrN.js → index.es-_PSuLbjQ.js} +15 -16
  85. package/dist/{index.es-DhlgTSuU.js → index.es-eZDofmng.js} +10 -13
  86. package/dist/{keyboard-DbG3oyPU.js → keyboard-DQ9O_Ke1.js} +21 -21
  87. package/dist/main.js +1 -1
  88. package/dist/{map-ZSVweMI1.js → map-BErBeya5.js} +85 -85
  89. package/dist/parse-int-BYd7r_4n.js +47 -0
  90. package/dist/{slicedToArray-DC6VAZtW.js → slicedToArray-C2Ed3239.js} +67 -67
  91. package/dist/string-trim-v5pkXsl2.js +32 -0
  92. package/package.json +4 -4
  93. package/dist/correct-is-regexp-logic-BJ-OWRrn.js +0 -44
  94. package/dist/index.es-CkB4776y.js +0 -391
  95. package/dist/index.es-D1iB_QlE.js +0 -608
  96. package/dist/index.es-DEBGoIKX.js +0 -1061
  97. package/dist/parse-int-CGpIXMGa.js +0 -75
@@ -0,0 +1,604 @@
1
+ import { _ as w, a as L, c as x, P as i, b as Y, d as Te } from "./index-_-9ybP20.js";
2
+ import c, { forwardRef as M, useRef as N, useImperativeHandle as B, useEffect as P, useState as ae, useMemo as Le, useCallback as H, Fragment as Z } from "react";
3
+ import { b as j, c as S } from "./tslib.es6-BDCynO9F.js";
4
+ import { M as se, a as le } from "./component-By6nyiBU.js";
5
+ import { e as Pe } from "./component-DYpB_4EP.js";
6
+ import { _ as Ae, a as ee, b as $e, c as De, d as de, e as te, f as Re } from "./defineProperty-SoB5opr-.js";
7
+ import { P as ke, _ as ne } from "./index.es-CNrSvjAv.js";
8
+ import { _ as ce } from "./slicedToArray-C2Ed3239.js";
9
+ import { e as ue, u as xe, _ as oe, i as Fe, c as He } from "./index.es-DRC-9PLs.js";
10
+ import { c as Ie } from "./index.es-LckFzDz-.js";
11
+ var Se = {
12
+ LABEL_FLOAT_ABOVE: "mdc-floating-label--float-above",
13
+ LABEL_REQUIRED: "mdc-floating-label--required",
14
+ LABEL_SHAKE: "mdc-floating-label--shake",
15
+ ROOT: "mdc-floating-label"
16
+ };
17
+ var pe = (
18
+ /** @class */
19
+ (function(n) {
20
+ j(t, n);
21
+ function t(e) {
22
+ var o = n.call(this, S(S({}, t.defaultAdapter), e)) || this;
23
+ return o.shakeAnimationEndHandler_ = function() {
24
+ return o.handleShakeAnimationEnd_();
25
+ }, o;
26
+ }
27
+ return Object.defineProperty(t, "cssClasses", {
28
+ get: function() {
29
+ return Se;
30
+ },
31
+ enumerable: !1,
32
+ configurable: !0
33
+ }), Object.defineProperty(t, "defaultAdapter", {
34
+ /**
35
+ * See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.
36
+ */
37
+ get: function() {
38
+ return {
39
+ addClass: function() {
40
+ },
41
+ removeClass: function() {
42
+ },
43
+ getWidth: function() {
44
+ return 0;
45
+ },
46
+ registerInteractionHandler: function() {
47
+ },
48
+ deregisterInteractionHandler: function() {
49
+ }
50
+ };
51
+ },
52
+ enumerable: !1,
53
+ configurable: !0
54
+ }), t.prototype.init = function() {
55
+ this.adapter.registerInteractionHandler("animationend", this.shakeAnimationEndHandler_);
56
+ }, t.prototype.destroy = function() {
57
+ this.adapter.deregisterInteractionHandler("animationend", this.shakeAnimationEndHandler_);
58
+ }, t.prototype.getWidth = function() {
59
+ return this.adapter.getWidth();
60
+ }, t.prototype.shake = function(e) {
61
+ var o = t.cssClasses.LABEL_SHAKE;
62
+ e ? this.adapter.addClass(o) : this.adapter.removeClass(o);
63
+ }, t.prototype.float = function(e) {
64
+ var o = t.cssClasses, r = o.LABEL_FLOAT_ABOVE, a = o.LABEL_SHAKE;
65
+ e ? this.adapter.addClass(r) : (this.adapter.removeClass(r), this.adapter.removeClass(a));
66
+ }, t.prototype.setRequired = function(e) {
67
+ var o = t.cssClasses.LABEL_REQUIRED;
68
+ e ? this.adapter.addClass(o) : this.adapter.removeClass(o);
69
+ }, t.prototype.handleShakeAnimationEnd_ = function() {
70
+ var e = t.cssClasses.LABEL_SHAKE;
71
+ this.adapter.removeClass(e);
72
+ }, t;
73
+ })(se)
74
+ );
75
+ var we = (
76
+ /** @class */
77
+ (function(n) {
78
+ j(t, n);
79
+ function t() {
80
+ return n !== null && n.apply(this, arguments) || this;
81
+ }
82
+ return t.attachTo = function(e) {
83
+ return new t(e);
84
+ }, t.prototype.shake = function(e) {
85
+ this.foundation.shake(e);
86
+ }, t.prototype.float = function(e) {
87
+ this.foundation.float(e);
88
+ }, t.prototype.setRequired = function(e) {
89
+ this.foundation.setRequired(e);
90
+ }, t.prototype.getWidth = function() {
91
+ return this.foundation.getWidth();
92
+ }, t.prototype.getDefaultFoundation = function() {
93
+ var e = this, o = {
94
+ addClass: function(r) {
95
+ return e.root.classList.add(r);
96
+ },
97
+ removeClass: function(r) {
98
+ return e.root.classList.remove(r);
99
+ },
100
+ getWidth: function() {
101
+ return Pe(e.root);
102
+ },
103
+ registerInteractionHandler: function(r, a) {
104
+ return e.listen(r, a);
105
+ },
106
+ deregisterInteractionHandler: function(r, a) {
107
+ return e.unlisten(r, a);
108
+ }
109
+ };
110
+ return new pe(o);
111
+ }, t;
112
+ })(le)
113
+ );
114
+ var fe = {
115
+ NOTCH_ELEMENT_SELECTOR: ".mdc-notched-outline__notch"
116
+ }, re = {
117
+ // This should stay in sync with $mdc-notched-outline-padding * 2.
118
+ NOTCH_ELEMENT_PADDING: 8
119
+ }, q = {
120
+ NO_LABEL: "mdc-notched-outline--no-label",
121
+ OUTLINE_NOTCHED: "mdc-notched-outline--notched",
122
+ OUTLINE_UPGRADED: "mdc-notched-outline--upgraded"
123
+ };
124
+ var Me = (
125
+ /** @class */
126
+ (function(n) {
127
+ j(t, n);
128
+ function t(e) {
129
+ return n.call(this, S(S({}, t.defaultAdapter), e)) || this;
130
+ }
131
+ return Object.defineProperty(t, "strings", {
132
+ get: function() {
133
+ return fe;
134
+ },
135
+ enumerable: !1,
136
+ configurable: !0
137
+ }), Object.defineProperty(t, "cssClasses", {
138
+ get: function() {
139
+ return q;
140
+ },
141
+ enumerable: !1,
142
+ configurable: !0
143
+ }), Object.defineProperty(t, "numbers", {
144
+ get: function() {
145
+ return re;
146
+ },
147
+ enumerable: !1,
148
+ configurable: !0
149
+ }), Object.defineProperty(t, "defaultAdapter", {
150
+ /**
151
+ * See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types.
152
+ */
153
+ get: function() {
154
+ return {
155
+ addClass: function() {
156
+ },
157
+ removeClass: function() {
158
+ },
159
+ setNotchWidthProperty: function() {
160
+ },
161
+ removeNotchWidthProperty: function() {
162
+ }
163
+ };
164
+ },
165
+ enumerable: !1,
166
+ configurable: !0
167
+ }), t.prototype.notch = function(e) {
168
+ var o = t.cssClasses.OUTLINE_NOTCHED;
169
+ e > 0 && (e += re.NOTCH_ELEMENT_PADDING), this.adapter.setNotchWidthProperty(e), this.adapter.addClass(o);
170
+ }, t.prototype.closeNotch = function() {
171
+ var e = t.cssClasses.OUTLINE_NOTCHED;
172
+ this.adapter.removeClass(e), this.adapter.removeNotchWidthProperty();
173
+ }, t;
174
+ })(se)
175
+ );
176
+ var Be = (
177
+ /** @class */
178
+ (function(n) {
179
+ j(t, n);
180
+ function t() {
181
+ return n !== null && n.apply(this, arguments) || this;
182
+ }
183
+ return t.attachTo = function(e) {
184
+ return new t(e);
185
+ }, t.prototype.initialSyncWithDOM = function() {
186
+ this.notchElement_ = this.root.querySelector(fe.NOTCH_ELEMENT_SELECTOR);
187
+ var e = this.root.querySelector("." + pe.cssClasses.ROOT);
188
+ e ? (e.style.transitionDuration = "0s", this.root.classList.add(q.OUTLINE_UPGRADED), requestAnimationFrame(function() {
189
+ e.style.transitionDuration = "";
190
+ })) : this.root.classList.add(q.NO_LABEL);
191
+ }, t.prototype.notch = function(e) {
192
+ this.foundation.notch(e);
193
+ }, t.prototype.closeNotch = function() {
194
+ this.foundation.closeNotch();
195
+ }, t.prototype.getDefaultFoundation = function() {
196
+ var e = this, o = {
197
+ addClass: function(r) {
198
+ return e.root.classList.add(r);
199
+ },
200
+ removeClass: function(r) {
201
+ return e.root.classList.remove(r);
202
+ },
203
+ setNotchWidthProperty: function(r) {
204
+ return e.notchElement_.style.setProperty("width", r + "px");
205
+ },
206
+ removeNotchWidthProperty: function() {
207
+ return e.notchElement_.style.removeProperty("width");
208
+ }
209
+ };
210
+ return new Me(o);
211
+ }, t;
212
+ })(le)
213
+ ), je = {
214
+ /**
215
+ * Content to be rendered inside the label. Expects a string, though accepts any valid markup.
216
+ *
217
+ * Defaults to **null**.
218
+ */
219
+ children: i.node.isRequired,
220
+ /**
221
+ * The css class name to be passed through to the component markup.
222
+ *
223
+ * Defaults to **undefined**.
224
+ */
225
+ className: i.string,
226
+ /**
227
+ * The label will appear in the floating state.
228
+ *
229
+ * Defaults to **false**.
230
+ */
231
+ float: i.bool,
232
+ /**
233
+ * The id of the component to trigger on active
234
+ *
235
+ * Defaults to **empty string**.
236
+ */
237
+ htmlFor: i.string,
238
+ /**
239
+ * The label will shake briefly when set.
240
+ *
241
+ * Defaults to **false**.
242
+ */
243
+ shake: i.bool
244
+ }, We = {
245
+ children: null,
246
+ className: void 0
247
+ }, Ue = ["children", "htmlFor", "shake", "float", "className", "style"], U = We, he = /* @__PURE__ */ M(function(n, t) {
248
+ var e = n.children, o = e === void 0 ? U.children : e, r = n.htmlFor, a = r === void 0 ? "" : r, u = n.shake, _ = u === void 0 ? !1 : u, p = n.float, f = p === void 0 ? !1 : p, h = n.className, y = h === void 0 ? U.className : h, g = n.style, s = g === void 0 ? U.style : g, d = w(n, Ue), E = N(), C = o, b = N();
249
+ return B(t, function() {
250
+ return b.current;
251
+ }, []), P(function() {
252
+ return E.current = we.attachTo(b.current), function() {
253
+ E.current.destroy();
254
+ };
255
+ }), P(function() {
256
+ E.current.float(f);
257
+ }, [f]), /* @__PURE__ */ c.createElement("label", L({
258
+ ref: b,
259
+ htmlFor: a,
260
+ className: x("lmnt", "mdc-floating-label", f && "mdc-floating-label--float-above", _ && "mdc-floating-label--shake", y)
261
+ }, d, {
262
+ style: s
263
+ }), C);
264
+ });
265
+ he.displayName = "FloatingLabel";
266
+ he.propTypes = je;
267
+ var qe = {
268
+ /**
269
+ * Content to be rendered inside the notched outline. Accepts a string.
270
+ *
271
+ * Defaults to **null**.
272
+ */
273
+ children: i.node,
274
+ /**
275
+ * The css class name to be passed through to the component markup.
276
+ *
277
+ * Defaults to **undefined**.
278
+ */
279
+ className: i.string,
280
+ /**
281
+ * Determines if the notch is opened or closed.
282
+ *
283
+ * Defaults to **undefined**.
284
+ */
285
+ closed: i.bool,
286
+ /**
287
+ * Keep the outline, but prevent the notch (and label from showing up).
288
+ *
289
+ * Defaults to **undefined**.
290
+ */
291
+ outlineOnly: i.bool,
292
+ /**
293
+ *
294
+ *
295
+ * Defaults to **null**.
296
+ */
297
+ width: i.number
298
+ }, Ke = {
299
+ children: null,
300
+ className: void 0,
301
+ closed: void 0,
302
+ outlineOnly: void 0,
303
+ width: null
304
+ }, Ge = ["closed", "className", "children", "outlineOnly", "width"], R = Ke, me = /* @__PURE__ */ M(function(n, t) {
305
+ var e = n.closed, o = e === void 0 ? R.closed : e, r = n.className, a = r === void 0 ? R.className : r, u = n.children, _ = u === void 0 ? R.children : u, p = n.outlineOnly, f = p === void 0 ? R.outlineOnly : p, h = n.width, y = h === void 0 ? R.width : h, g = w(n, Ge), s = N(), d = N();
306
+ return B(t, function() {
307
+ return s.current;
308
+ }, []), P(function() {
309
+ return d.current = Be.attachTo(s.current), function() {
310
+ d.current.destroy();
311
+ };
312
+ }, []), P(function() {
313
+ o !== void 0 && (o ? d.current.closeNotch() : d.current.notch());
314
+ }, [o]), P(function() {
315
+ y ? d.current.foundation.adapter.setNotchWidthProperty(y) : d.current.foundation.adapter.removeNotchWidthProperty();
316
+ }, [y]), /* @__PURE__ */ c.createElement("div", L({
317
+ className: x("lmnt", "mdc-notched-outline", a),
318
+ ref: s
319
+ }, g), /* @__PURE__ */ c.createElement("div", {
320
+ className: "mdc-notched-outline__leading"
321
+ }), !f && /* @__PURE__ */ c.createElement("div", {
322
+ className: "mdc-notched-outline__notch"
323
+ }, _), /* @__PURE__ */ c.createElement("div", {
324
+ className: "mdc-notched-outline__trailing"
325
+ }));
326
+ });
327
+ me.displayName = "NotchedOutline";
328
+ me.propTypes = qe;
329
+ var Qe = {
330
+ /**
331
+ * Accepts any valid markup. This will be rendered before any value set with the `text` prop. For most use-cases use `text`.
332
+ *
333
+ * Defaults to **undefined**.
334
+ */
335
+ children: i.node.isRequired,
336
+ /**
337
+ * The css class name to be passed through to the component markup.
338
+ *
339
+ * Defaults to **undefined**.
340
+ */
341
+ className: i.string,
342
+ /**
343
+ * Container display type, inline or block.
344
+ *
345
+ * Defaults to **'inline'**.
346
+ */
347
+ containerType: i.oneOf(["inline", "block"]),
348
+ /**
349
+ * Whether or not the tooltip is hoisted to render outside of the parent element. Useful for when the tooltip needs to render in a parent with `overflow: hidden` ie. a table cell.
350
+ *
351
+ * Defaults to **false**.
352
+ */
353
+ hoisted: i.bool,
354
+ /**
355
+ * Randomly generated id. May be overwritten.
356
+ *
357
+ * Defaults to **undefined**.
358
+ */
359
+ id: i.string,
360
+ /**
361
+ * Fired when the trigger is interacted with.
362
+ *
363
+ * Defaults to **null**.
364
+ */
365
+ onClick: i.func,
366
+ /**
367
+ * The DOM element the children will render in. If a string is sent it should be a valid DOM query selector. If one is not sent, Portal will default to `document.body`.
368
+ *
369
+ * Defaults to **'document.body'**.
370
+ */
371
+ portalContainer: i.oneOfType([i.string, i.node]),
372
+ /**
373
+ * Position of tooltip. Options include: 'top', 'left', 'right', and 'bottom'(default).
374
+ *
375
+ * Defaults to **'bottom'**.
376
+ */
377
+ position: i.oneOf(["bottom", "top", "left", "right"]),
378
+ /**
379
+ * string
380
+ *
381
+ * Defaults to **null**.
382
+ */
383
+ text: i.oneOfType([i.string, i.func, i.node]).isRequired,
384
+ /**
385
+ * Custom properties to apply to the hovering element.
386
+ *
387
+ * Defaults to **null**.
388
+ */
389
+ tooltipProps: i.object,
390
+ /**
391
+ * Custom properties to apply to the trigger element.
392
+ *
393
+ * Defaults to **null**.
394
+ */
395
+ triggerProps: i.object
396
+ }, Ve = {
397
+ children: void 0,
398
+ className: void 0,
399
+ containerType: "inline",
400
+ hoisted: !1,
401
+ id: void 0,
402
+ onClick: null,
403
+ portalContainer: "document.body",
404
+ position: "bottom",
405
+ text: null,
406
+ tooltipProps: null,
407
+ triggerProps: null
408
+ }, ze = {
409
+ /**
410
+ * The css class name to be passed through to the component markup.
411
+ *
412
+ * Defaults to **undefined**.
413
+ */
414
+ className: i.string,
415
+ /**
416
+ * Whether or not the tooltip is hoisted to render outside of the parent element. Useful for when the tooltip needs to render in a parent with `overflow: hidden` ie. a table cell.
417
+ *
418
+ * Defaults to **false**.
419
+ */
420
+ hoisted: i.bool,
421
+ /**
422
+ * Randomly generated id. May be overwritten.
423
+ *
424
+ * Defaults to **undefined**.
425
+ */
426
+ id: i.string,
427
+ /**
428
+ * The DOM element the children will render in. If a string is sent it should be a valid DOM query selector. If one is not sent, Portal will default to `document.body`.
429
+ *
430
+ * Defaults to **'document.body'**.
431
+ */
432
+ portalContainer: i.oneOfType([i.string, i.node]),
433
+ /**
434
+ * The text to be rendered inside of the Tooltip.
435
+ *
436
+ * Defaults to **null**.
437
+ */
438
+ text: i.oneOfType([i.string, i.func, i.node]).isRequired
439
+ }, Je = {
440
+ className: void 0,
441
+ hoisted: !1,
442
+ id: void 0,
443
+ portalContainer: "document.body",
444
+ text: null
445
+ }, Xe = ["className", "hoisted", "id", "portalContainer", "text"], k = Je, K = /* @__PURE__ */ M(function(n, t) {
446
+ var e = n.className, o = e === void 0 ? k.className : e, r = n.hoisted, a = r === void 0 ? k.hoisted : r, u = n.id, _ = u === void 0 ? k.id : u, p = n.portalContainer, f = p === void 0 ? k.portalContainer : p, h = n.text, y = h === void 0 ? k.text : h, g = w(n, Xe), s = ae(function() {
447
+ return _ || ue();
448
+ }), d = ce(s, 1), E = d[0], C = N();
449
+ B(t, function() {
450
+ return C.current;
451
+ }, []);
452
+ var b = Le(function() {
453
+ return x(["lmnt", o, "lmnt-tooltip__text-content", "mdc-typography--caption"]);
454
+ }, [o]);
455
+ return /* @__PURE__ */ c.createElement(ke, {
456
+ disabled: !a,
457
+ container: f
458
+ }, /* @__PURE__ */ c.createElement("div", L({
459
+ role: "tooltip",
460
+ id: E,
461
+ className: b
462
+ }, g, {
463
+ ref: C
464
+ }), y));
465
+ });
466
+ K.displayName = "TooltipText";
467
+ K.propTypes = ze;
468
+ var Ye = ["children", "className", "containerType", "hoisted", "id", "onClick", "portalContainer", "position", "text", "tooltipProps", "triggerProps"];
469
+ function ie(n, t) {
470
+ var e = Te(n);
471
+ if (te) {
472
+ var o = te(n);
473
+ t && (o = Re(o).call(o, function(r) {
474
+ return de(n, r).enumerable;
475
+ })), e.push.apply(e, o);
476
+ }
477
+ return e;
478
+ }
479
+ function I(n) {
480
+ for (var t = 1; t < arguments.length; t++) {
481
+ var e, o, r = arguments[t] != null ? arguments[t] : {};
482
+ t % 2 ? Y(e = ie(Object(r), !0)).call(e, function(a) {
483
+ Ae(n, a, r[a]);
484
+ }) : ee ? $e(n, ee(r)) : Y(o = ie(Object(r))).call(o, function(a) {
485
+ De(n, a, de(r, a));
486
+ });
487
+ }
488
+ return n;
489
+ }
490
+ var v = Ve, Ze = function(t) {
491
+ var e = t.children, o = t.idActual;
492
+ if (!e) return null;
493
+ var r = e === Z || e?.type === Z;
494
+ return typeof e == "string" || r ? /* @__PURE__ */ c.createElement("span", {
495
+ "aria-describedby": o
496
+ }, e) : He(e, {
497
+ "aria-describedby": o
498
+ });
499
+ }, ve = /* @__PURE__ */ M(function(n, t) {
500
+ var e = n.children, o = e === void 0 ? v.children : e, r = n.className, a = r === void 0 ? v.className : r, u = n.containerType, _ = u === void 0 ? v.containerType : u, p = n.hoisted, f = p === void 0 ? v.hoisted : p, h = n.id, y = h === void 0 ? v.id : h, g = n.onClick, s = g === void 0 ? v.onClick : g, d = n.portalContainer, E = d === void 0 ? v.portalContainer : d, C = n.position, b = C === void 0 ? v.position : C, G = n.text, A = G === void 0 ? v.text : G, Q = n.tooltipProps, ye = Q === void 0 ? v.tooltipProps : Q, V = n.triggerProps, ge = V === void 0 ? v.triggerProps : V, _e = w(n, Ye), W = N(), O = N(), $ = N();
501
+ B(t, function() {
502
+ return O.current;
503
+ }, []);
504
+ var be = ae(function() {
505
+ return y || ue();
506
+ }), Ne = ce(be, 1), F = Ne[0], Ee = H(function() {
507
+ s?.();
508
+ }, [s]), Ce = H(function(l) {
509
+ l.key === "Enter" && s?.();
510
+ }, [s]);
511
+ xe(function() {
512
+ var l = [{
513
+ name: "flip",
514
+ options: {
515
+ enabled: !0,
516
+ padding: {
517
+ bottom: 32,
518
+ top: 32
519
+ }
520
+ }
521
+ }];
522
+ return f ? l.push({
523
+ name: "offset",
524
+ options: {
525
+ offset: [0, 6]
526
+ }
527
+ }) : l.push({
528
+ name: "offset",
529
+ options: {
530
+ offset: [0, 12]
531
+ }
532
+ }), W.current && O.current && ($.current = Ie(W.current, O.current, {
533
+ placement: b,
534
+ modifiers: l
535
+ })), function() {
536
+ var m;
537
+ (m = $.current) === null || m === void 0 || m.destroy();
538
+ };
539
+ }, [b, f]);
540
+ var z = H(function() {
541
+ var l, m, T;
542
+ (l = O.current) === null || l === void 0 || l.setAttribute("data-show", ""), (m = $.current) === null || m === void 0 || m.setOptions(function(D) {
543
+ var X;
544
+ return I(I({}, D), {}, {
545
+ modifiers: oe(X = []).call(X, ne(D.modifiers), [{
546
+ name: "eventListeners",
547
+ enabled: !0
548
+ }])
549
+ });
550
+ }), (T = $.current) === null || T === void 0 || T.update();
551
+ }, []), J = H(function() {
552
+ var l, m;
553
+ (l = O.current) === null || l === void 0 || l.removeAttribute("data-show"), (m = $.current) === null || m === void 0 || m.setOptions(function(T) {
554
+ var D;
555
+ return I(I({}, T), {}, {
556
+ modifiers: oe(D = []).call(D, ne(T.modifiers), [{
557
+ name: "eventListeners",
558
+ enabled: !1
559
+ }])
560
+ });
561
+ });
562
+ }, []);
563
+ P(function() {
564
+ var l = "Tooltips should only include short text for additional context and should not exceed three lines visually. (Toolitip ID ".concat(F, ").");
565
+ A && A.length > 100 && Fe(l);
566
+ }, [A, F]);
567
+ var Oe = s ? {
568
+ tabIndex: 0,
569
+ role: s ? "button" : "note",
570
+ onKeyPress: Ce,
571
+ onClick: Ee
572
+ } : {};
573
+ return /* @__PURE__ */ c.createElement("span", L({
574
+ className: x("lmnt lmnt-tooltip", _ === "block" ? "lmnt-tooltip--block" : "lmnt-tooltip--inline")
575
+ }, Oe, _e), /* @__PURE__ */ c.createElement("span", L({
576
+ className: x("lmnt-tooltip__content", _ === "block" ? "lmnt-tooltip--block" : "lmnt-tooltip--inline")
577
+ }, ge, {
578
+ ref: W,
579
+ onMouseEnter: z,
580
+ onFocus: z,
581
+ onMouseLeave: J,
582
+ onBlur: J
583
+ }), /* @__PURE__ */ c.createElement(Ze, {
584
+ idActual: F
585
+ }, o)), A && /* @__PURE__ */ c.createElement(K, L({
586
+ hoisted: f,
587
+ portalContainer: E,
588
+ role: "tooltip",
589
+ id: F,
590
+ className: a
591
+ }, ye, {
592
+ ref: O,
593
+ text: A
594
+ })));
595
+ });
596
+ ve.displayName = "Tooltip";
597
+ ve.propTypes = Qe;
598
+ export {
599
+ he as F,
600
+ we as M,
601
+ me as N,
602
+ K as T,
603
+ Be as a
604
+ };
@@ -1,5 +1,5 @@
1
1
  import { forwardRef as R, useRef as m, useImperativeHandle as s, useEffect as v } from "react";
2
- import { P as o } from "./index-Df2FYN-K.js";
2
+ import { P as o } from "./index-_-9ybP20.js";
3
3
  import { M as b } from "./component-DYpB_4EP.js";
4
4
  var h = {
5
5
  /**