@povio/ui 2.3.3 → 3.0.0
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/components/Breadcrumbs/Breadcrumbs.js +11 -11
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +40 -14
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +21 -18
- package/dist/components/Menu/MenuItem.js +4 -4
- package/dist/components/Menu/MenuMobile.js +6 -6
- package/dist/components/Menu/MenuPopover.js +8 -8
- package/dist/components/Menu/menu.cva.d.ts +35 -13
- package/dist/components/Menu/menu.cva.js +30 -24
- package/dist/components/buttons/Button/Button.js +7 -7
- package/dist/components/buttons/Button/button.cva.d.ts +95 -26
- package/dist/components/buttons/Button/button.cva.js +601 -589
- package/dist/components/buttons/PillButton/PillButton.js +4 -4
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +247 -239
- package/dist/components/buttons/shared/ButtonContent.js +3 -3
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +3 -5
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -8
- package/dist/components/inputs/Checkbox/Checkbox.js +2 -2
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +4 -4
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +23 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.js +46 -40
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +4 -4
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +3 -3
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +4 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +3 -3
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +26 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.js +48 -40
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +23 -6
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +29 -20
- package/dist/components/inputs/FormField/FormFieldError.js +3 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +3 -3
- package/dist/components/inputs/FormField/FormFieldLabel.js +6 -6
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldError.cva.js +11 -8
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -8
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +3 -3
- package/dist/components/inputs/Input/TextArea/TextArea.js +4 -4
- package/dist/components/inputs/Input/TextInput/TextInput.js +3 -3
- package/dist/components/inputs/Input/shared/InputContent.js +5 -5
- package/dist/components/inputs/RadioGroup/RadioGroup.js +4 -4
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +12 -6
- package/dist/components/inputs/RadioGroup/radio.cva.js +27 -24
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectInput.js +4 -4
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +3 -3
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -6
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +21 -18
- package/dist/components/inputs/TextEditor/TextEditor.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +3 -3
- package/dist/components/inputs/Toggle/Toggle.js +4 -4
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +12 -6
- package/dist/components/inputs/Toggle/toggle.cva.js +24 -21
- package/dist/components/inputs/shared/CheckContent.js +3 -3
- package/dist/components/inputs/shared/input.cva.d.ts +55 -16
- package/dist/components/inputs/shared/input.cva.js +279 -271
- package/dist/components/inputs/shared/label.cva.d.ts +15 -6
- package/dist/components/inputs/shared/label.cva.js +28 -25
- package/dist/components/navigation/Accordion/Accordion.js +3 -3
- package/dist/components/navigation/Accordion/AccordionItem.js +11 -11
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +109 -44
- package/dist/components/navigation/Accordion/accordion.cva.js +114 -84
- package/dist/components/navigation/Stepper/Stepper.js +3 -3
- package/dist/components/navigation/Stepper/StepperItem.js +12 -12
- package/dist/components/navigation/Stepper/StepperSeparator.js +3 -3
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +86 -30
- package/dist/components/navigation/Stepper/stepper.cva.js +104 -83
- package/dist/components/overlays/Modal/Modal.js +5 -5
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -9
- package/dist/components/overlays/Modal/modal.cva.js +38 -27
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +3 -3
- package/dist/components/overlays/Tooltip/Tooltip.js +9 -9
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +45 -17
- package/dist/components/overlays/Tooltip/tooltip.cva.js +38 -26
- package/dist/components/segment/Segment.js +4 -4
- package/dist/components/segment/SegmentItem.js +4 -4
- package/dist/components/segment/segment.cva.d.ts +18 -7
- package/dist/components/segment/segment.cva.js +24 -21
- package/dist/components/shared/popover.cva.d.ts +7 -3
- package/dist/components/shared/popover.cva.js +3 -3
- package/dist/components/status/Alert/Alert.js +6 -6
- package/dist/components/status/Alert/alert.cva.d.ts +18 -6
- package/dist/components/status/Alert/alert.cva.js +60 -57
- package/dist/components/status/Loader/loader.cva.d.ts +23 -4
- package/dist/components/status/Loader/loader.cva.js +22 -13
- package/dist/components/status/Toast/Toast.js +6 -7
- package/dist/components/status/Toast/toast.cva.d.ts +61 -10
- package/dist/components/status/Toast/toast.cva.js +129 -64
- package/dist/components/status/shared/status.cva.d.ts +30 -8
- package/dist/components/status/shared/status.cva.js +56 -50
- package/dist/components/table/CellText.js +3 -3
- package/dist/components/table/HeaderText.js +3 -3
- package/dist/components/table/Table.js +6 -6
- package/dist/components/table/table.cva.d.ts +52 -19
- package/dist/components/table/table.cva.js +44 -35
- package/dist/components/text/Link/Link.js +3 -3
- package/dist/components/text/Link/link.cva.d.ts +11 -5
- package/dist/components/text/Link/link.cva.js +8 -5
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/components/text/Tag/tag.cva.d.ts +15 -5
- package/dist/components/text/Tag/tag.cva.js +51 -48
- package/dist/components/text/Typography/Typography.js +3 -3
- package/dist/components/text/Typography/typography.cva.d.ts +48 -7
- package/dist/components/text/Typography/typography.cva.js +125 -122
- package/dist/config/uiOverrides.context.d.ts +174 -0
- package/dist/config/uiOverrides.context.js +73 -0
- package/dist/index.d.ts +29 -1
- package/dist/index.js +30 -2
- package/dist/utils/style-merge.util.d.ts +43 -0
- package/dist/utils/style-merge.util.js +233 -0
- package/dist/utils/style-merge.util.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/config/uiStyle.context.d.ts +0 -162
- package/dist/config/uiStyle.context.js +0 -30
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
1
2
|
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
2
3
|
import { clsx } from "clsx";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
@@ -11,72 +12,75 @@ var toastContainer = cva("m-toast-gap-margin-mobile w-auto gap-toast-gap-margin-
|
|
|
11
12
|
"top-center": "top-0"
|
|
12
13
|
} } });
|
|
13
14
|
var toastWrapper = clsx("m-0! min-h-0! w-auto! max-w-toast bg-transparent! p-0! shadow-none!");
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
variant: "outlined",
|
|
38
|
-
color: "neutral",
|
|
39
|
-
className: "border-elevation-outline-default-1"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
variant: "outlined",
|
|
43
|
-
color: "success",
|
|
44
|
-
className: "border-elevation-outline-success-1"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
variant: "outlined",
|
|
48
|
-
color: "warning",
|
|
49
|
-
className: "border-elevation-outline-warning-1"
|
|
15
|
+
var toastDefinition = UIOverrides.defineConfig({
|
|
16
|
+
base: ["m-0 inline-flex w-auto flex-col items-center overflow-hidden rounded-toast-rounding-default shadow-4 md:flex-row"],
|
|
17
|
+
config: {
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
21
|
+
contained: "text-text-inverted-1"
|
|
22
|
+
},
|
|
23
|
+
color: {
|
|
24
|
+
neutral: "",
|
|
25
|
+
success: "",
|
|
26
|
+
warning: "",
|
|
27
|
+
error: ""
|
|
28
|
+
},
|
|
29
|
+
position: {
|
|
30
|
+
"bottom-right": "",
|
|
31
|
+
"bottom-left": "",
|
|
32
|
+
"bottom-center": "",
|
|
33
|
+
"top-right": "",
|
|
34
|
+
"top-left": "",
|
|
35
|
+
"top-center": ""
|
|
36
|
+
}
|
|
50
37
|
},
|
|
51
|
-
|
|
38
|
+
compoundVariants: [
|
|
39
|
+
{
|
|
40
|
+
variant: "outlined",
|
|
41
|
+
color: "neutral",
|
|
42
|
+
className: "border-elevation-outline-default-1"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
variant: "outlined",
|
|
46
|
+
color: "success",
|
|
47
|
+
className: "border-elevation-outline-success-1"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
variant: "outlined",
|
|
51
|
+
color: "warning",
|
|
52
|
+
className: "border-elevation-outline-warning-1"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
variant: "outlined",
|
|
56
|
+
color: "error",
|
|
57
|
+
className: "border-elevation-outline-error-1"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
variant: "contained",
|
|
61
|
+
color: "neutral",
|
|
62
|
+
className: "bg-elevation-fill-inverted-1"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
variant: "contained",
|
|
66
|
+
color: "success",
|
|
67
|
+
className: "bg-elevation-fill-success-1"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
variant: "contained",
|
|
71
|
+
color: "warning",
|
|
72
|
+
className: "bg-elevation-fill-warning-1"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
variant: "contained",
|
|
76
|
+
color: "error",
|
|
77
|
+
className: "bg-elevation-fill-error-1"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
defaultVariants: {
|
|
52
81
|
variant: "outlined",
|
|
53
|
-
color: "
|
|
54
|
-
className: "border-elevation-outline-error-1"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
variant: "contained",
|
|
58
|
-
color: "neutral",
|
|
59
|
-
className: "bg-elevation-fill-inverted-1"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
variant: "contained",
|
|
63
|
-
color: "success",
|
|
64
|
-
className: "bg-elevation-fill-success-1"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
variant: "contained",
|
|
68
|
-
color: "warning",
|
|
69
|
-
className: "bg-elevation-fill-warning-1"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
variant: "contained",
|
|
73
|
-
color: "error",
|
|
74
|
-
className: "bg-elevation-fill-error-1"
|
|
82
|
+
color: "neutral"
|
|
75
83
|
}
|
|
76
|
-
],
|
|
77
|
-
defaultVariants: {
|
|
78
|
-
variant: "outlined",
|
|
79
|
-
color: "neutral"
|
|
80
84
|
}
|
|
81
85
|
});
|
|
82
86
|
var buttonColorVariant = compoundMapper({
|
|
@@ -140,5 +144,66 @@ var buttonColorVariant = compoundMapper({
|
|
|
140
144
|
},
|
|
141
145
|
default: { color: "secondary" }
|
|
142
146
|
});
|
|
147
|
+
var statusIconDefinition = UIOverrides.defineConfig({
|
|
148
|
+
base: ["size-6 shrink-0"],
|
|
149
|
+
config: {
|
|
150
|
+
variants: {
|
|
151
|
+
variant: {
|
|
152
|
+
outlined: "",
|
|
153
|
+
contained: "text-text-inverted-1"
|
|
154
|
+
},
|
|
155
|
+
color: {
|
|
156
|
+
neutral: "",
|
|
157
|
+
success: "",
|
|
158
|
+
warning: "",
|
|
159
|
+
error: ""
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
compoundVariants: [
|
|
163
|
+
{
|
|
164
|
+
variant: "outlined",
|
|
165
|
+
color: "neutral",
|
|
166
|
+
className: "text-text-default-2"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
variant: "outlined",
|
|
170
|
+
color: "success",
|
|
171
|
+
className: "text-text-success-1"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
variant: "outlined",
|
|
175
|
+
color: "warning",
|
|
176
|
+
className: "text-text-warning-1"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
variant: "outlined",
|
|
180
|
+
color: "error",
|
|
181
|
+
className: "text-text-error-1"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
defaultVariants: {
|
|
185
|
+
variant: "outlined",
|
|
186
|
+
color: "neutral"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
var statusSeparatorDefinition = UIOverrides.defineConfig({
|
|
191
|
+
base: ["h-px shrink-0 self-stretch md:h-auto md:w-px"],
|
|
192
|
+
config: {
|
|
193
|
+
variants: {
|
|
194
|
+
variant: {
|
|
195
|
+
outlined: "",
|
|
196
|
+
contained: "hidden"
|
|
197
|
+
},
|
|
198
|
+
color: {
|
|
199
|
+
neutral: "bg-elevation-outline-default-1",
|
|
200
|
+
success: "bg-elevation-outline-success-1",
|
|
201
|
+
warning: "bg-elevation-outline-warning-1",
|
|
202
|
+
error: "bg-elevation-outline-error-1"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
defaultVariants: { color: "neutral" }
|
|
206
|
+
}
|
|
207
|
+
});
|
|
143
208
|
//#endregion
|
|
144
|
-
export { buttonColorVariant,
|
|
209
|
+
export { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition, toastContainer, toastDefinition, toastWrapper };
|
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export declare const statusIconDefinition: {
|
|
2
|
+
base: string[];
|
|
3
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
4
|
+
readonly variant: {
|
|
5
|
+
readonly outlined: "";
|
|
6
|
+
readonly contained: "text-text-inverted-1";
|
|
7
|
+
};
|
|
8
|
+
readonly color: {
|
|
9
|
+
readonly neutral: "";
|
|
10
|
+
readonly success: "";
|
|
11
|
+
readonly warning: "";
|
|
12
|
+
readonly error: "";
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
export declare const statusSeparatorDefinition: {
|
|
17
|
+
base: string[];
|
|
18
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
19
|
+
readonly variant: {
|
|
20
|
+
readonly outlined: "";
|
|
21
|
+
readonly contained: "hidden";
|
|
22
|
+
};
|
|
23
|
+
readonly color: {
|
|
24
|
+
readonly neutral: "bg-elevation-outline-default-1";
|
|
25
|
+
readonly success: "bg-elevation-outline-success-1";
|
|
26
|
+
readonly warning: "bg-elevation-outline-warning-1";
|
|
27
|
+
readonly error: "bg-elevation-outline-error-1";
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
@@ -1,59 +1,65 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/status/shared/status.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
var statusIconDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: ["size-6 shrink-0"],
|
|
5
|
+
config: {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
outlined: "",
|
|
9
|
+
contained: "text-text-inverted-1"
|
|
10
|
+
},
|
|
11
|
+
color: {
|
|
12
|
+
neutral: "",
|
|
13
|
+
success: "",
|
|
14
|
+
warning: "",
|
|
15
|
+
error: ""
|
|
16
|
+
}
|
|
8
17
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
compoundVariants: [
|
|
19
|
+
{
|
|
20
|
+
variant: "outlined",
|
|
21
|
+
color: "neutral",
|
|
22
|
+
class: "text-text-default-2"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
variant: "outlined",
|
|
26
|
+
color: "success",
|
|
27
|
+
class: "text-text-success-1"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
variant: "outlined",
|
|
31
|
+
color: "warning",
|
|
32
|
+
class: "text-text-warning-1"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
variant: "outlined",
|
|
36
|
+
color: "error",
|
|
37
|
+
class: "text-text-error-1"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
defaultVariants: {
|
|
28
41
|
variant: "outlined",
|
|
29
|
-
color: "
|
|
30
|
-
class: "text-text-warning-1"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
variant: "outlined",
|
|
34
|
-
color: "error",
|
|
35
|
-
class: "text-text-error-1"
|
|
42
|
+
color: "neutral"
|
|
36
43
|
}
|
|
37
|
-
],
|
|
38
|
-
defaultVariants: {
|
|
39
|
-
variant: "outlined",
|
|
40
|
-
color: "neutral"
|
|
41
44
|
}
|
|
42
45
|
});
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
var statusSeparatorDefinition = UIOverrides.defineConfig({
|
|
47
|
+
base: ["h-px shrink-0 self-stretch md:h-auto md:w-px"],
|
|
48
|
+
config: {
|
|
49
|
+
variants: {
|
|
50
|
+
variant: {
|
|
51
|
+
outlined: "",
|
|
52
|
+
contained: "hidden"
|
|
53
|
+
},
|
|
54
|
+
color: {
|
|
55
|
+
neutral: "bg-elevation-outline-default-1",
|
|
56
|
+
success: "bg-elevation-outline-success-1",
|
|
57
|
+
warning: "bg-elevation-outline-warning-1",
|
|
58
|
+
error: "bg-elevation-outline-error-1"
|
|
59
|
+
}
|
|
48
60
|
},
|
|
49
|
-
color:
|
|
50
|
-
|
|
51
|
-
success: "bg-elevation-outline-success-1",
|
|
52
|
-
warning: "bg-elevation-outline-warning-1",
|
|
53
|
-
error: "bg-elevation-outline-error-1"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
defaultVariants: { color: "neutral" }
|
|
61
|
+
defaultVariants: { color: "neutral" }
|
|
62
|
+
}
|
|
57
63
|
});
|
|
58
64
|
//#endregion
|
|
59
|
-
export {
|
|
65
|
+
export { statusIconDefinition, statusSeparatorDefinition };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
import { Typography } from "../text/Typography/Typography.js";
|
|
3
3
|
import { UIConfig } from "../../config/uiConfig.context.js";
|
|
4
|
-
import {
|
|
4
|
+
import { tableCellTextDefinition } from "./table.cva.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/table/CellText.tsx
|
|
7
7
|
var CellText = (props) => {
|
|
8
8
|
const uiConfig = UIConfig.useConfig();
|
|
9
9
|
const { variant = uiConfig.tableCellText.variant, size = uiConfig.tableCellText.size, children, style, className } = props;
|
|
10
10
|
return /* @__PURE__ */ jsx(Typography, {
|
|
11
|
-
className:
|
|
11
|
+
className: UIOverrides.useCva("table.cellTextCva", tableCellTextDefinition)({ className }),
|
|
12
12
|
as: "span",
|
|
13
13
|
variant,
|
|
14
14
|
size,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
import { Typography } from "../text/Typography/Typography.js";
|
|
3
3
|
import { UIConfig } from "../../config/uiConfig.context.js";
|
|
4
|
-
import {
|
|
4
|
+
import { tableHeaderTextDefinition } from "./table.cva.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/table/HeaderText.tsx
|
|
7
7
|
var HeaderText = (props) => {
|
|
8
8
|
const uiConfig = UIConfig.useConfig();
|
|
9
9
|
const { variant = uiConfig.tableHeaderText.variant, size = uiConfig.tableHeaderText.size, children, style, className } = props;
|
|
10
10
|
return /* @__PURE__ */ jsx(Typography, {
|
|
11
|
-
className:
|
|
11
|
+
className: UIOverrides.useCva("table.headerTextCva", tableHeaderTextDefinition)({ className }),
|
|
12
12
|
as: "span",
|
|
13
13
|
variant,
|
|
14
14
|
size,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ChevronDownIcon } from "../../assets/icons/ChevronDown.js";
|
|
2
2
|
import { ChevronUpIcon } from "../../assets/icons/ChevronUp.js";
|
|
3
|
-
import {
|
|
3
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
4
4
|
import { InlineIconButton } from "../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
5
|
import { useIntersectionObserver } from "../../hooks/useIntersectionObserver.js";
|
|
6
|
-
import {
|
|
6
|
+
import { tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableRowDefinition } from "./table.cva.js";
|
|
7
7
|
import { CellText } from "./CellText.js";
|
|
8
8
|
import { DragIndicatorIcon } from "../../assets/icons/DragIndicator.js";
|
|
9
9
|
import { HeaderText } from "./HeaderText.js";
|
|
@@ -74,10 +74,10 @@ var DraggableRow = ({ row, showCellBorder, onRowClick, onDoubleClick, tableRowCv
|
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
76
|
var Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, className, sorting, setSorting, columnOrder, setColumnOrder, columnVisibility, setColumnVisibility, bulkSelectionActions: ActionHeader, enableDragDrop = false, onDragEnd, onReorder, getRowId, enableRowSelection, enableMultiRowSelection = false, defaultSelectedRows, onRowSelectionChange, ...props }) => {
|
|
77
|
-
const tableRowCva =
|
|
78
|
-
const tableHeadRowCva =
|
|
79
|
-
const tableHeadDataCva =
|
|
80
|
-
const tableDataCva =
|
|
77
|
+
const tableRowCva = UIOverrides.useCva("table.rowCva", tableRowDefinition);
|
|
78
|
+
const tableHeadRowCva = UIOverrides.useCva("table.headRowCva", tableHeadRowDefinition);
|
|
79
|
+
const tableHeadDataCva = UIOverrides.useCva("table.headDataCva", tableHeadDataDefinition);
|
|
80
|
+
const tableDataCva = UIOverrides.useCva("table.dataCva", tableDataDefinition);
|
|
81
81
|
const ref = useRef(null);
|
|
82
82
|
const { listeners } = useTableNav();
|
|
83
83
|
const getCoreRowModelCallback = useCallback(getCoreRowModel, []);
|
|
@@ -1,25 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { UIOverrides } from '../../config/uiOverrides.context';
|
|
2
|
+
export declare const tableRowDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly alternatingBackground: {
|
|
6
|
+
readonly even: "even:bg-elevation-fill-inverted-4/5";
|
|
7
|
+
readonly odd: "odd:bg-elevation-fill-inverted-4/5";
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
export type TableRowConfig = NonNullable<typeof tableRowDefinition.config>;
|
|
12
|
+
export interface TableRowVariantProps extends UIOverrides.VariantProps<TableRowConfig> {
|
|
6
13
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
14
|
+
export declare const tableHeadRowDefinition: {
|
|
15
|
+
base: string[];
|
|
16
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
17
|
+
};
|
|
18
|
+
export type TableHeadRowConfig = NonNullable<typeof tableHeadRowDefinition.config>;
|
|
19
|
+
export interface TableHeadRowVariantProps extends UIOverrides.VariantProps<TableHeadRowConfig> {
|
|
9
20
|
}
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
export declare const tableHeadDataDefinition: {
|
|
22
|
+
base: string[];
|
|
23
|
+
config: import("../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
24
|
+
readonly hasRightBorder: {
|
|
25
|
+
readonly true: "border-l border-l-elevation-outline-default-1 border-solid";
|
|
26
|
+
readonly false: "";
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
export type TableHeadDataConfig = NonNullable<typeof tableHeadDataDefinition.config>;
|
|
31
|
+
export interface TableHeadDataVariantProps extends UIOverrides.VariantProps<TableHeadDataConfig> {
|
|
14
32
|
}
|
|
15
|
-
export declare const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
33
|
+
export declare const tableDataDefinition: {
|
|
34
|
+
base: string[];
|
|
35
|
+
config: import("../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
36
|
+
readonly hasRightBorder: {
|
|
37
|
+
readonly true: "border-l border-l-elevation-outline-default-1";
|
|
38
|
+
readonly false: "";
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
42
|
+
export type TableDataConfig = NonNullable<typeof tableDataDefinition.config>;
|
|
43
|
+
export interface TableDataVariantProps extends UIOverrides.VariantProps<TableDataConfig> {
|
|
19
44
|
}
|
|
20
|
-
export declare const
|
|
21
|
-
|
|
45
|
+
export declare const tableHeaderTextDefinition: {
|
|
46
|
+
base: string[];
|
|
47
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
48
|
+
};
|
|
49
|
+
export type TableHeaderTextConfig = NonNullable<typeof tableHeaderTextDefinition.config>;
|
|
50
|
+
export interface TableHeaderTextVariantProps extends UIOverrides.VariantProps<TableHeaderTextConfig> {
|
|
22
51
|
}
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
52
|
+
export declare const tableCellTextDefinition: {
|
|
53
|
+
base: string[];
|
|
54
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
55
|
+
};
|
|
56
|
+
export type TableCellTextConfig = NonNullable<typeof tableCellTextDefinition.config>;
|
|
57
|
+
export interface TableCellTextVariantProps extends UIOverrides.VariantProps<TableCellTextConfig> {
|
|
25
58
|
}
|
|
@@ -1,39 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/table/table.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
variants: { hasRightBorder: {
|
|
18
|
-
true: "border-l border-l-elevation-outline-default-1 border-solid",
|
|
19
|
-
false: ""
|
|
20
|
-
} },
|
|
21
|
-
defaultVariants: { hasRightBorder: true }
|
|
3
|
+
var tableRowDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: [
|
|
5
|
+
"h-9 max-h-12",
|
|
6
|
+
"hover:bg-elevation-fill-default-2",
|
|
7
|
+
"disabled:opacity-50",
|
|
8
|
+
"selected:bg-elevation-fill-default-2",
|
|
9
|
+
"hover:selected:bg-interactive-subtle-secondary-hover",
|
|
10
|
+
"data-clickable:cursor-pointer",
|
|
11
|
+
"focus-within:bg-elevation-fill-default-2"
|
|
12
|
+
],
|
|
13
|
+
config: { variants: { alternatingBackground: {
|
|
14
|
+
even: "even:bg-elevation-fill-inverted-4/5",
|
|
15
|
+
odd: "odd:bg-elevation-fill-inverted-4/5"
|
|
16
|
+
} } }
|
|
22
17
|
});
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
"border-b border-b-elevation-outline-default-1",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} },
|
|
34
|
-
defaultVariants: { hasRightBorder: true }
|
|
18
|
+
var tableHeadRowDefinition = UIOverrides.defineConfig({ base: ["h-8 w-full"] });
|
|
19
|
+
var tableHeadDataDefinition = UIOverrides.defineConfig({
|
|
20
|
+
base: ["border-b border-b-elevation-outline-default-1 border-solid px-table-header-cell-container-side-default py-table-header-cell-container-height-default text-left", "group-data-[is-sticky=true]/table-head:bg-elevation-fill-default-1"],
|
|
21
|
+
config: {
|
|
22
|
+
variants: { hasRightBorder: {
|
|
23
|
+
true: "border-l border-l-elevation-outline-default-1 border-solid",
|
|
24
|
+
false: ""
|
|
25
|
+
} },
|
|
26
|
+
defaultVariants: { hasRightBorder: true }
|
|
27
|
+
}
|
|
35
28
|
});
|
|
36
|
-
var
|
|
37
|
-
|
|
29
|
+
var tableDataDefinition = UIOverrides.defineConfig({
|
|
30
|
+
base: [
|
|
31
|
+
"relative h-0-5 overflow-hidden text-ellipsis whitespace-nowrap border-t border-t-transparent px-2",
|
|
32
|
+
"border-b border-b-elevation-outline-default-1",
|
|
33
|
+
"has-[*>[data-hovered]:not([data-disabled])]:hover:border-b-input-outlined-outline-hover",
|
|
34
|
+
"has-[*>[data-invalid]]:border-b-input-outlined-outline-error!",
|
|
35
|
+
"has-[*>[data-focused]]:border-b-input-outlined-outline-active"
|
|
36
|
+
],
|
|
37
|
+
config: {
|
|
38
|
+
variants: { hasRightBorder: {
|
|
39
|
+
true: "border-l border-l-elevation-outline-default-1",
|
|
40
|
+
false: ""
|
|
41
|
+
} },
|
|
42
|
+
defaultVariants: { hasRightBorder: true }
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
var tableHeaderTextDefinition = UIOverrides.defineConfig({ base: ["overflow-hidden text-ellipsis px-table-cell-content-side-m py-table-cell-content-height-m text-text-default-1"] });
|
|
46
|
+
var tableCellTextDefinition = UIOverrides.defineConfig({ base: ["block overflow-hidden text-ellipsis text-text-default-2"] });
|
|
38
47
|
//#endregion
|
|
39
|
-
export {
|
|
48
|
+
export { tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { LinkContext } from "../../../config/link.context.js";
|
|
3
|
-
import {
|
|
3
|
+
import { linkDefinition } from "./link.cva.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { Link } from "react-aria-components";
|
|
6
6
|
//#region src/components/text/Link/Link.tsx
|
|
7
7
|
var Link$1 = ({ variant, ...props }) => {
|
|
8
8
|
const linkContext = LinkContext.useLinkContext();
|
|
9
|
-
const linkCva =
|
|
9
|
+
const linkCva = UIOverrides.useCva("link.cva", linkDefinition);
|
|
10
10
|
const LinkComponent = linkContext?.LinkComponent ?? Link;
|
|
11
11
|
if (!props.to && props.href) props.to = props.href;
|
|
12
12
|
return /* @__PURE__ */ jsx(LinkComponent, {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
2
|
+
export declare const linkDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly variant: {
|
|
6
|
+
readonly default: ["text-interactive-text-primary-idle focus-visible:outline-interactive-text-primary-focus", "hover:text-interactive-text-primary-hover focus-visible:text-interactive-text-primary-focus active:text-interactive-text-primary-pressed"];
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
export type LinkConfig = NonNullable<typeof linkDefinition.config>;
|
|
11
|
+
export interface LinkVariantProps extends UIOverrides.VariantProps<LinkConfig> {
|
|
6
12
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
1
2
|
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
3
|
//#region src/components/text/Link/link.cva.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
var linkDefinition = UIOverrides.defineConfig({
|
|
5
|
+
base: ["underline", uiOutlineClass],
|
|
6
|
+
config: {
|
|
7
|
+
variants: { variant: { default: ["text-interactive-text-primary-idle focus-visible:outline-interactive-text-primary-focus", "hover:text-interactive-text-primary-hover focus-visible:text-interactive-text-primary-focus active:text-interactive-text-primary-pressed"] } },
|
|
8
|
+
defaultVariants: { variant: "default" }
|
|
9
|
+
}
|
|
7
10
|
});
|
|
8
11
|
//#endregion
|
|
9
|
-
export {
|
|
12
|
+
export { linkDefinition };
|