@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.mjs
CHANGED
|
@@ -10,6 +10,7 @@ __export(components_exports, {
|
|
|
10
10
|
Accordion: () => Accordion,
|
|
11
11
|
Badge: () => Badge,
|
|
12
12
|
Body: () => Body,
|
|
13
|
+
Breadcrumbs: () => Breadcrumbs,
|
|
13
14
|
Button: () => Button,
|
|
14
15
|
Calendar: () => Calendar,
|
|
15
16
|
Card: () => Card,
|
|
@@ -51,6 +52,7 @@ __export(components_exports, {
|
|
|
51
52
|
Tag: () => Tag,
|
|
52
53
|
Text: () => Text,
|
|
53
54
|
TextArea: () => TextArea,
|
|
55
|
+
Toast: () => Toast,
|
|
54
56
|
Tooltip: () => Tooltip,
|
|
55
57
|
Underlay: () => Underlay,
|
|
56
58
|
XLoader: () => XLoader
|
|
@@ -145,7 +147,7 @@ import { cva as cva4 } from "@marigold/system";
|
|
|
145
147
|
var Button = cva4(
|
|
146
148
|
[
|
|
147
149
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow]",
|
|
148
|
-
"[&_svg]:shrink-0",
|
|
150
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
149
151
|
"focus-visible:util-focus-ring outline-none disabled:util-disabled",
|
|
150
152
|
"pending:text-disabled-foreground pending:bg-disabled pending:cursor-not-allowed pending:border-none",
|
|
151
153
|
"cursor-pointer"
|
|
@@ -153,13 +155,10 @@ var Button = cva4(
|
|
|
153
155
|
{
|
|
154
156
|
variants: {
|
|
155
157
|
variant: {
|
|
156
|
-
primary: "bg-brand text-brand-foreground shadow-
|
|
157
|
-
secondary: "border border-input bg-background shadow-
|
|
158
|
+
primary: "bg-brand text-brand-foreground shadow-xs hover:bg-brand/90",
|
|
159
|
+
secondary: "border border-input bg-background shadow-xs hover:bg-hover hover:text-foreground expanded:bg-hover",
|
|
158
160
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
159
|
-
ghost: "hover:bg-hover hover:text-foreground"
|
|
160
|
-
// only used for calendar in MonthListBox and YearListBox to have a hover over other options
|
|
161
|
-
// TODO: Remove this in future and rethink the MonthListBox and YearListBox or use another variant
|
|
162
|
-
text: "hover:bg-hover"
|
|
161
|
+
ghost: "hover:bg-hover hover:text-foreground"
|
|
163
162
|
},
|
|
164
163
|
size: {
|
|
165
164
|
default: "h-button px-4 py-2 [&_svg]:size-4",
|
|
@@ -197,7 +196,7 @@ import { cva as cva6 } from "@marigold/system";
|
|
|
197
196
|
var Checkbox = {
|
|
198
197
|
checkbox: cva6([
|
|
199
198
|
"grid size-4 shrink-0 place-content-center rounded",
|
|
200
|
-
"border border-input shadow-
|
|
199
|
+
"border border-input shadow-xs",
|
|
201
200
|
"group-focus-visible/checkbox:util-focus-ring outline-none",
|
|
202
201
|
"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",
|
|
203
202
|
"group-selected/checkbox:border-brand group-selected/checkbox:bg-brand group-selected/checkbox:text-brand-foreground",
|
|
@@ -242,11 +241,11 @@ var Calendar = {
|
|
|
242
241
|
"focus-visible:util-focus-ring outline-none",
|
|
243
242
|
"cursor-pointer",
|
|
244
243
|
"hover:bg-hover",
|
|
245
|
-
"aria-[current=true]:bg-brand aria-[current=true]:text-brand-foreground aria-[current=true]:shadow-
|
|
244
|
+
"aria-[current=true]:bg-brand aria-[current=true]:text-brand-foreground aria-[current=true]:shadow-xs aria-[current=true]:hover:bg-brand/90"
|
|
246
245
|
]),
|
|
247
246
|
select: cva7([
|
|
248
247
|
"[&svg]:text-muted-foreground/80",
|
|
249
|
-
"flex w-full px-3 py-2 rounded-lg shadow-
|
|
248
|
+
"flex w-full px-3 py-2 rounded-lg shadow-xs border border-input bg-background text-sm text-foreground transition-shadow",
|
|
250
249
|
"focus-visible:util-focus-ring outline-none",
|
|
251
250
|
"h-input",
|
|
252
251
|
"disabled:cursor-not-allowed disabled:text-disabled-foreground disabled:bg-disabled",
|
|
@@ -311,7 +310,7 @@ import { cva as cva12 } from "@marigold/system";
|
|
|
311
310
|
|
|
312
311
|
// src/components/Input.styles.ts
|
|
313
312
|
import { cva as cva11 } from "@marigold/system";
|
|
314
|
-
var inputContainer = "flex w-full px-3 py-2 rounded-lg shadow-
|
|
313
|
+
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";
|
|
315
314
|
var inputDisabled = "disabled:cursor-not-allowed disabled:text-disabled-foreground disabled:bg-disabled";
|
|
316
315
|
var inputInvalid = "group-invalid/field:border-destructive group-invalid/field:focus:border-destructive group-invalid/field:focus:ring-destructive/20";
|
|
317
316
|
var inputReadOnly = "group-read-only/field:bg-muted";
|
|
@@ -552,9 +551,14 @@ var ListBox = {
|
|
|
552
551
|
// src/components/Menu.styles.ts
|
|
553
552
|
import { cva as cva28 } from "@marigold/system";
|
|
554
553
|
var Menu = {
|
|
555
|
-
container: cva28([
|
|
554
|
+
container: cva28([
|
|
555
|
+
"text-foreground z-50 overflow-hidden rounded-md p-1 outline-none"
|
|
556
|
+
]),
|
|
556
557
|
item: cva28([
|
|
557
|
-
"
|
|
558
|
+
"relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-hidden select-none",
|
|
559
|
+
"focus:bg-focus",
|
|
560
|
+
"disabled:text-disabled-foreground",
|
|
561
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4 [&_svg]:opacity-60"
|
|
558
562
|
]),
|
|
559
563
|
section: cva28(
|
|
560
564
|
"text-muted-foreground px-2 py-1.5 text-xs font-medium border-t border-t-border in-first:border-t-0"
|
|
@@ -562,14 +566,14 @@ var Menu = {
|
|
|
562
566
|
button: cva28(
|
|
563
567
|
[
|
|
564
568
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow]",
|
|
565
|
-
"[&_svg]:shrink-0",
|
|
569
|
+
"[&_svg]:shrink-0 [&_svg]:pointer-events-none",
|
|
566
570
|
"focus-visible:util-focus-ring outline-none disabled:util-disabled",
|
|
567
571
|
"cursor-pointer"
|
|
568
572
|
],
|
|
569
573
|
{
|
|
570
574
|
variants: {
|
|
571
575
|
variant: {
|
|
572
|
-
secondary: "border border-input bg-background shadow-
|
|
576
|
+
secondary: "border border-input bg-background shadow-xs hover:bg-hover hover:text-foreground expanded:bg-hover",
|
|
573
577
|
ghost: "hover:bg-hover hover:text-foreground expanded:bg-hover"
|
|
574
578
|
},
|
|
575
579
|
size: {
|
|
@@ -618,7 +622,7 @@ import { cva as cva30 } from "@marigold/system";
|
|
|
618
622
|
var MultiSelect = {
|
|
619
623
|
field: cva30("space-y-2"),
|
|
620
624
|
container: cva30([
|
|
621
|
-
"bg-background shadow-
|
|
625
|
+
"bg-background shadow-xs border",
|
|
622
626
|
"px-3 text-sm text-foreground transition-shadow",
|
|
623
627
|
"border border-input rounded-lg outline-hidden",
|
|
624
628
|
"aria-disabled:bg-disabled aria-disabled:text-disabled-foreground aria-disabled:hover:border-input aria-disabled:border-input aria-disabled:cursor-not-allowed",
|
|
@@ -668,7 +672,7 @@ var NumberField = {
|
|
|
668
672
|
"has-focus-visible:util-focus-ring outline-none",
|
|
669
673
|
inputInvalid,
|
|
670
674
|
inputReadOnly,
|
|
671
|
-
"border border-input text-sm shadow-
|
|
675
|
+
"border border-input text-sm shadow-xs transition-shadow",
|
|
672
676
|
"data-invalid:data-[focus-within]:border-destructive data-invalid:data-[focus-within]:ring-destructive/20"
|
|
673
677
|
]),
|
|
674
678
|
stepper: cva31([
|
|
@@ -706,7 +710,7 @@ var Radio = {
|
|
|
706
710
|
]),
|
|
707
711
|
radio: cva33([
|
|
708
712
|
"aspect-square size-4 rounded-full",
|
|
709
|
-
"border border-input shadow-
|
|
713
|
+
"border border-input shadow-xs",
|
|
710
714
|
"group-focus-visible/radio:util-focus-ring outline-none",
|
|
711
715
|
"group-disabled/radio:group-selected/radio:bg-disabled group-disabled/radio:border-disabled! group-disabled/radio:cursor-not-allowed",
|
|
712
716
|
"group-selected/radio:border-brand group-selected/radio:bg-brand group-selected/radio:text-brand-foreground"
|
|
@@ -716,26 +720,21 @@ var Radio = {
|
|
|
716
720
|
|
|
717
721
|
// src/components/Pagination.styles.ts
|
|
718
722
|
import { cva as cva34 } from "@marigold/system";
|
|
723
|
+
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";
|
|
719
724
|
var Pagination = {
|
|
725
|
+
container: cva34("flex items-center justify-center space-x-2"),
|
|
720
726
|
navigationButton: cva34([
|
|
721
|
-
|
|
722
|
-
"focus-visible:util-focus-ring outline-none",
|
|
727
|
+
button,
|
|
723
728
|
"disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground",
|
|
724
|
-
"
|
|
725
|
-
"hover:bg-hover hover:text-hover-foreground",
|
|
726
|
-
"h-9 py-2 gap-1 px-2.5",
|
|
727
|
-
"cursor-pointer"
|
|
729
|
+
"h-9 py-2 gap-1 px-2.5"
|
|
728
730
|
]),
|
|
729
731
|
pageButton: cva34([
|
|
730
|
-
|
|
731
|
-
"
|
|
732
|
-
"
|
|
733
|
-
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
734
|
-
"data-[selected=true]:border data-[selected=true]:border-input data-[selected=true]:shadow-xs",
|
|
735
|
-
"hover:bg-hover hover:text-hover-foreground",
|
|
736
|
-
"cursor-pointer"
|
|
732
|
+
button,
|
|
733
|
+
"bg-background size-9",
|
|
734
|
+
"data-[selected=true]:border data-[selected=true]:border-input data-[selected=true]:shadow-xs"
|
|
737
735
|
]),
|
|
738
|
-
icon: cva34("h-4 w-4")
|
|
736
|
+
icon: cva34("h-4 w-4"),
|
|
737
|
+
ellipsis: cva34("text-text-base flex h-8 w-8 items-center justify-center")
|
|
739
738
|
};
|
|
740
739
|
|
|
741
740
|
// src/components/ProgressCycle.styles.ts
|
|
@@ -850,7 +849,7 @@ var Switch = {
|
|
|
850
849
|
]),
|
|
851
850
|
thumb: cva39([
|
|
852
851
|
"pointer-events-none block size-5 rounded-full",
|
|
853
|
-
"bg-background shadow-
|
|
852
|
+
"bg-background shadow-xs",
|
|
854
853
|
"ring-0 transition-transform duration-150 ease-out-quint",
|
|
855
854
|
"group-selected/switch:translate-x-4 translate-x-0"
|
|
856
855
|
])
|
|
@@ -996,7 +995,8 @@ var Tag = {
|
|
|
996
995
|
"size-4",
|
|
997
996
|
"disabled:bg-disabled disabled:text-disabled-foreground disabled:cursor-not-allowed"
|
|
998
997
|
]),
|
|
999
|
-
listItems: cva42("flex flex-wrap items-center gap-1")
|
|
998
|
+
listItems: cva42("flex flex-wrap items-center gap-1 mb-0")
|
|
999
|
+
// mb-0 prevents whitespace when the hidden field is rendered
|
|
1000
1000
|
};
|
|
1001
1001
|
|
|
1002
1002
|
// src/components/TextArea.styles.ts
|
|
@@ -1042,10 +1042,70 @@ var Text = cva44("", {
|
|
|
1042
1042
|
}
|
|
1043
1043
|
});
|
|
1044
1044
|
|
|
1045
|
-
// src/components/
|
|
1045
|
+
// src/components/Toast.styles.ts
|
|
1046
1046
|
import { cva as cva45 } from "@marigold/system";
|
|
1047
|
+
var Toast = {
|
|
1048
|
+
toast: cva45([
|
|
1049
|
+
"z-50",
|
|
1050
|
+
"max-w-sm w-full pointer-events-auto overflow-hidden rounded-md border shadow-lg bg-background text-foreground border-border",
|
|
1051
|
+
"grid grid-cols-[auto_1fr_auto] grid-rows-[auto_auto] gap-x-1 gap-y-0",
|
|
1052
|
+
'[grid-template-areas:"icon_title_close""icon_description_description"] focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
|
1053
|
+
"p-4"
|
|
1054
|
+
]),
|
|
1055
|
+
title: cva45([
|
|
1056
|
+
"text-sm font-medium",
|
|
1057
|
+
"[grid-area:title]",
|
|
1058
|
+
"flex items-center mb-0"
|
|
1059
|
+
]),
|
|
1060
|
+
description: cva45([
|
|
1061
|
+
"text-muted-foreground text-sm",
|
|
1062
|
+
"[grid-area:description] mt-0"
|
|
1063
|
+
]),
|
|
1064
|
+
closeButton: cva45([
|
|
1065
|
+
"[grid-area:close] row-end-1",
|
|
1066
|
+
"ml-2",
|
|
1067
|
+
"flex items-center justify-center",
|
|
1068
|
+
"size-5 rounded transition-[color,box-shadow] outline-none",
|
|
1069
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] text-muted-foreground hover:text-hover-foreground"
|
|
1070
|
+
]),
|
|
1071
|
+
icon: cva45(
|
|
1072
|
+
[
|
|
1073
|
+
"[grid-area:icon]",
|
|
1074
|
+
"flex items-center justify-center",
|
|
1075
|
+
"h-5 w-5 leading-none"
|
|
1076
|
+
],
|
|
1077
|
+
{
|
|
1078
|
+
variants: {
|
|
1079
|
+
variant: {
|
|
1080
|
+
default: "",
|
|
1081
|
+
success: "text-success-muted-accent",
|
|
1082
|
+
warning: "text-warning-muted-accent",
|
|
1083
|
+
info: "text-info-muted-accent",
|
|
1084
|
+
error: "text-destructive-muted-accent"
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
defaultVariants: {
|
|
1088
|
+
variant: "default"
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
),
|
|
1092
|
+
content: cva45(["contents"]),
|
|
1093
|
+
"bottom-left": cva45(["fixed bottom-4 left-4 flex flex-col-reverse"]),
|
|
1094
|
+
"bottom-right": cva45(["fixed bottom-4 right-4 flex flex-col-reverse"]),
|
|
1095
|
+
"top-left": cva45(["fixed top-4 left-4 flex flex-col"]),
|
|
1096
|
+
"top-right": cva45(["fixed top-4 right-4 flex flex-col"]),
|
|
1097
|
+
top: cva45([
|
|
1098
|
+
"fixed top-4 left-1/2 right-auto -translate-x-1/2 flex flex-col items-center w-auto align-middle"
|
|
1099
|
+
]),
|
|
1100
|
+
bottom: cva45([
|
|
1101
|
+
"fixed bottom-4 left-1/2 right-auto -translate-x-1/2 flex flex-col-reverse items-center w-auto align-middle"
|
|
1102
|
+
])
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
// src/components/Tooltip.styles.ts
|
|
1106
|
+
import { cva as cva46 } from "@marigold/system";
|
|
1047
1107
|
var Tooltip = {
|
|
1048
|
-
container:
|
|
1108
|
+
container: cva46(
|
|
1049
1109
|
[
|
|
1050
1110
|
"relative z-50 max-w-70 rounded-md border px-3 py-1.5 text-sm",
|
|
1051
1111
|
"placement-top:mb-2",
|
|
@@ -1065,7 +1125,7 @@ var Tooltip = {
|
|
|
1065
1125
|
}
|
|
1066
1126
|
}
|
|
1067
1127
|
),
|
|
1068
|
-
arrow:
|
|
1128
|
+
arrow: cva46(
|
|
1069
1129
|
[
|
|
1070
1130
|
// right
|
|
1071
1131
|
"data-[placement=right]:[&_svg]:rotate-90",
|
|
@@ -1089,13 +1149,13 @@ var Tooltip = {
|
|
|
1089
1149
|
};
|
|
1090
1150
|
|
|
1091
1151
|
// src/components/Underlay.styles.ts
|
|
1092
|
-
import { cva as
|
|
1093
|
-
var Underlay =
|
|
1152
|
+
import { cva as cva47 } from "@marigold/system";
|
|
1153
|
+
var Underlay = cva47("bg-black/80 px-4");
|
|
1094
1154
|
|
|
1095
1155
|
// src/components/XLoader.styles.ts
|
|
1096
|
-
import { cva as
|
|
1156
|
+
import { cva as cva48 } from "@marigold/system";
|
|
1097
1157
|
var XLoader = {
|
|
1098
|
-
container:
|
|
1158
|
+
container: cva48("grid place-items-center text-brand", {
|
|
1099
1159
|
variants: {
|
|
1100
1160
|
variant: {
|
|
1101
1161
|
default: "",
|
|
@@ -1112,7 +1172,7 @@ var XLoader = {
|
|
|
1112
1172
|
size: "default"
|
|
1113
1173
|
}
|
|
1114
1174
|
}),
|
|
1115
|
-
loader:
|
|
1175
|
+
loader: cva48("size-full", {
|
|
1116
1176
|
variants: {
|
|
1117
1177
|
variant: {
|
|
1118
1178
|
default: "",
|
|
@@ -1129,7 +1189,31 @@ var XLoader = {
|
|
|
1129
1189
|
size: "default"
|
|
1130
1190
|
}
|
|
1131
1191
|
}),
|
|
1132
|
-
label:
|
|
1192
|
+
label: cva48("text-current text-sm")
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1195
|
+
// src/components/Breadcrumbs.styles.ts
|
|
1196
|
+
import { cva as cva49 } from "@marigold/system";
|
|
1197
|
+
var Breadcrumbs = {
|
|
1198
|
+
container: cva49(["flex flex-wrap items-center"], {
|
|
1199
|
+
variants: {
|
|
1200
|
+
variant: {
|
|
1201
|
+
default: "text-foreground"
|
|
1202
|
+
},
|
|
1203
|
+
size: {
|
|
1204
|
+
small: "text-xs gap-1.5",
|
|
1205
|
+
default: "text-sm gap-1.5",
|
|
1206
|
+
large: "text-base gap-1.5"
|
|
1207
|
+
}
|
|
1208
|
+
},
|
|
1209
|
+
defaultVariants: {
|
|
1210
|
+
variant: "default",
|
|
1211
|
+
size: "default"
|
|
1212
|
+
}
|
|
1213
|
+
}),
|
|
1214
|
+
item: cva49("inline-flex items-center gap-1.5 whitespace-nowrap "),
|
|
1215
|
+
link: cva49("hover:underline cursor-pointer"),
|
|
1216
|
+
current: cva49("font-medium")
|
|
1133
1217
|
};
|
|
1134
1218
|
|
|
1135
1219
|
// src/theme.ts
|