@leitware/composables 1.5.0 → 1.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leitware/composables",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,34 +11,43 @@ const buttonVariants = cva(
11
11
  {
12
12
  variants: {
13
13
  variant: {
14
- default: 'bg-primary text-primary-foreground',
14
+ default:
15
+ 'bg-primary text-primary-foreground border-(--button-primary-border) bg-[image:var(--button-primary-background-image)] shadow-(--button-primary-shadow) hover:shadow-[var(--button-primary-hover-shadow,var(--hover-shadow))] hover:bg-[image:var(--button-primary-hover-background-image)] hover:border-[var(--button-primary-hover-border,var(--hover-ring-color))]',
15
16
  outline:
16
- 'border-stroke hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground',
17
+ 'border-stroke shadow-(--button-outline-shadow) hover:shadow-[var(--button-outline-hover-shadow,var(--hover-shadow))] hover:bg-[var(--button-quiet-hover-bg,transparent)] hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground',
17
18
  secondary:
18
- 'bg-secondary text-secondary-foreground aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
19
- ghost: 'hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground',
20
- destructive: `bg-surface-critical ${FOCUS_RING_DESTRUCTIVE} text-critical border-stroke-critical`,
19
+ 'bg-secondary text-secondary-foreground border-(--button-secondary-border) shadow-(--button-secondary-shadow) hover:shadow-[var(--button-secondary-hover-shadow,var(--hover-shadow))] hover:bg-[var(--button-secondary-hover-bg,var(--bg-fill-secondary))] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
20
+ ghost:
21
+ 'hover:bg-[var(--button-quiet-hover-bg,transparent)] hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground',
22
+ destructive: `bg-[var(--button-destructive-bg,var(--bg-surface-critical))] ${FOCUS_RING_DESTRUCTIVE} text-[var(--button-destructive-text,var(--text-critical))] border-[var(--button-destructive-border,var(--border-critical))] bg-[image:var(--button-destructive-background-image)] shadow-(--button-destructive-shadow) hover:shadow-[var(--button-destructive-hover-shadow,var(--hover-shadow))] hover:bg-[image:var(--button-destructive-hover-background-image)] hover:border-[var(--button-destructive-hover-border,var(--hover-ring-color))]`,
21
23
  success: 'bg-surface-success text-success border-stroke-success',
22
24
  warning: 'bg-surface-warning text-warning border-stroke-warning',
23
25
  info: 'bg-surface-info text-info border-stroke-info',
24
- brand: 'bg-surface-brand text-brand border-stroke-brand',
25
- 'brand-2': 'bg-surface-brand-2 text-brand-2 border-stroke-brand-2',
26
- 'brand-3': 'bg-surface-brand-3 text-brand-3 border-stroke-brand-3',
27
- 'brand-4': 'bg-surface-brand-4 text-brand-4 border-stroke-brand-4',
28
- 'brand-5': 'bg-surface-brand-5 text-brand-5 border-stroke-brand-5',
26
+ brand:
27
+ 'bg-[var(--button-brand-bg,var(--bg-surface-brand))] text-[var(--button-brand-text,var(--text-brand))] border-[var(--button-brand-border,var(--border-brand))] bg-[image:var(--button-brand-background-image)] shadow-(--button-brand-shadow) hover:shadow-[var(--button-brand-hover-shadow,var(--hover-shadow))] hover:bg-[image:var(--button-brand-hover-background-image)] hover:border-[var(--button-brand-hover-border,var(--hover-ring-color))]',
28
+ 'brand-2':
29
+ 'bg-[var(--button-brand-2-bg,var(--bg-surface-brand-2))] text-[var(--button-brand-2-text,var(--text-brand-2))] border-[var(--button-brand-2-border,var(--border-brand-2))] bg-[image:var(--button-brand-2-background-image)] shadow-(--button-brand-2-shadow) hover:shadow-[var(--button-brand-2-hover-shadow,var(--hover-shadow))] hover:bg-[image:var(--button-brand-2-hover-background-image)] hover:border-[var(--button-brand-2-hover-border,var(--hover-ring-color))]',
30
+ 'brand-3':
31
+ 'bg-[var(--button-brand-3-bg,var(--bg-surface-brand-3))] text-[var(--button-brand-3-text,var(--text-brand-3))] border-[var(--button-brand-3-border,var(--border-brand-3))] bg-[image:var(--button-brand-3-background-image)] shadow-(--button-brand-3-shadow) hover:shadow-[var(--button-brand-3-hover-shadow,var(--hover-shadow))] hover:bg-[image:var(--button-brand-3-hover-background-image)] hover:border-[var(--button-brand-3-hover-border,var(--hover-ring-color))]',
32
+ 'brand-4':
33
+ 'bg-[var(--button-brand-4-bg,var(--bg-surface-brand-4))] text-[var(--button-brand-4-text,var(--text-brand-4))] border-[var(--button-brand-4-border,var(--border-brand-4))] bg-[image:var(--button-brand-4-background-image)] shadow-(--button-brand-4-shadow) hover:shadow-[var(--button-brand-4-hover-shadow,var(--hover-shadow))] hover:bg-[image:var(--button-brand-4-hover-background-image)] hover:border-[var(--button-brand-4-hover-border,var(--hover-ring-color))]',
34
+ 'brand-5':
35
+ 'bg-[var(--button-brand-5-bg,var(--bg-surface-brand-5))] text-[var(--button-brand-5-text,var(--text-brand-5))] border-[var(--button-brand-5-border,var(--border-brand-5))] bg-[image:var(--button-brand-5-background-image)] shadow-(--button-brand-5-shadow) hover:shadow-[var(--button-brand-5-hover-shadow,var(--hover-shadow))] hover:bg-[image:var(--button-brand-5-hover-background-image)] hover:border-[var(--button-brand-5-hover-border,var(--hover-ring-color))]',
29
36
  emphasis: 'bg-surface-emphasis text-emphasis border-stroke-emphasis',
30
37
  link: 'text-primary underline-offset-4 hover:underline hover:ring-0',
31
38
  },
32
39
  size: {
33
40
  default:
34
- "h-7 gap-1 px-3 text-xs/relaxed has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 [&_svg:not([class*='size-'])]:size-3.5",
35
- xs: "h-5 gap-1 px-2.5 text-2xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-2.5",
36
- sm: "h-6 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
37
- lg: "h-8 gap-1 px-3.5 text-xs/relaxed has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-4",
38
- icon: "size-7 [&_svg:not([class*='size-'])]:size-3.5",
39
- 'icon-xs': "size-5 [&_svg:not([class*='size-'])]:size-2.5",
40
- 'icon-sm': "size-6 [&_svg:not([class*='size-'])]:size-3",
41
- 'icon-lg': "size-8 [&_svg:not([class*='size-'])]:size-4",
41
+ "h-(--button-height) gap-(--button-gap) px-3 text-(length:--button-font-size)/relaxed has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 [&_svg:not([class*='size-'])]:size-3.5",
42
+ xs: "h-(--button-height-xs) rounded-(--button-radius-xs) gap-1 px-2.5 text-(length:--button-font-size-xs) has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-2.5",
43
+ sm: "h-(--button-height-sm) rounded-(--button-radius-sm) gap-1 px-2.5 text-(length:--button-font-size-sm)/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
44
+ lg: "h-(--button-height-lg) gap-(--button-gap) px-3.5 text-(length:--button-font-size)/relaxed has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-4",
45
+ icon: "size-(--button-height) [&_svg:not([class*='size-'])]:size-3.5",
46
+ 'icon-xs':
47
+ "size-(--button-height-xs) rounded-(--button-radius-xs) [&_svg:not([class*='size-'])]:size-2.5",
48
+ 'icon-sm':
49
+ "size-(--button-height-sm) rounded-(--button-radius-sm) [&_svg:not([class*='size-'])]:size-3",
50
+ 'icon-lg': "size-(--button-height-lg) [&_svg:not([class*='size-'])]:size-4",
42
51
  },
43
52
  // Declared after `size` so the pill class wins any size-level radius
44
53
  // when tailwind-merge resolves conflicts.