@solostylist/ui-kit 1.0.78 → 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 +175 -82
- 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,11 +1,52 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BoxProps } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the SMovingBorder component, extending Material-UI BoxProps
|
|
5
|
+
*/
|
|
3
6
|
export interface SMovingBorderProps extends BoxProps {
|
|
7
|
+
/** Duration of one complete animation cycle in milliseconds (default: 6000) */
|
|
4
8
|
duration?: number;
|
|
9
|
+
/** Additional CSS class name for styling */
|
|
5
10
|
className?: string;
|
|
11
|
+
/** Color of the glow effect (default: '#38bdf8') */
|
|
6
12
|
glowColor?: string;
|
|
13
|
+
/** Size of the glow effect in pixels (default: 250) */
|
|
7
14
|
glowSize?: number;
|
|
15
|
+
/** Content to render inside the moving border container */
|
|
8
16
|
children: React.ReactNode;
|
|
9
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Animated border component with moving glow effects
|
|
20
|
+
*
|
|
21
|
+
* Creates an animated border with glowing elements that move around the perimeter
|
|
22
|
+
* of the container. Uses two glow elements with 180° phase offset to create
|
|
23
|
+
* a continuous flowing effect around rounded rectangle borders.
|
|
24
|
+
*
|
|
25
|
+
* Features:
|
|
26
|
+
* - Smooth animation along border path using SVG and Framer Motion
|
|
27
|
+
* - Customizable glow color and size
|
|
28
|
+
* - Two offset glow elements for continuous effect
|
|
29
|
+
* - Responsive and performant animation using requestAnimationFrame
|
|
30
|
+
* - Full-width container with padding for glow visibility
|
|
31
|
+
*
|
|
32
|
+
* @param className - Additional CSS class for styling
|
|
33
|
+
* @param duration - Animation cycle duration in milliseconds (default: 6000ms)
|
|
34
|
+
* @param children - Content to render inside the border
|
|
35
|
+
* @param glowColor - Color of the moving glow effects (default: bright blue)
|
|
36
|
+
* @param glowSize - Size of glow effects in pixels (default: 250px)
|
|
37
|
+
* @param props - Additional Material-UI Box props
|
|
38
|
+
* @returns JSX element with animated moving border effects
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <SMovingBorder
|
|
43
|
+
* duration={4000}
|
|
44
|
+
* glowColor="#ff6b6b"
|
|
45
|
+
* glowSize={200}
|
|
46
|
+
* >
|
|
47
|
+
* <YourContent />
|
|
48
|
+
* </SMovingBorder>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
10
51
|
declare function SMovingBorder({ className, duration, children, glowColor, glowSize, ...props }: SMovingBorderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
52
|
export default SMovingBorder;
|
|
@@ -12,7 +12,9 @@ const E = 250, A = "#38bdf8", d = (o, r) => ({
|
|
|
12
12
|
opacity: 0.5,
|
|
13
13
|
background: `radial-gradient(${r} 40%, transparent 60%)`,
|
|
14
14
|
filter: "blur(12px)",
|
|
15
|
+
// Creates the soft glow effect
|
|
15
16
|
pointerEvents: "none"
|
|
17
|
+
// Prevents interference with user interactions
|
|
16
18
|
});
|
|
17
19
|
function m({
|
|
18
20
|
children: o,
|
|
@@ -75,7 +77,8 @@ function k({
|
|
|
75
77
|
const a = x(null), h = x(null);
|
|
76
78
|
return w(() => () => {
|
|
77
79
|
h.current !== null && window.cancelAnimationFrame(h.current);
|
|
78
|
-
}, []),
|
|
80
|
+
}, []), // Main container with relative positioning for absolute children
|
|
81
|
+
/* @__PURE__ */ t.jsxs(
|
|
79
82
|
i,
|
|
80
83
|
{
|
|
81
84
|
position: "relative",
|
|
@@ -116,6 +119,7 @@ function k({
|
|
|
116
119
|
width: 120,
|
|
117
120
|
height: 120,
|
|
118
121
|
opacity: 0,
|
|
122
|
+
// Hidden by default
|
|
119
123
|
filter: "blur(16px)",
|
|
120
124
|
borderRadius: "50%",
|
|
121
125
|
transform: "translate(-50%, -50%)",
|
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
import { SChipsProps } from '../s-chips';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props interface for SMultiSelect component
|
|
5
|
+
* @template T - Type of the option values (string, number, or boolean)
|
|
6
|
+
*/
|
|
3
7
|
export interface SMultiSelectProps<T = string> {
|
|
8
|
+
/** Label text displayed in the input field */
|
|
4
9
|
label: string;
|
|
10
|
+
/** Callback fired when the selection changes */
|
|
5
11
|
onChange?: (value: T[]) => void;
|
|
12
|
+
/** Array of options with label and value pairs */
|
|
6
13
|
options: readonly {
|
|
7
14
|
label: string;
|
|
8
15
|
value: T;
|
|
9
16
|
}[];
|
|
17
|
+
/** Currently selected values */
|
|
10
18
|
value: T[];
|
|
19
|
+
/** Additional props to pass to the chips component */
|
|
11
20
|
chipProps?: Omit<SChipsProps, 'chips'>;
|
|
12
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* SMultiSelect - A multi-selection dropdown component that displays selected items as chips.
|
|
24
|
+
*
|
|
25
|
+
* Key features:
|
|
26
|
+
* - Generic typing for different value types (string, number, boolean)
|
|
27
|
+
* - Popover-based dropdown menu for option selection
|
|
28
|
+
* - Selected values displayed as removable chips below the input
|
|
29
|
+
* - Dynamic menu width matching the input field
|
|
30
|
+
* - Toggle selection behavior (click to select/deselect)
|
|
31
|
+
* - Integration with SChips component for consistent chip styling
|
|
32
|
+
*
|
|
33
|
+
* @param props - SMultiSelectProps with options, values, and configuration
|
|
34
|
+
* @returns JSX.Element - Multi-select input with chip display
|
|
35
|
+
*/
|
|
13
36
|
declare function SMultiSelect<T = string>({ label, onChange, options, value, chipProps, }: SMultiSelectProps<T>): React.JSX.Element;
|
|
14
37
|
export default SMultiSelect;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { j as t } from "../jsx-runtime-DywqP_6a.js";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import { c as h } from "../createSvgIcon-
|
|
3
|
+
import { c as h } from "../createSvgIcon-9XY7lJan.js";
|
|
4
4
|
import { Stack as j, OutlinedInput as M } from "@mui/material";
|
|
5
5
|
import { usePopover as v } from "../hooks/use-popover.js";
|
|
6
6
|
import S from "../s-chips/s-chips.js";
|
|
7
|
-
import { M as R } from "../Menu-
|
|
8
|
-
import { M as b } from "../MenuItem-
|
|
7
|
+
import { M as R } from "../Menu-DbldWmqB.js";
|
|
8
|
+
import { M as b } from "../MenuItem-BHTJlag0.js";
|
|
9
9
|
const I = h(/* @__PURE__ */ t.jsx("path", {
|
|
10
10
|
d: "M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"
|
|
11
11
|
}), "UnfoldMore");
|
|
@@ -1,8 +1,46 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the SNoSSR component
|
|
4
|
+
*/
|
|
2
5
|
export interface SNoSsrProps {
|
|
6
|
+
/** Content to render only on the client side */
|
|
3
7
|
children?: React.ReactNode;
|
|
8
|
+
/** Whether to defer rendering until after initial paint */
|
|
4
9
|
defer?: boolean;
|
|
10
|
+
/** Content to show during server-side rendering or while loading */
|
|
5
11
|
fallback?: React.ReactNode;
|
|
6
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Component that prevents server-side rendering of its children
|
|
15
|
+
*
|
|
16
|
+
* Based on Material-UI's NoSSR component but without prop-types dependency.
|
|
17
|
+
* Useful for components that:
|
|
18
|
+
* - Depend on browser-only APIs (localStorage, document, window)
|
|
19
|
+
* - Have different server vs client rendering (e.g., dynamic content)
|
|
20
|
+
* - Need to avoid hydration mismatches
|
|
21
|
+
* - Require client-side only libraries
|
|
22
|
+
*
|
|
23
|
+
* The component uses Material-UI's enhanced effect hook to ensure proper
|
|
24
|
+
* timing with React's concurrent features and server-side rendering.
|
|
25
|
+
*
|
|
26
|
+
* @param children - Content that should only render on client side
|
|
27
|
+
* @param defer - If true, delays rendering until after initial paint (default: false)
|
|
28
|
+
* @param fallback - Content to show during SSR and initial client load (default: null)
|
|
29
|
+
* @returns JSX fragment containing either fallback or children based on mount state
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <SNoSSR fallback={<div>Loading...</div>}>
|
|
34
|
+
* <ComponentThatUsesLocalStorage />
|
|
35
|
+
* </SNoSSR>
|
|
36
|
+
*
|
|
37
|
+
* // With defer for performance
|
|
38
|
+
* <SNoSSR defer fallback={<Skeleton />}>
|
|
39
|
+
* <ExpensiveClientOnlyComponent />
|
|
40
|
+
* </SNoSSR>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @see https://github.com/mui/material-ui/blob/master/packages/mui-base/src/NoSsr/NoSsr.tsx
|
|
44
|
+
*/
|
|
7
45
|
declare const SNoSsr: (props: SNoSsrProps) => React.JSX.Element;
|
|
8
46
|
export default SNoSsr;
|
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PaginationProps } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the SPagination component, extending Material-UI's PaginationProps
|
|
5
|
+
*/
|
|
3
6
|
export interface SPaginationProps extends PaginationProps {
|
|
7
|
+
/** Whether the pagination is in a loading state - shows skeleton when true */
|
|
4
8
|
loading?: boolean;
|
|
9
|
+
/** Total number of pages - component returns empty fragment when 0 */
|
|
5
10
|
count?: number;
|
|
6
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Enhanced pagination component with responsive sizing and loading states
|
|
14
|
+
*
|
|
15
|
+
* Features:
|
|
16
|
+
* - Responsive sizing (small on mobile, medium on larger screens)
|
|
17
|
+
* - Loading skeleton state
|
|
18
|
+
* - Conditional rendering (hidden when count is 0)
|
|
19
|
+
* - Full-width container layout
|
|
20
|
+
*
|
|
21
|
+
* @param loading - When true, displays loading skeleton instead of pagination
|
|
22
|
+
* @param count - Total number of pages (defaults to 0, hides component when 0)
|
|
23
|
+
* @param props - All other Material-UI Pagination props
|
|
24
|
+
* @returns JSX element containing responsive pagination or loading skeleton
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <SPagination
|
|
29
|
+
* count={totalPages}
|
|
30
|
+
* page={currentPage}
|
|
31
|
+
* onChange={handlePageChange}
|
|
32
|
+
* loading={isLoading}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
7
36
|
declare const SPagination: ({ loading, count, ...props }: SPaginationProps) => React.JSX.Element;
|
|
8
37
|
export default SPagination;
|
|
@@ -1,16 +1,51 @@
|
|
|
1
1
|
import { SelectProps } from '@mui/material';
|
|
2
|
+
/** Base type constraint for select options - can be primitives or objects */
|
|
2
3
|
type BaseOption = string | number | Record<string, any>;
|
|
4
|
+
/**
|
|
5
|
+
* Props interface for SSelect component - extends Material-UI SelectProps
|
|
6
|
+
* with enhanced option handling and form integration.
|
|
7
|
+
*
|
|
8
|
+
* @template T - Type of the option values (string, number, or object)
|
|
9
|
+
*/
|
|
3
10
|
export type SSelectProps<T extends BaseOption = string> = Omit<SelectProps, 'error' | 'variant'> & {
|
|
11
|
+
/** Array of options to display in the select dropdown */
|
|
4
12
|
options?: T[];
|
|
13
|
+
/** Key to use for option display text (required for object options) */
|
|
5
14
|
optionLabel?: T extends object ? keyof T : never;
|
|
15
|
+
/** Key to use for option values (required for object options) */
|
|
6
16
|
optionValue?: T extends object ? keyof T : never;
|
|
17
|
+
/** Placeholder text shown when no option is selected */
|
|
7
18
|
placeholder?: string;
|
|
19
|
+
/** Visual variant of the select input */
|
|
8
20
|
variant?: 'outlined' | 'filled' | 'standard';
|
|
21
|
+
/** Field label displayed above the select */
|
|
9
22
|
label?: string | React.ReactNode;
|
|
23
|
+
/** Error message to display below the field */
|
|
10
24
|
error?: string;
|
|
25
|
+
/** Whether the field is required (shows asterisk in label) */
|
|
11
26
|
required?: boolean;
|
|
27
|
+
/** Whether to use simple value rendering (for primitive values) */
|
|
12
28
|
simple?: boolean;
|
|
29
|
+
/** HTML id attribute for the select element */
|
|
13
30
|
htmlFor?: string;
|
|
14
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* SSelect - A flexible select component that handles both primitive and object options
|
|
34
|
+
* with consistent form labeling, validation, and help text patterns.
|
|
35
|
+
*
|
|
36
|
+
* Key features:
|
|
37
|
+
* - Generic typing for type-safe option handling
|
|
38
|
+
* - Support for both primitive (string/number) and object options
|
|
39
|
+
* - Configurable option label and value extraction for objects
|
|
40
|
+
* - Placeholder support with proper styling
|
|
41
|
+
* - Single and multiple selection modes
|
|
42
|
+
* - Simple mode for primitive value rendering
|
|
43
|
+
* - Integrates with SForm for consistent label and error handling
|
|
44
|
+
* - Proper disabled option support
|
|
45
|
+
*
|
|
46
|
+
* @param props - SSelectProps with options, form integration, and Material-UI Select props
|
|
47
|
+
* @param ref - Forward ref to the underlying Select component
|
|
48
|
+
* @returns JSX.Element - Wrapped Select with form labeling and enhanced option handling
|
|
49
|
+
*/
|
|
15
50
|
declare const SSelect: import('react').ForwardRefExoticComponent<Omit<SSelectProps<BaseOption>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
51
|
export default SSelect;
|
|
@@ -1,59 +1,63 @@
|
|
|
1
1
|
import { j as u } from "../jsx-runtime-DywqP_6a.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Select as
|
|
4
|
-
import
|
|
5
|
-
const M =
|
|
2
|
+
import { forwardRef as p, useState as C } from "react";
|
|
3
|
+
import { Select as w, MenuItem as E } from "@mui/material";
|
|
4
|
+
import I from "../s-form/s-form.js";
|
|
5
|
+
const M = p(
|
|
6
6
|
({
|
|
7
|
-
options:
|
|
7
|
+
options: r = [],
|
|
8
8
|
optionLabel: c = "name",
|
|
9
|
-
optionValue:
|
|
10
|
-
placeholder:
|
|
9
|
+
optionValue: g = "id",
|
|
10
|
+
placeholder: s,
|
|
11
11
|
label: v = "",
|
|
12
12
|
error: x,
|
|
13
13
|
required: y = !1,
|
|
14
|
-
variant:
|
|
15
|
-
simple:
|
|
16
|
-
htmlFor:
|
|
17
|
-
...
|
|
14
|
+
variant: O = "outlined",
|
|
15
|
+
simple: h = !1,
|
|
16
|
+
htmlFor: d,
|
|
17
|
+
...t
|
|
18
18
|
}, j) => {
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, [n.value]);
|
|
23
|
-
const a = (e) => String(typeof e == "string" || typeof e == "number" ? e : e[c]), l = (e) => typeof e == "string" || typeof e == "number" ? e : e[i];
|
|
24
|
-
return /* @__PURE__ */ u.jsx(R, { error: x, label: v, required: y, htmlFor: o, children: /* @__PURE__ */ u.jsx(
|
|
25
|
-
E,
|
|
19
|
+
const i = t.value !== void 0, [S, V] = C(t.multiple ? [] : null), b = i ? t.value : S, o = (e) => String(typeof e == "string" || typeof e == "number" ? e : e[c]), l = (e) => typeof e == "string" || typeof e == "number" ? e : e[g];
|
|
20
|
+
return /* @__PURE__ */ u.jsx(I, { error: x, label: v, required: y, htmlFor: d, children: /* @__PURE__ */ u.jsx(
|
|
21
|
+
w,
|
|
26
22
|
{
|
|
27
|
-
id:
|
|
23
|
+
id: d,
|
|
28
24
|
displayEmpty: !0,
|
|
29
25
|
fullWidth: !0,
|
|
30
26
|
defaultValue: "",
|
|
31
27
|
ref: j,
|
|
32
|
-
renderValue:
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
const
|
|
36
|
-
return
|
|
28
|
+
renderValue: t.multiple ? (e) => {
|
|
29
|
+
const n = e;
|
|
30
|
+
return n.length === 0 ? /* @__PURE__ */ u.jsx("span", { style: { color: "var(--s-palette-text-secondary)" }, children: s }) : n == null ? void 0 : n.map((a) => {
|
|
31
|
+
const f = r.find((m) => l(m) === l(a));
|
|
32
|
+
return f ? o(f) : "";
|
|
37
33
|
}).filter(Boolean).join(", ");
|
|
38
34
|
} : (e) => {
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
return /* @__PURE__ */ u.jsx("span", { style: { color: "var(--s-palette-text-secondary)" }, children:
|
|
42
|
-
if (
|
|
43
|
-
return
|
|
44
|
-
const
|
|
45
|
-
return
|
|
35
|
+
const n = e;
|
|
36
|
+
if (n == null || n === "")
|
|
37
|
+
return /* @__PURE__ */ u.jsx("span", { style: { color: "var(--s-palette-text-secondary)" }, children: s });
|
|
38
|
+
if (h)
|
|
39
|
+
return o(n);
|
|
40
|
+
const a = r.find((f) => l(f) === l(n));
|
|
41
|
+
return a ? o(a) : "";
|
|
46
42
|
},
|
|
47
|
-
...
|
|
48
|
-
value:
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
...t,
|
|
44
|
+
value: r.length ? b ?? "" : "",
|
|
45
|
+
onChange: (e, n) => {
|
|
46
|
+
if (t.onChange)
|
|
47
|
+
t.onChange(e, n);
|
|
48
|
+
else if (!i) {
|
|
49
|
+
const a = e.target.value;
|
|
50
|
+
V(a);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
children: r == null ? void 0 : r.map((e, n) => /* @__PURE__ */ u.jsx(
|
|
54
|
+
E,
|
|
51
55
|
{
|
|
52
56
|
disabled: (e == null ? void 0 : e.disabled) ?? !1,
|
|
53
57
|
value: l(e),
|
|
54
|
-
children:
|
|
58
|
+
children: o(e)
|
|
55
59
|
},
|
|
56
|
-
`${l(e)}-${
|
|
60
|
+
`${l(e)}-${n}`
|
|
57
61
|
))
|
|
58
62
|
}
|
|
59
63
|
) });
|
|
@@ -1,11 +1,41 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SkeletonProps } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* Props interface for SSkeleton component - extends Material-UI SkeletonProps
|
|
5
|
+
* with enhanced component presets and customization options
|
|
6
|
+
*/
|
|
3
7
|
export interface SSkeletonProps extends Omit<SkeletonProps, 'variant' | 'height' | 'width' | 'component'> {
|
|
8
|
+
/** Visual variant of the skeleton */
|
|
4
9
|
variant?: 'circular' | 'rectangular' | 'rounded' | 'text';
|
|
10
|
+
/** Height of the skeleton (number for px, string for CSS units) */
|
|
5
11
|
height?: number | string;
|
|
12
|
+
/** Width of the skeleton (number for px, string for CSS units) */
|
|
6
13
|
width?: number | string;
|
|
14
|
+
/** Font size for text variant skeletons */
|
|
7
15
|
fontSize?: number | string;
|
|
8
|
-
component
|
|
16
|
+
/** Pre-defined component preset for common UI elements */
|
|
17
|
+
component?: 'button' | 'checkbox' | 'radio-button' | 'avatar' | 'rounded-avatar' | 'icon-button' | 'typography' | 'title-typography';
|
|
9
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* SSkeleton - An enhanced skeleton loading component with pre-defined component presets.
|
|
21
|
+
* Wraps Material-UI Skeleton with common UI element configurations for consistent loading states.
|
|
22
|
+
*
|
|
23
|
+
* Key features:
|
|
24
|
+
* - Pre-defined presets for common UI components (buttons, avatars, checkboxes, etc.)
|
|
25
|
+
* - Customizable dimensions and font sizes
|
|
26
|
+
* - All Material-UI Skeleton variants supported
|
|
27
|
+
* - Consistent sizing across the design system
|
|
28
|
+
* - Fallback to custom configuration when no preset is specified
|
|
29
|
+
*
|
|
30
|
+
* Component presets provide standardized skeleton sizes that match actual component dimensions:
|
|
31
|
+
* - button: 32px height, rounded variant
|
|
32
|
+
* - checkbox/radio-button: 24px square/circle
|
|
33
|
+
* - avatar: 54px square or 48px circle
|
|
34
|
+
* - icon-button: 32px circle
|
|
35
|
+
* - typography: Full width text or 200px title
|
|
36
|
+
*
|
|
37
|
+
* @param props - SSkeletonProps with preset options and Material-UI Skeleton props
|
|
38
|
+
* @returns JSX.Element - Configured skeleton based on preset or custom settings
|
|
39
|
+
*/
|
|
10
40
|
declare const SSkeleton: ({ variant, width, height, fontSize, component, ...props }: SSkeletonProps) => React.JSX.Element;
|
|
11
41
|
export default SSkeleton;
|
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
import { AutosuggestionsConfigUserSpecified, CopilotTextarea } from '@copilotkit/react-textarea';
|
|
2
|
+
/**
|
|
3
|
+
* Props for SSmartTextField component - extends CopilotTextarea props
|
|
4
|
+
* with form integration and enhanced configuration options
|
|
5
|
+
*/
|
|
2
6
|
export type SSmartTextFieldProps = Omit<React.ComponentProps<typeof CopilotTextarea>, 'autosuggestionsConfig'> & {
|
|
7
|
+
/** Configuration for AI-powered autosuggestions */
|
|
3
8
|
autosuggestionsConfig?: AutosuggestionsConfigUserSpecified;
|
|
9
|
+
/** Field label displayed above the textarea */
|
|
4
10
|
label?: string | React.ReactNode;
|
|
11
|
+
/** Help text shown in tooltip next to the label */
|
|
5
12
|
hint?: string;
|
|
13
|
+
/** Error message to display below the field */
|
|
6
14
|
error?: string;
|
|
15
|
+
/** Whether the field is required (shows asterisk in label) */
|
|
7
16
|
required?: boolean;
|
|
17
|
+
/** HTML id attribute for the textarea element */
|
|
8
18
|
htmlFor?: string;
|
|
19
|
+
/** Minimum number of visible text rows */
|
|
9
20
|
minRows?: number;
|
|
21
|
+
/** Maximum number of visible text rows */
|
|
10
22
|
maxRows?: number;
|
|
23
|
+
/** Initial number of rows (defaults to minRows if not specified) */
|
|
11
24
|
rows?: number;
|
|
12
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* SSmartTextField - An AI-powered textarea component that integrates CopilotKit's autosuggestion
|
|
28
|
+
* capabilities with the design system's form patterns and styling.
|
|
29
|
+
*
|
|
30
|
+
* Key features:
|
|
31
|
+
* - AI-powered text autosuggestions via CopilotKit integration
|
|
32
|
+
* - Consistent form labeling, validation, and help text patterns via SForm
|
|
33
|
+
* - Configurable row limits with vertical resize capability
|
|
34
|
+
* - Theme-aware styling with focus states and hover effects
|
|
35
|
+
* - Customizable autosuggestion configuration for different use cases
|
|
36
|
+
* - Full CopilotTextarea API compatibility
|
|
37
|
+
*
|
|
38
|
+
* @param props - SSmartTextFieldProps with AI config, form integration, and CopilotTextarea props
|
|
39
|
+
* @returns JSX.Element - AI-enhanced textarea with form labeling and validation
|
|
40
|
+
*/
|
|
13
41
|
export declare function SSmartTextField({ autosuggestionsConfig, label, hint, error, required, htmlFor, minRows, maxRows, rows, ...props }: SSmartTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
42
|
export default SSmartTextField;
|