@marigold/theme-rui 3.0.3 → 4.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/index.mjs CHANGED
@@ -29,7 +29,7 @@ const Accordion = {
29
29
  defaultVariants: { variant: "default" }
30
30
  }),
31
31
  header: cva([
32
- "flex w-full items-center justify-between gap-4 rounded-md py-2 cursor-pointer text-foreground",
32
+ "flex w-full items-center justify-between gap-4 py-2 rounded-md cursor-pointer text-foreground",
33
33
  "text-left text-base font-semibold leading-6 transition-all",
34
34
  "hover:no-underline",
35
35
  "disabled:cursor-not-allowed disabled:text-disabled-foreground"
@@ -40,8 +40,9 @@ const Accordion = {
40
40
  } },
41
41
  defaultVariants: { variant: "default" }
42
42
  }),
43
- content: cva("in-data-[expanded]:pb-2"),
44
- icon: cva("pointer-events-none shrink-0 opacity-60 transition-transform duration-200")
43
+ panel: cva("overflow-clip h-(--disclosure-panel-height) transition-[height,padding] duration-250"),
44
+ content: cva("pb-2"),
45
+ icon: cva("pointer-events-none shrink-0 opacity-60 transition-transform duration-250")
45
46
  };
46
47
 
47
48
  //#endregion
@@ -76,6 +77,7 @@ const Button = cva([
76
77
  primary: "bg-brand text-brand-foreground shadow-xs hover:bg-brand/90",
77
78
  secondary: "border border-input bg-background shadow-xs hover:bg-hover hover:text-foreground expanded:bg-hover",
78
79
  destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",
80
+ "destructive-ghost": "text-destructive hover:bg-destructive/10",
79
81
  ghost: "hover:bg-hover hover:text-foreground",
80
82
  link: "text-link util-touch-hitbox"
81
83
  },
@@ -96,7 +98,8 @@ const Button = cva([
96
98
  "primary",
97
99
  "secondary",
98
100
  "destructive",
99
- "ghost"
101
+ "ghost",
102
+ "destructive-ghost"
100
103
  ],
101
104
  class: "items-center justify-center"
102
105
  },
@@ -105,7 +108,8 @@ const Button = cva([
105
108
  "primary",
106
109
  "secondary",
107
110
  "destructive",
108
- "ghost"
111
+ "ghost",
112
+ "destructive-ghost"
109
113
  ],
110
114
  size: "default",
111
115
  class: "h-button px-4 py-2 [&_svg]:size-4"
@@ -115,7 +119,8 @@ const Button = cva([
115
119
  "primary",
116
120
  "secondary",
117
121
  "destructive",
118
- "ghost"
122
+ "ghost",
123
+ "destructive-ghost"
119
124
  ],
120
125
  size: "small",
121
126
  class: "h-button-small px-3 [&_svg]:size-3.5"
@@ -125,7 +130,8 @@ const Button = cva([
125
130
  "primary",
126
131
  "secondary",
127
132
  "destructive",
128
- "ghost"
133
+ "ghost",
134
+ "destructive-ghost"
129
135
  ],
130
136
  size: "large",
131
137
  class: "h-button-large px-8 [&_svg]:size-5"
@@ -135,7 +141,8 @@ const Button = cva([
135
141
  "primary",
136
142
  "secondary",
137
143
  "destructive",
138
- "ghost"
144
+ "ghost",
145
+ "destructive-ghost"
139
146
  ],
140
147
  size: "icon",
141
148
  class: "size-button [&_svg]:size-4"
@@ -177,7 +184,7 @@ const Checkbox = {
177
184
  container: cva("cursor-pointer read-only:cursor-default gap-2"),
178
185
  label: cva([
179
186
  "flex items-center gap-1",
180
- "text-sm leading-4 group-[group=\"checkbox\"]/checkboxgroup:font-normal font-medium text-foregroun",
187
+ "text-sm leading-4 group-[&]/checkboxgroup:font-normal font-medium text-foregroun",
181
188
  "group-disabled/checkbox:text-disabled-foreground"
182
189
  ]),
183
190
  group: cva()
@@ -227,8 +234,8 @@ const CloseButton = cva([
227
234
  "flex items-center justify-center whitespace-nowrap",
228
235
  "cursor-pointer",
229
236
  "transition-[color,box-shadow]",
230
- "mixin-ring-focus-visible",
231
- "rounded",
237
+ "focus-visible:util-focus-ring outline-none",
238
+ "rounded-full",
232
239
  "duration-150 active:scale-[0.98] pressed:scale-[0.98] transition-transform",
233
240
  "[&_svg]:size-4 [&_svg]:opacity-60 [&_svg]:transition-opacity hover:[&_svg]:opacity-100"
234
241
  ]);
@@ -434,21 +441,21 @@ const HelpText = {
434
441
  container: cva([
435
442
  "text-xs text-muted-foreground group-disabled/field:text-disabled-foreground",
436
443
  "group-invalid/field:text-destructive",
437
- "has-[+_[aria-hidden=\"true\"]]:mb-0"
444
+ "has-[+_[aria-hidden=true]]:mb-0"
438
445
  ]),
439
446
  icon: cva("")
440
447
  };
441
448
 
442
449
  //#endregion
443
450
  //#region src/components/Label.styles.ts
444
- const Label = {
445
- container: cva([
446
- "flex items-center gap-1",
447
- "text-sm font-medium leading-none text-foreground",
448
- "group-disabled/field:cursor-not-allowed group-disabled/field:text-disabled-foreground"
449
- ]),
450
- indicator: cva("group-required/field:block text-destructive -ml-1")
451
- };
451
+ const Label = cva([
452
+ "flex items-center gap-1",
453
+ "text-sm font-medium leading-none text-foreground",
454
+ "group-disabled/field:cursor-not-allowed group-disabled/field:text-disabled-foreground",
455
+ "group-required/field:after:content-[\"*\"]",
456
+ "group-required/field:after:-ml-1",
457
+ "group-required/field:after:text-destructive"
458
+ ]);
452
459
 
453
460
  //#endregion
454
461
  //#region src/components/Link.styles.ts
@@ -495,13 +502,14 @@ const ListBox = {
495
502
  container: cva(["overflow-hidden rounded-md border border-input group-[[data-trigger]]/popover:border-0"]),
496
503
  list: cva(["bg-background p-1 text-sm outline-0 space-y-px"]),
497
504
  item: cva([
498
- "relative flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-foreground",
505
+ "relative grid grid-cols-[auto_1fr] items-center gap-x-2 rounded-md px-2 py-1.5 text-sm text-foreground",
499
506
  "[&_.selection-indicator>svg]:invisible [&_.selection-indicator>svg]:block",
500
507
  "selected:bg-selected selected:[&_.selection-indicator>svg]:visible",
501
508
  "hover:bg-hover hover:text-hover-foreground",
502
509
  "disabled:cursor-not-allowed disabled:text-disabled-foreground",
503
510
  "focus-visible:util-focus-ring outline-none focus-visible:z-1",
504
- "cursor-default data-selection-mode:cursor-pointer"
511
+ "cursor-default data-selection-mode:cursor-pointer",
512
+ "[&_[slot=description]]:col-start-2 [&_[slot=description]]:row-start-2 [&_[slot=description]]:text-xs [&_[slot=description]]:text-muted-foreground"
505
513
  ]),
506
514
  section: cva(""),
507
515
  header: cva("[&_header]:px-2 [&_header]:py-1.5 [&_header]:text-xs [&_header]:font-medium [&_header]:text-muted-foreground")
@@ -648,7 +656,7 @@ const Popover = cva([
648
656
  //#region src/components/Radio.styles.ts
649
657
  const Radio = {
650
658
  container: cva("group-disabled/radio:cursor-not-allowed"),
651
- label: cva(["text-sm font-normal cursor-pointer", "group-disabled/radio:text-disabled-foreground group-disabled/radio:cursor-not-allowed"]),
659
+ label: cva(["text-sm font-normal cursor-pointer w-full", "group-disabled/radio:text-disabled-foreground group-disabled/radio:cursor-not-allowed"]),
652
660
  radio: cva([
653
661
  "aspect-square size-4 rounded-full",
654
662
  "border border-input shadow-xs",
@@ -674,7 +682,8 @@ const Pagination = {
674
682
  navigationButton: cva([
675
683
  ...button,
676
684
  "disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground",
677
- "h-9 py-2 gap-1 px-2.5"
685
+ "h-9 py-2 gap-1 px-2.5",
686
+ "has-[+_[hidden]]:mr-0"
678
687
  ]),
679
688
  pageButton: cva([
680
689
  ...button,
@@ -686,8 +695,44 @@ const Pagination = {
686
695
  };
687
696
 
688
697
  //#endregion
689
- //#region src/components/ProgressCycle.styles.ts
690
- const ProgressCycle = cva(["stroke-foreground"]);
698
+ //#region src/components/ProgressCircle.styles.ts
699
+ const ProgressCircle = {
700
+ container: cva("stroke-foreground", {
701
+ variants: {
702
+ variant: {
703
+ default: "",
704
+ inverted: "stroke-secondary"
705
+ },
706
+ size: {
707
+ default: "",
708
+ large: "",
709
+ fit: ""
710
+ }
711
+ },
712
+ defaultVariants: {
713
+ variant: "default",
714
+ size: "default"
715
+ }
716
+ }),
717
+ loader: cva("", {
718
+ variants: {
719
+ variant: {
720
+ default: "",
721
+ inverted: ""
722
+ },
723
+ size: {
724
+ default: "size-20",
725
+ large: "size-36",
726
+ fit: "size-fit"
727
+ }
728
+ },
729
+ defaultVariants: {
730
+ variant: "default",
731
+ size: "default"
732
+ }
733
+ }),
734
+ label: cva("text-current text-sm")
735
+ };
691
736
 
692
737
  //#endregion
693
738
  //#region src/components/SectionMessage.styles.ts
@@ -739,7 +784,7 @@ const Select = {
739
784
  "h-input",
740
785
  "cursor-pointer",
741
786
  "*:data-placeholder:text-placeholder",
742
- "has-[+_[aria-hidden=\"true\"]]:mb-0"
787
+ "has-[+_[aria-hidden=true]]:mb-0"
743
788
  ])
744
789
  };
745
790
 
@@ -863,14 +908,14 @@ const Tag = {
863
908
  "font-medium text-xs",
864
909
  "h-7 px-2 cursor-default",
865
910
  "bg-background",
866
- "data-selected:text-white data-selected:bg-brand",
867
- "data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled-foreground data-[disabled]:bg-disabled",
911
+ "selected:text-white selected:bg-brand",
912
+ "data-disabled:cursor-not-allowed data-disabled:text-disabled-foreground data-disabled:bg-disabled",
868
913
  "focus-visible:util-focus-ring outline-none"
869
914
  ]),
870
915
  closeButton: cva(["size-4", "disabled:bg-disabled disabled:text-disabled-foreground disabled:cursor-not-allowed"]),
871
916
  listItems: cva(["flex flex-wrap gap-1", "mb-0"]),
872
917
  removeAll: cva([
873
- "inline whitespace-nowrap font-medium transition-[color,box-shadow,transform]",
918
+ "inline whitespace-nowrap font-medium transition-[color,box-shadow,transform] rounded-md",
874
919
  "duration-150 active:scale-[0.98] pressed:scale-[0.98]",
875
920
  "focus-visible:util-focus-ring outline-none",
876
921
  "cursor-pointer",
@@ -1001,8 +1046,8 @@ const Tooltip = {
1001
1046
  const Underlay = cva("bg-black/80 px-4");
1002
1047
 
1003
1048
  //#endregion
1004
- //#region src/components/XLoader.styles.ts
1005
- const XLoader = {
1049
+ //#region src/components/Loader.styles.ts
1050
+ const Loader = {
1006
1051
  container: cva("grid place-items-center text-brand", {
1007
1052
  variants: {
1008
1053
  variant: {
@@ -1043,13 +1088,13 @@ const XLoader = {
1043
1088
  //#endregion
1044
1089
  //#region src/components/Breadcrumbs.styles.ts
1045
1090
  const Breadcrumbs = {
1046
- container: cva(["flex flex-wrap items-center"], {
1091
+ container: cva(["flex flex-wrap items-center gap-1.5 wrap-break-word text-sm sm:gap-2.5 text-muted-foreground"], {
1047
1092
  variants: {
1048
- variant: { default: "text-foreground" },
1093
+ variant: { default: "" },
1049
1094
  size: {
1050
- small: "text-xs gap-1.5",
1051
- default: "text-sm gap-1.5",
1052
- large: "text-base gap-1.5"
1095
+ small: "text-xs",
1096
+ default: "text-sm",
1097
+ large: "text-base"
1053
1098
  }
1054
1099
  },
1055
1100
  defaultVariants: {
@@ -1057,9 +1102,21 @@ const Breadcrumbs = {
1057
1102
  size: "default"
1058
1103
  }
1059
1104
  }),
1060
- item: cva("inline-flex items-center gap-1.5 whitespace-nowrap "),
1061
- link: cva("hover:underline cursor-pointer"),
1062
- current: cva("font-medium")
1105
+ item: cva("inline-flex items-center gap-1.5 sm:gap-2.5"),
1106
+ link: cva("transition-colors hover:text-foreground cursor-pointer"),
1107
+ current: cva("font-normal text-foreground")
1108
+ };
1109
+
1110
+ //#endregion
1111
+ //#region src/components/FileField.styles.ts
1112
+ const FileField = {
1113
+ container: cva("space-y-2 "),
1114
+ dropZone: cva("data-[drop-target=true]:bg-muted border-input has-[input:focus]:border-ring has-[input:focus]:ring-ring/50 relative flex min-h-52 flex-col items-center overflow-hidden rounded-xl border border-dashed p-4 transition-colors not-data-[files]:justify-center has-[input:focus]:ring-[3px]"),
1115
+ dropZoneContent: cva("flex flex-col items-center justify-center gap-2 px-4 py-3 text-center"),
1116
+ dropZoneLabel: cva("text-sm font-medium"),
1117
+ item: cva("flex min-w-0 flex-col gap-0.5"),
1118
+ itemLabel: cva("truncate text-[13px] font-medium"),
1119
+ itemDescription: cva("text-muted-foreground text-xs")
1063
1120
  };
1064
1121
 
1065
1122
  //#endregion
@@ -1082,6 +1139,7 @@ var components_exports = /* @__PURE__ */ __export({
1082
1139
  Divider: () => Divider,
1083
1140
  Drawer: () => Drawer,
1084
1141
  Field: () => Field,
1142
+ FileField: () => FileField,
1085
1143
  Headline: () => Headline,
1086
1144
  HelpText: () => HelpText,
1087
1145
  IconButton: () => IconButton,
@@ -1090,13 +1148,14 @@ var components_exports = /* @__PURE__ */ __export({
1090
1148
  Link: () => Link,
1091
1149
  List: () => List,
1092
1150
  ListBox: () => ListBox,
1151
+ Loader: () => Loader,
1093
1152
  Menu: () => Menu,
1094
1153
  Modal: () => Modal,
1095
1154
  MultiSelect: () => MultiSelect,
1096
1155
  NumberField: () => NumberField,
1097
1156
  Pagination: () => Pagination,
1098
1157
  Popover: () => Popover,
1099
- ProgressCycle: () => ProgressCycle,
1158
+ ProgressCircle: () => ProgressCircle,
1100
1159
  Radio: () => Radio,
1101
1160
  SectionMessage: () => SectionMessage,
1102
1161
  Select: () => Select,
@@ -1109,8 +1168,7 @@ var components_exports = /* @__PURE__ */ __export({
1109
1168
  TextArea: () => TextArea,
1110
1169
  Toast: () => Toast,
1111
1170
  Tooltip: () => Tooltip,
1112
- Underlay: () => Underlay,
1113
- XLoader: () => XLoader
1171
+ Underlay: () => Underlay
1114
1172
  });
1115
1173
 
1116
1174
  //#endregion