asma-ui-core 3.126.1 → 3.126.3

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.
@@ -1,11 +1,11 @@
1
- import { StyledTooltip as L } from "../../data-display/tooltip/StyledTooltip.js";
2
- import { LoadingIcon as O } from "../../icons/loading-icon/LoadingIcon.js";
1
+ import { StyledTooltip as O } from "../../data-display/tooltip/StyledTooltip.js";
2
+ import { LoadingIcon as W } from "../../icons/loading-icon/LoadingIcon.js";
3
3
  import e from "./StyledButton.module.js";
4
- import { useReportDialogBusy as W } from "../../feedback/dialog/DialogBusyContext.js";
4
+ import { useReportDialogBusy as _ } from "../../feedback/dialog/DialogBusyContext.js";
5
5
  import y from "clsx";
6
6
  import "react";
7
- import { Fragment as _, jsx as o, jsxs as f } from "react/jsx-runtime";
8
- var F = {
7
+ import { Fragment as F, jsx as o, jsxs as f } from "react/jsx-runtime";
8
+ var T = {
9
9
  en: "In progress",
10
10
  no: "Pågår"
11
11
  }, x = {
@@ -19,27 +19,28 @@ var F = {
19
19
  medium: e.medium,
20
20
  error: e.error,
21
21
  common: e.common
22
- }, M = ({ variant: h = "contained", className: v = "", size: r = "medium", children: i, refLink: w, startIcon: B, endIcon: b, dataTest: g, error: S, style: k, disabled: c, disabledReason: p, loading: t, holdsDialog: I = !0, loadingAnnouncement: j, locale: C = "en", onClick: D, ...l }) => {
23
- W(!!t && I);
24
- const n = r === "large" || r === "medium", N = S ? "error" : "common", s = !!c && !!p, m = s || !!t, d = n ? 20 : 16, u = (a) => t && a ? /* @__PURE__ */ o("span", {
22
+ }, P = ({ variant: h = "contained", className: v = "", size: r = "medium", children: i, refLink: w, startIcon: b, endIcon: B, dataTest: g, error: S, style: k, disabled: c, disabledReason: p, loading: t, holdsDialog: I = !0, loadingAnnouncement: j, locale: C = "en", onClick: D, type: N = "button", ...l }) => {
23
+ _(!!t && I);
24
+ const n = r === "large" || r === "medium", R = S ? "error" : "common", s = !!c && !!p, m = s || !!t, u = n ? 20 : 16, d = (a) => t && a ? /* @__PURE__ */ o("span", {
25
25
  style: {
26
26
  display: "inline-flex",
27
27
  opacity: 0
28
28
  },
29
29
  children: a
30
- }) : a, R = (a) => {
30
+ }) : a, G = (a) => {
31
31
  if (m) {
32
32
  a.preventDefault();
33
33
  return;
34
34
  }
35
35
  D?.(a);
36
- }, G = /* @__PURE__ */ f("button", {
36
+ }, L = /* @__PURE__ */ f("button", {
37
37
  ...l,
38
+ type: N,
38
39
  disabled: !!c && !m,
39
40
  "aria-disabled": m ? !0 : l["aria-disabled"],
40
41
  "aria-busy": t ? !0 : l["aria-busy"],
41
- onClick: R,
42
- className: y("asma-touch-ready", e["asma-ui-core-button"], x[h], x[N], x[r], "max-xs:h-auto max-xs:max-w-full max-xs:py-1 max-xs:[&>:not(div)]:shrink-0", r === "small" ? "max-xs:min-h-8" : "max-xs:min-h-10", v),
42
+ onClick: G,
43
+ className: y("asma-touch-ready", e["asma-ui-core-button"], x[h], x[R], x[r], "max-xs:h-auto max-xs:max-w-full max-xs:py-1 max-xs:[&>:not(div)]:shrink-0", r === "small" ? "max-xs:min-h-8" : "max-xs:min-h-10", v),
43
44
  style: {
44
45
  ...i ? { flexShrink: 0 } : {},
45
46
  ...t ? { position: "relative" } : {},
@@ -48,7 +49,7 @@ var F = {
48
49
  ref: w,
49
50
  "data-testid": g,
50
51
  children: [
51
- u(B),
52
+ d(b),
52
53
  i && /* @__PURE__ */ o("div", {
53
54
  className: y("max-xs:hyphens-auto max-xs:whitespace-normal max-xs:![overflow-wrap:anywhere]", "max-xs:text-center"),
54
55
  style: {
@@ -65,7 +66,7 @@ var F = {
65
66
  },
66
67
  children: i
67
68
  }),
68
- u(b),
69
+ d(B),
69
70
  t && /* @__PURE__ */ o("span", {
70
71
  "aria-hidden": "true",
71
72
  style: {
@@ -75,26 +76,26 @@ var F = {
75
76
  alignItems: "center",
76
77
  justifyContent: "center"
77
78
  },
78
- children: /* @__PURE__ */ o(O, {
79
- width: d,
80
- height: d
79
+ children: /* @__PURE__ */ o(W, {
80
+ width: u,
81
+ height: u
81
82
  })
82
83
  })
83
84
  ]
84
85
  });
85
- return /* @__PURE__ */ f(_, { children: [/* @__PURE__ */ o(L, {
86
+ return /* @__PURE__ */ f(F, { children: [/* @__PURE__ */ o(O, {
86
87
  arrow: !0,
87
88
  title: p,
88
89
  open: s ? void 0 : !1,
89
90
  openOnTap: s,
90
91
  persistentDescription: s,
91
- children: G
92
+ children: L
92
93
  }), t !== void 0 && /* @__PURE__ */ o("span", {
93
94
  role: "status",
94
95
  className: "sr-only",
95
- children: t ? j ?? F[C] : ""
96
+ children: t ? j ?? T[C] : ""
96
97
  })] });
97
98
  };
98
99
  export {
99
- M as StyledButton
100
+ P as StyledButton
100
101
  };
@@ -1,22 +1,22 @@
1
- import { cn as r } from "../../../helpers/cn.js";
1
+ import { cn as e } from "../../../helpers/cn.js";
2
2
  import { fieldLabelAboveClass as s } from "../field-styles.js";
3
- import e from "./StyledFieldPair.module.js";
4
- import { jsx as l, jsxs as o } from "react/jsx-runtime";
5
- var p = ({ children: i, legend: d, className: t, dataTest: a }) => d == null ? /* @__PURE__ */ l("div", {
6
- "data-testid": a,
7
- className: r(e.row, t),
8
- children: i
9
- }) : /* @__PURE__ */ o("fieldset", {
10
- "data-testid": a,
11
- className: r(e.fieldset, t),
12
- children: [/* @__PURE__ */ l("legend", {
13
- className: r(e.legend, s()),
14
- children: d
15
- }), /* @__PURE__ */ l("div", {
16
- className: e.row,
3
+ import l from "./StyledFieldPair.module.js";
4
+ import { jsx as r, jsxs as t } from "react/jsx-runtime";
5
+ var n = ({ children: a, legend: i, className: d, dataTest: m }) => i == null ? /* @__PURE__ */ r("div", {
6
+ "data-testid": m,
7
+ className: e(l.row, "max-xs:[&>*]:max-w-full", d),
8
+ children: a
9
+ }) : /* @__PURE__ */ t("fieldset", {
10
+ "data-testid": m,
11
+ className: e(l.fieldset, d),
12
+ children: [/* @__PURE__ */ r("legend", {
13
+ className: e(l.legend, s()),
17
14
  children: i
15
+ }), /* @__PURE__ */ r("div", {
16
+ className: e(l.row, "max-xs:[&>*]:max-w-full"),
17
+ children: a
18
18
  })]
19
19
  });
20
20
  export {
21
- p as StyledFieldPair
21
+ n as StyledFieldPair
22
22
  };
@@ -2,145 +2,145 @@ import { fieldLabelAboveClass as R, fieldWidthStyle as le } from "../../../../co
2
2
  import { StyledInputField as oe } from "../../../../components/inputs/input-field/StyledInputField.js";
3
3
  import { getValue as b } from "../helpers.js";
4
4
  import { DatePickerButton as ie } from "./DatePickerButton.js";
5
- import { getTitleLabelling as de } from "../../../helpers/getTitleLabelling.js";
6
- import { DATE_INPUT_FONT_FAMILY as se } from "../../../../helpers/inputMask.js";
5
+ import { getTitleLabelling as se } from "../../../helpers/getTitleLabelling.js";
6
+ import { DATE_INPUT_FONT_FAMILY as de } from "../../../../helpers/inputMask.js";
7
7
  import { useDatePickerMask as ne } from "../hooks/useDatePickerMask.js";
8
- import { defaultDatePickerValidationMessages as ce, useDatePickerValidation as ue } from "../hooks/useDatePickerValidation.js";
8
+ import { defaultDatePickerValidationMessages as ce, useDatePickerValidation as me } from "../hooks/useDatePickerValidation.js";
9
9
  import { useEffect as A, useId as E, useRef as pe, useState as H } from "react";
10
- import { jsx as a, jsxs as T } from "react/jsx-runtime";
11
- import { isValid as me, parse as fe } from "date-fns";
12
- var ke = (Y) => {
13
- const { onClick: L, inputClassName: S, dateFormat: r, selected: e, error: _, helperText: j, errorText: q, onInputChange: C, hideCalendar: W, locale: l, disabledDays: s, label: h, title: v, inputAriaProps: z, readOnly: U, lockedReason: y, readOnlyReason: g, disallowPast: n, disallowFuture: c, validateOnCalendarClose: N, onValidatedOnce: P, hideDefaultHelperText: G, reserveHelperText: J, required: o, minDate: u, width: k = "s", ...p } = Y, i = !!U || !!y || !!g, M = !y && !!g, { validationError: K, handleValidation: m, errHelperText: Q, clearValidation: w } = ue(ce), { maskRef: X } = ne(), I = E(), V = E(), [t, B] = H(e ? b(e, r) : ""), D = pe(!1), [F, Z] = H({
10
+ import { jsx as r, jsxs as T } from "react/jsx-runtime";
11
+ import { isValid as ue, parse as fe } from "date-fns";
12
+ var Pe = (Y) => {
13
+ const { onClick: L, inputClassName: S, dateFormat: l, selected: e, error: _, helperText: j, errorText: q, onInputChange: C, hideCalendar: W, locale: o, disabledDays: d, label: h, title: x, inputAriaProps: z, readOnly: U, lockedReason: v, readOnlyReason: y, disallowPast: n, disallowFuture: c, validateOnCalendarClose: N, onValidatedOnce: w, hideDefaultHelperText: G, reserveHelperText: J, required: i, minDate: m, width: P = "s", ...p } = Y, a = !!U || !!v || !!y, k = !v && !!y, { validationError: K, handleValidation: u, errHelperText: Q, clearValidation: M } = me(ce), { maskRef: X } = ne(), I = E(), V = E(), [t, B] = H(e ? b(e, l) : ""), g = pe(!1), [F, Z] = H({
14
14
  selected: e,
15
- dateFormat: r
15
+ dateFormat: l
16
16
  });
17
- (e !== F.selected || r !== F.dateFormat) && (Z({
17
+ (e !== F.selected || l !== F.dateFormat) && (Z({
18
18
  selected: e,
19
- dateFormat: r
20
- }), B(e ? b(e, r) : ""));
21
- const $ = l?.code?.startsWith("nb") ? "DD/MM/ÅÅÅÅ" : "DD/MM/YYYY", ee = G ? void 0 : $, O = !!(K || _), d = O ? q ?? Q : j ?? ee;
19
+ dateFormat: l
20
+ }), B(e ? b(e, l) : ""));
21
+ const $ = o?.code?.startsWith("nb") ? "DD/MM/ÅÅÅÅ" : "DD/MM/YYYY", ee = G ? void 0 : $, O = !!(K || _), s = O ? q ?? Q : j ?? ee;
22
22
  A(() => {
23
23
  if (!e) {
24
- D.current || w(), D.current = !1;
24
+ g.current || M(), g.current = !1;
25
25
  return;
26
26
  }
27
- m({
28
- value: b(e, r),
29
- disabledDays: s,
30
- localeCode: l?.code,
27
+ u({
28
+ value: b(e, l),
29
+ disabledDays: d,
30
+ localeCode: o?.code,
31
31
  disallowPast: n,
32
32
  disallowFuture: c,
33
- required: o,
34
- minDate: u
33
+ required: i,
34
+ minDate: m
35
35
  });
36
36
  }, [
37
37
  e,
38
- r,
39
- s,
40
- l?.code,
38
+ l,
39
+ d,
40
+ o?.code,
41
41
  n,
42
42
  c,
43
- o,
44
- u,
43
+ i,
45
44
  m,
46
- w
45
+ u,
46
+ M
47
47
  ]);
48
- const te = /\d/.test(t), ae = (x) => {
49
- const f = x.target.value;
48
+ const ae = /\d/.test(t), te = (D) => {
49
+ const f = D.target.value;
50
50
  B(f.replace(/\D/g, "").length ? f : "");
51
51
  };
52
52
  A(() => {
53
- N && (m({
53
+ N && (u({
54
54
  value: t,
55
- disabledDays: s,
56
- localeCode: l?.code,
55
+ disabledDays: d,
56
+ localeCode: o?.code,
57
57
  disallowPast: n,
58
58
  disallowFuture: c,
59
- required: o,
60
- minDate: u
61
- }), P?.());
59
+ required: i,
60
+ minDate: m
61
+ }), w?.());
62
62
  }, [
63
63
  N,
64
64
  t,
65
- s,
66
- l?.code,
65
+ d,
66
+ o?.code,
67
67
  n,
68
68
  c,
69
- o,
70
- u,
71
- P,
72
- m
69
+ i,
70
+ m,
71
+ w,
72
+ u
73
73
  ]);
74
74
  const re = () => {
75
- const x = m({
75
+ const D = u({
76
76
  value: t,
77
- disabledDays: s,
78
- localeCode: l?.code,
77
+ disabledDays: d,
78
+ localeCode: o?.code,
79
79
  disallowPast: n,
80
80
  disallowFuture: c,
81
- required: o,
82
- minDate: u
81
+ required: i,
82
+ minDate: m
83
83
  });
84
84
  if (!t.replace(/\D/g, "").length) {
85
- D.current = !!e, C?.(void 0);
85
+ g.current = !!e, C?.(void 0);
86
86
  return;
87
87
  }
88
- if (x) return;
88
+ if (D) return;
89
89
  const f = fe(t, "dd/MM/yyyy", /* @__PURE__ */ new Date());
90
- C?.(me(f) ? f : void 0);
90
+ C?.(ue(f) ? f : void 0);
91
91
  };
92
92
  return /* @__PURE__ */ T("div", {
93
93
  className: "cursor-default",
94
- "data-field-width": k,
95
- style: le(k),
94
+ "data-field-width": P,
95
+ style: le(P),
96
96
  "data-helper-room-box": "",
97
97
  children: [
98
- v && /* @__PURE__ */ a("div", {
98
+ x && /* @__PURE__ */ r("div", {
99
99
  id: I,
100
100
  className: R({
101
101
  disabled: p.disabled,
102
- flush: M
102
+ flush: k
103
103
  }),
104
- children: v
104
+ children: x
105
105
  }),
106
- h && /* @__PURE__ */ a("div", {
106
+ h && /* @__PURE__ */ r("div", {
107
107
  className: R({
108
108
  disabled: p.disabled,
109
- flush: M
109
+ flush: k
110
110
  }),
111
111
  children: /* @__PURE__ */ T("label", {
112
112
  htmlFor: V,
113
- children: [h, o && /* @__PURE__ */ a("span", {
113
+ children: [h, i && /* @__PURE__ */ r("span", {
114
114
  "aria-hidden": "true",
115
115
  children: " *"
116
116
  })]
117
117
  })
118
118
  }),
119
119
  /* @__PURE__ */ T("div", {
120
- className: "flex items-start gap-1",
121
- children: [/* @__PURE__ */ a("div", {
122
- className: "min-w-0 flex-1",
123
- children: /* @__PURE__ */ a("div", {
120
+ className: "flex items-start gap-1 max-xs:flex-wrap max-xs:gap-y-1",
121
+ children: [/* @__PURE__ */ r("div", {
122
+ className: "min-w-0 flex-1 max-xs:min-w-min",
123
+ children: /* @__PURE__ */ r("div", {
124
124
  className: "relative",
125
- children: /* @__PURE__ */ a(oe, {
125
+ children: /* @__PURE__ */ r(oe, {
126
126
  ...p,
127
127
  id: V,
128
- readOnly: i,
129
- lockedReason: y,
130
- readOnlyReason: g,
128
+ readOnly: a,
129
+ lockedReason: v,
130
+ readOnlyReason: y,
131
131
  "data-testid": p.dataTest,
132
132
  autoComplete: "off",
133
- inputRef: i ? void 0 : X,
134
- placeholder: !i && !te ? " / / " : void 0,
133
+ inputRef: a ? void 0 : X,
134
+ placeholder: !a && !ae ? " / / " : void 0,
135
135
  size: "small",
136
- value: i ? t.replaceAll("/", ".") : t,
136
+ value: a ? t.replaceAll("/", ".") : t,
137
137
  className: S,
138
138
  error: O,
139
- onBlur: i ? void 0 : re,
140
- helperText: d == null || d === "" ? d : /* @__PURE__ */ a("span", {
139
+ onBlur: a ? void 0 : re,
140
+ helperText: s == null || s === "" ? s : /* @__PURE__ */ r("span", {
141
141
  className: "block truncate",
142
- title: typeof d == "string" ? d : void 0,
143
- children: d
142
+ title: typeof s == "string" ? s : void 0,
143
+ children: s
144
144
  }),
145
145
  reserveHelperText: J,
146
146
  slotProps: {
@@ -150,31 +150,32 @@ var ke = (Y) => {
150
150
  marginRight: 0
151
151
  } },
152
152
  htmlInput: {
153
- "aria-required": o ? !0 : void 0,
154
- ...de({
155
- title: v,
153
+ "aria-required": i ? !0 : void 0,
154
+ ...se({
155
+ title: x,
156
156
  titleId: I,
157
157
  label: h,
158
158
  inputAriaProps: z
159
159
  }),
160
- ...i ? {} : {
160
+ ...a ? {} : {
161
161
  inputMode: "numeric",
162
- style: { fontFamily: se }
162
+ style: { fontFamily: de }
163
163
  }
164
- }
164
+ },
165
+ input: a ? void 0 : { className: "max-xs:min-w-[calc(10ch+1rem)] max-xs:px-2" }
165
166
  },
166
- onChange: ae
167
+ onChange: te
167
168
  })
168
169
  })
169
- }), !W && !i && /* @__PURE__ */ a(ie, {
170
+ }), !W && !a && /* @__PURE__ */ r(ie, {
170
171
  onClick: L,
171
172
  disabled: !!p.disabled,
172
- localeCode: l?.code
173
+ localeCode: o?.code
173
174
  })]
174
175
  })
175
176
  ]
176
177
  });
177
178
  };
178
179
  export {
179
- ke as BaseDatePickerInput
180
+ Pe as BaseDatePickerInput
180
181
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./StyledButton.module.js";
2
- import u from "clsx";
2
+ import f from "clsx";
3
3
  import "react";
4
- import { jsx as f, jsxs as g } from "react/jsx-runtime";
4
+ import { jsx as g, jsxs as y } from "react/jsx-runtime";
5
5
  var r = {
6
6
  contained: t.contained,
7
7
  outlined: t.outlined,
@@ -13,16 +13,17 @@ var r = {
13
13
  medium: t.medium,
14
14
  error: t.error,
15
15
  common: t.common
16
- }, j = ({ variant: m = "contained", className: n = "", size: e = "medium", children: a, refLink: i, startIcon: l, endIcon: d, dataTest: p, error: s, ...x }) => {
17
- const o = e === "large" || e === "medium", c = s ? "error" : "common";
18
- return /* @__PURE__ */ g("button", {
19
- ...x,
20
- className: u(t["asma-core-ui-button"], r[m], r[c], r[e], n),
16
+ }, j = ({ variant: a = "contained", className: m = "", size: e = "medium", children: n, refLink: i, startIcon: l, endIcon: d, dataTest: p, error: s, type: x = "button", ...c }) => {
17
+ const o = e === "large" || e === "medium", u = s ? "error" : "common";
18
+ return /* @__PURE__ */ y("button", {
19
+ ...c,
20
+ type: x,
21
+ className: f(t["asma-core-ui-button"], r[a], r[u], r[e], m),
21
22
  ref: i,
22
23
  "data-test": p,
23
24
  children: [
24
25
  l,
25
- a && /* @__PURE__ */ f("div", {
26
+ n && /* @__PURE__ */ g("div", {
26
27
  style: {
27
28
  overflow: "hidden",
28
29
  textOverflow: "ellipsis",
@@ -34,7 +35,7 @@ var r = {
34
35
  paddingLeft: o ? "8px" : "4px",
35
36
  paddingRight: o ? "8px" : "4px"
36
37
  },
37
- children: a
38
+ children: n
38
39
  }),
39
40
  d
40
41
  ]
@@ -64,6 +64,8 @@ export type StyledButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
64
64
  * native button pseudo-states + the `disabled` attribute, not a prop.
65
65
  * @remarks for icon button add only startIcon prop
66
66
  * @remarks for error button no textGray variant
67
+ * @remarks `type` defaults to `'button'`, not the native `'submit'`. Pass `type='submit'`
68
+ * explicitly for the button that submits a form.
67
69
  *
68
70
  * Custom props:
69
71
  * @param variant - 'contained' | 'outlined' | 'text' | 'textGray'
@@ -74,5 +76,5 @@ export type StyledButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
74
76
  * @param refLink - ref to component
75
77
  * @param dataTest - data-test tag
76
78
  */
77
- export declare const StyledButton: ({ variant, className, size, children, refLink, startIcon, endIcon, dataTest, error, style: styleProp, disabled, disabledReason, loading, holdsDialog, loadingAnnouncement, locale, onClick, ...otherProps }: StyledButtonProps) => JSX.Element;
79
+ export declare const StyledButton: ({ variant, className, size, children, refLink, startIcon, endIcon, dataTest, error, style: styleProp, disabled, disabledReason, loading, holdsDialog, loadingAnnouncement, locale, onClick, type, ...otherProps }: StyledButtonProps) => JSX.Element;
78
80
  export {};
@@ -36,5 +36,5 @@ export type StyledButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
36
36
  * @param refLink - ref to component
37
37
  * @param dataTest - data-test tag
38
38
  */
39
- export declare const StyledButton: ({ variant, className, size, children, refLink, startIcon, endIcon, dataTest, error, ...otherProps }: StyledButtonProps) => JSX.Element;
39
+ export declare const StyledButton: ({ variant, className, size, children, refLink, startIcon, endIcon, dataTest, error, type, ...otherProps }: StyledButtonProps) => JSX.Element;
40
40
  export {};
@@ -36,5 +36,5 @@ export type StyledButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
36
36
  * @param refLink - ref to component
37
37
  * @param dataTest - data-test tag
38
38
  */
39
- export declare const StyledButton: ({ variant, className, size, children, refLink, startIcon, endIcon, dataTest, error, ...otherProps }: StyledButtonProps) => JSX.Element;
39
+ export declare const StyledButton: ({ variant, className, size, children, refLink, startIcon, endIcon, dataTest, error, type, ...otherProps }: StyledButtonProps) => JSX.Element;
40
40
  export {};
@@ -1,7 +1,7 @@
1
1
  import t from "./StyledButton.module.js";
2
- import u from "clsx";
2
+ import f from "clsx";
3
3
  import "react";
4
- import { jsx as f, jsxs as g } from "react/jsx-runtime";
4
+ import { jsx as g, jsxs as y } from "react/jsx-runtime";
5
5
  var r = {
6
6
  contained: t.contained,
7
7
  outlined: t.outlined,
@@ -13,16 +13,17 @@ var r = {
13
13
  medium: t.medium,
14
14
  error: t.error,
15
15
  common: t.common
16
- }, j = ({ variant: m = "contained", className: n = "", size: e = "medium", children: a, refLink: i, startIcon: l, endIcon: d, dataTest: p, error: s, ...x }) => {
17
- const o = e === "large" || e === "medium", c = s ? "error" : "common";
18
- return /* @__PURE__ */ g("button", {
19
- ...x,
20
- className: u(t["asma-core-ui-button"], r[m], r[c], r[e], n),
16
+ }, j = ({ variant: a = "contained", className: m = "", size: e = "medium", children: n, refLink: i, startIcon: l, endIcon: d, dataTest: p, error: s, type: x = "button", ...c }) => {
17
+ const o = e === "large" || e === "medium", u = s ? "error" : "common";
18
+ return /* @__PURE__ */ y("button", {
19
+ ...c,
20
+ type: x,
21
+ className: f(t["asma-core-ui-button"], r[a], r[u], r[e], m),
21
22
  ref: i,
22
23
  "data-test": p,
23
24
  children: [
24
25
  l,
25
- a && /* @__PURE__ */ f("div", {
26
+ n && /* @__PURE__ */ g("div", {
26
27
  style: {
27
28
  overflow: "hidden",
28
29
  textOverflow: "ellipsis",
@@ -34,7 +35,7 @@ var r = {
34
35
  paddingLeft: o ? "8px" : "4px",
35
36
  paddingRight: o ? "8px" : "4px"
36
37
  },
37
- children: a
38
+ children: n
38
39
  }),
39
40
  d
40
41
  ]
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.126.1",
6
+ "version": "3.126.3",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",