drab 3.0.3 → 3.0.4
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 +10 -10
- package/dist/components/Breakpoint.svelte +1 -1
- package/dist/components/Breakpoint.svelte.d.ts +1 -1
- package/dist/components/ContextMenu.svelte +17 -13
- package/dist/components/ContextMenu.svelte.d.ts +16 -12
- package/dist/components/CopyButton.svelte +8 -3
- package/dist/components/CopyButton.svelte.d.ts +8 -3
- package/dist/components/DataTable.svelte +3 -3
- package/dist/components/DataTable.svelte.d.ts +3 -3
- package/dist/components/Details.svelte +1 -3
- package/dist/components/Details.svelte.d.ts +1 -3
- package/dist/components/Editor.svelte +2 -2
- package/dist/components/Editor.svelte.d.ts +2 -2
- package/dist/components/FrettedChord.svelte +1 -1
- package/dist/components/FrettedChord.svelte.d.ts +1 -1
- package/dist/components/FullscreenButton.svelte +3 -3
- package/dist/components/FullscreenButton.svelte.d.ts +3 -3
- package/dist/components/Popover.svelte +10 -5
- package/dist/components/Popover.svelte.d.ts +10 -5
- package/dist/components/ShareButton.svelte +2 -2
- package/dist/components/ShareButton.svelte.d.ts +2 -2
- package/dist/components/Sheet.svelte +14 -6
- package/dist/components/Sheet.svelte.d.ts +12 -4
- package/package.json +15 -13
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)
|
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
|
-
.
|
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="
|
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="
|
89
|
+
<FullscreenButton class="button" />
|
90
90
|
|
91
91
|
<style>
|
92
|
-
:global(.
|
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`.
|
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
|
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
|
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,29 @@ 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
|
31
|
+
<div class="mb-8 flex justify-center rounded border p-12">
|
32
32
|
<div>Parent right click</div>
|
33
|
-
<ContextMenu>
|
34
|
-
<div
|
33
|
+
<ContextMenu class="z-10">
|
34
|
+
<div
|
35
|
+
class="flex w-48 flex-col gap-2 rounded border bg-background p-2 shadow"
|
36
|
+
>
|
35
37
|
<div class="font-bold">Context Menu</div>
|
36
|
-
<button role="menuitem" class="
|
37
|
-
<button role="menuitem" class="
|
38
|
-
<button role="menuitem" class="
|
38
|
+
<button role="menuitem" class="button button-secondary">Button</button>
|
39
|
+
<button role="menuitem" class="button button-secondary">Button</button>
|
40
|
+
<button role="menuitem" class="button button-secondary">Button</button>
|
39
41
|
</div>
|
40
42
|
</ContextMenu>
|
41
43
|
</div>
|
42
44
|
|
43
|
-
<button type="button" class="
|
44
|
-
|
45
|
-
|
45
|
+
<button type="button" class="button button-primary" bind:this={target}>
|
46
|
+
Target Right Click
|
47
|
+
</button>
|
48
|
+
<ContextMenu {target} class="z-10">
|
49
|
+
<div class="flex w-48 flex-col gap-2 rounded border bg-background p-2 shadow">
|
46
50
|
<div class="font-bold">Target</div>
|
47
|
-
<button role="menuitem" class="
|
48
|
-
<button role="menuitem" class="
|
49
|
-
<button role="menuitem" class="
|
51
|
+
<button role="menuitem" class="button button-secondary">Button</button>
|
52
|
+
<button role="menuitem" class="button button-secondary">Button</button>
|
53
|
+
<button role="menuitem" class="button button-secondary">Button</button>
|
50
54
|
</div>
|
51
55
|
</ContextMenu>
|
52
56
|
```
|
@@ -138,9 +142,9 @@ onMount(async () => {
|
|
138
142
|
|
139
143
|
<style>
|
140
144
|
span {
|
145
|
+
opacity: 0;
|
141
146
|
width: 0;
|
142
147
|
height: 0;
|
143
|
-
opacity: 0;
|
144
148
|
}
|
145
149
|
div {
|
146
150
|
position: absolute;
|
@@ -46,25 +46,29 @@ 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
|
49
|
+
* <div class="mb-8 flex justify-center rounded border p-12">
|
50
50
|
* <div>Parent right click</div>
|
51
|
-
* <ContextMenu>
|
52
|
-
* <div
|
51
|
+
* <ContextMenu class="z-10">
|
52
|
+
* <div
|
53
|
+
* class="flex w-48 flex-col gap-2 rounded border bg-background p-2 shadow"
|
54
|
+
* >
|
53
55
|
* <div class="font-bold">Context Menu</div>
|
54
|
-
* <button role="menuitem" class="
|
55
|
-
* <button role="menuitem" class="
|
56
|
-
* <button role="menuitem" class="
|
56
|
+
* <button role="menuitem" class="button button-secondary">Button</button>
|
57
|
+
* <button role="menuitem" class="button button-secondary">Button</button>
|
58
|
+
* <button role="menuitem" class="button button-secondary">Button</button>
|
57
59
|
* </div>
|
58
60
|
* </ContextMenu>
|
59
61
|
* </div>
|
60
62
|
*
|
61
|
-
* <button type="button" class="
|
62
|
-
*
|
63
|
-
*
|
63
|
+
* <button type="button" class="button button-primary" bind:this={target}>
|
64
|
+
* Target Right Click
|
65
|
+
* </button>
|
66
|
+
* <ContextMenu {target} class="z-10">
|
67
|
+
* <div class="flex w-48 flex-col gap-2 rounded border bg-background p-2 shadow">
|
64
68
|
* <div class="font-bold">Target</div>
|
65
|
-
* <button role="menuitem" class="
|
66
|
-
* <button role="menuitem" class="
|
67
|
-
* <button role="menuitem" class="
|
69
|
+
* <button role="menuitem" class="button button-secondary">Button</button>
|
70
|
+
* <button role="menuitem" class="button button-secondary">Button</button>
|
71
|
+
* <button role="menuitem" class="button button-secondary">Button</button>
|
68
72
|
* </div>
|
69
73
|
* </ContextMenu>
|
70
74
|
* ```
|
@@ -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 = "
|
30
|
+
let value = "";
|
31
31
|
</script>
|
32
32
|
|
33
|
-
<input
|
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="
|
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 = "
|
49
|
+
* let value = "";
|
50
50
|
* </script>
|
51
51
|
*
|
52
|
-
* <input
|
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="
|
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-
|
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="
|
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="
|
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-
|
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="
|
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="
|
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="
|
38
|
+
classButton="button button-primary"
|
39
39
|
classControls="flex gap-2"
|
40
|
-
classTextarea="
|
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="
|
77
|
+
* classButton="button button-primary"
|
78
78
|
* classControls="flex gap-2"
|
79
|
-
* classTextarea="
|
79
|
+
* classTextarea="input w-full h-36 mb-2"
|
80
80
|
* placeholderTextarea="asterisk: ctrl+i, anchor: ctrl+["
|
81
81
|
* contentElements={[
|
82
82
|
* {
|
@@ -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="
|
32
|
+
<FullscreenButton class="button button-primary" />
|
33
33
|
|
34
|
-
<div bind:this={target} class="mt-8 rounded bg-
|
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="
|
36
|
+
<FullscreenButton {target} class="button button-primary">
|
37
37
|
Enable Element Fullscreen
|
38
38
|
</FullscreenButton>
|
39
39
|
</div>
|
@@ -47,11 +47,11 @@ export type FullscreenButtonSlots = typeof __propDef.slots;
|
|
47
47
|
* let target: HTMLDivElement;
|
48
48
|
* </script>
|
49
49
|
*
|
50
|
-
* <FullscreenButton class="
|
50
|
+
* <FullscreenButton class="button button-primary" />
|
51
51
|
*
|
52
|
-
* <div bind:this={target} class="mt-8 rounded bg-
|
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="
|
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
|
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-
|
50
|
+
<div class="flex w-48 flex-col gap-2 rounded border bg-background p-2 shadow">
|
46
51
|
<div class="font-bold">Bottom</div>
|
47
|
-
<button class="
|
48
|
-
<button class="
|
49
|
-
<button class="
|
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
|
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-
|
69
|
+
* <div class="flex w-48 flex-col gap-2 rounded border bg-background p-2 shadow">
|
65
70
|
* <div class="font-bold">Bottom</div>
|
66
|
-
* <button class="
|
67
|
-
* <button class="
|
68
|
-
* <button class="
|
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="
|
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="
|
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="
|
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="
|
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
|
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-
|
51
|
+
class="z-40 backdrop-blur"
|
52
|
+
classSheet="p-4 shadow bg-background"
|
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
|
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
|
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-
|
75
|
+
* class="z-40 backdrop-blur"
|
76
|
+
* classSheet="p-4 shadow bg-background"
|
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
|
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
|
+
"version": "3.0.4",
|
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.
|
57
|
-
"@sveltejs/package": "^2.2.
|
56
|
+
"@sveltejs/kit": "^1.24.0",
|
57
|
+
"@sveltejs/package": "^2.2.2",
|
58
58
|
"@tailwindcss/typography": "^0.5.9",
|
59
|
-
"@types/node": "^20.5.
|
60
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
61
|
-
"@typescript-eslint/parser": "^6.
|
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.
|
63
|
+
"eslint": "^8.48.0",
|
64
64
|
"eslint-config-prettier": "^9.0.0",
|
65
65
|
"eslint-plugin-svelte": "^2.33.0",
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"
|
66
|
+
"layercomp": "^0.0.2",
|
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.
|
74
|
+
"svelte-check": "^3.5.1",
|
73
75
|
"tailwindcss": "^3.3.3",
|
74
76
|
"tslib": "^2.6.2",
|
75
|
-
"typescript": "^5.
|
77
|
+
"typescript": "^5.2.2",
|
76
78
|
"vite": "^4.4.9"
|
77
79
|
},
|
78
80
|
"svelte": "./dist/index.js",
|