@insymetri/styleguide 0.1.5 → 0.1.7
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/dist/IIAlert/IIAlert.svelte +74 -0
- package/dist/IIAlert/IIAlert.svelte.d.ts +13 -0
- package/dist/IIAlert/index.d.ts +1 -0
- package/dist/IIAlert/index.js +1 -0
- package/dist/IIButton/IIButton.svelte +3 -2
- package/dist/IIButton/IIButton.svelte.d.ts +1 -1
- package/dist/IICard/IICard.svelte +60 -0
- package/dist/IICard/IICard.svelte.d.ts +13 -0
- package/dist/IICard/index.d.ts +1 -0
- package/dist/IICard/index.js +1 -0
- package/dist/IICombobox/IICombobox.svelte +3 -3
- package/dist/IIDatePicker/IIDatePicker.svelte +1 -1
- package/dist/IIDropdownInput/IIDropdownInput.svelte +44 -22
- package/dist/IIDropdownInput/IIDropdownInput.svelte.d.ts +1 -0
- package/dist/IIDropdownMenu/IIDropdownMenu.svelte +1 -1
- package/dist/IIInput/IIInput.svelte +49 -13
- package/dist/IIInput/IIInput.svelte.d.ts +4 -1
- package/dist/IISpinner/IISpinner.svelte +26 -0
- package/dist/IISpinner/IISpinner.svelte.d.ts +7 -0
- package/dist/IISpinner/index.d.ts +1 -0
- package/dist/IISpinner/index.js +1 -0
- package/dist/IIStepper/IIStepper.svelte +71 -0
- package/dist/IIStepper/IIStepper.svelte.d.ts +13 -0
- package/dist/IIStepper/index.d.ts +1 -0
- package/dist/IIStepper/index.js +1 -0
- package/dist/IITextarea/IITextarea.svelte +1 -1
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/style/colors.css +6 -0
- package/dist/style/tailwind/colors.d.ts +5 -0
- package/dist/style/tailwind/colors.js +6 -1
- package/dist/style/tailwind/typography.d.ts +6 -6
- package/dist/style/tailwind/typography.js +8 -8
- package/package.json +1 -1
|
@@ -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,11 +47,12 @@
|
|
|
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 = {
|
|
53
54
|
sm: 'py-4 px-8 text-tiny-emphasis h-20',
|
|
54
|
-
md: 'py-
|
|
55
|
+
md: 'py-5 px-16 text-small h-28',
|
|
55
56
|
lg: 'py-10 px-24 text-large h-36',
|
|
56
57
|
} as const
|
|
57
58
|
|
|
@@ -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';
|
|
@@ -111,13 +111,13 @@
|
|
|
111
111
|
{placeholder}
|
|
112
112
|
{disabled}
|
|
113
113
|
oninput={handleInput}
|
|
114
|
-
class="w-full box-border py-
|
|
114
|
+
class="w-full box-border py-5 px-12 text-small text-input-text bg-input-bg border border-input-border rounded-10 transition-all duration-fast outline-none placeholder:text-input-placeholder hover:border-input-border-hover focus:border-input-border-hover disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-input-bg-disabled motion-reduce:transition-none"
|
|
115
115
|
/>
|
|
116
116
|
<Combobox.Portal>
|
|
117
117
|
{#if filteredItems.length > 0 || emptyContent}
|
|
118
118
|
<Combobox.Content
|
|
119
119
|
class={cn(
|
|
120
|
-
'bg-
|
|
120
|
+
'bg-dropdown-bg border border-dropdown-border rounded-10 shadow-dropdown p-4 max-h-300 overflow-y-auto z-16',
|
|
121
121
|
contentClass
|
|
122
122
|
)}
|
|
123
123
|
style="width: calc(var(--bits-floating-anchor-width) - 4px)"
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
value={getItemValue(item)}
|
|
130
130
|
label=""
|
|
131
131
|
disabled={getItemDisabled?.(item) ?? false}
|
|
132
|
-
class="flex items-center gap-8 py-6 px-12 text-small text-dropdown-item rounded-
|
|
132
|
+
class="flex items-center gap-8 py-6 px-12 text-small text-dropdown-item rounded-6 cursor-default transition-all duration-fast outline-none hover:bg-dropdown-item-hover data-[highlighted]:bg-dropdown-item-hover data-[selected]:bg-dropdown-item-selected data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed motion-reduce:transition-none"
|
|
133
133
|
>
|
|
134
134
|
{#snippet children({selected})}
|
|
135
135
|
{#if renderItem}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{/if}
|
|
19
19
|
<div class="relative">
|
|
20
20
|
<DatePicker.Input
|
|
21
|
-
class="flex items-center gap-4 py-
|
|
21
|
+
class="flex items-center gap-4 py-5 px-12 border border-strong rounded-10 text-small text-gray-800 bg-surface transition-all duration-fast [&:has(:focus)]:border-primary [&:has(:focus)]:ring-3 [&:has(:focus)]:ring-primary"
|
|
22
22
|
>
|
|
23
23
|
{#snippet children({segments})}
|
|
24
24
|
{#each segments as { part, value: segValue }, i (`${part}-${i}`)}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
placeholder?: string
|
|
15
15
|
disabled?: boolean
|
|
16
16
|
onSelect?: (value: string) => void
|
|
17
|
+
matchTriggerWidth?: boolean
|
|
17
18
|
class?: string
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -23,10 +24,13 @@
|
|
|
23
24
|
placeholder = 'Select...',
|
|
24
25
|
disabled = false,
|
|
25
26
|
onSelect,
|
|
27
|
+
matchTriggerWidth = false,
|
|
26
28
|
class: className,
|
|
27
29
|
}: Props = $props()
|
|
28
30
|
|
|
29
31
|
let open = $state(false)
|
|
32
|
+
let triggerEl = $state<HTMLElement | null>(null)
|
|
33
|
+
let triggerWidth = $state<number | undefined>(undefined)
|
|
30
34
|
|
|
31
35
|
const selectedLabel = $derived(items.find(i => i.value === value)?.label ?? placeholder)
|
|
32
36
|
|
|
@@ -35,13 +39,20 @@
|
|
|
35
39
|
open = false
|
|
36
40
|
onSelect?.(item.value)
|
|
37
41
|
}
|
|
42
|
+
|
|
43
|
+
$effect(() => {
|
|
44
|
+
if (matchTriggerWidth && open && triggerEl) {
|
|
45
|
+
triggerWidth = triggerEl.offsetWidth
|
|
46
|
+
}
|
|
47
|
+
})
|
|
38
48
|
</script>
|
|
39
49
|
|
|
40
50
|
<DropdownMenu.Root bind:open>
|
|
41
51
|
<DropdownMenu.Trigger
|
|
52
|
+
bind:ref={triggerEl}
|
|
42
53
|
{disabled}
|
|
43
54
|
class={cn(
|
|
44
|
-
'
|
|
55
|
+
'flex items-center justify-between gap-4 py-5 pl-12 pr-8 border rounded-10 bg-input-bg cursor-default text-small text-input-text box-border appearance-none font-inherit outline-none focus:border-accent focus:ring-3 focus:ring-primary disabled:opacity-50 disabled:cursor-not-allowed',
|
|
45
56
|
open ? 'border-input-border-hover' : 'border-input-border hover:border-input-border-hover',
|
|
46
57
|
value === undefined && 'text-input-placeholder',
|
|
47
58
|
className
|
|
@@ -52,25 +63,36 @@
|
|
|
52
63
|
>
|
|
53
64
|
<IIIcon icon="caret-down" class="w-14 h-14 text-secondary shrink-0" />
|
|
54
65
|
</DropdownMenu.Trigger>
|
|
55
|
-
<DropdownMenu.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
<DropdownMenu.Portal>
|
|
67
|
+
<DropdownMenu.Content
|
|
68
|
+
class="min-w-100 bg-dropdown-bg border border-dropdown-border rounded-10 shadow-dropdown p-4 z-16 outline-none"
|
|
69
|
+
sideOffset={2}
|
|
70
|
+
side="bottom"
|
|
71
|
+
align="start"
|
|
72
|
+
>
|
|
73
|
+
{#snippet child({ props, wrapperProps })}
|
|
74
|
+
<div
|
|
75
|
+
{...wrapperProps}
|
|
76
|
+
style:min-width={matchTriggerWidth && triggerWidth ? `${triggerWidth}px` : undefined}
|
|
77
|
+
>
|
|
78
|
+
<div {...props}>
|
|
79
|
+
{#each items as item (item.value)}
|
|
80
|
+
<DropdownMenu.Item
|
|
81
|
+
class={cn(
|
|
82
|
+
'flex items-center justify-between gap-12 px-12 py-6 rounded-6 text-small text-dropdown-item cursor-default outline-none data-[highlighted]:bg-dropdown-item-hover',
|
|
83
|
+
value === item.value && 'text-dropdown-item-selected'
|
|
84
|
+
)}
|
|
85
|
+
onSelect={() => handleSelect(item)}
|
|
86
|
+
>
|
|
87
|
+
<span>{item.label}</span>
|
|
88
|
+
{#if value === item.value}
|
|
89
|
+
<IIIcon icon="check" class="w-14 h-14 text-accent shrink-0" />
|
|
90
|
+
{/if}
|
|
91
|
+
</DropdownMenu.Item>
|
|
92
|
+
{/each}
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
{/snippet}
|
|
96
|
+
</DropdownMenu.Content>
|
|
97
|
+
</DropdownMenu.Portal>
|
|
76
98
|
</DropdownMenu.Root>
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
onSelect={() => handleSelect(item.value)}
|
|
63
63
|
>
|
|
64
64
|
{#if item.icon}
|
|
65
|
-
<div class="w-
|
|
65
|
+
<div class="w-16 h-16 flex items-center justify-center shrink-0 [&_svg]:w-16 [&_svg]:h-16">
|
|
66
66
|
{@render item.icon()}
|
|
67
67
|
</div>
|
|
68
68
|
{/if}
|
|
@@ -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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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-5 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-5 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 @@
|
|
|
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';
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
{disabled}
|
|
66
66
|
{rows}
|
|
67
67
|
class={cn(
|
|
68
|
-
'py-
|
|
68
|
+
'py-5 px-12 text-small font-[family-name:var(--font-family)] text-body bg-surface border border-strong rounded-10 transition-all duration-fast outline-none w-full box-border resize-none overflow-hidden min-h-16 placeholder:text-tertiary focus:border-primary focus:ring-3 focus:ring-primary disabled:bg-gray-100 disabled:text-secondary disabled:cursor-not-allowed motion-reduce:transition-none',
|
|
69
69
|
showError && 'border-error focus:border-error focus:ring-error'
|
|
70
70
|
)}
|
|
71
71
|
oninput={handleInput}
|
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';
|
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';
|
package/dist/style/colors.css
CHANGED
|
@@ -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;
|
|
@@ -54,6 +59,7 @@
|
|
|
54
59
|
--ii-text-inverse: white;
|
|
55
60
|
|
|
56
61
|
/* Borders */
|
|
62
|
+
--ii-border-subtle: #ebebeb;
|
|
57
63
|
--ii-border: #e5e7eb;
|
|
58
64
|
--ii-border-strong: #d1d5db;
|
|
59
65
|
|
|
@@ -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
|
|
@@ -183,7 +188,7 @@ export const borderColor = {
|
|
|
183
188
|
// Border hierarchy
|
|
184
189
|
primary: 'var(--ii-border)',
|
|
185
190
|
strong: 'var(--ii-border-strong)',
|
|
186
|
-
subtle: 'var(--ii-
|
|
191
|
+
subtle: 'var(--ii-border-subtle)',
|
|
187
192
|
// Input
|
|
188
193
|
'input-border': 'var(--color-input-border)',
|
|
189
194
|
'input-border-hover': 'var(--color-input-border-hover)',
|
|
@@ -51,27 +51,27 @@ export declare const fontSize: {
|
|
|
51
51
|
readonly lineHeight: "2.0rem";
|
|
52
52
|
readonly fontWeight: "500";
|
|
53
53
|
}];
|
|
54
|
-
readonly default: readonly ["1.
|
|
54
|
+
readonly default: readonly ["1.3rem", {
|
|
55
55
|
readonly lineHeight: "1.6rem";
|
|
56
56
|
readonly fontWeight: "400";
|
|
57
57
|
}];
|
|
58
|
-
readonly emphasis: readonly ["1.
|
|
58
|
+
readonly emphasis: readonly ["1.3rem", {
|
|
59
59
|
readonly lineHeight: "1.6rem";
|
|
60
60
|
readonly fontWeight: "500";
|
|
61
61
|
}];
|
|
62
|
-
readonly strong: readonly ["1.
|
|
62
|
+
readonly strong: readonly ["1.3rem", {
|
|
63
63
|
readonly lineHeight: "1.6rem";
|
|
64
64
|
readonly fontWeight: "600";
|
|
65
65
|
}];
|
|
66
|
-
readonly small: readonly ["1.
|
|
66
|
+
readonly small: readonly ["1.2rem", {
|
|
67
67
|
readonly lineHeight: "1.6rem";
|
|
68
68
|
readonly fontWeight: "400";
|
|
69
69
|
}];
|
|
70
|
-
readonly 'small-emphasis': readonly ["1.
|
|
70
|
+
readonly 'small-emphasis': readonly ["1.2rem", {
|
|
71
71
|
readonly lineHeight: "1.6rem";
|
|
72
72
|
readonly fontWeight: "500";
|
|
73
73
|
}];
|
|
74
|
-
readonly 'small-strong': readonly ["1.
|
|
74
|
+
readonly 'small-strong': readonly ["1.2rem", {
|
|
75
75
|
readonly lineHeight: "1.6rem";
|
|
76
76
|
readonly fontWeight: "600";
|
|
77
77
|
}];
|
|
@@ -19,14 +19,14 @@ export const fontSize = {
|
|
|
19
19
|
// Body — large (16px)
|
|
20
20
|
large: ['1.6rem', { lineHeight: '2.0rem', fontWeight: '400' }],
|
|
21
21
|
'large-emphasis': ['1.6rem', { lineHeight: '2.0rem', fontWeight: '500' }],
|
|
22
|
-
// Body — default (
|
|
23
|
-
default: ['1.
|
|
24
|
-
emphasis: ['1.
|
|
25
|
-
strong: ['1.
|
|
26
|
-
// Body — small (
|
|
27
|
-
small: ['1.
|
|
28
|
-
'small-emphasis': ['1.
|
|
29
|
-
'small-strong': ['1.
|
|
22
|
+
// Body — default (13px)
|
|
23
|
+
default: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '400' }],
|
|
24
|
+
emphasis: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '500' }],
|
|
25
|
+
strong: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '600' }],
|
|
26
|
+
// Body — small (12px)
|
|
27
|
+
small: ['1.2rem', { lineHeight: '1.6rem', fontWeight: '400' }],
|
|
28
|
+
'small-emphasis': ['1.2rem', { lineHeight: '1.6rem', fontWeight: '500' }],
|
|
29
|
+
'small-strong': ['1.2rem', { lineHeight: '1.6rem', fontWeight: '600' }],
|
|
30
30
|
// Body — tiny (11px)
|
|
31
31
|
tiny: ['1.1rem', { lineHeight: '1.2rem', fontWeight: '400' }],
|
|
32
32
|
'tiny-emphasis': ['1.1rem', { lineHeight: '1.2rem', fontWeight: '500' }],
|