@duskmoon-dev/core 1.4.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/dist/cjs/tailwind-plugin.cjs +162 -0
- package/dist/components/appbar.css +186 -1
- package/dist/components/cascader.css +418 -0
- package/dist/components/checkbox.css +2 -1
- package/dist/components/index.css +4295 -2799
- package/dist/components/popover.css +390 -3
- package/dist/components/textarea.css +212 -16
- package/dist/components/tree-select.css +36 -3
- package/dist/esm/components/appbar.js +186 -1
- package/dist/esm/components/cascader.js +425 -0
- package/dist/esm/components/checkbox.js +2 -1
- package/dist/esm/components/popover.js +390 -3
- package/dist/esm/components/textarea.js +212 -16
- package/dist/esm/components/tree-select.js +36 -3
- package/dist/esm/tailwind-plugin.js +119 -0
- package/dist/index.css +4466 -2915
- package/dist/themes/moonlight.css +96 -68
- package/dist/themes/sunshine.css +95 -68
- package/dist/types/tailwind-plugin.d.ts +26 -0
- package/dist/types/tailwind-plugin.d.ts.map +1 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/plugin.d.ts.map +1 -0
- package/dist/types/types/theme.d.ts.map +1 -0
- package/package.json +8 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/plugin.d.ts.map +0 -1
- package/dist/types/theme.d.ts.map +0 -1
- /package/dist/types/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/types/{plugin.d.ts → types/plugin.d.ts} +0 -0
- /package/dist/types/{theme.d.ts → types/theme.d.ts} +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
|
+
var __toCommonJS = (from) => {
|
|
20
|
+
var entry = __moduleCache.get(from), desc;
|
|
21
|
+
if (entry)
|
|
22
|
+
return entry;
|
|
23
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
26
|
+
get: () => from[key],
|
|
27
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
28
|
+
}));
|
|
29
|
+
__moduleCache.set(from, entry);
|
|
30
|
+
return entry;
|
|
31
|
+
};
|
|
32
|
+
var __export = (target, all) => {
|
|
33
|
+
for (var name in all)
|
|
34
|
+
__defProp(target, name, {
|
|
35
|
+
get: all[name],
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
set: (newValue) => all[name] = () => newValue
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// src/tailwind-plugin.ts
|
|
43
|
+
var exports_tailwind_plugin = {};
|
|
44
|
+
__export(exports_tailwind_plugin, {
|
|
45
|
+
duskmoonPlugin: () => duskmoonPlugin,
|
|
46
|
+
default: () => tailwind_plugin_default
|
|
47
|
+
});
|
|
48
|
+
module.exports = __toCommonJS(exports_tailwind_plugin);
|
|
49
|
+
var import_plugin = __toESM(require("tailwindcss/plugin"));
|
|
50
|
+
var themeColors = {
|
|
51
|
+
primary: "var(--color-primary)",
|
|
52
|
+
"on-primary": "var(--color-on-primary)",
|
|
53
|
+
"primary-container": "var(--color-primary-container)",
|
|
54
|
+
"on-primary-container": "var(--color-on-primary-container)",
|
|
55
|
+
secondary: "var(--color-secondary)",
|
|
56
|
+
"on-secondary": "var(--color-on-secondary)",
|
|
57
|
+
"secondary-container": "var(--color-secondary-container)",
|
|
58
|
+
"on-secondary-container": "var(--color-on-secondary-container)",
|
|
59
|
+
tertiary: "var(--color-tertiary)",
|
|
60
|
+
"on-tertiary": "var(--color-on-tertiary)",
|
|
61
|
+
"tertiary-container": "var(--color-tertiary-container)",
|
|
62
|
+
"on-tertiary-container": "var(--color-on-tertiary-container)",
|
|
63
|
+
error: "var(--color-error)",
|
|
64
|
+
"on-error": "var(--color-on-error)",
|
|
65
|
+
"error-container": "var(--color-error-container)",
|
|
66
|
+
"on-error-container": "var(--color-on-error-container)",
|
|
67
|
+
surface: "var(--color-surface)",
|
|
68
|
+
"on-surface": "var(--color-on-surface)",
|
|
69
|
+
"surface-variant": "var(--color-surface-variant)",
|
|
70
|
+
"on-surface-variant": "var(--color-on-surface-variant)",
|
|
71
|
+
"surface-container": "var(--color-surface-container)",
|
|
72
|
+
"surface-container-low": "var(--color-surface-container-low)",
|
|
73
|
+
"surface-container-lowest": "var(--color-surface-container-lowest)",
|
|
74
|
+
"surface-container-high": "var(--color-surface-container-high)",
|
|
75
|
+
"surface-container-highest": "var(--color-surface-container-highest)",
|
|
76
|
+
outline: "var(--color-outline)",
|
|
77
|
+
"outline-variant": "var(--color-outline-variant)",
|
|
78
|
+
"inverse-surface": "var(--color-inverse-surface)",
|
|
79
|
+
"inverse-on-surface": "var(--color-inverse-on-surface)",
|
|
80
|
+
"inverse-primary": "var(--color-inverse-primary)",
|
|
81
|
+
scrim: "var(--color-scrim)",
|
|
82
|
+
shadow: "var(--color-shadow)"
|
|
83
|
+
};
|
|
84
|
+
var duskmoonPlugin = import_plugin.default(({ addBase, matchUtilities, theme }) => {
|
|
85
|
+
addBase({
|
|
86
|
+
':root, [data-theme="sunshine"]': {
|
|
87
|
+
"--color-primary": "oklch(0.55 0.2 260)",
|
|
88
|
+
"--color-on-primary": "oklch(1 0 0)",
|
|
89
|
+
"--color-primary-container": "oklch(0.9 0.05 260)",
|
|
90
|
+
"--color-on-primary-container": "oklch(0.25 0.1 260)",
|
|
91
|
+
"--color-secondary": "oklch(0.5 0.1 280)",
|
|
92
|
+
"--color-on-secondary": "oklch(1 0 0)",
|
|
93
|
+
"--color-secondary-container": "oklch(0.92 0.03 280)",
|
|
94
|
+
"--color-on-secondary-container": "oklch(0.25 0.05 280)",
|
|
95
|
+
"--color-tertiary": "oklch(0.55 0.15 30)",
|
|
96
|
+
"--color-on-tertiary": "oklch(1 0 0)",
|
|
97
|
+
"--color-tertiary-container": "oklch(0.92 0.04 30)",
|
|
98
|
+
"--color-on-tertiary-container": "oklch(0.3 0.08 30)",
|
|
99
|
+
"--color-error": "oklch(0.55 0.2 25)",
|
|
100
|
+
"--color-on-error": "oklch(1 0 0)",
|
|
101
|
+
"--color-error-container": "oklch(0.92 0.05 25)",
|
|
102
|
+
"--color-on-error-container": "oklch(0.3 0.1 25)",
|
|
103
|
+
"--color-surface": "oklch(0.99 0.005 260)",
|
|
104
|
+
"--color-on-surface": "oklch(0.2 0.02 260)",
|
|
105
|
+
"--color-surface-variant": "oklch(0.93 0.01 260)",
|
|
106
|
+
"--color-on-surface-variant": "oklch(0.45 0.03 260)",
|
|
107
|
+
"--color-surface-container": "oklch(0.96 0.008 260)",
|
|
108
|
+
"--color-surface-container-low": "oklch(0.97 0.006 260)",
|
|
109
|
+
"--color-surface-container-lowest": "oklch(1 0 0)",
|
|
110
|
+
"--color-surface-container-high": "oklch(0.94 0.01 260)",
|
|
111
|
+
"--color-surface-container-highest": "oklch(0.92 0.012 260)",
|
|
112
|
+
"--color-outline": "oklch(0.55 0.02 260)",
|
|
113
|
+
"--color-outline-variant": "oklch(0.8 0.015 260)",
|
|
114
|
+
"--color-inverse-surface": "oklch(0.25 0.02 260)",
|
|
115
|
+
"--color-inverse-on-surface": "oklch(0.95 0.005 260)",
|
|
116
|
+
"--color-inverse-primary": "oklch(0.8 0.12 260)",
|
|
117
|
+
"--color-scrim": "oklch(0 0 0)",
|
|
118
|
+
"--color-shadow": "oklch(0 0 0)"
|
|
119
|
+
},
|
|
120
|
+
'[data-theme="moonlight"]': {
|
|
121
|
+
"--color-primary": "oklch(0.8 0.12 260)",
|
|
122
|
+
"--color-on-primary": "oklch(0.3 0.15 260)",
|
|
123
|
+
"--color-primary-container": "oklch(0.35 0.15 260)",
|
|
124
|
+
"--color-on-primary-container": "oklch(0.9 0.05 260)",
|
|
125
|
+
"--color-secondary": "oklch(0.8 0.06 280)",
|
|
126
|
+
"--color-on-secondary": "oklch(0.3 0.08 280)",
|
|
127
|
+
"--color-secondary-container": "oklch(0.35 0.08 280)",
|
|
128
|
+
"--color-on-secondary-container": "oklch(0.92 0.03 280)",
|
|
129
|
+
"--color-tertiary": "oklch(0.8 0.1 30)",
|
|
130
|
+
"--color-on-tertiary": "oklch(0.35 0.12 30)",
|
|
131
|
+
"--color-tertiary-container": "oklch(0.4 0.1 30)",
|
|
132
|
+
"--color-on-tertiary-container": "oklch(0.92 0.04 30)",
|
|
133
|
+
"--color-error": "oklch(0.85 0.12 25)",
|
|
134
|
+
"--color-on-error": "oklch(0.35 0.15 25)",
|
|
135
|
+
"--color-error-container": "oklch(0.4 0.12 25)",
|
|
136
|
+
"--color-on-error-container": "oklch(0.92 0.05 25)",
|
|
137
|
+
"--color-surface": "oklch(0.2 0.015 260)",
|
|
138
|
+
"--color-on-surface": "oklch(0.93 0.01 260)",
|
|
139
|
+
"--color-surface-variant": "oklch(0.35 0.02 260)",
|
|
140
|
+
"--color-on-surface-variant": "oklch(0.8 0.02 260)",
|
|
141
|
+
"--color-surface-container": "oklch(0.22 0.018 260)",
|
|
142
|
+
"--color-surface-container-low": "oklch(0.18 0.012 260)",
|
|
143
|
+
"--color-surface-container-lowest": "oklch(0.15 0.01 260)",
|
|
144
|
+
"--color-surface-container-high": "oklch(0.25 0.02 260)",
|
|
145
|
+
"--color-surface-container-highest": "oklch(0.28 0.022 260)",
|
|
146
|
+
"--color-outline": "oklch(0.55 0.025 260)",
|
|
147
|
+
"--color-outline-variant": "oklch(0.35 0.02 260)",
|
|
148
|
+
"--color-inverse-surface": "oklch(0.93 0.01 260)",
|
|
149
|
+
"--color-inverse-on-surface": "oklch(0.25 0.02 260)",
|
|
150
|
+
"--color-inverse-primary": "oklch(0.55 0.2 260)",
|
|
151
|
+
"--color-scrim": "oklch(0 0 0)",
|
|
152
|
+
"--color-shadow": "oklch(0 0 0)"
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}, {
|
|
156
|
+
theme: {
|
|
157
|
+
extend: {
|
|
158
|
+
colors: themeColors
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
var tailwind_plugin_default = duskmoonPlugin;
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
padding: 0 1rem;
|
|
15
15
|
background-color: var(--color-surface);
|
|
16
16
|
color: var(--color-on-surface);
|
|
17
|
+
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Static App Bar (default) */
|
|
21
|
+
.appbar-static {
|
|
22
|
+
position: static;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
/* Fixed App Bar */
|
|
@@ -32,19 +38,47 @@
|
|
|
32
38
|
z-index: 1000;
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
/* App Bar
|
|
41
|
+
/* Top App Bar (default) */
|
|
42
|
+
.appbar-top {
|
|
43
|
+
top: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Bottom App Bar */
|
|
47
|
+
.appbar-bottom {
|
|
48
|
+
position: fixed;
|
|
49
|
+
bottom: 0;
|
|
50
|
+
left: 0;
|
|
51
|
+
right: 0;
|
|
52
|
+
top: auto;
|
|
53
|
+
z-index: 1000;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* App Bar with Shadow (elevated) */
|
|
36
57
|
.appbar-elevated {
|
|
37
58
|
box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
38
59
|
}
|
|
39
60
|
|
|
61
|
+
/* Flat App Bar (no shadow) */
|
|
62
|
+
.appbar-flat {
|
|
63
|
+
box-shadow: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
40
66
|
/* App Bar with Border */
|
|
41
67
|
.appbar-bordered {
|
|
42
68
|
border-bottom: 1px solid var(--color-outline-variant);
|
|
69
|
+
box-shadow: none;
|
|
43
70
|
}
|
|
44
71
|
|
|
45
72
|
/* Transparent App Bar */
|
|
46
73
|
.appbar-transparent {
|
|
47
74
|
background-color: transparent;
|
|
75
|
+
box-shadow: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Backdrop Blur */
|
|
79
|
+
.appbar-blur {
|
|
80
|
+
backdrop-filter: blur(8px);
|
|
81
|
+
-webkit-backdrop-filter: blur(8px);
|
|
48
82
|
}
|
|
49
83
|
|
|
50
84
|
/* App Bar Navigation Icon */
|
|
@@ -167,6 +201,114 @@
|
|
|
167
201
|
font-size: 1.5rem;
|
|
168
202
|
}
|
|
169
203
|
|
|
204
|
+
/* Compact Size */
|
|
205
|
+
.appbar-compact {
|
|
206
|
+
min-height: 3rem;
|
|
207
|
+
padding: 0 0.75rem;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.appbar-compact .appbar-title,
|
|
211
|
+
.appbar-compact .appbar-heading {
|
|
212
|
+
font-size: 1rem;
|
|
213
|
+
line-height: 1.5rem;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.appbar-compact .appbar-nav,
|
|
217
|
+
.appbar-compact .appbar-action,
|
|
218
|
+
.appbar-compact .appbar-back {
|
|
219
|
+
width: 2rem;
|
|
220
|
+
height: 2rem;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Comfortable Size */
|
|
224
|
+
.appbar-comfortable {
|
|
225
|
+
min-height: 5rem;
|
|
226
|
+
padding: 0 1.5rem;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.appbar-comfortable .appbar-title,
|
|
230
|
+
.appbar-comfortable .appbar-heading {
|
|
231
|
+
font-size: 1.5rem;
|
|
232
|
+
line-height: 2rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Section Classes */
|
|
236
|
+
.appbar-leading {
|
|
237
|
+
display: flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
gap: 0.25rem;
|
|
240
|
+
flex-shrink: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.appbar-trailing {
|
|
244
|
+
display: flex;
|
|
245
|
+
align-items: center;
|
|
246
|
+
gap: 0.25rem;
|
|
247
|
+
flex-shrink: 0;
|
|
248
|
+
margin-left: auto;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Heading Text */
|
|
252
|
+
.appbar-heading {
|
|
253
|
+
font-size: 1.25rem;
|
|
254
|
+
font-weight: 500;
|
|
255
|
+
line-height: 1.75rem;
|
|
256
|
+
margin: 0;
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
text-overflow: ellipsis;
|
|
259
|
+
white-space: nowrap;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Back Button */
|
|
263
|
+
.appbar-back {
|
|
264
|
+
display: flex;
|
|
265
|
+
align-items: center;
|
|
266
|
+
justify-content: center;
|
|
267
|
+
width: 2.5rem;
|
|
268
|
+
height: 2.5rem;
|
|
269
|
+
color: var(--color-on-surface);
|
|
270
|
+
background-color: transparent;
|
|
271
|
+
border: none;
|
|
272
|
+
border-radius: 50%;
|
|
273
|
+
cursor: pointer;
|
|
274
|
+
transition: background-color 150ms ease-in-out;
|
|
275
|
+
flex-shrink: 0;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.appbar-back:hover {
|
|
279
|
+
background-color: var(--color-surface-container);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.appbar-back:focus-visible {
|
|
283
|
+
outline: 2px solid var(--color-primary);
|
|
284
|
+
outline-offset: 2px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Search Input (direct on element) */
|
|
288
|
+
.appbar .appbar-search,
|
|
289
|
+
input.appbar-search {
|
|
290
|
+
flex: 1;
|
|
291
|
+
max-width: 32rem;
|
|
292
|
+
padding: 0.5rem 1rem;
|
|
293
|
+
font-size: 0.875rem;
|
|
294
|
+
color: var(--color-on-surface);
|
|
295
|
+
background-color: var(--color-surface-container);
|
|
296
|
+
border: none;
|
|
297
|
+
border-radius: 9999px;
|
|
298
|
+
transition: background-color 150ms ease-in-out;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.appbar .appbar-search:focus,
|
|
302
|
+
input.appbar-search:focus {
|
|
303
|
+
outline: none;
|
|
304
|
+
background-color: var(--color-surface-container-high);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.appbar .appbar-search::placeholder,
|
|
308
|
+
input.appbar-search::placeholder {
|
|
309
|
+
color: var(--color-on-surface-variant);
|
|
310
|
+
}
|
|
311
|
+
|
|
170
312
|
/* Color Variants */
|
|
171
313
|
.appbar-primary {
|
|
172
314
|
background-color: var(--color-primary);
|
|
@@ -205,10 +347,53 @@
|
|
|
205
347
|
color: var(--color-on-secondary-container);
|
|
206
348
|
}
|
|
207
349
|
|
|
350
|
+
.appbar-secondary .appbar-subtitle {
|
|
351
|
+
color: var(--color-on-secondary);
|
|
352
|
+
opacity: 0.8;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.appbar-tertiary {
|
|
356
|
+
background-color: var(--color-tertiary);
|
|
357
|
+
color: var(--color-on-tertiary);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.appbar-tertiary .appbar-nav,
|
|
361
|
+
.appbar-tertiary .appbar-action {
|
|
362
|
+
color: var(--color-on-tertiary);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.appbar-tertiary .appbar-nav:hover,
|
|
366
|
+
.appbar-tertiary .appbar-action:hover {
|
|
367
|
+
background-color: var(--color-tertiary-container);
|
|
368
|
+
color: var(--color-on-tertiary-container);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.appbar-tertiary .appbar-subtitle {
|
|
372
|
+
color: var(--color-on-tertiary);
|
|
373
|
+
opacity: 0.8;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/* Surface Variants */
|
|
208
377
|
.appbar-surface {
|
|
378
|
+
background-color: var(--color-surface);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.appbar-surface-container {
|
|
209
382
|
background-color: var(--color-surface-container);
|
|
210
383
|
}
|
|
211
384
|
|
|
385
|
+
.appbar-surface-container-low {
|
|
386
|
+
background-color: var(--color-surface-container-low);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.appbar-surface-container-high {
|
|
390
|
+
background-color: var(--color-surface-container-high);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.appbar-surface-container-highest {
|
|
394
|
+
background-color: var(--color-surface-container-highest);
|
|
395
|
+
}
|
|
396
|
+
|
|
212
397
|
/* Center Title */
|
|
213
398
|
.appbar-center {
|
|
214
399
|
justify-content: space-between;
|