@axel669/zephyr 0.3.4-beta.0 → 0.3.8

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.
Files changed (86) hide show
  1. package/package.json +2 -2
  2. package/readme.md +63 -63
  3. package/src/async/button.md +27 -27
  4. package/src/async/button.svelte +29 -29
  5. package/src/async/load-zone.md +42 -42
  6. package/src/async/load-zone.svelte +22 -22
  7. package/src/composed/data-table/th.md +21 -21
  8. package/src/composed/data-table/th.svelte +61 -61
  9. package/src/composed/data-table.md +86 -86
  10. package/src/composed/data-table.svelte +199 -199
  11. package/src/composed/entry-button.md +44 -44
  12. package/src/composed/entry-button.svelte +31 -31
  13. package/src/composed/table-functions.js +13 -13
  14. package/src/composed/toast/message.svelte +56 -56
  15. package/src/composed/toast.md +45 -45
  16. package/src/composed/toast.svelte +70 -70
  17. package/src/control/button.md +41 -41
  18. package/src/control/button.svelte +27 -27
  19. package/src/control/input.md +87 -87
  20. package/src/control/input.svelte +109 -109
  21. package/src/control/label.md +48 -48
  22. package/src/control/label.svelte +38 -38
  23. package/src/control/link.md +50 -50
  24. package/src/control/link.svelte +32 -32
  25. package/src/control/radio.md +58 -58
  26. package/src/control/radio.svelte +28 -28
  27. package/src/control/select.md +70 -70
  28. package/src/control/select.svelte +64 -64
  29. package/src/control/tabs.md +47 -47
  30. package/src/control/tabs.svelte +43 -43
  31. package/src/control/toggle.md +61 -61
  32. package/src/control/toggle.svelte +49 -49
  33. package/src/data-display/avatar.md +36 -36
  34. package/src/data-display/avatar.svelte +25 -25
  35. package/src/data-display/badge.md +30 -30
  36. package/src/data-display/badge.svelte +14 -14
  37. package/src/data-display/chip.md +36 -36
  38. package/src/data-display/chip.svelte +28 -28
  39. package/src/data-display/details.md +42 -42
  40. package/src/data-display/details.svelte +25 -25
  41. package/src/data-display/popover.md +32 -32
  42. package/src/data-display/popover.svelte +25 -25
  43. package/src/data-display/progress.md +46 -46
  44. package/src/data-display/progress.svelte +27 -27
  45. package/src/data-display/table.md +59 -59
  46. package/src/data-display/table.svelte +38 -38
  47. package/src/data-display/tooltip.md +29 -29
  48. package/src/data-display/tooltip.svelte +17 -17
  49. package/src/dialogs/alert.md +42 -42
  50. package/src/dialogs/alert.svelte +34 -34
  51. package/src/dialogs/confirm.md +56 -56
  52. package/src/dialogs/confirm.svelte +45 -45
  53. package/src/functions.md +108 -108
  54. package/src/handler$.mjs +20 -20
  55. package/src/hash.js +14 -14
  56. package/src/index.mjs +53 -53
  57. package/src/info/icon.md +21 -21
  58. package/src/info/icon.svelte +9 -9
  59. package/src/info/notification.md +36 -36
  60. package/src/info/notification.svelte +16 -16
  61. package/src/info/titlebar.md +75 -75
  62. package/src/info/titlebar.svelte +18 -18
  63. package/src/info/toaster.md +26 -26
  64. package/src/info/toaster.svelte +14 -14
  65. package/src/inline-dialog.svelte +23 -23
  66. package/src/layout/dialog.md +43 -43
  67. package/src/layout/dialog.svelte +26 -26
  68. package/src/layout/drawer.md +70 -70
  69. package/src/layout/drawer.svelte +49 -49
  70. package/src/layout/flex.md +43 -43
  71. package/src/layout/flex.svelte +26 -26
  72. package/src/layout/grid.md +61 -61
  73. package/src/layout/grid.svelte +30 -30
  74. package/src/layout/modal.md +50 -50
  75. package/src/layout/modal.svelte +60 -60
  76. package/src/layout/paper.md +94 -94
  77. package/src/layout/paper.svelte +47 -47
  78. package/src/layout/screen.md +33 -33
  79. package/src/layout/screen.svelte +34 -34
  80. package/src/spinner/circle-spinner.svelte +15 -15
  81. package/src/spinner/hexagon-spinner.svelte +15 -15
  82. package/src/spinner/spinners.md +22 -22
  83. package/src/text.md +34 -34
  84. package/src/text.svelte +22 -22
  85. package/src/variant.mjs +12 -12
  86. package/src/wsx.mjs +24 -24
@@ -1,43 +1,43 @@
1
- # Dialog
2
-
3
- A modal container for creating dialogs. The Dialog component is a modal
4
- element that uses a Paper element for the layout of content. All props and
5
- slots for the Dialog are passed to the underlying Paper component.
6
-
7
- The Dialog component is used as a wrapper for content and is used in
8
- conjunction with the Modal component to be controlled on screen.
9
-
10
- ## Props
11
- This component just wraps a [Paper](./paper.md) component with some extra parts,
12
- and passes the props to a `Paper`.
13
-
14
- ## Example
15
- `cool-dialog.svelte`
16
- ```svelte
17
- <script>
18
- import { Dialog, Titlebar, Text } from "@axel669/zephyr"
19
- </script>
20
-
21
- <Dialog>
22
- <Titlebar slot="header">
23
- <Text slot="title" title>
24
- Some Title
25
- </Text>
26
- </Titlebar>
27
-
28
- <span>Content</span>
29
- </Dialog>
30
- ```
31
-
32
- `app.svelte`
33
- ```svelte
34
- <script>
35
- import { Modal, EntryButton } from "@axel669/zephyr"
36
- import CoolDialog from "./cool-dialog.svelte"
37
- </script>
38
-
39
- <Modal component={CoolDialog} />
40
- <EntryButton this={Modal} component={CoolDialog}>
41
- Open Cool Dialog
42
- </EntryButton>
43
- ```
1
+ # Dialog
2
+
3
+ A modal container for creating dialogs. The Dialog component is a modal
4
+ element that uses a Paper element for the layout of content. All props and
5
+ slots for the Dialog are passed to the underlying Paper component.
6
+
7
+ The Dialog component is used as a wrapper for content and is used in
8
+ conjunction with the Modal component to be controlled on screen.
9
+
10
+ ## Props
11
+ This component just wraps a [Paper](./paper.md) component with some extra parts,
12
+ and passes the props to a `Paper`.
13
+
14
+ ## Example
15
+ `cool-dialog.svelte`
16
+ ```svelte
17
+ <script>
18
+ import { Dialog, Titlebar, Text } from "@axel669/zephyr"
19
+ </script>
20
+
21
+ <Dialog>
22
+ <Titlebar slot="header">
23
+ <Text slot="title" title>
24
+ Some Title
25
+ </Text>
26
+ </Titlebar>
27
+
28
+ <span>Content</span>
29
+ </Dialog>
30
+ ```
31
+
32
+ `app.svelte`
33
+ ```svelte
34
+ <script>
35
+ import { Modal, EntryButton } from "@axel669/zephyr"
36
+ import CoolDialog from "./cool-dialog.svelte"
37
+ </script>
38
+
39
+ <Modal component={CoolDialog} />
40
+ <EntryButton this={Modal} component={CoolDialog}>
41
+ Open Cool Dialog
42
+ </EntryButton>
43
+ ```
@@ -1,26 +1,26 @@
1
- <svelte:options immutable />
2
-
3
- <script>
4
- import { fade } from "svelte/transition"
5
-
6
- import wsx from "../wsx.mjs"
7
-
8
- import Paper from "./paper.svelte"
9
-
10
- const trick = (node, options) => ({
11
- delay: 0,
12
- duration: 250,
13
- css: () => "",
14
- })
15
- </script>
16
-
17
- <!-- svelte-ignore a11y-click-events-have-key-events -->
18
- <!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
19
- <wind-wrapper transition:trick ws-x="@dialog [grid]" on:click|stopPropagation
20
- role="dialog">
21
- <Paper {...$$props}>
22
- <slot name="header" slot="header" />
23
- <slot />
24
- <slot name="footer" slot="footer" />
25
- </Paper>
26
- </wind-wrapper>
1
+ <svelte:options immutable />
2
+
3
+ <script>
4
+ import { fade } from "svelte/transition"
5
+
6
+ import wsx from "../wsx.mjs"
7
+
8
+ import Paper from "./paper.svelte"
9
+
10
+ const trick = (node, options) => ({
11
+ delay: 0,
12
+ duration: 250,
13
+ css: () => "",
14
+ })
15
+ </script>
16
+
17
+ <!-- svelte-ignore a11y-click-events-have-key-events -->
18
+ <!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
19
+ <wind-wrapper transition:trick ws-x="@dialog [grid]" on:click|stopPropagation
20
+ role="dialog">
21
+ <Paper {...$$props}>
22
+ <slot name="header" slot="header" />
23
+ <slot />
24
+ <slot name="footer" slot="footer" />
25
+ </Paper>
26
+ </wind-wrapper>
@@ -1,70 +1,70 @@
1
- # Drawer
2
-
3
- A modal container for creating dialogs. The Dialog component is a modal
4
- element that uses a Paper element for the layout of content. All extra props
5
- and slots for the Drawer are passed to the underlying Paper component.
6
-
7
- The Drawer component is used as a wrapper for content and is used in
8
- conjunction with the Modal component to be controlled on screen.
9
-
10
- ## Props
11
-
12
- ### close
13
- `function`
14
-
15
- If passed, this function will be called when the user clicks in the
16
- empty area outside of the drawer contents.
17
-
18
- ### height
19
- `string`
20
-
21
- Sets the height of the select drawer, no effect for menu and action
22
- drawers which default to full height of the window.
23
-
24
- ### type
25
- `string`
26
-
27
- The type of drawer. Default is "menu"
28
- #### "menu"
29
-
30
- Makes a drawer that slides in on the left side of the screen
31
-
32
- #### "action"
33
-
34
- Makes a drawer that slides in on the right side of the screen
35
-
36
- #### "select"
37
-
38
- Makes a drawer that is centered horizontally and slides in from
39
- the top of the screen
40
-
41
- ## Example
42
- `cool-drawer.svelte`
43
- ```svelte
44
- <script>
45
- import { Drawer, Titlebar, Text } from "@axel669/zephyr"
46
- </script>
47
-
48
- <Drawer>
49
- <Titlebar slot="header">
50
- <Text slot="title" title>
51
- Some Title
52
- </Text>
53
- </Titlebar>
54
-
55
- <span>Content</span>
56
- </Drawer>
57
- ```
58
-
59
- `app.svelte`
60
- ```svelte
61
- <script>
62
- import { Modal, EntryButton } from "@axel669/zephyr"
63
- import CoolDrawer from "./cool-drawer.svelte"
64
- </script>
65
-
66
- <Modal component={CoolDrawer} />
67
- <EntryButton this={Modal} component={CoolDrawer}>
68
- Open Cool Dialog
69
- </EntryButton>
70
- ```
1
+ # Drawer
2
+
3
+ A modal container for creating dialogs. The Dialog component is a modal
4
+ element that uses a Paper element for the layout of content. All extra props
5
+ and slots for the Drawer are passed to the underlying Paper component.
6
+
7
+ The Drawer component is used as a wrapper for content and is used in
8
+ conjunction with the Modal component to be controlled on screen.
9
+
10
+ ## Props
11
+
12
+ ### close
13
+ `function`
14
+
15
+ If passed, this function will be called when the user clicks in the
16
+ empty area outside of the drawer contents.
17
+
18
+ ### height
19
+ `string`
20
+
21
+ Sets the height of the select drawer, no effect for menu and action
22
+ drawers which default to full height of the window.
23
+
24
+ ### type
25
+ `string`
26
+
27
+ The type of drawer. Default is "menu"
28
+ #### "menu"
29
+
30
+ Makes a drawer that slides in on the left side of the screen
31
+
32
+ #### "action"
33
+
34
+ Makes a drawer that slides in on the right side of the screen
35
+
36
+ #### "select"
37
+
38
+ Makes a drawer that is centered horizontally and slides in from
39
+ the top of the screen
40
+
41
+ ## Example
42
+ `cool-drawer.svelte`
43
+ ```svelte
44
+ <script>
45
+ import { Drawer, Titlebar, Text } from "@axel669/zephyr"
46
+ </script>
47
+
48
+ <Drawer>
49
+ <Titlebar slot="header">
50
+ <Text slot="title" title>
51
+ Some Title
52
+ </Text>
53
+ </Titlebar>
54
+
55
+ <span>Content</span>
56
+ </Drawer>
57
+ ```
58
+
59
+ `app.svelte`
60
+ ```svelte
61
+ <script>
62
+ import { Modal, EntryButton } from "@axel669/zephyr"
63
+ import CoolDrawer from "./cool-drawer.svelte"
64
+ </script>
65
+
66
+ <Modal component={CoolDrawer} />
67
+ <EntryButton this={Modal} component={CoolDrawer}>
68
+ Open Cool Dialog
69
+ </EntryButton>
70
+ ```
@@ -1,49 +1,49 @@
1
- <svelte:options immutable />
2
-
3
- <script context="module">
4
- const defs = {
5
- select: {
6
- "@select": true,
7
- "w.min": "35vw",
8
- grid: true,
9
- over: "hidden"
10
- },
11
- menu: {
12
- "@menu": true,
13
- },
14
- action: {
15
- "@action": true,
16
- }
17
- }
18
- </script>
19
-
20
- <script>
21
- import wsx from "../wsx.mjs"
22
-
23
- import Paper from "./paper.svelte"
24
-
25
- export let height
26
- export let type = "menu"
27
-
28
- const trick = (node, options) => ({
29
- delay: 0,
30
- duration: 250,
31
- css: () => "",
32
- })
33
-
34
- $: container = {
35
- ...defs[type],
36
- h: (type === "select") ? height : "100%",
37
- grid: true,
38
- }
39
- </script>
40
- <!-- svelte-ignore a11y-click-events-have-key-events -->
41
- <!-- svelte-ignore a11y-interactive-supports-focus -->
42
- <wind-drawer-container use:wsx={container} on:click|stopPropagation
43
- role="menubar" transition:trick>
44
- <Paper {...$$restProps}>
45
- <slot name="header" slot="header" />
46
- <slot />
47
- <slot name="footer" slot="footer" />
48
- </Paper>
49
- </wind-drawer-container>
1
+ <svelte:options immutable />
2
+
3
+ <script context="module">
4
+ const defs = {
5
+ select: {
6
+ "@select": true,
7
+ "w.min": "35vw",
8
+ grid: true,
9
+ over: "hidden"
10
+ },
11
+ menu: {
12
+ "@menu": true,
13
+ },
14
+ action: {
15
+ "@action": true,
16
+ }
17
+ }
18
+ </script>
19
+
20
+ <script>
21
+ import wsx from "../wsx.mjs"
22
+
23
+ import Paper from "./paper.svelte"
24
+
25
+ export let height
26
+ export let type = "menu"
27
+
28
+ const trick = (node, options) => ({
29
+ delay: 0,
30
+ duration: 250,
31
+ css: () => "",
32
+ })
33
+
34
+ $: container = {
35
+ ...defs[type],
36
+ h: (type === "select") ? height : "100%",
37
+ grid: true,
38
+ }
39
+ </script>
40
+ <!-- svelte-ignore a11y-click-events-have-key-events -->
41
+ <!-- svelte-ignore a11y-interactive-supports-focus -->
42
+ <wind-drawer-container use:wsx={container} on:click|stopPropagation
43
+ role="menubar" transition:trick>
44
+ <Paper {...$$restProps}>
45
+ <slot name="header" slot="header" />
46
+ <slot />
47
+ <slot name="footer" slot="footer" />
48
+ </Paper>
49
+ </wind-drawer-container>
@@ -1,43 +1,43 @@
1
- # Flex
2
-
3
- Container that uses flex layout by default with some nice default values.
4
-
5
- ## Props
6
-
7
- ### direction
8
- `string`
9
-
10
- Sets `fl.dir`
11
-
12
- ### pad
13
- `string`
14
-
15
- Sets `p`
16
-
17
- ### gap
18
- `string`
19
-
20
- Sets `gap`
21
-
22
- ### cross
23
- `string`
24
-
25
- Sets `fl.cross`, default is `"stretch"`
26
-
27
- ### main
28
- `string`
29
-
30
- Sets `fl.main`, default is `"start"`
31
-
32
- ## Example
33
- ```svelte
34
- <script>
35
- import { Flex, Text } from "@axel669/zephyr"
36
- </script>
37
-
38
- <Flex cross="stretch">
39
- <Text>Content</Text>
40
- <Text>More content</Text>
41
- <Text>Event more content</Text>
42
- <Flex>
43
- ```
1
+ # Flex
2
+
3
+ Container that uses flex layout by default with some nice default values.
4
+
5
+ ## Props
6
+
7
+ ### direction
8
+ `string`
9
+
10
+ Sets `fl.dir`
11
+
12
+ ### pad
13
+ `string`
14
+
15
+ Sets `p`
16
+
17
+ ### gap
18
+ `string`
19
+
20
+ Sets `gap`
21
+
22
+ ### cross
23
+ `string`
24
+
25
+ Sets `fl.cross`, default is `"stretch"`
26
+
27
+ ### main
28
+ `string`
29
+
30
+ Sets `fl.main`, default is `"start"`
31
+
32
+ ## Example
33
+ ```svelte
34
+ <script>
35
+ import { Flex, Text } from "@axel669/zephyr"
36
+ </script>
37
+
38
+ <Flex cross="stretch">
39
+ <Text>Content</Text>
40
+ <Text>More content</Text>
41
+ <Text>Event more content</Text>
42
+ <Flex>
43
+ ```
@@ -1,26 +1,26 @@
1
- <svelte:options immutable />
2
-
3
- <script>
4
- import wsx from "../wsx.mjs"
5
-
6
- export let direction = false
7
- export let pad = false
8
- export let gap = false
9
- export let cross = "stretch"
10
- export let main = "start"
11
- export let scrollable = false
12
-
13
- $: wind = {
14
- "fl.dir": direction,
15
- "fl.cross": cross,
16
- "fl.main": main,
17
- p: pad,
18
- gap: gap,
19
- over: (scrollable === true) ? "auto" : null,
20
- ...$$restProps
21
- }
22
- </script>
23
-
24
- <ws-flex use:wsx={wind}>
25
- <slot />
26
- </ws-flex>
1
+ <svelte:options immutable />
2
+
3
+ <script>
4
+ import wsx from "../wsx.mjs"
5
+
6
+ export let direction = false
7
+ export let pad = false
8
+ export let gap = false
9
+ export let cross = "stretch"
10
+ export let main = "start"
11
+ export let scrollable = false
12
+
13
+ $: wind = {
14
+ "fl.dir": direction,
15
+ "fl.cross": cross,
16
+ "fl.main": main,
17
+ p: pad,
18
+ gap: gap,
19
+ over: (scrollable === true) ? "auto" : null,
20
+ ...$$restProps
21
+ }
22
+ </script>
23
+
24
+ <ws-flex use:wsx={wind}>
25
+ <slot />
26
+ </ws-flex>
@@ -1,61 +1,61 @@
1
- # Grid
2
-
3
- Container that uses grid layout by default with some nice default values.
4
-
5
- ## Base
6
- [Windstorm Grid](https://axel669.github.io/lib.windstorm/#components-grid)
7
-
8
- ## Props
9
- All [windstorm functions](https://axel669.github.io/lib.windstorm/#css-shorthands)
10
- are supported.
11
-
12
-
13
- ### direction
14
- `string`
15
-
16
- Sets `gr.flow`
17
-
18
- ### pad
19
- `string`
20
-
21
- Sets `p`
22
-
23
- ### gap
24
- `string`
25
-
26
- Sets `gap`
27
-
28
- ### cols
29
- `string|Array`
30
-
31
- Sets `gr.cols`. Accepts either an array of values that are joined by " "
32
- or a regular string value.
33
-
34
- ### rows
35
- `string|Array`
36
-
37
- Sets `gr.rows`. Accepts either an array of values that are joined by " "
38
- or a regular string value.
39
-
40
- ### autoCol
41
- `string`
42
-
43
- Sets `gr.cols.a`
44
-
45
- ### autoRow
46
- `string`
47
-
48
- Sets `gr.rows.a`
49
-
50
- ## Example
51
- ```svelte
52
- <script>
53
- import { Grid, Text } from "@axel669/zephyr"
54
- </script>
55
-
56
- <Grid cols="1fr 1fr">
57
- <Text>Content</Text>
58
- <Text>More content</Text>
59
- <Text>Event more content</Text>
60
- <Grid>
61
- ```
1
+ # Grid
2
+
3
+ Container that uses grid layout by default with some nice default values.
4
+
5
+ ## Base
6
+ [Windstorm Grid](https://axel669.github.io/lib.windstorm/#components-grid)
7
+
8
+ ## Props
9
+ All [windstorm functions](https://axel669.github.io/lib.windstorm/#css-shorthands)
10
+ are supported.
11
+
12
+
13
+ ### direction
14
+ `string`
15
+
16
+ Sets `gr.flow`
17
+
18
+ ### pad
19
+ `string`
20
+
21
+ Sets `p`
22
+
23
+ ### gap
24
+ `string`
25
+
26
+ Sets `gap`
27
+
28
+ ### cols
29
+ `string|Array`
30
+
31
+ Sets `gr.cols`. Accepts either an array of values that are joined by " "
32
+ or a regular string value.
33
+
34
+ ### rows
35
+ `string|Array`
36
+
37
+ Sets `gr.rows`. Accepts either an array of values that are joined by " "
38
+ or a regular string value.
39
+
40
+ ### autoCol
41
+ `string`
42
+
43
+ Sets `gr.cols.a`
44
+
45
+ ### autoRow
46
+ `string`
47
+
48
+ Sets `gr.rows.a`
49
+
50
+ ## Example
51
+ ```svelte
52
+ <script>
53
+ import { Grid, Text } from "@axel669/zephyr"
54
+ </script>
55
+
56
+ <Grid cols="1fr 1fr">
57
+ <Text>Content</Text>
58
+ <Text>More content</Text>
59
+ <Text>Event more content</Text>
60
+ <Grid>
61
+ ```