@marigold/theme-rui 0.3.1 → 0.3.2

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 CHANGED
@@ -103,7 +103,7 @@ var Accordion = {
103
103
  }),
104
104
  header: (0, import_system.cva)(
105
105
  [
106
- "flex flex-1 w-full items-center justify-between gap-4 rounded-md py-2",
106
+ "flex flex-1 w-full items-center justify-between gap-4 rounded-md py-2 cursor-pointer",
107
107
  "text-left text-sm font-semibold leading-6 transition-all",
108
108
  "hover:no-underline",
109
109
  "disabled:cursor-not-allowed disabled:text-disabled-foreground"
@@ -130,7 +130,7 @@ var Accordion = {
130
130
 
131
131
  // src/components/Badge.styles.ts
132
132
  var import_system2 = require("@marigold/system");
133
- var circle = "before:size-1.5 before:rounded-full";
133
+ var circle = "before:size-1.5 before:rounded-full pr-2";
134
134
  var Badge = (0, import_system2.cva)(
135
135
  [
136
136
  "inline-flex items-center justify-center rounded-full border px-1.5 text-xs font-medium leading-normal transition-colors",
@@ -182,8 +182,8 @@ var Button = (0, import_system4.cva)(
182
182
  {
183
183
  variants: {
184
184
  variant: {
185
- default: "border border-input bg-background shadow-sm shadow-black/5 hover:bg-hover hover:text-foreground",
186
185
  primary: "bg-brand text-brand-foreground shadow-sm shadow-black/5 hover:bg-brand/90",
186
+ secondary: "border border-input bg-background shadow-sm shadow-black/5 hover:bg-hover hover:text-foreground",
187
187
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
188
188
  ghost: "hover:bg-hover hover:text-foreground",
189
189
  // only used for calendar in MonthListBox and YearListBox to have a hover over other options
@@ -198,7 +198,7 @@ var Button = (0, import_system4.cva)(
198
198
  }
199
199
  },
200
200
  defaultVariants: {
201
- variant: "default",
201
+ variant: "secondary",
202
202
  size: "default"
203
203
  }
204
204
  }
@@ -207,7 +207,7 @@ var Button = (0, import_system4.cva)(
207
207
  // src/components/Card.styles.ts
208
208
  var import_system5 = require("@marigold/system");
209
209
  var Card = (0, import_system5.cva)([
210
- "border border-input rounded-lg",
210
+ "border border-input rounded-md",
211
211
  "bg-surface-overlay",
212
212
  "p-4",
213
213
  "shadow-sm shadow-black/5"
@@ -219,12 +219,12 @@ var Checkbox = {
219
219
  checkbox: (0, import_system6.cva)([
220
220
  "grid size-4 shrink-0 place-content-center rounded",
221
221
  "border border-input shadow-sm shadow-black/5",
222
- "group-disabled/checkbox:border-disabled",
223
222
  "mixin-ring-focus-visible-checkbox",
223
+ "group-disabled/checkbox:bg-disabled! group-disabled/checkbox:border-disabled! group-disabled/checkbox:text-disabled-foreground group-disabled/checkbox:cursor-not-allowed",
224
224
  "group-selected/checkbox:border-brand group-selected/checkbox:bg-brand group-selected/checkbox:text-brand-foreground",
225
225
  "group-[indeterminate]/checkbox:border-brand group-[indeterminate]/checkbox:bg-brand group-[indeterminate]/checkbox:text-brand-foreground"
226
226
  ]),
227
- container: (0, import_system6.cva)(),
227
+ container: (0, import_system6.cva)("cursor-pointer read-only:cursor-default"),
228
228
  label: (0, import_system6.cva)(
229
229
  'text-sm leading-4 group-[group="checkbox"]/checkboxgroup:font-normal font-medium text-foreground group-disabled/checkbox:text-disabled-foreground'
230
230
  ),
@@ -235,7 +235,7 @@ var Checkbox = {
235
235
  var import_system7 = require("@marigold/system");
236
236
  var Calendar = {
237
237
  calendar: (0, import_system7.cva)(
238
- "rounded-lg border group-[[data-trigger]]/popover:border-0 border-border p-2"
238
+ "rounded-md border group-[[data-trigger]]/popover:border-0 border-border p-2"
239
239
  ),
240
240
  calendarCell: (0, import_system7.cva)([
241
241
  "relative flex size-9 items-center justify-center whitespace-nowrap rounded-lg",
@@ -268,7 +268,7 @@ var import_system10 = require("@marigold/system");
268
268
 
269
269
  // src/components/Input.styles.ts
270
270
  var import_system9 = require("@marigold/system");
271
- var inputContainer = "flex w-full px-3 py-2 rounded-lg shadow-sm shadow-black/5 border border-input bg-background text-sm text-foreground transition-shadow";
271
+ var inputContainer = "flex w-full px-3 py-2 rounded-lg shadow-sm shadow-black/5 border border-input bg-background text-sm text-foreground transition-shadow group-read-only/field:bg-muted";
272
272
  var inputDisabled = "disabled:cursor-not-allowed disabled:text-disabled-foreground disabled:bg-disabled";
273
273
  var inputInvalid = "group-invalid/field:border-destructive group-invalid/field:focus:border-destructive group-invalid/field:focus:ring-destructive/20";
274
274
  var inputReadOnly = "group-read-only/field:bg-muted";
@@ -281,7 +281,8 @@ var Input = {
281
281
  inputReadOnly,
282
282
  "h-input",
283
283
  "placeholder:text-placeholder",
284
- "[&[type=file]]:border-solid [&[type=file]]:bg-background [&[type=file]]:p-0 [&[type=file]]:pr-3 [&[type=file]]:italic [&[type=file]]:text-muted-foreground/70 file:me-3 file:h-full file:border-0 file:border-r file:border-solid file:border-input file:bg-transparent file:px-3 file:text-sm file:font-medium file:not-italic file:text-foreground",
284
+ "[&[type=file]]:cursor-pointer [&[type=file]]:border-solid [&[type=file]]:bg-background [&[type=file]]:p-0 [&[type=file]]:pr-3 [&[type=file]]:italic [&[type=file]]:text-muted-foreground/70",
285
+ "file:cursor-pointer file:me-3 file:h-full file:border-0 file:border-r file:border-solid file:border-input file:bg-transparent file:px-3 file:text-sm file:font-medium file:not-italic file:text-foreground",
285
286
  "group-[[data-icon]]/input:pl-8",
286
287
  "group-[[data-action]]/input:pr-7"
287
288
  ]),
@@ -298,7 +299,7 @@ var DateField = {
298
299
  "h-input",
299
300
  inputContainer,
300
301
  inputDisabled,
301
- "mixin-ring-focus-within",
302
+ "mixin-ring-has-focus-visible",
302
303
  inputInvalid,
303
304
  inputReadOnly,
304
305
  "invalid:focus-within:border-destructive invalid:focus-within:ring-destructive/20"
@@ -327,19 +328,23 @@ var DatePicker = (0, import_system11.cva)([
327
328
  // src/components/Dialog.styles.ts
328
329
  var import_system12 = require("@marigold/system");
329
330
  var Dialog = {
330
- closeButton: (0, import_system12.cva)(""),
331
+ closeButton: (0, import_system12.cva)([
332
+ "absolute top-3 right-3",
333
+ "flex size-7 items-center justify-center rounded transition-[color,box-shadow]",
334
+ "mixin-ring-focus-visible",
335
+ "[&_svg]:size-4 [&_svg]:opacity-60 [&_svg]:transition-opacity hover:[&_svg]:opacity-100"
336
+ ]),
331
337
  container: (0, import_system12.cva)(
332
338
  [
333
- "bg-background fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl",
334
- " border p-6 shadow-lg duration-200 sm:max-w-100 border-border"
339
+ "flex flex-col gap-0 p-0",
340
+ "bg-background rounded-xl border p-6 shadow-lg overflow-y-auto",
341
+ "w-full max-w-[calc(100%-2rem)]",
342
+ "sm:max-h-[min(640px,80vh)] max-h-[calc(100%-2rem)]"
335
343
  ],
336
344
  {
337
345
  variants: {
338
346
  size: {
339
- default: "",
340
- small: "w-[min(100%,640px)]",
341
- medium: "w-[min(100%,768px)]",
342
- large: "w-[min(100%,1024px)]"
347
+ default: "sm:max-w-100"
343
348
  }
344
349
  },
345
350
  defaultVariants: {
@@ -455,16 +460,15 @@ var List = {
455
460
  var import_system24 = require("@marigold/system");
456
461
  var ListBox = {
457
462
  container: (0, import_system24.cva)([
458
- "overflow-hidden rounded-lg border border-input group-[trigger]/popover:border-0"
463
+ "overflow-hidden rounded-md border border-input group-[trigger]/popover:border-0"
459
464
  ]),
460
465
  list: (0, import_system24.cva)(["space-y-1 bg-background p-1 text-sm outline-0"]),
461
466
  option: (0, import_system24.cva)([
462
- "disabled:cursor-not-allowed disabled:text-disabled-foreground",
463
- "relative flex flex-col rounded-md px-2 py-1.5 text-sm text-foreground",
467
+ "relative flex flex-col rounded-md px-2 py-1.5 text-sm text-foreground cursor-pointer",
464
468
  "selected:bg-selected",
465
- // TODO: can not use "ouline-none" because it overrides the focus visible things -.-
466
- // TODO: try it after RAC is updated!
467
- "data-[focused]:outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-ring/70"
469
+ "hover:bg-hover hover:text-hover-foreground",
470
+ "disabled:cursor-not-allowed disabled:text-disabled-foreground",
471
+ "mixin-ring-focus-visible"
468
472
  ]),
469
473
  section: (0, import_system24.cva)(""),
470
474
  header: (0, import_system24.cva)(
@@ -490,7 +494,7 @@ var Menu = {
490
494
  var import_system26 = require("@marigold/system");
491
495
  var NumberField = {
492
496
  group: (0, import_system26.cva)([
493
- "mixin-ring-focus-within",
497
+ "mixin-ring-has-focus-visible",
494
498
  inputInvalid,
495
499
  "relative inline-flex w-full -mb-0.5 items-center overflow-hidden whitespace-nowrap rounded-lg h-input grow text-center tabular-nums text-foreground",
496
500
  "border border-input text-sm shadow-sm shadow-black/5 transition-shadow",
@@ -499,8 +503,8 @@ var NumberField = {
499
503
  stepper: (0, import_system26.cva)([
500
504
  "w-7 h-full",
501
505
  "disabled:text-disabled-foreground disabled:bg-disabled",
502
- "border-input border-solid first-of-type:border-r",
503
- "border-input border-solid last-of-type:border-l "
506
+ // Make sure focus ring is only around the component and not the stepper buttons
507
+ "border-input! first-of-type:border-r! last-of-type:border-l!"
504
508
  ]),
505
509
  input: (0, import_system26.cva)(
506
510
  "border-none shadow-none rounded-none outline-offset-0 text-center focus-visible:ring-0"
@@ -511,14 +515,13 @@ var NumberField = {
511
515
  var import_system27 = require("@marigold/system");
512
516
  var Popover = (0, import_system27.cva)([
513
517
  "group/popover",
514
- "z-50 overflow-y-auto overflow-x-hidden rounded-lg outline-0",
515
- "border border-border",
518
+ "z-50 overflow-y-auto overflow-x-hidden rounded-md outline-0 border-input",
516
519
  /** animate stuff missing */
517
- "bg-surface-overlay text-foreground shadow-lg shadow-black/5 ",
518
- "placement-t:mb-1",
519
- "placement-b:mt-1",
520
- "placement-r:ml-1",
521
- "placement-l:mr-1"
520
+ "bg-surface-overlay text-foreground shadow-md",
521
+ "placement-top:mb-1",
522
+ "placement-bottom:mt-1",
523
+ "placement-right:ml-1",
524
+ "placement-left:mr-1"
522
525
  ]);
523
526
 
524
527
  // src/components/Radio.styles.ts
@@ -526,13 +529,13 @@ var import_system28 = require("@marigold/system");
526
529
  var Radio = {
527
530
  container: (0, import_system28.cva)("group-disabled/radio:cursor-not-allowed"),
528
531
  label: (0, import_system28.cva)([
529
- "group-disabled/radio:text-disabled-foreground",
530
- "text-sm font-normal"
532
+ "text-sm font-normal cursor-pointer",
533
+ "group-disabled/radio:text-disabled-foreground group-disabled/radio:cursor-not-allowed"
531
534
  ]),
532
535
  radio: (0, import_system28.cva)([
533
536
  "aspect-square size-4 rounded-full",
534
537
  "border border-input shadow-sm shadow-black/5",
535
- "outline-offset-2 group-[focus-visible]/radio:outline-2 group-[focus-visible]/radio:outline-ring/70",
538
+ "mixin-ring-focus-visible-radio",
536
539
  "group-disabled/radio:border-disabled",
537
540
  "group-selected/radio:border-brand group-selected/radio:bg-brand group-selected/radio:text-brand-foreground"
538
541
  ]),
@@ -542,11 +545,19 @@ var Radio = {
542
545
  // src/components/Pagination.styles.ts
543
546
  var import_system29 = require("@marigold/system");
544
547
  var Pagination = {
545
- navigationButton: (0, import_system29.cva)(
546
- "inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline-2 outline-ring/30 disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 hover:bg-hover hover:text-hover-foreground h-9 py-2 gap-1 px-2.5"
547
- ),
548
+ navigationButton: (0, import_system29.cva)([
549
+ "inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors",
550
+ "mixin-ring-focus-visible",
551
+ "disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground",
552
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
553
+ "hover:bg-hover hover:text-hover-foreground",
554
+ "h-9 py-2 gap-1 px-2.5"
555
+ ]),
548
556
  pageButton: (0, import_system29.cva)([
549
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline-2 outline-ring/30 disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 bg-background size-9",
557
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-colors bg-background size-9",
558
+ "mixin-ring-focus-visible",
559
+ "disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground",
560
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
550
561
  "data-[selected=true]:border data-[selected=true]:border-input data-[selected=true]:shadow-xs",
551
562
  "hover:bg-hover hover:text-hover-foreground"
552
563
  ]),
@@ -556,7 +567,7 @@ var Pagination = {
556
567
  // src/components/ProgressCycle.styles.ts
557
568
  var import_system30 = require("@marigold/system");
558
569
  var ProgressCycle = (0, import_system30.cva)([
559
- "stroke-background"
570
+ "stroke-foreground"
560
571
  ]);
561
572
 
562
573
  // src/components/SectionMessage.styles.ts
@@ -564,8 +575,8 @@ var import_system31 = require("@marigold/system");
564
575
  var SectionMessage = {
565
576
  container: (0, import_system31.cva)(
566
577
  [
567
- 'grid-cols-[min-content_auto_min-content] gap-x-4 gap-y-2 [grid-template-areas:"icon_title_close""icon_content_content"]',
568
- "bg-background z-50 max-w-[601px] rounded-sm border p-4"
578
+ 'grid-cols-[min-content_auto_min-content] gap-x-3 gap-y-1 [grid-template-areas:"icon_title_close""icon_content_content"]',
579
+ "bg-background rounded-md border px-3 py-4"
569
580
  ],
570
581
  {
571
582
  variants: {
@@ -581,7 +592,7 @@ var SectionMessage = {
581
592
  }
582
593
  }
583
594
  ),
584
- title: (0, import_system31.cva)("text-base leading-5 font-bold"),
595
+ title: (0, import_system31.cva)("text-sm font-medium"),
585
596
  content: (0, import_system31.cva)("text-muted-foreground text-sm leading-5 font-normal", {
586
597
  variants: {
587
598
  variant: {
@@ -608,9 +619,15 @@ var SectionMessage = {
608
619
  variant: "info"
609
620
  }
610
621
  }),
611
- close: (0, import_system31.cva)(
612
- "h-[9.98px] w-[9.98px] cursor-pointer border-none p-0 leading-normal outline-0"
613
- )
622
+ close: (0, import_system31.cva)([
623
+ "flex items-center justify-center",
624
+ "rounded-md transition-color size-8 shrink-0 p-0 text-foreground cursor-pointer",
625
+ "[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
626
+ "-my-1.5 -me-2",
627
+ // align button with title
628
+ "mixin-ring-focus-visible",
629
+ "[&_svg]:opacity-60 [&_svg]:transition-opacity hover:[&_svg]:opacity-100"
630
+ ])
614
631
  };
615
632
 
616
633
  // src/components/Select.styles.ts
@@ -639,7 +656,9 @@ var Slider = {
639
656
  "absolute bg-black data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full rounded-lg"
640
657
  ]),
641
658
  thumb: (0, import_system33.cva)([
642
- "block h-5 w-5 rounded-full border-2 border-primary bg-background transition-colors focus-visible:outline-[3px] focus-visible:outline-ring/40 data-[disabled]:cursor-not-allowed"
659
+ "block h-5 w-5 rounded-full border-2 border-primary bg-background transition-colors",
660
+ "mixin-ring-focus-visible-borderless",
661
+ "data-[disabled]:cursor-not-allowed"
643
662
  ]),
644
663
  output: (0, import_system33.cva)("text-text-base text-sm")
645
664
  };
@@ -655,7 +674,7 @@ var Switch = {
655
674
  "border-2 border-transparent",
656
675
  "group-disabled/switch:bg-disabled group-disabled/switch:text-disabled-foreground group-selected/switch:group-disabled/switch:bg-disabled group-selected/switch:group-disabled/switch:text-disabled-foreground",
657
676
  "group-selected/switch:bg-brand bg-input",
658
- "outline-offset-2 group-[focus-visible]/switch:outline-2 group-[focus-visible]/switch:outline-ring/70"
677
+ "mixin-ring-focus-visible-switch"
659
678
  ]),
660
679
  thumb: (0, import_system34.cva)([
661
680
  "pointer-events-none block size-5 rounded-full",
@@ -668,15 +687,30 @@ var Switch = {
668
687
  // src/components/Table.styles.ts
669
688
  var import_system35 = require("@marigold/system");
670
689
  var Table = {
671
- table: (0, import_system35.cva)("text-sm", {
672
- variants: {
673
- variant: {
674
- default: "",
675
- grid: ""
690
+ table: (0, import_system35.cva)(
691
+ "text-sm [&_td]:border-border [&_th]:border-border border-separate border-spacing-0 [&_th]:border-b [&_tr]:border-none [&_tr:not(:last-child)_td]:border-b",
692
+ {
693
+ variants: {
694
+ variant: {
695
+ default: "",
696
+ grid: ""
697
+ }
676
698
  }
677
699
  }
678
- }),
679
- headerRow: (0, import_system35.cva)("border-border border-b", {
700
+ ),
701
+ thead: (0, import_system35.cva)(
702
+ // for sticky header
703
+ "bg-background/90 top-0 z-10 backdrop-blur-xs ",
704
+ {
705
+ variants: {
706
+ variant: {
707
+ default: "",
708
+ grid: ""
709
+ }
710
+ }
711
+ }
712
+ ),
713
+ headerRow: (0, import_system35.cva)(["border-border border-b"], {
680
714
  variants: {
681
715
  variant: {
682
716
  default: "",
@@ -690,9 +724,7 @@ var Table = {
690
724
  header: (0, import_system35.cva)(
691
725
  [
692
726
  "h-12 px-3 align-middle font-medium text-muted-foreground last:text-right",
693
- "focus-visible:outline-2 outline-offset-2 outline-ring/70",
694
- // for sticky header
695
- "bg-background/90 top-0 z-10 backdrop-blur-xs"
727
+ "focus-visible:outline-2 outline-offset-2 outline-ring/70"
696
728
  ],
697
729
  {
698
730
  variants: {
@@ -755,16 +787,13 @@ var Tabs = {
755
787
  tab: (0, import_system36.cva)([
756
788
  "relative inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-colors",
757
789
  "[&_svg]:shrink-0",
758
- "outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
790
+ "mixin-ring-focus-visible",
759
791
  "hover:bg-hover hover:text-foreground",
760
792
  "disabled:pointer-events-none disabled:opacity-50",
761
793
  "data-selected:text-foreground data-selected:hover:bg-hover",
762
794
  "data-[selected=true]:after:bg-foreground after:absolute after:inset-x-0 after:bottom-0 after:-mb-1 after:h-0.5"
763
795
  ]),
764
- tabpanel: (0, import_system36.cva)([
765
- "py-4 rounded-sm",
766
- "outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]"
767
- ])
796
+ tabpanel: (0, import_system36.cva)(["py-4 rounded-sm", "mixin-ring-focus-visible"])
768
797
  };
769
798
 
770
799
  // src/components/Tag.styles.ts
@@ -778,7 +807,7 @@ var Tag = {
778
807
  "bg-background",
779
808
  "data-selected:text-white data-selected:bg-brand",
780
809
  "data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled-foreground data-[disabled]:bg-disabled",
781
- "focus:outline-0 focus-visible:outline-2 focus-visible:outline-ring/70"
810
+ "mixin-ring-focus-visible"
782
811
  ]),
783
812
  closeButton: (0, import_system37.cva)([
784
813
  "size-4 flex items-center justify-end whitespace-nowrap",
@@ -833,10 +862,10 @@ var Tooltip = {
833
862
  container: (0, import_system40.cva)(
834
863
  [
835
864
  "text-brand-foreground bg-brand relative z-50 max-w-70 rounded-md border border-brand px-3 py-1.5 text-sm ",
836
- "placement-t:mb-2",
837
- "placement-b:mt-2",
838
- "placement-r:ml-2",
839
- "placement-l:mr-2"
865
+ "placement-top:mb-2",
866
+ "placement-bottom:mt-2",
867
+ "placement-right:ml-2",
868
+ "placement-left:mr-2"
840
869
  ],
841
870
  {
842
871
  variants: {
@@ -879,7 +908,7 @@ var import_system41 = require("@marigold/system");
879
908
  var Underlay = (0, import_system41.cva)("", {
880
909
  variants: {
881
910
  variant: {
882
- modal: " bg-black/25 backdrop-blur-sm"
911
+ modal: " bg-black/80 backdrop-blur-sm"
883
912
  }
884
913
  }
885
914
  });