@fluentui/react-tag-picker 9.1.1 → 9.2.1
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 +35 -2
- package/dist/index.d.ts +2 -2
- package/lib/TagPicker.js.map +1 -1
- package/lib/TagPickerButton.js.map +1 -1
- package/lib/TagPickerControl.js.map +1 -1
- package/lib/TagPickerGroup.js.map +1 -1
- package/lib/TagPickerInput.js.map +1 -1
- package/lib/TagPickerList.js.map +1 -1
- package/lib/TagPickerOption.js.map +1 -1
- package/lib/TagPickerOptionGroup.js.map +1 -1
- 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 +1 -0
- package/lib/components/TagPicker/useTagPicker.js.map +1 -1
- package/lib/components/TagPicker/useTagPickerContextValues.js +3 -1
- package/lib/components/TagPicker/useTagPickerContextValues.js.map +1 -1
- package/lib/components/TagPickerButton/TagPickerButton.js.map +1 -1
- package/lib/components/TagPickerButton/TagPickerButton.types.js +3 -1
- 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.map +1 -1
- package/lib/components/TagPickerButton/useTagPickerButton.js.map +1 -1
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js +2 -0
- package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -1
- package/lib/components/TagPickerControl/TagPickerControl.js.map +1 -1
- 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.map +1 -1
- package/lib/components/TagPickerControl/useTagPickerControl.js.map +1 -1
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js +2 -0
- package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -1
- package/lib/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
- package/lib/components/TagPickerGroup/TagPickerGroup.types.js +3 -1
- 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.js +2 -0
- package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -1
- package/lib/components/TagPickerInput/TagPickerInput.js.map +1 -1
- package/lib/components/TagPickerInput/TagPickerInput.types.js +3 -1
- 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.map +1 -1
- package/lib/components/TagPickerInput/useTagPickerInput.js +2 -2
- package/lib/components/TagPickerInput/useTagPickerInput.js.map +1 -1
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js +2 -0
- package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -1
- package/lib/components/TagPickerList/TagPickerList.js.map +1 -1
- package/lib/components/TagPickerList/TagPickerList.types.js +3 -1
- 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.map +1 -1
- package/lib/components/TagPickerList/useTagPickerList.js.map +1 -1
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.js +2 -0
- package/lib/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -1
- package/lib/components/TagPickerOption/TagPickerOption.js.map +1 -1
- 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.map +1 -1
- package/lib/components/TagPickerOption/useTagPickerOption.js.map +1 -1
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js +2 -0
- package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
- package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js +3 -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.js +2 -0
- package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -1
- package/lib/contexts/TagPickerContext.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/tagPicker2Tag.js.map +1 -1
- package/lib/utils/tokens.js.map +1 -1
- package/lib/utils/useResizeObserverRef.js.map +1 -1
- package/lib/utils/useTagPickerFilter.js.map +1 -1
- package/lib-commonjs/TagPicker.js.map +1 -1
- package/lib-commonjs/TagPickerButton.js.map +1 -1
- package/lib-commonjs/TagPickerControl.js.map +1 -1
- package/lib-commonjs/TagPickerGroup.js.map +1 -1
- package/lib-commonjs/TagPickerInput.js.map +1 -1
- package/lib-commonjs/TagPickerList.js.map +1 -1
- package/lib-commonjs/TagPickerOption.js.map +1 -1
- package/lib-commonjs/TagPickerOptionGroup.js.map +1 -1
- package/lib-commonjs/components/TagPicker/TagPicker.js.map +1 -1
- package/lib-commonjs/components/TagPicker/TagPicker.types.js.map +1 -1
- package/lib-commonjs/components/TagPicker/index.js.map +1 -1
- package/lib-commonjs/components/TagPicker/renderTagPicker.js.map +1 -1
- package/lib-commonjs/components/TagPicker/useTagPicker.js +1 -0
- package/lib-commonjs/components/TagPicker/useTagPicker.js.map +1 -1
- package/lib-commonjs/components/TagPicker/useTagPickerContextValues.js +3 -1
- package/lib-commonjs/components/TagPicker/useTagPickerContextValues.js.map +1 -1
- package/lib-commonjs/components/TagPickerButton/TagPickerButton.js.map +1 -1
- package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js +3 -1
- package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
- package/lib-commonjs/components/TagPickerButton/index.js.map +1 -1
- package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.js.map +1 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButton.js.map +1 -1
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js +1 -0
- package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TagPickerControl/TagPickerControl.js.map +1 -1
- package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
- package/lib-commonjs/components/TagPickerControl/index.js.map +1 -1
- package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.js.map +1 -1
- package/lib-commonjs/components/TagPickerControl/useTagPickerControl.js.map +1 -1
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js +5 -4
- package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.js +3 -1
- package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/index.js.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroup.js.map +1 -1
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js +1 -0
- package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TagPickerInput/TagPickerInput.js.map +1 -1
- package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js +3 -1
- package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
- package/lib-commonjs/components/TagPickerInput/index.js.map +1 -1
- package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.js.map +1 -1
- package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js +2 -2
- package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js.map +1 -1
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js +1 -0
- package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TagPickerList/TagPickerList.js.map +1 -1
- package/lib-commonjs/components/TagPickerList/TagPickerList.types.js +3 -1
- package/lib-commonjs/components/TagPickerList/TagPickerList.types.js.map +1 -1
- package/lib-commonjs/components/TagPickerList/index.js.map +1 -1
- package/lib-commonjs/components/TagPickerList/renderTagPickerList.js.map +1 -1
- package/lib-commonjs/components/TagPickerList/useTagPickerList.js.map +1 -1
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js +1 -0
- package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TagPickerOption/TagPickerOption.js.map +1 -1
- package/lib-commonjs/components/TagPickerOption/TagPickerOption.types.js.map +1 -1
- package/lib-commonjs/components/TagPickerOption/index.js.map +1 -1
- package/lib-commonjs/components/TagPickerOption/renderTagPickerOption.js.map +1 -1
- package/lib-commonjs/components/TagPickerOption/useTagPickerOption.js.map +1 -1
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js +1 -0
- package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js +3 -1
- package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/index.js.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -1
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js +1 -0
- package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/contexts/TagPickerContext.js +3 -3
- package/lib-commonjs/contexts/TagPickerContext.js.map +1 -1
- package/lib-commonjs/index.js +65 -65
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/tagPicker2Tag.js +3 -3
- package/lib-commonjs/utils/tagPicker2Tag.js.map +1 -1
- package/lib-commonjs/utils/tokens.js.map +1 -1
- package/lib-commonjs/utils/useResizeObserverRef.js.map +1 -1
- package/lib-commonjs/utils/useTagPickerFilter.js.map +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TagPickerContext.
|
|
1
|
+
{"version":3,"sources":["TagPickerContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { ContextSelector, createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { TagPickerSize } from '../components/TagPicker/TagPicker.types';\nimport { ComboboxBaseState } from '@fluentui/react-combobox';\n\nexport interface TagPickerContextValue\n extends Pick<\n ComboboxBaseState,\n | 'open'\n | 'clearSelection'\n | 'getOptionById'\n | 'selectedOptions'\n | 'selectOption'\n | 'setHasFocus'\n | 'setOpen'\n | 'setValue'\n | 'value'\n | 'appearance'\n | 'disabled'\n > {\n triggerRef: React.RefObject<HTMLInputElement | HTMLButtonElement>;\n popoverRef: React.RefObject<HTMLDivElement>;\n popoverId: string;\n targetRef: React.RefObject<HTMLDivElement>;\n secondaryActionRef: React.RefObject<HTMLSpanElement>;\n tagPickerGroupRef: React.RefObject<HTMLDivElement>;\n size: TagPickerSize;\n}\n\n/**\n * @internal\n */\nexport const tagPickerContextDefaultValue: TagPickerContextValue = {\n triggerRef: React.createRef<HTMLInputElement>(),\n popoverRef: React.createRef<HTMLDivElement>(),\n targetRef: React.createRef<HTMLDivElement>(),\n tagPickerGroupRef: React.createRef<HTMLDivElement>(),\n secondaryActionRef: React.createRef<HTMLDivElement>(),\n open: false,\n clearSelection: () => null,\n getOptionById: () => undefined,\n selectedOptions: [],\n selectOption: () => null,\n setHasFocus: () => null,\n setOpen: () => null,\n setValue: () => null,\n value: undefined,\n popoverId: '',\n size: 'medium',\n appearance: 'outline',\n disabled: false,\n};\n\nconst TagPickerContext = createContext<TagPickerContextValue | undefined>(undefined);\n\nexport const TagPickerContextProvider = TagPickerContext.Provider;\nexport const useTagPickerContext_unstable = <T>(selector: ContextSelector<TagPickerContextValue, T>) =>\n useContextSelector(TagPickerContext, (ctx = tagPickerContextDefaultValue) => selector(ctx));\n"],"names":["TagPickerContextProvider","tagPickerContextDefaultValue","useTagPickerContext_unstable","triggerRef","React","createRef","popoverRef","targetRef","tagPickerGroupRef","secondaryActionRef","open","clearSelection","getOptionById","undefined","selectedOptions","selectOption","setHasFocus","setOpen","setValue","value","popoverId","size","appearance","disabled","TagPickerContext","createContext","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAuDaA,wBAAAA;eAAAA;;IAvBAC,4BAAAA;eAAAA;;IAwBAC,4BAAAA;eAAAA;;;;iEAxDU;sCAC4C;AA+B5D,MAAMD,+BAAsD;IACjEE,0BAAYC,OAAMC,SAAS;IAC3BC,0BAAYF,OAAMC,SAAS;IAC3BE,yBAAWH,OAAMC,SAAS;IAC1BG,iCAAmBJ,OAAMC,SAAS;IAClCI,kCAAoBL,OAAMC,SAAS;IACnCK,MAAM;IACNC,gBAAgB,IAAM;IACtBC,eAAe,IAAMC;IACrBC,iBAAiB,EAAE;IACnBC,cAAc,IAAM;IACpBC,aAAa,IAAM;IACnBC,SAAS,IAAM;IACfC,UAAU,IAAM;IAChBC,OAAON;IACPO,WAAW;IACXC,MAAM;IACNC,YAAY;IACZC,UAAU;AACZ;AAEA,MAAMC,mBAAmBC,IAAAA,mCAAAA,EAAiDZ;AAEnE,MAAMb,2BAA2BwB,iBAAiBE,QAAQ;AAC1D,MAAMxB,+BAA+B,CAAIyB,WAC9CC,IAAAA,wCAAAA,EAAmBJ,kBAAkB,CAACK,MAAM5B,4BAA4B,GAAK0B,SAASE"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -12,95 +12,86 @@ _export(exports, {
|
|
|
12
12
|
TagPicker: function() {
|
|
13
13
|
return _TagPicker.TagPicker;
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
return
|
|
15
|
+
TagPickerButton: function() {
|
|
16
|
+
return _TagPickerButton.TagPickerButton;
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
return
|
|
18
|
+
TagPickerControl: function() {
|
|
19
|
+
return _TagPickerControl.TagPickerControl;
|
|
20
|
+
},
|
|
21
|
+
TagPickerGroup: function() {
|
|
22
|
+
return _TagPickerGroup.TagPickerGroup;
|
|
20
23
|
},
|
|
21
24
|
TagPickerInput: function() {
|
|
22
25
|
return _TagPickerInput.TagPickerInput;
|
|
23
26
|
},
|
|
24
|
-
|
|
25
|
-
return
|
|
27
|
+
TagPickerList: function() {
|
|
28
|
+
return _TagPickerList.TagPickerList;
|
|
26
29
|
},
|
|
27
|
-
|
|
28
|
-
return
|
|
30
|
+
TagPickerOption: function() {
|
|
31
|
+
return _TagPickerOption.TagPickerOption;
|
|
29
32
|
},
|
|
30
|
-
|
|
31
|
-
return
|
|
33
|
+
TagPickerOptionGroup: function() {
|
|
34
|
+
return _TagPickerOptionGroup.TagPickerOptionGroup;
|
|
32
35
|
},
|
|
33
|
-
|
|
34
|
-
return
|
|
36
|
+
renderTagPickerButton_unstable: function() {
|
|
37
|
+
return _TagPickerButton.renderTagPickerButton_unstable;
|
|
35
38
|
},
|
|
36
|
-
|
|
37
|
-
return
|
|
39
|
+
renderTagPickerControl_unstable: function() {
|
|
40
|
+
return _TagPickerControl.renderTagPickerControl_unstable;
|
|
38
41
|
},
|
|
39
|
-
|
|
40
|
-
return
|
|
42
|
+
renderTagPickerGroup_unstable: function() {
|
|
43
|
+
return _TagPickerGroup.renderTagPickerGroup_unstable;
|
|
44
|
+
},
|
|
45
|
+
renderTagPickerInput_unstable: function() {
|
|
46
|
+
return _TagPickerInput.renderTagPickerInput_unstable;
|
|
41
47
|
},
|
|
42
48
|
renderTagPickerList_unstable: function() {
|
|
43
49
|
return _TagPickerList.renderTagPickerList_unstable;
|
|
44
50
|
},
|
|
45
|
-
|
|
46
|
-
return
|
|
51
|
+
renderTagPickerOptionGroup: function() {
|
|
52
|
+
return _TagPickerOptionGroup.renderTagPickerOptionGroup;
|
|
47
53
|
},
|
|
48
|
-
|
|
49
|
-
return
|
|
54
|
+
renderTagPickerOption_unstable: function() {
|
|
55
|
+
return _TagPickerOption.renderTagPickerOption_unstable;
|
|
50
56
|
},
|
|
51
|
-
|
|
52
|
-
return
|
|
57
|
+
renderTagPicker_unstable: function() {
|
|
58
|
+
return _TagPicker.renderTagPicker_unstable;
|
|
53
59
|
},
|
|
54
60
|
tagPickerButtonClassNames: function() {
|
|
55
61
|
return _TagPickerButton.tagPickerButtonClassNames;
|
|
56
62
|
},
|
|
57
|
-
renderTagPickerButton_unstable: function() {
|
|
58
|
-
return _TagPickerButton.renderTagPickerButton_unstable;
|
|
59
|
-
},
|
|
60
|
-
useTagPickerButtonStyles_unstable: function() {
|
|
61
|
-
return _TagPickerButton.useTagPickerButtonStyles_unstable;
|
|
62
|
-
},
|
|
63
|
-
useTagPickerButton_unstable: function() {
|
|
64
|
-
return _TagPickerButton.useTagPickerButton_unstable;
|
|
65
|
-
},
|
|
66
|
-
TagPickerControl: function() {
|
|
67
|
-
return _TagPickerControl.TagPickerControl;
|
|
68
|
-
},
|
|
69
63
|
tagPickerControlClassNames: function() {
|
|
70
64
|
return _TagPickerControl.tagPickerControlClassNames;
|
|
71
65
|
},
|
|
72
|
-
|
|
73
|
-
return
|
|
74
|
-
},
|
|
75
|
-
useTagPickerControlStyles_unstable: function() {
|
|
76
|
-
return _TagPickerControl.useTagPickerControlStyles_unstable;
|
|
66
|
+
tagPickerGroupClassNames: function() {
|
|
67
|
+
return _TagPickerGroup.tagPickerGroupClassNames;
|
|
77
68
|
},
|
|
78
|
-
|
|
79
|
-
return
|
|
69
|
+
tagPickerInputClassNames: function() {
|
|
70
|
+
return _TagPickerInput.tagPickerInputClassNames;
|
|
80
71
|
},
|
|
81
|
-
|
|
82
|
-
return
|
|
72
|
+
tagPickerListClassNames: function() {
|
|
73
|
+
return _TagPickerList.tagPickerListClassNames;
|
|
83
74
|
},
|
|
84
75
|
tagPickerOptionClassNames: function() {
|
|
85
76
|
return _TagPickerOption.tagPickerOptionClassNames;
|
|
86
77
|
},
|
|
87
|
-
|
|
88
|
-
return
|
|
78
|
+
tagPickerOptionGroupClassNames: function() {
|
|
79
|
+
return _TagPickerOptionGroup.tagPickerOptionGroupClassNames;
|
|
89
80
|
},
|
|
90
|
-
|
|
91
|
-
return
|
|
81
|
+
useTagPickerButtonStyles_unstable: function() {
|
|
82
|
+
return _TagPickerButton.useTagPickerButtonStyles_unstable;
|
|
92
83
|
},
|
|
93
|
-
|
|
94
|
-
return
|
|
84
|
+
useTagPickerButton_unstable: function() {
|
|
85
|
+
return _TagPickerButton.useTagPickerButton_unstable;
|
|
95
86
|
},
|
|
96
|
-
|
|
97
|
-
return
|
|
87
|
+
useTagPickerControlStyles_unstable: function() {
|
|
88
|
+
return _TagPickerControl.useTagPickerControlStyles_unstable;
|
|
98
89
|
},
|
|
99
|
-
|
|
100
|
-
return
|
|
90
|
+
useTagPickerControl_unstable: function() {
|
|
91
|
+
return _TagPickerControl.useTagPickerControl_unstable;
|
|
101
92
|
},
|
|
102
|
-
|
|
103
|
-
return
|
|
93
|
+
useTagPickerFilter: function() {
|
|
94
|
+
return _useTagPickerFilter.useTagPickerFilter;
|
|
104
95
|
},
|
|
105
96
|
useTagPickerGroupStyles_unstable: function() {
|
|
106
97
|
return _TagPickerGroup.useTagPickerGroupStyles_unstable;
|
|
@@ -108,23 +99,32 @@ _export(exports, {
|
|
|
108
99
|
useTagPickerGroup_unstable: function() {
|
|
109
100
|
return _TagPickerGroup.useTagPickerGroup_unstable;
|
|
110
101
|
},
|
|
111
|
-
|
|
112
|
-
return
|
|
102
|
+
useTagPickerInputStyles_unstable: function() {
|
|
103
|
+
return _TagPickerInput.useTagPickerInputStyles_unstable;
|
|
113
104
|
},
|
|
114
|
-
|
|
115
|
-
return
|
|
105
|
+
useTagPickerInput_unstable: function() {
|
|
106
|
+
return _TagPickerInput.useTagPickerInput_unstable;
|
|
116
107
|
},
|
|
117
|
-
|
|
118
|
-
return
|
|
108
|
+
useTagPickerListStyles_unstable: function() {
|
|
109
|
+
return _TagPickerList.useTagPickerListStyles_unstable;
|
|
119
110
|
},
|
|
120
|
-
|
|
121
|
-
return
|
|
111
|
+
useTagPickerList_unstable: function() {
|
|
112
|
+
return _TagPickerList.useTagPickerList_unstable;
|
|
122
113
|
},
|
|
123
114
|
useTagPickerOptionGroup: function() {
|
|
124
115
|
return _TagPickerOptionGroup.useTagPickerOptionGroup;
|
|
125
116
|
},
|
|
126
|
-
|
|
127
|
-
return
|
|
117
|
+
useTagPickerOptionGroupStyles: function() {
|
|
118
|
+
return _TagPickerOptionGroup.useTagPickerOptionGroupStyles;
|
|
119
|
+
},
|
|
120
|
+
useTagPickerOptionStyles_unstable: function() {
|
|
121
|
+
return _TagPickerOption.useTagPickerOptionStyles_unstable;
|
|
122
|
+
},
|
|
123
|
+
useTagPickerOption_unstable: function() {
|
|
124
|
+
return _TagPickerOption.useTagPickerOption_unstable;
|
|
125
|
+
},
|
|
126
|
+
useTagPicker_unstable: function() {
|
|
127
|
+
return _TagPicker.useTagPicker_unstable;
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
130
|
const _TagPicker = require("./TagPicker");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { TagPicker, renderTagPicker_unstable, useTagPicker_unstable } from './TagPicker';\nexport type {\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} from './TagPickerInput';\nexport type { TagPickerInputProps, TagPickerInputSlots, TagPickerInputState } 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} from './TagPickerButton';\nexport type { TagPickerButtonProps, TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton';\nexport {\n TagPickerControl,\n tagPickerControlClassNames,\n renderTagPickerControl_unstable,\n useTagPickerControlStyles_unstable,\n useTagPickerControl_unstable,\n} from './TagPickerControl';\nexport type { TagPickerControlProps, TagPickerControlSlots, TagPickerControlState } 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 { TagPickerGroupProps, TagPickerGroupSlots, TagPickerGroupState } 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"],"names":["TagPicker","TagPickerButton","TagPickerControl","TagPickerGroup","TagPickerInput","TagPickerList","TagPickerOption","TagPickerOptionGroup","renderTagPickerButton_unstable","renderTagPickerControl_unstable","renderTagPickerGroup_unstable","renderTagPickerInput_unstable","renderTagPickerList_unstable","renderTagPickerOptionGroup","renderTagPickerOption_unstable","renderTagPicker_unstable","tagPickerButtonClassNames","tagPickerControlClassNames","tagPickerGroupClassNames","tagPickerInputClassNames","tagPickerListClassNames","tagPickerOptionClassNames","tagPickerOptionGroupClassNames","useTagPickerButtonStyles_unstable","useTagPickerButton_unstable","useTagPickerControlStyles_unstable","useTagPickerControl_unstable","useTagPickerFilter","useTagPickerGroupStyles_unstable","useTagPickerGroup_unstable","useTagPickerInputStyles_unstable","useTagPickerInput_unstable","useTagPickerListStyles_unstable","useTagPickerList_unstable","useTagPickerOptionGroup","useTagPickerOptionGroupStyles","useTagPickerOptionStyles_unstable","useTagPickerOption_unstable","useTagPicker_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,SAAS;eAATA,oBAAS;;IA2BhBC,eAAe;eAAfA,gCAAe;;IAQfC,gBAAgB;eAAhBA,kCAAgB;;IAgBhBC,cAAc;eAAdA,8BAAc;;IAxCdC,cAAc;eAAdA,8BAAc;;IAQdC,aAAa;eAAbA,4BAAa;;IAwBbC,eAAe;eAAfA,gCAAe;;IAiBfC,oBAAoB;eAApBA,0CAAoB;;IA/BpBC,8BAA8B;eAA9BA,+CAA8B;;IAQ9BC,+BAA+B;eAA/BA,iDAA+B;;IAgB/BC,6BAA6B;eAA7BA,6CAA6B;;IAxC7BC,6BAA6B;eAA7BA,6CAA6B;;IAQ7BC,4BAA4B;eAA5BA,2CAA4B;;IAyC5BC,0BAA0B;eAA1BA,gDAA0B;;IAjB1BC,8BAA8B;eAA9BA,+CAA8B;;IA7CZC,wBAAwB;eAAxBA,mCAAwB;;IA4B1CC,yBAAyB;eAAzBA,0CAAyB;;IAQzBC,0BAA0B;eAA1BA,4CAA0B;;IAgB1BC,wBAAwB;eAAxBA,wCAAwB;;IAxCxBC,wBAAwB;eAAxBA,wCAAwB;;IAQxBC,uBAAuB;eAAvBA,sCAAuB;;IAwBvBC,yBAAyB;eAAzBA,0CAAyB;;IAiBzBC,8BAA8B;eAA9BA,oDAA8B;;IA/B9BC,iCAAiC;eAAjCA,kDAAiC;;IACjCC,2BAA2B;eAA3BA,4CAA2B;;IAO3BC,kCAAkC;eAAlCA,oDAAkC;;IAClCC,4BAA4B;eAA5BA,8CAA4B;;IAiCrBC,kBAAkB;eAAlBA,sCAAkB;;IAlBzBC,gCAAgC;eAAhCA,gDAAgC;;IAChCC,0BAA0B;eAA1BA,0CAA0B;;IAzC1BC,gCAAgC;eAAhCA,gDAAgC;;IAChCC,0BAA0B;eAA1BA,0CAA0B;;IAO1BC,+BAA+B;eAA/BA,8CAA+B;;IAC/BC,yBAAyB;eAAzBA,wCAAyB;;IAyCzBC,uBAAuB;eAAvBA,6CAAuB;;IADvBC,6BAA6B;eAA7BA,mDAA6B;;IAjB7BC,iCAAiC;eAAjCA,kDAAiC;;IACjCC,2BAA2B;eAA3BA,4CAA2B;;IA/CiBC,qBAAqB;eAArBA,gCAAqB;;;2BAAQ;gCAgBpE;+BAQA;iCAQA;kCAQA;iCAQA;gCAQA;sCASA;oCAO4B"}
|
|
@@ -9,14 +9,14 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
tagPickerAppearanceToTagAppearance: function() {
|
|
13
|
+
return tagPickerAppearanceToTagAppearance;
|
|
14
|
+
},
|
|
12
15
|
tagPickerSizeToTagSize: function() {
|
|
13
16
|
return tagPickerSizeToTagSize;
|
|
14
17
|
},
|
|
15
18
|
tagSizeToTagPickerSize: function() {
|
|
16
19
|
return tagSizeToTagPickerSize;
|
|
17
|
-
},
|
|
18
|
-
tagPickerAppearanceToTagAppearance: function() {
|
|
19
|
-
return tagPickerAppearanceToTagAppearance;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
function tagPickerSizeToTagSize(size) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tagPicker2Tag.
|
|
1
|
+
{"version":3,"sources":["tagPicker2Tag.ts"],"sourcesContent":["import type { TagAppearance, TagSize } from '@fluentui/react-tags/src/index';\nimport type { TagPickerSize } from '../TagPicker';\nimport { ComboboxBaseProps } from '@fluentui/react-combobox';\n\nexport function tagPickerSizeToTagSize(size: TagPickerSize): TagSize {\n switch (size) {\n case 'medium':\n return 'extra-small';\n case 'large':\n return 'small';\n case 'extra-large':\n return 'medium';\n default:\n return 'extra-small';\n }\n}\n\nexport function tagSizeToTagPickerSize(size: TagSize): TagPickerSize {\n switch (size) {\n case 'extra-small':\n return 'medium';\n case 'small':\n return 'large';\n case 'medium':\n return 'extra-large';\n default:\n return 'medium';\n }\n}\n\nexport function tagPickerAppearanceToTagAppearance(appearance: ComboboxBaseProps['appearance']): TagAppearance {\n switch (appearance) {\n case 'filled-darker':\n return 'outline';\n default:\n return 'filled';\n }\n}\n"],"names":["tagPickerAppearanceToTagAppearance","tagPickerSizeToTagSize","tagSizeToTagPickerSize","size","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA8BgBA,kCAAAA;eAAAA;;IA1BAC,sBAAAA;eAAAA;;IAaAC,sBAAAA;eAAAA;;;AAbT,SAASD,uBAAuBE,IAAmB;IACxD,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE,OAAO;IACX;AACF;AAEO,SAASD,uBAAuBC,IAAa;IAClD,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT;YACE,OAAO;IACX;AACF;AAEO,SAASH,mCAAmCI,UAA2C;IAC5F,OAAQA;QACN,KAAK;YACH,OAAO;QACT;YACE,OAAO;IACX;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tokens.
|
|
1
|
+
{"version":3,"sources":["tokens.ts"],"sourcesContent":["export type TagPickerInputTokens = {\n width: string;\n};\n\nexport const tagPickerInputCSSRules: { [Key in keyof TagPickerInputTokens]: `--fluent-TagPickerInput__${Key}` } = {\n width: '--fluent-TagPickerInput__width',\n};\n\nexport const tagPickerInputTokens: Record<keyof TagPickerInputTokens, string> = {\n width: `var(${tagPickerInputCSSRules.width}, 0)`,\n};\n"],"names":["tagPickerInputCSSRules","tagPickerInputTokens","width"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,sBAAAA;eAAAA;;IAIAC,oBAAAA;eAAAA;;;AAJN,MAAMD,yBAAqG;IAChHE,OAAO;AACT;AAEO,MAAMD,uBAAmE;IAC9EC,OAAO,CAAC,IAAI,EAAEF,uBAAuBE,KAAK,CAAC,IAAI,CAAC;AAClD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useResizeObserverRef.
|
|
1
|
+
{"version":3,"sources":["useResizeObserverRef.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nexport const useResizeObserverRef = <E extends HTMLElement>(callback: ResizeObserverCallback): React.Ref<E> => {\n const { targetDocument } = useFluent();\n const [observer] = React.useState(() => {\n const ResizeObserverConstructor = targetDocument?.defaultView?.ResizeObserver;\n if (ResizeObserverConstructor) {\n return new ResizeObserverConstructor(callback);\n }\n });\n const ref: React.RefCallback<E> = React.useCallback(\n element => {\n if (element) {\n observer?.observe(element);\n } else {\n observer?.disconnect();\n }\n },\n [observer],\n );\n return ref;\n};\n"],"names":["useResizeObserverRef","callback","targetDocument","useFluent","observer","React","useState","ResizeObserverConstructor","defaultView","ResizeObserver","ref","useCallback","element","observe","disconnect"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGaA;;;eAAAA;;;;iEAHU;qCACyB;AAEzC,MAAMA,uBAAuB,CAAwBC;IAC1D,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAC3B,MAAM,CAACC,SAAS,GAAGC,OAAMC,QAAQ,CAAC;YACEJ;QAAlC,MAAMK,4BAA4BL,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,8BAAAA,eAAgBM,WAAW,AAAXA,MAAW,QAA3BN,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAA6BO,cAAc;QAC7E,IAAIF,2BAA2B;YAC7B,OAAO,IAAIA,0BAA0BN;QACvC;IACF;IACA,MAAMS,MAA4BL,OAAMM,WAAW,CACjDC,CAAAA;QACE,IAAIA,SAAS;YACXR,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,KAAAA,IAAAA,SAAUS,OAAO,CAACD;QACpB,OAAO;YACLR,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,KAAAA,IAAAA,SAAUU,UAAU;QACtB;IACF,GACA;QAACV;KAAS;IAEZ,OAAOM;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTagPickerFilter.
|
|
1
|
+
{"version":3,"sources":["useTagPickerFilter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TagPickerOption } from '../TagPickerOption';\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: JSX.Element;\n\n /** Provides a custom render for the option. */\n renderOption?: (option: string) => JSX.Element;\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) {\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<JSX.Element[]>((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":["useTagPickerFilter","defaultRenderOption","option","React","createElement","TagPickerOption","value","key","filter","filterOverride","noOptionsElement","renderOption","query","options","defaultFilter","useCallback","trimmedQuery","trim","toLowerCase","includes","filteredOptions","useMemo","reduce","accumulator","index","push","length","cloneElement"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA2BgBA;;;eAAAA;;;;iEA3BO;iCACS;AAkBhC,SAASC,oBAAoBC,MAAc;IACzC,OAAA,WAAA,GACEC,OAAAC,aAAA,CAACC,gCAAAA,EAAAA;QAAgBC,OAAOJ;QAAQK,KAAKL;OAClCA;AAGP;AAEO,SAASF,mBAAmB,EACjCQ,QAAQC,cAAc,EACtBC,gBAAgB,EAChBC,eAAeV,mBAAmB,EAClCW,KAAK,EACLC,OAAO,EACkB;IACzB,MAAMC,gBAAgBX,OAAMY,WAAW,CACrC,CAACb;QACC,MAAMc,eAAeJ,MAAMK,IAAI;QAC/B,IAAID,iBAAiB,IAAI;YACvB,OAAO;QACT;QACA,OAAOd,OAAOgB,WAAW,GAAGC,QAAQ,CAACH,aAAaE,WAAW;IAC/D,GACA;QAACN;KAAM;IAET,MAAMJ,SAASC,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,iBAAkBK;IACjC,MAAMM,kBAAkBjB,OAAMkB,OAAO,CACnC,IACER,QAAQS,MAAM,CAAgB,CAACC,aAAarB,QAAQsB;YAClD,IAAIhB,OAAON,QAAQsB,QAAQ;gBACzBD,YAAYE,IAAI,CAACd,aAAaT;YAChC;YACA,OAAOqB;QACT,GAAG,EAAE,GACP;QAACV;QAASF;QAAcH;KAAO;IAGjC,OAAOY,gBAAgBM,MAAM,KAAK,IAC9B;QAAChB,iBAAiBH,GAAG,GAAGG,mBAAAA,WAAAA,GAAmBP,OAAMwB,YAAY,CAACjB,kBAAkB;YAAEH,KAAK;QAAa;KAAG,GACvGa;AACN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-tag-picker",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.1",
|
|
4
4
|
"description": "FluentUI TagPicker component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -41,20 +41,20 @@
|
|
|
41
41
|
"@fluentui/scripts-tasks": "*"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
44
|
+
"@fluentui/react-jsx-runtime": "^9.0.40",
|
|
45
45
|
"@fluentui/react-shared-contexts": "^9.19.0",
|
|
46
46
|
"@fluentui/react-theme": "^9.1.19",
|
|
47
|
-
"@fluentui/react-utilities": "^9.18.
|
|
48
|
-
"@fluentui/react-portal": "^9.4.
|
|
49
|
-
"@fluentui/react-tabster": "^9.22.
|
|
50
|
-
"@fluentui/react-aria": "^9.
|
|
51
|
-
"@fluentui/react-icons": "^2.0.
|
|
52
|
-
"@fluentui/react-combobox": "^9.
|
|
53
|
-
"@fluentui/react-tags": "^9.3.
|
|
54
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
55
|
-
"@fluentui/react-positioning": "^9.15.
|
|
47
|
+
"@fluentui/react-utilities": "^9.18.11",
|
|
48
|
+
"@fluentui/react-portal": "^9.4.29",
|
|
49
|
+
"@fluentui/react-tabster": "^9.22.1",
|
|
50
|
+
"@fluentui/react-aria": "^9.13.0",
|
|
51
|
+
"@fluentui/react-icons": "^2.0.245",
|
|
52
|
+
"@fluentui/react-combobox": "^9.13.0",
|
|
53
|
+
"@fluentui/react-tags": "^9.3.10",
|
|
54
|
+
"@fluentui/react-context-selector": "^9.1.63",
|
|
55
|
+
"@fluentui/react-positioning": "^9.15.4",
|
|
56
56
|
"@fluentui/keyboard-keys": "^9.0.7",
|
|
57
|
-
"@fluentui/react-field": "^9.1.
|
|
57
|
+
"@fluentui/react-field": "^9.1.69",
|
|
58
58
|
"@griffel/react": "^1.5.22",
|
|
59
59
|
"@swc/helpers": "^0.5.1"
|
|
60
60
|
},
|