lapikit 0.0.0-insiders.f325e60 → 0.0.0-insiders.f352010

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 (185) 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 -121
  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 -126
  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 -44
  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 -49
  24. package/dist/components/appbar/types.d.ts +1 -1
  25. package/dist/components/aspect-ratio/aspect-ratio.svelte +0 -41
  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 -118
  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 -235
  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 -113
  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 -216
  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 -149
  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 -31
  44. package/dist/components/dropdown/types.d.ts +1 -1
  45. package/dist/components/icon/icon.css +9 -12
  46. package/dist/components/icon/icon.svelte +2 -91
  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 -203
  50. package/dist/components/list/modules/list-item.css +67 -0
  51. package/dist/components/list/modules/list-item.svelte +5 -204
  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 -140
  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 -30
  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 -53
  61. package/dist/components/separator/types.d.ts +1 -1
  62. package/dist/components/spacer/spacer.svelte +0 -5
  63. package/dist/components/spacer/types.d.ts +1 -1
  64. package/dist/components/textfield/textfield.css +16 -23
  65. package/dist/components/textfield/textfield.svelte +4 -274
  66. package/dist/components/textfield/types.d.ts +1 -1
  67. package/dist/components/toolbar/toolbar.css +11 -34
  68. package/dist/components/toolbar/toolbar.svelte +4 -139
  69. package/dist/components/toolbar/types.d.ts +1 -1
  70. package/dist/components/tooltip/tooltip.css +5 -13
  71. package/dist/components/tooltip/tooltip.svelte +5 -132
  72. package/dist/components/tooltip/types.d.ts +1 -1
  73. package/dist/index.d.ts +2 -26
  74. package/dist/index.js +2 -6
  75. package/dist/internal/config/presets.d.ts +71 -47
  76. package/dist/internal/config/presets.js +72 -41
  77. package/dist/internal/config/variables.d.ts +1 -4
  78. package/dist/internal/config/variables.js +1 -4
  79. package/dist/internal/{assets.svelte.js → core/actions/assets.svelte.js} +4 -4
  80. package/dist/internal/core/actions/dropdown.svelte.d.ts +7 -0
  81. package/dist/internal/core/actions/popover.svelte.d.ts +7 -0
  82. package/dist/internal/core/actions/tooltip.svelte.d.ts +7 -0
  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.js +37 -40
  86. package/dist/internal/core/formatter/device.js +37 -36
  87. package/dist/internal/core/formatter/index.d.ts +1 -1
  88. package/dist/internal/core/formatter/index.js +2 -2
  89. package/dist/internal/core/formatter/theme.js +22 -6
  90. package/dist/internal/core/formatter/typography.js +1 -1
  91. package/dist/internal/core/standard-colors.d.ts +75 -0
  92. package/dist/internal/core/standard-colors.js +75 -0
  93. package/dist/internal/helpers/colors.d.ts +1 -0
  94. package/dist/internal/{colors.js → helpers/colors.js} +2 -2
  95. package/dist/internal/helpers/parser.js +2 -1
  96. package/dist/internal/plugins/vite.js +8 -6
  97. package/dist/internal/types/components.d.ts +14 -0
  98. package/dist/internal/types/configuration.d.ts +24 -1
  99. package/dist/internal/types/index.d.ts +1 -0
  100. package/dist/internal/types/index.js +1 -0
  101. package/dist/stores/components.js +1 -1
  102. package/dist/stores/index.d.ts +1 -0
  103. package/dist/stores/index.js +1 -0
  104. package/dist/stores/themes.d.ts +0 -6
  105. package/dist/stores/themes.js +1 -31
  106. package/dist/stores/viewport.d.ts +7 -0
  107. package/dist/stores/viewport.js +7 -0
  108. package/dist/styles/reset.css +6 -4
  109. package/package.json +7 -11
  110. package/bin/lapikit.js +0 -86
  111. package/bin/legacy.js +0 -34
  112. package/bin/modules/adapter.js +0 -52
  113. package/bin/modules/plugin.js +0 -223
  114. package/bin/modules/preset.js +0 -11
  115. package/dist/internal/colors.d.ts +0 -1
  116. package/dist/internal/index.d.ts +0 -4
  117. package/dist/internal/index.js +0 -4
  118. package/dist/internal/types.d.ts +0 -57
  119. package/dist/internal/unit.d.ts +0 -1
  120. package/dist/internal/unit.js +0 -11
  121. package/dist/labs/index.d.ts +0 -4
  122. package/dist/labs/index.js +0 -5
  123. package/dist/labs/my-component-style-global.svelte +0 -6
  124. package/dist/labs/my-component-style-global.svelte.d.ts +0 -18
  125. package/dist/labs/my-component-style-import.svelte +0 -15
  126. package/dist/labs/my-component-style-import.svelte.d.ts +0 -18
  127. package/dist/labs/my-component-style-mixed.svelte +0 -23
  128. package/dist/labs/my-component-style-mixed.svelte.d.ts +0 -18
  129. package/dist/labs/my-component.svelte +0 -16
  130. package/dist/labs/my-component.svelte.d.ts +0 -18
  131. package/dist/labs/style-mixed.css +0 -7
  132. package/dist/labs/style.css +0 -7
  133. package/dist/labs.css +0 -1
  134. package/dist/plugin/css.d.ts +0 -1
  135. package/dist/plugin/css.js +0 -73
  136. package/dist/plugin/modules/config.d.ts +0 -2
  137. package/dist/plugin/modules/config.js +0 -54
  138. package/dist/plugin/modules/importer.d.ts +0 -1
  139. package/dist/plugin/modules/importer.js +0 -15
  140. package/dist/plugin/preset-v2.d.ts +0 -108
  141. package/dist/plugin/preset-v2.js +0 -126
  142. package/dist/plugin/vitejs.d.ts +0 -10
  143. package/dist/plugin/vitejs.js +0 -55
  144. package/dist/preset.d.ts +0 -2
  145. package/dist/preset.js +0 -92
  146. package/dist/style/animation.css +0 -62
  147. package/dist/style/css.d.ts +0 -2
  148. package/dist/style/css.js +0 -34
  149. package/dist/style/normalize.css +0 -125
  150. package/dist/style/parser/color.d.ts +0 -5
  151. package/dist/style/parser/color.js +0 -88
  152. package/dist/style/parser/component.d.ts +0 -2
  153. package/dist/style/parser/component.js +0 -115
  154. package/dist/style/parser/device.d.ts +0 -2
  155. package/dist/style/parser/device.js +0 -40
  156. package/dist/style/parser/index.d.ts +0 -4
  157. package/dist/style/parser/index.js +0 -4
  158. package/dist/style/parser/variable.d.ts +0 -2
  159. package/dist/style/parser/variable.js +0 -25
  160. package/dist/style/variable.css +0 -12
  161. /package/dist/{components/accordion → actions}/accordion.svelte.js +0 -0
  162. /package/dist/internal/{assets.svelte.d.ts → core/actions/assets.svelte.d.ts} +0 -0
  163. /package/dist/{components/dropdown → internal/core/actions}/dropdown.svelte.js +0 -0
  164. /package/dist/{components/popover → internal/core/actions}/popover.svelte.js +0 -0
  165. /package/dist/{components/tooltip → internal/core/actions}/tooltip.svelte.js +0 -0
  166. /package/dist/internal/{ripple.d.ts → core/animations/ripple.d.ts} +0 -0
  167. /package/dist/internal/{ripple.js → core/animations/ripple.js} +0 -0
  168. /package/dist/internal/{ansi.d.ts → core/bin/ansi.d.ts} +0 -0
  169. /package/dist/internal/{ansi.js → core/bin/ansi.js} +0 -0
  170. /package/dist/internal/{terminal.d.ts → core/bin/terminal.d.ts} +0 -0
  171. /package/dist/internal/{terminal.js → core/bin/terminal.js} +0 -0
  172. /package/dist/internal/{minify.d.ts → core/minify.d.ts} +0 -0
  173. /package/dist/internal/{minify.js → core/minify.js} +0 -0
  174. /package/dist/{utils/x11.d.ts → internal/core/x11-colors.d.ts} +0 -0
  175. /package/dist/{utils/x11.js → internal/core/x11-colors.js} +0 -0
  176. /package/dist/{utils → internal/helpers}/convert.d.ts +0 -0
  177. /package/dist/{utils → internal/helpers}/convert.js +0 -0
  178. /package/dist/internal/{deepMerge.d.ts → helpers/deep-merge.d.ts} +0 -0
  179. /package/dist/internal/{deepMerge.js → helpers/deep-merge.js} +0 -0
  180. /package/dist/internal/{clickOutside.d.ts → helpers/outside.d.ts} +0 -0
  181. /package/dist/internal/{clickOutside.js → helpers/outside.js} +0 -0
  182. /package/dist/internal/{scroll.d.ts → helpers/scroll.d.ts} +0 -0
  183. /package/dist/internal/{scroll.js → helpers/scroll.js} +0 -0
  184. /package/dist/internal/{types.js → types/components.js} +0 -0
  185. /package/dist/{colors.css → themes.css} +0 -0
@@ -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 { ListItemProps } 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,
@@ -54,9 +54,9 @@
54
54
  tabindex={href && disabled ? -2 : 0}
55
55
  aria-disabled={href ? disabled : undefined}
56
56
  disabled={href ? undefined : disabled}
57
- style:--base={assets.color(background)}
58
- style:--on={assets.color(color)}
59
- style:--shape={assets.shape(rounded)}
57
+ style:--list-item-background={assets.color(background)}
58
+ style:--list-item-color={assets.color(color)}
59
+ style:--list-item-shape={assets.shape(rounded)}
60
60
  >
61
61
  {#if append}
62
62
  <div class="kit-list-item-content--append">
@@ -74,202 +74,3 @@
74
74
  </div>
75
75
  {/if}
76
76
  </svelte:element>
77
-
78
- <style>/* root */
79
- .kit-list {
80
- --list-color: var(--on, var(--kit-on-container));
81
- --list-background: var(--base, var(--kit-container));
82
- --list-radius: var(--shape, var(--kit-radius-md));
83
- }
84
- .kit-list {
85
- position: relative;
86
- flex-direction: column;
87
- width: 100%;
88
- display: flex;
89
- border: none;
90
- outline: none;
91
- }
92
- .kit-list-item {
93
- --list-item-radius: var(--shape, var(--list-radius, var(--kit-radius-md)));
94
- }
95
- .kit-list-item {
96
- position: relative;
97
- border: none;
98
- outline: none;
99
- padding-top: var(--list-spacing-x);
100
- padding-bottom: var(--list-spacing-x);
101
- padding-right: var(--list-spacing-y);
102
- padding-left: var(--list-spacing-y);
103
- color: var(--list-item-color);
104
- border-radius: var(--list-item-radius);
105
- font-weight: 500;
106
- text-decoration: none;
107
- }
108
- .kit-list-item:not(div) {
109
- cursor: pointer;
110
- }
111
- .kit-list-item,
112
- .kit-list-item .kit-list-item-content--content,
113
- .kit-list-item .kit-list-item-content--append,
114
- .kit-list-item .kit-list-item-content--prepend {
115
- display: inline-flex;
116
- align-items: center;
117
- white-space: nowrap;
118
- gap: calc(var(--prism-spacing) * var(--list-multiplier-gap));
119
- font-size: calc(var(--prism-spacing) * var(--list-multiplier-font-size));
120
- }
121
- .kit-list-item.kit-list-item--append:not(.kit-list-item--prepend) {
122
- display: grid;
123
- grid-template-columns: auto 1fr;
124
- }
125
- .kit-list-item.kit-list-item--prepend:not(.kit-list-item--append) {
126
- display: grid;
127
- grid-template-columns: 1fr auto;
128
- }
129
- .kit-list-item.kit-list-item--prepend.kit-list-item--append {
130
- display: grid;
131
- grid-template-columns: auto 1fr auto;
132
- }
133
- .kit-list-item::after {
134
- content: '';
135
- position: absolute;
136
- inset: 0;
137
- background-color: currentColor;
138
- opacity: 0;
139
- transition: opacity 150ms ease;
140
- pointer-events: none;
141
- border-radius: inherit;
142
- }
143
- .kit-list-item:not(div):hover::after {
144
- opacity: 0.08;
145
- }
146
- .kit-list-item:not(div):active::after {
147
- opacity: 0.12;
148
- }
149
- .kit-list-item:not(div):focus-visible::after {
150
- opacity: 0.12;
151
- }
152
- .kit-list.kit-list--nav {
153
- padding-top: 8px;
154
- padding-bottom: 8px;
155
- padding-inline: 8px;
156
- }
157
- /* size */
158
- .kit-list[breakpoint]kit-list--size-xs {
159
- --list-multiplier-x: 16;
160
- --list-multiplier-y: 4;
161
- --list-multiplier-gap: 2;
162
- --list-multiplier-font-size: 6;
163
- }
164
- .kit-list[breakpoint]kit-list--size-xs .kit-icon[class*='kit-icon--size-md'] {
165
- --icon-multiplier-parent-size: 6;
166
- }
167
- .kit-list[breakpoint]kit-list--size-sm {
168
- --list-multiplier-x: 20;
169
- --list-multiplier-y: 5;
170
- --list-multiplier-gap: 4;
171
- --list-multiplier-font-size: 7;
172
- }
173
- .kit-list[breakpoint]kit-list--size-sm .kit-icon[class*='kit-icon--size-md'] {
174
- --icon-multiplier-parent-size: 7;
175
- }
176
- .kit-list[breakpoint]kit-list--size-md {
177
- --list-multiplier-x: 24;
178
- --list-multiplier-y: 6;
179
- --list-multiplier-gap: 4;
180
- --list-multiplier-font-size: 8;
181
- }
182
- .kit-list[breakpoint]kit-list--size-md .kit-icon[class*='kit-icon--size-md'] {
183
- --icon-multiplier-parent-size: 8;
184
- }
185
- .kit-list[breakpoint]kit-list--size-lg {
186
- --list-multiplier-x: 28;
187
- --list-multiplier-y: 7;
188
- --list-multiplier-gap: 4;
189
- --list-multiplier-font-size: 9;
190
- }
191
- .kit-list[breakpoint]kit-list--size-lg .kit-icon[class*='kit-icon--size-md'] {
192
- --icon-multiplier-parent-size: 9;
193
- }
194
- .kit-list[breakpoint]kit-list--size-xl {
195
- --list-multiplier-x: 32;
196
- --list-multiplier-y: 8;
197
- --list-multiplier-gap: 5;
198
- --list-multiplier-font-size: 10;
199
- }
200
- .kit-list[breakpoint]kit-list--size-xl .kit-icon[class*='kit-icon--size-md'] {
201
- --icon-multiplier-parent-size: 10;
202
- }
203
- /* density */
204
- .kit-list[breakpoint]kit-list--density-default .kit-list-item {
205
- height: calc(var(--prism-spacing) * var(--list-multiplier-x));
206
- --list-spacing-x: 0;
207
- --list-spacing-y: calc(var(--prism-spacing) * var(--list-multiplier-y));
208
- }
209
- .kit-list[breakpoint]kit-list--density-compact .kit-list-item {
210
- height: calc(var(--prism-spacing) * var(--list-multiplier-x) - 0.25rem);
211
- --list-spacing-x: 0;
212
- --list-spacing-y: calc(var(--prism-spacing) * var(--list-multiplier-y) - 0.25rem);
213
- }
214
- .kit-list[breakpoint]kit-list--density-comfortable .kit-list-item {
215
- height: calc(var(--prism-spacing) * var(--list-multiplier-x) + 0.25rem);
216
- --list-spacing-x: 0;
217
- --list-spacing-y: calc(var(--prism-spacing) * var(--list-multiplier-y) + 0.25rem);
218
- }
219
- /* variant */
220
- .kit-list[breakpoint]kit-list--variant-filled .kit-list-item {
221
- --list-item-color: var(--on, var(--list-color, var(--kit-on-container)));
222
- --list-item-background: var(--base, var(--list-background, var(--kit-container)));
223
- background-color: var(--list-item-background);
224
- }
225
- .kit-list[breakpoint]kit-list--variant-outline .kit-list-item {
226
- --list-item-color: var(--base, var(--list-color, var(--kit-on-container)));
227
- background-color: transparent;
228
- }
229
- .kit-list[breakpoint]kit-list--variant-outline .kit-list-item::before {
230
- content: '';
231
- position: absolute;
232
- inset: 0;
233
- border: 1px solid currentColor;
234
- pointer-events: none;
235
- border-radius: inherit;
236
- }
237
- .kit-list[breakpoint]kit-list--variant-text .kit-list-item {
238
- --list-item-color: var(--base, var(--list-color, var(--kit-on-container)));
239
- background-color: transparent;
240
- border-color: transparent;
241
- }
242
- /* events */
243
- .kit-list[class*='list--variant-filled'] .kit-list-item.kit-list-item--active:not(div),
244
- .kit-list[class*='list--variant-filled'] .kit-list-item:active:not(div) {
245
- background-color: color-mix(in oklab, var(--list-item-background) 90%, var(--kit-scrim));
246
- border-color: color-mix(in oklab, var(--list-item-background) 90%, var(--kit-scrim));
247
- }
248
- .kit-list[class*='list--variant-']:not([class*='variant-filled'])
249
- .kit-list-item.kit-list-item--active:not(div),
250
- .kit-list[class*='list--variant-']:not([class*='variant-filled']) .kit-list-item:active:not(div) {
251
- background-color: color-mix(in oklab, currentColor 15%, transparent);
252
- border-color: color-mix(in oklab, currentColor 15%, transparent);
253
- }
254
- /* disabled */
255
- .kit-list .kit-list-item.kit-list-item--disabled,
256
- .kit-list .kit-list-item[disabled],
257
- .kit-list.kit-list--disabled .kit-list-item {
258
- pointer-events: none;
259
- user-select: none;
260
- cursor: default;
261
- }
262
- .kit-list[class*='list--variant-filled'] .kit-list-item.kit-list-item--disabled,
263
- .kit-list[class*='list--variant-filled'] .kit-list-item.kit-list-item--disabled {
264
- color: color-mix(in oklab, var(--list-item-color) 40%, transparent) !important;
265
- background-color: color-mix(in oklab, var(--list-item-background) 70%, transparent) !important;
266
- border-color: color-mix(in oklab, var(--list-item-background) 70%, transparent) !important;
267
- }
268
- .kit-list[class*='list--variant-']:not([class*='variant-filled'])
269
- .kit-list-item.kit-list-item--disabled,
270
- .kit-list[class*='list--variant-']:not([class*='variant-filled'])
271
- .kit-list-item.kit-list-item--disabled
272
- i:before {
273
- color: color-mix(in oklab, var(--list-item-background) 40%, transparent) !important;
274
- }
275
- </style>
@@ -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
  type ListSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
4
  type ListDensity = 'compact' | 'comfortable' | 'default';
@@ -1,13 +1,6 @@
1
- /* root */
2
1
  .kit-modal {
3
- --modal-color: var(--on, var(--kit-on-surface));
4
- --modal-background: var(--base, var(--kit-surface));
5
- --modal-radius: var(--shape, var(--kit-radius-md));
6
2
  --modal-translate-x: -50%;
7
3
  --modal-translate-y: -50%;
8
- }
9
-
10
- .kit-modal {
11
4
  width: 100%;
12
5
  height: 100%;
13
6
  position: absolute;
@@ -23,11 +16,9 @@
23
16
  padding-bottom: var(--modal-spacing-x);
24
17
  padding-right: var(--modal-spacing-y);
25
18
  padding-left: var(--modal-spacing-y);
26
-
27
- /* theme */
28
- color: var(--modal-color);
29
- background-color: var(--modal-background);
30
- border-color: var(--modal-background);
19
+ color: var(--modal-color, var(--kit-label-primary));
20
+ background-color: var(--modal-background, var(--kit-background-grouped-primary));
21
+ border-color: var(--modal-background, var(--kit-background-grouped-primary));
31
22
  }
32
23
 
33
24
  .kit-modal.kit-modal--contain {
@@ -45,54 +36,54 @@
45
36
 
46
37
  /* size */
47
38
  .kit-modal [breakpoint]kit-modal-container--size-xs {
48
- max-width: var(--kit-modal-size-xs);
39
+ max-width: var(--system-dialog-xs);
49
40
  max-height: calc(100% - 3rem);
50
41
  height: fit-content;
51
42
  margin: 0 auto;
52
43
  left: 50%;
53
44
  bottom: initial;
54
45
  translate: var(--modal-translate-x) var(--modal-translate-y);
55
- border-radius: var(--modal-radius);
46
+ border-radius: var(--modal-shape, var(--system-shape-md));
56
47
  }
57
48
  .kit-modal [breakpoint]kit-modal-container--size-sm {
58
- max-width: var(--kit-modal-size-sm);
49
+ max-width: var(--system-dialog-sm);
59
50
  max-height: calc(100% - 3rem);
60
51
  height: fit-content;
61
52
  margin: 0 auto;
62
53
  left: 50%;
63
54
  bottom: initial;
64
55
  translate: var(--modal-translate-x) var(--modal-translate-y);
65
- border-radius: var(--modal-radius);
56
+ border-radius: var(--modal-shape, var(--system-shape-md));
66
57
  }
67
58
  .kit-modal [breakpoint]kit-modal-container--size-md {
68
- max-width: var(--kit-modal-size-md);
59
+ max-width: var(--system-dialog-md);
69
60
  max-height: calc(100% - 3rem);
70
61
  height: fit-content;
71
62
  margin: 0 auto;
72
63
  left: 50%;
73
64
  bottom: initial;
74
65
  translate: var(--modal-translate-x) var(--modal-translate-y);
75
- border-radius: var(--modal-radius);
66
+ border-radius: var(--modal-shape, var(--system-shape-md));
76
67
  }
77
68
  .kit-modal [breakpoint]kit-modal-container--size-lg {
78
- max-width: var(--kit-modal-size-lg);
69
+ max-width: var(--system-dialog-lg);
79
70
  max-height: calc(100% - 3rem);
80
71
  height: fit-content;
81
72
  margin: 0 auto;
82
73
  left: 50%;
83
74
  bottom: initial;
84
75
  translate: var(--modal-translate-x) var(--modal-translate-y);
85
- border-radius: var(--modal-radius);
76
+ border-radius: var(--modal-shape, var(--system-shape-md));
86
77
  }
87
78
  .kit-modal [breakpoint]kit-modal-container--size-xl {
88
- max-width: var(--kit-modal-size-xl);
79
+ max-width: var(--system-dialog-xl);
89
80
  max-height: calc(100% - 3rem);
90
81
  height: fit-content;
91
82
  margin: 0 auto;
92
83
  left: 50%;
93
84
  bottom: initial;
94
85
  translate: var(--modal-translate-x) var(--modal-translate-y);
95
- border-radius: var(--modal-radius);
86
+ border-radius: var(--modal-shape, var(--system-shape-md));
96
87
  }
97
88
  .kit-modal [breakpoint]kit-modal-container--size-full {
98
89
  max-width: 100%;
@@ -103,7 +94,8 @@
103
94
  left: 0;
104
95
  top: initial;
105
96
  height: 100%;
106
- border-radius: var(--modal-radius) var(--modal-radius) 0 0;
97
+ border-radius: var(--modal-shape, var(--system-shape-md))
98
+ var(--modal-shape, var(--system-shape-md)) 0 0;
107
99
  }
108
100
 
109
101
  /* density */
@@ -1,6 +1,5 @@
1
1
  <script lang="ts">
2
- // import { disabledScroll } from '../../internal/index.js';
3
- import { getAssets } from '../../internal/index.js';
2
+ import { getAssets } from '../../internal/core/actions/assets.svelte.js';
4
3
  import { modalOpen, modalStack, popModal, pushModal, setOpenModal } from '../../stores/index.js';
5
4
  import { onDestroy } from 'svelte';
6
5
  import type { ModalProps } from './types.js';
@@ -103,146 +102,11 @@
103
102
  density && assets.className('modal-container', 'density', density),
104
103
  position && assets.className('modal-container', 'position', position)
105
104
  ]}
106
- style:--base={assets.color(background)}
107
- style:--on={assets.color(color)}
108
- style:--shape={assets.shape(rounded)}
105
+ style:--modal-background={assets.color(background)}
106
+ style:--modal-color={assets.color(color)}
107
+ style:--modal-shape={assets.shape(rounded)}
109
108
  >
110
109
  {@render children?.()}
111
110
  </div>
112
111
  </div>
113
112
  {/if}
114
-
115
- <style>/* root */
116
- .kit-modal {
117
- --modal-color: var(--on, var(--kit-on-surface));
118
- --modal-background: var(--base, var(--kit-surface));
119
- --modal-radius: var(--shape, var(--kit-radius-md));
120
- --modal-translate-x: -50%;
121
- --modal-translate-y: -50%;
122
- }
123
- .kit-modal {
124
- width: 100%;
125
- height: 100%;
126
- position: absolute;
127
- }
128
- .kit-modal-container {
129
- position: fixed;
130
- overflow-y: auto;
131
- z-index: 9100;
132
- width: 100%;
133
- height: 100%;
134
- padding-top: var(--modal-spacing-x);
135
- padding-bottom: var(--modal-spacing-x);
136
- padding-right: var(--modal-spacing-y);
137
- padding-left: var(--modal-spacing-y);
138
-
139
- /* theme */
140
- color: var(--modal-color);
141
- background-color: var(--modal-background);
142
- border-color: var(--modal-background);
143
- }
144
- .kit-modal.kit-modal--contain {
145
- position: absolute;
146
- top: 0;
147
- }
148
- .kit-modal.kit-modal--contain .kit-overlay {
149
- position: absolute;
150
- }
151
- .kit-modal.kit-modal--contain .kit-modal-container {
152
- position: absolute;
153
- }
154
- /* size */
155
- .kit-modal [breakpoint]kit-modal-container--size-xs {
156
- max-width: var(--kit-modal-size-xs);
157
- max-height: calc(100% - 3rem);
158
- height: fit-content;
159
- margin: 0 auto;
160
- left: 50%;
161
- bottom: initial;
162
- translate: var(--modal-translate-x) var(--modal-translate-y);
163
- border-radius: var(--modal-radius);
164
- }
165
- .kit-modal [breakpoint]kit-modal-container--size-sm {
166
- max-width: var(--kit-modal-size-sm);
167
- max-height: calc(100% - 3rem);
168
- height: fit-content;
169
- margin: 0 auto;
170
- left: 50%;
171
- bottom: initial;
172
- translate: var(--modal-translate-x) var(--modal-translate-y);
173
- border-radius: var(--modal-radius);
174
- }
175
- .kit-modal [breakpoint]kit-modal-container--size-md {
176
- max-width: var(--kit-modal-size-md);
177
- max-height: calc(100% - 3rem);
178
- height: fit-content;
179
- margin: 0 auto;
180
- left: 50%;
181
- bottom: initial;
182
- translate: var(--modal-translate-x) var(--modal-translate-y);
183
- border-radius: var(--modal-radius);
184
- }
185
- .kit-modal [breakpoint]kit-modal-container--size-lg {
186
- max-width: var(--kit-modal-size-lg);
187
- max-height: calc(100% - 3rem);
188
- height: fit-content;
189
- margin: 0 auto;
190
- left: 50%;
191
- bottom: initial;
192
- translate: var(--modal-translate-x) var(--modal-translate-y);
193
- border-radius: var(--modal-radius);
194
- }
195
- .kit-modal [breakpoint]kit-modal-container--size-xl {
196
- max-width: var(--kit-modal-size-xl);
197
- max-height: calc(100% - 3rem);
198
- height: fit-content;
199
- margin: 0 auto;
200
- left: 50%;
201
- bottom: initial;
202
- translate: var(--modal-translate-x) var(--modal-translate-y);
203
- border-radius: var(--modal-radius);
204
- }
205
- .kit-modal [breakpoint]kit-modal-container--size-full {
206
- max-width: 100%;
207
- max-height: calc(100% - 3rem);
208
- margin: 0 auto;
209
- bottom: 0;
210
- translate: 0 0;
211
- left: 0;
212
- top: initial;
213
- height: 100%;
214
- border-radius: var(--modal-radius) var(--modal-radius) 0 0;
215
- }
216
- /* density */
217
- .kit-modal [breakpoint]kit-modal-container--density-default {
218
- --modal-spacing-x: 0.5rem;
219
- --modal-spacing-y: 0.5rem;
220
- }
221
- .kit-modal [breakpoint]kit-modal-container--density-compact {
222
- --modal-spacing-x: 0.25rem;
223
- --modal-spacing-y: 0.25rem;
224
- }
225
- .kit-modal [breakpoint]kit-modal-container--density-comfortable {
226
- --modal-spacing-x: 0.75rem;
227
- --modal-spacing-y: 0.75rem;
228
- }
229
- /* position */
230
- .kit-modal [breakpoint]kit-modal-container--position-bottom {
231
- --modal-translate-y: 0;
232
- margin: auto;
233
- top: initial;
234
- bottom: 0;
235
- }
236
- .kit-modal [breakpoint]kit-modal-container--position-top {
237
- --modal-translate-y: 0;
238
- margin: auto;
239
- top: 0;
240
- bottom: initial;
241
- }
242
- .kit-modal [breakpoint]kit-modal-container--position-center {
243
- --modal-translate-y: -50%;
244
- margin: auto;
245
- top: 50%;
246
- bottom: initial;
247
- }
248
- </style>
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../internal/types.js';
1
+ import type { Component } from '../../internal/types/index.js';
2
2
  type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
3
  type ModalPosition = 'bottom' | 'center' | 'top';
4
4
  type ModalDensity = 'compact' | 'comfortable' | 'default';
@@ -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,35 +63,11 @@
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?.()}
72
72
  </div>
73
73
  {/if}
74
-
75
- <style>.kit-popover-content {
76
- --popover-color: var(--on, var(--kit-on-container));
77
- --popover-background: var(--base, var(--kit-container));
78
- --popover-radius: var(--shape, var(--kit-radius-md));
79
-
80
- inset: 0px auto auto 0px;
81
- margin: 0px;
82
- position: fixed;
83
- z-index: 9999;
84
- display: inline-block;
85
- width: auto;
86
- opacity: 1;
87
- transition-property: opacity, transform;
88
- /* transition:
89
- color 0.5s,
90
- background-color 0.5s; */
91
-
92
- /* theme */
93
- background-color: var(--popover-background);
94
- color: var(--popover-color);
95
- border-radius: var(--popover-radius);
96
- }
97
- </style>
@@ -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,56 +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
  />
38
-
39
- <style>.kit-separator {
40
- --separator-opacity: var(--opacity, 0.12);
41
- --separator-color: var(--base, var(--kit-scrim));
42
-
43
- display: block;
44
- flex: 1 1 100%;
45
- height: 0px;
46
- max-height: 0px;
47
- opacity: var(--separator-opacity);
48
- transition: inherit;
49
- border-color: var(--separator-color);
50
- /* transition: border-color 0.5s; */
51
- border-style: solid;
52
- }
53
-
54
- .kit-separator:not(.kit-separator--orientation-vertical) {
55
- border-width: var(--border-top-width, thin) 0 0 0;
56
- }
57
-
58
- .kit-separator--orientation-vertical {
59
- align-self: stretch;
60
- border-width: 0 thin 0 0;
61
- display: inline-flex;
62
- height: auto;
63
- margin-left: 0px;
64
- max-height: 100%;
65
- max-width: 0px;
66
- vertical-align: text-bottom;
67
- width: 0px;
68
- border-width: 0 var(--border-right-width, thin) 0 0;
69
- }
70
-
71
- .kit-separator--inset:not(.kit-separator--orientation-vertical) {
72
- max-width: calc(100% - 4.5rem);
73
- margin-inline-start: 4.5rem;
74
- }
75
-
76
- .kit-separator--inset.kit-separator--orientation-vertical {
77
- margin-bottom: 0.5rem;
78
- margin-top: 0.5rem;
79
- max-height: calc(100% - 1rem);
80
- }
81
-
82
- .kit-separator:not(.kit-separator--orientation-vertical) {
83
- width: 100%;
84
- }
85
- </style>
@@ -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;