@pismo/marola 1.0.0-beta.8 → 1.0.0

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 (172) hide show
  1. package/dist/{Button-DiLqcAJG.js → Button-BAljjMv3.js} +2 -2
  2. package/dist/{ClickAwayListener-BaJ-OV_7.js → ClickAwayListener-DbEYZpyh.js} +3 -3
  3. package/dist/Dialog.module-W7UCXlf3.js +29 -0
  4. package/dist/Group-DspH8hyO.js +30 -0
  5. package/dist/Popover.module-B4boCutS.js +10 -0
  6. package/dist/{Popup-lLWZt2wk.js → Popup-Ck3XlWMq.js} +3 -3
  7. package/dist/{Portal-B_Es6eUL.js → Portal-oY3enyAm.js} +2 -2
  8. package/dist/SelectButton-B38avP9u.js +75 -0
  9. package/dist/{Tabs.module-jkH1Qjn7.js → Tabs.module-BGGTkDc5.js} +7 -7
  10. package/dist/Toggle-MfR7l8Wn.js +190 -0
  11. package/dist/assets/Advice.css +1 -1
  12. package/dist/assets/Alert.css +1 -0
  13. package/dist/assets/Autocomplete.css +1 -1
  14. package/dist/assets/Avatar.css +1 -0
  15. package/dist/assets/Button.css +1 -1
  16. package/dist/assets/Checkbox.css +1 -1
  17. package/dist/assets/Description.css +1 -0
  18. package/dist/assets/Dialog.css +1 -1
  19. package/dist/assets/EllipsisTooltip.css +1 -1
  20. package/dist/assets/Group.css +1 -1
  21. package/dist/assets/IconButton.css +1 -1
  22. package/dist/assets/Input.css +1 -1
  23. package/dist/assets/PageHeader.css +1 -1
  24. package/dist/assets/Pagination.css +1 -1
  25. package/dist/assets/Popover.css +1 -0
  26. package/dist/assets/RadioButton.css +1 -0
  27. package/dist/assets/ResultWithChips.css +1 -0
  28. package/dist/assets/SelectButton.css +1 -1
  29. package/dist/assets/Skeleton.css +1 -1
  30. package/dist/assets/Snackbar.css +1 -1
  31. package/dist/assets/SortTooltip.css +1 -1
  32. package/dist/assets/Stepper.css +1 -1
  33. package/dist/assets/StepperNavigator.css +1 -0
  34. package/dist/assets/Table.css +1 -1
  35. package/dist/assets/Tabs.css +1 -1
  36. package/dist/assets/Toggle.css +1 -1
  37. package/dist/assets/Toggle2.css +1 -1
  38. package/dist/assets/Typography.css +1 -1
  39. package/dist/{combineHooksSlotProps-BtBYUV_B.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
  40. package/dist/components/Adornment/Adornment.d.ts +11 -2
  41. package/dist/components/Adornment/Adornment.js +6 -6
  42. package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
  43. package/dist/components/Adornment/adornment.test.d.ts +1 -0
  44. package/dist/components/Advice/Advice.d.ts +32 -17
  45. package/dist/components/Advice/Advice.js +39 -40
  46. package/dist/components/Advice/Advice.stories.d.ts +4 -3
  47. package/dist/components/Alert/Alert.d.ts +11 -0
  48. package/dist/components/Alert/Alert.js +46 -0
  49. package/dist/components/Alert/Alert.stories.d.ts +24 -0
  50. package/dist/components/Alert/Alert.test.d.ts +1 -0
  51. package/dist/components/Autocomplete/Autocomplete.d.ts +12 -42
  52. package/dist/components/Autocomplete/Autocomplete.js +425 -435
  53. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +3 -25
  54. package/dist/components/Avatar/Avatar.d.ts +15 -0
  55. package/dist/components/Avatar/Avatar.js +51 -0
  56. package/dist/components/Avatar/Avatar.stories.d.ts +25 -0
  57. package/dist/components/Button/Button.d.ts +2 -0
  58. package/dist/components/Button/Button.js +51 -49
  59. package/dist/components/Checkbox/Checkbox.js +52 -52
  60. package/dist/components/Chip/Chip.d.ts +6 -4
  61. package/dist/components/Chip/Chip.js +10 -6
  62. package/dist/components/Chip/Chip.stories.d.ts +5 -14
  63. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +14 -0
  64. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +37 -0
  65. package/dist/components/ConfirmationDialog/ConfirmationDialog.stories.d.ts +23 -0
  66. package/dist/components/ConfirmationDialog/ConfirmationModal.test.d.ts +1 -0
  67. package/dist/components/Description/Description.d.ts +21 -0
  68. package/dist/components/Description/Description.js +66 -0
  69. package/dist/components/Description/Description.stories.d.ts +22 -0
  70. package/dist/components/Description/Description.test.d.ts +1 -0
  71. package/dist/components/Dialog/Actions.js +1 -1
  72. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  73. package/dist/components/Dialog/Backdrop.js +8 -7
  74. package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
  75. package/dist/components/Dialog/CloseIconButton.js +15 -18
  76. package/dist/components/Dialog/Dialog.d.ts +16 -10
  77. package/dist/components/Dialog/Dialog.js +167 -167
  78. package/dist/components/Dialog/Dialog.stories.d.ts +74 -68
  79. package/dist/components/Dialog/DialogTitle.d.ts +5 -2
  80. package/dist/components/Dialog/DialogTitle.js +22 -16
  81. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
  82. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -0
  83. package/dist/components/Icon/Icon.js +331 -51
  84. package/dist/components/Icon/types.d.ts +1 -1
  85. package/dist/components/IconButton/IconButton.js +42 -42
  86. package/dist/components/Input/Input.d.ts +26 -5
  87. package/dist/components/Input/Input.js +514 -102
  88. package/dist/components/Input/Input.stories.d.ts +2 -21
  89. package/dist/components/InputSearch/InputSearch.d.ts +37 -7
  90. package/dist/components/InputSearch/InputSearch.js +27 -29
  91. package/dist/components/InputSearch/InputSearch.stories.d.ts +15 -3
  92. package/dist/components/PageHeader/PageHeader.d.ts +6 -2
  93. package/dist/components/PageHeader/PageHeader.js +78 -71
  94. package/dist/components/PageHeader/PageHeader.stories.d.ts +3 -1
  95. package/dist/components/PageHeader/PageHeader.test.d.ts +1 -0
  96. package/dist/components/Pagination/Pagination.d.ts +5 -1
  97. package/dist/components/Pagination/Pagination.js +90 -91
  98. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  99. package/dist/components/Popover/Popover.d.ts +32 -0
  100. package/dist/components/Popover/Popover.js +24 -0
  101. package/dist/components/Popover/Popover.stories.d.ts +34 -0
  102. package/dist/components/Popover/PopoverBody.d.ts +6 -0
  103. package/dist/components/Popover/PopoverBody.js +6 -0
  104. package/dist/components/Popover/PopoverFooter.d.ts +6 -0
  105. package/dist/components/Popover/PopoverFooter.js +6 -0
  106. package/dist/components/Popover/PopoverHeader.d.ts +6 -0
  107. package/dist/components/Popover/PopoverHeader.js +6 -0
  108. package/dist/components/RadioButton/RadioButton.d.ts +19 -0
  109. package/dist/components/RadioButton/RadioButton.js +37 -0
  110. package/dist/components/RadioButton/RadioButton.stories.d.ts +24 -0
  111. package/dist/components/RadioButton/RadioButton.test.d.ts +1 -0
  112. package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
  113. package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
  114. package/dist/components/RowItem/RowItem.d.ts +2 -2
  115. package/dist/components/RowItem/RowItem.js +9 -5
  116. package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
  117. package/dist/components/RowItem/rowItem.test.d.ts +1 -0
  118. package/dist/components/Select/Select.d.ts +22 -0
  119. package/dist/components/Select/Select.js +476 -414
  120. package/dist/components/Select/SelectButton.d.ts +2 -0
  121. package/dist/components/Select/SelectButton.js +3 -2
  122. package/dist/components/Skeleton/Skeleton.d.ts +3 -1
  123. package/dist/components/Skeleton/Skeleton.js +20 -14
  124. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  125. package/dist/components/Snackbar/Snackbar.js +123 -138
  126. package/dist/components/SortTooltip/SortTooltip.js +46 -46
  127. package/dist/components/Stepper/Stepper.js +35 -35
  128. package/dist/components/StepperNavigator/StepperNavigator.d.ts +58 -0
  129. package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
  130. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -0
  131. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
  132. package/dist/components/Table/Table.d.ts +3 -1
  133. package/dist/components/Table/Table.js +87 -99
  134. package/dist/components/Table/Table.stories.d.ts +1 -1
  135. package/dist/components/Tabs/Tab.d.ts +5 -3
  136. package/dist/components/Tabs/Tab.js +36 -35
  137. package/dist/components/Tabs/TabPanel.d.ts +4 -2
  138. package/dist/components/Tabs/TabPanel.js +48 -38
  139. package/dist/components/Tabs/Tabs.d.ts +6 -4
  140. package/dist/components/Tabs/Tabs.js +115 -112
  141. package/dist/components/TextDisplay/TextDisplay.d.ts +7 -3
  142. package/dist/components/TextDisplay/TextDisplay.js +44 -37
  143. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
  144. package/dist/components/Toggle/Toggle.js +55 -55
  145. package/dist/components/ToggleGroup/Group.d.ts +2 -0
  146. package/dist/components/ToggleGroup/Group.js +4 -2
  147. package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
  148. package/dist/components/ToggleGroup/Toggle.js +8 -4
  149. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  150. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +2 -0
  151. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  152. package/dist/components/Tooltip/Tooltip.js +4 -4
  153. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
  154. package/dist/components/Typography/Typography.js +47 -47
  155. package/dist/contexts/SnackbarProvider/SnackbarProvider.d.ts +2 -2
  156. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +35 -30
  157. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
  158. package/dist/{index-D3Wj0eid.js → index-bQFToy-I.js} +1 -1
  159. package/dist/main.d.ts +8 -0
  160. package/dist/main.js +95 -79
  161. package/dist/marola.css +1 -1
  162. package/dist/{ownerDocument-B61GUaFs.js → ownerDocument-YGhwAnr1.js} +1 -1
  163. package/dist/test-utils/assertStyles.d.ts +1 -1
  164. package/dist/{useButton-Bn3MNH8I.js → useButton-DcihopJG.js} +1 -1
  165. package/dist/{useList-BpJT77u3.js → useList-B9C55YB7.js} +2 -2
  166. package/dist/{useSlotProps-kRhf7Gil.js → useSlotProps-C_I1kEHr.js} +73 -72
  167. package/package.json +22 -13
  168. package/dist/Dialog.module-DFEmFdYT.js +0 -30
  169. package/dist/Group-B3p31ftp.js +0 -26
  170. package/dist/Input.module-iOYlI_1w.js +0 -405
  171. package/dist/SelectButton-K3OIfR5m.js +0 -61
  172. package/dist/Toggle-BSvvbKBp.js +0 -175
@@ -1,53 +1,39 @@
1
1
  import '../../assets/Table.css';
2
- import { jsxs as b, jsx as a } from "react/jsx-runtime";
3
- import * as h from "react";
4
- import { useState as w } from "react";
5
- import { c as g } from "../../clsx-DB4S2d7J.js";
6
- import { paginationDefaultTranslations as y, Pagination as T } from "../Pagination/Pagination.js";
7
- import { sortTooltipDefaultTranslations as u, SortTooltip as f } from "../SortTooltip/SortTooltip.js";
2
+ import { jsxs as y, jsx as l } from "react/jsx-runtime";
3
+ import * as c from "react";
4
+ import { useState as f } from "react";
5
+ import { c as m } from "../../clsx-DB4S2d7J.js";
6
+ import { paginationDefaultTranslations as b, Pagination as u } from "../Pagination/Pagination.js";
7
+ import { sortTooltipDefaultTranslations as T, SortTooltip as g } from "../SortTooltip/SortTooltip.js";
8
8
  import { TableProvider as N, useTable as x } from "./TableContext.js";
9
- const C = (p) => /* @__PURE__ */ h.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...p }, /* @__PURE__ */ h.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ h.createElement("path", { d: "M6.41658 3.93794C6.26731 3.93794 6.11798 3.88301 6.00423 3.77314L3.49991 1.35923L0.995768 3.77271C0.767904 3.99243 0.398763 3.99243 0.170898 3.77271C-0.0569661 3.55298 -0.0569661 3.19702 0.170898 2.97729L3.08756 0.164795C3.31543 -0.0549316 3.68457 -0.0549316 3.91243 0.164795L6.8291 2.97729C7.05697 3.19702 7.05697 3.55298 6.8291 3.77271C6.71553 3.88345 6.56605 3.93794 6.41658 3.93794Z", fill: "#1897F3" }), /* @__PURE__ */ h.createElement("path", { opacity: 0.4, d: "M6.41663 5.38022C6.26737 5.38022 6.11804 5.43516 6.00429 5.54502L3.49997 7.95894L0.99528 5.5437C0.767415 5.32397 0.398275 5.32397 0.17041 5.5437C-0.0574544 5.76343 -0.0574544 6.11938 0.17041 6.33911L3.08708 9.15161C3.31494 9.37134 3.68408 9.37134 3.91195 9.15161L6.82861 6.33911C7.05648 6.11938 7.05648 5.76343 6.82861 5.5437C6.71559 5.43472 6.56611 5.38022 6.41663 5.38022Z", fill: "#1897F3" })), /* @__PURE__ */ h.createElement("defs", null, /* @__PURE__ */ h.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ h.createElement("rect", { width: 7, height: 10, fill: "white" })))), L = "_table_1gspp_43", E = "_th__wrapper_1gspp_114", k = "_tr_1gspp_130", v = "_td_1gspp_134", t = {
10
- "u-typography-h1": "_u-typography-h1_1gspp_1",
11
- "u-typography-h2": "_u-typography-h2_1gspp_8",
12
- "u-typography-h3": "_u-typography-h3_1gspp_15",
13
- "u-typography-h4": "_u-typography-h4_1gspp_22",
14
- "u-typography-h5": "_u-typography-h5_1gspp_29",
15
- "u-typography-h6": "_u-typography-h6_1gspp_36",
16
- "u-typography-base": "_u-typography-base_1gspp_43",
9
+ const C = (r) => /* @__PURE__ */ c.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ c.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ c.createElement("path", { d: "M6.41658 3.93794C6.26731 3.93794 6.11798 3.88301 6.00423 3.77314L3.49991 1.35923L0.995768 3.77271C0.767904 3.99243 0.398763 3.99243 0.170898 3.77271C-0.0569661 3.55298 -0.0569661 3.19702 0.170898 2.97729L3.08756 0.164795C3.31543 -0.0549316 3.68457 -0.0549316 3.91243 0.164795L6.8291 2.97729C7.05697 3.19702 7.05697 3.55298 6.8291 3.77271C6.71553 3.88345 6.56605 3.93794 6.41658 3.93794Z", fill: "#1897F3" }), /* @__PURE__ */ c.createElement("path", { opacity: 0.4, d: "M6.41663 5.38022C6.26737 5.38022 6.11804 5.43516 6.00429 5.54502L3.49997 7.95894L0.99528 5.5437C0.767415 5.32397 0.398275 5.32397 0.17041 5.5437C-0.0574544 5.76343 -0.0574544 6.11938 0.17041 6.33911L3.08708 9.15161C3.31494 9.37134 3.68408 9.37134 3.91195 9.15161L6.82861 6.33911C7.05648 6.11938 7.05648 5.76343 6.82861 5.5437C6.71559 5.43472 6.56611 5.38022 6.41663 5.38022Z", fill: "#1897F3" })), /* @__PURE__ */ c.createElement("defs", null, /* @__PURE__ */ c.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ c.createElement("rect", { width: 7, height: 10, fill: "white" })))), L = "_table_yerpo_1", E = "_th__wrapper_yerpo_43", v = "_tr_yerpo_66", B = "_td_yerpo_70", t = {
17
10
  table: L,
18
- "u-typography-base--xxl": "_u-typography-base--xxl_1gspp_48",
19
- "u-typography-base--xl": "_u-typography-base--xl_1gspp_52",
20
- "u-typography-base--lg": "_u-typography-base--lg_1gspp_56",
21
- "u-typography-base--sm": "_u-typography-base--sm_1gspp_60",
22
- "u-typography-base--bold": "_u-typography-base--bold_1gspp_64",
23
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1gspp_67",
24
- "u-typography-base--underlined": "_u-typography-base--underlined_1gspp_70",
25
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1gspp_73",
26
- "table--full-width": "_table--full-width_1gspp_81",
27
- "table--white-theme": "_table--white-theme_1gspp_84",
28
- "table--transparent-theme": "_table--transparent-theme_1gspp_87",
29
- "cell--left-alignment": "_cell--left-alignment_1gspp_90",
30
- "cell--center-alignment": "_cell--center-alignment_1gspp_94",
31
- "cell--right-alignment": "_cell--right-alignment_1gspp_98",
11
+ "table--fixed": "_table--fixed_yerpo_5",
12
+ "table--full-width": "_table--full-width_yerpo_8",
13
+ "table--white-theme": "_table--white-theme_yerpo_11",
14
+ "table--transparent-theme": "_table--transparent-theme_yerpo_14",
15
+ "cell--left-alignment": "_cell--left-alignment_yerpo_17",
16
+ "cell--center-alignment": "_cell--center-alignment_yerpo_21",
17
+ "cell--right-alignment": "_cell--right-alignment_yerpo_25",
32
18
  th__wrapper: E,
33
- "th__wrapper--pressed": "_th__wrapper--pressed_1gspp_117",
34
- "th__wrapper--clickable": "_th__wrapper--clickable_1gspp_121",
35
- "th__sort-icon-container": "_th__sort-icon-container_1gspp_124",
36
- "tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_1gspp_130",
37
- tr: k,
38
- td: v,
39
- "tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_1gspp_139",
40
- "td__row-or-cell--clickable": "_td__row-or-cell--clickable_1gspp_140",
41
- "td__row-or-cell--disabled": "_td__row-or-cell--disabled_1gspp_144",
42
- "td-wrapper": "_td-wrapper_1gspp_148"
43
- }, B = {
19
+ "th__wrapper--pressed": "_th__wrapper--pressed_yerpo_48",
20
+ "th__wrapper--clickable": "_th__wrapper--clickable_yerpo_54",
21
+ "th__sort-icon-container": "_th__sort-icon-container_yerpo_57",
22
+ "tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_yerpo_66",
23
+ tr: v,
24
+ td: B,
25
+ "tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_yerpo_76",
26
+ "td__row-or-cell--clickable": "_td__row-or-cell--clickable_yerpo_77",
27
+ "td__row-or-cell--disabled": "_td__row-or-cell--disabled_yerpo_81",
28
+ "td-wrapper": "_td-wrapper_yerpo_85"
29
+ }, H = {
44
30
  pt: {
45
- ...y.pt,
46
- ...u.pt
31
+ ...b.pt,
32
+ ...T.pt
47
33
  },
48
34
  en: {
49
- ...y.en,
50
- ...u.en
35
+ ...b.en,
36
+ ...T.en
51
37
  },
52
38
  // example to add a new language translation
53
39
  es: {
@@ -59,79 +45,81 @@ const C = (p) => /* @__PURE__ */ h.createElement("svg", { width: 7, height: 10,
59
45
  of: "de",
60
46
  results: "resultados"
61
47
  }
62
- }, l = ({
63
- children: p,
48
+ }, o = ({
49
+ children: r,
64
50
  theme: e = "white",
65
- fullWidth: r = !0,
66
- className: o,
67
- paginationProps: s,
68
- language: _,
69
- translations: n,
70
- ...d
51
+ fullWidth: a = !0,
52
+ className: s,
53
+ paginationProps: _,
54
+ isFixed: n,
55
+ language: p,
56
+ translations: w,
57
+ ...i
71
58
  }) => {
72
- const c = g(
59
+ const d = m(
73
60
  t.table,
74
- r ? t["table--full-width"] : "",
61
+ a && t["table--full-width"],
62
+ n && t["table--fixed"],
75
63
  t[`table--${e}-theme`],
76
- o
77
- ), i = _ && B[_] || n;
78
- return /* @__PURE__ */ b(N, { initialTranslations: i, children: [
79
- /* @__PURE__ */ a("table", { ...d, className: c, children: p }),
80
- s && /* @__PURE__ */ a(T, { ...s, t: i })
64
+ s
65
+ ), h = p && H[p] || w;
66
+ return /* @__PURE__ */ y(N, { initialTranslations: h, children: [
67
+ /* @__PURE__ */ l("table", { ...i, className: d, children: r }),
68
+ _ && /* @__PURE__ */ l(u, { ..._, t: h })
81
69
  ] });
82
- }, H = ({ children: p, ...e }) => /* @__PURE__ */ a("thead", { ...e, children: p }), P = ({ children: p, ...e }) => /* @__PURE__ */ a("tbody", { ...e, children: p }), D = ({ children: p, onClick: e, disabled: r, className: o, ...s }) => {
83
- const _ = g(
70
+ }, P = ({ children: r, ...e }) => /* @__PURE__ */ l("thead", { ...e, children: r }), D = ({ children: r, ...e }) => /* @__PURE__ */ l("tbody", { ...e, children: r }), M = ({ children: r, onClick: e, disabled: a, className: s, ..._ }) => {
71
+ const n = m(
84
72
  t.tr,
85
- e && !r ? t["tr__row-or-cell--clickable"] : r ? t["tr__row-or-cell--disabled"] : "",
86
- o
73
+ e && !a ? t["tr__row-or-cell--clickable"] : a ? t["tr__row-or-cell--disabled"] : "",
74
+ s
87
75
  );
88
- return /* @__PURE__ */ a("tr", { ...s, className: _, onClick: () => !r && (e == null ? void 0 : e()), children: p });
89
- }, M = ({ children: p, onClick: e, disabled: r, className: o, align: s = "left", ..._ }) => {
90
- const n = g(
76
+ return /* @__PURE__ */ l("tr", { ..._, className: n, onClick: () => !a && (e == null ? void 0 : e()), children: r });
77
+ }, O = ({ children: r, onClick: e, disabled: a, className: s, align: _ = "left", ...n }) => {
78
+ const p = m(
91
79
  t.td,
92
- e && !r ? t["td__row-or-cell--clickable"] : r ? t["td__row-or-cell--disabled"] : "",
93
- t[`cell--${s}-alignment`],
94
- o
80
+ e && !a ? t["td__row-or-cell--clickable"] : a ? t["td__row-or-cell--disabled"] : "",
81
+ t[`cell--${_}-alignment`],
82
+ s
95
83
  );
96
- return /* @__PURE__ */ a("td", { ..._, className: n, onClick: () => !r && (e == null ? void 0 : e()), children: /* @__PURE__ */ a("span", { className: t["td-wrapper"], children: p }) });
97
- }, O = ({ children: p, onSort: e, sortType: r, className: o, classNameTooltip: s, align: _ = "left", ...n }) => {
98
- const { translations: d } = x(), [c, i] = w(!1), m = g(
84
+ return /* @__PURE__ */ l("td", { ...n, className: p, onClick: () => !a && (e == null ? void 0 : e()), children: /* @__PURE__ */ l("span", { className: t["td-wrapper"], children: r }) });
85
+ }, $ = ({ children: r, onSort: e, sortType: a, className: s, classNameTooltip: _, align: n = "left", ...p }) => {
86
+ const { translations: w } = x(), [i, d] = f(!1), h = m(
99
87
  t.th__wrapper,
100
- c ? t["th__wrapper--pressed"] : "",
88
+ i ? t["th__wrapper--pressed"] : "",
101
89
  e ? t["th__wrapper--clickable"] : "",
102
- o
90
+ s
103
91
  );
104
- return /* @__PURE__ */ a("th", { ...n, className: t[`cell--${_}-alignment`], children: /* @__PURE__ */ a("span", { className: m, onClick: e && (() => i(!c)), children: e ? /* @__PURE__ */ b(
105
- f,
92
+ return /* @__PURE__ */ l("th", { ...p, className: t[`cell--${n}-alignment`], children: /* @__PURE__ */ l("span", { className: h, onClick: e && (() => d(!i)), children: e ? /* @__PURE__ */ y(
93
+ g,
106
94
  {
107
- onClose: () => i(!1),
95
+ onClose: () => d(!1),
108
96
  onSort: e,
109
- show: c,
110
- sortType: r,
111
- className: s,
112
- t: d,
97
+ show: i,
98
+ sortType: a,
99
+ className: _,
100
+ t: w,
113
101
  children: [
114
- /* @__PURE__ */ a("span", { children: p }),
115
- /* @__PURE__ */ a("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ a(C, {}) })
102
+ /* @__PURE__ */ l("span", { children: r }),
103
+ /* @__PURE__ */ l("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ l(C, { width: 12, height: 12 }) })
116
104
  ]
117
105
  }
118
- ) : /* @__PURE__ */ a("span", { children: p }) }) });
106
+ ) : /* @__PURE__ */ l("span", { children: r }) }) });
119
107
  };
120
- l.THead = H;
121
- l.THead.displayName = "Table.THead";
122
- l.TBody = P;
123
- l.TBody.displayName = "Table.TBody";
124
- l.Tr = D;
125
- l.Tr.displayName = "Table.Tr";
126
- l.Td = M;
127
- l.Td.displayName = "Table.Td";
128
- l.Th = O;
129
- l.Th.displayName = "Table.Th";
108
+ o.THead = P;
109
+ o.THead.displayName = "Table.THead";
110
+ o.TBody = D;
111
+ o.TBody.displayName = "Table.TBody";
112
+ o.Tr = M;
113
+ o.Tr.displayName = "Table.Tr";
114
+ o.Td = O;
115
+ o.Td.displayName = "Table.Td";
116
+ o.Th = $;
117
+ o.Th.displayName = "Table.Th";
130
118
  export {
131
- P as TBody,
132
- H as THead,
133
- l as Table,
134
- M as Td,
135
- O as Th,
136
- D as Tr
119
+ D as TBody,
120
+ P as THead,
121
+ o as Table,
122
+ O as Td,
123
+ $ as Th,
124
+ M as Tr
137
125
  };
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react';
3
3
  declare const meta: {
4
4
  title: string;
5
5
  component: {
6
- ({ children, theme, fullWidth, className, paginationProps, language, translations, ...rest }: import('./Table').TableProps): import("react/jsx-runtime").JSX.Element;
6
+ ({ children, theme, fullWidth, className, paginationProps, isFixed, language, translations, ...rest }: import('./Table').TableProps): import("react/jsx-runtime").JSX.Element;
7
7
  THead: import('react').FunctionComponent<import('./Table').ChildrenProps>;
8
8
  TBody: import('react').FunctionComponent<import('./Table').ChildrenProps>;
9
9
  Tr: import('react').FunctionComponent<import('./Table').TrProps>;
@@ -4,11 +4,13 @@ export interface TabProps {
4
4
  /** The value to be showing in the tab */
5
5
  children: ReactNode;
6
6
  /** The value that corresponds to the panel to show.
7
- * e.g. value="1" when this tab is clicked it will show the panel which also has value="1! */
7
+ * e.g. value="1" when this tab is clicked it will show the panel which also has value="1" */
8
8
  value: string | number;
9
9
  /** Disable clicking the tab */
10
10
  disabled?: boolean;
11
- /** data test id */
12
- dataTestId?: string;
11
+ /** CSS classes to be applied on the container element */
12
+ className?: string;
13
+ /** Id to be applied as `data-testid` on the container element */
14
+ 'data-testid'?: string;
13
15
  }
14
16
  export declare const Tab: import('react').ForwardRefExoticComponent<TabProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,12 +1,12 @@
1
1
  import { jsx as N } from "react/jsx-runtime";
2
- import * as f from "react";
2
+ import * as b from "react";
3
3
  import { forwardRef as H, useContext as U, useMemo as j } from "react";
4
4
  import { c as k } from "../../clsx-DB4S2d7J.js";
5
- import { u as B, T as D, s as y } from "../../Tabs.module-jkH1Qjn7.js";
6
- import { g as L, a as W, u as O, f as $, b as d, _ as q, c as z, P as e, d as A, e as G } from "../../useSlotProps-kRhf7Gil.js";
7
- import { u as J, c as K } from "../../combineHooksSlotProps-BtBYUV_B.js";
5
+ import { u as B, T as D, s as y } from "../../Tabs.module-BGGTkDc5.js";
6
+ import { g as L, a as W, u as O, f as $, b as f, _ as q, c as z, P as e, d as A, e as G } from "../../useSlotProps-C_I1kEHr.js";
7
+ import { u as J, c as K } from "../../combineHooksSlotProps-C-zYvfnF.js";
8
8
  import { u as Q } from "../../useId-BW-oWmul.js";
9
- import { u as X } from "../../useButton-Bn3MNH8I.js";
9
+ import { u as X } from "../../useButton-DcihopJG.js";
10
10
  import { u as Y } from "../../useCompoundItem-B7Eo_qZk.js";
11
11
  const E = "Tab";
12
12
  function Z(o) {
@@ -22,27 +22,27 @@ function te(o) {
22
22
  rootRef: s,
23
23
  disabled: n = !1,
24
24
  id: c
25
- } = o, a = f.useRef(null), r = Q(c), {
26
- value: b,
25
+ } = o, r = b.useRef(null), a = Q(c), {
26
+ value: i,
27
27
  selectionFollowsFocus: p,
28
28
  getTabPanelId: m
29
- } = B(), P = f.useMemo(() => ({
29
+ } = B(), P = b.useMemo(() => ({
30
30
  disabled: n,
31
- ref: a,
32
- id: r
33
- }), [n, a, r]), {
31
+ ref: r,
32
+ id: a
33
+ }), [n, r, a]), {
34
34
  id: l,
35
35
  index: R,
36
36
  totalItemCount: g
37
37
  } = Y(t ?? ee, P), {
38
38
  getRootProps: h,
39
39
  highlighted: T,
40
- selected: i
40
+ selected: u
41
41
  } = J({
42
42
  item: l
43
43
  }), {
44
44
  getRootProps: C,
45
- rootRef: u,
45
+ rootRef: d,
46
46
  active: v,
47
47
  focusVisible: I,
48
48
  setFocusVisible: V
@@ -50,15 +50,15 @@ function te(o) {
50
50
  disabled: n,
51
51
  focusableWhenDisabled: !p,
52
52
  type: "button"
53
- }), _ = O(a, s, u), M = l !== void 0 ? m(l) : void 0;
53
+ }), _ = O(r, s, d), M = l !== void 0 ? m(l) : void 0;
54
54
  return {
55
55
  getRootProps: (x = {}) => {
56
56
  const S = $(x), w = K(h, C);
57
- return d({}, x, w(S), {
57
+ return f({}, x, w(S), {
58
58
  role: "tab",
59
59
  "aria-controls": M,
60
- "aria-selected": i,
61
- id: r,
60
+ "aria-selected": u,
61
+ id: a,
62
62
  ref: _
63
63
  });
64
64
  },
@@ -69,7 +69,7 @@ function te(o) {
69
69
  rootRef: _,
70
70
  // the `selected` state isn't set on the server (it relies on effects to be calculated),
71
71
  // so we fall back to checking the `value` prop with the selectedValue from the TabsContext
72
- selected: i || l === b,
72
+ selected: u || l === i,
73
73
  setFocusVisible: V,
74
74
  totalTabsCount: g
75
75
  };
@@ -82,39 +82,39 @@ const oe = ["action", "children", "disabled", "onChange", "onClick", "onFocus",
82
82
  return A({
83
83
  root: ["root", t && "selected", s && "disabled"]
84
84
  }, G(Z));
85
- }, F = /* @__PURE__ */ f.forwardRef(function(t, s) {
85
+ }, F = /* @__PURE__ */ b.forwardRef(function(t, s) {
86
86
  var n;
87
87
  const {
88
88
  children: c,
89
- disabled: a = !1,
90
- slotProps: r = {},
91
- slots: b = {},
89
+ disabled: r = !1,
90
+ slotProps: a = {},
91
+ slots: i = {},
92
92
  value: p
93
- } = t, m = q(t, oe), P = f.useRef(), l = O(P, s), {
93
+ } = t, m = q(t, oe), P = b.useRef(), l = O(P, s), {
94
94
  active: R,
95
95
  highlighted: g,
96
96
  selected: h,
97
97
  getRootProps: T
98
- } = te(d({}, t, {
98
+ } = te(f({}, t, {
99
99
  rootRef: l,
100
100
  value: p
101
- })), i = d({}, t, {
101
+ })), u = f({}, t, {
102
102
  active: R,
103
- disabled: a,
103
+ disabled: r,
104
104
  highlighted: g,
105
105
  selected: h
106
- }), C = se(i), u = (n = b.root) != null ? n : "button", v = z({
107
- elementType: u,
106
+ }), C = se(u), d = (n = i.root) != null ? n : "button", v = z({
107
+ elementType: d,
108
108
  getSlotProps: T,
109
- externalSlotProps: r.root,
109
+ externalSlotProps: a.root,
110
110
  externalForwardedProps: m,
111
111
  additionalProps: {
112
112
  ref: s
113
113
  },
114
- ownerState: i,
114
+ ownerState: u,
115
115
  className: C.root
116
116
  });
117
- return /* @__PURE__ */ N(u, d({}, v, {
117
+ return /* @__PURE__ */ N(d, f({}, v, {
118
118
  children: c
119
119
  }));
120
120
  });
@@ -165,16 +165,17 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
165
165
  value: e.oneOfType([e.number, e.string])
166
166
  });
167
167
  const pe = H(
168
- ({ children: o, value: t, disabled: s, dataTestId: n }, c) => {
169
- const a = U(D), r = j(
168
+ ({ children: o, value: t, disabled: s, className: n, "data-testid": c }, r) => {
169
+ const a = U(D), i = j(
170
170
  () => k(
171
171
  y.tabs__tab,
172
172
  t === (a == null ? void 0 : a.value) && y["tabs__tab--selected"],
173
- s && y["tabs__tab--disabled"]
173
+ s && y["tabs__tab--disabled"],
174
+ n
174
175
  ),
175
176
  [t, a, s]
176
177
  );
177
- return /* @__PURE__ */ N(F, { className: r, disabled: s, value: t, "data-testid": n, ref: c, children: o });
178
+ return /* @__PURE__ */ N(F, { className: i, disabled: s, value: t, "data-testid": c, ref: r, children: o });
178
179
  }
179
180
  );
180
181
  export {
@@ -6,7 +6,9 @@ export interface TabPanelProps {
6
6
  /** The value that identifies which tab is selected.
7
7
  * e.g. value="1" when the tab button with the value="1" is selected this content will show */
8
8
  value: string | number;
9
- /** Test id */
10
- dataTestId?: string;
9
+ /** CSS classes to be applied on the container element */
10
+ className?: string;
11
+ /** Id to be applied as `data-testid` on the container element */
12
+ 'data-testid'?: string;
11
13
  }
12
14
  export declare const TabPanel: import('react').ForwardRefExoticComponent<TabPanelProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,79 +1,80 @@
1
1
  import { jsx as T } from "react/jsx-runtime";
2
2
  import * as P from "react";
3
3
  import { forwardRef as v } from "react";
4
- import { u as y, s as x } from "../../Tabs.module-jkH1Qjn7.js";
5
- import { g as C, a as N, u as _, b, _ as w, c as O, P as o, d as E, e as I } from "../../useSlotProps-kRhf7Gil.js";
6
- import { u as S } from "../../useId-BW-oWmul.js";
7
- import { u as U } from "../../useCompoundItem-B7Eo_qZk.js";
4
+ import { c as y } from "../../clsx-DB4S2d7J.js";
5
+ import { u as x, s as C } from "../../Tabs.module-BGGTkDc5.js";
6
+ import { g as N, a as _, u as w, b, _ as O, c as E, P as o, d as I, e as S } from "../../useSlotProps-C_I1kEHr.js";
7
+ import { u as U } from "../../useId-BW-oWmul.js";
8
+ import { u as j } from "../../useCompoundItem-B7Eo_qZk.js";
8
9
  const h = "TabPanel";
9
- function j(t) {
10
- return C(h, t);
11
- }
12
- N(h, ["root", "hidden"]);
13
10
  function M(t) {
14
- return t.size;
11
+ return N(h, t);
15
12
  }
13
+ _(h, ["root", "hidden"]);
16
14
  function V(t) {
15
+ return t.size;
16
+ }
17
+ function F(t) {
17
18
  const {
18
19
  value: e,
19
20
  id: s,
20
21
  rootRef: n
21
- } = t, i = y();
22
- if (i === null)
22
+ } = t, a = x();
23
+ if (a === null)
23
24
  throw new Error("No TabContext provided");
24
25
  const {
25
26
  value: f,
26
27
  getTabId: m
27
- } = i, r = S(s), a = P.useRef(null), u = _(a, n), c = P.useMemo(() => ({
28
+ } = a, r = U(s), l = P.useRef(null), c = w(l, n), u = P.useMemo(() => ({
28
29
  id: r,
29
- ref: a
30
+ ref: l
30
31
  }), [r]), {
31
- id: l
32
- } = U(e ?? M, c), d = l !== f, p = l !== void 0 ? m(l) : void 0;
32
+ id: d
33
+ } = j(e ?? V, u), i = d !== f, p = d !== void 0 ? m(d) : void 0;
33
34
  return {
34
- hidden: d,
35
+ hidden: i,
35
36
  getRootProps: (g = {}) => b({
36
37
  "aria-labelledby": p ?? void 0,
37
- hidden: d,
38
+ hidden: i,
38
39
  id: r ?? void 0
39
40
  }, g, {
40
- ref: u
41
+ ref: c
41
42
  }),
42
- rootRef: u
43
+ rootRef: c
43
44
  };
44
45
  }
45
- const F = ["children", "value", "slotProps", "slots"], $ = (t) => {
46
+ const $ = ["children", "value", "slotProps", "slots"], k = (t) => {
46
47
  const {
47
48
  hidden: e
48
49
  } = t;
49
- return E({
50
+ return I({
50
51
  root: ["root", e && "hidden"]
51
- }, I(j));
52
+ }, S(M));
52
53
  }, R = /* @__PURE__ */ P.forwardRef(function(e, s) {
53
54
  var n;
54
55
  const {
55
- children: i,
56
+ children: a,
56
57
  slotProps: f = {},
57
58
  slots: m = {}
58
- } = e, r = w(e, F), {
59
- hidden: a,
60
- getRootProps: u
61
- } = V(e), c = b({}, e, {
62
- hidden: a
63
- }), l = $(c), d = (n = m.root) != null ? n : "div", p = O({
64
- elementType: d,
65
- getSlotProps: u,
59
+ } = e, r = O(e, $), {
60
+ hidden: l,
61
+ getRootProps: c
62
+ } = F(e), u = b({}, e, {
63
+ hidden: l
64
+ }), d = k(u), i = (n = m.root) != null ? n : "div", p = E({
65
+ elementType: i,
66
+ getSlotProps: c,
66
67
  externalSlotProps: f.root,
67
68
  externalForwardedProps: r,
68
69
  additionalProps: {
69
70
  role: "tabpanel",
70
71
  ref: s
71
72
  },
72
- ownerState: c,
73
- className: l.root
73
+ ownerState: u,
74
+ className: d.root
74
75
  });
75
- return /* @__PURE__ */ T(d, b({}, p, {
76
- children: !a && i
76
+ return /* @__PURE__ */ T(i, b({}, p, {
77
+ children: !l && a
77
78
  }));
78
79
  });
79
80
  process.env.NODE_ENV !== "production" && (R.propTypes = {
@@ -111,9 +112,18 @@ process.env.NODE_ENV !== "production" && (R.propTypes = {
111
112
  */
112
113
  value: o.oneOfType([o.number, o.string])
113
114
  });
114
- const q = v(
115
- ({ children: t, value: e, dataTestId: s }, n) => /* @__PURE__ */ T(R, { className: x["tabs__tab-panel"], value: e, "data-testid": s, ref: n, children: t })
115
+ const H = v(
116
+ ({ children: t, value: e, className: s, "data-testid": n }, a) => /* @__PURE__ */ T(
117
+ R,
118
+ {
119
+ className: y(C["tabs__tab-panel"], s),
120
+ value: e,
121
+ "data-testid": n,
122
+ ref: a,
123
+ children: t
124
+ }
125
+ )
116
126
  );
117
127
  export {
118
- q as TabPanel
128
+ H as TabPanel
119
129
  };
@@ -4,11 +4,13 @@ export interface TabsProps {
4
4
  /** Should contain `Tab` and `TabPanel` components to be rendered */
5
5
  children?: ReactNode;
6
6
  /** Selected tab */
7
- value?: number | string;
7
+ value?: string | number | null;
8
+ /** CSS classes to be applied on the container element */
9
+ className?: string;
10
+ /** Id to be applied as `data-testid` on the container element */
11
+ 'data-testid'?: string;
8
12
  /** Callback triggered when the user has selected a tab */
9
- onChange?: (tabValue: number | string | null, event?: React.SyntheticEvent<Element, Event> | null) => void;
10
- /** Test id */
11
- dataTestId?: string;
13
+ onChange?: (tabValue: string | number | null, event?: React.SyntheticEvent<Element, Event> | null) => void;
12
14
  }
13
15
  export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLDivElement>>;
14
16
  export * from './Tab';