@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.
Files changed (62) hide show
  1. package/package.json +2 -2
  2. package/readme.md +11 -3
  3. package/src/async/load-zone.svelte +4 -1
  4. package/src/composed/data-table/th.svelte +2 -1
  5. package/src/composed/data-table.md +2 -0
  6. package/src/composed/data-table.svelte +32 -19
  7. package/src/composed/entry-button.svelte +2 -0
  8. package/src/composed/toast.svelte +2 -0
  9. package/src/control/button.md +4 -0
  10. package/src/control/button.svelte +2 -0
  11. package/src/control/input.svelte +2 -0
  12. package/src/control/label.md +4 -0
  13. package/src/control/label.svelte +2 -0
  14. package/src/control/link.md +4 -0
  15. package/src/control/link.svelte +3 -1
  16. package/src/control/radio.md +3 -1
  17. package/src/control/radio.svelte +2 -0
  18. package/src/control/select.md +2 -0
  19. package/src/control/select.svelte +2 -0
  20. package/src/control/tabs.md +2 -0
  21. package/src/control/tabs.svelte +3 -1
  22. package/src/control/toggle.md +6 -0
  23. package/src/control/toggle.svelte +2 -0
  24. package/src/data-display/avatar.md +4 -0
  25. package/src/data-display/avatar.svelte +2 -0
  26. package/src/data-display/badge.md +8 -2
  27. package/src/data-display/badge.svelte +2 -0
  28. package/src/data-display/chip.md +4 -0
  29. package/src/data-display/chip.svelte +2 -0
  30. package/src/data-display/details.svelte +2 -0
  31. package/src/data-display/popover.md +4 -0
  32. package/src/data-display/popover.svelte +2 -0
  33. package/src/data-display/progress.md +4 -0
  34. package/src/data-display/progress.svelte +3 -1
  35. package/src/data-display/table.svelte +2 -0
  36. package/src/data-display/tooltip.md +4 -0
  37. package/src/data-display/tooltip.svelte +2 -0
  38. package/src/dialogs/alert.svelte +2 -0
  39. package/src/dialogs/confirm.svelte +2 -0
  40. package/src/functions.md +6 -0
  41. package/src/index.mjs +2 -8
  42. package/src/info/icon.md +4 -0
  43. package/src/info/notification.md +4 -0
  44. package/src/info/titlebar.md +28 -2
  45. package/src/info/toaster.md +4 -0
  46. package/src/layout/dialog.md +9 -0
  47. package/src/layout/dialog.svelte +2 -0
  48. package/src/layout/drawer.md +9 -0
  49. package/src/layout/drawer.svelte +2 -0
  50. package/src/layout/flex.md +4 -0
  51. package/src/layout/flex.svelte +2 -0
  52. package/src/layout/grid.md +5 -1
  53. package/src/layout/grid.svelte +2 -0
  54. package/src/layout/modal.md +3 -0
  55. package/src/layout/modal.svelte +2 -0
  56. package/src/layout/paper.md +4 -0
  57. package/src/layout/paper.svelte +2 -0
  58. package/src/layout/screen.md +6 -1
  59. package/src/layout/screen.svelte +2 -0
  60. package/src/spinner/circle-spinner.svelte +2 -0
  61. package/src/spinner/hexagon-spinner.svelte +2 -0
  62. 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.1",
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.6",
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 { Button } from "@axel669/zephyr"
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={stuff}>
48
+ <Button on:click={handler}>
41
49
  I'm a button!
42
50
  </Button>
43
51
 
44
- <Wind.Button on:click={stuff}>
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>Loading</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]
@@ -1,3 +1,5 @@
1
+ NOTE: include Th as its own component
2
+
1
3
  # DataTable
2
4
 
3
5
  The DataTable is a more advanced way to show data on screen. Underneath is
@@ -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) => data.filter(
6
- (row) => {
7
- for (const [filter, value] of filters) {
8
- if (filter(row, value) === false) {
9
- return false
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
- return true
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
- applyFilters(data, filterFunctions)
60
- .sort(sorting.func)
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)
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import { createEventDispatcher } from "svelte"
3
5
 
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script context="module">
2
4
  const genID = () => `${Date.now()}:${Math.random().toString(16)}`
3
5
 
@@ -25,6 +25,10 @@ is true, or `$flat` if neither is true.
25
25
 
26
26
  ## Example
27
27
  ```svelte
28
+ <script>
29
+ import { Button } from "@axel669/zephyr"
30
+ </script>
31
+
28
32
  <Button on:click={action}>
29
33
  Flat Button
30
34
  </Button>
@@ -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"
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script context="module">
2
4
  const parseNumeric = (value) => {
3
5
  if (value === "") {
@@ -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
@@ -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"
@@ -37,6 +37,10 @@ is true, or `$flat` if neither is true.
37
37
 
38
38
  ## Example
39
39
  ```svelte
40
+ <script>
41
+ import { Link } from "@axel669/zephyr"
42
+ </script>
43
+
40
44
  <Link color="primary" href="test" target="_blank">
41
45
  Test
42
46
  </Link>
@@ -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
- "@button": button,
21
+ "$button": button,
20
22
  [type]: true,
21
23
  "$color": color,
22
24
  ...$$restProps
@@ -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-col="1fr 1fr" />
57
+ <Radio {options} bind:value={other} layout={Grid} gr.cols="1fr 1fr" />
56
58
  ```
@@ -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"
@@ -49,6 +49,8 @@ Labels and group names should be strings, but values can be any type.
49
49
  ## Example
50
50
  ```svelte
51
51
  <script>
52
+ import { Select } from "@axel669/zephyr"
53
+
52
54
  // Results in:
53
55
  // <option>first</option>
54
56
  // <optgroup label="Not Numbers">
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script context="module">
2
4
  const groupOptions = (options) => options.reduce(
3
5
  ({grouped, target = grouped}, item, pos) => {
@@ -34,6 +34,8 @@ changes and set to control which tab is selected.
34
34
  ## Example
35
35
  ```svelte
36
36
  <script>
37
+ import { Tabs } from "@axel669/zephyr"
38
+
37
39
  const options = [
38
40
  { label: "Left", value: "left" },
39
41
  { label: "Right", value: 2 },
@@ -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
- "@solid": solid,
25
+ "$solid": solid,
24
26
  "$color": color,
25
27
  $vert: vertical,
26
28
  ...$$restProps,
@@ -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 />
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -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" />
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -15,10 +15,16 @@ The badge text.
15
15
 
16
16
  ## Example
17
17
  ```svelte
18
- <Badge text="100">
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
  ```
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -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>
@@ -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"
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -15,6 +15,10 @@ content without needing to bind to the parent.
15
15
 
16
16
  ## Example
17
17
  ```svelte
18
+ <script>
19
+ import { Popover, Button } from "@axel669/zephyr"
20
+ </script>
21
+
18
22
  <Popover let:show>
19
23
  <Button on:click={show}>
20
24
  Show
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import { fade } from "svelte/transition"
3
5
  import wsx from "../wsx.mjs"
@@ -37,6 +37,10 @@ filled the bar is.
37
37
 
38
38
  ## Example
39
39
  ```svelte
40
+ <script>
41
+ import { Progress } from "@axel669/zephyr"
42
+ </script>
43
+
40
44
  <Progress color="primary" value={0.1} />
41
45
  <Progress color="primary" value={5} max={10} />
42
46
  ```
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -9,7 +11,7 @@
9
11
  export let label = null
10
12
 
11
13
  $: wind = {
12
- "@progress": true,
14
+ "$progress": true,
13
15
  "$outline": outline,
14
16
  "$color": color,
15
17
  $row: row,
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -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>
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -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"
@@ -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"
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
  ```
@@ -15,6 +15,10 @@ Sets `$color` and uses the fill style for coloration.
15
15
 
16
16
  ## Example
17
17
  ```svelte
18
+ <script>
19
+ import { Notification, Button, Icon } from "@axel669/zephyr"
20
+ </script>
21
+
18
22
  <Notification>
19
23
  <Icon name="info-hexagon">
20
24
  Some kind of information
@@ -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" color={false}>
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
  ```
@@ -12,6 +12,10 @@ for values.
12
12
 
13
13
  ## Example
14
14
  ```svelte
15
+ <script>
16
+ import { Toaster, Notification, Icon } from "@axel669/zephyr"
17
+ </script>
18
+
15
19
  <Toaster position="$tc">
16
20
  <Notification>
17
21
  <Icon name="info">
@@ -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
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import { fade } from "svelte/transition"
3
5
 
@@ -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
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script context="module">
2
4
  const defs = {
3
5
  select: {
@@ -31,6 +31,10 @@ Sets `fl.main`, default is `"start"`
31
31
 
32
32
  ## Example
33
33
  ```svelte
34
+ <script>
35
+ import { Flex, Text } from "@axel669/zephyr"
36
+ </script>
37
+
34
38
  <Flex cross="stretch">
35
39
  <Text>Content</Text>
36
40
  <Text>More content</Text>
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -49,7 +49,11 @@ Sets `gr.rows.a`
49
49
 
50
50
  ## Example
51
51
  ```svelte
52
- <Grid cross="stretch">
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>
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -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 })
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script context="module">
2
4
  let topClose = null
3
5
  </script>
@@ -57,6 +57,10 @@ papers for example)
57
57
 
58
58
  ## Example
59
59
  ```svelte
60
+ <script>
61
+ import { Paper, Tabs, Text, Titlebar } from "@axel669/zephyr"
62
+ </script>
63
+
60
64
  <Paper>
61
65
  <Titlebar slot="header">
62
66
  <Text slot="title" title>
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import Flex from "./flex.svelte"
3
5
  import wsx from "../wsx.mjs"
@@ -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
@@ -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")
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "../wsx.mjs"
3
5
 
package/src/text.svelte CHANGED
@@ -1,3 +1,5 @@
1
+ <svelte:options immutable />
2
+
1
3
  <script>
2
4
  import wsx from "./wsx.mjs"
3
5