drab 3.0.3 → 3.0.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.
package/README.md CHANGED
@@ -27,7 +27,7 @@ npm install -D drab
27
27
 
28
28
  The library provides inline documentation for each component, allowing you to conveniently access the documentation by hovering over the component in your text editor after importing it. Additionally, every prop is documented using JSDoc and TypeScript. By hovering over a prop, you can retrieve its type and description.
29
29
 
30
- These docs use the [TailwindCSS Typography plugin](https://tailwindcss.com/docs/typography-plugin) for base styles along with a few custom utility classes you can find [here](https://github.com/rossrobino/drab/blob/main/src/app.postcss). Styles on this site are based on [shadcn/ui](https://ui.shadcn.com/).
30
+ These docs use the [TailwindCSS Typography plugin](https://tailwindcss.com/docs/typography-plugin). Styles on this site are based on [shadcn/ui](https://ui.shadcn.com/).
31
31
 
32
32
  ## Other UI Libraries
33
33
 
@@ -50,11 +50,11 @@ Here's a SvelteKit example using CSS imported in a layout. By using a layout, th
50
50
 
51
51
  ```css
52
52
  /* src/app.css */
53
- .btn {
54
- color: white;
55
- background-color: black;
53
+ .button {
56
54
  border-radius: 5px;
55
+ background-color: black;
57
56
  padding: 5px;
57
+ color: white;
58
58
  }
59
59
  ```
60
60
 
@@ -73,7 +73,7 @@ Here's a SvelteKit example using CSS imported in a layout. By using a layout, th
73
73
  import { FullscreenButton } from "drab";
74
74
  </script>
75
75
 
76
- <FullscreenButton class="btn" />
76
+ <FullscreenButton class="button" />
77
77
  ```
78
78
 
79
79
  ### Global modifier
@@ -86,14 +86,14 @@ Alternatively, the [`:global()` modifier](https://svelte.dev/docs/svelte-compone
86
86
  import { FullscreenButton } from "drab";
87
87
  </script>
88
88
 
89
- <FullscreenButton class="btn" />
89
+ <FullscreenButton class="button" />
90
90
 
91
91
  <style>
92
- :global(.btn) {
93
- color: white;
94
- background-color: black;
92
+ :global(.button) {
95
93
  border-radius: 5px;
94
+ background-color: black;
96
95
  padding: 5px;
96
+ color: white;
97
97
  }
98
98
  </style>
99
99
  ```
@@ -108,7 +108,7 @@ Since this is an unstyled library, simple components like a badge that can be ea
108
108
 
109
109
  ### Local Development
110
110
 
111
- Contribute to the project, or use **drab** as a template for another component library. This library is built with SvelteKit, TypeScript, and npm. The package contents are located in `src/lib`, the site is contained within `src/routes` and `src/site`. The site is deployed to Vercel using `@sveltejs/adapter-vercel`. If you are using this project as a template, be sure to [update the adapter](https://kit.svelte.dev/docs/adapters) based on how you deploy.
111
+ Contribute to the project, or use **drab** as a template for another component library. This library is built with SvelteKit, TypeScript, and npm. The package contents are located in `src/lib`, the site is contained within `src/routes` and `src/site`. If you are using this project as a template, be sure to [update the adapter](https://kit.svelte.dev/docs/adapters) based on how you deploy.
112
112
 
113
113
  #### Make changes
114
114
 
@@ -21,7 +21,7 @@ With SvelteKit, this component can be wrapped in an `{#if dev}` block that check
21
21
  </script>
22
22
 
23
23
  <Breakpoint
24
- class="inline-block rounded border bg-white px-2 py-1 font-mono tabular-nums shadow"
24
+ class="inline-block rounded border px-3 py-2 font-mono text-sm tabular-nums shadow"
25
25
  />
26
26
  ```
27
27
  -->
@@ -37,7 +37,7 @@ export type BreakpointSlots = typeof __propDef.slots;
37
37
  * </script>
38
38
  *
39
39
  * <Breakpoint
40
- * class="inline-block rounded border bg-white px-2 py-1 font-mono tabular-nums shadow"
40
+ * class="inline-block rounded border px-3 py-2 font-mono text-sm tabular-nums shadow"
41
41
  * />
42
42
  * ```
43
43
  */
@@ -28,25 +28,27 @@ Displays when the `target` element is right clicked, or long pressed on mobile.
28
28
  let target: HTMLButtonElement;
29
29
  </script>
30
30
 
31
- <div class="mb-8 flex justify-center rounded border border-dashed p-12">
31
+ <div class="mb-8 flex justify-center rounded border bg-muted p-12">
32
32
  <div>Parent right click</div>
33
- <ContextMenu>
34
- <div class="flex w-48 flex-col gap-2 rounded border bg-white p-2 shadow">
33
+ <ContextMenu class="z-10">
34
+ <div class="flex w-48 flex-col gap-2 rounded border bg-card p-2 shadow">
35
35
  <div class="font-bold">Context Menu</div>
36
- <button role="menuitem" class="btn">Button</button>
37
- <button role="menuitem" class="btn">Button</button>
38
- <button role="menuitem" class="btn">Button</button>
36
+ <button role="menuitem" class="button button-secondary">Button</button>
37
+ <button role="menuitem" class="button button-secondary">Button</button>
38
+ <button role="menuitem" class="button button-secondary">Button</button>
39
39
  </div>
40
40
  </ContextMenu>
41
41
  </div>
42
42
 
43
- <button type="button" class="btn" bind:this={target}>Target Right Click</button>
44
- <ContextMenu {target}>
45
- <div class="flex w-48 flex-col gap-2 rounded border bg-white p-2 shadow">
43
+ <button type="button" class="button button-primary" bind:this={target}>
44
+ Target Right Click
45
+ </button>
46
+ <ContextMenu {target} class="z-10">
47
+ <div class="flex w-48 flex-col gap-2 rounded border bg-card p-2 shadow">
46
48
  <div class="font-bold">Target</div>
47
- <button role="menuitem" class="btn">Button</button>
48
- <button role="menuitem" class="btn">Button</button>
49
- <button role="menuitem" class="btn">Button</button>
49
+ <button role="menuitem" class="button button-secondary">Button</button>
50
+ <button role="menuitem" class="button button-secondary">Button</button>
51
+ <button role="menuitem" class="button button-secondary">Button</button>
50
52
  </div>
51
53
  </ContextMenu>
52
54
  ```
@@ -138,9 +140,9 @@ onMount(async () => {
138
140
 
139
141
  <style>
140
142
  span {
143
+ opacity: 0;
141
144
  width: 0;
142
145
  height: 0;
143
- opacity: 0;
144
146
  }
145
147
  div {
146
148
  position: absolute;
@@ -46,25 +46,27 @@ export type ContextMenuSlots = typeof __propDef.slots;
46
46
  * let target: HTMLButtonElement;
47
47
  * </script>
48
48
  *
49
- * <div class="mb-8 flex justify-center rounded border border-dashed p-12">
49
+ * <div class="mb-8 flex justify-center rounded border bg-muted p-12">
50
50
  * <div>Parent right click</div>
51
- * <ContextMenu>
52
- * <div class="flex w-48 flex-col gap-2 rounded border bg-white p-2 shadow">
51
+ * <ContextMenu class="z-10">
52
+ * <div class="flex w-48 flex-col gap-2 rounded border bg-card p-2 shadow">
53
53
  * <div class="font-bold">Context Menu</div>
54
- * <button role="menuitem" class="btn">Button</button>
55
- * <button role="menuitem" class="btn">Button</button>
56
- * <button role="menuitem" class="btn">Button</button>
54
+ * <button role="menuitem" class="button button-secondary">Button</button>
55
+ * <button role="menuitem" class="button button-secondary">Button</button>
56
+ * <button role="menuitem" class="button button-secondary">Button</button>
57
57
  * </div>
58
58
  * </ContextMenu>
59
59
  * </div>
60
60
  *
61
- * <button type="button" class="btn" bind:this={target}>Target Right Click</button>
62
- * <ContextMenu {target}>
63
- * <div class="flex w-48 flex-col gap-2 rounded border bg-white p-2 shadow">
61
+ * <button type="button" class="button button-primary" bind:this={target}>
62
+ * Target Right Click
63
+ * </button>
64
+ * <ContextMenu {target} class="z-10">
65
+ * <div class="flex w-48 flex-col gap-2 rounded border bg-card p-2 shadow">
64
66
  * <div class="font-bold">Target</div>
65
- * <button role="menuitem" class="btn">Button</button>
66
- * <button role="menuitem" class="btn">Button</button>
67
- * <button role="menuitem" class="btn">Button</button>
67
+ * <button role="menuitem" class="button button-secondary">Button</button>
68
+ * <button role="menuitem" class="button button-secondary">Button</button>
69
+ * <button role="menuitem" class="button button-secondary">Button</button>
68
70
  * </div>
69
71
  * </ContextMenu>
70
72
  * ```
@@ -27,12 +27,17 @@ Uses the [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipbo
27
27
  <script lang="ts">
28
28
  import { CopyButton } from "drab";
29
29
 
30
- let value = "Text to copy";
30
+ let value = "";
31
31
  </script>
32
32
 
33
- <input class="input mb-4" type="text" bind:value />
33
+ <input
34
+ class="input mb-4"
35
+ type="text"
36
+ placeholder="Enter text to copy"
37
+ bind:value
38
+ />
34
39
 
35
- <CopyButton class="btn" blobParts={[value]} />
40
+ <CopyButton class="button button-primary" blobParts={[value]} />
36
41
  ```
37
42
  -->
38
43
 
@@ -46,12 +46,17 @@ export type CopyButtonSlots = typeof __propDef.slots;
46
46
  * <script lang="ts">
47
47
  * import { CopyButton } from "drab";
48
48
  *
49
- * let value = "Text to copy";
49
+ * let value = "";
50
50
  * </script>
51
51
  *
52
- * <input class="input mb-4" type="text" bind:value />
52
+ * <input
53
+ * class="input mb-4"
54
+ * type="text"
55
+ * placeholder="Enter text to copy"
56
+ * bind:value
57
+ * />
53
58
  *
54
- * <CopyButton class="btn" blobParts={[value]} />
59
+ * <CopyButton class="button button-primary" blobParts={[value]} />
55
60
  * ```
56
61
  */
57
62
  export default class CopyButton extends SvelteComponent<CopyButtonProps, CopyButtonEvents, CopyButtonSlots> {
@@ -68,7 +68,7 @@ Data table to display an array of objects. Works with zero configuration, just p
68
68
  maxRows={4}
69
69
  class="tabular-nums"
70
70
  classTh="cursor-pointer capitalize"
71
- classTbodyTr="transition hover:bg-neutral-50"
71
+ classTbodyTr="transition hover:bg-muted"
72
72
  >
73
73
  <svelte:fragment slot="th" let:key let:sortBy>
74
74
  <span class:uppercase={key === "awd"} class:underline={key === sortBy}>
@@ -89,7 +89,7 @@ Data table to display an array of objects. Works with zero configuration, just p
89
89
  <div class="flex gap-2">
90
90
  <button
91
91
  type="button"
92
- class="btn"
92
+ class="button button-primary"
93
93
  disabled={currentPage < 1}
94
94
  on:click={() => currentPage--}
95
95
  >
@@ -97,7 +97,7 @@ Data table to display an array of objects. Works with zero configuration, just p
97
97
  </button>
98
98
  <button
99
99
  type="button"
100
- class="btn"
100
+ class="button button-primary"
101
101
  disabled={currentPage >= numberOfPages - 1}
102
102
  on:click={() => currentPage++}
103
103
  >
@@ -108,7 +108,7 @@ export type DataTableSlots = typeof __propDef.slots;
108
108
  * maxRows={4}
109
109
  * class="tabular-nums"
110
110
  * classTh="cursor-pointer capitalize"
111
- * classTbodyTr="transition hover:bg-neutral-50"
111
+ * classTbodyTr="transition hover:bg-muted"
112
112
  * >
113
113
  * <svelte:fragment slot="th" let:key let:sortBy>
114
114
  * <span class:uppercase={key === "awd"} class:underline={key === sortBy}>
@@ -129,7 +129,7 @@ export type DataTableSlots = typeof __propDef.slots;
129
129
  * <div class="flex gap-2">
130
130
  * <button
131
131
  * type="button"
132
- * class="btn"
132
+ * class="button button-primary"
133
133
  * disabled={currentPage < 1}
134
134
  * on:click={() => currentPage--}
135
135
  * >
@@ -137,7 +137,7 @@ export type DataTableSlots = typeof __propDef.slots;
137
137
  * </button>
138
138
  * <button
139
139
  * type="button"
140
- * class="btn"
140
+ * class="button button-primary"
141
141
  * disabled={currentPage >= numberOfPages - 1}
142
142
  * on:click={() => currentPage++}
143
143
  * >
@@ -29,9 +29,7 @@ Displays a `details` element with helpful defaults and transitions. Can be used
29
29
 
30
30
  <Details class="border-b">
31
31
  <svelte:fragment slot="summary" let:open>
32
- <div
33
- class="flex cursor-pointer items-center justify-between gap-8 p-4 underline hover:decoration-dotted"
34
- >
32
+ <div class="link flex items-center justify-between gap-8 p-4">
35
33
  <div>Does it work without JavaScript?</div>
36
34
  <div class="transition" class:rotate-180={open}>
37
35
  <Chevron />
@@ -49,9 +49,7 @@ export type DetailsSlots = typeof __propDef.slots;
49
49
  *
50
50
  * <Details class="border-b">
51
51
  * <svelte:fragment slot="summary" let:open>
52
- * <div
53
- * class="flex cursor-pointer items-center justify-between gap-8 p-4 underline hover:decoration-dotted"
54
- * >
52
+ * <div class="link flex items-center justify-between gap-8 p-4">
55
53
  * <div>Does it work without JavaScript?</div>
56
54
  * <div class="transition" class:rotate-180={open}>
57
55
  * <Chevron />
@@ -35,9 +35,9 @@
35
35
  </script>
36
36
 
37
37
  <Editor
38
- classButton="btn"
38
+ classButton="button button-primary"
39
39
  classControls="flex gap-2"
40
- classTextarea="border w-full h-36 p-2 rounded mb-2"
40
+ classTextarea="input w-full h-36 mb-2"
41
41
  placeholderTextarea="asterisk: ctrl+i, anchor: ctrl+["
42
42
  contentElements={[
43
43
  {
@@ -74,9 +74,9 @@ export type EditorSlots = typeof __propDef.slots;
74
74
  * </script>
75
75
  *
76
76
  * <Editor
77
- * classButton="btn"
77
+ * classButton="button button-primary"
78
78
  * classControls="flex gap-2"
79
- * classTextarea="border w-full h-36 p-2 rounded mb-2"
79
+ * classTextarea="input w-full h-36 mb-2"
80
80
  * placeholderTextarea="asterisk: ctrl+i, anchor: ctrl+["
81
81
  * contentElements={[
82
82
  * {
@@ -24,7 +24,7 @@ Try it out and generate code: [FrettedChord Creator](https://svelte.dev/repl/577
24
24
  </script>
25
25
 
26
26
  <FrettedChord
27
- class="font-mono text-neutral-950"
27
+ class="font-mono text-foreground"
28
28
  name="D"
29
29
  notes={[
30
30
  {
@@ -47,7 +47,7 @@ export type FrettedChordSlots = typeof __propDef.slots;
47
47
  * </script>
48
48
  *
49
49
  * <FrettedChord
50
- * class="font-mono text-neutral-950"
50
+ * class="font-mono text-foreground"
51
51
  * name="D"
52
52
  * notes={[
53
53
  * {
@@ -8,7 +8,7 @@ Make the document or a `target` element fullscreen.
8
8
  @props
9
9
 
10
10
  - `class`
11
- - `confirmMessage` - message to display in the `confirm` popup, defaults to empty string `""` -- disabled
11
+ - `confirmMessage` - message to display in the `confirm` popup, defaults to empty string `""` - disabled
12
12
  - `id`
13
13
  - `target` - element to make fullscreen (defaults to `document.documentElement` upon mount)
14
14
  - `title`
@@ -29,11 +29,11 @@ Make the document or a `target` element fullscreen.
29
29
  let target: HTMLDivElement;
30
30
  </script>
31
31
 
32
- <FullscreenButton class="btn" />
32
+ <FullscreenButton class="button button-primary" />
33
33
 
34
- <div bind:this={target} class="mt-8 rounded bg-neutral-800 p-4 text-neutral-50">
34
+ <div bind:this={target} class="mt-8 rounded border bg-muted p-4">
35
35
  <div class="mb-2">Target element</div>
36
- <FullscreenButton {target} class="btn btn-s bg-neutral-50">
36
+ <FullscreenButton {target} class="button button-primary">
37
37
  Enable Element Fullscreen
38
38
  </FullscreenButton>
39
39
  </div>
@@ -5,7 +5,7 @@ declare const __propDef: {
5
5
  id?: string | undefined;
6
6
  title?: string | undefined;
7
7
  /** element to make fullscreen (defaults to `document.documentElement` upon mount) */ target?: HTMLElement | null | undefined;
8
- /** message to display in the `confirm` popup, defaults to empty string `""` -- disabled */ confirmMessage?: string | undefined;
8
+ /** message to display in the `confirm` popup, defaults to empty string `""` - disabled */ confirmMessage?: string | undefined;
9
9
  };
10
10
  events: {
11
11
  [evt: string]: CustomEvent<any>;
@@ -26,7 +26,7 @@ export type FullscreenButtonSlots = typeof __propDef.slots;
26
26
  * @props
27
27
  *
28
28
  * - `class`
29
- * - `confirmMessage` - message to display in the `confirm` popup, defaults to empty string `""` -- disabled
29
+ * - `confirmMessage` - message to display in the `confirm` popup, defaults to empty string `""` - disabled
30
30
  * - `id`
31
31
  * - `target` - element to make fullscreen (defaults to `document.documentElement` upon mount)
32
32
  * - `title`
@@ -47,11 +47,11 @@ export type FullscreenButtonSlots = typeof __propDef.slots;
47
47
  * let target: HTMLDivElement;
48
48
  * </script>
49
49
  *
50
- * <FullscreenButton class="btn" />
50
+ * <FullscreenButton class="button button-primary" />
51
51
  *
52
- * <div bind:this={target} class="mt-8 rounded bg-neutral-800 p-4 text-neutral-50">
52
+ * <div bind:this={target} class="mt-8 rounded border bg-muted p-4">
53
53
  * <div class="mb-2">Target element</div>
54
- * <FullscreenButton {target} class="btn btn-s bg-neutral-50">
54
+ * <FullscreenButton {target} class="button button-primary">
55
55
  * Enable Element Fullscreen
56
56
  * </FullscreenButton>
57
57
  * </div>
@@ -37,16 +37,21 @@ Displays a popover in relation to the `target`.
37
37
  const close = () => (display = false);
38
38
  </script>
39
39
 
40
- <button class="btn" type="button" bind:this={target} on:click={open}>
40
+ <button
41
+ class="button button-primary"
42
+ type="button"
43
+ bind:this={target}
44
+ on:click={open}
45
+ >
41
46
  Open
42
47
  </button>
43
48
 
44
49
  <Popover {target} bind:display class="p-2">
45
- <div class="flex w-48 flex-col gap-2 rounded border bg-white p-2 shadow">
50
+ <div class="flex w-48 flex-col gap-2 rounded border bg-card p-2 shadow">
46
51
  <div class="font-bold">Bottom</div>
47
- <button class="btn" on:click={close}>Close</button>
48
- <button class="btn" on:click={close}>Close</button>
49
- <button class="btn" on:click={close}>Close</button>
52
+ <button class="button button-secondary" on:click={close}>Close</button>
53
+ <button class="button button-secondary" on:click={close}>Close</button>
54
+ <button class="button button-secondary" on:click={close}>Close</button>
50
55
  </div>
51
56
  </Popover>
52
57
  ```
@@ -56,16 +56,21 @@ export type PopoverSlots = typeof __propDef.slots;
56
56
  * const close = () => (display = false);
57
57
  * </script>
58
58
  *
59
- * <button class="btn" type="button" bind:this={target} on:click={open}>
59
+ * <button
60
+ * class="button button-primary"
61
+ * type="button"
62
+ * bind:this={target}
63
+ * on:click={open}
64
+ * >
60
65
  * Open
61
66
  * </button>
62
67
  *
63
68
  * <Popover {target} bind:display class="p-2">
64
- * <div class="flex w-48 flex-col gap-2 rounded border bg-white p-2 shadow">
69
+ * <div class="flex w-48 flex-col gap-2 rounded border bg-card p-2 shadow">
65
70
  * <div class="font-bold">Bottom</div>
66
- * <button class="btn" on:click={close}>Close</button>
67
- * <button class="btn" on:click={close}>Close</button>
68
- * <button class="btn" on:click={close}>Close</button>
71
+ * <button class="button button-secondary" on:click={close}>Close</button>
72
+ * <button class="button button-secondary" on:click={close}>Close</button>
73
+ * <button class="button button-secondary" on:click={close}>Close</button>
69
74
  * </div>
70
75
  * </Popover>
71
76
  * ```
@@ -45,7 +45,7 @@ Uses the [Navigator API](https://developer.mozilla.org/en-US/docs/Web/API/Naviga
45
45
  </script>
46
46
 
47
47
  <ShareButton
48
- class="btn mb-8"
48
+ class="button button-primary mb-8"
49
49
  shareData={{
50
50
  text: "Check out this page: ",
51
51
  title: "drab",
@@ -64,7 +64,7 @@ Uses the [Navigator API](https://developer.mozilla.org/en-US/docs/Web/API/Naviga
64
64
  bind:this={fileInput}
65
65
  on:input={onInput}
66
66
  />
67
- <ShareButton class="btn" bind:shareData={fileShareData}>
67
+ <ShareButton class="button button-primary" bind:shareData={fileShareData}>
68
68
  Share File
69
69
  </ShareButton>
70
70
  </div>
@@ -63,7 +63,7 @@ export type ShareButtonSlots = typeof __propDef.slots;
63
63
  * </script>
64
64
  *
65
65
  * <ShareButton
66
- * class="btn mb-8"
66
+ * class="button button-primary mb-8"
67
67
  * shareData={{
68
68
  * text: "Check out this page: ",
69
69
  * title: "drab",
@@ -82,7 +82,7 @@ export type ShareButtonSlots = typeof __propDef.slots;
82
82
  * bind:this={fileInput}
83
83
  * on:input={onInput}
84
84
  * />
85
- * <ShareButton class="btn" bind:shareData={fileShareData}>
85
+ * <ShareButton class="button button-primary" bind:shareData={fileShareData}>
86
86
  * Share File
87
87
  * </ShareButton>
88
88
  * </div>
@@ -38,19 +38,27 @@ Creates a sheet element based on the `position` provided. `maxSize` is set to wi
38
38
  let display = false;
39
39
  </script>
40
40
 
41
- <button type="button" class="btn" on:click={() => (display = true)}>
41
+ <button
42
+ type="button"
43
+ class="button button-primary"
44
+ on:click={() => (display = true)}
45
+ >
42
46
  Open
43
47
  </button>
44
48
 
45
49
  <Sheet
46
50
  bind:display
47
- class="backdrop-blur"
48
- classSheet="p-4 shadow bg-white"
51
+ class="z-40 backdrop-blur"
52
+ classSheet="p-6 shadow bg-card"
49
53
  position="r"
50
54
  >
51
55
  <div class="mb-4 flex items-center justify-between">
52
56
  <h2 class="my-0">Sheet</h2>
53
- <button type="button" class="btn btn-s" on:click={() => (display = false)}>
57
+ <button
58
+ type="button"
59
+ class="button button-ghost"
60
+ on:click={() => (display = false)}
61
+ >
54
62
  Close
55
63
  </button>
56
64
  </div>
@@ -146,12 +154,12 @@ onMount(() => {
146
154
  flex-grow: 1;
147
155
  }
148
156
  .d-backdrop {
149
- position: fixed;
150
157
  display: flex;
158
+ position: fixed;
151
159
  top: 0;
160
+ right: 0;
152
161
  bottom: 0;
153
162
  left: 0;
154
- right: 0;
155
163
  overflow: hidden;
156
164
  }
157
165
  .d-backdrop-bottom {
@@ -62,19 +62,27 @@ export type SheetSlots = typeof __propDef.slots;
62
62
  * let display = false;
63
63
  * </script>
64
64
  *
65
- * <button type="button" class="btn" on:click={() => (display = true)}>
65
+ * <button
66
+ * type="button"
67
+ * class="button button-primary"
68
+ * on:click={() => (display = true)}
69
+ * >
66
70
  * Open
67
71
  * </button>
68
72
  *
69
73
  * <Sheet
70
74
  * bind:display
71
- * class="backdrop-blur"
72
- * classSheet="p-4 shadow bg-white"
75
+ * class="z-40 backdrop-blur"
76
+ * classSheet="p-6 shadow bg-card"
73
77
  * position="r"
74
78
  * >
75
79
  * <div class="mb-4 flex items-center justify-between">
76
80
  * <h2 class="my-0">Sheet</h2>
77
- * <button type="button" class="btn btn-s" on:click={() => (display = false)}>
81
+ * <button
82
+ * type="button"
83
+ * class="button button-ghost"
84
+ * on:click={() => (display = false)}
85
+ * >
78
86
  * Close
79
87
  * </button>
80
88
  * </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drab",
3
- "version": "3.0.3",
3
+ "version": "3.0.5",
4
4
  "description": "An Unstyled Svelte Component Library",
5
5
  "keywords": [
6
6
  "components",
@@ -35,7 +35,7 @@
35
35
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
36
36
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
37
37
  "lint": "prettier --check . && eslint .",
38
- "format": "prettier --write . --plugin=prettier-plugin-svelte --plugin=prettier-plugin-tailwindcss",
38
+ "format": "prettier --write . --plugin=prettier-plugin-svelte --plugin=prettier-plugin-tailwindcss --plugin=prettier-plugin-css-order",
39
39
  "pub": "npm publish --access public",
40
40
  "doc": "node src/scripts/documentProps.js && node src/scripts/documentExamples.js && node src/scripts/copyReadMe.js"
41
41
  },
@@ -53,26 +53,28 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@sveltejs/adapter-vercel": "^3.0.3",
56
- "@sveltejs/kit": "^1.22.6",
57
- "@sveltejs/package": "^2.2.1",
56
+ "@sveltejs/kit": "^1.24.0",
57
+ "@sveltejs/package": "^2.2.2",
58
58
  "@tailwindcss/typography": "^0.5.9",
59
- "@types/node": "^20.5.3",
60
- "@typescript-eslint/eslint-plugin": "^6.4.1",
61
- "@typescript-eslint/parser": "^6.4.1",
59
+ "@types/node": "^20.5.7",
60
+ "@typescript-eslint/eslint-plugin": "^6.5.0",
61
+ "@typescript-eslint/parser": "^6.5.0",
62
62
  "autoprefixer": "^10.4.15",
63
- "eslint": "^8.47.0",
63
+ "eslint": "^8.48.0",
64
64
  "eslint-config-prettier": "^9.0.0",
65
65
  "eslint-plugin-svelte": "^2.33.0",
66
- "marked": "^7.0.4",
67
- "postcss": "^8.4.28",
68
- "prettier": "^3.0.2",
66
+ "layercomp": "^0.0.6",
67
+ "marked": "^7.0.5",
68
+ "postcss": "^8.4.29",
69
+ "prettier": "^3.0.3",
70
+ "prettier-plugin-css-order": "^2.0.0",
69
71
  "prettier-plugin-svelte": "^3.0.3",
70
72
  "prettier-plugin-tailwindcss": "^0.5.3",
71
73
  "publint": "^0.2.2",
72
- "svelte-check": "^3.5.0",
74
+ "svelte-check": "^3.5.1",
73
75
  "tailwindcss": "^3.3.3",
74
76
  "tslib": "^2.6.2",
75
- "typescript": "^5.1.6",
77
+ "typescript": "^5.2.2",
76
78
  "vite": "^4.4.9"
77
79
  },
78
80
  "svelte": "./dist/index.js",