kdpa-components 1.35.2 → 1.35.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/Accordion/index.d.ts +3 -0
  2. package/dist/Accordion/index.d.ts.map +1 -0
  3. package/dist/Accordion/index.js +481 -0
  4. package/dist/AdvancedList/index.d.ts +2 -0
  5. package/dist/AdvancedList/index.d.ts.map +1 -0
  6. package/dist/AdvancedList/index.js +16751 -0
  7. package/dist/Alert/index.d.ts +5 -0
  8. package/dist/Alert/index.d.ts.map +1 -0
  9. package/dist/Alert/index.js +407 -0
  10. package/dist/ArrowDropDown-76613637.js +35 -0
  11. package/dist/Autocomplete-45ae6737.js +1670 -0
  12. package/dist/Avatar/index.d.ts +3 -0
  13. package/dist/Avatar/index.d.ts.map +1 -0
  14. package/dist/Avatar/index.js +210 -0
  15. package/dist/Badge/index.d.ts +6 -0
  16. package/dist/Badge/index.d.ts.map +1 -0
  17. package/dist/Badge/index.js +69 -0
  18. package/dist/Badge-26e8a2aa.js +392 -0
  19. package/dist/Box-a827334a.js +58 -0
  20. package/dist/Button-b93e890d.js +355 -0
  21. package/dist/ButtonBase-0f9f324d.js +655 -0
  22. package/dist/Buttons/index.d.ts +9 -0
  23. package/dist/Buttons/index.d.ts.map +1 -0
  24. package/dist/Buttons/index.js +83 -0
  25. package/dist/CSSTransition-d0281d1f.js +215 -0
  26. package/dist/Cards/index.d.ts +3 -0
  27. package/dist/Cards/index.d.ts.map +1 -0
  28. package/dist/Cards/index.js +144 -0
  29. package/dist/CheckBox/index.d.ts +3 -0
  30. package/dist/CheckBox/index.d.ts.map +1 -0
  31. package/dist/CheckBox/index.js +32 -0
  32. package/dist/Checkbox-2cb33932.js +199 -0
  33. package/dist/Chip/index.d.ts +3 -0
  34. package/dist/Chip/index.d.ts.map +1 -0
  35. package/dist/Chip/index.js +61 -0
  36. package/dist/Chip-7b1a25ce.js +444 -0
  37. package/dist/CircularProgress-2c55d9ef.js +217 -0
  38. package/dist/Close-ef7a3b6b.js +9 -0
  39. package/dist/CodeEditor/index.d.ts +2 -0
  40. package/dist/CodeEditor/index.d.ts.map +1 -0
  41. package/dist/CodeEditor/index.js +559 -0
  42. package/dist/Collapse/index.d.ts +3 -0
  43. package/dist/Collapse/index.d.ts.map +1 -0
  44. package/dist/Collapse/index.js +23 -0
  45. package/dist/Collapse-4b8b3146.js +299 -0
  46. package/dist/CopyToClipboard/index.d.ts +3 -0
  47. package/dist/CopyToClipboard/index.d.ts.map +1 -0
  48. package/dist/CopyToClipboard/index.js +591 -0
  49. package/dist/Dialog-25ebaee6.js +356 -0
  50. package/dist/Divider/index.d.ts +4 -0
  51. package/dist/Divider/index.d.ts.map +1 -0
  52. package/dist/Divider/index.js +31 -0
  53. package/dist/Divider-cadf67a7.js +231 -0
  54. package/dist/DropZone/index.d.ts +2 -0
  55. package/dist/DropZone/index.d.ts.map +1 -0
  56. package/dist/DropZone/index.js +1348 -0
  57. package/dist/Fade-aabbd0cb.js +163 -0
  58. package/dist/FormControl/index.d.ts +5 -0
  59. package/dist/FormControl/index.d.ts.map +1 -0
  60. package/dist/FormControl/index.js +24 -0
  61. package/dist/FormControl-e7294bde.js +232 -0
  62. package/dist/FormControlLabel-276f1b1e.js +214 -0
  63. package/dist/FullScreenDialog/index.d.ts +3 -0
  64. package/dist/FullScreenDialog/index.d.ts.map +1 -0
  65. package/dist/FullScreenDialog/index.js +42 -0
  66. package/dist/Grid/index.d.ts +3 -0
  67. package/dist/Grid/index.d.ts.map +1 -0
  68. package/dist/Grid/index.js +17 -0
  69. package/dist/Grid-c1f5fe6b.js +486 -0
  70. package/dist/Grow-151a20f6.js +193 -0
  71. package/dist/HTMLElementType-ff213f3c.js +9 -0
  72. package/dist/IconButton-fdbca6d2.js +184 -0
  73. package/dist/Input/index.d.ts +7 -0
  74. package/dist/Input/index.d.ts.map +1 -0
  75. package/dist/Input/index.js +88 -0
  76. package/dist/InputAdornment-3334ace2.js +155 -0
  77. package/dist/KdpaAutoComplete-40e0949e.js +8 -0
  78. package/dist/KdpaCollapse-d9e37824.js +11 -0
  79. package/dist/KdpaFormControl-2d7c1db8.js +6 -0
  80. package/dist/KdpaIconButton-514e0d96.js +23 -0
  81. package/dist/KdpaMenuItem-085f686f.js +36 -0
  82. package/dist/KdpaSecondaryButton-14992523.js +25 -0
  83. package/dist/KeyboardArrowRight-14dbe7d6.js +12 -0
  84. package/dist/LazyDrop/index.d.ts +3 -0
  85. package/dist/LazyDrop/index.d.ts.map +1 -0
  86. package/dist/LazyDrop/index.js +839 -0
  87. package/dist/ListContext-de5072f9.js +7 -0
  88. package/dist/ListItem-2b5c2e20.js +426 -0
  89. package/dist/ListItemText-fcd66149.js +150 -0
  90. package/dist/Loading/KdpaProgress/index.d.ts +3 -0
  91. package/dist/Loading/KdpaProgress/index.d.ts.map +1 -0
  92. package/dist/Loading/KdpaProgress/index.js +56 -0
  93. package/dist/Loading/index.d.ts +6 -0
  94. package/dist/Loading/index.d.ts.map +1 -0
  95. package/dist/Loading/index.js +348 -0
  96. package/dist/MenuItem-cc037c5b.js +240 -0
  97. package/dist/Modal/index.d.ts +2 -0
  98. package/dist/Modal/index.d.ts.map +1 -0
  99. package/dist/Modal/index.js +751 -0
  100. package/dist/Modal-5f23fcfd.js +984 -0
  101. package/dist/PaginationGrid/index.d.ts +3 -0
  102. package/dist/PaginationGrid/index.d.ts.map +1 -0
  103. package/dist/PaginationGrid/index.js +60 -0
  104. package/dist/Paper-aaec61a3.js +163 -0
  105. package/dist/Pickers/index.d.ts +7 -0
  106. package/dist/Pickers/index.d.ts.map +1 -0
  107. package/dist/Pickers/index.js +14408 -0
  108. package/dist/Popper-490e6477.js +490 -0
  109. package/dist/Portal-b4f8657f.js +77 -0
  110. package/dist/Radio/index.d.ts +5 -0
  111. package/dist/Radio/index.d.ts.map +1 -0
  112. package/dist/Radio/index.js +431 -0
  113. package/dist/Segment/index.d.ts +3 -0
  114. package/dist/Segment/index.d.ts.map +1 -0
  115. package/dist/Segment/index.js +84 -0
  116. package/dist/Selects/index.d.ts +7 -0
  117. package/dist/Selects/index.d.ts.map +1 -0
  118. package/dist/Selects/index.js +66 -0
  119. package/dist/SimpleList/index.d.ts +2 -0
  120. package/dist/SimpleList/index.d.ts.map +1 -0
  121. package/dist/SimpleList/index.js +1913 -0
  122. package/dist/Skeleton-263b2beb.js +213 -0
  123. package/dist/Slide-3bc7a346.js +227 -0
  124. package/dist/Slider/index.d.ts +3 -0
  125. package/dist/Slider/index.d.ts.map +1 -0
  126. package/dist/Slider/index.js +1322 -0
  127. package/dist/SweetAlerts/index.d.ts +6 -0
  128. package/dist/SweetAlerts/index.d.ts.map +1 -0
  129. package/dist/SweetAlerts/index.js +1540 -0
  130. package/dist/Switch/index.d.ts +3 -0
  131. package/dist/Switch/index.d.ts.map +1 -0
  132. package/dist/Switch/index.js +39 -0
  133. package/dist/Switch-ef584fc0.js +302 -0
  134. package/dist/SwitchBase-c367ca3c.js +231 -0
  135. package/dist/Tabs/index.d.ts +5 -0
  136. package/dist/Tabs/index.d.ts.map +1 -0
  137. package/dist/Tabs/index.js +63 -0
  138. package/dist/Tabs-9775b0bb.js +1084 -0
  139. package/dist/TextField-b8c731e8.js +4439 -0
  140. package/dist/ThemeProvider/index.d.ts +4 -0
  141. package/dist/ThemeProvider/index.d.ts.map +1 -0
  142. package/dist/ThemeProvider/index.js +294 -0
  143. package/dist/Tooltip-4b1baf1b.js +584 -0
  144. package/dist/Tooltips/index.d.ts +3 -0
  145. package/dist/Tooltips/index.d.ts.map +1 -0
  146. package/dist/Tooltips/index.js +46 -0
  147. package/dist/TransitionGroup-196acb6a.js +185 -0
  148. package/dist/TransitionGroupContext-7435e195.js +10 -0
  149. package/dist/Transitions/index.d.ts +11 -0
  150. package/dist/Transitions/index.d.ts.map +1 -0
  151. package/dist/Transitions/index.js +34 -0
  152. package/dist/Tree/index.d.ts +3 -0
  153. package/dist/Tree/index.d.ts.map +1 -0
  154. package/dist/Tree/index.js +1447 -0
  155. package/dist/TreeSelect/index.d.ts +3 -0
  156. package/dist/TreeSelect/index.d.ts.map +1 -0
  157. package/dist/TreeSelect/index.js +6888 -0
  158. package/dist/Typography/index.d.ts +3 -0
  159. package/dist/Typography/index.d.ts.map +1 -0
  160. package/dist/Typography/index.js +14 -0
  161. package/dist/Typography-dfa51fea.js +176 -0
  162. package/dist/Uploader/index.d.ts +3 -0
  163. package/dist/Uploader/index.d.ts.map +1 -0
  164. package/dist/Uploader/index.js +81 -0
  165. package/dist/Zoom-b84bdc2b.js +163 -0
  166. package/dist/_commonjsHelpers-92157f1b.js +36 -0
  167. package/dist/assertThisInitialized-05701a63.js +8 -0
  168. package/dist/chainPropTypes-004bf492.js +8 -0
  169. package/dist/createChainedFunction-68e2a88d.js +9 -0
  170. package/dist/createSvgIcon-b80a8a41.js +182 -0
  171. package/dist/dividerClasses-99758da7.js +10 -0
  172. package/dist/elementAcceptingRef-803dfd80.js +26 -0
  173. package/dist/elementTypeAcceptingRef-6c34f16b.js +23 -0
  174. package/dist/emotion-is-prop-valid.esm-b7f48706.js +191 -0
  175. package/dist/emotion-memoize.esm-021d0d4e.js +9 -0
  176. package/dist/emotion-react.browser.esm-d563ed65.js +255 -0
  177. package/dist/exactProp-3aaa3ecc.js +13 -0
  178. package/dist/extendSxProp-f7714a31.js +30 -0
  179. package/dist/extends-393586f3.js +22 -0
  180. package/dist/formControlState-9148c46f.js +10 -0
  181. package/dist/hoist-non-react-statics.cjs-ce2f2873.js +236 -0
  182. package/dist/iconBase-800b43ff.js +63 -0
  183. package/dist/identifier-9dfe30d8.js +3320 -0
  184. package/dist/index-116f732f.js +749 -0
  185. package/dist/index-7e2d793d.js +12011 -0
  186. package/dist/index-fa965a10.js +43 -0
  187. package/dist/index.css +1 -1
  188. package/dist/index.d.ts +36 -0
  189. package/dist/index.d.ts.map +1 -0
  190. package/dist/index.esm-b78383d3.js +35 -0
  191. package/dist/isMuiElement-b88a921a.js +7 -0
  192. package/dist/jsx-runtime-944c88e2.js +631 -0
  193. package/dist/kdpaSelect-4ed993c7.js +1 -0
  194. package/dist/listItemTextClasses-d6839c02.js +10 -0
  195. package/dist/ownerDocument-5430cd5b.js +6 -0
  196. package/dist/ownerWindow-e6cc3097.js +20 -0
  197. package/dist/popper-78c6b162.js +1006 -0
  198. package/dist/refType-af1a9f54.js +5 -0
  199. package/dist/setPrototypeOf-98a00546.js +8 -0
  200. package/dist/style.css +1 -0
  201. package/dist/toPropertyKey-e295cd73.js +27 -0
  202. package/dist/types/designerKit/components/GridPanel/PanelWrapper.d.ts +1 -1
  203. package/dist/types/designerKit/components/GridPanel/PanelWrapper.d.ts.map +1 -1
  204. package/dist/types/designerKit/components/Uploader/KdAdvanceFileUploader/DroppedFiles.d.ts.map +1 -1
  205. package/dist/types/designerKit/components/Uploader/KdFileUploader/UploadedItems.d.ts.map +1 -1
  206. package/dist/types/designerKit/utils/typographyHelper.d.ts +1 -2
  207. package/dist/types/designerKit/utils/typographyHelper.d.ts.map +1 -1
  208. package/dist/unsupportedProp-3dbf01f6.js +9 -0
  209. package/dist/useControlled-cc2d41cb.js +31 -0
  210. package/dist/useEventCallback-fe4fd69c.js +16 -0
  211. package/dist/useForkRef-0781dda0.js +15 -0
  212. package/dist/useFormControl-af690c26.js +11 -0
  213. package/dist/useId-e7dff7be.js +19 -0
  214. package/dist/useIsFocusVisible-4693b580.js +68 -0
  215. package/dist/usePreviousProps-c1ae4548.js +10 -0
  216. package/dist/useSlotProps-f238319f.js +74 -0
  217. package/dist/useTheme-014a54ad.js +10 -0
  218. package/dist/useThemeProps-7d04a175.js +513 -0
  219. package/dist/utils-129661c6.js +370 -0
  220. package/package.json +1 -1
  221. package/dist/types/designerKit/components/Alert/Temp.d.ts +0 -3
  222. package/dist/types/designerKit/components/Alert/Temp.d.ts.map +0 -1
  223. package/dist/types/designerKit/components/Form/KdFormField/KdpaFormField.d.ts +0 -12
  224. package/dist/types/designerKit/components/Form/KdFormField/KdpaFormField.d.ts.map +0 -1
  225. package/dist/types/designerKit/components/Tree/useKdTreeHelper.d.ts +0 -5
  226. package/dist/types/designerKit/components/Tree/useKdTreeHelper.d.ts.map +0 -1
  227. package/dist/types/designerKit/components/Uploader/KdAdvanceFileUploader/DroppingFiles.d.ts +0 -9
  228. package/dist/types/designerKit/components/Uploader/KdAdvanceFileUploader/DroppingFiles.d.ts.map +0 -1
  229. package/dist/types/designerKit/components/Uploader/KdUseFileUpload/KdUseFileUpload.d.ts +0 -53
  230. package/dist/types/designerKit/components/Uploader/KdUseFileUpload/KdUseFileUpload.d.ts.map +0 -1
  231. package/dist/types/designerKit/utils/fileUtils.d.ts +0 -19
  232. package/dist/types/designerKit/utils/fileUtils.d.ts.map +0 -1
  233. package/dist/types/designerKit/utils/useTreeHelper.d.ts +0 -17
  234. package/dist/types/designerKit/utils/useTreeHelper.d.ts.map +0 -1
@@ -0,0 +1,1084 @@
1
+ import { _ as f, a as so } from "./extends-393586f3.js";
2
+ import * as u from "react";
3
+ import { g as So, h as jo, P as e } from "./identifier-9dfe30d8.js";
4
+ import { g as vo, s as L, u as yo, c as O, a as xo } from "./useThemeProps-7d04a175.js";
5
+ import { j as v } from "./jsx-runtime-944c88e2.js";
6
+ import { B as zo } from "./ButtonBase-0f9f324d.js";
7
+ import { u as ee } from "./unsupportedProp-3dbf01f6.js";
8
+ import { r as te } from "./emotion-is-prop-valid.esm-b7f48706.js";
9
+ import { u as $o } from "./useTheme-014a54ad.js";
10
+ import { a as le, u as bo } from "./useEventCallback-fe4fd69c.js";
11
+ import { d as mo, o as ko } from "./ownerWindow-e6cc3097.js";
12
+ import { u as no } from "./useSlotProps-f238319f.js";
13
+ import { r as re } from "./refType-af1a9f54.js";
14
+ import { K as ne, a as se } from "./KeyboardArrowRight-14dbe7d6.js";
15
+ import { o as ie } from "./ownerDocument-5430cd5b.js";
16
+ let U;
17
+ function Fo() {
18
+ if (U)
19
+ return U;
20
+ const o = document.createElement("div"), t = document.createElement("div");
21
+ return t.style.width = "10px", t.style.height = "1px", o.appendChild(t), o.dir = "rtl", o.style.fontSize = "14px", o.style.width = "4px", o.style.height = "1px", o.style.position = "absolute", o.style.top = "-1000px", o.style.overflow = "scroll", document.body.appendChild(o), U = "reverse", o.scrollLeft > 0 ? U = "default" : (o.scrollLeft = 1, o.scrollLeft === 0 && (U = "negative")), document.body.removeChild(o), U;
22
+ }
23
+ function Mo(o, t) {
24
+ const n = o.scrollLeft;
25
+ if (t !== "rtl")
26
+ return n;
27
+ switch (Fo()) {
28
+ case "negative":
29
+ return o.scrollWidth - o.clientWidth + n;
30
+ case "reverse":
31
+ return o.scrollWidth - o.clientWidth - n;
32
+ default:
33
+ return n;
34
+ }
35
+ }
36
+ function ae(o) {
37
+ return So("MuiTab", o);
38
+ }
39
+ const ce = vo("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper"]), F = ce, de = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"], ue = (o) => {
40
+ const {
41
+ classes: t,
42
+ textColor: n,
43
+ fullWidth: c,
44
+ wrapped: i,
45
+ icon: d,
46
+ label: m,
47
+ selected: b,
48
+ disabled: p
49
+ } = o, S = {
50
+ root: ["root", d && m && "labelIcon", `textColor${jo(n)}`, c && "fullWidth", i && "wrapped", b && "selected", p && "disabled"],
51
+ iconWrapper: ["iconWrapper"]
52
+ };
53
+ return xo(S, ae, t);
54
+ }, pe = L(zo, {
55
+ name: "MuiTab",
56
+ slot: "Root",
57
+ overridesResolver: (o, t) => {
58
+ const {
59
+ ownerState: n
60
+ } = o;
61
+ return [t.root, n.label && n.icon && t.labelIcon, t[`textColor${jo(n.textColor)}`], n.fullWidth && t.fullWidth, n.wrapped && t.wrapped];
62
+ }
63
+ })(({
64
+ theme: o,
65
+ ownerState: t
66
+ }) => f({}, o.typography.button, {
67
+ maxWidth: 360,
68
+ minWidth: 90,
69
+ position: "relative",
70
+ minHeight: 48,
71
+ flexShrink: 0,
72
+ padding: "12px 16px",
73
+ overflow: "hidden",
74
+ whiteSpace: "normal",
75
+ textAlign: "center"
76
+ }, t.label && {
77
+ flexDirection: t.iconPosition === "top" || t.iconPosition === "bottom" ? "column" : "row"
78
+ }, {
79
+ lineHeight: 1.25
80
+ }, t.icon && t.label && {
81
+ minHeight: 72,
82
+ paddingTop: 9,
83
+ paddingBottom: 9,
84
+ [`& > .${F.iconWrapper}`]: f({}, t.iconPosition === "top" && {
85
+ marginBottom: 6
86
+ }, t.iconPosition === "bottom" && {
87
+ marginTop: 6
88
+ }, t.iconPosition === "start" && {
89
+ marginRight: o.spacing(1)
90
+ }, t.iconPosition === "end" && {
91
+ marginLeft: o.spacing(1)
92
+ })
93
+ }, t.textColor === "inherit" && {
94
+ color: "inherit",
95
+ opacity: 0.6,
96
+ // same opacity as theme.palette.text.secondary
97
+ [`&.${F.selected}`]: {
98
+ opacity: 1
99
+ },
100
+ [`&.${F.disabled}`]: {
101
+ opacity: (o.vars || o).palette.action.disabledOpacity
102
+ }
103
+ }, t.textColor === "primary" && {
104
+ color: (o.vars || o).palette.text.secondary,
105
+ [`&.${F.selected}`]: {
106
+ color: (o.vars || o).palette.primary.main
107
+ },
108
+ [`&.${F.disabled}`]: {
109
+ color: (o.vars || o).palette.text.disabled
110
+ }
111
+ }, t.textColor === "secondary" && {
112
+ color: (o.vars || o).palette.text.secondary,
113
+ [`&.${F.selected}`]: {
114
+ color: (o.vars || o).palette.secondary.main
115
+ },
116
+ [`&.${F.disabled}`]: {
117
+ color: (o.vars || o).palette.text.disabled
118
+ }
119
+ }, t.fullWidth && {
120
+ flexShrink: 1,
121
+ flexGrow: 1,
122
+ flexBasis: 0,
123
+ maxWidth: "none"
124
+ }, t.wrapped && {
125
+ fontSize: o.typography.pxToRem(12)
126
+ })), Lo = /* @__PURE__ */ u.forwardRef(function(t, n) {
127
+ const c = yo({
128
+ props: t,
129
+ name: "MuiTab"
130
+ }), {
131
+ className: i,
132
+ disabled: d = !1,
133
+ disableFocusRipple: m = !1,
134
+ // eslint-disable-next-line react/prop-types
135
+ fullWidth: b,
136
+ icon: p,
137
+ iconPosition: S = "top",
138
+ // eslint-disable-next-line react/prop-types
139
+ indicator: R,
140
+ label: C,
141
+ onChange: g,
142
+ onClick: y,
143
+ onFocus: D,
144
+ // eslint-disable-next-line react/prop-types
145
+ selected: w,
146
+ // eslint-disable-next-line react/prop-types
147
+ selectionFollowsFocus: x,
148
+ // eslint-disable-next-line react/prop-types
149
+ textColor: A = "inherit",
150
+ value: I,
151
+ wrapped: io = !1
152
+ } = c, H = so(c, de), Y = f({}, c, {
153
+ disabled: d,
154
+ disableFocusRipple: m,
155
+ selected: w,
156
+ icon: !!p,
157
+ iconPosition: S,
158
+ label: !!C,
159
+ fullWidth: b,
160
+ textColor: A,
161
+ wrapped: io
162
+ }), _ = ue(Y), j = p && C && /* @__PURE__ */ u.isValidElement(p) ? /* @__PURE__ */ u.cloneElement(p, {
163
+ className: O(_.iconWrapper, p.props.className)
164
+ }) : p, Q = (N) => {
165
+ !w && g && g(N, I), y && y(N);
166
+ }, P = (N) => {
167
+ x && !w && g && g(N, I), D && D(N);
168
+ };
169
+ return /* @__PURE__ */ v.jsxs(pe, f({
170
+ focusRipple: !m,
171
+ className: O(_.root, i),
172
+ ref: n,
173
+ role: "tab",
174
+ "aria-selected": w,
175
+ disabled: d,
176
+ onClick: Q,
177
+ onFocus: P,
178
+ ownerState: Y,
179
+ tabIndex: w ? 0 : -1
180
+ }, H, {
181
+ children: [S === "top" || S === "start" ? /* @__PURE__ */ v.jsxs(u.Fragment, {
182
+ children: [j, C]
183
+ }) : /* @__PURE__ */ v.jsxs(u.Fragment, {
184
+ children: [C, j]
185
+ }), R]
186
+ }));
187
+ });
188
+ process.env.NODE_ENV !== "production" && (Lo.propTypes = {
189
+ // ----------------------------- Warning --------------------------------
190
+ // | These PropTypes are generated from the TypeScript type definitions |
191
+ // | To update them edit the d.ts file and run "yarn proptypes" |
192
+ // ----------------------------------------------------------------------
193
+ /**
194
+ * This prop isn't supported.
195
+ * Use the `component` prop if you need to change the children structure.
196
+ */
197
+ children: ee,
198
+ /**
199
+ * Override or extend the styles applied to the component.
200
+ */
201
+ classes: e.object,
202
+ /**
203
+ * @ignore
204
+ */
205
+ className: e.string,
206
+ /**
207
+ * If `true`, the component is disabled.
208
+ * @default false
209
+ */
210
+ disabled: e.bool,
211
+ /**
212
+ * If `true`, the keyboard focus ripple is disabled.
213
+ * @default false
214
+ */
215
+ disableFocusRipple: e.bool,
216
+ /**
217
+ * If `true`, the ripple effect is disabled.
218
+ *
219
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
220
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
221
+ * @default false
222
+ */
223
+ disableRipple: e.bool,
224
+ /**
225
+ * The icon to display.
226
+ */
227
+ icon: e.oneOfType([e.element, e.string]),
228
+ /**
229
+ * The position of the icon relative to the label.
230
+ * @default 'top'
231
+ */
232
+ iconPosition: e.oneOf(["bottom", "end", "start", "top"]),
233
+ /**
234
+ * The label element.
235
+ */
236
+ label: e.node,
237
+ /**
238
+ * @ignore
239
+ */
240
+ onChange: e.func,
241
+ /**
242
+ * @ignore
243
+ */
244
+ onClick: e.func,
245
+ /**
246
+ * @ignore
247
+ */
248
+ onFocus: e.func,
249
+ /**
250
+ * The system prop that allows defining system overrides as well as additional CSS styles.
251
+ */
252
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
253
+ /**
254
+ * You can provide your own value. Otherwise, we fallback to the child position index.
255
+ */
256
+ value: e.any,
257
+ /**
258
+ * Tab labels appear in a single row.
259
+ * They can use a second line if needed.
260
+ * @default false
261
+ */
262
+ wrapped: e.bool
263
+ });
264
+ const Ye = Lo;
265
+ function fe(o) {
266
+ return (1 + Math.sin(Math.PI * o - Math.PI / 2)) / 2;
267
+ }
268
+ function be(o, t, n, c = {}, i = () => {
269
+ }) {
270
+ const {
271
+ ease: d = fe,
272
+ duration: m = 300
273
+ // standard
274
+ } = c;
275
+ let b = null;
276
+ const p = t[o];
277
+ let S = !1;
278
+ const R = () => {
279
+ S = !0;
280
+ }, C = (g) => {
281
+ if (S) {
282
+ i(new Error("Animation cancelled"));
283
+ return;
284
+ }
285
+ b === null && (b = g);
286
+ const y = Math.min(1, (g - b) / m);
287
+ if (t[o] = d(y) * (n - p) + p, y >= 1) {
288
+ requestAnimationFrame(() => {
289
+ i(null);
290
+ });
291
+ return;
292
+ }
293
+ requestAnimationFrame(C);
294
+ };
295
+ return p === n ? (i(new Error("Element already at target position")), R) : (requestAnimationFrame(C), R);
296
+ }
297
+ const he = ["onChange"], me = {
298
+ width: 99,
299
+ height: 99,
300
+ position: "absolute",
301
+ top: -9999,
302
+ overflow: "scroll"
303
+ };
304
+ function Do(o) {
305
+ const {
306
+ onChange: t
307
+ } = o, n = so(o, he), c = u.useRef(), i = u.useRef(null), d = () => {
308
+ c.current = i.current.offsetHeight - i.current.clientHeight;
309
+ };
310
+ return le(() => {
311
+ const m = mo(() => {
312
+ const p = c.current;
313
+ d(), p !== c.current && t(c.current);
314
+ }), b = ko(i.current);
315
+ return b.addEventListener("resize", m), () => {
316
+ m.clear(), b.removeEventListener("resize", m);
317
+ };
318
+ }, [t]), u.useEffect(() => {
319
+ d(), t(c.current);
320
+ }, [t]), /* @__PURE__ */ v.jsx("div", f({
321
+ style: me,
322
+ ref: i
323
+ }, n));
324
+ }
325
+ process.env.NODE_ENV !== "production" && (Do.propTypes = {
326
+ onChange: e.func.isRequired
327
+ });
328
+ function Se(o) {
329
+ return So("MuiTabScrollButton", o);
330
+ }
331
+ const ve = vo("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]), ye = ve, xe = ["className", "slots", "slotProps", "direction", "orientation", "disabled"], ge = (o) => {
332
+ const {
333
+ classes: t,
334
+ orientation: n,
335
+ disabled: c
336
+ } = o;
337
+ return xo({
338
+ root: ["root", n, c && "disabled"]
339
+ }, Se, t);
340
+ }, Te = L(zo, {
341
+ name: "MuiTabScrollButton",
342
+ slot: "Root",
343
+ overridesResolver: (o, t) => {
344
+ const {
345
+ ownerState: n
346
+ } = o;
347
+ return [t.root, n.orientation && t[n.orientation]];
348
+ }
349
+ })(({
350
+ ownerState: o
351
+ }) => f({
352
+ width: 40,
353
+ flexShrink: 0,
354
+ opacity: 0.8,
355
+ [`&.${ye.disabled}`]: {
356
+ opacity: 0
357
+ }
358
+ }, o.orientation === "vertical" && {
359
+ width: "100%",
360
+ height: 40,
361
+ "& svg": {
362
+ transform: `rotate(${o.isRtl ? -90 : 90}deg)`
363
+ }
364
+ })), Ao = /* @__PURE__ */ u.forwardRef(function(t, n) {
365
+ var c, i;
366
+ const d = yo({
367
+ props: t,
368
+ name: "MuiTabScrollButton"
369
+ }), {
370
+ className: m,
371
+ slots: b = {},
372
+ slotProps: p = {},
373
+ direction: S
374
+ } = d, R = so(d, xe), g = $o().direction === "rtl", y = f({
375
+ isRtl: g
376
+ }, d), D = ge(y), w = (c = b.StartScrollButtonIcon) != null ? c : ne, x = (i = b.EndScrollButtonIcon) != null ? i : se, A = no({
377
+ elementType: w,
378
+ externalSlotProps: p.startScrollButtonIcon,
379
+ additionalProps: {
380
+ fontSize: "small"
381
+ },
382
+ ownerState: y
383
+ }), I = no({
384
+ elementType: x,
385
+ externalSlotProps: p.endScrollButtonIcon,
386
+ additionalProps: {
387
+ fontSize: "small"
388
+ },
389
+ ownerState: y
390
+ });
391
+ return /* @__PURE__ */ v.jsx(Te, f({
392
+ component: "div",
393
+ className: O(D.root, m),
394
+ ref: n,
395
+ role: null,
396
+ ownerState: y,
397
+ tabIndex: null
398
+ }, R, {
399
+ children: S === "left" ? /* @__PURE__ */ v.jsx(w, f({}, A)) : /* @__PURE__ */ v.jsx(x, f({}, I))
400
+ }));
401
+ });
402
+ process.env.NODE_ENV !== "production" && (Ao.propTypes = {
403
+ // ----------------------------- Warning --------------------------------
404
+ // | These PropTypes are generated from the TypeScript type definitions |
405
+ // | To update them edit the d.ts file and run "yarn proptypes" |
406
+ // ----------------------------------------------------------------------
407
+ /**
408
+ * The content of the component.
409
+ */
410
+ children: e.node,
411
+ /**
412
+ * Override or extend the styles applied to the component.
413
+ */
414
+ classes: e.object,
415
+ /**
416
+ * @ignore
417
+ */
418
+ className: e.string,
419
+ /**
420
+ * The direction the button should indicate.
421
+ */
422
+ direction: e.oneOf(["left", "right"]).isRequired,
423
+ /**
424
+ * If `true`, the component is disabled.
425
+ * @default false
426
+ */
427
+ disabled: e.bool,
428
+ /**
429
+ * The component orientation (layout flow direction).
430
+ */
431
+ orientation: e.oneOf(["horizontal", "vertical"]).isRequired,
432
+ /**
433
+ * The extra props for the slot components.
434
+ * You can override the existing props or add new ones.
435
+ * @default {}
436
+ */
437
+ slotProps: e.shape({
438
+ endScrollButtonIcon: e.oneOfType([e.func, e.object]),
439
+ startScrollButtonIcon: e.oneOfType([e.func, e.object])
440
+ }),
441
+ /**
442
+ * The components used for each slot inside.
443
+ * @default {}
444
+ */
445
+ slots: e.shape({
446
+ EndScrollButtonIcon: e.elementType,
447
+ StartScrollButtonIcon: e.elementType
448
+ }),
449
+ /**
450
+ * The system prop that allows defining system overrides as well as additional CSS styles.
451
+ */
452
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
453
+ });
454
+ const Be = Ao;
455
+ function Ce(o) {
456
+ return So("MuiTabs", o);
457
+ }
458
+ const we = vo("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), ho = we, Ee = ["aria-label", "aria-labelledby", "action", "centered", "children", "className", "component", "allowScrollButtonsMobile", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "slots", "slotProps", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant", "visibleScrollbar"], Ro = (o, t) => o === t ? o.firstChild : t && t.nextElementSibling ? t.nextElementSibling : o.firstChild, Po = (o, t) => o === t ? o.lastChild : t && t.previousElementSibling ? t.previousElementSibling : o.lastChild, ro = (o, t, n) => {
459
+ let c = !1, i = n(o, t);
460
+ for (; i; ) {
461
+ if (i === o.firstChild) {
462
+ if (c)
463
+ return;
464
+ c = !0;
465
+ }
466
+ const d = i.disabled || i.getAttribute("aria-disabled") === "true";
467
+ if (!i.hasAttribute("tabindex") || d)
468
+ i = n(o, i);
469
+ else {
470
+ i.focus();
471
+ return;
472
+ }
473
+ }
474
+ }, Ie = (o) => {
475
+ const {
476
+ vertical: t,
477
+ fixed: n,
478
+ hideScrollbar: c,
479
+ scrollableX: i,
480
+ scrollableY: d,
481
+ centered: m,
482
+ scrollButtonsHideMobile: b,
483
+ classes: p
484
+ } = o;
485
+ return xo({
486
+ root: ["root", t && "vertical"],
487
+ scroller: ["scroller", n && "fixed", c && "hideScrollbar", i && "scrollableX", d && "scrollableY"],
488
+ flexContainer: ["flexContainer", t && "flexContainerVertical", m && "centered"],
489
+ indicator: ["indicator"],
490
+ scrollButtons: ["scrollButtons", b && "scrollButtonsHideMobile"],
491
+ scrollableX: [i && "scrollableX"],
492
+ hideScrollbar: [c && "hideScrollbar"]
493
+ }, Ce, p);
494
+ }, Ne = L("div", {
495
+ name: "MuiTabs",
496
+ slot: "Root",
497
+ overridesResolver: (o, t) => {
498
+ const {
499
+ ownerState: n
500
+ } = o;
501
+ return [{
502
+ [`& .${ho.scrollButtons}`]: t.scrollButtons
503
+ }, {
504
+ [`& .${ho.scrollButtons}`]: n.scrollButtonsHideMobile && t.scrollButtonsHideMobile
505
+ }, t.root, n.vertical && t.vertical];
506
+ }
507
+ })(({
508
+ ownerState: o,
509
+ theme: t
510
+ }) => f({
511
+ overflow: "hidden",
512
+ minHeight: 48,
513
+ // Add iOS momentum scrolling for iOS < 13.0
514
+ WebkitOverflowScrolling: "touch",
515
+ display: "flex"
516
+ }, o.vertical && {
517
+ flexDirection: "column"
518
+ }, o.scrollButtonsHideMobile && {
519
+ [`& .${ho.scrollButtons}`]: {
520
+ [t.breakpoints.down("sm")]: {
521
+ display: "none"
522
+ }
523
+ }
524
+ })), Me = L("div", {
525
+ name: "MuiTabs",
526
+ slot: "Scroller",
527
+ overridesResolver: (o, t) => {
528
+ const {
529
+ ownerState: n
530
+ } = o;
531
+ return [t.scroller, n.fixed && t.fixed, n.hideScrollbar && t.hideScrollbar, n.scrollableX && t.scrollableX, n.scrollableY && t.scrollableY];
532
+ }
533
+ })(({
534
+ ownerState: o
535
+ }) => f({
536
+ position: "relative",
537
+ display: "inline-block",
538
+ flex: "1 1 auto",
539
+ whiteSpace: "nowrap"
540
+ }, o.fixed && {
541
+ overflowX: "hidden",
542
+ width: "100%"
543
+ }, o.hideScrollbar && {
544
+ // Hide dimensionless scrollbar on macOS
545
+ scrollbarWidth: "none",
546
+ // Firefox
547
+ "&::-webkit-scrollbar": {
548
+ display: "none"
549
+ // Safari + Chrome
550
+ }
551
+ }, o.scrollableX && {
552
+ overflowX: "auto",
553
+ overflowY: "hidden"
554
+ }, o.scrollableY && {
555
+ overflowY: "auto",
556
+ overflowX: "hidden"
557
+ })), Re = L("div", {
558
+ name: "MuiTabs",
559
+ slot: "FlexContainer",
560
+ overridesResolver: (o, t) => {
561
+ const {
562
+ ownerState: n
563
+ } = o;
564
+ return [t.flexContainer, n.vertical && t.flexContainerVertical, n.centered && t.centered];
565
+ }
566
+ })(({
567
+ ownerState: o
568
+ }) => f({
569
+ display: "flex"
570
+ }, o.vertical && {
571
+ flexDirection: "column"
572
+ }, o.centered && {
573
+ justifyContent: "center"
574
+ })), Pe = L("span", {
575
+ name: "MuiTabs",
576
+ slot: "Indicator",
577
+ overridesResolver: (o, t) => t.indicator
578
+ })(({
579
+ ownerState: o,
580
+ theme: t
581
+ }) => f({
582
+ position: "absolute",
583
+ height: 2,
584
+ bottom: 0,
585
+ width: "100%",
586
+ transition: t.transitions.create()
587
+ }, o.indicatorColor === "primary" && {
588
+ backgroundColor: (t.vars || t).palette.primary.main
589
+ }, o.indicatorColor === "secondary" && {
590
+ backgroundColor: (t.vars || t).palette.secondary.main
591
+ }, o.vertical && {
592
+ height: "100%",
593
+ width: 2,
594
+ right: 0
595
+ })), We = L(Do, {
596
+ name: "MuiTabs",
597
+ slot: "ScrollbarSize"
598
+ })({
599
+ overflowX: "auto",
600
+ overflowY: "hidden",
601
+ // Hide dimensionless scrollbar on macOS
602
+ scrollbarWidth: "none",
603
+ // Firefox
604
+ "&::-webkit-scrollbar": {
605
+ display: "none"
606
+ // Safari + Chrome
607
+ }
608
+ }), Wo = {};
609
+ let Oo = !1;
610
+ const Ho = /* @__PURE__ */ u.forwardRef(function(t, n) {
611
+ const c = yo({
612
+ props: t,
613
+ name: "MuiTabs"
614
+ }), i = $o(), d = i.direction === "rtl", {
615
+ "aria-label": m,
616
+ "aria-labelledby": b,
617
+ action: p,
618
+ centered: S = !1,
619
+ children: R,
620
+ className: C,
621
+ component: g = "div",
622
+ allowScrollButtonsMobile: y = !1,
623
+ indicatorColor: D = "primary",
624
+ onChange: w,
625
+ orientation: x = "horizontal",
626
+ ScrollButtonComponent: A = Be,
627
+ scrollButtons: I = "auto",
628
+ selectionFollowsFocus: io,
629
+ slots: H = {},
630
+ slotProps: Y = {},
631
+ TabIndicatorProps: _ = {},
632
+ TabScrollButtonProps: j = {},
633
+ textColor: Q = "primary",
634
+ value: P,
635
+ variant: N = "standard",
636
+ visibleScrollbar: ao = !1
637
+ } = c, _o = so(c, Ee), M = N === "scrollable", T = x === "vertical", K = T ? "scrollTop" : "scrollLeft", Z = T ? "top" : "left", oo = T ? "bottom" : "right", co = T ? "clientHeight" : "clientWidth", q = T ? "height" : "width", z = f({}, c, {
638
+ component: g,
639
+ allowScrollButtonsMobile: y,
640
+ indicatorColor: D,
641
+ orientation: x,
642
+ vertical: T,
643
+ scrollButtons: I,
644
+ textColor: Q,
645
+ variant: N,
646
+ visibleScrollbar: ao,
647
+ fixed: !M,
648
+ hideScrollbar: M && !ao,
649
+ scrollableX: M && !T,
650
+ scrollableY: M && T,
651
+ centered: S && !M,
652
+ scrollButtonsHideMobile: !y
653
+ }), W = Ie(z), Vo = no({
654
+ elementType: H.StartScrollButtonIcon,
655
+ externalSlotProps: Y.startScrollButtonIcon,
656
+ ownerState: z
657
+ }), Xo = no({
658
+ elementType: H.EndScrollButtonIcon,
659
+ externalSlotProps: Y.endScrollButtonIcon,
660
+ ownerState: z
661
+ });
662
+ process.env.NODE_ENV !== "production" && S && M && console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');
663
+ const [go, Uo] = u.useState(!1), [$, To] = u.useState(Wo), [V, Yo] = u.useState({
664
+ start: !1,
665
+ end: !1
666
+ }), [Bo, Ko] = u.useState({
667
+ overflow: "hidden",
668
+ scrollbarWidth: 0
669
+ }), eo = /* @__PURE__ */ new Map(), E = u.useRef(null), G = u.useRef(null), Co = () => {
670
+ const l = E.current;
671
+ let r;
672
+ if (l) {
673
+ const a = l.getBoundingClientRect();
674
+ r = {
675
+ clientWidth: l.clientWidth,
676
+ scrollLeft: l.scrollLeft,
677
+ scrollTop: l.scrollTop,
678
+ scrollLeftNormalized: Mo(l, i.direction),
679
+ scrollWidth: l.scrollWidth,
680
+ top: a.top,
681
+ bottom: a.bottom,
682
+ left: a.left,
683
+ right: a.right
684
+ };
685
+ }
686
+ let s;
687
+ if (l && P !== !1) {
688
+ const a = G.current.children;
689
+ if (a.length > 0) {
690
+ const h = a[eo.get(P)];
691
+ process.env.NODE_ENV !== "production" && (h || console.error(["MUI: The `value` provided to the Tabs component is invalid.", `None of the Tabs' children match with "${P}".`, eo.keys ? `You can provide one of the following values: ${Array.from(eo.keys()).join(", ")}.` : null].join(`
692
+ `))), s = h ? h.getBoundingClientRect() : null, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && !Oo && s && s.width === 0 && s.height === 0 && // if the whole Tabs component is hidden, don't warn
693
+ r.clientWidth !== 0 && (r = null, console.error(["MUI: The `value` provided to the Tabs component is invalid.", `The Tab with this \`value\` ("${P}") is not part of the document layout.`, "Make sure the tab item is present in the document or that it's not `display: none`."].join(`
694
+ `)), Oo = !0);
695
+ }
696
+ }
697
+ return {
698
+ tabsMeta: r,
699
+ tabMeta: s
700
+ };
701
+ }, J = bo(() => {
702
+ const {
703
+ tabsMeta: l,
704
+ tabMeta: r
705
+ } = Co();
706
+ let s = 0, a;
707
+ if (T)
708
+ a = "top", r && l && (s = r.top - l.top + l.scrollTop);
709
+ else if (a = d ? "right" : "left", r && l) {
710
+ const B = d ? l.scrollLeftNormalized + l.clientWidth - l.scrollWidth : l.scrollLeft;
711
+ s = (d ? -1 : 1) * (r[a] - l[a] + B);
712
+ }
713
+ const h = {
714
+ [a]: s,
715
+ // May be wrong until the font is loaded.
716
+ [q]: r ? r[q] : 0
717
+ };
718
+ if (isNaN($[a]) || isNaN($[q]))
719
+ To(h);
720
+ else {
721
+ const B = Math.abs($[a] - h[a]), X = Math.abs($[q] - h[q]);
722
+ (B >= 1 || X >= 1) && To(h);
723
+ }
724
+ }), uo = (l, {
725
+ animation: r = !0
726
+ } = {}) => {
727
+ r ? be(K, E.current, l, {
728
+ duration: i.transitions.duration.standard
729
+ }) : E.current[K] = l;
730
+ }, wo = (l) => {
731
+ let r = E.current[K];
732
+ T ? r += l : (r += l * (d ? -1 : 1), r *= d && Fo() === "reverse" ? -1 : 1), uo(r);
733
+ }, Eo = () => {
734
+ const l = E.current[co];
735
+ let r = 0;
736
+ const s = Array.from(G.current.children);
737
+ for (let a = 0; a < s.length; a += 1) {
738
+ const h = s[a];
739
+ if (r + h[co] > l) {
740
+ a === 0 && (r = l);
741
+ break;
742
+ }
743
+ r += h[co];
744
+ }
745
+ return r;
746
+ }, qo = () => {
747
+ wo(-1 * Eo());
748
+ }, Go = () => {
749
+ wo(Eo());
750
+ }, Jo = u.useCallback((l) => {
751
+ Ko({
752
+ overflow: null,
753
+ scrollbarWidth: l
754
+ });
755
+ }, []), Qo = () => {
756
+ const l = {};
757
+ l.scrollbarSizeListener = M ? /* @__PURE__ */ v.jsx(We, {
758
+ onChange: Jo,
759
+ className: O(W.scrollableX, W.hideScrollbar)
760
+ }) : null;
761
+ const r = V.start || V.end, s = M && (I === "auto" && r || I === !0);
762
+ return l.scrollButtonStart = s ? /* @__PURE__ */ v.jsx(A, f({
763
+ slots: {
764
+ StartScrollButtonIcon: H.StartScrollButtonIcon
765
+ },
766
+ slotProps: {
767
+ startScrollButtonIcon: Vo
768
+ },
769
+ orientation: x,
770
+ direction: d ? "right" : "left",
771
+ onClick: qo,
772
+ disabled: !V.start
773
+ }, j, {
774
+ className: O(W.scrollButtons, j.className)
775
+ })) : null, l.scrollButtonEnd = s ? /* @__PURE__ */ v.jsx(A, f({
776
+ slots: {
777
+ EndScrollButtonIcon: H.EndScrollButtonIcon
778
+ },
779
+ slotProps: {
780
+ endScrollButtonIcon: Xo
781
+ },
782
+ orientation: x,
783
+ direction: d ? "left" : "right",
784
+ onClick: Go,
785
+ disabled: !V.end
786
+ }, j, {
787
+ className: O(W.scrollButtons, j.className)
788
+ })) : null, l;
789
+ }, Io = bo((l) => {
790
+ const {
791
+ tabsMeta: r,
792
+ tabMeta: s
793
+ } = Co();
794
+ if (!(!s || !r)) {
795
+ if (s[Z] < r[Z]) {
796
+ const a = r[K] + (s[Z] - r[Z]);
797
+ uo(a, {
798
+ animation: l
799
+ });
800
+ } else if (s[oo] > r[oo]) {
801
+ const a = r[K] + (s[oo] - r[oo]);
802
+ uo(a, {
803
+ animation: l
804
+ });
805
+ }
806
+ }
807
+ }), k = bo(() => {
808
+ if (M && I !== !1) {
809
+ const {
810
+ scrollTop: l,
811
+ scrollHeight: r,
812
+ clientHeight: s,
813
+ scrollWidth: a,
814
+ clientWidth: h
815
+ } = E.current;
816
+ let B, X;
817
+ if (T)
818
+ B = l > 1, X = l < r - s - 1;
819
+ else {
820
+ const lo = Mo(E.current, i.direction);
821
+ B = d ? lo < a - h - 1 : lo > 1, X = d ? lo > 1 : lo < a - h - 1;
822
+ }
823
+ (B !== V.start || X !== V.end) && Yo({
824
+ start: B,
825
+ end: X
826
+ });
827
+ }
828
+ });
829
+ u.useEffect(() => {
830
+ const l = mo(() => {
831
+ E.current && (J(), k());
832
+ }), r = ko(E.current);
833
+ r.addEventListener("resize", l);
834
+ let s;
835
+ return typeof ResizeObserver < "u" && (s = new ResizeObserver(l), Array.from(G.current.children).forEach((a) => {
836
+ s.observe(a);
837
+ })), () => {
838
+ l.clear(), r.removeEventListener("resize", l), s && s.disconnect();
839
+ };
840
+ }, [J, k]);
841
+ const po = u.useMemo(() => mo(() => {
842
+ k();
843
+ }), [k]);
844
+ u.useEffect(() => () => {
845
+ po.clear();
846
+ }, [po]), u.useEffect(() => {
847
+ Uo(!0);
848
+ }, []), u.useEffect(() => {
849
+ J(), k();
850
+ }), u.useEffect(() => {
851
+ Io(Wo !== $);
852
+ }, [Io, $]), u.useImperativeHandle(p, () => ({
853
+ updateIndicator: J,
854
+ updateScrollButtons: k
855
+ }), [J, k]);
856
+ const No = /* @__PURE__ */ v.jsx(Pe, f({}, _, {
857
+ className: O(W.indicator, _.className),
858
+ ownerState: z,
859
+ style: f({}, $, _.style)
860
+ }));
861
+ let to = 0;
862
+ const Zo = u.Children.map(R, (l) => {
863
+ if (!/* @__PURE__ */ u.isValidElement(l))
864
+ return null;
865
+ process.env.NODE_ENV !== "production" && te.isFragment(l) && console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
866
+ `));
867
+ const r = l.props.value === void 0 ? to : l.props.value;
868
+ eo.set(r, to);
869
+ const s = r === P;
870
+ return to += 1, /* @__PURE__ */ u.cloneElement(l, f({
871
+ fullWidth: N === "fullWidth",
872
+ indicator: s && !go && No,
873
+ selected: s,
874
+ selectionFollowsFocus: io,
875
+ onChange: w,
876
+ textColor: Q,
877
+ value: r
878
+ }, to === 1 && P === !1 && !l.props.tabIndex ? {
879
+ tabIndex: 0
880
+ } : {}));
881
+ }), oe = (l) => {
882
+ const r = G.current, s = ie(r).activeElement;
883
+ if (s.getAttribute("role") !== "tab")
884
+ return;
885
+ let h = x === "horizontal" ? "ArrowLeft" : "ArrowUp", B = x === "horizontal" ? "ArrowRight" : "ArrowDown";
886
+ switch (x === "horizontal" && d && (h = "ArrowRight", B = "ArrowLeft"), l.key) {
887
+ case h:
888
+ l.preventDefault(), ro(r, s, Po);
889
+ break;
890
+ case B:
891
+ l.preventDefault(), ro(r, s, Ro);
892
+ break;
893
+ case "Home":
894
+ l.preventDefault(), ro(r, null, Ro);
895
+ break;
896
+ case "End":
897
+ l.preventDefault(), ro(r, null, Po);
898
+ break;
899
+ }
900
+ }, fo = Qo();
901
+ return /* @__PURE__ */ v.jsxs(Ne, f({
902
+ className: O(W.root, C),
903
+ ownerState: z,
904
+ ref: n,
905
+ as: g
906
+ }, _o, {
907
+ children: [fo.scrollButtonStart, fo.scrollbarSizeListener, /* @__PURE__ */ v.jsxs(Me, {
908
+ className: W.scroller,
909
+ ownerState: z,
910
+ style: {
911
+ overflow: Bo.overflow,
912
+ [T ? `margin${d ? "Left" : "Right"}` : "marginBottom"]: ao ? void 0 : -Bo.scrollbarWidth
913
+ },
914
+ ref: E,
915
+ onScroll: po,
916
+ children: [/* @__PURE__ */ v.jsx(Re, {
917
+ "aria-label": m,
918
+ "aria-labelledby": b,
919
+ "aria-orientation": x === "vertical" ? "vertical" : null,
920
+ className: W.flexContainer,
921
+ ownerState: z,
922
+ onKeyDown: oe,
923
+ ref: G,
924
+ role: "tablist",
925
+ children: Zo
926
+ }), go && No]
927
+ }), fo.scrollButtonEnd]
928
+ }));
929
+ });
930
+ process.env.NODE_ENV !== "production" && (Ho.propTypes = {
931
+ // ----------------------------- Warning --------------------------------
932
+ // | These PropTypes are generated from the TypeScript type definitions |
933
+ // | To update them edit the d.ts file and run "yarn proptypes" |
934
+ // ----------------------------------------------------------------------
935
+ /**
936
+ * Callback fired when the component mounts.
937
+ * This is useful when you want to trigger an action programmatically.
938
+ * It supports two actions: `updateIndicator()` and `updateScrollButtons()`
939
+ *
940
+ * @param {object} actions This object contains all possible actions
941
+ * that can be triggered programmatically.
942
+ */
943
+ action: re,
944
+ /**
945
+ * If `true`, the scroll buttons aren't forced hidden on mobile.
946
+ * By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
947
+ * @default false
948
+ */
949
+ allowScrollButtonsMobile: e.bool,
950
+ /**
951
+ * The label for the Tabs as a string.
952
+ */
953
+ "aria-label": e.string,
954
+ /**
955
+ * An id or list of ids separated by a space that label the Tabs.
956
+ */
957
+ "aria-labelledby": e.string,
958
+ /**
959
+ * If `true`, the tabs are centered.
960
+ * This prop is intended for large views.
961
+ * @default false
962
+ */
963
+ centered: e.bool,
964
+ /**
965
+ * The content of the component.
966
+ */
967
+ children: e.node,
968
+ /**
969
+ * Override or extend the styles applied to the component.
970
+ */
971
+ classes: e.object,
972
+ /**
973
+ * @ignore
974
+ */
975
+ className: e.string,
976
+ /**
977
+ * The component used for the root node.
978
+ * Either a string to use a HTML element or a component.
979
+ */
980
+ component: e.elementType,
981
+ /**
982
+ * Determines the color of the indicator.
983
+ * @default 'primary'
984
+ */
985
+ indicatorColor: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
986
+ /**
987
+ * Callback fired when the value changes.
988
+ *
989
+ * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
990
+ * @param {any} value We default to the index of the child (number)
991
+ */
992
+ onChange: e.func,
993
+ /**
994
+ * The component orientation (layout flow direction).
995
+ * @default 'horizontal'
996
+ */
997
+ orientation: e.oneOf(["horizontal", "vertical"]),
998
+ /**
999
+ * The component used to render the scroll buttons.
1000
+ * @default TabScrollButton
1001
+ */
1002
+ ScrollButtonComponent: e.elementType,
1003
+ /**
1004
+ * Determine behavior of scroll buttons when tabs are set to scroll:
1005
+ *
1006
+ * - `auto` will only present them when not all the items are visible.
1007
+ * - `true` will always present them.
1008
+ * - `false` will never present them.
1009
+ *
1010
+ * By default the scroll buttons are hidden on mobile.
1011
+ * This behavior can be disabled with `allowScrollButtonsMobile`.
1012
+ * @default 'auto'
1013
+ */
1014
+ scrollButtons: e.oneOf(["auto", !1, !0]),
1015
+ /**
1016
+ * If `true` the selected tab changes on focus. Otherwise it only
1017
+ * changes on activation.
1018
+ */
1019
+ selectionFollowsFocus: e.bool,
1020
+ /**
1021
+ * The extra props for the slot components.
1022
+ * You can override the existing props or add new ones.
1023
+ * @default {}
1024
+ */
1025
+ slotProps: e.shape({
1026
+ endScrollButtonIcon: e.oneOfType([e.func, e.object]),
1027
+ startScrollButtonIcon: e.oneOfType([e.func, e.object])
1028
+ }),
1029
+ /**
1030
+ * The components used for each slot inside.
1031
+ * @default {}
1032
+ */
1033
+ slots: e.shape({
1034
+ EndScrollButtonIcon: e.elementType,
1035
+ StartScrollButtonIcon: e.elementType
1036
+ }),
1037
+ /**
1038
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1039
+ */
1040
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1041
+ /**
1042
+ * Props applied to the tab indicator element.
1043
+ * @default {}
1044
+ */
1045
+ TabIndicatorProps: e.object,
1046
+ /**
1047
+ * Props applied to the [`TabScrollButton`](/material-ui/api/tab-scroll-button/) element.
1048
+ * @default {}
1049
+ */
1050
+ TabScrollButtonProps: e.object,
1051
+ /**
1052
+ * Determines the color of the `Tab`.
1053
+ * @default 'primary'
1054
+ */
1055
+ textColor: e.oneOf(["inherit", "primary", "secondary"]),
1056
+ /**
1057
+ * The value of the currently selected `Tab`.
1058
+ * If you don't want any selected `Tab`, you can set this prop to `false`.
1059
+ */
1060
+ value: e.any,
1061
+ /**
1062
+ * Determines additional display behavior of the tabs:
1063
+ *
1064
+ * - `scrollable` will invoke scrolling properties and allow for horizontally
1065
+ * scrolling (or swiping) of the tab bar.
1066
+ * -`fullWidth` will make the tabs grow to use all the available space,
1067
+ * which should be used for small views, like on mobile.
1068
+ * - `standard` will render the default state.
1069
+ * @default 'standard'
1070
+ */
1071
+ variant: e.oneOf(["fullWidth", "scrollable", "standard"]),
1072
+ /**
1073
+ * If `true`, the scrollbar is visible. It can be useful when displaying
1074
+ * a long vertical list of tabs.
1075
+ * @default false
1076
+ */
1077
+ visibleScrollbar: e.bool
1078
+ });
1079
+ const Ke = Ho;
1080
+ export {
1081
+ Ke as T,
1082
+ Ye as a,
1083
+ ho as t
1084
+ };