@brightspot/ui 5.5.0 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ai-sparkle/AiSparkle.d.ts +66 -0
- package/dist/components/ai-sparkle/AiSparkle.d.ts.map +1 -0
- package/dist/components/ai-sparkle/AiSparkle.js +190 -0
- package/dist/components/ai-sparkle/AiSparkle.js.map +1 -0
- package/dist/components/ai-sparkle/animations/ai-sparkle.json +1 -0
- package/dist/custom-elements.json +234 -0
- package/dist/storybook/assets/{ActionBar.stories-BwKZ8jTT.js → ActionBar.stories-BcwPhWTp.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-Df3verWG.js → ActionItem.stories-By6op0BA.js} +1 -1
- package/dist/storybook/assets/AiSparkle.stories-C6pbkiaj.js +72 -0
- package/dist/storybook/assets/{Avatar.stories-Bghlkr3H.js → Avatar.stories-CoN9BeMg.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-CzeWxUTU.js → AvatarGroup.stories-CDtAKpp7.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-BT5lSPGT.js → Badge.stories-Ba4aSN2L.js} +1 -1
- package/dist/storybook/assets/{Banner.stories-BjFdFSa4.js → Banner.stories-SWy-GP0E.js} +1 -1
- package/dist/storybook/assets/{Button-D180UbjB.js → Button-B2GtGOY8.js} +1 -1
- package/dist/storybook/assets/{Button.stories-CrSX4UIL.js → Button.stories-DxwUc2WJ.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-BFObAokB.js → ButtonGroup.stories-C_ifrkC4.js} +1 -1
- package/dist/storybook/assets/{Card.stories-DuSjN2D2.js → Card.stories-F_mniaVn.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-BWO2srfl.js → Celebrate.stories-DVsxThX4.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-BMfILOzR.js → Checkbox.stories-DKJoUdxG.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-Dc8zPUpU.js → CircularProgress.stories-Pkwfd77c.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-CAjaKg7r.js → ClipboardMixin.stories-a2gktsoh.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-BtiyepW3.js → Color-6BZIO3FS-CCCBnCm6.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-Dw2fTxL_.js → Colors.stories-CNz6eg3K.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-B5sQuyyD.js → CombinedEffects.stories-4jdfRqZE.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-iTkOii8_.js → ComponentStatesMixin-B7XkFXgp.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-Bf1PGTh8.js → ComponentStatesMixin.stories-BJ3ZqyXI.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-DyDVRVId.js → CopyToClipboard.stories-D6bMqU-q.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-_1QyhRvo.js → Debounce.stories-DhoqLX4y.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-mX98SSbE.js → DocsRenderer-LL677BLK-BYjEnPrT.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-CauEwIiv.js → Dropdown.stories-L_Z9aO7x.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-C-UcFH2P.js → EmptyState.stories-BSLvm3b3.js} +1 -1
- package/dist/storybook/assets/{EscaAvatar.stories-CrL2Tdi3.js → EscaAvatar.stories-CSFvomuS.js} +1 -1
- package/dist/storybook/assets/{Events.stories-ClUoOf2J.js → Events.stories-mlD9cGXl.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-CqDURuaf.js → Heading.stories-CeltMZBW.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-DJQOCvrv.js → HueRipple.stories-D6oOT5mx.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-WOCYLVIC.js → Icon.stories-DLZkdPX9.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-uIuDW2Jc.js → IconButton.stories-DvZli4HK.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-CQZWZ94q.js → LinearProgress.stories-DcFalhI-.js} +1 -1
- package/dist/storybook/assets/{Message.stories-DqD-EjEb.js → Message.stories-PNFAOkz4.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin.stories-DYrj1tfl.js → OnFindMixin.stories-D23Ao9By.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-IvkB8_RP.js → Pagination.stories-xdBz75X-.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-yeJxuJ_x.js → Popover.stories-D3XhSzT6.js} +1 -1
- package/dist/storybook/assets/{ReadyMixin-B0XVzdH2.js → ReadyMixin-rEChco5O.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-JKJXpQ1a.js → RovingTabindexMixin.stories-DeNfRaNO.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-DfWQtLoI.js → Rtc.stories-D1gY4S_b.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-DD_jQZ5k.js → ScrollShadow.stories-_G3D0pCc.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-BC35M81K.js → Switch.stories-DGohQ8pW.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-Cy-KbsOG.js → Tab.stories-DSLwNhta.js} +1 -1
- package/dist/storybook/assets/{Tabs.stories-CvhLvl1p.js → Tabs.stories-Cyrpryu9.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-nU7jf9yB.js → Throttle.stories-CqX5SmUI.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-BT6j1z87.js → Tooltip.stories-BQoBH6id.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-DaF5wY54.js → Upload.stories-DU_6vIjx.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-CC8wtYPQ.js → UploadItem.stories-KcYrFAxk.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-DAp73cbU.js → Welcome.stories-OD3NhqCu.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-Ce_Ni_Rc.js → Widget.stories-_E8gZ37q.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-Bkacmhfv.js → WithTooltip-65CFNBJE-i1BxKTdF.js} +1 -1
- package/dist/storybook/assets/{blocks-CBDAfSKn.js → blocks-BqMMHYPv.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-BVbGt3s2.js → formatter-EIJCOSYU-Bw1O6PwW.js} +1 -1
- package/dist/storybook/assets/if-defined-CvGEL0gQ.js +1 -0
- package/dist/storybook/assets/{iframe-Dvs8mbFG.js → iframe-BsOwdi_g.js} +135 -135
- package/dist/storybook/assets/{index-DPIbqAS7.js → index-BhXD9uil.js} +1 -1
- package/dist/storybook/assets/{onFind-DLwO1HNO.js → onFind-C3lkFNdJ.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-Dq-zkOGi.js → onFind.stories-DdjhyHcg.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-gd3ki21J.js → onRemove.stories-ClAAbD4Y.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-5WTX6gRk.js → onVisible.stories-tTpm9eku.js} +1 -1
- package/dist/storybook/assets/{style-map-K0t_tOsq.js → style-map-cpVeTpyC.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-AnjtyXja.js → syntaxhighlighter-ED5Y7EFY-LmzzJIPF.js} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/util/EventEmitterMixin.d.ts +1 -0
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/docs/components/AiSparkle.md +70 -0
- package/docs/components/README.md +1 -0
- package/package.json +1 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.ebbbe25f838d4265081e.js → v4.8e8117e9ff9cf0df81c7.js} +2 -2
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.0c31b1ef75a387820deb.js → v5.c2a71fa443dcb2d49dd8.js} +2 -2
- package/dist/storybook/assets/if-defined-B4TUfCpr.js +0 -1
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.ebbbe25f838d4265081e.js.LICENSE.txt → v4.8e8117e9ff9cf0df81c7.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.0c31b1ef75a387820deb.js.LICENSE.txt → v5.c2a71fa443dcb2d49dd8.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/** Size scale, mirroring `<btu-avatar>` / `<btu-esca-avatar>` (LESSONS-NAMING §1). */
|
|
3
|
+
export type AiSparkleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
declare const AiSparkle_base: (new (...args: any[]) => import("../../util/EventEmitterMixin.js").EventEmitterMixinInterface) & (new (...args: any[]) => import("../../util/ReadyMixin.js").ReadyMixinInterface) & typeof LitElement;
|
|
5
|
+
/**
|
|
6
|
+
* The animated AI-branding sparkle. Drive it with the `playing` boolean: `true` loops the clip to
|
|
7
|
+
* draw the eye to an AI entry point, `false` freezes the full sparkle so it reads as a static brand
|
|
8
|
+
* mark once the surface it advertises is engaged. Reduced-motion users always get the frozen frame.
|
|
9
|
+
*
|
|
10
|
+
* Decorative by default (`aria-hidden="true"`, set only when absent) — the control it sits in owns
|
|
11
|
+
* the accessible name.
|
|
12
|
+
*
|
|
13
|
+
* @element btu-ai-sparkle
|
|
14
|
+
*
|
|
15
|
+
* @fires {CustomEvent} btu-ai-sparkle-ready - Fired after the first render
|
|
16
|
+
*
|
|
17
|
+
* @cssprop --ai-sparkle-size - Width and height of the sparkle; overrides the `size` attribute (default: 2.5rem)
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <btu-ai-sparkle></btu-ai-sparkle>
|
|
22
|
+
* <btu-ai-sparkle size="lg"></btu-ai-sparkle>
|
|
23
|
+
* <btu-ai-sparkle playing style="--ai-sparkle-size: 20px"></btu-ai-sparkle>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export default class AiSparkle extends AiSparkle_base {
|
|
27
|
+
/**
|
|
28
|
+
* Whether the sparkle animates; otherwise it holds the last (fully-formed) frame. Opt-in
|
|
29
|
+
* (default `false`) like `autoplay`: a boolean defaulting to `true` can't be cleared by attribute
|
|
30
|
+
* absence. The converter also treats `playing="false"` as paused (a plain `type: Boolean` would
|
|
31
|
+
* read any present value, even "false", as `true`).
|
|
32
|
+
* @attr
|
|
33
|
+
*/
|
|
34
|
+
playing: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Size of the sparkle, mirroring `<btu-avatar>`'s scale. `--ai-sparkle-size` overrides it.
|
|
37
|
+
* @attr
|
|
38
|
+
*/
|
|
39
|
+
size: AiSparkleSize;
|
|
40
|
+
private _containerRef;
|
|
41
|
+
private _animation;
|
|
42
|
+
private _loaded;
|
|
43
|
+
private _loadToken;
|
|
44
|
+
private _reduceMotion;
|
|
45
|
+
private _visible;
|
|
46
|
+
private _resizeObserver?;
|
|
47
|
+
private _intersectionObserver?;
|
|
48
|
+
private _motionQuery?;
|
|
49
|
+
createRenderRoot(): this;
|
|
50
|
+
connectedCallback(): void;
|
|
51
|
+
disconnectedCallback(): void;
|
|
52
|
+
firstUpdated(changed: Map<PropertyKey, unknown>): void;
|
|
53
|
+
updated(changed: Map<PropertyKey, unknown>): void;
|
|
54
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
55
|
+
private _applySize;
|
|
56
|
+
private _onMotionChange;
|
|
57
|
+
private _build;
|
|
58
|
+
private _sync;
|
|
59
|
+
}
|
|
60
|
+
declare global {
|
|
61
|
+
interface HTMLElementTagNameMap {
|
|
62
|
+
'btu-ai-sparkle': AiSparkle;
|
|
63
|
+
}
|
|
64
|
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@@
|
|
|
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 } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { createRef, ref } from 'lit/directives/ref.js';
|
|
10
|
+
import { EventEmitterMixin } from '../../util/EventEmitterMixin.js';
|
|
11
|
+
import { ReadyMixin } from '../../util/ReadyMixin.js';
|
|
12
|
+
// Load the animation data on demand so importing the component doesn't eagerly pull the clip.
|
|
13
|
+
const loadData = () => import('./animations/ai-sparkle.json').then(m => m.default);
|
|
14
|
+
// SVG renderer (not canvas like btu-esca-avatar): the sparkle is pure vector, so SVG stays crisp at
|
|
15
|
+
// any size and clips the nested comp exactly — the canvas renderer leaves a faint 1px clip edge.
|
|
16
|
+
let lottiePlayer;
|
|
17
|
+
const loadLottie = () => (lottiePlayer ??= import('lottie-web/build/player/lottie_svg.js'));
|
|
18
|
+
// Public size key → rendered box.
|
|
19
|
+
const SIZE_REM = {
|
|
20
|
+
xs: '1.5rem',
|
|
21
|
+
sm: '2.25rem',
|
|
22
|
+
md: '2.5rem',
|
|
23
|
+
lg: '3rem',
|
|
24
|
+
xl: '3.5rem',
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The animated AI-branding sparkle. Drive it with the `playing` boolean: `true` loops the clip to
|
|
28
|
+
* draw the eye to an AI entry point, `false` freezes the full sparkle so it reads as a static brand
|
|
29
|
+
* mark once the surface it advertises is engaged. Reduced-motion users always get the frozen frame.
|
|
30
|
+
*
|
|
31
|
+
* Decorative by default (`aria-hidden="true"`, set only when absent) — the control it sits in owns
|
|
32
|
+
* the accessible name.
|
|
33
|
+
*
|
|
34
|
+
* @element btu-ai-sparkle
|
|
35
|
+
*
|
|
36
|
+
* @fires {CustomEvent} btu-ai-sparkle-ready - Fired after the first render
|
|
37
|
+
*
|
|
38
|
+
* @cssprop --ai-sparkle-size - Width and height of the sparkle; overrides the `size` attribute (default: 2.5rem)
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```html
|
|
42
|
+
* <btu-ai-sparkle></btu-ai-sparkle>
|
|
43
|
+
* <btu-ai-sparkle size="lg"></btu-ai-sparkle>
|
|
44
|
+
* <btu-ai-sparkle playing style="--ai-sparkle-size: 20px"></btu-ai-sparkle>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export default class AiSparkle extends EventEmitterMixin(ReadyMixin(LitElement)) {
|
|
48
|
+
constructor() {
|
|
49
|
+
super(...arguments);
|
|
50
|
+
/**
|
|
51
|
+
* Whether the sparkle animates; otherwise it holds the last (fully-formed) frame. Opt-in
|
|
52
|
+
* (default `false`) like `autoplay`: a boolean defaulting to `true` can't be cleared by attribute
|
|
53
|
+
* absence. The converter also treats `playing="false"` as paused (a plain `type: Boolean` would
|
|
54
|
+
* read any present value, even "false", as `true`).
|
|
55
|
+
* @attr
|
|
56
|
+
*/
|
|
57
|
+
this.playing = false;
|
|
58
|
+
/**
|
|
59
|
+
* Size of the sparkle, mirroring `<btu-avatar>`'s scale. `--ai-sparkle-size` overrides it.
|
|
60
|
+
* @attr
|
|
61
|
+
*/
|
|
62
|
+
this.size = 'md';
|
|
63
|
+
this._containerRef = createRef();
|
|
64
|
+
this._animation = null;
|
|
65
|
+
this._loaded = false;
|
|
66
|
+
this._loadToken = 0;
|
|
67
|
+
this._reduceMotion = false;
|
|
68
|
+
this._visible = true;
|
|
69
|
+
this._onMotionChange = (event) => {
|
|
70
|
+
this._reduceMotion = event.matches;
|
|
71
|
+
this._sync();
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
createRenderRoot() {
|
|
75
|
+
return this;
|
|
76
|
+
}
|
|
77
|
+
connectedCallback() {
|
|
78
|
+
super.connectedCallback();
|
|
79
|
+
if (!this.hasAttribute('aria-hidden'))
|
|
80
|
+
this.setAttribute('aria-hidden', 'true');
|
|
81
|
+
if (!this.style.display)
|
|
82
|
+
this.style.display = 'inline-block';
|
|
83
|
+
this._applySize();
|
|
84
|
+
this._motionQuery = window.matchMedia?.('(prefers-reduced-motion: reduce)');
|
|
85
|
+
this._reduceMotion = this._motionQuery?.matches ?? false;
|
|
86
|
+
this._motionQuery?.addEventListener('change', this._onMotionChange);
|
|
87
|
+
}
|
|
88
|
+
disconnectedCallback() {
|
|
89
|
+
super.disconnectedCallback();
|
|
90
|
+
this._resizeObserver?.disconnect();
|
|
91
|
+
this._resizeObserver = undefined;
|
|
92
|
+
this._intersectionObserver?.disconnect();
|
|
93
|
+
this._intersectionObserver = undefined;
|
|
94
|
+
this._motionQuery?.removeEventListener('change', this._onMotionChange);
|
|
95
|
+
// Invalidate any in-flight _build() so it exits instead of creating a leaked, orphaned animation.
|
|
96
|
+
this._loadToken++;
|
|
97
|
+
this._animation?.destroy();
|
|
98
|
+
this._animation = null;
|
|
99
|
+
}
|
|
100
|
+
firstUpdated(changed) {
|
|
101
|
+
super.firstUpdated(changed);
|
|
102
|
+
// Keep the art fitted to the host box as it resizes.
|
|
103
|
+
this._resizeObserver = new ResizeObserver(() => this._animation?.resize());
|
|
104
|
+
this._resizeObserver.observe(this);
|
|
105
|
+
this._intersectionObserver = new IntersectionObserver(([entry]) => {
|
|
106
|
+
this._visible = entry.isIntersecting;
|
|
107
|
+
// Art sized while the host had no layout box (a hidden panel) renders blank; re-fit it once
|
|
108
|
+
// it's on-screen.
|
|
109
|
+
if (this._visible)
|
|
110
|
+
this._animation?.resize();
|
|
111
|
+
// Don't burn a rAF loop for a sparkle that's scrolled out of view.
|
|
112
|
+
this._sync();
|
|
113
|
+
});
|
|
114
|
+
this._intersectionObserver.observe(this);
|
|
115
|
+
void this._build();
|
|
116
|
+
this.emit('btu-ai-sparkle-ready');
|
|
117
|
+
}
|
|
118
|
+
updated(changed) {
|
|
119
|
+
super.updated(changed);
|
|
120
|
+
if (changed.has('playing'))
|
|
121
|
+
this._sync();
|
|
122
|
+
if (changed.has('size'))
|
|
123
|
+
this._applySize();
|
|
124
|
+
}
|
|
125
|
+
render() {
|
|
126
|
+
return html `<div ${ref(this._containerRef)} style="width: 100%; height: 100%"></div>`;
|
|
127
|
+
}
|
|
128
|
+
_applySize() {
|
|
129
|
+
const fallback = SIZE_REM[this.size] ?? SIZE_REM.md;
|
|
130
|
+
// `--ai-sparkle-size` still wins when a consumer sets it.
|
|
131
|
+
this.style.width = `var(--ai-sparkle-size, ${fallback})`;
|
|
132
|
+
this.style.height = `var(--ai-sparkle-size, ${fallback})`;
|
|
133
|
+
}
|
|
134
|
+
async _build() {
|
|
135
|
+
// The element can disconnect while the player and data load; a stale token means it did, so
|
|
136
|
+
// bail rather than create an animation nothing will ever destroy.
|
|
137
|
+
const token = ++this._loadToken;
|
|
138
|
+
const [{ default: lottie }, data] = await Promise.all([loadLottie(), loadData()]);
|
|
139
|
+
const container = this._containerRef.value;
|
|
140
|
+
if (token !== this._loadToken || !container || this._animation)
|
|
141
|
+
return;
|
|
142
|
+
const animation = lottie.loadAnimation({
|
|
143
|
+
container,
|
|
144
|
+
renderer: 'svg',
|
|
145
|
+
loop: true,
|
|
146
|
+
autoplay: false,
|
|
147
|
+
animationData: structuredClone(data),
|
|
148
|
+
});
|
|
149
|
+
// getDuration() and goToAndStop() need the data parsed; do the first sync only once loaded so a
|
|
150
|
+
// static sparkle freezes on its true last frame rather than frame 0.
|
|
151
|
+
animation.addEventListener('DOMLoaded', () => {
|
|
152
|
+
this._loaded = true;
|
|
153
|
+
animation.resize();
|
|
154
|
+
this._sync();
|
|
155
|
+
});
|
|
156
|
+
this._animation = animation;
|
|
157
|
+
}
|
|
158
|
+
_sync() {
|
|
159
|
+
const animation = this._animation;
|
|
160
|
+
if (!animation || !this._loaded)
|
|
161
|
+
return;
|
|
162
|
+
if (!this.playing || this._reduceMotion) {
|
|
163
|
+
const lastFrame = Math.max(0, animation.getDuration(true) - 1);
|
|
164
|
+
animation.goToAndStop(lastFrame, true);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (this._visible) {
|
|
168
|
+
animation.play();
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
animation.pause();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
__decorate([
|
|
176
|
+
property({
|
|
177
|
+
reflect: true,
|
|
178
|
+
converter: {
|
|
179
|
+
fromAttribute: value => value !== null && value !== 'false',
|
|
180
|
+
toAttribute: value => (value ? '' : null),
|
|
181
|
+
},
|
|
182
|
+
})
|
|
183
|
+
], AiSparkle.prototype, "playing", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
property({ type: String, reflect: true })
|
|
186
|
+
], AiSparkle.prototype, "size", void 0);
|
|
187
|
+
if (!customElements.get('btu-ai-sparkle')) {
|
|
188
|
+
customElements.define('btu-ai-sparkle', AiSparkle);
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=AiSparkle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiSparkle.js","sourceRoot":"","sources":["../../../src/components/ai-sparkle/AiSparkle.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,GAAG,EAAY,MAAM,uBAAuB,CAAA;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,UAAU,EAAE,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S,CAAC,IAAI,EAAE,CAAA;QAClB,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,KAAK,EAAE,CAAA;QACnB,CAAC;IACH,CAAC;CACF;AAtIC;IAPC,QAAQ,CAAC;QACR,OAAO,EAAE,IAAI;QACb,SAAS,EAAE;YACT,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,OAAO;YAC3D,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAC1C;KACF,CAAC;0CACa;AAOf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAChB;AAiI5B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;IAC1C,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;AACpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "nm": "AI_sparkle-icon", "ddd": 0, "h": 400, "w": 400, "meta": { "g": "@lottiefiles/toolkit-js 0.71.10" }, "layers": [{ "ty": 0, "nm": "Pre-comp 1", "sr": 1, "st": 0, "op": 240, "ip": 0, "ln": "36", "hasMask": false, "ao": 0, "ks": { "a": { "a": 0, "k": [91, 88.5] }, "s": { "a": 0, "k": [100, 100] }, "p": { "a": 0, "k": [200, 200] }, "r": { "a": 0, "k": 0 }, "sa": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }, "w": 182, "h": 177, "refId": "1", "tm": { "a": 1, "k": [{ "o": { "x": 0.167, "y": 0.167 }, "i": { "x": 0.833, "y": 0.833 }, "s": [0], "t": 0 }, { "o": { "x": 0.167, "y": 0.167 }, "i": { "x": 0.833, "y": 0.833 }, "s": [2.5], "t": 45 }, { "o": { "x": 0.167, "y": 0.167 }, "i": { "x": 0.833, "y": 0.833 }, "s": [0], "t": 89.999 }, { "s": [2.5], "t": 134.999 }] }, "ind": 1 }], "v": "5.7.0", "fr": 30, "op": 135, "ip": 0, "assets": [{ "nm": "Pre-comp 1", "id": "1", "fr": 30, "layers": [{ "ty": 4, "nm": "Shape Layer 1", "sr": 1, "st": 0, "op": 240, "ip": 0, "ln": "24", "tt": 1, "hasMask": false, "ao": 0, "ks": { "a": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [121.239, 135.053] }, "p": { "a": 0, "k": [91, 88.5] }, "r": { "a": 1, "k": [{ "o": { "x": 0.265, "y": 0 }, "i": { "x": 0.531, "y": 1 }, "s": [0], "t": 0 }, { "s": [360], "t": 74.999 }] }, "sa": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }, "shapes": [{ "ty": "gr", "nm": "Rectangle 1", "it": [{ "ty": "rc", "nm": "Rectangle Path 1", "d": 1, "p": { "a": 0, "k": [0, 0] }, "r": { "a": 0, "k": 0 }, "s": { "a": 0, "k": [51.479, 182.207] } }, { "ty": "gf", "nm": "Gradient Fill 1", "e": { "a": 0, "k": [-0.316, -64.664] }, "g": { "p": 3, "k": { "a": 0, "k": [0, 0.92941183, 0.13725491, 0.14509805, 0.518, 0.964705915, 0.46274513999999994, 0.15294118500000004, 1, 1, 0.78823537, 0.16078432] } }, "t": 1, "a": { "a": 0, "k": 0 }, "h": { "a": 0, "k": 0 }, "s": { "a": 0, "k": [-0.641, 33.568] }, "r": 1, "o": { "a": 0, "k": 100 } }, { "ty": "tr", "a": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [402.719, 101.264] }, "p": { "a": 0, "k": [-5.774, -0.029] }, "r": { "a": 0, "k": 0 }, "sa": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }] }], "ind": 1, "tp": 2 }, { "ty": 2, "nm": "Layer 1", "sr": 1, "st": 0, "op": 240, "ip": 0, "ln": "23", "hasMask": false, "td": 1, "ao": 0, "ks": { "a": { "a": 0, "k": [81.337, 81.672] }, "s": { "a": 0, "k": [100, 100] }, "p": { "a": 0, "k": [90.064, 87.517] }, "r": { "a": 0, "k": 0 }, "sa": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }, "refId": "2", "ind": 2 }] }, { "id": "2", "e": 1, "w": 163, "h": 164, "p": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACkCAYAAAD7aZ44AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAMfklEQVR4nO2d7XXbuBKGB3vyP+4g2griDi5uBVEH0a1g3cFqO/BWcJkOnAoWruDaFUTuwKrgvT8A2hRNihjik+Q85+g4VoYAKL8ChsMZUJEwGwA7Itp13joppU5FBiNsDwA3AI4AThjmCcBd6XEKKwfAHsDriAiHRHlbeszCCnFC5PIqghSiAmDHmBH7nADclD6HJfBb6QEshCMRfZ557BciEh/SA1V6ALUDe8X8K7CZs1JKZscJZGacZh+hjc/iO04jYpxGR2onhqiL4nznewDGvR4A6NLj2gwBFy59TOlzCQHA4cpn8VB6fKsHwG0kIQIASp/PXDw/h/vQfmSZvo6O2RiWu6QdPWz+gL3Ym42I8Tq68vZy8c3TLsgvFjFeR1feXm0Eha9EjCO4JXVuoHuMf0Vub1WIGMfRDNsXX0MAiw/xpELEOI5m2DaJ2t0UIsZxfJfUFxIxRkHEOAAzBGNcdrfvUv0VksUziIhxGM2wNe4n5y4Ep/3NIGIcRjNsTe9n7PY3g4ixh1tCvf3FTgGWYXSjGbabQcT4Ec2wNe0/lFKvRPTseZz4jQN8Kj2ACtEMWzPw+1dGP9mzXdyXYE+XJbax0ACODPsHpdRTgnGsA9iqPl9uesdyiraaAufGqW7MRQNZJT4CWxPty4dvNPP4U+Zz0xyFZKYhEp+xj2bYmv4bTL/xCwJTrpgE5xsm5DsALWK8RDNszcj71cUbneh9fdlS7EWMl2iGrWG+H9pfCLtM/YRwK2J0M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v6/ISFwRDXK1O8pvS51Yos0+MYT7vPxNvYyrfdzSFiHMcwbDklBpK/OIJs1zsCeFst+3JWSi3yZkAOZGYcwW2ZF5LRPoSJ3N6qEDFeJ/aSaiK3typEjNcxlbe3KsRnvAJsVs6vSM2JvziBzIxXcFufxNrEwERqZ7WIGKcxlbWzWkSM05hI7Uh8UQgD/PrwIaTEwAOZGSdwJax/BzYjJQZCHNzsyKn66yLLsxAX2Mwc7lMenrDQWiChcmBLC3yrBxsRopAc2JLUoaeyvqKSZ9wsEbkDEwhsds8NVfyw96Xwf4JAt42a0//3AAAAAElFTkSuQmCC", "u": "" }] }
|
|
@@ -876,6 +876,240 @@
|
|
|
876
876
|
}
|
|
877
877
|
]
|
|
878
878
|
},
|
|
879
|
+
{
|
|
880
|
+
"kind": "javascript-module",
|
|
881
|
+
"path": "src/components/ai-sparkle/AiSparkle.ts",
|
|
882
|
+
"declarations": [
|
|
883
|
+
{
|
|
884
|
+
"kind": "class",
|
|
885
|
+
"description": "The animated AI-branding sparkle. Drive it with the `playing` boolean: `true` loops the clip to\ndraw the eye to an AI entry point, `false` freezes the full sparkle so it reads as a static brand\nmark once the surface it advertises is engaged. Reduced-motion users always get the frozen frame.\n\nDecorative by default (`aria-hidden=\"true\"`, set only when absent) — the control it sits in owns\nthe accessible name.",
|
|
886
|
+
"name": "AiSparkle",
|
|
887
|
+
"cssProperties": [
|
|
888
|
+
{
|
|
889
|
+
"description": "Width and height of the sparkle; overrides the `size` attribute (default: 2.5rem)",
|
|
890
|
+
"name": "--ai-sparkle-size"
|
|
891
|
+
}
|
|
892
|
+
],
|
|
893
|
+
"members": [
|
|
894
|
+
{
|
|
895
|
+
"kind": "field",
|
|
896
|
+
"name": "playing",
|
|
897
|
+
"type": {
|
|
898
|
+
"text": "boolean"
|
|
899
|
+
},
|
|
900
|
+
"default": "false",
|
|
901
|
+
"description": "Whether the sparkle animates; otherwise it holds the last (fully-formed) frame. Opt-in\n(default `false`) like `autoplay`: a boolean defaulting to `true` can't be cleared by attribute\nabsence. The converter also treats `playing=\"false\"` as paused (a plain `type: Boolean` would\nread any present value, even \"false\", as `true`).",
|
|
902
|
+
"attribute": "playing",
|
|
903
|
+
"reflects": true
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"kind": "field",
|
|
907
|
+
"name": "size",
|
|
908
|
+
"type": {
|
|
909
|
+
"text": "AiSparkleSize"
|
|
910
|
+
},
|
|
911
|
+
"default": "'md'",
|
|
912
|
+
"description": "Size of the sparkle, mirroring `<btu-avatar>`'s scale. `--ai-sparkle-size` overrides it.",
|
|
913
|
+
"attribute": "size",
|
|
914
|
+
"reflects": true
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"kind": "field",
|
|
918
|
+
"name": "_containerRef",
|
|
919
|
+
"type": {
|
|
920
|
+
"text": "Ref<HTMLDivElement>"
|
|
921
|
+
},
|
|
922
|
+
"privacy": "private"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"kind": "field",
|
|
926
|
+
"name": "_animation",
|
|
927
|
+
"type": {
|
|
928
|
+
"text": "AnimationItem | null"
|
|
929
|
+
},
|
|
930
|
+
"privacy": "private",
|
|
931
|
+
"default": "null"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"kind": "field",
|
|
935
|
+
"name": "_loaded",
|
|
936
|
+
"type": {
|
|
937
|
+
"text": "boolean"
|
|
938
|
+
},
|
|
939
|
+
"privacy": "private",
|
|
940
|
+
"default": "false"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"kind": "field",
|
|
944
|
+
"name": "_loadToken",
|
|
945
|
+
"type": {
|
|
946
|
+
"text": "number"
|
|
947
|
+
},
|
|
948
|
+
"privacy": "private",
|
|
949
|
+
"default": "0"
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"kind": "field",
|
|
953
|
+
"name": "_reduceMotion",
|
|
954
|
+
"type": {
|
|
955
|
+
"text": "boolean"
|
|
956
|
+
},
|
|
957
|
+
"privacy": "private",
|
|
958
|
+
"default": "false"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"kind": "field",
|
|
962
|
+
"name": "_visible",
|
|
963
|
+
"type": {
|
|
964
|
+
"text": "boolean"
|
|
965
|
+
},
|
|
966
|
+
"privacy": "private",
|
|
967
|
+
"default": "true"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"kind": "field",
|
|
971
|
+
"name": "_resizeObserver",
|
|
972
|
+
"type": {
|
|
973
|
+
"text": "ResizeObserver | undefined"
|
|
974
|
+
},
|
|
975
|
+
"privacy": "private"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"kind": "field",
|
|
979
|
+
"name": "_intersectionObserver",
|
|
980
|
+
"type": {
|
|
981
|
+
"text": "IntersectionObserver | undefined"
|
|
982
|
+
},
|
|
983
|
+
"privacy": "private"
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"kind": "field",
|
|
987
|
+
"name": "_motionQuery",
|
|
988
|
+
"type": {
|
|
989
|
+
"text": "MediaQueryList | undefined"
|
|
990
|
+
},
|
|
991
|
+
"privacy": "private"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"kind": "method",
|
|
995
|
+
"name": "_applySize",
|
|
996
|
+
"privacy": "private"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"kind": "field",
|
|
1000
|
+
"name": "_onMotionChange",
|
|
1001
|
+
"privacy": "private"
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
"kind": "method",
|
|
1005
|
+
"name": "_build",
|
|
1006
|
+
"privacy": "private"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"kind": "method",
|
|
1010
|
+
"name": "_sync",
|
|
1011
|
+
"privacy": "private"
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
"kind": "method",
|
|
1015
|
+
"name": "emit",
|
|
1016
|
+
"parameters": [
|
|
1017
|
+
{
|
|
1018
|
+
"name": "type",
|
|
1019
|
+
"type": {
|
|
1020
|
+
"text": "K"
|
|
1021
|
+
},
|
|
1022
|
+
"description": "Event name from CustomEventMap"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"name": "detail",
|
|
1026
|
+
"optional": true,
|
|
1027
|
+
"type": {
|
|
1028
|
+
"text": "UnpackCustomEvent<CustomEventMap[K]>"
|
|
1029
|
+
},
|
|
1030
|
+
"description": "Optional event detail payload"
|
|
1031
|
+
}
|
|
1032
|
+
],
|
|
1033
|
+
"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)",
|
|
1034
|
+
"return": {
|
|
1035
|
+
"type": {
|
|
1036
|
+
"text": "boolean"
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
"inheritedFrom": {
|
|
1040
|
+
"name": "EventEmitterMixin",
|
|
1041
|
+
"module": "src/util/EventEmitterMixin.ts"
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
],
|
|
1045
|
+
"events": [
|
|
1046
|
+
{
|
|
1047
|
+
"type": {
|
|
1048
|
+
"text": "CustomEvent"
|
|
1049
|
+
},
|
|
1050
|
+
"description": "Fired after the first render",
|
|
1051
|
+
"name": "btu-ai-sparkle-ready"
|
|
1052
|
+
}
|
|
1053
|
+
],
|
|
1054
|
+
"attributes": [
|
|
1055
|
+
{
|
|
1056
|
+
"name": "playing",
|
|
1057
|
+
"type": {
|
|
1058
|
+
"text": "boolean"
|
|
1059
|
+
},
|
|
1060
|
+
"default": "false",
|
|
1061
|
+
"description": "Whether the sparkle animates; otherwise it holds the last (fully-formed) frame. Opt-in\n(default `false`) like `autoplay`: a boolean defaulting to `true` can't be cleared by attribute\nabsence. The converter also treats `playing=\"false\"` as paused (a plain `type: Boolean` would\nread any present value, even \"false\", as `true`).",
|
|
1062
|
+
"fieldName": "playing",
|
|
1063
|
+
"attribute": "playing"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"name": "size",
|
|
1067
|
+
"type": {
|
|
1068
|
+
"text": "AiSparkleSize"
|
|
1069
|
+
},
|
|
1070
|
+
"default": "'md'",
|
|
1071
|
+
"description": "Size of the sparkle, mirroring `<btu-avatar>`'s scale. `--ai-sparkle-size` overrides it.",
|
|
1072
|
+
"fieldName": "size",
|
|
1073
|
+
"attribute": "size"
|
|
1074
|
+
}
|
|
1075
|
+
],
|
|
1076
|
+
"mixins": [
|
|
1077
|
+
{
|
|
1078
|
+
"name": "EventEmitterMixin",
|
|
1079
|
+
"module": "/src/util/EventEmitterMixin.js"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
"name": "ReadyMixin",
|
|
1083
|
+
"module": "/src/util/ReadyMixin.js"
|
|
1084
|
+
}
|
|
1085
|
+
],
|
|
1086
|
+
"superclass": {
|
|
1087
|
+
"name": "LitElement",
|
|
1088
|
+
"package": "lit"
|
|
1089
|
+
},
|
|
1090
|
+
"tagName": "btu-ai-sparkle",
|
|
1091
|
+
"customElement": true
|
|
1092
|
+
}
|
|
1093
|
+
],
|
|
1094
|
+
"exports": [
|
|
1095
|
+
{
|
|
1096
|
+
"kind": "js",
|
|
1097
|
+
"name": "default",
|
|
1098
|
+
"declaration": {
|
|
1099
|
+
"name": "AiSparkle",
|
|
1100
|
+
"module": "src/components/ai-sparkle/AiSparkle.ts"
|
|
1101
|
+
}
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
"kind": "custom-element-definition",
|
|
1105
|
+
"name": "btu-ai-sparkle",
|
|
1106
|
+
"declaration": {
|
|
1107
|
+
"name": "AiSparkle",
|
|
1108
|
+
"module": "src/components/ai-sparkle/AiSparkle.ts"
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
]
|
|
1112
|
+
},
|
|
879
1113
|
{
|
|
880
1114
|
"kind": "javascript-module",
|
|
881
1115
|
"path": "src/components/avatar/Avatar.ts",
|
package/dist/storybook/assets/{ActionBar.stories-BwKZ8jTT.js → ActionBar.stories-BcwPhWTp.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-BsOwdi_g.js";import{o as u}from"./style-map-cpVeTpyC.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-Df3verWG.js → ActionItem.stories-By6op0BA.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-BsOwdi_g.js";import{o as b}from"./style-map-cpVeTpyC.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>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{g as l,x as t}from"./iframe-BsOwdi_g.js";import{o as p}from"./style-map-cpVeTpyC.js";import"./preload-helper-PPVm8Dsz.js";const{events:c,args:d,argTypes:i}=l("btu-ai-sparkle"),n=["xs","sm","md","lg","xl"],g={title:"Components/AI/Sparkle",component:"btu-ai-sparkle",tags:["autodocs"],parameters:{docs:{subtitle:"The animated AI-branding sparkle",description:{component:`
|
|
2
|
+
<h3>When to use:</h3>
|
|
3
|
+
<ul>
|
|
4
|
+
<li>On the control that opens an AI surface (e.g. the button that opens the Esca assistant), to draw the eye to it</li>
|
|
5
|
+
</ul>
|
|
6
|
+
|
|
7
|
+
<p>Drive it with the <code>playing</code> boolean: <code>true</code> loops the clip while the AI surface is closed; set it <code>false</code> once the surface is open so it holds a static frame and stops competing for attention. Reduced-motion users always get the frozen frame.</p>
|
|
8
|
+
|
|
9
|
+
<h3>Accessibility:</h3>
|
|
10
|
+
<ul>
|
|
11
|
+
<li>Decorative by default (<code>aria-hidden="true"</code>, set only when absent) — the control it sits in owns the accessible name.</li>
|
|
12
|
+
</ul>
|
|
13
|
+
`}},actions:{handles:c},controls:{expanded:!0}},args:{...d,playing:!0,size:"md"},argTypes:{...i,"--ai-sparkle-size":{table:{disable:!0}},playing:{...i.playing,control:{type:"boolean"},description:"Whether the sparkle animates. `false` (default) holds the last (fully-formed) frame.",table:{category:"Attributes",defaultValue:{summary:"false"}}},size:{...i.size,control:{type:"select"},options:n,description:"Sparkle size scale (mirrors btu-avatar). Overridden by `--ai-sparkle-size`.",table:{category:"Attributes",defaultValue:{summary:"md"}}},customSize:{name:"--ai-sparkle-size",control:{type:"text"},description:'Width/height override (e.g. "20px"). Beats the `size` attribute; default box is 2.5rem (md).',table:{category:"css properties"}}},render:e=>{const o={};return e.customSize&&(o["--ai-sparkle-size"]=e.customSize),t`<btu-ai-sparkle
|
|
14
|
+
?playing=${e.playing}
|
|
15
|
+
size="${e.size}"
|
|
16
|
+
style=${p(o)}
|
|
17
|
+
></btu-ai-sparkle>`}},s={args:{},parameters:{docs:{description:{story:"Toggle `playing` to switch between the looping animation and the static frame, and resize with `size`."}}}},a={render:()=>t`<div class="flex flex-row items-start gap-8">
|
|
18
|
+
${[!0,!1].map(e=>t`
|
|
19
|
+
<div class="flex flex-col items-center gap-2">
|
|
20
|
+
<btu-ai-sparkle ?playing=${e} size="xl"></btu-ai-sparkle>
|
|
21
|
+
<span class="text-xs font-medium text-gray-700">${e?"playing":"static"}</span>
|
|
22
|
+
</div>
|
|
23
|
+
`)}
|
|
24
|
+
</div>`,parameters:{docs:{description:{story:'The looping state (left) next to the frozen frame (right) that `playing="false"` holds.'}}}},r={render:()=>t`<div class="flex flex-row items-center gap-6">
|
|
25
|
+
${n.map(e=>t`
|
|
26
|
+
<div class="flex flex-col items-center gap-2">
|
|
27
|
+
<btu-ai-sparkle size="${e}"></btu-ai-sparkle>
|
|
28
|
+
<span class="text-xs text-gray-600">${e}</span>
|
|
29
|
+
</div>
|
|
30
|
+
`)}
|
|
31
|
+
</div>`,parameters:{docs:{description:{story:"The `size` scale (`xs`–`xl`), mirroring `<btu-avatar>`. For an arbitrary size, override with the `--ai-sparkle-size` custom property."}}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
32
|
+
args: {},
|
|
33
|
+
parameters: {
|
|
34
|
+
docs: {
|
|
35
|
+
description: {
|
|
36
|
+
story: 'Toggle \`playing\` to switch between the looping animation and the static frame, and resize with \`size\`.'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}`,...s.parameters?.docs?.source}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
|
|
41
|
+
render: () => html\`<div class="flex flex-row items-start gap-8">
|
|
42
|
+
\${([true, false] as const).map(playing => html\`
|
|
43
|
+
<div class="flex flex-col items-center gap-2">
|
|
44
|
+
<btu-ai-sparkle ?playing=\${playing} size="xl"></btu-ai-sparkle>
|
|
45
|
+
<span class="text-xs font-medium text-gray-700">\${playing ? 'playing' : 'static'}</span>
|
|
46
|
+
</div>
|
|
47
|
+
\`)}
|
|
48
|
+
</div>\`,
|
|
49
|
+
parameters: {
|
|
50
|
+
docs: {
|
|
51
|
+
description: {
|
|
52
|
+
story: 'The looping state (left) next to the frozen frame (right) that \`playing="false"\` holds.'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}`,...a.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
57
|
+
render: () => html\`<div class="flex flex-row items-center gap-6">
|
|
58
|
+
\${sizeOptions.map(size => html\`
|
|
59
|
+
<div class="flex flex-col items-center gap-2">
|
|
60
|
+
<btu-ai-sparkle size="\${size}"></btu-ai-sparkle>
|
|
61
|
+
<span class="text-xs text-gray-600">\${size}</span>
|
|
62
|
+
</div>
|
|
63
|
+
\`)}
|
|
64
|
+
</div>\`,
|
|
65
|
+
parameters: {
|
|
66
|
+
docs: {
|
|
67
|
+
description: {
|
|
68
|
+
story: 'The \`size\` scale (\`xs\`–\`xl\`), mirroring \`<btu-avatar>\`. For an arbitrary size, override with the \`--ai-sparkle-size\` custom property.'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}`,...r.parameters?.docs?.source}}};const f=["Default","PlayingVsStatic","Sizes"];export{s as Default,a as PlayingVsStatic,r as Sizes,f as __namedExportsOrder,g as default};
|