@marigold/theme-rui 1.3.0 → 1.4.1
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/index.js +127 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +127 -43
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +120 -39
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ __export(components_exports, {
|
|
|
31
31
|
Accordion: () => Accordion,
|
|
32
32
|
Badge: () => Badge,
|
|
33
33
|
Body: () => Body,
|
|
34
|
+
Breadcrumbs: () => Breadcrumbs,
|
|
34
35
|
Button: () => Button,
|
|
35
36
|
Calendar: () => Calendar,
|
|
36
37
|
Card: () => Card,
|
|
@@ -72,6 +73,7 @@ __export(components_exports, {
|
|
|
72
73
|
Tag: () => Tag,
|
|
73
74
|
Text: () => Text,
|
|
74
75
|
TextArea: () => TextArea,
|
|
76
|
+
Toast: () => Toast,
|
|
75
77
|
Tooltip: () => Tooltip,
|
|
76
78
|
Underlay: () => Underlay,
|
|
77
79
|
XLoader: () => XLoader
|
|
@@ -166,7 +168,7 @@ var import_system4 = require("@marigold/system");
|
|
|
166
168
|
var Button = (0, import_system4.cva)(
|
|
167
169
|
[
|
|
168
170
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow]",
|
|
169
|
-
"[&_svg]:shrink-0",
|
|
171
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
170
172
|
"focus-visible:util-focus-ring outline-none disabled:util-disabled",
|
|
171
173
|
"pending:text-disabled-foreground pending:bg-disabled pending:cursor-not-allowed pending:border-none",
|
|
172
174
|
"cursor-pointer"
|
|
@@ -174,13 +176,10 @@ var Button = (0, import_system4.cva)(
|
|
|
174
176
|
{
|
|
175
177
|
variants: {
|
|
176
178
|
variant: {
|
|
177
|
-
primary: "bg-brand text-brand-foreground shadow-
|
|
178
|
-
secondary: "border border-input bg-background shadow-
|
|
179
|
+
primary: "bg-brand text-brand-foreground shadow-xs hover:bg-brand/90",
|
|
180
|
+
secondary: "border border-input bg-background shadow-xs hover:bg-hover hover:text-foreground expanded:bg-hover",
|
|
179
181
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
180
|
-
ghost: "hover:bg-hover hover:text-foreground"
|
|
181
|
-
// only used for calendar in MonthListBox and YearListBox to have a hover over other options
|
|
182
|
-
// TODO: Remove this in future and rethink the MonthListBox and YearListBox or use another variant
|
|
183
|
-
text: "hover:bg-hover"
|
|
182
|
+
ghost: "hover:bg-hover hover:text-foreground"
|
|
184
183
|
},
|
|
185
184
|
size: {
|
|
186
185
|
default: "h-button px-4 py-2 [&_svg]:size-4",
|
|
@@ -218,7 +217,7 @@ var import_system6 = require("@marigold/system");
|
|
|
218
217
|
var Checkbox = {
|
|
219
218
|
checkbox: (0, import_system6.cva)([
|
|
220
219
|
"grid size-4 shrink-0 place-content-center rounded",
|
|
221
|
-
"border border-input shadow-
|
|
220
|
+
"border border-input shadow-xs",
|
|
222
221
|
"group-focus-visible/checkbox:util-focus-ring outline-none",
|
|
223
222
|
"group-disabled/checkbox:group-selected/checkbox:bg-disabled group-disabled/checkbox:border-disabled! group-disabled/checkbox:text-disabled-foreground group-disabled/checkbox:cursor-not-allowed",
|
|
224
223
|
"group-selected/checkbox:border-brand group-selected/checkbox:bg-brand group-selected/checkbox:text-brand-foreground",
|
|
@@ -263,11 +262,11 @@ var Calendar = {
|
|
|
263
262
|
"focus-visible:util-focus-ring outline-none",
|
|
264
263
|
"cursor-pointer",
|
|
265
264
|
"hover:bg-hover",
|
|
266
|
-
"aria-[current=true]:bg-brand aria-[current=true]:text-brand-foreground aria-[current=true]:shadow-
|
|
265
|
+
"aria-[current=true]:bg-brand aria-[current=true]:text-brand-foreground aria-[current=true]:shadow-xs aria-[current=true]:hover:bg-brand/90"
|
|
267
266
|
]),
|
|
268
267
|
select: (0, import_system7.cva)([
|
|
269
268
|
"[&svg]:text-muted-foreground/80",
|
|
270
|
-
"flex w-full px-3 py-2 rounded-lg shadow-
|
|
269
|
+
"flex w-full px-3 py-2 rounded-lg shadow-xs border border-input bg-background text-sm text-foreground transition-shadow",
|
|
271
270
|
"focus-visible:util-focus-ring outline-none",
|
|
272
271
|
"h-input",
|
|
273
272
|
"disabled:cursor-not-allowed disabled:text-disabled-foreground disabled:bg-disabled",
|
|
@@ -332,7 +331,7 @@ var import_system12 = require("@marigold/system");
|
|
|
332
331
|
|
|
333
332
|
// src/components/Input.styles.ts
|
|
334
333
|
var import_system11 = require("@marigold/system");
|
|
335
|
-
var inputContainer = "flex w-full px-3 py-2 rounded-lg shadow-
|
|
334
|
+
var inputContainer = "flex w-full px-3 py-2 rounded-lg shadow-xs border border-input bg-background text-sm text-foreground transition-shadow group-read-only/field:bg-muted";
|
|
336
335
|
var inputDisabled = "disabled:cursor-not-allowed disabled:text-disabled-foreground disabled:bg-disabled";
|
|
337
336
|
var inputInvalid = "group-invalid/field:border-destructive group-invalid/field:focus:border-destructive group-invalid/field:focus:ring-destructive/20";
|
|
338
337
|
var inputReadOnly = "group-read-only/field:bg-muted";
|
|
@@ -573,9 +572,14 @@ var ListBox = {
|
|
|
573
572
|
// src/components/Menu.styles.ts
|
|
574
573
|
var import_system28 = require("@marigold/system");
|
|
575
574
|
var Menu = {
|
|
576
|
-
container: (0, import_system28.cva)([
|
|
575
|
+
container: (0, import_system28.cva)([
|
|
576
|
+
"text-foreground z-50 overflow-hidden rounded-md p-1 outline-none"
|
|
577
|
+
]),
|
|
577
578
|
item: (0, import_system28.cva)([
|
|
578
|
-
"
|
|
579
|
+
"relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-hidden select-none",
|
|
580
|
+
"focus:bg-focus",
|
|
581
|
+
"disabled:text-disabled-foreground",
|
|
582
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4 [&_svg]:opacity-60"
|
|
579
583
|
]),
|
|
580
584
|
section: (0, import_system28.cva)(
|
|
581
585
|
"text-muted-foreground px-2 py-1.5 text-xs font-medium border-t border-t-border in-first:border-t-0"
|
|
@@ -583,14 +587,14 @@ var Menu = {
|
|
|
583
587
|
button: (0, import_system28.cva)(
|
|
584
588
|
[
|
|
585
589
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow]",
|
|
586
|
-
"[&_svg]:shrink-0",
|
|
590
|
+
"[&_svg]:shrink-0 [&_svg]:pointer-events-none",
|
|
587
591
|
"focus-visible:util-focus-ring outline-none disabled:util-disabled",
|
|
588
592
|
"cursor-pointer"
|
|
589
593
|
],
|
|
590
594
|
{
|
|
591
595
|
variants: {
|
|
592
596
|
variant: {
|
|
593
|
-
secondary: "border border-input bg-background shadow-
|
|
597
|
+
secondary: "border border-input bg-background shadow-xs hover:bg-hover hover:text-foreground expanded:bg-hover",
|
|
594
598
|
ghost: "hover:bg-hover hover:text-foreground expanded:bg-hover"
|
|
595
599
|
},
|
|
596
600
|
size: {
|
|
@@ -639,7 +643,7 @@ var import_system30 = require("@marigold/system");
|
|
|
639
643
|
var MultiSelect = {
|
|
640
644
|
field: (0, import_system30.cva)("space-y-2"),
|
|
641
645
|
container: (0, import_system30.cva)([
|
|
642
|
-
"bg-background shadow-
|
|
646
|
+
"bg-background shadow-xs border",
|
|
643
647
|
"px-3 text-sm text-foreground transition-shadow",
|
|
644
648
|
"border border-input rounded-lg outline-hidden",
|
|
645
649
|
"aria-disabled:bg-disabled aria-disabled:text-disabled-foreground aria-disabled:hover:border-input aria-disabled:border-input aria-disabled:cursor-not-allowed",
|
|
@@ -689,7 +693,7 @@ var NumberField = {
|
|
|
689
693
|
"has-focus-visible:util-focus-ring outline-none",
|
|
690
694
|
inputInvalid,
|
|
691
695
|
inputReadOnly,
|
|
692
|
-
"border border-input text-sm shadow-
|
|
696
|
+
"border border-input text-sm shadow-xs transition-shadow",
|
|
693
697
|
"data-invalid:data-[focus-within]:border-destructive data-invalid:data-[focus-within]:ring-destructive/20"
|
|
694
698
|
]),
|
|
695
699
|
stepper: (0, import_system31.cva)([
|
|
@@ -727,7 +731,7 @@ var Radio = {
|
|
|
727
731
|
]),
|
|
728
732
|
radio: (0, import_system33.cva)([
|
|
729
733
|
"aspect-square size-4 rounded-full",
|
|
730
|
-
"border border-input shadow-
|
|
734
|
+
"border border-input shadow-xs",
|
|
731
735
|
"group-focus-visible/radio:util-focus-ring outline-none",
|
|
732
736
|
"group-disabled/radio:group-selected/radio:bg-disabled group-disabled/radio:border-disabled! group-disabled/radio:cursor-not-allowed",
|
|
733
737
|
"group-selected/radio:border-brand group-selected/radio:bg-brand group-selected/radio:text-brand-foreground"
|
|
@@ -737,26 +741,21 @@ var Radio = {
|
|
|
737
741
|
|
|
738
742
|
// src/components/Pagination.styles.ts
|
|
739
743
|
var import_system34 = require("@marigold/system");
|
|
744
|
+
var button = "inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colorsfocus-visible:util-focus-ring outline-nonedisabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground[&_svg]:pointer-events-none [&_svg]:shrink-0hover:bg-hover hover:text-hover-foregroundcursor-pointer";
|
|
740
745
|
var Pagination = {
|
|
746
|
+
container: (0, import_system34.cva)("flex items-center justify-center space-x-2"),
|
|
741
747
|
navigationButton: (0, import_system34.cva)([
|
|
742
|
-
|
|
743
|
-
"focus-visible:util-focus-ring outline-none",
|
|
748
|
+
button,
|
|
744
749
|
"disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground",
|
|
745
|
-
"
|
|
746
|
-
"hover:bg-hover hover:text-hover-foreground",
|
|
747
|
-
"h-9 py-2 gap-1 px-2.5",
|
|
748
|
-
"cursor-pointer"
|
|
750
|
+
"h-9 py-2 gap-1 px-2.5"
|
|
749
751
|
]),
|
|
750
752
|
pageButton: (0, import_system34.cva)([
|
|
751
|
-
|
|
752
|
-
"
|
|
753
|
-
"
|
|
754
|
-
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
755
|
-
"data-[selected=true]:border data-[selected=true]:border-input data-[selected=true]:shadow-xs",
|
|
756
|
-
"hover:bg-hover hover:text-hover-foreground",
|
|
757
|
-
"cursor-pointer"
|
|
753
|
+
button,
|
|
754
|
+
"bg-background size-9",
|
|
755
|
+
"data-[selected=true]:border data-[selected=true]:border-input data-[selected=true]:shadow-xs"
|
|
758
756
|
]),
|
|
759
|
-
icon: (0, import_system34.cva)("h-4 w-4")
|
|
757
|
+
icon: (0, import_system34.cva)("h-4 w-4"),
|
|
758
|
+
ellipsis: (0, import_system34.cva)("text-text-base flex h-8 w-8 items-center justify-center")
|
|
760
759
|
};
|
|
761
760
|
|
|
762
761
|
// src/components/ProgressCycle.styles.ts
|
|
@@ -871,7 +870,7 @@ var Switch = {
|
|
|
871
870
|
]),
|
|
872
871
|
thumb: (0, import_system39.cva)([
|
|
873
872
|
"pointer-events-none block size-5 rounded-full",
|
|
874
|
-
"bg-background shadow-
|
|
873
|
+
"bg-background shadow-xs",
|
|
875
874
|
"ring-0 transition-transform duration-150 ease-out-quint",
|
|
876
875
|
"group-selected/switch:translate-x-4 translate-x-0"
|
|
877
876
|
])
|
|
@@ -1017,7 +1016,8 @@ var Tag = {
|
|
|
1017
1016
|
"size-4",
|
|
1018
1017
|
"disabled:bg-disabled disabled:text-disabled-foreground disabled:cursor-not-allowed"
|
|
1019
1018
|
]),
|
|
1020
|
-
listItems: (0, import_system42.cva)("flex flex-wrap items-center gap-1")
|
|
1019
|
+
listItems: (0, import_system42.cva)("flex flex-wrap items-center gap-1 mb-0")
|
|
1020
|
+
// mb-0 prevents whitespace when the hidden field is rendered
|
|
1021
1021
|
};
|
|
1022
1022
|
|
|
1023
1023
|
// src/components/TextArea.styles.ts
|
|
@@ -1063,10 +1063,70 @@ var Text = (0, import_system44.cva)("", {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
});
|
|
1065
1065
|
|
|
1066
|
-
// src/components/
|
|
1066
|
+
// src/components/Toast.styles.ts
|
|
1067
1067
|
var import_system45 = require("@marigold/system");
|
|
1068
|
+
var Toast = {
|
|
1069
|
+
toast: (0, import_system45.cva)([
|
|
1070
|
+
"z-50",
|
|
1071
|
+
"max-w-sm w-full pointer-events-auto overflow-hidden rounded-md border shadow-lg bg-background text-foreground border-border",
|
|
1072
|
+
"grid grid-cols-[auto_1fr_auto] grid-rows-[auto_auto] gap-x-1 gap-y-0",
|
|
1073
|
+
'[grid-template-areas:"icon_title_close""icon_description_description"] focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
|
1074
|
+
"p-4"
|
|
1075
|
+
]),
|
|
1076
|
+
title: (0, import_system45.cva)([
|
|
1077
|
+
"text-sm font-medium",
|
|
1078
|
+
"[grid-area:title]",
|
|
1079
|
+
"flex items-center mb-0"
|
|
1080
|
+
]),
|
|
1081
|
+
description: (0, import_system45.cva)([
|
|
1082
|
+
"text-muted-foreground text-sm",
|
|
1083
|
+
"[grid-area:description] mt-0"
|
|
1084
|
+
]),
|
|
1085
|
+
closeButton: (0, import_system45.cva)([
|
|
1086
|
+
"[grid-area:close] row-end-1",
|
|
1087
|
+
"ml-2",
|
|
1088
|
+
"flex items-center justify-center",
|
|
1089
|
+
"size-5 rounded transition-[color,box-shadow] outline-none",
|
|
1090
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] text-muted-foreground hover:text-hover-foreground"
|
|
1091
|
+
]),
|
|
1092
|
+
icon: (0, import_system45.cva)(
|
|
1093
|
+
[
|
|
1094
|
+
"[grid-area:icon]",
|
|
1095
|
+
"flex items-center justify-center",
|
|
1096
|
+
"h-5 w-5 leading-none"
|
|
1097
|
+
],
|
|
1098
|
+
{
|
|
1099
|
+
variants: {
|
|
1100
|
+
variant: {
|
|
1101
|
+
default: "",
|
|
1102
|
+
success: "text-success-muted-accent",
|
|
1103
|
+
warning: "text-warning-muted-accent",
|
|
1104
|
+
info: "text-info-muted-accent",
|
|
1105
|
+
error: "text-destructive-muted-accent"
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
defaultVariants: {
|
|
1109
|
+
variant: "default"
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
),
|
|
1113
|
+
content: (0, import_system45.cva)(["contents"]),
|
|
1114
|
+
"bottom-left": (0, import_system45.cva)(["fixed bottom-4 left-4 flex flex-col-reverse"]),
|
|
1115
|
+
"bottom-right": (0, import_system45.cva)(["fixed bottom-4 right-4 flex flex-col-reverse"]),
|
|
1116
|
+
"top-left": (0, import_system45.cva)(["fixed top-4 left-4 flex flex-col"]),
|
|
1117
|
+
"top-right": (0, import_system45.cva)(["fixed top-4 right-4 flex flex-col"]),
|
|
1118
|
+
top: (0, import_system45.cva)([
|
|
1119
|
+
"fixed top-4 left-1/2 right-auto -translate-x-1/2 flex flex-col items-center w-auto align-middle"
|
|
1120
|
+
]),
|
|
1121
|
+
bottom: (0, import_system45.cva)([
|
|
1122
|
+
"fixed bottom-4 left-1/2 right-auto -translate-x-1/2 flex flex-col-reverse items-center w-auto align-middle"
|
|
1123
|
+
])
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
// src/components/Tooltip.styles.ts
|
|
1127
|
+
var import_system46 = require("@marigold/system");
|
|
1068
1128
|
var Tooltip = {
|
|
1069
|
-
container: (0,
|
|
1129
|
+
container: (0, import_system46.cva)(
|
|
1070
1130
|
[
|
|
1071
1131
|
"relative z-50 max-w-70 rounded-md border px-3 py-1.5 text-sm",
|
|
1072
1132
|
"placement-top:mb-2",
|
|
@@ -1086,7 +1146,7 @@ var Tooltip = {
|
|
|
1086
1146
|
}
|
|
1087
1147
|
}
|
|
1088
1148
|
),
|
|
1089
|
-
arrow: (0,
|
|
1149
|
+
arrow: (0, import_system46.cva)(
|
|
1090
1150
|
[
|
|
1091
1151
|
// right
|
|
1092
1152
|
"data-[placement=right]:[&_svg]:rotate-90",
|
|
@@ -1110,13 +1170,13 @@ var Tooltip = {
|
|
|
1110
1170
|
};
|
|
1111
1171
|
|
|
1112
1172
|
// src/components/Underlay.styles.ts
|
|
1113
|
-
var
|
|
1114
|
-
var Underlay = (0,
|
|
1173
|
+
var import_system47 = require("@marigold/system");
|
|
1174
|
+
var Underlay = (0, import_system47.cva)("bg-black/80 px-4");
|
|
1115
1175
|
|
|
1116
1176
|
// src/components/XLoader.styles.ts
|
|
1117
|
-
var
|
|
1177
|
+
var import_system48 = require("@marigold/system");
|
|
1118
1178
|
var XLoader = {
|
|
1119
|
-
container: (0,
|
|
1179
|
+
container: (0, import_system48.cva)("grid place-items-center text-brand", {
|
|
1120
1180
|
variants: {
|
|
1121
1181
|
variant: {
|
|
1122
1182
|
default: "",
|
|
@@ -1133,7 +1193,7 @@ var XLoader = {
|
|
|
1133
1193
|
size: "default"
|
|
1134
1194
|
}
|
|
1135
1195
|
}),
|
|
1136
|
-
loader: (0,
|
|
1196
|
+
loader: (0, import_system48.cva)("size-full", {
|
|
1137
1197
|
variants: {
|
|
1138
1198
|
variant: {
|
|
1139
1199
|
default: "",
|
|
@@ -1150,7 +1210,31 @@ var XLoader = {
|
|
|
1150
1210
|
size: "default"
|
|
1151
1211
|
}
|
|
1152
1212
|
}),
|
|
1153
|
-
label: (0,
|
|
1213
|
+
label: (0, import_system48.cva)("text-current text-sm")
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
// src/components/Breadcrumbs.styles.ts
|
|
1217
|
+
var import_system49 = require("@marigold/system");
|
|
1218
|
+
var Breadcrumbs = {
|
|
1219
|
+
container: (0, import_system49.cva)(["flex flex-wrap items-center"], {
|
|
1220
|
+
variants: {
|
|
1221
|
+
variant: {
|
|
1222
|
+
default: "text-foreground"
|
|
1223
|
+
},
|
|
1224
|
+
size: {
|
|
1225
|
+
small: "text-xs gap-1.5",
|
|
1226
|
+
default: "text-sm gap-1.5",
|
|
1227
|
+
large: "text-base gap-1.5"
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
defaultVariants: {
|
|
1231
|
+
variant: "default",
|
|
1232
|
+
size: "default"
|
|
1233
|
+
}
|
|
1234
|
+
}),
|
|
1235
|
+
item: (0, import_system49.cva)("inline-flex items-center gap-1.5 whitespace-nowrap "),
|
|
1236
|
+
link: (0, import_system49.cva)("hover:underline cursor-pointer"),
|
|
1237
|
+
current: (0, import_system49.cva)("font-medium")
|
|
1154
1238
|
};
|
|
1155
1239
|
|
|
1156
1240
|
// src/theme.ts
|