@axel669/zephyr 0.2.0-beta.1 → 0.2.0-beta.3
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/package.json +2 -2
- package/readme.md +11 -3
- package/src/async/load-zone.svelte +4 -1
- package/src/composed/data-table/th.svelte +2 -1
- package/src/composed/data-table.md +2 -0
- package/src/composed/data-table.svelte +32 -19
- package/src/composed/entry-button.svelte +2 -0
- package/src/composed/toast.svelte +2 -0
- package/src/control/button.md +4 -0
- package/src/control/button.svelte +2 -0
- package/src/control/input.svelte +2 -0
- package/src/control/label.md +4 -0
- package/src/control/label.svelte +2 -0
- package/src/control/link.md +4 -0
- package/src/control/link.svelte +3 -1
- package/src/control/radio.md +3 -1
- package/src/control/radio.svelte +2 -0
- package/src/control/select.md +2 -0
- package/src/control/select.svelte +2 -0
- package/src/control/tabs.md +2 -0
- package/src/control/tabs.svelte +3 -1
- package/src/control/toggle.md +6 -0
- package/src/control/toggle.svelte +2 -0
- package/src/data-display/avatar.md +4 -0
- package/src/data-display/avatar.svelte +2 -0
- package/src/data-display/badge.md +8 -2
- package/src/data-display/badge.svelte +2 -0
- package/src/data-display/chip.md +4 -0
- package/src/data-display/chip.svelte +2 -0
- package/src/data-display/details.svelte +2 -0
- package/src/data-display/popover.md +4 -0
- package/src/data-display/popover.svelte +2 -0
- package/src/data-display/progress.md +4 -0
- package/src/data-display/progress.svelte +3 -1
- package/src/data-display/table.svelte +2 -0
- package/src/data-display/tooltip.md +4 -0
- package/src/data-display/tooltip.svelte +2 -0
- package/src/dialogs/alert.svelte +2 -0
- package/src/dialogs/confirm.svelte +2 -0
- package/src/functions.md +6 -0
- package/src/index.mjs +2 -8
- package/src/info/icon.md +4 -0
- package/src/info/notification.md +4 -0
- package/src/info/titlebar.md +28 -2
- package/src/info/toaster.md +4 -0
- package/src/layout/dialog.md +9 -0
- package/src/layout/dialog.svelte +2 -0
- package/src/layout/drawer.md +9 -0
- package/src/layout/drawer.svelte +2 -0
- package/src/layout/flex.md +4 -0
- package/src/layout/flex.svelte +2 -0
- package/src/layout/grid.md +5 -1
- package/src/layout/grid.svelte +2 -0
- package/src/layout/modal.md +3 -0
- package/src/layout/modal.svelte +2 -0
- package/src/layout/paper.md +4 -0
- package/src/layout/paper.svelte +2 -0
- package/src/layout/screen.md +6 -1
- package/src/layout/screen.svelte +2 -0
- package/src/spinner/circle-spinner.svelte +2 -0
- package/src/spinner/hexagon-spinner.svelte +2 -0
- package/src/text.svelte +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axel669/zephyr",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@axel669/windstorm": "0.2.3"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@axel669/ipsen": "0.4.0-beta.
|
|
18
|
+
"@axel669/ipsen": "0.4.0-beta.7",
|
|
19
19
|
"@axel669/rollup-html-input": "^0.1.2",
|
|
20
20
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
21
21
|
"@rollup/plugin-terser": "^0.4.0",
|
package/readme.md
CHANGED
|
@@ -28,20 +28,28 @@ Windstorm theme is usable, including custom ones.
|
|
|
28
28
|
```svelte
|
|
29
29
|
<script>
|
|
30
30
|
// individual import for tree shaking
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
Button,
|
|
33
|
+
wsx
|
|
34
|
+
} from "@axel669/zephyr"
|
|
32
35
|
|
|
33
36
|
// bring the whole thing to keep it simple
|
|
34
37
|
import * as Wind from "@axel669/zephyr"
|
|
38
|
+
|
|
39
|
+
const theme = "dark"
|
|
40
|
+
const handler = () => {
|
|
41
|
+
console.log("button clicked!")
|
|
42
|
+
}
|
|
35
43
|
</script>
|
|
36
44
|
|
|
37
45
|
<!-- the wsx action can be used to setup the ws-x needed for the body -->
|
|
38
46
|
<svelte:body use:wsx={{"$theme": theme, "$app": true}} />
|
|
39
47
|
|
|
40
|
-
<Button on:click={
|
|
48
|
+
<Button on:click={handler}>
|
|
41
49
|
I'm a button!
|
|
42
50
|
</Button>
|
|
43
51
|
|
|
44
|
-
<Wind.Button on:click={
|
|
52
|
+
<Wind.Button on:click={handler}>
|
|
45
53
|
I'm also button!
|
|
46
54
|
</Wind.Button>
|
|
47
55
|
```
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import Spinner from "../spinner/hexagon-spinner.svelte"
|
|
3
5
|
export let source = null
|
|
6
|
+
export let message = "Loading"
|
|
4
7
|
</script>
|
|
5
8
|
|
|
6
9
|
{#if source !== null}
|
|
7
10
|
{#await source}
|
|
8
11
|
<slot name="loading">
|
|
9
12
|
<ws-flex ws-x="fl.cross[center] fl.main[center]">
|
|
10
|
-
<span>
|
|
13
|
+
<span>{message}</span>
|
|
11
14
|
<Spinner size="100px" />
|
|
12
15
|
</ws-flex>
|
|
13
16
|
</slot>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script context="module">
|
|
2
4
|
const sortIcons = {
|
|
3
5
|
"asc": "arrow-narrow-up",
|
|
@@ -30,7 +32,6 @@
|
|
|
30
32
|
p: "0px",
|
|
31
33
|
sel: "none"
|
|
32
34
|
}
|
|
33
|
-
$: console.log($context.sorting)
|
|
34
35
|
$: sortIcon =
|
|
35
36
|
($context.sorting.base === sort)
|
|
36
37
|
? sortIcons[$context.sorting.direction]
|
|
@@ -2,16 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
<script context="module">
|
|
4
4
|
// find the first filter in the list that returns false
|
|
5
|
-
const applyFilters = (data, filters) =>
|
|
6
|
-
(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
const applyFilters = (data, filters) => {
|
|
6
|
+
if (Array.isArray(data) === false) {
|
|
7
|
+
return null
|
|
8
|
+
}
|
|
9
|
+
return data.filter(
|
|
10
|
+
(row) => {
|
|
11
|
+
for (const [filter, value] of filters) {
|
|
12
|
+
if (filter(row, value) === false) {
|
|
13
|
+
return false
|
|
14
|
+
}
|
|
10
15
|
}
|
|
16
|
+
return true
|
|
11
17
|
}
|
|
12
|
-
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
const sliceData = (data, page, pageSize, sortFunc) => {
|
|
21
|
+
if (data === null) {
|
|
22
|
+
return []
|
|
13
23
|
}
|
|
14
|
-
|
|
24
|
+
const sorted = data.sort(sortFunc)
|
|
25
|
+
return Array.from(
|
|
26
|
+
{ length: pageSize },
|
|
27
|
+
(_, i) => sorted[page * pageSize + i]
|
|
28
|
+
)
|
|
29
|
+
}
|
|
15
30
|
const noSort = {
|
|
16
31
|
direction: null,
|
|
17
32
|
func: (a, b) => 0,
|
|
@@ -38,26 +53,24 @@
|
|
|
38
53
|
|
|
39
54
|
export let color = false
|
|
40
55
|
export let fillHeader = true
|
|
41
|
-
export let data
|
|
56
|
+
export let data
|
|
42
57
|
export let pageSize = 10
|
|
43
58
|
export let page = 0
|
|
44
59
|
export let rowHeight = "40px"
|
|
45
60
|
|
|
46
|
-
$: rows = Array.from(
|
|
47
|
-
{ length: pageSize },
|
|
48
|
-
(_, i) => filteredData[page * pageSize + i]
|
|
49
|
-
)
|
|
50
|
-
$: rowCount = filteredData.length
|
|
51
|
-
$: pageCount = Math.ceil(rowCount / pageSize)
|
|
52
|
-
$: maxPage = Math.max(pageCount - 1, 0)
|
|
53
|
-
|
|
54
61
|
let sorting = noSort
|
|
55
62
|
let filters = new Map()
|
|
56
63
|
let filterFunctions = []
|
|
57
64
|
|
|
58
|
-
$: filteredData =
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
$: filteredData = applyFilters(data, filterFunctions)
|
|
66
|
+
$: rows = sliceData(filteredData, page, pageSize, sorting.func)
|
|
67
|
+
$: rowCount = filteredData?.length ?? 0
|
|
68
|
+
$: pageCount = Math.ceil(rowCount / pageSize)
|
|
69
|
+
$: maxPage = Math.max(pageCount - 1, 0)
|
|
70
|
+
|
|
71
|
+
$: if (filteredData === null) {
|
|
72
|
+
console.warn("DataTable: data is not an array")
|
|
73
|
+
}
|
|
61
74
|
|
|
62
75
|
const prev = () => page = Math.max(0, page - 1)
|
|
63
76
|
const next = () => page = Math.min(maxPage, page + 1)
|
package/src/control/button.md
CHANGED
package/src/control/input.svelte
CHANGED
package/src/control/label.md
CHANGED
|
@@ -38,6 +38,10 @@ Sets the button variant of the label when `button` is `true`.
|
|
|
38
38
|
## Example
|
|
39
39
|
|
|
40
40
|
```svelte
|
|
41
|
+
<script>
|
|
42
|
+
import { Label } from "@axel669/zephyr"
|
|
43
|
+
</script>
|
|
44
|
+
|
|
41
45
|
<Label for="checkbox">Toggle Checkbox</Label>
|
|
42
46
|
<Label for="checkbox" button color="primary" fill>
|
|
43
47
|
Open Menu
|
package/src/control/label.svelte
CHANGED
package/src/control/link.md
CHANGED
package/src/control/link.svelte
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import wsx from "../wsx.mjs"
|
|
3
5
|
import variant from "../variant.mjs"
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
$: type = variant({ fill, outline, flat })
|
|
17
19
|
|
|
18
20
|
$: wind = {
|
|
19
|
-
"
|
|
21
|
+
"$button": button,
|
|
20
22
|
[type]: true,
|
|
21
23
|
"$color": color,
|
|
22
24
|
...$$restProps
|
package/src/control/radio.md
CHANGED
|
@@ -44,6 +44,8 @@ unique in the list.
|
|
|
44
44
|
## Example
|
|
45
45
|
```svelte
|
|
46
46
|
<script>
|
|
47
|
+
import { Radio, Grid } from "@axel669/zephyr"
|
|
48
|
+
|
|
47
49
|
const options = [
|
|
48
50
|
{ label: "first", value: 1 },
|
|
49
51
|
{ label: "second", value: [] },
|
|
@@ -52,5 +54,5 @@ unique in the list.
|
|
|
52
54
|
</script>
|
|
53
55
|
|
|
54
56
|
<Radio {options} bind:value />
|
|
55
|
-
<Radio {options} bind:value={other} layout={Grid} gr
|
|
57
|
+
<Radio {options} bind:value={other} layout={Grid} gr.cols="1fr 1fr" />
|
|
56
58
|
```
|
package/src/control/radio.svelte
CHANGED
package/src/control/select.md
CHANGED
package/src/control/tabs.md
CHANGED
package/src/control/tabs.svelte
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import wsx from "../wsx.mjs"
|
|
3
5
|
import { handler$ } from "../handler$.mjs"
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
)
|
|
21
23
|
|
|
22
24
|
$: wind = {
|
|
23
|
-
"
|
|
25
|
+
"$solid": solid,
|
|
24
26
|
"$color": color,
|
|
25
27
|
$vert: vertical,
|
|
26
28
|
...$$restProps,
|
package/src/control/toggle.md
CHANGED
|
@@ -48,6 +48,12 @@ Only used in conjunction with bind:group, see Svelte docs
|
|
|
48
48
|
|
|
49
49
|
## Example
|
|
50
50
|
```svelte
|
|
51
|
+
<script>
|
|
52
|
+
import { Toggle } from "@axel669/zephyr"
|
|
53
|
+
|
|
54
|
+
let checked = false
|
|
55
|
+
</script>
|
|
56
|
+
|
|
51
57
|
<Toggle label="Active" bind:checked />
|
|
52
58
|
<Toggle label="Active" checkbox bind:checked />
|
|
53
59
|
<Toggle label="Active" checkbox reverse bind:checked />
|
|
@@ -26,6 +26,10 @@ Text to show in the avatar area if image is not used.
|
|
|
26
26
|
|
|
27
27
|
## Example
|
|
28
28
|
```svelte
|
|
29
|
+
<script>
|
|
30
|
+
import { Avatar } from "@axel669/zephyr"
|
|
31
|
+
</script>
|
|
32
|
+
|
|
29
33
|
<Avatar image="url" />
|
|
30
34
|
<Avatar image="url" alt="text" />
|
|
31
35
|
<Avatar text="Hi" color="primary" />
|
|
@@ -15,10 +15,16 @@ The badge text.
|
|
|
15
15
|
|
|
16
16
|
## Example
|
|
17
17
|
```svelte
|
|
18
|
-
<
|
|
18
|
+
<script>
|
|
19
|
+
import { Badge } from "@axel669/zephyr"
|
|
20
|
+
|
|
21
|
+
let count = 10
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<Badge text={count}>
|
|
19
25
|
Unread Messages
|
|
20
26
|
</Badge>
|
|
21
27
|
<Badge text="1k+" color="warning">
|
|
22
|
-
<button>Clickable Content</button>
|
|
28
|
+
<button on:click={() => count += 1}>Clickable Content</button>
|
|
23
29
|
</Badge>
|
|
24
30
|
```
|
package/src/data-display/chip.md
CHANGED
|
@@ -25,6 +25,10 @@ If true, sets $fill on the chip. If false $outline is set instead.
|
|
|
25
25
|
|
|
26
26
|
## Example
|
|
27
27
|
```svelte
|
|
28
|
+
<script>
|
|
29
|
+
import { Chip } from "@axel669/zephyr"
|
|
30
|
+
</script>
|
|
31
|
+
|
|
28
32
|
Emails:
|
|
29
33
|
<Chip clickable>admin@site.com</Chip>
|
|
30
34
|
<Chip clickable color="warning">weirdge@site.com</Chip>
|
|
@@ -16,6 +16,10 @@ If true, the tooltip will be shown under the content instead of over.
|
|
|
16
16
|
|
|
17
17
|
## Example
|
|
18
18
|
```svelte
|
|
19
|
+
<script>
|
|
20
|
+
import { Tooltip, Button } from "@axel669/zephyr"
|
|
21
|
+
</script>
|
|
22
|
+
|
|
19
23
|
<Tooltip text="This is a button">
|
|
20
24
|
<Button>Do Thing</Button>
|
|
21
25
|
</Tooltip>
|
package/src/dialogs/alert.svelte
CHANGED
package/src/functions.md
CHANGED
|
@@ -11,6 +11,8 @@ not pass the event into final function call.
|
|
|
11
11
|
### Example
|
|
12
12
|
```svelte
|
|
13
13
|
<script>
|
|
14
|
+
import { handler$ } from "@axel669/zephyr"
|
|
15
|
+
|
|
14
16
|
const clicked = handler$(
|
|
15
17
|
(buttonName) => console.log(buttonName)
|
|
16
18
|
)
|
|
@@ -35,6 +37,8 @@ function, the event is passed to the curried function.
|
|
|
35
37
|
|
|
36
38
|
```svelte
|
|
37
39
|
<script>
|
|
40
|
+
import { eventHandler$ } from "@axel669/zephyr"
|
|
41
|
+
|
|
38
42
|
const clicked = eventHandler$(
|
|
39
43
|
(event, buttonName) => console.log(event, buttonName)
|
|
40
44
|
)
|
|
@@ -63,6 +67,8 @@ directly.
|
|
|
63
67
|
### Example
|
|
64
68
|
```svelte
|
|
65
69
|
<script>
|
|
70
|
+
import { wsx } from "@axel669/zephyr"
|
|
71
|
+
|
|
66
72
|
// will generate ws-x="grid gr-col[1fr 1fr]"
|
|
67
73
|
const wsxProps = {
|
|
68
74
|
grid: true,
|
package/src/index.mjs
CHANGED
|
@@ -29,7 +29,6 @@ export { default as Modal } from "./layout/modal.svelte"
|
|
|
29
29
|
export { default as Paper } from "./layout/paper.svelte"
|
|
30
30
|
export { default as Screen } from "./layout/screen.svelte"
|
|
31
31
|
|
|
32
|
-
// export { default as InlineDialog } from "./inline-dialog.svelte"
|
|
33
32
|
export { default as Text } from "./text.svelte"
|
|
34
33
|
|
|
35
34
|
export { default as CircleSpinner } from "./spinner/circle-spinner.svelte"
|
|
@@ -38,19 +37,14 @@ export { default as HexagonSpinner } from "./spinner/hexagon-spinner.svelte"
|
|
|
38
37
|
export { default as Alert } from "./dialogs/alert.svelte"
|
|
39
38
|
export { default as Confirm } from "./dialogs/confirm.svelte"
|
|
40
39
|
|
|
40
|
+
export { default as DataTable } from "./composed/data-table.svelte"
|
|
41
|
+
export { default as Th } from "./composed/data-table/th.svelte"
|
|
41
42
|
export { default as EntryButton } from "./composed/entry-button.svelte"
|
|
42
43
|
export { default as Toast } from "./composed/toast.svelte"
|
|
43
44
|
|
|
44
45
|
export { default as AsyncButton } from "./async/button.svelte"
|
|
45
46
|
export { default as LoadZone } from "./async/load-zone.svelte"
|
|
46
47
|
|
|
47
|
-
import DataTable from "./composed/data-table.svelte"
|
|
48
|
-
import th from "./composed/data-table/th.svelte"
|
|
49
|
-
DataTable.th = th
|
|
50
|
-
|
|
51
|
-
export { DataTable, th }
|
|
52
|
-
// export { default as DataTable } from "./composed/data-table.svelte"
|
|
53
|
-
|
|
54
48
|
export { default as wsx } from "./wsx.mjs"
|
|
55
49
|
|
|
56
50
|
|
package/src/info/icon.md
CHANGED
|
@@ -12,6 +12,10 @@ The name of the icon. Use the tabler icon class name without the "ti-".
|
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
```svelte
|
|
15
|
+
<script>
|
|
16
|
+
import { Icon } from "@axel669/zephyr"
|
|
17
|
+
</script>
|
|
18
|
+
|
|
15
19
|
<Icon name="hexagon" />
|
|
16
20
|
<Icon name="hexagons">Are the bestagons</Icon>
|
|
17
21
|
```
|
package/src/info/notification.md
CHANGED
package/src/info/titlebar.md
CHANGED
|
@@ -19,7 +19,9 @@ Sets `$fill`
|
|
|
19
19
|
## Slots
|
|
20
20
|
|
|
21
21
|
### title
|
|
22
|
-
The center of the titlebar, where the text usually goes
|
|
22
|
+
The center of the titlebar, where the text usually goes. Elements can be nested
|
|
23
|
+
in different ways within a parent element for different visual effects in this
|
|
24
|
+
slot.
|
|
23
25
|
|
|
24
26
|
### menu
|
|
25
27
|
The area on the left of the titlebar (where drawer menus tend to open)
|
|
@@ -29,12 +31,16 @@ The area on the right of the titlebar
|
|
|
29
31
|
|
|
30
32
|
## Example
|
|
31
33
|
```svelte
|
|
34
|
+
<script>
|
|
35
|
+
import { Titlebar, Button, Paper, Text } from "@axel669/zephyr"
|
|
36
|
+
</script>
|
|
37
|
+
|
|
32
38
|
<Titlebar color="primary" fill>
|
|
33
39
|
<Text title slot="title">
|
|
34
40
|
Some Title
|
|
35
41
|
</Text>
|
|
36
42
|
|
|
37
|
-
<Button slot="menu"
|
|
43
|
+
<Button slot="menu">
|
|
38
44
|
<Icon name="menu" />
|
|
39
45
|
</Button>
|
|
40
46
|
</Titlebar>
|
|
@@ -43,7 +49,27 @@ The area on the right of the titlebar
|
|
|
43
49
|
<Titlebar color="secondary" slot="header">
|
|
44
50
|
<Text title slot="title">
|
|
45
51
|
Paper Title
|
|
52
|
+
<Text subtitle>
|
|
53
|
+
Indented Subtitle
|
|
54
|
+
</Text>
|
|
46
55
|
</Text>
|
|
47
56
|
</Titlebar>
|
|
48
57
|
</Paper>
|
|
58
|
+
|
|
59
|
+
<Paper>
|
|
60
|
+
<Titlebar color="secondary" slot="header">
|
|
61
|
+
<Flex p="0px" slot="title">
|
|
62
|
+
<Text title>
|
|
63
|
+
Paper Title
|
|
64
|
+
</Text>
|
|
65
|
+
<Text subtitle>
|
|
66
|
+
Aligned Subtitle
|
|
67
|
+
</Text>
|
|
68
|
+
</Flex>
|
|
69
|
+
|
|
70
|
+
<Button slot="action">
|
|
71
|
+
<Icon name="menu" />
|
|
72
|
+
</Button>
|
|
73
|
+
</Titlebar>
|
|
74
|
+
</Paper>
|
|
49
75
|
```
|
package/src/info/toaster.md
CHANGED
package/src/layout/dialog.md
CHANGED
|
@@ -14,6 +14,10 @@ and passes the props to a `Paper`.
|
|
|
14
14
|
## Example
|
|
15
15
|
`cool-dialog.svelte`
|
|
16
16
|
```svelte
|
|
17
|
+
<script>
|
|
18
|
+
import { Dialog, Titlebar, Text } from "@axel669/zephyr"
|
|
19
|
+
</script>
|
|
20
|
+
|
|
17
21
|
<Dialog>
|
|
18
22
|
<Titlebar slot="header">
|
|
19
23
|
<Text slot="title" title>
|
|
@@ -27,6 +31,11 @@ and passes the props to a `Paper`.
|
|
|
27
31
|
|
|
28
32
|
`app.svelte`
|
|
29
33
|
```svelte
|
|
34
|
+
<script>
|
|
35
|
+
import { Modal, EntryButton } from "@axel669/zephyr"
|
|
36
|
+
import CoolDialog from "./cool-dialog.svelte"
|
|
37
|
+
</script>
|
|
38
|
+
|
|
30
39
|
<Modal component={CoolDialog} />
|
|
31
40
|
<EntryButton this={Modal} component={CoolDialog}>
|
|
32
41
|
Open Cool Dialog
|
package/src/layout/dialog.svelte
CHANGED
package/src/layout/drawer.md
CHANGED
|
@@ -41,6 +41,10 @@ the top of the screen
|
|
|
41
41
|
## Example
|
|
42
42
|
`cool-drawer.svelte`
|
|
43
43
|
```svelte
|
|
44
|
+
<script>
|
|
45
|
+
import { Drawer, Titlebar, Text } from "@axel669/zephyr"
|
|
46
|
+
</script>
|
|
47
|
+
|
|
44
48
|
<Drawer>
|
|
45
49
|
<Titlebar slot="header">
|
|
46
50
|
<Text slot="title" title>
|
|
@@ -54,6 +58,11 @@ the top of the screen
|
|
|
54
58
|
|
|
55
59
|
`app.svelte`
|
|
56
60
|
```svelte
|
|
61
|
+
<script>
|
|
62
|
+
import { Modal, EntryButton } from "@axel669/zephyr"
|
|
63
|
+
import CoolDrawer from "./cool-drawer.svelte"
|
|
64
|
+
</script>
|
|
65
|
+
|
|
57
66
|
<Modal component={CoolDrawer} />
|
|
58
67
|
<EntryButton this={Modal} component={CoolDrawer}>
|
|
59
68
|
Open Cool Dialog
|
package/src/layout/drawer.svelte
CHANGED
package/src/layout/flex.md
CHANGED
package/src/layout/flex.svelte
CHANGED
package/src/layout/grid.md
CHANGED
|
@@ -49,7 +49,11 @@ Sets `gr.rows.a`
|
|
|
49
49
|
|
|
50
50
|
## Example
|
|
51
51
|
```svelte
|
|
52
|
-
<
|
|
52
|
+
<script>
|
|
53
|
+
import { Grid, Text } from "@axel669/zephyr"
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<Grid cols="1fr 1fr">
|
|
53
57
|
<Text>Content</Text>
|
|
54
58
|
<Text>More content</Text>
|
|
55
59
|
<Text>Event more content</Text>
|
package/src/layout/grid.svelte
CHANGED
package/src/layout/modal.md
CHANGED
|
@@ -33,6 +33,9 @@ Shows the given component and passes any props provided.
|
|
|
33
33
|
## Example
|
|
34
34
|
```svelte
|
|
35
35
|
<script>
|
|
36
|
+
import { Modal, Button } from "@axel669/zephyr"
|
|
37
|
+
import CoolDialog from "./cool-dialog.svelte"
|
|
38
|
+
|
|
36
39
|
let dialog = null
|
|
37
40
|
const dialogThing = async () => {
|
|
38
41
|
const value = await dialog.show({ a: 10, b: 12 })
|
package/src/layout/modal.svelte
CHANGED
package/src/layout/paper.md
CHANGED
package/src/layout/paper.svelte
CHANGED
package/src/layout/screen.md
CHANGED
|
@@ -15,8 +15,13 @@ required to get stacking screens to have the effect.
|
|
|
15
15
|
The width of the screen before stack-based padding is applied
|
|
16
16
|
|
|
17
17
|
## Example
|
|
18
|
-
`cool-screen.svelte`
|
|
19
18
|
```svelte
|
|
19
|
+
<script>
|
|
20
|
+
import { Scren, Button, Paper } from "@axel669/zephyr"
|
|
21
|
+
|
|
22
|
+
export let close
|
|
23
|
+
</script>
|
|
24
|
+
|
|
20
25
|
<Screen width="70%">
|
|
21
26
|
<Paper>
|
|
22
27
|
This screen is pretty cool I swear
|
package/src/layout/screen.svelte
CHANGED