@nxgt/material 3.91.0 → 3.93.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/CHANGELOG.md +55 -0
- package/README.md +3 -3
- package/dist/{alert-dialog-BFk4ye-3.js → alert-dialog-D37eph4I.js} +1 -1
- package/dist/{async-slice-gGyfyUw2.js → async-slice-BSqwhAj-.js} +1 -1
- package/dist/{button-C5OEq9bi.js → button-CG9SBAT-.js} +1 -1
- package/dist/{calculator-Dg_L6d3R.js → calculator-YD3I3y-I.js} +10 -10
- package/dist/calculator-field.js +6 -6
- package/dist/{calculator-segment-CvAaDqKf.js → calculator-segment-Cjec9zi7.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-DOxFA4BI.js → chip-BbUSBl3i.js} +2 -2
- package/dist/{code-editor-tiAjhXW-.js → code-editor-ZEM7AAcs.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-CcdzQvLT.js → code-language-items-CAuHPrHd.js} +2 -2
- package/dist/components/components.css +1 -0
- package/dist/components/ui/widgets/event-calendar/event-calendar-backdrop.css +43 -0
- package/dist/{components-G0nEVa52.js → components-CuFTrmGy.js} +19023 -18257
- package/dist/components.js +38 -38
- package/dist/{conversion-variant-4gCdFWV-.js → conversion-variant-DmEtTCSP.js} +3 -3
- package/dist/{currency-field-CIqe7Wg4.js → currency-field-CabGnVO9.js} +5 -5
- package/dist/{dialog-d6Kdf5wc.js → dialog-Jhpx6ulb.js} +3 -3
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-DO5kUvof.js → dropdown-menu-nl0Q3tQ2.js} +1 -1
- package/dist/editor.js +7 -7
- package/dist/{empty-state-DQnICuun.js → empty-state-mrJuqph3.js} +1 -1
- package/dist/{financial-variant-D80C1hVD.js → financial-variant-P8gFA9aI.js} +5 -5
- package/dist/{hooks-C-yLDF39.js → hooks-CjSpziWf.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-DU3TAME4.js → hover-card-BNb1M8ij.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-BGczZ4Hc.js → icon-badge-CVMHwdFm.js} +1 -1
- package/dist/{icon-button-D0xjBCst.js → icon-button-Ch0PThsa.js} +1 -1
- package/dist/{input-group-CSlXMFxu.js → input-group-CPMSQcBx.js} +1 -1
- package/dist/lib/components/ui/collections/day-grouped-list/day-grouped-list.d.ts +30 -2
- package/dist/lib/components/ui/collections/day-grouped-list/index.d.ts +7 -2
- package/dist/lib/components/ui/collections/day-grouped-list/partials/day-group-section.d.ts +17 -0
- package/dist/lib/components/ui/collections/day-grouped-list/use-day-groups.d.ts +24 -0
- package/dist/lib/components/ui/display/entity-header/entity-metadata.d.ts +2 -0
- package/dist/lib/components/ui/display/event-chip/event-chip-badges.d.ts +21 -0
- package/dist/lib/components/ui/display/event-chip/event-chip-content.d.ts +5 -7
- package/dist/lib/components/ui/display/event-chip/event-chip-title.d.ts +9 -0
- package/dist/lib/components/ui/display/event-chip/event-chip.classes.d.ts +9 -0
- package/dist/lib/components/ui/display/event-chip/event-chip.d.ts +15 -2
- package/dist/lib/components/ui/fields/attributes/attribute-values-form-field-set/attribute-values-form-field-set.d.ts +1 -1
- package/dist/lib/components/ui/fields/choice-list/choice-list-control.d.ts +1 -1
- package/dist/lib/components/ui/fields/choice-list/choice-list-field.d.ts +1 -1
- package/dist/lib/components/ui/fields/choice-list/choice-list-focus.d.ts +6 -3
- package/dist/lib/components/ui/fields/choice-list/choice-list-form-field.d.ts +2 -2
- package/dist/lib/components/ui/fields/choice-list/choice-list-names.d.ts +2 -0
- package/dist/lib/components/ui/fields/choice-list/choice-list.utils.d.ts +2 -0
- package/dist/lib/components/ui/fields/choice-list/index.d.ts +1 -1
- package/dist/lib/components/ui/fields/choice-list/partials/choice-row.d.ts +9 -3
- package/dist/lib/components/ui/fields/choice-list/types.d.ts +20 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/layout/record-page/record-details.d.ts +6 -6
- package/dist/lib/components/ui/media/file-list/file-list-describe.d.ts +8 -0
- package/dist/lib/components/ui/media/file-list/file-list-field-row.d.ts +4 -1
- package/dist/lib/components/ui/media/file-list/file-list-field.d.ts +13 -0
- package/dist/lib/components/ui/media/file-list/index.d.ts +1 -1
- package/dist/lib/components/ui/media/file-list/partials/file-list-items.d.ts +5 -1
- package/dist/lib/components/ui/media/file-list/partials/file-list-move-buttons.d.ts +9 -0
- package/dist/lib/components/ui/media/file-list/partials/file-list-row-actions.d.ts +3 -1
- package/dist/lib/components/ui/media/file-list/types.d.ts +9 -0
- package/dist/lib/components/ui/media/file-list/use-file-list-field.d.ts +7 -1
- package/dist/lib/components/ui/media/file-list/use-file-list-move.d.ts +24 -0
- package/dist/lib/components/ui/media/upload/network-upload-field/network-upload-item.d.ts +7 -0
- package/dist/lib/components/ui/widgets/editor/extensions/marks/compact-mark-buttons.d.ts +5 -1
- package/dist/lib/components/ui/widgets/editor/kit/editor-features.d.ts +2 -1
- package/dist/lib/components/ui/widgets/editor/kit/features/marks.d.ts +6 -1
- package/dist/lib/components/ui/widgets/event-calendar/backdrop.types.d.ts +75 -0
- package/dist/lib/components/ui/widgets/event-calendar/chrome.types.d.ts +12 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar-context.d.ts +8 -1
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar-events.utils.d.ts +3 -1
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar-shell.d.ts +1 -1
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.backdrop.d.ts +38 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.badges.d.ts +14 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.labels.d.ts +14 -1
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.lanes.d.ts +9 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.read-only.d.ts +57 -0
- package/dist/lib/components/ui/widgets/event-calendar/event-calendar.resources.d.ts +6 -1
- package/dist/lib/components/ui/widgets/event-calendar/index.d.ts +2 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/all-day-bars.d.ts +14 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/backdrop-bands.d.ts +11 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/backdrop-bar.d.ts +11 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/backdrop-cell.d.ts +13 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/backdrop-row.d.ts +8 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/calendar-badge.d.ts +16 -0
- package/dist/lib/components/ui/widgets/event-calendar/partials/month-day-cell.d.ts +4 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/month-day-parts.d.ts +12 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/resource-header.d.ts +2 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/span-event.d.ts +3 -1
- package/dist/lib/components/ui/widgets/event-calendar/partials/time-grid-header-day.d.ts +3 -6
- package/dist/lib/components/ui/widgets/event-calendar/partials/zone-corner.d.ts +10 -2
- package/dist/lib/components/ui/widgets/event-calendar/template.types.d.ts +7 -2
- package/dist/lib/components/ui/widgets/event-calendar/types.d.ts +25 -13
- package/dist/lib/components/ui/widgets/event-calendar/use-backdrops.d.ts +8 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-badges.d.ts +5 -0
- package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +3 -2
- package/dist/lib/components/ui/widgets/event-calendar/use-month-day.d.ts +6 -1
- package/dist/lib/components/ui/widgets/event-calendar/use-time-column.d.ts +1 -0
- package/dist/lib/i18n/resources/en/en.d.ts +10 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +11 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +10 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +11 -1
- package/dist/lib/i18n/resources/resources.d.ts +20 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +54 -54
- package/dist/map.js +7 -7
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/{percent-field-DyJ2yOH4.js → percent-field-TWyupyr_.js} +1 -1
- package/dist/{picker-surface-CnlOKQ3D.js → picker-surface-CoNsDWxX.js} +4 -4
- package/dist/{popover-BevReSHi.js → popover-BA1U82Wk.js} +1 -1
- package/dist/{pos-types-BrZBX0Zg.js → pos-types-BQqv-kb6.js} +1 -1
- package/dist/{pos-variant-G12HCSfQ.js → pos-variant-D043n5y8.js} +4 -4
- package/dist/print.js +1 -1
- package/dist/{programmer-variant-WWLwTGRF.js → programmer-variant-jneMqtLs.js} +2 -2
- package/dist/{public-C1a6wQ6o.js → public-DgrbdeZj.js} +9 -9
- package/dist/{rich-code-block-Dh9J-VZ8.js → rich-code-block-CGNjHawR.js} +5 -5
- package/dist/{scientific-variant-BvutlF8a.js → scientific-variant-1L7brNNT.js} +2 -2
- package/dist/{sortable-provider-BrA5tfJX.js → sortable-provider-DZLV_svg.js} +2 -2
- package/dist/{spinner-JnLLiLIO.js → spinner-CQqRWxAW.js} +1 -1
- package/dist/{tabs-dXCZGShv.js → tabs-DQTx3C8e.js} +1 -1
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-BmcK6mXV.js → theme-toggle-3NQ3VmJH.js} +1 -1
- package/dist/{toolbar-items-B-kMYsDT.js → toolbar-items-BYCdJGUf.js} +4 -4
- package/dist/{translate-material-BmpcP1p1.js → translate-material-jxfcGlD5.js} +1 -1
- package/dist/{translator-CfoXTrZd.js → translator-6XuDmqUJ.js} +18 -2
- package/dist/{use-chat-composer-DFD_eF-r.js → use-chat-composer-1eb4I1kM.js} +32 -31
- package/dist/{use-heading-spy-BcNK1qvq.js → use-heading-spy-CzPujlKr.js} +4 -4
- package/dist/{use-material-translation-DoymV6IP.js → use-material-translation-BUPqNmAg.js} +1 -1
- package/dist/{use-return-focus-CLEnhfka.js → use-return-focus-B_enQxp5.js} +1 -1
- package/docs/README.md +1 -0
- package/docs/components/data-display.md +6 -1
- package/docs/components/data-table-filter-and-lists.md +35 -0
- package/docs/components/form-fields.md +38 -5
- package/docs/components/media-and-files.md +16 -0
- package/docs/components/navigation-and-layout.md +1 -0
- package/docs/components/rich-widgets.md +73 -5
- package/docs/guides/event-calendar.md +163 -0
- package/docs/guides/forms.md +2 -1
- package/docs/guides/i18n.md +2 -0
- package/docs/previews/data-display-eventchip.webp +0 -0
- package/docs/previews/rich-widgets-eventcalendar.webp +0 -0
- package/docs/roadmap.md +12 -0
- package/lib/components/components.css +1 -0
- package/lib/components/ui/widgets/event-calendar/event-calendar-backdrop.css +43 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { CardTitleElement } from '../../primitives/card/card.js';
|
|
3
3
|
/** One « label date » segment of the meta line. */
|
|
4
4
|
export type RecordDetailsStamp = {
|
|
@@ -7,8 +7,8 @@ export type RecordDetailsStamp = {
|
|
|
7
7
|
/** The instant: a `Date`, an ISO string or a timestamp. */
|
|
8
8
|
at: Date | string | number;
|
|
9
9
|
};
|
|
10
|
-
export type RecordDetailsProps = {
|
|
11
|
-
/** The card's heading. */
|
|
10
|
+
export type RecordDetailsProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
11
|
+
/** The card's heading, set in `title-md` emphasized like a section title, whatever its level. */
|
|
12
12
|
title?: ReactNode;
|
|
13
13
|
/** The heading level of `title`, `'h2'` by default (under the page's `h1`). */
|
|
14
14
|
titleAs?: CardTitleElement;
|
|
@@ -28,13 +28,13 @@ export type RecordDetailsProps = {
|
|
|
28
28
|
maxColumns?: number;
|
|
29
29
|
/** The `Description`s. */
|
|
30
30
|
children?: ReactNode;
|
|
31
|
-
className?: string;
|
|
32
31
|
};
|
|
33
32
|
/**
|
|
34
33
|
* RecordDetails - the record's facts as one card: a title and a status, the
|
|
35
34
|
* `Description`s in a `DescriptionList` (one column in a side panel, up to
|
|
36
35
|
* `maxColumns` once the panel is stacked and wide) and a muted
|
|
37
36
|
* « Added on … · Updated on … » line under them, the dates written without
|
|
38
|
-
* seconds in `timeZone`. Made for `RecordPage`'s `details`.
|
|
37
|
+
* seconds in `timeZone`. Made for `RecordPage`'s `details`. Any other `div`
|
|
38
|
+
* prop (`data-*`, `id`, `aria-*`, `className`) goes to the root.
|
|
39
39
|
*/
|
|
40
|
-
export declare function RecordDetails({ title, titleAs, status, created, updated, timeZone, maxColumns, children, className, }: RecordDetailsProps): import("react").JSX.Element;
|
|
40
|
+
export declare function RecordDetails({ title, titleAs, status, created, updated, timeZone, maxColumns, children, className, ...props }: RecordDetailsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NetworkUploadDisplayItem } from '../upload/network-upload-field/network-upload-item.js';
|
|
2
|
+
import { FileDescription } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The committed rows, named, sized and typed by `describe`; uploads are left
|
|
5
|
+
* alone. A described `href` that is not safe to link (`javascript:` …) is
|
|
6
|
+
* `null`, and the row then has no Download link.
|
|
7
|
+
*/
|
|
8
|
+
export declare function describeItems(items: NetworkUploadDisplayItem[], describe?: (value: string) => FileDescription | null | undefined): NetworkUploadDisplayItem[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NetworkUploadDisplayItem } from '../upload/network-upload-field/network-upload-item.js';
|
|
2
|
+
import { FileListReorder } from './use-file-list-move.js';
|
|
2
3
|
export type FileListFieldRowProps = {
|
|
3
4
|
item: NetworkUploadDisplayItem;
|
|
4
5
|
accept?: string;
|
|
@@ -6,5 +7,7 @@ export type FileListFieldRowProps = {
|
|
|
6
7
|
onReplace: (item: NetworkUploadDisplayItem, file: File) => void;
|
|
7
8
|
onRetry: (item: NetworkUploadDisplayItem) => void;
|
|
8
9
|
onRemove: (item: NetworkUploadDisplayItem) => void;
|
|
10
|
+
/** Present when the field is reorderable. */
|
|
11
|
+
reorder?: FileListReorder;
|
|
9
12
|
};
|
|
10
|
-
export declare function FileListFieldRow({ item, accept, disabled, onReplace, onRetry, onRemove, }: FileListFieldRowProps): import("react").JSX.Element;
|
|
13
|
+
export declare function FileListFieldRow({ item, accept, disabled, onReplace, onRetry, onRemove, reorder, }: FileListFieldRowProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { NetworkUploadFieldProps } from '../upload/network-upload-field/network-upload-field.js';
|
|
3
|
+
import { FileDescription } from './types.js';
|
|
3
4
|
type MultipleUploadProps = Extract<NetworkUploadFieldProps, {
|
|
4
5
|
mode: 'multiple';
|
|
5
6
|
}>;
|
|
@@ -7,6 +8,18 @@ export type FileListFieldProps = Omit<MultipleUploadProps, 'mode' | 'value'> & {
|
|
|
7
8
|
value?: string[];
|
|
8
9
|
required?: boolean;
|
|
9
10
|
empty?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Describes a kept value (an id, a key) so its row shows a name, a size
|
|
13
|
+
* and a type instead of the value: `describe={(id) => files[id]}`. Return
|
|
14
|
+
* `undefined` for a value you know nothing about. Called on every render,
|
|
15
|
+
* so keep it pure and cheap.
|
|
16
|
+
*/
|
|
17
|
+
describe?: (value: string) => FileDescription | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Lets the user reorder the kept files with move up / move down buttons
|
|
20
|
+
* (reachable by keyboard); `onValueChange` receives the new order.
|
|
21
|
+
*/
|
|
22
|
+
reorderable?: boolean;
|
|
10
23
|
};
|
|
11
24
|
export declare function FileListField(props: FileListFieldProps): import("react").JSX.Element;
|
|
12
25
|
export {};
|
|
@@ -7,4 +7,4 @@ export * from './file-list-form-field.js';
|
|
|
7
7
|
export type { FileListS3FieldProps } from './file-list-s3-field.js';
|
|
8
8
|
export { FileListS3Field } from './file-list-s3-field.js';
|
|
9
9
|
export * from './file-list-s3-form-field.js';
|
|
10
|
-
export type { FileListItem } from './types.js';
|
|
10
|
+
export type { FileDescription, FileListItem } from './types.js';
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { NetworkUploadDisplayItem } from '../../upload/network-upload-field/network-upload-item.js';
|
|
3
|
+
import { FileListReorder } from '../use-file-list-move.js';
|
|
3
4
|
type Props = {
|
|
4
5
|
items: NetworkUploadDisplayItem[];
|
|
5
6
|
accept?: string;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
empty?: ReactNode;
|
|
9
|
+
reorder?: FileListReorder;
|
|
10
|
+
/** Receives the list, so the focus can be put back after a move. */
|
|
11
|
+
listRef?: (node: HTMLUListElement | null) => void;
|
|
8
12
|
onReplace: (item: NetworkUploadDisplayItem, file: File) => void;
|
|
9
13
|
onRetry: (item: NetworkUploadDisplayItem) => void;
|
|
10
14
|
onRemove: (item: NetworkUploadDisplayItem) => void;
|
|
11
15
|
};
|
|
12
16
|
/** The field's rows, or its empty message. */
|
|
13
|
-
export declare function FileListItems({ items, empty, ...row }: Props): import("react").JSX.Element;
|
|
17
|
+
export declare function FileListItems({ items, empty, reorder, listRef, ...row }: Props): import("react").JSX.Element;
|
|
14
18
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NetworkUploadDisplayItem } from '../../upload/network-upload-field/network-upload-item.js';
|
|
2
|
+
import { FileListReorder } from '../use-file-list-move.js';
|
|
3
|
+
type Props = {
|
|
4
|
+
item: NetworkUploadDisplayItem;
|
|
5
|
+
reorder: FileListReorder;
|
|
6
|
+
};
|
|
7
|
+
/** A kept row's move up / move down buttons, disabled where it cannot move. */
|
|
8
|
+
export declare function FileListMoveButtons({ item, reorder }: Props): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NetworkUploadDisplayItem } from '../../upload/network-upload-field/network-upload-item.js';
|
|
2
|
+
import { FileListReorder } from '../use-file-list-move.js';
|
|
2
3
|
type Props = {
|
|
3
4
|
item: NetworkUploadDisplayItem;
|
|
4
5
|
accept?: string;
|
|
@@ -6,7 +7,8 @@ type Props = {
|
|
|
6
7
|
onReplace: (item: NetworkUploadDisplayItem, file: File) => void;
|
|
7
8
|
onRetry: (item: NetworkUploadDisplayItem) => void;
|
|
8
9
|
onRemove: (item: NetworkUploadDisplayItem) => void;
|
|
10
|
+
reorder?: FileListReorder;
|
|
9
11
|
};
|
|
10
12
|
/** A row's trailing buttons: retry, download, replace (with its hidden input) and remove. */
|
|
11
|
-
export declare function FileListRowActions({ item, accept, disabled, onReplace, onRetry, onRemove, }: Props): import("react").JSX.Element;
|
|
13
|
+
export declare function FileListRowActions({ item, accept, disabled, onReplace, onRetry, onRemove, reorder, }: Props): import("react").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -15,3 +15,12 @@ export type FileListProps = {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
'aria-label'?: string;
|
|
17
17
|
};
|
|
18
|
+
/** What a file list field can show of a value it holds: only the value is stored. */
|
|
19
|
+
export type FileDescription = {
|
|
20
|
+
name?: string;
|
|
21
|
+
size?: number;
|
|
22
|
+
/** MIME type; an `image/*` type gets an image icon. */
|
|
23
|
+
type?: string;
|
|
24
|
+
/** Download link, when the value is not itself a URL. */
|
|
25
|
+
href?: string;
|
|
26
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileListFieldProps } from './file-list-field.js';
|
|
2
2
|
/** The ids, the accessible group and the upload state behind a file list field. */
|
|
3
|
-
export declare function useFileListField({ required, value, className: _className, empty: _empty, ...props }: FileListFieldProps): {
|
|
3
|
+
export declare function useFileListField({ required, value, className: _className, empty: _empty, describe, reorderable, ...props }: FileListFieldProps): {
|
|
4
4
|
inputId: string;
|
|
5
5
|
inputRef: import('react').RefObject<HTMLInputElement | null>;
|
|
6
6
|
helperId: string;
|
|
@@ -30,4 +30,10 @@ export declare function useFileListField({ required, value, className: _classNam
|
|
|
30
30
|
handleItemRetry: (item: import('../upload/network-upload-field/network-upload-item.js').NetworkUploadDisplayItem) => void;
|
|
31
31
|
handleItemRemove: (item: import('../upload/network-upload-field/network-upload-item.js').NetworkUploadDisplayItem) => void;
|
|
32
32
|
};
|
|
33
|
+
displayItems: import('../upload/network-upload-field/network-upload-item.js').NetworkUploadDisplayItem[];
|
|
34
|
+
move: {
|
|
35
|
+
setRoot: (node: Element | null) => void;
|
|
36
|
+
message: string;
|
|
37
|
+
reorder: import('./use-file-list-move.js').FileListReorder | undefined;
|
|
38
|
+
};
|
|
33
39
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RowMoveDirection } from '@nxgt/material-core/repeatable-group';
|
|
2
|
+
import { NetworkUploadDisplayItem } from '../upload/network-upload-field/network-upload-item.js';
|
|
3
|
+
export type FileListReorder = {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
canMove: (item: NetworkUploadDisplayItem, direction: RowMoveDirection) => boolean;
|
|
6
|
+
onMove: (item: NetworkUploadDisplayItem, direction: RowMoveDirection) => void;
|
|
7
|
+
};
|
|
8
|
+
type Options = {
|
|
9
|
+
reorderable?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
kept: readonly string[] | undefined;
|
|
12
|
+
onValueChange?: (value: string[]) => void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Reordering the kept files: which row can move where (the rules are
|
|
16
|
+
* `@nxgt/material-core`'s, shared with RepeatableGroup), the focus once the
|
|
17
|
+
* value changed, and what the polite live region says.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useFileListMove({ reorderable, disabled, kept, onValueChange, }: Options): {
|
|
20
|
+
setRoot: (node: Element | null) => void;
|
|
21
|
+
message: string;
|
|
22
|
+
reorder: FileListReorder | undefined;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -4,6 +4,13 @@ export type NetworkUploadDisplayItem = {
|
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
size?: number;
|
|
7
|
+
/** MIME type of a committed value, when the host described it. */
|
|
8
|
+
type?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Download link of a committed value: the value itself when `undefined`,
|
|
11
|
+
* none when `null` (described with a link that is not safe).
|
|
12
|
+
*/
|
|
13
|
+
href?: string | null;
|
|
7
14
|
status: NetworkUploadItemStatus;
|
|
8
15
|
progress?: number;
|
|
9
16
|
file?: File;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Bold, italic and strikethrough: the marks of a comment or a chat message.
|
|
4
|
+
* The strikethrough button is left out when the schema has no `strike` mark
|
|
5
|
+
* (`marks({ strike: false })`, or a starter kit configured with `strike: false`).
|
|
6
|
+
*/
|
|
3
7
|
export declare function CompactMarkButtons({ editor }: {
|
|
4
8
|
editor: Editor;
|
|
5
9
|
}): import("react").JSX.Element;
|
|
@@ -74,8 +74,9 @@ export declare const editorFeatures: {
|
|
|
74
74
|
readonly markdownPaste: () => import('./types.js').EditorFeature & {
|
|
75
75
|
key: string;
|
|
76
76
|
};
|
|
77
|
-
readonly marks: ({ compact }?: {
|
|
77
|
+
readonly marks: ({ compact, strike, }?: {
|
|
78
78
|
compact?: boolean;
|
|
79
|
+
strike?: boolean;
|
|
79
80
|
}) => import('./types.js').EditorFeature & {
|
|
80
81
|
key: string;
|
|
81
82
|
};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `compact` keeps the content's marks but shows only bold, italic and
|
|
3
3
|
* strikethrough in the toolbar and bubble menu (comments, chat).
|
|
4
|
+
* `strike` (default `true`, compact and full editors alike) set to `false`
|
|
5
|
+
* leaves strikethrough out: no mark, no button, and no `~~` written to
|
|
6
|
+
* Markdown. Pasted or loaded Markdown with `~~x~~` does not throw: it reads as
|
|
7
|
+
* the plain text `x`, the markers dropped.
|
|
4
8
|
*/
|
|
5
|
-
export declare const marks: ({ compact }?: {
|
|
9
|
+
export declare const marks: ({ compact, strike, }?: {
|
|
6
10
|
compact?: boolean;
|
|
11
|
+
strike?: boolean;
|
|
7
12
|
}) => import('../types.js').EditorFeature & {
|
|
8
13
|
key: string;
|
|
9
14
|
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Tone } from '../../tones.js';
|
|
2
|
+
import { CalendarEventBadge } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* A stretch of time the calendar shades behind its events, such as a holiday,
|
|
5
|
+
* a term, a closure or a half day off. It never blocks a slot: events can be
|
|
6
|
+
* made and dropped over it.
|
|
7
|
+
*
|
|
8
|
+
* `start` and `end` are ISO strings. A date-only value (`2026-12-25`) means
|
|
9
|
+
* whole days, read in the calendar's `timeZone`; `end` is always exclusive, so
|
|
10
|
+
* `2026-12-25` to `2026-12-26` is the single day of 25 December. A value with
|
|
11
|
+
* a time is an instant, which gives a half day (`2026-12-24T12:00:00` to
|
|
12
|
+
* `2026-12-25`).
|
|
13
|
+
*/
|
|
14
|
+
export type EventCalendarSpan = {
|
|
15
|
+
id: string;
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
label: string;
|
|
19
|
+
/** Default `'neutral'`. */
|
|
20
|
+
tone?: Tone;
|
|
21
|
+
/**
|
|
22
|
+
* The resource column the span belongs to. One with none shades every
|
|
23
|
+
* column; one with an unknown id shades none.
|
|
24
|
+
*/
|
|
25
|
+
resourceId?: string;
|
|
26
|
+
};
|
|
27
|
+
/** The part of a span that falls on one day of the zone's calendar. */
|
|
28
|
+
export type BackdropSegment = {
|
|
29
|
+
span: EventCalendarSpan;
|
|
30
|
+
/** The `YYYY-MM-DD` day. */
|
|
31
|
+
day: string;
|
|
32
|
+
/** Wall-clock minutes from midnight where the span starts on this day (0 for a whole day). */
|
|
33
|
+
fromMin: number;
|
|
34
|
+
/** Wall-clock minutes where it ends (1440 for a whole day or one running on). */
|
|
35
|
+
toMin: number;
|
|
36
|
+
/** The span covers the whole day, whatever its length (23 or 25 hours on a clock change). */
|
|
37
|
+
whole: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** A span laid out as a bar over the day columns of the all-day strip. */
|
|
40
|
+
export type BackdropLane = {
|
|
41
|
+
span: EventCalendarSpan;
|
|
42
|
+
/** The first column (day) of the bar. */
|
|
43
|
+
startCol: number;
|
|
44
|
+
/** The number of columns it covers. */
|
|
45
|
+
cols: number;
|
|
46
|
+
/** The lane (row) of the strip. */
|
|
47
|
+
row: number;
|
|
48
|
+
continuesBefore: boolean;
|
|
49
|
+
continuesAfter: boolean;
|
|
50
|
+
};
|
|
51
|
+
/** A label with a tone that marks a day or a week, keyed by date (`2026-12-24`). */
|
|
52
|
+
export type EventCalendarBadges = Record<string, CalendarEventBadge>;
|
|
53
|
+
/** The props that decorate the days: shaded spans and badges. */
|
|
54
|
+
export type EventCalendarDayMarksProps = {
|
|
55
|
+
/**
|
|
56
|
+
* Stretches of time shaded behind the events (a holiday, a term, a half day
|
|
57
|
+
* off). They never block a slot, take no pointer event, and are read in the
|
|
58
|
+
* name of the day or column they fall on. Not a prop of `mode="template"`.
|
|
59
|
+
*/
|
|
60
|
+
spans?: EventCalendarSpan[];
|
|
61
|
+
/**
|
|
62
|
+
* A badge on a day, keyed by its `YYYY-MM-DD` date (`{ '2026-12-24': { label:
|
|
63
|
+
* 'Eve', tone: 'info' } }`): in the day's header (week and day views) and
|
|
64
|
+
* next to its number (month). It is read in the name of the day. Not a prop of `mode="template"`, which has no dates. Where the
|
|
65
|
+
* room is short (a phone's week column or month cell) it becomes a short tone bar.
|
|
66
|
+
*/
|
|
67
|
+
dayBadges?: EventCalendarBadges;
|
|
68
|
+
/**
|
|
69
|
+
* A badge on a week, keyed by the `YYYY-MM-DD` date of its first day, which
|
|
70
|
+
* follows `weekStartsOn` (Monday `2026-12-21` when weeks start on Monday). It
|
|
71
|
+
* is drawn in the time views' gutter corner and on the first cell of the
|
|
72
|
+
* month's row, and is read in that cell's name. Not a prop of `mode="template"`.
|
|
73
|
+
*/
|
|
74
|
+
weekBadges?: EventCalendarBadges;
|
|
75
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type EventCalendarChromeState = {
|
|
2
|
+
focusedEventId: string | null;
|
|
3
|
+
query: string;
|
|
4
|
+
/** The way the last move went (-1 back, 1 forward): the view slides from it. */
|
|
5
|
+
direction: -1 | 0 | 1;
|
|
6
|
+
/** A view was picked in the switcher: `phoneView` no longer applies. */
|
|
7
|
+
viewPicked: boolean;
|
|
8
|
+
/** The keyboard moved the cursor: its day takes the focus once rendered. */
|
|
9
|
+
dayFocus: boolean;
|
|
10
|
+
/** The resource the phone's switcher shows; `null` is the first. */
|
|
11
|
+
resourceId: string | null;
|
|
12
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { EventChipVariant } from '../../display/event-chip/event-chip.classes.js';
|
|
3
|
+
import { EventCalendarBadges, EventCalendarSpan } from './backdrop.types.js';
|
|
3
4
|
import { TemplateContext } from './template.types.js';
|
|
4
5
|
import { CalendarEvent, EventCalendarPreviewField, EventCalendarRenderEvent, EventCalendarSlot, EventCalendarView } from './types.js';
|
|
5
6
|
import { EventCalendarModel } from './use-event-calendar.js';
|
|
@@ -8,7 +9,13 @@ export type EventCalendarContextValue = EventCalendarModel & {
|
|
|
8
9
|
sourceEvents?: CalendarEvent[];
|
|
9
10
|
/** Set in `mode="template"`: the lanes, and the lane of each event. */
|
|
10
11
|
template?: TemplateContext;
|
|
11
|
-
|
|
12
|
+
/** The spans to shade behind the events (see `EventCalendarProps.spans`). */
|
|
13
|
+
spans?: EventCalendarSpan[];
|
|
14
|
+
/** Badges on days and on weeks (see `EventCalendarProps.dayBadges`). */
|
|
15
|
+
dayBadges?: EventCalendarBadges;
|
|
16
|
+
weekBadges?: EventCalendarBadges;
|
|
17
|
+
/** The hint that events can be dragged, read as the board's description; unset when they cannot (`readOnlyEvents`). */
|
|
18
|
+
dragHint?: string;
|
|
12
19
|
searchable: boolean;
|
|
13
20
|
/** The views the switcher offers. */
|
|
14
21
|
views?: EventCalendarView[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { closestCenter } from '@dnd-kit/core';
|
|
2
|
-
import { CalendarEvent } from './types.js';
|
|
2
|
+
import { CalendarEvent, CalendarEventBadge } from './types.js';
|
|
3
3
|
export declare const calendarCollisionDetection: typeof closestCenter;
|
|
4
4
|
export declare function snapToStep(date: Date, stepMinutes?: number): Date;
|
|
5
5
|
/** `date` rounded to the nearest `stepMinutes` of the clock's epoch: right in a zone whose offset is a multiple of the step. */
|
|
@@ -15,3 +15,5 @@ export declare function moveEventToDay(event: CalendarEvent, day: Date): Calenda
|
|
|
15
15
|
export declare function moveEventToDateTime(event: CalendarEvent, dateTime: Date, snap?: (date: Date) => Date): CalendarEvent;
|
|
16
16
|
export declare function resizeEventEnd(event: CalendarEvent, end: Date, snap?: (date: Date) => Date): CalendarEvent;
|
|
17
17
|
export declare function isToday(day: Date, now?: Date): boolean;
|
|
18
|
+
/** Every badge of an event, `badge` first. */
|
|
19
|
+
export declare function eventBadges(event: CalendarEvent): CalendarEventBadge[];
|
|
@@ -12,4 +12,4 @@ export type EventCalendarShellProps = EventCalendarProps & {
|
|
|
12
12
|
* mini-month side panel and a phone layout of its own. Events are props; the
|
|
13
13
|
* chrome (search, focus, the last move's direction) lives in a slice.
|
|
14
14
|
*/
|
|
15
|
-
export declare function EventCalendarShell({ template, visible, onEventClick, onSlotClick, eventPreview, previewFields, onEventEdit, onEventDelete, className, renderEvent, toolbar, searchable, views, phoneView, sidebar, eventVariant, scrollToHour, ...options }: EventCalendarShellProps): import("react").JSX.Element;
|
|
15
|
+
export declare function EventCalendarShell({ template, visible, onEventClick, onSlotClick, eventPreview, previewFields, onEventEdit, onEventDelete, className, renderEvent, toolbar, searchable, views, phoneView, sidebar, eventVariant, scrollToHour, spans, dayBadges, weekBadges, ...options }: EventCalendarShellProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { BackdropLane, BackdropSegment, EventCalendarSpan } from './backdrop.types.js';
|
|
2
|
+
/** Whether a span value is a date (`2026-12-25`): whole days, not an instant. */
|
|
3
|
+
export declare function isDateOnly(value: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* The instants a span covers, `end` exclusive. A date-only value is the first
|
|
6
|
+
* instant of that day in the zone; a time with no offset (`2026-12-24T12:00`)
|
|
7
|
+
* is that wall-clock time in the zone; one with an offset or `Z` is the
|
|
8
|
+
* instant it names. A span
|
|
9
|
+
* with an invalid value, or that ends at or before its start, gives `null`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function spanRange(span: EventCalendarSpan, timeZone?: string): {
|
|
12
|
+
start: Date;
|
|
13
|
+
end: Date;
|
|
14
|
+
} | null;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a span shades a resource column. Without `resourceId` (no
|
|
17
|
+
* resources) every span counts; `null` is the unassigned column, which only
|
|
18
|
+
* the spans with no `resourceId` shade.
|
|
19
|
+
*/
|
|
20
|
+
export declare function spanMatchesResource(span: EventCalendarSpan, resourceId?: string | null): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The part of a span on the zone's day `day`, or `null` when it does not touch
|
|
23
|
+
* it. The day runs from its first instant to the next day's, so on a clock
|
|
24
|
+
* change it is 23 or 25 hours long and a span over all of it is `whole`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function spanOnDay(span: EventCalendarSpan, day: string, timeZone?: string): BackdropSegment | null;
|
|
27
|
+
/**
|
|
28
|
+
* The spans on one day, for one resource column when given, in the order of
|
|
29
|
+
* `spans`. Spans never block anything: this only says what to draw.
|
|
30
|
+
*/
|
|
31
|
+
export declare function spansForDay(spans: EventCalendarSpan[] | undefined, day: string, timeZone?: string, resourceId?: string | null): BackdropSegment[];
|
|
32
|
+
/**
|
|
33
|
+
* The all-day strip: each span as a bar over the consecutive `days` it covers
|
|
34
|
+
* wholly, put in the first lane with room (longest and earliest first). A
|
|
35
|
+
* span that only covers part of a day (a half day) has no bar: it is drawn as
|
|
36
|
+
* a band in the time grid, and by `spansForDay` in the month.
|
|
37
|
+
*/
|
|
38
|
+
export declare function layoutBackdropLanes(spans: EventCalendarSpan[] | undefined, days: string[], timeZone?: string, resourceId?: string | null): BackdropLane[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
import { EventCalendarBadges } from './backdrop.types.js';
|
|
3
|
+
import { CalendarEventBadge } from './types.js';
|
|
4
|
+
type WeekStart = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
/** The badge set on a day, keyed by its `YYYY-MM-DD` date. */
|
|
6
|
+
export declare function dayBadgeOf(dayBadges: EventCalendarBadges | undefined, day: Date): CalendarEventBadge | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The key of the week a day falls in: the date of its first day, which follows
|
|
9
|
+
* `weekStartsOn` (the locale's when unset), whatever the view draws of it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function weekBadgeKey(day: Date, locale?: Locale, weekStartsOn?: WeekStart): string;
|
|
12
|
+
/** The badge set on the week a day falls in. */
|
|
13
|
+
export declare function weekBadgeOf(weekBadges: EventCalendarBadges | undefined, day: Date, locale?: Locale, weekStartsOn?: WeekStart): CalendarEventBadge | undefined;
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Locale } from 'date-fns';
|
|
2
|
-
import {
|
|
2
|
+
import { BackdropSegment } from './backdrop.types.js';
|
|
3
|
+
import { CalendarEvent, CalendarEventBadge } from './types.js';
|
|
3
4
|
/**
|
|
4
5
|
* The times a chip or an agenda row shows. In a zone they are read from the
|
|
5
6
|
* true instants with the zone's own clock (`wallOf`), never through the
|
|
@@ -10,9 +11,21 @@ export declare function eventTimes(drawn: CalendarEvent, source: CalendarEvent,
|
|
|
10
11
|
time?: string;
|
|
11
12
|
endTime?: string;
|
|
12
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* The accessible name of an event's group: its title, then its badge, then
|
|
16
|
+
* `cancelled` (the translated word) when its status says so.
|
|
17
|
+
*/
|
|
18
|
+
export declare function eventName(event: CalendarEvent, title: string, cancelled: string): string;
|
|
13
19
|
/**
|
|
14
20
|
* The range label of the popover, in the zone: the day is read at noon and
|
|
15
21
|
* the time on a fixed day, so a wall time the browser's own clock skips never
|
|
16
22
|
* shifts what is said.
|
|
17
23
|
*/
|
|
18
24
|
export declare function zonedRangeLabel(event: CalendarEvent, locale: Locale, zone: string): string;
|
|
25
|
+
/** A day's name with its spans' labels after it: the cell or the column reads them out, the shading is decoration. */
|
|
26
|
+
export declare function nameWithSpans(date: string, segments: BackdropSegment[]): string;
|
|
27
|
+
/** A day's name with its badges after it, for the cell or column that reads them out. */
|
|
28
|
+
export declare function nameWithBadges(name: string, day: CalendarEventBadge | undefined, week: {
|
|
29
|
+
badge: CalendarEventBadge | undefined;
|
|
30
|
+
text: (label: string) => string;
|
|
31
|
+
}): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The lane (row) of each item, already in the order they should win a lane:
|
|
3
|
+
* the first lane with room over its columns, a new one when none has. An item
|
|
4
|
+
* covers `cols` columns from `startCol`; `columns` is the width of a lane.
|
|
5
|
+
*/
|
|
6
|
+
export declare function packLanes(items: {
|
|
7
|
+
startCol: number;
|
|
8
|
+
cols: number;
|
|
9
|
+
}[], columns: number): number[];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CalendarEvent } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* What a read-only event's draggable wrapper must not say: dnd-kit marks it
|
|
4
|
+
* "draggable", points to its pick-up instructions and gives it a tab stop of
|
|
5
|
+
* its own. The chip's own button stays the one focusable, named control.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readOnlyDragProps(readOnly: boolean): {
|
|
8
|
+
readonly 'aria-roledescription': undefined;
|
|
9
|
+
readonly 'aria-describedby': undefined;
|
|
10
|
+
readonly 'aria-disabled': undefined;
|
|
11
|
+
readonly tabIndex: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
readonly 'aria-roledescription'?: undefined;
|
|
14
|
+
'aria-describedby'?: undefined;
|
|
15
|
+
readonly 'aria-disabled'?: undefined;
|
|
16
|
+
readonly tabIndex?: undefined;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The props of an event's draggable wrapper (`Draggable`), the same in the
|
|
20
|
+
* time grid, the all-day strip and the month's overflow list: its drag
|
|
21
|
+
* switches (off with `disabled`, `readOnlyEvents` or the event's own
|
|
22
|
+
* `disabled`), a named group in place of dnd-kit's `button` (which would hold
|
|
23
|
+
* the chip's own button), and the focus that follows the event.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useEventDragProps(event: CalendarEvent, title: string): {
|
|
26
|
+
readonly role: "group";
|
|
27
|
+
readonly 'aria-label': string;
|
|
28
|
+
readonly onFocus: () => void;
|
|
29
|
+
readonly onClick: (click: {
|
|
30
|
+
stopPropagation: () => void;
|
|
31
|
+
}) => void;
|
|
32
|
+
readonly 'aria-roledescription': undefined;
|
|
33
|
+
readonly 'aria-describedby': undefined;
|
|
34
|
+
readonly 'aria-disabled': undefined;
|
|
35
|
+
readonly tabIndex: undefined;
|
|
36
|
+
readonly id: string;
|
|
37
|
+
readonly data: {
|
|
38
|
+
readonly type: "event";
|
|
39
|
+
};
|
|
40
|
+
readonly disabled: boolean;
|
|
41
|
+
} | {
|
|
42
|
+
readonly role: "group";
|
|
43
|
+
readonly 'aria-label': string;
|
|
44
|
+
readonly onFocus: () => void;
|
|
45
|
+
readonly onClick: (click: {
|
|
46
|
+
stopPropagation: () => void;
|
|
47
|
+
}) => void;
|
|
48
|
+
readonly 'aria-roledescription'?: undefined;
|
|
49
|
+
readonly 'aria-describedby'?: undefined;
|
|
50
|
+
readonly 'aria-disabled'?: undefined;
|
|
51
|
+
readonly tabIndex?: undefined;
|
|
52
|
+
readonly id: string;
|
|
53
|
+
readonly data: {
|
|
54
|
+
readonly type: "event";
|
|
55
|
+
};
|
|
56
|
+
readonly disabled: boolean;
|
|
57
|
+
};
|
|
@@ -24,7 +24,12 @@ export declare function withColumn(event: CalendarEvent, column: string | null):
|
|
|
24
24
|
export declare function columnKey(column: ResourceColumn): string;
|
|
25
25
|
/** The resource an event belongs to; none when it has none or an unknown one. */
|
|
26
26
|
export declare function ownerOf(event: CalendarEvent, resources?: EventCalendarResource[]): EventCalendarResource | undefined;
|
|
27
|
-
/** The event drawn in its
|
|
27
|
+
/** The tone an event is drawn in: its own, else its resource's. */
|
|
28
|
+
export declare function toneOf(event: CalendarEvent, owner?: EventCalendarResource): Tone | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The event drawn in its tone when it sets no colour of its own: its `color`
|
|
31
|
+
* wins, then its `tone`, then its resource's.
|
|
32
|
+
*/
|
|
28
33
|
export declare function withOwnerTone(event: CalendarEvent, owner?: EventCalendarResource): CalendarEvent;
|
|
29
34
|
/**
|
|
30
35
|
* The column an event is dropped into, or the event itself when it is already
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export type { EventCalendarBadges, EventCalendarDayMarksProps, EventCalendarSpan, } from './backdrop.types.js';
|
|
1
2
|
export type { EventCalendarProps } from './event-calendar.js';
|
|
2
3
|
export { EventCalendar } from './event-calendar.js';
|
|
3
4
|
export { EventCalendarProvider, useEventCalendarContext, } from './event-calendar-context.js';
|
|
4
5
|
export type { EventCalendarLane, EventCalendarTemplateChange, EventCalendarTemplateEvent, EventCalendarTemplateProps, EventCalendarTemplateSlot, EventCalendarWeekday, } from './template.types.js';
|
|
5
|
-
export type { CalendarEvent, CalendarEventBadge, EventCalendarChange, EventCalendarDensity, EventCalendarPreviewField, EventCalendarRenderEvent, EventCalendarResource, EventCalendarSlot, EventCalendarView, } from './types.js';
|
|
6
|
+
export type { CalendarEvent, CalendarEventBadge, CalendarEventStatus, EventCalendarChange, EventCalendarDensity, EventCalendarPreviewField, EventCalendarRenderEvent, EventCalendarResource, EventCalendarSlot, EventCalendarView, } from './types.js';
|
|
6
7
|
export { useEventCalendar } from './use-event-calendar.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BackdropLane } from '../backdrop.types.js';
|
|
2
|
+
import { SpanSegment } from '../event-calendar.spans.js';
|
|
3
|
+
/**
|
|
4
|
+
* What the all-day strip draws: the backdrop spans as bars in the rows on
|
|
5
|
+
* top, then the multi-day events below them.
|
|
6
|
+
*/
|
|
7
|
+
export declare function AllDayBars({ days, segments, backdrop, }: {
|
|
8
|
+
days: Date[];
|
|
9
|
+
segments: SpanSegment[];
|
|
10
|
+
backdrop: {
|
|
11
|
+
lanes: BackdropLane[];
|
|
12
|
+
rows: number;
|
|
13
|
+
};
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BackdropSegment } from '../backdrop.types.js';
|
|
2
|
+
import { DayAxis } from '../event-calendar.axis.js';
|
|
3
|
+
/**
|
|
4
|
+
* The spans of one column of hours: a hatched band under the events (z-0)
|
|
5
|
+
* with its label at the top. Decoration only: `aria-hidden`, no pointer
|
|
6
|
+
* events, no tab stop; the column's name carries the text.
|
|
7
|
+
*/
|
|
8
|
+
export declare function BackdropBands({ segments, axis, }: {
|
|
9
|
+
segments: BackdropSegment[];
|
|
10
|
+
axis: DayAxis;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BackdropLane } from '../backdrop.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A whole-day span as a bar of the all-day strip, in the rows above the
|
|
4
|
+
* events. Decoration: `aria-hidden`, no pointer events (a click reaches the
|
|
5
|
+
* day under it).
|
|
6
|
+
*/
|
|
7
|
+
export declare function BackdropBar({ lane, showLabel, }: {
|
|
8
|
+
lane: BackdropLane;
|
|
9
|
+
/** False where the columns are too narrow for a label (a phone's week). */
|
|
10
|
+
showLabel?: boolean;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BackdropSegment } from '../backdrop.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The spans of a month cell: the cell shaded (a half day shades its half),
|
|
4
|
+
* the label in its top corner from 7rem of cell width, and under that a dot.
|
|
5
|
+
* Decoration: `aria-hidden`, no pointer events; the cell's name carries the
|
|
6
|
+
* text. The cell is the `day` container and an `isolate` stacking context, so
|
|
7
|
+
* the shading sits under its content.
|
|
8
|
+
*/
|
|
9
|
+
export declare function BackdropCell({ segments, below, }: {
|
|
10
|
+
segments: BackdropSegment[];
|
|
11
|
+
/** The labels sit at the cell's foot: its day badge takes the top row. */
|
|
12
|
+
below?: boolean;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The spans of a day in the agenda and the phone's day list: a hatched row
|
|
3
|
+
* with the label, ahead of the events. It is text, not a control: no pointer
|
|
4
|
+
* events (a click reaches the day) and no tab stop.
|
|
5
|
+
*/
|
|
6
|
+
export declare function BackdropRow({ day }: {
|
|
7
|
+
day: Date;
|
|
8
|
+
}): import("react").JSX.Element | null;
|