lapikit 0.2.3 → 0.2.4

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 (190) hide show
  1. package/bin/configuration.js +0 -1
  2. package/bin/helper.js +0 -38
  3. package/bin/index.js +1 -9
  4. package/bin/presets.js +1 -1
  5. package/bin/prompts.js +46 -79
  6. package/dist/actions/accordion.svelte.d.ts +9 -0
  7. package/dist/actions/index.d.ts +2 -1
  8. package/dist/actions/index.js +2 -1
  9. package/dist/actions/use-theme.d.ts +1 -0
  10. package/dist/actions/use-theme.js +18 -0
  11. package/dist/components/accordion/accordion.css +0 -77
  12. package/dist/components/accordion/accordion.svelte +5 -3
  13. package/dist/components/accordion/modules/accordion-item.css +68 -0
  14. package/dist/components/accordion/modules/accordion-item.svelte +4 -4
  15. package/dist/components/accordion/types.d.ts +1 -1
  16. package/dist/components/alert/alert.css +11 -18
  17. package/dist/components/alert/alert.svelte +4 -4
  18. package/dist/components/alert/types.d.ts +1 -1
  19. package/dist/components/app/app.css +1 -2
  20. package/dist/components/app/app.svelte +24 -28
  21. package/dist/components/app/app.svelte.d.ts +2 -0
  22. package/dist/components/appbar/appbar.css +8 -18
  23. package/dist/components/appbar/appbar.svelte +4 -4
  24. package/dist/components/appbar/types.d.ts +1 -1
  25. package/dist/components/aspect-ratio/aspect-ratio.svelte +0 -22
  26. package/dist/components/aspect-ratio/types.d.ts +1 -1
  27. package/dist/components/avatar/avatar.css +7 -14
  28. package/dist/components/avatar/avatar.svelte +4 -4
  29. package/dist/components/avatar/types.d.ts +1 -1
  30. package/dist/components/button/button.css +29 -36
  31. package/dist/components/button/button.svelte +5 -5
  32. package/dist/components/button/types.d.ts +1 -1
  33. package/dist/components/card/card.css +10 -20
  34. package/dist/components/card/card.svelte +5 -5
  35. package/dist/components/card/types.d.ts +1 -1
  36. package/dist/components/chip/chip.css +26 -33
  37. package/dist/components/chip/chip.svelte +5 -5
  38. package/dist/components/chip/types.d.ts +1 -1
  39. package/dist/components/dialog/dialog.css +13 -20
  40. package/dist/components/dialog/dialog.svelte +5 -5
  41. package/dist/components/dialog/types.d.ts +1 -1
  42. package/dist/components/dropdown/dropdown.css +3 -12
  43. package/dist/components/dropdown/dropdown.svelte +6 -7
  44. package/dist/components/dropdown/types.d.ts +1 -1
  45. package/dist/components/icon/icon.css +11 -12
  46. package/dist/components/icon/icon.svelte +2 -2
  47. package/dist/components/icon/types.d.ts +1 -1
  48. package/dist/components/list/list.css +19 -91
  49. package/dist/components/list/list.svelte +4 -4
  50. package/dist/components/list/modules/list-item.css +67 -0
  51. package/dist/components/list/modules/list-item.svelte +5 -5
  52. package/dist/components/list/types.d.ts +1 -1
  53. package/dist/components/modal/modal.css +15 -23
  54. package/dist/components/modal/modal.svelte +4 -5
  55. package/dist/components/modal/types.d.ts +1 -1
  56. package/dist/components/popover/popover.css +3 -12
  57. package/dist/components/popover/popover.svelte +6 -6
  58. package/dist/components/popover/types.d.ts +1 -1
  59. package/dist/components/separator/separator.css +4 -8
  60. package/dist/components/separator/separator.svelte +5 -5
  61. package/dist/components/separator/types.d.ts +1 -1
  62. package/dist/components/spacer/types.d.ts +1 -1
  63. package/dist/components/textfield/textfield.css +16 -23
  64. package/dist/components/textfield/textfield.svelte +4 -4
  65. package/dist/components/textfield/types.d.ts +1 -1
  66. package/dist/components/toolbar/toolbar.css +14 -26
  67. package/dist/components/toolbar/toolbar.svelte +4 -4
  68. package/dist/components/toolbar/types.d.ts +1 -1
  69. package/dist/components/tooltip/tooltip.css +5 -13
  70. package/dist/components/tooltip/tooltip.svelte +5 -5
  71. package/dist/components/tooltip/types.d.ts +1 -1
  72. package/dist/index.d.ts +2 -26
  73. package/dist/index.js +2 -6
  74. package/dist/internal/config/presets.d.ts +88 -47
  75. package/dist/internal/config/presets.js +89 -41
  76. package/dist/internal/config/variables.d.ts +1 -4
  77. package/dist/internal/config/variables.js +1 -4
  78. package/dist/internal/{assets.svelte.js → core/actions/assets.svelte.js} +4 -4
  79. package/dist/internal/core/actions/dropdown.svelte.d.ts +7 -0
  80. package/dist/internal/core/actions/popover.svelte.d.ts +7 -0
  81. package/dist/internal/core/actions/tooltip.svelte.d.ts +7 -0
  82. package/dist/internal/{ripple.js → core/animations/ripple.js} +3 -3
  83. package/dist/internal/core/css.d.ts +1 -0
  84. package/dist/internal/core/css.js +16 -0
  85. package/dist/internal/core/formatter/component.d.ts +1 -1
  86. package/dist/internal/core/formatter/component.js +25 -21
  87. package/dist/internal/core/formatter/device.d.ts +5 -0
  88. package/dist/internal/core/formatter/device.js +66 -0
  89. package/dist/internal/core/formatter/index.d.ts +5 -2
  90. package/dist/internal/core/formatter/index.js +15 -6
  91. package/dist/internal/core/formatter/{styles.d.ts → style.d.ts} +1 -1
  92. package/dist/internal/core/formatter/{styles.js → style.js} +3 -3
  93. package/dist/internal/core/formatter/theme.d.ts +1 -1
  94. package/dist/internal/core/formatter/theme.js +30 -6
  95. package/dist/internal/core/formatter/typography.d.ts +1 -1
  96. package/dist/internal/core/formatter/typography.js +2 -2
  97. package/dist/internal/core/standard-colors.d.ts +75 -0
  98. package/dist/internal/core/standard-colors.js +75 -0
  99. package/dist/internal/helpers/colors.d.ts +1 -0
  100. package/dist/internal/{colors.js → helpers/colors.js} +2 -2
  101. package/dist/internal/helpers/parser.d.ts +1 -0
  102. package/dist/internal/helpers/parser.js +43 -20
  103. package/dist/{plugin/vitejs.d.ts → internal/plugins/vite.d.ts} +1 -3
  104. package/dist/internal/plugins/vite.js +33 -0
  105. package/dist/internal/types/components.d.ts +14 -0
  106. package/dist/internal/types/configuration.d.ts +24 -1
  107. package/dist/internal/types/index.d.ts +1 -0
  108. package/dist/internal/types/index.js +1 -0
  109. package/dist/stores/components.js +1 -1
  110. package/dist/stores/themes.d.ts +0 -6
  111. package/dist/stores/themes.js +1 -31
  112. package/dist/styles/animation.css +33 -0
  113. package/dist/styles/keyframes.css +30 -0
  114. package/dist/{style/normalize.css → styles/reset.css} +15 -7
  115. package/package.json +7 -8
  116. package/bin/lapikit.js +0 -86
  117. package/bin/legacy.js +0 -34
  118. package/bin/modules/adapter.js +0 -52
  119. package/bin/modules/plugin.js +0 -223
  120. package/bin/modules/preset.js +0 -11
  121. package/dist/internal/colors.d.ts +0 -1
  122. package/dist/internal/core/parser-config.d.ts +0 -1
  123. package/dist/internal/core/parser-config.js +0 -24
  124. package/dist/internal/index.d.ts +0 -4
  125. package/dist/internal/index.js +0 -4
  126. package/dist/internal/types.d.ts +0 -57
  127. package/dist/internal/unit.d.ts +0 -1
  128. package/dist/internal/unit.js +0 -11
  129. package/dist/labs/index.d.ts +0 -4
  130. package/dist/labs/index.js +0 -5
  131. package/dist/labs/my-component-style-global.svelte +0 -6
  132. package/dist/labs/my-component-style-global.svelte.d.ts +0 -18
  133. package/dist/labs/my-component-style-import.svelte +0 -15
  134. package/dist/labs/my-component-style-import.svelte.d.ts +0 -18
  135. package/dist/labs/my-component-style-mixed.svelte +0 -23
  136. package/dist/labs/my-component-style-mixed.svelte.d.ts +0 -18
  137. package/dist/labs/my-component.svelte +0 -16
  138. package/dist/labs/my-component.svelte.d.ts +0 -18
  139. package/dist/labs/style-mixed.css +0 -7
  140. package/dist/labs/style.css +0 -7
  141. package/dist/labs.css +0 -25
  142. package/dist/plugin/css.d.ts +0 -1
  143. package/dist/plugin/css.js +0 -73
  144. package/dist/plugin/modules/config.d.ts +0 -2
  145. package/dist/plugin/modules/config.js +0 -54
  146. package/dist/plugin/modules/importer.d.ts +0 -1
  147. package/dist/plugin/modules/importer.js +0 -15
  148. package/dist/plugin/preset-v2.d.ts +0 -108
  149. package/dist/plugin/preset-v2.js +0 -126
  150. package/dist/plugin/vitejs.js +0 -55
  151. package/dist/preset.d.ts +0 -2
  152. package/dist/preset.js +0 -92
  153. package/dist/style/animation.css +0 -62
  154. package/dist/style/css.d.ts +0 -2
  155. package/dist/style/css.js +0 -34
  156. package/dist/style/parser/color.d.ts +0 -5
  157. package/dist/style/parser/color.js +0 -88
  158. package/dist/style/parser/component.d.ts +0 -2
  159. package/dist/style/parser/component.js +0 -115
  160. package/dist/style/parser/device.d.ts +0 -2
  161. package/dist/style/parser/device.js +0 -40
  162. package/dist/style/parser/index.d.ts +0 -4
  163. package/dist/style/parser/index.js +0 -4
  164. package/dist/style/parser/variable.d.ts +0 -2
  165. package/dist/style/parser/variable.js +0 -25
  166. package/dist/style/variable.css +0 -12
  167. /package/dist/{components/accordion → actions}/accordion.svelte.js +0 -0
  168. /package/dist/internal/{assets.svelte.d.ts → core/actions/assets.svelte.d.ts} +0 -0
  169. /package/dist/{components/dropdown → internal/core/actions}/dropdown.svelte.js +0 -0
  170. /package/dist/{components/popover → internal/core/actions}/popover.svelte.js +0 -0
  171. /package/dist/{components/tooltip → internal/core/actions}/tooltip.svelte.js +0 -0
  172. /package/dist/internal/{ripple.d.ts → core/animations/ripple.d.ts} +0 -0
  173. /package/dist/internal/{ansi.d.ts → core/bin/ansi.d.ts} +0 -0
  174. /package/dist/internal/{ansi.js → core/bin/ansi.js} +0 -0
  175. /package/dist/internal/{terminal.d.ts → core/bin/terminal.d.ts} +0 -0
  176. /package/dist/internal/{terminal.js → core/bin/terminal.js} +0 -0
  177. /package/dist/internal/{minify.d.ts → core/minify.d.ts} +0 -0
  178. /package/dist/internal/{minify.js → core/minify.js} +0 -0
  179. /package/dist/{utils/x11.d.ts → internal/core/x11-colors.d.ts} +0 -0
  180. /package/dist/{utils/x11.js → internal/core/x11-colors.js} +0 -0
  181. /package/dist/{utils → internal/helpers}/convert.d.ts +0 -0
  182. /package/dist/{utils → internal/helpers}/convert.js +0 -0
  183. /package/dist/internal/{deepMerge.d.ts → helpers/deep-merge.d.ts} +0 -0
  184. /package/dist/internal/{deepMerge.js → helpers/deep-merge.js} +0 -0
  185. /package/dist/internal/{clickOutside.d.ts → helpers/outside.d.ts} +0 -0
  186. /package/dist/internal/{clickOutside.js → helpers/outside.js} +0 -0
  187. /package/dist/internal/{scroll.d.ts → helpers/scroll.d.ts} +0 -0
  188. /package/dist/internal/{scroll.js → helpers/scroll.js} +0 -0
  189. /package/dist/internal/{types.js → types/components.js} +0 -0
  190. /package/dist/{colors.css → themes.css} +0 -0
@@ -1,8 +1,4 @@
1
1
  .kit-popover-content {
2
- --popover-color: var(--on, var(--kit-on-container));
3
- --popover-background: var(--base, var(--kit-container));
4
- --popover-radius: var(--shape, var(--kit-radius-md));
5
-
6
2
  inset: 0px auto auto 0px;
7
3
  margin: 0px;
8
4
  position: fixed;
@@ -11,12 +7,7 @@
11
7
  width: auto;
12
8
  opacity: 1;
13
9
  transition-property: opacity, transform;
14
- /* transition:
15
- color 0.5s,
16
- background-color 0.5s; */
17
-
18
- /* theme */
19
- background-color: var(--popover-background);
20
- color: var(--popover-color);
21
- border-radius: var(--popover-radius);
10
+ background-color: var(--popover-background, var(--kit-background-grouped-primary));
11
+ color: var(--popover-color, var(--kit-label-primary));
12
+ border-radius: var(--popover-shape, var(--system-shape-md));
22
13
  }
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
- import { getAssets } from '../../internal/assets.svelte.js';
3
- import { clickOutside } from '../../internal/clickOutside.js';
4
- import { getPositions } from './popover.svelte.js';
2
+ import { getAssets } from '../../internal/core/actions/assets.svelte.js';
3
+ import { clickOutside } from '../../internal/helpers/outside.js';
4
+ import { getPositions } from '../../internal/core/actions/popover.svelte.js';
5
5
  import type { PopoverProps, ModelPopoverProps } from './types.js';
6
6
 
7
7
  let {
@@ -63,9 +63,9 @@
63
63
  role="menu"
64
64
  class={['kit-popover-content', light && 'light', dark && 'dark', rest.class]}
65
65
  style={`transform: translate(${axis.x}px, ${axis.y}px);`}
66
- style:--base={assets.color(background)}
67
- style:--on={assets.color(color)}
68
- style:--shape={assets.shape(rounded)}
66
+ style:--popover-background={assets.color(background)}
67
+ style:--popover-color={assets.color(color)}
68
+ style:--popover-shape={assets.shape(rounded)}
69
69
  use:clickOutside={{ exclude: [ref, refActivator], onClose: () => (open = false) }}
70
70
  >
71
71
  {@render children?.()}
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../internal/types.js';
1
+ import type { Component } from '../../internal/types/index.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  export type PositionElement = {
4
4
  x: number;
@@ -1,20 +1,16 @@
1
1
  .kit-separator {
2
- --separator-opacity: var(--opacity, 0.12);
3
- --separator-color: var(--base, var(--kit-scrim));
4
-
5
2
  display: block;
6
3
  flex: 1 1 100%;
7
4
  height: 0px;
8
5
  max-height: 0px;
9
- opacity: var(--separator-opacity);
6
+ opacity: var(--separator-opacity, 0.12);
10
7
  transition: inherit;
11
- border-color: var(--separator-color);
12
- /* transition: border-color 0.5s; */
8
+ border-color: var(--separator-color, var(--kit-state-shadow));
13
9
  border-style: solid;
14
10
  }
15
11
 
16
12
  .kit-separator:not(.kit-separator--orientation-vertical) {
17
- border-width: var(--border-top-width, thin) 0 0 0;
13
+ border-width: var(--separator-top-width, thin) 0 0 0;
18
14
  }
19
15
 
20
16
  .kit-separator--orientation-vertical {
@@ -27,7 +23,7 @@
27
23
  max-width: 0px;
28
24
  vertical-align: text-bottom;
29
25
  width: 0px;
30
- border-width: 0 var(--border-right-width, thin) 0 0;
26
+ border-width: 0 var(--separator-right-width, thin) 0 0;
31
27
  }
32
28
 
33
29
  .kit-separator--inset:not(.kit-separator--orientation-vertical) {
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { getAssets } from '../../internal/index.js';
2
+ import { getAssets } from '../../internal/core/actions/assets.svelte.js';
3
3
  import type { SeparatorProps } from './types.js';
4
4
 
5
5
  let {
@@ -30,8 +30,8 @@
30
30
  ]}
31
31
  aria-orientation={orientation}
32
32
  role="separator"
33
- style:--base={assets.color(color)}
34
- style:--opacity={opacity}
35
- style:--border-top-width={orientation === 'horizontal' ? assets.unit(thickness) : undefined}
36
- style:--border-right-width={orientation === 'vertical' ? assets.unit(thickness) : undefined}
33
+ style:--separator-color={assets.color(color)}
34
+ style:--separator-opacity={opacity}
35
+ style:--separator-top-width={orientation === 'horizontal' ? assets.unit(thickness) : undefined}
36
+ style:--separator-right-width={orientation === 'vertical' ? assets.unit(thickness) : undefined}
37
37
  />
@@ -1,4 +1,4 @@
1
- import type { Base } from '../../internal/types.js';
1
+ import type { Base } from '../../internal/types/index.js';
2
2
  export interface SeparatorProps extends Base {
3
3
  is?: 'div' | 'hr';
4
4
  light?: boolean;
@@ -1,4 +1,4 @@
1
- import type { Base } from '../../internal/types.js';
1
+ import type { Base } from '../../internal/types/index.js';
2
2
  export interface SpacerProps extends Base {
3
3
  is?: 'div';
4
4
  }
@@ -1,10 +1,3 @@
1
- /* root */
2
- .kit-textfield {
3
- --textfield-color: var(--on, var(--kit-on-container));
4
- --textfield-background: var(--base, var(--kit-container));
5
- --textfield-radius: var(--shape, var(--kit-radius-md));
6
- }
7
-
8
1
  .kit-textfield {
9
2
  flex: 1 1 auto;
10
3
  font-size: 1rem;
@@ -18,16 +11,16 @@
18
11
 
19
12
  /* variant */
20
13
  .kit-textfield[breakpoint]kit-textfield--variant-filled .kit-field {
21
- --textfield-border-color: var(--textfield-background);
22
- background-color: var(--textfield-background);
23
- border-radius: var(--textfield-radius);
24
- color: var(--textfield-color);
14
+ --textfield-border-color: var(--textfield-background, var(--kit-background-grouped-primary));
15
+ background-color: var(--textfield-background, var(--kit-background-grouped-primary));
16
+ border-radius: var(--textfield-shape, var(--system-shape-md));
17
+ color: var(--textfield-color, var(--kit-label-primary));
25
18
  }
26
19
 
27
20
  .kit-textfield[breakpoint]kit-textfield--variant-outline .kit-field {
28
21
  --textfield-border-color: var(--textfield-color);
29
22
  background-color: var(--textfield-background);
30
- border-radius: var(--textfield-radius);
23
+ border-radius: var(--textfield-shape);
31
24
  color: var(--textfield-color);
32
25
  }
33
26
 
@@ -37,7 +30,7 @@
37
30
  border-top: 1px solid var(--textfield-border-color);
38
31
  border-right: 1px solid var(--textfield-border-color);
39
32
  border-left: 1px solid var(--textfield-border-color);
40
- border-radius: var(--textfield-radius);
33
+ border-radius: var(--textfield-shape);
41
34
  }
42
35
 
43
36
  .kit-textfield[breakpoint]kit-textfield--variant-text .kit-field {
@@ -75,7 +68,7 @@
75
68
  }
76
69
 
77
70
  .kit-textfield--error .kit-textfield-outline {
78
- border: 1px solid var(--kit-error);
71
+ border: 1px solid var(--kit-accent-destructive);
79
72
  }
80
73
 
81
74
  .kit-textfield-outline {
@@ -155,15 +148,15 @@
155
148
  display: grid;
156
149
  grid-template-areas: 'prepend-inner field clear append-inner';
157
150
  grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
158
- font-size: calc(var(--kit-spacing) * var(--textfield-multiplier-font-size));
151
+ font-size: calc(var(--system-spacing) * var(--textfield-multiplier-font-size));
159
152
  max-width: 100%;
160
153
  contain: layout;
161
154
  flex: 1 0;
162
155
  grid-area: control;
163
156
  position: relative;
164
- padding: calc(var(--kit-spacing) * var(--textfield-multiplier-x))
165
- calc(var(--kit-spacing) * var(--textfield-multiplier-y));
166
- gap: calc(var(--kit-spacing) * var(--textfield-multiplier-gap));
157
+ padding: calc(var(--system-spacing) * var(--textfield-multiplier-x))
158
+ calc(var(--system-spacing) * var(--textfield-multiplier-y));
159
+ gap: calc(var(--system-spacing) * var(--textfield-multiplier-gap));
167
160
  }
168
161
 
169
162
  .kit-textfield-control .kit-field .kit-field--field {
@@ -222,13 +215,13 @@
222
215
  min-width: 1px;
223
216
  position: relative;
224
217
  display: grid;
225
- gap: calc(var(--kit-spacing) * var(--textfield-multiplier-gap));
218
+ gap: calc(var(--system-spacing) * var(--textfield-multiplier-gap));
226
219
  grid-template-areas: 'message-prepend message message-append ';
227
220
  grid-template-columns: max-content minmax(0, 1fr) max-content;
228
221
  }
229
222
 
230
223
  .kit-message.kit-message--message-error {
231
- color: var(--kit-error);
224
+ color: var(--kit-accent-destructive);
232
225
  }
233
226
 
234
227
  .kit-message .kit-message--message {
@@ -291,15 +284,15 @@
291
284
  /*density */
292
285
  .kit-textfield[breakpoint]kit-textfield--density-default {
293
286
  --textfield-spacing-x: 0;
294
- --textfield-spacing-y: calc(var(--kit-spacing) * var(--textfield-multiplier-y));
287
+ --textfield-spacing-y: calc(var(--system-spacing) * var(--textfield-multiplier-y));
295
288
  }
296
289
 
297
290
  .kit-textfield[breakpoint]kit-textfield--density-compact {
298
291
  --textfield-spacing-x: calc(0 - 0.5rem);
299
- --textfield-spacing-y: calc(var(--kit-spacing) * var(--textfield-multiplier-y) - 0.5rem);
292
+ --textfield-spacing-y: calc(var(--system-spacing) * var(--textfield-multiplier-y) - 0.5rem);
300
293
  }
301
294
 
302
295
  .kit-textfield[breakpoint]kit-textfield--density-comfortable {
303
296
  --textfield-spacing-x: calc(0 + 0.5rem);
304
- --textfield-spacing-y: calc(var(--kit-spacing) * var(--textfield-multiplier-y) + 0.5rem);
297
+ --textfield-spacing-y: calc(var(--system-spacing) * var(--textfield-multiplier-y) + 0.5rem);
305
298
  }
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { getAssets } from '../../internal/index.js';
2
+ import { getAssets } from '../../internal/core/actions/assets.svelte.js';
3
3
  import type { TextfieldProps } from './types.js';
4
4
 
5
5
  //external
@@ -106,9 +106,9 @@
106
106
  type === 'number' && hideSpinButtons && 'kit-textfield--hide-spin-buttons',
107
107
  rest.class
108
108
  ]}
109
- style:--base={assets.color(background)}
110
- style:--on={assets.color(color)}
111
- style:--shape={assets.shape(rounded)}
109
+ style:--textfield-background={assets.color(background)}
110
+ style:--textfield-color={assets.color(color)}
111
+ style:--textfield-shape={assets.shape(rounded)}
112
112
  >
113
113
  {#if prepend}
114
114
  <div class="kit-textfield-prepend">
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../internal/types.js';
1
+ import type { Component } from '../../internal/types/index.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  export interface TextfieldProps extends Component {
4
4
  ref?: HTMLElement | null;
@@ -1,75 +1,63 @@
1
1
  .kit-toolbar {
2
- --toolbar-color: var(--on, var(--kit-on-surface));
3
- --toolbar-background: var(--base, var(--kit-surface));
4
- --toolbar-radius: var(--shape, var(--kit-radius-md));
5
-
6
2
  display: flex;
7
3
  align-items: center;
8
- /* min-width: max-content; */
9
4
  border-style: solid;
10
- /* transition:
11
- color 0.5s,
12
- border-color 0.5s,
13
- background-color 0.5s; */
14
-
15
5
  border-width: 1px;
16
6
  border-style: solid;
17
- border-radius: var(--toolbar-radius);
18
-
19
- /* theme */
20
- color: var(--toolbar-color);
21
- background-color: var(--toolbar-background);
22
- border-color: var(--toolbar-background);
7
+ border-radius: var(--toolbar-shape, var(--system-shape-md));
8
+ color: var(--toolbar-color, var(--kit-label-primary));
9
+ background-color: var(--toolbar-background, var(--kit-background-grouped-tertiary));
10
+ border-color: var(--toolbar-background, var(--kit-background-grouped-tertiary));
23
11
  }
24
12
 
25
13
  /* density */
26
14
  .kit-toolbar[breakpoint]kit-toolbar--density-default {
27
- border-radius: calc(var(--kit-spacing) * 2.25);
15
+ border-radius: calc(var(--system-spacing) * 2.25);
28
16
  }
29
17
  .kit-toolbar[breakpoint]kit-toolbar--density-default:not([class*='toolbar--orientation-vertical']) {
30
18
  height: 3rem;
31
- padding-inline: calc(var(--kit-spacing) * 1.5);
19
+ padding-inline: calc(var(--system-spacing) * 1.5);
32
20
  }
33
21
 
34
22
  .kit-toolbar[breakpoint]kit-toolbar--density-default[class*='toolbar--orientation-vertical'] {
35
23
  width: 3rem;
36
- padding: calc(var(--kit-spacing) * 1.5) 0;
24
+ padding: calc(var(--system-spacing) * 1.5) 0;
37
25
  }
38
26
 
39
27
  .kit-toolbar[breakpoint]kit-toolbar--density-compact {
40
- border-radius: calc(var(--kit-spacing) * 1.75);
28
+ border-radius: calc(var(--system-spacing) * 1.75);
41
29
  }
42
30
 
43
31
  .kit-toolbar[breakpoint]kit-toolbar--density-compact:not([class*='toolbar--orientation-vertical']) {
44
32
  height: 2.625rem;
45
- padding-inline: calc(var(--kit-spacing) * 0.75);
33
+ padding-inline: calc(var(--system-spacing) * 0.75);
46
34
  }
47
35
 
48
36
  .kit-toolbar[breakpoint]kit-toolbar--density-compact[class*='toolbar--orientation-vertical'] {
49
37
  width: 2.625rem;
50
- padding: calc(var(--kit-spacing) * 0.75) 0;
38
+ padding: calc(var(--system-spacing) * 0.75) 0;
51
39
  }
52
40
 
53
41
  .kit-toolbar[breakpoint]kit-toolbar--density-comfortable {
54
- border-radius: calc(var(--kit-spacing) * 3.5);
42
+ border-radius: calc(var(--system-spacing) * 3.5);
55
43
  }
56
44
 
57
45
  .kit-toolbar[breakpoint]kit-toolbar--density-comfortable:not(
58
46
  [class*='toolbar--orientation-vertical']
59
47
  ) {
60
48
  height: 3.5rem;
61
- padding-inline: calc(var(--kit-spacing) * 2.25);
49
+ padding-inline: calc(var(--system-spacing) * 2.25);
62
50
  }
63
51
 
64
52
  .kit-toolbar[breakpoint]kit-toolbar--density-comfortable[class*='toolbar--orientation-vertical'] {
65
53
  width: 3.5rem;
66
- padding: calc(var(--kit-spacing) * 2.25) 0;
54
+ padding: calc(var(--system-spacing) * 2.25) 0;
67
55
  }
68
56
 
69
57
  .kit-toolbar[breakpoint]kit-toolbar--variant-text,
70
58
  .kit-toolbar[breakpoint]kit-toolbar--variant-outline,
71
59
  .kit-toolbar[breakpoint]kit-toolbar--variant-dash {
72
- --toolbar-color: var(--base, var(--kit-surface));
60
+ --toolbar-color: var(--base, var(--kit-background-grouped-primary));
73
61
  background-color: transparent;
74
62
  }
75
63
 
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { getAssets } from '../../internal/index.js';
2
+ import { getAssets } from '../../internal/core/actions/assets.svelte.js';
3
3
  import type { ToolbarProps } from './types.js';
4
4
 
5
5
  let {
@@ -37,9 +37,9 @@
37
37
  location && assets.className('toolbar', 'location', location),
38
38
  rest.class
39
39
  ]}
40
- style:--base={assets.color(background)}
41
- style:--on={assets.color(color)}
42
- style:--shape={assets.shape(rounded)}
40
+ style:--toolbar-background={assets.color(background)}
41
+ style:--toolbar-color={assets.color(color)}
42
+ style:--toolbar-shape={assets.shape(rounded)}
43
43
  >
44
44
  <div class={['kit-toolbar--wrapper', classContent]}>
45
45
  {@render children?.()}
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../internal/types.js';
1
+ import type { Component } from '../../internal/types/index.js';
2
2
  type Variant = 'outline' | 'text' | 'dash';
3
3
  type Density = 'compact' | 'comfortable' | 'default';
4
4
  type Orientation = 'horizontal' | 'vertical';
@@ -6,24 +6,16 @@
6
6
  }
7
7
 
8
8
  .kit-tooltip-content {
9
- --tooltip-color: var(--on, var(--kit-on-surface));
10
- --tooltip-background: var(--base, var(--kit-surface));
11
- --tooltip-radius: var(--shape, var(--kit-radius-md));
12
-
13
- background-color: var(--tooltip-background);
14
- color: var(--tooltip-color);
15
- border-radius: var(--tooltip-radius);
16
- border: 1px solid var(--tooltip-background);
9
+ background-color: var(--tooltip-background, var(--kit-background-grouped-primary));
10
+ color: var(--tooltip-color, var(--kit-label-primary));
11
+ border-radius: var(--tooltip-shape, var(--system-shape-md));
12
+ border: 1px solid var(--tooltip-background, var(--kit-background-grouped-primary));
17
13
  font-size: 0.875rem;
18
14
  display: inline-block;
19
15
  width: auto;
20
16
  pointer-events: none;
21
17
  overflow-wrap: break-word;
22
- /* transition:
23
- color 0.5s,
24
- border-color 0.5s,
25
- background-color 0.5s; */
26
- box-shadow: 0px 16px 29px -10px color-mix(in oklab, var(--kit-scrim) 60%, transparent);
18
+ box-shadow: 0px 16px 29px -10px color-mix(in oklab, var(--kit-state-shadow) 60%, transparent);
27
19
  }
28
20
 
29
21
  /* density */
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
- import { getAssets } from '../../internal/assets.svelte.js';
3
- import { getPositionsTooltip } from './tooltip.svelte.js';
2
+ import { getAssets } from '../../internal/core/actions/assets.svelte.js';
3
+ import { getPositionsTooltip } from '../../internal/core/actions/tooltip.svelte.js';
4
4
  import type { PositionElement, TooltipProps } from './types.js';
5
5
 
6
6
  let {
@@ -99,9 +99,9 @@
99
99
  density && assets.className('tooltip-content', 'density', density),
100
100
  rest.class
101
101
  ]}
102
- style:--base={assets.color(background)}
103
- style:--on={assets.color(color)}
104
- style:--shape={assets.shape(rounded)}
102
+ style:--tooltip-background={assets.color(background)}
103
+ style:--tooltip-color={assets.color(color)}
104
+ style:--tooltip-shape={assets.shape(rounded)}
105
105
  >
106
106
  {#if tooltip}
107
107
  {@render tooltip?.()}
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../internal/types.js';
1
+ import type { Component } from '../../internal/types/index.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  export interface TooltipProps extends Component {
4
4
  open?: boolean;
package/dist/index.d.ts CHANGED
@@ -1,27 +1,3 @@
1
- interface Lapikit {
2
- adapterCSS: string;
3
- breakpoints: {
4
- devices: {
5
- [key: string]: string;
6
- };
7
- thresholds: {
8
- [key: string]: number | string;
9
- };
10
- };
11
- theme: {
12
- defaultTheme: string;
13
- themes: {
14
- [key: string]: {
15
- dark: boolean;
16
- colors: {
17
- [key: string]: string;
18
- };
19
- variables: {
20
- [key: string]: string;
21
- };
22
- };
23
- };
24
- };
25
- }
26
- declare function createLapikit(lapikit: Lapikit): void;
1
+ import type { LapikitConfiguration } from './internal/types/configuration.js';
2
+ declare function createLapikit(lapikit: LapikitConfiguration): void;
27
3
  export default createLapikit;
package/dist/index.js CHANGED
@@ -1,17 +1,14 @@
1
- import { deepMerge } from './internal/deepMerge.js';
1
+ import { deepMerge } from './internal/helpers/deep-merge.js';
2
2
  import { breakpoints } from './stores/breakpoints.js';
3
3
  import { get } from 'svelte/store';
4
- import { valueToPx } from './utils/convert.js';
5
4
  import { devices } from './stores/devices.js';
5
+ import { valueToPx } from './internal/helpers/convert.js';
6
6
  function createLapikit(lapikit) {
7
- console.log('Creating a new Lapikit instance...');
8
- console.log('Options loaded:', lapikit);
9
7
  if (lapikit?.breakpoints?.thresholds) {
10
8
  const currentBreakpoints = get(breakpoints);
11
9
  const breakpointMerged = deepMerge(currentBreakpoints, lapikit.breakpoints.thresholds);
12
10
  const formattedBreakpoints = Object.fromEntries(Object.entries(breakpointMerged).map(([key, value]) => [key, valueToPx(value)]));
13
11
  breakpoints.set(formattedBreakpoints);
14
- console.log('Breakpoints found:', formattedBreakpoints);
15
12
  }
16
13
  if (lapikit?.breakpoints?.devices) {
17
14
  const currentDevices = get(devices);
@@ -22,7 +19,6 @@ function createLapikit(lapikit) {
22
19
  return [key, valueToPx(breakpointValue)];
23
20
  }));
24
21
  devices.set(formattedDevices);
25
- console.log('Devices found:', formattedDevices);
26
22
  }
27
23
  }
28
24
  export default createLapikit;
@@ -18,67 +18,91 @@ export declare const preset: {
18
18
  };
19
19
  theme: {
20
20
  defaultTheme: string;
21
+ colorScheme: boolean;
21
22
  themes: {
22
23
  light: {
23
24
  dark: boolean;
24
25
  colors: {
25
- blue: string;
26
- green: string;
27
- red: string;
28
- yellow: string;
29
- orange: string;
30
- purple: string;
31
- pink: string;
32
- indigo: string;
33
- cyan: string;
34
- gray: string;
35
- 'gray-2': string;
36
- 'gray-3': string;
37
- 'gray-4': string;
38
- 'gray-5': string;
39
- 'gray-6': string;
40
- background: string;
41
- 'secondary-background': string;
42
- 'tertiary-background': string;
43
- label: string;
44
- 'secondary-label': string;
26
+ label: {
27
+ primary: string;
28
+ secondary: string;
29
+ tertiary: string;
30
+ quaternary: string;
31
+ };
32
+ accent: {
33
+ primary: string;
34
+ success: string;
35
+ warning: string;
36
+ destructive: string;
37
+ info: string;
38
+ };
39
+ separator: {
40
+ default: string;
41
+ opaque: string;
42
+ };
43
+ state: {
44
+ placeholder: string;
45
+ disabled: string;
46
+ link: string;
47
+ highlight: string;
48
+ shadow: string;
49
+ };
50
+ background: {
51
+ primary: string;
52
+ secondary: string;
53
+ tertiary: string;
54
+ grouped: {
55
+ primary: string;
56
+ secondary: string;
57
+ tertiary: string;
58
+ };
59
+ };
45
60
  };
46
61
  variables: {
47
- info: string;
48
- success: string;
49
- error: string;
50
- warning: string;
62
+ 'test-variable': string;
51
63
  };
52
64
  };
53
65
  dark: {
54
66
  dark: boolean;
55
67
  colors: {
56
- blue: string;
57
- green: string;
58
- red: string;
59
- yellow: string;
60
- orange: string;
61
- purple: string;
62
68
  pink: string;
63
- indigo: string;
64
- cyan: string;
65
- gray: string;
66
- 'gray-2': string;
67
- 'gray-3': string;
68
- 'gray-4': string;
69
- 'gray-5': string;
70
- 'gray-6': string;
71
- background: string;
72
- 'secondary-background': string;
73
- 'tertiary-background': string;
74
- label: string;
75
- 'secondary-label': string;
69
+ label: {
70
+ primary: string;
71
+ secondary: string;
72
+ tertiary: string;
73
+ quaternary: string;
74
+ };
75
+ accent: {
76
+ primary: string;
77
+ success: string;
78
+ warning: string;
79
+ destructive: string;
80
+ info: string;
81
+ };
82
+ separator: {
83
+ default: string;
84
+ opaque: string;
85
+ };
86
+ state: {
87
+ placeholder: string;
88
+ disabled: string;
89
+ link: string;
90
+ highlight: string;
91
+ shadow: string;
92
+ };
93
+ background: {
94
+ primary: string;
95
+ secondary: string;
96
+ tertiary: string;
97
+ grouped: {
98
+ primary: string;
99
+ secondary: string;
100
+ tertiary: string;
101
+ };
102
+ };
76
103
  };
77
104
  variables: {
78
- info: string;
79
- success: string;
80
- error: string;
81
- warning: string;
105
+ 'test-variable': string;
82
106
  };
83
107
  };
84
108
  };
@@ -104,5 +128,22 @@ export declare const preset: {
104
128
  '3xl': string;
105
129
  full: string;
106
130
  };
131
+ dialog: {
132
+ xs: string;
133
+ sm: string;
134
+ md: string;
135
+ lg: string;
136
+ xl: string;
137
+ };
138
+ modal: {
139
+ xs: string;
140
+ sm: string;
141
+ md: string;
142
+ lg: string;
143
+ xl: string;
144
+ };
145
+ animation: {
146
+ 'ripple-duration': string;
147
+ };
107
148
  };
108
149
  };