@cgi-learning-hub/ui 1.0.0-dev.1721824898 → 1.0.0-dev.1721901545

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 (103) hide show
  1. package/dist/{Box-vGRO-On_.js → Box-BwHGDK_A.js} +10 -10
  2. package/dist/Button-BF7P0rje.js +359 -0
  3. package/dist/Button-BtjHaBJr.cjs +1 -0
  4. package/dist/{ButtonBase-vONl_zxO.js → ButtonBase-CWCHPphi.js} +36 -36
  5. package/dist/{CircularProgress-BDwTzcEn.js → CircularProgress-C_9OsPYJ.js} +17 -17
  6. package/dist/DatePicker-BE1RETq3.cjs +19 -0
  7. package/dist/DatePicker-DXoI-rbr.js +12663 -0
  8. package/dist/DefaultButton-BYqGgydF.cjs +1 -0
  9. package/dist/DefaultButton-CKAvlaVi.js +253 -0
  10. package/dist/{IconButton-Ctm1Peef.js → IconButton-De3-6K2r.js} +7 -7
  11. package/dist/{SearchInput-Clr0qHPm.js → InputAdornment-CdamqNqi.js} +55 -87
  12. package/dist/InputAdornment-UyNuc0Mc.cjs +1 -0
  13. package/dist/{InputBase-Dqfior4W.js → InputBase-DYf00QVg.js} +25 -25
  14. package/dist/Stack-D1lCED40.cjs +1 -0
  15. package/dist/Stack-DIH86N4F.js +172 -0
  16. package/dist/{Tabs-D-RPVuW4.js → Tabs-D1zibo7D.js} +118 -131
  17. package/dist/Tabs-DZDo7UqF.cjs +4 -0
  18. package/dist/{TextInput-BxI4zwrY.js → TextField-BAVYnvQj.js} +411 -414
  19. package/dist/{TextInput-Ba5ly1H9.cjs → TextField-CH-kzN1l.cjs} +11 -11
  20. package/dist/Tooltip-BEg5oYwE.js +7463 -0
  21. package/dist/Tooltip-DppWsdRm.cjs +95 -0
  22. package/dist/{Typography-Cl3kH-A8.js → Typography-CbZkNGSr.js} +11 -11
  23. package/dist/components/Dropzone/Dropzone.cjs.js +1 -1
  24. package/dist/components/Dropzone/Dropzone.es.js +4 -4
  25. package/dist/components/Loader/Loader.es.js +1 -1
  26. package/dist/components/PaperHeader/PaperHeader.cjs.js +1 -1
  27. package/dist/components/PaperHeader/PaperHeader.es.js +2 -2
  28. package/dist/components/PaperHeader/PaperHeader.stories.es.js +2 -2
  29. package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
  30. package/dist/components/buttons/DefaultButton/DefaultButton.es.js +2 -2
  31. package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +2 -2
  32. package/dist/components/buttons/DefaultButton/index.cjs.js +1 -1
  33. package/dist/components/buttons/DefaultButton/index.es.js +1 -1
  34. package/dist/components/buttons/IconButton.stories.es.js +3 -3
  35. package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
  36. package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
  37. package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
  38. package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
  39. package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
  40. package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
  41. package/dist/components/buttons/index.cjs.js +1 -1
  42. package/dist/components/buttons/index.es.js +1 -1
  43. package/dist/components/feedback/QueryError/QueryError.es.js +1 -1
  44. package/dist/components/index.cjs.js +1 -1
  45. package/dist/components/index.d.ts +1 -5
  46. package/dist/components/index.es.js +269 -278
  47. package/dist/components/inputs/PasswordInput/PasswordInput.cjs.js +1 -1
  48. package/dist/components/inputs/PasswordInput/PasswordInput.es.js +18 -16
  49. package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
  50. package/dist/components/inputs/SearchInput/SearchInput.es.js +36 -5
  51. package/dist/components/inputs/SearchInput/SearchInput.stories.cjs.js +1 -1
  52. package/dist/components/inputs/SearchInput/SearchInput.stories.es.js +4 -4
  53. package/dist/components/inputs/SearchInput/index.cjs.js +1 -1
  54. package/dist/components/inputs/SearchInput/index.es.js +2 -2
  55. package/dist/components/inputs/TextInput/TextInput.cjs.js +1 -1
  56. package/dist/components/inputs/TextInput/TextInput.es.js +4 -3
  57. package/dist/components/inputs/TextInput/TextInput.stories.cjs.js +1 -1
  58. package/dist/components/inputs/TextInput/TextInput.stories.es.js +1 -1
  59. package/dist/components/inputs/TextInput/index.cjs.js +1 -1
  60. package/dist/components/inputs/TextInput/index.es.js +2 -2
  61. package/dist/components/inputs/index.cjs.js +1 -1
  62. package/dist/components/inputs/index.es.js +6 -6
  63. package/dist/components/lists/FileList/FileList.es.js +1 -1
  64. package/dist/components/lists/FileList/FileListItem.es.js +6 -6
  65. package/dist/components/lists/TabList.stories.cjs.js +1 -1
  66. package/dist/components/lists/TabList.stories.es.js +16 -15
  67. package/dist/components/pickers/DatePicker/DatePicker.cjs.js +1 -0
  68. package/dist/components/pickers/DatePicker/DatePicker.d.ts +8 -0
  69. package/dist/components/pickers/DatePicker/DatePicker.es.js +6 -0
  70. package/dist/components/pickers/DatePicker/DatePicker.stories.cjs.js +1 -0
  71. package/dist/components/pickers/DatePicker/DatePicker.stories.d.ts +5 -0
  72. package/dist/components/pickers/DatePicker/DatePicker.stories.es.js +16 -0
  73. package/dist/components/pickers/DatePicker/index.cjs.js +1 -0
  74. package/dist/components/pickers/DatePicker/index.d.ts +2 -0
  75. package/dist/components/pickers/DatePicker/index.es.js +4 -0
  76. package/dist/components/pickers/index.cjs.js +1 -0
  77. package/dist/components/pickers/index.d.ts +1 -0
  78. package/dist/components/pickers/index.es.js +4 -0
  79. package/dist/createStyled-CXNF_m2b.js +142 -0
  80. package/dist/createStyled-CcHh6cyo.cjs +1 -0
  81. package/dist/{createSvgIcon-BwGNMrhW.js → createSvgIcon-B6V0jwwg.js} +5 -5
  82. package/dist/{createSvgIcon-Blbo0WDd.js → createSvgIcon-CGvnINlY.js} +15 -15
  83. package/dist/fr-BWMVjh4G.js +307 -0
  84. package/dist/fr-CzL4IYLw.cjs +1 -0
  85. package/dist/{identifier-wKuu0zOr.js → identifier-C_DzvlWx.js} +24 -24
  86. package/dist/index.cjs.js +1 -1
  87. package/dist/index.es.js +270 -279
  88. package/dist/{refType-Bqz8QGtc.js → refType-KXZNSMpq.js} +1 -1
  89. package/dist/{styled-CFCmdTd8.js → styled-DCjqF2JO.js} +29 -29
  90. package/dist/{useTheme-DWyCcDbs.js → useTheme-8G-WLfhQ.js} +7 -7
  91. package/dist/{useTheme-D5vjhuQC.js → useTheme-D2TR379g.js} +1 -1
  92. package/dist/useThemeProps-DhHzyU0Y.cjs +1 -0
  93. package/dist/useThemeProps-DjJkz40D.js +17 -0
  94. package/dist/{useThemeProps-CZSYSmRG.js → useThemeProps-fXKB99fl.js} +2 -2
  95. package/package.json +1 -1
  96. package/dist/DefaultButton-BD1TIeNP.js +0 -604
  97. package/dist/DefaultButton-DV0j1bMY.cjs +0 -1
  98. package/dist/SearchInput-CruiB2CO.cjs +0 -1
  99. package/dist/Stack-CwklSaeG.js +0 -308
  100. package/dist/Stack-v4g12Xre.cjs +0 -1
  101. package/dist/Tabs-CLr003cV.cjs +0 -4
  102. package/dist/TimePicker-DK-Q99ep.js +0 -26252
  103. package/dist/TimePicker-DYEkxpHp.cjs +0 -113
@@ -1,12 +1,12 @@
1
- import { J as ke, P as e, s as ye, _ as d, T as Be, m as Pe, k as Me, t as pe, n as Q, K as He } from "./identifier-wKuu0zOr.js";
1
+ import { K as ke, P as e, _ as ye, m as d, T as Be, v as Pe, w as Me, x as pe, q as Q, L as He } from "./identifier-C_DzvlWx.js";
2
2
  import * as l from "react";
3
- import { d as De, s as be, u as We, c as Ve } from "./styled-CFCmdTd8.js";
3
+ import { d as De, s as be, u as We, c as Ve } from "./styled-DCjqF2JO.js";
4
4
  import { jsx as N, jsxs as X } from "react/jsx-runtime";
5
5
  import { a as ge, u as ee } from "./useForkRef-DwN_Iz9R.js";
6
- import { a as fe, d as _e } from "./ownerWindow-C7EH1lr6.js";
6
+ import { a as fe, d as Le } from "./ownerWindow-C7EH1lr6.js";
7
7
  import { i as me } from "./isHostComponent-kiaBvYVo.js";
8
- import { e as Le, r as je } from "./refType-Bqz8QGtc.js";
9
- import { u as Ue } from "./useTheme-D5vjhuQC.js";
8
+ import { e as _e, r as je } from "./refType-KXZNSMpq.js";
9
+ import { u as Ue } from "./useTheme-D2TR379g.js";
10
10
  function we({
11
11
  styles: o,
12
12
  themeId: n,
@@ -57,7 +57,7 @@ function Ge({
57
57
  return n.reduce((s, i) => (s[i] = o[i], t && typeof o[i] > "u" && (s[i] = t[i]), s), {});
58
58
  }
59
59
  const qe = ["onChange", "maxRows", "minRows", "style", "value"];
60
- function _(o) {
60
+ function L(o) {
61
61
  return parseInt(o, 10) || 0;
62
62
  }
63
63
  const Ye = {
@@ -75,7 +75,7 @@ const Ye = {
75
75
  transform: "translateZ(0)"
76
76
  }
77
77
  };
78
- function Je(o) {
78
+ function Ze(o) {
79
79
  return o == null || Object.keys(o).length === 0 || o.outerHeightStyle === 0 && !o.overflowing;
80
80
  }
81
81
  const ve = /* @__PURE__ */ l.forwardRef(function(n, t) {
@@ -97,7 +97,7 @@ const ve = /* @__PURE__ */ l.forwardRef(function(n, t) {
97
97
  const m = T.current;
98
98
  m.style.width = f.width, m.value = c.value || n.placeholder || "x", m.value.slice(-1) === `
99
99
  ` && (m.value += " ");
100
- const E = f.boxSizing, O = _(f.paddingBottom) + _(f.paddingTop), x = _(f.borderBottomWidth) + _(f.borderTopWidth), S = m.scrollHeight;
100
+ const E = f.boxSizing, O = L(f.paddingBottom) + L(f.paddingTop), x = L(f.borderBottomWidth) + L(f.borderTopWidth), S = m.scrollHeight;
101
101
  m.value = "x";
102
102
  const F = m.scrollHeight;
103
103
  let y = S;
@@ -109,7 +109,7 @@ const ve = /* @__PURE__ */ l.forwardRef(function(n, t) {
109
109
  };
110
110
  }, [i, p, n.placeholder]), C = l.useCallback(() => {
111
111
  const c = v();
112
- if (Je(c))
112
+ if (Ze(c))
113
113
  return;
114
114
  const u = c.outerHeightStyle, f = b.current;
115
115
  g.current !== u && (g.current = u, f.style.height = `${u}px`), f.style.overflow = c.overflowing ? "hidden" : "";
@@ -123,7 +123,7 @@ const ve = /* @__PURE__ */ l.forwardRef(function(n, t) {
123
123
  cancelAnimationFrame(u), u = requestAnimationFrame(() => {
124
124
  c();
125
125
  });
126
- }, m = _e(c), E = b.current, O = fe(E);
126
+ }, m = Le(c), E = b.current, O = fe(E);
127
127
  O.addEventListener("resize", m);
128
128
  let x;
129
129
  return typeof ResizeObserver < "u" && (x = new ResizeObserver(process.env.NODE_ENV === "test" ? f : c), x.observe(E)), () => {
@@ -132,13 +132,13 @@ const ve = /* @__PURE__ */ l.forwardRef(function(n, t) {
132
132
  }, [v, C]), ee(() => {
133
133
  C();
134
134
  });
135
- const L = (c) => {
135
+ const _ = (c) => {
136
136
  R || C(), s && s(c);
137
137
  };
138
138
  return /* @__PURE__ */ X(l.Fragment, {
139
139
  children: [/* @__PURE__ */ N("textarea", d({
140
140
  value: A,
141
- onChange: L,
141
+ onChange: _,
142
142
  ref: I,
143
143
  rows: p,
144
144
  style: z
@@ -206,7 +206,7 @@ process.env.NODE_ENV !== "production" && (Ce.propTypes = {
206
206
  */
207
207
  styles: e.oneOfType([e.array, e.func, e.number, e.object, e.string, e.bool])
208
208
  });
209
- function Ze(o) {
209
+ function Je(o) {
210
210
  return Me("MuiInputBase", o);
211
211
  }
212
212
  const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), Qe = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"], Xe = (o, n) => {
@@ -239,7 +239,7 @@ const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
239
239
  root: ["root", `color${Q(t)}`, s && "disabled", i && "error", B && "fullWidth", z && "focused", A && "formControl", g && g !== "medium" && `size${Q(g)}`, b && "multiline", T && "adornedStart", p && "adornedEnd", R && "hiddenLabel", I && "readOnly"],
240
240
  input: ["input", s && "disabled", v === "search" && "inputTypeSearch", b && "inputMultiline", g === "small" && "inputSizeSmall", R && "inputHiddenLabel", T && "inputAdornedStart", p && "inputAdornedEnd", I && "readOnly"]
241
241
  };
242
- return Ve(C, Ze, n);
242
+ return Ve(C, Je, n);
243
243
  }, no = be("div", {
244
244
  name: "MuiInputBase",
245
245
  slot: "Root",
@@ -398,7 +398,7 @@ const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
398
398
  disableInjectingGlobalStyles: T,
399
399
  endAdornment: v,
400
400
  fullWidth: C = !1,
401
- id: L,
401
+ id: _,
402
402
  inputComponent: c = "input",
403
403
  inputProps: u = {},
404
404
  inputRef: f,
@@ -472,8 +472,8 @@ const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
472
472
  const Ie = (r) => {
473
473
  k.current && r.currentTarget === r.target && k.current.focus(), y && y(r);
474
474
  };
475
- let J = c, w = u;
476
- O && J === "input" && (D ? (process.env.NODE_ENV !== "production" && (E || m) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), w = d({
475
+ let Z = c, w = u;
476
+ O && Z === "input" && (D ? (process.env.NODE_ENV !== "production" && (E || m) && console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."), w = d({
477
477
  type: void 0,
478
478
  minRows: D,
479
479
  maxRows: D
@@ -481,7 +481,7 @@ const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
481
481
  type: void 0,
482
482
  maxRows: m,
483
483
  minRows: E
484
- }, w), J = ve);
484
+ }, w), Z = ve);
485
485
  const Fe = (r) => {
486
486
  M(r.animationName === "mui-auto-fill-cancel" ? k.current : {
487
487
  value: "x"
@@ -503,15 +503,15 @@ const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
503
503
  size: h.size,
504
504
  startAdornment: P,
505
505
  type: ae
506
- }), se = oo(V), le = ie.root || R.Root || no, Z = re.root || b.root || {}, ue = ie.input || R.Input || to;
506
+ }), se = oo(V), le = ie.root || R.Root || no, J = re.root || b.root || {}, ue = ie.input || R.Input || to;
507
507
  return w = d({}, w, (s = re.input) != null ? s : b.input), /* @__PURE__ */ X(l.Fragment, {
508
- children: [!T && ro, /* @__PURE__ */ X(le, d({}, Z, !me(le) && {
509
- ownerState: d({}, V, Z.ownerState)
508
+ children: [!T && ro, /* @__PURE__ */ X(le, d({}, J, !me(le) && {
509
+ ownerState: d({}, V, J.ownerState)
510
510
  }, {
511
511
  ref: t,
512
512
  onClick: Ie
513
513
  }, Te, {
514
- className: pe(se.root, Z.className, B, U && "MuiInputBase-readOnly"),
514
+ className: pe(se.root, J.className, B, U && "MuiInputBase-readOnly"),
515
515
  children: [P, /* @__PURE__ */ N(ne.Provider, {
516
516
  value: null,
517
517
  children: /* @__PURE__ */ N(ue, d({
@@ -522,7 +522,7 @@ const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
522
522
  autoFocus: A,
523
523
  defaultValue: I,
524
524
  disabled: h.disabled,
525
- id: L,
525
+ id: _,
526
526
  onAnimationStart: Fe,
527
527
  name: x,
528
528
  placeholder: Se,
@@ -534,7 +534,7 @@ const oe = Pe("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
534
534
  onKeyUp: xe,
535
535
  type: ae
536
536
  }, w, !me(ue) && {
537
- as: J,
537
+ as: Z,
538
538
  ownerState: d({}, V, w.ownerState)
539
539
  }, {
540
540
  ref: Oe,
@@ -646,7 +646,7 @@ process.env.NODE_ENV !== "production" && (io.propTypes = {
646
646
  * Either a string to use a HTML element or a component.
647
647
  * @default 'input'
648
648
  */
649
- inputComponent: Le,
649
+ inputComponent: _e,
650
650
  /**
651
651
  * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
652
652
  * @default {}
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./identifier-J0ZxxQLU.cjs"),T=require("./styled-C04Dz9vm.cjs"),S=require("react"),V=require("./createStyled-CcHh6cyo.cjs"),D=require("react/jsx-runtime"),C=require("./useThemeProps-CEfrd8SJ.cjs");function N(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const f=N(S),R=V.createStyled(),_=["component","direction","spacing","divider","children","className","useFlexGap"],B=e.createTheme$1(),q=R("div",{name:"MuiStack",slot:"Root",overridesResolver:(o,r)=>r.root});function $(o){return C.useThemeProps({props:o,name:"MuiStack",defaultTheme:B})}function E(o,r){const s=f.Children.toArray(o).filter(Boolean);return s.reduce((n,i,p)=>(n.push(i),p<s.length-1&&n.push(f.cloneElement(r,{key:`separator-${p}`})),n),[])}const F=o=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[o],M=({ownerState:o,theme:r})=>{let s=e._extends({display:"flex",flexDirection:"column"},e.handleBreakpoints({theme:r},e.resolveBreakpointValues({values:o.direction,breakpoints:r.breakpoints.values}),n=>({flexDirection:n})));if(o.spacing){const n=e.createUnarySpacing(r),i=Object.keys(r.breakpoints.values).reduce((t,c)=>((typeof o.spacing=="object"&&o.spacing[c]!=null||typeof o.direction=="object"&&o.direction[c]!=null)&&(t[c]=!0),t),{}),p=e.resolveBreakpointValues({values:o.direction,base:i}),a=e.resolveBreakpointValues({values:o.spacing,base:i});typeof p=="object"&&Object.keys(p).forEach((t,c,u)=>{if(!p[t]){const d=c>0?p[u[c-1]]:"column";p[t]=d}});const l=(t,c)=>o.useFlexGap?{gap:e.getValue(n,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${F(c?p[c]:o.direction)}`]:e.getValue(n,t)}};s=e.deepmerge(s,e.handleBreakpoints({theme:r},a,l))}return s=e.mergeBreakpointsInOrder(r.breakpoints,s),s};function w(o={}){const{createStyledComponent:r=q,useThemeProps:s=$,componentName:n="MuiStack"}=o,i=()=>{const l={root:["root"]};return T.composeClasses(l,t=>e.generateUtilityClass(n,t),{})},p=r(M),a=f.forwardRef(function(t,c){const u=s(t),y=e.extendSxProp(u),{component:d="div",direction:g="column",spacing:O=0,divider:P,children:m,className:b,useFlexGap:k=!1}=y,h=e._objectWithoutPropertiesLoose(y,_),j={direction:g,spacing:O,useFlexGap:k},x=i();return D.jsx(p,e._extends({as:d,ownerState:j,ref:c,className:e.clsx(x.root,b)},h,{children:P?E(m,P):m}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:e.PropTypes.node,direction:e.PropTypes.oneOfType([e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"]),e.PropTypes.arrayOf(e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"])),e.PropTypes.object]),divider:e.PropTypes.node,spacing:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string])),e.PropTypes.number,e.PropTypes.object,e.PropTypes.string]),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object])}),a}const v=w({createStyledComponent:T.styled("div",{name:"MuiStack",slot:"Root",overridesResolver:(o,r)=>r.root}),useThemeProps:o=>T.useDefaultProps({props:o,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(v.propTypes={children:e.PropTypes.node,component:e.PropTypes.elementType,direction:e.PropTypes.oneOfType([e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"]),e.PropTypes.arrayOf(e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"])),e.PropTypes.object]),divider:e.PropTypes.node,spacing:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string])),e.PropTypes.number,e.PropTypes.object,e.PropTypes.string]),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),useFlexGap:e.PropTypes.bool});const G=v;exports.Stack=G;
@@ -0,0 +1,172 @@
1
+ import { P as e, n as D, m as T, B as g, D as m, E as F, F as N, G as R, z as E, _ as B, x as G, w as _, H as b } from "./identifier-C_DzvlWx.js";
2
+ import { c as w, s as M, u as $ } from "./styled-DCjqF2JO.js";
3
+ import * as f from "react";
4
+ import { c as U } from "./createStyled-CXNF_m2b.js";
5
+ import { jsx as A } from "react/jsx-runtime";
6
+ import { u as L } from "./useThemeProps-fXKB99fl.js";
7
+ const z = U(), H = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], I = D(), W = z("div", {
8
+ name: "MuiStack",
9
+ slot: "Root",
10
+ overridesResolver: (o, r) => r.root
11
+ });
12
+ function q(o) {
13
+ return L({
14
+ props: o,
15
+ name: "MuiStack",
16
+ defaultTheme: I
17
+ });
18
+ }
19
+ function J(o, r) {
20
+ const c = f.Children.toArray(o).filter(Boolean);
21
+ return c.reduce((a, i, n) => (a.push(i), n < c.length - 1 && a.push(/* @__PURE__ */ f.cloneElement(r, {
22
+ key: `separator-${n}`
23
+ })), a), []);
24
+ }
25
+ const K = (o) => ({
26
+ row: "Left",
27
+ "row-reverse": "Right",
28
+ column: "Top",
29
+ "column-reverse": "Bottom"
30
+ })[o], Q = ({
31
+ ownerState: o,
32
+ theme: r
33
+ }) => {
34
+ let c = T({
35
+ display: "flex",
36
+ flexDirection: "column"
37
+ }, g({
38
+ theme: r
39
+ }, m({
40
+ values: o.direction,
41
+ breakpoints: r.breakpoints.values
42
+ }), (a) => ({
43
+ flexDirection: a
44
+ })));
45
+ if (o.spacing) {
46
+ const a = F(r), i = Object.keys(r.breakpoints.values).reduce((s, t) => ((typeof o.spacing == "object" && o.spacing[t] != null || typeof o.direction == "object" && o.direction[t] != null) && (s[t] = !0), s), {}), n = m({
47
+ values: o.direction,
48
+ base: i
49
+ }), l = m({
50
+ values: o.spacing,
51
+ base: i
52
+ });
53
+ typeof n == "object" && Object.keys(n).forEach((s, t, p) => {
54
+ if (!n[s]) {
55
+ const d = t > 0 ? n[p[t - 1]] : "column";
56
+ n[s] = d;
57
+ }
58
+ }), c = N(c, g({
59
+ theme: r
60
+ }, l, (s, t) => o.useFlexGap ? {
61
+ gap: b(a, s)
62
+ } : {
63
+ // The useFlexGap={false} implement relies on each child to give up control of the margin.
64
+ // We need to reset the margin to avoid double spacing.
65
+ "& > :not(style):not(style)": {
66
+ margin: 0
67
+ },
68
+ "& > :not(style) ~ :not(style)": {
69
+ [`margin${K(t ? n[t] : o.direction)}`]: b(a, s)
70
+ }
71
+ }));
72
+ }
73
+ return c = R(r.breakpoints, c), c;
74
+ };
75
+ function X(o = {}) {
76
+ const {
77
+ // This will allow adding custom styled fn (for example for custom sx style function)
78
+ createStyledComponent: r = W,
79
+ useThemeProps: c = q,
80
+ componentName: a = "MuiStack"
81
+ } = o, i = () => w({
82
+ root: ["root"]
83
+ }, (s) => _(a, s), {}), n = r(Q), l = /* @__PURE__ */ f.forwardRef(function(s, t) {
84
+ const p = c(s), u = E(p), {
85
+ component: d = "div",
86
+ direction: j = "column",
87
+ spacing: k = 0,
88
+ divider: v,
89
+ children: O,
90
+ className: x,
91
+ useFlexGap: P = !1
92
+ } = u, S = B(u, H), V = {
93
+ direction: j,
94
+ spacing: k,
95
+ useFlexGap: P
96
+ }, C = i();
97
+ return /* @__PURE__ */ A(n, T({
98
+ as: d,
99
+ ownerState: V,
100
+ ref: t,
101
+ className: G(C.root, x)
102
+ }, S, {
103
+ children: v ? J(O, v) : O
104
+ }));
105
+ });
106
+ return process.env.NODE_ENV !== "production" && (l.propTypes = {
107
+ children: e.node,
108
+ direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
109
+ divider: e.node,
110
+ spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
111
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
112
+ }), l;
113
+ }
114
+ const h = X({
115
+ createStyledComponent: M("div", {
116
+ name: "MuiStack",
117
+ slot: "Root",
118
+ overridesResolver: (o, r) => r.root
119
+ }),
120
+ useThemeProps: (o) => $({
121
+ props: o,
122
+ name: "MuiStack"
123
+ })
124
+ });
125
+ process.env.NODE_ENV !== "production" && (h.propTypes = {
126
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
127
+ // │ These PropTypes are generated from the TypeScript type definitions. │
128
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
129
+ // └─────────────────────────────────────────────────────────────────────┘
130
+ /**
131
+ * The content of the component.
132
+ */
133
+ children: e.node,
134
+ /**
135
+ * The component used for the root node.
136
+ * Either a string to use a HTML element or a component.
137
+ */
138
+ component: e.elementType,
139
+ /**
140
+ * Defines the `flex-direction` style property.
141
+ * It is applied for all screen sizes.
142
+ * @default 'column'
143
+ */
144
+ direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
145
+ /**
146
+ * Add an element between each child.
147
+ */
148
+ divider: e.node,
149
+ /**
150
+ * Defines the space between immediate children.
151
+ * @default 0
152
+ */
153
+ spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
154
+ /**
155
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
156
+ */
157
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
158
+ /**
159
+ * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
160
+ *
161
+ * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
162
+ * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
163
+ *
164
+ * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
165
+ * @default false
166
+ */
167
+ useFlexGap: e.bool
168
+ });
169
+ const se = h;
170
+ export {
171
+ se as S
172
+ };