@hortiview/shared-components 2.8.6 → 2.8.7
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 +6 -0
- package/dist/{AlertBanner-DlgFtlZm.js → AlertBanner-D-NTP_6i.js} +3 -3
- package/dist/{BigLoadingSpinner-B_HFhx2F.js → BigLoadingSpinner-CCxsMWnc.js} +1 -1
- package/dist/{GenericCard-Cv8qaFLu.js → GenericCard-DOKyENNm.js} +3 -3
- package/dist/{ListAreaService-D9HRsvH0.js → ListAreaService-CI-s1Xx5.js} +5 -5
- package/dist/{OfflineView-Bw-sbsym.js → OfflineView-DHtzNLwt.js} +3 -3
- package/dist/_Map-BmafU0dj.js +113 -0
- package/dist/components/AlertBanner/AlertBanner.js +4 -4
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/AlertBanner/LinkBanner.js +3 -3
- package/dist/components/BaseView/BaseView.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +1 -1
- package/dist/components/ChipCard/ChipCard.js +499 -390
- package/dist/components/ContextMenu/ContextMenu.js +4 -4
- package/dist/components/DeleteModal/DeleteModal.js +5 -5
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/EmptyView/EmptyView.js +161 -125
- package/dist/components/Filter/Filter.js +11 -11
- package/dist/components/Filter/Filter.test.js +51 -35
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +10 -10
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +2 -2
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +540 -535
- package/dist/components/FormComponents/FormText/FormText.js +2 -2
- package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
- package/dist/components/GenericTable/GenericTable.js +8246 -7153
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
- package/dist/components/HashTabView/HashTabView.js +552 -541
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/Iconify/Iconify.js +2 -2
- package/dist/components/InfoCard/InfoCard.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.js +3 -3
- package/dist/components/ListArea/ListArea.js +16 -16
- package/dist/components/ListArea/ListArea.test.js +20 -20
- package/dist/components/ListArea/ListAreaService.js +6 -6
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +164 -178
- package/dist/components/Modal/Modal.js +305 -312
- package/dist/components/ModulePadding/ModulePadding.js +8 -8
- package/dist/components/OfflineView/OfflineView.js +4 -4
- package/dist/components/OfflineView/OfflineView.test.js +1 -1
- package/dist/components/OnboardingBanner/OnboardingBanner.js +13 -13
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- 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/StepperIndicator.js +1 -1
- package/dist/defineProperty-CmuOyxyf.js +318 -0
- package/dist/es.string.iterator-DrqCBub-.js +581 -0
- package/dist/find-B-dm7n_F.js +88 -0
- package/dist/{get-CqneoueQ.js → get-DuK51wnj.js} +1 -1
- package/dist/get-u1nFMLdT.js +377 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-BIZAN_pL.js +213 -0
- package/dist/includes-Bt-Stz_B.js +110 -0
- package/dist/index-Cpb-8cAN.js +2465 -0
- package/dist/index.es-0QJC9VS2.js +325 -0
- package/dist/{index.es-CyjMwj5g.js → index.es-45NOgWlB.js} +93 -101
- package/dist/index.es-B6ZgiW2s.js +3790 -0
- package/dist/{index.es-1zrFd4Te.js → index.es-BGordhUK.js} +352 -323
- package/dist/index.es-BRtk0Q33.js +42 -0
- package/dist/index.es-BXj90wb_.js +402 -0
- package/dist/index.es-Bg8hxXM8.js +912 -0
- package/dist/index.es-Bgjh6euR.js +292 -0
- package/dist/index.es-Bo1Rhtyb.js +80 -0
- package/dist/{index.es-BaX-8joZ.js → index.es-CK4oZMKs.js} +3329 -3232
- package/dist/{index.es-nQ0lMwpE.js → index.es-CKdJX75f.js} +74 -78
- package/dist/index.es-CmF6xAUJ.js +48 -0
- package/dist/{index.es-p4O33fMu.js → index.es-Cq04gn3U.js} +321 -305
- package/dist/{index.es-Cdu6tjUC.js → index.es-D1IpdMde.js} +87 -95
- package/dist/index.es-DDYCugj-.js +166 -0
- package/dist/{index.es-jFaPNuBO.js → index.es-DENZVv7_.js} +427 -444
- package/dist/{index.es-Dnrk7XL6.js → index.es-DObVvepK.js} +158 -166
- package/dist/index.es-DeF-y7fd.js +122 -0
- package/dist/{index.es-ks_RnHLh.js → index.es-Dfju71Pi.js} +27 -37
- package/dist/index.es-DqSY-ePE.js +4923 -0
- package/dist/index.es-DwzB1d7_.js +1061 -0
- package/dist/index.es-IXyb5F6n.js +457 -0
- package/dist/index.es-t7hFwQSs.js +67 -0
- package/dist/isArray-DN9s620O.js +83 -0
- package/dist/{isArray-CSaAxHlq.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/{isEmpty-SkzPhavO.js → isEmpty-CxD71Jv8.js} +4 -5
- package/dist/{isString-CZsZiWgW.js → isString-BNaBRq3S.js} +2 -2
- package/dist/isTypedArray-Dw_IY7Zq.js +212 -0
- package/dist/keyboard-B-WUULl-.js +173 -0
- package/dist/main.js +2 -2
- package/dist/map-Dbvlv_6y.js +707 -0
- package/dist/omit-uTAyrUTm.js +645 -0
- package/dist/orderBy-BXxEvUw6.js +571 -0
- package/dist/parse-int-qVAoFbOL.js +75 -0
- package/dist/services/UtilService.js +7 -7
- package/dist/slicedToArray-BWk2gTCn.js +436 -0
- package/dist/{toString-BFJes2_D.js → toString-CrgB_7Pe.js} +1 -1
- package/dist/{uniqueId-DrPMzA-E.js → uniqueId-NU3-C36A.js} +1 -1
- package/package.json +3 -3
- package/dist/_baseIsEqual-Df2URKWm.js +0 -240
- package/dist/_getAllKeys-BQWmkEw5.js +0 -86
- package/dist/_getTag-BkGSRa18.js +0 -79
- package/dist/_setToString-B6E13pDg.js +0 -580
- package/dist/get-DQr2KQKm.js +0 -113
- package/dist/index-D5m--65X.js +0 -1491
- package/dist/index.es-8MVlRCi4.js +0 -1066
- package/dist/index.es-BbaCXS9-.js +0 -45
- package/dist/index.es-BikIx4uw.js +0 -3242
- package/dist/index.es-CDMu_yu0.js +0 -954
- package/dist/index.es-ChSlnpSq.js +0 -309
- package/dist/index.es-D66OkZJH.js +0 -4853
- package/dist/index.es-DFFyENnI.js +0 -63
- package/dist/index.es-DTMwaJ6B.js +0 -56
- package/dist/index.es-DgTJmbgD.js +0 -268
- package/dist/index.es-DmsyeHLO.js +0 -306
- package/dist/index.es-Dw1eih7R.js +0 -159
- package/dist/index.es-eKuwB1ll.js +0 -54
- package/dist/index.es-qxTN-Bb2.js +0 -107
- package/dist/index.es-xnSvM9b9.js +0 -444
- package/dist/isArray-DDZrq40X.js +0 -456
- package/dist/keyboard-Bpt0aBqQ.js +0 -107
- package/dist/omit-BN3qeeaj.js +0 -364
- package/dist/orderBy-D4LvP9Az.js +0 -316
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
import { c as A, _ as X, P as n } from "./index-D5m--65X.js";
|
|
2
|
-
import { I as Y } from "./index.es-8MVlRCi4.js";
|
|
3
|
-
import I, { forwardRef as Z, useRef as L, useImperativeHandle as ee, useEffect as P } from "react";
|
|
4
|
-
import { c as T, b as te, d as ne } from "./index.es-ChSlnpSq.js";
|
|
5
|
-
import { b as M, c as S } from "./tslib.es6-BDCynO9F.js";
|
|
6
|
-
import { M as oe, a as ae } from "./component-neHBNHRu.js";
|
|
7
|
-
import { M as w } from "./component-DsB0poTj.js";
|
|
8
|
-
/**
|
|
9
|
-
* @license
|
|
10
|
-
* Copyright 2018 Google Inc.
|
|
11
|
-
*
|
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
* in the Software without restriction, including without limitation the rights
|
|
15
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
* furnished to do so, subject to the following conditions:
|
|
18
|
-
*
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in
|
|
20
|
-
* all copies or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28
|
-
* THE SOFTWARE.
|
|
29
|
-
*/
|
|
30
|
-
var v = {
|
|
31
|
-
ICON_BUTTON_ON: "mdc-icon-button--on",
|
|
32
|
-
ROOT: "mdc-icon-button"
|
|
33
|
-
}, c = {
|
|
34
|
-
ARIA_LABEL: "aria-label",
|
|
35
|
-
ARIA_PRESSED: "aria-pressed",
|
|
36
|
-
DATA_ARIA_LABEL_OFF: "data-aria-label-off",
|
|
37
|
-
DATA_ARIA_LABEL_ON: "data-aria-label-on",
|
|
38
|
-
CHANGE_EVENT: "MDCIconButtonToggle:change"
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* @license
|
|
42
|
-
* Copyright 2018 Google Inc.
|
|
43
|
-
*
|
|
44
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
45
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
46
|
-
* in the Software without restriction, including without limitation the rights
|
|
47
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
48
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
49
|
-
* furnished to do so, subject to the following conditions:
|
|
50
|
-
*
|
|
51
|
-
* The above copyright notice and this permission notice shall be included in
|
|
52
|
-
* all copies or substantial portions of the Software.
|
|
53
|
-
*
|
|
54
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
55
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
56
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
57
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
58
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
59
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
60
|
-
* THE SOFTWARE.
|
|
61
|
-
*/
|
|
62
|
-
var x = (
|
|
63
|
-
/** @class */
|
|
64
|
-
function(d) {
|
|
65
|
-
M(a, d);
|
|
66
|
-
function a(e) {
|
|
67
|
-
var r = d.call(this, S(S({}, a.defaultAdapter), e)) || this;
|
|
68
|
-
return r.hasToggledAriaLabel = !1, r;
|
|
69
|
-
}
|
|
70
|
-
return Object.defineProperty(a, "cssClasses", {
|
|
71
|
-
get: function() {
|
|
72
|
-
return v;
|
|
73
|
-
},
|
|
74
|
-
enumerable: !1,
|
|
75
|
-
configurable: !0
|
|
76
|
-
}), Object.defineProperty(a, "strings", {
|
|
77
|
-
get: function() {
|
|
78
|
-
return c;
|
|
79
|
-
},
|
|
80
|
-
enumerable: !1,
|
|
81
|
-
configurable: !0
|
|
82
|
-
}), Object.defineProperty(a, "defaultAdapter", {
|
|
83
|
-
get: function() {
|
|
84
|
-
return {
|
|
85
|
-
addClass: function() {
|
|
86
|
-
},
|
|
87
|
-
hasClass: function() {
|
|
88
|
-
return !1;
|
|
89
|
-
},
|
|
90
|
-
notifyChange: function() {
|
|
91
|
-
},
|
|
92
|
-
removeClass: function() {
|
|
93
|
-
},
|
|
94
|
-
getAttr: function() {
|
|
95
|
-
return null;
|
|
96
|
-
},
|
|
97
|
-
setAttr: function() {
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
},
|
|
101
|
-
enumerable: !1,
|
|
102
|
-
configurable: !0
|
|
103
|
-
}), a.prototype.init = function() {
|
|
104
|
-
var e = this.adapter.getAttr(c.DATA_ARIA_LABEL_ON), r = this.adapter.getAttr(c.DATA_ARIA_LABEL_OFF);
|
|
105
|
-
if (e && r) {
|
|
106
|
-
if (this.adapter.getAttr(c.ARIA_PRESSED) !== null)
|
|
107
|
-
throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");
|
|
108
|
-
this.hasToggledAriaLabel = !0;
|
|
109
|
-
} else
|
|
110
|
-
this.adapter.setAttr(c.ARIA_PRESSED, String(this.isOn()));
|
|
111
|
-
}, a.prototype.handleClick = function() {
|
|
112
|
-
this.toggle(), this.adapter.notifyChange({ isOn: this.isOn() });
|
|
113
|
-
}, a.prototype.isOn = function() {
|
|
114
|
-
return this.adapter.hasClass(v.ICON_BUTTON_ON);
|
|
115
|
-
}, a.prototype.toggle = function(e) {
|
|
116
|
-
if (e === void 0 && (e = !this.isOn()), e ? this.adapter.addClass(v.ICON_BUTTON_ON) : this.adapter.removeClass(v.ICON_BUTTON_ON), this.hasToggledAriaLabel) {
|
|
117
|
-
var r = e ? this.adapter.getAttr(c.DATA_ARIA_LABEL_ON) : this.adapter.getAttr(c.DATA_ARIA_LABEL_OFF);
|
|
118
|
-
this.adapter.setAttr(c.ARIA_LABEL, r || "");
|
|
119
|
-
} else
|
|
120
|
-
this.adapter.setAttr(c.ARIA_PRESSED, "" + e);
|
|
121
|
-
}, a;
|
|
122
|
-
}(oe)
|
|
123
|
-
);
|
|
124
|
-
/**
|
|
125
|
-
* @license
|
|
126
|
-
* Copyright 2018 Google Inc.
|
|
127
|
-
*
|
|
128
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
129
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
130
|
-
* in the Software without restriction, including without limitation the rights
|
|
131
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
132
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
133
|
-
* furnished to do so, subject to the following conditions:
|
|
134
|
-
*
|
|
135
|
-
* The above copyright notice and this permission notice shall be included in
|
|
136
|
-
* all copies or substantial portions of the Software.
|
|
137
|
-
*
|
|
138
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
139
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
140
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
141
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
142
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
143
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
144
|
-
* THE SOFTWARE.
|
|
145
|
-
*/
|
|
146
|
-
var re = x.strings, le = (
|
|
147
|
-
/** @class */
|
|
148
|
-
function(d) {
|
|
149
|
-
M(a, d);
|
|
150
|
-
function a() {
|
|
151
|
-
var e = d !== null && d.apply(this, arguments) || this;
|
|
152
|
-
return e.rippleComponent = e.createRipple(), e;
|
|
153
|
-
}
|
|
154
|
-
return a.attachTo = function(e) {
|
|
155
|
-
return new a(e);
|
|
156
|
-
}, a.prototype.initialSyncWithDOM = function() {
|
|
157
|
-
var e = this;
|
|
158
|
-
this.handleClick = function() {
|
|
159
|
-
e.foundation.handleClick();
|
|
160
|
-
}, this.listen("click", this.handleClick);
|
|
161
|
-
}, a.prototype.destroy = function() {
|
|
162
|
-
this.unlisten("click", this.handleClick), this.ripple.destroy(), d.prototype.destroy.call(this);
|
|
163
|
-
}, a.prototype.getDefaultFoundation = function() {
|
|
164
|
-
var e = this, r = {
|
|
165
|
-
addClass: function(l) {
|
|
166
|
-
return e.root.classList.add(l);
|
|
167
|
-
},
|
|
168
|
-
hasClass: function(l) {
|
|
169
|
-
return e.root.classList.contains(l);
|
|
170
|
-
},
|
|
171
|
-
notifyChange: function(l) {
|
|
172
|
-
e.emit(re.CHANGE_EVENT, l);
|
|
173
|
-
},
|
|
174
|
-
removeClass: function(l) {
|
|
175
|
-
return e.root.classList.remove(l);
|
|
176
|
-
},
|
|
177
|
-
getAttr: function(l) {
|
|
178
|
-
return e.root.getAttribute(l);
|
|
179
|
-
},
|
|
180
|
-
setAttr: function(l, m) {
|
|
181
|
-
return e.root.setAttribute(l, m);
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
return new x(r);
|
|
185
|
-
}, Object.defineProperty(a.prototype, "ripple", {
|
|
186
|
-
get: function() {
|
|
187
|
-
return this.rippleComponent;
|
|
188
|
-
},
|
|
189
|
-
enumerable: !1,
|
|
190
|
-
configurable: !0
|
|
191
|
-
}), Object.defineProperty(a.prototype, "on", {
|
|
192
|
-
get: function() {
|
|
193
|
-
return this.foundation.isOn();
|
|
194
|
-
},
|
|
195
|
-
set: function(e) {
|
|
196
|
-
this.foundation.toggle(e);
|
|
197
|
-
},
|
|
198
|
-
enumerable: !1,
|
|
199
|
-
configurable: !0
|
|
200
|
-
}), a.prototype.createRipple = function() {
|
|
201
|
-
var e = new w(this.root);
|
|
202
|
-
return e.unbounded = !0, e;
|
|
203
|
-
}, a;
|
|
204
|
-
}(ae)
|
|
205
|
-
);
|
|
206
|
-
const ie = {
|
|
207
|
-
/**
|
|
208
|
-
* Programmatically sets the toggle state of the button when used as a toggle button. If not set, the toggle state will be managed internally.
|
|
209
|
-
*
|
|
210
|
-
* Defaults to **false**.
|
|
211
|
-
*/
|
|
212
|
-
active: n.bool,
|
|
213
|
-
/**
|
|
214
|
-
* Accessibility label for assistive technologies.
|
|
215
|
-
*
|
|
216
|
-
* Defaults to **null**.
|
|
217
|
-
*/
|
|
218
|
-
ariaLabel: n.string,
|
|
219
|
-
/**
|
|
220
|
-
* Id of an element serving as a label for this IconButton instance. Used by assistive technologies.
|
|
221
|
-
*
|
|
222
|
-
* Defaults to **null**.
|
|
223
|
-
*/
|
|
224
|
-
ariaLabelledBy: n.string,
|
|
225
|
-
/**
|
|
226
|
-
* The custom icon button notification badge to be rendered.
|
|
227
|
-
*
|
|
228
|
-
* Defaults to **undefined**.
|
|
229
|
-
*/
|
|
230
|
-
badge: n.node,
|
|
231
|
-
/**
|
|
232
|
-
* The placement of the notification badge on the icon to start. It will flip to the opposite side if there is no room.
|
|
233
|
-
*
|
|
234
|
-
* Defaults to **'right-start'**.
|
|
235
|
-
*/
|
|
236
|
-
badgePlacement: n.oneOf(["right-start", "left-start"]),
|
|
237
|
-
/**
|
|
238
|
-
* The content when when using the IconButton normally. Expects an `Icon` component. For toggle button functionality, use `toggleOn` and `toggleOff` instead.
|
|
239
|
-
*
|
|
240
|
-
* Defaults to **null**.
|
|
241
|
-
*/
|
|
242
|
-
children: n.node,
|
|
243
|
-
/**
|
|
244
|
-
* The css class name to be passed through to the component markup.
|
|
245
|
-
*
|
|
246
|
-
* Defaults to **undefined**.
|
|
247
|
-
*/
|
|
248
|
-
className: n.string,
|
|
249
|
-
/**
|
|
250
|
-
* @deprecated _Use iconSize='small' instead._
|
|
251
|
-
*
|
|
252
|
-
* Enables a smaller IconButton.
|
|
253
|
-
*
|
|
254
|
-
* Defaults to **undefined**.
|
|
255
|
-
*/
|
|
256
|
-
dense: ne(n.bool, "IconButton", 'Use iconSize="small" instead.'),
|
|
257
|
-
/**
|
|
258
|
-
* Disables the icon button.
|
|
259
|
-
*
|
|
260
|
-
* Defaults to **false**.
|
|
261
|
-
*/
|
|
262
|
-
disabled: n.bool,
|
|
263
|
-
/**
|
|
264
|
-
* For simple use-cases, this will automatically create the icon object. Does not work with `toggle='true'`
|
|
265
|
-
*
|
|
266
|
-
* Defaults to **null**.
|
|
267
|
-
*/
|
|
268
|
-
icon: n.oneOfType([n.string, n.node]),
|
|
269
|
-
/**
|
|
270
|
-
* One of 'xsmall', 'small', 'medium', 'large', and 'xlarge' will change the size of the icon. Defaults to medium.
|
|
271
|
-
*
|
|
272
|
-
* Defaults to **'medium'**.
|
|
273
|
-
*/
|
|
274
|
-
iconSize: n.oneOf(["xsmall", "small", "medium", "large", "xlarge"]),
|
|
275
|
-
/**
|
|
276
|
-
* The icon type to be rendered. Not all icons have every type. To see which icons are available for different types see [Material Icons docs](https://material.io/tools/icons)
|
|
277
|
-
*
|
|
278
|
-
* Defaults to **'filled'**.
|
|
279
|
-
*/
|
|
280
|
-
iconType: n.oneOf(["filled", "outlined", "rounded", "two-tone", "sharp"]),
|
|
281
|
-
/**
|
|
282
|
-
* Fired when the user clicks the IconButton, will return toggle state, if applicable.
|
|
283
|
-
*
|
|
284
|
-
* Defaults to **null**.
|
|
285
|
-
*/
|
|
286
|
-
onClick: n.func,
|
|
287
|
-
/**
|
|
288
|
-
* TabIndex of the button.
|
|
289
|
-
*
|
|
290
|
-
* Defaults to **0**.
|
|
291
|
-
*/
|
|
292
|
-
tabIndex: n.number,
|
|
293
|
-
/**
|
|
294
|
-
* By default a button will be rendered, this allows another tag/component to be used instead. A block type element/component is suggested.
|
|
295
|
-
*
|
|
296
|
-
* Defaults to **null**.
|
|
297
|
-
*/
|
|
298
|
-
tag: n.oneOfType([n.string, n.elementType, n.instanceOf(I.Component)]),
|
|
299
|
-
/**
|
|
300
|
-
* The content to be rendered when the `IconButton` is toggled off. Expects an `Icon` component. The typical use case for a toggle button would be to set an Icon for `toggleOn` and `toggleOff`, leaving children blank.
|
|
301
|
-
*
|
|
302
|
-
* Defaults to **null**.
|
|
303
|
-
*/
|
|
304
|
-
toggleOff: n.node,
|
|
305
|
-
/**
|
|
306
|
-
* The `aria-label` value to be read by a screen-reader when the button is toggled off. Example 'Add to Favorites'. Alternatively, `toggleOffAriaLabelledBy` may be used instead.
|
|
307
|
-
*
|
|
308
|
-
* Defaults to **null**.
|
|
309
|
-
*/
|
|
310
|
-
toggleOffAriaLabel: n.string,
|
|
311
|
-
/**
|
|
312
|
-
* The `aria-labelledby`value when the button is toggled on. This should be the `id `of a parent element to be read by a screen reader instead of `aria-label`.
|
|
313
|
-
*
|
|
314
|
-
* Defaults to **null**.
|
|
315
|
-
*/
|
|
316
|
-
toggleOffAriaLabelledBy: n.string,
|
|
317
|
-
/**
|
|
318
|
-
* The content to be rendered when the `IconButton` is toggled on. Expects an `Icon` component. The typical use case for a toggle button would be to set an Icon for `toggleOn` and `toggleOff`, leaving children blank.
|
|
319
|
-
*
|
|
320
|
-
* Defaults to **null**.
|
|
321
|
-
*/
|
|
322
|
-
toggleOn: n.node,
|
|
323
|
-
/**
|
|
324
|
-
* The `aria-label` value to be read by a screen-reader when the button is toggled on. Example 'Remove from Favorites'. Alternatively, `toggleOnAriaLabelledBy` may be used instead.
|
|
325
|
-
*
|
|
326
|
-
* Defaults to **null**.
|
|
327
|
-
*/
|
|
328
|
-
toggleOnAriaLabel: n.string,
|
|
329
|
-
/**
|
|
330
|
-
* The `aria-labelledby`value when the button is toggled on. This should be the `id` of a parent element to be read by a screen reader instead of `aria-label`.
|
|
331
|
-
*
|
|
332
|
-
* Defaults to **null**.
|
|
333
|
-
*/
|
|
334
|
-
toggleOnAriaLabelledBy: n.string,
|
|
335
|
-
/**
|
|
336
|
-
* Variants prefixed with `filled-` will add a background color to the icon according to the theme. Variants prefixed with ` color-` will change the color of the icon according to the theme.
|
|
337
|
-
*
|
|
338
|
-
* Defaults to **empty string**.
|
|
339
|
-
*/
|
|
340
|
-
variant: te(n.oneOf(["", "filled-danger-alt", "filled-danger", "filled-primary", "filled-secondary", "color-primary", "color-secondary", "color-on-dark", "color-on-unknown-black", "secondary-on-surface"]), ["primary-alt", "secondary-alt", "primary", "danger-alt", "danger"], "IconButton", "Please use one of '','filled-danger-alt','filled-danger','filled-primary','filled-secondary','color-primary','color-secondary','color-on-dark','color-on-unknown-black','secondary-on-surface'.")
|
|
341
|
-
}, se = {
|
|
342
|
-
active: !1,
|
|
343
|
-
ariaLabel: null,
|
|
344
|
-
ariaLabelledBy: null,
|
|
345
|
-
badge: void 0,
|
|
346
|
-
badgePlacement: "right-start",
|
|
347
|
-
children: null,
|
|
348
|
-
className: void 0,
|
|
349
|
-
dense: void 0,
|
|
350
|
-
disabled: !1,
|
|
351
|
-
icon: null,
|
|
352
|
-
iconSize: "medium",
|
|
353
|
-
iconType: "filled",
|
|
354
|
-
tabIndex: 0,
|
|
355
|
-
tag: null,
|
|
356
|
-
toggleOff: null,
|
|
357
|
-
toggleOffAriaLabel: null,
|
|
358
|
-
toggleOffAriaLabelledBy: null,
|
|
359
|
-
toggleOn: null,
|
|
360
|
-
toggleOnAriaLabel: null,
|
|
361
|
-
toggleOnAriaLabelledBy: null,
|
|
362
|
-
variant: ""
|
|
363
|
-
}, B = /* @__PURE__ */ Z((d, a) => {
|
|
364
|
-
const {
|
|
365
|
-
active: e,
|
|
366
|
-
ariaLabel: r,
|
|
367
|
-
ariaLabelledBy: l,
|
|
368
|
-
badge: m,
|
|
369
|
-
badgePlacement: F,
|
|
370
|
-
children: N,
|
|
371
|
-
className: $,
|
|
372
|
-
dense: z,
|
|
373
|
-
disabled: j,
|
|
374
|
-
icon: E,
|
|
375
|
-
iconSize: U,
|
|
376
|
-
iconType: H,
|
|
377
|
-
onClick: R,
|
|
378
|
-
noHover: G,
|
|
379
|
-
tabIndex: V,
|
|
380
|
-
tag: W,
|
|
381
|
-
toggleOff: k,
|
|
382
|
-
toggleOffAriaLabel: h,
|
|
383
|
-
toggleOffAriaLabelledBy: _,
|
|
384
|
-
toggleOn: D,
|
|
385
|
-
toggleOnAriaLabel: O,
|
|
386
|
-
toggleOnAriaLabelledBy: C,
|
|
387
|
-
variant: o,
|
|
388
|
-
...q
|
|
389
|
-
} = d, b = L(), y = L(), g = L(), u = D && k;
|
|
390
|
-
let f = U;
|
|
391
|
-
f === "medium" && z && (f = "small"), m && (f === "small" || f === "xsmall") && (f = "medium"), ee(a, () => b.current, []);
|
|
392
|
-
const J = A("lmnt", "lmnt-icon-button", "mdc-icon-button", G && "lmnt-icon-button__no-hover", (o === "primary" || o === "primary-alt" || o === "secondary" || o === "danger" || o === "danger-alt" || o === "filled-primary" || o === "filled-primary-alt" || o === "filled-secondary" || o === "filled-danger" || o === "filled-danger-alt") && "lmnt-icon-button--fill", (o === "danger-alt" || o === "filled-danger-alt") && "lmnt-icon-button--fill-danger-alt", (o === "danger" || o === "filled-danger") && "lmnt-icon-button--fill-danger", (o === "primary" || o === "filled-primary") && "lmnt-icon-button--fill-primary", (o === "primary-alt" || o === "filled-secondary") && "lmnt-icon-button--fill-secondary", (o === "secondary-alt" || o === "color-on-dark") && "lmnt-icon-button--color-on-dark", o === "color-primary" && "lmnt-icon-button--color-primary", o === "color-secondary" && "lmnt-icon-button--color-secondary", o === "color-on-unknown-black" && "lmnt-icon-button--on-unknown-black", o === "secondary-on-surface" && "lmnt-icon-button--secondary-on-surface", f && `lmnt-icon-button--${f}`, $);
|
|
393
|
-
P(() => (u ? g.current = le.attachTo(b.current) : (y.current = w.attachTo(b.current), y.current.unbounded = !0), () => {
|
|
394
|
-
u ? g.current.destroy() : y.current.destroy();
|
|
395
|
-
}), [g, u, y]), P(() => {
|
|
396
|
-
u && (g.current.on = e);
|
|
397
|
-
}, [e, u, g]);
|
|
398
|
-
const K = (t) => {
|
|
399
|
-
R && R(u ? g.current.on : t);
|
|
400
|
-
}, Q = W || "button";
|
|
401
|
-
return /* @__PURE__ */ I.createElement(Q, X({
|
|
402
|
-
"aria-label": r,
|
|
403
|
-
"aria-labelledby": l,
|
|
404
|
-
"data-aria-label-on": O || C || r,
|
|
405
|
-
"data-aria-label-off": h || _ || r,
|
|
406
|
-
onClick: K,
|
|
407
|
-
ref: b,
|
|
408
|
-
className: J,
|
|
409
|
-
disabled: j,
|
|
410
|
-
tabIndex: V
|
|
411
|
-
}, q), E && /* @__PURE__ */ I.createElement(Y, {
|
|
412
|
-
badge: m,
|
|
413
|
-
badgePlacement: F,
|
|
414
|
-
icon: E,
|
|
415
|
-
iconSize: f,
|
|
416
|
-
iconType: H
|
|
417
|
-
}), N && T(N, (t) => {
|
|
418
|
-
var i, s;
|
|
419
|
-
return {
|
|
420
|
-
className: A("mdc-icon-button__icon", t == null || (i = t.props) === null || i === void 0 ? void 0 : i.className),
|
|
421
|
-
"aria-hidden": (t == null || (s = t.props) === null || s === void 0 ? void 0 : s["aria-hidden"]) || r || l
|
|
422
|
-
};
|
|
423
|
-
}), u && e && T(D, (t) => {
|
|
424
|
-
var i, s, p;
|
|
425
|
-
return {
|
|
426
|
-
className: A("mdc-icon-button__icon", t == null || (i = t.props) === null || i === void 0 ? void 0 : i.className),
|
|
427
|
-
"aria-label": (t == null || (s = t.props) === null || s === void 0 ? void 0 : s["aria-label"]) || O || C || r,
|
|
428
|
-
"aria-hidden": (t == null || (p = t.props) === null || p === void 0 ? void 0 : p["aria-hidden"]) || O || C || r
|
|
429
|
-
};
|
|
430
|
-
}), u && !e && T(k, (t) => {
|
|
431
|
-
var i, s, p;
|
|
432
|
-
return {
|
|
433
|
-
className: A("mdc-icon-button__icon", t == null || (i = t.props) === null || i === void 0 ? void 0 : i.className),
|
|
434
|
-
"aria-label": (t == null || (s = t.props) === null || s === void 0 ? void 0 : s["aria-label"]) || h || _ || r,
|
|
435
|
-
"aria-hidden": (t == null || (p = t.props) === null || p === void 0 ? void 0 : p["aria-hidden"]) || h || _ || r
|
|
436
|
-
};
|
|
437
|
-
}));
|
|
438
|
-
});
|
|
439
|
-
B.displayName = "IconButton";
|
|
440
|
-
B.propTypes = ie;
|
|
441
|
-
B.defaultProps = se;
|
|
442
|
-
export {
|
|
443
|
-
B as I
|
|
444
|
-
};
|