lapikit 0.0.0-insiders.0300a6e → 0.0.0-insiders.03495b6
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/bin/configuration.js +6 -3
- package/bin/index.js +1 -9
- package/bin/presets.js +2 -1
- package/bin/prompts.js +46 -79
- package/dist/actions/index.d.ts +0 -1
- package/dist/actions/index.js +0 -1
- package/dist/components/accordion/accordion.css +3 -7
- package/dist/components/accordion/accordion.svelte +4 -2
- package/dist/components/accordion/modules/accordion-item.svelte +3 -3
- package/dist/components/alert/alert.css +3 -10
- package/dist/components/alert/alert.svelte +3 -3
- package/dist/components/app/app.css +1 -2
- package/dist/components/appbar/appbar.css +8 -18
- package/dist/components/appbar/appbar.svelte +3 -3
- package/dist/components/aspect-ratio/aspect-ratio.svelte +0 -22
- package/dist/components/avatar/avatar.css +4 -11
- package/dist/components/avatar/avatar.svelte +3 -3
- package/dist/components/button/button.css +18 -25
- package/dist/components/button/button.svelte +3 -3
- package/dist/components/card/card.css +7 -17
- package/dist/components/card/card.svelte +3 -3
- package/dist/components/chip/chip.css +12 -19
- package/dist/components/chip/chip.svelte +3 -3
- package/dist/components/dialog/dialog.css +13 -20
- package/dist/components/dialog/dialog.svelte +3 -3
- package/dist/components/dropdown/dropdown.css +3 -12
- package/dist/components/dropdown/dropdown.svelte +3 -3
- package/dist/components/icon/icon.css +7 -8
- package/dist/components/icon/icon.svelte +1 -1
- package/dist/components/list/list.css +12 -23
- package/dist/components/list/list.svelte +3 -3
- package/dist/components/list/modules/list-item.svelte +3 -3
- package/dist/components/modal/modal.css +15 -23
- package/dist/components/modal/modal.svelte +3 -3
- package/dist/components/popover/popover.css +3 -12
- package/dist/components/popover/popover.svelte +3 -3
- package/dist/components/separator/separator.css +4 -8
- package/dist/components/separator/separator.svelte +4 -4
- package/dist/components/textfield/textfield.css +14 -21
- package/dist/components/textfield/textfield.svelte +3 -3
- package/dist/components/toolbar/toolbar.css +13 -25
- package/dist/components/toolbar/toolbar.svelte +3 -3
- package/dist/components/tooltip/tooltip.css +4 -12
- package/dist/components/tooltip/tooltip.svelte +3 -3
- package/dist/index.js +1 -1
- package/dist/internal/assets.svelte.js +3 -3
- package/dist/internal/config/presets.d.ts +127 -0
- package/dist/internal/config/presets.js +138 -0
- package/dist/internal/config/variables.d.ts +7 -0
- package/dist/internal/config/variables.js +7 -0
- package/dist/internal/core/css.d.ts +1 -0
- package/dist/internal/core/css.js +16 -0
- package/dist/internal/core/formatter/component.d.ts +5 -0
- package/dist/internal/core/formatter/component.js +66 -0
- package/dist/internal/core/formatter/device.d.ts +5 -0
- package/dist/internal/core/formatter/device.js +65 -0
- package/dist/internal/core/formatter/index.d.ts +7 -0
- package/dist/internal/core/formatter/index.js +35 -0
- package/dist/internal/core/formatter/style.d.ts +4 -0
- package/dist/internal/core/formatter/style.js +15 -0
- package/dist/internal/core/formatter/theme.d.ts +5 -0
- package/dist/internal/core/formatter/theme.js +29 -0
- package/dist/internal/core/formatter/typography.d.ts +5 -0
- package/dist/internal/core/formatter/typography.js +12 -0
- package/dist/internal/core/x11-colors.d.ts +4 -0
- package/dist/internal/core/x11-colors.js +151 -0
- package/dist/internal/helpers/colors.d.ts +1 -0
- package/dist/internal/helpers/colors.js +50 -0
- package/dist/internal/helpers/parser.d.ts +10 -0
- package/dist/internal/helpers/parser.js +93 -0
- package/dist/internal/plugins/vite.d.ts +8 -0
- package/dist/internal/plugins/vite.js +33 -0
- package/dist/internal/ripple.js +3 -3
- package/dist/internal/types/configuration.d.ts +40 -0
- package/dist/internal/types/configuration.js +1 -0
- package/dist/internal/types/index.d.ts +1 -0
- package/dist/internal/types/index.js +1 -0
- package/dist/labs/index.d.ts +4 -0
- package/dist/labs/index.js +5 -0
- package/dist/labs/my-component-style-global.svelte +6 -0
- package/dist/labs/my-component-style-global.svelte.d.ts +18 -0
- package/dist/labs/my-component-style-import.svelte +15 -0
- package/dist/labs/my-component-style-import.svelte.d.ts +18 -0
- package/dist/labs/my-component-style-mixed.svelte +23 -0
- package/dist/labs/my-component-style-mixed.svelte.d.ts +18 -0
- package/dist/labs/my-component.svelte +16 -0
- package/dist/labs/my-component.svelte.d.ts +18 -0
- package/dist/labs/style-mixed.css +7 -0
- package/dist/labs/style.css +7 -0
- package/dist/labs.css +1 -0
- package/dist/plugin/css.d.ts +1 -0
- package/dist/plugin/css.js +73 -0
- package/dist/plugin/preset-v2.d.ts +108 -0
- package/dist/plugin/preset-v2.js +126 -0
- package/dist/plugin/vitejs.d.ts +1 -2
- package/dist/plugin/vitejs.js +31 -7
- package/dist/style/css.js +1 -1
- package/dist/styles/animation.css +33 -0
- package/dist/styles/keyframes.css +30 -0
- package/dist/styles/reset.css +131 -0
- package/dist/themes.css +0 -0
- package/package.json +4 -3
- /package/dist/internal/{minify.d.ts → core/minify.d.ts} +0 -0
- /package/dist/internal/{minify.js → core/minify.js} +0 -0
- /package/dist/internal/{deepMerge.d.ts → helpers/deep-merge.d.ts} +0 -0
- /package/dist/internal/{deepMerge.js → helpers/deep-merge.js} +0 -0
package/bin/configuration.js
CHANGED
|
@@ -11,7 +11,6 @@ async function findReferenceFile(projectPath) {
|
|
|
11
11
|
await fs.access(routesPath);
|
|
12
12
|
} catch {
|
|
13
13
|
terminal('error', `Lapikit cannot find the routes/ directory.`);
|
|
14
|
-
// throw new Error('Lapikit cannot find the routes/ directory.');
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
const layoutFile = path.join(routesPath, '+layout.svelte');
|
|
@@ -248,7 +247,7 @@ async function addLapikitToViteConfig(viteConfigFile, pathConfig, typescript) {
|
|
|
248
247
|
}
|
|
249
248
|
|
|
250
249
|
export async function initConfiguration(options) {
|
|
251
|
-
const { typescript, pathConfig, formatCSS } = options;
|
|
250
|
+
const { typescript, pathConfig, formatCSS, pathCSS } = options;
|
|
252
251
|
const ext = typescript ? 'ts' : 'js';
|
|
253
252
|
const targetDir = path.resolve(process.cwd(), pathConfig);
|
|
254
253
|
const targetFile = path.join(targetDir, `lapikit.${ext}`);
|
|
@@ -289,10 +288,14 @@ export async function initConfiguration(options) {
|
|
|
289
288
|
throw error;
|
|
290
289
|
}
|
|
291
290
|
|
|
291
|
+
// Add Import Lapikit css
|
|
292
|
+
if (formatCSS !== 'css') {
|
|
293
|
+
console.log('need custom import (Preview)', pathCSS);
|
|
294
|
+
}
|
|
292
295
|
// Add lapikit to vite.config file
|
|
293
296
|
try {
|
|
294
297
|
const viteConfigFile = await findViteConfigFile(process.cwd(), typescript);
|
|
295
|
-
await addLapikitToViteConfig(viteConfigFile);
|
|
298
|
+
await addLapikitToViteConfig(viteConfigFile, pathConfig, typescript);
|
|
296
299
|
} catch (error) {
|
|
297
300
|
terminal('warn', `Warning: Could not update vite.config file: ${error.message}`);
|
|
298
301
|
terminal('error', `Error adding lapikit to vite config: ${error.message}`);
|
package/bin/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { initConfiguration } from './configuration.js';
|
|
3
3
|
import { ansi, terminal } from './helper.js';
|
|
4
|
-
import { legacyConfiguration } from './legacy.js';
|
|
5
4
|
import { initPrompts } from './prompts.js';
|
|
6
5
|
|
|
7
6
|
async function run() {
|
|
@@ -18,14 +17,7 @@ async function run() {
|
|
|
18
17
|
|
|
19
18
|
const promptsConfig = await initPrompts();
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
await legacyConfiguration(promptsConfig);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (promptsConfig.env === 'experimental') {
|
|
26
|
-
terminal('warn', `Experimental mode is not yet implemented.`);
|
|
27
|
-
await initConfiguration(promptsConfig);
|
|
28
|
-
}
|
|
20
|
+
await initConfiguration(promptsConfig);
|
|
29
21
|
}
|
|
30
22
|
|
|
31
23
|
run()
|
package/bin/presets.js
CHANGED
|
@@ -8,7 +8,8 @@ function presets({ adapterCSS }) {
|
|
|
8
8
|
|
|
9
9
|
if (adapterCSS === 'css') {
|
|
10
10
|
content += `// Styles\n`;
|
|
11
|
-
content += `import 'lapikit/
|
|
11
|
+
content += `import 'lapikit/styles';\n`;
|
|
12
|
+
content += `import 'lapikit/themes';\n\n`;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
content += `// Composables\n`;
|
package/bin/prompts.js
CHANGED
|
@@ -16,85 +16,52 @@ export async function initPrompts() {
|
|
|
16
16
|
terminal('warn', `installation canceled.`);
|
|
17
17
|
process.exit(0);
|
|
18
18
|
}
|
|
19
|
-
// temps with legacy and new process install
|
|
20
|
-
const { type } = await prompts({
|
|
21
|
-
type: 'select',
|
|
22
|
-
name: 'type',
|
|
23
|
-
message: 'Select installation type:',
|
|
24
|
-
choices: [
|
|
25
|
-
{ title: 'Classic install with lapikit.config.js', value: 'current' },
|
|
26
|
-
{
|
|
27
|
-
title: 'Preview install with new plugin/lapikit.(js|ts) <experimental>',
|
|
28
|
-
value: 'experimental'
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
if (type === 'current') {
|
|
34
|
-
// Classic install
|
|
35
|
-
const settings = await prompts([
|
|
36
|
-
{
|
|
37
|
-
type: 'text',
|
|
38
|
-
name: 'pathCSS',
|
|
39
|
-
message: 'Where would you like to import the lapikit CSS files?',
|
|
40
|
-
initial: 'src/app.css',
|
|
41
|
-
validate: (value) =>
|
|
42
|
-
value.startsWith('src/') ? true : 'Please provide a valid path starting with src/'
|
|
43
|
-
}
|
|
44
|
-
]);
|
|
45
19
|
|
|
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
|
-
initial: 'src/app.css',
|
|
90
|
-
validate: (value) =>
|
|
91
|
-
value.startsWith('src/') ? true : 'Please provide a valid path starting with src/'
|
|
92
|
-
}
|
|
93
|
-
]);
|
|
20
|
+
// Preview install
|
|
21
|
+
let settings = await prompts([
|
|
22
|
+
{
|
|
23
|
+
type: 'text',
|
|
24
|
+
name: 'pathConfig',
|
|
25
|
+
message: 'Where would you like to install the lapikit configuration files?',
|
|
26
|
+
initial: 'src/plugins',
|
|
27
|
+
validate: (value) =>
|
|
28
|
+
value.startsWith('src/') ? true : 'Please provide a valid path starting with src/'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: 'toggle',
|
|
32
|
+
name: 'typescript',
|
|
33
|
+
message: 'Use TypeScript?',
|
|
34
|
+
initial: true,
|
|
35
|
+
active: 'Yes',
|
|
36
|
+
inactive: 'No'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'select',
|
|
40
|
+
name: 'formatCSS',
|
|
41
|
+
message: 'What is your CSS format used on your app?',
|
|
42
|
+
choices: [
|
|
43
|
+
{ title: 'Basic (classic import)', value: 'css' },
|
|
44
|
+
{
|
|
45
|
+
title: 'TailwindCSS (v4)',
|
|
46
|
+
value: 'tailwind-v4'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: 'UnoCSS',
|
|
50
|
+
value: 'unocss'
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: (prev) => (prev !== 'css' ? 'text' : null),
|
|
56
|
+
name: 'pathCSS',
|
|
57
|
+
message: 'Where would you like to import the lapikit CSS files?',
|
|
58
|
+
initial: 'src/app.css',
|
|
59
|
+
validate: (value) =>
|
|
60
|
+
value.startsWith('src/') ? true : 'Please provide a valid path starting with src/'
|
|
61
|
+
}
|
|
62
|
+
]);
|
|
94
63
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
};
|
|
99
|
-
}
|
|
64
|
+
return {
|
|
65
|
+
...settings
|
|
66
|
+
};
|
|
100
67
|
}
|
package/dist/actions/index.d.ts
CHANGED
package/dist/actions/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
.kit-accordion {
|
|
2
|
-
--accordion-color: var(--on, var(--kit-on-container));
|
|
3
|
-
--accordion-background: var(--base, var(--kit-container));
|
|
4
|
-
--accordion-radius: var(--shape, var(--kit-radius-md));
|
|
5
|
-
|
|
6
2
|
display: flex;
|
|
7
3
|
flex-wrap: wrap;
|
|
8
4
|
justify-content: center;
|
|
@@ -46,9 +42,9 @@
|
|
|
46
42
|
position: relative;
|
|
47
43
|
transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
|
|
48
44
|
transition-property: margin-top, border-radius, border, max-width;
|
|
49
|
-
border-radius: var(--
|
|
50
|
-
color: var(--
|
|
51
|
-
background-color: var(--
|
|
45
|
+
border-radius: var(--accordion-shape, var(--system-shape-md));
|
|
46
|
+
color: var(--accordion-color, var(--system-label));
|
|
47
|
+
background-color: var(--accordion-background, var(--system-secondary-background));
|
|
52
48
|
/* transition:
|
|
53
49
|
color 0.5s,
|
|
54
50
|
background-color 0.5s; */
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
background,
|
|
13
13
|
spacer,
|
|
14
14
|
hideIcon,
|
|
15
|
+
rounded,
|
|
15
16
|
...rest
|
|
16
17
|
}: AccordionProps = $props();
|
|
17
18
|
|
|
@@ -30,8 +31,9 @@
|
|
|
30
31
|
dark && 'dark',
|
|
31
32
|
rest.class
|
|
32
33
|
]}
|
|
33
|
-
style:--
|
|
34
|
-
style:--
|
|
34
|
+
style:--accordion-shape={assets.shape(rounded)}
|
|
35
|
+
style:--accordion-background={assets.color(background)}
|
|
36
|
+
style:--accordion-color={assets.color(color)}
|
|
35
37
|
>
|
|
36
38
|
{@render children?.()}
|
|
37
39
|
</svelte:element>
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
open && 'kit-accordion-item--active',
|
|
50
50
|
rest.class
|
|
51
51
|
]}
|
|
52
|
-
style:--
|
|
53
|
-
style:--
|
|
54
|
-
style:--
|
|
52
|
+
style:--accordion--item-shape={assets.shape(rounded)}
|
|
53
|
+
style:--accordion--item-background={assets.color(background)}
|
|
54
|
+
style:--accordion--item-color={assets.color(color)}
|
|
55
55
|
>
|
|
56
56
|
<button
|
|
57
57
|
class={[
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/* root */
|
|
2
|
-
.kit-alert {
|
|
3
|
-
--alert-color: var(--on, var(--kit-on-container));
|
|
4
|
-
--alert-background: var(--base, var(--kit-container));
|
|
5
|
-
--alert-radius: var(--shape, var(--kit-radius-md));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
.kit-alert {
|
|
9
2
|
display: grid;
|
|
10
3
|
flex: 1 1;
|
|
@@ -15,9 +8,9 @@
|
|
|
15
8
|
position: relative;
|
|
16
9
|
padding: 1rem;
|
|
17
10
|
overflow: hidden;
|
|
18
|
-
color: var(--alert-color);
|
|
19
|
-
background-color: var(--alert-background);
|
|
20
|
-
border-radius: var(--alert-
|
|
11
|
+
color: var(--alert-color, var(--system-label));
|
|
12
|
+
background-color: var(--alert-background, var(--system-tertiary-background));
|
|
13
|
+
border-radius: var(--alert-shape, var(--system-shape-md));
|
|
21
14
|
line-height: 0;
|
|
22
15
|
}
|
|
23
16
|
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
rest.class
|
|
52
52
|
]}
|
|
53
53
|
role="alert"
|
|
54
|
-
style:--
|
|
55
|
-
style:--
|
|
56
|
-
style:--shape={assets.shape(rounded)}
|
|
54
|
+
style:--alert-background={assets.color(background)}
|
|
55
|
+
style:--alert-color={assets.color(color)}
|
|
56
|
+
style:--alert-shape={assets.shape(rounded)}
|
|
57
57
|
>
|
|
58
58
|
{#if prepend}
|
|
59
59
|
<div class="kit-alert--prepend">
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
left: 0;
|
|
5
5
|
height: 100%;
|
|
6
6
|
width: 100%;
|
|
7
|
-
background-color: color-mix(in oklab, var(--kit-
|
|
7
|
+
background-color: color-mix(in oklab, var(--kit-scrim) 70%, transparent);
|
|
8
8
|
z-index: 9000;
|
|
9
9
|
cursor: default;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.kit-overlay.kit-overlay--persistent {
|
|
13
|
-
/* pointer-events: none; */
|
|
14
13
|
user-select: none;
|
|
15
14
|
cursor: default;
|
|
16
15
|
}
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
/* root default*/
|
|
2
1
|
.kit-appbar {
|
|
3
|
-
--appbar-
|
|
4
|
-
--appbar-background: var(--base, var(--kit-surface));
|
|
5
|
-
--appbar-radius: var(--shape, 0);
|
|
6
|
-
--appbar-padding-wrapper: var(--kit-spacing) * 4;
|
|
7
|
-
}
|
|
2
|
+
--appbar-padding-wrapper: var(--system-spacing) * 4;
|
|
8
3
|
|
|
9
|
-
.kit-appbar {
|
|
10
4
|
display: flex;
|
|
11
5
|
align-items: center;
|
|
12
6
|
border-style: solid;
|
|
13
7
|
border-width: 1px;
|
|
14
|
-
border-radius: var(--appbar-
|
|
15
|
-
color: var(--appbar-color);
|
|
16
|
-
background-color: var(--appbar-background);
|
|
17
|
-
border-color: var(--appbar-background);
|
|
18
|
-
/* transition:
|
|
19
|
-
color 0.5s,
|
|
20
|
-
border-color 0.5s,
|
|
21
|
-
background-color 0.5s; */
|
|
8
|
+
border-radius: var(--appbar-shape);
|
|
9
|
+
color: var(--appbar-color, var(--system-label));
|
|
10
|
+
background-color: var(--appbar-background, var(--system-tertiary-background));
|
|
11
|
+
border-color: var(--appbar-background, var(--system-tertiary-background));
|
|
22
12
|
}
|
|
23
13
|
|
|
24
14
|
/* wrapper */
|
|
@@ -34,15 +24,15 @@
|
|
|
34
24
|
/* density */
|
|
35
25
|
.kit-appbar[breakpoint]kit-appbar--density-default {
|
|
36
26
|
height: 4rem;
|
|
37
|
-
padding-inline: calc(var(--
|
|
27
|
+
padding-inline: calc(var(--system-spacing) * 1.5);
|
|
38
28
|
}
|
|
39
29
|
|
|
40
30
|
.kit-appbar[breakpoint]kit-appbar--density-compact {
|
|
41
31
|
height: 3.5rem;
|
|
42
|
-
padding-inline: calc(var(--
|
|
32
|
+
padding-inline: calc(var(--system-spacing) * 0.75);
|
|
43
33
|
}
|
|
44
34
|
|
|
45
35
|
.kit-appbar[breakpoint]kit-appbar--density-comfortable {
|
|
46
36
|
height: 4.5rem;
|
|
47
|
-
padding-inline: calc(var(--
|
|
37
|
+
padding-inline: calc(var(--system-spacing) * 2.25);
|
|
48
38
|
}
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
density && assets.className('appbar', 'density', density),
|
|
31
31
|
rest.class
|
|
32
32
|
]}
|
|
33
|
-
style:--
|
|
34
|
-
style:--
|
|
35
|
-
style:--shape={assets.shape(rounded)}
|
|
33
|
+
style:--appbar-background={assets.color(background)}
|
|
34
|
+
style:--appbar-color={assets.color(color)}
|
|
35
|
+
style:--appbar-shape={assets.shape(rounded)}
|
|
36
36
|
>
|
|
37
37
|
<div class={['kit-appbar--wrapper', classContent]}>
|
|
38
38
|
{@render children?.()}
|
|
@@ -23,25 +23,3 @@
|
|
|
23
23
|
<div class="kit-aspect-ratio--sizer" style={`padding-bottom: ${paddingBottom}%;`}></div>
|
|
24
24
|
{@render children?.()}
|
|
25
25
|
</div>
|
|
26
|
-
|
|
27
|
-
<style>
|
|
28
|
-
.kit-aspect-ratio {
|
|
29
|
-
display: flex;
|
|
30
|
-
flex: 1 0 auto;
|
|
31
|
-
max-height: 100%;
|
|
32
|
-
max-width: 100%;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
position: relative;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.kit-aspect-ratio--inline {
|
|
38
|
-
display: inline-flex;
|
|
39
|
-
flex: 0 0 auto;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.kit-aspect-ratio--sizer {
|
|
43
|
-
flex: 1 0 0px;
|
|
44
|
-
transition: padding-bottom 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
.kit-avatar {
|
|
2
|
-
--avatar-color: var(--on, var(--kit-on-container));
|
|
3
|
-
--avatar-background: var(--base, var(--kit-container));
|
|
4
|
-
--avatar-radius: var(--shape, var(--kit-radius-full));
|
|
5
|
-
|
|
6
2
|
display: flex;
|
|
7
3
|
align-items: center;
|
|
8
4
|
justify-content: center;
|
|
@@ -11,15 +7,12 @@
|
|
|
11
7
|
padding-bottom: var(--avatar-spacing-x);
|
|
12
8
|
padding-right: var(--avatar-spacing-y);
|
|
13
9
|
padding-left: var(--avatar-spacing-y);
|
|
14
|
-
|
|
15
10
|
border-width: 1px;
|
|
16
11
|
border-style: solid;
|
|
17
|
-
border-radius: var(--avatar-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
color: var(--avatar-
|
|
21
|
-
background-color: var(--avatar-background);
|
|
22
|
-
border-color: var(--avatar-background);
|
|
12
|
+
border-radius: var(--avatar-shape);
|
|
13
|
+
color: var(--avatar-color, var(--system-label));
|
|
14
|
+
background-color: var(--avatar-background, var(--system-gray-4));
|
|
15
|
+
border-color: var(--avatar-background, var(--system-gray-4));
|
|
23
16
|
}
|
|
24
17
|
|
|
25
18
|
.kit-avatar.kit-avatar--image {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
density && assets.className('avatar', 'density', density),
|
|
35
35
|
rest.class
|
|
36
36
|
]}
|
|
37
|
-
style:--
|
|
38
|
-
style:--
|
|
39
|
-
style:--shape={assets.shape(rounded)}
|
|
37
|
+
style:--avatar-background={assets.color(background)}
|
|
38
|
+
style:--avatar-color={assets.color(color)}
|
|
39
|
+
style:--avatar-shape={assets.shape(rounded)}
|
|
40
40
|
>
|
|
41
41
|
{#if src}
|
|
42
42
|
<img {src} {alt} />
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/* root */
|
|
2
|
-
.kit-button {
|
|
3
|
-
--button-color: var(--on, var(--kit-on-container));
|
|
4
|
-
--button-background: var(--base, var(--kit-container));
|
|
5
|
-
--button-radius: var(--shape, var(--kit-radius-md));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
.kit-button {
|
|
9
2
|
position: relative;
|
|
10
3
|
cursor: pointer;
|
|
@@ -14,8 +7,8 @@
|
|
|
14
7
|
padding-bottom: var(--button-spacing-x);
|
|
15
8
|
padding-right: var(--button-spacing-y);
|
|
16
9
|
padding-left: var(--button-spacing-y);
|
|
17
|
-
border-radius: var(--button-
|
|
18
|
-
color: var(--button-color);
|
|
10
|
+
border-radius: var(--button-shape);
|
|
11
|
+
color: var(--button-color, var(--system-label));
|
|
19
12
|
font-weight: 500;
|
|
20
13
|
text-decoration: none;
|
|
21
14
|
}
|
|
@@ -29,8 +22,8 @@
|
|
|
29
22
|
align-items: center;
|
|
30
23
|
justify-content: center;
|
|
31
24
|
white-space: nowrap;
|
|
32
|
-
gap: calc(var(--
|
|
33
|
-
font-size: calc(var(--
|
|
25
|
+
gap: calc(var(--system-spacing) * var(--button-multiplier-gap));
|
|
26
|
+
font-size: calc(var(--system-spacing) * var(--button-multiplier-font-size));
|
|
34
27
|
}
|
|
35
28
|
|
|
36
29
|
.kit-button::after {
|
|
@@ -106,49 +99,49 @@
|
|
|
106
99
|
|
|
107
100
|
/* density */
|
|
108
101
|
.kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-default {
|
|
109
|
-
height: calc(var(--
|
|
102
|
+
height: calc(var(--system-spacing) * var(--button-multiplier-x));
|
|
110
103
|
--button-spacing-x: 0;
|
|
111
|
-
--button-spacing-y: calc(var(--
|
|
104
|
+
--button-spacing-y: calc(var(--system-spacing) * var(--button-multiplier-y));
|
|
112
105
|
}
|
|
113
106
|
.kit-button.kit-button--icon[breakpoint]kit-button--density-default {
|
|
114
|
-
height: calc(var(--
|
|
115
|
-
width: calc(var(--
|
|
107
|
+
height: calc(var(--system-spacing) * var(--button-multiplier-x));
|
|
108
|
+
width: calc(var(--system-spacing) * var(--button-multiplier-x));
|
|
116
109
|
--button-spacing-x: 0;
|
|
117
110
|
--button-spacing-y: 0;
|
|
118
111
|
}
|
|
119
112
|
|
|
120
113
|
.kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-compact {
|
|
121
|
-
height: calc(var(--
|
|
114
|
+
height: calc(var(--system-spacing) * var(--button-multiplier-x) - 0.25rem);
|
|
122
115
|
--button-spacing-x: 0;
|
|
123
|
-
--button-spacing-y: calc(var(--
|
|
116
|
+
--button-spacing-y: calc(var(--system-spacing) * var(--button-multiplier-y) - 0.25rem);
|
|
124
117
|
}
|
|
125
118
|
.kit-button.kit-button--icon[breakpoint]kit-button--density-compact {
|
|
126
|
-
height: calc(var(--
|
|
127
|
-
width: calc(var(--
|
|
119
|
+
height: calc(var(--system-spacing) * var(--button-multiplier-x) - 0.25rem);
|
|
120
|
+
width: calc(var(--system-spacing) * var(--button-multiplier-x) - 0.25rem);
|
|
128
121
|
--button-spacing-x: 0;
|
|
129
122
|
--button-spacing-y: 0;
|
|
130
123
|
}
|
|
131
124
|
|
|
132
125
|
.kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-comfortable {
|
|
133
|
-
height: calc(var(--
|
|
126
|
+
height: calc(var(--system-spacing) * var(--button-multiplier-x) + 0.25rem);
|
|
134
127
|
--button-spacing-x: 0;
|
|
135
|
-
--button-spacing-y: calc(var(--
|
|
128
|
+
--button-spacing-y: calc(var(--system-spacing) * var(--button-multiplier-y) + 0.25rem);
|
|
136
129
|
}
|
|
137
130
|
.kit-button.kit-button--icon[breakpoint]kit-button--density-comfortable {
|
|
138
|
-
height: calc(var(--
|
|
139
|
-
width: calc(var(--
|
|
131
|
+
height: calc(var(--system-spacing) * var(--button-multiplier-x) + 0.25rem);
|
|
132
|
+
width: calc(var(--system-spacing) * var(--button-multiplier-x) + 0.25rem);
|
|
140
133
|
--button-spacing-x: 0;
|
|
141
134
|
--button-spacing-y: 0;
|
|
142
135
|
}
|
|
143
136
|
|
|
144
137
|
/* variant */
|
|
145
138
|
.kit-button[breakpoint]kit-button--variant-filled {
|
|
146
|
-
background-color: var(--button-background);
|
|
139
|
+
background-color: var(--button-background, var(--system-secondary-background));
|
|
147
140
|
}
|
|
148
141
|
|
|
149
142
|
.kit-button[breakpoint]kit-button--variant-outline {
|
|
150
143
|
--button-color: var(--on, var(--kit-on-container));
|
|
151
|
-
background-color: var(--button-background);
|
|
144
|
+
background-color: var(--button-background, var(--system-secondary-background));
|
|
152
145
|
}
|
|
153
146
|
.kit-button[breakpoint]kit-button--variant-outline::before {
|
|
154
147
|
content: '';
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
component: 'button',
|
|
69
69
|
disabled: noRipple || disabled
|
|
70
70
|
}}
|
|
71
|
-
style:--
|
|
72
|
-
style:--
|
|
73
|
-
style:--shape={assets.shape(rounded)}
|
|
71
|
+
style:--button-background={assets.color(background)}
|
|
72
|
+
style:--button-color={assets.color(color)}
|
|
73
|
+
style:--button-shape={assets.shape(rounded)}
|
|
74
74
|
>
|
|
75
75
|
{#if loading}
|
|
76
76
|
<div class="kit-button-loading">
|
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
/* root */
|
|
2
|
-
.kit-card {
|
|
3
|
-
--card-color: var(--on, var(--kit-on-surface));
|
|
4
|
-
--card-background: var(--base, var(--kit-surface));
|
|
5
|
-
--card-radius: var(--shape, var(--kit-radius-md));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
.kit-card {
|
|
9
2
|
position: relative;
|
|
10
3
|
display: flex;
|
|
11
4
|
flex-direction: column;
|
|
12
5
|
text-align: start;
|
|
13
6
|
overflow: hidden;
|
|
14
|
-
/* transition:
|
|
15
|
-
color 0.5s,
|
|
16
|
-
background-color 0.5s; */
|
|
17
7
|
padding-top: var(--card-spacing-x);
|
|
18
8
|
padding-bottom: var(--card-spacing-x);
|
|
19
9
|
padding-right: var(--card-spacing-y);
|
|
20
10
|
padding-left: var(--card-spacing-y);
|
|
21
|
-
border-radius: var(--card-
|
|
11
|
+
border-radius: var(--card-shape, var(--system-shape-md));
|
|
22
12
|
font-weight: 500;
|
|
23
|
-
color: var(--card-color);
|
|
13
|
+
color: var(--card-color, var(--system-label));
|
|
24
14
|
text-decoration: none;
|
|
25
15
|
}
|
|
26
16
|
|
|
@@ -50,21 +40,21 @@
|
|
|
50
40
|
|
|
51
41
|
/* density */
|
|
52
42
|
.kit-card[breakpoint]kit-card--density-default {
|
|
53
|
-
--card-spacing-x: calc(var(--
|
|
54
|
-
--card-spacing-y: calc(var(--
|
|
43
|
+
--card-spacing-x: calc(var(--system-spacing) * 2);
|
|
44
|
+
--card-spacing-y: calc(var(--system-spacing) * 2);
|
|
55
45
|
}
|
|
56
46
|
.kit-card[breakpoint]kit-card--density-compact {
|
|
57
47
|
--card-spacing-x: 0;
|
|
58
48
|
--card-spacing-y: 0;
|
|
59
49
|
}
|
|
60
50
|
.kit-card[breakpoint]kit-card--density-comfortable {
|
|
61
|
-
--card-spacing-x: calc(var(--
|
|
62
|
-
--card-spacing-y: calc(var(--
|
|
51
|
+
--card-spacing-x: calc(var(--system-spacing) * 4);
|
|
52
|
+
--card-spacing-y: calc(var(--system-spacing) * 4);
|
|
63
53
|
}
|
|
64
54
|
|
|
65
55
|
/* variant */
|
|
66
56
|
.kit-card[breakpoint]kit-card--variant-filled {
|
|
67
|
-
background-color: var(--card-background);
|
|
57
|
+
background-color: var(--card-background, var(--system-secondary-background));
|
|
68
58
|
}
|
|
69
59
|
|
|
70
60
|
.kit-card[breakpoint]kit-card--variant-outline {
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
component: 'card',
|
|
56
56
|
disabled: noRipple || disabled || !isClickable
|
|
57
57
|
}}
|
|
58
|
-
style:--
|
|
59
|
-
style:--
|
|
60
|
-
style:--shape={assets.shape(rounded)}
|
|
58
|
+
style:--card-background={assets.color(background)}
|
|
59
|
+
style:--card-color={assets.color(color)}
|
|
60
|
+
style:--card-shape={assets.shape(rounded)}
|
|
61
61
|
>
|
|
62
62
|
{@render children?.()}
|
|
63
63
|
</svelte:element>
|