@zeyos/zx 4.2.0 → 4.3.4
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/CHANGELOG.md +148 -1
- package/README.md +5 -3
- package/dist/types/components/calendar/calendar-model.d.ts +22 -0
- package/dist/types/components/calendar/calendar.d.ts +19 -2
- package/dist/types/components/card-view/card-view.d.ts +1 -1
- package/dist/types/components/card-view/record-card.d.ts +47 -5
- package/dist/types/components/dialog/dialog.d.ts +6 -1
- package/dist/types/components/dropdown/dropdown.d.ts +5 -0
- package/dist/types/components/kanban-view/kanban-policy.d.ts +268 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +669 -24
- package/dist/types/components/launcher/launcher.d.ts +5 -0
- package/dist/types/components/message/message.d.ts +9 -1
- package/dist/types/components/modal/modal.d.ts +44 -7
- package/dist/types/components/sheet/sheet.d.ts +22 -12
- package/dist/types/core/component.d.ts +6 -1
- package/dist/types/core/overlay-host.d.ts +12 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/zx-zeyos.esm.js +173 -43
- package/dist/zx-zeyos.esm.min.js +1 -1
- package/dist/zx.css +876 -230
- package/dist/zx.esm.js +2053 -338
- package/dist/zx.esm.min.js +3 -3
- package/dist/zx.global.js +2053 -338
- package/dist/zx.global.min.js +3 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +250 -2
- package/docs/llms.md +67 -48
- package/docs/llms.txt +1 -3
- package/package.json +1 -2
- package/src/components/account-menu/account-menu.css +1 -1
- package/src/components/app-rail/app-rail.css +1 -1
- package/src/components/calendar/calendar-model.js +45 -0
- package/src/components/calendar/calendar.css +96 -34
- package/src/components/calendar/calendar.js +122 -29
- package/src/components/card-view/card-view.css +211 -9
- package/src/components/card-view/card-view.js +7 -7
- package/src/components/card-view/record-card.js +92 -19
- package/src/components/context-menu/context-menu.css +2 -2
- package/src/components/context-menu/context-menu.js +5 -1
- package/src/components/date-picker/date-picker.css +18 -11
- package/src/components/datebox/date-range-box.css +4 -2
- package/src/components/datebox/datebox.css +4 -2
- package/src/components/dialog/dialog.css +4 -3
- package/src/components/dialog/dialog.js +2 -1
- package/src/components/dropdown/dropdown.css +4 -2
- package/src/components/dropdown/dropdown.js +7 -2
- package/src/components/kanban-view/kanban-policy.js +412 -0
- package/src/components/kanban-view/kanban-view.css +480 -36
- package/src/components/kanban-view/kanban-view.js +1514 -235
- package/src/components/launcher/launcher.css +10 -8
- package/src/components/launcher/launcher.js +9 -2
- package/src/components/menu-button/menu-button.css +2 -2
- package/src/components/message/message.css +15 -25
- package/src/components/message/message.js +17 -11
- package/src/components/modal/modal.css +6 -4
- package/src/components/modal/modal.js +99 -25
- package/src/components/select/select.css +9 -7
- package/src/components/sheet/sheet.css +25 -7
- package/src/components/sheet/sheet.js +43 -23
- package/src/components/table/table.css +5 -3
- package/src/components/tag-picker/tag-picker.css +5 -3
- package/src/components/tooltip/tooltip.css +4 -2
- package/src/components/tooltip/tooltip.js +4 -1
- package/src/core/component.js +8 -3
- package/src/core/overlay-host.js +23 -0
- package/src/index.js +8 -3
- package/styles/tokens/dark.css +4 -0
- package/styles/tokens/semantic.css +83 -8
- package/DESIGN-SYSTEM.md +0 -182
|
@@ -162,6 +162,10 @@ export type LauncherOptions = {
|
|
|
162
162
|
open?: string;
|
|
163
163
|
close?: string;
|
|
164
164
|
};
|
|
165
|
+
/**
|
|
166
|
+
* Element whose nearest Zx theme scope owns an internally created launcher; defaults to the opener.
|
|
167
|
+
*/
|
|
168
|
+
scope?: Element | string | null;
|
|
165
169
|
/**
|
|
166
170
|
* Preventable selection listener.
|
|
167
171
|
*/
|
|
@@ -244,6 +248,7 @@ export type RankedLauncherItem = LauncherItem & {
|
|
|
244
248
|
* @property {string} [loadingText='Searching…'] Loading-state text.
|
|
245
249
|
* @property {'mod+k'|false} [shortcut='mod+k'] Optional global keyboard shortcut.
|
|
246
250
|
* @property {false|{move?: string, open?: string, close?: string}} [hints] Visible keyboard hints, or false.
|
|
251
|
+
* @property {Element|string|null} [scope=null] Element whose nearest Zx theme scope owns an internally created launcher; defaults to the opener.
|
|
247
252
|
* @property {(event: CustomEvent<LauncherSelectDetail>) => void} [onselect] Preventable selection listener.
|
|
248
253
|
* @property {(event: CustomEvent<{query: string}>) => void} [onquery] Query-change listener.
|
|
249
254
|
* @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open listener.
|
|
@@ -13,6 +13,10 @@ export type MessageShowOptions = {
|
|
|
13
13
|
* Whether to render a close button.
|
|
14
14
|
*/
|
|
15
15
|
closable?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Element whose nearest Zx theme scope owns a floating toast.
|
|
18
|
+
*/
|
|
19
|
+
scope?: Element | string | null;
|
|
16
20
|
};
|
|
17
21
|
export type MessageOptions = {
|
|
18
22
|
/**
|
|
@@ -55,6 +59,7 @@ export type ProgressHandle = {
|
|
|
55
59
|
* @property {MessageKind|'danger'} [kind='info'] Message intent (`danger` aliases `error`).
|
|
56
60
|
* @property {number} [timeout=4000] Auto-dismiss delay in milliseconds; zero persists.
|
|
57
61
|
* @property {boolean} [closable=true] Whether to render a close button.
|
|
62
|
+
* @property {Element|string|null} [scope=null] Element whose nearest Zx theme scope owns a floating toast.
|
|
58
63
|
*/
|
|
59
64
|
/**
|
|
60
65
|
* @typedef {Object} MessageOptions
|
|
@@ -176,9 +181,12 @@ export declare class Message extends Component<MessageOptions> {
|
|
|
176
181
|
/**
|
|
177
182
|
* Shows a floating progress status.
|
|
178
183
|
* @param {string} text Initial status text.
|
|
184
|
+
* @param {{scope?: Element|string|null}} [options={}] Floating-region scope.
|
|
179
185
|
* @returns {ProgressHandle}
|
|
180
186
|
*/
|
|
181
|
-
static progress(text: string
|
|
187
|
+
static progress(text: string, options?: {
|
|
188
|
+
scope?: Element | string | null;
|
|
189
|
+
}): ProgressHandle;
|
|
182
190
|
/** @returns {void} */
|
|
183
191
|
destroy(): void;
|
|
184
192
|
/** @param {string} text @returns {ProgressHandle} */
|
|
@@ -22,6 +22,10 @@ export type ModalOptions = {
|
|
|
22
22
|
* Whether to destroy the modal after it closes.
|
|
23
23
|
*/
|
|
24
24
|
destroyOnClose?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Element whose nearest Zx theme scope owns the overlay; defaults to the opener.
|
|
27
|
+
*/
|
|
28
|
+
scope?: Element | string | null;
|
|
25
29
|
/**
|
|
26
30
|
* Open event listener.
|
|
27
31
|
*/
|
|
@@ -44,6 +48,7 @@ export type ModalOptions = {
|
|
|
44
48
|
* @property {boolean} [closable=true] Whether Escape may close the modal.
|
|
45
49
|
* @property {boolean} [lightDismiss=false] Whether a backdrop click closes the modal.
|
|
46
50
|
* @property {boolean} [destroyOnClose=false] Whether to destroy the modal after it closes.
|
|
51
|
+
* @property {Element|string|null} [scope=null] Element whose nearest Zx theme scope owns the overlay; defaults to the opener.
|
|
47
52
|
* @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open event listener.
|
|
48
53
|
* @property {(event: CustomEvent<{result: unknown}>) => void} [onclose] Close event listener.
|
|
49
54
|
* @property {(event: CustomEvent<Record<string, never>>) => void} [oncancel] Cancel event listener.
|
|
@@ -62,7 +67,7 @@ export declare class Modal extends Component<ModalOptions> {
|
|
|
62
67
|
/** @type {Readonly<ModalOptions>} */
|
|
63
68
|
static defaults: Readonly<ModalOptions>;
|
|
64
69
|
/**
|
|
65
|
-
* Creates a modal
|
|
70
|
+
* Creates a modal in the configured theme scope, or at document level when none is present.
|
|
66
71
|
* @param {Element|string|null} [_target=null] Ignored; Modal always owns its root dialog.
|
|
67
72
|
* @param {ModalOptions} [options={}] Modal options.
|
|
68
73
|
*/
|
|
@@ -81,17 +86,49 @@ export declare class Modal extends Component<ModalOptions> {
|
|
|
81
86
|
* @returns {void}
|
|
82
87
|
*/
|
|
83
88
|
_show(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Removes the dialog from its current presentation layer.
|
|
91
|
+
* Subclasses may replace native dialog presentation while preserving Modal lifecycle events.
|
|
92
|
+
* @param {string} [result=''] Native string return value.
|
|
93
|
+
* @param {number} [presentation=this.#presentation] Presentation generation being hidden.
|
|
94
|
+
* @returns {void}
|
|
95
|
+
*/
|
|
96
|
+
_hide(result?: string, presentation?: number): void;
|
|
97
|
+
/**
|
|
98
|
+
* Shows a new presentation and gives it a generation of its own. Close events are queued by the
|
|
99
|
+
* platform, so the generation lets an event from an earlier presentation expire harmlessly if
|
|
100
|
+
* the same overlay has already reopened.
|
|
101
|
+
* @returns {void}
|
|
102
|
+
*/
|
|
103
|
+
_present(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Hides the current presentation and records which generation its queued close event belongs to.
|
|
106
|
+
* @param {string} [result=''] Native string return value.
|
|
107
|
+
* @returns {void}
|
|
108
|
+
*/
|
|
109
|
+
_dismiss(result?: string): void;
|
|
110
|
+
/**
|
|
111
|
+
* Reports whether the current presentation layer is visible.
|
|
112
|
+
* @returns {boolean}
|
|
113
|
+
*/
|
|
114
|
+
_isShown(): boolean;
|
|
84
115
|
/**
|
|
85
116
|
* Whether an incoming `close` event is a real dismissal.
|
|
86
117
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* `destroyOnClose`. Returning false from an override drops it at the source instead.
|
|
118
|
+
* `close` is dispatched in a queued task, not synchronously. By the time it arrives the overlay
|
|
119
|
+
* may have reopened or crossed presentation layers, so only the event for the current hidden
|
|
120
|
+
* generation may settle state, emit lifecycle events, or trigger `destroyOnClose`.
|
|
121
|
+
* @param {number|undefined} closingPresentation Presentation that produced the event, if known.
|
|
92
122
|
* @returns {boolean}
|
|
93
123
|
*/
|
|
94
|
-
_isRealClose(): boolean;
|
|
124
|
+
_isRealClose(closingPresentation: number | undefined): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Settles one presentation's close without allowing a queued event to invalidate a newer one.
|
|
127
|
+
* Popover-based subclasses call this directly; native dialog events arrive through the listener.
|
|
128
|
+
* @param {number|undefined} closingPresentation Presentation that was hidden, if known.
|
|
129
|
+
* @returns {boolean} Whether this event closed the current presentation.
|
|
130
|
+
*/
|
|
131
|
+
_settleClose(closingPresentation: number | undefined): boolean;
|
|
95
132
|
/**
|
|
96
133
|
* Creates the owned native dialog.
|
|
97
134
|
* @returns {HTMLDialogElement}
|
|
@@ -80,6 +80,10 @@ export type SheetOptions = {
|
|
|
80
80
|
* Whether to destroy the sheet after it closes.
|
|
81
81
|
*/
|
|
82
82
|
destroyOnClose?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Element whose nearest Zx theme scope owns a floating sheet; defaults to the opener.
|
|
85
|
+
*/
|
|
86
|
+
scope?: Element | string | null;
|
|
83
87
|
/**
|
|
84
88
|
* Open event listener.
|
|
85
89
|
*/
|
|
@@ -138,6 +142,7 @@ export type SheetOptions = {
|
|
|
138
142
|
* @property {boolean} [lightDismiss=true] Whether a click outside closes the sheet — the backdrop
|
|
139
143
|
* when modal, a document-level pointer press when not.
|
|
140
144
|
* @property {boolean} [destroyOnClose=false] Whether to destroy the sheet after it closes.
|
|
145
|
+
* @property {Element|string|null} [scope=null] Element whose nearest Zx theme scope owns a floating sheet; defaults to the opener.
|
|
141
146
|
* @property {(event: CustomEvent<Record<string, never>>) => void} [onopen] Open event listener.
|
|
142
147
|
* @property {(event: CustomEvent<{result: unknown}>) => void} [onclose] Close event listener.
|
|
143
148
|
* @property {(event: CustomEvent<Record<string, never>>) => void} [oncancel] Cancel event listener.
|
|
@@ -153,9 +158,11 @@ export type SheetOptions = {
|
|
|
153
158
|
*
|
|
154
159
|
* Modality is a three-way choice rather than a boolean because the three real behaviours do not
|
|
155
160
|
* collapse into two: a modal sheet delegates focus containment, page inertness, and Escape to the
|
|
156
|
-
* browser via `showModal()`;
|
|
157
|
-
*
|
|
158
|
-
*
|
|
161
|
+
* browser via `showModal()`; floating non-modal sheets use the manual Popover top layer so a
|
|
162
|
+
* transformed or clipped application scope cannot displace them, and re-implement only what they
|
|
163
|
+
* still want. Docked sheets remain native non-modal dialogs in flow. That is also why `backdrop`
|
|
164
|
+
* applies only to `modal: true`: painting one for either non-modal mode would make the sheet look
|
|
165
|
+
* blocking while it is not.
|
|
159
166
|
* @fires Sheet#open
|
|
160
167
|
* @fires Sheet#close
|
|
161
168
|
* @fires Sheet#cancel
|
|
@@ -165,7 +172,6 @@ export type SheetOptions = {
|
|
|
165
172
|
export declare class Sheet extends Dialog {
|
|
166
173
|
#private;
|
|
167
174
|
_dock: any;
|
|
168
|
-
_handoff: boolean;
|
|
169
175
|
static cssName: string;
|
|
170
176
|
/** @type {Readonly<SheetOptions>} */
|
|
171
177
|
static defaults: Readonly<SheetOptions>;
|
|
@@ -217,17 +223,12 @@ export declare class Sheet extends Dialog {
|
|
|
217
223
|
/**
|
|
218
224
|
* Moves the dialog to its current mount and, when it was open, reopens it there.
|
|
219
225
|
*
|
|
220
|
-
* The close is unavoidable — a dialog cannot cross between
|
|
221
|
-
*
|
|
222
|
-
* `open()` so no lifecycle event is emitted for what is only a change of address.
|
|
226
|
+
* The close is unavoidable — a dialog cannot cross between presentation layers while open —
|
|
227
|
+
* but it is invisible: Modal's presentation generation drops the stale event, and reopening
|
|
228
|
+
* bypasses `open()` so no lifecycle event is emitted for what is only a change of address.
|
|
223
229
|
* @returns {void}
|
|
224
230
|
*/
|
|
225
231
|
_rehost(): void;
|
|
226
|
-
/**
|
|
227
|
-
* Drops the stale `close` a re-hosting handoff leaves behind.
|
|
228
|
-
* @returns {boolean}
|
|
229
|
-
*/
|
|
230
|
-
_isRealClose(): boolean;
|
|
231
232
|
/**
|
|
232
233
|
* Opens the sheet, trapping focus first where the modality asks for it.
|
|
233
234
|
* @returns {this}
|
|
@@ -276,6 +277,15 @@ export declare class Sheet extends Dialog {
|
|
|
276
277
|
* @returns {void}
|
|
277
278
|
*/
|
|
278
279
|
_show(): void;
|
|
280
|
+
/**
|
|
281
|
+
* Hides a native dialog or a non-modal Sheet promoted through the popover top layer.
|
|
282
|
+
* @param {string} [result=''] Native string return value.
|
|
283
|
+
* @param {number} [presentation] Presentation generation being hidden.
|
|
284
|
+
* @returns {void}
|
|
285
|
+
*/
|
|
286
|
+
_hide(result?: string, presentation?: number): void;
|
|
287
|
+
/** @returns {boolean} */
|
|
288
|
+
_isShown(): boolean;
|
|
279
289
|
/**
|
|
280
290
|
* Releases the focus trap and the owned dialog.
|
|
281
291
|
* @returns {void}
|
|
@@ -73,10 +73,15 @@ export declare class Component<TOptions extends ComponentOptions = ComponentOpti
|
|
|
73
73
|
* Dispatches a component event and a bubbling, composed `zx-*` DOM event.
|
|
74
74
|
* @param {string} type Lowercase event name.
|
|
75
75
|
* @param {Record<string, unknown>} [detail={}] Single event detail object.
|
|
76
|
+
* @param {{honorDomCancellation?:boolean}} [options={}] Mirrored DOM-event behavior. Components
|
|
77
|
+
* with a cancelable mutation boundary may opt into treating `preventDefault()` on the bubbling
|
|
78
|
+
* `zx-*` event exactly like cancellation of the component event.
|
|
76
79
|
* @returns {Event & {detail: Record<string, unknown>}}
|
|
77
80
|
* @fires Component#event
|
|
78
81
|
*/
|
|
79
|
-
emit(type: string, detail?: Record<string, unknown
|
|
82
|
+
emit(type: string, detail?: Record<string, unknown>, options?: {
|
|
83
|
+
honorDomCancellation?: boolean;
|
|
84
|
+
}): Event & {
|
|
80
85
|
detail: Record<string, unknown>;
|
|
81
86
|
};
|
|
82
87
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finds the closest styling scope for a top-layer element.
|
|
3
|
+
*
|
|
4
|
+
* Popovers and dialogs escape clipping even when their DOM parent is inside an application shell,
|
|
5
|
+
* so keeping them below that parent preserves inherited theme, density, material, and product
|
|
6
|
+
* token overrides without sacrificing top-layer behaviour. The document body remains the safe
|
|
7
|
+
* fallback for unscoped applications.
|
|
8
|
+
*
|
|
9
|
+
* @param {Element|string|null} [source=null] Element or selector whose styling scope should own the overlay.
|
|
10
|
+
* @returns {Element}
|
|
11
|
+
*/
|
|
12
|
+
export declare function overlayHost(source?: Element | string | null): Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -78,12 +78,13 @@ export { DateRangePicker, clampRange, defaultDateRangePresets, normalizeRange, r
|
|
|
78
78
|
export { DateRangeBox, formatRangeText, parseRangeText } from './components/datebox/date-range-box.js';
|
|
79
79
|
export { Timebox, splitTime, joinTime } from './components/timebox/timebox.js';
|
|
80
80
|
export { Calendar } from './components/calendar/calendar.js';
|
|
81
|
-
export { CALENDAR_VIEWS, addCalendarDays, calendarDayDifference, calendarDayKey, calendarEventIntersects, calendarEventSpansDays, calendarRange, cloneCalendarEvent, layoutCalendarSpans, layoutTimedCalendarEvents, normalizeCalendarEvents, shiftCalendarEvent, startOfCalendarDay, startOfCalendarWeek } from './components/calendar/calendar-model.js';
|
|
81
|
+
export { CALENDAR_VIEWS, addCalendarDays, addCalendarMonths, calendarDayDifference, calendarDayKey, calendarEventIntersects, calendarEventSpansDays, calendarPageDate, calendarRange, cloneCalendarEvent, layoutCalendarSpans, layoutTimedCalendarEvents, normalizeCalendarEvents, shiftCalendarEvent, startOfCalendarDay, startOfCalendarWeek } from './components/calendar/calendar-model.js';
|
|
82
82
|
export { RecordView, normalizeViewFields, reconcileFieldOrder, moveViewField, readViewField, renderViewField, sortViewRecords, normalizeViewState, viewRecordId } from './components/view/record-view.js';
|
|
83
83
|
export { Table, reorderTableRows } from './components/table/table.js';
|
|
84
84
|
export { TableView } from './components/table-view/table-view.js';
|
|
85
85
|
export { CardView } from './components/card-view/card-view.js';
|
|
86
86
|
export { KanbanView } from './components/kanban-view/kanban-view.js';
|
|
87
|
+
export { absoluteKanbanIndex, allowsKanbanTransition, createKanbanHistory, evaluateKanbanMove, kanbanSearchTerms, locateKanbanRecord, matchesKanbanSearch, normalizeKanbanRules, reorderKanbanRecords, resolveKanbanRules } from './components/kanban-view/kanban-policy.js';
|
|
87
88
|
export { Grid, billingColumns, isBillingLine } from './components/grid/grid.js';
|
|
88
89
|
export { Chart, ChartJsAdapter, chartSummaryTable, cloneChartValue, isEmptyChartData } from './components/chart/chart.js';
|
|
89
90
|
export { TreeView } from './components/tree/tree.js';
|