@axel669/zephyr 0.2.0-beta.3 → 0.3.6

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 +33 -33
  2. package/readme.md +63 -63
  3. package/src/async/button.md +27 -0
  4. package/src/async/button.svelte +29 -31
  5. package/src/async/load-zone.md +42 -0
  6. package/src/async/load-zone.svelte +22 -20
  7. package/src/composed/data-table/th.md +21 -0
  8. package/src/composed/data-table/th.svelte +61 -61
  9. package/src/composed/data-table.md +86 -85
  10. package/src/composed/data-table.svelte +199 -149
  11. package/src/composed/entry-button.md +44 -34
  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 -36
  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 -0
  20. package/src/control/input.svelte +109 -109
  21. package/src/control/label.md +48 -49
  22. package/src/control/label.svelte +38 -38
  23. package/src/control/link.md +50 -50
  24. package/src/control/link.svelte +32 -30
  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 -41
  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 -3
  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 -7
  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 -3
  50. package/src/dialogs/alert.svelte +34 -34
  51. package/src/dialogs/confirm.md +56 -3
  52. package/src/dialogs/confirm.svelte +45 -45
  53. package/src/functions.md +108 -83
  54. package/src/handler$.mjs +20 -20
  55. package/src/hash.js +14 -0
  56. package/src/index.mjs +53 -52
  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 -24
  72. package/src/layout/grid.md +61 -61
  73. package/src/layout/grid.svelte +30 -28
  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 -3
  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,75 +1,75 @@
1
- # Titlebar
2
-
3
- The titlebar is used to set section titles with some style, and provides
4
- slots for buttons on either side of the title text. Works well as a header
5
- for Paper components.
6
-
7
- ## Props
8
-
9
- ### color
10
- `string`
11
-
12
- Sets `$color`
13
-
14
- ### fill
15
- `bool`
16
-
17
- Sets `$fill`
18
-
19
- ## Slots
20
-
21
- ### title
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.
25
-
26
- ### menu
27
- The area on the left of the titlebar (where drawer menus tend to open)
28
-
29
- ### action
30
- The area on the right of the titlebar
31
-
32
- ## Example
33
- ```svelte
34
- <script>
35
- import { Titlebar, Button, Paper, Text } from "@axel669/zephyr"
36
- </script>
37
-
38
- <Titlebar color="primary" fill>
39
- <Text title slot="title">
40
- Some Title
41
- </Text>
42
-
43
- <Button slot="menu">
44
- <Icon name="menu" />
45
- </Button>
46
- </Titlebar>
47
-
48
- <Paper>
49
- <Titlebar color="secondary" slot="header">
50
- <Text title slot="title">
51
- Paper Title
52
- <Text subtitle>
53
- Indented Subtitle
54
- </Text>
55
- </Text>
56
- </Titlebar>
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>
75
- ```
1
+ # Titlebar
2
+
3
+ The titlebar is used to set section titles with some style, and provides
4
+ slots for buttons on either side of the title text. Works well as a header
5
+ for Paper components.
6
+
7
+ ## Props
8
+
9
+ ### color
10
+ `string`
11
+
12
+ Sets `$color`
13
+
14
+ ### fill
15
+ `bool`
16
+
17
+ Sets `$fill`
18
+
19
+ ## Slots
20
+
21
+ ### title
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.
25
+
26
+ ### menu
27
+ The area on the left of the titlebar (where drawer menus tend to open)
28
+
29
+ ### action
30
+ The area on the right of the titlebar
31
+
32
+ ## Example
33
+ ```svelte
34
+ <script>
35
+ import { Titlebar, Button, Paper, Text } from "@axel669/zephyr"
36
+ </script>
37
+
38
+ <Titlebar color="primary" fill>
39
+ <Text title slot="title">
40
+ Some Title
41
+ </Text>
42
+
43
+ <Button slot="menu">
44
+ <Icon name="menu" />
45
+ </Button>
46
+ </Titlebar>
47
+
48
+ <Paper>
49
+ <Titlebar color="secondary" slot="header">
50
+ <Text title slot="title">
51
+ Paper Title
52
+ <Text subtitle>
53
+ Indented Subtitle
54
+ </Text>
55
+ </Text>
56
+ </Titlebar>
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>
75
+ ```
@@ -1,18 +1,18 @@
1
- <script>
2
- import wsx from "../wsx.mjs"
3
-
4
- export let color
5
- export let fill = false
6
-
7
- $: wind = {
8
- "$color": color,
9
- "$fill": fill,
10
- ...$$restProps
11
- }
12
- </script>
13
-
14
- <ws-titlebar use:wsx={wind}>
15
- <slot name="menu" />
16
- <slot name="title" />
17
- <slot name="action" />
18
- </ws-titlebar>
1
+ <script>
2
+ import wsx from "../wsx.mjs"
3
+
4
+ export let color
5
+ export let fill = false
6
+
7
+ $: wind = {
8
+ "$color": color,
9
+ "$fill": fill,
10
+ ...$$restProps
11
+ }
12
+ </script>
13
+
14
+ <ws-titlebar use:wsx={wind}>
15
+ <slot name="menu" />
16
+ <slot name="title" />
17
+ <slot name="action" />
18
+ </ws-titlebar>
@@ -1,26 +1,26 @@
1
- # Toaster
2
-
3
- The Toaster component is used for building popup notifications along the
4
- edges of the window.
5
-
6
- ## Props
7
-
8
- ### position
9
- Sets position of the toaster. See the
10
- [windstorm base](https://windstorm.axel669.net/lib/css/component/toaster)
11
- for values.
12
-
13
- ## Example
14
- ```svelte
15
- <script>
16
- import { Toaster, Notification, Icon } from "@axel669/zephyr"
17
- </script>
18
-
19
- <Toaster position="$tc">
20
- <Notification>
21
- <Icon name="info">
22
- Some kind of notification of things
23
- </Icon>
24
- </Notification>
25
- </Toaster>
26
- ```
1
+ # Toaster
2
+
3
+ The Toaster component is used for building popup notifications along the
4
+ edges of the window.
5
+
6
+ ## Props
7
+
8
+ ### position
9
+ Sets position of the toaster. See the
10
+ [windstorm base](https://windstorm.axel669.net/lib/css/component/toaster)
11
+ for values.
12
+
13
+ ## Example
14
+ ```svelte
15
+ <script>
16
+ import { Toaster, Notification, Icon } from "@axel669/zephyr"
17
+ </script>
18
+
19
+ <Toaster position="$tc">
20
+ <Notification>
21
+ <Icon name="info">
22
+ Some kind of notification of things
23
+ </Icon>
24
+ </Notification>
25
+ </Toaster>
26
+ ```
@@ -1,14 +1,14 @@
1
- <script>
2
- import wsx from "../wsx.mjs"
3
-
4
- export let position = "tc"
5
-
6
- $: wind = {
7
- [`$${position}`]: true,
8
- ...$$restProps,
9
- }
10
- </script>
11
-
12
- <ws-toaster use:wsx={wind}>
13
- <slot />
14
- </ws-toaster>
1
+ <script>
2
+ import wsx from "../wsx.mjs"
3
+
4
+ export let position = "tc"
5
+
6
+ $: wind = {
7
+ [`$${position}`]: true,
8
+ ...$$restProps,
9
+ }
10
+ </script>
11
+
12
+ <ws-toaster use:wsx={wind}>
13
+ <slot />
14
+ </ws-toaster>
@@ -1,23 +1,23 @@
1
- <script>
2
- import wsx from "../wsx.mjs"
3
-
4
- import Paper from "./paper.svelte"
5
-
6
- const id = Math.random().toString(16)
7
-
8
- $: paper = {
9
- "@dialog": true,
10
- "$outline": true,
11
- ...$$restProps
12
- }
13
- </script>
14
-
15
- <slot name="toggle" {id} />
16
- <input type="checkbox" ws-x="hide" {id} />
17
- <ws-modal>
18
- <ws-paper use:wsx={paper}>
19
- <slot name="header" {id} />
20
- <slot name="content" {id} />
21
- <slot name="footer" {id} />
22
- </ws-paper>
23
- </ws-modal>
1
+ <script>
2
+ import wsx from "../wsx.mjs"
3
+
4
+ import Paper from "./paper.svelte"
5
+
6
+ const id = Math.random().toString(16)
7
+
8
+ $: paper = {
9
+ "@dialog": true,
10
+ "$outline": true,
11
+ ...$$restProps
12
+ }
13
+ </script>
14
+
15
+ <slot name="toggle" {id} />
16
+ <input type="checkbox" ws-x="hide" {id} />
17
+ <ws-modal>
18
+ <ws-paper use:wsx={paper}>
19
+ <slot name="header" {id} />
20
+ <slot name="content" {id} />
21
+ <slot name="footer" {id} />
22
+ </ws-paper>
23
+ </ws-modal>
@@ -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
+ ```