@insymetri/styleguide 0.1.4 → 0.1.6

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.
@@ -0,0 +1,74 @@
1
+ <script lang="ts">
2
+ import type {Snippet} from 'svelte'
3
+ import {cn} from '../utils/cn'
4
+ import {IIIcon} from '../IIIcon'
5
+ import type {IconName} from '../icons'
6
+
7
+ type Variant = 'error' | 'warning' | 'success' | 'info'
8
+
9
+ type Props = {
10
+ variant?: Variant
11
+ title?: string
12
+ children: Snippet
13
+ dismissible?: boolean
14
+ onDismiss?: () => void
15
+ class?: string
16
+ }
17
+
18
+ let {
19
+ variant = 'info',
20
+ title,
21
+ children,
22
+ dismissible = false,
23
+ onDismiss,
24
+ class: className,
25
+ }: Props = $props()
26
+
27
+ let dismissed = $state(false)
28
+
29
+ const variantConfig: Record<Variant, {bg: string; border: string; text: string; icon: IconName}> = {
30
+ error: {bg: 'bg-error-bg', border: 'border-error', text: 'text-error', icon: 'warning-circle'},
31
+ warning: {bg: 'bg-warning-bg', border: 'border-warning', text: 'text-warning', icon: 'warning'},
32
+ success: {bg: 'bg-success-bg', border: 'border-success', text: 'text-success', icon: 'check-circle'},
33
+ info: {bg: 'bg-info-bg', border: 'border-info', text: 'text-info', icon: 'info'},
34
+ }
35
+
36
+ const config = $derived(variantConfig[variant])
37
+
38
+ function handleDismiss() {
39
+ dismissed = true
40
+ onDismiss?.()
41
+ }
42
+ </script>
43
+
44
+ {#if !dismissed}
45
+ <div
46
+ class={cn(
47
+ 'flex gap-12 p-12 rounded-8 border',
48
+ config.bg,
49
+ config.border,
50
+ className
51
+ )}
52
+ role="alert"
53
+ >
54
+ <IIIcon icon={config.icon} class={cn('size-20 shrink-0 mt-1', config.text)} />
55
+ <div class="flex-auto min-w-0">
56
+ {#if title}
57
+ <p class={cn('text-small-emphasis m-0', config.text)}>{title}</p>
58
+ {/if}
59
+ <div class={cn('text-small text-body', title && 'mt-4')}>
60
+ {@render children()}
61
+ </div>
62
+ </div>
63
+ {#if dismissible}
64
+ <button
65
+ type="button"
66
+ class="shrink-0 p-4 rounded-4 text-secondary hover:bg-hover-overlay transition-colors duration-fast cursor-default"
67
+ onclick={handleDismiss}
68
+ aria-label="Dismiss"
69
+ >
70
+ <IIIcon icon="x" class="size-16" />
71
+ </button>
72
+ {/if}
73
+ </div>
74
+ {/if}
@@ -0,0 +1,13 @@
1
+ import type { Snippet } from 'svelte';
2
+ type Variant = 'error' | 'warning' | 'success' | 'info';
3
+ type Props = {
4
+ variant?: Variant;
5
+ title?: string;
6
+ children: Snippet;
7
+ dismissible?: boolean;
8
+ onDismiss?: () => void;
9
+ class?: string;
10
+ };
11
+ declare const IIAlert: import("svelte").Component<Props, {}, "">;
12
+ type IIAlert = ReturnType<typeof IIAlert>;
13
+ export default IIAlert;
@@ -0,0 +1 @@
1
+ export { default as IIAlert } from './IIAlert.svelte';
@@ -0,0 +1 @@
1
+ export { default as IIAlert } from './IIAlert.svelte';
@@ -4,7 +4,7 @@
4
4
  import {cn} from '../utils/cn'
5
5
 
6
6
  type BaseProps = {
7
- variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'success'
7
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'success' | 'accent'
8
8
  size?: 'sm' | 'md' | 'lg'
9
9
  iconOnly?: boolean
10
10
  loading?: boolean
@@ -47,6 +47,7 @@
47
47
  ghost: 'bg-transparent text-secondary border-0 hover:bg-button-ghost-hover disabled:opacity-50',
48
48
  danger: 'bg-error text-inverse border-0 hover:bg-error-hover disabled:bg-disabled',
49
49
  success: 'bg-success text-inverse border-0 hover:bg-success-hover disabled:bg-disabled',
50
+ accent: 'bg-accent text-on-accent border-0 hover:bg-accent-hover disabled:bg-disabled',
50
51
  } as const
51
52
 
52
53
  const sizeClasses = {
@@ -1,7 +1,7 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import type { HTMLButtonAttributes, HTMLAnchorAttributes } from 'svelte/elements';
3
3
  type BaseProps = {
4
- variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'success';
4
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'success' | 'accent';
5
5
  size?: 'sm' | 'md' | 'lg';
6
6
  iconOnly?: boolean;
7
7
  loading?: boolean;
@@ -0,0 +1,60 @@
1
+ <script lang="ts">
2
+ import type {Snippet} from 'svelte'
3
+ import {cn} from '../utils/cn'
4
+
5
+ type Props = {
6
+ variant?: 'default' | 'outlined' | 'elevated'
7
+ padding?: 'none' | 'sm' | 'md' | 'lg'
8
+ hoverable?: boolean
9
+ children: Snippet
10
+ header?: Snippet
11
+ footer?: Snippet
12
+ class?: string
13
+ }
14
+
15
+ let {
16
+ variant = 'default',
17
+ padding = 'md',
18
+ hoverable = false,
19
+ children,
20
+ header,
21
+ footer,
22
+ class: className,
23
+ }: Props = $props()
24
+
25
+ const variantClasses = {
26
+ default: 'bg-surface border border-primary',
27
+ outlined: 'bg-transparent border border-strong',
28
+ elevated: 'bg-surface shadow-card',
29
+ } as const
30
+
31
+ const paddingClasses = {
32
+ none: '',
33
+ sm: 'p-12',
34
+ md: 'p-16',
35
+ lg: 'p-24',
36
+ } as const
37
+ </script>
38
+
39
+ <div
40
+ class={cn(
41
+ 'rounded-12',
42
+ variantClasses[variant],
43
+ hoverable && 'transition-shadow duration-fast hover:shadow-card-hover cursor-default',
44
+ className
45
+ )}
46
+ >
47
+ {#if header}
48
+ <div class={cn('border-b border-primary', paddingClasses[padding])}>
49
+ {@render header()}
50
+ </div>
51
+ {/if}
52
+ <div class={paddingClasses[padding]}>
53
+ {@render children()}
54
+ </div>
55
+ {#if footer}
56
+ <div class={cn('border-t border-primary', paddingClasses[padding])}>
57
+ {@render footer()}
58
+ </div>
59
+ {/if}
60
+ </div>
@@ -0,0 +1,13 @@
1
+ import type { Snippet } from 'svelte';
2
+ type Props = {
3
+ variant?: 'default' | 'outlined' | 'elevated';
4
+ padding?: 'none' | 'sm' | 'md' | 'lg';
5
+ hoverable?: boolean;
6
+ children: Snippet;
7
+ header?: Snippet;
8
+ footer?: Snippet;
9
+ class?: string;
10
+ };
11
+ declare const IICard: import("svelte").Component<Props, {}, "">;
12
+ type IICard = ReturnType<typeof IICard>;
13
+ export default IICard;
@@ -0,0 +1 @@
1
+ export { default as IICard } from './IICard.svelte';
@@ -0,0 +1 @@
1
+ export { default as IICard } from './IICard.svelte';
@@ -1,8 +1,9 @@
1
1
  <script lang="ts">
2
+ import type {Snippet} from 'svelte'
2
3
  import type {HTMLInputAttributes} from 'svelte/elements'
3
4
  import {cn} from '../utils/cn'
4
5
 
5
- type Props = HTMLInputAttributes & {
6
+ type Props = Omit<HTMLInputAttributes, 'prefix'> & {
6
7
  label?: string
7
8
  errorMessage?: string
8
9
  helperText?: string
@@ -12,6 +13,8 @@
12
13
  value?: string | number
13
14
  ref?: HTMLInputElement
14
15
  class?: string
16
+ prefix?: Snippet
17
+ suffix?: Snippet
15
18
  }
16
19
 
17
20
  let {
@@ -24,10 +27,13 @@
24
27
  value = $bindable(),
25
28
  ref = $bindable(),
26
29
  class: className,
30
+ prefix,
31
+ suffix,
27
32
  ...restProps
28
33
  }: Props = $props()
29
34
 
30
35
  const showError = $derived(error || !!errorMessage)
36
+ const hasAddons = $derived(!!prefix || !!suffix)
31
37
  let shouldShake = $state(false)
32
38
  let prevShowError = $state(false)
33
39
 
@@ -49,18 +55,48 @@
49
55
  {label}
50
56
  </label>
51
57
  {/if}
52
- <input
53
- bind:this={ref}
54
- bind:value
55
- {type}
56
- {disabled}
57
- class={cn(
58
- 'py-6 px-12 text-small font-[family-name:var(--font-family)] text-input-text bg-input-bg border border-input-border rounded-10 transition-all duration-fast outline-none w-full box-border placeholder:text-input-placeholder hover:border-input-border-hover focus:border-input-border-hover disabled:bg-input-bg-disabled disabled:text-input-text-disabled disabled:cursor-not-allowed motion-reduce:transition-none motion-reduce:animate-none',
59
- showError && 'border-input-border-error focus:border-input-border-error focus:ring-error',
60
- shouldShake && 'animate-shake'
61
- )}
62
- {...restProps}
63
- />
58
+ {#if hasAddons}
59
+ <div
60
+ class={cn(
61
+ 'flex items-center bg-input-bg border border-input-border rounded-10 transition-all duration-fast hover:border-input-border-hover focus-within:border-input-border-hover motion-reduce:transition-none',
62
+ showError && 'border-input-border-error focus-within:border-input-border-error',
63
+ shouldShake && 'animate-shake',
64
+ disabled && 'bg-input-bg-disabled cursor-not-allowed'
65
+ )}
66
+ >
67
+ {#if prefix}
68
+ <span class="flex items-center pl-12 text-secondary shrink-0">
69
+ {@render prefix()}
70
+ </span>
71
+ {/if}
72
+ <input
73
+ bind:this={ref}
74
+ bind:value
75
+ {type}
76
+ {disabled}
77
+ class="py-6 px-12 text-small font-[family-name:var(--font-family)] text-input-text bg-transparent border-0 outline-none w-full box-border placeholder:text-input-placeholder disabled:text-input-text-disabled disabled:cursor-not-allowed"
78
+ {...restProps}
79
+ />
80
+ {#if suffix}
81
+ <span class="flex items-center pr-12 text-secondary shrink-0">
82
+ {@render suffix()}
83
+ </span>
84
+ {/if}
85
+ </div>
86
+ {:else}
87
+ <input
88
+ bind:this={ref}
89
+ bind:value
90
+ {type}
91
+ {disabled}
92
+ class={cn(
93
+ 'py-6 px-12 text-small font-[family-name:var(--font-family)] text-input-text bg-input-bg border border-input-border rounded-10 transition-all duration-fast outline-none w-full box-border placeholder:text-input-placeholder hover:border-input-border-hover focus:border-input-border-hover disabled:bg-input-bg-disabled disabled:text-input-text-disabled disabled:cursor-not-allowed motion-reduce:transition-none motion-reduce:animate-none',
94
+ showError && 'border-input-border-error focus:border-input-border-error focus:ring-error',
95
+ shouldShake && 'animate-shake'
96
+ )}
97
+ {...restProps}
98
+ />
99
+ {/if}
64
100
  {#if showError && errorMessage}
65
101
  <span class="text-tiny text-error">{errorMessage}</span>
66
102
  {:else if helperText}
@@ -1,5 +1,6 @@
1
+ import type { Snippet } from 'svelte';
1
2
  import type { HTMLInputAttributes } from 'svelte/elements';
2
- type Props = HTMLInputAttributes & {
3
+ type Props = Omit<HTMLInputAttributes, 'prefix'> & {
3
4
  label?: string;
4
5
  errorMessage?: string;
5
6
  helperText?: string;
@@ -9,6 +10,8 @@ type Props = HTMLInputAttributes & {
9
10
  value?: string | number;
10
11
  ref?: HTMLInputElement;
11
12
  class?: string;
13
+ prefix?: Snippet;
14
+ suffix?: Snippet;
12
15
  };
13
16
  declare const IIInput: import("svelte").Component<Props, {}, "value" | "ref">;
14
17
  type IIInput = ReturnType<typeof IIInput>;
@@ -0,0 +1,26 @@
1
+ <script lang="ts">
2
+ import {cn} from '../utils/cn'
3
+
4
+ type Props = {
5
+ size?: 'sm' | 'md' | 'lg'
6
+ class?: string
7
+ }
8
+
9
+ let {size = 'md', class: className}: Props = $props()
10
+
11
+ const sizeClasses = {
12
+ sm: 'w-16 h-16 border-2',
13
+ md: 'w-24 h-24 border-2',
14
+ lg: 'w-36 h-36 border-3',
15
+ } as const
16
+ </script>
17
+
18
+ <span
19
+ class={cn(
20
+ 'inline-block rounded-full border-primary border-r-transparent animate-spin motion-reduce:animate-none',
21
+ sizeClasses[size],
22
+ className
23
+ )}
24
+ role="status"
25
+ aria-label="Loading"
26
+ ></span>
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ size?: 'sm' | 'md' | 'lg';
3
+ class?: string;
4
+ };
5
+ declare const IISpinner: import("svelte").Component<Props, {}, "">;
6
+ type IISpinner = ReturnType<typeof IISpinner>;
7
+ export default IISpinner;
@@ -0,0 +1 @@
1
+ export { default as IISpinner } from './IISpinner.svelte';
@@ -0,0 +1 @@
1
+ export { default as IISpinner } from './IISpinner.svelte';
@@ -0,0 +1,71 @@
1
+ <script lang="ts">
2
+ import {cn} from '../utils/cn'
3
+ import {IIIcon} from '../IIIcon'
4
+
5
+ type Step = {
6
+ label: string
7
+ description?: string
8
+ }
9
+
10
+ type Props = {
11
+ steps: Step[]
12
+ currentStep: number
13
+ onStepClick?: (index: number) => void
14
+ class?: string
15
+ }
16
+
17
+ let {steps, currentStep, onStepClick, class: className}: Props = $props()
18
+ </script>
19
+
20
+ <nav class={cn('flex items-center w-full', className)} aria-label="Progress">
21
+ {#each steps as step, i}
22
+ {@const isCompleted = i < currentStep}
23
+ {@const isActive = i === currentStep}
24
+ {@const isClickable = !!onStepClick && (isCompleted || isActive)}
25
+
26
+ {#if i > 0}
27
+ <div
28
+ class={cn(
29
+ 'flex-auto h-[2px] mx-8',
30
+ isCompleted ? 'bg-primary' : 'bg-muted'
31
+ )}
32
+ ></div>
33
+ {/if}
34
+
35
+ <button
36
+ type="button"
37
+ class={cn(
38
+ 'flex items-center gap-8 shrink-0',
39
+ isClickable ? 'cursor-default' : 'cursor-default pointer-events-none'
40
+ )}
41
+ disabled={!isClickable}
42
+ onclick={() => onStepClick?.(i)}
43
+ aria-current={isActive ? 'step' : undefined}
44
+ >
45
+ <span
46
+ class={cn(
47
+ 'flex items-center justify-center w-28 h-28 rounded-full text-tiny-emphasis transition-colors duration-fast',
48
+ isCompleted && 'bg-primary text-inverse',
49
+ isActive && 'bg-primary text-inverse',
50
+ !isCompleted && !isActive && 'bg-muted text-secondary'
51
+ )}
52
+ >
53
+ {#if isCompleted}
54
+ <IIIcon icon="check" class="size-14" />
55
+ {:else}
56
+ {i + 1}
57
+ {/if}
58
+ </span>
59
+ <span
60
+ class={cn(
61
+ 'text-small hidden sm:block',
62
+ isActive && 'text-body font-medium',
63
+ isCompleted && 'text-body',
64
+ !isCompleted && !isActive && 'text-secondary'
65
+ )}
66
+ >
67
+ {step.label}
68
+ </span>
69
+ </button>
70
+ {/each}
71
+ </nav>
@@ -0,0 +1,13 @@
1
+ type Step = {
2
+ label: string;
3
+ description?: string;
4
+ };
5
+ type Props = {
6
+ steps: Step[];
7
+ currentStep: number;
8
+ onStepClick?: (index: number) => void;
9
+ class?: string;
10
+ };
11
+ declare const IIStepper: import("svelte").Component<Props, {}, "">;
12
+ type IIStepper = ReturnType<typeof IIStepper>;
13
+ export default IIStepper;
@@ -0,0 +1 @@
1
+ export { default as IIStepper } from './IIStepper.svelte';
@@ -0,0 +1 @@
1
+ export { default as IIStepper } from './IIStepper.svelte';
package/dist/icons.d.ts CHANGED
@@ -66,6 +66,7 @@ export declare const icons: {
66
66
  readonly 'dots-three-vertical': "<path fill=\"currentColor\" d=\"M140 128a12 12 0 1 1-12-12a12 12 0 0 1 12 12m-12-56a12 12 0 1 0-12-12a12 12 0 0 0 12 12m0 112a12 12 0 1 0 12 12a12 12 0 0 0-12-12\"/>";
67
67
  readonly trash: "<path fill=\"currentColor\" d=\"M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16M96 40a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v8H96Zm96 168H64V64h128Zm-80-104v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0m48 0v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0\"/>";
68
68
  readonly circle: "<path fill=\"currentColor\" d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88\"/>";
69
+ readonly info: "<path fill=\"currentColor\" d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m16-40a8 8 0 0 1-8 8a8 8 0 0 1-8-8v-40a8 8 0 0 1 0-16a8 8 0 0 1 8 8v40a8 8 0 0 1 8 8M116 84a12 12 0 1 1 12 12a12 12 0 0 1-12-12\"/>";
69
70
  readonly 'warning-circle': "<path fill=\"currentColor\" d=\"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m-8-80V80a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12\"/>";
70
71
  readonly warning: "<path fill=\"currentColor\" d=\"M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12\"/>";
71
72
  readonly gavel: "<path fill=\"currentColor\" d=\"m243.32 116.69l-16-16a16 16 0 0 0-20.84-1.53l-49.64-49.64a16 16 0 0 0-1.52-20.84l-16-16a16 16 0 0 0-22.63 0l-64 64a16 16 0 0 0 0 22.63l16 16a16 16 0 0 0 20.83 1.52l7.17 7.17l-65.38 65.38a25 25 0 0 0 35.32 35.32L132 159.32l7.17 7.16a16 16 0 0 0 1.52 20.84l16 16a16 16 0 0 0 22.63 0l64-64a16 16 0 0 0 0-22.63M80 104L64 88l64-64l16 16ZM55.32 213.38a9 9 0 0 1-12.69 0a9 9 0 0 1 0-12.68L108 135.32L120.69 148ZM101 105.66L145.66 61L195 110.34L150.35 155ZM168 192l-16-16l4-4l56-56l4-4l16 16Z\"/>";
package/dist/icons.js CHANGED
@@ -74,6 +74,7 @@ export const icons = {
74
74
  'trash': `<path fill="currentColor" d="M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16M96 40a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8v8H96Zm96 168H64V64h128Zm-80-104v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0m48 0v64a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0"/>`,
75
75
  'circle': `<path fill="currentColor" d="M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88"/>`,
76
76
  // Status & Feedback
77
+ 'info': `<path fill="currentColor" d="M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m16-40a8 8 0 0 1-8 8a8 8 0 0 1-8-8v-40a8 8 0 0 1 0-16a8 8 0 0 1 8 8v40a8 8 0 0 1 8 8M116 84a12 12 0 1 1 12 12a12 12 0 0 1-12-12"/>`,
77
78
  'warning-circle': `<path fill="currentColor" d="M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m-8-80V80a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12"/>`,
78
79
  'warning': `<path fill="currentColor" d="M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12"/>`,
79
80
  // Legal & Auth
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  export { IIActionGroup } from './IIActionGroup';
2
+ export { IIAlert } from './IIAlert';
2
3
  export { IIAsyncState } from './IIAsyncState';
3
4
  export { IIAuditTrail } from './IIAuditTrail';
4
5
  export { IIBadge } from './IIBadge';
5
6
  export { IIButton } from './IIButton';
7
+ export { IICard } from './IICard';
6
8
  export { IICheckbox } from './IICheckbox';
7
9
  export { IICheckboxList } from './IICheckboxList';
8
10
  export { IICombobox } from './IICombobox';
@@ -18,7 +20,9 @@ export { IIIcon } from './IIIcon';
18
20
  export { IIInput } from './IIInput';
19
21
  export { IIModal } from './IIModal';
20
22
  export { IIOverflowActions } from './IIOverflowActions';
23
+ export { IISpinner } from './IISpinner';
21
24
  export { IIStatusBadge } from './IIStatusBadge';
25
+ export { IIStepper } from './IIStepper';
22
26
  export { IISwitch } from './IISwitch';
23
27
  export { IITable } from './IITable';
24
28
  export { IITableSkeleton } from './IITableSkeleton';
@@ -33,3 +37,4 @@ export { toast } from './toast';
33
37
  export { cn } from './utils/cn';
34
38
  export { icons } from './icons';
35
39
  export type { IconName } from './icons';
40
+ export { preset, twPreset } from './style';
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  // @insymetri/styleguide
2
2
  // Components
3
3
  export { IIActionGroup } from './IIActionGroup';
4
+ export { IIAlert } from './IIAlert';
4
5
  export { IIAsyncState } from './IIAsyncState';
5
6
  export { IIAuditTrail } from './IIAuditTrail';
6
7
  export { IIBadge } from './IIBadge';
7
8
  export { IIButton } from './IIButton';
9
+ export { IICard } from './IICard';
8
10
  export { IICheckbox } from './IICheckbox';
9
11
  export { IICheckboxList } from './IICheckboxList';
10
12
  export { IICombobox } from './IICombobox';
@@ -20,7 +22,9 @@ export { IIIcon } from './IIIcon';
20
22
  export { IIInput } from './IIInput';
21
23
  export { IIModal } from './IIModal';
22
24
  export { IIOverflowActions } from './IIOverflowActions';
25
+ export { IISpinner } from './IISpinner';
23
26
  export { IIStatusBadge } from './IIStatusBadge';
27
+ export { IIStepper } from './IIStepper';
24
28
  export { IISwitch } from './IISwitch';
25
29
  export { IITable } from './IITable';
26
30
  export { IITableSkeleton } from './IITableSkeleton';
@@ -34,3 +38,5 @@ export { toast } from './toast';
34
38
  export { cn } from './utils/cn';
35
39
  // Icons
36
40
  export { icons } from './icons';
41
+ // Style
42
+ export { preset, twPreset } from './style';
@@ -5,6 +5,11 @@
5
5
  /* Brand */
6
6
  --ii-primary: #1173d4;
7
7
  --ii-primary-hover: #0f5bb6;
8
+ --ii-accent: #ee7034;
9
+ --ii-accent-hover: #d4632e;
10
+ --ii-secondary: #0891b2;
11
+ --ii-text-on-primary: #ffffff;
12
+ --ii-text-on-accent: #ffffff;
8
13
 
9
14
  /* Grayscale */
10
15
  --ii-gray-50: #f9fafb;
@@ -1 +1 @@
1
- export { default as preset } from './tailwind/preset';
1
+ export { default as preset, default as twPreset } from './tailwind/preset';
@@ -1 +1 @@
1
- export { default as preset } from './tailwind/preset';
1
+ export { default as preset, default as twPreset } from './tailwind/preset';
@@ -1,6 +1,9 @@
1
1
  export declare const backgroundColor: {
2
2
  primary: string;
3
3
  'primary-hover': string;
4
+ accent: string;
5
+ 'accent-hover': string;
6
+ secondary: string;
4
7
  'primary-2': string;
5
8
  'primary-5': string;
6
9
  'primary-8': string;
@@ -107,6 +110,8 @@ export declare const textColor: {
107
110
  secondary: string;
108
111
  tertiary: string;
109
112
  inverse: string;
113
+ 'on-primary': string;
114
+ 'on-accent': string;
110
115
  surface: string;
111
116
  muted: string;
112
117
  'muted-strong': string;
@@ -23,6 +23,9 @@ export const backgroundColor = {
23
23
  // Brand
24
24
  primary: 'var(--ii-primary)',
25
25
  'primary-hover': 'var(--ii-primary-hover)',
26
+ accent: 'var(--ii-accent)',
27
+ 'accent-hover': 'var(--ii-accent-hover)',
28
+ secondary: 'var(--ii-secondary)',
26
29
  'primary-2': 'var(--ii-primary-2)',
27
30
  'primary-5': 'var(--ii-primary-5)',
28
31
  'primary-8': 'var(--ii-primary-8)',
@@ -135,6 +138,8 @@ export const textColor = {
135
138
  secondary: 'var(--ii-text-secondary)',
136
139
  tertiary: 'var(--ii-text-tertiary)',
137
140
  inverse: 'var(--ii-text-inverse)',
141
+ 'on-primary': 'var(--ii-text-on-primary)',
142
+ 'on-accent': 'var(--ii-text-on-accent)',
138
143
  surface: 'var(--ii-surface)', // white text on dark backgrounds
139
144
  muted: 'var(--ii-border)', // very light gray (decorative separators, bullets)
140
145
  'muted-strong': 'var(--ii-border-strong)', // slightly darker muted text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insymetri/styleguide",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Insymetri shared UI component library built with Svelte 5",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,6 +21,7 @@
21
21
  "types": "./dist/style/index.d.ts",
22
22
  "default": "./dist/style/index.js"
23
23
  },
24
+ "./global.css": "./dist/style/global.css",
24
25
  "./style/*.css": "./dist/style/*.css",
25
26
  "./icons": {
26
27
  "types": "./dist/icons.d.ts",