lapikit 0.5.9 → 0.6.0

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 (214) 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/actions.d.ts +2 -0
  5. package/dist/actions.js +2 -0
  6. package/dist/components/dialog/dialog.svelte +1 -2
  7. package/dist/{@legacy/stores/components.d.ts → components/modal/modal.d.ts} +1 -2
  8. package/dist/{@legacy/stores/components.js → components/modal/modal.js} +1 -1
  9. package/dist/components/modal/modal.svelte +1 -1
  10. package/dist/components/textfield/textfield.svelte.d.ts +1 -1
  11. package/dist/constants.d.ts +2 -2
  12. package/dist/constants.js +2 -2
  13. package/dist/utils/outside.d.ts +1 -0
  14. package/dist/utils/outside.js +5 -0
  15. package/dist/{@legacy/stores → utils}/themes.d.ts +1 -0
  16. package/dist/{@legacy/actions/use-theme.js → utils/themes.js} +4 -1
  17. package/package.json +11 -32
  18. package/dist/@legacy/actions/accordion.svelte.d.ts +0 -9
  19. package/dist/@legacy/actions/index.d.ts +0 -2
  20. package/dist/@legacy/actions/index.js +0 -2
  21. package/dist/@legacy/actions/use-theme.d.ts +0 -1
  22. package/dist/@legacy/assets/icons/arrow-down.svelte +0 -12
  23. package/dist/@legacy/assets/icons/arrow-down.svelte.d.ts +0 -18
  24. package/dist/@legacy/assets/icons/arrow-up.svelte +0 -12
  25. package/dist/@legacy/assets/icons/arrow-up.svelte.d.ts +0 -18
  26. package/dist/@legacy/assets/icons/close-fill.svelte +0 -12
  27. package/dist/@legacy/assets/icons/close-fill.svelte.d.ts +0 -18
  28. package/dist/@legacy/assets/icons/loading-fill.svelte +0 -31
  29. package/dist/@legacy/assets/icons/loading-fill.svelte.d.ts +0 -18
  30. package/dist/@legacy/components/accordion/accordion.css +0 -36
  31. package/dist/@legacy/components/accordion/accordion.svelte +0 -39
  32. package/dist/@legacy/components/accordion/accordion.svelte.d.ts +0 -4
  33. package/dist/@legacy/components/accordion/modules/accordion-item.css +0 -68
  34. package/dist/@legacy/components/accordion/modules/accordion-item.svelte +0 -94
  35. package/dist/@legacy/components/accordion/modules/accordion-item.svelte.d.ts +0 -4
  36. package/dist/@legacy/components/accordion/types.d.ts +0 -33
  37. package/dist/@legacy/components/alert/alert.css +0 -130
  38. package/dist/@legacy/components/alert/alert.svelte +0 -89
  39. package/dist/@legacy/components/alert/alert.svelte.d.ts +0 -4
  40. package/dist/@legacy/components/alert/types.d.ts +0 -28
  41. package/dist/@legacy/components/alert/types.js +0 -1
  42. package/dist/@legacy/components/app/app.css +0 -26
  43. package/dist/@legacy/components/app/app.svelte +0 -79
  44. package/dist/@legacy/components/app/app.svelte.d.ts +0 -4
  45. package/dist/@legacy/components/app/types.d.ts +0 -10
  46. package/dist/@legacy/components/app/types.js +0 -1
  47. package/dist/@legacy/components/appbar/appbar.css +0 -38
  48. package/dist/@legacy/components/appbar/appbar.svelte +0 -40
  49. package/dist/@legacy/components/appbar/appbar.svelte.d.ts +0 -4
  50. package/dist/@legacy/components/appbar/types.d.ts +0 -15
  51. package/dist/@legacy/components/appbar/types.js +0 -1
  52. package/dist/@legacy/components/aspect-ratio/aspect-ratio.css +0 -19
  53. package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte +0 -25
  54. package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte.d.ts +0 -4
  55. package/dist/@legacy/components/aspect-ratio/types.d.ts +0 -5
  56. package/dist/@legacy/components/aspect-ratio/types.js +0 -1
  57. package/dist/@legacy/components/avatar/avatar.css +0 -102
  58. package/dist/@legacy/components/avatar/avatar.svelte +0 -46
  59. package/dist/@legacy/components/avatar/avatar.svelte.d.ts +0 -4
  60. package/dist/@legacy/components/avatar/types.d.ts +0 -22
  61. package/dist/@legacy/components/avatar/types.js +0 -1
  62. package/dist/@legacy/components/button/button.css +0 -240
  63. package/dist/@legacy/components/button/button.svelte +0 -102
  64. package/dist/@legacy/components/button/button.svelte.d.ts +0 -4
  65. package/dist/@legacy/components/button/types.d.ts +0 -29
  66. package/dist/@legacy/components/button/types.js +0 -1
  67. package/dist/@legacy/components/card/card.css +0 -105
  68. package/dist/@legacy/components/card/card.svelte +0 -67
  69. package/dist/@legacy/components/card/card.svelte.d.ts +0 -4
  70. package/dist/@legacy/components/card/types.d.ts +0 -20
  71. package/dist/@legacy/components/card/types.js +0 -1
  72. package/dist/@legacy/components/chip/chip.css +0 -224
  73. package/dist/@legacy/components/chip/chip.svelte +0 -131
  74. package/dist/@legacy/components/chip/chip.svelte.d.ts +0 -4
  75. package/dist/@legacy/components/chip/types.d.ts +0 -32
  76. package/dist/@legacy/components/chip/types.js +0 -1
  77. package/dist/@legacy/components/dialog/dialog.css +0 -129
  78. package/dist/@legacy/components/dialog/dialog.svelte +0 -67
  79. package/dist/@legacy/components/dialog/dialog.svelte.d.ts +0 -4
  80. package/dist/@legacy/components/dialog/types.d.ts +0 -24
  81. package/dist/@legacy/components/dialog/types.js +0 -1
  82. package/dist/@legacy/components/dropdown/dropdown.css +0 -13
  83. package/dist/@legacy/components/dropdown/dropdown.svelte +0 -115
  84. package/dist/@legacy/components/dropdown/dropdown.svelte.d.ts +0 -4
  85. package/dist/@legacy/components/dropdown/types.d.ts +0 -26
  86. package/dist/@legacy/components/dropdown/types.js +0 -1
  87. package/dist/@legacy/components/icon/icon.css +0 -78
  88. package/dist/@legacy/components/icon/icon.svelte +0 -49
  89. package/dist/@legacy/components/icon/icon.svelte.d.ts +0 -4
  90. package/dist/@legacy/components/icon/types.d.ts +0 -16
  91. package/dist/@legacy/components/icon/types.js +0 -1
  92. package/dist/@legacy/components/index.d.ts +0 -22
  93. package/dist/@legacy/components/index.js +0 -23
  94. package/dist/@legacy/components/list/list.css +0 -149
  95. package/dist/@legacy/components/list/list.svelte +0 -44
  96. package/dist/@legacy/components/list/list.svelte.d.ts +0 -4
  97. package/dist/@legacy/components/list/modules/list-item.css +0 -67
  98. package/dist/@legacy/components/list/modules/list-item.svelte +0 -76
  99. package/dist/@legacy/components/list/modules/list-item.svelte.d.ts +0 -4
  100. package/dist/@legacy/components/list/types.d.ts +0 -33
  101. package/dist/@legacy/components/list/types.js +0 -1
  102. package/dist/@legacy/components/modal/modal.css +0 -137
  103. package/dist/@legacy/components/modal/modal.svelte +0 -118
  104. package/dist/@legacy/components/modal/modal.svelte.d.ts +0 -4
  105. package/dist/@legacy/components/modal/types.d.ts +0 -26
  106. package/dist/@legacy/components/modal/types.js +0 -1
  107. package/dist/@legacy/components/popover/popover.css +0 -13
  108. package/dist/@legacy/components/popover/popover.svelte +0 -73
  109. package/dist/@legacy/components/popover/popover.svelte.d.ts +0 -4
  110. package/dist/@legacy/components/popover/types.d.ts +0 -20
  111. package/dist/@legacy/components/popover/types.js +0 -1
  112. package/dist/@legacy/components/separator/separator.css +0 -42
  113. package/dist/@legacy/components/separator/separator.svelte +0 -37
  114. package/dist/@legacy/components/separator/separator.svelte.d.ts +0 -4
  115. package/dist/@legacy/components/separator/types.d.ts +0 -15
  116. package/dist/@legacy/components/separator/types.js +0 -1
  117. package/dist/@legacy/components/spacer/spacer.css +0 -3
  118. package/dist/@legacy/components/spacer/spacer.svelte +0 -7
  119. package/dist/@legacy/components/spacer/spacer.svelte.d.ts +0 -4
  120. package/dist/@legacy/components/spacer/types.d.ts +0 -4
  121. package/dist/@legacy/components/spacer/types.js +0 -1
  122. package/dist/@legacy/components/textfield/textfield.css +0 -298
  123. package/dist/@legacy/components/textfield/textfield.svelte +0 -193
  124. package/dist/@legacy/components/textfield/textfield.svelte.d.ts +0 -4
  125. package/dist/@legacy/components/textfield/types.d.ts +0 -37
  126. package/dist/@legacy/components/textfield/types.js +0 -1
  127. package/dist/@legacy/components/toolbar/toolbar.css +0 -106
  128. package/dist/@legacy/components/toolbar/toolbar.svelte +0 -47
  129. package/dist/@legacy/components/toolbar/toolbar.svelte.d.ts +0 -4
  130. package/dist/@legacy/components/toolbar/types.d.ts +0 -27
  131. package/dist/@legacy/components/toolbar/types.js +0 -1
  132. package/dist/@legacy/components/tooltip/tooltip.css +0 -116
  133. package/dist/@legacy/components/tooltip/tooltip.svelte +0 -113
  134. package/dist/@legacy/components/tooltip/tooltip.svelte.d.ts +0 -4
  135. package/dist/@legacy/components/tooltip/types.d.ts +0 -23
  136. package/dist/@legacy/components/tooltip/types.js +0 -1
  137. package/dist/@legacy/index.d.ts +0 -3
  138. package/dist/@legacy/index.js +0 -24
  139. package/dist/@legacy/internal/config/presets.d.ts +0 -149
  140. package/dist/@legacy/internal/config/presets.js +0 -169
  141. package/dist/@legacy/internal/config/variables.d.ts +0 -3
  142. package/dist/@legacy/internal/config/variables.js +0 -3
  143. package/dist/@legacy/internal/core/actions/assets.svelte.d.ts +0 -8
  144. package/dist/@legacy/internal/core/actions/assets.svelte.js +0 -54
  145. package/dist/@legacy/internal/core/actions/dropdown.svelte.d.ts +0 -7
  146. package/dist/@legacy/internal/core/actions/dropdown.svelte.js +0 -148
  147. package/dist/@legacy/internal/core/actions/popover.svelte.d.ts +0 -7
  148. package/dist/@legacy/internal/core/actions/popover.svelte.js +0 -134
  149. package/dist/@legacy/internal/core/actions/tooltip.svelte.d.ts +0 -7
  150. package/dist/@legacy/internal/core/actions/tooltip.svelte.js +0 -131
  151. package/dist/@legacy/internal/core/animations/ripple.d.ts +0 -12
  152. package/dist/@legacy/internal/core/animations/ripple.js +0 -96
  153. package/dist/@legacy/internal/core/bin/ansi.d.ts +0 -40
  154. package/dist/@legacy/internal/core/bin/ansi.js +0 -44
  155. package/dist/@legacy/internal/core/bin/terminal.d.ts +0 -1
  156. package/dist/@legacy/internal/core/bin/terminal.js +0 -12
  157. package/dist/@legacy/internal/core/css.d.ts +0 -1
  158. package/dist/@legacy/internal/core/css.js +0 -16
  159. package/dist/@legacy/internal/core/formatter/component.d.ts +0 -5
  160. package/dist/@legacy/internal/core/formatter/component.js +0 -60
  161. package/dist/@legacy/internal/core/formatter/device.d.ts +0 -5
  162. package/dist/@legacy/internal/core/formatter/device.js +0 -66
  163. package/dist/@legacy/internal/core/formatter/index.d.ts +0 -7
  164. package/dist/@legacy/internal/core/formatter/index.js +0 -35
  165. package/dist/@legacy/internal/core/formatter/style.d.ts +0 -4
  166. package/dist/@legacy/internal/core/formatter/style.js +0 -15
  167. package/dist/@legacy/internal/core/formatter/theme.d.ts +0 -5
  168. package/dist/@legacy/internal/core/formatter/theme.js +0 -44
  169. package/dist/@legacy/internal/core/formatter/typography.d.ts +0 -5
  170. package/dist/@legacy/internal/core/formatter/typography.js +0 -12
  171. package/dist/@legacy/internal/core/minify.d.ts +0 -1
  172. package/dist/@legacy/internal/core/minify.js +0 -10
  173. package/dist/@legacy/internal/core/standard-colors.d.ts +0 -75
  174. package/dist/@legacy/internal/core/standard-colors.js +0 -75
  175. package/dist/@legacy/internal/core/x11-colors.d.ts +0 -4
  176. package/dist/@legacy/internal/core/x11-colors.js +0 -151
  177. package/dist/@legacy/internal/helpers/colors.d.ts +0 -1
  178. package/dist/@legacy/internal/helpers/colors.js +0 -50
  179. package/dist/@legacy/internal/helpers/convert.d.ts +0 -1
  180. package/dist/@legacy/internal/helpers/convert.js +0 -17
  181. package/dist/@legacy/internal/helpers/deep-merge.d.ts +0 -44
  182. package/dist/@legacy/internal/helpers/deep-merge.js +0 -80
  183. package/dist/@legacy/internal/helpers/outside.d.ts +0 -9
  184. package/dist/@legacy/internal/helpers/outside.js +0 -34
  185. package/dist/@legacy/internal/helpers/parser.d.ts +0 -10
  186. package/dist/@legacy/internal/helpers/parser.js +0 -93
  187. package/dist/@legacy/internal/helpers/scroll.d.ts +0 -1
  188. package/dist/@legacy/internal/helpers/scroll.js +0 -5
  189. package/dist/@legacy/internal/plugins/vite.d.ts +0 -8
  190. package/dist/@legacy/internal/plugins/vite.js +0 -33
  191. package/dist/@legacy/internal/types/components.d.ts +0 -14
  192. package/dist/@legacy/internal/types/components.js +0 -1
  193. package/dist/@legacy/internal/types/configuration.d.ts +0 -63
  194. package/dist/@legacy/internal/types/configuration.js +0 -1
  195. package/dist/@legacy/internal/types/index.d.ts +0 -2
  196. package/dist/@legacy/internal/types/index.js +0 -2
  197. package/dist/@legacy/stores/breakpoints.d.ts +0 -6
  198. package/dist/@legacy/stores/breakpoints.js +0 -14
  199. package/dist/@legacy/stores/devices.d.ts +0 -6
  200. package/dist/@legacy/stores/devices.js +0 -9
  201. package/dist/@legacy/stores/index.d.ts +0 -5
  202. package/dist/@legacy/stores/index.js +0 -5
  203. package/dist/@legacy/stores/themes.js +0 -4
  204. package/dist/@legacy/stores/viewport.d.ts +0 -7
  205. package/dist/@legacy/stores/viewport.js +0 -7
  206. package/dist/@legacy/styles/animation.css +0 -33
  207. package/dist/@legacy/styles/keyframes.css +0 -30
  208. package/dist/@legacy/styles/reset.css +0 -133
  209. package/dist/@legacy/styles.css +0 -0
  210. package/dist/@legacy/styles.css.d.ts +0 -4
  211. package/dist/@legacy/themes.css +0 -0
  212. package/dist/@legacy/themes.css.d.ts +0 -4
  213. /package/dist/{@legacy/components/accordion/types.js → @types/actions.js} +0 -0
  214. /package/dist/{@legacy/actions → components/accordion}/accordion.svelte.js +0 -0
@@ -1,27 +0,0 @@
1
- import type { Component } from '../../internal/types/index.js';
2
- type Variant = 'outline' | 'text' | 'dash';
3
- type Density = 'compact' | 'comfortable' | 'default';
4
- type Orientation = 'horizontal' | 'vertical';
5
- type Location = 'top' | 'bottom';
6
- export interface ToolbarProps extends Component {
7
- is?: 'div' | 'header' | 'nav';
8
- variant?: Variant | {
9
- [key: string]: Variant;
10
- };
11
- rounded?: string;
12
- density?: Density | {
13
- [key: string]: Density;
14
- };
15
- dark?: boolean;
16
- light?: boolean;
17
- color?: string;
18
- orientation?: Orientation | {
19
- [key: string]: Orientation;
20
- };
21
- background?: string;
22
- location?: Location | {
23
- [key: string]: Location;
24
- };
25
- classContent?: string | string[] | undefined;
26
- }
27
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,116 +0,0 @@
1
- .kit-tooltip {
2
- inset: 0px auto auto 0px;
3
- margin: 0px;
4
- position: fixed;
5
- z-index: 2000;
6
- }
7
-
8
- .kit-tooltip-content {
9
- background-color: var(--tooltip-background, var(--kit-background-grouped-primary));
10
- color: var(--tooltip-color, var(--kit-label-primary));
11
- border-radius: var(--tooltip-shape, var(--system-shape-md));
12
- border: 1px solid var(--tooltip-background, var(--kit-background-grouped-primary));
13
- font-size: 0.875rem;
14
- display: inline-block;
15
- width: auto;
16
- pointer-events: none;
17
- overflow-wrap: break-word;
18
- box-shadow: 0px 16px 29px -10px color-mix(in oklab, var(--kit-state-shadow) 60%, transparent);
19
- }
20
-
21
- /* density */
22
- .kit-tooltip-content[breakpoint]kit-tooltip-content--density-default {
23
- padding: 0.15rem 0.625rem;
24
- }
25
-
26
- .kit-tooltip-content[breakpoint]kit-tooltip-content--density-compact {
27
- padding: 0.125rem 0.5rem;
28
- }
29
-
30
- .kit-tooltip-content[breakpoint]kit-tooltip-content--density-comfortable {
31
- padding: 0.35rem 0.75rem;
32
- }
33
-
34
- .kit-tooltip-content--arrow::after {
35
- content: ' ';
36
- position: absolute;
37
- border-style: solid;
38
- }
39
-
40
- .kit-tooltip-content--arrow.kit-tooltip-content--bottom::after,
41
- .kit-tooltip-content--arrow.kit-tooltip-content--top::after {
42
- left: 50%;
43
- margin-left: -0.35rem;
44
- border-width: 0.35rem;
45
- }
46
-
47
- .kit-tooltip-content--arrow.kit-tooltip-content--bottom::after {
48
- bottom: 100%;
49
- border-color: transparent transparent var(--tooltip-background) transparent;
50
- }
51
-
52
- .kit-tooltip-content--arrow.kit-tooltip-content--top::after {
53
- top: 100%;
54
- border-color: var(--tooltip-background) transparent transparent transparent;
55
- }
56
-
57
- .kit-tooltip-content--arrow.kit-tooltip-content--left::after,
58
- .kit-tooltip-content--arrow.kit-tooltip-content--right::after {
59
- top: 50%;
60
- margin-top: -0.35rem;
61
- border-width: 0.35rem;
62
- }
63
-
64
- .kit-tooltip-content--arrow.kit-tooltip-content--right::after {
65
- right: 100%;
66
- border-color: transparent var(--tooltip-background) transparent transparent;
67
- }
68
-
69
- .kit-tooltip-content--arrow.kit-tooltip-content--left::after {
70
- left: 100%;
71
- border-color: transparent transparent transparent var(--tooltip-background);
72
- }
73
-
74
- .kit-tooltip-content--top,
75
- .kit-tooltip-content--bottom,
76
- .kit-tooltip-content--right,
77
- .kit-tooltip-content--left {
78
- animation-duration: 150ms;
79
- animation-name: enter;
80
- }
81
-
82
- .kit-tooltip-content--top {
83
- --animate-enter-pos1: 0;
84
- --animate-enter-pos2: 0.5rem;
85
- --animate-enter-pos3: 0;
86
- }
87
-
88
- .kit-tooltip-content--bottom {
89
- --animate-enter-pos1: 0;
90
- --animate-enter-pos2: -0.5rem;
91
- --animate-enter-pos3: 0;
92
- }
93
-
94
- .kit-tooltip-content--right {
95
- --animate-enter-pos1: -0.5rem;
96
- --animate-enter-pos2: 0;
97
- --animate-enter-pos3: 0;
98
- }
99
-
100
- .kit-tooltip-content--left {
101
- --animate-enter-pos1: 0.5rem;
102
- --animate-enter-pos2: 0;
103
- --animate-enter-pos3: 0;
104
- }
105
-
106
- @keyframes enter {
107
- 0% {
108
- opacity: 0;
109
- transform: translate3d(
110
- var(--animate-enter-pos1),
111
- var(--animate-enter-pos2),
112
- var(--animate-enter-pos3)
113
- )
114
- scale3d(0.95, 0.95, 0.95) rotate(0);
115
- }
116
- }
@@ -1,113 +0,0 @@
1
- <script lang="ts">
2
- import { getAssets } from '../../internal/core/actions/assets.svelte.js';
3
- import { getPositionsTooltip } from '../../internal/core/actions/tooltip.svelte.js';
4
- import type { PositionElement, TooltipProps } from './types.js';
5
-
6
- let {
7
- children,
8
- tooltip,
9
- open = $bindable(),
10
- label,
11
- dark,
12
- light,
13
- rounded,
14
- color,
15
- background,
16
- location = 'bottom',
17
- delayDuration = 850,
18
- density = 'default',
19
- variant,
20
- disabled,
21
- avoidCollisions = true,
22
- forceMount,
23
- ...rest
24
- }: TooltipProps = $props();
25
-
26
- const positionAxis = getPositionsTooltip();
27
- const assets = getAssets();
28
-
29
- let ref: HTMLElement | null = $state(null);
30
- let refTooltip: HTMLElement | null = $state(null);
31
- let timer: ReturnType<typeof setTimeout> | null = $state(null);
32
- let axis: PositionElement = $state({ x: 0, y: 0, location: null });
33
- let innerHeight = $state(0);
34
- let innerWidth = $state(0);
35
- let scrollX = $state(0);
36
- let scrollY = $state(0);
37
-
38
- axis = positionAxis?.values;
39
-
40
- $effect(() => {
41
- if (
42
- open &&
43
- ref &&
44
- refTooltip &&
45
- (scrollX > 0 || scrollY > 0 || innerHeight > 0 || innerWidth > 0)
46
- ) {
47
- positionAxis.update(ref, refTooltip, location, true, avoidCollisions);
48
- }
49
- });
50
-
51
- $effect(() => {
52
- if (tooltip) forceMount = true;
53
- });
54
-
55
- const handleMouse = (state: string) => {
56
- if (disabled) return (open = false);
57
- if (state === 'enter') {
58
- timer = setTimeout(() => {
59
- open = true;
60
- }, delayDuration);
61
- } else if (state === 'leave') {
62
- if (timer) {
63
- clearTimeout(timer);
64
- timer = null;
65
- }
66
- open = false;
67
- }
68
- };
69
- </script>
70
-
71
- <svelte:window bind:innerHeight bind:innerWidth bind:scrollX bind:scrollY />
72
-
73
- <!-- svelte-ignore a11y_no_static_element_interactions -->
74
- <span
75
- bind:this={ref}
76
- onmouseenter={() => handleMouse('enter')}
77
- onmouseleave={() => handleMouse('leave')}
78
- style:display="inline-flex"
79
- >
80
- {@render children?.()}
81
- </span>
82
-
83
- {#if open || forceMount}
84
- <div
85
- bind:this={refTooltip}
86
- class={['kit-tooltip']}
87
- role="tooltip"
88
- aria-label={label}
89
- style={`transform: translate(${axis.x}px, ${axis.y}px);display: ${open ? 'initial' : 'none'}`}
90
- >
91
- <div
92
- class={[
93
- 'kit-tooltip-content animate-in',
94
- light && 'light',
95
- dark && 'dark',
96
- rounded && assets.shape(rounded),
97
- axis?.location && `kit-tooltip-content--${axis?.location}`,
98
- variant && `kit-tooltip-content--${variant}`,
99
- density && assets.className('tooltip-content', 'density', density),
100
- rest.class
101
- ]}
102
- style:--tooltip-background={assets.color(background)}
103
- style:--tooltip-color={assets.color(color)}
104
- style:--tooltip-shape={assets.shape(rounded)}
105
- >
106
- {#if tooltip}
107
- {@render tooltip?.()}
108
- {:else}
109
- {label}
110
- {/if}
111
- </div>
112
- </div>
113
- {/if}
@@ -1,4 +0,0 @@
1
- import type { TooltipProps } from './types.js';
2
- declare const Tooltip: import("svelte").Component<TooltipProps, {}, "open">;
3
- type Tooltip = ReturnType<typeof Tooltip>;
4
- export default Tooltip;
@@ -1,23 +0,0 @@
1
- import type { Component } from '../../../internal/types/index.js';
2
- import type { Snippet } from 'svelte';
3
- export interface TooltipProps extends Component {
4
- open?: boolean;
5
- dark?: boolean;
6
- light?: boolean;
7
- rounded?: string;
8
- label?: string;
9
- location?: 'top' | 'bottom' | 'left' | 'right';
10
- color?: string;
11
- background?: string;
12
- delayDuration?: number;
13
- variant?: 'arrow';
14
- density?: 'compact' | 'comfortable' | 'default';
15
- disabled?: boolean;
16
- avoidCollisions?: boolean;
17
- tooltip?: Snippet;
18
- }
19
- export type PositionElement = {
20
- x: number;
21
- y: number;
22
- location: string | null;
23
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- import type { LapikitConfiguration } from './internal/types/configuration.js';
2
- declare function createLapikit(lapikit: LapikitConfiguration): void;
3
- export default createLapikit;
@@ -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
- };