@axel669/zephyr 0.2.0-beta.2 → 0.3.4-beta.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/package.json +2 -2
- package/readme.md +4 -4
- package/src/async/button.md +27 -0
- package/src/async/button.svelte +2 -4
- package/src/async/load-zone.md +42 -0
- package/src/async/load-zone.svelte +7 -2
- package/src/composed/data-table/th.md +21 -0
- package/src/composed/data-table/th.svelte +4 -3
- package/src/composed/data-table.md +68 -67
- package/src/composed/data-table.svelte +98 -35
- package/src/composed/entry-button.md +23 -13
- package/src/composed/entry-button.svelte +2 -0
- package/src/composed/toast.md +30 -21
- package/src/composed/toast.svelte +3 -1
- package/src/control/button.svelte +2 -0
- package/src/control/input.md +87 -0
- package/src/control/input.svelte +5 -3
- package/src/control/label.md +0 -1
- package/src/control/label.svelte +3 -1
- package/src/control/link.svelte +6 -2
- package/src/control/radio.svelte +3 -1
- package/src/control/select.svelte +4 -2
- package/src/control/tabs.svelte +7 -3
- package/src/control/toggle.svelte +5 -3
- package/src/data-display/avatar.svelte +2 -0
- package/src/data-display/badge.svelte +3 -1
- package/src/data-display/chip.svelte +3 -1
- package/src/data-display/details.md +40 -1
- package/src/data-display/details.svelte +3 -1
- package/src/data-display/popover.svelte +3 -1
- package/src/data-display/progress.svelte +3 -1
- package/src/data-display/table.md +56 -4
- package/src/data-display/table.svelte +2 -0
- package/src/data-display/tooltip.svelte +2 -0
- package/src/dialogs/alert.md +40 -1
- package/src/dialogs/alert.svelte +3 -1
- package/src/dialogs/confirm.md +54 -1
- package/src/dialogs/confirm.svelte +3 -1
- package/src/functions.md +25 -0
- package/src/hash.js +14 -0
- package/src/index.mjs +2 -1
- package/src/inline-dialog.svelte +1 -1
- package/src/layout/dialog.svelte +3 -1
- package/src/layout/drawer.svelte +5 -3
- package/src/layout/flex.svelte +4 -0
- package/src/layout/grid.svelte +4 -0
- package/src/layout/modal.svelte +3 -1
- package/src/layout/paper.svelte +2 -0
- package/src/layout/screen.svelte +4 -2
- package/src/spinner/circle-spinner.svelte +4 -2
- package/src/spinner/hexagon-spinner.svelte +4 -2
- package/src/spinner/spinners.md +20 -1
- package/src/text.svelte +2 -0
- package/src/wsx.mjs +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import Button from "../control/button.svelte"
|
|
3
5
|
import Dialog from "../layout/dialog.svelte"
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
export let message
|
|
15
17
|
export let okText = "OK"
|
|
16
18
|
export let cancelText = "Cancel"
|
|
17
|
-
export let color = "primary"
|
|
19
|
+
export let color = "@primary"
|
|
18
20
|
|
|
19
21
|
const cls = handler$(close)
|
|
20
22
|
</script>
|
package/src/functions.md
CHANGED
|
@@ -81,3 +81,28 @@ directly.
|
|
|
81
81
|
<span>Content</span>
|
|
82
82
|
</div>
|
|
83
83
|
```
|
|
84
|
+
|
|
85
|
+
## hash store
|
|
86
|
+
A svelte store that has the current value of the browser page hash. It uses
|
|
87
|
+
polling to check the value several times a second (it's a cheap check) so the
|
|
88
|
+
weird browser issues around hash change events don't affect it. Can also be used
|
|
89
|
+
to set the browser hash.
|
|
90
|
+
|
|
91
|
+
### Example
|
|
92
|
+
```svelte
|
|
93
|
+
<script>
|
|
94
|
+
import { hash } from "@axel669/zephyr"
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<div>
|
|
98
|
+
Browser hash: {$hash}
|
|
99
|
+
</div>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## sorts
|
|
103
|
+
A collection fo sorting functions for use with the DataTable. Currently only
|
|
104
|
+
has natural sort as `sorts.natural(colProp)`.
|
|
105
|
+
|
|
106
|
+
## filters
|
|
107
|
+
A collection of filter functions for use with the DataTable. Currently only has
|
|
108
|
+
a text filter function as `filter.text(colProp)`.
|
package/src/hash.js
ADDED
package/src/index.mjs
CHANGED
|
@@ -38,7 +38,7 @@ export { default as Alert } from "./dialogs/alert.svelte"
|
|
|
38
38
|
export { default as Confirm } from "./dialogs/confirm.svelte"
|
|
39
39
|
|
|
40
40
|
export { default as DataTable } from "./composed/data-table.svelte"
|
|
41
|
-
export { default as
|
|
41
|
+
export { default as TH } from "./composed/data-table/th.svelte"
|
|
42
42
|
export { default as EntryButton } from "./composed/entry-button.svelte"
|
|
43
43
|
export { default as Toast } from "./composed/toast.svelte"
|
|
44
44
|
|
|
@@ -47,6 +47,7 @@ export { default as LoadZone } from "./async/load-zone.svelte"
|
|
|
47
47
|
|
|
48
48
|
export { default as wsx } from "./wsx.mjs"
|
|
49
49
|
|
|
50
|
+
export { hash } from "./hash.js"
|
|
50
51
|
|
|
51
52
|
export * from "./handler$.mjs"
|
|
52
53
|
export * from "./composed/table-functions.js"
|
package/src/inline-dialog.svelte
CHANGED
package/src/layout/dialog.svelte
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import { fade } from "svelte/transition"
|
|
3
5
|
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
|
|
15
17
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
16
18
|
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
|
17
|
-
<wind-wrapper transition:trick ws-x="
|
|
19
|
+
<wind-wrapper transition:trick ws-x="@dialog [grid]" on:click|stopPropagation
|
|
18
20
|
role="dialog">
|
|
19
21
|
<Paper {...$$props}>
|
|
20
22
|
<slot name="header" slot="header" />
|
package/src/layout/drawer.svelte
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script context="module">
|
|
2
4
|
const defs = {
|
|
3
5
|
select: {
|
|
4
|
-
"
|
|
6
|
+
"@select": true,
|
|
5
7
|
"w.min": "35vw",
|
|
6
8
|
grid: true,
|
|
7
9
|
over: "hidden"
|
|
8
10
|
},
|
|
9
11
|
menu: {
|
|
10
|
-
"
|
|
12
|
+
"@menu": true,
|
|
11
13
|
},
|
|
12
14
|
action: {
|
|
13
|
-
"
|
|
15
|
+
"@action": true,
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
</script>
|
package/src/layout/flex.svelte
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import wsx from "../wsx.mjs"
|
|
3
5
|
|
|
@@ -6,6 +8,7 @@
|
|
|
6
8
|
export let gap = false
|
|
7
9
|
export let cross = "stretch"
|
|
8
10
|
export let main = "start"
|
|
11
|
+
export let scrollable = false
|
|
9
12
|
|
|
10
13
|
$: wind = {
|
|
11
14
|
"fl.dir": direction,
|
|
@@ -13,6 +16,7 @@
|
|
|
13
16
|
"fl.main": main,
|
|
14
17
|
p: pad,
|
|
15
18
|
gap: gap,
|
|
19
|
+
over: (scrollable === true) ? "auto" : null,
|
|
16
20
|
...$$restProps
|
|
17
21
|
}
|
|
18
22
|
</script>
|
package/src/layout/grid.svelte
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import wsx from "../wsx.mjs"
|
|
3
5
|
|
|
@@ -8,6 +10,7 @@
|
|
|
8
10
|
export let rows = null
|
|
9
11
|
export let autoCol = false
|
|
10
12
|
export let autoRow = false
|
|
13
|
+
export let scrollable = false
|
|
11
14
|
|
|
12
15
|
$: wind = {
|
|
13
16
|
"gr.flow": direction,
|
|
@@ -17,6 +20,7 @@
|
|
|
17
20
|
"gr.rows.a": autoRow,
|
|
18
21
|
p: pad,
|
|
19
22
|
gap: gap,
|
|
23
|
+
over: (scrollable === true) ? "auto" : null,
|
|
20
24
|
...$$restProps
|
|
21
25
|
}
|
|
22
26
|
</script>
|
package/src/layout/modal.svelte
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script context="module">
|
|
2
4
|
let topClose = null
|
|
3
5
|
</script>
|
|
@@ -42,7 +44,7 @@
|
|
|
42
44
|
let visible = null
|
|
43
45
|
</script>
|
|
44
46
|
|
|
45
|
-
<input type="checkbox" bind:this={visible} ws-x="disp
|
|
47
|
+
<input type="checkbox" bind:this={visible} ws-x="[disp none]" />
|
|
46
48
|
{#if resolver !== null}
|
|
47
49
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
48
50
|
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
package/src/layout/paper.svelte
CHANGED
package/src/layout/screen.svelte
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script context="module">
|
|
2
4
|
const ctxStack = Symbol("stack context")
|
|
3
5
|
const ctxClose = Symbol("close context")
|
|
@@ -20,8 +22,8 @@
|
|
|
20
22
|
setContext(ctxStack, stack + 1)
|
|
21
23
|
|
|
22
24
|
$: wind = {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
+
"@stack": stack.toString(),
|
|
26
|
+
"@screen-width": width,
|
|
25
27
|
"bg.c": "transparent",
|
|
26
28
|
...$$restProps
|
|
27
29
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import wsx from "../wsx.mjs"
|
|
3
5
|
|
|
4
6
|
export let size = "100px"
|
|
5
|
-
export let color = "primary"
|
|
7
|
+
export let color = "@primary"
|
|
6
8
|
|
|
7
9
|
$: wind = {
|
|
8
|
-
"
|
|
10
|
+
"@size": size,
|
|
9
11
|
"$color": color,
|
|
10
12
|
}
|
|
11
13
|
</script>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
<svelte:options immutable />
|
|
2
|
+
|
|
1
3
|
<script>
|
|
2
4
|
import wsx from "../wsx.mjs"
|
|
3
5
|
|
|
4
6
|
export let size = "100px"
|
|
5
|
-
export let color = "primary"
|
|
7
|
+
export let color = "@primary"
|
|
6
8
|
|
|
7
9
|
$: wind = {
|
|
8
|
-
"
|
|
10
|
+
"@size": size,
|
|
9
11
|
"$color": color,
|
|
10
12
|
}
|
|
11
13
|
</script>
|
package/src/spinner/spinners.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
1
|
# Spinners
|
|
2
|
+
Zephyr exports the CircleSpinner and HexagonSpinner components as wrappers for
|
|
3
|
+
windstorms spinners of the same name. Both spinners are svgs with a bit of code
|
|
4
|
+
setup as web components.
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
## Props
|
|
7
|
+
|
|
8
|
+
### color
|
|
9
|
+
Sets the $color macro.
|
|
10
|
+
|
|
11
|
+
### size
|
|
12
|
+
The size of the spinner (width and height). Uses css units.
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
```svelte
|
|
16
|
+
<script>
|
|
17
|
+
import { HexagonSpinner } from "@axel669/zephyr"
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<HexagonSpinner size="50px" />
|
|
21
|
+
<HexagonSpinner size="500px" color="@secondary" />
|
|
22
|
+
```
|
package/src/text.svelte
CHANGED