@deepfuture/dui-components 0.0.1
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/accordion/accordion-context.d.ts +15 -0
- package/accordion/accordion-context.js +3 -0
- package/accordion/accordion-item.d.ts +22 -0
- package/accordion/accordion-item.js +254 -0
- package/accordion/accordion.d.ts +20 -0
- package/accordion/accordion.js +185 -0
- package/accordion/index.d.ts +3 -0
- package/accordion/index.js +2 -0
- package/accordion/register.d.ts +1 -0
- package/accordion/register.js +8 -0
- package/alert-dialog/alert-dialog-close.d.ts +15 -0
- package/alert-dialog/alert-dialog-close.js +35 -0
- package/alert-dialog/alert-dialog-context.d.ts +13 -0
- package/alert-dialog/alert-dialog-context.js +3 -0
- package/alert-dialog/alert-dialog-popup.d.ts +34 -0
- package/alert-dialog/alert-dialog-popup.js +260 -0
- package/alert-dialog/alert-dialog-trigger.d.ts +15 -0
- package/alert-dialog/alert-dialog-trigger.js +52 -0
- package/alert-dialog/alert-dialog.d.ts +30 -0
- package/alert-dialog/alert-dialog.js +97 -0
- package/alert-dialog/index.d.ts +6 -0
- package/alert-dialog/index.js +4 -0
- package/alert-dialog/register.d.ts +1 -0
- package/alert-dialog/register.js +16 -0
- package/all.d.ts +86 -0
- package/all.js +191 -0
- package/avatar/avatar.d.ts +41 -0
- package/avatar/avatar.js +188 -0
- package/avatar/index.d.ts +2 -0
- package/avatar/index.js +1 -0
- package/avatar/register.d.ts +1 -0
- package/avatar/register.js +4 -0
- package/badge/badge.d.ts +14 -0
- package/badge/badge.js +43 -0
- package/badge/index.d.ts +2 -0
- package/badge/index.js +1 -0
- package/badge/register.d.ts +1 -0
- package/badge/register.js +4 -0
- package/breadcrumb/breadcrumb-ellipsis.d.ts +14 -0
- package/breadcrumb/breadcrumb-ellipsis.js +39 -0
- package/breadcrumb/breadcrumb-item.d.ts +13 -0
- package/breadcrumb/breadcrumb-item.js +31 -0
- package/breadcrumb/breadcrumb-link.d.ts +14 -0
- package/breadcrumb/breadcrumb-link.js +32 -0
- package/breadcrumb/breadcrumb-page.d.ts +13 -0
- package/breadcrumb/breadcrumb-page.js +36 -0
- package/breadcrumb/breadcrumb-separator.d.ts +14 -0
- package/breadcrumb/breadcrumb-separator.js +36 -0
- package/breadcrumb/breadcrumb.d.ts +14 -0
- package/breadcrumb/breadcrumb.js +38 -0
- package/breadcrumb/index.d.ts +6 -0
- package/breadcrumb/index.js +6 -0
- package/breadcrumb/register.d.ts +1 -0
- package/breadcrumb/register.js +14 -0
- package/button/button.d.ts +38 -0
- package/button/button.js +143 -0
- package/button/index.d.ts +2 -0
- package/button/index.js +1 -0
- package/button/register.d.ts +1 -0
- package/button/register.js +4 -0
- package/calendar/calendar.d.ts +33 -0
- package/calendar/calendar.js +428 -0
- package/calendar/index.d.ts +1 -0
- package/calendar/index.js +1 -0
- package/calendar/register.d.ts +1 -0
- package/calendar/register.js +4 -0
- package/center/center.d.ts +14 -0
- package/center/center.js +37 -0
- package/center/index.d.ts +1 -0
- package/center/index.js +1 -0
- package/center/register.d.ts +1 -0
- package/center/register.js +4 -0
- package/checkbox/checkbox-group-context.d.ts +11 -0
- package/checkbox/checkbox-group-context.js +3 -0
- package/checkbox/checkbox-group.d.ts +34 -0
- package/checkbox/checkbox-group.js +128 -0
- package/checkbox/checkbox.d.ts +46 -0
- package/checkbox/checkbox.js +314 -0
- package/checkbox/index.d.ts +3 -0
- package/checkbox/index.js +2 -0
- package/checkbox/register.d.ts +1 -0
- package/checkbox/register.js +8 -0
- package/collapsible/collapsible.d.ts +22 -0
- package/collapsible/collapsible.js +227 -0
- package/collapsible/index.d.ts +1 -0
- package/collapsible/index.js +1 -0
- package/collapsible/register.d.ts +1 -0
- package/collapsible/register.js +4 -0
- package/combobox/combobox.d.ts +46 -0
- package/combobox/combobox.js +524 -0
- package/combobox/index.d.ts +2 -0
- package/combobox/index.js +1 -0
- package/combobox/register.d.ts +1 -0
- package/combobox/register.js +4 -0
- package/command/command-context.d.ts +30 -0
- package/command/command-context.js +3 -0
- package/command/command-empty.d.ts +10 -0
- package/command/command-empty.js +50 -0
- package/command/command-group.d.ts +15 -0
- package/command/command-group.js +79 -0
- package/command/command-input.d.ts +13 -0
- package/command/command-input.js +106 -0
- package/command/command-item.d.ts +20 -0
- package/command/command-item.js +175 -0
- package/command/command-list.d.ts +9 -0
- package/command/command-list.js +43 -0
- package/command/command-score.d.ts +6 -0
- package/command/command-score.js +31 -0
- package/command/command-separator.d.ts +7 -0
- package/command/command-separator.js +15 -0
- package/command/command-shortcut.d.ts +7 -0
- package/command/command-shortcut.js +16 -0
- package/command/command.d.ts +25 -0
- package/command/command.js +278 -0
- package/command/index.d.ts +10 -0
- package/command/index.js +9 -0
- package/command/register.d.ts +1 -0
- package/command/register.js +22 -0
- package/data-table/data-table.d.ts +59 -0
- package/data-table/data-table.js +416 -0
- package/data-table/index.d.ts +2 -0
- package/data-table/index.js +1 -0
- package/data-table/register.d.ts +1 -0
- package/data-table/register.js +4 -0
- package/dialog/dialog-close.d.ts +15 -0
- package/dialog/dialog-close.js +35 -0
- package/dialog/dialog-context.d.ts +13 -0
- package/dialog/dialog-context.js +3 -0
- package/dialog/dialog-popup.d.ts +36 -0
- package/dialog/dialog-popup.js +277 -0
- package/dialog/dialog-trigger.d.ts +15 -0
- package/dialog/dialog-trigger.js +52 -0
- package/dialog/dialog.d.ts +30 -0
- package/dialog/dialog.js +97 -0
- package/dialog/index.d.ts +6 -0
- package/dialog/index.js +4 -0
- package/dialog/register.d.ts +1 -0
- package/dialog/register.js +16 -0
- package/dropzone/dropzone.d.ts +74 -0
- package/dropzone/dropzone.js +357 -0
- package/dropzone/index.d.ts +2 -0
- package/dropzone/index.js +1 -0
- package/dropzone/register.d.ts +1 -0
- package/dropzone/register.js +4 -0
- package/field/field-context.d.ts +20 -0
- package/field/field-context.js +2 -0
- package/field/index.d.ts +2 -0
- package/field/index.js +1 -0
- package/global.d.ts +189 -0
- package/hstack/hstack.d.ts +25 -0
- package/hstack/hstack.js +141 -0
- package/hstack/index.d.ts +2 -0
- package/hstack/index.js +1 -0
- package/hstack/register.d.ts +1 -0
- package/hstack/register.js +4 -0
- package/icon/icon.d.ts +16 -0
- package/icon/icon.js +34 -0
- package/icon/index.d.ts +1 -0
- package/icon/index.js +1 -0
- package/icon/register.d.ts +1 -0
- package/icon/register.js +4 -0
- package/input/index.d.ts +1 -0
- package/input/index.js +1 -0
- package/input/input.d.ts +47 -0
- package/input/input.js +205 -0
- package/input/register.d.ts +1 -0
- package/input/register.js +4 -0
- package/link/index.d.ts +1 -0
- package/link/index.js +1 -0
- package/link/link.d.ts +27 -0
- package/link/link.js +57 -0
- package/link/register.d.ts +1 -0
- package/link/register.js +4 -0
- package/menu/index.d.ts +2 -0
- package/menu/index.js +2 -0
- package/menu/menu-item.d.ts +17 -0
- package/menu/menu-item.js +62 -0
- package/menu/menu.d.ts +15 -0
- package/menu/menu.js +228 -0
- package/menu/register.d.ts +1 -0
- package/menu/register.js +8 -0
- package/menubar/index.d.ts +2 -0
- package/menubar/index.js +1 -0
- package/menubar/menubar-context.d.ts +9 -0
- package/menubar/menubar-context.js +2 -0
- package/menubar/menubar.d.ts +19 -0
- package/menubar/menubar.js +130 -0
- package/menubar/register.d.ts +1 -0
- package/menubar/register.js +4 -0
- package/number-field/index.d.ts +1 -0
- package/number-field/index.js +1 -0
- package/number-field/number-field.d.ts +34 -0
- package/number-field/number-field.js +326 -0
- package/number-field/register.d.ts +1 -0
- package/number-field/register.js +4 -0
- package/package.json +217 -0
- package/page-inset/index.d.ts +1 -0
- package/page-inset/index.js +1 -0
- package/page-inset/page-inset.d.ts +28 -0
- package/page-inset/page-inset.js +103 -0
- package/page-inset/register.d.ts +1 -0
- package/page-inset/register.js +4 -0
- package/popover/index.d.ts +6 -0
- package/popover/index.js +4 -0
- package/popover/popover-close.d.ts +13 -0
- package/popover/popover-close.js +33 -0
- package/popover/popover-context.d.ts +17 -0
- package/popover/popover-context.js +3 -0
- package/popover/popover-popup.d.ts +20 -0
- package/popover/popover-popup.js +176 -0
- package/popover/popover-trigger.d.ts +13 -0
- package/popover/popover-trigger.js +57 -0
- package/popover/popover.d.ts +30 -0
- package/popover/popover.js +140 -0
- package/popover/register.d.ts +1 -0
- package/popover/register.js +16 -0
- package/portal/index.d.ts +2 -0
- package/portal/index.js +1 -0
- package/portal/portal.d.ts +29 -0
- package/portal/portal.js +115 -0
- package/portal/register.d.ts +1 -0
- package/portal/register.js +4 -0
- package/preview-card/index.d.ts +5 -0
- package/preview-card/index.js +3 -0
- package/preview-card/preview-card-context.d.ts +16 -0
- package/preview-card/preview-card-context.js +3 -0
- package/preview-card/preview-card-popup.d.ts +16 -0
- package/preview-card/preview-card-popup.js +167 -0
- package/preview-card/preview-card-trigger.d.ts +13 -0
- package/preview-card/preview-card-trigger.js +75 -0
- package/preview-card/preview-card.d.ts +34 -0
- package/preview-card/preview-card.js +164 -0
- package/preview-card/register.d.ts +1 -0
- package/preview-card/register.js +12 -0
- package/progress/index.d.ts +1 -0
- package/progress/index.js +1 -0
- package/progress/progress.d.ts +19 -0
- package/progress/progress.js +94 -0
- package/progress/register.d.ts +1 -0
- package/progress/register.js +4 -0
- package/radio/index.d.ts +3 -0
- package/radio/index.js +2 -0
- package/radio/radio-group-context.d.ts +11 -0
- package/radio/radio-group-context.js +2 -0
- package/radio/radio-group.d.ts +37 -0
- package/radio/radio-group.js +135 -0
- package/radio/radio.d.ts +27 -0
- package/radio/radio.js +204 -0
- package/radio/register.d.ts +1 -0
- package/radio/register.js +8 -0
- package/scroll-area/index.d.ts +1 -0
- package/scroll-area/index.js +1 -0
- package/scroll-area/register.d.ts +1 -0
- package/scroll-area/register.js +4 -0
- package/scroll-area/scroll-area.d.ts +38 -0
- package/scroll-area/scroll-area.js +453 -0
- package/select/index.d.ts +2 -0
- package/select/index.js +1 -0
- package/select/register.d.ts +1 -0
- package/select/register.js +4 -0
- package/select/select.d.ts +36 -0
- package/select/select.js +404 -0
- package/separator/index.d.ts +1 -0
- package/separator/index.js +1 -0
- package/separator/register.d.ts +1 -0
- package/separator/register.js +4 -0
- package/separator/separator.d.ts +12 -0
- package/separator/separator.js +50 -0
- package/sidebar/index.d.ts +16 -0
- package/sidebar/index.js +13 -0
- package/sidebar/register.d.ts +1 -0
- package/sidebar/register.js +52 -0
- package/sidebar/sidebar-content.d.ts +14 -0
- package/sidebar/sidebar-content.js +30 -0
- package/sidebar/sidebar-context.d.ts +15 -0
- package/sidebar/sidebar-context.js +3 -0
- package/sidebar/sidebar-footer.d.ts +12 -0
- package/sidebar/sidebar-footer.js +21 -0
- package/sidebar/sidebar-group-label.d.ts +17 -0
- package/sidebar/sidebar-group-label.js +49 -0
- package/sidebar/sidebar-group.d.ts +15 -0
- package/sidebar/sidebar-group.js +29 -0
- package/sidebar/sidebar-header.d.ts +12 -0
- package/sidebar/sidebar-header.js +21 -0
- package/sidebar/sidebar-inset.d.ts +15 -0
- package/sidebar/sidebar-inset.js +29 -0
- package/sidebar/sidebar-menu-button.d.ts +31 -0
- package/sidebar/sidebar-menu-button.js +201 -0
- package/sidebar/sidebar-menu-item.d.ts +12 -0
- package/sidebar/sidebar-menu-item.js +20 -0
- package/sidebar/sidebar-menu.d.ts +14 -0
- package/sidebar/sidebar-menu.js +30 -0
- package/sidebar/sidebar-provider.d.ts +34 -0
- package/sidebar/sidebar-provider.js +157 -0
- package/sidebar/sidebar-separator.d.ts +12 -0
- package/sidebar/sidebar-separator.js +24 -0
- package/sidebar/sidebar-trigger.d.ts +16 -0
- package/sidebar/sidebar-trigger.js +50 -0
- package/sidebar/sidebar.d.ts +21 -0
- package/sidebar/sidebar.js +228 -0
- package/slider/index.d.ts +1 -0
- package/slider/index.js +1 -0
- package/slider/register.d.ts +1 -0
- package/slider/register.js +4 -0
- package/slider/slider.d.ts +37 -0
- package/slider/slider.js +268 -0
- package/spinner/index.d.ts +1 -0
- package/spinner/index.js +1 -0
- package/spinner/register.d.ts +1 -0
- package/spinner/register.js +4 -0
- package/spinner/spinner.d.ts +18 -0
- package/spinner/spinner.js +138 -0
- package/switch/index.d.ts +1 -0
- package/switch/index.js +1 -0
- package/switch/register.d.ts +1 -0
- package/switch/register.js +4 -0
- package/switch/switch.d.ts +29 -0
- package/switch/switch.js +201 -0
- package/tabs/index.d.ts +6 -0
- package/tabs/index.js +5 -0
- package/tabs/register.d.ts +1 -0
- package/tabs/register.js +10 -0
- package/tabs/tab.d.ts +16 -0
- package/tabs/tab.js +98 -0
- package/tabs/tabs-context.d.ts +8 -0
- package/tabs/tabs-context.js +2 -0
- package/tabs/tabs-indicator.d.ts +11 -0
- package/tabs/tabs-indicator.js +27 -0
- package/tabs/tabs-list.d.ts +17 -0
- package/tabs/tabs-list.js +85 -0
- package/tabs/tabs-panel.d.ts +18 -0
- package/tabs/tabs-panel.js +85 -0
- package/tabs/tabs.d.ts +24 -0
- package/tabs/tabs.js +111 -0
- package/textarea/index.d.ts +2 -0
- package/textarea/index.js +1 -0
- package/textarea/register.d.ts +1 -0
- package/textarea/register.js +4 -0
- package/textarea/textarea.d.ts +37 -0
- package/textarea/textarea.js +170 -0
- package/toggle/index.d.ts +3 -0
- package/toggle/index.js +2 -0
- package/toggle/register.d.ts +1 -0
- package/toggle/register.js +8 -0
- package/toggle/toggle-group-context.d.ts +9 -0
- package/toggle/toggle-group-context.js +2 -0
- package/toggle/toggle-group.d.ts +27 -0
- package/toggle/toggle-group.js +163 -0
- package/toggle/toggle.d.ts +25 -0
- package/toggle/toggle.js +124 -0
- package/toolbar/index.d.ts +1 -0
- package/toolbar/index.js +1 -0
- package/toolbar/register.d.ts +1 -0
- package/toolbar/register.js +4 -0
- package/toolbar/toolbar.d.ts +15 -0
- package/toolbar/toolbar.js +89 -0
- package/tooltip/index.d.ts +5 -0
- package/tooltip/index.js +3 -0
- package/tooltip/register.d.ts +1 -0
- package/tooltip/register.js +12 -0
- package/tooltip/tooltip-context.d.ts +17 -0
- package/tooltip/tooltip-context.js +3 -0
- package/tooltip/tooltip-popup.d.ts +16 -0
- package/tooltip/tooltip-popup.js +162 -0
- package/tooltip/tooltip-trigger.d.ts +15 -0
- package/tooltip/tooltip-trigger.js +110 -0
- package/tooltip/tooltip.d.ts +36 -0
- package/tooltip/tooltip.js +176 -0
- package/trunc/index.d.ts +1 -0
- package/trunc/index.js +1 -0
- package/trunc/register.d.ts +1 -0
- package/trunc/register.js +4 -0
- package/trunc/trunc.d.ts +19 -0
- package/trunc/trunc.js +68 -0
- package/vstack/index.d.ts +1 -0
- package/vstack/index.js +1 -0
- package/vstack/register.d.ts +1 -0
- package/vstack/register.js +4 -0
- package/vstack/vstack.d.ts +17 -0
- package/vstack/vstack.js +83 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/alert-dialog */
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
import { css, html, LitElement } from "lit";
|
|
9
|
+
import { property } from "lit/decorators.js";
|
|
10
|
+
import { ContextConsumer } from "@lit/context";
|
|
11
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
12
|
+
import { getComposedFocusableElements, queryComposedAutofocus, } from "@deepfuture/dui-core/dom";
|
|
13
|
+
import { alertDialogContext } from "./alert-dialog-context.js";
|
|
14
|
+
const hostStyles = css `
|
|
15
|
+
:host {
|
|
16
|
+
display: contents;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host(:not([mounted])) [part="backdrop"],
|
|
20
|
+
:host(:not([mounted])) [part="popup"] {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
const componentStyles = css `
|
|
25
|
+
[part="backdrop"] {
|
|
26
|
+
position: fixed;
|
|
27
|
+
min-height: 100dvh;
|
|
28
|
+
inset: 0;
|
|
29
|
+
z-index: 999;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[part="popup"] {
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
position: fixed;
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: 50%;
|
|
37
|
+
transform: translate(-50%, -50%);
|
|
38
|
+
width: 24rem;
|
|
39
|
+
max-width: calc(100vw - 3rem);
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
z-index: 1000;
|
|
42
|
+
transition-property: opacity, transform;
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
/**
|
|
46
|
+
* `<dui-alert-dialog-popup>` — The popup overlay for the alert dialog.
|
|
47
|
+
*
|
|
48
|
+
* Renders a backdrop and a centered dialog popup with focus trapping.
|
|
49
|
+
* Handles open/close animations via `data-starting-style` / `data-ending-style`.
|
|
50
|
+
* Does NOT close on backdrop click — requires explicit user action.
|
|
51
|
+
*
|
|
52
|
+
* Title and description are provided via named slots and rendered as
|
|
53
|
+
* semantic `<h2>` and `<p>` elements with ARIA linkage.
|
|
54
|
+
*
|
|
55
|
+
* @slot title - Title text for the alert dialog (rendered as `<h2>`).
|
|
56
|
+
* @slot description - Description text for the alert dialog (rendered as `<p>`).
|
|
57
|
+
* @slot - Default slot for dialog content (actions, etc.).
|
|
58
|
+
* @csspart backdrop - The overlay backdrop behind the dialog.
|
|
59
|
+
* @csspart popup - The dialog popup container.
|
|
60
|
+
* @csspart title - The heading element wrapping the title slot.
|
|
61
|
+
* @csspart description - The paragraph element wrapping the description slot.
|
|
62
|
+
*/
|
|
63
|
+
export class DuiAlertDialogPopup extends LitElement {
|
|
64
|
+
static { this.tagName = "dui-alert-dialog-popup"; }
|
|
65
|
+
static { this.styles = [base, hostStyles, componentStyles]; }
|
|
66
|
+
#keepMounted_accessor_storage = false;
|
|
67
|
+
/** Keep the popup in the DOM when closed. */
|
|
68
|
+
get keepMounted() { return this.#keepMounted_accessor_storage; }
|
|
69
|
+
set keepMounted(value) { this.#keepMounted_accessor_storage = value; }
|
|
70
|
+
#initialFocus_accessor_storage = undefined;
|
|
71
|
+
/** CSS selector within the popup to focus when the dialog opens. */
|
|
72
|
+
get initialFocus() { return this.#initialFocus_accessor_storage; }
|
|
73
|
+
set initialFocus(value) { this.#initialFocus_accessor_storage = value; }
|
|
74
|
+
#finalFocus_accessor_storage = undefined;
|
|
75
|
+
/** CSS selector in the document to focus when the dialog closes. */
|
|
76
|
+
get finalFocus() { return this.#finalFocus_accessor_storage; }
|
|
77
|
+
set finalFocus(value) { this.#finalFocus_accessor_storage = value; }
|
|
78
|
+
#mounted_accessor_storage = false;
|
|
79
|
+
get #mounted() { return this.#mounted_accessor_storage; }
|
|
80
|
+
set #mounted(value) { this.#mounted_accessor_storage = value; }
|
|
81
|
+
#startingStyle_accessor_storage = false;
|
|
82
|
+
get #startingStyle() { return this.#startingStyle_accessor_storage; }
|
|
83
|
+
set #startingStyle(value) { this.#startingStyle_accessor_storage = value; }
|
|
84
|
+
#endingStyle_accessor_storage = false;
|
|
85
|
+
get #endingStyle() { return this.#endingStyle_accessor_storage; }
|
|
86
|
+
set #endingStyle(value) { this.#endingStyle_accessor_storage = value; }
|
|
87
|
+
#previouslyFocused;
|
|
88
|
+
#ctx = new ContextConsumer(this, {
|
|
89
|
+
context: alertDialogContext,
|
|
90
|
+
subscribe: true,
|
|
91
|
+
});
|
|
92
|
+
updated() {
|
|
93
|
+
const isOpen = this.#ctx.value?.open ?? false;
|
|
94
|
+
if (isOpen && !this.#mounted) {
|
|
95
|
+
this.#animateOpen();
|
|
96
|
+
}
|
|
97
|
+
else if (!isOpen && this.#mounted && !this.#endingStyle) {
|
|
98
|
+
this.#animateClose();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async #animateOpen() {
|
|
102
|
+
this.#previouslyFocused =
|
|
103
|
+
document.activeElement ?? undefined;
|
|
104
|
+
this.#mounted = true;
|
|
105
|
+
this.#startingStyle = true;
|
|
106
|
+
await new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(() => r())));
|
|
107
|
+
this.#startingStyle = false;
|
|
108
|
+
await this.updateComplete;
|
|
109
|
+
this.#trapFocusIn();
|
|
110
|
+
}
|
|
111
|
+
#animateClose() {
|
|
112
|
+
this.#endingStyle = true;
|
|
113
|
+
const popup = this.shadowRoot?.querySelector('[part="popup"]');
|
|
114
|
+
if (!popup) {
|
|
115
|
+
this.#finishClose();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
let called = false;
|
|
119
|
+
const done = () => {
|
|
120
|
+
if (called)
|
|
121
|
+
return;
|
|
122
|
+
called = true;
|
|
123
|
+
popup.removeEventListener("transitionend", onEnd);
|
|
124
|
+
clearTimeout(timer);
|
|
125
|
+
this.#finishClose();
|
|
126
|
+
};
|
|
127
|
+
const onEnd = (e) => {
|
|
128
|
+
if (e.propertyName === "opacity") {
|
|
129
|
+
done();
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
popup.addEventListener("transitionend", onEnd);
|
|
133
|
+
const timer = setTimeout(done, 200);
|
|
134
|
+
}
|
|
135
|
+
#finishClose() {
|
|
136
|
+
if (!this.#endingStyle && !this.#mounted)
|
|
137
|
+
return;
|
|
138
|
+
this.#endingStyle = false;
|
|
139
|
+
if (!this.keepMounted) {
|
|
140
|
+
this.#mounted = false;
|
|
141
|
+
}
|
|
142
|
+
this.#restoreFocus();
|
|
143
|
+
}
|
|
144
|
+
#trapFocusIn() {
|
|
145
|
+
const popup = this.shadowRoot?.querySelector('[part="popup"]');
|
|
146
|
+
if (!popup)
|
|
147
|
+
return;
|
|
148
|
+
if (this.initialFocus) {
|
|
149
|
+
const target = popup.querySelector(this.initialFocus);
|
|
150
|
+
if (target) {
|
|
151
|
+
target.focus();
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const autoEl = queryComposedAutofocus(popup);
|
|
156
|
+
if (autoEl) {
|
|
157
|
+
autoEl.focus();
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const focusables = getComposedFocusableElements(popup);
|
|
161
|
+
if (focusables.length > 0) {
|
|
162
|
+
focusables[0].focus();
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
popup.focus();
|
|
166
|
+
}
|
|
167
|
+
#restoreFocus() {
|
|
168
|
+
if (this.finalFocus) {
|
|
169
|
+
const target = document.querySelector(this.finalFocus);
|
|
170
|
+
target?.focus();
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
this.#previouslyFocused?.focus();
|
|
174
|
+
this.#previouslyFocused = undefined;
|
|
175
|
+
}
|
|
176
|
+
#handleKeyDown = (e) => {
|
|
177
|
+
if (e.key === "Escape") {
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
e.stopPropagation();
|
|
180
|
+
this.#ctx.value?.closeDialog();
|
|
181
|
+
}
|
|
182
|
+
if (e.key === "Tab") {
|
|
183
|
+
this.#handleTabTrap(e);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
#handleTabTrap(e) {
|
|
187
|
+
const popup = this.shadowRoot?.querySelector('[part="popup"]');
|
|
188
|
+
if (!popup)
|
|
189
|
+
return;
|
|
190
|
+
const focusables = getComposedFocusableElements(popup);
|
|
191
|
+
if (focusables.length === 0) {
|
|
192
|
+
e.preventDefault();
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const first = focusables[0];
|
|
196
|
+
const last = focusables[focusables.length - 1];
|
|
197
|
+
const isFirst = first.matches(":focus");
|
|
198
|
+
const isLast = last.matches(":focus");
|
|
199
|
+
const popupHasFocus = !focusables.some((el) => el.matches(":focus"));
|
|
200
|
+
if (e.shiftKey && (isFirst || popupHasFocus)) {
|
|
201
|
+
e.preventDefault();
|
|
202
|
+
last.focus();
|
|
203
|
+
}
|
|
204
|
+
else if (!e.shiftKey && isLast) {
|
|
205
|
+
e.preventDefault();
|
|
206
|
+
first.focus();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
willUpdate() {
|
|
210
|
+
if (this.#mounted || this.keepMounted) {
|
|
211
|
+
this.setAttribute("mounted", "");
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.removeAttribute("mounted");
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
render() {
|
|
218
|
+
const isOpen = this.#ctx.value?.open ?? false;
|
|
219
|
+
const titleId = this.#ctx.value?.titleId ?? "";
|
|
220
|
+
const descriptionId = this.#ctx.value?.descriptionId ?? "";
|
|
221
|
+
if (!this.#mounted && !this.keepMounted) {
|
|
222
|
+
return html ``;
|
|
223
|
+
}
|
|
224
|
+
return html `
|
|
225
|
+
<div
|
|
226
|
+
part="backdrop"
|
|
227
|
+
?data-open="${isOpen && !this.#endingStyle}"
|
|
228
|
+
?data-closed="${!isOpen || this.#endingStyle}"
|
|
229
|
+
?data-starting-style="${this.#startingStyle}"
|
|
230
|
+
?data-ending-style="${this.#endingStyle}"
|
|
231
|
+
></div>
|
|
232
|
+
<div
|
|
233
|
+
part="popup"
|
|
234
|
+
role="alertdialog"
|
|
235
|
+
aria-modal="true"
|
|
236
|
+
aria-labelledby="${titleId}"
|
|
237
|
+
aria-describedby="${descriptionId}"
|
|
238
|
+
?data-open="${isOpen && !this.#endingStyle}"
|
|
239
|
+
?data-closed="${!isOpen || this.#endingStyle}"
|
|
240
|
+
?data-starting-style="${this.#startingStyle}"
|
|
241
|
+
?data-ending-style="${this.#endingStyle}"
|
|
242
|
+
tabindex="-1"
|
|
243
|
+
@keydown="${this.#handleKeyDown}"
|
|
244
|
+
>
|
|
245
|
+
<h2 part="title" id="${titleId}"><slot name="title"></slot></h2>
|
|
246
|
+
<p part="description" id="${descriptionId}"><slot name="description"></slot></p>
|
|
247
|
+
<slot></slot>
|
|
248
|
+
</div>
|
|
249
|
+
`;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
__decorate([
|
|
253
|
+
property({ type: Boolean, attribute: "keep-mounted" })
|
|
254
|
+
], DuiAlertDialogPopup.prototype, "keepMounted", null);
|
|
255
|
+
__decorate([
|
|
256
|
+
property({ attribute: "initial-focus" })
|
|
257
|
+
], DuiAlertDialogPopup.prototype, "initialFocus", null);
|
|
258
|
+
__decorate([
|
|
259
|
+
property({ attribute: "final-focus" })
|
|
260
|
+
], DuiAlertDialogPopup.prototype, "finalFocus", null);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/alert-dialog */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
/**
|
|
4
|
+
* `<dui-alert-dialog-trigger>` — Behavioral wrapper that opens the alert dialog.
|
|
5
|
+
*
|
|
6
|
+
* Wraps slotted content and opens the alert dialog on click.
|
|
7
|
+
*
|
|
8
|
+
* @slot - Content that triggers the alert dialog (usually a `<dui-button>`).
|
|
9
|
+
*/
|
|
10
|
+
export declare class DuiAlertDialogTrigger extends LitElement {
|
|
11
|
+
#private;
|
|
12
|
+
static tagName: "dui-alert-dialog-trigger";
|
|
13
|
+
static styles: import("lit").CSSResult[];
|
|
14
|
+
render(): TemplateResult;
|
|
15
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/alert-dialog */
|
|
2
|
+
import { css, html, LitElement } from "lit";
|
|
3
|
+
import { ContextConsumer } from "@lit/context";
|
|
4
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
5
|
+
import { alertDialogContext } from "./alert-dialog-context.js";
|
|
6
|
+
const hostStyles = css `
|
|
7
|
+
:host {
|
|
8
|
+
display: contents;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
const componentStyles = css `
|
|
12
|
+
.Trigger {
|
|
13
|
+
display: contents;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
/**
|
|
17
|
+
* `<dui-alert-dialog-trigger>` — Behavioral wrapper that opens the alert dialog.
|
|
18
|
+
*
|
|
19
|
+
* Wraps slotted content and opens the alert dialog on click.
|
|
20
|
+
*
|
|
21
|
+
* @slot - Content that triggers the alert dialog (usually a `<dui-button>`).
|
|
22
|
+
*/
|
|
23
|
+
export class DuiAlertDialogTrigger extends LitElement {
|
|
24
|
+
static { this.tagName = "dui-alert-dialog-trigger"; }
|
|
25
|
+
static { this.styles = [base, hostStyles, componentStyles]; }
|
|
26
|
+
#ctx = new ContextConsumer(this, {
|
|
27
|
+
context: alertDialogContext,
|
|
28
|
+
subscribe: true,
|
|
29
|
+
});
|
|
30
|
+
#handleClick = () => {
|
|
31
|
+
this.#ctx.value?.openDialog();
|
|
32
|
+
};
|
|
33
|
+
render() {
|
|
34
|
+
const isOpen = this.#ctx.value?.open ?? false;
|
|
35
|
+
const triggerId = this.#ctx.value?.triggerId ?? "";
|
|
36
|
+
const dialogId = this.#ctx.value?.dialogId ?? "";
|
|
37
|
+
return html `
|
|
38
|
+
<span
|
|
39
|
+
class="Trigger"
|
|
40
|
+
part="trigger"
|
|
41
|
+
id="${triggerId}"
|
|
42
|
+
aria-haspopup="dialog"
|
|
43
|
+
aria-expanded="${isOpen}"
|
|
44
|
+
aria-controls="${isOpen ? dialogId : ""}"
|
|
45
|
+
?data-popup-open="${isOpen}"
|
|
46
|
+
@click="${this.#handleClick}"
|
|
47
|
+
>
|
|
48
|
+
<slot></slot>
|
|
49
|
+
</span>
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/alert-dialog */
|
|
2
|
+
import { LitElement, type TemplateResult } from "lit";
|
|
3
|
+
export type AlertDialogOpenChangeDetail = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const openChangeEvent: (detail: AlertDialogOpenChangeDetail) => CustomEvent<AlertDialogOpenChangeDetail>;
|
|
7
|
+
/**
|
|
8
|
+
* `<dui-alert-dialog>` — Root element for the alert dialog compound component.
|
|
9
|
+
*
|
|
10
|
+
* Manages open/close state and provides context to child elements.
|
|
11
|
+
* Does not render visible DOM — uses `display: contents`.
|
|
12
|
+
*
|
|
13
|
+
* Unlike `<dui-dialog>`, alert dialogs do NOT close on backdrop click,
|
|
14
|
+
* requiring explicit user action to dismiss.
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot for trigger, popup, and other alert dialog parts.
|
|
17
|
+
* @fires open-change - Fired when the dialog opens or closes. Detail: { open: boolean }
|
|
18
|
+
*/
|
|
19
|
+
export declare class DuiAlertDialog extends LitElement {
|
|
20
|
+
#private;
|
|
21
|
+
static tagName: "dui-alert-dialog";
|
|
22
|
+
static styles: import("lit").CSSResult[];
|
|
23
|
+
/** Controls the dialog open state (controlled mode). */
|
|
24
|
+
accessor open: boolean | undefined;
|
|
25
|
+
/** Initial open state for uncontrolled mode. */
|
|
26
|
+
accessor defaultOpen: boolean;
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
willUpdate(): void;
|
|
29
|
+
render(): TemplateResult;
|
|
30
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/** Ported from original DUI: deep-future-app/app/client/components/dui/alert-dialog */
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
import { css, html, LitElement } from "lit";
|
|
9
|
+
import { property } from "lit/decorators.js";
|
|
10
|
+
import { base } from "@deepfuture/dui-core/base";
|
|
11
|
+
import { customEvent } from "@deepfuture/dui-core/event";
|
|
12
|
+
export const openChangeEvent = customEvent("open-change", { bubbles: true, composed: true });
|
|
13
|
+
const hostStyles = css `
|
|
14
|
+
:host {
|
|
15
|
+
display: contents;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
/**
|
|
19
|
+
* `<dui-alert-dialog>` — Root element for the alert dialog compound component.
|
|
20
|
+
*
|
|
21
|
+
* Manages open/close state and provides context to child elements.
|
|
22
|
+
* Does not render visible DOM — uses `display: contents`.
|
|
23
|
+
*
|
|
24
|
+
* Unlike `<dui-dialog>`, alert dialogs do NOT close on backdrop click,
|
|
25
|
+
* requiring explicit user action to dismiss.
|
|
26
|
+
*
|
|
27
|
+
* @slot - Default slot for trigger, popup, and other alert dialog parts.
|
|
28
|
+
* @fires open-change - Fired when the dialog opens or closes. Detail: { open: boolean }
|
|
29
|
+
*/
|
|
30
|
+
export class DuiAlertDialog extends LitElement {
|
|
31
|
+
static { this.tagName = "dui-alert-dialog"; }
|
|
32
|
+
static { this.styles = [base, hostStyles]; }
|
|
33
|
+
#open_accessor_storage = undefined;
|
|
34
|
+
/** Controls the dialog open state (controlled mode). */
|
|
35
|
+
get open() { return this.#open_accessor_storage; }
|
|
36
|
+
set open(value) { this.#open_accessor_storage = value; }
|
|
37
|
+
#defaultOpen_accessor_storage = false;
|
|
38
|
+
/** Initial open state for uncontrolled mode. */
|
|
39
|
+
get defaultOpen() { return this.#defaultOpen_accessor_storage; }
|
|
40
|
+
set defaultOpen(value) { this.#defaultOpen_accessor_storage = value; }
|
|
41
|
+
#internalOpen_accessor_storage = false;
|
|
42
|
+
get #internalOpen() { return this.#internalOpen_accessor_storage; }
|
|
43
|
+
set #internalOpen(value) { this.#internalOpen_accessor_storage = value; }
|
|
44
|
+
#instanceId = crypto.randomUUID().slice(0, 8);
|
|
45
|
+
#dialogId = `dui-alert-dialog-${this.#instanceId}`;
|
|
46
|
+
#triggerId = `dui-alert-trigger-${this.#instanceId}`;
|
|
47
|
+
#titleId = `dui-alert-title-${this.#instanceId}`;
|
|
48
|
+
#descriptionId = `dui-alert-desc-${this.#instanceId}`;
|
|
49
|
+
get #isOpen() {
|
|
50
|
+
return this.open ?? this.#internalOpen;
|
|
51
|
+
}
|
|
52
|
+
#openDialog = () => {
|
|
53
|
+
if (this.open === undefined) {
|
|
54
|
+
this.#internalOpen = true;
|
|
55
|
+
}
|
|
56
|
+
this.dispatchEvent(openChangeEvent({ open: true }));
|
|
57
|
+
};
|
|
58
|
+
#closeDialog = () => {
|
|
59
|
+
if (this.open === undefined) {
|
|
60
|
+
this.#internalOpen = false;
|
|
61
|
+
}
|
|
62
|
+
this.dispatchEvent(openChangeEvent({ open: false }));
|
|
63
|
+
};
|
|
64
|
+
#ctx_accessor_storage = this.#buildContext();
|
|
65
|
+
get #ctx() { return this.#ctx_accessor_storage; }
|
|
66
|
+
set #ctx(value) { this.#ctx_accessor_storage = value; }
|
|
67
|
+
#buildContext() {
|
|
68
|
+
return {
|
|
69
|
+
open: this.#isOpen,
|
|
70
|
+
dialogId: this.#dialogId,
|
|
71
|
+
triggerId: this.#triggerId,
|
|
72
|
+
titleId: this.#titleId,
|
|
73
|
+
descriptionId: this.#descriptionId,
|
|
74
|
+
openDialog: this.#openDialog,
|
|
75
|
+
closeDialog: this.#closeDialog,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
connectedCallback() {
|
|
79
|
+
super.connectedCallback();
|
|
80
|
+
if (this.open === undefined && this.defaultOpen) {
|
|
81
|
+
this.#internalOpen = true;
|
|
82
|
+
}
|
|
83
|
+
this.#ctx = this.#buildContext();
|
|
84
|
+
}
|
|
85
|
+
willUpdate() {
|
|
86
|
+
this.#ctx = this.#buildContext();
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
return html `<slot></slot>`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
__decorate([
|
|
93
|
+
property({ type: Boolean, reflect: true })
|
|
94
|
+
], DuiAlertDialog.prototype, "open", null);
|
|
95
|
+
__decorate([
|
|
96
|
+
property({ type: Boolean, attribute: "default-open" })
|
|
97
|
+
], DuiAlertDialog.prototype, "defaultOpen", null);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DuiAlertDialog, openChangeEvent } from "./alert-dialog.js";
|
|
2
|
+
export type { AlertDialogOpenChangeDetail } from "./alert-dialog.js";
|
|
3
|
+
export { DuiAlertDialogTrigger } from "./alert-dialog-trigger.js";
|
|
4
|
+
export { DuiAlertDialogPopup } from "./alert-dialog-popup.js";
|
|
5
|
+
export { DuiAlertDialogClose } from "./alert-dialog-close.js";
|
|
6
|
+
export type { AlertDialogContext } from "./alert-dialog-context.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DuiAlertDialog } from "./alert-dialog.js";
|
|
2
|
+
import { DuiAlertDialogTrigger } from "./alert-dialog-trigger.js";
|
|
3
|
+
import { DuiAlertDialogPopup } from "./alert-dialog-popup.js";
|
|
4
|
+
import { DuiAlertDialogClose } from "./alert-dialog-close.js";
|
|
5
|
+
if (!customElements.get(DuiAlertDialog.tagName)) {
|
|
6
|
+
customElements.define(DuiAlertDialog.tagName, DuiAlertDialog);
|
|
7
|
+
}
|
|
8
|
+
if (!customElements.get(DuiAlertDialogTrigger.tagName)) {
|
|
9
|
+
customElements.define(DuiAlertDialogTrigger.tagName, DuiAlertDialogTrigger);
|
|
10
|
+
}
|
|
11
|
+
if (!customElements.get(DuiAlertDialogPopup.tagName)) {
|
|
12
|
+
customElements.define(DuiAlertDialogPopup.tagName, DuiAlertDialogPopup);
|
|
13
|
+
}
|
|
14
|
+
if (!customElements.get(DuiAlertDialogClose.tagName)) {
|
|
15
|
+
customElements.define(DuiAlertDialogClose.tagName, DuiAlertDialogClose);
|
|
16
|
+
}
|
package/all.d.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel export of all DUI components.
|
|
3
|
+
* Provides the `allComponents` array for one-shot `applyTheme()` registration.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { applyTheme } from "@deepfuture/dui-core";
|
|
8
|
+
* import { defaultTheme } from "@deepfuture/dui-theme-default";
|
|
9
|
+
* import { allComponents } from "@deepfuture/dui-components/all";
|
|
10
|
+
*
|
|
11
|
+
* applyTheme({ theme: defaultTheme, components: allComponents });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
import type { LitElement } from "lit";
|
|
15
|
+
export { DuiAccordion, DuiAccordionItem } from "./accordion/index.js";
|
|
16
|
+
export type { AccordionContext } from "./accordion/index.js";
|
|
17
|
+
export { DuiAlertDialog, DuiAlertDialogTrigger, DuiAlertDialogPopup, DuiAlertDialogClose, } from "./alert-dialog/index.js";
|
|
18
|
+
export type { AlertDialogOpenChangeDetail, AlertDialogContext, } from "./alert-dialog/index.js";
|
|
19
|
+
export { DuiAvatar } from "./avatar/index.js";
|
|
20
|
+
export type { ImageStatus } from "./avatar/index.js";
|
|
21
|
+
export { DuiBadge } from "./badge/index.js";
|
|
22
|
+
export type { BadgeVariant } from "./badge/index.js";
|
|
23
|
+
export { DuiBreadcrumb, DuiBreadcrumbItem, DuiBreadcrumbLink, DuiBreadcrumbPage, DuiBreadcrumbSeparator, DuiBreadcrumbEllipsis, } from "./breadcrumb/index.js";
|
|
24
|
+
export { DuiButton } from "./button/index.js";
|
|
25
|
+
export type { ButtonSize, ButtonVariant } from "./button/index.js";
|
|
26
|
+
export { DuiCalendar } from "./calendar/index.js";
|
|
27
|
+
export { DuiCenter } from "./center/index.js";
|
|
28
|
+
export { DuiCheckbox, DuiCheckboxGroup } from "./checkbox/index.js";
|
|
29
|
+
export type { CheckboxGroupContext } from "./checkbox/index.js";
|
|
30
|
+
export { DuiCollapsible } from "./collapsible/index.js";
|
|
31
|
+
export { DuiCombobox } from "./combobox/index.js";
|
|
32
|
+
export type { SelectOption as ComboboxSelectOption, ComboboxValueChangeDetail, ComboboxValuesChangeDetail, } from "./combobox/index.js";
|
|
33
|
+
export { DuiCommand, DuiCommandInput, DuiCommandList, DuiCommandGroup, DuiCommandItem, DuiCommandEmpty, DuiCommandSeparator, DuiCommandShortcut, } from "./command/index.js";
|
|
34
|
+
export type { CommandContext, CommandItemEntry } from "./command/index.js";
|
|
35
|
+
export { DuiDataTable } from "./data-table/index.js";
|
|
36
|
+
export type { ColumnDef, SortDirection, SortState, PageState, } from "./data-table/index.js";
|
|
37
|
+
export { DuiDialog, DuiDialogTrigger, DuiDialogPopup, DuiDialogClose, } from "./dialog/index.js";
|
|
38
|
+
export type { DialogOpenChangeDetail, DialogContext } from "./dialog/index.js";
|
|
39
|
+
export { DuiDropzone } from "./dropzone/index.js";
|
|
40
|
+
export type { DropzoneErrorCode, DropzoneRejectionCode, FileRejectionError, RejectedFile, DropzoneDropDetail, DropzoneAcceptedDetail, DropzoneRejectedDetail, DropzoneErrorDetail, } from "./dropzone/index.js";
|
|
41
|
+
export { DuiHstack } from "./hstack/index.js";
|
|
42
|
+
export type { HstackAlignment, HstackJustify } from "./hstack/index.js";
|
|
43
|
+
export { DuiIcon } from "./icon/index.js";
|
|
44
|
+
export { DuiInput } from "./input/index.js";
|
|
45
|
+
export { DuiLink } from "./link/index.js";
|
|
46
|
+
export { DuiMenu, DuiMenuItem } from "./menu/index.js";
|
|
47
|
+
export { DuiMenubar } from "./menubar/index.js";
|
|
48
|
+
export type { MenubarContext } from "./menubar/index.js";
|
|
49
|
+
export { DuiNumberField } from "./number-field/index.js";
|
|
50
|
+
export { DuiPageInset } from "./page-inset/index.js";
|
|
51
|
+
export { DuiPopover, DuiPopoverTrigger, DuiPopoverPopup, DuiPopoverClose, } from "./popover/index.js";
|
|
52
|
+
export type { PopoverOpenChangeDetail, PopoverContext, PopoverSide, } from "./popover/index.js";
|
|
53
|
+
export { DuiPortal } from "./portal/index.js";
|
|
54
|
+
export type { QueryRoot } from "./portal/index.js";
|
|
55
|
+
export { DuiPreviewCard, DuiPreviewCardTrigger, DuiPreviewCardPopup, } from "./preview-card/index.js";
|
|
56
|
+
export type { PreviewCardOpenChangeDetail, PreviewCardContext, PreviewCardSide, } from "./preview-card/index.js";
|
|
57
|
+
export { DuiProgress } from "./progress/index.js";
|
|
58
|
+
export { DuiRadio, DuiRadioGroup } from "./radio/index.js";
|
|
59
|
+
export type { RadioGroupContext } from "./radio/index.js";
|
|
60
|
+
export { DuiScrollArea } from "./scroll-area/index.js";
|
|
61
|
+
export { DuiSelect } from "./select/index.js";
|
|
62
|
+
export type { SelectOption } from "./select/index.js";
|
|
63
|
+
export { DuiSeparator } from "./separator/index.js";
|
|
64
|
+
export { DuiSidebarProvider, DuiSidebar, DuiSidebarTrigger, DuiSidebarContent, DuiSidebarHeader, DuiSidebarFooter, DuiSidebarGroup, DuiSidebarGroupLabel, DuiSidebarMenu, DuiSidebarMenuItem, DuiSidebarMenuButton, DuiSidebarSeparator, DuiSidebarInset, } from "./sidebar/index.js";
|
|
65
|
+
export type { SidebarContext } from "./sidebar/index.js";
|
|
66
|
+
export { DuiSlider } from "./slider/index.js";
|
|
67
|
+
export { DuiSpinner } from "./spinner/index.js";
|
|
68
|
+
export { DuiSwitch } from "./switch/index.js";
|
|
69
|
+
export { DuiTabs, DuiTabsList, DuiTab, DuiTabsPanel, DuiTabsIndicator, } from "./tabs/index.js";
|
|
70
|
+
export type { TabsContext } from "./tabs/index.js";
|
|
71
|
+
export { DuiTextarea } from "./textarea/index.js";
|
|
72
|
+
export type { TextareaResize, TextareaVariant } from "./textarea/index.js";
|
|
73
|
+
export { DuiToggle, DuiToggleGroup } from "./toggle/index.js";
|
|
74
|
+
export type { ToggleGroupContext } from "./toggle/index.js";
|
|
75
|
+
export { DuiToolbar } from "./toolbar/index.js";
|
|
76
|
+
export { DuiTooltip, DuiTooltipTrigger, DuiTooltipPopup, } from "./tooltip/index.js";
|
|
77
|
+
export type { TooltipContext, TooltipSide } from "./tooltip/index.js";
|
|
78
|
+
export { DuiTrunc } from "./trunc/index.js";
|
|
79
|
+
export { DuiVstack } from "./vstack/index.js";
|
|
80
|
+
/**
|
|
81
|
+
* All DUI component classes, ready for `applyTheme()`.
|
|
82
|
+
* Includes every component and sub-component.
|
|
83
|
+
*/
|
|
84
|
+
export declare const allComponents: Array<typeof LitElement & {
|
|
85
|
+
tagName: string;
|
|
86
|
+
}>;
|