@lyeve-labs/ui-kit 0.18.0 → 0.20.0
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 +11 -4
- package/dist/components/AccordionItem.svelte +1 -1
- package/dist/components/AppShell.svelte +3 -3
- package/dist/components/Autocomplete.svelte +4 -4
- package/dist/components/AvatarGroup.svelte +2 -2
- package/dist/components/Breadcrumb.svelte +1 -1
- package/dist/components/Button.svelte +34 -9
- package/dist/components/ButtonGroup.svelte +3 -3
- package/dist/components/Card.svelte +1 -1
- package/dist/components/Checkbox.svelte +1 -1
- package/dist/components/CheckboxGroup.svelte +1 -1
- package/dist/components/Collapsible.svelte +3 -3
- package/dist/components/CopyButton.svelte +1 -1
- package/dist/components/DatePicker.svelte +2 -2
- package/dist/components/DateTimePicker.svelte +1 -1
- package/dist/components/Drawer.svelte +1 -1
- package/dist/components/Dropdown.svelte +1 -1
- package/dist/components/Field.svelte +1 -1
- package/dist/components/Input.svelte +1 -1
- package/dist/components/Label.svelte +1 -1
- package/dist/components/MultiSelect.svelte +4 -4
- package/dist/components/NumberInput.svelte +3 -3
- package/dist/components/Pagination.svelte +194 -65
- package/dist/components/Pagination.svelte.d.ts +52 -2
- package/dist/components/PasswordInput.svelte +4 -4
- package/dist/components/Radio.svelte +1 -1
- package/dist/components/RadioGroup.svelte +1 -1
- package/dist/components/SearchInput.svelte +4 -4
- package/dist/components/SegmentedControl.svelte +3 -1
- package/dist/components/Select.svelte +6 -6
- package/dist/components/SidebarNav.svelte +20 -5
- package/dist/components/Table.svelte +114 -1
- package/dist/components/Table.svelte.d.ts +37 -0
- package/dist/components/Tabs.svelte +1 -1
- package/dist/components/Tag.svelte +1 -1
- package/dist/components/Textarea.svelte +1 -1
- package/dist/components/ThemeToggle.svelte +1 -1
- package/dist/components/TimePicker.svelte +2 -2
- package/dist/components/Toaster.svelte +2 -2
- package/dist/components/Toggle.svelte +10 -4
- package/dist/components/TreeView.svelte +4 -4
- package/dist/components/dialog/Dialog.svelte +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/internal/href.d.ts +13 -0
- package/dist/internal/href.js +27 -0
- package/dist/internal/number.d.ts +26 -0
- package/dist/internal/number.js +35 -0
- package/dist/internal/panel.js +1 -1
- package/dist/styles/theme.css +53 -0
- package/package.json +3 -4
- package/src/lib/styles/theme.css +53 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ A clean, accessible Svelte 5 component library. The design system behind [LyEve]
|
|
|
7
7
|
[](https://tailwindcss.com)
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
pnpm add @lyeve-labs/ui-kit
|
|
10
|
+
pnpm add @lyeve-labs/ui-kit @lucide/svelte
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```svelte
|
|
@@ -69,16 +69,23 @@ ThemeToggle, Toaster (plus the `toast` service)
|
|
|
69
69
|
|
|
70
70
|
- **Svelte 5.0** or newer
|
|
71
71
|
- **Tailwind CSS v4** with the `@tailwindcss/vite` plugin
|
|
72
|
+
- **`@lucide/svelte`** 0.511 or newer, below 2.0
|
|
72
73
|
- **Node 20** or newer
|
|
73
74
|
|
|
74
75
|
## Install
|
|
75
76
|
|
|
76
77
|
```bash
|
|
77
|
-
pnpm add @lyeve-labs/ui-kit
|
|
78
|
-
# or npm install @lyeve-labs/ui-kit
|
|
79
|
-
# or yarn add @lyeve-labs/ui-kit
|
|
78
|
+
pnpm add @lyeve-labs/ui-kit @lucide/svelte
|
|
79
|
+
# or npm install @lyeve-labs/ui-kit @lucide/svelte
|
|
80
|
+
# or yarn add @lyeve-labs/ui-kit @lucide/svelte
|
|
80
81
|
```
|
|
81
82
|
|
|
83
|
+
The icon set is a peer dependency, so it installs once and the application
|
|
84
|
+
picks the version. Most applications already depend on it directly, and while
|
|
85
|
+
the kit owned a copy of its own they resolved two: the same icons shipped twice
|
|
86
|
+
in the bundle and an upgrade on the application's side moved only one of them.
|
|
87
|
+
A missing peer is resolved for you by pnpm and by npm, and not by yarn.
|
|
88
|
+
|
|
82
89
|
If you don't have Tailwind v4 yet:
|
|
83
90
|
|
|
84
91
|
```bash
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
onclick={() => ctx?.toggle(id)}
|
|
34
34
|
aria-expanded={open}
|
|
35
35
|
aria-controls={panelId}
|
|
36
|
-
class="flex w-full items-center justify-between px-5 py-4 text-
|
|
36
|
+
class="flex w-full items-center justify-between px-5 py-4 text-start text-sm font-medium
|
|
37
37
|
text-fg transition-colors duration-150 hover:bg-surface-2/50
|
|
38
38
|
outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand
|
|
39
39
|
{open ? 'bg-surface-2/40' : ''}"
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<a
|
|
117
117
|
href="#content"
|
|
118
118
|
data-print="hide"
|
|
119
|
-
class="sr-only focus:not-sr-only focus:fixed focus:
|
|
119
|
+
class="sr-only focus:not-sr-only focus:fixed focus:start-3 focus:top-3 focus:z-skip-link focus:rounded-lg focus:bg-surface focus:px-3 focus:py-2 focus:text-sm focus:text-fg focus:outline-none focus:ring-2 focus:ring-brand"
|
|
120
120
|
>
|
|
121
121
|
Skip to content
|
|
122
122
|
</a>
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
still lines up with the page content below. -->
|
|
172
172
|
<button
|
|
173
173
|
type="button"
|
|
174
|
-
class="-ms-2 flex h-11 w-11 shrink-0 items-center justify-center rounded-lg text-muted outline-none transition-colors duration-150 hover:bg-surface-2 hover:text-fg focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand"
|
|
174
|
+
class="-ms-2 flex h-11 w-11 shrink-0 items-center justify-center rounded-lg text-muted outline-none transition-colors duration-150 hover:bg-surface-2 hover:text-fg active:bg-line active:text-fg focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand"
|
|
175
175
|
aria-label={navOpen ? 'Close navigation' : 'Open navigation'}
|
|
176
176
|
aria-expanded={navOpen}
|
|
177
177
|
onclick={() => (navOpen = !navOpen)}
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
<button
|
|
185
185
|
type="button"
|
|
186
186
|
data-testid="app-sidebar-toggle"
|
|
187
|
-
class="-ms-2 flex h-11 w-11 shrink-0 items-center justify-center rounded-lg text-muted outline-none transition-colors duration-150 hover:bg-surface-2 hover:text-fg focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand"
|
|
187
|
+
class="-ms-2 flex h-11 w-11 shrink-0 items-center justify-center rounded-lg text-muted outline-none transition-colors duration-150 hover:bg-surface-2 hover:text-fg active:bg-line active:text-fg focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand"
|
|
188
188
|
aria-label={collapsed ? 'Show sidebar' : 'Hide sidebar'}
|
|
189
189
|
aria-expanded={!collapsed}
|
|
190
190
|
onclick={() => (collapsed = !collapsed)}
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
<div class="{FIELD_WRAP} {cls}">
|
|
170
170
|
{#if label}
|
|
171
171
|
<label for={fieldId} class={FIELD_LABEL}>
|
|
172
|
-
{label}{#if required}<span class="
|
|
172
|
+
{label}{#if required}<span class="ms-0.5 text-danger" aria-hidden="true">*</span>{/if}
|
|
173
173
|
</label>
|
|
174
174
|
{/if}
|
|
175
175
|
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
aria-invalid={error ? 'true' : undefined}
|
|
194
194
|
aria-describedby={describedBy(fieldId, error, hint)}
|
|
195
195
|
{...box.triggerAttrs}
|
|
196
|
-
class="{CONTROL_BASE} {controlBorder(!!error)} {allowClear && value ? '
|
|
196
|
+
class="{CONTROL_BASE} {controlBorder(!!error)} {allowClear && value ? 'pe-8' : 'pe-3'}"
|
|
197
197
|
/>
|
|
198
198
|
|
|
199
199
|
{#if allowClear && value && !disabled}
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
type="button"
|
|
211
211
|
aria-label="Clear"
|
|
212
212
|
onclick={clear}
|
|
213
|
-
class="absolute
|
|
213
|
+
class="absolute end-2.5 top-1/2 -mx-1.5 -translate-y-1/2 p-1.5 text-faint transition-colors duration-150 hover:text-fg"
|
|
214
214
|
>
|
|
215
215
|
<svg
|
|
216
216
|
width="12"
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
height="10"
|
|
265
265
|
viewBox="0 0 12 10"
|
|
266
266
|
fill="none"
|
|
267
|
-
class="
|
|
267
|
+
class="ms-auto shrink-0"
|
|
268
268
|
aria-hidden="true"
|
|
269
269
|
>
|
|
270
270
|
<path
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
|
|
31
31
|
<div class="flex items-center {cls}">
|
|
32
32
|
{#each visible as user}
|
|
33
|
-
<span class="-
|
|
33
|
+
<span class="-ms-1.5 inline-block rounded-full ring-2 ring-ink first:ms-0">
|
|
34
34
|
<Avatar name={user.name} src={user.src} {size} />
|
|
35
35
|
</span>
|
|
36
36
|
{/each}
|
|
37
37
|
|
|
38
38
|
{#if overflow > 0}
|
|
39
39
|
<span
|
|
40
|
-
class="-
|
|
40
|
+
class="-ms-1.5 inline-flex shrink-0 items-center justify-center rounded-full
|
|
41
41
|
bg-surface-2 font-semibold text-faint ring-2 ring-ink
|
|
42
42
|
{overflowSizes[size]}">+{overflow}</span
|
|
43
43
|
>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
|
|
4
4
|
import Spinner from './Spinner.svelte';
|
|
5
|
+
import { safeHref } from '../internal/href.js';
|
|
5
6
|
|
|
6
7
|
type Variant = 'primary' | 'secondary' | 'danger' | 'ghost' | 'outline' | 'violet';
|
|
7
8
|
type Size = 'sm' | 'md' | 'lg';
|
|
@@ -43,14 +44,36 @@
|
|
|
43
44
|
...rest
|
|
44
45
|
}: Props = $props();
|
|
45
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Colour per variant, in three states: at rest, under a pointer, and held.
|
|
49
|
+
*
|
|
50
|
+
* The pressed step is the one a touch screen depends on. `hover:` compiles
|
|
51
|
+
* inside `@media (hover: hover)`, which is false on a finger, so a tap ran
|
|
52
|
+
* rest to rest with the action already fired and the control never
|
|
53
|
+
* acknowledged the press. `active:` matches under a finger as well as under a
|
|
54
|
+
* mouse, and Tailwind emits it after `hover:` at equal specificity, so the
|
|
55
|
+
* held colour wins on a device that has both.
|
|
56
|
+
*
|
|
57
|
+
* primary and violet had a pressed state already and neither one showed:
|
|
58
|
+
* `active:bg-brand` on a `bg-brand` button and `active:brightness-100` on an
|
|
59
|
+
* unfiltered one are both the resting appearance spelled twice.
|
|
60
|
+
*
|
|
61
|
+
* Every pressed step moves the same way in both palettes. brand-deep sits
|
|
62
|
+
* below brand-light on the dark ramp and below it again on the light one, and
|
|
63
|
+
* the filtered variants darken rather than brighten, so a press does not read
|
|
64
|
+
* as one gesture in one theme and its opposite in the other.
|
|
65
|
+
*/
|
|
46
66
|
const variants: Record<Variant, string> = {
|
|
47
|
-
primary:
|
|
67
|
+
primary:
|
|
68
|
+
'bg-brand text-ink hover:bg-brand-light active:bg-brand-deep shadow-sm shadow-brand/20',
|
|
48
69
|
violet:
|
|
49
|
-
'bg-violet text-ink hover:brightness-110 active:brightness-
|
|
50
|
-
secondary:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
70
|
+
'bg-violet text-ink hover:brightness-110 active:brightness-90 shadow-sm shadow-violet/20',
|
|
71
|
+
secondary:
|
|
72
|
+
'bg-surface-2 text-fg border border-line-strong hover:bg-line active:bg-line-strong/30',
|
|
73
|
+
danger: 'bg-danger text-ink hover:brightness-110 active:brightness-90',
|
|
74
|
+
ghost: 'text-muted hover:bg-surface-2 hover:text-fg active:bg-line active:text-fg',
|
|
75
|
+
outline:
|
|
76
|
+
'border border-line-strong text-fg hover:border-brand hover:text-brand active:bg-brand/10',
|
|
54
77
|
};
|
|
55
78
|
|
|
56
79
|
const sizes: Record<Size, string> = {
|
|
@@ -66,8 +89,10 @@
|
|
|
66
89
|
`${full ? 'w-full' : ''} ${variants[variant]} ${sizes[size]} ${klass}`,
|
|
67
90
|
);
|
|
68
91
|
|
|
69
|
-
//
|
|
70
|
-
|
|
92
|
+
// Only standard schemes and relative URLs reach the DOM. The rule itself
|
|
93
|
+
// lives in internal/href.ts, because Pagination applies the same one to the
|
|
94
|
+
// hrefs its caller builds and two copies of it would drift.
|
|
95
|
+
let resolvedHref = $derived(safeHref(href));
|
|
71
96
|
|
|
72
97
|
/**
|
|
73
98
|
* An anchor has no `disabled`. The prop was accepted and then dropped on this
|
|
@@ -81,7 +106,7 @@
|
|
|
81
106
|
|
|
82
107
|
{#if href}
|
|
83
108
|
<a
|
|
84
|
-
href={inert ? undefined :
|
|
109
|
+
href={inert ? undefined : resolvedHref}
|
|
85
110
|
class="{cls} {inert ? 'pointer-events-none opacity-50' : ''}"
|
|
86
111
|
aria-disabled={inert ? 'true' : undefined}
|
|
87
112
|
tabindex={inert ? -1 : undefined}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
{#if orientation === 'horizontal'}
|
|
14
14
|
<div
|
|
15
15
|
class="inline-flex
|
|
16
|
-
[&>*:not(:first-child)]:rounded-
|
|
17
|
-
[&>*:not(:last-child)]:rounded-
|
|
18
|
-
[&>*:not(:first-child)]:-
|
|
16
|
+
[&>*:not(:first-child)]:rounded-s-none
|
|
17
|
+
[&>*:not(:last-child)]:rounded-e-none
|
|
18
|
+
[&>*:not(:first-child)]:-ms-px
|
|
19
19
|
{cls}"
|
|
20
20
|
>
|
|
21
21
|
{@render children()}
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
{:else}
|
|
110
110
|
<h3 class={sectionHeading(3)}>{heading}</h3>
|
|
111
111
|
{/if}
|
|
112
|
-
{#if meta}<span class="
|
|
112
|
+
{#if meta}<span class="ms-auto shrink-0 text-xs text-faint">{meta}</span>{/if}
|
|
113
113
|
</div>
|
|
114
114
|
{#if description}<p class="text-sm text-muted mt-0.5">{description}</p>{/if}
|
|
115
115
|
{:else}
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
own text it became part of the name, and the reader heard the
|
|
156
156
|
whole paragraph before it reached the checked state. -->
|
|
157
157
|
<span id="{fieldId}-label" class="{choiceLabel(size)} {labelHidden ? 'sr-only' : ''}">
|
|
158
|
-
{label}{#if required}<span class="
|
|
158
|
+
{label}{#if required}<span class="ms-0.5 text-danger" aria-hidden="true">*</span>{/if}
|
|
159
159
|
</span>
|
|
160
160
|
{/if}
|
|
161
161
|
</span>
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
ahead of them saying what the set is for.
|
|
125
125
|
-->
|
|
126
126
|
<legend class="{FIELD_LABEL} {labelHidden ? 'sr-only' : ''}">
|
|
127
|
-
{label}{#if required}<span class="text-danger
|
|
127
|
+
{label}{#if required}<span class="text-danger ms-0.5" aria-hidden="true">*</span><span
|
|
128
128
|
class="sr-only"
|
|
129
129
|
>
|
|
130
130
|
(required)</span
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
aria-expanded={open}
|
|
71
71
|
aria-controls={panelId}
|
|
72
72
|
onclick={toggle}
|
|
73
|
-
class="flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-
|
|
73
|
+
class="flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-start text-sm font-medium
|
|
74
74
|
text-fg transition-colors duration-150 outline-none focus-visible:ring-2
|
|
75
75
|
focus-visible:ring-inset focus-visible:ring-brand disabled:cursor-not-allowed
|
|
76
76
|
disabled:opacity-50 {disabled ? '' : 'hover:bg-surface-2'}"
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
stroke-linejoin="round"
|
|
89
89
|
class="shrink-0 text-faint transition-transform duration-200 ease-out {open
|
|
90
90
|
? ''
|
|
91
|
-
: '-rotate-90'}"
|
|
91
|
+
: '-rotate-90 rtl:rotate-90'}"
|
|
92
92
|
aria-hidden="true"
|
|
93
93
|
>
|
|
94
94
|
<path d="M6 9l6 6 6-6" />
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<span class="truncate">{label}</span>
|
|
103
103
|
|
|
104
104
|
{#if badge !== undefined}
|
|
105
|
-
<span class="
|
|
105
|
+
<span class="ms-auto shrink-0 rounded-full bg-surface-2 px-2 py-0.5 text-xs text-muted">
|
|
106
106
|
{badge}
|
|
107
107
|
</span>
|
|
108
108
|
{/if}
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
type="button"
|
|
106
106
|
aria-label={label}
|
|
107
107
|
onclick={copy}
|
|
108
|
-
class="inline-flex items-center justify-center rounded-md p-1 outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand {status ===
|
|
108
|
+
class="inline-flex items-center justify-center rounded-md p-1 outline-none transition-colors duration-150 active:bg-surface-2 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand {status ===
|
|
109
109
|
'copied'
|
|
110
110
|
? 'text-success'
|
|
111
111
|
: 'text-faint hover:text-fg'}"
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
<div class="{FIELD_WRAP} {cls}" bind:this={containerEl}>
|
|
177
177
|
{#if label}
|
|
178
178
|
<label for={fieldId} class={FIELD_LABEL}>
|
|
179
|
-
{label}{#if required}<span class="text-danger
|
|
179
|
+
{label}{#if required}<span class="text-danger ms-0.5" aria-hidden="true">*</span>{/if}
|
|
180
180
|
</label>
|
|
181
181
|
{/if}
|
|
182
182
|
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
aria-invalid={error ? 'true' : undefined}
|
|
207
207
|
aria-required={required ? 'true' : undefined}
|
|
208
208
|
aria-describedby={describedBy(fieldId, error, hint)}
|
|
209
|
-
class="{CONTROL_BASE} {controlBorder(!!error)} flex items-center justify-between text-
|
|
209
|
+
class="{CONTROL_BASE} {controlBorder(!!error)} flex items-center justify-between text-start"
|
|
210
210
|
>
|
|
211
211
|
<span class={display ? 'text-fg' : 'text-faint'}>{display || placeholder}</span>
|
|
212
212
|
<span class="text-faint shrink-0" aria-hidden="true">
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
names it and clicking that label opens the calendar. The group below
|
|
282
282
|
takes its name from this same element. -->
|
|
283
283
|
<label id="{fieldId}-label" for="{fieldId}-date" class={FIELD_LABEL}>
|
|
284
|
-
{label}{#if required}<span class="
|
|
284
|
+
{label}{#if required}<span class="ms-0.5 text-danger" aria-hidden="true">*</span>{/if}
|
|
285
285
|
</label>
|
|
286
286
|
{/if}
|
|
287
287
|
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<div
|
|
69
69
|
use:overlay
|
|
70
70
|
class="relative flex h-full max-w-full flex-col {widths[size]} bg-surface shadow-2xl
|
|
71
|
-
{side === 'right' ? 'border-
|
|
71
|
+
{side === 'right' ? 'border-s' : 'border-e'} border-line
|
|
72
72
|
{side === 'right'
|
|
73
73
|
? 'animate-[drawer-in-right_var(--duration-drawer-in)_ease-out]'
|
|
74
74
|
: 'animate-[drawer-in-left_var(--duration-drawer-in)_ease-out]'}"
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
role="menu"
|
|
248
248
|
class="absolute z-dropdown mt-1 py-1 min-w-36 rounded-xl border border-line
|
|
249
249
|
bg-surface shadow-2xl
|
|
250
|
-
{align === 'right' ? '
|
|
250
|
+
{align === 'right' ? 'end-0' : 'start-0'}"
|
|
251
251
|
>
|
|
252
252
|
{#each items as item, index}
|
|
253
253
|
<button
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
the controls with nothing ahead of them saying what each one is.
|
|
91
91
|
-->
|
|
92
92
|
<label for={fieldId} class="{FIELD_LABEL} {labelHidden ? 'sr-only' : ''}">
|
|
93
|
-
{label}{#if required}<span class="
|
|
93
|
+
{label}{#if required}<span class="ms-0.5 text-danger" aria-hidden="true">*</span>{/if}
|
|
94
94
|
</label>
|
|
95
95
|
{/if}
|
|
96
96
|
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<div class="{FIELD_WRAP} {klass}">
|
|
55
55
|
{#if label}
|
|
56
56
|
<label for={fieldId} class={FIELD_LABEL}>
|
|
57
|
-
{label}{#if required}<span class="text-danger
|
|
57
|
+
{label}{#if required}<span class="text-danger ms-0.5" aria-hidden="true">*</span>{/if}
|
|
58
58
|
</label>
|
|
59
59
|
{/if}
|
|
60
60
|
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
<span class="text-danger font-bold leading-none" aria-hidden="true">*</span>
|
|
32
32
|
{/if}
|
|
33
33
|
{#if hint}
|
|
34
|
-
<span class="text-faint normal-case font-normal
|
|
34
|
+
<span class="text-faint normal-case font-normal ms-0.5">({hint})</span>
|
|
35
35
|
{/if}
|
|
36
36
|
</label>
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
<div class="{FIELD_WRAP} {cls}">
|
|
155
155
|
{#if label}
|
|
156
156
|
<label id="{fieldId}-label" for={fieldId} class={FIELD_LABEL}>
|
|
157
|
-
{label}{#if required}<span class="
|
|
157
|
+
{label}{#if required}<span class="ms-0.5 text-danger" aria-hidden="true">*</span>{/if}
|
|
158
158
|
</label>
|
|
159
159
|
{/if}
|
|
160
160
|
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
onkeydown={onTriggerKeydown}
|
|
182
182
|
{...box.triggerAttrs}
|
|
183
183
|
class="flex min-h-control w-full cursor-pointer flex-wrap items-center gap-1.5 rounded-lg
|
|
184
|
-
border bg-surface-2 px-2.5 py-1.5 text-
|
|
184
|
+
border bg-surface-2 px-2.5 py-1.5 text-start text-sm transition-colors duration-150
|
|
185
185
|
outline-none {disabled ? 'cursor-not-allowed opacity-50' : ''} {controlBorder(!!error)}"
|
|
186
186
|
>
|
|
187
187
|
{#if selected.length === 0}
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
</span>
|
|
227
227
|
{/each}
|
|
228
228
|
{/if}
|
|
229
|
-
<span class="
|
|
229
|
+
<span class="ms-auto shrink-0 text-faint" aria-hidden="true">
|
|
230
230
|
<svg
|
|
231
231
|
width="12"
|
|
232
232
|
height="12"
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
</svg>
|
|
316
316
|
{/if}
|
|
317
317
|
</span>
|
|
318
|
-
<span class="min-w-0 truncate text-
|
|
318
|
+
<span class="min-w-0 truncate text-start">{option.label}</span>
|
|
319
319
|
</button>
|
|
320
320
|
{:else}
|
|
321
321
|
<p class={PANEL_EMPTY}>No matches</p>
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<div class="{FIELD_WRAP} {cls}">
|
|
80
80
|
{#if label}
|
|
81
81
|
<label for={fieldId} class={FIELD_LABEL}>
|
|
82
|
-
{label}{#if required}<span class="text-danger
|
|
82
|
+
{label}{#if required}<span class="text-danger ms-0.5" aria-hidden="true">*</span>{/if}
|
|
83
83
|
</label>
|
|
84
84
|
{/if}
|
|
85
85
|
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
onclick={dec}
|
|
90
90
|
disabled={!canDec}
|
|
91
91
|
aria-label="Decrease"
|
|
92
|
-
class="{step_} rounded-
|
|
92
|
+
class="{step_} rounded-s-lg border border-e-0"
|
|
93
93
|
>
|
|
94
94
|
<svg
|
|
95
95
|
width="14"
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
onclick={inc}
|
|
133
133
|
disabled={!canInc}
|
|
134
134
|
aria-label="Increase"
|
|
135
|
-
class="{step_} rounded-
|
|
135
|
+
class="{step_} rounded-e-lg border border-s-0"
|
|
136
136
|
>
|
|
137
137
|
<svg
|
|
138
138
|
width="14"
|