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.
- package/dist/@types/actions.d.ts +6 -0
- package/dist/@types/index.d.ts +1 -0
- package/dist/@types/index.js +1 -0
- package/dist/@types/props.d.ts +1 -0
- package/dist/actions.d.ts +2 -0
- package/dist/actions.js +2 -0
- package/dist/animations/ripple.d.ts +1 -1
- package/dist/animations/ripple.js +36 -23
- package/dist/components/app/app.svelte +122 -8
- package/dist/components/card/card.svelte +49 -96
- package/dist/components/card/card.types.d.ts +22 -2
- package/dist/components/card/modules/card-actions.svelte +53 -0
- package/dist/components/card/modules/card-actions.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-container.svelte +51 -0
- package/dist/components/card/modules/card-container.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-content.svelte +56 -0
- package/dist/components/card/modules/card-content.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-media.svelte +52 -0
- package/dist/components/card/modules/card-media.svelte.d.ts +4 -0
- package/dist/components/card/modules/card-title.svelte +56 -0
- package/dist/components/card/modules/card-title.svelte.d.ts +4 -0
- package/dist/components/dialog/dialog.svelte +1 -2
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +5 -0
- package/dist/{@legacy/stores/components.d.ts → components/modal/modal.d.ts} +1 -2
- package/dist/{@legacy/stores/components.js → components/modal/modal.js} +1 -1
- package/dist/components/modal/modal.svelte +1 -1
- package/dist/components/textfield/textfield.svelte.d.ts +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +8 -3
- package/dist/utils/components.d.ts +1 -0
- package/dist/utils/components.js +16 -0
- package/dist/utils/outside.d.ts +1 -0
- package/dist/utils/outside.js +5 -0
- package/dist/{@legacy/stores → utils}/themes.d.ts +1 -0
- package/dist/{@legacy/actions/use-theme.js → utils/themes.js} +4 -1
- package/package.json +11 -32
- package/dist/@legacy/actions/accordion.svelte.d.ts +0 -9
- package/dist/@legacy/actions/index.d.ts +0 -2
- package/dist/@legacy/actions/index.js +0 -2
- package/dist/@legacy/actions/use-theme.d.ts +0 -1
- package/dist/@legacy/assets/icons/arrow-down.svelte +0 -12
- package/dist/@legacy/assets/icons/arrow-down.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/arrow-up.svelte +0 -12
- package/dist/@legacy/assets/icons/arrow-up.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/close-fill.svelte +0 -12
- package/dist/@legacy/assets/icons/close-fill.svelte.d.ts +0 -18
- package/dist/@legacy/assets/icons/loading-fill.svelte +0 -31
- package/dist/@legacy/assets/icons/loading-fill.svelte.d.ts +0 -18
- package/dist/@legacy/components/accordion/accordion.css +0 -36
- package/dist/@legacy/components/accordion/accordion.svelte +0 -39
- package/dist/@legacy/components/accordion/accordion.svelte.d.ts +0 -4
- package/dist/@legacy/components/accordion/modules/accordion-item.css +0 -68
- package/dist/@legacy/components/accordion/modules/accordion-item.svelte +0 -94
- package/dist/@legacy/components/accordion/modules/accordion-item.svelte.d.ts +0 -4
- package/dist/@legacy/components/accordion/types.d.ts +0 -33
- package/dist/@legacy/components/alert/alert.css +0 -130
- package/dist/@legacy/components/alert/alert.svelte +0 -89
- package/dist/@legacy/components/alert/alert.svelte.d.ts +0 -4
- package/dist/@legacy/components/alert/types.d.ts +0 -28
- package/dist/@legacy/components/alert/types.js +0 -1
- package/dist/@legacy/components/app/app.css +0 -26
- package/dist/@legacy/components/app/app.svelte +0 -79
- package/dist/@legacy/components/app/app.svelte.d.ts +0 -4
- package/dist/@legacy/components/app/types.d.ts +0 -10
- package/dist/@legacy/components/app/types.js +0 -1
- package/dist/@legacy/components/appbar/appbar.css +0 -38
- package/dist/@legacy/components/appbar/appbar.svelte +0 -40
- package/dist/@legacy/components/appbar/appbar.svelte.d.ts +0 -4
- package/dist/@legacy/components/appbar/types.d.ts +0 -15
- package/dist/@legacy/components/appbar/types.js +0 -1
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.css +0 -19
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte +0 -25
- package/dist/@legacy/components/aspect-ratio/aspect-ratio.svelte.d.ts +0 -4
- package/dist/@legacy/components/aspect-ratio/types.d.ts +0 -5
- package/dist/@legacy/components/aspect-ratio/types.js +0 -1
- package/dist/@legacy/components/avatar/avatar.css +0 -102
- package/dist/@legacy/components/avatar/avatar.svelte +0 -46
- package/dist/@legacy/components/avatar/avatar.svelte.d.ts +0 -4
- package/dist/@legacy/components/avatar/types.d.ts +0 -22
- package/dist/@legacy/components/avatar/types.js +0 -1
- package/dist/@legacy/components/button/button.css +0 -240
- package/dist/@legacy/components/button/button.svelte +0 -102
- package/dist/@legacy/components/button/button.svelte.d.ts +0 -4
- package/dist/@legacy/components/button/types.d.ts +0 -29
- package/dist/@legacy/components/button/types.js +0 -1
- package/dist/@legacy/components/card/card.css +0 -105
- package/dist/@legacy/components/card/card.svelte +0 -67
- package/dist/@legacy/components/card/card.svelte.d.ts +0 -4
- package/dist/@legacy/components/card/types.d.ts +0 -20
- package/dist/@legacy/components/card/types.js +0 -1
- package/dist/@legacy/components/chip/chip.css +0 -224
- package/dist/@legacy/components/chip/chip.svelte +0 -131
- package/dist/@legacy/components/chip/chip.svelte.d.ts +0 -4
- package/dist/@legacy/components/chip/types.d.ts +0 -32
- package/dist/@legacy/components/chip/types.js +0 -1
- package/dist/@legacy/components/dialog/dialog.css +0 -129
- package/dist/@legacy/components/dialog/dialog.svelte +0 -67
- package/dist/@legacy/components/dialog/dialog.svelte.d.ts +0 -4
- package/dist/@legacy/components/dialog/types.d.ts +0 -24
- package/dist/@legacy/components/dialog/types.js +0 -1
- package/dist/@legacy/components/dropdown/dropdown.css +0 -13
- package/dist/@legacy/components/dropdown/dropdown.svelte +0 -115
- package/dist/@legacy/components/dropdown/dropdown.svelte.d.ts +0 -4
- package/dist/@legacy/components/dropdown/types.d.ts +0 -26
- package/dist/@legacy/components/dropdown/types.js +0 -1
- package/dist/@legacy/components/icon/icon.css +0 -78
- package/dist/@legacy/components/icon/icon.svelte +0 -49
- package/dist/@legacy/components/icon/icon.svelte.d.ts +0 -4
- package/dist/@legacy/components/icon/types.d.ts +0 -16
- package/dist/@legacy/components/icon/types.js +0 -1
- package/dist/@legacy/components/index.d.ts +0 -22
- package/dist/@legacy/components/index.js +0 -23
- package/dist/@legacy/components/list/list.css +0 -149
- package/dist/@legacy/components/list/list.svelte +0 -44
- package/dist/@legacy/components/list/list.svelte.d.ts +0 -4
- package/dist/@legacy/components/list/modules/list-item.css +0 -67
- package/dist/@legacy/components/list/modules/list-item.svelte +0 -76
- package/dist/@legacy/components/list/modules/list-item.svelte.d.ts +0 -4
- package/dist/@legacy/components/list/types.d.ts +0 -33
- package/dist/@legacy/components/list/types.js +0 -1
- package/dist/@legacy/components/modal/modal.css +0 -137
- package/dist/@legacy/components/modal/modal.svelte +0 -118
- package/dist/@legacy/components/modal/modal.svelte.d.ts +0 -4
- package/dist/@legacy/components/modal/types.d.ts +0 -26
- package/dist/@legacy/components/modal/types.js +0 -1
- package/dist/@legacy/components/popover/popover.css +0 -13
- package/dist/@legacy/components/popover/popover.svelte +0 -73
- package/dist/@legacy/components/popover/popover.svelte.d.ts +0 -4
- package/dist/@legacy/components/popover/types.d.ts +0 -20
- package/dist/@legacy/components/popover/types.js +0 -1
- package/dist/@legacy/components/separator/separator.css +0 -42
- package/dist/@legacy/components/separator/separator.svelte +0 -37
- package/dist/@legacy/components/separator/separator.svelte.d.ts +0 -4
- package/dist/@legacy/components/separator/types.d.ts +0 -15
- package/dist/@legacy/components/separator/types.js +0 -1
- package/dist/@legacy/components/spacer/spacer.css +0 -3
- package/dist/@legacy/components/spacer/spacer.svelte +0 -7
- package/dist/@legacy/components/spacer/spacer.svelte.d.ts +0 -4
- package/dist/@legacy/components/spacer/types.d.ts +0 -4
- package/dist/@legacy/components/spacer/types.js +0 -1
- package/dist/@legacy/components/textfield/textfield.css +0 -298
- package/dist/@legacy/components/textfield/textfield.svelte +0 -193
- package/dist/@legacy/components/textfield/textfield.svelte.d.ts +0 -4
- package/dist/@legacy/components/textfield/types.d.ts +0 -37
- package/dist/@legacy/components/textfield/types.js +0 -1
- package/dist/@legacy/components/toolbar/toolbar.css +0 -106
- package/dist/@legacy/components/toolbar/toolbar.svelte +0 -47
- package/dist/@legacy/components/toolbar/toolbar.svelte.d.ts +0 -4
- package/dist/@legacy/components/toolbar/types.d.ts +0 -27
- package/dist/@legacy/components/toolbar/types.js +0 -1
- package/dist/@legacy/components/tooltip/tooltip.css +0 -116
- package/dist/@legacy/components/tooltip/tooltip.svelte +0 -113
- package/dist/@legacy/components/tooltip/tooltip.svelte.d.ts +0 -4
- package/dist/@legacy/components/tooltip/types.d.ts +0 -23
- package/dist/@legacy/components/tooltip/types.js +0 -1
- package/dist/@legacy/index.d.ts +0 -3
- package/dist/@legacy/index.js +0 -24
- package/dist/@legacy/internal/config/presets.d.ts +0 -149
- package/dist/@legacy/internal/config/presets.js +0 -169
- package/dist/@legacy/internal/config/variables.d.ts +0 -3
- package/dist/@legacy/internal/config/variables.js +0 -3
- package/dist/@legacy/internal/core/actions/assets.svelte.d.ts +0 -8
- package/dist/@legacy/internal/core/actions/assets.svelte.js +0 -54
- package/dist/@legacy/internal/core/actions/dropdown.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/dropdown.svelte.js +0 -148
- package/dist/@legacy/internal/core/actions/popover.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/popover.svelte.js +0 -134
- package/dist/@legacy/internal/core/actions/tooltip.svelte.d.ts +0 -7
- package/dist/@legacy/internal/core/actions/tooltip.svelte.js +0 -131
- package/dist/@legacy/internal/core/animations/ripple.d.ts +0 -12
- package/dist/@legacy/internal/core/animations/ripple.js +0 -96
- package/dist/@legacy/internal/core/bin/ansi.d.ts +0 -40
- package/dist/@legacy/internal/core/bin/ansi.js +0 -44
- package/dist/@legacy/internal/core/bin/terminal.d.ts +0 -1
- package/dist/@legacy/internal/core/bin/terminal.js +0 -12
- package/dist/@legacy/internal/core/css.d.ts +0 -1
- package/dist/@legacy/internal/core/css.js +0 -16
- package/dist/@legacy/internal/core/formatter/component.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/component.js +0 -60
- package/dist/@legacy/internal/core/formatter/device.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/device.js +0 -66
- package/dist/@legacy/internal/core/formatter/index.d.ts +0 -7
- package/dist/@legacy/internal/core/formatter/index.js +0 -35
- package/dist/@legacy/internal/core/formatter/style.d.ts +0 -4
- package/dist/@legacy/internal/core/formatter/style.js +0 -15
- package/dist/@legacy/internal/core/formatter/theme.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/theme.js +0 -44
- package/dist/@legacy/internal/core/formatter/typography.d.ts +0 -5
- package/dist/@legacy/internal/core/formatter/typography.js +0 -12
- package/dist/@legacy/internal/core/minify.d.ts +0 -1
- package/dist/@legacy/internal/core/minify.js +0 -10
- package/dist/@legacy/internal/core/standard-colors.d.ts +0 -75
- package/dist/@legacy/internal/core/standard-colors.js +0 -75
- package/dist/@legacy/internal/core/x11-colors.d.ts +0 -4
- package/dist/@legacy/internal/core/x11-colors.js +0 -151
- package/dist/@legacy/internal/helpers/colors.d.ts +0 -1
- package/dist/@legacy/internal/helpers/colors.js +0 -50
- package/dist/@legacy/internal/helpers/convert.d.ts +0 -1
- package/dist/@legacy/internal/helpers/convert.js +0 -17
- package/dist/@legacy/internal/helpers/deep-merge.d.ts +0 -44
- package/dist/@legacy/internal/helpers/deep-merge.js +0 -80
- package/dist/@legacy/internal/helpers/outside.d.ts +0 -9
- package/dist/@legacy/internal/helpers/outside.js +0 -34
- package/dist/@legacy/internal/helpers/parser.d.ts +0 -10
- package/dist/@legacy/internal/helpers/parser.js +0 -93
- package/dist/@legacy/internal/helpers/scroll.d.ts +0 -1
- package/dist/@legacy/internal/helpers/scroll.js +0 -5
- package/dist/@legacy/internal/plugins/vite.d.ts +0 -8
- package/dist/@legacy/internal/plugins/vite.js +0 -33
- package/dist/@legacy/internal/types/components.d.ts +0 -14
- package/dist/@legacy/internal/types/components.js +0 -1
- package/dist/@legacy/internal/types/configuration.d.ts +0 -63
- package/dist/@legacy/internal/types/configuration.js +0 -1
- package/dist/@legacy/internal/types/index.d.ts +0 -2
- package/dist/@legacy/internal/types/index.js +0 -2
- package/dist/@legacy/stores/breakpoints.d.ts +0 -6
- package/dist/@legacy/stores/breakpoints.js +0 -14
- package/dist/@legacy/stores/devices.d.ts +0 -6
- package/dist/@legacy/stores/devices.js +0 -9
- package/dist/@legacy/stores/index.d.ts +0 -5
- package/dist/@legacy/stores/index.js +0 -5
- package/dist/@legacy/stores/themes.js +0 -4
- package/dist/@legacy/stores/viewport.d.ts +0 -7
- package/dist/@legacy/stores/viewport.js +0 -7
- package/dist/@legacy/styles/animation.css +0 -33
- package/dist/@legacy/styles/keyframes.css +0 -30
- package/dist/@legacy/styles/reset.css +0 -133
- package/dist/@legacy/styles.css +0 -0
- package/dist/@legacy/styles.css.d.ts +0 -4
- package/dist/@legacy/themes.css +0 -0
- package/dist/@legacy/themes.css.d.ts +0 -4
- /package/dist/{@legacy/components/accordion/types.js → @types/actions.js} +0 -0
- /package/dist/{@legacy/actions → components/accordion}/accordion.svelte.js +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export function clickOutside(node, options) {
|
|
2
|
-
let { exclude = [], onClose } = options;
|
|
3
|
-
function isTargetExcluded(target) {
|
|
4
|
-
return exclude.some((ex) => {
|
|
5
|
-
if (!ex)
|
|
6
|
-
return false;
|
|
7
|
-
if (ex instanceof HTMLElement) {
|
|
8
|
-
return ex.contains(target);
|
|
9
|
-
}
|
|
10
|
-
if (ex instanceof PointerEvent && ex.target instanceof Node) {
|
|
11
|
-
return ex.target.contains(target);
|
|
12
|
-
}
|
|
13
|
-
return false;
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
const handleClick = (event) => {
|
|
17
|
-
const target = event.target;
|
|
18
|
-
const isExcluded = isTargetExcluded(target);
|
|
19
|
-
const isInside = node.contains(target);
|
|
20
|
-
if (!isInside && !isExcluded) {
|
|
21
|
-
onClose();
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
document.addEventListener('click', handleClick, true);
|
|
25
|
-
return {
|
|
26
|
-
update(newOptions) {
|
|
27
|
-
exclude = newOptions.exclude || [];
|
|
28
|
-
onClose = newOptions.onClose;
|
|
29
|
-
},
|
|
30
|
-
destroy() {
|
|
31
|
-
document.removeEventListener('click', handleClick, true);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const parserValues: (value: string | number | Array<string | number>) => string;
|
|
2
|
-
export declare const parserCSSBreakpoints: (css: string) => {
|
|
3
|
-
all: string;
|
|
4
|
-
base: string;
|
|
5
|
-
min: string;
|
|
6
|
-
max: string;
|
|
7
|
-
minmax: string;
|
|
8
|
-
cleaned: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const parserConfigLapikit: (app: string, filePath: string) => Promise<{}>;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import { terminal } from '../core/bin/terminal.js';
|
|
4
|
-
export const parserValues = (value) => {
|
|
5
|
-
if (typeof value === 'number')
|
|
6
|
-
return `${value}px`;
|
|
7
|
-
if (Array.isArray(value))
|
|
8
|
-
return value.join(', ');
|
|
9
|
-
return value;
|
|
10
|
-
};
|
|
11
|
-
export const parserCSSBreakpoints = (css) => {
|
|
12
|
-
css = css.replace(/\/\*[\s\S]*?\*\//g, ''); // clean comments
|
|
13
|
-
const regex = /([^{]+)\{([^}]+)\}/g;
|
|
14
|
-
let match;
|
|
15
|
-
const matchesToRemove = [];
|
|
16
|
-
const extractedByType = {
|
|
17
|
-
all: [],
|
|
18
|
-
base: [],
|
|
19
|
-
min: [],
|
|
20
|
-
max: [],
|
|
21
|
-
minmax: []
|
|
22
|
-
};
|
|
23
|
-
while ((match = regex.exec(css)) !== null) {
|
|
24
|
-
const fullMatch = match[0];
|
|
25
|
-
const selectors = match[1].trim();
|
|
26
|
-
const body = match[2].trim();
|
|
27
|
-
const selectorsArray = selectors.split(',').map((sel) => sel.trim());
|
|
28
|
-
let matchedType = null;
|
|
29
|
-
if (selectorsArray.some((sel) => sel.includes('[breakpoint|min]'))) {
|
|
30
|
-
matchedType = 'min';
|
|
31
|
-
}
|
|
32
|
-
else if (selectorsArray.some((sel) => sel.includes('[breakpoint|max]'))) {
|
|
33
|
-
matchedType = 'max';
|
|
34
|
-
}
|
|
35
|
-
else if (selectorsArray.some((sel) => sel.includes('[breakpoint|all]'))) {
|
|
36
|
-
matchedType = 'minmax';
|
|
37
|
-
}
|
|
38
|
-
else if (selectorsArray.some((sel) => sel.includes('[breakpoint]'))) {
|
|
39
|
-
matchedType = 'base';
|
|
40
|
-
}
|
|
41
|
-
if (matchedType) {
|
|
42
|
-
const rule = `${selectors} {\n${body}\n}`;
|
|
43
|
-
extractedByType.all.push(rule);
|
|
44
|
-
extractedByType[matchedType].push(rule);
|
|
45
|
-
matchesToRemove.push(fullMatch);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
let cleaned = css;
|
|
49
|
-
for (const rule of matchesToRemove) {
|
|
50
|
-
cleaned = cleaned.replace(rule, '').replace(/\n{2,}/g, '\n\n');
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
all: extractedByType.all
|
|
54
|
-
? extractedByType.all
|
|
55
|
-
.join('\n\n')
|
|
56
|
-
.replaceAll('[breakpoint|min]', '[breakpoint]')
|
|
57
|
-
.replaceAll('[breakpoint|max]', '[breakpoint]')
|
|
58
|
-
.replaceAll('[breakpoint|all]', '[breakpoint]')
|
|
59
|
-
.trim()
|
|
60
|
-
: '',
|
|
61
|
-
base: extractedByType.base ? extractedByType.base.join('\n\n').trim() : '',
|
|
62
|
-
min: extractedByType.min
|
|
63
|
-
? extractedByType.min.join('\n\n').replaceAll('[breakpoint|min]', '[breakpoint]').trim()
|
|
64
|
-
: '',
|
|
65
|
-
max: extractedByType.max
|
|
66
|
-
? extractedByType.max.join('\n\n').replaceAll('[breakpoint|max]', '[breakpoint]').trim()
|
|
67
|
-
: '',
|
|
68
|
-
minmax: extractedByType.minmax
|
|
69
|
-
? extractedByType.minmax.join('\n\n').replaceAll('[breakpoint|all]', '[breakpoint]').trim()
|
|
70
|
-
: '',
|
|
71
|
-
cleaned: cleaned.trim()
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
export const parserConfigLapikit = async (app, filePath) => {
|
|
75
|
-
const pathConfig = path.resolve(app, filePath);
|
|
76
|
-
if (!fs.existsSync(pathConfig))
|
|
77
|
-
process.exit(1);
|
|
78
|
-
const code = fs.readFileSync(pathConfig, 'utf-8');
|
|
79
|
-
const match = code.match(/createLapikit\s*\(\s*({[\s\S]*?})\s*\)/);
|
|
80
|
-
let options = {};
|
|
81
|
-
if (match && match[1]) {
|
|
82
|
-
try {
|
|
83
|
-
options = new Function('return ' + match[1])();
|
|
84
|
-
}
|
|
85
|
-
catch (e) {
|
|
86
|
-
terminal('error', `Error parsing lapikit config: ${e}`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
terminal('error', 'lapikit configuration not found please refer to the documentation https://lapikit.dev/docs/getting-started');
|
|
91
|
-
}
|
|
92
|
-
return options;
|
|
93
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function disabledScroll(state: boolean): void;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'url';
|
|
2
|
-
import { dirname } from 'path';
|
|
3
|
-
import { terminal } from '../core/bin/terminal.js';
|
|
4
|
-
import { liliRabbit } from '../core/formatter/index.js';
|
|
5
|
-
import { parserConfigLapikit } from '../helpers/parser.js';
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const __dirname = dirname(__filename);
|
|
8
|
-
import fsPromises from 'fs/promises';
|
|
9
|
-
import path from 'path';
|
|
10
|
-
import { processImportStyles } from '../core/css.js';
|
|
11
|
-
const app = process.cwd();
|
|
12
|
-
export async function lapikit({ config } = {}) {
|
|
13
|
-
return {
|
|
14
|
-
name: 'lapikit/vite',
|
|
15
|
-
async config() {
|
|
16
|
-
if (config) {
|
|
17
|
-
const configuration = await parserConfigLapikit(app, config);
|
|
18
|
-
// generate styles
|
|
19
|
-
const basicStyles = await processImportStyles();
|
|
20
|
-
fsPromises.writeFile(path.resolve(__dirname, '../../styles.css'), basicStyles || '');
|
|
21
|
-
const styles = await liliRabbit(configuration);
|
|
22
|
-
fsPromises.writeFile(path.resolve(__dirname, '../../themes.css'), styles?.devices +
|
|
23
|
-
'\n\n' +
|
|
24
|
-
styles?.typography +
|
|
25
|
-
'\n\n' +
|
|
26
|
-
styles?.styles +
|
|
27
|
-
'\n\n' +
|
|
28
|
-
styles?.themes || '');
|
|
29
|
-
}
|
|
30
|
-
terminal('info', 'lapikit is up!');
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
type IdElementType = string | undefined;
|
|
3
|
-
type ClassNameType = string | string[] | undefined;
|
|
4
|
-
type StylePropertiesType = string | undefined;
|
|
5
|
-
export interface Base {
|
|
6
|
-
id?: IdElementType;
|
|
7
|
-
class?: ClassNameType;
|
|
8
|
-
style?: StylePropertiesType;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
export interface Component extends Base {
|
|
12
|
-
children?: Snippet;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
export interface LapikitConfiguration {
|
|
2
|
-
breakpoints?: {
|
|
3
|
-
devices?: {
|
|
4
|
-
[key: string]: number | string;
|
|
5
|
-
};
|
|
6
|
-
thresholds?: {
|
|
7
|
-
[key: string]: number | string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
theme?: {
|
|
11
|
-
defaultTheme?: string;
|
|
12
|
-
colorScheme?: boolean;
|
|
13
|
-
themes?: FragThemes;
|
|
14
|
-
};
|
|
15
|
-
typography?: {
|
|
16
|
-
defaultTypography?: string;
|
|
17
|
-
fonts?: FragTypography;
|
|
18
|
-
};
|
|
19
|
-
styles?: FragStyles;
|
|
20
|
-
}
|
|
21
|
-
export interface DevConfiguration {
|
|
22
|
-
breakpoints?: {
|
|
23
|
-
devices?: {
|
|
24
|
-
[key: string]: number | string;
|
|
25
|
-
};
|
|
26
|
-
thresholds?: {
|
|
27
|
-
[key: string]: number | string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
theme?: {
|
|
31
|
-
defaultTheme?: string;
|
|
32
|
-
colorScheme?: boolean;
|
|
33
|
-
themes?: FragThemes;
|
|
34
|
-
};
|
|
35
|
-
typography?: {
|
|
36
|
-
defaultTypography?: string;
|
|
37
|
-
fonts?: FragTypography;
|
|
38
|
-
};
|
|
39
|
-
styles?: FragStyles;
|
|
40
|
-
}
|
|
41
|
-
export interface FragThemes {
|
|
42
|
-
[key: string]: {
|
|
43
|
-
dark?: boolean;
|
|
44
|
-
colors?: {
|
|
45
|
-
[key: string]: {
|
|
46
|
-
[key: string]: string;
|
|
47
|
-
} | string;
|
|
48
|
-
};
|
|
49
|
-
variables?: {
|
|
50
|
-
[key: string]: string | number;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
export interface FragTypography {
|
|
55
|
-
[key: string]: {
|
|
56
|
-
[key: string]: string | string[];
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
export interface FragStyles {
|
|
60
|
-
[key: string]: string | number | {
|
|
61
|
-
[key: string]: string | number;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// store breakpoints and thresholds
|
|
2
|
-
import { writable } from 'svelte/store';
|
|
3
|
-
// presets
|
|
4
|
-
const ref = {
|
|
5
|
-
base: 0, // 0px
|
|
6
|
-
xs: 448, //28rem
|
|
7
|
-
sm: 640, //40rem
|
|
8
|
-
md: 768, //48rem
|
|
9
|
-
lg: 1024, //64rem
|
|
10
|
-
xl: 1280, //80rem
|
|
11
|
-
'2xl': 1536, //96rem
|
|
12
|
-
'3xl': 1792 //112rem
|
|
13
|
-
};
|
|
14
|
-
export const breakpoints = writable(ref);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.kit-ripple {
|
|
2
|
-
background-color: currentColor;
|
|
3
|
-
opacity: 0.1;
|
|
4
|
-
position: absolute;
|
|
5
|
-
border-radius: 50%;
|
|
6
|
-
pointer-events: none;
|
|
7
|
-
-webkit-transition: 0.6s;
|
|
8
|
-
transition: 0.6s;
|
|
9
|
-
-webkit-animation: animation-l-ripple var(--system-animation-ripple-duration, 0.4s)
|
|
10
|
-
cubic-bezier(0.4, 0, 0.2, 1);
|
|
11
|
-
animation: animation-l-ripple var(--system-animation-ripple-duration, 0.4s)
|
|
12
|
-
cubic-bezier(0.4, 0, 0.2, 1);
|
|
13
|
-
border-radius: var(--system-ripple-radius);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.kit-ripple--center {
|
|
17
|
-
top: 50% !important;
|
|
18
|
-
left: 50% !important;
|
|
19
|
-
translate: -50% -50% !important;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.kit-ripple--effect {
|
|
23
|
-
position: absolute;
|
|
24
|
-
left: 0;
|
|
25
|
-
right: 0;
|
|
26
|
-
top: 0;
|
|
27
|
-
bottom: 0;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
background: none;
|
|
30
|
-
pointer-events: none;
|
|
31
|
-
z-index: 999;
|
|
32
|
-
border-radius: var(--system-ripple-radius);
|
|
33
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@keyframes button-click {
|
|
2
|
-
0% {
|
|
3
|
-
transform: scale(0.98);
|
|
4
|
-
}
|
|
5
|
-
40% {
|
|
6
|
-
transform: scale(1.02);
|
|
7
|
-
}
|
|
8
|
-
100% {
|
|
9
|
-
transform: scale(1);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@keyframes icon-rotate {
|
|
14
|
-
0% {
|
|
15
|
-
transform: rotate(10deg);
|
|
16
|
-
}
|
|
17
|
-
100% {
|
|
18
|
-
transform: rotate(380deg);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@keyframes animation-l-ripple {
|
|
23
|
-
from {
|
|
24
|
-
scale: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
to {
|
|
28
|
-
scale: 1;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
html {
|
|
2
|
-
-webkit-text-size-adjust: 100%;
|
|
3
|
-
tab-size: 4;
|
|
4
|
-
line-height: 1.5;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
font-family: var(--kit-font-sans);
|
|
7
|
-
background-color: var(--kit-background-primary);
|
|
8
|
-
color: var(--kit-label-primary);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
pre,
|
|
12
|
-
code {
|
|
13
|
-
font-family: var(--kit-font-mono);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
body {
|
|
17
|
-
margin: 0;
|
|
18
|
-
-webkit-font-smoothing: antialiased;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
main {
|
|
22
|
-
display: block;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
button,
|
|
26
|
-
input,
|
|
27
|
-
optgroup,
|
|
28
|
-
select,
|
|
29
|
-
textarea {
|
|
30
|
-
font: inherit;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
button {
|
|
34
|
-
overflow: visible;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
button,
|
|
38
|
-
[type='button'],
|
|
39
|
-
[type='reset'],
|
|
40
|
-
[type='submit'],
|
|
41
|
-
[role='button'] {
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
color: inherit;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
*:not(body) {
|
|
47
|
-
outline: none;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* bug with tailwind */
|
|
51
|
-
/* *,
|
|
52
|
-
::after,
|
|
53
|
-
::before,
|
|
54
|
-
::backdrop {
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
margin: 0;
|
|
57
|
-
padding: 0;
|
|
58
|
-
border: 0 solid;
|
|
59
|
-
} */
|
|
60
|
-
|
|
61
|
-
*,
|
|
62
|
-
::before,
|
|
63
|
-
::after {
|
|
64
|
-
background-repeat: no-repeat;
|
|
65
|
-
box-sizing: inherit;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
::before,
|
|
69
|
-
::after {
|
|
70
|
-
text-decoration: inherit;
|
|
71
|
-
vertical-align: inherit;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[type='search'] {
|
|
75
|
-
-webkit-appearance: textfield;
|
|
76
|
-
appearance: textfield;
|
|
77
|
-
outline-offset: -2px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
ol,
|
|
81
|
-
ul,
|
|
82
|
-
menu {
|
|
83
|
-
list-style: initial;
|
|
84
|
-
margin-left: calc(var(--system-spacing) * 5);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
ol ul,
|
|
88
|
-
ol ol,
|
|
89
|
-
ul ul,
|
|
90
|
-
ul ol {
|
|
91
|
-
padding-left: 1rem;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
code {
|
|
95
|
-
border-radius: 0.25rem;
|
|
96
|
-
padding-block: 0.125rem;
|
|
97
|
-
padding-inline: 0.375rem;
|
|
98
|
-
position: relative;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
sub,
|
|
102
|
-
sup {
|
|
103
|
-
font-size: 75%;
|
|
104
|
-
line-height: 0;
|
|
105
|
-
position: relative;
|
|
106
|
-
vertical-align: baseline;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
sup {
|
|
110
|
-
top: -0.5em;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
sub {
|
|
114
|
-
bottom: -0.25em;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
img {
|
|
118
|
-
border-style: none;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
button,
|
|
122
|
-
input,
|
|
123
|
-
select,
|
|
124
|
-
textarea {
|
|
125
|
-
background-color: transparent;
|
|
126
|
-
border-style: none;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
130
|
-
html {
|
|
131
|
-
interpolate-size: allow-keywords;
|
|
132
|
-
}
|
|
133
|
-
}
|
package/dist/@legacy/styles.css
DELETED
|
File without changes
|
package/dist/@legacy/themes.css
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|