@estiva-app/ui 0.24.1 → 0.26.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/AttachmentCard.d.ts +48 -6
- package/dist/AttachmentCard.d.ts.map +1 -1
- package/dist/ErrorBoundary.d.ts +32 -0
- package/dist/ErrorBoundary.d.ts.map +1 -0
- package/dist/Lightbox.d.ts +30 -0
- package/dist/Lightbox.d.ts.map +1 -0
- package/dist/ListColumn.d.ts +9 -8
- package/dist/ListColumn.d.ts.map +1 -1
- package/dist/Menu.d.ts +7 -0
- package/dist/Menu.d.ts.map +1 -1
- package/dist/eslint/index.js +4 -4
- package/dist/eslint/index.js.map +2 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +634 -456
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/registry.json +157 -20
- package/src/AttachmentCard.mdx +32 -8
- package/src/AttachmentCard.stories.tsx +54 -0
- package/src/AttachmentCard.test.tsx +115 -0
- package/src/AttachmentCard.tsx +212 -37
- package/src/CollapsibleSection.mdx +1 -1
- package/src/Divider.mdx +3 -3
- package/src/ErrorBoundary.mdx +66 -0
- package/src/ErrorBoundary.stories.tsx +64 -0
- package/src/ErrorBoundary.test.tsx +79 -0
- package/src/ErrorBoundary.tsx +54 -0
- package/src/Lightbox.mdx +71 -0
- package/src/Lightbox.stories.tsx +72 -0
- package/src/Lightbox.test.tsx +65 -0
- package/src/Lightbox.tsx +87 -0
- package/src/ListColumn.mdx +11 -3
- package/src/ListColumn.stories.tsx +34 -10
- package/src/ListColumn.test.tsx +20 -7
- package/src/ListColumn.tsx +34 -11
- package/src/Menu.mdx +5 -2
- package/src/Menu.stories.tsx +6 -7
- package/src/Menu.test.tsx +19 -1
- package/src/Menu.tsx +11 -1
- package/src/SectionHeader.mdx +5 -1
- package/src/SectionLabel.mdx +4 -2
- package/src/eslint/no-rebuilt-behaviour.ts +4 -4
- package/src/index.ts +3 -1
- package/src/registry/registry.test.ts +6 -6
- package/tailwind-preset.js +3 -0
- package/tokens.css +4 -0
package/dist/AttachmentCard.d.ts
CHANGED
|
@@ -5,10 +5,17 @@ import { type ComponentPropsWithRef } from 'react';
|
|
|
5
5
|
* Peek's two attachment components, class for class (UIG-27, Katerina's ruling
|
|
6
6
|
* of 14 September that both apps draw one): `FileAttachmentCard`, the card on
|
|
7
7
|
* something already posted, and `PendingAttachmentChip`, the card in a composer
|
|
8
|
-
* waiting to go.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* waiting to go. The card is told the result — a `src`, an `href`, a `state` —
|
|
9
|
+
* and hands a click back through `onOpen`, `onDownload` and `onRemove`.
|
|
10
|
+
*
|
|
11
|
+
* **It now does the rest of the job too** (UIG-35, Katerina 20 September):
|
|
12
|
+
* given a `remoteSrc` and the app's `fetchImage`, it fetches a file the reader
|
|
13
|
+
* needs permission for and draws the wait and the refusal; it opens a picture
|
|
14
|
+
* full screen in the package's `Lightbox`; and with `download` it saves the
|
|
15
|
+
* file. Peek and Ship had each written those three around it, 174 and 181 lines
|
|
16
|
+
* that did the same things differently — Ship's pictures never opened at all.
|
|
17
|
+
* What stays an app's is the one thing only it knows: how to fetch with its own
|
|
18
|
+
* authorization.
|
|
12
19
|
*
|
|
13
20
|
* Two shapes, decided by the file: an **image** with a picture is a 180px
|
|
14
21
|
* thumbnail you can open; anything else is a 240px **row** — a type tile, the
|
|
@@ -30,10 +37,45 @@ export interface AttachmentCardProps extends Omit<ComponentPropsWithRef<'div'>,
|
|
|
30
37
|
href?: string;
|
|
31
38
|
/** The picture an image card draws. Without it an image is drawn as a row. */
|
|
32
39
|
src?: string;
|
|
33
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* What the picture shows, where the sender said — Ship carries one on every
|
|
42
|
+
* `imeta`. It is what a screen reader reads and what the viewer is named
|
|
43
|
+
* with; `name` is still the file's name, under the thumbnail. Without it the
|
|
44
|
+
* name does both jobs.
|
|
45
|
+
*/
|
|
46
|
+
alt?: string;
|
|
47
|
+
/**
|
|
48
|
+
* A file the app has to *fetch* before it can be used — one on a relay, where
|
|
49
|
+
* reading it needs the reader's own authorization (UIG-35). Give `fetchImage`
|
|
50
|
+
* with it. For a picture the card waits, draws it, and says so if it cannot
|
|
51
|
+
* be read, so no app writes that state machine again; for a document the
|
|
52
|
+
* result is where the row opens, and until it lands the row is dimmed rather
|
|
53
|
+
* than pretending to open. Ignored when `src` is set.
|
|
54
|
+
*/
|
|
55
|
+
remoteSrc?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The full-size picture, fetched only when someone opens it. A thread of
|
|
58
|
+
* screenshots would otherwise pull every original at full size to draw them
|
|
59
|
+
* at 112px. Until it arrives the viewer shows the thumbnail.
|
|
60
|
+
*/
|
|
61
|
+
remoteFullSrc?: string;
|
|
62
|
+
/** How this app fetches a picture it is allowed to read: a URL in, a URL the
|
|
63
|
+
* browser can draw out (an object URL, usually). */
|
|
64
|
+
fetchImage?: (url: string) => Promise<string>;
|
|
65
|
+
/**
|
|
66
|
+
* What a click on an image's picture does. Without it the card **opens the
|
|
67
|
+
* picture itself**, full screen, in the package's `Lightbox` — which is what
|
|
68
|
+
* both apps wanted and one of them had written by hand.
|
|
69
|
+
*/
|
|
34
70
|
onOpen?: () => void;
|
|
35
71
|
/** Shows a download control on hover or focus, and calls this. */
|
|
36
72
|
onDownload?: () => void;
|
|
73
|
+
/**
|
|
74
|
+
* Shows the download control and **saves the file itself**, under `name`:
|
|
75
|
+
* the original where there is one (`remoteFullSrc`), otherwise what the card
|
|
76
|
+
* is drawing. Use `onDownload` instead when the app must do it another way.
|
|
77
|
+
*/
|
|
78
|
+
download?: boolean;
|
|
37
79
|
/** Waiting to be sent: the composer's 200px row, with a remove control on its corner. */
|
|
38
80
|
pending?: boolean;
|
|
39
81
|
/** Removes a pending card. */
|
|
@@ -48,5 +90,5 @@ export interface AttachmentCardProps extends Omit<ComponentPropsWithRef<'div'>,
|
|
|
48
90
|
/** The note's full words, on hover, where the line is short. */
|
|
49
91
|
noteHint?: string;
|
|
50
92
|
}
|
|
51
|
-
export declare function AttachmentCard({ name, size, contentType, href, src, onOpen, onDownload, pending, onRemove, state, note, noteHint, className, ...props }: AttachmentCardProps): import("react").JSX.Element;
|
|
93
|
+
export declare function AttachmentCard({ name, size, contentType, href, src, alt, remoteSrc, remoteFullSrc, fetchImage, onOpen, onDownload, download, pending, onRemove, state, note, noteHint, className, ...props }: AttachmentCardProps): import("react").JSX.Element;
|
|
52
94
|
//# sourceMappingURL=AttachmentCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentCard.d.ts","sourceRoot":"","sources":["../src/AttachmentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AttachmentCard.d.ts","sourceRoot":"","sources":["../src/AttachmentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,qBAAqB,EAAW,MAAM,OAAO,CAAA;AA0BzG;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAA;AA2FzG,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACzF,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;yDACqD;IACrD,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yFAAyF;IACzF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,sGAAsG;IACtG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAwED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,GAAG,EACH,GAAG,EACH,SAAS,EACT,aAAa,EACb,UAAU,EACV,MAAM,EACN,UAAU,EACV,QAAgB,EAChB,OAAe,EACf,QAAQ,EACR,KAAe,EACf,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,+BAgNrB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component, type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Catches a part of the page that crashes, and shows "Something went wrong …
|
|
4
|
+
* Your data is safe — try again." with a Try again button in its place, so the
|
|
5
|
+
* rest of the app keeps working. Try again draws that part again.
|
|
6
|
+
*
|
|
7
|
+
* Moved in from Peek as it was (UIG-14, D3, Katerina 19 September), where one
|
|
8
|
+
* wrapped each panel and the whole app. `ListColumn` holds one of its own.
|
|
9
|
+
*/
|
|
10
|
+
export interface ErrorBoundaryProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/** What it holds, said in the message and the console line: "Something went wrong in the {label}." */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** The room the message fills where no flex column holds it — the whole screen, for the app's own. */
|
|
15
|
+
fallbackClassName?: string;
|
|
16
|
+
/** Draws the message inside a frame of yours, in the same place: `ListColumn` keeps its title this way. */
|
|
17
|
+
frame?: (message: ReactNode) => ReactNode;
|
|
18
|
+
}
|
|
19
|
+
interface ErrorBoundaryState {
|
|
20
|
+
hasError: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Keeps a crash inside what it holds: the rest of the page keeps working, and Try again draws it again. */
|
|
23
|
+
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
24
|
+
state: ErrorBoundaryState;
|
|
25
|
+
static getDerivedStateFromError(): ErrorBoundaryState;
|
|
26
|
+
componentDidCatch(error: unknown, info: {
|
|
27
|
+
componentStack?: string | null;
|
|
28
|
+
}): void;
|
|
29
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../src/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAIjD;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAA;IACnB,sGAAsG;IACtG,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,sGAAsG;IACtG,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,2GAA2G;IAC3G,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK,SAAS,CAAA;CAC1C;AAED,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,4GAA4G;AAC5G,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAClF,KAAK,EAAE,kBAAkB,CAAsB;IAE/C,MAAM,CAAC,wBAAwB,IAAI,kBAAkB;IAIrD,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;IAI1E,MAAM;CAeP"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A picture, full screen, on a scrim — the thing a thumbnail opens into.
|
|
3
|
+
*
|
|
4
|
+
* Both apps had written this by hand and neither had got it right: Peek's
|
|
5
|
+
* `ImageLightbox` and the `FrameLightbox` before it were `createPortal` plus a
|
|
6
|
+
* fixed `<div>`, with no Escape, no focus trap and nothing to return focus to
|
|
7
|
+
* (Peek scan F5, P4; migration B22, Katerina 10 September). Ship never had one
|
|
8
|
+
* at all, so a screenshot in an issue could not be looked at.
|
|
9
|
+
*
|
|
10
|
+
* On Base UI's `Dialog`, like `DialogShell`: the portal, the backdrop, Escape,
|
|
11
|
+
* the outside press and the focus trap are its, and what is written here is the
|
|
12
|
+
* picture, the scrim and the close button.
|
|
13
|
+
*
|
|
14
|
+
* **The close button is this component's own**, not an `IconButton`: a 26px
|
|
15
|
+
* square with no fill is hard to find on top of a photograph, which is why Peek
|
|
16
|
+
* had written an escape note beside its own. A 32px round button on an elevated
|
|
17
|
+
* fill with a hairline reads on any picture.
|
|
18
|
+
*/
|
|
19
|
+
export interface LightboxProps {
|
|
20
|
+
/** The picture to show. Swapping it — a thumbnail for the original, once it
|
|
21
|
+
* arrives — swaps what is on screen, with no flash of nothing. */
|
|
22
|
+
src: string;
|
|
23
|
+
/** What the picture is. Names the viewer for assistive tech too. */
|
|
24
|
+
alt: string;
|
|
25
|
+
onClose: () => void;
|
|
26
|
+
/** Extra classes on the picture itself. */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function Lightbox({ src, alt, onClose, className }: LightboxProps): import("react").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=Lightbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lightbox.d.ts","sourceRoot":"","sources":["../src/Lightbox.tsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,aAAa;IAC5B;uEACmE;IACnE,GAAG,EAAE,MAAM,CAAA;IACX,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,aAAa,+BAoDvE"}
|
package/dist/ListColumn.d.ts
CHANGED
|
@@ -7,12 +7,18 @@ import type { ReactNode } from 'react';
|
|
|
7
7
|
* Moved in from Peek as it looks (UIG-14, N9), where five pages drew it by
|
|
8
8
|
* hand and each carried the same numbers: the frame's 290px and its line, and
|
|
9
9
|
* the list's steps — 16px under the header, 12px above the bottom, rows 12px
|
|
10
|
-
* in from each side. The numbers live here now, once.
|
|
10
|
+
* in from each side and 2px apart. The numbers live here now, once. One
|
|
11
|
+
* spacing for every list (Katerina, D5): a list of groups heads each with a
|
|
12
|
+
* `CollapsibleSection` or a `SectionHeader`.
|
|
11
13
|
*
|
|
12
14
|
* It scrolls its rows itself. A list column that did not was the first of the
|
|
13
15
|
* eight mistakes on the page that led to UIG-15: the frame's card clips, so a
|
|
14
16
|
* list that grew past the fold was simply cut off, with nothing to scroll.
|
|
15
17
|
*
|
|
18
|
+
* It keeps a crash inside itself (D1, D3): if its rows, its actions or the row
|
|
19
|
+
* above break, the column keeps its title and shows `ErrorBoundary`'s message
|
|
20
|
+
* in the middle of the room the list had, and the rest of the page keeps working.
|
|
21
|
+
*
|
|
16
22
|
* `collapsed` closes it with the rail, as Peek's did: it narrows to nothing
|
|
17
23
|
* and fades, in 300ms. What opens and closes the rail stays the app's.
|
|
18
24
|
*/
|
|
@@ -25,17 +31,12 @@ export interface ListColumnProps {
|
|
|
25
31
|
actions?: ReactNode;
|
|
26
32
|
/** A row between the header and the list that stays put while the list scrolls — a field that adds to the list. */
|
|
27
33
|
above?: ReactNode;
|
|
28
|
-
/**
|
|
29
|
-
* The room between rows. `rows` (2px) for a list of one kind of row;
|
|
30
|
-
* `sections` (4px) for groups with labels and dividers of their own.
|
|
31
|
-
*/
|
|
32
|
-
spacing?: 'rows' | 'sections';
|
|
33
34
|
/** Closes the column with the rail: it narrows to nothing and fades. */
|
|
34
35
|
collapsed?: boolean;
|
|
35
|
-
/** The rows. */
|
|
36
|
+
/** The rows, 2px apart. Groups are headed by a `CollapsibleSection` or a `SectionHeader`. */
|
|
36
37
|
children: ReactNode;
|
|
37
38
|
/** Placement only. */
|
|
38
39
|
className?: string;
|
|
39
40
|
}
|
|
40
|
-
export declare function ListColumn(
|
|
41
|
+
export declare function ListColumn(props: ListColumnProps): import("react").JSX.Element;
|
|
41
42
|
//# sourceMappingURL=ListColumn.d.ts.map
|
package/dist/ListColumn.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListColumn.d.ts","sourceRoot":"","sources":["../src/ListColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ListColumn.d.ts","sourceRoot":"","sources":["../src/ListColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,eAAe;IAC9B,oFAAoF;IACpF,KAAK,EAAE,SAAS,CAAA;IAChB,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,8GAA8G;IAC9G,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,mHAAmH;IACnH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,6FAA6F;IAC7F,QAAQ,EAAE,SAAS,CAAA;IACnB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA2BD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAchD"}
|
package/dist/Menu.d.ts
CHANGED
|
@@ -199,6 +199,13 @@ export declare function MenuSection({ label, children, className }: {
|
|
|
199
199
|
children: ReactNode; /** On the heading row — a surface whose rows are px-3 aligns its heading with px-3. */
|
|
200
200
|
className?: string;
|
|
201
201
|
}): import("react").JSX.Element;
|
|
202
|
+
/**
|
|
203
|
+
* The line between two groups of a menu, with its own 4px above and below
|
|
204
|
+
* (UIG-14, Katerina 19 September). A plain `Divider` left that room to each
|
|
205
|
+
* caller, and Peek's menus drew it three ways — none, 4px, 4px and inset — so
|
|
206
|
+
* the lines in its main menus touched the rows.
|
|
207
|
+
*/
|
|
208
|
+
export declare function MenuSeparator(): import("react").JSX.Element;
|
|
202
209
|
/** A non-interactive row inside a menu, at the item's own geometry. */
|
|
203
210
|
export declare function MenuRow({ children, className }: {
|
|
204
211
|
children: ReactNode;
|
package/dist/Menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,qBAAqB,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAgEhI;;;;;;;;;;;;;;;;GAgB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AO,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC,+BA0C7S;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAgB,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BA4DjL;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,+BASxD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,uFAAuF;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAqB7M;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,gCAE5B;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAE3F"}
|
package/dist/eslint/index.js
CHANGED
|
@@ -369,7 +369,7 @@ var OWNED_BEHAVIOURS = [
|
|
|
369
369
|
id: "portal",
|
|
370
370
|
behaviour: "Floats on top of the page",
|
|
371
371
|
baseUi: ["Dialog", "AlertDialog", "Popover", "Menu", "Select", "Combobox", "Autocomplete", "Tooltip", "PreviewCard", "Toast"],
|
|
372
|
-
owners: ["DialogShell", "ConfirmDialog", "CommandPalette", "Popover", "Menu", "Select", "ChipInput", "Tooltip", "PreviewCard", "Toast"],
|
|
372
|
+
owners: ["DialogShell", "ConfirmDialog", "CommandPalette", "Lightbox", "Popover", "Menu", "Select", "ChipInput", "Tooltip", "PreviewCard", "Toast"],
|
|
373
373
|
reads: "createPortal, called, or imported and never called"
|
|
374
374
|
},
|
|
375
375
|
{
|
|
@@ -383,21 +383,21 @@ var OWNED_BEHAVIOURS = [
|
|
|
383
383
|
id: "page-keys",
|
|
384
384
|
behaviour: "Takes its keys by itself",
|
|
385
385
|
baseUi: ["Dialog", "AlertDialog", "Popover", "Menu", "Select", "Combobox", "Tooltip", "PreviewCard", "Toast"],
|
|
386
|
-
owners: ["DialogShell", "Popover", "Menu", "Select", "Tabs", "Toolbar"],
|
|
386
|
+
owners: ["DialogShell", "Lightbox", "Popover", "Menu", "Select", "Tabs", "Toolbar"],
|
|
387
387
|
reads: "a keydown, keyup or keypress listener on window or document"
|
|
388
388
|
},
|
|
389
389
|
{
|
|
390
390
|
id: "focus",
|
|
391
391
|
behaviour: "Holds focus inside while open, and gives it back",
|
|
392
392
|
baseUi: ["Dialog", "AlertDialog", "Popover", "Menu", "Select", "Combobox"],
|
|
393
|
-
owners: ["DialogShell", "CommandPalette"],
|
|
393
|
+
owners: ["DialogShell", "CommandPalette", "Lightbox"],
|
|
394
394
|
reads: "a focusin or focusout listener on window or document; the Tab key compared by hand"
|
|
395
395
|
},
|
|
396
396
|
{
|
|
397
397
|
id: "scroll-lock",
|
|
398
398
|
behaviour: "Stops the page behind it scrolling",
|
|
399
399
|
baseUi: ["Dialog", "AlertDialog"],
|
|
400
|
-
owners: ["DialogShell"],
|
|
400
|
+
owners: ["DialogShell", "Lightbox"],
|
|
401
401
|
reads: "overflow written into the style of document.body or document.documentElement"
|
|
402
402
|
},
|
|
403
403
|
{
|