@brightspot/ui 1.8.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.
Files changed (115) hide show
  1. package/dist/LucideDynamicLoader.js +1 -1
  2. package/dist/LucideDynamicLoader.js.map +1 -1
  3. package/dist/LucideDynamicLoader.ts +1 -1
  4. package/dist/components/copy-to-clipboard/CopyToClipboard.d.ts.map +1 -1
  5. package/dist/components/copy-to-clipboard/CopyToClipboard.js +4 -0
  6. package/dist/components/copy-to-clipboard/CopyToClipboard.js.map +1 -1
  7. package/dist/components/icon/Icon.d.ts +1 -0
  8. package/dist/components/icon/Icon.d.ts.map +1 -1
  9. package/dist/components/icon/Icon.js +2 -1
  10. package/dist/components/icon/Icon.js.map +1 -1
  11. package/dist/components/switch/Switch.d.ts +92 -0
  12. package/dist/components/switch/Switch.d.ts.map +1 -0
  13. package/dist/components/switch/Switch.js +189 -0
  14. package/dist/components/switch/Switch.js.map +1 -0
  15. package/dist/custom-elements.json +510 -204
  16. package/dist/effects/celebrate.d.ts +18 -0
  17. package/dist/effects/celebrate.d.ts.map +1 -0
  18. package/dist/effects/celebrate.js +81 -0
  19. package/dist/effects/celebrate.js.map +1 -0
  20. package/dist/effects/ripple.d.ts +31 -0
  21. package/dist/effects/ripple.d.ts.map +1 -0
  22. package/dist/effects/ripple.js +131 -0
  23. package/dist/effects/ripple.js.map +1 -0
  24. package/dist/effects/sparkle-worklet.d.ts +7 -0
  25. package/dist/effects/sparkle-worklet.d.ts.map +1 -0
  26. package/dist/effects/sparkle-worklet.js +211 -0
  27. package/dist/effects/sparkle-worklet.js.map +1 -0
  28. package/dist/effects/sparkle.d.ts +6 -0
  29. package/dist/effects/sparkle.d.ts.map +1 -0
  30. package/dist/effects/sparkle.js +91 -0
  31. package/dist/effects/sparkle.js.map +1 -0
  32. package/dist/storybook/BSPLogoMark.svg +3 -0
  33. package/dist/storybook/WelcomeBG.svg +292 -0
  34. package/dist/storybook/assets/{Avatar.stories-XfJUoW42.js → Avatar.stories-B26mRkkZ.js} +1 -1
  35. package/dist/storybook/assets/{AvatarGroup.stories-CPkv0mVI.js → AvatarGroup.stories-J7lVGsMY.js} +1 -1
  36. package/dist/storybook/assets/{Badge.stories-Z42hQyzK.js → Badge.stories-BpTIV61M.js} +1 -1
  37. package/dist/storybook/assets/Button-Dg-fIrzT.js +10 -0
  38. package/dist/storybook/assets/Button.stories-gPKRVbxk.js +54 -0
  39. package/dist/storybook/assets/Celebrate.stories-DbY-sKEe.js +184 -0
  40. package/dist/storybook/assets/{CircularProgress.stories-B59nHh_k.js → CircularProgress.stories-DeH5JYX_.js} +1 -1
  41. package/dist/storybook/assets/{ClipboardMixin.stories-C6DraZ93.js → ClipboardMixin.stories-C-lZ4uuw.js} +1 -1
  42. package/dist/storybook/assets/Color-6BZIO3FS-Cu6zVIuG.js +1 -0
  43. package/dist/storybook/assets/{Colors.stories-B3Capc8F.js → Colors.stories-D6XYMrTD.js} +1 -1
  44. package/dist/storybook/assets/CombinedEffects.stories-jFekKTYg.js +355 -0
  45. package/dist/storybook/assets/{ComponentStatesMixin-DRalOmcW.js → ComponentStatesMixin-g50hRCPT.js} +1 -1
  46. package/dist/storybook/assets/{ComponentStatesMixin.stories-TKD7YrVe.js → ComponentStatesMixin.stories-D3Q5pR38.js} +1 -1
  47. package/dist/storybook/assets/{CopyToClipboard.stories-Bv8jZ7TL.js → CopyToClipboard.stories-COZZ1VC2.js} +1 -1
  48. package/dist/storybook/assets/{Debounce.stories-CLwXI3OZ.js → Debounce.stories-Dl10LAnx.js} +1 -1
  49. package/dist/storybook/assets/DocsRenderer-LL677BLK-CFLtMbUx.js +10 -0
  50. package/dist/storybook/assets/{Dropdown.stories-D7X0Dbnt.js → Dropdown.stories-Drwq-0Z2.js} +1 -1
  51. package/dist/storybook/assets/{Events.stories-Dgn1N8jT.js → Events.stories-dODeR-g-.js} +1 -1
  52. package/dist/storybook/assets/{Heading.stories-BcciQ3Ug.js → Heading.stories-CH7_-_q3.js} +1 -1
  53. package/dist/storybook/assets/HueRipple.stories-CH1Y739k.js +310 -0
  54. package/dist/storybook/assets/{Icon.stories-BWqJoZUM.js → Icon.stories-CPjM-jTU.js} +32 -13
  55. package/dist/storybook/assets/{IconButton.stories-BrMDAi9q.js → IconButton.stories-DuzqvcnN.js} +1 -1
  56. package/dist/storybook/assets/{LinearProgress.stories-INijWBr_.js → LinearProgress.stories-C7IdnJd3.js} +1 -1
  57. package/dist/storybook/assets/{Pagination.stories-CrExaWpC.js → Pagination.stories-C4cLjS_9.js} +1 -1
  58. package/dist/storybook/assets/{Popover.stories-Bh6IUPG_.js → Popover.stories-Ca1F-wrI.js} +3 -11
  59. package/dist/storybook/assets/{ReadyMixin-C1lZU7vt.js → ReadyMixin-DNZ5dCsZ.js} +1 -1
  60. package/dist/storybook/assets/{Rtc.stories-BHqFwgR7.js → Rtc.stories-BVJc1vCA.js} +1 -1
  61. package/dist/storybook/assets/{ScrollShadow.stories-DnIj5cZF.js → ScrollShadow.stories-C3W5o9ZW.js} +1 -1
  62. package/dist/storybook/assets/Switch.stories-BEEHP8mD.js +312 -0
  63. package/dist/storybook/assets/{Throttle.stories-Dilsv90H.js → Throttle.stories-C4xsYeAb.js} +1 -1
  64. package/dist/storybook/assets/{Tooltip.stories-Dnb76OXa.js → Tooltip.stories-Ccm4AnSv.js} +3 -7
  65. package/dist/storybook/assets/Welcome.stories-Degjk-M0.js +215 -0
  66. package/dist/storybook/assets/{Widget.stories-Cl-3dv15.js → Widget.stories-OKnZ9sDs.js} +1 -1
  67. package/dist/storybook/assets/WithTooltip-65CFNBJE-CXL3TyJ2.js +9 -0
  68. package/dist/storybook/assets/blocks-DLdUKG_W.js +707 -0
  69. package/dist/storybook/assets/celebrate-KwPoF1K3.js +21 -0
  70. package/dist/storybook/assets/formatter-EIJCOSYU-29NCxjfM.js +1 -0
  71. package/dist/storybook/assets/if-defined-BZFPaJjl.js +1 -0
  72. package/dist/storybook/assets/iframe-BqvwP3or.js +1104 -0
  73. package/dist/storybook/assets/{iframe-CNxIA3cQ.css → iframe-C5bIZMJ5.css} +1 -1
  74. package/dist/storybook/assets/index-BIyTv1BF.js +1 -0
  75. package/dist/storybook/assets/onFind-1l3EPW-I.js +1 -0
  76. package/dist/storybook/assets/{onFind.stories-CGeGoVR6.js → onFind.stories-D64-QZqf.js} +2 -2
  77. package/dist/storybook/assets/{onRemove.stories-DXOwfv14.js → onRemove.stories-BICsnIJL.js} +1 -1
  78. package/dist/storybook/assets/{onVisible.stories-DNzXceKW.js → onVisible.stories-DpDZP9_5.js} +2 -2
  79. package/dist/storybook/assets/position-CFNQy3J6.js +1 -0
  80. package/dist/storybook/assets/ripple-DQbyyRUw.js +251 -0
  81. package/dist/storybook/assets/{style-map-kcS06w9f.js → style-map-CBrSnxRe.js} +1 -1
  82. package/dist/storybook/assets/syntaxhighlighter-ED5Y7EFY-Bz_DuQj8.js +6 -0
  83. package/dist/storybook/brightspot-logo.svg +19 -0
  84. package/dist/storybook/iframe.html +23 -3
  85. package/dist/storybook/index.html +42 -1
  86. package/dist/storybook/index.json +1 -1
  87. package/dist/storybook/project.json +1 -1
  88. package/dist/storybook/sb-addons/storybook-3/manager-bundle.js +3 -0
  89. package/dist/tailwind-plugin-switch.d.ts +2 -0
  90. package/dist/tailwind-plugin-switch.d.ts.map +1 -0
  91. package/dist/tailwind-plugin-switch.js +223 -0
  92. package/dist/tailwind-plugin-switch.js.map +1 -0
  93. package/dist/tailwind-plugin-switch.ts +252 -0
  94. package/dist/util/EventEmitterMixin.d.ts +5 -0
  95. package/dist/util/EventEmitterMixin.d.ts.map +1 -1
  96. package/dist/util/EventEmitterMixin.js.map +1 -1
  97. package/dist/util/position.d.ts +9 -0
  98. package/dist/util/position.d.ts.map +1 -0
  99. package/dist/util/position.js +11 -0
  100. package/dist/util/position.js.map +1 -0
  101. package/docs/components/Icon.md +6 -5
  102. package/docs/components/README.md +1 -0
  103. package/docs/components/Switch.md +79 -0
  104. package/package.json +2 -1
  105. package/dist/storybook/assets/Button.stories-DTcnCrp-.js +0 -63
  106. package/dist/storybook/assets/Color-6BZIO3FS-BuNGIaf5.js +0 -1
  107. package/dist/storybook/assets/DocsRenderer-LL677BLK-DjMDalQg.js +0 -758
  108. package/dist/storybook/assets/WithTooltip-65CFNBJE-Bq21jhKM.js +0 -9
  109. package/dist/storybook/assets/_commonjsHelpers-CqkleIqs.js +0 -1
  110. package/dist/storybook/assets/formatter-EIJCOSYU-CwrejIu0.js +0 -1
  111. package/dist/storybook/assets/if-defined-D1UQmdjo.js +0 -1
  112. package/dist/storybook/assets/iframe-CsKt54V3.js +0 -1061
  113. package/dist/storybook/assets/index-DQ0xe06s.js +0 -1
  114. package/dist/storybook/assets/onFind-DqriYjEB.js +0 -1
  115. package/dist/storybook/assets/syntaxhighlighter-ED5Y7EFY-BnpaJz4a.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 c,x as a}from"./iframe-CsKt54V3.js";import{o as d}from"./style-map-kcS06w9f.js";import{L as l}from"./LucideDynamicLoader-jmdq8YDM.js";import"./preload-helper-PPVm8Dsz.js";const{events:p,args:b,argTypes:t}=c("btu-icon"),u=["xs","sm","md","lg","xl"],m=["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:`
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>
@@ -14,19 +14,24 @@ import{g as c,x as a}from"./iframe-CsKt54V3.js";import{o as d}from"./style-map-k
14
14
  </ul>
15
15
 
16
16
  <h3>Icon Library:</h3>
17
- <p>All icons are from <a href="https://lucide.dev/icons/" target="_blank">Lucide</a>. Note that the Lucide library is updated regularly, but the Brightspot UI library uses <strong>Lucide v${l}</strong>. Keep this in mind when choosing icons for your project, as icon names and styles may differ between versions.</p>
18
- `}},actions:{handles:p},controls:{expanded:!0}},args:{...b,symbol:"heart",size:"md"},argTypes:{...t,"--Icon-size":{table:{disable:!0}},"--Icon-fill":{table:{disable:!0}},"--Icon-svg":{table:{disable:!0}},symbol:{...t.symbol,control:{type:"text"},description:'<a href="https://lucide.dev/icons/" target="_blank">Lucide</a> icon name. Note that only icons available in Lucide v'+l+" are supported.",table:{...t.symbol?.table,type:{summary:"string"}}},size:{...t.size,control:{type:"select"},options:u,description:"Icon size preset"},gradient:{...t.gradient,control:{type:"select"},options:m,description:"Gradient theme icon fill. When not set, icon inherits parent text color."},customSize:{name:"--Icon-size",control:{type:"text"},description:'Custom icon size - overrides the size preset (e.g., "3rem", "48px")',table:{category:"CSS Properties"}},customFill:{name:"--Icon-fill",control:{type:"text"},description:'An advanced option for creating filled-in icons via built-in CSS SVG styling. Works best with simple icons like "heart" or "star".',table:{category:"CSS Properties"}}},render:e=>{const r={};return e.customSize&&(r["--Icon-size"]=e.customSize),e.customFill&&(r["--Icon-fill"]=e.customFill),a`<btu-icon
17
+ <p>All icons are from <a href="https://lucide.dev/icons/" target="_blank">Lucide</a>. Note that the Lucide library is updated regularly, but the Brightspot UI library uses <strong>Lucide v${c}</strong>. Keep this in mind when choosing icons for your project, as icon names and styles may differ between versions.</p>
18
+ `}},actions:{handles:u},controls:{expanded:!0}},args:{...b,symbol:"heart",size:"md"},argTypes:{...s,"--Icon-size":{table:{disable:!0}},"--Icon-fill":{table:{disable:!0}},"--Icon-stroke-width":{table:{disable:!0}},"--Icon-svg":{table:{disable:!0}},symbol:{...s.symbol,control:{type:"text"},description:'<a href="https://lucide.dev/icons/" target="_blank">Lucide</a> icon name. Note that only icons available in Lucide v'+c+" are supported.",table:{...s.symbol?.table,type:{summary:"string"}}},size:{...s.size,control:{type:"select"},options:m,description:"Icon size preset"},gradient:{...s.gradient,control:{type:"select"},options:g,description:"Gradient theme icon fill. When not set, icon inherits parent text color."},customSize:{name:"--Icon-size",control:{type:"text"},description:'Custom icon size - overrides the size preset (e.g., "3rem", "48px")',table:{category:"CSS Properties"}},customFill:{name:"--Icon-fill",control:{type:"text"},description:'An advanced option for creating filled-in icons via built-in CSS SVG styling. Works best with simple icons like "heart" or "star".',table:{category:"CSS Properties"}},customStrokeWidth:{name:"--Icon-stroke-width",control:{type:"range",min:.5,max:4,step:.25},description:"SVG stroke width as a unitless number in viewBox units; scales visually with icon size (default: 2).",table:{category:"CSS Properties"}}},render:e=>{const n={};return e.customSize&&(n["--Icon-size"]=e.customSize),e.customFill&&(n["--Icon-fill"]=e.customFill),e.customStrokeWidth&&(n["--Icon-stroke-width"]=e.customStrokeWidth),t`<btu-icon
19
19
  symbol="${e.symbol}"
20
20
  size="${e.size}"
21
21
  gradient="${e.gradient||""}"
22
- style=${d(r)}
23
- ></btu-icon>`}},s={args:{}},n={render:()=>a`<div class="flex items-center gap-4">
22
+ style=${p(n)}
23
+ ></btu-icon>`}},i={args:{}},o={render:()=>t`<div class="flex items-center gap-4">
24
24
  <btu-icon symbol="heart" size="xs"></btu-icon>
25
25
  <btu-icon symbol="heart" size="sm"></btu-icon>
26
26
  <btu-icon symbol="heart" size="md"></btu-icon>
27
27
  <btu-icon symbol="heart" size="lg"></btu-icon>
28
28
  <btu-icon symbol="heart" size="xl"></btu-icon>
29
- </div>`,parameters:{docs:{description:{story:"Icons come in five preset sizes: xs, sm, md, lg, and xl. Choose the size that best fits your design context."}}}},i={render:()=>a`<div class="flex flex-wrap items-center justify-between gap-4 px-4">
29
+ </div>`,parameters:{docs:{description:{story:"Icons come in five preset sizes: xs, sm, md, lg, and xl. Choose the size that best fits your design context."}}}},a={render:()=>t`<div class="flex items-center gap-6">
30
+ ${[1,1.5,2,2.5,3].map(e=>t`<div class="flex flex-col items-center gap-2">
31
+ <btu-icon symbol="heart" size="xl" style="--Icon-stroke-width: ${e}"></btu-icon>
32
+ <span class="text-xs font-bold">${e}</span>
33
+ </div>`)}
34
+ </div>`,parameters:{docs:{description:{story:"Control stroke thickness via the `--Icon-stroke-width` CSS custom property. The value is a unitless number in SVG viewBox units (the icons use a 24×24 coordinate system). Because the stroke is defined in viewBox units, it scales proportionally with the icon — a stroke-width of 2 will appear visually thicker on a larger icon. Note: this property does not affect gradient icons, which use a static mask image where stroke-width is baked in."}}}},r={render:()=>t`<div class="flex flex-wrap items-center justify-between gap-4 px-4">
30
35
  <div class="flex flex-col items-center gap-2">
31
36
  <btu-icon symbol="zap" size="xl" gradient="primary"></btu-icon>
32
37
  <span class="text-xs font-bold">primary</span>
@@ -59,7 +64,7 @@ import{g as c,x as a}from"./iframe-CsKt54V3.js";import{o as d}from"./style-map-k
59
64
  <btu-icon symbol="flower" size="xl" gradient="rose"></btu-icon>
60
65
  <span class="text-xs font-bold">rose</span>
61
66
  </div>
62
- </div>`,parameters:{docs:{description:{story:"Icons support gradient fills using the following theme colors. Set the `gradient` attribute to one of the theme colors and watch the icon's color come to life! Note that gradient icons use mask-based rendering for smooth color transitions."}}}},o={render:()=>a`<div class="flex flex-col gap-6">
67
+ </div>`,parameters:{docs:{description:{story:"Icons support gradient fills using the following theme colors. Set the `gradient` attribute to one of the theme colors and watch the icon's color come to life! Note that gradient icons use mask-based rendering for smooth color transitions."}}}},l={render:()=>t`<div class="flex flex-col gap-6">
63
68
  <div class="flex items-center gap-2">
64
69
  <strong>Custom sizing:</strong>
65
70
  <btu-icon symbol="trophy" size="md" style="--Icon-size: 4rem" class="text-warning-500"></btu-icon>
@@ -112,9 +117,9 @@ import{g as c,x as a}from"./iframe-CsKt54V3.js";import{o as d}from"./style-map-k
112
117
  <span class="ml-1">Favorite</span>
113
118
  </button>
114
119
  </div>
115
- </div>`,parameters:{docs:{description:{story:'\n- **Custom sizing** is available via the `--Icon-size` CSS property for precise control. \n- You can create **filled icons** by setting the `--Icon-fill: currentColor` CSS property. Note that this works best with simple icons like "heart" or "star".\n\n- **RTL language support:** Directional icons can be flipped for right-to-left languages using Tailwind\'s `rtl:-scale-x-100` utility class. This ensures icons like panels, arrows, and navigation elements point in the correct direction.\n\n**Accessibility best practices:**\n- If an icon conveys information and there is no visible text to accompany it (e.g., a delete button with only a trash can icon), add an `aria-label` attribute to the component to help users using screen readers understand its purpose.\n- If an icon is purely decorative (e.g. a sparkle icon, accompanying text that already conveys meaning), add `aria-hidden="true"` to the icon to hide it from screen readers.\n- You may consider adding a tooltip (via `title` attribute) to icon buttons for better discoverability.'}}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
120
+ </div>`,parameters:{docs:{description:{story:'\n- **Custom sizing** is available via the `--Icon-size` CSS property for precise control.\n- You can create **filled icons** by setting the `--Icon-fill: currentColor` CSS property. Note that this works best with simple icons like "heart" or "star".\n\n- **RTL language support:** Directional icons can be flipped for right-to-left languages using Tailwind\'s `rtl:-scale-x-100` utility class. This ensures icons like panels, arrows, and navigation elements point in the correct direction.\n\n**Accessibility best practices:**\n- If an icon conveys information and there is no visible text to accompany it (e.g., a delete button with only a trash can icon), add an `aria-label` attribute to the component to help users using screen readers understand its purpose.\n- If an icon is purely decorative (e.g. a sparkle icon, accompanying text that already conveys meaning), add `aria-hidden="true"` to the icon to hide it from screen readers.\n- You may consider adding a tooltip (via `title` attribute) to icon buttons for better discoverability.'}}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
116
121
  args: {}
117
- }`,...s.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
122
+ }`,...i.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
118
123
  render: () => html\`<div class="flex items-center gap-4">
119
124
  <btu-icon symbol="heart" size="xs"></btu-icon>
120
125
  <btu-icon symbol="heart" size="sm"></btu-icon>
@@ -129,7 +134,21 @@ import{g as c,x as a}from"./iframe-CsKt54V3.js";import{o as d}from"./style-map-k
129
134
  }
130
135
  }
131
136
  }
132
- }`,...n.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
137
+ }`,...o.parameters?.docs?.source}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
138
+ render: () => html\`<div class="flex items-center gap-6">
139
+ \${[1, 1.5, 2, 2.5, 3].map(w => html\`<div class="flex flex-col items-center gap-2">
140
+ <btu-icon symbol="heart" size="xl" style="--Icon-stroke-width: \${w}"></btu-icon>
141
+ <span class="text-xs font-bold">\${w}</span>
142
+ </div>\`)}
143
+ </div>\`,
144
+ parameters: {
145
+ docs: {
146
+ description: {
147
+ story: \`Control stroke thickness via the \\\`--Icon-stroke-width\\\` CSS custom property. The value is a unitless number in SVG viewBox units (the icons use a 24\\u00d724 coordinate system). Because the stroke is defined in viewBox units, it scales proportionally with the icon — a stroke-width of 2 will appear visually thicker on a larger icon. Note: this property does not affect gradient icons, which use a static mask image where stroke-width is baked in.\`
148
+ }
149
+ }
150
+ }
151
+ }`,...a.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
133
152
  render: () => html\`<div class="flex flex-wrap items-center justify-between gap-4 px-4">
134
153
  <div class="flex flex-col items-center gap-2">
135
154
  <btu-icon symbol="zap" size="xl" gradient="primary"></btu-icon>
@@ -171,7 +190,7 @@ import{g as c,x as a}from"./iframe-CsKt54V3.js";import{o as d}from"./style-map-k
171
190
  }
172
191
  }
173
192
  }
174
- }`,...i.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
193
+ }`,...r.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
175
194
  render: () => html\`<div class="flex flex-col gap-6">
176
195
  <div class="flex items-center gap-2">
177
196
  <strong>Custom sizing:</strong>
@@ -230,7 +249,7 @@ import{g as c,x as a}from"./iframe-CsKt54V3.js";import{o as d}from"./style-map-k
230
249
  docs: {
231
250
  description: {
232
251
  story: \`
233
- - **Custom sizing** is available via the \\\`--Icon-size\\\` CSS property for precise control.
252
+ - **Custom sizing** is available via the \\\`--Icon-size\\\` CSS property for precise control.
234
253
  - You can create **filled icons** by setting the \\\`--Icon-fill: currentColor\\\` CSS property. Note that this works best with simple icons like "heart" or "star".
235
254
 
236
255
  - **RTL language support:** Directional icons can be flipped for right-to-left languages using Tailwind's \\\`rtl:-scale-x-100\\\` utility class. This ensures icons like panels, arrows, and navigation elements point in the correct direction.
@@ -242,4 +261,4 @@ import{g as c,x as a}from"./iframe-CsKt54V3.js";import{o as d}from"./style-map-k
242
261
  }
243
262
  }
244
263
  }
245
- }`,...o.parameters?.docs?.source}}};const h=["Default","Sizes","GradientIcons","AdvancedUsage"];export{o as AdvancedUsage,s as Default,i as GradientIcons,n as Sizes,h as __namedExportsOrder,v as default};
264
+ }`,...l.parameters?.docs?.source}}};const z=["Default","Sizes","StrokeWidths","GradientIcons","AdvancedUsage"];export{l as AdvancedUsage,i as Default,r as GradientIcons,o as Sizes,a as StrokeWidths,z as __namedExportsOrder,v as default};
@@ -1,4 +1,4 @@
1
- import{g as p,x as e}from"./iframe-CsKt54V3.js";import{o as b}from"./if-defined-D1UQmdjo.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:`
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-CsKt54V3.js";import{o as A}from"./style-map-kcS06w9f.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:`
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>
@@ -1,4 +1,4 @@
1
- import{g as m,x as o}from"./iframe-CsKt54V3.js";import{o as c}from"./style-map-kcS06w9f.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:`
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-CsKt54V3.js";import{o as c}from"./if-defined-D1UQmdjo.js";import{o as d}from"./style-map-kcS06w9f.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:`
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-CsKt54V3.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."},story:{inline:!1,iframeHeight:300}}}},s={render:()=>r`
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-CsKt54V3.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)."},story:{inline:!1,iframeHeight:300}}}},l={render:()=>r`
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-CsKt54V3.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-CsKt54V3.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-CsKt54V3.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
+ 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-CsKt54V3.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`
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>
@@ -1,4 +1,4 @@
1
- import{x as a}from"./iframe-CsKt54V3.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`
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: ;