lapikit 0.0.0-insiders.f8b6426 → 0.0.0-insiders.fb12c48

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 (181) hide show
  1. package/bin/configuration.js +303 -0
  2. package/bin/helper.js +0 -38
  3. package/bin/index.js +33 -0
  4. package/bin/presets.js +26 -0
  5. package/bin/prompts.js +67 -0
  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 +39 -21
  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 +9 -5
  35. package/dist/components/card/types.d.ts +3 -1
  36. package/dist/components/chip/chip.css +30 -37
  37. package/dist/components/chip/chip.svelte +10 -8
  38. package/dist/components/chip/types.d.ts +2 -1
  39. package/dist/components/dialog/dialog.css +15 -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 +22 -29
  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 +11 -34
  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 +3 -1
  73. package/dist/index.js +23 -3
  74. package/dist/internal/config/presets.d.ts +149 -0
  75. package/dist/internal/config/presets.js +169 -0
  76. package/dist/internal/config/variables.d.ts +3 -0
  77. package/dist/internal/config/variables.js +3 -0
  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 +5 -0
  86. package/dist/internal/core/formatter/component.js +60 -0
  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 +7 -0
  90. package/dist/internal/core/formatter/index.js +35 -0
  91. package/dist/internal/core/formatter/style.d.ts +4 -0
  92. package/dist/internal/core/formatter/style.js +15 -0
  93. package/dist/internal/core/formatter/theme.d.ts +5 -0
  94. package/dist/internal/core/formatter/theme.js +44 -0
  95. package/dist/internal/core/formatter/typography.d.ts +5 -0
  96. package/dist/internal/core/formatter/typography.js +12 -0
  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/convert.d.ts +1 -0
  102. package/dist/internal/helpers/convert.js +17 -0
  103. package/dist/internal/helpers/deep-merge.d.ts +44 -0
  104. package/dist/internal/helpers/deep-merge.js +80 -0
  105. package/dist/internal/helpers/parser.d.ts +10 -0
  106. package/dist/internal/helpers/parser.js +93 -0
  107. package/dist/internal/plugins/vite.d.ts +8 -0
  108. package/dist/internal/plugins/vite.js +33 -0
  109. package/dist/internal/types/components.d.ts +14 -0
  110. package/dist/internal/types/configuration.d.ts +63 -0
  111. package/dist/internal/types/configuration.js +1 -0
  112. package/dist/internal/types/index.d.ts +2 -0
  113. package/dist/internal/types/index.js +2 -0
  114. package/dist/stores/breakpoints.d.ts +6 -0
  115. package/dist/stores/breakpoints.js +14 -0
  116. package/dist/stores/components.d.ts +8 -0
  117. package/dist/stores/components.js +26 -0
  118. package/dist/stores/devices.d.ts +6 -0
  119. package/dist/stores/devices.js +9 -0
  120. package/dist/stores/index.d.ts +5 -10
  121. package/dist/stores/index.js +5 -47
  122. package/dist/stores/themes.d.ts +2 -0
  123. package/dist/stores/themes.js +4 -0
  124. package/dist/stores/viewport.d.ts +7 -0
  125. package/dist/stores/viewport.js +7 -0
  126. package/dist/styles/animation.css +33 -0
  127. package/dist/styles/keyframes.css +30 -0
  128. package/dist/{style/normalize.css → styles/reset.css} +15 -7
  129. package/dist/themes.css +0 -0
  130. package/package.json +12 -5
  131. package/bin/lapikit.js +0 -79
  132. package/bin/modules/adapter.js +0 -52
  133. package/bin/modules/plugin.js +0 -66
  134. package/bin/modules/preset.js +0 -11
  135. package/dist/internal/colors.d.ts +0 -1
  136. package/dist/internal/index.d.ts +0 -4
  137. package/dist/internal/index.js +0 -4
  138. package/dist/internal/types.d.ts +0 -57
  139. package/dist/internal/unit.d.ts +0 -1
  140. package/dist/internal/unit.js +0 -11
  141. package/dist/plugin/modules/config.d.ts +0 -2
  142. package/dist/plugin/modules/config.js +0 -54
  143. package/dist/plugin/modules/importer.d.ts +0 -1
  144. package/dist/plugin/modules/importer.js +0 -15
  145. package/dist/plugin/vitejs.d.ts +0 -6
  146. package/dist/plugin/vitejs.js +0 -26
  147. package/dist/preset.d.ts +0 -2
  148. package/dist/preset.js +0 -92
  149. package/dist/style/animation.css +0 -62
  150. package/dist/style/css.d.ts +0 -2
  151. package/dist/style/css.js +0 -34
  152. package/dist/style/parser/color.d.ts +0 -5
  153. package/dist/style/parser/color.js +0 -88
  154. package/dist/style/parser/component.d.ts +0 -2
  155. package/dist/style/parser/component.js +0 -115
  156. package/dist/style/parser/device.d.ts +0 -2
  157. package/dist/style/parser/device.js +0 -40
  158. package/dist/style/parser/index.d.ts +0 -4
  159. package/dist/style/parser/index.js +0 -4
  160. package/dist/style/parser/variable.d.ts +0 -2
  161. package/dist/style/parser/variable.js +0 -25
  162. package/dist/style/variable.css +0 -12
  163. /package/dist/{components/accordion → actions}/accordion.svelte.js +0 -0
  164. /package/dist/internal/{assets.svelte.d.ts → core/actions/assets.svelte.d.ts} +0 -0
  165. /package/dist/{components/dropdown → internal/core/actions}/dropdown.svelte.js +0 -0
  166. /package/dist/{components/popover → internal/core/actions}/popover.svelte.js +0 -0
  167. /package/dist/{components/tooltip → internal/core/actions}/tooltip.svelte.js +0 -0
  168. /package/dist/internal/{ripple.d.ts → core/animations/ripple.d.ts} +0 -0
  169. /package/dist/internal/{ansi.d.ts → core/bin/ansi.d.ts} +0 -0
  170. /package/dist/internal/{ansi.js → core/bin/ansi.js} +0 -0
  171. /package/dist/internal/{terminal.d.ts → core/bin/terminal.d.ts} +0 -0
  172. /package/dist/internal/{terminal.js → core/bin/terminal.js} +0 -0
  173. /package/dist/internal/{minify.d.ts → core/minify.d.ts} +0 -0
  174. /package/dist/internal/{minify.js → core/minify.js} +0 -0
  175. /package/dist/{utils/x11.d.ts → internal/core/x11-colors.d.ts} +0 -0
  176. /package/dist/{utils/x11.js → internal/core/x11-colors.js} +0 -0
  177. /package/dist/internal/{clickOutside.d.ts → helpers/outside.d.ts} +0 -0
  178. /package/dist/internal/{clickOutside.js → helpers/outside.js} +0 -0
  179. /package/dist/internal/{scroll.d.ts → helpers/scroll.d.ts} +0 -0
  180. /package/dist/internal/{scroll.js → helpers/scroll.js} +0 -0
  181. /package/dist/internal/{types.js → types/components.js} +0 -0
@@ -1,26 +1,16 @@
1
- /* root */
2
- .kit-card {
3
- --card-color: var(--on, var(--kit-on-surface));
4
- --card-background: var(--base, var(--kit-surface));
5
- --card-radius: var(--shape, var(--kit-radius-md));
6
- }
7
-
8
1
  .kit-card {
9
2
  position: relative;
10
3
  display: flex;
11
4
  flex-direction: column;
12
5
  text-align: start;
13
6
  overflow: hidden;
14
- /* transition:
15
- color 0.5s,
16
- background-color 0.5s; */
17
7
  padding-top: var(--card-spacing-x);
18
8
  padding-bottom: var(--card-spacing-x);
19
9
  padding-right: var(--card-spacing-y);
20
10
  padding-left: var(--card-spacing-y);
21
- border-radius: var(--card-radius);
11
+ border-radius: var(--card-shape, var(--system-shape-md));
22
12
  font-weight: 500;
23
- color: var(--card-color);
13
+ color: var(--card-color, var(--kit-label-primary));
24
14
  text-decoration: none;
25
15
  }
26
16
 
@@ -50,25 +40,25 @@
50
40
 
51
41
  /* density */
52
42
  .kit-card[breakpoint]kit-card--density-default {
53
- --card-spacing-x: calc(var(--kit-spacing) * 2);
54
- --card-spacing-y: calc(var(--kit-spacing) * 2);
43
+ --card-spacing-x: calc(var(--system-spacing) * 2);
44
+ --card-spacing-y: calc(var(--system-spacing) * 2);
55
45
  }
56
46
  .kit-card[breakpoint]kit-card--density-compact {
57
47
  --card-spacing-x: 0;
58
48
  --card-spacing-y: 0;
59
49
  }
60
50
  .kit-card[breakpoint]kit-card--density-comfortable {
61
- --card-spacing-x: calc(var(--kit-spacing) * 4);
62
- --card-spacing-y: calc(var(--kit-spacing) * 4);
51
+ --card-spacing-x: calc(var(--system-spacing) * 4);
52
+ --card-spacing-y: calc(var(--system-spacing) * 4);
63
53
  }
64
54
 
65
55
  /* variant */
66
56
  .kit-card[breakpoint]kit-card--variant-filled {
67
- background-color: var(--card-background);
57
+ background-color: var(--card-background, var(--kit-background-grouped-secondary));
68
58
  }
69
59
 
70
60
  .kit-card[breakpoint]kit-card--variant-outline {
71
- --card-color: var(--base, var(--kit-on-surface));
61
+ --card-color: var(--base, var(--kit-label-primary));
72
62
  background-color: transparent;
73
63
  }
74
64
  .kit-card[breakpoint]kit-card--variant-outline::before {
@@ -81,7 +71,7 @@
81
71
  }
82
72
 
83
73
  .kit-card[breakpoint]kit-card--variant-text {
84
- --card-color: var(--base, var(--kit-on-surface));
74
+ --card-color: var(--base, var(--kit-label-primary));
85
75
  background-color: transparent;
86
76
  border: none;
87
77
  }
@@ -89,7 +79,7 @@
89
79
  /* events */
90
80
  .kit-card[class*='card--variant-filled'].kit-card--clickable:active,
91
81
  .kit-card.kit-card--active[class*='card--variant-filled'].kit-card--clickable {
92
- background-color: color-mix(in oklab, var(--card-background) 90%, var(--kit-scrim));
82
+ background-color: color-mix(in oklab, var(--card-background) 90%, var(--kit-state-shadow));
93
83
  }
94
84
  .kit-card.kit-card--active[class*='card--variant-']:not(
95
85
  [class*='variant-filled']
@@ -1,9 +1,9 @@
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 { CardProps } from './types.js';
4
4
 
5
5
  // external
6
- import { ripple } from '../../internal/ripple.js';
6
+ import { ripple } from '../../internal/core/animations/ripple.js';
7
7
 
8
8
  let {
9
9
  children,
@@ -20,6 +20,8 @@
20
20
  color,
21
21
  background,
22
22
  noRipple,
23
+ width,
24
+ height,
23
25
  ...rest
24
26
  }: CardProps = $props();
25
27
 
@@ -55,9 +57,11 @@
55
57
  component: 'card',
56
58
  disabled: noRipple || disabled || !isClickable
57
59
  }}
58
- style:--base={assets.color(background)}
59
- style:--on={assets.color(color)}
60
- style:--shape={assets.shape(rounded)}
60
+ style:--card-background={assets.color(background)}
61
+ style:--card-color={assets.color(color)}
62
+ style:--card-shape={assets.shape(rounded)}
63
+ style:width
64
+ style:height
61
65
  >
62
66
  {@render children?.()}
63
67
  </svelte:element>
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../internal/types.js';
1
+ import type { Component } from '../../internal/types/index.js';
2
2
  type Density = 'compact' | 'comfortable' | 'default';
3
3
  export interface CardProps extends Component {
4
4
  is?: 'a' | 'button' | 'div';
@@ -14,5 +14,7 @@ export interface CardProps extends Component {
14
14
  rounded?: string;
15
15
  color?: string;
16
16
  background?: string;
17
+ width?: string | number;
18
+ height?: string | number;
17
19
  }
18
20
  export {};
@@ -1,12 +1,5 @@
1
- /* root */
2
1
  .kit-chip {
3
- --chip-color: var(--on, var(--kit-on-container));
4
- --chip-background: var(--base, var(--kit-container));
5
- --chip-radius: var(--shape, var(--kit-radius-full));
6
- }
7
-
8
- .kit-chip {
9
- min-width: calc(var(--kit-spacing) * var(--chip-multiplier-x));
2
+ min-width: calc(var(--system-spacing) * var(--chip-multiplier-x));
10
3
  position: relative;
11
4
  border: none;
12
5
  outline: none;
@@ -14,13 +7,13 @@
14
7
  padding-bottom: var(--chip-spacing-x);
15
8
  padding-right: var(--chip-spacing-y);
16
9
  padding-left: var(--chip-spacing-y);
17
- border-radius: var(--chip-radius);
18
- color: var(--chip-color);
10
+ border-radius: var(--chip-shape, var(--system-shape-full));
11
+ color: var(--chip-color, var(--kit-label-primary));
19
12
  font-weight: 500;
20
13
  text-decoration: none;
21
14
  }
22
15
 
23
- .kit-chip:not(div):not(span) {
16
+ .kit-chip:not(div):not(span):not(.kit-chip--readonly) {
24
17
  cursor: pointer;
25
18
  }
26
19
 
@@ -34,8 +27,8 @@
34
27
  align-items: center;
35
28
  justify-content: center;
36
29
  white-space: nowrap;
37
- gap: calc(var(--kit-spacing) * var(--chip-multiplier-gap));
38
- font-size: calc(var(--kit-spacing) * var(--chip-multiplier-font-size));
30
+ gap: calc(var(--system-spacing) * var(--chip-multiplier-gap));
31
+ font-size: calc(var(--system-spacing) * var(--chip-multiplier-font-size));
39
32
  line-height: 0;
40
33
  }
41
34
 
@@ -49,13 +42,13 @@
49
42
  pointer-events: none;
50
43
  border-radius: inherit;
51
44
  }
52
- .kit-chip:not(div):not(span):hover::after {
45
+ .kit-chip:not(div):not(span):not(.kit-chip--readonly):hover::after {
53
46
  opacity: 0.08;
54
47
  }
55
- .kit-chip:not(div):not(span):active::after {
48
+ .kit-chip:not(div):not(span):not(.kit-chip--readonly):active::after {
56
49
  opacity: 0.12;
57
50
  }
58
- .kit-chip:not(div):not(span):focus-visible::after {
51
+ .kit-chip:not(div):not(span):not(.kit-chip--readonly):focus-visible::after {
59
52
  opacity: 0.12;
60
53
  }
61
54
 
@@ -112,11 +105,11 @@
112
105
 
113
106
  /* variant */
114
107
  .kit-chip[breakpoint]kit-chip--variant-filled {
115
- background-color: var(--chip-background);
108
+ background-color: var(--chip-background, var(--kit-background-grouped-primary));
116
109
  }
117
110
 
118
111
  .kit-chip[breakpoint]kit-chip--variant-outline {
119
- --chip-color: var(--on, var(--kit-on-container));
112
+ --chip-color: var(--chip-color, var(--kit-label-primary));
120
113
  background-color: var(--chip-background);
121
114
  }
122
115
  .kit-chip[breakpoint]kit-chip--variant-outline::before {
@@ -130,60 +123,60 @@
130
123
 
131
124
  /* density */
132
125
  .kit-chip[breakpoint]kit-chip--density-default {
133
- height: calc(var(--kit-spacing) * var(--chip-multiplier-x));
126
+ height: calc(var(--system-spacing) * var(--chip-multiplier-x));
134
127
  --chip-spacing-x: 0;
135
- --chip-spacing-y: calc(var(--kit-spacing) * var(--chip-multiplier-y));
128
+ --chip-spacing-y: calc(var(--system-spacing) * var(--chip-multiplier-y));
136
129
  }
137
130
 
138
131
  .kit-chip[breakpoint]kit-chip--density-compact {
139
- height: calc(var(--kit-spacing) * var(--chip-multiplier-x) - 0.25rem);
132
+ height: calc(var(--system-spacing) * var(--chip-multiplier-x) - 0.25rem);
140
133
  --chip-spacing-x: 0;
141
- --chip-spacing-y: calc(var(--kit-spacing) * var(--chip-multiplier-y) - 0.25rem);
134
+ --chip-spacing-y: calc(var(--system-spacing) * var(--chip-multiplier-y) - 0.25rem);
142
135
  }
143
136
 
144
137
  .kit-chip[breakpoint]kit-chip--density-comfortable {
145
- height: calc(var(--kit-spacing) * var(--chip-multiplier-x) + 0.25rem);
138
+ height: calc(var(--system-spacing) * var(--chip-multiplier-x) + 0.25rem);
146
139
  --chip-spacing-x: 0;
147
- --chip-spacing-y: calc(var(--kit-spacing) * var(--chip-multiplier-y) + 0.25rem);
140
+ --chip-spacing-y: calc(var(--system-spacing) * var(--chip-multiplier-y) + 0.25rem);
148
141
  }
149
142
 
150
143
  /* state */
151
144
  .kit-chip.kit-chip--info[class*='chip--variant-filled'] {
152
- --on: var(--kit-on-info);
153
- --base: var(--kit-info);
145
+ --chip-color: var(--kit-on-info);
146
+ --chip-background: var(--kit-accent-info);
154
147
  }
155
148
  .kit-chip.kit-chip--info[class*='chip--variant-']:not([class*='variant-filled']) {
156
- --base: var(--kit-info);
149
+ --chip-background: var(--kit-accent-info);
157
150
  }
158
151
 
159
152
  .kit-chip.kit-chip--success[class*='chip--variant-filled'] {
160
- --on: var(--kit-on-success);
161
- --base: var(--kit-success);
153
+ --chip-color: var(--kit-on-success);
154
+ --chip-background: var(--kit-accent-success);
162
155
  }
163
156
  .kit-chip.kit-chip--success[class*='chip--variant-']:not([class*='variant-filled']) {
164
- --base: var(--kit-success);
157
+ --chip-background: var(--kit-accent-success);
165
158
  }
166
159
 
167
160
  .kit-chip.kit-chip--warning[class*='chip--variant-filled'] {
168
- --on: var(--kit-on-warning);
169
- --base: var(--kit-warning);
161
+ --chip-color: var(--kit-on-warning);
162
+ --chip-background: var(--kit-accent-warning);
170
163
  }
171
164
  .kit-chip.kit-chip--warning[class*='chip--variant-']:not([class*='variant-filled']) {
172
- --base: var(--kit-warning);
165
+ --chip-background: var(--kit-accent-warning);
173
166
  }
174
167
 
175
168
  .kit-chip.kit-chip--error[class*='chip--variant-filled'] {
176
- --on: var(--kit-on-error);
177
- --base: var(--kit-error);
169
+ --chip-color: var(--kit-on-error);
170
+ --chip-background: var(--kit-accent-destructive);
178
171
  }
179
172
  .kit-chip.kit-chip--error[class*='chip--variant-']:not([class*='variant-filled']) {
180
- --base: var(--kit-error);
173
+ --chip-background: var(--kit-accent-destructive);
181
174
  }
182
175
 
183
176
  /* events */
184
177
  .kit-chip[class*='chip--variant-filled']:active,
185
178
  .kit-chip.kit-chip--active[class*='chip--variant-filled'] {
186
- background-color: color-mix(in oklab, var(--chip-background) 90%, var(--kit-scrim));
179
+ background-color: color-mix(in oklab, var(--chip-background) 90%, var(--kit-state-shadow));
187
180
  }
188
181
  .kit-chip.kit-chip--active[class*='chip--variant-']:not([class*='variant-filled']):active,
189
182
  .kit-chip.kit-chip--active[class*='chip--variant-']:not([class*='variant-filled']) {
@@ -1,12 +1,12 @@
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 { Icon } from '../index.js';
4
4
  import type { ChipProps } from './types.js';
5
5
 
6
6
  // external
7
7
  import LoadingFill from '../../assets/icons/loading-fill.svelte';
8
8
  import Close from '../../assets/icons/close-fill.svelte';
9
- import { ripple } from '../../internal/ripple.js';
9
+ import { ripple } from '../../internal/core/animations/ripple.js';
10
10
 
11
11
  let {
12
12
  children,
@@ -37,6 +37,7 @@
37
37
  rounded,
38
38
  closable,
39
39
  noRipple,
40
+ readonly = false,
40
41
  ...rest
41
42
  }: ChipProps = $props();
42
43
 
@@ -44,7 +45,7 @@
44
45
 
45
46
  $effect(() => {
46
47
  const refProps = { ...rest };
47
- if (refProps?.onclick) is = 'button';
48
+ if (refProps?.onclick && !readonly) is = 'button';
48
49
  });
49
50
  </script>
50
51
 
@@ -68,6 +69,7 @@
68
69
  disabled && 'kit-chip--disabled',
69
70
  active && 'kit-chip--active',
70
71
  loading && 'kit-chip--loading',
72
+ readonly && 'kit-chip--readonly',
71
73
  rest.class
72
74
  ]}
73
75
  tabindex={href && disabled ? -1 : 0}
@@ -77,11 +79,11 @@
77
79
  type={href ? undefined : type}
78
80
  use:ripple={{
79
81
  component: 'chip',
80
- disabled: noRipple || disabled || is === 'div' || is === 'span'
82
+ disabled: noRipple || readonly || disabled || is === 'div' || is === 'span'
81
83
  }}
82
- style:--base={assets.color(background)}
83
- style:--on={assets.color(color)}
84
- style:--shape={assets.shape(rounded)}
84
+ style:--chip-background={assets.color(background)}
85
+ style:--chip-color={assets.color(color)}
86
+ style:--chip-shape={assets.shape(rounded)}
85
87
  >
86
88
  {#if loading}
87
89
  <div class="kit-chip-loading">
@@ -109,7 +111,7 @@
109
111
  </div>
110
112
  {/if}
111
113
 
112
- {#if closable}
114
+ {#if closable && !readonly}
113
115
  <button
114
116
  class="kit-chip--close"
115
117
  type="button"
@@ -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 ChipProps extends Component {
4
4
  load?: Snippet;
@@ -28,4 +28,5 @@ export interface ChipProps extends Component {
28
28
  label?: string;
29
29
  closable?: boolean;
30
30
  noRipple?: boolean;
31
+ readonly?: boolean;
31
32
  }
@@ -15,7 +15,7 @@
15
15
  }
16
16
 
17
17
  .kit-dialog::backdrop {
18
- background-color: color-mix(in oklab, var(--kit-shadow) 30%, transparent);
18
+ background-color: color-mix(in oklab, var(--kit-state-shadow) 30%, transparent);
19
19
  animation: fade 0.2s ease-out;
20
20
  }
21
21
  .kit-dialog[open]::backdrop {
@@ -23,23 +23,17 @@
23
23
  }
24
24
 
25
25
  .kit-dialog .kit-dialog-container {
26
- --dialog-color: var(--on, var(--kit-on-surface));
27
- --dialog-background: var(--base, var(--kit-surface));
28
- --dialog-radius: var(--shape, var(--kit-radius-md));
29
-
30
- border-radius: var(--dialog-radius);
31
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
32
- transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
33
- transition-duration: 0.2s;
26
+ border-radius: var(--dialog-shape, var(--system-shape-md));
34
27
  padding-top: var(--dialog-spacing-x);
35
28
  padding-bottom: var(--dialog-spacing-x);
36
29
  padding-right: var(--dialog-spacing-y);
37
30
  padding-left: var(--dialog-spacing-y);
38
-
39
- /* theme */
40
- color: var(--dialog-color);
41
- background-color: var(--dialog-background);
42
- border-color: var(--dialog-background);
31
+ color: var(--dialog-color, var(--kit-label-primary));
32
+ background-color: var(--dialog-background, var(--kit-background-grouped-primary));
33
+ border-color: var(--dialog-background, var(--kit-background-grouped-primary));
34
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
35
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
36
+ transition-duration: 0.2s;
43
37
  }
44
38
 
45
39
  .kit-dialog .close-dialog {
@@ -60,30 +54,31 @@
60
54
  }
61
55
 
62
56
  .kit-dialog[breakpoint]kit-dialog--position-center {
63
- margin: auto;
57
+ margin-top: auto;
58
+ margin-bottom: auto;
64
59
  }
65
60
 
66
61
  .kit-dialog[breakpoint]kit-dialog--size-xs {
67
- max-width: var(--kit-dialog-size-xs);
62
+ max-width: var(--system-dialog-xs);
68
63
  }
69
64
 
70
65
  .kit-dialog[breakpoint]kit-dialog--size-sm {
71
- max-width: var(--kit-dialog-size-sm);
66
+ max-width: var(--system-dialog-sm);
72
67
  height: fit-content;
73
68
  }
74
69
 
75
70
  .kit-dialog[breakpoint]kit-dialog--size-md {
76
- max-width: var(--kit-dialog-size-md);
71
+ max-width: var(--system-dialog-md);
77
72
  height: fit-content;
78
73
  }
79
74
 
80
75
  .kit-dialog[breakpoint]kit-dialog--size-lg {
81
- max-width: var(--kit-dialog-size-lg);
76
+ max-width: var(--system-dialog-lg);
82
77
  height: fit-content;
83
78
  }
84
79
 
85
80
  .kit-dialog[breakpoint]kit-dialog--size-xl {
86
- max-width: var(--kit-dialog-size-xl);
81
+ max-width: var(--system-dialog-xl);
87
82
  height: fit-content;
88
83
  }
89
84
 
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
- import { disabledScroll } from '../../internal/index.js';
3
- import { getAssets } from '../../internal/index.js';
2
+ import { disabledScroll } from '../../internal/helpers/scroll.js';
3
+ import { getAssets } from '../../internal/core/actions/assets.svelte.js';
4
4
  import type { DialogProps } from './types.js';
5
5
 
6
6
  let {
@@ -58,9 +58,9 @@
58
58
  rest.class
59
59
  ]}
60
60
  onclick={(event: MouseEvent) => event.stopPropagation()}
61
- style:--base={assets.color(background)}
62
- style:--on={assets.color(color)}
63
- style:--shape={assets.shape(rounded)}
61
+ style:--dialog-background={assets.color(background)}
62
+ style:--dialog-color={assets.color(color)}
63
+ style:--dialog-shape={assets.shape(rounded)}
64
64
  >
65
65
  {@render children?.()}
66
66
  </div>
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../internal/types.js';
1
+ import type { Component } from '../../internal/types/index.js';
2
2
  type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
3
  type DialogPosition = 'bottom' | 'center' | 'top';
4
4
  type DialogDensity = 'compact' | 'comfortable' | 'default';
@@ -1,8 +1,4 @@
1
1
  .kit-dropdown-content {
2
- --dropdown-color: var(--on, var(--kit-on-surface));
3
- --dropdown-background: var(--base, var(--kit-surface));
4
- --dropdown-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(--dropdown-background);
20
- color: var(--dropdown-color);
21
- border-radius: var(--dropdown-radius);
10
+ background-color: var(--dropdown-background, var(--kit-background-grouped-primary));
11
+ color: var(--dropdown-color, var(--kit-label-primary));
12
+ border-radius: var(--dropdown-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 './dropdown.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/dropdown.svelte.js';
5
5
  import type { DropdownProps, ModelDropdownProps } from './types.js';
6
6
 
7
7
  let {
@@ -55,7 +55,6 @@
55
55
  state: 'open' | 'close',
56
56
  element: HTMLElement | PointerEvent | null
57
57
  ) => {
58
- console.log();
59
58
  if (openOnHover && state === 'open') {
60
59
  if (timeoutId) {
61
60
  clearTimeout(timeoutId);
@@ -106,9 +105,9 @@
106
105
  e.stopPropagation();
107
106
  handleClose();
108
107
  }}
109
- style:--base={assets.color(background)}
110
- style:--on={assets.color(color)}
111
- style:--shape={assets.shape(rounded)}
108
+ style:--dropdown-background={assets.color(background)}
109
+ style:--dropdown-color={assets.color(color)}
110
+ style:--dropdown-shape={assets.shape(rounded)}
112
111
  use:clickOutside={{ exclude: [ref, refActivator], onClose: () => (open = false) }}
113
112
  >
114
113
  {@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,29 +1,28 @@
1
1
  .kit-icon {
2
- --icon-color: var(--base, var(--base-parent, var(--kit-on-neutral)));
3
-
4
2
  display: inline-flex;
5
3
  align-items: center;
6
4
  justify-content: center;
7
- /* transition: color 0.5s; */
8
5
  text-indent: 0;
9
6
  font-size: calc(
10
- var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--kit-spacing)
7
+ var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--system-spacing)
11
8
  );
12
9
  }
13
10
 
14
11
  .kit-icon:before {
15
- color: var(--icon-color);
12
+ color: var(--icon-color-state, var(--icon-color, currentColor)) !important;
16
13
  }
17
14
 
18
15
  .kit-icon svg {
19
- color: var(--icon-color);
16
+ color: var(--icon-color-state, var(--icon-color, currentColor)) !important;
20
17
  }
21
18
 
22
19
  .kit-icon svg,
23
20
  .kit-icon img {
24
- width: calc(var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--kit-spacing));
21
+ width: calc(
22
+ var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--system-spacing)
23
+ );
25
24
  height: calc(
26
- var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--kit-spacing)
25
+ var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--system-spacing)
27
26
  );
28
27
  }
29
28
 
@@ -50,16 +49,16 @@
50
49
 
51
50
  /* state */
52
51
  .kit-icon.kit-icon--info {
53
- --base: var(--kit-info);
52
+ --icon-color-state: var(--kit-accent-info);
54
53
  }
55
54
  .kit-icon.kit-icon--success {
56
- --base: var(--kit-success);
55
+ --icon-color-state: var(--kit-accent-success);
57
56
  }
58
57
  .kit-icon.kit-icon--warning {
59
- --base: var(--kit-warning);
58
+ --icon-color-state: var(--kit-accent-warning);
60
59
  }
61
60
  .kit-icon.kit-icon--error {
62
- --base: var(--kit-error);
61
+ --icon-color-state: var(--kit-accent-destructive);
63
62
  }
64
63
 
65
64
  /* disabled */
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { getAssets } from '../../internal/assets.svelte.js';
2
+ import { getAssets } from '../../internal/core/actions/assets.svelte.js';
3
3
  import type { IconProps } from './types.js';
4
4
  let {
5
5
  children,
@@ -39,7 +39,7 @@
39
39
  size && assets.className('icon', 'size', size),
40
40
  rest.class
41
41
  ]}
42
- style:--base={assets.color(color)}
42
+ style:--icon-color={assets.color(color)}
43
43
  >
44
44
  {#if icon && icon.includes('/')}
45
45
  <img src={icon} {alt} />
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../internal/types.js';
1
+ import type { Component } from '../../internal/types/index.js';
2
2
  export interface IconProps extends Component {
3
3
  ref?: HTMLElement | null;
4
4
  is?: 'i' | 'div';