@wordpress/components 29.13.1-next.719a03cbe.0 → 30.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 +14 -3
- package/build/autocomplete/index.js +4 -0
- package/build/autocomplete/index.js.map +1 -1
- package/build/calendar/date-calendar/index.js +13 -4
- package/build/calendar/date-calendar/index.js.map +1 -1
- package/build/calendar/date-range-calendar/index.js +8 -4
- package/build/calendar/date-range-calendar/index.js.map +1 -1
- package/build/calendar/types.js.map +1 -1
- package/build/icon/index.js +2 -0
- package/build/icon/index.js.map +1 -1
- package/build/index.js +0 -19
- package/build/index.js.map +1 -1
- package/build/private-apis.js +5 -1
- package/build/private-apis.js.map +1 -1
- package/build/select-control/index.js +1 -1
- package/build/select-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
- package/build/utils/hooks/use-controlled-value.js +8 -4
- package/build/utils/hooks/use-controlled-value.js.map +1 -1
- package/build/validated-form-controls/components/checkbox-control.js +52 -0
- package/build/validated-form-controls/components/checkbox-control.js.map +1 -0
- package/build/validated-form-controls/components/combobox-control.js +64 -0
- package/build/validated-form-controls/components/combobox-control.js.map +1 -0
- package/build/validated-form-controls/components/custom-select-control.js +71 -0
- package/build/validated-form-controls/components/custom-select-control.js.map +1 -0
- package/build/validated-form-controls/components/index.js +138 -0
- package/build/validated-form-controls/components/index.js.map +1 -0
- package/build/validated-form-controls/components/input-control.js +50 -0
- package/build/validated-form-controls/components/input-control.js.map +1 -0
- package/build/validated-form-controls/components/number-control.js +53 -0
- package/build/validated-form-controls/components/number-control.js.map +1 -0
- package/build/validated-form-controls/components/radio-control.js +51 -0
- package/build/validated-form-controls/components/radio-control.js.map +1 -0
- package/build/validated-form-controls/components/range-control.js +51 -0
- package/build/validated-form-controls/components/range-control.js.map +1 -0
- package/build/validated-form-controls/components/select-control.js +53 -0
- package/build/validated-form-controls/components/select-control.js.map +1 -0
- package/build/validated-form-controls/components/text-control.js +51 -0
- package/build/validated-form-controls/components/text-control.js.map +1 -0
- package/build/validated-form-controls/components/textarea-control.js +50 -0
- package/build/validated-form-controls/components/textarea-control.js.map +1 -0
- package/build/validated-form-controls/components/toggle-control.js +60 -0
- package/build/validated-form-controls/components/toggle-control.js.map +1 -0
- package/build/validated-form-controls/components/toggle-group-control.js +69 -0
- package/build/validated-form-controls/components/toggle-group-control.js.map +1 -0
- package/build/validated-form-controls/components/types.js +6 -0
- package/build/validated-form-controls/components/types.js.map +1 -0
- package/build/validated-form-controls/control-with-error.js +137 -0
- package/build/validated-form-controls/control-with-error.js.map +1 -0
- package/build/validated-form-controls/index.js +28 -0
- package/build/validated-form-controls/index.js.map +1 -0
- package/build-module/autocomplete/index.js +4 -0
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/calendar/date-calendar/index.js +11 -3
- package/build-module/calendar/date-calendar/index.js.map +1 -1
- package/build-module/calendar/date-range-calendar/index.js +8 -4
- package/build-module/calendar/date-range-calendar/index.js.map +1 -1
- package/build-module/calendar/types.js.map +1 -1
- package/build-module/icon/index.js +2 -0
- package/build-module/icon/index.js.map +1 -1
- package/build-module/index.js +0 -1
- package/build-module/index.js.map +1 -1
- package/build-module/private-apis.js +5 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/select-control/index.js +1 -1
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
- package/build-module/utils/hooks/use-controlled-value.js +9 -5
- package/build-module/utils/hooks/use-controlled-value.js.map +1 -1
- package/build-module/validated-form-controls/components/checkbox-control.js +44 -0
- package/build-module/validated-form-controls/components/checkbox-control.js.map +1 -0
- package/build-module/validated-form-controls/components/combobox-control.js +56 -0
- package/build-module/validated-form-controls/components/combobox-control.js.map +1 -0
- package/build-module/validated-form-controls/components/custom-select-control.js +63 -0
- package/build-module/validated-form-controls/components/custom-select-control.js.map +1 -0
- package/build-module/validated-form-controls/components/index.js +13 -0
- package/build-module/validated-form-controls/components/index.js.map +1 -0
- package/build-module/validated-form-controls/components/input-control.js +42 -0
- package/build-module/validated-form-controls/components/input-control.js.map +1 -0
- package/build-module/validated-form-controls/components/number-control.js +45 -0
- package/build-module/validated-form-controls/components/number-control.js.map +1 -0
- package/build-module/validated-form-controls/components/radio-control.js +43 -0
- package/build-module/validated-form-controls/components/radio-control.js.map +1 -0
- package/build-module/validated-form-controls/components/range-control.js +43 -0
- package/build-module/validated-form-controls/components/range-control.js.map +1 -0
- package/build-module/validated-form-controls/components/select-control.js +45 -0
- package/build-module/validated-form-controls/components/select-control.js.map +1 -0
- package/build-module/validated-form-controls/components/text-control.js +43 -0
- package/build-module/validated-form-controls/components/text-control.js.map +1 -0
- package/build-module/validated-form-controls/components/textarea-control.js +42 -0
- package/build-module/validated-form-controls/components/textarea-control.js.map +1 -0
- package/build-module/validated-form-controls/components/toggle-control.js +52 -0
- package/build-module/validated-form-controls/components/toggle-control.js.map +1 -0
- package/build-module/validated-form-controls/components/toggle-group-control.js +62 -0
- package/build-module/validated-form-controls/components/toggle-group-control.js.map +1 -0
- package/build-module/validated-form-controls/components/types.js +2 -0
- package/build-module/validated-form-controls/components/types.js.map +1 -0
- package/build-module/validated-form-controls/control-with-error.js +129 -0
- package/build-module/validated-form-controls/control-with-error.js.map +1 -0
- package/build-module/validated-form-controls/index.js +3 -0
- package/build-module/validated-form-controls/index.js.map +1 -0
- package/build-style/style-rtl.css +60 -17
- package/build-style/style.css +60 -17
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/calendar/date-calendar/index.d.ts.map +1 -1
- package/build-types/calendar/date-range-calendar/index.d.ts.map +1 -1
- package/build-types/calendar/types.d.ts +2 -2
- package/build-types/calendar/types.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/index.d.ts +0 -1
- package/build-types/index.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-value.d.ts +2 -2
- package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/checkbox-control.d.ts +9 -0
- package/build-types/validated-form-controls/components/checkbox-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/combobox-control.d.ts +21 -0
- package/build-types/validated-form-controls/components/combobox-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/custom-select-control.d.ts +4 -0
- package/build-types/validated-form-controls/components/custom-select-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/index.d.ts +13 -0
- package/build-types/validated-form-controls/components/index.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/input-control.d.ts +4 -0
- package/build-types/validated-form-controls/components/input-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/number-control.d.ts +17 -0
- package/build-types/validated-form-controls/components/number-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/radio-control.d.ts +11 -0
- package/build-types/validated-form-controls/components/radio-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/range-control.d.ts +36 -0
- package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/select-control.d.ts +9 -0
- package/build-types/validated-form-controls/components/select-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +12 -0
- package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +12 -0
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +12 -0
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +18 -0
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +12 -0
- package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts +19 -0
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +12 -0
- package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +9 -0
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +12 -0
- package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/story-utils.d.ts +9 -0
- package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +9 -0
- package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +9 -0
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +9 -0
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +9 -0
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/text-control.d.ts +8 -0
- package/build-types/validated-form-controls/components/text-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/textarea-control.d.ts +7 -0
- package/build-types/validated-form-controls/components/textarea-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/toggle-control.d.ts +7 -0
- package/build-types/validated-form-controls/components/toggle-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts +15 -0
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts.map +1 -0
- package/build-types/validated-form-controls/components/types.d.ts +27 -0
- package/build-types/validated-form-controls/components/types.d.ts.map +1 -0
- package/build-types/validated-form-controls/control-with-error.d.ts +36 -0
- package/build-types/validated-form-controls/control-with-error.d.ts.map +1 -0
- package/build-types/validated-form-controls/index.d.ts +3 -0
- package/build-types/validated-form-controls/index.d.ts.map +1 -0
- package/package.json +19 -19
- package/src/autocomplete/index.tsx +4 -0
- package/src/calendar/date-calendar/README.md +57 -46
- package/src/calendar/date-calendar/index.tsx +22 -8
- package/src/calendar/date-range-calendar/README.md +63 -52
- package/src/calendar/date-range-calendar/index.tsx +23 -11
- package/src/calendar/types.ts +2 -2
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +8 -8
- package/src/icon/index.tsx +2 -0
- package/src/index.ts +0 -1
- package/src/private-apis.ts +5 -0
- package/src/select-control/index.tsx +1 -1
- package/src/style.scss +2 -2
- package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +3 -1
- package/src/utils/hooks/use-controlled-value.ts +16 -8
- package/src/validated-form-controls/components/checkbox-control.tsx +64 -0
- package/src/validated-form-controls/components/combobox-control.tsx +77 -0
- package/src/validated-form-controls/components/custom-select-control.tsx +86 -0
- package/src/validated-form-controls/components/index.ts +12 -0
- package/src/validated-form-controls/components/input-control.tsx +59 -0
- package/src/validated-form-controls/components/number-control.tsx +61 -0
- package/src/validated-form-controls/components/radio-control.tsx +60 -0
- package/src/validated-form-controls/components/range-control.tsx +60 -0
- package/src/validated-form-controls/components/select-control.tsx +75 -0
- package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +57 -0
- package/src/validated-form-controls/components/stories/combobox-control.story.tsx +64 -0
- package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +64 -0
- package/src/validated-form-controls/components/stories/input-control.story.tsx +132 -0
- package/src/validated-form-controls/components/stories/number-control.story.tsx +62 -0
- package/src/validated-form-controls/components/stories/overview.mdx +52 -0
- package/src/validated-form-controls/components/stories/overview.story.tsx +100 -0
- package/src/validated-form-controls/components/stories/radio-control.story.tsx +64 -0
- package/src/validated-form-controls/components/stories/range-control.story.tsx +60 -0
- package/src/validated-form-controls/components/stories/select-control.story.tsx +60 -0
- package/src/validated-form-controls/components/stories/story-utils.tsx +46 -0
- package/src/validated-form-controls/components/stories/text-control.story.tsx +55 -0
- package/src/validated-form-controls/components/stories/textarea-control.story.tsx +52 -0
- package/src/validated-form-controls/components/stories/toggle-control.story.tsx +55 -0
- package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +66 -0
- package/src/validated-form-controls/components/text-control.tsx +60 -0
- package/src/validated-form-controls/components/textarea-control.tsx +59 -0
- package/src/validated-form-controls/components/toggle-control.tsx +69 -0
- package/src/validated-form-controls/components/toggle-group-control.tsx +82 -0
- package/src/validated-form-controls/components/types.ts +28 -0
- package/src/validated-form-controls/control-with-error.tsx +198 -0
- package/src/validated-form-controls/index.ts +2 -0
- package/src/validated-form-controls/style.scss +75 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/calendar/utils/use-controlled-value.js +0 -58
- package/build/calendar/utils/use-controlled-value.js.map +0 -1
- package/build-module/calendar/utils/use-controlled-value.js +0 -51
- package/build-module/calendar/utils/use-controlled-value.js.map +0 -1
- package/build-types/calendar/utils/use-controlled-value.d.ts +0 -27
- package/build-types/calendar/utils/use-controlled-value.d.ts.map +0 -1
- package/src/calendar/utils/use-controlled-value.ts +0 -61
- package/src/dimension-control/style.scss +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -2,17 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 30.0.0 (2025-07-23)
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Breaking Changes
|
|
8
|
+
|
|
9
|
+
- `Icon`: Pass `size` prop value as `width`/`height` attributes when `icon` is a component that doesn't exactly match `SVG` ([#70756](https://github.com/WordPress/gutenberg/pull/70756)).
|
|
10
|
+
|
|
11
|
+
### Internal
|
|
8
12
|
|
|
9
|
-
- Add new `
|
|
13
|
+
- Add new validated form controls (work in progress, not exported): `ValidatedCheckboxControl`, `ValidatedInputControl`, `ValidatedNumberControl`, `ValidatedRadioControl`, `ValidatedRangeControl`, `ValidatedSelectControl`, `ValidatedTextControl`, `ValidatedTextareaControl`, `ValidatedToggleControl`, `ValidatedCustomSelectControl`, `ValidatedComboboxControl`, `ValidatedToggleGroupControl`, and `ControlWithError` for enhanced form validation capabilities ([#70620](https://github.com/WordPress/gutenberg/pull/70620)).
|
|
10
14
|
|
|
11
15
|
### Bug Fixes
|
|
12
16
|
|
|
13
17
|
- `FormTokenField`: Fix focus lost on tab when `__experimentalExpandOnFocus` is set ([#70591](https://github.com/WordPress/gutenberg/pull/70591)).
|
|
14
18
|
- `SelectControl`: Fix font-size for medium screens to ensure consistency with other inputs ([#70619](https://github.com/WordPress/gutenberg/pull/70619)).
|
|
19
|
+
- `SelectControl`: Move classnames to the root ([#70643](https://github.com/WordPress/gutenberg/pull/70643)).
|
|
20
|
+
- `Autocomplete`: Prevent text cursor position loss when clicking to insert an item ([#70660](https://github.com/WordPress/gutenberg/pull/70660)).
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Internal
|
|
15
24
|
|
|
25
|
+
- Add new private `DateCalendar` and `DateRangeCalendar` components ([#70578](https://github.com/WordPress/gutenberg/pull/70578), [#70681](https://github.com/WordPress/gutenberg/pull/70681)).
|
|
26
|
+
- `useControlledValue`: Enhanced hook to support additional arguments in onChange callbacks and improved performance with useCallback optimization ([#70655](https://github.com/WordPress/gutenberg/pull/70655)).
|
|
16
27
|
|
|
17
28
|
## 29.12.0 (2025-06-25)
|
|
18
29
|
|
|
@@ -88,6 +88,10 @@ function useAutocomplete({
|
|
|
88
88
|
// Reset autocomplete state after insertion rather than before
|
|
89
89
|
// so insertion events don't cause the completion menu to redisplay.
|
|
90
90
|
reset();
|
|
91
|
+
|
|
92
|
+
// Make sure that the content remains focused after making a selection
|
|
93
|
+
// and that the text cursor position is not lost.
|
|
94
|
+
contentRef.current?.focus();
|
|
91
95
|
}
|
|
92
96
|
function reset() {
|
|
93
97
|
setSelectedIndex(0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_removeAccents","_interopRequireDefault","require","_element","_compose","_richText","_a11y","_keycodes","_autocompleterUi","_strings","_withIgnoreImeEvents","_getNodeText","_jsxRuntime","EMPTY_FILTERED_OPTIONS","AUTOCOMPLETE_HOOK_REFERENCE","useAutocomplete","record","onChange","onReplace","completers","contentRef","instanceId","useInstanceId","selectedIndex","setSelectedIndex","useState","filteredOptions","setFilteredOptions","filterValue","setFilterValue","autocompleter","setAutocompleter","AutocompleterUI","setAutocompleterUI","backspacingRef","useRef","insertCompletion","replacement","end","start","triggerPrefix","length","toInsert","create","html","renderToString","insert","select","option","getOptionCompletion","isDisabled","completion","value","isCompletionObject","obj","action","undefined","completionObject","reset","onChangeOptions","options","handleKeyDown","event","current","key","defaultPrevented","newIndex","isAppleOS","speak","getNodeText","label","preventDefault","textContent","useMemo","isCollapsed","getTextContent","slice","useEffect","completer","reduce","lastTrigger","currentCompleter","triggerIndex","lastIndexOf","lastTriggerIndex","allowContext","textWithoutTrigger","tooDistantFromTrigger","mismatch","wordsFromTrigger","split","hasOneTriggerWord","matchingWhileBackspacing","textAfterSelection","test","safeTrigger","escapeRegExp","text","removeAccents","match","RegExp","query","getAutoCompleterUI","selectedKey","className","isExpanded","listBoxId","activeId","hasSelection","showPopover","onKeyDown","withIgnoreIMEEvents","popover","jsx","onSelect","useLastDifferentValue","history","Set","add","size","delete","Array","from","useAutocompleteProps","ref","onKeyDownRef","previousRecord","mergedRefs","useMergeRefs","useRefEffect","element","_onKeyDown","addEventListener","removeEventListener","didUserInput","children","Autocomplete","isSelected","props","jsxs","Fragment"],"sources":["@wordpress/components/src/autocomplete/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseEffect,\n\tuseState,\n\tuseRef,\n\tuseMemo,\n} from '@wordpress/element';\nimport { useInstanceId, useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport {\n\tcreate,\n\tslice,\n\tinsert,\n\tisCollapsed,\n\tgetTextContent,\n} from '@wordpress/rich-text';\nimport { speak } from '@wordpress/a11y';\nimport { isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { getAutoCompleterUI } from './autocompleter-ui';\nimport { escapeRegExp } from '../utils/strings';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport type {\n\tAutocompleteProps,\n\tAutocompleterUIProps,\n\tInsertOption,\n\tKeyedOption,\n\tOptionCompletion,\n\tReplaceOption,\n\tUseAutocompleteProps,\n\tWPCompleter,\n} from './types';\nimport getNodeText from '../utils/get-node-text';\n\nconst EMPTY_FILTERED_OPTIONS: KeyedOption[] = [];\n\n// Used for generating the instance ID\nconst AUTOCOMPLETE_HOOK_REFERENCE = {};\n\nexport function useAutocomplete( {\n\trecord,\n\tonChange,\n\tonReplace,\n\tcompleters,\n\tcontentRef,\n}: UseAutocompleteProps ) {\n\tconst instanceId = useInstanceId( AUTOCOMPLETE_HOOK_REFERENCE );\n\tconst [ selectedIndex, setSelectedIndex ] = useState( 0 );\n\n\tconst [ filteredOptions, setFilteredOptions ] = useState<\n\t\tArray< KeyedOption >\n\t>( EMPTY_FILTERED_OPTIONS );\n\tconst [ filterValue, setFilterValue ] =\n\t\tuseState< AutocompleterUIProps[ 'filterValue' ] >( '' );\n\tconst [ autocompleter, setAutocompleter ] = useState< WPCompleter | null >(\n\t\tnull\n\t);\n\tconst [ AutocompleterUI, setAutocompleterUI ] = useState<\n\t\t( ( props: AutocompleterUIProps ) => JSX.Element | null ) | null\n\t>( null );\n\n\tconst backspacingRef = useRef( false );\n\n\tfunction insertCompletion( replacement: React.ReactNode ) {\n\t\tif ( autocompleter === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst end = record.start;\n\t\tconst start =\n\t\t\tend - autocompleter.triggerPrefix.length - filterValue.length;\n\t\tconst toInsert = create( { html: renderToString( replacement ) } );\n\n\t\tonChange( insert( record, toInsert, start, end ) );\n\t}\n\n\tfunction select( option: KeyedOption ) {\n\t\tconst { getOptionCompletion } = autocompleter || {};\n\n\t\tif ( option.isDisabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( getOptionCompletion ) {\n\t\t\tconst completion = getOptionCompletion( option.value, filterValue );\n\n\t\t\tconst isCompletionObject = (\n\t\t\t\tobj: OptionCompletion\n\t\t\t): obj is InsertOption | ReplaceOption => {\n\t\t\t\treturn (\n\t\t\t\t\tobj !== null &&\n\t\t\t\t\ttypeof obj === 'object' &&\n\t\t\t\t\t'action' in obj &&\n\t\t\t\t\tobj.action !== undefined &&\n\t\t\t\t\t'value' in obj &&\n\t\t\t\t\tobj.value !== undefined\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tconst completionObject = isCompletionObject( completion )\n\t\t\t\t? completion\n\t\t\t\t: ( {\n\t\t\t\t\t\taction: 'insert-at-caret',\n\t\t\t\t\t\tvalue: completion,\n\t\t\t\t } as InsertOption );\n\n\t\t\tif ( 'replace' === completionObject.action ) {\n\t\t\t\tonReplace( [ completionObject.value ] );\n\t\t\t\t// When replacing, the component will unmount, so don't reset\n\t\t\t\t// state (below) on an unmounted component.\n\t\t\t\treturn;\n\t\t\t} else if ( 'insert-at-caret' === completionObject.action ) {\n\t\t\t\tinsertCompletion( completionObject.value );\n\t\t\t}\n\t\t}\n\n\t\t// Reset autocomplete state after insertion rather than before\n\t\t// so insertion events don't cause the completion menu to redisplay.\n\t\treset();\n\t}\n\n\tfunction reset() {\n\t\tsetSelectedIndex( 0 );\n\t\tsetFilteredOptions( EMPTY_FILTERED_OPTIONS );\n\t\tsetFilterValue( '' );\n\t\tsetAutocompleter( null );\n\t\tsetAutocompleterUI( null );\n\t}\n\n\t/**\n\t * Load options for an autocompleter.\n\t *\n\t * @param {Array} options\n\t */\n\tfunction onChangeOptions( options: Array< KeyedOption > ) {\n\t\tsetSelectedIndex(\n\t\t\toptions.length === filteredOptions.length ? selectedIndex : 0\n\t\t);\n\t\tsetFilteredOptions( options );\n\t}\n\n\tfunction handleKeyDown( event: KeyboardEvent ) {\n\t\tbackspacingRef.current = event.key === 'Backspace';\n\n\t\tif ( ! autocompleter ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( filteredOptions.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.key ) {\n\t\t\tcase 'ArrowUp': {\n\t\t\t\tconst newIndex =\n\t\t\t\t\t( selectedIndex === 0\n\t\t\t\t\t\t? filteredOptions.length\n\t\t\t\t\t\t: selectedIndex ) - 1;\n\t\t\t\tsetSelectedIndex( newIndex );\n\t\t\t\t// See the related PR as to why this is necessary: https://github.com/WordPress/gutenberg/pull/54902.\n\t\t\t\tif ( isAppleOS() ) {\n\t\t\t\t\tspeak(\n\t\t\t\t\t\tgetNodeText( filteredOptions[ newIndex ].label ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'ArrowDown': {\n\t\t\t\tconst newIndex = ( selectedIndex + 1 ) % filteredOptions.length;\n\t\t\t\tsetSelectedIndex( newIndex );\n\t\t\t\tif ( isAppleOS() ) {\n\t\t\t\t\tspeak(\n\t\t\t\t\t\tgetNodeText( filteredOptions[ newIndex ].label ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'Escape':\n\t\t\t\tsetAutocompleter( null );\n\t\t\t\tsetAutocompleterUI( null );\n\t\t\t\tevent.preventDefault();\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\tselect( filteredOptions[ selectedIndex ] );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowLeft':\n\t\t\tcase 'ArrowRight':\n\t\t\t\treset();\n\t\t\t\treturn;\n\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\t// Any handled key should prevent original behavior. This relies on\n\t\t// the early return in the default case.\n\t\tevent.preventDefault();\n\t}\n\n\t// textContent is a primitive (string), memoizing is not strictly necessary\n\t// but this is a preemptive performance improvement, since the autocompleter\n\t// is a potential bottleneck for the editor type metric.\n\tconst textContent = useMemo( () => {\n\t\tif ( isCollapsed( record ) ) {\n\t\t\treturn getTextContent( slice( record, 0 ) );\n\t\t}\n\t\treturn '';\n\t}, [ record ] );\n\n\tuseEffect( () => {\n\t\tif ( ! textContent ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Find the completer with the highest triggerPrefix index in the\n\t\t// textContent.\n\t\tconst completer = completers.reduce< WPCompleter | null >(\n\t\t\t( lastTrigger, currentCompleter ) => {\n\t\t\t\tconst triggerIndex = textContent.lastIndexOf(\n\t\t\t\t\tcurrentCompleter.triggerPrefix\n\t\t\t\t);\n\t\t\t\tconst lastTriggerIndex =\n\t\t\t\t\tlastTrigger !== null\n\t\t\t\t\t\t? textContent.lastIndexOf( lastTrigger.triggerPrefix )\n\t\t\t\t\t\t: -1;\n\n\t\t\t\treturn triggerIndex > lastTriggerIndex\n\t\t\t\t\t? currentCompleter\n\t\t\t\t\t: lastTrigger;\n\t\t\t},\n\t\t\tnull\n\t\t);\n\n\t\tif ( ! completer ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst { allowContext, triggerPrefix } = completer;\n\t\tconst triggerIndex = textContent.lastIndexOf( triggerPrefix );\n\t\tconst textWithoutTrigger = textContent.slice(\n\t\t\ttriggerIndex + triggerPrefix.length\n\t\t);\n\n\t\tconst tooDistantFromTrigger = textWithoutTrigger.length > 50; // 50 chars seems to be a good limit.\n\t\t// This is a final barrier to prevent the effect from completing with\n\t\t// an extremely long string, which causes the editor to slow-down\n\t\t// significantly. This could happen, for example, if `matchingWhileBackspacing`\n\t\t// is true and one of the \"words\" end up being too long. If that's the case,\n\t\t// it will be caught by this guard.\n\t\tif ( tooDistantFromTrigger ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mismatch = filteredOptions.length === 0;\n\t\tconst wordsFromTrigger = textWithoutTrigger.split( /\\s/ );\n\t\t// We need to allow the effect to run when not backspacing and if there\n\t\t// was a mismatch. i.e when typing a trigger + the match string or when\n\t\t// clicking in an existing trigger word on the page. We do that if we\n\t\t// detect that we have one word from trigger in the current textual context.\n\t\t//\n\t\t// Ex.: \"Some text @a\" <-- \"@a\" will be detected as the trigger word and\n\t\t// allow the effect to run. It will run until there's a mismatch.\n\t\tconst hasOneTriggerWord = wordsFromTrigger.length === 1;\n\t\t// This is used to allow the effect to run when backspacing and if\n\t\t// \"touching\" a word that \"belongs\" to a trigger. We consider a \"trigger\n\t\t// word\" any word up to the limit of 3 from the trigger character.\n\t\t// Anything beyond that is ignored if there's a mismatch. This allows\n\t\t// us to \"escape\" a mismatch when backspacing, but still imposing some\n\t\t// sane limits.\n\t\t//\n\t\t// Ex: \"Some text @marcelo sekkkk\" <--- \"kkkk\" caused a mismatch, but\n\t\t// if the user presses backspace here, it will show the completion popup again.\n\t\tconst matchingWhileBackspacing =\n\t\t\tbackspacingRef.current && wordsFromTrigger.length <= 3;\n\n\t\tif ( mismatch && ! ( matchingWhileBackspacing || hasOneTriggerWord ) ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst textAfterSelection = getTextContent(\n\t\t\tslice( record, undefined, getTextContent( record ).length )\n\t\t);\n\n\t\tif (\n\t\t\tallowContext &&\n\t\t\t! allowContext(\n\t\t\t\ttextContent.slice( 0, triggerIndex ),\n\t\t\t\ttextAfterSelection\n\t\t\t)\n\t\t) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t/^\\s/.test( textWithoutTrigger ) ||\n\t\t\t/\\s\\s+$/.test( textWithoutTrigger )\n\t\t) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! /[\\u0000-\\uFFFF]*$/.test( textWithoutTrigger ) ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst safeTrigger = escapeRegExp( completer.triggerPrefix );\n\t\tconst text = removeAccents( textContent );\n\t\tconst match = text\n\t\t\t.slice( text.lastIndexOf( completer.triggerPrefix ) )\n\t\t\t.match( new RegExp( `${ safeTrigger }([\\u0000-\\uFFFF]*)$` ) );\n\t\tconst query = match && match[ 1 ];\n\n\t\tsetAutocompleter( completer );\n\t\tsetAutocompleterUI( () =>\n\t\t\tcompleter !== autocompleter\n\t\t\t\t? getAutoCompleterUI( completer )\n\t\t\t\t: AutocompleterUI\n\t\t);\n\t\tsetFilterValue( query === null ? '' : query );\n\t\t// We want to avoid introducing unexpected side effects.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t}, [ textContent ] );\n\n\tconst { key: selectedKey = '' } = filteredOptions[ selectedIndex ] || {};\n\tconst { className } = autocompleter || {};\n\tconst isExpanded = !! autocompleter && filteredOptions.length > 0;\n\tconst listBoxId = isExpanded\n\t\t? `components-autocomplete-listbox-${ instanceId }`\n\t\t: undefined;\n\tconst activeId = isExpanded\n\t\t? `components-autocomplete-item-${ instanceId }-${ selectedKey }`\n\t\t: null;\n\tconst hasSelection = record.start !== undefined;\n\tconst showPopover = !! textContent && hasSelection && !! AutocompleterUI;\n\n\treturn {\n\t\tlistBoxId,\n\t\tactiveId,\n\t\tonKeyDown: withIgnoreIMEEvents( handleKeyDown ),\n\t\tpopover: showPopover && (\n\t\t\t<AutocompleterUI\n\t\t\t\tclassName={ className }\n\t\t\t\tfilterValue={ filterValue }\n\t\t\t\tinstanceId={ instanceId }\n\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\tonChangeOptions={ onChangeOptions }\n\t\t\t\tonSelect={ select }\n\t\t\t\tvalue={ record }\n\t\t\t\tcontentRef={ contentRef }\n\t\t\t\treset={ reset }\n\t\t\t/>\n\t\t),\n\t};\n}\n\nfunction useLastDifferentValue( value: UseAutocompleteProps[ 'record' ] ) {\n\tconst history = useRef< Set< typeof value > >( new Set() );\n\n\thistory.current.add( value );\n\n\t// Keep the history size to 2.\n\tif ( history.current.size > 2 ) {\n\t\thistory.current.delete( Array.from( history.current )[ 0 ] );\n\t}\n\n\treturn Array.from( history.current )[ 0 ];\n}\n\nexport function useAutocompleteProps( options: UseAutocompleteProps ) {\n\tconst ref = useRef< HTMLElement >( null );\n\tconst onKeyDownRef = useRef< ( event: KeyboardEvent ) => void >();\n\tconst { record } = options;\n\tconst previousRecord = useLastDifferentValue( record );\n\tconst { popover, listBoxId, activeId, onKeyDown } = useAutocomplete( {\n\t\t...options,\n\t\tcontentRef: ref,\n\t} );\n\tonKeyDownRef.current = onKeyDown;\n\n\tconst mergedRefs = useMergeRefs( [\n\t\tref,\n\t\tuseRefEffect( ( element: HTMLElement ) => {\n\t\t\tfunction _onKeyDown( event: KeyboardEvent ) {\n\t\t\t\tonKeyDownRef.current?.( event );\n\t\t\t}\n\t\t\telement.addEventListener( 'keydown', _onKeyDown );\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'keydown', _onKeyDown );\n\t\t\t};\n\t\t}, [] ),\n\t] );\n\n\t// We only want to show the popover if the user has typed something.\n\tconst didUserInput = record.text !== previousRecord?.text;\n\n\tif ( ! didUserInput ) {\n\t\treturn { ref: mergedRefs };\n\t}\n\n\treturn {\n\t\tref: mergedRefs,\n\t\tchildren: popover,\n\t\t'aria-autocomplete': listBoxId ? 'list' : undefined,\n\t\t'aria-owns': listBoxId,\n\t\t'aria-activedescendant': activeId,\n\t};\n}\n\nexport default function Autocomplete( {\n\tchildren,\n\tisSelected,\n\t...options\n}: AutocompleteProps ) {\n\tconst { popover, ...props } = useAutocomplete( options );\n\treturn (\n\t\t<>\n\t\t\t{ children( props ) }\n\t\t\t{ isSelected && popover }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAOA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAOA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAKA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AAWA,IAAAS,YAAA,GAAAV,sBAAA,CAAAC,OAAA;AAAiD,IAAAU,WAAA,GAAAV,OAAA;AA1CjD;AACA;AACA;;AAGA;AACA;AACA;;AAmBA;AACA;AACA;;AAgBA,MAAMW,sBAAqC,GAAG,EAAE;;AAEhD;AACA,MAAMC,2BAA2B,GAAG,CAAC,CAAC;AAE/B,SAASC,eAAeA,CAAE;EAChCC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,UAAU;EACVC;AACqB,CAAC,EAAG;EACzB,MAAMC,UAAU,GAAG,IAAAC,sBAAa,EAAER,2BAA4B,CAAC;EAC/D,MAAM,CAAES,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,CAAE,CAAC;EAEzD,MAAM,CAAEC,eAAe,EAAEC,kBAAkB,CAAE,GAAG,IAAAF,iBAAQ,EAErDZ,sBAAuB,CAAC;EAC3B,MAAM,CAAEe,WAAW,EAAEC,cAAc,CAAE,GACpC,IAAAJ,iBAAQ,EAA2C,EAAG,CAAC;E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,CAAE,SAAS,EAAED,UAAW,CAAC;IACjD,OAAO,MAAM;MACZD,OAAO,CAACG,mBAAmB,CAAE,SAAS,EAAEF,UAAW,CAAC;IACrD,CAAC;EACF,CAAC,EAAE,EAAG,CAAC,CACN,CAAC;;EAEH;EACA,MAAMG,YAAY,GAAGtH,MAAM,CAACiF,IAAI,KAAK6B,cAAc,EAAE7B,IAAI;EAEzD,IAAK,CAAEqC,YAAY,EAAG;IACrB,OAAO;MAAEV,GAAG,EAAEG;IAAW,CAAC;EAC3B;EAEA,OAAO;IACNH,GAAG,EAAEG,UAAU;IACfQ,QAAQ,EAAEvB,OAAO;IACjB,mBAAmB,EAAEN,SAAS,GAAG,MAAM,GAAGlD,SAAS;IACnD,WAAW,EAAEkD,SAAS;IACtB,uBAAuB,EAAEC;EAC1B,CAAC;AACF;AAEe,SAAS6B,YAAYA,CAAE;EACrCD,QAAQ;EACRE,UAAU;EACV,GAAG7E;AACe,CAAC,EAAG;EACtB,MAAM;IAAEoD,OAAO;IAAE,GAAG0B;EAAM,CAAC,GAAG3H,eAAe,CAAE6C,OAAQ,CAAC;EACxD,oBACC,IAAAhD,WAAA,CAAA+H,IAAA,EAAA/H,WAAA,CAAAgI,QAAA;IAAAL,QAAA,GACGA,QAAQ,CAAEG,KAAM,CAAC,EACjBD,UAAU,IAAIzB,OAAO;EAAA,CACtB,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_removeAccents","_interopRequireDefault","require","_element","_compose","_richText","_a11y","_keycodes","_autocompleterUi","_strings","_withIgnoreImeEvents","_getNodeText","_jsxRuntime","EMPTY_FILTERED_OPTIONS","AUTOCOMPLETE_HOOK_REFERENCE","useAutocomplete","record","onChange","onReplace","completers","contentRef","instanceId","useInstanceId","selectedIndex","setSelectedIndex","useState","filteredOptions","setFilteredOptions","filterValue","setFilterValue","autocompleter","setAutocompleter","AutocompleterUI","setAutocompleterUI","backspacingRef","useRef","insertCompletion","replacement","end","start","triggerPrefix","length","toInsert","create","html","renderToString","insert","select","option","getOptionCompletion","isDisabled","completion","value","isCompletionObject","obj","action","undefined","completionObject","reset","current","focus","onChangeOptions","options","handleKeyDown","event","key","defaultPrevented","newIndex","isAppleOS","speak","getNodeText","label","preventDefault","textContent","useMemo","isCollapsed","getTextContent","slice","useEffect","completer","reduce","lastTrigger","currentCompleter","triggerIndex","lastIndexOf","lastTriggerIndex","allowContext","textWithoutTrigger","tooDistantFromTrigger","mismatch","wordsFromTrigger","split","hasOneTriggerWord","matchingWhileBackspacing","textAfterSelection","test","safeTrigger","escapeRegExp","text","removeAccents","match","RegExp","query","getAutoCompleterUI","selectedKey","className","isExpanded","listBoxId","activeId","hasSelection","showPopover","onKeyDown","withIgnoreIMEEvents","popover","jsx","onSelect","useLastDifferentValue","history","Set","add","size","delete","Array","from","useAutocompleteProps","ref","onKeyDownRef","previousRecord","mergedRefs","useMergeRefs","useRefEffect","element","_onKeyDown","addEventListener","removeEventListener","didUserInput","children","Autocomplete","isSelected","props","jsxs","Fragment"],"sources":["@wordpress/components/src/autocomplete/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseEffect,\n\tuseState,\n\tuseRef,\n\tuseMemo,\n} from '@wordpress/element';\nimport { useInstanceId, useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport {\n\tcreate,\n\tslice,\n\tinsert,\n\tisCollapsed,\n\tgetTextContent,\n} from '@wordpress/rich-text';\nimport { speak } from '@wordpress/a11y';\nimport { isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { getAutoCompleterUI } from './autocompleter-ui';\nimport { escapeRegExp } from '../utils/strings';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport type {\n\tAutocompleteProps,\n\tAutocompleterUIProps,\n\tInsertOption,\n\tKeyedOption,\n\tOptionCompletion,\n\tReplaceOption,\n\tUseAutocompleteProps,\n\tWPCompleter,\n} from './types';\nimport getNodeText from '../utils/get-node-text';\n\nconst EMPTY_FILTERED_OPTIONS: KeyedOption[] = [];\n\n// Used for generating the instance ID\nconst AUTOCOMPLETE_HOOK_REFERENCE = {};\n\nexport function useAutocomplete( {\n\trecord,\n\tonChange,\n\tonReplace,\n\tcompleters,\n\tcontentRef,\n}: UseAutocompleteProps ) {\n\tconst instanceId = useInstanceId( AUTOCOMPLETE_HOOK_REFERENCE );\n\tconst [ selectedIndex, setSelectedIndex ] = useState( 0 );\n\n\tconst [ filteredOptions, setFilteredOptions ] = useState<\n\t\tArray< KeyedOption >\n\t>( EMPTY_FILTERED_OPTIONS );\n\tconst [ filterValue, setFilterValue ] =\n\t\tuseState< AutocompleterUIProps[ 'filterValue' ] >( '' );\n\tconst [ autocompleter, setAutocompleter ] = useState< WPCompleter | null >(\n\t\tnull\n\t);\n\tconst [ AutocompleterUI, setAutocompleterUI ] = useState<\n\t\t( ( props: AutocompleterUIProps ) => JSX.Element | null ) | null\n\t>( null );\n\n\tconst backspacingRef = useRef( false );\n\n\tfunction insertCompletion( replacement: React.ReactNode ) {\n\t\tif ( autocompleter === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst end = record.start;\n\t\tconst start =\n\t\t\tend - autocompleter.triggerPrefix.length - filterValue.length;\n\t\tconst toInsert = create( { html: renderToString( replacement ) } );\n\n\t\tonChange( insert( record, toInsert, start, end ) );\n\t}\n\n\tfunction select( option: KeyedOption ) {\n\t\tconst { getOptionCompletion } = autocompleter || {};\n\n\t\tif ( option.isDisabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( getOptionCompletion ) {\n\t\t\tconst completion = getOptionCompletion( option.value, filterValue );\n\n\t\t\tconst isCompletionObject = (\n\t\t\t\tobj: OptionCompletion\n\t\t\t): obj is InsertOption | ReplaceOption => {\n\t\t\t\treturn (\n\t\t\t\t\tobj !== null &&\n\t\t\t\t\ttypeof obj === 'object' &&\n\t\t\t\t\t'action' in obj &&\n\t\t\t\t\tobj.action !== undefined &&\n\t\t\t\t\t'value' in obj &&\n\t\t\t\t\tobj.value !== undefined\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tconst completionObject = isCompletionObject( completion )\n\t\t\t\t? completion\n\t\t\t\t: ( {\n\t\t\t\t\t\taction: 'insert-at-caret',\n\t\t\t\t\t\tvalue: completion,\n\t\t\t\t } as InsertOption );\n\n\t\t\tif ( 'replace' === completionObject.action ) {\n\t\t\t\tonReplace( [ completionObject.value ] );\n\t\t\t\t// When replacing, the component will unmount, so don't reset\n\t\t\t\t// state (below) on an unmounted component.\n\t\t\t\treturn;\n\t\t\t} else if ( 'insert-at-caret' === completionObject.action ) {\n\t\t\t\tinsertCompletion( completionObject.value );\n\t\t\t}\n\t\t}\n\n\t\t// Reset autocomplete state after insertion rather than before\n\t\t// so insertion events don't cause the completion menu to redisplay.\n\t\treset();\n\n\t\t// Make sure that the content remains focused after making a selection\n\t\t// and that the text cursor position is not lost.\n\t\tcontentRef.current?.focus();\n\t}\n\n\tfunction reset() {\n\t\tsetSelectedIndex( 0 );\n\t\tsetFilteredOptions( EMPTY_FILTERED_OPTIONS );\n\t\tsetFilterValue( '' );\n\t\tsetAutocompleter( null );\n\t\tsetAutocompleterUI( null );\n\t}\n\n\t/**\n\t * Load options for an autocompleter.\n\t *\n\t * @param {Array} options\n\t */\n\tfunction onChangeOptions( options: Array< KeyedOption > ) {\n\t\tsetSelectedIndex(\n\t\t\toptions.length === filteredOptions.length ? selectedIndex : 0\n\t\t);\n\t\tsetFilteredOptions( options );\n\t}\n\n\tfunction handleKeyDown( event: KeyboardEvent ) {\n\t\tbackspacingRef.current = event.key === 'Backspace';\n\n\t\tif ( ! autocompleter ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( filteredOptions.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.key ) {\n\t\t\tcase 'ArrowUp': {\n\t\t\t\tconst newIndex =\n\t\t\t\t\t( selectedIndex === 0\n\t\t\t\t\t\t? filteredOptions.length\n\t\t\t\t\t\t: selectedIndex ) - 1;\n\t\t\t\tsetSelectedIndex( newIndex );\n\t\t\t\t// See the related PR as to why this is necessary: https://github.com/WordPress/gutenberg/pull/54902.\n\t\t\t\tif ( isAppleOS() ) {\n\t\t\t\t\tspeak(\n\t\t\t\t\t\tgetNodeText( filteredOptions[ newIndex ].label ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'ArrowDown': {\n\t\t\t\tconst newIndex = ( selectedIndex + 1 ) % filteredOptions.length;\n\t\t\t\tsetSelectedIndex( newIndex );\n\t\t\t\tif ( isAppleOS() ) {\n\t\t\t\t\tspeak(\n\t\t\t\t\t\tgetNodeText( filteredOptions[ newIndex ].label ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase 'Escape':\n\t\t\t\tsetAutocompleter( null );\n\t\t\t\tsetAutocompleterUI( null );\n\t\t\t\tevent.preventDefault();\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\tselect( filteredOptions[ selectedIndex ] );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowLeft':\n\t\t\tcase 'ArrowRight':\n\t\t\t\treset();\n\t\t\t\treturn;\n\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\t// Any handled key should prevent original behavior. This relies on\n\t\t// the early return in the default case.\n\t\tevent.preventDefault();\n\t}\n\n\t// textContent is a primitive (string), memoizing is not strictly necessary\n\t// but this is a preemptive performance improvement, since the autocompleter\n\t// is a potential bottleneck for the editor type metric.\n\tconst textContent = useMemo( () => {\n\t\tif ( isCollapsed( record ) ) {\n\t\t\treturn getTextContent( slice( record, 0 ) );\n\t\t}\n\t\treturn '';\n\t}, [ record ] );\n\n\tuseEffect( () => {\n\t\tif ( ! textContent ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Find the completer with the highest triggerPrefix index in the\n\t\t// textContent.\n\t\tconst completer = completers.reduce< WPCompleter | null >(\n\t\t\t( lastTrigger, currentCompleter ) => {\n\t\t\t\tconst triggerIndex = textContent.lastIndexOf(\n\t\t\t\t\tcurrentCompleter.triggerPrefix\n\t\t\t\t);\n\t\t\t\tconst lastTriggerIndex =\n\t\t\t\t\tlastTrigger !== null\n\t\t\t\t\t\t? textContent.lastIndexOf( lastTrigger.triggerPrefix )\n\t\t\t\t\t\t: -1;\n\n\t\t\t\treturn triggerIndex > lastTriggerIndex\n\t\t\t\t\t? currentCompleter\n\t\t\t\t\t: lastTrigger;\n\t\t\t},\n\t\t\tnull\n\t\t);\n\n\t\tif ( ! completer ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst { allowContext, triggerPrefix } = completer;\n\t\tconst triggerIndex = textContent.lastIndexOf( triggerPrefix );\n\t\tconst textWithoutTrigger = textContent.slice(\n\t\t\ttriggerIndex + triggerPrefix.length\n\t\t);\n\n\t\tconst tooDistantFromTrigger = textWithoutTrigger.length > 50; // 50 chars seems to be a good limit.\n\t\t// This is a final barrier to prevent the effect from completing with\n\t\t// an extremely long string, which causes the editor to slow-down\n\t\t// significantly. This could happen, for example, if `matchingWhileBackspacing`\n\t\t// is true and one of the \"words\" end up being too long. If that's the case,\n\t\t// it will be caught by this guard.\n\t\tif ( tooDistantFromTrigger ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mismatch = filteredOptions.length === 0;\n\t\tconst wordsFromTrigger = textWithoutTrigger.split( /\\s/ );\n\t\t// We need to allow the effect to run when not backspacing and if there\n\t\t// was a mismatch. i.e when typing a trigger + the match string or when\n\t\t// clicking in an existing trigger word on the page. We do that if we\n\t\t// detect that we have one word from trigger in the current textual context.\n\t\t//\n\t\t// Ex.: \"Some text @a\" <-- \"@a\" will be detected as the trigger word and\n\t\t// allow the effect to run. It will run until there's a mismatch.\n\t\tconst hasOneTriggerWord = wordsFromTrigger.length === 1;\n\t\t// This is used to allow the effect to run when backspacing and if\n\t\t// \"touching\" a word that \"belongs\" to a trigger. We consider a \"trigger\n\t\t// word\" any word up to the limit of 3 from the trigger character.\n\t\t// Anything beyond that is ignored if there's a mismatch. This allows\n\t\t// us to \"escape\" a mismatch when backspacing, but still imposing some\n\t\t// sane limits.\n\t\t//\n\t\t// Ex: \"Some text @marcelo sekkkk\" <--- \"kkkk\" caused a mismatch, but\n\t\t// if the user presses backspace here, it will show the completion popup again.\n\t\tconst matchingWhileBackspacing =\n\t\t\tbackspacingRef.current && wordsFromTrigger.length <= 3;\n\n\t\tif ( mismatch && ! ( matchingWhileBackspacing || hasOneTriggerWord ) ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst textAfterSelection = getTextContent(\n\t\t\tslice( record, undefined, getTextContent( record ).length )\n\t\t);\n\n\t\tif (\n\t\t\tallowContext &&\n\t\t\t! allowContext(\n\t\t\t\ttextContent.slice( 0, triggerIndex ),\n\t\t\t\ttextAfterSelection\n\t\t\t)\n\t\t) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\t/^\\s/.test( textWithoutTrigger ) ||\n\t\t\t/\\s\\s+$/.test( textWithoutTrigger )\n\t\t) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! /[\\u0000-\\uFFFF]*$/.test( textWithoutTrigger ) ) {\n\t\t\tif ( autocompleter ) {\n\t\t\t\treset();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst safeTrigger = escapeRegExp( completer.triggerPrefix );\n\t\tconst text = removeAccents( textContent );\n\t\tconst match = text\n\t\t\t.slice( text.lastIndexOf( completer.triggerPrefix ) )\n\t\t\t.match( new RegExp( `${ safeTrigger }([\\u0000-\\uFFFF]*)$` ) );\n\t\tconst query = match && match[ 1 ];\n\n\t\tsetAutocompleter( completer );\n\t\tsetAutocompleterUI( () =>\n\t\t\tcompleter !== autocompleter\n\t\t\t\t? getAutoCompleterUI( completer )\n\t\t\t\t: AutocompleterUI\n\t\t);\n\t\tsetFilterValue( query === null ? '' : query );\n\t\t// We want to avoid introducing unexpected side effects.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t}, [ textContent ] );\n\n\tconst { key: selectedKey = '' } = filteredOptions[ selectedIndex ] || {};\n\tconst { className } = autocompleter || {};\n\tconst isExpanded = !! autocompleter && filteredOptions.length > 0;\n\tconst listBoxId = isExpanded\n\t\t? `components-autocomplete-listbox-${ instanceId }`\n\t\t: undefined;\n\tconst activeId = isExpanded\n\t\t? `components-autocomplete-item-${ instanceId }-${ selectedKey }`\n\t\t: null;\n\tconst hasSelection = record.start !== undefined;\n\tconst showPopover = !! textContent && hasSelection && !! AutocompleterUI;\n\n\treturn {\n\t\tlistBoxId,\n\t\tactiveId,\n\t\tonKeyDown: withIgnoreIMEEvents( handleKeyDown ),\n\t\tpopover: showPopover && (\n\t\t\t<AutocompleterUI\n\t\t\t\tclassName={ className }\n\t\t\t\tfilterValue={ filterValue }\n\t\t\t\tinstanceId={ instanceId }\n\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\tonChangeOptions={ onChangeOptions }\n\t\t\t\tonSelect={ select }\n\t\t\t\tvalue={ record }\n\t\t\t\tcontentRef={ contentRef }\n\t\t\t\treset={ reset }\n\t\t\t/>\n\t\t),\n\t};\n}\n\nfunction useLastDifferentValue( value: UseAutocompleteProps[ 'record' ] ) {\n\tconst history = useRef< Set< typeof value > >( new Set() );\n\n\thistory.current.add( value );\n\n\t// Keep the history size to 2.\n\tif ( history.current.size > 2 ) {\n\t\thistory.current.delete( Array.from( history.current )[ 0 ] );\n\t}\n\n\treturn Array.from( history.current )[ 0 ];\n}\n\nexport function useAutocompleteProps( options: UseAutocompleteProps ) {\n\tconst ref = useRef< HTMLElement >( null );\n\tconst onKeyDownRef = useRef< ( event: KeyboardEvent ) => void >();\n\tconst { record } = options;\n\tconst previousRecord = useLastDifferentValue( record );\n\tconst { popover, listBoxId, activeId, onKeyDown } = useAutocomplete( {\n\t\t...options,\n\t\tcontentRef: ref,\n\t} );\n\tonKeyDownRef.current = onKeyDown;\n\n\tconst mergedRefs = useMergeRefs( [\n\t\tref,\n\t\tuseRefEffect( ( element: HTMLElement ) => {\n\t\t\tfunction _onKeyDown( event: KeyboardEvent ) {\n\t\t\t\tonKeyDownRef.current?.( event );\n\t\t\t}\n\t\t\telement.addEventListener( 'keydown', _onKeyDown );\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'keydown', _onKeyDown );\n\t\t\t};\n\t\t}, [] ),\n\t] );\n\n\t// We only want to show the popover if the user has typed something.\n\tconst didUserInput = record.text !== previousRecord?.text;\n\n\tif ( ! didUserInput ) {\n\t\treturn { ref: mergedRefs };\n\t}\n\n\treturn {\n\t\tref: mergedRefs,\n\t\tchildren: popover,\n\t\t'aria-autocomplete': listBoxId ? 'list' : undefined,\n\t\t'aria-owns': listBoxId,\n\t\t'aria-activedescendant': activeId,\n\t};\n}\n\nexport default function Autocomplete( {\n\tchildren,\n\tisSelected,\n\t...options\n}: AutocompleteProps ) {\n\tconst { popover, ...props } = useAutocomplete( options );\n\treturn (\n\t\t<>\n\t\t\t{ children( props ) }\n\t\t\t{ isSelected && popover }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAOA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,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;IACNH,GAAG,EAAEG,UAAU;IACfQ,QAAQ,EAAEvB,OAAO;IACjB,mBAAmB,EAAEN,SAAS,GAAG,MAAM,GAAGnD,SAAS;IACnD,WAAW,EAAEmD,SAAS;IACtB,uBAAuB,EAAEC;EAC1B,CAAC;AACF;AAEe,SAAS6B,YAAYA,CAAE;EACrCD,QAAQ;EACRE,UAAU;EACV,GAAG5E;AACe,CAAC,EAAG;EACtB,MAAM;IAAEmD,OAAO;IAAE,GAAG0B;EAAM,CAAC,GAAG5H,eAAe,CAAE+C,OAAQ,CAAC;EACxD,oBACC,IAAAlD,WAAA,CAAAgI,IAAA,EAAAhI,WAAA,CAAAiI,QAAA;IAAAL,QAAA,GACGA,QAAQ,CAAEG,KAAM,CAAC,EACjBD,UAAU,IAAIzB,OAAO;EAAA,CACtB,CAAC;AAEL","ignoreList":[]}
|
|
@@ -6,15 +6,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.DateCalendar = void 0;
|
|
7
7
|
var _reactDayPicker = require("react-day-picker");
|
|
8
8
|
var _locale = require("react-day-picker/locale");
|
|
9
|
+
var _element = require("@wordpress/element");
|
|
9
10
|
var _constants = require("../utils/constants");
|
|
10
11
|
var _misc = require("../utils/misc");
|
|
11
|
-
var
|
|
12
|
+
var _hooks = require("../../utils/hooks");
|
|
12
13
|
var _useLocalizationProps = require("../utils/use-localization-props");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
/**
|
|
15
16
|
* External dependencies
|
|
16
17
|
*/
|
|
17
18
|
|
|
19
|
+
/**
|
|
20
|
+
* WordPress dependencies
|
|
21
|
+
*/
|
|
22
|
+
|
|
18
23
|
/**
|
|
19
24
|
* Internal dependencies
|
|
20
25
|
*/
|
|
@@ -41,10 +46,14 @@ const DateCalendar = ({
|
|
|
41
46
|
timeZone,
|
|
42
47
|
mode: 'single'
|
|
43
48
|
});
|
|
44
|
-
const
|
|
49
|
+
const onChange = (0, _element.useCallback)((selected, triggerDate, modifiers, e) => {
|
|
50
|
+
// Convert internal `null` to `undefined` for the public event handler.
|
|
51
|
+
onSelect?.(selected !== null && selected !== void 0 ? selected : undefined, triggerDate, modifiers, e);
|
|
52
|
+
}, [onSelect]);
|
|
53
|
+
const [selected, setSelected] = (0, _hooks.useControlledValue)({
|
|
45
54
|
defaultValue: defaultSelected,
|
|
46
55
|
value: selectedProp,
|
|
47
|
-
onChange
|
|
56
|
+
onChange
|
|
48
57
|
});
|
|
49
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactDayPicker.DayPicker, {
|
|
50
59
|
..._constants.COMMON_PROPS,
|
|
@@ -52,7 +61,7 @@ const DateCalendar = ({
|
|
|
52
61
|
...props,
|
|
53
62
|
mode: "single",
|
|
54
63
|
numberOfMonths: (0, _misc.clampNumberOfMonths)(numberOfMonths),
|
|
55
|
-
selected: selected,
|
|
64
|
+
selected: selected !== null && selected !== void 0 ? selected : undefined,
|
|
56
65
|
onSelect: setSelected
|
|
57
66
|
});
|
|
58
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactDayPicker","require","_locale","_constants","_misc","
|
|
1
|
+
{"version":3,"names":["_reactDayPicker","require","_locale","_element","_constants","_misc","_hooks","_useLocalizationProps","_jsxRuntime","DateCalendar","defaultSelected","selected","selectedProp","onSelect","numberOfMonths","locale","enUS","timeZone","props","localizationProps","useLocalizationProps","mode","onChange","useCallback","triggerDate","modifiers","e","undefined","setSelected","useControlledValue","defaultValue","value","jsx","DayPicker","COMMON_PROPS","clampNumberOfMonths","exports"],"sources":["@wordpress/components/src/calendar/date-calendar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { DayPicker } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../../utils/hooks';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport type { DateCalendarProps, OnSelectHandler } from '../types';\n\n/**\n * `DateCalendar` is a React component that provides a customizable calendar\n * interface for **single date** selection.\n *\n * The component is built with accessibility in mind and follows ARIA best\n * practices for calendar widgets. It provides keyboard navigation, screen reader\n * support, and customizable labels for internationalization.\n */\nexport const DateCalendar = ( {\n\tdefaultSelected,\n\tselected: selectedProp,\n\tonSelect,\n\tnumberOfMonths = 1,\n\tlocale = enUS,\n\ttimeZone,\n\t...props\n}: DateCalendarProps ) => {\n\tconst localizationProps = useLocalizationProps( {\n\t\tlocale,\n\t\ttimeZone,\n\t\tmode: 'single',\n\t} );\n\n\tconst onChange: OnSelectHandler< typeof selectedProp > = useCallback(\n\t\t( selected, triggerDate, modifiers, e ) => {\n\t\t\t// Convert internal `null` to `undefined` for the public event handler.\n\t\t\tonSelect?.( selected ?? undefined, triggerDate, modifiers, e );\n\t\t},\n\t\t[ onSelect ]\n\t);\n\n\tconst [ selected, setSelected ] = useControlledValue< typeof selectedProp >(\n\t\t{\n\t\t\tdefaultValue: defaultSelected,\n\t\t\tvalue: selectedProp,\n\t\t\tonChange,\n\t\t}\n\t);\n\n\treturn (\n\t\t<DayPicker\n\t\t\t{ ...COMMON_PROPS }\n\t\t\t{ ...localizationProps }\n\t\t\t{ ...props }\n\t\t\tmode=\"single\"\n\t\t\tnumberOfMonths={ clampNumberOfMonths( numberOfMonths ) }\n\t\t\tselected={ selected ?? undefined }\n\t\t\tonSelect={ setSelected }\n\t\t/>\n\t);\n};\n"],"mappings":";;;;;;AAGA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAAuE,IAAAO,WAA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locale = require("react-day-picker/locale");
|
|
|
11
11
|
var _element = require("@wordpress/element");
|
|
12
12
|
var _constants = require("../utils/constants");
|
|
13
13
|
var _misc = require("../utils/misc");
|
|
14
|
-
var
|
|
14
|
+
var _hooks = require("../../utils/hooks");
|
|
15
15
|
var _useLocalizationProps = require("../utils/use-localization-props");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
/**
|
|
@@ -123,10 +123,14 @@ const DateRangeCalendar = ({
|
|
|
123
123
|
timeZone,
|
|
124
124
|
mode: 'range'
|
|
125
125
|
});
|
|
126
|
-
const
|
|
126
|
+
const onChange = (0, _element.useCallback)((selected, triggerDate, modifiers, e) => {
|
|
127
|
+
// Convert internal `null` to `undefined` for the public event handler.
|
|
128
|
+
onSelect?.(selected !== null && selected !== void 0 ? selected : undefined, triggerDate, modifiers, e);
|
|
129
|
+
}, [onSelect]);
|
|
130
|
+
const [selected, setSelected] = (0, _hooks.useControlledValue)({
|
|
127
131
|
defaultValue: defaultSelected,
|
|
128
132
|
value: selectedProp,
|
|
129
|
-
onChange
|
|
133
|
+
onChange
|
|
130
134
|
});
|
|
131
135
|
const [hoveredDate, setHoveredDate] = (0, _element.useState)(undefined);
|
|
132
136
|
|
|
@@ -156,7 +160,7 @@ const DateRangeCalendar = ({
|
|
|
156
160
|
excludeDisabled: excludeDisabled,
|
|
157
161
|
min: min,
|
|
158
162
|
max: max,
|
|
159
|
-
selected: selected,
|
|
163
|
+
selected: selected !== null && selected !== void 0 ? selected : undefined,
|
|
160
164
|
onSelect: setSelected,
|
|
161
165
|
onDayMouseEnter: date => setHoveredDate(date),
|
|
162
166
|
onDayMouseLeave: () => setHoveredDate(undefined),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_dateFns","require","_reactDayPicker","_locale","_element","_constants","_misc","_useControlledValue","_useLocalizationProps","_jsxRuntime","usePreviewRange","selected","hoveredDate","excludeDisabled","min","max","disabled","useMemo","from","previewHighlight","potentialNewRange","_selected$to","to","_selected$to2","undefined","differenceInCalendarDays","rangeContainsModifiers","DateRangeCalendar","defaultSelected","selectedProp","onSelect","numberOfMonths","locale","enUS","timeZone","props","localizationProps","useLocalizationProps","mode","setSelected","useControlledValue","defaultValue","value","onChange","setHoveredDate","useState","previewRange","modifiers","preview","preview_start","preview_end","jsx","DayPicker","COMMON_PROPS","clampNumberOfMonths","onDayMouseEnter","date","onDayMouseLeave","modifiersClassNames","MODIFIER_CLASSNAMES","exports"],"sources":["@wordpress/components/src/calendar/date-range-calendar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { differenceInCalendarDays } from 'date-fns';\nimport { DayPicker, rangeContainsModifiers } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS, MODIFIER_CLASSNAMES } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../utils/use-controlled-value';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport type { DateRangeCalendarProps, DateRange } from '../types';\n\nexport function usePreviewRange( {\n\tselected,\n\thoveredDate,\n\texcludeDisabled,\n\tmin,\n\tmax,\n\tdisabled,\n}: Pick<\n\tDateRangeCalendarProps,\n\t'selected' | 'excludeDisabled' | 'min' | 'max' | 'disabled'\n> & {\n\thoveredDate: Date | undefined;\n} ) {\n\treturn useMemo( () => {\n\t\tif ( ! hoveredDate || ! selected?.from ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet previewHighlight: DateRange | undefined;\n\t\tlet potentialNewRange: { from: Date; to: Date } | undefined;\n\n\t\t// Hovering on a date before the start of the selected range\n\t\tif ( hoveredDate < selected.from ) {\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: selected.from,\n\t\t\t};\n\n\t\t\tpotentialNewRange = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: selected.to ?? selected.from,\n\t\t\t};\n\t\t} else if (\n\t\t\tselected.to &&\n\t\t\thoveredDate > selected.from &&\n\t\t\thoveredDate < selected.to\n\t\t) {\n\t\t\t// Hovering on a date between the start and end of the selected range\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: selected.from,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\n\t\t\tpotentialNewRange = {\n\t\t\t\tfrom: selected.from,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t} else if ( hoveredDate > selected.from ) {\n\t\t\t// Hovering on a date after the end of the selected range (either\n\t\t\t// because it's greater than selected.to, or because it's not defined)\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: selected.to ?? selected.from,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\n\t\t\tpotentialNewRange = {\n\t\t\t\tfrom: selected.from,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t}\n\n\t\tif (\n\t\t\tmin !== undefined &&\n\t\t\tmin > 0 &&\n\t\t\tpotentialNewRange &&\n\t\t\tdifferenceInCalendarDays(\n\t\t\t\tpotentialNewRange.to,\n\t\t\t\tpotentialNewRange.from\n\t\t\t) < min\n\t\t) {\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t}\n\n\t\tif (\n\t\t\tmax !== undefined &&\n\t\t\tmax > 0 &&\n\t\t\tpotentialNewRange &&\n\t\t\tdifferenceInCalendarDays(\n\t\t\t\tpotentialNewRange.to,\n\t\t\t\tpotentialNewRange.from\n\t\t\t) > max\n\t\t) {\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t}\n\n\t\tif (\n\t\t\texcludeDisabled &&\n\t\t\tdisabled &&\n\t\t\tpotentialNewRange &&\n\t\t\trangeContainsModifiers( potentialNewRange, disabled )\n\t\t) {\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t}\n\n\t\treturn previewHighlight;\n\t}, [ selected, hoveredDate, excludeDisabled, min, max, disabled ] );\n}\n\n/**\n * `DateRangeCalendar` is a React component that provides a customizable calendar\n * interface for **date range** selection.\n *\n * The component is built with accessibility in mind and follows ARIA best\n * practices for calendar widgets. It provides keyboard navigation, screen reader\n * support, and customizable labels for internationalization.\n */\nexport const DateRangeCalendar = ( {\n\tdefaultSelected,\n\tselected: selectedProp,\n\tonSelect,\n\tnumberOfMonths = 1,\n\texcludeDisabled,\n\tmin,\n\tmax,\n\tdisabled,\n\tlocale = enUS,\n\ttimeZone,\n\t...props\n}: DateRangeCalendarProps ) => {\n\tconst localizationProps = useLocalizationProps( {\n\t\tlocale,\n\t\ttimeZone,\n\t\tmode: 'range',\n\t} );\n\n\tconst [ selected, setSelected ] = useControlledValue<\n\t\tDateRange | undefined\n\t>( {\n\t\tdefaultValue: defaultSelected,\n\t\tvalue: selectedProp,\n\t\tonChange: onSelect,\n\t} );\n\n\tconst [ hoveredDate, setHoveredDate ] = useState< Date | undefined >(\n\t\tundefined\n\t);\n\n\t// Compute the preview range for hover effect\n\tconst previewRange = usePreviewRange( {\n\t\tselected,\n\t\thoveredDate,\n\t\texcludeDisabled,\n\t\tmin,\n\t\tmax,\n\t\tdisabled,\n\t} );\n\n\tconst modifiers = useMemo( () => {\n\t\treturn {\n\t\t\tpreview: previewRange,\n\t\t\tpreview_start: previewRange?.from,\n\t\t\tpreview_end: previewRange?.to,\n\t\t};\n\t}, [ previewRange ] );\n\n\treturn (\n\t\t<DayPicker\n\t\t\t{ ...COMMON_PROPS }\n\t\t\t{ ...localizationProps }\n\t\t\t{ ...props }\n\t\t\tmode=\"range\"\n\t\t\tnumberOfMonths={ clampNumberOfMonths( numberOfMonths ) }\n\t\t\tdisabled={ disabled }\n\t\t\texcludeDisabled={ excludeDisabled }\n\t\t\tmin={ min }\n\t\t\tmax={ max }\n\t\t\tselected={ selected }\n\t\t\tonSelect={ setSelected }\n\t\t\tonDayMouseEnter={ ( date ) => setHoveredDate( date ) }\n\t\t\tonDayMouseLeave={ () => setHoveredDate( undefined ) }\n\t\t\tmodifiers={ modifiers }\n\t\t\tmodifiersClassNames={ MODIFIER_CLASSNAMES }\n\t\t/>\n\t);\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAIA,IAAAG,QAAA,GAAAH,OAAA;AAIA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA;AAAuE,IAAAQ,WAAA,GAAAR,OAAA;AAhBvE;AACA;AACA;;AAIA;AACA;AACA;;AAEA;AACA;AACA;;AAOO,SAASS,eAAeA,CAAE;EAChCC,QAAQ;EACRC,WAAW;EACXC,eAAe;EACfC,GAAG;EACHC,GAAG;EACHC;AAMD,CAAC,EAAG;EACH,OAAO,IAAAC,gBAAO,EAAE,MAAM;IACrB,IAAK,CAAEL,WAAW,IAAI,CAAED,QAAQ,EAAEO,IAAI,EAAG;MACxC;IACD;IAEA,IAAIC,gBAAuC;IAC3C,IAAIC,iBAAuD;;IAE3D;IACA,IAAKR,WAAW,GAAGD,QAAQ,CAACO,IAAI,EAAG;MAAA,IAAAG,YAAA;MAClCF,gBAAgB,GAAG;QAClBD,IAAI,EAAEN,WAAW;QACjBU,EAAE,EAAEX,QAAQ,CAACO;MACd,CAAC;MAEDE,iBAAiB,GAAG;QACnBF,IAAI,EAAEN,WAAW;QACjBU,EAAE,GAAAD,YAAA,GAAEV,QAAQ,CAACW,EAAE,cAAAD,YAAA,cAAAA,YAAA,GAAIV,QAAQ,CAACO;MAC7B,CAAC;IACF,CAAC,MAAM,IACNP,QAAQ,CAACW,EAAE,IACXV,WAAW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EAErB,oBACC,IAAArC,WAAA,CAAA0C,GAAA,EAACjD,eAAA,CAAAkD,SAAS;IAAA,GACJC,uBAAY;IAAA,GACZjB,iBAAiB;IAAA,GACjBD,KAAK;IACVG,IAAI,EAAC,OAAO;IACZP,cAAc,EAAG,IAAAuB,yBAAmB,EAAEvB,cAAe,CAAG;IACxDf,QAAQ,EAAGA,QAAU;IACrBH,eAAe,EAAGA,eAAiB;IACnCC,GAAG,EAAGA,GAAK;IACXC,GAAG,EAAGA,GAAK;IACXJ,QAAQ,EAAGA,QAAU;IACrBmB,QAAQ,EAAGS,WAAa;IACxBgB,eAAe,EAAKC,IAAI,IAAMZ,cAAc,CAAEY,IAAK,CAAG;IACtDC,eAAe,EAAGA,CAAA,KAAMb,cAAc,CAAEpB,SAAU,CAAG;IACrDuB,SAAS,EAAGA,SAAW;IACvBW,mBAAmB,EAAGC;EAAqB,CAC3C,CAAC;AAEJ,CAAC;AAACC,OAAA,CAAAjC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_dateFns","require","_reactDayPicker","_locale","_element","_constants","_misc","_hooks","_useLocalizationProps","_jsxRuntime","usePreviewRange","selected","hoveredDate","excludeDisabled","min","max","disabled","useMemo","from","previewHighlight","potentialNewRange","_selected$to","to","_selected$to2","undefined","differenceInCalendarDays","rangeContainsModifiers","DateRangeCalendar","defaultSelected","selectedProp","onSelect","numberOfMonths","locale","enUS","timeZone","props","localizationProps","useLocalizationProps","mode","onChange","useCallback","triggerDate","modifiers","e","setSelected","useControlledValue","defaultValue","value","setHoveredDate","useState","previewRange","preview","preview_start","preview_end","jsx","DayPicker","COMMON_PROPS","clampNumberOfMonths","onDayMouseEnter","date","onDayMouseLeave","modifiersClassNames","MODIFIER_CLASSNAMES","exports"],"sources":["@wordpress/components/src/calendar/date-range-calendar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { differenceInCalendarDays } from 'date-fns';\nimport { DayPicker, rangeContainsModifiers } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState, useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS, MODIFIER_CLASSNAMES } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../../utils/hooks';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport type {\n\tDateRangeCalendarProps,\n\tDateRange,\n\tOnSelectHandler,\n} from '../types';\n\nexport function usePreviewRange( {\n\tselected,\n\thoveredDate,\n\texcludeDisabled,\n\tmin,\n\tmax,\n\tdisabled,\n}: Pick<\n\tDateRangeCalendarProps,\n\t'selected' | 'excludeDisabled' | 'min' | 'max' | 'disabled'\n> & {\n\thoveredDate: Date | undefined;\n} ) {\n\treturn useMemo( () => {\n\t\tif ( ! hoveredDate || ! selected?.from ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet previewHighlight: DateRange | undefined;\n\t\tlet potentialNewRange: { from: Date; to: Date } | undefined;\n\n\t\t// Hovering on a date before the start of the selected range\n\t\tif ( hoveredDate < selected.from ) {\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: selected.from,\n\t\t\t};\n\n\t\t\tpotentialNewRange = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: selected.to ?? selected.from,\n\t\t\t};\n\t\t} else if (\n\t\t\tselected.to &&\n\t\t\thoveredDate > selected.from &&\n\t\t\thoveredDate < selected.to\n\t\t) {\n\t\t\t// Hovering on a date between the start and end of the selected range\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: selected.from,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\n\t\t\tpotentialNewRange = {\n\t\t\t\tfrom: selected.from,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t} else if ( hoveredDate > selected.from ) {\n\t\t\t// Hovering on a date after the end of the selected range (either\n\t\t\t// because it's greater than selected.to, or because it's not defined)\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: selected.to ?? selected.from,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\n\t\t\tpotentialNewRange = {\n\t\t\t\tfrom: selected.from,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t}\n\n\t\tif (\n\t\t\tmin !== undefined &&\n\t\t\tmin > 0 &&\n\t\t\tpotentialNewRange &&\n\t\t\tdifferenceInCalendarDays(\n\t\t\t\tpotentialNewRange.to,\n\t\t\t\tpotentialNewRange.from\n\t\t\t) < min\n\t\t) {\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t}\n\n\t\tif (\n\t\t\tmax !== undefined &&\n\t\t\tmax > 0 &&\n\t\t\tpotentialNewRange &&\n\t\t\tdifferenceInCalendarDays(\n\t\t\t\tpotentialNewRange.to,\n\t\t\t\tpotentialNewRange.from\n\t\t\t) > max\n\t\t) {\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t}\n\n\t\tif (\n\t\t\texcludeDisabled &&\n\t\t\tdisabled &&\n\t\t\tpotentialNewRange &&\n\t\t\trangeContainsModifiers( potentialNewRange, disabled )\n\t\t) {\n\t\t\tpreviewHighlight = {\n\t\t\t\tfrom: hoveredDate,\n\t\t\t\tto: hoveredDate,\n\t\t\t};\n\t\t}\n\n\t\treturn previewHighlight;\n\t}, [ selected, hoveredDate, excludeDisabled, min, max, disabled ] );\n}\n\n/**\n * `DateRangeCalendar` is a React component that provides a customizable calendar\n * interface for **date range** selection.\n *\n * The component is built with accessibility in mind and follows ARIA best\n * practices for calendar widgets. It provides keyboard navigation, screen reader\n * support, and customizable labels for internationalization.\n */\nexport const DateRangeCalendar = ( {\n\tdefaultSelected,\n\tselected: selectedProp,\n\tonSelect,\n\tnumberOfMonths = 1,\n\texcludeDisabled,\n\tmin,\n\tmax,\n\tdisabled,\n\tlocale = enUS,\n\ttimeZone,\n\t...props\n}: DateRangeCalendarProps ) => {\n\tconst localizationProps = useLocalizationProps( {\n\t\tlocale,\n\t\ttimeZone,\n\t\tmode: 'range',\n\t} );\n\n\tconst onChange: OnSelectHandler< typeof selectedProp > = useCallback(\n\t\t( selected, triggerDate, modifiers, e ) => {\n\t\t\t// Convert internal `null` to `undefined` for the public event handler.\n\t\t\tonSelect?.( selected ?? undefined, triggerDate, modifiers, e );\n\t\t},\n\t\t[ onSelect ]\n\t);\n\n\tconst [ selected, setSelected ] = useControlledValue< typeof selectedProp >(\n\t\t{\n\t\t\tdefaultValue: defaultSelected,\n\t\t\tvalue: selectedProp,\n\t\t\tonChange,\n\t\t}\n\t);\n\n\tconst [ hoveredDate, setHoveredDate ] = useState< Date | undefined >(\n\t\tundefined\n\t);\n\n\t// Compute the preview range for hover effect\n\tconst previewRange = usePreviewRange( {\n\t\tselected,\n\t\thoveredDate,\n\t\texcludeDisabled,\n\t\tmin,\n\t\tmax,\n\t\tdisabled,\n\t} );\n\n\tconst modifiers = useMemo( () => {\n\t\treturn {\n\t\t\tpreview: previewRange,\n\t\t\tpreview_start: previewRange?.from,\n\t\t\tpreview_end: previewRange?.to,\n\t\t};\n\t}, [ previewRange ] );\n\n\treturn (\n\t\t<DayPicker\n\t\t\t{ ...COMMON_PROPS }\n\t\t\t{ ...localizationProps }\n\t\t\t{ ...props }\n\t\t\tmode=\"range\"\n\t\t\tnumberOfMonths={ clampNumberOfMonths( numberOfMonths ) }\n\t\t\tdisabled={ disabled }\n\t\t\texcludeDisabled={ excludeDisabled }\n\t\t\tmin={ min }\n\t\t\tmax={ max }\n\t\t\tselected={ selected ?? undefined }\n\t\t\tonSelect={ setSelected }\n\t\t\tonDayMouseEnter={ ( date ) => setHoveredDate( date ) }\n\t\t\tonDayMouseLeave={ () => setHoveredDate( undefined ) }\n\t\t\tmodifiers={ modifiers }\n\t\t\tmodifiersClassNames={ MODIFIER_CLASSNAMES }\n\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AC5B,CAAC;EACF,CAAC,EAAE,CAAE4B,YAAY,CAAG,CAAC;EAErB,oBACC,IAAAzC,WAAA,CAAA6C,GAAA,EAACpD,eAAA,CAAAqD,SAAS;IAAA,GACJC,uBAAY;IAAA,GACZpB,iBAAiB;IAAA,GACjBD,KAAK;IACVG,IAAI,EAAC,OAAO;IACZP,cAAc,EAAG,IAAA0B,yBAAmB,EAAE1B,cAAe,CAAG;IACxDf,QAAQ,EAAGA,QAAU;IACrBH,eAAe,EAAGA,eAAiB;IACnCC,GAAG,EAAGA,GAAK;IACXC,GAAG,EAAGA,GAAK;IACXJ,QAAQ,EAAGA,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAIa,SAAW;IAClCM,QAAQ,EAAGc,WAAa;IACxBc,eAAe,EAAKC,IAAI,IAAMX,cAAc,CAAEW,IAAK,CAAG;IACtDC,eAAe,EAAGA,CAAA,KAAMZ,cAAc,CAAExB,SAAU,CAAG;IACrDkB,SAAS,EAAGA,SAAW;IACvBmB,mBAAmB,EAAGC;EAAqB,CAC3C,CAAC;AAEJ,CAAC;AAACC,OAAA,CAAApC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/components/src/calendar/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { Locale } from 'date-fns';\nimport type * as React from 'react';\n\n/**\n * Represents the modifiers that match a specific day in the calendar.\n * @example\n * const modifiers: Modifiers = {\n * today: false, // the day is not today\n * selected: true, // the day is selected\n * disabled: false, // the day is not disabled\n * outside: false, // the day is not outside the month\n * focused: false, // the day is not focused\n *\n * weekend: false // custom modifier example for matching a weekend\n * booked: true // custom modifier example for matching a booked day\n * available: false // custom modifier example for matching an available day\n * };\n */\nexport type Modifiers = Record< string, boolean >;\n\n/**\n * A value or a function that matches a specific day.\n * @example\n * // will always match the day\n * const booleanMatcher: Matcher = true;\n *\n * // will match the today's date\n * const dateMatcher: Matcher = new Date();\n *\n * // will match the days in the array\n * const arrayMatcher: Matcher = [\n * new Date(2019, 1, 2),\n * new Date(2019, 1, 4)\n * ];\n *\n * // will match days after the 2nd of February 2019\n * const afterMatcher: DateAfter = { after: new Date(2019, 1, 2) };\n *\n * // will match days before the 2nd of February 2019 }\n * const beforeMatcher: DateBefore = { before: new Date(2019, 1, 2) };\n *\n * // will match Sundays\n * const dayOfWeekMatcher: DayOfWeek = {\n * dayOfWeek: 0\n * };\n *\n * // will match the included days, except the two dates\n * const intervalMatcher: DateInterval = {\n * after: new Date(2019, 1, 2),\n * before: new Date(2019, 1, 5)\n * };\n *\n * // will match the included days, including the two dates\n * const rangeMatcher: DateRange = {\n * from: new Date(2019, 1, 2),\n * to: new Date(2019, 1, 5)\n * };\n *\n * // will match when the function return true\n * const functionMatcher: Matcher = (day: Date) => {\n * return day.getMonth() === 2; // match when month is March\n * };\n */\ntype Matcher =\n\t| boolean\n\t| ( ( date: Date ) => boolean )\n\t| Date\n\t| Date[]\n\t| DateRange\n\t| DateBefore\n\t| DateAfter\n\t| DateInterval\n\t| DayOfWeek;\n/**\n * Match a day falling after the specified date, with the date not included.\n * @example\n * // Match days after the 2nd of February 2019\n * const matcher: DateAfter = { after: new Date(2019, 1, 2) };\n */\ntype DateAfter = {\n\tafter: Date;\n};\n/**\n * Match a day falling before the specified date, with the date not included.\n * @example\n * // Match days before the 2nd of February 2019\n * const matcher: DateBefore = { before: new Date(2019, 1, 2) };\n */\ntype DateBefore = {\n\tbefore: Date;\n};\n/**\n * An interval of dates. Differently from `DateRange`, the range ends here\n * are not included.\n * @example\n * // Match the days between the 2nd and the 5th of February 2019\n * const matcher: DateInterval = {\n * after: new Date(2019, 1, 2),\n * before: new Date(2019, 1, 5)\n * };\n */\ntype DateInterval = {\n\tbefore: Date;\n\tafter: Date;\n};\n/**\n * A range of dates. The range can be open. Differently from\n * `DateInterval`, the range ends here are included.\n * @example\n * // Match the days between the 2nd and the 5th of February 2019\n * const matcher: DateRange = {\n * from: new Date(2019, 1, 2),\n * to: new Date(2019, 1, 5)\n * };\n */\nexport type DateRange = {\n\tfrom: Date | undefined;\n\tto?: Date | undefined;\n};\n/**\n * Match dates being one of the specified days of the week (`0-6`, where `0` is\n * Sunday).\n * @example\n * // Match Sundays\n * const matcher: DayOfWeek = { dayOfWeek: 0 };\n * // Match weekends\n * const matcher: DayOfWeek = { dayOfWeek: [0, 6] };\n */\ntype DayOfWeek = {\n\tdayOfWeek: number | number[];\n};\n\n/**\n * Shared handler type for `onSelect` callback when a selection mode is set.\n * @example\n * const handleSelect: OnSelectHandler<Date> = (\n * selected,\n * triggerDate,\n * modifiers,\n * e\n * ) => {\n * console.log( \"Selected:\", selected );\n * console.log( \"Triggered by:\", triggerDate );\n * };\n * @template T - The type of the selected item.\n * @callback OnSelectHandler\n * @param {T} selected - The selected item after the event.\n * @param {Date} triggerDate - The date when the event was triggered. This is\n * typically the day clicked or interacted with.\n * @param {Modifiers} modifiers - The modifiers associated with the event.\n * @param {React.MouseEvent | React.KeyboardEvent} e - The event object.\n */\ntype OnSelectHandler< T > = (\n\tselected: T,\n\ttriggerDate: Date,\n\tmodifiers: Modifiers,\n\te: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface BaseProps\n\textends Omit<\n\t\tReact.HTMLAttributes< HTMLDivElement >,\n\t\t'onSelect' | 'defaultValue'\n\t> {\n\t/**\n\t * Whether the selection is required.\n\t * When `true`, there always needs to be a date selected.\n\t * @default false\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * The initial month to show in the calendar view (uncontrolled).\n\t * @default The current month\n\t */\n\tdefaultMonth?: Date;\n\t/**\n\t * The month displayed in the calendar view (controlled). Use together with\n\t * `onMonthChange` to change the month programmatically.\n\t */\n\tmonth?: Date;\n\t/**\n\t * The number of months displayed at once.\n\t * @default 1\n\t */\n\tnumberOfMonths?: number;\n\t/**\n\t * The earliest month to start the month navigation.\n\t */\n\tstartMonth?: Date;\n\t/**\n\t * The latest month to end the month navigation.\n\t */\n\tendMonth?: Date;\n\t/**\n\t * Focus the first selected day (if set) or today's date (if not disabled).\n\t *\n\t * Use this prop when you need to focus the calendar after a user action\n\t * (e.g. opening the dialog with the calendar).\n\t */\n\tautoFocus?: boolean;\n\t/**\n\t * Specify which days are disabled. Using `true` will disable all dates.\n\t */\n\tdisabled?: Matcher | Matcher[] | undefined;\n\t/**\n\t * Disable the navigation buttons.\n\t */\n\tdisableNavigation?: boolean;\n\t/**\n\t * Use custom labels, useful for translating the component.\n\t *\n\t * For a correct localized experience, consumers should make sure the locale\n\t * used for the translated labels and `locale` prop are consistent.\n\t */\n\tlabels?: {\n\t\t/**\n\t\t * The label for the navigation toolbar.\n\t\t * @default \"\"\n\t\t */\n\t\tlabelNav?: () => string;\n\t\t/**\n\t\t * The label for the month grid.\n\t\t * @default \"LLLL y\" (e.g. \"November 2022\")\n\t\t */\n\t\tlabelGrid?: ( date: Date ) => string;\n\t\t/**\n\t\t * The label for the gridcell, when the calendar is not interactive.\n\t\t * @default The formatted date.\n\t\t */\n\t\tlabelGridcell?: ( date: Date, modifiers?: Modifiers ) => string;\n\t\t/**\n\t\t * The label for the \"next month\" button.\n\t\t * @default \"Go to the Next Month\"\n\t\t */\n\t\tlabelNext?: ( month: Date | undefined ) => string;\n\t\t/**\n\t\t * The label for the \"previous month\" button.\n\t\t * @default \"Go to the Previous Month\"\n\t\t */\n\t\tlabelPrevious?: ( month: Date | undefined ) => string;\n\t\t/**\n\t\t * The label for the day button.\n\t\t * @default The formatted date.\n\t\t */\n\t\tlabelDayButton?: ( date: Date, modifiers?: Modifiers ) => string;\n\t\t/**\n\t\t * The label for the weekday.\n\t\t * @default ( date: Date ) => \"Monday\" | \"Tuesday\" | \"Wednesday\" | \"Thursday\" | \"Friday\" | \"Saturday\" | \"Sunday\"\n\t\t */\n\t\tlabelWeekday?: ( date: Date ) => string;\n\t};\n\n\t/**\n\t * The locale object used to localize dates. Pass a locale from\n\t * `@date-fns/locale` to localize the calendar.\n\t *\n\t * For a correct localized experience, consumers should make sure the locale\n\t * used for the translated labels and `locale` prop are consistent.\n\t * @see https://github.com/date-fns/date-fns/tree/main/src/locale for a list of the supported locales\n\t * @default The `enUS` locale from `@date-fns/locale`\n\t */\n\tlocale?: Locale;\n\t/**\n\t * The index of the first day of the week (0 - Sunday). Overrides the locale's\n\t * one.\n\t * @default Based on the `locale` prop\n\t */\n\tweekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;\n\t/**\n\t * Event fired when the user navigates between months.\n\t */\n\tonMonthChange?: ( month: Date ) => void;\n\t/**\n\t * The time zone (IANA or UTC offset) to use in the calendar.\n\t *\n\t * See\n\t * [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)\n\t * for the possible values.\n\t *\n\t * When working with time zones, use the `TZDate` object exported by this\n\t * package instead of the native `Date` object.\n\t * @example\n\t * import { DateCalendar, TZDate } from \"@automattic/components\";\n\t *\n\t * export function WithTimeZone() {\n\t * const timeZone = \"America/New_York\";\n\t * const [ selected, setSelected ] = useState< Date | undefined >(\n\t * new TZDate( 2024, 12, 10, timeZone ) // Use `TZDate` instead of `Date`\n\t * );\n\t * return (\n\t * <DateCalendar\n\t * timeZone={ timeZone }\n\t * selected={ selected }\n\t * onSelect={ setSelected }\n\t * />\n\t * );\n\t * }\n\t */\n\ttimeZone?: string;\n\t/**\n\t * The role attribute to add to the container element.\n\t * @default 'application'\n\t */\n\trole?: 'application' | 'dialog' | undefined;\n}\n\ninterface SingleProps {\n\t/** The selected date. */\n\tselected?: Date | undefined | null;\n\t/** Event handler when a day is selected. */\n\tonSelect?: OnSelectHandler< Date | undefined >;\n\t/** The default selected date (for uncontrolled usage). */\n\tdefaultSelected?: Date;\n}\n\ninterface RangeProps {\n\t/**\n\t * When `true`, the range will reset when including a disabled day.\n\t */\n\texcludeDisabled?: boolean;\n\t/**\n\t * The minimum number of nights to include in the range.\n\t */\n\tmin?: number;\n\t/**\n\t * The maximum number of nights to include in the range.\n\t */\n\tmax?: number;\n\t/** The selected range. */\n\tselected?: DateRange | undefined | null;\n\t/** Event handler when the selection changes. */\n\tonSelect?: OnSelectHandler< DateRange | undefined >;\n\t/** The default selected range (for uncontrolled usage). */\n\tdefaultSelected?: DateRange;\n}\n\nexport type DateCalendarProps = BaseProps & SingleProps;\nexport type DateRangeCalendarProps = BaseProps & RangeProps;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/components/src/calendar/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { Locale } from 'date-fns';\nimport type * as React from 'react';\n\n/**\n * Represents the modifiers that match a specific day in the calendar.\n * @example\n * const modifiers: Modifiers = {\n * today: false, // the day is not today\n * selected: true, // the day is selected\n * disabled: false, // the day is not disabled\n * outside: false, // the day is not outside the month\n * focused: false, // the day is not focused\n *\n * weekend: false // custom modifier example for matching a weekend\n * booked: true // custom modifier example for matching a booked day\n * available: false // custom modifier example for matching an available day\n * };\n */\nexport type Modifiers = Record< string, boolean >;\n\n/**\n * A value or a function that matches a specific day.\n * @example\n * // will always match the day\n * const booleanMatcher: Matcher = true;\n *\n * // will match the today's date\n * const dateMatcher: Matcher = new Date();\n *\n * // will match the days in the array\n * const arrayMatcher: Matcher = [\n * new Date(2019, 1, 2),\n * new Date(2019, 1, 4)\n * ];\n *\n * // will match days after the 2nd of February 2019\n * const afterMatcher: DateAfter = { after: new Date(2019, 1, 2) };\n *\n * // will match days before the 2nd of February 2019 }\n * const beforeMatcher: DateBefore = { before: new Date(2019, 1, 2) };\n *\n * // will match Sundays\n * const dayOfWeekMatcher: DayOfWeek = {\n * dayOfWeek: 0\n * };\n *\n * // will match the included days, except the two dates\n * const intervalMatcher: DateInterval = {\n * after: new Date(2019, 1, 2),\n * before: new Date(2019, 1, 5)\n * };\n *\n * // will match the included days, including the two dates\n * const rangeMatcher: DateRange = {\n * from: new Date(2019, 1, 2),\n * to: new Date(2019, 1, 5)\n * };\n *\n * // will match when the function return true\n * const functionMatcher: Matcher = (day: Date) => {\n * return day.getMonth() === 2; // match when month is March\n * };\n */\ntype Matcher =\n\t| boolean\n\t| ( ( date: Date ) => boolean )\n\t| Date\n\t| Date[]\n\t| DateRange\n\t| DateBefore\n\t| DateAfter\n\t| DateInterval\n\t| DayOfWeek;\n/**\n * Match a day falling after the specified date, with the date not included.\n * @example\n * // Match days after the 2nd of February 2019\n * const matcher: DateAfter = { after: new Date(2019, 1, 2) };\n */\ntype DateAfter = {\n\tafter: Date;\n};\n/**\n * Match a day falling before the specified date, with the date not included.\n * @example\n * // Match days before the 2nd of February 2019\n * const matcher: DateBefore = { before: new Date(2019, 1, 2) };\n */\ntype DateBefore = {\n\tbefore: Date;\n};\n/**\n * An interval of dates. Differently from `DateRange`, the range ends here\n * are not included.\n * @example\n * // Match the days between the 2nd and the 5th of February 2019\n * const matcher: DateInterval = {\n * after: new Date(2019, 1, 2),\n * before: new Date(2019, 1, 5)\n * };\n */\ntype DateInterval = {\n\tbefore: Date;\n\tafter: Date;\n};\n/**\n * A range of dates. The range can be open. Differently from\n * `DateInterval`, the range ends here are included.\n * @example\n * // Match the days between the 2nd and the 5th of February 2019\n * const matcher: DateRange = {\n * from: new Date(2019, 1, 2),\n * to: new Date(2019, 1, 5)\n * };\n */\nexport type DateRange = {\n\tfrom: Date | undefined;\n\tto?: Date | undefined;\n};\n/**\n * Match dates being one of the specified days of the week (`0-6`, where `0` is\n * Sunday).\n * @example\n * // Match Sundays\n * const matcher: DayOfWeek = { dayOfWeek: 0 };\n * // Match weekends\n * const matcher: DayOfWeek = { dayOfWeek: [0, 6] };\n */\ntype DayOfWeek = {\n\tdayOfWeek: number | number[];\n};\n\n/**\n * Shared handler type for `onSelect` callback when a selection mode is set.\n * @example\n * const handleSelect: OnSelectHandler<Date> = (\n * selected,\n * triggerDate,\n * modifiers,\n * e\n * ) => {\n * console.log( \"Selected:\", selected );\n * console.log( \"Triggered by:\", triggerDate );\n * };\n * @template T - The type of the selected item.\n * @callback OnSelectHandler\n * @param {T} selected - The selected item after the event.\n * @param {Date} triggerDate - The date when the event was triggered. This is\n * typically the day clicked or interacted with.\n * @param {Modifiers} modifiers - The modifiers associated with the event.\n * @param {React.MouseEvent | React.KeyboardEvent} e - The event object.\n */\nexport type OnSelectHandler< T > = (\n\tselected: T,\n\ttriggerDate: Date,\n\tmodifiers: Modifiers,\n\te: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface BaseProps\n\textends Omit<\n\t\tReact.HTMLAttributes< HTMLDivElement >,\n\t\t'onSelect' | 'defaultValue'\n\t> {\n\t/**\n\t * Whether the selection is required.\n\t * When `true`, there always needs to be a date selected.\n\t * @default false\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * The initial month to show in the calendar view (uncontrolled).\n\t * @default The current month\n\t */\n\tdefaultMonth?: Date;\n\t/**\n\t * The month displayed in the calendar view (controlled). Use together with\n\t * `onMonthChange` to change the month programmatically.\n\t */\n\tmonth?: Date;\n\t/**\n\t * The number of months displayed at once.\n\t * @default 1\n\t */\n\tnumberOfMonths?: number;\n\t/**\n\t * The earliest month to start the month navigation.\n\t */\n\tstartMonth?: Date;\n\t/**\n\t * The latest month to end the month navigation.\n\t */\n\tendMonth?: Date;\n\t/**\n\t * Focus the first selected day (if set) or today's date (if not disabled).\n\t *\n\t * Use this prop when you need to focus the calendar after a user action\n\t * (e.g. opening the dialog with the calendar).\n\t */\n\tautoFocus?: boolean;\n\t/**\n\t * Specify which days are disabled. Using `true` will disable all dates.\n\t */\n\tdisabled?: Matcher | Matcher[] | undefined;\n\t/**\n\t * Disable the navigation buttons.\n\t */\n\tdisableNavigation?: boolean;\n\t/**\n\t * Use custom labels, useful for translating the component.\n\t *\n\t * For a correct localized experience, consumers should make sure the locale\n\t * used for the translated labels and `locale` prop are consistent.\n\t */\n\tlabels?: {\n\t\t/**\n\t\t * The label for the navigation toolbar.\n\t\t * @default \"\"\n\t\t */\n\t\tlabelNav?: () => string;\n\t\t/**\n\t\t * The label for the month grid.\n\t\t * @default \"LLLL y\" (e.g. \"November 2022\")\n\t\t */\n\t\tlabelGrid?: ( date: Date ) => string;\n\t\t/**\n\t\t * The label for the gridcell, when the calendar is not interactive.\n\t\t * @default The formatted date.\n\t\t */\n\t\tlabelGridcell?: ( date: Date, modifiers?: Modifiers ) => string;\n\t\t/**\n\t\t * The label for the \"next month\" button.\n\t\t * @default \"Go to the Next Month\"\n\t\t */\n\t\tlabelNext?: ( month: Date | undefined ) => string;\n\t\t/**\n\t\t * The label for the \"previous month\" button.\n\t\t * @default \"Go to the Previous Month\"\n\t\t */\n\t\tlabelPrevious?: ( month: Date | undefined ) => string;\n\t\t/**\n\t\t * The label for the day button.\n\t\t * @default The formatted date.\n\t\t */\n\t\tlabelDayButton?: ( date: Date, modifiers?: Modifiers ) => string;\n\t\t/**\n\t\t * The label for the weekday.\n\t\t * @default ( date: Date ) => \"Monday\" | \"Tuesday\" | \"Wednesday\" | \"Thursday\" | \"Friday\" | \"Saturday\" | \"Sunday\"\n\t\t */\n\t\tlabelWeekday?: ( date: Date ) => string;\n\t};\n\n\t/**\n\t * The locale object used to localize dates. Pass a locale from\n\t * `@date-fns/locale` to localize the calendar.\n\t *\n\t * For a correct localized experience, consumers should make sure the locale\n\t * used for the translated labels and `locale` prop are consistent.\n\t * @see https://github.com/date-fns/date-fns/tree/main/src/locale for a list of the supported locales\n\t * @default The `enUS` locale from `@date-fns/locale`\n\t */\n\tlocale?: Locale;\n\t/**\n\t * The index of the first day of the week (0 - Sunday). Overrides the locale's\n\t * one.\n\t * @default Based on the `locale` prop\n\t */\n\tweekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;\n\t/**\n\t * Event fired when the user navigates between months.\n\t */\n\tonMonthChange?: ( month: Date ) => void;\n\t/**\n\t * The time zone (IANA or UTC offset) to use in the calendar.\n\t *\n\t * See\n\t * [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)\n\t * for the possible values.\n\t *\n\t * When working with time zones, use the `TZDate` object exported by this\n\t * package instead of the native `Date` object.\n\t * @example\n\t * import { DateCalendar, TZDate } from \"@wordpress/components\";\n\t *\n\t * export function WithTimeZone() {\n\t * const timeZone = \"America/New_York\";\n\t * const [ selected, setSelected ] = useState< Date | undefined >(\n\t * new TZDate( 2024, 12, 10, timeZone ) // Use `TZDate` instead of `Date`\n\t * );\n\t * return (\n\t * <DateCalendar\n\t * timeZone={ timeZone }\n\t * selected={ selected }\n\t * onSelect={ setSelected }\n\t * />\n\t * );\n\t * }\n\t */\n\ttimeZone?: string;\n\t/**\n\t * The role attribute to add to the container element.\n\t * @default 'application'\n\t */\n\trole?: 'application' | 'dialog' | undefined;\n}\n\ninterface SingleProps {\n\t/** The selected date. */\n\tselected?: Date | undefined | null;\n\t/** Event handler when a day is selected. */\n\tonSelect?: OnSelectHandler< Date | undefined >;\n\t/** The default selected date (for uncontrolled usage). */\n\tdefaultSelected?: Date;\n}\n\ninterface RangeProps {\n\t/**\n\t * When `true`, the range will reset when including a disabled day.\n\t */\n\texcludeDisabled?: boolean;\n\t/**\n\t * The minimum number of nights to include in the range.\n\t */\n\tmin?: number;\n\t/**\n\t * The maximum number of nights to include in the range.\n\t */\n\tmax?: number;\n\t/** The selected range. */\n\tselected?: DateRange | undefined | null;\n\t/** Event handler when the selection changes. */\n\tonSelect?: OnSelectHandler< DateRange | undefined >;\n\t/** The default selected range (for uncontrolled usage). */\n\tdefaultSelected?: DateRange;\n}\n\nexport type DateCalendarProps = BaseProps & SingleProps;\nexport type DateRangeCalendarProps = BaseProps & RangeProps;\n"],"mappings":"","ignoreList":[]}
|
package/build/icon/index.js
CHANGED
package/build/icon/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_primitives","_dashicon","_interopRequireDefault","_jsxRuntime","Icon","icon","size","additionalProps","jsx","default","isValidElement","Dashicon","type","cloneElement","createElement","SVG","appliedProps","props","width","height","_default","exports"],"sources":["@wordpress/components/src/icon/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType =\n\t| DashiconIconKey\n\t| ComponentType< { size?: number } >\n\t| ( ( props: { size?: number } ) => JSX.Element )\n\t| JSX.Element;\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props = {\n\t/**\n\t * The icon to render. In most cases, you should use an icon from\n\t * [the `@wordpress/icons` package](https://wordpress.github.io/gutenberg/?path=/story/icons-icon--library).\n\t *\n\t * Other supported values are: component instances, functions,\n\t * [Dashicons](https://developer.wordpress.org/resource/dashicons/)\n\t * (specified as strings), and `null`.\n\t *\n\t * The `size` value, as well as any other additional props, will be passed through.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * Defaults to `20` when `icon` is a string (i.e. a Dashicon id), otherwise `24`.\n\t *\n\t * @default `'string' === typeof icon ? 20 : 24`.\n\t */\n\tsize?: number;\n} & AdditionalProps< IconType >;\n\n/**\n * Renders a raw icon without any initial styling or wrappers.\n *\n * ```jsx\n * import { wordpress } from '@wordpress/icons';\n *\n * <Icon icon={ wordpress } />\n * ```\n */\nfunction Icon( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\treturn createElement( icon, {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,IAAAI,WAAA,GAAAJ,OAAA;AAlBnC;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAwCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,IAAIA,CAAE;EACdC,IAAI,GAAG,IAAI;EACXC,IAAI,GAAG,QAAQ,KAAK,OAAOD,IAAI,GAAG,EAAE,GAAG,EAAE;EACzC,GAAGE;AACG,CAAC,EAAG;EACV,IAAK,QAAQ,KAAK,OAAOF,IAAI,EAAG;IAC/B,oBACC,IAAAF,WAAA,CAAAK,GAAA,EAACP,SAAA,CAAAQ,OAAQ;MACRJ,IAAI,EAAGA,IAAM;MACbC,IAAI,EAAGA,IAAM;MAAA,GACNC;IAAe,CACtB,CAAC;EAEJ;EAEA,IAAK,IAAAG,uBAAc,EAAEL,IAAK,CAAC,IAAIM,iBAAQ,KAAKN,IAAI,CAACO,IAAI,EAAG;IACvD,OAAO,IAAAC,qBAAY,EAAER,IAAI,EAAE;MAC1B,GAAGE;IACJ,CAAE,CAAC;EACJ;EAEA,IAAK,UAAU,KAAK,OAAOF,IAAI,EAAG;IACjC,OAAO,IAAAS,sBAAa,EAAET,IAAI,EAAE;MAC3BC,IAAI;MACJ,GAAGC;IACJ,CAAE,CAAC;EACJ;EAEA,IAAKF,IAAI,KAAMA,IAAI,CAACO,IAAI,KAAK,KAAK,IAAIP,IAAI,CAACO,IAAI,KAAKG,eAAG,CAAE,EAAG;IAC3D,MAAMC,YAAY,GAAG;MACpB,GAAGX,IAAI,CAACY,KAAK;MACbC,KAAK,EAAEZ,IAAI;MACXa,MAAM,EAAEb,IAAI;MACZ,GAAGC;IACJ,CAAC;IAED,oBAAO,IAAAJ,WAAA,CAAAK,GAAA,EAACR,WAAA,CAAAe,GAAG;MAAA,GAAMC;IAAY,CAAI,CAAC;EACnC;EAEA,IAAK,IAAAN,uBAAc,EAAEL,IAAK,CAAC,EAAG;IAC7B,OAAO,IAAAQ,qBAAY,EAAER,IAAI,EAAE;MAC1B;MACAC,IAAI;
|
|
1
|
+
{"version":3,"names":["_element","require","_primitives","_dashicon","_interopRequireDefault","_jsxRuntime","Icon","icon","size","additionalProps","jsx","default","isValidElement","Dashicon","type","cloneElement","createElement","SVG","appliedProps","props","width","height","_default","exports"],"sources":["@wordpress/components/src/icon/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType =\n\t| DashiconIconKey\n\t| ComponentType< { size?: number } >\n\t| ( ( props: { size?: number } ) => JSX.Element )\n\t| JSX.Element;\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props = {\n\t/**\n\t * The icon to render. In most cases, you should use an icon from\n\t * [the `@wordpress/icons` package](https://wordpress.github.io/gutenberg/?path=/story/icons-icon--library).\n\t *\n\t * Other supported values are: component instances, functions,\n\t * [Dashicons](https://developer.wordpress.org/resource/dashicons/)\n\t * (specified as strings), and `null`.\n\t *\n\t * The `size` value, as well as any other additional props, will be passed through.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * Defaults to `20` when `icon` is a string (i.e. a Dashicon id), otherwise `24`.\n\t *\n\t * @default `'string' === typeof icon ? 20 : 24`.\n\t */\n\tsize?: number;\n} & AdditionalProps< IconType >;\n\n/**\n * Renders a raw icon without any initial styling or wrappers.\n *\n * ```jsx\n * import { wordpress } from '@wordpress/icons';\n *\n * <Icon icon={ wordpress } />\n * ```\n */\nfunction Icon( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\treturn createElement( icon, {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,IAAAI,WAAA,GAAAJ,OAAA;AAlBnC;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAwCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,IAAIA,CAAE;EACdC,IAAI,GAAG,IAAI;EACXC,IAAI,GAAG,QAAQ,KAAK,OAAOD,IAAI,GAAG,EAAE,GAAG,EAAE;EACzC,GAAGE;AACG,CAAC,EAAG;EACV,IAAK,QAAQ,KAAK,OAAOF,IAAI,EAAG;IAC/B,oBACC,IAAAF,WAAA,CAAAK,GAAA,EAACP,SAAA,CAAAQ,OAAQ;MACRJ,IAAI,EAAGA,IAAM;MACbC,IAAI,EAAGA,IAAM;MAAA,GACNC;IAAe,CACtB,CAAC;EAEJ;EAEA,IAAK,IAAAG,uBAAc,EAAEL,IAAK,CAAC,IAAIM,iBAAQ,KAAKN,IAAI,CAACO,IAAI,EAAG;IACvD,OAAO,IAAAC,qBAAY,EAAER,IAAI,EAAE;MAC1B,GAAGE;IACJ,CAAE,CAAC;EACJ;EAEA,IAAK,UAAU,KAAK,OAAOF,IAAI,EAAG;IACjC,OAAO,IAAAS,sBAAa,EAAET,IAAI,EAAE;MAC3BC,IAAI;MACJ,GAAGC;IACJ,CAAE,CAAC;EACJ;EAEA,IAAKF,IAAI,KAAMA,IAAI,CAACO,IAAI,KAAK,KAAK,IAAIP,IAAI,CAACO,IAAI,KAAKG,eAAG,CAAE,EAAG;IAC3D,MAAMC,YAAY,GAAG;MACpB,GAAGX,IAAI,CAACY,KAAK;MACbC,KAAK,EAAEZ,IAAI;MACXa,MAAM,EAAEb,IAAI;MACZ,GAAGC;IACJ,CAAC;IAED,oBAAO,IAAAJ,WAAA,CAAAK,GAAA,EAACR,WAAA,CAAAe,GAAG;MAAA,GAAMC;IAAY,CAAI,CAAC;EACnC;EAEA,IAAK,IAAAN,uBAAc,EAAEL,IAAK,CAAC,EAAG;IAC7B,OAAO,IAAAQ,qBAAY,EAAER,IAAI,EAAE;MAC1B;MACAC,IAAI;MACJY,KAAK,EAAEZ,IAAI;MACXa,MAAM,EAAEb,IAAI;MACZ,GAAGC;IACJ,CAAE,CAAC;EACJ;EAEA,OAAOF,IAAI;AACZ;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAEcL,IAAI","ignoreList":[]}
|
package/build/index.js
CHANGED
|
@@ -172,24 +172,12 @@ Object.defineProperty(exports, "Dashicon", {
|
|
|
172
172
|
return _dashicon.default;
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
|
-
Object.defineProperty(exports, "DateCalendar", {
|
|
176
|
-
enumerable: true,
|
|
177
|
-
get: function () {
|
|
178
|
-
return _calendar.DateCalendar;
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
175
|
Object.defineProperty(exports, "DatePicker", {
|
|
182
176
|
enumerable: true,
|
|
183
177
|
get: function () {
|
|
184
178
|
return _dateTime.DatePicker;
|
|
185
179
|
}
|
|
186
180
|
});
|
|
187
|
-
Object.defineProperty(exports, "DateRangeCalendar", {
|
|
188
|
-
enumerable: true,
|
|
189
|
-
get: function () {
|
|
190
|
-
return _calendar.DateRangeCalendar;
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
181
|
Object.defineProperty(exports, "DateTimePicker", {
|
|
194
182
|
enumerable: true,
|
|
195
183
|
get: function () {
|
|
@@ -574,12 +562,6 @@ Object.defineProperty(exports, "Spinner", {
|
|
|
574
562
|
return _spinner.default;
|
|
575
563
|
}
|
|
576
564
|
});
|
|
577
|
-
Object.defineProperty(exports, "TZDate", {
|
|
578
|
-
enumerable: true,
|
|
579
|
-
get: function () {
|
|
580
|
-
return _calendar.TZDate;
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
565
|
Object.defineProperty(exports, "TabPanel", {
|
|
584
566
|
enumerable: true,
|
|
585
567
|
get: function () {
|
|
@@ -1187,7 +1169,6 @@ var _boxControl = _interopRequireWildcard(require("./box-control"));
|
|
|
1187
1169
|
var _button = _interopRequireDefault(require("./button"));
|
|
1188
1170
|
var _buttonGroup = _interopRequireDefault(require("./button-group"));
|
|
1189
1171
|
var _card = require("./card");
|
|
1190
|
-
var _calendar = require("./calendar");
|
|
1191
1172
|
var _checkboxControl = _interopRequireDefault(require("./checkbox-control"));
|
|
1192
1173
|
var _clipboardButton = _interopRequireDefault(require("./clipboard-button"));
|
|
1193
1174
|
var _paletteEdit = _interopRequireDefault(require("./palette-edit"));
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_primitives","require","_alignmentMatrixControl","_interopRequireDefault","_animate","_interopRequireWildcard","_animation","_anglePickerControl","_autocomplete","_baseControl","_borderBoxControl","_borderControl","_boxControl","_button","_buttonGroup","_card","_calendar","_checkboxControl","_clipboardButton","_paletteEdit","_colorIndicator","_colorPalette","_colorPicker","_comboboxControl","_legacy","_composite","_confirmDialog","_customSelectControl","_dashicon","_dateTime","_dimensionControl","_disabled","_disclosure","_divider","_draggable","_dropZone","_provider","_dropdown","_dropdownContentWrapper","_dropdownMenu","_duotonePicker","_elevation","_externalLink","_flex","_focalPointPicker","_focusableIframe","_fontSizePicker","_formFileUpload","_formToggle","_formTokenField","_gradientPicker","_customGradientPicker","_grid","_guide","_page","_heading","_hStack","_icon","_deprecated","_itemGroup","_inputControl","_inputPrefixWrapper","_inputSuffixWrapper","_keyboardShortcuts","_menuGroup","_menuItem","_menuItemsChoice","_modal","_scrollLock","_navigableContainer","_navigation","_backButton","_group","_item","_menu","_legacy2","_navigator","_notice","_numberControl","_list","_panel","_body","_header","_row","_placeholder","_popover","_progressBar","_queryControls","_radio","_radioGroup","_radioControl","_rangeControl","_resizableBox","_responsiveWrapper","_sandbox","_searchControl","_selectControl","_snackbar","_list2","_spacer","_scrollable","_spinner","_surface","_tabPanel","_text","_textControl","_textareaControl","_textHighlight","_tip","_toggleControl","_toggleGroupControl","_toolbar","_toolsPanel","_tooltip","_treeGrid","_treeSelect","_truncate","_unitControl","_view","_visuallyHidden","_vStack","_isolatedEventContainer","_slotFill","_styleProvider","_zStack","_navigateRegions","_withConstrainedTabbing","_withFallbackStyles","_withFilters","_withFocusOutside","_withFocusReturn","_withNotices","_withSpokenMessages","_privateApis","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set"],"sources":["@wordpress/components/src/index.ts"],"sourcesContent":["// Primitives.\nexport {\n\tSVG,\n\tPath,\n\tCircle,\n\tPolygon,\n\tRect,\n\tG,\n\tLine,\n\tHorizontalRule,\n\tBlockQuotation,\n} from '@wordpress/primitives';\n\n// Components.\nexport {\n\t/** @deprecated Import `AlignmentMatrixControl` instead. */\n\tdefault as __experimentalAlignmentMatrixControl,\n\tdefault as AlignmentMatrixControl,\n} from './alignment-matrix-control';\nexport {\n\tdefault as Animate,\n\tgetAnimateClassName as __unstableGetAnimateClassName,\n} from './animate';\nexport { __unstableMotion, __unstableAnimatePresence } from './animation';\nexport { default as AnglePickerControl } from './angle-picker-control';\nexport {\n\tdefault as Autocomplete,\n\tuseAutocompleteProps as __unstableUseAutocompleteProps,\n} from './autocomplete';\nexport { default as BaseControl, useBaseControlProps } from './base-control';\nexport {\n\t/** @deprecated Import `BorderBoxControl` instead. */\n\tBorderBoxControl as __experimentalBorderBoxControl,\n\tBorderBoxControl,\n\thasSplitBorders as __experimentalHasSplitBorders,\n\tisDefinedBorder as __experimentalIsDefinedBorder,\n\tisEmptyBorder as __experimentalIsEmptyBorder,\n} from './border-box-control';\nexport {\n\t/** @deprecated Import `BorderControl` instead. */\n\tBorderControl as __experimentalBorderControl,\n\tBorderControl,\n} from './border-control';\nexport {\n\t/** @deprecated Import `BoxControl` instead. */\n\tdefault as __experimentalBoxControl,\n\tdefault as BoxControl,\n\tapplyValueToSides as __experimentalApplyValueToSides,\n} from './box-control';\nexport { default as Button } from './button';\nexport { default as ButtonGroup } from './button-group';\nexport {\n\tCard,\n\tCardBody,\n\tCardDivider,\n\tCardFooter,\n\tCardHeader,\n\tCardMedia,\n} from './card';\nexport { DateCalendar, DateRangeCalendar, TZDate } from './calendar';\nexport { default as CheckboxControl } from './checkbox-control';\nexport { default as ClipboardButton } from './clipboard-button';\nexport { default as __experimentalPaletteEdit } from './palette-edit';\nexport { default as ColorIndicator } from './color-indicator';\nexport { default as ColorPalette } from './color-palette';\nexport { ColorPicker } from './color-picker';\nexport { default as ComboboxControl } from './combobox-control';\nexport {\n\tComposite as __unstableComposite,\n\tCompositeGroup as __unstableCompositeGroup,\n\tCompositeItem as __unstableCompositeItem,\n\tuseCompositeState as __unstableUseCompositeState,\n} from './composite/legacy';\nexport { Composite } from './composite';\nexport { ConfirmDialog as __experimentalConfirmDialog } from './confirm-dialog';\nexport { default as CustomSelectControl } from './custom-select-control';\nexport { default as Dashicon } from './dashicon';\nexport { default as DateTimePicker, DatePicker, TimePicker } from './date-time';\nexport { default as __experimentalDimensionControl } from './dimension-control';\nexport { default as Disabled } from './disabled';\nexport { DisclosureContent as __unstableDisclosureContent } from './disclosure';\nexport { Divider as __experimentalDivider } from './divider';\nexport { default as Draggable } from './draggable';\nexport { default as DropZone } from './drop-zone';\nexport { default as DropZoneProvider } from './drop-zone/provider';\nexport { default as Dropdown } from './dropdown';\nexport { default as __experimentalDropdownContentWrapper } from './dropdown/dropdown-content-wrapper';\nexport { default as DropdownMenu } from './dropdown-menu';\nexport { DuotoneSwatch, DuotonePicker } from './duotone-picker';\nexport { Elevation as __experimentalElevation } from './elevation';\nexport { default as ExternalLink } from './external-link';\nexport { Flex, FlexBlock, FlexItem } from './flex';\nexport { default as FocalPointPicker } from './focal-point-picker';\nexport { default as FocusableIframe } from './focusable-iframe';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as FormFileUpload } from './form-file-upload';\nexport { default as FormToggle } from './form-toggle';\nexport { default as FormTokenField } from './form-token-field';\nexport { default as GradientPicker } from './gradient-picker';\nexport { default as CustomGradientPicker } from './custom-gradient-picker';\nexport { Grid as __experimentalGrid } from './grid';\nexport { default as Guide } from './guide';\nexport { default as GuidePage } from './guide/page';\nexport { Heading as __experimentalHeading } from './heading';\nexport { HStack as __experimentalHStack } from './h-stack';\nexport { default as Icon } from './icon';\nexport type { IconType } from './icon';\nexport { default as IconButton } from './button/deprecated';\nexport {\n\tItemGroup as __experimentalItemGroup,\n\tItem as __experimentalItem,\n} from './item-group';\nexport { default as __experimentalInputControl } from './input-control';\nexport { default as __experimentalInputControlPrefixWrapper } from './input-control/input-prefix-wrapper';\nexport { default as __experimentalInputControlSuffixWrapper } from './input-control/input-suffix-wrapper';\nexport { default as KeyboardShortcuts } from './keyboard-shortcuts';\nexport { default as MenuGroup } from './menu-group';\nexport { default as MenuItem } from './menu-item';\nexport { default as MenuItemsChoice } from './menu-items-choice';\nexport { default as Modal } from './modal';\nexport { default as ScrollLock } from './scroll-lock';\nexport { NavigableMenu, TabbableContainer } from './navigable-container';\nexport { default as __experimentalNavigation } from './navigation';\nexport { default as __experimentalNavigationBackButton } from './navigation/back-button';\nexport { default as __experimentalNavigationGroup } from './navigation/group';\nexport { default as __experimentalNavigationItem } from './navigation/item';\nexport { default as __experimentalNavigationMenu } from './navigation/menu';\nexport {\n\t/** @deprecated Import `Navigator` instead. */\n\tNavigatorProvider as __experimentalNavigatorProvider,\n\t/** @deprecated Import `Navigator` and use `Navigator.Screen` instead. */\n\tNavigatorScreen as __experimentalNavigatorScreen,\n\t/** @deprecated Import `Navigator` and use `Navigator.Button` instead. */\n\tNavigatorButton as __experimentalNavigatorButton,\n\t/** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */\n\tNavigatorBackButton as __experimentalNavigatorBackButton,\n\t/** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */\n\tNavigatorToParentButton as __experimentalNavigatorToParentButton,\n} from './navigator/legacy';\nexport {\n\tNavigator,\n\tuseNavigator,\n\t/** @deprecated Import `useNavigator` instead. */\n\tuseNavigator as __experimentalUseNavigator,\n} from './navigator';\nexport { default as Notice } from './notice';\nexport { default as __experimentalNumberControl } from './number-control';\nexport { default as NoticeList } from './notice/list';\nexport { default as Panel } from './panel';\nexport { default as PanelBody } from './panel/body';\nexport { default as PanelHeader } from './panel/header';\nexport { default as PanelRow } from './panel/row';\nexport { default as Placeholder } from './placeholder';\nexport { default as Popover } from './popover';\nexport { default as ProgressBar } from './progress-bar';\nexport { default as QueryControls } from './query-controls';\nexport { default as __experimentalRadio } from './radio-group/radio';\nexport { default as __experimentalRadioGroup } from './radio-group';\nexport { default as RadioControl } from './radio-control';\nexport { default as RangeControl } from './range-control';\nexport { default as ResizableBox } from './resizable-box';\nexport { default as ResponsiveWrapper } from './responsive-wrapper';\nexport { default as SandBox } from './sandbox';\nexport { default as SearchControl } from './search-control';\nexport { default as SelectControl } from './select-control';\nexport { default as Snackbar } from './snackbar';\nexport { default as SnackbarList } from './snackbar/list';\nexport { Spacer as __experimentalSpacer } from './spacer';\nexport { Scrollable as __experimentalScrollable } from './scrollable';\nexport { default as Spinner } from './spinner';\nexport { Surface as __experimentalSurface } from './surface';\nexport { default as TabPanel } from './tab-panel';\nexport { Text as __experimentalText } from './text';\nexport { default as TextControl } from './text-control';\nexport { default as TextareaControl } from './textarea-control';\nexport { default as TextHighlight } from './text-highlight';\nexport { default as Tip } from './tip';\nexport { default as ToggleControl } from './toggle-control';\nexport {\n\tToggleGroupControl as __experimentalToggleGroupControl,\n\tToggleGroupControlOption as __experimentalToggleGroupControlOption,\n\tToggleGroupControlOptionIcon as __experimentalToggleGroupControlOptionIcon,\n} from './toggle-group-control';\nexport {\n\tToolbar,\n\tToolbarButton,\n\tToolbarContext as __experimentalToolbarContext,\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tToolbarItem,\n} from './toolbar';\nexport {\n\tToolsPanel as __experimentalToolsPanel,\n\tToolsPanelItem as __experimentalToolsPanelItem,\n\tToolsPanelContext as __experimentalToolsPanelContext,\n} from './tools-panel';\nexport { default as Tooltip } from './tooltip';\nexport {\n\tdefault as __experimentalTreeGrid,\n\tTreeGridRow as __experimentalTreeGridRow,\n\tTreeGridCell as __experimentalTreeGridCell,\n\tTreeGridItem as __experimentalTreeGridItem,\n} from './tree-grid';\nexport { default as TreeSelect } from './tree-select';\nexport { Truncate as __experimentalTruncate } from './truncate';\nexport {\n\tdefault as __experimentalUnitControl,\n\tuseCustomUnits as __experimentalUseCustomUnits,\n\tparseQuantityAndUnitFromRawValue as __experimentalParseQuantityAndUnitFromRawValue,\n} from './unit-control';\nexport { View as __experimentalView } from './view';\nexport { VisuallyHidden } from './visually-hidden';\nexport { VStack as __experimentalVStack } from './v-stack';\nexport { default as IsolatedEventContainer } from './isolated-event-container';\nexport {\n\tcreateSlotFill,\n\tSlot,\n\tFill,\n\tProvider as SlotFillProvider,\n\tuseSlot as __experimentalUseSlot,\n\tuseSlotFills as __experimentalUseSlotFills,\n} from './slot-fill';\nexport { default as __experimentalStyleProvider } from './style-provider';\nexport { ZStack as __experimentalZStack } from './z-stack';\n\n// Higher-Order Components.\nexport {\n\tdefault as navigateRegions,\n\tuseNavigateRegions as __unstableUseNavigateRegions,\n} from './higher-order/navigate-regions';\nexport { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';\nexport { default as withFallbackStyles } from './higher-order/with-fallback-styles';\nexport { default as withFilters } from './higher-order/with-filters';\nexport { default as withFocusOutside } from './higher-order/with-focus-outside';\nexport {\n\tdefault as withFocusReturn,\n\tProvider as FocusReturnProvider,\n} from './higher-order/with-focus-return';\nexport { default as withNotices } from './higher-order/with-notices';\nex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AF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAlI,wBAAAkI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_primitives","require","_alignmentMatrixControl","_interopRequireDefault","_animate","_interopRequireWildcard","_animation","_anglePickerControl","_autocomplete","_baseControl","_borderBoxControl","_borderControl","_boxControl","_button","_buttonGroup","_card","_checkboxControl","_clipboardButton","_paletteEdit","_colorIndicator","_colorPalette","_colorPicker","_comboboxControl","_legacy","_composite","_confirmDialog","_customSelectControl","_dashicon","_dateTime","_dimensionControl","_disabled","_disclosure","_divider","_draggable","_dropZone","_provider","_dropdown","_dropdownContentWrapper","_dropdownMenu","_duotonePicker","_elevation","_externalLink","_flex","_focalPointPicker","_focusableIframe","_fontSizePicker","_formFileUpload","_formToggle","_formTokenField","_gradientPicker","_customGradientPicker","_grid","_guide","_page","_heading","_hStack","_icon","_deprecated","_itemGroup","_inputControl","_inputPrefixWrapper","_inputSuffixWrapper","_keyboardShortcuts","_menuGroup","_menuItem","_menuItemsChoice","_modal","_scrollLock","_navigableContainer","_navigation","_backButton","_group","_item","_menu","_legacy2","_navigator","_notice","_numberControl","_list","_panel","_body","_header","_row","_placeholder","_popover","_progressBar","_queryControls","_radio","_radioGroup","_radioControl","_rangeControl","_resizableBox","_responsiveWrapper","_sandbox","_searchControl","_selectControl","_snackbar","_list2","_spacer","_scrollable","_spinner","_surface","_tabPanel","_text","_textControl","_textareaControl","_textHighlight","_tip","_toggleControl","_toggleGroupControl","_toolbar","_toolsPanel","_tooltip","_treeGrid","_treeSelect","_truncate","_unitControl","_view","_visuallyHidden","_vStack","_isolatedEventContainer","_slotFill","_styleProvider","_zStack","_navigateRegions","_withConstrainedTabbing","_withFallbackStyles","_withFilters","_withFocusOutside","_withFocusReturn","_withNotices","_withSpokenMessages","_privateApis","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set"],"sources":["@wordpress/components/src/index.ts"],"sourcesContent":["// Primitives.\nexport {\n\tSVG,\n\tPath,\n\tCircle,\n\tPolygon,\n\tRect,\n\tG,\n\tLine,\n\tHorizontalRule,\n\tBlockQuotation,\n} from '@wordpress/primitives';\n\n// Components.\nexport {\n\t/** @deprecated Import `AlignmentMatrixControl` instead. */\n\tdefault as __experimentalAlignmentMatrixControl,\n\tdefault as AlignmentMatrixControl,\n} from './alignment-matrix-control';\nexport {\n\tdefault as Animate,\n\tgetAnimateClassName as __unstableGetAnimateClassName,\n} from './animate';\nexport { __unstableMotion, __unstableAnimatePresence } from './animation';\nexport { default as AnglePickerControl } from './angle-picker-control';\nexport {\n\tdefault as Autocomplete,\n\tuseAutocompleteProps as __unstableUseAutocompleteProps,\n} from './autocomplete';\nexport { default as BaseControl, useBaseControlProps } from './base-control';\nexport {\n\t/** @deprecated Import `BorderBoxControl` instead. */\n\tBorderBoxControl as __experimentalBorderBoxControl,\n\tBorderBoxControl,\n\thasSplitBorders as __experimentalHasSplitBorders,\n\tisDefinedBorder as __experimentalIsDefinedBorder,\n\tisEmptyBorder as __experimentalIsEmptyBorder,\n} from './border-box-control';\nexport {\n\t/** @deprecated Import `BorderControl` instead. */\n\tBorderControl as __experimentalBorderControl,\n\tBorderControl,\n} from './border-control';\nexport {\n\t/** @deprecated Import `BoxControl` instead. */\n\tdefault as __experimentalBoxControl,\n\tdefault as BoxControl,\n\tapplyValueToSides as __experimentalApplyValueToSides,\n} from './box-control';\nexport { default as Button } from './button';\nexport { default as ButtonGroup } from './button-group';\nexport {\n\tCard,\n\tCardBody,\n\tCardDivider,\n\tCardFooter,\n\tCardHeader,\n\tCardMedia,\n} from './card';\nexport { default as CheckboxControl } from './checkbox-control';\nexport { default as ClipboardButton } from './clipboard-button';\nexport { default as __experimentalPaletteEdit } from './palette-edit';\nexport { default as ColorIndicator } from './color-indicator';\nexport { default as ColorPalette } from './color-palette';\nexport { ColorPicker } from './color-picker';\nexport { default as ComboboxControl } from './combobox-control';\nexport {\n\tComposite as __unstableComposite,\n\tCompositeGroup as __unstableCompositeGroup,\n\tCompositeItem as __unstableCompositeItem,\n\tuseCompositeState as __unstableUseCompositeState,\n} from './composite/legacy';\nexport { Composite } from './composite';\nexport { ConfirmDialog as __experimentalConfirmDialog } from './confirm-dialog';\nexport { default as CustomSelectControl } from './custom-select-control';\nexport { default as Dashicon } from './dashicon';\nexport { default as DateTimePicker, DatePicker, TimePicker } from './date-time';\nexport { default as __experimentalDimensionControl } from './dimension-control';\nexport { default as Disabled } from './disabled';\nexport { DisclosureContent as __unstableDisclosureContent } from './disclosure';\nexport { Divider as __experimentalDivider } from './divider';\nexport { default as Draggable } from './draggable';\nexport { default as DropZone } from './drop-zone';\nexport { default as DropZoneProvider } from './drop-zone/provider';\nexport { default as Dropdown } from './dropdown';\nexport { default as __experimentalDropdownContentWrapper } from './dropdown/dropdown-content-wrapper';\nexport { default as DropdownMenu } from './dropdown-menu';\nexport { DuotoneSwatch, DuotonePicker } from './duotone-picker';\nexport { Elevation as __experimentalElevation } from './elevation';\nexport { default as ExternalLink } from './external-link';\nexport { Flex, FlexBlock, FlexItem } from './flex';\nexport { default as FocalPointPicker } from './focal-point-picker';\nexport { default as FocusableIframe } from './focusable-iframe';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as FormFileUpload } from './form-file-upload';\nexport { default as FormToggle } from './form-toggle';\nexport { default as FormTokenField } from './form-token-field';\nexport { default as GradientPicker } from './gradient-picker';\nexport { default as CustomGradientPicker } from './custom-gradient-picker';\nexport { Grid as __experimentalGrid } from './grid';\nexport { default as Guide } from './guide';\nexport { default as GuidePage } from './guide/page';\nexport { Heading as __experimentalHeading } from './heading';\nexport { HStack as __experimentalHStack } from './h-stack';\nexport { default as Icon } from './icon';\nexport type { IconType } from './icon';\nexport { default as IconButton } from './button/deprecated';\nexport {\n\tItemGroup as __experimentalItemGroup,\n\tItem as __experimentalItem,\n} from './item-group';\nexport { default as __experimentalInputControl } from './input-control';\nexport { default as __experimentalInputControlPrefixWrapper } from './input-control/input-prefix-wrapper';\nexport { default as __experimentalInputControlSuffixWrapper } from './input-control/input-suffix-wrapper';\nexport { default as KeyboardShortcuts } from './keyboard-shortcuts';\nexport { default as MenuGroup } from './menu-group';\nexport { default as MenuItem } from './menu-item';\nexport { default as MenuItemsChoice } from './menu-items-choice';\nexport { default as Modal } from './modal';\nexport { default as ScrollLock } from './scroll-lock';\nexport { NavigableMenu, TabbableContainer } from './navigable-container';\nexport { default as __experimentalNavigation } from './navigation';\nexport { default as __experimentalNavigationBackButton } from './navigation/back-button';\nexport { default as __experimentalNavigationGroup } from './navigation/group';\nexport { default as __experimentalNavigationItem } from './navigation/item';\nexport { default as __experimentalNavigationMenu } from './navigation/menu';\nexport {\n\t/** @deprecated Import `Navigator` instead. */\n\tNavigatorProvider as __experimentalNavigatorProvider,\n\t/** @deprecated Import `Navigator` and use `Navigator.Screen` instead. */\n\tNavigatorScreen as __experimentalNavigatorScreen,\n\t/** @deprecated Import `Navigator` and use `Navigator.Button` instead. */\n\tNavigatorButton as __experimentalNavigatorButton,\n\t/** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */\n\tNavigatorBackButton as __experimentalNavigatorBackButton,\n\t/** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */\n\tNavigatorToParentButton as __experimentalNavigatorToParentButton,\n} from './navigator/legacy';\nexport {\n\tNavigator,\n\tuseNavigator,\n\t/** @deprecated Import `useNavigator` instead. */\n\tuseNavigator as __experimentalUseNavigator,\n} from './navigator';\nexport { default as Notice } from './notice';\nexport { default as __experimentalNumberControl } from './number-control';\nexport { default as NoticeList } from './notice/list';\nexport { default as Panel } from './panel';\nexport { default as PanelBody } from './panel/body';\nexport { default as PanelHeader } from './panel/header';\nexport { default as PanelRow } from './panel/row';\nexport { default as Placeholder } from './placeholder';\nexport { default as Popover } from './popover';\nexport { default as ProgressBar } from './progress-bar';\nexport { default as QueryControls } from './query-controls';\nexport { default as __experimentalRadio } from './radio-group/radio';\nexport { default as __experimentalRadioGroup } from './radio-group';\nexport { default as RadioControl } from './radio-control';\nexport { default as RangeControl } from './range-control';\nexport { default as ResizableBox } from './resizable-box';\nexport { default as ResponsiveWrapper } from './responsive-wrapper';\nexport { default as SandBox } from './sandbox';\nexport { default as SearchControl } from './search-control';\nexport { default as SelectControl } from './select-control';\nexport { default as Snackbar } from './snackbar';\nexport { default as SnackbarList } from './snackbar/list';\nexport { Spacer as __experimentalSpacer } from './spacer';\nexport { Scrollable as __experimentalScrollable } from './scrollable';\nexport { default as Spinner } from './spinner';\nexport { Surface as __experimentalSurface } from './surface';\nexport { default as TabPanel } from './tab-panel';\nexport { Text as __experimentalText } from './text';\nexport { default as TextControl } from './text-control';\nexport { default as TextareaControl } from './textarea-control';\nexport { default as TextHighlight } from './text-highlight';\nexport { default as Tip } from './tip';\nexport { default as ToggleControl } from './toggle-control';\nexport {\n\tToggleGroupControl as __experimentalToggleGroupControl,\n\tToggleGroupControlOption as __experimentalToggleGroupControlOption,\n\tToggleGroupControlOptionIcon as __experimentalToggleGroupControlOptionIcon,\n} from './toggle-group-control';\nexport {\n\tToolbar,\n\tToolbarButton,\n\tToolbarContext as __experimentalToolbarContext,\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tToolbarItem,\n} from './toolbar';\nexport {\n\tToolsPanel as __experimentalToolsPanel,\n\tToolsPanelItem as __experimentalToolsPanelItem,\n\tToolsPanelContext as __experimentalToolsPanelContext,\n} from './tools-panel';\nexport { default as Tooltip } from './tooltip';\nexport {\n\tdefault as __experimentalTreeGrid,\n\tTreeGridRow as __experimentalTreeGridRow,\n\tTreeGridCell as __experimentalTreeGridCell,\n\tTreeGridItem as __experimentalTreeGridItem,\n} from './tree-grid';\nexport { default as TreeSelect } from './tree-select';\nexport { Truncate as __experimentalTruncate } from './truncate';\nexport {\n\tdefault as __experimentalUnitControl,\n\tuseCustomUnits as __experimentalUseCustomUnits,\n\tparseQuantityAndUnitFromRawValue as __experimentalParseQuantityAndUnitFromRawValue,\n} from './unit-control';\nexport { View as __experimentalView } from './view';\nexport { VisuallyHidden } from './visually-hidden';\nexport { VStack as __experimentalVStack } from './v-stack';\nexport { default as IsolatedEventContainer } from './isolated-event-container';\nexport {\n\tcreateSlotFill,\n\tSlot,\n\tFill,\n\tProvider as SlotFillProvider,\n\tuseSlot as __experimentalUseSlot,\n\tuseSlotFills as __experimentalUseSlotFills,\n} from './slot-fill';\nexport { default as __experimentalStyleProvider } from './style-provider';\nexport { ZStack as __experimentalZStack } from './z-stack';\n\n// Higher-Order Components.\nexport {\n\tdefault as navigateRegions,\n\tuseNavigateRegions as __unstableUseNavigateRegions,\n} from './higher-order/navigate-regions';\nexport { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';\nexport { default as withFallbackStyles } from './higher-order/with-fallback-styles';\nexport { default as withFilters } from './higher-order/with-filters';\nexport { default as withFocusOutside } from './higher-order/with-focus-outside';\nexport {\n\tdefault as withFocusReturn,\n\tProvider as FocusReturnProvider,\n} from './higher-order/with-focus-return';\nexport { default as withNotices } from './higher-order/with-notices';\nexport { default as withSpokenMessages } from './higher-order/with-spoken-messages';\n\n// Private APIs.\nexport { privateApis } from './private-apis';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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