@solostylist/ui-kit 1.0.107 → 1.0.109

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.
@@ -1,4 +1,7 @@
1
1
  import { default as React } from 'react';
2
+ import { AccordionProps } from '@mui/material/Accordion';
3
+ import { AccordionDetailsProps } from '@mui/material/AccordionDetails';
4
+ import { AccordionSummaryProps } from '@mui/material/AccordionSummary';
2
5
  import { TypographyProps } from '@mui/material/Typography';
3
6
  export interface SAccordionProps {
4
7
  title: React.ReactNode;
@@ -6,6 +9,9 @@ export interface SAccordionProps {
6
9
  startIcon?: React.ReactNode;
7
10
  defaultExpanded?: boolean;
8
11
  titleTypographyProps?: TypographyProps;
12
+ accordionProps?: Omit<AccordionProps, 'children'>;
13
+ accordionSummaryProps?: AccordionSummaryProps;
14
+ accordionDetailsProps?: AccordionDetailsProps;
9
15
  }
10
- declare const SAccordion: ({ title, children, startIcon, defaultExpanded, titleTypographyProps }: SAccordionProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const SAccordion: ({ title, children, startIcon, defaultExpanded, titleTypographyProps, accordionProps, accordionSummaryProps, accordionDetailsProps, }: SAccordionProps) => import("react/jsx-runtime").JSX.Element;
11
17
  export default SAccordion;
@@ -1,6 +1,6 @@
1
1
  import { j as i } from "../jsx-runtime-DywqP_6a.js";
2
2
  import { E as mo } from "../ExpandMore-CE1RzE_y.js";
3
- import * as p from "react";
3
+ import * as u from "react";
4
4
  import { l as go, P as o, j as yo } from "../createTheme-YLBX8GSj.js";
5
5
  import { u as K, a as L, b as Q, m as $ } from "../createSvgIcon-DCQI9UV5.js";
6
6
  import { b as xo, u as ho, e as bo, d as D, c as To, B as Co } from "../ButtonBase-B-mcxJe8.js";
@@ -105,15 +105,15 @@ const Po = (e) => {
105
105
  height: "100%"
106
106
  }
107
107
  }]
108
- }), J = /* @__PURE__ */ p.forwardRef(function(t, r) {
108
+ }), J = /* @__PURE__ */ u.forwardRef(function(t, r) {
109
109
  const s = K({
110
110
  props: t,
111
111
  name: "MuiCollapse"
112
112
  }), {
113
113
  addEndListener: c,
114
- children: h,
115
- className: b,
116
- collapsedSize: f = "0px",
114
+ children: m,
115
+ className: g,
116
+ collapsedSize: l = "0px",
117
117
  component: E,
118
118
  easing: I,
119
119
  in: S,
@@ -124,64 +124,64 @@ const Po = (e) => {
124
124
  onExited: W,
125
125
  onExiting: V,
126
126
  orientation: d = "vertical",
127
- style: m,
128
- timeout: l = go.standard,
127
+ style: y,
128
+ timeout: p = go.standard,
129
129
  // eslint-disable-next-line react/prop-types
130
130
  TransitionComponent: N = So,
131
131
  ...G
132
132
  } = s, v = {
133
133
  ...s,
134
134
  orientation: d,
135
- collapsedSize: f
136
- }, u = Po(v), w = vo(), U = xo(), a = p.useRef(null), g = p.useRef(), C = typeof f == "number" ? `${f}px` : f, O = d === "horizontal", M = O ? "width" : "height", k = p.useRef(null), Z = ho(r, k), R = (n) => (y) => {
135
+ collapsedSize: l
136
+ }, f = Po(v), w = vo(), U = xo(), a = u.useRef(null), x = u.useRef(), C = typeof l == "number" ? `${l}px` : l, O = d === "horizontal", M = O ? "width" : "height", k = u.useRef(null), Z = ho(r, k), R = (n) => (h) => {
137
137
  if (n) {
138
- const x = k.current;
139
- y === void 0 ? n(x) : n(x, y);
138
+ const b = k.current;
139
+ h === void 0 ? n(b) : n(b, h);
140
140
  }
141
- }, H = () => a.current ? a.current[O ? "clientWidth" : "clientHeight"] : 0, oo = R((n, y) => {
142
- a.current && O && (a.current.style.position = "absolute"), n.style[M] = C, A && A(n, y);
143
- }), eo = R((n, y) => {
144
- const x = H();
141
+ }, H = () => a.current ? a.current[O ? "clientWidth" : "clientHeight"] : 0, oo = R((n, h) => {
142
+ a.current && O && (a.current.style.position = "absolute"), n.style[M] = C, A && A(n, h);
143
+ }), eo = R((n, h) => {
144
+ const b = H();
145
145
  a.current && O && (a.current.style.position = "");
146
146
  const {
147
147
  duration: B,
148
148
  easing: q
149
149
  } = ro({
150
- style: m,
151
- timeout: l,
150
+ style: y,
151
+ timeout: p,
152
152
  easing: I
153
153
  }, {
154
154
  mode: "enter"
155
155
  });
156
- if (l === "auto") {
157
- const no = w.transitions.getAutoHeightDuration(x);
158
- n.style.transitionDuration = `${no}ms`, g.current = no;
156
+ if (p === "auto") {
157
+ const no = w.transitions.getAutoHeightDuration(b);
158
+ n.style.transitionDuration = `${no}ms`, x.current = no;
159
159
  } else
160
160
  n.style.transitionDuration = typeof B == "string" ? B : `${B}ms`;
161
- n.style[M] = `${x}px`, n.style.transitionTimingFunction = q, z && z(n, y);
162
- }), co = R((n, y) => {
163
- n.style[M] = "auto", j && j(n, y);
161
+ n.style[M] = `${b}px`, n.style.transitionTimingFunction = q, z && z(n, h);
162
+ }), co = R((n, h) => {
163
+ n.style[M] = "auto", j && j(n, h);
164
164
  }), lo = R((n) => {
165
165
  n.style[M] = `${H()}px`, P && P(n);
166
166
  }), po = R(W), uo = R((n) => {
167
- const y = H(), {
168
- duration: x,
167
+ const h = H(), {
168
+ duration: b,
169
169
  easing: B
170
170
  } = ro({
171
- style: m,
172
- timeout: l,
171
+ style: y,
172
+ timeout: p,
173
173
  easing: I
174
174
  }, {
175
175
  mode: "exit"
176
176
  });
177
- if (l === "auto") {
178
- const q = w.transitions.getAutoHeightDuration(y);
179
- n.style.transitionDuration = `${q}ms`, g.current = q;
177
+ if (p === "auto") {
178
+ const q = w.transitions.getAutoHeightDuration(h);
179
+ n.style.transitionDuration = `${q}ms`, x.current = q;
180
180
  } else
181
- n.style.transitionDuration = typeof x == "string" ? x : `${x}ms`;
181
+ n.style.transitionDuration = typeof b == "string" ? b : `${b}ms`;
182
182
  n.style[M] = C, n.style.transitionTimingFunction = B, V && V(n);
183
183
  }), fo = (n) => {
184
- l === "auto" && U.start(g.current || 0, n), c && c(k.current, n);
184
+ p === "auto" && U.start(x.current || 0, n), c && c(k.current, n);
185
185
  };
186
186
  return /* @__PURE__ */ i.jsx(N, {
187
187
  in: S,
@@ -193,41 +193,41 @@ const Po = (e) => {
193
193
  onExiting: uo,
194
194
  addEndListener: fo,
195
195
  nodeRef: k,
196
- timeout: l === "auto" ? null : l,
196
+ timeout: p === "auto" ? null : p,
197
197
  ...G,
198
198
  children: (n, {
199
- ownerState: y,
200
- ...x
199
+ ownerState: h,
200
+ ...b
201
201
  }) => /* @__PURE__ */ i.jsx(No, {
202
202
  as: E,
203
- className: L(u.root, b, {
204
- entered: u.entered,
205
- exited: !S && C === "0px" && u.hidden
203
+ className: L(f.root, g, {
204
+ entered: f.entered,
205
+ exited: !S && C === "0px" && f.hidden
206
206
  }[n]),
207
207
  style: {
208
208
  [O ? "minWidth" : "minHeight"]: C,
209
- ...m
209
+ ...y
210
210
  },
211
211
  ref: Z,
212
212
  ownerState: {
213
213
  ...v,
214
214
  state: n
215
215
  },
216
- ...x,
216
+ ...b,
217
217
  children: /* @__PURE__ */ i.jsx(Oo, {
218
218
  ownerState: {
219
219
  ...v,
220
220
  state: n
221
221
  },
222
- className: u.wrapper,
222
+ className: f.wrapper,
223
223
  ref: a,
224
224
  children: /* @__PURE__ */ i.jsx(Mo, {
225
225
  ownerState: {
226
226
  ...v,
227
227
  state: n
228
228
  },
229
- className: u.wrapperInner,
230
- children: h
229
+ className: f.wrapperInner,
230
+ children: m
231
231
  })
232
232
  })
233
233
  })
@@ -329,7 +329,7 @@ process.env.NODE_ENV !== "production" && (J.propTypes = {
329
329
  })])
330
330
  });
331
331
  J && (J.muiSupportAuto = !0);
332
- const to = /* @__PURE__ */ p.createContext({});
332
+ const to = /* @__PURE__ */ u.createContext({});
333
333
  process.env.NODE_ENV !== "production" && (to.displayName = "AccordionContext");
334
334
  function Do(e) {
335
335
  return Y("MuiAccordion", e);
@@ -340,10 +340,10 @@ const _ = X("MuiAccordion", ["root", "heading", "rounded", "expanded", "disabled
340
340
  square: r,
341
341
  expanded: s,
342
342
  disabled: c,
343
- disableGutters: h
343
+ disableGutters: m
344
344
  } = e;
345
345
  return Q({
346
- root: ["root", !r && "rounded", s && "expanded", c && "disabled", !h && "gutters"],
346
+ root: ["root", !r && "rounded", s && "expanded", c && "disabled", !m && "gutters"],
347
347
  heading: ["heading"],
348
348
  region: ["region"]
349
349
  }, Do, t);
@@ -442,15 +442,15 @@ const _ = X("MuiAccordion", ["root", "heading", "rounded", "expanded", "disabled
442
442
  }), Wo = T("div", {
443
443
  name: "MuiAccordion",
444
444
  slot: "Region"
445
- })({}), so = /* @__PURE__ */ p.forwardRef(function(t, r) {
445
+ })({}), so = /* @__PURE__ */ u.forwardRef(function(t, r) {
446
446
  const s = K({
447
447
  props: t,
448
448
  name: "MuiAccordion"
449
449
  }), {
450
450
  children: c,
451
- className: h,
452
- defaultExpanded: b = !1,
453
- disabled: f = !1,
451
+ className: m,
452
+ defaultExpanded: g = !1,
453
+ disabled: l = !1,
454
454
  disableGutters: E = !1,
455
455
  expanded: I,
456
456
  onChange: S,
@@ -460,59 +460,59 @@ const _ = X("MuiAccordion", ["root", "heading", "rounded", "expanded", "disabled
460
460
  TransitionComponent: P,
461
461
  TransitionProps: W,
462
462
  ...V
463
- } = s, [d, m] = Eo({
463
+ } = s, [d, y] = Eo({
464
464
  controlled: I,
465
- default: b,
465
+ default: g,
466
466
  name: "Accordion",
467
467
  state: "expanded"
468
- }), l = p.useCallback((eo) => {
469
- m(!d), S && S(eo, !d);
470
- }, [d, S, m]), [N, ...G] = p.Children.toArray(c), v = p.useMemo(() => ({
468
+ }), p = u.useCallback((eo) => {
469
+ y(!d), S && S(eo, !d);
470
+ }, [d, S, y]), [N, ...G] = u.Children.toArray(c), v = u.useMemo(() => ({
471
471
  expanded: d,
472
- disabled: f,
472
+ disabled: l,
473
473
  disableGutters: E,
474
- toggle: l
475
- }), [d, f, E, l]), u = {
474
+ toggle: p
475
+ }), [d, l, E, p]), f = {
476
476
  ...s,
477
477
  square: A,
478
- disabled: f,
478
+ disabled: l,
479
479
  disableGutters: E,
480
480
  expanded: d
481
- }, w = $o(u), U = {
481
+ }, w = $o(f), U = {
482
482
  transition: P,
483
483
  ...j
484
484
  }, a = {
485
485
  transition: W,
486
486
  ...z
487
- }, g = {
487
+ }, x = {
488
488
  slots: U,
489
489
  slotProps: a
490
490
  }, [C, O] = D("root", {
491
491
  elementType: Io,
492
492
  externalForwardedProps: {
493
- ...g,
493
+ ...x,
494
494
  ...V
495
495
  },
496
- className: L(w.root, h),
496
+ className: L(w.root, m),
497
497
  shouldForwardComponentProp: !0,
498
- ownerState: u,
498
+ ownerState: f,
499
499
  ref: r,
500
500
  additionalProps: {
501
501
  square: A
502
502
  }
503
503
  }), [M, k] = D("heading", {
504
504
  elementType: zo,
505
- externalForwardedProps: g,
505
+ externalForwardedProps: x,
506
506
  className: w.heading,
507
- ownerState: u
507
+ ownerState: f
508
508
  }), [Z, R] = D("transition", {
509
509
  elementType: J,
510
- externalForwardedProps: g,
511
- ownerState: u
510
+ externalForwardedProps: x,
511
+ ownerState: f
512
512
  }), [H, oo] = D("region", {
513
513
  elementType: Wo,
514
- externalForwardedProps: g,
515
- ownerState: u,
514
+ externalForwardedProps: x,
515
+ ownerState: f,
516
516
  className: w.region,
517
517
  additionalProps: {
518
518
  "aria-labelledby": N.props.id,
@@ -548,8 +548,8 @@ process.env.NODE_ENV !== "production" && (so.propTypes = {
548
548
  * The content of the component.
549
549
  */
550
550
  children: To(o.node.isRequired, (e) => {
551
- const t = p.Children.toArray(e.children)[0];
552
- return yo.isFragment(t) ? new Error("MUI: The Accordion doesn't accept a Fragment as a child. Consider providing an array instead.") : /* @__PURE__ */ p.isValidElement(t) ? null : new Error("MUI: Expected the first child of Accordion to be a valid element.");
551
+ const t = u.Children.toArray(e.children)[0];
552
+ return yo.isFragment(t) ? new Error("MUI: The Accordion doesn't accept a Fragment as a child. Consider providing an array instead.") : /* @__PURE__ */ u.isValidElement(t) ? null : new Error("MUI: Expected the first child of Accordion to be a valid element.");
553
553
  }),
554
554
  /**
555
555
  * Override or extend the styles applied to the component.
@@ -646,19 +646,19 @@ const ko = (e) => {
646
646
  theme: e
647
647
  }) => ({
648
648
  padding: e.spacing(1, 2, 2)
649
- }))), io = /* @__PURE__ */ p.forwardRef(function(t, r) {
649
+ }))), io = /* @__PURE__ */ u.forwardRef(function(t, r) {
650
650
  const s = K({
651
651
  props: t,
652
652
  name: "MuiAccordionDetails"
653
653
  }), {
654
654
  className: c,
655
- ...h
656
- } = s, b = s, f = ko(b);
655
+ ...m
656
+ } = s, g = s, l = ko(g);
657
657
  return /* @__PURE__ */ i.jsx(Fo, {
658
- className: L(f.root, c),
658
+ className: L(l.root, c),
659
659
  ref: r,
660
- ownerState: b,
661
- ...h
660
+ ownerState: g,
661
+ ...m
662
662
  });
663
663
  });
664
664
  process.env.NODE_ENV !== "production" && (io.propTypes = {
@@ -768,15 +768,15 @@ const F = X("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
768
768
  [`&.${F.expanded}`]: {
769
769
  transform: "rotate(180deg)"
770
770
  }
771
- }))), ao = /* @__PURE__ */ p.forwardRef(function(t, r) {
771
+ }))), ao = /* @__PURE__ */ u.forwardRef(function(t, r) {
772
772
  const s = K({
773
773
  props: t,
774
774
  name: "MuiAccordionSummary"
775
775
  }), {
776
776
  children: c,
777
- className: h,
778
- expandIcon: b,
779
- focusVisibleClassName: f,
777
+ className: m,
778
+ expandIcon: g,
779
+ focusVisibleClassName: l,
780
780
  onClick: E,
781
781
  slots: I,
782
782
  slotProps: S,
@@ -786,23 +786,23 @@ const F = X("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
786
786
  disableGutters: z,
787
787
  expanded: P,
788
788
  toggle: W
789
- } = p.useContext(to), V = (a) => {
789
+ } = u.useContext(to), V = (a) => {
790
790
  W && W(a), E && E(a);
791
791
  }, d = {
792
792
  ...s,
793
793
  expanded: P,
794
794
  disabled: j,
795
795
  disableGutters: z
796
- }, m = Uo(d), l = {
796
+ }, y = Uo(d), p = {
797
797
  slots: I,
798
798
  slotProps: S
799
799
  }, [N, G] = D("root", {
800
800
  ref: r,
801
801
  shouldForwardComponentProp: !0,
802
- className: L(m.root, h),
802
+ className: L(y.root, m),
803
803
  elementType: Ho,
804
804
  externalForwardedProps: {
805
- ...l,
805
+ ...p,
806
806
  ...A
807
807
  },
808
808
  ownerState: d,
@@ -811,34 +811,34 @@ const F = X("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
811
811
  disableRipple: !0,
812
812
  disabled: j,
813
813
  "aria-expanded": P,
814
- focusVisibleClassName: L(m.focusVisible, f)
814
+ focusVisibleClassName: L(y.focusVisible, l)
815
815
  },
816
816
  getSlotProps: (a) => ({
817
817
  ...a,
818
- onClick: (g) => {
818
+ onClick: (x) => {
819
819
  var C;
820
- (C = a.onClick) == null || C.call(a, g), V(g);
820
+ (C = a.onClick) == null || C.call(a, x), V(x);
821
821
  }
822
822
  })
823
- }), [v, u] = D("content", {
824
- className: m.content,
823
+ }), [v, f] = D("content", {
824
+ className: y.content,
825
825
  elementType: Bo,
826
- externalForwardedProps: l,
826
+ externalForwardedProps: p,
827
827
  ownerState: d
828
828
  }), [w, U] = D("expandIconWrapper", {
829
- className: m.expandIconWrapper,
829
+ className: y.expandIconWrapper,
830
830
  elementType: Lo,
831
- externalForwardedProps: l,
831
+ externalForwardedProps: p,
832
832
  ownerState: d
833
833
  });
834
834
  return /* @__PURE__ */ i.jsxs(N, {
835
835
  ...G,
836
836
  children: [/* @__PURE__ */ i.jsx(v, {
837
- ...u,
837
+ ...f,
838
838
  children: c
839
- }), b && /* @__PURE__ */ i.jsx(w, {
839
+ }), g && /* @__PURE__ */ i.jsx(w, {
840
840
  ...U,
841
- children: b
841
+ children: g
842
842
  })]
843
843
  });
844
844
  });
@@ -899,7 +899,16 @@ process.env.NODE_ENV !== "production" && (ao.propTypes = {
899
899
  */
900
900
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
901
901
  });
902
- const re = ({ title: e, children: t, startIcon: r, defaultExpanded: s = !1, titleTypographyProps: c }) => /* @__PURE__ */ i.jsxs(
902
+ const re = ({
903
+ title: e,
904
+ children: t,
905
+ startIcon: r,
906
+ defaultExpanded: s = !1,
907
+ titleTypographyProps: c,
908
+ accordionProps: m,
909
+ accordionSummaryProps: g,
910
+ accordionDetailsProps: l
911
+ }) => /* @__PURE__ */ i.jsxs(
903
912
  so,
904
913
  {
905
914
  defaultExpanded: s,
@@ -909,12 +918,13 @@ const re = ({ title: e, children: t, startIcon: r, defaultExpanded: s = !1, titl
909
918
  borderColor: "divider"
910
919
  },
911
920
  elevation: 0,
921
+ ...m,
912
922
  children: [
913
- e || r ? /* @__PURE__ */ i.jsx(ao, { expandIcon: /* @__PURE__ */ i.jsx(mo, {}), children: /* @__PURE__ */ i.jsxs(Ro, { direction: "row", spacing: 1, alignItems: "center", children: [
923
+ e || r ? /* @__PURE__ */ i.jsx(ao, { expandIcon: /* @__PURE__ */ i.jsx(mo, {}), ...g, children: /* @__PURE__ */ i.jsxs(Ro, { direction: "row", spacing: 1, alignItems: "center", children: [
914
924
  r,
915
925
  /* @__PURE__ */ i.jsx(Ao, { variant: "subtitle1", fontWeight: 600, ...c, children: e })
916
926
  ] }) }) : null,
917
- /* @__PURE__ */ i.jsx(io, { children: t })
927
+ /* @__PURE__ */ i.jsx(io, { ...l, children: t })
918
928
  ]
919
929
  }
920
930
  );
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org"
5
5
  },
6
- "version": "1.0.107",
6
+ "version": "1.0.109",
7
7
  "description": "advanced ui kit for solostylist",
8
8
  "private": false,
9
9
  "type": "module",