@solostylist/ui-kit 1.0.79 → 1.0.80
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/{Box-reWd7MO-.js → Box-Bfkq7uIw.js} +23 -21
- package/dist/{Close-CVFQMMUW.js → Close-C1lLcTQu.js} +1 -1
- package/dist/{Menu-CGTDGEoX.js → Menu-DbldWmqB.js} +94 -93
- package/dist/{MenuItem-Bdna3McP.js → MenuItem-BHTJlag0.js} +8 -7
- package/dist/{Select-D54ugORZ.js → Select-CT0Hpudx.js} +14 -13
- package/dist/{Stack-ISlVeD89.js → Stack-W0weBtf9.js} +29 -28
- package/dist/{TransitionGroup-DuMpOHcM.js → TransitionGroup-q306siJs.js} +1 -1
- package/dist/{Typography-D38zoHJr.js → Typography-CeAbQ9LX.js} +17 -17
- package/dist/{buttonBaseClasses-CF7RfAgE.js → buttonBaseClasses-CR6HkqQ3.js} +2 -2
- package/dist/colorManipulator-CPZHCebU.js +178 -0
- package/dist/{createSvgIcon-DN-sh_sr.js → createSvgIcon-9XY7lJan.js} +129 -131
- package/dist/createTheme-wt8sY36y.js +2837 -0
- package/dist/{defaultTheme-BDQAWvCM.js → defaultTheme-YL2LZ-0U.js} +7 -7
- package/dist/emotion-serialize.esm-lgBmL_7o.js +195 -0
- package/dist/{extendSxProp-KtEeHd8h.js → extendSxProp-B1pEE-ot.js} +1 -1
- package/dist/generateUtilityClasses-D-O3RBPF.js +10 -0
- package/dist/hooks/use-dialog.d.ts +21 -0
- package/dist/hooks/use-dialog.js +10 -2
- package/dist/hooks/use-popover.d.ts +24 -0
- package/dist/hooks/use-popover.js +7 -1
- package/dist/{iconButtonClasses-DMst1jJO.js → iconButtonClasses-WmsPyI4v.js} +2 -2
- package/dist/index-B6k9mhKf.js +30 -0
- package/dist/{index-x815ub0T.js → index-DAXzX0k9.js} +5 -5
- package/dist/main.d.ts +5 -1
- package/dist/main.js +109 -104
- package/dist/{outlinedInputClasses-E4FwVkZh.js → outlinedInputClasses-Cor6Mcxo.js} +2 -2
- package/dist/s-autocomplete/s-autocomplete.d.ts +31 -0
- package/dist/s-autocomplete/s-autocomplete.js +23 -20
- package/dist/s-button/index.d.ts +2 -0
- package/dist/s-button/index.js +4 -0
- package/dist/s-button/package.json +5 -0
- package/dist/s-button/s-button.d.ts +6 -0
- package/dist/s-button/s-button.js +7 -0
- package/dist/s-button-link/s-button-link.d.ts +37 -1
- package/dist/s-checkbox/s-checkbox.d.ts +21 -0
- package/dist/s-checkbox/s-checkbox.js +9 -9
- package/dist/s-chip/index.d.ts +2 -0
- package/dist/s-chip/index.js +4 -0
- package/dist/s-chip/package.json +5 -0
- package/dist/s-chip/s-chip.d.ts +6 -0
- package/dist/s-chip/s-chip.js +7 -0
- package/dist/s-chips/s-chips.d.ts +26 -1
- package/dist/s-chips/s-chips.js +28 -23
- package/dist/s-copilot-kit-provider/s-copilot-kit-provider.d.ts +28 -0
- package/dist/s-copyable-text/s-copyable-text.d.ts +43 -2
- package/dist/s-copyable-text/s-copyable-text.js +30 -22
- package/dist/s-data-table/s-data-table.d.ts +87 -0
- package/dist/s-data-table/s-data-table.js +33 -22
- package/dist/s-date-picker/s-date-picker.d.ts +25 -0
- package/dist/s-date-picker/s-date-picker.js +109 -92
- package/dist/s-datetime-picker/s-datetime-picker.d.ts +26 -0
- package/dist/s-datetime-picker/s-datetime-picker.js +209 -192
- package/dist/s-dialog/s-dialog.d.ts +27 -0
- package/dist/s-dialog/s-dialog.js +1 -1
- package/dist/s-dialog-confirm/s-dialog-confirm.d.ts +54 -0
- package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
- package/dist/s-dialog-message/s-dialog-message.d.ts +51 -0
- package/dist/s-dialog-message/s-dialog-message.js +3 -2
- package/dist/s-empty/s-empty.d.ts +25 -1
- package/dist/s-error/s-error.d.ts +19 -0
- package/dist/s-file-dropzone/s-file-dropzone.d.ts +67 -0
- package/dist/s-file-dropzone/s-file-dropzone.js +6 -4
- package/dist/s-file-icon/s-file-icon.d.ts +28 -0
- package/dist/s-file-icon/s-file-icon.js +5 -2
- package/dist/s-form/s-form.d.ts +22 -0
- package/dist/s-form/s-form.js +9 -10
- package/dist/s-glow-button/index.d.ts +1 -1
- package/dist/s-glow-button/s-glow-button.d.ts +39 -3
- package/dist/s-glow-button/s-glow-button.js +11 -2
- package/dist/s-gradient-icon/s-gradient-icon.d.ts +43 -0
- package/dist/s-gradient-icon/s-gradient-icon.js +6 -1
- package/dist/s-i18n-provider/s-i18n-provider.d.ts +37 -0
- package/dist/s-i18n-provider/s-i18n-provider.js +8 -1
- package/dist/s-icon-button/s-icon-button.d.ts +23 -0
- package/dist/s-interactive-gallery/s-interactive-gallery.d.ts +96 -0
- package/dist/s-interactive-gallery/s-interactive-gallery.js +10 -4
- package/dist/s-label/s-label.d.ts +30 -2
- package/dist/s-label/s-label.js +8 -18
- package/dist/s-lazy-image/s-lazy-image.d.ts +28 -1
- package/dist/s-localization-provider/s-localization-provider.d.ts +30 -0
- package/dist/s-localization-provider/s-localization-provider.js +5 -2
- package/dist/s-moving-border/s-moving-border.d.ts +41 -0
- package/dist/s-moving-border/s-moving-border.js +5 -1
- package/dist/s-multi-select/s-multi-select.d.ts +23 -0
- package/dist/s-multi-select/s-multi-select.js +3 -3
- package/dist/s-no-ssr/s-no-ssr.d.ts +38 -0
- package/dist/s-pagination/s-pagination.d.ts +29 -0
- package/dist/s-select/s-select.d.ts +35 -0
- package/dist/s-select/s-select.js +41 -37
- package/dist/s-skeleton/s-skeleton.d.ts +31 -1
- package/dist/s-smart-text-field/s-smart-text-field.d.ts +28 -0
- package/dist/s-smart-text-field/s-smart-text-field.js +1425 -1399
- package/dist/s-snackbar-message/s-snackbar-message.d.ts +56 -2
- package/dist/s-stripe/s-stripe.d.ts +93 -0
- package/dist/s-stripe/s-stripe.js +3 -0
- package/dist/s-stripe/stripe-input.d.ts +23 -0
- package/dist/s-stripe/stripe-input.js +1 -0
- package/dist/s-text-editor/index.d.ts +2 -0
- package/dist/s-text-editor/index.js +4 -2
- package/dist/s-text-editor/s-text-editor-toolbar.d.ts +33 -0
- package/dist/s-text-editor/s-text-editor-toolbar.js +4 -4
- package/dist/s-text-editor/s-text-editor.js +1 -1
- package/dist/s-text-field/s-text-field.d.ts +23 -0
- package/dist/s-text-truncation/s-text-truncation.d.ts +30 -0
- package/dist/s-theme-provider/s-theme-provider.d.ts +24 -3
- package/dist/s-theme-provider/s-theme-provider.js +9 -2
- package/dist/s-tip/s-tip.d.ts +27 -0
- package/dist/s-tip/s-tip.js +5 -3
- package/dist/svgIconClasses-BYFQaEQ7.js +10 -0
- package/dist/{tabClasses-LXCeUS4i.js → tabClasses-CXQXD3XZ.js} +2 -2
- package/dist/theme/components/avatar.js +1 -1
- package/dist/theme/components/button.d.ts +5834 -0
- package/dist/theme/components/button.js +186 -0
- package/dist/theme/components/chip.d.ts +117 -0
- package/dist/theme/components/chip.js +168 -0
- package/dist/theme/components/components.d.ts +5944 -0
- package/dist/theme/components/components.js +16 -12
- package/dist/theme/customizations/data-display.d.ts +0 -5
- package/dist/theme/customizations/data-display.js +15 -144
- package/dist/theme/customizations/feedback.js +1 -1
- package/dist/theme/customizations/inputs.js +29 -226
- package/dist/theme/customizations/navigation.js +26 -12
- package/dist/theme/customizations/surfaces.js +5 -5
- package/dist/theme/theme-primitives.d.ts +24 -0
- package/dist/theme/theme-primitives.js +73 -48
- package/dist/{typographyClasses-QAKcrTAX.js → typographyClasses-DTwotNbm.js} +2 -2
- package/dist/{useMobilePicker-DlmTFHhN.js → useMobilePicker-CYRSYIKP.js} +1852 -1848
- package/dist/{useSlot-CiHsL61G.js → useSlot-B_4ipGBP.js} +6 -6
- package/dist/{useTheme-Dy5JmnOe.js → useTheme-D1MJ3g_i.js} +1 -1
- package/dist/{useThemeProps-BGjjVPlJ.js → useThemeProps-CTcSO3lC.js} +2 -2
- package/dist/{warning-DWsjz4u6.js → warning-DyDdgu8-.js} +3 -3
- package/package.json +6 -4
- package/dist/HelpOutlineOutlined-Dw_XSjYK.js +0 -8
- package/dist/chipClasses-WFcUH6gU.js +0 -10
- package/dist/createTheme-DuP3DZSF.js +0 -3005
- package/dist/generateUtilityClasses-BpNk3DNr.js +0 -230
|
@@ -1,28 +1,82 @@
|
|
|
1
1
|
import { AlertProps, SnackbarProps } from '@mui/material';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Props interface for SSnackbarMessage component
|
|
5
|
+
*/
|
|
6
|
+
export interface SSnackbarMessageProps {
|
|
7
|
+
/** Message content - can be string or React element */
|
|
4
8
|
message?: string | React.ReactNode;
|
|
9
|
+
/** Callback fired when snackbar should close */
|
|
5
10
|
onClose?: () => void;
|
|
11
|
+
/** Whether the snackbar is open */
|
|
6
12
|
open?: boolean;
|
|
13
|
+
/** Additional props passed to the Snackbar component */
|
|
7
14
|
snackbarProps?: SnackbarProps;
|
|
15
|
+
/** Additional props passed to the Alert component */
|
|
8
16
|
alertProps?: AlertProps;
|
|
9
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* SSnackbarMessage - A notification snackbar component that displays temporary messages.
|
|
20
|
+
* Combines Material-UI Snackbar with Alert for styled notifications.
|
|
21
|
+
*
|
|
22
|
+
* Key features:
|
|
23
|
+
* - Auto-hide after 10 seconds by default
|
|
24
|
+
* - Positioned at top-center for better visibility
|
|
25
|
+
* - Uses Alert component for consistent styling and severity levels
|
|
26
|
+
* - Configurable Snackbar and Alert props for customization
|
|
27
|
+
* - Default error severity (can be overridden via alertProps)
|
|
28
|
+
* - Full-width alert for better readability
|
|
29
|
+
*
|
|
30
|
+
* @param props - SSnackbarMessageProps with message and configuration
|
|
31
|
+
* @returns JSX.Element - Snackbar notification with Alert styling
|
|
32
|
+
*/
|
|
10
33
|
declare const SSnackbarMessage: ({ message, onClose, open, snackbarProps, alertProps, }: SSnackbarMessageProps) => React.JSX.Element;
|
|
11
34
|
export default SSnackbarMessage;
|
|
35
|
+
/**
|
|
36
|
+
* Options for opening a snackbar message
|
|
37
|
+
*/
|
|
12
38
|
export interface SnackbarMessageOpenOptions {
|
|
39
|
+
/** The message to display */
|
|
13
40
|
message: string;
|
|
14
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Parameters for the handleOpen function
|
|
44
|
+
*/
|
|
15
45
|
export interface handleOpenParams {
|
|
46
|
+
/** Message configuration */
|
|
16
47
|
snackbarMessageOptions: SnackbarMessageOpenOptions;
|
|
48
|
+
/** Optional Snackbar props for customization */
|
|
17
49
|
snackbarProps?: SnackbarProps;
|
|
50
|
+
/** Optional Alert props for customization */
|
|
18
51
|
alertProps?: AlertProps;
|
|
19
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Context value interface for SnackbarMessage system
|
|
55
|
+
*/
|
|
20
56
|
export interface SnackbarMessageContextProps {
|
|
57
|
+
/** Function to open a snackbar message with optional customization */
|
|
21
58
|
handleOpen: ({ snackbarMessageOptions, snackbarProps, alertProps }: handleOpenParams) => void;
|
|
59
|
+
/** Function to close the snackbar */
|
|
22
60
|
handleClose: () => void;
|
|
61
|
+
/** Current open state of the snackbar */
|
|
23
62
|
open: boolean;
|
|
24
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Provider component that manages a global snackbar notification system.
|
|
66
|
+
* This enables any component in the app to display toast-like notifications
|
|
67
|
+
* without managing snackbar state locally.
|
|
68
|
+
*
|
|
69
|
+
* @param children - Child components that can use the snackbar context
|
|
70
|
+
* @returns JSX.Element - Provider with snackbar management and rendered snackbar
|
|
71
|
+
*/
|
|
25
72
|
export declare const SnackbarMessageProvider: ({ children }: {
|
|
26
73
|
children: React.ReactNode;
|
|
27
|
-
}) =>
|
|
74
|
+
}) => React.JSX.Element;
|
|
75
|
+
/**
|
|
76
|
+
* Hook to access the snackbar message context.
|
|
77
|
+
* Must be used within a SnackbarMessageProvider.
|
|
78
|
+
*
|
|
79
|
+
* @returns SnackbarMessageContextProps - Context with snackbar management functions
|
|
80
|
+
* @throws Error if used outside of SnackbarMessageProvider
|
|
81
|
+
*/
|
|
28
82
|
export declare const useSnackbarMessage: () => SnackbarMessageContextProps;
|
|
@@ -1,13 +1,106 @@
|
|
|
1
1
|
import { AuBankAccountElement, CardCvcElement, CardExpiryElement, CardNumberElement, FpxBankElement, IbanElement, IdealBankElement } from '@stripe/react-stripe-js';
|
|
2
2
|
import { STextFieldProps } from '../s-text-field';
|
|
3
|
+
/**
|
|
4
|
+
* Union type of all supported Stripe Elements
|
|
5
|
+
* Includes card payment elements and various regional payment methods
|
|
6
|
+
*/
|
|
3
7
|
export type StripeElement = typeof AuBankAccountElement | typeof CardCvcElement | typeof CardExpiryElement | typeof CardNumberElement | typeof FpxBankElement | typeof IbanElement | typeof IdealBankElement;
|
|
8
|
+
/**
|
|
9
|
+
* Props for Stripe-integrated text field components
|
|
10
|
+
* Extends STextField props but excludes conflicting props that are handled by Stripe
|
|
11
|
+
*/
|
|
4
12
|
export interface StripeTextFieldProps<T extends StripeElement> extends Omit<STextFieldProps, 'onChange' | 'inputComponent' | 'inputProps'> {
|
|
13
|
+
/** Props passed directly to the Stripe Element */
|
|
5
14
|
inputProps?: React.ComponentProps<T>;
|
|
15
|
+
/** Custom error message to display when validation fails */
|
|
6
16
|
labelErrorMessage?: string;
|
|
17
|
+
/** Change handler for Stripe Element events */
|
|
7
18
|
onChange?: React.ComponentProps<T>['onChange'];
|
|
19
|
+
/** The Stripe Element component to render */
|
|
8
20
|
stripeElement?: T;
|
|
9
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Generic Stripe text field component that integrates Stripe Elements with Material-UI styling
|
|
24
|
+
*
|
|
25
|
+
* Creates a seamless integration between Stripe payment elements and the application's
|
|
26
|
+
* Material-UI design system. Handles the complex integration of Stripe's iframe-based
|
|
27
|
+
* elements with Material-UI's text field styling and behavior.
|
|
28
|
+
*
|
|
29
|
+
* Features:
|
|
30
|
+
* - Consistent Material-UI styling for Stripe elements
|
|
31
|
+
* - Proper label shrinking behavior
|
|
32
|
+
* - Error state handling with custom messages
|
|
33
|
+
* - Theme-aware styling that adapts to dark/light modes
|
|
34
|
+
* - Focus management integration
|
|
35
|
+
*
|
|
36
|
+
* @param props - Configuration props including Stripe element and styling options
|
|
37
|
+
* @returns JSX element containing integrated Stripe element with Material-UI styling
|
|
38
|
+
*/
|
|
10
39
|
export declare const StripeTextField: <T extends StripeElement>(props: StripeTextFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* Card number input field with Stripe integration
|
|
42
|
+
*
|
|
43
|
+
* Pre-configured Stripe text field specifically for card number entry.
|
|
44
|
+
* Handles card number formatting, validation, and brand detection automatically.
|
|
45
|
+
*
|
|
46
|
+
* @param props - StripeTextFieldProps configured for CardNumberElement
|
|
47
|
+
* @returns JSX element containing card number input field
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <SStripeNumber
|
|
52
|
+
* onChange={(event) => {
|
|
53
|
+
* if (event.complete) {
|
|
54
|
+
* console.log('Card number is valid');
|
|
55
|
+
* }
|
|
56
|
+
* }}
|
|
57
|
+
* inputProps={{
|
|
58
|
+
* placeholder: '1234 5678 9012 3456'
|
|
59
|
+
* }}
|
|
60
|
+
* />
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
11
63
|
export declare function SStripeNumber(props: StripeTextFieldProps<typeof CardNumberElement>): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
/**
|
|
65
|
+
* Card expiration date input field with Stripe integration
|
|
66
|
+
*
|
|
67
|
+
* Pre-configured Stripe text field for card expiration date entry.
|
|
68
|
+
* Automatically formats input as MM/YY and validates expiration dates.
|
|
69
|
+
*
|
|
70
|
+
* @param props - StripeTextFieldProps configured for CardExpiryElement
|
|
71
|
+
* @returns JSX element containing expiration date input field
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```tsx
|
|
75
|
+
* <SStripeExpiry
|
|
76
|
+
* onChange={(event) => {
|
|
77
|
+
* if (event.error) {
|
|
78
|
+
* setError(event.error.message);
|
|
79
|
+
* }
|
|
80
|
+
* }}
|
|
81
|
+
* />
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
12
84
|
export declare function SStripeExpiry(props: StripeTextFieldProps<typeof CardExpiryElement>): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
/**
|
|
86
|
+
* Card security code (CVC/CVV) input field with Stripe integration
|
|
87
|
+
*
|
|
88
|
+
* Pre-configured Stripe text field for card security code entry.
|
|
89
|
+
* Automatically adjusts expected length based on detected card brand
|
|
90
|
+
* (3 digits for most cards, 4 for American Express).
|
|
91
|
+
*
|
|
92
|
+
* @param props - StripeTextFieldProps configured for CardCvcElement
|
|
93
|
+
* @returns JSX element containing CVC input field
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```tsx
|
|
97
|
+
* <SStripeCVC
|
|
98
|
+
* onChange={(event) => {
|
|
99
|
+
* if (event.complete) {
|
|
100
|
+
* console.log('CVC is valid');
|
|
101
|
+
* }
|
|
102
|
+
* }}
|
|
103
|
+
* />
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
13
106
|
export declare function SStripeCVC(props: StripeTextFieldProps<typeof CardCvcElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,7 @@ const n = (t) => {
|
|
|
13
13
|
inputLabel: {
|
|
14
14
|
...e == null ? void 0 : e.inputLabel,
|
|
15
15
|
shrink: !0
|
|
16
|
+
// Always shrink label since Stripe elements don't support placeholder-driven shrinking
|
|
16
17
|
},
|
|
17
18
|
input: {
|
|
18
19
|
...e == null ? void 0 : e.input,
|
|
@@ -20,8 +21,10 @@ const n = (t) => {
|
|
|
20
21
|
...m,
|
|
21
22
|
...(p = e == null ? void 0 : e.input) == null ? void 0 : p.inputProps,
|
|
22
23
|
component: o
|
|
24
|
+
// Pass Stripe element as component
|
|
23
25
|
},
|
|
24
26
|
inputComponent: b
|
|
27
|
+
// Custom input component for Stripe integration
|
|
25
28
|
}
|
|
26
29
|
},
|
|
27
30
|
error: i,
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import { InputBaseComponentProps } from '@mui/material/InputBase';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Stripe input component with Material-UI theme integration
|
|
5
|
+
*
|
|
6
|
+
* A wrapper component that adapts Stripe Elements to work seamlessly with
|
|
7
|
+
* Material-UI's input styling system. Handles theme-aware styling and
|
|
8
|
+
* provides proper focus management integration.
|
|
9
|
+
*
|
|
10
|
+
* Features:
|
|
11
|
+
* - Automatic theme-based text coloring (dark/light mode support)
|
|
12
|
+
* - Focus management through imperative handle
|
|
13
|
+
* - Seamless integration with Material-UI form components
|
|
14
|
+
* - Stripe Elements styling customization
|
|
15
|
+
*
|
|
16
|
+
* This component is typically used internally by SStripe components
|
|
17
|
+
* rather than directly in application code.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Forward ref component for Stripe Elements integration with Material-UI
|
|
21
|
+
*
|
|
22
|
+
* @param props - InputBase component props with additional Stripe-specific options
|
|
23
|
+
* @param ref - Forward ref for focus management
|
|
24
|
+
* @returns JSX element containing configured Stripe element
|
|
25
|
+
*/
|
|
3
26
|
declare const StripeInput: React.ForwardRefExoticComponent<Omit<InputBaseComponentProps, "ref"> & React.RefAttributes<any>>;
|
|
4
27
|
export default StripeInput;
|
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the STextEditorToolbar component
|
|
5
|
+
*/
|
|
3
6
|
export interface STextEditorToolbarProps {
|
|
7
|
+
/** The Tiptap editor instance - null when editor is not yet initialized */
|
|
4
8
|
editor: Editor | null;
|
|
5
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Rich text editor toolbar component with comprehensive formatting controls
|
|
12
|
+
*
|
|
13
|
+
* Provides a full-featured toolbar for text formatting including:
|
|
14
|
+
* - Text styles: paragraph, headings (H1-H6)
|
|
15
|
+
* - Format options: bold, italic, strikethrough
|
|
16
|
+
* - Lists: bulleted and numbered
|
|
17
|
+
* - Code blocks
|
|
18
|
+
* - Link management with popover interface
|
|
19
|
+
*
|
|
20
|
+
* The toolbar dynamically enables/disables controls based on editor capabilities
|
|
21
|
+
* and current selection context. Link editing is handled through a popover with
|
|
22
|
+
* URL input field.
|
|
23
|
+
*
|
|
24
|
+
* @param editor - The Tiptap editor instance (null during initialization)
|
|
25
|
+
* @returns JSX element containing the complete editor toolbar
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const editor = useEditor({ extensions: [...] });
|
|
30
|
+
*
|
|
31
|
+
* return (
|
|
32
|
+
* <div>
|
|
33
|
+
* <STextEditorToolbar editor={editor} />
|
|
34
|
+
* <EditorContent editor={editor} />
|
|
35
|
+
* </div>
|
|
36
|
+
* );
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
6
39
|
export declare const STextEditorToolbar: ({ editor }: STextEditorToolbarProps) => React.JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as c } from "../jsx-runtime-DywqP_6a.js";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import { c as t } from "../createSvgIcon-
|
|
3
|
+
import { c as t } from "../createSvgIcon-9XY7lJan.js";
|
|
4
4
|
import { MenuItem as u } from "@mui/material";
|
|
5
5
|
import { usePopover as g } from "../hooks/use-popover.js";
|
|
6
6
|
import m from "../s-text-field/s-text-field.js";
|
|
7
|
-
import { I as f, S as x, F as d } from "../Select-
|
|
8
|
-
import { S as v } from "../Stack-
|
|
9
|
-
import { P as j } from "../Menu-
|
|
7
|
+
import { I as f, S as x, F as d } from "../Select-CT0Hpudx.js";
|
|
8
|
+
import { S as v } from "../Stack-W0weBtf9.js";
|
|
9
|
+
import { P as j } from "../Menu-DbldWmqB.js";
|
|
10
10
|
const k = t(/* @__PURE__ */ c.jsx("path", {
|
|
11
11
|
d: "M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"
|
|
12
12
|
}), "Code"), H = t(/* @__PURE__ */ c.jsx("path", {
|
|
@@ -5,7 +5,7 @@ import { Placeholder as m } from "@tiptap/extension-placeholder";
|
|
|
5
5
|
import { useEditor as c, EditorContent as f } from "@tiptap/react";
|
|
6
6
|
import { StarterKit as u } from "@tiptap/starter-kit";
|
|
7
7
|
import { STextEditorToolbar as x } from "./s-text-editor-toolbar.js";
|
|
8
|
-
import { B as d } from "../Box-
|
|
8
|
+
import { B as d } from "../Box-Bfkq7uIw.js";
|
|
9
9
|
const z = ({
|
|
10
10
|
content: r,
|
|
11
11
|
editable: o = !0,
|
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TextField } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* Props for STextField component - extends Material-UI TextField props
|
|
5
|
+
* but replaces the 'error' prop to use string messages instead of boolean
|
|
6
|
+
*/
|
|
3
7
|
export type STextFieldProps = Omit<React.ComponentProps<typeof TextField>, 'error'> & {
|
|
8
|
+
/** Field label displayed above the input */
|
|
4
9
|
label?: string | React.ReactNode;
|
|
10
|
+
/** Whether the field is required (shows asterisk in label) */
|
|
5
11
|
required?: boolean;
|
|
12
|
+
/** Error message to display (string instead of boolean for better UX) */
|
|
6
13
|
error?: string;
|
|
14
|
+
/** HTML id attribute for the input element */
|
|
7
15
|
htmlFor?: string;
|
|
16
|
+
/** Help text shown in tooltip next to the label */
|
|
8
17
|
hint?: string;
|
|
9
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* STextField - A standardized text input component that wraps Material-UI TextField
|
|
21
|
+
* with consistent form labeling, validation, and help text patterns.
|
|
22
|
+
*
|
|
23
|
+
* Key features:
|
|
24
|
+
* - Integrates with SForm for consistent label and error handling
|
|
25
|
+
* - Supports string-based error messages for better user experience
|
|
26
|
+
* - Maintains full Material-UI TextField API compatibility
|
|
27
|
+
* - Provides accessible form labeling with htmlFor/id association
|
|
28
|
+
* - Includes help text tooltip functionality
|
|
29
|
+
*
|
|
30
|
+
* @param props - STextFieldProps with form integration and Material-UI TextField props
|
|
31
|
+
* @returns JSX.Element - Wrapped TextField with form labeling and validation
|
|
32
|
+
*/
|
|
10
33
|
declare const STextField: ({ label, required, error, type, htmlFor, hint, ...props }: STextFieldProps) => React.JSX.Element;
|
|
11
34
|
export default STextField;
|
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the STextTruncation component
|
|
4
|
+
*/
|
|
2
5
|
export interface STextTruncationProps {
|
|
6
|
+
/** The text content to display with truncation functionality */
|
|
3
7
|
text?: string;
|
|
4
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Text truncation component with expandable "See more" functionality
|
|
11
|
+
*
|
|
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.
|
|
15
|
+
*
|
|
16
|
+
* 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
|
|
20
|
+
* - 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
|
|
26
|
+
*
|
|
27
|
+
* @param text - The text content to display and potentially truncate
|
|
28
|
+
* @returns JSX element containing text with optional truncation controls
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <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..." />
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
5
35
|
declare const STextTruncation: ({ text }: STextTruncationProps) => React.JSX.Element;
|
|
6
36
|
export default STextTruncation;
|
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
import { Theme, ThemeOptions, ThemeProviderProps } from '@mui/material';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props interface for SThemeProvider component
|
|
5
|
+
*/
|
|
3
6
|
export interface SThemeProviderProps extends Omit<ThemeProviderProps, 'defaultMode' | 'theme'> {
|
|
7
|
+
/** Child components to receive theme context */
|
|
4
8
|
children: React.ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
* This is for the docs site. You can ignore it or remove it.
|
|
7
|
-
*/
|
|
9
|
+
/** Disable custom theme for testing/docs (falls back to no theme) */
|
|
8
10
|
disableCustomTheme?: boolean;
|
|
11
|
+
/** Additional theme component overrides */
|
|
9
12
|
themeComponents?: ThemeOptions['components'];
|
|
13
|
+
/** Default color mode (defaults to 'dark') */
|
|
10
14
|
defaultMode?: 'light' | 'dark' | 'system' | undefined;
|
|
15
|
+
/** Custom theme object to merge with internal theme */
|
|
11
16
|
theme?: Theme;
|
|
12
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* SThemeProvider - Central theme provider for the design system.
|
|
20
|
+
*
|
|
21
|
+
* Features:
|
|
22
|
+
* - Material-UI v6 CSS variables integration with 's-' prefix
|
|
23
|
+
* - Dark mode default with light/dark/system mode support
|
|
24
|
+
* - Comprehensive component customizations
|
|
25
|
+
* - Custom color schemes, typography, shadows, and shapes
|
|
26
|
+
* - Modular theme customizations from separate files
|
|
27
|
+
* - Theme merging capability for external overrides
|
|
28
|
+
* - Memoized theme creation for performance
|
|
29
|
+
* - Transition disabling for smoother mode switching
|
|
30
|
+
*
|
|
31
|
+
* @param props - SThemeProviderProps with theme configuration
|
|
32
|
+
* @returns JSX.Element - ThemeProvider with custom design system theme
|
|
33
|
+
*/
|
|
13
34
|
declare const SThemeProvider: ({ children, disableCustomTheme, themeComponents, defaultMode, theme, ...themeProviderProps }: SThemeProviderProps) => React.JSX.Element;
|
|
14
35
|
export default SThemeProvider;
|
|
@@ -13,21 +13,27 @@ const w = ({
|
|
|
13
13
|
disableCustomTheme: o,
|
|
14
14
|
themeComponents: t,
|
|
15
15
|
defaultMode: m = "dark",
|
|
16
|
+
// Dark mode by default
|
|
16
17
|
theme: i,
|
|
17
18
|
...a
|
|
18
19
|
}) => {
|
|
19
20
|
const n = s.useMemo(() => o ? {} : p({
|
|
20
|
-
//
|
|
21
|
+
// CSS variables configuration for dynamic theming
|
|
21
22
|
cssVariables: {
|
|
22
23
|
colorSchemeSelector: "data-mui-color-scheme",
|
|
23
24
|
cssVarPrefix: "s"
|
|
25
|
+
// All CSS vars prefixed with '--s-'
|
|
24
26
|
},
|
|
25
27
|
colorSchemes: S,
|
|
26
|
-
//
|
|
28
|
+
// Light/dark color schemes
|
|
27
29
|
typography: j,
|
|
30
|
+
// Custom typography scales
|
|
28
31
|
shadows: g,
|
|
32
|
+
// Custom shadow definitions
|
|
29
33
|
shape: z,
|
|
34
|
+
// Border radius and shape settings
|
|
30
35
|
components: {
|
|
36
|
+
// Merge all component customizations
|
|
31
37
|
...d,
|
|
32
38
|
...u,
|
|
33
39
|
...h,
|
|
@@ -35,6 +41,7 @@ const w = ({
|
|
|
35
41
|
...x,
|
|
36
42
|
...f,
|
|
37
43
|
...t
|
|
44
|
+
// Allow external overrides
|
|
38
45
|
}
|
|
39
46
|
}), [o, t]);
|
|
40
47
|
return o ? /* @__PURE__ */ e.jsx(s.Fragment, { children: r }) : /* @__PURE__ */ e.jsx(
|
package/dist/s-tip/s-tip.d.ts
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props interface for STip component
|
|
4
|
+
*/
|
|
2
5
|
export interface STipProps {
|
|
6
|
+
/** The tip message to display */
|
|
3
7
|
message: string;
|
|
4
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* STip - A styled tip/hint component for displaying helpful information to users.
|
|
11
|
+
* Features a lightbulb icon and "Tip." prefix for clear visual identification.
|
|
12
|
+
*
|
|
13
|
+
* Key features:
|
|
14
|
+
* - Distinctive lightbulb icon for immediate recognition
|
|
15
|
+
* - Bold "Tip." prefix for clear categorization
|
|
16
|
+
* - Consistent background and text coloring
|
|
17
|
+
* - Rounded corners for modern appearance
|
|
18
|
+
* - Horizontal layout with proper spacing
|
|
19
|
+
* - CSS custom properties for theme integration
|
|
20
|
+
* - Compact 16px icon size for subtle presence
|
|
21
|
+
*
|
|
22
|
+
* Common use cases:
|
|
23
|
+
* - Form hints and guidance
|
|
24
|
+
* - Feature explanations
|
|
25
|
+
* - Best practice suggestions
|
|
26
|
+
* - User onboarding tips
|
|
27
|
+
* - Contextual help information
|
|
28
|
+
*
|
|
29
|
+
* @param props - STipProps with the message to display
|
|
30
|
+
* @returns JSX.Element - Styled tip component with icon and message
|
|
31
|
+
*/
|
|
5
32
|
declare const STip: ({ message }: STipProps) => React.JSX.Element;
|
|
6
33
|
export default STip;
|
package/dist/s-tip/s-tip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
-
import { c as e } from "../createSvgIcon-
|
|
3
|
-
import { S as s } from "../Stack-
|
|
4
|
-
import { T as r } from "../Typography-
|
|
2
|
+
import { c as e } from "../createSvgIcon-9XY7lJan.js";
|
|
3
|
+
import { S as s } from "../Stack-W0weBtf9.js";
|
|
4
|
+
import { T as r } from "../Typography-CeAbQ9LX.js";
|
|
5
5
|
const a = e(/* @__PURE__ */ t.jsx("path", {
|
|
6
6
|
d: "M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7m2 11.7V16h-4v-2.3C8.48 12.63 7 11.53 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.49-1.51 3.65-3 4.7"
|
|
7
7
|
}), "LightbulbOutline"), l = ({ message: o }) => /* @__PURE__ */ t.jsxs(
|
|
@@ -13,9 +13,11 @@ const a = e(/* @__PURE__ */ t.jsx("path", {
|
|
|
13
13
|
display: "flex",
|
|
14
14
|
alignItems: "center",
|
|
15
15
|
bgcolor: "var(--s-palette-background-default)",
|
|
16
|
+
// Use CSS custom property for theming
|
|
16
17
|
borderRadius: 1,
|
|
17
18
|
p: 1,
|
|
18
19
|
color: "var(--s-palette-text-secondary)"
|
|
20
|
+
// Use CSS custom property for theming
|
|
19
21
|
},
|
|
20
22
|
children: [
|
|
21
23
|
/* @__PURE__ */ t.jsx(a, { sx: { fontSize: 16 } }),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { g as r } from "./colorManipulator-CPZHCebU.js";
|
|
2
|
+
import { g as t } from "./generateUtilityClasses-D-O3RBPF.js";
|
|
3
|
+
function s(o) {
|
|
4
|
+
return r("MuiSvgIcon", o);
|
|
5
|
+
}
|
|
6
|
+
const n = t("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
7
|
+
export {
|
|
8
|
+
s as g,
|
|
9
|
+
n as s
|
|
10
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as e } from "./generateUtilityClasses-
|
|
2
|
-
import { g as a } from "./
|
|
1
|
+
import { g as e } from "./generateUtilityClasses-D-O3RBPF.js";
|
|
2
|
+
import { g as a } from "./colorManipulator-CPZHCebU.js";
|
|
3
3
|
function i(t) {
|
|
4
4
|
return a("MuiTab", t);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as r } from "../../jsx-runtime-DywqP_6a.js";
|
|
2
|
-
import { c as o } from "../../createSvgIcon-
|
|
2
|
+
import { c as o } from "../../createSvgIcon-9XY7lJan.js";
|
|
3
3
|
const s = o(/* @__PURE__ */ r.jsx("path", {
|
|
4
4
|
d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"
|
|
5
5
|
}), "Person"), c = {
|