@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.
Files changed (132) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{AlertBanner-DlgFtlZm.js → AlertBanner-D-NTP_6i.js} +3 -3
  3. package/dist/{BigLoadingSpinner-B_HFhx2F.js → BigLoadingSpinner-CCxsMWnc.js} +1 -1
  4. package/dist/{GenericCard-Cv8qaFLu.js → GenericCard-DOKyENNm.js} +3 -3
  5. package/dist/{ListAreaService-D9HRsvH0.js → ListAreaService-CI-s1Xx5.js} +5 -5
  6. package/dist/{OfflineView-Bw-sbsym.js → OfflineView-DHtzNLwt.js} +3 -3
  7. package/dist/_Map-BmafU0dj.js +113 -0
  8. package/dist/components/AlertBanner/AlertBanner.js +4 -4
  9. package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
  10. package/dist/components/AlertBanner/LinkBanner.js +3 -3
  11. package/dist/components/BaseView/BaseView.js +2 -2
  12. package/dist/components/BasicHeading/BasicHeading.js +2 -2
  13. package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
  14. package/dist/components/BlockView/BlockView.js +1 -1
  15. package/dist/components/ChipCard/ChipCard.js +499 -390
  16. package/dist/components/ContextMenu/ContextMenu.js +4 -4
  17. package/dist/components/DeleteModal/DeleteModal.js +5 -5
  18. package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
  19. package/dist/components/Disclaimer/Disclaimer.js +3 -3
  20. package/dist/components/EmptyView/EmptyView.js +161 -125
  21. package/dist/components/Filter/Filter.js +11 -11
  22. package/dist/components/Filter/Filter.test.js +51 -35
  23. package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
  24. package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +10 -10
  25. package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
  26. package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
  27. package/dist/components/FormComponents/FormSelect/FormSelect.js +2 -2
  28. package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
  29. package/dist/components/FormComponents/FormSlider/FormSlider.js +540 -535
  30. package/dist/components/FormComponents/FormText/FormText.js +2 -2
  31. package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
  32. package/dist/components/GenericTable/GenericTable.js +8246 -7153
  33. package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
  34. package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
  35. package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
  36. package/dist/components/HashTabView/HashTabView.js +552 -541
  37. package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
  38. package/dist/components/Iconify/Iconify.js +2 -2
  39. package/dist/components/InfoCard/InfoCard.js +4 -4
  40. package/dist/components/InfoGroup/InfoGroup.js +3 -3
  41. package/dist/components/ListArea/ListArea.js +16 -16
  42. package/dist/components/ListArea/ListArea.test.js +20 -20
  43. package/dist/components/ListArea/ListAreaService.js +6 -6
  44. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
  45. package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
  46. package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +164 -178
  47. package/dist/components/Modal/Modal.js +305 -312
  48. package/dist/components/ModulePadding/ModulePadding.js +8 -8
  49. package/dist/components/OfflineView/OfflineView.js +4 -4
  50. package/dist/components/OfflineView/OfflineView.test.js +1 -1
  51. package/dist/components/OnboardingBanner/OnboardingBanner.js +13 -13
  52. package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
  53. package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
  54. package/dist/components/SearchBar/SearchBar.js +2 -2
  55. package/dist/components/SearchBar/SearchBar.test.js +1 -1
  56. package/dist/components/Select/Select.js +2 -2
  57. package/dist/components/Stepper/Stepper.js +1 -1
  58. package/dist/components/Stepper/components/StepperButton.js +1 -1
  59. package/dist/components/Stepper/components/StepperHeader.js +2 -2
  60. package/dist/components/Stepper/components/StepperIndicator.js +1 -1
  61. package/dist/defineProperty-CmuOyxyf.js +318 -0
  62. package/dist/es.string.iterator-DrqCBub-.js +581 -0
  63. package/dist/find-B-dm7n_F.js +88 -0
  64. package/dist/{get-CqneoueQ.js → get-DuK51wnj.js} +1 -1
  65. package/dist/get-u1nFMLdT.js +377 -0
  66. package/dist/hooks/useHelperText.js +1 -1
  67. package/dist/identity-BIZAN_pL.js +213 -0
  68. package/dist/includes-Bt-Stz_B.js +110 -0
  69. package/dist/index-Cpb-8cAN.js +2465 -0
  70. package/dist/index.es-0QJC9VS2.js +325 -0
  71. package/dist/{index.es-CyjMwj5g.js → index.es-45NOgWlB.js} +93 -101
  72. package/dist/index.es-B6ZgiW2s.js +3790 -0
  73. package/dist/{index.es-1zrFd4Te.js → index.es-BGordhUK.js} +352 -323
  74. package/dist/index.es-BRtk0Q33.js +42 -0
  75. package/dist/index.es-BXj90wb_.js +402 -0
  76. package/dist/index.es-Bg8hxXM8.js +912 -0
  77. package/dist/index.es-Bgjh6euR.js +292 -0
  78. package/dist/index.es-Bo1Rhtyb.js +80 -0
  79. package/dist/{index.es-BaX-8joZ.js → index.es-CK4oZMKs.js} +3329 -3232
  80. package/dist/{index.es-nQ0lMwpE.js → index.es-CKdJX75f.js} +74 -78
  81. package/dist/index.es-CmF6xAUJ.js +48 -0
  82. package/dist/{index.es-p4O33fMu.js → index.es-Cq04gn3U.js} +321 -305
  83. package/dist/{index.es-Cdu6tjUC.js → index.es-D1IpdMde.js} +87 -95
  84. package/dist/index.es-DDYCugj-.js +166 -0
  85. package/dist/{index.es-jFaPNuBO.js → index.es-DENZVv7_.js} +427 -444
  86. package/dist/{index.es-Dnrk7XL6.js → index.es-DObVvepK.js} +158 -166
  87. package/dist/index.es-DeF-y7fd.js +122 -0
  88. package/dist/{index.es-ks_RnHLh.js → index.es-Dfju71Pi.js} +27 -37
  89. package/dist/index.es-DqSY-ePE.js +4923 -0
  90. package/dist/index.es-DwzB1d7_.js +1061 -0
  91. package/dist/index.es-IXyb5F6n.js +457 -0
  92. package/dist/index.es-t7hFwQSs.js +67 -0
  93. package/dist/isArray-DN9s620O.js +83 -0
  94. package/dist/{isArray-CSaAxHlq.js → isArray-Dub1wGJM.js} +1 -1
  95. package/dist/{isEmpty-SkzPhavO.js → isEmpty-CxD71Jv8.js} +4 -5
  96. package/dist/{isString-CZsZiWgW.js → isString-BNaBRq3S.js} +2 -2
  97. package/dist/isTypedArray-Dw_IY7Zq.js +212 -0
  98. package/dist/keyboard-B-WUULl-.js +173 -0
  99. package/dist/main.js +2 -2
  100. package/dist/map-Dbvlv_6y.js +707 -0
  101. package/dist/omit-uTAyrUTm.js +645 -0
  102. package/dist/orderBy-BXxEvUw6.js +571 -0
  103. package/dist/parse-int-qVAoFbOL.js +75 -0
  104. package/dist/services/UtilService.js +7 -7
  105. package/dist/slicedToArray-BWk2gTCn.js +436 -0
  106. package/dist/{toString-BFJes2_D.js → toString-CrgB_7Pe.js} +1 -1
  107. package/dist/{uniqueId-DrPMzA-E.js → uniqueId-NU3-C36A.js} +1 -1
  108. package/package.json +3 -3
  109. package/dist/_baseIsEqual-Df2URKWm.js +0 -240
  110. package/dist/_getAllKeys-BQWmkEw5.js +0 -86
  111. package/dist/_getTag-BkGSRa18.js +0 -79
  112. package/dist/_setToString-B6E13pDg.js +0 -580
  113. package/dist/get-DQr2KQKm.js +0 -113
  114. package/dist/index-D5m--65X.js +0 -1491
  115. package/dist/index.es-8MVlRCi4.js +0 -1066
  116. package/dist/index.es-BbaCXS9-.js +0 -45
  117. package/dist/index.es-BikIx4uw.js +0 -3242
  118. package/dist/index.es-CDMu_yu0.js +0 -954
  119. package/dist/index.es-ChSlnpSq.js +0 -309
  120. package/dist/index.es-D66OkZJH.js +0 -4853
  121. package/dist/index.es-DFFyENnI.js +0 -63
  122. package/dist/index.es-DTMwaJ6B.js +0 -56
  123. package/dist/index.es-DgTJmbgD.js +0 -268
  124. package/dist/index.es-DmsyeHLO.js +0 -306
  125. package/dist/index.es-Dw1eih7R.js +0 -159
  126. package/dist/index.es-eKuwB1ll.js +0 -54
  127. package/dist/index.es-qxTN-Bb2.js +0 -107
  128. package/dist/index.es-xnSvM9b9.js +0 -444
  129. package/dist/isArray-DDZrq40X.js +0 -456
  130. package/dist/keyboard-Bpt0aBqQ.js +0 -107
  131. package/dist/omit-BN3qeeaj.js +0 -364
  132. package/dist/orderBy-D4LvP9Az.js +0 -316
@@ -0,0 +1,325 @@
1
+ import { _ as on, a as an, c as ln, P as n } from "./index-Cpb-8cAN.js";
2
+ import { _ as hn, a as gn, d as b, b as Cn } from "./index.es-BXj90wb_.js";
3
+ import p, { forwardRef as rn, useRef as kn, useImperativeHandle as xn, useMemo as tn } from "react";
4
+ import { R as wn } from "./index.es-BRtk0Q33.js";
5
+ import { I as On } from "./index.es-DwzB1d7_.js";
6
+ var Bn = {
7
+ /**
8
+ * @deprecated _Use `themeColor='secondary'` instead._
9
+ *
10
+ * Preview feature, this may change. Apply alternative button color scheme (defined by the individual theme).
11
+ *
12
+ * Defaults to **undefined**.
13
+ */
14
+ altColor: b(n.bool, "Button", 'Use `themeColor="secondary"` instead.'),
15
+ /**
16
+ * One of 'xsmall', 'small', 'medium', 'large' and 'xlarge' will change the size of the button. Defaults according to your theme.
17
+ *
18
+ * Defaults to **'themeDefault'**.
19
+ */
20
+ buttonSize: n.oneOf(["xsmall", "small", "medium", "large", "xlarge", "themeDefault"]),
21
+ /**
22
+ * Content to be rendered inside the button. Can be used instead `label` of to provide more flexibility. Accepts any valid markup. _Warning, if Label is set, it will be used instead of child content._
23
+ *
24
+ * Defaults to **null**.
25
+ */
26
+ children: n.node,
27
+ /**
28
+ * The css class name to be passed through to the component markup.
29
+ *
30
+ * Defaults to **undefined**.
31
+ */
32
+ className: n.string,
33
+ /**
34
+ * @deprecated _forwardRef has been implemented for Button._
35
+ *
36
+ * Reference to the DOM button. This enables a greater level of integration.
37
+ *
38
+ * Defaults to **undefined**.
39
+ */
40
+ customRef: b(n.oneOfType([
41
+ n.func,
42
+ // eslint-disable-next-line react/forbid-prop-types
43
+ n.shape({
44
+ current: n.any
45
+ })
46
+ ]), "Button", "forwardRef has been implemented for Button."),
47
+ /**
48
+ * @deprecated _Use `variant='danger'` instead._
49
+ *
50
+ * Apply danger style to the button.
51
+ *
52
+ * Defaults to **undefined**.
53
+ */
54
+ danger: b(n.bool, "Button", 'Use `variant="danger"` instead.'),
55
+ /**
56
+ * Prevent the user from interacting with the component.
57
+ *
58
+ * Defaults to **false**.
59
+ */
60
+ disabled: n.bool,
61
+ /**
62
+ * Sets elevation of the button. Default will be the theme default.
63
+ *
64
+ * Defaults to **'default'**.
65
+ */
66
+ elevation: n.oneOf(["default", "elevated", "flat"]),
67
+ /**
68
+ * @deprecated _Use `variant='filled'` instead._
69
+ *
70
+ * Apply a filled-in style. Previously called `primary`.
71
+ *
72
+ * Defaults to **undefined**.
73
+ */
74
+ filled: b(n.bool, "Button", 'Use `variant="filled"` instead.'),
75
+ /**
76
+ * Applies a full-width style where the textfield will fill it's container.
77
+ *
78
+ * Defaults to **false**.
79
+ */
80
+ fullWidth: n.bool,
81
+ /**
82
+ * The button will render as an anchor tag. If the tag prop is set, that prop will take precedence.
83
+ *
84
+ * Defaults to **null**.
85
+ */
86
+ href: n.string,
87
+ /**
88
+ * The displayed text. Expects a valid string. If label and children are both set, label will take priority.
89
+ *
90
+ * Defaults to **null**.
91
+ */
92
+ label: n.string,
93
+ /**
94
+ * Adds the given Icon to the left of the button text. Use only one icon per button. Place icons in the leading position by default. Expects the name of a valid Material icon, however an icon component may be passed in instead for more control,
95
+ *
96
+ * Defaults to **undefined**.
97
+ */
98
+ leadingIcon: n.oneOfType([n.string, n.func, n.node]),
99
+ /**
100
+ * The primary interaction event for button.
101
+ *
102
+ * Defaults to **null**.
103
+ */
104
+ onClick: n.func,
105
+ /**
106
+ * @deprecated _Use `variant='outlined'`._
107
+ *
108
+ * Apply outlined style to the button. Previously called `secondary`.
109
+ *
110
+ * Defaults to **undefined**.
111
+ */
112
+ outlined: b(n.bool, "Button", 'Use `variant="outlined"`.'),
113
+ /**
114
+ * @deprecated _Use `variant='filled'` instead._
115
+ *
116
+ * Apply primary style to the Button.
117
+ *
118
+ * Defaults to **undefined**.
119
+ */
120
+ primary: b(n.bool, "Button", 'Use `variant="filled"` instead.'),
121
+ /**
122
+ * @deprecated _Use `'variant=outlined'` instead._
123
+ *
124
+ * Apply secondary style to the Button.
125
+ *
126
+ * Defaults to **undefined**.
127
+ */
128
+ secondary: b(n.bool, "Button", 'Use `"variant=outlined"` instead.'),
129
+ /**
130
+ * By default a button or anchor tag will be rendered, this allows another tag/component to be used instead. A block type element/component is suggested.
131
+ *
132
+ * Defaults to **null**.
133
+ */
134
+ tag: n.oneOfType([n.string, n.elementType, n.instanceOf(p.Component)]),
135
+ /**
136
+ * @deprecated _Use `variant='embedded'` instead._
137
+ *
138
+ * Apply tertiary style to the Button.
139
+ *
140
+ * Defaults to **undefined**.
141
+ */
142
+ tertiary: b(n.bool, "Button", 'Use `variant="embedded"` instead.'),
143
+ /**
144
+ * @deprecated _Use `variant='text'` instead._
145
+ *
146
+ * Apply unfilled, un-outlined style to the Button. Previously called `tertiary`.
147
+ *
148
+ * Defaults to **undefined**.
149
+ */
150
+ text: b(n.bool, "Button", 'Use `variant="text"` instead.'),
151
+ /**
152
+ * Sets the theme color for the button. Most commonly used when the control is placed on a darker surface.
153
+ *
154
+ * Defaults to **'primary'**.
155
+ */
156
+ themeColor: Cn(n.oneOf(["primary", "secondary", "danger", "success", "on-unknown-black", "on-unknown-white", "on-primary", "on-secondary", "on-success", "on-danger"]), ["onUnknownBlack", "onUnknownWhite"], "Button", "Please use one of 'primary','secondary','danger','success','on-unknown-black','on-unknown-white','on-primary','on-secondary','on-success','on-danger'."),
157
+ /**
158
+ * Adds the given Icon to the right of the button text. Use only one icon per button. Place icons in the leading position by default. Expects the name of a valid Material icon, however an icon component may be passed in instead for more control.
159
+ *
160
+ * Defaults to **undefined**.
161
+ */
162
+ trailingIcon: n.oneOfType([n.string, n.func, n.node]),
163
+ /**
164
+ * This applies the html button type (button, submit, reset) or the anchor media type when used with the href property.
165
+ *
166
+ * Defaults to **'button'**.
167
+ */
168
+ type: n.oneOf(["button", "submit", "reset"]),
169
+ /**
170
+ * @deprecated _Use `elevation='flat' instead._
171
+ *
172
+ * Remove elevation.
173
+ *
174
+ * Defaults to **undefined**.
175
+ */
176
+ unelevated: b(n.bool, "Button", 'Use `elevation="flat" instead.'),
177
+ /**
178
+ * Applies the selected style to the button. `rounded-small` and `rounded-micro` are only available on select themes.
179
+ *
180
+ * Defaults to **'filled'**.
181
+ */
182
+ variant: n.oneOf(["filled", "outlined", "danger", "text", "success", "rounded-small", "rounded-micro"])
183
+ }, $n = {
184
+ altColor: void 0,
185
+ buttonSize: "themeDefault",
186
+ children: null,
187
+ className: void 0,
188
+ customRef: void 0,
189
+ danger: void 0,
190
+ disabled: !1,
191
+ elevation: "default",
192
+ filled: void 0,
193
+ fullWidth: !1,
194
+ href: null,
195
+ label: null,
196
+ leadingIcon: void 0,
197
+ onClick: null,
198
+ outlined: void 0,
199
+ primary: void 0,
200
+ secondary: void 0,
201
+ tag: null,
202
+ tertiary: void 0,
203
+ text: void 0,
204
+ themeColor: "primary",
205
+ trailingIcon: void 0,
206
+ type: "button",
207
+ unelevated: void 0,
208
+ variant: "filled"
209
+ }, _n = {
210
+ /**
211
+ * Children to be rendered. Expects multiple Element Buttons
212
+ *
213
+ * Defaults to **null**.
214
+ */
215
+ children: n.node,
216
+ /**
217
+ * How much spacing between buttons. Dense is 8p, standard is 16px and airy is 24px.
218
+ *
219
+ * Defaults to **'standard'**.
220
+ */
221
+ variant: n.oneOf(["dense", "standard", "airy"])
222
+ }, Nn = {
223
+ children: null,
224
+ variant: "standard"
225
+ }, Sn = ["altColor", "buttonSize", "children", "className", "customRef", "disabled", "elevation", "primary", "secondary", "tertiary", "text", "danger", "filled", "fullWidth", "href", "label", "leadingIcon", "onClick", "outlined", "tag", "themeColor", "trailingIcon", "type", "unelevated", "variant"], o = $n, dn = /* @__PURE__ */ rn(function(t, e) {
226
+ var a = t.altColor, l = a === void 0 ? o.altColor : a, c = t.buttonSize, v = c === void 0 ? o.buttonSize : c, y = t.children, i = y === void 0 ? o.children : y, g = t.className, x = g === void 0 ? o.className : g, d = t.customRef, w = d === void 0 ? o.customRef : d, I = t.disabled, N = I === void 0 ? o.disabled : I, O = t.elevation, B = O === void 0 ? o.elevation : O, h = t.primary, m = h === void 0 ? o.primary : h, C = t.secondary, k = C === void 0 ? o.secondary : C, $ = t.tertiary, _ = $ === void 0 ? o.tertiary : $, U = t.text, R = U === void 0 ? o.text : U, S = t.danger, r = S === void 0 ? o.danger : S, P = t.filled, f = P === void 0 ? o.filled : P, s = t.fullWidth, u = s === void 0 ? o.fullWidth : s, W = t.href, D = W === void 0 ? o.href : W, E = t.label, un = E === void 0 ? o.label : E, G = t.leadingIcon, A = G === void 0 ? o.leadingIcon : G, j = t.onClick, cn = j === void 0 ? o.onClick : j, F = t.outlined, H = F === void 0 ? o.outlined : F, M = t.tag, mn = M === void 0 ? o.tag : M, q = t.themeColor, J = q === void 0 ? o.themeColor : q, K = t.trailingIcon, L = K === void 0 ? o.trailingIcon : K, Q = t.type, fn = Q === void 0 ? o.type : Q, V = t.unelevated, X = V === void 0 ? o.unelevated : V, Y = t.variant, Z = Y === void 0 ? o.variant : Y, bn = on(t, Sn), T = kn(w || null);
227
+ xn(e, function() {
228
+ return T.current;
229
+ }, []);
230
+ var pn = un || i, vn = mn || (D ? "a" : "button"), nn = tn(function() {
231
+ return {
232
+ variant: Z,
233
+ outlined: H,
234
+ text: R,
235
+ tertiary: _,
236
+ danger: r,
237
+ themeColor: J,
238
+ filled: f,
239
+ primary: m,
240
+ secondary: k,
241
+ unelevated: X,
242
+ fullWidth: u,
243
+ elevation: B,
244
+ buttonSize: v,
245
+ className: x,
246
+ altColor: l
247
+ };
248
+ }, [Z, H, R, _, r, J, f, m, k, X, u, B, v, x, l]), yn = tn(function() {
249
+ return In(nn);
250
+ }, [nn]);
251
+ return /* @__PURE__ */ p.createElement(wn, {
252
+ componentRef: T
253
+ }, /* @__PURE__ */ p.createElement(vn, an({
254
+ ref: T,
255
+ href: D,
256
+ onClick: cn,
257
+ type: fn,
258
+ disabled: N,
259
+ className: yn
260
+ }, bn), /* @__PURE__ */ p.createElement("span", {
261
+ className: "mdc-button__ripple"
262
+ }), A && /* @__PURE__ */ p.createElement(en, {
263
+ icon: A,
264
+ position: "leading"
265
+ }), /* @__PURE__ */ p.createElement("span", {
266
+ className: "mdc-button__label"
267
+ }, pn), L && /* @__PURE__ */ p.createElement(en, {
268
+ icon: L,
269
+ position: "trailing"
270
+ }), /* @__PURE__ */ p.createElement("span", {
271
+ className: "mdc-button__touch"
272
+ })));
273
+ }), Pn = function(e) {
274
+ var a = e.variant, l = e.outlined, c = e.text, v = e.tertiary, y = e.danger, i = e.themeColor;
275
+ e.filled, e.primary;
276
+ var g = e.secondary, x = e.altColor;
277
+ return {
278
+ isOutlined: a === "outlined" || l || g,
279
+ isRounded: a === "rounded-small" || a === "rounded-micro",
280
+ isText: a === "text" || c || v,
281
+ isDanger: a === "danger" || y || i === "danger",
282
+ isSuccess: a === "success" || i === "success",
283
+ isSecondaryColor: x || i === "secondary",
284
+ isPrimaryColor: i === "primary",
285
+ isOnUnknownBlack: i === "onUnknownBlack" || i === "on-unknown-black",
286
+ isOnUnknownWhite: i === "onUnknownWhite" || i === "on-unknown-white",
287
+ isOnPrimary: i === "onPrimary" || i === "on-primary",
288
+ isOnSecondary: i === "onSecondary" || i === "on-secondary",
289
+ isOnSuccess: i === "on-success",
290
+ isOnDanger: i === "on-danger"
291
+ };
292
+ }, In = function(e) {
293
+ var a = e.variant, l = e.unelevated, c = e.fullWidth, v = e.elevation, y = e.buttonSize, i = e.className, g = e.filled, x = e.primary, d = Pn(e), w = d.isOutlined, I = d.isRounded, N = d.isText, O = d.isDanger, B = d.isSuccess, h = d.isSecondaryColor, m = d.isPrimaryColor, C = d.isOnUnknownBlack, k = d.isOnUnknownWhite, $ = d.isOnPrimary, _ = d.isOnSecondary, U = d.isOnSuccess, R = d.isOnDanger, S = ["lmnt", "mdc-button", "lmnt-button", "mdc-button--touch", "mdc-touch-target-wrapper"], r = [], P = !w && !N && (a === "filled" || g || x);
294
+ P && l && (m && r.push("lmnt-button--filled-primary"), h && r.push("lmnt-button--filled-secondary"), O && r.push("lmnt-button--filled-danger"), B && r.push("lmnt-button--filled-success")), P && !l && (r.push("mdc-button--raised"), m && r.push("lmnt-button--filled-primary"), h && r.push("lmnt-button--filled-secondary"), $ && r.push("lmnt-button--filled-on-primary"), _ && r.push("lmnt-button--filled-on-secondary"), U && r.push("lmnt-button--filled-on-success"), R && r.push("lmnt-button--filled-on-danger"), C && r.push("lmnt-button--filled-on-unknown-black"), k && r.push("lmnt-button--filled-on-unknown-white"));
295
+ var f = [];
296
+ w && (f.push("mdc-button--outlined"), m && f.push("lmnt-button--outlined-primary"), h && f.push("lmnt-button--outlined-secondary"), $ && f.push("lmnt-button--outlined-on-primary"), _ && f.push("lmnt-button--outlined-on-secondary"), k && f.push("lmnt-button--outlined-on-unknown-white"), C && f.push("lmnt-button--outlined-on-unknown-black"));
297
+ var s = [];
298
+ N && (s.push("mdc-button__text"), $ && s.push("lmnt-button--text-on-primary"), _ && s.push("lmnt-button--text-on-secondary"), k && s.push("lmnt-button--text-on-unknown-white"), C && s.push("lmnt-button--text-on-unknown-black"), m && s.push("lmnt-button--text-primary"), h && s.push("lmnt-button--text-secondary"), O && s.push("lmnt-button--text-danger"), B && s.push("lmnt-button--text-success")), I && (k && s.push("lmnt-button--text-on-unknown-white mdc-button__text"), C && s.push("lmnt-button--text-on-unknown-black mdc-button__text"));
299
+ var u = [];
300
+ O ? (l && h && u.push("lmnt-button--danger-secondary"), !l && h && (u.push("lmnt-button--danger-secondary"), u.push("mdc-button--raised")), l && m && u.push("lmnt-button--danger-primary"), !l && m && (u.push("lmnt-button--danger-primary"), u.push("mdc-button--raised")), w && u.push("lmnt-button--danger-primary")) : B && (l && m && u.push("lmnt-button--success-primary"), !l && m && (u.push("lmnt-button--success-primary"), u.push("mdc-button--raised")), w && u.push("lmnt-button--success-primary"));
301
+ var W = [c && "lmnt-button--full-width", l && !N && "mdc-button--unelevated", v === "flat" && "lmnt-button--flat", v === "elevated" && "lmnt-button--elevated", "lmnt-button--".concat(y), a === "rounded-small" && "lmnt-button--rounded lmnt-button--rounded-small mdc-button__text lmnt-button--text-primary", a === "rounded-micro" && "lmnt-button--rounded lmnt-button--rounded-micro mdc-button__text lmnt-button--text-primary", i];
302
+ return ln.apply(void 0, hn(S).call(S, r, f, s, u, W));
303
+ }, en = function(e) {
304
+ var a = e.icon, l = e.position, c = "mdc-button__icon lmnt-button__icon--".concat(l);
305
+ return typeof a == "string" ? /* @__PURE__ */ p.createElement(On, {
306
+ className: c,
307
+ icon: a
308
+ }) : typeof a == "function" ? a({
309
+ className: c
310
+ }) : gn(a, c);
311
+ };
312
+ dn.displayName = "Button";
313
+ dn.propTypes = Bn;
314
+ var Un = ["children", "className", "variant"], z = Nn, sn = /* @__PURE__ */ rn(function(t, e) {
315
+ var a = t.children, l = a === void 0 ? z.children : a, c = t.className, v = c === void 0 ? z.className : c, y = t.variant, i = y === void 0 ? z.variant : y, g = on(t, Un);
316
+ return /* @__PURE__ */ p.createElement("div", an({
317
+ ref: e,
318
+ className: ln("lmnt", "lmnt-button-group", i === "dense" && "lmnt-button-group--dense", i === "standard" && "lmnt-button-group--standard", i === "airy" && "lmnt-button-group--airy", v)
319
+ }, g), l);
320
+ });
321
+ sn.displayName = "ButtonGroup";
322
+ sn.propTypes = _n;
323
+ export {
324
+ dn as B
325
+ };
@@ -1,10 +1,11 @@
1
- import { _ as w, c as v, P as r } from "./index-D5m--65X.js";
2
- import l, { forwardRef as F, useState as H, useRef as S, useImperativeHandle as M, useEffect as R } from "react";
3
- import { F as j } from "./index.es-nQ0lMwpE.js";
4
- import { f as x, d as B } from "./index.es-ChSlnpSq.js";
5
- import { b as L, c as f, _ as K, a as U } from "./tslib.es6-BDCynO9F.js";
6
- import { M as V, a as q } from "./component-neHBNHRu.js";
7
- import { M as A, a as D, m as $, b as W } from "./component-DsB0poTj.js";
1
+ import { _ as X, a as I, c as _, P as r } from "./index-Cpb-8cAN.js";
2
+ import { _ as Y } from "./slicedToArray-BWk2gTCn.js";
3
+ import l, { forwardRef as Z, useState as ee, useRef as $, useImperativeHandle as te, useEffect as F } from "react";
4
+ import { F as ne } from "./index.es-CKdJX75f.js";
5
+ import { e as ae, d as re } from "./index.es-BXj90wb_.js";
6
+ import { b as x, c as m, _ as ie, a as oe } from "./tslib.es6-BDCynO9F.js";
7
+ import { M as se, a as de } from "./component-neHBNHRu.js";
8
+ import { M as H, a as M, m as ce, b as le } from "./component-DsB0poTj.js";
8
9
  /**
9
10
  * @license
10
11
  * Copyright 2018 Google Inc.
@@ -32,7 +33,7 @@ var u = {
32
33
  CHECKED: "mdc-switch--checked",
33
34
  /** Class used for a switch that is disabled. */
34
35
  DISABLED: "mdc-switch--disabled"
35
- }, k = {
36
+ }, j = {
36
37
  /** Aria attribute for checked or unchecked state of switch */
37
38
  ARIA_CHECKED_ATTR: "aria-checked",
38
39
  /** A CSS selector used to locate the native HTML control for the switch. */
@@ -62,17 +63,17 @@ var u = {
62
63
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
63
64
  * THE SOFTWARE.
64
65
  */
65
- var _ = (
66
+ var g = (
66
67
  /** @class */
67
- function(s) {
68
- L(t, s);
68
+ function(n) {
69
+ x(t, n);
69
70
  function t(e) {
70
- return s.call(this, f(f({}, t.defaultAdapter), e)) || this;
71
+ return n.call(this, m(m({}, t.defaultAdapter), e)) || this;
71
72
  }
72
73
  return Object.defineProperty(t, "strings", {
73
74
  /** The string constants used by the switch. */
74
75
  get: function() {
75
- return k;
76
+ return j;
76
77
  },
77
78
  enumerable: !1,
78
79
  configurable: !0
@@ -106,14 +107,14 @@ var _ = (
106
107
  }, t.prototype.setDisabled = function(e) {
107
108
  this.adapter.setNativeControlDisabled(e), e ? this.adapter.addClass(u.DISABLED) : this.adapter.removeClass(u.DISABLED);
108
109
  }, t.prototype.handleChange = function(e) {
109
- var a = e.target;
110
- this.updateAriaChecked_(a.checked), this.updateCheckedStyling_(a.checked);
110
+ var d = e.target;
111
+ this.updateAriaChecked_(d.checked), this.updateCheckedStyling_(d.checked);
111
112
  }, t.prototype.updateCheckedStyling_ = function(e) {
112
113
  e ? this.adapter.addClass(u.CHECKED) : this.adapter.removeClass(u.CHECKED);
113
114
  }, t.prototype.updateAriaChecked_ = function(e) {
114
- this.adapter.setNativeControlAttr(k.ARIA_CHECKED_ATTR, "" + !!e);
115
+ this.adapter.setNativeControlAttr(j.ARIA_CHECKED_ATTR, "" + !!e);
115
116
  }, t;
116
- }(V)
117
+ }(se)
117
118
  );
118
119
  /**
119
120
  * @license
@@ -137,44 +138,44 @@ var _ = (
137
138
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
138
139
  * THE SOFTWARE.
139
140
  */
140
- var z = (
141
+ var ue = (
141
142
  /** @class */
142
- function(s) {
143
- L(t, s);
143
+ function(n) {
144
+ x(t, n);
144
145
  function t() {
145
- var e = s !== null && s.apply(this, arguments) || this;
146
+ var e = n !== null && n.apply(this, arguments) || this;
146
147
  return e.ripple_ = e.createRipple_(), e;
147
148
  }
148
149
  return t.attachTo = function(e) {
149
150
  return new t(e);
150
151
  }, t.prototype.destroy = function() {
151
- s.prototype.destroy.call(this), this.ripple_.destroy(), this.nativeControl_.removeEventListener("change", this.changeHandler_);
152
+ n.prototype.destroy.call(this), this.ripple_.destroy(), this.nativeControl_.removeEventListener("change", this.changeHandler_);
152
153
  }, t.prototype.initialSyncWithDOM = function() {
153
154
  var e = this;
154
155
  this.changeHandler_ = function() {
155
- for (var a, n = [], o = 0; o < arguments.length; o++)
156
- n[o] = arguments[o];
157
- return (a = e.foundation).handleChange.apply(a, K([], U(n)));
156
+ for (var d, a = [], i = 0; i < arguments.length; i++)
157
+ a[i] = arguments[i];
158
+ return (d = e.foundation).handleChange.apply(d, ie([], oe(a)));
158
159
  }, this.nativeControl_.addEventListener("change", this.changeHandler_), this.checked = this.checked;
159
160
  }, t.prototype.getDefaultFoundation = function() {
160
- var e = this, a = {
161
- addClass: function(n) {
162
- return e.root.classList.add(n);
161
+ var e = this, d = {
162
+ addClass: function(a) {
163
+ return e.root.classList.add(a);
163
164
  },
164
- removeClass: function(n) {
165
- return e.root.classList.remove(n);
165
+ removeClass: function(a) {
166
+ return e.root.classList.remove(a);
166
167
  },
167
- setNativeControlChecked: function(n) {
168
- return e.nativeControl_.checked = n;
168
+ setNativeControlChecked: function(a) {
169
+ return e.nativeControl_.checked = a;
169
170
  },
170
- setNativeControlDisabled: function(n) {
171
- return e.nativeControl_.disabled = n;
171
+ setNativeControlDisabled: function(a) {
172
+ return e.nativeControl_.disabled = a;
172
173
  },
173
- setNativeControlAttr: function(n, o) {
174
- return e.nativeControl_.setAttribute(n, o);
174
+ setNativeControlAttr: function(a, i) {
175
+ return e.nativeControl_.setAttribute(a, i);
175
176
  }
176
177
  };
177
- return new _(a);
178
+ return new g(d);
178
179
  }, Object.defineProperty(t.prototype, "ripple", {
179
180
  get: function() {
180
181
  return this.ripple_;
@@ -200,35 +201,34 @@ var z = (
200
201
  enumerable: !1,
201
202
  configurable: !0
202
203
  }), t.prototype.createRipple_ = function() {
203
- var e = this, a = _.strings.RIPPLE_SURFACE_SELECTOR, n = this.root.querySelector(a), o = f(f({}, A.createAdapter(this)), { addClass: function(i) {
204
- return n.classList.add(i);
204
+ var e = this, d = g.strings.RIPPLE_SURFACE_SELECTOR, a = this.root.querySelector(d), i = m(m({}, H.createAdapter(this)), { addClass: function(o) {
205
+ return a.classList.add(o);
205
206
  }, computeBoundingRect: function() {
206
- return n.getBoundingClientRect();
207
- }, deregisterInteractionHandler: function(i, c) {
208
- e.nativeControl_.removeEventListener(i, c, D());
207
+ return a.getBoundingClientRect();
208
+ }, deregisterInteractionHandler: function(o, c) {
209
+ e.nativeControl_.removeEventListener(o, c, M());
209
210
  }, isSurfaceActive: function() {
210
- return $(e.nativeControl_, ":active");
211
+ return ce(e.nativeControl_, ":active");
211
212
  }, isUnbounded: function() {
212
213
  return !0;
213
- }, registerInteractionHandler: function(i, c) {
214
- e.nativeControl_.addEventListener(i, c, D());
215
- }, removeClass: function(i) {
216
- n.classList.remove(i);
217
- }, updateCssVariable: function(i, c) {
218
- n.style.setProperty(i, c);
214
+ }, registerInteractionHandler: function(o, c) {
215
+ e.nativeControl_.addEventListener(o, c, M());
216
+ }, removeClass: function(o) {
217
+ a.classList.remove(o);
218
+ }, updateCssVariable: function(o, c) {
219
+ a.style.setProperty(o, c);
219
220
  } });
220
- return new A(this.root, new W(o));
221
+ return new H(this.root, new le(i));
221
222
  }, Object.defineProperty(t.prototype, "nativeControl_", {
222
223
  get: function() {
223
- var e = _.strings.NATIVE_CONTROL_SELECTOR;
224
+ var e = g.strings.NATIVE_CONTROL_SELECTOR;
224
225
  return this.root.querySelector(e);
225
226
  },
226
227
  enumerable: !1,
227
228
  configurable: !0
228
229
  }), t;
229
- }(q)
230
- );
231
- const G = {
230
+ }(de)
231
+ ), he = {
232
232
  /**
233
233
  * Aligns switch to the right of the label.
234
234
  *
@@ -248,7 +248,7 @@ const G = {
248
248
  *
249
249
  * Defaults to **undefined**.
250
250
  */
251
- children: B(r.node, "Switch", "Use `label` instead."),
251
+ children: re(r.node, "Switch", "Use `label` instead."),
252
252
  /**
253
253
  * The css class name to be passed through to the component markup.
254
254
  *
@@ -300,10 +300,10 @@ const G = {
300
300
  /**
301
301
  * When a switch button is checked, this value will be returned as the second parameter of the `change` handler.
302
302
  *
303
- * Defaults to **null**.
303
+ * Defaults to **undefined**.
304
304
  */
305
305
  value: r.oneOfType([r.string, r.number, r.bool, r.object])
306
- }, J = {
306
+ }, pe = {
307
307
  alignEnd: !1,
308
308
  checked: !1,
309
309
  children: void 0,
@@ -313,62 +313,54 @@ const G = {
313
313
  id: void 0,
314
314
  inputProps: void 0,
315
315
  label: "Off|On",
316
+ onChange: null,
316
317
  themeColor: "primary",
317
- value: null
318
- }, b = /* @__PURE__ */ F((s, t) => {
319
- const {
320
- alignEnd: e,
321
- checked: a,
322
- children: n,
323
- className: o,
324
- disabled: i,
325
- hideLabel: c,
326
- id: N,
327
- inputProps: h,
328
- label: P,
329
- onChange: m,
330
- themeColor: g,
331
- value: E,
332
- ...O
333
- } = s, [y] = H(() => N || x()), C = S(), p = S(), T = P || n;
334
- M(t, () => C.current, []);
335
- const I = (d) => {
336
- m?.(d.target.checked, E, d);
318
+ value: void 0
319
+ }, fe = ["alignEnd", "checked", "children", "className", "disabled", "hideLabel", "id", "inputProps", "label", "onChange", "themeColor", "value"], s = pe, B = /* @__PURE__ */ Z(function(n, t) {
320
+ var e = n.alignEnd, d = e === void 0 ? s.alignEnd : e, a = n.checked, i = a === void 0 ? s.checked : a, o = n.children, c = o === void 0 ? s.children : o, E = n.className, K = E === void 0 ? s.className : E, y = n.disabled, v = y === void 0 ? s.disabled : y, S = n.hideLabel, U = S === void 0 ? s.hideLabel : S, w = n.id, V = w === void 0 ? s.id : w, R = n.inputProps, h = R === void 0 ? s.inputProps : R, k = n.label, q = k === void 0 ? s.label : k, L = n.onChange, C = L === void 0 ? s.onChange : L, N = n.themeColor, A = N === void 0 ? s.themeColor : N, P = n.value, D = P === void 0 ? s.value : P, W = X(n, fe), z = ee(function() {
321
+ return V || ae();
322
+ }), G = Y(z, 1), O = G[0], b = $(), p = $(), J = c || q;
323
+ te(t, function() {
324
+ return b.current;
325
+ }, []);
326
+ var Q = function(T) {
327
+ C?.(T.target.checked, D, T);
337
328
  };
338
- return R(() => (p.current = z.attachTo(C.current), () => {
339
- var d;
340
- (d = p.current) === null || d === void 0 || d.destroy();
341
- }), []), R(() => {
342
- p.current.checked = !!a;
343
- }, [a]), /* @__PURE__ */ l.createElement(j, {
329
+ return F(function() {
330
+ return p.current = ue.attachTo(b.current), function() {
331
+ var f;
332
+ (f = p.current) === null || f === void 0 || f.destroy();
333
+ };
334
+ }, []), F(function() {
335
+ p.current.checked = !!i;
336
+ }, [i]), /* @__PURE__ */ l.createElement(ne, {
344
337
  inputRef: p,
345
- alignEnd: e
346
- }, /* @__PURE__ */ l.createElement("div", w({
347
- ref: C,
348
- className: v("lmnt mdc-switch lmnt-switch", i && "mdc-switch--disabled", a && "mdc-switch--checked", g && `lmnt-switch--${g}`, o)
349
- }, O), /* @__PURE__ */ l.createElement("div", {
338
+ alignEnd: d
339
+ }, /* @__PURE__ */ l.createElement("div", I({
340
+ ref: b,
341
+ className: _("lmnt mdc-switch lmnt-switch", v && "mdc-switch--disabled", i && "mdc-switch--checked", A && "lmnt-switch--".concat(A), K)
342
+ }, W), /* @__PURE__ */ l.createElement("div", {
350
343
  className: "mdc-switch__track"
351
344
  }), /* @__PURE__ */ l.createElement("div", {
352
345
  className: "mdc-switch__thumb-underlay"
353
346
  }, /* @__PURE__ */ l.createElement("div", {
354
347
  className: "mdc-switch__thumb"
355
- }), /* @__PURE__ */ l.createElement("input", w({
356
- onChange: I,
357
- disabled: i,
348
+ }), /* @__PURE__ */ l.createElement("input", I({
349
+ onChange: Q,
350
+ disabled: v,
358
351
  type: "checkbox",
359
- id: y,
352
+ id: O,
360
353
  role: "switch"
361
354
  }, h, {
362
- className: v("mdc-switch__native-control", h?.className),
363
- value: E
355
+ className: _("mdc-switch__native-control", h?.className),
356
+ value: D
364
357
  })))), /* @__PURE__ */ l.createElement("label", {
365
- className: v("lmnt-switch-label mdc-switch-label", c && "sr-only", i && "lmnt-switch-label--disabled"),
366
- htmlFor: y
367
- }, T));
358
+ className: _("lmnt-switch-label mdc-switch-label", U && "sr-only", v && "lmnt-switch-label--disabled"),
359
+ htmlFor: O
360
+ }, J));
368
361
  });
369
- b.displayName = "Switch";
370
- b.propTypes = G;
371
- b.SwitchDefaultProps = J;
362
+ B.displayName = "Switch";
363
+ B.propTypes = he;
372
364
  export {
373
- b as S
365
+ B as S
374
366
  };