@stubber/ui 1.0.23 → 1.0.24
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 +19 -4
- package/dist/components/sheet/index.d.ts +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/sheet-content.svelte +25 -17
- package/dist/components/sheet/sheet-content.svelte.d.ts +8 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/tabs-list.svelte +7 -1
- package/dist/components/tabs/tabs-trigger.svelte +7 -1
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -11,7 +11,22 @@ This is a sveltekit library project that contains standardized UI components to
|
|
|
11
11
|
|
|
12
12
|
# Publishing
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
We use [semantic-release](https://github.com/semantic-release/semantic-release) to automate the versioning and package publishing process. To publish a new version of the package, follow these steps:
|
|
15
|
+
|
|
16
|
+
Simply make a commit with a message that follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification, and push it to the master branch. The commit message should include a type (feat, fix, chore, etc.) and an optional scope.
|
|
17
|
+
|
|
18
|
+
For example:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# will create a new major release.
|
|
22
|
+
breaking: change button color to red
|
|
23
|
+
feat!: add new button component
|
|
24
|
+
|
|
25
|
+
# will create a new minor release.
|
|
26
|
+
feat: add new button component
|
|
27
|
+
|
|
28
|
+
# will create a new patch release.
|
|
29
|
+
fix: fix button color
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
See default ruleset [here](https://github.com/semantic-release/commit-analyzer/blob/master/lib/default-release-rules.js)
|
|
@@ -17,7 +17,7 @@ export declare const sheetVariants: import("tailwind-variants").TVReturnType<{
|
|
|
17
17
|
left: string;
|
|
18
18
|
right: string;
|
|
19
19
|
};
|
|
20
|
-
}, undefined, "bg-background fixed z-
|
|
20
|
+
}, undefined, "bg-background fixed z-[100] gap-4 p-6 shadow-lg", import("tailwind-variants/dist/config.d.ts").TVConfig<{
|
|
21
21
|
side: {
|
|
22
22
|
top: string;
|
|
23
23
|
bottom: string;
|
|
@@ -45,7 +45,7 @@ export declare const sheetVariants: import("tailwind-variants").TVReturnType<{
|
|
|
45
45
|
left: string;
|
|
46
46
|
right: string;
|
|
47
47
|
};
|
|
48
|
-
}, undefined, "bg-background fixed z-
|
|
48
|
+
}, undefined, "bg-background fixed z-[100] gap-4 p-6 shadow-lg", import("tailwind-variants/dist/config.d.ts").TVConfig<{
|
|
49
49
|
side: {
|
|
50
50
|
top: string;
|
|
51
51
|
bottom: string;
|
|
@@ -11,7 +11,7 @@ const Root = SheetPrimitive.Root;
|
|
|
11
11
|
const Close = SheetPrimitive.Close;
|
|
12
12
|
const Trigger = SheetPrimitive.Trigger;
|
|
13
13
|
export const sheetVariants = tv({
|
|
14
|
-
base: "bg-background fixed z-
|
|
14
|
+
base: "bg-background fixed z-[100] gap-4 p-6 shadow-lg",
|
|
15
15
|
variants: {
|
|
16
16
|
side: {
|
|
17
17
|
top: "inset-x-0 top-0 border-b",
|
|
@@ -21,22 +21,30 @@ export let hasOverlay = true;
|
|
|
21
21
|
{#if hasOverlay}
|
|
22
22
|
<SheetOverlay />
|
|
23
23
|
{/if}
|
|
24
|
-
<SheetPrimitive.Content
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
<SheetPrimitive.Content asChild let:builder>
|
|
25
|
+
<div
|
|
26
|
+
use:builder.action
|
|
27
|
+
in:inTransition|global={inTransitionConfig}
|
|
28
|
+
out:outTransition|global={outTransitionConfig}
|
|
29
|
+
class={cn(sheetVariants({ side }), className)}
|
|
30
|
+
{...$$restProps}
|
|
31
|
+
on:pointerdown
|
|
32
|
+
on:pointermove
|
|
33
|
+
on:pointerup
|
|
34
|
+
on:touchcancel
|
|
35
|
+
on:touchend
|
|
36
|
+
on:touchmove|nonpassive
|
|
37
|
+
on:touchstart|nonpassive
|
|
38
|
+
>
|
|
39
|
+
<slot />
|
|
40
|
+
<slot name="close">
|
|
41
|
+
<SheetPrimitive.Close
|
|
42
|
+
class="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none"
|
|
43
|
+
>
|
|
44
|
+
<i class="fa-regular fa-xmark h-4 w-4" />
|
|
45
|
+
<span class="sr-only">Close</span>
|
|
46
|
+
</SheetPrimitive.Close>
|
|
47
|
+
</slot>
|
|
48
|
+
</div>
|
|
41
49
|
</SheetPrimitive.Content>
|
|
42
50
|
</SheetPortal>
|
|
@@ -15,6 +15,14 @@ declare const __propDef: {
|
|
|
15
15
|
hasOverlay?: boolean;
|
|
16
16
|
};
|
|
17
17
|
events: {
|
|
18
|
+
pointerdown: PointerEvent;
|
|
19
|
+
pointermove: PointerEvent;
|
|
20
|
+
pointerup: PointerEvent;
|
|
21
|
+
touchcancel: TouchEvent;
|
|
22
|
+
touchend: TouchEvent;
|
|
23
|
+
touchmove: TouchEvent;
|
|
24
|
+
touchstart: TouchEvent;
|
|
25
|
+
} & {
|
|
18
26
|
[evt: string]: CustomEvent<any>;
|
|
19
27
|
};
|
|
20
28
|
slots: {
|
|
@@ -3,4 +3,5 @@ import Content from "./tabs-content.svelte";
|
|
|
3
3
|
import List from "./tabs-list.svelte";
|
|
4
4
|
import Trigger from "./tabs-trigger.svelte";
|
|
5
5
|
declare const Root: typeof TabsPrimitive.Root;
|
|
6
|
+
export type TabVariant = "default" | "secondary";
|
|
6
7
|
export { Root, Content, List, Trigger, Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
<script>import { Tabs as TabsPrimitive } from "bits-ui";
|
|
2
2
|
import { cn } from "../../utils/shadcn-utils.js";
|
|
3
3
|
let className = void 0;
|
|
4
|
+
export let variant = "default";
|
|
4
5
|
export { className as class };
|
|
6
|
+
const variantStyles = {
|
|
7
|
+
default: "bg-white text-muted-foreground",
|
|
8
|
+
secondary: "bg-muted text-muted-foreground"
|
|
9
|
+
};
|
|
5
10
|
</script>
|
|
6
11
|
|
|
7
12
|
<TabsPrimitive.List
|
|
8
13
|
class={cn(
|
|
9
|
-
"
|
|
14
|
+
"inline-flex h-10 items-center justify-center rounded-lg p-1",
|
|
15
|
+
variantStyles[variant],
|
|
10
16
|
className
|
|
11
17
|
)}
|
|
12
18
|
{...$$restProps}
|
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
import { cn } from "../../utils/shadcn-utils.js";
|
|
3
3
|
let className = void 0;
|
|
4
4
|
export let value;
|
|
5
|
+
export let variant = "default";
|
|
5
6
|
export { className as class };
|
|
7
|
+
const variantStyles = {
|
|
8
|
+
default: "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-b-2 border-black",
|
|
9
|
+
secondary: "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm rounded-lg"
|
|
10
|
+
};
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
<TabsPrimitive.Trigger
|
|
9
14
|
class={cn(
|
|
10
|
-
"ring-offset-background focus-visible:ring-ring
|
|
15
|
+
"ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
16
|
+
variantStyles[variant],
|
|
11
17
|
className
|
|
12
18
|
)}
|
|
13
19
|
{value}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stubber/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && pnpm run package && node ./fix_dts_imports.js",
|
|
@@ -76,5 +76,15 @@
|
|
|
76
76
|
"esbuild",
|
|
77
77
|
"svelte-preprocess"
|
|
78
78
|
]
|
|
79
|
+
},
|
|
80
|
+
"release": {
|
|
81
|
+
"branches": [
|
|
82
|
+
"master"
|
|
83
|
+
],
|
|
84
|
+
"plugins": [
|
|
85
|
+
"@semantic-release/commit-analyzer",
|
|
86
|
+
"@semantic-release/release-notes-generator",
|
|
87
|
+
"@semantic-release/npm"
|
|
88
|
+
]
|
|
79
89
|
}
|
|
80
90
|
}
|