@wordpress/components 28.7.0 → 28.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/build/box-control/all-input-control.js +1 -2
  3. package/build/box-control/all-input-control.js.map +1 -1
  4. package/build/box-control/utils.js +1 -1
  5. package/build/box-control/utils.js.map +1 -1
  6. package/build/card/card/component.js +2 -2
  7. package/build/card/card/component.js.map +1 -1
  8. package/build/card/styles.js +18 -18
  9. package/build/card/styles.js.map +1 -1
  10. package/build/combobox-control/index.js +3 -1
  11. package/build/combobox-control/index.js.map +1 -1
  12. package/build/combobox-control/types.js.map +1 -1
  13. package/build/composite/context.js +1 -1
  14. package/build/composite/context.js.map +1 -1
  15. package/build/composite/group-label.js +1 -1
  16. package/build/composite/group-label.js.map +1 -1
  17. package/build/composite/group.js +1 -1
  18. package/build/composite/group.js.map +1 -1
  19. package/build/composite/hover.js +1 -1
  20. package/build/composite/hover.js.map +1 -1
  21. package/build/composite/index.js +17 -26
  22. package/build/composite/index.js.map +1 -1
  23. package/build/composite/item.js +1 -1
  24. package/build/composite/item.js.map +1 -1
  25. package/build/composite/legacy/index.js +59 -8
  26. package/build/composite/legacy/index.js.map +1 -1
  27. package/build/composite/row.js +1 -1
  28. package/build/composite/row.js.map +1 -1
  29. package/build/composite/typeahead.js +1 -1
  30. package/build/composite/typeahead.js.map +1 -1
  31. package/build/composite/types.js.map +1 -1
  32. package/build/custom-select-control-v2/styles.js +9 -9
  33. package/build/custom-select-control-v2/styles.js.map +1 -1
  34. package/build/date-time/date/index.js +1 -1
  35. package/build/date-time/date/index.js.map +1 -1
  36. package/build/date-time/date/styles.js +35 -24
  37. package/build/date-time/date/styles.js.map +1 -1
  38. package/build/date-time/date/use-lilius/index.js +163 -0
  39. package/build/date-time/date/use-lilius/index.js.map +1 -0
  40. package/build/dropdown-menu-v2/styles.js +17 -17
  41. package/build/dropdown-menu-v2/styles.js.map +1 -1
  42. package/build/index.js +7 -0
  43. package/build/index.js.map +1 -1
  44. package/build/modal/index.js +27 -12
  45. package/build/modal/index.js.map +1 -1
  46. package/build/modal/types.js.map +1 -1
  47. package/build/modal/use-modal-exit-animation.js +75 -0
  48. package/build/modal/use-modal-exit-animation.js.map +1 -0
  49. package/build/navigator/navigator-screen/component.js +5 -0
  50. package/build/navigator/navigator-screen/component.js.map +1 -1
  51. package/build/private-apis.js +0 -9
  52. package/build/private-apis.js.map +1 -1
  53. package/build/range-control/styles/range-control-styles.js +28 -28
  54. package/build/range-control/styles/range-control-styles.js.map +1 -1
  55. package/build/slot-fill/index.js +1 -0
  56. package/build/slot-fill/index.js.map +1 -1
  57. package/build/tabs/styles.js +3 -3
  58. package/build/tabs/styles.js.map +1 -1
  59. package/build/tabs/tablist.js +5 -4
  60. package/build/tabs/tablist.js.map +1 -1
  61. package/build/utils/config-values.js +4 -5
  62. package/build/utils/config-values.js.map +1 -1
  63. package/build/utils/element-rect.js +73 -105
  64. package/build/utils/element-rect.js.map +1 -1
  65. package/build-module/box-control/all-input-control.js +2 -2
  66. package/build-module/box-control/all-input-control.js.map +1 -1
  67. package/build-module/box-control/utils.js +1 -1
  68. package/build-module/box-control/utils.js.map +1 -1
  69. package/build-module/card/card/component.js +2 -2
  70. package/build-module/card/card/component.js.map +1 -1
  71. package/build-module/card/styles.js +18 -18
  72. package/build-module/card/styles.js.map +1 -1
  73. package/build-module/combobox-control/index.js +3 -1
  74. package/build-module/combobox-control/index.js.map +1 -1
  75. package/build-module/combobox-control/types.js.map +1 -1
  76. package/build-module/composite/context.js +1 -1
  77. package/build-module/composite/context.js.map +1 -1
  78. package/build-module/composite/group-label.js +1 -1
  79. package/build-module/composite/group-label.js.map +1 -1
  80. package/build-module/composite/group.js +1 -1
  81. package/build-module/composite/group.js.map +1 -1
  82. package/build-module/composite/hover.js +1 -1
  83. package/build-module/composite/hover.js.map +1 -1
  84. package/build-module/composite/index.js +17 -26
  85. package/build-module/composite/index.js.map +1 -1
  86. package/build-module/composite/item.js +1 -1
  87. package/build-module/composite/item.js.map +1 -1
  88. package/build-module/composite/legacy/index.js +56 -8
  89. package/build-module/composite/legacy/index.js.map +1 -1
  90. package/build-module/composite/row.js +1 -1
  91. package/build-module/composite/row.js.map +1 -1
  92. package/build-module/composite/typeahead.js +1 -1
  93. package/build-module/composite/typeahead.js.map +1 -1
  94. package/build-module/composite/types.js.map +1 -1
  95. package/build-module/custom-select-control-v2/styles.js +9 -9
  96. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  97. package/build-module/date-time/date/index.js +1 -2
  98. package/build-module/date-time/date/index.js.map +1 -1
  99. package/build-module/date-time/date/styles.js +31 -24
  100. package/build-module/date-time/date/styles.js.map +1 -1
  101. package/build-module/date-time/date/use-lilius/index.js +158 -0
  102. package/build-module/date-time/date/use-lilius/index.js.map +1 -0
  103. package/build-module/dropdown-menu-v2/styles.js +17 -17
  104. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  105. package/build-module/index.js +1 -0
  106. package/build-module/index.js.map +1 -1
  107. package/build-module/modal/index.js +29 -12
  108. package/build-module/modal/index.js.map +1 -1
  109. package/build-module/modal/types.js.map +1 -1
  110. package/build-module/modal/use-modal-exit-animation.js +68 -0
  111. package/build-module/modal/use-modal-exit-animation.js.map +1 -0
  112. package/build-module/navigator/navigator-screen/component.js +4 -0
  113. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  114. package/build-module/private-apis.js +0 -9
  115. package/build-module/private-apis.js.map +1 -1
  116. package/build-module/range-control/styles/range-control-styles.js +28 -28
  117. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  118. package/build-module/slot-fill/index.js +1 -0
  119. package/build-module/slot-fill/index.js.map +1 -1
  120. package/build-module/tabs/styles.js +3 -3
  121. package/build-module/tabs/styles.js.map +1 -1
  122. package/build-module/tabs/tablist.js +5 -4
  123. package/build-module/tabs/tablist.js.map +1 -1
  124. package/build-module/utils/config-values.js +4 -5
  125. package/build-module/utils/config-values.js.map +1 -1
  126. package/build-module/utils/element-rect.js +74 -105
  127. package/build-module/utils/element-rect.js.map +1 -1
  128. package/build-style/style-rtl.css +51 -10
  129. package/build-style/style.css +51 -10
  130. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  131. package/build-types/box-control/utils.d.ts +1 -1
  132. package/build-types/box-control/utils.d.ts.map +1 -1
  133. package/build-types/button-group/stories/index.story.d.ts +2 -2
  134. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  135. package/build-types/combobox-control/index.d.ts.map +1 -1
  136. package/build-types/combobox-control/stories/index.story.d.ts +4 -0
  137. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  138. package/build-types/combobox-control/types.d.ts +4 -0
  139. package/build-types/combobox-control/types.d.ts.map +1 -1
  140. package/build-types/composite/context.d.ts.map +1 -1
  141. package/build-types/composite/index.d.ts +36 -24
  142. package/build-types/composite/index.d.ts.map +1 -1
  143. package/build-types/composite/legacy/index.d.ts +25 -2
  144. package/build-types/composite/legacy/index.d.ts.map +1 -1
  145. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  146. package/build-types/composite/stories/index.story.d.ts +9 -9
  147. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  148. package/build-types/composite/types.d.ts +11 -10
  149. package/build-types/composite/types.d.ts.map +1 -1
  150. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  151. package/build-types/date-time/date/index.d.ts +0 -3
  152. package/build-types/date-time/date/index.d.ts.map +1 -1
  153. package/build-types/date-time/date/styles.d.ts.map +1 -1
  154. package/build-types/date-time/date/test/use-lilius.d.ts +2 -0
  155. package/build-types/date-time/date/test/use-lilius.d.ts.map +1 -0
  156. package/build-types/date-time/date/use-lilius/index.d.ts +169 -0
  157. package/build-types/date-time/date/use-lilius/index.d.ts.map +1 -0
  158. package/build-types/index.d.ts +1 -0
  159. package/build-types/index.d.ts.map +1 -1
  160. package/build-types/modal/index.d.ts.map +1 -1
  161. package/build-types/modal/stories/index.story.d.ts +3 -0
  162. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  163. package/build-types/modal/types.d.ts +6 -10
  164. package/build-types/modal/types.d.ts.map +1 -1
  165. package/build-types/modal/use-modal-exit-animation.d.ts +9 -0
  166. package/build-types/modal/use-modal-exit-animation.d.ts.map +1 -0
  167. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  168. package/build-types/private-apis.d.ts.map +1 -1
  169. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  170. package/build-types/slot-fill/index.d.ts +3 -0
  171. package/build-types/slot-fill/index.d.ts.map +1 -1
  172. package/build-types/tabs/styles.d.ts.map +1 -1
  173. package/build-types/tabs/tablist.d.ts.map +1 -1
  174. package/build-types/utils/config-values.d.ts +0 -1
  175. package/build-types/utils/element-rect.d.ts +32 -74
  176. package/build-types/utils/element-rect.d.ts.map +1 -1
  177. package/package.json +19 -20
  178. package/src/box-control/README.md +7 -0
  179. package/src/box-control/all-input-control.tsx +2 -3
  180. package/src/box-control/utils.ts +1 -1
  181. package/src/button-group/stories/index.story.tsx +10 -15
  182. package/src/card/card/component.tsx +1 -1
  183. package/src/card/styles.ts +1 -1
  184. package/src/card/test/__snapshots__/index.tsx.snap +54 -54
  185. package/src/combobox-control/README.md +7 -0
  186. package/src/combobox-control/index.tsx +2 -0
  187. package/src/combobox-control/test/index.tsx +40 -0
  188. package/src/combobox-control/types.ts +4 -0
  189. package/src/composite/README.md +5 -24
  190. package/src/composite/{context.ts → context.tsx} +1 -2
  191. package/src/composite/group-label.tsx +1 -1
  192. package/src/composite/group.tsx +1 -1
  193. package/src/composite/hover.tsx +1 -1
  194. package/src/composite/index.tsx +17 -28
  195. package/src/composite/item.tsx +1 -1
  196. package/src/composite/legacy/index.tsx +72 -11
  197. package/src/composite/legacy/stories/index.story.tsx +2 -1
  198. package/src/composite/legacy/test/index.tsx +57 -1
  199. package/src/composite/row.tsx +1 -1
  200. package/src/composite/stories/index.story.tsx +185 -169
  201. package/src/composite/typeahead.tsx +1 -1
  202. package/src/composite/types.ts +13 -15
  203. package/src/custom-select-control-v2/styles.ts +1 -0
  204. package/src/date-time/date/index.tsx +1 -1
  205. package/src/date-time/date/styles.ts +31 -11
  206. package/src/date-time/date/test/use-lilius.ts +417 -0
  207. package/src/date-time/date/use-lilius/index.ts +394 -0
  208. package/src/dropdown-menu-v2/styles.ts +1 -1
  209. package/src/form-toggle/style.scss +1 -0
  210. package/src/index.ts +1 -0
  211. package/src/modal/index.tsx +42 -19
  212. package/src/modal/stories/index.story.tsx +8 -14
  213. package/src/modal/style.scss +30 -8
  214. package/src/modal/types.ts +6 -18
  215. package/src/modal/use-modal-exit-animation.ts +99 -0
  216. package/src/navigator/navigator-screen/component.tsx +7 -0
  217. package/src/navigator/test/index.tsx +8 -0
  218. package/src/popover/style.scss +3 -2
  219. package/src/private-apis.ts +0 -9
  220. package/src/range-control/styles/range-control-styles.ts +1 -0
  221. package/src/resizable-box/style.scss +1 -1
  222. package/src/select-control/README.md +2 -2
  223. package/src/slot-fill/index.tsx +1 -0
  224. package/src/snackbar/style.scss +1 -1
  225. package/src/tabs/styles.ts +40 -11
  226. package/src/tabs/tablist.tsx +5 -4
  227. package/src/tooltip/style.scss +1 -0
  228. package/src/utils/config-values.js +4 -5
  229. package/src/utils/element-rect.ts +93 -130
  230. package/tsconfig.tsbuildinfo +1 -1
  231. package/build/composite/store.js +0 -54
  232. package/build/composite/store.js.map +0 -1
  233. package/build-module/composite/store.js +0 -46
  234. package/build-module/composite/store.js.map +0 -1
  235. package/build-types/composite/store.d.ts +0 -25
  236. package/build-types/composite/store.d.ts.map +0 -1
  237. package/build-types/composite/stories/utils.d.ts +0 -29
  238. package/build-types/composite/stories/utils.d.ts.map +0 -1
  239. package/src/composite/store.ts +0 -46
  240. package/src/composite/stories/utils.tsx +0 -76
@@ -1 +1 @@
1
- {"version":3,"names":["useRef","useEffect","useState","useEvent","useTrackElementRectUpdates","targetElement","onRect","fireOnElementInit","onRectEvent","observedElementRef","resizeObserverRef","current","ResizeObserver","entries","resizeObserver","observe","unobserve","NULL_ELEMENT_OFFSET_RECT","left","top","width","height","getElementOffsetRect","element","Math","max","offsetLeft","offsetTop","parseFloat","getComputedStyle","useTrackElementOffsetRect","indicatorPosition","setIndicatorPosition"],"sources":["@wordpress/components/src/utils/element-rect.ts"],"sourcesContent":["/* eslint-disable jsdoc/require-param */\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect, useState } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { useEvent } from './hooks/use-event';\n\n/**\n * `useTrackElementRectUpdates` options.\n */\nexport type UseTrackElementRectUpdatesOptions = {\n\t/**\n\t * Whether to trigger the callback when an element's ResizeObserver is\n\t * first set up, including when the target element changes.\n\t *\n\t * @default true\n\t */\n\tfireOnElementInit?: boolean;\n};\n\n/**\n * Tracks an element's \"rect\" (size and position) and fires `onRect` for all\n * of its discrete values. The element can be changed dynamically and **it\n * must not be stored in a ref**. Instead, it should be stored in a React\n * state or equivalent.\n *\n * By default, `onRect` is called initially for the target element (including\n * when the target element changes), not only on size or position updates.\n * This allows consumers of the hook to always be in sync with all rect values\n * of the target element throughout its lifetime. This behavior can be\n * disabled by setting the `fireOnElementInit` option to `false`.\n *\n * Under the hood, it sets up a `ResizeObserver` that tracks the element. The\n * target element can be changed dynamically, and the observer will be\n * updated accordingly.\n *\n * @example\n *\n * ```tsx\n * const [ targetElement, setTargetElement ] = useState< HTMLElement | null >();\n *\n * useTrackElementRectUpdates( targetElement, ( element ) => {\n * console.log( 'Element resized:', element );\n * } );\n *\n * <div ref={ setTargetElement } />;\n * ```\n */\nexport function useTrackElementRectUpdates(\n\t/**\n\t * The target element to observe. It can be changed dynamically.\n\t */\n\ttargetElement: HTMLElement | undefined | null,\n\t/**\n\t * Callback to fire when the element is resized. It will also be\n\t * called when the observer is set up, unless `fireOnElementInit` is\n\t * set to `false`.\n\t */\n\tonRect: (\n\t\t/**\n\t\t * The element being tracked at the time of this update.\n\t\t */\n\t\telement: HTMLElement,\n\t\t/**\n\t\t * The list of\n\t\t * [`ResizeObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)\n\t\t * objects passed to the `ResizeObserver.observe` callback. This list\n\t\t * won't be available when the observer is set up, and only on updates.\n\t\t */\n\t\tresizeObserverEntries?: ResizeObserverEntry[]\n\t) => void,\n\t{ fireOnElementInit = true }: UseTrackElementRectUpdatesOptions = {}\n) {\n\tconst onRectEvent = useEvent( onRect );\n\n\tconst observedElementRef = useRef< HTMLElement | null >();\n\tconst resizeObserverRef = useRef< ResizeObserver >();\n\n\t// TODO: could this be a layout effect?\n\tuseEffect( () => {\n\t\tif ( targetElement === observedElementRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tobservedElementRef.current = targetElement;\n\n\t\t// Set up a ResizeObserver.\n\t\tif ( ! resizeObserverRef.current ) {\n\t\t\tresizeObserverRef.current = new ResizeObserver( ( entries ) => {\n\t\t\t\tif ( observedElementRef.current ) {\n\t\t\t\t\tonRectEvent( observedElementRef.current, entries );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\tconst { current: resizeObserver } = resizeObserverRef;\n\n\t\t// Observe new element.\n\t\tif ( targetElement ) {\n\t\t\tif ( fireOnElementInit ) {\n\t\t\t\t// TODO: investigate if this can be removed,\n\t\t\t\t// see: https://stackoverflow.com/a/60026394\n\t\t\t\tonRectEvent( targetElement );\n\t\t\t}\n\t\t\tresizeObserver.observe( targetElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\t// Unobserve previous element.\n\t\t\tif ( observedElementRef.current ) {\n\t\t\t\tresizeObserver.unobserve( observedElementRef.current );\n\t\t\t}\n\t\t};\n\t}, [ fireOnElementInit, onRectEvent, targetElement ] );\n}\n\n/**\n * The position and dimensions of an element, relative to its offset parent.\n */\nexport type ElementOffsetRect = {\n\t/**\n\t * The distance from the left edge of the offset parent to the left edge of\n\t * the element.\n\t */\n\tleft: number;\n\t/**\n\t * The distance from the top edge of the offset parent to the top edge of\n\t * the element.\n\t */\n\ttop: number;\n\t/**\n\t * The width of the element.\n\t */\n\twidth: number;\n\t/**\n\t * The height of the element.\n\t */\n\theight: number;\n};\n\n/**\n * An `ElementOffsetRect` object with all values set to zero.\n */\nexport const NULL_ELEMENT_OFFSET_RECT = {\n\tleft: 0,\n\ttop: 0,\n\twidth: 0,\n\theight: 0,\n} satisfies ElementOffsetRect;\n\n/**\n * Returns the position and dimensions of an element, relative to its offset\n * parent. This is useful in contexts where `getBoundingClientRect` is not\n * suitable, such as when the element is transformed.\n *\n * **Note:** the `left` and `right` values are adjusted due to a limitation\n * in the way the browser calculates the offset position of the element,\n * which can cause unwanted scrollbars to appear. This adjustment makes the\n * values potentially inaccurate within a range of 1 pixel.\n */\nexport function getElementOffsetRect(\n\telement: HTMLElement\n): ElementOffsetRect {\n\treturn {\n\t\t// The adjustments mentioned in the documentation above are necessary\n\t\t// because `offsetLeft` and `offsetTop` are rounded to the nearest pixel,\n\t\t// which can result in a position mismatch that causes unwanted overflow.\n\t\t// For context, see: https://github.com/WordPress/gutenberg/pull/61979\n\t\tleft: Math.max( element.offsetLeft - 1, 0 ),\n\t\ttop: Math.max( element.offsetTop - 1, 0 ),\n\t\t// This is a workaround to obtain these values with a sub-pixel precision,\n\t\t// since `offsetWidth` and `offsetHeight` are rounded to the nearest pixel.\n\t\twidth: parseFloat( getComputedStyle( element ).width ),\n\t\theight: parseFloat( getComputedStyle( element ).height ),\n\t};\n}\n\n/**\n * Tracks the position and dimensions of an element, relative to its offset\n * parent. The element can be changed dynamically.\n */\nexport function useTrackElementOffsetRect(\n\ttargetElement: HTMLElement | undefined | null\n) {\n\tconst [ indicatorPosition, setIndicatorPosition ] =\n\t\tuseState< ElementOffsetRect >( NULL_ELEMENT_OFFSET_RECT );\n\n\tuseTrackElementRectUpdates( targetElement, ( element ) =>\n\t\tsetIndicatorPosition( getElementOffsetRect( element ) )\n\t);\n\n\treturn indicatorPosition;\n}\n\n/* eslint-enable jsdoc/require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MACZ;MACA,IAAKI,kBAAkB,CAACE,OAAO,EAAG;QACjCG,cAAc,CAACE,SAAS,CAAEP,kBAAkB,CAACE,OAAQ,CAAC;MACvD;IACD,CAAC;EACF,CAAC,EAAE,CAAEJ,iBAAiB,EAAEC,WAAW,EAAEH,aAAa,CAAG,CAAC;AACvD;;AAEA;AACA;AACA;;AAsBA;AACA;AACA;AACA,OAAO,MAAMY,wBAAwB,GAAG;EACvCC,IAAI,EAAE,CAAC;EACPC,GAAG,EAAE,CAAC;EACNC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE;AACT,CAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CACnCC,OAAoB,EACA;EACpB,OAAO;IACN;IACA;IACA;IACA;IACAL,IAAI,EAAEM,IAAI,CAACC,GAAG,CAAEF,OAAO,CAACG,UAAU,GAAG,CAAC,EAAE,CAAE,CAAC;IAC3CP,GAAG,EAAEK,IAAI,CAACC,GAAG,CAAEF,OAAO,CAACI,SAAS,GAAG,CAAC,EAAE,CAAE,CAAC;IACzC;IACA;IACAP,KAAK,EAAEQ,UAAU,CAAEC,gBAAgB,CAAEN,OAAQ,CAAC,CAACH,KAAM,CAAC;IACtDC,MAAM,EAAEO,UAAU,CAAEC,gBAAgB,CAAEN,OAAQ,CAAC,CAACF,MAAO;EACxD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASS,yBAAyBA,CACxCzB,aAA6C,EAC5C;EACD,MAAM,CAAE0B,iBAAiB,EAAEC,oBAAoB,CAAE,GAChD9B,QAAQ,CAAuBe,wBAAyB,CAAC;EAE1Db,0BAA0B,CAAEC,aAAa,EAAIkB,OAAO,IACnDS,oBAAoB,CAAEV,oBAAoB,CAAEC,OAAQ,CAAE,CACvD,CAAC;EAED,OAAOQ,iBAAiB;AACzB;;AAEA","ignoreList":[]}
1
+ {"version":3,"names":["useLayoutEffect","useRef","useState","useResizeObserver","useEvent","NULL_ELEMENT_OFFSET_RECT","top","right","bottom","left","width","height","getElementOffsetRect","element","_element$offsetParent","rect","getBoundingClientRect","offsetParentRect","offsetParent","computedWidth","parseFloat","getComputedStyle","computedHeight","scaleX","scaleY","POLL_RATE","useTrackElementOffsetRect","targetElement","indicatorPosition","setIndicatorPosition","intervalRef","measure","elementOffsetRect","clearInterval","current","setElement","requestAnimationFrame","setInterval"],"sources":["@wordpress/components/src/utils/element-rect.ts"],"sourcesContent":["/* eslint-disable jsdoc/require-param */\n/**\n * WordPress dependencies\n */\nimport { useLayoutEffect, useRef, useState } from '@wordpress/element';\nimport { useResizeObserver } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport { useEvent } from './hooks/use-event';\n\n/**\n * The position and dimensions of an element, relative to its offset parent.\n */\nexport type ElementOffsetRect = {\n\t/**\n\t * The distance from the top edge of the offset parent to the top edge of\n\t * the element.\n\t */\n\ttop: number;\n\t/**\n\t * The distance from the right edge of the offset parent to the right edge\n\t * of the element.\n\t */\n\tright: number;\n\t/**\n\t * The distance from the bottom edge of the offset parent to the bottom edge\n\t * of the element.\n\t */\n\tbottom: number;\n\t/**\n\t * The distance from the left edge of the offset parent to the left edge of\n\t * the element.\n\t */\n\tleft: number;\n\t/**\n\t * The width of the element.\n\t */\n\twidth: number;\n\t/**\n\t * The height of the element.\n\t */\n\theight: number;\n};\n\n/**\n * An `ElementOffsetRect` object with all values set to zero.\n */\nexport const NULL_ELEMENT_OFFSET_RECT = {\n\ttop: 0,\n\tright: 0,\n\tbottom: 0,\n\tleft: 0,\n\twidth: 0,\n\theight: 0,\n} satisfies ElementOffsetRect;\n\n/**\n * Returns the position and dimensions of an element, relative to its offset\n * parent, with subpixel precision. Values reflect the real measures before any\n * potential scaling distortions along the X and Y axes.\n *\n * Useful in contexts where plain `getBoundingClientRect` calls or `ResizeObserver`\n * entries are not suitable, such as when the element is transformed, and when\n * `element.offset<Top|Left|Width|Height>` methods are not precise enough.\n *\n * **Note:** in some contexts, like when the scale is 0, this method will fail\n * because it's impossible to calculate a scaling ratio. When that happens, it\n * will return `undefined`.\n */\nexport function getElementOffsetRect(\n\telement: HTMLElement\n): ElementOffsetRect | undefined {\n\t// Position and dimension values computed with `getBoundingClientRect` have\n\t// subpixel precision, but are affected by distortions since they represent\n\t// the \"real\" measures, or in other words, the actual final values as rendered\n\t// by the browser.\n\tconst rect = element.getBoundingClientRect();\n\tif ( rect.width === 0 || rect.height === 0 ) {\n\t\treturn;\n\t}\n\tconst offsetParentRect =\n\t\telement.offsetParent?.getBoundingClientRect() ??\n\t\tNULL_ELEMENT_OFFSET_RECT;\n\n\t// Computed widths and heights have subpixel precision, and are not affected\n\t// by distortions.\n\tconst computedWidth = parseFloat( getComputedStyle( element ).width );\n\tconst computedHeight = parseFloat( getComputedStyle( element ).height );\n\n\t// We can obtain the current scale factor for the element by comparing \"computed\"\n\t// dimensions with the \"real\" ones.\n\tconst scaleX = computedWidth / rect.width;\n\tconst scaleY = computedHeight / rect.height;\n\n\treturn {\n\t\t// To obtain the adjusted values for the position:\n\t\t// 1. Compute the element's position relative to the offset parent.\n\t\t// 2. Correct for the scale factor.\n\t\ttop: ( rect.top - offsetParentRect?.top ) * scaleY,\n\t\tright: ( offsetParentRect?.right - rect.right ) * scaleX,\n\t\tbottom: ( offsetParentRect?.bottom - rect.bottom ) * scaleY,\n\t\tleft: ( rect.left - offsetParentRect?.left ) * scaleX,\n\t\t// Computed dimensions don't need any adjustments.\n\t\twidth: computedWidth,\n\t\theight: computedHeight,\n\t};\n}\n\nconst POLL_RATE = 100;\n\n/**\n * Tracks the position and dimensions of an element, relative to its offset\n * parent. The element can be changed dynamically.\n *\n * **Note:** sometimes, the measurement will fail (see `getElementOffsetRect`'s\n * documentation for more details). When that happens, this hook will attempt\n * to measure again after a frame, and if that fails, it will poll every 100\n * milliseconds until it succeeds.\n */\nexport function useTrackElementOffsetRect(\n\ttargetElement: HTMLElement | undefined | null\n) {\n\tconst [ indicatorPosition, setIndicatorPosition ] =\n\t\tuseState< ElementOffsetRect >( NULL_ELEMENT_OFFSET_RECT );\n\tconst intervalRef = useRef< ReturnType< typeof setInterval > >();\n\n\tconst measure = useEvent( () => {\n\t\tif ( targetElement ) {\n\t\t\tconst elementOffsetRect = getElementOffsetRect( targetElement );\n\t\t\tif ( elementOffsetRect ) {\n\t\t\t\tsetIndicatorPosition( elementOffsetRect );\n\t\t\t\tclearInterval( intervalRef.current );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\tclearInterval( intervalRef.current );\n\t\t}\n\t\treturn false;\n\t} );\n\n\tconst setElement = useResizeObserver( () => {\n\t\tif ( ! measure() ) {\n\t\t\trequestAnimationFrame( () => {\n\t\t\t\tif ( ! measure() ) {\n\t\t\t\t\tintervalRef.current = setInterval( measure, POLL_RATE );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n\tuseLayoutEffect(\n\t\t() => setElement( targetElement ),\n\t\t[ setElement, targetElement ]\n\t);\n\n\treturn indicatorPosition;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,oBAAoB;AACtE,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD;AACA;AACA;AACA,SAASC,QAAQ,QAAQ,mBAAmB;;AAE5C;AACA;AACA;;AAgCA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAG;EACvCC,GAAG,EAAE,CAAC;EACNC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,IAAI,EAAE,CAAC;EACPC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE;AACT,CAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CACnCC,OAAoB,EACY;EAAA,IAAAC,qBAAA;EAChC;EACA;EACA;EACA;EACA,MAAMC,IAAI,GA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B,CAAC;EAC1D,MAAMyB,WAAW,GAAG7B,MAAM,CAAqC,CAAC;EAEhE,MAAM8B,OAAO,GAAG3B,QAAQ,CAAE,MAAM;IAC/B,IAAKuB,aAAa,EAAG;MACpB,MAAMK,iBAAiB,GAAGpB,oBAAoB,CAAEe,aAAc,CAAC;MAC/D,IAAKK,iBAAiB,EAAG;QACxBH,oBAAoB,CAAEG,iBAAkB,CAAC;QACzCC,aAAa,CAAEH,WAAW,CAACI,OAAQ,CAAC;QACpC,OAAO,IAAI;MACZ;IACD,CAAC,MAAM;MACND,aAAa,CAAEH,WAAW,CAACI,OAAQ,CAAC;IACrC;IACA,OAAO,KAAK;EACb,CAAE,CAAC;EAEH,MAAMC,UAAU,GAAGhC,iBAAiB,CAAE,MAAM;IAC3C,IAAK,CAAE4B,OAAO,CAAC,CAAC,EAAG;MAClBK,qBAAqB,CAAE,MAAM;QAC5B,IAAK,CAAEL,OAAO,CAAC,CAAC,EAAG;UAClBD,WAAW,CAACI,OAAO,GAAGG,WAAW,CAAEN,OAAO,EAAEN,SAAU,CAAC;QACxD;MACD,CAAE,CAAC;IACJ;EACD,CAAE,CAAC;EAEHzB,eAAe,CACd,MAAMmC,UAAU,CAAER,aAAc,CAAC,EACjC,CAAEQ,UAAU,EAAER,aAAa,CAC5B,CAAC;EAED,OAAOC,iBAAiB;AACzB;;AAEA","ignoreList":[]}
@@ -1356,6 +1356,7 @@ body.is-dragging-components-draggable {
1356
1356
  border-radius: 50%;
1357
1357
  transition: 0.2s transform ease, 0.2s background-color ease-out;
1358
1358
  background-color: #1e1e1e;
1359
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01);
1359
1360
  border: 6px solid transparent;
1360
1361
  }
1361
1362
  @media (prefers-reduced-motion: reduce) {
@@ -1872,27 +1873,55 @@ body.is-dragging-components-draggable {
1872
1873
  background-color: rgba(0, 0, 0, 0.35);
1873
1874
  z-index: 100000;
1874
1875
  display: flex;
1875
- animation: edit-post__fade-in-animation 0.08s linear 0s;
1876
+ animation: __wp-base-styles-fade-in 0.08s linear 0s;
1876
1877
  animation-fill-mode: forwards;
1877
1878
  }
1879
+ @keyframes __wp-base-styles-fade-in {
1880
+ from {
1881
+ opacity: 0;
1882
+ }
1883
+ to {
1884
+ opacity: 1;
1885
+ }
1886
+ }
1878
1887
  @media (prefers-reduced-motion: reduce) {
1879
1888
  .components-modal__screen-overlay {
1880
1889
  animation-duration: 1ms;
1881
1890
  animation-delay: 0s;
1882
1891
  }
1883
1892
  }
1893
+ .components-modal__screen-overlay.is-animating-out {
1894
+ animation: __wp-base-styles-fade-out 0.08s linear 80ms;
1895
+ animation-fill-mode: forwards;
1896
+ }
1897
+ @keyframes __wp-base-styles-fade-out {
1898
+ from {
1899
+ opacity: 1;
1900
+ }
1901
+ to {
1902
+ opacity: 0;
1903
+ }
1904
+ }
1905
+ @media (prefers-reduced-motion: reduce) {
1906
+ .components-modal__screen-overlay.is-animating-out {
1907
+ animation-duration: 1ms;
1908
+ animation-delay: 0s;
1909
+ }
1910
+ }
1884
1911
 
1885
1912
  .components-modal__frame {
1886
1913
  box-sizing: border-box;
1887
1914
  margin: 40px 0 0 0;
1888
1915
  width: 100%;
1889
1916
  background: #fff;
1890
- box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.15), 0 2.7px 3.8px -0.2px rgba(0, 0, 0, 0.15), 0 5.5px 7.8px -0.3px rgba(0, 0, 0, 0.15), -0.1px 11.5px 16.4px -0.5px rgba(0, 0, 0, 0.15);
1917
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02);
1891
1918
  border-radius: 8px 8px 0 0;
1892
1919
  overflow: hidden;
1893
1920
  display: flex;
1894
- animation: components-modal__appear-animation 0.26s cubic-bezier(0.29, 0, 0, 1);
1921
+ animation-name: components-modal__appear-animation;
1922
+ animation-duration: var(--modal-frame-animation-duration);
1895
1923
  animation-fill-mode: forwards;
1924
+ animation-timing-function: cubic-bezier(0.29, 0, 0, 1);
1896
1925
  }
1897
1926
  .components-modal__frame *,
1898
1927
  .components-modal__frame *::before,
@@ -1905,6 +1934,10 @@ body.is-dragging-components-draggable {
1905
1934
  animation-delay: 0s;
1906
1935
  }
1907
1936
  }
1937
+ .components-modal__screen-overlay.is-animating-out .components-modal__frame {
1938
+ animation-name: components-modal__disappear-animation;
1939
+ animation-timing-function: cubic-bezier(1, 0, 0.2, 1);
1940
+ }
1908
1941
  @media (min-width: 600px) {
1909
1942
  .components-modal__frame {
1910
1943
  border-radius: 8px;
@@ -1965,6 +1998,16 @@ body.is-dragging-components-draggable {
1965
1998
  transform: scale(1);
1966
1999
  }
1967
2000
  }
2001
+ @keyframes components-modal__disappear-animation {
2002
+ from {
2003
+ opacity: 1;
2004
+ transform: scale(1);
2005
+ }
2006
+ to {
2007
+ opacity: 0;
2008
+ transform: scale(0.9);
2009
+ }
2010
+ }
1968
2011
  .components-modal__header {
1969
2012
  box-sizing: border-box;
1970
2013
  border-bottom: 1px solid transparent;
@@ -1988,10 +2031,6 @@ body.is-dragging-components-draggable {
1988
2031
  line-height: 1;
1989
2032
  margin: 0;
1990
2033
  }
1991
- .components-modal__header .components-button {
1992
- position: relative;
1993
- right: 8px;
1994
- }
1995
2034
  .components-modal__content.has-scrolled-content:not(.hide-header) .components-modal__header {
1996
2035
  border-bottom-color: #ddd;
1997
2036
  }
@@ -2506,13 +2545,14 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2506
2545
 
2507
2546
  .components-popover__content {
2508
2547
  background: #fff;
2509
- box-shadow: 0 0 0 1px #ccc, 0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1);
2548
+ box-shadow: 0 0 0 1px #ccc, 0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02);
2510
2549
  border-radius: 4px;
2511
2550
  box-sizing: border-box;
2512
2551
  width: min-content;
2513
2552
  }
2514
2553
  .is-alternate .components-popover__content {
2515
2554
  box-shadow: 0 0 0 1px #1e1e1e;
2555
+ border-radius: 2px;
2516
2556
  }
2517
2557
  .is-unstyled .components-popover__content {
2518
2558
  background: none;
@@ -2772,7 +2812,7 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2772
2812
  position: absolute;
2773
2813
  top: calc(50% - 8px);
2774
2814
  left: calc(50% - 8px);
2775
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
2815
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)), 0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01);
2776
2816
  outline: 2px solid transparent;
2777
2817
  }
2778
2818
 
@@ -2958,7 +2998,7 @@ body.lockscroll {
2958
2998
  -webkit-backdrop-filter: blur(16px) saturate(180%);
2959
2999
  backdrop-filter: blur(16px) saturate(180%);
2960
3000
  border-radius: 4px;
2961
- box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1);
3001
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02);
2962
3002
  color: #fff;
2963
3003
  padding: 12px 20px;
2964
3004
  width: 100%;
@@ -3486,6 +3526,7 @@ div.components-toolbar > div + div.has-left-divider::before {
3486
3526
  font-size: 12px;
3487
3527
  padding: 4px 8px;
3488
3528
  z-index: 1000002;
3529
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02);
3489
3530
  }
3490
3531
 
3491
3532
  .components-tooltip__shortcut {
@@ -1361,6 +1361,7 @@ body.is-dragging-components-draggable {
1361
1361
  border-radius: 50%;
1362
1362
  transition: 0.2s transform ease, 0.2s background-color ease-out;
1363
1363
  background-color: #1e1e1e;
1364
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01);
1364
1365
  border: 6px solid transparent;
1365
1366
  }
1366
1367
  @media (prefers-reduced-motion: reduce) {
@@ -1877,27 +1878,55 @@ body.is-dragging-components-draggable {
1877
1878
  background-color: rgba(0, 0, 0, 0.35);
1878
1879
  z-index: 100000;
1879
1880
  display: flex;
1880
- animation: edit-post__fade-in-animation 0.08s linear 0s;
1881
+ animation: __wp-base-styles-fade-in 0.08s linear 0s;
1881
1882
  animation-fill-mode: forwards;
1882
1883
  }
1884
+ @keyframes __wp-base-styles-fade-in {
1885
+ from {
1886
+ opacity: 0;
1887
+ }
1888
+ to {
1889
+ opacity: 1;
1890
+ }
1891
+ }
1883
1892
  @media (prefers-reduced-motion: reduce) {
1884
1893
  .components-modal__screen-overlay {
1885
1894
  animation-duration: 1ms;
1886
1895
  animation-delay: 0s;
1887
1896
  }
1888
1897
  }
1898
+ .components-modal__screen-overlay.is-animating-out {
1899
+ animation: __wp-base-styles-fade-out 0.08s linear 80ms;
1900
+ animation-fill-mode: forwards;
1901
+ }
1902
+ @keyframes __wp-base-styles-fade-out {
1903
+ from {
1904
+ opacity: 1;
1905
+ }
1906
+ to {
1907
+ opacity: 0;
1908
+ }
1909
+ }
1910
+ @media (prefers-reduced-motion: reduce) {
1911
+ .components-modal__screen-overlay.is-animating-out {
1912
+ animation-duration: 1ms;
1913
+ animation-delay: 0s;
1914
+ }
1915
+ }
1889
1916
 
1890
1917
  .components-modal__frame {
1891
1918
  box-sizing: border-box;
1892
1919
  margin: 40px 0 0 0;
1893
1920
  width: 100%;
1894
1921
  background: #fff;
1895
- box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.15), 0 2.7px 3.8px -0.2px rgba(0, 0, 0, 0.15), 0 5.5px 7.8px -0.3px rgba(0, 0, 0, 0.15), 0.1px 11.5px 16.4px -0.5px rgba(0, 0, 0, 0.15);
1922
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08), 0 15px 27px rgba(0, 0, 0, 0.07), 0 30px 36px rgba(0, 0, 0, 0.04), 0 50px 43px rgba(0, 0, 0, 0.02);
1896
1923
  border-radius: 8px 8px 0 0;
1897
1924
  overflow: hidden;
1898
1925
  display: flex;
1899
- animation: components-modal__appear-animation 0.26s cubic-bezier(0.29, 0, 0, 1);
1926
+ animation-name: components-modal__appear-animation;
1927
+ animation-duration: var(--modal-frame-animation-duration);
1900
1928
  animation-fill-mode: forwards;
1929
+ animation-timing-function: cubic-bezier(0.29, 0, 0, 1);
1901
1930
  }
1902
1931
  .components-modal__frame *,
1903
1932
  .components-modal__frame *::before,
@@ -1910,6 +1939,10 @@ body.is-dragging-components-draggable {
1910
1939
  animation-delay: 0s;
1911
1940
  }
1912
1941
  }
1942
+ .components-modal__screen-overlay.is-animating-out .components-modal__frame {
1943
+ animation-name: components-modal__disappear-animation;
1944
+ animation-timing-function: cubic-bezier(1, 0, 0.2, 1);
1945
+ }
1913
1946
  @media (min-width: 600px) {
1914
1947
  .components-modal__frame {
1915
1948
  border-radius: 8px;
@@ -1970,6 +2003,16 @@ body.is-dragging-components-draggable {
1970
2003
  transform: scale(1);
1971
2004
  }
1972
2005
  }
2006
+ @keyframes components-modal__disappear-animation {
2007
+ from {
2008
+ opacity: 1;
2009
+ transform: scale(1);
2010
+ }
2011
+ to {
2012
+ opacity: 0;
2013
+ transform: scale(0.9);
2014
+ }
2015
+ }
1973
2016
  .components-modal__header {
1974
2017
  box-sizing: border-box;
1975
2018
  border-bottom: 1px solid transparent;
@@ -1993,10 +2036,6 @@ body.is-dragging-components-draggable {
1993
2036
  line-height: 1;
1994
2037
  margin: 0;
1995
2038
  }
1996
- .components-modal__header .components-button {
1997
- position: relative;
1998
- left: 8px;
1999
- }
2000
2039
  .components-modal__content.has-scrolled-content:not(.hide-header) .components-modal__header {
2001
2040
  border-bottom-color: #ddd;
2002
2041
  }
@@ -2513,13 +2552,14 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2513
2552
 
2514
2553
  .components-popover__content {
2515
2554
  background: #fff;
2516
- box-shadow: 0 0 0 1px #ccc, 0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1);
2555
+ box-shadow: 0 0 0 1px #ccc, 0 2px 3px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 0.04), 0 12px 12px rgba(0, 0, 0, 0.03), 0 16px 16px rgba(0, 0, 0, 0.02);
2517
2556
  border-radius: 4px;
2518
2557
  box-sizing: border-box;
2519
2558
  width: min-content;
2520
2559
  }
2521
2560
  .is-alternate .components-popover__content {
2522
2561
  box-shadow: 0 0 0 1px #1e1e1e;
2562
+ border-radius: 2px;
2523
2563
  }
2524
2564
  .is-unstyled .components-popover__content {
2525
2565
  background: none;
@@ -2781,7 +2821,7 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2781
2821
  position: absolute;
2782
2822
  top: calc(50% - 8px);
2783
2823
  right: calc(50% - 8px);
2784
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
2824
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)), 0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01);
2785
2825
  outline: 2px solid transparent;
2786
2826
  }
2787
2827
 
@@ -2970,7 +3010,7 @@ body.lockscroll {
2970
3010
  -webkit-backdrop-filter: blur(16px) saturate(180%);
2971
3011
  backdrop-filter: blur(16px) saturate(180%);
2972
3012
  border-radius: 4px;
2973
- box-shadow: 0 0.7px 1px rgba(0, 0, 0, 0.1), 0 1.2px 1.7px -0.2px rgba(0, 0, 0, 0.1), 0 2.3px 3.3px -0.5px rgba(0, 0, 0, 0.1);
3013
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02);
2974
3014
  color: #fff;
2975
3015
  padding: 12px 20px;
2976
3016
  width: 100%;
@@ -3498,6 +3538,7 @@ div.components-toolbar > div + div.has-left-divider::before {
3498
3538
  font-size: 12px;
3499
3539
  padding: 4px 8px;
3500
3540
  z-index: 1000002;
3541
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 3px rgba(0, 0, 0, 0.04), 0 6px 6px rgba(0, 0, 0, 0.03), 0 8px 8px rgba(0, 0, 0, 0.02);
3501
3542
  }
3502
3543
 
3503
3544
  .components-tooltip__shortcut {
@@ -1 +1 @@
1
- {"version":3,"file":"all-input-control.d.ts","sourceRoot":"","sources":["../../src/box-control/all-input-control.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAa3D,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACxC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,KAAK,EACL,aAAa,EACb,gBAAgB,EAChB,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAyE7B"}
1
+ {"version":3,"file":"all-input-control.d.ts","sourceRoot":"","sources":["../../src/box-control/all-input-control.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAa3D,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACxC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,KAAK,EACL,aAAa,EACb,gBAAgB,EAChB,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAyE7B"}
@@ -51,7 +51,7 @@ export declare function isValuesMixed(values?: BoxControlValue, selectedUnits?:
51
51
  *
52
52
  * @return Whether values are mixed.
53
53
  */
54
- export declare function isValuesDefined(values?: BoxControlValue): boolean;
54
+ export declare function isValuesDefined(values?: BoxControlValue): boolean | undefined;
55
55
  /**
56
56
  * Get initial selected side, factoring in whether the sides are linked,
57
57
  * and whether the vertical / horizontal directions are grouped via splitOnAxis.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/box-control/utils.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACX,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,qBAAqB,EAAE,gBA6BnC,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;CASlB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF,eAAO,MAAM,SAAS,6CAAgD,CAAC;AAmBvE;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,MAAM,GAAE,eAAoB,EAC5B,aAAa,CAAC,EAAE,eAAe,EAC/B,cAAc,GAAE,eAAe,CAAE,OAAO,CAAc,UAuCtD;AAED;;;;;GAKG;AACH,wBAAgB,kBA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B,EAC5B,aAAa,CAAC,EAAE,eAAe,EAC/B,KAAK,GAAE,eAAe,CAAE,OAAO,CAAc,WAM7C;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAE,MAAM,CAAC,EAAE,eAAe,uBAUxD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,8BAQtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAE,KAAK,EAAE,eAAe,CAAE,OAAO,CAAE,2EAiBhE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAChC,aAAa,EAAE,eAAe,EAC9B,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,eAAe,CAAE,OAAO,CAAE,GAChC,eAAe,CAoBjB"}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { Meta, StoryFn } from '@storybook/react';
4
+ import type { Meta, StoryObj } from '@storybook/react';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
8
8
  import ButtonGroup from '..';
9
9
  declare const meta: Meta<typeof ButtonGroup>;
10
10
  export default meta;
11
- export declare const Default: StoryFn<typeof ButtonGroup>;
11
+ export declare const Default: StoryObj<typeof ButtonGroup>;
12
12
  //# sourceMappingURL=index.story.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/button-group/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,WAAW,MAAM,IAAI,CAAC;AAG7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,WAAW,CAUnC,CAAC;AACF,eAAe,IAAI,CAAC;AAgBpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,WAAW,CAAwB,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/button-group/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,WAAW,MAAM,IAAI,CAAC;AAG7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,WAAW,CAUnC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,WAAW,CASjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/combobox-control/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAyB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAgC3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,iBAAS,eAAe,CAAE,KAAK,EAAE,oBAAoB,+BA4RpD;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/combobox-control/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAyB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAgC3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,iBAAS,eAAe,CAAE,KAAK,EAAE,oBAAoB,+BA8RpD;AAED,eAAe,eAAe,CAAC"}
@@ -24,6 +24,7 @@ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import
24
24
  onFilterValueChange?: (value: string) => void;
25
25
  options: import("../types").ComboboxControlOption[];
26
26
  value?: string | null;
27
+ placeholder?: string;
27
28
  }>;
28
29
  /**
29
30
  * The rendered output of each suggestion can be customized by passing a
@@ -45,6 +46,7 @@ export declare const WithCustomRenderItem: import("@storybook/types").AnnotatedS
45
46
  onFilterValueChange?: (value: string) => void;
46
47
  options: import("../types").ComboboxControlOption[];
47
48
  value?: string | null;
49
+ placeholder?: string;
48
50
  }>;
49
51
  /**
50
52
  * You can disable options in the list
@@ -66,6 +68,7 @@ export declare const WithDisabledOptions: import("@storybook/types").AnnotatedSt
66
68
  onFilterValueChange?: (value: string) => void;
67
69
  options: import("../types").ComboboxControlOption[];
68
70
  value?: string | null;
71
+ placeholder?: string;
69
72
  }>;
70
73
  /**
71
74
  * By default, the combobox expands when focused.
@@ -87,5 +90,6 @@ export declare const NotExpandOnFocus: import("@storybook/types").AnnotatedStory
87
90
  onFilterValueChange?: (value: string) => void;
88
91
  options: import("../types").ComboboxControlOption[];
89
92
  value?: string | null;
93
+ placeholder?: string;
90
94
  }>;
91
95
  //# sourceMappingURL=index.story.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/combobox-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,eAAe,MAAM,IAAI,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAqBrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,eAAe,CAWvC,CAAC;AACF,eAAe,IAAI,CAAC;AA6BpB,eAAO,MAAM,OAAO;;;UAjDE,MAAO,SAC3B;;;;;;;;;;;;EAgDwC,CAAC;AAQ3C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;gBA9DJ,SAC3B;;;;;;;;;;;;EA6DqD,CAAC;AAqCxD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;gBAxGH,SAC3B;;;;;;;;;;;;EAuGoD,CAAC;AAWvD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;gBAxHA,SAC3B;;;;;;;;;;;;EAuHiD,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/combobox-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,eAAe,MAAM,IAAI,CAAC;AACjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAqBrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,eAAe,CAWvC,CAAC;AACF,eAAe,IAAI,CAAC;AA6BpB,eAAO,MAAM,OAAO;;;UAjDE,MAAO,SAC3B;;;;;;;;;;;;;EAgDwC,CAAC;AAQ3C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;gBA9DJ,SAC3B;;;;;;;;;;;;;EA6DqD,CAAC;AAqCxD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;gBAxGH,SAC3B;;;;;;;;;;;;;EAuGoD,CAAC;AAWvD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;gBAxHA,SAC3B;;;;;;;;;;;;;EAuHiD,CAAC"}
@@ -73,5 +73,9 @@ export type ComboboxControlProps = Pick<BaseControlProps, '__nextHasNoMarginBott
73
73
  * The current value of the control.
74
74
  */
75
75
  value?: string | null;
76
+ /**
77
+ * If passed, the combobox input will show a placeholder string if no values are present.
78
+ */
79
+ placeholder?: string;
76
80
  };
77
81
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/combobox-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM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gBAAgB,EACd,yBAAyB,GACzB,WAAW,GACX,OAAO,GACP,qBAAqB,GACrB,MAAM,CACR,GAAG;IACH;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,CAAE,IAAI,EAAE;QAClC,IAAI,EAAE,qBAAqB,CAAC;KAC5B,KAAM,KAAK,CAAC,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE;QACV;;;;WAIG;QACH,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,oBAAoB,CAAE,OAAO,CAAE,KAAM,IAAI,CAAC;IAC9D;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IAChD;;OAEG;IACH,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/composite/context.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,gBAAgB,gDACuB,CAAC;AAErD,eAAO,MAAM,mBAAmB,6BAAuC,CAAC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/composite/context.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,gBAAgB,gDAA+C,CAAC;AAE7E,eAAO,MAAM,mBAAmB,6BAAuC,CAAC"}
@@ -18,33 +18,50 @@ import * as Ariakit from '@ariakit/react';
18
18
  *
19
19
  * @example
20
20
  * ```jsx
21
- * import { Composite, useCompositeStore } from '@wordpress/components';
21
+ * import { Composite } from '@wordpress/components';
22
22
  *
23
- * const store = useCompositeStore();
24
- * <Composite store={store}>
23
+ * <Composite>
25
24
  * <Composite.Item>Item 1</Composite.Item>
26
25
  * <Composite.Item>Item 2</Composite.Item>
27
26
  * </Composite>
28
27
  * ```
29
28
  */
30
- export declare const Composite: import("react").ForwardRefExoticComponent<import("./types").CompositeStoreProps & {
31
- store?: Ariakit.CompositeStore;
29
+ export declare const Composite: import("react").ForwardRefExoticComponent<{
30
+ activeId?: Ariakit.CompositeStoreProps["activeId"];
31
+ defaultActiveId?: Ariakit.CompositeStoreProps["defaultActiveId"];
32
+ setActiveId?: Ariakit.CompositeStoreProps["setActiveId"];
33
+ focusLoop?: Ariakit.CompositeStoreProps["focusLoop"];
34
+ focusWrap?: Ariakit.CompositeStoreProps["focusWrap"];
35
+ focusShift?: Ariakit.CompositeStoreProps["focusShift"];
36
+ virtualFocus?: Ariakit.CompositeStoreProps["virtualFocus"];
37
+ orientation?: Ariakit.CompositeStoreProps["orientation"];
38
+ rtl?: Ariakit.CompositeStoreProps["rtl"];
39
+ } & {
32
40
  render?: Ariakit.CompositeProps["render"];
33
41
  focusable?: Ariakit.CompositeProps["focusable"];
34
42
  disabled?: Ariakit.CompositeProps["disabled"];
35
43
  accessibleWhenDisabled?: Ariakit.CompositeProps["accessibleWhenDisabled"];
36
44
  onFocusVisible?: Ariakit.CompositeProps["onFocusVisible"];
37
45
  children?: Ariakit.CompositeProps["children"];
38
- } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "disabled" | "focusable" | "children" | "as" | "render" | "accessibleWhenDisabled" | "onFocusVisible" | "store" | keyof import("./types").CompositeStoreProps> & import("react").RefAttributes<HTMLDivElement>> & {
46
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "disabled" | "focusable" | "children" | "as" | "render" | "accessibleWhenDisabled" | "onFocusVisible" | keyof {
47
+ activeId?: Ariakit.CompositeStoreProps["activeId"];
48
+ defaultActiveId?: Ariakit.CompositeStoreProps["defaultActiveId"];
49
+ setActiveId?: Ariakit.CompositeStoreProps["setActiveId"];
50
+ focusLoop?: Ariakit.CompositeStoreProps["focusLoop"];
51
+ focusWrap?: Ariakit.CompositeStoreProps["focusWrap"];
52
+ focusShift?: Ariakit.CompositeStoreProps["focusShift"];
53
+ virtualFocus?: Ariakit.CompositeStoreProps["virtualFocus"];
54
+ orientation?: Ariakit.CompositeStoreProps["orientation"];
55
+ rtl?: Ariakit.CompositeStoreProps["rtl"];
56
+ }> & import("react").RefAttributes<HTMLDivElement>> & {
39
57
  /**
40
58
  * Renders a group element for composite items.
41
59
  *
42
60
  * @example
43
61
  * ```jsx
44
- * import { Composite, useCompositeStore } from '@wordpress/components';
62
+ * import { Composite } from '@wordpress/components';
45
63
  *
46
- * const store = useCompositeStore();
47
- * <Composite store={store}>
64
+ * <Composite>
48
65
  * <Composite.Group>
49
66
  * <Composite.GroupLabel>Label</Composite.GroupLabel>
50
67
  * <Composite.Item>Item 1</Composite.Item>
@@ -63,10 +80,9 @@ export declare const Composite: import("react").ForwardRefExoticComponent<import
63
80
  *
64
81
  * @example
65
82
  * ```jsx
66
- * import { Composite, useCompositeStore } from '@wordpress/components';
83
+ * import { Composite } from '@wordpress/components';
67
84
  *
68
- * const store = useCompositeStore();
69
- * <Composite store={store}>
85
+ * <Composite>
70
86
  * <Composite.Group>
71
87
  * <Composite.GroupLabel>Label</Composite.GroupLabel>
72
88
  * <Composite.Item>Item 1</Composite.Item>
@@ -83,10 +99,9 @@ export declare const Composite: import("react").ForwardRefExoticComponent<import
83
99
  *
84
100
  * @example
85
101
  * ```jsx
86
- * import { Composite, useCompositeStore } from '@wordpress/components';
102
+ * import { Composite } from '@wordpress/components';
87
103
  *
88
- * const store = useCompositeStore();
89
- * <Composite store={store}>
104
+ * <Composite>
90
105
  * <Composite.Item>Item 1</Composite.Item>
91
106
  * <Composite.Item>Item 2</Composite.Item>
92
107
  * <Composite.Item>Item 3</Composite.Item>
@@ -103,10 +118,9 @@ export declare const Composite: import("react").ForwardRefExoticComponent<import
103
118
  *
104
119
  * @example
105
120
  * ```jsx
106
- * import { Composite, useCompositeStore } from '@wordpress/components';
121
+ * import { Composite } from '@wordpress/components';
107
122
  *
108
- * const store = useCompositeStore();
109
- * <Composite store={store}>
123
+ * <Composite>
110
124
  * <Composite.Row>
111
125
  * <Composite.Item>Item 1.1</Composite.Item>
112
126
  * <Composite.Item>Item 1.2</Composite.Item>
@@ -130,10 +144,9 @@ export declare const Composite: import("react").ForwardRefExoticComponent<import
130
144
  *
131
145
  * @example
132
146
  * ```jsx
133
- * import { Composite, useCompositeStore } from '@wordpress/components';
147
+ * import { Composite } from '@wordpress/components';
134
148
  *
135
- * const store = useCompositeStore();
136
- * <Composite store={store}>
149
+ * <Composite>
137
150
  * <Composite.Hover render={ <Composite.Item /> }>
138
151
  * Item 1
139
152
  * </Composite.Hover>
@@ -153,10 +166,9 @@ export declare const Composite: import("react").ForwardRefExoticComponent<import
153
166
  *
154
167
  * @example
155
168
  * ```jsx
156
- * import { Composite, useCompositeStore } from '@wordpress/components';
169
+ * import { Composite } from '@wordpress/components';
157
170
  *
158
- * const store = useCompositeStore();
159
- * <Composite store={store} render={ <CompositeTypeahead /> }>
171
+ * <Composite render={ <CompositeTypeahead /> }>
160
172
  * <Composite.Item>Item 1</Composite.Item>
161
173
  * <Composite.Item>Item 2</Composite.Item>
162
174
  * </Composite>
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composite/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAoB1C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS;;;;;;;;;IAgEpB;;;;;;;;;;;;;;;;OAgBG;;;;IAIH;;;;;;;;;;;;;;;;;;OAkBG;;;;IAIH;;;;;;;;;;;;;;OAcG;;;;IAEH;;;;;;;;;;;;;;;;;;;;;;;OAuBG;;;;IAEH;;;;;;;;;;;;;;;;;;;OAmBG;;;;IAIH;;;;;;;;;;;;;;;OAeG;;;;IAIH;;;;;;;;;;;;;OAaG;;;;CAKJ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composite/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAqB1C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2DpB;;;;;;;;;;;;;;;OAeG;;;;IAIH;;;;;;;;;;;;;;;;;OAiBG;;;;IAIH;;;;;;;;;;;;;OAaG;;;;IAEH;;;;;;;;;;;;;;;;;;;;;;OAsBG;;;;IAEH;;;;;;;;;;;;;;;;;;OAkBG;;;;IAIH;;;;;;;;;;;;;;OAcG;;;;IAIH;;;;;;;;;;;;;OAaG;;;;CAKJ,CAAC"}