@casinogate/ui 1.5.0 → 1.5.1

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.
@@ -23,6 +23,15 @@
23
23
  const args: Args = {};
24
24
  </script>
25
25
 
26
+ <script lang="ts">
27
+ const path = $derived.by(() => {
28
+ const pathname = '/organization/create';
29
+ return pathname.split('/').filter(Boolean);
30
+ });
31
+
32
+ $inspect(path);
33
+ </script>
34
+
26
35
  <Story name="Primitive" {args} {parameters}>
27
36
  {#snippet template(args: Args)}
28
37
  <BreadcrumbPrimitive.Root {...args}>
@@ -55,6 +64,6 @@
55
64
 
56
65
  <Story name="Preset With Array Path" {args} {parameters}>
57
66
  {#snippet template(args: Args)}
58
- <Breadcrumb.Root {...args} path={['Home', 'Home 2', 'Home 3', 'Home 4']} />
67
+ <Breadcrumb.Root {...args} {path} />
59
68
  {/snippet}
60
69
  </Story>
@@ -1,19 +1,4 @@
1
1
  import { Breadcrumb } from './index.js';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const Breadcrumb: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
- [evt: string]: CustomEvent<any>;
17
- }, {}, {}, string>;
18
- type Breadcrumb = InstanceType<typeof Breadcrumb>;
2
+ declare const Breadcrumb: import("svelte").Component<Record<string, never>, {}, "">;
3
+ type Breadcrumb = ReturnType<typeof Breadcrumb>;
19
4
  export default Breadcrumb;
@@ -22,8 +22,9 @@
22
22
  <Page>{item}</Page>
23
23
  </Item>
24
24
  {:else}
25
+ {@const fullPath = items.slice(0, idx + 1).join('/')}
25
26
  <Item>
26
- <Link href={item}>{item}</Link>
27
+ <Link href={`/${fullPath}`}>{item}</Link>
27
28
  </Item>
28
29
  <Separator />
29
30
  {/if}
@@ -15,7 +15,7 @@
15
15
  const styles = ButtonGroupStylesContext.get();
16
16
  </script>
17
17
 
18
- <Separator.Root
18
+ <Separator
19
19
  bind:ref
20
20
  {orientation}
21
21
  class={cn(styles.current.separator(), className)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casinogate/ui",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "svelte": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",