@shwfed/nuxt 0.7.8 → 0.7.10
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/app.d.vue.ts +7 -58
- package/dist/runtime/components/app.vue +18 -411
- package/dist/runtime/components/app.vue.d.ts +7 -58
- package/dist/runtime/components/fields.d.vue.ts +177 -0
- package/dist/runtime/components/fields.vue +47 -0
- package/dist/runtime/components/fields.vue.d.ts +177 -0
- package/dist/runtime/components/table.d.vue.ts +63 -59
- package/dist/runtime/components/table.vue +52 -617
- package/dist/runtime/components/table.vue.d.ts +63 -59
- package/dist/runtime/components/ui/app/App.d.vue.ts +86 -0
- package/dist/runtime/components/ui/app/App.vue +414 -0
- package/dist/runtime/components/ui/app/App.vue.d.ts +86 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.vue +1 -1
- package/dist/runtime/components/ui/button-group/ButtonGroupText.vue +1 -1
- package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +5 -12
- package/dist/runtime/components/ui/calendar/Calendar.vue +77 -92
- package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +5 -12
- package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +1 -1
- package/dist/runtime/components/ui/calendar/index.d.ts +1 -1
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +6 -2
- package/dist/runtime/components/ui/command/CommandGroup.vue +4 -0
- package/dist/runtime/components/ui/dialog/DialogOverlay.vue +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -1
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.d.vue.ts +30 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue +87 -0
- package/dist/runtime/components/ui/expression-editor/ExpressionEditor.vue.d.ts +30 -0
- package/dist/runtime/components/ui/expression-editor/index.d.ts +1 -0
- package/dist/runtime/components/ui/expression-editor/index.js +1 -0
- package/dist/runtime/components/ui/field/FieldContent.vue +1 -1
- package/dist/runtime/components/ui/field/FieldDescription.vue +1 -1
- package/dist/runtime/components/ui/field/FieldError.vue +2 -2
- package/dist/runtime/components/ui/field/FieldLabel.vue +1 -1
- package/dist/runtime/components/ui/field/FieldSeparator.vue +1 -1
- package/dist/runtime/components/ui/field/index.js +7 -5
- package/dist/runtime/components/ui/fields/Fields.d.vue.ts +376 -0
- package/dist/runtime/components/ui/fields/Fields.vue +441 -0
- package/dist/runtime/components/ui/fields/Fields.vue.d.ts +376 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.d.vue.ts +163 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue +363 -0
- package/dist/runtime/components/ui/fields-configurator/FieldsConfiguratorDialog.vue.d.ts +163 -0
- package/dist/runtime/components/ui/input/Input.d.vue.ts +1 -0
- package/dist/runtime/components/ui/input/Input.vue +3 -1
- package/dist/runtime/components/ui/input/Input.vue.d.ts +1 -0
- package/dist/runtime/components/ui/input-group/InputGroup.vue +3 -0
- package/dist/runtime/components/ui/input-group/InputGroupAddon.vue +4 -1
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.d.vue.ts +11 -3
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue +16 -5
- package/dist/runtime/components/ui/input-group/InputGroupCombobox.vue.d.ts +11 -3
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.d.vue.ts +8 -1
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue +12 -1
- package/dist/runtime/components/ui/input-group/InputGroupComboboxInput.vue.d.ts +8 -1
- package/dist/runtime/components/ui/input-group/InputGroupInput.vue +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.d.vue.ts +5 -2
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue +10 -4
- package/dist/runtime/components/ui/input-group/InputGroupNumberField.vue.d.ts +5 -2
- package/dist/runtime/components/ui/input-group/InputGroupText.vue +1 -1
- package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue +1 -1
- package/dist/runtime/components/ui/input-group/index.js +2 -2
- package/dist/runtime/components/ui/label/Label.vue +1 -1
- package/dist/runtime/components/ui/locale/Locale.d.vue.ts +20 -0
- package/dist/runtime/components/ui/locale/Locale.vue +291 -0
- package/dist/runtime/components/ui/locale/Locale.vue.d.ts +20 -0
- package/dist/runtime/components/ui/locale/index.d.ts +1 -0
- package/dist/runtime/components/ui/locale/index.js +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelect.vue +3 -3
- package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +1 -0
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue +4 -1
- package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +1 -0
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuLink.vue +1 -1
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuViewport.vue +1 -1
- package/dist/runtime/components/ui/number-field/NumberFieldInput.vue +1 -1
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.vue +1 -1
- package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue +1 -1
- package/dist/runtime/components/ui/sheet/SheetOverlay.vue +1 -1
- package/dist/runtime/components/ui/switch/Switch.d.vue.ts +24 -0
- package/dist/runtime/components/ui/switch/Switch.vue +46 -0
- package/dist/runtime/components/ui/switch/Switch.vue.d.ts +24 -0
- package/dist/runtime/components/ui/switch/index.d.ts +1 -0
- package/dist/runtime/components/ui/switch/index.js +1 -0
- package/dist/runtime/components/ui/table/Table.d.vue.ts +81 -0
- package/dist/runtime/components/ui/table/Table.vue +792 -0
- package/dist/runtime/components/ui/table/Table.vue.d.ts +81 -0
- package/dist/runtime/components/ui/table/schema.d.ts +48 -0
- package/dist/runtime/components/ui/table/schema.js +126 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.d.vue.ts +62 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue +2233 -0
- package/dist/runtime/components/ui/table-configurator/TableConfiguratorDialog.vue.d.ts +62 -0
- package/dist/runtime/components/ui/table-configurator/menu.d.ts +37 -0
- package/dist/runtime/components/ui/table-configurator/menu.js +227 -0
- package/dist/runtime/components/ui/tabs/Tabs.d.vue.ts +24 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue +30 -0
- package/dist/runtime/components/ui/tabs/Tabs.vue.d.ts +24 -0
- package/dist/runtime/components/ui/tabs/TabsContent.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue +23 -0
- package/dist/runtime/components/ui/tabs/TabsContent.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsList.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue +25 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.d.vue.ts +18 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue +27 -0
- package/dist/runtime/components/ui/tabs/TabsTrigger.vue.d.ts +18 -0
- package/dist/runtime/components/ui/tabs/index.d.ts +4 -0
- package/dist/runtime/components/ui/tabs/index.js +4 -0
- package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +1 -0
- package/dist/runtime/components/ui/textarea/Textarea.vue +4 -2
- package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +1 -0
- package/dist/runtime/components/ui/toggle/Toggle.d.vue.ts +34 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue +32 -0
- package/dist/runtime/components/ui/toggle/Toggle.vue.d.ts +34 -0
- package/dist/runtime/components/ui/toggle/index.d.ts +7 -0
- package/dist/runtime/components/ui/toggle/index.js +22 -0
- package/dist/runtime/composables/useTableRenderers.d.ts +2 -1
- package/dist/runtime/composables/useTableRenderers.js +2 -1
- package/dist/runtime/plugins/cel/env.d.ts +2 -2
- package/dist/runtime/plugins/cel/env.js +5 -4
- package/dist/runtime/plugins/cel/index.d.ts +3 -3
- package/dist/runtime/plugins/cel/index.js +7 -3
- package/dist/runtime/plugins/markdown/index.d.ts +1 -1
- package/dist/runtime/style.css +1 -1
- package/dist/runtime/table-renderers/builtins.js +213 -98
- package/dist/runtime/table-renderers/registry.d.ts +1 -0
- package/dist/runtime/table-renderers/registry.js +3 -0
- package/dist/runtime/utils/coders.d.ts +32 -0
- package/dist/runtime/utils/coders.js +64 -0
- package/dist/runtime/vendor/cel/index.d.ts +17 -0
- package/dist/runtime/vendor/cel/index.js +10 -0
- package/dist/runtime/vendor/cel-js/LICENSE +21 -0
- package/dist/runtime/vendor/cel-js/UPSTREAM.md +17 -0
- package/dist/runtime/vendor/cel-js/lib/errors.d.ts +21 -0
- package/dist/runtime/vendor/cel-js/lib/errors.js +97 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.d.ts +4 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.js +192 -0
- package/dist/runtime/vendor/cel-js/lib/functions.d.ts +53 -0
- package/dist/runtime/vendor/cel-js/lib/functions.js +513 -0
- package/dist/runtime/vendor/cel-js/lib/globals.d.ts +27 -0
- package/dist/runtime/vendor/cel-js/lib/globals.js +33 -0
- package/dist/runtime/vendor/cel-js/lib/index.d.ts +469 -0
- package/dist/runtime/vendor/cel-js/lib/index.js +18 -0
- package/dist/runtime/vendor/cel-js/lib/macros.d.ts +1 -0
- package/dist/runtime/vendor/cel-js/lib/macros.js +230 -0
- package/dist/runtime/vendor/cel-js/lib/operators.d.ts +117 -0
- package/dist/runtime/vendor/cel-js/lib/operators.js +739 -0
- package/dist/runtime/vendor/cel-js/lib/optional.d.ts +14 -0
- package/dist/runtime/vendor/cel-js/lib/optional.js +161 -0
- package/dist/runtime/vendor/cel-js/lib/options.d.ts +23 -0
- package/dist/runtime/vendor/cel-js/lib/options.js +47 -0
- package/dist/runtime/vendor/cel-js/lib/overloads.d.ts +1 -0
- package/dist/runtime/vendor/cel-js/lib/overloads.js +214 -0
- package/dist/runtime/vendor/cel-js/lib/parser.d.ts +56 -0
- package/dist/runtime/vendor/cel-js/lib/parser.js +827 -0
- package/dist/runtime/vendor/cel-js/lib/registry.d.ts +279 -0
- package/dist/runtime/vendor/cel-js/lib/registry.js +1596 -0
- package/dist/runtime/vendor/cel-js/lib/serialize.d.ts +1 -0
- package/dist/runtime/vendor/cel-js/lib/serialize.js +259 -0
- package/dist/runtime/vendor/cel-js/lib/type-checker.d.ts +26 -0
- package/dist/runtime/vendor/cel-js/lib/type-checker.js +81 -0
- package/package.json +9 -4
- package/dist/runtime/components/locale.d.vue.ts +0 -14
- package/dist/runtime/components/locale.vue +0 -89
- package/dist/runtime/components/locale.vue.d.ts +0 -14
- package/dist/runtime/components/query.d.vue.ts +0 -30
- package/dist/runtime/components/query.vue +0 -266
- package/dist/runtime/components/query.vue.d.ts +0 -30
- package/dist/runtime/utilities/query-config/global.d.ts +0 -4
- package/dist/runtime/utilities/query-config/global.js +0 -18
- package/dist/runtime/utilities/query-config/index.d.ts +0 -3
- package/dist/runtime/utilities/query-config/index.js +0 -14
- package/dist/runtime/utilities/query-config/schema.d.ts +0 -96
- package/dist/runtime/utilities/query-config/schema.js +0 -51
- /package/dist/runtime/components/{logo.d.vue.ts → ui/logo/Logo.d.vue.ts} +0 -0
- /package/dist/runtime/components/{logo.vue → ui/logo/Logo.vue} +0 -0
- /package/dist/runtime/components/{logo.vue.d.ts → ui/logo/Logo.vue.d.ts} +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
invalid?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
blur: (...args: any[]) => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
9
|
declare const _default: typeof __VLS_export;
|
|
3
10
|
export default _default;
|
|
@@ -2,15 +2,26 @@
|
|
|
2
2
|
import { cn } from "../../../utils/cn";
|
|
3
3
|
import { ListboxFilter } from "reka-ui";
|
|
4
4
|
import { useCommand } from "../command";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
invalid: { type: Boolean, required: false }
|
|
7
|
+
});
|
|
8
|
+
const emits = defineEmits(["blur"]);
|
|
5
9
|
const { filterState } = useCommand();
|
|
10
|
+
function handleBlur(event) {
|
|
11
|
+
filterState.search = "";
|
|
12
|
+
emits("blur", event);
|
|
13
|
+
}
|
|
6
14
|
</script>
|
|
7
15
|
|
|
8
16
|
<template>
|
|
9
17
|
<ListboxFilter
|
|
10
18
|
v-model="filterState.search"
|
|
19
|
+
data-slot="input-group-control"
|
|
11
20
|
:data-value="!!filterState.search"
|
|
21
|
+
:aria-invalid="props.invalid ? 'true' : void 0"
|
|
12
22
|
:class="cn(
|
|
13
|
-
'flex-1 px-2 rounded-none border-none bg-transparent shadow-none dark:bg-transparent peer outline-none'
|
|
23
|
+
'flex-1 px-2 rounded-none border-none bg-transparent shadow-none dark:bg-transparent peer outline-none disabled:cursor-not-allowed disabled:text-zinc-600 disabled:opacity-100'
|
|
14
24
|
)"
|
|
25
|
+
@blur="handleBlur"
|
|
15
26
|
/>
|
|
16
27
|
</template>
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
invalid?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
blur: (...args: any[]) => void;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2
9
|
declare const _default: typeof __VLS_export;
|
|
3
10
|
export default _default;
|
|
@@ -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 dark:bg-transparent peer',
|
|
16
|
+
'flex-1 rounded-none border-0 bg-transparent shadow-none dark:bg-transparent peer disabled:text-zinc-600 disabled:opacity-100',
|
|
17
17
|
props.class
|
|
18
18
|
)"
|
|
19
19
|
/>
|
|
@@ -2,11 +2,14 @@ import type { NumberFieldRootProps } from 'reka-ui';
|
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
3
|
type __VLS_Props = NumberFieldRootProps & {
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
|
+
invalid?: boolean;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (
|
|
8
|
+
"update:modelValue": (...args: any[]) => void;
|
|
9
|
+
blur: (...args: any[]) => void;
|
|
8
10
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
"onUpdate:modelValue"?: ((
|
|
11
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
10
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -22,10 +22,14 @@ const props = defineProps({
|
|
|
22
22
|
as: { type: null, required: false },
|
|
23
23
|
name: { type: String, required: false },
|
|
24
24
|
required: { type: Boolean, required: false },
|
|
25
|
-
class: { type: null, required: false }
|
|
25
|
+
class: { type: null, required: false },
|
|
26
|
+
invalid: { type: Boolean, required: false }
|
|
26
27
|
});
|
|
27
|
-
const emits = defineEmits([
|
|
28
|
-
|
|
28
|
+
const emits = defineEmits([
|
|
29
|
+
"update:modelValue",
|
|
30
|
+
"blur"
|
|
31
|
+
]);
|
|
32
|
+
const delegatedProps = reactiveOmit(props, "class", "invalid");
|
|
29
33
|
</script>
|
|
30
34
|
|
|
31
35
|
<template>
|
|
@@ -37,9 +41,11 @@ const delegatedProps = reactiveOmit(props, "class");
|
|
|
37
41
|
<NumberFieldInput
|
|
38
42
|
data-slot="input-group-control"
|
|
39
43
|
:data-value="typeof delegatedProps.modelValue === 'number'"
|
|
44
|
+
:aria-invalid="props.invalid ? 'true' : void 0"
|
|
40
45
|
:class="cn(
|
|
41
|
-
'flex-1 px-2 py-1 rounded-none w-full text-sm text-
|
|
46
|
+
'flex-1 px-2 py-1 rounded-none w-full text-sm text-zinc-700 border-0 bg-transparent shadow-none dark:bg-transparent outline-none peer disabled:cursor-not-allowed disabled:text-zinc-600 disabled:opacity-100'
|
|
42
47
|
)"
|
|
48
|
+
@blur="emits('blur', $event)"
|
|
43
49
|
/>
|
|
44
50
|
</NumberField>
|
|
45
51
|
</template>
|
|
@@ -2,11 +2,14 @@ import type { NumberFieldRootProps } from 'reka-ui';
|
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
3
|
type __VLS_Props = NumberFieldRootProps & {
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
|
+
invalid?: boolean;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
"update:modelValue": (
|
|
8
|
+
"update:modelValue": (...args: any[]) => void;
|
|
9
|
+
blur: (...args: any[]) => void;
|
|
8
10
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
"onUpdate:modelValue"?: ((
|
|
11
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
12
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
10
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
14
|
declare const _default: typeof __VLS_export;
|
|
12
15
|
export default _default;
|
|
@@ -8,7 +8,7 @@ const props = defineProps({
|
|
|
8
8
|
<template>
|
|
9
9
|
<span
|
|
10
10
|
:class="cn(
|
|
11
|
-
'text-
|
|
11
|
+
'text-zinc-400 flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*=\'size-\'])]:size-4',
|
|
12
12
|
props.class
|
|
13
13
|
)"
|
|
14
14
|
>
|
|
@@ -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 dark:bg-transparent',
|
|
14
14
|
props.class
|
|
15
15
|
)"
|
|
16
16
|
/>
|
|
@@ -9,7 +9,7 @@ export { default as InputGroupTextarea } from "./InputGroupTextarea.vue";
|
|
|
9
9
|
export { default as InputGroupCombobox } from "./InputGroupCombobox.vue";
|
|
10
10
|
export { default as InputGroupNumberField } from "./InputGroupNumberField.vue";
|
|
11
11
|
export const inputGroupAddonVariants = cva(
|
|
12
|
-
"text-
|
|
12
|
+
"text-zinc-500 flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:text-zinc-400",
|
|
13
13
|
{
|
|
14
14
|
variants: {
|
|
15
15
|
align: {
|
|
@@ -31,7 +31,7 @@ export const inputGroupButtonVariants = cva(
|
|
|
31
31
|
size: {
|
|
32
32
|
"xs": "h-6 gap-1 px-2 rounded-sm [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
33
33
|
"sm": "h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5",
|
|
34
|
-
"icon-xs": "size-6 rounded-
|
|
34
|
+
"icon-xs": "size-6 rounded-xs p-0 has-[>svg]:p-0",
|
|
35
35
|
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
@@ -17,7 +17,7 @@ const delegatedProps = reactiveOmit(props, "class");
|
|
|
17
17
|
v-bind="delegatedProps"
|
|
18
18
|
:class="
|
|
19
19
|
cn(
|
|
20
|
-
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
|
20
|
+
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed text-zinc-700 peer-disabled:opacity-50',
|
|
21
21
|
props.class
|
|
22
22
|
)
|
|
23
23
|
"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { type LocaleValue } from '../../../utils/coders.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue?: LocaleValue;
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
multiline?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (args_0: readonly {
|
|
10
|
+
locale: "zh" | "ja" | "en" | "ko";
|
|
11
|
+
message: string;
|
|
12
|
+
}[]) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((args_0: readonly {
|
|
15
|
+
locale: "zh" | "ja" | "en" | "ko";
|
|
16
|
+
message: string;
|
|
17
|
+
}[]) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from "@vueuse/core";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import { useI18n } from "vue-i18n";
|
|
6
|
+
import { cn } from "../../../utils/cn";
|
|
7
|
+
import { supportedLocales } from "../../../utils/coders";
|
|
8
|
+
import { Button } from "../button";
|
|
9
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../dropdown-menu";
|
|
10
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupTextarea } from "../input-group";
|
|
11
|
+
defineOptions({
|
|
12
|
+
inheritAttrs: false
|
|
13
|
+
});
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
modelValue: { type: null, required: false },
|
|
16
|
+
class: { type: null, required: false },
|
|
17
|
+
multiline: { type: Boolean, required: false }
|
|
18
|
+
});
|
|
19
|
+
const emits = defineEmits(["update:modelValue"]);
|
|
20
|
+
const modelValue = useVModel(props, "modelValue", emits, {
|
|
21
|
+
passive: true,
|
|
22
|
+
defaultValue: createDefaultLocaleValue()
|
|
23
|
+
});
|
|
24
|
+
const { t } = useI18n();
|
|
25
|
+
const locales = computed(
|
|
26
|
+
() => [...modelValue.value ?? createDefaultLocaleValue()].sort((left, right) => {
|
|
27
|
+
if (left.locale === "zh") {
|
|
28
|
+
return -1;
|
|
29
|
+
}
|
|
30
|
+
if (right.locale === "zh") {
|
|
31
|
+
return 1;
|
|
32
|
+
}
|
|
33
|
+
return 0;
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
const hasRemainingLocales = computed(() => locales.value.length < supportedLocales.length);
|
|
37
|
+
const localeLabels = {
|
|
38
|
+
zh: "\u4E2D\u6587",
|
|
39
|
+
ja: "\u65E5\u672C\u8A9E",
|
|
40
|
+
en: "English",
|
|
41
|
+
ko: "\uD55C\uAD6D\uC5B4"
|
|
42
|
+
};
|
|
43
|
+
function createDefaultLocaleValue() {
|
|
44
|
+
return [{ locale: "zh", message: "" }];
|
|
45
|
+
}
|
|
46
|
+
function localeIcon(locale) {
|
|
47
|
+
return `circle-flags:lang-${locale}`;
|
|
48
|
+
}
|
|
49
|
+
function localeLabel(locale) {
|
|
50
|
+
return localeLabels[locale];
|
|
51
|
+
}
|
|
52
|
+
function availableLocales(index) {
|
|
53
|
+
const currentLocale = locales.value[index]?.locale;
|
|
54
|
+
return supportedLocales.filter((locale) => locale !== currentLocale && !locales.value.some((item) => item.locale === locale));
|
|
55
|
+
}
|
|
56
|
+
function updateMessage(index, message) {
|
|
57
|
+
modelValue.value = locales.value.map((item, itemIndex) => {
|
|
58
|
+
if (itemIndex !== index) {
|
|
59
|
+
return item;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
locale: item.locale,
|
|
63
|
+
message: String(message)
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function updateLocale(index, locale) {
|
|
68
|
+
const currentItem = locales.value[index];
|
|
69
|
+
if (!currentItem || currentItem.locale === "zh" && locale !== "zh") {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
modelValue.value = locales.value.map((item, itemIndex) => {
|
|
73
|
+
if (itemIndex !== index) {
|
|
74
|
+
return item;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
locale,
|
|
78
|
+
message: item.message
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function removeLocale(index) {
|
|
83
|
+
const currentItem = locales.value[index];
|
|
84
|
+
if (!currentItem || currentItem.locale === "zh") {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
modelValue.value = locales.value.filter((_, itemIndex) => itemIndex !== index);
|
|
88
|
+
}
|
|
89
|
+
function addLocale() {
|
|
90
|
+
const locale = supportedLocales.find((candidate) => !locales.value.some((item) => item.locale === candidate));
|
|
91
|
+
if (!locale) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const nextValue = [...locales.value];
|
|
95
|
+
nextValue.push({
|
|
96
|
+
locale,
|
|
97
|
+
message: ""
|
|
98
|
+
});
|
|
99
|
+
modelValue.value = nextValue;
|
|
100
|
+
}
|
|
101
|
+
function handleMessageUpdate(index, value) {
|
|
102
|
+
updateMessage(index, value);
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<template>
|
|
107
|
+
<div
|
|
108
|
+
v-bind="$attrs"
|
|
109
|
+
data-slot="locale"
|
|
110
|
+
:class="cn('flex flex-col gap-2', props.class)"
|
|
111
|
+
>
|
|
112
|
+
<InputGroup
|
|
113
|
+
v-for="(item, index) in locales"
|
|
114
|
+
:key="item.locale"
|
|
115
|
+
data-slot="locale-row"
|
|
116
|
+
:data-locale="item.locale"
|
|
117
|
+
>
|
|
118
|
+
<InputGroupAddon
|
|
119
|
+
v-if="props.multiline"
|
|
120
|
+
align="block-start"
|
|
121
|
+
class="border-b border-zinc-200"
|
|
122
|
+
>
|
|
123
|
+
<div class="flex w-full items-center justify-between gap-3">
|
|
124
|
+
<DropdownMenu v-if="item.locale !== 'zh' && availableLocales(index).length > 0">
|
|
125
|
+
<DropdownMenuTrigger as-child>
|
|
126
|
+
<InputGroupButton
|
|
127
|
+
size="sm"
|
|
128
|
+
as-child
|
|
129
|
+
>
|
|
130
|
+
<button
|
|
131
|
+
type="button"
|
|
132
|
+
data-slot="locale-trigger"
|
|
133
|
+
class="text-zinc-500 transition-colors hover:text-zinc-700"
|
|
134
|
+
:aria-label="t('select-locale', { locale: localeLabel(item.locale) })"
|
|
135
|
+
>
|
|
136
|
+
<Icon :icon="localeIcon(item.locale)" />
|
|
137
|
+
<span>{{ localeLabel(item.locale) }}</span>
|
|
138
|
+
</button>
|
|
139
|
+
</InputGroupButton>
|
|
140
|
+
</DropdownMenuTrigger>
|
|
141
|
+
<DropdownMenuContent align="start">
|
|
142
|
+
<DropdownMenuItem
|
|
143
|
+
v-for="locale in availableLocales(index)"
|
|
144
|
+
:key="locale"
|
|
145
|
+
data-slot="locale-option"
|
|
146
|
+
:data-locale-option="locale"
|
|
147
|
+
@select="updateLocale(index, locale)"
|
|
148
|
+
>
|
|
149
|
+
<Icon :icon="localeIcon(locale)" />
|
|
150
|
+
<span>{{ localeLabel(locale) }}</span>
|
|
151
|
+
</DropdownMenuItem>
|
|
152
|
+
</DropdownMenuContent>
|
|
153
|
+
</DropdownMenu>
|
|
154
|
+
|
|
155
|
+
<span
|
|
156
|
+
v-else
|
|
157
|
+
data-slot="locale-icon"
|
|
158
|
+
class="flex items-center gap-2 text-zinc-500"
|
|
159
|
+
>
|
|
160
|
+
<Icon :icon="localeIcon(item.locale)" />
|
|
161
|
+
<span>{{ localeLabel(item.locale) }}</span>
|
|
162
|
+
</span>
|
|
163
|
+
|
|
164
|
+
<InputGroupButton
|
|
165
|
+
variant="destructive"
|
|
166
|
+
size="icon-xs"
|
|
167
|
+
as-child
|
|
168
|
+
>
|
|
169
|
+
<button
|
|
170
|
+
type="button"
|
|
171
|
+
data-slot="locale-delete"
|
|
172
|
+
:disabled="item.locale === 'zh'"
|
|
173
|
+
:aria-label="t('delete-locale', { locale: localeLabel(item.locale) })"
|
|
174
|
+
@click="removeLocale(index)"
|
|
175
|
+
>
|
|
176
|
+
<Icon icon="fluent:delete-20-regular" />
|
|
177
|
+
</button>
|
|
178
|
+
</InputGroupButton>
|
|
179
|
+
</div>
|
|
180
|
+
</InputGroupAddon>
|
|
181
|
+
|
|
182
|
+
<InputGroupAddon v-else>
|
|
183
|
+
<DropdownMenu v-if="item.locale !== 'zh' && availableLocales(index).length > 0">
|
|
184
|
+
<DropdownMenuTrigger as-child>
|
|
185
|
+
<InputGroupButton
|
|
186
|
+
size="icon-sm"
|
|
187
|
+
as-child
|
|
188
|
+
>
|
|
189
|
+
<button
|
|
190
|
+
type="button"
|
|
191
|
+
data-slot="locale-trigger"
|
|
192
|
+
class="text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5"
|
|
193
|
+
:aria-label="t('select-locale', { locale: localeLabel(item.locale) })"
|
|
194
|
+
>
|
|
195
|
+
<Icon :icon="localeIcon(item.locale)" />
|
|
196
|
+
</button>
|
|
197
|
+
</InputGroupButton>
|
|
198
|
+
</DropdownMenuTrigger>
|
|
199
|
+
<DropdownMenuContent align="start">
|
|
200
|
+
<DropdownMenuItem
|
|
201
|
+
v-for="locale in availableLocales(index)"
|
|
202
|
+
:key="locale"
|
|
203
|
+
data-slot="locale-option"
|
|
204
|
+
:data-locale-option="locale"
|
|
205
|
+
@select="updateLocale(index, locale)"
|
|
206
|
+
>
|
|
207
|
+
<Icon :icon="localeIcon(locale)" />
|
|
208
|
+
<span>{{ localeLabel(locale) }}</span>
|
|
209
|
+
</DropdownMenuItem>
|
|
210
|
+
</DropdownMenuContent>
|
|
211
|
+
</DropdownMenu>
|
|
212
|
+
<span
|
|
213
|
+
v-else
|
|
214
|
+
data-slot="locale-icon"
|
|
215
|
+
class="-ml-[0.45rem] flex size-8 items-center justify-center text-zinc-500"
|
|
216
|
+
>
|
|
217
|
+
<Icon :icon="localeIcon(item.locale)" />
|
|
218
|
+
</span>
|
|
219
|
+
</InputGroupAddon>
|
|
220
|
+
|
|
221
|
+
<InputGroupInput
|
|
222
|
+
v-if="!props.multiline"
|
|
223
|
+
data-slot="locale-input"
|
|
224
|
+
:model-value="item.message"
|
|
225
|
+
:placeholder="localeLabel(item.locale)"
|
|
226
|
+
@update:model-value="handleMessageUpdate(index, $event)"
|
|
227
|
+
/>
|
|
228
|
+
|
|
229
|
+
<InputGroupTextarea
|
|
230
|
+
v-else
|
|
231
|
+
data-slot="locale-textarea"
|
|
232
|
+
class="min-h-32"
|
|
233
|
+
:model-value="item.message"
|
|
234
|
+
:placeholder="localeLabel(item.locale)"
|
|
235
|
+
@update:model-value="handleMessageUpdate(index, $event)"
|
|
236
|
+
/>
|
|
237
|
+
|
|
238
|
+
<InputGroupAddon
|
|
239
|
+
v-if="!props.multiline"
|
|
240
|
+
align="inline-end"
|
|
241
|
+
>
|
|
242
|
+
<InputGroupButton
|
|
243
|
+
variant="destructive"
|
|
244
|
+
size="icon-xs"
|
|
245
|
+
as-child
|
|
246
|
+
>
|
|
247
|
+
<button
|
|
248
|
+
type="button"
|
|
249
|
+
data-slot="locale-delete"
|
|
250
|
+
:disabled="item.locale === 'zh'"
|
|
251
|
+
:aria-label="t('delete-locale', { locale: localeLabel(item.locale) })"
|
|
252
|
+
@click="removeLocale(index)"
|
|
253
|
+
>
|
|
254
|
+
<Icon icon="fluent:delete-20-regular" />
|
|
255
|
+
</button>
|
|
256
|
+
</InputGroupButton>
|
|
257
|
+
</InputGroupAddon>
|
|
258
|
+
</InputGroup>
|
|
259
|
+
|
|
260
|
+
<Button
|
|
261
|
+
type="button"
|
|
262
|
+
data-slot="locale-add"
|
|
263
|
+
class="w-full justify-center"
|
|
264
|
+
:disabled="!hasRemainingLocales"
|
|
265
|
+
@click="addLocale"
|
|
266
|
+
>
|
|
267
|
+
<Icon icon="fluent:add-20-regular" />
|
|
268
|
+
<span>{{ t("add-language") }}</span>
|
|
269
|
+
</Button>
|
|
270
|
+
</div>
|
|
271
|
+
</template>
|
|
272
|
+
|
|
273
|
+
<i18n lang="json">
|
|
274
|
+
{
|
|
275
|
+
"zh": {
|
|
276
|
+
"add-language": "新增语言",
|
|
277
|
+
"select-locale": "选择语言:{locale}",
|
|
278
|
+
"delete-locale": "删除语言:{locale}"
|
|
279
|
+
},
|
|
280
|
+
"ja": {
|
|
281
|
+
"add-language": "言語を追加",
|
|
282
|
+
"select-locale": "言語を選択: {locale}",
|
|
283
|
+
"delete-locale": "言語を削除: {locale}"
|
|
284
|
+
},
|
|
285
|
+
"en": {
|
|
286
|
+
"add-language": "Add language",
|
|
287
|
+
"select-locale": "Select language: {locale}",
|
|
288
|
+
"delete-locale": "Delete language: {locale}"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
</i18n>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'vue';
|
|
2
|
+
import { type LocaleValue } from '../../../utils/coders.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue?: LocaleValue;
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
multiline?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (args_0: readonly {
|
|
10
|
+
locale: "zh" | "ja" | "en" | "ko";
|
|
11
|
+
message: string;
|
|
12
|
+
}[]) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((args_0: readonly {
|
|
15
|
+
locale: "zh" | "ja" | "en" | "ko";
|
|
16
|
+
message: string;
|
|
17
|
+
}[]) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Locale } from './Locale.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Locale } from "./Locale.vue";
|
|
@@ -27,9 +27,9 @@ const delegatedProps = reactiveOmit(props, "class");
|
|
|
27
27
|
v-model="modelValue"
|
|
28
28
|
data-slot="native-select"
|
|
29
29
|
:class="cn(
|
|
30
|
-
'border-
|
|
31
|
-
'focus-visible:border-
|
|
32
|
-
'aria-invalid:
|
|
30
|
+
'border-zinc-200 placeholder:text-zinc-400 selection:bg-primary selection:text-primary-foreground dark:bg-zinc-200/30 dark:hover:bg-zinc-200/50 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
|
+
'focus-visible:border-(--primary)',
|
|
32
|
+
'aria-invalid:border-red-400',
|
|
33
33
|
props.class
|
|
34
34
|
)"
|
|
35
35
|
>
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { cn } from "../../../utils/cn";
|
|
3
3
|
const props = defineProps({
|
|
4
|
-
class: { type: null, required: false }
|
|
4
|
+
class: { type: null, required: false },
|
|
5
|
+
value: { type: [String, Number], required: false }
|
|
5
6
|
});
|
|
6
7
|
</script>
|
|
7
8
|
|
|
8
9
|
<template>
|
|
9
10
|
<option
|
|
10
11
|
data-slot="native-select-option"
|
|
12
|
+
:value="props.value"
|
|
13
|
+
v-bind="$attrs"
|
|
11
14
|
:class="cn('bg-white text-zinc-700', props.class)"
|
|
12
15
|
>
|
|
13
16
|
<slot />
|
|
@@ -20,7 +20,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
20
20
|
<NavigationMenuLink
|
|
21
21
|
data-slot="navigation-menu-link"
|
|
22
22
|
v-bind="forwarded"
|
|
23
|
-
:class="cn('data-active:focus:bg-
|
|
23
|
+
:class="cn('data-active:focus:bg-zinc-100 data-active:hover:bg-zinc-100 data-active:bg-zinc-100 data-active:text-zinc-900 hover:bg-zinc-100 hover:text-zinc-900 focus:bg-zinc-100 focus:text-zinc-900 [&_svg:not([class*=\'text-\'])]:text-zinc-500 flex flex-col gap-1 rounded-sm p-2 text-sm transition-[color,box-shadow] focus-visible:outline-1 [&_svg:not([class*=\'size-\'])]:size-4', props.class)"
|
|
24
24
|
>
|
|
25
25
|
<slot />
|
|
26
26
|
</NavigationMenuLink>
|
|
@@ -23,7 +23,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
23
23
|
v-bind="forwardedProps"
|
|
24
24
|
:class="
|
|
25
25
|
cn(
|
|
26
|
-
'origin-top-center bg-white text-
|
|
26
|
+
'origin-top-center bg-white text-zinc-700 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-(--reka-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border shadow md:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)',
|
|
27
27
|
props.class
|
|
28
28
|
)
|
|
29
29
|
"
|
|
@@ -9,6 +9,6 @@ const props = defineProps({
|
|
|
9
9
|
<template>
|
|
10
10
|
<NumberFieldInput
|
|
11
11
|
data-slot="input"
|
|
12
|
-
:class="cn('flex h-9 w-full rounded border border-zinc-200 hover:border-zinc-300 focus-visible:border-[color-mix(in_srgb,var(--primary)_60%,white)] bg-transparent py-1 text-sm text-center shadow-
|
|
12
|
+
:class="cn('flex h-9 w-full rounded border border-zinc-200 hover:border-zinc-300 focus-visible:border-[color-mix(in_srgb,var(--primary)_60%,white)] bg-transparent px-3 py-1 text-sm text-center shadow-xs transition-colors duration-180 placeholder:text-zinc-700 outline-none disabled:cursor-not-allowed disabled:opacity-50', props.class)"
|
|
13
13
|
/>
|
|
14
14
|
</template>
|
|
@@ -15,7 +15,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
15
15
|
<template>
|
|
16
16
|
<RangeCalendarCell
|
|
17
17
|
data-slot="range-calendar-cell"
|
|
18
|
-
:class="cn('relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-
|
|
18
|
+
:class="cn('relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-zinc-100 first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-selection-start])]:rounded-l-md', props.class)"
|
|
19
19
|
v-bind="forwardedProps"
|
|
20
20
|
>
|
|
21
21
|
<slot />
|
|
@@ -20,7 +20,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
20
20
|
:class="cn(
|
|
21
21
|
buttonVariants({ variant: 'ghost' }),
|
|
22
22
|
'h-8 w-8 p-0 font-normal data-selected:opacity-100',
|
|
23
|
-
'[&[data-today]:not([data-selected])]:bg-white [&[data-today]:not([data-selected])]:text-
|
|
23
|
+
'[&[data-today]:not([data-selected])]:bg-white [&[data-today]:not([data-selected])]:text-zinc-700',
|
|
24
24
|
// Selection Start
|
|
25
25
|
'data-selection-start:bg-[color-mix(in_srgb,var(--primary)_20%,white)] data-selection-start:text-white data-selection-start:hover:bg-[color-mix(in_srgb,var(--primary)_40%,white)] data-selection-start:hover:text-white data-selection-start:focus:bg-[color-mix(in_srgb,var(--primary)_40%,white)] data-selection-start:focus:text-white',
|
|
26
26
|
// Selection End
|
|
@@ -14,7 +14,7 @@ const delegatedProps = reactiveOmit(props, "class");
|
|
|
14
14
|
<template>
|
|
15
15
|
<DialogOverlay
|
|
16
16
|
data-slot="sheet-overlay"
|
|
17
|
-
:class="cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-
|
|
17
|
+
:class="cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-zinc-900/80', props.class)"
|
|
18
18
|
v-bind="delegatedProps"
|
|
19
19
|
>
|
|
20
20
|
<slot />
|