@pismo/marola 0.0.1-alpha.19 → 0.0.1-alpha.20

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 (60) hide show
  1. package/dist/Dialog.module-DFEmFdYT.js +30 -0
  2. package/dist/SelectButton-C8JQKaf4.js +61 -0
  3. package/dist/assets/Advice.css +1 -1
  4. package/dist/assets/Button.css +1 -1
  5. package/dist/assets/Checkbox.css +1 -1
  6. package/dist/assets/Chip.css +1 -1
  7. package/dist/assets/Dialog.css +1 -1
  8. package/dist/assets/IconButton.css +1 -1
  9. package/dist/assets/Input.css +1 -1
  10. package/dist/assets/PageHeader.css +1 -1
  11. package/dist/assets/Pagination.css +1 -1
  12. package/dist/assets/SelectButton.css +1 -1
  13. package/dist/assets/Snackbar.css +1 -1
  14. package/dist/assets/SortTooltip.css +1 -1
  15. package/dist/assets/Stepper.css +1 -1
  16. package/dist/assets/Table.css +1 -1
  17. package/dist/assets/Toggle.css +1 -1
  18. package/dist/assets/Typography.css +1 -1
  19. package/dist/components/Advice/Advice.js +32 -17
  20. package/dist/components/Button/Button.js +56 -85
  21. package/dist/components/Checkbox/Checkbox.js +57 -42
  22. package/dist/components/Chip/Chip.js +81 -111
  23. package/dist/components/Dialog/Actions.js +1 -1
  24. package/dist/components/Dialog/Backdrop.js +1 -1
  25. package/dist/components/Dialog/CloseIconButton.js +1 -1
  26. package/dist/components/Dialog/Dialog.d.ts +1 -1
  27. package/dist/components/Dialog/Dialog.js +2 -2
  28. package/dist/components/Dialog/{Title.d.ts → DialogTitle.d.ts} +3 -3
  29. package/dist/components/Dialog/DialogTitle.js +29 -0
  30. package/dist/components/Icon/Icon.d.ts +1 -1
  31. package/dist/components/Icon/Icon.js +31 -25
  32. package/dist/components/IconButton/IconButton.js +34 -64
  33. package/dist/components/Input/Input.js +241 -229
  34. package/dist/components/PageHeader/PageHeader.js +52 -37
  35. package/dist/components/Pagination/Pagination.js +127 -113
  36. package/dist/components/Select/Select.js +2 -2
  37. package/dist/components/Select/SelectButton.js +1 -1
  38. package/dist/components/Snackbar/Snackbar.js +176 -161
  39. package/dist/components/SortTooltip/SortTooltip.js +53 -38
  40. package/dist/components/Stepper/Stepper.js +37 -22
  41. package/dist/components/Table/Table.d.ts +33 -16
  42. package/dist/components/Table/Table.js +98 -81
  43. package/dist/components/Table/Table.stories.d.ts +29 -0
  44. package/dist/components/Table/_Table.TBody.stories.d.ts +14 -0
  45. package/dist/components/Table/_Table.THead.stories.d.ts +14 -0
  46. package/dist/components/Table/_Table.Td.stories.d.ts +16 -0
  47. package/dist/components/Table/_Table.Th.stories.d.ts +15 -0
  48. package/dist/components/Table/_Table.Tr.stories.d.ts +15 -0
  49. package/dist/components/TextDisplay/TextDisplay.js +13 -13
  50. package/dist/components/Toggle/Toggle.js +138 -123
  51. package/dist/components/Typography/Typography.d.ts +1 -1
  52. package/dist/components/Typography/Typography.js +54 -84
  53. package/dist/main.js +42 -37
  54. package/dist/marola.css +1 -1
  55. package/dist/utils/styleStrings.d.ts +1 -1
  56. package/dist/utils/styleStrings.js +7 -7
  57. package/package.json +1 -1
  58. package/dist/Dialog.module-B8COssqi.js +0 -15
  59. package/dist/SelectButton-pciwIWcj.js +0 -46
  60. package/dist/components/Dialog/Title.js +0 -29
@@ -1,37 +1,37 @@
1
1
  import '../../assets/TextDisplay.css';
2
2
  import { jsxs as h, jsx as c } from "react/jsx-runtime";
3
- import { Skeleton as o } from "../Skeleton/Skeleton.js";
4
- import { Typography as y } from "../Typography/Typography.js";
3
+ import { Skeleton as d } from "../Skeleton/Skeleton.js";
4
+ import { Typography as o } from "../Typography/Typography.js";
5
5
  const x = "_container_13z5o_1", f = {
6
6
  container: x
7
- }, g = ({
8
- label: e,
9
- value: m,
10
- isLoading: d = !1,
7
+ }, $ = ({
8
+ label: m,
9
+ value: y,
10
+ isLoading: e = !1,
11
11
  testId: t = "TextDisplay",
12
12
  labelOptions: r,
13
13
  valueOptions: a
14
14
  }) => /* @__PURE__ */ h("div", { className: f.container, children: [
15
15
  /* @__PURE__ */ c(
16
- y,
16
+ o,
17
17
  {
18
18
  color: (r == null ? void 0 : r.color) || "var(--gray-90)",
19
- variant: (r == null ? void 0 : r.variant) || "body-small",
19
+ variant: (r == null ? void 0 : r.variant) || "base",
20
20
  "data-testid": `${t}-label`,
21
- children: d ? /* @__PURE__ */ c(o, { style: { width: 70, marginBottom: 2 }, "data-testid": `${t}-skeletonLabel` }) : e
21
+ children: e ? /* @__PURE__ */ c(d, { style: { width: 70, marginBottom: 2 }, "data-testid": `${t}-skeletonLabel` }) : m
22
22
  }
23
23
  ),
24
24
  /* @__PURE__ */ c(
25
- y,
25
+ o,
26
26
  {
27
27
  bold: !0,
28
28
  color: (a == null ? void 0 : a.color) || "var(--gray-90)",
29
- variant: (a == null ? void 0 : a.variant) || "body",
29
+ variant: (a == null ? void 0 : a.variant) || "base-lg",
30
30
  "data-testid": `${t}-value`,
31
- children: d ? /* @__PURE__ */ c(o, { style: { width: 100 }, "data-testid": `${t}-skeletonValue` }) : m || "-"
31
+ children: e ? /* @__PURE__ */ c(d, { style: { width: 100 }, "data-testid": `${t}-skeletonValue` }) : y || "-"
32
32
  }
33
33
  )
34
34
  ] });
35
35
  export {
36
- g as TextDisplay
36
+ $ as TextDisplay
37
37
  };
@@ -1,133 +1,133 @@
1
1
  import '../../assets/Toggle.css';
2
- import { jsxs as I, jsx as P } from "react/jsx-runtime";
3
- import { c as C } from "../../clsx-DB4S2d7J.js";
4
- import { u as v, b as x, g as U, a as q, _ as H, c as F, P as e, d as M, e as A } from "../../index-CH45lKw7.js";
5
- import * as N from "react";
6
- import { u as D } from "../../useControlled-CCMYYdCM.js";
7
- import { u as L } from "../../useIsFocusVisible-BH4IAdcw.js";
8
- function W(l) {
2
+ import { jsxs as j, jsx as P } from "react/jsx-runtime";
3
+ import { c as O } from "../../clsx-DB4S2d7J.js";
4
+ import { u as E, b as k, g as v, a as U, _ as q, c as C, P as e, d as H, e as M } from "../../index-CH45lKw7.js";
5
+ import * as F from "react";
6
+ import { u as A } from "../../useControlled-CCMYYdCM.js";
7
+ import { u as D } from "../../useIsFocusVisible-BH4IAdcw.js";
8
+ function L(l) {
9
9
  const {
10
10
  checked: s,
11
- defaultChecked: p,
12
- disabled: c,
13
- onBlur: a,
14
- onChange: g,
15
- onFocus: r,
11
+ defaultChecked: i,
12
+ disabled: r,
13
+ onBlur: c,
14
+ onChange: h,
15
+ onFocus: n,
16
16
  onFocusVisible: u,
17
- readOnly: n,
18
- required: i
19
- } = l, [V, S] = D({
17
+ readOnly: a,
18
+ required: p
19
+ } = l, [N, V] = A({
20
20
  controlled: s,
21
- default: !!p,
21
+ default: !!i,
22
22
  name: "Switch",
23
23
  state: "checked"
24
- }), B = (t) => (o) => {
25
- var b;
26
- o.nativeEvent.defaultPrevented || (S(o.target.checked), g == null || g(o), (b = t.onChange) == null || b.call(t, o));
24
+ }), S = (t) => (o) => {
25
+ var d;
26
+ o.nativeEvent.defaultPrevented || (V(o.target.checked), h == null || h(o), (d = t.onChange) == null || d.call(t, o));
27
27
  }, {
28
- isFocusVisibleRef: _,
29
- onBlur: w,
30
- onFocus: f,
31
- ref: m
32
- } = L(), [h, y] = N.useState(!1);
33
- c && h && y(!1), N.useEffect(() => {
34
- _.current = h;
35
- }, [h, _]);
36
- const k = N.useRef(null), R = (t) => (o) => {
37
- var b;
38
- k.current || (k.current = o.currentTarget), f(o), _.current === !0 && (y(!0), u == null || u(o)), r == null || r(o), (b = t.onFocus) == null || b.call(t, o);
28
+ isFocusVisibleRef: b,
29
+ onBlur: B,
30
+ onFocus: _,
31
+ ref: f
32
+ } = D(), [y, z] = F.useState(!1);
33
+ r && y && z(!1), F.useEffect(() => {
34
+ b.current = y;
35
+ }, [y, b]);
36
+ const m = F.useRef(null), w = (t) => (o) => {
37
+ var d;
38
+ m.current || (m.current = o.currentTarget), _(o), b.current === !0 && (z(!0), u == null || u(o)), n == null || n(o), (d = t.onFocus) == null || d.call(t, o);
39
39
  }, T = (t) => (o) => {
40
- var b;
41
- w(o), _.current === !1 && y(!1), a == null || a(o), (b = t.onBlur) == null || b.call(t, o);
42
- }, O = v(m, k);
40
+ var d;
41
+ B(o), b.current === !1 && z(!1), c == null || c(o), (d = t.onBlur) == null || d.call(t, o);
42
+ }, x = E(f, m);
43
43
  return {
44
- checked: V,
45
- disabled: !!c,
46
- focusVisible: h,
47
- getInputProps: (t = {}) => x({
44
+ checked: N,
45
+ disabled: !!r,
46
+ focusVisible: y,
47
+ getInputProps: (t = {}) => k({
48
48
  checked: s,
49
- defaultChecked: p,
50
- disabled: c,
51
- readOnly: n,
52
- ref: O,
53
- required: i,
49
+ defaultChecked: i,
50
+ disabled: r,
51
+ readOnly: a,
52
+ ref: x,
53
+ required: p,
54
54
  type: "checkbox",
55
55
  role: "switch",
56
56
  "aria-checked": s
57
57
  }, t, {
58
- onChange: B(t),
59
- onFocus: R(t),
58
+ onChange: S(t),
59
+ onFocus: w(t),
60
60
  onBlur: T(t)
61
61
  }),
62
- inputRef: O,
63
- readOnly: !!n
62
+ inputRef: x,
63
+ readOnly: !!a
64
64
  };
65
65
  }
66
- const $ = "Switch";
67
- function z(l) {
68
- return U($, l);
66
+ const I = "Switch";
67
+ function W(l) {
68
+ return v(I, l);
69
69
  }
70
- q($, ["root", "input", "track", "thumb", "checked", "disabled", "focusVisible", "readOnly"]);
70
+ U(I, ["root", "input", "track", "thumb", "checked", "disabled", "focusVisible", "readOnly"]);
71
71
  const G = ["checked", "defaultChecked", "disabled", "onBlur", "onChange", "onFocus", "onFocusVisible", "readOnly", "required", "slotProps", "slots"], J = (l) => {
72
72
  const {
73
73
  checked: s,
74
- disabled: p,
75
- focusVisible: c,
76
- readOnly: a
74
+ disabled: i,
75
+ focusVisible: r,
76
+ readOnly: c
77
77
  } = l;
78
- return M({
79
- root: ["root", s && "checked", p && "disabled", c && "focusVisible", a && "readOnly"],
78
+ return H({
79
+ root: ["root", s && "checked", i && "disabled", r && "focusVisible", c && "readOnly"],
80
80
  thumb: ["thumb"],
81
81
  input: ["input"],
82
82
  track: ["track"]
83
- }, A(z));
84
- }, E = /* @__PURE__ */ N.forwardRef(function(s, p) {
85
- var c, a, g, r;
83
+ }, M(W));
84
+ }, $ = /* @__PURE__ */ F.forwardRef(function(s, i) {
85
+ var r, c, h, n;
86
86
  const {
87
87
  slotProps: u = {},
88
- slots: n = {}
89
- } = s, i = H(s, G), {
90
- getInputProps: V,
91
- checked: S,
92
- disabled: B,
93
- focusVisible: _,
94
- readOnly: w
95
- } = W(s), f = x({}, s, {
96
- checked: S,
97
- disabled: B,
98
- focusVisible: _,
99
- readOnly: w
100
- }), m = J(f), h = (c = n.root) != null ? c : "span", y = F({
101
- elementType: h,
88
+ slots: a = {}
89
+ } = s, p = q(s, G), {
90
+ getInputProps: N,
91
+ checked: V,
92
+ disabled: S,
93
+ focusVisible: b,
94
+ readOnly: B
95
+ } = L(s), _ = k({}, s, {
96
+ checked: V,
97
+ disabled: S,
98
+ focusVisible: b,
99
+ readOnly: B
100
+ }), f = J(_), y = (r = a.root) != null ? r : "span", z = C({
101
+ elementType: y,
102
102
  externalSlotProps: u.root,
103
- externalForwardedProps: i,
103
+ externalForwardedProps: p,
104
104
  additionalProps: {
105
- ref: p
105
+ ref: i
106
106
  },
107
- ownerState: f,
108
- className: m.root
109
- }), k = (a = n.thumb) != null ? a : "span", R = F({
110
- elementType: k,
107
+ ownerState: _,
108
+ className: f.root
109
+ }), m = (c = a.thumb) != null ? c : "span", w = C({
110
+ elementType: m,
111
111
  externalSlotProps: u.thumb,
112
- ownerState: f,
113
- className: m.thumb
114
- }), T = (g = n.input) != null ? g : "input", O = F({
112
+ ownerState: _,
113
+ className: f.thumb
114
+ }), T = (h = a.input) != null ? h : "input", x = C({
115
115
  elementType: T,
116
- getSlotProps: V,
116
+ getSlotProps: N,
117
117
  externalSlotProps: u.input,
118
- ownerState: f,
119
- className: m.input
120
- }), j = n.track === null ? () => null : (r = n.track) != null ? r : "span", t = F({
121
- elementType: j,
118
+ ownerState: _,
119
+ className: f.input
120
+ }), R = a.track === null ? () => null : (n = a.track) != null ? n : "span", t = C({
121
+ elementType: R,
122
122
  externalSlotProps: u.track,
123
- ownerState: f,
124
- className: m.track
123
+ ownerState: _,
124
+ className: f.track
125
125
  });
126
- return /* @__PURE__ */ I(h, x({}, y, {
127
- children: [/* @__PURE__ */ P(j, x({}, t)), /* @__PURE__ */ P(k, x({}, R)), /* @__PURE__ */ P(T, x({}, O))]
126
+ return /* @__PURE__ */ j(y, k({}, z, {
127
+ children: [/* @__PURE__ */ P(R, k({}, t)), /* @__PURE__ */ P(m, k({}, w)), /* @__PURE__ */ P(T, k({}, x))]
128
128
  }));
129
129
  });
130
- process.env.NODE_ENV !== "production" && (E.propTypes = {
130
+ process.env.NODE_ENV !== "production" && ($.propTypes = {
131
131
  // ┌────────────────────────────── Warning ──────────────────────────────┐
132
132
  // │ These PropTypes are generated from the TypeScript type definitions. │
133
133
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -198,54 +198,69 @@ process.env.NODE_ENV !== "production" && (E.propTypes = {
198
198
  track: e.oneOfType([e.elementType, e.oneOf([null])])
199
199
  })
200
200
  });
201
- const K = "_toggle_1icxx_1", Q = "_input_1icxx_12", X = "_thumb_1icxx_23", Y = "_track_1icxx_37", Z = "_toggle__label_1icxx_61", d = {
202
- toggle: K,
203
- "toggle__toggle-el-wrapper": "_toggle__toggle-el-wrapper_1icxx_8",
204
- input: Q,
205
- thumb: X,
206
- track: Y,
207
- "toggle--focus-visible": "_toggle--focus-visible_1icxx_47",
208
- "toggle--checked": "_toggle--checked_1icxx_51",
209
- toggle__label: Z,
210
- "toggle--disabled": "_toggle--disabled_1icxx_66"
211
- }, ce = ({
201
+ const K = "_toggle__label_1rzg2_43", Q = "_toggle_1rzg2_43", X = "_input_1rzg2_88", Y = "_thumb_1rzg2_99", Z = "_track_1rzg2_113", g = {
202
+ "u-typography-h1": "_u-typography-h1_1rzg2_1",
203
+ "u-typography-h2": "_u-typography-h2_1rzg2_8",
204
+ "u-typography-h3": "_u-typography-h3_1rzg2_15",
205
+ "u-typography-h4": "_u-typography-h4_1rzg2_22",
206
+ "u-typography-h5": "_u-typography-h5_1rzg2_29",
207
+ "u-typography-h6": "_u-typography-h6_1rzg2_36",
208
+ "u-typography-base": "_u-typography-base_1rzg2_43",
209
+ toggle__label: K,
210
+ "u-typography-base--xxl": "_u-typography-base--xxl_1rzg2_48",
211
+ "u-typography-base--xl": "_u-typography-base--xl_1rzg2_52",
212
+ "u-typography-base--lg": "_u-typography-base--lg_1rzg2_56",
213
+ "u-typography-base--sm": "_u-typography-base--sm_1rzg2_60",
214
+ "u-typography-base--bold": "_u-typography-base--bold_1rzg2_64",
215
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1rzg2_67",
216
+ "u-typography-base--underlined": "_u-typography-base--underlined_1rzg2_70",
217
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1rzg2_73",
218
+ toggle: Q,
219
+ "toggle__toggle-el-wrapper": "_toggle__toggle-el-wrapper_1rzg2_84",
220
+ input: X,
221
+ thumb: Y,
222
+ track: Z,
223
+ "toggle--focus-visible": "_toggle--focus-visible_1rzg2_123",
224
+ "toggle--checked": "_toggle--checked_1rzg2_127",
225
+ "toggle--disabled": "_toggle--disabled_1rzg2_140"
226
+ }, re = ({
212
227
  label: l,
213
228
  checked: s,
214
- disabled: p,
215
- classNameWrapper: c,
216
- classNameInput: a,
217
- "data-testid": g,
218
- onChange: r,
229
+ disabled: i,
230
+ classNameWrapper: r,
231
+ classNameInput: c,
232
+ "data-testid": h,
233
+ onChange: n,
219
234
  classNameLabel: u
220
235
  }) => {
221
- const n = (i) => {
222
- r == null || r(i);
236
+ const a = (p) => {
237
+ n == null || n(p);
223
238
  };
224
- return /* @__PURE__ */ I("div", { className: C(d.toggle, c), "data-testid": g, children: [
239
+ return /* @__PURE__ */ j("div", { className: O(g.toggle, r), "data-testid": h, children: [
225
240
  /* @__PURE__ */ P(
226
- E,
241
+ $,
227
242
  {
228
243
  checked: s === !0,
229
- disabled: p,
230
- onChange: n,
244
+ disabled: i,
245
+ onChange: a,
231
246
  "aria-label": l,
232
247
  slotProps: {
233
- root: (i) => ({
234
- className: C(d["toggle__toggle-el-wrapper"], {
235
- [d["toggle--disabled"]]: i.disabled,
236
- [d["toggle--focus-visible"]]: i.focusVisible,
237
- [d["toggle--checked"]]: i.checked
248
+ root: (p) => ({
249
+ className: O(g["toggle__toggle-el-wrapper"], {
250
+ [g["toggle--disabled"]]: p.disabled,
251
+ [g["toggle--focus-visible"]]: p.focusVisible,
252
+ [g["toggle--checked"]]: p.checked
238
253
  })
239
254
  }),
240
- input: { className: C(d.input, a) },
241
- thumb: { className: d.thumb },
242
- track: { className: d.track }
255
+ input: { className: O(g.input, c) },
256
+ thumb: { className: g.thumb },
257
+ track: { className: g.track }
243
258
  }
244
259
  }
245
260
  ),
246
- l && /* @__PURE__ */ P("label", { className: C(d.toggle__label, u), children: l })
261
+ l && /* @__PURE__ */ P("label", { className: O(g.toggle__label, u), children: l })
247
262
  ] });
248
263
  };
249
264
  export {
250
- ce as Toggle
265
+ re as Toggle
251
266
  };
@@ -1,6 +1,6 @@
1
1
  import { ComponentType, ElementType, HTMLAttributes, LabelHTMLAttributes, ReactNode } from 'react';
2
2
 
3
- export type VariantType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-large' | 'body-medium' | 'body' | 'body-small' | 'body-tiny' | 'quote-large' | 'quote' | 'form-input' | 'form-label' | 'form-hint' | 'form-dropdown' | 'table-header' | 'table-body' | 'table-body-secondary' | 'button' | 'link';
3
+ export type VariantType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'base-lg' | 'base-xl' | 'base-xxl' | 'base' | 'base-sm';
4
4
  export type CommonTypographyHTMLAttributes = HTMLAttributes<HTMLParagraphElement> & HTMLAttributes<HTMLHeadingElement> & HTMLAttributes<HTMLSpanElement> & HTMLAttributes<HTMLTableCellElement>;
5
5
  export type TypographyProps = {
6
6
  /** Text or children to display */
@@ -1,94 +1,64 @@
1
1
  import '../../assets/Typography.css';
2
- import { jsx as f } from "react/jsx-runtime";
3
- import { forwardRef as y, useMemo as g } from "react";
4
- import { bemify as p, getBEMBase as q, getBEMBlock as M } from "../../utils/styleStrings.js";
2
+ import { jsx as b } from "react/jsx-runtime";
3
+ import { forwardRef as m, useMemo as c } from "react";
4
+ import { bemify as f, getBEMBase as k, getBEMBlock as x } from "../../utils/styleStrings.js";
5
5
  import { c as B } from "../../clsx-DB4S2d7J.js";
6
- const E = "_h1_1elsk_1", S = "_h2_1elsk_11", $ = "_h3_1elsk_21", w = "_h4_1elsk_31", v = "_body_1elsk_41", x = "_quote_1elsk_75", N = "_form__input_1elsk_98", T = "_form__hint_1elsk_103", j = "_form__label_1elsk_108", P = "_form__dropdown_1elsk_113", R = "_table__header_1elsk_131", U = "_table__body_1elsk_136", V = "_button_1elsk_159", W = "_SM_1elsk_178", t = {
7
- h1: E,
8
- "h1--bold": "_h1--bold_1elsk_7",
9
- h2: S,
10
- "h2--bold": "_h2--bold_1elsk_17",
11
- h3: $,
12
- "h3--bold": "_h3--bold_1elsk_27",
13
- h4: w,
14
- "h4--bold": "_h4--bold_1elsk_37",
15
- body: v,
16
- "body--large": "_body--large_1elsk_46",
17
- "body--medium": "_body--medium_1elsk_50",
18
- "body--small": "_body--small_1elsk_54",
19
- "body--tiny": "_body--tiny_1elsk_58",
20
- "body--bold": "_body--bold_1elsk_62",
21
- "body--strikethrough": "_body--strikethrough_1elsk_65",
22
- "body--underlined": "_body--underlined_1elsk_68",
23
- "body--strikethrough-underlined": "_body--strikethrough-underlined_1elsk_71",
24
- quote: x,
25
- "quote--large": "_quote--large_1elsk_80",
26
- "quote--bold": "_quote--bold_1elsk_85",
27
- "quote--strikethrough": "_quote--strikethrough_1elsk_88",
28
- "quote--underlined": "_quote--underlined_1elsk_91",
29
- "quote--strikethrough-underlined": "_quote--strikethrough-underlined_1elsk_94",
30
- form__input: N,
31
- form__hint: T,
32
- form__label: j,
33
- form__dropdown: P,
34
- "form--bold": "_form--bold_1elsk_118",
35
- "form--strikethrough": "_form--strikethrough_1elsk_121",
36
- "form--underlined": "_form--underlined_1elsk_124",
37
- "form--strikethrough-underlined": "_form--strikethrough-underlined_1elsk_127",
38
- table__header: R,
39
- table__body: U,
40
- "table__body--secondary": "_table__body--secondary_1elsk_141",
41
- "table--bold": "_table--bold_1elsk_146",
42
- "table--strikethrough": "_table--strikethrough_1elsk_149",
43
- "table--underlined": "_table--underlined_1elsk_152",
44
- "table--strikethrough-underlined": "_table--strikethrough-underlined_1elsk_155",
45
- button: V,
46
- "button--bold": "_button--bold_1elsk_165",
47
- "button--strikethrough": "_button--strikethrough_1elsk_168",
48
- "button--underlined": "_button--underlined_1elsk_171",
49
- "button--strikethrough-underlined": "_button--strikethrough-underlined_1elsk_174",
50
- SM: W,
51
- "SM--bold": "_SM--bold_1elsk_183"
52
- }, z = ["form", "table"], A = (o) => {
53
- const e = o.toString();
54
- let _ = "body";
55
- return e.match(/^h[1-4]/) ? _ = e : e.match(/^h[5-6]/) && (_ = "h4"), e === "th" && (_ = "table-header"), e === "td" && (_ = "table-body"), _;
56
- }, H = y((o, e) => {
6
+ const t = {
7
+ "u-typography-h1": "_u-typography-h1_zizdh_1",
8
+ "u-typography-h2": "_u-typography-h2_zizdh_8",
9
+ "u-typography-h3": "_u-typography-h3_zizdh_15",
10
+ "u-typography-h4": "_u-typography-h4_zizdh_22",
11
+ "u-typography-h5": "_u-typography-h5_zizdh_29",
12
+ "u-typography-h6": "_u-typography-h6_zizdh_36",
13
+ "u-typography-base": "_u-typography-base_zizdh_43",
14
+ "u-typography-base--xxl": "_u-typography-base--xxl_zizdh_48",
15
+ "u-typography-base--xl": "_u-typography-base--xl_zizdh_52",
16
+ "u-typography-base--lg": "_u-typography-base--lg_zizdh_56",
17
+ "u-typography-base--sm": "_u-typography-base--sm_zizdh_60",
18
+ "u-typography-base--bold": "_u-typography-base--bold_zizdh_64",
19
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_zizdh_67",
20
+ "u-typography-base--underlined": "_u-typography-base--underlined_zizdh_70",
21
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_zizdh_73"
22
+ }, E = (a) => {
23
+ const r = a.toString();
24
+ let h = "base";
25
+ return r.match(/^h[1-6]/) && (h = r), h;
26
+ }, T = m((a, r) => {
57
27
  const {
58
- children: _,
59
- className: n,
60
- underline: d = !1,
61
- element: b = "span",
62
- bold: h = !1,
63
- color: k,
64
- variant: u = A(b),
65
- strikethrough: l = !1,
66
- elementProps: a
67
- } = o, m = b, c = g(() => {
68
- const r = p(u, z), i = q(r), s = M(r);
69
- return B(
70
- t[i],
71
- { [t[`${r}`]]: r !== i },
72
- n,
73
- { [t[`${s}--bold`]]: h },
74
- { [t[`${s}--underlined`]]: d },
75
- { [t[`${s}--strikethrough`]]: l },
76
- { [t[`${s}--strikethrough-underlined`]]: l && l && d }
28
+ children: h,
29
+ className: s,
30
+ underline: y = !1,
31
+ element: u = "span",
32
+ bold: i = !1,
33
+ color: d,
34
+ variant: g = E(u),
35
+ strikethrough: o = !1,
36
+ elementProps: n
37
+ } = a, l = u, z = c(() => {
38
+ const e = `u-typography-${f(g)}`, _ = k(e), p = x(e);
39
+ return console.log("variantBEMified: ", e), B(
40
+ t[_],
41
+ { [t[`${e}`]]: e !== _ },
42
+ s,
43
+ { [t[`${p}--bold`]]: i },
44
+ { [t[`${p}--underlined`]]: y },
45
+ { [t[`${p}--strikethrough`]]: o },
46
+ { [t[`${p}--strikethrough-underlined`]]: o && o && y }
77
47
  );
78
- }, [h, n, l, d, u]);
79
- return /* @__PURE__ */ f(
80
- m,
48
+ }, [i, s, o, y, g]);
49
+ return /* @__PURE__ */ b(
50
+ l,
81
51
  {
82
- style: { color: k },
83
- ref: e,
84
- "data-testid": o["data-testid"],
85
- ...a ?? {},
86
- className: c,
87
- children: _
52
+ style: { color: d },
53
+ ref: r,
54
+ "data-testid": a["data-testid"],
55
+ ...n ?? {},
56
+ className: z,
57
+ children: h
88
58
  }
89
59
  );
90
60
  });
91
61
  export {
92
- H as Typography,
93
- H as default
62
+ T as Typography,
63
+ T as default
94
64
  };
package/dist/main.js CHANGED
@@ -4,61 +4,66 @@ import { Checkbox as f } from "./components/Checkbox/Checkbox.js";
4
4
  import { Chip as m } from "./components/Chip/Chip.js";
5
5
  import { Dialog as l } from "./components/Dialog/Dialog.js";
6
6
  import { FamilyAndIcons as T, Icon as s } from "./components/Icon/Icon.js";
7
- import { IconButton as S } from "./components/IconButton/IconButton.js";
8
- import { Input as u } from "./components/Input/Input.js";
9
- import { InputSearch as d } from "./components/InputSearch/InputSearch.js";
10
- import { LoadingSpinner as D } from "./components/LoadingSpinner/LoadingSpinner.js";
11
- import { PageHeader as h } from "./components/PageHeader/PageHeader.js";
7
+ import { IconButton as d } from "./components/IconButton/IconButton.js";
8
+ import { Input as g } from "./components/Input/Input.js";
9
+ import { InputSearch as b } from "./components/InputSearch/InputSearch.js";
10
+ import { LoadingSpinner as k } from "./components/LoadingSpinner/LoadingSpinner.js";
11
+ import { PageHeader as D } from "./components/PageHeader/PageHeader.js";
12
12
  import { Pagination as C, paginationDefaultTranslations as A } from "./components/Pagination/Pagination.js";
13
- import { Select as B, SelectOption as v } from "./components/Select/Select.js";
14
- import { Skeleton as H, SkeletonCircle as L, SkeletonTable as O } from "./components/Skeleton/Skeleton.js";
13
+ import { Select as P, SelectOption as H } from "./components/Select/Select.js";
14
+ import { Skeleton as F, SkeletonCircle as L, SkeletonTable as O } from "./components/Skeleton/Skeleton.js";
15
15
  import { Snackbar as q } from "./components/Snackbar/Snackbar.js";
16
16
  import { SortTooltip as z, sortTooltipDefaultTranslations as E } from "./components/SortTooltip/SortTooltip.js";
17
17
  import { Stepper as J } from "./components/Stepper/Stepper.js";
18
- import { Table as M } from "./components/Table/Table.js";
19
- import { Tabs as Q } from "./components/Tabs/Tabs.js";
20
- import { TextDisplay as U } from "./components/TextDisplay/TextDisplay.js";
21
- import { Toggle as W } from "./components/Toggle/Toggle.js";
22
- import { Tooltip as Y } from "./components/Tooltip/Tooltip.js";
23
- import { Typography as _ } from "./components/Typography/Typography.js";
24
- import { default as oo } from "./components/Dialog/Title.js";
25
- import { default as eo } from "./components/Dialog/Content.js";
26
- import { default as po } from "./components/Dialog/Actions.js";
27
- import { Tab as fo } from "./components/Tabs/Tab.js";
28
- import { TabPanel as mo } from "./components/Tabs/TabPanel.js";
18
+ import { TBody as M, THead as N, Table as Q, Td as R, Th as U, Tr as V } from "./components/Table/Table.js";
19
+ import { Tabs as X } from "./components/Tabs/Tabs.js";
20
+ import { TextDisplay as Z } from "./components/TextDisplay/TextDisplay.js";
21
+ import { Toggle as $ } from "./components/Toggle/Toggle.js";
22
+ import { Tooltip as ro } from "./components/Tooltip/Tooltip.js";
23
+ import { Typography as to } from "./components/Typography/Typography.js";
24
+ import { default as ao } from "./components/Dialog/DialogTitle.js";
25
+ import { default as xo } from "./components/Dialog/Content.js";
26
+ import { default as no } from "./components/Dialog/Actions.js";
27
+ import { Tab as io } from "./components/Tabs/Tab.js";
28
+ import { TabPanel as so } from "./components/Tabs/TabPanel.js";
29
29
  export {
30
- po as Actions,
30
+ no as Actions,
31
31
  e as Advice,
32
32
  p as Button,
33
33
  f as Checkbox,
34
34
  m as Chip,
35
- eo as Content,
35
+ xo as Content,
36
36
  l as Dialog,
37
- oo as DialogTitle,
37
+ ao as DialogTitle,
38
38
  T as FamilyAndIcons,
39
39
  s as Icon,
40
- S as IconButton,
41
- u as Input,
42
- d as InputSearch,
43
- D as LoadingSpinner,
44
- h as PageHeader,
40
+ d as IconButton,
41
+ g as Input,
42
+ b as InputSearch,
43
+ k as LoadingSpinner,
44
+ D as PageHeader,
45
45
  C as Pagination,
46
- B as Select,
47
- v as SelectOption,
48
- H as Skeleton,
46
+ P as Select,
47
+ H as SelectOption,
48
+ F as Skeleton,
49
49
  L as SkeletonCircle,
50
50
  O as SkeletonTable,
51
51
  q as Snackbar,
52
52
  z as SortTooltip,
53
53
  J as Stepper,
54
- fo as Tab,
55
- mo as TabPanel,
56
- M as Table,
57
- Q as Tabs,
58
- U as TextDisplay,
59
- W as Toggle,
60
- Y as Tooltip,
61
- _ as Typography,
54
+ M as TBody,
55
+ N as THead,
56
+ io as Tab,
57
+ so as TabPanel,
58
+ Q as Table,
59
+ X as Tabs,
60
+ R as Td,
61
+ Z as TextDisplay,
62
+ U as Th,
63
+ $ as Toggle,
64
+ ro as Tooltip,
65
+ V as Tr,
66
+ to as Typography,
62
67
  A as paginationDefaultTranslations,
63
68
  E as sortTooltipDefaultTranslations
64
69
  };