@baybreezy/docd 0.1.10 → 0.1.12
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/app/assets/css/shadcn.css +660 -0
- package/app/assets/css/tailwind.css +1 -1
- package/app/components/Ui/Avatar/Avatar.vue +7 -19
- package/app/components/Ui/Avatar/Badge.vue +1 -1
- package/app/components/Ui/Avatar/Fallback.vue +2 -2
- package/app/components/Ui/Avatar/Group.vue +1 -1
- package/app/components/Ui/Avatar/GroupCount.vue +1 -1
- package/app/components/Ui/Avatar/Image.vue +2 -2
- package/app/components/Ui/Badge.vue +6 -6
- package/app/components/Ui/BadgeGroup.vue +6 -6
- package/app/components/Ui/BgPattern/Grid.vue +3 -2
- package/app/components/Ui/BorderBeam.vue +10 -30
- package/app/components/Ui/Breadcrumbs.vue +5 -10
- package/app/components/Ui/Button.vue +23 -18
- package/app/components/Ui/ButtonGroup/ButtonGroup.vue +3 -4
- package/app/components/Ui/ButtonGroup/Separator.vue +2 -6
- package/app/components/Ui/ButtonGroup/Text.vue +1 -3
- package/app/components/Ui/Card/Action.vue +1 -1
- package/app/components/Ui/Card/Card.vue +4 -4
- package/app/components/Ui/Card/Content.vue +2 -2
- package/app/components/Ui/Card/Description.vue +2 -2
- package/app/components/Ui/Card/Footer.vue +1 -1
- package/app/components/Ui/Card/Header.vue +1 -1
- package/app/components/Ui/Card/Title.vue +2 -2
- package/app/components/Ui/Collapsible/Content.vue +1 -1
- package/app/components/Ui/Command/Command.vue +4 -18
- package/app/components/Ui/Command/Dialog.vue +2 -6
- package/app/components/Ui/Command/Footer.vue +1 -1
- package/app/components/Ui/Command/Group.vue +1 -1
- package/app/components/Ui/Command/Input.vue +1 -1
- package/app/components/Ui/Command/Item.vue +5 -5
- package/app/components/Ui/Command/List.vue +1 -1
- package/app/components/Ui/Command/Separator.vue +1 -1
- package/app/components/Ui/Command/Shortcut.vue +2 -2
- package/app/components/Ui/Container.vue +2 -2
- package/app/components/Ui/ContextMenu/Arrow.vue +2 -2
- package/app/components/Ui/ContextMenu/CheckboxItem.vue +3 -3
- package/app/components/Ui/ContextMenu/Content.vue +2 -2
- package/app/components/Ui/ContextMenu/Item.vue +6 -8
- package/app/components/Ui/ContextMenu/ItemIndicator.vue +1 -1
- package/app/components/Ui/ContextMenu/Label.vue +3 -3
- package/app/components/Ui/ContextMenu/RadioItem.vue +3 -3
- package/app/components/Ui/ContextMenu/Separator.vue +1 -1
- package/app/components/Ui/ContextMenu/Shortcut.vue +1 -3
- package/app/components/Ui/ContextMenu/SubContent.vue +2 -2
- package/app/components/Ui/ContextMenu/SubTrigger.vue +4 -4
- package/app/components/Ui/Dialog/Content.vue +7 -7
- package/app/components/Ui/Dialog/Description.vue +2 -2
- package/app/components/Ui/Dialog/Footer.vue +1 -1
- package/app/components/Ui/Dialog/Header.vue +1 -1
- package/app/components/Ui/Dialog/Overlay.vue +1 -1
- package/app/components/Ui/Dialog/Title.vue +2 -2
- package/app/components/Ui/Divider.vue +8 -14
- package/app/components/Ui/Drawer/Description.vue +2 -6
- package/app/components/Ui/Drawer/Footer.vue +1 -3
- package/app/components/Ui/Drawer/Header.vue +1 -3
- package/app/components/Ui/Drawer/Title.vue +2 -6
- package/app/components/Ui/DropdownMenu/Arrow.vue +2 -2
- package/app/components/Ui/DropdownMenu/CheckboxItem.vue +3 -3
- package/app/components/Ui/DropdownMenu/Content.vue +2 -2
- package/app/components/Ui/DropdownMenu/Item.vue +6 -6
- package/app/components/Ui/DropdownMenu/ItemIndicator.vue +2 -2
- package/app/components/Ui/DropdownMenu/Label.vue +3 -3
- package/app/components/Ui/DropdownMenu/RadioItem.vue +3 -3
- package/app/components/Ui/DropdownMenu/Separator.vue +1 -1
- package/app/components/Ui/DropdownMenu/Shortcut.vue +1 -1
- package/app/components/Ui/DropdownMenu/SubContent.vue +3 -3
- package/app/components/Ui/DropdownMenu/SubTrigger.vue +5 -5
- package/app/components/Ui/FancyIcon.vue +5 -15
- package/app/components/Ui/GradientDivider.vue +16 -3
- package/app/components/Ui/IframeLazy.vue +10 -15
- package/app/components/Ui/Input.vue +12 -11
- package/app/components/Ui/InputGroup/Addon.vue +2 -3
- package/app/components/Ui/InputGroup/Button.vue +1 -0
- package/app/components/Ui/InputGroup/InputGroup.vue +1 -3
- package/app/components/Ui/InputGroup/Text.vue +1 -3
- package/app/components/Ui/Kbd/Group.vue +1 -3
- package/app/components/Ui/Kbd/Kbd.vue +7 -5
- package/app/components/Ui/Label.vue +2 -4
- package/app/components/Ui/ScrollArea/ScrollArea.vue +47 -4
- package/app/components/Ui/ScrollArea/Scrollbar.vue +1 -1
- package/app/components/Ui/ScrollArea/Thumb.vue +1 -1
- package/app/components/Ui/ScrollArea/Viewport.vue +1 -1
- package/app/components/Ui/Scrollspy.vue +1 -3
- package/app/components/Ui/Separator.vue +1 -3
- package/app/components/Ui/Skeleton.vue +2 -2
- package/app/components/Ui/Tabs/Content.vue +1 -1
- package/app/components/Ui/Tabs/Indicator.vue +1 -1
- package/app/components/Ui/Tabs/List.vue +1 -1
- package/app/components/Ui/Tabs/Trigger.vue +2 -2
- package/app/components/Ui/Textarea.vue +10 -10
- package/app/components/Ui/Tooltip/Arrow.vue +1 -1
- package/package.json +16 -16
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
const props = defineProps<
|
|
19
19
|
AvatarFallbackProps & {
|
|
20
|
-
/** The text to display inside the avatar */
|
|
20
|
+
/** The text to display inside the avatar. */
|
|
21
21
|
fallback?: string;
|
|
22
|
-
/** Custom class(es) to add to the element */
|
|
22
|
+
/** Custom class(es) to add to the element. */
|
|
23
23
|
class?: any;
|
|
24
24
|
}
|
|
25
25
|
>();
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
const props = defineProps<
|
|
15
15
|
AvatarImageProps & {
|
|
16
|
-
/** The alt text for the image */
|
|
16
|
+
/** The alt text for the image. */
|
|
17
17
|
alt?: string;
|
|
18
|
-
/** Custom class(es) to add to the element */
|
|
18
|
+
/** Custom class(es) to add to the element. */
|
|
19
19
|
class?: any;
|
|
20
20
|
}
|
|
21
21
|
>();
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
|
|
61
61
|
const props = defineProps<
|
|
62
62
|
NuxtLinkProps & {
|
|
63
|
-
/** Any additional class that should be added to the badge */
|
|
63
|
+
/** Any additional class that should be added to the badge. */
|
|
64
64
|
class?: HTMLAttributes["class"];
|
|
65
|
-
/** The variant of the badge */
|
|
65
|
+
/** The variant of the badge. */
|
|
66
66
|
variant?: BadgeProps["variant"];
|
|
67
|
-
/** The size of the badge */
|
|
67
|
+
/** The size of the badge. */
|
|
68
68
|
size?: BadgeProps["size"];
|
|
69
|
-
/** The action to perform when the badge is clicked */
|
|
69
|
+
/** The action to perform when the badge is clicked. */
|
|
70
70
|
onClick?: () => void;
|
|
71
|
-
/** Should the badge be disabled or not */
|
|
71
|
+
/** Should the badge be disabled or not. */
|
|
72
72
|
disabled?: boolean;
|
|
73
|
-
/** The element to render the badge as */
|
|
73
|
+
/** The element to render the badge as. */
|
|
74
74
|
tag?: string;
|
|
75
75
|
}
|
|
76
76
|
>();
|
|
@@ -68,21 +68,21 @@
|
|
|
68
68
|
<script setup lang="ts">
|
|
69
69
|
const props = withDefaults(
|
|
70
70
|
defineProps<{
|
|
71
|
-
/** The text shown in the badge addon pill */
|
|
71
|
+
/** The text shown in the badge addon pill. */
|
|
72
72
|
addonText: string;
|
|
73
|
-
/** Size of the badge group */
|
|
73
|
+
/** Size of the badge group. */
|
|
74
74
|
size?: BadgeGroupSize;
|
|
75
|
-
/** Color variant — only applies to the light theme */
|
|
75
|
+
/** Color variant — only applies to the light theme. */
|
|
76
76
|
color?: BadgeGroupColor;
|
|
77
77
|
/** Visual theme: pill-style (light) or card-style with dot (modern) */
|
|
78
78
|
theme?: BadgeGroupTheme;
|
|
79
|
-
/** Whether the badge addon appears before or after the main text */
|
|
79
|
+
/** Whether the badge addon appears before or after the main text. */
|
|
80
80
|
align?: BadgeGroupAlign;
|
|
81
81
|
/** Icon name passed to `<Icon>`. Set to `false` to hide the icon. */
|
|
82
82
|
icon?: string | false;
|
|
83
|
-
/** Animate the modern theme dot with a ping pulse */
|
|
83
|
+
/** Animate the modern theme dot with a ping pulse. */
|
|
84
84
|
pulse?: boolean;
|
|
85
|
-
/** Additional classes applied to the root element */
|
|
85
|
+
/** Additional classes applied to the root element. */
|
|
86
86
|
class?: HTMLAttributes["class"];
|
|
87
87
|
}>(),
|
|
88
88
|
{
|
|
@@ -88,10 +88,11 @@
|
|
|
88
88
|
export type BgPatternGridSize = "sm" | "md" | "lg";
|
|
89
89
|
|
|
90
90
|
export type BgPatternGridProps = {
|
|
91
|
-
/** Additional CSS classes */
|
|
91
|
+
/** Additional CSS classes. */
|
|
92
92
|
class?: HTMLAttributes["class"];
|
|
93
93
|
/**
|
|
94
|
-
* Size of the pattern
|
|
94
|
+
* Size of the pattern.
|
|
95
|
+
*
|
|
95
96
|
* @default "lg"
|
|
96
97
|
*/
|
|
97
98
|
size?: BgPatternGridSize;
|
|
@@ -37,45 +37,25 @@
|
|
|
37
37
|
import type { CSSProperties, HTMLAttributes } from "vue";
|
|
38
38
|
|
|
39
39
|
interface BorderBeamProps {
|
|
40
|
-
/**
|
|
41
|
-
* The size of the border beam.
|
|
42
|
-
*/
|
|
40
|
+
/** The size of the border beam. */
|
|
43
41
|
size?: number;
|
|
44
|
-
/**
|
|
45
|
-
* The duration of the border beam.
|
|
46
|
-
*/
|
|
42
|
+
/** The duration of the border beam. */
|
|
47
43
|
duration?: number;
|
|
48
|
-
/**
|
|
49
|
-
* The delay of the border beam.
|
|
50
|
-
*/
|
|
44
|
+
/** The delay of the border beam. */
|
|
51
45
|
delay?: number;
|
|
52
|
-
/**
|
|
53
|
-
* The color of the border beam from.
|
|
54
|
-
*/
|
|
46
|
+
/** The color of the border beam from. */
|
|
55
47
|
colorFrom?: string;
|
|
56
|
-
/**
|
|
57
|
-
* The color of the border beam to.
|
|
58
|
-
*/
|
|
48
|
+
/** The color of the border beam to. */
|
|
59
49
|
colorTo?: string;
|
|
60
|
-
/**
|
|
61
|
-
* The motion transition of the border beam.
|
|
62
|
-
*/
|
|
50
|
+
/** The motion transition of the border beam. */
|
|
63
51
|
transition?: Transition;
|
|
64
|
-
/**
|
|
65
|
-
* The class name of the border beam.
|
|
66
|
-
*/
|
|
52
|
+
/** The class name of the border beam. */
|
|
67
53
|
class?: HTMLAttributes["class"];
|
|
68
|
-
/**
|
|
69
|
-
* The style of the border beam.
|
|
70
|
-
*/
|
|
54
|
+
/** The style of the border beam. */
|
|
71
55
|
style?: CSSProperties;
|
|
72
|
-
/**
|
|
73
|
-
* Whether to reverse the animation direction.
|
|
74
|
-
*/
|
|
56
|
+
/** Whether to reverse the animation direction. */
|
|
75
57
|
reverse?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* The initial offset position (0-100).
|
|
78
|
-
*/
|
|
58
|
+
/** The initial offset position (0-100). */
|
|
79
59
|
initialOffset?: number;
|
|
80
60
|
}
|
|
81
61
|
</script>
|
|
@@ -65,22 +65,16 @@
|
|
|
65
65
|
link?: string;
|
|
66
66
|
disabled?: boolean;
|
|
67
67
|
slot?: string;
|
|
68
|
-
click?:
|
|
68
|
+
click?: Function;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const props = withDefaults(
|
|
72
72
|
defineProps<{
|
|
73
|
-
/**
|
|
74
|
-
* The items to display in the breadcrumbs.
|
|
75
|
-
*/
|
|
73
|
+
/** The items to display in the breadcrumbs. */
|
|
76
74
|
items?: BreadcrumbItem[];
|
|
77
|
-
/**
|
|
78
|
-
* The separator to use between each breadcrumb.
|
|
79
|
-
*/
|
|
75
|
+
/** The separator to use between each breadcrumb. */
|
|
80
76
|
separator?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Custom class(es) to add to the parent element.
|
|
83
|
-
*/
|
|
77
|
+
/** Custom class(es) to add to the parent element. */
|
|
84
78
|
class?: HTMLAttributes["class"];
|
|
85
79
|
}>(),
|
|
86
80
|
{
|
|
@@ -91,6 +85,7 @@
|
|
|
91
85
|
|
|
92
86
|
/**
|
|
93
87
|
* Detects if the current item is not the last item in the breadcrumbs.
|
|
88
|
+
*
|
|
94
89
|
* @param index - The index of the current item.
|
|
95
90
|
*/
|
|
96
91
|
const isNotLastItem = (index: number) => {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
size: size,
|
|
10
10
|
class: normalizeClass(props.class) || undefined,
|
|
11
11
|
effect: props.effect,
|
|
12
|
+
skeuomorphic: props.skeuomorphic,
|
|
12
13
|
})
|
|
13
14
|
"
|
|
14
15
|
:disabled="disabled || loading"
|
|
@@ -47,9 +48,7 @@
|
|
|
47
48
|
|
|
48
49
|
import type { NuxtLinkProps } from "#app/components";
|
|
49
50
|
|
|
50
|
-
/**
|
|
51
|
-
* Exported button styles that can be used by other components
|
|
52
|
-
*/
|
|
51
|
+
/** Exported button styles that can be used by other components. */
|
|
53
52
|
export const buttonStyles = tv({
|
|
54
53
|
base: "group inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
55
54
|
variants: {
|
|
@@ -62,6 +61,8 @@
|
|
|
62
61
|
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
63
62
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
64
63
|
link: "text-primary underline-offset-4 hover:underline",
|
|
64
|
+
gradient:
|
|
65
|
+
"bg-[linear-gradient(314deg,color-mix(in_oklch,var(--primary),white_33%),var(--primary))] text-primary-foreground shadow-xs transition-[filter] hover:brightness-110",
|
|
65
66
|
},
|
|
66
67
|
effect: {
|
|
67
68
|
expandIcon: "group relative gap-0",
|
|
@@ -97,6 +98,9 @@
|
|
|
97
98
|
hasIcon: {
|
|
98
99
|
false: "gap-2",
|
|
99
100
|
},
|
|
101
|
+
skeuomorphic: {
|
|
102
|
+
true: "[box-shadow:0px_0px_0px_1px_rgba(0,0,0,0.18)_inset,0px_-2px_0px_0px_rgba(0,0,0,0.05)_inset,var(--shadow-xs)]",
|
|
103
|
+
},
|
|
100
104
|
},
|
|
101
105
|
defaultVariants: {
|
|
102
106
|
variant: "default",
|
|
@@ -105,34 +109,34 @@
|
|
|
105
109
|
});
|
|
106
110
|
export type ButtonVariants = VariantProps<typeof buttonStyles>;
|
|
107
111
|
export type ButtonProps = NuxtLinkProps & {
|
|
108
|
-
/** The type for the button */
|
|
112
|
+
/** The type for the button. */
|
|
109
113
|
type?: "button" | "submit" | "reset";
|
|
110
|
-
/** Whether the button is disabled */
|
|
114
|
+
/** Whether the button is disabled. */
|
|
111
115
|
disabled?: boolean;
|
|
112
|
-
/** Whether the button is loading */
|
|
116
|
+
/** Whether the button is loading. */
|
|
113
117
|
loading?: boolean;
|
|
114
|
-
/** The action to perform when the button is clicked */
|
|
118
|
+
/** The action to perform when the button is clicked. */
|
|
115
119
|
onClick?: any;
|
|
116
|
-
/** The element to render the button as */
|
|
120
|
+
/** The element to render the button as. */
|
|
117
121
|
as?: string;
|
|
118
|
-
/** Custom class(es) to add to parent element */
|
|
122
|
+
/** Custom class(es) to add to parent element. */
|
|
119
123
|
class?: HtmlHTMLAttributes["class"];
|
|
120
|
-
/** The variant of the button */
|
|
124
|
+
/** The variant of the button. */
|
|
121
125
|
variant?: ButtonVariants["variant"];
|
|
122
|
-
/** The size of the button */
|
|
126
|
+
/** The size of the button. */
|
|
123
127
|
size?: ButtonVariants["size"];
|
|
124
|
-
/**
|
|
125
|
-
* The effect to apply to the button.
|
|
126
|
-
*/
|
|
128
|
+
/** The effect to apply to the button. */
|
|
127
129
|
effect?: ButtonVariants["effect"];
|
|
128
|
-
/** The text to display in the button */
|
|
130
|
+
/** The text to display in the button. */
|
|
129
131
|
text?: string;
|
|
130
132
|
/** Should the icon be displayed on the `left` or the `right`? */
|
|
131
133
|
iconPlacement?: "left" | "right";
|
|
132
|
-
/** The icon to display in the button */
|
|
134
|
+
/** The icon to display in the button. */
|
|
133
135
|
icon?: string;
|
|
134
|
-
/** The icon to display when the button is loading */
|
|
136
|
+
/** The icon to display when the button is loading. */
|
|
135
137
|
loadingIcon?: string;
|
|
138
|
+
/** Applies an inset skeuomorphic shadow for a tactile, raised appearance. */
|
|
139
|
+
skeuomorphic?: boolean;
|
|
136
140
|
};
|
|
137
141
|
</script>
|
|
138
142
|
|
|
@@ -163,7 +167,8 @@
|
|
|
163
167
|
"loading",
|
|
164
168
|
"disabled",
|
|
165
169
|
"loadingIcon",
|
|
166
|
-
"effect"
|
|
170
|
+
"effect",
|
|
171
|
+
"skeuomorphic"
|
|
167
172
|
)
|
|
168
173
|
);
|
|
169
174
|
</script>
|
|
@@ -35,12 +35,11 @@
|
|
|
35
35
|
export type ButtonGroupProps = PrimitiveProps & {
|
|
36
36
|
/**
|
|
37
37
|
* The orientation of the button group.
|
|
38
|
-
*
|
|
38
|
+
*
|
|
39
|
+
* @default "horizontal"
|
|
39
40
|
*/
|
|
40
41
|
orientation?: VariantProps<typeof buttonGroupVariants>["orientation"];
|
|
41
|
-
/**
|
|
42
|
-
* Additional classes to apply to the button group.
|
|
43
|
-
*/
|
|
42
|
+
/** Additional classes to apply to the button group. */
|
|
44
43
|
class?: HTMLAttributes["class"];
|
|
45
44
|
};
|
|
46
45
|
</script>
|
|
@@ -18,13 +18,9 @@
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
export type ButtonGroupSeparatorProps = {
|
|
21
|
-
/**
|
|
22
|
-
* The orientation of the separator.
|
|
23
|
-
*/
|
|
21
|
+
/** The orientation of the separator. */
|
|
24
22
|
orientation?: "horizontal" | "vertical";
|
|
25
|
-
/**
|
|
26
|
-
* Additional classes to apply to the button group text.
|
|
27
|
-
*/
|
|
23
|
+
/** Additional classes to apply to the button group text. */
|
|
28
24
|
class?: HTMLAttributes["class"];
|
|
29
25
|
};
|
|
30
26
|
</script>
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
export type ButtonGroupTextProps = PrimitiveProps & {
|
|
22
|
-
/**
|
|
23
|
-
* Additional classes to apply to the button group text.
|
|
24
|
-
*/
|
|
22
|
+
/** Additional classes to apply to the button group text. */
|
|
25
23
|
class?: HTMLAttributes["class"];
|
|
26
24
|
};
|
|
27
25
|
</script>
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
const props = withDefaults(
|
|
40
40
|
defineProps<
|
|
41
41
|
PrimitiveProps & {
|
|
42
|
-
/** Title that should be displayed. Passed to the `CardTitle` component */
|
|
42
|
+
/** Title that should be displayed. Passed to the `CardTitle` component. */
|
|
43
43
|
title?: string;
|
|
44
|
-
/** Description that should be displayed. Passed to the `CardDescription` component */
|
|
44
|
+
/** Description that should be displayed. Passed to the `CardDescription` component. */
|
|
45
45
|
description?: string;
|
|
46
|
-
/** Content that should be displayed. Passed to the `CardContent` component */
|
|
46
|
+
/** Content that should be displayed. Passed to the `CardContent` component. */
|
|
47
47
|
content?: string;
|
|
48
|
-
/** Custom class(es) to add to the element */
|
|
48
|
+
/** Custom class(es) to add to the element. */
|
|
49
49
|
class?: HTMLAttributes["class"];
|
|
50
50
|
}
|
|
51
51
|
>(),
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
const props = withDefaults(
|
|
21
21
|
defineProps<
|
|
22
22
|
PrimitiveProps & {
|
|
23
|
-
/** Content to display in the card */
|
|
23
|
+
/** Content to display in the card. */
|
|
24
24
|
content?: string;
|
|
25
|
-
/** Custom class(es) to add to the element */
|
|
25
|
+
/** Custom class(es) to add to the element. */
|
|
26
26
|
class?: HTMLAttributes["class"];
|
|
27
27
|
}
|
|
28
28
|
>(),
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
const props = withDefaults(
|
|
21
21
|
defineProps<
|
|
22
22
|
PrimitiveProps & {
|
|
23
|
-
/** Description to display in the card */
|
|
23
|
+
/** Description to display in the card. */
|
|
24
24
|
description?: string;
|
|
25
|
-
/** Custom class(es) to add to the element */
|
|
25
|
+
/** Custom class(es) to add to the element. */
|
|
26
26
|
class?: HTMLAttributes["class"];
|
|
27
27
|
}
|
|
28
28
|
>(),
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
const props = withDefaults(
|
|
21
21
|
defineProps<
|
|
22
22
|
PrimitiveProps & {
|
|
23
|
-
/** Title to display in the card */
|
|
23
|
+
/** Title to display in the card. */
|
|
24
24
|
title?: string;
|
|
25
|
-
/** Custom class(es) to add to the element */
|
|
25
|
+
/** Custom class(es) to add to the element. */
|
|
26
26
|
class?: HTMLAttributes["class"];
|
|
27
27
|
}
|
|
28
28
|
>(),
|
|
@@ -61,13 +61,7 @@
|
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
function filterItems() {
|
|
64
|
-
|
|
65
|
-
.trim()
|
|
66
|
-
.split(/\s+/)
|
|
67
|
-
.map((token) => token.trim())
|
|
68
|
-
.filter(Boolean);
|
|
69
|
-
|
|
70
|
-
if (!tokens.length) {
|
|
64
|
+
if (!filterState.search) {
|
|
71
65
|
filterState.filtered.count = allItems.value.size;
|
|
72
66
|
// Do nothing, each item will know to show itself because search is empty
|
|
73
67
|
return;
|
|
@@ -79,17 +73,9 @@
|
|
|
79
73
|
|
|
80
74
|
// Check which items should be included
|
|
81
75
|
for (const [id, value] of allItems.value) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
score = 0;
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
score += 1;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
filterState.filtered.items.set(id, score);
|
|
92
|
-
if (score > 0) itemCount++;
|
|
76
|
+
const score = contains(value, filterState.search);
|
|
77
|
+
filterState.filtered.items.set(id, score ? 1 : 0);
|
|
78
|
+
if (score) itemCount++;
|
|
93
79
|
}
|
|
94
80
|
|
|
95
81
|
// Check which groups have at least 1 item shown
|
|
@@ -41,13 +41,9 @@
|
|
|
41
41
|
* @default true
|
|
42
42
|
*/
|
|
43
43
|
showCloseButton?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Whether to render the dialog content with a translucent surface.
|
|
46
|
-
*/
|
|
44
|
+
/** Whether to render the dialog content with a translucent surface. */
|
|
47
45
|
translucent?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* When `true`, hover over item will trigger highlight
|
|
50
|
-
*/
|
|
46
|
+
/** When `true`, hover over item will trigger highlight. */
|
|
51
47
|
highlightOnHover?: boolean;
|
|
52
48
|
}
|
|
53
49
|
>(),
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
import { Primitive, type PrimitiveProps } from "reka-ui";
|
|
28
28
|
import { normalizeClass, type HTMLAttributes } from "vue";
|
|
29
29
|
export type CommandFooterProps = PrimitiveProps & {
|
|
30
|
-
/** Custom class(es) to add to the element */
|
|
30
|
+
/** Custom class(es) to add to the element. */
|
|
31
31
|
class?: HTMLAttributes["class"];
|
|
32
32
|
};
|
|
33
33
|
const styles = tv({
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
const props = withDefaults(
|
|
33
33
|
defineProps<
|
|
34
34
|
ListboxFilterProps & {
|
|
35
|
-
/** Custom class(es) to add to the element */
|
|
35
|
+
/** Custom class(es) to add to the element. */
|
|
36
36
|
class?: HTMLAttributes["class"];
|
|
37
37
|
/**
|
|
38
38
|
* The name of the icon to display for the search input.
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
|
|
39
39
|
const props = defineProps<
|
|
40
40
|
ListboxItemProps & {
|
|
41
|
-
/** Custom class(es) to add to the element */
|
|
41
|
+
/** Custom class(es) to add to the element. */
|
|
42
42
|
class?: HTMLAttributes["class"];
|
|
43
|
-
/** Icon to render */
|
|
43
|
+
/** Icon to render. */
|
|
44
44
|
icon?: string;
|
|
45
|
-
/** Text to render */
|
|
45
|
+
/** Text to render. */
|
|
46
46
|
text?: string;
|
|
47
|
-
/** Shortcut to render */
|
|
47
|
+
/** Shortcut to render. */
|
|
48
48
|
shortcut?: string;
|
|
49
49
|
}
|
|
50
50
|
>();
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
const groupContext = useCommandGroup();
|
|
61
61
|
|
|
62
62
|
const styles = tv({
|
|
63
|
-
base: "group/command-item relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none in-data-[slot=dialog-content]:rounded-lg! data-
|
|
63
|
+
base: "group/command-item relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none in-data-[slot=dialog-content]:rounded-lg! data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[state=checked]:bg-muted data-[state=checked]:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
const isRender = computed(() => {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
const props = defineProps<
|
|
18
18
|
PrimitiveProps & {
|
|
19
|
-
/** Custom class(es) to add to the element */
|
|
19
|
+
/** Custom class(es) to add to the element. */
|
|
20
20
|
class?: HTMLAttributes["class"];
|
|
21
|
-
/** The shortcut text to render */
|
|
21
|
+
/** The shortcut text to render. */
|
|
22
22
|
shortcut?: any;
|
|
23
23
|
}
|
|
24
24
|
>();
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
const props = withDefaults(
|
|
19
19
|
defineProps<
|
|
20
20
|
PrimitiveProps & {
|
|
21
|
-
/** Custom class(es) to add to the element */
|
|
21
|
+
/** Custom class(es) to add to the element. */
|
|
22
22
|
class?: HTMLAttributes["class"];
|
|
23
|
-
/** Whether to constrain the width of the container */
|
|
23
|
+
/** Whether to constrain the width of the container. */
|
|
24
24
|
constrained?: boolean;
|
|
25
25
|
}
|
|
26
26
|
>(),
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
const props = withDefaults(
|
|
21
21
|
defineProps<
|
|
22
22
|
ContextMenuArrowProps & {
|
|
23
|
-
/** Custom class(es) to add to the arrow */
|
|
23
|
+
/** Custom class(es) to add to the arrow. */
|
|
24
24
|
class?: HTMLAttributes["class"];
|
|
25
|
-
/** Whether to render the arrow with a translucent surface */
|
|
25
|
+
/** Whether to render the arrow with a translucent surface. */
|
|
26
26
|
translucent?: boolean;
|
|
27
27
|
}
|
|
28
28
|
>(),
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
|
|
25
25
|
const props = defineProps<
|
|
26
26
|
ContextMenuCheckboxItemProps & {
|
|
27
|
-
/**Custom class(es) to add to the element */
|
|
27
|
+
/** Custom class(es) to add to the element. */
|
|
28
28
|
class?: HTMLAttributes["class"];
|
|
29
|
-
/**The shortcut for the item */
|
|
29
|
+
/** The shortcut for the item. */
|
|
30
30
|
shortcut?: string;
|
|
31
|
-
/**The title for the item */
|
|
31
|
+
/** The title for the item. */
|
|
32
32
|
title?: string;
|
|
33
33
|
}
|
|
34
34
|
>();
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
const props = withDefaults(
|
|
26
26
|
defineProps<
|
|
27
27
|
ContextMenuContentProps & {
|
|
28
|
-
/** Custom class(es) to add to the element */
|
|
28
|
+
/** Custom class(es) to add to the element. */
|
|
29
29
|
class?: HTMLAttributes["class"];
|
|
30
|
-
/** Whether to render the content with a translucent surface */
|
|
30
|
+
/** Whether to render the content with a translucent surface. */
|
|
31
31
|
translucent?: boolean;
|
|
32
32
|
}
|
|
33
33
|
>(),
|