@brightspot/ui 1.9.0 → 1.10.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/copy-to-clipboard/CopyToClipboard.d.ts.map +1 -1
- package/dist/components/copy-to-clipboard/CopyToClipboard.js +4 -0
- package/dist/components/copy-to-clipboard/CopyToClipboard.js.map +1 -1
- package/dist/components/switch/Switch.d.ts +92 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/switch/Switch.js +189 -0
- package/dist/components/switch/Switch.js.map +1 -0
- package/dist/custom-elements.json +512 -210
- package/dist/effects/celebrate.d.ts +18 -0
- package/dist/effects/celebrate.d.ts.map +1 -0
- package/dist/effects/celebrate.js +81 -0
- package/dist/effects/celebrate.js.map +1 -0
- package/dist/effects/ripple.d.ts +31 -0
- package/dist/effects/ripple.d.ts.map +1 -0
- package/dist/effects/ripple.js +131 -0
- package/dist/effects/ripple.js.map +1 -0
- package/dist/effects/sparkle-worklet.d.ts +7 -0
- package/dist/effects/sparkle-worklet.d.ts.map +1 -0
- package/dist/effects/sparkle-worklet.js +211 -0
- package/dist/effects/sparkle-worklet.js.map +1 -0
- package/dist/effects/sparkle.d.ts +6 -0
- package/dist/effects/sparkle.d.ts.map +1 -0
- package/dist/effects/sparkle.js +91 -0
- package/dist/effects/sparkle.js.map +1 -0
- package/dist/storybook/BSPLogoMark.svg +3 -0
- package/dist/storybook/WelcomeBG.svg +292 -0
- package/dist/storybook/assets/{Avatar.stories-Du1qM73U.js → Avatar.stories-B26mRkkZ.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-DxwZQE-q.js → AvatarGroup.stories-J7lVGsMY.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-CfvkMIx2.js → Badge.stories-BpTIV61M.js} +1 -1
- package/dist/storybook/assets/Button-Dg-fIrzT.js +10 -0
- package/dist/storybook/assets/Button.stories-gPKRVbxk.js +54 -0
- package/dist/storybook/assets/Celebrate.stories-DbY-sKEe.js +184 -0
- package/dist/storybook/assets/{CircularProgress.stories-rPzKwQYD.js → CircularProgress.stories-DeH5JYX_.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-BlUeYDSi.js → ClipboardMixin.stories-C-lZ4uuw.js} +1 -1
- package/dist/storybook/assets/Color-6BZIO3FS-Cu6zVIuG.js +1 -0
- package/dist/storybook/assets/{Colors.stories-BspfjZ5q.js → Colors.stories-D6XYMrTD.js} +1 -1
- package/dist/storybook/assets/CombinedEffects.stories-jFekKTYg.js +355 -0
- package/dist/storybook/assets/{ComponentStatesMixin-eTV7XXqB.js → ComponentStatesMixin-g50hRCPT.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-BbLSY3df.js → ComponentStatesMixin.stories-D3Q5pR38.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-B2ailiFF.js → CopyToClipboard.stories-COZZ1VC2.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-DJmp4eNo.js → Debounce.stories-Dl10LAnx.js} +1 -1
- package/dist/storybook/assets/DocsRenderer-LL677BLK-CFLtMbUx.js +10 -0
- package/dist/storybook/assets/{Dropdown.stories-Dd6vKiDd.js → Dropdown.stories-Drwq-0Z2.js} +1 -1
- package/dist/storybook/assets/{Events.stories-Byj-VOM9.js → Events.stories-dODeR-g-.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-Dqw-wzpx.js → Heading.stories-CH7_-_q3.js} +1 -1
- package/dist/storybook/assets/HueRipple.stories-CH1Y739k.js +310 -0
- package/dist/storybook/assets/{Icon.stories-Bp1nvWER.js → Icon.stories-CPjM-jTU.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories-o9g9mGdh.js → IconButton.stories-DuzqvcnN.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-DnXQVpzX.js → LinearProgress.stories-C7IdnJd3.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-DQD8uvDc.js → Pagination.stories-C4cLjS_9.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-BvavsRfq.js → Popover.stories-Ca1F-wrI.js} +3 -11
- package/dist/storybook/assets/{ReadyMixin-6On1MFFr.js → ReadyMixin-DNZ5dCsZ.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-Bb5Y-908.js → Rtc.stories-BVJc1vCA.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-ZovRXpte.js → ScrollShadow.stories-C3W5o9ZW.js} +1 -1
- package/dist/storybook/assets/Switch.stories-BEEHP8mD.js +312 -0
- package/dist/storybook/assets/{Throttle.stories-DmP-yKke.js → Throttle.stories-C4xsYeAb.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-Dl6xHBaM.js → Tooltip.stories-Ccm4AnSv.js} +3 -7
- package/dist/storybook/assets/Welcome.stories-Degjk-M0.js +215 -0
- package/dist/storybook/assets/{Widget.stories-BjXfgNjZ.js → Widget.stories-OKnZ9sDs.js} +1 -1
- package/dist/storybook/assets/WithTooltip-65CFNBJE-CXL3TyJ2.js +9 -0
- package/dist/storybook/assets/blocks-DLdUKG_W.js +707 -0
- package/dist/storybook/assets/celebrate-KwPoF1K3.js +21 -0
- package/dist/storybook/assets/formatter-EIJCOSYU-29NCxjfM.js +1 -0
- package/dist/storybook/assets/if-defined-BZFPaJjl.js +1 -0
- package/dist/storybook/assets/iframe-BqvwP3or.js +1104 -0
- package/dist/storybook/assets/{iframe-CNxIA3cQ.css → iframe-C5bIZMJ5.css} +1 -1
- package/dist/storybook/assets/index-BIyTv1BF.js +1 -0
- package/dist/storybook/assets/onFind-1l3EPW-I.js +1 -0
- package/dist/storybook/assets/{onFind.stories-B2GYLrjV.js → onFind.stories-D64-QZqf.js} +2 -2
- package/dist/storybook/assets/{onRemove.stories-CoLJFkWa.js → onRemove.stories-BICsnIJL.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-DOeZx7wi.js → onVisible.stories-DpDZP9_5.js} +2 -2
- package/dist/storybook/assets/position-CFNQy3J6.js +1 -0
- package/dist/storybook/assets/ripple-DQbyyRUw.js +251 -0
- package/dist/storybook/assets/{style-map-CmHqpCu1.js → style-map-CBrSnxRe.js} +1 -1
- package/dist/storybook/assets/syntaxhighlighter-ED5Y7EFY-Bz_DuQj8.js +6 -0
- package/dist/storybook/brightspot-logo.svg +19 -0
- package/dist/storybook/iframe.html +23 -3
- package/dist/storybook/index.html +42 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/sb-addons/storybook-3/manager-bundle.js +3 -0
- package/dist/tailwind-plugin-switch.d.ts +2 -0
- package/dist/tailwind-plugin-switch.d.ts.map +1 -0
- package/dist/tailwind-plugin-switch.js +223 -0
- package/dist/tailwind-plugin-switch.js.map +1 -0
- package/dist/tailwind-plugin-switch.ts +252 -0
- package/dist/util/EventEmitterMixin.d.ts +5 -0
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/dist/util/position.d.ts +9 -0
- package/dist/util/position.d.ts.map +1 -0
- package/dist/util/position.js +11 -0
- package/dist/util/position.js.map +1 -0
- package/docs/components/README.md +1 -0
- package/docs/components/Switch.md +79 -0
- package/package.json +2 -1
- package/dist/storybook/assets/Button.stories-hDMDDh81.js +0 -63
- package/dist/storybook/assets/Color-6BZIO3FS-C_nQSB2u.js +0 -1
- package/dist/storybook/assets/DocsRenderer-LL677BLK-56Pige1J.js +0 -758
- package/dist/storybook/assets/WithTooltip-65CFNBJE-CGB5q-AN.js +0 -9
- package/dist/storybook/assets/_commonjsHelpers-CqkleIqs.js +0 -1
- package/dist/storybook/assets/formatter-EIJCOSYU-BhNtSFM9.js +0 -1
- package/dist/storybook/assets/if-defined-BFyUeSVF.js +0 -1
- package/dist/storybook/assets/iframe-BeKreX-l.js +0 -1061
- package/dist/storybook/assets/index-Uz2kGy8J.js +0 -1
- package/dist/storybook/assets/onFind-DqriYjEB.js +0 -1
- package/dist/storybook/assets/syntaxhighlighter-ED5Y7EFY-BqFfcc7x.js +0 -6
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import{x as i}from"./iframe-BqvwP3or.js";import{b as l}from"./ripple-DQbyyRUw.js";import{B as e}from"./Button-Dg-fIrzT.js";import"./preload-helper-PPVm8Dsz.js";import"./position-CFNQy3J6.js";const m={title:"Effects/Hue Ripple",tags:["autodocs"],parameters:{docs:{subtitle:"Click anywhere to send a hue-shifting ripple across the viewport",description:{component:`
|
|
2
|
+
Uses the **View Transition API** to create an expanding ring that reveals OKLCH-shifted colors as it sweeps past each element, then they return to normal.
|
|
3
|
+
|
|
4
|
+
### Usage
|
|
5
|
+
|
|
6
|
+
\`\`\`ts
|
|
7
|
+
import { btuRipple } from '@brightspot/ui/effects/ripple.js'
|
|
8
|
+
|
|
9
|
+
// Imperative — pass a MouseEvent, Element, or {x, y}
|
|
10
|
+
button.addEventListener('click', (e) => btuRipple({ position: e }))
|
|
11
|
+
|
|
12
|
+
// Event-driven
|
|
13
|
+
const teardown = btuRipple.listen()
|
|
14
|
+
el.dispatchEvent(new CustomEvent('btu-effect-ripple', {
|
|
15
|
+
detail: { position: el, duration: 800 },
|
|
16
|
+
bubbles: true, composed: true,
|
|
17
|
+
}))
|
|
18
|
+
|
|
19
|
+
// Global defaults
|
|
20
|
+
btuRipple.setDefaults({ duration: 800, contrast: 2 })
|
|
21
|
+
\`\`\`
|
|
22
|
+
`}},controls:{expanded:!0}},argTypes:{duration:{control:{type:"range",min:500,max:5e3,step:100},description:"Animation duration (ms)"},ringWidth:{control:{type:"range",min:10,max:100,step:5},description:"Width of the hue-shifted band (px)"},feather:{control:{type:"range",min:10,max:120,step:5},description:"Feathered edge transition width (px)"},hueShift:{control:{type:"range",min:0,max:330,step:30},description:"OKLCH hue rotation amount (degrees)"},contrast:{control:{type:"range",min:.5,max:3,step:.1},description:"Contrast multiplier (1 = normal, >1 = higher contrast)"},saturate:{control:{type:"range",min:0,max:5,step:.5},description:"Saturation multiplier (1 = normal, >1 = hyper-saturated, <1 = desaturated)"}},args:{duration:2e3,ringWidth:30,feather:45,hueShift:180,contrast:1,saturate:1}},t={args:{duration:1200,ringWidth:40,feather:75,hueShift:0,contrast:1.8,saturate:1.5},render:a=>i`
|
|
23
|
+
<div @click=${r=>l({position:r,...a})} class="bg-gray-50" style="min-height: 80vh;">
|
|
24
|
+
<div class="flex flex-col gap-8 p-6">
|
|
25
|
+
<!-- Header -->
|
|
26
|
+
<div class="flex flex-col gap-2">
|
|
27
|
+
<h2 class="text-2xl font-semibold text-gray-900">Hue Ripple</h2>
|
|
28
|
+
<p class="text-sm text-gray-500">
|
|
29
|
+
Click anywhere. The expanding ring shifts underlying colors and returns to normal after the ring passes.
|
|
30
|
+
</p>
|
|
31
|
+
<p class="bg-warning-50 text-warning-700 border-warning-200 rounded-md border px-3 py-2 text-xs">
|
|
32
|
+
⚠ The UI is non-interactive during the view transition.
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<!-- Button row -->
|
|
37
|
+
<div class="flex flex-col gap-3">
|
|
38
|
+
<h3 class="text-sm font-medium text-gray-700">Buttons</h3>
|
|
39
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
40
|
+
${e({color:"primary",fill:!0,contained:!0,size:"lg",label:"Primary",icon:"zap"})}
|
|
41
|
+
${e({color:"error",fill:!0,contained:!0,size:"md",label:"Error"})}
|
|
42
|
+
${e({color:"success",fill:!0,contained:!0,size:"md",label:"Success",icon:"check"})}
|
|
43
|
+
${e({color:"teal",fill:!0,contained:!0,size:"sm",label:"Teal"})}
|
|
44
|
+
${e({color:"purple",fill:!0,contained:!0,size:"sm",label:"Purple"})}
|
|
45
|
+
${e({color:"warning",fill:!0,contained:!0,size:"sm",label:"Warning",icon:"triangle-alert"})}
|
|
46
|
+
${e({color:"rose",fill:!0,contained:!0,size:"sm",label:"Rose"})}
|
|
47
|
+
</div>
|
|
48
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
49
|
+
${e({color:"primary",fill:!1,contained:!0,size:"md",label:"Contained"})}
|
|
50
|
+
${e({color:"primary",fill:!1,outlined:!0,size:"md",label:"Outlined",icon:"star"})}
|
|
51
|
+
${e({color:"black",fill:!0,contained:!0,size:"md",label:"Black"})}
|
|
52
|
+
${e({color:"white",fill:!0,contained:!0,size:"md",label:"White"})}
|
|
53
|
+
${e({color:"ai",fill:!0,contained:!0,size:"md",label:"AI",icon:"sparkles"})}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!-- Badges -->
|
|
58
|
+
<div class="flex flex-col gap-3">
|
|
59
|
+
<h3 class="text-sm font-medium text-gray-700">Badges</h3>
|
|
60
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
61
|
+
<btu-badge variant="primary" size="lg">Primary</btu-badge>
|
|
62
|
+
<btu-badge variant="success" size="md">Published</btu-badge>
|
|
63
|
+
<btu-badge variant="error" size="md" dot>Error</btu-badge>
|
|
64
|
+
<btu-badge variant="warning" size="sm">Draft</btu-badge>
|
|
65
|
+
<btu-badge variant="info" size="sm">Info</btu-badge>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<!-- Avatars -->
|
|
70
|
+
<div class="flex flex-col gap-3">
|
|
71
|
+
<h3 class="text-sm font-medium text-gray-700">Avatars</h3>
|
|
72
|
+
<div class="flex items-center gap-3">
|
|
73
|
+
<btu-avatar fallback="AB" size="lg" style="--avatar-bg-color: oklch(65% 0.2 264)"></btu-avatar>
|
|
74
|
+
<btu-avatar fallback="CD" size="lg" style="--avatar-bg-color: oklch(65% 0.2 27)"></btu-avatar>
|
|
75
|
+
<btu-avatar fallback="EF" size="lg" style="--avatar-bg-color: oklch(65% 0.2 157)"></btu-avatar>
|
|
76
|
+
<btu-avatar fallback="GH" size="lg" style="--avatar-bg-color: oklch(65% 0.2 330)"></btu-avatar>
|
|
77
|
+
<btu-avatar fallback="IJ" size="md" style="--avatar-bg-color: oklch(65% 0.2 60)"></btu-avatar>
|
|
78
|
+
<btu-avatar fallback="KL" size="md" style="--avatar-bg-color: oklch(65% 0.2 180)"></btu-avatar>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<!-- Colored cards -->
|
|
83
|
+
<div class="flex flex-col gap-3">
|
|
84
|
+
<h3 class="text-sm font-medium text-gray-700">Color Swatches</h3>
|
|
85
|
+
<div class="grid grid-cols-3 gap-3 sm:grid-cols-6">
|
|
86
|
+
<div
|
|
87
|
+
class="bg-primary-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
88
|
+
>
|
|
89
|
+
Primary
|
|
90
|
+
</div>
|
|
91
|
+
<div class="flex h-20 items-center justify-center rounded-lg bg-teal-500 text-sm font-medium text-white">
|
|
92
|
+
Teal
|
|
93
|
+
</div>
|
|
94
|
+
<div
|
|
95
|
+
class="flex h-20 items-center justify-center rounded-lg bg-purple-500 text-sm font-medium text-white"
|
|
96
|
+
>
|
|
97
|
+
Purple
|
|
98
|
+
</div>
|
|
99
|
+
<div class="bg-error-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white">
|
|
100
|
+
Error
|
|
101
|
+
</div>
|
|
102
|
+
<div
|
|
103
|
+
class="bg-success-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
104
|
+
>
|
|
105
|
+
Success
|
|
106
|
+
</div>
|
|
107
|
+
<div
|
|
108
|
+
class="bg-warning-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
109
|
+
>
|
|
110
|
+
Warning
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
`,parameters:{docs:{description:{story:"Full demo scene. Click anywhere — the ring reveals OKLCH-shifted colors as it sweeps past each element, then they return to normal."}}}};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`{
|
|
117
|
+
args: {
|
|
118
|
+
duration: 1200,
|
|
119
|
+
ringWidth: 40,
|
|
120
|
+
feather: 75,
|
|
121
|
+
hueShift: 0,
|
|
122
|
+
contrast: 1.8,
|
|
123
|
+
saturate: 1.5
|
|
124
|
+
},
|
|
125
|
+
render: args => {
|
|
126
|
+
const onClick = (e: MouseEvent) => btuRipple({
|
|
127
|
+
position: e,
|
|
128
|
+
...args
|
|
129
|
+
});
|
|
130
|
+
return html\`
|
|
131
|
+
<div @click=\${onClick} class="bg-gray-50" style="min-height: 80vh;">
|
|
132
|
+
<div class="flex flex-col gap-8 p-6">
|
|
133
|
+
<!-- Header -->
|
|
134
|
+
<div class="flex flex-col gap-2">
|
|
135
|
+
<h2 class="text-2xl font-semibold text-gray-900">Hue Ripple</h2>
|
|
136
|
+
<p class="text-sm text-gray-500">
|
|
137
|
+
Click anywhere. The expanding ring shifts underlying colors and returns to normal after the ring passes.
|
|
138
|
+
</p>
|
|
139
|
+
<p class="bg-warning-50 text-warning-700 border-warning-200 rounded-md border px-3 py-2 text-xs">
|
|
140
|
+
⚠ The UI is non-interactive during the view transition.
|
|
141
|
+
</p>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<!-- Button row -->
|
|
145
|
+
<div class="flex flex-col gap-3">
|
|
146
|
+
<h3 class="text-sm font-medium text-gray-700">Buttons</h3>
|
|
147
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
148
|
+
\${Button({
|
|
149
|
+
color: 'primary',
|
|
150
|
+
fill: true,
|
|
151
|
+
contained: true,
|
|
152
|
+
size: 'lg',
|
|
153
|
+
label: 'Primary',
|
|
154
|
+
icon: 'zap'
|
|
155
|
+
})}
|
|
156
|
+
\${Button({
|
|
157
|
+
color: 'error',
|
|
158
|
+
fill: true,
|
|
159
|
+
contained: true,
|
|
160
|
+
size: 'md',
|
|
161
|
+
label: 'Error'
|
|
162
|
+
})}
|
|
163
|
+
\${Button({
|
|
164
|
+
color: 'success',
|
|
165
|
+
fill: true,
|
|
166
|
+
contained: true,
|
|
167
|
+
size: 'md',
|
|
168
|
+
label: 'Success',
|
|
169
|
+
icon: 'check'
|
|
170
|
+
})}
|
|
171
|
+
\${Button({
|
|
172
|
+
color: 'teal',
|
|
173
|
+
fill: true,
|
|
174
|
+
contained: true,
|
|
175
|
+
size: 'sm',
|
|
176
|
+
label: 'Teal'
|
|
177
|
+
})}
|
|
178
|
+
\${Button({
|
|
179
|
+
color: 'purple',
|
|
180
|
+
fill: true,
|
|
181
|
+
contained: true,
|
|
182
|
+
size: 'sm',
|
|
183
|
+
label: 'Purple'
|
|
184
|
+
})}
|
|
185
|
+
\${Button({
|
|
186
|
+
color: 'warning',
|
|
187
|
+
fill: true,
|
|
188
|
+
contained: true,
|
|
189
|
+
size: 'sm',
|
|
190
|
+
label: 'Warning',
|
|
191
|
+
icon: 'triangle-alert'
|
|
192
|
+
})}
|
|
193
|
+
\${Button({
|
|
194
|
+
color: 'rose',
|
|
195
|
+
fill: true,
|
|
196
|
+
contained: true,
|
|
197
|
+
size: 'sm',
|
|
198
|
+
label: 'Rose'
|
|
199
|
+
})}
|
|
200
|
+
</div>
|
|
201
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
202
|
+
\${Button({
|
|
203
|
+
color: 'primary',
|
|
204
|
+
fill: false,
|
|
205
|
+
contained: true,
|
|
206
|
+
size: 'md',
|
|
207
|
+
label: 'Contained'
|
|
208
|
+
})}
|
|
209
|
+
\${Button({
|
|
210
|
+
color: 'primary',
|
|
211
|
+
fill: false,
|
|
212
|
+
outlined: true,
|
|
213
|
+
size: 'md',
|
|
214
|
+
label: 'Outlined',
|
|
215
|
+
icon: 'star'
|
|
216
|
+
})}
|
|
217
|
+
\${Button({
|
|
218
|
+
color: 'black',
|
|
219
|
+
fill: true,
|
|
220
|
+
contained: true,
|
|
221
|
+
size: 'md',
|
|
222
|
+
label: 'Black'
|
|
223
|
+
})}
|
|
224
|
+
\${Button({
|
|
225
|
+
color: 'white',
|
|
226
|
+
fill: true,
|
|
227
|
+
contained: true,
|
|
228
|
+
size: 'md',
|
|
229
|
+
label: 'White'
|
|
230
|
+
})}
|
|
231
|
+
\${Button({
|
|
232
|
+
color: 'ai',
|
|
233
|
+
fill: true,
|
|
234
|
+
contained: true,
|
|
235
|
+
size: 'md',
|
|
236
|
+
label: 'AI',
|
|
237
|
+
icon: 'sparkles'
|
|
238
|
+
})}
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
<!-- Badges -->
|
|
243
|
+
<div class="flex flex-col gap-3">
|
|
244
|
+
<h3 class="text-sm font-medium text-gray-700">Badges</h3>
|
|
245
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
246
|
+
<btu-badge variant="primary" size="lg">Primary</btu-badge>
|
|
247
|
+
<btu-badge variant="success" size="md">Published</btu-badge>
|
|
248
|
+
<btu-badge variant="error" size="md" dot>Error</btu-badge>
|
|
249
|
+
<btu-badge variant="warning" size="sm">Draft</btu-badge>
|
|
250
|
+
<btu-badge variant="info" size="sm">Info</btu-badge>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
<!-- Avatars -->
|
|
255
|
+
<div class="flex flex-col gap-3">
|
|
256
|
+
<h3 class="text-sm font-medium text-gray-700">Avatars</h3>
|
|
257
|
+
<div class="flex items-center gap-3">
|
|
258
|
+
<btu-avatar fallback="AB" size="lg" style="--avatar-bg-color: oklch(65% 0.2 264)"></btu-avatar>
|
|
259
|
+
<btu-avatar fallback="CD" size="lg" style="--avatar-bg-color: oklch(65% 0.2 27)"></btu-avatar>
|
|
260
|
+
<btu-avatar fallback="EF" size="lg" style="--avatar-bg-color: oklch(65% 0.2 157)"></btu-avatar>
|
|
261
|
+
<btu-avatar fallback="GH" size="lg" style="--avatar-bg-color: oklch(65% 0.2 330)"></btu-avatar>
|
|
262
|
+
<btu-avatar fallback="IJ" size="md" style="--avatar-bg-color: oklch(65% 0.2 60)"></btu-avatar>
|
|
263
|
+
<btu-avatar fallback="KL" size="md" style="--avatar-bg-color: oklch(65% 0.2 180)"></btu-avatar>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<!-- Colored cards -->
|
|
268
|
+
<div class="flex flex-col gap-3">
|
|
269
|
+
<h3 class="text-sm font-medium text-gray-700">Color Swatches</h3>
|
|
270
|
+
<div class="grid grid-cols-3 gap-3 sm:grid-cols-6">
|
|
271
|
+
<div
|
|
272
|
+
class="bg-primary-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
273
|
+
>
|
|
274
|
+
Primary
|
|
275
|
+
</div>
|
|
276
|
+
<div class="flex h-20 items-center justify-center rounded-lg bg-teal-500 text-sm font-medium text-white">
|
|
277
|
+
Teal
|
|
278
|
+
</div>
|
|
279
|
+
<div
|
|
280
|
+
class="flex h-20 items-center justify-center rounded-lg bg-purple-500 text-sm font-medium text-white"
|
|
281
|
+
>
|
|
282
|
+
Purple
|
|
283
|
+
</div>
|
|
284
|
+
<div class="bg-error-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white">
|
|
285
|
+
Error
|
|
286
|
+
</div>
|
|
287
|
+
<div
|
|
288
|
+
class="bg-success-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
289
|
+
>
|
|
290
|
+
Success
|
|
291
|
+
</div>
|
|
292
|
+
<div
|
|
293
|
+
class="bg-warning-500 flex h-20 items-center justify-center rounded-lg text-sm font-medium text-white"
|
|
294
|
+
>
|
|
295
|
+
Warning
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
\`;
|
|
302
|
+
},
|
|
303
|
+
parameters: {
|
|
304
|
+
docs: {
|
|
305
|
+
description: {
|
|
306
|
+
story: 'Full demo scene. Click anywhere — the ring reveals OKLCH-shifted colors as it sweeps past each element, then they return to normal.'
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}`,...t.parameters?.docs?.source}}};const g=["Default"];export{t as Default,g as __namedExportsOrder,m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as d,x as t}from"./iframe-
|
|
1
|
+
import{g as d,x as t}from"./iframe-BqvwP3or.js";import{o as p}from"./style-map-CBrSnxRe.js";import{L as c}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:b,argTypes:s}=d("btu-icon"),m=["xs","sm","md","lg","xl"],g=["ai","error","gray","primary","purple","rose","success","teal","warning"],v={title:"Components/Icon",component:"btu-icon",tags:["autodocs"],parameters:{docs:{subtitle:"An icon component using Lucide icons with built-in support for custom colors and sizes.",description:{component:`
|
|
2
2
|
<strong>When to use:</strong>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>To visually reinforce actions, states, or categories</li>
|
package/dist/storybook/assets/{IconButton.stories-o9g9mGdh.js → IconButton.stories-DuzqvcnN.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-BqvwP3or.js";import{o as b}from"./if-defined-BZFPaJjl.js";import{L as d}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:y,argTypes:o}=p("btu-icon-button"),x={title:"Components/IconButton",component:"btu-icon-button",tags:["autodocs"],parameters:{docs:{subtitle:"Combines button styles with the icon component along with an opinionated API",description:{component:`
|
|
2
2
|
<h3>When to use:</h3>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>For actions in compact or space-constrained interfaces (toolbars, tables, cards)</li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as D,E as h,x as T}from"./iframe-
|
|
1
|
+
import{g as D,E as h,x as T}from"./iframe-BqvwP3or.js";import{o as A}from"./style-map-CBrSnxRe.js";import"./preload-helper-PPVm8Dsz.js";const{events:V,args:P,argTypes:g}=D("btu-linear-progress"),W={title:"Components/Linear Progress",component:"btu-linear-progress",tags:["autodocs"],parameters:{docs:{subtitle:"A horizontal progress bar for showing task completion",description:{component:`
|
|
2
2
|
<h3>When to use:</h3>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>To show progress of a specific task with known completion percentage</li>
|
package/dist/storybook/assets/{Pagination.stories-DQD8uvDc.js → Pagination.stories-C4cLjS_9.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as m,x as o}from"./iframe-
|
|
1
|
+
import{g as m,x as o}from"./iframe-BqvwP3or.js";import{o as c}from"./style-map-CBrSnxRe.js";import"./preload-helper-PPVm8Dsz.js";const{events:b,args:h,argTypes:y}=m("btu-pagination"),u=t=>{const a={};return t.customBackgroundColor&&(a["--pagination-color-background"]=t.customBackgroundColor),t.customForegroundColor&&(a["--pagination-color-foreground"]=t.customForegroundColor),a},S={title:"Components/Pagination",component:"btu-pagination",tags:["autodocs"],parameters:{docs:{subtitle:"A component for navigating through paged content",description:{component:`
|
|
2
2
|
<h3>When to use:</h3>
|
|
3
3
|
<ul>
|
|
4
4
|
<li>To navigate through large sets of data</li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as a,x as r}from"./iframe-
|
|
1
|
+
import{g as a,x as r}from"./iframe-BqvwP3or.js";import{o as c}from"./if-defined-BZFPaJjl.js";import{o as d}from"./style-map-CBrSnxRe.js";import"./preload-helper-PPVm8Dsz.js";const{events:u,args:g,argTypes:e}=a("btu-popover"),y={title:"Components/Popover",component:"btu-popover",tags:["autodocs"],parameters:{docs:{subtitle:"Rich interactive content anchored to a trigger element",description:{component:`
|
|
2
2
|
\`btu-popover\` displays rich interactive content anchored to a trigger element using CSS anchor positioning and the native Popover API.
|
|
3
3
|
|
|
4
4
|
<h3>When to use:</h3>
|
|
@@ -90,7 +90,7 @@ import{g as a,x as r}from"./iframe-BeKreX-l.js";import{o as c}from"./if-defined-
|
|
|
90
90
|
<div slot="content">Popover positioned right of the trigger</div>
|
|
91
91
|
</btu-popover>
|
|
92
92
|
</div>
|
|
93
|
-
`,parameters:{docs:{description:{story:"Popovers support four positions: `top`, `bottom`, `left`, and `right`. Each auto-flips if constrained by the viewport."}
|
|
93
|
+
`,parameters:{docs:{description:{story:"Popovers support four positions: `top`, `bottom`, `left`, and `right`. Each auto-flips if constrained by the viewport."}}}},s={render:()=>r`
|
|
94
94
|
<style>
|
|
95
95
|
${p} .popover-custom-content {
|
|
96
96
|
display: flex;
|
|
@@ -182,7 +182,7 @@ import{g as a,x as r}from"./iframe-BeKreX-l.js";import{o as c}from"./if-defined-
|
|
|
182
182
|
</div>
|
|
183
183
|
</btu-popover>
|
|
184
184
|
</div>
|
|
185
|
-
`,parameters:{docs:{description:{story:"Two examples of rich popover content: a confirmation dialog with action buttons (click trigger), and a chart legend with colored series data (hover trigger)."}
|
|
185
|
+
`,parameters:{docs:{description:{story:"Two examples of rich popover content: a confirmation dialog with action buttons (click trigger), and a chart legend with colored series data (hover trigger)."}}}},l={render:()=>r`
|
|
186
186
|
<style>
|
|
187
187
|
${p} .custom-popover-trigger {
|
|
188
188
|
display: inline-flex;
|
|
@@ -260,10 +260,6 @@ import{g as a,x as r}from"./iframe-BeKreX-l.js";import{o as c}from"./if-defined-
|
|
|
260
260
|
docs: {
|
|
261
261
|
description: {
|
|
262
262
|
story: 'Popovers support four positions: \`top\`, \`bottom\`, \`left\`, and \`right\`. Each auto-flips if constrained by the viewport.'
|
|
263
|
-
},
|
|
264
|
-
story: {
|
|
265
|
-
inline: false,
|
|
266
|
-
iframeHeight: 300
|
|
267
263
|
}
|
|
268
264
|
}
|
|
269
265
|
}
|
|
@@ -365,10 +361,6 @@ import{g as a,x as r}from"./iframe-BeKreX-l.js";import{o as c}from"./if-defined-
|
|
|
365
361
|
docs: {
|
|
366
362
|
description: {
|
|
367
363
|
story: 'Two examples of rich popover content: a confirmation dialog with action buttons (click trigger), and a chart legend with colored series data (hover trigger).'
|
|
368
|
-
},
|
|
369
|
-
story: {
|
|
370
|
-
inline: false,
|
|
371
|
-
iframeHeight: 300
|
|
372
364
|
}
|
|
373
365
|
}
|
|
374
366
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./iframe-
|
|
1
|
+
import"./iframe-BqvwP3or.js";const i=t=>{class n extends t{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-element-connected",{}),e=>this.emit("btu-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-element-disconnected")}emit(e,c){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:c}))}}return n},l=t=>{class n extends t{connectedCallback(){const e=()=>{super.connectedCallback()};document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",()=>e())}}return n};export{i as E,l as R};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as o}from"./iframe-
|
|
1
|
+
import{x as o}from"./iframe-BqvwP3or.js";import"./preload-helper-PPVm8Dsz.js";const r={title:"Utilities/RTC",tags:["autodocs"],parameters:{docs:{subtitle:"The `rtc` module provides real-time communication between browser tabs and the Brightspot CMS server. Uses BroadcastChannel for cross-tab coordination with leader election, and Server-Sent Events for server communication."},controls:{expanded:!0}}},e={render:()=>o`
|
|
2
2
|
<div class="space-y-6 text-sm">
|
|
3
3
|
<div>
|
|
4
4
|
<h3 class="mb-2 font-bold">Overview</h3>
|
package/dist/storybook/assets/{ScrollShadow.stories-ZovRXpte.js → ScrollShadow.stories-C3W5o9ZW.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{x as a}from"./iframe-
|
|
1
|
+
import{x as a}from"./iframe-BqvwP3or.js";import"./preload-helper-PPVm8Dsz.js";const l=({theme:e="btu-scrollshadow-25"})=>{const r=new Array(100).fill(0).map((s,t)=>`Item ${t+1}`);return a`
|
|
2
2
|
<style>
|
|
3
3
|
:root {
|
|
4
4
|
--can-scroll: ;
|