@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.
- package/CHANGELOG.md +34 -0
- package/dist/{AlertBanner-BFzaGOer.js → AlertBanner-C9TvBTkH.js} +3 -3
- package/dist/{GenericCard-grpa3KJR.js → GenericCard-2v0lBsVu.js} +3 -3
- package/dist/{ListAreaService-B0x97Jin.js → ListAreaService-PaN1DrXf.js} +5 -5
- package/dist/assets/FormSelect.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +4 -4
- package/dist/components/AlertBanner/LinkBanner.js +3 -3
- package/dist/components/AllowedButton/AllowedButton.js +1 -1
- package/dist/components/AllowedIconButton/AllowedIconButton.js +1 -1
- package/dist/components/BaseView/BaseView.js +4 -4
- package/dist/components/BasicHeading/BasicHeading.js +4 -4
- package/dist/components/BlockView/BlockView.js +2 -2
- package/dist/components/ButtonCard/ButtonCard.js +3 -3
- package/dist/components/ChipCard/ChipCard.js +10 -10
- package/dist/components/ConfirmationModal/ConfirmationModal.js +3 -3
- package/dist/components/ContextMenu/ContextMenu.js +3 -3
- package/dist/components/DeleteModal/DeleteModal.js +4 -4
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/EmptyView/EmptyView.js +3 -3
- package/dist/components/ErrorBanner/ErrorBanner.js +5 -5
- package/dist/components/Filter/Filter.js +6 -6
- package/dist/components/FloatingActionButton/FloatingActionButton.js +3 -3
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +4 -4
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +1 -1
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +104 -99
- package/dist/components/FormComponents/FormSelect/FormSelectService.d.ts +34 -0
- package/dist/components/FormComponents/FormSelect/FormSelectService.js +20 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +6 -6
- package/dist/components/FormComponents/FormText/FormText.js +2 -2
- package/dist/components/FormComponents/FormToggle/FormToggle.js +3 -3
- package/dist/components/GenericTable/GenericTable.js +5349 -5409
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
- package/dist/components/HashTabView/HashTabView.js +6 -6
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/Iconify/Iconify.js +1 -1
- package/dist/components/InfoCard/InfoCard.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.js +3 -3
- package/dist/components/ListArea/ListArea.js +5 -5
- package/dist/components/ListArea/ListAreaService.js +6 -6
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +5 -5
- package/dist/components/Modal/Modal.js +150 -142
- package/dist/components/ModulePadding/ModulePadding.js +1 -1
- package/dist/components/OfflineView/OfflineView.js +3 -3
- package/dist/components/OnboardingBanner/OnboardingBanner.js +7 -7
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/StepperButton.js +1 -1
- package/dist/components/Stepper/components/StepperHeader.js +2 -2
- package/dist/components/Stepper/components/StepperItem.js +2 -2
- package/dist/{defineProperty-B7N9EBBI.js → defineProperty-SoB5opr-.js} +51 -51
- package/dist/{es.string.iterator-DBx2A42F.js → es.string.iterator-BrOvr7F6.js} +78 -78
- package/dist/{find-eU9ab_u7.js → find-OaLSg5iu.js} +35 -35
- package/dist/includes-CSD_V_RY.js +112 -0
- package/dist/{index-Df2FYN-K.js → index-_-9ybP20.js} +76 -76
- package/dist/{index.es-C27R5Xae.js → index.es-0SkNh4dU.js} +2 -2
- package/dist/{index.es-B19PQgzU.js → index.es-B1cewJEy.js} +4 -4
- package/dist/{index.es-Z0aF-7Cn.js → index.es-BE1XL1dD.js} +3 -3
- package/dist/{index.es-BcnmoCEg.js → index.es-BSaDtduL.js} +6 -6
- package/dist/{index.es-Ci3O23C_.js → index.es-BVW2k-5y.js} +4 -4
- package/dist/index.es-BZkGOjEo.js +383 -0
- package/dist/{index.es-Cr1PSTyq.js → index.es-C2ejWpji.js} +3 -3
- package/dist/{index.es-DgncYOqO.js → index.es-C8AExypY.js} +2 -2
- package/dist/{index.es-BOvO8moE.js → index.es-CNrSvjAv.js} +5 -6
- package/dist/{index.es-l_3PNohs.js → index.es-CTKwa3Es.js} +1 -1
- package/dist/{index.es-BwafUoK3.js → index.es-CVPUG1pf.js} +785 -781
- package/dist/index.es-CpPnZRt7.js +604 -0
- package/dist/{index.es-DHoIQ8lu.js → index.es-CwgwR6SB.js} +1 -1
- package/dist/{index.es-BOG3_7IM.js → index.es-DHL1mFb3.js} +249 -317
- package/dist/{index.es-DHnCVuQ8.js → index.es-DPGGEmi5.js} +5 -5
- package/dist/{index.es-C6I3L4U4.js → index.es-DRC-9PLs.js} +43 -43
- package/dist/{index.es-C2IOpX7R.js → index.es-DVgCBhVx.js} +3020 -2798
- package/dist/{index.es-B9BUXRQn.js → index.es-DsOSfaF5.js} +39 -39
- package/dist/{index.es-DUrjyxNI.js → index.es-EXzC8zuP.js} +2 -2
- package/dist/index.es-LckFzDz-.js +1069 -0
- package/dist/{index.es-DdeCB7LW.js → index.es-Pc5KKhcb.js} +1 -1
- package/dist/{index.es-Cg57snrN.js → index.es-_PSuLbjQ.js} +15 -16
- package/dist/{index.es-DhlgTSuU.js → index.es-eZDofmng.js} +10 -13
- package/dist/{keyboard-DbG3oyPU.js → keyboard-DQ9O_Ke1.js} +21 -21
- package/dist/main.js +1 -1
- package/dist/{map-ZSVweMI1.js → map-BErBeya5.js} +85 -85
- package/dist/parse-int-BYd7r_4n.js +47 -0
- package/dist/{slicedToArray-DC6VAZtW.js → slicedToArray-C2Ed3239.js} +67 -67
- package/dist/string-trim-v5pkXsl2.js +32 -0
- package/package.json +4 -4
- package/dist/correct-is-regexp-logic-BJ-OWRrn.js +0 -44
- package/dist/index.es-CkB4776y.js +0 -391
- package/dist/index.es-D1iB_QlE.js +0 -608
- package/dist/index.es-DEBGoIKX.js +0 -1061
- package/dist/parse-int-CGpIXMGa.js +0 -75
|
@@ -1,608 +0,0 @@
|
|
|
1
|
-
import { _ as w, a as P, c as H, P as i, b as Z, d as Ae } from "./index-Df2FYN-K.js";
|
|
2
|
-
import d, { forwardRef as M, useRef as N, useImperativeHandle as B, useEffect as A, useState as se, useMemo as le, useCallback as k, Fragment as ee } from "react";
|
|
3
|
-
import { b as j, c as S } from "./tslib.es6-BDCynO9F.js";
|
|
4
|
-
import { M as ce, a as de } from "./component-By6nyiBU.js";
|
|
5
|
-
import { e as $e } from "./component-DYpB_4EP.js";
|
|
6
|
-
import { _ as De, a as te, b as Re, c as ke, d as ue, e as ne, f as xe } from "./defineProperty-B7N9EBBI.js";
|
|
7
|
-
import { P as Fe, _ as oe } from "./index.es-BOvO8moE.js";
|
|
8
|
-
import { _ as pe } from "./slicedToArray-DC6VAZtW.js";
|
|
9
|
-
import { e as fe, u as He, _ as re, i as Ie, c as Se } from "./index.es-C6I3L4U4.js";
|
|
10
|
-
import { c as we } from "./index.es-DEBGoIKX.js";
|
|
11
|
-
var Me = {
|
|
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 he = (
|
|
18
|
-
/** @class */
|
|
19
|
-
(function(n) {
|
|
20
|
-
j(e, n);
|
|
21
|
-
function e(t) {
|
|
22
|
-
var o = n.call(this, S(S({}, e.defaultAdapter), t)) || this;
|
|
23
|
-
return o.shakeAnimationEndHandler_ = function() {
|
|
24
|
-
return o.handleShakeAnimationEnd_();
|
|
25
|
-
}, o;
|
|
26
|
-
}
|
|
27
|
-
return Object.defineProperty(e, "cssClasses", {
|
|
28
|
-
get: function() {
|
|
29
|
-
return Me;
|
|
30
|
-
},
|
|
31
|
-
enumerable: !1,
|
|
32
|
-
configurable: !0
|
|
33
|
-
}), Object.defineProperty(e, "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
|
-
}), e.prototype.init = function() {
|
|
55
|
-
this.adapter.registerInteractionHandler("animationend", this.shakeAnimationEndHandler_);
|
|
56
|
-
}, e.prototype.destroy = function() {
|
|
57
|
-
this.adapter.deregisterInteractionHandler("animationend", this.shakeAnimationEndHandler_);
|
|
58
|
-
}, e.prototype.getWidth = function() {
|
|
59
|
-
return this.adapter.getWidth();
|
|
60
|
-
}, e.prototype.shake = function(t) {
|
|
61
|
-
var o = e.cssClasses.LABEL_SHAKE;
|
|
62
|
-
t ? this.adapter.addClass(o) : this.adapter.removeClass(o);
|
|
63
|
-
}, e.prototype.float = function(t) {
|
|
64
|
-
var o = e.cssClasses, r = o.LABEL_FLOAT_ABOVE, a = o.LABEL_SHAKE;
|
|
65
|
-
t ? this.adapter.addClass(r) : (this.adapter.removeClass(r), this.adapter.removeClass(a));
|
|
66
|
-
}, e.prototype.setRequired = function(t) {
|
|
67
|
-
var o = e.cssClasses.LABEL_REQUIRED;
|
|
68
|
-
t ? this.adapter.addClass(o) : this.adapter.removeClass(o);
|
|
69
|
-
}, e.prototype.handleShakeAnimationEnd_ = function() {
|
|
70
|
-
var t = e.cssClasses.LABEL_SHAKE;
|
|
71
|
-
this.adapter.removeClass(t);
|
|
72
|
-
}, e;
|
|
73
|
-
})(ce)
|
|
74
|
-
);
|
|
75
|
-
var Be = (
|
|
76
|
-
/** @class */
|
|
77
|
-
(function(n) {
|
|
78
|
-
j(e, n);
|
|
79
|
-
function e() {
|
|
80
|
-
return n !== null && n.apply(this, arguments) || this;
|
|
81
|
-
}
|
|
82
|
-
return e.attachTo = function(t) {
|
|
83
|
-
return new e(t);
|
|
84
|
-
}, e.prototype.shake = function(t) {
|
|
85
|
-
this.foundation.shake(t);
|
|
86
|
-
}, e.prototype.float = function(t) {
|
|
87
|
-
this.foundation.float(t);
|
|
88
|
-
}, e.prototype.setRequired = function(t) {
|
|
89
|
-
this.foundation.setRequired(t);
|
|
90
|
-
}, e.prototype.getWidth = function() {
|
|
91
|
-
return this.foundation.getWidth();
|
|
92
|
-
}, e.prototype.getDefaultFoundation = function() {
|
|
93
|
-
var t = this, o = {
|
|
94
|
-
addClass: function(r) {
|
|
95
|
-
return t.root.classList.add(r);
|
|
96
|
-
},
|
|
97
|
-
removeClass: function(r) {
|
|
98
|
-
return t.root.classList.remove(r);
|
|
99
|
-
},
|
|
100
|
-
getWidth: function() {
|
|
101
|
-
return $e(t.root);
|
|
102
|
-
},
|
|
103
|
-
registerInteractionHandler: function(r, a) {
|
|
104
|
-
return t.listen(r, a);
|
|
105
|
-
},
|
|
106
|
-
deregisterInteractionHandler: function(r, a) {
|
|
107
|
-
return t.unlisten(r, a);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
return new he(o);
|
|
111
|
-
}, e;
|
|
112
|
-
})(de)
|
|
113
|
-
);
|
|
114
|
-
var me = {
|
|
115
|
-
NOTCH_ELEMENT_SELECTOR: ".mdc-notched-outline__notch"
|
|
116
|
-
}, ie = {
|
|
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 je = (
|
|
125
|
-
/** @class */
|
|
126
|
-
(function(n) {
|
|
127
|
-
j(e, n);
|
|
128
|
-
function e(t) {
|
|
129
|
-
return n.call(this, S(S({}, e.defaultAdapter), t)) || this;
|
|
130
|
-
}
|
|
131
|
-
return Object.defineProperty(e, "strings", {
|
|
132
|
-
get: function() {
|
|
133
|
-
return me;
|
|
134
|
-
},
|
|
135
|
-
enumerable: !1,
|
|
136
|
-
configurable: !0
|
|
137
|
-
}), Object.defineProperty(e, "cssClasses", {
|
|
138
|
-
get: function() {
|
|
139
|
-
return q;
|
|
140
|
-
},
|
|
141
|
-
enumerable: !1,
|
|
142
|
-
configurable: !0
|
|
143
|
-
}), Object.defineProperty(e, "numbers", {
|
|
144
|
-
get: function() {
|
|
145
|
-
return ie;
|
|
146
|
-
},
|
|
147
|
-
enumerable: !1,
|
|
148
|
-
configurable: !0
|
|
149
|
-
}), Object.defineProperty(e, "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
|
-
}), e.prototype.notch = function(t) {
|
|
168
|
-
var o = e.cssClasses.OUTLINE_NOTCHED;
|
|
169
|
-
t > 0 && (t += ie.NOTCH_ELEMENT_PADDING), this.adapter.setNotchWidthProperty(t), this.adapter.addClass(o);
|
|
170
|
-
}, e.prototype.closeNotch = function() {
|
|
171
|
-
var t = e.cssClasses.OUTLINE_NOTCHED;
|
|
172
|
-
this.adapter.removeClass(t), this.adapter.removeNotchWidthProperty();
|
|
173
|
-
}, e;
|
|
174
|
-
})(ce)
|
|
175
|
-
);
|
|
176
|
-
var We = (
|
|
177
|
-
/** @class */
|
|
178
|
-
(function(n) {
|
|
179
|
-
j(e, n);
|
|
180
|
-
function e() {
|
|
181
|
-
return n !== null && n.apply(this, arguments) || this;
|
|
182
|
-
}
|
|
183
|
-
return e.attachTo = function(t) {
|
|
184
|
-
return new e(t);
|
|
185
|
-
}, e.prototype.initialSyncWithDOM = function() {
|
|
186
|
-
this.notchElement_ = this.root.querySelector(me.NOTCH_ELEMENT_SELECTOR);
|
|
187
|
-
var t = this.root.querySelector("." + he.cssClasses.ROOT);
|
|
188
|
-
t ? (t.style.transitionDuration = "0s", this.root.classList.add(q.OUTLINE_UPGRADED), requestAnimationFrame(function() {
|
|
189
|
-
t.style.transitionDuration = "";
|
|
190
|
-
})) : this.root.classList.add(q.NO_LABEL);
|
|
191
|
-
}, e.prototype.notch = function(t) {
|
|
192
|
-
this.foundation.notch(t);
|
|
193
|
-
}, e.prototype.closeNotch = function() {
|
|
194
|
-
this.foundation.closeNotch();
|
|
195
|
-
}, e.prototype.getDefaultFoundation = function() {
|
|
196
|
-
var t = this, o = {
|
|
197
|
-
addClass: function(r) {
|
|
198
|
-
return t.root.classList.add(r);
|
|
199
|
-
},
|
|
200
|
-
removeClass: function(r) {
|
|
201
|
-
return t.root.classList.remove(r);
|
|
202
|
-
},
|
|
203
|
-
setNotchWidthProperty: function(r) {
|
|
204
|
-
return t.notchElement_.style.setProperty("width", r + "px");
|
|
205
|
-
},
|
|
206
|
-
removeNotchWidthProperty: function() {
|
|
207
|
-
return t.notchElement_.style.removeProperty("width");
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
return new je(o);
|
|
211
|
-
}, e;
|
|
212
|
-
})(de)
|
|
213
|
-
), Ue = {
|
|
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
|
-
}, qe = {
|
|
245
|
-
children: null,
|
|
246
|
-
className: void 0
|
|
247
|
-
}, Ke = ["children", "htmlFor", "shake", "float", "className", "style"], U = qe, ve = /* @__PURE__ */ M(function(n, e) {
|
|
248
|
-
var t = n.children, o = t === void 0 ? U.children : t, 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, l = g === void 0 ? U.style : g, c = w(n, Ke), E = N(), C = o, b = N();
|
|
249
|
-
return B(e, function() {
|
|
250
|
-
return b.current;
|
|
251
|
-
}, []), A(function() {
|
|
252
|
-
return E.current = Be.attachTo(b.current), function() {
|
|
253
|
-
E.current.destroy();
|
|
254
|
-
};
|
|
255
|
-
}), A(function() {
|
|
256
|
-
E.current.float(f);
|
|
257
|
-
}, [f]), /* @__PURE__ */ d.createElement("label", P({
|
|
258
|
-
ref: b,
|
|
259
|
-
htmlFor: a,
|
|
260
|
-
className: H("lmnt", "mdc-floating-label", f && "mdc-floating-label--float-above", _ && "mdc-floating-label--shake", y)
|
|
261
|
-
}, c, {
|
|
262
|
-
style: l
|
|
263
|
-
}), C);
|
|
264
|
-
});
|
|
265
|
-
ve.displayName = "FloatingLabel";
|
|
266
|
-
ve.propTypes = Ue;
|
|
267
|
-
var Ge = {
|
|
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
|
-
}, Qe = {
|
|
299
|
-
children: null,
|
|
300
|
-
className: void 0,
|
|
301
|
-
closed: void 0,
|
|
302
|
-
outlineOnly: void 0,
|
|
303
|
-
width: null
|
|
304
|
-
}, Ve = ["closed", "className", "children", "outlineOnly", "width"], x = Qe, ye = /* @__PURE__ */ M(function(n, e) {
|
|
305
|
-
var t = n.closed, o = t === void 0 ? x.closed : t, r = n.className, a = r === void 0 ? x.className : r, u = n.children, _ = u === void 0 ? x.children : u, p = n.outlineOnly, f = p === void 0 ? x.outlineOnly : p, h = n.width, y = h === void 0 ? x.width : h, g = w(n, Ve), l = N(), c = N();
|
|
306
|
-
return B(e, function() {
|
|
307
|
-
return l.current;
|
|
308
|
-
}, []), A(function() {
|
|
309
|
-
return c.current = We.attachTo(l.current), function() {
|
|
310
|
-
c.current.destroy();
|
|
311
|
-
};
|
|
312
|
-
}, []), A(function() {
|
|
313
|
-
o !== void 0 && (o ? c.current.closeNotch() : c.current.notch());
|
|
314
|
-
}, [o]), A(function() {
|
|
315
|
-
y ? c.current.foundation.adapter.setNotchWidthProperty(y) : c.current.foundation.adapter.removeNotchWidthProperty();
|
|
316
|
-
}, [y]), /* @__PURE__ */ d.createElement("div", P({
|
|
317
|
-
className: H("lmnt", "mdc-notched-outline", a),
|
|
318
|
-
ref: l
|
|
319
|
-
}, g), /* @__PURE__ */ d.createElement("div", {
|
|
320
|
-
className: "mdc-notched-outline__leading"
|
|
321
|
-
}), !f && /* @__PURE__ */ d.createElement("div", {
|
|
322
|
-
className: "mdc-notched-outline__notch"
|
|
323
|
-
}, _), /* @__PURE__ */ d.createElement("div", {
|
|
324
|
-
className: "mdc-notched-outline__trailing"
|
|
325
|
-
}));
|
|
326
|
-
});
|
|
327
|
-
ye.displayName = "NotchedOutline";
|
|
328
|
-
ye.propTypes = Ge;
|
|
329
|
-
var ze = {
|
|
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
|
-
}, Je = {
|
|
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
|
-
}, Xe = {
|
|
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
|
-
}, Ye = {
|
|
440
|
-
className: void 0,
|
|
441
|
-
hoisted: !1,
|
|
442
|
-
id: void 0,
|
|
443
|
-
portalContainer: "document.body",
|
|
444
|
-
text: null
|
|
445
|
-
}, Ze = ["className", "hoisted", "id", "portalContainer", "text"], F = Ye, K = /* @__PURE__ */ M(function(n, e) {
|
|
446
|
-
var t = n.className, o = t === void 0 ? F.className : t, r = n.hoisted, a = r === void 0 ? F.hoisted : r, u = n.id, _ = u === void 0 ? F.id : u, p = n.portalContainer, f = p === void 0 ? F.portalContainer : p, h = n.text, y = h === void 0 ? F.text : h, g = w(n, Ze), l = se(function() {
|
|
447
|
-
return _ || fe();
|
|
448
|
-
}), c = pe(l, 1), E = c[0], C = N();
|
|
449
|
-
B(e, function() {
|
|
450
|
-
return C.current;
|
|
451
|
-
}, []);
|
|
452
|
-
var b = le(function() {
|
|
453
|
-
return H(["lmnt", o, "lmnt-tooltip__text-content", "mdc-typography--caption"]);
|
|
454
|
-
}, [o]);
|
|
455
|
-
return /* @__PURE__ */ d.createElement(Fe, {
|
|
456
|
-
disabled: !a,
|
|
457
|
-
container: f
|
|
458
|
-
}, /* @__PURE__ */ d.createElement("div", P({
|
|
459
|
-
role: "tooltip",
|
|
460
|
-
id: E,
|
|
461
|
-
className: b
|
|
462
|
-
}, g, {
|
|
463
|
-
ref: C
|
|
464
|
-
}), y));
|
|
465
|
-
});
|
|
466
|
-
K.displayName = "TooltipText";
|
|
467
|
-
K.propTypes = Xe;
|
|
468
|
-
var et = ["children", "className", "containerType", "hoisted", "id", "onClick", "portalContainer", "position", "text", "tooltipProps", "triggerProps"];
|
|
469
|
-
function ae(n, e) {
|
|
470
|
-
var t = Ae(n);
|
|
471
|
-
if (ne) {
|
|
472
|
-
var o = ne(n);
|
|
473
|
-
e && (o = xe(o).call(o, function(r) {
|
|
474
|
-
return ue(n, r).enumerable;
|
|
475
|
-
})), t.push.apply(t, o);
|
|
476
|
-
}
|
|
477
|
-
return t;
|
|
478
|
-
}
|
|
479
|
-
function I(n) {
|
|
480
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
481
|
-
var t, o, r = arguments[e] != null ? arguments[e] : {};
|
|
482
|
-
e % 2 ? Z(t = ae(Object(r), !0)).call(t, function(a) {
|
|
483
|
-
De(n, a, r[a]);
|
|
484
|
-
}) : te ? Re(n, te(r)) : Z(o = ae(Object(r))).call(o, function(a) {
|
|
485
|
-
ke(n, a, ue(r, a));
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
return n;
|
|
489
|
-
}
|
|
490
|
-
var v = Je, ge = /* @__PURE__ */ M(function(n, e) {
|
|
491
|
-
var t = n.children, o = t === void 0 ? v.children : t, 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, l = g === void 0 ? v.onClick : g, c = n.portalContainer, E = c === void 0 ? v.portalContainer : c, C = n.position, b = C === void 0 ? v.position : C, G = n.text, $ = G === void 0 ? v.text : G, Q = n.tooltipProps, _e = Q === void 0 ? v.tooltipProps : Q, V = n.triggerProps, be = V === void 0 ? v.triggerProps : V, Ne = w(n, et), W = N(), O = N(), D = N();
|
|
492
|
-
B(e, function() {
|
|
493
|
-
return O.current;
|
|
494
|
-
}, []);
|
|
495
|
-
var Ee = se(function() {
|
|
496
|
-
return y || fe();
|
|
497
|
-
}), Ce = pe(Ee, 1), T = Ce[0], Oe = k(function() {
|
|
498
|
-
l?.();
|
|
499
|
-
}, [l]), Te = k(function(s) {
|
|
500
|
-
s.key === "Enter" && l?.();
|
|
501
|
-
}, [l]);
|
|
502
|
-
He(function() {
|
|
503
|
-
var s = [{
|
|
504
|
-
name: "flip",
|
|
505
|
-
options: {
|
|
506
|
-
enabled: !0,
|
|
507
|
-
padding: {
|
|
508
|
-
bottom: 32,
|
|
509
|
-
top: 32
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}];
|
|
513
|
-
return f ? s.push({
|
|
514
|
-
name: "offset",
|
|
515
|
-
options: {
|
|
516
|
-
offset: [0, 6]
|
|
517
|
-
}
|
|
518
|
-
}) : s.push({
|
|
519
|
-
name: "offset",
|
|
520
|
-
options: {
|
|
521
|
-
offset: [0, 12]
|
|
522
|
-
}
|
|
523
|
-
}), W.current && O.current && (D.current = we(W.current, O.current, {
|
|
524
|
-
placement: b,
|
|
525
|
-
modifiers: s
|
|
526
|
-
})), function() {
|
|
527
|
-
var m;
|
|
528
|
-
(m = D.current) === null || m === void 0 || m.destroy();
|
|
529
|
-
};
|
|
530
|
-
}, [b, f]);
|
|
531
|
-
var z = k(function() {
|
|
532
|
-
var s, m, L;
|
|
533
|
-
(s = O.current) === null || s === void 0 || s.setAttribute("data-show", ""), (m = D.current) === null || m === void 0 || m.setOptions(function(R) {
|
|
534
|
-
var Y;
|
|
535
|
-
return I(I({}, R), {}, {
|
|
536
|
-
modifiers: re(Y = []).call(Y, oe(R.modifiers), [{
|
|
537
|
-
name: "eventListeners",
|
|
538
|
-
enabled: !0
|
|
539
|
-
}])
|
|
540
|
-
});
|
|
541
|
-
}), (L = D.current) === null || L === void 0 || L.update();
|
|
542
|
-
}, []), J = k(function() {
|
|
543
|
-
var s, m;
|
|
544
|
-
(s = O.current) === null || s === void 0 || s.removeAttribute("data-show"), (m = D.current) === null || m === void 0 || m.setOptions(function(L) {
|
|
545
|
-
var R;
|
|
546
|
-
return I(I({}, L), {}, {
|
|
547
|
-
modifiers: re(R = []).call(R, oe(L.modifiers), [{
|
|
548
|
-
name: "eventListeners",
|
|
549
|
-
enabled: !1
|
|
550
|
-
}])
|
|
551
|
-
});
|
|
552
|
-
});
|
|
553
|
-
}, []), X = k(function() {
|
|
554
|
-
var s = o;
|
|
555
|
-
return s.type ? s.type === ee : s === ee;
|
|
556
|
-
}, [o]);
|
|
557
|
-
A(function() {
|
|
558
|
-
var s = "Tooltips should only include short text for additional context and should not exceed three lines visually. (Toolitip ID ".concat(T, ").");
|
|
559
|
-
$ && $.length > 100 && Ie(s);
|
|
560
|
-
}, [$, T]);
|
|
561
|
-
var Le = le(
|
|
562
|
-
// eslint-disable-next-line react/no-unstable-nested-components
|
|
563
|
-
function() {
|
|
564
|
-
return function() {
|
|
565
|
-
return o ? typeof o == "string" || X(o) ? /* @__PURE__ */ d.createElement("span", {
|
|
566
|
-
"aria-describedby": T
|
|
567
|
-
}, o) : Se(o, {
|
|
568
|
-
"aria-describedby": T
|
|
569
|
-
}) : null;
|
|
570
|
-
};
|
|
571
|
-
},
|
|
572
|
-
[o, T, X]
|
|
573
|
-
), Pe = l ? {
|
|
574
|
-
tabIndex: 0,
|
|
575
|
-
role: l ? "button" : "note",
|
|
576
|
-
onKeyPress: Te,
|
|
577
|
-
onClick: Oe
|
|
578
|
-
} : {};
|
|
579
|
-
return /* @__PURE__ */ d.createElement("span", P({
|
|
580
|
-
className: H("lmnt lmnt-tooltip", _ === "block" ? "lmnt-tooltip--block" : "lmnt-tooltip--inline")
|
|
581
|
-
}, Pe, Ne), /* @__PURE__ */ d.createElement("span", P({
|
|
582
|
-
className: H("lmnt-tooltip__content", _ === "block" ? "lmnt-tooltip--block" : "lmnt-tooltip--inline")
|
|
583
|
-
}, be, {
|
|
584
|
-
ref: W,
|
|
585
|
-
onMouseEnter: z,
|
|
586
|
-
onFocus: z,
|
|
587
|
-
onMouseLeave: J,
|
|
588
|
-
onBlur: J
|
|
589
|
-
}), /* @__PURE__ */ d.createElement(Le, null)), $ && /* @__PURE__ */ d.createElement(K, P({
|
|
590
|
-
hoisted: f,
|
|
591
|
-
portalContainer: E,
|
|
592
|
-
role: "tooltip",
|
|
593
|
-
id: T,
|
|
594
|
-
className: a
|
|
595
|
-
}, _e, {
|
|
596
|
-
ref: O,
|
|
597
|
-
text: $
|
|
598
|
-
})));
|
|
599
|
-
});
|
|
600
|
-
ge.displayName = "Tooltip";
|
|
601
|
-
ge.propTypes = ze;
|
|
602
|
-
export {
|
|
603
|
-
ve as F,
|
|
604
|
-
Be as M,
|
|
605
|
-
ye as N,
|
|
606
|
-
K as T,
|
|
607
|
-
We as a
|
|
608
|
-
};
|