@hortiview/default-components 1.4.3 → 1.5.0
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 +51 -0
- package/dist/{Iconify-CUZc8WnW.js → Iconify-D3gVmKx3.js} +9 -8
- package/dist/{InfoCard-CFmkh7DJ.js → InfoCard-Ba-VFnki.js} +6 -6
- package/dist/{LoadingSpinner-DVBQ1tGJ.js → LoadingSpinner-CmwCv7BO.js} +27 -26
- package/dist/{OfflineView-DHtzNLwt-BmxTfGZq.js → OfflineView-CIwV08EQ-BClnJRzV.js} +4 -4
- package/dist/assets/DefaultAllowedComponent.css +1 -0
- package/dist/assets/DefaultFormNumber.css +1 -1
- package/dist/assets/DefaultFormSelect.css +1 -1
- package/dist/assets/GenericTable.css +1 -1
- package/dist/component-Bz_dtX1r-DqCAj-DR.js +304 -0
- package/dist/{component-DsB0poTj-CeLHB9Ok.js → component-DEJuY56h-CYiwt7Ga.js} +6 -5
- package/dist/components/DefaultAllowedComponent/DefaultAllowedComponent.d.ts +11 -0
- package/dist/components/DefaultAllowedComponent/DefaultAllowedComponent.js +51 -0
- package/dist/components/DefaultFormNumber/DefaultFormNumber.js +574 -555
- package/dist/components/DefaultFormSelect/DefaultFormSelect.js +85 -85
- package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +2 -2
- package/dist/components/GenericTable/GenericTable.js +9575 -8767
- package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
- package/dist/components/HealthChecks/DefaultHealthCheck.js +2 -2
- package/dist/components/HealthChecks/IotServiceHealthCheck.js +2 -2
- package/dist/components/HealthChecks/PlatformHealthCheck.js +2 -2
- package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +2 -2
- package/dist/components/OfflineView/OfflineView.js +2 -2
- package/dist/{index.es-IXyb5F6n-B5afcHX8.js → correct-is-regexp-logic-Y0ToWEjF-pByZFQLo.js} +148 -106
- package/dist/{index.es-Cq04gn3U-Bvzrqtm6.js → index.es--C-VLspF-B3Cy1zrT.js} +48 -47
- package/dist/{index.es-DENZVv7_-PUEN9sIa.js → index.es-B74L_Dje-mYAvKwSb.js} +26 -25
- package/dist/{index.es-0QJC9VS2-CNPew9LK.js → index.es-B8p8KCdj--cmqwwUJ.js} +16 -16
- package/dist/{index.es-Bg8hxXM8-BlFd894m.js → index.es-BPv5dCFQ-BmH1Hq7_.js} +246 -285
- package/dist/{index.es-Bo1Rhtyb-B650l9Yk.js → index.es-BanVdXEd-BYOBCuJj.js} +1 -1
- package/dist/{index.es-BGordhUK-C36NK84Q.js → index.es-SjZ_-d7U-HvaOH_Z0.js} +46 -46
- package/dist/{index.es-CK4oZMKs-Da8pin7D.js → index.es-nwjKmW7--CUlbl1RR.js} +4791 -4493
- package/dist/{isTypedArray-Dw_IY7Zq-BZ-4N8-Z.js → isTypedArray-DziahYkI-Cw9ssvDH.js} +61 -61
- package/dist/locales/en-US.js +16 -14
- package/dist/locales/en-US.json.d.ts +3 -0
- package/dist/locales/es-MX.js +16 -14
- package/dist/locales/es-MX.json.d.ts +3 -0
- package/dist/locales/tr-TR.js +17 -15
- package/dist/locales/tr-TR.json.d.ts +3 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +24 -22
- package/dist/{slicedToArray-BWk2gTCn-Cfzj7tjm.js → slicedToArray-ByMQIs5x-BsvSjTDl.js} +179 -179
- package/dist/{useHelperText-3ahu6tTS.js → useHelperText-Cqx6ggnc.js} +73 -72
- package/dist/useTranslation-BQQybhSd.js +5042 -0
- package/package.json +5 -33
- package/dist/useTranslation-CVaIJbcK.js +0 -5277
- /package/dist/assets/{OfflineView-DHtzNLwt.css → OfflineView-CIwV08EQ.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { G as r } from "../../InfoCard-
|
|
2
|
+
import { G as r } from "../../InfoCard-Ba-VFnki.js";
|
|
3
3
|
import { InternationalizationWrapper as o } from "../InternationalizationWrapper/InternationalizationWrapper.js";
|
|
4
|
-
import { u as i } from "../../useTranslation-
|
|
4
|
+
import { u as i } from "../../useTranslation-BQQybhSd.js";
|
|
5
5
|
const m = ({ ...e }) => {
|
|
6
6
|
const { t } = i();
|
|
7
7
|
return /* @__PURE__ */ a(o, { children: /* @__PURE__ */ a(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { G as o } from "../../InfoCard-
|
|
2
|
+
import { G as o } from "../../InfoCard-Ba-VFnki.js";
|
|
3
3
|
import { InternationalizationWrapper as a } from "../InternationalizationWrapper/InternationalizationWrapper.js";
|
|
4
|
-
import { u as i } from "../../useTranslation-
|
|
4
|
+
import { u as i } from "../../useTranslation-BQQybhSd.js";
|
|
5
5
|
const p = ({ ...r }) => {
|
|
6
6
|
const { t } = i();
|
|
7
7
|
return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { G as i } from "../../InfoCard-
|
|
2
|
+
import { G as i } from "../../InfoCard-Ba-VFnki.js";
|
|
3
3
|
import { InternationalizationWrapper as o } from "../InternationalizationWrapper/InternationalizationWrapper.js";
|
|
4
|
-
import { u as a } from "../../useTranslation-
|
|
4
|
+
import { u as a } from "../../useTranslation-BQQybhSd.js";
|
|
5
5
|
const m = ({ ...r }) => {
|
|
6
6
|
const { t } = a();
|
|
7
7
|
return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { G as e } from "../../InfoCard-
|
|
2
|
+
import { G as e } from "../../InfoCard-Ba-VFnki.js";
|
|
3
3
|
import { InternationalizationWrapper as a } from "../InternationalizationWrapper/InternationalizationWrapper.js";
|
|
4
|
-
import { u as l } from "../../useTranslation-
|
|
4
|
+
import { u as l } from "../../useTranslation-BQQybhSd.js";
|
|
5
5
|
const h = ({ isOutlined: o }) => {
|
|
6
6
|
const { t } = l();
|
|
7
7
|
return /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { N as r } from "../../LoadingSpinner-
|
|
2
|
+
import { N as r } from "../../LoadingSpinner-CmwCv7BO.js";
|
|
3
3
|
import { InternationalizationWrapper as a } from "../InternationalizationWrapper/InternationalizationWrapper.js";
|
|
4
|
-
import { u as t } from "../../useTranslation-
|
|
4
|
+
import { u as t } from "../../useTranslation-BQQybhSd.js";
|
|
5
5
|
const c = ({ ...i }) => {
|
|
6
6
|
const { t: e } = t();
|
|
7
7
|
return /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { j as o } from "../../OfflineView-
|
|
2
|
+
import { j as o } from "../../OfflineView-CIwV08EQ-BClnJRzV.js";
|
|
3
3
|
import { InternationalizationWrapper as r } from "../InternationalizationWrapper/InternationalizationWrapper.js";
|
|
4
|
-
import { u as n } from "../../useTranslation-
|
|
4
|
+
import { u as n } from "../../useTranslation-BQQybhSd.js";
|
|
5
5
|
const a = ({ ...e }) => {
|
|
6
6
|
const { t } = n();
|
|
7
7
|
return /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { r as Fe, q as He, e as y, h as se, m as je, B as C, k as he, aa as ze, l as de, a4 as Ue, t as a, n as $e, A as ve, M as Me, ab as qe } from "./useTranslation-BQQybhSd.js";
|
|
2
|
+
import k, { forwardRef as Ge, useRef as B, useImperativeHandle as Ve, useEffect as ue } from "react";
|
|
3
|
+
import { f as We, a as Xe } from "./component-Bz_dtX1r-DqCAj-DR.js";
|
|
4
|
+
import { U as ye } from "./component-DEJuY56h-CYiwt7Ga.js";
|
|
5
|
+
var fe, ge;
|
|
6
|
+
function Ye() {
|
|
7
|
+
return ge || (ge = 1, fe = /* @__PURE__ */ ze()), fe;
|
|
7
8
|
}
|
|
8
|
-
var
|
|
9
|
-
const
|
|
9
|
+
var Je = Ye();
|
|
10
|
+
const Ke = /* @__PURE__ */ He(Je);
|
|
10
11
|
/**
|
|
11
12
|
* @license
|
|
12
13
|
* Copyright 2018 Google Inc.
|
|
@@ -61,27 +62,27 @@ var A = {
|
|
|
61
62
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
62
63
|
* THE SOFTWARE.
|
|
63
64
|
*/
|
|
64
|
-
var
|
|
65
|
+
var Ae = (
|
|
65
66
|
/** @class */
|
|
66
67
|
function(e) {
|
|
67
|
-
|
|
68
|
-
function
|
|
69
|
-
var
|
|
70
|
-
return
|
|
68
|
+
he(t, e);
|
|
69
|
+
function t(n) {
|
|
70
|
+
var l = e.call(this, de(de({}, t.defaultAdapter), n)) || this;
|
|
71
|
+
return l.hasToggledAriaLabel = !1, l;
|
|
71
72
|
}
|
|
72
|
-
return Object.defineProperty(
|
|
73
|
+
return Object.defineProperty(t, "cssClasses", {
|
|
73
74
|
get: function() {
|
|
74
75
|
return A;
|
|
75
76
|
},
|
|
76
77
|
enumerable: !1,
|
|
77
78
|
configurable: !0
|
|
78
|
-
}), Object.defineProperty(
|
|
79
|
+
}), Object.defineProperty(t, "strings", {
|
|
79
80
|
get: function() {
|
|
80
81
|
return f;
|
|
81
82
|
},
|
|
82
83
|
enumerable: !1,
|
|
83
84
|
configurable: !0
|
|
84
|
-
}), Object.defineProperty(
|
|
85
|
+
}), Object.defineProperty(t, "defaultAdapter", {
|
|
85
86
|
get: function() {
|
|
86
87
|
return {
|
|
87
88
|
addClass: function() {
|
|
@@ -102,26 +103,26 @@ var ge = (
|
|
|
102
103
|
},
|
|
103
104
|
enumerable: !1,
|
|
104
105
|
configurable: !0
|
|
105
|
-
}),
|
|
106
|
-
var n = this.adapter.getAttr(f.DATA_ARIA_LABEL_ON),
|
|
107
|
-
if (n &&
|
|
106
|
+
}), t.prototype.init = function() {
|
|
107
|
+
var n = this.adapter.getAttr(f.DATA_ARIA_LABEL_ON), l = this.adapter.getAttr(f.DATA_ARIA_LABEL_OFF);
|
|
108
|
+
if (n && l) {
|
|
108
109
|
if (this.adapter.getAttr(f.ARIA_PRESSED) !== null)
|
|
109
110
|
throw new Error("MDCIconButtonToggleFoundation: Button should not set `aria-pressed` if it has a toggled aria label.");
|
|
110
111
|
this.hasToggledAriaLabel = !0;
|
|
111
112
|
} else
|
|
112
113
|
this.adapter.setAttr(f.ARIA_PRESSED, String(this.isOn()));
|
|
113
|
-
},
|
|
114
|
+
}, t.prototype.handleClick = function() {
|
|
114
115
|
this.toggle(), this.adapter.notifyChange({ isOn: this.isOn() });
|
|
115
|
-
},
|
|
116
|
+
}, t.prototype.isOn = function() {
|
|
116
117
|
return this.adapter.hasClass(A.ICON_BUTTON_ON);
|
|
117
|
-
},
|
|
118
|
+
}, t.prototype.toggle = function(n) {
|
|
118
119
|
if (n === void 0 && (n = !this.isOn()), n ? this.adapter.addClass(A.ICON_BUTTON_ON) : this.adapter.removeClass(A.ICON_BUTTON_ON), this.hasToggledAriaLabel) {
|
|
119
|
-
var
|
|
120
|
-
this.adapter.setAttr(f.ARIA_LABEL,
|
|
120
|
+
var l = n ? this.adapter.getAttr(f.DATA_ARIA_LABEL_ON) : this.adapter.getAttr(f.DATA_ARIA_LABEL_OFF);
|
|
121
|
+
this.adapter.setAttr(f.ARIA_LABEL, l || "");
|
|
121
122
|
} else
|
|
122
123
|
this.adapter.setAttr(f.ARIA_PRESSED, "" + n);
|
|
123
|
-
},
|
|
124
|
-
}(
|
|
124
|
+
}, t;
|
|
125
|
+
}(Xe)
|
|
125
126
|
);
|
|
126
127
|
/**
|
|
127
128
|
* @license
|
|
@@ -145,52 +146,52 @@ var ge = (
|
|
|
145
146
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
146
147
|
* THE SOFTWARE.
|
|
147
148
|
*/
|
|
148
|
-
var
|
|
149
|
+
var Qe = Ae.strings, Ze = (
|
|
149
150
|
/** @class */
|
|
150
151
|
function(e) {
|
|
151
|
-
|
|
152
|
-
function
|
|
152
|
+
he(t, e);
|
|
153
|
+
function t() {
|
|
153
154
|
var n = e !== null && e.apply(this, arguments) || this;
|
|
154
155
|
return n.rippleComponent = n.createRipple(), n;
|
|
155
156
|
}
|
|
156
|
-
return
|
|
157
|
-
return new
|
|
158
|
-
},
|
|
157
|
+
return t.attachTo = function(n) {
|
|
158
|
+
return new t(n);
|
|
159
|
+
}, t.prototype.initialSyncWithDOM = function() {
|
|
159
160
|
var n = this;
|
|
160
161
|
this.handleClick = function() {
|
|
161
162
|
n.foundation.handleClick();
|
|
162
163
|
}, this.listen("click", this.handleClick);
|
|
163
|
-
},
|
|
164
|
+
}, t.prototype.destroy = function() {
|
|
164
165
|
this.unlisten("click", this.handleClick), this.ripple.destroy(), e.prototype.destroy.call(this);
|
|
165
|
-
},
|
|
166
|
-
var n = this,
|
|
167
|
-
addClass: function(
|
|
168
|
-
return n.root.classList.add(
|
|
166
|
+
}, t.prototype.getDefaultFoundation = function() {
|
|
167
|
+
var n = this, l = {
|
|
168
|
+
addClass: function(c) {
|
|
169
|
+
return n.root.classList.add(c);
|
|
169
170
|
},
|
|
170
|
-
hasClass: function(
|
|
171
|
-
return n.root.classList.contains(
|
|
171
|
+
hasClass: function(c) {
|
|
172
|
+
return n.root.classList.contains(c);
|
|
172
173
|
},
|
|
173
|
-
notifyChange: function(
|
|
174
|
-
n.emit(
|
|
174
|
+
notifyChange: function(c) {
|
|
175
|
+
n.emit(Qe.CHANGE_EVENT, c);
|
|
175
176
|
},
|
|
176
|
-
removeClass: function(
|
|
177
|
-
return n.root.classList.remove(
|
|
177
|
+
removeClass: function(c) {
|
|
178
|
+
return n.root.classList.remove(c);
|
|
178
179
|
},
|
|
179
|
-
getAttr: function(
|
|
180
|
-
return n.root.getAttribute(
|
|
180
|
+
getAttr: function(c) {
|
|
181
|
+
return n.root.getAttribute(c);
|
|
181
182
|
},
|
|
182
|
-
setAttr: function(
|
|
183
|
-
return n.root.setAttribute(
|
|
183
|
+
setAttr: function(c, s) {
|
|
184
|
+
return n.root.setAttribute(c, s);
|
|
184
185
|
}
|
|
185
186
|
};
|
|
186
|
-
return new
|
|
187
|
-
}, Object.defineProperty(
|
|
187
|
+
return new Ae(l);
|
|
188
|
+
}, Object.defineProperty(t.prototype, "ripple", {
|
|
188
189
|
get: function() {
|
|
189
190
|
return this.rippleComponent;
|
|
190
191
|
},
|
|
191
192
|
enumerable: !1,
|
|
192
193
|
configurable: !0
|
|
193
|
-
}), Object.defineProperty(
|
|
194
|
+
}), Object.defineProperty(t.prototype, "on", {
|
|
194
195
|
get: function() {
|
|
195
196
|
return this.foundation.isOn();
|
|
196
197
|
},
|
|
@@ -199,12 +200,12 @@ var Ge = ge.strings, Me = (
|
|
|
199
200
|
},
|
|
200
201
|
enumerable: !1,
|
|
201
202
|
configurable: !0
|
|
202
|
-
}),
|
|
203
|
-
var n = new
|
|
203
|
+
}), t.prototype.createRipple = function() {
|
|
204
|
+
var n = new ye(this.root);
|
|
204
205
|
return n.unbounded = !0, n;
|
|
205
|
-
},
|
|
206
|
-
}(
|
|
207
|
-
),
|
|
206
|
+
}, t;
|
|
207
|
+
}(We)
|
|
208
|
+
), en = {
|
|
208
209
|
/**
|
|
209
210
|
* Programmatically sets the toggle state of the button when used as a toggle button. If not set, the toggle state will be managed internally.
|
|
210
211
|
*
|
|
@@ -254,7 +255,7 @@ var Ge = ge.strings, Me = (
|
|
|
254
255
|
*
|
|
255
256
|
* Defaults to **undefined**.
|
|
256
257
|
*/
|
|
257
|
-
dense:
|
|
258
|
+
dense: $e(a.bool, "IconButton", 'Use iconSize="small" instead.'),
|
|
258
259
|
/**
|
|
259
260
|
* Disables the icon button.
|
|
260
261
|
*
|
|
@@ -320,7 +321,7 @@ var Ge = ge.strings, Me = (
|
|
|
320
321
|
*
|
|
321
322
|
* Defaults to **null**.
|
|
322
323
|
*/
|
|
323
|
-
tag: a.oneOfType([a.string, a.elementType, a.instanceOf(
|
|
324
|
+
tag: a.oneOfType([a.string, a.elementType, a.instanceOf(k.Component)]),
|
|
324
325
|
/**
|
|
325
326
|
* 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.
|
|
326
327
|
*
|
|
@@ -362,8 +363,8 @@ var Ge = ge.strings, Me = (
|
|
|
362
363
|
*
|
|
363
364
|
* Defaults to **empty string**.
|
|
364
365
|
*/
|
|
365
|
-
variant:
|
|
366
|
-
},
|
|
366
|
+
variant: Ue(a.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'.")
|
|
367
|
+
}, nn = {
|
|
367
368
|
active: !1,
|
|
368
369
|
ariaLabel: null,
|
|
369
370
|
ariaLabelledBy: null,
|
|
@@ -389,64 +390,105 @@ var Ge = ge.strings, Me = (
|
|
|
389
390
|
toggleOnAriaLabel: null,
|
|
390
391
|
toggleOnAriaLabelledBy: null,
|
|
391
392
|
variant: ""
|
|
392
|
-
},
|
|
393
|
-
var n = e.active,
|
|
394
|
-
|
|
393
|
+
}, an = ["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"], r = nn, Oe = /* @__PURE__ */ Ge(function(e, t) {
|
|
394
|
+
var n = e.active, l = n === void 0 ? r.active : n, c = e.ariaLabel, s = c === void 0 ? r.ariaLabel : c, S = e.ariaLabelledBy, R = S === void 0 ? r.ariaLabelledBy : S, P = e.badge, w = P === void 0 ? r.badge : P, D = e.badgePlacement, Le = D === void 0 ? r.badgePlacement : D, x = e.children, F = x === void 0 ? r.children : x, H = e.className, _e = H === void 0 ? r.className : H, j = e.dense, Te = j === void 0 ? r.dense : j, z = e.disabled, Ce = z === void 0 ? r.disabled : z, U = e.emphasis, $ = U === void 0 ? r.emphasis : U, M = e.icon, q = M === void 0 ? r.icon : M, G = e.iconSize, Be = G === void 0 ? r.iconSize : G, V = e.iconType, Ne = V === void 0 ? r.iconType : V, W = e.onClick, X = W === void 0 ? r.onClick : W, Y = e.noHover, Ee = Y === void 0 ? r.noHover : Y, J = e.tabIndex, Ie = J === void 0 ? r.tabIndex : J, K = e.iconSource, ke = K === void 0 ? r.iconSource : K, Q = e.tag, Se = Q === void 0 ? r.tag : Q, Z = e.toggleOff, ee = Z === void 0 ? r.toggleOff : Z, ne = e.toggleOffAriaLabel, O = ne === void 0 ? r.toggleOffAriaLabel : ne, ae = e.toggleOffAriaLabelledBy, L = ae === void 0 ? r.toggleOffAriaLabelledBy : ae, te = e.toggleOn, oe = te === void 0 ? r.toggleOn : te, re = e.toggleOnAriaLabel, _ = re === void 0 ? r.toggleOnAriaLabel : re, ie = e.toggleOnAriaLabelledBy, T = ie === void 0 ? r.toggleOnAriaLabelledBy : ie, le = e.variant, o = le === void 0 ? r.variant : le, Re = e.iconProps, Pe = Fe(e, an), h = B(), v = B(), m = B(), g = oe && ee, ce = o && Ke(o).call(o, "filled") > -1, p = Be;
|
|
395
|
+
p === "medium" && Te && (p = "small"), w && (p === "small" || p === "xsmall") && (p = "medium"), Ve(t, function() {
|
|
395
396
|
return h.current;
|
|
396
397
|
}, []);
|
|
397
|
-
var
|
|
398
|
-
|
|
399
|
-
return g ? m.current =
|
|
400
|
-
g ? m.current.destroy() :
|
|
398
|
+
var we = y("lmnt", "lmnt-icon-button", "mdc-icon-button", Ee && "lmnt-icon-button__no-hover", ce && $ === "low" && "lmnt-icon-button--emphasis-low", ce && $ === "high" && "lmnt-icon-button--emphasis-high", (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", p && "lmnt-icon-button--".concat(p), _e);
|
|
399
|
+
ue(function() {
|
|
400
|
+
return g ? m.current = Ze.attachTo(h.current) : (v.current = ye.attachTo(h.current), v.current.unbounded = !0), function() {
|
|
401
|
+
g ? m.current.destroy() : v.current.destroy();
|
|
401
402
|
};
|
|
402
|
-
}, [m, g,
|
|
403
|
-
g && (m.current.on =
|
|
404
|
-
}, [
|
|
405
|
-
var
|
|
406
|
-
|
|
407
|
-
},
|
|
408
|
-
return /* @__PURE__ */
|
|
409
|
-
"aria-label":
|
|
410
|
-
"aria-labelledby":
|
|
411
|
-
"data-aria-label-on": _ ||
|
|
412
|
-
"data-aria-label-off": O || L ||
|
|
413
|
-
onClick:
|
|
403
|
+
}, [m, g, v]), ue(function() {
|
|
404
|
+
g && (m.current.on = l);
|
|
405
|
+
}, [l, g, m]);
|
|
406
|
+
var De = function(i) {
|
|
407
|
+
X && X(g ? m.current.on : i);
|
|
408
|
+
}, xe = Se || "button";
|
|
409
|
+
return /* @__PURE__ */ k.createElement(xe, se({
|
|
410
|
+
"aria-label": s,
|
|
411
|
+
"aria-labelledby": R,
|
|
412
|
+
"data-aria-label-on": _ || T || s,
|
|
413
|
+
"data-aria-label-off": O || L || s,
|
|
414
|
+
onClick: De,
|
|
414
415
|
ref: h,
|
|
415
|
-
className:
|
|
416
|
-
disabled:
|
|
417
|
-
tabIndex:
|
|
418
|
-
},
|
|
419
|
-
badge:
|
|
420
|
-
badgePlacement:
|
|
421
|
-
icon:
|
|
422
|
-
iconSize:
|
|
423
|
-
iconSource:
|
|
424
|
-
iconType:
|
|
425
|
-
},
|
|
426
|
-
var
|
|
416
|
+
className: we,
|
|
417
|
+
disabled: Ce,
|
|
418
|
+
tabIndex: Ie
|
|
419
|
+
}, Pe), q && /* @__PURE__ */ k.createElement(je, se({
|
|
420
|
+
badge: w,
|
|
421
|
+
badgePlacement: Le,
|
|
422
|
+
icon: q,
|
|
423
|
+
iconSize: p,
|
|
424
|
+
iconSource: ke,
|
|
425
|
+
iconType: Ne
|
|
426
|
+
}, Re)), F && C(F, function(i) {
|
|
427
|
+
var d, u;
|
|
427
428
|
return {
|
|
428
|
-
className:
|
|
429
|
-
"aria-hidden": (i == null || (
|
|
429
|
+
className: y("mdc-icon-button__icon", i == null || (d = i.props) === null || d === void 0 ? void 0 : d.className),
|
|
430
|
+
"aria-hidden": (i == null || (u = i.props) === null || u === void 0 ? void 0 : u["aria-hidden"]) || s || R
|
|
430
431
|
};
|
|
431
|
-
}), g &&
|
|
432
|
-
var
|
|
432
|
+
}), g && l && C(oe, function(i) {
|
|
433
|
+
var d, u, b;
|
|
433
434
|
return {
|
|
434
|
-
className:
|
|
435
|
-
"aria-label": (i == null || (
|
|
436
|
-
"aria-hidden": (i == null || (
|
|
435
|
+
className: y("mdc-icon-button__icon", i == null || (d = i.props) === null || d === void 0 ? void 0 : d.className),
|
|
436
|
+
"aria-label": (i == null || (u = i.props) === null || u === void 0 ? void 0 : u["aria-label"]) || _ || T || s,
|
|
437
|
+
"aria-hidden": (i == null || (b = i.props) === null || b === void 0 ? void 0 : b["aria-hidden"]) || _ || T || s
|
|
437
438
|
};
|
|
438
|
-
}), g && !
|
|
439
|
-
var
|
|
439
|
+
}), g && !l && C(ee, function(i) {
|
|
440
|
+
var d, u, b;
|
|
440
441
|
return {
|
|
441
|
-
className:
|
|
442
|
-
"aria-label": (i == null || (
|
|
443
|
-
"aria-hidden": (i == null || (
|
|
442
|
+
className: y("mdc-icon-button__icon", i == null || (d = i.props) === null || d === void 0 ? void 0 : d.className),
|
|
443
|
+
"aria-label": (i == null || (u = i.props) === null || u === void 0 ? void 0 : u["aria-label"]) || O || L || s,
|
|
444
|
+
"aria-hidden": (i == null || (b = i.props) === null || b === void 0 ? void 0 : b["aria-hidden"]) || O || L || s
|
|
444
445
|
};
|
|
445
446
|
}));
|
|
446
447
|
});
|
|
447
|
-
|
|
448
|
-
|
|
448
|
+
Oe.displayName = "IconButton";
|
|
449
|
+
Oe.propTypes = en;
|
|
450
|
+
var N, pe;
|
|
451
|
+
function tn() {
|
|
452
|
+
if (pe) return N;
|
|
453
|
+
pe = 1;
|
|
454
|
+
var e = /* @__PURE__ */ Me(), t = /* @__PURE__ */ qe(), n = /* @__PURE__ */ ve(), l = n("match");
|
|
455
|
+
return N = function(c) {
|
|
456
|
+
var s;
|
|
457
|
+
return e(c) && ((s = c[l]) !== void 0 ? !!s : t(c) === "RegExp");
|
|
458
|
+
}, N;
|
|
459
|
+
}
|
|
460
|
+
var E, be;
|
|
461
|
+
function sn() {
|
|
462
|
+
if (be) return E;
|
|
463
|
+
be = 1;
|
|
464
|
+
var e = /* @__PURE__ */ tn(), t = TypeError;
|
|
465
|
+
return E = function(n) {
|
|
466
|
+
if (e(n))
|
|
467
|
+
throw new t("The method doesn't accept regular expressions");
|
|
468
|
+
return n;
|
|
469
|
+
}, E;
|
|
470
|
+
}
|
|
471
|
+
var I, me;
|
|
472
|
+
function dn() {
|
|
473
|
+
if (me) return I;
|
|
474
|
+
me = 1;
|
|
475
|
+
var e = /* @__PURE__ */ ve(), t = e("match");
|
|
476
|
+
return I = function(n) {
|
|
477
|
+
var l = /./;
|
|
478
|
+
try {
|
|
479
|
+
"/./"[n](l);
|
|
480
|
+
} catch {
|
|
481
|
+
try {
|
|
482
|
+
return l[t] = !1, "/./"[n](l);
|
|
483
|
+
} catch {
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
return !1;
|
|
487
|
+
}, I;
|
|
488
|
+
}
|
|
449
489
|
export {
|
|
450
|
-
|
|
451
|
-
|
|
490
|
+
sn as h,
|
|
491
|
+
Ke as j,
|
|
492
|
+
Oe as p,
|
|
493
|
+
dn as q
|
|
452
494
|
};
|