@wordpress/ui 0.6.0 → 0.7.1-next.v.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 (147) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/build/badge/badge.cjs +1 -1
  3. package/build/badge/badge.cjs.map +2 -2
  4. package/build/box/box.cjs +3 -7
  5. package/build/box/box.cjs.map +2 -2
  6. package/build/button/button.cjs +3 -3
  7. package/build/button/button.cjs.map +2 -2
  8. package/build/form/primitives/fieldset/root.cjs +3 -3
  9. package/build/form/primitives/fieldset/root.cjs.map +2 -2
  10. package/build/form/primitives/input-layout/input-layout.cjs +3 -3
  11. package/build/form/primitives/input-layout/input-layout.cjs.map +2 -2
  12. package/build/form/primitives/input-layout/slot.cjs +3 -3
  13. package/build/form/primitives/input-layout/slot.cjs.map +2 -2
  14. package/build/form/primitives/select/item.cjs +3 -3
  15. package/build/form/primitives/select/item.cjs.map +2 -2
  16. package/build/form/primitives/select/popup.cjs +3 -3
  17. package/build/form/primitives/select/popup.cjs.map +2 -2
  18. package/build/form/primitives/select/trigger.cjs +3 -3
  19. package/build/form/primitives/select/trigger.cjs.map +2 -2
  20. package/build/icon-button/icon-button.cjs +103 -0
  21. package/build/icon-button/icon-button.cjs.map +7 -0
  22. package/build/icon-button/index.cjs +31 -0
  23. package/build/icon-button/index.cjs.map +7 -0
  24. package/build/icon-button/types.cjs +19 -0
  25. package/build/icon-button/types.cjs.map +7 -0
  26. package/build/index.cjs +5 -0
  27. package/build/index.cjs.map +2 -2
  28. package/build/tabs/index.cjs +40 -0
  29. package/build/tabs/index.cjs.map +7 -0
  30. package/build/tabs/list.cjs +145 -0
  31. package/build/tabs/list.cjs.map +7 -0
  32. package/build/tabs/panel.cjs +67 -0
  33. package/build/tabs/panel.cjs.map +7 -0
  34. package/build/tabs/root.cjs +38 -0
  35. package/build/tabs/root.cjs.map +7 -0
  36. package/build/tabs/tab.cjs +71 -0
  37. package/build/tabs/tab.cjs.map +7 -0
  38. package/build/tabs/types.cjs +19 -0
  39. package/build/tabs/types.cjs.map +7 -0
  40. package/build/tooltip/popup.cjs +3 -3
  41. package/build/tooltip/popup.cjs.map +2 -2
  42. package/build-module/badge/badge.mjs +1 -1
  43. package/build-module/badge/badge.mjs.map +2 -2
  44. package/build-module/box/box.mjs +3 -7
  45. package/build-module/box/box.mjs.map +2 -2
  46. package/build-module/button/button.mjs +3 -3
  47. package/build-module/button/button.mjs.map +2 -2
  48. package/build-module/form/primitives/fieldset/root.mjs +3 -3
  49. package/build-module/form/primitives/fieldset/root.mjs.map +2 -2
  50. package/build-module/form/primitives/input-layout/input-layout.mjs +3 -3
  51. package/build-module/form/primitives/input-layout/input-layout.mjs.map +2 -2
  52. package/build-module/form/primitives/input-layout/slot.mjs +3 -3
  53. package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
  54. package/build-module/form/primitives/select/item.mjs +3 -3
  55. package/build-module/form/primitives/select/item.mjs.map +2 -2
  56. package/build-module/form/primitives/select/popup.mjs +3 -3
  57. package/build-module/form/primitives/select/popup.mjs.map +2 -2
  58. package/build-module/form/primitives/select/trigger.mjs +3 -3
  59. package/build-module/form/primitives/select/trigger.mjs.map +2 -2
  60. package/build-module/icon-button/icon-button.mjs +68 -0
  61. package/build-module/icon-button/icon-button.mjs.map +7 -0
  62. package/build-module/icon-button/index.mjs +6 -0
  63. package/build-module/icon-button/index.mjs.map +7 -0
  64. package/build-module/icon-button/types.mjs +1 -0
  65. package/build-module/icon-button/types.mjs.map +7 -0
  66. package/build-module/index.mjs +3 -0
  67. package/build-module/index.mjs.map +2 -2
  68. package/build-module/tabs/index.mjs +12 -0
  69. package/build-module/tabs/index.mjs.map +7 -0
  70. package/build-module/tabs/list.mjs +110 -0
  71. package/build-module/tabs/list.mjs.map +7 -0
  72. package/build-module/tabs/panel.mjs +32 -0
  73. package/build-module/tabs/panel.mjs.map +7 -0
  74. package/build-module/tabs/root.mjs +13 -0
  75. package/build-module/tabs/root.mjs.map +7 -0
  76. package/build-module/tabs/tab.mjs +36 -0
  77. package/build-module/tabs/tab.mjs.map +7 -0
  78. package/build-module/tabs/types.mjs +1 -0
  79. package/build-module/tabs/types.mjs.map +7 -0
  80. package/build-module/tooltip/popup.mjs +3 -3
  81. package/build-module/tooltip/popup.mjs.map +2 -2
  82. package/build-types/box/box.d.ts.map +1 -1
  83. package/build-types/box/stories/index.story.d.ts.map +1 -1
  84. package/build-types/button/stories/index.story.d.ts +1 -2
  85. package/build-types/button/stories/index.story.d.ts.map +1 -1
  86. package/build-types/form/primitives/field/stories/index.story.d.ts +0 -1
  87. package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
  88. package/build-types/form/primitives/select/stories/index.story.d.ts +0 -1
  89. package/build-types/form/primitives/select/stories/index.story.d.ts.map +1 -1
  90. package/build-types/icon-button/icon-button.d.ts +13 -0
  91. package/build-types/icon-button/icon-button.d.ts.map +1 -0
  92. package/build-types/icon-button/index.d.ts +2 -0
  93. package/build-types/icon-button/index.d.ts.map +1 -0
  94. package/build-types/icon-button/stories/index.story.d.ts +19 -0
  95. package/build-types/icon-button/stories/index.story.d.ts.map +1 -0
  96. package/build-types/icon-button/test/index.test.d.ts +2 -0
  97. package/build-types/icon-button/test/index.test.d.ts.map +1 -0
  98. package/build-types/icon-button/types.d.ts +36 -0
  99. package/build-types/icon-button/types.d.ts.map +1 -0
  100. package/build-types/index.d.ts +2 -0
  101. package/build-types/index.d.ts.map +1 -1
  102. package/build-types/tabs/index.d.ts +6 -0
  103. package/build-types/tabs/index.d.ts.map +1 -0
  104. package/build-types/tabs/list.d.ts +16 -0
  105. package/build-types/tabs/list.d.ts.map +1 -0
  106. package/build-types/tabs/panel.d.ts +15 -0
  107. package/build-types/tabs/panel.d.ts.map +1 -0
  108. package/build-types/tabs/root.d.ts +15 -0
  109. package/build-types/tabs/root.d.ts.map +1 -0
  110. package/build-types/tabs/stories/index.story.d.ts +13 -0
  111. package/build-types/tabs/stories/index.story.d.ts.map +1 -0
  112. package/build-types/tabs/tab.d.ts +15 -0
  113. package/build-types/tabs/tab.d.ts.map +1 -0
  114. package/build-types/tabs/test/index.test.d.ts +2 -0
  115. package/build-types/tabs/test/index.test.d.ts.map +1 -0
  116. package/build-types/tabs/types.d.ts +33 -0
  117. package/build-types/tabs/types.d.ts.map +1 -0
  118. package/package.json +11 -9
  119. package/src/badge/badge.tsx +1 -1
  120. package/src/box/box.tsx +4 -15
  121. package/src/box/stories/index.story.tsx +9 -1
  122. package/src/button/stories/index.story.tsx +3 -16
  123. package/src/button/style.module.css +6 -3
  124. package/src/form/primitives/field/stories/index.story.tsx +0 -1
  125. package/src/form/primitives/fieldset/style.module.css +1 -1
  126. package/src/form/primitives/input-layout/style.module.css +5 -8
  127. package/src/form/primitives/select/stories/index.story.tsx +0 -1
  128. package/src/icon-button/icon-button.tsx +64 -0
  129. package/src/icon-button/index.ts +1 -0
  130. package/src/icon-button/stories/index.story.tsx +128 -0
  131. package/src/icon-button/style.module.css +9 -0
  132. package/src/icon-button/test/index.test.tsx +86 -0
  133. package/src/icon-button/types.ts +38 -0
  134. package/src/index.ts +2 -0
  135. package/src/tabs/index.ts +6 -0
  136. package/src/tabs/list.tsx +130 -0
  137. package/src/tabs/panel.tsx +23 -0
  138. package/src/tabs/root.tsx +15 -0
  139. package/src/tabs/stories/best-practices.mdx +85 -0
  140. package/src/tabs/stories/index.story.tsx +363 -0
  141. package/src/tabs/style.module.css +269 -0
  142. package/src/tabs/tab.tsx +29 -0
  143. package/src/tabs/test/index.test.tsx +2260 -0
  144. package/src/tabs/types.ts +36 -0
  145. package/src/tooltip/style.module.css +2 -2
  146. package/src/utils/css/item-popup.module.css +1 -1
  147. package/src/utils/css/select-trigger.module.css +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/form/primitives/select/popup.tsx", "../../../../src/utils/css/item-popup.module.css", "../../../../src/utils/css/resets.module.css", "../../../../src/form/primitives/select/style.module.css"],
4
- "sourcesContent": ["import { Select as _Select } from '@base-ui/react/select';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\ttype ThemeProvider as ThemeProviderType,\n\tprivateApis as themePrivateApis,\n} from '@wordpress/theme';\nimport { unlock } from '../../../lock-unlock';\nimport itemPopupStyles from '../../../utils/css/item-popup.module.css';\nimport resetStyles from '../../../utils/css/resets.module.css';\nimport styles from './style.module.css';\nimport type { SelectPopupProps } from './types';\nimport { ITEM_POPUP_POSITIONER_PROPS } from '../constants';\n\nconst ThemeProvider: typeof ThemeProviderType =\n\tunlock( themePrivateApis ).ThemeProvider;\n\nexport const Popup = forwardRef< HTMLDivElement, SelectPopupProps >(\n\tfunction Popup( { className, children, style, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<_Select.Portal>\n\t\t\t\t<_Select.Positioner\n\t\t\t\t\t{ ...ITEM_POPUP_POSITIONER_PROPS }\n\t\t\t\t\talignItemWithTrigger={ false }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tresetStyles[ 'box-sizing' ],\n\t\t\t\t\t\tstyles.positioner,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t<ThemeProvider>\n\t\t\t\t\t\t<_Select.Popup\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName={ itemPopupStyles.popup }\n\t\t\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<_Select.List className={ itemPopupStyles.list }>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\titemPopupStyles[\n\t\t\t\t\t\t\t\t\t\t\t'list-scrollable-container'\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</_Select.List>\n\t\t\t\t\t\t</_Select.Popup>\n\t\t\t\t\t</ThemeProvider>\n\t\t\t\t</_Select.Positioner>\n\t\t\t</_Select.Portal>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='5b85ae6367']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"5b85ae6367\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities{._380b81b8f79fb10f__dropdown-motion{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:200ms;--wp-ui-dropdown-slide-easing:cubic-bezier(0,0,0,1);--wp-ui-dropdown-fade-duration:80ms;--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:0;&[data-side=bottom]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-open]:not([data-starting-style]){opacity:1;transform:translate(0)}}}@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._234b520016b4e56f__popup{--wp-ui-popup-padding:4px;background-color:var(--wpds-color-bg-surface-neutral-strong);border:1px solid var(--wpds-color-stroke-surface-neutral);border-radius:var(--wpds-border-radius-md);box-shadow:var(--wpds-elevation-medium);color:var(--wpds-color-fg-interactive-neutral);display:grid;font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-md);grid-template-areas:\\\"header\\\" \\\"main\\\";grid-template-rows:auto minmax(0,1fr);line-height:1.4;max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width)}.f43dc7c768d7b622__list{display:grid;grid-area:main;grid-template-areas:\\\"scrollable\\\" \\\"footer\\\";grid-template-rows:minmax(0,1fr) auto}._233cd60cdb84a2ef__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}.ec4db6f0122263e7__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._233cd60cdb84a2ef__list-scrollable-container:not(:empty)+&{border-block-start:1px solid var(--wpds-color-stroke-surface-neutral)}}._684ccb7988365b4f__item{--wp-ui-popup-item-height:40px;--wp-ui-popup-item-padding-inline:12px;--wp-ui-popup-item-padding-block:4px;align-items:center;border-radius:var(--wpds-border-radius-sm);display:grid;gap:var(--wpds-dimension-gap-2xs);grid-template-columns:24px 1fr;justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);padding-block:var(--wp-ui-popup-item-padding-block);padding-inline-end:var(--wp-ui-popup-item-padding-inline);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - 4px);user-select:none;&.f181b98b0d33282a__is-size-compact{--wp-ui-popup-item-height:32px;--wp-ui-popup-item-padding-inline:8px}&._38f7faff93c61958__is-size-small{--wp-ui-popup-item-height:24px;--wp-ui-popup-item-padding-inline:8px;--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._92fbe4765dfad5ee__item-indicator-icon{opacity:0}}&[data-highlighted]:not([aria-disabled=true]){background-color:var(--wpds-color-bg-interactive-brand-weak-active);color:var(--wpds-color-fg-interactive-neutral);@media (forced-colors:active){outline:1px solid Highlight}}&[aria-disabled=true]{color:var(--wpds-color-fg-interactive-neutral-disabled);@media (forced-colors:active){color:GrayText}}}._888a2f021a37fa9c__item-indicator{justify-self:center}._06c7ff39d2f685b9__empty{--wp-ui-popup-empty-min-height:40px;--wp-ui-popup-empty-padding-inline:12px;align-items:center;color:var(--wpds-color-fg-content-neutral-weak);display:flex;grid-area:main;padding-inline:var(--wp-ui-popup-empty-padding-inline);&:not(:empty){min-height:var(--wp-ui-popup-empty-min-height)}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"popup\":\"_234b520016b4e56f__popup _380b81b8f79fb10f__dropdown-motion\",\"list\":\"f43dc7c768d7b622__list\",\"list-scrollable-container\":\"_233cd60cdb84a2ef__list-scrollable-container\",\"list-footer\":\"ec4db6f0122263e7__list-footer\",\"item\":\"_684ccb7988365b4f__item\",\"is-size-compact\":\"f181b98b0d33282a__is-size-compact\",\"is-size-small\":\"_38f7faff93c61958__is-size-small\",\"item-indicator-icon\":\"_92fbe4765dfad5ee__item-indicator-icon\",\"item-indicator\":\"_888a2f021a37fa9c__item-indicator\",\"empty\":\"_06c7ff39d2f685b9__empty\"};\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='671ebfc62d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"671ebfc62d\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='f7f9e4247f']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"f7f9e4247f\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._0ab863136fb95530__positioner{z-index:var(--wp-ui-select-z-index,initial)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"positioner\":\"_0ab863136fb95530__positioner\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAkC;AAClC,kBAAiB;AACjB,qBAA2B;AAC3B,mBAGO;AACP,yBAAuB;;;ACPvB,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,wwHAAgxH,CAAC;AAC3zH,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,qBAAQ,EAAC,SAAQ,+DAA8D,QAAO,0BAAyB,6BAA4B,gDAA+C,eAAc,iCAAgC,QAAO,2BAA0B,mBAAkB,qCAAoC,iBAAgB,oCAAmC,uBAAsB,0CAAyC,kBAAiB,qCAAoC,SAAQ,2BAA0B;;;ACN/gB,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,kMAAkM,CAAC;AAC7O,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,iBAAQ,EAAC,cAAa,gCAA+B;;;ACN5D,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,oLAAoL,CAAC;AAC/N,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,cAAa,gCAA+B;;;AHM5D,uBAA4C;AA0BpC;AAxBR,IAAM,oBACL,2BAAQ,aAAAA,WAAiB,EAAE;AAErB,IAAM,YAAQ;AAAA,EACpB,SAASC,OAAO,EAAE,WAAW,UAAU,OAAO,GAAG,UAAU,GAAG,KAAM;AACnE,WACC,4CAAC,cAAAC,OAAQ,QAAR,EACA;AAAA,MAAC,cAAAA,OAAQ;AAAA,MAAR;AAAA,QACE,GAAG;AAAA,QACL,sBAAuB;AAAA,QACvB;AAAA,QACA,eAAY,YAAAC;AAAA,UACX,eAAa,YAAa;AAAA,UAC1B,cAAO;AAAA,UACP;AAAA,QACD;AAAA,QAEA,sDAAC,iBACA;AAAA,UAAC,cAAAD,OAAQ;AAAA,UAAR;AAAA,YACA;AAAA,YACA,WAAY,mBAAgB;AAAA,YAC1B,GAAG;AAAA,YAEL,sDAAC,cAAAA,OAAQ,MAAR,EAAa,WAAY,mBAAgB,MACzC;AAAA,cAAC;AAAA;AAAA,gBACA,WACC,mBACC,2BACD;AAAA,gBAGC;AAAA;AAAA,YACH,GACD;AAAA;AAAA,QACD,GACD;AAAA;AAAA,IACD,GACD;AAAA,EAEF;AACD;",
4
+ "sourcesContent": ["import { Select as _Select } from '@base-ui/react/select';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\ttype ThemeProvider as ThemeProviderType,\n\tprivateApis as themePrivateApis,\n} from '@wordpress/theme';\nimport { unlock } from '../../../lock-unlock';\nimport itemPopupStyles from '../../../utils/css/item-popup.module.css';\nimport resetStyles from '../../../utils/css/resets.module.css';\nimport styles from './style.module.css';\nimport type { SelectPopupProps } from './types';\nimport { ITEM_POPUP_POSITIONER_PROPS } from '../constants';\n\nconst ThemeProvider: typeof ThemeProviderType =\n\tunlock( themePrivateApis ).ThemeProvider;\n\nexport const Popup = forwardRef< HTMLDivElement, SelectPopupProps >(\n\tfunction Popup( { className, children, style, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<_Select.Portal>\n\t\t\t\t<_Select.Positioner\n\t\t\t\t\t{ ...ITEM_POPUP_POSITIONER_PROPS }\n\t\t\t\t\talignItemWithTrigger={ false }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tresetStyles[ 'box-sizing' ],\n\t\t\t\t\t\tstyles.positioner,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t<ThemeProvider>\n\t\t\t\t\t\t<_Select.Popup\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName={ itemPopupStyles.popup }\n\t\t\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<_Select.List className={ itemPopupStyles.list }>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\titemPopupStyles[\n\t\t\t\t\t\t\t\t\t\t\t'list-scrollable-container'\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</_Select.List>\n\t\t\t\t\t\t</_Select.Popup>\n\t\t\t\t\t</ThemeProvider>\n\t\t\t\t</_Select.Positioner>\n\t\t\t</_Select.Portal>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='01a904506d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"01a904506d\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities{._380b81b8f79fb10f__dropdown-motion{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:200ms;--wp-ui-dropdown-slide-easing:cubic-bezier(0,0,0,1);--wp-ui-dropdown-fade-duration:80ms;--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:0;&[data-side=bottom]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-open]:not([data-starting-style]){opacity:1;transform:translate(0)}}}@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._234b520016b4e56f__popup{--wp-ui-popup-padding:4px;background-color:var(--wpds-color-bg-surface-neutral-strong);border:1px solid var(--wpds-color-stroke-surface-neutral);border-radius:var(--wpds-border-radius-md);box-shadow:var(--wpds-elevation-medium);color:var(--wpds-color-fg-interactive-neutral);display:grid;font-family:var(--wpds-font-family-body);font-size:var(--wpds-font-size-md);grid-template-areas:\\\"header\\\" \\\"main\\\";grid-template-rows:auto minmax(0,1fr);line-height:1.4;max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width)}.f43dc7c768d7b622__list{display:grid;grid-area:main;grid-template-areas:\\\"scrollable\\\" \\\"footer\\\";grid-template-rows:minmax(0,1fr) auto}._233cd60cdb84a2ef__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}.ec4db6f0122263e7__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._233cd60cdb84a2ef__list-scrollable-container:not(:empty)+&{border-block-start:1px solid var(--wpds-color-stroke-surface-neutral)}}._684ccb7988365b4f__item{--wp-ui-popup-item-height:40px;--wp-ui-popup-item-padding-inline:12px;--wp-ui-popup-item-padding-block:4px;align-items:center;border-radius:var(--wpds-border-radius-sm);display:grid;gap:var(--wpds-dimension-gap-xs);grid-template-columns:24px 1fr;justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);padding-block:var(--wp-ui-popup-item-padding-block);padding-inline-end:var(--wp-ui-popup-item-padding-inline);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - 4px);user-select:none;&.f181b98b0d33282a__is-size-compact{--wp-ui-popup-item-height:32px;--wp-ui-popup-item-padding-inline:8px}&._38f7faff93c61958__is-size-small{--wp-ui-popup-item-height:24px;--wp-ui-popup-item-padding-inline:8px;--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._92fbe4765dfad5ee__item-indicator-icon{opacity:0}}&[data-highlighted]:not([aria-disabled=true]){background-color:var(--wpds-color-bg-interactive-brand-weak-active);color:var(--wpds-color-fg-interactive-neutral);@media (forced-colors:active){outline:1px solid Highlight}}&[aria-disabled=true]{color:var(--wpds-color-fg-interactive-neutral-disabled);@media (forced-colors:active){color:GrayText}}}._888a2f021a37fa9c__item-indicator{justify-self:center}._06c7ff39d2f685b9__empty{--wp-ui-popup-empty-min-height:40px;--wp-ui-popup-empty-padding-inline:12px;align-items:center;color:var(--wpds-color-fg-content-neutral-weak);display:flex;grid-area:main;padding-inline:var(--wp-ui-popup-empty-padding-inline);&:not(:empty){min-height:var(--wp-ui-popup-empty-min-height)}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"popup\":\"_234b520016b4e56f__popup _380b81b8f79fb10f__dropdown-motion\",\"list\":\"f43dc7c768d7b622__list\",\"list-scrollable-container\":\"_233cd60cdb84a2ef__list-scrollable-container\",\"list-footer\":\"ec4db6f0122263e7__list-footer\",\"item\":\"_684ccb7988365b4f__item\",\"is-size-compact\":\"f181b98b0d33282a__is-size-compact\",\"is-size-small\":\"_38f7faff93c61958__is-size-small\",\"item-indicator-icon\":\"_92fbe4765dfad5ee__item-indicator-icon\",\"item-indicator\":\"_888a2f021a37fa9c__item-indicator\",\"empty\":\"_06c7ff39d2f685b9__empty\"};\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='671ebfc62d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"671ebfc62d\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='f7f9e4247f']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"f7f9e4247f\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._0ab863136fb95530__positioner{z-index:var(--wp-ui-select-z-index,initial)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"positioner\":\"_0ab863136fb95530__positioner\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAkC;AAClC,kBAAiB;AACjB,qBAA2B;AAC3B,mBAGO;AACP,yBAAuB;;;ACPvB,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,uwHAA+wH,CAAC;AAC1zH,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,qBAAQ,EAAC,SAAQ,+DAA8D,QAAO,0BAAyB,6BAA4B,gDAA+C,eAAc,iCAAgC,QAAO,2BAA0B,mBAAkB,qCAAoC,iBAAgB,oCAAmC,uBAAsB,0CAAyC,kBAAiB,qCAAoC,SAAQ,2BAA0B;;;ACN/gB,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,kMAAkM,CAAC;AAC7O,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,iBAAQ,EAAC,cAAa,gCAA+B;;;ACN5D,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,oLAAoL,CAAC;AAC/N,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,cAAa,gCAA+B;;;AHM5D,uBAA4C;AA0BpC;AAxBR,IAAM,oBACL,2BAAQ,aAAAA,WAAiB,EAAE;AAErB,IAAM,YAAQ;AAAA,EACpB,SAASC,OAAO,EAAE,WAAW,UAAU,OAAO,GAAG,UAAU,GAAG,KAAM;AACnE,WACC,4CAAC,cAAAC,OAAQ,QAAR,EACA;AAAA,MAAC,cAAAA,OAAQ;AAAA,MAAR;AAAA,QACE,GAAG;AAAA,QACL,sBAAuB;AAAA,QACvB;AAAA,QACA,eAAY,YAAAC;AAAA,UACX,eAAa,YAAa;AAAA,UAC1B,cAAO;AAAA,UACP;AAAA,QACD;AAAA,QAEA,sDAAC,iBACA;AAAA,UAAC,cAAAD,OAAQ;AAAA,UAAR;AAAA,YACA;AAAA,YACA,WAAY,mBAAgB;AAAA,YAC1B,GAAG;AAAA,YAEL,sDAAC,cAAAA,OAAQ,MAAR,EAAa,WAAY,mBAAgB,MACzC;AAAA,cAAC;AAAA;AAAA,gBACA,WACC,mBACC,2BACD;AAAA,gBAGC;AAAA;AAAA,YACH,GACD;AAAA;AAAA,QACD,GACD;AAAA;AAAA,IACD,GACD;AAAA,EAEF;AACD;",
6
6
  "names": ["themePrivateApis", "Popup", "_Select", "clsx"]
7
7
  }
@@ -48,10 +48,10 @@ if (typeof document !== "undefined" && !document.head.querySelector("style[data-
48
48
  var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible" };
49
49
 
50
50
  // packages/ui/src/utils/css/select-trigger.module.css
51
- if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='c44e1fd295']")) {
51
+ if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='60b12aa1b1']")) {
52
52
  const style = document.createElement("style");
53
- style.setAttribute("data-wp-hash", "c44e1fd295");
54
- style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._6e4e0445ef20426b__trigger-wrapper{&.fa98c865fb77e675__is-minimal{width:fit-content}}._7893295e3f6d1af7__trigger{align-items:center;background-color:initial;border:none;color:var(--wpds-color-fg-interactive-neutral);display:flex;font-family:inherit;font-size:inherit;gap:var(--wpds-dimension-gap-2xs);justify-content:space-between;line-height:1.4;padding-block:4px;padding-inline-end:calc(var(--wp-ui-input-layout-padding-inline) - 4px);padding-inline-start:var(--wp-ui-input-layout-padding-inline);text-align:start;user-select:none;width:100%;&.fa98c865fb77e675__is-minimal{width:auto}&:focus{outline:none}&[data-disabled]{background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled);color:var(--wpds-color-fg-interactive-neutral-disabled)}}.e760c9339965ce84__trigger-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.c67f9ed393747f3f__is-placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled)}}._308bc63e43681f99__trigger-caret{flex:0 0 auto}}"));
53
+ style.setAttribute("data-wp-hash", "60b12aa1b1");
54
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._6e4e0445ef20426b__trigger-wrapper{&.fa98c865fb77e675__is-minimal{width:fit-content}}._7893295e3f6d1af7__trigger{align-items:center;background-color:initial;border:none;color:var(--wpds-color-fg-interactive-neutral);display:flex;font-family:inherit;font-size:inherit;gap:var(--wpds-dimension-gap-xs);justify-content:space-between;line-height:1.4;padding-block:4px;padding-inline-end:calc(var(--wp-ui-input-layout-padding-inline) - 4px);padding-inline-start:var(--wp-ui-input-layout-padding-inline);text-align:start;user-select:none;width:100%;&.fa98c865fb77e675__is-minimal{width:auto}&:focus{outline:none}&[data-disabled]{background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled);color:var(--wpds-color-fg-interactive-neutral-disabled)}}.e760c9339965ce84__trigger-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.c67f9ed393747f3f__is-placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled)}}._308bc63e43681f99__trigger-caret{flex:0 0 auto}}"));
55
55
  document.head.appendChild(style);
56
56
  }
57
57
  var select_trigger_default = { "trigger-wrapper": "_6e4e0445ef20426b__trigger-wrapper", "is-minimal": "fa98c865fb77e675__is-minimal", "trigger": "_7893295e3f6d1af7__trigger", "trigger-value": "e760c9339965ce84__trigger-value", "is-placeholder": "c67f9ed393747f3f__is-placeholder", "trigger-caret": "_308bc63e43681f99__trigger-caret" };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/form/primitives/select/trigger.tsx", "../../../../src/utils/css/focus.module.css", "../../../../src/utils/css/select-trigger.module.css"],
4
- "sourcesContent": ["import { Select as _Select } from '@base-ui/react/select';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\nimport focusStyles from '../../../utils/css/focus.module.css';\nimport selectTriggerStyles from '../../../utils/css/select-trigger.module.css';\nimport { InputLayout } from '../input-layout';\nimport { Icon } from '../../../icon';\nimport type { SelectTriggerProps } from './types';\n\nexport const Trigger = forwardRef< HTMLButtonElement, SelectTriggerProps >(\n\tfunction Trigger(\n\t\t{ className, size, variant, children, ...restProps },\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<InputLayout\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tfocusStyles[ 'outset-ring--focus-within-except-active' ],\n\t\t\t\t\tselectTriggerStyles[ 'trigger-wrapper' ],\n\t\t\t\t\tvariant === 'minimal' &&\n\t\t\t\t\t\tselectTriggerStyles[ 'is-minimal' ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\tsize={ size }\n\t\t\t\tisBorderless={ variant === 'minimal' }\n\t\t\t>\n\t\t\t\t<_Select.Trigger\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tselectTriggerStyles.trigger,\n\t\t\t\t\t\tvariant === 'minimal' &&\n\t\t\t\t\t\t\tselectTriggerStyles[ 'is-minimal' ]\n\t\t\t\t\t) }\n\t\t\t\t\tdata-can-disable-input-layout\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<_Select.Value\n\t\t\t\t\t\tclassName={ ( state ) =>\n\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\tselectTriggerStyles[ 'trigger-value' ],\n\t\t\t\t\t\t\t\tstate.value === '' &&\n\t\t\t\t\t\t\t\t\tselectTriggerStyles[ 'is-placeholder' ]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</_Select.Value>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName={ selectTriggerStyles[ 'trigger-caret' ] }\n\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\tsize={ 18 }\n\t\t\t\t\t/>\n\t\t\t\t</_Select.Trigger>\n\t\t\t</InputLayout>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='28ad59e2e3']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"28ad59e2e3\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){outline-color:var(--wpds-color-stroke-focus-brand);outline-width:var(--wpds-border-width-focus)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\"};\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='c44e1fd295']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"c44e1fd295\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._6e4e0445ef20426b__trigger-wrapper{&.fa98c865fb77e675__is-minimal{width:fit-content}}._7893295e3f6d1af7__trigger{align-items:center;background-color:initial;border:none;color:var(--wpds-color-fg-interactive-neutral);display:flex;font-family:inherit;font-size:inherit;gap:var(--wpds-dimension-gap-2xs);justify-content:space-between;line-height:1.4;padding-block:4px;padding-inline-end:calc(var(--wp-ui-input-layout-padding-inline) - 4px);padding-inline-start:var(--wp-ui-input-layout-padding-inline);text-align:start;user-select:none;width:100%;&.fa98c865fb77e675__is-minimal{width:auto}&:focus{outline:none}&[data-disabled]{background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled);color:var(--wpds-color-fg-interactive-neutral-disabled)}}.e760c9339965ce84__trigger-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.c67f9ed393747f3f__is-placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled)}}._308bc63e43681f99__trigger-caret{flex:0 0 auto}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"trigger-wrapper\":\"_6e4e0445ef20426b__trigger-wrapper\",\"is-minimal\":\"fa98c865fb77e675__is-minimal\",\"trigger\":\"_7893295e3f6d1af7__trigger\",\"trigger-value\":\"e760c9339965ce84__trigger-value\",\"is-placeholder\":\"c67f9ed393747f3f__is-placeholder\",\"trigger-caret\":\"_308bc63e43681f99__trigger-caret\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAkC;AAClC,kBAAiB;AACjB,qBAA2B;AAC3B,mBAA4B;;;ACH5B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,0hCAA0hC,CAAC;AACrkC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,sDAAqD;;;ACN3f,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,ikCAAikC,CAAC;AAC5mC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,yBAAQ,EAAC,mBAAkB,sCAAqC,cAAa,gCAA+B,WAAU,8BAA6B,iBAAgB,mCAAkC,kBAAiB,oCAAmC,iBAAgB,mCAAkC;;;AFAlT,0BAA4B;AAC5B,kBAAqB;AAoBjB;AAjBG,IAAM,cAAU;AAAA,EACtB,SAASA,SACR,EAAE,WAAW,MAAM,SAAS,UAAU,GAAG,UAAU,GACnD,KACC;AACD,WACC;AAAA,MAAC;AAAA;AAAA,QACA,eAAY,YAAAC;AAAA,UACX,cAAa,yCAA0C;AAAA,UACvD,uBAAqB,iBAAkB;AAAA,UACvC,YAAY,aACX,uBAAqB,YAAa;AAAA,UACnC;AAAA,QACD;AAAA,QACA;AAAA,QACA,cAAe,YAAY;AAAA,QAE3B;AAAA,UAAC,cAAAC,OAAQ;AAAA,UAAR;AAAA,YACE,GAAG;AAAA,YACL,eAAY,YAAAD;AAAA,cACX,uBAAoB;AAAA,cACpB,YAAY,aACX,uBAAqB,YAAa;AAAA,YACpC;AAAA,YACA,iCAA6B;AAAA,YAC7B;AAAA,YAEA;AAAA;AAAA,gBAAC,cAAAC,OAAQ;AAAA,gBAAR;AAAA,kBACA,WAAY,CAAE,cACb,YAAAD;AAAA,oBACC,uBAAqB,eAAgB;AAAA,oBACrC,MAAM,UAAU,MACf,uBAAqB,gBAAiB;AAAA,kBACxC;AAAA,kBAGC;AAAA;AAAA,cACH;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACA,WAAY,uBAAqB,eAAgB;AAAA,kBACjD,MAAO;AAAA,kBACP,MAAO;AAAA;AAAA,cACR;AAAA;AAAA;AAAA,QACD;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
4
+ "sourcesContent": ["import { Select as _Select } from '@base-ui/react/select';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\nimport focusStyles from '../../../utils/css/focus.module.css';\nimport selectTriggerStyles from '../../../utils/css/select-trigger.module.css';\nimport { InputLayout } from '../input-layout';\nimport { Icon } from '../../../icon';\nimport type { SelectTriggerProps } from './types';\n\nexport const Trigger = forwardRef< HTMLButtonElement, SelectTriggerProps >(\n\tfunction Trigger(\n\t\t{ className, size, variant, children, ...restProps },\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<InputLayout\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tfocusStyles[ 'outset-ring--focus-within-except-active' ],\n\t\t\t\t\tselectTriggerStyles[ 'trigger-wrapper' ],\n\t\t\t\t\tvariant === 'minimal' &&\n\t\t\t\t\t\tselectTriggerStyles[ 'is-minimal' ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\tsize={ size }\n\t\t\t\tisBorderless={ variant === 'minimal' }\n\t\t\t>\n\t\t\t\t<_Select.Trigger\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tselectTriggerStyles.trigger,\n\t\t\t\t\t\tvariant === 'minimal' &&\n\t\t\t\t\t\t\tselectTriggerStyles[ 'is-minimal' ]\n\t\t\t\t\t) }\n\t\t\t\t\tdata-can-disable-input-layout\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<_Select.Value\n\t\t\t\t\t\tclassName={ ( state ) =>\n\t\t\t\t\t\t\tclsx(\n\t\t\t\t\t\t\t\tselectTriggerStyles[ 'trigger-value' ],\n\t\t\t\t\t\t\t\tstate.value === '' &&\n\t\t\t\t\t\t\t\t\tselectTriggerStyles[ 'is-placeholder' ]\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</_Select.Value>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName={ selectTriggerStyles[ 'trigger-caret' ] }\n\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\tsize={ 18 }\n\t\t\t\t\t/>\n\t\t\t\t</_Select.Trigger>\n\t\t\t</InputLayout>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='28ad59e2e3']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"28ad59e2e3\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active){outline-color:var(--wpds-color-stroke-focus-brand);outline-width:var(--wpds-border-width-focus)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\"};\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='60b12aa1b1']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"60b12aa1b1\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._6e4e0445ef20426b__trigger-wrapper{&.fa98c865fb77e675__is-minimal{width:fit-content}}._7893295e3f6d1af7__trigger{align-items:center;background-color:initial;border:none;color:var(--wpds-color-fg-interactive-neutral);display:flex;font-family:inherit;font-size:inherit;gap:var(--wpds-dimension-gap-xs);justify-content:space-between;line-height:1.4;padding-block:4px;padding-inline-end:calc(var(--wp-ui-input-layout-padding-inline) - 4px);padding-inline-start:var(--wp-ui-input-layout-padding-inline);text-align:start;user-select:none;width:100%;&.fa98c865fb77e675__is-minimal{width:auto}&:focus{outline:none}&[data-disabled]{background-color:var(--wpds-color-bg-interactive-neutral-weak-disabled);color:var(--wpds-color-fg-interactive-neutral-disabled)}}.e760c9339965ce84__trigger-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.c67f9ed393747f3f__is-placeholder{color:var(--wpds-color-fg-interactive-neutral-disabled)}}._308bc63e43681f99__trigger-caret{flex:0 0 auto}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"trigger-wrapper\":\"_6e4e0445ef20426b__trigger-wrapper\",\"is-minimal\":\"fa98c865fb77e675__is-minimal\",\"trigger\":\"_7893295e3f6d1af7__trigger\",\"trigger-value\":\"e760c9339965ce84__trigger-value\",\"is-placeholder\":\"c67f9ed393747f3f__is-placeholder\",\"trigger-caret\":\"_308bc63e43681f99__trigger-caret\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAkC;AAClC,kBAAiB;AACjB,qBAA2B;AAC3B,mBAA4B;;;ACH5B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,0hCAA0hC,CAAC;AACrkC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,sDAAqD;;;ACN3f,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,gkCAAgkC,CAAC;AAC3mC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,yBAAQ,EAAC,mBAAkB,sCAAqC,cAAa,gCAA+B,WAAU,8BAA6B,iBAAgB,mCAAkC,kBAAiB,oCAAmC,iBAAgB,mCAAkC;;;AFAlT,0BAA4B;AAC5B,kBAAqB;AAoBjB;AAjBG,IAAM,cAAU;AAAA,EACtB,SAASA,SACR,EAAE,WAAW,MAAM,SAAS,UAAU,GAAG,UAAU,GACnD,KACC;AACD,WACC;AAAA,MAAC;AAAA;AAAA,QACA,eAAY,YAAAC;AAAA,UACX,cAAa,yCAA0C;AAAA,UACvD,uBAAqB,iBAAkB;AAAA,UACvC,YAAY,aACX,uBAAqB,YAAa;AAAA,UACnC;AAAA,QACD;AAAA,QACA;AAAA,QACA,cAAe,YAAY;AAAA,QAE3B;AAAA,UAAC,cAAAC,OAAQ;AAAA,UAAR;AAAA,YACE,GAAG;AAAA,YACL,eAAY,YAAAD;AAAA,cACX,uBAAoB;AAAA,cACpB,YAAY,aACX,uBAAqB,YAAa;AAAA,YACpC;AAAA,YACA,iCAA6B;AAAA,YAC7B;AAAA,YAEA;AAAA;AAAA,gBAAC,cAAAC,OAAQ;AAAA,gBAAR;AAAA,kBACA,WAAY,CAAE,cACb,YAAAD;AAAA,oBACC,uBAAqB,eAAgB;AAAA,oBACrC,MAAM,UAAU,MACf,uBAAqB,gBAAiB;AAAA,kBACxC;AAAA,kBAGC;AAAA;AAAA,cACH;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACA,WAAY,uBAAqB,eAAgB;AAAA,kBACjD,MAAO;AAAA,kBACP,MAAO;AAAA;AAAA,cACR;AAAA;AAAA;AAAA,QACD;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
6
6
  "names": ["Trigger", "clsx", "_Select"]
7
7
  }
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/ui/src/icon-button/icon-button.tsx
31
+ var icon_button_exports = {};
32
+ __export(icon_button_exports, {
33
+ IconButton: () => IconButton
34
+ });
35
+ module.exports = __toCommonJS(icon_button_exports);
36
+ var import_clsx = __toESM(require("clsx"));
37
+ var import_element = require("@wordpress/element");
38
+ var import_button = require("../button/index.cjs");
39
+ var import_icon = require("../icon/index.cjs");
40
+ var Tooltip = __toESM(require("../tooltip/index.cjs"));
41
+
42
+ // packages/ui/src/icon-button/style.module.css
43
+ if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='02658e69b8']")) {
44
+ const style = document.createElement("style");
45
+ style.setAttribute("data-wp-hash", "02658e69b8");
46
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0;--wp-ui-button-min-width:unset}}"));
47
+ document.head.appendChild(style);
48
+ }
49
+ var style_default = { "icon-button": "_28cfdc260e755391__icon-button" };
50
+
51
+ // packages/ui/src/icon-button/icon-button.tsx
52
+ var import_jsx_runtime = require("react/jsx-runtime");
53
+ var IconButton = (0, import_element.forwardRef)(
54
+ function IconButton2({
55
+ label,
56
+ className,
57
+ // Prevent accidental forwarding of `children`
58
+ children: _children,
59
+ icon,
60
+ size,
61
+ shortcut,
62
+ ...restProps
63
+ }, ref) {
64
+ const classes = (0, import_clsx.default)(style_default["icon-button"], className);
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip.Provider, { delay: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip.Root, { children: [
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
+ Tooltip.Trigger,
68
+ {
69
+ ref,
70
+ render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ import_button.Button,
72
+ {
73
+ ...restProps,
74
+ size,
75
+ "aria-label": label,
76
+ "aria-keyshortcuts": shortcut?.ariaKeyShortcut
77
+ }
78
+ ),
79
+ className: classes,
80
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ import_icon.Icon,
82
+ {
83
+ icon,
84
+ size: size === "small" ? 22 : 24
85
+ }
86
+ )
87
+ }
88
+ ),
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Tooltip.Popup, { children: [
90
+ label,
91
+ shortcut && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
92
+ " ",
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: shortcut.displayShortcut })
94
+ ] })
95
+ ] })
96
+ ] }) });
97
+ }
98
+ );
99
+ // Annotate the CommonJS export names for ESM import in node:
100
+ 0 && (module.exports = {
101
+ IconButton
102
+ });
103
+ //# sourceMappingURL=icon-button.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/icon-button/icon-button.tsx", "../../src/icon-button/style.module.css"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { Button } from '../button';\nimport { Icon } from '../icon';\nimport * as Tooltip from '../tooltip';\nimport styles from './style.module.css';\nimport { type IconButtonProps } from './types';\n\n/**\n * An icon-only button with automatic tooltip and optimized styling.\n * Inherits all Button props while providing icon-specific enhancements.\n */\nexport const IconButton = forwardRef< HTMLButtonElement, IconButtonProps >(\n\tfunction IconButton(\n\t\t{\n\t\t\tlabel,\n\t\t\tclassName,\n\t\t\t// Prevent accidental forwarding of `children`\n\t\t\tchildren: _children,\n\t\t\ticon,\n\t\t\tsize,\n\t\t\tshortcut,\n\t\t\t...restProps\n\t\t}: IconButtonProps & { children?: unknown },\n\t\tref\n\t) {\n\t\tconst classes = clsx( styles[ 'icon-button' ], className );\n\n\t\treturn (\n\t\t\t<Tooltip.Provider delay={ 0 }>\n\t\t\t\t<Tooltip.Root>\n\t\t\t\t\t<Tooltip.Trigger\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\t\t\taria-keyshortcuts={ shortcut?.ariaKeyShortcut }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclassName={ classes }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tsize={ size === 'small' ? 22 : 24 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Tooltip.Trigger>\n\t\t\t\t\t<Tooltip.Popup>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t{ shortcut && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ ' ' }\n\t\t\t\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t{ shortcut.displayShortcut }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Tooltip.Popup>\n\t\t\t\t</Tooltip.Root>\n\t\t\t</Tooltip.Provider>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='02658e69b8']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"02658e69b8\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0;--wp-ui-button-min-width:unset}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"icon-button\":\"_28cfdc260e755391__icon-button\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAA2B;AAC3B,oBAAuB;AACvB,kBAAqB;AACrB,cAAyB;;;ACJzB,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,wOAAwO,CAAC;AACnR,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,eAAc,iCAAgC;;;AD4BvD;AAtBA,IAAM,iBAAa;AAAA,EACzB,SAASA,YACR;AAAA,IACC;AAAA,IACA;AAAA;AAAA,IAEA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,GACA,KACC;AACD,UAAM,cAAU,YAAAC,SAAM,cAAQ,aAAc,GAAG,SAAU;AAEzD,WACC,4CAAS,kBAAR,EAAiB,OAAQ,GACzB,uDAAS,cAAR,EACA;AAAA;AAAA,QAAS;AAAA,QAAR;AAAA,UACA;AAAA,UACA,QACC;AAAA,YAAC;AAAA;AAAA,cACE,GAAG;AAAA,cACL;AAAA,cACA,cAAa;AAAA,cACb,qBAAoB,UAAU;AAAA;AAAA,UAC/B;AAAA,UAED,WAAY;AAAA,UAEZ;AAAA,YAAC;AAAA;AAAA,cACA;AAAA,cACA,MAAO,SAAS,UAAU,KAAK;AAAA;AAAA,UAChC;AAAA;AAAA,MACD;AAAA,MACA,6CAAS,eAAR,EACE;AAAA;AAAA,QACA,YACD,4EACG;AAAA;AAAA,UACF,4CAAC,UAAK,eAAY,QACf,mBAAS,iBACZ;AAAA,WACD;AAAA,SAEF;AAAA,OACD,GACD;AAAA,EAEF;AACD;",
6
+ "names": ["IconButton", "clsx"]
7
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/ui/src/icon-button/index.ts
21
+ var icon_button_exports = {};
22
+ __export(icon_button_exports, {
23
+ IconButton: () => import_icon_button.IconButton
24
+ });
25
+ module.exports = __toCommonJS(icon_button_exports);
26
+ var import_icon_button = require("./icon-button.cjs");
27
+ // Annotate the CommonJS export names for ESM import in node:
28
+ 0 && (module.exports = {
29
+ IconButton
30
+ });
31
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/icon-button/index.ts"],
4
+ "sourcesContent": ["export { IconButton } from './icon-button';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA2B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // packages/ui/src/icon-button/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/icon-button/types.ts"],
4
+ "sourcesContent": ["import { type ButtonProps } from '../button/types';\nimport { type IconProps } from '../icon/types';\n\nexport type IconButtonProps = Omit< ButtonProps, 'children' > & {\n\t/**\n\t * A label describing the button's action, shown as a tooltip and to\n\t * assistive technology.\n\t */\n\tlabel: string;\n\n\t/**\n\t * The icon to display in the button.\n\t */\n\ticon: IconProps[ 'icon' ];\n\n\t/**\n\t * The keyboard shortcut associated with this button. When provided, the\n\t * shortcut is displayed in the tooltip and announced to assistive technology.\n\t *\n\t * **Note**: This prop is for display and accessibility purposes only \u2014 the\n\t * consumer is responsible for implementing the actual keyboard event handler.\n\t */\n\tshortcut?: {\n\t\t/**\n\t\t * The human-readable representation of the shortcut, displayed in the\n\t\t * tooltip. Use platform-appropriate symbols (e.g., \"\u2318S\" on macOS,\n\t\t * \"Ctrl+S\" on Windows).\n\t\t */\n\t\tdisplayShortcut: string;\n\t\t/**\n\t\t * The shortcut in a format compatible with the\n\t\t * [aria-keyshortcuts](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-keyshortcuts)\n\t\t * attribute. Use \"+\" to separate keys and standard key names\n\t\t * (e.g., \"Meta+S\", \"Control+Shift+P\").\n\t\t */\n\t\tariaKeyShortcut: string;\n\t};\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/build/index.cjs CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // packages/ui/src/index.ts
32
32
  var index_exports = {};
33
33
  __export(index_exports, {
34
+ Tabs: () => Tabs,
34
35
  Tooltip: () => Tooltip
35
36
  });
36
37
  module.exports = __toCommonJS(index_exports);
@@ -39,17 +40,21 @@ __reExport(index_exports, require("./box/index.cjs"), module.exports);
39
40
  __reExport(index_exports, require("./button/index.cjs"), module.exports);
40
41
  __reExport(index_exports, require("./form/primitives/index.cjs"), module.exports);
41
42
  __reExport(index_exports, require("./icon/index.cjs"), module.exports);
43
+ __reExport(index_exports, require("./icon-button/index.cjs"), module.exports);
42
44
  __reExport(index_exports, require("./stack/index.cjs"), module.exports);
45
+ var Tabs = __toESM(require("./tabs/index.cjs"));
43
46
  var Tooltip = __toESM(require("./tooltip/index.cjs"));
44
47
  __reExport(index_exports, require("./visually-hidden/index.cjs"), module.exports);
45
48
  // Annotate the CommonJS export names for ESM import in node:
46
49
  0 && (module.exports = {
50
+ Tabs,
47
51
  Tooltip,
48
52
  ...require("./badge/index.cjs"),
49
53
  ...require("./box/index.cjs"),
50
54
  ...require("./button/index.cjs"),
51
55
  ...require("./form/primitives/index.cjs"),
52
56
  ...require("./icon/index.cjs"),
57
+ ...require("./icon-button/index.cjs"),
53
58
  ...require("./stack/index.cjs"),
54
59
  ...require("./visually-hidden/index.cjs")
55
60
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["export * from './badge';\nexport * from './box';\nexport * from './button';\nexport * from './form/primitives';\nexport * from './icon';\nexport * from './stack';\nexport * as Tooltip from './tooltip';\nexport * from './visually-hidden';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,8BAAd;AACA,0BAAc,4BADd;AAEA,0BAAc,+BAFd;AAGA,0BAAc,wCAHd;AAIA,0BAAc,6BAJd;AAKA,0BAAc,8BALd;AAMA,cAAyB;AACzB,0BAAc,wCAPd;",
4
+ "sourcesContent": ["export * from './badge';\nexport * from './box';\nexport * from './button';\nexport * from './form/primitives';\nexport * from './icon';\nexport * from './icon-button';\nexport * from './stack';\nexport * as Tabs from './tabs';\nexport * as Tooltip from './tooltip';\nexport * from './visually-hidden';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAc,8BAAd;AACA,0BAAc,4BADd;AAEA,0BAAc,+BAFd;AAGA,0BAAc,wCAHd;AAIA,0BAAc,6BAJd;AAKA,0BAAc,oCALd;AAMA,0BAAc,8BANd;AAOA,WAAsB;AACtB,cAAyB;AACzB,0BAAc,wCATd;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/ui/src/tabs/index.ts
21
+ var tabs_exports = {};
22
+ __export(tabs_exports, {
23
+ List: () => import_list.List,
24
+ Panel: () => import_panel.Panel,
25
+ Root: () => import_root.Root,
26
+ Tab: () => import_tab.Tab
27
+ });
28
+ module.exports = __toCommonJS(tabs_exports);
29
+ var import_list = require("./list.cjs");
30
+ var import_panel = require("./panel.cjs");
31
+ var import_root = require("./root.cjs");
32
+ var import_tab = require("./tab.cjs");
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ List,
36
+ Panel,
37
+ Root,
38
+ Tab
39
+ });
40
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/tabs/index.ts"],
4
+ "sourcesContent": ["import { List } from './list';\nimport { Panel } from './panel';\nimport { Root } from './root';\nimport { Tab } from './tab';\n\nexport { Root, List, Panel, Tab };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;AACrB,mBAAsB;AACtB,kBAAqB;AACrB,iBAAoB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/ui/src/tabs/list.tsx
31
+ var list_exports = {};
32
+ __export(list_exports, {
33
+ List: () => List
34
+ });
35
+ module.exports = __toCommonJS(list_exports);
36
+ var import_element = require("@wordpress/element");
37
+ var import_clsx = __toESM(require("clsx"));
38
+ var import_tabs = require("@base-ui/react/tabs");
39
+ var import_compose = require("@wordpress/compose");
40
+
41
+ // packages/ui/src/tabs/style.module.css
42
+ if (typeof document !== "undefined" && !document.head.querySelector("style[data-wp-hash='21bdd25f32']")) {
43
+ const style = document.createElement("style");
44
+ style.setAttribute("data-wp-hash", "21bdd25f32");
45
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:#0000 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,#0000 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid #0000;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong);bottom:0;height:var(--wpds-border-width-focus);left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-bg-interactive-neutral-weak-active);border-radius:var(--wpds-border-radius-sm);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus-brand);box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral);cursor:pointer;display:flex;flex:1 0 auto;font-family:sans-serif;font-size:13px;font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active)}&:after{border-radius:var(--wpds-border-radius-sm);opacity:0;outline:var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus-brand);pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm) var(--wpds-dimension-padding-md)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus)}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}._49f4bf715948892a__tabpanel{&:focus{box-shadow:none;outline:none}&:focus-visible{box-shadow:0 0 0 var(--wpds-border-width-focus) var(--wpds-color-stroke-focus-brand);outline:2px solid #0000;outline-offset:0}}}'));
46
+ document.head.appendChild(style);
47
+ }
48
+ var style_default = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron", "tabpanel": "_49f4bf715948892a__tabpanel" };
49
+
50
+ // packages/ui/src/tabs/list.tsx
51
+ var import_jsx_runtime = require("react/jsx-runtime");
52
+ var SCROLL_EPSILON = 1;
53
+ var List = (0, import_element.forwardRef)(
54
+ function TabList({
55
+ children,
56
+ variant = "default",
57
+ className,
58
+ activateOnFocus,
59
+ render,
60
+ ...otherProps
61
+ }, forwardedRef) {
62
+ const [listEl, setListEl] = (0, import_element.useState)(null);
63
+ const [overflow, setOverflow] = (0, import_element.useState)({
64
+ first: false,
65
+ last: false,
66
+ isScrolling: false
67
+ });
68
+ (0, import_element.useEffect)(() => {
69
+ if (!listEl) {
70
+ return;
71
+ }
72
+ const measureOverflow = () => {
73
+ const { scrollWidth, clientWidth, scrollLeft } = listEl;
74
+ const maxScroll = Math.max(scrollWidth - clientWidth, 0);
75
+ const direction = listEl.dir || (typeof window !== "undefined" ? window.getComputedStyle(listEl).direction : "ltr");
76
+ const scrollFromStart = direction === "rtl" && scrollLeft < 0 ? (
77
+ // In RTL layouts, scrollLeft is typically 0 at the visual "start"
78
+ // (right edge) and becomes negative toward the "end" (left edge).
79
+ // Normalize value for correct first/last detection logic.
80
+ -scrollLeft
81
+ ) : scrollLeft;
82
+ setOverflow({
83
+ first: scrollFromStart > SCROLL_EPSILON,
84
+ last: scrollFromStart < maxScroll - SCROLL_EPSILON,
85
+ isScrolling: scrollWidth > clientWidth
86
+ });
87
+ };
88
+ const resizeObserver = new ResizeObserver(measureOverflow);
89
+ resizeObserver.observe(listEl);
90
+ let scrollTick = false;
91
+ const throttleMeasureOverflowOnScroll = () => {
92
+ if (!scrollTick) {
93
+ requestAnimationFrame(() => {
94
+ measureOverflow();
95
+ scrollTick = false;
96
+ });
97
+ scrollTick = true;
98
+ }
99
+ };
100
+ listEl.addEventListener(
101
+ "scroll",
102
+ throttleMeasureOverflowOnScroll,
103
+ { passive: true }
104
+ );
105
+ measureOverflow();
106
+ return () => {
107
+ listEl.removeEventListener(
108
+ "scroll",
109
+ throttleMeasureOverflowOnScroll
110
+ );
111
+ resizeObserver.disconnect();
112
+ };
113
+ }, [listEl]);
114
+ const mergedListRef = (0, import_compose.useMergeRefs)([
115
+ forwardedRef,
116
+ (el) => setListEl(el)
117
+ ]);
118
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
119
+ import_tabs.Tabs.List,
120
+ {
121
+ ref: mergedListRef,
122
+ activateOnFocus,
123
+ "data-select-on-move": activateOnFocus ? "true" : "false",
124
+ className: (0, import_clsx.default)(
125
+ style_default.tablist,
126
+ overflow.first && style_default["is-overflowing-first"],
127
+ overflow.last && style_default["is-overflowing-last"],
128
+ style_default[`is-${variant}-variant`],
129
+ className
130
+ ),
131
+ ...otherProps,
132
+ tabIndex: otherProps.tabIndex ?? (overflow.isScrolling ? -1 : void 0),
133
+ children: [
134
+ children,
135
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.Tabs.Indicator, { className: style_default.indicator })
136
+ ]
137
+ }
138
+ );
139
+ }
140
+ );
141
+ // Annotate the CommonJS export names for ESM import in node:
142
+ 0 && (module.exports = {
143
+ List
144
+ });
145
+ //# sourceMappingURL=list.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/tabs/list.tsx", "../../src/tabs/style.module.css"],
4
+ "sourcesContent": ["import { forwardRef, useEffect, useState } from '@wordpress/element';\nimport clsx from 'clsx';\nimport { Tabs as _Tabs } from '@base-ui/react/tabs';\nimport { useMergeRefs } from '@wordpress/compose';\nimport styles from './style.module.css';\nimport type { TabListProps } from './types';\n\n// Account for sub-pixel rounding errors.\nconst SCROLL_EPSILON = 1;\n\n/**\n * Groups the individual tab buttons.\n *\n * `Tabs` is a collection of React components that combine to render\n * an [ARIA-compliant tabs pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/).\n */\nexport const List = forwardRef< HTMLDivElement, TabListProps >(\n\tfunction TabList(\n\t\t{\n\t\t\tchildren,\n\t\t\tvariant = 'default',\n\t\t\tclassName,\n\t\t\tactivateOnFocus,\n\t\t\trender,\n\t\t\t...otherProps\n\t\t},\n\t\tforwardedRef\n\t) {\n\t\tconst [ listEl, setListEl ] = useState< HTMLDivElement | null >( null );\n\t\tconst [ overflow, setOverflow ] = useState< {\n\t\t\tfirst: boolean;\n\t\t\tlast: boolean;\n\t\t\tisScrolling: boolean;\n\t\t} >( {\n\t\t\tfirst: false,\n\t\t\tlast: false,\n\t\t\tisScrolling: false,\n\t\t} );\n\n\t\t// Check if list is overflowing when it scrolls or resizes.\n\t\tuseEffect( () => {\n\t\t\tif ( ! listEl ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst measureOverflow = () => {\n\t\t\t\tconst { scrollWidth, clientWidth, scrollLeft } = listEl;\n\t\t\t\tconst maxScroll = Math.max( scrollWidth - clientWidth, 0 );\n\t\t\t\tconst direction =\n\t\t\t\t\tlistEl.dir ||\n\t\t\t\t\t( typeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle( listEl ).direction\n\t\t\t\t\t\t: 'ltr' );\n\n\t\t\t\tconst scrollFromStart =\n\t\t\t\t\tdirection === 'rtl' && scrollLeft < 0\n\t\t\t\t\t\t? // In RTL layouts, scrollLeft is typically 0 at the visual \"start\"\n\t\t\t\t\t\t // (right edge) and becomes negative toward the \"end\" (left edge).\n\t\t\t\t\t\t // Normalize value for correct first/last detection logic.\n\t\t\t\t\t\t -scrollLeft\n\t\t\t\t\t\t: scrollLeft;\n\n\t\t\t\t// Use SCROLL_EPSILON to handle subpixel rendering differences.\n\t\t\t\tsetOverflow( {\n\t\t\t\t\tfirst: scrollFromStart > SCROLL_EPSILON,\n\t\t\t\t\tlast: scrollFromStart < maxScroll - SCROLL_EPSILON,\n\t\t\t\t\tisScrolling: scrollWidth > clientWidth,\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\tconst resizeObserver = new ResizeObserver( measureOverflow );\n\t\t\tresizeObserver.observe( listEl );\n\n\t\t\tlet scrollTick = false;\n\t\t\tconst throttleMeasureOverflowOnScroll = () => {\n\t\t\t\tif ( ! scrollTick ) {\n\t\t\t\t\trequestAnimationFrame( () => {\n\t\t\t\t\t\tmeasureOverflow();\n\t\t\t\t\t\tscrollTick = false;\n\t\t\t\t\t} );\n\t\t\t\t\tscrollTick = true;\n\t\t\t\t}\n\t\t\t};\n\t\t\tlistEl.addEventListener(\n\t\t\t\t'scroll',\n\t\t\t\tthrottleMeasureOverflowOnScroll,\n\t\t\t\t{ passive: true }\n\t\t\t);\n\n\t\t\t// Initial check.\n\t\t\tmeasureOverflow();\n\n\t\t\treturn () => {\n\t\t\t\tlistEl.removeEventListener(\n\t\t\t\t\t'scroll',\n\t\t\t\t\tthrottleMeasureOverflowOnScroll\n\t\t\t\t);\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t};\n\t\t}, [ listEl ] );\n\n\t\tconst mergedListRef = useMergeRefs( [\n\t\t\tforwardedRef,\n\t\t\t( el: HTMLDivElement | null ) => setListEl( el ),\n\t\t] );\n\n\t\treturn (\n\t\t\t<_Tabs.List\n\t\t\t\tref={ mergedListRef }\n\t\t\t\tactivateOnFocus={ activateOnFocus }\n\t\t\t\tdata-select-on-move={ activateOnFocus ? 'true' : 'false' }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tstyles.tablist,\n\t\t\t\t\toverflow.first && styles[ 'is-overflowing-first' ],\n\t\t\t\t\toverflow.last && styles[ 'is-overflowing-last' ],\n\t\t\t\t\tstyles[ `is-${ variant }-variant` ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\t{ ...otherProps }\n\t\t\t\ttabIndex={\n\t\t\t\t\totherProps.tabIndex ??\n\t\t\t\t\t( overflow.isScrolling ? -1 : undefined )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t<_Tabs.Indicator className={ styles.indicator } />\n\t\t\t</_Tabs.List>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && !document.head.querySelector(\"style[data-wp-hash='21bdd25f32']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"21bdd25f32\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:#0000 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,#0000 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid #0000;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong);bottom:0;height:var(--wpds-border-width-focus);left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-bg-interactive-neutral-weak-active);border-radius:var(--wpds-border-radius-sm);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\\n\\t\\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus-brand);box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral);cursor:pointer;display:flex;flex:1 0 auto;font-family:sans-serif;font-size:13px;font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active)}&:after{border-radius:var(--wpds-border-radius-sm);opacity:0;outline:var(--wpds-border-width-focus) solid var(--wpds-color-stroke-focus-brand);pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg);scroll-margin:24px;&:after{content:\\\"\\\";inset:var(--wpds-dimension-padding-md)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm) var(--wpds-dimension-padding-md)}[data-orientation=vertical][data-select-on-move=false] &:after{content:\\\"\\\";inset:var(--wpds-border-width-focus)}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\\n\\t\\t\\t[role=tab]:is([aria-selected=true])\\n\\t\\t\\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}._49f4bf715948892a__tabpanel{&:focus{box-shadow:none;outline:none}&:focus-visible{box-shadow:0 0 0 var(--wpds-border-width-focus) var(--wpds-color-stroke-focus-brand);outline:2px solid #0000;outline-offset:0}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"tablist\":\"_7313adbc8a112e90__tablist\",\"is-overflowing-first\":\"_9f2ac729c68a735a__is-overflowing-first\",\"is-overflowing-last\":\"_81c799c1f3cdd261__is-overflowing-last\",\"is-minimal-variant\":\"_59228b5227f38a99__is-minimal-variant\",\"indicator\":\"_1c37dcfaa1ad8cda__indicator\",\"tab\":\"a5fd8814f195aa5e__tab\",\"tab-children\":\"_5dfc77e6edd345d4__tab-children\",\"tab-chevron\":\"_4a20e969d15e5ac1__tab-chevron\",\"tabpanel\":\"_49f4bf715948892a__tabpanel\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAgD;AAChD,kBAAiB;AACjB,kBAA8B;AAC9B,qBAA6B;;;ACH7B,IAAI,OAAO,aAAa,eAAe,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AACxG,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,ksIAA8sI,CAAC;AACzvI,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,WAAU,8BAA6B,wBAAuB,2CAA0C,uBAAsB,0CAAyC,sBAAqB,yCAAwC,aAAY,gCAA+B,OAAM,yBAAwB,gBAAe,mCAAkC,eAAc,kCAAiC,YAAW,8BAA6B;;;ADqGlc;AAnGH,IAAM,iBAAiB;AAQhB,IAAM,WAAO;AAAA,EACnB,SAAS,QACR;AAAA,IACC;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,GACA,cACC;AACD,UAAM,CAAE,QAAQ,SAAU,QAAI,yBAAmC,IAAK;AACtE,UAAM,CAAE,UAAU,WAAY,QAAI,yBAI7B;AAAA,MACJ,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,IACd,CAAE;AAGF,kCAAW,MAAM;AAChB,UAAK,CAAE,QAAS;AACf;AAAA,MACD;AAEA,YAAM,kBAAkB,MAAM;AAC7B,cAAM,EAAE,aAAa,aAAa,WAAW,IAAI;AACjD,cAAM,YAAY,KAAK,IAAK,cAAc,aAAa,CAAE;AACzD,cAAM,YACL,OAAO,QACL,OAAO,WAAW,cACjB,OAAO,iBAAkB,MAAO,EAAE,YAClC;AAEJ,cAAM,kBACL,cAAc,SAAS,aAAa;AAAA;AAAA;AAAA;AAAA,UAIjC,CAAC;AAAA,YACD;AAGJ,oBAAa;AAAA,UACZ,OAAO,kBAAkB;AAAA,UACzB,MAAM,kBAAkB,YAAY;AAAA,UACpC,aAAa,cAAc;AAAA,QAC5B,CAAE;AAAA,MACH;AAEA,YAAM,iBAAiB,IAAI,eAAgB,eAAgB;AAC3D,qBAAe,QAAS,MAAO;AAE/B,UAAI,aAAa;AACjB,YAAM,kCAAkC,MAAM;AAC7C,YAAK,CAAE,YAAa;AACnB,gCAAuB,MAAM;AAC5B,4BAAgB;AAChB,yBAAa;AAAA,UACd,CAAE;AACF,uBAAa;AAAA,QACd;AAAA,MACD;AACA,aAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA,EAAE,SAAS,KAAK;AAAA,MACjB;AAGA,sBAAgB;AAEhB,aAAO,MAAM;AACZ,eAAO;AAAA,UACN;AAAA,UACA;AAAA,QACD;AACA,uBAAe,WAAW;AAAA,MAC3B;AAAA,IACD,GAAG,CAAE,MAAO,CAAE;AAEd,UAAM,oBAAgB,6BAAc;AAAA,MACnC;AAAA,MACA,CAAE,OAA+B,UAAW,EAAG;AAAA,IAChD,CAAE;AAEF,WACC;AAAA,MAAC,YAAAA,KAAM;AAAA,MAAN;AAAA,QACA,KAAM;AAAA,QACN;AAAA,QACA,uBAAsB,kBAAkB,SAAS;AAAA,QACjD,eAAY,YAAAC;AAAA,UACX,cAAO;AAAA,UACP,SAAS,SAAS,cAAQ,sBAAuB;AAAA,UACjD,SAAS,QAAQ,cAAQ,qBAAsB;AAAA,UAC/C,cAAQ,MAAO,OAAQ,UAAW;AAAA,UAClC;AAAA,QACD;AAAA,QACE,GAAG;AAAA,QACL,UACC,WAAW,aACT,SAAS,cAAc,KAAK;AAAA,QAG7B;AAAA;AAAA,UACF,4CAAC,YAAAD,KAAM,WAAN,EAAgB,WAAY,cAAO,WAAY;AAAA;AAAA;AAAA,IACjD;AAAA,EAEF;AACD;",
6
+ "names": ["_Tabs", "clsx"]
7
+ }