lapikit 0.6.12 → 0.7.1
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/@types/components.d.ts +8 -0
- package/dist/components/app/app.svelte +218 -272
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +34 -36
- package/dist/directives.d.ts +14 -0
- package/dist/directives.js +128 -0
- package/dist/escaping.js +4 -1
- package/dist/framework.d.ts +1 -5
- package/dist/framework.js +73 -33
- package/dist/html-mapped.js +5 -65
- package/dist/labs/sheet/sheet.svelte +60 -26
- package/dist/labs/sheet/sheet.svelte.d.ts +3 -0
- package/dist/utils/components.d.ts +35 -7
- package/dist/utils/components.js +174 -63
- package/dist/utils/directives.d.ts +20 -0
- package/dist/utils/directives.js +64 -0
- package/package.json +14 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { ClassNameType, IdElementType, KitClassNameType, KitStylePropertiesType, PropValue, SClassProp, SStyleProp, StylePropertiesType } from './';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
export interface useClassNameProps {
|
|
4
5
|
baseClass?: string;
|
|
5
6
|
className?: string;
|
|
@@ -30,4 +31,11 @@ export type KitComponentScan = {
|
|
|
30
31
|
export type ComponentInfo = {
|
|
31
32
|
name: string;
|
|
32
33
|
ref: string;
|
|
34
|
+
direct?: boolean;
|
|
33
35
|
};
|
|
36
|
+
export interface ComponentAttrs {
|
|
37
|
+
/** For the class attribute of the element: Svelte applies clsx (strings, arrays, objects) */
|
|
38
|
+
class: ClassValue;
|
|
39
|
+
style: string;
|
|
40
|
+
rest: Record<string, unknown>;
|
|
41
|
+
}
|
|
@@ -37,275 +37,221 @@
|
|
|
37
37
|
{@render children?.()}
|
|
38
38
|
</div>
|
|
39
39
|
|
|
40
|
-
<style
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
:global([data-elevation='1']),
|
|
259
|
-
:global([data-elevation-hover='1']:hover),
|
|
260
|
-
:global([data-elevation-active='1']:active) {
|
|
261
|
-
box-shadow:
|
|
262
|
-
0 1px 2px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent),
|
|
263
|
-
0 3px 8px -2px
|
|
264
|
-
color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
:global([data-elevation='2']),
|
|
268
|
-
:global([data-elevation-hover='2']:hover),
|
|
269
|
-
:global([data-elevation-active='2']:active) {
|
|
270
|
-
box-shadow:
|
|
271
|
-
0 1px 3px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent),
|
|
272
|
-
0 5px 12px -3px
|
|
273
|
-
color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
:global([data-elevation='3']),
|
|
277
|
-
:global([data-elevation-hover='3']:hover),
|
|
278
|
-
:global([data-elevation-active='3']:active) {
|
|
279
|
-
box-shadow:
|
|
280
|
-
0 2px 4px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent),
|
|
281
|
-
0 8px 20px -4px
|
|
282
|
-
color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
:global([data-elevation='4']),
|
|
286
|
-
:global([data-elevation-hover='4']):hover,
|
|
287
|
-
:global([data-elevation-active='4']):active {
|
|
288
|
-
box-shadow:
|
|
289
|
-
0 3px 5px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent),
|
|
290
|
-
0 11px 26px -5px
|
|
291
|
-
color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
:global([data-elevation='5']),
|
|
295
|
-
:global([data-elevation-hover='5']:hover),
|
|
296
|
-
:global([data-elevation-active='5']:active) {
|
|
297
|
-
box-shadow:
|
|
298
|
-
0 4px 6px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent),
|
|
299
|
-
0 14px 32px -6px
|
|
300
|
-
color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
301
|
-
}
|
|
302
|
-
@keyframes -global-animation-l-ripple {
|
|
303
|
-
from {
|
|
304
|
-
scale: 0;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
to {
|
|
308
|
-
scale: 1;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
</style>
|
|
40
|
+
<style>:root {
|
|
41
|
+
--kit-shape-none: 0;
|
|
42
|
+
--kit-shape-xs: 0.25rem;
|
|
43
|
+
--kit-shape-sm: 0.375rem;
|
|
44
|
+
--kit-shape-md: 0.625rem;
|
|
45
|
+
--kit-shape-lg: 0.875rem;
|
|
46
|
+
--kit-shape-xl: 1.125rem;
|
|
47
|
+
--kit-shape-full: 9999px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:global html {
|
|
51
|
+
--kit-font-xs: 13px;
|
|
52
|
+
--kit-font-sm: 14px;
|
|
53
|
+
--kit-font-md: 15px;
|
|
54
|
+
--kit-font-lg: 16px;
|
|
55
|
+
--kit-font-xl: 17px;
|
|
56
|
+
--kit-space-compact: 2px;
|
|
57
|
+
--kit-space-default: 4px;
|
|
58
|
+
--kit-space-comfortable: 6px;
|
|
59
|
+
--kit-density-compact: -4px;
|
|
60
|
+
--kit-density-default: 0px;
|
|
61
|
+
--kit-density-comfortable: 4px;
|
|
62
|
+
--kit-shadow-opacity: 30%;
|
|
63
|
+
--kit-shadow-ambient-opacity: 15%;
|
|
64
|
+
--kit-disabled-opacity: 0.55;
|
|
65
|
+
--kit-font:
|
|
66
|
+
ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
|
67
|
+
'Segoe UI Symbol', 'Noto Color Emoji';
|
|
68
|
+
--kit-color-transparent: transparent;
|
|
69
|
+
}
|
|
70
|
+
:global html:not([data-kit-theme]),
|
|
71
|
+
:global [data-kit-theme=light] {
|
|
72
|
+
color-scheme: light;
|
|
73
|
+
--kit-color-surface: hsl(0 0% 100%);
|
|
74
|
+
--kit-color-surface-1: hsl(240 15% 96.5%);
|
|
75
|
+
--kit-color-surface-2: hsl(240 10% 93%);
|
|
76
|
+
--kit-color-surface-3: hsl(0 0% 100%);
|
|
77
|
+
--kit-color-text: hsl(222 20% 10%);
|
|
78
|
+
--kit-color-text-muted: hsl(220 10% 40%);
|
|
79
|
+
--kit-color-text-subtle: hsl(220 8% 58%);
|
|
80
|
+
--kit-color-text-disabled: hsl(220 5% 76%);
|
|
81
|
+
--kit-color-fill: hsl(240 8% 93%);
|
|
82
|
+
--kit-color-fill-hover: hsl(240 4% 91%);
|
|
83
|
+
--kit-color-fill-active: hsl(240 4% 88%);
|
|
84
|
+
--kit-color-border: hsl(220 16% 88%);
|
|
85
|
+
--kit-color-shadow: hsl(240 3% 11%);
|
|
86
|
+
--kit-color-accent: hsl(220 90% 56%);
|
|
87
|
+
--kit-color-on-accent: hsl(0 0% 100%);
|
|
88
|
+
--kit-color-success: hsl(145 50% 38%);
|
|
89
|
+
--kit-color-on-success: hsl(0 0% 100%);
|
|
90
|
+
--kit-color-warning: hsl(35 80% 45%);
|
|
91
|
+
--kit-color-on-warning: hsl(222 20% 10%);
|
|
92
|
+
--kit-color-error: hsl(5 65% 48%);
|
|
93
|
+
--kit-color-on-error: hsl(0 0% 100%);
|
|
94
|
+
--kit-color-info: hsl(205 60% 42%);
|
|
95
|
+
--kit-color-on-info: hsl(0 0% 100%);
|
|
96
|
+
--kit-color-focus: hsl(35 90% 56%);
|
|
97
|
+
}
|
|
98
|
+
:global [data-kit-theme=dark] {
|
|
99
|
+
color-scheme: dark;
|
|
100
|
+
--kit-color-surface: hsl(240 3% 11%);
|
|
101
|
+
--kit-color-surface-1: hsl(240 2% 17.5%);
|
|
102
|
+
--kit-color-surface-2: hsl(240 1.5% 23%);
|
|
103
|
+
--kit-color-surface-3: hsl(240 1.5% 28%);
|
|
104
|
+
--kit-color-text: hsl(0 0% 100%);
|
|
105
|
+
--kit-color-text-muted: hsl(240 3% 56%);
|
|
106
|
+
--kit-color-text-subtle: hsl(240 2.5% 38%);
|
|
107
|
+
--kit-color-text-disabled: hsl(240 1.5% 25%);
|
|
108
|
+
--kit-color-fill: hsl(240 2.5% 24%);
|
|
109
|
+
--kit-color-fill-hover: hsl(240 2.5% 28%);
|
|
110
|
+
--kit-color-fill-active: hsl(240 2.5% 31%);
|
|
111
|
+
--kit-color-border: hsl(240 2% 26%);
|
|
112
|
+
--kit-color-shadow: hsl(240 3% 11%);
|
|
113
|
+
--kit-color-accent: hsl(220 85% 65%);
|
|
114
|
+
--kit-color-on-accent: hsl(240 3% 11%);
|
|
115
|
+
--kit-color-success: hsl(145 50% 50%);
|
|
116
|
+
--kit-color-on-success: hsl(240 3% 11%);
|
|
117
|
+
--kit-color-warning: hsl(35 85% 58%);
|
|
118
|
+
--kit-color-on-warning: hsl(240 3% 11%);
|
|
119
|
+
--kit-color-error: hsl(5 70% 60%);
|
|
120
|
+
--kit-color-on-error: hsl(240 3% 11%);
|
|
121
|
+
--kit-color-info: hsl(205 65% 58%);
|
|
122
|
+
--kit-color-on-info: hsl(240 3% 11%);
|
|
123
|
+
--kit-color-focus: hsl(35 90% 62%);
|
|
124
|
+
}
|
|
125
|
+
@media (prefers-color-scheme: light) {
|
|
126
|
+
:global [data-kit-theme=system] {
|
|
127
|
+
color-scheme: light;
|
|
128
|
+
--kit-color-surface: hsl(0 0% 100%);
|
|
129
|
+
--kit-color-surface-1: hsl(240 15% 96.5%);
|
|
130
|
+
--kit-color-surface-2: hsl(240 10% 93%);
|
|
131
|
+
--kit-color-surface-3: hsl(0 0% 100%);
|
|
132
|
+
--kit-color-text: hsl(222 20% 10%);
|
|
133
|
+
--kit-color-text-muted: hsl(220 10% 40%);
|
|
134
|
+
--kit-color-text-subtle: hsl(220 8% 58%);
|
|
135
|
+
--kit-color-text-disabled: hsl(220 5% 76%);
|
|
136
|
+
--kit-color-fill: hsl(240 8% 93%);
|
|
137
|
+
--kit-color-fill-hover: hsl(240 4% 91%);
|
|
138
|
+
--kit-color-fill-active: hsl(240 4% 88%);
|
|
139
|
+
--kit-color-border: hsl(220 16% 88%);
|
|
140
|
+
--kit-color-shadow: hsl(240 3% 11%);
|
|
141
|
+
--kit-color-accent: hsl(220 90% 56%);
|
|
142
|
+
--kit-color-on-accent: hsl(0 0% 100%);
|
|
143
|
+
--kit-color-success: hsl(145 50% 38%);
|
|
144
|
+
--kit-color-on-success: hsl(0 0% 100%);
|
|
145
|
+
--kit-color-warning: hsl(35 80% 45%);
|
|
146
|
+
--kit-color-on-warning: hsl(222 20% 10%);
|
|
147
|
+
--kit-color-error: hsl(5 65% 48%);
|
|
148
|
+
--kit-color-on-error: hsl(0 0% 100%);
|
|
149
|
+
--kit-color-info: hsl(205 60% 42%);
|
|
150
|
+
--kit-color-on-info: hsl(0 0% 100%);
|
|
151
|
+
--kit-color-focus: hsl(35 90% 56%);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
@media (prefers-color-scheme: dark) {
|
|
155
|
+
:global [data-kit-theme=system] {
|
|
156
|
+
color-scheme: dark;
|
|
157
|
+
--kit-color-surface: hsl(240 3% 11%);
|
|
158
|
+
--kit-color-surface-1: hsl(240 2% 17.5%);
|
|
159
|
+
--kit-color-surface-2: hsl(240 1.5% 23%);
|
|
160
|
+
--kit-color-surface-3: hsl(240 1.5% 28%);
|
|
161
|
+
--kit-color-text: hsl(0 0% 100%);
|
|
162
|
+
--kit-color-text-muted: hsl(240 3% 56%);
|
|
163
|
+
--kit-color-text-subtle: hsl(240 2.5% 38%);
|
|
164
|
+
--kit-color-text-disabled: hsl(240 1.5% 25%);
|
|
165
|
+
--kit-color-fill: hsl(240 2.5% 24%);
|
|
166
|
+
--kit-color-fill-hover: hsl(240 2.5% 28%);
|
|
167
|
+
--kit-color-fill-active: hsl(240 2.5% 31%);
|
|
168
|
+
--kit-color-border: hsl(240 2% 26%);
|
|
169
|
+
--kit-color-shadow: hsl(240 3% 11%);
|
|
170
|
+
--kit-color-accent: hsl(220 85% 65%);
|
|
171
|
+
--kit-color-on-accent: hsl(240 3% 11%);
|
|
172
|
+
--kit-color-success: hsl(145 50% 50%);
|
|
173
|
+
--kit-color-on-success: hsl(240 3% 11%);
|
|
174
|
+
--kit-color-warning: hsl(35 85% 58%);
|
|
175
|
+
--kit-color-on-warning: hsl(240 3% 11%);
|
|
176
|
+
--kit-color-error: hsl(5 70% 60%);
|
|
177
|
+
--kit-color-on-error: hsl(240 3% 11%);
|
|
178
|
+
--kit-color-info: hsl(205 65% 58%);
|
|
179
|
+
--kit-color-on-info: hsl(240 3% 11%);
|
|
180
|
+
--kit-color-focus: hsl(35 90% 62%);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
:global .outline {
|
|
184
|
+
position: absolute;
|
|
185
|
+
inset: 0;
|
|
186
|
+
border: 1px solid var(--outline-color);
|
|
187
|
+
border-radius: inherit;
|
|
188
|
+
box-sizing: border-box;
|
|
189
|
+
z-index: 1;
|
|
190
|
+
pointer-events: none;
|
|
191
|
+
}
|
|
192
|
+
:global .kit-ripple {
|
|
193
|
+
background-color: currentColor;
|
|
194
|
+
opacity: 0.1;
|
|
195
|
+
position: absolute;
|
|
196
|
+
border-radius: 50%;
|
|
197
|
+
pointer-events: none;
|
|
198
|
+
transition: 0.6s;
|
|
199
|
+
animation: animation-l-ripple var(--system-animation-ripple-duration, 0.4s) cubic-bezier(0.4, 0, 0.2, 1);
|
|
200
|
+
border-radius: 50%;
|
|
201
|
+
}
|
|
202
|
+
:global .kit-ripple--center {
|
|
203
|
+
top: 50% !important;
|
|
204
|
+
left: 50% !important;
|
|
205
|
+
translate: -50% -50% !important;
|
|
206
|
+
}
|
|
207
|
+
:global .kit-ripple--effect {
|
|
208
|
+
position: absolute;
|
|
209
|
+
left: 0;
|
|
210
|
+
right: 0;
|
|
211
|
+
top: 0;
|
|
212
|
+
bottom: 0;
|
|
213
|
+
overflow: hidden;
|
|
214
|
+
background: none;
|
|
215
|
+
pointer-events: none;
|
|
216
|
+
z-index: 999;
|
|
217
|
+
border-radius: var(--system-ripple-radius);
|
|
218
|
+
}
|
|
219
|
+
:global [data-elevation="0"],
|
|
220
|
+
:global [data-elevation-hover="0"]:hover,
|
|
221
|
+
:global [data-elevation-active="0"]:active {
|
|
222
|
+
box-shadow: none;
|
|
223
|
+
}
|
|
224
|
+
:global [data-elevation="1"],
|
|
225
|
+
:global [data-elevation-hover="1"]:hover,
|
|
226
|
+
:global [data-elevation-active="1"]:active {
|
|
227
|
+
box-shadow: 0 1px 2px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent), 0 3px 8px -2px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
228
|
+
}
|
|
229
|
+
:global [data-elevation="2"],
|
|
230
|
+
:global [data-elevation-hover="2"]:hover,
|
|
231
|
+
:global [data-elevation-active="2"]:active {
|
|
232
|
+
box-shadow: 0 1px 3px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent), 0 5px 12px -3px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
233
|
+
}
|
|
234
|
+
:global [data-elevation="3"],
|
|
235
|
+
:global [data-elevation-hover="3"]:hover,
|
|
236
|
+
:global [data-elevation-active="3"]:active {
|
|
237
|
+
box-shadow: 0 2px 4px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent), 0 8px 20px -4px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
238
|
+
}
|
|
239
|
+
:global [data-elevation="4"],
|
|
240
|
+
:global [data-elevation-hover="4"]:hover,
|
|
241
|
+
:global [data-elevation-active="4"]:active {
|
|
242
|
+
box-shadow: 0 3px 5px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent), 0 11px 26px -5px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
243
|
+
}
|
|
244
|
+
:global [data-elevation="5"],
|
|
245
|
+
:global [data-elevation-hover="5"]:hover,
|
|
246
|
+
:global [data-elevation-active="5"]:active {
|
|
247
|
+
box-shadow: 0 4px 6px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-opacity), transparent), 0 14px 32px -6px color-mix(in oklab, var(--kit-color-shadow) var(--kit-shadow-ambient-opacity), transparent);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
@keyframes -global-animation-l-ripple {
|
|
251
|
+
from {
|
|
252
|
+
scale: 0;
|
|
253
|
+
}
|
|
254
|
+
to {
|
|
255
|
+
scale: 1;
|
|
256
|
+
}
|
|
257
|
+
}</style>
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const lapikitImportsRef = "lapikit/components";
|
|
2
2
|
export declare const lapikitImportsLabsRef = "lapikit/labs/components";
|
|
3
|
+
export declare const lapikitComponentPaths: Readonly<Record<string, string>>;
|
|
4
|
+
export declare const lapikitLabsComponentPaths: Readonly<Record<string, string>>;
|
|
3
5
|
export declare const lapikitComponents: readonly string[];
|
|
4
6
|
export declare const lapikitLabsComponents: readonly string[];
|
|
5
7
|
export declare const lapikitPlugins: {
|
package/dist/constants.js
CHANGED
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
export const lapikitImportsRef = 'lapikit/components';
|
|
2
2
|
export const lapikitImportsLabsRef = 'lapikit/labs/components';
|
|
3
|
-
export const
|
|
4
|
-
'app',
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
];
|
|
38
|
-
export const lapikitLabsComponents = ['sheet'];
|
|
3
|
+
export const lapikitComponentPaths = {
|
|
4
|
+
app: 'app/app.svelte',
|
|
5
|
+
appbar: 'appbar/appbar.svelte',
|
|
6
|
+
btn: 'btn/btn.svelte',
|
|
7
|
+
icon: 'icon/icon.svelte',
|
|
8
|
+
avatar: 'avatar/avatar.svelte',
|
|
9
|
+
dropdown: 'dropdown/dropdown.svelte',
|
|
10
|
+
popover: 'popover/popover.svelte',
|
|
11
|
+
tooltip: 'tooltip/tooltip.svelte',
|
|
12
|
+
textfield: 'textfield/textfield.svelte',
|
|
13
|
+
toolbar: 'toolbar/toolbar.svelte',
|
|
14
|
+
list: 'list/list.svelte',
|
|
15
|
+
'list-item': 'list/modules/list-item.svelte',
|
|
16
|
+
dialog: 'dialog/dialog.svelte',
|
|
17
|
+
modal: 'modal/modal.svelte',
|
|
18
|
+
accordion: 'accordion/accordion.svelte',
|
|
19
|
+
'accordion-item': 'accordion/modules/accordion-item.svelte',
|
|
20
|
+
alert: 'alert/alert.svelte',
|
|
21
|
+
'aspect-ratio': 'aspect-ratio/aspect-ratio.svelte',
|
|
22
|
+
spacer: 'spacer/spacer.svelte',
|
|
23
|
+
separator: 'separator/separator.svelte',
|
|
24
|
+
chip: 'chip/chip.svelte',
|
|
25
|
+
card: 'card/card.svelte',
|
|
26
|
+
'card-title': 'card/modules/card-title.svelte',
|
|
27
|
+
'card-content': 'card/modules/card-content.svelte',
|
|
28
|
+
'card-media': 'card/modules/card-media.svelte',
|
|
29
|
+
'card-actions': 'card/modules/card-actions.svelte',
|
|
30
|
+
'card-container': 'card/modules/card-container.svelte'
|
|
31
|
+
};
|
|
32
|
+
export const lapikitLabsComponentPaths = {
|
|
33
|
+
sheet: 'sheet/sheet.svelte'
|
|
34
|
+
};
|
|
35
|
+
export const lapikitComponents = Object.keys(lapikitComponentPaths);
|
|
36
|
+
export const lapikitLabsComponents = Object.keys(lapikitLabsComponentPaths);
|
|
39
37
|
export const lapikitPlugins = {
|
|
40
38
|
repl: {
|
|
41
39
|
components: ['repl'],
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte refuses the class: and style: directives on a component. On a <kit:...> tag, Lili turns them
|
|
3
|
+
* into the s-class_ / s-style_ props the components already handle:
|
|
4
|
+
* class:active -> s-class_active={active}
|
|
5
|
+
* class:gap={4} -> s-class_gap={4} (the component gives the class gap-4)
|
|
6
|
+
* style:opacity={0} -> s-style_opacity={0}
|
|
7
|
+
* style:color="red" -> s-style_color="red"
|
|
8
|
+
* A directive with a modifier (style:color|important) is left as it is: Svelte reports it.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Rewrites the class: and style: directives of the attributes of a tag (everything after its name).
|
|
12
|
+
* The values of the other attributes are skipped, so a "class:" inside a string or an expression is kept.
|
|
13
|
+
*/
|
|
14
|
+
export declare function rewriteDirectives(attributes: string): string;
|