lapikit 0.0.0-insiders.f502b02 → 0.0.0-insiders.f81b991
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/lapikit.js +3 -2
- package/dist/assets/icons/arrow-down.svelte +2 -0
- package/dist/assets/icons/arrow-down.svelte.d.ts +6 -14
- package/dist/assets/icons/arrow-up.svelte +2 -0
- package/dist/assets/icons/arrow-up.svelte.d.ts +6 -14
- package/dist/assets/icons/close-fill.svelte +2 -0
- package/dist/assets/icons/close-fill.svelte.d.ts +6 -14
- package/dist/assets/icons/loading-fill.svelte +2 -0
- package/dist/assets/icons/loading-fill.svelte.d.ts +6 -14
- package/dist/components/accordion/accordion.css +6 -6
- package/dist/components/alert/alert.css +5 -5
- package/dist/components/app/app.css +1 -1
- package/dist/components/appbar/appbar.css +2 -2
- package/dist/components/appbar/appbar.svelte +0 -1
- package/dist/components/aspect-ratio/aspect-ratio.svelte +0 -1
- package/dist/components/avatar/avatar.css +5 -5
- package/dist/components/button/button.css +27 -24
- package/dist/components/button/button.svelte +8 -12
- package/dist/components/button/types.d.ts +2 -2
- package/dist/components/card/card.css +64 -58
- package/dist/components/card/card.svelte +14 -1
- package/dist/components/card/types.d.ts +1 -1
- package/dist/components/chip/chip.css +112 -81
- package/dist/components/chip/chip.svelte +18 -7
- package/dist/components/chip/types.d.ts +2 -1
- package/dist/components/dialog/dialog.css +2 -2
- package/dist/components/dropdown/dropdown.css +4 -4
- package/dist/components/icon/icon.css +1 -1
- package/dist/components/list/list.css +145 -119
- package/dist/components/list/list.svelte +1 -3
- package/dist/components/list/modules/list-item.svelte +9 -1
- package/dist/components/list/types.d.ts +2 -5
- package/dist/components/modal/modal.css +9 -6
- package/dist/components/modal/modal.svelte +1 -0
- package/dist/components/popover/popover.css +4 -4
- package/dist/components/separator/separator.css +1 -1
- package/dist/components/toolbar/toolbar.css +5 -5
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/internal/assets.svelte.js +2 -0
- package/dist/internal/ripple.d.ts +1 -0
- package/dist/internal/ripple.js +3 -0
- package/dist/style/animation.css +2 -0
- package/dist/style/normalize.css +2 -0
- package/dist/style/parser/color.js +2 -2
- package/package.json +2 -1
package/bin/lapikit.js
CHANGED
|
@@ -35,7 +35,7 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
|
35
35
|
terminal('error', `failed to create configuration file:\n\n ${error}`);
|
|
36
36
|
terminal(
|
|
37
37
|
'warn',
|
|
38
|
-
`you can create lapikit.config.js manually, please visite https://
|
|
38
|
+
`you can create lapikit.config.js manually, please visite https://lapikit.dev/docs/getting-started for more information`
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -44,9 +44,10 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
|
44
44
|
|
|
45
45
|
terminal(
|
|
46
46
|
'info',
|
|
47
|
-
`${ansi.bold.blue('Thank to use lapikit, discover all posibility with lapikit on https://
|
|
47
|
+
`${ansi.bold.blue('Thank to use lapikit, discover all posibility with lapikit on https://lapikit.dev')}\n\n`
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
+
console.log('Website: https://lapikit.dev');
|
|
50
51
|
console.log('Github: https://github.com/nycolaide/lapikit');
|
|
51
52
|
console.log('Support the developement: https://buymeacoffee.com/nycolaide');
|
|
52
53
|
} else {
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
export default ArrowDown;
|
|
2
|
-
type ArrowDown = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const ArrowDown: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
1
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
-
new (options: import(
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
16
3
|
$$bindings?: Bindings;
|
|
17
4
|
} & Exports;
|
|
18
5
|
(internal: unknown, props: {
|
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
24
11
|
};
|
|
25
12
|
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
14
|
+
declare const ArrowDown: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type ArrowDown = InstanceType<typeof ArrowDown>;
|
|
18
|
+
export default ArrowDown;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
export default ArrowUp;
|
|
2
|
-
type ArrowUp = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const ArrowUp: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
1
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
-
new (options: import(
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
16
3
|
$$bindings?: Bindings;
|
|
17
4
|
} & Exports;
|
|
18
5
|
(internal: unknown, props: {
|
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
24
11
|
};
|
|
25
12
|
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
14
|
+
declare const ArrowUp: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type ArrowUp = InstanceType<typeof ArrowUp>;
|
|
18
|
+
export default ArrowUp;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
export default CloseFill;
|
|
2
|
-
type CloseFill = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const CloseFill: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
1
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
-
new (options: import(
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
16
3
|
$$bindings?: Bindings;
|
|
17
4
|
} & Exports;
|
|
18
5
|
(internal: unknown, props: {
|
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
24
11
|
};
|
|
25
12
|
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
14
|
+
declare const CloseFill: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type CloseFill = InstanceType<typeof CloseFill>;
|
|
18
|
+
export default CloseFill;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
export default LoadingFill;
|
|
2
|
-
type LoadingFill = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const LoadingFill: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
1
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
-
new (options: import(
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
16
3
|
$$bindings?: Bindings;
|
|
17
4
|
} & Exports;
|
|
18
5
|
(internal: unknown, props: {
|
|
@@ -24,3 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
24
11
|
};
|
|
25
12
|
z_$$bindings?: Bindings;
|
|
26
13
|
}
|
|
14
|
+
declare const LoadingFill: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type LoadingFill = InstanceType<typeof LoadingFill>;
|
|
18
|
+
export default LoadingFill;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.kit-accordion {
|
|
2
|
-
--accordion-color: var(--on, var(--kit-on-
|
|
3
|
-
--accordion-background: var(--base, var(--kit-
|
|
2
|
+
--accordion-color: var(--on, var(--kit-on-container));
|
|
3
|
+
--accordion-background: var(--base, var(--kit-container));
|
|
4
4
|
--accordion-radius: var(--shape, var(--kit-radius-md));
|
|
5
5
|
|
|
6
6
|
display: flex;
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
|
|
48
48
|
transition-property: margin-top, border-radius, border, max-width;
|
|
49
49
|
border-radius: var(--shape, var(--accordion-radius, var(--kit-radius-md)));
|
|
50
|
-
color: var(--on, var(--accordion-color, var(--kit-on-
|
|
51
|
-
background-color: var(--base, var(--accordion-background, var(--kit-
|
|
52
|
-
transition:
|
|
50
|
+
color: var(--on, var(--accordion-color, var(--kit-on-container)));
|
|
51
|
+
background-color: var(--base, var(--accordion-background, var(--kit-container)));
|
|
52
|
+
/* transition:
|
|
53
53
|
color 0.5s,
|
|
54
|
-
background-color 0.5s;
|
|
54
|
+
background-color 0.5s; */
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.kit-accordion .kit-accordion-item > button,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.kit-alert {
|
|
2
|
-
--alert-color: var(--on, var(--kit-on-
|
|
3
|
-
--alert-background: var(--base, var(--kit-
|
|
2
|
+
--alert-color: var(--on, var(--kit-on-container));
|
|
3
|
+
--alert-background: var(--base, var(--kit-container));
|
|
4
4
|
--alert-radius: var(--shape, var(--kit-radius-md));
|
|
5
5
|
|
|
6
6
|
display: grid;
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
grid-template-areas:
|
|
9
9
|
'prepend content append close'
|
|
10
10
|
'. content . .';
|
|
11
|
-
grid-template-columns: max-content auto max-content max-content;
|
|
11
|
+
/* grid-template-columns: max-content auto max-content max-content; */ /* bug */
|
|
12
12
|
position: relative;
|
|
13
13
|
padding: 1rem;
|
|
14
14
|
overflow: hidden;
|
|
15
15
|
color: var(--alert-color);
|
|
16
16
|
background-color: var(--alert-background);
|
|
17
17
|
border-radius: var(--alert-radius);
|
|
18
|
-
transition:
|
|
18
|
+
/* transition:
|
|
19
19
|
color 0.5s,
|
|
20
|
-
background-color 0.5s;
|
|
20
|
+
background-color 0.5s; */
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.kit-alert .kit-alert--underlay {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
color: var(--appbar-color);
|
|
16
16
|
background-color: var(--appbar-background);
|
|
17
17
|
border-color: var(--appbar-background);
|
|
18
|
-
transition:
|
|
18
|
+
/* transition:
|
|
19
19
|
color 0.5s,
|
|
20
20
|
border-color 0.5s,
|
|
21
|
-
background-color 0.5s;
|
|
21
|
+
background-color 0.5s; */
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/* wrapper */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.kit-avatar {
|
|
2
|
-
--avatar-color: var(--on, var(--kit-on-
|
|
3
|
-
--avatar-background: var(--base, var(--kit-
|
|
2
|
+
--avatar-color: var(--on, var(--kit-on-container));
|
|
3
|
+
--avatar-background: var(--base, var(--kit-container));
|
|
4
4
|
--avatar-radius: var(--shape, var(--kit-radius-full));
|
|
5
5
|
|
|
6
6
|
display: flex;
|
|
@@ -91,19 +91,19 @@
|
|
|
91
91
|
|
|
92
92
|
/* variant */
|
|
93
93
|
.kit-avatar[breakpoint]kit-avatar--variant-outline {
|
|
94
|
-
--avatar-color: var(--base, var(--kit-
|
|
94
|
+
--avatar-color: var(--base, var(--kit-container));
|
|
95
95
|
background-color: transparent;
|
|
96
96
|
border: 1px solid currentColor;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.kit-avatar[breakpoint]kit-avatar--variant-text {
|
|
100
|
-
--avatar-color: var(--base, var(--kit-
|
|
100
|
+
--avatar-color: var(--base, var(--kit-container));
|
|
101
101
|
background-color: transparent;
|
|
102
102
|
border-color: transparent;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
.kit-avatar[breakpoint]kit-avatar--variant-dash {
|
|
106
|
-
--avatar-color: var(--base, var(--kit-
|
|
106
|
+
--avatar-color: var(--base, var(--kit-container));
|
|
107
107
|
background-color: transparent;
|
|
108
108
|
border: 1px dashed currentColor;
|
|
109
109
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* root */
|
|
2
2
|
.kit-button {
|
|
3
|
-
--button-color: var(--on, var(--kit-on-
|
|
4
|
-
--button-background: var(--base, var(--kit-
|
|
3
|
+
--button-color: var(--on, var(--kit-on-container));
|
|
4
|
+
--button-background: var(--base, var(--kit-container));
|
|
5
5
|
--button-radius: var(--shape, var(--kit-radius-md));
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
padding-left: var(--button-spacing-y);
|
|
17
17
|
border-radius: var(--button-radius);
|
|
18
18
|
color: var(--button-color);
|
|
19
|
-
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
text-decoration: none;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
.kit-button,
|
|
@@ -141,8 +142,12 @@
|
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
/* variant */
|
|
145
|
+
.kit-button[breakpoint]kit-button--variant-filled {
|
|
146
|
+
background-color: var(--button-background);
|
|
147
|
+
}
|
|
148
|
+
|
|
144
149
|
.kit-button[breakpoint]kit-button--variant-outline {
|
|
145
|
-
--button-color: var(--base, var(--kit-
|
|
150
|
+
--button-color: var(--base, var(--kit-on-container));
|
|
146
151
|
background-color: transparent;
|
|
147
152
|
}
|
|
148
153
|
.kit-button[breakpoint]kit-button--variant-outline::before {
|
|
@@ -155,51 +160,49 @@
|
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
.kit-button[breakpoint]kit-button--variant-text {
|
|
158
|
-
--button-color: var(--base, var(--kit-
|
|
163
|
+
--button-color: var(--base, var(--kit-on-container));
|
|
159
164
|
background-color: transparent;
|
|
160
165
|
border: none;
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
/* state */
|
|
164
|
-
.kit-button.kit-button--info
|
|
169
|
+
.kit-button.kit-button--info[class*='button--variant-filled'] {
|
|
165
170
|
--on: var(--kit-on-info);
|
|
166
171
|
--base: var(--kit-info);
|
|
167
172
|
}
|
|
168
|
-
.kit-button.kit-button--info[class*='button--variant-'] {
|
|
173
|
+
.kit-button.kit-button--info[class*='button--variant-']:not([class*='variant-filled']) {
|
|
169
174
|
--base: var(--kit-info);
|
|
170
175
|
}
|
|
171
|
-
.kit-button.kit-button--success
|
|
176
|
+
.kit-button.kit-button--success[class*='button--variant-filled'] {
|
|
172
177
|
--on: var(--kit-on-success);
|
|
173
178
|
--base: var(--kit-success);
|
|
174
179
|
}
|
|
175
|
-
.kit-button.kit-button--success[class*='button--variant-'] {
|
|
180
|
+
.kit-button.kit-button--success[class*='button--variant-']:not([class*='variant-filled']) {
|
|
176
181
|
--base: var(--kit-success);
|
|
177
182
|
}
|
|
178
|
-
.kit-button.kit-button--warning
|
|
183
|
+
.kit-button.kit-button--warning[class*='button--variant-filled'] {
|
|
179
184
|
--on: var(--kit-on-warning);
|
|
180
185
|
--base: var(--kit-warning);
|
|
181
186
|
}
|
|
182
|
-
.kit-button.kit-button--warning[class*='button--variant-'] {
|
|
187
|
+
.kit-button.kit-button--warning[class*='button--variant-']:not([class*='variant-filled']) {
|
|
183
188
|
--base: var(--kit-warning);
|
|
184
189
|
}
|
|
185
|
-
.kit-button.kit-button--error
|
|
190
|
+
.kit-button.kit-button--error[class*='button--variant-filled'] {
|
|
186
191
|
--on: var(--kit-on-error);
|
|
187
192
|
--base: var(--kit-error);
|
|
188
193
|
}
|
|
189
|
-
.kit-button.kit-button--error[class*='button--variant-'] {
|
|
194
|
+
.kit-button.kit-button--error[class*='button--variant-']:not([class*='variant-filled']) {
|
|
190
195
|
--base: var(--kit-error);
|
|
191
196
|
}
|
|
192
197
|
|
|
193
198
|
/* events */
|
|
194
|
-
.kit-button
|
|
195
|
-
.kit-button.kit-button--active
|
|
199
|
+
.kit-button[class*='button--variant-filled']:active,
|
|
200
|
+
.kit-button.kit-button--active[class*='button--variant-filled'] {
|
|
196
201
|
background-color: color-mix(in oklab, var(--button-background) 90%, var(--kit-scrim));
|
|
197
|
-
border-color: color-mix(in oklab, var(--button-background) 90%, var(--kit-scrim));
|
|
198
202
|
}
|
|
199
|
-
.kit-button.kit-button--active[class*='button--variant-']:active,
|
|
200
|
-
.kit-button.kit-button--active[class*='button--variant-'] {
|
|
203
|
+
.kit-button.kit-button--active[class*='button--variant-']:not([class*='variant-filled']):active,
|
|
204
|
+
.kit-button.kit-button--active[class*='button--variant-']:not([class*='variant-filled']) {
|
|
201
205
|
background-color: color-mix(in oklab, currentColor 15%, transparent);
|
|
202
|
-
border-color: color-mix(in oklab, currentColor 15%, transparent);
|
|
203
206
|
}
|
|
204
207
|
|
|
205
208
|
/* icon */
|
|
@@ -216,16 +219,16 @@
|
|
|
216
219
|
user-select: none;
|
|
217
220
|
cursor: default;
|
|
218
221
|
}
|
|
219
|
-
.kit-button
|
|
222
|
+
.kit-button[class*='button--variant-filled'].kit-button--disabled {
|
|
220
223
|
color: color-mix(in oklab, var(--button-color) 40%, transparent) !important;
|
|
221
224
|
background-color: color-mix(in oklab, var(--button-background) 70%, transparent) !important;
|
|
222
|
-
border-color: color-mix(in oklab, var(--button-background) 70%, transparent) !important;
|
|
223
225
|
}
|
|
224
|
-
.kit-button
|
|
226
|
+
.kit-button[class*='button--variant-filled'].kit-button--disabled i:before {
|
|
225
227
|
color: color-mix(in oklab, var(--button-color) 40%, transparent) !important;
|
|
226
228
|
}
|
|
227
|
-
.kit-button[class*='button--variant-'].kit-button--disabled,
|
|
228
|
-
.kit-button[class*='button--variant-'].kit-button--disabled
|
|
229
|
+
.kit-button[class*='button--variant-']:not([class*='variant-filled']).kit-button--disabled,
|
|
230
|
+
.kit-button[class*='button--variant-']:not([class*='variant-filled']).kit-button--disabled
|
|
231
|
+
i::before {
|
|
229
232
|
color: color-mix(in oklab, var(--button-background) 40%, transparent) !important;
|
|
230
233
|
}
|
|
231
234
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
dark,
|
|
18
18
|
light,
|
|
19
19
|
active,
|
|
20
|
-
variant,
|
|
20
|
+
variant = 'filled',
|
|
21
21
|
error,
|
|
22
22
|
info,
|
|
23
23
|
success,
|
|
@@ -37,11 +37,6 @@
|
|
|
37
37
|
}: ButtonProps = $props();
|
|
38
38
|
|
|
39
39
|
const assets = getAssets();
|
|
40
|
-
|
|
41
|
-
$effect(() => {
|
|
42
|
-
if (type === 'submit') is = 'input';
|
|
43
|
-
if (type === 'reset') is = 'input';
|
|
44
|
-
});
|
|
45
40
|
</script>
|
|
46
41
|
|
|
47
42
|
<svelte:element
|
|
@@ -70,6 +65,7 @@
|
|
|
70
65
|
disabled={href ? undefined : disabled}
|
|
71
66
|
type={href ? undefined : type}
|
|
72
67
|
use:ripple={{
|
|
68
|
+
component: 'button',
|
|
73
69
|
disabled: noRipple || disabled
|
|
74
70
|
}}
|
|
75
71
|
style:--base={assets.color(background)}
|
|
@@ -89,18 +85,18 @@
|
|
|
89
85
|
{/if}
|
|
90
86
|
|
|
91
87
|
{#if prepend}
|
|
92
|
-
<
|
|
88
|
+
<div class="kit-button-prepend">
|
|
93
89
|
{@render prepend?.()}
|
|
94
|
-
</
|
|
90
|
+
</div>
|
|
95
91
|
{/if}
|
|
96
92
|
|
|
97
|
-
<
|
|
93
|
+
<div class="kit-button-content">
|
|
98
94
|
{@render children?.()}
|
|
99
|
-
</
|
|
95
|
+
</div>
|
|
100
96
|
|
|
101
97
|
{#if append}
|
|
102
|
-
<
|
|
98
|
+
<div class="kit-button-append">
|
|
103
99
|
{@render append?.()}
|
|
104
|
-
</
|
|
100
|
+
</div>
|
|
105
101
|
{/if}
|
|
106
102
|
</svelte:element>
|
|
@@ -2,11 +2,11 @@ import type { Component } from '../../internal/types.js';
|
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
export interface ButtonProps extends Component {
|
|
4
4
|
ref?: HTMLElement | null;
|
|
5
|
-
is?: 'button' | 'a'
|
|
5
|
+
is?: 'button' | 'a';
|
|
6
6
|
dark?: boolean;
|
|
7
7
|
light?: boolean;
|
|
8
8
|
href?: string;
|
|
9
|
-
variant?: 'outline' | 'text';
|
|
9
|
+
variant?: 'outline' | 'text' | 'filled';
|
|
10
10
|
density?: 'compact' | 'comfortable' | 'default';
|
|
11
11
|
active?: boolean;
|
|
12
12
|
loading?: boolean;
|
|
@@ -1,100 +1,106 @@
|
|
|
1
|
+
/* root */
|
|
1
2
|
.kit-card {
|
|
2
|
-
--card-color: var(--on, var(--kit-on-
|
|
3
|
-
--card-background: var(--base, var(--kit-
|
|
3
|
+
--card-color: var(--on, var(--kit-on-surface));
|
|
4
|
+
--card-background: var(--base, var(--kit-surface));
|
|
4
5
|
--card-radius: var(--shape, var(--kit-radius-md));
|
|
6
|
+
}
|
|
5
7
|
|
|
8
|
+
.kit-card {
|
|
6
9
|
position: relative;
|
|
7
10
|
display: flex;
|
|
8
11
|
flex-direction: column;
|
|
9
12
|
text-align: start;
|
|
10
13
|
overflow: hidden;
|
|
11
|
-
transition:
|
|
14
|
+
/* transition:
|
|
12
15
|
color 0.5s,
|
|
13
|
-
background-color 0.5s;
|
|
14
|
-
|
|
16
|
+
background-color 0.5s; */
|
|
15
17
|
padding-top: var(--card-spacing-x);
|
|
16
18
|
padding-bottom: var(--card-spacing-x);
|
|
17
19
|
padding-right: var(--card-spacing-y);
|
|
18
20
|
padding-left: var(--card-spacing-y);
|
|
19
|
-
|
|
20
|
-
border-width: 1px;
|
|
21
|
-
border-style: solid;
|
|
22
21
|
border-radius: var(--card-radius);
|
|
23
|
-
|
|
24
|
-
/* theme */
|
|
22
|
+
font-weight: 500;
|
|
25
23
|
color: var(--card-color);
|
|
26
|
-
|
|
27
|
-
border-color: var(--card-background);
|
|
24
|
+
text-decoration: none;
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
--card-spacing-x: 0.25rem;
|
|
33
|
-
--card-spacing-y: 0.25rem;
|
|
27
|
+
.kit-card.kit-card--clickable {
|
|
28
|
+
cursor: pointer;
|
|
34
29
|
}
|
|
35
30
|
|
|
36
|
-
.kit-card
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
.kit-card.kit-card--clickable::after {
|
|
32
|
+
content: '';
|
|
33
|
+
position: absolute;
|
|
34
|
+
inset: 0;
|
|
35
|
+
background-color: currentColor;
|
|
36
|
+
opacity: 0;
|
|
37
|
+
transition: opacity 150ms ease;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
border-radius: inherit;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
.
|
|
42
|
-
--card-spacing-x: 0.5rem;
|
|
43
|
-
--card-spacing-y: 0.5rem;
|
|
41
|
+
.kit-card.kit-card--clickable:hover::after {
|
|
42
|
+
opacity: 0.08;
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
text-decoration: none;
|
|
44
|
+
.kit-card.kit-card--clickable:active::after {
|
|
45
|
+
opacity: 0.12;
|
|
48
46
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
background-color: color-mix(in oklab, var(--card-background) 90%, black);
|
|
47
|
+
.kit-card.kit-card--clickable:focus-visible::after {
|
|
48
|
+
opacity: 0.12;
|
|
52
49
|
}
|
|
53
50
|
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
/* density */
|
|
52
|
+
.kit-card[breakpoint]kit-card--density-default {
|
|
53
|
+
--card-spacing-x: calc(var(--kit-spacing) * 2);
|
|
54
|
+
--card-spacing-y: calc(var(--kit-spacing) * 2);
|
|
56
55
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
background-color: color-mix(in oklab, var(--card-background) 95%, black);
|
|
56
|
+
.kit-card[breakpoint]kit-card--density-compact {
|
|
57
|
+
--card-spacing-x: 0;
|
|
58
|
+
--card-spacing-y: 0;
|
|
61
59
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
.kit-card[breakpoint]kit-card--density-comfortable {
|
|
61
|
+
--card-spacing-x: calc(var(--kit-spacing) * 4);
|
|
62
|
+
--card-spacing-y: calc(var(--kit-spacing) * 4);
|
|
65
63
|
}
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
/* variant */
|
|
66
|
+
.kit-card[breakpoint]kit-card--variant-filled {
|
|
67
|
+
background-color: var(--card-background);
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
.kit-card
|
|
72
|
-
|
|
70
|
+
.kit-card[breakpoint]kit-card--variant-outline {
|
|
71
|
+
--card-color: var(--base, var(--kit-on-surface));
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
}
|
|
74
|
+
.kit-card[breakpoint]kit-card--variant-outline::before {
|
|
75
|
+
content: '';
|
|
76
|
+
position: absolute;
|
|
77
|
+
inset: 0;
|
|
78
|
+
border: 1px solid currentColor;
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
border-radius: inherit;
|
|
73
81
|
}
|
|
74
82
|
|
|
75
|
-
.kit-card
|
|
76
|
-
|
|
77
|
-
--card-color: var(--base, var(--kit-neutral));
|
|
83
|
+
.kit-card[breakpoint]kit-card--variant-text {
|
|
84
|
+
--card-color: var(--base, var(--kit-on-surface));
|
|
78
85
|
background-color: transparent;
|
|
86
|
+
border: none;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
|
-
|
|
82
|
-
.kit-card.kit-card--
|
|
83
|
-
|
|
89
|
+
/* events */
|
|
90
|
+
.kit-card[class*='card--variant-filled'].kit-card--clickable:active,
|
|
91
|
+
.kit-card.kit-card--active[class*='card--variant-filled'].kit-card--clickable {
|
|
92
|
+
background-color: color-mix(in oklab, var(--card-background) 90%, var(--kit-scrim));
|
|
84
93
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
.kit-card
|
|
94
|
+
.kit-card.kit-card--active[class*='card--variant-']:not(
|
|
95
|
+
[class*='variant-filled']
|
|
96
|
+
).kit-card--clickable:active,
|
|
97
|
+
.kit-card.kit-card--active[class*='card--variant-']:not(
|
|
98
|
+
[class*='variant-filled']
|
|
99
|
+
).kit-card--clickable {
|
|
88
100
|
background-color: color-mix(in oklab, currentColor 15%, transparent);
|
|
89
101
|
}
|
|
90
102
|
|
|
91
|
-
|
|
92
|
-
.kit-card.kit-card--variant-text:active:not(div),
|
|
93
|
-
.kit-card.kit-card--variant-outline.kit-card--active,
|
|
94
|
-
.kit-card.kit-card--variant-text.kit-card--active {
|
|
95
|
-
background-color: color-mix(in oklab, currentColor 10%, transparent);
|
|
96
|
-
}
|
|
97
|
-
|
|
103
|
+
/* disabled */
|
|
98
104
|
.kit-card.kit-card--disabled,
|
|
99
105
|
.kit-card[disabled],
|
|
100
106
|
.kit-card:disabled {
|