sve-ui 0.1.2 → 0.2.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/README.md +89 -57
- package/dist/ThemeProvider.svelte +46 -0
- package/dist/ThemeProvider.svelte.d.ts +12 -0
- package/dist/ThemeProvider.svelte.d.ts.map +1 -0
- package/dist/components/Alert/AlertDescription.svelte +31 -0
- package/dist/components/Alert/AlertDescription.svelte.d.ts +10 -0
- package/dist/components/Alert/AlertDescription.svelte.d.ts.map +1 -0
- package/dist/components/Alert/AlertRoot.svelte +103 -0
- package/dist/components/Alert/AlertRoot.svelte.d.ts +29 -0
- package/dist/components/Alert/AlertRoot.svelte.d.ts.map +1 -0
- package/dist/components/Alert/AlertTitle.svelte +34 -0
- package/dist/components/Alert/AlertTitle.svelte.d.ts +12 -0
- package/dist/components/Alert/AlertTitle.svelte.d.ts.map +1 -0
- package/dist/components/Alert/index.d.ts +11 -0
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Alert/index.js +10 -0
- package/dist/components/Avatar/AvatarFallback.svelte +33 -0
- package/dist/components/Avatar/AvatarFallback.svelte.d.ts +12 -0
- package/dist/components/Avatar/AvatarFallback.svelte.d.ts.map +1 -0
- package/dist/components/Avatar/AvatarImage.svelte +27 -0
- package/dist/components/Avatar/AvatarImage.svelte.d.ts +12 -0
- package/dist/components/Avatar/AvatarImage.svelte.d.ts.map +1 -0
- package/dist/components/Avatar/AvatarRoot.svelte +67 -0
- package/dist/components/Avatar/AvatarRoot.svelte.d.ts +16 -0
- package/dist/components/Avatar/AvatarRoot.svelte.d.ts.map +1 -0
- package/dist/components/Avatar/index.d.ts +15 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Avatar/index.js +14 -0
- package/dist/components/Badge/Badge.svelte +125 -0
- package/dist/components/Badge/Badge.svelte.d.ts +37 -0
- package/dist/components/Badge/Badge.svelte.d.ts.map +1 -0
- package/dist/components/Button/Button.svelte +296 -112
- package/dist/components/Button/Button.svelte.d.ts +34 -48
- package/dist/components/Button/Button.svelte.d.ts.map +1 -0
- package/dist/components/Card/CardContent.svelte +33 -0
- package/dist/components/Card/CardContent.svelte.d.ts +10 -0
- package/dist/components/Card/CardContent.svelte.d.ts.map +1 -0
- package/dist/components/Card/CardFooter.svelte +33 -0
- package/dist/components/Card/CardFooter.svelte.d.ts +10 -0
- package/dist/components/Card/CardFooter.svelte.d.ts.map +1 -0
- package/dist/components/Card/CardHeader.svelte +33 -0
- package/dist/components/Card/CardHeader.svelte.d.ts +10 -0
- package/dist/components/Card/CardHeader.svelte.d.ts.map +1 -0
- package/dist/components/Card/CardRoot.svelte +91 -0
- package/dist/components/Card/CardRoot.svelte.d.ts +28 -0
- package/dist/components/Card/CardRoot.svelte.d.ts.map +1 -0
- package/dist/components/Card/index.d.ts +13 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Card/index.js +12 -0
- package/dist/components/Dialog/DialogContent.svelte +47 -0
- package/dist/components/Dialog/DialogContent.svelte.d.ts +10 -0
- package/dist/components/Dialog/DialogContent.svelte.d.ts.map +1 -0
- package/dist/components/Dialog/DialogDescription.svelte +29 -0
- package/dist/components/Dialog/DialogDescription.svelte.d.ts +10 -0
- package/dist/components/Dialog/DialogDescription.svelte.d.ts.map +1 -0
- package/dist/components/Dialog/DialogOverlay.svelte +32 -0
- package/dist/components/Dialog/DialogOverlay.svelte.d.ts +10 -0
- package/dist/components/Dialog/DialogOverlay.svelte.d.ts.map +1 -0
- package/dist/components/Dialog/DialogTitle.svelte +30 -0
- package/dist/components/Dialog/DialogTitle.svelte.d.ts +10 -0
- package/dist/components/Dialog/DialogTitle.svelte.d.ts.map +1 -0
- package/dist/components/Dialog/index.d.ts +21 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Dialog/index.js +22 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.svelte +40 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.svelte.d.ts +10 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.svelte.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuGroup.svelte +18 -0
- package/dist/components/DropdownMenu/DropdownMenuGroup.svelte.d.ts +10 -0
- package/dist/components/DropdownMenu/DropdownMenuGroup.svelte.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.svelte +40 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.svelte.d.ts +10 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.svelte.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuLabel.svelte +34 -0
- package/dist/components/DropdownMenu/DropdownMenuLabel.svelte.d.ts +10 -0
- package/dist/components/DropdownMenu/DropdownMenuLabel.svelte.d.ts.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.svelte +25 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.svelte.d.ts +10 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.svelte.d.ts.map +1 -0
- package/dist/components/DropdownMenu/index.d.ts +31 -0
- package/dist/components/DropdownMenu/index.d.ts.map +1 -0
- package/dist/components/DropdownMenu/index.js +33 -0
- package/dist/components/Heading/Heading.svelte +72 -0
- package/dist/components/Heading/Heading.svelte.d.ts +18 -0
- package/dist/components/Heading/Heading.svelte.d.ts.map +1 -0
- package/dist/components/Input/Input.svelte +151 -0
- package/dist/components/Input/Input.svelte.d.ts +25 -0
- package/dist/components/Input/Input.svelte.d.ts.map +1 -0
- package/dist/components/Popover/PopoverContent.svelte +40 -0
- package/dist/components/Popover/PopoverContent.svelte.d.ts +10 -0
- package/dist/components/Popover/PopoverContent.svelte.d.ts.map +1 -0
- package/dist/components/Popover/index.d.ts +20 -0
- package/dist/components/Popover/index.d.ts.map +1 -0
- package/dist/components/Popover/index.js +21 -0
- package/dist/components/Spinner/Spinner.svelte +82 -0
- package/dist/components/Spinner/Spinner.svelte.d.ts +13 -0
- package/dist/components/Spinner/Spinner.svelte.d.ts.map +1 -0
- package/dist/components/Text/Text.svelte +84 -45
- package/dist/components/Text/Text.svelte.d.ts +20 -44
- package/dist/components/Text/Text.svelte.d.ts.map +1 -0
- package/dist/components/Tooltip/TooltipContent.svelte +41 -0
- package/dist/components/Tooltip/TooltipContent.svelte.d.ts +10 -0
- package/dist/components/Tooltip/TooltipContent.svelte.d.ts.map +1 -0
- package/dist/components/Tooltip/index.d.ts +19 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.js +20 -0
- package/dist/context.d.ts +14 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +16 -0
- package/dist/index.d.ts +28 -26
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -13
- package/dist/internal/variants.d.ts +44 -0
- package/dist/internal/variants.d.ts.map +1 -0
- package/dist/internal/variants.js +54 -0
- package/dist/theme/breakpoints.d.ts +1 -0
- package/dist/theme/breakpoints.d.ts.map +1 -0
- package/dist/theme/index.d.ts +12 -182
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +13 -19
- package/dist/theme/palette.d.ts +153 -0
- package/dist/theme/palette.d.ts.map +1 -0
- package/dist/theme/palette.js +85 -0
- package/dist/theme/radius.d.ts +1 -0
- package/dist/theme/radius.d.ts.map +1 -0
- package/dist/theme/sizes.d.ts +1 -0
- package/dist/theme/sizes.d.ts.map +1 -0
- package/dist/theme/spacing.d.ts +1 -0
- package/dist/theme/spacing.d.ts.map +1 -0
- package/dist/theme/theme.css +268 -0
- package/dist/theme/tokens.d.ts +108 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/theme/tokens.js +236 -0
- package/dist/theme/typography.d.ts +1 -0
- package/dist/theme/typography.d.ts.map +1 -0
- package/package.json +74 -67
- package/dist/components/Box/Box.svelte +0 -48
- package/dist/components/Box/Box.svelte.d.ts +0 -160
- package/dist/components/Center/Center.svelte +0 -15
- package/dist/components/Center/Center.svelte.d.ts +0 -25
- package/dist/components/Circle/Circle.svelte +0 -9
- package/dist/components/Circle/Circle.svelte.d.ts +0 -34
- package/dist/components/CodeExample/CodeExample.svelte +0 -128
- package/dist/components/CodeExample/CodeExample.svelte.d.ts +0 -46
- package/dist/components/Flex/Flex.svelte +0 -26
- package/dist/components/Flex/Flex.svelte.d.ts +0 -34
- package/dist/components/Grid/Grid.svelte +0 -16
- package/dist/components/Grid/Grid.svelte.d.ts +0 -44
- package/dist/components/GridItem/GridItem.svelte +0 -22
- package/dist/components/GridItem/GridItem.svelte.d.ts +0 -29
- package/dist/components/Loaders/DotPulse.svelte +0 -62
- package/dist/components/Loaders/DotPulse.svelte.d.ts +0 -40
- package/dist/components/Loaders/DotSpinner.svelte +0 -121
- package/dist/components/Loaders/DotSpinner.svelte.d.ts +0 -40
- package/dist/components/Loaders/DotWave.svelte +0 -67
- package/dist/components/Loaders/DotWave.svelte.d.ts +0 -40
- package/dist/components/Spacer/Spacer.svelte +0 -5
- package/dist/components/Spacer/Spacer.svelte.d.ts +0 -21
- package/dist/components/Square/Square.svelte +0 -17
- package/dist/components/Square/Square.svelte.d.ts +0 -34
- /package/{LICENCE → LICENSE} +0 -0
package/package.json
CHANGED
|
@@ -1,69 +1,76 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
2
|
+
"name": "sve-ui",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Styled, accessible Svelte 5 components built on Bits UI. No Tailwind, no config — install, import, and theme with CSS variables. Light and dark out of the box.",
|
|
6
|
+
"author": "Rodrigo Abregu <me@rodriab.io> (https://rodriab.io/)",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://sveui.org/",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/rodriabregu/sve-ui.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/rodriabregu/sve-ui/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"components",
|
|
18
|
+
"svelte",
|
|
19
|
+
"kit",
|
|
20
|
+
"ui",
|
|
21
|
+
"vite",
|
|
22
|
+
"component library"
|
|
23
|
+
],
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"svelte": "./dist/index.js",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./theme": {
|
|
31
|
+
"types": "./dist/theme/index.d.ts",
|
|
32
|
+
"svelte": "./dist/theme/index.js",
|
|
33
|
+
"default": "./dist/theme/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./theme.css": {
|
|
36
|
+
"default": "./dist/theme/theme.css"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"svelte": "./dist/index.js",
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"files": [
|
|
42
|
+
"dist"
|
|
43
|
+
],
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"svelte": "^5"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"bits-ui": "^2.18.1"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@internationalized/date": "^3.8.1",
|
|
52
|
+
"jsdom": "^26.0.0",
|
|
53
|
+
"@sveltejs/kit": "^2.66.0",
|
|
54
|
+
"@sveltejs/package": "^2.5.8",
|
|
55
|
+
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
|
56
|
+
"@testing-library/svelte": "^5.3.1",
|
|
57
|
+
"eslint": "^10.5.0",
|
|
58
|
+
"eslint-plugin-svelte": "^3.19.0",
|
|
59
|
+
"publint": "^0.3.21",
|
|
60
|
+
"svelte": "^5.56.3",
|
|
61
|
+
"svelte-check": "^4.0.0",
|
|
62
|
+
"typescript": "^6.0.3",
|
|
63
|
+
"typescript-eslint": "^8.61.1",
|
|
64
|
+
"vite": "^8.0.16",
|
|
65
|
+
"vitest": "^4.1.9",
|
|
66
|
+
"@repo/eslint-config": "0.0.0",
|
|
67
|
+
"@repo/typescript-config": "0.0.0"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "vite build && pnpm package",
|
|
71
|
+
"package": "svelte-kit sync && svelte-package && publint",
|
|
72
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
73
|
+
"test": "vitest run",
|
|
74
|
+
"lint": "eslint ."
|
|
75
|
+
}
|
|
69
76
|
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script>export let as = "div";
|
|
2
|
-
export let p = 0;
|
|
3
|
-
export let padding = 0;
|
|
4
|
-
export let m = 0;
|
|
5
|
-
export let margin = 0;
|
|
6
|
-
export let w = "";
|
|
7
|
-
export let width = "";
|
|
8
|
-
export let h = "";
|
|
9
|
-
export let height = "";
|
|
10
|
-
export let bg = "transparent";
|
|
11
|
-
export let backgroundColor = "transparent";
|
|
12
|
-
export let color = "inherit";
|
|
13
|
-
export let border = "none";
|
|
14
|
-
export let br = "";
|
|
15
|
-
export let borderRadius = "";
|
|
16
|
-
export let d = "";
|
|
17
|
-
export let display = "";
|
|
18
|
-
export let fontSize = 1;
|
|
19
|
-
export let style = "";
|
|
20
|
-
export let textAlign = "";
|
|
21
|
-
export let alignItems = "";
|
|
22
|
-
export let justifyContent = "";
|
|
23
|
-
export let justifyItems = "";
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<svelte:element
|
|
27
|
-
this={as}
|
|
28
|
-
style={`
|
|
29
|
-
padding: ${p || padding}rem;
|
|
30
|
-
margin: ${m || margin}rem;
|
|
31
|
-
width: ${w || width || 'auto'};
|
|
32
|
-
height: ${h || height || 'auto'};
|
|
33
|
-
background-color: ${bg || backgroundColor};
|
|
34
|
-
color: ${color};
|
|
35
|
-
border: ${border};
|
|
36
|
-
border-radius: ${br || borderRadius || 'none'};
|
|
37
|
-
display: ${d || display};
|
|
38
|
-
font-size: ${fontSize}rem;
|
|
39
|
-
text-align: ${textAlign};
|
|
40
|
-
align-items: ${alignItems};
|
|
41
|
-
justify-content: ${justifyContent};
|
|
42
|
-
justify-items: ${justifyItems};
|
|
43
|
-
${style}
|
|
44
|
-
`}
|
|
45
|
-
{...$$restProps}
|
|
46
|
-
>
|
|
47
|
-
<slot />
|
|
48
|
-
</svelte:element>
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
/**
|
|
5
|
-
* @default 0
|
|
6
|
-
* @description The padding around the box.
|
|
7
|
-
* @type number | undefined
|
|
8
|
-
*/
|
|
9
|
-
p?: number | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* @default 0
|
|
12
|
-
* @description The padding around the box.
|
|
13
|
-
* @type number | undefined
|
|
14
|
-
*/
|
|
15
|
-
padding?: number | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* @default 0
|
|
18
|
-
* @description The margin around the box.
|
|
19
|
-
* @type number | undefined
|
|
20
|
-
*/
|
|
21
|
-
m?: number | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* @default 0
|
|
24
|
-
* @description The margin around the box.
|
|
25
|
-
* @type number | undefined
|
|
26
|
-
*/
|
|
27
|
-
margin?: number | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* @default undefined
|
|
30
|
-
* @description The width of the box.
|
|
31
|
-
* @type string | undefined
|
|
32
|
-
*/
|
|
33
|
-
w?: string | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* @default undefined
|
|
36
|
-
* @description The width of the box.
|
|
37
|
-
* @type string | undefined
|
|
38
|
-
*/
|
|
39
|
-
width?: string | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* @default undefined
|
|
42
|
-
* @description The height of the box.
|
|
43
|
-
* @type string | undefined
|
|
44
|
-
*/
|
|
45
|
-
h?: string | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* @default undefined
|
|
48
|
-
* @description The height of the box.
|
|
49
|
-
* @type string | undefined
|
|
50
|
-
*/
|
|
51
|
-
height?: string | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* @default undefined
|
|
54
|
-
* @description The background color of the box.
|
|
55
|
-
* @type string | undefined
|
|
56
|
-
*/
|
|
57
|
-
bg?: string | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* @default undefined
|
|
60
|
-
* @description The background color of the box.
|
|
61
|
-
* @type string | undefined
|
|
62
|
-
*/
|
|
63
|
-
backgroundColor?: string | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* @default 'white'
|
|
66
|
-
* @description The color of the text.
|
|
67
|
-
* @type string | undefined
|
|
68
|
-
*/
|
|
69
|
-
color?: string | undefined;
|
|
70
|
-
/**
|
|
71
|
-
* @default undefined
|
|
72
|
-
* @description The border of the box.
|
|
73
|
-
* @type string | undefined
|
|
74
|
-
*/
|
|
75
|
-
border?: string | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* @default undefined
|
|
78
|
-
* @description The border radius of the box.
|
|
79
|
-
* @type string | undefined
|
|
80
|
-
*/
|
|
81
|
-
br?: string | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* @default undefined
|
|
84
|
-
* @description The border radius of the box.
|
|
85
|
-
* @type string | undefined
|
|
86
|
-
*/
|
|
87
|
-
borderRadius?: string | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* @default undefined
|
|
90
|
-
* @description The display of the box.
|
|
91
|
-
* @type string | undefined
|
|
92
|
-
*/
|
|
93
|
-
d?: string | undefined;
|
|
94
|
-
/**
|
|
95
|
-
* @default undefined
|
|
96
|
-
* @description The display of the box.
|
|
97
|
-
* @type string | undefined
|
|
98
|
-
*/
|
|
99
|
-
display?: string | undefined;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @default undefined
|
|
103
|
-
* @description The position of the text in the box.
|
|
104
|
-
* @type string | undefined
|
|
105
|
-
*/
|
|
106
|
-
textAlign?: string | undefined;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* @default undefined
|
|
110
|
-
* @description The align items of the box.
|
|
111
|
-
* @type string | undefined
|
|
112
|
-
*/
|
|
113
|
-
alignItems?: string | undefined;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* @default undefined
|
|
117
|
-
* @description The justify content of the box.
|
|
118
|
-
* @type string | undefined
|
|
119
|
-
*/
|
|
120
|
-
justifyContent?: string | undefined;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @default undefined
|
|
124
|
-
* @description The justify items of the box.
|
|
125
|
-
* @type string | undefined
|
|
126
|
-
*/
|
|
127
|
-
justifyItems?: string | undefined;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* @default undefined
|
|
131
|
-
* @description The font size of the text.
|
|
132
|
-
* @type string | undefined
|
|
133
|
-
*/
|
|
134
|
-
fontSize?: string | undefined;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* @default undefined
|
|
138
|
-
* @description Style of the box.
|
|
139
|
-
* @type string | undefined
|
|
140
|
-
*/
|
|
141
|
-
style?: string | undefined;
|
|
142
|
-
};
|
|
143
|
-
events: {
|
|
144
|
-
[evt: string]: CustomEvent<any>;
|
|
145
|
-
};
|
|
146
|
-
slots: {
|
|
147
|
-
default: {};
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
export type BoxProps = typeof __propDef.props;
|
|
151
|
-
export type BoxEvents = typeof __propDef.events;
|
|
152
|
-
export type BoxSlots = typeof __propDef.slots;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* A box component is used to create a container for other components. Is a wrapper for the HTML div element.
|
|
156
|
-
* @see Docs https://sveui.org/components/box
|
|
157
|
-
*/
|
|
158
|
-
export default class Box extends SvelteComponentTyped<BoxProps, BoxEvents, BoxSlots> {
|
|
159
|
-
}
|
|
160
|
-
export { Box, BoxProps };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script>import Box from "../Box/Box.svelte";
|
|
2
|
-
export let width = "100%";
|
|
3
|
-
export let height = "100%";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<Box
|
|
7
|
-
display={'flex'}
|
|
8
|
-
justifyContent={'center'}
|
|
9
|
-
alignItems={'center'}
|
|
10
|
-
{width}
|
|
11
|
-
{height}
|
|
12
|
-
{...$$restProps}
|
|
13
|
-
>
|
|
14
|
-
<slot />
|
|
15
|
-
</Box>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { BoxProps } from "../Box/Box.svelte";
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
width?: string | undefined;
|
|
7
|
-
height?: string | undefined;
|
|
8
|
-
} & BoxProps
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type CenterProps = typeof __propDef.props;
|
|
17
|
-
export type CenterEvents = typeof __propDef.events;
|
|
18
|
-
export type CenterSlots = typeof __propDef.slots;
|
|
19
|
-
/**
|
|
20
|
-
* A box component that can be used to center its children.
|
|
21
|
-
* @see Docs https://sveui.org/components/center
|
|
22
|
-
*/
|
|
23
|
-
export default class Center extends SvelteComponentTyped<CenterProps, CenterEvents, CenterSlots> {
|
|
24
|
-
}
|
|
25
|
-
export { Center, CenterProps };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CircleProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CircleEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CircleSlots */
|
|
4
|
-
/**
|
|
5
|
-
* A square flex component with full border radius apply.
|
|
6
|
-
* @see Docs https://sveui.org/components/circle
|
|
7
|
-
*/
|
|
8
|
-
export default class Circle extends SvelteComponentTyped<{
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
size?: string | undefined;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {
|
|
14
|
-
default: {};
|
|
15
|
-
}> {
|
|
16
|
-
}
|
|
17
|
-
export type CircleProps = typeof __propDef.props;
|
|
18
|
-
export type CircleEvents = typeof __propDef.events;
|
|
19
|
-
export type CircleSlots = typeof __propDef.slots;
|
|
20
|
-
import { SvelteComponentTyped } from "svelte";
|
|
21
|
-
import type { SquareProps } from "../Square/Square.svelte";
|
|
22
|
-
declare const __propDef: {
|
|
23
|
-
props: {
|
|
24
|
-
[x: string]: any;
|
|
25
|
-
size?: string | undefined;
|
|
26
|
-
} & SquareProps
|
|
27
|
-
events: {
|
|
28
|
-
[evt: string]: CustomEvent<any>;
|
|
29
|
-
};
|
|
30
|
-
slots: {
|
|
31
|
-
default: {};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export { Circle, CircleProps };
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
<script>export let typeCodeLabel = "Sve-UI";
|
|
2
|
-
export let basic = false;
|
|
3
|
-
let copied = false;
|
|
4
|
-
const copyToClipboard = async () => {
|
|
5
|
-
try {
|
|
6
|
-
const codeElement = document.querySelector(".code-box code");
|
|
7
|
-
if (codeElement) {
|
|
8
|
-
const text = codeElement.textContent;
|
|
9
|
-
text && await navigator.clipboard.writeText(text);
|
|
10
|
-
copied = true;
|
|
11
|
-
setTimeout(() => {
|
|
12
|
-
copied = false;
|
|
13
|
-
}, 1500);
|
|
14
|
-
}
|
|
15
|
-
} catch (err) {
|
|
16
|
-
console.error("Failed to copy: ", err);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<pre class="code-box">
|
|
22
|
-
{#if basic}
|
|
23
|
-
<code>
|
|
24
|
-
<slot />
|
|
25
|
-
</code>
|
|
26
|
-
{:else}
|
|
27
|
-
<article class="button-copy">
|
|
28
|
-
<span>{typeCodeLabel}</span>
|
|
29
|
-
<button on:click={copyToClipboard}>
|
|
30
|
-
{#if copied}
|
|
31
|
-
<span>Copied</span>
|
|
32
|
-
{:else}
|
|
33
|
-
<svg
|
|
34
|
-
stroke="currentColor"
|
|
35
|
-
fill="none"
|
|
36
|
-
stroke-width="2"
|
|
37
|
-
viewBox="0 0 24 24"
|
|
38
|
-
stroke-linecap="round"
|
|
39
|
-
stroke-linejoin="round"
|
|
40
|
-
class="h-4 w-4"
|
|
41
|
-
height="1em"
|
|
42
|
-
width="1em"
|
|
43
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
-
><path
|
|
45
|
-
d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"
|
|
46
|
-
/><rect x="8" y="2" width="8" height="4" rx="1" ry="1" /></svg
|
|
47
|
-
>
|
|
48
|
-
<span>Copy</span>
|
|
49
|
-
{/if}
|
|
50
|
-
</button>
|
|
51
|
-
</article>
|
|
52
|
-
|
|
53
|
-
<code id="textCode" class={copied ? 'textCode' : ''}>
|
|
54
|
-
<slot />
|
|
55
|
-
</code>
|
|
56
|
-
{/if}
|
|
57
|
-
</pre>
|
|
58
|
-
|
|
59
|
-
<style>
|
|
60
|
-
.code-box {
|
|
61
|
-
background-color: #070606;
|
|
62
|
-
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
|
|
63
|
-
Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
64
|
-
border-radius: 4px;
|
|
65
|
-
max-width: 75ch;
|
|
66
|
-
margin: 0 auto;
|
|
67
|
-
color: #fffdfa;
|
|
68
|
-
position: relative;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.code-box code {
|
|
72
|
-
font-size: 0.9rem;
|
|
73
|
-
font-family: 'Söhne Mono', 'Monaco', 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
74
|
-
display: block;
|
|
75
|
-
padding: 0 0.6rem;
|
|
76
|
-
overflow: auto;
|
|
77
|
-
transition: background-color 0.2s ease-in-out;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.textCode {
|
|
81
|
-
background-color: #71c562;
|
|
82
|
-
transition: background-color 0.2s ease-in-out;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.button-copy {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
justify-content: space-between;
|
|
89
|
-
background-color: rgba(52, 53, 65, 0.6);
|
|
90
|
-
border-top-left-radius: 0.375rem;
|
|
91
|
-
border-top-right-radius: 0.375rem;
|
|
92
|
-
padding: 0.8rem;
|
|
93
|
-
position: absolute;
|
|
94
|
-
top: 0;
|
|
95
|
-
left: 0;
|
|
96
|
-
right: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
button {
|
|
100
|
-
display: flex;
|
|
101
|
-
gap: 0.5rem;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
background-color: transparent;
|
|
104
|
-
border: none;
|
|
105
|
-
color: #fffdfa;
|
|
106
|
-
transition: background-color 0.2s ease-in-out;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
button:hover {
|
|
110
|
-
background-color: #71c56250;
|
|
111
|
-
border-radius: 4px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
button:active {
|
|
115
|
-
background-color: #71c562;
|
|
116
|
-
border-radius: 4px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
@media only screen and (max-width: 768px) {
|
|
120
|
-
.code-box {
|
|
121
|
-
max-width: 100%;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.button-copy {
|
|
125
|
-
padding: 0.8rem 1.8rem;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
</style>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CodeExampleProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CodeExampleEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CodeExampleSlots */
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A code example component is used to show a code example with UI experiencie.
|
|
7
|
-
* @see Docs https://sveui.org/components/codeexample
|
|
8
|
-
*/
|
|
9
|
-
export default class CodeExample extends SvelteComponentTyped<{
|
|
10
|
-
/**
|
|
11
|
-
* The type code label text, show in the top of the code example component.
|
|
12
|
-
* @default 'Sve-UI'
|
|
13
|
-
* @type {string}
|
|
14
|
-
* @example <CodeExample typeCodeLabel="Svelte">
|
|
15
|
-
*/
|
|
16
|
-
typeCodeLabel?: string | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* If you want a more compact and simpler version, without the top copy button, you can use the basic option of the component with this property set to true.
|
|
19
|
-
* @default false
|
|
20
|
-
* @type {boolean}
|
|
21
|
-
* @example <CodeExample isBasic={true}>
|
|
22
|
-
*/
|
|
23
|
-
basic?: boolean | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
[evt: string]: CustomEvent<any>;
|
|
26
|
-
}, {
|
|
27
|
-
default: {};
|
|
28
|
-
}> {
|
|
29
|
-
}
|
|
30
|
-
export type CodeExampleProps = typeof __propDef.props;
|
|
31
|
-
export type CodeExampleEvents = typeof __propDef.events;
|
|
32
|
-
export type CodeExampleSlots = typeof __propDef.slots;
|
|
33
|
-
import { SvelteComponentTyped } from "svelte";
|
|
34
|
-
declare const __propDef: {
|
|
35
|
-
props: {
|
|
36
|
-
typeCodeLabel?: string | undefined;
|
|
37
|
-
basic?: boolean | undefined;
|
|
38
|
-
};
|
|
39
|
-
events: {
|
|
40
|
-
[evt: string]: CustomEvent<any>;
|
|
41
|
-
};
|
|
42
|
-
slots: {
|
|
43
|
-
default: {};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export { CodeExample, CodeExampleProps };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<script>import Box from "../Box/Box.svelte";
|
|
2
|
-
export let dir = "row";
|
|
3
|
-
export let direction = "row";
|
|
4
|
-
export let justify = "flex-start";
|
|
5
|
-
export let align = "stretch";
|
|
6
|
-
export let wrap = "nowrap";
|
|
7
|
-
export let gap = 0;
|
|
8
|
-
export let d = "";
|
|
9
|
-
export let display = "";
|
|
10
|
-
export let style = "";
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<Box
|
|
14
|
-
style={`
|
|
15
|
-
display: ${d || display || 'flex'};
|
|
16
|
-
flex-direction: ${dir || direction};
|
|
17
|
-
justify-content: ${justify};
|
|
18
|
-
align-items: ${align};
|
|
19
|
-
flex-wrap: ${wrap};
|
|
20
|
-
gap: ${gap}rem;
|
|
21
|
-
${style}
|
|
22
|
-
`}
|
|
23
|
-
{...$$restProps}
|
|
24
|
-
>
|
|
25
|
-
<slot />
|
|
26
|
-
</Box>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { BoxProps } from '../Box/Box.svelte';
|
|
3
|
-
|
|
4
|
-
declare const __propDef: {
|
|
5
|
-
props: {
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
dir?: string | undefined;
|
|
8
|
-
direction?: string | undefined;
|
|
9
|
-
justify?: string | undefined;
|
|
10
|
-
align?: string | undefined;
|
|
11
|
-
wrap?: string | undefined;
|
|
12
|
-
gap?: number | undefined;
|
|
13
|
-
d?: string | undefined;
|
|
14
|
-
display?: string | undefined;
|
|
15
|
-
style?: string | undefined;
|
|
16
|
-
} & BoxProps;
|
|
17
|
-
events: {
|
|
18
|
-
[evt: string]: CustomEvent<any>;
|
|
19
|
-
};
|
|
20
|
-
slots: {
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
22
|
-
default: {};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export type FlexProps = typeof __propDef.props;
|
|
26
|
-
export type FlexEvents = typeof __propDef.events;
|
|
27
|
-
export type FlexSlots = typeof __propDef.slots;
|
|
28
|
-
/**
|
|
29
|
-
* A flex box component that can be used to create layouts.
|
|
30
|
-
* @see Docs https://sveui.org/components/flex
|
|
31
|
-
*/
|
|
32
|
-
export default class Flex extends SvelteComponentTyped<FlexProps, FlexEvents, FlexSlots> {
|
|
33
|
-
}
|
|
34
|
-
export { Flex, FlexProps };
|