@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.
- package/CHANGELOG.md +45 -0
- package/build/box-control/all-input-control.js +1 -2
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/utils.js +1 -1
- package/build/box-control/utils.js.map +1 -1
- package/build/card/card/component.js +2 -2
- package/build/card/card/component.js.map +1 -1
- package/build/card/styles.js +18 -18
- package/build/card/styles.js.map +1 -1
- package/build/combobox-control/index.js +3 -1
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/types.js.map +1 -1
- package/build/composite/context.js +1 -1
- package/build/composite/context.js.map +1 -1
- package/build/composite/group-label.js +1 -1
- package/build/composite/group-label.js.map +1 -1
- package/build/composite/group.js +1 -1
- package/build/composite/group.js.map +1 -1
- package/build/composite/hover.js +1 -1
- package/build/composite/hover.js.map +1 -1
- package/build/composite/index.js +17 -26
- package/build/composite/index.js.map +1 -1
- package/build/composite/item.js +1 -1
- package/build/composite/item.js.map +1 -1
- package/build/composite/legacy/index.js +59 -8
- package/build/composite/legacy/index.js.map +1 -1
- package/build/composite/row.js +1 -1
- package/build/composite/row.js.map +1 -1
- package/build/composite/typeahead.js +1 -1
- package/build/composite/typeahead.js.map +1 -1
- package/build/composite/types.js.map +1 -1
- package/build/custom-select-control-v2/styles.js +9 -9
- package/build/custom-select-control-v2/styles.js.map +1 -1
- package/build/date-time/date/index.js +1 -1
- package/build/date-time/date/index.js.map +1 -1
- package/build/date-time/date/styles.js +35 -24
- package/build/date-time/date/styles.js.map +1 -1
- package/build/date-time/date/use-lilius/index.js +163 -0
- package/build/date-time/date/use-lilius/index.js.map +1 -0
- package/build/dropdown-menu-v2/styles.js +17 -17
- package/build/dropdown-menu-v2/styles.js.map +1 -1
- package/build/index.js +7 -0
- package/build/index.js.map +1 -1
- package/build/modal/index.js +27 -12
- package/build/modal/index.js.map +1 -1
- package/build/modal/types.js.map +1 -1
- package/build/modal/use-modal-exit-animation.js +75 -0
- package/build/modal/use-modal-exit-animation.js.map +1 -0
- package/build/navigator/navigator-screen/component.js +5 -0
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/private-apis.js +0 -9
- package/build/private-apis.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +28 -28
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/slot-fill/index.js +1 -0
- package/build/slot-fill/index.js.map +1 -1
- package/build/tabs/styles.js +3 -3
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tablist.js +5 -4
- package/build/tabs/tablist.js.map +1 -1
- package/build/utils/config-values.js +4 -5
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/element-rect.js +73 -105
- package/build/utils/element-rect.js.map +1 -1
- package/build-module/box-control/all-input-control.js +2 -2
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/utils.js +1 -1
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/card/card/component.js +2 -2
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/styles.js +18 -18
- package/build-module/card/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +3 -1
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/types.js.map +1 -1
- package/build-module/composite/context.js +1 -1
- package/build-module/composite/context.js.map +1 -1
- package/build-module/composite/group-label.js +1 -1
- package/build-module/composite/group-label.js.map +1 -1
- package/build-module/composite/group.js +1 -1
- package/build-module/composite/group.js.map +1 -1
- package/build-module/composite/hover.js +1 -1
- package/build-module/composite/hover.js.map +1 -1
- package/build-module/composite/index.js +17 -26
- package/build-module/composite/index.js.map +1 -1
- package/build-module/composite/item.js +1 -1
- package/build-module/composite/item.js.map +1 -1
- package/build-module/composite/legacy/index.js +56 -8
- package/build-module/composite/legacy/index.js.map +1 -1
- package/build-module/composite/row.js +1 -1
- package/build-module/composite/row.js.map +1 -1
- package/build-module/composite/typeahead.js +1 -1
- package/build-module/composite/typeahead.js.map +1 -1
- package/build-module/composite/types.js.map +1 -1
- package/build-module/custom-select-control-v2/styles.js +9 -9
- package/build-module/custom-select-control-v2/styles.js.map +1 -1
- package/build-module/date-time/date/index.js +1 -2
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date/styles.js +31 -24
- package/build-module/date-time/date/styles.js.map +1 -1
- package/build-module/date-time/date/use-lilius/index.js +158 -0
- package/build-module/date-time/date/use-lilius/index.js.map +1 -0
- package/build-module/dropdown-menu-v2/styles.js +17 -17
- package/build-module/dropdown-menu-v2/styles.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/modal/index.js +29 -12
- package/build-module/modal/index.js.map +1 -1
- package/build-module/modal/types.js.map +1 -1
- package/build-module/modal/use-modal-exit-animation.js +68 -0
- package/build-module/modal/use-modal-exit-animation.js.map +1 -0
- package/build-module/navigator/navigator-screen/component.js +4 -0
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/private-apis.js +0 -9
- package/build-module/private-apis.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +28 -28
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/slot-fill/index.js +1 -0
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/tabs/styles.js +3 -3
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tablist.js +5 -4
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/utils/config-values.js +4 -5
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/element-rect.js +74 -105
- package/build-module/utils/element-rect.js.map +1 -1
- package/build-style/style-rtl.css +51 -10
- package/build-style/style.css +51 -10
- package/build-types/box-control/all-input-control.d.ts.map +1 -1
- package/build-types/box-control/utils.d.ts +1 -1
- package/build-types/box-control/utils.d.ts.map +1 -1
- package/build-types/button-group/stories/index.story.d.ts +2 -2
- package/build-types/button-group/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +4 -0
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/types.d.ts +4 -0
- package/build-types/combobox-control/types.d.ts.map +1 -1
- package/build-types/composite/context.d.ts.map +1 -1
- package/build-types/composite/index.d.ts +36 -24
- package/build-types/composite/index.d.ts.map +1 -1
- package/build-types/composite/legacy/index.d.ts +25 -2
- package/build-types/composite/legacy/index.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts +9 -9
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/types.d.ts +11 -10
- package/build-types/composite/types.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts +0 -3
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts.map +1 -1
- package/build-types/date-time/date/test/use-lilius.d.ts +2 -0
- package/build-types/date-time/date/test/use-lilius.d.ts.map +1 -0
- package/build-types/date-time/date/use-lilius/index.d.ts +169 -0
- package/build-types/date-time/date/use-lilius/index.d.ts.map +1 -0
- package/build-types/index.d.ts +1 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts +3 -0
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/types.d.ts +6 -10
- package/build-types/modal/types.d.ts.map +1 -1
- package/build-types/modal/use-modal-exit-animation.d.ts +9 -0
- package/build-types/modal/use-modal-exit-animation.d.ts.map +1 -0
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +3 -0
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/tabs/styles.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +0 -1
- package/build-types/utils/element-rect.d.ts +32 -74
- package/build-types/utils/element-rect.d.ts.map +1 -1
- package/package.json +19 -20
- package/src/box-control/README.md +7 -0
- package/src/box-control/all-input-control.tsx +2 -3
- package/src/box-control/utils.ts +1 -1
- package/src/button-group/stories/index.story.tsx +10 -15
- package/src/card/card/component.tsx +1 -1
- package/src/card/styles.ts +1 -1
- package/src/card/test/__snapshots__/index.tsx.snap +54 -54
- package/src/combobox-control/README.md +7 -0
- package/src/combobox-control/index.tsx +2 -0
- package/src/combobox-control/test/index.tsx +40 -0
- package/src/combobox-control/types.ts +4 -0
- package/src/composite/README.md +5 -24
- package/src/composite/{context.ts → context.tsx} +1 -2
- package/src/composite/group-label.tsx +1 -1
- package/src/composite/group.tsx +1 -1
- package/src/composite/hover.tsx +1 -1
- package/src/composite/index.tsx +17 -28
- package/src/composite/item.tsx +1 -1
- package/src/composite/legacy/index.tsx +72 -11
- package/src/composite/legacy/stories/index.story.tsx +2 -1
- package/src/composite/legacy/test/index.tsx +57 -1
- package/src/composite/row.tsx +1 -1
- package/src/composite/stories/index.story.tsx +185 -169
- package/src/composite/typeahead.tsx +1 -1
- package/src/composite/types.ts +13 -15
- package/src/custom-select-control-v2/styles.ts +1 -0
- package/src/date-time/date/index.tsx +1 -1
- package/src/date-time/date/styles.ts +31 -11
- package/src/date-time/date/test/use-lilius.ts +417 -0
- package/src/date-time/date/use-lilius/index.ts +394 -0
- package/src/dropdown-menu-v2/styles.ts +1 -1
- package/src/form-toggle/style.scss +1 -0
- package/src/index.ts +1 -0
- package/src/modal/index.tsx +42 -19
- package/src/modal/stories/index.story.tsx +8 -14
- package/src/modal/style.scss +30 -8
- package/src/modal/types.ts +6 -18
- package/src/modal/use-modal-exit-animation.ts +99 -0
- package/src/navigator/navigator-screen/component.tsx +7 -0
- package/src/navigator/test/index.tsx +8 -0
- package/src/popover/style.scss +3 -2
- package/src/private-apis.ts +0 -9
- package/src/range-control/styles/range-control-styles.ts +1 -0
- package/src/resizable-box/style.scss +1 -1
- package/src/select-control/README.md +2 -2
- package/src/slot-fill/index.tsx +1 -0
- package/src/snackbar/style.scss +1 -1
- package/src/tabs/styles.ts +40 -11
- package/src/tabs/tablist.tsx +5 -4
- package/src/tooltip/style.scss +1 -0
- package/src/utils/config-values.js +4 -5
- package/src/utils/element-rect.ts +93 -130
- package/tsconfig.tsbuildinfo +1 -1
- package/build/composite/store.js +0 -54
- package/build/composite/store.js.map +0 -1
- package/build-module/composite/store.js +0 -46
- package/build-module/composite/store.js.map +0 -1
- package/build-types/composite/store.d.ts +0 -25
- package/build-types/composite/store.d.ts.map +0 -1
- package/build-types/composite/stories/utils.d.ts +0 -29
- package/build-types/composite/stories/utils.d.ts.map +0 -1
- package/src/composite/store.ts +0 -46
- package/src/composite/stories/utils.tsx +0 -76
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
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,GAAGF,OAAO,CAACG,qBAAqB,CAAC,CAAC;EAC5C,IAAKD,IAAI,CAACL,KAAK,KAAK,CAAC,IAAIK,IAAI,CAACJ,MAAM,KAAK,CAAC,EAAG;IAC5C;EACD;EACA,MAAMM,gBAAgB,IAAAH,qBAAA,GACrBD,OAAO,CAACK,YAAY,EAAEF,qBAAqB,CAAC,CAAC,cAAAF,qBAAA,cAAAA,qBAAA,GAC7CT,wBAAwB;;EAEzB;EACA;EACA,MAAMc,aAAa,GAAGC,UAAU,CAAEC,gBAAgB,CAAER,OAAQ,CAAC,CAACH,KAAM,CAAC;EACrE,MAAMY,cAAc,GAAGF,UAAU,CAAEC,gBAAgB,CAAER,OAAQ,CAAC,CAACF,MAAO,CAAC;;EAEvE;EACA;EACA,MAAMY,MAAM,GAAGJ,aAAa,GAAGJ,IAAI,CAACL,KAAK;EACzC,MAAMc,MAAM,GAAGF,cAAc,GAAGP,IAAI,CAACJ,MAAM;EAE3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AG;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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 {
|
package/build-style/style.css
CHANGED
|
@@ -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:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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":"
|
|
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,EA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AAa,CAC5B,MAAM,GAAE,eAAoB,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,
|
|
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:
|
|
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,
|
|
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,+
|
|
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
|
|
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,MAAM,oBAAoB,GAAG,IAAI,CACtC,gBAAgB,EACd,yBAAyB,GACzB,WAAW,GACX,OAAO,GACP,qBAAqB,GACrB,MAAM,CACR,GAAG;IACH;;;;OAIG;IACH,w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ClC,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.
|
|
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
|
|
21
|
+
* import { Composite } from '@wordpress/components';
|
|
22
22
|
*
|
|
23
|
-
*
|
|
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<
|
|
31
|
-
|
|
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" |
|
|
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
|
|
62
|
+
* import { Composite } from '@wordpress/components';
|
|
45
63
|
*
|
|
46
|
-
*
|
|
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
|
|
83
|
+
* import { Composite } from '@wordpress/components';
|
|
67
84
|
*
|
|
68
|
-
*
|
|
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
|
|
102
|
+
* import { Composite } from '@wordpress/components';
|
|
87
103
|
*
|
|
88
|
-
*
|
|
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
|
|
121
|
+
* import { Composite } from '@wordpress/components';
|
|
107
122
|
*
|
|
108
|
-
*
|
|
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
|
|
147
|
+
* import { Composite } from '@wordpress/components';
|
|
134
148
|
*
|
|
135
|
-
*
|
|
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
|
|
169
|
+
* import { Composite } from '@wordpress/components';
|
|
157
170
|
*
|
|
158
|
-
*
|
|
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;
|
|
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"}
|