@solostylist/ui-kit 1.0.167 → 1.0.168
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.
- package/dist/{Typography-B7LOtCzI.js → Typography-C8jwvSWe.js} +1 -1
- package/dist/main.d.ts +3 -3
- package/dist/main.js +182 -174
- package/dist/s-accordion/index.js +2 -2
- package/dist/s-accordion/s-accordion.d.ts +17 -1
- package/dist/s-accordion/s-accordion.js +252 -238
- package/dist/s-action-overlay/index.js +1 -1
- package/dist/s-action-overlay/s-action-overlay.d.ts +34 -1
- package/dist/s-action-overlay/s-action-overlay.js +67 -55
- package/dist/s-ai-tool-bar/index.d.ts +2 -0
- package/dist/s-ai-tool-bar/index.js +3 -2
- package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +33 -22
- package/dist/s-ai-tool-bar/s-ai-tool-bar.js +295 -247
- package/dist/s-autocomplete/index.js +2 -2
- package/dist/s-autocomplete/s-autocomplete.d.ts +13 -15
- package/dist/s-autocomplete/s-autocomplete.js +25 -17
- package/dist/s-avatar/index.js +2 -2
- package/dist/s-avatar/s-avatar.d.ts +16 -1
- package/dist/s-avatar/s-avatar.js +23 -10
- package/dist/s-blur-text/index.js +2 -2
- package/dist/s-blur-text/s-blur-text.d.ts +4 -13
- package/dist/s-blur-text/s-blur-text.js +57 -51
- package/dist/s-breadcrumbs/index.js +2 -2
- package/dist/s-breadcrumbs/s-breadcrumbs.d.ts +20 -1
- package/dist/s-breadcrumbs/s-breadcrumbs.js +39 -30
- package/dist/s-button/index.js +2 -2
- package/dist/s-button/s-button.d.ts +7 -1
- package/dist/s-button/s-button.js +15 -5
- package/dist/s-button-link/index.js +2 -2
- package/dist/s-button-link/s-button-link.d.ts +12 -26
- package/dist/s-button-link/s-button-link.js +36 -26
- package/dist/s-carousel/index.js +1 -1
- package/dist/s-carousel/s-carousel.d.ts +11 -1
- package/dist/s-carousel/s-carousel.js +233 -223
- package/dist/s-category-card/index.js +2 -2
- package/dist/s-category-card/s-category-card.d.ts +28 -1
- package/dist/s-category-card/s-category-card.js +77 -58
- package/dist/s-chat-input/index.js +2 -2
- package/dist/s-chat-input/s-chat-input.d.ts +12 -1
- package/dist/s-chat-input/s-chat-input.js +92 -82
- package/dist/s-chat-message/index.js +2 -2
- package/dist/s-chat-message/s-chat-message.d.ts +22 -1
- package/dist/s-chat-message/s-chat-message.js +144 -133
- package/dist/s-checkbox/index.js +2 -2
- package/dist/s-checkbox/s-checkbox.d.ts +2 -15
- package/dist/s-checkbox/s-checkbox.js +20 -10
- package/dist/s-chip/index.js +2 -2
- package/dist/s-chip/s-chip.d.ts +7 -1
- package/dist/s-chip/s-chip.js +15 -5
- package/dist/s-chips/index.js +2 -2
- package/dist/s-chips/s-chips.d.ts +5 -18
- package/dist/s-chips/s-chips.js +56 -41
- package/dist/s-comment-message/index.js +2 -2
- package/dist/s-comment-message/s-comment-message.d.ts +26 -1
- package/dist/s-comment-message/s-comment-message.js +95 -89
- package/dist/s-copyable-text/index.js +1 -1
- package/dist/s-copyable-text/s-copyable-text.d.ts +9 -36
- package/dist/s-copyable-text/s-copyable-text.js +31 -21
- package/dist/s-countdown/index.d.ts +3 -2
- package/dist/s-countdown/index.js +4 -3
- package/dist/s-countdown/s-count-box.d.ts +39 -0
- package/dist/s-countdown/s-count-box.js +112 -0
- package/dist/s-countdown/s-count-down.d.ts +6 -50
- package/dist/s-countdown/s-count-down.js +110 -175
- package/dist/s-data-table/index.js +2 -2
- package/dist/s-data-table/s-data-table.d.ts +9 -65
- package/dist/s-data-table/s-data-table.js +381 -371
- package/dist/s-date-picker/index.js +2 -2
- package/dist/s-date-picker/s-date-picker.d.ts +6 -17
- package/dist/s-date-picker/s-date-picker.js +124 -107
- package/dist/s-datetime-picker/index.js +2 -2
- package/dist/s-datetime-picker/s-datetime-picker.d.ts +5 -16
- package/dist/s-datetime-picker/s-datetime-picker.js +897 -887
- package/dist/s-dialog/index.js +2 -2
- package/dist/s-dialog/s-dialog.d.ts +3 -16
- package/dist/s-dialog/s-dialog.js +32 -23
- package/dist/s-dialog-confirm/index.js +3 -3
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +5 -13
- package/dist/s-dialog-confirm/s-dialog-confirm.js +55 -48
- package/dist/s-dialog-message/index.js +4 -4
- package/dist/s-dialog-message/s-dialog-message.d.ts +5 -15
- package/dist/s-dialog-message/s-dialog-message.js +45 -38
- package/dist/s-empty/index.js +2 -2
- package/dist/s-empty/s-empty.d.ts +5 -20
- package/dist/s-empty/s-empty.js +14 -4
- package/dist/s-error/index.js +2 -2
- package/dist/s-error/s-error.d.ts +5 -20
- package/dist/s-error/s-error.js +16 -6
- package/dist/s-error-layout/index.js +2 -2
- package/dist/s-error-layout/s-error-layout.d.ts +6 -1
- package/dist/s-error-layout/s-error-layout.js +60 -51
- package/dist/s-file-dropzone/index.js +2 -2
- package/dist/s-file-dropzone/s-file-dropzone.d.ts +6 -51
- package/dist/s-file-dropzone/s-file-dropzone.js +64 -54
- package/dist/s-file-icon/index.js +2 -2
- package/dist/s-file-icon/s-file-icon.d.ts +5 -25
- package/dist/s-file-icon/s-file-icon.js +14 -8
- package/dist/s-flex-box/index.js +2 -2
- package/dist/s-flex-box/s-flex-box.d.ts +10 -1
- package/dist/s-flex-box/s-flex-box.js +14 -4
- package/dist/s-form/index.js +2 -2
- package/dist/s-form/s-form.d.ts +5 -14
- package/dist/s-form/s-form.js +19 -9
- package/dist/s-gallery/index.js +33 -3
- package/dist/s-gallery/s-gallery.d.ts +3 -36
- package/dist/s-gallery/s-gallery.js +108 -78
- package/dist/s-glow-button/s-glow-button.d.ts +6 -42
- package/dist/s-glow-button/s-glow-button.js +29 -47
- package/dist/s-gradient-icon/index.d.ts +1 -1
- package/dist/s-gradient-icon/index.js +1 -1
- package/dist/s-gradient-icon/s-gradient-icon.d.ts +8 -68
- package/dist/s-gradient-icon/s-gradient-icon.js +54 -44
- package/dist/s-i18n-provider/index.js +1 -1
- package/dist/s-i18n-provider/s-i18n-provider.d.ts +5 -33
- package/dist/s-i18n-provider/s-i18n-provider.js +25 -15
- package/dist/s-icon-button/index.js +2 -2
- package/dist/s-icon-button/s-icon-button.d.ts +6 -19
- package/dist/s-icon-button/s-icon-button.js +14 -4
- package/dist/s-image-comparison/s-image-comparison.js +50 -45
- package/dist/s-image-modal/index.js +3 -3
- package/dist/s-image-modal/s-image-modal.d.ts +4 -20
- package/dist/s-image-modal/s-image-modal.js +150 -135
- package/dist/s-item-not-found/index.js +2 -2
- package/dist/s-item-not-found/s-item-not-found.d.ts +14 -1
- package/dist/s-item-not-found/s-item-not-found.js +21 -10
- package/dist/s-label/index.js +2 -2
- package/dist/s-label/s-label.d.ts +9 -25
- package/dist/s-label/s-label.js +19 -9
- package/dist/s-language-switcher/index.js +3 -3
- package/dist/s-language-switcher/s-language-switcher.d.ts +20 -33
- package/dist/s-language-switcher/s-language-switcher.js +137 -115
- package/dist/s-lazy-image/index.js +10 -2
- package/dist/s-lazy-image/s-lazy-image.d.ts +12 -58
- package/dist/s-lazy-image/s-lazy-image.js +53 -58
- package/dist/s-localization-provider/index.js +2 -2
- package/dist/s-localization-provider/s-localization-provider.d.ts +6 -27
- package/dist/s-localization-provider/s-localization-provider.js +157 -149
- package/dist/s-moving-border/index.js +2 -2
- package/dist/s-moving-border/s-moving-border.d.ts +3 -33
- package/dist/s-moving-border/s-moving-border.js +65 -55
- package/dist/s-multi-select/index.js +2 -2
- package/dist/s-multi-select/s-multi-select.d.ts +5 -15
- package/dist/s-multi-select/s-multi-select.js +54 -45
- package/dist/s-no-ssr/index.js +2 -2
- package/dist/s-no-ssr/s-no-ssr.d.ts +5 -33
- package/dist/s-no-ssr/s-no-ssr.js +21 -11
- package/dist/s-overlay-scrollbar/index.js +2 -2
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.d.ts +10 -1
- package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +16 -11
- package/dist/s-pagination/index.js +2 -2
- package/dist/s-pagination/s-pagination.d.ts +5 -23
- package/dist/s-pagination/s-pagination.js +17 -11
- package/dist/s-pixel-reveal/index.js +2 -2
- package/dist/s-pixel-reveal/s-pixel-reveal.d.ts +15 -1
- package/dist/s-pixel-reveal/s-pixel-reveal.js +83 -78
- package/dist/s-radial-pulse-animate/index.js +2 -2
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.d.ts +12 -1
- package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +52 -42
- package/dist/s-rating/index.js +2 -2
- package/dist/s-rating/s-rating.d.ts +7 -1
- package/dist/s-rating/s-rating.js +15 -5
- package/dist/s-review/index.js +2 -2
- package/dist/s-review/s-review.d.ts +25 -1
- package/dist/s-review/s-review.js +104 -97
- package/dist/s-scroll-reveal/index.js +2 -2
- package/dist/s-scroll-reveal/s-scroll-reveal.d.ts +17 -36
- package/dist/s-scroll-reveal/s-scroll-reveal.js +43 -33
- package/dist/s-scroll-to-top/index.js +2 -2
- package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +12 -17
- package/dist/s-scroll-to-top/s-scroll-to-top.js +20 -15
- package/dist/s-select/index.js +2 -2
- package/dist/s-select/s-select.d.ts +3 -22
- package/dist/s-select/s-select.js +76 -72
- package/dist/s-select-list/index.js +2 -2
- package/dist/s-select-list/s-select-list.d.ts +16 -19
- package/dist/s-select-list/s-select-list.js +33 -28
- package/dist/s-skeleton/index.js +2 -2
- package/dist/s-skeleton/s-skeleton.d.ts +6 -22
- package/dist/s-skeleton/s-skeleton.js +28 -18
- package/dist/s-snackbar-message/index.js +4 -4
- package/dist/s-snackbar-message/s-snackbar-message.d.ts +5 -23
- package/dist/s-snackbar-message/s-snackbar-message.js +38 -31
- package/dist/s-spotlight-cursor/index.js +2 -2
- package/dist/s-spotlight-cursor/s-spotlight-cursor.d.ts +10 -44
- package/dist/s-spotlight-cursor/s-spotlight-cursor.js +35 -29
- package/dist/s-stripe/index.d.ts +4 -1
- package/dist/s-stripe/index.js +7 -4
- package/dist/s-stripe/s-stripe-cvc.d.ts +8 -0
- package/dist/s-stripe/s-stripe-cvc.js +15 -0
- package/dist/s-stripe/s-stripe-expiry.d.ts +8 -0
- package/dist/s-stripe/s-stripe-expiry.js +15 -0
- package/dist/s-stripe/s-stripe-number.d.ts +8 -0
- package/dist/s-stripe/s-stripe-number.js +15 -0
- package/dist/s-stripe/s-stripe.d.ts +6 -85
- package/dist/s-stripe/s-stripe.js +24 -27
- package/dist/s-stripe/stripe-input.js +22 -18
- package/dist/s-tabs/index.js +6 -6
- package/dist/s-tabs/s-tab-panel.d.ts +11 -1
- package/dist/s-tabs/s-tab-panel.js +25 -16
- package/dist/s-tabs/s-tab.js +9 -5
- package/dist/s-tabs/s-tabs.d.ts +24 -3
- package/dist/s-tabs/s-tabs.js +34 -25
- package/dist/s-text-editor/index.js +3 -3
- package/dist/s-text-editor/s-text-editor-toolbar.js +91 -76
- package/dist/s-text-editor/s-text-editor.d.ts +13 -11
- package/dist/s-text-editor/s-text-editor.js +44 -30
- package/dist/s-text-field/index.js +2 -2
- package/dist/s-text-field/s-text-field.d.ts +6 -15
- package/dist/s-text-field/s-text-field.js +38 -28
- package/dist/s-text-shimmer/index.js +2 -2
- package/dist/s-text-shimmer/s-text-shimmer.d.ts +10 -1
- package/dist/s-text-shimmer/s-text-shimmer.js +27 -18
- package/dist/s-text-truncation/index.js +2 -2
- package/dist/s-text-truncation/s-text-truncation.d.ts +9 -38
- package/dist/s-text-truncation/s-text-truncation.js +34 -20
- package/dist/s-theme-demo/s-theme-demo.js +238 -223
- package/dist/s-theme-provider/index.js +1 -1
- package/dist/s-theme-provider/s-theme-provider.d.ts +5 -17
- package/dist/s-theme-provider/s-theme-provider.js +44 -34
- package/dist/s-theme-switch/s-theme-switch.js +23 -19
- package/dist/s-tip/index.js +2 -2
- package/dist/s-tip/s-tip.d.ts +5 -22
- package/dist/s-tip/s-tip.js +22 -12
- package/dist/s-two-pane-layout/index.js +10 -2
- package/dist/s-two-pane-layout/s-two-pane-layout.d.ts +7 -1
- package/dist/s-two-pane-layout/s-two-pane-layout.js +58 -48
- package/dist/s-typewriter-text/index.js +2 -2
- package/dist/s-typewriter-text/s-typewriter-text.d.ts +17 -1
- package/dist/s-typewriter-text/s-typewriter-text.js +37 -27
- package/dist/s-zoom-image/index.js +10 -2
- package/dist/s-zoom-image/s-zoom-image.d.ts +10 -42
- package/dist/s-zoom-image/s-zoom-image.js +62 -52
- package/dist/theme/components/alert.d.ts +1436 -1436
- package/dist/theme/components/button.d.ts +2150 -2150
- package/dist/theme/components/chip.d.ts +2 -2
- package/dist/theme/customizations/data-display.js +1 -1
- package/dist/{typographyClasses-C7fhAsUD.js → typographyClasses-DDyl9mok.js} +4 -4
- package/dist/{useMobilePicker-DgxcRrRB.js → useMobilePicker-C1RZZUWr.js} +1 -1
- package/package.json +10 -4
|
@@ -1,48 +1,58 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { TextField as
|
|
4
|
-
import
|
|
1
|
+
import { j as e } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { useState as h } from "react";
|
|
3
|
+
import { TextField as _, InputAdornment as w, IconButton as b } from "@mui/material";
|
|
4
|
+
import { SForm as u } from "../s-form/s-form.js";
|
|
5
5
|
import { c } from "../createSvgIcon-DxwgGAVe.js";
|
|
6
|
-
const
|
|
6
|
+
const j = c(/* @__PURE__ */ e.jsx("path", {
|
|
7
7
|
d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"
|
|
8
|
-
}), "Visibility"),
|
|
8
|
+
}), "Visibility"), S = c(/* @__PURE__ */ e.jsx("path", {
|
|
9
9
|
d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"
|
|
10
|
-
}), "VisibilityOff"),
|
|
11
|
-
label:
|
|
12
|
-
required:
|
|
13
|
-
error:
|
|
14
|
-
type:
|
|
15
|
-
htmlFor:
|
|
16
|
-
hint:
|
|
17
|
-
...
|
|
10
|
+
}), "VisibilityOff"), s = ({
|
|
11
|
+
label: t = "",
|
|
12
|
+
required: p = !1,
|
|
13
|
+
error: o,
|
|
14
|
+
type: r = "text",
|
|
15
|
+
htmlFor: l,
|
|
16
|
+
hint: m,
|
|
17
|
+
...n
|
|
18
18
|
}) => {
|
|
19
|
-
var
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
},
|
|
19
|
+
var a;
|
|
20
|
+
const [i, x] = h(!1), d = r === "password", f = () => {
|
|
21
|
+
x(!i);
|
|
22
|
+
}, g = d && i ? "text" : r, y = d ? /* @__PURE__ */ e.jsx(w, { position: "end", children: /* @__PURE__ */ e.jsx(
|
|
23
23
|
b,
|
|
24
24
|
{
|
|
25
25
|
"aria-label": "toggle password visibility",
|
|
26
|
-
onClick:
|
|
26
|
+
onClick: f,
|
|
27
27
|
edge: "end",
|
|
28
28
|
size: "small",
|
|
29
|
-
children:
|
|
29
|
+
children: i ? /* @__PURE__ */ e.jsx(S, {}) : /* @__PURE__ */ e.jsx(j, {})
|
|
30
30
|
}
|
|
31
31
|
) }) : void 0;
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
|
|
32
|
+
return /* @__PURE__ */ e.jsx(u, { label: t, hint: m, error: o, required: p, htmlFor: l, children: /* @__PURE__ */ e.jsx(
|
|
33
|
+
_,
|
|
34
34
|
{
|
|
35
35
|
fullWidth: !0,
|
|
36
|
-
type:
|
|
37
|
-
id:
|
|
38
|
-
error: !!
|
|
39
|
-
...
|
|
36
|
+
type: g,
|
|
37
|
+
id: l,
|
|
38
|
+
error: !!o,
|
|
39
|
+
...n,
|
|
40
40
|
slotProps: {
|
|
41
|
-
input: { endAdornment:
|
|
41
|
+
input: { endAdornment: y, ...(a = n.slotProps) == null ? void 0 : a.input }
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
) });
|
|
45
45
|
};
|
|
46
|
+
s.displayName = "STextField";
|
|
47
|
+
try {
|
|
48
|
+
s.displayName = "STextField", s.__docgenInfo = { description: "An enhanced text field component with integrated form labeling, error handling, and password visibility toggle.", displayName: "STextField", props: {} };
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
stextfield.displayName = "stextfield", stextfield.__docgenInfo = { description: "An enhanced text field component with integrated form labeling, error handling, and password visibility toggle.", displayName: "stextfield", props: {} };
|
|
53
|
+
} catch {
|
|
54
|
+
}
|
|
46
55
|
export {
|
|
47
|
-
|
|
56
|
+
s as STextField,
|
|
57
|
+
s as default
|
|
48
58
|
};
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material';
|
|
2
|
+
/**
|
|
3
|
+
* Props interface for STextShimmer component
|
|
4
|
+
*/
|
|
2
5
|
export interface STextShimmerProps extends Omit<BoxProps, 'children'> {
|
|
6
|
+
/** The text content to display with the shimmer effect */
|
|
3
7
|
children: string;
|
|
8
|
+
/** Duration of the shimmer animation in seconds */
|
|
4
9
|
duration?: number;
|
|
10
|
+
/** Multiplier for the shimmer spread width */
|
|
5
11
|
spread?: number;
|
|
6
12
|
}
|
|
7
|
-
|
|
13
|
+
/**
|
|
14
|
+
* A text component that creates an animated shimmer effect.
|
|
15
|
+
*/
|
|
16
|
+
export declare const STextShimmer: import('react').ForwardRefExoticComponent<Omit<STextShimmerProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
17
|
export default STextShimmer;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Box as
|
|
1
|
+
import { j as d } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { forwardRef as m, useMemo as p } from "react";
|
|
3
|
+
import { Box as l } from "@mui/material";
|
|
4
4
|
import { s as c } from "../styled-B0Z4EDy9.js";
|
|
5
|
-
import { keyframes as
|
|
6
|
-
const
|
|
5
|
+
import { keyframes as u } from "@emotion/react";
|
|
6
|
+
const h = u`
|
|
7
7
|
0% {
|
|
8
8
|
background-position: 100% center;
|
|
9
9
|
}
|
|
10
10
|
100% {
|
|
11
11
|
background-position: 0% center;
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
14
|
-
shouldForwardProp: (
|
|
15
|
-
})(({ theme:
|
|
13
|
+
`, f = c(l, {
|
|
14
|
+
shouldForwardProp: (e) => e !== "duration" && e !== "dynamicSpread" && e !== "component"
|
|
15
|
+
})(({ theme: e, duration: t, dynamicSpread: r }) => ({
|
|
16
16
|
display: "inline-block",
|
|
17
17
|
position: "relative",
|
|
18
18
|
backgroundClip: "text",
|
|
@@ -20,18 +20,27 @@ const b = l`
|
|
|
20
20
|
color: "transparent",
|
|
21
21
|
backgroundSize: "250% 100%, auto",
|
|
22
22
|
backgroundRepeat: "no-repeat, padding-box",
|
|
23
|
-
animation: `${
|
|
24
|
-
"--spread": `${
|
|
25
|
-
"--base-color": (
|
|
26
|
-
"--base-gradient-color": (
|
|
23
|
+
animation: `${h} ${t}s linear infinite`,
|
|
24
|
+
"--spread": `${r}px`,
|
|
25
|
+
"--base-color": (e.vars || e).palette.text.disabled,
|
|
26
|
+
"--base-gradient-color": (e.vars || e).palette.text.primary,
|
|
27
27
|
backgroundImage: "linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--base-gradient-color), transparent calc(50% + var(--spread))), linear-gradient(var(--base-color), var(--base-color))"
|
|
28
|
-
})),
|
|
29
|
-
({ children:
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
28
|
+
})), a = m(
|
|
29
|
+
({ children: e, duration: t = 2, spread: r = 2, component: i = "p", ...n }, o) => {
|
|
30
|
+
const s = p(() => e.length * r, [e, r]);
|
|
31
|
+
return /* @__PURE__ */ d.jsx(f, { ref: o, component: i, duration: t, dynamicSpread: s, ...n, children: e });
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
|
-
|
|
34
|
+
a.displayName = "STextShimmer";
|
|
35
|
+
try {
|
|
36
|
+
a.displayName = "STextShimmer", a.__docgenInfo = { description: "A text component that creates an animated shimmer effect.", displayName: "STextShimmer", props: { children: { defaultValue: null, description: "The text content to display with the shimmer effect", name: "children", required: !0, type: { name: "string" } }, duration: { defaultValue: { value: "2" }, description: "Duration of the shimmer animation in seconds", name: "duration", required: !1, type: { name: "number" } }, spread: { defaultValue: { value: "2" }, description: "Multiplier for the shimmer spread width", name: "spread", required: !1, type: { name: "number" } } } };
|
|
37
|
+
} catch {
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
stextshimmer.displayName = "stextshimmer", stextshimmer.__docgenInfo = { description: "A text component that creates an animated shimmer effect.", displayName: "stextshimmer", props: { children: { defaultValue: null, description: "The text content to display with the shimmer effect", name: "children", required: !0, type: { name: "string" } }, duration: { defaultValue: { value: "2" }, description: "Duration of the shimmer animation in seconds", name: "duration", required: !1, type: { name: "number" } }, spread: { defaultValue: { value: "2" }, description: "Multiplier for the shimmer spread width", name: "spread", required: !1, type: { name: "number" } } } };
|
|
41
|
+
} catch {
|
|
42
|
+
}
|
|
35
43
|
export {
|
|
36
|
-
|
|
44
|
+
a as STextShimmer,
|
|
45
|
+
a as default
|
|
37
46
|
};
|
|
@@ -1,49 +1,20 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Props for
|
|
3
|
+
* Props interface for STextTruncation component
|
|
4
4
|
*/
|
|
5
5
|
export interface STextTruncationProps {
|
|
6
|
-
/** The text content to display
|
|
6
|
+
/** The text content to display and potentially truncate */
|
|
7
7
|
text?: string;
|
|
8
|
-
/**
|
|
8
|
+
/** Display variant: 'expandable' shows See more/less link, 'tooltip' shows ellipsis with hover */
|
|
9
9
|
variant?: 'expandable' | 'tooltip';
|
|
10
|
-
/** Number of lines to display before truncation
|
|
10
|
+
/** Number of lines to display before truncation */
|
|
11
11
|
lines?: number;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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.
|
|
22
|
-
*
|
|
23
|
-
* Features:
|
|
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
|
|
28
|
-
* - Accessible link interaction for expansion/collapse
|
|
29
|
-
* - Dynamic line control via props
|
|
30
|
-
*
|
|
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)
|
|
34
|
-
* @returns JSX element containing text with optional truncation controls
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```tsx
|
|
38
|
-
* // Expandable variant (default)
|
|
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..." />
|
|
46
|
-
* ```
|
|
14
|
+
* A text truncation component with expandable See more/less functionality or hover tooltip.
|
|
47
15
|
*/
|
|
48
|
-
declare const STextTruncation:
|
|
16
|
+
export declare const STextTruncation: {
|
|
17
|
+
({ text, variant, lines, }: STextTruncationProps): React.JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
49
20
|
export default STextTruncation;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { j as t } from "../jsx-runtime-OVHDjVDe.js";
|
|
2
|
+
import { useState as p, Fragment as d } from "react";
|
|
3
|
+
import { Tooltip as u, Typography as l, Link as c } from "@mui/material";
|
|
4
|
+
const i = ({
|
|
5
|
+
text: e,
|
|
6
|
+
variant: o = "expandable",
|
|
7
|
+
lines: a = 3
|
|
8
|
+
}) => {
|
|
9
|
+
const [n, r] = p(!1), s = () => {
|
|
10
|
+
r(!n);
|
|
7
11
|
};
|
|
8
|
-
return
|
|
9
|
-
|
|
12
|
+
return o === "tooltip" ? /* @__PURE__ */ t.jsx(u, { title: e || "", arrow: !0, children: /* @__PURE__ */ t.jsx(
|
|
13
|
+
l,
|
|
10
14
|
{
|
|
11
15
|
variant: "body2",
|
|
12
16
|
sx: {
|
|
@@ -14,43 +18,53 @@ const f = ({ text: e, variant: n = "expandable", lines: o = 3 }) => {
|
|
|
14
18
|
WebkitBoxOrient: "vertical",
|
|
15
19
|
overflow: "hidden",
|
|
16
20
|
textOverflow: "ellipsis",
|
|
17
|
-
WebkitLineClamp:
|
|
18
|
-
lineClamp:
|
|
21
|
+
WebkitLineClamp: a,
|
|
22
|
+
lineClamp: a
|
|
19
23
|
},
|
|
20
24
|
children: e
|
|
21
25
|
}
|
|
22
|
-
) }) : /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
26
|
+
) }) : /* @__PURE__ */ t.jsxs(d, { children: [
|
|
27
|
+
/* @__PURE__ */ t.jsx(
|
|
28
|
+
l,
|
|
25
29
|
{
|
|
26
30
|
variant: "body2",
|
|
27
|
-
sx:
|
|
31
|
+
sx: n ? {
|
|
28
32
|
display: "block"
|
|
29
33
|
} : {
|
|
30
34
|
display: "-webkit-box",
|
|
31
35
|
WebkitBoxOrient: "vertical",
|
|
32
36
|
overflow: "hidden",
|
|
33
37
|
textOverflow: "ellipsis",
|
|
34
|
-
WebkitLineClamp:
|
|
35
|
-
lineClamp:
|
|
38
|
+
WebkitLineClamp: a,
|
|
39
|
+
lineClamp: a
|
|
36
40
|
},
|
|
37
41
|
children: e
|
|
38
42
|
}
|
|
39
43
|
),
|
|
40
|
-
e && (e == null ? void 0 : e.split(" ").length) > 20 ? /* @__PURE__ */
|
|
44
|
+
e && (e == null ? void 0 : e.split(" ").length) > 20 ? /* @__PURE__ */ t.jsx(
|
|
41
45
|
c,
|
|
42
46
|
{
|
|
43
|
-
onClick:
|
|
47
|
+
onClick: s,
|
|
44
48
|
sx: {
|
|
45
49
|
cursor: "pointer",
|
|
46
50
|
fontSize: "0.875rem",
|
|
47
51
|
display: "inline-block"
|
|
48
52
|
},
|
|
49
|
-
children:
|
|
53
|
+
children: n ? "See less" : "See more"
|
|
50
54
|
}
|
|
51
55
|
) : null
|
|
52
56
|
] });
|
|
53
57
|
};
|
|
58
|
+
i.displayName = "STextTruncation";
|
|
59
|
+
try {
|
|
60
|
+
i.displayName = "STextTruncation", i.__docgenInfo = { description: "A text truncation component with expandable See more/less functionality or hover tooltip.", displayName: "STextTruncation", props: { text: { defaultValue: null, description: "The text content to display and potentially truncate", name: "text", required: !1, type: { name: "string" } }, variant: { defaultValue: { value: "expandable" }, description: "Display variant: 'expandable' shows See more/less link, 'tooltip' shows ellipsis with hover", name: "variant", required: !1, type: { name: "enum", value: [{ value: '"tooltip"' }, { value: '"expandable"' }] } }, lines: { defaultValue: { value: "3" }, description: "Number of lines to display before truncation", name: "lines", required: !1, type: { name: "number" } } } };
|
|
61
|
+
} catch {
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
stexttruncation.displayName = "stexttruncation", stexttruncation.__docgenInfo = { description: "A text truncation component with expandable See more/less functionality or hover tooltip.", displayName: "stexttruncation", props: { text: { defaultValue: null, description: "The text content to display and potentially truncate", name: "text", required: !1, type: { name: "string" } }, variant: { defaultValue: { value: "expandable" }, description: "Display variant: 'expandable' shows See more/less link, 'tooltip' shows ellipsis with hover", name: "variant", required: !1, type: { name: "enum", value: [{ value: '"tooltip"' }, { value: '"expandable"' }] } }, lines: { defaultValue: { value: "3" }, description: "Number of lines to display before truncation", name: "lines", required: !1, type: { name: "number" } } } };
|
|
65
|
+
} catch {
|
|
66
|
+
}
|
|
54
67
|
export {
|
|
55
|
-
|
|
68
|
+
i as STextTruncation,
|
|
69
|
+
i as default
|
|
56
70
|
};
|