@deepfuture/dui-components 0.0.21 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -65
- package/_install.js +11 -0
- package/accordion/accordion-item.d.ts +3 -20
- package/accordion/accordion-item.js +93 -292
- package/accordion/accordion.d.ts +3 -18
- package/accordion/accordion.js +9 -247
- package/accordion/index.d.ts +6 -6
- package/accordion/index.js +5 -5
- package/alert-dialog/alert-dialog-close.d.ts +3 -14
- package/alert-dialog/alert-dialog-close.js +4 -34
- package/alert-dialog/alert-dialog-popup.d.ts +3 -32
- package/alert-dialog/alert-dialog-popup.js +68 -317
- package/alert-dialog/alert-dialog-trigger.d.ts +3 -14
- package/alert-dialog/alert-dialog-trigger.js +4 -51
- package/alert-dialog/alert-dialog.d.ts +3 -30
- package/alert-dialog/alert-dialog.js +8 -158
- package/alert-dialog/index.d.ts +11 -11
- package/alert-dialog/index.js +9 -9
- package/all.d.ts +159 -123
- package/all.js +134 -231
- package/avatar/avatar.d.ts +3 -39
- package/avatar/avatar.js +18 -238
- package/avatar/index.d.ts +4 -4
- package/avatar/index.js +3 -3
- package/badge/badge.d.ts +3 -10
- package/badge/badge.js +88 -22
- package/badge/index.d.ts +2 -3
- package/badge/index.js +2 -3
- package/breadcrumb/breadcrumb-ellipsis.d.ts +3 -12
- package/breadcrumb/breadcrumb-ellipsis.js +8 -34
- package/breadcrumb/breadcrumb-item.d.ts +3 -11
- package/breadcrumb/breadcrumb-item.js +7 -26
- package/breadcrumb/breadcrumb-link.d.ts +3 -12
- package/breadcrumb/breadcrumb-link.js +16 -26
- package/breadcrumb/breadcrumb-page.d.ts +3 -11
- package/breadcrumb/breadcrumb-page.js +8 -31
- package/breadcrumb/breadcrumb-separator.d.ts +3 -12
- package/breadcrumb/breadcrumb-separator.js +8 -31
- package/breadcrumb/breadcrumb.d.ts +3 -12
- package/breadcrumb/breadcrumb.js +10 -33
- package/breadcrumb/index.d.ts +12 -13
- package/breadcrumb/index.js +12 -13
- package/button/button.d.ts +3 -32
- package/button/button.js +221 -165
- package/button/index.d.ts +3 -3
- package/button/index.js +3 -3
- package/calendar/calendar.d.ts +3 -31
- package/calendar/calendar.js +71 -481
- package/calendar/index.d.ts +3 -3
- package/calendar/index.js +3 -3
- package/card/card.d.ts +3 -27
- package/card/card.js +80 -163
- package/card/index.d.ts +2 -3
- package/card/index.js +2 -3
- package/card-grid/card-grid.d.ts +3 -15
- package/card-grid/card-grid.js +8 -106
- package/card-grid/index.d.ts +2 -3
- package/card-grid/index.js +2 -3
- package/checkbox/checkbox-group.d.ts +3 -34
- package/checkbox/checkbox-group.js +11 -188
- package/checkbox/checkbox.d.ts +3 -47
- package/checkbox/checkbox.js +43 -341
- package/checkbox/index.d.ts +6 -6
- package/checkbox/index.js +5 -5
- package/collapsible/collapsible.d.ts +3 -20
- package/collapsible/collapsible.js +83 -277
- package/collapsible/index.d.ts +3 -3
- package/collapsible/index.js +3 -3
- package/combobox/combobox.d.ts +3 -47
- package/combobox/combobox.js +136 -538
- package/combobox/index.d.ts +4 -4
- package/combobox/index.js +3 -3
- package/command/command-empty.d.ts +3 -8
- package/command/command-empty.js +10 -88
- package/command/command-group.d.ts +3 -13
- package/command/command-group.js +15 -114
- package/command/command-input.d.ts +3 -11
- package/command/command-input.js +20 -136
- package/command/command-item.d.ts +3 -18
- package/command/command-item.js +24 -212
- package/command/command-list.d.ts +3 -7
- package/command/command-list.js +11 -79
- package/command/command-separator.d.ts +3 -5
- package/command/command-separator.js +10 -11
- package/command/command-shortcut.d.ts +3 -5
- package/command/command-shortcut.js +9 -12
- package/command/command.d.ts +3 -23
- package/command/command.js +10 -339
- package/command/index.d.ts +17 -19
- package/command/index.js +16 -18
- package/data-table/data-table.d.ts +3 -57
- package/data-table/data-table.js +86 -449
- package/data-table/index.d.ts +3 -4
- package/data-table/index.js +2 -3
- package/dialog/dialog-close.d.ts +3 -14
- package/dialog/dialog-close.js +4 -34
- package/dialog/dialog-popup.d.ts +3 -34
- package/dialog/dialog-popup.js +70 -336
- package/dialog/dialog-trigger.d.ts +3 -14
- package/dialog/dialog-trigger.js +4 -51
- package/dialog/dialog.d.ts +3 -30
- package/dialog/dialog.js +8 -158
- package/dialog/index.d.ts +11 -11
- package/dialog/index.js +9 -9
- package/dropzone/dropzone.d.ts +3 -72
- package/dropzone/dropzone.js +29 -407
- package/dropzone/index.d.ts +4 -4
- package/dropzone/index.js +3 -3
- package/field/field.d.ts +3 -30
- package/field/field.js +34 -353
- package/field/index.d.ts +1 -0
- package/field/index.js +1 -0
- package/fieldset/fieldset.d.ts +3 -18
- package/fieldset/fieldset.js +21 -110
- package/fieldset/index.d.ts +1 -0
- package/fieldset/index.js +1 -0
- package/icon/icon.d.ts +3 -15
- package/icon/icon.js +4 -33
- package/icon/index.d.ts +2 -3
- package/icon/index.js +2 -3
- package/input/index.d.ts +3 -3
- package/input/index.js +3 -3
- package/input/input.d.ts +3 -49
- package/input/input.js +57 -238
- package/menu/index.d.ts +4 -5
- package/menu/index.js +4 -5
- package/menu/menu-item.d.ts +3 -13
- package/menu/menu-item.js +41 -91
- package/menu/menu.d.ts +3 -15
- package/menu/menu.js +27 -277
- package/menubar/index.d.ts +3 -4
- package/menubar/index.js +2 -3
- package/menubar/menubar.d.ts +3 -19
- package/menubar/menubar.js +12 -183
- package/number-field/index.d.ts +3 -3
- package/number-field/index.js +3 -3
- package/number-field/number-field.d.ts +3 -55
- package/number-field/number-field.js +205 -698
- package/package.json +126 -113
- package/popover/index.d.ts +11 -11
- package/popover/index.js +9 -9
- package/popover/popover-close.d.ts +3 -12
- package/popover/popover-close.js +4 -32
- package/popover/popover-popup.d.ts +3 -18
- package/popover/popover-popup.js +28 -205
- package/popover/popover-trigger.d.ts +3 -13
- package/popover/popover-trigger.js +4 -73
- package/popover/popover.d.ts +3 -29
- package/popover/popover.js +8 -207
- package/portal/index.d.ts +3 -4
- package/portal/index.js +2 -3
- package/portal/portal.d.ts +3 -27
- package/portal/portal.js +8 -157
- package/preview-card/index.d.ts +9 -9
- package/preview-card/index.js +7 -7
- package/preview-card/preview-card-popup.d.ts +3 -14
- package/preview-card/preview-card-popup.js +29 -194
- package/preview-card/preview-card-trigger.d.ts +3 -12
- package/preview-card/preview-card-trigger.js +4 -74
- package/preview-card/preview-card.d.ts +3 -33
- package/preview-card/preview-card.js +8 -239
- package/progress/index.d.ts +2 -3
- package/progress/index.js +2 -3
- package/progress/progress.d.ts +3 -17
- package/progress/progress.js +28 -130
- package/radio/index.d.ts +6 -6
- package/radio/index.js +5 -5
- package/radio/radio-group.d.ts +3 -37
- package/radio/radio-group.js +8 -200
- package/radio/radio.d.ts +3 -28
- package/radio/radio.js +38 -213
- package/scroll-area/index.d.ts +2 -3
- package/scroll-area/index.js +2 -3
- package/scroll-area/scroll-area.d.ts +3 -36
- package/scroll-area/scroll-area.js +25 -535
- package/select/index.d.ts +3 -4
- package/select/index.js +2 -3
- package/select/select.d.ts +3 -39
- package/select/select.js +115 -425
- package/separator/index.d.ts +2 -3
- package/separator/index.js +2 -3
- package/separator/separator.d.ts +3 -10
- package/separator/separator.js +23 -85
- package/sidebar/index.d.ts +29 -29
- package/sidebar/index.js +27 -32
- package/sidebar/sidebar-content.d.ts +3 -12
- package/sidebar/sidebar-content.js +7 -29
- package/sidebar/sidebar-footer.d.ts +3 -10
- package/sidebar/sidebar-footer.js +7 -20
- package/sidebar/sidebar-group-label.d.ts +3 -15
- package/sidebar/sidebar-group-label.js +17 -41
- package/sidebar/sidebar-group.d.ts +3 -13
- package/sidebar/sidebar-group.js +7 -24
- package/sidebar/sidebar-header.d.ts +3 -10
- package/sidebar/sidebar-header.js +7 -16
- package/sidebar/sidebar-inset.d.ts +3 -13
- package/sidebar/sidebar-inset.js +7 -28
- package/sidebar/sidebar-menu-button.d.ts +3 -26
- package/sidebar/sidebar-menu-button.js +60 -217
- package/sidebar/sidebar-menu-item.d.ts +3 -10
- package/sidebar/sidebar-menu-item.js +7 -19
- package/sidebar/sidebar-menu.d.ts +3 -12
- package/sidebar/sidebar-menu.js +7 -25
- package/sidebar/sidebar-provider.d.ts +3 -34
- package/sidebar/sidebar-provider.js +22 -232
- package/sidebar/sidebar-separator.d.ts +3 -10
- package/sidebar/sidebar-separator.js +9 -19
- package/sidebar/sidebar-trigger.d.ts +3 -14
- package/sidebar/sidebar-trigger.js +10 -46
- package/sidebar/sidebar.d.ts +3 -19
- package/sidebar/sidebar.js +65 -262
- package/slider/index.d.ts +3 -3
- package/slider/index.js +3 -3
- package/slider/slider.d.ts +3 -45
- package/slider/slider.js +97 -382
- package/spinner/index.d.ts +2 -3
- package/spinner/index.js +2 -3
- package/spinner/spinner.d.ts +3 -11
- package/spinner/spinner.js +20 -163
- package/split-button/index.d.ts +3 -1
- package/split-button/index.js +3 -1
- package/split-button/split-button.d.ts +3 -33
- package/split-button/split-button.js +307 -394
- package/stepper/index.d.ts +3 -3
- package/stepper/index.js +3 -3
- package/stepper/stepper.d.ts +3 -41
- package/stepper/stepper.js +57 -381
- package/switch/index.d.ts +3 -3
- package/switch/index.js +3 -3
- package/switch/switch.d.ts +3 -30
- package/switch/switch.js +63 -228
- package/tabs/index.d.ts +12 -12
- package/tabs/index.js +11 -11
- package/tabs/tab.d.ts +3 -14
- package/tabs/tab.js +33 -131
- package/tabs/tabs-indicator.d.ts +3 -9
- package/tabs/tabs-indicator.js +17 -22
- package/tabs/tabs-list.d.ts +3 -15
- package/tabs/tabs-list.js +14 -113
- package/tabs/tabs-panel.d.ts +3 -16
- package/tabs/tabs-panel.js +32 -114
- package/tabs/tabs.d.ts +3 -22
- package/tabs/tabs.js +8 -170
- package/textarea/index.d.ts +4 -4
- package/textarea/index.js +3 -3
- package/textarea/textarea.d.ts +3 -36
- package/textarea/textarea.js +63 -220
- package/toggle/index.d.ts +6 -6
- package/toggle/index.js +5 -5
- package/toggle/toggle-group.d.ts +3 -27
- package/toggle/toggle-group.js +9 -224
- package/toggle/toggle.d.ts +3 -26
- package/toggle/toggle.js +94 -178
- package/tokens/properties.css +361 -0
- package/tokens/prose.css +250 -0
- package/tokens/prose.d.ts +2 -0
- package/tokens/prose.js +4 -0
- package/tokens/tokens-raw.d.ts +2 -0
- package/tokens/tokens-raw.js +2 -0
- package/tokens/tokens.css +409 -0
- package/tokens/tokens.d.ts +2 -0
- package/tokens/tokens.js +5 -0
- package/toolbar/index.d.ts +2 -3
- package/toolbar/index.js +2 -3
- package/toolbar/toolbar.d.ts +3 -11
- package/toolbar/toolbar.js +25 -116
- package/tooltip/index.d.ts +9 -9
- package/tooltip/index.js +7 -7
- package/tooltip/tooltip-popup.d.ts +3 -14
- package/tooltip/tooltip-popup.js +32 -185
- package/tooltip/tooltip-trigger.d.ts +3 -14
- package/tooltip/tooltip-trigger.js +5 -148
- package/tooltip/tooltip.d.ts +3 -35
- package/tooltip/tooltip.js +8 -253
- package/trunc/index.d.ts +2 -3
- package/trunc/index.js +2 -3
- package/trunc/trunc.d.ts +3 -17
- package/trunc/trunc.js +10 -108
- package/_deprecated/center/center.d.ts +0 -14
- package/_deprecated/center/center.js +0 -37
- package/_deprecated/center/index.d.ts +0 -3
- package/_deprecated/center/index.js +0 -3
- package/_deprecated/center/register.js +0 -4
- package/_deprecated/hstack/hstack.d.ts +0 -25
- package/_deprecated/hstack/hstack.js +0 -187
- package/_deprecated/hstack/index.d.ts +0 -4
- package/_deprecated/hstack/index.js +0 -3
- package/_deprecated/hstack/register.d.ts +0 -1
- package/_deprecated/hstack/register.js +0 -4
- package/_deprecated/page-inset/index.d.ts +0 -3
- package/_deprecated/page-inset/index.js +0 -3
- package/_deprecated/page-inset/page-inset.d.ts +0 -28
- package/_deprecated/page-inset/page-inset.js +0 -151
- package/_deprecated/page-inset/register.d.ts +0 -1
- package/_deprecated/page-inset/register.js +0 -4
- package/_deprecated/vstack/index.d.ts +0 -3
- package/_deprecated/vstack/index.js +0 -3
- package/_deprecated/vstack/register.d.ts +0 -1
- package/_deprecated/vstack/register.js +0 -4
- package/_deprecated/vstack/vstack.d.ts +0 -17
- package/_deprecated/vstack/vstack.js +0 -125
- package/accordion/accordion-context.d.ts +0 -15
- package/accordion/accordion-context.js +0 -3
- package/alert-dialog/alert-dialog-context.d.ts +0 -13
- package/alert-dialog/alert-dialog-context.js +0 -3
- package/checkbox/checkbox-group-context.d.ts +0 -11
- package/checkbox/checkbox-group-context.js +0 -3
- package/command/command-context.d.ts +0 -30
- package/command/command-context.js +0 -3
- package/command/command-score.d.ts +0 -6
- package/command/command-score.js +0 -31
- package/dialog/dialog-context.d.ts +0 -13
- package/dialog/dialog-context.js +0 -3
- package/global.d.ts +0 -179
- package/menubar/menubar-context.d.ts +0 -9
- package/menubar/menubar-context.js +0 -2
- package/popover/popover-context.d.ts +0 -17
- package/popover/popover-context.js +0 -3
- package/preview-card/preview-card-context.d.ts +0 -16
- package/preview-card/preview-card-context.js +0 -3
- package/radio/radio-group-context.d.ts +0 -11
- package/radio/radio-group-context.js +0 -2
- package/sidebar/sidebar-context.d.ts +0 -15
- package/sidebar/sidebar-context.js +0 -3
- package/split-button/register.d.ts +0 -1
- package/split-button/register.js +0 -4
- package/tabs/tabs-context.d.ts +0 -8
- package/tabs/tabs-context.js +0 -2
- package/toggle/toggle-group-context.d.ts +0 -9
- package/toggle/toggle-group-context.js +0 -2
- package/tooltip/tooltip-context.d.ts +0 -17
- package/tooltip/tooltip-context.js +0 -3
- /package/{_deprecated/center/register.d.ts → _install.d.ts} +0 -0
package/select/select.js
CHANGED
|
@@ -1,442 +1,132 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
-
var _, done = false;
|
|
8
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
-
var context = {};
|
|
10
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
-
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
-
if (kind === "accessor") {
|
|
15
|
-
if (result === void 0) continue;
|
|
16
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
-
}
|
|
21
|
-
else if (_ = accept(result)) {
|
|
22
|
-
if (kind === "field") initializers.unshift(_);
|
|
23
|
-
else descriptor[key] = _;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
-
done = true;
|
|
28
|
-
};
|
|
29
|
-
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
-
var useValue = arguments.length > 2;
|
|
31
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
-
}
|
|
34
|
-
return useValue ? value : void 0;
|
|
35
|
-
};
|
|
36
|
-
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
-
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
39
|
-
};
|
|
40
|
-
import { css, html, LitElement, nothing } from "lit";
|
|
41
|
-
import { property, state } from "lit/decorators.js";
|
|
42
|
-
import { repeat } from "lit/directives/repeat.js";
|
|
43
|
-
import { base } from "@deepfuture/dui-core/base";
|
|
44
|
-
import { customEvent } from "@deepfuture/dui-core/event";
|
|
45
|
-
import { FloatingPortalController } from "@deepfuture/dui-core/floating-portal-controller";
|
|
46
|
-
export const valueChangeEvent = customEvent("value-change", { bubbles: true, composed: true });
|
|
47
|
-
/** Structural styles only — layout CSS. */
|
|
48
|
-
const hostStyles = css `
|
|
49
|
-
:host {
|
|
50
|
-
display: block;
|
|
51
|
-
}
|
|
52
|
-
`;
|
|
53
|
-
const componentStyles = css `
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { DuiSelectPrimitive } from "@deepfuture/dui-primitives/select";
|
|
3
|
+
import "../_install.js";
|
|
4
|
+
const styles = css `
|
|
54
5
|
.Trigger {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
6
|
+
height: var(--component-height-md);
|
|
7
|
+
gap: var(--space-2);
|
|
8
|
+
padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
|
|
9
|
+
border: var(--border-width-thin) solid var(--border);
|
|
10
|
+
border-radius: var(--radius-md);
|
|
11
|
+
background: transparent;
|
|
12
|
+
color: var(--text-1);
|
|
13
|
+
font-family: var(--font-sans);
|
|
14
|
+
font-size: var(--text-sm); line-height: var(--text-sm--line-height);
|
|
15
|
+
transition-property: border-color, box-shadow, background, filter, transform;
|
|
16
|
+
transition-duration: var(--duration-fastest);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.Trigger:focus {
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.Trigger:focus-visible {
|
|
24
|
+
outline: none;
|
|
25
|
+
box-shadow:
|
|
26
|
+
0 0 0 var(--focus-ring-offset) var(--background),
|
|
27
|
+
0 0 0 calc(var(--focus-ring-offset) + var(--focus-ring-width)) var(--focus-ring-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([size="sm"]) .Trigger {
|
|
31
|
+
height: var(--component-height-sm);
|
|
32
|
+
padding: var(--space-1_5) var(--space-1_5) var(--space-1_5) var(--space-2_5);
|
|
33
|
+
font-size: var(--text-xs);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.Trigger:hover:not([data-disabled]) {
|
|
37
|
+
background: oklch(from var(--foreground) l c h / 0.05);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.Trigger:active:not([data-disabled]),
|
|
41
|
+
.Trigger[data-open]:not([data-disabled]) {
|
|
42
|
+
background: oklch(from var(--foreground) l c h / 0.10);
|
|
62
43
|
}
|
|
63
44
|
|
|
64
45
|
.Trigger[data-disabled] {
|
|
65
|
-
|
|
46
|
+
opacity: 0.4;
|
|
66
47
|
}
|
|
67
48
|
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
49
|
+
:host([aria-invalid="true"]) .Trigger {
|
|
50
|
+
border-color: var(--destructive);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.Value[data-placeholder] {
|
|
54
|
+
color: var(--text-3);
|
|
73
55
|
}
|
|
74
56
|
|
|
75
57
|
.Icon {
|
|
76
|
-
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
--icon-size: var(--space-4);
|
|
61
|
+
color: var(--text-1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ---- Popup (rendered in portal shadow root) ---- */
|
|
65
|
+
|
|
66
|
+
.Popup {
|
|
67
|
+
background: var(--surface-3);
|
|
68
|
+
border: var(--border-width-thin) solid var(--border);
|
|
69
|
+
border-radius: var(--radius-md);
|
|
70
|
+
box-shadow: var(--shadow-md);
|
|
71
|
+
max-width: 320px;
|
|
72
|
+
transition-duration: var(--duration-fast);
|
|
73
|
+
transition-timing-function: var(--ease-out-3);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.Popup[data-starting-style],
|
|
77
|
+
.Popup[data-ending-style] {
|
|
78
|
+
transform: translateY(calc(var(--space-1) * -1));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* When inner-aligned (macOS-style), appear/disappear instantly.
|
|
82
|
+
transition: none — prevents the 200ms onTransitionEnd fallback delay.
|
|
83
|
+
transform: none — prevents translateY flash and getBoundingClientRect distortion.
|
|
84
|
+
Structural opacity:0 on starting/ending-style hides the popup immediately on close. */
|
|
85
|
+
.Popup[data-align-inner] {
|
|
86
|
+
transition: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.Popup[data-align-inner][data-starting-style],
|
|
90
|
+
.Popup[data-align-inner][data-ending-style] {
|
|
91
|
+
transform: none;
|
|
77
92
|
}
|
|
78
|
-
`;
|
|
79
|
-
/** Structural styles injected into the portal positioner. */
|
|
80
|
-
const portalPopupStyles = [
|
|
81
|
-
css `
|
|
82
|
-
.Popup {
|
|
83
|
-
max-height: 240px;
|
|
84
|
-
overflow-y: auto;
|
|
85
|
-
overscroll-behavior: contain;
|
|
86
|
-
opacity: 1;
|
|
87
|
-
transform: translateY(0);
|
|
88
|
-
transition-property: opacity, transform;
|
|
89
|
-
pointer-events: auto;
|
|
90
|
-
}
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
94
|
+
.Listbox {
|
|
95
|
+
padding: var(--space-1);
|
|
96
|
+
}
|
|
96
97
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
.Item {
|
|
99
|
+
gap: var(--space-2);
|
|
100
|
+
padding: var(--space-1_5) var(--space-2);
|
|
101
|
+
border-radius: var(--radius-sm);
|
|
102
|
+
font-size: var(--text-sm); line-height: var(--text-sm--line-height);
|
|
103
|
+
font-family: var(--font-sans);
|
|
104
|
+
color: var(--text-1);
|
|
105
|
+
}
|
|
102
106
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
.Item:hover,
|
|
108
|
+
.Item[data-highlighted] {
|
|
109
|
+
background: oklch(from var(--foreground) l c h / 0.05);
|
|
110
|
+
color: var(--text-1);
|
|
111
|
+
}
|
|
106
112
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
align-items: center;
|
|
111
|
-
justify-content: center;
|
|
112
|
-
}
|
|
113
|
+
.Item[data-selected] {
|
|
114
|
+
font-weight: var(--font-weight-medium);
|
|
115
|
+
}
|
|
113
116
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
overflow: hidden;
|
|
118
|
-
text-overflow: ellipsis;
|
|
119
|
-
}
|
|
120
|
-
`,
|
|
121
|
-
];
|
|
122
|
-
/**
|
|
123
|
-
* `<dui-select>` — A dropdown select for choosing from a list of options.
|
|
124
|
-
*
|
|
125
|
-
* @csspart trigger - The trigger button.
|
|
126
|
-
* @csspart value - The displayed value text.
|
|
127
|
-
* @fires value-change - Fired when the selected value changes.
|
|
128
|
-
* Detail: { value: string, option: SelectOption }
|
|
129
|
-
*/
|
|
130
|
-
let DuiSelect = (() => {
|
|
131
|
-
let _classSuper = LitElement;
|
|
132
|
-
let _options_decorators;
|
|
133
|
-
let _options_initializers = [];
|
|
134
|
-
let _options_extraInitializers = [];
|
|
135
|
-
let _value_decorators;
|
|
136
|
-
let _value_initializers = [];
|
|
137
|
-
let _value_extraInitializers = [];
|
|
138
|
-
let _placeholder_decorators;
|
|
139
|
-
let _placeholder_initializers = [];
|
|
140
|
-
let _placeholder_extraInitializers = [];
|
|
141
|
-
let _disabled_decorators;
|
|
142
|
-
let _disabled_initializers = [];
|
|
143
|
-
let _disabled_extraInitializers = [];
|
|
144
|
-
let _alignItemToTrigger_decorators;
|
|
145
|
-
let _alignItemToTrigger_initializers = [];
|
|
146
|
-
let _alignItemToTrigger_extraInitializers = [];
|
|
147
|
-
let _name_decorators;
|
|
148
|
-
let _name_initializers = [];
|
|
149
|
-
let _name_extraInitializers = [];
|
|
150
|
-
let _private_highlightedIndex_decorators;
|
|
151
|
-
let _private_highlightedIndex_initializers = [];
|
|
152
|
-
let _private_highlightedIndex_extraInitializers = [];
|
|
153
|
-
let _private_highlightedIndex_descriptor;
|
|
154
|
-
return class DuiSelect extends _classSuper {
|
|
155
|
-
static {
|
|
156
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
157
|
-
_options_decorators = [property({ attribute: false })];
|
|
158
|
-
_value_decorators = [property({ type: String })];
|
|
159
|
-
_placeholder_decorators = [property({ type: String })];
|
|
160
|
-
_disabled_decorators = [property({ type: Boolean, reflect: true })];
|
|
161
|
-
_alignItemToTrigger_decorators = [property({ type: Boolean, attribute: "align-item-to-trigger", reflect: true })];
|
|
162
|
-
_name_decorators = [property({ type: String })];
|
|
163
|
-
_private_highlightedIndex_decorators = [state()];
|
|
164
|
-
__esDecorate(this, null, _options_decorators, { kind: "accessor", name: "options", static: false, private: false, access: { has: obj => "options" in obj, get: obj => obj.options, set: (obj, value) => { obj.options = value; } }, metadata: _metadata }, _options_initializers, _options_extraInitializers);
|
|
165
|
-
__esDecorate(this, null, _value_decorators, { kind: "accessor", name: "value", static: false, private: false, access: { has: obj => "value" in obj, get: obj => obj.value, set: (obj, value) => { obj.value = value; } }, metadata: _metadata }, _value_initializers, _value_extraInitializers);
|
|
166
|
-
__esDecorate(this, null, _placeholder_decorators, { kind: "accessor", name: "placeholder", static: false, private: false, access: { has: obj => "placeholder" in obj, get: obj => obj.placeholder, set: (obj, value) => { obj.placeholder = value; } }, metadata: _metadata }, _placeholder_initializers, _placeholder_extraInitializers);
|
|
167
|
-
__esDecorate(this, null, _disabled_decorators, { kind: "accessor", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
|
|
168
|
-
__esDecorate(this, null, _alignItemToTrigger_decorators, { kind: "accessor", name: "alignItemToTrigger", static: false, private: false, access: { has: obj => "alignItemToTrigger" in obj, get: obj => obj.alignItemToTrigger, set: (obj, value) => { obj.alignItemToTrigger = value; } }, metadata: _metadata }, _alignItemToTrigger_initializers, _alignItemToTrigger_extraInitializers);
|
|
169
|
-
__esDecorate(this, null, _name_decorators, { kind: "accessor", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
|
|
170
|
-
__esDecorate(this, _private_highlightedIndex_descriptor = { get: __setFunctionName(function () { return this.#highlightedIndex_accessor_storage; }, "#highlightedIndex", "get"), set: __setFunctionName(function (value) { this.#highlightedIndex_accessor_storage = value; }, "#highlightedIndex", "set") }, _private_highlightedIndex_decorators, { kind: "accessor", name: "#highlightedIndex", static: false, private: true, access: { has: obj => #highlightedIndex in obj, get: obj => obj.#highlightedIndex, set: (obj, value) => { obj.#highlightedIndex = value; } }, metadata: _metadata }, _private_highlightedIndex_initializers, _private_highlightedIndex_extraInitializers);
|
|
171
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
172
|
-
}
|
|
173
|
-
static tagName = "dui-select";
|
|
174
|
-
static formAssociated = true;
|
|
175
|
-
static styles = [base, hostStyles, componentStyles];
|
|
176
|
-
#internals;
|
|
177
|
-
constructor() {
|
|
178
|
-
super();
|
|
179
|
-
this.#internals = this.attachInternals();
|
|
180
|
-
}
|
|
181
|
-
#options_accessor_storage = __runInitializers(this, _options_initializers, []);
|
|
182
|
-
/** The available options. */
|
|
183
|
-
get options() { return this.#options_accessor_storage; }
|
|
184
|
-
set options(value) { this.#options_accessor_storage = value; }
|
|
185
|
-
#value_accessor_storage = (__runInitializers(this, _options_extraInitializers), __runInitializers(this, _value_initializers, ""));
|
|
186
|
-
/** Currently selected value. */
|
|
187
|
-
get value() { return this.#value_accessor_storage; }
|
|
188
|
-
set value(value) { this.#value_accessor_storage = value; }
|
|
189
|
-
#placeholder_accessor_storage = (__runInitializers(this, _value_extraInitializers), __runInitializers(this, _placeholder_initializers, "Select..."));
|
|
190
|
-
/** Placeholder text shown when no value is selected. */
|
|
191
|
-
get placeholder() { return this.#placeholder_accessor_storage; }
|
|
192
|
-
set placeholder(value) { this.#placeholder_accessor_storage = value; }
|
|
193
|
-
#disabled_accessor_storage = (__runInitializers(this, _placeholder_extraInitializers), __runInitializers(this, _disabled_initializers, false));
|
|
194
|
-
/** Whether the select is disabled. */
|
|
195
|
-
get disabled() { return this.#disabled_accessor_storage; }
|
|
196
|
-
set disabled(value) { this.#disabled_accessor_storage = value; }
|
|
197
|
-
#alignItemToTrigger_accessor_storage = (__runInitializers(this, _disabled_extraInitializers), __runInitializers(this, _alignItemToTrigger_initializers, true));
|
|
198
|
-
/** Position the popup so the selected item overlays the trigger (macOS-style). */
|
|
199
|
-
get alignItemToTrigger() { return this.#alignItemToTrigger_accessor_storage; }
|
|
200
|
-
set alignItemToTrigger(value) { this.#alignItemToTrigger_accessor_storage = value; }
|
|
201
|
-
#name_accessor_storage = (__runInitializers(this, _alignItemToTrigger_extraInitializers), __runInitializers(this, _name_initializers, ""));
|
|
202
|
-
/** Name for form submission. */
|
|
203
|
-
get name() { return this.#name_accessor_storage; }
|
|
204
|
-
set name(value) { this.#name_accessor_storage = value; }
|
|
205
|
-
#highlightedIndex_accessor_storage = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _private_highlightedIndex_initializers, -1));
|
|
206
|
-
get #highlightedIndex() { return _private_highlightedIndex_descriptor.get.call(this); }
|
|
207
|
-
set #highlightedIndex(value) { return _private_highlightedIndex_descriptor.set.call(this, value); }
|
|
208
|
-
#triggerId = (__runInitializers(this, _private_highlightedIndex_extraInitializers), `select-trigger-${crypto.randomUUID().slice(0, 8)}`);
|
|
209
|
-
#listboxId = `select-listbox-${crypto.randomUUID().slice(0, 8)}`;
|
|
210
|
-
#popup = new FloatingPortalController(this, {
|
|
211
|
-
getAnchor: () => this.shadowRoot?.querySelector(".Trigger"),
|
|
212
|
-
matchWidth: false,
|
|
213
|
-
minMatchWidth: true,
|
|
214
|
-
styles: portalPopupStyles,
|
|
215
|
-
alignToInner: () => {
|
|
216
|
-
if (!this.alignItemToTrigger)
|
|
217
|
-
return null;
|
|
218
|
-
const root = this.#popup.renderRoot;
|
|
219
|
-
const selectedItem = root?.querySelector("[data-selected]");
|
|
220
|
-
return selectedItem?.querySelector(".ItemText") ?? selectedItem ?? null;
|
|
221
|
-
},
|
|
222
|
-
alignToInnerReference: () => {
|
|
223
|
-
if (!this.alignItemToTrigger)
|
|
224
|
-
return null;
|
|
225
|
-
return this.shadowRoot?.querySelector(".Value") ?? null;
|
|
226
|
-
},
|
|
227
|
-
onOpen: () => {
|
|
228
|
-
this.#highlightedIndex = this.#selectedIndex;
|
|
229
|
-
},
|
|
230
|
-
onClose: () => {
|
|
231
|
-
this.#highlightedIndex = -1;
|
|
232
|
-
},
|
|
233
|
-
renderPopup: (portal) => {
|
|
234
|
-
return html `
|
|
235
|
-
<div
|
|
236
|
-
class="Popup"
|
|
237
|
-
?data-align-inner="${this.alignItemToTrigger && this.value !== ""}"
|
|
238
|
-
?data-starting-style="${portal.isStarting}"
|
|
239
|
-
?data-ending-style="${portal.isEnding}"
|
|
240
|
-
>
|
|
241
|
-
<div
|
|
242
|
-
class="Listbox"
|
|
243
|
-
id="${this.#listboxId}"
|
|
244
|
-
role="listbox"
|
|
117
|
+
.Item[data-disabled] {
|
|
118
|
+
opacity: 0.4;
|
|
119
|
+
}
|
|
245
120
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</div>
|
|
250
|
-
</div>
|
|
251
|
-
`;
|
|
252
|
-
},
|
|
253
|
-
});
|
|
254
|
-
willUpdate() {
|
|
255
|
-
this.#internals.setFormValue(this.value);
|
|
256
|
-
}
|
|
257
|
-
// ---- Computed ----
|
|
258
|
-
get #selectedOption() {
|
|
259
|
-
return this.options.find((o) => o.value === this.value);
|
|
260
|
-
}
|
|
261
|
-
get #selectedIndex() {
|
|
262
|
-
return this.options.findIndex((o) => o.value === this.value);
|
|
263
|
-
}
|
|
264
|
-
get #displayValue() {
|
|
265
|
-
return this.#selectedOption?.label ?? "";
|
|
266
|
-
}
|
|
267
|
-
// ---- Event handlers ----
|
|
268
|
-
#onTriggerClick = (event) => {
|
|
269
|
-
event.stopPropagation();
|
|
270
|
-
if (this.disabled)
|
|
271
|
-
return;
|
|
272
|
-
if (this.#popup.isOpen) {
|
|
273
|
-
this.#popup.close();
|
|
274
|
-
}
|
|
275
|
-
else {
|
|
276
|
-
this.#popup.open();
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
#onTriggerKeyDown = (event) => {
|
|
280
|
-
if (this.disabled)
|
|
281
|
-
return;
|
|
282
|
-
switch (event.key) {
|
|
283
|
-
case "Enter":
|
|
284
|
-
case " ": {
|
|
285
|
-
event.preventDefault();
|
|
286
|
-
if (this.#popup.isOpen) {
|
|
287
|
-
const option = this.options[this.#highlightedIndex];
|
|
288
|
-
if (option && !option.disabled) {
|
|
289
|
-
this.#selectOption(option);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
this.#popup.open();
|
|
294
|
-
}
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
case "ArrowDown": {
|
|
298
|
-
event.preventDefault();
|
|
299
|
-
if (!this.#popup.isOpen) {
|
|
300
|
-
this.#popup.open();
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
this.#highlightedIndex = this.#nextEnabledIndex(this.#highlightedIndex, 1);
|
|
304
|
-
}
|
|
305
|
-
break;
|
|
306
|
-
}
|
|
307
|
-
case "ArrowUp": {
|
|
308
|
-
event.preventDefault();
|
|
309
|
-
if (!this.#popup.isOpen) {
|
|
310
|
-
this.#popup.open();
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
this.#highlightedIndex = this.#nextEnabledIndex(this.#highlightedIndex, -1);
|
|
314
|
-
}
|
|
315
|
-
break;
|
|
316
|
-
}
|
|
317
|
-
case "Home": {
|
|
318
|
-
if (this.#popup.isOpen) {
|
|
319
|
-
event.preventDefault();
|
|
320
|
-
this.#highlightedIndex = this.#nextEnabledIndex(-1, 1);
|
|
321
|
-
}
|
|
322
|
-
break;
|
|
323
|
-
}
|
|
324
|
-
case "End": {
|
|
325
|
-
if (this.#popup.isOpen) {
|
|
326
|
-
event.preventDefault();
|
|
327
|
-
this.#highlightedIndex = this.#nextEnabledIndex(this.options.length, -1);
|
|
328
|
-
}
|
|
329
|
-
break;
|
|
330
|
-
}
|
|
331
|
-
case "Escape": {
|
|
332
|
-
if (this.#popup.isOpen) {
|
|
333
|
-
event.preventDefault();
|
|
334
|
-
this.#popup.close();
|
|
335
|
-
this.#focusTrigger();
|
|
336
|
-
}
|
|
337
|
-
break;
|
|
338
|
-
}
|
|
339
|
-
case "Tab": {
|
|
340
|
-
if (this.#popup.isOpen) {
|
|
341
|
-
this.#popup.close();
|
|
342
|
-
}
|
|
343
|
-
break;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
#onListMouseDown = (event) => {
|
|
348
|
-
event.preventDefault();
|
|
349
|
-
};
|
|
350
|
-
#onItemClick = (option) => {
|
|
351
|
-
if (option.disabled)
|
|
352
|
-
return;
|
|
353
|
-
this.#selectOption(option);
|
|
354
|
-
};
|
|
355
|
-
#onItemMouseEnter = (index) => {
|
|
356
|
-
if (!this.options[index]?.disabled) {
|
|
357
|
-
this.#highlightedIndex = index;
|
|
358
|
-
}
|
|
359
|
-
};
|
|
360
|
-
// ---- Selection ----
|
|
361
|
-
#selectOption(option) {
|
|
362
|
-
this.value = option.value;
|
|
363
|
-
this.dispatchEvent(valueChangeEvent({ value: option.value, option }));
|
|
364
|
-
this.#popup.close();
|
|
365
|
-
this.#focusTrigger();
|
|
366
|
-
}
|
|
367
|
-
#nextEnabledIndex(current, direction) {
|
|
368
|
-
const len = this.options.length;
|
|
369
|
-
let next = current + direction;
|
|
370
|
-
while (next >= 0 && next < len) {
|
|
371
|
-
if (!this.options[next].disabled)
|
|
372
|
-
return next;
|
|
373
|
-
next += direction;
|
|
374
|
-
}
|
|
375
|
-
return current;
|
|
376
|
-
}
|
|
377
|
-
#focusTrigger() {
|
|
378
|
-
const trigger = this.shadowRoot?.querySelector(".Trigger");
|
|
379
|
-
trigger?.focus();
|
|
380
|
-
}
|
|
381
|
-
// ---- Render ----
|
|
382
|
-
#renderItem = (option, index) => {
|
|
383
|
-
const isSelected = option.value === this.value;
|
|
384
|
-
const isHighlighted = index === this.#highlightedIndex;
|
|
385
|
-
return html `
|
|
386
|
-
<div
|
|
387
|
-
class="Item"
|
|
388
|
-
role="option"
|
|
389
|
-
id="${this.#listboxId}-option-${index}"
|
|
390
|
-
aria-selected="${isSelected}"
|
|
391
|
-
?data-selected="${isSelected}"
|
|
392
|
-
?data-highlighted="${isHighlighted}"
|
|
393
|
-
?data-disabled="${option.disabled}"
|
|
394
|
-
@click="${() => this.#onItemClick(option)}"
|
|
395
|
-
@mouseenter="${() => this.#onItemMouseEnter(index)}"
|
|
396
|
-
>
|
|
397
|
-
<span class="ItemIndicator">
|
|
398
|
-
${isSelected
|
|
399
|
-
? html `<dui-icon><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg></dui-icon>`
|
|
400
|
-
: nothing}
|
|
401
|
-
</span>
|
|
402
|
-
<span class="ItemText">${option.label}</span>
|
|
403
|
-
</div>
|
|
404
|
-
`;
|
|
405
|
-
};
|
|
406
|
-
render() {
|
|
407
|
-
const hasValue = this.value !== "" && this.#selectedOption != null;
|
|
408
|
-
return html `
|
|
409
|
-
<div
|
|
410
|
-
class="Trigger"
|
|
411
|
-
part="trigger"
|
|
412
|
-
id="${this.#triggerId}"
|
|
413
|
-
role="combobox"
|
|
414
|
-
tabindex="${this.disabled ? -1 : 0}"
|
|
415
|
-
aria-haspopup="listbox"
|
|
416
|
-
aria-expanded="${this.#popup.isOpen}"
|
|
417
|
-
aria-controls="${this.#listboxId}"
|
|
418
|
-
aria-activedescendant="${this.#highlightedIndex >= 0
|
|
419
|
-
? `${this.#listboxId}-option-${this.#highlightedIndex}`
|
|
420
|
-
: nothing}"
|
|
421
|
-
?data-disabled="${this.disabled}"
|
|
422
|
-
?data-open="${this.#popup.isOpen}"
|
|
423
|
-
@click="${this.#onTriggerClick}"
|
|
424
|
-
@keydown="${this.#onTriggerKeyDown}"
|
|
425
|
-
>
|
|
426
|
-
<span
|
|
427
|
-
class="Value"
|
|
428
|
-
part="value"
|
|
429
|
-
?data-placeholder="${!hasValue}"
|
|
430
|
-
>
|
|
431
|
-
${hasValue ? this.#displayValue : this.placeholder}
|
|
432
|
-
</span>
|
|
433
|
-
<span class="Icon">
|
|
434
|
-
<dui-icon><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg></dui-icon>
|
|
435
|
-
</span>
|
|
436
|
-
</div>
|
|
121
|
+
.ItemIndicator {
|
|
122
|
+
width: var(--space-3_5);
|
|
123
|
+
}
|
|
437
124
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
export
|
|
125
|
+
.ItemIndicator dui-icon {
|
|
126
|
+
--icon-size: var(--space-3_5);
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
export class DuiSelect extends DuiSelectPrimitive {
|
|
130
|
+
static styles = [...DuiSelectPrimitive.styles, styles];
|
|
131
|
+
}
|
|
132
|
+
customElements.define(DuiSelect.tagName, DuiSelect);
|
package/separator/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { DuiSeparator };
|
|
3
|
-
export declare const separatorFamily: (typeof DuiSeparator)[];
|
|
1
|
+
import "./separator.js";
|
|
2
|
+
export { DuiSeparator } from "./separator.js";
|
package/separator/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { DuiSeparator };
|
|
3
|
-
export const separatorFamily = [DuiSeparator];
|
|
1
|
+
import "./separator.js";
|
|
2
|
+
export { DuiSeparator } from "./separator.js";
|
package/separator/separator.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* @csspart root - The separator element.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DuiSeparator extends LitElement {
|
|
8
|
-
static tagName: "dui-separator";
|
|
1
|
+
import { DuiSeparatorPrimitive } from "@deepfuture/dui-primitives/separator";
|
|
2
|
+
import "../_install.js";
|
|
3
|
+
export declare class DuiSeparator extends DuiSeparatorPrimitive {
|
|
9
4
|
static styles: import("lit").CSSResult[];
|
|
10
|
-
accessor orientation: "horizontal" | "vertical";
|
|
11
|
-
render(): TemplateResult;
|
|
12
5
|
}
|