@brightspot/ui 1.6.0 → 1.8.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 (97) hide show
  1. package/dist/components/dropdown/Dropdown.d.ts +172 -0
  2. package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
  3. package/dist/components/dropdown/Dropdown.js +407 -0
  4. package/dist/components/dropdown/Dropdown.js.map +1 -0
  5. package/dist/components/dropdown/DropdownItem.d.ts +108 -0
  6. package/dist/components/dropdown/DropdownItem.d.ts.map +1 -0
  7. package/dist/components/dropdown/DropdownItem.js +210 -0
  8. package/dist/components/dropdown/DropdownItem.js.map +1 -0
  9. package/dist/components/dropdown/DropdownMenu.d.ts +117 -0
  10. package/dist/components/dropdown/DropdownMenu.d.ts.map +1 -0
  11. package/dist/components/dropdown/DropdownMenu.js +295 -0
  12. package/dist/components/dropdown/DropdownMenu.js.map +1 -0
  13. package/dist/components/icon-button/IconButton.d.ts +85 -0
  14. package/dist/components/icon-button/IconButton.d.ts.map +1 -0
  15. package/dist/components/icon-button/IconButton.js +171 -0
  16. package/dist/components/icon-button/IconButton.js.map +1 -0
  17. package/dist/components/pagination/Pagination.d.ts +0 -1
  18. package/dist/components/pagination/Pagination.d.ts.map +1 -1
  19. package/dist/components/pagination/Pagination.js +22 -22
  20. package/dist/components/pagination/Pagination.js.map +1 -1
  21. package/dist/custom-elements.json +1212 -1
  22. package/dist/storybook/assets/Avatar.stories-XfJUoW42.js +213 -0
  23. package/dist/storybook/assets/{AvatarGroup.stories-BBkQuFKk.js → AvatarGroup.stories-CPkv0mVI.js} +1 -1
  24. package/dist/storybook/assets/{Badge.stories-mFZsls7i.js → Badge.stories-Z42hQyzK.js} +3 -3
  25. package/dist/storybook/assets/{Button.stories-CAWX17L1.js → Button.stories-DTcnCrp-.js} +1 -1
  26. package/dist/storybook/assets/{CircularProgress.stories-DBVt4Cg2.js → CircularProgress.stories-B59nHh_k.js} +6 -6
  27. package/dist/storybook/assets/{ClipboardMixin.stories-BH9E-OI6.js → ClipboardMixin.stories-C6DraZ93.js} +1 -1
  28. package/dist/storybook/assets/{Color-6BZIO3FS-CVnTzq2p.js → Color-6BZIO3FS-BuNGIaf5.js} +1 -1
  29. package/dist/storybook/assets/{Colors.stories-BFYmP0LL.js → Colors.stories-B3Capc8F.js} +1 -1
  30. package/dist/storybook/assets/{ComponentStatesMixin-Cu7YXkU8.js → ComponentStatesMixin-DRalOmcW.js} +1 -1
  31. package/dist/storybook/assets/{ComponentStatesMixin.stories-CAvyYt0H.js → ComponentStatesMixin.stories-TKD7YrVe.js} +1 -1
  32. package/dist/storybook/assets/{CopyToClipboard.stories-DbJZsp_L.js → CopyToClipboard.stories-Bv8jZ7TL.js} +1 -1
  33. package/dist/storybook/assets/{Debounce.stories-BiFiH1K9.js → Debounce.stories-CLwXI3OZ.js} +1 -1
  34. package/dist/storybook/assets/{DocsRenderer-LL677BLK-Bq6G4eeC.js → DocsRenderer-LL677BLK-DjMDalQg.js} +6 -6
  35. package/dist/storybook/assets/Dropdown.stories-D7X0Dbnt.js +697 -0
  36. package/dist/storybook/assets/{Events.stories-BsDBxh8_.js → Events.stories-Dgn1N8jT.js} +1 -1
  37. package/dist/storybook/assets/{Heading.stories-zGzWgHVO.js → Heading.stories-BcciQ3Ug.js} +1 -1
  38. package/dist/storybook/assets/{Icon.stories-B4T6sSwf.js → Icon.stories-BWqJoZUM.js} +11 -11
  39. package/dist/storybook/assets/IconButton.stories-BrMDAi9q.js +748 -0
  40. package/dist/storybook/assets/{LinearProgress.stories-qzqmUUwY.js → LinearProgress.stories-INijWBr_.js} +7 -7
  41. package/dist/storybook/assets/LucideDynamicLoader-jmdq8YDM.js +1 -0
  42. package/dist/storybook/assets/{Pagination.stories-B6Q-7taJ.js → Pagination.stories-CrExaWpC.js} +1 -1
  43. package/dist/storybook/assets/{Popover.stories-CGkU0SGv.js → Popover.stories-Bh6IUPG_.js} +5 -5
  44. package/dist/storybook/assets/{ReadyMixin-3YCzoG6W.js → ReadyMixin-C1lZU7vt.js} +1 -1
  45. package/dist/storybook/assets/{Rtc.stories-Y1MYTWAt.js → Rtc.stories-BHqFwgR7.js} +1 -1
  46. package/dist/storybook/assets/{ScrollShadow.stories-B9kSpLT1.js → ScrollShadow.stories-DnIj5cZF.js} +1 -1
  47. package/dist/storybook/assets/{Throttle.stories-BgvLDrS3.js → Throttle.stories-Dilsv90H.js} +1 -1
  48. package/dist/storybook/assets/Tooltip.stories-Dnb76OXa.js +143 -0
  49. package/dist/storybook/assets/{Widget.stories--JpqVyJe.js → Widget.stories-Cl-3dv15.js} +13 -13
  50. package/dist/storybook/assets/{WithTooltip-65CFNBJE-DNbD9hAX.js → WithTooltip-65CFNBJE-Bq21jhKM.js} +1 -1
  51. package/dist/storybook/assets/{formatter-EIJCOSYU-Cy8KIxab.js → formatter-EIJCOSYU-CwrejIu0.js} +1 -1
  52. package/dist/storybook/assets/if-defined-D1UQmdjo.js +1 -0
  53. package/dist/storybook/assets/iframe-CNxIA3cQ.css +1 -0
  54. package/dist/storybook/assets/{iframe-Dz6CxatW.js → iframe-CsKt54V3.js} +154 -154
  55. package/dist/storybook/assets/{index-CebChkmF.js → index-DQ0xe06s.js} +1 -1
  56. package/dist/storybook/assets/{onFind.stories-nHDImx0x.js → onFind.stories-CGeGoVR6.js} +1 -1
  57. package/dist/storybook/assets/{onRemove.stories-CBxYVPwd.js → onRemove.stories-DXOwfv14.js} +1 -1
  58. package/dist/storybook/assets/{onVisible.stories-D4Qewc9Y.js → onVisible.stories-DNzXceKW.js} +1 -1
  59. package/dist/storybook/assets/{style-map-BgW9piaW.js → style-map-kcS06w9f.js} +1 -1
  60. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-CROW1475.js → syntaxhighlighter-ED5Y7EFY-BnpaJz4a.js} +1 -1
  61. package/dist/storybook/iframe.html +2 -2
  62. package/dist/storybook/index.json +1 -1
  63. package/dist/storybook/project.json +1 -1
  64. package/dist/tailwind-plugin-button.js +10 -0
  65. package/dist/tailwind-plugin-button.js.map +1 -1
  66. package/dist/tailwind-plugin-button.ts +10 -0
  67. package/dist/tailwind-plugin-dropdown.d.ts +2 -0
  68. package/dist/tailwind-plugin-dropdown.d.ts.map +1 -0
  69. package/dist/tailwind-plugin-dropdown.js +223 -0
  70. package/dist/tailwind-plugin-dropdown.js.map +1 -0
  71. package/dist/tailwind-plugin-dropdown.ts +249 -0
  72. package/dist/tailwind-plugin-pagination.js +9 -21
  73. package/dist/tailwind-plugin-pagination.js.map +1 -1
  74. package/dist/tailwind-plugin-pagination.ts +10 -21
  75. package/dist/util/EventEmitterMixin.d.ts +17 -0
  76. package/dist/util/EventEmitterMixin.d.ts.map +1 -1
  77. package/dist/util/EventEmitterMixin.js.map +1 -1
  78. package/docs/components/Avatar.md +62 -0
  79. package/docs/components/AvatarGroup.md +52 -0
  80. package/docs/components/Badge.md +58 -0
  81. package/docs/components/CircularProgress.md +55 -0
  82. package/docs/components/CopyToClipboard.md +54 -0
  83. package/docs/components/Dropdown.md +100 -0
  84. package/docs/components/DropdownItem.md +64 -0
  85. package/docs/components/DropdownMenu.md +81 -0
  86. package/docs/components/Icon.md +61 -0
  87. package/docs/components/IconButton.md +63 -0
  88. package/docs/components/LinearProgress.md +40 -0
  89. package/docs/components/Pagination.md +95 -0
  90. package/docs/components/Popover.md +71 -0
  91. package/docs/components/README.md +25 -0
  92. package/docs/components/Widget.md +79 -0
  93. package/package.json +3 -2
  94. package/dist/storybook/assets/Avatar.stories-CafEcy4T.js +0 -214
  95. package/dist/storybook/assets/Tooltip.stories-POo1M-ew.js +0 -143
  96. package/dist/storybook/assets/if-defined-CngSGyRu.js +0 -1
  97. package/dist/storybook/assets/iframe-DiT9Iz2T.css +0 -1
@@ -0,0 +1,748 @@
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:`
2
+ <h3>When to use:</h3>
3
+ <ul>
4
+ <li>For actions in compact or space-constrained interfaces (toolbars, tables, cards)</li>
5
+ <li>When the icon clearly communicates the action without a text label</li>
6
+ <li>As icon-only variants of existing text buttons</li>
7
+ </ul>
8
+
9
+ <h3>Accessibility:</h3>
10
+ <ul>
11
+ <li>Always provide an <code>aria-label</code> or <code>tooltip</code> for screen readers</li>
12
+ <li>Use the <code>tooltip</code> attribute to surface the action name on hover/focus</li>
13
+ <li>Use <code>destructive</code> for actions that cannot be undone</li>
14
+ </ul>
15
+
16
+ <h3>CSS Customization:</h3>
17
+ <p>Icons are powered by the <a href="?path=/docs/components-icon--docs">Icon component</a>. and the button styles are from the <a href="?path=/docs/css-plugins-button--docs">Button plugin</a>. Visit their docs for all available CSS property overrides.</p>
18
+ `}},actions:{handles:u},controls:{expanded:!0}},args:{...y,"icon-symbol":"pencil",type:"primary",size:"medium",destructive:!1,tooltip:"Edit item"},argTypes:{...o,tooltip:{...o.tooltip,control:{type:"text"},description:"Tooltip text shown on hover (via TooltipMixin)",table:{category:"Tooltip"}},"tooltip-position":{...o["tooltip-position"],control:{type:"select"},options:["top","bottom","left","right"],description:"Tooltip placement",table:{category:"Tooltip"}},"icon-symbol":{...o["icon-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'+d+" are supported."},size:{...o.size,control:{type:"select"},options:["small","medium","large"]},type:{...o.type,control:{type:"select"},options:["primary","primary-clear","primary-stroke","secondary","secondary-clear","secondary-stroke","tertiary","tertiary-clear","tertiary-stroke"]}},render:t=>e`
19
+ <btu-icon-button
20
+ icon-symbol="${t["icon-symbol"]??"circle-dashed"}"
21
+ type="${t.type??"primary"}"
22
+ size="${t.size??"medium"}"
23
+ aria-label="Edit"
24
+ name=${b(t.name||void 0)}
25
+ tooltip=${b(t.tooltip||void 0)}
26
+ tooltip-position="${t["tooltip-position"]??"top"}"
27
+ ?destructive="${t.destructive}"
28
+ ?disabled="${t.disabled}"
29
+ ></btu-icon-button>
30
+ `},n={parameters:{docs:{description:{story:"Default icon button with primary type. Always pair with an `aria-label` or `tooltip` for accessibility."}}}},i={render:()=>e`
31
+ <div style="display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;">
32
+ <btu-icon-button icon-symbol="pencil" type="primary" tooltip="primary" aria-label="primary"></btu-icon-button>
33
+ <btu-icon-button
34
+ icon-symbol="pencil"
35
+ type="primary-clear"
36
+ tooltip="primary-clear"
37
+ aria-label="primary-clear"
38
+ ></btu-icon-button>
39
+ <btu-icon-button
40
+ icon-symbol="pencil"
41
+ type="primary-stroke"
42
+ tooltip="primary-stroke"
43
+ aria-label="primary-stroke"
44
+ ></btu-icon-button>
45
+ <btu-icon-button
46
+ icon-symbol="pencil"
47
+ type="secondary"
48
+ tooltip="secondary"
49
+ aria-label="secondary"
50
+ ></btu-icon-button>
51
+ <btu-icon-button
52
+ icon-symbol="pencil"
53
+ type="secondary-clear"
54
+ tooltip="secondary-clear"
55
+ aria-label="secondary-clear"
56
+ ></btu-icon-button>
57
+ <btu-icon-button
58
+ icon-symbol="pencil"
59
+ type="secondary-stroke"
60
+ tooltip="secondary-stroke"
61
+ aria-label="secondary-stroke"
62
+ ></btu-icon-button>
63
+ <btu-icon-button icon-symbol="pencil" type="tertiary" tooltip="tertiary" aria-label="tertiary"></btu-icon-button>
64
+ <btu-icon-button
65
+ icon-symbol="pencil"
66
+ type="tertiary-clear"
67
+ tooltip="tertiary-clear"
68
+ aria-label="tertiary-clear"
69
+ ></btu-icon-button>
70
+ <btu-icon-button
71
+ icon-symbol="pencil"
72
+ type="tertiary-stroke"
73
+ tooltip="tertiary-stroke"
74
+ aria-label="tertiary-stroke"
75
+ ></btu-icon-button>
76
+ </div>
77
+ `,parameters:{docs:{description:{story:"All available types. Solid variants have a filled background; `-clear` removes the fill; `-stroke` adds an outline."}}}},a={render:()=>e`
78
+ <div style="display: flex; gap: 1rem; align-items: center;">
79
+ <btu-icon-button icon-symbol="pencil" size="small" tooltip="small" aria-label="small"></btu-icon-button>
80
+ <btu-icon-button icon-symbol="pencil" size="medium" tooltip="medium" aria-label="medium"></btu-icon-button>
81
+ <btu-icon-button icon-symbol="pencil" size="large" tooltip="large" aria-label="large"></btu-icon-button>
82
+ </div>
83
+ `,parameters:{docs:{description:{story:"Available in three sizes: `small`, `medium` (default), and `large`."}}}},r={render:()=>e`
84
+ <div style="display: flex; gap: 1rem; align-items: center;">
85
+ <btu-icon-button
86
+ icon-symbol="trash-2"
87
+ type="primary"
88
+ destructive
89
+ tooltip="Delete (primary)"
90
+ aria-label="Delete"
91
+ ></btu-icon-button>
92
+ <btu-icon-button
93
+ icon-symbol="trash-2"
94
+ type="primary-clear"
95
+ destructive
96
+ tooltip="Delete (primary-clear)"
97
+ aria-label="Delete"
98
+ ></btu-icon-button>
99
+ <btu-icon-button
100
+ icon-symbol="trash-2"
101
+ type="secondary"
102
+ destructive
103
+ tooltip="Delete (secondary)"
104
+ aria-label="Delete"
105
+ ></btu-icon-button>
106
+ <btu-icon-button
107
+ icon-symbol="trash-2"
108
+ type="secondary-stroke"
109
+ destructive
110
+ tooltip="Delete (secondary-stroke)"
111
+ aria-label="Delete"
112
+ ></btu-icon-button>
113
+ </div>
114
+ `,parameters:{docs:{description:{story:"The `destructive` flag overrides the type color with the error color. Use for actions that cannot be undone."}}}},l={render:()=>e`
115
+ <div style="display: flex; gap: 2rem; align-items: center; padding: 3rem;">
116
+ <btu-icon-button
117
+ icon-symbol="pencil"
118
+ tooltip="Edit item"
119
+ tooltip-position="top"
120
+ aria-label="Edit"
121
+ ></btu-icon-button>
122
+ <btu-icon-button
123
+ icon-symbol="copy"
124
+ tooltip="Copy to clipboard"
125
+ tooltip-position="bottom"
126
+ aria-label="Copy"
127
+ ></btu-icon-button>
128
+ <btu-icon-button
129
+ icon-symbol="share-2"
130
+ tooltip="Share"
131
+ tooltip-position="left"
132
+ aria-label="Share"
133
+ type="secondary"
134
+ ></btu-icon-button>
135
+ <btu-icon-button
136
+ icon-symbol="download"
137
+ tooltip="Download"
138
+ tooltip-position="right"
139
+ aria-label="Download"
140
+ type="secondary"
141
+ ></btu-icon-button>
142
+ </div>
143
+ `,parameters:{docs:{description:{story:"Tooltip position can be set with `tooltip-position`. Defaults to `top`. Hover over each button to see the tooltip."}}}},s={render:()=>e`
144
+ <div style="display: flex; gap: 0.5rem; align-items: center;">
145
+ <btu-icon-button icon-symbol="pencil" type="secondary-clear" tooltip="Edit" aria-label="Edit"></btu-icon-button>
146
+ <btu-icon-button icon-symbol="copy" type="secondary-clear" tooltip="Copy" aria-label="Copy"></btu-icon-button>
147
+ <btu-icon-button
148
+ icon-symbol="trash-2"
149
+ type="secondary-clear"
150
+ destructive
151
+ tooltip="Delete"
152
+ aria-label="Delete"
153
+ ></btu-icon-button>
154
+ </div>
155
+ `,parameters:{docs:{description:{story:"Common action group pattern: edit, copy, and delete using `secondary-clear` with inline spacing."}}}},c={render:()=>e`
156
+ <div class="flex flex-col gap-6">
157
+ <div class="flex flex-col gap-2">
158
+ <strong>Custom border radius:</strong>
159
+ <div class="flex items-center gap-3">
160
+ <btu-icon-button
161
+ icon-symbol="circle-play"
162
+ type="primary"
163
+ style="--button-border-radius: 50%"
164
+ tooltip="Play"
165
+ aria-label="Play"
166
+ ></btu-icon-button>
167
+ <btu-icon-button
168
+ icon-symbol="circle-play"
169
+ type="secondary"
170
+ size="large"
171
+ style="--button-border-radius: 50%"
172
+ tooltip="Play"
173
+ aria-label="Play"
174
+ ></btu-icon-button>
175
+ <btu-icon-button
176
+ icon-symbol="settings"
177
+ type="tertiary-clear"
178
+ style="--button-border-radius: 0"
179
+ tooltip="Settings"
180
+ aria-label="Settings"
181
+ ></btu-icon-button>
182
+ </div>
183
+ </div>
184
+
185
+ <div class="flex flex-col gap-2">
186
+ <strong>Toolbar pattern:</strong>
187
+ <div
188
+ class="flex items-center gap-0.5 rounded-lg border border-gray-200 bg-white p-1"
189
+ style="width: fit-content"
190
+ >
191
+ <btu-icon-button
192
+ icon-symbol="bold"
193
+ type="secondary-clear"
194
+ size="small"
195
+ aria-label="Bold"
196
+ style="--button-border-radius: 0.25rem"
197
+ ></btu-icon-button>
198
+ <btu-icon-button
199
+ icon-symbol="italic"
200
+ type="secondary-clear"
201
+ size="small"
202
+ aria-label="Italic"
203
+ style="--button-border-radius: 0.25rem"
204
+ ></btu-icon-button>
205
+ <btu-icon-button
206
+ icon-symbol="underline"
207
+ type="secondary-clear"
208
+ size="small"
209
+ aria-label="Underline"
210
+ style="--button-border-radius: 0.25rem"
211
+ ></btu-icon-button>
212
+ <div style="width: 1px; height: 1.25rem; background: oklch(var(--btu-theme-gray-200))"></div>
213
+ <btu-icon-button
214
+ icon-symbol="align-left"
215
+ type="secondary-clear"
216
+ size="small"
217
+ aria-label="Align left"
218
+ style="--button-border-radius: 0.25rem"
219
+ ></btu-icon-button>
220
+ <btu-icon-button
221
+ icon-symbol="align-center"
222
+ type="secondary-clear"
223
+ size="small"
224
+ aria-label="Align center"
225
+ style="--button-border-radius: 0.25rem"
226
+ ></btu-icon-button>
227
+ <btu-icon-button
228
+ icon-symbol="align-right"
229
+ type="secondary-clear"
230
+ size="small"
231
+ aria-label="Align right"
232
+ style="--button-border-radius: 0.25rem"
233
+ ></btu-icon-button>
234
+ </div>
235
+ </div>
236
+
237
+ <div class="flex flex-col gap-2">
238
+ <strong>Destructive confirmation pair:</strong>
239
+ <div class="flex items-center gap-2">
240
+ <btu-icon-button
241
+ icon-symbol="x"
242
+ type="secondary-clear"
243
+ size="small"
244
+ tooltip="Cancel"
245
+ aria-label="Cancel"
246
+ ></btu-icon-button>
247
+ <btu-icon-button
248
+ icon-symbol="trash-2"
249
+ type="primary"
250
+ destructive
251
+ size="small"
252
+ tooltip="Confirm delete"
253
+ aria-label="Confirm delete"
254
+ ></btu-icon-button>
255
+ </div>
256
+ </div>
257
+
258
+ <div class="flex flex-col gap-2">
259
+ <strong>Card header actions:</strong>
260
+ <div class="rounded-lg border border-gray-200 bg-white" style="width: 20rem">
261
+ <div class="flex items-center justify-between border-b border-gray-200 px-4 py-3">
262
+ <span class="text-sm font-semibold text-gray-900">Recent Activity</span>
263
+ <div class="flex items-center gap-1">
264
+ <btu-icon-button
265
+ icon-symbol="refresh-cw"
266
+ type="secondary-clear"
267
+ size="small"
268
+ tooltip="Refresh"
269
+ aria-label="Refresh"
270
+ ></btu-icon-button>
271
+ <btu-icon-button
272
+ icon-symbol="maximize-2"
273
+ type="secondary-clear"
274
+ size="small"
275
+ tooltip="Expand"
276
+ aria-label="Expand"
277
+ ></btu-icon-button>
278
+ <btu-icon-button
279
+ icon-symbol="x"
280
+ type="secondary-clear"
281
+ size="small"
282
+ tooltip="Close"
283
+ aria-label="Close"
284
+ ></btu-icon-button>
285
+ </div>
286
+ </div>
287
+ <div class="p-4 text-sm text-gray-500">Card content area</div>
288
+ </div>
289
+ </div>
290
+
291
+ <div class="flex flex-col gap-2">
292
+ <strong>Toggle states with <code>aria-pressed</code>:</strong>
293
+ <div class="flex items-end gap-4">
294
+ <div class="flex flex-col items-center gap-1">
295
+ <btu-icon-button
296
+ icon-symbol="bookmark"
297
+ type="primary"
298
+ aria-label="Bookmark"
299
+ aria-pressed="true"
300
+ tooltip="Bookmarked"
301
+ ></btu-icon-button>
302
+ <span class="text-xs text-gray-400">pressed</span>
303
+ </div>
304
+ <div class="flex flex-col items-center gap-1">
305
+ <btu-icon-button
306
+ icon-symbol="bookmark"
307
+ type="secondary-clear"
308
+ aria-label="Bookmark"
309
+ aria-pressed="false"
310
+ tooltip="Not bookmarked"
311
+ ></btu-icon-button>
312
+ <span class="text-xs text-gray-400">default</span>
313
+ </div>
314
+ <div class="flex flex-col items-center gap-1">
315
+ <btu-icon-button
316
+ icon-symbol="bell"
317
+ type="primary"
318
+ aria-label="Notifications on"
319
+ aria-pressed="true"
320
+ tooltip="Notifications on"
321
+ ></btu-icon-button>
322
+ <span class="text-xs text-gray-400">pressed</span>
323
+ </div>
324
+ <div class="flex flex-col items-center gap-1">
325
+ <btu-icon-button
326
+ icon-symbol="bell-off"
327
+ type="secondary-clear"
328
+ aria-label="Notifications off"
329
+ aria-pressed="false"
330
+ tooltip="Notifications off"
331
+ ></btu-icon-button>
332
+ <span class="text-xs text-gray-400">default</span>
333
+ </div>
334
+ </div>
335
+ </div>
336
+
337
+ <div class="flex flex-col gap-2">
338
+ <strong>Size comparison across types:</strong>
339
+ <div class="flex items-end gap-4">
340
+ <div class="flex flex-col items-center gap-1">
341
+ <btu-icon-button icon-symbol="plus" type="primary" size="small" aria-label="Add"></btu-icon-button>
342
+ <span class="text-xs text-gray-400">sm</span>
343
+ </div>
344
+ <div class="flex flex-col items-center gap-1">
345
+ <btu-icon-button icon-symbol="plus" type="primary-stroke" size="medium" aria-label="Add"></btu-icon-button>
346
+ <span class="text-xs text-gray-400">md</span>
347
+ </div>
348
+ <div class="flex flex-col items-center gap-1">
349
+ <btu-icon-button icon-symbol="plus" type="tertiary" size="large" aria-label="Add"></btu-icon-button>
350
+ <span class="text-xs text-gray-400">lg</span>
351
+ </div>
352
+ </div>
353
+ </div>
354
+ </div>
355
+ `,parameters:{docs:{description:{story:"\n- **Custom border radius** via `--button-border-radius` CSS property — use `50%` for circular buttons or `0` for sharp corners.\n- **Toolbar pattern** uses `secondary-clear` with `small` size and reduced border-radius for a compact grouped layout.\n- **Destructive confirmation pair** combines a cancel action with a destructive confirm for inline delete flows.\n- **Card header actions** show a common pattern of icon buttons in a card/panel header for refresh, expand, and close.\n- **Toggle states** use `aria-pressed` to indicate on/off state — the button plugin provides pressed styling automatically.\n- **Size comparison** shows all three sizes side-by-side across different types for visual reference."}}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
356
+ parameters: {
357
+ docs: {
358
+ description: {
359
+ story: 'Default icon button with primary type. Always pair with an \`aria-label\` or \`tooltip\` for accessibility.'
360
+ }
361
+ }
362
+ }
363
+ }`,...n.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
364
+ render: () => html\`
365
+ <div style="display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;">
366
+ <btu-icon-button icon-symbol="pencil" type="primary" tooltip="primary" aria-label="primary"></btu-icon-button>
367
+ <btu-icon-button
368
+ icon-symbol="pencil"
369
+ type="primary-clear"
370
+ tooltip="primary-clear"
371
+ aria-label="primary-clear"
372
+ ></btu-icon-button>
373
+ <btu-icon-button
374
+ icon-symbol="pencil"
375
+ type="primary-stroke"
376
+ tooltip="primary-stroke"
377
+ aria-label="primary-stroke"
378
+ ></btu-icon-button>
379
+ <btu-icon-button
380
+ icon-symbol="pencil"
381
+ type="secondary"
382
+ tooltip="secondary"
383
+ aria-label="secondary"
384
+ ></btu-icon-button>
385
+ <btu-icon-button
386
+ icon-symbol="pencil"
387
+ type="secondary-clear"
388
+ tooltip="secondary-clear"
389
+ aria-label="secondary-clear"
390
+ ></btu-icon-button>
391
+ <btu-icon-button
392
+ icon-symbol="pencil"
393
+ type="secondary-stroke"
394
+ tooltip="secondary-stroke"
395
+ aria-label="secondary-stroke"
396
+ ></btu-icon-button>
397
+ <btu-icon-button icon-symbol="pencil" type="tertiary" tooltip="tertiary" aria-label="tertiary"></btu-icon-button>
398
+ <btu-icon-button
399
+ icon-symbol="pencil"
400
+ type="tertiary-clear"
401
+ tooltip="tertiary-clear"
402
+ aria-label="tertiary-clear"
403
+ ></btu-icon-button>
404
+ <btu-icon-button
405
+ icon-symbol="pencil"
406
+ type="tertiary-stroke"
407
+ tooltip="tertiary-stroke"
408
+ aria-label="tertiary-stroke"
409
+ ></btu-icon-button>
410
+ </div>
411
+ \`,
412
+ parameters: {
413
+ docs: {
414
+ description: {
415
+ story: 'All available types. Solid variants have a filled background; \`-clear\` removes the fill; \`-stroke\` adds an outline.'
416
+ }
417
+ }
418
+ }
419
+ }`,...i.parameters?.docs?.source}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
420
+ render: () => html\`
421
+ <div style="display: flex; gap: 1rem; align-items: center;">
422
+ <btu-icon-button icon-symbol="pencil" size="small" tooltip="small" aria-label="small"></btu-icon-button>
423
+ <btu-icon-button icon-symbol="pencil" size="medium" tooltip="medium" aria-label="medium"></btu-icon-button>
424
+ <btu-icon-button icon-symbol="pencil" size="large" tooltip="large" aria-label="large"></btu-icon-button>
425
+ </div>
426
+ \`,
427
+ parameters: {
428
+ docs: {
429
+ description: {
430
+ story: 'Available in three sizes: \`small\`, \`medium\` (default), and \`large\`.'
431
+ }
432
+ }
433
+ }
434
+ }`,...a.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
435
+ render: () => html\`
436
+ <div style="display: flex; gap: 1rem; align-items: center;">
437
+ <btu-icon-button
438
+ icon-symbol="trash-2"
439
+ type="primary"
440
+ destructive
441
+ tooltip="Delete (primary)"
442
+ aria-label="Delete"
443
+ ></btu-icon-button>
444
+ <btu-icon-button
445
+ icon-symbol="trash-2"
446
+ type="primary-clear"
447
+ destructive
448
+ tooltip="Delete (primary-clear)"
449
+ aria-label="Delete"
450
+ ></btu-icon-button>
451
+ <btu-icon-button
452
+ icon-symbol="trash-2"
453
+ type="secondary"
454
+ destructive
455
+ tooltip="Delete (secondary)"
456
+ aria-label="Delete"
457
+ ></btu-icon-button>
458
+ <btu-icon-button
459
+ icon-symbol="trash-2"
460
+ type="secondary-stroke"
461
+ destructive
462
+ tooltip="Delete (secondary-stroke)"
463
+ aria-label="Delete"
464
+ ></btu-icon-button>
465
+ </div>
466
+ \`,
467
+ parameters: {
468
+ docs: {
469
+ description: {
470
+ story: 'The \`destructive\` flag overrides the type color with the error color. Use for actions that cannot be undone.'
471
+ }
472
+ }
473
+ }
474
+ }`,...r.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
475
+ render: () => html\`
476
+ <div style="display: flex; gap: 2rem; align-items: center; padding: 3rem;">
477
+ <btu-icon-button
478
+ icon-symbol="pencil"
479
+ tooltip="Edit item"
480
+ tooltip-position="top"
481
+ aria-label="Edit"
482
+ ></btu-icon-button>
483
+ <btu-icon-button
484
+ icon-symbol="copy"
485
+ tooltip="Copy to clipboard"
486
+ tooltip-position="bottom"
487
+ aria-label="Copy"
488
+ ></btu-icon-button>
489
+ <btu-icon-button
490
+ icon-symbol="share-2"
491
+ tooltip="Share"
492
+ tooltip-position="left"
493
+ aria-label="Share"
494
+ type="secondary"
495
+ ></btu-icon-button>
496
+ <btu-icon-button
497
+ icon-symbol="download"
498
+ tooltip="Download"
499
+ tooltip-position="right"
500
+ aria-label="Download"
501
+ type="secondary"
502
+ ></btu-icon-button>
503
+ </div>
504
+ \`,
505
+ parameters: {
506
+ docs: {
507
+ description: {
508
+ story: 'Tooltip position can be set with \`tooltip-position\`. Defaults to \`top\`. Hover over each button to see the tooltip.'
509
+ }
510
+ }
511
+ }
512
+ }`,...l.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
513
+ render: () => html\`
514
+ <div style="display: flex; gap: 0.5rem; align-items: center;">
515
+ <btu-icon-button icon-symbol="pencil" type="secondary-clear" tooltip="Edit" aria-label="Edit"></btu-icon-button>
516
+ <btu-icon-button icon-symbol="copy" type="secondary-clear" tooltip="Copy" aria-label="Copy"></btu-icon-button>
517
+ <btu-icon-button
518
+ icon-symbol="trash-2"
519
+ type="secondary-clear"
520
+ destructive
521
+ tooltip="Delete"
522
+ aria-label="Delete"
523
+ ></btu-icon-button>
524
+ </div>
525
+ \`,
526
+ parameters: {
527
+ docs: {
528
+ description: {
529
+ story: 'Common action group pattern: edit, copy, and delete using \`secondary-clear\` with inline spacing.'
530
+ }
531
+ }
532
+ }
533
+ }`,...s.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
534
+ render: () => html\`
535
+ <div class="flex flex-col gap-6">
536
+ <div class="flex flex-col gap-2">
537
+ <strong>Custom border radius:</strong>
538
+ <div class="flex items-center gap-3">
539
+ <btu-icon-button
540
+ icon-symbol="circle-play"
541
+ type="primary"
542
+ style="--button-border-radius: 50%"
543
+ tooltip="Play"
544
+ aria-label="Play"
545
+ ></btu-icon-button>
546
+ <btu-icon-button
547
+ icon-symbol="circle-play"
548
+ type="secondary"
549
+ size="large"
550
+ style="--button-border-radius: 50%"
551
+ tooltip="Play"
552
+ aria-label="Play"
553
+ ></btu-icon-button>
554
+ <btu-icon-button
555
+ icon-symbol="settings"
556
+ type="tertiary-clear"
557
+ style="--button-border-radius: 0"
558
+ tooltip="Settings"
559
+ aria-label="Settings"
560
+ ></btu-icon-button>
561
+ </div>
562
+ </div>
563
+
564
+ <div class="flex flex-col gap-2">
565
+ <strong>Toolbar pattern:</strong>
566
+ <div
567
+ class="flex items-center gap-0.5 rounded-lg border border-gray-200 bg-white p-1"
568
+ style="width: fit-content"
569
+ >
570
+ <btu-icon-button
571
+ icon-symbol="bold"
572
+ type="secondary-clear"
573
+ size="small"
574
+ aria-label="Bold"
575
+ style="--button-border-radius: 0.25rem"
576
+ ></btu-icon-button>
577
+ <btu-icon-button
578
+ icon-symbol="italic"
579
+ type="secondary-clear"
580
+ size="small"
581
+ aria-label="Italic"
582
+ style="--button-border-radius: 0.25rem"
583
+ ></btu-icon-button>
584
+ <btu-icon-button
585
+ icon-symbol="underline"
586
+ type="secondary-clear"
587
+ size="small"
588
+ aria-label="Underline"
589
+ style="--button-border-radius: 0.25rem"
590
+ ></btu-icon-button>
591
+ <div style="width: 1px; height: 1.25rem; background: oklch(var(--btu-theme-gray-200))"></div>
592
+ <btu-icon-button
593
+ icon-symbol="align-left"
594
+ type="secondary-clear"
595
+ size="small"
596
+ aria-label="Align left"
597
+ style="--button-border-radius: 0.25rem"
598
+ ></btu-icon-button>
599
+ <btu-icon-button
600
+ icon-symbol="align-center"
601
+ type="secondary-clear"
602
+ size="small"
603
+ aria-label="Align center"
604
+ style="--button-border-radius: 0.25rem"
605
+ ></btu-icon-button>
606
+ <btu-icon-button
607
+ icon-symbol="align-right"
608
+ type="secondary-clear"
609
+ size="small"
610
+ aria-label="Align right"
611
+ style="--button-border-radius: 0.25rem"
612
+ ></btu-icon-button>
613
+ </div>
614
+ </div>
615
+
616
+ <div class="flex flex-col gap-2">
617
+ <strong>Destructive confirmation pair:</strong>
618
+ <div class="flex items-center gap-2">
619
+ <btu-icon-button
620
+ icon-symbol="x"
621
+ type="secondary-clear"
622
+ size="small"
623
+ tooltip="Cancel"
624
+ aria-label="Cancel"
625
+ ></btu-icon-button>
626
+ <btu-icon-button
627
+ icon-symbol="trash-2"
628
+ type="primary"
629
+ destructive
630
+ size="small"
631
+ tooltip="Confirm delete"
632
+ aria-label="Confirm delete"
633
+ ></btu-icon-button>
634
+ </div>
635
+ </div>
636
+
637
+ <div class="flex flex-col gap-2">
638
+ <strong>Card header actions:</strong>
639
+ <div class="rounded-lg border border-gray-200 bg-white" style="width: 20rem">
640
+ <div class="flex items-center justify-between border-b border-gray-200 px-4 py-3">
641
+ <span class="text-sm font-semibold text-gray-900">Recent Activity</span>
642
+ <div class="flex items-center gap-1">
643
+ <btu-icon-button
644
+ icon-symbol="refresh-cw"
645
+ type="secondary-clear"
646
+ size="small"
647
+ tooltip="Refresh"
648
+ aria-label="Refresh"
649
+ ></btu-icon-button>
650
+ <btu-icon-button
651
+ icon-symbol="maximize-2"
652
+ type="secondary-clear"
653
+ size="small"
654
+ tooltip="Expand"
655
+ aria-label="Expand"
656
+ ></btu-icon-button>
657
+ <btu-icon-button
658
+ icon-symbol="x"
659
+ type="secondary-clear"
660
+ size="small"
661
+ tooltip="Close"
662
+ aria-label="Close"
663
+ ></btu-icon-button>
664
+ </div>
665
+ </div>
666
+ <div class="p-4 text-sm text-gray-500">Card content area</div>
667
+ </div>
668
+ </div>
669
+
670
+ <div class="flex flex-col gap-2">
671
+ <strong>Toggle states with <code>aria-pressed</code>:</strong>
672
+ <div class="flex items-end gap-4">
673
+ <div class="flex flex-col items-center gap-1">
674
+ <btu-icon-button
675
+ icon-symbol="bookmark"
676
+ type="primary"
677
+ aria-label="Bookmark"
678
+ aria-pressed="true"
679
+ tooltip="Bookmarked"
680
+ ></btu-icon-button>
681
+ <span class="text-xs text-gray-400">pressed</span>
682
+ </div>
683
+ <div class="flex flex-col items-center gap-1">
684
+ <btu-icon-button
685
+ icon-symbol="bookmark"
686
+ type="secondary-clear"
687
+ aria-label="Bookmark"
688
+ aria-pressed="false"
689
+ tooltip="Not bookmarked"
690
+ ></btu-icon-button>
691
+ <span class="text-xs text-gray-400">default</span>
692
+ </div>
693
+ <div class="flex flex-col items-center gap-1">
694
+ <btu-icon-button
695
+ icon-symbol="bell"
696
+ type="primary"
697
+ aria-label="Notifications on"
698
+ aria-pressed="true"
699
+ tooltip="Notifications on"
700
+ ></btu-icon-button>
701
+ <span class="text-xs text-gray-400">pressed</span>
702
+ </div>
703
+ <div class="flex flex-col items-center gap-1">
704
+ <btu-icon-button
705
+ icon-symbol="bell-off"
706
+ type="secondary-clear"
707
+ aria-label="Notifications off"
708
+ aria-pressed="false"
709
+ tooltip="Notifications off"
710
+ ></btu-icon-button>
711
+ <span class="text-xs text-gray-400">default</span>
712
+ </div>
713
+ </div>
714
+ </div>
715
+
716
+ <div class="flex flex-col gap-2">
717
+ <strong>Size comparison across types:</strong>
718
+ <div class="flex items-end gap-4">
719
+ <div class="flex flex-col items-center gap-1">
720
+ <btu-icon-button icon-symbol="plus" type="primary" size="small" aria-label="Add"></btu-icon-button>
721
+ <span class="text-xs text-gray-400">sm</span>
722
+ </div>
723
+ <div class="flex flex-col items-center gap-1">
724
+ <btu-icon-button icon-symbol="plus" type="primary-stroke" size="medium" aria-label="Add"></btu-icon-button>
725
+ <span class="text-xs text-gray-400">md</span>
726
+ </div>
727
+ <div class="flex flex-col items-center gap-1">
728
+ <btu-icon-button icon-symbol="plus" type="tertiary" size="large" aria-label="Add"></btu-icon-button>
729
+ <span class="text-xs text-gray-400">lg</span>
730
+ </div>
731
+ </div>
732
+ </div>
733
+ </div>
734
+ \`,
735
+ parameters: {
736
+ docs: {
737
+ description: {
738
+ story: \`
739
+ - **Custom border radius** via \\\`--button-border-radius\\\` CSS property — use \\\`50%\\\` for circular buttons or \\\`0\\\` for sharp corners.
740
+ - **Toolbar pattern** uses \\\`secondary-clear\\\` with \\\`small\\\` size and reduced border-radius for a compact grouped layout.
741
+ - **Destructive confirmation pair** combines a cancel action with a destructive confirm for inline delete flows.
742
+ - **Card header actions** show a common pattern of icon buttons in a card/panel header for refresh, expand, and close.
743
+ - **Toggle states** use \\\`aria-pressed\\\` to indicate on/off state — the button plugin provides pressed styling automatically.
744
+ - **Size comparison** shows all three sizes side-by-side across different types for visual reference.\`
745
+ }
746
+ }
747
+ }
748
+ }`,...c.parameters?.docs?.source}}};const h=["Default","Types","Sizes","Destructive","WithTooltip","CommonActions","AdvancedUsage"];export{c as AdvancedUsage,s as CommonActions,n as Default,r as Destructive,a as Sizes,i as Types,l as WithTooltip,h as __namedExportsOrder,x as default};