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