lapikit 0.5.9 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/@types/actions.d.ts +6 -0
  2. package/dist/@types/index.d.ts +1 -0
  3. package/dist/@types/index.js +1 -0
  4. package/dist/@types/props.d.ts +1 -0
  5. package/dist/actions.d.ts +2 -0
  6. package/dist/actions.js +2 -0
  7. package/dist/animations/ripple.d.ts +1 -1
  8. package/dist/animations/ripple.js +36 -23
  9. package/dist/components/app/app.svelte +122 -8
  10. package/dist/components/card/card.svelte +49 -96
  11. package/dist/components/card/card.types.d.ts +22 -2
  12. package/dist/components/card/modules/card-actions.svelte +53 -0
  13. package/dist/components/card/modules/card-actions.svelte.d.ts +4 -0
  14. package/dist/components/card/modules/card-container.svelte +51 -0
  15. package/dist/components/card/modules/card-container.svelte.d.ts +4 -0
  16. package/dist/components/card/modules/card-content.svelte +56 -0
  17. package/dist/components/card/modules/card-content.svelte.d.ts +4 -0
  18. package/dist/components/card/modules/card-media.svelte +52 -0
  19. package/dist/components/card/modules/card-media.svelte.d.ts +4 -0
  20. package/dist/components/card/modules/card-title.svelte +56 -0
  21. package/dist/components/card/modules/card-title.svelte.d.ts +4 -0
  22. package/dist/components/dialog/dialog.svelte +1 -2
  23. package/dist/components/index.d.ts +5 -0
  24. package/dist/components/index.js +5 -0
  25. package/dist/{@legacy/stores/components.d.ts → components/modal/modal.d.ts} +1 -2
  26. package/dist/{@legacy/stores/components.js → components/modal/modal.js} +1 -1
  27. package/dist/components/modal/modal.svelte +1 -1
  28. package/dist/components/textfield/textfield.svelte.d.ts +1 -1
  29. package/dist/constants.d.ts +2 -2
  30. package/dist/constants.js +8 -3
  31. package/dist/utils/components.d.ts +1 -0
  32. package/dist/utils/components.js +16 -0
  33. package/dist/utils/outside.d.ts +1 -0
  34. package/dist/utils/outside.js +5 -0
  35. package/dist/{@legacy/stores → utils}/themes.d.ts +1 -0
  36. package/dist/{@legacy/actions/use-theme.js → utils/themes.js} +4 -1
  37. package/package.json +11 -32
  38. package/dist/@legacy/actions/accordion.svelte.d.ts +0 -9
  39. package/dist/@legacy/actions/index.d.ts +0 -2
  40. package/dist/@legacy/actions/index.js +0 -2
  41. package/dist/@legacy/actions/use-theme.d.ts +0 -1
  42. package/dist/@legacy/assets/icons/arrow-down.svelte +0 -12
  43. package/dist/@legacy/assets/icons/arrow-down.svelte.d.ts +0 -18
  44. package/dist/@legacy/assets/icons/arrow-up.svelte +0 -12
  45. package/dist/@legacy/assets/icons/arrow-up.svelte.d.ts +0 -18
  46. package/dist/@legacy/assets/icons/close-fill.svelte +0 -12
  47. package/dist/@legacy/assets/icons/close-fill.svelte.d.ts +0 -18
  48. package/dist/@legacy/assets/icons/loading-fill.svelte +0 -31
  49. package/dist/@legacy/assets/icons/loading-fill.svelte.d.ts +0 -18
  50. package/dist/@legacy/components/accordion/accordion.css +0 -36
  51. package/dist/@legacy/components/accordion/accordion.svelte +0 -39
  52. package/dist/@legacy/components/accordion/accordion.svelte.d.ts +0 -4
  53. package/dist/@legacy/components/accordion/modules/accordion-item.css +0 -68
  54. package/dist/@legacy/components/accordion/modules/accordion-item.svelte +0 -94
  55. package/dist/@legacy/components/accordion/modules/accordion-item.svelte.d.ts +0 -4
  56. package/dist/@legacy/components/accordion/types.d.ts +0 -33
  57. package/dist/@legacy/components/alert/alert.css +0 -130
  58. package/dist/@legacy/components/alert/alert.svelte +0 -89
  59. package/dist/@legacy/components/alert/alert.svelte.d.ts +0 -4
  60. package/dist/@legacy/components/alert/types.d.ts +0 -28
  61. package/dist/@legacy/components/alert/types.js +0 -1
  62. package/dist/@legacy/components/app/app.css +0 -26
  63. package/dist/@legacy/components/app/app.svelte +0 -79
  64. package/dist/@legacy/components/app/app.svelte.d.ts +0 -4
  65. package/dist/@legacy/components/app/types.d.ts +0 -10
  66. package/dist/@legacy/components/app/types.js +0 -1
  67. package/dist/@legacy/components/appbar/appbar.css +0 -38
  68. package/dist/@legacy/components/appbar/appbar.svelte +0 -40
  69. package/dist/@legacy/components/appbar/appbar.svelte.d.ts +0 -4
  70. package/dist/@legacy/components/appbar/types.d.ts +0 -15
  71. package/dist/@legacy/components/appbar/types.js +0 -1
  72. package/dist/@legacy/components/aspect-ratio/aspect-ratio.css +0 -19
  73. package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte +0 -25
  74. package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte.d.ts +0 -4
  75. package/dist/@legacy/components/aspect-ratio/types.d.ts +0 -5
  76. package/dist/@legacy/components/aspect-ratio/types.js +0 -1
  77. package/dist/@legacy/components/avatar/avatar.css +0 -102
  78. package/dist/@legacy/components/avatar/avatar.svelte +0 -46
  79. package/dist/@legacy/components/avatar/avatar.svelte.d.ts +0 -4
  80. package/dist/@legacy/components/avatar/types.d.ts +0 -22
  81. package/dist/@legacy/components/avatar/types.js +0 -1
  82. package/dist/@legacy/components/button/button.css +0 -240
  83. package/dist/@legacy/components/button/button.svelte +0 -102
  84. package/dist/@legacy/components/button/button.svelte.d.ts +0 -4
  85. package/dist/@legacy/components/button/types.d.ts +0 -29
  86. package/dist/@legacy/components/button/types.js +0 -1
  87. package/dist/@legacy/components/card/card.css +0 -105
  88. package/dist/@legacy/components/card/card.svelte +0 -67
  89. package/dist/@legacy/components/card/card.svelte.d.ts +0 -4
  90. package/dist/@legacy/components/card/types.d.ts +0 -20
  91. package/dist/@legacy/components/card/types.js +0 -1
  92. package/dist/@legacy/components/chip/chip.css +0 -224
  93. package/dist/@legacy/components/chip/chip.svelte +0 -131
  94. package/dist/@legacy/components/chip/chip.svelte.d.ts +0 -4
  95. package/dist/@legacy/components/chip/types.d.ts +0 -32
  96. package/dist/@legacy/components/chip/types.js +0 -1
  97. package/dist/@legacy/components/dialog/dialog.css +0 -129
  98. package/dist/@legacy/components/dialog/dialog.svelte +0 -67
  99. package/dist/@legacy/components/dialog/dialog.svelte.d.ts +0 -4
  100. package/dist/@legacy/components/dialog/types.d.ts +0 -24
  101. package/dist/@legacy/components/dialog/types.js +0 -1
  102. package/dist/@legacy/components/dropdown/dropdown.css +0 -13
  103. package/dist/@legacy/components/dropdown/dropdown.svelte +0 -115
  104. package/dist/@legacy/components/dropdown/dropdown.svelte.d.ts +0 -4
  105. package/dist/@legacy/components/dropdown/types.d.ts +0 -26
  106. package/dist/@legacy/components/dropdown/types.js +0 -1
  107. package/dist/@legacy/components/icon/icon.css +0 -78
  108. package/dist/@legacy/components/icon/icon.svelte +0 -49
  109. package/dist/@legacy/components/icon/icon.svelte.d.ts +0 -4
  110. package/dist/@legacy/components/icon/types.d.ts +0 -16
  111. package/dist/@legacy/components/icon/types.js +0 -1
  112. package/dist/@legacy/components/index.d.ts +0 -22
  113. package/dist/@legacy/components/index.js +0 -23
  114. package/dist/@legacy/components/list/list.css +0 -149
  115. package/dist/@legacy/components/list/list.svelte +0 -44
  116. package/dist/@legacy/components/list/list.svelte.d.ts +0 -4
  117. package/dist/@legacy/components/list/modules/list-item.css +0 -67
  118. package/dist/@legacy/components/list/modules/list-item.svelte +0 -76
  119. package/dist/@legacy/components/list/modules/list-item.svelte.d.ts +0 -4
  120. package/dist/@legacy/components/list/types.d.ts +0 -33
  121. package/dist/@legacy/components/list/types.js +0 -1
  122. package/dist/@legacy/components/modal/modal.css +0 -137
  123. package/dist/@legacy/components/modal/modal.svelte +0 -118
  124. package/dist/@legacy/components/modal/modal.svelte.d.ts +0 -4
  125. package/dist/@legacy/components/modal/types.d.ts +0 -26
  126. package/dist/@legacy/components/modal/types.js +0 -1
  127. package/dist/@legacy/components/popover/popover.css +0 -13
  128. package/dist/@legacy/components/popover/popover.svelte +0 -73
  129. package/dist/@legacy/components/popover/popover.svelte.d.ts +0 -4
  130. package/dist/@legacy/components/popover/types.d.ts +0 -20
  131. package/dist/@legacy/components/popover/types.js +0 -1
  132. package/dist/@legacy/components/separator/separator.css +0 -42
  133. package/dist/@legacy/components/separator/separator.svelte +0 -37
  134. package/dist/@legacy/components/separator/separator.svelte.d.ts +0 -4
  135. package/dist/@legacy/components/separator/types.d.ts +0 -15
  136. package/dist/@legacy/components/separator/types.js +0 -1
  137. package/dist/@legacy/components/spacer/spacer.css +0 -3
  138. package/dist/@legacy/components/spacer/spacer.svelte +0 -7
  139. package/dist/@legacy/components/spacer/spacer.svelte.d.ts +0 -4
  140. package/dist/@legacy/components/spacer/types.d.ts +0 -4
  141. package/dist/@legacy/components/spacer/types.js +0 -1
  142. package/dist/@legacy/components/textfield/textfield.css +0 -298
  143. package/dist/@legacy/components/textfield/textfield.svelte +0 -193
  144. package/dist/@legacy/components/textfield/textfield.svelte.d.ts +0 -4
  145. package/dist/@legacy/components/textfield/types.d.ts +0 -37
  146. package/dist/@legacy/components/textfield/types.js +0 -1
  147. package/dist/@legacy/components/toolbar/toolbar.css +0 -106
  148. package/dist/@legacy/components/toolbar/toolbar.svelte +0 -47
  149. package/dist/@legacy/components/toolbar/toolbar.svelte.d.ts +0 -4
  150. package/dist/@legacy/components/toolbar/types.d.ts +0 -27
  151. package/dist/@legacy/components/toolbar/types.js +0 -1
  152. package/dist/@legacy/components/tooltip/tooltip.css +0 -116
  153. package/dist/@legacy/components/tooltip/tooltip.svelte +0 -113
  154. package/dist/@legacy/components/tooltip/tooltip.svelte.d.ts +0 -4
  155. package/dist/@legacy/components/tooltip/types.d.ts +0 -23
  156. package/dist/@legacy/components/tooltip/types.js +0 -1
  157. package/dist/@legacy/index.d.ts +0 -3
  158. package/dist/@legacy/index.js +0 -24
  159. package/dist/@legacy/internal/config/presets.d.ts +0 -149
  160. package/dist/@legacy/internal/config/presets.js +0 -169
  161. package/dist/@legacy/internal/config/variables.d.ts +0 -3
  162. package/dist/@legacy/internal/config/variables.js +0 -3
  163. package/dist/@legacy/internal/core/actions/assets.svelte.d.ts +0 -8
  164. package/dist/@legacy/internal/core/actions/assets.svelte.js +0 -54
  165. package/dist/@legacy/internal/core/actions/dropdown.svelte.d.ts +0 -7
  166. package/dist/@legacy/internal/core/actions/dropdown.svelte.js +0 -148
  167. package/dist/@legacy/internal/core/actions/popover.svelte.d.ts +0 -7
  168. package/dist/@legacy/internal/core/actions/popover.svelte.js +0 -134
  169. package/dist/@legacy/internal/core/actions/tooltip.svelte.d.ts +0 -7
  170. package/dist/@legacy/internal/core/actions/tooltip.svelte.js +0 -131
  171. package/dist/@legacy/internal/core/animations/ripple.d.ts +0 -12
  172. package/dist/@legacy/internal/core/animations/ripple.js +0 -96
  173. package/dist/@legacy/internal/core/bin/ansi.d.ts +0 -40
  174. package/dist/@legacy/internal/core/bin/ansi.js +0 -44
  175. package/dist/@legacy/internal/core/bin/terminal.d.ts +0 -1
  176. package/dist/@legacy/internal/core/bin/terminal.js +0 -12
  177. package/dist/@legacy/internal/core/css.d.ts +0 -1
  178. package/dist/@legacy/internal/core/css.js +0 -16
  179. package/dist/@legacy/internal/core/formatter/component.d.ts +0 -5
  180. package/dist/@legacy/internal/core/formatter/component.js +0 -60
  181. package/dist/@legacy/internal/core/formatter/device.d.ts +0 -5
  182. package/dist/@legacy/internal/core/formatter/device.js +0 -66
  183. package/dist/@legacy/internal/core/formatter/index.d.ts +0 -7
  184. package/dist/@legacy/internal/core/formatter/index.js +0 -35
  185. package/dist/@legacy/internal/core/formatter/style.d.ts +0 -4
  186. package/dist/@legacy/internal/core/formatter/style.js +0 -15
  187. package/dist/@legacy/internal/core/formatter/theme.d.ts +0 -5
  188. package/dist/@legacy/internal/core/formatter/theme.js +0 -44
  189. package/dist/@legacy/internal/core/formatter/typography.d.ts +0 -5
  190. package/dist/@legacy/internal/core/formatter/typography.js +0 -12
  191. package/dist/@legacy/internal/core/minify.d.ts +0 -1
  192. package/dist/@legacy/internal/core/minify.js +0 -10
  193. package/dist/@legacy/internal/core/standard-colors.d.ts +0 -75
  194. package/dist/@legacy/internal/core/standard-colors.js +0 -75
  195. package/dist/@legacy/internal/core/x11-colors.d.ts +0 -4
  196. package/dist/@legacy/internal/core/x11-colors.js +0 -151
  197. package/dist/@legacy/internal/helpers/colors.d.ts +0 -1
  198. package/dist/@legacy/internal/helpers/colors.js +0 -50
  199. package/dist/@legacy/internal/helpers/convert.d.ts +0 -1
  200. package/dist/@legacy/internal/helpers/convert.js +0 -17
  201. package/dist/@legacy/internal/helpers/deep-merge.d.ts +0 -44
  202. package/dist/@legacy/internal/helpers/deep-merge.js +0 -80
  203. package/dist/@legacy/internal/helpers/outside.d.ts +0 -9
  204. package/dist/@legacy/internal/helpers/outside.js +0 -34
  205. package/dist/@legacy/internal/helpers/parser.d.ts +0 -10
  206. package/dist/@legacy/internal/helpers/parser.js +0 -93
  207. package/dist/@legacy/internal/helpers/scroll.d.ts +0 -1
  208. package/dist/@legacy/internal/helpers/scroll.js +0 -5
  209. package/dist/@legacy/internal/plugins/vite.d.ts +0 -8
  210. package/dist/@legacy/internal/plugins/vite.js +0 -33
  211. package/dist/@legacy/internal/types/components.d.ts +0 -14
  212. package/dist/@legacy/internal/types/components.js +0 -1
  213. package/dist/@legacy/internal/types/configuration.d.ts +0 -63
  214. package/dist/@legacy/internal/types/configuration.js +0 -1
  215. package/dist/@legacy/internal/types/index.d.ts +0 -2
  216. package/dist/@legacy/internal/types/index.js +0 -2
  217. package/dist/@legacy/stores/breakpoints.d.ts +0 -6
  218. package/dist/@legacy/stores/breakpoints.js +0 -14
  219. package/dist/@legacy/stores/devices.d.ts +0 -6
  220. package/dist/@legacy/stores/devices.js +0 -9
  221. package/dist/@legacy/stores/index.d.ts +0 -5
  222. package/dist/@legacy/stores/index.js +0 -5
  223. package/dist/@legacy/stores/themes.js +0 -4
  224. package/dist/@legacy/stores/viewport.d.ts +0 -7
  225. package/dist/@legacy/stores/viewport.js +0 -7
  226. package/dist/@legacy/styles/animation.css +0 -33
  227. package/dist/@legacy/styles/keyframes.css +0 -30
  228. package/dist/@legacy/styles/reset.css +0 -133
  229. package/dist/@legacy/styles.css +0 -0
  230. package/dist/@legacy/styles.css.d.ts +0 -4
  231. package/dist/@legacy/themes.css +0 -0
  232. package/dist/@legacy/themes.css.d.ts +0 -4
  233. /package/dist/{@legacy/components/accordion/types.js → @types/actions.js} +0 -0
  234. /package/dist/{@legacy/actions → components/accordion}/accordion.svelte.js +0 -0
@@ -1,24 +0,0 @@
1
- import { deepMerge } from './internal/helpers/deep-merge.js';
2
- import { breakpoints } from './stores/breakpoints.js';
3
- import { get } from 'svelte/store';
4
- import { devices } from './stores/devices.js';
5
- import { valueToPx } from './internal/helpers/convert.js';
6
- function createLapikit(lapikit) {
7
- if (lapikit?.breakpoints?.thresholds) {
8
- const currentBreakpoints = get(breakpoints);
9
- const breakpointMerged = deepMerge(currentBreakpoints, lapikit.breakpoints.thresholds);
10
- const formattedBreakpoints = Object.fromEntries(Object.entries(breakpointMerged).map(([key, value]) => [key, valueToPx(value)]));
11
- breakpoints.set(formattedBreakpoints);
12
- }
13
- if (lapikit?.breakpoints?.devices) {
14
- const currentDevices = get(devices);
15
- const currentBreakpoints = get(breakpoints);
16
- const deviceMerged = deepMerge(currentDevices, lapikit.breakpoints.devices);
17
- const formattedDevices = Object.fromEntries(Object.entries(deviceMerged).map(([key, deviceKey]) => {
18
- const breakpointValue = currentBreakpoints[deviceKey];
19
- return [key, valueToPx(breakpointValue)];
20
- }));
21
- devices.set(formattedDevices);
22
- }
23
- }
24
- export default createLapikit;
@@ -1,149 +0,0 @@
1
- export declare const preset: {
2
- breakpoints: {
3
- devices: {
4
- desktop: number;
5
- tablet: number;
6
- mobile: number;
7
- };
8
- thresholds: {
9
- base: number;
10
- xs: number;
11
- sm: number;
12
- md: number;
13
- lg: number;
14
- xl: number;
15
- '2xl': number;
16
- '3xl': number;
17
- };
18
- };
19
- theme: {
20
- defaultTheme: string;
21
- colorScheme: boolean;
22
- themes: {
23
- light: {
24
- dark: boolean;
25
- colors: {
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
- };
60
- };
61
- variables: {
62
- 'test-variable': string;
63
- };
64
- };
65
- dark: {
66
- dark: boolean;
67
- colors: {
68
- pink: 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
- };
103
- };
104
- variables: {
105
- 'test-variable': string;
106
- };
107
- };
108
- };
109
- };
110
- typography: {
111
- defaultTypography: string;
112
- fonts: {
113
- default: {
114
- sans: string[];
115
- mono: string[];
116
- serif: string[];
117
- };
118
- };
119
- };
120
- styles: {
121
- spacing: string;
122
- shape: {
123
- sm: string;
124
- md: string;
125
- lg: string;
126
- xl: string;
127
- '2xl': string;
128
- '3xl': string;
129
- full: string;
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
- };
148
- };
149
- };
@@ -1,169 +0,0 @@
1
- import { variables } from './variables.js';
2
- import standardColors from '../core/standard-colors.js';
3
- export const preset = {
4
- breakpoints: {
5
- devices: {
6
- desktop: 1024, //64rem (lg)
7
- tablet: 768, //48rem (md)
8
- mobile: 640 //40rem (sm)
9
- },
10
- thresholds: {
11
- base: 0, // 0px
12
- xs: 448, //28rem
13
- sm: 640, //40rem
14
- md: 768, //48rem
15
- lg: 1024, //64rem
16
- xl: 1280, //80rem
17
- '2xl': 1536, //96rem
18
- '3xl': 1792 //112rem
19
- }
20
- },
21
- theme: {
22
- defaultTheme: 'light',
23
- colorScheme: true,
24
- themes: {
25
- light: {
26
- dark: false,
27
- colors: {
28
- label: {
29
- primary: '#000000',
30
- secondary: standardColors.gray.light,
31
- tertiary: standardColors.gray2.light,
32
- quaternary: standardColors.gray3.light
33
- },
34
- accent: {
35
- primary: standardColors.blue.light,
36
- success: standardColors.green.light,
37
- warning: standardColors.orange.light,
38
- destructive: standardColors.red.light,
39
- info: standardColors.cyan.light
40
- },
41
- separator: {
42
- default: standardColors.gray3.light,
43
- opaque: standardColors.gray4.light
44
- },
45
- state: {
46
- placeholder: standardColors.gray3.light,
47
- disabled: standardColors.gray2.light,
48
- link: standardColors.blue.light,
49
- highlight: standardColors.gray5.light,
50
- shadow: '#00000033'
51
- },
52
- background: {
53
- primary: '#FFFFFF',
54
- secondary: standardColors.gray6.light,
55
- tertiary: standardColors.gray5.light,
56
- grouped: {
57
- primary: standardColors.gray6.light,
58
- secondary: '#FFFFFF',
59
- tertiary: standardColors.gray6.light
60
- }
61
- }
62
- },
63
- variables: variables
64
- },
65
- dark: {
66
- dark: true,
67
- colors: {
68
- pink: 'pink',
69
- label: {
70
- primary: '#FFFFFF',
71
- secondary: standardColors.gray2.dark,
72
- tertiary: standardColors.gray3.dark,
73
- quaternary: standardColors.gray4.dark
74
- },
75
- accent: {
76
- primary: standardColors.blue.dark,
77
- success: standardColors.green.dark,
78
- warning: standardColors.orange.dark,
79
- destructive: standardColors.red.dark,
80
- info: standardColors.cyan.dark
81
- },
82
- separator: {
83
- default: standardColors.gray3.dark,
84
- opaque: standardColors.gray4.dark
85
- },
86
- state: {
87
- placeholder: standardColors.gray3.dark,
88
- disabled: standardColors.gray4.dark,
89
- link: standardColors.blue.dark,
90
- highlight: standardColors.gray5.dark,
91
- shadow: '#00000066'
92
- },
93
- background: {
94
- primary: '#000000',
95
- secondary: standardColors.gray6.dark,
96
- tertiary: standardColors.gray5.dark,
97
- grouped: {
98
- primary: standardColors.gray6.dark,
99
- secondary: standardColors.gray5.dark,
100
- tertiary: standardColors.gray4.dark
101
- }
102
- }
103
- },
104
- variables: variables
105
- }
106
- }
107
- },
108
- typography: {
109
- defaultTypography: 'default',
110
- fonts: {
111
- default: {
112
- sans: [
113
- 'system-ui',
114
- '-apple-system',
115
- 'BlinkMacSystemFont',
116
- 'Segoe UI',
117
- 'Roboto',
118
- 'Helvetica Neue',
119
- 'Arial',
120
- 'sans-serif',
121
- 'Apple Color Emoji',
122
- 'Segoe UI Emoji',
123
- 'Segoe UI Symbol'
124
- ],
125
- mono: [
126
- 'SFMono-Regular',
127
- 'ui-monospace',
128
- 'SF Mono',
129
- 'Menlo',
130
- 'Monaco',
131
- 'Consolas',
132
- 'Liberation Mono',
133
- 'Courier New',
134
- 'monospace'
135
- ],
136
- serif: ['Merriweather', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif']
137
- }
138
- }
139
- },
140
- styles: {
141
- spacing: '0.125rem', // 2px
142
- shape: {
143
- sm: '0.125rem', // 2px
144
- md: '0.25rem', // 4px
145
- lg: '0.5rem', // 8px
146
- xl: '0.75rem', // 12px
147
- '2xl': '1rem', // 16px
148
- '3xl': '1.5rem', // 24px
149
- full: '9999px' // 9999px
150
- },
151
- dialog: {
152
- xs: '18.75rem', // 300px
153
- sm: '25rem', // 400px
154
- md: '37.5rem', // 600px
155
- lg: '53.125rem', // 850px
156
- xl: '75rem' // 1200px
157
- },
158
- modal: {
159
- xs: '18.75rem', // 300px
160
- sm: '25rem', // 400px
161
- md: '37.5rem', // 600px
162
- lg: '53.125rem', // 850px
163
- xl: '75rem' // 1200px
164
- },
165
- animation: {
166
- 'ripple-duration': '0.4s'
167
- }
168
- }
169
- };
@@ -1,3 +0,0 @@
1
- export declare const variables: {
2
- 'test-variable': string;
3
- };
@@ -1,3 +0,0 @@
1
- export const variables = {
2
- 'test-variable': '1rem'
3
- };
@@ -1,8 +0,0 @@
1
- export declare function getAssets(): {
2
- shape(params?: string): string | undefined;
3
- className(key: string, type: string, value: string | boolean | Array<string> | {
4
- [key: string]: string;
5
- }): string | undefined;
6
- color(color?: string): string | undefined;
7
- unit(value?: string | number): string | undefined;
8
- };
@@ -1,54 +0,0 @@
1
- import { x11ColorNames } from '../x11-colors.js';
2
- export function getAssets() {
3
- return {
4
- shape(params) {
5
- if (params) {
6
- if (params === 'none' || params == '0')
7
- return '0';
8
- return `var(--system-shape-${params})`;
9
- }
10
- },
11
- className(key, type, value) {
12
- if (typeof value === 'string')
13
- return `kit-${key}--${type}-${value}`;
14
- else if (typeof value === 'boolean' && value)
15
- return `kit-${key}--${type}`;
16
- else if (typeof value === 'object') {
17
- if (Array.isArray(value)) {
18
- return value
19
- .map((media) => `${media === 'base' ? '' : `${media}:`}kit--${type}`)
20
- .join(' ');
21
- }
22
- else {
23
- return Object.entries(value)
24
- .map(([media, value]) => `${media === 'base' ? '' : `${media}:`}kit-${key}--${type}-${value}`)
25
- .join(' ');
26
- }
27
- }
28
- },
29
- color(color) {
30
- if (color) {
31
- if (color.includes('#') ||
32
- color.includes('rgb') ||
33
- color.includes('rgba') ||
34
- color.includes('oklch') ||
35
- x11ColorNames.includes(color.toLowerCase()))
36
- return color;
37
- if (color.includes('transparent') || color.includes('inherit') || color.includes('initial'))
38
- return color;
39
- return `var(--kit-${color})`;
40
- }
41
- },
42
- unit(value) {
43
- if (typeof value === 'number')
44
- return `${value}px`;
45
- if (typeof value === 'string') {
46
- const cleaned = value.trim();
47
- const isOnlyNumericLike = /^[\d.,]+$/.test(cleaned);
48
- if (isOnlyNumericLike)
49
- return `${value}px`;
50
- }
51
- return value;
52
- }
53
- };
54
- }
@@ -1,7 +0,0 @@
1
- import type { PositionElement } from '../../../components/dropdown/types.js';
2
- type Location = 'top' | 'bottom' | 'left' | 'right';
3
- export declare function getPositions(): {
4
- readonly values: PositionElement;
5
- update(activator: HTMLElement | PointerEvent, element: HTMLElement, location?: Location, centered?: boolean, avoidCollisions?: boolean): void;
6
- };
7
- export {};
@@ -1,148 +0,0 @@
1
- import { innerWidth, innerHeight } from 'svelte/reactivity/window';
2
- export function getPositions() {
3
- // state
4
- const axis = $state({
5
- x: 0,
6
- y: 0,
7
- location: null
8
- });
9
- return {
10
- get values() {
11
- return axis;
12
- },
13
- update(activator, element, location, centered, avoidCollisions) {
14
- if (!activator || !element)
15
- return;
16
- const elementRect = element.getBoundingClientRect();
17
- if (!(activator instanceof HTMLElement)) {
18
- if (activator.clientX + elementRect.width > innerWidth.current) {
19
- axis.x = activator.clientX - elementRect.width;
20
- }
21
- else {
22
- axis.x = activator.clientX;
23
- }
24
- if (activator.clientY + elementRect.height > innerHeight.current) {
25
- axis.y = activator.clientY - elementRect.height;
26
- }
27
- else {
28
- axis.y = activator.clientY;
29
- }
30
- }
31
- else if (activator instanceof HTMLElement) {
32
- const activatorRect = activator.getBoundingClientRect();
33
- const spacing = 0;
34
- const _activator = activatorRect.y + activatorRect.height;
35
- const _element = elementRect.height + spacing;
36
- if (location === 'top' || location === 'bottom') {
37
- if (avoidCollisions) {
38
- if (location === 'top') {
39
- if (activatorRect.y - _element < 0) {
40
- axis.y = activatorRect.bottom + spacing;
41
- axis.location = 'bottom';
42
- }
43
- else {
44
- axis.y = activatorRect.top - _element;
45
- axis.location = 'top';
46
- }
47
- }
48
- else {
49
- if (_activator + _element > innerHeight.current) {
50
- axis.y = activatorRect.top - _element;
51
- axis.location = 'top';
52
- }
53
- else {
54
- axis.y = activatorRect.bottom + spacing;
55
- axis.location = 'bottom';
56
- }
57
- }
58
- }
59
- else {
60
- if (location === 'top') {
61
- axis.y = activatorRect.top - _element;
62
- axis.location = 'top';
63
- }
64
- else {
65
- axis.y = activatorRect.bottom + spacing;
66
- axis.location = 'bottom';
67
- }
68
- }
69
- if (centered &&
70
- activatorRect.left - (elementRect.width - activatorRect.width) / 2 > 0 &&
71
- activatorRect.left + elementRect.width < innerWidth.current) {
72
- axis.x = activatorRect.left - (elementRect.width - activatorRect.width) / 2;
73
- }
74
- else if (activatorRect.left + elementRect.width > innerWidth.current) {
75
- axis.x = activatorRect.left - (elementRect.width - activatorRect.width);
76
- }
77
- else {
78
- axis.x = activatorRect.left;
79
- }
80
- }
81
- else if (location === 'left' || location === 'right') {
82
- if (avoidCollisions) {
83
- if (location === 'left' && !(activatorRect.left - elementRect.width < 0)) {
84
- axis.x = activatorRect.left - (elementRect.width + spacing);
85
- axis.location = 'left';
86
- }
87
- else {
88
- if (activatorRect.left + activatorRect.width + elementRect.width + spacing >
89
- innerWidth.current) {
90
- axis.x = activatorRect.left - (elementRect.width + spacing);
91
- axis.location = 'left';
92
- }
93
- else {
94
- axis.x = activatorRect.left + activatorRect.width + spacing;
95
- axis.location = 'right';
96
- }
97
- }
98
- }
99
- else {
100
- if (location === 'left') {
101
- axis.x = activatorRect.left - (elementRect.width + spacing);
102
- axis.location = 'left';
103
- }
104
- else {
105
- axis.x = activatorRect.left + activatorRect.width + spacing;
106
- axis.location = 'right';
107
- }
108
- }
109
- if (centered &&
110
- activatorRect.top - (elementRect.height - activatorRect.height) / 2 > 0 &&
111
- activatorRect.top + elementRect.height < innerHeight.current) {
112
- axis.y = activatorRect.top - (elementRect.height - activatorRect.height) / 2;
113
- }
114
- else if (activatorRect.y + elementRect.height > innerHeight.current) {
115
- axis.y = activatorRect.y - elementRect.height + activatorRect.height;
116
- }
117
- else {
118
- axis.y = activatorRect.y;
119
- }
120
- }
121
- else {
122
- if (centered &&
123
- activatorRect.left - (elementRect.width - activatorRect.width) / 2 > 0 &&
124
- activatorRect.left + elementRect.width < innerWidth.current) {
125
- axis.x = activatorRect.left - (elementRect.width - activatorRect.width) / 2;
126
- }
127
- else if (activatorRect.left + elementRect.width > innerWidth.current) {
128
- axis.x = activatorRect.left - (elementRect.width - activatorRect.width);
129
- }
130
- else {
131
- axis.x = activatorRect.left;
132
- }
133
- if (centered &&
134
- activatorRect.top - (elementRect.height - activatorRect.height) / 2 > 0 &&
135
- activatorRect.top + elementRect.height < innerHeight.current) {
136
- axis.y = activatorRect.top - (elementRect.height - activatorRect.height) / 2;
137
- }
138
- else if (activatorRect.bottom + elementRect.height > innerHeight.current) {
139
- axis.y = activatorRect.top - elementRect.height;
140
- }
141
- else {
142
- axis.y = activatorRect.bottom;
143
- }
144
- }
145
- }
146
- }
147
- };
148
- }
@@ -1,7 +0,0 @@
1
- import type { PositionElement } from '../../../components/popover/types.js';
2
- type Location = 'top' | 'bottom' | 'left' | 'right';
3
- export declare function getPositions(): {
4
- readonly values: PositionElement;
5
- update(activator: HTMLElement, element: HTMLElement, location?: Location, centered?: boolean, avoidCollisions?: boolean): void;
6
- };
7
- export {};