lapikit 0.0.0-insiders.de81aed → 0.0.0-insiders.e330f8d

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 (57) hide show
  1. package/dist/components/button/button.css +8 -44
  2. package/dist/components/button/button.svelte +1 -14
  3. package/dist/components/button/types.d.ts +0 -3
  4. package/dist/components/index.d.ts +0 -7
  5. package/dist/components/index.js +0 -7
  6. package/dist/internal/assets.svelte.d.ts +0 -1
  7. package/dist/internal/assets.svelte.js +0 -11
  8. package/dist/internal/index.d.ts +0 -1
  9. package/dist/internal/index.js +0 -1
  10. package/dist/style/animation.css +0 -9
  11. package/dist/style/css.js +0 -3
  12. package/package.json +1 -1
  13. package/dist/assets/icons/loading-fill.svelte +0 -29
  14. package/dist/assets/icons/loading-fill.svelte.d.ts +0 -26
  15. package/dist/components/dialog/dialog.css +0 -143
  16. package/dist/components/dialog/dialog.svelte +0 -67
  17. package/dist/components/dialog/dialog.svelte.d.ts +0 -4
  18. package/dist/components/dialog/types.d.ts +0 -21
  19. package/dist/components/dialog/types.js +0 -1
  20. package/dist/components/dropdown/dropdown.css +0 -22
  21. package/dist/components/dropdown/dropdown.svelte +0 -116
  22. package/dist/components/dropdown/dropdown.svelte.d.ts +0 -4
  23. package/dist/components/dropdown/dropdown.svelte.js +0 -148
  24. package/dist/components/dropdown/types.d.ts +0 -26
  25. package/dist/components/dropdown/types.js +0 -1
  26. package/dist/components/icon/icon.css +0 -76
  27. package/dist/components/icon/icon.svelte +0 -49
  28. package/dist/components/icon/icon.svelte.d.ts +0 -4
  29. package/dist/components/icon/types.d.ts +0 -16
  30. package/dist/components/icon/types.js +0 -1
  31. package/dist/components/modal/modal.css +0 -19
  32. package/dist/components/modal/modal.svelte +0 -59
  33. package/dist/components/modal/modal.svelte.d.ts +0 -4
  34. package/dist/components/modal/types.d.ts +0 -21
  35. package/dist/components/modal/types.js +0 -1
  36. package/dist/components/popover/popover.css +0 -22
  37. package/dist/components/popover/popover.svelte +0 -73
  38. package/dist/components/popover/popover.svelte.d.ts +0 -4
  39. package/dist/components/popover/popover.svelte.js +0 -134
  40. package/dist/components/popover/types.d.ts +0 -20
  41. package/dist/components/popover/types.js +0 -1
  42. package/dist/components/separator/separator.css +0 -46
  43. package/dist/components/separator/separator.svelte +0 -37
  44. package/dist/components/separator/separator.svelte.d.ts +0 -4
  45. package/dist/components/separator/types.d.ts +0 -11
  46. package/dist/components/separator/types.js +0 -1
  47. package/dist/components/tooltip/tooltip.css +0 -124
  48. package/dist/components/tooltip/tooltip.svelte +0 -113
  49. package/dist/components/tooltip/tooltip.svelte.d.ts +0 -4
  50. package/dist/components/tooltip/tooltip.svelte.js +0 -131
  51. package/dist/components/tooltip/types.d.ts +0 -23
  52. package/dist/components/tooltip/types.js +0 -1
  53. package/dist/internal/clickOutside.d.ts +0 -9
  54. package/dist/internal/clickOutside.js +0 -34
  55. package/dist/internal/scroll.d.ts +0 -1
  56. package/dist/internal/scroll.js +0 -6
  57. package/dist/style/variable.css +0 -7
@@ -23,15 +23,6 @@
23
23
  border-color: var(--btn-background);
24
24
  }
25
25
 
26
- .kit-btn .kit-btn-content,
27
- .kit-btn .kit-btn-loading {
28
- display: inline-flex;
29
- align-items: center;
30
- justify-content: center;
31
- white-space: nowrap;
32
- gap: var(--btn-gap);
33
- }
34
-
35
26
  .kit-btn:active:hover,
36
27
  .kit-btn:active:focus {
37
28
  animation: button-click 0s ease-out;
@@ -42,82 +33,59 @@
42
33
  .kit-btn[breakpoint]kit-btn--size-xs {
43
34
  --btn-height: 1.75rem;
44
35
  --btn-multiplier-y: 2;
45
- --btn-gap: 0.25rem;
46
36
  font-size: 0.75rem;
47
- gap: var(--btn-gap);
37
+ gap: 0.25rem;
48
38
  }
49
39
 
50
40
  .kit-btn[breakpoint]kit-btn--size-sm {
51
41
  --btn-height: 2rem;
52
42
  --btn-multiplier-y: 3;
53
- --btn-gap: 0.5rem;
54
43
  font-size: 0.875rem;
55
- gap: var(--btn-gap);
44
+ gap: 0.5rem;
56
45
  }
57
46
 
58
47
  .kit-btn[breakpoint]kit-btn--size-md {
59
48
  --btn-height: 2.25rem;
60
49
  --btn-multiplier-y: 4;
61
- --btn-gap: 0.5rem;
62
50
  font-size: 0.875rem;
63
- gap: var(--btn-gap);
51
+ gap: 0.5rem;
64
52
  }
65
53
 
66
54
  .kit-btn[breakpoint]kit-btn--size-lg {
67
55
  --btn-height: 2.5rem;
68
56
  --btn-multiplier-y: 5;
69
- --btn-gap: 0.5rem;
70
57
  font-size: 1rem;
71
- gap: var(--btn-gap);
58
+ gap: 0.5rem;
72
59
  }
73
60
 
74
61
  .kit-btn[breakpoint]kit-btn--size-xl {
75
62
  --btn-height: 2.75rem;
76
63
  --btn-multiplier-y: 6;
77
- --btn-gap: 0.675rem;
78
64
  font-size: 1.125rem;
79
- gap: var(--btn-gap);
65
+ gap: 0.675rem;
80
66
  }
81
67
 
82
68
  /* density */
83
- .kit-btn:not(.kit-btn--icon)[breakpoint]kit-btn--density-default {
69
+ .kit-btn[breakpoint]kit-btn--density-default {
84
70
  height: calc(var(--btn-height));
85
71
  min-width: calc(var(--btn-height));
86
72
  --btn-spacing-x: 0;
87
73
  --btn-spacing-y: calc(var(--kit-spacing) * var(--btn-multiplier-y));
88
74
  }
89
- .kit-btn.kit-btn--icon[breakpoint]kit-btn--density-default {
90
- height: calc(var(--btn-height));
91
- width: calc(var(--btn-height));
92
- --btn-spacing-x: 0;
93
- --btn-spacing-y: 0;
94
- }
95
75
 
96
- .kit-btn:not(.kit-btn--icon)[breakpoint]kit-btn--density-compact {
76
+ .kit-btn[breakpoint]kit-btn--density-compact {
97
77
  height: calc(var(--btn-height) - 0.25rem);
98
78
  min-width: calc(var(--btn-height - 0.25rem));
99
79
  --btn-spacing-x: 0;
100
80
  --btn-spacing-y: calc(var(--kit-spacing) * var(--btn-multiplier-y) - 0.25rem);
101
81
  }
102
- .kit-btn.kit-btn--icon[breakpoint]kit-btn--density-compact {
103
- height: calc(var(--btn-height) - 0.25rem);
104
- width: calc(var(--btn-height) - 0.25rem);
105
- --btn-spacing-x: 0;
106
- --btn-spacing-y: 0;
107
- }
108
82
 
109
- .kit-btn:not(.kit-btn--icon)[breakpoint]kit-btn--density-comfortable {
83
+ .kit-btn[breakpoint]kit-btn--density-comfortable {
110
84
  height: calc(var(--btn-height) + 0.25rem);
111
85
  min-width: calc(var(--btn-height) + 0.25rem);
112
86
  --btn-spacing-x: 0;
113
87
  --btn-spacing-y: calc(var(--kit-spacing) * var(--btn-multiplier-y) + 0.25rem);
114
88
  }
115
- .kit-btn.kit-btn--icon[breakpoint]kit-btn--density-comfortable {
116
- height: calc(var(--btn-height) + 0.25rem);
117
- width: calc(var(--btn-height) + 0.25rem);
118
- --btn-spacing-x: 0;
119
- --btn-spacing-y: 0;
120
- }
121
89
 
122
90
  /* variant */
123
91
  .kit-btn[breakpoint]kit-btn--variant-outline {
@@ -265,12 +233,8 @@ input.kit-btn[disabled] {
265
233
  }
266
234
  .kit-btn.kit-btn--loading > .kit-btn-content {
267
235
  color: transparent;
268
- opacity: 0;
269
236
  }
270
237
  .kit-btn.kit-btn--loading > .kit-btn-loading {
271
238
  position: absolute;
272
239
  min-width: fit-content;
273
240
  }
274
- .kit-btn.kit-btn--loading > .kit-btn-loading .kit-icon-load {
275
- animation: icon-rotate 1s ease-out infinite;
276
- }
@@ -1,11 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { getAssets } from '../../internal/index.js';
3
- import Icon from '../icon/icon.svelte';
4
3
  import type { BtnProps } from './types.js';
5
4
 
6
- // external
7
- import LoadingFill from '../../assets/icons/loading-fill.svelte';
8
-
9
5
  let {
10
6
  children,
11
7
  ref = $bindable(),
@@ -28,8 +24,6 @@
28
24
  label,
29
25
  loading,
30
26
  rounded,
31
- icon,
32
- load,
33
27
  ...rest
34
28
  }: BtnProps = $props();
35
29
 
@@ -62,7 +56,6 @@
62
56
  disabled && 'kit-btn--disabled',
63
57
  active && 'kit-btn--active',
64
58
  loading && 'kit-btn--loading',
65
- icon && 'kit-btn--icon',
66
59
  rest.class
67
60
  ]}
68
61
  tabindex={href && disabled ? -1 : 0}
@@ -76,13 +69,7 @@
76
69
  >
77
70
  {#if loading}
78
71
  <div class="kit-btn-loading">
79
- {#if load}
80
- {@render load?.()}
81
- {:else}
82
- <Icon class="kit-icon-load">
83
- <LoadingFill />
84
- </Icon>
85
- {/if}
72
+ <div>loading ...</div>
86
73
  </div>
87
74
  {/if}
88
75
 
@@ -1,5 +1,4 @@
1
1
  import type { Component } from '../../internal/types.js';
2
- import type { Snippet } from 'svelte';
3
2
  export interface BtnProps extends Component {
4
3
  ref?: HTMLElement | null;
5
4
  is?: 'button' | 'a' | 'input';
@@ -22,6 +21,4 @@ export interface BtnProps extends Component {
22
21
  };
23
22
  type?: 'button' | 'submit' | 'reset' | 'radio' | 'checkbox';
24
23
  label?: string;
25
- icon?: boolean;
26
- load?: Snippet;
27
24
  }
@@ -1,9 +1,2 @@
1
1
  export { default as App } from './app/app.svelte';
2
2
  export { default as Btn } from './button/button.svelte';
3
- export { default as Icon } from './icon/icon.svelte';
4
- export { default as Dropdown } from './dropdown/dropdown.svelte';
5
- export { default as Popover } from './popover/popover.svelte';
6
- export { default as Tooltip } from './tooltip/tooltip.svelte';
7
- export { default as Dialog } from './dialog/dialog.svelte';
8
- export { default as Separator } from './separator/separator.svelte';
9
- export { default as Modal } from './modal/modal.svelte';
@@ -1,10 +1,3 @@
1
1
  // components
2
2
  export { default as App } from './app/app.svelte';
3
3
  export { default as Btn } from './button/button.svelte';
4
- export { default as Icon } from './icon/icon.svelte';
5
- export { default as Dropdown } from './dropdown/dropdown.svelte';
6
- export { default as Popover } from './popover/popover.svelte';
7
- export { default as Tooltip } from './tooltip/tooltip.svelte';
8
- export { default as Dialog } from './dialog/dialog.svelte';
9
- export { default as Separator } from './separator/separator.svelte';
10
- export { default as Modal } from './modal/modal.svelte';
@@ -4,5 +4,4 @@ export declare function getAssets(): {
4
4
  [key: string]: string;
5
5
  }): string | undefined;
6
6
  color(color?: string): string | undefined;
7
- unit(value?: string | number): string | undefined;
8
7
  };
@@ -36,17 +36,6 @@ export function getAssets() {
36
36
  return color;
37
37
  return `var(--kit-${color})`;
38
38
  }
39
- },
40
- unit(value) {
41
- if (typeof value === 'number')
42
- return `${value}px`;
43
- if (typeof value === 'string') {
44
- const cleaned = value.trim();
45
- const isOnlyNumericLike = /^[\d.,]+$/.test(cleaned);
46
- if (isOnlyNumericLike)
47
- return `${value}px`;
48
- }
49
- return value;
50
39
  }
51
40
  };
52
41
  }
@@ -1,4 +1,3 @@
1
1
  export * from './terminal.js';
2
2
  export * from './ansi.js';
3
3
  export * from './assets.svelte.js';
4
- export * from './scroll.js';
@@ -1,4 +1,3 @@
1
1
  export * from './terminal.js';
2
2
  export * from './ansi.js';
3
3
  export * from './assets.svelte.js';
4
- export * from './scroll.js';
@@ -9,12 +9,3 @@
9
9
  transform: scale(1);
10
10
  }
11
11
  }
12
-
13
- @keyframes icon-rotate {
14
- 0% {
15
- transform: rotate(10deg);
16
- }
17
- 100% {
18
- transform: rotate(380deg);
19
- }
20
- }
package/dist/style/css.js CHANGED
@@ -11,7 +11,6 @@ const __dirname = dirname(__filename);
11
11
  export const processCSS = async (config) => {
12
12
  const _normalize = fs.readFileSync(path.resolve(__dirname, './normalize.css'), 'utf-8');
13
13
  const _animation = fs.readFileSync(path.resolve(__dirname, './animation.css'), 'utf-8');
14
- const _variables = fs.readFileSync(path.resolve(__dirname, './variable.css'), 'utf-8');
15
14
  let styles = ``;
16
15
  if (config.options.normalize)
17
16
  styles += `${_normalize}\n`;
@@ -20,8 +19,6 @@ export const processCSS = async (config) => {
20
19
  const variablesStyles = variables(config);
21
20
  styles += `${colorScheme.root}\n`;
22
21
  styles += `${variablesStyles}\n`;
23
- styles += `${variablesStyles}\n`;
24
- styles += `${_variables}\n`;
25
22
  styles += `${colorScheme.className}\n`;
26
23
  styles += `${deviceDisplay}\n`;
27
24
  styles += component(config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lapikit",
3
- "version": "0.0.0-insiders.de81aed",
3
+ "version": "0.0.0-insiders.e330f8d",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,29 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
2
- ><defs
3
- ><linearGradient id="a" x1="50%" x2="50%" y1="5.271%" y2="91.793%"
4
- ><stop offset="0%" stop-color="currentColor" /><stop
5
- offset="100%"
6
- stop-color="currentColor"
7
- stop-opacity=".55"
8
- /></linearGradient
9
- ><linearGradient id="b" x1="50%" x2="50%" y1="15.24%" y2="87.15%"
10
- ><stop offset="0%" stop-color="currentColor" stop-opacity="0" /><stop
11
- offset="100%"
12
- stop-color="currentColor"
13
- stop-opacity=".55"
14
- /></linearGradient
15
- ></defs
16
- ><g fill="none"
17
- ><path
18
- d="M24 0v24H0V0zM12.593 23.258l-.011.002-.071.035-.02.004-.014-.004-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01-.017.428.005.02.01.013.104.074.015.004.012-.004.104-.074.012-.016.004-.017-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113-.013.002-.185.093-.01.01-.003.011.018.43.005.012.008.007.201.093c.012.004.023 0 .029-.008l.004-.014-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014-.034.614c0 .012.007.02.017.024l.015-.002.201-.093.01-.008.004-.011.017-.43-.003-.012-.01-.01z"
19
- /><path
20
- fill="url(#a)"
21
- d="M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.502 7.502 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021"
22
- transform="translate(1.5 1.625)"
23
- /><path
24
- fill="url(#b)"
25
- d="M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.475 10.475 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084 1.5 1.5 0 0 1-.115-2.118"
26
- transform="translate(1.5 1.625)"
27
- /></g
28
- ></svg
29
- >
@@ -1,26 +0,0 @@
1
- export default LoadingFill;
2
- type LoadingFill = SvelteComponent<{
3
- [x: string]: never;
4
- }, {
5
- [evt: string]: CustomEvent<any>;
6
- }, {}> & {
7
- $$bindings?: string | undefined;
8
- };
9
- declare const LoadingFill: $$__sveltets_2_IsomorphicComponent<{
10
- [x: string]: never;
11
- }, {
12
- [evt: string]: CustomEvent<any>;
13
- }, {}, {}, string>;
14
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
- new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
- $$bindings?: Bindings;
17
- } & Exports;
18
- (internal: unknown, props: {
19
- $$events?: Events;
20
- $$slots?: Slots;
21
- }): Exports & {
22
- $set?: any;
23
- $on?: any;
24
- };
25
- z_$$bindings?: Bindings;
26
- }
@@ -1,143 +0,0 @@
1
- .kit-dialog {
2
- border: 0;
3
- padding: 0;
4
- margin: auto;
5
- width: 100%;
6
- max-width: none;
7
- background-color: transparent;
8
- color: inherit;
9
- }
10
-
11
- .kit-dialog[open] {
12
- pointer-events: auto;
13
- visibility: visible;
14
- opacity: 1;
15
- }
16
-
17
- .kit-dialog::backdrop {
18
- background-color: color-mix(in oklab, var(--kit-shadow) 30%, transparent);
19
- animation: fade 0.2s ease-out;
20
- }
21
- .kit-dialog[open]::backdrop {
22
- animation: fade 0.2s ease-out;
23
- }
24
-
25
- .kit-dialog .kit-dialog-container {
26
- --dialog-color: var(--on, var(--kit-on-neutral));
27
- --dialog-background: var(--base, var(--kit-neutral));
28
- --dialog-radius: var(--shape, var(--kit-radius-md));
29
-
30
- border-radius: var(--dialog-radius);
31
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
32
- transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
33
- transition-duration: 0.2s;
34
- padding-top: var(--dialog-spacing-x);
35
- padding-bottom: var(--dialog-spacing-x);
36
- padding-right: var(--dialog-spacing-y);
37
- padding-left: var(--dialog-spacing-y);
38
-
39
- /* theme */
40
- color: var(--dialog-color);
41
- background-color: var(--dialog-background);
42
- border-color: var(--dialog-background);
43
- }
44
-
45
- .kit-dialog[class*='kit-dialog--size-full'] .kit-dialog-container {
46
- height: 100%;
47
- }
48
-
49
- .kit-dialog .close-dialog {
50
- opacity: 0;
51
- position: fixed;
52
- top: 0;
53
- z-index: -1;
54
- }
55
-
56
- .kit-dialog[breakpoint]kit-dialog--position-bottom {
57
- margin-bottom: 0;
58
- margin-top: auto;
59
- }
60
-
61
- .kit-dialog[breakpoint]kit-dialog--position-top {
62
- margin-top: 0;
63
- margin-bottom: auto;
64
- }
65
-
66
- .kit-dialog[breakpoint]kit-dialog--position-center {
67
- margin: auto;
68
- }
69
-
70
- .kit-dialog[breakpoint]kit-dialog--size-xs {
71
- max-width: var(--kit-dialog-size-xs);
72
- }
73
-
74
- .kit-dialog[breakpoint]kit-dialog--size-sm {
75
- max-width: var(--kit-dialog-size-sm);
76
- height: fit-content;
77
- }
78
-
79
- .kit-dialog[breakpoint]kit-dialog--size-md {
80
- max-width: var(--kit-dialog-size-md);
81
- height: fit-content;
82
- }
83
-
84
- .kit-dialog[breakpoint]kit-dialog--size-lg {
85
- max-width: var(--kit-dialog-size-lg);
86
- height: fit-content;
87
- }
88
-
89
- .kit-dialog[breakpoint]kit-dialog--size-xl {
90
- max-width: var(--kit-dialog-size-xl);
91
- height: fit-content;
92
- }
93
-
94
- .kit-dialog[breakpoint]kit-dialog--size-full {
95
- height: 100%;
96
- max-height: 100%;
97
- }
98
-
99
- .kit-dialog[breakpoint]kit-dialog--size-xs .kit-dialog-container {
100
- max-height: calc(100% - 3rem);
101
- margin: 0 auto;
102
- }
103
- .kit-dialog[breakpoint]kit-dialog--size-sm .kit-dialog-container {
104
- max-height: calc(100% - 3rem);
105
- margin: 0 auto;
106
- }
107
- .kit-dialog[breakpoint]kit-dialog--size-md .kit-dialog-container {
108
- max-height: calc(100% - 3rem);
109
- margin: 0 auto;
110
- }
111
- .kit-dialog[breakpoint]kit-dialog--size-lg .kit-dialog-container {
112
- max-height: calc(100% - 3rem);
113
- margin: 0 auto;
114
- }
115
- .kit-dialog[breakpoint]kit-dialog--size-xl .kit-dialog-container {
116
- max-height: calc(100% - 3rem);
117
- margin: 0 auto;
118
- }
119
-
120
- /* density */
121
- .kit-dialog .kit-dialog-container[breakpoint]kit-dialog-container--density-default {
122
- --dialog-spacing-x: 0.5rem;
123
- --dialog-spacing-y: 0.5rem;
124
- }
125
-
126
- .kit-dialog .kit-dialog-container[breakpoint]kit-dialog-container--density-compact {
127
- --dialog-spacing-x: 0.25rem;
128
- --dialog-spacing-y: 0.25rem;
129
- }
130
-
131
- .kit-dialog .kit-dialog-container[breakpoint]kit-dialog-container--density-comfortable {
132
- --dialog-spacing-x: 0.75rem;
133
- --dialog-spacing-y: 0.75rem;
134
- }
135
-
136
- @keyframes fade {
137
- from {
138
- opacity: 0;
139
- }
140
- to {
141
- opacity: 1;
142
- }
143
- }
@@ -1,67 +0,0 @@
1
- <script lang="ts">
2
- import { disabledScroll } from '../../internal/index.js';
3
- import { getAssets } from '../../internal/index.js';
4
- import type { DialogProps } from './types.js';
5
-
6
- let {
7
- children,
8
- ref = $bindable(),
9
- open = $bindable(),
10
- dark,
11
- light,
12
- classContent,
13
- color,
14
- background,
15
- size = 'md',
16
- persistent,
17
- position = 'center',
18
- rounded,
19
- density = 'default',
20
- ...rest
21
- }: DialogProps = $props();
22
-
23
- const assets = getAssets();
24
-
25
- $effect(() => {
26
- if (ref && open) ref.showModal();
27
- if (ref && !open) ref.close();
28
- disabledScroll(open ? true : false);
29
- });
30
- </script>
31
-
32
- <dialog
33
- bind:this={ref}
34
- class={[
35
- 'kit-dialog',
36
- persistent && 'kit-dialog--persistent',
37
- size && assets.className('dialog', 'size', size),
38
- position && assets.className('dialog', 'position', position),
39
- rest.class
40
- ]}
41
- onclose={() => (!persistent ? (open = false) : null)}
42
- onclick={(event: MouseEvent) => {
43
- if (event.target === ref) {
44
- if (!persistent) ref.close();
45
- }
46
- }}
47
- >
48
- <!-- surcharge-dialog autofocus-action-element -->
49
- <button type="button" class="close-dialog">close</button>
50
- <div
51
- {...rest}
52
- class={[
53
- 'kit-dialog-container',
54
- light && 'light',
55
- dark && 'dark',
56
- classContent,
57
- density && assets.className('dialog-container', 'density', density),
58
- rest.class
59
- ]}
60
- onclick={(event: MouseEvent) => event.stopPropagation()}
61
- style:--base={assets.color(background)}
62
- style:--on={assets.color(color)}
63
- style:--shape={assets.shape(rounded)}
64
- >
65
- {@render children?.()}
66
- </div>
67
- </dialog>
@@ -1,4 +0,0 @@
1
- import type { DialogProps } from './types.js';
2
- declare const Dialog: import("svelte").Component<DialogProps, {}, "ref" | "open">;
3
- type Dialog = ReturnType<typeof Dialog>;
4
- export default Dialog;
@@ -1,21 +0,0 @@
1
- import type { Component } from '../../internal/types.js';
2
- type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
- type DialogPosition = 'bottom' | 'center' | 'top';
4
- export interface DialogProps extends Component {
5
- ref?: HTMLDialogElement;
6
- open?: boolean;
7
- classContent?: string | string[] | undefined;
8
- size?: DialogSize | {
9
- [key: string]: DialogSize;
10
- };
11
- persistent?: boolean;
12
- position?: DialogPosition | {
13
- [key: string]: DialogPosition;
14
- };
15
- dark?: boolean;
16
- light?: boolean;
17
- color?: string;
18
- background?: string;
19
- density?: 'compact' | 'comfortable' | 'default';
20
- }
21
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- .kit-dropdown-content {
2
- --dropdown-color: var(--on, var(--kit-on-neutral));
3
- --dropdown-background: var(--base, var(--kit-neutral));
4
- --dropdown-radius: var(--shape, var(--kit-radius-md));
5
-
6
- inset: 0px auto auto 0px;
7
- margin: 0px;
8
- position: fixed;
9
- z-index: 9999;
10
- display: inline-block;
11
- width: auto;
12
- opacity: 1;
13
- transition-property: opacity, transform;
14
- transition:
15
- color 0.5s,
16
- background-color 0.5s;
17
-
18
- /* theme */
19
- background-color: var(--dropdown-background);
20
- color: var(--dropdown-color);
21
- border-radius: var(--dropdown-radius);
22
- }