@bitrix24/b24ui-nuxt 0.4.11 → 0.5.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/.nuxt/b24ui/navigation-menu.ts +64 -51
- package/.nuxt/b24ui/sidebar-body.ts +1 -1
- package/.nuxt/b24ui/sidebar-footer.ts +1 -1
- package/.nuxt/b24ui/sidebar-header.ts +1 -1
- package/.nuxt/b24ui/sidebar-heading.ts +1 -1
- package/.nuxt/b24ui/sidebar-section.ts +1 -1
- package/dist/meta.cjs +638 -608
- package/dist/meta.d.cts +638 -608
- package/dist/meta.d.mts +638 -608
- package/dist/meta.d.ts +638 -608
- package/dist/meta.mjs +638 -608
- package/dist/module.cjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/DropdownMenu.vue +1 -1
- package/dist/runtime/components/Form.vue +21 -1
- package/dist/runtime/components/FormField.vue +5 -0
- package/dist/runtime/components/NavigationMenu.vue +7 -2
- package/dist/runtime/composables/useComponentIcons.d.ts +2 -2
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/types/form.d.ts +1 -3
- package/dist/runtime/utils/form.d.ts +0 -4
- package/dist/runtime/utils/form.js +2 -47
- package/dist/runtime/utils/link.d.ts +8 -8
- package/dist/runtime/vue/stubs.d.ts +1 -1
- package/dist/shared/{b24ui-nuxt.CJqO7fYv.mjs → b24ui-nuxt.Bj4fKDSa.mjs} +145 -39
- package/dist/shared/{b24ui-nuxt.CltBJi1M.cjs → b24ui-nuxt.DHbGsmbj.cjs} +145 -39
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +5 -5
package/dist/module.cjs
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defu } from 'defu';
|
|
2
2
|
import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
|
|
3
|
-
import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.
|
|
3
|
+
import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.Bj4fKDSa.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
@@ -147,7 +147,7 @@ const b24ui = computed(() => dropdownMenu({
|
|
|
147
147
|
:checked-icon="checkedIcon"
|
|
148
148
|
:external-icon="externalIcon"
|
|
149
149
|
>
|
|
150
|
-
<template v-for="(_, name) in proxySlots" #[name]="slotData
|
|
150
|
+
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
151
151
|
<slot :name="name" v-bind="slotData" />
|
|
152
152
|
</template>
|
|
153
153
|
|
|
@@ -12,14 +12,34 @@ const form = tv({ extend: tv(theme), ...(appConfigForm.b24ui?.form || {}) })
|
|
|
12
12
|
|
|
13
13
|
export interface FormProps<T extends object> {
|
|
14
14
|
id?: string | number
|
|
15
|
+
/** Schema to validate the form state. Supports Standard Schema objects, Yup, Joi, and Superstructs. */
|
|
15
16
|
schema?: FormSchema<T>
|
|
17
|
+
/** An object representing the current state of the form. */
|
|
16
18
|
state: Partial<T>
|
|
19
|
+
/**
|
|
20
|
+
* Custom validation function to validate the form state.
|
|
21
|
+
* @param state - The current state of the form.
|
|
22
|
+
* @returns A promise that resolves to an array of FormError objects, or an array of FormError objects directly.
|
|
23
|
+
*/
|
|
17
24
|
validate?: (state: Partial<T>) => Promise<FormError[]> | FormError[]
|
|
25
|
+
/**
|
|
26
|
+
* The list of input events that trigger the form validation.
|
|
27
|
+
* @defaultValue `['blur', 'change', 'input']`
|
|
28
|
+
*/
|
|
18
29
|
validateOn?: FormInputEvents[]
|
|
30
|
+
/** Disable all inputs inside the form. */
|
|
19
31
|
disabled?: boolean
|
|
32
|
+
/**
|
|
33
|
+
* Delay in milliseconds before validating the form on input events.
|
|
34
|
+
* @defaultValue `300`
|
|
35
|
+
*/
|
|
20
36
|
validateOnInputDelay?: number
|
|
21
|
-
|
|
37
|
+
/**
|
|
38
|
+
* If true, schema transformations will be applied to the state on submit.
|
|
39
|
+
* @defaultValue `true`
|
|
40
|
+
*/
|
|
22
41
|
transform?: boolean
|
|
42
|
+
class?: any
|
|
23
43
|
onSubmit?: ((event: FormSubmitEvent<T>) => void | Promise<void>) | (() => void | Promise<void>)
|
|
24
44
|
}
|
|
25
45
|
|
|
@@ -34,7 +34,12 @@ export interface FormFieldProps {
|
|
|
34
34
|
* @defaultValue false
|
|
35
35
|
*/
|
|
36
36
|
required?: boolean
|
|
37
|
+
/** If true, validation on input will be active immediately instead of waiting for a blur event. */
|
|
37
38
|
eagerValidation?: boolean
|
|
39
|
+
/**
|
|
40
|
+
* Delay in milliseconds before validating the form on input events.
|
|
41
|
+
* @defaultValue `300`
|
|
42
|
+
*/
|
|
38
43
|
validateOnInputDelay?: number
|
|
39
44
|
class?: any
|
|
40
45
|
b24ui?: Partial<typeof formField.slots>
|
|
@@ -204,7 +204,7 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0]
|
|
|
204
204
|
|
|
205
205
|
<span
|
|
206
206
|
v-if="(!collapsed || orientation !== 'vertical') && (get(item, props.labelKey as string) || !!slots[item.slot ? `${item.slot}-label` : 'item-label'])"
|
|
207
|
-
:class="b24ui.linkLabel({ class: props.b24ui?.linkLabel })"
|
|
207
|
+
:class="b24ui.linkLabel({ class: props.b24ui?.linkLabel, active })"
|
|
208
208
|
>
|
|
209
209
|
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="(item as T)" :active="active" :index="index">
|
|
210
210
|
{{ get(item, props.labelKey as string) }}
|
|
@@ -320,7 +320,12 @@ const lists = computed(() => props.items?.length ? (Array.isArray(props.items[0]
|
|
|
320
320
|
</component>
|
|
321
321
|
</DefineItemTemplate>
|
|
322
322
|
|
|
323
|
-
<NavigationMenuRoot
|
|
323
|
+
<NavigationMenuRoot
|
|
324
|
+
v-bind="rootProps"
|
|
325
|
+
:data-collapsed="collapsed"
|
|
326
|
+
:class="b24ui.root({ class: [props.class, props.b24ui?.root] })"
|
|
327
|
+
data-slot="section"
|
|
328
|
+
>
|
|
324
329
|
<template v-for="(list, listIndex) in lists" :key="`list-${listIndex}`">
|
|
325
330
|
<NavigationMenuList :class="b24ui.list({ class: props.b24ui?.list })">
|
|
326
331
|
<ReuseItemTemplate v-for="(item, index) in list" :key="`list-${listIndex}-${index}`" :item="item" :index="index" :class="b24ui.item({ class: props.b24ui?.item })" />
|
|
@@ -22,6 +22,6 @@ export interface UseComponentIconsProps {
|
|
|
22
22
|
export declare function useComponentIcons(componentProps: MaybeRefOrGetter<UseComponentIconsProps>): {
|
|
23
23
|
isLeading: import("vue").ComputedRef<any>;
|
|
24
24
|
isTrailing: import("vue").ComputedRef<boolean>;
|
|
25
|
-
leadingIconName: import("vue").ComputedRef<
|
|
26
|
-
trailingIconName: import("vue").ComputedRef<
|
|
25
|
+
leadingIconName: import("vue").ComputedRef<IconComponent | undefined>;
|
|
26
|
+
trailingIconName: import("vue").ComputedRef<IconComponent | undefined>;
|
|
27
27
|
};
|
package/dist/runtime/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@plugin "@bitrix24/b24style";@import "#build/b24ui.css";@import "./keyframes.css";@variant light (&:where(.light, .light *));@variant dark (&:where(.dark, .dark *));@layer base{--b24ui-header-height:calc(var(--spacing)*16);body{@apply antialiased scheme-light dark:scheme-dark}}@layer theme{:host,:root{--spacing:.25rem}}.scrollbar-thin{scrollbar-width:thin}.scrollbar-transparent{scrollbar-color:
|
|
1
|
+
@plugin "@bitrix24/b24style";@import "#build/b24ui.css";@import "./keyframes.css";@variant light (&:where(.light, .light *));@variant dark (&:where(.dark, .dark *));@layer base{--b24ui-header-height:calc(var(--spacing)*16);body{@apply antialiased scheme-light dark:scheme-dark}}@layer theme{:host,:root{--spacing:.25rem}}.scrollbar-thin{scrollbar-width:thin}.scrollbar-transparent{scrollbar-color:transparent transparent;scrollbar-gutter:stable}.scrollbar-transparent:hover{scrollbar-color:rgba(82,92,105,.36) transparent}.dark .scrollbar-transparent{scrollbar-color:rgba(0,0,0,.21) transparent}.dark .scrollbar-transparent:hover{scrollbar-color:#515a67 transparent}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
2
|
import type { ComputedRef, DeepReadonly, Ref } from 'vue';
|
|
3
|
-
import type { ZodSchema } from 'zod';
|
|
4
3
|
import type { Schema as JoiSchema } from 'joi';
|
|
5
4
|
import type { ObjectSchema as YupObjectSchema } from 'yup';
|
|
6
|
-
import type { GenericSchema as ValibotSchema, GenericSchemaAsync as ValibotSchemaAsync, SafeParser as ValibotSafeParser, SafeParserAsync as ValibotSafeParserAsync } from 'valibot';
|
|
7
5
|
import type { GetObjectField } from './utils';
|
|
8
6
|
import type { Struct as SuperstructSchema } from 'superstruct';
|
|
9
7
|
export interface Form<T extends object> {
|
|
@@ -24,7 +22,7 @@ export interface Form<T extends object> {
|
|
|
24
22
|
touchedFields: DeepReadonly<Set<keyof T>>;
|
|
25
23
|
blurredFields: DeepReadonly<Set<keyof T>>;
|
|
26
24
|
}
|
|
27
|
-
export type FormSchema<T extends object> =
|
|
25
|
+
export type FormSchema<T extends object> = YupObjectSchema<T> | JoiSchema<T> | SuperstructSchema<any, any> | StandardSchemaV1;
|
|
28
26
|
export type FormInputEvents = 'input' | 'blur' | 'change' | 'focus';
|
|
29
27
|
export interface FormError<P extends string = string> {
|
|
30
28
|
name?: P;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
|
-
import type { ZodSchema } from 'zod';
|
|
3
2
|
import type { ValidationError as JoiError, Schema as JoiSchema } from 'joi';
|
|
4
3
|
import type { ObjectSchema as YupObjectSchema, ValidationError as YupError } from 'yup';
|
|
5
|
-
import type { GenericSchema as ValibotSchema, GenericSchemaAsync as ValibotSchemaAsync, SafeParser as ValibotSafeParser, SafeParserAsync as ValibotSafeParserAsync } from 'valibot';
|
|
6
4
|
import type { Struct } from 'superstruct';
|
|
7
5
|
import type { FormSchema, ValidateReturnSchema } from '../types/form';
|
|
8
6
|
export declare function isYupSchema(schema: any): schema is YupObjectSchema<any>;
|
|
9
7
|
export declare function isYupError(error: any): error is YupError;
|
|
10
8
|
export declare function isSuperStructSchema(schema: any): schema is Struct<any, any>;
|
|
11
|
-
export declare function isZodSchema(schema: any): schema is ZodSchema;
|
|
12
9
|
export declare function isJoiSchema(schema: any): schema is JoiSchema;
|
|
13
10
|
export declare function isJoiError(error: any): error is JoiError;
|
|
14
|
-
export declare function isValibotSchema(schema: any): schema is ValibotSchema | ValibotSchemaAsync | ValibotSafeParser<any, any> | ValibotSafeParserAsync<any, any>;
|
|
15
11
|
export declare function isStandardSchema(schema: any): schema is StandardSchemaV1;
|
|
16
12
|
export declare function validateStandardSchema(state: any, schema: StandardSchemaV1): Promise<ValidateReturnSchema<typeof state>>;
|
|
17
13
|
export declare function validateSchema<T extends object>(state: T, schema: FormSchema<T>): Promise<ValidateReturnSchema<typeof state>>;
|
|
@@ -7,18 +7,12 @@ export function isYupError(error) {
|
|
|
7
7
|
export function isSuperStructSchema(schema) {
|
|
8
8
|
return "schema" in schema && typeof schema.coercer === "function" && typeof schema.validator === "function" && typeof schema.refiner === "function";
|
|
9
9
|
}
|
|
10
|
-
export function isZodSchema(schema) {
|
|
11
|
-
return schema.parse !== void 0;
|
|
12
|
-
}
|
|
13
10
|
export function isJoiSchema(schema) {
|
|
14
11
|
return schema.validateAsync !== void 0 && schema.id !== void 0;
|
|
15
12
|
}
|
|
16
13
|
export function isJoiError(error) {
|
|
17
14
|
return error.isJoi === true;
|
|
18
15
|
}
|
|
19
|
-
export function isValibotSchema(schema) {
|
|
20
|
-
return "_run" in schema || typeof schema === "function" && "schema" in schema;
|
|
21
|
-
}
|
|
22
16
|
export function isStandardSchema(schema) {
|
|
23
17
|
return "~standard" in schema;
|
|
24
18
|
}
|
|
@@ -77,23 +71,6 @@ async function validateSuperstructSchema(state, schema) {
|
|
|
77
71
|
result
|
|
78
72
|
};
|
|
79
73
|
}
|
|
80
|
-
async function validateZodSchema(state, schema) {
|
|
81
|
-
const result = await schema.safeParseAsync(state);
|
|
82
|
-
if (result.success === false) {
|
|
83
|
-
const errors = result.error.issues.map((issue) => ({
|
|
84
|
-
name: issue.path.join("."),
|
|
85
|
-
message: issue.message
|
|
86
|
-
}));
|
|
87
|
-
return {
|
|
88
|
-
errors,
|
|
89
|
-
result: null
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
result: result.data,
|
|
94
|
-
errors: null
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
74
|
async function validateJoiSchema(state, schema) {
|
|
98
75
|
try {
|
|
99
76
|
const result = await schema.validateAsync(state, { abortEarly: false });
|
|
@@ -116,33 +93,11 @@ async function validateJoiSchema(state, schema) {
|
|
|
116
93
|
}
|
|
117
94
|
}
|
|
118
95
|
}
|
|
119
|
-
async function validateValibotSchema(state, schema) {
|
|
120
|
-
const result = await ("_run" in schema ? schema._run({ typed: false, value: state }, {}) : schema(state));
|
|
121
|
-
if (!result.issues || result.issues.length === 0) {
|
|
122
|
-
const output = "output" in result ? result.output : "value" in result ? result.value : null;
|
|
123
|
-
return {
|
|
124
|
-
errors: null,
|
|
125
|
-
result: output
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
const errors = result.issues.map((issue) => ({
|
|
129
|
-
name: issue.path?.map((item) => item.key).join(".") || "",
|
|
130
|
-
message: issue.message
|
|
131
|
-
}));
|
|
132
|
-
return {
|
|
133
|
-
errors,
|
|
134
|
-
result: null
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
96
|
export function validateSchema(state, schema) {
|
|
138
|
-
if (
|
|
139
|
-
return
|
|
97
|
+
if (isStandardSchema(schema)) {
|
|
98
|
+
return validateStandardSchema(state, schema);
|
|
140
99
|
} else if (isJoiSchema(schema)) {
|
|
141
100
|
return validateJoiSchema(state, schema);
|
|
142
|
-
} else if (isStandardSchema(schema)) {
|
|
143
|
-
return validateStandardSchema(state, schema);
|
|
144
|
-
} else if (isValibotSchema(schema)) {
|
|
145
|
-
return validateValibotSchema(state, schema);
|
|
146
101
|
} else if (isYupSchema(schema)) {
|
|
147
102
|
return validateYupSchema(state, schema);
|
|
148
103
|
} else if (isSuperStructSchema(schema)) {
|
|
@@ -6,24 +6,24 @@ export declare function pickLinkProps(link: LinkProps & {
|
|
|
6
6
|
replace: any;
|
|
7
7
|
type: any;
|
|
8
8
|
title: any;
|
|
9
|
-
href: any;
|
|
10
|
-
target: any;
|
|
11
|
-
as: any;
|
|
12
|
-
prefetch: any;
|
|
13
|
-
rel: any;
|
|
14
|
-
external: any;
|
|
15
|
-
exact: any;
|
|
16
9
|
active: any;
|
|
17
|
-
disabled: any;
|
|
18
10
|
activeClass: any;
|
|
19
11
|
ariaCurrentValue: any;
|
|
20
12
|
ariaLabel: any;
|
|
13
|
+
as: any;
|
|
14
|
+
disabled: any;
|
|
15
|
+
exact: any;
|
|
21
16
|
exactActiveClass: any;
|
|
22
17
|
exactHash: any;
|
|
23
18
|
exactQuery: any;
|
|
19
|
+
external: any;
|
|
20
|
+
href: any;
|
|
24
21
|
inactiveClass: any;
|
|
25
22
|
noPrefetch: any;
|
|
26
23
|
noRel: any;
|
|
24
|
+
prefetch: any;
|
|
27
25
|
prefetchedClass: any;
|
|
26
|
+
rel: any;
|
|
27
|
+
target: any;
|
|
28
28
|
to: any;
|
|
29
29
|
};
|
|
@@ -12,7 +12,7 @@ export declare const useColorMode: () => {
|
|
|
12
12
|
preference?: undefined;
|
|
13
13
|
readonly value?: undefined;
|
|
14
14
|
} | {
|
|
15
|
-
preference: "
|
|
15
|
+
preference: "light" | "dark" | "system";
|
|
16
16
|
readonly value: import("@vueuse/core").BasicColorMode;
|
|
17
17
|
forced: boolean;
|
|
18
18
|
};
|
|
@@ -3515,47 +3515,108 @@ const modal = {
|
|
|
3515
3515
|
|
|
3516
3516
|
const navigationMenu = {
|
|
3517
3517
|
slots: {
|
|
3518
|
-
root: "relative flex
|
|
3518
|
+
root: "relative flex [&>div]:min-w-0 font-b24-secondary",
|
|
3519
3519
|
list: "isolate min-w-0",
|
|
3520
|
-
label:
|
|
3520
|
+
label: [
|
|
3521
|
+
"w-full min-h-6",
|
|
3522
|
+
"flex items-center rtl:flex-row-reverse gap-1.5",
|
|
3523
|
+
"font-medium text-xs/6",
|
|
3524
|
+
"text-base-500 dark:text-base-400",
|
|
3525
|
+
"ps-2xl pe-xs rtl:ps-xs rtl:pe-2xl"
|
|
3526
|
+
].join(" "),
|
|
3521
3527
|
item: "min-w-0",
|
|
3522
|
-
link:
|
|
3528
|
+
link: [
|
|
3529
|
+
"group relative",
|
|
3530
|
+
"cursor-pointer",
|
|
3531
|
+
"w-full",
|
|
3532
|
+
"flex items-center gap-1.5",
|
|
3533
|
+
"font-normal text-lg leading-9 min-h-9",
|
|
3534
|
+
"before:absolute before:z-[-1]",
|
|
3535
|
+
"focus:outline-none focus-visible:before:rounded-md focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2"
|
|
3536
|
+
].join(" "),
|
|
3523
3537
|
linkLeadingIcon: "shrink-0 size-5",
|
|
3524
3538
|
linkLeadingAvatar: "shrink-0",
|
|
3525
3539
|
linkLeadingAvatarSize: "2xs",
|
|
3526
3540
|
linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
3527
3541
|
linkTrailingBadge: "shrink-0",
|
|
3528
3542
|
linkTrailingBadgeSize: "sm",
|
|
3529
|
-
linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
3543
|
+
linkTrailingIcon: "text-base-600 size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
3530
3544
|
linkLabel: "truncate",
|
|
3531
|
-
linkLabelExternalIcon: "inline-block
|
|
3545
|
+
linkLabelExternalIcon: "inline-block h-6 w-3 align-top text-base-500 dark:text-base-700",
|
|
3532
3546
|
childList: "",
|
|
3533
3547
|
childItem: "",
|
|
3534
|
-
childLink:
|
|
3548
|
+
childLink: [
|
|
3549
|
+
"group",
|
|
3550
|
+
"size-full",
|
|
3551
|
+
"px-3 py-2",
|
|
3552
|
+
// 'rounded-md',
|
|
3553
|
+
"flex items-start gap-2",
|
|
3554
|
+
"text-start"
|
|
3555
|
+
].join(" "),
|
|
3535
3556
|
childLinkWrapper: "flex flex-col items-start",
|
|
3536
3557
|
childLinkIcon: "size-5 shrink-0",
|
|
3537
3558
|
childLinkLabel: "font-semibold text-sm relative inline-flex",
|
|
3538
|
-
childLinkLabelExternalIcon: "inline-block
|
|
3559
|
+
childLinkLabelExternalIcon: "inline-block h-6 w-3 align-top text-base-500 dark:text-base-700",
|
|
3539
3560
|
childLinkDescription: "text-sm text-(--ui-text-muted)",
|
|
3540
3561
|
separator: "px-2 h-px bg-(--ui-border)",
|
|
3541
3562
|
viewportWrapper: "absolute top-full left-0 flex w-full",
|
|
3542
|
-
viewport:
|
|
3563
|
+
viewport: [
|
|
3564
|
+
"relative overflow-hidden",
|
|
3565
|
+
"w-full",
|
|
3566
|
+
"bg-(--ui-bg)",
|
|
3567
|
+
"shadow-lg",
|
|
3568
|
+
"rounded-md",
|
|
3569
|
+
"ring ring-(--ui-border)",
|
|
3570
|
+
"h-(--reka-navigation-menu-viewport-height)",
|
|
3571
|
+
"transition-[width,height,left] duration-200 origin-[top_center]",
|
|
3572
|
+
"motion-safe:data-[state=open]:animate-[scale-in_100ms_ease-out] motion-safe:data-[state=closed]:animate-[scale-out_100ms_ease-in]"
|
|
3573
|
+
].join(" "),
|
|
3543
3574
|
content: "absolute top-0 left-0 w-full",
|
|
3544
|
-
indicator:
|
|
3545
|
-
|
|
3575
|
+
indicator: [
|
|
3576
|
+
"absolute",
|
|
3577
|
+
"motion-safe:data-[state=visible]:animate-[fade-in_100ms_ease-out] motion-safe:data-[state=hidden]:animate-[fade-out_100ms_ease-in]",
|
|
3578
|
+
"data-[state=hidden]:opacity-0",
|
|
3579
|
+
"bottom-0",
|
|
3580
|
+
"z-[1]",
|
|
3581
|
+
"w-(--reka-navigation-menu-indicator-size)",
|
|
3582
|
+
"h-2.5",
|
|
3583
|
+
"translate-x-(--reka-navigation-menu-indicator-position)",
|
|
3584
|
+
"flex items-end justify-center",
|
|
3585
|
+
"overflow-hidden",
|
|
3586
|
+
"transition-[translate,width] duration-200"
|
|
3587
|
+
].join(" "),
|
|
3588
|
+
arrow: "relative top-[50%] size-2.5 rotate-45 border border-(--ui-border) bg-(--ui-bg) z-[1] rounded-md"
|
|
3546
3589
|
},
|
|
3547
3590
|
variants: {
|
|
3548
3591
|
color: {
|
|
3549
3592
|
default: {
|
|
3550
|
-
link: "focus-visible:before:ring-
|
|
3551
|
-
childLink: "focus-visible:outline-
|
|
3552
|
-
}
|
|
3593
|
+
link: "focus-visible:before:ring-base-300 dark:focus-visible:before:ring-base-800",
|
|
3594
|
+
childLink: "focus-visible:outline-base-300 dark:focus-visible:outline-base-800"
|
|
3595
|
+
},
|
|
3596
|
+
danger: "",
|
|
3597
|
+
success: "",
|
|
3598
|
+
warning: "",
|
|
3599
|
+
primary: "",
|
|
3600
|
+
secondary: "",
|
|
3601
|
+
collab: "",
|
|
3602
|
+
ai: ""
|
|
3553
3603
|
},
|
|
3554
3604
|
highlightColor: {
|
|
3555
|
-
default: ""
|
|
3605
|
+
default: "",
|
|
3606
|
+
danger: "",
|
|
3607
|
+
success: "",
|
|
3608
|
+
warning: "",
|
|
3609
|
+
primary: "",
|
|
3610
|
+
secondary: "",
|
|
3611
|
+
collab: "",
|
|
3612
|
+
ai: ""
|
|
3556
3613
|
},
|
|
3557
3614
|
variant: {
|
|
3558
|
-
pill:
|
|
3615
|
+
pill: {
|
|
3616
|
+
link: [
|
|
3617
|
+
"hover:before:bg-base-250/80 dark:hover:before:bg-white/10"
|
|
3618
|
+
].join(" ")
|
|
3619
|
+
},
|
|
3559
3620
|
link: ""
|
|
3560
3621
|
},
|
|
3561
3622
|
orientation: {
|
|
@@ -3567,15 +3628,19 @@ const navigationMenu = {
|
|
|
3567
3628
|
childList: "grid p-2"
|
|
3568
3629
|
},
|
|
3569
3630
|
vertical: {
|
|
3570
|
-
root: "flex-col",
|
|
3571
|
-
link:
|
|
3631
|
+
root: "flex-col w-full",
|
|
3632
|
+
link: [
|
|
3633
|
+
"ps-2xl pe-xs rtl:ps-xs rtl:pe-2xl",
|
|
3634
|
+
"flex-row rtl:flex-row-reverse",
|
|
3635
|
+
"before:inset-y-px before:inset-x-0"
|
|
3636
|
+
].join(" ")
|
|
3572
3637
|
}
|
|
3573
3638
|
},
|
|
3574
3639
|
contentOrientation: {
|
|
3575
3640
|
horizontal: {
|
|
3576
3641
|
viewport: "",
|
|
3577
3642
|
viewportWrapper: "justify-center",
|
|
3578
|
-
content: "data-[motion=from-start]:animate-[enter-from-left_200ms_ease] data-[motion=from-end]:animate-[enter-from-right_200ms_ease] data-[motion=to-start]:animate-[exit-to-left_200ms_ease] data-[motion=to-end]:animate-[exit-to-right_200ms_ease]"
|
|
3643
|
+
content: "motion-safe:data-[motion=from-start]:animate-[enter-from-left_200ms_ease] motion-safe:data-[motion=from-end]:animate-[enter-from-right_200ms_ease] motion-safe:data-[motion=to-start]:animate-[exit-to-left_200ms_ease] motion-safe:data-[motion=to-end]:animate-[exit-to-right_200ms_ease]"
|
|
3579
3644
|
},
|
|
3580
3645
|
vertical: {
|
|
3581
3646
|
viewport: "sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)",
|
|
@@ -3588,10 +3653,17 @@ const navigationMenu = {
|
|
|
3588
3653
|
childLinkIcon: "text-(--ui-text)"
|
|
3589
3654
|
},
|
|
3590
3655
|
false: {
|
|
3591
|
-
link: "text-
|
|
3592
|
-
linkLeadingIcon: "text-
|
|
3593
|
-
childLink: [
|
|
3594
|
-
|
|
3656
|
+
link: "text-base-900 dark:text-base-200",
|
|
3657
|
+
linkLeadingIcon: "text-base-500 dark:text-base-700",
|
|
3658
|
+
childLink: [
|
|
3659
|
+
"hover:bg-(--ui-bg-elevated)/50 text-(--ui-text) hover:text-(--ui-text-highlighted)",
|
|
3660
|
+
"transition-colors"
|
|
3661
|
+
].join(" "),
|
|
3662
|
+
childLinkIcon: [
|
|
3663
|
+
"text-base-500 dark:text-base-700",
|
|
3664
|
+
"group-hover:text-(--ui-text)",
|
|
3665
|
+
"transition-colors"
|
|
3666
|
+
].join(" ")
|
|
3595
3667
|
}
|
|
3596
3668
|
},
|
|
3597
3669
|
disabled: {
|
|
@@ -3610,6 +3682,7 @@ const navigationMenu = {
|
|
|
3610
3682
|
}
|
|
3611
3683
|
},
|
|
3612
3684
|
compoundVariants: [
|
|
3685
|
+
// region horizontal ////
|
|
3613
3686
|
{
|
|
3614
3687
|
orientation: "horizontal",
|
|
3615
3688
|
contentOrientation: "horizontal",
|
|
@@ -3632,6 +3705,8 @@ const navigationMenu = {
|
|
|
3632
3705
|
link: ["after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full", "after:transition-colors"]
|
|
3633
3706
|
}
|
|
3634
3707
|
},
|
|
3708
|
+
// endregion ////
|
|
3709
|
+
// region vertical ////
|
|
3635
3710
|
{
|
|
3636
3711
|
orientation: "vertical",
|
|
3637
3712
|
highlight: true,
|
|
@@ -3640,13 +3715,20 @@ const navigationMenu = {
|
|
|
3640
3715
|
link: ["after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full", "after:transition-colors"]
|
|
3641
3716
|
}
|
|
3642
3717
|
},
|
|
3718
|
+
// endregion ////
|
|
3719
|
+
// region disabled ////
|
|
3643
3720
|
{
|
|
3644
3721
|
disabled: false,
|
|
3645
3722
|
active: false,
|
|
3646
3723
|
variant: "pill",
|
|
3647
3724
|
class: {
|
|
3648
|
-
link: [
|
|
3649
|
-
|
|
3725
|
+
link: [
|
|
3726
|
+
"transition-colors before:transition-colors"
|
|
3727
|
+
].join(" "),
|
|
3728
|
+
linkLeadingIcon: [
|
|
3729
|
+
"group-hover:text-(--ui-text)",
|
|
3730
|
+
"transition-colors"
|
|
3731
|
+
].join(" ")
|
|
3650
3732
|
}
|
|
3651
3733
|
},
|
|
3652
3734
|
{
|
|
@@ -3678,13 +3760,18 @@ const navigationMenu = {
|
|
|
3678
3760
|
link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
|
|
3679
3761
|
}
|
|
3680
3762
|
},
|
|
3763
|
+
// endregion ////
|
|
3681
3764
|
{
|
|
3682
3765
|
color: "default",
|
|
3683
3766
|
variant: "pill",
|
|
3684
3767
|
active: true,
|
|
3685
3768
|
class: {
|
|
3686
|
-
link:
|
|
3687
|
-
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
|
|
3769
|
+
// link: 'text-(--ui-text-highlighted)',
|
|
3770
|
+
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)",
|
|
3771
|
+
linkLabel: [
|
|
3772
|
+
"text-white dark:text-white",
|
|
3773
|
+
"bg-base-800 dark:bg-white/35"
|
|
3774
|
+
].join(" ")
|
|
3688
3775
|
}
|
|
3689
3776
|
},
|
|
3690
3777
|
{
|
|
@@ -3692,7 +3779,18 @@ const navigationMenu = {
|
|
|
3692
3779
|
active: true,
|
|
3693
3780
|
highlight: false,
|
|
3694
3781
|
class: {
|
|
3695
|
-
link:
|
|
3782
|
+
link: [
|
|
3783
|
+
"leading-9"
|
|
3784
|
+
].join(" "),
|
|
3785
|
+
linkLabel: [
|
|
3786
|
+
"px-3",
|
|
3787
|
+
"-ms-3 me-3 rtl:-me-3 rtl:ms-3",
|
|
3788
|
+
"font-semibold leading-[1.563rem]",
|
|
3789
|
+
"text-white dark:text-white",
|
|
3790
|
+
"bg-base-800 dark:bg-white/35",
|
|
3791
|
+
// (--ui-bg-elevated)
|
|
3792
|
+
"rounded-2xl"
|
|
3793
|
+
].join(" ")
|
|
3696
3794
|
}
|
|
3697
3795
|
},
|
|
3698
3796
|
{
|
|
@@ -3700,16 +3798,26 @@ const navigationMenu = {
|
|
|
3700
3798
|
active: true,
|
|
3701
3799
|
highlight: true,
|
|
3702
3800
|
class: {
|
|
3703
|
-
link: [
|
|
3801
|
+
link: [
|
|
3802
|
+
"hover:before:bg-(--ui-bg-elevated)/50",
|
|
3803
|
+
"before:transition-colors"
|
|
3804
|
+
]
|
|
3704
3805
|
}
|
|
3705
3806
|
},
|
|
3807
|
+
// region link ////
|
|
3706
3808
|
{
|
|
3707
3809
|
disabled: false,
|
|
3708
3810
|
active: false,
|
|
3709
3811
|
variant: "link",
|
|
3710
3812
|
class: {
|
|
3711
|
-
link: [
|
|
3712
|
-
|
|
3813
|
+
link: [
|
|
3814
|
+
"hover:text-base-950 dark:hover:text-base-50",
|
|
3815
|
+
"transition-colors"
|
|
3816
|
+
].join(" "),
|
|
3817
|
+
linkLeadingIcon: [
|
|
3818
|
+
"group-hover:text-(--ui-text)",
|
|
3819
|
+
"transition-colors"
|
|
3820
|
+
].join(" ")
|
|
3713
3821
|
}
|
|
3714
3822
|
},
|
|
3715
3823
|
{
|
|
@@ -3731,6 +3839,7 @@ const navigationMenu = {
|
|
|
3731
3839
|
linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
|
|
3732
3840
|
}
|
|
3733
3841
|
},
|
|
3842
|
+
// endregion ////
|
|
3734
3843
|
{
|
|
3735
3844
|
highlightColor: "default",
|
|
3736
3845
|
highlight: true,
|
|
@@ -3744,8 +3853,8 @@ const navigationMenu = {
|
|
|
3744
3853
|
orientation: "vertical",
|
|
3745
3854
|
collapsed: false,
|
|
3746
3855
|
class: {
|
|
3747
|
-
childList: "
|
|
3748
|
-
childItem: "
|
|
3856
|
+
childList: "v-1",
|
|
3857
|
+
childItem: "v-2 [&>a]:ps-[44px]"
|
|
3749
3858
|
}
|
|
3750
3859
|
},
|
|
3751
3860
|
{
|
|
@@ -3757,9 +3866,6 @@ const navigationMenu = {
|
|
|
3757
3866
|
}
|
|
3758
3867
|
],
|
|
3759
3868
|
defaultVariants: {
|
|
3760
|
-
/**
|
|
3761
|
-
* @todo change to primary
|
|
3762
|
-
*/
|
|
3763
3869
|
color: "default",
|
|
3764
3870
|
highlightColor: "default",
|
|
3765
3871
|
variant: "pill"
|
|
@@ -5770,7 +5876,7 @@ const sidebar = {
|
|
|
5770
5876
|
const sidebarHeader = {
|
|
5771
5877
|
slots: {
|
|
5772
5878
|
root: [
|
|
5773
|
-
"
|
|
5879
|
+
"py-4",
|
|
5774
5880
|
"flex flex-col",
|
|
5775
5881
|
// 'border-b border-base-950/5 dark:border-white/5',
|
|
5776
5882
|
"[&>[data-slot=section]+[data-slot=section]]:mt-2.5"
|
|
@@ -5781,7 +5887,7 @@ const sidebarHeader = {
|
|
|
5781
5887
|
const sidebarBody = {
|
|
5782
5888
|
slots: {
|
|
5783
5889
|
root: [
|
|
5784
|
-
"
|
|
5890
|
+
"py-4",
|
|
5785
5891
|
"flex flex-1 flex-col",
|
|
5786
5892
|
"overflow-y-auto",
|
|
5787
5893
|
"[&>[data-slot=section]+[data-slot=section]]:mt-8"
|
|
@@ -5802,7 +5908,7 @@ const sidebarBody = {
|
|
|
5802
5908
|
const sidebarFooter = {
|
|
5803
5909
|
slots: {
|
|
5804
5910
|
root: [
|
|
5805
|
-
"
|
|
5911
|
+
"py-4",
|
|
5806
5912
|
"flex flex-col",
|
|
5807
5913
|
"max-lg:hidden",
|
|
5808
5914
|
// 'border-t border-base-950/5 dark:border-white/5',
|
|
@@ -5814,6 +5920,7 @@ const sidebarFooter = {
|
|
|
5814
5920
|
const sidebarSection = {
|
|
5815
5921
|
slots: {
|
|
5816
5922
|
root: [
|
|
5923
|
+
"ps-2xl pe-xs",
|
|
5817
5924
|
"flex flex-col gap-0.5"
|
|
5818
5925
|
].join(" ")
|
|
5819
5926
|
}
|
|
@@ -5823,7 +5930,6 @@ const sidebarHeading = {
|
|
|
5823
5930
|
slots: {
|
|
5824
5931
|
root: [
|
|
5825
5932
|
"mb-1",
|
|
5826
|
-
"px-2",
|
|
5827
5933
|
"text-xs/6 font-medium ",
|
|
5828
5934
|
"text-base-500 dark:text-base-400"
|
|
5829
5935
|
].join(" ")
|