@hortiview/default-components 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/dist/{Iconify-Cjdr-ccS.js → Iconify-CUZc8WnW.js} +17 -16
  3. package/dist/InfoCard-CFmkh7DJ.js +58 -0
  4. package/dist/{LoadingSpinner-FRQEZvxs.js → LoadingSpinner-DVBQ1tGJ.js} +178 -192
  5. package/dist/OfflineView-DHtzNLwt-BmxTfGZq.js +46 -0
  6. package/dist/assets/InfoCard.css +1 -0
  7. package/dist/assets/OfflineView-DHtzNLwt.css +1 -0
  8. package/dist/{component-DsB0poTj-BDGiEcbP.js → component-DsB0poTj-CeLHB9Ok.js} +3 -3
  9. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +1337 -505
  10. package/dist/components/DefaultFormSelect/DefaultFormSelect.js +25 -25
  11. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +2 -2
  12. package/dist/components/GenericTable/GenericTable.js +11524 -9875
  13. package/dist/components/HealthChecks/DataBaseHealthCheck.d.ts +2 -2
  14. package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
  15. package/dist/components/HealthChecks/DefaultHealthCheck.d.ts +2 -2
  16. package/dist/components/HealthChecks/DefaultHealthCheck.js +2 -2
  17. package/dist/components/HealthChecks/IotServiceHealthCheck.d.ts +2 -2
  18. package/dist/components/HealthChecks/IotServiceHealthCheck.js +2 -2
  19. package/dist/components/HealthChecks/PlatformHealthCheck.d.ts +2 -2
  20. package/dist/components/HealthChecks/PlatformHealthCheck.js +2 -2
  21. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +2 -2
  22. package/dist/components/OfflineView/OfflineView.js +2 -2
  23. package/dist/index.es-0QJC9VS2-CNPew9LK.js +360 -0
  24. package/dist/{index.es--yyG47az-DBKBm3yD.js → index.es-BGordhUK-C36NK84Q.js} +400 -365
  25. package/dist/index.es-Bg8hxXM8-BlFd894m.js +1083 -0
  26. package/dist/index.es-Bo1Rhtyb-B650l9Yk.js +79 -0
  27. package/dist/index.es-CK4oZMKs-Da8pin7D.js +14077 -0
  28. package/dist/{index.es-U5-b20Gv-ChQ_O81C.js → index.es-Cq04gn3U-Bvzrqtm6.js} +369 -535
  29. package/dist/{omit-1Eom1PmQ-BLY9iMqj.js → index.es-DENZVv7_-PUEN9sIa.js} +495 -869
  30. package/dist/index.es-IXyb5F6n-B5afcHX8.js +452 -0
  31. package/dist/isTypedArray-Dw_IY7Zq-BZ-4N8-Z.js +210 -0
  32. package/dist/main.d.ts +3 -2
  33. package/dist/main.js +8 -8
  34. package/dist/slicedToArray-BWk2gTCn-Cfzj7tjm.js +432 -0
  35. package/dist/useHelperText-3ahu6tTS.js +391 -0
  36. package/dist/useTranslation-CVaIJbcK.js +5277 -0
  37. package/package.json +4 -4
  38. package/dist/HealthCheckFailed-CqLYAwpc.js +0 -47
  39. package/dist/OfflineView-HbuDPpQL-kqlzfoUS.js +0 -46
  40. package/dist/assets/HealthCheckFailed.css +0 -1
  41. package/dist/assets/OfflineView-HbuDPpQL.css +0 -1
  42. package/dist/index.es-Bx1E5MPK-CaV59rEP.js +0 -344
  43. package/dist/index.es-CzUKBF7E-C0X-mcdY.js +0 -13567
  44. package/dist/index.es-D-ph6ImM-CWxTa_iD.js +0 -63
  45. package/dist/index.es-DDo_AHL0-VqD9ikmU.js +0 -1033
  46. package/dist/index.es-Kg9soDed-BkTwDySy.js +0 -440
  47. package/dist/useHelperText-DD9_Dtkk.js +0 -21
  48. package/dist/useTranslation-B_ODv8uN.js +0 -4306
@@ -1,4 +1,4 @@
1
- import { HealthCheckFailedProps } from '@hortiview/shared-components';
1
+ import { InfoCardProps } from '@hortiview/shared-components';
2
2
 
3
- export type DataBaseHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
3
+ export type DataBaseHealthCheckProps = Omit<InfoCardProps, 'title' | 'subtitle' | 'type'>;
4
4
  export declare const DataBaseHealthCheck: ({ ...props }: DataBaseHealthCheckProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { N as r } from "../../HealthCheckFailed-CqLYAwpc.js";
2
+ import { G as r } from "../../InfoCard-CFmkh7DJ.js";
3
3
  import { InternationalizationWrapper as o } from "../InternationalizationWrapper/InternationalizationWrapper.js";
4
- import { u as i } from "../../useTranslation-B_ODv8uN.js";
4
+ import { u as i } from "../../useTranslation-CVaIJbcK.js";
5
5
  const m = ({ ...e }) => {
6
6
  const { t } = i();
7
7
  return /* @__PURE__ */ a(o, { children: /* @__PURE__ */ a(
@@ -1,4 +1,4 @@
1
- import { HealthCheckFailedProps } from '@hortiview/shared-components';
1
+ import { InfoCardProps } from '@hortiview/shared-components';
2
2
 
3
- export type DefaultHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
3
+ export type DefaultHealthCheckProps = Omit<InfoCardProps, 'title' | 'subtitle' | 'type'>;
4
4
  export declare const DefaultHealthCheck: ({ ...props }: DefaultHealthCheckProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { N as o } from "../../HealthCheckFailed-CqLYAwpc.js";
2
+ import { G as o } from "../../InfoCard-CFmkh7DJ.js";
3
3
  import { InternationalizationWrapper as a } from "../InternationalizationWrapper/InternationalizationWrapper.js";
4
- import { u as i } from "../../useTranslation-B_ODv8uN.js";
4
+ import { u as i } from "../../useTranslation-CVaIJbcK.js";
5
5
  const p = ({ ...r }) => {
6
6
  const { t } = i();
7
7
  return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
@@ -1,4 +1,4 @@
1
- import { HealthCheckFailedProps } from '@hortiview/shared-components';
1
+ import { InfoCardProps } from '@hortiview/shared-components';
2
2
 
3
- export type IotServiceHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
3
+ export type IotServiceHealthCheckProps = Omit<InfoCardProps, 'title' | 'subtitle' | 'type'>;
4
4
  export declare const IotServiceHealthCheck: ({ ...props }: IotServiceHealthCheckProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { N as i } from "../../HealthCheckFailed-CqLYAwpc.js";
2
+ import { G as i } from "../../InfoCard-CFmkh7DJ.js";
3
3
  import { InternationalizationWrapper as o } from "../InternationalizationWrapper/InternationalizationWrapper.js";
4
- import { u as a } from "../../useTranslation-B_ODv8uN.js";
4
+ import { u as a } from "../../useTranslation-CVaIJbcK.js";
5
5
  const m = ({ ...r }) => {
6
6
  const { t } = a();
7
7
  return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
@@ -1,4 +1,4 @@
1
- import { HealthCheckFailedProps } from '@hortiview/shared-components';
1
+ import { InfoCardProps } from '@hortiview/shared-components';
2
2
 
3
- export type PlatformHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
3
+ export type PlatformHealthCheckProps = Omit<InfoCardProps, 'title' | 'subtitle' | 'type'>;
4
4
  export declare const PlatformHealthCheck: ({ isOutlined }: PlatformHealthCheckProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { N as e } from "../../HealthCheckFailed-CqLYAwpc.js";
2
+ import { G as e } from "../../InfoCard-CFmkh7DJ.js";
3
3
  import { InternationalizationWrapper as a } from "../InternationalizationWrapper/InternationalizationWrapper.js";
4
- import { u as l } from "../../useTranslation-B_ODv8uN.js";
4
+ import { u as l } from "../../useTranslation-CVaIJbcK.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 { p as r } from "../../LoadingSpinner-FRQEZvxs.js";
2
+ import { N as r } from "../../LoadingSpinner-DVBQ1tGJ.js";
3
3
  import { InternationalizationWrapper as a } from "../InternationalizationWrapper/InternationalizationWrapper.js";
4
- import { u as t } from "../../useTranslation-B_ODv8uN.js";
4
+ import { u as t } from "../../useTranslation-CVaIJbcK.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 { z as o } from "../../OfflineView-HbuDPpQL-kqlzfoUS.js";
2
+ import { j as o } from "../../OfflineView-DHtzNLwt-BmxTfGZq.js";
3
3
  import { InternationalizationWrapper as r } from "../InternationalizationWrapper/InternationalizationWrapper.js";
4
- import { u as n } from "../../useTranslation-B_ODv8uN.js";
4
+ import { u as n } from "../../useTranslation-CVaIJbcK.js";
5
5
  const a = ({ ...e }) => {
6
6
  const { t } = n();
7
7
  return /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(
@@ -0,0 +1,360 @@
1
+ import { t, r as rn, h as un, e as dn, q as xn, ag as Cn, l as On, m as h, Y as _n } from "./useTranslation-CVaIJbcK.js";
2
+ import y, { forwardRef as D, useRef as sn, useImperativeHandle as cn, useEffect as Nn, useMemo as an } from "react";
3
+ import { U as Un } from "./component-DsB0poTj-CeLHB9Ok.js";
4
+ var Bn = {
5
+ /**
6
+ * Content to be rendered inside the component.
7
+ *
8
+ * Defaults to **null**.
9
+ */
10
+ children: t.node,
11
+ /**
12
+ * A reference to the component to apply the ripple to.
13
+ *
14
+ * Defaults to **undefined**.
15
+ */
16
+ componentRef: t.object,
17
+ /**
18
+ * Allows the ripple to extend beyond the component boundaries.
19
+ *
20
+ * Defaults to **undefined**.
21
+ */
22
+ unbounded: t.bool
23
+ }, Sn = {
24
+ children: null,
25
+ componentRef: void 0,
26
+ unbounded: void 0
27
+ }, P = Sn, $ = /* @__PURE__ */ D(function(n, a) {
28
+ var l = n.componentRef, u = l === void 0 ? P.componentRef : l, c = n.unbounded, p = c === void 0 ? P.unbounded : c, e = n.children, b = e === void 0 ? P.children : e, m = sn();
29
+ return cn(a, function() {
30
+ return m.current;
31
+ }, []), Nn(function() {
32
+ var r = u.current;
33
+ return r && (m.current = Un.attachTo(u.current), p && (m.current.unbounded = !0)), function() {
34
+ r && m.current.destroy();
35
+ };
36
+ }, [u, p]), b;
37
+ });
38
+ $.displayName = "Ripple";
39
+ $.propTypes = Bn;
40
+ var Rn = {
41
+ /**
42
+ * @deprecated _Use `themeColor='secondary'` instead._
43
+ *
44
+ * Preview feature, this may change. Apply alternative button color scheme (defined by the individual theme).
45
+ *
46
+ * Defaults to **undefined**.
47
+ */
48
+ altColor: h(t.bool, "Button", 'Use `themeColor="secondary"` instead.'),
49
+ /**
50
+ * One of 'xsmall', 'small', 'medium', 'large' and 'xlarge' will change the size of the button. Defaults according to your theme.
51
+ *
52
+ * Defaults to **'themeDefault'**.
53
+ */
54
+ buttonSize: t.oneOf(["xsmall", "small", "medium", "large", "xlarge", "themeDefault"]),
55
+ /**
56
+ * 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._
57
+ *
58
+ * Defaults to **null**.
59
+ */
60
+ children: t.node,
61
+ /**
62
+ * The css class name to be passed through to the component markup.
63
+ *
64
+ * Defaults to **undefined**.
65
+ */
66
+ className: t.string,
67
+ /**
68
+ * @deprecated _forwardRef has been implemented for Button._
69
+ *
70
+ * Reference to the DOM button. This enables a greater level of integration.
71
+ *
72
+ * Defaults to **undefined**.
73
+ */
74
+ customRef: h(t.oneOfType([
75
+ t.func,
76
+ // eslint-disable-next-line react/forbid-prop-types
77
+ t.shape({
78
+ current: t.any
79
+ })
80
+ ]), "Button", "forwardRef has been implemented for Button."),
81
+ /**
82
+ * @deprecated _Use `variant='danger'` instead._
83
+ *
84
+ * Apply danger style to the button.
85
+ *
86
+ * Defaults to **undefined**.
87
+ */
88
+ danger: h(t.bool, "Button", 'Use `variant="danger"` instead.'),
89
+ /**
90
+ * Prevent the user from interacting with the component.
91
+ *
92
+ * Defaults to **false**.
93
+ */
94
+ disabled: t.bool,
95
+ /**
96
+ * Sets elevation of the button. Default will be the theme default.
97
+ *
98
+ * Defaults to **'default'**.
99
+ */
100
+ elevation: t.oneOf(["default", "elevated", "flat"]),
101
+ /**
102
+ * @deprecated _Use `variant='filled'` instead._
103
+ *
104
+ * Apply a filled-in style. Previously called `primary`.
105
+ *
106
+ * Defaults to **undefined**.
107
+ */
108
+ filled: h(t.bool, "Button", 'Use `variant="filled"` instead.'),
109
+ /**
110
+ * Applies a full-width style where the textfield will fill it's container.
111
+ *
112
+ * Defaults to **false**.
113
+ */
114
+ fullWidth: t.bool,
115
+ /**
116
+ * The button will render as an anchor tag. If the tag prop is set, that prop will take precedence.
117
+ *
118
+ * Defaults to **null**.
119
+ */
120
+ href: t.string,
121
+ /**
122
+ * The displayed text. Expects a valid string. If label and children are both set, label will take priority.
123
+ *
124
+ * Defaults to **null**.
125
+ */
126
+ label: t.string,
127
+ /**
128
+ * 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,
129
+ *
130
+ * Defaults to **undefined**.
131
+ */
132
+ leadingIcon: t.oneOfType([t.string, t.func, t.node]),
133
+ /**
134
+ * The primary interaction event for button.
135
+ *
136
+ * Defaults to **null**.
137
+ */
138
+ onClick: t.func,
139
+ /**
140
+ * @deprecated _Use `variant='outlined'`._
141
+ *
142
+ * Apply outlined style to the button. Previously called `secondary`.
143
+ *
144
+ * Defaults to **undefined**.
145
+ */
146
+ outlined: h(t.bool, "Button", 'Use `variant="outlined"`.'),
147
+ /**
148
+ * @deprecated _Use `variant='filled'` instead._
149
+ *
150
+ * Apply primary style to the Button.
151
+ *
152
+ * Defaults to **undefined**.
153
+ */
154
+ primary: h(t.bool, "Button", 'Use `variant="filled"` instead.'),
155
+ /**
156
+ * @deprecated _Use `'variant=outlined'` instead._
157
+ *
158
+ * Apply secondary style to the Button.
159
+ *
160
+ * Defaults to **undefined**.
161
+ */
162
+ secondary: h(t.bool, "Button", 'Use `"variant=outlined"` instead.'),
163
+ /**
164
+ * 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.
165
+ *
166
+ * Defaults to **null**.
167
+ */
168
+ tag: t.oneOfType([t.string, t.elementType, t.instanceOf(y.Component)]),
169
+ /**
170
+ * @deprecated _Use `variant='embedded'` instead._
171
+ *
172
+ * Apply tertiary style to the Button.
173
+ *
174
+ * Defaults to **undefined**.
175
+ */
176
+ tertiary: h(t.bool, "Button", 'Use `variant="embedded"` instead.'),
177
+ /**
178
+ * @deprecated _Use `variant='text'` instead._
179
+ *
180
+ * Apply unfilled, un-outlined style to the Button. Previously called `tertiary`.
181
+ *
182
+ * Defaults to **undefined**.
183
+ */
184
+ text: h(t.bool, "Button", 'Use `variant="text"` instead.'),
185
+ /**
186
+ * Sets the theme color for the button. Most commonly used when the control is placed on a darker surface.
187
+ *
188
+ * Defaults to **'primary'**.
189
+ */
190
+ themeColor: _n(t.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'."),
191
+ /**
192
+ * 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.
193
+ *
194
+ * Defaults to **undefined**.
195
+ */
196
+ trailingIcon: t.oneOfType([t.string, t.func, t.node]),
197
+ /**
198
+ * This applies the html button type (button, submit, reset) or the anchor media type when used with the href property.
199
+ *
200
+ * Defaults to **'button'**.
201
+ */
202
+ type: t.oneOf(["button", "submit", "reset"]),
203
+ /**
204
+ * @deprecated _Use `elevation='flat' instead._
205
+ *
206
+ * Remove elevation.
207
+ *
208
+ * Defaults to **undefined**.
209
+ */
210
+ unelevated: h(t.bool, "Button", 'Use `elevation="flat" instead.'),
211
+ /**
212
+ * Applies the selected style to the button. `rounded-small` and `rounded-micro` are only available on select themes.
213
+ *
214
+ * Defaults to **'filled'**.
215
+ */
216
+ variant: t.oneOf(["filled", "outlined", "danger", "text", "success", "rounded-small", "rounded-micro"])
217
+ }, In = {
218
+ altColor: void 0,
219
+ buttonSize: "themeDefault",
220
+ children: null,
221
+ className: void 0,
222
+ customRef: void 0,
223
+ danger: void 0,
224
+ disabled: !1,
225
+ elevation: "default",
226
+ filled: void 0,
227
+ fullWidth: !1,
228
+ href: null,
229
+ label: null,
230
+ leadingIcon: void 0,
231
+ onClick: null,
232
+ outlined: void 0,
233
+ primary: void 0,
234
+ secondary: void 0,
235
+ tag: null,
236
+ tertiary: void 0,
237
+ text: void 0,
238
+ themeColor: "primary",
239
+ trailingIcon: void 0,
240
+ type: "button",
241
+ unelevated: void 0,
242
+ variant: "filled"
243
+ }, Wn = {
244
+ /**
245
+ * Children to be rendered. Expects multiple Element Buttons
246
+ *
247
+ * Defaults to **null**.
248
+ */
249
+ children: t.node,
250
+ /**
251
+ * How much spacing between buttons. Dense is 8p, standard is 16px and airy is 24px.
252
+ *
253
+ * Defaults to **'standard'**.
254
+ */
255
+ variant: t.oneOf(["dense", "standard", "airy"])
256
+ }, Tn = {
257
+ children: null,
258
+ variant: "standard"
259
+ }, En = ["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 = In, mn = /* @__PURE__ */ D(function(n, a) {
260
+ var l = n.altColor, u = l === void 0 ? o.altColor : l, c = n.buttonSize, p = c === void 0 ? o.buttonSize : c, e = n.children, b = e === void 0 ? o.children : e, m = n.className, r = m === void 0 ? o.className : m, k = n.customRef, T = k === void 0 ? o.customRef : k, C = n.disabled, U = C === void 0 ? o.disabled : C, O = n.elevation, g = O === void 0 ? o.elevation : O, v = n.primary, w = v === void 0 ? o.primary : v, x = n.secondary, _ = x === void 0 ? o.secondary : x, N = n.tertiary, R = N === void 0 ? o.tertiary : N, I = n.text, B = I === void 0 ? o.text : I, i = n.danger, S = i === void 0 ? o.danger : i, f = n.filled, d = f === void 0 ? o.filled : f, s = n.fullWidth, W = s === void 0 ? o.fullWidth : s, Y = n.href, j = Y === void 0 ? o.href : Y, q = n.label, bn = q === void 0 ? o.label : q, G = n.leadingIcon, H = G === void 0 ? o.leadingIcon : G, M = n.onClick, vn = M === void 0 ? o.onClick : M, X = n.outlined, A = X === void 0 ? o.outlined : X, F = n.tag, fn = F === void 0 ? o.tag : F, J = n.themeColor, K = J === void 0 ? o.themeColor : J, L = n.trailingIcon, Q = L === void 0 ? o.trailingIcon : L, V = n.type, hn = V === void 0 ? o.type : V, Z = n.unelevated, nn = Z === void 0 ? o.unelevated : Z, tn = n.variant, en = tn === void 0 ? o.variant : tn, yn = rn(n, En), E = sn(T || null);
261
+ cn(a, function() {
262
+ return E.current;
263
+ }, []);
264
+ var gn = bn || b, kn = fn || (j ? "a" : "button"), on = an(function() {
265
+ return {
266
+ variant: en,
267
+ outlined: A,
268
+ text: B,
269
+ tertiary: R,
270
+ danger: S,
271
+ themeColor: K,
272
+ filled: d,
273
+ primary: w,
274
+ secondary: _,
275
+ unelevated: nn,
276
+ fullWidth: W,
277
+ elevation: g,
278
+ buttonSize: p,
279
+ className: r,
280
+ altColor: u
281
+ };
282
+ }, [en, A, B, R, S, K, d, w, _, nn, W, g, p, r, u]), wn = an(function() {
283
+ return zn(on);
284
+ }, [on]);
285
+ return /* @__PURE__ */ y.createElement($, {
286
+ componentRef: E
287
+ }, /* @__PURE__ */ y.createElement(kn, un({
288
+ ref: E,
289
+ href: j,
290
+ onClick: vn,
291
+ type: hn,
292
+ disabled: U,
293
+ className: wn
294
+ }, yn), /* @__PURE__ */ y.createElement("span", {
295
+ className: "mdc-button__ripple"
296
+ }), H && /* @__PURE__ */ y.createElement(ln, {
297
+ icon: H,
298
+ position: "leading"
299
+ }), /* @__PURE__ */ y.createElement("span", {
300
+ className: "mdc-button__label"
301
+ }, gn), Q && /* @__PURE__ */ y.createElement(ln, {
302
+ icon: Q,
303
+ position: "trailing"
304
+ }), /* @__PURE__ */ y.createElement("span", {
305
+ className: "mdc-button__touch"
306
+ })));
307
+ }), Pn = function(n) {
308
+ var a = n.variant, l = n.outlined, u = n.text, c = n.tertiary, p = n.danger, e = n.themeColor;
309
+ n.filled, n.primary;
310
+ var b = n.secondary, m = n.altColor;
311
+ return {
312
+ isOutlined: a === "outlined" || l || b,
313
+ isRounded: a === "rounded-small" || a === "rounded-micro",
314
+ isText: a === "text" || u || c,
315
+ isDanger: a === "danger" || p || e === "danger",
316
+ isSuccess: a === "success" || e === "success",
317
+ isSecondaryColor: m || e === "secondary",
318
+ isPrimaryColor: e === "primary",
319
+ isOnUnknownBlack: e === "onUnknownBlack" || e === "on-unknown-black",
320
+ isOnUnknownWhite: e === "onUnknownWhite" || e === "on-unknown-white",
321
+ isOnPrimary: e === "onPrimary" || e === "on-primary",
322
+ isOnSecondary: e === "onSecondary" || e === "on-secondary",
323
+ isOnSuccess: e === "on-success",
324
+ isOnDanger: e === "on-danger"
325
+ };
326
+ }, zn = function(n) {
327
+ var a = n.variant, l = n.unelevated, u = n.fullWidth, c = n.elevation, p = n.buttonSize, e = n.className, b = n.filled, m = n.primary, r = Pn(n), k = r.isOutlined, T = r.isRounded, C = r.isText, U = r.isDanger, O = r.isSuccess, g = r.isSecondaryColor, v = r.isPrimaryColor, w = r.isOnUnknownBlack, x = r.isOnUnknownWhite, _ = r.isOnPrimary, N = r.isOnSecondary, R = r.isOnSuccess, I = r.isOnDanger, B = ["lmnt", "mdc-button", "lmnt-button", "mdc-button--touch", "mdc-touch-target-wrapper"], i = [], S = !k && !C && (a === "filled" || b || m);
328
+ S && l && (v && i.push("lmnt-button--filled-primary"), g && i.push("lmnt-button--filled-secondary"), U && i.push("lmnt-button--filled-danger"), O && i.push("lmnt-button--filled-success")), S && !l && (i.push("mdc-button--raised"), v && i.push("lmnt-button--filled-primary"), g && i.push("lmnt-button--filled-secondary"), _ && i.push("lmnt-button--filled-on-primary"), N && i.push("lmnt-button--filled-on-secondary"), R && i.push("lmnt-button--filled-on-success"), I && i.push("lmnt-button--filled-on-danger"), w && i.push("lmnt-button--filled-on-unknown-black"), x && i.push("lmnt-button--filled-on-unknown-white"));
329
+ var f = [];
330
+ k && (f.push("mdc-button--outlined"), v && f.push("lmnt-button--outlined-primary"), g && f.push("lmnt-button--outlined-secondary"), _ && f.push("lmnt-button--outlined-on-primary"), N && f.push("lmnt-button--outlined-on-secondary"), x && f.push("lmnt-button--outlined-on-unknown-white"), w && f.push("lmnt-button--outlined-on-unknown-black"));
331
+ var d = [];
332
+ C && (d.push("mdc-button__text"), _ && d.push("lmnt-button--text-on-primary"), N && d.push("lmnt-button--text-on-secondary"), x && d.push("lmnt-button--text-on-unknown-white"), w && d.push("lmnt-button--text-on-unknown-black"), v && d.push("lmnt-button--text-primary"), g && d.push("lmnt-button--text-secondary"), U && d.push("lmnt-button--text-danger"), O && d.push("lmnt-button--text-success")), T && (x && d.push("lmnt-button--text-on-unknown-white mdc-button__text"), w && d.push("lmnt-button--text-on-unknown-black mdc-button__text"));
333
+ var s = [];
334
+ U ? (l && g && s.push("lmnt-button--danger-secondary"), !l && g && (s.push("lmnt-button--danger-secondary"), s.push("mdc-button--raised")), l && v && s.push("lmnt-button--danger-primary"), !l && v && (s.push("lmnt-button--danger-primary"), s.push("mdc-button--raised")), k && s.push("lmnt-button--danger-primary")) : O && (l && v && s.push("lmnt-button--success-primary"), !l && v && (s.push("lmnt-button--success-primary"), s.push("mdc-button--raised")), k && s.push("lmnt-button--success-primary"));
335
+ var W = [u && "lmnt-button--full-width", l && !C && "mdc-button--unelevated", c === "flat" && "lmnt-button--flat", c === "elevated" && "lmnt-button--elevated", "lmnt-button--".concat(p), 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", e];
336
+ return dn.apply(void 0, xn(B).call(B, i, f, d, s, W));
337
+ }, ln = function(n) {
338
+ var a = n.icon, l = n.position, u = "mdc-button__icon lmnt-button__icon--".concat(l);
339
+ return typeof a == "string" ? /* @__PURE__ */ y.createElement(On, {
340
+ className: u,
341
+ icon: a
342
+ }) : typeof a == "function" ? a({
343
+ className: u
344
+ }) : Cn(a, u);
345
+ };
346
+ mn.displayName = "Button";
347
+ mn.propTypes = Rn;
348
+ var Dn = ["children", "className", "variant"], z = Tn, pn = /* @__PURE__ */ D(function(n, a) {
349
+ var l = n.children, u = l === void 0 ? z.children : l, c = n.className, p = c === void 0 ? z.className : c, e = n.variant, b = e === void 0 ? z.variant : e, m = rn(n, Dn);
350
+ return /* @__PURE__ */ y.createElement("div", un({
351
+ ref: a,
352
+ className: dn("lmnt", "lmnt-button-group", b === "dense" && "lmnt-button-group--dense", b === "standard" && "lmnt-button-group--standard", b === "airy" && "lmnt-button-group--airy", p)
353
+ }, m), u);
354
+ });
355
+ pn.displayName = "ButtonGroup";
356
+ pn.propTypes = Wn;
357
+ export {
358
+ $ as c,
359
+ mn as d
360
+ };