@solostylist/ui-kit 1.0.161 → 1.0.162

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.
@@ -34,9 +34,10 @@ export interface SDialogProps {
34
34
  * - Consistent title styling with capitalization
35
35
  * - Flexible content and action areas
36
36
  * - Proper spacing and alignment for title elements
37
+ * - Ref forwarding to DialogContent for scroll control
37
38
  *
38
39
  * @param props - SDialogProps with dialog configuration and content
39
40
  * @returns JSX.Element - Enhanced Material-UI Dialog
40
41
  */
41
- declare const SDialog: ({ title, content, actions, onClose, open, maxWidth, useForm, onSubmit, showClose, }: SDialogProps) => React.JSX.Element;
42
+ declare const SDialog: React.ForwardRefExoticComponent<SDialogProps & React.RefAttributes<HTMLDivElement>>;
42
43
  export default SDialog;
@@ -1,31 +1,35 @@
1
1
  import { j as r } from "../jsx-runtime-OVHDjVDe.js";
2
+ import * as f from "react";
2
3
  import { C as j } from "../Close-D4kX7Vbc.js";
3
- import { Dialog as h, DialogTitle as p, Stack as f, Typography as t, IconButton as m, DialogContent as g, DialogActions as u } from "@mui/material";
4
- const v = ({
5
- title: s,
6
- content: e,
7
- actions: i,
8
- onClose: n = () => {
9
- },
10
- open: a = !1,
11
- maxWidth: l = "sm",
12
- useForm: c = !1,
13
- onSubmit: x = () => {
14
- },
15
- showClose: d = !0
16
- }) => {
17
- const o = /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
18
- e && /* @__PURE__ */ r.jsx(g, { children: typeof e == "string" ? /* @__PURE__ */ r.jsx(t, { color: "text.secondary", variant: "body2", children: e }) : e }),
19
- i && /* @__PURE__ */ r.jsx(u, { children: i })
20
- ] });
21
- return /* @__PURE__ */ r.jsxs(h, { fullWidth: !0, maxWidth: l, onClose: n, open: a, children: [
22
- s && /* @__PURE__ */ r.jsx(p, { children: /* @__PURE__ */ r.jsxs(f, { direction: "row", spacing: 3, sx: { alignItems: "center", justifyContent: "space-between" }, children: [
23
- typeof s == "string" ? /* @__PURE__ */ r.jsx(t, { variant: "h5", textTransform: "capitalize", children: s }) : /* @__PURE__ */ r.jsx("div", { children: s }),
24
- d && /* @__PURE__ */ r.jsx(m, { onClick: n, children: /* @__PURE__ */ r.jsx(j, {}) })
25
- ] }) }),
26
- c ? /* @__PURE__ */ r.jsx("form", { onSubmit: x, children: o }) : o
27
- ] });
28
- };
4
+ import { Dialog as m, DialogTitle as h, Stack as g, Typography as n, IconButton as u, DialogContent as y, DialogActions as D } from "@mui/material";
5
+ const w = f.forwardRef(
6
+ ({
7
+ title: s,
8
+ content: e,
9
+ actions: i,
10
+ onClose: o = () => {
11
+ },
12
+ open: t = !1,
13
+ maxWidth: l = "sm",
14
+ useForm: c = !1,
15
+ onSubmit: d = () => {
16
+ },
17
+ showClose: x = !0
18
+ }, p) => {
19
+ const a = /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
20
+ e && /* @__PURE__ */ r.jsx(y, { ref: p, children: typeof e == "string" ? /* @__PURE__ */ r.jsx(n, { color: "text.secondary", variant: "body2", children: e }) : e }),
21
+ i && /* @__PURE__ */ r.jsx(D, { children: i })
22
+ ] });
23
+ return /* @__PURE__ */ r.jsxs(m, { fullWidth: !0, maxWidth: l, onClose: o, open: t, children: [
24
+ s && /* @__PURE__ */ r.jsx(h, { children: /* @__PURE__ */ r.jsxs(g, { direction: "row", spacing: 3, sx: { alignItems: "center", justifyContent: "space-between" }, children: [
25
+ typeof s == "string" ? /* @__PURE__ */ r.jsx(n, { variant: "h5", textTransform: "capitalize", children: s }) : /* @__PURE__ */ r.jsx("div", { children: s }),
26
+ x && /* @__PURE__ */ r.jsx(u, { onClick: o, children: /* @__PURE__ */ r.jsx(j, {}) })
27
+ ] }) }),
28
+ c ? /* @__PURE__ */ r.jsx("form", { onSubmit: d, children: a }) : a
29
+ ] });
30
+ }
31
+ );
32
+ w.displayName = "SDialog";
29
33
  export {
30
- v as default
34
+ w as default
31
35
  };
@@ -5,32 +5,45 @@ import { default as React } from 'react';
5
5
  export interface STextTruncationProps {
6
6
  /** The text content to display with truncation functionality */
7
7
  text?: string;
8
+ /** Variant to control display behavior: 'expandable' shows See more/less link, 'tooltip' shows ellipsis with hover tooltip */
9
+ variant?: 'expandable' | 'tooltip';
10
+ /** Number of lines to display before truncation (default: 3) */
11
+ lines?: number;
8
12
  }
9
13
  /**
10
- * Text truncation component with expandable "See more" functionality
14
+ * Text truncation component with expandable "See more" functionality or tooltip display
11
15
  *
12
- * Automatically truncates long text content and provides a "See more" link
13
- * to expand the full content. The truncation threshold is set at 20 words.
14
- * Uses CSS classes for styling the truncated vs expanded states.
16
+ * Automatically truncates long text content and provides either:
17
+ * - 'expandable' (default): A "See more" link to expand the full content
18
+ * - 'tooltip': Shows ellipsis with full text displayed on hover
19
+ *
20
+ * The truncation threshold is set at 20 words for expandable variant.
21
+ * All styling is handled inline using Material-UI's sx prop.
15
22
  *
16
23
  * Features:
17
- * - Automatic word count-based truncation (20+ words triggers truncation)
18
- * - Toggle between truncated and expanded states
19
- * - CSS class-based styling for different states
24
+ * - Automatic word count-based truncation (20+ words triggers truncation in expandable mode)
25
+ * - Expandable variant: Toggle between truncated and expanded states
26
+ * - Tooltip variant: Hover to see full text
27
+ * - Inline sx prop styling for all states
20
28
  * - Accessible link interaction for expansion/collapse
21
- *
22
- * Requires accompanying CSS file (./index.css) that defines:
23
- * - .truncated-text: Styling for truncated state
24
- * - .full-text: Styling for expanded state
25
- * - .see-more: Styling for the toggle link
29
+ * - Dynamic line control via props
26
30
  *
27
31
  * @param text - The text content to display and potentially truncate
32
+ * @param variant - Display variant: 'expandable' for See more/less link, 'tooltip' for hover tooltip
33
+ * @param lines - Number of lines to display before truncation (default: 3)
28
34
  * @returns JSX element containing text with optional truncation controls
29
35
  *
30
36
  * @example
31
37
  * ```tsx
38
+ * // Expandable variant (default)
32
39
  * <STextTruncation text="Very long text content that will be truncated after twenty words and show a see more link for users to expand the full content when needed..." />
40
+ *
41
+ * // Tooltip variant
42
+ * <STextTruncation variant="tooltip" text="Very long text content that will show ellipsis and display full text on hover..." />
43
+ *
44
+ * // Custom line count
45
+ * <STextTruncation lines={5} text="Long text..." />
33
46
  * ```
34
47
  */
35
- declare const STextTruncation: ({ text }: STextTruncationProps) => React.JSX.Element;
48
+ declare const STextTruncation: ({ text, variant, lines }: STextTruncationProps) => React.JSX.Element;
36
49
  export default STextTruncation;
@@ -1,15 +1,56 @@
1
- import { j as r } from "../jsx-runtime-OVHDjVDe.js";
2
- import { useState as a, Fragment as t } from "react";
3
- import { Typography as i, Link as l } from "@mui/material";
4
- import '../assets/s-text-truncation.css';const d = ({ text: e }) => {
5
- const [s, n] = a(!1), o = () => {
6
- n(!s);
1
+ import { j as i } from "../jsx-runtime-OVHDjVDe.js";
2
+ import { useState as a, Fragment as p } from "react";
3
+ import { Tooltip as d, Typography as r, Link as c } from "@mui/material";
4
+ const f = ({ text: e, variant: n = "expandable", lines: o = 3 }) => {
5
+ const [l, s] = a(!1), t = () => {
6
+ s(!l);
7
7
  };
8
- return /* @__PURE__ */ r.jsxs(t, { children: [
9
- /* @__PURE__ */ r.jsx(i, { className: s ? "full-text" : "truncated-text", variant: "body2", children: e }),
10
- e && (e == null ? void 0 : e.split(" ").length) > 20 ? /* @__PURE__ */ r.jsx(l, { className: "see-more", onClick: o, sx: { cursor: "pointer", fontSize: "0.875rem" }, children: s ? "See less" : "See more" }) : null
8
+ return n === "tooltip" ? /* @__PURE__ */ i.jsx(d, { title: e || "", arrow: !0, children: /* @__PURE__ */ i.jsx(
9
+ r,
10
+ {
11
+ variant: "body2",
12
+ sx: {
13
+ display: "-webkit-box",
14
+ WebkitBoxOrient: "vertical",
15
+ overflow: "hidden",
16
+ textOverflow: "ellipsis",
17
+ WebkitLineClamp: o,
18
+ lineClamp: o
19
+ },
20
+ children: e
21
+ }
22
+ ) }) : /* @__PURE__ */ i.jsxs(p, { children: [
23
+ /* @__PURE__ */ i.jsx(
24
+ r,
25
+ {
26
+ variant: "body2",
27
+ sx: l ? {
28
+ display: "block"
29
+ } : {
30
+ display: "-webkit-box",
31
+ WebkitBoxOrient: "vertical",
32
+ overflow: "hidden",
33
+ textOverflow: "ellipsis",
34
+ WebkitLineClamp: o,
35
+ lineClamp: o
36
+ },
37
+ children: e
38
+ }
39
+ ),
40
+ e && (e == null ? void 0 : e.split(" ").length) > 20 ? /* @__PURE__ */ i.jsx(
41
+ c,
42
+ {
43
+ onClick: t,
44
+ sx: {
45
+ cursor: "pointer",
46
+ fontSize: "0.875rem",
47
+ display: "inline-block"
48
+ },
49
+ children: l ? "See less" : "See more"
50
+ }
51
+ ) : null
11
52
  ] });
12
53
  };
13
54
  export {
14
- d as default
55
+ f as default
15
56
  };
@@ -42,6 +42,7 @@ declare module '@mui/material/styles' {
42
42
  secondary: string;
43
43
  indigo: string;
44
44
  sky: string;
45
+ radial: string;
45
46
  };
46
47
  ui: {
47
48
  pulse: {
@@ -256,6 +257,7 @@ export declare const colorSchemes: {
256
257
  secondary: string;
257
258
  indigo: string;
258
259
  sky: string;
260
+ radial: string;
259
261
  };
260
262
  blackAlpha: {
261
263
  zero: string;
@@ -347,6 +349,7 @@ export declare const colorSchemes: {
347
349
  secondary: string;
348
350
  indigo: string;
349
351
  sky: string;
352
+ radial: string;
350
353
  };
351
354
  blackAlpha: {
352
355
  zero: string;
@@ -1,6 +1,6 @@
1
1
  import { a as m } from "../createTheme-3Wd3hHrj.js";
2
2
  import { a as r } from "../colorManipulator-ep5lERxB.js";
3
- const l = m(), e = {
3
+ const s = m(), e = {
4
4
  50: "hsl(210, 100%, 95%)",
5
5
  100: "hsl(210, 100%, 92%)",
6
6
  200: "hsl(210, 100%, 80%)",
@@ -11,7 +11,7 @@ const l = m(), e = {
11
11
  700: "hsl(210, 100%, 35%)",
12
12
  800: "hsl(210, 100%, 16%)",
13
13
  900: "hsl(210, 100%, 21%)"
14
- }, n = {
14
+ }, i = {
15
15
  50: "hsl(220, 60%, 98%)",
16
16
  100: "hsl(220, 55%, 95%)",
17
17
  200: "hsl(220, 50%, 88%)",
@@ -22,7 +22,7 @@ const l = m(), e = {
22
22
  700: "hsl(220, 95%, 31%)",
23
23
  800: "hsl(220, 100%, 24%)",
24
24
  900: "hsl(220, 100%, 18%)"
25
- }, t = {
25
+ }, a = {
26
26
  50: "hsl(220, 35%, 97%)",
27
27
  100: "hsl(220, 30%, 94%)",
28
28
  200: "hsl(220, 20%, 88%)",
@@ -33,7 +33,7 @@ const l = m(), e = {
33
33
  700: "hsl(220, 20%, 25%)",
34
34
  800: "hsl(220, 30%, 6%)",
35
35
  900: "hsl(220, 35%, 3%)"
36
- }, a = {
36
+ }, t = {
37
37
  50: "hsl(210, 20%, 98%)",
38
38
  100: "hsl(210, 15%, 95%)",
39
39
  200: "hsl(210, 12%, 89%)",
@@ -44,7 +44,7 @@ const l = m(), e = {
44
44
  700: "hsl(210, 18%, 35%)",
45
45
  800: "hsl(210, 24%, 28%)",
46
46
  900: "hsl(210, 30%, 22%)"
47
- }, i = {
47
+ }, n = {
48
48
  50: "hsl(120, 80%, 98%)",
49
49
  100: "hsl(120, 75%, 94%)",
50
50
  200: "hsl(120, 75%, 87%)",
@@ -166,7 +166,7 @@ const l = m(), e = {
166
166
  80: "rgba(0,0,0,0.8)",
167
167
  90: "rgba(0,0,0,0.9)",
168
168
  100: "rgba(0,0,0,1)"
169
- }, s = {
169
+ }, l = {
170
170
  0: "rgba(255,255,255,0)",
171
171
  10: "rgba(255,255,255,0.1)",
172
172
  20: "rgba(255,255,255,0.2)",
@@ -184,7 +184,8 @@ const l = m(), e = {
184
184
  primary: "linear-gradient(90deg, #1469be 0%, #43ecff 100%);",
185
185
  secondary: "linear-gradient(90deg, #0088F6 0%, #1DDD83 77.25%)",
186
186
  indigo: "linear-gradient(to right, transparent, #6366f1, transparent)",
187
- sky: "linear-gradient(to right, transparent, #0ea5e9, transparent)"
187
+ sky: "linear-gradient(to right, transparent, #0ea5e9, transparent)",
188
+ radial: "radial-gradient(at 50% 50%, hsla(210, 100%, 16%, 0.5), hsl(220, 30%, 5%))"
188
189
  },
189
190
  blackAlpha: {
190
191
  zero: h[0],
@@ -194,19 +195,19 @@ const l = m(), e = {
194
195
  full: h[100]
195
196
  },
196
197
  whiteAlpha: {
197
- zero: s[0],
198
- light: s[10],
199
- medium: s[50],
200
- dark: s[80],
201
- full: s[100]
198
+ zero: l[0],
199
+ light: l[10],
200
+ medium: l[50],
201
+ dark: l[80],
202
+ full: l[100]
202
203
  },
203
204
  ui: {
204
205
  pulse: {
205
- shadowLight: s[30],
206
- shadowMedium: s[60],
207
- ring: s[80],
208
- background: s[80],
209
- radialGradient: `radial-gradient(circle, ${s[30]} 0%, ${s[10]} 50%, transparent 100%)`
206
+ shadowLight: l[30],
207
+ shadowMedium: l[60],
208
+ ring: l[80],
209
+ background: l[80],
210
+ radialGradient: `radial-gradient(circle, ${l[30]} 0%, ${l[10]} 50%, transparent 100%)`
210
211
  }
211
212
  },
212
213
  primary: {
@@ -236,24 +237,24 @@ const l = m(), e = {
236
237
  dark: b[700]
237
238
  },
238
239
  success: {
239
- contrastText: i[50],
240
- light: i[400],
241
- main: i[500],
242
- dark: i[700]
240
+ contrastText: n[50],
241
+ light: n[400],
242
+ main: n[500],
243
+ dark: n[700]
243
244
  },
244
- grey: t,
245
- divider: r(t[700], 0.6),
245
+ grey: a,
246
+ divider: r(a[700], 0.6),
246
247
  background: {
247
- default: t[900],
248
- paper: t[800]
248
+ default: a[900],
249
+ paper: a[800]
249
250
  },
250
251
  text: {
251
252
  primary: "rgb(255, 255, 255)",
252
- secondary: t[400]
253
+ secondary: a[400]
253
254
  },
254
255
  action: {
255
- hover: r(t[600], 0.2),
256
- selected: r(t[600], 0.3)
256
+ hover: r(a[600], 0.2),
257
+ selected: r(a[600], 0.3)
257
258
  },
258
259
  baseShadow: "hsla(220, 30%, 5%, 0.7) 0px 4px 16px 0px, hsla(220, 25%, 10%, 0.8) 0px 8px 16px -5px"
259
260
  }
@@ -263,7 +264,8 @@ const l = m(), e = {
263
264
  primary: "linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%)",
264
265
  secondary: "linear-gradient(90deg, #8b5cf6 0%, #ec4899 100%)",
265
266
  indigo: "linear-gradient(to right, transparent, rgba(79, 70, 229, 0.6), transparent)",
266
- sky: "linear-gradient(to right, transparent, rgba(14, 165, 233, 0.55), transparent)"
267
+ sky: "linear-gradient(to right, transparent, rgba(14, 165, 233, 0.55), transparent)",
268
+ radial: "radial-gradient(at 50% 50%, hsla(210, 100%, 84%, 0.5), hsl(220, 30%, 95%))"
267
269
  },
268
270
  blackAlpha: {
269
271
  zero: h[0],
@@ -273,11 +275,11 @@ const l = m(), e = {
273
275
  full: h[100]
274
276
  },
275
277
  whiteAlpha: {
276
- zero: s[0],
277
- light: s[10],
278
- medium: s[50],
279
- dark: s[80],
280
- full: s[100]
278
+ zero: l[0],
279
+ light: l[10],
280
+ medium: l[50],
281
+ dark: l[80],
282
+ full: l[100]
281
283
  },
282
284
  ui: {
283
285
  pulse: {
@@ -289,10 +291,10 @@ const l = m(), e = {
289
291
  }
290
292
  },
291
293
  primary: {
292
- contrastText: n[50],
293
- light: n[200],
294
- main: n[500],
295
- dark: n[700],
294
+ contrastText: i[50],
295
+ light: i[200],
296
+ main: i[500],
297
+ dark: i[700],
296
298
  white: "#ffffff",
297
299
  black: "#000000"
298
300
  },
@@ -320,19 +322,19 @@ const l = m(), e = {
320
322
  main: o[500],
321
323
  dark: o[700]
322
324
  },
323
- grey: a,
324
- divider: r(a[300], 0.9),
325
+ grey: t,
326
+ divider: r(t[300], 0.9),
325
327
  background: {
326
- default: a[50],
327
- paper: a[100]
328
+ default: t[50],
329
+ paper: t[100]
328
330
  },
329
331
  text: {
330
332
  primary: "rgb(77, 77, 77)",
331
- secondary: a[500]
333
+ secondary: t[500]
332
334
  },
333
335
  action: {
334
- hover: r(a[300], 0.2),
335
- selected: r(a[300], 0.3)
336
+ hover: r(t[300], 0.2),
337
+ selected: r(t[300], 0.3)
336
338
  },
337
339
  baseShadow: "rgba(15, 23, 42, 0.08) 0px 2px 8px 0px, rgba(15, 23, 42, 0.04) 0px 1px 2px -1px"
338
340
  // Premium shadows with subtle slate tint
@@ -340,64 +342,64 @@ const l = m(), e = {
340
342
  }, z = { light: x, dark: y }, R = {
341
343
  fontFamily: "Outfit, sans-serif",
342
344
  h1: {
343
- fontSize: l.typography.pxToRem(48),
345
+ fontSize: s.typography.pxToRem(48),
344
346
  fontWeight: 600,
345
347
  lineHeight: 1.2,
346
348
  letterSpacing: -0.5
347
349
  },
348
350
  h2: {
349
- fontSize: l.typography.pxToRem(36),
351
+ fontSize: s.typography.pxToRem(36),
350
352
  fontWeight: 600,
351
353
  lineHeight: 1.2
352
354
  },
353
355
  h3: {
354
- fontSize: l.typography.pxToRem(30),
356
+ fontSize: s.typography.pxToRem(30),
355
357
  lineHeight: 1.2
356
358
  },
357
359
  h4: {
358
- fontSize: l.typography.pxToRem(24),
360
+ fontSize: s.typography.pxToRem(24),
359
361
  fontWeight: 600,
360
362
  lineHeight: 1.5
361
363
  },
362
364
  h5: {
363
- fontSize: l.typography.pxToRem(20),
365
+ fontSize: s.typography.pxToRem(20),
364
366
  fontWeight: 600
365
367
  },
366
368
  h6: {
367
- fontSize: l.typography.pxToRem(18),
369
+ fontSize: s.typography.pxToRem(18),
368
370
  fontWeight: 600
369
371
  },
370
372
  subtitle1: {
371
- fontSize: l.typography.pxToRem(18)
373
+ fontSize: s.typography.pxToRem(18)
372
374
  },
373
375
  subtitle2: {
374
- fontSize: l.typography.pxToRem(14),
376
+ fontSize: s.typography.pxToRem(14),
375
377
  fontWeight: 500
376
378
  },
377
379
  body1: {
378
- fontSize: l.typography.pxToRem(14)
380
+ fontSize: s.typography.pxToRem(14)
379
381
  },
380
382
  body2: {
381
- fontSize: l.typography.pxToRem(14),
383
+ fontSize: s.typography.pxToRem(14),
382
384
  fontWeight: 400
383
385
  },
384
386
  caption: {
385
- fontSize: l.typography.pxToRem(12),
387
+ fontSize: s.typography.pxToRem(12),
386
388
  fontWeight: 400
387
389
  }
388
390
  }, W = {
389
391
  borderRadius: 8
390
- }, u = ["none", "var(--s-palette-baseShadow)", ...l.shadows.slice(2)], A = u;
392
+ }, u = ["none", "var(--s-palette-baseShadow)", ...s.shadows.slice(2)], A = u;
391
393
  export {
392
394
  h as blackAlpha,
393
395
  d as blue,
394
396
  e as brand,
395
397
  z as colorSchemes,
396
- t as gray,
397
- i as green,
398
+ a as gray,
399
+ n as green,
398
400
  c as lightBlue,
399
- n as lightBrand,
400
- a as lightGray,
401
+ i as lightBrand,
402
+ t as lightGray,
401
403
  o as lightGreen,
402
404
  p as lightOrange,
403
405
  S as lightPurple,
@@ -408,5 +410,5 @@ export {
408
410
  A as shadows,
409
411
  W as shape,
410
412
  R as typography,
411
- s as whiteAlpha
413
+ l as whiteAlpha
412
414
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "registry": "https://registry.npmjs.org"
5
5
  },
6
- "version": "1.0.161",
6
+ "version": "1.0.162",
7
7
  "description": "advanced ui kit for solostylist",
8
8
  "private": false,
9
9
  "type": "module",
@@ -1 +0,0 @@
1
- .truncated-text{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.full-text{display:block}.see-more{display:inline-block}