@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,115 @@
|
|
|
1
1
|
import { TableProps } from '@mui/material/Table';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Column definition interface for data table columns
|
|
5
|
+
* Defines how data should be displayed and formatted in table columns
|
|
6
|
+
*/
|
|
3
7
|
export interface ColumnDef<TRowModel> {
|
|
8
|
+
/** Text alignment for column content and header */
|
|
4
9
|
align?: 'left' | 'right' | 'center';
|
|
10
|
+
/** Object field to extract value from (optional if using formatter) */
|
|
5
11
|
field?: keyof TRowModel;
|
|
12
|
+
/** Custom rendering function for cell content */
|
|
6
13
|
formatter?: (row: TRowModel, index: number) => React.ReactNode;
|
|
14
|
+
/** Whether to hide the column header name */
|
|
7
15
|
hideName?: boolean;
|
|
16
|
+
/** Display name for the column header */
|
|
8
17
|
name: string;
|
|
18
|
+
/** Fixed width for the column */
|
|
9
19
|
width?: number | string;
|
|
10
20
|
}
|
|
21
|
+
/** Type for row identification - can be number or string */
|
|
11
22
|
type RowId = number | string;
|
|
23
|
+
/**
|
|
24
|
+
* Props for the SDataTable component, extending Material-UI TableProps
|
|
25
|
+
*/
|
|
12
26
|
export interface SDataTableProps<TRowModel> extends Omit<TableProps, 'onClick'> {
|
|
27
|
+
/** Array of column definitions specifying how to display data */
|
|
13
28
|
columns: ColumnDef<TRowModel>[];
|
|
29
|
+
/** Whether to hide the table header */
|
|
14
30
|
hideHead?: boolean;
|
|
31
|
+
/** Whether rows should show hover effects */
|
|
15
32
|
hover?: boolean;
|
|
33
|
+
/** Click handler for row interactions */
|
|
16
34
|
onClick?: (event: React.MouseEvent, row: TRowModel) => void;
|
|
35
|
+
/** Handler for deselecting all rows */
|
|
17
36
|
onDeselectAll?: (event: React.ChangeEvent) => void;
|
|
37
|
+
/** Handler for deselecting individual rows */
|
|
18
38
|
onDeselectOne?: (event: React.ChangeEvent, row: TRowModel) => void;
|
|
39
|
+
/** Handler for selecting all rows */
|
|
19
40
|
onSelectAll?: (event: React.ChangeEvent) => void;
|
|
41
|
+
/** Handler for selecting individual rows */
|
|
20
42
|
onSelectOne?: (event: React.ChangeEvent, row: TRowModel) => void;
|
|
43
|
+
/** Array of data objects to display in table rows */
|
|
21
44
|
rows: TRowModel[];
|
|
45
|
+
/** Whether rows can be selected with checkboxes */
|
|
22
46
|
selectable?: boolean;
|
|
47
|
+
/** Set of currently selected row IDs */
|
|
23
48
|
selected?: Set<RowId>;
|
|
49
|
+
/** Function to extract unique ID from row data */
|
|
24
50
|
uniqueRowId?: (row: TRowModel) => RowId;
|
|
25
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Advanced data table component with selection, sorting, and customizable columns
|
|
54
|
+
*
|
|
55
|
+
* Features:
|
|
56
|
+
* - Flexible column definitions with custom formatting
|
|
57
|
+
* - Row selection with checkboxes (individual and bulk)
|
|
58
|
+
* - Clickable rows with hover effects
|
|
59
|
+
* - Empty state handling
|
|
60
|
+
* - Hidden header option
|
|
61
|
+
* - Customizable column alignment and width
|
|
62
|
+
* - Generic type support for type-safe row data
|
|
63
|
+
*
|
|
64
|
+
* The table expects row data to optionally have an 'id' field, or you can provide
|
|
65
|
+
* a custom uniqueRowId function to extract identifiers from your data structure.
|
|
66
|
+
*
|
|
67
|
+
* @param columns - Array defining how each column should be displayed
|
|
68
|
+
* @param hideHead - Whether to hide the table header row
|
|
69
|
+
* @param hover - Whether rows should show hover effects
|
|
70
|
+
* @param onClick - Handler for row click events
|
|
71
|
+
* @param onDeselectAll - Handler for bulk deselection
|
|
72
|
+
* @param onDeselectOne - Handler for individual row deselection
|
|
73
|
+
* @param onSelectOne - Handler for individual row selection
|
|
74
|
+
* @param onSelectAll - Handler for bulk selection
|
|
75
|
+
* @param rows - Array of data objects to display
|
|
76
|
+
* @param selectable - Whether to show selection checkboxes
|
|
77
|
+
* @param selected - Set of currently selected row IDs
|
|
78
|
+
* @param uniqueRowId - Function to extract unique ID from row data
|
|
79
|
+
* @param props - Additional Material-UI Table props
|
|
80
|
+
* @returns JSX element containing the complete data table
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* interface User {
|
|
85
|
+
* id: number;
|
|
86
|
+
* name: string;
|
|
87
|
+
* email: string;
|
|
88
|
+
* role: string;
|
|
89
|
+
* }
|
|
90
|
+
*
|
|
91
|
+
* const columns: ColumnDef<User>[] = [
|
|
92
|
+
* { name: 'Name', field: 'name' },
|
|
93
|
+
* { name: 'Email', field: 'email' },
|
|
94
|
+
* {
|
|
95
|
+
* name: 'Actions',
|
|
96
|
+
* formatter: (user) => (
|
|
97
|
+
* <Button onClick={() => editUser(user.id)}>Edit</Button>
|
|
98
|
+
* )
|
|
99
|
+
* }
|
|
100
|
+
* ];
|
|
101
|
+
*
|
|
102
|
+
* <SDataTable
|
|
103
|
+
* columns={columns}
|
|
104
|
+
* rows={users}
|
|
105
|
+
* selectable
|
|
106
|
+
* selected={selectedUsers}
|
|
107
|
+
* onSelectOne={handleSelectUser}
|
|
108
|
+
* onSelectAll={handleSelectAll}
|
|
109
|
+
* onClick={handleRowClick}
|
|
110
|
+
* />
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
26
113
|
declare function SDataTable<TRowModel extends object & {
|
|
27
114
|
id?: RowId | null;
|
|
28
115
|
}>({ columns, hideHead, hover, onClick, onDeselectAll, onDeselectOne, onSelectOne, onSelectAll, rows, selectable, selected, uniqueRowId, ...props }: SDataTableProps<TRowModel>): React.JSX.Element;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { j as r } from "../jsx-runtime-DywqP_6a.js";
|
|
2
2
|
import * as y from "react";
|
|
3
3
|
import ve from "../s-empty/s-empty.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { g as
|
|
4
|
+
import { c as j, P as e } from "../createTheme-wt8sY36y.js";
|
|
5
|
+
import { s as S, b as N, r as se, c as q, u as $, a as I, m as _ } from "../createSvgIcon-9XY7lJan.js";
|
|
6
|
+
import { g as B } from "../colorManipulator-CPZHCebU.js";
|
|
7
|
+
import { g as M } from "../generateUtilityClasses-D-O3RBPF.js";
|
|
7
8
|
import { u as Te, a as Ce } from "../useFormControl-B3RPiDsz.js";
|
|
8
|
-
import { b as L, B as ke, r as je, m as we } from "../useSlot-
|
|
9
|
+
import { b as L, B as ke, r as je, m as we } from "../useSlot-B_4ipGBP.js";
|
|
9
10
|
import { c as X } from "../createSimplePaletteValueFilter-B7--0ryQ.js";
|
|
10
11
|
function Re(o) {
|
|
11
|
-
return
|
|
12
|
+
return B("PrivateSwitchBase", o);
|
|
12
13
|
}
|
|
13
14
|
M("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
14
15
|
const Oe = (o) => {
|
|
@@ -21,7 +22,7 @@ const Oe = (o) => {
|
|
|
21
22
|
root: ["root", s && "checked", a && "disabled", i && `edge${j(i)}`],
|
|
22
23
|
input: ["input"]
|
|
23
24
|
};
|
|
24
|
-
return
|
|
25
|
+
return N(n, Re, t);
|
|
25
26
|
}, Pe = S(ke, {
|
|
26
27
|
name: "MuiSwitchBase"
|
|
27
28
|
})({
|
|
@@ -320,7 +321,7 @@ const ze = q(/* @__PURE__ */ r.jsx("path", {
|
|
|
320
321
|
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
|
|
321
322
|
}), "IndeterminateCheckBox");
|
|
322
323
|
function Me(o) {
|
|
323
|
-
return
|
|
324
|
+
return B("MuiCheckbox", o);
|
|
324
325
|
}
|
|
325
326
|
const D = M("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]), He = (o) => {
|
|
326
327
|
const {
|
|
@@ -330,7 +331,7 @@ const D = M("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "col
|
|
|
330
331
|
size: i
|
|
331
332
|
} = o, n = {
|
|
332
333
|
root: ["root", s && "indeterminate", `color${j(a)}`, `size${j(i)}`]
|
|
333
|
-
}, p =
|
|
334
|
+
}, p = N(n, Me, t);
|
|
334
335
|
return {
|
|
335
336
|
...t,
|
|
336
337
|
// forward the disabled and checked classes to the SwitchBase
|
|
@@ -569,7 +570,7 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
|
569
570
|
const J = /* @__PURE__ */ y.createContext();
|
|
570
571
|
process.env.NODE_ENV !== "production" && (J.displayName = "TableContext");
|
|
571
572
|
function Ue(o) {
|
|
572
|
-
return
|
|
573
|
+
return B("MuiTable", o);
|
|
573
574
|
}
|
|
574
575
|
M("MuiTable", ["root", "stickyHeader"]);
|
|
575
576
|
const Ve = (o) => {
|
|
@@ -577,7 +578,7 @@ const Ve = (o) => {
|
|
|
577
578
|
classes: t,
|
|
578
579
|
stickyHeader: s
|
|
579
580
|
} = o;
|
|
580
|
-
return
|
|
581
|
+
return N({
|
|
581
582
|
root: ["root", s && "stickyHeader"]
|
|
582
583
|
}, Ue, t);
|
|
583
584
|
}, _e = S("table", {
|
|
@@ -690,14 +691,14 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
|
|
|
690
691
|
const F = /* @__PURE__ */ y.createContext();
|
|
691
692
|
process.env.NODE_ENV !== "production" && (F.displayName = "Tablelvl2Context");
|
|
692
693
|
function We(o) {
|
|
693
|
-
return
|
|
694
|
+
return B("MuiTableBody", o);
|
|
694
695
|
}
|
|
695
696
|
M("MuiTableBody", ["root"]);
|
|
696
697
|
const De = (o) => {
|
|
697
698
|
const {
|
|
698
699
|
classes: t
|
|
699
700
|
} = o;
|
|
700
|
-
return
|
|
701
|
+
return N({
|
|
701
702
|
root: ["root"]
|
|
702
703
|
}, We, t);
|
|
703
704
|
}, Le = S("tbody", {
|
|
@@ -759,7 +760,7 @@ process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
|
759
760
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
760
761
|
});
|
|
761
762
|
function qe(o) {
|
|
762
|
-
return
|
|
763
|
+
return B("MuiTableCell", o);
|
|
763
764
|
}
|
|
764
765
|
const Je = M("MuiTableCell", ["root", "head", "body", "footer", "sizeSmall", "sizeMedium", "paddingCheckbox", "paddingNone", "alignLeft", "alignCenter", "alignRight", "alignJustify", "stickyHeader"]), Ge = (o) => {
|
|
765
766
|
const {
|
|
@@ -772,7 +773,7 @@ const Je = M("MuiTableCell", ["root", "head", "body", "footer", "sizeSmall", "si
|
|
|
772
773
|
} = o, d = {
|
|
773
774
|
root: ["root", s, p && "stickyHeader", a !== "inherit" && `align${j(a)}`, i !== "normal" && `padding${j(i)}`, `size${j(n)}`]
|
|
774
775
|
};
|
|
775
|
-
return
|
|
776
|
+
return N(d, qe, t);
|
|
776
777
|
}, Ke = S("td", {
|
|
777
778
|
name: "MuiTableCell",
|
|
778
779
|
slot: "Root",
|
|
@@ -989,14 +990,14 @@ process.env.NODE_ENV !== "production" && (H.propTypes = {
|
|
|
989
990
|
variant: e.oneOfType([e.oneOf(["body", "footer", "head"]), e.string])
|
|
990
991
|
});
|
|
991
992
|
function Qe(o) {
|
|
992
|
-
return
|
|
993
|
+
return B("MuiTableHead", o);
|
|
993
994
|
}
|
|
994
995
|
M("MuiTableHead", ["root"]);
|
|
995
996
|
const Xe = (o) => {
|
|
996
997
|
const {
|
|
997
998
|
classes: t
|
|
998
999
|
} = o;
|
|
999
|
-
return
|
|
1000
|
+
return N({
|
|
1000
1001
|
root: ["root"]
|
|
1001
1002
|
}, Qe, t);
|
|
1002
1003
|
}, Ye = S("thead", {
|
|
@@ -1058,7 +1059,7 @@ process.env.NODE_ENV !== "production" && (ie.propTypes = {
|
|
|
1058
1059
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
1059
1060
|
});
|
|
1060
1061
|
function eo(o) {
|
|
1061
|
-
return
|
|
1062
|
+
return B("MuiTableRow", o);
|
|
1062
1063
|
}
|
|
1063
1064
|
const oe = M("MuiTableRow", ["root", "selected", "hover", "head", "footer"]), oo = (o) => {
|
|
1064
1065
|
const {
|
|
@@ -1068,7 +1069,7 @@ const oe = M("MuiTableRow", ["root", "selected", "hover", "head", "footer"]), oo
|
|
|
1068
1069
|
head: i,
|
|
1069
1070
|
footer: n
|
|
1070
1071
|
} = o;
|
|
1071
|
-
return
|
|
1072
|
+
return N({
|
|
1072
1073
|
root: ["root", s && "selected", a && "hover", i && "head", n && "footer"]
|
|
1073
1074
|
}, eo, t);
|
|
1074
1075
|
}, to = S("tr", {
|
|
@@ -1161,7 +1162,7 @@ process.env.NODE_ENV !== "production" && (V.propTypes = {
|
|
|
1161
1162
|
*/
|
|
1162
1163
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
1163
1164
|
});
|
|
1164
|
-
function
|
|
1165
|
+
function fo({
|
|
1165
1166
|
columns: o,
|
|
1166
1167
|
hideHead: t,
|
|
1167
1168
|
hover: s,
|
|
@@ -1184,6 +1185,7 @@ function uo({
|
|
|
1184
1185
|
sx: {
|
|
1185
1186
|
...t && {
|
|
1186
1187
|
visibility: "collapse",
|
|
1188
|
+
// Hide header while preserving layout
|
|
1187
1189
|
"--TableCell-borderWidth": 0
|
|
1188
1190
|
}
|
|
1189
1191
|
},
|
|
@@ -1203,9 +1205,11 @@ function uo({
|
|
|
1203
1205
|
H,
|
|
1204
1206
|
{
|
|
1205
1207
|
sx: {
|
|
1208
|
+
// Apply fixed width if specified
|
|
1206
1209
|
width: c.width,
|
|
1207
1210
|
minWidth: c.width,
|
|
1208
1211
|
maxWidth: c.width,
|
|
1212
|
+
// Apply text alignment if specified
|
|
1209
1213
|
...c.align && { textAlign: c.align }
|
|
1210
1214
|
},
|
|
1211
1215
|
children: c.hideName ? null : c.name
|
|
@@ -1243,15 +1247,22 @@ function uo({
|
|
|
1243
1247
|
}
|
|
1244
1248
|
) }) : null,
|
|
1245
1249
|
o.map(
|
|
1246
|
-
(f) => /* @__PURE__ */ r.jsx(H, {
|
|
1250
|
+
(f) => /* @__PURE__ */ r.jsx(H, {
|
|
1251
|
+
sx: { ...f.align && { textAlign: f.align } },
|
|
1252
|
+
// Use custom formatter if provided, otherwise extract field value
|
|
1253
|
+
children: f.formatter ? f.formatter(c, v) : f.field ? c[f.field] : null
|
|
1254
|
+
}, f.name)
|
|
1247
1255
|
)
|
|
1248
1256
|
]
|
|
1249
1257
|
},
|
|
1250
1258
|
m ?? v
|
|
1251
1259
|
);
|
|
1252
|
-
}) :
|
|
1260
|
+
}) : (
|
|
1261
|
+
// Empty state when no data is available
|
|
1262
|
+
/* @__PURE__ */ r.jsx(V, { children: /* @__PURE__ */ r.jsx(H, { align: "center", colSpan: o.length, children: /* @__PURE__ */ r.jsx(ve, {}) }) })
|
|
1263
|
+
) })
|
|
1253
1264
|
] });
|
|
1254
1265
|
}
|
|
1255
1266
|
export {
|
|
1256
|
-
|
|
1267
|
+
fo as default
|
|
1257
1268
|
};
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props interface for SDatePicker component - extends Material-UI X DatePickerProps
|
|
5
|
+
* with form integration capabilities
|
|
6
|
+
*/
|
|
3
7
|
export interface SDatePickerProps extends DatePickerProps {
|
|
8
|
+
/** Field label displayed above the date picker */
|
|
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 below the field */
|
|
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
|
+
* SDatePicker - A standardized date picker component that wraps Material-UI X DatePicker
|
|
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
|
+
* - Uses Material-UI TextField as the default input component
|
|
26
|
+
* - Maintains full Material-UI X DatePicker API compatibility
|
|
27
|
+
* - Provides accessible form labeling with htmlFor/id association
|
|
28
|
+
* - Includes help text tooltip functionality
|
|
29
|
+
* - Disables accessible field DOM structure for better styling control
|
|
30
|
+
* - Allows slot overrides for advanced customization
|
|
31
|
+
*
|
|
32
|
+
* @param props - SDatePickerProps with form integration and Material-UI X DatePicker props
|
|
33
|
+
* @returns JSX.Element - Wrapped DatePicker with form labeling and validation
|
|
34
|
+
*/
|
|
10
35
|
declare function SDatePicker({ label, required, error, htmlFor, hint, ...props }: SDatePickerProps): React.JSX.Element;
|
|
11
36
|
export default SDatePicker;
|