compote-ui 0.68.2 → 0.70.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/dist/components/badge/badge.variants.d.ts +29 -29
- package/dist/components/button/button.variants.d.ts +35 -35
- package/dist/components/combobox/combobox.svelte +1 -1
- package/dist/components/data-table-v9/column-helper.js +8 -1
- package/dist/components/data-table-v9/data-table.svelte +1 -1
- package/dist/components/data-table-v9/toolbar/data-table-column-filter.svelte +2 -2
- package/dist/components/data-table-v9/types.d.ts +1 -1
- package/dist/components/data-table-v9/virtual/data-table-virtual-rows.svelte +1 -1
- package/dist/components/date-field/date-field.svelte +2 -2
- package/dist/components/date-input/date-input.svelte +1 -1
- package/dist/components/date-picker/date-picker-calendar.svelte +15 -15
- package/dist/components/date-picker/date-picker.svelte +4 -4
- package/dist/components/date-range-field/date-range-field.svelte +2 -2
- package/dist/components/file-upload/file-upload.svelte +1 -1
- package/dist/components/listbox/listbox-content.svelte +1 -1
- package/dist/components/nav-rail/nav-rail.svelte +1 -1
- package/dist/components/phone-input/phone-input.svelte +1 -1
- package/dist/components/progress/progress-circular.svelte +1 -1
- package/dist/components/progress/progress-linear.svelte +1 -1
- package/dist/components/table/index.d.ts +8 -0
- package/dist/components/table/index.js +8 -0
- package/dist/components/table/table-body.svelte +10 -0
- package/dist/components/table/table-body.svelte.d.ts +4 -0
- package/dist/components/table/table-caption.svelte +11 -0
- package/dist/components/table/table-caption.svelte.d.ts +4 -0
- package/dist/components/table/table-cell.svelte +16 -0
- package/dist/components/table/table-cell.svelte.d.ts +4 -0
- package/dist/components/table/table-footer.svelte +24 -0
- package/dist/components/table/table-footer.svelte.d.ts +7 -0
- package/dist/components/table/table-head.svelte +17 -0
- package/dist/components/table/table-head.svelte.d.ts +4 -0
- package/dist/components/table/table-header.svelte +16 -0
- package/dist/components/table/table-header.svelte.d.ts +7 -0
- package/dist/components/table/table-row.svelte +17 -0
- package/dist/components/table/table-row.svelte.d.ts +7 -0
- package/dist/components/table/table.svelte +15 -0
- package/dist/components/table/table.svelte.d.ts +4 -0
- package/dist/components/tags-input/tags-input.svelte +2 -2
- package/dist/components/toggle/toggle.variants.d.ts +20 -20
- package/dist/icons/PhPlus.svelte +18 -0
- package/dist/icons/PhPlus.svelte.d.ts +5 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +8 -8
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { type VariantProps } from 'tailwind-variants';
|
|
2
2
|
export declare const badge: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
variant: {
|
|
4
|
-
solid:
|
|
5
|
-
subtle:
|
|
6
|
-
outline:
|
|
4
|
+
solid: "";
|
|
5
|
+
subtle: "";
|
|
6
|
+
outline: "border bg-transparent";
|
|
7
7
|
};
|
|
8
8
|
color: {
|
|
9
|
-
neutral:
|
|
10
|
-
primary:
|
|
11
|
-
danger:
|
|
12
|
-
warning:
|
|
13
|
-
success:
|
|
14
|
-
info:
|
|
9
|
+
neutral: "";
|
|
10
|
+
primary: "";
|
|
11
|
+
danger: "";
|
|
12
|
+
warning: "";
|
|
13
|
+
success: "";
|
|
14
|
+
info: "";
|
|
15
15
|
};
|
|
16
16
|
}, undefined, "inline-flex w-fit items-center gap-1 rounded px-2 py-0.5 text-xs font-medium [&_svg]:size-3 [&_svg]:shrink-0", {
|
|
17
17
|
variant: {
|
|
18
|
-
solid:
|
|
19
|
-
subtle:
|
|
20
|
-
outline:
|
|
18
|
+
solid: "";
|
|
19
|
+
subtle: "";
|
|
20
|
+
outline: "border bg-transparent";
|
|
21
21
|
};
|
|
22
22
|
color: {
|
|
23
|
-
neutral:
|
|
24
|
-
primary:
|
|
25
|
-
danger:
|
|
26
|
-
warning:
|
|
27
|
-
success:
|
|
28
|
-
info:
|
|
23
|
+
neutral: "";
|
|
24
|
+
primary: "";
|
|
25
|
+
danger: "";
|
|
26
|
+
warning: "";
|
|
27
|
+
success: "";
|
|
28
|
+
info: "";
|
|
29
29
|
};
|
|
30
|
-
}, undefined, import("tailwind-variants").
|
|
30
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
31
31
|
variant: {
|
|
32
|
-
solid:
|
|
33
|
-
subtle:
|
|
34
|
-
outline:
|
|
32
|
+
solid: "";
|
|
33
|
+
subtle: "";
|
|
34
|
+
outline: "border bg-transparent";
|
|
35
35
|
};
|
|
36
36
|
color: {
|
|
37
|
-
neutral:
|
|
38
|
-
primary:
|
|
39
|
-
danger:
|
|
40
|
-
warning:
|
|
41
|
-
success:
|
|
42
|
-
info:
|
|
37
|
+
neutral: "";
|
|
38
|
+
primary: "";
|
|
39
|
+
danger: "";
|
|
40
|
+
warning: "";
|
|
41
|
+
success: "";
|
|
42
|
+
info: "";
|
|
43
43
|
};
|
|
44
|
-
}, undefined
|
|
44
|
+
}, undefined>>;
|
|
45
45
|
export type BadgeVariant = NonNullable<VariantProps<typeof badge>['variant']>;
|
|
46
46
|
export type BadgeColor = NonNullable<VariantProps<typeof badge>['color']>;
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { type VariantProps } from 'tailwind-variants';
|
|
2
2
|
export declare const button: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
variant: {
|
|
4
|
-
default:
|
|
5
|
-
outline:
|
|
6
|
-
ghost:
|
|
7
|
-
destructive:
|
|
4
|
+
default: "bg-primary text-ink-inverse hover:bg-primary/90 active:bg-primary/80";
|
|
5
|
+
outline: "border text-ink hover:bg-surface-2";
|
|
6
|
+
ghost: "text-ink hover:bg-surface-2";
|
|
7
|
+
destructive: "bg-danger text-ink-inverse hover:bg-danger/90 active:bg-danger/80";
|
|
8
8
|
};
|
|
9
9
|
size: {
|
|
10
|
-
sm:
|
|
11
|
-
default:
|
|
12
|
-
lg:
|
|
13
|
-
icon:
|
|
14
|
-
'icon-xs':
|
|
15
|
-
'icon-sm':
|
|
16
|
-
'icon-lg':
|
|
10
|
+
sm: "h-8 gap-1.5 px-2";
|
|
11
|
+
default: "h-9 gap-2 px-3";
|
|
12
|
+
lg: "h-10 gap-2.5 px-4";
|
|
13
|
+
icon: "size-8";
|
|
14
|
+
'icon-xs': "size-6";
|
|
15
|
+
'icon-sm': "size-7";
|
|
16
|
+
'icon-lg': "size-9";
|
|
17
17
|
};
|
|
18
18
|
}, undefined, "inline-flex cursor-pointer items-center justify-center rounded bg-transparent text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50", {
|
|
19
19
|
variant: {
|
|
20
|
-
default:
|
|
21
|
-
outline:
|
|
22
|
-
ghost:
|
|
23
|
-
destructive:
|
|
20
|
+
default: "bg-primary text-ink-inverse hover:bg-primary/90 active:bg-primary/80";
|
|
21
|
+
outline: "border text-ink hover:bg-surface-2";
|
|
22
|
+
ghost: "text-ink hover:bg-surface-2";
|
|
23
|
+
destructive: "bg-danger text-ink-inverse hover:bg-danger/90 active:bg-danger/80";
|
|
24
24
|
};
|
|
25
25
|
size: {
|
|
26
|
-
sm:
|
|
27
|
-
default:
|
|
28
|
-
lg:
|
|
29
|
-
icon:
|
|
30
|
-
'icon-xs':
|
|
31
|
-
'icon-sm':
|
|
32
|
-
'icon-lg':
|
|
26
|
+
sm: "h-8 gap-1.5 px-2";
|
|
27
|
+
default: "h-9 gap-2 px-3";
|
|
28
|
+
lg: "h-10 gap-2.5 px-4";
|
|
29
|
+
icon: "size-8";
|
|
30
|
+
'icon-xs': "size-6";
|
|
31
|
+
'icon-sm': "size-7";
|
|
32
|
+
'icon-lg': "size-9";
|
|
33
33
|
};
|
|
34
|
-
}, undefined, import("tailwind-variants").
|
|
34
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
35
35
|
variant: {
|
|
36
|
-
default:
|
|
37
|
-
outline:
|
|
38
|
-
ghost:
|
|
39
|
-
destructive:
|
|
36
|
+
default: "bg-primary text-ink-inverse hover:bg-primary/90 active:bg-primary/80";
|
|
37
|
+
outline: "border text-ink hover:bg-surface-2";
|
|
38
|
+
ghost: "text-ink hover:bg-surface-2";
|
|
39
|
+
destructive: "bg-danger text-ink-inverse hover:bg-danger/90 active:bg-danger/80";
|
|
40
40
|
};
|
|
41
41
|
size: {
|
|
42
|
-
sm:
|
|
43
|
-
default:
|
|
44
|
-
lg:
|
|
45
|
-
icon:
|
|
46
|
-
'icon-xs':
|
|
47
|
-
'icon-sm':
|
|
48
|
-
'icon-lg':
|
|
42
|
+
sm: "h-8 gap-1.5 px-2";
|
|
43
|
+
default: "h-9 gap-2 px-3";
|
|
44
|
+
lg: "h-10 gap-2.5 px-4";
|
|
45
|
+
icon: "size-8";
|
|
46
|
+
'icon-xs': "size-6";
|
|
47
|
+
'icon-sm': "size-7";
|
|
48
|
+
'icon-lg': "size-9";
|
|
49
49
|
};
|
|
50
|
-
}, undefined
|
|
50
|
+
}, undefined>>;
|
|
51
51
|
export type ButtonVariant = VariantProps<typeof button>['variant'];
|
|
52
52
|
export type ButtonSize = VariantProps<typeof button>['size'];
|
|
@@ -7,7 +7,14 @@ const TYPE_DEFAULTS = {
|
|
|
7
7
|
'date-time': { align: 'center', size: 160 },
|
|
8
8
|
boolean: { align: 'center', size: 90 },
|
|
9
9
|
url: { align: 'center', size: 60, enableSorting: false },
|
|
10
|
-
phone: { align: 'left', size: 160 }
|
|
10
|
+
phone: { align: 'left', size: 160 },
|
|
11
|
+
action: {
|
|
12
|
+
align: 'center',
|
|
13
|
+
size: 60,
|
|
14
|
+
enableSorting: false,
|
|
15
|
+
enableHiding: false,
|
|
16
|
+
enableColumnFilter: false
|
|
17
|
+
}
|
|
11
18
|
};
|
|
12
19
|
function applyTypeDefaults(options) {
|
|
13
20
|
const defaults = options.type ? TYPE_DEFAULTS[options.type] : undefined;
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
{@const meta = getColumnMeta(cell.column.columnDef)}
|
|
114
114
|
<td
|
|
115
115
|
class={cn(
|
|
116
|
-
'truncate border-b border-b-surface-2 px-3 py-
|
|
116
|
+
'h-9 truncate border-b border-b-surface-2 px-3 py-0 align-middle group-last/row:border-b-0',
|
|
117
117
|
alignClass(meta?.align),
|
|
118
118
|
cell.column.getIsPinned() && 'bg-(--row-bg)'
|
|
119
119
|
)}
|
|
@@ -175,8 +175,8 @@
|
|
|
175
175
|
{/if}
|
|
176
176
|
</Popover.Trigger>
|
|
177
177
|
|
|
178
|
-
<Popover.Content class="w-70
|
|
179
|
-
<div class="flex items-center justify-between py-2.5
|
|
178
|
+
<Popover.Content class="flex w-70 flex-col gap-3 p-3" showArrow={false}>
|
|
179
|
+
<div class="mr-1 flex items-center justify-between py-2.5">
|
|
180
180
|
<span class="text-sm font-medium text-ink">Filters</span>
|
|
181
181
|
{#if activeCount > 0}
|
|
182
182
|
<button type="button" onclick={clearFilters} class="text-xs text-primary hover:underline">
|
|
@@ -2,7 +2,7 @@ import type { FilterFnOption, RowData } from '@tanstack/svelte-table';
|
|
|
2
2
|
import type { Component, Snippet } from 'svelte';
|
|
3
3
|
import type { DataTableFeatures } from './features';
|
|
4
4
|
export type DataTableAlign = 'left' | 'center' | 'right';
|
|
5
|
-
export type DataTableColumnType = 'text' | 'number' | 'currency' | 'percent' | 'boolean' | 'select' | 'url' | 'phone' | 'date' | 'time' | 'date-time';
|
|
5
|
+
export type DataTableColumnType = 'text' | 'number' | 'currency' | 'percent' | 'boolean' | 'select' | 'url' | 'phone' | 'date' | 'time' | 'date-time' | 'action';
|
|
6
6
|
export type DataTableCellRenderer<T extends RowData> = (value: unknown, row: T) => string | number | boolean | null | undefined;
|
|
7
7
|
export type DataTableCellRenderProps<T extends RowData> = {
|
|
8
8
|
value: unknown;
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
{@const meta = getColumnMeta(cell.column.columnDef)}
|
|
110
110
|
<td
|
|
111
111
|
class={cn(
|
|
112
|
-
'items-center truncate px-3 py-
|
|
112
|
+
'h-9 items-center truncate px-3 py-0',
|
|
113
113
|
alignClass(meta?.align),
|
|
114
114
|
justifyClass(meta?.align),
|
|
115
115
|
cell.column.getIsPinned() && 'bg-(--row-bg)'
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
|
|
106
106
|
<DateInput.RootProvider value={dateInput}>
|
|
107
107
|
{#if label}
|
|
108
|
-
<DateInput.Label class="text-sm font-medium
|
|
108
|
+
<DateInput.Label class="text-sm leading-none font-medium">
|
|
109
109
|
{label}
|
|
110
110
|
<Field.RequiredIndicator />
|
|
111
111
|
</DateInput.Label>
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
</DateInput.SegmentContext>
|
|
127
127
|
</DateInput.SegmentGroup>
|
|
128
128
|
<DatePicker.Trigger
|
|
129
|
-
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-surface-1 shadow-sm hover:bg-surface-2 focus-visible:
|
|
129
|
+
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-surface-1 shadow-sm hover:bg-surface-2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50"
|
|
130
130
|
>
|
|
131
131
|
<PhCalendarBlank class="size-4" />
|
|
132
132
|
</DatePicker.Trigger>
|
|
@@ -61,24 +61,24 @@
|
|
|
61
61
|
<Portal>
|
|
62
62
|
<DatePicker.Positioner>
|
|
63
63
|
<DatePicker.Content
|
|
64
|
-
class="z-50 min-w-70 rounded-lg border border-border bg-surface-document p-4 shadow-lg outline-none data-[state=
|
|
64
|
+
class="z-50 min-w-70 rounded-lg border border-border bg-surface-document p-4 shadow-lg outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"
|
|
65
65
|
>
|
|
66
66
|
<DatePicker.View view="day">
|
|
67
67
|
<DatePicker.Context>
|
|
68
68
|
{#snippet render(datePicker)}
|
|
69
69
|
<DatePicker.ViewControl class="mb-3 flex items-center justify-between">
|
|
70
70
|
<DatePicker.PrevTrigger
|
|
71
|
-
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:
|
|
71
|
+
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
72
72
|
>
|
|
73
73
|
<PhArrowLeft class="size-4" />
|
|
74
74
|
</DatePicker.PrevTrigger>
|
|
75
75
|
<DatePicker.ViewTrigger
|
|
76
|
-
class="flex-1 rounded-md py-1 text-center text-sm font-semibold text-ink hover:bg-surface-1 focus-visible:
|
|
76
|
+
class="flex-1 rounded-md py-1 text-center text-sm font-semibold text-ink hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none"
|
|
77
77
|
>
|
|
78
78
|
<DatePicker.RangeText />
|
|
79
79
|
</DatePicker.ViewTrigger>
|
|
80
80
|
<DatePicker.NextTrigger
|
|
81
|
-
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:
|
|
81
|
+
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
82
82
|
>
|
|
83
83
|
<PhArrowRight class="size-4" />
|
|
84
84
|
</DatePicker.NextTrigger>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<DatePicker.TableRow>
|
|
89
89
|
{#each datePicker().weekDays as weekDay (weekDay.short)}
|
|
90
90
|
<DatePicker.TableHeader
|
|
91
|
-
class="pb-2 text-center text-xs font-medium
|
|
91
|
+
class="pb-2 text-center text-xs font-medium text-ink-dim uppercase"
|
|
92
92
|
>
|
|
93
93
|
{weekDay.short}
|
|
94
94
|
</DatePicker.TableHeader>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
{#each week as day (day.toString())}
|
|
102
102
|
<DatePicker.TableCell value={day}>
|
|
103
103
|
<DatePicker.TableCellTrigger
|
|
104
|
-
class="inline-flex h-9 w-9 items-center justify-center rounded-md text-sm text-ink hover:bg-surface-1 focus-visible:
|
|
104
|
+
class="inline-flex h-9 w-9 items-center justify-center rounded-md text-sm text-ink hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-40 data-in-range:rounded-none data-in-range:bg-primary/15 data-outside-range:text-ink-dim data-outside-range:opacity-40 data-range-end:rounded-r-md data-range-end:bg-primary data-range-end:text-ink-inverse data-range-start:rounded-l-md data-range-start:bg-primary data-range-start:text-ink-inverse data-selected:bg-primary data-selected:text-ink-inverse data-today:font-semibold data-today:text-primary data-selected:data-today:text-ink-inverse data-unavailable:line-through data-unavailable:opacity-40"
|
|
105
105
|
>
|
|
106
106
|
{day.day}
|
|
107
107
|
</DatePicker.TableCellTrigger>
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
<button
|
|
144
144
|
type="button"
|
|
145
145
|
onclick={() => datePicker().setValue([togglePeriod(cur)])}
|
|
146
|
-
class="h-8 rounded-md border border-border bg-surface-1 px-2 text-sm shadow-sm hover:bg-surface-2 focus-visible:
|
|
146
|
+
class="h-8 rounded-md border border-border bg-surface-1 px-2 text-sm shadow-sm hover:bg-surface-2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none"
|
|
147
147
|
>
|
|
148
148
|
{isPM(cur) ? 'PM' : 'AM'}
|
|
149
149
|
</button>
|
|
@@ -159,17 +159,17 @@
|
|
|
159
159
|
{#snippet render(datePicker)}
|
|
160
160
|
<DatePicker.ViewControl class="mb-3 flex items-center justify-between">
|
|
161
161
|
<DatePicker.PrevTrigger
|
|
162
|
-
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:
|
|
162
|
+
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
163
163
|
>
|
|
164
164
|
<PhArrowLeft class="size-4" />
|
|
165
165
|
</DatePicker.PrevTrigger>
|
|
166
166
|
<DatePicker.ViewTrigger
|
|
167
|
-
class="flex-1 rounded-md py-1 text-center text-sm font-semibold text-ink hover:bg-surface-1 focus-visible:
|
|
167
|
+
class="flex-1 rounded-md py-1 text-center text-sm font-semibold text-ink hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none"
|
|
168
168
|
>
|
|
169
169
|
<DatePicker.RangeText />
|
|
170
170
|
</DatePicker.ViewTrigger>
|
|
171
171
|
<DatePicker.NextTrigger
|
|
172
|
-
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:
|
|
172
|
+
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
173
173
|
>
|
|
174
174
|
<PhArrowRight class="size-4" />
|
|
175
175
|
</DatePicker.NextTrigger>
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
{#each monthRow as month (month.value)}
|
|
182
182
|
<DatePicker.TableCell value={month.value}>
|
|
183
183
|
<DatePicker.TableCellTrigger
|
|
184
|
-
class="inline-flex h-10 w-full items-center justify-center rounded-md px-2 text-sm text-ink hover:bg-surface-1 focus-visible:
|
|
184
|
+
class="inline-flex h-10 w-full items-center justify-center rounded-md px-2 text-sm text-ink hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-outside-range:invisible data-selected:bg-primary data-selected:text-ink-inverse"
|
|
185
185
|
>
|
|
186
186
|
{month.label}
|
|
187
187
|
</DatePicker.TableCellTrigger>
|
|
@@ -200,17 +200,17 @@
|
|
|
200
200
|
{#snippet render(datePicker)}
|
|
201
201
|
<DatePicker.ViewControl class="mb-3 flex items-center justify-between">
|
|
202
202
|
<DatePicker.PrevTrigger
|
|
203
|
-
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:
|
|
203
|
+
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
204
204
|
>
|
|
205
205
|
<PhArrowLeft class="size-4" />
|
|
206
206
|
</DatePicker.PrevTrigger>
|
|
207
207
|
<DatePicker.ViewTrigger
|
|
208
|
-
class="flex-1 rounded-md py-1 text-center text-sm font-semibold text-ink hover:bg-surface-1 focus-visible:
|
|
208
|
+
class="flex-1 rounded-md py-1 text-center text-sm font-semibold text-ink hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none"
|
|
209
209
|
>
|
|
210
210
|
<DatePicker.RangeText />
|
|
211
211
|
</DatePicker.ViewTrigger>
|
|
212
212
|
<DatePicker.NextTrigger
|
|
213
|
-
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:
|
|
213
|
+
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-ink-dim hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-40"
|
|
214
214
|
>
|
|
215
215
|
<PhArrowRight class="size-4" />
|
|
216
216
|
</DatePicker.NextTrigger>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
{#each yearRow as year (year.value)}
|
|
223
223
|
<DatePicker.TableCell value={year.value}>
|
|
224
224
|
<DatePicker.TableCellTrigger
|
|
225
|
-
class="inline-flex h-10 w-full items-center justify-center rounded-md px-2 text-sm text-ink hover:bg-surface-1 focus-visible:
|
|
225
|
+
class="inline-flex h-10 w-full items-center justify-center rounded-md px-2 text-sm text-ink hover:bg-surface-1 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-outside-range:invisible data-selected:bg-primary data-selected:text-ink-inverse"
|
|
226
226
|
>
|
|
227
227
|
{year.label}
|
|
228
228
|
</DatePicker.TableCellTrigger>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}}
|
|
73
73
|
>
|
|
74
74
|
{#if label}
|
|
75
|
-
<DatePicker.Label class="text-sm font-medium
|
|
75
|
+
<DatePicker.Label class="text-sm leading-none font-medium">
|
|
76
76
|
{label}
|
|
77
77
|
<Field.RequiredIndicator />
|
|
78
78
|
</DatePicker.Label>
|
|
@@ -80,15 +80,15 @@
|
|
|
80
80
|
<DatePicker.Control class="flex flex-row gap-1.5">
|
|
81
81
|
<DatePicker.Input
|
|
82
82
|
{placeholder}
|
|
83
|
-
class="h-9 min-w-0 flex-1 rounded-md border border-border bg-surface-1 px-3 text-sm shadow-sm focus-visible:
|
|
83
|
+
class="h-9 min-w-0 flex-1 rounded-md border border-border bg-surface-1 px-3 text-sm shadow-sm focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 data-invalid:border-danger"
|
|
84
84
|
/>
|
|
85
85
|
<DatePicker.Trigger
|
|
86
|
-
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-surface-1 shadow-sm hover:bg-surface-2 focus-visible:
|
|
86
|
+
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-surface-1 shadow-sm hover:bg-surface-2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50"
|
|
87
87
|
>
|
|
88
88
|
<PhCalendarBlank class="size-4" />
|
|
89
89
|
</DatePicker.Trigger>
|
|
90
90
|
<DatePicker.ClearTrigger
|
|
91
|
-
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-surface-1 text-ink-dim shadow-sm hover:bg-surface-2 focus-visible:
|
|
91
|
+
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-surface-1 text-ink-dim shadow-sm hover:bg-surface-2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none"
|
|
92
92
|
>
|
|
93
93
|
<PhX class="size-3.5" />
|
|
94
94
|
</DatePicker.ClearTrigger>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
|
|
73
73
|
<DateInput.RootProvider value={dateInput}>
|
|
74
74
|
{#if label}
|
|
75
|
-
<DateInput.Label class="text-sm font-medium
|
|
75
|
+
<DateInput.Label class="text-sm leading-none font-medium">
|
|
76
76
|
{label}
|
|
77
77
|
<Field.RequiredIndicator />
|
|
78
78
|
</DateInput.Label>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
</DateInput.SegmentContext>
|
|
97
97
|
</DateInput.SegmentGroup>
|
|
98
98
|
<DatePicker.Trigger
|
|
99
|
-
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-surface-1 shadow-sm hover:bg-surface-2 focus-visible:
|
|
99
|
+
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-surface-1 shadow-sm hover:bg-surface-2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50"
|
|
100
100
|
>
|
|
101
101
|
<PhCalendarBlank class="size-4" />
|
|
102
102
|
</DatePicker.Trigger>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<FileUpload.Root {maxFiles} {accept} class="flex flex-col gap-1.5" {...restProps}>
|
|
29
29
|
{#if label}
|
|
30
|
-
<FileUpload.Label class="text-sm font-medium
|
|
30
|
+
<FileUpload.Label class="text-sm leading-none font-medium">{label}</FileUpload.Label>
|
|
31
31
|
{/if}
|
|
32
32
|
|
|
33
33
|
<FileUpload.Context>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<Listbox.Content
|
|
21
21
|
{...restProps}
|
|
22
22
|
class={cn(
|
|
23
|
-
'flex min-h-0 w-full flex-1 flex-col overflow-y-auto
|
|
23
|
+
'flex min-h-0 w-full flex-1 scrollbar-thin flex-col overflow-y-auto rounded border bg-surface-document p-1 outline-none',
|
|
24
24
|
className
|
|
25
25
|
)}
|
|
26
26
|
>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
class={cn(
|
|
15
15
|
'group absolute inset-y-0 left-0 z-20 flex w-16 flex-col overflow-hidden',
|
|
16
16
|
'border-r border-border bg-surface-1 transition-[width] duration-200',
|
|
17
|
-
'
|
|
17
|
+
'focus-within:w-60 hover:w-60 data-expanded:w-60',
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...rest}
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
<Select.Control class="h-full">
|
|
93
93
|
<Select.Trigger
|
|
94
94
|
aria-label="Country"
|
|
95
|
-
class="flex h-9 cursor-pointer items-center gap-1.5 rounded-l-md border-r px-2.5 text-sm outline-none
|
|
95
|
+
class="flex h-9 cursor-pointer items-center gap-1.5 rounded-l-md border-r px-2.5 text-sm transition-colors outline-none hover:bg-surface-2 active:bg-surface-2 data-disabled:cursor-not-allowed data-disabled:hover:bg-transparent"
|
|
96
96
|
>
|
|
97
97
|
{#if selectedItem}
|
|
98
98
|
<span
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<Progress.Label class="text-sm font-medium text-ink">{label}</Progress.Label>
|
|
36
36
|
{/if}
|
|
37
37
|
{#if showValueText}
|
|
38
|
-
<Progress.ValueText class="text-sm
|
|
38
|
+
<Progress.ValueText class="text-sm text-ink-dim tabular-nums" />
|
|
39
39
|
{/if}
|
|
40
40
|
</div>
|
|
41
41
|
{/if}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Root } from './table.svelte';
|
|
2
|
+
export { default as Header } from './table-header.svelte';
|
|
3
|
+
export { default as Body } from './table-body.svelte';
|
|
4
|
+
export { default as Footer } from './table-footer.svelte';
|
|
5
|
+
export { default as Row } from './table-row.svelte';
|
|
6
|
+
export { default as Head } from './table-head.svelte';
|
|
7
|
+
export { default as Cell } from './table-cell.svelte';
|
|
8
|
+
export { default as Caption } from './table-caption.svelte';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Root } from './table.svelte';
|
|
2
|
+
export { default as Header } from './table-header.svelte';
|
|
3
|
+
export { default as Body } from './table-body.svelte';
|
|
4
|
+
export { default as Footer } from './table-footer.svelte';
|
|
5
|
+
export { default as Row } from './table-row.svelte';
|
|
6
|
+
export { default as Head } from './table-head.svelte';
|
|
7
|
+
export { default as Cell } from './table-cell.svelte';
|
|
8
|
+
export { default as Caption } from './table-caption.svelte';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLAttributes<HTMLTableSectionElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<tbody class={cn(className)} {...rest}>
|
|
9
|
+
{@render children?.()}
|
|
10
|
+
</tbody>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
// Svelte types `<caption>` against HTMLElement, not HTMLTableCaptionElement.
|
|
6
|
+
let { class: className, children, ...rest }: HTMLAttributes<HTMLElement> = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<caption class={cn('px-3 py-2 text-left text-sm text-ink-dim', className)} {...rest}>
|
|
10
|
+
{@render children?.()}
|
|
11
|
+
</caption>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLTdAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLTdAttributes = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<td
|
|
9
|
+
class={cn(
|
|
10
|
+
'h-9 border-b border-surface-2 px-3 py-0 align-middle group-last/row:border-b-0',
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
{...rest}
|
|
14
|
+
>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</td>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
type Props = HTMLAttributes<HTMLTableSectionElement> & {
|
|
6
|
+
sticky?: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let { sticky = true, class: className, children, ...rest }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<!-- Footer cells are plain Table.Cell; the border flip (bottom -> top), the
|
|
13
|
+
surface and the weight are applied here so Cell stays context-free. -->
|
|
14
|
+
<tfoot
|
|
15
|
+
class={cn(
|
|
16
|
+
'bg-surface-2 text-ink-dim',
|
|
17
|
+
'[&_td]:border-t [&_td]:border-b-0 [&_td]:border-surface-3 [&_td]:bg-surface-2 [&_td]:font-medium',
|
|
18
|
+
sticky && 'sticky bottom-0 z-20',
|
|
19
|
+
className
|
|
20
|
+
)}
|
|
21
|
+
{...rest}
|
|
22
|
+
>
|
|
23
|
+
{@render children?.()}
|
|
24
|
+
</tfoot>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
type Props = HTMLAttributes<HTMLTableSectionElement> & {
|
|
3
|
+
sticky?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const TableFooter: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type TableFooter = ReturnType<typeof TableFooter>;
|
|
7
|
+
export default TableFooter;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLThAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { scope = 'col', class: className, children, ...rest }: HTMLThAttributes = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<th
|
|
9
|
+
{scope}
|
|
10
|
+
class={cn(
|
|
11
|
+
'h-9 border-b border-surface-3 bg-surface-2 px-3 py-0 align-middle leading-5 font-medium',
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...rest}
|
|
15
|
+
>
|
|
16
|
+
{@render children?.()}
|
|
17
|
+
</th>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
type Props = HTMLAttributes<HTMLTableSectionElement> & {
|
|
6
|
+
sticky?: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let { sticky = true, class: className, children, ...rest }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<!-- Sticky by default: with no scrolling ancestor it simply behaves as static,
|
|
13
|
+
so the same header works inside a scroll container and inside a dialog. -->
|
|
14
|
+
<thead class={cn('bg-surface-2 text-ink-dim', sticky && 'sticky top-0 z-20', className)} {...rest}>
|
|
15
|
+
{@render children?.()}
|
|
16
|
+
</thead>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
type Props = HTMLAttributes<HTMLTableSectionElement> & {
|
|
3
|
+
sticky?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const TableHeader: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type TableHeader = ReturnType<typeof TableHeader>;
|
|
7
|
+
export default TableHeader;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
type Props = HTMLAttributes<HTMLTableRowElement> & {
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let { selected = false, class: className, children, ...rest }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<!-- `group/row` lets cells drop their bottom border on the last row. The hover
|
|
13
|
+
tint is invisible on header/footer rows because those cells set an opaque
|
|
14
|
+
bg-surface-2 of their own. -->
|
|
15
|
+
<tr class={cn('group/row h-9 hover:bg-well/60', selected && 'bg-well/60', className)} {...rest}>
|
|
16
|
+
{@render children?.()}
|
|
17
|
+
</tr>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
type Props = HTMLAttributes<HTMLTableRowElement> & {
|
|
3
|
+
selected?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const TableRow: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type TableRow = ReturnType<typeof TableRow>;
|
|
7
|
+
export default TableRow;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLTableAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
let { class: className, children, ...rest }: HTMLTableAttributes = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<!-- border-separate (not border-collapse) keeps cell borders painted under a
|
|
9
|
+
sticky header, matching how DataTable renders its own table. -->
|
|
10
|
+
<table
|
|
11
|
+
class={cn('w-full border-separate border-spacing-0 text-left text-sm text-ink', className)}
|
|
12
|
+
{...rest}
|
|
13
|
+
>
|
|
14
|
+
{@render children?.()}
|
|
15
|
+
</table>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<TagsInput.Context>
|
|
34
34
|
{#snippet render(tagsInput)}
|
|
35
35
|
{#if label}
|
|
36
|
-
<TagsInput.Label class="text-sm font-medium
|
|
36
|
+
<TagsInput.Label class="text-sm leading-none font-medium data-disabled:opacity-50">
|
|
37
37
|
{label}
|
|
38
38
|
</TagsInput.Label>
|
|
39
39
|
{/if}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<TagsInput.ItemPreview
|
|
56
56
|
class={cn(
|
|
57
57
|
'inline-flex items-center gap-1 rounded bg-surface-2 py-0.5 pr-1 pl-2 text-sm',
|
|
58
|
-
'data-highlighted:bg-primary/10
|
|
58
|
+
'data-disabled:opacity-50 data-highlighted:bg-primary/10'
|
|
59
59
|
)}
|
|
60
60
|
>
|
|
61
61
|
<TagsInput.ItemText>{value}</TagsInput.ItemText>
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { type VariantProps } from 'tailwind-variants';
|
|
2
2
|
export declare const toggle: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
variant: {
|
|
4
|
-
ghost:
|
|
5
|
-
outline:
|
|
4
|
+
ghost: "hover:bg-surface-2 hover:text-ink data-pressed:bg-surface-2 data-pressed:text-ink data-pressed:shadow-sm data-[state=on]:bg-surface-2 data-[state=on]:text-ink data-[state=on]:shadow-sm";
|
|
5
|
+
outline: "border border-border hover:bg-surface-2 hover:text-ink data-pressed:bg-surface-2 data-pressed:text-ink data-pressed:shadow-sm data-[state=on]:bg-surface-2 data-[state=on]:text-ink data-[state=on]:shadow-sm";
|
|
6
6
|
};
|
|
7
7
|
size: {
|
|
8
|
-
sm:
|
|
9
|
-
md:
|
|
10
|
-
lg:
|
|
8
|
+
sm: "h-8 min-w-8 gap-1 px-1.5 text-xs [&_svg]:size-3.5";
|
|
9
|
+
md: "h-9 min-w-9 gap-1.5 px-2 text-sm [&_svg]:size-4";
|
|
10
|
+
lg: "h-10 min-w-10 gap-2 px-2.5 text-sm [&_svg]:size-5";
|
|
11
11
|
};
|
|
12
12
|
icon: {
|
|
13
|
-
true:
|
|
13
|
+
true: "";
|
|
14
14
|
};
|
|
15
15
|
}, undefined, "inline-flex cursor-pointer items-center justify-center rounded-md font-medium text-ink-dim transition-colors select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:shrink-0", {
|
|
16
16
|
variant: {
|
|
17
|
-
ghost:
|
|
18
|
-
outline:
|
|
17
|
+
ghost: "hover:bg-surface-2 hover:text-ink data-pressed:bg-surface-2 data-pressed:text-ink data-pressed:shadow-sm data-[state=on]:bg-surface-2 data-[state=on]:text-ink data-[state=on]:shadow-sm";
|
|
18
|
+
outline: "border border-border hover:bg-surface-2 hover:text-ink data-pressed:bg-surface-2 data-pressed:text-ink data-pressed:shadow-sm data-[state=on]:bg-surface-2 data-[state=on]:text-ink data-[state=on]:shadow-sm";
|
|
19
19
|
};
|
|
20
20
|
size: {
|
|
21
|
-
sm:
|
|
22
|
-
md:
|
|
23
|
-
lg:
|
|
21
|
+
sm: "h-8 min-w-8 gap-1 px-1.5 text-xs [&_svg]:size-3.5";
|
|
22
|
+
md: "h-9 min-w-9 gap-1.5 px-2 text-sm [&_svg]:size-4";
|
|
23
|
+
lg: "h-10 min-w-10 gap-2 px-2.5 text-sm [&_svg]:size-5";
|
|
24
24
|
};
|
|
25
25
|
icon: {
|
|
26
|
-
true:
|
|
26
|
+
true: "";
|
|
27
27
|
};
|
|
28
|
-
}, undefined, import("tailwind-variants").
|
|
28
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
29
29
|
variant: {
|
|
30
|
-
ghost:
|
|
31
|
-
outline:
|
|
30
|
+
ghost: "hover:bg-surface-2 hover:text-ink data-pressed:bg-surface-2 data-pressed:text-ink data-pressed:shadow-sm data-[state=on]:bg-surface-2 data-[state=on]:text-ink data-[state=on]:shadow-sm";
|
|
31
|
+
outline: "border border-border hover:bg-surface-2 hover:text-ink data-pressed:bg-surface-2 data-pressed:text-ink data-pressed:shadow-sm data-[state=on]:bg-surface-2 data-[state=on]:text-ink data-[state=on]:shadow-sm";
|
|
32
32
|
};
|
|
33
33
|
size: {
|
|
34
|
-
sm:
|
|
35
|
-
md:
|
|
36
|
-
lg:
|
|
34
|
+
sm: "h-8 min-w-8 gap-1 px-1.5 text-xs [&_svg]:size-3.5";
|
|
35
|
+
md: "h-9 min-w-9 gap-1.5 px-2 text-sm [&_svg]:size-4";
|
|
36
|
+
lg: "h-10 min-w-10 gap-2 px-2.5 text-sm [&_svg]:size-5";
|
|
37
37
|
};
|
|
38
38
|
icon: {
|
|
39
|
-
true:
|
|
39
|
+
true: "";
|
|
40
40
|
};
|
|
41
|
-
}, undefined
|
|
41
|
+
}, undefined>>;
|
|
42
42
|
export type ToggleSize = NonNullable<VariantProps<typeof toggle>['size']>;
|
|
43
43
|
export type ToggleVariant = NonNullable<VariantProps<typeof toggle>['variant']>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { class: className = '', ...restProps } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<!-- Icon from Phosphor by Phosphor Icons - https://github.com/phosphor-icons/core/blob/main/LICENSE -->
|
|
6
|
+
<svg
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
width="1em"
|
|
9
|
+
height="1em"
|
|
10
|
+
viewBox="0 0 256 256"
|
|
11
|
+
class={className}
|
|
12
|
+
{...restProps}
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
fill="currentColor"
|
|
16
|
+
d="M224 128a8 8 0 0 1-8 8h-80v80a8 8 0 0 1-16 0v-80H40a8 8 0 0 1 0-16h80V40a8 8 0 0 1 16 0v80h80a8 8 0 0 1 8 8"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { default as PhMagnifyingGlass } from './PhMagnifyingGlass.svelte';
|
|
|
21
21
|
export { default as PhMicrosoftExcelLogo } from './PhMicrosoftExcelLogo.svelte';
|
|
22
22
|
export { default as PhMinus } from './PhMinus.svelte';
|
|
23
23
|
export { default as PhPhone } from './PhPhone.svelte';
|
|
24
|
+
export { default as PhPlus } from './PhPlus.svelte';
|
|
24
25
|
export { default as PhStar } from './PhStar.svelte';
|
|
25
26
|
export { default as PhUploadSimple } from './PhUploadSimple.svelte';
|
|
26
27
|
export { default as PhUser } from './PhUser.svelte';
|
package/dist/icons/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export { default as PhMagnifyingGlass } from './PhMagnifyingGlass.svelte';
|
|
|
21
21
|
export { default as PhMicrosoftExcelLogo } from './PhMicrosoftExcelLogo.svelte';
|
|
22
22
|
export { default as PhMinus } from './PhMinus.svelte';
|
|
23
23
|
export { default as PhPhone } from './PhPhone.svelte';
|
|
24
|
+
export { default as PhPlus } from './PhPlus.svelte';
|
|
24
25
|
export { default as PhStar } from './PhStar.svelte';
|
|
25
26
|
export { default as PhUploadSimple } from './PhUploadSimple.svelte';
|
|
26
27
|
export { default as PhUser } from './PhUser.svelte';
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export { default as Select } from './components/select/select.svelte';
|
|
|
54
54
|
export { default as Splitter } from './components/splitter/splitter.svelte';
|
|
55
55
|
export type { SplitterPanelConfig, SplitterProps } from './components/splitter/types';
|
|
56
56
|
export { default as Switch } from './components/switch/switch.svelte';
|
|
57
|
+
export * as Table from './components/table';
|
|
57
58
|
export * as Tabs from './components/tabs';
|
|
58
59
|
export { default as TagsInput } from './components/tags-input/tags-input.svelte';
|
|
59
60
|
export type { TagsInputProps } from './components/tags-input/types';
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ export { default as QrCode } from './components/qr-code/qr-code.svelte';
|
|
|
42
42
|
export { default as Select } from './components/select/select.svelte';
|
|
43
43
|
export { default as Splitter } from './components/splitter/splitter.svelte';
|
|
44
44
|
export { default as Switch } from './components/switch/switch.svelte';
|
|
45
|
+
export * as Table from './components/table';
|
|
45
46
|
export * as Tabs from './components/tabs';
|
|
46
47
|
export { default as TagsInput } from './components/tags-input/tags-input.svelte';
|
|
47
48
|
export * as Toast from './components/toast';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compote-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev --open",
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
"@tanstack/intent": "^0.3.6",
|
|
67
67
|
"@tanstack/svelte-table": "9.0.0-beta.47",
|
|
68
68
|
"@types/node": "^22.20.0",
|
|
69
|
-
"eslint": "^10.
|
|
69
|
+
"eslint": "^10.8.0",
|
|
70
70
|
"eslint-config-prettier": "^10.1.8",
|
|
71
71
|
"eslint-plugin-svelte": "^3.22.0",
|
|
72
|
-
"globals": "^17.
|
|
72
|
+
"globals": "^17.8.0",
|
|
73
73
|
"prettier": "^3.9.6",
|
|
74
74
|
"prettier-plugin-svelte": "^4.1.1",
|
|
75
75
|
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
76
|
-
"publint": "^0.3.
|
|
77
|
-
"svelte": "^5.56.
|
|
78
|
-
"svelte-check": "^4.7.
|
|
76
|
+
"publint": "^0.3.22",
|
|
77
|
+
"svelte": "^5.56.8",
|
|
78
|
+
"svelte-check": "^4.7.4",
|
|
79
79
|
"tailwindcss": "^4.3.3",
|
|
80
80
|
"tw-animate-css": "^1.4.0",
|
|
81
81
|
"typescript": "^6.0.3",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"@ark-ui/svelte": "^5.22.1",
|
|
92
92
|
"@fontsource-variable/nunito-sans": "^5.2.7",
|
|
93
93
|
"@internationalized/date": "^3.12.2",
|
|
94
|
-
"@tanstack/svelte-virtual": "^3.13.
|
|
94
|
+
"@tanstack/svelte-virtual": "^3.13.34",
|
|
95
95
|
"runed": "^0.37.1",
|
|
96
96
|
"svelte-tel-input": "^4.3.2",
|
|
97
97
|
"tailwind-merge": "^3.6.0",
|
|
98
|
-
"tailwind-variants": "^3.
|
|
98
|
+
"tailwind-variants": "^3.3.0"
|
|
99
99
|
},
|
|
100
100
|
"intent": {
|
|
101
101
|
"skills": [
|