@pismo/marola 1.0.0-beta.5 → 1.0.0-beta.50

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 (152) hide show
  1. package/dist/{Button-2b1peDFT.js → Button-BAljjMv3.js} +2 -2
  2. package/dist/{ClickAwayListener-BSW-Nd-y.js → ClickAwayListener-DbEYZpyh.js} +4 -3
  3. package/dist/Dialog.module-D9e4RsKo.js +30 -0
  4. package/dist/Group-DspH8hyO.js +30 -0
  5. package/dist/Popover.module-B4boCutS.js +10 -0
  6. package/dist/{Popup-B6ZSGIEI.js → Popup-Ck3XlWMq.js} +3 -3
  7. package/dist/{Portal-DIeBsWdL.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-CzkXi3_R.js +189 -0
  11. package/dist/assets/Adornment.css +1 -0
  12. package/dist/assets/Advice.css +1 -1
  13. package/dist/assets/Autocomplete.css +1 -0
  14. package/dist/assets/Button.css +1 -1
  15. package/dist/assets/Checkbox.css +1 -1
  16. package/dist/assets/Dialog.css +1 -1
  17. package/dist/assets/EllipsisTooltip.css +1 -1
  18. package/dist/assets/Group.css +1 -1
  19. package/dist/assets/IconButton.css +1 -1
  20. package/dist/assets/Input.css +1 -1
  21. package/dist/assets/PageHeader.css +1 -1
  22. package/dist/assets/Pagination.css +1 -1
  23. package/dist/assets/Popover.css +1 -0
  24. package/dist/assets/ResultWithChips.css +1 -0
  25. package/dist/assets/SelectButton.css +1 -1
  26. package/dist/assets/Skeleton.css +1 -1
  27. package/dist/assets/Snackbar.css +1 -1
  28. package/dist/assets/SortTooltip.css +1 -1
  29. package/dist/assets/Stepper.css +1 -1
  30. package/dist/assets/StepperNavigator.css +1 -0
  31. package/dist/assets/Table.css +1 -1
  32. package/dist/assets/Tabs.css +1 -1
  33. package/dist/assets/TextDisplay.css +1 -1
  34. package/dist/assets/Toggle.css +1 -1
  35. package/dist/assets/Toggle2.css +1 -1
  36. package/dist/assets/Typography.css +1 -1
  37. package/dist/{combineHooksSlotProps-DVjg9PRh.js → combineHooksSlotProps-C-zYvfnF.js} +1 -1
  38. package/dist/components/Adornment/Adornment.d.ts +20 -0
  39. package/dist/components/Adornment/Adornment.js +13 -0
  40. package/dist/components/Adornment/Adornment.stories.d.ts +14 -0
  41. package/dist/components/Adornment/adornment.test.d.ts +1 -0
  42. package/dist/components/Advice/Advice.d.ts +32 -17
  43. package/dist/components/Advice/Advice.js +39 -40
  44. package/dist/components/Advice/Advice.stories.d.ts +4 -3
  45. package/dist/components/Autocomplete/Autocomplete.d.ts +20 -0
  46. package/dist/components/Autocomplete/Autocomplete.js +679 -0
  47. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +23 -0
  48. package/dist/components/Button/Button.d.ts +2 -0
  49. package/dist/components/Button/Button.js +51 -49
  50. package/dist/components/Checkbox/Checkbox.js +52 -52
  51. package/dist/components/Chip/Chip.d.ts +6 -12
  52. package/dist/components/Chip/Chip.js +10 -6
  53. package/dist/components/Chip/Chip.stories.d.ts +6 -15
  54. package/dist/components/Dialog/Actions.js +1 -1
  55. package/dist/components/Dialog/Backdrop.d.ts +3 -3
  56. package/dist/components/Dialog/Backdrop.js +8 -7
  57. package/dist/components/Dialog/CloseIconButton.d.ts +1 -2
  58. package/dist/components/Dialog/CloseIconButton.js +15 -18
  59. package/dist/components/Dialog/Dialog.d.ts +9 -6
  60. package/dist/components/Dialog/Dialog.js +139 -139
  61. package/dist/components/Dialog/Dialog.stories.d.ts +51 -47
  62. package/dist/components/Dialog/DialogTitle.js +1 -1
  63. package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
  64. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +3 -2
  65. package/dist/components/Icon/Icon.js +177 -52
  66. package/dist/components/Icon/types.d.ts +1 -1
  67. package/dist/components/IconButton/IconButton.js +42 -42
  68. package/dist/components/Input/Input.d.ts +24 -5
  69. package/dist/components/Input/Input.js +301 -292
  70. package/dist/components/Input/Input.stories.d.ts +2 -21
  71. package/dist/components/InputSearch/InputSearch.d.ts +36 -7
  72. package/dist/components/InputSearch/InputSearch.js +27 -29
  73. package/dist/components/InputSearch/InputSearch.stories.d.ts +14 -3
  74. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
  75. package/dist/components/PageHeader/PageHeader.js +57 -57
  76. package/dist/components/Pagination/Pagination.d.ts +5 -1
  77. package/dist/components/Pagination/Pagination.js +87 -185
  78. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  79. package/dist/components/Pagination/usePagination.d.ts +90 -0
  80. package/dist/components/Pagination/usePagination.js +79 -0
  81. package/dist/components/Popover/Popover.d.ts +32 -0
  82. package/dist/components/Popover/Popover.js +24 -0
  83. package/dist/components/Popover/Popover.stories.d.ts +34 -0
  84. package/dist/components/Popover/PopoverBody.d.ts +6 -0
  85. package/dist/components/Popover/PopoverBody.js +6 -0
  86. package/dist/components/Popover/PopoverFooter.d.ts +6 -0
  87. package/dist/components/Popover/PopoverFooter.js +6 -0
  88. package/dist/components/Popover/PopoverHeader.d.ts +6 -0
  89. package/dist/components/Popover/PopoverHeader.js +6 -0
  90. package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
  91. package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
  92. package/dist/components/RowItem/RowItem.d.ts +25 -0
  93. package/dist/components/RowItem/RowItem.js +22 -0
  94. package/dist/components/RowItem/RowItem.stories.d.ts +17 -0
  95. package/dist/components/RowItem/rowItem.test.d.ts +1 -0
  96. package/dist/components/Select/Select.d.ts +21 -0
  97. package/dist/components/Select/Select.js +476 -413
  98. package/dist/components/Select/SelectButton.d.ts +2 -0
  99. package/dist/components/Select/SelectButton.js +3 -2
  100. package/dist/components/Skeleton/Skeleton.d.ts +3 -1
  101. package/dist/components/Skeleton/Skeleton.js +20 -14
  102. package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
  103. package/dist/components/Snackbar/Snackbar.js +94 -94
  104. package/dist/components/Snackbar/Snackbar.stories.d.ts +4 -4
  105. package/dist/components/SortTooltip/SortTooltip.js +46 -46
  106. package/dist/components/Stepper/Stepper.js +35 -35
  107. package/dist/components/StepperNavigator/StepperNavigator.d.ts +58 -0
  108. package/dist/components/StepperNavigator/StepperNavigator.js +115 -0
  109. package/dist/components/StepperNavigator/StepperNavigator.stories.d.ts +18 -0
  110. package/dist/components/StepperNavigator/StepperNavigator.test.d.ts +1 -0
  111. package/dist/components/Table/Table.d.ts +3 -1
  112. package/dist/components/Table/Table.js +87 -99
  113. package/dist/components/Table/Table.stories.d.ts +1 -1
  114. package/dist/components/Tabs/Tab.d.ts +5 -3
  115. package/dist/components/Tabs/Tab.js +38 -36
  116. package/dist/components/Tabs/TabPanel.d.ts +4 -2
  117. package/dist/components/Tabs/TabPanel.js +51 -40
  118. package/dist/components/Tabs/Tabs.d.ts +6 -4
  119. package/dist/components/Tabs/Tabs.js +131 -128
  120. package/dist/components/TextDisplay/TextDisplay.d.ts +9 -3
  121. package/dist/components/TextDisplay/TextDisplay.js +45 -31
  122. package/dist/components/TextDisplay/TextDisplay.stories.d.ts +2 -1
  123. package/dist/components/Toggle/Toggle.js +56 -56
  124. package/dist/components/ToggleGroup/Group.d.ts +2 -0
  125. package/dist/components/ToggleGroup/Group.js +4 -2
  126. package/dist/components/ToggleGroup/Toggle.d.ts +2 -0
  127. package/dist/components/ToggleGroup/Toggle.js +8 -5
  128. package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
  129. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +3 -1
  130. package/dist/components/Tooltip/Tooltip.d.ts +3 -1
  131. package/dist/components/Tooltip/Tooltip.js +4 -4
  132. package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -1
  133. package/dist/components/Typography/Typography.js +47 -47
  134. package/dist/components/Typography/Typography.stories.d.ts +1 -1
  135. package/dist/contexts/SnackbarProvider/SnackbarProvider.stories.d.ts +1 -1
  136. package/dist/{index-CjW42-M-.js → index-bQFToy-I.js} +1 -1
  137. package/dist/main.d.ts +6 -0
  138. package/dist/main.js +87 -76
  139. package/dist/ownerDocument-YGhwAnr1.js +33 -0
  140. package/dist/{useButton-DNk3wrQp.js → useButton-DcihopJG.js} +1 -1
  141. package/dist/useCompoundItem-B7Eo_qZk.js +68 -0
  142. package/dist/useEventCallback-BAQJJ3ye.js +14 -0
  143. package/dist/useId-BW-oWmul.js +19 -0
  144. package/dist/{useList-B0hog_3-.js → useList-B9C55YB7.js} +2 -2
  145. package/dist/{index-CH45lKw7.js → useSlotProps-C_I1kEHr.js} +99 -99
  146. package/package.json +21 -12
  147. package/dist/Dialog.module-DFEmFdYT.js +0 -30
  148. package/dist/Group-B3p31ftp.js +0 -26
  149. package/dist/SelectButton-K3OIfR5m.js +0 -61
  150. package/dist/Toggle-BCgIItCc.js +0 -142
  151. package/dist/useCompoundItem-D1iRfg8D.js +0 -84
  152. package/dist/useEventCallback-xTG9piMa.js +0 -45
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "1.0.0-beta.5",
4
+ "version": "1.0.0-beta.50",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -34,22 +34,29 @@
34
34
  "prebuild": "yarn export-files & yarn generate-icon-types",
35
35
  "build": "tsc --p ./tsconfig-build.json && vite build && mv ./dist/assets/marola.css ./dist",
36
36
  "postbuild": "storybook build --disable-telemetry --output-dir build",
37
- "storybook": "storybook dev -p 6006"
37
+ "storybook": "storybook dev -p 6006",
38
+ "prepare": "husky"
38
39
  },
39
40
  "peerDependencies": {
40
41
  "react": "^18.2.0",
41
42
  "react-dom": "^18.2.0"
42
43
  },
43
44
  "devDependencies": {
45
+ "@commitlint/cli": "^19.3.0",
46
+ "@commitlint/config-conventional": "^19.2.2",
44
47
  "@ianvs/prettier-plugin-sort-imports": "^4.2.1",
45
- "@storybook/addon-a11y": "^8.0.8",
46
- "@storybook/addon-essentials": "^8.0.8",
47
- "@storybook/addon-interactions": "^8.0.8",
48
- "@storybook/addon-links": "^8.0.8",
49
- "@storybook/blocks": "^8.0.8",
50
- "@storybook/react": "^8.0.8",
51
- "@storybook/react-vite": "^8.0.8",
52
- "@storybook/test": "^8.0.8",
48
+ "@storybook/addon-a11y": "^8.3.4",
49
+ "@storybook/addon-essentials": "^8.3.4",
50
+ "@storybook/addon-interactions": "^8.3.4",
51
+ "@storybook/addon-links": "^8.3.4",
52
+ "@storybook/blocks": "^8.3.4",
53
+ "@storybook/manager-api": "^8.3.4",
54
+ "@storybook/preview-api": "^8.3.4",
55
+ "@storybook/react": "^8.3.4",
56
+ "@storybook/react-vite": "^8.3.4",
57
+ "@storybook/test": "^8.3.4",
58
+ "@storybook/theming": "^8.3.4",
59
+ "@testing-library/jest-dom": "^6.4.6",
53
60
  "@testing-library/react": "^15.0.5",
54
61
  "@types/node": "^20.12.2",
55
62
  "@types/react": "^18.2.66",
@@ -57,6 +64,7 @@
57
64
  "@typescript-eslint/eslint-plugin": "^7.6.0",
58
65
  "@typescript-eslint/parser": "^7.6.0",
59
66
  "@vitejs/plugin-react": "^4.2.1",
67
+ "@vitest/coverage-v8": "^1.4.0",
60
68
  "clsx": "^2.1.0",
61
69
  "commitlint": "^19.2.1",
62
70
  "cypress": "^13.8.1",
@@ -66,15 +74,16 @@
66
74
  "eslint-plugin-react-hooks": "^4.6.0",
67
75
  "eslint-plugin-react-refresh": "^0.4.6",
68
76
  "eslint-plugin-simple-import-sort": "^12.0.0",
69
- "eslint-plugin-storybook": "^0.8.0",
77
+ "eslint-plugin-storybook": "^0.9.0",
70
78
  "glob": "^10.3.14",
71
79
  "husky": "^9.0.11",
72
80
  "jsdom": "^24.0.0",
81
+ "lint-staged": "^15.2.7",
73
82
  "prettier": "^3.2.5",
74
83
  "react": "^18.2.0",
75
84
  "react-dom": "^18.2.0",
76
85
  "sass": "^1.72.0",
77
- "storybook": "^8.0.8",
86
+ "storybook": "^8.3.4",
78
87
  "stylelint": "^16.3.1",
79
88
  "stylelint-config-recess-order": "^5.0.0",
80
89
  "stylelint-config-standard-scss": "^13.1.0",
@@ -1,30 +0,0 @@
1
- import './assets/Dialog.css';
2
- const _ = "_dialog__subtitle_yi7uo_52", o = "_dialog_yi7uo_52", a = "_dialog__backdrop_yi7uo_87", y = "_dialog__panel_yi7uo_95", i = "_dialog__title_yi7uo_56", p = "_dialog__divider_yi7uo_121", t = "_dialog__actions_yi7uo_134", u = {
3
- "u-typography-h1": "_u-typography-h1_yi7uo_1",
4
- "u-typography-h2": "_u-typography-h2_yi7uo_8",
5
- "u-typography-h3": "_u-typography-h3_yi7uo_15",
6
- "u-typography-h4": "_u-typography-h4_yi7uo_22",
7
- "u-typography-h5": "_u-typography-h5_yi7uo_29",
8
- "u-typography-h6": "_u-typography-h6_yi7uo_36",
9
- "u-typography-base": "_u-typography-base_yi7uo_43",
10
- "u-typography-base--xxl": "_u-typography-base--xxl_yi7uo_48",
11
- "u-typography-base--xl": "_u-typography-base--xl_yi7uo_52",
12
- dialog__subtitle: _,
13
- "u-typography-base--lg": "_u-typography-base--lg_yi7uo_56",
14
- "dialog__title--small": "_dialog__title--small_yi7uo_56",
15
- "u-typography-base--sm": "_u-typography-base--sm_yi7uo_60",
16
- "u-typography-base--bold": "_u-typography-base--bold_yi7uo_64",
17
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_yi7uo_67",
18
- "u-typography-base--underlined": "_u-typography-base--underlined_yi7uo_70",
19
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_yi7uo_73",
20
- dialog: o,
21
- dialog__backdrop: a,
22
- dialog__panel: y,
23
- dialog__title: i,
24
- dialog__divider: p,
25
- "dialog__close-icon": "_dialog__close-icon_yi7uo_125",
26
- dialog__actions: t
27
- };
28
- export {
29
- u as s
30
- };
@@ -1,26 +0,0 @@
1
- import './assets/Group.css';
2
- import { jsxs as g, jsx as t } from "react/jsx-runtime";
3
- import { forwardRef as i } from "react";
4
- import { Icon as n } from "./components/Icon/Icon.js";
5
- const c = "_toggle__input_wlkvp_1", p = "_toggle__label_wlkvp_8", o = {
6
- toggle__input: c,
7
- toggle__label: p,
8
- "toggle__label--selected": "_toggle__label--selected_wlkvp_15",
9
- "toggle-group__fieldset": "_toggle-group__fieldset_wlkvp_20",
10
- "toggle-group__options": "_toggle-group__options_wlkvp_25",
11
- "toggle-group__error": "_toggle-group__error_wlkvp_29"
12
- }, f = i((e, r) => {
13
- const { children: s, legend: l, error: _ } = e, d = e["data-testid"] ? `${e["data-testid"]}-legend` : void 0, a = e["data-testid"] ? `${e["data-testid"]}-error` : void 0;
14
- return /* @__PURE__ */ g("fieldset", { ref: r, "data-testid": e["data-testid"], className: o["toggle-group__fieldset"], children: [
15
- l && /* @__PURE__ */ t("legend", { "data-testid": d, children: l }),
16
- /* @__PURE__ */ t("div", { className: o["toggle-group__options"], children: s }),
17
- _ && /* @__PURE__ */ g("div", { className: o["toggle-group__error"], "data-testid": a, children: [
18
- /* @__PURE__ */ t(n, { icon: "circle-exclamation", size: 24, color: "var(--alert)" }),
19
- _
20
- ] })
21
- ] });
22
- });
23
- export {
24
- f as G,
25
- o as s
26
- };
@@ -1,61 +0,0 @@
1
- import './assets/SelectButton.css';
2
- import { jsxs as l, jsx as _ } from "react/jsx-runtime";
3
- import * as o from "react";
4
- import { forwardRef as u } from "react";
5
- import { c as b } from "./clsx-DB4S2d7J.js";
6
- import { Typography as y } from "./components/Typography/Typography.js";
7
- const g = "_select__listbox__option__text_11qky_64", x = "_select_11qky_64", d = "_select__popup_11qky_80", k = "_select__listbox_11qky_64", q = "_select__listbox__option_11qky_64", m = "_select__listbox__option__icon_11qky_101", w = "_select__list__option__icon_11qky_122", e = {
8
- "u-typography-h1": "_u-typography-h1_11qky_1",
9
- "u-typography-h2": "_u-typography-h2_11qky_8",
10
- "u-typography-h3": "_u-typography-h3_11qky_15",
11
- "u-typography-h4": "_u-typography-h4_11qky_22",
12
- "u-typography-h5": "_u-typography-h5_11qky_29",
13
- "u-typography-h6": "_u-typography-h6_11qky_36",
14
- "u-typography-base": "_u-typography-base_11qky_43",
15
- "u-typography-base--xxl": "_u-typography-base--xxl_11qky_48",
16
- "u-typography-base--xl": "_u-typography-base--xl_11qky_52",
17
- "u-typography-base--lg": "_u-typography-base--lg_11qky_56",
18
- "u-typography-base--sm": "_u-typography-base--sm_11qky_60",
19
- "u-typography-base--bold": "_u-typography-base--bold_11qky_64",
20
- select__listbox__option__text: g,
21
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_11qky_67",
22
- "u-typography-base--underlined": "_u-typography-base--underlined_11qky_70",
23
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_11qky_73",
24
- select: x,
25
- select__popup: d,
26
- select__listbox: k,
27
- select__listbox__option: q,
28
- select__listbox__option__icon: m,
29
- "select__listbox__option--disabled": "_select__listbox__option--disabled_11qky_105",
30
- "select__listbox__option--selected": "_select__listbox__option--selected_11qky_114",
31
- select__list__option__icon: w,
32
- "select-button": "_select-button_11qky_127",
33
- "base-Select-popup": "_base-Select-popup_11qky_145",
34
- "select-button__text": "_select-button__text_11qky_148",
35
- "select-button__icon": "_select-button__icon_11qky_157",
36
- "select-button--active": "_select-button--active_11qky_163"
37
- }, C = (t) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ o.createElement("path", { d: "M2.11104 4.9999C2.36691 4.9999 2.62291 5.09756 2.81791 5.29287L8.11104 10.5843L13.4048 5.29053C13.7954 4.8999 14.4282 4.8999 14.8188 5.29053C15.2095 5.68115 15.2095 6.31396 14.8188 6.70459L8.81885 12.7046C8.42822 13.0952 7.79541 13.0952 7.40479 12.7046L1.40479 6.70459C1.01416 6.31396 1.01416 5.68115 1.40479 5.29053C1.59854 5.09678 1.85479 4.9999 2.11104 4.9999Z", fill: "currentColor" })), f = (t) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ o.createElement("path", { d: "M13.8889 11C13.633 11 13.377 10.9023 13.182 10.707L7.8889 5.41563L2.59515 10.7094C2.20453 11.1 1.57172 11.1 1.18109 10.7094C0.790466 10.3188 0.790466 9.68594 1.18109 9.29532L7.18109 3.29532C7.57172 2.90469 8.20453 2.90469 8.59515 3.29532L14.5952 9.29532C14.9858 9.68594 14.9858 10.3188 14.5952 10.7094C14.4014 10.9031 14.1452 11 13.8889 11Z", fill: "#3F3D4B", fillOpacity: 0.88 })), E = u((t, a) => {
38
- const { children: c, disabled: i, className: n, "data-testid": r, prefix: s, onClick: h } = t, p = t["aria-expanded"];
39
- return /* @__PURE__ */ l(
40
- "button",
41
- {
42
- className: b(n, p ? e["select-button--active"] : "", e["select-button"]),
43
- type: "button",
44
- onClick: h,
45
- disabled: i,
46
- "data-testid": r,
47
- ref: a,
48
- children: [
49
- /* @__PURE__ */ l("span", { className: e["select-button__text"], children: [
50
- s && /* @__PURE__ */ _(y, { children: s }),
51
- /* @__PURE__ */ _(y, { children: c })
52
- ] }),
53
- /* @__PURE__ */ _("span", { className: e["select-button__icon"], children: p ? /* @__PURE__ */ _(f, {}) : /* @__PURE__ */ _(C, {}) })
54
- ]
55
- }
56
- );
57
- });
58
- export {
59
- E as S,
60
- e as s
61
- };
@@ -1,142 +0,0 @@
1
- import './assets/Toggle.css';
2
- import { jsx as p, jsxs as u } from "react/jsx-runtime";
3
- import { forwardRef as d, cloneElement as m } from "react";
4
- import { c as n } from "./clsx-DB4S2d7J.js";
5
- import { Icon as b } from "./components/Icon/Icon.js";
6
- import "./components/Button/Button.js";
7
- import "./components/Dialog/Backdrop.js";
8
- import { Typography as k } from "./components/Typography/Typography.js";
9
- import "./components/IconButton/IconButton.js";
10
- import "./components/Select/Select.js";
11
- import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
12
- import "./components/Table/Table.js";
13
- import "./components/Tabs/Tabs.js";
14
- import { s as h } from "./Group-B3p31ftp.js";
15
- import "./contexts/SnackbarProvider/SnackbarProvider.js";
16
- import { B as x } from "./Button-2b1peDFT.js";
17
- const C = "_chip_ccpk4_60", N = "_chip__adornment_ccpk4_114", v = "_chip__remove_ccpk4_119", s = {
18
- "u-typography-h1": "_u-typography-h1_ccpk4_1",
19
- "u-typography-h2": "_u-typography-h2_ccpk4_8",
20
- "u-typography-h3": "_u-typography-h3_ccpk4_15",
21
- "u-typography-h4": "_u-typography-h4_ccpk4_22",
22
- "u-typography-h5": "_u-typography-h5_ccpk4_29",
23
- "u-typography-h6": "_u-typography-h6_ccpk4_36",
24
- "u-typography-base": "_u-typography-base_ccpk4_43",
25
- "u-typography-base--xxl": "_u-typography-base--xxl_ccpk4_48",
26
- "u-typography-base--xl": "_u-typography-base--xl_ccpk4_52",
27
- "u-typography-base--lg": "_u-typography-base--lg_ccpk4_56",
28
- "u-typography-base--sm": "_u-typography-base--sm_ccpk4_60",
29
- chip: C,
30
- "u-typography-base--bold": "_u-typography-base--bold_ccpk4_64",
31
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_ccpk4_67",
32
- "u-typography-base--underlined": "_u-typography-base--underlined_ccpk4_70",
33
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_ccpk4_73",
34
- "chip--button": "_chip--button_ccpk4_89",
35
- "chip--outlined": "_chip--outlined_ccpk4_102",
36
- "chip--contained": "_chip--contained_ccpk4_108",
37
- chip__adornment: N,
38
- chip__remove: v,
39
- "chip__remove--disabled": "_chip__remove--disabled_ccpk4_130",
40
- "chip-loading": "_chip-loading_ccpk4_134"
41
- }, T = d((a, t) => {
42
- const { children: c, onClickContent: e, disabled: r, className: i, variant: l } = a;
43
- let o = n(
44
- s.chip,
45
- { [s["chip--outlined"]]: l === "outlined" },
46
- { [s["chip--contained"]]: l === "contained" },
47
- i
48
- );
49
- return e ? (o += ` ${s["chip--button"]}`, /* @__PURE__ */ p(
50
- x,
51
- {
52
- onClick: e,
53
- disabled: r,
54
- "data-testid": a["data-testid"],
55
- ref: t,
56
- className: o,
57
- children: c
58
- }
59
- )) : /* @__PURE__ */ p("span", { "data-testid": a["data-testid"], ref: t, className: o, children: c });
60
- }), A = (a) => {
61
- const { icon: t, disabled: c = !1, className: e } = a;
62
- if (t) {
63
- const r = n(s.chip__adornment, e), i = c ? m(t, { color: "rgb(var(--gray-95-rgb), 0.4)" }) : t;
64
- return /* @__PURE__ */ p("span", { className: r, children: i });
65
- }
66
- return null;
67
- }, G = d((a, t) => {
68
- const {
69
- label: c,
70
- className: e,
71
- onClickContent: r,
72
- leftAdornment: i,
73
- loading: l = !1,
74
- disabled: o = !1,
75
- variant: g = "default",
76
- onClickRemove: y
77
- } = a;
78
- return l ? /* @__PURE__ */ p(
79
- f,
80
- {
81
- className: n(s["chip-loading"], a["className-skeleton"]),
82
- "data-testid": a["data-testid-skeleton"]
83
- }
84
- ) : /* @__PURE__ */ u(
85
- T,
86
- {
87
- ref: t,
88
- "data-testid": a["data-testid"],
89
- onClickContent: r,
90
- disabled: o,
91
- className: e,
92
- variant: g,
93
- children: [
94
- i && /* @__PURE__ */ p(A, { ...i, disabled: o }),
95
- c,
96
- y && /* @__PURE__ */ p(
97
- "span",
98
- {
99
- className: n(s.chip__remove, { [s["chip__remove--disabled"]]: o }),
100
- role: "button",
101
- tabIndex: o ? -1 : 0,
102
- "aria-label": "remove",
103
- onClick: (_) => {
104
- _ == null || _.stopPropagation(), _ == null || _.nativeEvent.stopImmediatePropagation(), y();
105
- },
106
- "aria-disabled": o,
107
- children: /* @__PURE__ */ p(b, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
108
- }
109
- )
110
- ]
111
- }
112
- );
113
- }), H = d((a, t) => {
114
- const { text: c, isSelected: e = !1, value: r, onChange: i } = a;
115
- return /* @__PURE__ */ u(
116
- "label",
117
- {
118
- className: n([h.toggle__label], { [h["toggle__label--selected"]]: e }),
119
- "data-testid": a["data-testid"],
120
- children: [
121
- /* @__PURE__ */ p(
122
- "input",
123
- {
124
- className: n([h.toggle__input]),
125
- type: "radio",
126
- ref: t,
127
- value: r.toString(),
128
- onChange: () => i(r),
129
- role: "radio",
130
- checked: e,
131
- "aria-checked": e
132
- }
133
- ),
134
- /* @__PURE__ */ p(k, { bold: !0, children: c })
135
- ]
136
- }
137
- );
138
- });
139
- export {
140
- G as C,
141
- H as T
142
- };
@@ -1,84 +0,0 @@
1
- import * as o from "react";
2
- import { u as g } from "./useEnhancedEffect-CJGo-L3B.js";
3
- let I = 0;
4
- function x(e) {
5
- const [n, t] = o.useState(e), u = e || n;
6
- return o.useEffect(() => {
7
- n == null && (I += 1, t(`mui-${I}`));
8
- }, [n]), u;
9
- }
10
- const p = o.useId;
11
- function y(e) {
12
- if (p !== void 0) {
13
- const n = p();
14
- return e ?? n;
15
- }
16
- return x(e);
17
- }
18
- const b = /* @__PURE__ */ o.createContext(null);
19
- process.env.NODE_ENV !== "production" && (b.displayName = "CompoundComponentContext");
20
- function S(e) {
21
- const n = Array.from(e.keys()).map((t) => {
22
- const u = e.get(t);
23
- return {
24
- key: t,
25
- subitem: u
26
- };
27
- });
28
- return n.sort((t, u) => {
29
- const s = t.subitem.ref.current, r = u.subitem.ref.current;
30
- return s === null || r === null || s === r ? 0 : s.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
31
- }), new Map(n.map((t) => [t.key, t.subitem]));
32
- }
33
- function E() {
34
- const [e, n] = o.useState(/* @__PURE__ */ new Map()), t = o.useRef(/* @__PURE__ */ new Set()), u = o.useCallback(function(a) {
35
- t.current.delete(a), n((m) => {
36
- const c = new Map(m);
37
- return c.delete(a), c;
38
- });
39
- }, []), s = o.useCallback(function(a, m) {
40
- let c;
41
- return typeof a == "function" ? c = a(t.current) : c = a, t.current.add(c), n((C) => {
42
- const l = new Map(C);
43
- return l.set(c, m), l;
44
- }), {
45
- id: c,
46
- deregister: () => u(c)
47
- };
48
- }, [u]), r = o.useMemo(() => S(e), [e]), i = o.useCallback(function(a) {
49
- return Array.from(r.keys()).indexOf(a);
50
- }, [r]);
51
- return {
52
- contextValue: o.useMemo(() => ({
53
- getItemIndex: i,
54
- registerItem: s,
55
- totalSubitemCount: e.size
56
- }), [i, s, e.size]),
57
- subitems: r
58
- };
59
- }
60
- function N(e, n) {
61
- const t = o.useContext(b);
62
- if (t === null)
63
- throw new Error("useCompoundItem must be used within a useCompoundParent");
64
- const {
65
- registerItem: u
66
- } = t, [s, r] = o.useState(typeof e == "function" ? void 0 : e);
67
- return g(() => {
68
- const {
69
- id: i,
70
- deregister: d
71
- } = u(e, n);
72
- return r(i), d;
73
- }, [u, n, e]), {
74
- id: s,
75
- index: s !== void 0 ? t.getItemIndex(s) : -1,
76
- totalItemCount: t.totalSubitemCount
77
- };
78
- }
79
- export {
80
- b as C,
81
- N as a,
82
- E as b,
83
- y as u
84
- };
@@ -1,45 +0,0 @@
1
- import { P as a } from "./index-CH45lKw7.js";
2
- import * as c from "react";
3
- import { u as m } from "./useEnhancedEffect-CJGo-L3B.js";
4
- function s(e, n) {
5
- return process.env.NODE_ENV === "production" ? () => null : function(...o) {
6
- return e(...o) || n(...o);
7
- };
8
- }
9
- function d(e) {
10
- const {
11
- prototype: n = {}
12
- } = e;
13
- return !!n.isReactComponent;
14
- }
15
- function f(e, n, t, o, l) {
16
- const u = e[n], p = l || n;
17
- if (u == null || // When server-side rendering React doesn't warn either.
18
- // This is not an accurate check for SSR.
19
- // This is only in place for Emotion compat.
20
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
21
- typeof window > "u")
22
- return null;
23
- let r;
24
- const i = u.type;
25
- return typeof i == "function" && !d(i) && (r = "Did you accidentally use a plain function component for an element instead?"), r !== void 0 ? new Error(`Invalid ${o} \`${p}\` supplied to \`${t}\`. Expected an element that can hold a ref. ${r} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
26
- }
27
- const y = s(a.element, f);
28
- y.isRequired = s(a.element.isRequired, f);
29
- function E(e) {
30
- return e && e.ownerDocument || document;
31
- }
32
- function h(e) {
33
- const n = c.useRef(e);
34
- return m(() => {
35
- n.current = e;
36
- }), c.useRef((...t) => (
37
- // @ts-expect-error hide `this`
38
- (0, n.current)(...t)
39
- )).current;
40
- }
41
- export {
42
- y as e,
43
- E as o,
44
- h as u
45
- };