@shwfed/nuxt 0.7.10 → 0.7.11
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/module.json +1 -1
- package/dist/runtime/components/table.d.vue.ts +68 -2
- package/dist/runtime/components/table.vue +0 -1
- package/dist/runtime/components/table.vue.d.ts +68 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/dist/runtime/components/ui/field/FieldLabel.vue +1 -1
- package/dist/runtime/components/ui/icon-picker/IconPicker.d.vue.ts +15 -0
- package/dist/runtime/components/ui/icon-picker/IconPicker.vue +178 -0
- package/dist/runtime/components/ui/icon-picker/IconPicker.vue.d.ts +15 -0
- package/dist/runtime/components/ui/icon-picker/index.d.ts +1 -0
- package/dist/runtime/components/ui/icon-picker/index.js +1 -0
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupInput.vue +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue +1 -1
- package/dist/runtime/components/ui/native-select/NativeSelect.d.vue.ts +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelect.vue +1 -1
- package/dist/runtime/components/ui/native-select/NativeSelect.vue.d.ts +2 -2
- package/dist/runtime/components/ui/switch/Switch.vue +2 -2
- package/dist/runtime/components/ui/table/Table.d.vue.ts +69 -3
- package/dist/runtime/components/ui/table/Table.vue +201 -41
- package/dist/runtime/components/ui/table/Table.vue.d.ts +69 -3
- package/dist/runtime/components/ui/table/schema.d.ts +107 -4
- package/dist/runtime/components/ui/table/schema.js +106 -90
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.d.vue.ts +68 -2
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue +590 -104
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue.d.ts +68 -2
- package/dist/runtime/components/ui/textarea/Textarea.vue +1 -1
- package/dist/runtime/plugins/toast/index.d.ts +2 -2
- package/dist/runtime/table-renderers/builtins.js +151 -75
- package/dist/runtime/table-renderers/registry.d.ts +1 -1
- package/dist/runtime/utils/coders.d.ts +2 -0
- package/dist/runtime/utils/coders.js +13 -0
- package/package.json +6 -6
package/dist/module.json
CHANGED
|
@@ -35,9 +35,42 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
35
35
|
grow?: boolean;
|
|
36
36
|
}>[];
|
|
37
37
|
cellStyles?: import("./table.vue.js").Expression;
|
|
38
|
-
props?:
|
|
38
|
+
props?: Readonly<{
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
initialState?: Readonly<{
|
|
41
|
+
columnVisibility?: Record<string, boolean>;
|
|
42
|
+
columnOrder?: ReadonlyArray<string>;
|
|
43
|
+
columnPinning?: Readonly<{
|
|
44
|
+
left?: ReadonlyArray<string>;
|
|
45
|
+
right?: ReadonlyArray<string>;
|
|
46
|
+
}>;
|
|
47
|
+
rowPinning?: Readonly<{
|
|
48
|
+
top?: ReadonlyArray<string>;
|
|
49
|
+
bottom?: ReadonlyArray<string>;
|
|
50
|
+
}>;
|
|
51
|
+
columnFilters?: ReadonlyArray<Readonly<{
|
|
52
|
+
id: string;
|
|
53
|
+
value: unknown;
|
|
54
|
+
}>>;
|
|
55
|
+
globalFilter?: unknown;
|
|
56
|
+
sorting?: ReadonlyArray<Readonly<{
|
|
57
|
+
id: string;
|
|
58
|
+
desc: boolean;
|
|
59
|
+
}>>;
|
|
60
|
+
expanded?: boolean | Record<string, boolean>;
|
|
61
|
+
grouping?: ReadonlyArray<string>;
|
|
62
|
+
columnSizing?: Record<string, number>;
|
|
63
|
+
columnSizingInfo?: Record<string, unknown>;
|
|
64
|
+
pagination?: Readonly<{
|
|
65
|
+
pageIndex?: number;
|
|
66
|
+
pageSize?: number;
|
|
67
|
+
}>;
|
|
68
|
+
rowSelection?: Record<string, boolean>;
|
|
69
|
+
}>;
|
|
70
|
+
}>;
|
|
39
71
|
paginationLeft?: import("./table.vue.js").Markdown;
|
|
40
72
|
paginationRight?: import("./table.vue.js").Markdown;
|
|
73
|
+
paginationPageSizes?: ReadonlyArray<number>;
|
|
41
74
|
}>) => any;
|
|
42
75
|
}, string, import("vue").PublicProps, Readonly<{
|
|
43
76
|
config: import("effect").Effect.Effect<TableConfig>;
|
|
@@ -63,9 +96,42 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
63
96
|
grow?: boolean;
|
|
64
97
|
}>[];
|
|
65
98
|
cellStyles?: import("./table.vue.js").Expression;
|
|
66
|
-
props?:
|
|
99
|
+
props?: Readonly<{
|
|
100
|
+
[key: string]: unknown;
|
|
101
|
+
initialState?: Readonly<{
|
|
102
|
+
columnVisibility?: Record<string, boolean>;
|
|
103
|
+
columnOrder?: ReadonlyArray<string>;
|
|
104
|
+
columnPinning?: Readonly<{
|
|
105
|
+
left?: ReadonlyArray<string>;
|
|
106
|
+
right?: ReadonlyArray<string>;
|
|
107
|
+
}>;
|
|
108
|
+
rowPinning?: Readonly<{
|
|
109
|
+
top?: ReadonlyArray<string>;
|
|
110
|
+
bottom?: ReadonlyArray<string>;
|
|
111
|
+
}>;
|
|
112
|
+
columnFilters?: ReadonlyArray<Readonly<{
|
|
113
|
+
id: string;
|
|
114
|
+
value: unknown;
|
|
115
|
+
}>>;
|
|
116
|
+
globalFilter?: unknown;
|
|
117
|
+
sorting?: ReadonlyArray<Readonly<{
|
|
118
|
+
id: string;
|
|
119
|
+
desc: boolean;
|
|
120
|
+
}>>;
|
|
121
|
+
expanded?: boolean | Record<string, boolean>;
|
|
122
|
+
grouping?: ReadonlyArray<string>;
|
|
123
|
+
columnSizing?: Record<string, number>;
|
|
124
|
+
columnSizingInfo?: Record<string, unknown>;
|
|
125
|
+
pagination?: Readonly<{
|
|
126
|
+
pageIndex?: number;
|
|
127
|
+
pageSize?: number;
|
|
128
|
+
}>;
|
|
129
|
+
rowSelection?: Record<string, boolean>;
|
|
130
|
+
}>;
|
|
131
|
+
}>;
|
|
67
132
|
paginationLeft?: import("./table.vue.js").Markdown;
|
|
68
133
|
paginationRight?: import("./table.vue.js").Markdown;
|
|
134
|
+
paginationPageSizes?: ReadonlyArray<number>;
|
|
69
135
|
}>) => any) | undefined;
|
|
70
136
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
71
137
|
[x: string]: ((props: {
|
|
@@ -35,9 +35,42 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
35
35
|
grow?: boolean;
|
|
36
36
|
}>[];
|
|
37
37
|
cellStyles?: import("./table.vue.js").Expression;
|
|
38
|
-
props?:
|
|
38
|
+
props?: Readonly<{
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
initialState?: Readonly<{
|
|
41
|
+
columnVisibility?: Record<string, boolean>;
|
|
42
|
+
columnOrder?: ReadonlyArray<string>;
|
|
43
|
+
columnPinning?: Readonly<{
|
|
44
|
+
left?: ReadonlyArray<string>;
|
|
45
|
+
right?: ReadonlyArray<string>;
|
|
46
|
+
}>;
|
|
47
|
+
rowPinning?: Readonly<{
|
|
48
|
+
top?: ReadonlyArray<string>;
|
|
49
|
+
bottom?: ReadonlyArray<string>;
|
|
50
|
+
}>;
|
|
51
|
+
columnFilters?: ReadonlyArray<Readonly<{
|
|
52
|
+
id: string;
|
|
53
|
+
value: unknown;
|
|
54
|
+
}>>;
|
|
55
|
+
globalFilter?: unknown;
|
|
56
|
+
sorting?: ReadonlyArray<Readonly<{
|
|
57
|
+
id: string;
|
|
58
|
+
desc: boolean;
|
|
59
|
+
}>>;
|
|
60
|
+
expanded?: boolean | Record<string, boolean>;
|
|
61
|
+
grouping?: ReadonlyArray<string>;
|
|
62
|
+
columnSizing?: Record<string, number>;
|
|
63
|
+
columnSizingInfo?: Record<string, unknown>;
|
|
64
|
+
pagination?: Readonly<{
|
|
65
|
+
pageIndex?: number;
|
|
66
|
+
pageSize?: number;
|
|
67
|
+
}>;
|
|
68
|
+
rowSelection?: Record<string, boolean>;
|
|
69
|
+
}>;
|
|
70
|
+
}>;
|
|
39
71
|
paginationLeft?: import("./table.vue.js").Markdown;
|
|
40
72
|
paginationRight?: import("./table.vue.js").Markdown;
|
|
73
|
+
paginationPageSizes?: ReadonlyArray<number>;
|
|
41
74
|
}>) => any;
|
|
42
75
|
}, string, import("vue").PublicProps, Readonly<{
|
|
43
76
|
config: import("effect").Effect.Effect<TableConfig>;
|
|
@@ -63,9 +96,42 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
63
96
|
grow?: boolean;
|
|
64
97
|
}>[];
|
|
65
98
|
cellStyles?: import("./table.vue.js").Expression;
|
|
66
|
-
props?:
|
|
99
|
+
props?: Readonly<{
|
|
100
|
+
[key: string]: unknown;
|
|
101
|
+
initialState?: Readonly<{
|
|
102
|
+
columnVisibility?: Record<string, boolean>;
|
|
103
|
+
columnOrder?: ReadonlyArray<string>;
|
|
104
|
+
columnPinning?: Readonly<{
|
|
105
|
+
left?: ReadonlyArray<string>;
|
|
106
|
+
right?: ReadonlyArray<string>;
|
|
107
|
+
}>;
|
|
108
|
+
rowPinning?: Readonly<{
|
|
109
|
+
top?: ReadonlyArray<string>;
|
|
110
|
+
bottom?: ReadonlyArray<string>;
|
|
111
|
+
}>;
|
|
112
|
+
columnFilters?: ReadonlyArray<Readonly<{
|
|
113
|
+
id: string;
|
|
114
|
+
value: unknown;
|
|
115
|
+
}>>;
|
|
116
|
+
globalFilter?: unknown;
|
|
117
|
+
sorting?: ReadonlyArray<Readonly<{
|
|
118
|
+
id: string;
|
|
119
|
+
desc: boolean;
|
|
120
|
+
}>>;
|
|
121
|
+
expanded?: boolean | Record<string, boolean>;
|
|
122
|
+
grouping?: ReadonlyArray<string>;
|
|
123
|
+
columnSizing?: Record<string, number>;
|
|
124
|
+
columnSizingInfo?: Record<string, unknown>;
|
|
125
|
+
pagination?: Readonly<{
|
|
126
|
+
pageIndex?: number;
|
|
127
|
+
pageSize?: number;
|
|
128
|
+
}>;
|
|
129
|
+
rowSelection?: Record<string, boolean>;
|
|
130
|
+
}>;
|
|
131
|
+
}>;
|
|
67
132
|
paginationLeft?: import("./table.vue.js").Markdown;
|
|
68
133
|
paginationRight?: import("./table.vue.js").Markdown;
|
|
134
|
+
paginationPageSizes?: ReadonlyArray<number>;
|
|
69
135
|
}>) => any) | undefined;
|
|
70
136
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
71
137
|
[x: string]: ((props: {
|
|
@@ -22,7 +22,7 @@ const forwardedProps = useForwardPropsEmits(delegatedProps, emits);
|
|
|
22
22
|
:data-inset="inset ? '' : void 0"
|
|
23
23
|
:data-variant="variant"
|
|
24
24
|
v-bind="forwardedProps"
|
|
25
|
-
:class="cn('focus:bg-[color-mix(in_srgb,var(--primary)_10%,white)] hover:bg-[color-mix(in_srgb,var(--primary)_10%,white)] focus:text-(--primary) hover:text-(--primary) data-[variant=destructive]:text-red-600 data-[variant=destructive]:focus:bg-red-200
|
|
25
|
+
:class="cn('focus:bg-[color-mix(in_srgb,var(--primary)_10%,white)] hover:bg-[color-mix(in_srgb,var(--primary)_10%,white)] focus:text-(--primary) hover:text-(--primary) data-[variant=destructive]:text-red-600 data-[variant=destructive]:focus:bg-red-200 data-[variant=destructive]:focus:text-red-600 data-[variant=destructive]:*:[svg]:text-red-600! [&_svg:not([class*=\'text-\'])]:text-zinc-300 relative flex cursor-pointer items-center gap-2 rounded-sm p-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class)"
|
|
26
26
|
>
|
|
27
27
|
<slot />
|
|
28
28
|
</DropdownMenuItem>
|
|
@@ -12,7 +12,7 @@ const props = defineProps({
|
|
|
12
12
|
:class="cn(
|
|
13
13
|
'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:text-zinc-600 group-data-[disabled=true]/field:opacity-100',
|
|
14
14
|
'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-4',
|
|
15
|
-
'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary
|
|
15
|
+
'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary',
|
|
16
16
|
props.class
|
|
17
17
|
)"
|
|
18
18
|
>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (args_0: string | undefined) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { icons } from "@iconify-json/fluent";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { useVirtualizer } from "@tanstack/vue-virtual";
|
|
5
|
+
import { computed, shallowRef, ref, watch } from "vue";
|
|
6
|
+
import { cn } from "../../../utils/cn";
|
|
7
|
+
import { InputGroup, InputGroupAddon, InputGroupInput } from "../input-group";
|
|
8
|
+
defineOptions({
|
|
9
|
+
inheritAttrs: false
|
|
10
|
+
});
|
|
11
|
+
const ICON_COLUMNS = 6;
|
|
12
|
+
const ICON_ROW_HEIGHT = 60;
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
modelValue: { type: String, required: false },
|
|
15
|
+
placeholder: { type: String, required: false },
|
|
16
|
+
disabled: { type: Boolean, required: false },
|
|
17
|
+
invalid: { type: Boolean, required: false },
|
|
18
|
+
class: { type: null, required: false }
|
|
19
|
+
});
|
|
20
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
21
|
+
const availableIcons = Object.entries(icons.icons).filter(([name]) => name.endsWith("-20-regular")).map(([name, icon]) => ({
|
|
22
|
+
id: `fluent:${name}`,
|
|
23
|
+
icon
|
|
24
|
+
}));
|
|
25
|
+
const availableIconIds = new Set(availableIcons.map((icon) => icon.id));
|
|
26
|
+
const searchQuery = ref("");
|
|
27
|
+
const galleryElement = shallowRef(null);
|
|
28
|
+
const selectedIcon = computed(() => props.modelValue && availableIconIds.has(props.modelValue) ? availableIcons.find((icon) => icon.id === props.modelValue) : void 0);
|
|
29
|
+
const filteredIcons = computed(() => {
|
|
30
|
+
const term = searchQuery.value.trim().toLowerCase();
|
|
31
|
+
if (!term) {
|
|
32
|
+
return availableIcons;
|
|
33
|
+
}
|
|
34
|
+
return availableIcons.filter((icon) => icon.id.includes(term));
|
|
35
|
+
});
|
|
36
|
+
const rowCount = computed(() => Math.ceil(filteredIcons.value.length / ICON_COLUMNS));
|
|
37
|
+
const rowVirtualizer = useVirtualizer(computed(() => ({
|
|
38
|
+
count: rowCount.value,
|
|
39
|
+
getScrollElement: () => galleryElement.value,
|
|
40
|
+
estimateSize: () => ICON_ROW_HEIGHT,
|
|
41
|
+
overscan: 4
|
|
42
|
+
})));
|
|
43
|
+
watch(() => props.modelValue, (value) => {
|
|
44
|
+
if (value && availableIconIds.has(value)) {
|
|
45
|
+
searchQuery.value = "";
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
function iconsForRow(index) {
|
|
49
|
+
const start = index * ICON_COLUMNS;
|
|
50
|
+
return filteredIcons.value.slice(start, start + ICON_COLUMNS);
|
|
51
|
+
}
|
|
52
|
+
function selectIcon(iconId) {
|
|
53
|
+
if (props.disabled) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
searchQuery.value = "";
|
|
57
|
+
emit("update:modelValue", iconId);
|
|
58
|
+
}
|
|
59
|
+
function clearIcon() {
|
|
60
|
+
if (props.disabled) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
searchQuery.value = "";
|
|
64
|
+
emit("update:modelValue", void 0);
|
|
65
|
+
}
|
|
66
|
+
function handleSearchUpdate(value) {
|
|
67
|
+
searchQuery.value = String(value);
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<div
|
|
73
|
+
v-bind="$attrs"
|
|
74
|
+
data-slot="icon-picker"
|
|
75
|
+
:data-disabled="props.disabled ? 'true' : void 0"
|
|
76
|
+
:class="cn(
|
|
77
|
+
'flex min-h-88 flex-col overflow-hidden rounded-xl border bg-white',
|
|
78
|
+
props.invalid ? 'border-red-400' : 'border-zinc-200',
|
|
79
|
+
props.disabled ? 'bg-zinc-50' : void 0,
|
|
80
|
+
props.class
|
|
81
|
+
)"
|
|
82
|
+
>
|
|
83
|
+
<section
|
|
84
|
+
v-if="selectedIcon"
|
|
85
|
+
data-slot="icon-picker-selected"
|
|
86
|
+
class="flex flex-1 flex-col items-center justify-center gap-4 px-6 py-8 text-center"
|
|
87
|
+
>
|
|
88
|
+
<div
|
|
89
|
+
data-slot="icon-picker-hero"
|
|
90
|
+
:data-icon-id="selectedIcon.id"
|
|
91
|
+
class="relative flex size-40 items-center justify-center rounded-3xl border border-zinc-200 bg-zinc-50 text-zinc-700 shadow-xs"
|
|
92
|
+
>
|
|
93
|
+
<button
|
|
94
|
+
type="button"
|
|
95
|
+
data-slot="icon-picker-clear"
|
|
96
|
+
class="absolute right-3 top-3 flex size-8 items-center justify-center rounded-full border border-zinc-200 bg-white text-zinc-500 transition-colors hover:border-red-200 hover:bg-red-50 hover:text-red-600 disabled:pointer-events-none disabled:opacity-60"
|
|
97
|
+
:disabled="props.disabled"
|
|
98
|
+
@click="clearIcon"
|
|
99
|
+
>
|
|
100
|
+
<Icon icon="fluent:dismiss-20-regular" />
|
|
101
|
+
</button>
|
|
102
|
+
<Icon
|
|
103
|
+
:icon="selectedIcon.icon"
|
|
104
|
+
class="size-16"
|
|
105
|
+
/>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<p
|
|
109
|
+
data-slot="icon-picker-name"
|
|
110
|
+
class="font-mono text-sm text-zinc-500"
|
|
111
|
+
>
|
|
112
|
+
{{ selectedIcon.id }}
|
|
113
|
+
</p>
|
|
114
|
+
</section>
|
|
115
|
+
|
|
116
|
+
<template v-else>
|
|
117
|
+
<div
|
|
118
|
+
data-slot="icon-picker-search"
|
|
119
|
+
class="border-b border-zinc-200 p-4"
|
|
120
|
+
>
|
|
121
|
+
<InputGroup class="overflow-hidden">
|
|
122
|
+
<InputGroupAddon>
|
|
123
|
+
<Icon icon="fluent:search-20-regular" />
|
|
124
|
+
</InputGroupAddon>
|
|
125
|
+
<InputGroupInput
|
|
126
|
+
:model-value="searchQuery"
|
|
127
|
+
:placeholder="props.placeholder ?? 'Search icons'"
|
|
128
|
+
:disabled="props.disabled"
|
|
129
|
+
@update:model-value="handleSearchUpdate"
|
|
130
|
+
/>
|
|
131
|
+
</InputGroup>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div
|
|
135
|
+
v-if="filteredIcons.length > 0"
|
|
136
|
+
ref="galleryElement"
|
|
137
|
+
data-slot="icon-picker-gallery"
|
|
138
|
+
class="h-80 overflow-auto px-4 py-4"
|
|
139
|
+
>
|
|
140
|
+
<div
|
|
141
|
+
class="relative w-full"
|
|
142
|
+
:style="{ height: `${rowVirtualizer.getTotalSize()}px` }"
|
|
143
|
+
>
|
|
144
|
+
<div
|
|
145
|
+
v-for="row in rowVirtualizer.getVirtualItems()"
|
|
146
|
+
:key="String(row.key)"
|
|
147
|
+
class="absolute left-0 top-0 grid w-full grid-cols-6 gap-2"
|
|
148
|
+
:style="{
|
|
149
|
+
height: `${row.size}px`,
|
|
150
|
+
transform: `translateY(${row.start}px)`
|
|
151
|
+
}"
|
|
152
|
+
>
|
|
153
|
+
<button
|
|
154
|
+
v-for="item in iconsForRow(row.index)"
|
|
155
|
+
:key="item.id"
|
|
156
|
+
type="button"
|
|
157
|
+
data-slot="icon-picker-item"
|
|
158
|
+
:data-icon-id="item.id"
|
|
159
|
+
class="flex h-12 items-center justify-center rounded-lg border border-transparent bg-zinc-50 text-zinc-600 transition-colors hover:border-zinc-200 hover:bg-zinc-100 hover:text-zinc-800 disabled:pointer-events-none disabled:opacity-60"
|
|
160
|
+
:disabled="props.disabled"
|
|
161
|
+
@click="selectIcon(item.id)"
|
|
162
|
+
>
|
|
163
|
+
<Icon :icon="item.icon" />
|
|
164
|
+
</button>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<div
|
|
170
|
+
v-else
|
|
171
|
+
data-slot="icon-picker-empty"
|
|
172
|
+
class="flex h-80 items-center justify-center px-6 text-center text-sm text-zinc-400"
|
|
173
|
+
>
|
|
174
|
+
No icons match your search.
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
</div>
|
|
178
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
class?: HTMLAttributes['class'];
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (args_0: string | undefined) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((args_0: string | undefined) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IconPicker } from './IconPicker.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IconPicker } from "./IconPicker.vue";
|
|
@@ -20,7 +20,7 @@ function handleBlur(event) {
|
|
|
20
20
|
:data-value="!!filterState.search"
|
|
21
21
|
:aria-invalid="props.invalid ? 'true' : void 0"
|
|
22
22
|
:class="cn(
|
|
23
|
-
'flex-1 px-2 rounded-none border-none bg-transparent shadow-none
|
|
23
|
+
'flex-1 px-2 rounded-none border-none bg-transparent shadow-none peer outline-none disabled:cursor-not-allowed disabled:text-zinc-600 disabled:opacity-100'
|
|
24
24
|
)"
|
|
25
25
|
@blur="handleBlur"
|
|
26
26
|
/>
|
|
@@ -13,7 +13,7 @@ const props = defineProps({
|
|
|
13
13
|
data-slot="input-group-control"
|
|
14
14
|
:treat-empty-as-different-state-from-null="treatEmptyAsDifferentStateFromNull"
|
|
15
15
|
:class="cn(
|
|
16
|
-
'flex-1 rounded-none border-0 bg-transparent shadow-none
|
|
16
|
+
'flex-1 rounded-none border-0 bg-transparent shadow-none peer disabled:text-zinc-600 disabled:opacity-100',
|
|
17
17
|
props.class
|
|
18
18
|
)"
|
|
19
19
|
/>
|
|
@@ -43,7 +43,7 @@ const delegatedProps = reactiveOmit(props, "class", "invalid");
|
|
|
43
43
|
:data-value="typeof delegatedProps.modelValue === 'number'"
|
|
44
44
|
:aria-invalid="props.invalid ? 'true' : void 0"
|
|
45
45
|
:class="cn(
|
|
46
|
-
'flex-1 px-2 py-1 rounded-none w-full text-sm text-zinc-700 border-0 bg-transparent shadow-none
|
|
46
|
+
'flex-1 px-2 py-1 rounded-none w-full text-sm text-zinc-700 border-0 bg-transparent shadow-none outline-none peer disabled:cursor-not-allowed disabled:text-zinc-600 disabled:opacity-100'
|
|
47
47
|
)"
|
|
48
48
|
@blur="emits('blur', $event)"
|
|
49
49
|
/>
|
|
@@ -10,7 +10,7 @@ const props = defineProps({
|
|
|
10
10
|
<Textarea
|
|
11
11
|
data-slot="input-group-control"
|
|
12
12
|
:class="cn(
|
|
13
|
-
'flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none
|
|
13
|
+
'flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none',
|
|
14
14
|
props.class
|
|
15
15
|
)"
|
|
16
16
|
/>
|
|
@@ -9,9 +9,9 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_1) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
"update:modelValue": () => any;
|
|
12
|
+
"update:modelValue": (args_0: AcceptableValue) => any;
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
-
"onUpdate:modelValue"?: (() => any) | undefined;
|
|
14
|
+
"onUpdate:modelValue"?: ((args_0: AcceptableValue) => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -27,7 +27,7 @@ const delegatedProps = reactiveOmit(props, "class");
|
|
|
27
27
|
v-model="modelValue"
|
|
28
28
|
data-slot="native-select"
|
|
29
29
|
:class="cn(
|
|
30
|
-
'border-zinc-200 placeholder:text-zinc-400 selection:bg-primary selection:text-primary-foreground
|
|
30
|
+
'border-zinc-200 placeholder:text-zinc-400 selection:bg-primary selection:text-primary-foreground h-9 w-full min-w-0 appearance-none rounded-md border bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed',
|
|
31
31
|
'focus-visible:border-(--primary)',
|
|
32
32
|
'aria-invalid:border-red-400',
|
|
33
33
|
props.class
|
|
@@ -9,9 +9,9 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
default?: (props: typeof __VLS_1) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
"update:modelValue": () => any;
|
|
12
|
+
"update:modelValue": (args_0: AcceptableValue) => any;
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
-
"onUpdate:modelValue"?: (() => any) | undefined;
|
|
14
|
+
"onUpdate:modelValue"?: ((args_0: AcceptableValue) => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -29,13 +29,13 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
29
29
|
data-slot="switch"
|
|
30
30
|
v-bind="forwarded"
|
|
31
31
|
:class="cn(
|
|
32
|
-
'peer data-[state=checked]:bg-(--primary) data-[state=unchecked]:bg-zinc-200 focus-visible:border-(--primary)
|
|
32
|
+
'peer data-[state=checked]:bg-(--primary) data-[state=unchecked]:bg-zinc-200 focus-visible:border-(--primary) inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
33
33
|
props.class
|
|
34
34
|
)"
|
|
35
35
|
>
|
|
36
36
|
<SwitchThumb
|
|
37
37
|
data-slot="switch-thumb"
|
|
38
|
-
:class="cn('bg-zinc-50
|
|
38
|
+
:class="cn('bg-zinc-50 pointer-events-none block size-4 rounded-full transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0')"
|
|
39
39
|
>
|
|
40
40
|
<slot
|
|
41
41
|
name="thumb"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CellContext
|
|
1
|
+
import { type CellContext } from '@tanstack/vue-table';
|
|
2
2
|
import { Effect } from 'effect';
|
|
3
3
|
import { type TableConfig } from './schema.js';
|
|
4
4
|
export type { Accessor, Column, Expression, Markdown, Render, TableConfig } from './schema.js';
|
|
@@ -37,9 +37,42 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
37
37
|
grow?: boolean;
|
|
38
38
|
}>[];
|
|
39
39
|
cellStyles?: import("./schema.js").Expression;
|
|
40
|
-
props?:
|
|
40
|
+
props?: Readonly<{
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
initialState?: Readonly<{
|
|
43
|
+
columnVisibility?: Record<string, boolean>;
|
|
44
|
+
columnOrder?: ReadonlyArray<string>;
|
|
45
|
+
columnPinning?: Readonly<{
|
|
46
|
+
left?: ReadonlyArray<string>;
|
|
47
|
+
right?: ReadonlyArray<string>;
|
|
48
|
+
}>;
|
|
49
|
+
rowPinning?: Readonly<{
|
|
50
|
+
top?: ReadonlyArray<string>;
|
|
51
|
+
bottom?: ReadonlyArray<string>;
|
|
52
|
+
}>;
|
|
53
|
+
columnFilters?: ReadonlyArray<Readonly<{
|
|
54
|
+
id: string;
|
|
55
|
+
value: unknown;
|
|
56
|
+
}>>;
|
|
57
|
+
globalFilter?: unknown;
|
|
58
|
+
sorting?: ReadonlyArray<Readonly<{
|
|
59
|
+
id: string;
|
|
60
|
+
desc: boolean;
|
|
61
|
+
}>>;
|
|
62
|
+
expanded?: boolean | Record<string, boolean>;
|
|
63
|
+
grouping?: ReadonlyArray<string>;
|
|
64
|
+
columnSizing?: Record<string, number>;
|
|
65
|
+
columnSizingInfo?: Record<string, unknown>;
|
|
66
|
+
pagination?: Readonly<{
|
|
67
|
+
pageIndex?: number;
|
|
68
|
+
pageSize?: number;
|
|
69
|
+
}>;
|
|
70
|
+
rowSelection?: Record<string, boolean>;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
41
73
|
paginationLeft?: import("./schema.js").Markdown;
|
|
42
74
|
paginationRight?: import("./schema.js").Markdown;
|
|
75
|
+
paginationPageSizes?: ReadonlyArray<number>;
|
|
43
76
|
}>) => any;
|
|
44
77
|
}, string, import("vue").PublicProps, Readonly<{
|
|
45
78
|
config: Effect.Effect<TableConfig>;
|
|
@@ -65,9 +98,42 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
65
98
|
grow?: boolean;
|
|
66
99
|
}>[];
|
|
67
100
|
cellStyles?: import("./schema.js").Expression;
|
|
68
|
-
props?:
|
|
101
|
+
props?: Readonly<{
|
|
102
|
+
[key: string]: unknown;
|
|
103
|
+
initialState?: Readonly<{
|
|
104
|
+
columnVisibility?: Record<string, boolean>;
|
|
105
|
+
columnOrder?: ReadonlyArray<string>;
|
|
106
|
+
columnPinning?: Readonly<{
|
|
107
|
+
left?: ReadonlyArray<string>;
|
|
108
|
+
right?: ReadonlyArray<string>;
|
|
109
|
+
}>;
|
|
110
|
+
rowPinning?: Readonly<{
|
|
111
|
+
top?: ReadonlyArray<string>;
|
|
112
|
+
bottom?: ReadonlyArray<string>;
|
|
113
|
+
}>;
|
|
114
|
+
columnFilters?: ReadonlyArray<Readonly<{
|
|
115
|
+
id: string;
|
|
116
|
+
value: unknown;
|
|
117
|
+
}>>;
|
|
118
|
+
globalFilter?: unknown;
|
|
119
|
+
sorting?: ReadonlyArray<Readonly<{
|
|
120
|
+
id: string;
|
|
121
|
+
desc: boolean;
|
|
122
|
+
}>>;
|
|
123
|
+
expanded?: boolean | Record<string, boolean>;
|
|
124
|
+
grouping?: ReadonlyArray<string>;
|
|
125
|
+
columnSizing?: Record<string, number>;
|
|
126
|
+
columnSizingInfo?: Record<string, unknown>;
|
|
127
|
+
pagination?: Readonly<{
|
|
128
|
+
pageIndex?: number;
|
|
129
|
+
pageSize?: number;
|
|
130
|
+
}>;
|
|
131
|
+
rowSelection?: Record<string, boolean>;
|
|
132
|
+
}>;
|
|
133
|
+
}>;
|
|
69
134
|
paginationLeft?: import("./schema.js").Markdown;
|
|
70
135
|
paginationRight?: import("./schema.js").Markdown;
|
|
136
|
+
paginationPageSizes?: ReadonlyArray<number>;
|
|
71
137
|
}>) => any) | undefined;
|
|
72
138
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
73
139
|
[key: string]: (props: Readonly<{
|