@brightspot/ui 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/dropdown/Dropdown.d.ts +172 -0
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/Dropdown.js +407 -0
- package/dist/components/dropdown/Dropdown.js.map +1 -0
- package/dist/components/dropdown/DropdownItem.d.ts +108 -0
- package/dist/components/dropdown/DropdownItem.d.ts.map +1 -0
- package/dist/components/dropdown/DropdownItem.js +210 -0
- package/dist/components/dropdown/DropdownItem.js.map +1 -0
- package/dist/components/dropdown/DropdownMenu.d.ts +117 -0
- package/dist/components/dropdown/DropdownMenu.d.ts.map +1 -0
- package/dist/components/dropdown/DropdownMenu.js +295 -0
- package/dist/components/dropdown/DropdownMenu.js.map +1 -0
- package/dist/custom-elements.json +1097 -101
- package/dist/storybook/assets/Avatar.stories-BAaSlDF7.js +213 -0
- package/dist/storybook/assets/{AvatarGroup.stories-BBkQuFKk.js → AvatarGroup.stories-CgoDB4N4.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-mFZsls7i.js → Badge.stories-uexxdmo6.js} +3 -3
- package/dist/storybook/assets/{Button.stories-CAWX17L1.js → Button.stories-T9UJUPHI.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-DBVt4Cg2.js → CircularProgress.stories-DW-VJA5j.js} +6 -6
- package/dist/storybook/assets/{ClipboardMixin.stories-BH9E-OI6.js → ClipboardMixin.stories-DzU4vxu5.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-CVnTzq2p.js → Color-6BZIO3FS-DRk2xjoN.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-BFYmP0LL.js → Colors.stories-_UPdvuhY.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-Cu7YXkU8.js → ComponentStatesMixin-BIu5SKeV.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-CAvyYt0H.js → ComponentStatesMixin.stories-C0FLaqLu.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-DbJZsp_L.js → CopyToClipboard.stories-D31zoUVI.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-BiFiH1K9.js → Debounce.stories-CgPPl5Ee.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-Bq6G4eeC.js → DocsRenderer-LL677BLK-iwiwOzX9.js} +6 -6
- package/dist/storybook/assets/Dropdown.stories-CDcl6rmG.js +697 -0
- package/dist/storybook/assets/{Events.stories-BsDBxh8_.js → Events.stories-DS6UC9dZ.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-zGzWgHVO.js → Heading.stories-CAQfEGE2.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-B4T6sSwf.js → Icon.stories-C7msWlHs.js} +11 -11
- package/dist/storybook/assets/{LinearProgress.stories-qzqmUUwY.js → LinearProgress.stories-DBGJ5a2-.js} +7 -7
- package/dist/storybook/assets/{Pagination.stories-B6Q-7taJ.js → Pagination.stories-C58bGOdf.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-CGkU0SGv.js → Popover.stories-C9zU0sEX.js} +5 -5
- package/dist/storybook/assets/{ReadyMixin-3YCzoG6W.js → ReadyMixin-qf8SAjMu.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-Y1MYTWAt.js → Rtc.stories-k9tKHNhD.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-B9kSpLT1.js → ScrollShadow.stories-Bp42zyLH.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-BgvLDrS3.js → Throttle.stories-B5YU-Nms.js} +1 -1
- package/dist/storybook/assets/Tooltip.stories-COQcvOnL.js +143 -0
- package/dist/storybook/assets/{Widget.stories--JpqVyJe.js → Widget.stories-D3Sq5-_A.js} +13 -13
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-DNbD9hAX.js → WithTooltip-65CFNBJE-Cox81aM_.js} +1 -1
- package/dist/storybook/assets/{formatter-EIJCOSYU-Cy8KIxab.js → formatter-EIJCOSYU-3ErcoV9q.js} +1 -1
- package/dist/storybook/assets/if-defined-Bv2_qPJg.js +1 -0
- package/dist/storybook/assets/{iframe-Dz6CxatW.js → iframe-CM6gBkqA.js} +152 -152
- package/dist/storybook/assets/{iframe-DiT9Iz2T.css → iframe-D3r2Ciu8.css} +1 -1
- package/dist/storybook/assets/{index-CebChkmF.js → index-iwfnMgqg.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-nHDImx0x.js → onFind.stories-CDtoTN6S.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-CBxYVPwd.js → onRemove.stories-CSTeFCLU.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-D4Qewc9Y.js → onVisible.stories-C-yiw9n4.js} +1 -1
- package/dist/storybook/assets/{style-map-BgW9piaW.js → style-map-BJGdSb_D.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CROW1475.js → syntaxhighlighter-ED5Y7EFY-BEudYlVi.js} +1 -1
- package/dist/storybook/iframe.html +2 -2
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind-plugin-button.js +10 -0
- package/dist/tailwind-plugin-button.js.map +1 -1
- package/dist/tailwind-plugin-button.ts +10 -0
- package/dist/tailwind-plugin-dropdown.d.ts +2 -0
- package/dist/tailwind-plugin-dropdown.d.ts.map +1 -0
- package/dist/tailwind-plugin-dropdown.js +223 -0
- package/dist/tailwind-plugin-dropdown.js.map +1 -0
- package/dist/tailwind-plugin-dropdown.ts +249 -0
- package/dist/util/EventEmitterMixin.d.ts +13 -0
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/docs/components/Avatar.md +62 -0
- package/docs/components/AvatarGroup.md +52 -0
- package/docs/components/Badge.md +58 -0
- package/docs/components/CircularProgress.md +55 -0
- package/docs/components/CopyToClipboard.md +54 -0
- package/docs/components/Dropdown.md +100 -0
- package/docs/components/DropdownItem.md +64 -0
- package/docs/components/DropdownMenu.md +81 -0
- package/docs/components/Icon.md +61 -0
- package/docs/components/LinearProgress.md +40 -0
- package/docs/components/Pagination.md +95 -0
- package/docs/components/Popover.md +71 -0
- package/docs/components/README.md +24 -0
- package/docs/components/Widget.md +79 -0
- package/package.json +3 -2
- package/dist/storybook/assets/Avatar.stories-CafEcy4T.js +0 -214
- package/dist/storybook/assets/Tooltip.stories-POo1M-ew.js +0 -143
- package/dist/storybook/assets/if-defined-CngSGyRu.js +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import type { TooltipMixinInterface } from '../../util/TooltipMixin.js';
|
|
3
|
+
import '../icon/Icon.js';
|
|
4
|
+
type Placement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
5
|
+
type Size = 'small' | 'medium' | 'large';
|
|
6
|
+
type Variant = 'primary' | 'secondary' | 'tertiary' | 'primary-clear' | 'secondary-clear' | 'tertiary-clear';
|
|
7
|
+
export interface DropdownProps extends Partial<TooltipMixinInterface> {
|
|
8
|
+
label?: string;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
placement?: Placement;
|
|
11
|
+
size?: Size;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
variant?: Variant;
|
|
14
|
+
iconSymbol?: string;
|
|
15
|
+
iconPosition?: 'leading' | 'trailing';
|
|
16
|
+
iconOnly?: boolean;
|
|
17
|
+
stayOpenOnSelect?: boolean;
|
|
18
|
+
noChevron?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const Dropdown_base: (new (...args: any[]) => TooltipMixinInterface) & (new (...args: any[]) => import("../../util/EventEmitterMixin.js").EventEmitterMixinInterface) & (new (...args: any[]) => import("../../util/ReadyMixin.js").ReadyMixinInterface) & typeof LitElement;
|
|
21
|
+
/**
|
|
22
|
+
* A dropdown component that renders a trigger button and manages a floating panel
|
|
23
|
+
* containing a `btu-dropdown-menu`.
|
|
24
|
+
*
|
|
25
|
+
* Uses the native Popover API and CSS anchor positioning for panel management.
|
|
26
|
+
* The trigger button is built with existing `btu-button-*` classes.
|
|
27
|
+
*
|
|
28
|
+
* **Trigger button styling:** Set `--button-*` CSS custom properties on `<btu-dropdown>`
|
|
29
|
+
* or a parent element to customize the trigger via CSS inheritance (e.g.,
|
|
30
|
+
* `--button-border-radius`, `--button-color-background`). See
|
|
31
|
+
* `tailwind-plugin-button.ts` for available props.
|
|
32
|
+
*
|
|
33
|
+
* @element btu-dropdown
|
|
34
|
+
*
|
|
35
|
+
* @fires {CustomEvent} btu-dropdown-ready - Fired after first render and initialization
|
|
36
|
+
* @fires {CustomEvent} btu-dropdown-show - Fired when the dropdown panel opens
|
|
37
|
+
* @fires {CustomEvent} btu-dropdown-hide - Fired when the dropdown panel closes
|
|
38
|
+
* @fires {CustomEvent<{label: string, selected: boolean}>} btu-dropdown-item-select - Fired when a menu item is activated (bubbles from btu-dropdown-item)
|
|
39
|
+
* @fires {CustomEvent<{label: string, favorited: boolean}>} btu-dropdown-item-favorite - Fired when a menu item's favorite is toggled (bubbles from btu-dropdown-item)
|
|
40
|
+
*
|
|
41
|
+
* @slot - A `btu-dropdown-menu` element containing `btu-dropdown-item` children
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```html
|
|
45
|
+
* <btu-dropdown label="Actions" variant="secondary">
|
|
46
|
+
* <btu-dropdown-menu>
|
|
47
|
+
* <btu-dropdown-item label="Edit"></btu-dropdown-item>
|
|
48
|
+
* <btu-dropdown-item label="Duplicate"></btu-dropdown-item>
|
|
49
|
+
* <btu-dropdown-item label="Delete" disabled></btu-dropdown-item>
|
|
50
|
+
* </btu-dropdown-menu>
|
|
51
|
+
* </btu-dropdown>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @cssprop --dropdown-panel-background - Panel background color (default: white)
|
|
55
|
+
* @cssprop --dropdown-panel-border-color - Panel border color (default: gray-200)
|
|
56
|
+
* @cssprop --dropdown-panel-border-radius - Panel border radius (default: borderRadius.lg)
|
|
57
|
+
* @cssprop --dropdown-panel-min-width - Panel minimum width (default: max(12rem, anchor-size(width)))
|
|
58
|
+
* @cssprop --dropdown-item-background - Item background color (default: transparent)
|
|
59
|
+
* @cssprop --dropdown-item-color - Item text color (default: gray-700)
|
|
60
|
+
* @cssprop --dropdown-item-hover-background - Item hover background (default: gray-100)
|
|
61
|
+
* @cssprop --dropdown-item-hover-color - Item hover text color (default: gray-900)
|
|
62
|
+
* @cssprop --dropdown-item-selected-background - Selected item background (default: primary-50)
|
|
63
|
+
* @cssprop --dropdown-item-selected-color - Selected item text color (default: primary-700)
|
|
64
|
+
* @cssprop --dropdown-item-font-size - Item font size (default: fontSize.sm)
|
|
65
|
+
* @cssprop --dropdown-divider-color - Divider line color (default: gray-200)
|
|
66
|
+
* @cssprop --dropdown-empty-color - Empty state text color (default: gray-400)
|
|
67
|
+
*/
|
|
68
|
+
export default class Dropdown extends Dropdown_base {
|
|
69
|
+
/**
|
|
70
|
+
* Trigger button text.
|
|
71
|
+
* @attr
|
|
72
|
+
*/
|
|
73
|
+
label: string;
|
|
74
|
+
/**
|
|
75
|
+
* Panel visibility state. Can be set programmatically (e.g., for tour UIs)
|
|
76
|
+
* — syncs to `showPopover()`/`hidePopover()` in `updated()`.
|
|
77
|
+
* @attr
|
|
78
|
+
*/
|
|
79
|
+
open: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Panel placement: 'bottom-start', 'bottom-end', 'top-start', 'top-end'.
|
|
82
|
+
* @attr
|
|
83
|
+
*/
|
|
84
|
+
placement: Placement;
|
|
85
|
+
/**
|
|
86
|
+
* Button size: 'small', 'medium', 'large'.
|
|
87
|
+
* @attr
|
|
88
|
+
*/
|
|
89
|
+
size: Size;
|
|
90
|
+
/**
|
|
91
|
+
* Prevents opening.
|
|
92
|
+
* @attr
|
|
93
|
+
*/
|
|
94
|
+
disabled: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Button variant: 'primary', 'secondary', 'tertiary', 'primary-clear', 'secondary-clear', 'tertiary-clear'.
|
|
97
|
+
* @attr
|
|
98
|
+
*/
|
|
99
|
+
variant: Variant;
|
|
100
|
+
/**
|
|
101
|
+
* Lucide icon symbol for the trigger.
|
|
102
|
+
* @attr icon-symbol
|
|
103
|
+
*/
|
|
104
|
+
iconSymbol: string;
|
|
105
|
+
/**
|
|
106
|
+
* Icon position: 'leading' or 'trailing'.
|
|
107
|
+
* @attr icon-position
|
|
108
|
+
*/
|
|
109
|
+
iconPosition: 'leading' | 'trailing';
|
|
110
|
+
/**
|
|
111
|
+
* Hides label, shows icon only.
|
|
112
|
+
* @attr icon-only
|
|
113
|
+
*/
|
|
114
|
+
iconOnly: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Keeps panel open on item click.
|
|
117
|
+
* @attr stay-open-on-select
|
|
118
|
+
*/
|
|
119
|
+
stayOpenOnSelect: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Hides the chevron icon on the trigger button.
|
|
122
|
+
* @attr no-chevron
|
|
123
|
+
*/
|
|
124
|
+
noChevron: boolean;
|
|
125
|
+
/** @internal */
|
|
126
|
+
private _triggerAnchorName;
|
|
127
|
+
/** @internal */
|
|
128
|
+
private _panelId;
|
|
129
|
+
/** @internal */
|
|
130
|
+
private _panel;
|
|
131
|
+
/** @internal */
|
|
132
|
+
private _menu;
|
|
133
|
+
/** @internal */
|
|
134
|
+
private _triggerEl;
|
|
135
|
+
/** @internal */
|
|
136
|
+
private _panelVisible;
|
|
137
|
+
/** @internal */
|
|
138
|
+
private _boundToggle;
|
|
139
|
+
/** @internal */
|
|
140
|
+
private _boundItemSelect;
|
|
141
|
+
/** @internal */
|
|
142
|
+
private _boundKeydown;
|
|
143
|
+
/** @internal */
|
|
144
|
+
private _boundPanelKeydown;
|
|
145
|
+
createRenderRoot(): this;
|
|
146
|
+
connectedCallback(): void;
|
|
147
|
+
firstUpdated(): void;
|
|
148
|
+
disconnectedCallback(): void;
|
|
149
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
150
|
+
/** Build the button class string based on variant and size */
|
|
151
|
+
private _getButtonClasses;
|
|
152
|
+
/** @internal */
|
|
153
|
+
private _handlePanelToggle;
|
|
154
|
+
/** @internal */
|
|
155
|
+
private _handleItemSelect;
|
|
156
|
+
/** @internal */
|
|
157
|
+
private _handleTriggerKeydown;
|
|
158
|
+
/** @internal */
|
|
159
|
+
private _handlePanelKeydown;
|
|
160
|
+
/** Show the dropdown panel */
|
|
161
|
+
private _showPanel;
|
|
162
|
+
/** Hide the dropdown panel */
|
|
163
|
+
private _hidePanel;
|
|
164
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
165
|
+
}
|
|
166
|
+
declare global {
|
|
167
|
+
interface HTMLElementTagNameMap {
|
|
168
|
+
'btu-dropdown': Dropdown;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
export {};
|
|
172
|
+
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/Dropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAA;AAM/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEvE,OAAO,iBAAiB,CAAA;AAGxB,KAAK,SAAS,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAA;AACxE,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AACxC,KAAK,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,CAAA;AAS5G,MAAM,WAAW,aAAc,SAAQ,OAAO,CAAC,qBAAqB,CAAC;IACnE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,OAAO,CAAA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D,gBAAgB;IAChB,OAAO,CAAC,aAAa,CAAQ;IAE7B,gBAAgB;IAChB,OAAO,CAAC,YAAY,CAAqC;IAEzD,gBAAgB;IAChB,OAAO,CAAC,gBAAgB,CAAoC;IAE5D,gBAAgB;IAChB,OAAO,CAAC,aAAa,CAAwC;IAE7D,gBAAgB;IAChB,OAAO,CAAC,kBAAkB,CAAsC;IAEhE,gBAAgB;IAIhB,iBAAiB,IAAI,IAAI;IASzB,YAAY,IAAI,IAAI;IAyCpB,oBAAoB,IAAI,IAAI;IAS5B,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IA0BtD,8DAA8D;IAC9D,OAAO,CAAC,iBAAiB;IAgCzB,gBAAgB;IAChB,OAAO,CAAC,kBAAkB;IA0B1B,gBAAgB;IAChB,OAAO,CAAC,iBAAiB;IAOzB,gBAAgB;IAChB,OAAO,CAAC,qBAAqB;IAuB7B,gBAAgB;IAChB,OAAO,CAAC,mBAAmB;IAc3B,8BAA8B;IAC9B,OAAO,CAAC,UAAU;IAMlB,8BAA8B;IAC9B,OAAO,CAAC,UAAU;IAMlB,MAAM;CA0BP;AAMD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,QAAQ,CAAA;KACzB;CACF"}
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, nothing } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
10
|
+
import { announce } from '../../util/aria.js';
|
|
11
|
+
import { EventEmitterMixin } from '../../util/EventEmitterMixin.js';
|
|
12
|
+
import { ReadyMixin } from '../../util/ReadyMixin.js';
|
|
13
|
+
import { TooltipMixin } from '../../util/TooltipMixin.js';
|
|
14
|
+
import '../icon/Icon.js';
|
|
15
|
+
const PLACEMENT_AREA = {
|
|
16
|
+
'bottom-start': 'block-end span-inline-end',
|
|
17
|
+
'bottom-end': 'block-end span-inline-start',
|
|
18
|
+
'top-start': 'block-start span-inline-end',
|
|
19
|
+
'top-end': 'block-start span-inline-start',
|
|
20
|
+
};
|
|
21
|
+
const SIZE_MAP = {
|
|
22
|
+
small: 'sm',
|
|
23
|
+
medium: 'md',
|
|
24
|
+
large: 'lg',
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* A dropdown component that renders a trigger button and manages a floating panel
|
|
28
|
+
* containing a `btu-dropdown-menu`.
|
|
29
|
+
*
|
|
30
|
+
* Uses the native Popover API and CSS anchor positioning for panel management.
|
|
31
|
+
* The trigger button is built with existing `btu-button-*` classes.
|
|
32
|
+
*
|
|
33
|
+
* **Trigger button styling:** Set `--button-*` CSS custom properties on `<btu-dropdown>`
|
|
34
|
+
* or a parent element to customize the trigger via CSS inheritance (e.g.,
|
|
35
|
+
* `--button-border-radius`, `--button-color-background`). See
|
|
36
|
+
* `tailwind-plugin-button.ts` for available props.
|
|
37
|
+
*
|
|
38
|
+
* @element btu-dropdown
|
|
39
|
+
*
|
|
40
|
+
* @fires {CustomEvent} btu-dropdown-ready - Fired after first render and initialization
|
|
41
|
+
* @fires {CustomEvent} btu-dropdown-show - Fired when the dropdown panel opens
|
|
42
|
+
* @fires {CustomEvent} btu-dropdown-hide - Fired when the dropdown panel closes
|
|
43
|
+
* @fires {CustomEvent<{label: string, selected: boolean}>} btu-dropdown-item-select - Fired when a menu item is activated (bubbles from btu-dropdown-item)
|
|
44
|
+
* @fires {CustomEvent<{label: string, favorited: boolean}>} btu-dropdown-item-favorite - Fired when a menu item's favorite is toggled (bubbles from btu-dropdown-item)
|
|
45
|
+
*
|
|
46
|
+
* @slot - A `btu-dropdown-menu` element containing `btu-dropdown-item` children
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```html
|
|
50
|
+
* <btu-dropdown label="Actions" variant="secondary">
|
|
51
|
+
* <btu-dropdown-menu>
|
|
52
|
+
* <btu-dropdown-item label="Edit"></btu-dropdown-item>
|
|
53
|
+
* <btu-dropdown-item label="Duplicate"></btu-dropdown-item>
|
|
54
|
+
* <btu-dropdown-item label="Delete" disabled></btu-dropdown-item>
|
|
55
|
+
* </btu-dropdown-menu>
|
|
56
|
+
* </btu-dropdown>
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @cssprop --dropdown-panel-background - Panel background color (default: white)
|
|
60
|
+
* @cssprop --dropdown-panel-border-color - Panel border color (default: gray-200)
|
|
61
|
+
* @cssprop --dropdown-panel-border-radius - Panel border radius (default: borderRadius.lg)
|
|
62
|
+
* @cssprop --dropdown-panel-min-width - Panel minimum width (default: max(12rem, anchor-size(width)))
|
|
63
|
+
* @cssprop --dropdown-item-background - Item background color (default: transparent)
|
|
64
|
+
* @cssprop --dropdown-item-color - Item text color (default: gray-700)
|
|
65
|
+
* @cssprop --dropdown-item-hover-background - Item hover background (default: gray-100)
|
|
66
|
+
* @cssprop --dropdown-item-hover-color - Item hover text color (default: gray-900)
|
|
67
|
+
* @cssprop --dropdown-item-selected-background - Selected item background (default: primary-50)
|
|
68
|
+
* @cssprop --dropdown-item-selected-color - Selected item text color (default: primary-700)
|
|
69
|
+
* @cssprop --dropdown-item-font-size - Item font size (default: fontSize.sm)
|
|
70
|
+
* @cssprop --dropdown-divider-color - Divider line color (default: gray-200)
|
|
71
|
+
* @cssprop --dropdown-empty-color - Empty state text color (default: gray-400)
|
|
72
|
+
*/
|
|
73
|
+
export default class Dropdown extends TooltipMixin(EventEmitterMixin(ReadyMixin(LitElement))) {
|
|
74
|
+
constructor() {
|
|
75
|
+
super(...arguments);
|
|
76
|
+
/**
|
|
77
|
+
* Trigger button text.
|
|
78
|
+
* @attr
|
|
79
|
+
*/
|
|
80
|
+
this.label = '';
|
|
81
|
+
/**
|
|
82
|
+
* Panel visibility state. Can be set programmatically (e.g., for tour UIs)
|
|
83
|
+
* — syncs to `showPopover()`/`hidePopover()` in `updated()`.
|
|
84
|
+
* @attr
|
|
85
|
+
*/
|
|
86
|
+
this.open = false;
|
|
87
|
+
/**
|
|
88
|
+
* Panel placement: 'bottom-start', 'bottom-end', 'top-start', 'top-end'.
|
|
89
|
+
* @attr
|
|
90
|
+
*/
|
|
91
|
+
this.placement = 'bottom-start';
|
|
92
|
+
/**
|
|
93
|
+
* Button size: 'small', 'medium', 'large'.
|
|
94
|
+
* @attr
|
|
95
|
+
*/
|
|
96
|
+
this.size = 'medium';
|
|
97
|
+
/**
|
|
98
|
+
* Prevents opening.
|
|
99
|
+
* @attr
|
|
100
|
+
*/
|
|
101
|
+
this.disabled = false;
|
|
102
|
+
/**
|
|
103
|
+
* Button variant: 'primary', 'secondary', 'tertiary', 'primary-clear', 'secondary-clear', 'tertiary-clear'.
|
|
104
|
+
* @attr
|
|
105
|
+
*/
|
|
106
|
+
this.variant = 'secondary';
|
|
107
|
+
/**
|
|
108
|
+
* Lucide icon symbol for the trigger.
|
|
109
|
+
* @attr icon-symbol
|
|
110
|
+
*/
|
|
111
|
+
this.iconSymbol = '';
|
|
112
|
+
/**
|
|
113
|
+
* Icon position: 'leading' or 'trailing'.
|
|
114
|
+
* @attr icon-position
|
|
115
|
+
*/
|
|
116
|
+
this.iconPosition = 'leading';
|
|
117
|
+
/**
|
|
118
|
+
* Hides label, shows icon only.
|
|
119
|
+
* @attr icon-only
|
|
120
|
+
*/
|
|
121
|
+
this.iconOnly = false;
|
|
122
|
+
/**
|
|
123
|
+
* Keeps panel open on item click.
|
|
124
|
+
* @attr stay-open-on-select
|
|
125
|
+
*/
|
|
126
|
+
this.stayOpenOnSelect = false;
|
|
127
|
+
/**
|
|
128
|
+
* Hides the chevron icon on the trigger button.
|
|
129
|
+
* @attr no-chevron
|
|
130
|
+
*/
|
|
131
|
+
this.noChevron = false;
|
|
132
|
+
/** @internal */
|
|
133
|
+
this._triggerAnchorName = `--dropdown-anchor-${crypto.randomUUID().slice(0, 8)}`;
|
|
134
|
+
/** @internal */
|
|
135
|
+
this._panelId = `dropdown-panel-${crypto.randomUUID().slice(0, 8)}`;
|
|
136
|
+
/** @internal */
|
|
137
|
+
this._panel = null;
|
|
138
|
+
/** @internal */
|
|
139
|
+
this._menu = null;
|
|
140
|
+
/** @internal */
|
|
141
|
+
this._triggerEl = null;
|
|
142
|
+
/** @internal */
|
|
143
|
+
this._panelVisible = false;
|
|
144
|
+
/** @internal */
|
|
145
|
+
this._boundToggle = this._handlePanelToggle.bind(this);
|
|
146
|
+
/** @internal */
|
|
147
|
+
this._boundItemSelect = this._handleItemSelect.bind(this);
|
|
148
|
+
/** @internal */
|
|
149
|
+
this._boundKeydown = this._handleTriggerKeydown.bind(this);
|
|
150
|
+
/** @internal */
|
|
151
|
+
this._boundPanelKeydown = this._handlePanelKeydown.bind(this);
|
|
152
|
+
}
|
|
153
|
+
createRenderRoot() {
|
|
154
|
+
return this;
|
|
155
|
+
}
|
|
156
|
+
connectedCallback() {
|
|
157
|
+
// Capture the menu child before Lit renders and replaces innerHTML
|
|
158
|
+
this._menu = this.querySelector('btu-dropdown-menu');
|
|
159
|
+
if (this._menu) {
|
|
160
|
+
this._menu.remove();
|
|
161
|
+
}
|
|
162
|
+
super.connectedCallback();
|
|
163
|
+
}
|
|
164
|
+
firstUpdated() {
|
|
165
|
+
this._triggerEl = this.querySelector('button');
|
|
166
|
+
// Create panel
|
|
167
|
+
this._panel = document.createElement('div');
|
|
168
|
+
this._panel.id = this._panelId;
|
|
169
|
+
this._panel.setAttribute('popover', 'auto');
|
|
170
|
+
this._panel.className = 'btu-dropdown-panel';
|
|
171
|
+
// Anchor positioning — set inline to avoid Tailwind/PostCSS issues
|
|
172
|
+
// with newer CSS properties (position-area, position-try-fallbacks)
|
|
173
|
+
const s = this._panel.style;
|
|
174
|
+
s.setProperty('position', 'fixed');
|
|
175
|
+
s.setProperty('inset', 'unset');
|
|
176
|
+
s.setProperty('margin', '0');
|
|
177
|
+
s.setProperty('position-anchor', this._triggerAnchorName);
|
|
178
|
+
s.setProperty('position-area', PLACEMENT_AREA[this.placement]);
|
|
179
|
+
s.setProperty('position-try-fallbacks', 'flip-block');
|
|
180
|
+
s.setProperty('position-visibility', 'anchors-visible');
|
|
181
|
+
s.setProperty('min-width', 'var(--dropdown-panel-min-width, max(12rem, anchor-size(width)))');
|
|
182
|
+
// Move menu into panel
|
|
183
|
+
if (this._menu) {
|
|
184
|
+
this._panel.appendChild(this._menu);
|
|
185
|
+
}
|
|
186
|
+
// Append panel to host
|
|
187
|
+
this.appendChild(this._panel);
|
|
188
|
+
// Bind toggle event
|
|
189
|
+
this._panel.addEventListener('toggle', this._boundToggle);
|
|
190
|
+
this._panel.addEventListener('keydown', this._boundPanelKeydown);
|
|
191
|
+
// Prevent focusin from panel items bubbling to host — stops TooltipMixin from re-showing
|
|
192
|
+
this._panel.addEventListener('focusin', e => e.stopPropagation());
|
|
193
|
+
// Listen for item select events
|
|
194
|
+
this.addEventListener('btu-dropdown-item-select', this._boundItemSelect);
|
|
195
|
+
this.emit('btu-dropdown-ready');
|
|
196
|
+
}
|
|
197
|
+
disconnectedCallback() {
|
|
198
|
+
super.disconnectedCallback();
|
|
199
|
+
if (this._panel) {
|
|
200
|
+
this._panel.removeEventListener('toggle', this._boundToggle);
|
|
201
|
+
this._panel.removeEventListener('keydown', this._boundPanelKeydown);
|
|
202
|
+
}
|
|
203
|
+
this.removeEventListener('btu-dropdown-item-select', this._boundItemSelect);
|
|
204
|
+
}
|
|
205
|
+
updated(changedProperties) {
|
|
206
|
+
super.updated(changedProperties);
|
|
207
|
+
// Sync placement when property changes
|
|
208
|
+
if (changedProperties.has('placement') && this._panel) {
|
|
209
|
+
this._panel.style.setProperty('position-area', PLACEMENT_AREA[this.placement]);
|
|
210
|
+
}
|
|
211
|
+
// Sync open property to native popover
|
|
212
|
+
if (changedProperties.has('open') && this._panel) {
|
|
213
|
+
if (this.open && !this._panelVisible) {
|
|
214
|
+
try {
|
|
215
|
+
this._panel.showPopover();
|
|
216
|
+
}
|
|
217
|
+
catch (e) {
|
|
218
|
+
if (!(e instanceof DOMException && e.name === 'InvalidStateError'))
|
|
219
|
+
throw e;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else if (!this.open && this._panelVisible) {
|
|
223
|
+
try {
|
|
224
|
+
this._panel.hidePopover();
|
|
225
|
+
}
|
|
226
|
+
catch (e) {
|
|
227
|
+
if (!(e instanceof DOMException && e.name === 'InvalidStateError'))
|
|
228
|
+
throw e;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/** Build the button class string based on variant and size */
|
|
234
|
+
_getButtonClasses() {
|
|
235
|
+
const sz = SIZE_MAP[this.size];
|
|
236
|
+
const classes = ['btu-button'];
|
|
237
|
+
switch (this.variant) {
|
|
238
|
+
case 'primary':
|
|
239
|
+
classes.push('btu-button-primary', `btu-button-${sz}`);
|
|
240
|
+
break;
|
|
241
|
+
case 'secondary':
|
|
242
|
+
classes.push('btu-button-gray', `btu-button-${sz}`, 'btu-button-outline');
|
|
243
|
+
break;
|
|
244
|
+
case 'tertiary':
|
|
245
|
+
classes.push('btu-button-gray', `btu-button-${sz}`, 'btu-button-fill-none');
|
|
246
|
+
break;
|
|
247
|
+
case 'primary-clear':
|
|
248
|
+
classes.push('btu-button-primary', `btu-button-${sz}`, 'btu-button-container-none');
|
|
249
|
+
break;
|
|
250
|
+
case 'secondary-clear':
|
|
251
|
+
classes.push('btu-button-gray', `btu-button-${sz}`, 'btu-button-container-none');
|
|
252
|
+
break;
|
|
253
|
+
case 'tertiary-clear':
|
|
254
|
+
classes.push('btu-button-gray', `btu-button-${sz}`, 'btu-button-container-none', 'btu-button-fill-none');
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
if (this.iconOnly) {
|
|
258
|
+
classes.push('btu-button-text-hidden');
|
|
259
|
+
}
|
|
260
|
+
return classes.join(' ');
|
|
261
|
+
}
|
|
262
|
+
/** @internal */
|
|
263
|
+
_handlePanelToggle(e) {
|
|
264
|
+
const event = e;
|
|
265
|
+
this._panelVisible = event.newState === 'open';
|
|
266
|
+
this.open = this._panelVisible;
|
|
267
|
+
if (this._panelVisible) {
|
|
268
|
+
this.emit('btu-dropdown-show');
|
|
269
|
+
announce(`${this.label || 'Dropdown'} menu expanded`);
|
|
270
|
+
// Hide tooltip when dropdown opens
|
|
271
|
+
const tip = this.querySelector('[data-tooltip-internal]');
|
|
272
|
+
if (tip)
|
|
273
|
+
try {
|
|
274
|
+
tip.hidePopover();
|
|
275
|
+
}
|
|
276
|
+
catch { }
|
|
277
|
+
// Focus first item after panel opens
|
|
278
|
+
requestAnimationFrame(() => {
|
|
279
|
+
this._menu?.focusFirst();
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
this.emit('btu-dropdown-hide');
|
|
284
|
+
announce(`${this.label || 'Dropdown'} menu collapsed`);
|
|
285
|
+
// Return focus to trigger without scrolling the page
|
|
286
|
+
this._triggerEl?.focus({ preventScroll: true });
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
/** @internal */
|
|
290
|
+
_handleItemSelect() {
|
|
291
|
+
const isCheckbox = this._menu?.checkbox ?? false;
|
|
292
|
+
if (!this.stayOpenOnSelect && !isCheckbox) {
|
|
293
|
+
this._hidePanel();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
/** @internal */
|
|
297
|
+
_handleTriggerKeydown(e) {
|
|
298
|
+
if (this.disabled)
|
|
299
|
+
return;
|
|
300
|
+
switch (e.key) {
|
|
301
|
+
case 'ArrowDown': {
|
|
302
|
+
e.preventDefault();
|
|
303
|
+
this._showPanel();
|
|
304
|
+
requestAnimationFrame(() => {
|
|
305
|
+
this._menu?.focusFirst();
|
|
306
|
+
});
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
case 'ArrowUp': {
|
|
310
|
+
e.preventDefault();
|
|
311
|
+
this._showPanel();
|
|
312
|
+
requestAnimationFrame(() => {
|
|
313
|
+
this._menu?.focusLast();
|
|
314
|
+
});
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
/** @internal */
|
|
320
|
+
_handlePanelKeydown(e) {
|
|
321
|
+
if (e.key === 'Escape') {
|
|
322
|
+
e.preventDefault();
|
|
323
|
+
e.stopPropagation();
|
|
324
|
+
this._hidePanel();
|
|
325
|
+
this._triggerEl?.focus({ preventScroll: true });
|
|
326
|
+
}
|
|
327
|
+
if (e.key === 'Tab') {
|
|
328
|
+
this._hidePanel();
|
|
329
|
+
this._triggerEl?.focus({ preventScroll: true });
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/** Show the dropdown panel */
|
|
333
|
+
_showPanel() {
|
|
334
|
+
if (this._panel && !this._panelVisible) {
|
|
335
|
+
this._panel.showPopover();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
/** Hide the dropdown panel */
|
|
339
|
+
_hidePanel() {
|
|
340
|
+
if (this._panel && this._panelVisible) {
|
|
341
|
+
this._panel.hidePopover();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
render() {
|
|
345
|
+
const buttonClasses = this._getButtonClasses();
|
|
346
|
+
return html `<button
|
|
347
|
+
type="button"
|
|
348
|
+
class="${buttonClasses}"
|
|
349
|
+
style=${styleMap({ 'anchor-name': this._triggerAnchorName })}
|
|
350
|
+
?disabled="${this.disabled}"
|
|
351
|
+
aria-haspopup="menu"
|
|
352
|
+
aria-expanded="${this.open}"
|
|
353
|
+
aria-controls="${this._panelId}"
|
|
354
|
+
aria-label="${this.iconOnly ? this.label : nothing}"
|
|
355
|
+
popovertarget="${this._panelId}"
|
|
356
|
+
@keydown="${this._boundKeydown}"
|
|
357
|
+
>
|
|
358
|
+
${this.iconSymbol && this.iconPosition === 'leading'
|
|
359
|
+
? html `<btu-icon symbol="${this.iconSymbol}" size="sm"></btu-icon>`
|
|
360
|
+
: nothing}
|
|
361
|
+
${this.iconOnly ? nothing : this.label}
|
|
362
|
+
${this.iconSymbol && this.iconPosition === 'trailing'
|
|
363
|
+
? html `<btu-icon symbol="${this.iconSymbol}" size="sm"></btu-icon>`
|
|
364
|
+
: nothing}
|
|
365
|
+
${this.noChevron
|
|
366
|
+
? nothing
|
|
367
|
+
: html `<btu-icon class="btu-dropdown-chevron" symbol="chevron-down" size="sm"></btu-icon>`}
|
|
368
|
+
</button>`;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
__decorate([
|
|
372
|
+
property({ type: String })
|
|
373
|
+
], Dropdown.prototype, "label", void 0);
|
|
374
|
+
__decorate([
|
|
375
|
+
property({ type: Boolean, reflect: true })
|
|
376
|
+
], Dropdown.prototype, "open", void 0);
|
|
377
|
+
__decorate([
|
|
378
|
+
property({ type: String })
|
|
379
|
+
], Dropdown.prototype, "placement", void 0);
|
|
380
|
+
__decorate([
|
|
381
|
+
property({ type: String })
|
|
382
|
+
], Dropdown.prototype, "size", void 0);
|
|
383
|
+
__decorate([
|
|
384
|
+
property({ type: Boolean, reflect: true })
|
|
385
|
+
], Dropdown.prototype, "disabled", void 0);
|
|
386
|
+
__decorate([
|
|
387
|
+
property({ type: String })
|
|
388
|
+
], Dropdown.prototype, "variant", void 0);
|
|
389
|
+
__decorate([
|
|
390
|
+
property({ type: String, attribute: 'icon-symbol' })
|
|
391
|
+
], Dropdown.prototype, "iconSymbol", void 0);
|
|
392
|
+
__decorate([
|
|
393
|
+
property({ type: String, attribute: 'icon-position' })
|
|
394
|
+
], Dropdown.prototype, "iconPosition", void 0);
|
|
395
|
+
__decorate([
|
|
396
|
+
property({ type: Boolean, attribute: 'icon-only' })
|
|
397
|
+
], Dropdown.prototype, "iconOnly", void 0);
|
|
398
|
+
__decorate([
|
|
399
|
+
property({ type: Boolean, attribute: 'stay-open-on-select' })
|
|
400
|
+
], Dropdown.prototype, "stayOpenOnSelect", void 0);
|
|
401
|
+
__decorate([
|
|
402
|
+
property({ type: Boolean, attribute: 'no-chevron', reflect: true })
|
|
403
|
+
], Dropdown.prototype, "noChevron", void 0);
|
|
404
|
+
if (!customElements.get('btu-dropdown')) {
|
|
405
|
+
customElements.define('btu-dropdown', Dropdown);
|
|
406
|
+
}
|
|
407
|
+
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../src/components/dropdown/Dropdown.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,iBAAiB,CAAA;AAOxB,MAAM,cAAc,GAA8B;IAChD,cAAc,EAAE,2BAA2B;IAC3C,YAAY,EAAE,6BAA6B;IAC3C,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,+BAA+B;CAC3C,CAAA;AAgBD,MAAM,QAAQ,GAAyB;IACrC,KAAK,EAAE,IAAI;IACX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