@fluentui/react-tag-picker 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -18
- package/README.md +19 -0
- package/lib/components/TagPicker/TagPicker.js.map +1 -1
- package/lib/components/TagPicker/TagPicker.types.js.map +1 -1
- package/lib/components/TagPicker/index.js.map +1 -1
- package/lib/components/TagPicker/renderTagPicker.js.map +1 -1
- package/lib/components/TagPicker/useTagPicker.js.map +1 -1
- package/lib/components/TagPicker/useTagPickerContextValues.js.map +1 -1
- package/lib/components/TagPickerButton/TagPickerButton.js.map +1 -1
- package/lib/components/TagPickerButton/TagPickerButton.module.css +55 -0
- package/lib/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
- package/lib/components/TagPickerButton/index.js.map +1 -1
- package/lib/components/TagPickerButton/renderTagPickerButton.js +2 -2
- package/lib/components/TagPickerButton/renderTagPickerButton.js.map +1 -1
- package/lib/components/TagPickerButton/useTagPickerButton.js.map +1 -1
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.css.js +9 -0
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.css.js.map +1 -0
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.css.js +9 -0
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.css.js.map +1 -0
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js.map +1 -1
- package/lib/components/TagPickerControl/TagPickerControl.js.map +1 -1
- package/lib/components/TagPickerControl/TagPickerControl.module.css +166 -0
- package/lib/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
- package/lib/components/TagPickerControl/index.js.map +1 -1
- package/lib/components/TagPickerControl/renderTagPickerControl.js +2 -2
- package/lib/components/TagPickerControl/renderTagPickerControl.js.map +1 -1
- package/lib/components/TagPickerControl/useTagPickerControl.js +6 -3
- package/lib/components/TagPickerControl/useTagPickerControl.js.map +1 -1
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.css.js +27 -0
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.css.js.map +1 -0
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.raw.css.js +27 -0
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.raw.css.js.map +1 -0
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js.map +1 -1
- package/lib/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
- package/lib/components/TagPickerGroup/TagPickerGroup.module.css +18 -0
- package/lib/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -1
- package/lib/components/TagPickerGroup/index.js.map +1 -1
- package/lib/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -1
- package/lib/components/TagPickerGroup/useTagPickerGroup.js.map +1 -1
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.css.js +14 -0
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.css.js.map +1 -0
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.css.js +14 -0
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.css.js.map +1 -0
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js.map +1 -1
- package/lib/components/TagPickerInput/TagPickerInput.js.map +1 -1
- package/lib/components/TagPickerInput/TagPickerInput.module.css +53 -0
- package/lib/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
- package/lib/components/TagPickerInput/index.js.map +1 -1
- package/lib/components/TagPickerInput/renderTagPickerInput.js +2 -2
- package/lib/components/TagPickerInput/renderTagPickerInput.js.map +1 -1
- package/lib/components/TagPickerInput/useTagPickerInput.js.map +1 -1
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.css.js +9 -0
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.css.js.map +1 -0
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.css.js +9 -0
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.css.js.map +1 -0
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js.map +1 -1
- package/lib/components/TagPickerList/TagPickerList.js.map +1 -1
- package/lib/components/TagPickerList/TagPickerList.module.css +11 -0
- package/lib/components/TagPickerList/TagPickerList.types.js.map +1 -1
- package/lib/components/TagPickerList/index.js.map +1 -1
- package/lib/components/TagPickerList/renderTagPickerList.js +2 -2
- package/lib/components/TagPickerList/renderTagPickerList.js.map +1 -1
- package/lib/components/TagPickerList/useTagPickerList.js.map +1 -1
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.css.js +9 -0
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.css.js.map +1 -0
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.raw.css.js +9 -0
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.raw.css.js.map +1 -0
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.raw.js.map +1 -1
- package/lib/components/TagPickerOption/TagPickerOption.js.map +1 -1
- package/lib/components/TagPickerOption/TagPickerOption.module.css +24 -0
- package/lib/components/TagPickerOption/TagPickerOption.types.js.map +1 -1
- package/lib/components/TagPickerOption/index.js.map +1 -1
- package/lib/components/TagPickerOption/renderTagPickerOption.js +2 -2
- package/lib/components/TagPickerOption/renderTagPickerOption.js.map +1 -1
- package/lib/components/TagPickerOption/useTagPickerOption.js +2 -0
- package/lib/components/TagPickerOption/useTagPickerOption.js.map +1 -1
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.css.js +30 -0
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.css.js.map +1 -0
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.css.js +30 -0
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.css.js.map +1 -0
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/index.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.css.js +17 -0
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.css.js.map +1 -0
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.css.js +17 -0
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.css.js.map +1 -0
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js.map +1 -1
- package/lib/contexts/TagPickerContext.js.map +1 -1
- package/lib/utils/tagPicker2Tag.js.map +1 -1
- package/lib/utils/tokens.js.map +1 -1
- package/lib/utils/useExpandLabel.js.map +1 -1
- package/lib/utils/useResizeObserverRef.js.map +1 -1
- package/lib/utils/useTabsterEscapeIgnore.js.map +1 -1
- package/lib/utils/useTagPickerFilter.js.map +1 -1
- package/lib-commonjs/TagPicker.cjs +6 -6
- package/lib-commonjs/TagPickerButton.cjs +7 -7
- package/lib-commonjs/TagPickerControl.cjs +9 -9
- package/lib-commonjs/TagPickerControl.cjs.map +1 -1
- package/lib-commonjs/TagPickerGroup.cjs +6 -6
- package/lib-commonjs/TagPickerInput.cjs +7 -7
- package/lib-commonjs/TagPickerList.cjs +6 -6
- package/lib-commonjs/TagPickerOption.cjs +6 -6
- package/lib-commonjs/TagPickerOptionGroup.cjs +6 -6
- package/lib-commonjs/components/TagPicker/TagPicker.cjs.map +1 -1
- package/lib-commonjs/components/TagPicker/TagPicker.types.cjs.map +1 -1
- package/lib-commonjs/components/TagPicker/index.cjs +6 -6
- package/lib-commonjs/components/TagPicker/index.cjs.map +1 -1
- package/lib-commonjs/components/TagPicker/renderTagPicker.cjs.map +1 -1
- package/lib-commonjs/components/TagPicker/useTagPicker.cjs +3 -3
- package/lib-commonjs/components/TagPicker/useTagPicker.cjs.map +1 -1
- package/lib-commonjs/components/TagPicker/useTagPickerContextValues.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerButton/TagPickerButton.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerButton/TagPickerButton.module.css +55 -0
- package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerButton/index.cjs +7 -7
- package/lib-commonjs/components/TagPickerButton/index.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButton.cjs +3 -3
- package/lib-commonjs/components/TagPickerButton/useTagPickerButton.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.cjs +3 -3
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerControl/TagPickerControl.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerControl/TagPickerControl.module.css +166 -0
- package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerControl/index.cjs +9 -9
- package/lib-commonjs/components/TagPickerControl/index.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerControl/useTagPickerControl.cjs +9 -6
- package/lib-commonjs/components/TagPickerControl/useTagPickerControl.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.cjs +5 -5
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.css.cjs +52 -0
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.cjs +5 -5
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.css.cjs +52 -0
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.module.css +18 -0
- package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/index.cjs +6 -6
- package/lib-commonjs/components/TagPickerGroup/index.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.cjs +3 -3
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.css.cjs +33 -0
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.css.cjs +33 -0
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerInput/TagPickerInput.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerInput/TagPickerInput.module.css +53 -0
- package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerInput/index.cjs +7 -7
- package/lib-commonjs/components/TagPickerInput/index.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerInput/useTagPickerInput.cjs +3 -3
- package/lib-commonjs/components/TagPickerInput/useTagPickerInput.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.cjs +3 -3
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerList/TagPickerList.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerList/TagPickerList.module.css +11 -0
- package/lib-commonjs/components/TagPickerList/TagPickerList.types.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerList/index.cjs +6 -6
- package/lib-commonjs/components/TagPickerList/index.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerList/renderTagPickerList.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerList/useTagPickerList.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.cjs +3 -3
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerOption/TagPickerOption.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOption/TagPickerOption.module.css +24 -0
- package/lib-commonjs/components/TagPickerOption/TagPickerOption.types.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOption/index.cjs +6 -6
- package/lib-commonjs/components/TagPickerOption/index.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOption/renderTagPickerOption.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOption/useTagPickerOption.cjs +2 -0
- package/lib-commonjs/components/TagPickerOption/useTagPickerOption.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.cjs +3 -3
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.css.cjs +49 -0
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.css.cjs +49 -0
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/index.cjs +6 -6
- package/lib-commonjs/components/TagPickerOptionGroup/index.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/renderTagPickerOptionGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.cjs +3 -3
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.css.cjs +35 -0
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.css.cjs +35 -0
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/contexts/TagPickerContext.cjs +4 -4
- package/lib-commonjs/contexts/TagPickerContext.cjs.map +1 -1
- package/lib-commonjs/index.cjs +47 -47
- package/lib-commonjs/index.cjs.map +1 -1
- package/lib-commonjs/utils/tagPicker2Tag.cjs +4 -4
- package/lib-commonjs/utils/tagPicker2Tag.cjs.map +1 -1
- package/lib-commonjs/utils/tokens.cjs +3 -3
- package/lib-commonjs/utils/tokens.cjs.map +1 -1
- package/lib-commonjs/utils/useExpandLabel.cjs.map +1 -1
- package/lib-commonjs/utils/useResizeObserverRef.cjs.map +1 -1
- package/lib-commonjs/utils/useTabsterEscapeIgnore.cjs.map +1 -1
- package/lib-commonjs/utils/useTagPickerFilter.cjs.map +1 -1
- package/package.json +21 -21
- package/dist/metadata/api/api-root.json +0 -1
- package/dist/metadata/index.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,30 +1,79 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-tag-picker
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Sat, 31 Oct 2026 11:08:58 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.
|
|
7
|
+
## [9.75.0-experimental.css-modules.20261031-810ab07afb.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.10.3..@fluentui/react-tag-picker_v9.74.7-experimental.cli-api.20261006-ccaa611d58.0)
|
|
9
|
+
Sat, 31 Oct 2026 11:08:58 GMT
|
|
11
10
|
|
|
12
11
|
### Changes
|
|
13
12
|
|
|
14
|
-
- Release 9.
|
|
15
|
-
- Bump @fluentui/keyboard-keys to v9.
|
|
16
|
-
- Bump @fluentui/react-aria to v9.
|
|
17
|
-
- Bump @fluentui/react-combobox to v9.
|
|
18
|
-
- Bump @fluentui/react-context-selector to v9.
|
|
19
|
-
- Bump @fluentui/react-field to v9.
|
|
20
|
-
- Bump @fluentui/react-jsx-runtime to v9.
|
|
21
|
-
- Bump @fluentui/react-portal to v9.
|
|
22
|
-
- Bump @fluentui/react-positioning to v9.
|
|
23
|
-
- Bump @fluentui/react-shared-contexts to v9.
|
|
24
|
-
- Bump @fluentui/react-tabster to v9.
|
|
25
|
-
- Bump @fluentui/react-tags to v9.
|
|
26
|
-
- Bump @fluentui/react-theme to v9.
|
|
27
|
-
- Bump @fluentui/react-utilities to v9.
|
|
13
|
+
- Release 9.75.0-experimental.css-modules.20261031-810ab07afb ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
|
|
14
|
+
- Bump @fluentui/keyboard-keys to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
15
|
+
- Bump @fluentui/react-aria to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-combobox to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-context-selector to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-field to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-jsx-runtime to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-portal to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-positioning to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
- Bump @fluentui/react-shared-contexts to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
23
|
+
- Bump @fluentui/react-tabster to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
24
|
+
- Bump @fluentui/react-tags to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
25
|
+
- Bump @fluentui/react-theme to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
26
|
+
- Bump @fluentui/react-utilities to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
27
|
+
|
|
28
|
+
## [9.10.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.10.6)
|
|
29
|
+
|
|
30
|
+
Mon, 19 Oct 2026 16:49:01 GMT
|
|
31
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.10.5..@fluentui/react-tag-picker_v9.10.6)
|
|
32
|
+
|
|
33
|
+
### Patches
|
|
34
|
+
|
|
35
|
+
- fix: expose selection state on grouped TagPicker options for assistive technology ([PR #36834](https://github.com/microsoft/fluentui/pull/36834) by paulmardling@microsoft.com)
|
|
36
|
+
- Bump @fluentui/react-aria to v9.17.16 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
37
|
+
- Bump @fluentui/react-combobox to v9.17.8 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
38
|
+
- Bump @fluentui/react-context-selector to v9.2.21 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
39
|
+
- Bump @fluentui/react-field to v9.5.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
40
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
41
|
+
- Bump @fluentui/react-portal to v9.8.17 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
42
|
+
- Bump @fluentui/react-positioning to v9.23.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
43
|
+
- Bump @fluentui/react-tabster to v9.26.19 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
44
|
+
- Bump @fluentui/react-tags to v9.9.8 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
45
|
+
- Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
46
|
+
|
|
47
|
+
## [9.10.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.10.5)
|
|
48
|
+
|
|
49
|
+
Wed, 23 Sep 2026 09:04:33 GMT
|
|
50
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.10.4..@fluentui/react-tag-picker_v9.10.5)
|
|
51
|
+
|
|
52
|
+
### Patches
|
|
53
|
+
|
|
54
|
+
- Bump @fluentui/react-combobox to v9.17.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
55
|
+
- Bump @fluentui/react-positioning to v9.23.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
56
|
+
- Bump @fluentui/react-tags to v9.9.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
57
|
+
|
|
58
|
+
## [9.10.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.10.4)
|
|
59
|
+
|
|
60
|
+
Tue, 22 Sep 2026 11:25:39 GMT
|
|
61
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.10.3..@fluentui/react-tag-picker_v9.10.4)
|
|
62
|
+
|
|
63
|
+
### Patches
|
|
64
|
+
|
|
65
|
+
- fix: remove unused @types/react-dom peer dependency, mark @types/react as optional ([PR #36559](https://github.com/microsoft/fluentui/pull/36559) by martinhochel@microsoft.com)
|
|
66
|
+
- Bump @fluentui/react-aria to v9.17.15 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
67
|
+
- Bump @fluentui/react-combobox to v9.17.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
68
|
+
- Bump @fluentui/react-context-selector to v9.2.20 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
69
|
+
- Bump @fluentui/react-field to v9.5.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
70
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
71
|
+
- Bump @fluentui/react-portal to v9.8.16 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
72
|
+
- Bump @fluentui/react-positioning to v9.23.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
73
|
+
- Bump @fluentui/react-shared-contexts to v9.26.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
74
|
+
- Bump @fluentui/react-tabster to v9.26.18 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
75
|
+
- Bump @fluentui/react-tags to v9.9.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
76
|
+
- Bump @fluentui/react-utilities to v9.26.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
28
77
|
|
|
29
78
|
## [9.10.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.10.3)
|
|
30
79
|
|
package/README.md
CHANGED
|
@@ -66,3 +66,22 @@ export const Example = () => {
|
|
|
66
66
|
);
|
|
67
67
|
};
|
|
68
68
|
```
|
|
69
|
+
|
|
70
|
+
## Opt-in CSS Modules styles
|
|
71
|
+
|
|
72
|
+
CSS Modules alternatives are available for TagPickerButton, TagPickerControl,
|
|
73
|
+
TagPickerInput, TagPickerList, TagPickerGroup, TagPickerOption, and
|
|
74
|
+
TagPickerOptionGroup. Griffel remains the default. Opt in with a
|
|
75
|
+
bundler replacement of those `use*Styles.styles` modules by their
|
|
76
|
+
`use*Styles.styles.css` alternatives, handling both source imports and built
|
|
77
|
+
`.styles.js` → `.styles.css.js` imports. The bundler must process CSS Modules and
|
|
78
|
+
retain CSS assets in the `fluentui` layer.
|
|
79
|
+
|
|
80
|
+
TagPickerGroup, TagPickerOption, and TagPickerOptionGroup keep calling the public
|
|
81
|
+
TagGroup, Option, and OptionGroup style hooks from `@fluentui/react-tags` and
|
|
82
|
+
`@fluentui/react-combobox`. The resolver must also swap those packages' style
|
|
83
|
+
modules, including public re-exports, rather than only local TagPicker imports.
|
|
84
|
+
Base imports precede derived stylesheets so derived rules win equal-specificity
|
|
85
|
+
conflicts. TagPickerOptionGroup adds only stable slot classes and needs no own
|
|
86
|
+
stylesheet. Missing base replacements retain Griffel; selecting these alternatives
|
|
87
|
+
alone does not make the composition Griffel-free or establish mixed-mode parity.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPicker/TagPicker.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTagPicker_unstable } from './useTagPicker';\nimport { renderTagPicker_unstable } from './renderTagPicker';\nimport type { TagPickerProps } from './TagPicker.types';\nimport { useTagPickerContextValues } from './useTagPickerContextValues';\n\n/**\n * TagPicker component -\n * A TagPicker is a composite component that allows users to pick tags from a list of options.\n */\nexport const TagPicker: React.FC<TagPickerProps> = React.memo(props => {\n const state = useTagPicker_unstable(props);\n const contextValues = useTagPickerContextValues(state);\n return renderTagPicker_unstable(state, contextValues);\n});\n\nTagPicker.displayName = 'TagPicker';\n"],"names":["React","useTagPicker_unstable","renderTagPicker_unstable","useTagPickerContextValues","TagPicker","memo","props","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,wBAAwB,QAAQ,uBAAoB;AAE7D,SAASC,yBAAyB,QAAQ,iCAA8B;AAExE;;;CAGC,GACD,OAAO,MAAMC,0BAAsCJ,MAAMK,IAAI,CAACC,CAAAA;IAC5D,MAAMC,QAAQN,sBAAsBK;IACpC,MAAME,gBAAgBL,0BAA0BI;IAChD,OAAOL,yBAAyBK,OAAOC;AACzC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPicker/TagPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type {\n ComponentProps,\n ComponentState,\n DistributiveOmit,\n EventData,\n EventHandler,\n JSXElement,\n} from '@fluentui/react-utilities';\nimport type { ComboboxProps, ComboboxState, ListboxContextValue } from '@fluentui/react-combobox';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport type { ActiveDescendantContextValue } from '@fluentui/react-aria';\n\nexport type TagPickerSlots = {};\n\nexport type TagPickerSize = 'medium' | 'large' | 'extra-large';\n\n/**\n * Event data for the `onOptionSelect` event.\n *\n * * value - The value of the selected option that triggered the event\n * * selectedOptions - The list of selected options\n */\nexport type TagPickerOnOptionSelectData = {\n value: string;\n selectedOptions: string[];\n} & (EventData<'click', React.MouseEvent<HTMLDivElement>> | EventData<'keydown', React.KeyboardEvent<HTMLDivElement>>);\n\nexport type TagPickerOnOpenChangeData = { open: boolean } & (\n | EventData<'click', React.MouseEvent<HTMLDivElement>>\n | EventData<'keydown', React.KeyboardEvent<HTMLDivElement>>\n);\n\n/**\n * Picker Props\n */\nexport type TagPickerProps = ComponentProps<TagPickerSlots> &\n Pick<\n ComboboxProps,\n | 'positioning'\n | 'disabled'\n | 'defaultOpen'\n | 'selectedOptions'\n | 'defaultSelectedOptions'\n | 'open'\n | 'disableAutoFocus'\n > &\n Pick<Partial<TagPickerContextValue>, 'size' | 'appearance'> & {\n /**\n * By default, when a single children is provided, the TagPicker will assume that the children\n * is a popover. By setting this prop to true, the children will be treated as a trigger instead.\n *\n * @default false\n */\n noPopover?: boolean;\n onOpenChange?: EventHandler<TagPickerOnOpenChangeData>;\n onOptionSelect?: EventHandler<TagPickerOnOptionSelectData>;\n\n /**\n * Can contain two children including a trigger and a popover\n */\n children: [JSXElement, JSXElement | undefined | false] | JSXElement;\n /**\n * TagPickers are rendered out of DOM order on `document.body` by default,\n * use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n };\n\n/**\n * State used in rendering Picker\n */\nexport type TagPickerState = ComponentState<TagPickerSlots> &\n Pick<\n ComboboxState,\n | 'open'\n | 'activeDescendantController'\n | 'mountNode'\n | 'onOptionClick'\n | 'registerOption'\n | 'selectedOptions'\n | 'selectOption'\n | 'value'\n | 'setValue'\n | 'setOpen'\n | 'setHasFocus'\n | 'appearance'\n | 'clearSelection'\n | 'getOptionById'\n | 'getOptionsMatchingValue'\n | 'disabled'\n > &\n Pick<\n TagPickerContextValue,\n | 'triggerRef'\n | 'secondaryActionRef'\n | 'popoverId'\n | 'popoverRef'\n | 'targetRef'\n | 'tagPickerGroupRef'\n | 'size'\n | 'noPopover'\n > & {\n trigger: React.ReactNode;\n popover?: React.ReactNode;\n inline: boolean;\n };\n\nexport type TagPickerContextValues = {\n picker: TagPickerContextValue;\n activeDescendant: ActiveDescendantContextValue;\n listbox: ListboxContextValue;\n};\n\n/**\n * TagPicker Base Props - omits the presentation-related props that the base hook does not handle:\n * the floating-ui `positioning` prop (the styled {@link TagPickerProps} re-introduces it via\n * `usePositioning`) as well as `size`, `appearance` and `inline` (layered on by the styled\n * {@link useTagPicker_unstable} hook).\n */\nexport type TagPickerBaseProps = DistributiveOmit<TagPickerProps, 'positioning' | 'size' | 'appearance' | 'inline'>;\n\n/**\n * TagPicker Base State - the state produced by the base hook, which does not interact with the\n * `size`, `appearance` and `inline` props. These are layered on by the styled\n * {@link useTagPicker_unstable} hook.\n */\nexport type TagPickerBaseState = Omit<TagPickerState, 'size' | 'appearance' | 'inline'>;\n"],"names":[],"mappings":"AA4HA;;;;CAIC,GACD,WAAwF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPicker/index.ts"],"sourcesContent":["export { TagPicker } from './TagPicker';\nexport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerContextValues,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerSize,\n TagPickerSlots,\n TagPickerState,\n} from './TagPicker.types';\nexport { renderTagPicker_unstable } from './renderTagPicker';\nexport { useTagPicker_unstable, useTagPickerBase_unstable } from './useTagPicker';\nexport { useTagPickerContextValues } from './useTagPickerContextValues';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable","useTagPickerBase_unstable","useTagPickerContextValues"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iBAAc;AAYxC,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,qBAAqB,EAAEC,yBAAyB,QAAQ,oBAAiB;AAClF,SAASC,yBAAyB,QAAQ,iCAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPicker/renderTagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerState, TagPickerContextValues, TagPickerSlots } from './TagPicker.types';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\nimport { ListboxProvider } from '@fluentui/react-combobox';\nimport { Portal } from '@fluentui/react-portal';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (state: TagPickerState, contexts: TagPickerContextValues): JSXElement => {\n assertSlots<TagPickerSlots>(state);\n return (\n <TagPickerContextProvider value={contexts.picker}>\n <ActiveDescendantContextProvider value={contexts.activeDescendant}>\n <ListboxProvider value={contexts.listbox}>\n {state.trigger}\n {state.popover &&\n (state.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>)}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["React","ActiveDescendantContextProvider","ListboxProvider","Portal","assertSlots","TagPickerContextProvider","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","popover","inline","mountNode"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,wBAAwB,QAAQ,qCAAkC;AAE3E;;CAEC,GAED,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC;IAC9DJ,YAA4BG;IAC5B,qBACE,oBAACF;QAAyBI,OAAOD,SAASE,MAAM;qBAC9C,oBAACT;QAAgCQ,OAAOD,SAASG,gBAAgB;qBAC/D,oBAACT;QAAgBO,OAAOD,SAASI,OAAO;OACrCL,MAAMM,OAAO,EACbN,MAAMO,OAAO,IACXP,CAAAA,MAAMQ,MAAM,GAAGR,MAAMO,OAAO,iBAAG,oBAACX;QAAOa,WAAWT,MAAMS,SAAS;OAAGT,MAAMO,OAAO,CAAS;AAKvG,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagPicker/useTagPicker.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { elementContains, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerState,\n} from './TagPicker.types';\nimport { optionClassNames } from '@fluentui/react-combobox';\nimport type { PositioningShorthandValue } from '@fluentui/react-positioning';\nimport { resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';\nimport { useActiveDescendant } from '@fluentui/react-aria';\nimport { useComboboxBaseState } from '@fluentui/react-combobox';\n\n// Set a default set of fallback positions to try if the dropdown does not fit on screen\nconst fallbackPositions: PositioningShorthandValue[] = ['above', 'after', 'after-top', 'before', 'before-top'];\n\n/**\n * Create the base state required to render TagPicker, without floating-ui positioning.\n * @param props - props from this instance of TagPicker (without `positioning`)\n */\nexport const useTagPickerBase_unstable = (props: TagPickerBaseProps): TagPickerBaseState => {\n const popoverId = useId('picker-listbox');\n const triggerInnerRef = React.useRef<HTMLInputElement | HTMLButtonElement>(null);\n const secondaryActionRef = React.useRef<HTMLSpanElement>(null);\n const tagPickerGroupRef = React.useRef<HTMLDivElement>(null);\n const passiveTargetRef = React.useRef<HTMLDivElement>(null);\n const { noPopover = false, disableAutoFocus } = props;\n\n const {\n controller: activeDescendantController,\n activeParentRef,\n listboxRef,\n } = useActiveDescendant<HTMLInputElement, HTMLDivElement>({\n matchOption: el => el.classList.contains(optionClassNames.root),\n });\n\n const comboboxState = useComboboxBaseState({\n ...props,\n onOptionSelect: useEventCallback((event, data) =>\n props.onOptionSelect?.(event, {\n selectedOptions: data.selectedOptions,\n value: data.optionValue,\n type: event.type,\n event,\n } as TagPickerOnOptionSelectData),\n ),\n onOpenChange: useEventCallback((event, data) =>\n props.onOpenChange?.(event, {\n ...data,\n type: event.type,\n event,\n } as TagPickerOnOpenChangeData),\n ),\n activeDescendantController,\n disableAutoFocus,\n editable: true,\n multiselect: true,\n });\n\n const { trigger, popover } = childrenToTriggerAndPopover(props.children, noPopover);\n return {\n activeDescendantController,\n components: {},\n trigger,\n popover: comboboxState.open || comboboxState.hasFocus ? popover : undefined,\n popoverId,\n noPopover,\n disabled: comboboxState.disabled,\n triggerRef: useMergedRefs(triggerInnerRef, activeParentRef),\n popoverRef: useMergedRefs(listboxRef),\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef: passiveTargetRef,\n open: comboboxState.open,\n mountNode: comboboxState.mountNode,\n onOptionClick: useEventCallback(event => {\n comboboxState.onOptionClick(event);\n comboboxState.setOpen(event, false);\n }),\n clearSelection: comboboxState.clearSelection,\n getOptionById: comboboxState.getOptionById,\n getOptionsMatchingValue: comboboxState.getOptionsMatchingValue,\n registerOption: comboboxState.registerOption,\n selectedOptions: comboboxState.selectedOptions,\n selectOption: useEventCallback((event, data) => {\n // if the option is already selected, invoke onOptionSelect callback with current selected values\n // the combobox state would unselect the option, which is not the behavior expected\n if (\n comboboxState.selectedOptions.includes(data.value) &&\n !elementContains(tagPickerGroupRef.current, event.target as Node)\n ) {\n props.onOptionSelect?.(event, {\n selectedOptions: comboboxState.selectedOptions,\n value: data.value,\n type: event.type,\n event,\n } as TagPickerOnOptionSelectData);\n return;\n }\n comboboxState.selectOption(event, data);\n }),\n setHasFocus: comboboxState.setHasFocus,\n setOpen: comboboxState.setOpen,\n setValue: comboboxState.setValue,\n value: comboboxState.value,\n };\n};\n\n/**\n * Create the state required to render Picker.\n *\n * The returned state can be modified with hooks such as usePickerStyles_unstable,\n * before being passed to renderPicker_unstable.\n *\n * @param props - props from this instance of Picker\n */\nexport const useTagPicker_unstable = (props: TagPickerProps): TagPickerState => {\n const { positioning, size = 'medium', appearance = 'outline', inline = false } = props;\n\n const { targetRef, containerRef } = usePositioning({\n position: 'below' as const,\n align: 'start' as const,\n offset: { crossAxis: 0, mainAxis: 2 },\n fallbackPositions,\n matchTargetSize: 'width' as const,\n ...resolvePositioningShorthand(positioning),\n });\n\n const baseState = useTagPickerBase_unstable(props);\n\n return {\n ...baseState,\n size,\n appearance,\n inline,\n targetRef,\n popoverRef: useMergedRefs(baseState.popoverRef, containerRef),\n };\n};\n\nconst childrenToTriggerAndPopover = (children: React.ReactNode, noPopover: boolean) => {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('TagPicker must contain at least one child');\n }\n\n if (childrenArray.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('TagPicker must contain at most two children');\n }\n }\n\n if (noPopover) {\n return { trigger: childrenArray[0] };\n }\n\n let trigger: React.ReactElement | undefined = undefined;\n let popover: React.ReactElement | undefined = undefined;\n\n if (childrenArray.length === 2) {\n trigger = childrenArray[0];\n popover = childrenArray[1];\n } else if (childrenArray.length === 1) {\n popover = childrenArray[0];\n }\n\n return { trigger, popover };\n};\n"],"names":["React","elementContains","useEventCallback","useId","useMergedRefs","optionClassNames","resolvePositioningShorthand","usePositioning","useActiveDescendant","useComboboxBaseState","fallbackPositions","useTagPickerBase_unstable","props","popoverId","triggerInnerRef","useRef","secondaryActionRef","tagPickerGroupRef","passiveTargetRef","noPopover","disableAutoFocus","controller","activeDescendantController","activeParentRef","listboxRef","matchOption","el","classList","contains","root","comboboxState","onOptionSelect","event","data","selectedOptions","value","optionValue","type","onOpenChange","editable","multiselect","trigger","popover","childrenToTriggerAndPopover","children","components","open","hasFocus","undefined","disabled","triggerRef","popoverRef","targetRef","mountNode","onOptionClick","setOpen","clearSelection","getOptionById","getOptionsMatchingValue","registerOption","selectOption","includes","current","target","setHasFocus","setValue","useTagPicker_unstable","positioning","size","appearance","inline","containerRef","position","align","offset","crossAxis","mainAxis","matchTargetSize","baseState","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,aAAa,QAAQ,4BAA4B;AASpG,SAASC,gBAAgB,QAAQ,2BAA2B;AAE5D,SAASC,2BAA2B,EAAEC,cAAc,QAAQ,8BAA8B;AAC1F,SAASC,mBAAmB,QAAQ,uBAA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,EAAEC,SAAS,KAAK,EAAE,GAAG1D;IAEjF,MAAM,EAAEwC,SAAS,EAAEmB,YAAY,EAAE,GAAGhE,eAAe;QACjDiE,UAAU;QACVC,OAAO;QACPC,QAAQ;YAAEC,WAAW;YAAGC,UAAU;QAAE;QACpClE;QACAmE,iBAAiB;QACjB,GAAGvE,4BAA4B6D,YAAY;IAC7C;IAEA,MAAMW,YAAYnE,0BAA0BC;IAE5C,OAAO;QACL,GAAGkE,SAAS;QACZV;QACAC;QACAC;QACAlB;QACAD,YAAY/C,cAAc0E,UAAU3B,UAAU,EAAEoB;IAClD;AACF,EAAE;AAEF,MAAM5B,8BAA8B,CAACC,UAA2BzB;IAC9D,MAAM4D,gBAAgB/E,MAAMgF,QAAQ,CAACC,OAAO,CAACrC;IAE7C,IAAIsC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIL,cAAcM,MAAM,KAAK,GAAG;YAC9B,sCAAsC;YACtCC,QAAQC,IAAI,CAAC;QACf;QAEA,IAAIR,cAAcM,MAAM,GAAG,GAAG;YAC5B,sCAAsC;YACtCC,QAAQC,IAAI,CAAC;QACf;IACF;IAEA,IAAIpE,WAAW;QACb,OAAO;YAAEsB,SAASsC,aAAa,CAAC,EAAE;QAAC;IACrC;IAEA,IAAItC,UAA0CO;IAC9C,IAAIN,UAA0CM;IAE9C,IAAI+B,cAAcM,MAAM,KAAK,GAAG;QAC9B5C,UAAUsC,aAAa,CAAC,EAAE;QAC1BrC,UAAUqC,aAAa,CAAC,EAAE;IAC5B,OAAO,IAAIA,cAAcM,MAAM,KAAK,GAAG;QACrC3C,UAAUqC,aAAa,CAAC,EAAE;IAC5B;IAEA,OAAO;QAAEtC;QAASC;IAAQ;AAC5B"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPicker/useTagPicker.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { elementContains, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerState,\n} from './TagPicker.types';\nimport { optionClassNames } from '@fluentui/react-combobox';\nimport type { PositioningShorthandValue } from '@fluentui/react-positioning';\nimport { resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';\nimport { useActiveDescendant } from '@fluentui/react-aria';\nimport { useComboboxBaseState } from '@fluentui/react-combobox';\n\n// Set a default set of fallback positions to try if the dropdown does not fit on screen\nconst fallbackPositions: PositioningShorthandValue[] = ['above', 'after', 'after-top', 'before', 'before-top'];\n\n/**\n * Create the base state required to render TagPicker, without floating-ui positioning.\n * @param props - props from this instance of TagPicker (without `positioning`)\n */\nexport const useTagPickerBase_unstable = (props: TagPickerBaseProps): TagPickerBaseState => {\n const popoverId = useId('picker-listbox');\n const triggerInnerRef = React.useRef<HTMLInputElement | HTMLButtonElement>(null);\n const secondaryActionRef = React.useRef<HTMLSpanElement>(null);\n const tagPickerGroupRef = React.useRef<HTMLDivElement>(null);\n const passiveTargetRef = React.useRef<HTMLDivElement>(null);\n const { noPopover = false, disableAutoFocus } = props;\n\n const {\n controller: activeDescendantController,\n activeParentRef,\n listboxRef,\n } = useActiveDescendant<HTMLInputElement, HTMLDivElement>({\n matchOption: el => el.classList.contains(optionClassNames.root),\n });\n\n const comboboxState = useComboboxBaseState({\n ...props,\n onOptionSelect: useEventCallback((event, data) =>\n props.onOptionSelect?.(event, {\n selectedOptions: data.selectedOptions,\n value: data.optionValue,\n type: event.type,\n event,\n } as TagPickerOnOptionSelectData),\n ),\n onOpenChange: useEventCallback((event, data) =>\n props.onOpenChange?.(event, {\n ...data,\n type: event.type,\n event,\n } as TagPickerOnOpenChangeData),\n ),\n activeDescendantController,\n disableAutoFocus,\n editable: true,\n multiselect: true,\n });\n\n const { trigger, popover } = childrenToTriggerAndPopover(props.children, noPopover);\n return {\n activeDescendantController,\n components: {},\n trigger,\n popover: comboboxState.open || comboboxState.hasFocus ? popover : undefined,\n popoverId,\n noPopover,\n disabled: comboboxState.disabled,\n triggerRef: useMergedRefs(triggerInnerRef, activeParentRef),\n popoverRef: useMergedRefs(listboxRef),\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef: passiveTargetRef,\n open: comboboxState.open,\n mountNode: comboboxState.mountNode,\n onOptionClick: useEventCallback(event => {\n comboboxState.onOptionClick(event);\n comboboxState.setOpen(event, false);\n }),\n clearSelection: comboboxState.clearSelection,\n getOptionById: comboboxState.getOptionById,\n getOptionsMatchingValue: comboboxState.getOptionsMatchingValue,\n registerOption: comboboxState.registerOption,\n selectedOptions: comboboxState.selectedOptions,\n selectOption: useEventCallback((event, data) => {\n // if the option is already selected, invoke onOptionSelect callback with current selected values\n // the combobox state would unselect the option, which is not the behavior expected\n if (\n comboboxState.selectedOptions.includes(data.value) &&\n !elementContains(tagPickerGroupRef.current, event.target as Node)\n ) {\n props.onOptionSelect?.(event, {\n selectedOptions: comboboxState.selectedOptions,\n value: data.value,\n type: event.type,\n event,\n } as TagPickerOnOptionSelectData);\n return;\n }\n comboboxState.selectOption(event, data);\n }),\n setHasFocus: comboboxState.setHasFocus,\n setOpen: comboboxState.setOpen,\n setValue: comboboxState.setValue,\n value: comboboxState.value,\n };\n};\n\n/**\n * Create the state required to render Picker.\n *\n * The returned state can be modified with hooks such as usePickerStyles_unstable,\n * before being passed to renderPicker_unstable.\n *\n * @param props - props from this instance of Picker\n */\nexport const useTagPicker_unstable = (props: TagPickerProps): TagPickerState => {\n const { positioning, size = 'medium', appearance = 'outline', inline = false } = props;\n\n const { targetRef, containerRef } = usePositioning({\n position: 'below' as const,\n align: 'start' as const,\n offset: { crossAxis: 0, mainAxis: 2 },\n fallbackPositions,\n matchTargetSize: 'width' as const,\n ...resolvePositioningShorthand(positioning),\n });\n\n const baseState = useTagPickerBase_unstable(props);\n\n return {\n ...baseState,\n size,\n appearance,\n inline,\n targetRef,\n popoverRef: useMergedRefs(baseState.popoverRef, containerRef),\n };\n};\n\nconst childrenToTriggerAndPopover = (children: React.ReactNode, noPopover: boolean) => {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('TagPicker must contain at least one child');\n }\n\n if (childrenArray.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('TagPicker must contain at most two children');\n }\n }\n\n if (noPopover) {\n return { trigger: childrenArray[0] };\n }\n\n let trigger: React.ReactElement | undefined = undefined;\n let popover: React.ReactElement | undefined = undefined;\n\n if (childrenArray.length === 2) {\n trigger = childrenArray[0];\n popover = childrenArray[1];\n } else if (childrenArray.length === 1) {\n popover = childrenArray[0];\n }\n\n return { trigger, popover };\n};\n"],"names":["React","elementContains","useEventCallback","useId","useMergedRefs","optionClassNames","resolvePositioningShorthand","usePositioning","useActiveDescendant","useComboboxBaseState","fallbackPositions","useTagPickerBase_unstable","props","popoverId","triggerInnerRef","useRef","secondaryActionRef","tagPickerGroupRef","passiveTargetRef","noPopover","disableAutoFocus","controller","activeDescendantController","activeParentRef","listboxRef","matchOption","el","classList","contains","root","comboboxState","onOptionSelect","event","data","selectedOptions","value","optionValue","type","onOpenChange","editable","multiselect","trigger","popover","childrenToTriggerAndPopover","children","components","open","hasFocus","undefined","disabled","triggerRef","popoverRef","targetRef","mountNode","onOptionClick","setOpen","clearSelection","getOptionById","getOptionsMatchingValue","registerOption","selectOption","includes","current","target","setHasFocus","setValue","useTagPicker_unstable","positioning","size","appearance","inline","containerRef","position","align","offset","crossAxis","mainAxis","matchTargetSize","baseState","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,aAAa,QAAQ,4BAA4B;AASpG,SAASC,gBAAgB,QAAQ,2BAA2B;AAE5D,SAASC,2BAA2B,EAAEC,cAAc,QAAQ,8BAA8B;A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,OAAO,QAAQ,EAAEC,aAAa,SAAS,EAAEC,SAAS,KAAK,EAAE,GAAG1D;IAEjF,MAAM,EAAEwC,SAAS,EAAEmB,YAAY,EAAE,GAAGhE,eAAe;QACjDiE,UAAU;QACVC,OAAO;QACPC,QAAQ;YAAEC,WAAW;YAAGC,UAAU;QAAE;QACpClE;QACAmE,iBAAiB;QACjB,GAAGvE,4BAA4B6D,YAAY;IAC7C;IAEA,MAAMW,YAAYnE,0BAA0BC;IAE5C,OAAO;QACL,GAAGkE,SAAS;QACZV;QACAC;QACAC;QACAlB;QACAD,YAAY/C,cAAc0E,UAAU3B,UAAU,EAAEoB;IAClD;AACF,EAAE;AAEF,MAAM5B,8BAA8B,CAACC,UAA2BzB;IAC9D,MAAM4D,gBAAgB/E,MAAMgF,QAAQ,CAACC,OAAO,CAACrC;IAE7C,IAAIsC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIL,cAAcM,MAAM,KAAK,GAAG;YAC9B,sCAAsC;YACtCC,QAAQC,IAAI,CAAC;QACf;QAEA,IAAIR,cAAcM,MAAM,GAAG,GAAG;YAC5B,sCAAsC;YACtCC,QAAQC,IAAI,CAAC;QACf;IACF;IAEA,IAAIpE,WAAW;QACb,OAAO;YAAEsB,SAASsC,aAAa,CAAC,EAAE;QAAC;IACrC;IAEA,IAAItC,UAA0CO;IAC9C,IAAIN,UAA0CM;IAE9C,IAAI+B,cAAcM,MAAM,KAAK,GAAG;QAC9B5C,UAAUsC,aAAa,CAAC,EAAE;QAC1BrC,UAAUqC,aAAa,CAAC,EAAE;IAC5B,OAAO,IAAIA,cAAcM,MAAM,KAAK,GAAG;QACrC3C,UAAUqC,aAAa,CAAC,EAAE;IAC5B;IAEA,OAAO;QAAEtC;QAASC;IAAQ;AAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPicker/useTagPickerContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { TagPickerContextValues, TagPickerState } from './TagPicker.types';\n\nexport function useTagPickerContextValues(state: TagPickerState): TagPickerContextValues {\n const {\n onOptionClick,\n registerOption,\n selectedOptions,\n selectOption,\n value,\n triggerRef,\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef,\n size,\n setValue,\n setOpen,\n setHasFocus,\n popoverRef,\n appearance,\n clearSelection,\n getOptionById,\n getOptionsMatchingValue,\n open,\n popoverId,\n disabled,\n noPopover,\n } = state;\n return {\n activeDescendant: React.useMemo(\n () => ({ controller: state.activeDescendantController }),\n [state.activeDescendantController],\n ),\n listbox: {\n onOptionClick,\n registerOption,\n getOptionById,\n getOptionsMatchingValue,\n selectedOptions,\n selectOption,\n focusVisible: false,\n setActiveOption: noop,\n },\n picker: {\n value,\n triggerRef,\n targetRef,\n secondaryActionRef,\n tagPickerGroupRef,\n size,\n setValue,\n setOpen,\n setHasFocus,\n selectOption,\n popoverRef,\n selectedOptions,\n appearance,\n clearSelection,\n getOptionById,\n open,\n popoverId,\n disabled,\n noPopover,\n },\n };\n}\n\nconst noop = () => {\n /** noop */\n};\n"],"names":["React","useTagPickerContextValues","state","onOptionClick","registerOption","selectedOptions","selectOption","value","triggerRef","secondaryActionRef","tagPickerGroupRef","targetRef","size","setValue","setOpen","setHasFocus","popoverRef","appearance","clearSelection","getOptionById","getOptionsMatchingValue","open","popoverId","disabled","noPopover","activeDescendant","useMemo","controller","activeDescendantController","listbox","focusVisible","setActiveOption","noop","picker"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,0BAA0BC,KAAqB;IAC7D,MAAM,EACJC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,YAAY,EACZC,KAAK,EACLC,UAAU,EACVC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,WAAW,EACXC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,aAAa,EACbC,uBAAuB,EACvBC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,SAAS,EACV,GAAGtB;IACJ,OAAO;QACLuB,kBAAkBzB,MAAM0B,OAAO,CAC7B,IAAO,CAAA;gBAAEC,YAAYzB,MAAM0B,0BAA0B;YAAC,CAAA,GACtD;YAAC1B,MAAM0B,0BAA0B;SAAC;QAEpCC,SAAS;YACP1B;YACAC;YACAe;YACAC;YACAf;YACAC;YACAwB,cAAc;YACdC,iBAAiBC;QACnB;QACAC,QAAQ;YACN1B;YACAC;YACAG;YACAF;YACAC;YACAE;YACAC;YACAC;YACAC;YACAT;YACAU;YACAX;YACAY;YACAC;YACAC;YACAE;YACAC;YACAC;YACAC;QACF;IACF;AACF;AAEA,MAAMQ,OAAO;AACX,SAAS,GACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerButton/TagPickerButton.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerButton_unstable } from './useTagPickerButton';\nimport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nimport { useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\nimport type { TagPickerButtonProps } from './TagPickerButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerButton component -\n * A TagPickerButton is an alternative to TagPickerInput that does not include an input field.\n */\nexport const TagPickerButton: ForwardRefComponent<TagPickerButtonProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerButton_unstable(props, ref);\n\n useTagPickerButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerButtonStyles_unstable')(state);\n return renderTagPickerButton_unstable(state);\n});\n\nTagPickerButton.displayName = 'TagPickerButton';\n"],"names":["React","useTagPickerButton_unstable","renderTagPickerButton_unstable","useTagPickerButtonStyles_unstable","useCustomStyleHook_unstable","TagPickerButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,iCAAiC,QAAQ,uCAAoC;AAEtF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDL,kCAAkCM;IAClCL,4BAA4B,qCAAqCK;IACjE,OAAOP,+BAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@layer fluentui {
|
|
2
|
+
.root {
|
|
3
|
+
align-items: center;
|
|
4
|
+
min-height: 32px;
|
|
5
|
+
background-color: var(--colorTransparentBackground);
|
|
6
|
+
border: none;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
color: var(--colorNeutralForeground1);
|
|
9
|
+
column-gap: var(--spacingHorizontalXXS);
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
font-family: var(--fontFamilyBase);
|
|
12
|
+
text-align: left;
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
}
|
|
15
|
+
.root:where(:dir(rtl)) {
|
|
16
|
+
text-align: right;
|
|
17
|
+
}
|
|
18
|
+
.root:focus {
|
|
19
|
+
outline-style: none;
|
|
20
|
+
}
|
|
21
|
+
.medium {
|
|
22
|
+
font-family: var(--fontFamilyBase);
|
|
23
|
+
font-size: var(--fontSizeBase200);
|
|
24
|
+
font-weight: var(--fontWeightRegular);
|
|
25
|
+
line-height: var(--lineHeightBase200);
|
|
26
|
+
padding-block: calc(var(--spacingVerticalXS) - var(--strokeWidthThin));
|
|
27
|
+
padding-inline: calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS)) var(--spacingHorizontalSNudge);
|
|
28
|
+
}
|
|
29
|
+
.large {
|
|
30
|
+
font-family: var(--fontFamilyBase);
|
|
31
|
+
font-size: var(--fontSizeBase300);
|
|
32
|
+
font-weight: var(--fontWeightRegular);
|
|
33
|
+
line-height: var(--lineHeightBase300);
|
|
34
|
+
padding-block: calc(var(--spacingVerticalSNudge) - var(--strokeWidthThin));
|
|
35
|
+
padding-inline: calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS)) var(--spacingHorizontalMNudge);
|
|
36
|
+
}
|
|
37
|
+
.extra-large {
|
|
38
|
+
column-gap: var(--spacingHorizontalSNudge);
|
|
39
|
+
font-family: var(--fontFamilyBase);
|
|
40
|
+
font-size: var(--fontSizeBase400);
|
|
41
|
+
font-weight: var(--fontWeightRegular);
|
|
42
|
+
line-height: var(--lineHeightBase400);
|
|
43
|
+
padding-block: calc(var(--spacingVerticalS) - var(--strokeWidthThin));
|
|
44
|
+
padding-inline: calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge)) var(--spacingHorizontalM);
|
|
45
|
+
}
|
|
46
|
+
.hasSelectedOption {
|
|
47
|
+
clip: rect(0px, 0px, 0px, 0px);
|
|
48
|
+
height: 1px;
|
|
49
|
+
margin: -1px;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
padding: 0px;
|
|
52
|
+
width: 1px;
|
|
53
|
+
position: absolute;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerButton/TagPickerButton.types.ts"],"sourcesContent":["import type { DropdownProps } from '@fluentui/react-combobox';\nimport type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\n\nexport type TagPickerButtonSlots = {\n root: Slot<'button'>;\n};\n\n/**\n * PickerButton Props\n */\nexport type TagPickerButtonProps = ComponentProps<TagPickerButtonSlots> &\n Pick<DropdownProps, 'size' | 'appearance'> & {\n disabled?: boolean;\n };\n\n/**\n * State used in rendering PickerButton\n */\nexport type TagPickerButtonState = ComponentState<TagPickerButtonSlots> &\n Pick<TagPickerContextValue, 'size'> & {\n hasSelectedOption: boolean;\n };\n\n/**\n * TagPickerButton Base Props - omits design-only props\n */\nexport type TagPickerButtonBaseProps = DistributiveOmit<TagPickerButtonProps, 'size' | 'appearance'>;\n\n/**\n * TagPickerButton Base State - omits design-only state\n */\nexport type TagPickerButtonBaseState = DistributiveOmit<TagPickerButtonState, 'size'>;\n"],"names":[],"mappings":"AA6BA;;CAEC,GACD,WAAsF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerButton/index.ts"],"sourcesContent":["export { TagPickerButton } from './TagPickerButton';\nexport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nexport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nexport { useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from './useTagPickerButton';\nexport { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAoB;AAQpD,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,EAAEC,+BAA+B,QAAQ,0BAAuB;AACpG,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,uCAAoC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of PickerButton
|
|
5
5
|
*/ export const renderTagPickerButton_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerButton/renderTagPickerButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TagPickerButtonBaseState, TagPickerButtonSlots } from './TagPickerButton.types';\n\n/**\n * Render the final JSX of PickerButton\n */\nexport const renderTagPickerButton_unstable = (state: TagPickerButtonBaseState): JSXElement => {\n assertSlots<TagPickerButtonSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTagPickerButton_unstable","state","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\nimport { useTabsterEscapeIgnore } from '../../utils/useTabsterEscapeIgnore';\n\n/**\n * Create the base state required to render TagPickerButton, without design-only props.\n *\n * @param props - props from this instance of TagPickerButton (without size, appearance)\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButtonBase_unstable = (\n props: TagPickerButtonBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonBaseState => {\n const { controller: activeDescendantController } = useActiveDescendantContext();\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const value = useTagPickerContext_unstable(ctx => ctx.value);\n const hasSelectedOption = useTagPickerContext_unstable(ctx => ctx.selectedOptions.length > 0);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const getOptionById = useTagPickerContext_unstable(ctx => ctx.getOptionById);\n const selectOption = useTagPickerContext_unstable(ctx => ctx.selectOption);\n const setHasFocus = useTagPickerContext_unstable(ctx => ctx.setHasFocus);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n\n // casting is required here as triggerRef can either be button or input,\n // but in this case we can assure it's a button\n const root = useButtonTriggerSlot(props, triggerRef as React.RefObject<HTMLButtonElement>, {\n activeDescendantController,\n defaultProps: {\n type: 'button',\n tabIndex: 0,\n children:\n value ||\n // @ts-expect-error - FIXME: TS2339: Property 'placeholder' does not exist on type 'TagPickerButtonBaseProps'\n props.placeholder,\n 'aria-controls': open ? popoverId : undefined,\n ref,\n },\n state: {\n getOptionById,\n open,\n selectOption,\n setHasFocus,\n setOpen,\n multiselect: true,\n },\n });\n\n return {\n components: {\n root: 'button',\n },\n root,\n hasSelectedOption,\n };\n};\n\n/**\n * Create the state required to render TagPickerButton.\n *\n * The returned state can be modified with hooks such as useTagPickerButtonStyles_unstable,\n * before being passed to renderTagPickerButton_unstable.\n *\n * @param props - props from this instance of TagPickerButton\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\n const baseState = useTagPickerButtonBase_unstable(props, ref);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n return {\n ...baseState,\n size,\n root: {\n ...useTabsterEscapeIgnore(baseState.root, open),\n ...baseState.root,\n },\n };\n};\n"],"names":["useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTabsterEscapeIgnore","useTagPickerButtonBase_unstable","props","ref","controller","activeDescendantController","triggerRef","ctx","open","value","hasSelectedOption","selectedOptions","length","popoverId","getOptionById","selectOption","setHasFocus","setOpen","root","defaultProps","type","tabIndex","children","placeholder","undefined","state","multiselect","components","useTagPickerButton_unstable","baseState","size"],"mappings":"AAAA;AAGA,SAASA,0BAA0B,QAAQ,uBAAuB;AAOlE,SAASC,4BAA4B,QAAQ,qCAAkC;AAC/E,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,wCAAqC;AAE5E;;;;;CAKC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGR;IACnD,MAAMS,aAAaR,6BAA6BS,CAAAA,MAAOA,IAAID,UAAU;IACrE,MAAME,OAAOV,6BAA6BS,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,QAAQX,6BAA6BS,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,oBAAoBZ,6BAA6BS,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,YAAYf,6BAA6BS,CAAAA,MAAOA,IAAIM,SAAS;IACnE,MAAMC,gBAAgBhB,6BAA6BS,CAAAA,MAAOA,IAAIO,aAAa;IAC3E,MAAMC,eAAejB,6BAA6BS,CAAAA,MAAOA,IAAIQ,YAAY;IACzE,MAAMC,cAAclB,6BAA6BS,CAAAA,MAAOA,IAAIS,WAAW;IACvE,MAAMC,UAAUnB,6BAA6BS,CAAAA,MAAOA,IAAIU,OAAO;IAE/D,wEAAwE;IACxE,+CAA+C;IAC/C,MAAMC,OAAOnB,qBAAqBG,OAAOI,YAAkD;QACzFD;QACAc,cAAc;YACZC,MAAM;YACNC,UAAU;YACVC,UACEb,SACA,6GAA6G;YAC7GP,MAAMqB,WAAW;YACnB,iBAAiBf,OAAOK,YAAYW;YACpCrB;QACF;QACAsB,OAAO;YACLX;YACAN;YACAO;YACAC;YACAC;YACAS,aAAa;QACf;IACF;IAEA,OAAO;QACLC,YAAY;YACVT,MAAM;QACR;QACAA;QACAR;IACF;AACF,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMkB,8BAA8B,CACzC1B,OACAC;IAEA,MAAM0B,YAAY5B,gCAAgCC,OAAOC;IACzD,MAAMK,OAAOV,6BAA6BS,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMsB,OAAOhC,6BAA6BS,CAAAA,MAAOA,IAAIuB,IAAI;IAEzD,OAAO;QACL,GAAGD,SAAS;QACZC;QACAZ,MAAM;YACJ,GAAGlB,uBAAuB6B,UAAUX,IAAI,EAAEV,KAAK;YAC/C,GAAGqB,UAAUX,IAAI;QACnB;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./TagPickerButton.module.css";
|
|
3
|
+
export const tagPickerButtonClassNames = {
|
|
4
|
+
root: 'fui-TagPickerButton'
|
|
5
|
+
};
|
|
6
|
+
export const useTagPickerButtonStyles_unstable = (state)=>{
|
|
7
|
+
state.root.className = clsx(tagPickerButtonClassNames.root, styles.root, styles[state.size], state.hasSelectedOption && styles.hasSelectedOption, state.root.className);
|
|
8
|
+
return state;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerButton/useTagPickerButtonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\nimport styles from './TagPickerButton.module.css';\n\nexport const tagPickerButtonClassNames: SlotClassNames<TagPickerButtonSlots> = {\n root: 'fui-TagPickerButton',\n};\n\nexport const useTagPickerButtonStyles_unstable = (state: TagPickerButtonState): TagPickerButtonState => {\n state.root.className = clsx(\n tagPickerButtonClassNames.root,\n styles.root,\n styles[state.size],\n state.hasSelectedOption && styles.hasSelectedOption,\n state.root.className,\n );\n return state;\n};\n"],"names":["clsx","styles","tagPickerButtonClassNames","root","useTagPickerButtonStyles_unstable","state","className","size","hasSelectedOption"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,+BAA+B;AAElD,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,oCAAoC,CAACC;IAChDA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KACrBE,0BAA0BC,IAAI,EAC9BF,OAAOE,IAAI,EACXF,MAAM,CAACI,MAAME,IAAI,CAAC,EAClBF,MAAMG,iBAAiB,IAAIP,OAAOO,iBAAiB,EACnDH,MAAMF,IAAI,CAACG,SAAS;IAEtB,OAAOD;AACT,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./TagPickerButton.module.css";
|
|
3
|
+
export const tagPickerButtonClassNames = {
|
|
4
|
+
root: 'fui-TagPickerButton'
|
|
5
|
+
};
|
|
6
|
+
export const useTagPickerButtonStyles_unstable = (state)=>{
|
|
7
|
+
state.root.className = clsx(tagPickerButtonClassNames.root, styles.root, styles[state.size], state.hasSelectedOption && styles.hasSelectedOption, state.root.className);
|
|
8
|
+
return state;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerButton/useTagPickerButtonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\nimport styles from './TagPickerButton.module.css';\n\nexport const tagPickerButtonClassNames: SlotClassNames<TagPickerButtonSlots> = {\n root: 'fui-TagPickerButton',\n};\n\nexport const useTagPickerButtonStyles_unstable = (state: TagPickerButtonState): TagPickerButtonState => {\n state.root.className = clsx(\n tagPickerButtonClassNames.root,\n styles.root,\n styles[state.size],\n state.hasSelectedOption && styles.hasSelectedOption,\n state.root.className,\n );\n return state;\n};\n"],"names":["clsx","styles","tagPickerButtonClassNames","root","useTagPickerButtonStyles_unstable","state","className","size","hasSelectedOption"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,+BAA+B;AAElD,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,oCAAoC,CAACC;IAChDA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KACrBE,0BAA0BC,IAAI,EAC9BF,OAAOE,IAAI,EACXF,MAAM,CAACI,MAAME,IAAI,CAAC,EAClBF,MAAMG,iBAAiB,IAAIP,OAAOO,iBAAiB,EACnDH,MAAMF,IAAI,CAACG,SAAS;IAEtB,OAAOD;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerButton/useTagPickerButtonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\n\nexport const tagPickerButtonClassNames: SlotClassNames<TagPickerButtonSlots> = {\n root: 'fui-TagPickerButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n button: {\n alignItems: 'center',\n minHeight: '32px',\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXXS,\n cursor: 'pointer',\n fontFamily: tokens.fontFamilyBase,\n textAlign: 'left',\n flexGrow: 1,\n\n '&:focus': {\n outlineStyle: 'none',\n },\n },\n\n placeholder: {\n color: tokens.colorNeutralForeground4,\n },\n\n // size variants\n medium: {\n ...typographyStyles.caption1,\n padding: `3px ${\n tokens.spacingHorizontalSNudge\n } 3px ${`calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n large: {\n ...typographyStyles.body1,\n padding: `5px ${\n tokens.spacingHorizontalMNudge\n } 5px ${`calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n 'extra-large': {\n columnGap: tokens.spacingHorizontalSNudge,\n ...typographyStyles.body2,\n padding: `7px ${\n tokens.spacingHorizontalM\n } 7px ${`calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`}`,\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n\n disabledText: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n\n hidden: {\n display: 'none',\n },\n visuallyHidden: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n },\n});\n\n/**\n * Apply styling to the PickerButton slots based on the state\n */\nexport const useTagPickerButtonStyles_unstable = (state: TagPickerButtonState): TagPickerButtonState => {\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n tagPickerButtonClassNames.root,\n styles.button,\n styles[state.size],\n state.hasSelectedOption && styles.visuallyHidden,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","tagPickerButtonClassNames","root","useStyles","button","alignItems","minHeight","backgroundColor","colorTransparentBackground","border","boxSizing","color","colorNeutralForeground1","columnGap","spacingHorizontalXXS","cursor","fontFamily","fontFamilyBase","textAlign","flexGrow","outlineStyle","placeholder","colorNeutralForeground4","medium","caption1","padding","spacingHorizontalSNudge","large","body1","spacingHorizontalMNudge","body2","spacingHorizontalM","outline","colorNeutralBackground1","strokeWidthThin","colorNeutralStroke1","borderBottomColor","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStroke1Pressed","underline","borderBottom","borderRadius","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","colorNeutralStrokeDisabled","disabledText","colorNeutralForegroundDisabled","hidden","display","visuallyHidden","clip","height","margin","overflow","width","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BAA8B;QAC5CrC,QAAQ;IACV;IAEAsC,QAAQ;QACNC,SAAS;IACX;IACAC,gBAAgB;QACdC,MAAM;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVlC,SAAS;QACTmC,OAAO;QACPC,UAAU;IACZ;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD,MAAMC,SAAS7D;IACf,oDAAoD;IACpD4D,MAAM7D,IAAI,CAAC+D,SAAS,GAAGpE,aACrBI,0BAA0BC,IAAI,EAC9B8D,OAAO5D,MAAM,EACb4D,MAAM,CAACD,MAAMG,IAAI,CAAC,EAClBH,MAAMI,iBAAiB,IAAIH,OAAOT,cAAc,EAChDQ,MAAM7D,IAAI,CAAC+D,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/TagPickerControl/TagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerControl_unstable } from './useTagPickerControl';\nimport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nimport { useTagPickerControlStyles_unstable } from './useTagPickerControlStyles.styles';\nimport type { TagPickerControlProps } from './TagPickerControl.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerControl component -\n * A TagPickerControl is a composite component that controls actions and state for a TagPicker.\n */\nexport const TagPickerControl: ForwardRefComponent<TagPickerControlProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerControl_unstable(props, ref);\n\n useTagPickerControlStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerControlStyles_unstable')(state);\n return renderTagPickerControl_unstable(state);\n});\n\nTagPickerControl.displayName = 'TagPickerControl';\n"],"names":["React","useTagPickerControl_unstable","renderTagPickerControl_unstable","useTagPickerControlStyles_unstable","useCustomStyleHook_unstable","TagPickerControl","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,wCAAqC;AAExF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,iCAA+DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQR,6BAA6BM,OAAOC;IAElDL,mCAAmCM;IACnCL,4BAA4B,sCAAsCK;IAClE,OAAOP,gCAAgCO;AACzC,GAAG;AAEHJ,iBAAiBK,WAAW,GAAG"}
|