@db-ux/v-core-components 5.4.0 → 5.6.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 (36) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/agent/LoadingIndicator.md +57 -0
  3. package/agent/_instructions.md +1 -0
  4. package/dist/components/dialog/dialog.vue.d.ts +30 -0
  5. package/dist/components/dialog/index.d.ts +1 -0
  6. package/dist/components/dialog/model.d.ts +36 -0
  7. package/dist/components/dialog-footer/dialog-footer.vue.d.ts +18 -0
  8. package/dist/components/dialog-footer/index.d.ts +1 -0
  9. package/dist/components/dialog-footer/model.d.ts +5 -0
  10. package/dist/components/dialog-header/dialog-header.vue.d.ts +26 -0
  11. package/dist/components/dialog-header/index.d.ts +1 -0
  12. package/dist/components/dialog-header/model.d.ts +10 -0
  13. package/dist/components/drawer/drawer.vue.d.ts +3 -0
  14. package/dist/components/drawer/model.d.ts +11 -9
  15. package/dist/components/drawer-header/model.d.ts +3 -2
  16. package/dist/components/loading-indicator/examples/_timeout.data.d.ts +6 -0
  17. package/dist/components/loading-indicator/index.d.ts +1 -0
  18. package/dist/components/loading-indicator/loading-indicator.vue.d.ts +41 -0
  19. package/dist/components/loading-indicator/model.d.ts +93 -0
  20. package/dist/components/pagination/index.d.ts +1 -0
  21. package/dist/components/pagination/model.d.ts +117 -0
  22. package/dist/components/pagination/pagination.vue.d.ts +31 -0
  23. package/dist/components/pagination-item/index.d.ts +1 -0
  24. package/dist/components/pagination-item/model.d.ts +5 -0
  25. package/dist/components/pagination-item/pagination-item.vue.d.ts +14 -0
  26. package/dist/components/popover/popover.vue.d.ts +1 -1
  27. package/dist/components/tooltip/tooltip.vue.d.ts +1 -1
  28. package/dist/db-ux.es.js +2213 -1478
  29. package/dist/db-ux.umd.js +1 -1
  30. package/dist/index.d.ts +15 -0
  31. package/dist/shared/constants.d.ts +4 -0
  32. package/dist/shared/model.d.ts +43 -4
  33. package/dist/utils/dialog/index.d.ts +77 -0
  34. package/dist/utils/dialog/ponyfill.d.ts +55 -0
  35. package/dist/utils/document-keydown-listener.d.ts +8 -0
  36. package/package.json +14 -14
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @db-ux/v-core-components
2
2
 
3
+ ## 5.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat(DBPagination): add controlled pagination component - [see commit 333d265](https://github.com/db-ux-design-system/core-web/commit/333d265974b64c159e68918d76565ef854f593b5)
8
+ - feat(DBDialog): add `DBDialog`, `DBDialogHeader` and `DBDialogFooter` - [see commit 477e716](https://github.com/db-ux-design-system/core-web/commit/477e71630bee91ab280462857a5921777a02e8fd):
9
+ - Based on the native `<dialog>` element, using its centring and top-layer behaviour. Supports `backdrop` (`strong`, `weak`, `none`) and `containerSize` (`small`, `medium`, `large`, `full`).
10
+ - Open/close declaratively via `open`, natively via Invoker Commands (`command`/`commandfor`) or `<form method="dialog">`; reports `onClose` and `onCancel`.
11
+ - `DBDialogHeader` provides the heading, `startSlot`/`endSlot` and the close button, and composes the dialog's `aria-labelledby` (appending its heading id, preserving a consumer value; a consumer `aria-label` still wins). `DBDialogFooter` holds the actions.
12
+ - Adjust the max inline size with `--db-dialog-max-width` and the viewport distance with `--db-dialog-viewport-inset`.
13
+ - feat(DBDrawer): new event props and renamed header content class - [see commit 477e716](https://github.com/db-ux-design-system/core-web/commit/477e71630bee91ab280462857a5921777a02e8fd):
14
+ - Adds the `onClick` and `onCancel` props to `DBDrawerProps` (matching `DBDialog`). They are composed with the internal ponyfill handlers, so a consumer callback fires and `onCancel` can veto a native close via `event.preventDefault()`.
15
+ - Renames the heading wrapper class `db-drawer-header-container` to `db-drawer-header-content` (same for `db-dialog-header-content`) and moves the start slot before it. Update selectors that target the old class.
16
+ - feat(DBLoadingIndicator): add component to handle spinners, progress-bars etc. - [see commit a0f37cf](https://github.com/db-ux-design-system/core-web/commit/a0f37cf3531b94ace8be6bd606a08de2d7ee5f35)
17
+
18
+ ### Patch Changes
19
+
20
+ - fix(DBDrawer): accessibility, dismissal and shared dialog layer - [see commit 477e716](https://github.com/db-ux-design-system/core-web/commit/477e71630bee91ab280462857a5921777a02e8fd):
21
+ - The header composes the drawer's `aria-labelledby` (appending its heading id, preserving a consumer value) instead of overwriting it; a consumer `aria-label` still wins.
22
+ - Non-modal drawers (`backdrop="none"`, `variant="inside"`, `position="absolute"`) now dismiss on Escape and backdrop click in browsers without `closedby` support (e.g. Firefox ESR) via the ponyfill.
23
+ - Generates the fallback `id` hydration-safely (via the framework `useId()`), re-syncing when the consumer `id` changes or is cleared, so the document never keeps a stale or duplicate id.
24
+ - `open={undefined}` no longer counts as "closed", so a natively opened drawer stays open until `open` is set explicitly.
25
+ - Now uses the shared dialog utils, style mixins and ponyfill module. Behaviour change: the header close button no longer calls `stopPropagation()`, so its click follows native bubbling like every other click in the drawer (identify it via `command="request-close"` on `event.target` if you relied on the old behaviour).
26
+ - Behaviour change: `onClose` now fires on the native `<dialog>` `close` event, so its argument is that `close` event rather than the originating `MouseEvent`/`KeyboardEvent`. The declared `DBDrawerProps["onClose"]` type still reflects the previous union. In the edge case of distinguishing Escape, backdrop and close-button dismissal via `event.key`/`event.type`/`event.target` inside `onClose`, read the initiating event from `onCancel` (Escape/cancel) or `onClick` (pointer) instead.
27
+
28
+ ## 5.5.0
29
+
30
+ ### Patch Changes
31
+
32
+ - fix(DBCustomSelectListItem): make label bold when checked - [see commit 58df675](https://github.com/db-ux-design-system/core-web/commit/58df6754fde599346696e4e9372d97e13c384082)
33
+ - fix(table): remove unwanted white background on component wrapper for `variant="spaced"` - [see commit 1524afe](https://github.com/db-ux-design-system/core-web/commit/1524afe64488b90e47c133594438182bb47a59e7)
34
+
3
35
  ## 5.4.0
4
36
 
5
37
  ### Minor Changes
@@ -0,0 +1,57 @@
1
+
2
+
3
+ # LoadingIndicator Examples (vue)
4
+
5
+ ```vue
6
+ <template>
7
+ <h1>DBLoadingIndicator Documentation Examples</h1>
8
+ <h2>1. Default (indeterminate circular spinner)</h2>
9
+ <DBLoadingIndicator>Loading</DBLoadingIndicator>
10
+ <h2>2. Variants</h2>
11
+ <DBLoadingIndicator variant="circular">Circular</DBLoadingIndicator>
12
+ <DBLoadingIndicator variant="bar">Bar</DBLoadingIndicator>
13
+ <h2>3. Orientation (circular)</h2>
14
+ <DBLoadingIndicator variant="circular" orientation="horizontal">
15
+ Horizontal
16
+ </DBLoadingIndicator>
17
+ <DBLoadingIndicator variant="circular" orientation="vertical">
18
+ Vertical
19
+ </DBLoadingIndicator>
20
+ <h2>4. Sizes</h2>
21
+ <DBLoadingIndicator size="small">Small</DBLoadingIndicator>
22
+ <DBLoadingIndicator size="medium">Medium</DBLoadingIndicator>
23
+ <h2>5. Determinate progress</h2>
24
+ <DBLoadingIndicator
25
+ progressText="42 of 100"
26
+ :indeterminate="false"
27
+ :value="42"
28
+ :max="100"
29
+ >
30
+ Uploading
31
+ </DBLoadingIndicator>
32
+ <h2>6. States</h2>
33
+ <DBLoadingIndicator state="inactive">Inactive</DBLoadingIndicator>
34
+ <DBLoadingIndicator state="active">Active</DBLoadingIndicator>
35
+ <DBLoadingIndicator state="successful"> Successful </DBLoadingIndicator>
36
+ <DBLoadingIndicator state="critical">Critical</DBLoadingIndicator>
37
+ <h2>7. Overlay</h2>
38
+ <DBLoadingIndicator :overlay="true"> Loading overlay </DBLoadingIndicator>
39
+ <h2>8. Delay before showing</h2>
40
+ <DBLoadingIndicator delay="slow">Delayed (slow)</DBLoadingIndicator>
41
+ <DBLoadingIndicator delay="fast">Delayed (fast)</DBLoadingIndicator>
42
+ <h2>9. Show progress text</h2>
43
+ <DBLoadingIndicator
44
+ progressText="42 of 100"
45
+ :indeterminate="false"
46
+ :value="42"
47
+ :max="100"
48
+ :showProgressText="true"
49
+ >
50
+ With progress text
51
+ </DBLoadingIndicator>
52
+ </template>
53
+
54
+ <script setup lang="ts">
55
+ import { DBLoadingIndicator } from "@db-ux/v-v-core-components";
56
+ </script>
57
+ ```
@@ -15,6 +15,7 @@
15
15
  - use for `DBNotification` or `Notification` the file __agent-path__/agent/Notification.md
16
16
  - use for `DBNavigationItem` or `NavigationItem` the file __agent-path__/agent/NavigationItem.md
17
17
  - use for `DBNavigation` or `Navigation` the file __agent-path__/agent/Navigation.md
18
+ - use for `DBLoadingIndicator` or `LoadingIndicator` the file __agent-path__/agent/LoadingIndicator.md
18
19
  - use for `DBLink` or `Link` the file __agent-path__/agent/Link.md
19
20
  - use for `DBInput` or `Input` the file __agent-path__/agent/Input.md
20
21
  - use for `DBInfotext` or `Infotext` the file __agent-path__/agent/Infotext.md
@@ -0,0 +1,30 @@
1
+ import { ClickEvent, GeneralEvent } from "../../shared/model.js";
2
+ import { DBDialogProps } from "./model.js";
3
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
4
+ type __VLS_Slots = {} & {
5
+ header?: (props: typeof __VLS_1) => any;
6
+ } & {
7
+ default?: (props: typeof __VLS_3) => any;
8
+ } & {
9
+ footer?: (props: typeof __VLS_5) => any;
10
+ };
11
+ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBDialogProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<DBDialogProps> & Readonly<{}>, {
12
+ id: string;
13
+ children: any;
14
+ className: string;
15
+ propOverrides: import("../../shared/model.js", { with: { "resolution-mode": "import" } }).PropOverridesType;
16
+ open: boolean | string;
17
+ onClick: (event: ClickEvent<HTMLDialogElement>) => void;
18
+ backdrop: import("./model.js", { with: { "resolution-mode": "import" } }).DialogBackdropType;
19
+ containerSize: import("./model.js", { with: { "resolution-mode": "import" } }).DialogContainerSizeType;
20
+ onCancel: (event: GeneralEvent<HTMLDialogElement>) => void;
21
+ onClose: (event?: Event | undefined) => void;
22
+ }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1 @@
1
+ export { default as DBDialog } from './dialog.vue';
@@ -0,0 +1,36 @@
1
+ import type { CancelEventProps, ClickEvent, CloseEventProps, CloseEventState, DialogDrawerDefaultState, GeneralEvent, GlobalProps, GlobalState } from '../../shared/model.js';
2
+ export declare const DialogBackdropList: readonly ["none", "strong", "weak"];
3
+ export type DialogBackdropType = (typeof DialogBackdropList)[number];
4
+ export declare const DialogContainerSizeList: readonly ["small", "medium", "large", "full"];
5
+ export type DialogContainerSizeType = (typeof DialogContainerSizeList)[number];
6
+ export type DBDialogDefaultProps = {
7
+ /**
8
+ * The backdrop attribute changes the opacity of the backdrop.
9
+ * The backdrop 'none' will use `dialog.show()` instead of `dialog.showModal()`
10
+ */
11
+ backdrop?: DialogBackdropType;
12
+ /**
13
+ * Change the maximum inline size of the dialog. Defaults to `medium`.
14
+ */
15
+ containerSize?: DialogContainerSizeType;
16
+ /**
17
+ * Slot for changing the header of the dialog.
18
+ */
19
+ header?: any;
20
+ /**
21
+ * Slot for changing the footer of the dialog.
22
+ */
23
+ footer?: any;
24
+ /**
25
+ * The open attribute opens or closes the dialog based on the state.
26
+ */
27
+ open?: boolean | string;
28
+ /**
29
+ * React specific onClick to pass to forward ref. Composed with the
30
+ * backdrop-close ponyfill, so a consumer handler still fires.
31
+ */
32
+ onClick?: (event: ClickEvent<HTMLDialogElement>) => void;
33
+ };
34
+ export type DBDialogProps = DBDialogDefaultProps & GlobalProps & CancelEventProps<HTMLDialogElement> & CloseEventProps<GeneralEvent<HTMLDialogElement>>;
35
+ export type DBDialogDefaultState = DialogDrawerDefaultState;
36
+ export type DBDialogState = DBDialogDefaultState & GlobalState & CloseEventState<GeneralEvent<HTMLDialogElement>>;
@@ -0,0 +1,18 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<import("../../index.js", { with: { "resolution-mode": "import" } }).GlobalProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("../../index.js", { with: { "resolution-mode": "import" } }).GlobalProps> & Readonly<{}>, {
6
+ id: string;
7
+ children: any;
8
+ className: string;
9
+ propOverrides: import("../../index.js", { with: { "resolution-mode": "import" } }).PropOverridesType;
10
+ }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1 @@
1
+ export { default as DBDialogFooter } from './dialog-footer.vue';
@@ -0,0 +1,5 @@
1
+ import type { GlobalProps, GlobalState } from '../../shared/model.js';
2
+ export type DBDialogFooterDefaultProps = {};
3
+ export type DBDialogFooterProps = DBDialogFooterDefaultProps & GlobalProps;
4
+ export type DBDialogFooterDefaultState = {};
5
+ export type DBDialogFooterState = DBDialogFooterDefaultState & GlobalState;
@@ -0,0 +1,26 @@
1
+ import { DBDialogHeaderProps } from "./model.js";
2
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
3
+ type __VLS_Slots = {} & {
4
+ 'start-slot'?: (props: typeof __VLS_1) => any;
5
+ } & {
6
+ default?: (props: typeof __VLS_3) => any;
7
+ } & {
8
+ 'end-slot'?: (props: typeof __VLS_5) => any;
9
+ };
10
+ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBDialogHeaderProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<DBDialogHeaderProps> & Readonly<{}>, {
11
+ id: string;
12
+ children: any;
13
+ className: string;
14
+ propOverrides: import("../../index.js", { with: { "resolution-mode": "import" } }).PropOverridesType;
15
+ text: string;
16
+ closeButtonId: string;
17
+ closeButtonText: string;
18
+ }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1 @@
1
+ export { default as DBDialogHeader } from './dialog-header.vue';
@@ -0,0 +1,10 @@
1
+ import { EndSlotProps, GlobalProps, GlobalState, InnerCloseButtonProps, StartSlotProps, TextProps } from '../../shared/model.js';
2
+ export type DBDialogHeaderDefaultProps = {};
3
+ export type DBDialogHeaderProps = DBDialogHeaderDefaultProps & InnerCloseButtonProps & TextProps & GlobalProps & StartSlotProps & EndSlotProps;
4
+ export type DBDialogHeaderDefaultState = {
5
+ _headingId?: string;
6
+ _dialog?: HTMLDialogElement;
7
+ _resolveDialog: () => void;
8
+ removeAriaLabelledBy: () => void;
9
+ };
10
+ export type DBDialogHeaderState = DBDialogHeaderDefaultState & GlobalState;
@@ -1,3 +1,4 @@
1
+ import { ClickEvent, GeneralEvent } from "../../shared/model.js";
1
2
  import { DBDrawerProps } from "./model.js";
2
3
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
3
4
  type __VLS_Slots = {} & {
@@ -13,6 +14,7 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBDrawerPr
13
14
  className: string;
14
15
  propOverrides: import("../../shared/model.js", { with: { "resolution-mode": "import" } }).PropOverridesType;
15
16
  open: boolean | string;
17
+ onClick: (event: ClickEvent<HTMLDialogElement>) => void;
16
18
  variant: import("./model.js", { with: { "resolution-mode": "import" } }).DrawerVariantType;
17
19
  backdrop: import("./model.js", { with: { "resolution-mode": "import" } }).DrawerBackdropType;
18
20
  direction: import("./model.js", { with: { "resolution-mode": "import" } }).DrawerDirectionType;
@@ -20,6 +22,7 @@ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBDrawerPr
20
22
  rounded: boolean | string;
21
23
  position: import("./model.js", { with: { "resolution-mode": "import" } }).DrawerPositionType;
22
24
  containerSize: import("./model.js", { with: { "resolution-mode": "import" } }).DrawerContainerSizeType;
25
+ onCancel: (event: GeneralEvent<HTMLDialogElement>) => void;
23
26
  onClose: (event?: KeyboardEvent | MouseEvent | undefined) => void;
24
27
  }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
25
28
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,4 +1,4 @@
1
- import type { ClickEvent, CloseEventProps, CloseEventState, GeneralKeyboardEvent, GlobalProps, GlobalState, InitializedState } from '../../shared/model.js';
1
+ import type { CancelEventProps, ClickEvent, CloseEventProps, CloseEventState, DialogDrawerDefaultState, GeneralKeyboardEvent, GlobalProps, GlobalState, InitializedState } from '../../shared/model.js';
2
2
  export declare const DrawerBackdropList: readonly ["none", "strong", "weak", "invisible"];
3
3
  export type DrawerBackdropType = (typeof DrawerBackdropList)[number];
4
4
  export declare const DrawerDirectionList: readonly ["to-left", "to-right", "up", "down"];
@@ -9,6 +9,8 @@ export declare const DrawerPositionList: readonly ["fixed", "absolute"];
9
9
  export type DrawerPositionType = (typeof DrawerPositionList)[number];
10
10
  export declare const DrawerContainerSizeList: readonly ["small", "medium", "large", "full"];
11
11
  export type DrawerContainerSizeType = (typeof DrawerContainerSizeList)[number];
12
+ export declare const DrawerClosedByList: readonly ["any", "closerequest", "none"];
13
+ export type DrawerClosedByType = (typeof DrawerClosedByList)[number];
12
14
  export type DBDrawerDefaultProps = {
13
15
  /**
14
16
  * The backdrop attribute changes the opacity of the backdrop.
@@ -56,12 +58,12 @@ export type DBDrawerDefaultProps = {
56
58
  * Change the size of the drawer container.
57
59
  */
58
60
  containerSize?: DrawerContainerSizeType;
61
+ /**
62
+ * React specific onClick to pass to forward ref. Composed with the
63
+ * backdrop-close ponyfill, so a consumer handler still fires.
64
+ */
65
+ onClick?: (event: ClickEvent<HTMLDialogElement>) => void;
59
66
  };
60
- export type DBDrawerProps = DBDrawerDefaultProps & GlobalProps & CloseEventProps<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>>;
61
- export type DBDrawerDefaultState = {
62
- handleDialogOpen: () => void;
63
- isNotModal: () => boolean;
64
- handleBackdropPointerDown: (event: any) => void;
65
- backdropPointerDown: boolean;
66
- };
67
- export type DBDrawerState = DBDrawerDefaultState & GlobalState & CloseEventState<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>> & InitializedState;
67
+ export type DBDrawerProps = DBDrawerDefaultProps & GlobalProps & CancelEventProps<HTMLDialogElement> & CloseEventProps<ClickEvent<HTMLButtonElement | HTMLDialogElement> | GeneralKeyboardEvent<HTMLDialogElement>>;
68
+ export type DBDrawerDefaultState = DialogDrawerDefaultState;
69
+ export type DBDrawerState = DBDrawerDefaultState & GlobalState & CloseEventState<Event> & InitializedState;
@@ -2,8 +2,9 @@ import { EndSlotProps, GlobalProps, GlobalState, InnerCloseButtonProps, StartSlo
2
2
  export type DBDrawerHeaderDefaultProps = {};
3
3
  export type DBDrawerHeaderProps = DBDrawerHeaderDefaultProps & InnerCloseButtonProps & TextProps & GlobalProps & StartSlotProps & EndSlotProps;
4
4
  export type DBDrawerHeaderDefaultState = {
5
- _headingId: string;
6
- setAriaLabelledBy: () => void;
5
+ _headingId?: string;
6
+ _dialog?: HTMLDialogElement;
7
+ _resolveDialog: () => void;
7
8
  removeAriaLabelledBy: () => void;
8
9
  };
9
10
  export type DBDrawerHeaderState = DBDrawerHeaderDefaultState & GlobalState;
@@ -0,0 +1,6 @@
1
+ import { LoadingIndicatorStateType } from '../model.js';
2
+ export type TimeoutStore = {
3
+ loadingState: LoadingIndicatorStateType;
4
+ onTimeoutFn: () => void;
5
+ getLabel: (loadingState: LoadingIndicatorStateType | string) => string;
6
+ };
@@ -0,0 +1 @@
1
+ export { default as DBLoadingIndicator } from './loading-indicator.vue';
@@ -0,0 +1,41 @@
1
+ import { DBLoadingIndicatorProps } from "./model.js";
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBLoadingIndicatorProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<DBLoadingIndicatorProps> & Readonly<{}>, {
7
+ id: string;
8
+ children: any;
9
+ className: string;
10
+ propOverrides: import("../../index.js", { with: { "resolution-mode": "import" } }).PropOverridesType & {
11
+ progress?: {
12
+ ariaLabel?: string;
13
+ };
14
+ };
15
+ role: "alert" | "status";
16
+ label: string;
17
+ value: string | number;
18
+ variant: import("./model.js", { with: { "resolution-mode": "import" } }).LoadingIndicatorVariantType;
19
+ size: import("../../index.js", { with: { "resolution-mode": "import" } }).SizeType | "large";
20
+ indeterminate: boolean | string;
21
+ showLabel: boolean | string;
22
+ delay: import("../../index.js", { with: { "resolution-mode": "import" } }).PopoverDelayType;
23
+ orientation: import("../../index.js", { with: { "resolution-mode": "import" } }).OrientationType;
24
+ max: number | string;
25
+ progressText: string;
26
+ showProgressText: boolean | string;
27
+ overlay: boolean | string;
28
+ state: import("./model.js", { with: { "resolution-mode": "import" } }).LoadingIndicatorStateType | string;
29
+ autoDisable: boolean | string;
30
+ onTimeout: (state?: import("./model.js", { with: { "resolution-mode": "import" } }).LoadingIndicatorStateType | string) => void;
31
+ timeoutDuration: number | string;
32
+ timeoutActiveDuration: number | string;
33
+ }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1,93 @@
1
+ import { DelayProps, GlobalProps, GlobalState, InitializedState, OrientationProps, PropOverridesType, ShowLabelProps, SizeType } from '../../shared/model.js';
2
+ export declare const LoadingIndicatorVariantList: readonly ["bar", "circular"];
3
+ export type LoadingIndicatorVariantType = (typeof LoadingIndicatorVariantList)[number];
4
+ export declare const LoadingIndicatorStateList: readonly ["inactive", "active", "successful", "critical"];
5
+ export type LoadingIndicatorStateType = (typeof LoadingIndicatorStateList)[number];
6
+ export type DBLoadingIndicatorDefaultProps = {
7
+ /**
8
+ * If enabled the loading indicator shows an ongoing animation without a known completion (spinner/indeterminate progress). Set to false to show a determinate value via value/max.
9
+ */
10
+ indeterminate?: boolean | string;
11
+ /**
12
+ * The label associated with the progress element. Alternative to passing children.
13
+ */
14
+ label?: string;
15
+ /**
16
+ * The maximum value of the determinate progress (used together with value). Defaults to 100.
17
+ */
18
+ max?: number | string;
19
+ /**
20
+ * The text describing the current progress (e.g. "42 of 100"), shown next to the indicator.
21
+ */
22
+ progressText?: string;
23
+ /**
24
+ * Enables/disables the visibility of the progressText
25
+ */
26
+ showProgressText?: boolean | string;
27
+ /**
28
+ * The current value of the determinate progress (used together with max).
29
+ */
30
+ value?: string | number;
31
+ /**
32
+ * If enabled the loading indicator is rendered as an overlay covering its positioned parent.
33
+ */
34
+ overlay?: boolean | string;
35
+ /**
36
+ * The variant changes the visual appearance of the loading indicator between a circular spinner and a horizontal bar.
37
+ */
38
+ variant?: LoadingIndicatorVariantType;
39
+ /**
40
+ * The current loading state. Controls the animation and the announced live-region role.
41
+ */
42
+ state?: LoadingIndicatorStateType | string;
43
+ /**
44
+ * Disable the parent component (e.g. a DBButton) when loading indicator is inside it
45
+ */
46
+ autoDisable?: boolean | string;
47
+ /**
48
+ * Overrides the automatically derived ARIA live-region role. By default the role is derived from the state ("alert" for critical, otherwise "status").
49
+ */
50
+ role?: 'alert' | 'status';
51
+ /**
52
+ * Triggers after a timeout. For "active" after 5 seconds, for "successful" and "critical" after 2 seconds
53
+ */
54
+ onTimeout?: (state?: LoadingIndicatorStateType | string) => void;
55
+ /**
56
+ * The size attribute changes the font-size and other related sizes of the component.
57
+ */
58
+ size?: SizeType | 'large';
59
+ /**
60
+ * The timeoutDuration attribute specifies the time in milliseconds before the loading indicator triggers the onTimeout event. Default is 2000ms.
61
+ */
62
+ timeoutDuration?: number | string;
63
+ /**
64
+ * The timeoutActiveDuration attribute specifies the time in milliseconds before the loading indicator triggers the onTimeout event when the state is "active". Default is 5000ms.
65
+ */
66
+ timeoutActiveDuration?: number | string;
67
+ };
68
+ export type DBLoadingIndicatorProps = DBLoadingIndicatorDefaultProps & GlobalProps & ShowLabelProps & OrientationProps & DelayProps & {
69
+ /**
70
+ * Allows overriding specific props on nested elements or internal component structure
71
+ */
72
+ propOverrides?: PropOverridesType & {
73
+ progress?: {
74
+ ariaLabel?: string;
75
+ };
76
+ };
77
+ };
78
+ export type DBLoadingIndicatorDefaultState = {
79
+ _loadingState?: LoadingIndicatorStateType | string;
80
+ _previousLoadingState?: LoadingIndicatorStateType | string;
81
+ _labelId?: string;
82
+ _progressId?: string;
83
+ _timeoutId?: ReturnType<typeof setTimeout>;
84
+ _didDisableParent?: boolean;
85
+ _didSetAriaBusy?: boolean;
86
+ getPercentage: () => string | undefined;
87
+ getRole: () => string | undefined;
88
+ handleParentAria: (remove: boolean) => void;
89
+ handleParentDisabled: (forceEnable?: boolean) => void;
90
+ handleUnmount: () => void;
91
+ resetIds: () => void;
92
+ };
93
+ export type DBLoadingIndicatorState = DBLoadingIndicatorDefaultState & GlobalState & InitializedState;
@@ -0,0 +1 @@
1
+ export { default as DBPagination } from './pagination.vue';
@@ -0,0 +1,117 @@
1
+ import type { GlobalProps, GlobalState, SizeProps } from '../../shared/model.js';
2
+ /**
3
+ * A single item the option/`items` API generates. `page` is the one-based page
4
+ * number, `layout` decides whether the collapsing hides it, and `ellipsis` holds the
5
+ * gap tokens it borders. This describes what the pagination writes onto the DOM; it is
6
+ * not a prop the consumer sets.
7
+ */
8
+ export type PaginationItemType = {
9
+ page: number;
10
+ layout: 'always' | 'wide';
11
+ /**
12
+ * Space separated gap tokens (`wide-before`, `wide-after`,
13
+ * `collapsed-before`, `collapsed-after`). Every layout marks its own gaps,
14
+ * because a marker inherits the visibility of the page that carries it - one
15
+ * hidden below the breakpoint would take its ellipsis with it. One token per
16
+ * side, so a page standing between two gaps carries two of them instead of a
17
+ * value meaning both.
18
+ */
19
+ ellipsis?: string;
20
+ disabled?: boolean;
21
+ label?: string;
22
+ /**
23
+ * Identity of the item across page changes. Keying by list position instead
24
+ * would move the focus to an adjacent page whenever the window shifts, because
25
+ * the framework reuses the element for whatever page now sits at that position.
26
+ */
27
+ key: string;
28
+ };
29
+ /**
30
+ * An entry of the `items` prop. A consumer who drives the pagination through data
31
+ * rather than composed children passes these; `disabled` greys a single page out,
32
+ * which the design otherwise cannot express.
33
+ */
34
+ export type PaginationItemOption = {
35
+ disabled?: boolean | string;
36
+ label?: string;
37
+ };
38
+ export type DBPaginationDefaultProps = {
39
+ /**
40
+ * One-based number of the currently active page. Defaults to `1`.
41
+ */
42
+ currentPage?: number | string;
43
+ /**
44
+ * Total number of records across all pages. With `pageSize` it decides the page
45
+ * count. Defaults to `0`.
46
+ */
47
+ totalCount?: number | string;
48
+ /**
49
+ * Number of records on one page. Defaults to `10`.
50
+ */
51
+ pageSize?: number | string;
52
+ /**
53
+ * Number of page buttons shown on each side of the current page.
54
+ */
55
+ siblingCount?: number | string;
56
+ /**
57
+ * Number of page buttons always shown at the start and end. Below the collapsing
58
+ * breakpoint at most one page is pinned per end, whatever this says - the
59
+ * collapsed layout exists to be narrow.
60
+ */
61
+ boundaryCount?: number | string;
62
+ /**
63
+ * Per-page options for the data-driven API, one entry per page. Lets a single
64
+ * page be disabled. When omitted the pagination derives the pages from
65
+ * `totalCount` and `pageSize`.
66
+ */
67
+ items?: PaginationItemOption[];
68
+ /**
69
+ * Accessible label for the pagination navigation landmark.
70
+ */
71
+ label?: string;
72
+ /**
73
+ * Accessible label for the previous-page button.
74
+ */
75
+ previousLabel?: string;
76
+ /**
77
+ * Accessible label for the next-page button.
78
+ */
79
+ nextLabel?: string;
80
+ /**
81
+ * Accessible page-button label. `{page}` and `{totalPages}` are replaced. The
82
+ * visible text of a page is only its number, so the context lives in this label.
83
+ */
84
+ pageLabel?: string;
85
+ /**
86
+ * Informs the parent that a different page was requested. The parent must
87
+ * update `currentPage`; the component never changes it internally.
88
+ */
89
+ onPageChange?: (page: number) => void;
90
+ };
91
+ export type DBPaginationProps = DBPaginationDefaultProps & GlobalProps & SizeProps;
92
+ export type DBPaginationDefaultState = {
93
+ getInteger: (value: number | string | undefined, fallback: number, minimum: number) => number;
94
+ getRange: (start: number, end: number) => number[];
95
+ isDataDriven: () => boolean;
96
+ getTotalPages: () => number;
97
+ getCurrentPage: () => number;
98
+ isPageDisabled: (page: number) => boolean;
99
+ getStepPage: (direction: number) => number;
100
+ getPages: (siblingCount: number) => number[];
101
+ getCollapsedPages: () => number[];
102
+ getPaginationItems: () => PaginationItemType[];
103
+ getEllipsisTokens: (layout: string, pages: number[], page: number, totalPages: number) => string[];
104
+ getPageText: (page: number) => string;
105
+ getPageLabel: (page: number) => string;
106
+ applyItem: (item: any, page: number, description: any) => void;
107
+ syncItems: () => void;
108
+ _setupObserver: () => void;
109
+ _observer: any;
110
+ _pendingRafId: number | null;
111
+ isModifiedLinkClick: (event: any) => boolean;
112
+ preventCurrentPageNavigation: (event: any) => void;
113
+ handleClick: (event: any) => void;
114
+ stepToPage: (page: number) => void;
115
+ handlePageChange: (page: number) => void;
116
+ };
117
+ export type DBPaginationState = DBPaginationDefaultState & GlobalState;
@@ -0,0 +1,31 @@
1
+ import type { DBPaginationProps } from "./model.js";
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_base: import("@vue/runtime-core").DefineComponent<DBPaginationProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<DBPaginationProps> & Readonly<{}>, {
7
+ id: string;
8
+ children: any;
9
+ className: string;
10
+ propOverrides: import("../../index.js", { with: { "resolution-mode": "import" } }).PropOverridesType;
11
+ label: string;
12
+ items: import("./model.js", { with: { "resolution-mode": "import" } }).PaginationItemOption[];
13
+ size: import("../../index.js", { with: { "resolution-mode": "import" } }).SizeType;
14
+ currentPage: number | string;
15
+ totalCount: number | string;
16
+ pageSize: number | string;
17
+ siblingCount: number | string;
18
+ boundaryCount: number | string;
19
+ previousLabel: string;
20
+ nextLabel: string;
21
+ pageLabel: string;
22
+ onPageChange: (page: number) => void;
23
+ }, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1 @@
1
+ export { default as DBPaginationItem } from './pagination-item.vue';
@@ -0,0 +1,5 @@
1
+ import type { GlobalProps, GlobalState, TextProps } from '../../shared/model.js';
2
+ export type DBPaginationItemDefaultProps = {};
3
+ export type DBPaginationItemProps = DBPaginationItemDefaultProps & GlobalProps & TextProps;
4
+ export type DBPaginationItemDefaultState = {};
5
+ export type DBPaginationItemState = DBPaginationItemDefaultState & GlobalState;