@solostylist/ui-kit 1.0.174 → 1.0.176

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 (206) hide show
  1. package/dist/{ArrowUpward-DhTFpzoh.js → ArrowUpward-CEeqSc-C.js} +2 -2
  2. package/dist/{Box-Ha0cQ4KO.js → Box-CE3rycd-.js} +5 -5
  3. package/dist/ButtonBase-C_YYB9Ry.js +1099 -0
  4. package/dist/{ChevronLeft-CBuFk2Fh.js → ChevronLeft-6gdh4lRt.js} +2 -2
  5. package/dist/{ChevronRight-CnDWPrOm.js → ChevronRight-CC3l-wPC.js} +2 -2
  6. package/dist/{Close-BRlEKA2Q.js → Close-DOHlPcFK.js} +2 -2
  7. package/dist/{ContentCopy-7nFBtjhs.js → ContentCopy-2xxDThyB.js} +2 -2
  8. package/dist/DefaultPropsProvider-sk0uWcA6.js +64 -0
  9. package/dist/{Download-UsLvGg3y.js → Download-Chao5NQl.js} +2 -2
  10. package/dist/{ExpandMore-DTWX_mHf.js → ExpandMore-DIGPB4Mj.js} +2 -2
  11. package/dist/{Favorite-DS5Gpq2s.js → Favorite-wp65zwWq.js} +2 -2
  12. package/dist/{Menu-CWq-a1Wz.js → Menu-DZYzE2Mg.js} +908 -906
  13. package/dist/{MenuItem-DY_qFSPR.js → MenuItem-BXiIhfBS.js} +26 -25
  14. package/dist/Paper-DnctZB5U.js +689 -0
  15. package/dist/{Select-DabtQlJT.js → Select-DY7XGVsv.js} +2152 -2115
  16. package/dist/{Stack-Cq2r2NmC.js → Stack-BScsuyQy.js} +6 -6
  17. package/dist/{Typography-C8jwvSWe.js → Typography-9Kg27dDw.js} +84 -86
  18. package/dist/{_commonjsHelpers-B4e78b8K.js → _commonjsHelpers-ByX85dGu.js} +18 -13
  19. package/dist/assets/s-overlay-scrollbar.css +1 -9
  20. package/dist/createSvgIcon-BKymXuBG.js +242 -0
  21. package/dist/{createTheme-3Wd3hHrj.js → createTheme-f5g1s6ww.js} +859 -906
  22. package/dist/defaultTheme-LSr-S9un.js +5 -0
  23. package/dist/entries/carousel.d.ts +10 -0
  24. package/dist/entries/carousel.js +4 -0
  25. package/dist/entries/chat.d.ts +9 -0
  26. package/dist/entries/chat.js +4 -0
  27. package/dist/entries/code.d.ts +9 -0
  28. package/dist/entries/code.js +4 -0
  29. package/dist/entries/core.d.ts +100 -0
  30. package/dist/entries/core.js +122 -0
  31. package/dist/entries/dates.d.ts +16 -0
  32. package/dist/entries/dates.js +12 -0
  33. package/dist/entries/dropzone.d.ts +9 -0
  34. package/dist/entries/dropzone.js +4 -0
  35. package/dist/entries/editor.d.ts +12 -0
  36. package/dist/entries/editor.js +4 -0
  37. package/dist/entries/gallery.d.ts +17 -0
  38. package/dist/entries/gallery.js +13 -0
  39. package/dist/entries/i18n.d.ts +13 -0
  40. package/dist/entries/i18n.js +8 -0
  41. package/dist/entries/motion.d.ts +29 -0
  42. package/dist/entries/motion.js +28 -0
  43. package/dist/entries/scrollbar.d.ts +9 -0
  44. package/dist/entries/scrollbar.js +4 -0
  45. package/dist/entries/stripe.d.ts +10 -0
  46. package/dist/entries/stripe.js +10 -0
  47. package/dist/extendSxProp-DitxZ8We.js +36 -0
  48. package/dist/hooks/index.js +8 -9
  49. package/dist/hooks/use-is-passed-position.js +10 -10
  50. package/dist/{index-BGvzecIA.js → index-D3G5Rwl-.js} +0 -7
  51. package/dist/{index-CfKHZ86U.js → index-DtYP8YE7.js} +12 -13
  52. package/dist/{jsx-runtime-OVHDjVDe.js → jsx-runtime-tc70JA_2.js} +108 -128
  53. package/dist/main.d.ts +29 -145
  54. package/dist/main.js +187 -187
  55. package/dist/mergeSlotProps-CuzBQdlp.js +62 -0
  56. package/dist/resolveProps-BDH0VJjn.js +39 -0
  57. package/dist/s-accordion/package.json +5 -5
  58. package/dist/s-accordion/s-accordion.js +374 -358
  59. package/dist/s-action-overlay/package.json +5 -5
  60. package/dist/s-action-overlay/s-action-overlay.js +64 -79
  61. package/dist/s-ai-tool-bar/package.json +5 -5
  62. package/dist/s-ai-tool-bar/s-ai-tool-bar.js +260 -275
  63. package/dist/s-autocomplete/s-autocomplete.js +19 -25
  64. package/dist/s-avatar/package.json +5 -5
  65. package/dist/s-avatar/s-avatar.js +14 -25
  66. package/dist/s-blur-text/package.json +5 -5
  67. package/dist/s-blur-text/s-blur-text.js +55 -59
  68. package/dist/s-breadcrumbs/package.json +5 -5
  69. package/dist/s-breadcrumbs/s-breadcrumbs.js +31 -39
  70. package/dist/s-button/package.json +5 -5
  71. package/dist/s-button/s-button.js +7 -15
  72. package/dist/s-button-link/s-button-link.js +28 -36
  73. package/dist/s-carousel/package.json +4 -4
  74. package/dist/s-carousel/s-carousel.js +267 -280
  75. package/dist/s-category-card/package.json +4 -4
  76. package/dist/s-category-card/s-category-card.js +60 -77
  77. package/dist/s-chat-input/package.json +5 -5
  78. package/dist/s-chat-input/s-chat-input.d.ts +4 -0
  79. package/dist/s-chat-input/s-chat-input.js +103 -109
  80. package/dist/s-chat-message/s-chat-message.js +111 -120
  81. package/dist/s-checkbox/s-checkbox.js +12 -20
  82. package/dist/s-chip/package.json +5 -5
  83. package/dist/s-chip/s-chip.js +7 -15
  84. package/dist/s-chips/s-chips.js +47 -56
  85. package/dist/s-code-block/package.json +5 -5
  86. package/dist/s-code-block/s-code-block.js +35 -43
  87. package/dist/s-comment-message/package.json +5 -5
  88. package/dist/s-comment-message/s-comment-message.js +90 -94
  89. package/dist/s-copyable-text/s-copyable-text.js +24 -32
  90. package/dist/s-countdown/s-count-box.js +42 -50
  91. package/dist/s-countdown/s-count-down.js +79 -107
  92. package/dist/s-data-table/s-data-table.js +374 -384
  93. package/dist/s-date-picker/s-date-picker.js +164 -164
  94. package/dist/s-datetime-picker/s-datetime-picker.js +1599 -1603
  95. package/dist/s-dialog/s-dialog.js +24 -32
  96. package/dist/s-dialog-confirm/s-dialog-confirm.js +46 -50
  97. package/dist/s-dialog-message/s-dialog-message.js +40 -44
  98. package/dist/s-empty/s-empty.js +6 -14
  99. package/dist/s-error/s-error.js +9 -17
  100. package/dist/s-error-layout/s-error-layout.js +38 -47
  101. package/dist/s-file-dropzone/s-file-dropzone.js +55 -64
  102. package/dist/s-file-icon/s-file-icon.js +9 -13
  103. package/dist/s-flex-box/s-flex-box.js +6 -14
  104. package/dist/s-form/s-form.js +11 -19
  105. package/dist/s-gallery/index.js +3 -33
  106. package/dist/s-gallery/s-gallery.js +91 -114
  107. package/dist/s-glow-button/s-glow-button.js +22 -26
  108. package/dist/s-gradient-icon/s-gradient-icon.js +49 -59
  109. package/dist/s-i18n-provider/s-i18n-provider.js +17 -25
  110. package/dist/s-icon-button/s-icon-button.js +6 -14
  111. package/dist/s-image-comparison/package.json +5 -5
  112. package/dist/s-image-comparison/s-image-comparison.js +48 -53
  113. package/dist/s-image-modal/package.json +5 -5
  114. package/dist/s-image-modal/s-image-modal.js +137 -150
  115. package/dist/s-item-not-found/s-item-not-found.js +13 -22
  116. package/dist/s-label/s-label.js +12 -20
  117. package/dist/s-language-switcher/s-language-switcher.js +119 -141
  118. package/dist/s-lazy-image/index.js +2 -10
  119. package/dist/s-lazy-image/s-lazy-image.js +33 -37
  120. package/dist/s-localization-provider/s-localization-provider.js +368 -380
  121. package/dist/s-moving-border/s-moving-border.js +52 -67
  122. package/dist/s-multi-select/s-multi-select.js +43 -51
  123. package/dist/s-no-ssr/s-no-ssr.js +13 -21
  124. package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +12 -16
  125. package/dist/s-pagination/s-pagination.js +13 -17
  126. package/dist/s-pixel-reveal/package.json +5 -5
  127. package/dist/s-pixel-reveal/s-pixel-reveal.js +92 -99
  128. package/dist/s-radial-pulse-animate/package.json +5 -5
  129. package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +40 -48
  130. package/dist/s-rating/package.json +5 -5
  131. package/dist/s-rating/s-rating.js +7 -15
  132. package/dist/s-review/package.json +5 -5
  133. package/dist/s-review/s-review.js +101 -106
  134. package/dist/s-scroll-reveal/package.json +5 -5
  135. package/dist/s-scroll-reveal/s-scroll-reveal.js +40 -48
  136. package/dist/s-scroll-to-top/package.json +5 -5
  137. package/dist/s-scroll-to-top/s-scroll-to-top.js +20 -30
  138. package/dist/s-scroll-velocity/package.json +5 -5
  139. package/dist/s-scroll-velocity/s-scroll-velocity.js +5 -19
  140. package/dist/s-scroll-velocity/scroll-velocity-container.js +18 -27
  141. package/dist/s-scroll-velocity/scroll-velocity-row.js +62 -71
  142. package/dist/s-select/s-select.js +67 -75
  143. package/dist/s-select-list/s-select-list.js +28 -32
  144. package/dist/s-skeleton/s-skeleton.js +20 -28
  145. package/dist/s-snackbar-message/s-snackbar-message.js +36 -40
  146. package/dist/s-spotlight-cursor/s-spotlight-cursor.js +31 -35
  147. package/dist/s-stripe/s-stripe-cvc.js +8 -12
  148. package/dist/s-stripe/s-stripe-expiry.js +8 -12
  149. package/dist/s-stripe/s-stripe-number.js +8 -12
  150. package/dist/s-stripe/s-stripe.d.ts +2 -2
  151. package/dist/s-stripe/s-stripe.js +17 -26
  152. package/dist/s-stripe/stripe-input.js +25 -29
  153. package/dist/s-tabs/package.json +3 -3
  154. package/dist/s-tabs/s-tab-panel.js +17 -25
  155. package/dist/s-tabs/s-tab.js +5 -9
  156. package/dist/s-tabs/s-tabs.js +19 -27
  157. package/dist/s-text-editor/s-text-editor-toolbar.js +73 -88
  158. package/dist/s-text-editor/s-text-editor.js +33 -45
  159. package/dist/s-text-field/s-text-field.js +31 -40
  160. package/dist/s-text-shimmer/package.json +4 -4
  161. package/dist/s-text-shimmer/s-text-shimmer.js +19 -27
  162. package/dist/s-text-truncation/s-text-truncation.js +24 -32
  163. package/dist/s-theme-demo/package.json +5 -5
  164. package/dist/s-theme-demo/s-theme-demo.js +219 -234
  165. package/dist/s-theme-provider/s-theme-provider.js +37 -45
  166. package/dist/s-theme-switch/package.json +4 -4
  167. package/dist/s-theme-switch/s-theme-switch.js +19 -23
  168. package/dist/s-tip/s-tip.js +14 -22
  169. package/dist/s-two-pane-layout/index.js +2 -10
  170. package/dist/s-two-pane-layout/s-two-pane-layout.js +47 -55
  171. package/dist/s-typewriter-text/package.json +5 -5
  172. package/dist/s-typewriter-text/s-typewriter-text.js +27 -35
  173. package/dist/s-zoom-image/index.js +2 -10
  174. package/dist/s-zoom-image/package.json +5 -5
  175. package/dist/s-zoom-image/s-zoom-image.js +53 -62
  176. package/dist/styled-B0KflPi-.js +203 -0
  177. package/dist/theme/components/alert.d.ts +484 -264
  178. package/dist/theme/components/avatar.js +2 -2
  179. package/dist/theme/components/button.d.ts +726 -396
  180. package/dist/theme/components/chip.js +2 -2
  181. package/dist/theme/components/components.js +14 -12
  182. package/dist/theme/components/icon-button.d.ts +6191 -0
  183. package/dist/theme/components/icon-button.js +90 -0
  184. package/dist/theme/customizations/data-display.js +1 -1
  185. package/dist/theme/customizations/inputs.js +2 -2
  186. package/dist/theme/customizations/navigation.js +2 -2
  187. package/dist/theme/theme-primitives.d.ts +8 -246
  188. package/dist/theme/theme-primitives.js +76 -87
  189. package/dist/{typographyClasses-DDyl9mok.js → typographyClasses-C7fhAsUD.js} +4 -4
  190. package/dist/{useMobilePicker-C1RZZUWr.js → useMobilePicker-C4AYe0Ch.js} +11249 -11231
  191. package/dist/{useTheme-B5czKfC4.js → useTheme-CtdhfT4P.js} +1 -1
  192. package/dist/{useThemeProps-DqA5BinV.js → useThemeProps-_apS-Aua.js} +2 -2
  193. package/dist/utils/dayjs.js +7 -7
  194. package/dist/utils/logger.js +29 -32
  195. package/dist/{warning-BCwEnWrE.js → warning-DnPRVtW6.js} +4 -4
  196. package/package.json +240 -81
  197. package/README.md +0 -13
  198. package/dist/ButtonBase-DfTfJ_ou.js +0 -1105
  199. package/dist/DefaultPropsProvider-CaCsvQaq.js +0 -78
  200. package/dist/Paper-hkbPWyBT.js +0 -553
  201. package/dist/createSvgIcon-DxwgGAVe.js +0 -247
  202. package/dist/defaultTheme-fEi1x1Gb.js +0 -5
  203. package/dist/extendSxProp-BKWjdW12.js +0 -37
  204. package/dist/mergeSlotProps-Dl_rJtoN.js +0 -62
  205. package/dist/resolveProps-61uUKnlS.js +0 -52
  206. package/dist/styled-B0Z4EDy9.js +0 -206
@@ -1,39 +1,39 @@
1
- import { j as o } from "../jsx-runtime-OVHDjVDe.js";
2
- import * as S from "react";
3
- import y from "react";
4
- import { useTranslation as q } from "react-i18next";
5
- import { usePopover as C } from "../hooks/use-popover.js";
6
- import { SIconButton as T } from "../s-icon-button/s-icon-button.js";
7
- import "../s-lazy-image/index.js";
8
- import { L as z, M as j } from "../Menu-CWq-a1Wz.js";
9
- import { g as N, M as k } from "../MenuItem-DY_qFSPR.js";
10
- import { P as t } from "../createTheme-3Wd3hHrj.js";
11
- import { u as E, c as W, a as F, m as P } from "../DefaultPropsProvider-CaCsvQaq.js";
12
- import { s as O } from "../styled-B0Z4EDy9.js";
13
- import L from "../s-lazy-image/s-lazy-image.js";
14
- import { T as R } from "../Typography-C8jwvSWe.js";
15
- const M = (e) => {
1
+ import { j as n } from "../jsx-runtime-tc70JA_2.js";
2
+ import * as I from "react";
3
+ import x from "react";
4
+ import { useTranslation as b } from "react-i18next";
5
+ import { usePopover as O } from "../hooks/use-popover.js";
6
+ import { SIconButton as w } from "../s-icon-button/s-icon-button.js";
7
+ import v from "../s-lazy-image/s-lazy-image.js";
8
+ import { L as C, M as R } from "../Menu-DZYzE2Mg.js";
9
+ import { g as T, M as k } from "../MenuItem-BXiIhfBS.js";
10
+ import { P as s } from "../createTheme-f5g1s6ww.js";
11
+ import { c as M } from "../clsx-OuTLNxxd.js";
12
+ import { u as N, c as P, m as E } from "../DefaultPropsProvider-sk0uWcA6.js";
13
+ import { s as _ } from "../styled-B0KflPi-.js";
14
+ import { T as z } from "../Typography-9Kg27dDw.js";
15
+ const D = (t) => {
16
16
  const {
17
- alignItems: a,
18
- classes: i
19
- } = e;
20
- return F({
21
- root: ["root", a === "flex-start" && "alignItemsFlexStart"]
22
- }, N, i);
23
- }, A = O("div", {
17
+ alignItems: e,
18
+ classes: r
19
+ } = t;
20
+ return P({
21
+ root: ["root", e === "flex-start" && "alignItemsFlexStart"]
22
+ }, T, r);
23
+ }, F = _("div", {
24
24
  name: "MuiListItemIcon",
25
25
  slot: "Root",
26
- overridesResolver: (e, a) => {
26
+ overridesResolver: (t, e) => {
27
27
  const {
28
- ownerState: i
29
- } = e;
30
- return [a.root, i.alignItems === "flex-start" && a.alignItemsFlexStart];
28
+ ownerState: r
29
+ } = t;
30
+ return [e.root, r.alignItems === "flex-start" && e.alignItemsFlexStart];
31
31
  }
32
- })(P(({
33
- theme: e
32
+ })(E(({
33
+ theme: t
34
34
  }) => ({
35
35
  minWidth: 56,
36
- color: (e.vars || e).palette.action.active,
36
+ color: (t.vars || t).palette.action.active,
37
37
  flexShrink: 0,
38
38
  display: "inline-flex",
39
39
  variants: [{
@@ -44,25 +44,25 @@ const M = (e) => {
44
44
  marginTop: 8
45
45
  }
46
46
  }]
47
- }))), V = /* @__PURE__ */ S.forwardRef(function(a, i) {
48
- const l = E({
49
- props: a,
47
+ }))), j = /* @__PURE__ */ I.forwardRef(function(e, r) {
48
+ const a = N({
49
+ props: e,
50
50
  name: "MuiListItemIcon"
51
51
  }), {
52
- className: u,
53
- ...d
54
- } = l, g = S.useContext(z), r = {
55
- ...l,
56
- alignItems: g.alignItems
57
- }, p = M(r);
58
- return /* @__PURE__ */ o.jsx(A, {
59
- className: W(p.root, u),
60
- ownerState: r,
61
- ref: i,
62
- ...d
52
+ className: c,
53
+ ...p
54
+ } = a, m = I.useContext(C), i = {
55
+ ...a,
56
+ alignItems: m.alignItems
57
+ }, f = D(i);
58
+ return /* @__PURE__ */ n.jsx(F, {
59
+ className: M(f.root, c),
60
+ ownerState: i,
61
+ ref: r,
62
+ ...p
63
63
  });
64
64
  });
65
- process.env.NODE_ENV !== "production" && (V.propTypes = {
65
+ process.env.NODE_ENV !== "production" && (j.propTypes = {
66
66
  // ┌────────────────────────────── Warning ──────────────────────────────┐
67
67
  // │ These PropTypes are generated from the TypeScript type definitions. │
68
68
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -71,148 +71,126 @@ process.env.NODE_ENV !== "production" && (V.propTypes = {
71
71
  * The content of the component, normally `Icon`, `SvgIcon`,
72
72
  * or a `@mui/icons-material` SVG icon element.
73
73
  */
74
- children: t.node,
74
+ children: s.node,
75
75
  /**
76
76
  * Override or extend the styles applied to the component.
77
77
  */
78
- classes: t.object,
78
+ classes: s.object,
79
79
  /**
80
80
  * @ignore
81
81
  */
82
- className: t.string,
82
+ className: s.string,
83
83
  /**
84
84
  * The system prop that allows defining system overrides as well as additional CSS styles.
85
85
  */
86
- sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
86
+ sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object])
87
87
  });
88
- const I = [
88
+ const y = [
89
89
  { code: "en", label: "English", icon: "/assets/flag-uk.svg" },
90
90
  { code: "vi", label: "Vietnamese", icon: "/assets/flag-vi.svg" }
91
- ], v = ({
92
- anchorEl: e,
93
- onClose: a,
94
- open: i = !1,
95
- onLanguageChange: l,
96
- languages: u = I,
97
- currentLanguage: d,
98
- menuWidth: g = "220px",
99
- flagSize: r = 28
91
+ ], U = ({
92
+ anchorEl: t,
93
+ onClose: e,
94
+ open: r = !1,
95
+ onLanguageChange: a,
96
+ languages: c = y,
97
+ currentLanguage: p,
98
+ menuWidth: m = "220px",
99
+ flagSize: i = 28
100
100
  }) => {
101
- const p = y.useCallback(
102
- (n) => {
103
- l == null || l(n), a == null || a();
101
+ const f = x.useCallback(
102
+ (o) => {
103
+ a?.(o), e?.();
104
104
  },
105
- [l, a]
105
+ [a, e]
106
106
  );
107
- return /* @__PURE__ */ o.jsx(
108
- j,
107
+ return /* @__PURE__ */ n.jsx(
108
+ R,
109
109
  {
110
- anchorEl: e,
110
+ anchorEl: t,
111
111
  anchorOrigin: { horizontal: "right", vertical: "bottom" },
112
- onClose: a,
113
- open: i,
114
- slotProps: { paper: { sx: { width: g } } },
112
+ onClose: e,
113
+ open: r,
114
+ slotProps: { paper: { sx: { width: m } } },
115
115
  transformOrigin: { horizontal: "right", vertical: "top" },
116
- children: u.map((n) => {
117
- const s = d === n.code;
118
- return /* @__PURE__ */ o.jsxs(
116
+ children: c.map((o) => {
117
+ const l = p === o.code;
118
+ return /* @__PURE__ */ n.jsxs(
119
119
  k,
120
120
  {
121
121
  onClick: () => {
122
- p(n.code);
122
+ f(o.code);
123
123
  },
124
- selected: s,
124
+ selected: l,
125
125
  sx: { gap: 1 },
126
126
  children: [
127
- /* @__PURE__ */ o.jsx(V, { children: /* @__PURE__ */ o.jsx(L, { alt: n.label, src: n.icon, height: r, width: r }) }),
128
- /* @__PURE__ */ o.jsx(R, { variant: "subtitle2", children: n.label })
127
+ /* @__PURE__ */ n.jsx(j, { children: /* @__PURE__ */ n.jsx(v, { alt: o.label, src: o.icon, height: i, width: i }) }),
128
+ /* @__PURE__ */ n.jsx(z, { variant: "subtitle2", children: o.label })
129
129
  ]
130
130
  },
131
- n.code
131
+ o.code
132
132
  );
133
133
  })
134
134
  }
135
135
  );
136
- }, x = ({
137
- languages: e = I,
138
- onLanguageChange: a,
139
- currentLanguage: i,
140
- tooltipText: l,
141
- buttonFlagSize: u = 24,
142
- menuFlagSize: d = 28,
143
- menuWidth: g = "220px",
144
- sx: r,
145
- useI18n: p = !0
136
+ }, V = ({
137
+ languages: t = y,
138
+ onLanguageChange: e,
139
+ currentLanguage: r,
140
+ tooltipText: a,
141
+ buttonFlagSize: c = 24,
142
+ menuFlagSize: p = 28,
143
+ menuWidth: m = "220px",
144
+ sx: i,
145
+ useI18n: f = !0
146
146
  }) => {
147
- var b;
148
- const { t: n, i18n: s } = p ? q() : { t: null, i18n: null }, m = C(), h = i || ((s == null ? void 0 : s.language) ?? ((b = e[0]) == null ? void 0 : b.code) ?? "en"), c = e.find((f) => f.code === h) || e[0], w = y.useCallback(
149
- (f) => {
150
- a ? a(f) : s && s.changeLanguage(f);
147
+ const { t: o, i18n: l } = f ? b() : { t: null, i18n: null }, d = O(), u = r || (l?.language ?? t[0]?.code ?? "en"), g = t.find((h) => h.code === u) || t[0], L = x.useCallback(
148
+ (h) => {
149
+ e ? e(h) : l && l.changeLanguage(h);
151
150
  },
152
- [a, s]
153
- ), _ = l || (n ? n("header:language.tooltip") : "Change language");
154
- return /* @__PURE__ */ o.jsxs(y.Fragment, { children: [
155
- /* @__PURE__ */ o.jsx(
156
- T,
151
+ [e, l]
152
+ ), S = a || (o ? o("header:language.tooltip") : "Change language");
153
+ return /* @__PURE__ */ n.jsxs(x.Fragment, { children: [
154
+ /* @__PURE__ */ n.jsx(
155
+ w,
157
156
  {
158
- onClick: m.handleOpen,
159
- ref: m.anchorRef,
160
- sx: { display: { xs: "none", lg: "inline-flex" }, ...r },
157
+ onClick: d.handleOpen,
158
+ ref: d.anchorRef,
159
+ sx: { display: { xs: "none", lg: "inline-flex" }, ...i },
161
160
  tooltipOptions: {
162
- title: _,
161
+ title: S,
163
162
  placement: "top"
164
163
  },
165
- children: /* @__PURE__ */ o.jsx(
166
- L,
164
+ children: /* @__PURE__ */ n.jsx(
165
+ v,
167
166
  {
168
- alt: (c == null ? void 0 : c.label) || h,
169
- src: (c == null ? void 0 : c.icon) || "",
170
- height: u,
171
- width: u
167
+ alt: g?.label || u,
168
+ src: g?.icon || "",
169
+ height: c,
170
+ width: c
172
171
  }
173
172
  )
174
173
  }
175
174
  ),
176
- /* @__PURE__ */ o.jsx(
177
- v,
175
+ /* @__PURE__ */ n.jsx(
176
+ U,
178
177
  {
179
- anchorEl: m.anchorRef.current,
180
- onClose: m.handleClose,
181
- open: m.open,
182
- onLanguageChange: w,
183
- languages: e,
184
- currentLanguage: h,
185
- menuWidth: g,
186
- flagSize: d
178
+ anchorEl: d.anchorRef.current,
179
+ onClose: d.handleClose,
180
+ open: d.open,
181
+ onLanguageChange: L,
182
+ languages: t,
183
+ currentLanguage: u,
184
+ menuWidth: m,
185
+ flagSize: p
187
186
  }
188
187
  )
189
188
  ] });
190
189
  };
191
- x.displayName = "SLanguageSwitcher";
192
- try {
193
- v.displayName = "SLanguagePopover", v.__docgenInfo = { description: "", displayName: "SLanguagePopover", props: { anchorEl: { defaultValue: null, description: "", name: "anchorEl", required: !0, type: { name: "Element | null" } }, onClose: { defaultValue: null, description: "", name: "onClose", required: !1, type: { name: "(() => void)" } }, open: { defaultValue: { value: "false" }, description: "", name: "open", required: !1, type: { name: "boolean" } }, onLanguageChange: { defaultValue: null, description: "", name: "onLanguageChange", required: !1, type: { name: "((languageCode: string) => void)" } }, languages: { defaultValue: { value: `[
194
- { code: 'en', label: 'English', icon: '/assets/flag-uk.svg' },
195
- { code: 'vi', label: 'Vietnamese', icon: '/assets/flag-vi.svg' },
196
- ]` }, description: "", name: "languages", required: !1, type: { name: "SLanguageOption[]" } }, currentLanguage: { defaultValue: null, description: "", name: "currentLanguage", required: !1, type: { name: "string" } }, menuWidth: { defaultValue: { value: "220px" }, description: "", name: "menuWidth", required: !1, type: { name: "string | number" } }, flagSize: { defaultValue: { value: "28" }, description: "", name: "flagSize", required: !1, type: { name: "number" } } } };
197
- } catch {
198
- }
199
- try {
200
- x.displayName = "SLanguageSwitcher", x.__docgenInfo = { description: "A language switcher component with flag icons and dropdown menu.", displayName: "SLanguageSwitcher", props: { languages: { defaultValue: { value: `[
201
- { code: 'en', label: 'English', icon: '/assets/flag-uk.svg' },
202
- { code: 'vi', label: 'Vietnamese', icon: '/assets/flag-vi.svg' },
203
- ]` }, description: "Custom language options to display", name: "languages", required: !1, type: { name: "SLanguageOption[]" } }, onLanguageChange: { defaultValue: null, description: "Callback when language changes (if not provided, will use i18n.changeLanguage)", name: "onLanguageChange", required: !1, type: { name: "((languageCode: string) => void)" } }, currentLanguage: { defaultValue: null, description: "Current language code (if not provided, will use i18n.language)", name: "currentLanguage", required: !1, type: { name: "string" } }, tooltipText: { defaultValue: null, description: "Tooltip text for the language button", name: "tooltipText", required: !1, type: { name: "string" } }, buttonFlagSize: { defaultValue: { value: "24" }, description: "Size of the flag icon in the button", name: "buttonFlagSize", required: !1, type: { name: "number" } }, menuFlagSize: { defaultValue: { value: "28" }, description: "Size of the flag icon in the menu", name: "menuFlagSize", required: !1, type: { name: "number" } }, menuWidth: { defaultValue: { value: "220px" }, description: "Width of the language menu", name: "menuWidth", required: !1, type: { name: "string | number" } }, sx: { defaultValue: null, description: "Custom styles for the icon button", name: "sx", required: !1, type: { name: "SxProps<Theme>" } }, useI18n: { defaultValue: { value: "true" }, description: "Whether to use i18n integration", name: "useI18n", required: !1, type: { name: "boolean" } } } };
204
- } catch {
205
- }
206
- try {
207
- slanguageswitcher.displayName = "slanguageswitcher", slanguageswitcher.__docgenInfo = { description: "A language switcher component with flag icons and dropdown menu.", displayName: "slanguageswitcher", props: { languages: { defaultValue: { value: `[
208
- { code: 'en', label: 'English', icon: '/assets/flag-uk.svg' },
209
- { code: 'vi', label: 'Vietnamese', icon: '/assets/flag-vi.svg' },
210
- ]` }, description: "Custom language options to display", name: "languages", required: !1, type: { name: "SLanguageOption[]" } }, onLanguageChange: { defaultValue: null, description: "Callback when language changes (if not provided, will use i18n.changeLanguage)", name: "onLanguageChange", required: !1, type: { name: "((languageCode: string) => void)" } }, currentLanguage: { defaultValue: null, description: "Current language code (if not provided, will use i18n.language)", name: "currentLanguage", required: !1, type: { name: "string" } }, tooltipText: { defaultValue: null, description: "Tooltip text for the language button", name: "tooltipText", required: !1, type: { name: "string" } }, buttonFlagSize: { defaultValue: { value: "24" }, description: "Size of the flag icon in the button", name: "buttonFlagSize", required: !1, type: { name: "number" } }, menuFlagSize: { defaultValue: { value: "28" }, description: "Size of the flag icon in the menu", name: "menuFlagSize", required: !1, type: { name: "number" } }, menuWidth: { defaultValue: { value: "220px" }, description: "Width of the language menu", name: "menuWidth", required: !1, type: { name: "string | number" } }, sx: { defaultValue: null, description: "Custom styles for the icon button", name: "sx", required: !1, type: { name: "SxProps<Theme>" } }, useI18n: { defaultValue: { value: "true" }, description: "Whether to use i18n integration", name: "useI18n", required: !1, type: { name: "boolean" } } } };
211
- } catch {
212
- }
190
+ V.displayName = "SLanguageSwitcher";
213
191
  export {
214
- v as SLanguagePopover,
215
- x as SLanguageSwitcher,
216
- x as default,
217
- I as defaultLanguageOptions
192
+ U as SLanguagePopover,
193
+ V as SLanguageSwitcher,
194
+ V as default,
195
+ y as defaultLanguageOptions
218
196
  };
@@ -1,12 +1,4 @@
1
- import { default as i } from "./s-lazy-image.js";
2
- try {
3
- slazyimage.displayName = "slazyimage", slazyimage.__docgenInfo = { description: "A lazy-loading image component with skeleton placeholder.", displayName: "slazyimage", props: { src: { defaultValue: null, description: "Image source URL", name: "src", required: !0, type: { name: "string" } }, variant: { defaultValue: { value: "rounded" }, description: "Skeleton variant while loading", name: "variant", required: !1, type: { name: "enum", value: [{ value: '"text"' }, { value: '"rectangular"' }, { value: '"rounded"' }, { value: '"circular"' }] } }, style: { defaultValue: null, description: "Custom styles applied to both skeleton and loaded image", name: "style", required: !1, type: { name: "CSSProperties" } }, height: { defaultValue: { value: "100%" }, description: "Image height", name: "height", required: !1, type: { name: "string | number" } }, width: { defaultValue: { value: "100%" }, description: "Image width", name: "width", required: !1, type: { name: "string | number" } }, minWidth: { defaultValue: { value: "auto" }, description: "Minimum width constraint", name: "minWidth", required: !1, type: { name: "string | number" } }, minHeight: { defaultValue: { value: "auto" }, description: "Minimum height constraint", name: "minHeight", required: !1, type: { name: "string | number" } } } };
4
- } catch {
5
- }
6
- try {
7
- SLazyImageProps.displayName = "SLazyImageProps", SLazyImageProps.__docgenInfo = { description: "Props for the SLazyImage component", displayName: "SLazyImageProps", props: {} };
8
- } catch {
9
- }
1
+ import { default as o } from "./s-lazy-image.js";
10
2
  export {
11
- i as default
3
+ o as default
12
4
  };
@@ -1,61 +1,57 @@
1
- import { j as i } from "../jsx-runtime-OVHDjVDe.js";
2
- import { useId as h, useState as v } from "react";
3
- import { useTheme as I, Box as m, Skeleton as x } from "@mui/material";
4
- const n = ({
5
- src: u,
1
+ import { j as a } from "../jsx-runtime-tc70JA_2.js";
2
+ import { useId as j, useState as y } from "react";
3
+ import { useTheme as L, Box as u, Skeleton as I } from "@mui/material";
4
+ const S = ({
5
+ src: n,
6
6
  variant: e = "rounded",
7
- height: a = "100%",
8
- width: t = "100%",
9
- style: l,
10
- minWidth: s = "auto",
11
- minHeight: d = "auto",
12
- onLoad: r,
7
+ height: o = "100%",
8
+ width: s = "100%",
9
+ style: r,
10
+ minWidth: d = "auto",
11
+ minHeight: m = "auto",
12
+ onLoad: l,
13
13
  ...p
14
14
  }) => {
15
- const c = h(), g = I(), [o, y] = v(!1);
16
- return /* @__PURE__ */ i.jsxs(m, { height: a, width: t, children: [
17
- !o && /* @__PURE__ */ i.jsx(
18
- x,
15
+ const c = j(), x = L(), [t, i] = y(!1);
16
+ return /* @__PURE__ */ a.jsxs(u, { height: o, width: s, children: [
17
+ !t && /* @__PURE__ */ a.jsx(
18
+ I,
19
19
  {
20
20
  variant: e,
21
21
  id: `image-skeleton-${c}`,
22
22
  animation: "wave",
23
23
  style: {
24
- height: a,
25
- width: t,
26
- minWidth: s,
27
- minHeight: d,
28
- ...l
24
+ height: o,
25
+ width: s,
26
+ minWidth: d,
27
+ minHeight: m,
28
+ ...r
29
29
  }
30
30
  }
31
31
  ),
32
- /* @__PURE__ */ i.jsx(
33
- m,
32
+ /* @__PURE__ */ a.jsx(
33
+ u,
34
34
  {
35
35
  component: "img",
36
- src: u,
36
+ src: n,
37
37
  style: {
38
- height: a,
39
- width: t,
40
- minWidth: s,
41
- minHeight: d,
42
- display: o ? "block" : "none",
43
- borderRadius: e === "circular" ? "50%" : e === "rounded" ? g.shape.borderRadius : "0px",
44
- ...l
38
+ height: o,
39
+ width: s,
40
+ minWidth: d,
41
+ minHeight: m,
42
+ display: t ? "block" : "none",
43
+ borderRadius: e === "circular" ? "50%" : e === "rounded" ? x.shape.borderRadius : "0px",
44
+ ...r
45
45
  },
46
46
  onLoad: (f) => {
47
- y(!0), r == null || r(f);
47
+ i(!0), l?.(f);
48
48
  },
49
49
  ...p
50
50
  }
51
51
  )
52
52
  ] });
53
53
  };
54
- n.displayName = "SLazyImage";
55
- try {
56
- n.displayName = "SLazyImage", n.__docgenInfo = { description: "A lazy-loading image component with skeleton placeholder.", displayName: "SLazyImage", props: { src: { defaultValue: null, description: "Image source URL", name: "src", required: !0, type: { name: "string" } }, variant: { defaultValue: { value: "rounded" }, description: "Skeleton variant while loading", name: "variant", required: !1, type: { name: "enum", value: [{ value: '"text"' }, { value: '"rectangular"' }, { value: '"rounded"' }, { value: '"circular"' }] } }, style: { defaultValue: null, description: "Custom styles applied to both skeleton and loaded image", name: "style", required: !1, type: { name: "CSSProperties" } }, height: { defaultValue: { value: "100%" }, description: "Image height", name: "height", required: !1, type: { name: "string | number" } }, width: { defaultValue: { value: "100%" }, description: "Image width", name: "width", required: !1, type: { name: "string | number" } }, minWidth: { defaultValue: { value: "auto" }, description: "Minimum width constraint", name: "minWidth", required: !1, type: { name: "string | number" } }, minHeight: { defaultValue: { value: "auto" }, description: "Minimum height constraint", name: "minHeight", required: !1, type: { name: "string | number" } } } };
57
- } catch {
58
- }
54
+ S.displayName = "SLazyImage";
59
55
  export {
60
- n as default
56
+ S as default
61
57
  };