sve-ui 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +29 -19
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -10
- 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/README.md +0 -94
- 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.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Sve-UI is a collection of customizable UI components for Svelte applications. These components are designed to be easy to use and highly flexible, allowing developers to quickly build beautiful interfaces. Sve-UI includes buttons, forms, modals, and other commonly used UI elements, all built with Svelte's lightweight and efficient framework.",
|
|
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
|
}
|
package/README.md
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
# Sve-UI
|
|
2
|
-
## _Best UI components library for Svelte_
|
|
3
|
-
|
|
4
|
-
Sve-UI is a UI component library for Svelte that provides the best collection of components for building modern web applications and fast.
|
|
5
|
-
|
|
6
|
-
<br />
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<br />
|
|
11
|
-
|
|
12
|
-
## Features
|
|
13
|
-
|
|
14
|
-
- Responsive components that work seamlessly across all devices and screen sizes
|
|
15
|
-
- Easy to use and highly customizable components
|
|
16
|
-
- Well-documented API and usage examples
|
|
17
|
-
- Regularly updated with new components and features
|
|
18
|
-
|
|
19
|
-
<br />
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<br />
|
|
24
|
-
|
|
25
|
-
## Installation
|
|
26
|
-
|
|
27
|
-
> You can install Sve-UI using pnpm, npm or yarn.
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
pnpm add sve-ui
|
|
31
|
-
npm install sve-ui
|
|
32
|
-
yarn add sve-ui
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
To use:
|
|
36
|
-
|
|
37
|
-
```sh
|
|
38
|
-
<script>
|
|
39
|
-
import { Button } from 'sve-ui';
|
|
40
|
-
|
|
41
|
-
function handleClick() {
|
|
42
|
-
alert('Button clicked!');
|
|
43
|
-
}
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<Button onClick={handleClick}>Click me!</Button>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
<br />
|
|
52
|
-
|
|
53
|
-
## Showcase & docs
|
|
54
|
-
|
|
55
|
-
<br />
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
| Showcase | Link |
|
|
59
|
-
| ------ | ------ |
|
|
60
|
-
| Docs | [/docs][docs] |
|
|
61
|
-
| Github page | [/sve-ui][Gp] |
|
|
62
|
-
| GitHub issues | [/sve-ui/issues][Gpi] |
|
|
63
|
-
| Github PR | [/sve-ui/pulls][Gppr] |
|
|
64
|
-
| Npmjs | [/package/sve-ui][LSjs] |
|
|
65
|
-
|
|
66
|
-
<br />
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
<br />
|
|
71
|
-
|
|
72
|
-
## List of components
|
|
73
|
-
|
|
74
|
-
- Box, Center, Spacer, Flex, Grid, GridItem
|
|
75
|
-
- Button, Text
|
|
76
|
-
- CodeExample
|
|
77
|
-
- Square, Circle
|
|
78
|
-
|
|
79
|
-
<br />
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
<br />
|
|
84
|
-
|
|
85
|
-
## License
|
|
86
|
-
|
|
87
|
-
MIT
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
[Gp]: <https://github.com/rodriabregu/sve-ui>
|
|
91
|
-
[Gpi]: <https://github.com/rodriabregu/sve-ui/issues>
|
|
92
|
-
[Gppr]: <https://github.com/rodriabregu/sve-ui/pulls>
|
|
93
|
-
[LSjs]: <https://www.npmjs.com/package/sve-ui>
|
|
94
|
-
[docs]: <https://sveui.org/>
|
|
@@ -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>
|