@wordpress/components 32.5.2-next.v.202604091042.0 → 33.0.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 +46 -1
- package/build/alignment-matrix-control/cell.cjs +3 -3
- package/build/alignment-matrix-control/cell.cjs.map +2 -2
- package/build/alignment-matrix-control/index.cjs +3 -3
- package/build/alignment-matrix-control/index.cjs.map +2 -2
- package/build/autocomplete/get-autocomplete-match.cjs +11 -2
- package/build/autocomplete/get-autocomplete-match.cjs.map +2 -2
- package/build/autocomplete/index.cjs +42 -11
- package/build/autocomplete/index.cjs.map +2 -2
- package/build/custom-gradient-picker/index.cjs.map +2 -2
- package/build/date-time/{date → date-picker}/index.cjs +6 -6
- package/build/date-time/{date → date-picker}/index.cjs.map +2 -2
- package/build/date-time/{date → date-picker}/styles.cjs +17 -17
- package/build/date-time/{date → date-picker}/styles.cjs.map +2 -2
- package/build/date-time/{date → date-picker}/use-lilius/index.cjs +1 -1
- package/build/date-time/{date → date-picker}/use-lilius/index.cjs.map +1 -1
- package/build/date-time/date-time/index.cjs +6 -6
- package/build/date-time/date-time/index.cjs.map +2 -2
- package/build/date-time/index.cjs +4 -4
- package/build/date-time/index.cjs.map +2 -2
- package/build/date-time/{time → time-picker}/index.cjs +6 -6
- package/build/date-time/time-picker/index.cjs.map +7 -0
- package/build/date-time/{time → time-picker}/styles.cjs +21 -21
- package/build/date-time/{time → time-picker}/styles.cjs.map +2 -2
- package/build/date-time/{time → time-picker}/time-input/index.cjs +1 -1
- package/build/date-time/{time → time-picker}/time-input/index.cjs.map +1 -1
- package/build/date-time/{time → time-picker}/timezone.cjs +1 -1
- package/build/date-time/{time → time-picker}/timezone.cjs.map +1 -1
- package/build/external-link/index.cjs +1 -1
- package/build/external-link/index.cjs.map +2 -2
- package/build/form-token-field/index.cjs +22 -6
- package/build/form-token-field/index.cjs.map +3 -3
- package/build/form-token-field/token-input.cjs +1 -1
- package/build/form-token-field/token-input.cjs.map +2 -2
- package/build/menu/popover.cjs +7 -3
- package/build/menu/popover.cjs.map +2 -2
- package/build/menu/styles.cjs +39 -16
- package/build/menu/styles.cjs.map +2 -2
- package/build/modal/index.cjs.map +2 -2
- package/build/navigable-container/container.cjs +72 -110
- package/build/navigable-container/container.cjs.map +2 -2
- package/build/palette-edit/index.cjs.map +2 -2
- package/build/radio-control/index.cjs +2 -0
- package/build/radio-control/index.cjs.map +2 -2
- package/build/sandbox/index.cjs +125 -1
- package/build/sandbox/index.cjs.map +2 -2
- package/build/textarea-control/styles/textarea-control-styles.cjs +3 -3
- package/build/textarea-control/styles/textarea-control-styles.cjs.map +2 -2
- package/build/utils/breakpoint.cjs.map +1 -1
- package/build/utils/font.cjs.map +1 -1
- package/build/visually-hidden/component.cjs +1 -0
- package/build/visually-hidden/component.cjs.map +2 -2
- package/build-module/alignment-matrix-control/cell.mjs +3 -3
- package/build-module/alignment-matrix-control/cell.mjs.map +2 -2
- package/build-module/alignment-matrix-control/index.mjs +3 -3
- package/build-module/alignment-matrix-control/index.mjs.map +2 -2
- package/build-module/autocomplete/get-autocomplete-match.mjs +11 -2
- package/build-module/autocomplete/get-autocomplete-match.mjs.map +2 -2
- package/build-module/autocomplete/index.mjs +42 -11
- package/build-module/autocomplete/index.mjs.map +2 -2
- package/build-module/custom-gradient-picker/index.mjs.map +2 -2
- package/build-module/date-time/{date → date-picker}/index.mjs +3 -3
- package/build-module/date-time/{date → date-picker}/index.mjs.map +2 -2
- package/build-module/date-time/{date → date-picker}/styles.mjs +17 -17
- package/build-module/date-time/{date → date-picker}/styles.mjs.map +2 -2
- package/build-module/date-time/{date → date-picker}/use-lilius/index.mjs +1 -1
- package/build-module/date-time/{date → date-picker}/use-lilius/index.mjs.map +1 -1
- package/build-module/date-time/date-time/index.mjs +2 -2
- package/build-module/date-time/date-time/index.mjs.map +1 -1
- package/build-module/date-time/index.mjs +2 -2
- package/build-module/date-time/index.mjs.map +1 -1
- package/build-module/date-time/{time → time-picker}/index.mjs +3 -3
- package/build-module/date-time/time-picker/index.mjs.map +7 -0
- package/build-module/date-time/{time → time-picker}/styles.mjs +21 -21
- package/build-module/date-time/{time → time-picker}/styles.mjs.map +2 -2
- package/build-module/date-time/{time → time-picker}/time-input/index.mjs +1 -1
- package/build-module/date-time/{time → time-picker}/time-input/index.mjs.map +1 -1
- package/build-module/date-time/{time → time-picker}/timezone.mjs +1 -1
- package/build-module/date-time/{time → time-picker}/timezone.mjs.map +1 -1
- package/build-module/external-link/index.mjs +1 -1
- package/build-module/external-link/index.mjs.map +2 -2
- package/build-module/form-token-field/index.mjs +22 -6
- package/build-module/form-token-field/index.mjs.map +2 -2
- package/build-module/form-token-field/token-input.mjs +1 -1
- package/build-module/form-token-field/token-input.mjs.map +2 -2
- package/build-module/menu/popover.mjs +7 -3
- package/build-module/menu/popover.mjs.map +2 -2
- package/build-module/menu/styles.mjs +37 -16
- package/build-module/menu/styles.mjs.map +2 -2
- package/build-module/modal/index.mjs.map +2 -2
- package/build-module/navigable-container/container.mjs +73 -111
- package/build-module/navigable-container/container.mjs.map +2 -2
- package/build-module/palette-edit/index.mjs.map +2 -2
- package/build-module/radio-control/index.mjs +2 -0
- package/build-module/radio-control/index.mjs.map +2 -2
- package/build-module/sandbox/index.mjs +126 -2
- package/build-module/sandbox/index.mjs.map +2 -2
- package/build-module/textarea-control/styles/textarea-control-styles.mjs +3 -3
- package/build-module/textarea-control/styles/textarea-control-styles.mjs.map +2 -2
- package/build-module/utils/breakpoint.mjs.map +1 -1
- package/build-module/utils/font.mjs.map +1 -1
- package/build-module/visually-hidden/component.mjs +1 -0
- package/build-module/visually-hidden/component.mjs.map +2 -2
- package/build-style/style-rtl.css +109 -25
- package/build-style/style.css +109 -25
- package/build-types/autocomplete/get-autocomplete-match.d.ts +10 -1
- package/build-types/autocomplete/get-autocomplete-match.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts +0 -6
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/types.d.ts +4 -0
- package/build-types/checkbox-control/types.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date-picker/index.d.ts.map +1 -0
- package/build-types/date-time/date-picker/styles.d.ts.map +1 -0
- package/build-types/date-time/date-picker/test/index.d.ts.map +1 -0
- package/build-types/date-time/date-picker/test/use-lilius.d.ts.map +1 -0
- package/build-types/date-time/date-picker/use-lilius/index.d.ts.map +1 -0
- package/build-types/date-time/date-time/index.d.ts +2 -2
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/index.d.ts +2 -2
- package/build-types/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts +1 -1
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts +1 -1
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/date-time/{time → time-picker}/index.d.ts +1 -1
- package/build-types/date-time/time-picker/index.d.ts.map +1 -0
- package/build-types/date-time/time-picker/styles.d.ts.map +1 -0
- package/build-types/date-time/time-picker/test/index.d.ts.map +1 -0
- package/build-types/date-time/time-picker/time-input/index.d.ts.map +1 -0
- package/build-types/date-time/time-picker/time-input/test/index.d.ts.map +1 -0
- package/build-types/date-time/time-picker/timezone.d.ts.map +1 -0
- package/build-types/date-time/types.d.ts +1 -1
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/token-input.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +16 -2
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/popover.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts +16 -1
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigable-container/container.d.ts +3 -8
- package/build-types/navigable-container/container.d.ts.map +1 -1
- package/build-types/navigable-container/types.d.ts +1 -5
- package/build-types/navigable-container/types.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/panel/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/types.d.ts +6 -0
- package/build-types/radio-control/types.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/index.d.ts +1 -1
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/types.d.ts +11 -0
- package/build-types/sandbox/types.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/utils/breakpoint.d.ts +2 -1
- package/build-types/utils/breakpoint.d.ts.map +1 -1
- package/build-types/utils/font.d.ts +3 -2
- package/build-types/utils/font.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/checkbox-control.d.ts +2 -1
- package/build-types/validated-form-controls/components/checkbox-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/radio-control.d.ts +2 -1
- package/build-types/validated-form-controls/components/radio-control.d.ts.map +1 -1
- package/build-types/visually-hidden/component.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +0 -6
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/package.json +21 -21
- package/src/alignment-matrix-control/style.module.scss +1 -1
- package/src/autocomplete/get-autocomplete-match.ts +25 -4
- package/src/autocomplete/index.tsx +69 -21
- package/src/autocomplete/test/get-autocomplete-match.ts +97 -75
- package/src/base-control/stories/index.story.tsx +1 -0
- package/src/button/stories/index.story.tsx +1 -0
- package/src/button/style.scss +1 -1
- package/src/button-group/style.scss +1 -2
- package/src/calendar/style.scss +3 -3
- package/src/card/stories/index.story.tsx +2 -9
- package/src/checkbox-control/stories/index.story.tsx +1 -0
- package/src/checkbox-control/style.scss +17 -5
- package/src/checkbox-control/types.ts +4 -0
- package/src/circular-option-picker/style.scss +9 -7
- package/src/color-indicator/stories/index.story.tsx +1 -0
- package/src/color-palette/stories/index.story.tsx +1 -0
- package/src/color-palette/style.scss +1 -1
- package/src/color-picker/stories/index.story.tsx +1 -0
- package/src/combobox-control/stories/index.story.tsx +1 -0
- package/src/composite/stories/index.story.tsx +1 -0
- package/src/confirm-dialog/stories/index.story.tsx +1 -1
- package/src/css.d.ts +1 -0
- package/src/custom-gradient-picker/index.tsx +1 -0
- package/src/custom-select-control/stories/index.story.tsx +1 -0
- package/src/date-time/README.md +3 -3
- package/src/date-time/date-picker/README.md +65 -0
- package/src/date-time/date-time/index.tsx +2 -2
- package/src/date-time/index.ts +2 -2
- package/src/date-time/stories/date.story.tsx +1 -1
- package/src/date-time/stories/time.story.tsx +1 -1
- package/src/date-time/time-picker/README.md +119 -0
- package/src/date-time/{time → time-picker}/index.tsx +1 -1
- package/src/date-time/types.ts +1 -1
- package/src/disabled/stories/index.story.tsx +1 -0
- package/src/drop-zone/stories/index.story.tsx +1 -0
- package/src/dropdown/stories/index.story.tsx +1 -0
- package/src/dropdown-menu/style.scss +1 -1
- package/src/external-link/index.tsx +1 -6
- package/src/external-link/stories/index.story.tsx +2 -1
- package/src/external-link/style.scss +30 -2
- package/src/form-file-upload/stories/index.story.tsx +1 -0
- package/src/form-toggle/stories/index.story.tsx +1 -0
- package/src/form-toggle/style.scss +38 -4
- package/src/form-token-field/README.md +2 -1
- package/src/form-token-field/index.tsx +39 -9
- package/src/form-token-field/stories/index.story.tsx +2 -0
- package/src/form-token-field/style.scss +12 -3
- package/src/form-token-field/test/index.tsx +70 -10
- package/src/form-token-field/token-input.tsx +1 -6
- package/src/form-token-field/types.ts +16 -2
- package/src/gradient-picker/stories/index.story.tsx +1 -0
- package/src/icon/stories/index.story.tsx +1 -0
- package/src/input-control/stories/index.story.tsx +1 -1
- package/src/item-group/stories/index.story.tsx +1 -1
- package/src/keyboard-shortcuts/stories/index.story.tsx +1 -0
- package/src/menu/popover.tsx +15 -8
- package/src/menu/styles.ts +26 -16
- package/src/menu/test/index.tsx +24 -34
- package/src/menu-group/stories/index.story.tsx +1 -0
- package/src/menu-item/stories/index.story.tsx +1 -0
- package/src/menu-items-choice/stories/index.story.tsx +1 -0
- package/src/mobile/link-settings/index.native.js +1 -1
- package/src/modal/index.tsx +1 -0
- package/src/modal/stories/index.story.tsx +1 -0
- package/src/navigable-container/container.tsx +120 -141
- package/src/navigable-container/test/navigable-menu.tsx +24 -0
- package/src/navigable-container/types.ts +1 -5
- package/src/navigation/stories/utils/more-examples.tsx +2 -1
- package/src/navigator/stories/index.story.tsx +1 -0
- package/src/notice/stories/index.story.tsx +1 -0
- package/src/notice/test/__snapshots__/index.tsx.snap +1 -0
- package/src/number-control/stories/index.story.tsx +1 -1
- package/src/palette-edit/index.tsx +1 -0
- package/src/panel/stories/index.story.tsx +1 -0
- package/src/popover/stories/index.story.tsx +1 -0
- package/src/progress-bar/stories/index.story.tsx +1 -0
- package/src/radio-control/index.tsx +2 -0
- package/src/radio-control/stories/index.story.tsx +1 -0
- package/src/radio-control/style.scss +21 -2
- package/src/radio-control/test/index.tsx +10 -0
- package/src/radio-control/types.ts +6 -0
- package/src/range-control/stories/index.story.tsx +1 -0
- package/src/resizable-box/stories/index.story.tsx +1 -0
- package/src/resizable-box/style.scss +4 -5
- package/src/sandbox/index.tsx +189 -9
- package/src/sandbox/stories/index.story.tsx +1 -0
- package/src/sandbox/test/index.tsx +65 -24
- package/src/sandbox/types.ts +11 -0
- package/src/scroll-lock/stories/index.story.tsx +1 -0
- package/src/search-control/stories/index.story.tsx +1 -0
- package/src/select-control/stories/index.story.tsx +1 -0
- package/src/shortcut/stories/index.story.tsx +1 -0
- package/src/slot-fill/stories/index.story.tsx +1 -0
- package/src/snackbar/stories/index.story.tsx +1 -0
- package/src/snackbar/style.scss +2 -2
- package/src/spinner/stories/index.story.tsx +1 -0
- package/src/tab-panel/style.scss +1 -1
- package/src/text-control/stories/index.story.tsx +1 -0
- package/src/text-highlight/stories/index.story.tsx +1 -0
- package/src/textarea-control/stories/index.story.tsx +4 -0
- package/src/textarea-control/styles/textarea-control-styles.ts +6 -0
- package/src/toggle-control/stories/index.story.tsx +1 -0
- package/src/toggle-control/style.scss +1 -1
- package/src/toggle-control/test/index.tsx +8 -2
- package/src/toggle-group-control/stories/index.story.tsx +1 -1
- package/src/toolbar/toolbar-group/index.tsx +2 -2
- package/src/tooltip/stories/index.story.tsx +1 -0
- package/src/tooltip/test/index.tsx +3 -2
- package/src/tree-grid/stories/index.story.tsx +1 -1
- package/src/tree-select/stories/index.story.tsx +1 -0
- package/src/truncate/stories/index.story.tsx +1 -1
- package/src/unit-control/stories/index.story.tsx +1 -1
- package/src/utils/breakpoint.js +1 -1
- package/src/utils/font.js +1 -1
- package/src/visually-hidden/component.tsx +1 -0
- package/src/visually-hidden/stories/index.story.tsx +2 -8
- package/build/card/context.cjs +0 -36
- package/build/card/context.cjs.map +0 -7
- package/build/date-time/time/index.cjs.map +0 -7
- package/build-module/card/context.mjs +0 -10
- package/build-module/card/context.mjs.map +0 -7
- package/build-module/date-time/time/index.mjs.map +0 -7
- package/build-types/card/context.d.ts +0 -3
- package/build-types/card/context.d.ts.map +0 -1
- package/build-types/date-time/date/index.d.ts.map +0 -1
- package/build-types/date-time/date/styles.d.ts.map +0 -1
- package/build-types/date-time/date/test/index.d.ts.map +0 -1
- package/build-types/date-time/date/test/use-lilius.d.ts.map +0 -1
- package/build-types/date-time/date/use-lilius/index.d.ts.map +0 -1
- package/build-types/date-time/time/index.d.ts.map +0 -1
- package/build-types/date-time/time/styles.d.ts.map +0 -1
- package/build-types/date-time/time/test/index.d.ts.map +0 -1
- package/build-types/date-time/time/time-input/index.d.ts.map +0 -1
- package/build-types/date-time/time/time-input/test/index.d.ts.map +0 -1
- package/build-types/date-time/time/timezone.d.ts.map +0 -1
- package/build-types/visually-hidden/test/index.d.ts +0 -2
- package/build-types/visually-hidden/test/index.d.ts.map +0 -1
- package/src/card/context.ts +0 -9
- package/src/visually-hidden/test/__snapshots__/index.tsx.snap +0 -12
- package/src/visually-hidden/test/index.tsx +0 -17
- /package/build-types/date-time/{date → date-picker}/index.d.ts +0 -0
- /package/build-types/date-time/{date → date-picker}/styles.d.ts +0 -0
- /package/build-types/date-time/{date → date-picker}/test/index.d.ts +0 -0
- /package/build-types/date-time/{date → date-picker}/test/use-lilius.d.ts +0 -0
- /package/build-types/date-time/{date → date-picker}/use-lilius/index.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/styles.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/test/index.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/time-input/index.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/time-input/test/index.d.ts +0 -0
- /package/build-types/date-time/{time → time-picker}/timezone.d.ts +0 -0
- /package/src/date-time/{date → date-picker}/index.tsx +0 -0
- /package/src/date-time/{date → date-picker}/styles.ts +0 -0
- /package/src/date-time/{date → date-picker}/test/index.tsx +0 -0
- /package/src/date-time/{date → date-picker}/test/use-lilius.ts +0 -0
- /package/src/date-time/{date → date-picker}/use-lilius/index.ts +0 -0
- /package/src/date-time/{time → time-picker}/styles.ts +0 -0
- /package/src/date-time/{time → time-picker}/test/index.tsx +0 -0
- /package/src/date-time/{time → time-picker}/time-input/index.tsx +0 -0
- /package/src/date-time/{time → time-picker}/time-input/test/index.tsx +0 -0
- /package/src/date-time/{time → time-picker}/timezone.tsx +0 -0
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { BaseControlProps } from '../base-control/types';
|
|
5
5
|
export type RadioControlProps = Pick<BaseControlProps, 'label' | 'help' | 'hideLabelFromVision'> & {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the radio group should be disabled.
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
6
12
|
/**
|
|
7
13
|
* A function that receives the value of the new option that is being
|
|
8
14
|
* selected as input.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/radio-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACnC,gBAAgB,EAChB,OAAO,GAAG,MAAM,GAAG,qBAAqB,CACxC,GAAG;IACH;;;OAGG;IACH,QAAQ,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACpC;;OAEG;IACH,OAAO,CAAC,EAAE;QACT;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/radio-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACnC,gBAAgB,EAChB,OAAO,GAAG,MAAM,GAAG,qBAAqB,CACxC,GAAG;IACH;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACpC;;OAEG;IACH,OAAO,CAAC,EAAE;QACT;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,EAAE,CAAC;IACJ;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/range-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAS3D;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAI9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,YAAY,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/range-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAS3D;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAI9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,YAAY,CA+CpC,CAAC;AACF,eAAe,IAAI,CAAC;AAkBpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,YAAY,CAAwB,CAAC;AAU3E;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,OAAO,CAAE,OAAO,YAAY,CAqBrD,CAAC;AA2DF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,OAAO,CAAE,OAAO,YAAY,CAC1C,CAAC;AAWzB;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,OAAO,CAAE,OAAO,YAAY,CAC1C,CAAC;AAczB;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,OAAO,CAAE,OAAO,YAAY,CAC9C,CAAC;AAUzB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,OAAO,CAAE,OAAO,YAAY,CAC5C,CAAC;AAUzB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAE,OAAO,YAAY,CACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/resizable-box/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,YAAY,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/resizable-box/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,YAAY,CAkBpC,CAAC;AACF,eAAe,IAAI,CAAC;AA6BpB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;mBApCuB,sEAE1B;;;;;oEAkCyB,CAAC;AAkB3C;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;mBAzDY,sEAE1B;;;;;oEAuDoC,CAAC"}
|
|
@@ -13,6 +13,6 @@ import type { SandBoxProps } from './types';
|
|
|
13
13
|
* );
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
|
-
declare function SandBox({
|
|
16
|
+
declare function SandBox({ allowSameOrigin, ...contentProps }: SandBoxProps): import("react").JSX.Element;
|
|
17
17
|
export default SandBox;
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAyb5C;;;;;;;;;;GAUG;AACH,iBAAS,OAAO,CAAE,EAAE,eAAuB,EAAE,GAAG,YAAY,EAAE,EAAE,YAAY,+BAK3E;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/sandbox/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAG3D;;GAEG;AACH,OAAO,OAAO,MAAM,IAAI,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/sandbox/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAG3D;;GAEG;AACH,OAAO,OAAO,MAAM,IAAI,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAmB/B,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,eAAO,MAAM,OAAO,8HAAsB,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
export type SandBoxProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Whether to include `allow-same-origin` in the iframe's sandbox
|
|
4
|
+
* attribute. When true, nested iframes (such as third-party embeds)
|
|
5
|
+
* can access their own origin's cookies and storage.
|
|
6
|
+
*
|
|
7
|
+
* Only enable this for content that is NOT directly user-controlled,
|
|
8
|
+
* such as server-fetched oEmbed previews.
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
allowSameOrigin?: boolean;
|
|
2
13
|
/**
|
|
3
14
|
* The HTML to render in the body of the iframe document.
|
|
4
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sandbox/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IAC1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,iBAAiB,CAAE,CAAE,SAAS,CAAE,CAAC;IAChE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAE,UAAU,CAAE,CAAC;CACrC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/sandbox/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IAC1B;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,iBAAiB,CAAE,CAAE,SAAS,CAAE,CAAC;IAChE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAE,UAAU,CAAE,CAAC;CACrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/scroll-lock/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAY3D,OAAO,UAAU,MAAM,IAAI,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/scroll-lock/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAY3D,OAAO,UAAU,MAAM,IAAI,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,UAAU,CAalC,CAAC;AACF,eAAe,IAAI,CAAC;AAoCpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,UAAU,CAsC/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/search-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/search-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAkBrC,CAAC;AACF,eAAe,IAAI,CAAC;AAoBpB,eAAO,MAAM,OAAO;;;;;;;;;;;;6YAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/select-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAQ3D;;GAEG;AACH,OAAO,aAAa,MAAM,KAAK,CAAC;AAGhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/select-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAQ3D;;GAEG;AACH,OAAO,aAAa,MAAM,KAAK,CAAC;AAGhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAwBrC,CAAC;AACF,eAAe,IAAI,CAAC;AAkCpB,eAAO,MAAM,OAAO;;EAAoC,CAAC;AAYzD,eAAO,MAAM,oBAAoB;;EAAoC,CAAC;AAMtE;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;EAAoC,CAAC;AAsBpE;;;GAGG;AACH,eAAO,MAAM,UAAU;;EAAoC,CAAC;AAM5D,eAAO,MAAM,OAAO;;EAAoC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/shortcut/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,OAAO,QAAQ,MAAM,KAAK,CAAC;AAE3B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/shortcut/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,OAAO,QAAQ,MAAM,KAAK,CAAC;AAE3B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,QAAQ,CAehC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,QAAQ,CAAwB,CAAC;AAEvE,eAAO,MAAM,aAAa,+HAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,EAAE,IAAI,EAAsC,MAAM,KAAK,CAAC;AAE/D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/slot-fill/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,EAAE,IAAI,EAAsC,MAAM,KAAK,CAAC;AAE/D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,IAAI,CAmB5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,IAAI,CAczC,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,OAAO,CAAE,OAAO,IAAI,CAoB/C,CAAC;AAKF,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAE,OAAO,IAAI,CA8BlD,CAAC;AAKF,eAAO,MAAM,WAAW,EAAE,OAAO,CAAE,OAAO,IAAI,CAuB7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/snackbar/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAW3D,OAAO,QAAQ,MAAM,IAAI,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/snackbar/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAW3D,OAAO,QAAQ,MAAM,IAAI,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,QAAQ,CA6BhC,CAAC;AACF,eAAe,IAAI,CAAC;AASpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,QAAQ,CAA+B,CAAC;AAM9E,eAAO,MAAM,WAAW,EAAE,OAAO,CAAE,OAAO,QAAQ,CAEjD,CAAC;AAWF,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAE,OAAO,QAAQ,CAA+B,CAAC;AAM/E,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAE,OAAO,QAAQ,CAC/B,CAAC;AAO5B,eAAO,MAAM,4BAA4B,EAAE,OAAO,CAAE,OAAO,QAAQ,CACxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/spinner/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,OAAO,OAAO,MAAM,KAAK,CAAC;AAG1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/spinner/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,OAAO,OAAO,MAAM,KAAK,CAAC;AAG1B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAe/B,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,OAAO,CAAwB,CAAC;AAGtE,eAAO,MAAM,UAAU,EAAE,OAAO,CAAE,OAAO,OAAO,CAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/text-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,WAAW,MAAM,IAAI,CAAC;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,WAAW,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/text-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,WAAW,MAAM,IAAI,CAAC;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,WAAW,CAsBnC,CAAC;AACF,eAAe,IAAI,CAAC;AAqBpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,WAAW,CAEhD,CAAC;AAMF,eAAO,MAAM,oBAAoB,EAAE,OAAO,CAAE,OAAO,WAAW,CACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/text-highlight/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/text-highlight/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAerC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,aAAa,CAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/textarea-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,eAAe,MAAM,IAAI,CAAC;AAEjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,eAAe,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/textarea-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,eAAe,MAAM,IAAI,CAAC;AAEjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,eAAe,CAyBvC,CAAC;AACF,eAAe,IAAI,CAAC;AAoBpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,eAAe,CAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea-control-styles.d.ts","sourceRoot":"","sources":["../../../src/textarea-control/styles/textarea-control-styles.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,cAAc;;;
|
|
1
|
+
{"version":3,"file":"textarea-control-styles.d.ts","sourceRoot":"","sources":["../../../src/textarea-control/styles/textarea-control-styles.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,cAAc;;;2HA8D1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/toggle-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/toggle-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAoBrC,CAAC;AACF,eAAe,IAAI,CAAC;AAmBpB,eAAO,MAAM,OAAO;;;;0SAAsB,CAAC;AAK3C,eAAO,MAAM,YAAY;;;;0SAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/tooltip/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,OAAO,MAAM,IAAI,CAAC;AAGzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/tooltip/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,OAAO,MAAM,IAAI,CAAC;AAGzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CA4B/B,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,OAAO,CAAwB,CAAC;AAUtE,eAAO,MAAM,gBAAgB,mKAAsB,CAAC;AAapD;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,CAAE,OAAO,OAAO,CAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/tree-select/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,UAAU,MAAM,KAAK,CAAC;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/tree-select/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,uBAAuB,CAAC;AAO3D;;GAEG;AACH,OAAO,UAAU,MAAM,KAAK,CAAC;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,UAAU,CAsBlC,CAAC;AAEF,eAAe,IAAI,CAAC;AAgBpB,eAAO,MAAM,OAAO,iIAAiC,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export function breakpoint(point:
|
|
1
|
+
export function breakpoint(point: keyof typeof breakpoints): string;
|
|
2
|
+
import breakpoints from './breakpoint-values';
|
|
2
3
|
//# sourceMappingURL=breakpoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoint.d.ts","sourceRoot":"","sources":["../../src/utils/breakpoint.js"],"names":[],"mappings":"AASO,
|
|
1
|
+
{"version":3,"file":"breakpoint.d.ts","sourceRoot":"","sources":["../../src/utils/breakpoint.js"],"names":[],"mappings":"AASO,kCAHI,MAAM,OAAO,WAAW,GACvB,MAAM,CAG8B;wBAPxB,qBAAqB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {keyof FONT} value Path of value from `FONT`
|
|
3
|
+
* @param {keyof typeof FONT} value Path of value from `FONT`
|
|
4
4
|
* @return {string} Font rule value
|
|
5
5
|
*/
|
|
6
|
-
export function font(value:
|
|
6
|
+
export function font(value: keyof typeof FONT): string;
|
|
7
|
+
import FONT from './font-values';
|
|
7
8
|
//# sourceMappingURL=font.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"font.d.ts","sourceRoot":"","sources":["../../src/utils/font.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"font.d.ts","sourceRoot":"","sources":["../../src/utils/font.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,4BAHW,MAAM,OAAO,IAAI,GAChB,MAAM,CAIjB;iBATgB,eAAe"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ValidatedControlProps } from './types';
|
|
2
2
|
export declare const ValidatedCheckboxControl: import("react").ForwardRefExoticComponent<Pick<import("../../base-control/types").BaseControlProps, "help" | "__nextHasNoMarginBottom"> & {
|
|
3
|
+
disabled?: boolean;
|
|
3
4
|
onChange: (value: boolean) => void;
|
|
4
5
|
label?: string;
|
|
5
6
|
checked?: boolean;
|
|
6
7
|
indeterminate?: boolean;
|
|
7
8
|
heading?: import("react").ReactNode;
|
|
8
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "label" | "help" | "children" | "as" | "checked" | "heading" | "__nextHasNoMarginBottom" | "indeterminate"> & ValidatedControlProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "label" | "help" | "disabled" | "children" | "as" | "checked" | "heading" | "__nextHasNoMarginBottom" | "indeterminate"> & ValidatedControlProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
9
10
|
//# sourceMappingURL=checkbox-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/checkbox-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAmCrD,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"checkbox-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/checkbox-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAmCrD,eAAO,MAAM,wBAAwB;;;;;;;kVAEpC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ValidatedControlProps } from './types';
|
|
2
2
|
export declare const ValidatedRadioControl: import("react").ForwardRefExoticComponent<Pick<import("../../base-control/types").BaseControlProps, "label" | "help" | "hideLabelFromVision"> & {
|
|
3
|
+
disabled?: boolean;
|
|
3
4
|
onChange: (value: string) => void;
|
|
4
5
|
options?: {
|
|
5
6
|
label: string;
|
|
@@ -7,5 +8,5 @@ export declare const ValidatedRadioControl: import("react").ForwardRefExoticComp
|
|
|
7
8
|
description?: string;
|
|
8
9
|
}[];
|
|
9
10
|
selected?: string;
|
|
10
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "label" | "help" | "children" | "as" | "selected" | "options" | "hideLabelFromVision"> & ValidatedControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "label" | "help" | "disabled" | "children" | "as" | "selected" | "options" | "hideLabelFromVision"> & ValidatedControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
12
|
//# sourceMappingURL=radio-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/radio-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAiCrD,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"radio-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/radio-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAiCrD,eAAO,MAAM,qBAAqB;;;;;;mBAfZ,CAAC;;;2TAiBtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/visually-hidden/component.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/visually-hidden/component.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAoBnD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,gHAG1B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/visually-hidden/stories/index.story.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/visually-hidden/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,cAAc,CAmBtC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,cAAc,CAanD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,OAAO,CAAE,OAAO,cAAc,CAW9D,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,OAAO,CAAE,OAAO,cAAc,CAWpE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "33.0.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -64,24 +64,24 @@
|
|
|
64
64
|
"@types/highlight-words-core": "1.2.1",
|
|
65
65
|
"@types/react": "^18.3.27",
|
|
66
66
|
"@use-gesture/react": "^10.3.1",
|
|
67
|
-
"@wordpress/a11y": "^4.
|
|
68
|
-
"@wordpress/base-styles": "^
|
|
69
|
-
"@wordpress/compose": "^7.
|
|
70
|
-
"@wordpress/date": "^5.
|
|
71
|
-
"@wordpress/deprecated": "^4.
|
|
72
|
-
"@wordpress/dom": "^4.
|
|
73
|
-
"@wordpress/element": "^6.
|
|
74
|
-
"@wordpress/escape-html": "^3.
|
|
75
|
-
"@wordpress/hooks": "^4.
|
|
76
|
-
"@wordpress/html-entities": "^4.
|
|
77
|
-
"@wordpress/i18n": "^6.
|
|
78
|
-
"@wordpress/icons": "^
|
|
79
|
-
"@wordpress/is-shallow-equal": "^5.
|
|
80
|
-
"@wordpress/keycodes": "^4.
|
|
81
|
-
"@wordpress/primitives": "^4.
|
|
82
|
-
"@wordpress/private-apis": "^1.
|
|
83
|
-
"@wordpress/rich-text": "^7.
|
|
84
|
-
"@wordpress/warning": "^3.
|
|
67
|
+
"@wordpress/a11y": "^4.45.0",
|
|
68
|
+
"@wordpress/base-styles": "^7.0.0",
|
|
69
|
+
"@wordpress/compose": "^7.45.0",
|
|
70
|
+
"@wordpress/date": "^5.45.0",
|
|
71
|
+
"@wordpress/deprecated": "^4.45.0",
|
|
72
|
+
"@wordpress/dom": "^4.45.0",
|
|
73
|
+
"@wordpress/element": "^6.45.0",
|
|
74
|
+
"@wordpress/escape-html": "^3.45.0",
|
|
75
|
+
"@wordpress/hooks": "^4.45.0",
|
|
76
|
+
"@wordpress/html-entities": "^4.45.0",
|
|
77
|
+
"@wordpress/i18n": "^6.18.0",
|
|
78
|
+
"@wordpress/icons": "^13.0.0",
|
|
79
|
+
"@wordpress/is-shallow-equal": "^5.45.0",
|
|
80
|
+
"@wordpress/keycodes": "^4.45.0",
|
|
81
|
+
"@wordpress/primitives": "^4.45.0",
|
|
82
|
+
"@wordpress/private-apis": "^1.45.0",
|
|
83
|
+
"@wordpress/rich-text": "^7.45.0",
|
|
84
|
+
"@wordpress/warning": "^3.45.0",
|
|
85
85
|
"change-case": "^4.1.2",
|
|
86
86
|
"clsx": "^2.1.1",
|
|
87
87
|
"colord": "^2.7.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"@storybook/react-vite": "^10.2.8",
|
|
108
108
|
"@testing-library/jest-dom": "^6.9.1",
|
|
109
109
|
"@types/jest": "^29.5.14",
|
|
110
|
-
"@wordpress/jest-console": "^8.
|
|
110
|
+
"@wordpress/jest-console": "^8.45.0",
|
|
111
111
|
"snapshot-diff": "^0.10.0",
|
|
112
112
|
"storybook": "^10.2.8",
|
|
113
113
|
"timezone-mock": "^1.3.6"
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"publishConfig": {
|
|
120
120
|
"access": "public"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "8c229eaed0e88c9827e2da3d73a78f9ddd77714b"
|
|
123
123
|
}
|
|
@@ -13,13 +13,21 @@ type AutocompleteMatch = {
|
|
|
13
13
|
filterValue: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
type AutocompleteMatchOptions = {
|
|
17
|
+
matchCount: number;
|
|
18
|
+
isBackspacing: boolean;
|
|
19
|
+
getTextAfterSelection: () => string;
|
|
20
|
+
lastCompletion?: { name: string; value: string } | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
16
23
|
export function getAutocompleteMatch(
|
|
17
24
|
textContent: string,
|
|
18
25
|
completers: WPCompleter[],
|
|
19
|
-
|
|
20
|
-
isBackspacing: boolean,
|
|
21
|
-
getTextAfterSelection: () => string
|
|
26
|
+
options: AutocompleteMatchOptions
|
|
22
27
|
): AutocompleteMatch | null {
|
|
28
|
+
const { matchCount, isBackspacing, getTextAfterSelection, lastCompletion } =
|
|
29
|
+
options;
|
|
30
|
+
|
|
23
31
|
if ( ! textContent ) {
|
|
24
32
|
return null;
|
|
25
33
|
}
|
|
@@ -58,6 +66,7 @@ export function getAutocompleteMatch(
|
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
const { allowContext, triggerPrefix } = completer;
|
|
69
|
+
|
|
61
70
|
const textWithoutTrigger = textContent.slice(
|
|
62
71
|
triggerIndex + triggerPrefix.length
|
|
63
72
|
);
|
|
@@ -71,7 +80,7 @@ export function getAutocompleteMatch(
|
|
|
71
80
|
return null;
|
|
72
81
|
}
|
|
73
82
|
|
|
74
|
-
const mismatch =
|
|
83
|
+
const mismatch = matchCount === 0;
|
|
75
84
|
const wordsFromTrigger = textWithoutTrigger.split( /\s/ );
|
|
76
85
|
|
|
77
86
|
// Allow matching when typing a trigger + the match string or when
|
|
@@ -108,6 +117,18 @@ export function getAutocompleteMatch(
|
|
|
108
117
|
return null;
|
|
109
118
|
}
|
|
110
119
|
|
|
120
|
+
// After a completion whose value starts with the trigger prefix
|
|
121
|
+
// (e.g. @username), the trigger remains in the text and would
|
|
122
|
+
// re-activate the autocompleter. Suppress the match when the
|
|
123
|
+
// filter value still corresponds to the recently completed text.
|
|
124
|
+
if (
|
|
125
|
+
lastCompletion &&
|
|
126
|
+
lastCompletion.name === completer.name &&
|
|
127
|
+
textWithoutTrigger.trimEnd() === lastCompletion.value
|
|
128
|
+
) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
|
|
111
132
|
return {
|
|
112
133
|
completer,
|
|
113
134
|
filterValue: removeAccents( textWithoutTrigger ),
|
|
@@ -108,10 +108,15 @@ export function useAutocomplete( {
|
|
|
108
108
|
state;
|
|
109
109
|
|
|
110
110
|
const backspacingRef = useRef( false );
|
|
111
|
+
const prevRecordTextRef = useRef( '' );
|
|
112
|
+
const lastCompletionRef = useRef< {
|
|
113
|
+
name: string;
|
|
114
|
+
value: string;
|
|
115
|
+
} | null >( null );
|
|
111
116
|
|
|
112
117
|
function insertCompletion( replacement: React.ReactNode ) {
|
|
113
118
|
if ( autocompleter === null ) {
|
|
114
|
-
return;
|
|
119
|
+
return '';
|
|
115
120
|
}
|
|
116
121
|
const end = record.start;
|
|
117
122
|
const start =
|
|
@@ -119,27 +124,48 @@ export function useAutocomplete( {
|
|
|
119
124
|
const toInsert = create( { html: renderToString( replacement ) } );
|
|
120
125
|
|
|
121
126
|
onChange( insert( record, toInsert, start, end ) );
|
|
127
|
+
return getTextContent( toInsert );
|
|
122
128
|
}
|
|
123
129
|
|
|
124
130
|
function select( option: KeyedOption ) {
|
|
125
|
-
|
|
131
|
+
if ( option.isDisabled || ! autocompleter ) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
126
134
|
|
|
127
|
-
|
|
135
|
+
const { getOptionCompletion } = autocompleter;
|
|
136
|
+
if ( ! getOptionCompletion ) {
|
|
137
|
+
dispatch( { type: 'RESET' } );
|
|
138
|
+
contentRef.current?.focus();
|
|
128
139
|
return;
|
|
129
140
|
}
|
|
130
141
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
142
|
+
const completionObject = getCompletionObject(
|
|
143
|
+
getOptionCompletion( option.value, filterValue )
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
if ( 'replace' === completionObject.action ) {
|
|
147
|
+
onReplace( [ completionObject.value ] );
|
|
148
|
+
// When replacing, the component will unmount, so don't reset
|
|
149
|
+
// state (below) on an unmounted component.
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
135
152
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
153
|
+
if ( 'insert-at-caret' === completionObject.action ) {
|
|
154
|
+
const completionText = insertCompletion( completionObject.value );
|
|
155
|
+
// When the completion value starts with the trigger prefix
|
|
156
|
+
// (e.g. @username), the trigger stays in the text and would
|
|
157
|
+
// re-activate the autocompleter. Store the completed text so
|
|
158
|
+
// the effect can suppress the stale re-match.
|
|
159
|
+
if ( completionText.startsWith( autocompleter.triggerPrefix ) ) {
|
|
160
|
+
const afterPrefix = completionText.slice(
|
|
161
|
+
autocompleter.triggerPrefix.length
|
|
162
|
+
);
|
|
163
|
+
if ( afterPrefix ) {
|
|
164
|
+
lastCompletionRef.current = {
|
|
165
|
+
name: autocompleter.name,
|
|
166
|
+
value: afterPrefix,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
143
169
|
}
|
|
144
170
|
}
|
|
145
171
|
|
|
@@ -222,6 +248,9 @@ export function useAutocomplete( {
|
|
|
222
248
|
}, [ record ] );
|
|
223
249
|
|
|
224
250
|
useEffect( () => {
|
|
251
|
+
const isTextChange = record.text !== prevRecordTextRef.current;
|
|
252
|
+
prevRecordTextRef.current = record.text;
|
|
253
|
+
|
|
225
254
|
function getTextAfterSelection() {
|
|
226
255
|
return textContent
|
|
227
256
|
? getTextContent(
|
|
@@ -234,13 +263,12 @@ export function useAutocomplete( {
|
|
|
234
263
|
: '';
|
|
235
264
|
}
|
|
236
265
|
|
|
237
|
-
const match = getAutocompleteMatch(
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
);
|
|
266
|
+
const match = getAutocompleteMatch( textContent, completers, {
|
|
267
|
+
matchCount: filteredOptions.length,
|
|
268
|
+
isBackspacing: backspacingRef.current,
|
|
269
|
+
getTextAfterSelection,
|
|
270
|
+
lastCompletion: lastCompletionRef.current,
|
|
271
|
+
} );
|
|
244
272
|
|
|
245
273
|
if ( ! match ) {
|
|
246
274
|
if ( autocompleter ) {
|
|
@@ -251,6 +279,26 @@ export function useAutocomplete( {
|
|
|
251
279
|
|
|
252
280
|
const { completer, filterValue: query } = match;
|
|
253
281
|
|
|
282
|
+
// Don't re-activate a dismissed autocompleter on cursor-only
|
|
283
|
+
// movement. `textContent` (text before cursor) changes with the
|
|
284
|
+
// caret, so the effect re-runs, but `record.text` does not.
|
|
285
|
+
// Complements the render-time `didUserInput` gate in
|
|
286
|
+
// `useAutocompleteProps` for callers using this hook directly.
|
|
287
|
+
if ( ! autocompleter && ! isTextChange ) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Clear stale completion ref when the user types a new trigger
|
|
292
|
+
// for the same completer (the previous completion is no longer
|
|
293
|
+
// relevant). Must be after the cursor-only check so that mere
|
|
294
|
+
// cursor movement doesn't discard the suppression state.
|
|
295
|
+
if (
|
|
296
|
+
lastCompletionRef.current &&
|
|
297
|
+
lastCompletionRef.current.name === completer.name
|
|
298
|
+
) {
|
|
299
|
+
lastCompletionRef.current = null;
|
|
300
|
+
}
|
|
301
|
+
|
|
254
302
|
dispatch( { type: 'MATCH', completer, query } );
|
|
255
303
|
// We want to avoid introducing unexpected side effects.
|
|
256
304
|
// See https://github.com/WordPress/gutenberg/pull/41820
|