@fluentui/react-tag-picker 9.10.0 → 9.10.2
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 +38 -2
- package/dist/index.d.cts +570 -0
- package/dist/index.d.ts +12 -4
- package/lib/TagPicker.js +1 -1
- package/lib/TagPicker.js.map +1 -1
- package/lib/TagPickerButton.js +1 -1
- package/lib/TagPickerButton.js.map +1 -1
- package/lib/TagPickerControl.js +1 -1
- package/lib/TagPickerControl.js.map +1 -1
- package/lib/TagPickerGroup.js +1 -1
- package/lib/TagPickerGroup.js.map +1 -1
- package/lib/TagPickerInput.js +1 -1
- package/lib/TagPickerInput.js.map +1 -1
- package/lib/TagPickerList.js +1 -1
- package/lib/TagPickerList.js.map +1 -1
- package/lib/TagPickerOption.js +1 -1
- package/lib/TagPickerOption.js.map +1 -1
- package/lib/TagPickerOptionGroup.js +1 -1
- package/lib/TagPickerOptionGroup.js.map +1 -1
- package/lib/components/TagPicker/TagPicker.js +4 -4
- package/lib/components/TagPicker/TagPicker.js.map +1 -1
- package/lib/components/TagPicker/index.js +4 -4
- package/lib/components/TagPicker/index.js.map +1 -1
- package/lib/components/TagPicker/renderTagPicker.js +6 -6
- package/lib/components/TagPicker/renderTagPicker.js.map +1 -1
- package/lib/components/TagPicker/useTagPicker.js +6 -6
- package/lib/components/TagPicker/useTagPickerContextValues.js +1 -1
- package/lib/components/TagPickerButton/TagPickerButton.js +5 -5
- package/lib/components/TagPickerButton/TagPickerButton.js.map +1 -1
- package/lib/components/TagPickerButton/index.js +4 -4
- package/lib/components/TagPickerButton/index.js.map +1 -1
- package/lib/components/TagPickerButton/renderTagPickerButton.js +1 -1
- package/lib/components/TagPickerButton/renderTagPickerButton.js.map +1 -1
- package/lib/components/TagPickerButton/useTagPickerButton.js +10 -4
- package/lib/components/TagPickerButton/useTagPickerButton.js.map +1 -1
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js +2 -2
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -1
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js +2 -2
- package/lib/components/TagPickerControl/TagPickerControl.js +5 -5
- package/lib/components/TagPickerControl/TagPickerControl.js.map +1 -1
- package/lib/components/TagPickerControl/index.js +4 -4
- package/lib/components/TagPickerControl/index.js.map +1 -1
- package/lib/components/TagPickerControl/renderTagPickerControl.js +1 -1
- package/lib/components/TagPickerControl/renderTagPickerControl.js.map +1 -1
- package/lib/components/TagPickerControl/useTagPickerControl.js +18 -12
- package/lib/components/TagPickerControl/useTagPickerControl.js.map +1 -1
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js +2 -2
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -1
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js +2 -2
- package/lib/components/TagPickerGroup/TagPickerGroup.js +6 -6
- package/lib/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
- package/lib/components/TagPickerGroup/TagPickerGroup.types.js +1 -1
- package/lib/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -1
- package/lib/components/TagPickerGroup/index.js +4 -4
- package/lib/components/TagPickerGroup/index.js.map +1 -1
- package/lib/components/TagPickerGroup/renderTagPickerGroup.js +1 -1
- package/lib/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -1
- package/lib/components/TagPickerGroup/useTagPickerGroup.js +6 -6
- package/lib/components/TagPickerGroup/useTagPickerGroup.js.map +1 -1
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js +4 -4
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -1
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js +4 -4
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js.map +1 -1
- package/lib/components/TagPickerInput/TagPickerInput.js +5 -5
- package/lib/components/TagPickerInput/TagPickerInput.js.map +1 -1
- package/lib/components/TagPickerInput/index.js +4 -4
- package/lib/components/TagPickerInput/index.js.map +1 -1
- package/lib/components/TagPickerInput/renderTagPickerInput.js +1 -1
- package/lib/components/TagPickerInput/renderTagPickerInput.js.map +1 -1
- package/lib/components/TagPickerInput/useTagPickerInput.js +17 -11
- package/lib/components/TagPickerInput/useTagPickerInput.js.map +1 -1
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js +3 -3
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -1
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js +3 -3
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js.map +1 -1
- package/lib/components/TagPickerList/TagPickerList.js +5 -5
- package/lib/components/TagPickerList/TagPickerList.js.map +1 -1
- package/lib/components/TagPickerList/index.js +4 -4
- package/lib/components/TagPickerList/index.js.map +1 -1
- package/lib/components/TagPickerList/renderTagPickerList.js +1 -1
- package/lib/components/TagPickerList/useTagPickerList.js +4 -4
- package/lib/components/TagPickerList/useTagPickerList.js.map +1 -1
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.js +2 -2
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -1
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.raw.js +2 -2
- package/lib/components/TagPickerOption/TagPickerOption.js +5 -5
- package/lib/components/TagPickerOption/TagPickerOption.js.map +1 -1
- package/lib/components/TagPickerOption/index.js +4 -4
- package/lib/components/TagPickerOption/index.js.map +1 -1
- package/lib/components/TagPickerOption/renderTagPickerOption.js +1 -1
- package/lib/components/TagPickerOption/useTagPickerOption.js +2 -2
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js +3 -3
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -1
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js +3 -3
- package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js +5 -5
- package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/index.js +4 -4
- package/lib/components/TagPickerOptionGroup/index.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js +1 -1
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroup.js +1 -1
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js +2 -2
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js +2 -2
- package/lib/contexts/TagPickerContext.js +2 -2
- package/lib/index.js +10 -10
- package/lib/index.js.map +1 -1
- package/lib/utils/useExpandLabel.js +3 -3
- package/lib/utils/useExpandLabel.js.map +1 -1
- package/lib/utils/useResizeObserverRef.js +2 -2
- package/lib/utils/useTabsterEscapeIgnore.js +15 -0
- package/lib/utils/useTabsterEscapeIgnore.js.map +1 -0
- package/lib/utils/useTagPickerFilter.js +2 -2
- package/lib/utils/useTagPickerFilter.js.map +1 -1
- package/lib-commonjs/{TagPicker.js → TagPicker.cjs} +1 -1
- package/lib-commonjs/{TagPicker.js.map → TagPicker.cjs.map} +1 -1
- package/lib-commonjs/{TagPickerButton.js → TagPickerButton.cjs} +1 -1
- package/lib-commonjs/{TagPickerButton.js.map → TagPickerButton.cjs.map} +1 -1
- package/lib-commonjs/{TagPickerControl.js → TagPickerControl.cjs} +1 -1
- package/lib-commonjs/{TagPickerControl.js.map → TagPickerControl.cjs.map} +1 -1
- package/lib-commonjs/{TagPickerGroup.js → TagPickerGroup.cjs} +1 -1
- package/lib-commonjs/TagPickerGroup.cjs.map +1 -0
- package/lib-commonjs/{TagPickerInput.js → TagPickerInput.cjs} +1 -1
- package/lib-commonjs/{TagPickerInput.js.map → TagPickerInput.cjs.map} +1 -1
- package/lib-commonjs/{TagPickerList.js → TagPickerList.cjs} +1 -1
- package/lib-commonjs/{TagPickerList.js.map → TagPickerList.cjs.map} +1 -1
- package/lib-commonjs/{TagPickerOption.js → TagPickerOption.cjs} +1 -1
- package/lib-commonjs/{TagPickerOption.js.map → TagPickerOption.cjs.map} +1 -1
- package/lib-commonjs/{TagPickerOptionGroup.js → TagPickerOptionGroup.cjs} +1 -1
- package/lib-commonjs/{TagPickerOptionGroup.js.map → TagPickerOptionGroup.cjs.map} +1 -1
- package/lib-commonjs/components/TagPicker/{TagPicker.js → TagPicker.cjs} +3 -3
- package/lib-commonjs/components/TagPicker/{TagPicker.js.map → TagPicker.cjs.map} +1 -1
- package/lib-commonjs/components/TagPicker/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPicker/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/TagPicker/{renderTagPicker.js → renderTagPicker.cjs} +1 -1
- package/lib-commonjs/components/TagPicker/{renderTagPicker.js.map → renderTagPicker.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerButton/{TagPickerButton.js → TagPickerButton.cjs} +3 -3
- package/lib-commonjs/components/TagPickerButton/{TagPickerButton.js.map → TagPickerButton.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerButton/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPickerButton/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerButton/{useTagPickerButton.js → useTagPickerButton.cjs} +8 -2
- package/lib-commonjs/components/TagPickerButton/useTagPickerButton.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerControl/{TagPickerControl.js → TagPickerControl.cjs} +3 -3
- package/lib-commonjs/components/TagPickerControl/{TagPickerControl.js.map → TagPickerControl.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerControl/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPickerControl/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerControl/{useTagPickerControl.js → useTagPickerControl.cjs} +14 -8
- package/lib-commonjs/components/TagPickerControl/useTagPickerControl.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerGroup/{TagPickerGroup.js → TagPickerGroup.cjs} +3 -3
- package/lib-commonjs/components/TagPickerGroup/{TagPickerGroup.js.map → TagPickerGroup.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerGroup/{TagPickerGroup.types.js → TagPickerGroup.types.cjs} +1 -1
- package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerGroup/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPickerGroup/index.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerGroup/{useTagPickerGroup.js → useTagPickerGroup.cjs} +2 -2
- package/lib-commonjs/components/TagPickerGroup/{useTagPickerGroup.js.map → useTagPickerGroup.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerGroup/{useTagPickerGroupStyles.styles.js → useTagPickerGroupStyles.styles.cjs} +1 -1
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerGroup/{useTagPickerGroupStyles.styles.raw.js → useTagPickerGroupStyles.styles.raw.cjs} +1 -1
- package/lib-commonjs/components/TagPickerGroup/{useTagPickerGroupStyles.styles.raw.js.map → useTagPickerGroupStyles.styles.raw.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerInput/{TagPickerInput.js → TagPickerInput.cjs} +3 -3
- package/lib-commonjs/components/TagPickerInput/{TagPickerInput.js.map → TagPickerInput.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerInput/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPickerInput/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerInput/{useTagPickerInput.js → useTagPickerInput.cjs} +9 -3
- package/lib-commonjs/components/TagPickerInput/useTagPickerInput.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerInput/{useTagPickerInputStyles.styles.raw.js → useTagPickerInputStyles.styles.raw.cjs} +1 -1
- package/lib-commonjs/components/TagPickerInput/{useTagPickerInputStyles.styles.raw.js.map → useTagPickerInputStyles.styles.raw.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerList/{TagPickerList.js → TagPickerList.cjs} +3 -3
- package/lib-commonjs/components/TagPickerList/{TagPickerList.js.map → TagPickerList.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerList/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPickerList/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerList/{useTagPickerList.js → useTagPickerList.cjs} +1 -1
- package/lib-commonjs/components/TagPickerList/{useTagPickerList.js.map → useTagPickerList.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerOption/{TagPickerOption.js → TagPickerOption.cjs} +3 -3
- package/lib-commonjs/components/TagPickerOption/{TagPickerOption.js.map → TagPickerOption.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerOption/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPickerOption/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerOptionGroup/{TagPickerOptionGroup.js → TagPickerOptionGroup.cjs} +3 -3
- package/lib-commonjs/components/TagPickerOptionGroup/{TagPickerOptionGroup.js.map → TagPickerOptionGroup.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPickerOptionGroup/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.cjs.map +1 -0
- package/lib-commonjs/{index.js → index.cjs} +10 -10
- package/lib-commonjs/index.cjs.map +1 -0
- package/lib-commonjs/utils/{useExpandLabel.js → useExpandLabel.cjs} +1 -1
- package/lib-commonjs/utils/{useExpandLabel.js.map → useExpandLabel.cjs.map} +1 -1
- package/lib-commonjs/utils/useTabsterEscapeIgnore.cjs +22 -0
- package/lib-commonjs/utils/useTabsterEscapeIgnore.cjs.map +1 -0
- package/lib-commonjs/utils/{useTagPickerFilter.js → useTagPickerFilter.cjs} +1 -1
- package/lib-commonjs/utils/{useTagPickerFilter.js.map → useTagPickerFilter.cjs.map} +1 -1
- package/package.json +26 -20
- package/lib-commonjs/TagPickerGroup.js.map +0 -1
- package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.js.map +0 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButton.js.map +0 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +0 -1
- package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.js.map +0 -1
- package/lib-commonjs/components/TagPickerControl/useTagPickerControl.js.map +0 -1
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +0 -1
- package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.js.map +0 -1
- package/lib-commonjs/components/TagPickerGroup/index.js.map +0 -1
- package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.js.map +0 -1
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +0 -1
- package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.js.map +0 -1
- package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js.map +0 -1
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +0 -1
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js.map +0 -1
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +0 -1
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +0 -1
- package/lib-commonjs/index.js.map +0 -1
- /package/lib-commonjs/components/TagPicker/{TagPicker.types.js → TagPicker.types.cjs} +0 -0
- /package/lib-commonjs/components/TagPicker/{TagPicker.types.js.map → TagPicker.types.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPicker/{useTagPicker.js → useTagPicker.cjs} +0 -0
- /package/lib-commonjs/components/TagPicker/{useTagPicker.js.map → useTagPicker.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPicker/{useTagPickerContextValues.js → useTagPickerContextValues.cjs} +0 -0
- /package/lib-commonjs/components/TagPicker/{useTagPickerContextValues.js.map → useTagPickerContextValues.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerButton/{TagPickerButton.types.js → TagPickerButton.types.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerButton/{TagPickerButton.types.js.map → TagPickerButton.types.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerButton/{renderTagPickerButton.js → renderTagPickerButton.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerButton/{useTagPickerButtonStyles.styles.js → useTagPickerButtonStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerButton/{useTagPickerButtonStyles.styles.raw.js → useTagPickerButtonStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerButton/{useTagPickerButtonStyles.styles.raw.js.map → useTagPickerButtonStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerControl/{TagPickerControl.types.js → TagPickerControl.types.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerControl/{TagPickerControl.types.js.map → TagPickerControl.types.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerControl/{renderTagPickerControl.js → renderTagPickerControl.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerControl/{useTagPickerControlStyles.styles.js → useTagPickerControlStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerControl/{useTagPickerControlStyles.styles.raw.js → useTagPickerControlStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerControl/{useTagPickerControlStyles.styles.raw.js.map → useTagPickerControlStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerGroup/{renderTagPickerGroup.js → renderTagPickerGroup.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerInput/{TagPickerInput.types.js → TagPickerInput.types.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerInput/{TagPickerInput.types.js.map → TagPickerInput.types.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerInput/{renderTagPickerInput.js → renderTagPickerInput.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerInput/{useTagPickerInputStyles.styles.js → useTagPickerInputStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerList/{TagPickerList.types.js → TagPickerList.types.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerList/{TagPickerList.types.js.map → TagPickerList.types.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerList/{renderTagPickerList.js → renderTagPickerList.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerList/{renderTagPickerList.js.map → renderTagPickerList.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerList/{useTagPickerListStyles.styles.js → useTagPickerListStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerList/{useTagPickerListStyles.styles.raw.js → useTagPickerListStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerList/{useTagPickerListStyles.styles.raw.js.map → useTagPickerListStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{TagPickerOption.types.js → TagPickerOption.types.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{TagPickerOption.types.js.map → TagPickerOption.types.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{renderTagPickerOption.js → renderTagPickerOption.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{renderTagPickerOption.js.map → renderTagPickerOption.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{useTagPickerOption.js → useTagPickerOption.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{useTagPickerOption.js.map → useTagPickerOption.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{useTagPickerOptionStyles.styles.js → useTagPickerOptionStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{useTagPickerOptionStyles.styles.raw.js → useTagPickerOptionStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOption/{useTagPickerOptionStyles.styles.raw.js.map → useTagPickerOptionStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{TagPickerOptionGroup.types.js → TagPickerOptionGroup.types.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{TagPickerOptionGroup.types.js.map → TagPickerOptionGroup.types.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{renderTagPickerOptionGroup.js → renderTagPickerOptionGroup.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{renderTagPickerOptionGroup.js.map → renderTagPickerOptionGroup.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{useTagPickerOptionGroup.js → useTagPickerOptionGroup.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{useTagPickerOptionGroup.js.map → useTagPickerOptionGroup.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{useTagPickerOptionGroupStyles.styles.js → useTagPickerOptionGroupStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{useTagPickerOptionGroupStyles.styles.raw.js → useTagPickerOptionGroupStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerOptionGroup/{useTagPickerOptionGroupStyles.styles.raw.js.map → useTagPickerOptionGroupStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/contexts/{TagPickerContext.js → TagPickerContext.cjs} +0 -0
- /package/lib-commonjs/contexts/{TagPickerContext.js.map → TagPickerContext.cjs.map} +0 -0
- /package/lib-commonjs/utils/{tagPicker2Tag.js → tagPicker2Tag.cjs} +0 -0
- /package/lib-commonjs/utils/{tagPicker2Tag.js.map → tagPicker2Tag.cjs.map} +0 -0
- /package/lib-commonjs/utils/{tokens.js → tokens.cjs} +0 -0
- /package/lib-commonjs/utils/{tokens.js.map → tokens.cjs.map} +0 -0
- /package/lib-commonjs/utils/{useResizeObserverRef.js → useResizeObserverRef.cjs} +0 -0
- /package/lib-commonjs/utils/{useResizeObserverRef.js.map → useResizeObserverRef.cjs.map} +0 -0
package/lib/TagPickerButton.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TagPickerButton, renderTagPickerButton_unstable, tagPickerButtonClassNames, useTagPickerButtonStyles_unstable, useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from
|
|
1
|
+
export { TagPickerButton, renderTagPickerButton_unstable, tagPickerButtonClassNames, useTagPickerButtonStyles_unstable, useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from "./components/TagPickerButton/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TagPickerButton.ts"],"sourcesContent":["export type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './components/TagPickerButton/index';\nexport {\n TagPickerButton,\n renderTagPickerButton_unstable,\n tagPickerButtonClassNames,\n useTagPickerButtonStyles_unstable,\n useTagPickerButton_unstable,\n useTagPickerButtonBase_unstable,\n} from './components/TagPickerButton/index';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable"],"mappings":"AAOA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,EAC3BC,+BAA+B,QAC1B,
|
|
1
|
+
{"version":3,"sources":["../src/TagPickerButton.ts"],"sourcesContent":["export type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './components/TagPickerButton/index';\nexport {\n TagPickerButton,\n renderTagPickerButton_unstable,\n tagPickerButtonClassNames,\n useTagPickerButtonStyles_unstable,\n useTagPickerButton_unstable,\n useTagPickerButtonBase_unstable,\n} from './components/TagPickerButton/index';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable"],"mappings":"AAOA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,EAC3BC,+BAA+B,QAC1B,wCAAqC"}
|
package/lib/TagPickerControl.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TagPickerControl, iconSizes, renderTagPickerControl_unstable, tagPickerControlAsideWidthToken, tagPickerControlClassNames, useTagPickerControlStyles_unstable, useTagPickerControl_unstable, useTagPickerControlBase_unstable } from
|
|
1
|
+
export { TagPickerControl, iconSizes, renderTagPickerControl_unstable, tagPickerControlAsideWidthToken, tagPickerControlClassNames, useTagPickerControlStyles_unstable, useTagPickerControl_unstable, useTagPickerControlBase_unstable } from "./components/TagPickerControl/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TagPickerControl.ts"],"sourcesContent":["export type {\n TagPickerControlBaseState,\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './components/TagPickerControl/index';\nexport {\n TagPickerControl,\n iconSizes,\n renderTagPickerControl_unstable,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n useTagPickerControl_unstable,\n useTagPickerControlBase_unstable,\n} from './components/TagPickerControl/index';\n"],"names":["TagPickerControl","iconSizes","renderTagPickerControl_unstable","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable"],"mappings":"AAQA,SACEA,gBAAgB,EAChBC,SAAS,EACTC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,EAClCC,4BAA4B,EAC5BC,gCAAgC,QAC3B,
|
|
1
|
+
{"version":3,"sources":["../src/TagPickerControl.ts"],"sourcesContent":["export type {\n TagPickerControlBaseState,\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './components/TagPickerControl/index';\nexport {\n TagPickerControl,\n iconSizes,\n renderTagPickerControl_unstable,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n useTagPickerControl_unstable,\n useTagPickerControlBase_unstable,\n} from './components/TagPickerControl/index';\n"],"names":["TagPickerControl","iconSizes","renderTagPickerControl_unstable","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable"],"mappings":"AAQA,SACEA,gBAAgB,EAChBC,SAAS,EACTC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,EAClCC,4BAA4B,EAC5BC,gCAAgC,QAC3B,yCAAsC"}
|
package/lib/TagPickerGroup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TagPickerGroup, renderTagPickerGroup_unstable, tagPickerGroupClassNames, useTagPickerGroupStyles_unstable, useTagPickerGroup_unstable } from
|
|
1
|
+
export { TagPickerGroup, renderTagPickerGroup_unstable, tagPickerGroupClassNames, useTagPickerGroupStyles_unstable, useTagPickerGroup_unstable } from "./components/TagPickerGroup/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TagPickerGroup.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/TagPickerGroup.ts"],"sourcesContent":["export type {\n TagPickerGroupBaseState,\n TagPickerGroupProps,\n TagPickerGroupSlots,\n TagPickerGroupState,\n} from './components/TagPickerGroup/index';\nexport {\n TagPickerGroup,\n renderTagPickerGroup_unstable,\n tagPickerGroupClassNames,\n useTagPickerGroupStyles_unstable,\n useTagPickerGroup_unstable,\n} from './components/TagPickerGroup/index';\n"],"names":["TagPickerGroup","renderTagPickerGroup_unstable","tagPickerGroupClassNames","useTagPickerGroupStyles_unstable","useTagPickerGroup_unstable"],"mappings":"AAMA,SACEA,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,QACrB,uCAAoC"}
|
package/lib/TagPickerInput.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TagPickerInput, renderTagPickerInput_unstable, tagPickerInputClassNames, useTagPickerInputStyles_unstable, useTagPickerInput_unstable, useTagPickerInputBase_unstable } from
|
|
1
|
+
export { TagPickerInput, renderTagPickerInput_unstable, tagPickerInputClassNames, useTagPickerInputStyles_unstable, useTagPickerInput_unstable, useTagPickerInputBase_unstable } from "./components/TagPickerInput/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TagPickerInput.ts"],"sourcesContent":["export type {\n TagPickerInputBaseProps,\n TagPickerInputBaseState,\n TagPickerInputProps,\n TagPickerInputSlots,\n TagPickerInputState,\n} from './components/TagPickerInput/index';\nexport {\n TagPickerInput,\n renderTagPickerInput_unstable,\n tagPickerInputClassNames,\n useTagPickerInputStyles_unstable,\n useTagPickerInput_unstable,\n useTagPickerInputBase_unstable,\n} from './components/TagPickerInput/index';\n"],"names":["TagPickerInput","renderTagPickerInput_unstable","tagPickerInputClassNames","useTagPickerInputStyles_unstable","useTagPickerInput_unstable","useTagPickerInputBase_unstable"],"mappings":"AAOA,SACEA,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,EAC1BC,8BAA8B,QACzB,
|
|
1
|
+
{"version":3,"sources":["../src/TagPickerInput.ts"],"sourcesContent":["export type {\n TagPickerInputBaseProps,\n TagPickerInputBaseState,\n TagPickerInputProps,\n TagPickerInputSlots,\n TagPickerInputState,\n} from './components/TagPickerInput/index';\nexport {\n TagPickerInput,\n renderTagPickerInput_unstable,\n tagPickerInputClassNames,\n useTagPickerInputStyles_unstable,\n useTagPickerInput_unstable,\n useTagPickerInputBase_unstable,\n} from './components/TagPickerInput/index';\n"],"names":["TagPickerInput","renderTagPickerInput_unstable","tagPickerInputClassNames","useTagPickerInputStyles_unstable","useTagPickerInput_unstable","useTagPickerInputBase_unstable"],"mappings":"AAOA,SACEA,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,EAC1BC,8BAA8B,QACzB,uCAAoC"}
|
package/lib/TagPickerList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TagPickerList, renderTagPickerList_unstable, tagPickerListClassNames, useTagPickerListStyles_unstable, useTagPickerList_unstable } from
|
|
1
|
+
export { TagPickerList, renderTagPickerList_unstable, tagPickerListClassNames, useTagPickerListStyles_unstable, useTagPickerList_unstable } from "./components/TagPickerList/index.js";
|
package/lib/TagPickerList.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TagPickerList.ts"],"sourcesContent":["export type { TagPickerListProps, TagPickerListSlots, TagPickerListState } from './components/TagPickerList/index';\nexport {\n TagPickerList,\n renderTagPickerList_unstable,\n tagPickerListClassNames,\n useTagPickerListStyles_unstable,\n useTagPickerList_unstable,\n} from './components/TagPickerList/index';\n"],"names":["TagPickerList","renderTagPickerList_unstable","tagPickerListClassNames","useTagPickerListStyles_unstable","useTagPickerList_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,4BAA4B,EAC5BC,uBAAuB,EACvBC,+BAA+B,EAC/BC,yBAAyB,QACpB,
|
|
1
|
+
{"version":3,"sources":["../src/TagPickerList.ts"],"sourcesContent":["export type { TagPickerListProps, TagPickerListSlots, TagPickerListState } from './components/TagPickerList/index';\nexport {\n TagPickerList,\n renderTagPickerList_unstable,\n tagPickerListClassNames,\n useTagPickerListStyles_unstable,\n useTagPickerList_unstable,\n} from './components/TagPickerList/index';\n"],"names":["TagPickerList","renderTagPickerList_unstable","tagPickerListClassNames","useTagPickerListStyles_unstable","useTagPickerList_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,4BAA4B,EAC5BC,uBAAuB,EACvBC,+BAA+B,EAC/BC,yBAAyB,QACpB,sCAAmC"}
|
package/lib/TagPickerOption.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TagPickerOption, renderTagPickerOption_unstable, tagPickerOptionClassNames, useTagPickerOptionStyles_unstable, useTagPickerOption_unstable } from
|
|
1
|
+
export { TagPickerOption, renderTagPickerOption_unstable, tagPickerOptionClassNames, useTagPickerOptionStyles_unstable, useTagPickerOption_unstable } from "./components/TagPickerOption/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TagPickerOption.ts"],"sourcesContent":["export type {\n TagPickerOptionProps,\n TagPickerOptionSlots,\n TagPickerOptionState,\n} from './components/TagPickerOption/index';\nexport {\n TagPickerOption,\n renderTagPickerOption_unstable,\n tagPickerOptionClassNames,\n useTagPickerOptionStyles_unstable,\n useTagPickerOption_unstable,\n} from './components/TagPickerOption/index';\n"],"names":["TagPickerOption","renderTagPickerOption_unstable","tagPickerOptionClassNames","useTagPickerOptionStyles_unstable","useTagPickerOption_unstable"],"mappings":"AAKA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,
|
|
1
|
+
{"version":3,"sources":["../src/TagPickerOption.ts"],"sourcesContent":["export type {\n TagPickerOptionProps,\n TagPickerOptionSlots,\n TagPickerOptionState,\n} from './components/TagPickerOption/index';\nexport {\n TagPickerOption,\n renderTagPickerOption_unstable,\n tagPickerOptionClassNames,\n useTagPickerOptionStyles_unstable,\n useTagPickerOption_unstable,\n} from './components/TagPickerOption/index';\n"],"names":["TagPickerOption","renderTagPickerOption_unstable","tagPickerOptionClassNames","useTagPickerOptionStyles_unstable","useTagPickerOption_unstable"],"mappings":"AAKA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,wCAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TagPickerOptionGroup, renderTagPickerOptionGroup, tagPickerOptionGroupClassNames, useTagPickerOptionGroup, useTagPickerOptionGroupStyles } from
|
|
1
|
+
export { TagPickerOptionGroup, renderTagPickerOptionGroup, tagPickerOptionGroupClassNames, useTagPickerOptionGroup, useTagPickerOptionGroupStyles } from "./components/TagPickerOptionGroup/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TagPickerOptionGroup.ts"],"sourcesContent":["export type {\n TagPickerOptionGroupProps,\n TagPickerOptionGroupSlots,\n TagPickerOptionGroupState,\n} from './components/TagPickerOptionGroup/index';\nexport {\n TagPickerOptionGroup,\n renderTagPickerOptionGroup,\n tagPickerOptionGroupClassNames,\n useTagPickerOptionGroup,\n useTagPickerOptionGroupStyles,\n} from './components/TagPickerOptionGroup/index';\n"],"names":["TagPickerOptionGroup","renderTagPickerOptionGroup","tagPickerOptionGroupClassNames","useTagPickerOptionGroup","useTagPickerOptionGroupStyles"],"mappings":"AAKA,SACEA,oBAAoB,EACpBC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,uBAAuB,EACvBC,6BAA6B,QACxB,
|
|
1
|
+
{"version":3,"sources":["../src/TagPickerOptionGroup.ts"],"sourcesContent":["export type {\n TagPickerOptionGroupProps,\n TagPickerOptionGroupSlots,\n TagPickerOptionGroupState,\n} from './components/TagPickerOptionGroup/index';\nexport {\n TagPickerOptionGroup,\n renderTagPickerOptionGroup,\n tagPickerOptionGroupClassNames,\n useTagPickerOptionGroup,\n useTagPickerOptionGroupStyles,\n} from './components/TagPickerOptionGroup/index';\n"],"names":["TagPickerOptionGroup","renderTagPickerOptionGroup","tagPickerOptionGroupClassNames","useTagPickerOptionGroup","useTagPickerOptionGroupStyles"],"mappings":"AAKA,SACEA,oBAAoB,EACpBC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,uBAAuB,EACvBC,6BAA6B,QACxB,6CAA0C"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useTagPicker_unstable } from
|
|
4
|
-
import { renderTagPicker_unstable } from
|
|
5
|
-
import { useTagPickerContextValues } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useTagPicker_unstable } from "./useTagPicker.js";
|
|
4
|
+
import { renderTagPicker_unstable } from "./renderTagPicker.js";
|
|
5
|
+
import { useTagPickerContextValues } from "./useTagPickerContextValues.js";
|
|
6
6
|
/**
|
|
7
7
|
* TagPicker component -
|
|
8
8
|
* A TagPicker is a composite component that allows users to pick tags from a list of options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPicker/TagPicker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTagPicker_unstable } from './useTagPicker';\nimport { renderTagPicker_unstable } from './renderTagPicker';\nimport type { TagPickerProps } from './TagPicker.types';\nimport { useTagPickerContextValues } from './useTagPickerContextValues';\n\n/**\n * TagPicker component -\n * A TagPicker is a composite component that allows users to pick tags from a list of options.\n */\nexport const TagPicker: React.FC<TagPickerProps> = React.memo(props => {\n const state = useTagPicker_unstable(props);\n const contextValues = useTagPickerContextValues(state);\n return renderTagPicker_unstable(state, contextValues);\n});\n\nTagPicker.displayName = 'TagPicker';\n"],"names":["React","useTagPicker_unstable","renderTagPicker_unstable","useTagPickerContextValues","TagPicker","memo","props","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPicker/TagPicker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTagPicker_unstable } from './useTagPicker';\nimport { renderTagPicker_unstable } from './renderTagPicker';\nimport type { TagPickerProps } from './TagPicker.types';\nimport { useTagPickerContextValues } from './useTagPickerContextValues';\n\n/**\n * TagPicker component -\n * A TagPicker is a composite component that allows users to pick tags from a list of options.\n */\nexport const TagPicker: React.FC<TagPickerProps> = React.memo(props => {\n const state = useTagPicker_unstable(props);\n const contextValues = useTagPickerContextValues(state);\n return renderTagPicker_unstable(state, contextValues);\n});\n\nTagPicker.displayName = 'TagPicker';\n"],"names":["React","useTagPicker_unstable","renderTagPicker_unstable","useTagPickerContextValues","TagPicker","memo","props","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,wBAAwB,QAAQ,uBAAoB;AAE7D,SAASC,yBAAyB,QAAQ,iCAA8B;AAExE;;;CAGC,GACD,OAAO,MAAMC,0BAAsCJ,MAAMK,IAAI,CAACC,CAAAA;IAC5D,MAAMC,QAAQN,sBAAsBK;IACpC,MAAME,gBAAgBL,0BAA0BI;IAChD,OAAOL,yBAAyBK,OAAOC;AACzC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TagPicker } from
|
|
2
|
-
export { renderTagPicker_unstable } from
|
|
3
|
-
export { useTagPicker_unstable, useTagPickerBase_unstable } from
|
|
4
|
-
export { useTagPickerContextValues } from
|
|
1
|
+
export { TagPicker } from "./TagPicker.js";
|
|
2
|
+
export { renderTagPicker_unstable } from "./renderTagPicker.js";
|
|
3
|
+
export { useTagPicker_unstable, useTagPickerBase_unstable } from "./useTagPicker.js";
|
|
4
|
+
export { useTagPickerContextValues } from "./useTagPickerContextValues.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPicker/index.ts"],"sourcesContent":["export { TagPicker } from './TagPicker';\nexport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerContextValues,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerSize,\n TagPickerSlots,\n TagPickerState,\n} from './TagPicker.types';\nexport { renderTagPicker_unstable } from './renderTagPicker';\nexport { useTagPicker_unstable, useTagPickerBase_unstable } from './useTagPicker';\nexport { useTagPickerContextValues } from './useTagPickerContextValues';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable","useTagPickerBase_unstable","useTagPickerContextValues"],"mappings":"AAAA,SAASA,SAAS,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPicker/index.ts"],"sourcesContent":["export { TagPicker } from './TagPicker';\nexport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerContextValues,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerSize,\n TagPickerSlots,\n TagPickerState,\n} from './TagPicker.types';\nexport { renderTagPicker_unstable } from './renderTagPicker';\nexport { useTagPicker_unstable, useTagPickerBase_unstable } from './useTagPicker';\nexport { useTagPickerContextValues } from './useTagPickerContextValues';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable","useTagPickerBase_unstable","useTagPickerContextValues"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iBAAc;AAYxC,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,qBAAqB,EAAEC,yBAAyB,QAAQ,oBAAiB;AAClF,SAASC,yBAAyB,QAAQ,iCAA8B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { ActiveDescendantContextProvider } from
|
|
3
|
-
import { ListboxProvider } from
|
|
4
|
-
import { Portal } from
|
|
5
|
-
import { assertSlots } from
|
|
6
|
-
import { TagPickerContextProvider } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ActiveDescendantContextProvider } from "@fluentui/react-aria";
|
|
3
|
+
import { ListboxProvider } from "@fluentui/react-combobox";
|
|
4
|
+
import { Portal } from "@fluentui/react-portal";
|
|
5
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
6
|
+
import { TagPickerContextProvider } from "../../contexts/TagPickerContext.js";
|
|
7
7
|
/**
|
|
8
8
|
* Render the final JSX of Picker
|
|
9
9
|
*/ export const renderTagPicker_unstable = (state, contexts)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPicker/renderTagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerState, TagPickerContextValues, TagPickerSlots } from './TagPicker.types';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\nimport { ListboxProvider } from '@fluentui/react-combobox';\nimport { Portal } from '@fluentui/react-portal';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (state: TagPickerState, contexts: TagPickerContextValues): JSXElement => {\n assertSlots<TagPickerSlots>(state);\n return (\n <TagPickerContextProvider value={contexts.picker}>\n <ActiveDescendantContextProvider value={contexts.activeDescendant}>\n <ListboxProvider value={contexts.listbox}>\n {state.trigger}\n {state.popover &&\n (state.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>)}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["React","ActiveDescendantContextProvider","ListboxProvider","Portal","assertSlots","TagPickerContextProvider","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","popover","inline","mountNode"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,wBAAwB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPicker/renderTagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerState, TagPickerContextValues, TagPickerSlots } from './TagPicker.types';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\nimport { ListboxProvider } from '@fluentui/react-combobox';\nimport { Portal } from '@fluentui/react-portal';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (state: TagPickerState, contexts: TagPickerContextValues): JSXElement => {\n assertSlots<TagPickerSlots>(state);\n return (\n <TagPickerContextProvider value={contexts.picker}>\n <ActiveDescendantContextProvider value={contexts.activeDescendant}>\n <ListboxProvider value={contexts.listbox}>\n {state.trigger}\n {state.popover &&\n (state.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>)}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["React","ActiveDescendantContextProvider","ListboxProvider","Portal","assertSlots","TagPickerContextProvider","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","popover","inline","mountNode"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,wBAAwB,QAAQ,qCAAkC;AAE3E;;CAEC,GAED,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC;IAC9DJ,YAA4BG;IAC5B,qBACE,oBAACF;QAAyBI,OAAOD,SAASE,MAAM;qBAC9C,oBAACT;QAAgCQ,OAAOD,SAASG,gBAAgB;qBAC/D,oBAACT;QAAgBO,OAAOD,SAASI,OAAO;OACrCL,MAAMM,OAAO,EACbN,MAAMO,OAAO,IACXP,CAAAA,MAAMQ,MAAM,GAAGR,MAAMO,OAAO,iBAAG,oBAACX;QAAOa,WAAWT,MAAMS,SAAS;OAAGT,MAAMO,OAAO,CAAS;AAKvG,EAAE"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { elementContains, useEventCallback, useId, useMergedRefs } from
|
|
4
|
-
import { optionClassNames } from
|
|
5
|
-
import { resolvePositioningShorthand, usePositioning } from
|
|
6
|
-
import { useActiveDescendant } from
|
|
7
|
-
import { useComboboxBaseState } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { elementContains, useEventCallback, useId, useMergedRefs } from "@fluentui/react-utilities";
|
|
4
|
+
import { optionClassNames } from "@fluentui/react-combobox";
|
|
5
|
+
import { resolvePositioningShorthand, usePositioning } from "@fluentui/react-positioning";
|
|
6
|
+
import { useActiveDescendant } from "@fluentui/react-aria";
|
|
7
|
+
import { useComboboxBaseState } from "@fluentui/react-combobox";
|
|
8
8
|
// Set a default set of fallback positions to try if the dropdown does not fit on screen
|
|
9
9
|
const fallbackPositions = [
|
|
10
10
|
'above',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
export function useTagPickerContextValues(state) {
|
|
4
4
|
const { onOptionClick, registerOption, selectedOptions, selectOption, value, triggerRef, secondaryActionRef, tagPickerGroupRef, targetRef, size, setValue, setOpen, setHasFocus, popoverRef, appearance, clearSelection, getOptionById, getOptionsMatchingValue, open, popoverId, disabled, noPopover } = state;
|
|
5
5
|
return {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useTagPickerButton_unstable } from
|
|
4
|
-
import { renderTagPickerButton_unstable } from
|
|
5
|
-
import { useTagPickerButtonStyles_unstable } from
|
|
6
|
-
import { useCustomStyleHook_unstable } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useTagPickerButton_unstable } from "./useTagPickerButton.js";
|
|
4
|
+
import { renderTagPickerButton_unstable } from "./renderTagPickerButton.js";
|
|
5
|
+
import { useTagPickerButtonStyles_unstable } from "./useTagPickerButtonStyles.styles.js";
|
|
6
|
+
import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
|
|
7
7
|
/**
|
|
8
8
|
* TagPickerButton component -
|
|
9
9
|
* A TagPickerButton is an alternative to TagPickerInput that does not include an input field.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerButton/TagPickerButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerButton_unstable } from './useTagPickerButton';\nimport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nimport { useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\nimport type { TagPickerButtonProps } from './TagPickerButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerButton component -\n * A TagPickerButton is an alternative to TagPickerInput that does not include an input field.\n */\nexport const TagPickerButton: ForwardRefComponent<TagPickerButtonProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerButton_unstable(props, ref);\n\n useTagPickerButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerButtonStyles_unstable')(state);\n return renderTagPickerButton_unstable(state);\n});\n\nTagPickerButton.displayName = 'TagPickerButton';\n"],"names":["React","useTagPickerButton_unstable","renderTagPickerButton_unstable","useTagPickerButtonStyles_unstable","useCustomStyleHook_unstable","TagPickerButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerButton/TagPickerButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerButton_unstable } from './useTagPickerButton';\nimport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nimport { useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\nimport type { TagPickerButtonProps } from './TagPickerButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerButton component -\n * A TagPickerButton is an alternative to TagPickerInput that does not include an input field.\n */\nexport const TagPickerButton: ForwardRefComponent<TagPickerButtonProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerButton_unstable(props, ref);\n\n useTagPickerButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerButtonStyles_unstable')(state);\n return renderTagPickerButton_unstable(state);\n});\n\nTagPickerButton.displayName = 'TagPickerButton';\n"],"names":["React","useTagPickerButton_unstable","renderTagPickerButton_unstable","useTagPickerButtonStyles_unstable","useCustomStyleHook_unstable","TagPickerButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,iCAAiC,QAAQ,uCAAoC;AAEtF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDL,kCAAkCM;IAClCL,4BAA4B,qCAAqCK;IACjE,OAAOP,+BAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TagPickerButton } from
|
|
2
|
-
export { renderTagPickerButton_unstable } from
|
|
3
|
-
export { useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from
|
|
4
|
-
export { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from
|
|
1
|
+
export { TagPickerButton } from "./TagPickerButton.js";
|
|
2
|
+
export { renderTagPickerButton_unstable } from "./renderTagPickerButton.js";
|
|
3
|
+
export { useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from "./useTagPickerButton.js";
|
|
4
|
+
export { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from "./useTagPickerButtonStyles.styles.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerButton/index.ts"],"sourcesContent":["export { TagPickerButton } from './TagPickerButton';\nexport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nexport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nexport { useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from './useTagPickerButton';\nexport { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerButton/index.ts"],"sourcesContent":["export { TagPickerButton } from './TagPickerButton';\nexport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nexport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nexport { useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from './useTagPickerButton';\nexport { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAoB;AAQpD,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,EAAEC,+BAA+B,QAAQ,0BAAuB;AACpG,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,uCAAoC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
-
import { assertSlots } from
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of PickerButton
|
|
5
5
|
*/ export const renderTagPickerButton_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerButton/renderTagPickerButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerButton/renderTagPickerButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TagPickerButtonBaseState, TagPickerButtonSlots } from './TagPickerButton.types';\n\n/**\n * Render the final JSX of PickerButton\n */\nexport const renderTagPickerButton_unstable = (state: TagPickerButtonBaseState): JSXElement => {\n assertSlots<TagPickerButtonSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTagPickerButton_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useActiveDescendantContext } from
|
|
3
|
-
import { useTagPickerContext_unstable } from
|
|
4
|
-
import { useButtonTriggerSlot } from
|
|
2
|
+
import { useActiveDescendantContext } from "@fluentui/react-aria";
|
|
3
|
+
import { useTagPickerContext_unstable } from "../../contexts/TagPickerContext.js";
|
|
4
|
+
import { useButtonTriggerSlot } from "@fluentui/react-combobox";
|
|
5
|
+
import { useTabsterEscapeIgnore } from "../../utils/useTabsterEscapeIgnore.js";
|
|
5
6
|
/**
|
|
6
7
|
* Create the base state required to render TagPickerButton, without design-only props.
|
|
7
8
|
*
|
|
@@ -57,9 +58,14 @@ import { useButtonTriggerSlot } from '@fluentui/react-combobox';
|
|
|
57
58
|
* @param ref - reference to root HTMLButtonElement of TagPickerButton
|
|
58
59
|
*/ export const useTagPickerButton_unstable = (props, ref)=>{
|
|
59
60
|
const baseState = useTagPickerButtonBase_unstable(props, ref);
|
|
61
|
+
const open = useTagPickerContext_unstable((ctx)=>ctx.open);
|
|
60
62
|
const size = useTagPickerContext_unstable((ctx)=>ctx.size);
|
|
61
63
|
return {
|
|
62
64
|
...baseState,
|
|
63
|
-
size
|
|
65
|
+
size,
|
|
66
|
+
root: {
|
|
67
|
+
...useTabsterEscapeIgnore(baseState.root, open),
|
|
68
|
+
...baseState.root
|
|
69
|
+
}
|
|
64
70
|
};
|
|
65
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the base state required to render TagPickerButton, without design-only props.\n *\n * @param props - props from this instance of TagPickerButton (without size, appearance)\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButtonBase_unstable = (\n props: TagPickerButtonBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonBaseState => {\n const { controller: activeDescendantController } = useActiveDescendantContext();\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const value = useTagPickerContext_unstable(ctx => ctx.value);\n const hasSelectedOption = useTagPickerContext_unstable(ctx => ctx.selectedOptions.length > 0);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const getOptionById = useTagPickerContext_unstable(ctx => ctx.getOptionById);\n const selectOption = useTagPickerContext_unstable(ctx => ctx.selectOption);\n const setHasFocus = useTagPickerContext_unstable(ctx => ctx.setHasFocus);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n\n // casting is required here as triggerRef can either be button or input,\n // but in this case we can assure it's a button\n const root = useButtonTriggerSlot(props, triggerRef as React.RefObject<HTMLButtonElement>, {\n activeDescendantController,\n defaultProps: {\n type: 'button',\n tabIndex: 0,\n children:\n value ||\n // @ts-expect-error - FIXME: TS2339: Property 'placeholder' does not exist on type 'TagPickerButtonBaseProps'\n props.placeholder,\n 'aria-controls': open ? popoverId : undefined,\n ref,\n },\n state: {\n getOptionById,\n open,\n selectOption,\n setHasFocus,\n setOpen,\n multiselect: true,\n },\n });\n\n return {\n components: {\n root: 'button',\n },\n root,\n hasSelectedOption,\n };\n};\n\n/**\n * Create the state required to render TagPickerButton.\n *\n * The returned state can be modified with hooks such as useTagPickerButtonStyles_unstable,\n * before being passed to renderTagPickerButton_unstable.\n *\n * @param props - props from this instance of TagPickerButton\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\n const baseState = useTagPickerButtonBase_unstable(props, ref);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n return {\n ...baseState,\n size,\n };\n};\n"],"names":["useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTagPickerButtonBase_unstable","props","ref","controller","activeDescendantController","triggerRef","ctx","open","value","hasSelectedOption","selectedOptions","length","popoverId","getOptionById","selectOption","setHasFocus","setOpen","root","defaultProps","type","tabIndex","children","placeholder","undefined","state","multiselect","components","useTagPickerButton_unstable","baseState","size"],"mappings":"AAAA;AAGA,SAASA,0BAA0B,QAAQ,uBAAuB;AAOlE,SAASC,4BAA4B,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\nimport { useTabsterEscapeIgnore } from '../../utils/useTabsterEscapeIgnore';\n\n/**\n * Create the base state required to render TagPickerButton, without design-only props.\n *\n * @param props - props from this instance of TagPickerButton (without size, appearance)\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButtonBase_unstable = (\n props: TagPickerButtonBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonBaseState => {\n const { controller: activeDescendantController } = useActiveDescendantContext();\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const value = useTagPickerContext_unstable(ctx => ctx.value);\n const hasSelectedOption = useTagPickerContext_unstable(ctx => ctx.selectedOptions.length > 0);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const getOptionById = useTagPickerContext_unstable(ctx => ctx.getOptionById);\n const selectOption = useTagPickerContext_unstable(ctx => ctx.selectOption);\n const setHasFocus = useTagPickerContext_unstable(ctx => ctx.setHasFocus);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n\n // casting is required here as triggerRef can either be button or input,\n // but in this case we can assure it's a button\n const root = useButtonTriggerSlot(props, triggerRef as React.RefObject<HTMLButtonElement>, {\n activeDescendantController,\n defaultProps: {\n type: 'button',\n tabIndex: 0,\n children:\n value ||\n // @ts-expect-error - FIXME: TS2339: Property 'placeholder' does not exist on type 'TagPickerButtonBaseProps'\n props.placeholder,\n 'aria-controls': open ? popoverId : undefined,\n ref,\n },\n state: {\n getOptionById,\n open,\n selectOption,\n setHasFocus,\n setOpen,\n multiselect: true,\n },\n });\n\n return {\n components: {\n root: 'button',\n },\n root,\n hasSelectedOption,\n };\n};\n\n/**\n * Create the state required to render TagPickerButton.\n *\n * The returned state can be modified with hooks such as useTagPickerButtonStyles_unstable,\n * before being passed to renderTagPickerButton_unstable.\n *\n * @param props - props from this instance of TagPickerButton\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\n const baseState = useTagPickerButtonBase_unstable(props, ref);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n return {\n ...baseState,\n size,\n root: {\n ...useTabsterEscapeIgnore(baseState.root, open),\n ...baseState.root,\n },\n };\n};\n"],"names":["useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTabsterEscapeIgnore","useTagPickerButtonBase_unstable","props","ref","controller","activeDescendantController","triggerRef","ctx","open","value","hasSelectedOption","selectedOptions","length","popoverId","getOptionById","selectOption","setHasFocus","setOpen","root","defaultProps","type","tabIndex","children","placeholder","undefined","state","multiselect","components","useTagPickerButton_unstable","baseState","size"],"mappings":"AAAA;AAGA,SAASA,0BAA0B,QAAQ,uBAAuB;AAOlE,SAASC,4BAA4B,QAAQ,qCAAkC;AAC/E,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,wCAAqC;AAE5E;;;;;CAKC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGR;IACnD,MAAMS,aAAaR,6BAA6BS,CAAAA,MAAOA,IAAID,UAAU;IACrE,MAAME,OAAOV,6BAA6BS,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,QAAQX,6BAA6BS,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,oBAAoBZ,6BAA6BS,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,YAAYf,6BAA6BS,CAAAA,MAAOA,IAAIM,SAAS;IACnE,MAAMC,gBAAgBhB,6BAA6BS,CAAAA,MAAOA,IAAIO,aAAa;IAC3E,MAAMC,eAAejB,6BAA6BS,CAAAA,MAAOA,IAAIQ,YAAY;IACzE,MAAMC,cAAclB,6BAA6BS,CAAAA,MAAOA,IAAIS,WAAW;IACvE,MAAMC,UAAUnB,6BAA6BS,CAAAA,MAAOA,IAAIU,OAAO;IAE/D,wEAAwE;IACxE,+CAA+C;IAC/C,MAAMC,OAAOnB,qBAAqBG,OAAOI,YAAkD;QACzFD;QACAc,cAAc;YACZC,MAAM;YACNC,UAAU;YACVC,UACEb,SACA,6GAA6G;YAC7GP,MAAMqB,WAAW;YACnB,iBAAiBf,OAAOK,YAAYW;YACpCrB;QACF;QACAsB,OAAO;YACLX;YACAN;YACAO;YACAC;YACAC;YACAS,aAAa;QACf;IACF;IAEA,OAAO;QACLC,YAAY;YACVT,MAAM;QACR;QACAA;QACAR;IACF;AACF,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMkB,8BAA8B,CACzC1B,OACAC;IAEA,MAAM0B,YAAY5B,gCAAgCC,OAAOC;IACzD,MAAMK,OAAOV,6BAA6BS,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMsB,OAAOhC,6BAA6BS,CAAAA,MAAOA,IAAIuB,IAAI;IAEzD,OAAO;QACL,GAAGD,SAAS;QACZC;QACAZ,MAAM;YACJ,GAAGlB,uBAAuB6B,UAAUX,IAAI,EAAEV,KAAK;YAC/C,GAAGqB,UAAUX,IAAI;QACnB;IACF;AACF,EAAE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { __styles, mergeClasses, shorthands } from
|
|
4
|
-
import { tokens, typographyStyles } from
|
|
3
|
+
import { __styles, mergeClasses, shorthands } from "@griffel/react";
|
|
4
|
+
import { tokens, typographyStyles } from "@fluentui/react-theme";
|
|
5
5
|
export const tagPickerButtonClassNames = {
|
|
6
6
|
root: 'fui-TagPickerButton'
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","tagPickerButtonClassNames","root","useStyles","button","Bt984gj","sshi5w","De3pzq","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","B7ck84d","sj55zd","i8kkvl","Bceei9c","Bahqtrf","fsow6f","Bh6795r","Brovlpu","placeholder","medium","Be2twd7","Bhrd7zp","Bg96gwp","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","large","outline","outlineInteractive","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","B6oc9vd","ak43y8","wmxk5l","B50zh58","underline","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","invalidUnderline","disabled","Bcq6wej","Jcjdmf","sc4o1m","Bosien3","disabledText","hidden","mc9l5x","visuallyHidden","Bh84pgu","Bqenvij","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","B68tc82","Bmxbyg5","Bpg54ce","a9b677","qhf8xq","d","p","f","h","a","m","useTagPickerButtonStyles_unstable","state","styles","className","size","hasSelectedOption"],"sources":["useTagPickerButtonStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, shorthands } from
|
|
1
|
+
{"version":3,"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","tagPickerButtonClassNames","root","useStyles","button","Bt984gj","sshi5w","De3pzq","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","B7ck84d","sj55zd","i8kkvl","Bceei9c","Bahqtrf","fsow6f","Bh6795r","Brovlpu","placeholder","medium","Be2twd7","Bhrd7zp","Bg96gwp","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","large","outline","outlineInteractive","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","B6oc9vd","ak43y8","wmxk5l","B50zh58","underline","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","invalidUnderline","disabled","Bcq6wej","Jcjdmf","sc4o1m","Bosien3","disabledText","hidden","mc9l5x","visuallyHidden","Bh84pgu","Bqenvij","jrapky","Frg6f3","t21cq0","B6of3ja","B74szlk","B68tc82","Bmxbyg5","Bpg54ce","a9b677","qhf8xq","d","p","f","h","a","m","useTagPickerButtonStyles_unstable","state","styles","className","size","hasSelectedOption"],"sources":["useTagPickerButtonStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, shorthands } from \"@griffel/react\";\nimport { tokens, typographyStyles } from \"@fluentui/react-theme\";\nexport const tagPickerButtonClassNames = {\n root: 'fui-TagPickerButton'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n button: {\n alignItems: 'center',\n minHeight: '32px',\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXXS,\n cursor: 'pointer',\n fontFamily: tokens.fontFamilyBase,\n textAlign: 'left',\n flexGrow: 1,\n '&:focus': {\n outlineStyle: 'none'\n }\n },\n placeholder: {\n color: tokens.colorNeutralForeground4\n },\n // size variants\n medium: {\n ...typographyStyles.caption1,\n padding: `3px ${tokens.spacingHorizontalSNudge} 3px ${`calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`}`\n },\n large: {\n ...typographyStyles.body1,\n padding: `5px ${tokens.spacingHorizontalMNudge} 5px ${`calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`}`\n },\n 'extra-large': {\n columnGap: tokens.spacingHorizontalSNudge,\n ...typographyStyles.body2,\n padding: `7px ${tokens.spacingHorizontalM} 7px ${`calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`}`\n },\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible\n },\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible\n }\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0'\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid transparent`\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid transparent`\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2)\n }\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2\n }\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText')\n }\n },\n disabledText: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed'\n },\n hidden: {\n display: 'none'\n },\n visuallyHidden: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute'\n }\n});\n/**\n * Apply styling to the PickerButton slots based on the state\n */ export const useTagPickerButtonStyles_unstable = (state)=>{\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerButtonClassNames.root, styles.button, styles[state.size], state.hasSelectedOption && styles.visuallyHidden, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,yBAAyB,GAAG;EACrCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;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AA;IAAAC,OAAA;IAAA2C,MAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;IAAAC,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;EAAAC,CAAA;EAAAC,CAAA;EAAAC,CAAA;EAAAC,CAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;IAAAA,CAAA;EAAA;AAAA,CAiGrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,iCAAiC,GAAIC,KAAK,IAAG;EAC1D,MAAMC,MAAM,GAAG5F,SAAS,CAAC,CAAC;EAC1B;EACA2F,KAAK,CAAC5F,IAAI,CAAC8F,SAAS,GAAGnG,YAAY,CAACI,yBAAyB,CAACC,IAAI,EAAE6F,MAAM,CAAC3F,MAAM,EAAE2F,MAAM,CAACD,KAAK,CAACG,IAAI,CAAC,EAAEH,KAAK,CAACI,iBAAiB,IAAIH,MAAM,CAACrB,cAAc,EAAEoB,KAAK,CAAC5F,IAAI,CAAC8F,SAAS,CAAC;EAC9K,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { makeStyles, mergeClasses, shorthands } from
|
|
3
|
-
import { tokens, typographyStyles } from
|
|
2
|
+
import { makeStyles, mergeClasses, shorthands } from "@griffel/react";
|
|
3
|
+
import { tokens, typographyStyles } from "@fluentui/react-theme";
|
|
4
4
|
export const tagPickerButtonClassNames = {
|
|
5
5
|
root: 'fui-TagPickerButton'
|
|
6
6
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useTagPickerControl_unstable } from
|
|
4
|
-
import { renderTagPickerControl_unstable } from
|
|
5
|
-
import { useTagPickerControlStyles_unstable } from
|
|
6
|
-
import { useCustomStyleHook_unstable } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useTagPickerControl_unstable } from "./useTagPickerControl.js";
|
|
4
|
+
import { renderTagPickerControl_unstable } from "./renderTagPickerControl.js";
|
|
5
|
+
import { useTagPickerControlStyles_unstable } from "./useTagPickerControlStyles.styles.js";
|
|
6
|
+
import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
|
|
7
7
|
/**
|
|
8
8
|
* TagPickerControl component -
|
|
9
9
|
* A TagPickerControl is a composite component that controls actions and state for a TagPicker.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerControl/TagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerControl_unstable } from './useTagPickerControl';\nimport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nimport { useTagPickerControlStyles_unstable } from './useTagPickerControlStyles.styles';\nimport type { TagPickerControlProps } from './TagPickerControl.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerControl component -\n * A TagPickerControl is a composite component that controls actions and state for a TagPicker.\n */\nexport const TagPickerControl: ForwardRefComponent<TagPickerControlProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerControl_unstable(props, ref);\n\n useTagPickerControlStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerControlStyles_unstable')(state);\n return renderTagPickerControl_unstable(state);\n});\n\nTagPickerControl.displayName = 'TagPickerControl';\n"],"names":["React","useTagPickerControl_unstable","renderTagPickerControl_unstable","useTagPickerControlStyles_unstable","useCustomStyleHook_unstable","TagPickerControl","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerControl/TagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerControl_unstable } from './useTagPickerControl';\nimport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nimport { useTagPickerControlStyles_unstable } from './useTagPickerControlStyles.styles';\nimport type { TagPickerControlProps } from './TagPickerControl.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerControl component -\n * A TagPickerControl is a composite component that controls actions and state for a TagPicker.\n */\nexport const TagPickerControl: ForwardRefComponent<TagPickerControlProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerControl_unstable(props, ref);\n\n useTagPickerControlStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerControlStyles_unstable')(state);\n return renderTagPickerControl_unstable(state);\n});\n\nTagPickerControl.displayName = 'TagPickerControl';\n"],"names":["React","useTagPickerControl_unstable","renderTagPickerControl_unstable","useTagPickerControlStyles_unstable","useCustomStyleHook_unstable","TagPickerControl","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,wCAAqC;AAExF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,iCAA+DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQR,6BAA6BM,OAAOC;IAElDL,mCAAmCM;IACnCL,4BAA4B,sCAAsCK;IAClE,OAAOP,gCAAgCO;AACzC,GAAG;AAEHJ,iBAAiBK,WAAW,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TagPickerControl } from
|
|
2
|
-
export { renderTagPickerControl_unstable } from
|
|
3
|
-
export { useTagPickerControl_unstable, useTagPickerControlBase_unstable } from
|
|
4
|
-
export { iconSizes, tagPickerControlAsideWidthToken, tagPickerControlClassNames, useTagPickerControlStyles_unstable } from
|
|
1
|
+
export { TagPickerControl } from "./TagPickerControl.js";
|
|
2
|
+
export { renderTagPickerControl_unstable } from "./renderTagPickerControl.js";
|
|
3
|
+
export { useTagPickerControl_unstable, useTagPickerControlBase_unstable } from "./useTagPickerControl.js";
|
|
4
|
+
export { iconSizes, tagPickerControlAsideWidthToken, tagPickerControlClassNames, useTagPickerControlStyles_unstable } from "./useTagPickerControlStyles.styles.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerControl/index.ts"],"sourcesContent":["export { TagPickerControl } from './TagPickerControl';\nexport type {\n TagPickerControlBaseState,\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\nexport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nexport { useTagPickerControl_unstable, useTagPickerControlBase_unstable } from './useTagPickerControl';\nexport {\n iconSizes,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n} from './useTagPickerControlStyles.styles';\n"],"names":["TagPickerControl","renderTagPickerControl_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable","iconSizes","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerControl/index.ts"],"sourcesContent":["export { TagPickerControl } from './TagPickerControl';\nexport type {\n TagPickerControlBaseState,\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\nexport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nexport { useTagPickerControl_unstable, useTagPickerControlBase_unstable } from './useTagPickerControl';\nexport {\n iconSizes,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n} from './useTagPickerControlStyles.styles';\n"],"names":["TagPickerControl","renderTagPickerControl_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable","iconSizes","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,wBAAqB;AAStD,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,4BAA4B,EAAEC,gCAAgC,QAAQ,2BAAwB;AACvG,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,QAC7B,wCAAqC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
-
import { assertSlots } from
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of PickerControl
|
|
5
5
|
*/ export const renderTagPickerControl_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerControl/renderTagPickerControl.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type {\n
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerControl/renderTagPickerControl.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type {\n TagPickerControlBaseState,\n TagPickerControlSlots,\n TagPickerControlInternalSlots,\n} from './TagPickerControl.types';\n\n/**\n * Render the final JSX of PickerControl\n */\nexport const renderTagPickerControl_unstable = (state: TagPickerControlBaseState): JSXElement => {\n assertSlots<TagPickerControlSlots & TagPickerControlInternalSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.aside && (\n <state.aside>\n {state.secondaryAction && <state.secondaryAction />}\n {state.expandIcon && <state.expandIcon />}\n </state.aside>\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTagPickerControl_unstable","state","root","children","aside","secondaryAction","expandIcon"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAQxD;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9CF,YAAmEE;IAEnE,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAMC,IAAI,CAACC,QAAQ;YACnBF,MAAMG,KAAK,kBACV,MAACH,MAAMG,KAAK;;oBACTH,MAAMI,eAAe,kBAAI,KAACJ,MAAMI,eAAe;oBAC/CJ,MAAMK,UAAU,kBAAI,KAACL,MAAMK,UAAU;;;;;AAKhD,EAAE"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { elementContains, getIntrinsicElementProps, slot, useEventCallback, useId, useMergedRefs } from
|
|
4
|
-
import { useFluent_unstable } from
|
|
5
|
-
import {
|
|
6
|
-
import { ChevronDownRegular } from
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { elementContains, getIntrinsicElementProps, slot, useEventCallback, useId, useMergedRefs } from "@fluentui/react-utilities";
|
|
4
|
+
import { useFluent_unstable } from "@fluentui/react-shared-contexts";
|
|
5
|
+
import { useFieldContext_unstable } from "@fluentui/react-field";
|
|
6
|
+
import { ChevronDownRegular } from "@fluentui/react-icons";
|
|
7
|
+
import { tagPickerControlAsideWidthToken } from "./useTagPickerControlStyles.styles.js";
|
|
8
|
+
import { useTagPickerContext_unstable } from "../../contexts/TagPickerContext.js";
|
|
9
|
+
import { useExpandLabel } from "../../utils/useExpandLabel.js";
|
|
10
|
+
import { useResizeObserverRef } from "../../utils/useResizeObserverRef.js";
|
|
11
11
|
/**
|
|
12
12
|
* Create the base state required to render TagPickerControl, without design-only state.
|
|
13
13
|
*
|
|
@@ -42,11 +42,9 @@ import { useExpandLabel } from '../../utils/useExpandLabel';
|
|
|
42
42
|
secondaryAction.ref = secondaryActionRef;
|
|
43
43
|
}
|
|
44
44
|
const expandIcon = slot.optional(props.expandIcon, {
|
|
45
|
-
renderByDefault: !noPopover,
|
|
46
45
|
defaultProps: {
|
|
47
46
|
'aria-expanded': open,
|
|
48
47
|
'aria-disabled': disabled ? 'true' : undefined,
|
|
49
|
-
children: /*#__PURE__*/ React.createElement(ChevronDownRegular, null),
|
|
50
48
|
role: 'button'
|
|
51
49
|
},
|
|
52
50
|
elementType: 'span'
|
|
@@ -133,7 +131,15 @@ import { useExpandLabel } from '../../utils/useExpandLabel';
|
|
|
133
131
|
* @param props - props from this instance of PickerControl
|
|
134
132
|
* @param ref - reference to root HTMLDivElement of PickerControl
|
|
135
133
|
*/ export const useTagPickerControl_unstable = (props, ref)=>{
|
|
136
|
-
const
|
|
134
|
+
const noPopover = useTagPickerContext_unstable((ctx)=>{
|
|
135
|
+
var _ctx_noPopover;
|
|
136
|
+
return (_ctx_noPopover = ctx.noPopover) !== null && _ctx_noPopover !== void 0 ? _ctx_noPopover : false;
|
|
137
|
+
});
|
|
138
|
+
const baseProps = !noPopover && props.expandIcon === undefined ? {
|
|
139
|
+
...props,
|
|
140
|
+
expandIcon: /*#__PURE__*/ React.createElement(ChevronDownRegular, null)
|
|
141
|
+
} : props;
|
|
142
|
+
const baseState = useTagPickerControlBase_unstable(baseProps, ref);
|
|
137
143
|
const size = useTagPickerContext_unstable((ctx)=>ctx.size);
|
|
138
144
|
const appearance = useTagPickerContext_unstable((ctx)=>ctx.appearance);
|
|
139
145
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport {\n elementContains,\n getIntrinsicElementProps,\n slot,\n useEventCallback,\n useId,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport type { TagPickerControlBaseState, TagPickerControlProps, TagPickerControlState } from './TagPickerControl.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { useResizeObserverRef } from '../../utils/useResizeObserverRef';\nimport { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.styles';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { useExpandLabel } from '../../utils/useExpandLabel';\n\n/**\n * Create the base state required to render TagPickerControl, without design-only state.\n *\n * @param props - props from this instance of TagPickerControl\n * @param ref - reference to root HTMLDivElement of TagPickerControl\n */\nexport const useTagPickerControlBase_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlBaseState => {\n const targetRef = useTagPickerContext_unstable(ctx => ctx.targetRef);\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n const secondaryInnerActionRef = useTagPickerContext_unstable(ctx => ctx.secondaryActionRef);\n const disabled = useTagPickerContext_unstable(ctx => ctx.disabled);\n const invalid = useFieldContext_unstable()?.validationState === 'error';\n const noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n\n const { targetDocument } = useFluent_unstable();\n const tagPickerId = useId('tagPicker-');\n const rafIdRef = React.useRef<number | null>(null);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const expandIconRef = React.useRef<HTMLSpanElement>(null);\n const asideRef = React.useRef<HTMLSpanElement>(null);\n\n const secondaryAction = slot.optional(props.secondaryAction, {\n elementType: 'span',\n });\n const secondaryActionRef = useMergedRefs(secondaryInnerActionRef, secondaryAction?.ref);\n if (secondaryAction) {\n secondaryAction.ref = secondaryActionRef;\n }\n\n const expandIcon = slot.optional(props.expandIcon, {\n renderByDefault: !noPopover,\n defaultProps: {\n 'aria-expanded': open,\n 'aria-disabled': disabled ? 'true' : undefined,\n children: <ChevronDownRegular />,\n role: 'button',\n },\n elementType: 'span',\n });\n\n const expandIconMergeRef = useMergedRefs(expandIcon?.ref, expandIconRef);\n if (expandIcon) {\n expandIcon.ref = expandIconMergeRef;\n }\n\n const observerRef = useResizeObserverRef<HTMLSpanElement>(([entry]) => {\n const targetWindow = targetDocument?.defaultView;\n\n if (targetWindow) {\n rafIdRef.current = targetWindow.requestAnimationFrame(() => {\n innerRef.current?.style.setProperty(tagPickerControlAsideWidthToken, `${entry.contentRect.width}px`);\n });\n }\n });\n const aside = slot.optional<ExtractSlotProps<Slot<'span'>>>(undefined, {\n elementType: 'span',\n renderByDefault: Boolean(secondaryAction || expandIcon),\n defaultProps: {\n ref: observerRef,\n },\n });\n const mergedAsideRefs = useMergedRefs(asideRef, aside?.ref);\n if (aside) {\n aside.ref = mergedAsideRefs;\n }\n\n const handleMouseDown = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n if (\n elementContains(expandIconRef.current, event.target as Node) ||\n event.target === innerRef.current ||\n event.target === tagPickerGroupRef.current ||\n event.target === asideRef.current\n ) {\n event.preventDefault();\n setOpen(event, !open);\n triggerRef.current?.focus();\n }\n });\n\n const state: TagPickerControlBaseState = {\n components: {\n root: 'div',\n expandIcon: 'span',\n secondaryAction: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, targetRef, innerRef),\n 'aria-owns': open && !noPopover ? popoverId : undefined,\n ...props,\n onMouseDown: handleMouseDown,\n }),\n { elementType: 'div' },\n ),\n aside,\n expandIcon,\n secondaryAction,\n disabled,\n invalid,\n };\n\n const expandIconLabelRef = useExpandLabel({\n tagPickerId,\n state: state as Pick<TagPickerControlBaseState, 'expandIcon'>,\n });\n\n const expandIconLabelMergeRef = useMergedRefs(expandIcon?.ref, expandIconLabelRef);\n if (state.expandIcon) {\n state.expandIcon.ref = expandIconLabelMergeRef;\n }\n\n React.useEffect(() => {\n if (rafIdRef.current && targetDocument?.defaultView) {\n targetDocument.defaultView.cancelAnimationFrame(rafIdRef.current);\n }\n }, [targetDocument]);\n\n return state;\n};\n\n/**\n * Create the state required to render PickerControl.\n *\n * The returned state can be modified with hooks such as usePickerControlStyles_unstable,\n * before being passed to renderPickerControl_unstable.\n *\n * @param props - props from this instance of PickerControl\n * @param ref - reference to root HTMLDivElement of PickerControl\n */\nexport const useTagPickerControl_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlState => {\n const baseState = useTagPickerControlBase_unstable(props, ref);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n\n return {\n ...baseState,\n size,\n appearance,\n };\n};\n"],"names":["React","elementContains","getIntrinsicElementProps","slot","useEventCallback","useId","useMergedRefs","useFluent_unstable","useTagPickerContext_unstable","ChevronDownRegular","useResizeObserverRef","tagPickerControlAsideWidthToken","useFieldContext_unstable","useExpandLabel","useTagPickerControlBase_unstable","props","ref","targetRef","ctx","triggerRef","tagPickerGroupRef","open","popoverId","setOpen","secondaryInnerActionRef","secondaryActionRef","disabled","invalid","validationState","noPopover","targetDocument","tagPickerId","rafIdRef","useRef","innerRef","expandIconRef","asideRef","secondaryAction","optional","elementType","expandIcon","renderByDefault","defaultProps","undefined","children","role","expandIconMergeRef","observerRef","entry","targetWindow","defaultView","current","requestAnimationFrame","style","setProperty","contentRect","width","aside","Boolean","mergedAsideRefs","handleMouseDown","event","isDefaultPrevented","target","preventDefault","focus","state","components","root","always","onMouseDown","expandIconLabelRef","expandIconLabelMergeRef","useEffect","cancelAnimationFrame","useTagPickerControl_unstable","baseState","size","appearance"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,gBAAgB,EAChBC,KAAK,EACLC,aAAa,QACR,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AAErE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SAASC,oBAAoB,QAAQ,mCAAmC;AACxE,SAASC,+BAA+B,QAAQ,qCAAqC;AACrF,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,cAAc,QAAQ,6BAA6B;AAE5D;;;;;CAKC,GACD,OAAO,MAAMC,mCAAmC,CAC9CC,OACAC;QAUgBJ;IARhB,MAAMK,YAAYT,6BAA6BU,CAAAA,MAAOA,IAAID,SAAS;IACnE,MAAME,aAAaX,6BAA6BU,CAAAA,MAAOA,IAAIC,UAAU;IACrE,MAAMC,oBAAoBZ,6BAA6BU,CAAAA,MAAOA,IAAIE,iBAAiB;IACnF,MAAMC,OAAOb,6BAA6BU,CAAAA,MAAOA,IAAIG,IAAI;IACzD,MAAMC,YAAYd,6BAA6BU,CAAAA,MAAOA,IAAII,SAAS;IACnE,MAAMC,UAAUf,6BAA6BU,CAAAA,MAAOA,IAAIK,OAAO;IAC/D,MAAMC,0BAA0BhB,6BAA6BU,CAAAA,MAAOA,IAAIO,kBAAkB;IAC1F,MAAMC,WAAWlB,6BAA6BU,CAAAA,MAAOA,IAAIQ,QAAQ;IACjE,MAAMC,UAAUf,EAAAA,4BAAAA,wCAAAA,gDAAAA,0BAA4BgB,eAAe,MAAK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GAAGwD;IACzB;IAEAxE,MAAMyE,SAAS,CAAC;QACd,IAAIzC,SAASmB,OAAO,KAAIrB,2BAAAA,qCAAAA,eAAgBoB,WAAW,GAAE;YACnDpB,eAAeoB,WAAW,CAACwB,oBAAoB,CAAC1C,SAASmB,OAAO;QAClE;IACF,GAAG;QAACrB;KAAe;IAEnB,OAAOoC;AACT,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMS,+BAA+B,CAC1C5D,OACAC;IAEA,MAAM4D,YAAY9D,iCAAiCC,OAAOC;IAC1D,MAAM6D,OAAOrE,6BAA6BU,CAAAA,MAAOA,IAAI2D,IAAI;IACzD,MAAMC,aAAatE,6BAA6BU,CAAAA,MAAOA,IAAI4D,UAAU;IAErE,OAAO;QACL,GAAGF,SAAS;QACZC;QACAC;IACF;AACF,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport {\n elementContains,\n getIntrinsicElementProps,\n slot,\n useEventCallback,\n useId,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\n\nimport type { TagPickerControlBaseState, TagPickerControlProps, TagPickerControlState } from './TagPickerControl.types';\nimport { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.styles';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useExpandLabel } from '../../utils/useExpandLabel';\nimport { useResizeObserverRef } from '../../utils/useResizeObserverRef';\n\n/**\n * Create the base state required to render TagPickerControl, without design-only state.\n *\n * @param props - props from this instance of TagPickerControl\n * @param ref - reference to root HTMLDivElement of TagPickerControl\n */\nexport const useTagPickerControlBase_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlBaseState => {\n const targetRef = useTagPickerContext_unstable(ctx => ctx.targetRef);\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n const secondaryInnerActionRef = useTagPickerContext_unstable(ctx => ctx.secondaryActionRef);\n const disabled = useTagPickerContext_unstable(ctx => ctx.disabled);\n const invalid = useFieldContext_unstable()?.validationState === 'error';\n const noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n\n const { targetDocument } = useFluent_unstable();\n const tagPickerId = useId('tagPicker-');\n const rafIdRef = React.useRef<number | null>(null);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const expandIconRef = React.useRef<HTMLSpanElement>(null);\n const asideRef = React.useRef<HTMLSpanElement>(null);\n\n const secondaryAction = slot.optional(props.secondaryAction, {\n elementType: 'span',\n });\n const secondaryActionRef = useMergedRefs(secondaryInnerActionRef, secondaryAction?.ref);\n if (secondaryAction) {\n secondaryAction.ref = secondaryActionRef;\n }\n\n const expandIcon = slot.optional(props.expandIcon, {\n defaultProps: {\n 'aria-expanded': open,\n 'aria-disabled': disabled ? 'true' : undefined,\n role: 'button',\n },\n elementType: 'span',\n });\n\n const expandIconMergeRef = useMergedRefs(expandIcon?.ref, expandIconRef);\n if (expandIcon) {\n expandIcon.ref = expandIconMergeRef;\n }\n\n const observerRef = useResizeObserverRef<HTMLSpanElement>(([entry]) => {\n const targetWindow = targetDocument?.defaultView;\n\n if (targetWindow) {\n rafIdRef.current = targetWindow.requestAnimationFrame(() => {\n innerRef.current?.style.setProperty(tagPickerControlAsideWidthToken, `${entry.contentRect.width}px`);\n });\n }\n });\n const aside = slot.optional<ExtractSlotProps<Slot<'span'>>>(undefined, {\n elementType: 'span',\n renderByDefault: Boolean(secondaryAction || expandIcon),\n defaultProps: {\n ref: observerRef,\n },\n });\n const mergedAsideRefs = useMergedRefs(asideRef, aside?.ref);\n if (aside) {\n aside.ref = mergedAsideRefs;\n }\n\n const handleMouseDown = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n if (\n elementContains(expandIconRef.current, event.target as Node) ||\n event.target === innerRef.current ||\n event.target === tagPickerGroupRef.current ||\n event.target === asideRef.current\n ) {\n event.preventDefault();\n setOpen(event, !open);\n triggerRef.current?.focus();\n }\n });\n\n const state: TagPickerControlBaseState = {\n components: {\n root: 'div',\n expandIcon: 'span',\n secondaryAction: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, targetRef, innerRef),\n 'aria-owns': open && !noPopover ? popoverId : undefined,\n ...props,\n onMouseDown: handleMouseDown,\n }),\n { elementType: 'div' },\n ),\n aside,\n expandIcon,\n secondaryAction,\n disabled,\n invalid,\n };\n\n const expandIconLabelRef = useExpandLabel({\n tagPickerId,\n state: state as Pick<TagPickerControlBaseState, 'expandIcon'>,\n });\n\n const expandIconLabelMergeRef = useMergedRefs(expandIcon?.ref, expandIconLabelRef);\n if (state.expandIcon) {\n state.expandIcon.ref = expandIconLabelMergeRef;\n }\n\n React.useEffect(() => {\n if (rafIdRef.current && targetDocument?.defaultView) {\n targetDocument.defaultView.cancelAnimationFrame(rafIdRef.current);\n }\n }, [targetDocument]);\n\n return state;\n};\n\n/**\n * Create the state required to render PickerControl.\n *\n * The returned state can be modified with hooks such as usePickerControlStyles_unstable,\n * before being passed to renderPickerControl_unstable.\n *\n * @param props - props from this instance of PickerControl\n * @param ref - reference to root HTMLDivElement of PickerControl\n */\nexport const useTagPickerControl_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlState => {\n const noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n const baseProps =\n !noPopover && props.expandIcon === undefined\n ? {\n ...props,\n expandIcon: <ChevronDownRegular />,\n }\n : props;\n const baseState = useTagPickerControlBase_unstable(baseProps, ref);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n\n return {\n ...baseState,\n size,\n appearance,\n };\n};\n"],"names":["React","elementContains","getIntrinsicElementProps","slot","useEventCallback","useId","useMergedRefs","useFluent_unstable","useFieldContext_unstable","ChevronDownRegular","tagPickerControlAsideWidthToken","useTagPickerContext_unstable","useExpandLabel","useResizeObserverRef","useTagPickerControlBase_unstable","props","ref","targetRef","ctx","triggerRef","tagPickerGroupRef","open","popoverId","setOpen","secondaryInnerActionRef","secondaryActionRef","disabled","invalid","validationState","noPopover","targetDocument","tagPickerId","rafIdRef","useRef","innerRef","expandIconRef","asideRef","secondaryAction","optional","elementType","expandIcon","defaultProps","undefined","role","expandIconMergeRef","observerRef","entry","targetWindow","defaultView","current","requestAnimationFrame","style","setProperty","contentRect","width","aside","renderByDefault","Boolean","mergedAsideRefs","handleMouseDown","event","isDefaultPrevented","target","preventDefault","focus","state","components","root","always","onMouseDown","expandIconLabelRef","expandIconLabelMergeRef","useEffect","cancelAnimationFrame","useTagPickerControl_unstable","baseProps","baseState","size","appearance"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,gBAAgB,EAChBC,KAAK,EACLC,aAAa,QACR,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,kBAAkB,QAAQ,wBAAwB;AAG3D,SAASC,+BAA+B,QAAQ,wCAAqC;AACrF,SAASC,4BAA4B,QAAQ,qCAAkC;AAC/E,SAASC,cAAc,QAAQ,gCAA6B;AAC5D,SAASC,oBAAoB,QAAQ,sCAAmC;AAExE;;;;;CAKC,GACD,OAAO,MAAMC,mCAAmC,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