@fluentui/react-tag-picker 9.6.5 → 9.6.7

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 CHANGED
@@ -1,12 +1,36 @@
1
1
  # Change Log - @fluentui/react-tag-picker
2
2
 
3
- This log was last generated on Fri, 27 Jun 2025 13:36:33 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 11 Jul 2025 15:56:58 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.6.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.6.7)
8
+
9
+ Fri, 11 Jul 2025 15:56:58 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.6.6..@fluentui/react-tag-picker_v9.6.7)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-combobox to v9.15.7 ([PR #34807](https://github.com/microsoft/fluentui/pull/34807) by beachball)
15
+ - Bump @fluentui/react-tags to v9.6.7 ([PR #34807](https://github.com/microsoft/fluentui/pull/34807) by beachball)
16
+ - Bump @fluentui/react-positioning to v9.19.0 ([PR #34807](https://github.com/microsoft/fluentui/pull/34807) by beachball)
17
+ - Bump @fluentui/react-field to v9.3.7 ([PR #34807](https://github.com/microsoft/fluentui/pull/34807) by beachball)
18
+
19
+ ## [9.6.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.6.6)
20
+
21
+ Fri, 04 Jul 2025 10:02:48 GMT
22
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.6.5..@fluentui/react-tag-picker_v9.6.6)
23
+
24
+ ### Patches
25
+
26
+ - Bump @fluentui/react-portal to v9.6.4 ([PR #34457](https://github.com/microsoft/fluentui/pull/34457) by beachball)
27
+ - Bump @fluentui/react-combobox to v9.15.6 ([PR #34457](https://github.com/microsoft/fluentui/pull/34457) by beachball)
28
+ - Bump @fluentui/react-tags to v9.6.6 ([PR #34457](https://github.com/microsoft/fluentui/pull/34457) by beachball)
29
+ - Bump @fluentui/react-field to v9.3.6 ([PR #34457](https://github.com/microsoft/fluentui/pull/34457) by beachball)
30
+
7
31
  ## [9.6.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.6.5)
8
32
 
9
- Fri, 27 Jun 2025 13:36:33 GMT
33
+ Fri, 27 Jun 2025 13:39:41 GMT
10
34
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.6.4..@fluentui/react-tag-picker_v9.6.5)
11
35
 
12
36
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/TagPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, EventData, EventHandler } 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' | 'disabled' | 'defaultOpen' | 'selectedOptions' | 'defaultSelectedOptions' | 'open'\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: [JSX.Element, JSX.Element | undefined | false] | JSX.Element;\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"],"names":[],"rangeMappings":"","mappings":"AAiGA,WAIE"}
1
+ {"version":3,"sources":["../src/components/TagPicker/TagPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, EventData, EventHandler } 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' | 'disabled' | 'defaultOpen' | 'selectedOptions' | 'defaultSelectedOptions' | 'open'\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n children: [JSX.Element, JSX.Element | undefined | false] | JSX.Element;\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"],"names":[],"rangeMappings":"","mappings":"AAkGA,WAIE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/renderTagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerState, TagPickerContextValues, TagPickerSlots } from './TagPicker.types';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\nimport { ListboxProvider } from '@fluentui/react-combobox';\nimport { Portal } from '@fluentui/react-portal';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\nimport { assertSlots } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of Picker\n */\nexport const renderTagPicker_unstable = (state: TagPickerState, contexts: TagPickerContextValues) => {\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.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["React","ActiveDescendantContextProvider","ListboxProvider","Portal","TagPickerContextProvider","assertSlots","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","inline","popover","mountNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,wBAAwB,QAAQ,kCAAkC;AAC3E,SAASC,WAAW,QAAQ,4BAA4B;AAExD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC;IAC9DH,YAA4BE;IAC5B,qBACE,oBAACH;QAAyBK,OAAOD,SAASE,MAAM;qBAC9C,oBAACT;QAAgCQ,OAAOD,SAASG,gBAAgB;qBAC/D,oBAACT;QAAgBO,OAAOD,SAASI,OAAO;OACrCL,MAAMM,OAAO,EACbN,MAAMO,MAAM,GAAGP,MAAMQ,OAAO,iBAAG,oBAACZ;QAAOa,WAAWT,MAAMS,SAAS;OAAGT,MAAMQ,OAAO;AAK5F,EAAE"}
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 { TagPickerContextProvider } from '../../contexts/TagPickerContext';\nimport { assertSlots } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (\n state: TagPickerState,\n contexts: TagPickerContextValues,\n): // eslint-disable-next-line @typescript-eslint/no-deprecated\nJSX.Element => {\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.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["React","ActiveDescendantContextProvider","ListboxProvider","Portal","TagPickerContextProvider","assertSlots","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","inline","popover","mountNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,wBAAwB,QAAQ,kCAAkC;AAC3E,SAASC,WAAW,QAAQ,4BAA4B;AAExD;;CAEC,GAED,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAGAH,YAA4BE;IAC5B,qBACE,oBAACH;QAAyBK,OAAOD,SAASE,MAAM;qBAC9C,oBAACT;QAAgCQ,OAAOD,SAASG,gBAAgB;qBAC/D,oBAACT;QAAgBO,OAAOD,SAASI,OAAO;OACrCL,MAAMM,OAAO,EACbN,MAAMO,MAAM,GAAGP,MAAMQ,OAAO,iBAAG,oBAACZ;QAAOa,WAAWT,MAAMS,SAAS;OAAGT,MAAMQ,OAAO;AAK5F,EAAE"}
@@ -28,7 +28,8 @@ import { useButtonTriggerSlot } from '@fluentui/react-combobox';
28
28
  defaultProps: {
29
29
  type: 'button',
30
30
  tabIndex: 0,
31
- children: value || props.placeholder,
31
+ children: value || // @ts-expect-error - FIXME: TS2339: Property 'placeholder' does not exist on type 'TagPickerButtonProps'
32
+ props.placeholder,
32
33
  'aria-controls': open ? popoverId : undefined,
33
34
  ref
34
35
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type { TagPickerButtonProps, TagPickerButtonState } from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render PickerButton.\n *\n * The returned state can be modified with hooks such as usePickerButtonStyles_unstable,\n * before being passed to renderPickerButton_unstable.\n *\n * @param props - props from this instance of PickerButton\n * @param ref - reference to root HTMLDivElement of PickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\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: value || 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 const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n const state: TagPickerButtonState = {\n components: {\n root: 'button',\n },\n root,\n size,\n hasSelectedOption,\n };\n\n return state;\n};\n"],"names":["React","useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTagPickerButton_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","size","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,uBAAuB;AAElE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGP;IACnD,MAAMQ,aAAaP,6BAA6BQ,CAAAA,MAAOA,IAAID,UAAU;IACrE,MAAME,OAAOT,6BAA6BQ,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,QAAQV,6BAA6BQ,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,oBAAoBX,6BAA6BQ,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,YAAYd,6BAA6BQ,CAAAA,MAAOA,IAAIM,SAAS;IACnE,MAAMC,gBAAgBf,6BAA6BQ,CAAAA,MAAOA,IAAIO,aAAa;IAC3E,MAAMC,eAAehB,6BAA6BQ,CAAAA,MAAOA,IAAIQ,YAAY;IACzE,MAAMC,cAAcjB,6BAA6BQ,CAAAA,MAAOA,IAAIS,WAAW;IACvE,MAAMC,UAAUlB,6BAA6BQ,CAAAA,MAAOA,IAAIU,OAAO;IAE/D,wEAAwE;IACxE,+CAA+C;IAC/C,MAAMC,OAAOlB,qBAAqBE,OAAOI,YAAkD;QACzFD;QACAc,cAAc;YACZC,MAAM;YACNC,UAAU;YACVC,UAAUb,SAASP,MAAMqB,WAAW;YACpC,iBAAiBf,OAAOK,YAAYW;YACpCrB;QACF;QACAsB,OAAO;YACLX;YACAN;YACAO;YACAC;YACAC;YACAS,aAAa;QACf;IACF;IAEA,MAAMC,OAAO5B,6BAA6BQ,CAAAA,MAAOA,IAAIoB,IAAI;IAEzD,MAAMF,QAA8B;QAClCG,YAAY;YACVV,MAAM;QACR;QACAA;QACAS;QACAjB;IACF;IAEA,OAAOe;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type { TagPickerButtonProps, TagPickerButtonState } from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render PickerButton.\n *\n * The returned state can be modified with hooks such as usePickerButtonStyles_unstable,\n * before being passed to renderPickerButton_unstable.\n *\n * @param props - props from this instance of PickerButton\n * @param ref - reference to root HTMLDivElement of PickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\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 'TagPickerButtonProps'\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 const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n const state: TagPickerButtonState = {\n components: {\n root: 'button',\n },\n root,\n size,\n hasSelectedOption,\n };\n\n return state;\n};\n"],"names":["React","useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTagPickerButton_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","size","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,uBAAuB;AAElE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGP;IACnD,MAAMQ,aAAaP,6BAA6BQ,CAAAA,MAAOA,IAAID,UAAU;IACrE,MAAME,OAAOT,6BAA6BQ,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,QAAQV,6BAA6BQ,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,oBAAoBX,6BAA6BQ,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,YAAYd,6BAA6BQ,CAAAA,MAAOA,IAAIM,SAAS;IACnE,MAAMC,gBAAgBf,6BAA6BQ,CAAAA,MAAOA,IAAIO,aAAa;IAC3E,MAAMC,eAAehB,6BAA6BQ,CAAAA,MAAOA,IAAIQ,YAAY;IACzE,MAAMC,cAAcjB,6BAA6BQ,CAAAA,MAAOA,IAAIS,WAAW;IACvE,MAAMC,UAAUlB,6BAA6BQ,CAAAA,MAAOA,IAAIU,OAAO;IAE/D,wEAAwE;IACxE,+CAA+C;IAC/C,MAAMC,OAAOlB,qBAAqBE,OAAOI,YAAkD;QACzFD;QACAc,cAAc;YACZC,MAAM;YACNC,UAAU;YACVC,UACEb,SACA,yGAAyG;YACzGP,MAAMqB,WAAW;YACnB,iBAAiBf,OAAOK,YAAYW;YACpCrB;QACF;QACAsB,OAAO;YACLX;YACAN;YACAO;YACAC;YACAC;YACAS,aAAa;QACf;IACF;IAEA,MAAMC,OAAO5B,6BAA6BQ,CAAAA,MAAOA,IAAIoB,IAAI;IAEzD,MAAMF,QAA8B;QAClCG,YAAY;YACVV,MAAM;QACR;QACAA;QACAS;QACAjB;IACF;IAEA,OAAOe;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerOptionGroup/renderTagPickerOptionGroup.tsx"],"sourcesContent":["import type { TagPickerOptionGroupState } from './TagPickerOptionGroup.types';\nimport { renderOptionGroup_unstable } from '@fluentui/react-combobox';\n\n/**\n * Render the final JSX of TagPickerOptionGroup\n */\nexport const renderTagPickerOptionGroup: (state: TagPickerOptionGroupState) => JSX.Element = renderOptionGroup_unstable;\n"],"names":["renderOptionGroup_unstable","renderTagPickerOptionGroup"],"rangeMappings":";;;","mappings":"AACA,SAASA,0BAA0B,QAAQ,2BAA2B;AAEtE;;CAEC,GACD,OAAO,MAAMC,6BAAgFD,2BAA2B"}
1
+ {"version":3,"sources":["../src/components/TagPickerOptionGroup/renderTagPickerOptionGroup.tsx"],"sourcesContent":["import type { TagPickerOptionGroupState } from './TagPickerOptionGroup.types';\nimport { renderOptionGroup_unstable } from '@fluentui/react-combobox';\n\n/**\n * Render the final JSX of TagPickerOptionGroup\n */\nexport const renderTagPickerOptionGroup: (\n state: TagPickerOptionGroupState,\n) => // eslint-disable-next-line @typescript-eslint/no-deprecated\nJSX.Element = renderOptionGroup_unstable;\n"],"names":["renderOptionGroup_unstable","renderTagPickerOptionGroup"],"rangeMappings":";;;","mappings":"AACA,SAASA,0BAA0B,QAAQ,2BAA2B;AAEtE;;CAEC,GACD,OAAO,MAAMC,6BAGCD,2BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/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":["React","TagPickerOption","defaultRenderOption","option","value","key","useTagPickerFilter","filter","filterOverride","noOptionsElement","renderOption","query","options","defaultFilter","useCallback","trimmedQuery","trim","toLowerCase","includes","filteredOptions","useMemo","reduce","accumulator","index","push","length","cloneElement"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,QAAQ,qBAAqB;AAkBrD,SAASC,oBAAoBC,MAAc;IACzC,qBACE,oBAACF;QAAgBG,OAAOD;QAAQE,KAAKF;OAClCA;AAGP;AAEA,OAAO,SAASG,mBAAmB,EACjCC,QAAQC,cAAc,EACtBC,gBAAgB,EAChBC,eAAeR,mBAAmB,EAClCS,KAAK,EACLC,OAAO,EACkB;IACzB,MAAMC,gBAAgBb,MAAMc,WAAW,CACrC,CAACX;QACC,MAAMY,eAAeJ,MAAMK,IAAI;QAC/B,IAAID,iBAAiB,IAAI;YACvB,OAAO;QACT;QACA,OAAOZ,OAAOc,WAAW,GAAGC,QAAQ,CAACH,aAAaE,WAAW;IAC/D,GACA;QAACN;KAAM;IAET,MAAMJ,SAASC,2BAAAA,4BAAAA,iBAAkBK;IACjC,MAAMM,kBAAkBnB,MAAMoB,OAAO,CACnC,IACER,QAAQS,MAAM,CAAgB,CAACC,aAAanB,QAAQoB;YAClD,IAAIhB,OAAOJ,QAAQoB,QAAQ;gBACzBD,YAAYE,IAAI,CAACd,aAAaP;YAChC;YACA,OAAOmB;QACT,GAAG,EAAE,GACP;QAACV;QAASF;QAAcH;KAAO;IAGjC,OAAOY,gBAAgBM,MAAM,KAAK,IAC9B;QAAChB,iBAAiBJ,GAAG,GAAGI,iCAAmBT,MAAM0B,YAAY,CAACjB,kBAAkB;YAAEJ,KAAK;QAAa;KAAG,GACvGc;AACN"}
1
+ {"version":3,"sources":["../src/utils/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: // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element;\n\n /** Provides a custom render for the option. */\n renderOption?: (option: string) => // eslint-disable-next-line @typescript-eslint/no-deprecated\n 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<\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element[]\n >((accumulator, option, index) => {\n if (filter(option, index)) {\n accumulator.push(renderOption(option));\n }\n return accumulator;\n }, []),\n [options, renderOption, filter],\n );\n\n return filteredOptions.length === 0\n ? [noOptionsElement.key ? noOptionsElement : React.cloneElement(noOptionsElement, { key: 'no-options' })]\n : filteredOptions;\n}\n"],"names":["React","TagPickerOption","defaultRenderOption","option","value","key","useTagPickerFilter","filter","filterOverride","noOptionsElement","renderOption","query","options","defaultFilter","useCallback","trimmedQuery","trim","toLowerCase","includes","filteredOptions","useMemo","reduce","accumulator","index","push","length","cloneElement"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,QAAQ,qBAAqB;AAoBrD,SAASC,oBAAoBC,MAAc;IACzC,qBACE,oBAACF;QAAgBG,OAAOD;QAAQE,KAAKF;OAClCA;AAGP;AAEA,OAAO,SAASG,mBAAmB,EACjCC,QAAQC,cAAc,EACtBC,gBAAgB,EAChBC,eAAeR,mBAAmB,EAClCS,KAAK,EACLC,OAAO,EACkB;IACzB,MAAMC,gBAAgBb,MAAMc,WAAW,CACrC,CAACX;QACC,MAAMY,eAAeJ,MAAMK,IAAI;QAC/B,IAAID,iBAAiB,IAAI;YACvB,OAAO;QACT;QACA,OAAOZ,OAAOc,WAAW,GAAGC,QAAQ,CAACH,aAAaE,WAAW;IAC/D,GACA;QAACN;KAAM;IAET,MAAMJ,SAASC,2BAAAA,4BAAAA,iBAAkBK;IACjC,MAAMM,kBAAkBnB,MAAMoB,OAAO,CACnC,IACER,QAAQS,MAAM,CAGZ,CAACC,aAAanB,QAAQoB;YACtB,IAAIhB,OAAOJ,QAAQoB,QAAQ;gBACzBD,YAAYE,IAAI,CAACd,aAAaP;YAChC;YACA,OAAOmB;QACT,GAAG,EAAE,GACP;QAACV;QAASF;QAAcH;KAAO;IAGjC,OAAOY,gBAAgBM,MAAM,KAAK,IAC9B;QAAChB,iBAAiBJ,GAAG,GAAGI,iCAAmBT,MAAM0B,YAAY,CAACjB,kBAAkB;YAAEJ,KAAK;QAAa;KAAG,GACvGc;AACN"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/TagPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, EventData, EventHandler } 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' | 'disabled' | 'defaultOpen' | 'selectedOptions' | 'defaultSelectedOptions' | 'open'\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: [JSX.Element, JSX.Element | undefined | false] | JSX.Element;\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"],"names":[],"rangeMappings":"","mappings":""}
1
+ {"version":3,"sources":["../src/components/TagPicker/TagPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, EventData, EventHandler } 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' | 'disabled' | 'defaultOpen' | 'selectedOptions' | 'defaultSelectedOptions' | 'open'\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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n children: [JSX.Element, JSX.Element | undefined | false] | JSX.Element;\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"],"names":[],"rangeMappings":"","mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/renderTagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerState, TagPickerContextValues, TagPickerSlots } from './TagPicker.types';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\nimport { ListboxProvider } from '@fluentui/react-combobox';\nimport { Portal } from '@fluentui/react-portal';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\nimport { assertSlots } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of Picker\n */\nexport const renderTagPicker_unstable = (state: TagPickerState, contexts: TagPickerContextValues) => {\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.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["renderTagPicker_unstable","state","contexts","assertSlots","React","createElement","TagPickerContextProvider","value","picker","ActiveDescendantContextProvider","activeDescendant","ListboxProvider","listbox","trigger","inline","popover","Portal","mountNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;2BAEyB;+BAChB;6BACT;kCACkB;gCACb;AAKrB,MAAMA,2BAA2B,CAACC,OAAuBC;IAC9DC,IAAAA,2BAAAA,EAA4BF;IAC5B,OAAA,WAAA,GACEG,OAAAC,aAAA,CAACC,0CAAAA,EAAAA;QAAyBC,OAAOL,SAASM,MAAM;qBAC9CJ,OAAAC,aAAA,CAACI,0CAAAA,EAAAA;QAAgCF,OAAOL,SAASQ,gBAAgB;qBAC/DN,OAAAC,aAAA,CAACM,8BAAAA,EAAAA;QAAgBJ,OAAOL,SAASU,OAAO;OACrCX,MAAMY,OAAO,EACbZ,MAAMa,MAAM,GAAGb,MAAMc,OAAO,GAAA,WAAA,GAAGX,OAAAC,aAAA,CAACW,mBAAAA,EAAAA;QAAOC,WAAWhB,MAAMgB,SAAS;OAAGhB,MAAMc,OAAO;AAK5F"}
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 { TagPickerContextProvider } from '../../contexts/TagPickerContext';\nimport { assertSlots } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (\n state: TagPickerState,\n contexts: TagPickerContextValues,\n): // eslint-disable-next-line @typescript-eslint/no-deprecated\nJSX.Element => {\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.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["renderTagPicker_unstable","state","contexts","assertSlots","React","createElement","TagPickerContextProvider","value","picker","ActiveDescendantContextProvider","activeDescendant","ListboxProvider","listbox","trigger","inline","popover","Portal","mountNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;2BAEyB;+BAChB;6BACT;kCACkB;gCACb;AAMrB,MAAMA,2BAA2B,CACtCC,OACAC;IAGAC,IAAAA,2BAAAA,EAA4BF;IAC5B,OAAA,WAAA,GACEG,OAAAC,aAAA,CAACC,0CAAAA,EAAAA;QAAyBC,OAAOL,SAASM,MAAM;qBAC9CJ,OAAAC,aAAA,CAACI,0CAAAA,EAAAA;QAAgCF,OAAOL,SAASQ,gBAAgB;qBAC/DN,OAAAC,aAAA,CAACM,8BAAAA,EAAAA;QAAgBJ,OAAOL,SAASU,OAAO;OACrCX,MAAMY,OAAO,EACbZ,MAAMa,MAAM,GAAGb,MAAMc,OAAO,GAAA,WAAA,GAAGX,OAAAC,aAAA,CAACW,mBAAAA,EAAAA;QAAOC,WAAWhB,MAAMgB,SAAS;OAAGhB,MAAMc,OAAO;AAK5F"}
@@ -31,7 +31,8 @@ const useTagPickerButton_unstable = (props, ref)=>{
31
31
  defaultProps: {
32
32
  type: 'button',
33
33
  tabIndex: 0,
34
- children: value || props.placeholder,
34
+ children: value || // @ts-expect-error - FIXME: TS2339: Property 'placeholder' does not exist on type 'TagPickerButtonProps'
35
+ props.placeholder,
35
36
  'aria-controls': open ? popoverId : undefined,
36
37
  ref
37
38
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type { TagPickerButtonProps, TagPickerButtonState } from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render PickerButton.\n *\n * The returned state can be modified with hooks such as usePickerButtonStyles_unstable,\n * before being passed to renderPickerButton_unstable.\n *\n * @param props - props from this instance of PickerButton\n * @param ref - reference to root HTMLDivElement of PickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\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: value || 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 const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n const state: TagPickerButtonState = {\n components: {\n root: 'button',\n },\n root,\n size,\n hasSelectedOption,\n };\n\n return state;\n};\n"],"names":["useTagPickerButton_unstable","props","ref","controller","activeDescendantController","useActiveDescendantContext","triggerRef","useTagPickerContext_unstable","ctx","open","value","hasSelectedOption","selectedOptions","length","popoverId","getOptionById","selectOption","setHasFocus","setOpen","root","useButtonTriggerSlot","defaultProps","type","tabIndex","children","placeholder","undefined","state","multiselect","size","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;2BACoB;kCAEE;+BACR;AAW9B,MAAMA,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGC,IAAAA,qCAAAA;IACnD,MAAMC,aAAaC,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIF,UAAU;IACrE,MAAMG,OAAOF,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,QAAQH,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,oBAAoBJ,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,YAAYP,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIM,SAAS;IACnE,MAAMC,gBAAgBR,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIO,aAAa;IAC3E,MAAMC,eAAeT,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIQ,YAAY;IACzE,MAAMC,cAAcV,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIS,WAAW;IACvE,MAAMC,UAAUX,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIU,OAAO;IAE/D,wEAAwE;IACxE,+CAA+C;IAC/C,MAAMC,OAAOC,IAAAA,mCAAAA,EAAqBnB,OAAOK,YAAkD;QACzFF;QACAiB,cAAc;YACZC,MAAM;YACNC,UAAU;YACVC,UAAUd,SAAST,MAAMwB,WAAW;YACpC,iBAAiBhB,OAAOK,YAAYY;YACpCxB;QACF;QACAyB,OAAO;YACLZ;YACAN;YACAO;YACAC;YACAC;YACAU,aAAa;QACf;IACF;IAEA,MAAMC,OAAOtB,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIqB,IAAI;IAEzD,MAAMF,QAA8B;QAClCG,YAAY;YACVX,MAAM;QACR;QACAA;QACAU;QACAlB;IACF;IAEA,OAAOgB;AACT"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type { TagPickerButtonProps, TagPickerButtonState } from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render PickerButton.\n *\n * The returned state can be modified with hooks such as usePickerButtonStyles_unstable,\n * before being passed to renderPickerButton_unstable.\n *\n * @param props - props from this instance of PickerButton\n * @param ref - reference to root HTMLDivElement of PickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\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 'TagPickerButtonProps'\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 const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n const state: TagPickerButtonState = {\n components: {\n root: 'button',\n },\n root,\n size,\n hasSelectedOption,\n };\n\n return state;\n};\n"],"names":["useTagPickerButton_unstable","props","ref","controller","activeDescendantController","useActiveDescendantContext","triggerRef","useTagPickerContext_unstable","ctx","open","value","hasSelectedOption","selectedOptions","length","popoverId","getOptionById","selectOption","setHasFocus","setOpen","root","useButtonTriggerSlot","defaultProps","type","tabIndex","children","placeholder","undefined","state","multiselect","size","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;2BACoB;kCAEE;+BACR;AAW9B,MAAMA,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGC,IAAAA,qCAAAA;IACnD,MAAMC,aAAaC,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIF,UAAU;IACrE,MAAMG,OAAOF,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,QAAQH,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,oBAAoBJ,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,YAAYP,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIM,SAAS;IACnE,MAAMC,gBAAgBR,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIO,aAAa;IAC3E,MAAMC,eAAeT,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIQ,YAAY;IACzE,MAAMC,cAAcV,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIS,WAAW;IACvE,MAAMC,UAAUX,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIU,OAAO;IAE/D,wEAAwE;IACxE,+CAA+C;IAC/C,MAAMC,OAAOC,IAAAA,mCAAAA,EAAqBnB,OAAOK,YAAkD;QACzFF;QACAiB,cAAc;YACZC,MAAM;YACNC,UAAU;YACVC,UACEd,SACA,yGAAyG;YACzGT,MAAMwB,WAAW;YACnB,iBAAiBhB,OAAOK,YAAYY;YACpCxB;QACF;QACAyB,OAAO;YACLZ;YACAN;YACAO;YACAC;YACAC;YACAU,aAAa;QACf;IACF;IAEA,MAAMC,OAAOtB,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIqB,IAAI;IAEzD,MAAMF,QAA8B;QAClCG,YAAY;YACVX,MAAM;QACR;QACAA;QACAU;QACAlB;IACF;IAEA,OAAOgB;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerOptionGroup/renderTagPickerOptionGroup.tsx"],"sourcesContent":["import type { TagPickerOptionGroupState } from './TagPickerOptionGroup.types';\nimport { renderOptionGroup_unstable } from '@fluentui/react-combobox';\n\n/**\n * Render the final JSX of TagPickerOptionGroup\n */\nexport const renderTagPickerOptionGroup: (state: TagPickerOptionGroupState) => JSX.Element = renderOptionGroup_unstable;\n"],"names":["renderTagPickerOptionGroup","renderOptionGroup_unstable"],"rangeMappings":";;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;+BAL8B;AAKpC,MAAMA,6BAAgFC,yCAAAA"}
1
+ {"version":3,"sources":["../src/components/TagPickerOptionGroup/renderTagPickerOptionGroup.tsx"],"sourcesContent":["import type { TagPickerOptionGroupState } from './TagPickerOptionGroup.types';\nimport { renderOptionGroup_unstable } from '@fluentui/react-combobox';\n\n/**\n * Render the final JSX of TagPickerOptionGroup\n */\nexport const renderTagPickerOptionGroup: (\n state: TagPickerOptionGroupState,\n) => // eslint-disable-next-line @typescript-eslint/no-deprecated\nJSX.Element = renderOptionGroup_unstable;\n"],"names":["renderTagPickerOptionGroup","renderOptionGroup_unstable"],"rangeMappings":";;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;+BAL8B;AAKpC,MAAMA,6BAGCC,yCAAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/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"}
1
+ {"version":3,"sources":["../src/utils/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: // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element;\n\n /** Provides a custom render for the option. */\n renderOption?: (option: string) => // eslint-disable-next-line @typescript-eslint/no-deprecated\n 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<\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n JSX.Element[]\n >((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":";;;;+BA6BgBA;;;eAAAA;;;;iEA7BO;iCACS;AAoBhC,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,CAGZ,CAACC,aAAarB,QAAQsB;YACtB,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.6.5",
3
+ "version": "9.6.7",
4
4
  "description": "FluentUI TagPicker component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -32,16 +32,16 @@
32
32
  "@fluentui/react-shared-contexts": "^9.24.0",
33
33
  "@fluentui/react-theme": "^9.1.24",
34
34
  "@fluentui/react-utilities": "^9.22.0",
35
- "@fluentui/react-portal": "^9.6.3",
35
+ "@fluentui/react-portal": "^9.6.4",
36
36
  "@fluentui/react-tabster": "^9.25.3",
37
37
  "@fluentui/react-aria": "^9.15.3",
38
38
  "@fluentui/react-icons": "^2.0.245",
39
- "@fluentui/react-combobox": "^9.15.5",
40
- "@fluentui/react-tags": "^9.6.5",
39
+ "@fluentui/react-combobox": "^9.15.7",
40
+ "@fluentui/react-tags": "^9.6.7",
41
41
  "@fluentui/react-context-selector": "^9.2.2",
42
- "@fluentui/react-positioning": "^9.18.5",
42
+ "@fluentui/react-positioning": "^9.19.0",
43
43
  "@fluentui/keyboard-keys": "^9.0.8",
44
- "@fluentui/react-field": "^9.3.5",
44
+ "@fluentui/react-field": "^9.3.7",
45
45
  "@griffel/react": "^1.5.22",
46
46
  "@swc/helpers": "^0.5.1"
47
47
  },