drab 2.4.1 → 2.6.0

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.
@@ -17,7 +17,7 @@ Displays a list of `details` elements.
17
17
  - `icon`
18
18
  - `id`
19
19
  - `items` - array of `AccordionItem` elements
20
- - `transition` - rotates the icon, slides the content, defaults to empty object, set to false to remove
20
+ - `transition` - rotates the icon, slides the content, set to `false` to remove
21
21
 
22
22
  @slots
23
23
 
@@ -31,9 +31,8 @@ Displays a list of `details` elements.
31
31
 
32
32
  ```svelte
33
33
  <script>
34
- import Accordion from "./Accordion.svelte";
35
- import FullscreenButton from "./FullscreenButton.svelte";
36
- import Chevron from "../../site/svg/Chevron.svelte";
34
+ import { Accordion } from "drab";
35
+ import { Chevron } from "../../site/svg/Chevron.svelte";
37
36
  </script>
38
37
 
39
38
  <Accordion
@@ -52,11 +51,6 @@ Displays a list of `details` elements.
52
51
  content: "Yes, with the transition prop.",
53
52
  },
54
53
  { summary: "Does it work without Javascript?", content: "Yes." },
55
- {
56
- summary: "Component",
57
- content: "Rendered only on this item.",
58
- data: { component: FullscreenButton },
59
- },
60
54
  ]}
61
55
  >
62
56
  <svelte:fragment slot="content" let:item let:index>
@@ -64,9 +58,6 @@ Displays a list of `details` elements.
64
58
  <span>{index + 1}.</span>
65
59
  <span>{item.content}</span>
66
60
  </div>
67
- {#if item.data?.component}
68
- <svelte:component class="btn" this={item.data.component} />
69
- {/if}
70
61
  </svelte:fragment>
71
62
  </Accordion>
72
63
  ```
@@ -77,6 +68,7 @@ Displays a list of `details` elements.
77
68
  <script>import { onMount } from "svelte";
78
69
  import { slide } from "svelte/transition";
79
70
  import { prefersReducedMotion } from "../util/accessibility";
71
+ import { duration } from "../util/transition";
80
72
  let className = "";
81
73
  export { className as class };
82
74
  export let id = "";
@@ -87,7 +79,8 @@ export let classHeader = "";
87
79
  export let classSummary = "";
88
80
  export let classContent = "";
89
81
  export let classIcon = "";
90
- export let transition = {};
82
+ export let transition = { duration };
83
+ const cssDuration = transition ? transition.duration : 0;
91
84
  export let autoClose = true;
92
85
  let clientJs = false;
93
86
  const toggleOpen = (i) => {
@@ -133,6 +126,7 @@ onMount(() => {
133
126
  class={classIcon}
134
127
  class:d-rotate-180={item.open}
135
128
  class:d-transition={transition}
129
+ style="--duration: {cssDuration}ms;"
136
130
  >
137
131
  {#if typeof icon !== "string"}
138
132
  <svelte:component this={icon} />
@@ -171,6 +165,6 @@ onMount(() => {
171
165
  .d-transition {
172
166
  transition-property: transform;
173
167
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
174
- transition-duration: 150ms;
168
+ transition-duration: var(--duration);
175
169
  }
176
170
  </style>
@@ -22,7 +22,7 @@ declare const __propDef: {
22
22
  /** class of all the `div`s that wrap the `summary` slot */ classSummary?: string | undefined;
23
23
  /** class of all the `div`s that wrap the `content` slot */ classContent?: string | undefined;
24
24
  /** class of the `div` that wrap the icon if displayed */ classIcon?: string | undefined;
25
- /** rotates the icon, slides the content, defaults to empty object, set to false to remove */ transition?: false | SlideParams | undefined;
25
+ /** rotates the icon, slides the content, set to `false` to remove */ transition?: false | SlideParams | undefined;
26
26
  /** if `true`, other items close when a new one is opened */ autoClose?: boolean | undefined;
27
27
  };
28
28
  events: {
@@ -63,7 +63,7 @@ export type AccordionSlots = typeof __propDef.slots;
63
63
  * - `icon`
64
64
  * - `id`
65
65
  * - `items` - array of `AccordionItem` elements
66
- * - `transition` - rotates the icon, slides the content, defaults to empty object, set to false to remove
66
+ * - `transition` - rotates the icon, slides the content, set to `false` to remove
67
67
  *
68
68
  * @slots
69
69
  *
@@ -77,9 +77,8 @@ export type AccordionSlots = typeof __propDef.slots;
77
77
  *
78
78
  * ```svelte
79
79
  * <script>
80
- * import Accordion from "./Accordion.svelte";
81
- * import FullscreenButton from "./FullscreenButton.svelte";
82
- * import Chevron from "../../site/svg/Chevron.svelte";
80
+ * import { Accordion } from "drab";
81
+ * import { Chevron } from "../../site/svg/Chevron.svelte";
83
82
  * </script>
84
83
  *
85
84
  * <Accordion
@@ -98,11 +97,6 @@ export type AccordionSlots = typeof __propDef.slots;
98
97
  * content: "Yes, with the transition prop.",
99
98
  * },
100
99
  * { summary: "Does it work without Javascript?", content: "Yes." },
101
- * {
102
- * summary: "Component",
103
- * content: "Rendered only on this item.",
104
- * data: { component: FullscreenButton },
105
- * },
106
100
  * ]}
107
101
  * >
108
102
  * <svelte:fragment slot="content" let:item let:index>
@@ -110,9 +104,6 @@ export type AccordionSlots = typeof __propDef.slots;
110
104
  * <span>{index + 1}.</span>
111
105
  * <span>{item.content}</span>
112
106
  * </div>
113
- * {#if item.data?.component}
114
- * <svelte:component class="btn" this={item.data.component} />
115
- * {/if}
116
107
  * </svelte:fragment>
117
108
  * </Accordion>
118
109
  * ```
@@ -0,0 +1,59 @@
1
+ <!--
2
+ @component
3
+
4
+ ### Breakpoints
5
+
6
+ Displays the current breakpoint and `window.innerWidth`, based on the `breakpoints` provided. Defaults to [TailwindCSS breakpoint sizes](https://tailwindcss.com/docs/responsive-design#using-custom-breakpoints).
7
+
8
+ @props
9
+
10
+ - `breakpoints` - array of objects representing the breakpoints of the application
11
+ - `class`
12
+ - `id`
13
+
14
+ @example
15
+
16
+ ```svelte
17
+ <script lang="ts">
18
+ import { Breakpoint } from "drab";
19
+ </script>
20
+
21
+ <div>
22
+ <Breakpoint
23
+ class="inline-block rounded border px-2 py-1 font-mono tabular-nums shadow"
24
+ />
25
+ </div>
26
+ ```
27
+ -->
28
+
29
+ <script>import { messageNoScript } from "../util/messages";
30
+ let className = "";
31
+ export { className as class };
32
+ export let id = "";
33
+ export let breakpoints = [
34
+ { name: "sm", width: 640 },
35
+ { name: "md", width: 768 },
36
+ { name: "lg", width: 1024 },
37
+ { name: "xl", width: 1280 },
38
+ { name: "2xl", width: 1536 }
39
+ ];
40
+ breakpoints.sort((a, b) => b.width - a.width);
41
+ let innerWidth = 0;
42
+ $:
43
+ breakpoint = getBreakpoint(innerWidth);
44
+ const getBreakpoint = (innerWidth2) => {
45
+ for (let i = 0; i < breakpoints.length; i++) {
46
+ if (innerWidth2 > breakpoints[i].width) {
47
+ return breakpoints[i].name;
48
+ }
49
+ }
50
+ return "none";
51
+ };
52
+ </script>
53
+
54
+ <svelte:window bind:innerWidth />
55
+
56
+ <div class={className} {id}>
57
+ {breakpoint}:{innerWidth}
58
+ <noscript>{messageNoScript}</noscript>
59
+ </div>
@@ -0,0 +1,46 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ class?: string | undefined;
5
+ id?: string | undefined;
6
+ /** array of objects representing the breakpoints of the application */ breakpoints?: {
7
+ name: string;
8
+ width: number;
9
+ }[] | undefined;
10
+ };
11
+ events: {
12
+ [evt: string]: CustomEvent<any>;
13
+ };
14
+ slots: {};
15
+ };
16
+ export type BreakpointProps = typeof __propDef.props;
17
+ export type BreakpointEvents = typeof __propDef.events;
18
+ export type BreakpointSlots = typeof __propDef.slots;
19
+ /**
20
+ * ### Breakpoints
21
+ *
22
+ * Displays the current breakpoint and `window.innerWidth`, based on the `breakpoints` provided. Defaults to [TailwindCSS breakpoint sizes](https://tailwindcss.com/docs/responsive-design#using-custom-breakpoints).
23
+ *
24
+ * @props
25
+ *
26
+ * - `breakpoints` - array of objects representing the breakpoints of the application
27
+ * - `class`
28
+ * - `id`
29
+ *
30
+ * @example
31
+ *
32
+ * ```svelte
33
+ * <script lang="ts">
34
+ * import { Breakpoint } from "drab";
35
+ * </script>
36
+ *
37
+ * <div>
38
+ * <Breakpoint
39
+ * class="inline-block rounded border px-2 py-1 font-mono tabular-nums shadow"
40
+ * />
41
+ * </div>
42
+ * ```
43
+ */
44
+ export default class Breakpoint extends SvelteComponent<BreakpointProps, BreakpointEvents, BreakpointSlots> {
45
+ }
46
+ export {};
@@ -23,7 +23,7 @@ Generates a guitar chord `svg`.
23
23
 
24
24
  <Chord
25
25
  class="text-gray-950"
26
- name="D"
26
+ name="D"
27
27
  notes={[
28
28
  {
29
29
  finger: 0,
@@ -22,7 +22,7 @@ Displays when the parent element is right clicked.
22
22
 
23
23
  ```svelte
24
24
  <script>
25
- import { ContextMenu } from "drab";
25
+ import { ContextMenu } from "drab";
26
26
  </script>
27
27
 
28
28
  <div class="flex justify-center rounded border border-dashed p-12">
@@ -81,7 +81,7 @@ onMount(() => {
81
81
  });
82
82
  </script>
83
83
 
84
- <svelte:document on:click={hide} on:keydown={onKeyDown} />
84
+ <svelte:body on:click={hide} on:keydown={onKeyDown} />
85
85
 
86
86
  <div
87
87
  class={className}
@@ -38,7 +38,7 @@ export type ContextMenuSlots = typeof __propDef.slots;
38
38
  *
39
39
  * ```svelte
40
40
  * <script>
41
- * import { ContextMenu } from "drab";
41
+ * import { ContextMenu } from "drab";
42
42
  * </script>
43
43
  *
44
44
  * <div class="flex justify-center rounded border border-dashed p-12">
@@ -24,7 +24,7 @@ Uses the navigator api to copy text to the clipboard.
24
24
 
25
25
  ```svelte
26
26
  <script>
27
- import { CopyButton } from "drab";
27
+ import { CopyButton } from "drab";
28
28
  </script>
29
29
 
30
30
  <div>
@@ -42,7 +42,7 @@ export type CopyButtonSlots = typeof __propDef.slots;
42
42
  *
43
43
  * ```svelte
44
44
  * <script>
45
- * import { CopyButton } from "drab";
45
+ * import { CopyButton } from "drab";
46
46
  * </script>
47
47
  *
48
48
  * <div>
@@ -28,7 +28,7 @@ Displays a popover relatively positioned to the button.
28
28
 
29
29
  ```svelte
30
30
  <script>
31
- import { Popover } from "drab";
31
+ import { Popover } from "drab";
32
32
  </script>
33
33
 
34
34
  <Popover classButton="btn" classPopover="p-2 transition">
@@ -123,7 +123,7 @@ onMount(() => {
123
123
  });
124
124
  </script>
125
125
 
126
- <svelte:document on:keydown={onKeyDown} on:click={clickOutside} />
126
+ <svelte:body on:keydown={onKeyDown} on:click={clickOutside} />
127
127
 
128
128
  <div class="db-relative {className}" {id}>
129
129
  <button
@@ -50,7 +50,7 @@ export type PopoverSlots = typeof __propDef.slots;
50
50
  *
51
51
  * ```svelte
52
52
  * <script>
53
- * import { Popover } from "drab";
53
+ * import { Popover } from "drab";
54
54
  * </script>
55
55
  *
56
56
  * <Popover classButton="btn" classPopover="p-2 transition">
@@ -25,7 +25,7 @@ Uses the navigator api to share or copy a url link depending on browser support.
25
25
 
26
26
  ```svelte
27
27
  <script>
28
- import { ShareButton } from "drab";
28
+ import { ShareButton } from "drab";
29
29
  </script>
30
30
 
31
31
  <div>
@@ -44,7 +44,7 @@ export type ShareButtonSlots = typeof __propDef.slots;
44
44
  *
45
45
  * ```svelte
46
46
  * <script>
47
- * import { ShareButton } from "drab";
47
+ * import { ShareButton } from "drab";
48
48
  * </script>
49
49
  *
50
50
  * <div>
@@ -0,0 +1,168 @@
1
+ <!--
2
+ @component
3
+
4
+ ### Sheet
5
+
6
+ Creates a sheet element based on the `position` provided.
7
+
8
+ @props
9
+
10
+ - `classSheet` - sheet class - not the backdrop
11
+ - `class`
12
+ - `display` - controls whether the sheet is displayed
13
+ - `id`
14
+ - `onClickClose` - close on click, defaults to `false` - only closes if clicked outside
15
+ - `position` - determines the position of sheet
16
+ - `size` - size of sheet based on position - can also use css instead
17
+ - `transitionSheet` - slides the sheet, set to `false` to remove
18
+ - `transition` - fades the entire component, set to `false` to remove
19
+
20
+ @slots
21
+
22
+ | name | purpose | default value |
23
+ | ---------- | ------------------------------- | ------------- |
24
+ | `default` | content | `Content` |
25
+
26
+ @example
27
+
28
+ ```svelte
29
+ <script lang="ts">
30
+ import { Sheet } from "drab";
31
+
32
+ let display = false;
33
+ </script>
34
+
35
+ <div>
36
+ <button class="btn" on:click={() => (display = true)}>Open</button>
37
+ </div>
38
+
39
+ <Sheet
40
+ bind:display
41
+ class="bg-gray-50/80 backdrop-blur"
42
+ classSheet="p-4 shadow bg-white"
43
+ >
44
+ <div class="mb-4 flex items-center justify-between">
45
+ <div class="text-lg font-bold">Sheet</div>
46
+ <button class="btn" on:click={() => (display = false)}>Close</button>
47
+ </div>
48
+ <div>
49
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
50
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
51
+ quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
52
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
53
+ cillum dolore eu fugiat nulla pariatur.
54
+ </div>
55
+ </Sheet>
56
+ ```
57
+ -->
58
+
59
+ <script>import { onMount } from "svelte";
60
+ import {
61
+ fade,
62
+ fly
63
+ } from "svelte/transition";
64
+ import { prefersReducedMotion } from "../util/accessibility";
65
+ import { duration } from "../util/transition";
66
+ let className = "";
67
+ export { className as class };
68
+ export let id = "";
69
+ export let classSheet = "";
70
+ export let display = false;
71
+ export let transition = { duration };
72
+ export let position = "right";
73
+ export let size = 488;
74
+ export let transitionSheet = { duration };
75
+ export let onClickClose = false;
76
+ let sheet;
77
+ const clickOutside = (e) => {
78
+ if (e.target instanceof Node && !sheet.contains(e.target) || onClickClose) {
79
+ display = false;
80
+ }
81
+ };
82
+ const onKeyDown = (e) => {
83
+ if (e.key === "Escape") {
84
+ display = false;
85
+ }
86
+ };
87
+ if (transitionSheet && !transitionSheet.x && !transitionSheet.y) {
88
+ if (position === "bottom") {
89
+ transitionSheet.y = size;
90
+ } else if (position === "top") {
91
+ transitionSheet.y = -size;
92
+ } else if (position === "right") {
93
+ transitionSheet.x = size;
94
+ } else {
95
+ transitionSheet.x = -size;
96
+ }
97
+ }
98
+ onMount(() => {
99
+ if (prefersReducedMotion()) {
100
+ if (transition)
101
+ transition.duration = 0;
102
+ if (transitionSheet)
103
+ transitionSheet.duration = 0;
104
+ }
105
+ });
106
+ </script>
107
+
108
+ <svelte:body on:keydown={onKeyDown} />
109
+
110
+ {#if display}
111
+ <div
112
+ role="button"
113
+ tabindex="0"
114
+ on:click={clickOutside}
115
+ on:keydown={onKeyDown}
116
+ transition:fade={transition ? transition : { duration: 0 }}
117
+ class="d-backdrop {className}"
118
+ {id}
119
+ >
120
+ <div
121
+ bind:this={sheet}
122
+ transition:fly={transitionSheet ? transitionSheet : { duration: 0 }}
123
+ style={position === "top" || position === "bottom"
124
+ ? `max-height: ${size}px;`
125
+ : `max-width: ${size}px`}
126
+ class="d-sheet {classSheet}"
127
+ class:d-bottom={position === "bottom"}
128
+ class:d-top={position === "top"}
129
+ class:d-left={position === "left"}
130
+ class:d-right={position === "right"}
131
+ >
132
+ <slot>Content</slot>
133
+ </div>
134
+ </div>
135
+ {/if}
136
+
137
+ <style>
138
+ .d-backdrop {
139
+ position: fixed;
140
+ display: grid;
141
+ z-index: 10;
142
+ top: 0;
143
+ bottom: 0;
144
+ left: 0;
145
+ right: 0;
146
+ overflow: hidden;
147
+ cursor: default;
148
+ }
149
+ .d-sheet {
150
+ margin: auto;
151
+ }
152
+ .d-bottom {
153
+ margin-bottom: 0;
154
+ width: 100%;
155
+ }
156
+ .d-top {
157
+ margin-top: 0;
158
+ width: 100%;
159
+ }
160
+ .d-right {
161
+ margin-right: 0;
162
+ height: 100%;
163
+ }
164
+ .d-left {
165
+ margin-left: 0;
166
+ height: 100%;
167
+ }
168
+ </style>
@@ -0,0 +1,82 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type FadeParams, type FlyParams } from "svelte/transition";
3
+ declare const __propDef: {
4
+ props: {
5
+ class?: string | undefined;
6
+ id?: string | undefined;
7
+ /** sheet class - not the backdrop */ classSheet?: string | undefined;
8
+ /** controls whether the sheet is displayed*/ display?: boolean | undefined;
9
+ /** fades the entire component, set to `false` to remove */ transition?: false | FadeParams | undefined;
10
+ /** determines the position of sheet */ position?: "top" | "bottom" | "left" | "right" | undefined;
11
+ /** size of sheet based on position - can also use css instead */ size?: number | undefined;
12
+ /** slides the sheet, set to `false` to remove */ transitionSheet?: false | FlyParams | undefined;
13
+ /** close on click, defaults to `false` - only closes if clicked outside */ onClickClose?: boolean | undefined;
14
+ };
15
+ events: {
16
+ [evt: string]: CustomEvent<any>;
17
+ };
18
+ slots: {
19
+ default: {};
20
+ };
21
+ };
22
+ export type SheetProps = typeof __propDef.props;
23
+ export type SheetEvents = typeof __propDef.events;
24
+ export type SheetSlots = typeof __propDef.slots;
25
+ /**
26
+ * ### Sheet
27
+ *
28
+ * Creates a sheet element based on the `position` provided.
29
+ *
30
+ * @props
31
+ *
32
+ * - `classSheet` - sheet class - not the backdrop
33
+ * - `class`
34
+ * - `display` - controls whether the sheet is displayed
35
+ * - `id`
36
+ * - `onClickClose` - close on click, defaults to `false` - only closes if clicked outside
37
+ * - `position` - determines the position of sheet
38
+ * - `size` - size of sheet based on position - can also use css instead
39
+ * - `transitionSheet` - slides the sheet, set to `false` to remove
40
+ * - `transition` - fades the entire component, set to `false` to remove
41
+ *
42
+ * @slots
43
+ *
44
+ * | name | purpose | default value |
45
+ * | ---------- | ------------------------------- | ------------- |
46
+ * | `default` | content | `Content` |
47
+ *
48
+ * @example
49
+ *
50
+ * ```svelte
51
+ * <script lang="ts">
52
+ * import { Sheet } from "drab";
53
+ *
54
+ * let display = false;
55
+ * </script>
56
+ *
57
+ * <div>
58
+ * <button class="btn" on:click={() => (display = true)}>Open</button>
59
+ * </div>
60
+ *
61
+ * <Sheet
62
+ * bind:display
63
+ * class="bg-gray-50/80 backdrop-blur"
64
+ * classSheet="p-4 shadow bg-white"
65
+ * >
66
+ * <div class="mb-4 flex items-center justify-between">
67
+ * <div class="text-lg font-bold">Sheet</div>
68
+ * <button class="btn" on:click={() => (display = false)}>Close</button>
69
+ * </div>
70
+ * <div>
71
+ * Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
72
+ * tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
73
+ * quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
74
+ * consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
75
+ * cillum dolore eu fugiat nulla pariatur.
76
+ * </div>
77
+ * </Sheet>
78
+ * ```
79
+ */
80
+ export default class Sheet extends SvelteComponent<SheetProps, SheetEvents, SheetSlots> {
81
+ }
82
+ export {};
@@ -29,8 +29,8 @@ Displays tabs and the active tab's content.
29
29
 
30
30
  ```svelte
31
31
  <script>
32
- import { Tabs } from "drab";
33
- import FullscreenButton from "./FullscreenButton.svelte";
32
+ import { Tabs } from "drab";
33
+ import { FullscreenButton } from "drab";
34
34
  </script>
35
35
 
36
36
  <Tabs
@@ -67,7 +67,7 @@ Displays tabs and the active tab's content.
67
67
  </svelte:fragment>
68
68
  <div>{activeTab.content}</div>
69
69
  {#if activeTab.data?.component}
70
- <svelte:component class="btn" this={activeTab.data.component} />
70
+ <svelte:component this={activeTab.data.component} class="btn" />
71
71
  {/if}
72
72
  </Tabs>
73
73
  ```
@@ -65,8 +65,8 @@ export type TabsSlots = typeof __propDef.slots;
65
65
  *
66
66
  * ```svelte
67
67
  * <script>
68
- * import { Tabs } from "drab";
69
- * import FullscreenButton from "./FullscreenButton.svelte";
68
+ * import { Tabs } from "drab";
69
+ * import { FullscreenButton } from "drab";
70
70
  * </script>
71
71
  *
72
72
  * <Tabs
@@ -103,7 +103,7 @@ export type TabsSlots = typeof __propDef.slots;
103
103
  * </svelte:fragment>
104
104
  * <div>{activeTab.content}</div>
105
105
  * {#if activeTab.data?.component}
106
- * <svelte:component class="btn" this={activeTab.data.component} />
106
+ * <svelte:component this={activeTab.data.component} class="btn" />
107
107
  * {/if}
108
108
  * </Tabs>
109
109
  * ```
package/dist/index.d.ts CHANGED
@@ -11,7 +11,8 @@ import type { EditorContentElement } from "./components/Editor.svelte";
11
11
  import FullscreenButton from "./components/FullscreenButton.svelte";
12
12
  import Popover from "./components/Popover.svelte";
13
13
  import ShareButton from "./components/ShareButton.svelte";
14
+ import Sheet from "./components/Sheet.svelte";
14
15
  import Tabs from "./components/Tabs.svelte";
15
16
  import type { TabsTab } from "./components/Tabs.svelte";
16
17
  import YouTube from "./components/YouTube.svelte";
17
- export { Accordion, type AccordionItem, Chord, type ChordNote, ContextMenu, CopyButton, DataTable, type DataTableRow, Editor, type EditorContentElement, FullscreenButton, Popover, ShareButton, Tabs, type TabsTab, YouTube, };
18
+ export { Accordion, type AccordionItem, Chord, type ChordNote, ContextMenu, CopyButton, DataTable, type DataTableRow, Editor, type EditorContentElement, FullscreenButton, Popover, ShareButton, Sheet, Tabs, type TabsTab, YouTube, };
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import Editor from "./components/Editor.svelte";
7
7
  import FullscreenButton from "./components/FullscreenButton.svelte";
8
8
  import Popover from "./components/Popover.svelte";
9
9
  import ShareButton from "./components/ShareButton.svelte";
10
+ import Sheet from "./components/Sheet.svelte";
10
11
  import Tabs from "./components/Tabs.svelte";
11
12
  import YouTube from "./components/YouTube.svelte";
12
- export { Accordion, Chord, ContextMenu, CopyButton, DataTable, Editor, FullscreenButton, Popover, ShareButton, Tabs, YouTube, };
13
+ export { Accordion, Chord, ContextMenu, CopyButton, DataTable, Editor, FullscreenButton, Popover, ShareButton, Sheet, Tabs, YouTube, };
@@ -0,0 +1 @@
1
+ export declare const duration = 250;
@@ -0,0 +1 @@
1
+ export const duration = 250;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drab",
3
- "version": "2.4.1",
3
+ "version": "2.6.0",
4
4
  "description": "An unstyled Svelte component library",
5
5
  "keywords": [
6
6
  "components",
@@ -27,7 +27,7 @@
27
27
  "repository": "github:rossrobino/drab",
28
28
  "scripts": {
29
29
  "dev": "vite dev",
30
- "build": "npm run doc && vite build && npm run package",
30
+ "build": "vite build && npm run package",
31
31
  "preview": "vite preview",
32
32
  "package": "svelte-kit sync && svelte-package && publint",
33
33
  "prepublishOnly": "npm run package",
@@ -36,7 +36,7 @@
36
36
  "lint": "prettier --check . && eslint .",
37
37
  "format": "prettier --write . --plugin=prettier-plugin-svelte --plugin=prettier-plugin-tailwindcss",
38
38
  "pub": "npm publish --access public",
39
- "doc": "node src/scripts/buildDocs.js"
39
+ "doc": "node src/scripts/documentProps.js && node src/scripts/documentExamples.js"
40
40
  },
41
41
  "exports": {
42
42
  ".": {