@stubber/ui 1.0.23 → 1.0.25

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
@@ -2,8 +2,6 @@
2
2
 
3
3
  This is a sveltekit library project that contains standardized UI components to be used in Stubber Svelte apps
4
4
 
5
- [Read More on the Wiki](https://wiki.stubber.zone:3443/en/npm-packages/stubber-ui-pkg)
6
-
7
5
  # Getting Started
8
6
 
9
7
  - `npm i`
@@ -11,7 +9,22 @@ This is a sveltekit library project that contains standardized UI components to
11
9
 
12
10
  # Publishing
13
11
 
14
- - `npm version patch` to bump the version
15
- - `git push origin master` to push the bumped version
16
- - `npm run build` to build and package the project
17
- - `npm publish` to publish the package
12
+ 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:
13
+
14
+ 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.
15
+
16
+ For example:
17
+
18
+ ```bash
19
+ # will create a new major release.
20
+ breaking: change button color to red
21
+ feat!: add new button component
22
+
23
+ # will create a new minor release.
24
+ feat: add new button component
25
+
26
+ # will create a new patch release.
27
+ fix: fix button color
28
+ ```
29
+
30
+ 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-50 gap-4 p-6 shadow-lg", import("tailwind-variants/dist/config.d.ts").TVConfig<{
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-50 gap-4 p-6 shadow-lg", import("tailwind-variants/dist/config.d.ts").TVConfig<{
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-50 gap-4 p-6 shadow-lg",
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
- {inTransition}
26
- {inTransitionConfig}
27
- {outTransition}
28
- {outTransitionConfig}
29
- class={cn(sheetVariants({ side }), className)}
30
- {...$$restProps}
31
- >
32
- <slot />
33
- <slot name="close">
34
- <SheetPrimitive.Close
35
- 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"
36
- >
37
- <i class="fa-regular fa-xmark h-4 w-4" />
38
- <span class="sr-only">Close</span>
39
- </SheetPrimitive.Close>
40
- </slot>
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
- "bg-white text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",
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 data-[state=active]:bg-background data-[state=active]:text-foreground 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 data-[state=active]:border-b-2 border-black",
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.23",
3
+ "version": "1.0.25",
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
  }