@nubisco/ui 3.2.0 → 3.3.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.
Files changed (82) hide show
  1. package/dist/components/Button.vue.d.ts.map +1 -1
  2. package/dist/components/Charts/GanttChart.vue.d.ts.map +1 -1
  3. package/dist/components/Charts/InterpolationChart.vue.d.ts.map +1 -1
  4. package/dist/components/Charts/shared/palette.d.ts +76 -1
  5. package/dist/components/Charts/shared/palette.d.ts.map +1 -1
  6. package/dist/components/CommandPalette.vue.d.ts.map +1 -1
  7. package/dist/components/Confirm.d.ts +199 -0
  8. package/dist/components/Confirm.env.d.ts +52 -0
  9. package/dist/components/Confirm.env.d.ts.map +1 -0
  10. package/dist/components/Confirm.vue.d.ts +61 -0
  11. package/dist/components/Confirm.vue.d.ts.map +1 -0
  12. package/dist/components/DatePicker.vue.d.ts +1 -1
  13. package/dist/components/InlineLoading.d.ts +37 -0
  14. package/dist/components/InlineLoading.vue.d.ts +30 -0
  15. package/dist/components/InlineLoading.vue.d.ts.map +1 -0
  16. package/dist/components/MenuItem.vue.d.ts +1 -1
  17. package/dist/components/Modal.d.ts +35 -1
  18. package/dist/components/Modal.vue.d.ts +10 -1
  19. package/dist/components/Modal.vue.d.ts.map +1 -1
  20. package/dist/components/NotificationCenter.d.ts +184 -0
  21. package/dist/components/NotificationCenter.vue.d.ts +130 -0
  22. package/dist/components/NotificationCenter.vue.d.ts.map +1 -0
  23. package/dist/components/NotificationCenterItem.d.ts +53 -0
  24. package/dist/components/NotificationCenterItem.vue.d.ts +36 -0
  25. package/dist/components/NotificationCenterItem.vue.d.ts.map +1 -0
  26. package/dist/components/ProgressBar.vue.d.ts.map +1 -1
  27. package/dist/components/Shell.d.ts +138 -8
  28. package/dist/components/Shell.vue.d.ts +30 -3
  29. package/dist/components/Shell.vue.d.ts.map +1 -1
  30. package/dist/components/ShellPanel.d.ts +16 -0
  31. package/dist/components/ShellPanel.vue.d.ts +1 -0
  32. package/dist/components/ShellPanel.vue.d.ts.map +1 -1
  33. package/dist/components/SidebarLink.d.ts +14 -1
  34. package/dist/components/Skeleton.d.ts +87 -0
  35. package/dist/components/Skeleton.vue.d.ts +17 -0
  36. package/dist/components/Skeleton.vue.d.ts.map +1 -0
  37. package/dist/components/Spinner.d.ts +80 -0
  38. package/dist/components/Spinner.overlay.d.ts +56 -0
  39. package/dist/components/Spinner.overlay.d.ts.map +1 -0
  40. package/dist/components/Spinner.vue.d.ts +25 -0
  41. package/dist/components/Spinner.vue.d.ts.map +1 -0
  42. package/dist/components/Stepper.context.d.ts +48 -0
  43. package/dist/components/Stepper.context.d.ts.map +1 -0
  44. package/dist/components/Stepper.d.ts +101 -0
  45. package/dist/components/Stepper.vue.d.ts +31 -0
  46. package/dist/components/Stepper.vue.d.ts.map +1 -0
  47. package/dist/components/StepperStep.vue.d.ts +24 -0
  48. package/dist/components/StepperStep.vue.d.ts.map +1 -0
  49. package/dist/components/TextInput.vue.d.ts +2 -2
  50. package/dist/components/TextInput.vue.d.ts.map +1 -1
  51. package/dist/components/Toast.vue.d.ts +43 -0
  52. package/dist/components/Toast.vue.d.ts.map +1 -1
  53. package/dist/components/Toaster.d.ts +93 -0
  54. package/dist/components/Toaster.vue.d.ts +30 -0
  55. package/dist/components/Toaster.vue.d.ts.map +1 -0
  56. package/dist/components/UserMenu.vue.d.ts.map +1 -1
  57. package/dist/components/index.d.ts.map +1 -1
  58. package/dist/composables/useConfirm.composable.d.ts +45 -0
  59. package/dist/composables/useConfirm.composable.d.ts.map +1 -0
  60. package/dist/composables/useInlineLoading.composable.d.ts +43 -0
  61. package/dist/composables/useInlineLoading.composable.d.ts.map +1 -0
  62. package/dist/composables/useLoadingAnnouncer.composable.d.ts +63 -0
  63. package/dist/composables/useLoadingAnnouncer.composable.d.ts.map +1 -0
  64. package/dist/composables/useScrollLock.composable.d.ts +47 -0
  65. package/dist/composables/useScrollLock.composable.d.ts.map +1 -0
  66. package/dist/composables/useShellSlot.composable.d.ts +193 -0
  67. package/dist/composables/useShellSlot.composable.d.ts.map +1 -0
  68. package/dist/composables/useToast.composable.d.ts +325 -0
  69. package/dist/composables/useToast.composable.d.ts.map +1 -0
  70. package/dist/directives/ToolTip.content.d.ts +20 -0
  71. package/dist/directives/ToolTip.content.d.ts.map +1 -0
  72. package/dist/directives/ToolTip.directive.d.ts +94 -8
  73. package/dist/directives/ToolTip.directive.d.ts.map +1 -1
  74. package/dist/global.d.ts +18 -0
  75. package/dist/index.cjs +8 -9
  76. package/dist/index.mjs +17643 -14497
  77. package/dist/main.d.ts +43 -2
  78. package/dist/main.d.ts.map +1 -1
  79. package/dist/ui.css +1 -1
  80. package/package.json +1 -1
  81. package/src/styles/_theme.scss +171 -0
  82. package/src/styles/directives/_tooltip.scss +143 -21
@@ -0,0 +1,184 @@
1
+ import type { IAnchorSize } from '../utils/anchorPosition.helper'
2
+ import type { TNotificationVariant } from './NotificationCenterItem.d'
3
+
4
+ export interface INotificationItem {
5
+ /** Stable key. Reused across refetches so the list does not re-mount. */
6
+ id: string | number
7
+ title: string
8
+ body?: string
9
+ /** ISO string, epoch milliseconds or a Date. */
10
+ time?: string | number | Date
11
+ /** Pre-formatted time, when the host already has one it likes. */
12
+ timeLabel?: string
13
+ read?: boolean
14
+ /** Status word, from the same vocabulary as NbToast and NbMessage. */
15
+ variant?: TNotificationVariant
16
+ icon?: string | null
17
+ /** Renders the row as a link instead of a button. */
18
+ href?: string
19
+ /** Overrides the centre's `interactive` for this one row. `false` makes
20
+ * the row inert: read, not pressed. */
21
+ interactive?: boolean
22
+ }
23
+
24
+ /**
25
+ * Everything a replacement trigger has to carry for the panel to be
26
+ * announced correctly. Handed to the `#trigger` slot and meant to be spread
27
+ * onto whatever element the host renders:
28
+ *
29
+ * ```vue
30
+ * <template #trigger="{ triggerProps, setTriggerRef, toggle, unreadCount }">
31
+ * <NbButton :ref="setTriggerRef" v-bind="triggerProps" @click="toggle" />
32
+ * </template>
33
+ * ```
34
+ *
35
+ * The centre cannot generate these ids for a host it never sees, and a host
36
+ * cannot guess them, so they are passed rather than documented. `aria-label`
37
+ * is a default, not a mandate: bind it after the spread to replace it.
38
+ */
39
+ export interface INotificationTriggerProps {
40
+ id: string
41
+ 'aria-haspopup': 'dialog'
42
+ 'aria-expanded': 'true' | 'false'
43
+ 'aria-controls': string | undefined
44
+ 'aria-label': string
45
+ disabled: boolean | undefined
46
+ }
47
+
48
+ /**
49
+ * Everything the built-in mark-all control binds, as one object, handed to
50
+ * the `#header-actions` slot. A host that replaces the header still gets the
51
+ * pending-safe behaviour (aria-disabled rather than disabled so the in-flight
52
+ * button keeps focus, aria-busy, and a second click that is swallowed instead
53
+ * of firing a second request the host cannot cancel) by spreading this onto
54
+ * its own button rather than re-deriving it:
55
+ *
56
+ * ```vue
57
+ * <template #header-actions="{ markAllProps, markAllText }">
58
+ * <MyFilter v-model="filter" />
59
+ * <button v-bind="markAllProps">{{ markAllText }}</button>
60
+ * </template>
61
+ * ```
62
+ *
63
+ * `onClick` is included, so `v-bind` attaches the handler with it.
64
+ */
65
+ export interface INotificationMarkAllProps {
66
+ type: 'button'
67
+ disabled: boolean
68
+ 'aria-disabled': 'true' | undefined
69
+ 'aria-busy': 'true' | undefined
70
+ onClick: () => void
71
+ }
72
+
73
+ export interface INotificationCenterProps {
74
+ /** The rows. Omit it and use the default slot when the shape of a
75
+ * notification is more than a title, a body and a time. */
76
+ items?: INotificationItem[]
77
+ /** Authoritative unread total, for products that page the list and know a
78
+ * server-side count larger than what is loaded. Defaults to counting
79
+ * `items` where `read` is not true. */
80
+ unreadCount?: number
81
+ /**
82
+ * How many rows are on screen. Required alongside `unreadCount` whenever
83
+ * you fill the default slot, optional otherwise (with `items` the centre
84
+ * counts the array).
85
+ *
86
+ * The centre renders your slot, it does not read it, so it cannot tell an
87
+ * empty feed from a slot you chose not to fill. Without this number the
88
+ * `#empty` state cannot render at all, and `error` resolves to the full
89
+ * error region rather than the stale-data strip, because a failure that
90
+ * might be hiding behind rows is the one thing this component exists to
91
+ * prevent. A dev-mode warning is printed the first time a panel opens in
92
+ * that configuration.
93
+ */
94
+ itemCount?: number
95
+ /** Optional `v-model:open`. Left undefined the centre owns its own state. */
96
+ open?: boolean
97
+ /** Names the trigger and titles the panel. */
98
+ label?: string
99
+ markAllLabel?: string
100
+ /** Shown, and announced, while `markAllPending` is true. Present tense. */
101
+ markAllPendingLabel?: string
102
+ /** The host's mark-all request is in flight. The control keeps focus and
103
+ * stops accepting clicks rather than firing the request again. */
104
+ markAllPending?: boolean
105
+ emptyTitle?: string
106
+ emptyDescription?: string
107
+ /** Announced while `loading` is true. */
108
+ loadingLabel?: string
109
+ /** Renders placeholder rows instead of the list, the empty state or the
110
+ * error state. A request that has not finished is not a result. */
111
+ loading?: boolean
112
+ /**
113
+ * The fetch failed. This is a state of its own and not a flavour of empty:
114
+ * the audit that motivated this component found an app whose single
115
+ * `.empty-text` rendered both, so a failed request read as "no contacts
116
+ * yet". With no rows to show, the panel renders the error state; with rows
117
+ * already on screen it keeps them and says the refresh failed, because
118
+ * stale notifications beat no notifications.
119
+ */
120
+ error?: boolean
121
+ errorTitle?: string
122
+ errorDescription?: string
123
+ /** Shown on the stale strip when a refresh fails over rows already loaded. */
124
+ errorStaleLabel?: string
125
+ retryLabel?: string
126
+ /** Offer a retry control with the error state. Turn it off when the host
127
+ * retries on its own and a button would be a lie. */
128
+ showRetry?: boolean
129
+ /** Counts above this render as "n+" on the badge. */
130
+ maxCount?: number
131
+ /** Panel width in px. */
132
+ width?: number
133
+ /** Tallest the scrolling list may get, in px. Clamped further when the
134
+ * viewport is shorter than that. */
135
+ maxHeight?: number
136
+ /** Which trigger edge the panel lines up with. */
137
+ align?: 'start' | 'end'
138
+ showMarkAll?: boolean
139
+ /**
140
+ * Whether rows are activatable. `false` renders genuinely inert rows: no
141
+ * tabindex, no place in the roving focus, no `select`. Right for a feed
142
+ * with nowhere to go, and when every row is inert the scrolling list
143
+ * becomes the tab stop so a keyboard can still reach the bottom of it.
144
+ */
145
+ interactive?: boolean
146
+ closeOnSelect?: boolean
147
+ /** Close when the page navigates (history back/forward, a hash change, or
148
+ * any navigation the browser reports through the Navigation API). */
149
+ closeOnNavigate?: boolean
150
+ disabled?: boolean
151
+ /** Phosphor icon for the trigger and the empty state. */
152
+ icon?: string
153
+ /** BCP 47 tag for relative times. */
154
+ locale?: string
155
+ unreadLabel?: string
156
+ readLabel?: string
157
+ /** Builds the unread half of the trigger's accessible name. Replace it to
158
+ * translate or to pluralise the way your language actually does. */
159
+ formatUnread?: (count: number) => string
160
+ }
161
+
162
+ export interface IPanelPlacementOptions {
163
+ align: 'start' | 'end'
164
+ /** Panel width in px. */
165
+ width: number
166
+ /** Tallest the scrolling list may get. */
167
+ maxHeight: number
168
+ viewport: IAnchorSize
169
+ }
170
+
171
+ export interface IPanelPlacement {
172
+ /** Viewport (`position: fixed`) coordinates. */
173
+ top: number
174
+ left: number
175
+ /** The side actually used, after any flip. */
176
+ side: 'top' | 'bottom'
177
+ /** What the list may scroll to before it clips, after the viewport clamp. */
178
+ maxListHeight: number
179
+ }
180
+
181
+ /* The placement arithmetic itself (`placeNotificationPanel`,
182
+ * `isAnchorInViewport`) is runtime code and therefore lives in
183
+ * NotificationCenter.vue, which is where it is imported from. Only its
184
+ * argument and result shapes are declared here. */
@@ -0,0 +1,130 @@
1
+ import type { INotificationCenterProps, INotificationItem, INotificationMarkAllProps, INotificationTriggerProps } from './NotificationCenter.d';
2
+ import type { IAnchorRect, IAnchorSize } from '../utils/anchorPosition.helper';
3
+ import type { IPanelPlacement, IPanelPlacementOptions } from './NotificationCenter.d';
4
+ export type { INotificationItem, INotificationTriggerProps, INotificationMarkAllProps, INotificationCenterProps, } from './NotificationCenter.d';
5
+ export type { IPanelPlacement, IPanelPlacementOptions };
6
+ export declare function placeNotificationPanel(anchor: IAnchorRect, { align, width, maxHeight, viewport }: IPanelPlacementOptions): IPanelPlacement;
7
+ /**
8
+ * Whether any part of the trigger is still on screen. A panel is fixed to the
9
+ * viewport, so once the bell it belongs to has scrolled away the panel is
10
+ * floating over content it has nothing to do with, and the honest thing is to
11
+ * let go of it.
12
+ */
13
+ export declare function isAnchorInViewport(anchor: IAnchorRect, viewport: IAnchorSize): boolean;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<INotificationCenterProps, {
17
+ show: () => void;
18
+ close: (options?: {
19
+ restoreFocus?: boolean;
20
+ }) => void;
21
+ toggle: () => void;
22
+ isOpen: import("vue").ComputedRef<boolean>;
23
+ unreadCount: import("vue").ComputedRef<number>;
24
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ select: (item: INotificationItem | null, event: Event) => any;
26
+ close: () => any;
27
+ open: () => any;
28
+ "update:open": (value: boolean) => any;
29
+ "mark-all-read": () => any;
30
+ retry: () => any;
31
+ }, string, import("vue").PublicProps, Readonly<INotificationCenterProps> & Readonly<{
32
+ onSelect?: ((item: INotificationItem | null, event: Event) => any) | undefined;
33
+ onClose?: (() => any) | undefined;
34
+ onOpen?: (() => any) | undefined;
35
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
36
+ "onMark-all-read"?: (() => any) | undefined;
37
+ onRetry?: (() => any) | undefined;
38
+ }>, {
39
+ align: "start" | "end";
40
+ disabled: boolean;
41
+ label: string;
42
+ icon: string;
43
+ maxHeight: number;
44
+ width: number;
45
+ error: boolean;
46
+ items: INotificationItem[];
47
+ loading: boolean;
48
+ locale: string;
49
+ open: boolean;
50
+ interactive: boolean;
51
+ unreadLabel: string;
52
+ readLabel: string;
53
+ unreadCount: number;
54
+ itemCount: number;
55
+ markAllLabel: string;
56
+ markAllPendingLabel: string;
57
+ markAllPending: boolean;
58
+ emptyTitle: string;
59
+ emptyDescription: string;
60
+ loadingLabel: string;
61
+ errorTitle: string;
62
+ errorDescription: string;
63
+ errorStaleLabel: string;
64
+ retryLabel: string;
65
+ showRetry: boolean;
66
+ maxCount: number;
67
+ showMarkAll: boolean;
68
+ closeOnSelect: boolean;
69
+ closeOnNavigate: boolean;
70
+ formatUnread: (count: number) => string;
71
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
72
+ trigger?: (props: {
73
+ open: boolean;
74
+ toggle: () => void;
75
+ show: () => void;
76
+ close: (options?: {
77
+ restoreFocus?: boolean;
78
+ }) => void;
79
+ unreadCount: number;
80
+ badge: string;
81
+ panelId: string;
82
+ triggerProps: INotificationTriggerProps;
83
+ setTriggerRef: (value: Element | {
84
+ $el?: unknown;
85
+ } | null) => void;
86
+ }) => any;
87
+ } & {
88
+ 'header-start'?: (props: {
89
+ close: (options?: {
90
+ restoreFocus?: boolean;
91
+ }) => void;
92
+ unreadCount: number;
93
+ }) => any;
94
+ } & {
95
+ 'header-actions'?: (props: {
96
+ close: (options?: {
97
+ restoreFocus?: boolean;
98
+ }) => void;
99
+ unreadCount: number;
100
+ markAllRead: () => void;
101
+ markAllPending: boolean;
102
+ markAllProps: INotificationMarkAllProps;
103
+ markAllText: string;
104
+ }) => any;
105
+ } & {
106
+ error?: (props: {
107
+ retry: () => void;
108
+ }) => any;
109
+ } & {
110
+ default?: (props: {
111
+ close: (options?: {
112
+ restoreFocus?: boolean;
113
+ }) => void;
114
+ items: INotificationItem[];
115
+ }) => any;
116
+ } & {
117
+ empty?: (props: {}) => any;
118
+ } & {
119
+ footer?: (props: {
120
+ close: (options?: {
121
+ restoreFocus?: boolean;
122
+ }) => void;
123
+ }) => any;
124
+ }>;
125
+ type __VLS_WithSlots<T, S> = T & {
126
+ new (): {
127
+ $slots: S;
128
+ };
129
+ };
130
+ //# sourceMappingURL=NotificationCenter.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationCenter.vue.d.ts","sourceRoot":"","sources":["../../src/components/NotificationCenter.vue"],"names":[],"mappings":"AAk5CA,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,yB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CAAA;SAAE;;KAw6Bb,KAAK,GAAG;;YACjC,CAAC,KAAK,IAAiB,KAAK,GAAG;;aAC9B,CAAC,KAAK;0BA16BK;YAAE,YAAY,CAAC,EAAE,OAAO,CAAA;SAAE;KA06Bd,KAAK,GAAG;EAgBxC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The fleet's status vocabulary, the same five words NbToast, NbMessage and
3
+ * NbBanner use. `error`, not `danger`: `danger` is the word for a destructive
4
+ * ACTION (NbButton, NbConfirm), and the audit found an app passing
5
+ * variant="danger" to NbMessage, which does not accept it, precisely because
6
+ * the two vocabularies had drifted. `danger` is accepted here and treated as
7
+ * `error` so that app's habit does not silently render an unstyled row, but it
8
+ * is deprecated and not the documented value.
9
+ */
10
+ export type TNotificationStatus =
11
+ | 'neutral'
12
+ | 'info'
13
+ | 'success'
14
+ | 'warning'
15
+ | 'error'
16
+
17
+ /** @deprecated Use TNotificationStatus. */
18
+ export type TNotificationVariant = TNotificationStatus | 'danger'
19
+
20
+ export interface INotificationCenterItemProps {
21
+ /** Headline of the notification. One line, no trailing punctuation. */
22
+ title?: string
23
+ /** Supporting sentence. Wraps to at most three lines before it is clipped. */
24
+ body?: string
25
+ /** When the event happened. Rendered as a `<time>` with a machine-readable
26
+ * `datetime`, and formatted relative to now unless `timeLabel` is given. */
27
+ time?: string | number | Date
28
+ /** A ready-made time string. Use it when the host app already formats
29
+ * timestamps its own way, and this component should not second-guess it. */
30
+ timeLabel?: string
31
+ /** Read notifications lose the dot, the tint and the heavier title. */
32
+ read?: boolean
33
+ /** Colours the leading icon. It does not change the unread affordance,
34
+ * which stays one shape everywhere so it can be learned once. Values are
35
+ * the library's status words: neutral, info, success, warning, error. */
36
+ variant?: TNotificationVariant
37
+ /** Phosphor icon name. `null` renders no icon and no icon gutter. */
38
+ icon?: string | null
39
+ /** Renders the row as a link. Takes priority over `interactive`. */
40
+ href?: string
41
+ /**
42
+ * A row that leads somewhere is a `<button>` (or an `<a>`, with `href`).
43
+ * A row that leads nowhere is `false` here, and then it is genuinely inert:
44
+ * a plain element with no tabindex, outside the panel's roving focus, and
45
+ * it never emits `select`. Not "a button that looks quieter".
46
+ */
47
+ interactive?: boolean
48
+ /** BCP 47 tag for the relative time. Defaults to the runtime locale. */
49
+ locale?: string
50
+ /** Visually hidden state words, translated by the host. */
51
+ unreadLabel?: string
52
+ readLabel?: string
53
+ }
@@ -0,0 +1,36 @@
1
+ import type { INotificationCenterItemProps } from './NotificationCenterItem.d';
2
+ export type { TNotificationStatus, TNotificationVariant, INotificationCenterItemProps, } from './NotificationCenterItem.d';
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
5
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<INotificationCenterItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ select: (event: Event) => any;
7
+ }, string, import("vue").PublicProps, Readonly<INotificationCenterItemProps> & Readonly<{
8
+ onSelect?: ((event: Event) => any) | undefined;
9
+ }>, {
10
+ body: string;
11
+ time: string | number | Date;
12
+ title: string;
13
+ icon: string | null;
14
+ variant: import("./NotificationCenterItem.d").TNotificationVariant;
15
+ href: string;
16
+ locale: string;
17
+ timeLabel: string;
18
+ read: boolean;
19
+ interactive: boolean;
20
+ unreadLabel: string;
21
+ readLabel: string;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
23
+ media?: (props: {}) => any;
24
+ } & {
25
+ title?: (props: {}) => any;
26
+ } & {
27
+ default?: (props: {}) => any;
28
+ } & {
29
+ actions?: (props: {}) => any;
30
+ }>;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
36
+ //# sourceMappingURL=NotificationCenterItem.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationCenterItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/NotificationCenterItem.vue"],"names":[],"mappings":"AA+aA,OAAO,KAAK,EACV,4BAA4B,EAE7B,MAAM,4BAA4B,CAAA;AAOnC,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,4BAA4B,CAAA;wBACd,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;YA0SN,CAAC,KAAK,IAAgB,KAAK,GAAG;;YAC9B,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC7B,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;EAWzC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ProgressBar.vue"],"names":[],"mappings":"AAkMA,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAgKxB,QAAA,MAAM,YAAY;;;;;;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ProgressBar.vue.d.ts","sourceRoot":"","sources":["../../src/components/ProgressBar.vue"],"names":[],"mappings":"AAyNA,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAgKxB,QAAA,MAAM,YAAY;;;;;;;6EAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,9 +1,25 @@
1
1
  type TInspectorSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
2
2
  type TSidebarVariant = 'compact' | 'verbose'
3
+ type TShellTopbar = 'auto' | 'always' | 'never'
4
+ type TShellCollapseAt = 'md' | 'lg' | 'none'
3
5
 
4
6
  interface IShellProps {
5
7
  /**
6
8
  * Whether the inspector column is visible.
9
+ *
10
+ * Controlled or uncontrolled, on the same rule as `sidebarOpen` and
11
+ * `inspectorWidth`: pass it (as `v-model:inspector-visible`) and the
12
+ * application owns the state, leave it out and the shell owns it. Either way
13
+ * `update:inspectorVisible` is emitted when the shell closes the inspector
14
+ * itself, which happens on Escape and on the sheet's dismiss button below
15
+ * `collapseAt`.
16
+ *
17
+ * The shell will always be able to close its own sheet: a shell given
18
+ * `:inspector-visible="true"` with nothing listening for the update still
19
+ * hides the overlay locally rather than leaving the user trapped behind it.
20
+ * That override is scoped to the overlay and clears itself as soon as the
21
+ * application sets the prop true again or the frame stops collapsing, so the
22
+ * desktop column is untouched by it.
7
23
  * @default false
8
24
  */
9
25
  inspectorVisible?: boolean
@@ -24,19 +40,32 @@ interface IShellProps {
24
40
  */
25
41
  inspectorSize?: TInspectorSize
26
42
  /**
27
- * Allow the user to resize the inspector by dragging its left edge, clamped
28
- * between the `inspectorSize` width (the floor) and 50% of the viewport.
43
+ * Allow the user to resize the inspector by dragging its left edge (or by
44
+ * focusing the handle and using the arrow keys), clamped between 288px (the
45
+ * floor) and 50% of the current viewport. The upper clamp is re-evaluated
46
+ * when the window resizes, so a width persisted on a wide monitor cannot
47
+ * squeeze the body on a narrow one.
29
48
  * Double-clicking the handle resets to the `inspectorSize` default. Pair with
30
- * `v-model:inspector-width` to persist the chosen width.
49
+ * `v-model:inspector-width` to persist the chosen width; without it the shell
50
+ * keeps the width itself, so `resizable` alone is a working control rather
51
+ * than a handle that moves nothing.
31
52
  * @default false
32
53
  */
33
54
  resizable?: boolean
34
55
  /**
35
56
  * The user-chosen inspector width in pixels when `resizable` is on, as a
36
- * v-model (`v-model:inspector-width`). `null` (the default / reset state)
37
- * means "use the `inspectorSize` width". The component emits
38
- * `update:inspectorWidth` on drag and on double-click reset; the consumer
39
- * owns persistence.
57
+ * v-model (`v-model:inspector-width`). `null` means "use the `inspectorSize`
58
+ * width", which is what a reset emits.
59
+ *
60
+ * Controlled or uncontrolled, decided once at setup by whether the prop was
61
+ * passed at all:
62
+ *
63
+ * - passed (including as `null`): the application owns the width and the
64
+ * shell renders exactly what it is given. `update:inspectorWidth` is
65
+ * emitted on drag, on the arrow keys and on reset.
66
+ * - omitted: the shell owns the width internally. The handle still works and
67
+ * still emits, so an application can listen without binding, but nothing
68
+ * has to be stored for the drag to do anything.
40
69
  */
41
70
  inspectorWidth?: number | null
42
71
  /**
@@ -55,6 +84,107 @@ interface IShellProps {
55
84
  * @default 'compact'
56
85
  */
57
86
  sidebarVariant?: TSidebarVariant
87
+ /**
88
+ * When the topbar strip is rendered.
89
+ *
90
+ * - 'auto': rendered only when `topbar-left` or `topbar-right` has content,
91
+ * or a view has claimed one of them with `useShellSlot()`. An application
92
+ * that passes neither gets no empty 50px bar and no border line to hide
93
+ * from the outside.
94
+ * - 'always': rendered unconditionally. This is what the shell did before
95
+ * the check existed; set it if a layout depends on the bar's height being
96
+ * reserved even while it is empty.
97
+ * - 'never': never rendered, whatever the slots say. For a full-bleed route
98
+ * inside an application whose shell is declared once, further up.
99
+ *
100
+ * @default 'auto'
101
+ */
102
+ topbar?: TShellTopbar
103
+ /**
104
+ * Render the "skip to content" link as the shell's first focusable element.
105
+ *
106
+ * The shell is the only component that knows where the main region is, so it
107
+ * is the only one that can wire a skip link without the application inventing
108
+ * an id. It is visually hidden until focused, so the first Tab on any page
109
+ * offers it and nothing else changes.
110
+ *
111
+ * Set to `false` only if the application already ships its own.
112
+ * @default true
113
+ */
114
+ skipToContent?: boolean
115
+ /**
116
+ * Label for the skip link. Override for a localised application.
117
+ * @default 'Skip to content'
118
+ */
119
+ skipToContentLabel?: string
120
+ /**
121
+ * The `id` put on the `<main>` element, and the skip link's target. Set it
122
+ * when something outside the shell needs to address the main region by a
123
+ * known id (a router scroll behaviour, an `aria-controls`). Defaults to a
124
+ * per-instance stable id, so two shells on one page do not collide.
125
+ */
126
+ mainId?: string
127
+ /**
128
+ * Accessible name for the sidebar `<nav>` landmark. Two navigation landmarks
129
+ * on a page (the rail plus in-page nav) are indistinguishable in a landmark
130
+ * list without one.
131
+ * @default 'Primary'
132
+ */
133
+ sidebarLabel?: string
134
+ /**
135
+ * Accessible name for the inspector `<aside>` landmark.
136
+ * @default 'Inspector'
137
+ */
138
+ inspectorLabel?: string
139
+ /**
140
+ * The viewport width below which the frame stops being three columns.
141
+ *
142
+ * A 240px verbose rail plus a 288px inspector leaves nothing for the page on
143
+ * a phone, and the frame is `height: 100dvh; overflow: hidden`, so there is
144
+ * no scroll to escape into. Below this width the sidebar becomes an overlay
145
+ * drawer behind a toggle button and the inspector becomes a full-screen
146
+ * sheet over the content row, topbar included, carrying its own dismiss
147
+ * button. The same thing happens at 200% browser zoom on a
148
+ * laptop, because zoom shrinks the viewport in CSS pixels, which is the
149
+ * WCAG 1.4.10 reflow case.
150
+ *
151
+ * - 'md': collapse below 672px. The default.
152
+ * - 'lg': collapse below 1056px. For products whose rail is verbose and
153
+ * whose inspector is usually open.
154
+ * - 'none': never collapse. The pre-3.3 layout, for a frame that is only
155
+ * ever shown on a desktop (an installed desktop build, a control room).
156
+ *
157
+ * @default 'md'
158
+ */
159
+ collapseAt?: TShellCollapseAt
160
+ /**
161
+ * Whether the navigation drawer is open at collapsed widths. Optional: pass
162
+ * it (as `v-model:sidebar-open`) to drive the drawer from the application,
163
+ * leave it out and the shell owns the state itself. Ignored above
164
+ * `collapseAt`, where the sidebar is a permanent column.
165
+ */
166
+ sidebarOpen?: boolean
167
+ /**
168
+ * Accessible name for the button that opens the navigation drawer. The
169
+ * button carries `aria-expanded`, so the label should name the thing, not
170
+ * the action: "Navigation", not "Open navigation".
171
+ * @default 'Navigation'
172
+ */
173
+ navToggleLabel?: string
174
+ /**
175
+ * Accessible name for the button that closes the inspector sheet below
176
+ * `collapseAt`. The button is rendered only in that overlay state, where the
177
+ * sheet covers the topbar and therefore any close control the product put
178
+ * there.
179
+ * @default 'Close inspector'
180
+ */
181
+ inspectorCloseLabel?: string
58
182
  }
59
183
 
60
- export { IShellProps, TInspectorSize, TSidebarVariant }
184
+ export {
185
+ IShellProps,
186
+ TInspectorSize,
187
+ TSidebarVariant,
188
+ TShellTopbar,
189
+ TShellCollapseAt,
190
+ }
@@ -1,4 +1,6 @@
1
- import { IShellProps } from './Shell.d';
1
+ import { IShellProps, TInspectorSize } from './Shell.d';
2
+ declare function setDrawerOpen(open: boolean): void;
3
+ declare function setInspectorVisible(visible: boolean): void;
2
4
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {}, __VLS_15: {}, __VLS_17: {}, __VLS_19: {}, __VLS_27: {}, __VLS_29: {}, __VLS_31: {};
3
5
  type __VLS_Slots = {} & {
4
6
  'outer-menu'?: (props: typeof __VLS_1) => any;
@@ -27,17 +29,42 @@ type __VLS_Slots = {} & {
27
29
  } & {
28
30
  inspector?: (props: typeof __VLS_31) => any;
29
31
  };
30
- declare const __VLS_base: import("vue").DefineComponent<IShellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ declare const __VLS_base: import("vue").DefineComponent<IShellProps, {
33
+ /** The `<main>` element, so a parent can scroll or measure the page ground. */
34
+ mainEl: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
35
+ /** The sidebar `<nav>`, or null when no sidebar slot has content. */
36
+ sidebarEl: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
37
+ /** The inspector `<aside>`. Always present; it animates from zero width. */
38
+ inspectorEl: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
39
+ /** Move focus to the main region, exactly as the skip link does. */
40
+ focusMain: () => void | undefined;
41
+ /** Open or close the navigation drawer. No-op above `collapseAt`. */
42
+ setSidebarOpen: typeof setDrawerOpen;
43
+ /** Show or hide the inspector, and emit `update:inspectorVisible`. */
44
+ setInspectorVisible: typeof setInspectorVisible;
45
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
46
  "update:inspectorWidth": (width: number | null) => any;
47
+ "update:sidebarOpen": (open: boolean) => any;
48
+ "update:inspectorVisible": (visible: boolean) => any;
32
49
  }, string, import("vue").PublicProps, Readonly<IShellProps> & Readonly<{
33
50
  "onUpdate:inspectorWidth"?: ((width: number | null) => any) | undefined;
51
+ "onUpdate:sidebarOpen"?: ((open: boolean) => any) | undefined;
52
+ "onUpdate:inspectorVisible"?: ((visible: boolean) => any) | undefined;
34
53
  }>, {
35
54
  inspectorVisible: boolean;
36
55
  inspectorExpanded: boolean;
37
- inspectorSize: import("./Shell.d").TInspectorSize;
56
+ inspectorSize: TInspectorSize;
38
57
  resizable: boolean;
39
58
  mainPadding: boolean;
40
59
  sidebarVariant: import("./Shell.d").TSidebarVariant;
60
+ topbar: import("./Shell.d").TShellTopbar;
61
+ skipToContent: boolean;
62
+ skipToContentLabel: string;
63
+ sidebarLabel: string;
64
+ inspectorLabel: string;
65
+ collapseAt: import("./Shell.d").TShellCollapseAt;
66
+ navToggleLabel: string;
67
+ inspectorCloseLabel: string;
41
68
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
69
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
43
70
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"Shell.vue.d.ts","sourceRoot":"","sources":["../../src/components/Shell.vue"],"names":[],"mappings":"AAklBA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AA2WvC,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IA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