@axel669/zephyr 0.3.8 → 0.4.5

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 (76) hide show
  1. package/package.json +40 -33
  2. package/src/async/button.svelte +16 -8
  3. package/src/composed/data-table/th.svelte +2 -2
  4. package/src/composed/data-table.svelte +4 -3
  5. package/src/composed/form.svelte +60 -0
  6. package/src/composed/table-functions.js +3 -1
  7. package/src/composed/toast/message.svelte +15 -38
  8. package/src/control/input.svelte +21 -41
  9. package/src/control/label.svelte +1 -1
  10. package/src/control/link.svelte +1 -1
  11. package/src/control/radio-group.svelte +21 -0
  12. package/src/control/select.svelte +5 -5
  13. package/src/control/tabs.svelte +9 -21
  14. package/src/control/toggle.svelte +2 -2
  15. package/src/data-display/avatar.svelte +4 -1
  16. package/src/data-display/badge.svelte +1 -1
  17. package/src/data-display/chip.svelte +1 -1
  18. package/src/data-display/popover.svelte +1 -1
  19. package/src/data-display/progress.svelte +2 -2
  20. package/src/data-display/table.svelte +1 -1
  21. package/src/dialogs/confirm.svelte +3 -3
  22. package/src/hash.js +3 -3
  23. package/src/index.mjs +11 -1
  24. package/src/info/notification.svelte +13 -1
  25. package/src/info/titlebar.svelte +21 -5
  26. package/src/layout/dialog.svelte +1 -1
  27. package/src/layout/drawer.svelte +4 -4
  28. package/src/layout/flex.svelte +0 -4
  29. package/src/layout/grid.svelte +4 -4
  30. package/src/layout/paper.svelte +13 -4
  31. package/src/routing/route.svelte +48 -0
  32. package/src/routing/routing.js +62 -0
  33. package/src/routing/title.svelte +26 -0
  34. package/src/spinner/circle-spinner.svelte +2 -1
  35. package/src/spinner/hexagon-spinner.svelte +2 -1
  36. package/src/text.svelte +2 -4
  37. package/src/wsx.mjs +9 -8
  38. package/src/async/button.md +0 -27
  39. package/src/async/load-zone.md +0 -42
  40. package/src/composed/data-table/th.md +0 -21
  41. package/src/composed/data-table.md +0 -86
  42. package/src/composed/entry-button.md +0 -44
  43. package/src/composed/toast.md +0 -45
  44. package/src/control/button.md +0 -41
  45. package/src/control/input.md +0 -87
  46. package/src/control/label.md +0 -48
  47. package/src/control/link.md +0 -50
  48. package/src/control/radio.md +0 -58
  49. package/src/control/radio.svelte +0 -28
  50. package/src/control/select.md +0 -70
  51. package/src/control/tabs.md +0 -47
  52. package/src/control/toggle.md +0 -61
  53. package/src/data-display/avatar.md +0 -36
  54. package/src/data-display/badge.md +0 -30
  55. package/src/data-display/chip.md +0 -36
  56. package/src/data-display/details.md +0 -42
  57. package/src/data-display/popover.md +0 -32
  58. package/src/data-display/progress.md +0 -46
  59. package/src/data-display/table.md +0 -59
  60. package/src/data-display/tooltip.md +0 -29
  61. package/src/dialogs/alert.md +0 -42
  62. package/src/dialogs/confirm.md +0 -56
  63. package/src/functions.md +0 -108
  64. package/src/info/icon.md +0 -21
  65. package/src/info/notification.md +0 -36
  66. package/src/info/titlebar.md +0 -75
  67. package/src/info/toaster.md +0 -26
  68. package/src/layout/dialog.md +0 -43
  69. package/src/layout/drawer.md +0 -70
  70. package/src/layout/flex.md +0 -43
  71. package/src/layout/grid.md +0 -61
  72. package/src/layout/modal.md +0 -50
  73. package/src/layout/paper.md +0 -94
  74. package/src/layout/screen.md +0 -33
  75. package/src/spinner/spinners.md +0 -22
  76. package/src/text.md +0 -34
@@ -1,61 +0,0 @@
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,50 +0,0 @@
1
- # Modal
2
-
3
- The Modal component is used to control when content should be shown that
4
- sits over the current content and prevents interaction with the content it
5
- covers. It is primarily used to show drawers, dialogs, and sub screens.
6
-
7
- The `show` function will display the component specified inside a ws-modal
8
- element, and can be awaited for an optional return value. The component
9
- displayed will be passed any props supplied to `show` and a `close` function
10
- that can be called to hide the component again. `close` can also be given
11
- an argument that will be used as the promise value from `show`.
12
-
13
- If a component that a modal displays exports a `cancel` function, then
14
- clicking the modal area outside the displayed component will call that
15
- `cancel` function, allowing any modal component to decide when/if it is
16
- closes in response to that event.
17
-
18
- ## Props
19
- Because the Modal does not render content of its own, it does not support
20
- any wind functions.
21
-
22
-
23
- ### component
24
- `Component`
25
-
26
- The component to display when `show` is called
27
-
28
- ## Functions
29
-
30
- ### `show(props?) -> Promise`
31
- Shows the given component and passes any props provided.
32
-
33
- ## Example
34
- ```svelte
35
- <script>
36
- import { Modal, Button } from "@axel669/zephyr"
37
- import CoolDialog from "./cool-dialog.svelte"
38
-
39
- let dialog = null
40
- const dialogThing = async () => {
41
- const value = await dialog.show({ a: 10, b: 12 })
42
- console.log(value)
43
- }
44
- </script>
45
-
46
- <Modal component={CoolDialog} bind:this={dialog} />
47
- <Button on:click={dialogThing}>
48
- Open Dialog
49
- </Button>
50
- ```
@@ -1,94 +0,0 @@
1
- # Paper
2
-
3
- The Paper component is a container that has slots for header and footer
4
- content that is independant from the regular content scrolling. It also uses
5
- Flex as a default layout for its slotted content, but allows any container
6
- to be used as a layout without increasing the indentation of all the content
7
- needlessly.
8
-
9
- ## Props
10
-
11
- ### color
12
- `string`
13
-
14
- Sets `$color`
15
-
16
- ### card
17
- `bool`
18
-
19
- Sets `$outline`
20
-
21
- ### square
22
- `bool`
23
-
24
- Sets `r[0px]`
25
-
26
- ### layout
27
- `Component`
28
-
29
- Sets the layout the card will use to display content. Default is Flex.
30
-
31
- ### scrollable
32
- `bool`
33
-
34
- Sets `over[auto]` on the layout component
35
-
36
- ### l-*
37
- Any prop that is prefixed with `l-` will be passed to the layout
38
- component, with the remaining props acting as the normal wind functions
39
- on the paper itself
40
-
41
- ## Slots
42
-
43
- ### header
44
- The header content for the Paper. Header content does not scroll with
45
- the regular content of the component (acts sticky)
46
-
47
- ### footer
48
- The footer content for the Paper. Same scrolling properties as the
49
- header slot
50
-
51
- ### content/default
52
- The default slot (unnamed) for Paper will be rendered in the layout
53
- component defined in the props. As an alternative, a content slot may
54
- be used that will be rendered directly in the content slot of the Paper
55
- without the layout component/props being rendered (useful when nesting
56
- papers for example)
57
-
58
- ## Example
59
- ```svelte
60
- <script>
61
- import { Paper, Tabs, Text, Titlebar } from "@axel669/zephyr"
62
- </script>
63
-
64
- <Paper>
65
- <Titlebar slot="header">
66
- <Text slot="title" title>
67
- Some Title
68
- </Text>
69
- </Titlebar>
70
-
71
- <div>Content 1</div>
72
- <div>Content 2</div>
73
- <div>Content 3</div>
74
- </Paper>
75
- <Paper l-pad="0px" m="4px">
76
- <Titlebar slot="header">
77
- <Text slot="title" title>
78
- Some Screen
79
- </Text>
80
- </Titlebar>
81
-
82
- <Paper slot="content">
83
- <Tabs slot="header" {options} bind:value />
84
-
85
- <div>Content 1</div>
86
- <div>Content 2</div>
87
- <div>Content 3</div>
88
- </Paper>
89
-
90
- <div slot="footer">
91
- Wat
92
- </div>
93
- </Paper>
94
- ```
@@ -1,33 +0,0 @@
1
- # Screen
2
-
3
- The screen is a container component that is used for displaying content
4
- over its parent and stacks as more screens are displayed. Screens that stack
5
- on top of a parent screen use the Modal to control when they are shown and
6
- pass values back from child screens. The stacking effect of the Screen is
7
- controlled by internally tracked svelte context, so no manual effort is
8
- required to get stacking screens to have the effect.
9
-
10
- ## Props
11
-
12
- ### width
13
- `string`
14
-
15
- The width of the screen before stack-based padding is applied
16
-
17
- ## Example
18
- ```svelte
19
- <script>
20
- import { Scren, Button, Paper } from "@axel669/zephyr"
21
-
22
- export let close
23
- </script>
24
-
25
- <Screen width="70%">
26
- <Paper>
27
- This screen is pretty cool I swear
28
- <Button on:click={() => close("hi")}>
29
- Close
30
- </Button>
31
- </Paper>
32
- </Screen>
33
- ```
@@ -1,22 +0,0 @@
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.
5
-
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.md DELETED
@@ -1,34 +0,0 @@
1
- # Text
2
-
3
- Simple component with some common props for types of text.
4
-
5
- ## Props
6
-
7
-
8
- ### adorn
9
- `bool`
10
-
11
- Sets `$adorn`
12
-
13
- ### block
14
- `bool`
15
-
16
- Sets `block`
17
-
18
- ### subtitle
19
- `bool`
20
-
21
- Sets `$subtitle`
22
-
23
- ### title
24
- `bool`
25
-
26
- Sets `$title`
27
-
28
- ## Example
29
- ```svelte
30
- <Text>Some text</Text>
31
- <Text title>Bigger text</Text>
32
- <Text subtitle>Smaller text</Text>
33
- <Text block>Text on its own line</Text>
34
- ```