@brightspot/ui 6.3.5 → 6.4.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/README.md +2 -0
- package/dist/components/popover/Popover.d.ts +21 -0
- package/dist/components/popover/Popover.d.ts.map +1 -1
- package/dist/components/popover/Popover.js +85 -0
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/components/tabs/Tab.d.ts +1 -1
- package/dist/components/tabs/Tab.js +1 -1
- package/dist/custom-elements.json +14 -1
- package/dist/storybook/assets/{ActionBar.stories-CgkvHW27.js → ActionBar.stories-CyrWbZkU.js} +1 -1
- package/dist/storybook/assets/{ActionItem.stories-CyxwhrvR.js → ActionItem.stories-D289PqhK.js} +1 -1
- package/dist/storybook/assets/{AiSparkle.stories-h2LSw10e.js → AiSparkle.stories-Dej2Wktc.js} +1 -1
- package/dist/storybook/assets/{Avatar.stories-CQ3eFTbI.js → Avatar.stories-DGUhUkwq.js} +1 -1
- package/dist/storybook/assets/{AvatarGroup.stories-CIyZOd7R.js → AvatarGroup.stories-CPwRaMIK.js} +1 -1
- package/dist/storybook/assets/{Badge.stories-CwPkYUuY.js → Badge.stories-0KzitC2n.js} +1 -1
- package/dist/storybook/assets/{Banner.stories-B7AhWymc.js → Banner.stories-DNtqnXAp.js} +1 -1
- package/dist/storybook/assets/{Button-fLz-Mqji.js → Button-CWHtTXwM.js} +1 -1
- package/dist/storybook/assets/{Button.stories-Bj_cB5Tr.js → Button.stories-Bi-MajOM.js} +1 -1
- package/dist/storybook/assets/{ButtonGroup.stories-DMAr8q3A.js → ButtonGroup.stories-DRVCaM3T.js} +1 -1
- package/dist/storybook/assets/{Card.stories-CouVkvTr.js → Card.stories-Ca21MUf2.js} +1 -1
- package/dist/storybook/assets/{Celebrate.stories-Cai7aITx.js → Celebrate.stories-d4ouDVSf.js} +1 -1
- package/dist/storybook/assets/{Checkbox.stories-BTzuHih7.js → Checkbox.stories-DGYMCoPL.js} +1 -1
- package/dist/storybook/assets/{CircularProgress.stories-DwiMDCrW.js → CircularProgress.stories-TLUKn59S.js} +1 -1
- package/dist/storybook/assets/{ClipboardMixin.stories-BTzKKsAG.js → ClipboardMixin.stories-D4sLLX3A.js} +1 -1
- package/dist/storybook/assets/{Color-6BZIO3FS-z5x4axZs.js → Color-6BZIO3FS-DasxsVys.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-LjQN3QJP.js → Colors.stories-BcaxhrWi.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-CcWkxBPD.js → CombinedEffects.stories-Da1vPYog.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin-6JmalSeW.js → ComponentStatesMixin-C5-EArF-.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-wr7wl9D5.js → ComponentStatesMixin.stories-DPp1pnlh.js} +1 -1
- package/dist/storybook/assets/{CopyToClipboard.stories-CBL_GlzJ.js → CopyToClipboard.stories-CrYOAXIE.js} +1 -1
- package/dist/storybook/assets/{Debounce.stories-DDW0347e.js → Debounce.stories-OHpSSOWP.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-LHrG4h5r.js → DocsRenderer-LL677BLK-BBjqnKJz.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-BixGKdVC.js → Dropdown.stories-Ca_3OzYk.js} +1 -1
- package/dist/storybook/assets/{EmptyState.stories-DYCizkT5.js → EmptyState.stories-IJOBvkeQ.js} +1 -1
- package/dist/storybook/assets/{EscaAvatar.stories-IV0FybUu.js → EscaAvatar.stories-Ca5mrHK5.js} +1 -1
- package/dist/storybook/assets/{Events.stories-9X1B5LFU.js → Events.stories-mk3o4H-1.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-BWFKyeYP.js → Heading.stories-BCmCdDGL.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-KJySD4yc.js → HueRipple.stories-DFtimmD-.js} +1 -1
- package/dist/storybook/assets/{Icon.stories-n4-_RBwe.js → Icon.stories-CfsBM1vA.js} +1 -1
- package/dist/storybook/assets/{IconButton.stories--cc9Az0q.js → IconButton.stories-BqMbwr3s.js} +1 -1
- package/dist/storybook/assets/{LinearProgress.stories-CXISMQqr.js → LinearProgress.stories-BWdemzi0.js} +1 -1
- package/dist/storybook/assets/{Message.stories-DCgZ9H2r.js → Message.stories-Z_H9PmGg.js} +1 -1
- package/dist/storybook/assets/{OnFindMixin.stories-DwYEl4q4.js → OnFindMixin.stories-DmCtF_Py.js} +1 -1
- package/dist/storybook/assets/{Pagination.stories-B8AqV3jI.js → Pagination.stories-BbiH-XdZ.js} +1 -1
- package/dist/storybook/assets/{Popover.stories-Dj8TUysk.js → Popover.stories-bxWb2l8c.js} +97 -14
- package/dist/storybook/assets/{ReadyMixin-B1y8EBLz.js → ReadyMixin-DehOcbYB.js} +1 -1
- package/dist/storybook/assets/{RovingTabindexMixin.stories-BTYV78Cy.js → RovingTabindexMixin.stories-PDi3Gbmt.js} +1 -1
- package/dist/storybook/assets/{Rtc.stories-CiQ4OgEf.js → Rtc.stories-fVPUs7VO.js} +1 -1
- package/dist/storybook/assets/{ScrollShadow.stories-BRpbl9WU.js → ScrollShadow.stories-D7MTe49h.js} +1 -1
- package/dist/storybook/assets/{Switch.stories-Dfw56-LB.js → Switch.stories-_Xgp_9V4.js} +1 -1
- package/dist/storybook/assets/{Tab.stories-DCIPSPwr.js → Tab.stories-DgO_oZX0.js} +4 -4
- package/dist/storybook/assets/{Tabs.stories-DrT2D2oW.js → Tabs.stories-ChN1szFL.js} +1 -1
- package/dist/storybook/assets/{Throttle.stories-B5Y8K9s3.js → Throttle.stories-ClFkiAMe.js} +1 -1
- package/dist/storybook/assets/{Tooltip.stories-CUjm8cuW.js → Tooltip.stories-BHOdZEw2.js} +1 -1
- package/dist/storybook/assets/{Upload.stories-Dt7V8qIe.js → Upload.stories-BLs0X2F6.js} +1 -1
- package/dist/storybook/assets/{UploadItem.stories-DSXxGs8M.js → UploadItem.stories-CHCpPL7t.js} +1 -1
- package/dist/storybook/assets/{Welcome.stories-BDFQb8oF.js → Welcome.stories-DLoiQCnZ.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-CQnE1dST.js → Widget.stories-Bk4jjx7Q.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-D1OYJPzp.js → WithTooltip-65CFNBJE-Ckgk7wzk.js} +1 -1
- package/dist/storybook/assets/{blocks-Z0quNc1U.js → blocks-wSKOBuKH.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-DwWzDvJC.js → formatter-EIJCOSYU-DEpJ5Gq0.js} +1 -1
- package/dist/storybook/assets/if-defined-DphVHb7j.js +1 -0
- package/dist/storybook/assets/{iframe-WTEmYHJj.js → iframe-BSHPpSig.js} +4 -4
- package/dist/storybook/assets/iframe-D7jBrFjV.css +1 -0
- package/dist/storybook/assets/{index-BvPCa7_B.js → index-Cn8vvE6a.js} +1 -1
- package/dist/storybook/assets/{onFind-CqIRRMTv.js → onFind-DJOHkvQ2.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-C4PPQTaQ.js → onFind.stories-CTmXCV_g.js} +1 -1
- package/dist/storybook/assets/{onRemove.stories-BGFCh6DN.js → onRemove.stories-r7-2gQn3.js} +1 -1
- package/dist/storybook/assets/{onVisible.stories-4ni7syfJ.js → onVisible.stories-B_Lx-0SL.js} +1 -1
- package/dist/storybook/assets/{style-map-BhvFBtuB.js → style-map-uSz4USKK.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-D_cJwnoJ.js → syntaxhighlighter-ED5Y7EFY-D36nxrU2.js} +1 -1
- package/dist/storybook/iframe.html +2 -2
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind-plugin-badge.js +2 -2
- package/dist/tailwind-plugin-badge.ts +3 -3
- package/dist/tailwind-plugin-button-group.js +50 -27
- package/dist/tailwind-plugin-button-group.js.map +1 -1
- package/dist/tailwind-plugin-button-group.ts +61 -33
- package/dist/tailwind-plugin-button.js +15 -5
- package/dist/tailwind-plugin-button.js.map +1 -1
- package/dist/tailwind-plugin-button.ts +16 -5
- package/dist/tailwind-plugin-pagination.js +4 -1
- package/dist/tailwind-plugin-pagination.js.map +1 -1
- package/dist/tailwind-plugin-pagination.ts +4 -1
- package/dist/tailwind-plugin-popover.js +90 -23
- package/dist/tailwind-plugin-popover.js.map +1 -1
- package/dist/tailwind-plugin-popover.ts +95 -25
- package/dist/tailwind-plugin-tooltip.js +3 -0
- package/dist/tailwind-plugin-tooltip.js.map +1 -1
- package/dist/tailwind-plugin-tooltip.ts +3 -0
- package/docs/components/ActionBar.md +9 -8
- package/docs/components/Avatar.md +20 -19
- package/docs/components/AvatarGroup.md +5 -4
- package/docs/components/Badge.md +8 -7
- package/docs/components/ButtonGroup.md +12 -11
- package/docs/components/Icon.md +8 -7
- package/docs/components/Pagination.md +19 -18
- package/docs/components/Popover.md +21 -17
- package/docs/components/Tab.md +13 -12
- package/docs/components/Tabs.md +13 -12
- package/package.json +1 -1
- package/src/legacy/tool-ui/src/Admin.css +10 -1
- package/src/legacy/tool-ui/src/CodeMirror.css +4 -3
- package/src/legacy/tool-ui/src/ContentInputGroup.css +86 -62
- package/src/legacy/tool-ui/src/ContentInputGroup.ts +33 -0
- package/src/legacy/tool-ui/src/Conversation.ts +3 -0
- package/src/legacy/tool-ui/src/Entry.ts +1 -0
- package/src/legacy/tool-ui/src/Global.d.ts +3 -0
- package/src/legacy/tool-ui/src/LocationMap.css +106 -2
- package/src/legacy/tool-ui/src/MenuView.css +1 -2
- package/src/legacy/tool-ui/src/NewTabLinks.ts +25 -0
- package/src/legacy/tool-ui/src/Notification.css +20 -2
- package/src/legacy/tool-ui/src/Notifications.ts +5 -0
- package/src/legacy/tool-ui/src/RepeatableContentInputGroup.css +28 -21
- package/src/legacy/tool-ui/src/RepeatableContentSelector.css +50 -50
- package/src/legacy/tool-ui/src/SearchResult.css +5 -0
- package/src/legacy/tool-ui/src/Suggestions.css +1 -1
- package/src/legacy/tool-ui/src/form/CodeInput/CodeMirror.ts +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/130.8cc1870de35c48fb16bc.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/CodeMirror.deeefe0da1691332b8d9.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.420477026fe7508c83cf.js → RTEProseMirror.3ab7e02ee7ea42af94e5.js} +6 -6
- package/src/legacy/tool-ui/src/main/webapp/dist/iframeResizer.contentWindow.min.ea954ff5c2278da22eb4.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/iframeResizer.contentWindow.min.ea954ff5c2278da22eb4.js.LICENSE.txt +7 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/lucide.a0ab0ebd23916ff7c28c.woff2 +0 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v4.f3d988f6f7e664a8ac1f.js → v4.77773a9500063c0e2e37.js} +6 -6
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.d48271241dbf3eecc14e.css +3 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.78c144a01e1cf543642b.css +5 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/{v5.9aca525c9803b3173f73.js → v5.9f309b0ce98df4565933.js} +6 -6
- package/src/legacy/tool-ui/src/main/webapp/v4/ContentEdit.less +1 -0
- package/src/legacy/tool-ui/src/main/webapp/v4/Entry.less +7 -0
- package/src/legacy/tool-ui/src/main/webapp/v4/SearchResult.less +7 -0
- package/src/legacy/tool-ui/src/v5.css +9 -0
- package/src/legacy/tool-ui/src/v5.ts +13 -0
- package/dist/storybook/assets/if-defined-Dl8MuiCE.js +0 -1
- package/dist/storybook/assets/iframe-HDp5BmO_.css +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/2825.c1342ac2662d11fd4125.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/CodeMirror.5ddffe054374f883d6f8.js +0 -1
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.05d6a78ae435b930dd53.css +0 -3
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.95b7459d6c50c61b6480.css +0 -5
- /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.420477026fe7508c83cf.js.LICENSE.txt → RTEProseMirror.3ab7e02ee7ea42af94e5.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.f3d988f6f7e664a8ac1f.js.LICENSE.txt → v4.77773a9500063c0e2e37.js.LICENSE.txt} +0 -0
- /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.9aca525c9803b3173f73.js.LICENSE.txt → v5.9f309b0ce98df4565933.js.LICENSE.txt} +0 -0
|
@@ -166,15 +166,26 @@ module.exports = plugin(function ({ addComponents, addUtilities, theme }) {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
// background & text colors for buttons in different states
|
|
169
|
+
// -600 doesn't clear WCAG AA (4.5:1) against white for these hues, either as a solid
|
|
170
|
+
// fill under white text or as fill-none (the color used as text on the page).
|
|
171
|
+
// Measured against white: warning 3.49:1, teal 3.80:1 — vs primary 5.44:1 and error
|
|
172
|
+
// 4.85:1, which pass. At -700 warning is 5.43:1 and teal 5.57:1. success was already
|
|
173
|
+
// stepped down for the same reason; it just predates the other two being noticed.
|
|
174
|
+
const needsDarkerStep = new Set(['success', 'warning', 'teal'])
|
|
175
|
+
const solidStep = (k: string) => (k === 'gray' ? '100' : needsDarkerStep.has(k) ? '700' : '600')
|
|
176
|
+
const hoverStep = (k: string) => (k === 'gray' ? '200' : needsDarkerStep.has(k) ? '800' : '700')
|
|
177
|
+
// success keeps -600 here: only the two measured failures move.
|
|
178
|
+
const onSurfaceStep = (k: string) => (k === 'gray' || k === 'warning' || k === 'teal' ? '700' : '600')
|
|
179
|
+
|
|
169
180
|
for (const key in colors) {
|
|
170
181
|
if (key === 'currentColor' || key === 'transparent' || key === 'white' || key === 'black' || key === 'ai') continue
|
|
171
182
|
const ringColorKey = key === 'success' || key === 'error' ? key : 'primary'
|
|
172
183
|
// Gray buttons borrow primary for their pressed/selected tint.
|
|
173
184
|
const tintKey = key === 'gray' ? 'primary' : key
|
|
174
185
|
const focusStyle: CSSRuleObject = {
|
|
175
|
-
'--button-color': `oklch(var(--btu-theme-${key}-${key
|
|
186
|
+
'--button-color': `oklch(var(--btu-theme-${key}-${solidStep(key)}))`,
|
|
176
187
|
'--button-fill-none-color': `transparent`,
|
|
177
|
-
'--button-fill-none-text-color': `oklch(var(--btu-theme-${key}-${key
|
|
188
|
+
'--button-fill-none-text-color': `oklch(var(--btu-theme-${key}-${onSurfaceStep(key)}))`,
|
|
178
189
|
'--tw-ring-opacity': '1',
|
|
179
190
|
'--tw-ring-color': `oklch(var(--btu-theme-${ringColorKey}-100))`,
|
|
180
191
|
'--tw-ring-offset-width': '1px',
|
|
@@ -184,10 +195,10 @@ module.exports = plugin(function ({ addComponents, addUtilities, theme }) {
|
|
|
184
195
|
'--tw-ring-color': `oklch(var(--btu-theme-${ringColorKey}-400))`,
|
|
185
196
|
}
|
|
186
197
|
components[prefix + '-' + key] = {
|
|
187
|
-
'--button-color': `oklch(var(--btu-theme-${key}-${key
|
|
198
|
+
'--button-color': `oklch(var(--btu-theme-${key}-${solidStep(key)}))`,
|
|
188
199
|
'--button-text-color': `${key === 'gray' ? 'oklch(var(--btu-theme-gray-700))' : 'var(--btu-theme-white)'}`,
|
|
189
200
|
'--button-fill-none-color': 'transparent',
|
|
190
|
-
'--button-fill-none-text-color': `oklch(var(--btu-theme-${key}-${key
|
|
201
|
+
'--button-fill-none-text-color': `oklch(var(--btu-theme-${key}-${onSurfaceStep(key)}))`,
|
|
191
202
|
'--button-outline-color': `oklch(var(--btu-theme-${key}-300))`,
|
|
192
203
|
'--button-disabled-color-fill': `oklch(var(--btu-theme-${key}-${key === 'gray' ? '100' : key === 'primary' ? '300' : '200'}))`,
|
|
193
204
|
'--button-disabled-color-fill-none': `var(--button-fill-none) oklch(var(--btu-theme-white))`,
|
|
@@ -199,7 +210,7 @@ module.exports = plugin(function ({ addComponents, addUtilities, theme }) {
|
|
|
199
210
|
'--button-tint-strong': `oklch(var(--btu-theme-${tintKey}-800))`,
|
|
200
211
|
'--button-tint-highlight': `oklch(var(--btu-theme-${tintKey}-200))`,
|
|
201
212
|
'&:hover': {
|
|
202
|
-
'--button-color': `oklch(var(--btu-theme-${key}-${key
|
|
213
|
+
'--button-color': `oklch(var(--btu-theme-${key}-${hoverStep(key)}))`,
|
|
203
214
|
'--button-fill-none-color': `oklch(var(--btu-theme-${key}-${key === 'gray' ? '200' : '50'}))`,
|
|
204
215
|
'--button-fill-none-text-color': `oklch(var(--btu-theme-${key}-${key === 'gray' ? '900' : '800'}))`,
|
|
205
216
|
},
|
|
@@ -28,7 +28,10 @@ module.exports = plugin(function ({ addComponents, config }) {
|
|
|
28
28
|
const fontSize_xs = config('theme.fontSize.xs')?.[0] ?? '0.75rem';
|
|
29
29
|
addComponents({
|
|
30
30
|
'.btu-pagination': {
|
|
31
|
-
|
|
31
|
+
// Block-level, not inline-flex: the nav sets width:100% and the controls use
|
|
32
|
+
// margin-left:auto to sit flush right. Against a shrink-to-fit root neither
|
|
33
|
+
// resolves, so the controls tracked the content width instead of the container.
|
|
34
|
+
display: 'flex',
|
|
32
35
|
alignItems: 'center',
|
|
33
36
|
gap: '0.75rem',
|
|
34
37
|
fontSize: fontSize_sm,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-plugin-pagination.js","sourceRoot":"","sources":["../src/tailwind-plugin-pagination.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAGvC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE;IACzD,MAAM,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAA;I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EAAE;YACxB,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,QAAQ;YACpB,UAAU,EAAE,kEAAkE;YAC9E,SAAS,EAAE;gBACT,OAAO,EAAE,MAAM;aAChB;YACD,eAAe,EAAE;gBACf,WAAW,EAAE,4CAA4C;aAC1D;SACF;QAED,yEAAyE;QACzE,4EAA4E;QAC5E,sEAAsE,EAAE;YACtE,gBAAgB,EAAE,kEAAkE;YACpF,qBAAqB,EAAE,sEAAsE;SAC9F;QAED,0DAA0D;QAC1D,gEAAgE,EAAE;YAChE,wBAAwB,EAAE,GAAG;YAC7B,gBAAgB,EAAE,kEAAkE;YACpF,qBAAqB,EAAE,sEAAsE;SAC9F;KACF,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -32,7 +32,10 @@ module.exports = plugin(function ({ addComponents, config }) {
|
|
|
32
32
|
|
|
33
33
|
addComponents({
|
|
34
34
|
'.btu-pagination': {
|
|
35
|
-
|
|
35
|
+
// Block-level, not inline-flex: the nav sets width:100% and the controls use
|
|
36
|
+
// margin-left:auto to sit flush right. Against a shrink-to-fit root neither
|
|
37
|
+
// resolves, so the controls tracked the content width instead of the container.
|
|
38
|
+
display: 'flex',
|
|
36
39
|
alignItems: 'center',
|
|
37
40
|
gap: '0.75rem',
|
|
38
41
|
fontSize: fontSize_sm,
|
|
@@ -14,6 +14,10 @@ import plugin from 'tailwindcss/plugin';
|
|
|
14
14
|
* btu-popover-left - Position left of trigger
|
|
15
15
|
* btu-popover-right - Position right of trigger
|
|
16
16
|
* btu-popover-no-arrow - Hide the arrow pseudo-element
|
|
17
|
+
* btu-popover-tail-* - up/down/left/right; overrides the direction implied by
|
|
18
|
+
* the position class. Set by <btu-popover> when a flip
|
|
19
|
+
* fallback moved the panel — CSS can't detect that, since
|
|
20
|
+
* anchor() won't resolve inside the anchored panel.
|
|
17
21
|
* btu-popover-inverted - Inverted surface (dark panel on light pages, light
|
|
18
22
|
* panel on dark pages) via the mode-flipping black/
|
|
19
23
|
* white tokens (requires --btu-theme-black/-white to
|
|
@@ -34,7 +38,22 @@ import plugin from 'tailwindcss/plugin';
|
|
|
34
38
|
* --popover-color-title - Title text color (consumer-applied on title elements; not set by plugin)
|
|
35
39
|
* --popover-color-content - Base text color (default: oklch(var(--btu-theme-gray-900)))
|
|
36
40
|
* --popover-border-radius - Border radius (default: theme borderRadius.lg)
|
|
41
|
+
* --popover-border-width - Edge width, panel and arrow (default: 1px; 0 removes it)
|
|
42
|
+
* --popover-border-color - Edge color, panel and arrow (default: gray-200)
|
|
37
43
|
*/
|
|
44
|
+
// Build-time constants, not custom properties: the angle is derived from the
|
|
45
|
+
// authored width and offset, and overriding it alone would desync the gradient
|
|
46
|
+
// from the clip path.
|
|
47
|
+
const TAIL_WIDTH = 'var(--popover-border-width, 1px)';
|
|
48
|
+
const TAIL_FILL = 'var(--popover-color-background, var(--btu-theme-white, #fff))';
|
|
49
|
+
const TAIL_EDGE = 'var(--popover-border-color, oklch(var(--btu-theme-gray-200)))';
|
|
50
|
+
// Half-angle at the tip, so the authored base width holds at any offset.
|
|
51
|
+
const TAIL_ANGLE = 'atan2(var(--popover-arrow-size), calc(2 * var(--popover-offset)))';
|
|
52
|
+
// Edge offset (measured along the normals) as a distance down the axis.
|
|
53
|
+
const TAIL_APEX = `calc(${TAIL_WIDTH} / sin(${TAIL_ANGLE}))`;
|
|
54
|
+
const TAIL_DEPTH = `calc(var(--popover-offset) + ${TAIL_WIDTH})`;
|
|
55
|
+
/** Fill wedge over the edge colour, opening from `apex` toward `toward` (degrees). */
|
|
56
|
+
const tailPaint = (apex, toward) => `conic-gradient(at ${apex}, #0000 0 calc(${toward}deg - ${TAIL_ANGLE}), ${TAIL_FILL} 0 calc(${toward}deg + ${TAIL_ANGLE}), #0000 0 360deg), ${TAIL_EDGE}`;
|
|
38
57
|
module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
39
58
|
addComponents({
|
|
40
59
|
// Base popover styles — exit state (applied when closing, before display:none)
|
|
@@ -60,7 +79,16 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
60
79
|
isolation: 'isolate',
|
|
61
80
|
margin: '0',
|
|
62
81
|
inset: 'unset',
|
|
63
|
-
|
|
82
|
+
// The surface follows the page background, so in dark mode it resolves to the
|
|
83
|
+
// same colour as the page behind it and boxShadow.lg is a near-black lift that
|
|
84
|
+
// vanishes against it — leaving the panel with no edge. The hairline is what
|
|
85
|
+
// separates it. gray-200 mirrors to a mid grey in dark mode, so one value reads
|
|
86
|
+
// in both. Set --popover-border-width to 0 to opt out.
|
|
87
|
+
// Declared as parts rather than the shorthand because the tail can't take a
|
|
88
|
+
// border (it's a clip-path) and rebuilds the same edge from these — see ::before.
|
|
89
|
+
borderWidth: 'var(--popover-border-width, 1px)',
|
|
90
|
+
borderStyle: 'solid',
|
|
91
|
+
borderColor: 'var(--popover-border-color, oklch(var(--btu-theme-gray-200)))',
|
|
64
92
|
opacity: '0',
|
|
65
93
|
translate: '0 0',
|
|
66
94
|
transition: 'opacity 150ms ease, translate 150ms ease, display 150ms ease allow-discrete, overlay 150ms ease allow-discrete',
|
|
@@ -76,7 +104,6 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
76
104
|
'.btu-popover-top': {
|
|
77
105
|
'position-area': 'top',
|
|
78
106
|
bottom: 'var(--popover-offset)',
|
|
79
|
-
marginTop: 'var(--popover-offset)',
|
|
80
107
|
'position-try-fallbacks': 'flip-block',
|
|
81
108
|
translate: '0 4px',
|
|
82
109
|
'&:popover-open': {
|
|
@@ -87,7 +114,6 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
87
114
|
'.btu-popover-bottom': {
|
|
88
115
|
'position-area': 'bottom',
|
|
89
116
|
top: 'var(--popover-offset)',
|
|
90
|
-
marginBottom: 'var(--popover-offset)',
|
|
91
117
|
'position-try-fallbacks': 'flip-block',
|
|
92
118
|
translate: '0 -4px',
|
|
93
119
|
'&:popover-open': {
|
|
@@ -98,7 +124,6 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
98
124
|
'.btu-popover-left': {
|
|
99
125
|
'position-area': 'left',
|
|
100
126
|
right: 'var(--popover-offset)',
|
|
101
|
-
marginLeft: 'var(--popover-offset)',
|
|
102
127
|
'position-try-fallbacks': 'flip-inline',
|
|
103
128
|
translate: '4px 0',
|
|
104
129
|
'&:popover-open': {
|
|
@@ -109,7 +134,6 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
109
134
|
'.btu-popover-right': {
|
|
110
135
|
'position-area': 'right',
|
|
111
136
|
left: 'var(--popover-offset)',
|
|
112
|
-
marginRight: 'var(--popover-offset)',
|
|
113
137
|
'position-try-fallbacks': 'flip-inline',
|
|
114
138
|
translate: '-4px 0',
|
|
115
139
|
'&:popover-open': {
|
|
@@ -122,13 +146,15 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
122
146
|
'.btu-popover-offset-lg': { '--popover-offset': '12px' },
|
|
123
147
|
'.btu-popover-offset-xl': { '--popover-offset': '16px' },
|
|
124
148
|
// Inverted surface — overrides the panel's own custom properties, so the base
|
|
125
|
-
// rule and the
|
|
149
|
+
// rule and the tail's gradient both pick it up. black/white flip
|
|
126
150
|
// per color scheme, so this is the page's inverse in both modes. No shadow:
|
|
127
151
|
// the inverted fill separates itself from the page (the light-surface shadow
|
|
128
152
|
// does little on it).
|
|
129
153
|
'.btu-popover-inverted': {
|
|
130
154
|
'--popover-color-background': 'var(--btu-theme-black)',
|
|
131
155
|
'--popover-color-content': 'var(--btu-theme-white)',
|
|
156
|
+
// The inverted fill separates itself from the page, same reason the shadow goes.
|
|
157
|
+
'--popover-border-width': '0px',
|
|
132
158
|
boxShadow: 'none',
|
|
133
159
|
},
|
|
134
160
|
// @starting-style for entry animations
|
|
@@ -149,35 +175,76 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
149
175
|
translate: '-4px 0',
|
|
150
176
|
},
|
|
151
177
|
},
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
//
|
|
155
|
-
|
|
178
|
+
// One pseudo carries fill and outline: the box is painted the edge colour and a
|
|
179
|
+
// conic wedge paints the fill back over it. The wedge's apex is pushed down the
|
|
180
|
+
// axis by borderWidth/sin(halfAngle), which offsets its edges along the normals
|
|
181
|
+
// — a larger copy of the shape offsets along the axes instead and leaves a rim
|
|
182
|
+
// that varies in width.
|
|
183
|
+
//
|
|
184
|
+
// Insets resolve against the padding box, so the depth carries an extra
|
|
185
|
+
// borderWidth and the clip is a triangle on a borderWidth-tall rectangle. That
|
|
186
|
+
// rectangle lets the fill erase the panel's border across the mouth; without it
|
|
187
|
+
// the two strokes overlap into a thickened corner instead of mitring.
|
|
188
|
+
//
|
|
189
|
+
// :where() gives the position-class default zero specificity so tail-* wins.
|
|
190
|
+
// Both can match on a flipped panel, hence every block restates all four insets.
|
|
191
|
+
':where(.btu-popover-bottom)::before, .btu-popover-tail-up::before': {
|
|
156
192
|
content: '""',
|
|
157
193
|
position: 'absolute',
|
|
158
194
|
zIndex: '-1',
|
|
195
|
+
top: 'auto',
|
|
196
|
+
right: 'auto',
|
|
197
|
+
bottom: '100%',
|
|
198
|
+
left: 'calc(50% - var(--popover-arrow-size) / 2)',
|
|
159
199
|
width: 'var(--popover-arrow-size)',
|
|
160
|
-
|
|
161
|
-
|
|
200
|
+
height: TAIL_DEPTH,
|
|
201
|
+
clipPath: `polygon(50% 0, 100% calc(100% - ${TAIL_WIDTH}), 100% 100%, 0 100%, 0 calc(100% - ${TAIL_WIDTH}))`,
|
|
202
|
+
background: tailPaint(`50% ${TAIL_APEX}`, 180),
|
|
203
|
+
},
|
|
204
|
+
':where(.btu-popover-top)::before, .btu-popover-tail-down::before': {
|
|
205
|
+
content: '""',
|
|
206
|
+
position: 'absolute',
|
|
207
|
+
zIndex: '-1',
|
|
208
|
+
top: '100%',
|
|
209
|
+
right: 'auto',
|
|
210
|
+
bottom: 'auto',
|
|
162
211
|
left: 'calc(50% - var(--popover-arrow-size) / 2)',
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
212
|
+
width: 'var(--popover-arrow-size)',
|
|
213
|
+
height: TAIL_DEPTH,
|
|
214
|
+
clipPath: `polygon(50% 100%, 100% ${TAIL_WIDTH}, 100% 0, 0 0, 0 ${TAIL_WIDTH})`,
|
|
215
|
+
// Straddles 0deg, so both halves of the wedge are spelled out.
|
|
216
|
+
background: `conic-gradient(at 50% calc(100% - ${TAIL_APEX}), ${TAIL_FILL} 0 ${TAIL_ANGLE}, #0000 0 calc(360deg - ${TAIL_ANGLE}), ${TAIL_FILL} 0 360deg), ${TAIL_EDGE}`,
|
|
166
217
|
},
|
|
167
|
-
|
|
168
|
-
'.btu-popover-left::before, .btu-popover-right::before': {
|
|
218
|
+
':where(.btu-popover-right)::before, .btu-popover-tail-left::before': {
|
|
169
219
|
content: '""',
|
|
170
220
|
position: 'absolute',
|
|
171
221
|
zIndex: '-1',
|
|
222
|
+
top: 'calc(50% - var(--popover-arrow-size) / 2)',
|
|
223
|
+
// position-area is physical and doesn't flip, so neither may the tail. Without
|
|
224
|
+
// this postcss-rtlcss swaps the insets and the tail lands on the far edge,
|
|
225
|
+
// still pointing the original way — the old symmetric shape hid this.
|
|
226
|
+
right: '100% /*rtl:ignore*/',
|
|
227
|
+
bottom: 'auto',
|
|
228
|
+
left: 'auto /*rtl:ignore*/',
|
|
229
|
+
width: TAIL_DEPTH,
|
|
172
230
|
height: 'var(--popover-arrow-size)',
|
|
173
|
-
|
|
174
|
-
|
|
231
|
+
clipPath: `polygon(0 50%, calc(100% - ${TAIL_WIDTH}) 100%, 100% 100%, 100% 0, calc(100% - ${TAIL_WIDTH}) 0)`,
|
|
232
|
+
background: tailPaint(`${TAIL_APEX} 50%`, 90),
|
|
233
|
+
},
|
|
234
|
+
':where(.btu-popover-left)::before, .btu-popover-tail-right::before': {
|
|
235
|
+
content: '""',
|
|
236
|
+
position: 'absolute',
|
|
237
|
+
zIndex: '-1',
|
|
175
238
|
top: 'calc(50% - var(--popover-arrow-size) / 2)',
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
239
|
+
right: 'auto /*rtl:ignore*/',
|
|
240
|
+
bottom: 'auto',
|
|
241
|
+
left: '100% /*rtl:ignore*/',
|
|
242
|
+
width: TAIL_DEPTH,
|
|
243
|
+
height: 'var(--popover-arrow-size)',
|
|
244
|
+
clipPath: `polygon(100% 50%, ${TAIL_WIDTH} 0, 0 0, 0 100%, ${TAIL_WIDTH} 100%)`,
|
|
245
|
+
background: tailPaint(`calc(100% - ${TAIL_APEX}) 50%`, 270),
|
|
179
246
|
},
|
|
180
|
-
//
|
|
247
|
+
// After the tail blocks so it wins the specificity tie against tail-*.
|
|
181
248
|
'.btu-popover-no-arrow::before': {
|
|
182
249
|
content: 'none',
|
|
183
250
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-plugin-popover.js","sourceRoot":"","sources":["../src/tailwind-plugin-popover.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAGvC
|
|
1
|
+
{"version":3,"file":"tailwind-plugin-popover.js","sourceRoot":"","sources":["../src/tailwind-plugin-popover.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,6EAA6E;AAC7E,+EAA+E;AAC/E,sBAAsB;AACtB,MAAM,UAAU,GAAG,kCAAkC,CAAA;AACrD,MAAM,SAAS,GAAG,+DAA+D,CAAA;AACjF,MAAM,SAAS,GAAG,+DAA+D,CAAA;AACjF,yEAAyE;AACzE,MAAM,UAAU,GAAG,mEAAmE,CAAA;AACtF,wEAAwE;AACxE,MAAM,SAAS,GAAG,QAAQ,UAAU,UAAU,UAAU,IAAI,CAAA;AAC5D,MAAM,UAAU,GAAG,gCAAgC,UAAU,GAAG,CAAA;AAEhE,sFAAsF;AACtF,MAAM,SAAS,GAA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Position left of trigger
|
|
17
17
|
* btu-popover-right - Position right of trigger
|
|
18
18
|
* btu-popover-no-arrow - Hide the arrow pseudo-element
|
|
19
|
+
* btu-popover-tail-* - up/down/left/right; overrides the direction implied by
|
|
20
|
+
* the position class. Set by <btu-popover> when a flip
|
|
21
|
+
* fallback moved the panel — CSS can't detect that, since
|
|
22
|
+
* anchor() won't resolve inside the anchored panel.
|
|
19
23
|
* btu-popover-inverted - Inverted surface (dark panel on light pages, light
|
|
20
24
|
* panel on dark pages) via the mode-flipping black/
|
|
21
25
|
* white tokens (requires --btu-theme-black/-white to
|
|
@@ -36,8 +40,26 @@ declare let module: any
|
|
|
36
40
|
* --popover-color-title - Title text color (consumer-applied on title elements; not set by plugin)
|
|
37
41
|
* --popover-color-content - Base text color (default: oklch(var(--btu-theme-gray-900)))
|
|
38
42
|
* --popover-border-radius - Border radius (default: theme borderRadius.lg)
|
|
43
|
+
* --popover-border-width - Edge width, panel and arrow (default: 1px; 0 removes it)
|
|
44
|
+
* --popover-border-color - Edge color, panel and arrow (default: gray-200)
|
|
39
45
|
*/
|
|
40
46
|
|
|
47
|
+
// Build-time constants, not custom properties: the angle is derived from the
|
|
48
|
+
// authored width and offset, and overriding it alone would desync the gradient
|
|
49
|
+
// from the clip path.
|
|
50
|
+
const TAIL_WIDTH = 'var(--popover-border-width, 1px)'
|
|
51
|
+
const TAIL_FILL = 'var(--popover-color-background, var(--btu-theme-white, #fff))'
|
|
52
|
+
const TAIL_EDGE = 'var(--popover-border-color, oklch(var(--btu-theme-gray-200)))'
|
|
53
|
+
// Half-angle at the tip, so the authored base width holds at any offset.
|
|
54
|
+
const TAIL_ANGLE = 'atan2(var(--popover-arrow-size), calc(2 * var(--popover-offset)))'
|
|
55
|
+
// Edge offset (measured along the normals) as a distance down the axis.
|
|
56
|
+
const TAIL_APEX = `calc(${TAIL_WIDTH} / sin(${TAIL_ANGLE}))`
|
|
57
|
+
const TAIL_DEPTH = `calc(var(--popover-offset) + ${TAIL_WIDTH})`
|
|
58
|
+
|
|
59
|
+
/** Fill wedge over the edge colour, opening from `apex` toward `toward` (degrees). */
|
|
60
|
+
const tailPaint = (apex: string, toward: number) =>
|
|
61
|
+
`conic-gradient(at ${apex}, #0000 0 calc(${toward}deg - ${TAIL_ANGLE}), ${TAIL_FILL} 0 calc(${toward}deg + ${TAIL_ANGLE}), #0000 0 360deg), ${TAIL_EDGE}`
|
|
62
|
+
|
|
41
63
|
module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
42
64
|
addComponents({
|
|
43
65
|
// Base popover styles — exit state (applied when closing, before display:none)
|
|
@@ -67,7 +89,16 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
67
89
|
isolation: 'isolate',
|
|
68
90
|
margin: '0',
|
|
69
91
|
inset: 'unset',
|
|
70
|
-
|
|
92
|
+
// The surface follows the page background, so in dark mode it resolves to the
|
|
93
|
+
// same colour as the page behind it and boxShadow.lg is a near-black lift that
|
|
94
|
+
// vanishes against it — leaving the panel with no edge. The hairline is what
|
|
95
|
+
// separates it. gray-200 mirrors to a mid grey in dark mode, so one value reads
|
|
96
|
+
// in both. Set --popover-border-width to 0 to opt out.
|
|
97
|
+
// Declared as parts rather than the shorthand because the tail can't take a
|
|
98
|
+
// border (it's a clip-path) and rebuilds the same edge from these — see ::before.
|
|
99
|
+
borderWidth: 'var(--popover-border-width, 1px)',
|
|
100
|
+
borderStyle: 'solid',
|
|
101
|
+
borderColor: 'var(--popover-border-color, oklch(var(--btu-theme-gray-200)))',
|
|
71
102
|
opacity: '0',
|
|
72
103
|
translate: '0 0',
|
|
73
104
|
transition:
|
|
@@ -87,7 +118,6 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
87
118
|
'.btu-popover-top': {
|
|
88
119
|
'position-area': 'top',
|
|
89
120
|
bottom: 'var(--popover-offset)',
|
|
90
|
-
marginTop: 'var(--popover-offset)',
|
|
91
121
|
'position-try-fallbacks': 'flip-block',
|
|
92
122
|
translate: '0 4px',
|
|
93
123
|
|
|
@@ -100,7 +130,6 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
100
130
|
'.btu-popover-bottom': {
|
|
101
131
|
'position-area': 'bottom',
|
|
102
132
|
top: 'var(--popover-offset)',
|
|
103
|
-
marginBottom: 'var(--popover-offset)',
|
|
104
133
|
'position-try-fallbacks': 'flip-block',
|
|
105
134
|
translate: '0 -4px',
|
|
106
135
|
|
|
@@ -113,7 +142,6 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
113
142
|
'.btu-popover-left': {
|
|
114
143
|
'position-area': 'left',
|
|
115
144
|
right: 'var(--popover-offset)',
|
|
116
|
-
marginLeft: 'var(--popover-offset)',
|
|
117
145
|
'position-try-fallbacks': 'flip-inline',
|
|
118
146
|
translate: '4px 0',
|
|
119
147
|
|
|
@@ -126,7 +154,6 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
126
154
|
'.btu-popover-right': {
|
|
127
155
|
'position-area': 'right',
|
|
128
156
|
left: 'var(--popover-offset)',
|
|
129
|
-
marginRight: 'var(--popover-offset)',
|
|
130
157
|
'position-try-fallbacks': 'flip-inline',
|
|
131
158
|
translate: '-4px 0',
|
|
132
159
|
|
|
@@ -142,13 +169,15 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
142
169
|
'.btu-popover-offset-xl': { '--popover-offset': '16px' },
|
|
143
170
|
|
|
144
171
|
// Inverted surface — overrides the panel's own custom properties, so the base
|
|
145
|
-
// rule and the
|
|
172
|
+
// rule and the tail's gradient both pick it up. black/white flip
|
|
146
173
|
// per color scheme, so this is the page's inverse in both modes. No shadow:
|
|
147
174
|
// the inverted fill separates itself from the page (the light-surface shadow
|
|
148
175
|
// does little on it).
|
|
149
176
|
'.btu-popover-inverted': {
|
|
150
177
|
'--popover-color-background': 'var(--btu-theme-black)',
|
|
151
178
|
'--popover-color-content': 'var(--btu-theme-white)',
|
|
179
|
+
// The inverted fill separates itself from the page, same reason the shadow goes.
|
|
180
|
+
'--popover-border-width': '0px',
|
|
152
181
|
boxShadow: 'none',
|
|
153
182
|
},
|
|
154
183
|
|
|
@@ -171,39 +200,80 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
171
200
|
},
|
|
172
201
|
},
|
|
173
202
|
|
|
174
|
-
//
|
|
175
|
-
//
|
|
176
|
-
//
|
|
177
|
-
|
|
203
|
+
// One pseudo carries fill and outline: the box is painted the edge colour and a
|
|
204
|
+
// conic wedge paints the fill back over it. The wedge's apex is pushed down the
|
|
205
|
+
// axis by borderWidth/sin(halfAngle), which offsets its edges along the normals
|
|
206
|
+
// — a larger copy of the shape offsets along the axes instead and leaves a rim
|
|
207
|
+
// that varies in width.
|
|
208
|
+
//
|
|
209
|
+
// Insets resolve against the padding box, so the depth carries an extra
|
|
210
|
+
// borderWidth and the clip is a triangle on a borderWidth-tall rectangle. That
|
|
211
|
+
// rectangle lets the fill erase the panel's border across the mouth; without it
|
|
212
|
+
// the two strokes overlap into a thickened corner instead of mitring.
|
|
213
|
+
//
|
|
214
|
+
// :where() gives the position-class default zero specificity so tail-* wins.
|
|
215
|
+
// Both can match on a flipped panel, hence every block restates all four insets.
|
|
216
|
+
':where(.btu-popover-bottom)::before, .btu-popover-tail-up::before': {
|
|
178
217
|
content: '""',
|
|
179
218
|
position: 'absolute',
|
|
180
219
|
zIndex: '-1',
|
|
220
|
+
top: 'auto',
|
|
221
|
+
right: 'auto',
|
|
222
|
+
bottom: '100%',
|
|
223
|
+
left: 'calc(50% - var(--popover-arrow-size) / 2)',
|
|
181
224
|
width: 'var(--popover-arrow-size)',
|
|
182
|
-
|
|
183
|
-
|
|
225
|
+
height: TAIL_DEPTH,
|
|
226
|
+
clipPath: `polygon(50% 0, 100% calc(100% - ${TAIL_WIDTH}), 100% 100%, 0 100%, 0 calc(100% - ${TAIL_WIDTH}))`,
|
|
227
|
+
background: tailPaint(`50% ${TAIL_APEX}`, 180),
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
':where(.btu-popover-top)::before, .btu-popover-tail-down::before': {
|
|
231
|
+
content: '""',
|
|
232
|
+
position: 'absolute',
|
|
233
|
+
zIndex: '-1',
|
|
234
|
+
top: '100%',
|
|
235
|
+
right: 'auto',
|
|
236
|
+
bottom: 'auto',
|
|
184
237
|
left: 'calc(50% - var(--popover-arrow-size) / 2)',
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
238
|
+
width: 'var(--popover-arrow-size)',
|
|
239
|
+
height: TAIL_DEPTH,
|
|
240
|
+
clipPath: `polygon(50% 100%, 100% ${TAIL_WIDTH}, 100% 0, 0 0, 0 ${TAIL_WIDTH})`,
|
|
241
|
+
// Straddles 0deg, so both halves of the wedge are spelled out.
|
|
242
|
+
background: `conic-gradient(at 50% calc(100% - ${TAIL_APEX}), ${TAIL_FILL} 0 ${TAIL_ANGLE}, #0000 0 calc(360deg - ${TAIL_ANGLE}), ${TAIL_FILL} 0 360deg), ${TAIL_EDGE}`,
|
|
189
243
|
},
|
|
190
244
|
|
|
191
|
-
|
|
192
|
-
'.btu-popover-left::before, .btu-popover-right::before': {
|
|
245
|
+
':where(.btu-popover-right)::before, .btu-popover-tail-left::before': {
|
|
193
246
|
content: '""',
|
|
194
247
|
position: 'absolute',
|
|
195
248
|
zIndex: '-1',
|
|
249
|
+
top: 'calc(50% - var(--popover-arrow-size) / 2)',
|
|
250
|
+
// position-area is physical and doesn't flip, so neither may the tail. Without
|
|
251
|
+
// this postcss-rtlcss swaps the insets and the tail lands on the far edge,
|
|
252
|
+
// still pointing the original way — the old symmetric shape hid this.
|
|
253
|
+
right: '100% /*rtl:ignore*/',
|
|
254
|
+
bottom: 'auto',
|
|
255
|
+
left: 'auto /*rtl:ignore*/',
|
|
256
|
+
width: TAIL_DEPTH,
|
|
196
257
|
height: 'var(--popover-arrow-size)',
|
|
197
|
-
|
|
198
|
-
|
|
258
|
+
clipPath: `polygon(0 50%, calc(100% - ${TAIL_WIDTH}) 100%, 100% 100%, 100% 0, calc(100% - ${TAIL_WIDTH}) 0)`,
|
|
259
|
+
background: tailPaint(`${TAIL_APEX} 50%`, 90),
|
|
260
|
+
},
|
|
261
|
+
|
|
262
|
+
':where(.btu-popover-left)::before, .btu-popover-tail-right::before': {
|
|
263
|
+
content: '""',
|
|
264
|
+
position: 'absolute',
|
|
265
|
+
zIndex: '-1',
|
|
199
266
|
top: 'calc(50% - var(--popover-arrow-size) / 2)',
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
267
|
+
right: 'auto /*rtl:ignore*/',
|
|
268
|
+
bottom: 'auto',
|
|
269
|
+
left: '100% /*rtl:ignore*/',
|
|
270
|
+
width: TAIL_DEPTH,
|
|
271
|
+
height: 'var(--popover-arrow-size)',
|
|
272
|
+
clipPath: `polygon(100% 50%, ${TAIL_WIDTH} 0, 0 0, 0 100%, ${TAIL_WIDTH} 100%)`,
|
|
273
|
+
background: tailPaint(`calc(100% - ${TAIL_APEX}) 50%`, 270),
|
|
204
274
|
},
|
|
205
275
|
|
|
206
|
-
//
|
|
276
|
+
// After the tail blocks so it wins the specificity tie against tail-*.
|
|
207
277
|
'.btu-popover-no-arrow::before': {
|
|
208
278
|
content: 'none',
|
|
209
279
|
},
|
|
@@ -56,6 +56,9 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
56
56
|
fontWeight: '500',
|
|
57
57
|
whiteSpace: 'nowrap',
|
|
58
58
|
textAlign: 'left',
|
|
59
|
+
// A tooltip sits inside its trigger, so it inherits the trigger's casing —
|
|
60
|
+
// btu-avatar uppercases its initials and that reached the tooltip text.
|
|
61
|
+
textTransform: 'none',
|
|
59
62
|
pointerEvents: 'none',
|
|
60
63
|
overflow: 'visible',
|
|
61
64
|
isolation: 'isolate',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-plugin-tooltip.js","sourceRoot":"","sources":["../src/tailwind-plugin-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM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E,2CAA2C;YACjD,QAAQ,EACN,8QAA8Q;YAChR,UAAU,EAAE,SAAS;YACrB,MAAM,EAAE,SAAS;SAClB;QAED,8CAA8C;QAC9C,8CAA8C;QAC9C,uDAAuD,EAAE;YACvD,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,2BAA2B;YACnC,IAAI,EAAE,kCAAkC;YACxC,KAAK,EAAE,kCAAkC;YACzC,GAAG,EAAE,2CAA2C;YAChD,QAAQ,EACN,8QAA8Q;YAChR,UAAU,EAAE,SAAS;YACrB,MAAM,EAAE,SAAS;SAClB;QAED,4BAA4B;QAC5B,+BAA+B,EAAE;YAC/B,OAAO,EAAE,MAAM;SAChB;QAED,iEAAiE;QACjE,yCAAyC,EAAE;YACzC,cAAc,EAAE;gBACd,SAAS,EAAE,iBAAiB;gBAC5B,UAAU,EAAE,0FAA0F;aACvG;SACF;KACF,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -62,6 +62,9 @@ module.exports = plugin(function ({ addComponents, theme, config }) {
|
|
|
62
62
|
fontWeight: '500',
|
|
63
63
|
whiteSpace: 'nowrap',
|
|
64
64
|
textAlign: 'left',
|
|
65
|
+
// A tooltip sits inside its trigger, so it inherits the trigger's casing —
|
|
66
|
+
// btu-avatar uppercases its initials and that reached the tooltip text.
|
|
67
|
+
textTransform: 'none',
|
|
65
68
|
|
|
66
69
|
pointerEvents: 'none',
|
|
67
70
|
overflow: 'visible',
|
|
@@ -18,14 +18,15 @@
|
|
|
18
18
|
|
|
19
19
|
### Fields
|
|
20
20
|
|
|
21
|
-
| Name
|
|
22
|
-
|
|
|
23
|
-
| `position`
|
|
24
|
-
| `sticky`
|
|
25
|
-
| `alignment`
|
|
26
|
-
| `shadow`
|
|
27
|
-
| `label`
|
|
28
|
-
| `compact`
|
|
21
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
22
|
+
| ------------------------- | ------- | ----------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
23
|
+
| `position` | | `Position` | `'bottom'` | Bar position: 'top' or 'bottom' (default). | |
|
|
24
|
+
| `sticky` | | `boolean` | `false` | Enables CSS sticky positioning. When combined with position='top',
the bar sticks to the top of the scroll container. With position='bottom'
(default), it sticks to the bottom. | |
|
|
25
|
+
| `alignment` | | `Alignment` | `'default'` | Content alignment: 'default' (two-zone), 'start', 'center', 'end'.
Non-default alignments disable two-zone layout. | |
|
|
26
|
+
| `shadow` | | `boolean` | `false` | Adds a box-shadow to the bar. | |
|
|
27
|
+
| `label` | | `string` | `''` | Accessible label for the toolbar region. | |
|
|
28
|
+
| `compact` | | `boolean` | `false` | Enables progressive label compacting. When space shrinks, items marked
\`compactable\` (with icons) have their labels hidden one-by-one
from least to most important before items overflow into "More". | |
|
|
29
|
+
| `_initialClassesCaptured` | private | `boolean` | `false` | | |
|
|
29
30
|
|
|
30
31
|
### Methods
|
|
31
32
|
|