@kungal/ui-core 0.2.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/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # @kungal/ui-core
2
+
3
+ The **framework-agnostic foundation** every KunUI render layer is built
4
+ on. Pure TypeScript — no Vue, no React, no DOM coupling. Ships dual
5
+ ESM/CJS with type declarations.
6
+
7
+ ## What's here
8
+
9
+ | Export | Purpose |
10
+ | --- | --- |
11
+ | `KunUIVariant`, `KunUIColor`, `KunUISize`, `KunUIRounded` | the design-system type vocabulary |
12
+ | `cn(...inputs)` | clsx + tailwind-merge class merge ("last class wins") |
13
+ | `kunVariantClasses(variant, color)` | the 7×7 variant × color → Tailwind class matrix |
14
+ | `kunBgClasses` / `kunTextClasses` / `kunBorderClasses` / `kunRingClasses` / `kunSoftBgClasses` | per-color static class maps |
15
+ | `kunRoundedClasses` | radius bucket → `rounded-kun-*` class map |
16
+ | `resolveRounded(prop, fallback, configDefault)` | pure precedence resolver (prop > built-in > provider) |
17
+ | `KUN_DEFAULT_ROUNDED` | global radius default (`'md'`) |
18
+ | `getKunIcon` / `hasKunIcon` / `registerKunIcon(s)` / `KunIconData` | bundled icon registry (inline SVG, no runtime fetch) seeded with KunUI's own icons; consumers register more |
19
+ | `randomNum`, `decodeIfEncoded` | small pure helpers |
20
+
21
+ > Icon data is generated from `@iconify-json/*` (devDependencies) into
22
+ > `src/icons-data.ts` by `scripts/gen-icons.mjs` — run `pnpm gen:icons` after
23
+ > adding a name. The generated literal ships; the `@iconify-json` packages do
24
+ > not.
25
+
26
+ ## Why a separate package
27
+
28
+ The same class tables and resolution logic must produce **byte-identical
29
+ output** in the Vue layer and the React layer. Keeping them here means a
30
+ color tweak or a new variant is one edit, not one-per-framework — and
31
+ because there is zero framework code, neither framework drags the other
32
+ in.
33
+
34
+ Reactive wrappers belong in the render layers, e.g.:
35
+
36
+ ```ts
37
+ // Vue
38
+ const rounded = computed(() => resolveRounded(props.rounded, 'lg', cfg.rounded))
39
+ // React
40
+ const rounded = useMemo(() => resolveRounded(rounded, 'lg', cfg.rounded), [rounded, cfg.rounded])
41
+ ```
42
+
43
+ ## Build
44
+
45
+ ```bash
46
+ pnpm --filter @kungal/ui-core build # tsup → dist (esm + cjs + d.ts)
47
+ pnpm --filter @kungal/ui-core typecheck
48
+ ```
package/dist/index.cjs ADDED
@@ -0,0 +1,223 @@
1
+ 'use strict';
2
+
3
+ var clsx = require('clsx');
4
+ var tailwindMerge = require('tailwind-merge');
5
+
6
+ // src/cn.ts
7
+ var cn = (...inputs) => tailwindMerge.twMerge(clsx.clsx(inputs));
8
+
9
+ // src/variants.ts
10
+ var TABLE = {
11
+ solid: {
12
+ default: "bg-default text-white",
13
+ primary: "bg-primary text-white",
14
+ secondary: "bg-secondary text-white",
15
+ success: "bg-success-600 text-white dark:bg-success-300",
16
+ warning: "bg-warning text-white",
17
+ danger: "bg-danger text-white",
18
+ info: "bg-info-600 text-white"
19
+ },
20
+ bordered: {
21
+ default: "bg-transparent border-default",
22
+ primary: "bg-transparent border-primary text-primary",
23
+ secondary: "bg-transparent border-secondary text-secondary",
24
+ success: "bg-transparent border-success text-success",
25
+ warning: "bg-transparent border-warning text-warning",
26
+ danger: "bg-transparent border-danger text-danger",
27
+ info: "bg-transparent border-info text-info"
28
+ },
29
+ light: {
30
+ default: "bg-transparent hover:bg-default/20",
31
+ primary: "bg-transparent text-primary hover:bg-primary/20",
32
+ secondary: "bg-transparent text-secondary hover:bg-secondary/20",
33
+ success: "bg-transparent text-success hover:bg-success/20",
34
+ warning: "bg-transparent text-warning hover:bg-warning/20",
35
+ danger: "bg-transparent text-danger hover:bg-danger/20",
36
+ info: "bg-transparent text-info hover:bg-info/20"
37
+ },
38
+ flat: {
39
+ default: "bg-default/20 text-default-700 border-transparent",
40
+ primary: "bg-primary/20 text-primary-600 border-transparent",
41
+ secondary: "bg-secondary/20 text-secondary-600 border-transparent",
42
+ success: "bg-success/20 text-success-700 border-transparent dark:text-success",
43
+ warning: "bg-warning/20 text-warning-700 border-transparent dark:text-warning",
44
+ danger: "bg-danger/20 text-danger-600 border-transparent dark:text-danger-500",
45
+ info: "bg-info/20 text-info-700 border-transparent dark:text-info-500"
46
+ },
47
+ faded: {
48
+ default: "border-default bg-default-100",
49
+ primary: "border-default bg-primary-100 text-primary",
50
+ secondary: "border-default bg-secondary-100 text-secondary",
51
+ success: "border-default bg-success-100 text-success",
52
+ warning: "border-default bg-warning-100 text-warning",
53
+ danger: "border-default bg-danger-100 text-danger",
54
+ info: "border-default bg-info-100 text-info"
55
+ },
56
+ shadow: {
57
+ default: "shadow-default/40 bg-default text-white",
58
+ primary: "shadow-primary/40 bg-primary text-white",
59
+ secondary: "shadow-secondary/40 bg-secondary text-white",
60
+ success: "shadow-success/40 bg-success-600 text-white",
61
+ warning: "shadow-warning/40 bg-warning text-white",
62
+ danger: "shadow-danger/40 bg-danger text-white",
63
+ info: "shadow-info/40 bg-info-600 text-white"
64
+ },
65
+ ghost: {
66
+ default: "bg-transparent border-default hover:bg-default/10",
67
+ primary: "bg-transparent border-primary text-primary hover:bg-primary/10",
68
+ secondary: "bg-transparent border-secondary text-secondary hover:bg-secondary/10",
69
+ success: "bg-transparent border-success text-success hover:bg-success/10",
70
+ warning: "bg-transparent border-warning text-warning hover:bg-warning/10",
71
+ danger: "bg-transparent border-danger text-danger hover:bg-danger/10",
72
+ info: "bg-transparent border-info text-info hover:bg-info/10"
73
+ }
74
+ };
75
+ var kunVariantClasses = (variant, color) => TABLE[variant][color];
76
+ var kunBgClasses = {
77
+ default: "bg-default",
78
+ primary: "bg-primary",
79
+ secondary: "bg-secondary",
80
+ success: "bg-success",
81
+ warning: "bg-warning",
82
+ danger: "bg-danger",
83
+ info: "bg-info"
84
+ };
85
+ var kunTextClasses = {
86
+ default: "text-foreground",
87
+ primary: "text-primary",
88
+ secondary: "text-secondary",
89
+ success: "text-success",
90
+ warning: "text-warning",
91
+ danger: "text-danger",
92
+ info: "text-info"
93
+ };
94
+ var kunBorderClasses = {
95
+ default: "border-default",
96
+ primary: "border-primary",
97
+ secondary: "border-secondary",
98
+ success: "border-success",
99
+ warning: "border-warning",
100
+ danger: "border-danger",
101
+ info: "border-info"
102
+ };
103
+ var kunRingClasses = {
104
+ default: "focus-within:ring-default/40 focus:ring-default/40",
105
+ primary: "focus-within:ring-primary/40 focus:ring-primary/40",
106
+ secondary: "focus-within:ring-secondary/40 focus:ring-secondary/40",
107
+ success: "focus-within:ring-success/40 focus:ring-success/40",
108
+ warning: "focus-within:ring-warning/40 focus:ring-warning/40",
109
+ danger: "focus-within:ring-danger/40 focus:ring-danger/40",
110
+ info: "focus-within:ring-info/40 focus:ring-info/40"
111
+ };
112
+ var kunSoftBgClasses = {
113
+ default: "bg-default/5",
114
+ primary: "bg-primary/5",
115
+ secondary: "bg-secondary/5",
116
+ success: "bg-success/5",
117
+ warning: "bg-warning/5",
118
+ danger: "bg-danger/5",
119
+ info: "bg-info/5"
120
+ };
121
+
122
+ // src/rounded.ts
123
+ var kunRoundedClasses = {
124
+ none: "rounded-kun-none",
125
+ sm: "rounded-kun-sm",
126
+ md: "rounded-kun-md",
127
+ lg: "rounded-kun-lg",
128
+ full: "rounded-kun-full"
129
+ };
130
+ var KUN_DEFAULT_ROUNDED = "md";
131
+ var resolveRounded = (prop, fallback, configDefault = KUN_DEFAULT_ROUNDED) => prop ?? fallback ?? configDefault;
132
+
133
+ // src/random.ts
134
+ var randomNum = (lowerValue, upperValue) => Math.floor(Math.random() * (upperValue - lowerValue + 1) + lowerValue);
135
+
136
+ // src/decodeIfEncoded.ts
137
+ var decodeIfEncoded = (text) => {
138
+ try {
139
+ const decoded = decodeURIComponent(text);
140
+ return decoded !== text ? decoded : text;
141
+ } catch {
142
+ return text;
143
+ }
144
+ };
145
+
146
+ // src/getRandomSticker.ts
147
+ var KUN_STICKER_DOMAIN = "https://sticker.kungal.com";
148
+ var PACKS = 5;
149
+ var PER_PACK = 80;
150
+ var hash = (s) => {
151
+ let h = 0;
152
+ for (let i = 0; i < s.length; i++) {
153
+ h = Math.imul(h, 31) + s.charCodeAt(i) >>> 0;
154
+ }
155
+ return h;
156
+ };
157
+ var getRandomSticker = (id = "") => {
158
+ const h = hash(id);
159
+ const pack = h % PACKS + 1;
160
+ const sticker = Math.floor(h / PACKS) % PER_PACK + 1;
161
+ return `${KUN_STICKER_DOMAIN}/stickers/KUNgal${pack}/${sticker}.webp`;
162
+ };
163
+
164
+ // src/icons-data.ts
165
+ var KUN_BUNDLED_ICONS = {
166
+ "lucide:x": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/>' },
167
+ "lucide:check": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 6L9 17l-5-5"/>' },
168
+ "lucide:info": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4m0-4h.01"/></g>' },
169
+ "lucide:circle-check": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m9 12l2 2l4-4"/></g>' },
170
+ "lucide:circle-x": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m15 9l-6 6m0-6l6 6"/></g>' },
171
+ "lucide:triangle-alert": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01"/>' },
172
+ "lucide:chevron-right": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"/>' },
173
+ "lucide:chevron-left": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 18l-6-6l6-6"/>' },
174
+ "lucide:chevron-down": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9l6 6l6-6"/>' },
175
+ "lucide:chevrons-right": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 17l5-5l-5-5m7 10l5-5l-5-5"/>' },
176
+ "lucide:chevrons-left": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m11 17l-5-5l5-5m7 10l-5-5l5-5"/>' },
177
+ "lucide:arrow-right": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7-7l7 7l-7 7"/>' },
178
+ "lucide:arrow-left": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m12 19l-7-7l7-7m7 7H5"/>' },
179
+ "lucide:plus": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7-7v14"/>' },
180
+ "lucide:upload": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>' },
181
+ "lucide:zoom-in": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21l-4.35-4.35M11 8v6m-3-3h6"/></g>' },
182
+ "lucide:zoom-out": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21l-4.35-4.35M8 11h6"/></g>' },
183
+ "lucide:rotate-cw": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></g>' },
184
+ "lucide:rotate-ccw": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></g>' },
185
+ "lucide:refresh-ccw": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21 12a9 9 0 0 0-9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5m-5 4a9 9 0 0 0 9 9a9.75 9.75 0 0 0 6.74-2.74L21 16"/><path d="M16 16h5v5"/></g>' },
186
+ "lucide:external-link": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>' },
187
+ "lucide:download": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10l5 5l5-5"/></g>' },
188
+ "lucide:copy": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></g>' },
189
+ "lucide:calendar": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M8 2v4m8-4v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/></g>' },
190
+ "lucide:lollipop": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21l-4.3-4.3M11 11a2 2 0 0 0 4 0a4 4 0 0 0-8 0a6 6 0 0 0 12 0"/></g>' },
191
+ "svg-spinners:90-ring-with-bg": { "body": '<path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="currentColor" d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path>' }
192
+ };
193
+
194
+ // src/icons.ts
195
+ var registry = new Map(Object.entries(KUN_BUNDLED_ICONS));
196
+ var registerKunIcon = (name, data) => {
197
+ registry.set(name, data);
198
+ };
199
+ var registerKunIcons = (icons) => {
200
+ for (const [name, data] of Object.entries(icons)) registry.set(name, data);
201
+ };
202
+ var getKunIcon = (name) => registry.get(name);
203
+ var hasKunIcon = (name) => registry.has(name);
204
+
205
+ exports.KUN_DEFAULT_ROUNDED = KUN_DEFAULT_ROUNDED;
206
+ exports.cn = cn;
207
+ exports.decodeIfEncoded = decodeIfEncoded;
208
+ exports.getKunIcon = getKunIcon;
209
+ exports.getRandomSticker = getRandomSticker;
210
+ exports.hasKunIcon = hasKunIcon;
211
+ exports.kunBgClasses = kunBgClasses;
212
+ exports.kunBorderClasses = kunBorderClasses;
213
+ exports.kunRingClasses = kunRingClasses;
214
+ exports.kunRoundedClasses = kunRoundedClasses;
215
+ exports.kunSoftBgClasses = kunSoftBgClasses;
216
+ exports.kunTextClasses = kunTextClasses;
217
+ exports.kunVariantClasses = kunVariantClasses;
218
+ exports.randomNum = randomNum;
219
+ exports.registerKunIcon = registerKunIcon;
220
+ exports.registerKunIcons = registerKunIcons;
221
+ exports.resolveRounded = resolveRounded;
222
+ //# sourceMappingURL=index.cjs.map
223
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cn.ts","../src/variants.ts","../src/rounded.ts","../src/random.ts","../src/decodeIfEncoded.ts","../src/getRandomSticker.ts","../src/icons-data.ts","../src/icons.ts"],"names":["twMerge","clsx"],"mappings":";;;;;;AAMO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiCA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC;;;ACE3E,IAAM,KAAA,GAA0D;AAAA,EAC9D,KAAA,EAAO;AAAA,IACL,OAAA,EAAS,uBAAA;AAAA,IACT,OAAA,EAAS,uBAAA;AAAA,IACT,SAAA,EAAW,yBAAA;AAAA,IACX,OAAA,EAAS,+CAAA;AAAA,IACT,OAAA,EAAS,uBAAA;AAAA,IACT,MAAA,EAAQ,sBAAA;AAAA,IACR,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAA,EAAS,+BAAA;AAAA,IACT,OAAA,EAAS,4CAAA;AAAA,IACT,SAAA,EAAW,gDAAA;AAAA,IACX,OAAA,EAAS,4CAAA;AAAA,IACT,OAAA,EAAS,4CAAA;AAAA,IACT,MAAA,EAAQ,0CAAA;AAAA,IACR,IAAA,EAAM;AAAA,GACR;AAAA,EACA,KAAA,EAAO;AAAA,IACL,OAAA,EAAS,oCAAA;AAAA,IACT,OAAA,EAAS,iDAAA;AAAA,IACT,SAAA,EAAW,qDAAA;AAAA,IACX,OAAA,EAAS,iDAAA;AAAA,IACT,OAAA,EAAS,iDAAA;AAAA,IACT,MAAA,EAAQ,+CAAA;AAAA,IACR,IAAA,EAAM;AAAA,GACR;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS,mDAAA;AAAA,IACT,OAAA,EAAS,mDAAA;AAAA,IACT,SAAA,EAAW,uDAAA;AA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,EAAC,MAAA,EAAO,sOAAA,EAA8P;AAAA,EACrR,iBAAA,EAAmB,EAAC,MAAA,EAAO,wMAAA,EAAgO;AAAA,EAC3P,iBAAA,EAAmB,EAAC,MAAA,EAAO,sNAAA,EAAwO;AAAA,EACnQ,8BAAA,EAAgC,EAAC,MAAA,EAAO,wbAAA;AAC1C,CAAA;;;ACnBA,IAAM,WAAW,IAAI,GAAA,CAAyB,MAAA,CAAO,OAAA,CAAQ,iBAAiB,CAAC,CAAA;AAExE,IAAM,eAAA,GAAkB,CAAC,IAAA,EAAc,IAAA,KAA4B;AACxE,EAAA,QAAA,CAAS,GAAA,CAAI,MAAM,IAAI,CAAA;AACzB;AAIO,IAAM,gBAAA,GAAmB,CAC9B,KAAA,KACS;AACT,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,IAAI,CAAA,IAAK,MAAA,CAAO,OAAA,CAAQ,KAAK,CAAA,EAAG,QAAA,CAAS,GAAA,CAAI,IAAA,EAAM,IAAI,CAAA;AAC3E;AAEO,IAAM,UAAA,GAAa,CAAC,IAAA,KACzB,QAAA,CAAS,IAAI,IAAI;AAEZ,IAAM,UAAA,GAAa,CAAC,IAAA,KAA0B,QAAA,CAAS,IAAI,IAAI","file":"index.cjs","sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\n// Merge Tailwind class names with conflict resolution. Framework-agnostic:\n// the Vue and React layers both import this so \"last class wins\" semantics\n// are identical everywhere.\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs))\n\nexport type { ClassValue }\n","import type { KunUIVariant, KunUIColor } from './types'\n\n// Single source of truth for the variant × color → Tailwind class table.\n// Button / Badge / Chip / Tab / Info / Progress etc. (in every framework\n// layer) consume this so the 7 × 7 matrix lives in exactly one place.\n//\n// All keys MUST be static string literals so the Tailwind JIT picks them\n// up — never construct class names with template strings at runtime.\nconst TABLE: Record<KunUIVariant, Record<KunUIColor, string>> = {\n solid: {\n default: 'bg-default text-white',\n primary: 'bg-primary text-white',\n secondary: 'bg-secondary text-white',\n success: 'bg-success-600 text-white dark:bg-success-300',\n warning: 'bg-warning text-white',\n danger: 'bg-danger text-white',\n info: 'bg-info-600 text-white',\n },\n bordered: {\n default: 'bg-transparent border-default',\n primary: 'bg-transparent border-primary text-primary',\n secondary: 'bg-transparent border-secondary text-secondary',\n success: 'bg-transparent border-success text-success',\n warning: 'bg-transparent border-warning text-warning',\n danger: 'bg-transparent border-danger text-danger',\n info: 'bg-transparent border-info text-info',\n },\n light: {\n default: 'bg-transparent hover:bg-default/20',\n primary: 'bg-transparent text-primary hover:bg-primary/20',\n secondary: 'bg-transparent text-secondary hover:bg-secondary/20',\n success: 'bg-transparent text-success hover:bg-success/20',\n warning: 'bg-transparent text-warning hover:bg-warning/20',\n danger: 'bg-transparent text-danger hover:bg-danger/20',\n info: 'bg-transparent text-info hover:bg-info/20',\n },\n flat: {\n default: 'bg-default/20 text-default-700 border-transparent',\n primary: 'bg-primary/20 text-primary-600 border-transparent',\n secondary: 'bg-secondary/20 text-secondary-600 border-transparent',\n success: 'bg-success/20 text-success-700 border-transparent dark:text-success',\n warning: 'bg-warning/20 text-warning-700 border-transparent dark:text-warning',\n danger: 'bg-danger/20 text-danger-600 border-transparent dark:text-danger-500',\n info: 'bg-info/20 text-info-700 border-transparent dark:text-info-500',\n },\n faded: {\n default: 'border-default bg-default-100',\n primary: 'border-default bg-primary-100 text-primary',\n secondary: 'border-default bg-secondary-100 text-secondary',\n success: 'border-default bg-success-100 text-success',\n warning: 'border-default bg-warning-100 text-warning',\n danger: 'border-default bg-danger-100 text-danger',\n info: 'border-default bg-info-100 text-info',\n },\n shadow: {\n default: 'shadow-default/40 bg-default text-white',\n primary: 'shadow-primary/40 bg-primary text-white',\n secondary: 'shadow-secondary/40 bg-secondary text-white',\n success: 'shadow-success/40 bg-success-600 text-white',\n warning: 'shadow-warning/40 bg-warning text-white',\n danger: 'shadow-danger/40 bg-danger text-white',\n info: 'shadow-info/40 bg-info-600 text-white',\n },\n ghost: {\n default: 'bg-transparent border-default hover:bg-default/10',\n primary: 'bg-transparent border-primary text-primary hover:bg-primary/10',\n secondary: 'bg-transparent border-secondary text-secondary hover:bg-secondary/10',\n success: 'bg-transparent border-success text-success hover:bg-success/10',\n warning: 'bg-transparent border-warning text-warning hover:bg-warning/10',\n danger: 'bg-transparent border-danger text-danger hover:bg-danger/10',\n info: 'bg-transparent border-info text-info hover:bg-info/10',\n },\n}\n\nexport const kunVariantClasses = (\n variant: KunUIVariant,\n color: KunUIColor\n): string => TABLE[variant][color]\n\n// Static maps for narrower use cases (just the fill color, just the text\n// color, etc.) — same JIT-safety requirement: keys must be literals.\n\nexport const kunBgClasses: Record<KunUIColor, string> = {\n default: 'bg-default',\n primary: 'bg-primary',\n secondary: 'bg-secondary',\n success: 'bg-success',\n warning: 'bg-warning',\n danger: 'bg-danger',\n info: 'bg-info',\n}\n\nexport const kunTextClasses: Record<KunUIColor, string> = {\n default: 'text-foreground',\n primary: 'text-primary',\n secondary: 'text-secondary',\n success: 'text-success',\n warning: 'text-warning',\n danger: 'text-danger',\n info: 'text-info',\n}\n\nexport const kunBorderClasses: Record<KunUIColor, string> = {\n default: 'border-default',\n primary: 'border-primary',\n secondary: 'border-secondary',\n success: 'border-success',\n warning: 'border-warning',\n danger: 'border-danger',\n info: 'border-info',\n}\n\nexport const kunRingClasses: Record<KunUIColor, string> = {\n default: 'focus-within:ring-default/40 focus:ring-default/40',\n primary: 'focus-within:ring-primary/40 focus:ring-primary/40',\n secondary: 'focus-within:ring-secondary/40 focus:ring-secondary/40',\n success: 'focus-within:ring-success/40 focus:ring-success/40',\n warning: 'focus-within:ring-warning/40 focus:ring-warning/40',\n danger: 'focus-within:ring-danger/40 focus:ring-danger/40',\n info: 'focus-within:ring-info/40 focus:ring-info/40',\n}\n\n// Very light tint of the semantic color — \"selected card\" backgrounds in\n// RadioGroup and any \"barely there\" colored fill. Keys are static literals.\nexport const kunSoftBgClasses: Record<KunUIColor, string> = {\n default: 'bg-default/5',\n primary: 'bg-primary/5',\n secondary: 'bg-secondary/5',\n success: 'bg-success/5',\n warning: 'bg-warning/5',\n danger: 'bg-danger/5',\n info: 'bg-info/5',\n}\n","import type { KunUIRounded } from './types'\n\n// Static class map for the 5-bucket Kun radius system. All keys are literal\n// strings so the Tailwind JIT picks them up — the `rounded-kun-*` utilities\n// come from the --radius-kun-* tokens shipped by @kungal/ui-tokens.\nexport const kunRoundedClasses: Record<KunUIRounded, string> = {\n none: 'rounded-kun-none',\n sm: 'rounded-kun-sm',\n md: 'rounded-kun-md',\n lg: 'rounded-kun-lg',\n full: 'rounded-kun-full',\n}\n\n// Global default radius bucket (matches the source layer's behaviour where\n// the un-configured fallback is 'md'). A render layer's config provider may\n// override this per subtree.\nexport const KUN_DEFAULT_ROUNDED: KunUIRounded = 'md'\n\n// Pure precedence resolver for a component's effective radius:\n// prop > component built-in fallback > app/provider default\n//\n// This is the framework-agnostic core of the original Vue\n// `useResolvedRounded` composable. Each render layer wraps it in its own\n// reactivity primitive:\n// Vue: computed(() => resolveRounded(props.rounded, fallback, cfg.rounded))\n// React: useMemo(() => resolveRounded(rounded, fallback, cfg.rounded), [...])\nexport const resolveRounded = (\n prop: KunUIRounded | undefined,\n fallback: KunUIRounded | undefined,\n configDefault: KunUIRounded = KUN_DEFAULT_ROUNDED\n): KunUIRounded => prop ?? fallback ?? configDefault\n","// Generate a random integer within an inclusive [lower, upper] range.\nexport const randomNum = (lowerValue: number, upperValue: number): number =>\n Math.floor(Math.random() * (upperValue - lowerValue + 1) + lowerValue)\n","// Decode a possibly percent-encoded string, returning the original when it\n// is not encoded (or when decoding throws on malformed input).\nexport const decodeIfEncoded = (text: string): string => {\n try {\n const decoded = decodeURIComponent(text)\n return decoded !== text ? decoded : text\n } catch {\n return text\n }\n}\n","// Deterministic sticker picker for fallback/empty states (avatars without\n// an image, KunNull's empty illustration, etc.).\n//\n// The original was random-per-call + Nuxt `useState` to freeze the pick\n// across SSR hydration. This version derives the URL deterministically from\n// the `id` (a cheap string hash) instead: the same id always yields the same\n// sticker on both server and client, so there is no hydration mismatch and\n// no framework state needed — fully portable.\n//\n// The CDN is the KunUI sticker host; consumers don't need to ship assets.\n\nconst KUN_STICKER_DOMAIN = 'https://sticker.kungal.com'\nconst PACKS = 5\nconst PER_PACK = 80\n\nconst hash = (s: string): number => {\n let h = 0\n for (let i = 0; i < s.length; i++) {\n h = (Math.imul(h, 31) + s.charCodeAt(i)) >>> 0\n }\n return h\n}\n\nexport const getRandomSticker = (id = ''): string => {\n const h = hash(id)\n const pack = (h % PACKS) + 1\n const sticker = (Math.floor(h / PACKS) % PER_PACK) + 1\n return `${KUN_STICKER_DOMAIN}/stickers/KUNgal${pack}/${sticker}.webp`\n}\n","// AUTO-GENERATED by scripts/gen-icons.mjs — do not edit by hand.\n// Regenerate: pnpm --filter @kungal/ui-core gen:icons\nimport type { KunIconData } from './icons'\n\n// SVG data for the icons KunUI components render, bundled inline so the\n// library never fetches an icon at runtime. Bodies use currentColor.\nexport const KUN_BUNDLED_ICONS: Record<string, KunIconData> = {\n \"lucide:x\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M18 6L6 18M6 6l12 12\\\"/>\"},\n \"lucide:check\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M20 6L9 17l-5-5\\\"/>\"},\n \"lucide:info\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\"/><path d=\\\"M12 16v-4m0-4h.01\\\"/></g>\"},\n \"lucide:circle-check\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\"/><path d=\\\"m9 12l2 2l4-4\\\"/></g>\"},\n \"lucide:circle-x\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\"/><path d=\\\"m15 9l-6 6m0-6l6 6\\\"/></g>\"},\n \"lucide:triangle-alert\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01\\\"/>\"},\n \"lucide:chevron-right\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m9 18l6-6l-6-6\\\"/>\"},\n \"lucide:chevron-left\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m15 18l-6-6l6-6\\\"/>\"},\n \"lucide:chevron-down\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m6 9l6 6l6-6\\\"/>\"},\n \"lucide:chevrons-right\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m6 17l5-5l-5-5m7 10l5-5l-5-5\\\"/>\"},\n \"lucide:chevrons-left\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m11 17l-5-5l5-5m7 10l-5-5l5-5\\\"/>\"},\n \"lucide:arrow-right\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M5 12h14m-7-7l7 7l-7 7\\\"/>\"},\n \"lucide:arrow-left\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"m12 19l-7-7l7-7m7 7H5\\\"/>\"},\n \"lucide:plus\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M5 12h14m-7-7v14\\\"/>\"},\n \"lucide:upload\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\\\"/>\"},\n \"lucide:zoom-in\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><circle cx=\\\"11\\\" cy=\\\"11\\\" r=\\\"8\\\"/><path d=\\\"m21 21l-4.35-4.35M11 8v6m-3-3h6\\\"/></g>\"},\n \"lucide:zoom-out\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><circle cx=\\\"11\\\" cy=\\\"11\\\" r=\\\"8\\\"/><path d=\\\"m21 21l-4.35-4.35M8 11h6\\\"/></g>\"},\n \"lucide:rotate-cw\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\\\"/><path d=\\\"M21 3v5h-5\\\"/></g>\"},\n \"lucide:rotate-ccw\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8\\\"/><path d=\\\"M3 3v5h5\\\"/></g>\"},\n \"lucide:refresh-ccw\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M21 12a9 9 0 0 0-9-9a9.75 9.75 0 0 0-6.74 2.74L3 8\\\"/><path d=\\\"M3 3v5h5m-5 4a9 9 0 0 0 9 9a9.75 9.75 0 0 0 6.74-2.74L21 16\\\"/><path d=\\\"M16 16h5v5\\\"/></g>\"},\n \"lucide:external-link\": {\"body\":\"<path fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\" d=\\\"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\\\"/>\"},\n \"lucide:download\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\\\"/><path d=\\\"m7 10l5 5l5-5\\\"/></g>\"},\n \"lucide:copy\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><rect width=\\\"14\\\" height=\\\"14\\\" x=\\\"8\\\" y=\\\"8\\\" rx=\\\"2\\\" ry=\\\"2\\\"/><path d=\\\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\\\"/></g>\"},\n \"lucide:calendar\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><path d=\\\"M8 2v4m8-4v4\\\"/><rect width=\\\"18\\\" height=\\\"18\\\" x=\\\"3\\\" y=\\\"4\\\" rx=\\\"2\\\"/><path d=\\\"M3 10h18\\\"/></g>\"},\n \"lucide:lollipop\": {\"body\":\"<g fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-linecap=\\\"round\\\" stroke-linejoin=\\\"round\\\" stroke-width=\\\"2\\\"><circle cx=\\\"11\\\" cy=\\\"11\\\" r=\\\"8\\\"/><path d=\\\"m21 21l-4.3-4.3M11 11a2 2 0 0 0 4 0a4 4 0 0 0-8 0a6 6 0 0 0 12 0\\\"/></g>\"},\n \"svg-spinners:90-ring-with-bg\": {\"body\":\"<path fill=\\\"currentColor\\\" d=\\\"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z\\\" opacity=\\\".25\\\"/><path fill=\\\"currentColor\\\" d=\\\"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z\\\"><animateTransform attributeName=\\\"transform\\\" dur=\\\"0.75s\\\" repeatCount=\\\"indefinite\\\" type=\\\"rotate\\\" values=\\\"0 12 12;360 12 12\\\"/></path>\"},\n}\n","import { KUN_BUNDLED_ICONS } from './icons-data'\n\n// Iconify-compatible icon shape: `body` is the inner SVG markup (using\n// `currentColor`), rendered into a `0 0 width height` viewBox (default 24).\nexport interface KunIconData {\n body: string\n width?: number\n height?: number\n}\n\n// The registry is SEEDED with KunUI's bundled internal icons (referenced via\n// the data import, so it is never tree-shaken away — no side-effect needed).\n// Consumers add their own icons with registerKunIcon(s). KunIcon renders from\n// this registry and NEVER fetches from a network/API.\nconst registry = new Map<string, KunIconData>(Object.entries(KUN_BUNDLED_ICONS))\n\nexport const registerKunIcon = (name: string, data: KunIconData): void => {\n registry.set(name, data)\n}\n\n// Bulk register — pass a Record<name, data>, e.g. icons extracted from\n// `@iconify-json/*` at build time, or your own custom SVGs.\nexport const registerKunIcons = (\n icons: Record<string, KunIconData>\n): void => {\n for (const [name, data] of Object.entries(icons)) registry.set(name, data)\n}\n\nexport const getKunIcon = (name: string): KunIconData | undefined =>\n registry.get(name)\n\nexport const hasKunIcon = (name: string): boolean => registry.has(name)\n"]}
@@ -0,0 +1,44 @@
1
+ import { ClassValue } from 'clsx';
2
+ export { ClassValue } from 'clsx';
3
+
4
+ type KunUIVariant = 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'shadow' | 'ghost';
5
+ type KunUIColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
6
+ type KunUISize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ type KunUIRounded = 'none' | 'sm' | 'md' | 'lg' | 'full';
8
+
9
+ declare const cn: (...inputs: ClassValue[]) => string;
10
+
11
+ declare const kunVariantClasses: (variant: KunUIVariant, color: KunUIColor) => string;
12
+ declare const kunBgClasses: Record<KunUIColor, string>;
13
+ declare const kunTextClasses: Record<KunUIColor, string>;
14
+ declare const kunBorderClasses: Record<KunUIColor, string>;
15
+ declare const kunRingClasses: Record<KunUIColor, string>;
16
+ declare const kunSoftBgClasses: Record<KunUIColor, string>;
17
+
18
+ declare const kunRoundedClasses: Record<KunUIRounded, string>;
19
+ declare const KUN_DEFAULT_ROUNDED: KunUIRounded;
20
+ declare const resolveRounded: (prop: KunUIRounded | undefined, fallback: KunUIRounded | undefined, configDefault?: KunUIRounded) => KunUIRounded;
21
+
22
+ declare const randomNum: (lowerValue: number, upperValue: number) => number;
23
+
24
+ declare const decodeIfEncoded: (text: string) => string;
25
+
26
+ declare const getRandomSticker: (id?: string) => string;
27
+
28
+ interface KunUser {
29
+ id: number;
30
+ name: string;
31
+ avatar: string;
32
+ }
33
+
34
+ interface KunIconData {
35
+ body: string;
36
+ width?: number;
37
+ height?: number;
38
+ }
39
+ declare const registerKunIcon: (name: string, data: KunIconData) => void;
40
+ declare const registerKunIcons: (icons: Record<string, KunIconData>) => void;
41
+ declare const getKunIcon: (name: string) => KunIconData | undefined;
42
+ declare const hasKunIcon: (name: string) => boolean;
43
+
44
+ export { KUN_DEFAULT_ROUNDED, type KunIconData, type KunUIColor, type KunUIRounded, type KunUISize, type KunUIVariant, type KunUser, cn, decodeIfEncoded, getKunIcon, getRandomSticker, hasKunIcon, kunBgClasses, kunBorderClasses, kunRingClasses, kunRoundedClasses, kunSoftBgClasses, kunTextClasses, kunVariantClasses, randomNum, registerKunIcon, registerKunIcons, resolveRounded };
@@ -0,0 +1,44 @@
1
+ import { ClassValue } from 'clsx';
2
+ export { ClassValue } from 'clsx';
3
+
4
+ type KunUIVariant = 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'shadow' | 'ghost';
5
+ type KunUIColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
6
+ type KunUISize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ type KunUIRounded = 'none' | 'sm' | 'md' | 'lg' | 'full';
8
+
9
+ declare const cn: (...inputs: ClassValue[]) => string;
10
+
11
+ declare const kunVariantClasses: (variant: KunUIVariant, color: KunUIColor) => string;
12
+ declare const kunBgClasses: Record<KunUIColor, string>;
13
+ declare const kunTextClasses: Record<KunUIColor, string>;
14
+ declare const kunBorderClasses: Record<KunUIColor, string>;
15
+ declare const kunRingClasses: Record<KunUIColor, string>;
16
+ declare const kunSoftBgClasses: Record<KunUIColor, string>;
17
+
18
+ declare const kunRoundedClasses: Record<KunUIRounded, string>;
19
+ declare const KUN_DEFAULT_ROUNDED: KunUIRounded;
20
+ declare const resolveRounded: (prop: KunUIRounded | undefined, fallback: KunUIRounded | undefined, configDefault?: KunUIRounded) => KunUIRounded;
21
+
22
+ declare const randomNum: (lowerValue: number, upperValue: number) => number;
23
+
24
+ declare const decodeIfEncoded: (text: string) => string;
25
+
26
+ declare const getRandomSticker: (id?: string) => string;
27
+
28
+ interface KunUser {
29
+ id: number;
30
+ name: string;
31
+ avatar: string;
32
+ }
33
+
34
+ interface KunIconData {
35
+ body: string;
36
+ width?: number;
37
+ height?: number;
38
+ }
39
+ declare const registerKunIcon: (name: string, data: KunIconData) => void;
40
+ declare const registerKunIcons: (icons: Record<string, KunIconData>) => void;
41
+ declare const getKunIcon: (name: string) => KunIconData | undefined;
42
+ declare const hasKunIcon: (name: string) => boolean;
43
+
44
+ export { KUN_DEFAULT_ROUNDED, type KunIconData, type KunUIColor, type KunUIRounded, type KunUISize, type KunUIVariant, type KunUser, cn, decodeIfEncoded, getKunIcon, getRandomSticker, hasKunIcon, kunBgClasses, kunBorderClasses, kunRingClasses, kunRoundedClasses, kunSoftBgClasses, kunTextClasses, kunVariantClasses, randomNum, registerKunIcon, registerKunIcons, resolveRounded };
package/dist/index.js ADDED
@@ -0,0 +1,205 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+
4
+ // src/cn.ts
5
+ var cn = (...inputs) => twMerge(clsx(inputs));
6
+
7
+ // src/variants.ts
8
+ var TABLE = {
9
+ solid: {
10
+ default: "bg-default text-white",
11
+ primary: "bg-primary text-white",
12
+ secondary: "bg-secondary text-white",
13
+ success: "bg-success-600 text-white dark:bg-success-300",
14
+ warning: "bg-warning text-white",
15
+ danger: "bg-danger text-white",
16
+ info: "bg-info-600 text-white"
17
+ },
18
+ bordered: {
19
+ default: "bg-transparent border-default",
20
+ primary: "bg-transparent border-primary text-primary",
21
+ secondary: "bg-transparent border-secondary text-secondary",
22
+ success: "bg-transparent border-success text-success",
23
+ warning: "bg-transparent border-warning text-warning",
24
+ danger: "bg-transparent border-danger text-danger",
25
+ info: "bg-transparent border-info text-info"
26
+ },
27
+ light: {
28
+ default: "bg-transparent hover:bg-default/20",
29
+ primary: "bg-transparent text-primary hover:bg-primary/20",
30
+ secondary: "bg-transparent text-secondary hover:bg-secondary/20",
31
+ success: "bg-transparent text-success hover:bg-success/20",
32
+ warning: "bg-transparent text-warning hover:bg-warning/20",
33
+ danger: "bg-transparent text-danger hover:bg-danger/20",
34
+ info: "bg-transparent text-info hover:bg-info/20"
35
+ },
36
+ flat: {
37
+ default: "bg-default/20 text-default-700 border-transparent",
38
+ primary: "bg-primary/20 text-primary-600 border-transparent",
39
+ secondary: "bg-secondary/20 text-secondary-600 border-transparent",
40
+ success: "bg-success/20 text-success-700 border-transparent dark:text-success",
41
+ warning: "bg-warning/20 text-warning-700 border-transparent dark:text-warning",
42
+ danger: "bg-danger/20 text-danger-600 border-transparent dark:text-danger-500",
43
+ info: "bg-info/20 text-info-700 border-transparent dark:text-info-500"
44
+ },
45
+ faded: {
46
+ default: "border-default bg-default-100",
47
+ primary: "border-default bg-primary-100 text-primary",
48
+ secondary: "border-default bg-secondary-100 text-secondary",
49
+ success: "border-default bg-success-100 text-success",
50
+ warning: "border-default bg-warning-100 text-warning",
51
+ danger: "border-default bg-danger-100 text-danger",
52
+ info: "border-default bg-info-100 text-info"
53
+ },
54
+ shadow: {
55
+ default: "shadow-default/40 bg-default text-white",
56
+ primary: "shadow-primary/40 bg-primary text-white",
57
+ secondary: "shadow-secondary/40 bg-secondary text-white",
58
+ success: "shadow-success/40 bg-success-600 text-white",
59
+ warning: "shadow-warning/40 bg-warning text-white",
60
+ danger: "shadow-danger/40 bg-danger text-white",
61
+ info: "shadow-info/40 bg-info-600 text-white"
62
+ },
63
+ ghost: {
64
+ default: "bg-transparent border-default hover:bg-default/10",
65
+ primary: "bg-transparent border-primary text-primary hover:bg-primary/10",
66
+ secondary: "bg-transparent border-secondary text-secondary hover:bg-secondary/10",
67
+ success: "bg-transparent border-success text-success hover:bg-success/10",
68
+ warning: "bg-transparent border-warning text-warning hover:bg-warning/10",
69
+ danger: "bg-transparent border-danger text-danger hover:bg-danger/10",
70
+ info: "bg-transparent border-info text-info hover:bg-info/10"
71
+ }
72
+ };
73
+ var kunVariantClasses = (variant, color) => TABLE[variant][color];
74
+ var kunBgClasses = {
75
+ default: "bg-default",
76
+ primary: "bg-primary",
77
+ secondary: "bg-secondary",
78
+ success: "bg-success",
79
+ warning: "bg-warning",
80
+ danger: "bg-danger",
81
+ info: "bg-info"
82
+ };
83
+ var kunTextClasses = {
84
+ default: "text-foreground",
85
+ primary: "text-primary",
86
+ secondary: "text-secondary",
87
+ success: "text-success",
88
+ warning: "text-warning",
89
+ danger: "text-danger",
90
+ info: "text-info"
91
+ };
92
+ var kunBorderClasses = {
93
+ default: "border-default",
94
+ primary: "border-primary",
95
+ secondary: "border-secondary",
96
+ success: "border-success",
97
+ warning: "border-warning",
98
+ danger: "border-danger",
99
+ info: "border-info"
100
+ };
101
+ var kunRingClasses = {
102
+ default: "focus-within:ring-default/40 focus:ring-default/40",
103
+ primary: "focus-within:ring-primary/40 focus:ring-primary/40",
104
+ secondary: "focus-within:ring-secondary/40 focus:ring-secondary/40",
105
+ success: "focus-within:ring-success/40 focus:ring-success/40",
106
+ warning: "focus-within:ring-warning/40 focus:ring-warning/40",
107
+ danger: "focus-within:ring-danger/40 focus:ring-danger/40",
108
+ info: "focus-within:ring-info/40 focus:ring-info/40"
109
+ };
110
+ var kunSoftBgClasses = {
111
+ default: "bg-default/5",
112
+ primary: "bg-primary/5",
113
+ secondary: "bg-secondary/5",
114
+ success: "bg-success/5",
115
+ warning: "bg-warning/5",
116
+ danger: "bg-danger/5",
117
+ info: "bg-info/5"
118
+ };
119
+
120
+ // src/rounded.ts
121
+ var kunRoundedClasses = {
122
+ none: "rounded-kun-none",
123
+ sm: "rounded-kun-sm",
124
+ md: "rounded-kun-md",
125
+ lg: "rounded-kun-lg",
126
+ full: "rounded-kun-full"
127
+ };
128
+ var KUN_DEFAULT_ROUNDED = "md";
129
+ var resolveRounded = (prop, fallback, configDefault = KUN_DEFAULT_ROUNDED) => prop ?? fallback ?? configDefault;
130
+
131
+ // src/random.ts
132
+ var randomNum = (lowerValue, upperValue) => Math.floor(Math.random() * (upperValue - lowerValue + 1) + lowerValue);
133
+
134
+ // src/decodeIfEncoded.ts
135
+ var decodeIfEncoded = (text) => {
136
+ try {
137
+ const decoded = decodeURIComponent(text);
138
+ return decoded !== text ? decoded : text;
139
+ } catch {
140
+ return text;
141
+ }
142
+ };
143
+
144
+ // src/getRandomSticker.ts
145
+ var KUN_STICKER_DOMAIN = "https://sticker.kungal.com";
146
+ var PACKS = 5;
147
+ var PER_PACK = 80;
148
+ var hash = (s) => {
149
+ let h = 0;
150
+ for (let i = 0; i < s.length; i++) {
151
+ h = Math.imul(h, 31) + s.charCodeAt(i) >>> 0;
152
+ }
153
+ return h;
154
+ };
155
+ var getRandomSticker = (id = "") => {
156
+ const h = hash(id);
157
+ const pack = h % PACKS + 1;
158
+ const sticker = Math.floor(h / PACKS) % PER_PACK + 1;
159
+ return `${KUN_STICKER_DOMAIN}/stickers/KUNgal${pack}/${sticker}.webp`;
160
+ };
161
+
162
+ // src/icons-data.ts
163
+ var KUN_BUNDLED_ICONS = {
164
+ "lucide:x": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/>' },
165
+ "lucide:check": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 6L9 17l-5-5"/>' },
166
+ "lucide:info": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4m0-4h.01"/></g>' },
167
+ "lucide:circle-check": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m9 12l2 2l4-4"/></g>' },
168
+ "lucide:circle-x": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m15 9l-6 6m0-6l6 6"/></g>' },
169
+ "lucide:triangle-alert": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01"/>' },
170
+ "lucide:chevron-right": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18l6-6l-6-6"/>' },
171
+ "lucide:chevron-left": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 18l-6-6l6-6"/>' },
172
+ "lucide:chevron-down": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9l6 6l6-6"/>' },
173
+ "lucide:chevrons-right": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 17l5-5l-5-5m7 10l5-5l-5-5"/>' },
174
+ "lucide:chevrons-left": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m11 17l-5-5l5-5m7 10l-5-5l5-5"/>' },
175
+ "lucide:arrow-right": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7-7l7 7l-7 7"/>' },
176
+ "lucide:arrow-left": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m12 19l-7-7l7-7m7 7H5"/>' },
177
+ "lucide:plus": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7-7v14"/>' },
178
+ "lucide:upload": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>' },
179
+ "lucide:zoom-in": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21l-4.35-4.35M11 8v6m-3-3h6"/></g>' },
180
+ "lucide:zoom-out": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21l-4.35-4.35M8 11h6"/></g>' },
181
+ "lucide:rotate-cw": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/></g>' },
182
+ "lucide:rotate-ccw": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></g>' },
183
+ "lucide:refresh-ccw": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21 12a9 9 0 0 0-9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5m-5 4a9 9 0 0 0 9 9a9.75 9.75 0 0 0 6.74-2.74L21 16"/><path d="M16 16h5v5"/></g>' },
184
+ "lucide:external-link": { "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>' },
185
+ "lucide:download": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><path d="m7 10l5 5l5-5"/></g>' },
186
+ "lucide:copy": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></g>' },
187
+ "lucide:calendar": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M8 2v4m8-4v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/></g>' },
188
+ "lucide:lollipop": { "body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21l-4.3-4.3M11 11a2 2 0 0 0 4 0a4 4 0 0 0-8 0a6 6 0 0 0 12 0"/></g>' },
189
+ "svg-spinners:90-ring-with-bg": { "body": '<path fill="currentColor" d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path fill="currentColor" d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path>' }
190
+ };
191
+
192
+ // src/icons.ts
193
+ var registry = new Map(Object.entries(KUN_BUNDLED_ICONS));
194
+ var registerKunIcon = (name, data) => {
195
+ registry.set(name, data);
196
+ };
197
+ var registerKunIcons = (icons) => {
198
+ for (const [name, data] of Object.entries(icons)) registry.set(name, data);
199
+ };
200
+ var getKunIcon = (name) => registry.get(name);
201
+ var hasKunIcon = (name) => registry.has(name);
202
+
203
+ export { KUN_DEFAULT_ROUNDED, cn, decodeIfEncoded, getKunIcon, getRandomSticker, hasKunIcon, kunBgClasses, kunBorderClasses, kunRingClasses, kunRoundedClasses, kunSoftBgClasses, kunTextClasses, kunVariantClasses, randomNum, registerKunIcon, registerKunIcons, resolveRounded };
204
+ //# sourceMappingURL=index.js.map
205
+ //# sourceMappingURL=index.js.map