@hortiview/shared-components 2.26.0 → 2.26.2
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 +23 -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/BlockView.css +1 -1
- 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.d.ts +8 -2
- package/dist/components/BlockView/BlockView.js +71 -68
- 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
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { _ as Nn, c as A, a as rn, P as a } from "./index-_-9ybP20.js";
|
|
2
|
+
import { _ as dn, I as $n } from "./index.es-LckFzDz-.js";
|
|
3
|
+
import I, { forwardRef as Pn, useRef as B, useImperativeHandle as Sn, useEffect as cn } from "react";
|
|
4
|
+
import { c as T, b as En, d as Rn } from "./index.es-DRC-9PLs.js";
|
|
5
|
+
import { b as un, c as sn } from "./tslib.es6-BDCynO9F.js";
|
|
6
|
+
import { M as Dn, a as xn } from "./component-By6nyiBU.js";
|
|
7
|
+
import { M as fn } from "./component-DYpB_4EP.js";
|
|
8
|
+
var h = {
|
|
9
|
+
ICON_BUTTON_ON: "mdc-icon-button--on",
|
|
10
|
+
ROOT: "mdc-icon-button"
|
|
11
|
+
}, f = {
|
|
12
|
+
ARIA_LABEL: "aria-label",
|
|
13
|
+
ARIA_PRESSED: "aria-pressed",
|
|
14
|
+
DATA_ARIA_LABEL_OFF: "data-aria-label-off",
|
|
15
|
+
DATA_ARIA_LABEL_ON: "data-aria-label-on",
|
|
16
|
+
CHANGE_EVENT: "MDCIconButtonToggle:change"
|
|
17
|
+
};
|
|
18
|
+
var gn = (
|
|
19
|
+
/** @class */
|
|
20
|
+
(function(e) {
|
|
21
|
+
un(l, e);
|
|
22
|
+
function l(o) {
|
|
23
|
+
var c = e.call(this, sn(sn({}, l.defaultAdapter), o)) || this;
|
|
24
|
+
return c.hasToggledAriaLabel = !1, c;
|
|
25
|
+
}
|
|
26
|
+
return Object.defineProperty(l, "cssClasses", {
|
|
27
|
+
get: function() {
|
|
28
|
+
return h;
|
|
29
|
+
},
|
|
30
|
+
enumerable: !1,
|
|
31
|
+
configurable: !0
|
|
32
|
+
}), Object.defineProperty(l, "strings", {
|
|
33
|
+
get: function() {
|
|
34
|
+
return f;
|
|
35
|
+
},
|
|
36
|
+
enumerable: !1,
|
|
37
|
+
configurable: !0
|
|
38
|
+
}), Object.defineProperty(l, "defaultAdapter", {
|
|
39
|
+
get: function() {
|
|
40
|
+
return {
|
|
41
|
+
addClass: function() {
|
|
42
|
+
},
|
|
43
|
+
hasClass: function() {
|
|
44
|
+
return !1;
|
|
45
|
+
},
|
|
46
|
+
notifyChange: function() {
|
|
47
|
+
},
|
|
48
|
+
removeClass: function() {
|
|
49
|
+
},
|
|
50
|
+
getAttr: function() {
|
|
51
|
+
return null;
|
|
52
|
+
},
|
|
53
|
+
setAttr: function() {
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
enumerable: !1,
|
|
58
|
+
configurable: !0
|
|
59
|
+
}), l.prototype.init = function() {
|
|
60
|
+
var o = this.adapter.getAttr(f.DATA_ARIA_LABEL_ON), c = this.adapter.getAttr(f.DATA_ARIA_LABEL_OFF);
|
|
61
|
+
if (o && c) {
|
|
62
|
+
if (this.adapter.getAttr(f.ARIA_PRESSED) !== null)
|
|
63
|
+
throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");
|
|
64
|
+
this.hasToggledAriaLabel = !0;
|
|
65
|
+
} else
|
|
66
|
+
this.adapter.setAttr(f.ARIA_PRESSED, String(this.isOn()));
|
|
67
|
+
}, l.prototype.handleClick = function() {
|
|
68
|
+
this.toggle(), this.adapter.notifyChange({ isOn: this.isOn() });
|
|
69
|
+
}, l.prototype.isOn = function() {
|
|
70
|
+
return this.adapter.hasClass(h.ICON_BUTTON_ON);
|
|
71
|
+
}, l.prototype.toggle = function(o) {
|
|
72
|
+
if (o === void 0 && (o = !this.isOn()), o ? this.adapter.addClass(h.ICON_BUTTON_ON) : this.adapter.removeClass(h.ICON_BUTTON_ON), this.hasToggledAriaLabel) {
|
|
73
|
+
var c = o ? this.adapter.getAttr(f.DATA_ARIA_LABEL_ON) : this.adapter.getAttr(f.DATA_ARIA_LABEL_OFF);
|
|
74
|
+
this.adapter.setAttr(f.ARIA_LABEL, c || "");
|
|
75
|
+
} else
|
|
76
|
+
this.adapter.setAttr(f.ARIA_PRESSED, "" + o);
|
|
77
|
+
}, l;
|
|
78
|
+
})(Dn)
|
|
79
|
+
);
|
|
80
|
+
var Fn = gn.strings, Mn = (
|
|
81
|
+
/** @class */
|
|
82
|
+
(function(e) {
|
|
83
|
+
un(l, e);
|
|
84
|
+
function l() {
|
|
85
|
+
var o = e !== null && e.apply(this, arguments) || this;
|
|
86
|
+
return o.rippleComponent = o.createRipple(), o;
|
|
87
|
+
}
|
|
88
|
+
return l.attachTo = function(o) {
|
|
89
|
+
return new l(o);
|
|
90
|
+
}, l.prototype.initialSyncWithDOM = function() {
|
|
91
|
+
var o = this;
|
|
92
|
+
this.handleClick = function() {
|
|
93
|
+
o.foundation.handleClick();
|
|
94
|
+
}, this.listen("click", this.handleClick);
|
|
95
|
+
}, l.prototype.destroy = function() {
|
|
96
|
+
this.unlisten("click", this.handleClick), this.ripple.destroy(), e.prototype.destroy.call(this);
|
|
97
|
+
}, l.prototype.getDefaultFoundation = function() {
|
|
98
|
+
var o = this, c = {
|
|
99
|
+
addClass: function(r) {
|
|
100
|
+
return o.root.classList.add(r);
|
|
101
|
+
},
|
|
102
|
+
hasClass: function(r) {
|
|
103
|
+
return o.root.classList.contains(r);
|
|
104
|
+
},
|
|
105
|
+
notifyChange: function(r) {
|
|
106
|
+
o.emit(Fn.CHANGE_EVENT, r);
|
|
107
|
+
},
|
|
108
|
+
removeClass: function(r) {
|
|
109
|
+
return o.root.classList.remove(r);
|
|
110
|
+
},
|
|
111
|
+
getAttr: function(r) {
|
|
112
|
+
return o.root.getAttribute(r);
|
|
113
|
+
},
|
|
114
|
+
setAttr: function(r, u) {
|
|
115
|
+
return o.root.setAttribute(r, u);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
return new gn(c);
|
|
119
|
+
}, Object.defineProperty(l.prototype, "ripple", {
|
|
120
|
+
get: function() {
|
|
121
|
+
return this.rippleComponent;
|
|
122
|
+
},
|
|
123
|
+
enumerable: !1,
|
|
124
|
+
configurable: !0
|
|
125
|
+
}), Object.defineProperty(l.prototype, "on", {
|
|
126
|
+
get: function() {
|
|
127
|
+
return this.foundation.isOn();
|
|
128
|
+
},
|
|
129
|
+
set: function(o) {
|
|
130
|
+
this.foundation.toggle(o);
|
|
131
|
+
},
|
|
132
|
+
enumerable: !1,
|
|
133
|
+
configurable: !0
|
|
134
|
+
}), l.prototype.createRipple = function() {
|
|
135
|
+
var o = new fn(this.root);
|
|
136
|
+
return o.unbounded = !0, o;
|
|
137
|
+
}, l;
|
|
138
|
+
})(xn)
|
|
139
|
+
), zn = {
|
|
140
|
+
/**
|
|
141
|
+
* Programmatically sets the toggle state of the button when used as a toggle button. If not set, the toggle state will be managed internally.
|
|
142
|
+
*
|
|
143
|
+
* Defaults to **false**.
|
|
144
|
+
*/
|
|
145
|
+
active: a.bool,
|
|
146
|
+
/**
|
|
147
|
+
* Accessibility label for assistive technologies.
|
|
148
|
+
*
|
|
149
|
+
* Defaults to **null**.
|
|
150
|
+
*/
|
|
151
|
+
ariaLabel: a.string,
|
|
152
|
+
/**
|
|
153
|
+
* Id of an element serving as a label for this IconButton instance. Used by assistive technologies.
|
|
154
|
+
*
|
|
155
|
+
* Defaults to **null**.
|
|
156
|
+
*/
|
|
157
|
+
ariaLabelledBy: a.string,
|
|
158
|
+
/**
|
|
159
|
+
* The custom icon button notification badge to be rendered.
|
|
160
|
+
*
|
|
161
|
+
* Defaults to **undefined**.
|
|
162
|
+
*/
|
|
163
|
+
badge: a.node,
|
|
164
|
+
/**
|
|
165
|
+
* The placement of the notification badge on the icon to start. It will flip to the opposite side if there is no room.
|
|
166
|
+
*
|
|
167
|
+
* Defaults to **'right-start'**.
|
|
168
|
+
*/
|
|
169
|
+
badgePlacement: a.oneOf(["right-start", "left-start"]),
|
|
170
|
+
/**
|
|
171
|
+
* The content when when using the IconButton normally. Expects an `Icon` component. For toggle button functionality, use `toggleOn` and `toggleOff` instead.
|
|
172
|
+
*
|
|
173
|
+
* Defaults to **null**.
|
|
174
|
+
*/
|
|
175
|
+
children: a.node,
|
|
176
|
+
/**
|
|
177
|
+
* The css class name to be passed through to the component markup.
|
|
178
|
+
*
|
|
179
|
+
* Defaults to **undefined**.
|
|
180
|
+
*/
|
|
181
|
+
className: a.string,
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated _Use iconSize='small' instead._
|
|
184
|
+
*
|
|
185
|
+
* Enables a smaller IconButton.
|
|
186
|
+
*
|
|
187
|
+
* Defaults to **undefined**.
|
|
188
|
+
*/
|
|
189
|
+
dense: Rn(a.bool, "IconButton", 'Use iconSize="small" instead.'),
|
|
190
|
+
/**
|
|
191
|
+
* Disables the icon button.
|
|
192
|
+
*
|
|
193
|
+
* Defaults to **false**.
|
|
194
|
+
*/
|
|
195
|
+
disabled: a.bool,
|
|
196
|
+
/**
|
|
197
|
+
* For filled variants, choose between the two emphasis levels for icon Button to improve visual hierarchy and user interface clarity
|
|
198
|
+
*
|
|
199
|
+
* Defaults to **'high'**.
|
|
200
|
+
*/
|
|
201
|
+
emphasis: a.oneOf(["high", "low"]),
|
|
202
|
+
/**
|
|
203
|
+
* For simple use-cases, this will automatically create the icon object. Does not work with `toggle='true'`
|
|
204
|
+
*
|
|
205
|
+
* Defaults to **null**.
|
|
206
|
+
*/
|
|
207
|
+
icon: a.oneOfType([a.string, a.node]),
|
|
208
|
+
/**
|
|
209
|
+
* Pass props to the internal Icon instance. Ignored if you pass your own object.
|
|
210
|
+
*
|
|
211
|
+
* Defaults to **undefined**.
|
|
212
|
+
*/
|
|
213
|
+
iconProps: a.object,
|
|
214
|
+
/**
|
|
215
|
+
* One of 'xsmall', 'small', 'medium', 'large', and 'xlarge' will change the size of the icon. Defaults to medium.
|
|
216
|
+
*
|
|
217
|
+
* Defaults to **'medium'**.
|
|
218
|
+
*/
|
|
219
|
+
iconSize: a.oneOf(["xsmall", "small", "medium", "large", "xlarge"]),
|
|
220
|
+
/**
|
|
221
|
+
* Choose between the classic Material Icons (default), newer Material Symbols, or custom.
|
|
222
|
+
*
|
|
223
|
+
* Defaults to **'material-icons'**.
|
|
224
|
+
*/
|
|
225
|
+
iconSource: a.oneOf(["material-icons", "material-symbols"]),
|
|
226
|
+
/**
|
|
227
|
+
* The material icon type/style to be use. NOTE: Not all icons have every type and material-symbols only support outlined, rounded, and sharp. To see which icons are available for different types see [Material Icons docs](https://material.io/tools/icons)
|
|
228
|
+
*
|
|
229
|
+
* Defaults to **'filled'**.
|
|
230
|
+
*/
|
|
231
|
+
iconType: a.oneOf(["filled", "outlined", "rounded", "two-tone", "sharp"]),
|
|
232
|
+
/**
|
|
233
|
+
* Disables the hover effect.
|
|
234
|
+
*
|
|
235
|
+
* Defaults to **false**.
|
|
236
|
+
*/
|
|
237
|
+
noHover: a.bool,
|
|
238
|
+
/**
|
|
239
|
+
* Fired when the user clicks the IconButton, will return toggle state, if applicable.
|
|
240
|
+
*
|
|
241
|
+
* Defaults to **null**.
|
|
242
|
+
*/
|
|
243
|
+
onClick: a.func,
|
|
244
|
+
/**
|
|
245
|
+
* TabIndex of the button.
|
|
246
|
+
*
|
|
247
|
+
* Defaults to **0**.
|
|
248
|
+
*/
|
|
249
|
+
tabIndex: a.number,
|
|
250
|
+
/**
|
|
251
|
+
* By default a button will be rendered, this allows another tag/component to be used instead. A block type element/component is suggested.
|
|
252
|
+
*
|
|
253
|
+
* Defaults to **null**.
|
|
254
|
+
*/
|
|
255
|
+
tag: a.oneOfType([a.string, a.elementType, a.instanceOf(I.Component)]),
|
|
256
|
+
/**
|
|
257
|
+
* 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.
|
|
258
|
+
*
|
|
259
|
+
* Defaults to **null**.
|
|
260
|
+
*/
|
|
261
|
+
toggleOff: a.node,
|
|
262
|
+
/**
|
|
263
|
+
* 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.
|
|
264
|
+
*
|
|
265
|
+
* Defaults to **null**.
|
|
266
|
+
*/
|
|
267
|
+
toggleOffAriaLabel: a.string,
|
|
268
|
+
/**
|
|
269
|
+
* 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`.
|
|
270
|
+
*
|
|
271
|
+
* Defaults to **null**.
|
|
272
|
+
*/
|
|
273
|
+
toggleOffAriaLabelledBy: a.string,
|
|
274
|
+
/**
|
|
275
|
+
* 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.
|
|
276
|
+
*
|
|
277
|
+
* Defaults to **null**.
|
|
278
|
+
*/
|
|
279
|
+
toggleOn: a.node,
|
|
280
|
+
/**
|
|
281
|
+
* 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.
|
|
282
|
+
*
|
|
283
|
+
* Defaults to **null**.
|
|
284
|
+
*/
|
|
285
|
+
toggleOnAriaLabel: a.string,
|
|
286
|
+
/**
|
|
287
|
+
* 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`.
|
|
288
|
+
*
|
|
289
|
+
* Defaults to **null**.
|
|
290
|
+
*/
|
|
291
|
+
toggleOnAriaLabelledBy: a.string,
|
|
292
|
+
/**
|
|
293
|
+
* 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.
|
|
294
|
+
*
|
|
295
|
+
* Defaults to **empty string**.
|
|
296
|
+
*/
|
|
297
|
+
variant: En(a.oneOf(["", "filled-danger-alt", "filled-danger", "filled-primary", "filled-secondary", "filled-on-primary", "filled-on-secondary", "filled-on-unknown-black", "filled-on-unknown-white", "filled-on-unknown-surface", "color-primary", "color-secondary", "color-on-primary", "color-on-secondary", "color-on-dark", "color-on-unknown-black", "color-on-unknown-white", "color-on-unknown-surface", "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','filled-on-primary','filled-on-secondary','filled-on-unknown-black','filled-on-unknown-white','filled-on-unknown-surface','color-primary','color-secondary','color-on-primary','color-on-secondary','color-on-dark','color-on-unknown-black','color-on-unknown-white','color-on-unknown-surface','secondary-on-surface'.")
|
|
298
|
+
}, Hn = {
|
|
299
|
+
active: !1,
|
|
300
|
+
ariaLabel: null,
|
|
301
|
+
ariaLabelledBy: null,
|
|
302
|
+
badge: void 0,
|
|
303
|
+
badgePlacement: "right-start",
|
|
304
|
+
children: null,
|
|
305
|
+
className: void 0,
|
|
306
|
+
dense: void 0,
|
|
307
|
+
disabled: !1,
|
|
308
|
+
emphasis: "high",
|
|
309
|
+
icon: null,
|
|
310
|
+
iconSize: "medium",
|
|
311
|
+
iconSource: "material-icons",
|
|
312
|
+
iconType: "filled",
|
|
313
|
+
noHover: !1,
|
|
314
|
+
onClick: null,
|
|
315
|
+
tabIndex: 0,
|
|
316
|
+
tag: null,
|
|
317
|
+
toggleOff: null,
|
|
318
|
+
toggleOffAriaLabel: null,
|
|
319
|
+
toggleOffAriaLabelledBy: null,
|
|
320
|
+
toggleOn: null,
|
|
321
|
+
toggleOnAriaLabel: null,
|
|
322
|
+
toggleOnAriaLabelledBy: null,
|
|
323
|
+
variant: ""
|
|
324
|
+
}, jn = ["active", "ariaLabel", "ariaLabelledBy", "badge", "badgePlacement", "children", "className", "dense", "disabled", "emphasis", "icon", "iconSize", "iconType", "onClick", "noHover", "tabIndex", "iconSource", "tag", "toggleOff", "toggleOffAriaLabel", "toggleOffAriaLabelledBy", "toggleOn", "toggleOnAriaLabel", "toggleOnAriaLabelledBy", "variant", "iconProps"], i = Hn, pn = /* @__PURE__ */ Pn(function(e, l) {
|
|
325
|
+
var o = e.active, c = o === void 0 ? i.active : o, r = e.ariaLabel, u = r === void 0 ? i.ariaLabel : r, w = e.ariaLabelledBy, N = w === void 0 ? i.ariaLabelledBy : w, $ = e.badge, P = $ === void 0 ? i.badge : $, S = e.badgePlacement, bn = S === void 0 ? i.badgePlacement : S, E = e.children, R = E === void 0 ? i.children : E, D = e.className, mn = D === void 0 ? i.className : D, x = e.dense, vn = x === void 0 ? i.dense : x, F = e.disabled, yn = F === void 0 ? i.disabled : F, M = e.emphasis, z = M === void 0 ? i.emphasis : M, H = e.icon, j = H === void 0 ? i.icon : H, U = e.iconSize, An = U === void 0 ? i.iconSize : U, G = e.iconType, hn = G === void 0 ? i.iconType : G, V = e.onClick, O = V === void 0 ? i.onClick : V, W = e.noHover, On = W === void 0 ? i.noHover : W, q = e.tabIndex, Ln = q === void 0 ? i.tabIndex : q, J = e.iconSource, _n = J === void 0 ? i.iconSource : J, K = e.tag, kn = K === void 0 ? i.tag : K, Q = e.toggleOff, X = Q === void 0 ? i.toggleOff : Q, Y = e.toggleOffAriaLabel, L = Y === void 0 ? i.toggleOffAriaLabel : Y, Z = e.toggleOffAriaLabelledBy, _ = Z === void 0 ? i.toggleOffAriaLabelledBy : Z, nn = e.toggleOn, en = nn === void 0 ? i.toggleOn : nn, on = e.toggleOnAriaLabel, k = on === void 0 ? i.toggleOnAriaLabel : on, an = e.toggleOnAriaLabelledBy, C = an === void 0 ? i.toggleOnAriaLabelledBy : an, tn = e.variant, n = tn === void 0 ? i.variant : tn, Cn = e.iconProps, Bn = Nn(e, jn), v = B(), y = B(), m = B(), g = en && X, ln = n && dn(n).call(n, "filled") > -1, p = An;
|
|
326
|
+
p === "medium" && vn && (p = "small"), P && (p === "small" || p === "xsmall") && (p = "medium"), Sn(l, function() {
|
|
327
|
+
return v.current;
|
|
328
|
+
}, []);
|
|
329
|
+
var Tn = A("lmnt", "lmnt-icon-button", "mdc-icon-button", On && "lmnt-icon-button__no-hover", ln && z === "low" && "lmnt-icon-button--emphasis-low", ln && z === "high" && "lmnt-icon-button--emphasis-high", (n === "primary" || n === "primary-alt" || n === "secondary" || n === "danger" || n === "danger-alt" || (n == null ? void 0 : dn(n).call(n, "filled-")) === 0) && "lmnt-icon-button--fill", (n === "danger-alt" || n === "filled-danger-alt") && "lmnt-icon-button--fill-danger-alt", (n === "danger" || n === "filled-danger") && "lmnt-icon-button--fill-danger", (n === "primary" || n === "filled-primary") && "lmnt-icon-button--fill-primary", (n === "primary-alt" || n === "filled-secondary") && "lmnt-icon-button--fill-secondary", (n === "secondary-alt" || n === "color-on-dark") && "lmnt-icon-button--color-on-dark", n === "color-primary" && "lmnt-icon-button--color-primary", n === "color-secondary" && "lmnt-icon-button--color-secondary", n === "color-on-unknown-black" && "lmnt-icon-button--color-on-unknown-black", n === "secondary-on-surface" && "lmnt-icon-button--secondary-on-surface", n === "filled-on-primary" && "lmnt-icon-button--fill-on-primary", n === "filled-on-secondary" && "lmnt-icon-button--fill-on-secondary", n === "filled-on-surface" && "lmnt-icon-button--fill-on-surface", n === "filled-on-unknown-black" && "lmnt-icon-button--fill-on-unknown-black", n === "filled-on-unknown-white" && "lmnt-icon-button--fill-on-unknown-white", n === "filled-on-unknown-surface" && "lmnt-icon-button--fill-on-unknown-surface", n === "color-on-primary" && "lmnt-icon-button--color-on-primary", n === "color-on-secondary" && "lmnt-icon-button--color-on-secondary", n === "color-on-unknown-white" && "lmnt-icon-button--color-on-unknown-white", n === "color-on-unknown-surface" && "lmnt-icon-button--color-on-unknown-surface", p && "lmnt-icon-button--".concat(p), mn);
|
|
330
|
+
cn(function() {
|
|
331
|
+
return g ? m.current = Mn.attachTo(v.current) : (y.current = fn.attachTo(v.current), y.current.unbounded = !0), function() {
|
|
332
|
+
g ? m.current.destroy() : y.current.destroy();
|
|
333
|
+
};
|
|
334
|
+
}, [m, g, y]), cn(function() {
|
|
335
|
+
g && (m.current.on = c);
|
|
336
|
+
}, [c, g, m]);
|
|
337
|
+
var In = function(d) {
|
|
338
|
+
O && (g ? O(m.current.on, d) : O(d));
|
|
339
|
+
}, wn = kn || "button";
|
|
340
|
+
return /* @__PURE__ */ I.createElement(wn, rn({
|
|
341
|
+
"aria-label": u,
|
|
342
|
+
"aria-labelledby": N,
|
|
343
|
+
"data-aria-label-on": k || C || u,
|
|
344
|
+
"data-aria-label-off": L || _ || u,
|
|
345
|
+
onClick: In,
|
|
346
|
+
ref: v,
|
|
347
|
+
className: Tn,
|
|
348
|
+
disabled: yn,
|
|
349
|
+
tabIndex: Ln
|
|
350
|
+
}, Bn), j && /* @__PURE__ */ I.createElement($n, rn({
|
|
351
|
+
badge: P,
|
|
352
|
+
badgePlacement: bn,
|
|
353
|
+
icon: j,
|
|
354
|
+
iconSize: p,
|
|
355
|
+
iconSource: _n,
|
|
356
|
+
iconType: hn
|
|
357
|
+
}, Cn)), R && T(R, function(t) {
|
|
358
|
+
var d, s;
|
|
359
|
+
return {
|
|
360
|
+
className: A("mdc-icon-button__icon", t == null || (d = t.props) === null || d === void 0 ? void 0 : d.className),
|
|
361
|
+
"aria-hidden": (t == null || (s = t.props) === null || s === void 0 ? void 0 : s["aria-hidden"]) || u || N
|
|
362
|
+
};
|
|
363
|
+
}), g && c && T(en, function(t) {
|
|
364
|
+
var d, s, b;
|
|
365
|
+
return {
|
|
366
|
+
className: A("mdc-icon-button__icon", t == null || (d = t.props) === null || d === void 0 ? void 0 : d.className),
|
|
367
|
+
"aria-label": (t == null || (s = t.props) === null || s === void 0 ? void 0 : s["aria-label"]) || k || C || u,
|
|
368
|
+
"aria-hidden": (t == null || (b = t.props) === null || b === void 0 ? void 0 : b["aria-hidden"]) || k || C || u
|
|
369
|
+
};
|
|
370
|
+
}), g && !c && T(X, function(t) {
|
|
371
|
+
var d, s, b;
|
|
372
|
+
return {
|
|
373
|
+
className: A("mdc-icon-button__icon", t == null || (d = t.props) === null || d === void 0 ? void 0 : d.className),
|
|
374
|
+
"aria-label": (t == null || (s = t.props) === null || s === void 0 ? void 0 : s["aria-label"]) || L || _ || u,
|
|
375
|
+
"aria-hidden": (t == null || (b = t.props) === null || b === void 0 ? void 0 : b["aria-hidden"]) || L || _ || u
|
|
376
|
+
};
|
|
377
|
+
}));
|
|
378
|
+
});
|
|
379
|
+
pn.displayName = "IconButton";
|
|
380
|
+
pn.propTypes = zn;
|
|
381
|
+
export {
|
|
382
|
+
pn as I
|
|
383
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as M, c as D, a as E, b as x, d as V, P as e } from "./index-
|
|
1
|
+
import { _ as M, c as D, a as E, b as x, d as V, P as e } from "./index-_-9ybP20.js";
|
|
2
2
|
import W, { forwardRef as I, useMemo as k, useRef as el, useImperativeHandle as rl, useContext as al, createContext as tl } from "react";
|
|
3
|
-
import { d as nl } from "./index.es-
|
|
4
|
-
import { _ as B, a as H, b as F, c as J, d as T, e as S, f as L } from "./defineProperty-
|
|
3
|
+
import { d as nl } from "./index.es-DRC-9PLs.js";
|
|
4
|
+
import { _ as B, a as H, b as F, c as J, d as T, e as S, f as L } from "./defineProperty-SoB5opr-.js";
|
|
5
5
|
var Q = /* @__PURE__ */ tl({}), il = {
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated _Use `variant`='airy' instead._
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as w, a as R, c as D, b as g, d as I, P as d } from "./index-
|
|
2
|
-
import { _ as x, a as v, b as E, c as S, d as _, e as f, f as k } from "./defineProperty-
|
|
1
|
+
import { _ as w, a as R, c as D, b as g, d as I, P as d } from "./index-_-9ybP20.js";
|
|
2
|
+
import { _ as x, a as v, b as E, c as S, d as _, e as f, f as k } from "./defineProperty-SoB5opr-.js";
|
|
3
3
|
import q, { forwardRef as H, useMemo as K, useRef as M, useImperativeHandle as W } from "react";
|
|
4
4
|
var z = {
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as P, b as T, c as A, d as S, e as I, _ as g } from "./slicedToArray-
|
|
2
|
-
import { _ as $ } from "./es.string.iterator-
|
|
1
|
+
import { a as P, b as T, c as A, d as S, e as I, _ as g } from "./slicedToArray-C2Ed3239.js";
|
|
2
|
+
import { _ as $ } from "./es.string.iterator-BrOvr7F6.js";
|
|
3
3
|
import i, { forwardRef as E, useState as R, useRef as w, useImperativeHandle as C, useEffect as x } from "react";
|
|
4
4
|
import D from "react-dom";
|
|
5
|
-
import { g as p, h as H } from "./index.es-
|
|
6
|
-
import { P as a } from "./index-
|
|
5
|
+
import { g as p, h as H } from "./index.es-DRC-9PLs.js";
|
|
6
|
+
import { P as a } from "./index-_-9ybP20.js";
|
|
7
7
|
function M(e) {
|
|
8
8
|
if (P(e)) return T(e);
|
|
9
9
|
}
|
|
@@ -54,8 +54,7 @@ var k = {
|
|
|
54
54
|
}
|
|
55
55
|
else
|
|
56
56
|
t(r || o);
|
|
57
|
-
}, [r]),
|
|
58
|
-
/* @__PURE__ */ i.createElement(i.Fragment, null, b || !m ? s : /* @__PURE__ */ D.createPortal(s, m));
|
|
57
|
+
}, [r]), /* @__PURE__ */ i.createElement(i.Fragment, null, b || !m ? s : /* @__PURE__ */ D.createPortal(s, m));
|
|
59
58
|
});
|
|
60
59
|
l.displayName = "Portal";
|
|
61
60
|
l.propTypes = k;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as b, a as y, c as C, P as l } from "./index-
|
|
1
|
+
import { _ as b, a as y, c as C, P as l } from "./index-_-9ybP20.js";
|
|
2
2
|
import I, { forwardRef as _, useRef as f, useImperativeHandle as L, useEffect as p } from "react";
|
|
3
3
|
import { b as h, c as m } from "./tslib.es6-BDCynO9F.js";
|
|
4
4
|
import { M as T, a as N } from "./component-By6nyiBU.js";
|