lapikit 0.0.0-insiders.de81aed → 0.0.0-insiders.e877f7f

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.
@@ -4,6 +4,3 @@ export { default as Icon } from './icon/icon.svelte';
4
4
  export { default as Dropdown } from './dropdown/dropdown.svelte';
5
5
  export { default as Popover } from './popover/popover.svelte';
6
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';
@@ -5,6 +5,3 @@ export { default as Icon } from './icon/icon.svelte';
5
5
  export { default as Dropdown } from './dropdown/dropdown.svelte';
6
6
  export { default as Popover } from './popover/popover.svelte';
7
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';
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.e877f7f",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -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,19 +0,0 @@
1
- .kit-modal {
2
- width: 100%;
3
- height: 100%;
4
- }
5
-
6
- .kit-modal:not(.kit-modal--contain) .kit-modal-overlay {
7
- top: 0;
8
- left: 0;
9
- }
10
-
11
- .kit-modal-overlay {
12
- background-color: var(--kit-shadow);
13
- position: fixed;
14
- }
15
-
16
- .kit-modal-container {
17
- background-color: aliceblue;
18
- color: black;
19
- }
@@ -1,59 +0,0 @@
1
- <script lang="ts">
2
- // import { disabledScroll } from '../../internal/index.js';
3
- // import { getAssets } from '../../internal/index.js';
4
- import type { ModalProps } from './types.js';
5
-
6
- let {
7
- children,
8
- ref = $bindable(),
9
- open = $bindable(),
10
- contain,
11
- // dark,
12
- // light,
13
- // classContent,
14
- // color,
15
- // background,
16
- // size = 'md',
17
- // persistent,
18
- // position = 'center',
19
- // rounded,
20
- // density = 'default',
21
- ...rest
22
- }: ModalProps = $props();
23
-
24
- // const assets = getAssets();
25
-
26
- // $effect(() => {
27
- // if (ref && open) ref.showModal();
28
- // if (ref && !open) ref.close();
29
- // disabledScroll(open ? true : false);
30
- // });
31
- </script>
32
-
33
- {#if open}
34
- <div class={['kit-modal', contain && 'kit-modal--contain', rest.class]}>
35
- <div class="kit-modal-overlay">overlay</div>
36
- <div class="kit-modal-container">
37
- {@render children?.()}
38
- </div>
39
- <!-- surcharge-dialog autofocus-action-element -->
40
- <!-- <button type="button" class="close-dialog">close</button>
41
- <div
42
- {...rest}
43
- class={[
44
- 'kit-modal-container',
45
- light && 'light',
46
- dark && 'dark',
47
- classContent,
48
- density && assets.className('dialog-container', 'density', density),
49
- rest.class
50
- ]}
51
- onclick={(event: MouseEvent) => event.stopPropagation()}
52
- style:--base={assets.color(background)}
53
- style:--on={assets.color(color)}
54
- style:--shape={assets.shape(rounded)}
55
- >
56
- {@render children?.()}
57
- </div> -->
58
- </div>
59
- {/if}
@@ -1,4 +0,0 @@
1
- import type { ModalProps } from './types.js';
2
- declare const Modal: import("svelte").Component<ModalProps, {}, "ref" | "open">;
3
- type Modal = ReturnType<typeof Modal>;
4
- export default Modal;
@@ -1,21 +0,0 @@
1
- import type { Component } from '../../internal/types.js';
2
- type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
3
- type ModalPosition = 'bottom' | 'center' | 'top';
4
- export interface ModalProps extends Component {
5
- ref?: HTMLDivElement;
6
- open?: boolean;
7
- classContent?: string | string[] | undefined;
8
- size?: ModalSize | {
9
- [key: string]: ModalSize;
10
- };
11
- persistent?: boolean;
12
- position?: ModalPosition | {
13
- [key: string]: ModalPosition;
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,46 +0,0 @@
1
- .kit-separator {
2
- --separator-opacity: var(--opacity, 0.12);
3
- --separator-color: var(--base, var(--kit-scrim));
4
-
5
- display: block;
6
- flex: 1 1 100%;
7
- height: 0px;
8
- max-height: 0px;
9
- opacity: var(--separator-opacity);
10
- transition: inherit;
11
- border-color: var(--separator-color);
12
- transition: border-color 0.5s;
13
- border-style: solid;
14
- }
15
-
16
- .kit-separator:not(.kit-separator--orientation-vertical) {
17
- border-width: var(--border-top-width, thin) 0 0 0;
18
- }
19
-
20
- .kit-separator--orientation-vertical {
21
- align-self: stretch;
22
- border-width: 0 thin 0 0;
23
- display: inline-flex;
24
- height: auto;
25
- margin-left: 0px;
26
- max-height: 100%;
27
- max-width: 0px;
28
- vertical-align: text-bottom;
29
- width: 0px;
30
- border-width: 0 var(--border-right-width, thin) 0 0;
31
- }
32
-
33
- .kit-separator--inset:not(.kit-separator--orientation-vertical) {
34
- max-width: calc(100% - 4.5rem);
35
- margin-inline-start: 4.5rem;
36
- }
37
-
38
- .kit-separator--inset.kit-separator--orientation-vertical {
39
- margin-bottom: 0.5rem;
40
- margin-top: 0.5rem;
41
- max-height: calc(100% - 1rem);
42
- }
43
-
44
- .kit-separator:not(.kit-separator--orientation-vertical) {
45
- width: 100%;
46
- }
@@ -1,37 +0,0 @@
1
- <script lang="ts">
2
- import { getAssets } from '../../internal/index.js';
3
- import type { SeparatorProps } from './types.js';
4
-
5
- let {
6
- is = 'hr',
7
- light,
8
- dark,
9
- inset,
10
- thickness,
11
- orientation = 'horizontal',
12
- opacity,
13
- color,
14
- ...rest
15
- }: SeparatorProps = $props();
16
-
17
- const assets = getAssets();
18
- </script>
19
-
20
- <svelte:element
21
- this={is}
22
- {...rest}
23
- class={[
24
- 'kit-separator',
25
- light && 'light',
26
- dark && 'dark',
27
- inset && 'kit-separator--inset',
28
- orientation && assets.className('separator', 'orientation', orientation),
29
- rest.class
30
- ]}
31
- aria-orientation={orientation}
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}
37
- />
@@ -1,4 +0,0 @@
1
- import type { SeparatorProps } from './types.js';
2
- declare const Separator: import("svelte").Component<SeparatorProps, {}, "">;
3
- type Separator = ReturnType<typeof Separator>;
4
- export default Separator;
@@ -1,11 +0,0 @@
1
- import type { Base } from '../../internal/types.js';
2
- export interface SeparatorProps extends Base {
3
- is?: 'div' | 'hr';
4
- light?: boolean;
5
- dark?: boolean;
6
- inset?: boolean;
7
- thickness?: string;
8
- opacity?: string | number;
9
- color?: string;
10
- orientation?: 'horizontal' | 'vertical';
11
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare function disabledScroll(state: boolean): void;
@@ -1,6 +0,0 @@
1
- import { BROWSER } from 'esm-env';
2
- export function disabledScroll(state) {
3
- if (BROWSER) {
4
- document.body.style.overflow = state ? 'hidden' : '';
5
- }
6
- }
@@ -1,7 +0,0 @@
1
- :root {
2
- --kit-dialog-size-xs: 18.75rem;
3
- --kit-dialog-size-sm: 25rem;
4
- --kit-dialog-size-md: 37.5rem;
5
- --kit-dialog-size-lg: 53.125rem;
6
- --kit-dialog-size-xl: 75rem;
7
- }