@kopexa/theme 1.2.0 → 1.4.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 (36) hide show
  1. package/dist/chunk-E5AF4JZZ.mjs +167 -0
  2. package/dist/chunk-GWY5N4AY.mjs +101 -0
  3. package/dist/chunk-HQ27V5V4.mjs +11 -0
  4. package/dist/chunk-U6ONJKJY.mjs +31 -0
  5. package/dist/{chunk-EOML76MT.mjs → chunk-YPHFKGNI.mjs} +4 -1
  6. package/dist/components/button.d.mts +65 -9
  7. package/dist/components/button.d.ts +65 -9
  8. package/dist/components/button.js +177 -18
  9. package/dist/components/button.mjs +3 -1
  10. package/dist/components/command.d.mts +18 -0
  11. package/dist/components/command.d.ts +18 -0
  12. package/dist/components/command.js +4 -1
  13. package/dist/components/command.mjs +1 -1
  14. package/dist/components/index.d.mts +1 -0
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/index.js +287 -25
  17. package/dist/components/index.mjs +12 -6
  18. package/dist/components/page-layout.d.mts +208 -0
  19. package/dist/components/page-layout.d.ts +208 -0
  20. package/dist/components/page-layout.js +125 -0
  21. package/dist/components/page-layout.mjs +6 -0
  22. package/dist/index.d.mts +1 -0
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +287 -25
  25. package/dist/index.mjs +12 -6
  26. package/dist/utils/classes.d.mts +7 -0
  27. package/dist/utils/classes.d.ts +7 -0
  28. package/dist/utils/classes.js +36 -0
  29. package/dist/utils/classes.mjs +8 -0
  30. package/dist/utils/variants.d.mts +25 -0
  31. package/dist/utils/variants.d.ts +25 -0
  32. package/dist/utils/variants.js +55 -0
  33. package/dist/utils/variants.mjs +6 -0
  34. package/package.json +2 -2
  35. package/dist/chunk-GSHMDS47.mjs +0 -37
  36. /package/dist/{chunk-QIGSYUIX.mjs → chunk-ZKEY52ZF.mjs} +0 -0
@@ -0,0 +1,167 @@
1
+ import {
2
+ focusVisibleClasses
3
+ } from "./chunk-HQ27V5V4.mjs";
4
+ import {
5
+ colorVariants
6
+ } from "./chunk-U6ONJKJY.mjs";
7
+
8
+ // src/components/button.ts
9
+ import { tv } from "tailwind-variants";
10
+ var button = tv({
11
+ base: [
12
+ "group relative inline-flex items-center justify-center select-none",
13
+ "box-border appearance-none",
14
+ "whitespace-nowrap min-w-max font-normal subpixel-antialiased",
15
+ "transform-gpu cursor-pointer hover:opacity-80",
16
+ ...focusVisibleClasses,
17
+ // shadcn below
18
+ "disabled:pointer-events-none disabled:opacity-50",
19
+ "shrink-0 [&_svg]:shrink-0",
20
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
21
+ "text-sm font-medium"
22
+ ],
23
+ variants: {
24
+ variant: {
25
+ solid: "shadow-xs",
26
+ ghost: "",
27
+ outline: "border-2 bg-transparent",
28
+ link: ""
29
+ // destructive:
30
+ // "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
31
+ // outline:
32
+ // "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
33
+ // secondary:
34
+ // "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
35
+ // ghost:
36
+ // "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
37
+ // link: "text-primary underline-offset-4 hover:underline",
38
+ },
39
+ size: {
40
+ sm: "px-3 min-w-16 h-8 text-xs gap-2 rounded-sm has-[>svg]:px-2.5",
41
+ md: "px-4 min-w-20 h-10 text-sm gap-2 rounded-md has-[>svg]:px-3",
42
+ lg: "px-6 min-w-24 h-12 text-base gap-3 rounded-lg has-[>svg]:px-4"
43
+ },
44
+ color: {
45
+ primary: "",
46
+ secondary: "",
47
+ destructive: "",
48
+ warning: "",
49
+ success: ""
50
+ },
51
+ radius: {},
52
+ fullWidth: {
53
+ true: "w-full"
54
+ },
55
+ isIconOnly: {
56
+ true: "px-0 !gap-0",
57
+ false: "[&>svg]:max-w-[theme(spacing.8)]"
58
+ }
59
+ },
60
+ defaultVariants: {
61
+ size: "md",
62
+ variant: "solid",
63
+ color: "primary",
64
+ fullWidth: false,
65
+ isIconOnly: false
66
+ },
67
+ compoundVariants: [
68
+ // primary color
69
+ {
70
+ variant: "solid",
71
+ color: "primary",
72
+ class: colorVariants.solid.primary
73
+ },
74
+ {
75
+ variant: "solid",
76
+ color: "secondary",
77
+ class: colorVariants.solid.secondary
78
+ },
79
+ {
80
+ variant: "solid",
81
+ color: "destructive",
82
+ class: colorVariants.solid.destructive
83
+ },
84
+ {
85
+ variant: "solid",
86
+ color: "warning",
87
+ class: colorVariants.solid.warning
88
+ },
89
+ {
90
+ variant: "solid",
91
+ color: "success",
92
+ class: colorVariants.solid.success
93
+ },
94
+ // ghost color
95
+ {
96
+ variant: "ghost",
97
+ color: "primary",
98
+ class: colorVariants.ghost.primary
99
+ },
100
+ {
101
+ variant: "ghost",
102
+ color: "secondary",
103
+ class: colorVariants.ghost.secondary
104
+ },
105
+ {
106
+ variant: "ghost",
107
+ color: "destructive",
108
+ class: colorVariants.ghost.destructive
109
+ },
110
+ {
111
+ variant: "ghost",
112
+ color: "warning",
113
+ class: colorVariants.ghost.warning
114
+ },
115
+ {
116
+ variant: "ghost",
117
+ color: "success",
118
+ class: colorVariants.ghost.success
119
+ },
120
+ // outline color
121
+ {
122
+ variant: "outline",
123
+ color: "primary",
124
+ class: colorVariants.outline.primary
125
+ },
126
+ {
127
+ variant: "outline",
128
+ color: "secondary",
129
+ class: colorVariants.outline.secondary
130
+ },
131
+ {
132
+ variant: "outline",
133
+ color: "destructive",
134
+ class: colorVariants.outline.destructive
135
+ },
136
+ {
137
+ variant: "outline",
138
+ color: "warning",
139
+ class: colorVariants.outline.warning
140
+ },
141
+ {
142
+ variant: "outline",
143
+ color: "success",
144
+ class: colorVariants.outline.success
145
+ },
146
+ // icon
147
+ {
148
+ isIconOnly: true,
149
+ size: "sm",
150
+ class: "min-w-8 w-8 h-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5"
151
+ },
152
+ {
153
+ isIconOnly: true,
154
+ size: "md",
155
+ class: "min-w-10 w-10 h-10 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
156
+ },
157
+ {
158
+ isIconOnly: true,
159
+ size: "lg",
160
+ class: "min-w-12 w-12 h-12 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-5"
161
+ }
162
+ ]
163
+ });
164
+
165
+ export {
166
+ button
167
+ };
@@ -0,0 +1,101 @@
1
+ // src/components/page-layout.ts
2
+ import { tv } from "tailwind-variants";
3
+ var pageLayout = tv({
4
+ slots: {
5
+ root: "",
6
+ wrapper: "flex mx-auto flex-wrap",
7
+ baseContent: "flex flex-1 flex-wrap max-w-full",
8
+ header: "w-full",
9
+ footerWrapper: "w-full",
10
+ footerContent: "",
11
+ paneWrapper: [
12
+ "flex w-full mx-auto",
13
+ // order start + mt-6
14
+ "data-[position=start]:flex-col",
15
+ // order? + mb-6
16
+ "data-[position=end]:flex-col-reverse",
17
+ // md+
18
+ "md:w-auto md:mt-0 md:mb-0",
19
+ "md:data-[sticky=true]:sticky md:data-[sticky=true]:top-2 md:data-[sticky=true]:max-h-[calc(100dvh-0.5rem)]",
20
+ "md:data-[position=end]:flex-row-reverse",
21
+ "md:data-[position=start]:flex-row"
22
+ ],
23
+ pane: "w-[var(--pane-width-size)] md:overflow-auto",
24
+ contentWrapper: "flex min-w-px flex-col basis-0 grow shrink",
25
+ content: "w-full mx-auto grow"
26
+ },
27
+ variants: {
28
+ gap: {
29
+ none: "",
30
+ condensed: {
31
+ header: "mb-4",
32
+ footerWrapper: "mt-4",
33
+ paneWrapper: [
34
+ "max-md:data-[position=start]:mb-4 md:data-[position=start]:mr-4",
35
+ "max-md:data-[position=end]:mt-4 md:data-[position=end]:ml-4"
36
+ ]
37
+ },
38
+ normal: {
39
+ header: "mb-4 lg:mb-6",
40
+ footerWrapper: "mt-4 lg:mt-6",
41
+ paneWrapper: [
42
+ "max-md:data-[position=start]:mb-4 md:data-[position=start]:mr-6",
43
+ "max-md:data-[position=end]:mt-4 md:data-[position=end]:ml-6"
44
+ ]
45
+ }
46
+ },
47
+ width: {
48
+ full: {
49
+ wrapper: "max-w-full",
50
+ content: "max-w-full"
51
+ },
52
+ md: {
53
+ wrapper: "max-w-3xl",
54
+ content: "max-w-3xl"
55
+ },
56
+ lg: {
57
+ wrapper: "max-w-5xl"
58
+ },
59
+ xl: {
60
+ wrapper: "max-w-7xl",
61
+ content: "max-w-7xl"
62
+ }
63
+ },
64
+ paneWidth: {
65
+ sm: {
66
+ pane: "w-full md:w-60 lg:w-64"
67
+ },
68
+ md: {
69
+ pane: "w-full md:w-64 lg:w-74"
70
+ },
71
+ lg: {
72
+ pane: "w-full md:w-72 lg:w-80"
73
+ }
74
+ },
75
+ spacing: {
76
+ none: "",
77
+ condensed: {
78
+ header: "p-4",
79
+ content: "p-4",
80
+ pane: "p-4",
81
+ footerContent: "p-4"
82
+ },
83
+ // 1.5rem
84
+ normal: {
85
+ header: "p-4 md:p-6",
86
+ content: "p-4 md:p-6",
87
+ pane: "p-4 md:p-6"
88
+ }
89
+ }
90
+ },
91
+ defaultVariants: {
92
+ width: "xl",
93
+ spacing: "normal",
94
+ paneWidth: "md",
95
+ gap: "normal"
96
+ }
97
+ });
98
+
99
+ export {
100
+ pageLayout
101
+ };
@@ -0,0 +1,11 @@
1
+ // src/utils/classes.ts
2
+ var focusVisibleClasses = [
3
+ "focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2"
4
+ //"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
5
+ ];
6
+ var dataFocusVisibleClasses = ["outline-hidden"];
7
+
8
+ export {
9
+ focusVisibleClasses,
10
+ dataFocusVisibleClasses
11
+ };
@@ -0,0 +1,31 @@
1
+ // src/utils/variants.ts
2
+ var solid = {
3
+ primary: "bg-primary text-primary-foreground",
4
+ secondary: "bg-secondary text-secondary-foreground",
5
+ destructive: "bg-destructive text-destructive-foreground",
6
+ warning: "bg-warning text-warning-foreground",
7
+ success: "bg-success text-success-foreground"
8
+ };
9
+ var outline = {
10
+ primary: "bg-transparent border-primary text-primary",
11
+ secondary: "bg-transparent border-secondary text-secondary",
12
+ destructive: "bg-transparent border-destructive text-destructive",
13
+ warning: "bg-transparent border-warning text-warning",
14
+ success: "bg-transparent border-success text-success"
15
+ };
16
+ var ghost = {
17
+ primary: "bg-transparent text-primary",
18
+ secondary: "bg-transparent text-secondary",
19
+ destructive: "bg-transparent text-destructive",
20
+ warning: "bg-transparent text-warning",
21
+ success: "bg-transparent text-success"
22
+ };
23
+ var colorVariants = {
24
+ solid,
25
+ ghost,
26
+ outline
27
+ };
28
+
29
+ export {
30
+ colorVariants
31
+ };
@@ -11,7 +11,10 @@ var command = tv({
11
11
  group: "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
12
12
  separator: "bg-border -mx-1 h-px",
13
13
  item: "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
14
- shortcut: "text-muted-foreground ml-auto text-xs tracking-widest"
14
+ shortcut: "text-muted-foreground ml-auto text-xs tracking-widest",
15
+ header: "flex flex-col items-start justify-between px-3 py-2 border-b",
16
+ title: "text-sm font-semibold",
17
+ description: "text-xs text-muted-foreground"
15
18
  }
16
19
  });
17
20
 
@@ -1,13 +1,28 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
2
  import { VariantProps } from 'tailwind-variants';
3
3
 
4
+ /**
5
+ * Solid variant
6
+ * Ergebnis: solid button mit farbe im BG und contrast als foreground
7
+ * - default: solid + primary color
8
+ * - Solid can be combined with colors: primary, secondary, destructive, success, warning
9
+ *
10
+ * Ghost variant
11
+ * Ein Button mit transparentem Background und Color im foreground
12
+ * - default: ghost + primary color
13
+ *
14
+ * Outline variant
15
+ * Ein Button mit transparentem Background und Border in der Color
16
+ * - default: outline + primary color
17
+ *
18
+ * Link variant
19
+ * Link ist transparenter button, mit Color.
20
+ */
4
21
  declare const button: tailwind_variants.TVReturnType<{
5
22
  variant: {
6
23
  solid: string;
7
- destructive: string;
8
- outline: string;
9
- secondary: string;
10
24
  ghost: string;
25
+ outline: string;
11
26
  link: string;
12
27
  };
13
28
  size: {
@@ -15,13 +30,26 @@ declare const button: tailwind_variants.TVReturnType<{
15
30
  md: string;
16
31
  lg: string;
17
32
  };
33
+ color: {
34
+ primary: string;
35
+ secondary: string;
36
+ destructive: string;
37
+ warning: string;
38
+ success: string;
39
+ };
40
+ radius: {};
41
+ fullWidth: {
42
+ true: string;
43
+ };
44
+ isIconOnly: {
45
+ true: string;
46
+ false: string;
47
+ };
18
48
  }, undefined, string[], {
19
49
  variant: {
20
50
  solid: string;
21
- destructive: string;
22
- outline: string;
23
- secondary: string;
24
51
  ghost: string;
52
+ outline: string;
25
53
  link: string;
26
54
  };
27
55
  size: {
@@ -29,13 +57,26 @@ declare const button: tailwind_variants.TVReturnType<{
29
57
  md: string;
30
58
  lg: string;
31
59
  };
60
+ color: {
61
+ primary: string;
62
+ secondary: string;
63
+ destructive: string;
64
+ warning: string;
65
+ success: string;
66
+ };
67
+ radius: {};
68
+ fullWidth: {
69
+ true: string;
70
+ };
71
+ isIconOnly: {
72
+ true: string;
73
+ false: string;
74
+ };
32
75
  }, undefined, tailwind_variants.TVReturnType<{
33
76
  variant: {
34
77
  solid: string;
35
- destructive: string;
36
- outline: string;
37
- secondary: string;
38
78
  ghost: string;
79
+ outline: string;
39
80
  link: string;
40
81
  };
41
82
  size: {
@@ -43,6 +84,21 @@ declare const button: tailwind_variants.TVReturnType<{
43
84
  md: string;
44
85
  lg: string;
45
86
  };
87
+ color: {
88
+ primary: string;
89
+ secondary: string;
90
+ destructive: string;
91
+ warning: string;
92
+ success: string;
93
+ };
94
+ radius: {};
95
+ fullWidth: {
96
+ true: string;
97
+ };
98
+ isIconOnly: {
99
+ true: string;
100
+ false: string;
101
+ };
46
102
  }, undefined, string[], unknown, unknown, undefined>>;
47
103
  type ButtonVariantProps = VariantProps<typeof button>;
48
104
 
@@ -1,13 +1,28 @@
1
1
  import * as tailwind_variants from 'tailwind-variants';
2
2
  import { VariantProps } from 'tailwind-variants';
3
3
 
4
+ /**
5
+ * Solid variant
6
+ * Ergebnis: solid button mit farbe im BG und contrast als foreground
7
+ * - default: solid + primary color
8
+ * - Solid can be combined with colors: primary, secondary, destructive, success, warning
9
+ *
10
+ * Ghost variant
11
+ * Ein Button mit transparentem Background und Color im foreground
12
+ * - default: ghost + primary color
13
+ *
14
+ * Outline variant
15
+ * Ein Button mit transparentem Background und Border in der Color
16
+ * - default: outline + primary color
17
+ *
18
+ * Link variant
19
+ * Link ist transparenter button, mit Color.
20
+ */
4
21
  declare const button: tailwind_variants.TVReturnType<{
5
22
  variant: {
6
23
  solid: string;
7
- destructive: string;
8
- outline: string;
9
- secondary: string;
10
24
  ghost: string;
25
+ outline: string;
11
26
  link: string;
12
27
  };
13
28
  size: {
@@ -15,13 +30,26 @@ declare const button: tailwind_variants.TVReturnType<{
15
30
  md: string;
16
31
  lg: string;
17
32
  };
33
+ color: {
34
+ primary: string;
35
+ secondary: string;
36
+ destructive: string;
37
+ warning: string;
38
+ success: string;
39
+ };
40
+ radius: {};
41
+ fullWidth: {
42
+ true: string;
43
+ };
44
+ isIconOnly: {
45
+ true: string;
46
+ false: string;
47
+ };
18
48
  }, undefined, string[], {
19
49
  variant: {
20
50
  solid: string;
21
- destructive: string;
22
- outline: string;
23
- secondary: string;
24
51
  ghost: string;
52
+ outline: string;
25
53
  link: string;
26
54
  };
27
55
  size: {
@@ -29,13 +57,26 @@ declare const button: tailwind_variants.TVReturnType<{
29
57
  md: string;
30
58
  lg: string;
31
59
  };
60
+ color: {
61
+ primary: string;
62
+ secondary: string;
63
+ destructive: string;
64
+ warning: string;
65
+ success: string;
66
+ };
67
+ radius: {};
68
+ fullWidth: {
69
+ true: string;
70
+ };
71
+ isIconOnly: {
72
+ true: string;
73
+ false: string;
74
+ };
32
75
  }, undefined, tailwind_variants.TVReturnType<{
33
76
  variant: {
34
77
  solid: string;
35
- destructive: string;
36
- outline: string;
37
- secondary: string;
38
78
  ghost: string;
79
+ outline: string;
39
80
  link: string;
40
81
  };
41
82
  size: {
@@ -43,6 +84,21 @@ declare const button: tailwind_variants.TVReturnType<{
43
84
  md: string;
44
85
  lg: string;
45
86
  };
87
+ color: {
88
+ primary: string;
89
+ secondary: string;
90
+ destructive: string;
91
+ warning: string;
92
+ success: string;
93
+ };
94
+ radius: {};
95
+ fullWidth: {
96
+ true: string;
97
+ };
98
+ isIconOnly: {
99
+ true: string;
100
+ false: string;
101
+ };
46
102
  }, undefined, string[], unknown, unknown, undefined>>;
47
103
  type ButtonVariantProps = VariantProps<typeof button>;
48
104