@brightspot/ui 5.3.2 → 5.4.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/README.md +113 -150
- package/dist/components/banner/Banner.css +32 -0
- package/dist/components/banner/Banner.d.ts +56 -0
- package/dist/components/banner/Banner.d.ts.map +1 -0
- package/dist/components/banner/Banner.js +94 -0
- package/dist/components/banner/Banner.js.map +1 -0
- package/dist/components/banner/Message.css +4 -0
- package/dist/components/banner/Message.d.ts +103 -0
- package/dist/components/banner/Message.d.ts.map +1 -0
- package/dist/components/banner/Message.js +235 -0
- package/dist/components/banner/Message.js.map +1 -0
- package/dist/custom-elements.json +319 -0
- package/dist/storybook/assets/{ActionBar.stories-1Iqfy4PV.js → ActionBar.stories-BJcrfF0X.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-DjKyE7m_.js → ActionItem.stories-xLR-VN2Q.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-Dy36fKQN.js → Avatar.stories-Cj5Q2yEp.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-Bh8TY9-P.js → AvatarGroup.stories-DLWAQHFa.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-Bn0aBHka.js → Badge.stories-DGSKAf9D.js} +1 -1
- package/dist/storybook/assets/Banner.stories-BZ3LLa4I.js +203 -0
- package/dist/storybook/assets/{Button-D8Sr8A-v.js → Button-ffu9dnxC.js} +1 -1
- package/dist/storybook/assets/{Button.stories-CtRBI4gv.js → Button.stories-DB-uDcVu.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-CVjQWgMD.js → ButtonGroup.stories-eGya8Uts.js} +1 -1
- package/dist/storybook/assets/{Card.stories-DXTqqbXb.js → Card.stories-B_hhKmQB.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-DwQeQ1VN.js → Celebrate.stories-DqKwiwly.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-D4AyVy-V.js → Checkbox.stories-Bly8OVzf.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-D6dHpD70.js → CircularProgress.stories-BZUNNkMK.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-CvYj7bwY.js → ClipboardMixin.stories-D2XMhwIg.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-o6fp9dCO.js → Color-6BZIO3FS-BPcC43iH.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-Bg-Xuo05.js → Colors.stories-DveV04we.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-C4SNTP9M.js → CombinedEffects.stories-Dl_MhHhl.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-Dj1V-e8c.js → ComponentStatesMixin-CmZnizKN.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-CUoagWLT.js → ComponentStatesMixin.stories-BrAFoGDu.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-ynkFni9d.js → CopyToClipboard.stories-CiKbtpBJ.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-xAZ6AOUR.js → Debounce.stories-BQ7W_yTX.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-DeoiTMLA.js → DocsRenderer-LL677BLK-DiDzi0rZ.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-BQzwsyHE.js → Dropdown.stories-LYd0-ypG.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-CrckJlBX.js → EmptyState.stories-DjKyE0h3.js} +1 -1
- package/dist/storybook/assets/{EscaAvatar.stories-BikckAep.js → EscaAvatar.stories-D3v91UKv.js} +1 -1
- package/dist/storybook/assets/{Events.stories-DC0XMBhF.js → Events.stories-CTe5eZa6.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-7YtY0gNK.js → Heading.stories-DKt-wgRB.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-hRstwRnF.js → HueRipple.stories-B3SVSdL8.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-4-2N4UlX.js → Icon.stories-B5tDsd--.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-ClpNoAT9.js → IconButton.stories-DOV4zFAP.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-BlH24bsJ.js → LinearProgress.stories-ai3UD-xw.js} +1 -1
- package/dist/storybook/assets/Message.stories-CzqIe49h.js +432 -0
- package/dist/storybook/assets/{OnFindMixin.stories-CKoPIaks.js → OnFindMixin.stories-CUaE6pX1.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-CER9zwKW.js → Pagination.stories-CXCbChNW.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-CO7t4Pl8.js → Popover.stories-DyptvVL3.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-C_H-s0cp.js → ReadyMixin-BUpBkgED.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-0Sny7BQc.js → RovingTabindexMixin.stories-DzEH38Tn.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-Ci7CnFM6.js → Rtc.stories-DxQWkudF.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-CSbM9xdE.js → ScrollShadow.stories-DbMdNLKA.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-D-SGY0dL.js → Switch.stories-CvSwuR0Z.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-DXeloL5R.js → Tab.stories-CI6m8NXD.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-KGjrQHnj.js → Tabs.stories-BMat3ubI.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-SjszmCVX.js → Throttle.stories-PEUZoXfI.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-DZty4zmq.js → Tooltip.stories-kDJ5PbGO.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-CoM7bgt1.js → Upload.stories-Bb5KBlh7.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-CRrp-ZTV.js → UploadItem.stories-VZVWc52f.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-lQ_IWtd1.js → Welcome.stories-BgzaFbT1.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-rY-A2yAZ.js → Widget.stories-Bbczy09Q.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-asVkTqyz.js → WithTooltip-65CFNBJE-BoKgPPcr.js} +1 -1
- package/dist/storybook/assets/{blocks-D-cAwpi5.js → blocks-j0yzxuDk.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-CaSK-GPg.js → formatter-EIJCOSYU-B5-4vV2C.js} +1 -1
- package/dist/storybook/assets/if-defined-DBQP12ek.js +1 -0
- package/dist/storybook/assets/iframe-Ce3XRnL4.css +1 -0
- package/dist/storybook/assets/{iframe-DpPeZoRd.js → iframe-DUmd7GbF.js} +86 -86
- package/dist/storybook/assets/{index-Eb_LP-gw.js → index-ACSvfrQi.js} +1 -1
- package/dist/storybook/assets/{onFind-D8gPkhwL.js → onFind-t_5Bmfio.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-C_2tTxBq.js → onFind.stories-CQWcRPFY.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-D-gjr3kA.js → onRemove.stories-B9_DDB2B.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-DGfzNLoX.js → onVisible.stories-G0qjGum_.js} +1 -1
- package/dist/storybook/assets/{style-map-WEdc6AkA.js → style-map-D_jXmlQ4.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CCM2wmJ3.js → syntaxhighlighter-ED5Y7EFY-7_fYNYDB.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-message.d.ts +2 -0
- package/dist/tailwind-plugin-message.d.ts.map +1 -0
- package/dist/tailwind-plugin-message.js +168 -0
- package/dist/tailwind-plugin-message.js.map +1 -0
- package/dist/tailwind-plugin-message.ts +226 -0
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tailwind.config.js +2 -0
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.ts +2 -0
- package/dist/util/EventEmitterMixin.d.ts +3 -0
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/docs/components/Banner.md +49 -0
- package/docs/components/Message.md +75 -0
- package/docs/components/README.md +2 -0
- package/package.json +1 -1
- package/src/legacy/tool-ui/src/ContentInputGroup.css +4 -0
- package/src/legacy/tool-ui/src/Hierarchy.css +4 -11
- package/src/legacy/tool-ui/src/MenuView.css +9 -0
- package/src/legacy/tool-ui/src/Page.css +1 -1
- package/src/legacy/tool-ui/src/PrePublish.ts +0 -24
- package/src/legacy/tool-ui/src/ThemeBundleEditor.css +4 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.da15ce3ce45e85b4880a.js → v4.ba601ff96a3370471a41.js} +3 -3
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.8491d982a282935a3058.js → v5.4cdf07db0213a5d2f97e.js} +3 -3
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.553c18f29cb4a71c3577.css +5 -0
- package/dist/storybook/assets/if-defined-aps73Iby.js +0 -1
- package/dist/storybook/assets/iframe-1F7Ef_8q.css +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.9b40c96064a0f8a10b53.css +0 -5
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.da15ce3ce45e85b4880a.js.LICENSE.txt → v4.ba601ff96a3370471a41.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.8491d982a282935a3058.js.LICENSE.txt → v5.4cdf07db0213a5d2f97e.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,235 @@
|
|
|
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 { EventEmitterMixin } from '../../util/EventEmitterMixin.js';
|
|
10
|
+
import { l10n } from '../../util/i18n.js';
|
|
11
|
+
import onFind from '../../util/onFind.js';
|
|
12
|
+
import { ReadyMixin } from '../../util/ReadyMixin.js';
|
|
13
|
+
import '../icon-button/IconButton.js';
|
|
14
|
+
import '../icon/Icon.js';
|
|
15
|
+
import './Message.css';
|
|
16
|
+
const DEFAULT_ICONS = {
|
|
17
|
+
primary: 'info',
|
|
18
|
+
info: 'info',
|
|
19
|
+
warning: 'triangle-alert',
|
|
20
|
+
error: 'circle-alert',
|
|
21
|
+
success: 'circle-check',
|
|
22
|
+
};
|
|
23
|
+
// Tailwind content scanning requires complete class names (no template literals),
|
|
24
|
+
// so the variant class is looked up from this map instead of being built via
|
|
25
|
+
// string interpolation at runtime.
|
|
26
|
+
const VARIANT_CLASS = {
|
|
27
|
+
primary: 'btu-message-primary',
|
|
28
|
+
info: 'btu-message-info',
|
|
29
|
+
warning: 'btu-message-warning',
|
|
30
|
+
error: 'btu-message-error',
|
|
31
|
+
success: 'btu-message-success',
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A message for communicating high-visibility content that is not tied to the
|
|
35
|
+
* user's current task — alerts, breaking news, and persistent status. Use it on
|
|
36
|
+
* its own as a contained, bordered card, or place it inside a `<btu-banner>` to
|
|
37
|
+
* span the full width of the page (e.g., pinned above the CMS content area).
|
|
38
|
+
*
|
|
39
|
+
* Messages render a leading icon, an optional badge, a label, an optional
|
|
40
|
+
* description, and an optional dismiss control. The label and description
|
|
41
|
+
* stack vertically in a text column; everything else sits on the same row.
|
|
42
|
+
*
|
|
43
|
+
* @element btu-message
|
|
44
|
+
*
|
|
45
|
+
* @slot badge - Pseudo-slot for a leading status/version tag, typically a
|
|
46
|
+
* `<btu-badge>`. The slotted child is moved into the header row, before the
|
|
47
|
+
* label.
|
|
48
|
+
* @slot description - Pseudo-slot for supporting text rendered directly beneath
|
|
49
|
+
* the label. Slot a single inline element (e.g., `<span slot="description">`)
|
|
50
|
+
* or a block element to enable rich content (links, emphasis).
|
|
51
|
+
* @slot actions - Pseudo-slot for CTA buttons, links, or a `<btu-pagination>`.
|
|
52
|
+
* Children with `slot="actions"` are moved into an internal container on the
|
|
53
|
+
* trailing edge of the body. `.btu-button` children inherit the message's
|
|
54
|
+
* foreground color across all states. The message does not emit an
|
|
55
|
+
* action-click event — attach handlers to your own elements.
|
|
56
|
+
*
|
|
57
|
+
* @fires {CustomEvent} btu-message-ready - Fired after the message is first rendered and initialized
|
|
58
|
+
* @fires {CustomEvent} btu-message-dismiss - Fired when the user clicks the close/dismiss button.
|
|
59
|
+
* Cancelable: the message hides itself (sets `hidden`) unless the listener calls `preventDefault()`.
|
|
60
|
+
*
|
|
61
|
+
* @cssprop --message-color-background - Overrides the background color for the message
|
|
62
|
+
* @cssprop --message-color-foreground - Overrides the text and icon color
|
|
63
|
+
* @cssprop --message-color-border - Overrides the border color (defaults to the variant's 300 shade)
|
|
64
|
+
* @cssprop --message-padding - Overrides the internal padding (default: 1rem)
|
|
65
|
+
* @cssprop --message-border-radius - Overrides the corner rounding (default: 8px)
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```html
|
|
69
|
+
* <btu-message variant="info" label="New feature available" dismissible></btu-message>
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```html
|
|
74
|
+
* <btu-message variant="error" label="Something went wrong" dismissible>
|
|
75
|
+
* <span slot="description">We couldn't save your changes. Please try again in a moment.</span>
|
|
76
|
+
* </btu-message>
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```html
|
|
81
|
+
* <btu-message variant="info" label="New feature available" dismissible>
|
|
82
|
+
* <btu-badge slot="badge" variant="info" size="sm">v2.4</btu-badge>
|
|
83
|
+
* <span slot="description">The redesigned editor is now available.</span>
|
|
84
|
+
* <button slot="actions" type="button">Learn more</button>
|
|
85
|
+
* </btu-message>
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export default class Message extends EventEmitterMixin(ReadyMixin(LitElement)) {
|
|
89
|
+
constructor() {
|
|
90
|
+
super(...arguments);
|
|
91
|
+
/**
|
|
92
|
+
* Visual style and semantic meaning of the message.
|
|
93
|
+
* @attr
|
|
94
|
+
*/
|
|
95
|
+
this.variant = 'info';
|
|
96
|
+
/**
|
|
97
|
+
* If true, a close icon is provided to allow the user to hide the message.
|
|
98
|
+
* @attr
|
|
99
|
+
*/
|
|
100
|
+
this.dismissible = false;
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
* Safe, validated variant used for rendering and styling. If the consumer
|
|
104
|
+
* sets an unknown value on `this.variant`, we fall back to `info` here
|
|
105
|
+
* without overwriting the original user input on the element.
|
|
106
|
+
*/
|
|
107
|
+
this._safeVariant = 'info';
|
|
108
|
+
}
|
|
109
|
+
createRenderRoot() {
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
connectedCallback() {
|
|
113
|
+
super.connectedCallback();
|
|
114
|
+
// classList (not a full className rewrite) preserves consumer-added classes.
|
|
115
|
+
this.classList.add('btu-message');
|
|
116
|
+
this.setAttribute('aria-atomic', 'true');
|
|
117
|
+
}
|
|
118
|
+
willUpdate(changedProperties) {
|
|
119
|
+
super.willUpdate(changedProperties);
|
|
120
|
+
if (changedProperties.has('variant')) {
|
|
121
|
+
this._safeVariant = this.variant in VARIANT_CLASS ? this.variant : 'info';
|
|
122
|
+
if (this._safeVariant !== this.variant) {
|
|
123
|
+
console.warn(`[btu-message] Unrecognized variant: "${this.variant}". Falling back to "info".`, this);
|
|
124
|
+
}
|
|
125
|
+
// Re-setting aria-live on every render can re-announce the content in some
|
|
126
|
+
// screen readers, so only update it when the variant changes. error/primary
|
|
127
|
+
// are urgent (assertive); other variants are polite.
|
|
128
|
+
const isAssertive = this._safeVariant === 'error' || this._safeVariant === 'primary';
|
|
129
|
+
this.setAttribute('role', isAssertive ? 'alert' : 'status');
|
|
130
|
+
this.setAttribute('aria-live', isAssertive ? 'assertive' : 'polite');
|
|
131
|
+
// Swap only the variant class; leave all other classes untouched.
|
|
132
|
+
const variantClass = VARIANT_CLASS[this._safeVariant];
|
|
133
|
+
for (const cls of Object.values(VARIANT_CLASS)) {
|
|
134
|
+
if (cls !== variantClass)
|
|
135
|
+
this.classList.remove(cls);
|
|
136
|
+
}
|
|
137
|
+
this.classList.add(variantClass);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
firstUpdated() {
|
|
141
|
+
const hasDescription = !!this.querySelector(':scope > [slot="description"]');
|
|
142
|
+
if (!this.label?.trim() && !hasDescription) {
|
|
143
|
+
console.warn('[btu-message] No label or description provided.', this);
|
|
144
|
+
}
|
|
145
|
+
// Guard the containers instead of asserting non-null, so a future conditional
|
|
146
|
+
// wrapper can't null-deref.
|
|
147
|
+
const badgeContainer = this.querySelector('.btu-message-badge');
|
|
148
|
+
const descriptionContainer = this.querySelector('.btu-message-description');
|
|
149
|
+
const actionsContainer = this.querySelector('.btu-message-actions');
|
|
150
|
+
if (badgeContainer && descriptionContainer && actionsContainer) {
|
|
151
|
+
onFind(this, ':scope > :not([data-message-internal])', el => {
|
|
152
|
+
const slot = el.getAttribute('slot');
|
|
153
|
+
if (slot === 'badge') {
|
|
154
|
+
badgeContainer.appendChild(el);
|
|
155
|
+
}
|
|
156
|
+
else if (slot === 'description') {
|
|
157
|
+
descriptionContainer.appendChild(el);
|
|
158
|
+
this.classList.add('btu-message-has-description');
|
|
159
|
+
}
|
|
160
|
+
else if (slot === 'actions') {
|
|
161
|
+
actionsContainer.appendChild(el);
|
|
162
|
+
}
|
|
163
|
+
else if (slot) {
|
|
164
|
+
console.warn(`[btu-message] Unrecognized slot="${slot}". Valid slots are "badge", "description", and "actions".`, el);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
console.warn('[btu-message] Child element has no slot attribute. Use slot="badge", "description", or "actions".', el);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
this.emit('btu-message-ready');
|
|
172
|
+
}
|
|
173
|
+
_handleDismiss() {
|
|
174
|
+
// Dispatch directly (rather than via `emit`) so the event is cancelable —
|
|
175
|
+
// the default action is to hide the message; consumers can call
|
|
176
|
+
// `preventDefault()` to keep it visible and manage dismissal themselves.
|
|
177
|
+
const event = new CustomEvent('btu-message-dismiss', {
|
|
178
|
+
bubbles: true,
|
|
179
|
+
cancelable: true,
|
|
180
|
+
composed: true,
|
|
181
|
+
});
|
|
182
|
+
if (this.dispatchEvent(event)) {
|
|
183
|
+
this.hidden = true;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
render() {
|
|
187
|
+
const iconName = this.symbol ?? DEFAULT_ICONS[this._safeVariant];
|
|
188
|
+
return html `
|
|
189
|
+
<btu-icon
|
|
190
|
+
class="btu-message-icon"
|
|
191
|
+
symbol="${iconName}"
|
|
192
|
+
size="md"
|
|
193
|
+
aria-hidden="true"
|
|
194
|
+
data-message-internal
|
|
195
|
+
></btu-icon>
|
|
196
|
+
<div class="btu-message-body" data-message-internal>
|
|
197
|
+
<div class="btu-message-text">
|
|
198
|
+
<div class="btu-message-header">
|
|
199
|
+
<div class="btu-message-badge"></div>
|
|
200
|
+
${this.label ? html `<span class="btu-message-label">${this.label}</span>` : nothing}
|
|
201
|
+
</div>
|
|
202
|
+
<div class="btu-message-description"></div>
|
|
203
|
+
</div>
|
|
204
|
+
<div class="btu-message-actions"></div>
|
|
205
|
+
</div>
|
|
206
|
+
${this.dismissible
|
|
207
|
+
? html `<btu-icon-button
|
|
208
|
+
class="btu-message-dismiss"
|
|
209
|
+
symbol="x"
|
|
210
|
+
type="tertiary-clear"
|
|
211
|
+
size="sm"
|
|
212
|
+
aria-label="${l10n('message', 'dismiss', 'Dismiss')}"
|
|
213
|
+
@click=${this._handleDismiss}
|
|
214
|
+
data-message-internal
|
|
215
|
+
></btu-icon-button>`
|
|
216
|
+
: nothing}
|
|
217
|
+
`;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
__decorate([
|
|
221
|
+
property({ type: String, reflect: true })
|
|
222
|
+
], Message.prototype, "variant", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
property({ type: String })
|
|
225
|
+
], Message.prototype, "label", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
property({ type: String })
|
|
228
|
+
], Message.prototype, "symbol", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ type: Boolean, reflect: true })
|
|
231
|
+
], Message.prototype, "dismissible", void 0);
|
|
232
|
+
if (!customElements.get('btu-message')) {
|
|
233
|
+
customElements.define('btu-message', Message);
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=Message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../src/components/banner/Message.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAA;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AACzC,OAAO,MAAM,MAAM,sBAAsB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,8BAA8B,CAAA;A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/banner/Banner.ts",
|
|
1716
|
+
"declarations": [
|
|
1717
|
+
{
|
|
1718
|
+
"kind": "class",
|
|
1719
|
+
"description": "A full-width container that pins a `<btu-message>` to the top of the CMS or a\ncontent edit page. The banner has no content API of its own — compose a\n`<btu-message>` inside it (or several, e.g. for a paginated banner) and the banner\nspans each to 100% of the host, rendering it full-bleed (edge-to-edge, bottom\nborder only, no corner rounding).\n\nSet the content (variant, label, symbol, dismissible, badge/description/actions\nslots) on the message itself. The full-width treatment lives on this wrapper, so\nthe message has no `full-width` attribute — the banner owns that.",
|
|
1720
|
+
"name": "Banner",
|
|
1721
|
+
"cssProperties": [
|
|
1722
|
+
{
|
|
1723
|
+
"description": "Stack order for the banner (default: 100). The banner is `position: relative`, so this always applies; set `position: sticky` to also pin it to the viewport.",
|
|
1724
|
+
"name": "--banner-z-index"
|
|
1725
|
+
}
|
|
1726
|
+
],
|
|
1727
|
+
"slots": [
|
|
1728
|
+
{
|
|
1729
|
+
"description": "One or more `<btu-message>` elements, full-bleed to the host width. With more than one, the banner auto-creates a `<btu-pagination>` and shows one at a time.",
|
|
1730
|
+
"name": ""
|
|
1731
|
+
}
|
|
1732
|
+
],
|
|
1733
|
+
"members": [
|
|
1734
|
+
{
|
|
1735
|
+
"kind": "method",
|
|
1736
|
+
"name": "emit",
|
|
1737
|
+
"parameters": [
|
|
1738
|
+
{
|
|
1739
|
+
"name": "type",
|
|
1740
|
+
"type": {
|
|
1741
|
+
"text": "K"
|
|
1742
|
+
},
|
|
1743
|
+
"description": "Event name from CustomEventMap"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"name": "detail",
|
|
1747
|
+
"optional": true,
|
|
1748
|
+
"type": {
|
|
1749
|
+
"text": "UnpackCustomEvent<CustomEventMap[K]>"
|
|
1750
|
+
},
|
|
1751
|
+
"description": "Optional event detail payload"
|
|
1752
|
+
}
|
|
1753
|
+
],
|
|
1754
|
+
"description": "Dispatches a type-safe CustomEvent with standardized configuration.\n\nAll events are configured with:\n- bubbles: true (event propagates up the DOM tree)\n- cancelable: false (event cannot be cancelled)\n- composed: true (event crosses shadow DOM boundaries)",
|
|
1755
|
+
"return": {
|
|
1756
|
+
"type": {
|
|
1757
|
+
"text": "boolean"
|
|
1758
|
+
}
|
|
1759
|
+
},
|
|
1760
|
+
"inheritedFrom": {
|
|
1761
|
+
"name": "EventEmitterMixin",
|
|
1762
|
+
"module": "src/util/EventEmitterMixin.ts"
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
],
|
|
1766
|
+
"events": [
|
|
1767
|
+
{
|
|
1768
|
+
"type": {
|
|
1769
|
+
"text": "CustomEvent"
|
|
1770
|
+
},
|
|
1771
|
+
"description": "Fired after the banner is first rendered and initialized",
|
|
1772
|
+
"name": "btu-banner-ready"
|
|
1773
|
+
}
|
|
1774
|
+
],
|
|
1775
|
+
"mixins": [
|
|
1776
|
+
{
|
|
1777
|
+
"name": "EventEmitterMixin",
|
|
1778
|
+
"module": "/src/util/EventEmitterMixin.js"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"name": "ReadyMixin",
|
|
1782
|
+
"module": "/src/util/ReadyMixin.js"
|
|
1783
|
+
}
|
|
1784
|
+
],
|
|
1785
|
+
"superclass": {
|
|
1786
|
+
"name": "LitElement",
|
|
1787
|
+
"package": "lit"
|
|
1788
|
+
},
|
|
1789
|
+
"tagName": "btu-banner",
|
|
1790
|
+
"customElement": true
|
|
1791
|
+
}
|
|
1792
|
+
],
|
|
1793
|
+
"exports": [
|
|
1794
|
+
{
|
|
1795
|
+
"kind": "js",
|
|
1796
|
+
"name": "default",
|
|
1797
|
+
"declaration": {
|
|
1798
|
+
"name": "Banner",
|
|
1799
|
+
"module": "src/components/banner/Banner.ts"
|
|
1800
|
+
}
|
|
1801
|
+
},
|
|
1802
|
+
{
|
|
1803
|
+
"kind": "custom-element-definition",
|
|
1804
|
+
"name": "btu-banner",
|
|
1805
|
+
"declaration": {
|
|
1806
|
+
"name": "Banner",
|
|
1807
|
+
"module": "src/components/banner/Banner.ts"
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
]
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
"kind": "javascript-module",
|
|
1814
|
+
"path": "src/components/banner/Message.ts",
|
|
1815
|
+
"declarations": [
|
|
1816
|
+
{
|
|
1817
|
+
"kind": "class",
|
|
1818
|
+
"description": "A message for communicating high-visibility content that is not tied to the\nuser's current task — alerts, breaking news, and persistent status. Use it on\nits own as a contained, bordered card, or place it inside a `<btu-banner>` to\nspan the full width of the page (e.g., pinned above the CMS content area).\n\nMessages render a leading icon, an optional badge, a label, an optional\ndescription, and an optional dismiss control. The label and description\nstack vertically in a text column; everything else sits on the same row.",
|
|
1819
|
+
"name": "Message",
|
|
1820
|
+
"cssProperties": [
|
|
1821
|
+
{
|
|
1822
|
+
"description": "Overrides the background color for the message",
|
|
1823
|
+
"name": "--message-color-background"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"description": "Overrides the text and icon color",
|
|
1827
|
+
"name": "--message-color-foreground"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"description": "Overrides the border color (defaults to the variant's 300 shade)",
|
|
1831
|
+
"name": "--message-color-border"
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"description": "Overrides the internal padding (default: 1rem)",
|
|
1835
|
+
"name": "--message-padding"
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
"description": "Overrides the corner rounding (default: 8px)",
|
|
1839
|
+
"name": "--message-border-radius"
|
|
1840
|
+
}
|
|
1841
|
+
],
|
|
1842
|
+
"slots": [
|
|
1843
|
+
{
|
|
1844
|
+
"description": "Pseudo-slot for a leading status/version tag, typically a `<btu-badge>`. The slotted child is moved into the header row, before the label.",
|
|
1845
|
+
"name": "badge"
|
|
1846
|
+
},
|
|
1847
|
+
{
|
|
1848
|
+
"description": "Pseudo-slot for supporting text rendered directly beneath the label. Slot a single inline element (e.g., `<span slot=\"description\">`) or a block element to enable rich content (links, emphasis).",
|
|
1849
|
+
"name": "description"
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"description": "Pseudo-slot for CTA buttons, links, or a `<btu-pagination>`. Children with `slot=\"actions\"` are moved into an internal container on the trailing edge of the body. `.btu-button` children inherit the message's foreground color across all states. The message does not emit an action-click event — attach handlers to your own elements.",
|
|
1853
|
+
"name": "actions"
|
|
1854
|
+
}
|
|
1855
|
+
],
|
|
1856
|
+
"members": [
|
|
1857
|
+
{
|
|
1858
|
+
"kind": "field",
|
|
1859
|
+
"name": "variant",
|
|
1860
|
+
"type": {
|
|
1861
|
+
"text": "MessageVariant"
|
|
1862
|
+
},
|
|
1863
|
+
"default": "'info'",
|
|
1864
|
+
"description": "Visual style and semantic meaning of the message.",
|
|
1865
|
+
"attribute": "variant",
|
|
1866
|
+
"reflects": true
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
"kind": "field",
|
|
1870
|
+
"name": "label",
|
|
1871
|
+
"type": {
|
|
1872
|
+
"text": "string | undefined"
|
|
1873
|
+
},
|
|
1874
|
+
"description": "The primary message or title text displayed.",
|
|
1875
|
+
"attribute": "label"
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
"kind": "field",
|
|
1879
|
+
"name": "symbol",
|
|
1880
|
+
"type": {
|
|
1881
|
+
"text": "string | undefined"
|
|
1882
|
+
},
|
|
1883
|
+
"description": "Name of the Lucide icon to display. Defaults to a sensible icon per variant.",
|
|
1884
|
+
"attribute": "symbol"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
"kind": "field",
|
|
1888
|
+
"name": "dismissible",
|
|
1889
|
+
"type": {
|
|
1890
|
+
"text": "boolean"
|
|
1891
|
+
},
|
|
1892
|
+
"default": "false",
|
|
1893
|
+
"description": "If true, a close icon is provided to allow the user to hide the message.",
|
|
1894
|
+
"attribute": "dismissible",
|
|
1895
|
+
"reflects": true
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
"kind": "method",
|
|
1899
|
+
"name": "_handleDismiss",
|
|
1900
|
+
"privacy": "private",
|
|
1901
|
+
"return": {
|
|
1902
|
+
"type": {
|
|
1903
|
+
"text": "void"
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
{
|
|
1908
|
+
"kind": "method",
|
|
1909
|
+
"name": "emit",
|
|
1910
|
+
"parameters": [
|
|
1911
|
+
{
|
|
1912
|
+
"name": "type",
|
|
1913
|
+
"type": {
|
|
1914
|
+
"text": "K"
|
|
1915
|
+
},
|
|
1916
|
+
"description": "Event name from CustomEventMap"
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"name": "detail",
|
|
1920
|
+
"optional": true,
|
|
1921
|
+
"type": {
|
|
1922
|
+
"text": "UnpackCustomEvent<CustomEventMap[K]>"
|
|
1923
|
+
},
|
|
1924
|
+
"description": "Optional event detail payload"
|
|
1925
|
+
}
|
|
1926
|
+
],
|
|
1927
|
+
"description": "Dispatches a type-safe CustomEvent with standardized configuration.\n\nAll events are configured with:\n- bubbles: true (event propagates up the DOM tree)\n- cancelable: false (event cannot be cancelled)\n- composed: true (event crosses shadow DOM boundaries)",
|
|
1928
|
+
"return": {
|
|
1929
|
+
"type": {
|
|
1930
|
+
"text": "boolean"
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
1933
|
+
"inheritedFrom": {
|
|
1934
|
+
"name": "EventEmitterMixin",
|
|
1935
|
+
"module": "src/util/EventEmitterMixin.ts"
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
],
|
|
1939
|
+
"events": [
|
|
1940
|
+
{
|
|
1941
|
+
"type": {
|
|
1942
|
+
"text": "CustomEvent"
|
|
1943
|
+
},
|
|
1944
|
+
"description": "Fired after the message is first rendered and initialized",
|
|
1945
|
+
"name": "btu-message-ready"
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
"type": {
|
|
1949
|
+
"text": "CustomEvent"
|
|
1950
|
+
},
|
|
1951
|
+
"description": "Fired when the user clicks the close/dismiss button. Cancelable: the message hides itself (sets `hidden`) unless the listener calls `preventDefault()`.",
|
|
1952
|
+
"name": "btu-message-dismiss"
|
|
1953
|
+
}
|
|
1954
|
+
],
|
|
1955
|
+
"attributes": [
|
|
1956
|
+
{
|
|
1957
|
+
"name": "variant",
|
|
1958
|
+
"type": {
|
|
1959
|
+
"text": "MessageVariant"
|
|
1960
|
+
},
|
|
1961
|
+
"default": "'info'",
|
|
1962
|
+
"description": "Visual style and semantic meaning of the message.",
|
|
1963
|
+
"fieldName": "variant",
|
|
1964
|
+
"attribute": "variant"
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"name": "label",
|
|
1968
|
+
"type": {
|
|
1969
|
+
"text": "string | undefined"
|
|
1970
|
+
},
|
|
1971
|
+
"description": "The primary message or title text displayed.",
|
|
1972
|
+
"fieldName": "label",
|
|
1973
|
+
"attribute": "label"
|
|
1974
|
+
},
|
|
1975
|
+
{
|
|
1976
|
+
"name": "symbol",
|
|
1977
|
+
"type": {
|
|
1978
|
+
"text": "string | undefined"
|
|
1979
|
+
},
|
|
1980
|
+
"description": "Name of the Lucide icon to display. Defaults to a sensible icon per variant.",
|
|
1981
|
+
"fieldName": "symbol",
|
|
1982
|
+
"attribute": "symbol"
|
|
1983
|
+
},
|
|
1984
|
+
{
|
|
1985
|
+
"name": "dismissible",
|
|
1986
|
+
"type": {
|
|
1987
|
+
"text": "boolean"
|
|
1988
|
+
},
|
|
1989
|
+
"default": "false",
|
|
1990
|
+
"description": "If true, a close icon is provided to allow the user to hide the message.",
|
|
1991
|
+
"fieldName": "dismissible",
|
|
1992
|
+
"attribute": "dismissible"
|
|
1993
|
+
}
|
|
1994
|
+
],
|
|
1995
|
+
"mixins": [
|
|
1996
|
+
{
|
|
1997
|
+
"name": "EventEmitterMixin",
|
|
1998
|
+
"module": "/src/util/EventEmitterMixin.js"
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
"name": "ReadyMixin",
|
|
2002
|
+
"module": "/src/util/ReadyMixin.js"
|
|
2003
|
+
}
|
|
2004
|
+
],
|
|
2005
|
+
"superclass": {
|
|
2006
|
+
"name": "LitElement",
|
|
2007
|
+
"package": "lit"
|
|
2008
|
+
},
|
|
2009
|
+
"tagName": "btu-message",
|
|
2010
|
+
"customElement": true
|
|
2011
|
+
}
|
|
2012
|
+
],
|
|
2013
|
+
"exports": [
|
|
2014
|
+
{
|
|
2015
|
+
"kind": "js",
|
|
2016
|
+
"name": "default",
|
|
2017
|
+
"declaration": {
|
|
2018
|
+
"name": "Message",
|
|
2019
|
+
"module": "src/components/banner/Message.ts"
|
|
2020
|
+
}
|
|
2021
|
+
},
|
|
2022
|
+
{
|
|
2023
|
+
"kind": "custom-element-definition",
|
|
2024
|
+
"name": "btu-message",
|
|
2025
|
+
"declaration": {
|
|
2026
|
+
"name": "Message",
|
|
2027
|
+
"module": "src/components/banner/Message.ts"
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
]
|
|
2031
|
+
},
|
|
1713
2032
|
{
|
|
1714
2033
|
"kind": "javascript-module",
|
|
1715
2034
|
"path": "src/components/button-group/ButtonGroup.ts",
|
package/dist/storybook/assets/{ActionBar.stories-1Iqfy4PV.js → ActionBar.stories-BJcrfF0X.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as p,x as e}from"./iframe-
|
|
1
|
+
import{g as p,x as e}from"./iframe-DUmd7GbF.js";import{o as u}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:y,args:v,argTypes:a}=p("btu-action-bar"),x={title:"Components/Action Bar",component:"btu-action-bar",tags:["autodocs"],parameters:{docs:{subtitle:"A persistent container for primary, secondary, tertiary, and destructive actions",description:{component:`
|
|
2
2
|
ActionBar provides a horizontal bar for grouping action buttons, typically anchored to the bottom of a view.
|
|
3
3
|
|
|
4
4
|
<h3>Two-Zone Layout:</h3>
|
package/dist/storybook/assets/{ActionItem.stories-DjKyE7m_.js → ActionItem.stories-xLR-VN2Q.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as d,x as a}from"./iframe-
|
|
1
|
+
import{g as d,x as a}from"./iframe-DUmd7GbF.js";import{o as b}from"./style-map-D_jXmlQ4.js";import"./preload-helper-PPVm8Dsz.js";const{events:m,args:u,argTypes:e}=d("btu-action-item"),g={title:"Components/Action Bar/Action Item",component:"btu-action-item",tags:["autodocs"],parameters:{docs:{subtitle:"A button element for use within an ActionBar",description:{component:`
|
|
2
2
|
ActionItem renders a styled button using existing \`btu-button-*\` classes. It supports four visual variants — primary, secondary, tertiary, and destructive — along with optional icons, icon-only mode, loading state, and disabled state.
|
|
3
3
|
|
|
4
4
|
<h3>Standalone vs. Inside ActionBar:</h3>
|