@pismo/marola 0.0.1-alpha.32 → 0.0.1-alpha.5

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 (170) hide show
  1. package/README.md +2 -13
  2. package/dist/{Button-2b1peDFT.js → Button-D--uN90N.js} +26 -25
  3. package/dist/Dialog.module-BKWFakxu.js +15 -0
  4. package/dist/ListContext-Dj2Va7Iv.js +18 -0
  5. package/dist/Tabs.module-BKlNuSPH.js +66 -0
  6. package/dist/assets/Button.css +1 -1
  7. package/dist/assets/Dialog.css +1 -1
  8. package/dist/assets/IconButton.css +1 -1
  9. package/dist/assets/PageHeader.css +1 -1
  10. package/dist/assets/Pagination.css +1 -1
  11. package/dist/assets/Tabs.css +1 -1
  12. package/dist/assets/Typography.css +1 -1
  13. package/dist/assets/main.css +1 -0
  14. package/dist/components/Button/Button.d.ts +2 -13
  15. package/dist/components/Button/Button.js +49 -60
  16. package/dist/components/Dialog/Actions.js +1 -1
  17. package/dist/components/Dialog/Backdrop.d.ts +1 -1
  18. package/dist/components/Dialog/Backdrop.js +1 -1
  19. package/dist/components/Dialog/CloseIconButton.js +124 -12
  20. package/dist/components/Dialog/Dialog.d.ts +3 -4
  21. package/dist/components/Dialog/Dialog.js +20098 -444
  22. package/dist/components/Dialog/{DialogTitle.d.ts → Title.d.ts} +3 -3
  23. package/dist/components/Dialog/Title.js +29 -0
  24. package/dist/components/IconButton/IconButton.d.ts +5 -21
  25. package/dist/components/IconButton/IconButton.js +76 -60
  26. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +0 -2
  27. package/dist/components/PageHeader/PageHeader.d.ts +16 -56
  28. package/dist/components/PageHeader/PageHeader.js +65 -83
  29. package/dist/components/Pagination/Pagination.d.ts +6 -25
  30. package/dist/components/Pagination/Pagination.js +113 -131
  31. package/dist/components/SortTooltip/SortTooltip.d.ts +0 -28
  32. package/dist/components/SortTooltip/SortTooltip.js +1 -93
  33. package/dist/components/Table/Table.d.ts +0 -56
  34. package/dist/components/Table/Table.js +1 -137
  35. package/dist/components/Table/TableContext.d.ts +0 -19
  36. package/dist/components/Table/TableContext.js +1 -21
  37. package/dist/components/Tabs/Tab.d.ts +1 -6
  38. package/dist/components/Tabs/Tab.js +173 -113
  39. package/dist/components/Tabs/TabPanel.d.ts +1 -5
  40. package/dist/components/Tabs/TabPanel.js +16 -15
  41. package/dist/components/Tabs/Tabs.d.ts +2 -8
  42. package/dist/components/Tabs/Tabs.js +664 -242
  43. package/dist/components/Tooltip/Tooltip.d.ts +0 -33
  44. package/dist/components/Tooltip/Tooltip.js +1 -141
  45. package/dist/components/Typography/Typography.d.ts +6 -17
  46. package/dist/components/Typography/Typography.js +58 -58
  47. package/dist/{index-CH45lKw7.js → index-BvA1HyDs.js} +300 -322
  48. package/dist/main.d.ts +8 -27
  49. package/dist/main.js +28 -75
  50. package/dist/objectWithoutPropertiesLoose-ClNcje2_.js +22 -0
  51. package/dist/types/helpers.d.ts +0 -8
  52. package/dist/useButton-abQpo0za.js +187 -0
  53. package/dist/useCompoundItem-wTwXbURC.js +41 -0
  54. package/package.json +9 -30
  55. package/dist/ClickAwayListener-BSW-Nd-y.js +0 -107
  56. package/dist/Dialog.module-DFEmFdYT.js +0 -30
  57. package/dist/Group-B3p31ftp.js +0 -26
  58. package/dist/Popup-B6ZSGIEI.js +0 -1248
  59. package/dist/Portal-DIeBsWdL.js +0 -73
  60. package/dist/SelectButton-C8JQKaf4.js +0 -61
  61. package/dist/Tabs.module-jkH1Qjn7.js +0 -22
  62. package/dist/Toggle-BCgIItCc.js +0 -142
  63. package/dist/assets/Advice.css +0 -1
  64. package/dist/assets/Checkbox.css +0 -1
  65. package/dist/assets/EllipsisTooltip.css +0 -1
  66. package/dist/assets/Group.css +0 -1
  67. package/dist/assets/Input.css +0 -1
  68. package/dist/assets/InputSearch.css +0 -1
  69. package/dist/assets/SelectButton.css +0 -1
  70. package/dist/assets/Skeleton.css +0 -1
  71. package/dist/assets/Snackbar.css +0 -1
  72. package/dist/assets/SortTooltip.css +0 -1
  73. package/dist/assets/Stepper.css +0 -1
  74. package/dist/assets/Table.css +0 -1
  75. package/dist/assets/TextDisplay.css +0 -1
  76. package/dist/assets/Toggle.css +0 -1
  77. package/dist/assets/Toggle2.css +0 -1
  78. package/dist/assets/Tooltip.css +0 -1
  79. package/dist/combineHooksSlotProps-DVjg9PRh.js +0 -80
  80. package/dist/components/Advice/Advice.d.ts +0 -30
  81. package/dist/components/Advice/Advice.js +0 -47
  82. package/dist/components/Advice/Advice.stories.d.ts +0 -18
  83. package/dist/components/Button/Button.stories.d.ts +0 -62
  84. package/dist/components/Checkbox/Checkbox.d.ts +0 -34
  85. package/dist/components/Checkbox/Checkbox.js +0 -71
  86. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -31
  87. package/dist/components/Chip/Chip.d.ts +0 -39
  88. package/dist/components/Chip/Chip.js +0 -19
  89. package/dist/components/Chip/Chip.stories.d.ts +0 -42
  90. package/dist/components/Chip/chip.test.d.ts +0 -1
  91. package/dist/components/Dialog/Dialog.stories.d.ts +0 -343
  92. package/dist/components/Dialog/DialogTitle.js +0 -29
  93. package/dist/components/EllipsisTooltip/EllipsisTooltip.d.ts +0 -7
  94. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +0 -23
  95. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +0 -31
  96. package/dist/components/Icon/Icon.d.ts +0 -11
  97. package/dist/components/Icon/Icon.js +0 -127
  98. package/dist/components/Icon/Icon.stories.d.ts +0 -15
  99. package/dist/components/Icon/types.d.ts +0 -5
  100. package/dist/components/Icon/types.js +0 -1
  101. package/dist/components/IconButton/Icon.stories.d.ts +0 -15
  102. package/dist/components/Input/Input.d.ts +0 -44
  103. package/dist/components/Input/Input.js +0 -508
  104. package/dist/components/Input/Input.stories.d.ts +0 -43
  105. package/dist/components/InputSearch/InputSearch.d.ts +0 -9
  106. package/dist/components/InputSearch/InputSearch.js +0 -34
  107. package/dist/components/InputSearch/InputSearch.stories.d.ts +0 -39
  108. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +0 -14
  109. package/dist/components/PageHeader/PageHeader.stories.d.ts +0 -14
  110. package/dist/components/Pagination/Pagination.stories.d.ts +0 -17
  111. package/dist/components/Select/Select.d.ts +0 -26
  112. package/dist/components/Select/Select.js +0 -857
  113. package/dist/components/Select/Select.stories.d.ts +0 -22
  114. package/dist/components/Select/SelectButton.d.ts +0 -12
  115. package/dist/components/Select/SelectButton.js +0 -8
  116. package/dist/components/Skeleton/Skeleton.d.ts +0 -25
  117. package/dist/components/Skeleton/Skeleton.js +0 -23
  118. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -14
  119. package/dist/components/Skeleton/SkeletonCircle.stories.d.ts +0 -14
  120. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +0 -16
  121. package/dist/components/Snackbar/Snackbar.d.ts +0 -27
  122. package/dist/components/Snackbar/Snackbar.js +0 -639
  123. package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -319
  124. package/dist/components/Stepper/Stepper.d.ts +0 -26
  125. package/dist/components/Stepper/Stepper.js +0 -48
  126. package/dist/components/Stepper/Stepper.stories.d.ts +0 -16
  127. package/dist/components/Table/Table.stories.d.ts +0 -29
  128. package/dist/components/Table/_Table.TBody.stories.d.ts +0 -14
  129. package/dist/components/Table/_Table.THead.stories.d.ts +0 -14
  130. package/dist/components/Table/_Table.Td.stories.d.ts +0 -16
  131. package/dist/components/Table/_Table.Th.stories.d.ts +0 -15
  132. package/dist/components/Table/_Table.Tr.stories.d.ts +0 -15
  133. package/dist/components/Tabs/Tab.stories.d.ts +0 -15
  134. package/dist/components/Tabs/TabPanel.stories.d.ts +0 -14
  135. package/dist/components/Tabs/Tabs.stories.d.ts +0 -14
  136. package/dist/components/TextDisplay/TextDisplay.d.ts +0 -23
  137. package/dist/components/TextDisplay/TextDisplay.js +0 -37
  138. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +0 -13
  139. package/dist/components/TextDisplay/textDisplay.test.d.ts +0 -1
  140. package/dist/components/Toggle/Toggle.d.ts +0 -11
  141. package/dist/components/Toggle/Toggle.js +0 -266
  142. package/dist/components/Toggle/Toggle.stories.d.ts +0 -21
  143. package/dist/components/ToggleGroup/Group.d.ts +0 -18
  144. package/dist/components/ToggleGroup/Group.js +0 -7
  145. package/dist/components/ToggleGroup/Group.test.d.ts +0 -1
  146. package/dist/components/ToggleGroup/Toggle.d.ts +0 -15
  147. package/dist/components/ToggleGroup/Toggle.js +0 -17
  148. package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
  149. package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -2
  150. package/dist/components/ToggleGroup/ToggleGroup.js +0 -6
  151. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -25
  152. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -35
  153. package/dist/components/Typography/Typography.stories.d.ts +0 -32
  154. package/dist/components/Typography/typography.test.d.ts +0 -1
  155. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +0 -11
  156. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +0 -50
  157. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +0 -21
  158. package/dist/index-CjW42-M-.js +0 -19584
  159. package/dist/marola.css +0 -1
  160. package/dist/test-utils/assertStyles.d.ts +0 -1
  161. package/dist/test-utils/assertStyles.js +0 -11
  162. package/dist/useButton-DNk3wrQp.js +0 -105
  163. package/dist/useCompoundItem-D1iRfg8D.js +0 -84
  164. package/dist/useEventCallback-xTG9piMa.js +0 -45
  165. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  166. package/dist/useList-B0hog_3-.js +0 -436
  167. package/dist/useTimeout-DxF9kiZL.js +0 -36
  168. package/dist/utils/styleStrings.d.ts +0 -6
  169. package/dist/utils/styleStrings.js +0 -10
  170. package/dist/utils/styleStrings.test.d.ts +0 -1
@@ -1,33 +0,0 @@
1
- import { PopupPlacement } from '@mui/base';
2
- import { AriaRole, CSSProperties, ReactNode } from 'react';
3
-
4
- export type TooltipProps = {
5
- /** Tooltip reference element. */
6
- children: ReactNode;
7
- /** Tooltip title. Zero-length titles string, undefined, null and false are never displayed. */
8
- title: ReactNode;
9
- /** Should the tooltip be initially open */
10
- open?: boolean;
11
- /** Disable the hover listener */
12
- disableHoverListener?: boolean;
13
- /** Function to run when the tooltip is closed */
14
- onClose?: () => void;
15
- /** The color of the tooltip */
16
- theme?: 'white' | 'black';
17
- /** Dhe padding applied to the tooltip */
18
- padding?: 'small' | 'normal';
19
- /** The Position where the tooltip will be display relative to the anchor element */
20
- position?: PopupPlacement;
21
- /** Accessibility role label */
22
- arialRole?: AriaRole;
23
- /** Additional classnames to be applied to the tooltip */
24
- className?: string;
25
- /** Additional styles to be applied to the tooltip */
26
- style?: CSSProperties;
27
- /** Test id */
28
- 'data-testid'?: string;
29
- /** Function thats return the HTML Element of target. Important to EllipsisTooltip knows if the node needs or not the ellipsis */
30
- onTargetCreated?: (e: HTMLElement) => void;
31
- };
32
- declare const Tooltip: ({ arialRole, children: childrenProp, className, disableHoverListener, onClose, padding, position, open: openProp, theme, title, onTargetCreated, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
33
- export { Tooltip };
@@ -1,141 +1 @@
1
- import '../../assets/Tooltip.css';
2
- import { jsx as a, jsxs as v, Fragment as P } from "react/jsx-runtime";
3
- import * as u from "react";
4
- import { useRef as R, useState as T, useEffect as E, isValidElement as q, cloneElement as M } from "react";
5
- import { T as O, P as V } from "../../Popup-B6ZSGIEI.js";
6
- import { _ as $, b as z, P as l } from "../../index-CH45lKw7.js";
7
- import { c as D } from "../../clsx-DB4S2d7J.js";
8
- import { C as F } from "../../ClickAwayListener-BSW-Nd-y.js";
9
- function I() {
10
- const e = u.useContext(O);
11
- if (!e)
12
- throw new Error("Missing transition context");
13
- const {
14
- registerTransition: o,
15
- requestedEnter: r,
16
- onExited: n
17
- } = e;
18
- return u.useEffect(() => o(), [o]), {
19
- onExited: n,
20
- requestedEnter: r
21
- };
22
- }
23
- const W = ["children", "className", "enterAnimationName", "enterClassName", "exitAnimationName", "exitClassName"];
24
- function b(e) {
25
- const {
26
- children: o,
27
- className: r,
28
- enterAnimationName: n,
29
- enterClassName: c,
30
- exitAnimationName: _,
31
- exitClassName: f
32
- } = e, p = $(e, W), {
33
- requestedEnter: d,
34
- onExited: s
35
- } = I(), i = u.useRef(!0);
36
- u.useEffect(() => {
37
- d && i.current && (i.current = !1);
38
- }, [d]);
39
- const N = u.useCallback((t) => {
40
- t.animationName === _ ? (s(), i.current = !0) : t.animationName === n && (i.current = !1);
41
- }, [s, _, n]);
42
- return /* @__PURE__ */ a("div", z({
43
- onAnimationEnd: N,
44
- className: D(r, d ? c : f)
45
- }, p, {
46
- children: o
47
- }));
48
- }
49
- process.env.NODE_ENV !== "production" && (b.propTypes = {
50
- children: l.node,
51
- className: l.string,
52
- enterAnimationName: l.string,
53
- enterClassName: l.string,
54
- exitAnimationName: l.string,
55
- exitClassName: l.string
56
- });
57
- const B = "_tooltip_1dujm_1", m = {
58
- tooltip: B,
59
- "tooltip--small-padding": "_tooltip--small-padding_1dujm_5",
60
- "tooltip--normal-padding": "_tooltip--normal-padding_1dujm_8",
61
- "tooltip--white-theme": "_tooltip--white-theme_1dujm_11",
62
- "tooltip--black-theme": "_tooltip--black-theme_1dujm_15",
63
- "tooltip--animation": "_tooltip--animation_1dujm_20",
64
- "tooltip--anim-open": "_tooltip--anim-open_1dujm_20",
65
- "tooltip--open-animation": "_tooltip--open-animation_1dujm_1",
66
- "tooltip--anim-close": "_tooltip--anim-close_1dujm_23",
67
- "tooltip--close-animation": "_tooltip--close-animation_1dujm_1"
68
- }, X = ({
69
- arialRole: e,
70
- children: o,
71
- className: r,
72
- disableHoverListener: n,
73
- onClose: c,
74
- padding: _ = "small",
75
- position: f = "bottom",
76
- open: p,
77
- theme: d = "black",
78
- title: s,
79
- onTargetCreated: i,
80
- ...N
81
- }) => {
82
- const t = R(null), [y, h] = T(p || !1);
83
- let j = y;
84
- E(() => {
85
- h(p || !1);
86
- }, [p]);
87
- const A = q(o) ? o : /* @__PURE__ */ a("span", { children: o });
88
- !s && s !== 0 && (j = !1);
89
- const k = () => {
90
- c == null || c(), !n && h(!1);
91
- };
92
- E(() => {
93
- var C;
94
- if (t != null && t.current) {
95
- i == null || i(t == null ? void 0 : t.current);
96
- const x = (C = t == null ? void 0 : t.current) == null ? void 0 : C.parentElement;
97
- x && (n || (x.onpointerenter = () => h(!0), x.onpointerleave = () => h(!1)));
98
- }
99
- }, [t, n]);
100
- const w = {
101
- padding: f.match(/(bottom|top)/) ? ".25rem 0" : "0 .25rem",
102
- zIndex: 1
103
- }, S = [
104
- m.tooltip,
105
- m[`tooltip--${d}-theme`],
106
- m[`tooltip--${_}-padding`],
107
- r || ""
108
- ].join(" ").trim(), g = {
109
- ...A.props,
110
- ref: t
111
- };
112
- return /* @__PURE__ */ v(P, { children: [
113
- M(A, g),
114
- /* @__PURE__ */ a(
115
- V,
116
- {
117
- ...N,
118
- open: j,
119
- anchor: t == null ? void 0 : t.current,
120
- disablePortal: !0,
121
- style: w,
122
- role: e,
123
- placement: f,
124
- children: /* @__PURE__ */ a(
125
- b,
126
- {
127
- className: m["tooltip--animation"],
128
- enterClassName: m["tooltip--anim-open"],
129
- exitClassName: m["tooltip--anim-close"],
130
- enterAnimationName: "tooltip--open-animation",
131
- exitAnimationName: "tooltip--close-animation",
132
- children: /* @__PURE__ */ a("div", { className: S, children: /* @__PURE__ */ a(F, { onClickAway: k, children: /* @__PURE__ */ a("div", { children: s }) }) })
133
- }
134
- )
135
- }
136
- )
137
- ] });
138
- };
139
- export {
140
- X as Tooltip
141
- };
1
+
@@ -1,33 +1,22 @@
1
- import { ComponentType, ElementType, HTMLAttributes, LabelHTMLAttributes, ReactNode } from 'react';
1
+ import { ComponentType, ElementType, HTMLAttributes, ReactNode } from 'react';
2
2
 
3
- export type VariantType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'base-lg' | 'base-xl' | 'base-xxl' | 'base' | 'base-sm';
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';
4
4
  export type CommonTypographyHTMLAttributes = HTMLAttributes<HTMLParagraphElement> & HTMLAttributes<HTMLHeadingElement> & HTMLAttributes<HTMLSpanElement> & HTMLAttributes<HTMLTableCellElement>;
5
5
  export type TypographyProps = {
6
- /** Text or children to display */
7
6
  children: ReactNode;
8
- /** The HTML element to render as on the DOM */
7
+ elementProps?: HTMLAttributes<CommonTypographyHTMLAttributes>;
8
+ dataTestId?: string;
9
9
  element?: ElementType;
10
- /** Style to be visually displayed as */
11
- variant?: VariantType;
12
- /** Space separated list of CSS classes to apply */
13
10
  className?: string;
14
- /** Color to apply */
15
- color?: string;
16
- /** Whether to apply underline text decoration */
11
+ variant?: VariantType;
17
12
  underline?: boolean;
18
- /** Whether to apply strikethrough text decoration */
19
13
  strikethrough?: boolean;
20
- /** Whether to set a higher 'bold' font weight */
21
14
  bold?: boolean;
22
- /** Additional props to pass down to native HTML element e.g. dataset attributes */
23
- elementProps?: HTMLAttributes<CommonTypographyHTMLAttributes> & LabelHTMLAttributes<HTMLLabelElement>;
24
- /** ID that tests can use to get this component from the DOM */
25
- ['data-testid']?: string;
26
15
  };
27
16
  /**
28
17
  * Typography component provide HTML 'element' field (default span) and override
29
18
  * element specific styling with 'variant'. 'className' to provide additional
30
19
  * styling. elementProps to provide additional HTML element attributes
31
20
  */
32
- export declare const Typography: import('react').ForwardRefExoticComponent<TypographyProps & import('react').RefAttributes<ElementType | ComponentType>>;
21
+ export declare const Typography: import('react').ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<ElementType | ComponentType>>;
33
22
  export default Typography;
@@ -1,64 +1,64 @@
1
1
  import '../../assets/Typography.css';
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
- import { c as B } from "../../clsx-DB4S2d7J.js";
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) => {
23
- const a = e.toString();
24
- let r = "base";
25
- return a.match(/^h[1-6]/) && (r = a), r;
26
- }, T = m((e, a) => {
2
+ import { jsx as y } from "react/jsx-runtime";
3
+ import { forwardRef as k, useMemo as u } from "react";
4
+ import { c } from "../../clsx-DB4S2d7J.js";
5
+ const v = "_h1_nv7ki_1", f = "_h2_nv7ki_11", p = "_h3_nv7ki_21", g = "_h4_nv7ki_31", q = "_body_nv7ki_41", T = "_quote_nv7ki_75", $ = "_form__input_nv7ki_86", w = "_form__hint_nv7ki_91", x = "_form__label_nv7ki_96", N = "_form__dropdown_nv7ki_101", S = "_table__header_nv7ki_107", E = "_table__body_nv7ki_112", V = "_button_nv7ki_123", n = {
6
+ h1: v,
7
+ "h1--bold": "_h1--bold_nv7ki_7",
8
+ h2: f,
9
+ "h2--bold": "_h2--bold_nv7ki_17",
10
+ h3: p,
11
+ "h3--bold": "_h3--bold_nv7ki_27",
12
+ h4: g,
13
+ "h4--bold": "_h4--bold_nv7ki_37",
14
+ body: q,
15
+ "body--large": "_body--large_nv7ki_46",
16
+ "body--medium": "_body--medium_nv7ki_50",
17
+ "body--small": "_body--small_nv7ki_54",
18
+ "body--tiny": "_body--tiny_nv7ki_58",
19
+ "body--bold": "_body--bold_nv7ki_62",
20
+ "body--strikethrough": "_body--strikethrough_nv7ki_65",
21
+ "body--underlined": "_body--underlined_nv7ki_68",
22
+ "body--strikethrough-underlined": "_body--strikethrough-underlined_nv7ki_71",
23
+ quote: T,
24
+ "quote--large": "_quote--large_nv7ki_80",
25
+ form__input: $,
26
+ form__hint: w,
27
+ form__label: x,
28
+ form__dropdown: N,
29
+ table__header: S,
30
+ table__body: E,
31
+ "table__body--secondary": "_table__body--secondary_nv7ki_117",
32
+ button: V
33
+ }, j = (e) => {
34
+ const _ = e.toString();
35
+ let o = "body";
36
+ return _.match(/^h[1-4]/) ? o = _ : _.match(/^h[5-6]/) && (o = "h4"), _ === "th" && (o = "table-header"), _ === "td" && (o = "table-body"), o;
37
+ }, z = (e) => {
38
+ let _ = e.replace(/^([a-z]*)-/, "$1__");
39
+ return _ = _.replace(new RegExp("(?<!-)-(?!-)", "g"), "--"), _;
40
+ }, R = k((e, _) => {
27
41
  const {
28
- children: r,
29
- className: s,
30
- underline: y = !1,
31
- element: u = "span",
32
- bold: i = !1,
33
- color: d,
34
- variant: _ = $(u),
35
- strikethrough: h = !1,
36
- elementProps: n
37
- } = e, l = u, z = c(() => {
38
- const o = `u-typography-${f(_)}`, g = k(o), p = x(o);
39
- return B(
40
- t[g],
41
- { [t[`${o}`]]: o !== g },
42
- s,
43
- { [t[`${p}--bold`]]: i },
44
- { [t[`${p}--underlined`]]: y },
45
- { [t[`${p}--strikethrough`]]: h },
46
- { [t[`${p}--strikethrough-underlined`]]: h && h && y }
47
- );
48
- }, [i, s, h, y, _]);
49
- return /* @__PURE__ */ b(
42
+ dataTestId: o,
43
+ children: b,
44
+ className: l,
45
+ underline: d = !1,
46
+ element: i = "span",
47
+ bold: a = !1,
48
+ variant: t = j(i),
49
+ strikethrough: r = !1,
50
+ elementProps: s
51
+ } = e, h = i, m = u(() => c(
52
+ n[z(t)],
50
53
  l,
51
- {
52
- style: { color: d },
53
- ref: a,
54
- "data-testid": e["data-testid"],
55
- ...n ?? {},
56
- className: z,
57
- children: r
58
- }
59
- );
54
+ { [n[`${t}--bold`]]: a },
55
+ { [n[`${t}--underlined`]]: d },
56
+ { [n[`${t}--strikethrough`]]: r },
57
+ { [n[`${t}--strikethrough-underlined`]]: r && r && d }
58
+ ), [a, l, r, d, t]);
59
+ return /* @__PURE__ */ y(h, { ref: _, "data-testid": o, ...s != null && s, className: m, children: b });
60
60
  });
61
61
  export {
62
- T as Typography,
63
- T as default
62
+ R as Typography,
63
+ R as default
64
64
  };