@pantograph/vue 0.34.5 → 0.34.7
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/{ComponentMap-C-aljC3v.js → ComponentMap-58eKCf1C.js} +1 -0
- package/dist/ComponentMap-DN-k4l0P.js +1 -0
- package/dist/ComponentMap.d.ts +1 -1
- package/dist/components/ActionButton/index.d.ts +1 -1
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts +235 -0
- package/dist/components/Banner/index.d.ts +9 -0
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts +5 -0
- package/dist/components/Combobox/Combobox.d.ts +6 -1
- package/dist/components/Combobox/Combobox.model.d.ts +8 -0
- package/dist/components/Combobox/context.d.ts +6 -4
- package/dist/components/Combobox/types.d.ts +13 -9
- package/dist/components/Comment/CommentMention.d.ts +13 -3
- package/dist/components/FloatButton/index.d.ts +1 -1
- package/dist/components/Popover/utils/usePopoverContext.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tree/types.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11720 -11415
- package/dist/index.umd.cjs +10 -10
- package/dist/nuxt/index.js +1 -1
- package/dist/nuxt/index.umd.cjs +1 -1
- package/dist/resolver/index.js +1 -1
- package/dist/resolver/index.umd.cjs +1 -1
- package/package.json +2 -2
- package/dist/ComponentMap-BYpmn7OL.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=["Accordion","AccordionItem","ActionButton","Alert","AlertDialog","Avatar","AvatarGroup","Badge","Banner","Blanket","Breadcrumb","Button","ButtonGroup","Card","Checkbox","CheckboxGroup","Chip","ChipGroup","CoachMark","ColorPicker","ColorSwatch","ColorSwatchGroup","ColorTrigger","Combobox","ComboboxInput","ComboboxOption","Comment","CommentAction","CommentReaction","CommentReactionListItem","CommentReactionHoverCard","CommentMention","CommentEditor","CommentTrigger","ConfigProvider","DataTable","Dialog","DialogTitle","Divider","Drawer","DrawerTitle","DropZone","Empty","FloatButton","Form","FormItem","FormValidation","GOPicker","GraphicalObject","GraphicalObjectGroup","HoverCard","Icon","IconButton","Image","IndentLevel","Indicator","Input","InputGroup","InputNumber","Kbd","Label","Link","Menu","MenuItem","Modal","ModalTitle","PageIndicator","Pagination","PinInput","Popover","Progress","RadioGroup","RadioGroupItem","Rate","ScrollContainer","Segmented","Select","SelectOption","SelectLabel","Shortcut","Skeleton","Spinner","Stepper","Steps","Step","SubMenu","Switch","Table","Th","Td","Tr","TBody","THead","TFoot","Tabs","TabList","TabTrigger","TabContent","Textarea","Toast","Tooltip","TooltipProvider","Tree","TreeNode","Upload","UploadList","UploadTrigger"];exports.components=o;
|
package/dist/ComponentMap.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const components: readonly ["Accordion", "AccordionItem", "ActionButton", "Alert", "AlertDialog", "Avatar", "AvatarGroup", "Badge", "Blanket", "Breadcrumb", "Button", "ButtonGroup", "Card", "Checkbox", "CheckboxGroup", "Chip", "ChipGroup", "CoachMark", "ColorPicker", "ColorSwatch", "ColorSwatchGroup", "ColorTrigger", "Combobox", "ComboboxInput", "ComboboxOption", "Comment", "CommentAction", "CommentReaction", "CommentReactionListItem", "CommentReactionHoverCard", "CommentMention", "CommentEditor", "CommentTrigger", "ConfigProvider", "DataTable", "Dialog", "DialogTitle", "Divider", "Drawer", "DrawerTitle", "DropZone", "Empty", "FloatButton", "Form", "FormItem", "FormValidation", "GOPicker", "GraphicalObject", "GraphicalObjectGroup", "HoverCard", "Icon", "IconButton", "Image", "IndentLevel", "Indicator", "Input", "InputGroup", "InputNumber", "Kbd", "Label", "Link", "Menu", "MenuItem", "Modal", "ModalTitle", "PageIndicator", "Pagination", "PinInput", "Popover", "Progress", "RadioGroup", "RadioGroupItem", "Rate", "ScrollContainer", "Segmented", "Select", "SelectOption", "SelectLabel", "Shortcut", "Skeleton", "Spinner", "Stepper", "Steps", "Step", "SubMenu", "Switch", "Table", "Th", "Td", "Tr", "TBody", "THead", "TFoot", "Tabs", "TabList", "TabTrigger", "TabContent", "Textarea", "Toast", "Tooltip", "TooltipProvider", "Tree", "TreeNode", "Upload", "UploadList", "UploadTrigger"];
|
|
1
|
+
export declare const components: readonly ["Accordion", "AccordionItem", "ActionButton", "Alert", "AlertDialog", "Avatar", "AvatarGroup", "Badge", "Banner", "Blanket", "Breadcrumb", "Button", "ButtonGroup", "Card", "Checkbox", "CheckboxGroup", "Chip", "ChipGroup", "CoachMark", "ColorPicker", "ColorSwatch", "ColorSwatchGroup", "ColorTrigger", "Combobox", "ComboboxInput", "ComboboxOption", "Comment", "CommentAction", "CommentReaction", "CommentReactionListItem", "CommentReactionHoverCard", "CommentMention", "CommentEditor", "CommentTrigger", "ConfigProvider", "DataTable", "Dialog", "DialogTitle", "Divider", "Drawer", "DrawerTitle", "DropZone", "Empty", "FloatButton", "Form", "FormItem", "FormValidation", "GOPicker", "GraphicalObject", "GraphicalObjectGroup", "HoverCard", "Icon", "IconButton", "Image", "IndentLevel", "Indicator", "Input", "InputGroup", "InputNumber", "Kbd", "Label", "Link", "Menu", "MenuItem", "Modal", "ModalTitle", "PageIndicator", "Pagination", "PinInput", "Popover", "Progress", "RadioGroup", "RadioGroupItem", "Rate", "ScrollContainer", "Segmented", "Select", "SelectOption", "SelectLabel", "Shortcut", "Skeleton", "Spinner", "Stepper", "Steps", "Step", "SubMenu", "Switch", "Table", "Th", "Td", "Tr", "TBody", "THead", "TFoot", "Tabs", "TabList", "TabTrigger", "TabContent", "Textarea", "Toast", "Tooltip", "TooltipProvider", "Tree", "TreeNode", "Upload", "UploadList", "UploadTrigger"];
|
|
2
2
|
export default components;
|
|
3
3
|
export type Components = (typeof components)[number];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as ActionButton, ActionButtonProps, ActionButtonSlots, ACTION_BUTTON_DEFAULT_PROPS } from './ActionButton';
|
|
2
2
|
import { DefineComponent } from '@pantograph/utils-vue';
|
|
3
|
-
export { ActionButton, type ActionButtonProps, type ActionButtonSlots, ACTION_BUTTON_DEFAULT_PROPS
|
|
3
|
+
export { ActionButton, type ActionButtonProps, type ActionButtonSlots, ACTION_BUTTON_DEFAULT_PROPS };
|
|
4
4
|
declare module 'vue' {
|
|
5
5
|
interface GlobalComponents {
|
|
6
6
|
ActionButton: DefineComponent<ActionButtonProps, ActionButtonSlots>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as Alert, AlertProps, AlertEmits, AlertSlots, ALERT_DEFAULT_PROPS } from './Alert';
|
|
2
2
|
import { DefineComponent } from '@pantograph/utils-vue';
|
|
3
|
-
export { Alert, type AlertProps, type AlertEmits, type AlertSlots, ALERT_DEFAULT_PROPS
|
|
3
|
+
export { Alert, type AlertProps, type AlertEmits, type AlertSlots, ALERT_DEFAULT_PROPS };
|
|
4
4
|
declare module 'vue' {
|
|
5
5
|
interface GlobalComponents {
|
|
6
6
|
Alert: DefineComponent<AlertProps, AlertSlots, AlertEmits>;
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
import { IconProps } from '../Icon';
|
|
4
|
+
import { IconButtonProps } from '../IconButton';
|
|
5
|
+
import { LinkProps } from '../Link';
|
|
6
|
+
import { PopoverBaseProps } from '../Popover';
|
|
7
|
+
import { BannerColor, BannerPlacement, BannerPosition } from './Banner.model';
|
|
8
|
+
/**
|
|
9
|
+
* Props for the Banner component
|
|
10
|
+
*/
|
|
11
|
+
export interface BannerProps {
|
|
12
|
+
/**
|
|
13
|
+
* The color variant of the banner
|
|
14
|
+
* @default 'primary'
|
|
15
|
+
*/
|
|
16
|
+
color?: BannerColor;
|
|
17
|
+
/**
|
|
18
|
+
* The placement of the banner (top or bottom)
|
|
19
|
+
* @default 'top'
|
|
20
|
+
*/
|
|
21
|
+
placement?: BannerPlacement;
|
|
22
|
+
/**
|
|
23
|
+
* The position type of the banner (absolute or fixed)
|
|
24
|
+
* @default 'fixed'
|
|
25
|
+
*/
|
|
26
|
+
position?: BannerPosition;
|
|
27
|
+
/**
|
|
28
|
+
* Target element where the banner should be rendered via Teleport
|
|
29
|
+
* Can be a string selector, HTMLElement, component instance, or function
|
|
30
|
+
* @default 'body'
|
|
31
|
+
*/
|
|
32
|
+
to?: PopoverBaseProps['to'];
|
|
33
|
+
/**
|
|
34
|
+
* Offset from the placement edge (top or bottom)
|
|
35
|
+
* Can be a number (in pixels) or a string (e.g., '10px', '1rem')
|
|
36
|
+
* @default 0
|
|
37
|
+
*/
|
|
38
|
+
offset?: number | string;
|
|
39
|
+
/**
|
|
40
|
+
* Z-index value for the banner
|
|
41
|
+
*/
|
|
42
|
+
zIndex?: number | string;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to defer the Teleport mounting
|
|
45
|
+
*/
|
|
46
|
+
defer?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether to force mount the Teleport content
|
|
49
|
+
*/
|
|
50
|
+
forceMount?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Text direction for the banner
|
|
53
|
+
*/
|
|
54
|
+
dir?: 'ltr' | 'rtl' | 'auto';
|
|
55
|
+
/**
|
|
56
|
+
* Whether the banner can be closed by the user
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
closeable?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Props to pass to the close button (IconButton)
|
|
62
|
+
*/
|
|
63
|
+
closeProps?: IconButtonProps;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the banner content should wrap to multiple lines
|
|
66
|
+
* When true, the layout changes to accommodate longer content
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
wrapped?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether to hide the default icon
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
noIcon?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Title text for the banner (supports HTML)
|
|
77
|
+
*/
|
|
78
|
+
title?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Whether to show a link in the banner
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
link?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Props to pass to the link component
|
|
86
|
+
*/
|
|
87
|
+
linkProps?: LinkProps;
|
|
88
|
+
/**
|
|
89
|
+
* Props to pass to the icon component
|
|
90
|
+
*/
|
|
91
|
+
iconProps?: IconProps;
|
|
92
|
+
/**
|
|
93
|
+
* Whether to show an action button
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
action?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Props to pass to the action button
|
|
99
|
+
*/
|
|
100
|
+
actionProps?: ButtonProps;
|
|
101
|
+
/**
|
|
102
|
+
* CSS classes to apply to the content container
|
|
103
|
+
*/
|
|
104
|
+
contentCls?: ClassValue;
|
|
105
|
+
/**
|
|
106
|
+
* CSS classes to apply to the root banner element
|
|
107
|
+
*/
|
|
108
|
+
class?: ClassValue;
|
|
109
|
+
/**
|
|
110
|
+
* CSS classes to apply to the divider element (used in wrapped mode)
|
|
111
|
+
*/
|
|
112
|
+
dividerCls?: ClassValue;
|
|
113
|
+
/**
|
|
114
|
+
* CSS classes to apply to the actions container
|
|
115
|
+
*/
|
|
116
|
+
actionsCls?: ClassValue;
|
|
117
|
+
/**
|
|
118
|
+
* CSS classes to apply to the body element
|
|
119
|
+
*/
|
|
120
|
+
bodyCls?: ClassValue;
|
|
121
|
+
/**
|
|
122
|
+
* CSS classes to apply to the title element
|
|
123
|
+
*/
|
|
124
|
+
titleCls?: ClassValue;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Events emitted by the Banner component
|
|
128
|
+
*/
|
|
129
|
+
export interface BannerEmits {
|
|
130
|
+
/**
|
|
131
|
+
* Emitted when the banner is closed by the user
|
|
132
|
+
* @param data - The pointer event that triggered the close action
|
|
133
|
+
*/
|
|
134
|
+
close: [data: PointerEvent];
|
|
135
|
+
/**
|
|
136
|
+
* Emitted when the action button is clicked
|
|
137
|
+
* @param data - The pointer event that triggered the action
|
|
138
|
+
*/
|
|
139
|
+
action: [data: PointerEvent];
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Slots available in the Banner component
|
|
143
|
+
*/
|
|
144
|
+
export interface BannerSlots {
|
|
145
|
+
/**
|
|
146
|
+
* Default slot for custom content
|
|
147
|
+
*/
|
|
148
|
+
default: (params?: object) => never;
|
|
149
|
+
/**
|
|
150
|
+
* Custom icon content
|
|
151
|
+
* Overrides the default icon based on color variant
|
|
152
|
+
*/
|
|
153
|
+
icon: (params?: object) => never;
|
|
154
|
+
/**
|
|
155
|
+
* Custom title content
|
|
156
|
+
* Overrides the title prop and supports HTML content
|
|
157
|
+
*/
|
|
158
|
+
title: (params?: object) => never;
|
|
159
|
+
/**
|
|
160
|
+
* Custom close button content
|
|
161
|
+
* Overrides the default close button
|
|
162
|
+
*/
|
|
163
|
+
close: (params?: object) => never;
|
|
164
|
+
/**
|
|
165
|
+
* Custom action button content
|
|
166
|
+
* Overrides the default action button
|
|
167
|
+
*/
|
|
168
|
+
action: (params?: object) => never;
|
|
169
|
+
/**
|
|
170
|
+
* Custom icon for the close button
|
|
171
|
+
*/
|
|
172
|
+
closeIcon: (params?: object) => never;
|
|
173
|
+
/**
|
|
174
|
+
* Custom actions container content
|
|
175
|
+
* Used in wrapped mode to customize the entire actions area
|
|
176
|
+
*/
|
|
177
|
+
actions: (params?: object) => never;
|
|
178
|
+
/**
|
|
179
|
+
* Custom pre-icon for the action button
|
|
180
|
+
*/
|
|
181
|
+
actionPreIcon: (params?: object) => never;
|
|
182
|
+
/**
|
|
183
|
+
* Custom post-icon for the action button
|
|
184
|
+
*/
|
|
185
|
+
actionPostIcon: (params?: object) => never;
|
|
186
|
+
/**
|
|
187
|
+
* Custom link content
|
|
188
|
+
* Overrides the default link component
|
|
189
|
+
*/
|
|
190
|
+
link: (params?: object) => never;
|
|
191
|
+
/**
|
|
192
|
+
* Custom leading icon for the link
|
|
193
|
+
*/
|
|
194
|
+
linkLeadingIcon: (params?: object) => never;
|
|
195
|
+
/**
|
|
196
|
+
* Custom trailing icon for the link
|
|
197
|
+
*/
|
|
198
|
+
linkTrailingIcon: (params?: object) => never;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Default props for the Banner component
|
|
202
|
+
*/
|
|
203
|
+
export declare const BANNER_DEFAULT_PROPS: {
|
|
204
|
+
readonly color: "primary";
|
|
205
|
+
readonly linkProps: () => {
|
|
206
|
+
txs: "label";
|
|
207
|
+
underline: boolean;
|
|
208
|
+
text: string;
|
|
209
|
+
trailingIcon: string;
|
|
210
|
+
};
|
|
211
|
+
readonly actionProps: () => {
|
|
212
|
+
text: string;
|
|
213
|
+
};
|
|
214
|
+
readonly placement: "top";
|
|
215
|
+
readonly position: "fixed";
|
|
216
|
+
};
|
|
217
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<BannerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
218
|
+
close: (data: PointerEvent) => any;
|
|
219
|
+
action: (data: PointerEvent) => any;
|
|
220
|
+
}, string, import('vue').PublicProps, Readonly<BannerProps> & Readonly<{
|
|
221
|
+
onClose?: ((data: PointerEvent) => any) | undefined;
|
|
222
|
+
onAction?: ((data: PointerEvent) => any) | undefined;
|
|
223
|
+
}>, {
|
|
224
|
+
color: "primary" | "primary-subtle" | "neutral" | "danger" | "success" | "warning" | "info" | "success-subtle" | "danger-subtle" | "warning-subtle" | "info-subtle" | "neutral-subtle";
|
|
225
|
+
placement: "top" | "bottom";
|
|
226
|
+
position: "fixed" | "absolute";
|
|
227
|
+
linkProps: LinkProps;
|
|
228
|
+
actionProps: Partial<Omit<import('../..').BaseButtonProps, "flipOnDir" | "icon" | "variant" | "action" | "active" | "badgeText" | "badgeIcon" | "badgeIconFlipOnDir">>;
|
|
229
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<BannerSlots> & BannerSlots>;
|
|
230
|
+
export default _default;
|
|
231
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
232
|
+
new (): {
|
|
233
|
+
$slots: S;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as Banner, BannerProps, BannerEmits, BannerSlots, BANNER_DEFAULT_PROPS } from './Banner';
|
|
2
|
+
import { DefineComponent } from '@pantograph/utils-vue';
|
|
3
|
+
export { Banner, type BannerProps, type BannerEmits, type BannerSlots, BANNER_DEFAULT_PROPS };
|
|
4
|
+
declare module 'vue' {
|
|
5
|
+
interface GlobalComponents {
|
|
6
|
+
Banner: DefineComponent<BannerProps, BannerSlots, BannerEmits>;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export * from './Banner.model';
|
|
@@ -153,8 +153,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Ch
|
|
|
153
153
|
color: "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "teal" | "cyan" | "sky" | "blue" | "ocean" | "violet" | "amethyst" | "fuchsia" | "pink" | "mallard" | "primary" | "gray" | "default";
|
|
154
154
|
closeable: boolean;
|
|
155
155
|
unExtendParent: boolean;
|
|
156
|
-
selected: boolean;
|
|
157
156
|
closeIcon: string;
|
|
157
|
+
selected: boolean;
|
|
158
158
|
overlayActions: boolean;
|
|
159
159
|
closeTrigger: "click" | "pointer";
|
|
160
160
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, Readonly<ChipSlots> & ChipSlots>;
|
|
@@ -26,13 +26,16 @@ export declare const COMBO_BOX_DEFAULT_PROPS: {
|
|
|
26
26
|
readonly resetSearchTermOnBlur: true;
|
|
27
27
|
readonly resetSearchTermOnSelect: false;
|
|
28
28
|
readonly selectedItemIconAsTrailingIcon: true;
|
|
29
|
+
readonly showTreeTagStrategy: "all";
|
|
29
30
|
};
|
|
30
31
|
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<ComboboxProps, {
|
|
32
|
+
displaySelectedKeys: import('vue').ComputedRef<string[]>;
|
|
31
33
|
isOptionSelected: (value?: string | undefined) => boolean;
|
|
32
34
|
getOptionByValue: (value: string) => ComboboxFlattenOptionType | undefined;
|
|
33
35
|
getLabelByValue: (value: string) => string | undefined;
|
|
34
36
|
getSingleByValue: (value: string) => boolean;
|
|
35
|
-
focusOnInput: () => void;
|
|
37
|
+
focusOnInput: (e?: PointerEvent | undefined) => void;
|
|
38
|
+
removeValue: (value?: string | number | undefined) => void;
|
|
36
39
|
getFlattenOption: (item: ComboboxOptionType) => ComboboxFlattenOptionType;
|
|
37
40
|
getOptionDataset: (option: ComboboxFlattenOptionType) => Record<string, any>;
|
|
38
41
|
getDisabled: import('vue').ComputedRef<boolean>;
|
|
@@ -118,6 +121,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
118
121
|
resetSearchTermOnSelect: boolean;
|
|
119
122
|
noValueOnPlaceholder: boolean;
|
|
120
123
|
tagRenderMode: "go" | "avatar" | "chip";
|
|
124
|
+
showTreeTagStrategy: "all" | "child" | "parent";
|
|
121
125
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
122
126
|
scrollContainerRef: ({
|
|
123
127
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -426,6 +430,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
426
430
|
readonly getSwitcherIcon?: import('@pantograph/utils').OptionGetter<string | undefined> | undefined;
|
|
427
431
|
readonly getDisabled?: import('@pantograph/utils').OptionGetter<boolean | undefined> | undefined;
|
|
428
432
|
readonly getChildren?: import('@pantograph/utils').OptionGetter<object[] | undefined> | undefined;
|
|
433
|
+
readonly getHidden?: import('@pantograph/utils').OptionGetter<boolean | undefined> | undefined;
|
|
429
434
|
readonly groupName?: string | ((node?: object | undefined) => string) | undefined;
|
|
430
435
|
readonly sortableProps?: (Omit<import('@pantograph/sortable').SortableOptions, "onMove"> & {
|
|
431
436
|
onMove?: ((evt: import('../Tree').TreeDragMoveEvent, originalEvent: Event) => boolean | void | 1 | -1) | undefined;
|
|
@@ -14,3 +14,11 @@ export declare const ComboboxStatuses: readonly ["error", "warning", "success",
|
|
|
14
14
|
* Type representing the possible combobox statuses
|
|
15
15
|
*/
|
|
16
16
|
export type ComboboxStatus = (typeof ComboboxStatuses)[number];
|
|
17
|
+
/**
|
|
18
|
+
* Array of available tree tag strategies
|
|
19
|
+
*/
|
|
20
|
+
export declare const ComboboxTreeTagStrategies: readonly ["all", "parent", "child"];
|
|
21
|
+
/**
|
|
22
|
+
* Type representing the possible tree tag strategies
|
|
23
|
+
*/
|
|
24
|
+
export type ComboboxTreeTagStrategy = (typeof ComboboxTreeTagStrategies)[number];
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { ComboboxFlattenOptionType, ComboboxProps, ComboboxEmits, ComboboxSlots, ComboboxOptionType } from './types';
|
|
2
|
-
import { EmitFn, ComputedRef, Ref } from 'vue';
|
|
3
|
-
import { ComboboxSize, ComboboxStatus } from './Combobox.model';
|
|
4
1
|
import { CollectionMap, CollectionMapItem } from '@pantograph/utils-vue';
|
|
2
|
+
import { ComputedRef, EmitFn, Ref } from 'vue';
|
|
3
|
+
import { ComboboxSize, ComboboxStatus } from './Combobox.model';
|
|
4
|
+
import { ComboboxEmits, ComboboxFlattenOptionType, ComboboxOptionType, ComboboxProps, ComboboxSlots } from './types';
|
|
5
5
|
export interface ComboboxContext {
|
|
6
|
+
displaySelectedKeys: ComputedRef<string[]>;
|
|
6
7
|
isOptionSelected: (value?: string) => boolean;
|
|
7
8
|
getOptionByValue: (value: string) => ComboboxFlattenOptionType | undefined;
|
|
8
9
|
getLabelByValue: (value: string) => string | undefined;
|
|
9
10
|
getSingleByValue: (value: string) => boolean;
|
|
10
|
-
focusOnInput: () => void;
|
|
11
|
+
focusOnInput: (e?: PointerEvent) => void;
|
|
12
|
+
removeValue: (value?: string | number) => void;
|
|
11
13
|
getFlattenOption: (item: ComboboxOptionType) => ComboboxFlattenOptionType;
|
|
12
14
|
getOptionDataset: (option: ComboboxFlattenOptionType) => Record<string, any>;
|
|
13
15
|
getDisabled: ComputedRef<boolean>;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SkeletonProps } from '../Skeleton';
|
|
3
|
-
import { ComboboxSize, ComboboxStatus } from './Combobox.model';
|
|
1
|
+
import { OptionGetter } from '@pantograph/utils';
|
|
4
2
|
import { EmitToProp } from '@pantograph/utils-vue';
|
|
5
|
-
import { ScrollContainerProps } from '../ScrollContainer';
|
|
6
|
-
import { EmptyProps } from '../Empty';
|
|
7
3
|
import { ClassValue } from 'clsx';
|
|
4
|
+
import { ChipSlotProps } from '../Chip';
|
|
5
|
+
import { EmptyProps } from '../Empty';
|
|
6
|
+
import { MenuItemProps } from '../MenuItem';
|
|
7
|
+
import { MenuItemLeadingProps } from '../MenuItem/MenuItemContent';
|
|
8
|
+
import { PopoverBaseProps, PopoverEmits, PopoverProps } from '../Popover';
|
|
9
|
+
import { ScrollContainerProps } from '../ScrollContainer';
|
|
10
|
+
import { SkeletonProps } from '../Skeleton';
|
|
8
11
|
import { TreeEmits, TreeProps } from '../Tree';
|
|
9
|
-
import { OptionGetter } from '@pantograph/utils';
|
|
10
12
|
import { FlattenItem } from '../Tree/utils';
|
|
11
|
-
import {
|
|
12
|
-
import { MenuItemProps } from '../MenuItem';
|
|
13
|
+
import { ComboboxSize, ComboboxStatus, ComboboxTreeTagStrategy } from './Combobox.model';
|
|
13
14
|
import { ComboboxInputProps } from './ComboboxInput';
|
|
14
|
-
import { ChipSlotProps } from '../Chip';
|
|
15
15
|
export type ComboboxDefOptionType = {
|
|
16
|
+
hidden?: boolean;
|
|
16
17
|
disabled?: boolean;
|
|
17
18
|
label?: string;
|
|
18
19
|
description?: string;
|
|
@@ -35,6 +36,7 @@ export type ComboboxFlattenOptionType = FlattenItem & {
|
|
|
35
36
|
_divider?: boolean;
|
|
36
37
|
_id?: string;
|
|
37
38
|
_custom?: boolean;
|
|
39
|
+
_hidden?: boolean;
|
|
38
40
|
};
|
|
39
41
|
export interface ComboboxProps extends Partial<Pick<PopoverProps, 'placement' | 'containerProps' | 'reversePlacementOnDir' | 'open' | 'defaultOpen' | 'zIndex' | 'to' | 'sideOffset' | 'alignOffset' | 'reference' | 'prioritizePosition' | 'avoidCollisions' | 'dir' | 'noTrigger' | 'ignoreParentTo' | 'disableOutsidePointerEvents'>> {
|
|
40
42
|
modelValue?: string | string[];
|
|
@@ -55,6 +57,7 @@ export interface ComboboxProps extends Partial<Pick<PopoverProps, 'placement' |
|
|
|
55
57
|
getTagProps?: (option?: ComboboxFlattenOptionType) => Record<string, any>;
|
|
56
58
|
tree?: boolean;
|
|
57
59
|
treeProps?: Omit<TreeProps, 'modelValue' | 'checkedKeys' | 'expandedKeys'>;
|
|
60
|
+
showTreeTagStrategy?: ComboboxTreeTagStrategy;
|
|
58
61
|
contentFit?: boolean;
|
|
59
62
|
wrapped?: boolean;
|
|
60
63
|
sortSelectedItems?: boolean;
|
|
@@ -76,6 +79,7 @@ export interface ComboboxProps extends Partial<Pick<PopoverProps, 'placement' |
|
|
|
76
79
|
getClear?: OptionGetter<boolean>;
|
|
77
80
|
getOptions?: OptionGetter<ComboboxOptionType[]>;
|
|
78
81
|
getIcon?: OptionGetter;
|
|
82
|
+
getHidden?: OptionGetter<boolean>;
|
|
79
83
|
loading?: boolean;
|
|
80
84
|
skeletonProps?: SkeletonProps & Record<string, any>;
|
|
81
85
|
loadingRowCount?: number;
|
|
@@ -30,6 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
30
30
|
resetSearchTermOnSelect: boolean;
|
|
31
31
|
noValueOnPlaceholder: boolean;
|
|
32
32
|
tagRenderMode: "go" | "avatar" | "chip";
|
|
33
|
+
showTreeTagStrategy: "all" | "child" | "parent";
|
|
33
34
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
35
|
comboboxRef: ({
|
|
35
36
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -53,6 +54,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
53
54
|
readonly getTagProps?: ((option?: import('../Combobox').ComboboxFlattenOptionType | undefined) => Record<string, any>) | undefined;
|
|
54
55
|
readonly tree?: boolean | undefined;
|
|
55
56
|
readonly treeProps?: Omit<import('../Tree').TreeProps, "modelValue" | "checkedKeys" | "expandedKeys"> | undefined;
|
|
57
|
+
readonly showTreeTagStrategy?: "all" | "child" | "parent" | undefined;
|
|
56
58
|
readonly contentFit?: boolean | undefined;
|
|
57
59
|
readonly wrapped?: boolean | undefined;
|
|
58
60
|
readonly sortSelectedItems?: boolean | undefined;
|
|
@@ -74,6 +76,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
74
76
|
readonly getClear?: import('@pantograph/utils').OptionGetter<boolean> | undefined;
|
|
75
77
|
readonly getOptions?: import('@pantograph/utils').OptionGetter<ComboboxOptionType[]> | undefined;
|
|
76
78
|
readonly getIcon?: import('@pantograph/utils').OptionGetter | undefined;
|
|
79
|
+
readonly getHidden?: import('@pantograph/utils').OptionGetter<boolean> | undefined;
|
|
77
80
|
readonly loading?: boolean | undefined;
|
|
78
81
|
readonly skeletonProps?: (import('../Skeleton').SkeletonProps & Record<string, any>) | undefined;
|
|
79
82
|
readonly loadingRowCount?: number | undefined;
|
|
@@ -458,6 +461,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
458
461
|
readonly getSwitcherIcon?: import('@pantograph/utils').OptionGetter<string | undefined> | undefined;
|
|
459
462
|
readonly getDisabled?: import('@pantograph/utils').OptionGetter<boolean | undefined> | undefined;
|
|
460
463
|
readonly getChildren?: import('@pantograph/utils').OptionGetter<object[] | undefined> | undefined;
|
|
464
|
+
readonly getHidden?: import('@pantograph/utils').OptionGetter<boolean | undefined> | undefined;
|
|
461
465
|
readonly groupName?: string | ((node?: object | undefined) => string) | undefined;
|
|
462
466
|
readonly sortableProps?: (Omit<import('@pantograph/sortable').SortableOptions, "onMove"> & {
|
|
463
467
|
onMove?: ((evt: import('../Tree').TreeDragMoveEvent, originalEvent: Event) => boolean | void | 1 | -1) | undefined;
|
|
@@ -662,11 +666,13 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
662
666
|
"onUpdate:search"?: ((value?: string | null | undefined) => any) | undefined;
|
|
663
667
|
onFetch?: (() => any) | undefined;
|
|
664
668
|
}>, {
|
|
669
|
+
displaySelectedKeys: import('vue').ComputedRef<string[]>;
|
|
665
670
|
isOptionSelected: (value?: string | undefined) => boolean;
|
|
666
671
|
getOptionByValue: (value: string) => import('../Combobox').ComboboxFlattenOptionType | undefined;
|
|
667
672
|
getLabelByValue: (value: string) => string | undefined;
|
|
668
673
|
getSingleByValue: (value: string) => boolean;
|
|
669
|
-
focusOnInput: () => void;
|
|
674
|
+
focusOnInput: (e?: PointerEvent | undefined) => void;
|
|
675
|
+
removeValue: (value?: string | number | undefined) => void;
|
|
670
676
|
getFlattenOption: (item: ComboboxOptionType) => import('../Combobox').ComboboxFlattenOptionType;
|
|
671
677
|
getOptionDataset: (option: import('../Combobox').ComboboxFlattenOptionType) => Record<string, any>;
|
|
672
678
|
getDisabled: import('vue').ComputedRef<boolean>;
|
|
@@ -735,6 +741,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
735
741
|
resetSearchTermOnSelect: boolean;
|
|
736
742
|
noValueOnPlaceholder: boolean;
|
|
737
743
|
tagRenderMode: "go" | "avatar" | "chip";
|
|
744
|
+
showTreeTagStrategy: "all" | "child" | "parent";
|
|
738
745
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
739
746
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
740
747
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -780,6 +787,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
780
787
|
resetSearchTermOnSelect: boolean;
|
|
781
788
|
noValueOnPlaceholder: boolean;
|
|
782
789
|
tagRenderMode: "go" | "avatar" | "chip";
|
|
790
|
+
showTreeTagStrategy: "all" | "child" | "parent";
|
|
783
791
|
}> & Omit<Readonly<ComboboxProps> & Readonly<{
|
|
784
792
|
onSearch?: ((value?: string | null | undefined) => any) | undefined;
|
|
785
793
|
onSelect?: ((value: string | undefined, selected: boolean, option?: import('../Combobox').ComboboxFlattenOptionType | undefined) => any) | undefined;
|
|
@@ -797,12 +805,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<Co
|
|
|
797
805
|
onKeydownEscape?: ((event: import('../Combobox').ComboboxKeydownEvent, search?: string | undefined, isEmpty?: boolean | undefined) => any) | undefined;
|
|
798
806
|
"onUpdate:search"?: ((value?: string | null | undefined) => any) | undefined;
|
|
799
807
|
onFetch?: (() => any) | undefined;
|
|
800
|
-
}>, "props" | "placeholder" | "slots" | "emit" | "getIconSize" | "getDisabled" | "getStatus" | "getSize" | "triggerRef" | "openModel" | "model" | "getItems" | "inputRef" | "onKeyDown" | "focusOnInput" | "getOptionDataset" | ("disabled" | "readonly" | "bordered" | "multiple" | "open" | "defaultOpen" | "prioritizePosition" | "placement" | "sideOffset" | "avoidCollisions" | "disableOutsidePointerEvents" | "zIndex" | "checkbox" | "trailingIcon" | "selectedItemIconAsTrailingIcon" | "indicatorIcon" | "loadingRowCount" | "clearOnChangeMultiple" | "samePopupWidth" | "popupHeight" | "resetSearchTermOnBlur" | "resetSearchTermOnSelect" | "noValueOnPlaceholder" | "tagRenderMode") | "isOptionSelected" | "getOptionByValue" | "getLabelByValue" | "getSingleByValue" | "getFlattenOption" | "getTagSize" | "comboboxInputBinding" | "comboboxTriggerBinding" | "searchModel" | "valuePlaceholder" | "selectOption" | "itemMap" | "highlightedOptionKey" | "comboboxInputFocused" | "inputGroupClass"> & import('vue').ShallowUnwrapRef<{
|
|
808
|
+
}>, "props" | "placeholder" | "slots" | "emit" | "getIconSize" | "getDisabled" | "getStatus" | "getSize" | "triggerRef" | "openModel" | "model" | "getItems" | "inputRef" | "onKeyDown" | "focusOnInput" | "getOptionDataset" | ("disabled" | "readonly" | "bordered" | "multiple" | "open" | "defaultOpen" | "prioritizePosition" | "placement" | "sideOffset" | "avoidCollisions" | "disableOutsidePointerEvents" | "zIndex" | "checkbox" | "trailingIcon" | "selectedItemIconAsTrailingIcon" | "indicatorIcon" | "loadingRowCount" | "clearOnChangeMultiple" | "samePopupWidth" | "popupHeight" | "resetSearchTermOnBlur" | "resetSearchTermOnSelect" | "noValueOnPlaceholder" | "tagRenderMode" | "showTreeTagStrategy") | "displaySelectedKeys" | "isOptionSelected" | "getOptionByValue" | "getLabelByValue" | "getSingleByValue" | "removeValue" | "getFlattenOption" | "getTagSize" | "comboboxInputBinding" | "comboboxTriggerBinding" | "searchModel" | "valuePlaceholder" | "selectOption" | "itemMap" | "highlightedOptionKey" | "comboboxInputFocused" | "inputGroupClass"> & import('vue').ShallowUnwrapRef<{
|
|
809
|
+
displaySelectedKeys: import('vue').ComputedRef<string[]>;
|
|
801
810
|
isOptionSelected: (value?: string | undefined) => boolean;
|
|
802
811
|
getOptionByValue: (value: string) => import('../Combobox').ComboboxFlattenOptionType | undefined;
|
|
803
812
|
getLabelByValue: (value: string) => string | undefined;
|
|
804
813
|
getSingleByValue: (value: string) => boolean;
|
|
805
|
-
focusOnInput: () => void;
|
|
814
|
+
focusOnInput: (e?: PointerEvent | undefined) => void;
|
|
815
|
+
removeValue: (value?: string | number | undefined) => void;
|
|
806
816
|
getFlattenOption: (item: ComboboxOptionType) => import('../Combobox').ComboboxFlattenOptionType;
|
|
807
817
|
getOptionDataset: (option: import('../Combobox').ComboboxFlattenOptionType) => Record<string, any>;
|
|
808
818
|
getDisabled: import('vue').ComputedRef<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as FloatButton, FloatButtonProps, FloatButtonSlots, FLOAT_BUTTON_DEFAULT_PROPS } from './FloatButton';
|
|
2
2
|
import { DefineComponent } from '@pantograph/utils-vue';
|
|
3
|
-
export { FloatButton, type FloatButtonProps, type FloatButtonSlots, FLOAT_BUTTON_DEFAULT_PROPS
|
|
3
|
+
export { FloatButton, type FloatButtonProps, type FloatButtonSlots, FLOAT_BUTTON_DEFAULT_PROPS };
|
|
4
4
|
declare module 'vue' {
|
|
5
5
|
interface GlobalComponents {
|
|
6
6
|
FloatButton: DefineComponent<FloatButtonProps, FloatButtonSlots>;
|
|
@@ -22,7 +22,6 @@ export declare const usePopoverContext: ({ slots, prefix, props, emit, emitsAsPr
|
|
|
22
22
|
size?: string | null | undefined;
|
|
23
23
|
noPadding?: string | null | undefined;
|
|
24
24
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
25
|
-
asChild: import('vue').ShallowRef<boolean, boolean>;
|
|
26
25
|
rootOpenProp: import('vue').ComputedRef<{
|
|
27
26
|
open: boolean | undefined;
|
|
28
27
|
'onUpdate:open': (value: boolean) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TooltipContentEmits,
|
|
1
|
+
import { TooltipContentEmits, TooltipContentProps, TooltipPortalProps, TooltipProviderProps, TooltipRootEmits, TooltipRootProps, TooltipTriggerProps } from 'reka-ui';
|
|
2
2
|
import { GraphicalObjectProps, GraphicalObjectSlots } from '../GraphicalObject';
|
|
3
3
|
import { PopoverBaseProps } from '../Popover';
|
|
4
4
|
import { ShortcutProps } from '../Shortcut';
|
|
@@ -30,6 +30,8 @@ export type TreeNodeType = {
|
|
|
30
30
|
noRotateSwitcherIcon?: boolean;
|
|
31
31
|
/** Key of the node */
|
|
32
32
|
key: string;
|
|
33
|
+
/** Whether the node is hidden */
|
|
34
|
+
hidden?: boolean;
|
|
33
35
|
};
|
|
34
36
|
/**
|
|
35
37
|
* Type representing a flattened tree item
|
|
@@ -49,6 +51,8 @@ export type TreeItem = object & FlattenItem & {
|
|
|
49
51
|
_loading?: boolean;
|
|
50
52
|
/** Whether to not rotate the switcher icon */
|
|
51
53
|
_noRotateSwitcherIcon?: boolean;
|
|
54
|
+
/** Whether the item is hidden */
|
|
55
|
+
_hidden?: boolean;
|
|
52
56
|
};
|
|
53
57
|
/**
|
|
54
58
|
* Interface for extra parameters in tree drag events
|
|
@@ -166,6 +170,8 @@ export interface TreeProps extends Partial<Pick<TreeNodeType, 'switcherIcon' | '
|
|
|
166
170
|
getDisabled?: OptionGetter<boolean | undefined>;
|
|
167
171
|
/** Function to get the children of a node */
|
|
168
172
|
getChildren?: OptionGetter<object[] | undefined>;
|
|
173
|
+
/** Function to determine if a node is hidden */
|
|
174
|
+
getHidden?: OptionGetter<boolean | undefined>;
|
|
169
175
|
/** Group name for drag and drop between trees */
|
|
170
176
|
groupName?: string | ((node?: object) => string);
|
|
171
177
|
/** Sortable options for drag and drop functionality */
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './components/AlertDialog';
|
|
|
6
6
|
export * from './components/Avatar';
|
|
7
7
|
export * from './components/AvatarGroup';
|
|
8
8
|
export * from './components/Badge';
|
|
9
|
+
export * from './components/Banner';
|
|
9
10
|
export * from './components/Blanket';
|
|
10
11
|
export * from './components/Breadcrumb';
|
|
11
12
|
export * from './components/Button';
|