iryx-ui 0.21.0 → 0.23.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.
Files changed (34) hide show
  1. package/dist/component-names.d.ts +1 -1
  2. package/dist/component-names.js +1 -1
  3. package/dist/components/Checkbox.vue.d.ts +20 -3
  4. package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +90 -43
  5. package/dist/components/Code.js +5 -0
  6. package/dist/components/Code.vue.d.ts +38 -0
  7. package/dist/components/Code.vue_vue_type_script_setup_true_lang.js +66 -0
  8. package/dist/components/DescriptionList.js +5 -0
  9. package/dist/components/DescriptionList.vue.d.ts +50 -0
  10. package/dist/components/DescriptionList.vue_vue_type_script_setup_true_lang.js +48 -0
  11. package/dist/components/Progress.vue.d.ts +29 -3
  12. package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +103 -47
  13. package/dist/components/RadioGroup.vue.d.ts +12 -0
  14. package/dist/components/RadioGroup.vue_vue_type_script_setup_true_lang.js +73 -39
  15. package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +35 -35
  16. package/dist/components/index.d.ts +2 -0
  17. package/dist/components/index.js +124 -120
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +126 -122
  20. package/dist/theme/checkbox.d.ts +42 -39
  21. package/dist/theme/checkbox.js +117 -15
  22. package/dist/theme/code.d.ts +53 -0
  23. package/dist/theme/code.js +24 -0
  24. package/dist/theme/description-list.d.ts +62 -0
  25. package/dist/theme/description-list.js +48 -0
  26. package/dist/theme/index.d.ts +2 -0
  27. package/dist/theme/presets.d.ts +8 -2
  28. package/dist/theme/presets.js +2 -2
  29. package/dist/theme/progress.d.ts +75 -0
  30. package/dist/theme/progress.js +43 -11
  31. package/dist/theme/radio-group.d.ts +45 -30
  32. package/dist/theme/radio-group.js +118 -11
  33. package/package.json +1 -1
  34. package/theme.css +25 -0
@@ -1,96 +1,99 @@
1
1
  export declare const checkboxTheme: import("tailwind-variants").TVReturnType<{
2
- size: {
3
- sm: {
2
+ variant: {
3
+ checkbox: {
4
4
  root: string;
5
- indicator: string;
6
5
  };
7
- md: {
6
+ card: {
8
7
  root: string;
9
- indicator: string;
10
8
  };
11
- lg: {
9
+ tile: {
12
10
  root: string;
13
- indicator: string;
11
+ content: string;
14
12
  };
15
13
  };
14
+ size: {
15
+ sm: {};
16
+ md: {};
17
+ lg: {};
18
+ };
16
19
  withText: {
17
- true: {
18
- root: string;
19
- };
20
+ true: {};
20
21
  };
21
22
  invalid: {
22
- true: {
23
- root: string;
24
- };
23
+ true: {};
25
24
  };
26
25
  }, {
27
26
  wrapper: string;
28
27
  root: string;
28
+ mark: string;
29
29
  indicator: string;
30
+ icon: string;
30
31
  content: string;
31
32
  label: string;
32
33
  description: string;
33
34
  }, undefined, {
34
- size: {
35
- sm: {
35
+ variant: {
36
+ checkbox: {
36
37
  root: string;
37
- indicator: string;
38
38
  };
39
- md: {
39
+ card: {
40
40
  root: string;
41
- indicator: string;
42
41
  };
43
- lg: {
42
+ tile: {
44
43
  root: string;
45
- indicator: string;
44
+ content: string;
46
45
  };
47
46
  };
47
+ size: {
48
+ sm: {};
49
+ md: {};
50
+ lg: {};
51
+ };
48
52
  withText: {
49
- true: {
50
- root: string;
51
- };
53
+ true: {};
52
54
  };
53
55
  invalid: {
54
- true: {
55
- root: string;
56
- };
56
+ true: {};
57
57
  };
58
58
  }, {
59
59
  wrapper: string;
60
60
  root: string;
61
+ mark: string;
61
62
  indicator: string;
63
+ icon: string;
62
64
  content: string;
63
65
  label: string;
64
66
  description: string;
65
67
  }, import("tailwind-variants").TVReturnTypeLike<{
66
- size: {
67
- sm: {
68
+ variant: {
69
+ checkbox: {
68
70
  root: string;
69
- indicator: string;
70
71
  };
71
- md: {
72
+ card: {
72
73
  root: string;
73
- indicator: string;
74
74
  };
75
- lg: {
75
+ tile: {
76
76
  root: string;
77
- indicator: string;
77
+ content: string;
78
78
  };
79
79
  };
80
+ size: {
81
+ sm: {};
82
+ md: {};
83
+ lg: {};
84
+ };
80
85
  withText: {
81
- true: {
82
- root: string;
83
- };
86
+ true: {};
84
87
  };
85
88
  invalid: {
86
- true: {
87
- root: string;
88
- };
89
+ true: {};
89
90
  };
90
91
  }, {
91
92
  wrapper: string;
92
93
  root: string;
94
+ mark: string;
93
95
  indicator: string;
96
+ icon: string;
94
97
  content: string;
95
98
  label: string;
96
99
  description: string;
@@ -3,36 +3,138 @@ import { tv as e } from "tailwind-variants";
3
3
  var t = e({
4
4
  slots: {
5
5
  wrapper: "flex items-start gap-2.5",
6
- root: "peer flex shrink-0 cursor-pointer items-center justify-center rounded border border-border bg-background text-primary-foreground transition-[color,background-color,border-color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary",
6
+ root: "peer cursor-pointer transition-[color,background-color,border-color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50",
7
+ mark: "flex shrink-0 items-center justify-center rounded border border-border bg-background text-primary-foreground transition-[color,background-color,border-color] group-data-[state=checked]/item:border-primary group-data-[state=checked]/item:bg-primary group-data-[state=indeterminate]/item:border-primary group-data-[state=indeterminate]/item:bg-primary",
7
8
  indicator: "flex items-center justify-center text-current",
9
+ icon: "text-muted-foreground transition-colors",
8
10
  content: "grid gap-1",
9
11
  label: "text-sm leading-5 font-medium text-foreground select-none",
10
12
  description: "text-sm leading-snug text-muted-foreground"
11
13
  },
12
14
  variants: {
15
+ variant: {
16
+ checkbox: { root: "flex shrink-0 items-center justify-center rounded border border-border bg-background text-primary-foreground data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary" },
17
+ card: { root: "flex w-full items-start gap-3 rounded-lg border border-border bg-background text-left hover:bg-accent/50 data-[state=checked]:border-primary data-[state=checked]:bg-primary/5 data-[state=indeterminate]:border-primary" },
18
+ tile: {
19
+ root: "flex w-full flex-col items-center gap-2 rounded-lg border border-border bg-background text-center hover:bg-accent/50 data-[state=checked]:border-primary data-[state=checked]:bg-primary/5 data-[state=checked]:[&_[data-slot=icon]]:text-primary",
20
+ content: "justify-items-center gap-0.5"
21
+ }
22
+ },
13
23
  size: {
14
- sm: {
24
+ sm: {},
25
+ md: {},
26
+ lg: {}
27
+ },
28
+ withText: { true: {} },
29
+ invalid: { true: {} }
30
+ },
31
+ compoundVariants: [
32
+ {
33
+ variant: "checkbox",
34
+ size: "sm",
35
+ class: {
15
36
  root: "size-3.5",
16
37
  indicator: "[&_svg]:size-2.5"
17
- },
18
- md: {
38
+ }
39
+ },
40
+ {
41
+ variant: "checkbox",
42
+ size: "md",
43
+ class: {
19
44
  root: "size-4",
20
45
  indicator: "[&_svg]:size-3"
21
- },
22
- lg: {
46
+ }
47
+ },
48
+ {
49
+ variant: "checkbox",
50
+ size: "lg",
51
+ class: {
23
52
  root: "size-5",
24
53
  indicator: "[&_svg]:size-3.5"
25
54
  }
26
55
  },
27
- withText: { true: { root: "mt-0.5" } },
28
- invalid: { true: { root: "border-red-500 focus-visible:ring-red-500/40" } }
29
- },
30
- compoundVariants: [{
31
- size: "lg",
32
- withText: !0,
33
- class: { root: "mt-0" }
34
- }],
35
- defaultVariants: { size: "md" }
56
+ {
57
+ variant: "checkbox",
58
+ withText: !0,
59
+ class: { root: "mt-0.5" }
60
+ },
61
+ {
62
+ variant: "checkbox",
63
+ size: "lg",
64
+ withText: !0,
65
+ class: { root: "mt-0" }
66
+ },
67
+ {
68
+ variant: "checkbox",
69
+ invalid: !0,
70
+ class: { root: "border-red-500 focus-visible:ring-red-500/40" }
71
+ },
72
+ {
73
+ variant: "card",
74
+ size: "sm",
75
+ class: {
76
+ root: "p-3",
77
+ mark: "mt-0.5 size-3.5",
78
+ indicator: "[&_svg]:size-2.5"
79
+ }
80
+ },
81
+ {
82
+ variant: "card",
83
+ size: "md",
84
+ class: {
85
+ root: "p-4",
86
+ mark: "mt-0.5 size-4",
87
+ indicator: "[&_svg]:size-3"
88
+ }
89
+ },
90
+ {
91
+ variant: "card",
92
+ size: "lg",
93
+ class: {
94
+ root: "p-5",
95
+ mark: "size-5",
96
+ indicator: "[&_svg]:size-3.5"
97
+ }
98
+ },
99
+ {
100
+ variant: "card",
101
+ invalid: !0,
102
+ class: { root: "border-red-500 focus-visible:ring-red-500/40" }
103
+ },
104
+ {
105
+ variant: "tile",
106
+ size: "sm",
107
+ class: {
108
+ root: "p-3",
109
+ icon: "size-5"
110
+ }
111
+ },
112
+ {
113
+ variant: "tile",
114
+ size: "md",
115
+ class: {
116
+ root: "p-4",
117
+ icon: "size-6"
118
+ }
119
+ },
120
+ {
121
+ variant: "tile",
122
+ size: "lg",
123
+ class: {
124
+ root: "p-5",
125
+ icon: "size-7"
126
+ }
127
+ },
128
+ {
129
+ variant: "tile",
130
+ invalid: !0,
131
+ class: { root: "border-red-500 focus-visible:ring-red-500/40" }
132
+ }
133
+ ],
134
+ defaultVariants: {
135
+ variant: "checkbox",
136
+ size: "md"
137
+ }
36
138
  });
37
139
  //#endregion
38
140
  export { t as checkboxTheme };
@@ -0,0 +1,53 @@
1
+ export declare const codeTheme: import("tailwind-variants").TVReturnType<{
2
+ block: {
3
+ true: {
4
+ root: string;
5
+ code: string;
6
+ copy: string;
7
+ };
8
+ false: {
9
+ root: string;
10
+ code: string;
11
+ copy: string;
12
+ };
13
+ };
14
+ }, {
15
+ root: string;
16
+ code: string;
17
+ copy: string;
18
+ }, undefined, {
19
+ block: {
20
+ true: {
21
+ root: string;
22
+ code: string;
23
+ copy: string;
24
+ };
25
+ false: {
26
+ root: string;
27
+ code: string;
28
+ copy: string;
29
+ };
30
+ };
31
+ }, {
32
+ root: string;
33
+ code: string;
34
+ copy: string;
35
+ }, import("tailwind-variants").TVReturnTypeLike<{
36
+ block: {
37
+ true: {
38
+ root: string;
39
+ code: string;
40
+ copy: string;
41
+ };
42
+ false: {
43
+ root: string;
44
+ code: string;
45
+ copy: string;
46
+ };
47
+ };
48
+ }, {
49
+ root: string;
50
+ code: string;
51
+ copy: string;
52
+ }>>;
53
+ export type CodeSlots = keyof ReturnType<typeof codeTheme>;
@@ -0,0 +1,24 @@
1
+ import { tv as e } from "tailwind-variants";
2
+ //#region src/theme/code.ts
3
+ var t = e({
4
+ slots: {
5
+ root: "",
6
+ code: "font-mono",
7
+ copy: "focus-visible:outline-ring inline-flex shrink-0 items-center justify-center rounded-md text-muted-foreground transition hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4"
8
+ },
9
+ variants: { block: {
10
+ true: {
11
+ root: "relative overflow-hidden rounded-lg border border-border bg-muted",
12
+ code: "block overflow-x-auto py-4 pr-14 pl-4 text-sm text-foreground",
13
+ copy: "absolute top-2 right-2 size-7 border border-border bg-background"
14
+ },
15
+ false: {
16
+ root: "inline-flex items-center gap-1",
17
+ code: "rounded border border-current/25 bg-current/10 px-1.5 py-0.5 font-mono text-[0.875em] text-current/90",
18
+ copy: "size-5 [&_svg]:size-3.5"
19
+ }
20
+ } },
21
+ defaultVariants: { block: !1 }
22
+ });
23
+ //#endregion
24
+ export { t as codeTheme };
@@ -0,0 +1,62 @@
1
+ export declare const descriptionListTheme: import("tailwind-variants").TVReturnType<{
2
+ orientation: {
3
+ vertical: {
4
+ root: string;
5
+ item: string;
6
+ };
7
+ horizontal: {
8
+ root: string;
9
+ item: string;
10
+ };
11
+ };
12
+ divided: {
13
+ true: {};
14
+ false: {};
15
+ };
16
+ }, {
17
+ root: string;
18
+ item: string;
19
+ term: string;
20
+ description: string;
21
+ }, undefined, {
22
+ orientation: {
23
+ vertical: {
24
+ root: string;
25
+ item: string;
26
+ };
27
+ horizontal: {
28
+ root: string;
29
+ item: string;
30
+ };
31
+ };
32
+ divided: {
33
+ true: {};
34
+ false: {};
35
+ };
36
+ }, {
37
+ root: string;
38
+ item: string;
39
+ term: string;
40
+ description: string;
41
+ }, import("tailwind-variants").TVReturnTypeLike<{
42
+ orientation: {
43
+ vertical: {
44
+ root: string;
45
+ item: string;
46
+ };
47
+ horizontal: {
48
+ root: string;
49
+ item: string;
50
+ };
51
+ };
52
+ divided: {
53
+ true: {};
54
+ false: {};
55
+ };
56
+ }, {
57
+ root: string;
58
+ item: string;
59
+ term: string;
60
+ description: string;
61
+ }>>;
62
+ export type DescriptionListSlots = keyof ReturnType<typeof descriptionListTheme>;
@@ -0,0 +1,48 @@
1
+ import { tv as e } from "tailwind-variants";
2
+ //#region src/theme/description-list.ts
3
+ var t = e({
4
+ slots: {
5
+ root: "text-sm",
6
+ item: "",
7
+ term: "font-medium text-muted-foreground",
8
+ description: "text-foreground"
9
+ },
10
+ variants: {
11
+ orientation: {
12
+ vertical: {
13
+ root: "flex flex-col",
14
+ item: "flex flex-col gap-1"
15
+ },
16
+ horizontal: {
17
+ root: "grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] gap-x-6",
18
+ item: "col-span-full grid grid-cols-subgrid items-baseline"
19
+ }
20
+ },
21
+ divided: {
22
+ true: {},
23
+ false: {}
24
+ }
25
+ },
26
+ compoundVariants: [
27
+ {
28
+ orientation: "vertical",
29
+ divided: !1,
30
+ class: { root: "gap-4" }
31
+ },
32
+ {
33
+ orientation: "horizontal",
34
+ divided: !1,
35
+ class: { root: "gap-y-4" }
36
+ },
37
+ {
38
+ divided: !0,
39
+ class: { item: "border-t border-border py-3 first:border-t-0 first:pt-0 last:pb-0" }
40
+ }
41
+ ],
42
+ defaultVariants: {
43
+ orientation: "vertical",
44
+ divided: !1
45
+ }
46
+ });
47
+ //#endregion
48
+ export { t as descriptionListTheme };
@@ -13,6 +13,7 @@ export * from './calendar';
13
13
  export * from './card';
14
14
  export * from './chart-legend';
15
15
  export * from './checkbox';
16
+ export * from './code';
16
17
  export * from './collapsible';
17
18
  export * from './color-picker';
18
19
  export * from './combobox';
@@ -20,6 +21,7 @@ export * from './command-palette';
20
21
  export * from './container';
21
22
  export * from './date-field';
22
23
  export * from './date-picker';
24
+ export * from './description-list';
23
25
  export * from './dialog';
24
26
  export * from './donut-chart';
25
27
  export * from './drawer';
@@ -33,8 +33,14 @@ export interface ThemeColors {
33
33
  }
34
34
  /** A theme provides token values per appearance mode. Omitted tokens keep the defaults from theme.css. */
35
35
  export interface Theme {
36
- light: ThemeColors;
37
- dark: ThemeColors;
36
+ light?: ThemeColors;
37
+ dark?: ThemeColors;
38
+ /**
39
+ * Corner radius for the whole library — what `rounded-lg` resolves to, with
40
+ * the rest of the scale derived from it. One value rather than one per mode:
41
+ * corners do not change between light and dark.
42
+ */
43
+ radius?: string;
38
44
  }
39
45
  /**
40
46
  * Built-in theme presets. Each swaps only the brand primary (solid colour +
@@ -66,8 +66,8 @@ function r(t) {
66
66
  }
67
67
  function i(e) {
68
68
  if (typeof document > "u") return;
69
- let i = typeof e == "string" ? t[e] : e, a = document.getElementById(n);
70
- a || (a = document.createElement("style"), a.id = n, document.head.appendChild(a)), a.textContent = `:root { ${r(i.light)} }\n.dark { ${r(i.dark)} }`;
69
+ let i = typeof e == "string" ? t[e] : e, a = i.radius == null ? "" : `--iryx-radius: ${i.radius}; `, o = document.getElementById(n);
70
+ o || (o = document.createElement("style"), o.id = n, document.head.appendChild(o)), o.textContent = `:root { ${a}${r(i.light ?? {})} }\n.dark { ${r(i.dark ?? {})} }`;
71
71
  }
72
72
  function a() {
73
73
  typeof document > "u" || document.getElementById(n)?.remove();