lapikit 0.0.0-insiders.dcdfb82 → 0.0.0-insiders.df219d7

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.
Files changed (150) hide show
  1. package/LICENSE +21 -0
  2. package/bin/helper.js +64 -32
  3. package/bin/index.js +65 -0
  4. package/bin/lapikit.js +42 -10
  5. package/bin/modules/adapter.js +3 -3
  6. package/bin/modules/plugin.js +223 -0
  7. package/dist/actions/index.d.ts +1 -0
  8. package/dist/actions/index.js +1 -0
  9. package/dist/assets/icons/arrow-down.svelte +12 -0
  10. package/dist/assets/icons/arrow-down.svelte.d.ts +18 -0
  11. package/dist/assets/icons/arrow-up.svelte +12 -0
  12. package/dist/assets/icons/arrow-up.svelte.d.ts +18 -0
  13. package/dist/assets/icons/close-fill.svelte +12 -0
  14. package/dist/assets/icons/close-fill.svelte.d.ts +18 -0
  15. package/dist/assets/icons/loading-fill.svelte +31 -0
  16. package/dist/assets/icons/loading-fill.svelte.d.ts +18 -0
  17. package/dist/components/accordion/accordion.css +113 -0
  18. package/dist/components/accordion/accordion.svelte +37 -0
  19. package/dist/components/accordion/accordion.svelte.d.ts +4 -0
  20. package/dist/components/accordion/accordion.svelte.js +24 -0
  21. package/dist/components/accordion/modules/accordion-item.svelte +94 -0
  22. package/dist/components/accordion/modules/accordion-item.svelte.d.ts +4 -0
  23. package/dist/components/accordion/types.d.ts +33 -0
  24. package/dist/components/accordion/types.js +1 -0
  25. package/dist/components/alert/alert.css +137 -0
  26. package/dist/components/alert/alert.svelte +89 -0
  27. package/dist/components/alert/alert.svelte.d.ts +4 -0
  28. package/dist/components/alert/types.d.ts +28 -0
  29. package/dist/components/alert/types.js +1 -0
  30. package/dist/components/app/app.css +16 -0
  31. package/dist/components/app/app.svelte +43 -0
  32. package/dist/components/app/app.svelte.d.ts +7 -0
  33. package/dist/components/app/types.d.ts +4 -0
  34. package/dist/components/app/types.js +1 -0
  35. package/dist/components/appbar/appbar.css +48 -0
  36. package/dist/components/appbar/appbar.svelte +40 -0
  37. package/dist/components/appbar/appbar.svelte.d.ts +4 -0
  38. package/dist/components/appbar/types.d.ts +15 -0
  39. package/dist/components/appbar/types.js +1 -0
  40. package/dist/components/aspect-ratio/aspect-ratio.css +19 -0
  41. package/dist/components/aspect-ratio/aspect-ratio.svelte +47 -0
  42. package/dist/components/aspect-ratio/aspect-ratio.svelte.d.ts +4 -0
  43. package/dist/components/aspect-ratio/types.d.ts +5 -0
  44. package/dist/components/aspect-ratio/types.js +1 -0
  45. package/dist/components/avatar/avatar.css +109 -0
  46. package/dist/components/avatar/avatar.svelte +46 -0
  47. package/dist/components/avatar/avatar.svelte.d.ts +4 -0
  48. package/dist/components/avatar/types.d.ts +22 -0
  49. package/dist/components/avatar/types.js +1 -0
  50. package/dist/components/button/button.css +247 -0
  51. package/dist/components/button/button.svelte +102 -0
  52. package/dist/components/button/button.svelte.d.ts +4 -0
  53. package/dist/components/button/types.d.ts +29 -0
  54. package/dist/components/button/types.js +1 -0
  55. package/dist/components/card/card.css +115 -0
  56. package/dist/components/card/card.svelte +63 -0
  57. package/dist/components/card/card.svelte.d.ts +4 -0
  58. package/dist/components/card/types.d.ts +18 -0
  59. package/dist/components/card/types.js +1 -0
  60. package/dist/components/chip/chip.css +231 -0
  61. package/dist/components/chip/chip.svelte +129 -0
  62. package/dist/components/chip/chip.svelte.d.ts +4 -0
  63. package/dist/components/chip/types.d.ts +31 -0
  64. package/dist/components/chip/types.js +1 -0
  65. package/dist/components/dialog/dialog.css +134 -0
  66. package/dist/components/dialog/dialog.svelte +67 -0
  67. package/dist/components/dialog/dialog.svelte.d.ts +4 -0
  68. package/dist/components/dialog/types.d.ts +24 -0
  69. package/dist/components/dialog/types.js +1 -0
  70. package/dist/components/dropdown/dropdown.css +22 -0
  71. package/dist/components/dropdown/dropdown.svelte +116 -0
  72. package/dist/components/dropdown/dropdown.svelte.d.ts +4 -0
  73. package/dist/components/dropdown/dropdown.svelte.js +148 -0
  74. package/dist/components/dropdown/types.d.ts +26 -0
  75. package/dist/components/dropdown/types.js +1 -0
  76. package/dist/components/icon/icon.css +79 -0
  77. package/dist/components/icon/icon.svelte +49 -0
  78. package/dist/components/icon/icon.svelte.d.ts +4 -0
  79. package/dist/components/icon/types.d.ts +16 -0
  80. package/dist/components/icon/types.js +1 -0
  81. package/dist/components/index.d.ts +22 -0
  82. package/dist/components/index.js +23 -0
  83. package/dist/components/list/list.css +221 -0
  84. package/dist/components/list/list.svelte +44 -0
  85. package/dist/components/list/list.svelte.d.ts +4 -0
  86. package/dist/components/list/modules/list-item.svelte +76 -0
  87. package/dist/components/list/modules/list-item.svelte.d.ts +4 -0
  88. package/dist/components/list/types.d.ts +33 -0
  89. package/dist/components/list/types.js +1 -0
  90. package/dist/components/modal/modal.css +144 -0
  91. package/dist/components/modal/modal.svelte +113 -0
  92. package/dist/components/modal/modal.svelte.d.ts +4 -0
  93. package/dist/components/modal/types.d.ts +26 -0
  94. package/dist/components/modal/types.js +1 -0
  95. package/dist/components/popover/popover.css +22 -0
  96. package/dist/components/popover/popover.svelte +73 -0
  97. package/dist/components/popover/popover.svelte.d.ts +4 -0
  98. package/dist/components/popover/popover.svelte.js +134 -0
  99. package/dist/components/popover/types.d.ts +20 -0
  100. package/dist/components/popover/types.js +1 -0
  101. package/dist/components/separator/separator.css +46 -0
  102. package/dist/components/separator/separator.svelte +37 -0
  103. package/dist/components/separator/separator.svelte.d.ts +4 -0
  104. package/dist/components/separator/types.d.ts +11 -0
  105. package/dist/components/separator/types.js +1 -0
  106. package/dist/components/spacer/spacer.css +3 -0
  107. package/dist/components/spacer/spacer.svelte +7 -0
  108. package/dist/components/spacer/spacer.svelte.d.ts +4 -0
  109. package/dist/components/spacer/types.d.ts +4 -0
  110. package/dist/components/spacer/types.js +1 -0
  111. package/dist/components/textfield/textfield.css +305 -0
  112. package/dist/components/textfield/textfield.svelte +193 -0
  113. package/dist/components/textfield/textfield.svelte.d.ts +4 -0
  114. package/dist/components/textfield/types.d.ts +37 -0
  115. package/dist/components/textfield/types.js +1 -0
  116. package/dist/components/toolbar/toolbar.css +129 -0
  117. package/dist/components/toolbar/toolbar.svelte +47 -0
  118. package/dist/components/toolbar/toolbar.svelte.d.ts +4 -0
  119. package/dist/components/toolbar/types.d.ts +27 -0
  120. package/dist/components/toolbar/types.js +1 -0
  121. package/dist/components/tooltip/tooltip.css +124 -0
  122. package/dist/components/tooltip/tooltip.svelte +113 -0
  123. package/dist/components/tooltip/tooltip.svelte.d.ts +4 -0
  124. package/dist/components/tooltip/tooltip.svelte.js +131 -0
  125. package/dist/components/tooltip/types.d.ts +23 -0
  126. package/dist/components/tooltip/types.js +1 -0
  127. package/dist/internal/assets.svelte.d.ts +8 -0
  128. package/dist/internal/assets.svelte.js +54 -0
  129. package/dist/internal/clickOutside.d.ts +9 -0
  130. package/dist/internal/clickOutside.js +34 -0
  131. package/dist/internal/index.d.ts +2 -0
  132. package/dist/internal/index.js +2 -0
  133. package/dist/internal/ripple.d.ts +12 -0
  134. package/dist/internal/ripple.js +93 -0
  135. package/dist/internal/scroll.d.ts +1 -0
  136. package/dist/internal/scroll.js +6 -0
  137. package/dist/internal/types.d.ts +13 -0
  138. package/dist/internal/unit.d.ts +1 -0
  139. package/dist/internal/unit.js +11 -0
  140. package/dist/preset.js +16 -4
  141. package/dist/stores/index.d.ts +10 -0
  142. package/dist/stores/index.js +47 -0
  143. package/dist/style/animation.css +62 -0
  144. package/dist/style/css.js +6 -3
  145. package/dist/style/normalize.css +2 -0
  146. package/dist/style/parser/color.js +15 -4
  147. package/dist/style/parser/device.js +31 -19
  148. package/dist/style/variable.css +12 -0
  149. package/dist/utils/x11.d.ts +1 -1
  150. package/package.json +20 -3
@@ -0,0 +1,7 @@
1
+ import type { Snippet } from 'svelte';
2
+ type $$ComponentProps = {
3
+ children: Snippet;
4
+ };
5
+ declare const App: import("svelte").Component<$$ComponentProps, {}, "">;
6
+ type App = ReturnType<typeof App>;
7
+ export default App;
@@ -0,0 +1,4 @@
1
+ import type { Snippet } from 'svelte';
2
+ export interface AppProps {
3
+ children?: Snippet;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,48 @@
1
+ /* root default*/
2
+ .kit-appbar {
3
+ --appbar-color: var(--on, var(--kit-on-surface));
4
+ --appbar-background: var(--base, var(--kit-surface));
5
+ --appbar-radius: var(--shape, 0);
6
+ --appbar-padding-wrapper: var(--kit-spacing) * 4;
7
+ }
8
+
9
+ .kit-appbar {
10
+ display: flex;
11
+ align-items: center;
12
+ border-style: solid;
13
+ border-width: 1px;
14
+ border-radius: var(--appbar-radius);
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; */
22
+ }
23
+
24
+ /* wrapper */
25
+ .kit-appbar .kit-appbar--wrapper {
26
+ display: flex;
27
+ align-items: center;
28
+ flex-direction: row;
29
+ height: calc(100% - (var(--appbar-padding-wrapper) * 2));
30
+ width: calc(100% - (var(--appbar-padding-wrapper) * 2));
31
+ margin: 0 auto;
32
+ }
33
+
34
+ /* density */
35
+ .kit-appbar[breakpoint]kit-appbar--density-default {
36
+ height: 4rem;
37
+ padding-inline: calc(var(--kit-spacing) * 1.5);
38
+ }
39
+
40
+ .kit-appbar[breakpoint]kit-appbar--density-compact {
41
+ height: 3.5rem;
42
+ padding-inline: calc(var(--kit-spacing) * 0.75);
43
+ }
44
+
45
+ .kit-appbar[breakpoint]kit-appbar--density-comfortable {
46
+ height: 4.5rem;
47
+ padding-inline: calc(var(--kit-spacing) * 2.25);
48
+ }
@@ -0,0 +1,40 @@
1
+ <script lang="ts">
2
+ import { getAssets } from '../../internal/index.js';
3
+ import type { AppbarProps } from './types.js';
4
+
5
+ let {
6
+ children,
7
+ ref = $bindable(),
8
+ is = 'header',
9
+ classContent,
10
+ light,
11
+ dark,
12
+ rounded,
13
+ background,
14
+ color,
15
+ density = 'default',
16
+ ...rest
17
+ }: AppbarProps = $props();
18
+
19
+ const assets = getAssets();
20
+ </script>
21
+
22
+ <svelte:element
23
+ this={is}
24
+ bind:this={ref}
25
+ {...rest}
26
+ class={[
27
+ 'kit-appbar',
28
+ light && 'light',
29
+ dark && 'dark',
30
+ density && assets.className('appbar', 'density', density),
31
+ rest.class
32
+ ]}
33
+ style:--base={assets.color(background)}
34
+ style:--on={assets.color(color)}
35
+ style:--shape={assets.shape(rounded)}
36
+ >
37
+ <div class={['kit-appbar--wrapper', classContent]}>
38
+ {@render children?.()}
39
+ </div>
40
+ </svelte:element>
@@ -0,0 +1,4 @@
1
+ import type { AppbarProps } from './types.js';
2
+ declare const Appbar: import("svelte").Component<AppbarProps, {}, "ref">;
3
+ type Appbar = ReturnType<typeof Appbar>;
4
+ export default Appbar;
@@ -0,0 +1,15 @@
1
+ import type { Component } from '../../internal/types.js';
2
+ type Density = 'compact' | 'comfortable' | 'default';
3
+ export interface AppbarProps extends Component {
4
+ is?: 'div' | 'header' | 'nav';
5
+ rounded?: string;
6
+ density?: Density | {
7
+ [key: string]: Density;
8
+ };
9
+ dark?: boolean;
10
+ light?: boolean;
11
+ color?: string;
12
+ background?: string;
13
+ classContent?: string | string[] | undefined;
14
+ }
15
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ .kit-aspect-ratio {
2
+ display: flex;
3
+ flex: 1 0 auto;
4
+ max-height: 100%;
5
+ max-width: 100%;
6
+ overflow: hidden;
7
+ position: relative;
8
+ }
9
+
10
+ .kit-aspect-ratio--inline {
11
+ display: inline-flex;
12
+ flex: 0 0 auto;
13
+ }
14
+
15
+ .kit-aspect-ratio--sizer {
16
+ flex: 1 0 0px;
17
+ transition: padding-bottom 0.2s cubic-bezier(0.4, 0, 0.2, 1);
18
+ pointer-events: none;
19
+ }
@@ -0,0 +1,47 @@
1
+ <script lang="ts">
2
+ import type { AspectRationProps } from './types.js';
3
+ let { children, aspectRatio, inline, ...rest }: AspectRationProps = $props();
4
+
5
+ let paddingBottom = $state(0);
6
+
7
+ $effect.pre(() => {
8
+ if (aspectRatio) {
9
+ const [width, height] = aspectRatio.split('/').map(Number);
10
+ paddingBottom = (height / width) * 100;
11
+ }
12
+ });
13
+
14
+ $effect(() => {
15
+ if (aspectRatio) {
16
+ const [width, height] = aspectRatio.split('/').map(Number);
17
+ paddingBottom = (height / width) * 100;
18
+ }
19
+ });
20
+ </script>
21
+
22
+ <div {...rest} class={['kit-aspect-ratio', inline && 'kit-aspect-ratio--inline', rest.class]}>
23
+ <div class="kit-aspect-ratio--sizer" style={`padding-bottom: ${paddingBottom}%;`}></div>
24
+ {@render children?.()}
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>
@@ -0,0 +1,4 @@
1
+ import type { AspectRationProps } from './types.js';
2
+ declare const AspectRatio: import("svelte").Component<AspectRationProps, {}, "">;
3
+ type AspectRatio = ReturnType<typeof AspectRatio>;
4
+ export default AspectRatio;
@@ -0,0 +1,5 @@
1
+ import type { Component } from '../../internal/types.js';
2
+ export interface AspectRationProps extends Component {
3
+ aspectRatio?: string;
4
+ inline?: boolean;
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,109 @@
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
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ white-space: nowrap;
10
+ padding-top: var(--avatar-spacing-x);
11
+ padding-bottom: var(--avatar-spacing-x);
12
+ padding-right: var(--avatar-spacing-y);
13
+ padding-left: var(--avatar-spacing-y);
14
+
15
+ border-width: 1px;
16
+ border-style: solid;
17
+ border-radius: var(--avatar-radius);
18
+
19
+ /* theme */
20
+ color: var(--avatar-color);
21
+ background-color: var(--avatar-background);
22
+ border-color: var(--avatar-background);
23
+ }
24
+
25
+ .kit-avatar.kit-avatar--image {
26
+ position: relative;
27
+ overflow: hidden;
28
+ }
29
+
30
+ .kit-avatar.kit-avatar--image img {
31
+ position: relative;
32
+ top: 0;
33
+ left: 0;
34
+ width: 100%;
35
+ height: 100%;
36
+ object-fit: cover;
37
+ }
38
+
39
+ /* size */
40
+ .kit-avatar[breakpoint]kit-avatar--size-xs {
41
+ --avatar-height: 1.75rem;
42
+ --avatar-multiplier-y: 2;
43
+ font-size: 0.75rem;
44
+ }
45
+
46
+ .kit-avatar[breakpoint]kit-avatar--size-sm {
47
+ --avatar-height: 2rem;
48
+ --avatar-multiplier-y: 3;
49
+ font-size: 0.875rem;
50
+ }
51
+
52
+ .kit-avatar[breakpoint]kit-avatar--size-md {
53
+ --avatar-height: 2.25rem;
54
+ --avatar-multiplier-y: 4;
55
+ font-size: 0.875rem;
56
+ }
57
+
58
+ .kit-avatar[breakpoint]kit-avatar--size-lg {
59
+ --avatar-height: 2.5rem;
60
+ --avatar-multiplier-y: 5;
61
+ font-size: 1rem;
62
+ }
63
+
64
+ .kit-avatar[breakpoint]kit-avatar--size-xl {
65
+ --avatar-height: 2.75rem;
66
+ --avatar-multiplier-y: 6;
67
+ font-size: 1.125rem;
68
+ }
69
+
70
+ /* density */
71
+ .kit-avatar[breakpoint]kit-avatar--density-default {
72
+ height: calc(var(--avatar-height));
73
+ width: calc(var(--avatar-height));
74
+ --avatar-spacing-x: 0;
75
+ --avatar-spacing-y: 0;
76
+ }
77
+
78
+ .kit-avatar[breakpoint]kit-avatar--density-compact {
79
+ height: calc(var(--avatar-height) - 0.25rem);
80
+ width: calc(var(--avatar-height) - 0.25rem);
81
+ --avatar-spacing-x: 0;
82
+ --avatar-spacing-y: 0;
83
+ }
84
+
85
+ .kit-avatar[breakpoint]kit-avatar--density-comfortable {
86
+ height: calc(var(--avatar-height) + 0.25rem);
87
+ width: calc(var(--avatar-height) + 0.25rem);
88
+ --avatar-spacing-x: 0;
89
+ --avatar-spacing-y: 0;
90
+ }
91
+
92
+ /* variant */
93
+ .kit-avatar[breakpoint]kit-avatar--variant-outline {
94
+ --avatar-color: var(--base, var(--kit-container));
95
+ background-color: transparent;
96
+ border: 1px solid currentColor;
97
+ }
98
+
99
+ .kit-avatar[breakpoint]kit-avatar--variant-text {
100
+ --avatar-color: var(--base, var(--kit-container));
101
+ background-color: transparent;
102
+ border-color: transparent;
103
+ }
104
+
105
+ .kit-avatar[breakpoint]kit-avatar--variant-dash {
106
+ --avatar-color: var(--base, var(--kit-container));
107
+ background-color: transparent;
108
+ border: 1px dashed currentColor;
109
+ }
@@ -0,0 +1,46 @@
1
+ <script lang="ts">
2
+ import { getAssets } from '../../internal/assets.svelte.js';
3
+ import type { AvatarProps } from './types.js';
4
+ let {
5
+ children,
6
+ ref = $bindable(),
7
+ light,
8
+ dark,
9
+ size = 'md',
10
+ rounded,
11
+ alt,
12
+ background,
13
+ color,
14
+ src,
15
+ variant,
16
+ density = 'default',
17
+ ...rest
18
+ }: AvatarProps = $props();
19
+
20
+ const assets = getAssets();
21
+ </script>
22
+
23
+ <svelte:element
24
+ this={'div'}
25
+ bind:this={ref}
26
+ {...rest}
27
+ class={[
28
+ 'kit-avatar',
29
+ light && 'light',
30
+ dark && 'dark',
31
+ src && 'kit-avatar--image',
32
+ size && assets.className('avatar', 'size', size),
33
+ variant && assets.className('avatar', 'variant', variant),
34
+ density && assets.className('avatar', 'density', density),
35
+ rest.class
36
+ ]}
37
+ style:--base={assets.color(background)}
38
+ style:--on={assets.color(color)}
39
+ style:--shape={assets.shape(rounded)}
40
+ >
41
+ {#if src}
42
+ <img {src} {alt} />
43
+ {:else}
44
+ {@render children?.()}
45
+ {/if}
46
+ </svelte:element>
@@ -0,0 +1,4 @@
1
+ import type { AvatarProps } from './types.js';
2
+ declare const Avatar: import("svelte").Component<AvatarProps, {}, "ref">;
3
+ type Avatar = ReturnType<typeof Avatar>;
4
+ export default Avatar;
@@ -0,0 +1,22 @@
1
+ import type { Component } from '../../internal/types.js';
2
+ type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
+ type AvatarDensity = 'compact' | 'comfortable' | 'default';
4
+ type AvatarVariant = 'outline' | 'text' | 'dash';
5
+ export interface AvatarProps extends Component {
6
+ ref?: HTMLElement | null;
7
+ dark?: boolean;
8
+ light?: boolean;
9
+ color?: string;
10
+ background?: string;
11
+ src?: string;
12
+ size?: AvatarSize | {
13
+ [key: string]: AvatarSize;
14
+ };
15
+ variant?: AvatarVariant | {
16
+ [key: string]: AvatarVariant;
17
+ };
18
+ density?: AvatarDensity | {
19
+ [key: string]: AvatarDensity;
20
+ };
21
+ }
22
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,247 @@
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
+ .kit-button {
9
+ position: relative;
10
+ cursor: pointer;
11
+ border: none;
12
+ outline: none;
13
+ padding-top: var(--button-spacing-x);
14
+ padding-bottom: var(--button-spacing-x);
15
+ padding-right: var(--button-spacing-y);
16
+ padding-left: var(--button-spacing-y);
17
+ border-radius: var(--button-radius);
18
+ color: var(--button-color);
19
+ font-weight: 500;
20
+ text-decoration: none;
21
+ }
22
+
23
+ .kit-button,
24
+ .kit-button .kit-button-content,
25
+ .kit-button .kit-button-append,
26
+ .kit-button .kit-button-prepend,
27
+ .kit-button .kit-button-loading {
28
+ display: inline-flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ white-space: nowrap;
32
+ gap: calc(var(--kit-spacing) * var(--button-multiplier-gap));
33
+ font-size: calc(var(--kit-spacing) * var(--button-multiplier-font-size));
34
+ }
35
+
36
+ .kit-button::after {
37
+ content: '';
38
+ position: absolute;
39
+ inset: 0;
40
+ background-color: currentColor;
41
+ opacity: 0;
42
+ transition: opacity 150ms ease;
43
+ pointer-events: none;
44
+ border-radius: inherit;
45
+ }
46
+ .kit-button:hover::after {
47
+ opacity: 0.08;
48
+ }
49
+ .kit-button:active::after {
50
+ opacity: 0.12;
51
+ }
52
+ .kit-button:focus-visible::after {
53
+ opacity: 0.12;
54
+ }
55
+
56
+ /* size */
57
+ .kit-button[breakpoint]kit-button--size-xs {
58
+ --button-multiplier-x: 12;
59
+ --button-multiplier-y: 2;
60
+ --button-multiplier-gap: 2;
61
+ --button-multiplier-font-size: 6;
62
+ }
63
+ .kit-button[breakpoint]kit-button--size-xs .kit-icon[class*='kit-icon--size-md'] {
64
+ --icon-multiplier-parent-size: 7;
65
+ }
66
+
67
+ .kit-button[breakpoint]kit-button--size-sm {
68
+ --button-multiplier-x: 16;
69
+ --button-multiplier-y: 3;
70
+ --button-multiplier-gap: 4;
71
+ --button-multiplier-font-size: 7;
72
+ }
73
+ .kit-button[breakpoint]kit-button--size-sm .kit-icon[class*='kit-icon--size-md'] {
74
+ --icon-multiplier-parent-size: 8;
75
+ }
76
+
77
+ .kit-button[breakpoint]kit-button--size-md {
78
+ --button-multiplier-x: 20;
79
+ --button-multiplier-y: 4;
80
+ --button-multiplier-gap: 4;
81
+ --button-multiplier-font-size: 8;
82
+ }
83
+ .kit-button[breakpoint]kit-button--size-md .kit-icon[class*='kit-icon--size-md'] {
84
+ --icon-multiplier-parent-size: 9;
85
+ }
86
+
87
+ .kit-button[breakpoint]kit-button--size-lg {
88
+ --button-multiplier-x: 24;
89
+ --button-multiplier-y: 5;
90
+ --button-multiplier-gap: 4;
91
+ --button-multiplier-font-size: 9;
92
+ }
93
+ .kit-button[breakpoint]kit-button--size-lg .kit-icon[class*='kit-icon--size-md'] {
94
+ --icon-multiplier-parent-size: 10;
95
+ }
96
+
97
+ .kit-button[breakpoint]kit-button--size-xl {
98
+ --button-multiplier-x: 28;
99
+ --button-multiplier-y: 6;
100
+ --button-multiplier-gap: 5;
101
+ --button-multiplier-font-size: 10;
102
+ }
103
+ .kit-button[breakpoint]kit-button--size-xl .kit-icon[class*='kit-icon--size-md'] {
104
+ --icon-multiplier-parent-size: 11;
105
+ }
106
+
107
+ /* density */
108
+ .kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-default {
109
+ height: calc(var(--kit-spacing) * var(--button-multiplier-x));
110
+ --button-spacing-x: 0;
111
+ --button-spacing-y: calc(var(--kit-spacing) * var(--button-multiplier-y));
112
+ }
113
+ .kit-button.kit-button--icon[breakpoint]kit-button--density-default {
114
+ height: calc(var(--kit-spacing) * var(--button-multiplier-x));
115
+ width: calc(var(--kit-spacing) * var(--button-multiplier-x));
116
+ --button-spacing-x: 0;
117
+ --button-spacing-y: 0;
118
+ }
119
+
120
+ .kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-compact {
121
+ height: calc(var(--kit-spacing) * var(--button-multiplier-x) - 0.25rem);
122
+ --button-spacing-x: 0;
123
+ --button-spacing-y: calc(var(--kit-spacing) * var(--button-multiplier-y) - 0.25rem);
124
+ }
125
+ .kit-button.kit-button--icon[breakpoint]kit-button--density-compact {
126
+ height: calc(var(--kit-spacing) * var(--button-multiplier-x) - 0.25rem);
127
+ width: calc(var(--kit-spacing) * var(--button-multiplier-x) - 0.25rem);
128
+ --button-spacing-x: 0;
129
+ --button-spacing-y: 0;
130
+ }
131
+
132
+ .kit-button:not(.kit-button--icon)[breakpoint]kit-button--density-comfortable {
133
+ height: calc(var(--kit-spacing) * var(--button-multiplier-x) + 0.25rem);
134
+ --button-spacing-x: 0;
135
+ --button-spacing-y: calc(var(--kit-spacing) * var(--button-multiplier-y) + 0.25rem);
136
+ }
137
+ .kit-button.kit-button--icon[breakpoint]kit-button--density-comfortable {
138
+ height: calc(var(--kit-spacing) * var(--button-multiplier-x) + 0.25rem);
139
+ width: calc(var(--kit-spacing) * var(--button-multiplier-x) + 0.25rem);
140
+ --button-spacing-x: 0;
141
+ --button-spacing-y: 0;
142
+ }
143
+
144
+ /* variant */
145
+ .kit-button[breakpoint]kit-button--variant-filled {
146
+ background-color: var(--button-background);
147
+ }
148
+
149
+ .kit-button[breakpoint]kit-button--variant-outline {
150
+ --button-color: var(--on, var(--kit-on-container));
151
+ background-color: var(--button-background);
152
+ }
153
+ .kit-button[breakpoint]kit-button--variant-outline::before {
154
+ content: '';
155
+ position: absolute;
156
+ inset: 0;
157
+ border: 1px solid currentColor;
158
+ pointer-events: none;
159
+ border-radius: inherit;
160
+ }
161
+
162
+ .kit-button[breakpoint]kit-button--variant-text {
163
+ --button-color: var(--base, var(--kit-on-container));
164
+ background-color: transparent;
165
+ border: none;
166
+ }
167
+
168
+ /* state */
169
+ .kit-button.kit-button--info[class*='button--variant-filled'] {
170
+ --on: var(--kit-on-info);
171
+ --base: var(--kit-info);
172
+ }
173
+ .kit-button.kit-button--info[class*='button--variant-']:not([class*='variant-filled']) {
174
+ --base: var(--kit-info);
175
+ }
176
+ .kit-button.kit-button--success[class*='button--variant-filled'] {
177
+ --on: var(--kit-on-success);
178
+ --base: var(--kit-success);
179
+ }
180
+ .kit-button.kit-button--success[class*='button--variant-']:not([class*='variant-filled']) {
181
+ --base: var(--kit-success);
182
+ }
183
+ .kit-button.kit-button--warning[class*='button--variant-filled'] {
184
+ --on: var(--kit-on-warning);
185
+ --base: var(--kit-warning);
186
+ }
187
+ .kit-button.kit-button--warning[class*='button--variant-']:not([class*='variant-filled']) {
188
+ --base: var(--kit-warning);
189
+ }
190
+ .kit-button.kit-button--error[class*='button--variant-filled'] {
191
+ --on: var(--kit-on-error);
192
+ --base: var(--kit-error);
193
+ }
194
+ .kit-button.kit-button--error[class*='button--variant-']:not([class*='variant-filled']) {
195
+ --base: var(--kit-error);
196
+ }
197
+
198
+ /* events */
199
+ .kit-button[class*='button--variant-filled']:active,
200
+ .kit-button.kit-button--active[class*='button--variant-filled'] {
201
+ background-color: color-mix(in oklab, var(--button-background) 90%, var(--kit-scrim));
202
+ }
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']) {
205
+ background-color: color-mix(in oklab, currentColor 15%, transparent);
206
+ }
207
+
208
+ /* icon */
209
+ .kit-button i::before,
210
+ .kit-button .kit-icon {
211
+ --base-parent: var(--button-color);
212
+ }
213
+
214
+ /* disabled */
215
+ .kit-button.kit-button--disabled,
216
+ .kit-button[disabled],
217
+ .kit-button.kit-button--loading {
218
+ pointer-events: none;
219
+ user-select: none;
220
+ cursor: default;
221
+ }
222
+ .kit-button[class*='button--variant-filled'].kit-button--disabled {
223
+ color: color-mix(in oklab, var(--button-color) 40%, transparent) !important;
224
+ background-color: color-mix(in oklab, var(--button-background) 70%, transparent) !important;
225
+ }
226
+ .kit-button[class*='button--variant-filled'].kit-button--disabled i:before {
227
+ color: color-mix(in oklab, var(--button-color) 40%, transparent) !important;
228
+ }
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 {
232
+ color: color-mix(in oklab, var(--button-background) 40%, transparent) !important;
233
+ }
234
+
235
+ /* loading */
236
+ .kit-button.kit-button--loading > .kit-button-content,
237
+ .kit-button.kit-button--loading > .kit-button-append,
238
+ .kit-button.kit-button--loading > .kit-button-prepend {
239
+ visibility: hidden;
240
+ }
241
+ .kit-button.kit-button--loading > .kit-button-loading {
242
+ position: absolute;
243
+ min-width: fit-content;
244
+ }
245
+ .kit-button.kit-button--loading > .kit-button-loading .kit-icon-load {
246
+ animation: icon-rotate 1s ease-out infinite;
247
+ }