@plexui/vue 0.21.0 → 0.23.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/dist/es/components/Alert/Alert.js +16 -4
- package/dist/es/components/Alert/Alert.js.map +1 -1
- package/dist/es/components/ColorPicker/ColorPicker.js +13 -9
- package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/es/components/ColorPicker/ColorWell.js +5 -3
- package/dist/es/components/ColorPicker/ColorWell.js.map +1 -1
- package/dist/es/components/ColorPicker/shared.js +5 -4
- package/dist/es/components/ColorPicker/shared.js.map +1 -1
- package/dist/es/components/ContextMenu/ContextMenu.js +9 -9
- package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -1
- package/dist/es/components/ContextMenu/shared.js +25 -5
- package/dist/es/components/ContextMenu/shared.js.map +1 -1
- package/dist/es/components/DataTable/columnHelpers.js +88 -6
- package/dist/es/components/DataTable/columnHelpers.js.map +1 -1
- package/dist/es/components/DatePicker/DatePicker.js +3 -3
- package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/es/components/DatePicker/useCalendarCollisionPadding.js +25 -0
- package/dist/es/components/DatePicker/useCalendarCollisionPadding.js.map +1 -0
- package/dist/es/components/DateRangePicker/DateRangePicker.js +3 -3
- package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +2 -2
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Input/Input.js +3 -0
- package/dist/es/components/Input/Input.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +10 -1
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/PhoneLayout/PhoneLayout.js +9 -1
- package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -1
- package/dist/es/components/Popover/Popover.js +2 -2
- package/dist/es/components/Popover/Popover.js.map +1 -1
- package/dist/es/components/ProgressSteps/ProgressSteps.js +7 -3
- package/dist/es/components/ProgressSteps/ProgressSteps.js.map +1 -1
- package/dist/es/components/ProgressSteps/index.js.map +1 -1
- package/dist/es/components/Select/Select.js +178 -32
- package/dist/es/components/Select/Select.js.map +1 -1
- package/dist/es/components/SelectControl/SelectControl.js +3 -1
- package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
- package/dist/es/components/Slider/Slider.js +24 -11
- package/dist/es/components/Slider/Slider.js.map +1 -1
- package/dist/es/components/Slider/sliderPrimitive.js +5 -2
- package/dist/es/components/Slider/sliderPrimitive.js.map +1 -1
- package/dist/es/components/Sortable/Sortable.js +1 -1
- package/dist/es/components/Sortable/Sortable.js.map +1 -1
- package/dist/es/components/StatCard/index.js +4 -1
- package/dist/es/components/StatCard/index.js.map +1 -1
- package/dist/es/components/{StatCard/StatCard.js → StatsCard/StatsCard.js} +32 -27
- package/dist/es/components/StatsCard/StatsCard.js.map +1 -0
- package/dist/es/components/StatsCard/index.js +2 -0
- package/dist/es/components/StatsCard/index.js.map +1 -0
- package/dist/es/components/SwipeActions/SwipeActions.js +32 -5
- package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -1
- package/dist/es/components/TabBar/TabBar.js +52 -21
- package/dist/es/components/TabBar/TabBar.js.map +1 -1
- package/dist/es/components/Tabs/Tabs.js +229 -6
- package/dist/es/components/Tabs/Tabs.js.map +1 -1
- package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/es/lib/menuTriggerCover.js +40 -3
- package/dist/es/lib/menuTriggerCover.js.map +1 -1
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +3 -2
- package/dist/types/components/ColorPicker/shared.d.ts +5 -4
- package/dist/types/components/ContextMenu/shared.d.ts +28 -6
- package/dist/types/components/DatePicker/useCalendarCollisionPadding.d.ts +9 -0
- package/dist/types/components/Dialog/Dialog.d.ts +2 -2
- package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +5 -0
- package/dist/types/components/Popover/Popover.d.ts +5 -5
- package/dist/types/components/ProgressSteps/ProgressSteps.d.ts +17 -3
- package/dist/types/components/ProgressSteps/index.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +19 -8
- package/dist/types/components/StatCard/index.d.ts +9 -1
- package/dist/types/components/{StatCard/StatCard.d.ts → StatsCard/StatsCard.d.ts} +19 -19
- package/dist/types/components/StatsCard/index.d.ts +1 -0
- package/dist/types/components/SwipeActions/SwipeActions.d.ts +4 -4
- package/dist/types/components/TabBar/TabBar.d.ts +34 -0
- package/dist/types/components/Tabs/Tabs.d.ts +33 -2
- package/dist/types/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/types/lib/menuTriggerCover.d.ts +16 -2
- package/package.json +2 -2
- package/dist/es/components/DatePicker/useCalendarGutter.js +0 -14
- package/dist/es/components/DatePicker/useCalendarGutter.js.map +0 -1
- package/dist/es/components/StatCard/StatCard.js.map +0 -1
- package/dist/types/components/DatePicker/useCalendarGutter.d.ts +0 -2
|
@@ -10,7 +10,8 @@ type Rect = {
|
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Where the menu opens: at the pointer, under the element for the keyboard, or beside a touch-and-hold preview. A
|
|
13
|
-
* preview's `rect` is where it stands
|
|
13
|
+
* preview's `rect` is where it stands; once the menu is measured, `side` is the side of the preview it opens on and
|
|
14
|
+
* `shift` how far the preview moved up so that the menu stands whole below it.
|
|
14
15
|
*/
|
|
15
16
|
export type ContextMenuPresentation = {
|
|
16
17
|
kind: "pointer";
|
|
@@ -22,18 +23,23 @@ export type ContextMenuPresentation = {
|
|
|
22
23
|
kind: "preview";
|
|
23
24
|
rect: Rect;
|
|
24
25
|
radius: number;
|
|
25
|
-
align: "start" | "end";
|
|
26
|
+
align: "start" | "center" | "end";
|
|
27
|
+
side?: "top" | "bottom";
|
|
26
28
|
shift?: number;
|
|
27
29
|
};
|
|
28
30
|
/**
|
|
29
31
|
* The preview of a touch and hold: the element's box and corner (its own, or `--context-menu-preview-radius`), and
|
|
30
|
-
*
|
|
32
|
+
* where the menu keeps to across it, as iOS 27.2 places it by where the element stands on the screen, wherever the
|
|
33
|
+
* touch (ref-app menus-context, block 8): in the leading third its leading edge, in the trailing third its trailing
|
|
34
|
+
* edge, else its centre (a full-width row, a tile in the middle). The kit draws only Side=Leading and Side=Trailing.
|
|
35
|
+
* The screen is a PhoneLayout's box when the element is in one (a phone Dialog's scope has no box: the window is its
|
|
36
|
+
* screen), as for a menu that covers its trigger (menuTriggerCover.ts).
|
|
31
37
|
*/
|
|
32
|
-
export declare function contextMenuPreview(element: HTMLElement
|
|
38
|
+
export declare function contextMenuPreview(element: HTMLElement): ContextMenuPresentation;
|
|
33
39
|
/** The menu's side, alignment and offsets for a presentation. */
|
|
34
40
|
export declare function contextMenuPlacement(presentation: ContextMenuPresentation | null): {
|
|
35
|
-
side: "bottom";
|
|
36
|
-
align: "end" | "start";
|
|
41
|
+
side: "bottom" | "top";
|
|
42
|
+
align: "center" | "end" | "start";
|
|
37
43
|
sideOffset: number;
|
|
38
44
|
alignOffset: number;
|
|
39
45
|
};
|
|
@@ -63,6 +69,22 @@ export declare function contextMenuPreviewShift(rect: Rect, height: number, room
|
|
|
63
69
|
top: number;
|
|
64
70
|
bottom: number;
|
|
65
71
|
}, ceiling?: number, scale?: number): number;
|
|
72
|
+
/**
|
|
73
|
+
* The side a preview's menu opens on, and how far the preview moves up for it: above, unmoved, when the preview stands
|
|
74
|
+
* in the lower half of the room and the menu stands whole above it, as iOS 27.2 opens a menu toward the larger room
|
|
75
|
+
* (ref-app menus-context-small, block 8: a tile low on the screen opens its menu above, with room below too); else
|
|
76
|
+
* below, the preview moved up as `contextMenuPreviewShift` says.
|
|
77
|
+
*/
|
|
78
|
+
export declare function contextMenuPreviewLayout(rect: Rect, height: number, room: {
|
|
79
|
+
top: number;
|
|
80
|
+
bottom: number;
|
|
81
|
+
}, ceiling?: number, scale?: number): {
|
|
82
|
+
side: "top";
|
|
83
|
+
shift: number;
|
|
84
|
+
} | {
|
|
85
|
+
side: "bottom";
|
|
86
|
+
shift: number;
|
|
87
|
+
};
|
|
66
88
|
/** The top of the nearest box that clips the element: moved above it, the element would not be seen. */
|
|
67
89
|
export declare function contextMenuClipTop(element: HTMLElement): number;
|
|
68
90
|
/** A menu's height without the limit of the room it is given: the panel, and what its items scroll out of sight. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
2
|
+
export type CalendarCollisionPadding = {
|
|
3
|
+
top: number;
|
|
4
|
+
right: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const calendarCollisionPadding: (width: number) => CalendarCollisionPadding;
|
|
9
|
+
export declare const useCalendarCollisionPadding: () => ComputedRef<CalendarCollisionPadding>;
|
|
@@ -194,7 +194,7 @@ export declare const DialogDescriptionSlot: import("vue").DefineComponent<{}, ()
|
|
|
194
194
|
[key: string]: any;
|
|
195
195
|
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
196
196
|
export declare const DialogFooter: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
197
|
-
/** Override the mobile action layout.
|
|
197
|
+
/** Override the mobile action layout. Two alert actions default to inline, three or more and sheets to stacked. */
|
|
198
198
|
mobileLayout: PropType<"inline" | "stacked">;
|
|
199
199
|
/** How the bar meets the content scrolled under it in a phone Sheet. @default "soft" */
|
|
200
200
|
background: {
|
|
@@ -204,7 +204,7 @@ export declare const DialogFooter: import("vue").DefineComponent<import("vue").E
|
|
|
204
204
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
205
205
|
[key: string]: any;
|
|
206
206
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
207
|
-
/** Override the mobile action layout.
|
|
207
|
+
/** Override the mobile action layout. Two alert actions default to inline, three or more and sheets to stacked. */
|
|
208
208
|
mobileLayout: PropType<"inline" | "stacked">;
|
|
209
209
|
/** How the bar meets the content scrolled under it in a phone Sheet. @default "soft" */
|
|
210
210
|
background: {
|
|
@@ -19,3 +19,8 @@ export declare const PhoneLayout: import("vue").DefineComponent<{}, () => import
|
|
|
19
19
|
* in a window 767px wide or narrower. The server answers false outside a PhoneLayout.
|
|
20
20
|
*/
|
|
21
21
|
export declare const usePhoneLayout: () => ComputedRef<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the window is 767px wide or narrower, whatever PhoneLayout is around: for a part portaled out of one, which
|
|
24
|
+
* its phone rules do not reach (a Select's list). The server answers false.
|
|
25
|
+
*/
|
|
26
|
+
export declare const usePhoneWindow: () => Ref<boolean>;
|
|
@@ -68,9 +68,9 @@ export declare const PopoverContent: import("vue").DefineComponent<ExtractPropTy
|
|
|
68
68
|
type: BooleanConstructor;
|
|
69
69
|
default: undefined;
|
|
70
70
|
};
|
|
71
|
-
/** Distance from viewport and scroll container boundaries, in pixels. @default 20 */
|
|
71
|
+
/** Distance from viewport and scroll container boundaries, in pixels; an object sets it per side, and a side it leaves out gets 0. @default 20 */
|
|
72
72
|
collisionPadding: {
|
|
73
|
-
type:
|
|
73
|
+
type: PropType<number | Partial<Record<PopoverSide, number>>>;
|
|
74
74
|
default: number;
|
|
75
75
|
};
|
|
76
76
|
/** `width` of the popover; numbers are pixels. @default "auto" */
|
|
@@ -108,9 +108,9 @@ export declare const PopoverContent: import("vue").DefineComponent<ExtractPropTy
|
|
|
108
108
|
type: BooleanConstructor;
|
|
109
109
|
default: undefined;
|
|
110
110
|
};
|
|
111
|
-
/** Distance from viewport and scroll container boundaries, in pixels. @default 20 */
|
|
111
|
+
/** Distance from viewport and scroll container boundaries, in pixels; an object sets it per side, and a side it leaves out gets 0. @default 20 */
|
|
112
112
|
collisionPadding: {
|
|
113
|
-
type:
|
|
113
|
+
type: PropType<number | Partial<Record<PopoverSide, number>>>;
|
|
114
114
|
default: number;
|
|
115
115
|
};
|
|
116
116
|
/** `width` of the popover; numbers are pixels. @default "auto" */
|
|
@@ -143,7 +143,7 @@ export declare const PopoverContent: import("vue").DefineComponent<ExtractPropTy
|
|
|
143
143
|
}>> & Readonly<{}>, {
|
|
144
144
|
sideOffset: number;
|
|
145
145
|
avoidCollisions: boolean;
|
|
146
|
-
collisionPadding: number
|
|
146
|
+
collisionPadding: number | Partial<Record<PopoverSide, number>>;
|
|
147
147
|
translucent: boolean;
|
|
148
148
|
autoFocus: boolean;
|
|
149
149
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -114,10 +114,24 @@ export declare const ProgressStepsStep: import("vue").DefineComponent<import("vu
|
|
|
114
114
|
_index: number;
|
|
115
115
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
116
116
|
export type StepProps = InstanceType<typeof ProgressStepsStep>["$props"];
|
|
117
|
-
/** Step title. Like React, only `class` reaches the DOM from attributes.
|
|
118
|
-
|
|
117
|
+
/** Step title. Like React, only `class` reaches the DOM from attributes. `visuallyHidden` hides it from view and keeps
|
|
118
|
+
* it for screen readers, for steps that show their indicators alone; the step then takes no room under its indicator. */
|
|
119
|
+
export declare const ProgressStepsTitle: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
120
|
+
visuallyHidden: {
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
default: boolean;
|
|
123
|
+
};
|
|
124
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
119
125
|
[key: string]: any;
|
|
120
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<
|
|
126
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
127
|
+
visuallyHidden: {
|
|
128
|
+
type: BooleanConstructor;
|
|
129
|
+
default: boolean;
|
|
130
|
+
};
|
|
131
|
+
}>> & Readonly<{}>, {
|
|
132
|
+
visuallyHidden: boolean;
|
|
133
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
134
|
+
export type TitleProps = InstanceType<typeof ProgressStepsTitle>["$props"];
|
|
121
135
|
/** Step description. Like React, only `class` reaches the DOM from attributes. */
|
|
122
136
|
export declare const ProgressStepsDescription: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
123
137
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ProgressSteps, ProgressStepsDescription, ProgressStepsStep, ProgressStepsTitle, type ProgressStepsProps, type StepIconProp, type StepProps, } from "./ProgressSteps.js";
|
|
1
|
+
export { ProgressSteps, ProgressStepsDescription, ProgressStepsStep, ProgressStepsTitle, type ProgressStepsProps, type StepIconProp, type StepProps, type TitleProps, } from "./ProgressSteps.js";
|
|
@@ -133,20 +133,25 @@ declare const SelectComponent: import("vue").DefineComponent<import("vue").Extra
|
|
|
133
133
|
triggerClassName: StringConstructor;
|
|
134
134
|
/** Applies a negative margin using the current gutter to optically align the trigger. */
|
|
135
135
|
opticallyAlign: PropType<"start" | "end">;
|
|
136
|
-
/** Display a clear action that allows the select to be unset. @default false */
|
|
136
|
+
/** Display a clear action that allows the select to be unset. On a phone it is the first row of the list, `noneLabel`, as an iOS pop-up button unsets its value with a None row instead of a clear button; a custom `trigger` keeps its own clearing and gets no None row. @default false */
|
|
137
137
|
clearable: {
|
|
138
138
|
type: BooleanConstructor;
|
|
139
139
|
default: boolean;
|
|
140
140
|
};
|
|
141
|
+
/** Label of the row that unsets a `clearable` select on a phone. @default "None" */
|
|
142
|
+
noneLabel: {
|
|
143
|
+
type: StringConstructor;
|
|
144
|
+
default: string;
|
|
145
|
+
};
|
|
141
146
|
/** Extends select to 100% of available width. @default true, except for the ghost variant */
|
|
142
147
|
block: {
|
|
143
148
|
type: BooleanConstructor;
|
|
144
149
|
default: undefined;
|
|
145
150
|
};
|
|
146
|
-
/** Preferred side of the trigger to render against when open. @default "bottom" */
|
|
151
|
+
/** Preferred side of the trigger to render against when open. Without one the list opens below its trigger, and on a phone over it, toward the larger part of the screen. @default "bottom" */
|
|
147
152
|
side: {
|
|
148
153
|
type: PropType<PopoverSide>;
|
|
149
|
-
default:
|
|
154
|
+
default: undefined;
|
|
150
155
|
};
|
|
151
156
|
/** Preferred alignment against the trigger. @default "end" at the end of a `Field row` ("start" in a `FieldGroup columns`), "center" when block, otherwise "start" */
|
|
152
157
|
align: PropType<PopoverAlign>;
|
|
@@ -175,7 +180,7 @@ declare const SelectComponent: import("vue").DefineComponent<import("vue").Extra
|
|
|
175
180
|
type: StringConstructor;
|
|
176
181
|
default: string;
|
|
177
182
|
};
|
|
178
|
-
/** Size of the search input in the menu
|
|
183
|
+
/** Size of the search input in the menu. A phone list has no search: it is an iOS menu, and a long one scrolls. @default "md" */
|
|
179
184
|
searchSize: PropType<ControlSize>;
|
|
180
185
|
/** Message displayed when search results are empty (or the `#searchEmptyMessage` slot) */
|
|
181
186
|
searchEmptyMessage: {
|
|
@@ -282,20 +287,25 @@ declare const SelectComponent: import("vue").DefineComponent<import("vue").Extra
|
|
|
282
287
|
triggerClassName: StringConstructor;
|
|
283
288
|
/** Applies a negative margin using the current gutter to optically align the trigger. */
|
|
284
289
|
opticallyAlign: PropType<"start" | "end">;
|
|
285
|
-
/** Display a clear action that allows the select to be unset. @default false */
|
|
290
|
+
/** Display a clear action that allows the select to be unset. On a phone it is the first row of the list, `noneLabel`, as an iOS pop-up button unsets its value with a None row instead of a clear button; a custom `trigger` keeps its own clearing and gets no None row. @default false */
|
|
286
291
|
clearable: {
|
|
287
292
|
type: BooleanConstructor;
|
|
288
293
|
default: boolean;
|
|
289
294
|
};
|
|
295
|
+
/** Label of the row that unsets a `clearable` select on a phone. @default "None" */
|
|
296
|
+
noneLabel: {
|
|
297
|
+
type: StringConstructor;
|
|
298
|
+
default: string;
|
|
299
|
+
};
|
|
290
300
|
/** Extends select to 100% of available width. @default true, except for the ghost variant */
|
|
291
301
|
block: {
|
|
292
302
|
type: BooleanConstructor;
|
|
293
303
|
default: undefined;
|
|
294
304
|
};
|
|
295
|
-
/** Preferred side of the trigger to render against when open. @default "bottom" */
|
|
305
|
+
/** Preferred side of the trigger to render against when open. Without one the list opens below its trigger, and on a phone over it, toward the larger part of the screen. @default "bottom" */
|
|
296
306
|
side: {
|
|
297
307
|
type: PropType<PopoverSide>;
|
|
298
|
-
default:
|
|
308
|
+
default: undefined;
|
|
299
309
|
};
|
|
300
310
|
/** Preferred alignment against the trigger. @default "end" at the end of a `Field row` ("start" in a `FieldGroup columns`), "center" when block, otherwise "start" */
|
|
301
311
|
align: PropType<PopoverAlign>;
|
|
@@ -324,7 +334,7 @@ declare const SelectComponent: import("vue").DefineComponent<import("vue").Extra
|
|
|
324
334
|
type: StringConstructor;
|
|
325
335
|
default: string;
|
|
326
336
|
};
|
|
327
|
-
/** Size of the search input in the menu
|
|
337
|
+
/** Size of the search input in the menu. A phone list has no search: it is an iOS menu, and a long one scrolls. @default "md" */
|
|
328
338
|
searchSize: PropType<ControlSize>;
|
|
329
339
|
/** Message displayed when search results are empty (or the `#searchEmptyMessage` slot) */
|
|
330
340
|
searchEmptyMessage: {
|
|
@@ -364,6 +374,7 @@ declare const SelectComponent: import("vue").DefineComponent<import("vue").Extra
|
|
|
364
374
|
dropdownIconType: DropdownIconType;
|
|
365
375
|
loadingPlaceholder: string;
|
|
366
376
|
allSelectedLabel: string;
|
|
377
|
+
noneLabel: string;
|
|
367
378
|
searchPlaceholder: string;
|
|
368
379
|
searchAriaLabel: string;
|
|
369
380
|
searchEmptyMessage: string | number | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { StatsCard, type StatsCardAccentColor, type StatsCardProps, type StatsCardTrend } from "../StatsCard/index.js";
|
|
2
|
+
/** @deprecated Renamed to `StatsCard`: `import { StatsCard } from "@plexui/vue/components/StatsCard"`. */
|
|
3
|
+
export declare const StatCard: typeof StatsCard;
|
|
4
|
+
/** @deprecated Renamed to `StatsCardAccentColor`. */
|
|
5
|
+
export type StatCardAccentColor = StatsCardAccentColor;
|
|
6
|
+
/** @deprecated Renamed to `StatsCardProps`. */
|
|
7
|
+
export type StatCardProps = StatsCardProps;
|
|
8
|
+
/** @deprecated Renamed to `StatsCardTrend`. */
|
|
9
|
+
export type StatCardTrend = StatsCardTrend;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type HTMLAttributes, type PropType } from "vue";
|
|
2
|
-
export type
|
|
2
|
+
export type StatsCardTrend = {
|
|
3
3
|
/** The percentage change value (e.g. 12.5 for +12.5%) */
|
|
4
4
|
value: number;
|
|
5
5
|
/** Optional label for the trend (e.g. "vs last month") */
|
|
6
6
|
label?: string;
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
9
|
-
declare const
|
|
8
|
+
export type StatsCardAccentColor = "primary" | "secondary" | "info" | "success" | "warning" | "danger" | "discovery" | "caution";
|
|
9
|
+
declare const StatsCardComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
10
|
/** Label describing the metric */
|
|
11
11
|
label: {
|
|
12
12
|
type: StringConstructor;
|
|
@@ -20,7 +20,7 @@ declare const StatCardComponent: import("vue").DefineComponent<import("vue").Ext
|
|
|
20
20
|
/** Optional description or subtitle below the value */
|
|
21
21
|
description: StringConstructor;
|
|
22
22
|
/** Trend indicator with percentage change */
|
|
23
|
-
trend: PropType<
|
|
23
|
+
trend: PropType<StatsCardTrend>;
|
|
24
24
|
/** When true, a positive trend is bad (red) and negative is good (green). Use for metrics like "Error Rate" or "Avg Completion Time". */
|
|
25
25
|
invertTrend: {
|
|
26
26
|
type: BooleanConstructor;
|
|
@@ -28,11 +28,11 @@ declare const StatCardComponent: import("vue").DefineComponent<import("vue").Ext
|
|
|
28
28
|
};
|
|
29
29
|
/** Progress value from 0 to 100. Shows a progress bar at the bottom. */
|
|
30
30
|
progress: NumberConstructor;
|
|
31
|
-
/** Label displayed
|
|
31
|
+
/** Label displayed after the progress bar */
|
|
32
32
|
progressLabel: StringConstructor;
|
|
33
33
|
/** Tooltip text: renders an (i) icon next to the label with a tooltip on hover */
|
|
34
34
|
tooltip: StringConstructor;
|
|
35
|
-
/** Where the trend indicator is positioned:
|
|
35
|
+
/** Where the trend indicator is positioned: under the value with its label, or right-aligned in the header row (its label under the value). @default "value" */
|
|
36
36
|
trendPosition: {
|
|
37
37
|
type: PropType<"value" | "header">;
|
|
38
38
|
default: string;
|
|
@@ -52,9 +52,9 @@ declare const StatCardComponent: import("vue").DefineComponent<import("vue").Ext
|
|
|
52
52
|
type: PropType<"default" | "accent">;
|
|
53
53
|
default: string;
|
|
54
54
|
};
|
|
55
|
-
/**
|
|
55
|
+
/** Color of the accent variant's bar. @default "primary" */
|
|
56
56
|
accentColor: {
|
|
57
|
-
type: PropType<
|
|
57
|
+
type: PropType<StatsCardAccentColor>;
|
|
58
58
|
default: string;
|
|
59
59
|
};
|
|
60
60
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
@@ -73,7 +73,7 @@ declare const StatCardComponent: import("vue").DefineComponent<import("vue").Ext
|
|
|
73
73
|
/** Optional description or subtitle below the value */
|
|
74
74
|
description: StringConstructor;
|
|
75
75
|
/** Trend indicator with percentage change */
|
|
76
|
-
trend: PropType<
|
|
76
|
+
trend: PropType<StatsCardTrend>;
|
|
77
77
|
/** When true, a positive trend is bad (red) and negative is good (green). Use for metrics like "Error Rate" or "Avg Completion Time". */
|
|
78
78
|
invertTrend: {
|
|
79
79
|
type: BooleanConstructor;
|
|
@@ -81,11 +81,11 @@ declare const StatCardComponent: import("vue").DefineComponent<import("vue").Ext
|
|
|
81
81
|
};
|
|
82
82
|
/** Progress value from 0 to 100. Shows a progress bar at the bottom. */
|
|
83
83
|
progress: NumberConstructor;
|
|
84
|
-
/** Label displayed
|
|
84
|
+
/** Label displayed after the progress bar */
|
|
85
85
|
progressLabel: StringConstructor;
|
|
86
86
|
/** Tooltip text: renders an (i) icon next to the label with a tooltip on hover */
|
|
87
87
|
tooltip: StringConstructor;
|
|
88
|
-
/** Where the trend indicator is positioned:
|
|
88
|
+
/** Where the trend indicator is positioned: under the value with its label, or right-aligned in the header row (its label under the value). @default "value" */
|
|
89
89
|
trendPosition: {
|
|
90
90
|
type: PropType<"value" | "header">;
|
|
91
91
|
default: string;
|
|
@@ -105,26 +105,26 @@ declare const StatCardComponent: import("vue").DefineComponent<import("vue").Ext
|
|
|
105
105
|
type: PropType<"default" | "accent">;
|
|
106
106
|
default: string;
|
|
107
107
|
};
|
|
108
|
-
/**
|
|
108
|
+
/** Color of the accent variant's bar. @default "primary" */
|
|
109
109
|
accentColor: {
|
|
110
|
-
type: PropType<
|
|
110
|
+
type: PropType<StatsCardAccentColor>;
|
|
111
111
|
default: string;
|
|
112
112
|
};
|
|
113
113
|
}>> & Readonly<{}>, {
|
|
114
114
|
value: string | number;
|
|
115
115
|
size: "default" | "sm";
|
|
116
116
|
variant: "default" | "accent";
|
|
117
|
-
accentColor:
|
|
117
|
+
accentColor: StatsCardAccentColor;
|
|
118
118
|
invertTrend: boolean;
|
|
119
119
|
trendPosition: "header" | "value";
|
|
120
120
|
trendVariant: "text" | "badge";
|
|
121
121
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
122
|
-
type
|
|
123
|
-
/**
|
|
124
|
-
export type
|
|
125
|
-
export declare const
|
|
122
|
+
type StatsCardOwnProps = InstanceType<typeof StatsCardComponent>["$props"];
|
|
123
|
+
/** StatsCard props plus the native <div> attributes that fall through to it, as in React. */
|
|
124
|
+
export type StatsCardProps = StatsCardOwnProps & Omit<HTMLAttributes, keyof StatsCardOwnProps>;
|
|
125
|
+
export declare const StatsCard: typeof StatsCardComponent & {
|
|
126
126
|
new (): {
|
|
127
|
-
$props:
|
|
127
|
+
$props: StatsCardProps;
|
|
128
128
|
};
|
|
129
129
|
};
|
|
130
130
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StatsCard, type StatsCardAccentColor, type StatsCardProps, type StatsCardTrend } from "./StatsCard.js";
|
|
@@ -34,7 +34,7 @@ declare const SwipeActionsComponent: import("vue").DefineComponent<import("vue")
|
|
|
34
34
|
type: PropType<SwipeAction[]>;
|
|
35
35
|
default: () => never[];
|
|
36
36
|
};
|
|
37
|
-
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of
|
|
37
|
+
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of 60px and taller, as iOS sets them). @default "hidden" */
|
|
38
38
|
labelPlacement: {
|
|
39
39
|
type: PropType<"hidden" | "inside" | "below">;
|
|
40
40
|
default: string;
|
|
@@ -57,7 +57,7 @@ declare const SwipeActionsComponent: import("vue").DefineComponent<import("vue")
|
|
|
57
57
|
type: PropType<SwipeAction[]>;
|
|
58
58
|
default: () => never[];
|
|
59
59
|
};
|
|
60
|
-
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of
|
|
60
|
+
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of 60px and taller, as iOS sets them). @default "hidden" */
|
|
61
61
|
labelPlacement: {
|
|
62
62
|
type: PropType<"hidden" | "inside" | "below">;
|
|
63
63
|
default: string;
|
|
@@ -93,7 +93,7 @@ export declare const SwipeActions: import("vue").DefineComponent<import("vue").E
|
|
|
93
93
|
type: PropType<SwipeAction[]>;
|
|
94
94
|
default: () => never[];
|
|
95
95
|
};
|
|
96
|
-
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of
|
|
96
|
+
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of 60px and taller, as iOS sets them). @default "hidden" */
|
|
97
97
|
labelPlacement: {
|
|
98
98
|
type: PropType<"hidden" | "inside" | "below">;
|
|
99
99
|
default: string;
|
|
@@ -116,7 +116,7 @@ export declare const SwipeActions: import("vue").DefineComponent<import("vue").E
|
|
|
116
116
|
type: PropType<SwipeAction[]>;
|
|
117
117
|
default: () => never[];
|
|
118
118
|
};
|
|
119
|
-
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of
|
|
119
|
+
/** Where the actions show their labels: `"hidden"` (symbols only), `"inside"` the capsule, or `"below"` it (for rows of 60px and taller, as iOS sets them). @default "hidden" */
|
|
120
120
|
labelPlacement: {
|
|
121
121
|
type: PropType<"hidden" | "inside" | "below">;
|
|
122
122
|
default: string;
|
|
@@ -26,6 +26,14 @@ declare const TabBarItemComponent: import("vue").DefineComponent<import("vue").E
|
|
|
26
26
|
};
|
|
27
27
|
/** Makes the tab a link to this URL. */
|
|
28
28
|
href: StringConstructor;
|
|
29
|
+
/**
|
|
30
|
+
* A count or a short word in a red capsule over the symbol, as an iOS tab badge; it is read after the label.
|
|
31
|
+
* A count of 0 shows none, as on iOS.
|
|
32
|
+
*/
|
|
33
|
+
badge: {
|
|
34
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
29
37
|
/** When `true`, the tab cannot be selected. */
|
|
30
38
|
disabled: {
|
|
31
39
|
type: BooleanConstructor;
|
|
@@ -54,6 +62,14 @@ declare const TabBarItemComponent: import("vue").DefineComponent<import("vue").E
|
|
|
54
62
|
};
|
|
55
63
|
/** Makes the tab a link to this URL. */
|
|
56
64
|
href: StringConstructor;
|
|
65
|
+
/**
|
|
66
|
+
* A count or a short word in a red capsule over the symbol, as an iOS tab badge; it is read after the label.
|
|
67
|
+
* A count of 0 shows none, as on iOS.
|
|
68
|
+
*/
|
|
69
|
+
badge: {
|
|
70
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
71
|
+
default: undefined;
|
|
72
|
+
};
|
|
57
73
|
/** When `true`, the tab cannot be selected. */
|
|
58
74
|
disabled: {
|
|
59
75
|
type: BooleanConstructor;
|
|
@@ -68,6 +84,7 @@ declare const TabBarItemComponent: import("vue").DefineComponent<import("vue").E
|
|
|
68
84
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
69
85
|
}>, {
|
|
70
86
|
disabled: boolean;
|
|
87
|
+
badge: string | number;
|
|
71
88
|
hideLabel: boolean;
|
|
72
89
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
73
90
|
/** Props of `TabBarItem`. */
|
|
@@ -86,6 +103,14 @@ export declare const TabBarItem: import("vue").DefineComponent<import("vue").Ext
|
|
|
86
103
|
};
|
|
87
104
|
/** Makes the tab a link to this URL. */
|
|
88
105
|
href: StringConstructor;
|
|
106
|
+
/**
|
|
107
|
+
* A count or a short word in a red capsule over the symbol, as an iOS tab badge; it is read after the label.
|
|
108
|
+
* A count of 0 shows none, as on iOS.
|
|
109
|
+
*/
|
|
110
|
+
badge: {
|
|
111
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
112
|
+
default: undefined;
|
|
113
|
+
};
|
|
89
114
|
/** When `true`, the tab cannot be selected. */
|
|
90
115
|
disabled: {
|
|
91
116
|
type: BooleanConstructor;
|
|
@@ -114,6 +139,14 @@ export declare const TabBarItem: import("vue").DefineComponent<import("vue").Ext
|
|
|
114
139
|
};
|
|
115
140
|
/** Makes the tab a link to this URL. */
|
|
116
141
|
href: StringConstructor;
|
|
142
|
+
/**
|
|
143
|
+
* A count or a short word in a red capsule over the symbol, as an iOS tab badge; it is read after the label.
|
|
144
|
+
* A count of 0 shows none, as on iOS.
|
|
145
|
+
*/
|
|
146
|
+
badge: {
|
|
147
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
148
|
+
default: undefined;
|
|
149
|
+
};
|
|
117
150
|
/** When `true`, the tab cannot be selected. */
|
|
118
151
|
disabled: {
|
|
119
152
|
type: BooleanConstructor;
|
|
@@ -128,6 +161,7 @@ export declare const TabBarItem: import("vue").DefineComponent<import("vue").Ext
|
|
|
128
161
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
129
162
|
}>, {
|
|
130
163
|
disabled: boolean;
|
|
164
|
+
badge: string | number;
|
|
131
165
|
hideLabel: boolean;
|
|
132
166
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
133
167
|
declare const TabBarComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -116,7 +116,11 @@ declare const TabsPublic: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
116
116
|
type: PropType<TabsOrientation>;
|
|
117
117
|
default: string;
|
|
118
118
|
};
|
|
119
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Controls the size of the tabs, `3xs` (22px) to `3xl` (48px). On a phone horizontal tabs take the two sizes of
|
|
121
|
+
* the iOS 27 segmented control: `sm` and smaller the small 32px one, `md` and larger the large 48px one (49px with
|
|
122
|
+
* `mobileMaterial="flat"`). @default "md"
|
|
123
|
+
*/
|
|
120
124
|
size: {
|
|
121
125
|
type: PropType<ControlSize>;
|
|
122
126
|
default: string;
|
|
@@ -147,6 +151,17 @@ declare const TabsPublic: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
147
151
|
type: BooleanConstructor;
|
|
148
152
|
default: boolean;
|
|
149
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* Phone surface of horizontal tabs. On a phone the large control (`md` and larger) is the glass capsule of iOS 27
|
|
156
|
+
* apps and the small one (`sm` and smaller) the plain capsule of SwiftUI's segmented Picker; `flat` gives the large
|
|
157
|
+
* one the plain look of SwiftUI's `.controlSize(.large)`, and `glass` gives the small one `.glassEffect()`, like the
|
|
158
|
+
* Button prop of the same name. Inside a phone Toolbar the control is the large glass one anyway. Desktop keeps the
|
|
159
|
+
* chosen variant. @default "glass" at md and larger, "flat" at sm and smaller
|
|
160
|
+
*/
|
|
161
|
+
mobileMaterial: {
|
|
162
|
+
type: PropType<"glass" | "flat">;
|
|
163
|
+
default: undefined;
|
|
164
|
+
};
|
|
150
165
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
151
166
|
[key: string]: any;
|
|
152
167
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -190,7 +205,11 @@ declare const TabsPublic: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
190
205
|
type: PropType<TabsOrientation>;
|
|
191
206
|
default: string;
|
|
192
207
|
};
|
|
193
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* Controls the size of the tabs, `3xs` (22px) to `3xl` (48px). On a phone horizontal tabs take the two sizes of
|
|
210
|
+
* the iOS 27 segmented control: `sm` and smaller the small 32px one, `md` and larger the large 48px one (49px with
|
|
211
|
+
* `mobileMaterial="flat"`). @default "md"
|
|
212
|
+
*/
|
|
194
213
|
size: {
|
|
195
214
|
type: PropType<ControlSize>;
|
|
196
215
|
default: string;
|
|
@@ -221,6 +240,17 @@ declare const TabsPublic: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
221
240
|
type: BooleanConstructor;
|
|
222
241
|
default: boolean;
|
|
223
242
|
};
|
|
243
|
+
/**
|
|
244
|
+
* Phone surface of horizontal tabs. On a phone the large control (`md` and larger) is the glass capsule of iOS 27
|
|
245
|
+
* apps and the small one (`sm` and smaller) the plain capsule of SwiftUI's segmented Picker; `flat` gives the large
|
|
246
|
+
* one the plain look of SwiftUI's `.controlSize(.large)`, and `glass` gives the small one `.glassEffect()`, like the
|
|
247
|
+
* Button prop of the same name. Inside a phone Toolbar the control is the large glass one anyway. Desktop keeps the
|
|
248
|
+
* chosen variant. @default "glass" at md and larger, "flat" at sm and smaller
|
|
249
|
+
*/
|
|
250
|
+
mobileMaterial: {
|
|
251
|
+
type: PropType<"glass" | "flat">;
|
|
252
|
+
default: undefined;
|
|
253
|
+
};
|
|
224
254
|
}>> & Readonly<{
|
|
225
255
|
onChange?: ((value: string) => any) | undefined;
|
|
226
256
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
@@ -234,6 +264,7 @@ declare const TabsPublic: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
234
264
|
overflow: "menu" | "scroll";
|
|
235
265
|
variant: TabsVariant;
|
|
236
266
|
pill: boolean;
|
|
267
|
+
mobileMaterial: "flat" | "glass";
|
|
237
268
|
overflowLabel: string;
|
|
238
269
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
239
270
|
type TabsOwnProps = InstanceType<typeof TabsPublic>["$props"];
|
|
@@ -17,7 +17,7 @@ export type BarBackground = "soft" | "hard" | "glass" | "solid";
|
|
|
17
17
|
export type ToolbarBackground = BarBackground | "edge";
|
|
18
18
|
/**
|
|
19
19
|
* A surface that places phone toolbars: `Page` puts the top bar over its content
|
|
20
|
-
* and reserves the space; `Dialog` puts it under the Sheet's
|
|
20
|
+
* and reserves the space; `Dialog` puts it 16px under the Sheet's top edge.
|
|
21
21
|
*/
|
|
22
22
|
export type ToolbarHost = {
|
|
23
23
|
kind: "page" | "dialog";
|
|
@@ -11,9 +11,23 @@ export type MenuTriggerCover = {
|
|
|
11
11
|
* the upper half, upward from one in the lower half even when it would fit below (IMG_5688, the Icon and List Size
|
|
12
12
|
* row of Files' View Options; IMG_5687, IMG_5689, and IMG_5693 from a bottom bar). Reports the side offset that puts
|
|
13
13
|
* the panel there, minus the control's height, and that side, while the screen is a phone, and `null` on a larger one,
|
|
14
|
-
* where the menu keeps its gap below the control.
|
|
14
|
+
* where the menu keeps its gap below the control. `windowOnly` takes only a phone-wide window for a phone, for a list
|
|
15
|
+
* that is laid out as on a phone only there (Select: its list keeps no phone scope in a PhoneLayout).
|
|
15
16
|
*/
|
|
16
|
-
export declare function observeMenuTriggerCover(trigger: HTMLElement, onChange: (cover: MenuTriggerCover | null) => void
|
|
17
|
+
export declare function observeMenuTriggerCover(trigger: HTMLElement, onChange: (cover: MenuTriggerCover | null) => void, { windowOnly }?: {
|
|
18
|
+
windowOnly?: boolean;
|
|
19
|
+
}): () => void;
|
|
20
|
+
/**
|
|
21
|
+
* A phone menu that covers its trigger whole hides it while it is open, as iOS 27.2 turns a bar button into its menu
|
|
22
|
+
* (ref-app menus-bar, block 8: the More button is gone under the panel). Kept, the round 44pt button showed past the
|
|
23
|
+
* panel's 34pt corner and through its glass. A trigger the panel leaves a part of uncovered stays: one wider than the
|
|
24
|
+
* panel (a form row), one beside it (an align offset), one at the screen's edge past a panel kept off that edge.
|
|
25
|
+
* Marks the trigger `data-menu-covered` (touch.css) while it lies within the panel's resting box, and clears the mark
|
|
26
|
+
* on cleanup. That box is the primitive's positioned wrapper around the panel: the panel itself grows in from a
|
|
27
|
+
* smaller scale as it opens. The boxes are read again whenever the wrapper moves or either element resizes: the
|
|
28
|
+
* wrapper first stands off screen until it is placed, and a panel can mount with no size yet.
|
|
29
|
+
*/
|
|
30
|
+
export declare function markCoveredMenuTrigger(trigger: HTMLElement, content: HTMLElement): () => void;
|
|
17
31
|
/**
|
|
18
32
|
* A mouse opens a menu when its button goes down, so on a phone-wide window the menu that covers the trigger is under
|
|
19
33
|
* the pointer when the button comes up, and that release would choose the item there. Cancels the release of the press
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plexui/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Plex UI components for Vue 3, built on Reka UI and the shared @plexui/styles CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@maskito/core": "5.2.2",
|
|
78
78
|
"@maskito/kit": "5.2.2",
|
|
79
79
|
"@maskito/vue": "5.2.2",
|
|
80
|
-
"@plexui/styles": "^0.
|
|
80
|
+
"@plexui/styles": "^0.2.0",
|
|
81
81
|
"@tanstack/table-core": "8.21.3",
|
|
82
82
|
"@tanstack/vue-table": "8.21.3",
|
|
83
83
|
"@tiptap/core": "3.21.0",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
|
|
2
|
-
// Mirrors React's useWindowSize subscription; the CSS uses the same gutter
|
|
3
|
-
// formula so Popover's numeric collision padding matches the rendered width.
|
|
4
|
-
export const useCalendarGutter = () => {
|
|
5
|
-
const width = ref();
|
|
6
|
-
const update = () => { width.value = window.innerWidth; };
|
|
7
|
-
onMounted(() => {
|
|
8
|
-
update();
|
|
9
|
-
window.addEventListener("resize", update);
|
|
10
|
-
});
|
|
11
|
-
onBeforeUnmount(() => window.removeEventListener("resize", update));
|
|
12
|
-
return computed(() => width.value === undefined ? 16 : Math.max(3, Math.min(16, (width.value - 308) / 4)));
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=useCalendarGutter.js.map
|