@hortiview/shared-components 0.0.11176 → 0.0.11587
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/README.md +58 -8
- package/dist/BigLoadingSpinner-iegTbDcD.js +16 -0
- package/dist/GenericCard-6J558OgP.js +350 -0
- package/dist/ListAreaService-DOwtdRa4.js +109 -0
- package/dist/_MapCache-B75yWNNd.js +376 -0
- package/dist/_baseIsEqual-D0Dsajdb.js +317 -0
- package/dist/_getTag-BCf9b56Z.js +81 -0
- package/dist/animationframe-EMBh6XeO.js +54 -0
- package/dist/assets/HashTabView.css +1 -1
- package/dist/assets/Select.css +1 -0
- package/dist/component-DsB0poTj.js +571 -0
- package/dist/component-neHBNHRu.js +114 -0
- package/dist/components/AlertBanner/AlertBanner.d.ts +0 -1
- package/dist/components/AlertBanner/AlertBanner.js +15 -15
- package/dist/components/AlertBanner/AlertBanner.test.js +11 -9
- package/dist/components/BaseView/BaseView.d.ts +1 -1
- package/dist/components/BaseView/BaseView.js +27 -28
- package/dist/components/BaseView/BaseView.test.js +25 -25
- package/dist/components/BasicHeading/BasicHeading.d.ts +1 -0
- package/dist/components/BasicHeading/BasicHeading.js +17 -17
- package/dist/components/BasicHeading/BasicHeading.test.js +10 -10
- package/dist/components/BlockView/BlockView.d.ts +1 -0
- package/dist/components/BlockView/BlockView.js +24 -25
- package/dist/components/BlockView/BlockView.test.js +2 -2
- package/dist/components/ChipCard/ChipCard.js +1765 -15
- package/dist/components/ChipCard/ChipCard.test.js +2 -2
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -2
- package/dist/components/ContextMenu/ContextMenu.js +28 -28
- package/dist/components/ContextMenu/ContextMenu.test.js +2 -2
- package/dist/components/DeleteModal/DeleteModal.d.ts +0 -1
- package/dist/components/DeleteModal/DeleteModal.js +53 -51
- package/dist/components/DeleteModal/DeleteModal.test.js +2 -2
- package/dist/components/Disclaimer/Disclaimer.js +12 -11
- package/dist/components/Disclaimer/Disclaimer.test.js +2 -2
- package/dist/components/EmptyView/EmptyView.d.ts +1 -0
- package/dist/components/EmptyView/EmptyView.js +258 -19
- package/dist/components/EmptyView/EmptyView.test.js +2 -2
- package/dist/components/Filter/Filter.d.ts +1 -0
- package/dist/components/Filter/Filter.js +81 -77
- package/dist/components/Filter/Filter.test.js +2 -2
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.d.ts +1 -0
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +13 -11
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.test.js +2 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.d.ts +3 -2
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +5975 -6389
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.test.js +2 -2
- package/dist/components/FormComponents/FormNumber/CustomTextField.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +13 -14
- package/dist/components/FormComponents/FormNumber/FormNumber.d.ts +2 -1
- package/dist/components/FormComponents/FormNumber/FormNumber.js +2 -2
- package/dist/components/FormComponents/FormNumber/FormNumber.test.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.d.ts +1 -0
- package/dist/components/FormComponents/FormRadio/FormRadio.js +4 -4
- package/dist/components/FormComponents/FormRadio/FormRadio.test.js +2 -2
- package/dist/components/FormComponents/FormSelect/FormSelect.d.ts +4 -7
- package/dist/components/FormComponents/FormSelect/FormSelect.js +100 -110
- package/dist/components/FormComponents/FormSelect/FormSelect.test.js +3 -3
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.d.ts +1 -0
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +6 -5
- package/dist/components/FormComponents/FormSlider/FormSlider.d.ts +1 -0
- package/dist/components/FormComponents/FormSlider/FormSlider.js +1155 -27
- package/dist/components/FormComponents/FormSlider/FormSlider.test.js +2 -2
- package/dist/components/FormComponents/FormText/FormText.d.ts +2 -1
- package/dist/components/FormComponents/FormText/FormText.js +28 -28
- package/dist/components/FormComponents/FormText/FormText.test.js +13 -13
- package/dist/components/FormComponents/FormToggle/FormToggle.d.ts +2 -1
- package/dist/components/FormComponents/FormToggle/FormToggle.js +17 -15
- package/dist/components/FormComponents/FormToggle/FormToggle.test.js +2 -2
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.d.ts +2 -1
- package/dist/components/FormattedNumberDisplay/FormattedNumberDisplay.js +1 -1
- package/dist/components/GenericTable/GenericTable.d.ts +1 -0
- package/dist/components/GenericTable/GenericTable.js +10487 -76
- package/dist/components/GenericTable/GenericTable.test.js +2 -2
- package/dist/components/GenericTable/GenericTableService.d.ts +1 -0
- package/dist/components/GenericTable/GenericTableService.js +41 -41
- package/dist/components/GenericTable/Mobile/GenericCard.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -3
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +3 -3
- package/dist/components/GenericTable/Mobile/GenericCardList.d.ts +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +10 -8
- package/dist/components/GenericTable/Mobile/GenericCardList.test.js +2 -2
- package/dist/components/HashTabView/HashTabView.d.ts +6 -1
- package/dist/components/HashTabView/HashTabView.js +1805 -72
- package/dist/components/HashTabView/HashTabView.test.js +2 -2
- package/dist/components/HeaderFilter/HeaderFilter.d.ts +3 -2
- package/dist/components/HeaderFilter/HeaderFilter.js +14 -14
- package/dist/components/HeaderFilter/HeaderFilter.test.js +2 -2
- package/dist/components/HealthCheckFailed/HealthCheckFailed.js +19 -17
- package/dist/components/HealthCheckFailed/HealthCheckFailed.test.js +2 -2
- package/dist/components/Iconify/Iconify.d.ts +2 -3
- package/dist/components/Iconify/Iconify.js +44 -45
- package/dist/components/Iconify/Iconify.test.js +2 -2
- package/dist/components/InfoGroup/InfoGroup.d.ts +4 -3
- package/dist/components/InfoGroup/InfoGroup.js +30 -29
- package/dist/components/InfoGroup/InfoGroup.test.js +2 -2
- package/dist/components/ListArea/ListArea.d.ts +1 -1
- package/dist/components/ListArea/ListArea.js +29 -27
- package/dist/components/ListArea/ListArea.test.js +5 -5
- package/dist/components/ListArea/ListAreaService.d.ts +9 -8
- package/dist/components/ListArea/ListAreaService.js +7 -5
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +3 -3
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +506 -38
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.test.js +2 -2
- package/dist/components/Modal/Modal.d.ts +2 -1
- package/dist/components/Modal/Modal.js +926 -10
- package/dist/components/ModulePadding/ModulePadding.d.ts +7 -0
- package/dist/components/ModulePadding/ModulePadding.js +28 -0
- package/dist/components/ModulePadding/ModulePadding.test.d.ts +1 -0
- package/dist/components/ModulePadding/ModulePadding.test.js +22 -0
- package/dist/components/OverflowTooltip/OverflowTooltip.d.ts +0 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.js +13 -14
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +4 -4
- package/dist/components/Scrollbar/Scrollbar.js +5 -6
- package/dist/components/Scrollbar/scrollbar.test.js +2 -2
- package/dist/components/SearchBar/SearchBar.js +11 -11
- package/dist/components/SearchBar/SearchBar.test.js +2 -2
- package/dist/components/Select/Select.d.ts +14 -0
- package/dist/components/Select/Select.js +34 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/Select.test.js +28 -0
- package/dist/components/VerticalDivider/VerticalDivider.js +4 -5
- package/dist/components/VerticalDivider/VerticalDivider.test.js +2 -2
- package/dist/floating-ui.dom-CeD8zknG.js +978 -0
- package/dist/get-7ACccM2X.js +114 -0
- package/dist/{get-BiqanC9_.js → get-DFv1gXfq.js} +1 -1
- package/dist/hooks/useBreakpoints.test.js +2 -2
- package/dist/hooks/useHelperText.d.ts +1 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-DLWZln-X.js +1763 -0
- package/dist/{index-DzM8o582.js → index-CrcXCSzI.js} +1940 -1796
- package/dist/index.es-0lQcz8m1.js +444 -0
- package/dist/index.es-25EARqhH.js +2027 -0
- package/dist/index.es-3043KTnb.js +1066 -0
- package/dist/index.es-41ztjcFT.js +724 -0
- package/dist/index.es-6TJ1S8Jr.js +954 -0
- package/dist/index.es-8GOVkuo-.js +374 -0
- package/dist/index.es-B-_jXDuz.js +216 -0
- package/dist/index.es-BWgXLqXn.js +102 -0
- package/dist/index.es-BtjV0oNv.js +360 -0
- package/dist/index.es-BvrQnJ3j.js +509 -0
- package/dist/index.es-CF_xy2ns.js +674 -0
- package/dist/index.es-CL_Heu1n.js +54 -0
- package/dist/index.es-CiqbARoC.js +306 -0
- package/dist/index.es-D-CKRzIB.js +63 -0
- package/dist/index.es-D6N-XWHe.js +56 -0
- package/dist/index.es-DKDgy7Kt.js +45 -0
- package/dist/index.es-DntoATwO.js +159 -0
- package/dist/index.es-UHKFl8Da.js +7075 -0
- package/dist/index.es-d5xhUpJZ.js +3242 -0
- package/dist/index.es-da0cf7oE.js +569 -0
- package/dist/index.es-h2lMdt7G.js +107 -0
- package/dist/index.es-zr101OF5.js +4853 -0
- package/dist/{isArray-2zMxXFEr.js → isArray-DN9s620O.js} +3 -3
- package/dist/{isArray-C_5XvIlE.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/isEmpty-B4GG2s-V.js +31 -0
- package/dist/isPlainObject-C273y67K.js +40 -0
- package/dist/isString-BW9UHONv.js +21 -0
- package/dist/keyboard-Bpt0aBqQ.js +107 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +58 -54
- package/dist/orderBy-Bd48bw88.js +316 -0
- package/dist/{react-number-format.es-BD3_OvMU.js → react-number-format.es-BK1EpVXq.js} +151 -151
- package/dist/react-tooltip.min-DSY6KDqS.js +431 -0
- package/dist/{react.esm-FR1-H8iU.js → react.esm-DNwojocF.js} +5289 -4990
- package/dist/services/BlockService.d.ts +1 -0
- package/dist/services/NumberService.d.ts +1 -0
- package/dist/services/UtilService.d.ts +1 -0
- package/dist/services/UtilService.js +2 -2
- package/dist/services/services.test.js +1 -1
- package/dist/toString-CrgB_7Pe.js +54 -0
- package/dist/tslib.es6-BDCynO9F.js +162 -0
- package/dist/types/GenericTable.d.ts +2 -2
- package/dist/types/HashTab.d.ts +0 -1
- package/dist/types/ListElement.d.ts +0 -1
- package/dist/types/internal/ReactRouterTypes.d.ts +0 -1
- package/dist/uniqueId-NU3-C36A.js +18 -0
- package/dist/util-DA21pZXj.js +78 -0
- package/dist/{vi.CjhMlMwf-DWv7vrn7.js → vi.CjhMlMwf-BCJNwXvu.js} +1 -1
- package/package.json +15 -15
- package/dist/BigLoadingSpinner-C3wTbTD0.js +0 -17
- package/dist/GenericCard-B8x1DMa8.js +0 -81
- package/dist/ListAreaService-CRX4eEUJ.js +0 -108
- package/dist/_Map-Dtlps7IZ.js +0 -113
- package/dist/_overArg-_0pUmCsX.js +0 -14
- package/dist/get-P-5PYZOE.js +0 -426
- package/dist/isEmpty-BimaZd5G.js +0 -225
- package/dist/isString-BOHPtrlm.js +0 -44
- package/dist/orderBy-BVQIswlJ.js +0 -765
- package/dist/react-tooltip.min-c2wVkjF2.js +0 -1354
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
import { _ as b, c as C, P as n } from "./identity-DLWZln-X.js";
|
|
2
|
+
import d, { forwardRef as O, useRef as m, useImperativeHandle as P, useEffect as N, useState as U, useMemo as q, useCallback as _, Fragment as W } from "react";
|
|
3
|
+
import { b as A, c as T } from "./tslib.es6-BDCynO9F.js";
|
|
4
|
+
import { M as K, a as $ } from "./component-neHBNHRu.js";
|
|
5
|
+
import { e as ee } from "./component-DsB0poTj.js";
|
|
6
|
+
import { f as j, u as te, h as ne, c as oe } from "./index.es-da0cf7oE.js";
|
|
7
|
+
import { P as re } from "./index.es-D6N-XWHe.js";
|
|
8
|
+
import { c as ie } from "./index.es-3043KTnb.js";
|
|
9
|
+
/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2016 Google Inc.
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
* in the Software without restriction, including without limitation the rights
|
|
16
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
* furnished to do so, subject to the following conditions:
|
|
19
|
+
*
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in
|
|
21
|
+
* all copies or substantial portions of the Software.
|
|
22
|
+
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
29
|
+
* THE SOFTWARE.
|
|
30
|
+
*/
|
|
31
|
+
var se = {
|
|
32
|
+
LABEL_FLOAT_ABOVE: "mdc-floating-label--float-above",
|
|
33
|
+
LABEL_REQUIRED: "mdc-floating-label--required",
|
|
34
|
+
LABEL_SHAKE: "mdc-floating-label--shake",
|
|
35
|
+
ROOT: "mdc-floating-label"
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @license
|
|
39
|
+
* Copyright 2016 Google Inc.
|
|
40
|
+
*
|
|
41
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
42
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
43
|
+
* in the Software without restriction, including without limitation the rights
|
|
44
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
45
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
46
|
+
* furnished to do so, subject to the following conditions:
|
|
47
|
+
*
|
|
48
|
+
* The above copyright notice and this permission notice shall be included in
|
|
49
|
+
* all copies or substantial portions of the Software.
|
|
50
|
+
*
|
|
51
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
52
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
53
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
54
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
55
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
56
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
57
|
+
* THE SOFTWARE.
|
|
58
|
+
*/
|
|
59
|
+
var G = (
|
|
60
|
+
/** @class */
|
|
61
|
+
function(i) {
|
|
62
|
+
A(t, i);
|
|
63
|
+
function t(e) {
|
|
64
|
+
var o = i.call(this, T(T({}, t.defaultAdapter), e)) || this;
|
|
65
|
+
return o.shakeAnimationEndHandler_ = function() {
|
|
66
|
+
return o.handleShakeAnimationEnd_();
|
|
67
|
+
}, o;
|
|
68
|
+
}
|
|
69
|
+
return Object.defineProperty(t, "cssClasses", {
|
|
70
|
+
get: function() {
|
|
71
|
+
return se;
|
|
72
|
+
},
|
|
73
|
+
enumerable: !1,
|
|
74
|
+
configurable: !0
|
|
75
|
+
}), Object.defineProperty(t, "defaultAdapter", {
|
|
76
|
+
/**
|
|
77
|
+
* See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.
|
|
78
|
+
*/
|
|
79
|
+
get: function() {
|
|
80
|
+
return {
|
|
81
|
+
addClass: function() {
|
|
82
|
+
},
|
|
83
|
+
removeClass: function() {
|
|
84
|
+
},
|
|
85
|
+
getWidth: function() {
|
|
86
|
+
return 0;
|
|
87
|
+
},
|
|
88
|
+
registerInteractionHandler: function() {
|
|
89
|
+
},
|
|
90
|
+
deregisterInteractionHandler: function() {
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
enumerable: !1,
|
|
95
|
+
configurable: !0
|
|
96
|
+
}), t.prototype.init = function() {
|
|
97
|
+
this.adapter.registerInteractionHandler("animationend", this.shakeAnimationEndHandler_);
|
|
98
|
+
}, t.prototype.destroy = function() {
|
|
99
|
+
this.adapter.deregisterInteractionHandler("animationend", this.shakeAnimationEndHandler_);
|
|
100
|
+
}, t.prototype.getWidth = function() {
|
|
101
|
+
return this.adapter.getWidth();
|
|
102
|
+
}, t.prototype.shake = function(e) {
|
|
103
|
+
var o = t.cssClasses.LABEL_SHAKE;
|
|
104
|
+
e ? this.adapter.addClass(o) : this.adapter.removeClass(o);
|
|
105
|
+
}, t.prototype.float = function(e) {
|
|
106
|
+
var o = t.cssClasses, r = o.LABEL_FLOAT_ABOVE, s = o.LABEL_SHAKE;
|
|
107
|
+
e ? this.adapter.addClass(r) : (this.adapter.removeClass(r), this.adapter.removeClass(s));
|
|
108
|
+
}, t.prototype.setRequired = function(e) {
|
|
109
|
+
var o = t.cssClasses.LABEL_REQUIRED;
|
|
110
|
+
e ? this.adapter.addClass(o) : this.adapter.removeClass(o);
|
|
111
|
+
}, t.prototype.handleShakeAnimationEnd_ = function() {
|
|
112
|
+
var e = t.cssClasses.LABEL_SHAKE;
|
|
113
|
+
this.adapter.removeClass(e);
|
|
114
|
+
}, t;
|
|
115
|
+
}(K)
|
|
116
|
+
);
|
|
117
|
+
/**
|
|
118
|
+
* @license
|
|
119
|
+
* Copyright 2016 Google Inc.
|
|
120
|
+
*
|
|
121
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
122
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
123
|
+
* in the Software without restriction, including without limitation the rights
|
|
124
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
125
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
126
|
+
* furnished to do so, subject to the following conditions:
|
|
127
|
+
*
|
|
128
|
+
* The above copyright notice and this permission notice shall be included in
|
|
129
|
+
* all copies or substantial portions of the Software.
|
|
130
|
+
*
|
|
131
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
132
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
133
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
134
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
135
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
136
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
137
|
+
* THE SOFTWARE.
|
|
138
|
+
*/
|
|
139
|
+
var ae = (
|
|
140
|
+
/** @class */
|
|
141
|
+
function(i) {
|
|
142
|
+
A(t, i);
|
|
143
|
+
function t() {
|
|
144
|
+
return i !== null && i.apply(this, arguments) || this;
|
|
145
|
+
}
|
|
146
|
+
return t.attachTo = function(e) {
|
|
147
|
+
return new t(e);
|
|
148
|
+
}, t.prototype.shake = function(e) {
|
|
149
|
+
this.foundation.shake(e);
|
|
150
|
+
}, t.prototype.float = function(e) {
|
|
151
|
+
this.foundation.float(e);
|
|
152
|
+
}, t.prototype.setRequired = function(e) {
|
|
153
|
+
this.foundation.setRequired(e);
|
|
154
|
+
}, t.prototype.getWidth = function() {
|
|
155
|
+
return this.foundation.getWidth();
|
|
156
|
+
}, t.prototype.getDefaultFoundation = function() {
|
|
157
|
+
var e = this, o = {
|
|
158
|
+
addClass: function(r) {
|
|
159
|
+
return e.root.classList.add(r);
|
|
160
|
+
},
|
|
161
|
+
removeClass: function(r) {
|
|
162
|
+
return e.root.classList.remove(r);
|
|
163
|
+
},
|
|
164
|
+
getWidth: function() {
|
|
165
|
+
return ee(e.root);
|
|
166
|
+
},
|
|
167
|
+
registerInteractionHandler: function(r, s) {
|
|
168
|
+
return e.listen(r, s);
|
|
169
|
+
},
|
|
170
|
+
deregisterInteractionHandler: function(r, s) {
|
|
171
|
+
return e.unlisten(r, s);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
return new G(o);
|
|
175
|
+
}, t;
|
|
176
|
+
}($)
|
|
177
|
+
);
|
|
178
|
+
/**
|
|
179
|
+
* @license
|
|
180
|
+
* Copyright 2018 Google Inc.
|
|
181
|
+
*
|
|
182
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
183
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
184
|
+
* in the Software without restriction, including without limitation the rights
|
|
185
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
186
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
187
|
+
* furnished to do so, subject to the following conditions:
|
|
188
|
+
*
|
|
189
|
+
* The above copyright notice and this permission notice shall be included in
|
|
190
|
+
* all copies or substantial portions of the Software.
|
|
191
|
+
*
|
|
192
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
193
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
194
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
195
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
196
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
197
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
198
|
+
* THE SOFTWARE.
|
|
199
|
+
*/
|
|
200
|
+
var Q = {
|
|
201
|
+
NOTCH_ELEMENT_SELECTOR: ".mdc-notched-outline__notch"
|
|
202
|
+
}, w = {
|
|
203
|
+
// This should stay in sync with $mdc-notched-outline-padding * 2.
|
|
204
|
+
NOTCH_ELEMENT_PADDING: 8
|
|
205
|
+
}, F = {
|
|
206
|
+
NO_LABEL: "mdc-notched-outline--no-label",
|
|
207
|
+
OUTLINE_NOTCHED: "mdc-notched-outline--notched",
|
|
208
|
+
OUTLINE_UPGRADED: "mdc-notched-outline--upgraded"
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* @license
|
|
212
|
+
* Copyright 2017 Google Inc.
|
|
213
|
+
*
|
|
214
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
215
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
216
|
+
* in the Software without restriction, including without limitation the rights
|
|
217
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
218
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
219
|
+
* furnished to do so, subject to the following conditions:
|
|
220
|
+
*
|
|
221
|
+
* The above copyright notice and this permission notice shall be included in
|
|
222
|
+
* all copies or substantial portions of the Software.
|
|
223
|
+
*
|
|
224
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
225
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
226
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
227
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
228
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
229
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
230
|
+
* THE SOFTWARE.
|
|
231
|
+
*/
|
|
232
|
+
var le = (
|
|
233
|
+
/** @class */
|
|
234
|
+
function(i) {
|
|
235
|
+
A(t, i);
|
|
236
|
+
function t(e) {
|
|
237
|
+
return i.call(this, T(T({}, t.defaultAdapter), e)) || this;
|
|
238
|
+
}
|
|
239
|
+
return Object.defineProperty(t, "strings", {
|
|
240
|
+
get: function() {
|
|
241
|
+
return Q;
|
|
242
|
+
},
|
|
243
|
+
enumerable: !1,
|
|
244
|
+
configurable: !0
|
|
245
|
+
}), Object.defineProperty(t, "cssClasses", {
|
|
246
|
+
get: function() {
|
|
247
|
+
return F;
|
|
248
|
+
},
|
|
249
|
+
enumerable: !1,
|
|
250
|
+
configurable: !0
|
|
251
|
+
}), Object.defineProperty(t, "numbers", {
|
|
252
|
+
get: function() {
|
|
253
|
+
return w;
|
|
254
|
+
},
|
|
255
|
+
enumerable: !1,
|
|
256
|
+
configurable: !0
|
|
257
|
+
}), Object.defineProperty(t, "defaultAdapter", {
|
|
258
|
+
/**
|
|
259
|
+
* See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types.
|
|
260
|
+
*/
|
|
261
|
+
get: function() {
|
|
262
|
+
return {
|
|
263
|
+
addClass: function() {
|
|
264
|
+
},
|
|
265
|
+
removeClass: function() {
|
|
266
|
+
},
|
|
267
|
+
setNotchWidthProperty: function() {
|
|
268
|
+
},
|
|
269
|
+
removeNotchWidthProperty: function() {
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
},
|
|
273
|
+
enumerable: !1,
|
|
274
|
+
configurable: !0
|
|
275
|
+
}), t.prototype.notch = function(e) {
|
|
276
|
+
var o = t.cssClasses.OUTLINE_NOTCHED;
|
|
277
|
+
e > 0 && (e += w.NOTCH_ELEMENT_PADDING), this.adapter.setNotchWidthProperty(e), this.adapter.addClass(o);
|
|
278
|
+
}, t.prototype.closeNotch = function() {
|
|
279
|
+
var e = t.cssClasses.OUTLINE_NOTCHED;
|
|
280
|
+
this.adapter.removeClass(e), this.adapter.removeNotchWidthProperty();
|
|
281
|
+
}, t;
|
|
282
|
+
}(K)
|
|
283
|
+
);
|
|
284
|
+
/**
|
|
285
|
+
* @license
|
|
286
|
+
* Copyright 2017 Google Inc.
|
|
287
|
+
*
|
|
288
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
289
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
290
|
+
* in the Software without restriction, including without limitation the rights
|
|
291
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
292
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
293
|
+
* furnished to do so, subject to the following conditions:
|
|
294
|
+
*
|
|
295
|
+
* The above copyright notice and this permission notice shall be included in
|
|
296
|
+
* all copies or substantial portions of the Software.
|
|
297
|
+
*
|
|
298
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
299
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
300
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
301
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
302
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
303
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
304
|
+
* THE SOFTWARE.
|
|
305
|
+
*/
|
|
306
|
+
var ce = (
|
|
307
|
+
/** @class */
|
|
308
|
+
function(i) {
|
|
309
|
+
A(t, i);
|
|
310
|
+
function t() {
|
|
311
|
+
return i !== null && i.apply(this, arguments) || this;
|
|
312
|
+
}
|
|
313
|
+
return t.attachTo = function(e) {
|
|
314
|
+
return new t(e);
|
|
315
|
+
}, t.prototype.initialSyncWithDOM = function() {
|
|
316
|
+
this.notchElement_ = this.root.querySelector(Q.NOTCH_ELEMENT_SELECTOR);
|
|
317
|
+
var e = this.root.querySelector("." + G.cssClasses.ROOT);
|
|
318
|
+
e ? (e.style.transitionDuration = "0s", this.root.classList.add(F.OUTLINE_UPGRADED), requestAnimationFrame(function() {
|
|
319
|
+
e.style.transitionDuration = "";
|
|
320
|
+
})) : this.root.classList.add(F.NO_LABEL);
|
|
321
|
+
}, t.prototype.notch = function(e) {
|
|
322
|
+
this.foundation.notch(e);
|
|
323
|
+
}, t.prototype.closeNotch = function() {
|
|
324
|
+
this.foundation.closeNotch();
|
|
325
|
+
}, t.prototype.getDefaultFoundation = function() {
|
|
326
|
+
var e = this, o = {
|
|
327
|
+
addClass: function(r) {
|
|
328
|
+
return e.root.classList.add(r);
|
|
329
|
+
},
|
|
330
|
+
removeClass: function(r) {
|
|
331
|
+
return e.root.classList.remove(r);
|
|
332
|
+
},
|
|
333
|
+
setNotchWidthProperty: function(r) {
|
|
334
|
+
return e.notchElement_.style.setProperty("width", r + "px");
|
|
335
|
+
},
|
|
336
|
+
removeNotchWidthProperty: function() {
|
|
337
|
+
return e.notchElement_.style.removeProperty("width");
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
return new le(o);
|
|
341
|
+
}, t;
|
|
342
|
+
}($)
|
|
343
|
+
);
|
|
344
|
+
const de = {
|
|
345
|
+
/**
|
|
346
|
+
* Content to be rendered inside the label. Expects a string, though accepts any valid markup.
|
|
347
|
+
*
|
|
348
|
+
* Defaults to **null**.
|
|
349
|
+
*/
|
|
350
|
+
children: n.node.isRequired,
|
|
351
|
+
/**
|
|
352
|
+
* The css class name to be passed through to the component markup.
|
|
353
|
+
*
|
|
354
|
+
* Defaults to **undefined**.
|
|
355
|
+
*/
|
|
356
|
+
className: n.string,
|
|
357
|
+
/**
|
|
358
|
+
* The label will appear in the floating state.
|
|
359
|
+
*
|
|
360
|
+
* Defaults to **false**.
|
|
361
|
+
*/
|
|
362
|
+
float: n.bool,
|
|
363
|
+
/**
|
|
364
|
+
* The id of the component to trigger on active
|
|
365
|
+
*
|
|
366
|
+
* Defaults to **empty string**.
|
|
367
|
+
*/
|
|
368
|
+
htmlFor: n.string,
|
|
369
|
+
/**
|
|
370
|
+
* The label will shake briefly when set.
|
|
371
|
+
*
|
|
372
|
+
* Defaults to **false**.
|
|
373
|
+
*/
|
|
374
|
+
shake: n.bool
|
|
375
|
+
}, ue = {
|
|
376
|
+
children: null,
|
|
377
|
+
className: void 0,
|
|
378
|
+
float: !1,
|
|
379
|
+
htmlFor: "",
|
|
380
|
+
shake: !1
|
|
381
|
+
}, H = /* @__PURE__ */ O((i, t) => {
|
|
382
|
+
const {
|
|
383
|
+
children: e,
|
|
384
|
+
htmlFor: o = "",
|
|
385
|
+
shake: r = !1,
|
|
386
|
+
float: s = !1,
|
|
387
|
+
className: h,
|
|
388
|
+
style: l,
|
|
389
|
+
...c
|
|
390
|
+
} = i, p = m(), f = e, v = m();
|
|
391
|
+
return P(t, () => v.current, []), N(() => (p.current = ae.attachTo(v.current), () => {
|
|
392
|
+
p.current.destroy();
|
|
393
|
+
})), N(() => {
|
|
394
|
+
p.current.float(s);
|
|
395
|
+
}, [s]), /* @__PURE__ */ d.createElement("label", b({
|
|
396
|
+
ref: v,
|
|
397
|
+
htmlFor: o,
|
|
398
|
+
className: C("lmnt", "mdc-floating-label", s && "mdc-floating-label--float-above", r && "mdc-floating-label--shake", h)
|
|
399
|
+
}, c, {
|
|
400
|
+
style: l
|
|
401
|
+
}), f);
|
|
402
|
+
});
|
|
403
|
+
H.displayName = "FloatingLabel";
|
|
404
|
+
H.propTypes = de;
|
|
405
|
+
H.defaultProps = ue;
|
|
406
|
+
const pe = {
|
|
407
|
+
/**
|
|
408
|
+
* Content to be rendered inside the notched outline. Accepts a string.
|
|
409
|
+
*
|
|
410
|
+
* Defaults to **null**.
|
|
411
|
+
*/
|
|
412
|
+
children: n.node,
|
|
413
|
+
/**
|
|
414
|
+
* The css class name to be passed through to the component markup.
|
|
415
|
+
*
|
|
416
|
+
* Defaults to **undefined**.
|
|
417
|
+
*/
|
|
418
|
+
className: n.string,
|
|
419
|
+
/**
|
|
420
|
+
* Determines if the notch is opened or closed.
|
|
421
|
+
*
|
|
422
|
+
* Defaults to **undefined**.
|
|
423
|
+
*/
|
|
424
|
+
closed: n.bool,
|
|
425
|
+
/**
|
|
426
|
+
*
|
|
427
|
+
*
|
|
428
|
+
* Defaults to **null**.
|
|
429
|
+
*/
|
|
430
|
+
width: n.number
|
|
431
|
+
}, fe = {
|
|
432
|
+
children: null,
|
|
433
|
+
className: void 0,
|
|
434
|
+
closed: void 0,
|
|
435
|
+
width: null
|
|
436
|
+
}, k = /* @__PURE__ */ O((i, t) => {
|
|
437
|
+
const {
|
|
438
|
+
closed: e,
|
|
439
|
+
className: o,
|
|
440
|
+
children: r,
|
|
441
|
+
width: s,
|
|
442
|
+
...h
|
|
443
|
+
} = i, l = m(), c = m();
|
|
444
|
+
return P(t, () => l.current, []), N(() => (c.current = ce.attachTo(l.current), () => {
|
|
445
|
+
c.current.destroy();
|
|
446
|
+
}), []), N(() => {
|
|
447
|
+
e !== void 0 && (e ? c.current.closeNotch() : c.current.notch());
|
|
448
|
+
}, [e]), N(() => {
|
|
449
|
+
s ? c.current.foundation.adapter.setNotchWidthProperty(s) : c.current.foundation.adapter.removeNotchWidthProperty();
|
|
450
|
+
}, [s]), /* @__PURE__ */ d.createElement("div", b({
|
|
451
|
+
className: C("lmnt", "mdc-notched-outline", o),
|
|
452
|
+
ref: l
|
|
453
|
+
}, h), /* @__PURE__ */ d.createElement("div", {
|
|
454
|
+
className: "mdc-notched-outline__leading"
|
|
455
|
+
}), /* @__PURE__ */ d.createElement("div", {
|
|
456
|
+
className: "mdc-notched-outline__notch"
|
|
457
|
+
}, r), /* @__PURE__ */ d.createElement("div", {
|
|
458
|
+
className: "mdc-notched-outline__trailing"
|
|
459
|
+
}));
|
|
460
|
+
});
|
|
461
|
+
k.displayName = "NotchedOutline";
|
|
462
|
+
k.propTypes = pe;
|
|
463
|
+
k.defaultProps = fe;
|
|
464
|
+
const me = {
|
|
465
|
+
/**
|
|
466
|
+
* Accepts any valid markup. This will be rendered before any value set with the `text` prop. For most use-cases use `text`.
|
|
467
|
+
*
|
|
468
|
+
* Defaults to **undefined**.
|
|
469
|
+
*/
|
|
470
|
+
children: n.node.isRequired,
|
|
471
|
+
/**
|
|
472
|
+
* The css class name to be passed through to the component markup.
|
|
473
|
+
*
|
|
474
|
+
* Defaults to **undefined**.
|
|
475
|
+
*/
|
|
476
|
+
className: n.string,
|
|
477
|
+
/**
|
|
478
|
+
* Container display type, inline or block.
|
|
479
|
+
*
|
|
480
|
+
* Defaults to **'inline'**.
|
|
481
|
+
*/
|
|
482
|
+
containerType: n.oneOf(["inline", "block"]),
|
|
483
|
+
/**
|
|
484
|
+
* 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.
|
|
485
|
+
*
|
|
486
|
+
* Defaults to **false**.
|
|
487
|
+
*/
|
|
488
|
+
hoisted: n.bool,
|
|
489
|
+
/**
|
|
490
|
+
* Randomly generated id. May be overwritten.
|
|
491
|
+
*
|
|
492
|
+
* Defaults to **undefined**.
|
|
493
|
+
*/
|
|
494
|
+
id: n.string,
|
|
495
|
+
/**
|
|
496
|
+
* Fired when the trigger is interacted with.
|
|
497
|
+
*
|
|
498
|
+
* Defaults to **null**.
|
|
499
|
+
*/
|
|
500
|
+
onClick: n.func,
|
|
501
|
+
/**
|
|
502
|
+
* 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`.
|
|
503
|
+
*
|
|
504
|
+
* Defaults to **'document.body'**.
|
|
505
|
+
*/
|
|
506
|
+
portalContainer: n.oneOfType([n.string, n.node]),
|
|
507
|
+
/**
|
|
508
|
+
* Position of tooltip. Options include: 'top', 'left', 'right', and 'bottom'(default).
|
|
509
|
+
*
|
|
510
|
+
* Defaults to **'bottom'**.
|
|
511
|
+
*/
|
|
512
|
+
position: n.oneOf(["bottom", "top", "left", "right"]),
|
|
513
|
+
/**
|
|
514
|
+
* string
|
|
515
|
+
*
|
|
516
|
+
* Defaults to **null**.
|
|
517
|
+
*/
|
|
518
|
+
text: n.oneOfType([n.string, n.func, n.node]).isRequired,
|
|
519
|
+
/**
|
|
520
|
+
* Custom properties to apply to the hovering element.
|
|
521
|
+
*
|
|
522
|
+
* Defaults to **null**.
|
|
523
|
+
*/
|
|
524
|
+
tooltipProps: n.object,
|
|
525
|
+
/**
|
|
526
|
+
* Custom properties to apply to the trigger element.
|
|
527
|
+
*
|
|
528
|
+
* Defaults to **null**.
|
|
529
|
+
*/
|
|
530
|
+
triggerProps: n.object
|
|
531
|
+
}, he = {
|
|
532
|
+
children: void 0,
|
|
533
|
+
className: void 0,
|
|
534
|
+
containerType: "inline",
|
|
535
|
+
hoisted: !1,
|
|
536
|
+
id: void 0,
|
|
537
|
+
portalContainer: "document.body",
|
|
538
|
+
position: "bottom",
|
|
539
|
+
text: null,
|
|
540
|
+
tooltipProps: null,
|
|
541
|
+
triggerProps: null
|
|
542
|
+
}, Ee = {
|
|
543
|
+
/**
|
|
544
|
+
* The css class name to be passed through to the component markup.
|
|
545
|
+
*
|
|
546
|
+
* Defaults to **undefined**.
|
|
547
|
+
*/
|
|
548
|
+
className: n.string,
|
|
549
|
+
/**
|
|
550
|
+
* 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.
|
|
551
|
+
*
|
|
552
|
+
* Defaults to **false**.
|
|
553
|
+
*/
|
|
554
|
+
hoisted: n.bool,
|
|
555
|
+
/**
|
|
556
|
+
* Randomly generated id. May be overwritten.
|
|
557
|
+
*
|
|
558
|
+
* Defaults to **undefined**.
|
|
559
|
+
*/
|
|
560
|
+
id: n.string,
|
|
561
|
+
/**
|
|
562
|
+
* 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`.
|
|
563
|
+
*
|
|
564
|
+
* Defaults to **'document.body'**.
|
|
565
|
+
*/
|
|
566
|
+
portalContainer: n.oneOfType([n.string, n.node]),
|
|
567
|
+
/**
|
|
568
|
+
* The text to be rendered inside of the Tooltip.
|
|
569
|
+
*
|
|
570
|
+
* Defaults to **null**.
|
|
571
|
+
*/
|
|
572
|
+
text: n.oneOfType([n.string, n.func, n.node]).isRequired
|
|
573
|
+
}, ye = {
|
|
574
|
+
className: void 0,
|
|
575
|
+
hoisted: !1,
|
|
576
|
+
id: void 0,
|
|
577
|
+
portalContainer: "document.body",
|
|
578
|
+
text: null
|
|
579
|
+
}, R = /* @__PURE__ */ O((i, t) => {
|
|
580
|
+
const {
|
|
581
|
+
className: e,
|
|
582
|
+
hoisted: o,
|
|
583
|
+
id: r,
|
|
584
|
+
portalContainer: s,
|
|
585
|
+
text: h,
|
|
586
|
+
...l
|
|
587
|
+
} = i, [c] = U(() => r || j()), p = m();
|
|
588
|
+
P(t, () => p.current, []);
|
|
589
|
+
const f = q(() => C(["lmnt", e, "lmnt-tooltip__text-content", "mdc-typography--caption"]), [e]);
|
|
590
|
+
return /* @__PURE__ */ d.createElement(re, {
|
|
591
|
+
disabled: !o,
|
|
592
|
+
container: s
|
|
593
|
+
}, /* @__PURE__ */ d.createElement("div", b({
|
|
594
|
+
role: "tooltip",
|
|
595
|
+
id: c,
|
|
596
|
+
className: f
|
|
597
|
+
}, l, {
|
|
598
|
+
ref: p
|
|
599
|
+
}), h));
|
|
600
|
+
});
|
|
601
|
+
R.displayName = "TooltipText";
|
|
602
|
+
R.propTypes = Ee;
|
|
603
|
+
R.defaultProps = ye;
|
|
604
|
+
const I = /* @__PURE__ */ O((i, t) => {
|
|
605
|
+
const {
|
|
606
|
+
children: e,
|
|
607
|
+
className: o,
|
|
608
|
+
containerType: r,
|
|
609
|
+
hoisted: s,
|
|
610
|
+
id: h,
|
|
611
|
+
onClick: l,
|
|
612
|
+
portalContainer: c,
|
|
613
|
+
position: p,
|
|
614
|
+
text: f,
|
|
615
|
+
tooltipProps: v,
|
|
616
|
+
triggerProps: V,
|
|
617
|
+
...z
|
|
618
|
+
} = i, D = m(), E = m(), L = m();
|
|
619
|
+
P(t, () => E.current, []);
|
|
620
|
+
const [y] = U(() => h || j()), J = _(() => {
|
|
621
|
+
l?.();
|
|
622
|
+
}, [l]), X = _((a) => {
|
|
623
|
+
a.key === "Enter" && l?.();
|
|
624
|
+
}, [l]);
|
|
625
|
+
te(() => {
|
|
626
|
+
const a = [{
|
|
627
|
+
name: "flip",
|
|
628
|
+
options: {
|
|
629
|
+
enabled: !0,
|
|
630
|
+
padding: {
|
|
631
|
+
bottom: 32,
|
|
632
|
+
top: 32
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}];
|
|
636
|
+
return s ? a.push({
|
|
637
|
+
name: "offset",
|
|
638
|
+
options: {
|
|
639
|
+
offset: [0, 6]
|
|
640
|
+
}
|
|
641
|
+
}) : a.push({
|
|
642
|
+
name: "offset",
|
|
643
|
+
options: {
|
|
644
|
+
offset: [0, 12]
|
|
645
|
+
}
|
|
646
|
+
}), D.current && E.current && (L.current = ie(D.current, E.current, {
|
|
647
|
+
placement: p,
|
|
648
|
+
modifiers: a
|
|
649
|
+
})), () => {
|
|
650
|
+
var u;
|
|
651
|
+
(u = L.current) === null || u === void 0 || u.destroy();
|
|
652
|
+
};
|
|
653
|
+
}, [p, s]);
|
|
654
|
+
const x = _(() => {
|
|
655
|
+
var a, u, g;
|
|
656
|
+
(a = E.current) === null || a === void 0 || a.setAttribute("data-show", ""), (u = L.current) === null || u === void 0 || u.setOptions((S) => ({
|
|
657
|
+
...S,
|
|
658
|
+
modifiers: [...S.modifiers, {
|
|
659
|
+
name: "eventListeners",
|
|
660
|
+
enabled: !0
|
|
661
|
+
}]
|
|
662
|
+
})), (g = L.current) === null || g === void 0 || g.update();
|
|
663
|
+
}, []), M = _(() => {
|
|
664
|
+
var a, u;
|
|
665
|
+
(a = E.current) === null || a === void 0 || a.removeAttribute("data-show"), (u = L.current) === null || u === void 0 || u.setOptions((g) => ({
|
|
666
|
+
...g,
|
|
667
|
+
modifiers: [...g.modifiers, {
|
|
668
|
+
name: "eventListeners",
|
|
669
|
+
enabled: !1
|
|
670
|
+
}]
|
|
671
|
+
}));
|
|
672
|
+
}, []), B = _(() => {
|
|
673
|
+
const a = e;
|
|
674
|
+
return a.type ? a.type === W : a === W;
|
|
675
|
+
}, [e]);
|
|
676
|
+
N(() => {
|
|
677
|
+
const a = `Tooltips should only include short text for additional context and should not exceed three lines visually. (Toolitip ID ${y}).`;
|
|
678
|
+
f && f.length > 100 && ne(a);
|
|
679
|
+
}, [f, y]);
|
|
680
|
+
const Y = q(
|
|
681
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
682
|
+
() => () => e ? typeof e == "string" || B(e) ? /* @__PURE__ */ d.createElement("span", {
|
|
683
|
+
"aria-describedby": y
|
|
684
|
+
}, e) : oe(e, {
|
|
685
|
+
"aria-describedby": y
|
|
686
|
+
}) : null,
|
|
687
|
+
[e, y, B]
|
|
688
|
+
), Z = l ? {
|
|
689
|
+
tabIndex: 0,
|
|
690
|
+
role: l ? "button" : "note",
|
|
691
|
+
onKeyPress: X,
|
|
692
|
+
onClick: J
|
|
693
|
+
} : {};
|
|
694
|
+
return /* @__PURE__ */ d.createElement("span", b({
|
|
695
|
+
className: C("lmnt lmnt-tooltip", r === "block" ? "lmnt-tooltip--block" : "lmnt-tooltip--inline")
|
|
696
|
+
}, Z, z), /* @__PURE__ */ d.createElement("span", b({
|
|
697
|
+
className: C("lmnt-tooltip__content", r === "block" ? "lmnt-tooltip--block" : "lmnt-tooltip--inline")
|
|
698
|
+
}, V, {
|
|
699
|
+
ref: D,
|
|
700
|
+
onMouseEnter: x,
|
|
701
|
+
onFocus: x,
|
|
702
|
+
onMouseLeave: M,
|
|
703
|
+
onBlur: M
|
|
704
|
+
}), /* @__PURE__ */ d.createElement(Y, null)), f && /* @__PURE__ */ d.createElement(R, b({
|
|
705
|
+
hoisted: s,
|
|
706
|
+
portalContainer: c,
|
|
707
|
+
role: "tooltip",
|
|
708
|
+
id: y,
|
|
709
|
+
className: o
|
|
710
|
+
}, v, {
|
|
711
|
+
ref: E,
|
|
712
|
+
text: f
|
|
713
|
+
})));
|
|
714
|
+
});
|
|
715
|
+
I.displayName = "Tooltip";
|
|
716
|
+
I.propTypes = me;
|
|
717
|
+
I.defaultProps = he;
|
|
718
|
+
export {
|
|
719
|
+
H as F,
|
|
720
|
+
ae as M,
|
|
721
|
+
k as N,
|
|
722
|
+
R as T,
|
|
723
|
+
ce as a
|
|
724
|
+
};
|