@fluentui/react-tag-picker 9.10.1 → 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 +26 -2
- package/dist/index.d.cts +570 -0
- 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/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/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/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/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/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.js.map → TagPickerGroup.cjs.map} +1 -1
- 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/{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/{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/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/TagPickerGroup/{index.js.map → index.cjs.map} +1 -1
- 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/{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.js.map → index.cjs.map} +1 -1
- 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/components/TagPickerButton/useTagPickerButton.js.map +0 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.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/useTagPickerGroupStyles.styles.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/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/{renderTagPickerButton.js.map → renderTagPickerButton.cjs.map} +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/{renderTagPickerControl.js.map → renderTagPickerControl.cjs.map} +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/{TagPickerGroup.types.js → TagPickerGroup.types.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerGroup/{TagPickerGroup.types.js.map → TagPickerGroup.types.cjs.map} +0 -0
- /package/lib-commonjs/components/TagPickerGroup/{renderTagPickerGroup.js → renderTagPickerGroup.cjs} +0 -0
- /package/lib-commonjs/components/TagPickerGroup/{renderTagPickerGroup.js.map → renderTagPickerGroup.cjs.map} +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/{renderTagPickerInput.js.map → renderTagPickerInput.cjs.map} +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-commonjs/components/TagPickerInput/{useTagPickerInput.js → useTagPickerInput.cjs}
RENAMED
|
@@ -21,13 +21,14 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
21
21
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
22
22
|
const _reactdom = /*#__PURE__*/ _interop_require_wildcard._(require("react-dom"));
|
|
23
23
|
const _reactaria = require("@fluentui/react-aria");
|
|
24
|
-
const _TagPickerContext = require("../../contexts/TagPickerContext");
|
|
24
|
+
const _TagPickerContext = require("../../contexts/TagPickerContext.cjs");
|
|
25
25
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
26
26
|
const _keyboardkeys = require("@fluentui/keyboard-keys");
|
|
27
27
|
const _reactcombobox = require("@fluentui/react-combobox");
|
|
28
28
|
const _reactfield = require("@fluentui/react-field");
|
|
29
|
-
const _tokens = require("../../utils/tokens");
|
|
29
|
+
const _tokens = require("../../utils/tokens.cjs");
|
|
30
30
|
const _reacttabster = require("@fluentui/react-tabster");
|
|
31
|
+
const _useTabsterEscapeIgnore = require("../../utils/useTabsterEscapeIgnore.cjs");
|
|
31
32
|
const useTagPickerInputBase_unstable = (props, ref)=>{
|
|
32
33
|
const fieldProps = (0, _reactfield.useFieldControlProps_unstable)(props, {
|
|
33
34
|
supportsLabelFor: true,
|
|
@@ -134,10 +135,15 @@ const useTagPickerInput_unstable = (props, ref)=>{
|
|
|
134
135
|
...props,
|
|
135
136
|
onKeyDown
|
|
136
137
|
}, ref);
|
|
138
|
+
const open = (0, _TagPickerContext.useTagPickerContext_unstable)((ctx)=>ctx.open);
|
|
137
139
|
const size = (0, _TagPickerContext.useTagPickerContext_unstable)((ctx)=>ctx.size);
|
|
138
140
|
return {
|
|
139
141
|
...baseState,
|
|
140
|
-
size
|
|
142
|
+
size,
|
|
143
|
+
root: {
|
|
144
|
+
...(0, _useTabsterEscapeIgnore.useTabsterEscapeIgnore)(baseState.root, open),
|
|
145
|
+
...baseState.root
|
|
146
|
+
}
|
|
141
147
|
};
|
|
142
148
|
};
|
|
143
149
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerInput/useTagPickerInput.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport type {\n TagPickerInputBaseProps,\n TagPickerInputBaseState,\n TagPickerInputProps,\n TagPickerInputState,\n} from './TagPickerInput.types';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport {\n useMergedRefs,\n getIntrinsicElementProps,\n useEventCallback,\n useIsomorphicLayoutEffect,\n} from '@fluentui/react-utilities';\nimport { ArrowLeft, Backspace, Enter, Space } from '@fluentui/keyboard-keys';\nimport { useInputTriggerSlot } from '@fluentui/react-combobox';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { tagPickerInputCSSRules } from '../../utils/tokens';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useTabsterEscapeIgnore } from '../../utils/useTabsterEscapeIgnore';\n\n/**\n * Create the base state required to render TagPickerInput, without design-only props.\n * The Base hook omits Tabster-driven focus management; consumers can re-add it via the\n * styled wrapper {@link useTagPickerInput_unstable} or by composing their own keydown handler.\n *\n * @param props - props from this instance of TagPickerInput (without appearance)\n * @param ref - reference to root HTMLInputElement of TagPickerInput\n */\nexport const useTagPickerInputBase_unstable = (\n props: TagPickerInputBaseProps,\n ref: React.Ref<HTMLInputElement>,\n): TagPickerInputBaseState => {\n const fieldProps = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true,\n });\n const { controller: activeDescendantController } = useActiveDescendantContext();\n const contextDisabled = useTagPickerContext_unstable(ctx => ctx.disabled);\n\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef as React.RefObject<HTMLInputElement>);\n const selectedOptions = useTagPickerContext_unstable(ctx => ctx.selectedOptions);\n const setValue = useTagPickerContext_unstable(ctx => ctx.setValue);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n const setHasFocus = useTagPickerContext_unstable(ctx => ctx.setHasFocus);\n const clearSelection = useTagPickerContext_unstable(ctx => ctx.clearSelection);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const popoverId = useTagPickerContext_unstable(ctx => (ctx.noPopover ? undefined : ctx.popoverId));\n const selectOption = useTagPickerContext_unstable(ctx => ctx.selectOption);\n const getOptionById = useTagPickerContext_unstable(ctx => ctx.getOptionById);\n const contextValue = useTagPickerContext_unstable(ctx => ctx.value);\n\n useIsomorphicLayoutEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n setTagPickerInputStretchStyle(triggerRef.current);\n }, [selectedOptions, triggerRef]);\n\n useIsomorphicLayoutEffect(() => {\n if (triggerRef.current) {\n const input = triggerRef.current;\n const cb = () => setTagPickerInputStretchStyle(input);\n input.addEventListener('input', cb);\n return () => {\n input.removeEventListener('input', cb);\n };\n }\n }, [triggerRef]);\n\n const { value = contextValue, disabled = contextDisabled } = fieldProps;\n\n const isTypingRef = React.useRef(false);\n\n const root = useInputTriggerSlot(\n {\n type: 'text',\n value: value ?? '',\n 'aria-controls': open ? popoverId : undefined,\n disabled,\n ...getIntrinsicElementProps('input', fieldProps),\n onKeyDown: useEventCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n fieldProps.onKeyDown?.(event);\n if (event.key === Space) {\n if (open && !isTypingRef.current) {\n setOpen(event, false);\n }\n } else if (event.key === Enter) {\n if (open) {\n ReactDOM.unstable_batchedUpdates(() => {\n setValue(undefined);\n setOpen(event, false);\n });\n } else {\n setOpen(event, true);\n }\n }\n isTypingRef.current =\n event.key.length === 1 && event.code !== Space && !event.altKey && !event.ctrlKey && !event.metaKey;\n }),\n },\n useMergedRefs(triggerRef, ref),\n {\n activeDescendantController,\n freeform: false,\n state: {\n clearSelection,\n getOptionById,\n open,\n selectedOptions,\n selectOption,\n setHasFocus,\n setOpen,\n setValue,\n multiselect: true,\n value: fieldProps.value,\n },\n },\n );\n\n return {\n components: {\n root: 'input',\n },\n root,\n disabled,\n };\n};\n\n/**\n * Create the state required to render TagPickerInput.\n *\n * The returned state can be modified with hooks such as useTagPickerInputStyles_unstable,\n * before being passed to renderTagPickerInput_unstable.\n *\n * @param props - props from this instance of TagPickerInput\n * @param ref - reference to root HTMLInputElement of TagPickerInput\n */\nexport const useTagPickerInput_unstable = (\n props: TagPickerInputProps,\n ref: React.Ref<HTMLInputElement>,\n): TagPickerInputState => {\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n const { findLastFocusable } = useFocusFinders();\n\n const onKeyDown = useEventCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n props.onKeyDown?.(event);\n if (\n (event.key === ArrowLeft || event.key === Backspace) &&\n event.currentTarget.selectionStart === 0 &&\n event.currentTarget.selectionEnd === 0 &&\n tagPickerGroupRef.current\n ) {\n findLastFocusable(tagPickerGroupRef.current)?.focus();\n }\n });\n\n const baseState = useTagPickerInputBase_unstable({ ...props, onKeyDown }, 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\n/**\n * while typing the user might need a bit more of space to see the text,\n * which means the input should stretch to 100% width\n * occupying a whole new line.\n *\n * This function will set the CSS variable `--width` to `100%` if the scrollWidth is greater than the offsetWidth,\n * meaning the text is overflowing the input.\n *\n * @param input - input element to apply the style\n * @returns void\n */\nconst setTagPickerInputStretchStyle = (input: HTMLInputElement) => {\n // first we need to remove the CSS variable\n // to properly calculate the difference between scrollWidth and offsetWidth\n input.style.removeProperty(tagPickerInputCSSRules.width);\n if (input.scrollWidth > input.offsetWidth + 1) {\n input.style.setProperty(tagPickerInputCSSRules.width, '100%');\n } else {\n input.style.removeProperty(tagPickerInputCSSRules.width);\n }\n};\n"],"names":["React","ReactDOM","useActiveDescendantContext","useTagPickerContext_unstable","useMergedRefs","getIntrinsicElementProps","useEventCallback","useIsomorphicLayoutEffect","ArrowLeft","Backspace","Enter","Space","useInputTriggerSlot","useFieldControlProps_unstable","tagPickerInputCSSRules","useFocusFinders","useTabsterEscapeIgnore","useTagPickerInputBase_unstable","props","ref","fieldProps","supportsLabelFor","supportsRequired","supportsSize","controller","activeDescendantController","contextDisabled","ctx","disabled","triggerRef","selectedOptions","setValue","setOpen","setHasFocus","clearSelection","open","popoverId","noPopover","undefined","selectOption","getOptionById","contextValue","value","current","setTagPickerInputStretchStyle","input","cb","addEventListener","removeEventListener","isTypingRef","useRef","root","type","onKeyDown","event","key","unstable_batchedUpdates","length","code","altKey","ctrlKey","metaKey","freeform","state","multiselect","components","useTagPickerInput_unstable","tagPickerGroupRef","findLastFocusable","currentTarget","selectionStart","selectionEnd","focus","baseState","size","style","removeProperty","width","scrollWidth","offsetWidth","setProperty"],"mappings":"AAAA;;;;;;;;;;;;IAiCaiB,8BAAAA;;;8BA8GAiD;eAAAA;;;;iEA7IU,QAAQ;oEACL,YAAY;2BAOK,uBAAuB;kCACrB,qCAAkC;gCAMxE,4BAA4B;8BACgB,0BAA0B;+BACzC,2BAA2B;4BACjB,wBAAwB;wBAC/B,wBAAqB;8BAC5B,0BAA0B;wCACnB,wCAAqC;AAUrE,uCAAuC,CAC5ChD,OACAC;IAEA,MAAMC,iBAAaP,yCAAAA,EAA8BK,OAAO;QACtDG,kBAAkB;QAClBC,kBAAkB;QAClBC,cAAc;IAChB;IACA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,OAAGvB,qCAAAA;IACnD,MAAMwB,sBAAkBvB,8CAAAA,EAA6BwB,CAAAA,MAAOA,IAAIC,QAAQ;IAExE,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E;IACxD,OAAO;QACLhC,MAAM8B,KAAK,CAACC,cAAc,CAAC9D,8BAAAA,CAAuB+D,KAAK;IACzD;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useTagPickerInputStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { typographyStyles, tokens } from \"@fluentui/react-theme\";\nimport { tagPickerInputTokens } from \"../../utils/tokens.js\";\nexport const tagPickerInputClassNames = {\n root: 'fui-TagPickerInput'\n};\nconst useBaseStyle = makeResetStyles({\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground1,\n fontFamily: tokens.fontFamilyBase,\n boxSizing: 'border-box',\n '&:focus': {\n outlineStyle: 'none'\n },\n '&::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1\n },\n '&::after': {\n visibility: 'hidden',\n whiteSpace: 'pre-wrap'\n },\n border: 'none',\n minWidth: '24px',\n maxWidth: '100%',\n // by default width is 0,\n // it will be calculated based on the requirement of stretching the component to 100% width\n // see setTagPickerInputStretchStyle method for more details\n width: tagPickerInputTokens.width,\n flexGrow: 1\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n // size variants\n medium: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`\n },\n large: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalMNudge} 0 ${tokens.spacingVerticalMNudge} 0`\n },\n 'extra-large': {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalM} 0 ${tokens.spacingVerticalM} 0`\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorTransparentBackground,\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled\n }\n }\n});\n/**\n * Apply styling to the TagPickerInput slots based on the state\n */ export const useTagPickerInputStyles_unstable = (state)=>{\n const baseStyle = useBaseStyle();\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerInputClassNames.root, baseStyle, styles[state.size], state.disabled && styles.disabled, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","typographyStyles","tokens","tagPickerInputTokens","tagPickerInputClassNames","root","useBaseStyle","useStyles","medium","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","large","disabled","sj55zd","De3pzq","Bceei9c","yvdlaj","d","p","useTagPickerInputStyles_unstable","state","baseStyle","styles","className","size"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICM,wBAAwB;;;oCAuDY;;;;uBA1DS,gBAAgB;AAGnE,iCAAiC;IACpCC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,YAAY,GAAA,WAAA,OAAGR,oBAAA,EAAA,YAAA,MAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;CAwBpB,CAAC;AACF;;CAEA,GAAI,MAAMS,SAAS,GAAA,WAAA,OAAGR,eAAA,EAAA;IAAAS,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,KAAA,EAAA;QAAAT,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAA,eAAA;QAAAR,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAE,QAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAsBrB,CAAC;AAGS,MAAMC,oCAAoCC,KAAK,IAAG;IACzD,MAAMC,SAAS,GAAGtB,YAAY,CAAC,CAAC;IAChC,MAAMuB,MAAM,GAAGtB,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAoB,KAAK,CAACtB,IAAI,CAACyB,SAAS,GAAG9B,uBAAY,EAACI,wBAAwB,CAACC,IAAI,EAAEuB,SAAS,EAAEC,MAAM,CAACF,KAAK,CAACI,IAAI,CAAC,EAAEJ,KAAK,CAACR,QAAQ,IAAIU,MAAM,CAACV,QAAQ,EAAEQ,KAAK,CAACtB,IAAI,CAACyB,SAAS,CAAC;IAC1J,OAAOH,KAAK;AAChB,CAAC"}
|
|
@@ -19,7 +19,7 @@ _export(exports, {
|
|
|
19
19
|
});
|
|
20
20
|
const _react = require("@griffel/react");
|
|
21
21
|
const _reacttheme = require("@fluentui/react-theme");
|
|
22
|
-
const _tokens = require("../../utils/tokens");
|
|
22
|
+
const _tokens = require("../../utils/tokens.cjs");
|
|
23
23
|
const tagPickerInputClassNames = {
|
|
24
24
|
root: 'fui-TagPickerInput'
|
|
25
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerInput/useTagPickerInputStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { typographyStyles, tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerInputSlots, TagPickerInputState } from './TagPickerInput.types';\nimport { tagPickerInputTokens } from '../../utils/tokens';\n\nexport const tagPickerInputClassNames: SlotClassNames<TagPickerInputSlots> = {\n root: 'fui-TagPickerInput',\n};\n\nconst useBaseStyle = makeResetStyles({\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground1,\n fontFamily: tokens.fontFamilyBase,\n boxSizing: 'border-box',\n\n '&:focus': {\n outlineStyle: 'none',\n },\n '&::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1,\n },\n '&::after': {\n visibility: 'hidden',\n whiteSpace: 'pre-wrap',\n },\n border: 'none',\n minWidth: '24px',\n maxWidth: '100%',\n // by default width is 0,\n // it will be calculated based on the requirement of stretching the component to 100% width\n // see setTagPickerInputStretchStyle method for more details\n width: tagPickerInputTokens.width,\n flexGrow: 1,\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n // size variants\n medium: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`,\n },\n large: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalMNudge} 0 ${tokens.spacingVerticalMNudge} 0`,\n },\n 'extra-large': {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalM} 0 ${tokens.spacingVerticalM} 0`,\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorTransparentBackground,\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\n/**\n * Apply styling to the TagPickerInput slots based on the state\n */\nexport const useTagPickerInputStyles_unstable = (state: TagPickerInputState): TagPickerInputState => {\n const baseStyle = useBaseStyle();\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerInputClassNames.root,\n baseStyle,\n styles[state.size],\n state.disabled && styles.disabled,\n state.root.className,\n );\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","typographyStyles","tokens","tagPickerInputTokens","tagPickerInputClassNames","root","useBaseStyle","backgroundColor","colorTransparentBackground","color","colorNeutralForeground1","fontFamily","fontFamilyBase","boxSizing","outlineStyle","colorNeutralForeground4","opacity","visibility","whiteSpace","border","minWidth","maxWidth","width","flexGrow","useStyles","medium","body1","padding","spacingVerticalSNudge","large","spacingVerticalMNudge","spacingVerticalM","disabled","colorNeutralForegroundDisabled","cursor","useTagPickerInputStyles_unstable","state","baseStyle","styles","className","size"],"mappings":"AAAA;;;;;;;;;;;;IAQaM,wBAAAA;;;oCA6DA+B;eAAAA;;;uBAnE6C,iBAAiB;4BAClC,wBAAwB;wBAG5B,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerInput/useTagPickerInputStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { typographyStyles, tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerInputSlots, TagPickerInputState } from './TagPickerInput.types';\nimport { tagPickerInputTokens } from '../../utils/tokens';\n\nexport const tagPickerInputClassNames: SlotClassNames<TagPickerInputSlots> = {\n root: 'fui-TagPickerInput',\n};\n\nconst useBaseStyle = makeResetStyles({\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground1,\n fontFamily: tokens.fontFamilyBase,\n boxSizing: 'border-box',\n\n '&:focus': {\n outlineStyle: 'none',\n },\n '&::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1,\n },\n '&::after': {\n visibility: 'hidden',\n whiteSpace: 'pre-wrap',\n },\n border: 'none',\n minWidth: '24px',\n maxWidth: '100%',\n // by default width is 0,\n // it will be calculated based on the requirement of stretching the component to 100% width\n // see setTagPickerInputStretchStyle method for more details\n width: tagPickerInputTokens.width,\n flexGrow: 1,\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n // size variants\n medium: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`,\n },\n large: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalMNudge} 0 ${tokens.spacingVerticalMNudge} 0`,\n },\n 'extra-large': {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalM} 0 ${tokens.spacingVerticalM} 0`,\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorTransparentBackground,\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\n/**\n * Apply styling to the TagPickerInput slots based on the state\n */\nexport const useTagPickerInputStyles_unstable = (state: TagPickerInputState): TagPickerInputState => {\n const baseStyle = useBaseStyle();\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerInputClassNames.root,\n baseStyle,\n styles[state.size],\n state.disabled && styles.disabled,\n state.root.className,\n );\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","typographyStyles","tokens","tagPickerInputTokens","tagPickerInputClassNames","root","useBaseStyle","backgroundColor","colorTransparentBackground","color","colorNeutralForeground1","fontFamily","fontFamilyBase","boxSizing","outlineStyle","colorNeutralForeground4","opacity","visibility","whiteSpace","border","minWidth","maxWidth","width","flexGrow","useStyles","medium","body1","padding","spacingVerticalSNudge","large","spacingVerticalMNudge","spacingVerticalM","disabled","colorNeutralForegroundDisabled","cursor","useTagPickerInputStyles_unstable","state","baseStyle","styles","className","size"],"mappings":"AAAA;;;;;;;;;;;;IAQaM,wBAAAA;;;oCA6DA+B;eAAAA;;;uBAnE6C,iBAAiB;4BAClC,wBAAwB;wBAG5B,wBAAqB;AAEnD,iCAAsE;IAC3E9B,MAAM;AACR,EAAE;AAEF,M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MAAMgC,SAASd;IACf,oDAAoD;IACpDY,MAAM/B,IAAI,CAACkC,SAAS,OAAGvC,mBAAAA,EACrBI,yBAAyBC,IAAI,EAC7BgC,WACAC,MAAM,CAACF,MAAMI,IAAI,CAAC,EAClBJ,MAAMJ,QAAQ,IAAIM,OAAON,QAAQ,EACjCI,MAAM/B,IAAI,CAACkC,SAAS;IAEtB,OAAOH;AACT,EAAE"}
|
|
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "TagPickerList", {
|
|
|
11
11
|
});
|
|
12
12
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
13
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _useTagPickerList = require("./useTagPickerList");
|
|
15
|
-
const _renderTagPickerList = require("./renderTagPickerList");
|
|
16
|
-
const _useTagPickerListStylesstyles = require("./useTagPickerListStyles.styles");
|
|
14
|
+
const _useTagPickerList = require("./useTagPickerList.cjs");
|
|
15
|
+
const _renderTagPickerList = require("./renderTagPickerList.cjs");
|
|
16
|
+
const _useTagPickerListStylesstyles = require("./useTagPickerListStyles.styles.cjs");
|
|
17
17
|
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
18
18
|
const TagPickerList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
19
19
|
const state = (0, _useTagPickerList.useTagPickerList_unstable)(props, ref);
|
package/lib-commonjs/components/TagPickerList/{TagPickerList.js.map → TagPickerList.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerList/TagPickerList.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerList_unstable } from './useTagPickerList';\nimport { renderTagPickerList_unstable } from './renderTagPickerList';\nimport { useTagPickerListStyles_unstable } from './useTagPickerListStyles.styles';\nimport type { TagPickerListProps } from './TagPickerList.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerList component -\n * A TagPickerList is a composite component that allows users to display a list of tag options to be selected.\n */\nexport const TagPickerList: ForwardRefComponent<TagPickerListProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerList_unstable(props, ref);\n\n useTagPickerListStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerListStyles_unstable')(state);\n return renderTagPickerList_unstable(state);\n});\n\nTagPickerList.displayName = 'TagPickerList';\n"],"names":["React","useTagPickerList_unstable","renderTagPickerList_unstable","useTagPickerListStyles_unstable","useCustomStyleHook_unstable","TagPickerList","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;kCAEW,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerList/TagPickerList.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerList_unstable } from './useTagPickerList';\nimport { renderTagPickerList_unstable } from './renderTagPickerList';\nimport { useTagPickerListStyles_unstable } from './useTagPickerListStyles.styles';\nimport type { TagPickerListProps } from './TagPickerList.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerList component -\n * A TagPickerList is a composite component that allows users to display a list of tag options to be selected.\n */\nexport const TagPickerList: ForwardRefComponent<TagPickerListProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerList_unstable(props, ref);\n\n useTagPickerListStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerListStyles_unstable')(state);\n return renderTagPickerList_unstable(state);\n});\n\nTagPickerList.displayName = 'TagPickerList';\n"],"names":["React","useTagPickerList_unstable","renderTagPickerList_unstable","useTagPickerListStyles_unstable","useCustomStyleHook_unstable","TagPickerList","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;kCAEW,wBAAqB;qCAClB,2BAAwB;8CACrB,qCAAkC;qCAEtC,kCAAkC;AAMvE,MAAMK,gBAAAA,WAAAA,GAAyDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,YAAQR,2CAAAA,EAA0BM,OAAOC;QAE/CL,6DAAAA,EAAgCM;QAChCL,gDAAAA,EAA4B,mCAAmCK;IAC/D,WAAOP,iDAAAA,EAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
|
@@ -25,7 +25,7 @@ _export(exports, {
|
|
|
25
25
|
return _useTagPickerList.useTagPickerList_unstable;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
const _TagPickerList = require("./TagPickerList");
|
|
29
|
-
const _renderTagPickerList = require("./renderTagPickerList");
|
|
30
|
-
const _useTagPickerList = require("./useTagPickerList");
|
|
31
|
-
const _useTagPickerListStylesstyles = require("./useTagPickerListStyles.styles");
|
|
28
|
+
const _TagPickerList = require("./TagPickerList.cjs");
|
|
29
|
+
const _renderTagPickerList = require("./renderTagPickerList.cjs");
|
|
30
|
+
const _useTagPickerList = require("./useTagPickerList.cjs");
|
|
31
|
+
const _useTagPickerListStylesstyles = require("./useTagPickerListStyles.styles.cjs");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerList/index.ts"],"sourcesContent":["export { TagPickerList } from './TagPickerList';\nexport type { TagPickerListProps, TagPickerListSlots, TagPickerListState } from './TagPickerList.types';\nexport { renderTagPickerList_unstable } from './renderTagPickerList';\nexport { useTagPickerList_unstable } from './useTagPickerList';\nexport { tagPickerListClassNames, useTagPickerListStyles_unstable } from './useTagPickerListStyles.styles';\n"],"names":["TagPickerList","renderTagPickerList_unstable","useTagPickerList_unstable","tagPickerListClassNames","useTagPickerListStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,4BAAa;;;eAEbC,iDAA4B;;;eAE5BE,qDAAuB;;;eAAEC,6DAA+B;;;eADxDF,2CAAyB;;;+BAHJ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerList/index.ts"],"sourcesContent":["export { TagPickerList } from './TagPickerList';\nexport type { TagPickerListProps, TagPickerListSlots, TagPickerListState } from './TagPickerList.types';\nexport { renderTagPickerList_unstable } from './renderTagPickerList';\nexport { useTagPickerList_unstable } from './useTagPickerList';\nexport { tagPickerListClassNames, useTagPickerListStyles_unstable } from './useTagPickerListStyles.styles';\n"],"names":["TagPickerList","renderTagPickerList_unstable","useTagPickerList_unstable","tagPickerListClassNames","useTagPickerListStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,4BAAa;;;eAEbC,iDAA4B;;;eAE5BE,qDAAuB;;;eAAEC,6DAA+B;;;eADxDF,2CAAyB;;;+BAHJ,qBAAkB;qCAEH,2BAAwB;kCAC3B,wBAAqB;8CACU,qCAAkC"}
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "useTagPickerList_unstable", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const _reactcombobox = require("@fluentui/react-combobox");
|
|
13
|
-
const _TagPickerContext = require("../../contexts/TagPickerContext");
|
|
13
|
+
const _TagPickerContext = require("../../contexts/TagPickerContext.cjs");
|
|
14
14
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
15
15
|
const useTagPickerList_unstable = (props, ref)=>{
|
|
16
16
|
const triggerRef = (0, _TagPickerContext.useTagPickerContext_unstable)((ctx)=>ctx.triggerRef);
|
package/lib-commonjs/components/TagPickerList/{useTagPickerList.js.map → useTagPickerList.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerList/useTagPickerList.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { TagPickerListProps, TagPickerListState } from './TagPickerList.types';\nimport { Listbox } from '@fluentui/react-combobox';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useListboxSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render TagPickerList.\n *\n * The returned state can be modified with hooks such as useTagPickerListStyles_unstable,\n * before being passed to renderTagPickerList_unstable.\n *\n * @param props - props from this instance of TagPickerList\n * @param ref - reference to root HTMLDivElement of TagPickerList\n */\nexport const useTagPickerList_unstable = (\n props: TagPickerListProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerListState => {\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef) as\n | React.RefObject<HTMLInputElement>\n | React.RefObject<HTMLButtonElement>;\n const popoverRef = useTagPickerContext_unstable(ctx => ctx.popoverRef);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n\n return {\n open,\n components: {\n root: Listbox,\n },\n root: slot.always(\n {\n ...useListboxSlot(props, useMergedRefs(popoverRef, ref), {\n state: { multiselect: true },\n triggerRef,\n defaultProps: { id: popoverId },\n }),\n role: 'listbox',\n },\n { elementType: Listbox },\n ),\n };\n};\n"],"names":["Listbox","useTagPickerContext_unstable","slot","useMergedRefs","useListboxSlot","useTagPickerList_unstable","props","ref","triggerRef","ctx","popoverRef","popoverId","open","components","root","always","state","multiselect","defaultProps","id","role","elementType"],"mappings":"AAAA;;;;;+BAkBaK;;;;;;+BAdW,2BAA2B;kCACN,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerList/useTagPickerList.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { TagPickerListProps, TagPickerListState } from './TagPickerList.types';\nimport { Listbox } from '@fluentui/react-combobox';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useListboxSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render TagPickerList.\n *\n * The returned state can be modified with hooks such as useTagPickerListStyles_unstable,\n * before being passed to renderTagPickerList_unstable.\n *\n * @param props - props from this instance of TagPickerList\n * @param ref - reference to root HTMLDivElement of TagPickerList\n */\nexport const useTagPickerList_unstable = (\n props: TagPickerListProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerListState => {\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef) as\n | React.RefObject<HTMLInputElement>\n | React.RefObject<HTMLButtonElement>;\n const popoverRef = useTagPickerContext_unstable(ctx => ctx.popoverRef);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n\n return {\n open,\n components: {\n root: Listbox,\n },\n root: slot.always(\n {\n ...useListboxSlot(props, useMergedRefs(popoverRef, ref), {\n state: { multiselect: true },\n triggerRef,\n defaultProps: { id: popoverId },\n }),\n role: 'listbox',\n },\n { elementType: Listbox },\n ),\n };\n};\n"],"names":["Listbox","useTagPickerContext_unstable","slot","useMergedRefs","useListboxSlot","useTagPickerList_unstable","props","ref","triggerRef","ctx","popoverRef","popoverId","open","components","root","always","state","multiselect","defaultProps","id","role","elementType"],"mappings":"AAAA;;;;;+BAkBaK;;;;;;+BAdW,2BAA2B;kCACN,qCAAkC;gCAC3C,4BAA4B;AAYzD,kCAAkC,CACvCC,OACAC;IAEA,MAAMC,iBAAaP,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAID,UAAU;IAGrE,MAAME,iBAAaT,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAIC,UAAU;IACrE,MAAMC,gBAAYV,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAIE,SAAS;IACnE,MAAMC,WAAOX,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAIG,IAAI;IAEzD,OAAO;QACLA;QACAC,YAAY;YACVC,MAAMd,sBAAAA;QACR;QACAc,MAAMZ,oBAAAA,CAAKa,MAAM,CACf;YACE,OAAGX,6BAAAA,EAAeE,WAAOH,6BAAAA,EAAcO,YAAYH,MAAM;gBACvDS,OAAO;oBAAEC,aAAa;gBAAK;gBAC3BT;gBACAU,cAAc;oBAAEC,IAAIR;gBAAU;YAChC,EAAE;YACFS,MAAM;QACR,GACA;YAAEC,aAAarB,sBAAAA;QAAQ;IAE3B;AACF,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useTagPickerListStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nexport const tagPickerListClassNames = {\n root: 'fui-TagPickerList'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n boxShadow: `${tokens.shadow16}`,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box'\n },\n collapsed: {\n display: 'none'\n }\n});\n/**\n * Apply styling to the TagPickerList slots based on the state\n */ export const useTagPickerListStyles_unstable = (state)=>{\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerListClassNames.root, styles.root, !state.open && styles.collapsed, state.root.className);\n return state;\n};\n"],"names":["__styles","mergeClasses","tokens","tagPickerListClassNames","root","useStyles","E5pizo","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bxyxcbc","B7ck84d","collapsed","mc9l5x","d","p","useTagPickerListStyles_unstable","state","styles","className","open"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAGCG,uBAAuB;;;mCAkBY;eAA/Be;;;uBApBwB,gBAAgB;AAElD,gCAAgC;IACnCd,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGL,eAAA,EAAA;IAAAI,IAAA,EAAA;QAAAE,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,SAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;KAAA;AAAA,CAUrB,CAAC;AAGS,yCAAyCE,KAAK,IAAG;IACxD,MAAMC,MAAM,GAAGf,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAc,KAAK,CAACf,IAAI,CAACiB,SAAS,OAAGpB,mBAAY,EAACE,uBAAuB,CAACC,IAAI,EAAEgB,MAAM,CAAChB,IAAI,EAAE,CAACe,KAAK,CAACG,IAAI,IAAIF,MAAM,CAACN,SAAS,EAAEK,KAAK,CAACf,IAAI,CAACiB,SAAS,CAAC;IACrI,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "TagPickerOption", {
|
|
|
11
11
|
});
|
|
12
12
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
13
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _useTagPickerOption = require("./useTagPickerOption");
|
|
15
|
-
const _renderTagPickerOption = require("./renderTagPickerOption");
|
|
16
|
-
const _useTagPickerOptionStylesstyles = require("./useTagPickerOptionStyles.styles");
|
|
14
|
+
const _useTagPickerOption = require("./useTagPickerOption.cjs");
|
|
15
|
+
const _renderTagPickerOption = require("./renderTagPickerOption.cjs");
|
|
16
|
+
const _useTagPickerOptionStylesstyles = require("./useTagPickerOptionStyles.styles.cjs");
|
|
17
17
|
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
18
18
|
const TagPickerOption = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
19
19
|
const state = (0, _useTagPickerOption.useTagPickerOption_unstable)(props, ref);
|
package/lib-commonjs/components/TagPickerOption/{TagPickerOption.js.map → TagPickerOption.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerOption/TagPickerOption.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerOption_unstable } from './useTagPickerOption';\nimport { renderTagPickerOption_unstable } from './renderTagPickerOption';\nimport { useTagPickerOptionStyles_unstable } from './useTagPickerOptionStyles.styles';\nimport type { TagPickerOptionProps } from './TagPickerOption.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerOption component -\n * A TagPickerOption is a composite component that allows users to select tags.\n */\nexport const TagPickerOption: ForwardRefComponent<TagPickerOptionProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerOption_unstable(props, ref);\n\n useTagPickerOptionStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerOptionStyles_unstable')(state);\n return renderTagPickerOption_unstable(state);\n});\n\nTagPickerOption.displayName = 'TagPickerOption';\n"],"names":["React","useTagPickerOption_unstable","renderTagPickerOption_unstable","useTagPickerOptionStyles_unstable","useCustomStyleHook_unstable","TagPickerOption","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;oCAEa,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerOption/TagPickerOption.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerOption_unstable } from './useTagPickerOption';\nimport { renderTagPickerOption_unstable } from './renderTagPickerOption';\nimport { useTagPickerOptionStyles_unstable } from './useTagPickerOptionStyles.styles';\nimport type { TagPickerOptionProps } from './TagPickerOption.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerOption component -\n * A TagPickerOption is a composite component that allows users to select tags.\n */\nexport const TagPickerOption: ForwardRefComponent<TagPickerOptionProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerOption_unstable(props, ref);\n\n useTagPickerOptionStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerOptionStyles_unstable')(state);\n return renderTagPickerOption_unstable(state);\n});\n\nTagPickerOption.displayName = 'TagPickerOption';\n"],"names":["React","useTagPickerOption_unstable","renderTagPickerOption_unstable","useTagPickerOptionStyles_unstable","useCustomStyleHook_unstable","TagPickerOption","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;oCAEa,0BAAuB;uCACpB,6BAA0B;gDACvB,uCAAoC;qCAE1C,kCAAkC;AAMvE,MAAMK,kBAAAA,WAAAA,GAA6DL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,YAAQR,+CAAAA,EAA4BM,OAAOC;QAEjDL,iEAAAA,EAAkCM;QAClCL,gDAAAA,EAA4B,qCAAqCK;IACjE,WAAOP,qDAAAA,EAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
|
|
@@ -25,7 +25,7 @@ _export(exports, {
|
|
|
25
25
|
return _useTagPickerOption.useTagPickerOption_unstable;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
const _TagPickerOption = require("./TagPickerOption");
|
|
29
|
-
const _renderTagPickerOption = require("./renderTagPickerOption");
|
|
30
|
-
const _useTagPickerOption = require("./useTagPickerOption");
|
|
31
|
-
const _useTagPickerOptionStylesstyles = require("./useTagPickerOptionStyles.styles");
|
|
28
|
+
const _TagPickerOption = require("./TagPickerOption.cjs");
|
|
29
|
+
const _renderTagPickerOption = require("./renderTagPickerOption.cjs");
|
|
30
|
+
const _useTagPickerOption = require("./useTagPickerOption.cjs");
|
|
31
|
+
const _useTagPickerOptionStylesstyles = require("./useTagPickerOptionStyles.styles.cjs");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerOption/index.ts"],"sourcesContent":["export { TagPickerOption } from './TagPickerOption';\nexport type { TagPickerOptionProps, TagPickerOptionSlots, TagPickerOptionState } from './TagPickerOption.types';\nexport { renderTagPickerOption_unstable } from './renderTagPickerOption';\nexport { useTagPickerOption_unstable } from './useTagPickerOption';\nexport { tagPickerOptionClassNames, useTagPickerOptionStyles_unstable } from './useTagPickerOptionStyles.styles';\n"],"names":["TagPickerOption","renderTagPickerOption_unstable","useTagPickerOption_unstable","tagPickerOptionClassNames","useTagPickerOptionStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,gCAAe;;;eAEfC,qDAA8B;;;eAE9BE,yDAAyB;;;eAAEC,iEAAiC;;;eAD5DF,+CAA2B;;;iCAHJ,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerOption/index.ts"],"sourcesContent":["export { TagPickerOption } from './TagPickerOption';\nexport type { TagPickerOptionProps, TagPickerOptionSlots, TagPickerOptionState } from './TagPickerOption.types';\nexport { renderTagPickerOption_unstable } from './renderTagPickerOption';\nexport { useTagPickerOption_unstable } from './useTagPickerOption';\nexport { tagPickerOptionClassNames, useTagPickerOptionStyles_unstable } from './useTagPickerOptionStyles.styles';\n"],"names":["TagPickerOption","renderTagPickerOption_unstable","useTagPickerOption_unstable","tagPickerOptionClassNames","useTagPickerOptionStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,gCAAe;;;eAEfC,qDAA8B;;;eAE9BE,yDAAyB;;;eAAEC,iEAAiC;;;eAD5DF,+CAA2B;;;iCAHJ,uBAAoB;uCAEL,6BAA0B;oCAC7B,0BAAuB;gDACU,uCAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useTagPickerOptionStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { useOptionStyles_unstable } from \"@fluentui/react-combobox\";\nimport { typographyStyles } from \"@fluentui/react-theme\";\nexport const tagPickerOptionClassNames = {\n root: 'fui-TagPickerOption',\n media: 'fui-TagPickerOption__media',\n secondaryContent: 'fui-TagPickerOption__secondaryContent'\n};\nconst useRootBaseStyle = makeResetStyles({\n display: 'flex',\n alignItems: 'center'\n});\nconst useRootStyles = makeStyles({\n secondaryContent: {\n display: 'grid',\n gridTemplateColumns: 'auto 1fr'\n }\n});\nconst useSecondaryContentBaseStyle = makeResetStyles({\n gridColumnStart: 2,\n gridRowStart: 2,\n ...typographyStyles.caption1\n});\nconst useMediaBaseStyle = makeResetStyles({\n gridRowStart: 'span 2'\n});\n/**\n * Apply styling to the TagPickerOption slots based on the state\n */ export const useTagPickerOptionStyles_unstable = (state)=>{\n const rootBaseStyle = useRootBaseStyle();\n const rootStyles = useRootStyles();\n const secondaryContentBaseStyle = useSecondaryContentBaseStyle();\n const mediaBaseStyle = useMediaBaseStyle();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerOptionClassNames.root, rootBaseStyle, state.secondaryContent && rootStyles.secondaryContent, state.root.className);\n useOptionStyles_unstable({\n ...state,\n active: false,\n disabled: false,\n focusVisible: false,\n checkIcon: undefined,\n selected: false\n });\n if (state.media) {\n // eslint-disable-next-line react-hooks/immutability\n state.media.className = mergeClasses(tagPickerOptionClassNames.media, mediaBaseStyle, state.media.className);\n }\n if (state.secondaryContent) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryContent.className = mergeClasses(tagPickerOptionClassNames.secondaryContent, secondaryContentBaseStyle, state.secondaryContent.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","useOptionStyles_unstable","typographyStyles","tagPickerOptionClassNames","root","media","secondaryContent","useRootBaseStyle","useRootStyles","mc9l5x","Budl1dq","d","useSecondaryContentBaseStyle","useMediaBaseStyle","useTagPickerOptionStyles_unstable","state","rootBaseStyle","rootStyles","secondaryContentBaseStyle","mediaBaseStyle","className","active","disabled","focusVisible","checkIcon","undefined","selected"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICK,yBAAyB;;;qCAyBY;eAAjCW;;;uBA5ByC,gBAAgB;+BACjC,0BAA0B;AAE5D,kCAAkC;IACrCV,IAAI,EAAE,qBAAqB;IAC3BC,KAAK,EAAE,4BAA4B;IACnCC,gBAAgB,EAAE;AACtB,CAAC;AACD,MAAMC,gBAAgB,GAAA,WAAA,OAAGT,oBAAA,EAAA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S,KAAK,CAACT,gBAAgB,CAACc,SAAS,OAAGpB,mBAAY,EAACG,yBAAyB,CAACG,gBAAgB,EAAEY,yBAAyB,EAAEH,KAAK,CAACT,gBAAgB,CAACc,SAAS,CAAC;IAC5J;IACA,OAAOL,KAAK;AAChB,CAAC"}
|
|
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "TagPickerOptionGroup", {
|
|
|
11
11
|
});
|
|
12
12
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
13
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _useTagPickerOptionGroup = require("./useTagPickerOptionGroup");
|
|
15
|
-
const _renderTagPickerOptionGroup = require("./renderTagPickerOptionGroup");
|
|
16
|
-
const _useTagPickerOptionGroupStylesstyles = require("./useTagPickerOptionGroupStyles.styles");
|
|
14
|
+
const _useTagPickerOptionGroup = require("./useTagPickerOptionGroup.cjs");
|
|
15
|
+
const _renderTagPickerOptionGroup = require("./renderTagPickerOptionGroup.cjs");
|
|
16
|
+
const _useTagPickerOptionGroupStylesstyles = require("./useTagPickerOptionGroupStyles.styles.cjs");
|
|
17
17
|
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
18
18
|
const TagPickerOptionGroup = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
19
19
|
const state = (0, _useTagPickerOptionGroup.useTagPickerOptionGroup)(props, ref);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerOptionGroup/TagPickerOptionGroup.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerOptionGroup } from './useTagPickerOptionGroup';\nimport { renderTagPickerOptionGroup } from './renderTagPickerOptionGroup';\nimport { useTagPickerOptionGroupStyles } from './useTagPickerOptionGroupStyles.styles';\nimport type { TagPickerOptionGroupProps } from './TagPickerOptionGroup.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerOptionGroup component -\n * A TagPickerOptionGroup is a composite component that allows users to group TagPickerOptions.\n */\nexport const TagPickerOptionGroup: ForwardRefComponent<TagPickerOptionGroupProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerOptionGroup(props, ref);\n\n useTagPickerOptionGroupStyles(state);\n useCustomStyleHook_unstable('useTagPickerOptionGroupStyles_unstable')(state);\n return renderTagPickerOptionGroup(state);\n});\n\nTagPickerOptionGroup.displayName = 'TagPickerOptionGroup';\n"],"names":["React","useTagPickerOptionGroup","renderTagPickerOptionGroup","useTagPickerOptionGroupStyles","useCustomStyleHook_unstable","TagPickerOptionGroup","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;yCAES
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerOptionGroup/TagPickerOptionGroup.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerOptionGroup } from './useTagPickerOptionGroup';\nimport { renderTagPickerOptionGroup } from './renderTagPickerOptionGroup';\nimport { useTagPickerOptionGroupStyles } from './useTagPickerOptionGroupStyles.styles';\nimport type { TagPickerOptionGroupProps } from './TagPickerOptionGroup.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerOptionGroup component -\n * A TagPickerOptionGroup is a composite component that allows users to group TagPickerOptions.\n */\nexport const TagPickerOptionGroup: ForwardRefComponent<TagPickerOptionGroupProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerOptionGroup(props, ref);\n\n useTagPickerOptionGroupStyles(state);\n useCustomStyleHook_unstable('useTagPickerOptionGroupStyles_unstable')(state);\n return renderTagPickerOptionGroup(state);\n});\n\nTagPickerOptionGroup.displayName = 'TagPickerOptionGroup';\n"],"names":["React","useTagPickerOptionGroup","renderTagPickerOptionGroup","useTagPickerOptionGroupStyles","useCustomStyleHook_unstable","TagPickerOptionGroup","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;yCAES,+BAA4B;4CACzB,kCAA+B;qDAC5B,4CAAyC;qCAE3C,kCAAkC;AAMvE,MAAMK,uBAAAA,WAAAA,GAAuEL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3G,MAAMC,YAAQR,gDAAAA,EAAwBM,OAAOC;QAE7CL,kEAAAA,EAA8BM;QAC9BL,gDAAAA,EAA4B,0CAA0CK;IACtE,WAAOP,sDAAAA,EAA2BO;AACpC,GAAG;AAEHJ,qBAAqBK,WAAW,GAAG"}
|
|
@@ -25,7 +25,7 @@ _export(exports, {
|
|
|
25
25
|
return _useTagPickerOptionGroupStylesstyles.useTagPickerOptionGroupStyles;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
const _TagPickerOptionGroup = require("./TagPickerOptionGroup");
|
|
29
|
-
const _renderTagPickerOptionGroup = require("./renderTagPickerOptionGroup");
|
|
30
|
-
const _useTagPickerOptionGroup = require("./useTagPickerOptionGroup");
|
|
31
|
-
const _useTagPickerOptionGroupStylesstyles = require("./useTagPickerOptionGroupStyles.styles");
|
|
28
|
+
const _TagPickerOptionGroup = require("./TagPickerOptionGroup.cjs");
|
|
29
|
+
const _renderTagPickerOptionGroup = require("./renderTagPickerOptionGroup.cjs");
|
|
30
|
+
const _useTagPickerOptionGroup = require("./useTagPickerOptionGroup.cjs");
|
|
31
|
+
const _useTagPickerOptionGroupStylesstyles = require("./useTagPickerOptionGroupStyles.styles.cjs");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPickerOptionGroup/index.ts"],"sourcesContent":["export { TagPickerOptionGroup } from './TagPickerOptionGroup';\nexport type {\n TagPickerOptionGroupProps,\n TagPickerOptionGroupSlots,\n TagPickerOptionGroupState,\n} from './TagPickerOptionGroup.types';\nexport { renderTagPickerOptionGroup } from './renderTagPickerOptionGroup';\nexport { useTagPickerOptionGroup } from './useTagPickerOptionGroup';\nexport { tagPickerOptionGroupClassNames, useTagPickerOptionGroupStyles } from './useTagPickerOptionGroupStyles.styles';\n"],"names":["TagPickerOptionGroup","renderTagPickerOptionGroup","useTagPickerOptionGroup","tagPickerOptionGroupClassNames","useTagPickerOptionGroupStyles"],"mappings":";;;;;;;;;;;;eAASA,0CAAoB;;;eAMpBC,sDAA0B;;;eAE1BE,mEAA8B;;;eAD9BD,gDAAuB;;;eACSE,kEAA6B;;;sCARjC,
|
|
1
|
+
{"version":3,"sources":["../src/components/TagPickerOptionGroup/index.ts"],"sourcesContent":["export { TagPickerOptionGroup } from './TagPickerOptionGroup';\nexport type {\n TagPickerOptionGroupProps,\n TagPickerOptionGroupSlots,\n TagPickerOptionGroupState,\n} from './TagPickerOptionGroup.types';\nexport { renderTagPickerOptionGroup } from './renderTagPickerOptionGroup';\nexport { useTagPickerOptionGroup } from './useTagPickerOptionGroup';\nexport { tagPickerOptionGroupClassNames, useTagPickerOptionGroupStyles } from './useTagPickerOptionGroupStyles.styles';\n"],"names":["TagPickerOptionGroup","renderTagPickerOptionGroup","useTagPickerOptionGroup","tagPickerOptionGroupClassNames","useTagPickerOptionGroupStyles"],"mappings":";;;;;;;;;;;;eAASA,0CAAoB;;;eAMpBC,sDAA0B;;;eAE1BE,mEAA8B;;;eAD9BD,gDAAuB;;;eACSE,kEAA6B;;;sCARjC,4BAAyB;4CAMnB,kCAA+B;yCAClC,+BAA4B;qDACU,4CAAyC"}
|
package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useTagPickerOptionGroupStyles.styles.js"],"sourcesContent":["'use client';\nimport { mergeClasses } from \"@griffel/react\";\nimport { useOptionGroupStyles_unstable } from \"@fluentui/react-combobox\";\nexport const tagPickerOptionGroupClassNames = {\n root: 'fui-TagPickerOptionGroup',\n label: 'fui-TagPickerOptionGroup__label'\n};\n/**\n * Apply styling to the TagPickerOptionGroup slots based on the state\n */ export const useTagPickerOptionGroupStyles = (state)=>{\n useOptionGroupStyles_unstable(state);\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(tagPickerOptionGroupClassNames.root, state.root.className);\n if (state.label) {\n // eslint-disable-next-line react-hooks/immutability\n state.label.className = mergeClasses(tagPickerOptionGroupClassNames.label, state.label.className);\n }\n return state;\n};\n"],"names":["mergeClasses","useOptionGroupStyles_unstable","tagPickerOptionGroupClassNames","root","label","useTagPickerOptionGroupStyles","state","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAGCE,8BAA8B;;;iCAMG;eAA7BG;;;uBARY,gBAAgB;+BACC,0BAA0B;AACjE,uCAAuC;IAC1CF,IAAI,EAAE,0BAA0B;IAChCC,KAAK,EAAE;AACX,CAAC;AAGU,uCAAuCE,KAAK,IAAG;QACtDL,4CAA6B,EAACK,KAAK,CAAC;IACpC,oDAAA;IACAA,KAAK,CAACH,IAAI,CAACI,SAAS,OAAGP,mBAAY,EAACE,8BAA8B,CAACC,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACI,SAAS,CAAC;IAC9F,IAAID,KAAK,CAACF,KAAK,EAAE;QACb,oDAAA;QACAE,KAAK,CAACF,KAAK,CAACG,SAAS,OAAGP,mBAAY,EAACE,8BAA8B,CAACE,KAAK,EAAEE,KAAK,CAACF,KAAK,CAACG,SAAS,CAAC;IACrG;IACA,OAAOD,KAAK;AAChB,CAAC"}
|
|
@@ -148,13 +148,13 @@ _export(exports, {
|
|
|
148
148
|
return _TagPicker.useTagPicker_unstable;
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
|
-
const _TagPicker = require("./TagPicker");
|
|
152
|
-
const _TagPickerInput = require("./TagPickerInput");
|
|
153
|
-
const _TagPickerList = require("./TagPickerList");
|
|
154
|
-
const _TagPickerButton = require("./TagPickerButton");
|
|
155
|
-
const _TagPickerControl = require("./TagPickerControl");
|
|
156
|
-
const _TagPickerOption = require("./TagPickerOption");
|
|
157
|
-
const _TagPickerGroup = require("./TagPickerGroup");
|
|
158
|
-
const _TagPickerOptionGroup = require("./TagPickerOptionGroup");
|
|
159
|
-
const _useTagPickerFilter = require("./utils/useTagPickerFilter");
|
|
160
|
-
const _TagPickerContext = require("./contexts/TagPickerContext");
|
|
151
|
+
const _TagPicker = require("./TagPicker.cjs");
|
|
152
|
+
const _TagPickerInput = require("./TagPickerInput.cjs");
|
|
153
|
+
const _TagPickerList = require("./TagPickerList.cjs");
|
|
154
|
+
const _TagPickerButton = require("./TagPickerButton.cjs");
|
|
155
|
+
const _TagPickerControl = require("./TagPickerControl.cjs");
|
|
156
|
+
const _TagPickerOption = require("./TagPickerOption.cjs");
|
|
157
|
+
const _TagPickerGroup = require("./TagPickerGroup.cjs");
|
|
158
|
+
const _TagPickerOptionGroup = require("./TagPickerOptionGroup.cjs");
|
|
159
|
+
const _useTagPickerFilter = require("./utils/useTagPickerFilter.cjs");
|
|
160
|
+
const _TagPickerContext = require("./contexts/TagPickerContext.cjs");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n TagPicker,\n renderTagPicker_unstable,\n useTagPicker_unstable,\n useTagPickerBase_unstable,\n useTagPickerContextValues,\n} from './TagPicker';\nexport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerContextValues,\n TagPickerProps,\n TagPickerSlots,\n TagPickerState,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerSize,\n} from './TagPicker';\nexport {\n TagPickerInput,\n tagPickerInputClassNames,\n renderTagPickerInput_unstable,\n useTagPickerInputStyles_unstable,\n useTagPickerInput_unstable,\n useTagPickerInputBase_unstable,\n} from './TagPickerInput';\nexport type {\n TagPickerInputBaseProps,\n TagPickerInputBaseState,\n TagPickerInputProps,\n TagPickerInputSlots,\n TagPickerInputState,\n} from './TagPickerInput';\nexport {\n TagPickerList,\n tagPickerListClassNames,\n renderTagPickerList_unstable,\n useTagPickerListStyles_unstable,\n useTagPickerList_unstable,\n} from './TagPickerList';\nexport type { TagPickerListProps, TagPickerListSlots, TagPickerListState } from './TagPickerList';\nexport {\n TagPickerButton,\n tagPickerButtonClassNames,\n renderTagPickerButton_unstable,\n useTagPickerButtonStyles_unstable,\n useTagPickerButton_unstable,\n useTagPickerButtonBase_unstable,\n} from './TagPickerButton';\nexport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './TagPickerButton';\nexport {\n TagPickerControl,\n tagPickerControlClassNames,\n renderTagPickerControl_unstable,\n useTagPickerControlStyles_unstable,\n useTagPickerControl_unstable,\n useTagPickerControlBase_unstable,\n} from './TagPickerControl';\nexport type {\n TagPickerControlBaseState,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl';\nexport {\n TagPickerOption,\n tagPickerOptionClassNames,\n renderTagPickerOption_unstable,\n useTagPickerOptionStyles_unstable,\n useTagPickerOption_unstable,\n} from './TagPickerOption';\nexport type { TagPickerOptionProps, TagPickerOptionSlots, TagPickerOptionState } from './TagPickerOption';\nexport {\n TagPickerGroup,\n tagPickerGroupClassNames,\n renderTagPickerGroup_unstable,\n useTagPickerGroupStyles_unstable,\n useTagPickerGroup_unstable,\n} from './TagPickerGroup';\nexport type {\n TagPickerGroupBaseState,\n TagPickerGroupProps,\n TagPickerGroupSlots,\n TagPickerGroupState,\n} from './TagPickerGroup';\n\nexport {\n TagPickerOptionGroup,\n tagPickerOptionGroupClassNames,\n renderTagPickerOptionGroup,\n useTagPickerOptionGroupStyles,\n useTagPickerOptionGroup,\n} from './TagPickerOptionGroup';\nexport type {\n TagPickerOptionGroupProps,\n TagPickerOptionGroupSlots,\n TagPickerOptionGroupState,\n} from './TagPickerOptionGroup';\n\nexport { useTagPickerFilter } from './utils/useTagPickerFilter';\n\nexport { TagPickerContextProvider, useTagPickerContext_unstable } from './contexts/TagPickerContext';\nexport type { TagPickerContextValue } from './contexts/TagPickerContext';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable","useTagPickerBase_unstable","useTagPickerContextValues","TagPickerInput","tagPickerInputClassNames","renderTagPickerInput_unstable","useTagPickerInputStyles_unstable","useTagPickerInput_unstable","useTagPickerInputBase_unstable","TagPickerList","tagPickerListClassNames","renderTagPickerList_unstable","useTagPickerListStyles_unstable","useTagPickerList_unstable","TagPickerButton","tagPickerButtonClassNames","renderTagPickerButton_unstable","useTagPickerButtonStyles_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable","TagPickerControl","tagPickerControlClassNames","renderTagPickerControl_unstable","useTagPickerControlStyles_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable","TagPickerOption","tagPickerOptionClassNames","renderTagPickerOption_unstable","useTagPickerOptionStyles_unstable","useTagPickerOption_unstable","TagPickerGroup","tagPickerGroupClassNames","renderTagPickerGroup_unstable","useTagPickerGroupStyles_unstable","useTagPickerGroup_unstable","TagPickerOptionGroup","tagPickerOptionGroupClassNames","renderTagPickerOptionGroup","useTagPickerOptionGroupStyles","useTagPickerOptionGroup","useTagPickerFilter","TagPickerContextProvider","useTagPickerContext_unstable"],"mappings":";;;;;;;;;;;aACW;eAATA;;;eAyCAgB,gCAAe;;4BAkEgB;eAAxB4B;;;eAnDPtB,kCAAgB;;;eAuBhBW,8BAAc;;;eA7Dd5B,8BAAc;;;eAedM,4BAAa;;;eAsCbiB,gCAAe;;;eAsBfU,0CAAoB;;;eAlDpBpB,+CAA8B;;IAe9BM,+BAA+B;;;;eAuB/BW,6CAA6B;;iCA7DA;eAA7B5B;;;eAeAM,2CAA4B;;IA4D5B2B;+DAA0B;;;eAtB1BV,+CAA8B;;;eAxE9B7B,mCAAwB;;IAyCxBgB;yDAAyB;;;eAezBM,4CAA0B;;;eAuB1BW,wCAAwB;;4BA7DA;eAAxB5B;;;eAeAM,sCAAuB;;6BAsCE;eAAzBiB;;kCAsB8B;eAA9BU;;;eA3FApC,oCAAyB;;;eA2CzBkB,gDAA+B;;;eAF/BF,kDAAiC;;;eACjCC,4CAA2B;;;eAzC3BhB,oCAAyB;;;eAuGQyC,8CAA4B;;oCA9C7B;eAAhClB;;IAFAF;mEAAkC;;;eAClCC,8CAA4B;;;eA6CrBiB,sCAAkB;;oCAvBO;eAAhCP;;;eACAC,0CAA0B;;;eA5D1B3B,8CAA8B;;IAF9BF;+DAAgC;;;eAChCC,0CAA0B;;;eAc1BK,8CAA+B;;;eAC/BC,wCAAyB;;IA4DzB2B;4DAAuB;;iCADM;eAA7BD;;;eAtBAV,kDAAiC;;+BACN;eAA3BC;;;eAzEA9B,gCAAqB;;;2BAGhB,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n TagPicker,\n renderTagPicker_unstable,\n useTagPicker_unstable,\n useTagPickerBase_unstable,\n useTagPickerContextValues,\n} from './TagPicker';\nexport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerContextValues,\n TagPickerProps,\n TagPickerSlots,\n TagPickerState,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerSize,\n} from './TagPicker';\nexport {\n TagPickerInput,\n tagPickerInputClassNames,\n renderTagPickerInput_unstable,\n useTagPickerInputStyles_unstable,\n useTagPickerInput_unstable,\n useTagPickerInputBase_unstable,\n} from './TagPickerInput';\nexport type {\n TagPickerInputBaseProps,\n TagPickerInputBaseState,\n TagPickerInputProps,\n TagPickerInputSlots,\n TagPickerInputState,\n} from './TagPickerInput';\nexport {\n TagPickerList,\n tagPickerListClassNames,\n renderTagPickerList_unstable,\n useTagPickerListStyles_unstable,\n useTagPickerList_unstable,\n} from './TagPickerList';\nexport type { TagPickerListProps, TagPickerListSlots, TagPickerListState } from './TagPickerList';\nexport {\n TagPickerButton,\n tagPickerButtonClassNames,\n renderTagPickerButton_unstable,\n useTagPickerButtonStyles_unstable,\n useTagPickerButton_unstable,\n useTagPickerButtonBase_unstable,\n} from './TagPickerButton';\nexport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './TagPickerButton';\nexport {\n TagPickerControl,\n tagPickerControlClassNames,\n renderTagPickerControl_unstable,\n useTagPickerControlStyles_unstable,\n useTagPickerControl_unstable,\n useTagPickerControlBase_unstable,\n} from './TagPickerControl';\nexport type {\n TagPickerControlBaseState,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl';\nexport {\n TagPickerOption,\n tagPickerOptionClassNames,\n renderTagPickerOption_unstable,\n useTagPickerOptionStyles_unstable,\n useTagPickerOption_unstable,\n} from './TagPickerOption';\nexport type { TagPickerOptionProps, TagPickerOptionSlots, TagPickerOptionState } from './TagPickerOption';\nexport {\n TagPickerGroup,\n tagPickerGroupClassNames,\n renderTagPickerGroup_unstable,\n useTagPickerGroupStyles_unstable,\n useTagPickerGroup_unstable,\n} from './TagPickerGroup';\nexport type {\n TagPickerGroupBaseState,\n TagPickerGroupProps,\n TagPickerGroupSlots,\n TagPickerGroupState,\n} from './TagPickerGroup';\n\nexport {\n TagPickerOptionGroup,\n tagPickerOptionGroupClassNames,\n renderTagPickerOptionGroup,\n useTagPickerOptionGroupStyles,\n useTagPickerOptionGroup,\n} from './TagPickerOptionGroup';\nexport type {\n TagPickerOptionGroupProps,\n TagPickerOptionGroupSlots,\n TagPickerOptionGroupState,\n} from './TagPickerOptionGroup';\n\nexport { useTagPickerFilter } from './utils/useTagPickerFilter';\n\nexport { TagPickerContextProvider, useTagPickerContext_unstable } from './contexts/TagPickerContext';\nexport type { TagPickerContextValue } from './contexts/TagPickerContext';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable","useTagPickerBase_unstable","useTagPickerContextValues","TagPickerInput","tagPickerInputClassNames","renderTagPickerInput_unstable","useTagPickerInputStyles_unstable","useTagPickerInput_unstable","useTagPickerInputBase_unstable","TagPickerList","tagPickerListClassNames","renderTagPickerList_unstable","useTagPickerListStyles_unstable","useTagPickerList_unstable","TagPickerButton","tagPickerButtonClassNames","renderTagPickerButton_unstable","useTagPickerButtonStyles_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable","TagPickerControl","tagPickerControlClassNames","renderTagPickerControl_unstable","useTagPickerControlStyles_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable","TagPickerOption","tagPickerOptionClassNames","renderTagPickerOption_unstable","useTagPickerOptionStyles_unstable","useTagPickerOption_unstable","TagPickerGroup","tagPickerGroupClassNames","renderTagPickerGroup_unstable","useTagPickerGroupStyles_unstable","useTagPickerGroup_unstable","TagPickerOptionGroup","tagPickerOptionGroupClassNames","renderTagPickerOptionGroup","useTagPickerOptionGroupStyles","useTagPickerOptionGroup","useTagPickerFilter","TagPickerContextProvider","useTagPickerContext_unstable"],"mappings":";;;;;;;;;;;aACW;eAATA;;;eAyCAgB,gCAAe;;4BAkEgB;eAAxB4B;;;eAnDPtB,kCAAgB;;;eAuBhBW,8BAAc;;;eA7Dd5B,8BAAc;;;eAedM,4BAAa;;;eAsCbiB,gCAAe;;;eAsBfU,0CAAoB;;;eAlDpBpB,+CAA8B;;IAe9BM,+BAA+B;;;;eAuB/BW,6CAA6B;;iCA7DA;eAA7B5B;;;eAeAM,2CAA4B;;IA4D5B2B;+DAA0B;;;eAtB1BV,+CAA8B;;;eAxE9B7B,mCAAwB;;IAyCxBgB;yDAAyB;;;eAezBM,4CAA0B;;;eAuB1BW,wCAAwB;;4BA7DA;eAAxB5B;;;eAeAM,sCAAuB;;6BAsCE;eAAzBiB;;kCAsB8B;eAA9BU;;;eA3FApC,oCAAyB;;;eA2CzBkB,gDAA+B;;;eAF/BF,kDAAiC;;;eACjCC,4CAA2B;;;eAzC3BhB,oCAAyB;;;eAuGQyC,8CAA4B;;oCA9C7B;eAAhClB;;IAFAF;mEAAkC;;;eAClCC,8CAA4B;;;eA6CrBiB,sCAAkB;;oCAvBO;eAAhCP;;;eACAC,0CAA0B;;;eA5D1B3B,8CAA8B;;IAF9BF;+DAAgC;;;eAChCC,0CAA0B;;;eAc1BK,8CAA+B;;;eAC/BC,wCAAyB;;IA4DzB2B;4DAAuB;;iCADM;eAA7BD;;;eAtBAV,kDAAiC;;+BACN;eAA3BC;;;eAzEA9B,gCAAqB;;;2BAGhB,iBAAc;gCAmBd,sBAAmB;+BAcnB,qBAAkB;iCASlB,uBAAoB;kCAepB,wBAAqB;iCAcrB,uBAAoB;gCAQpB,sBAAmB;sCAcnB,4BAAyB;oCAOG,gCAA6B;kCAEO,iCAA8B"}
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useExpandLabel", {
|
|
|
11
11
|
});
|
|
12
12
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
13
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _TagPickerContext = require("../contexts/TagPickerContext");
|
|
14
|
+
const _TagPickerContext = require("../contexts/TagPickerContext.cjs");
|
|
15
15
|
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
16
16
|
function useExpandLabel(options) {
|
|
17
17
|
const { tagPickerId, state } = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/useExpandLabel.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTagPickerContext_unstable } from '../contexts/TagPickerContext';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { TagPickerControlState } from '../TagPickerControl';\n\nexport function useExpandLabel(options: {\n tagPickerId: string;\n state: Pick<TagPickerControlState, 'expandIcon'>;\n}): React.RefObject<HTMLSpanElement | null> {\n const { tagPickerId, state } = options;\n const { targetDocument } = useFluent();\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const expandIconRef = React.useRef<HTMLSpanElement | null>(null);\n\n const hasExpandIcon = !!state.expandIcon;\n const {\n 'aria-label': expandIconAriaLabel,\n 'aria-labelledby': expandIconAriaLabelledby,\n id: expandIconId,\n } = state.expandIcon || {};\n\n // If aria-label or aria-labelledby changes, recalculate aria-label and aria-labelledby for the expandIcon\n // The expandIcon's label is calculated based on the input's label\n // TODO: investigate ways to enforce client to provide a label rather than need to calculate it\n const getExpandLabel = React.useCallback(\n (ariaLabel?: string | null, ariaLabelledBy?: string | null) => {\n let expandAriaLabel = undefined;\n let expandAriaLabelledBy = undefined;\n let expandId = undefined;\n\n if (hasExpandIcon) {\n const hasExpandLabel = expandIconAriaLabel || expandIconAriaLabelledby;\n // If there is no explicit aria-label, calculate default accName attribute for expandIcon button,\n // using the following steps:\n // 1. If there is an aria-label, it is \"Open [aria-label]\"\n // 2. If there is an aria-labelledby, it is \"Open [aria-labelledby target]\" (using aria-labelledby + ids)\n // 3. If there is no aria-label/ledby attr, it falls back to \"Open\"\n // We can't fall back to a label/htmlFor name because of https://github.com/w3c/accname/issues/179\n const defaultOpenString = 'Open'; // this is english-only since it is the fallback\n if (!hasExpandLabel) {\n if (ariaLabelledBy) {\n expandAriaLabel = defaultOpenString;\n expandId = expandIconId ?? `${tagPickerId}-chevron`;\n expandAriaLabelledBy = `${expandId} ${ariaLabelledBy}`;\n } else if (ariaLabel) {\n expandAriaLabel = `${defaultOpenString} ${ariaLabel}`;\n } else {\n expandAriaLabel = defaultOpenString;\n }\n }\n }\n\n return { expandAriaLabel, expandAriaLabelledBy, expandId };\n },\n [expandIconAriaLabel, expandIconAriaLabelledby, expandIconId, hasExpandIcon, tagPickerId],\n );\n\n const setExpandLabel = React.useCallback(() => {\n const inputAriaLabel = triggerRef.current?.getAttribute('aria-label');\n const inputAriaLabelledBy = triggerRef.current?.getAttribute('aria-labelledby');\n\n const { expandAriaLabel, expandAriaLabelledBy, expandId } = getExpandLabel(inputAriaLabel, inputAriaLabelledBy);\n\n if (expandAriaLabelledBy) {\n expandIconRef.current?.setAttribute('aria-labelledby', expandAriaLabelledBy);\n }\n if (expandAriaLabel) {\n expandIconRef.current?.setAttribute('aria-label', expandAriaLabel);\n }\n if (expandId) {\n expandIconRef.current?.setAttribute('id', expandId);\n }\n }, [getExpandLabel, triggerRef]);\n\n React.useEffect(() => {\n const hasExpandLabel = expandIconAriaLabel || expandIconAriaLabelledby;\n if (!targetDocument?.defaultView || !triggerRef.current || !hasExpandIcon || hasExpandLabel) {\n return;\n }\n\n const win = targetDocument.defaultView;\n\n // On first render, calculate the default aria-label and aria-labelledby for the expandIcon\n setExpandLabel();\n\n const observer = new win.MutationObserver(setExpandLabel);\n observer.observe(triggerRef.current, {\n attributes: true,\n attributeFilter: ['aria-label', 'aria-labelledby'],\n });\n\n return () => observer.disconnect();\n }, [\n getExpandLabel,\n setExpandLabel,\n expandIconAriaLabel,\n expandIconAriaLabelledby,\n hasExpandIcon,\n tagPickerId,\n triggerRef,\n targetDocument,\n ]);\n\n return expandIconRef;\n}\n"],"names":["React","useTagPickerContext_unstable","useFluent_unstable","useFluent","useExpandLabel","options","tagPickerId","state","targetDocument","triggerRef","ctx","expandIconRef","useRef","hasExpandIcon","expandIcon","expandIconAriaLabel","expandIconAriaLabelledby","id","expandIconId","getExpandLabel","useCallback","ariaLabel","ariaLabelledBy","expandAriaLabel","undefined","expandAriaLabelledBy","expandId","hasExpandLabel","defaultOpenString","setExpandLabel","inputAriaLabel","current","getAttribute","inputAriaLabelledBy","setAttribute","useEffect","defaultView","win","observer","MutationObserver","observe","attributes","attributeFilter","disconnect"],"mappings":"AAAA;;;;;+BAOgBI;;;;;;;iEALO,QAAQ;kCACc
|
|
1
|
+
{"version":3,"sources":["../src/utils/useExpandLabel.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTagPickerContext_unstable } from '../contexts/TagPickerContext';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { TagPickerControlState } from '../TagPickerControl';\n\nexport function useExpandLabel(options: {\n tagPickerId: string;\n state: Pick<TagPickerControlState, 'expandIcon'>;\n}): React.RefObject<HTMLSpanElement | null> {\n const { tagPickerId, state } = options;\n const { targetDocument } = useFluent();\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const expandIconRef = React.useRef<HTMLSpanElement | null>(null);\n\n const hasExpandIcon = !!state.expandIcon;\n const {\n 'aria-label': expandIconAriaLabel,\n 'aria-labelledby': expandIconAriaLabelledby,\n id: expandIconId,\n } = state.expandIcon || {};\n\n // If aria-label or aria-labelledby changes, recalculate aria-label and aria-labelledby for the expandIcon\n // The expandIcon's label is calculated based on the input's label\n // TODO: investigate ways to enforce client to provide a label rather than need to calculate it\n const getExpandLabel = React.useCallback(\n (ariaLabel?: string | null, ariaLabelledBy?: string | null) => {\n let expandAriaLabel = undefined;\n let expandAriaLabelledBy = undefined;\n let expandId = undefined;\n\n if (hasExpandIcon) {\n const hasExpandLabel = expandIconAriaLabel || expandIconAriaLabelledby;\n // If there is no explicit aria-label, calculate default accName attribute for expandIcon button,\n // using the following steps:\n // 1. If there is an aria-label, it is \"Open [aria-label]\"\n // 2. If there is an aria-labelledby, it is \"Open [aria-labelledby target]\" (using aria-labelledby + ids)\n // 3. If there is no aria-label/ledby attr, it falls back to \"Open\"\n // We can't fall back to a label/htmlFor name because of https://github.com/w3c/accname/issues/179\n const defaultOpenString = 'Open'; // this is english-only since it is the fallback\n if (!hasExpandLabel) {\n if (ariaLabelledBy) {\n expandAriaLabel = defaultOpenString;\n expandId = expandIconId ?? `${tagPickerId}-chevron`;\n expandAriaLabelledBy = `${expandId} ${ariaLabelledBy}`;\n } else if (ariaLabel) {\n expandAriaLabel = `${defaultOpenString} ${ariaLabel}`;\n } else {\n expandAriaLabel = defaultOpenString;\n }\n }\n }\n\n return { expandAriaLabel, expandAriaLabelledBy, expandId };\n },\n [expandIconAriaLabel, expandIconAriaLabelledby, expandIconId, hasExpandIcon, tagPickerId],\n );\n\n const setExpandLabel = React.useCallback(() => {\n const inputAriaLabel = triggerRef.current?.getAttribute('aria-label');\n const inputAriaLabelledBy = triggerRef.current?.getAttribute('aria-labelledby');\n\n const { expandAriaLabel, expandAriaLabelledBy, expandId } = getExpandLabel(inputAriaLabel, inputAriaLabelledBy);\n\n if (expandAriaLabelledBy) {\n expandIconRef.current?.setAttribute('aria-labelledby', expandAriaLabelledBy);\n }\n if (expandAriaLabel) {\n expandIconRef.current?.setAttribute('aria-label', expandAriaLabel);\n }\n if (expandId) {\n expandIconRef.current?.setAttribute('id', expandId);\n }\n }, [getExpandLabel, triggerRef]);\n\n React.useEffect(() => {\n const hasExpandLabel = expandIconAriaLabel || expandIconAriaLabelledby;\n if (!targetDocument?.defaultView || !triggerRef.current || !hasExpandIcon || hasExpandLabel) {\n return;\n }\n\n const win = targetDocument.defaultView;\n\n // On first render, calculate the default aria-label and aria-labelledby for the expandIcon\n setExpandLabel();\n\n const observer = new win.MutationObserver(setExpandLabel);\n observer.observe(triggerRef.current, {\n attributes: true,\n attributeFilter: ['aria-label', 'aria-labelledby'],\n });\n\n return () => observer.disconnect();\n }, [\n getExpandLabel,\n setExpandLabel,\n expandIconAriaLabel,\n expandIconAriaLabelledby,\n hasExpandIcon,\n tagPickerId,\n triggerRef,\n targetDocument,\n ]);\n\n return expandIconRef;\n}\n"],"names":["React","useTagPickerContext_unstable","useFluent_unstable","useFluent","useExpandLabel","options","tagPickerId","state","targetDocument","triggerRef","ctx","expandIconRef","useRef","hasExpandIcon","expandIcon","expandIconAriaLabel","expandIconAriaLabelledby","id","expandIconId","getExpandLabel","useCallback","ariaLabel","ariaLabelledBy","expandAriaLabel","undefined","expandAriaLabelledBy","expandId","hasExpandLabel","defaultOpenString","setExpandLabel","inputAriaLabel","current","getAttribute","inputAriaLabelledBy","setAttribute","useEffect","defaultView","win","observer","MutationObserver","observe","attributes","attributeFilter","disconnect"],"mappings":"AAAA;;;;;+BAOgBI;;;;;;;iEALO,QAAQ;kCACc,kCAA+B;qCAC5B,kCAAkC;AAG3E,wBAAwBC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AO,EAAE;YACnCU,YAAY;YACZC,iBAAiB;gBAAC;gBAAc;aAAkB;QACpD;QAEA,OAAO,IAAMJ,SAASK,UAAU;IAClC,GAAG;QACDxB;QACAU;QACAd;QACAC;QACAH;QACAP;QACAG;QACAD;KACD;IAED,OAAOG;AACT"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "useTabsterEscapeIgnore", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return useTabsterEscapeIgnore;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
|
13
|
+
function useTabsterEscapeIgnore(props, shouldIgnoreEscape) {
|
|
14
|
+
const ignoreEscapeKeyAttribute = (0, _reacttabster.useTabsterAttributes)({
|
|
15
|
+
focusable: {
|
|
16
|
+
ignoreKeydown: {
|
|
17
|
+
Escape: shouldIgnoreEscape
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return (0, _reacttabster.useMergedTabsterAttributes_unstable)(ignoreEscapeKeyAttribute, typeof props === 'object' ? props : {});
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/useTabsterEscapeIgnore.ts"],"sourcesContent":["'use client';\n\nimport {\n useMergedTabsterAttributes_unstable,\n useTabsterAttributes,\n type TabsterDOMAttribute,\n} from '@fluentui/react-tabster';\n\n/**\n * Hook to ignore Escape keydown events for a given element when Tabster is enabled.\n * @internal\n */\nexport function useTabsterEscapeIgnore(props: unknown, shouldIgnoreEscape: boolean): TabsterDOMAttribute {\n const ignoreEscapeKeyAttribute = useTabsterAttributes({\n focusable: {\n ignoreKeydown: { Escape: shouldIgnoreEscape },\n },\n });\n\n return useMergedTabsterAttributes_unstable(ignoreEscapeKeyAttribute, typeof props === 'object' ? props : {});\n}\n"],"names":["useMergedTabsterAttributes_unstable","useTabsterAttributes","useTabsterEscapeIgnore","props","shouldIgnoreEscape","ignoreEscapeKeyAttribute","focusable","ignoreKeydown","Escape"],"mappings":"AAAA;;;;;;;;;;;8BAMO,0BAA0B;AAM1B,SAASE,uBAAuBC,KAAc,EAAEC,kBAA2B;IAChF,MAAMC,+BAA2BJ,kCAAAA,EAAqB;QACpDK,WAAW;YACTC,eAAe;gBAAEC,QAAQJ;YAAmB;QAC9C;IACF;IAEA,WAAOJ,iDAAAA,EAAoCK,0BAA0B,OAAOF,UAAU,WAAWA,QAAQ,CAAC;AAC5G"}
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useTagPickerFilter", {
|
|
|
11
11
|
});
|
|
12
12
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
13
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
|
-
const _TagPickerOption = require("../TagPickerOption");
|
|
14
|
+
const _TagPickerOption = require("../TagPickerOption.cjs");
|
|
15
15
|
function defaultRenderOption(option) {
|
|
16
16
|
return /*#__PURE__*/ _react.createElement(_TagPickerOption.TagPickerOption, {
|
|
17
17
|
value: option,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/useTagPickerFilter.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { TagPickerOption } from '../TagPickerOption';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\ntype UseTagPickerFilterConfig = {\n query: string;\n options: string[];\n /**\n * Provides a custom filter for the option.\n * By default the filter will check if the option includes the query.\n */\n filter?: (option: string, index: number) => boolean;\n\n /** Provides an element to be displayed when there are no options. */\n noOptionsElement: JSXElement;\n\n /** Provides a custom render for the option. */\n renderOption?: (option: string) => JSXElement;\n};\n\nfunction defaultRenderOption(option: string) {\n return (\n <TagPickerOption value={option} key={option}>\n {option}\n </TagPickerOption>\n );\n}\n\nexport function useTagPickerFilter({\n filter: filterOverride,\n noOptionsElement,\n renderOption = defaultRenderOption,\n query,\n options,\n}: UseTagPickerFilterConfig): JSXElement[] {\n const defaultFilter = React.useCallback(\n (option: string) => {\n const trimmedQuery = query.trim();\n if (trimmedQuery === '') {\n return true;\n }\n return option.toLowerCase().includes(trimmedQuery.toLowerCase());\n },\n [query],\n );\n const filter = filterOverride ?? defaultFilter;\n const filteredOptions = React.useMemo(\n () =>\n options.reduce<JSXElement[]>((accumulator, option, index) => {\n if (filter(option, index)) {\n accumulator.push(renderOption(option));\n }\n return accumulator;\n }, []),\n [options, renderOption, filter],\n );\n\n return filteredOptions.length === 0\n ? [noOptionsElement.key ? noOptionsElement : React.cloneElement(noOptionsElement, { key: 'no-options' })]\n : filteredOptions;\n}\n"],"names":["React","TagPickerOption","defaultRenderOption","option","value","key","useTagPickerFilter","filter","filterOverride","noOptionsElement","renderOption","query","options","defaultFilter","useCallback","trimmedQuery","trim","toLowerCase","includes","filteredOptions","useMemo","reduce","accumulator","index","push","length","cloneElement"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;iCACC,
|
|
1
|
+
{"version":3,"sources":["../src/utils/useTagPickerFilter.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { TagPickerOption } from '../TagPickerOption';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\ntype UseTagPickerFilterConfig = {\n query: string;\n options: string[];\n /**\n * Provides a custom filter for the option.\n * By default the filter will check if the option includes the query.\n */\n filter?: (option: string, index: number) => boolean;\n\n /** Provides an element to be displayed when there are no options. */\n noOptionsElement: JSXElement;\n\n /** Provides a custom render for the option. */\n renderOption?: (option: string) => JSXElement;\n};\n\nfunction defaultRenderOption(option: string) {\n return (\n <TagPickerOption value={option} key={option}>\n {option}\n </TagPickerOption>\n );\n}\n\nexport function useTagPickerFilter({\n filter: filterOverride,\n noOptionsElement,\n renderOption = defaultRenderOption,\n query,\n options,\n}: UseTagPickerFilterConfig): JSXElement[] {\n const defaultFilter = React.useCallback(\n (option: string) => {\n const trimmedQuery = query.trim();\n if (trimmedQuery === '') {\n return true;\n }\n return option.toLowerCase().includes(trimmedQuery.toLowerCase());\n },\n [query],\n );\n const filter = filterOverride ?? defaultFilter;\n const filteredOptions = React.useMemo(\n () =>\n options.reduce<JSXElement[]>((accumulator, option, index) => {\n if (filter(option, index)) {\n accumulator.push(renderOption(option));\n }\n return accumulator;\n }, []),\n [options, renderOption, filter],\n );\n\n return filteredOptions.length === 0\n ? [noOptionsElement.key ? noOptionsElement : React.cloneElement(noOptionsElement, { key: 'no-options' })]\n : filteredOptions;\n}\n"],"names":["React","TagPickerOption","defaultRenderOption","option","value","key","useTagPickerFilter","filter","filterOverride","noOptionsElement","renderOption","query","options","defaultFilter","useCallback","trimmedQuery","trim","toLowerCase","includes","filteredOptions","useMemo","reduce","accumulator","index","push","length","cloneElement"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;iCACC,wBAAqB;AAmBrD,SAASE,oBAAoBC,MAAc;IACzC,OAAA,WAAA,GACE,OAAA,aAAA,CAACF,gCAAAA,EAAAA;QAAgBG,OAAOD;QAAQE,KAAKF;OAClCA;AAGP;AAEO,SAASG,mBAAmB,EACjCC,QAAQC,cAAc,EACtBC,gBAAgB,EAChBC,eAAeR,mBAAmB,EAClCS,KAAK,EACLC,OAAO,EACkB;IACzB,MAAMC,gBAAgBb,OAAMc,WAAW,CACrC,CAACX;QACC,MAAMY,eAAeJ,MAAMK,IAAI;QAC/B,IAAID,iBAAiB,IAAI;YACvB,OAAO;QACT;QACA,OAAOZ,OAAOc,WAAW,GAAGC,QAAQ,CAACH,aAAaE,WAAW;IAC/D,GACA;QAACN;KAAM;IAET,MAAMJ,SAASC,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,iBAAkBK;IACjC,MAAMM,kBAAkBnB,OAAMoB,OAAO,CACnC,IACER,QAAQS,MAAM,CAAe,CAACC,aAAanB,QAAQoB;YACjD,IAAIhB,OAAOJ,QAAQoB,QAAQ;gBACzBD,YAAYE,IAAI,CAACd,aAAaP;YAChC;YACA,OAAOmB;QACT,GAAG,EAAE,GACP;QAACV;QAASF;QAAcH;KAAO;IAGjC,OAAOY,gBAAgBM,MAAM,KAAK,IAC9B;QAAChB,iBAAiBJ,GAAG,GAAGI,mBAAAA,WAAAA,GAAmBT,OAAM0B,YAAY,CAACjB,kBAAkB;YAAEJ,KAAK;QAAa;KAAG,GACvGc;AACN"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-tag-picker",
|
|
3
|
-
"version": "9.10.
|
|
3
|
+
"version": "9.10.2",
|
|
4
4
|
"description": "FluentUI TagPicker component",
|
|
5
|
-
"main": "lib-commonjs/index.
|
|
5
|
+
"main": "lib-commonjs/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
7
|
"typings": "./dist/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"files": [
|
|
10
10
|
"*.md",
|
|
11
11
|
"dist/*.d.ts",
|
|
12
|
+
"dist/*.d.cts",
|
|
12
13
|
"lib",
|
|
13
14
|
"lib-commonjs"
|
|
14
15
|
],
|
|
@@ -18,20 +19,20 @@
|
|
|
18
19
|
},
|
|
19
20
|
"license": "MIT",
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"@fluentui/keyboard-keys": "^9.0.
|
|
22
|
-
"@fluentui/react-aria": "^9.17.
|
|
23
|
-
"@fluentui/react-combobox": "^9.17.
|
|
24
|
-
"@fluentui/react-context-selector": "^9.2.
|
|
25
|
-
"@fluentui/react-field": "^9.5.
|
|
22
|
+
"@fluentui/keyboard-keys": "^9.0.9",
|
|
23
|
+
"@fluentui/react-aria": "^9.17.14",
|
|
24
|
+
"@fluentui/react-combobox": "^9.17.5",
|
|
25
|
+
"@fluentui/react-context-selector": "^9.2.19",
|
|
26
|
+
"@fluentui/react-field": "^9.5.4",
|
|
26
27
|
"@fluentui/react-icons": "^2.0.245",
|
|
27
|
-
"@fluentui/react-jsx-runtime": "^9.4.
|
|
28
|
-
"@fluentui/react-portal": "^9.8.
|
|
29
|
-
"@fluentui/react-positioning": "^9.23.
|
|
30
|
-
"@fluentui/react-shared-contexts": "^9.26.
|
|
31
|
-
"@fluentui/react-tabster": "^9.26.
|
|
32
|
-
"@fluentui/react-tags": "^9.9.
|
|
33
|
-
"@fluentui/react-theme": "^9.2.
|
|
34
|
-
"@fluentui/react-utilities": "^9.26.
|
|
28
|
+
"@fluentui/react-jsx-runtime": "^9.4.5",
|
|
29
|
+
"@fluentui/react-portal": "^9.8.15",
|
|
30
|
+
"@fluentui/react-positioning": "^9.23.1",
|
|
31
|
+
"@fluentui/react-shared-contexts": "^9.26.3",
|
|
32
|
+
"@fluentui/react-tabster": "^9.26.17",
|
|
33
|
+
"@fluentui/react-tags": "^9.9.4",
|
|
34
|
+
"@fluentui/react-theme": "^9.2.2",
|
|
35
|
+
"@fluentui/react-utilities": "^9.26.6",
|
|
35
36
|
"@griffel/react": "^1.5.32",
|
|
36
37
|
"@swc/helpers": "^0.5.1"
|
|
37
38
|
},
|
|
@@ -43,10 +44,14 @@
|
|
|
43
44
|
},
|
|
44
45
|
"exports": {
|
|
45
46
|
".": {
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./dist/index.d.ts",
|
|
49
|
+
"default": "./lib/index.js"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./dist/index.d.cts",
|
|
53
|
+
"default": "./lib-commonjs/index.cjs"
|
|
54
|
+
}
|
|
50
55
|
},
|
|
51
56
|
"./package.json": "./package.json"
|
|
52
57
|
},
|
|
@@ -55,5 +60,6 @@
|
|
|
55
60
|
"major",
|
|
56
61
|
"prerelease"
|
|
57
62
|
]
|
|
58
|
-
}
|
|
63
|
+
},
|
|
64
|
+
"type": "module"
|
|
59
65
|
}
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;;;;IAmBaG,+BAAAA;;;+BAyDA2B;;;;2BAzE8B,uBAAuB;kCAOrB,kCAAkC;+BAC1C,2BAA2B;AAQzD,wCAAwC,CAC7C1B,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,OAAGP,qCAAAA;IACnD,MAAMQ,iBAAaP,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAID,UAAU;IACrE,MAAME,WAAOT,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,YAAQV,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,wBAAoBX,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,gBAAYd,8CAAAA,EAA6BQ,CAAAA,MAAOA,IAAIM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