@hortiview/shared-components 2.8.6 → 2.8.8
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 +12 -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/assets/FormSelect.css +1 -1
- 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 +53 -53
- 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,12 +1,13 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { M as
|
|
1
|
+
import { _ as ne, c as w, a as re, P as o } from "./index-Cpb-8cAN.js";
|
|
2
|
+
import { _ as ae } from "./slicedToArray-BWk2gTCn.js";
|
|
3
|
+
import { F as ie } from "./index.es-CKdJX75f.js";
|
|
4
|
+
import { I as oe } from "./index.es-CmF6xAUJ.js";
|
|
5
|
+
import u, { forwardRef as ce, useState as se, useRef as $, useImperativeHandle as de, useCallback as le, useEffect as k } from "react";
|
|
6
|
+
import { e as ue } from "./index.es-BXj90wb_.js";
|
|
7
|
+
import { b as z, c as b } from "./tslib.es6-BDCynO9F.js";
|
|
8
|
+
import { g as F } from "./util-DA21pZXj.js";
|
|
9
|
+
import { M as he, a as Ee } from "./component-neHBNHRu.js";
|
|
10
|
+
import { M as B, a as V, m as Ce, b as _e } from "./component-DsB0poTj.js";
|
|
10
11
|
/**
|
|
11
12
|
* @license
|
|
12
13
|
* Copyright 2016 Google Inc.
|
|
@@ -56,7 +57,7 @@ var f = {
|
|
|
56
57
|
TRANSITION_STATE_INDETERMINATE: "indeterminate",
|
|
57
58
|
TRANSITION_STATE_INIT: "init",
|
|
58
59
|
TRANSITION_STATE_UNCHECKED: "unchecked"
|
|
59
|
-
},
|
|
60
|
+
}, G = {
|
|
60
61
|
ANIM_END_LATCH_MS: 250
|
|
61
62
|
};
|
|
62
63
|
/**
|
|
@@ -81,33 +82,33 @@ var f = {
|
|
|
81
82
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
82
83
|
* THE SOFTWARE.
|
|
83
84
|
*/
|
|
84
|
-
var
|
|
85
|
+
var me = (
|
|
85
86
|
/** @class */
|
|
86
|
-
function(
|
|
87
|
-
|
|
88
|
-
function
|
|
89
|
-
var
|
|
90
|
-
return
|
|
87
|
+
function(i) {
|
|
88
|
+
z(t, i);
|
|
89
|
+
function t(e) {
|
|
90
|
+
var n = i.call(this, b(b({}, t.defaultAdapter), e)) || this;
|
|
91
|
+
return n.currentCheckState_ = c.TRANSITION_STATE_INIT, n.currentAnimationClass_ = "", n.animEndLatchTimer_ = 0, n.enableAnimationEndHandler_ = !1, n;
|
|
91
92
|
}
|
|
92
|
-
return Object.defineProperty(
|
|
93
|
+
return Object.defineProperty(t, "cssClasses", {
|
|
93
94
|
get: function() {
|
|
94
95
|
return f;
|
|
95
96
|
},
|
|
96
97
|
enumerable: !1,
|
|
97
98
|
configurable: !0
|
|
98
|
-
}), Object.defineProperty(
|
|
99
|
+
}), Object.defineProperty(t, "strings", {
|
|
99
100
|
get: function() {
|
|
100
101
|
return c;
|
|
101
102
|
},
|
|
102
103
|
enumerable: !1,
|
|
103
104
|
configurable: !0
|
|
104
|
-
}), Object.defineProperty(
|
|
105
|
+
}), Object.defineProperty(t, "numbers", {
|
|
105
106
|
get: function() {
|
|
106
|
-
return
|
|
107
|
+
return G;
|
|
107
108
|
},
|
|
108
109
|
enumerable: !1,
|
|
109
110
|
configurable: !0
|
|
110
|
-
}), Object.defineProperty(
|
|
111
|
+
}), Object.defineProperty(t, "defaultAdapter", {
|
|
111
112
|
get: function() {
|
|
112
113
|
return {
|
|
113
114
|
addClass: function() {
|
|
@@ -138,47 +139,47 @@ var Z = (
|
|
|
138
139
|
},
|
|
139
140
|
enumerable: !1,
|
|
140
141
|
configurable: !0
|
|
141
|
-
}),
|
|
142
|
+
}), t.prototype.init = function() {
|
|
142
143
|
this.currentCheckState_ = this.determineCheckState_(), this.updateAriaChecked_(), this.adapter.addClass(f.UPGRADED);
|
|
143
|
-
},
|
|
144
|
+
}, t.prototype.destroy = function() {
|
|
144
145
|
clearTimeout(this.animEndLatchTimer_);
|
|
145
|
-
},
|
|
146
|
+
}, t.prototype.setDisabled = function(e) {
|
|
146
147
|
this.adapter.setNativeControlDisabled(e), e ? this.adapter.addClass(f.DISABLED) : this.adapter.removeClass(f.DISABLED);
|
|
147
|
-
},
|
|
148
|
+
}, t.prototype.handleAnimationEnd = function() {
|
|
148
149
|
var e = this;
|
|
149
150
|
this.enableAnimationEndHandler_ && (clearTimeout(this.animEndLatchTimer_), this.animEndLatchTimer_ = setTimeout(function() {
|
|
150
151
|
e.adapter.removeClass(e.currentAnimationClass_), e.enableAnimationEndHandler_ = !1;
|
|
151
|
-
},
|
|
152
|
-
},
|
|
152
|
+
}, G.ANIM_END_LATCH_MS));
|
|
153
|
+
}, t.prototype.handleChange = function() {
|
|
153
154
|
this.transitionCheckState_();
|
|
154
|
-
},
|
|
155
|
+
}, t.prototype.transitionCheckState_ = function() {
|
|
155
156
|
if (this.adapter.hasNativeControl()) {
|
|
156
|
-
var e = this.currentCheckState_,
|
|
157
|
-
if (e !==
|
|
157
|
+
var e = this.currentCheckState_, n = this.determineCheckState_();
|
|
158
|
+
if (e !== n) {
|
|
158
159
|
this.updateAriaChecked_();
|
|
159
160
|
var r = c.TRANSITION_STATE_UNCHECKED, a = f.SELECTED;
|
|
160
|
-
|
|
161
|
+
n === r ? this.adapter.removeClass(a) : this.adapter.addClass(a), this.currentAnimationClass_.length > 0 && (clearTimeout(this.animEndLatchTimer_), this.adapter.forceLayout(), this.adapter.removeClass(this.currentAnimationClass_)), this.currentAnimationClass_ = this.getTransitionAnimationClass_(e, n), this.currentCheckState_ = n, this.adapter.isAttachedToDOM() && this.currentAnimationClass_.length > 0 && (this.adapter.addClass(this.currentAnimationClass_), this.enableAnimationEndHandler_ = !0);
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
|
-
},
|
|
164
|
-
var e = c.TRANSITION_STATE_INDETERMINATE,
|
|
165
|
-
return this.adapter.isIndeterminate() ? e : this.adapter.isChecked() ?
|
|
166
|
-
},
|
|
167
|
-
var r = c.TRANSITION_STATE_INIT, a = c.TRANSITION_STATE_CHECKED,
|
|
164
|
+
}, t.prototype.determineCheckState_ = function() {
|
|
165
|
+
var e = c.TRANSITION_STATE_INDETERMINATE, n = c.TRANSITION_STATE_CHECKED, r = c.TRANSITION_STATE_UNCHECKED;
|
|
166
|
+
return this.adapter.isIndeterminate() ? e : this.adapter.isChecked() ? n : r;
|
|
167
|
+
}, t.prototype.getTransitionAnimationClass_ = function(e, n) {
|
|
168
|
+
var r = c.TRANSITION_STATE_INIT, a = c.TRANSITION_STATE_CHECKED, s = c.TRANSITION_STATE_UNCHECKED, l = t.cssClasses, E = l.ANIM_UNCHECKED_CHECKED, _ = l.ANIM_UNCHECKED_INDETERMINATE, T = l.ANIM_CHECKED_UNCHECKED, C = l.ANIM_CHECKED_INDETERMINATE, m = l.ANIM_INDETERMINATE_CHECKED, N = l.ANIM_INDETERMINATE_UNCHECKED;
|
|
168
169
|
switch (e) {
|
|
169
170
|
case r:
|
|
170
|
-
return
|
|
171
|
-
case
|
|
172
|
-
return
|
|
171
|
+
return n === s ? "" : n === a ? m : N;
|
|
172
|
+
case s:
|
|
173
|
+
return n === a ? E : _;
|
|
173
174
|
case a:
|
|
174
|
-
return
|
|
175
|
+
return n === s ? T : C;
|
|
175
176
|
default:
|
|
176
|
-
return
|
|
177
|
+
return n === a ? m : N;
|
|
177
178
|
}
|
|
178
|
-
},
|
|
179
|
+
}, t.prototype.updateAriaChecked_ = function() {
|
|
179
180
|
this.adapter.isIndeterminate() ? this.adapter.setNativeControlAttr(c.ARIA_CHECKED_ATTR, c.ARIA_CHECKED_INDETERMINATE_VALUE) : this.adapter.removeNativeControlAttr(c.ARIA_CHECKED_ATTR);
|
|
180
|
-
},
|
|
181
|
-
}(
|
|
181
|
+
}, t;
|
|
182
|
+
}(he)
|
|
182
183
|
);
|
|
183
184
|
/**
|
|
184
185
|
* @license
|
|
@@ -202,23 +203,23 @@ var Z = (
|
|
|
202
203
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
203
204
|
* THE SOFTWARE.
|
|
204
205
|
*/
|
|
205
|
-
var
|
|
206
|
+
var W = ["checked", "indeterminate"], fe = (
|
|
206
207
|
/** @class */
|
|
207
|
-
function(
|
|
208
|
-
|
|
209
|
-
function
|
|
210
|
-
var e =
|
|
208
|
+
function(i) {
|
|
209
|
+
z(t, i);
|
|
210
|
+
function t() {
|
|
211
|
+
var e = i !== null && i.apply(this, arguments) || this;
|
|
211
212
|
return e.ripple_ = e.createRipple_(), e;
|
|
212
213
|
}
|
|
213
|
-
return
|
|
214
|
-
return new
|
|
215
|
-
}, Object.defineProperty(
|
|
214
|
+
return t.attachTo = function(e) {
|
|
215
|
+
return new t(e);
|
|
216
|
+
}, Object.defineProperty(t.prototype, "ripple", {
|
|
216
217
|
get: function() {
|
|
217
218
|
return this.ripple_;
|
|
218
219
|
},
|
|
219
220
|
enumerable: !1,
|
|
220
221
|
configurable: !0
|
|
221
|
-
}), Object.defineProperty(
|
|
222
|
+
}), Object.defineProperty(t.prototype, "checked", {
|
|
222
223
|
get: function() {
|
|
223
224
|
return this.nativeControl_.checked;
|
|
224
225
|
},
|
|
@@ -227,7 +228,7 @@ var L = ["checked", "indeterminate"], ee = (
|
|
|
227
228
|
},
|
|
228
229
|
enumerable: !1,
|
|
229
230
|
configurable: !0
|
|
230
|
-
}), Object.defineProperty(
|
|
231
|
+
}), Object.defineProperty(t.prototype, "indeterminate", {
|
|
231
232
|
get: function() {
|
|
232
233
|
return this.nativeControl_.indeterminate;
|
|
233
234
|
},
|
|
@@ -236,7 +237,7 @@ var L = ["checked", "indeterminate"], ee = (
|
|
|
236
237
|
},
|
|
237
238
|
enumerable: !1,
|
|
238
239
|
configurable: !0
|
|
239
|
-
}), Object.defineProperty(
|
|
240
|
+
}), Object.defineProperty(t.prototype, "disabled", {
|
|
240
241
|
get: function() {
|
|
241
242
|
return this.nativeControl_.disabled;
|
|
242
243
|
},
|
|
@@ -245,7 +246,7 @@ var L = ["checked", "indeterminate"], ee = (
|
|
|
245
246
|
},
|
|
246
247
|
enumerable: !1,
|
|
247
248
|
configurable: !0
|
|
248
|
-
}), Object.defineProperty(
|
|
249
|
+
}), Object.defineProperty(t.prototype, "value", {
|
|
249
250
|
get: function() {
|
|
250
251
|
return this.nativeControl_.value;
|
|
251
252
|
},
|
|
@@ -254,20 +255,20 @@ var L = ["checked", "indeterminate"], ee = (
|
|
|
254
255
|
},
|
|
255
256
|
enumerable: !1,
|
|
256
257
|
configurable: !0
|
|
257
|
-
}),
|
|
258
|
+
}), t.prototype.initialize = function() {
|
|
258
259
|
var e = c.DATA_INDETERMINATE_ATTR;
|
|
259
260
|
this.nativeControl_.indeterminate = this.nativeControl_.getAttribute(e) === "true", this.nativeControl_.removeAttribute(e);
|
|
260
|
-
},
|
|
261
|
+
}, t.prototype.initialSyncWithDOM = function() {
|
|
261
262
|
var e = this;
|
|
262
263
|
this.handleChange_ = function() {
|
|
263
264
|
return e.foundation.handleChange();
|
|
264
265
|
}, this.handleAnimationEnd_ = function() {
|
|
265
266
|
return e.foundation.handleAnimationEnd();
|
|
266
|
-
}, this.nativeControl_.addEventListener("change", this.handleChange_), this.listen(
|
|
267
|
-
},
|
|
268
|
-
this.ripple_.destroy(), this.nativeControl_.removeEventListener("change", this.handleChange_), this.unlisten(
|
|
269
|
-
},
|
|
270
|
-
var e = this,
|
|
267
|
+
}, this.nativeControl_.addEventListener("change", this.handleChange_), this.listen(F(window, "animationend"), this.handleAnimationEnd_), this.installPropertyChangeHooks_();
|
|
268
|
+
}, t.prototype.destroy = function() {
|
|
269
|
+
this.ripple_.destroy(), this.nativeControl_.removeEventListener("change", this.handleChange_), this.unlisten(F(window, "animationend"), this.handleAnimationEnd_), this.uninstallPropertyChangeHooks_(), i.prototype.destroy.call(this);
|
|
270
|
+
}, t.prototype.getDefaultFoundation = function() {
|
|
271
|
+
var e = this, n = {
|
|
271
272
|
addClass: function(r) {
|
|
272
273
|
return e.root.classList.add(r);
|
|
273
274
|
},
|
|
@@ -299,129 +300,129 @@ var L = ["checked", "indeterminate"], ee = (
|
|
|
299
300
|
e.nativeControl_.disabled = r;
|
|
300
301
|
}
|
|
301
302
|
};
|
|
302
|
-
return new
|
|
303
|
-
},
|
|
304
|
-
var e = this,
|
|
305
|
-
return e.nativeControl_.removeEventListener(r, a,
|
|
303
|
+
return new me(n);
|
|
304
|
+
}, t.prototype.createRipple_ = function() {
|
|
305
|
+
var e = this, n = b(b({}, B.createAdapter(this)), { deregisterInteractionHandler: function(r, a) {
|
|
306
|
+
return e.nativeControl_.removeEventListener(r, a, V());
|
|
306
307
|
}, isSurfaceActive: function() {
|
|
307
|
-
return
|
|
308
|
+
return Ce(e.nativeControl_, ":active");
|
|
308
309
|
}, isUnbounded: function() {
|
|
309
310
|
return !0;
|
|
310
311
|
}, registerInteractionHandler: function(r, a) {
|
|
311
|
-
return e.nativeControl_.addEventListener(r, a,
|
|
312
|
+
return e.nativeControl_.addEventListener(r, a, V());
|
|
312
313
|
} });
|
|
313
|
-
return new
|
|
314
|
-
},
|
|
315
|
-
var e = this,
|
|
316
|
-
|
|
317
|
-
var
|
|
318
|
-
if (
|
|
319
|
-
var
|
|
320
|
-
configurable:
|
|
321
|
-
enumerable:
|
|
322
|
-
get:
|
|
323
|
-
set: function(
|
|
324
|
-
|
|
314
|
+
return new B(this.root, new _e(n));
|
|
315
|
+
}, t.prototype.installPropertyChangeHooks_ = function() {
|
|
316
|
+
var e = this, n = this.nativeControl_, r = Object.getPrototypeOf(n);
|
|
317
|
+
W.forEach(function(a) {
|
|
318
|
+
var s = Object.getOwnPropertyDescriptor(r, a);
|
|
319
|
+
if (q(s)) {
|
|
320
|
+
var l = s.get, E = {
|
|
321
|
+
configurable: s.configurable,
|
|
322
|
+
enumerable: s.enumerable,
|
|
323
|
+
get: l,
|
|
324
|
+
set: function(_) {
|
|
325
|
+
s.set.call(n, _), e.foundation.handleChange();
|
|
325
326
|
}
|
|
326
327
|
};
|
|
327
|
-
Object.defineProperty(
|
|
328
|
+
Object.defineProperty(n, a, E);
|
|
328
329
|
}
|
|
329
330
|
});
|
|
330
|
-
},
|
|
331
|
-
var e = this.nativeControl_,
|
|
332
|
-
|
|
333
|
-
var a = Object.getOwnPropertyDescriptor(
|
|
334
|
-
|
|
331
|
+
}, t.prototype.uninstallPropertyChangeHooks_ = function() {
|
|
332
|
+
var e = this.nativeControl_, n = Object.getPrototypeOf(e);
|
|
333
|
+
W.forEach(function(r) {
|
|
334
|
+
var a = Object.getOwnPropertyDescriptor(n, r);
|
|
335
|
+
q(a) && Object.defineProperty(e, r, a);
|
|
335
336
|
});
|
|
336
|
-
}, Object.defineProperty(
|
|
337
|
+
}, Object.defineProperty(t.prototype, "nativeControl_", {
|
|
337
338
|
get: function() {
|
|
338
|
-
var e = c.NATIVE_CONTROL_SELECTOR,
|
|
339
|
-
if (!
|
|
339
|
+
var e = c.NATIVE_CONTROL_SELECTOR, n = this.root.querySelector(e);
|
|
340
|
+
if (!n)
|
|
340
341
|
throw new Error("Checkbox component requires a " + e + " element");
|
|
341
|
-
return
|
|
342
|
+
return n;
|
|
342
343
|
},
|
|
343
344
|
enumerable: !1,
|
|
344
345
|
configurable: !0
|
|
345
|
-
}),
|
|
346
|
-
}(
|
|
346
|
+
}), t;
|
|
347
|
+
}(Ee)
|
|
347
348
|
);
|
|
348
|
-
function
|
|
349
|
-
return !!
|
|
349
|
+
function q(i) {
|
|
350
|
+
return !!i && typeof i.set == "function";
|
|
350
351
|
}
|
|
351
|
-
|
|
352
|
+
var Te = {
|
|
352
353
|
/**
|
|
353
354
|
* Aligns checkbox to the right of the label.
|
|
354
355
|
*
|
|
355
356
|
* Defaults to **false**.
|
|
356
357
|
*/
|
|
357
|
-
alignEnd:
|
|
358
|
+
alignEnd: o.bool,
|
|
358
359
|
/**
|
|
359
360
|
* The current state of the checkbox.
|
|
360
361
|
*
|
|
361
362
|
* Defaults to **null**.
|
|
362
363
|
*/
|
|
363
|
-
checked:
|
|
364
|
+
checked: o.bool,
|
|
364
365
|
/**
|
|
365
366
|
* Alternative to `label`, if both `label` and `children` are set, `label` will take priority. Expects a string, but will accept any valid markup.
|
|
366
367
|
*
|
|
367
368
|
* Defaults to **undefined**.
|
|
368
369
|
*/
|
|
369
|
-
children:
|
|
370
|
+
children: o.node,
|
|
370
371
|
/**
|
|
371
372
|
* The css class name to be passed through to the component markup.
|
|
372
373
|
*
|
|
373
374
|
* Defaults to **undefined**.
|
|
374
375
|
*/
|
|
375
|
-
className:
|
|
376
|
+
className: o.string,
|
|
376
377
|
/**
|
|
377
378
|
* Prevent the user from interacting with the component.
|
|
378
379
|
*
|
|
379
380
|
* Defaults to **false**.
|
|
380
381
|
*/
|
|
381
|
-
disabled:
|
|
382
|
+
disabled: o.bool,
|
|
382
383
|
/**
|
|
383
384
|
* The label not be displayed, but will still be available to screen readers. This should only be used when the context of the checkbox is clear and understandable. An example use-case could be as a column in a table where the column header specifies the action.
|
|
384
385
|
*
|
|
385
386
|
* Defaults to **false**.
|
|
386
387
|
*/
|
|
387
|
-
hideLabel:
|
|
388
|
+
hideLabel: o.bool,
|
|
388
389
|
/**
|
|
389
390
|
* Randomly generated id. May be overwritten.
|
|
390
391
|
*
|
|
391
392
|
* Defaults to **undefined**.
|
|
392
393
|
*/
|
|
393
|
-
id:
|
|
394
|
+
id: o.string,
|
|
394
395
|
/**
|
|
395
396
|
* The checkbox will show an indicator if no value (true or false) is set.
|
|
396
397
|
*
|
|
397
398
|
* Defaults to **false**.
|
|
398
399
|
*/
|
|
399
|
-
indeterminate:
|
|
400
|
+
indeterminate: o.bool,
|
|
400
401
|
/**
|
|
401
402
|
* Display label. The `label` should always be set even when using `hideLabel` - it will be used by screen readers.
|
|
402
403
|
*
|
|
403
404
|
* Defaults to **null**.
|
|
404
405
|
*/
|
|
405
|
-
label:
|
|
406
|
+
label: o.oneOfType([o.string, o.node]),
|
|
406
407
|
/**
|
|
407
408
|
* Fired when checkbox value is changed
|
|
408
409
|
*
|
|
409
410
|
* Defaults to **null**.
|
|
410
411
|
*/
|
|
411
|
-
onChange:
|
|
412
|
+
onChange: o.func,
|
|
412
413
|
/**
|
|
413
414
|
* Override the default (`primary`) color with the `secondary` color. Most commonly used when the control is placed on a darker surface.
|
|
414
415
|
*
|
|
415
416
|
* Defaults to **'primary'**.
|
|
416
417
|
*/
|
|
417
|
-
themeColor:
|
|
418
|
+
themeColor: o.oneOf(["primary", "secondary", "danger", "success"]),
|
|
418
419
|
/**
|
|
419
420
|
* Any additional value information to be included with the event.
|
|
420
421
|
*
|
|
421
422
|
* Defaults to **null**.
|
|
422
423
|
*/
|
|
423
|
-
value:
|
|
424
|
-
},
|
|
424
|
+
value: o.oneOfType([o.string, o.number, o.bool, o.object])
|
|
425
|
+
}, Ne = {
|
|
425
426
|
alignEnd: !1,
|
|
426
427
|
checked: null,
|
|
427
428
|
children: void 0,
|
|
@@ -431,79 +432,70 @@ const te = {
|
|
|
431
432
|
id: void 0,
|
|
432
433
|
indeterminate: !1,
|
|
433
434
|
label: null,
|
|
435
|
+
onChange: null,
|
|
434
436
|
themeColor: "primary",
|
|
435
437
|
value: null
|
|
436
|
-
},
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
h.current.destroy();
|
|
460
|
-
}), []), b(() => {
|
|
461
|
-
h.current.checked !== t && (h.current.checked = t);
|
|
462
|
-
}, [t]), b(() => {
|
|
463
|
-
E && t === null ? h.current.indeterminate = !0 : h.current.indeterminate = !1;
|
|
464
|
-
}, [t, E]);
|
|
465
|
-
const R = {};
|
|
466
|
-
return u != null && (R.value = u), /* @__PURE__ */ l.createElement(B, {
|
|
467
|
-
alignEnd: e,
|
|
438
|
+
}, Ae = ["alignEnd", "checked", "children", "className", "disabled", "hideLabel", "id", "indeterminate", "label", "onChange", "themeColor", "value"], d = Ne, X = /* @__PURE__ */ ce(function(i, t) {
|
|
439
|
+
var e = i.alignEnd, n = e === void 0 ? d.alignEnd : e, r = i.checked, a = r === void 0 ? d.checked : r, s = i.children, l = s === void 0 ? d.children : s, E = i.className, _ = E === void 0 ? d.className : E, T = i.disabled, C = T === void 0 ? d.disabled : T, m = i.hideLabel, N = m === void 0 ? d.hideLabel : m, D = i.id, J = D === void 0 ? d.id : D, g = i.indeterminate, R = g === void 0 ? d.indeterminate : g, y = i.label, Q = y === void 0 ? d.label : y, M = i.onChange, A = M === void 0 ? d.onChange : M, O = i.themeColor, S = O === void 0 ? d.themeColor : O, H = i.value, p = H === void 0 ? d.value : H, Y = ne(i, Ae), Z = se(function() {
|
|
440
|
+
return J || ue();
|
|
441
|
+
}), ee = ae(Z, 1), x = ee[0], v = $(), h = $(), te = Q || l;
|
|
442
|
+
de(t, function() {
|
|
443
|
+
return v.current;
|
|
444
|
+
}, []);
|
|
445
|
+
var K = !1, I = a, L = le(function(U) {
|
|
446
|
+
var j = U.target.checked;
|
|
447
|
+
K && j === I || (K = !0, I = j, A?.(I, U, p));
|
|
448
|
+
}, [A]);
|
|
449
|
+
k(function() {
|
|
450
|
+
return h.current = new fe(v.current), function() {
|
|
451
|
+
h.current.destroy();
|
|
452
|
+
};
|
|
453
|
+
}, []), k(function() {
|
|
454
|
+
h.current.checked !== a && (h.current.checked = a);
|
|
455
|
+
}, [a]), k(function() {
|
|
456
|
+
R && a === null ? h.current.indeterminate = !0 : h.current.indeterminate = !1;
|
|
457
|
+
}, [a, R]);
|
|
458
|
+
var P = {};
|
|
459
|
+
return p != null && (P.value = p), /* @__PURE__ */ u.createElement(ie, {
|
|
460
|
+
alignEnd: n,
|
|
468
461
|
input: h,
|
|
469
462
|
className: "lmnt mdc-touch-target-wrapper"
|
|
470
|
-
}, /* @__PURE__ */
|
|
463
|
+
}, /* @__PURE__ */ u.createElement("div", {
|
|
471
464
|
// onClick={handleChange}
|
|
472
|
-
ref:
|
|
473
|
-
className:
|
|
474
|
-
}, /* @__PURE__ */
|
|
475
|
-
id:
|
|
476
|
-
disabled:
|
|
465
|
+
ref: v,
|
|
466
|
+
className: w("lmnt mdc-checkbox lmnt-checkbox mdc-checkbox--touch", C && "mdc-checkbox--disabled", S && "lmnt-checkbox--".concat(S), _)
|
|
467
|
+
}, /* @__PURE__ */ u.createElement("input", re({
|
|
468
|
+
id: x,
|
|
469
|
+
disabled: C,
|
|
477
470
|
type: "checkbox",
|
|
478
471
|
className: "mdc-checkbox__native-control",
|
|
479
|
-
onChange:
|
|
480
|
-
onClick:
|
|
481
|
-
defaultChecked:
|
|
482
|
-
},
|
|
472
|
+
onChange: L,
|
|
473
|
+
onClick: L,
|
|
474
|
+
defaultChecked: a
|
|
475
|
+
}, P, Y)), /* @__PURE__ */ u.createElement("div", {
|
|
483
476
|
className: "mdc-checkbox__background"
|
|
484
|
-
}, /* @__PURE__ */
|
|
477
|
+
}, /* @__PURE__ */ u.createElement("svg", {
|
|
485
478
|
className: "mdc-checkbox__checkmark",
|
|
486
479
|
viewBox: "0 0 24 24"
|
|
487
|
-
}, /* @__PURE__ */
|
|
480
|
+
}, /* @__PURE__ */ u.createElement("path", {
|
|
488
481
|
className: "mdc-checkbox__checkmark-path",
|
|
489
482
|
fill: "none",
|
|
490
483
|
stroke: "white",
|
|
491
484
|
d: "M1.73,12.91 8.1,19.28 22.79,4.59"
|
|
492
|
-
})), /* @__PURE__ */
|
|
485
|
+
})), /* @__PURE__ */ u.createElement("div", {
|
|
493
486
|
className: "mdc-checkbox__mixedmark"
|
|
494
|
-
})), /* @__PURE__ */
|
|
487
|
+
})), /* @__PURE__ */ u.createElement("div", {
|
|
495
488
|
className: "mdc-checkbox__ripple"
|
|
496
|
-
})), /* @__PURE__ */
|
|
497
|
-
hideLabel:
|
|
498
|
-
targetId:
|
|
499
|
-
className:
|
|
500
|
-
disabled:
|
|
501
|
-
},
|
|
489
|
+
})), /* @__PURE__ */ u.createElement(oe, {
|
|
490
|
+
hideLabel: N,
|
|
491
|
+
targetId: x,
|
|
492
|
+
className: w(C && "lmnt-theme-on-surface-disabled"),
|
|
493
|
+
disabled: C
|
|
494
|
+
}, te));
|
|
502
495
|
});
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
I.defaultProps = ne;
|
|
496
|
+
X.displayName = "Checkbox";
|
|
497
|
+
X.propTypes = Te;
|
|
506
498
|
export {
|
|
507
|
-
|
|
508
|
-
|
|
499
|
+
X as C,
|
|
500
|
+
fe as M
|
|
509
501
|
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { _ as K, c as M, a as q, b as R, d as A, P as n } from "./index-Cpb-8cAN.js";
|
|
2
|
+
import { _ as B, a as x, b as G, c as J, d as z, e as S, f as L } from "./defineProperty-CmuOyxyf.js";
|
|
3
|
+
import l, { forwardRef as Q, useRef as U, useImperativeHandle as V, useMemo as u } from "react";
|
|
4
|
+
import { c as X } from "./index.es-BXj90wb_.js";
|
|
5
|
+
var Y = {
|
|
6
|
+
/**
|
|
7
|
+
* Content to be rendered inside the elevation.
|
|
8
|
+
*
|
|
9
|
+
* Defaults to **null**.
|
|
10
|
+
*/
|
|
11
|
+
children: n.node,
|
|
12
|
+
/**
|
|
13
|
+
* Adds a custom padding style to the child content. Must be a valid CSS padding declaration. i.e. 38px 30px
|
|
14
|
+
*
|
|
15
|
+
* Defaults to **null**.
|
|
16
|
+
*/
|
|
17
|
+
customPadding: n.string,
|
|
18
|
+
/**
|
|
19
|
+
* Sets the distance of the elevation. Value must be between 0-24.
|
|
20
|
+
*
|
|
21
|
+
* Defaults to **0**.
|
|
22
|
+
*/
|
|
23
|
+
elevation: n.oneOf([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]),
|
|
24
|
+
/**
|
|
25
|
+
* Avoids adding an extra element to the DOM and applies proper classes directly to the child element.
|
|
26
|
+
*
|
|
27
|
+
* Defaults to **null**.
|
|
28
|
+
*/
|
|
29
|
+
noWrap: n.bool,
|
|
30
|
+
/**
|
|
31
|
+
* The elevation element will have a visible border.
|
|
32
|
+
*
|
|
33
|
+
* Defaults to **false**.
|
|
34
|
+
*/
|
|
35
|
+
outlined: n.bool,
|
|
36
|
+
/**
|
|
37
|
+
* Adds a universal padding around the child content. `dense` is 8px, `standard` is 16px, and `airy` is 24px. If `customPadding` is used, this will be ignored.
|
|
38
|
+
*
|
|
39
|
+
* Defaults to **undefined**.
|
|
40
|
+
*/
|
|
41
|
+
padding: n.oneOf(["standard", "dense", "airy"]),
|
|
42
|
+
/**
|
|
43
|
+
* The elevation element will have a border radius of 8px.
|
|
44
|
+
*
|
|
45
|
+
* Defaults to **false**.
|
|
46
|
+
*/
|
|
47
|
+
rounded: n.bool,
|
|
48
|
+
/**
|
|
49
|
+
* HTML tag to render the contents in.
|
|
50
|
+
*
|
|
51
|
+
* Defaults to **'div'**.
|
|
52
|
+
*/
|
|
53
|
+
tag: n.oneOfType([n.string, n.elementType, n.instanceOf(l.Component)]),
|
|
54
|
+
/**
|
|
55
|
+
* Adds animation when elevation is changed.
|
|
56
|
+
*
|
|
57
|
+
* Defaults to **null**.
|
|
58
|
+
*/
|
|
59
|
+
transition: n.bool
|
|
60
|
+
}, Z = {
|
|
61
|
+
children: null,
|
|
62
|
+
customPadding: null,
|
|
63
|
+
elevation: 0,
|
|
64
|
+
noWrap: null,
|
|
65
|
+
outlined: !1,
|
|
66
|
+
padding: void 0,
|
|
67
|
+
rounded: !1,
|
|
68
|
+
tag: "div",
|
|
69
|
+
transition: null
|
|
70
|
+
}, ee = ["children", "className", "customPadding", "elevation", "noWrap", "padding", "rounded", "tag", "outlined", "style", "transition"];
|
|
71
|
+
function k(e, r) {
|
|
72
|
+
var i = A(e);
|
|
73
|
+
if (S) {
|
|
74
|
+
var t = S(e);
|
|
75
|
+
r && (t = L(t).call(t, function(o) {
|
|
76
|
+
return z(e, o).enumerable;
|
|
77
|
+
})), i.push.apply(i, t);
|
|
78
|
+
}
|
|
79
|
+
return i;
|
|
80
|
+
}
|
|
81
|
+
function c(e) {
|
|
82
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
83
|
+
var i, t, o = arguments[r] != null ? arguments[r] : {};
|
|
84
|
+
r % 2 ? R(i = k(Object(o), !0)).call(i, function(d) {
|
|
85
|
+
B(e, d, o[d]);
|
|
86
|
+
}) : x ? G(e, x(o)) : R(t = k(Object(o))).call(t, function(d) {
|
|
87
|
+
J(e, d, z(o, d));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return e;
|
|
91
|
+
}
|
|
92
|
+
var a = Z, p = /* @__PURE__ */ Q(function(e, r) {
|
|
93
|
+
var i = e.children, t = i === void 0 ? a.children : i, o = e.className, d = o === void 0 ? a.className : o, v = e.customPadding, m = v === void 0 ? a.customPadding : v, f = e.elevation, g = f === void 0 ? a.elevation : f, y = e.noWrap, C = y === void 0 ? a.noWrap : y, P = e.padding, s = P === void 0 ? a.padding : P, b = e.rounded, $ = b === void 0 ? a.rounded : b, _ = e.tag, O = _ === void 0 ? a.tag : _, h = e.outlined, j = h === void 0 ? a.outlined : h, E = e.style, N = E === void 0 ? a.style : E, W = e.transition, T = W === void 0 ? a.transition : W, w = K(e, ee), D = U();
|
|
94
|
+
V(r, function() {
|
|
95
|
+
return D.current;
|
|
96
|
+
}, []);
|
|
97
|
+
var I = u(function() {
|
|
98
|
+
return M("lmnt", "mdc-elevation--z".concat(g), s === "standard" && "lmnt-elevation--padding-standard", s === "dense" && "lmnt-elevation--padding-dense", s === "airy" && "lmnt-elevation--padding-airy", T && "mdc-elevation-transition", $ && "lmnt-elevation--rounded", j && "lmnt-elevation--outlined", d);
|
|
99
|
+
}, [g, s, T, $, j, d]), F = u(function() {
|
|
100
|
+
return c(c({}, N), {}, {
|
|
101
|
+
padding: m
|
|
102
|
+
});
|
|
103
|
+
}, [N, m]), H = u(function() {
|
|
104
|
+
return O;
|
|
105
|
+
}, [O]);
|
|
106
|
+
return (
|
|
107
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
108
|
+
/* @__PURE__ */ l.createElement(l.Fragment, null, C ? X(t, c({
|
|
109
|
+
className: I
|
|
110
|
+
}, w)) : /* @__PURE__ */ l.createElement(H, q({
|
|
111
|
+
ref: D,
|
|
112
|
+
className: I,
|
|
113
|
+
style: F
|
|
114
|
+
}, w), t))
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
p.displayName = "Elevation";
|
|
118
|
+
p.propTypes = Y;
|
|
119
|
+
var re = /* @__PURE__ */ l.memo(p);
|
|
120
|
+
export {
|
|
121
|
+
re as E
|
|
122
|
+
};
|