uisv 0.0.21 → 0.0.22

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.
Files changed (74) hide show
  1. package/dist/components/accordion.svelte +20 -21
  2. package/dist/components/accordion.svelte.d.ts +10 -10
  3. package/dist/components/alert.svelte +22 -28
  4. package/dist/components/alert.svelte.d.ts +5 -5
  5. package/dist/components/app.svelte +57 -0
  6. package/dist/components/app.svelte.d.ts +15 -0
  7. package/dist/components/badge.svelte +18 -23
  8. package/dist/components/badge.svelte.d.ts +3 -3
  9. package/dist/components/banner.svelte +18 -24
  10. package/dist/components/banner.svelte.d.ts +5 -5
  11. package/dist/components/breadcrumb.svelte +6 -6
  12. package/dist/components/breadcrumb.svelte.d.ts +4 -25
  13. package/dist/components/button.svelte +36 -44
  14. package/dist/components/button.svelte.d.ts +12 -11
  15. package/dist/components/calendar.svelte +6 -7
  16. package/dist/components/calendar.svelte.d.ts +3 -3
  17. package/dist/components/card.svelte +11 -12
  18. package/dist/components/card.svelte.d.ts +5 -5
  19. package/dist/components/checkbox-group.svelte +12 -13
  20. package/dist/components/checkbox-group.svelte.d.ts +4 -4
  21. package/dist/components/checkbox.svelte +39 -38
  22. package/dist/components/checkbox.svelte.d.ts +6 -6
  23. package/dist/components/chip.svelte +7 -8
  24. package/dist/components/chip.svelte.d.ts +3 -3
  25. package/dist/components/collapsible.svelte +4 -5
  26. package/dist/components/collapsible.svelte.d.ts +4 -4
  27. package/dist/components/color-picker.svelte +1 -1
  28. package/dist/components/h1.svelte +8 -7
  29. package/dist/components/h2.svelte +12 -11
  30. package/dist/components/h3.svelte +9 -8
  31. package/dist/components/h4.svelte +12 -11
  32. package/dist/components/h5.svelte +12 -11
  33. package/dist/components/h6.svelte +12 -11
  34. package/dist/components/index.d.ts +6 -0
  35. package/dist/components/index.js +6 -0
  36. package/dist/components/input-number.svelte +5 -7
  37. package/dist/components/input-number.svelte.d.ts +5 -5
  38. package/dist/components/input-time.svelte +11 -12
  39. package/dist/components/input-time.svelte.d.ts +6 -6
  40. package/dist/components/input.svelte +11 -12
  41. package/dist/components/input.svelte.d.ts +6 -6
  42. package/dist/components/kbd.svelte +6 -7
  43. package/dist/components/kbd.svelte.d.ts +2 -2
  44. package/dist/components/modal.svelte +189 -0
  45. package/dist/components/modal.svelte.d.ts +33 -0
  46. package/dist/components/p.svelte +3 -1
  47. package/dist/components/pin-input.svelte +10 -11
  48. package/dist/components/pin-input.svelte.d.ts +3 -3
  49. package/dist/components/placeholder.svelte +4 -4
  50. package/dist/components/popover.svelte +33 -61
  51. package/dist/components/popover.svelte.d.ts +8 -30
  52. package/dist/components/progress.svelte +22 -21
  53. package/dist/components/progress.svelte.d.ts +5 -5
  54. package/dist/components/select.svelte +48 -53
  55. package/dist/components/select.svelte.d.ts +22 -29
  56. package/dist/components/seperator.svelte +6 -7
  57. package/dist/components/seperator.svelte.d.ts +6 -6
  58. package/dist/components/slider.svelte +13 -14
  59. package/dist/components/slider.svelte.d.ts +4 -4
  60. package/dist/components/switch.svelte +17 -22
  61. package/dist/components/switch.svelte.d.ts +6 -6
  62. package/dist/components/tabs.svelte +19 -20
  63. package/dist/components/tabs.svelte.d.ts +7 -7
  64. package/dist/components/tooltip.svelte +94 -0
  65. package/dist/components/tooltip.svelte.d.ts +24 -0
  66. package/dist/contexts.d.ts +47 -0
  67. package/dist/contexts.js +46 -0
  68. package/dist/index.d.ts +1 -0
  69. package/dist/index.js +1 -0
  70. package/dist/mode.d.ts +89 -0
  71. package/dist/mode.js +1 -0
  72. package/dist/utilities.svelte.d.ts +1 -1
  73. package/dist/vite.js +30 -35
  74. package/package.json +31 -26
@@ -1,8 +1,7 @@
1
1
  <script module lang="ts">
2
2
  import { type PropColor, isComponent, isSnippet } from '../index.js';
3
3
  import type { Snippet } from 'svelte';
4
- import type { ClassNameValue } from 'tailwind-merge';
5
- import { tv } from 'tailwind-variants';
4
+ import { tv, type ClassValue } from 'tailwind-variants';
6
5
  import type { Component } from 'vitest-browser-svelte';
7
6
 
8
7
  export type CheckboxProps = {
@@ -18,11 +17,11 @@
18
17
  indicator?: 'start' | 'end' | 'hidden';
19
18
  as?: string;
20
19
  ui?: {
21
- root?: ClassNameValue;
22
- container?: ClassNameValue;
23
- icon?: ClassNameValue;
24
- label?: ClassNameValue;
25
- description?: ClassNameValue;
20
+ root?: ClassValue;
21
+ container?: ClassValue;
22
+ icon?: ClassValue;
23
+ label?: ClassValue;
24
+ description?: ClassValue;
26
25
  };
27
26
  };
28
27
  </script>
@@ -40,89 +39,91 @@
40
39
  required,
41
40
  indicator = 'start',
42
41
  as = 'div',
43
- ui = {}
42
+ ui = {},
44
43
  }: CheckboxProps = $props();
45
44
  const id = $props.id();
46
45
 
47
- const classes = $derived.by(() =>
46
+ const variants = $derived.by(() =>
48
47
  tv({
49
48
  slots: {
50
49
  root: 'relative flex-inline gap-2',
51
50
  container:
52
- 'rounded-md border border-neutral-200 relative transition m-0.5 mr-0 grid place-items-center',
51
+ 'rounded-md border border-surface-accented relative transition m-0.5 mr-0 grid place-items-center',
53
52
  icon: 'pi text-white',
54
53
  label: 'text-sm font-medium',
55
- description: 'text-sm text-neutral-500'
54
+ description: 'text-sm text-label-muted',
56
55
  },
57
56
  variants: {
58
57
  color: {
59
58
  primary: {
60
- container: [value && 'bg-primary-500 border-primary-500 text-primary-500']
59
+ container: [value && 'bg-primary-500 border-primary-500 text-primary-500'],
61
60
  },
62
61
  surface: {
63
- container: [value && 'bg-neutral-900 border-neutral-900 text-neutral-900']
62
+ container: [
63
+ value && 'bg-surface-inverted border-surface-inverted text-surface-inverted',
64
+ ],
64
65
  },
65
66
  info: {
66
- container: [value && 'bg-info-500 border-info-500 text-info-500']
67
+ container: [value && 'bg-info-500 border-info-500 text-info-500'],
67
68
  },
68
69
  success: {
69
- container: [value && 'bg-success-500 border-success-500 text-success-500']
70
+ container: [value && 'bg-success-500 border-success-500 text-success-500'],
70
71
  },
71
72
  warning: {
72
- container: [value && 'bg-warning-500 border-warning-500 text-warning-500']
73
+ container: [value && 'bg-warning-500 border-warning-500 text-warning-500'],
73
74
  },
74
75
  error: {
75
- container: [value && 'bg-error-500 border-error-500 text-error-500']
76
- }
76
+ container: [value && 'bg-error-500 border-error-500 text-error-500'],
77
+ },
77
78
  },
78
79
  size: {
79
80
  xs: {
80
81
  container: 'size-3',
81
- icon: 'size-3'
82
+ icon: 'size-3',
82
83
  },
83
84
  sm: {
84
85
  container: 'size-3.5',
85
- icon: 'size-3.5'
86
+ icon: 'size-3.5',
86
87
  },
87
88
  md: {
88
89
  container: 'size-4',
89
- icon: 'size-4'
90
+ icon: 'size-4',
90
91
  },
91
92
  lg: {
92
93
  container: 'size-4.5',
93
- icon: 'size-4.5'
94
+ icon: 'size-4.5',
94
95
  },
95
96
  xl: {
96
97
  container: 'size-5',
97
- icon: 'size-5'
98
- }
98
+ icon: 'size-5',
99
+ },
99
100
  },
100
101
  indicator: {
101
102
  start: '',
102
103
  end: {
103
- root: 'flex-row-reverse'
104
+ root: 'flex-row-reverse',
104
105
  },
105
106
  hidden: {
106
- container: 'hidden'
107
- }
108
- }
107
+ container: 'hidden',
108
+ },
109
+ },
109
110
  },
110
- compoundVariants: []
111
- })({ color, size, indicator })
111
+ compoundVariants: [],
112
+ })({ color, size, indicator }),
112
113
  );
113
114
  </script>
114
115
 
115
116
  <svelte:element
116
117
  this={as}
117
118
  data-state={value ? 'checked' : 'unchecked'}
118
- class={classes.root({
119
- class: [disabled && 'opacity-50', ui.root]
119
+ class={variants.root({
120
+ class: [disabled && 'opacity-50', ui.root],
120
121
  })}
121
122
  >
122
123
  <button
123
124
  {id}
124
125
  aria-label="checkbox"
125
- class={classes.container({ class: [ui.container] })}
126
+ class={variants.container({ class: [ui.container] })}
126
127
  onclick={() => {
127
128
  if (disabled) return;
128
129
  if (value === 'intermediate') return (value = true);
@@ -137,8 +138,8 @@
137
138
  <div class="flex flex-col justify-start">
138
139
  <label
139
140
  for={id}
140
- class={classes.label({
141
- class: [required ? 'after:content-["*"] after:text-error-500' : '', ui.label]
141
+ class={variants.label({
142
+ class: [required ? 'after:content-["*"] after:text-error-500' : '', ui.label],
142
143
  })}
143
144
  >
144
145
  {#if typeof label === 'string'}
@@ -149,7 +150,7 @@
149
150
  </label>
150
151
 
151
152
  {#if description}
152
- <div class={classes.description({ class: ui.description })}>
153
+ <div class={variants.description({ class: ui.description })}>
153
154
  {#if typeof description === 'string'}
154
155
  {description}
155
156
  {:else}
@@ -161,10 +162,10 @@
161
162
  {/if}
162
163
  </svelte:element>
163
164
 
164
- {#snippet Icon(ico?: CheckboxProps['icon'], icon_class?: ClassNameValue)}
165
+ {#snippet Icon(ico?: CheckboxProps['icon'], icon_class?: ClassValue)}
165
166
  <div class={['absolute', icon_class]}>
166
167
  {#if typeof ico === 'string'}
167
- <div class={classes.icon({ class: [ico, ui.icon] })}></div>
168
+ <div class={variants.icon({ class: [ico, ui.icon] })}></div>
168
169
  {:else if isSnippet(ico)}
169
170
  {@render ico()}
170
171
  {:else if isComponent(ico)}
@@ -1,6 +1,6 @@
1
1
  import { type PropColor } from '../index.js';
2
2
  import type { Snippet } from 'svelte';
3
- import type { ClassNameValue } from 'tailwind-merge';
3
+ import { type ClassValue } from 'tailwind-variants';
4
4
  import type { Component } from 'vitest-browser-svelte';
5
5
  export type CheckboxProps = {
6
6
  value?: boolean | 'intermediate';
@@ -15,11 +15,11 @@ export type CheckboxProps = {
15
15
  indicator?: 'start' | 'end' | 'hidden';
16
16
  as?: string;
17
17
  ui?: {
18
- root?: ClassNameValue;
19
- container?: ClassNameValue;
20
- icon?: ClassNameValue;
21
- label?: ClassNameValue;
22
- description?: ClassNameValue;
18
+ root?: ClassValue;
19
+ container?: ClassValue;
20
+ icon?: ClassValue;
21
+ label?: ClassValue;
22
+ description?: ClassValue;
23
23
  };
24
24
  };
25
25
  declare const Checkbox: import("svelte").Component<CheckboxProps, {}, "value">;
@@ -1,8 +1,7 @@
1
1
  <script module lang="ts">
2
2
  import type { PropColor } from '../index.js';
3
3
  import type { Snippet } from 'svelte';
4
- import type { ClassNameValue } from 'tailwind-merge';
5
- import { tv } from 'tailwind-variants';
4
+ import { tv, type ClassValue } from 'tailwind-variants';
6
5
 
7
6
  export type ChipProps = {
8
7
  children: Snippet;
@@ -11,8 +10,8 @@
11
10
  position?: 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';
12
11
  size?: number;
13
12
  ui?: {
14
- base?: ClassNameValue;
15
- chip?: ClassNameValue;
13
+ base?: ClassValue;
14
+ chip?: ClassValue;
16
15
  };
17
16
  };
18
17
  </script>
@@ -27,12 +26,12 @@
27
26
  ui = {},
28
27
  }: ChipProps = $props();
29
28
 
30
- const classes = $derived.by(() =>
29
+ const variants = $derived.by(() =>
31
30
  tv({
32
31
  slots: {
33
32
  base: 'relative inline-flex items-center justify-center shrink-0',
34
33
  chip: [
35
- 'absolute rounded-full ring ring-inverted flex items-center justify-center text-inverted font-medium whitespace-nowrap',
34
+ 'absolute rounded-full ring ring-inverted flex items-center justify-center text-label-inverted font-medium whitespace-nowrap',
36
35
  '-translate-y-1/2 translate-x-1/2 px-0.5',
37
36
  ],
38
37
  },
@@ -68,11 +67,11 @@
68
67
  );
69
68
  </script>
70
69
 
71
- <div class={classes.base({ class: [ui.base] })}>
70
+ <div class={variants.base({ class: [ui.base] })}>
72
71
  {@render children()}
73
72
 
74
73
  <span
75
- class={classes.chip({ class: ui.chip })}
74
+ class={variants.chip({ class: ui.chip })}
76
75
  style:height="{size}px"
77
76
  style:min-width="{size}px"
78
77
  style:font-size="{size}px"
@@ -1,6 +1,6 @@
1
1
  import type { PropColor } from '../index.js';
2
2
  import type { Snippet } from 'svelte';
3
- import type { ClassNameValue } from 'tailwind-merge';
3
+ import { type ClassValue } from 'tailwind-variants';
4
4
  export type ChipProps = {
5
5
  children: Snippet;
6
6
  text?: string;
@@ -8,8 +8,8 @@ export type ChipProps = {
8
8
  position?: 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';
9
9
  size?: number;
10
10
  ui?: {
11
- base?: ClassNameValue;
12
- chip?: ClassNameValue;
11
+ base?: ClassValue;
12
+ chip?: ClassValue;
13
13
  };
14
14
  };
15
15
  declare const Chip: import("svelte").Component<ChipProps, {}, "">;
@@ -2,16 +2,15 @@
2
2
  import { type ButtonProps, Button } from '../index.js';
3
3
  import { Collapsible } from 'bits-ui';
4
4
  import { defu } from 'defu';
5
- import type { ClassNameValue } from 'tailwind-merge';
6
- import { tv } from 'tailwind-variants';
5
+ import { tv, type ClassValue } from 'tailwind-variants';
7
6
 
8
7
  export type CollapsibleProps = ButtonProps & {
9
8
  open?: boolean;
10
9
  disabled?: boolean;
11
- class?: ClassNameValue;
10
+ class?: ClassValue;
12
11
  ui?: {
13
- root?: ClassNameValue;
14
- content?: ClassNameValue;
12
+ root?: ClassValue;
13
+ content?: ClassValue;
15
14
  };
16
15
  };
17
16
  </script>
@@ -1,13 +1,13 @@
1
1
  import { type ButtonProps } from '../index.js';
2
2
  import { Collapsible } from 'bits-ui';
3
- import type { ClassNameValue } from 'tailwind-merge';
3
+ import { type ClassValue } from 'tailwind-variants';
4
4
  export type CollapsibleProps = ButtonProps & {
5
5
  open?: boolean;
6
6
  disabled?: boolean;
7
- class?: ClassNameValue;
7
+ class?: ClassValue;
8
8
  ui?: {
9
- root?: ClassNameValue;
10
- content?: ClassNameValue;
9
+ root?: ClassValue;
10
+ content?: ClassValue;
11
11
  };
12
12
  };
13
13
  declare const Collapsible: import("svelte").Component<CollapsibleProps, {}, "open">;
@@ -22,7 +22,7 @@
22
22
 
23
23
  const translated = $derived(new ColorTranslator(value));
24
24
 
25
- const classes = $derived(
25
+ const variants = $derived(
26
26
  tv({
27
27
  slots: {
28
28
  root: '',
@@ -2,14 +2,15 @@
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
3
  import { cn } from 'tailwind-variants';
4
4
  const { children, class: classes, ...rest }: SvelteHTMLElements['h1'] = $props();
5
+
6
+ const classname = $derived(
7
+ cn(
8
+ 'text-4xl font-bold mb-8 scroll-mt-[calc(45px+var(--ui-header-height))] lg:scroll-mt-(--ui-header-height)',
9
+ classes,
10
+ ),
11
+ );
5
12
  </script>
6
13
 
7
- <h1
8
- {...rest}
9
- class={cn(
10
- 'text-4xl font-bold mb-8 scroll-mt-[calc(45px+var(--ui-header-height))] lg:scroll-mt-(--ui-header-height)',
11
- classes,
12
- )}
13
- >
14
+ <h1 {...rest} class={classname}>
14
15
  {@render children?.()}
15
16
  </h1>
@@ -2,18 +2,19 @@
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
3
  import { cn } from 'tailwind-variants';
4
4
  const { children, class: classes, ...rest }: SvelteHTMLElements['h2'] = $props();
5
+
6
+ const classname = $derived(
7
+ cn(
8
+ 'relative text-2xl text-label-highlighted font-bold mt-12 mb-6',
9
+ 'scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))]',
10
+ '[&>a]:focus-visible:outline-primary',
11
+ '[&>a>code]:transition-colors [&>a>code]:border-dashed [&>a>code]:font-bold [&>a>code]:text-xl/7',
12
+ 'hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary',
13
+ classes,
14
+ ),
15
+ );
5
16
  </script>
6
17
 
7
- <h2
8
- {...rest}
9
- class={cn(
10
- 'relative text-2xl text-highlighted font-bold mt-12 mb-6',
11
- 'scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))]',
12
- '[&>a]:focus-visible:outline-primary',
13
- '[&>a>code]:transition-colors [&>a>code]:border-dashed [&>a>code]:font-bold [&>a>code]:text-xl/7',
14
- 'hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary',
15
- classes,
16
- )}
17
- >
18
+ <h2 {...rest} class={classname}>
18
19
  {@render children?.()}
19
20
  </h2>
@@ -2,15 +2,16 @@
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
3
  import { cn } from 'tailwind-variants';
4
4
  const { children, class: classes, ...rest }: SvelteHTMLElements['h3'] = $props();
5
+
6
+ const classname = $derived(
7
+ cn(
8
+ 'relative text-xl text-label-highlighted font-bold mt-8 mb-3 scroll-mt-[calc(32px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(32px+var(--ui-header-height))] [&>a]:focus-visible:outline-primary [&>a>code]:border-dashed hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary [&>a>code]:text-lg/6 [&>a>code]:font-bold',
9
+ '[&>a>code]:transition-colors',
10
+ classes,
11
+ ),
12
+ );
5
13
  </script>
6
14
 
7
- <h3
8
- {...rest}
9
- class={cn(
10
- 'relative text-xl text-highlighted font-bold mt-8 mb-3 scroll-mt-[calc(32px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(32px+var(--ui-header-height))] [&>a]:focus-visible:outline-primary [&>a>code]:border-dashed hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary [&>a>code]:text-lg/6 [&>a>code]:font-bold',
11
- '[&>a>code]:transition-colors',
12
- classes,
13
- )}
14
- >
15
+ <h3 {...rest} class={classname}>
15
16
  {@render children?.()}
16
17
  </h3>
@@ -2,18 +2,19 @@
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
3
  import { cn } from 'tailwind-variants';
4
4
  const { children, class: classes, ...rest }: SvelteHTMLElements['h4'] = $props();
5
+
6
+ const classname = $derived(
7
+ cn(
8
+ 'relative text-2xl text-label-highlighted font-bold mt-12 mb-6',
9
+ 'scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))]',
10
+ 'hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary',
11
+ '[&>a>code]:transition-colors [&>a>code]:text-xl/7 [&>a>code]:font-bold [&>a>code]:border-dashed',
12
+ '[&>a]:focus-visible:outline-primary',
13
+ classes,
14
+ ),
15
+ );
5
16
  </script>
6
17
 
7
- <h4
8
- {...rest}
9
- class={cn(
10
- 'relative text-2xl text-highlighted font-bold mt-12 mb-6',
11
- 'scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))]',
12
- 'hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary',
13
- '[&>a>code]:transition-colors [&>a>code]:text-xl/7 [&>a>code]:font-bold [&>a>code]:border-dashed',
14
- '[&>a]:focus-visible:outline-primary',
15
- classes,
16
- )}
17
- >
18
+ <h4 {...rest} class={classname}>
18
19
  {@render children?.()}
19
20
  </h4>
@@ -2,18 +2,19 @@
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
3
  import { cn } from 'tailwind-variants';
4
4
  const { children, class: classes, ...rest }: SvelteHTMLElements['h5'] = $props();
5
+
6
+ const classname = $derived(
7
+ cn(
8
+ 'relative text-2xl text-label-highlighted font-bold mt-12 mb-6',
9
+ 'scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))]',
10
+ 'hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary',
11
+ '[&>a>code]:transition-colors [&>a>code]:text-xl/7 [&>a>code]:font-bold [&>a>code]:border-dashed',
12
+ '[&>a]:focus-visible:outline-primary',
13
+ classes,
14
+ ),
15
+ );
5
16
  </script>
6
17
 
7
- <h5
8
- {...rest}
9
- class={cn(
10
- 'relative text-2xl text-highlighted font-bold mt-12 mb-6',
11
- 'scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))]',
12
- 'hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary',
13
- '[&>a>code]:transition-colors [&>a>code]:text-xl/7 [&>a>code]:font-bold [&>a>code]:border-dashed',
14
- '[&>a]:focus-visible:outline-primary',
15
- classes,
16
- )}
17
- >
18
+ <h5 {...rest} class={classname}>
18
19
  {@render children?.()}
19
20
  </h5>
@@ -2,18 +2,19 @@
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
3
  import { cn } from 'tailwind-variants';
4
4
  const { children, class: classes, ...rest }: SvelteHTMLElements['h6'] = $props();
5
+
6
+ const classname = $derived(
7
+ cn(
8
+ 'relative text-2xl text-label-highlighted font-bold mt-12 mb-6',
9
+ 'scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))]',
10
+ 'hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary',
11
+ '[&>a>code]:transition-colors [&>a>code]:text-xl/7 [&>a>code]:font-bold [&>a>code]:border-dashed',
12
+ '[&>a]:focus-visible:outline-primary',
13
+ classes,
14
+ ),
15
+ );
5
16
  </script>
6
17
 
7
- <h6
8
- {...rest}
9
- class={cn(
10
- 'relative text-2xl text-highlighted font-bold mt-12 mb-6',
11
- 'scroll-mt-[calc(48px+45px+var(--ui-header-height))] lg:scroll-mt-[calc(48px+var(--ui-header-height))]',
12
- 'hover:[&>a>code]:border-primary hover:[&>a>code]:text-primary',
13
- '[&>a>code]:transition-colors [&>a>code]:text-xl/7 [&>a>code]:font-bold [&>a>code]:border-dashed',
14
- '[&>a]:focus-visible:outline-primary',
15
- classes,
16
- )}
17
- >
18
+ <h6 {...rest} class={classname}>
18
19
  {@render children?.()}
19
20
  </h6>
@@ -55,3 +55,9 @@ export * from './breadcrumb.svelte';
55
55
  export { default as Breadcrumb } from './breadcrumb.svelte';
56
56
  export * from './input-number.svelte';
57
57
  export { default as InputNumber } from './input-number.svelte';
58
+ export * from './modal.svelte';
59
+ export { default as Modal } from './modal.svelte';
60
+ export * from './tooltip.svelte';
61
+ export { default as Tooltip } from './tooltip.svelte';
62
+ export * from './app.svelte';
63
+ export { default as App } from './app.svelte';
@@ -55,3 +55,9 @@ export * from './breadcrumb.svelte';
55
55
  export { default as Breadcrumb } from './breadcrumb.svelte';
56
56
  export * from './input-number.svelte';
57
57
  export { default as InputNumber } from './input-number.svelte';
58
+ export * from './modal.svelte';
59
+ export { default as Modal } from './modal.svelte';
60
+ export * from './tooltip.svelte';
61
+ export { default as Tooltip } from './tooltip.svelte';
62
+ export * from './app.svelte';
63
+ export { default as App } from './app.svelte';
@@ -7,9 +7,7 @@
7
7
  type PropVariant,
8
8
  } from '../index.js';
9
9
  import type { SvelteHTMLElements } from 'svelte/elements';
10
- import type { ClassNameValue } from 'tailwind-merge';
11
- import { tv } from 'tailwind-variants';
12
- import Accordion from './accordion.svelte';
10
+ import { tv, type ClassValue } from 'tailwind-variants';
13
11
  import { useId } from 'bits-ui';
14
12
 
15
13
  export type InputNumberProps = Omit<SvelteHTMLElements['input'], 'size' | 'value'> & {
@@ -38,10 +36,10 @@
38
36
  focusonchange?: boolean;
39
37
  autocomplete?: 'on' | 'off' | string;
40
38
  ui?: {
41
- root?: ClassNameValue;
42
- base?: ClassNameValue;
43
- increment?: ClassNameValue;
44
- decrement?: ClassNameValue;
39
+ root?: ClassValue;
40
+ base?: ClassValue;
41
+ increment?: ClassValue;
42
+ decrement?: ClassValue;
45
43
  };
46
44
  };
47
45
  </script>
@@ -1,6 +1,6 @@
1
1
  import { type ButtonProps, type PropColor, type PropSize, type PropVariant } from '../index.js';
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
- import type { ClassNameValue } from 'tailwind-merge';
3
+ import { type ClassValue } from 'tailwind-variants';
4
4
  export type InputNumberProps = Omit<SvelteHTMLElements['input'], 'size' | 'value'> & {
5
5
  value?: number;
6
6
  placeholder?: string;
@@ -27,10 +27,10 @@ export type InputNumberProps = Omit<SvelteHTMLElements['input'], 'size' | 'value
27
27
  focusonchange?: boolean;
28
28
  autocomplete?: 'on' | 'off' | string;
29
29
  ui?: {
30
- root?: ClassNameValue;
31
- base?: ClassNameValue;
32
- increment?: ClassNameValue;
33
- decrement?: ClassNameValue;
30
+ root?: ClassValue;
31
+ base?: ClassValue;
32
+ increment?: ClassValue;
33
+ decrement?: ClassValue;
34
34
  };
35
35
  };
36
36
  declare const InputNumber: import("svelte").Component<InputNumberProps, {}, "value">;
@@ -1,8 +1,7 @@
1
1
  <script module lang="ts">
2
2
  import { type PropColor, type PropVariant } from '../index.js';
3
3
  import type { Component, Snippet } from 'svelte';
4
- import type { ClassNameValue } from 'tailwind-merge';
5
- import { tv } from 'tailwind-variants';
4
+ import { tv, type ClassValue } from 'tailwind-variants';
6
5
  import { Time } from '../date.js';
7
6
 
8
7
  export { default as InputTime } from './input-time.svelte';
@@ -45,11 +44,11 @@
45
44
  value?: Time;
46
45
  icon?: string | Snippet | Component;
47
46
  ui?: {
48
- root?: ClassNameValue;
49
- leading?: ClassNameValue;
50
- icon?: ClassNameValue;
51
- trailing?: ClassNameValue;
52
- segment?: ClassNameValue;
47
+ root?: ClassValue;
48
+ leading?: ClassValue;
49
+ icon?: ClassValue;
50
+ trailing?: ClassValue;
51
+ segment?: ClassValue;
53
52
  };
54
53
  };
55
54
  </script>
@@ -74,12 +73,12 @@
74
73
  tv({
75
74
  slots: {
76
75
  root: 'inline-flex items-center rounded transition-all ring ring-inset ring-transparent',
77
- leading: 'text-muted',
78
- trailing: 'text-muted',
76
+ leading: 'text-label-muted',
77
+ trailing: 'text-label-muted',
79
78
  icon: '',
80
79
  segment: [
81
80
  'rounded text-center outline-hidden transition-all focus:bg-surface-accented shrink',
82
- 'aria-[valuetext="Empty"]:text-dimmed data-[segment="literal"]:text-muted data-[segment="literal"]:px-1 data-invalid:text-error data-disabled:cursor-not-allowed data-disabled:opacity-75',
81
+ 'aria-[valuetext="Empty"]:text-label-dimmed data-[segment="literal"]:text-label-muted data-[segment="literal"]:px-1 data-invalid:text-error data-disabled:cursor-not-allowed data-disabled:opacity-75',
83
82
  ],
84
83
  },
85
84
  variants: {
@@ -158,7 +157,7 @@
158
157
  true: '',
159
158
  },
160
159
  type: {
161
- file: 'file:me-1.5 file:font-medium file:text-muted file:outline-none',
160
+ file: 'file:me-1.5 file:font-medium file:text-label-muted file:outline-none',
162
161
  },
163
162
  },
164
163
  compoundVariants: [
@@ -175,7 +174,7 @@
175
174
  variant: ['outline', 'subtle'],
176
175
  highlight: true,
177
176
  class: {
178
- root: 'ring-surface-800 ring-2',
177
+ root: 'ring-surface-inverted ring-2',
179
178
  },
180
179
  },
181
180
  {
@@ -1,6 +1,6 @@
1
1
  import { type PropColor, type PropVariant } from '../index.js';
2
2
  import type { Component, Snippet } from 'svelte';
3
- import type { ClassNameValue } from 'tailwind-merge';
3
+ import { type ClassValue } from 'tailwind-variants';
4
4
  import { Time } from '../date.js';
5
5
  export { default as InputTime } from './input-time.svelte';
6
6
  export type InputTimeProps = {
@@ -41,11 +41,11 @@ export type InputTimeProps = {
41
41
  value?: Time;
42
42
  icon?: string | Snippet | Component;
43
43
  ui?: {
44
- root?: ClassNameValue;
45
- leading?: ClassNameValue;
46
- icon?: ClassNameValue;
47
- trailing?: ClassNameValue;
48
- segment?: ClassNameValue;
44
+ root?: ClassValue;
45
+ leading?: ClassValue;
46
+ icon?: ClassValue;
47
+ trailing?: ClassValue;
48
+ segment?: ClassValue;
49
49
  };
50
50
  };
51
51
  declare const InputTime: Component<InputTimeProps, {}, "value">;