@axel669/zephyr 0.2.0-beta.1 → 0.2.0-beta.2

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 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.2",
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,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
@@ -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>
@@ -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
@@ -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>
@@ -16,7 +16,7 @@
16
16
  $: type = variant({ fill, outline, flat })
17
17
 
18
18
  $: wind = {
19
- "@button": button,
19
+ "$button": button,
20
20
  [type]: true,
21
21
  "$color": color,
22
22
  ...$$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
  ```
@@ -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">
@@ -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 },
@@ -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 />
@@ -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" />
@@ -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
  ```
@@ -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>
@@ -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
@@ -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
  ```
@@ -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>
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
@@ -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
@@ -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>
@@ -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>
@@ -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 })
@@ -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>
@@ -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