@fluentui/react-tags 0.0.0-nightly-20250827-0407.1 → 0.0.0-nightly-20250829-0406.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 +15 -15
- package/dist/index.d.ts +6 -5
- package/lib/components/InteractionTag/renderInteractionTag.js.map +1 -1
- package/lib/components/InteractionTagPrimary/renderInteractionTagPrimary.js.map +1 -1
- package/lib/components/InteractionTagSecondary/renderInteractionTagSecondary.js.map +1 -1
- package/lib/components/Tag/renderTag.js.map +1 -1
- package/lib/components/Tag/useTag.js +3 -0
- package/lib/components/Tag/useTag.js.map +1 -1
- package/lib/components/TagGroup/renderTagGroup.js.map +1 -1
- package/lib/contexts/interactionTagContext.js.map +1 -1
- package/lib/contexts/tagGroupContext.js.map +1 -1
- package/lib-commonjs/components/InteractionTag/renderInteractionTag.js.map +1 -1
- package/lib-commonjs/components/InteractionTagPrimary/renderInteractionTagPrimary.js.map +1 -1
- package/lib-commonjs/components/InteractionTagSecondary/renderInteractionTagSecondary.js.map +1 -1
- package/lib-commonjs/components/Tag/renderTag.js.map +1 -1
- package/lib-commonjs/components/Tag/useTag.js +3 -0
- package/lib-commonjs/components/Tag/useTag.js.map +1 -1
- package/lib-commonjs/components/TagGroup/renderTagGroup.js.map +1 -1
- package/lib-commonjs/contexts/interactionTagContext.js.map +1 -1
- package/lib-commonjs/contexts/tagGroupContext.js.map +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-tags
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 29 Aug 2025 04:21:37 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20250829-0406.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tags_v0.0.0-nightly-20250829-0406.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tags_v9.7.5..@fluentui/react-tags_v0.0.0-nightly-
|
|
9
|
+
Fri, 29 Aug 2025 04:21:37 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tags_v9.7.5..@fluentui/react-tags_v0.0.0-nightly-20250829-0406.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-aria to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-avatar to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
20
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
|
21
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
22
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
23
|
-
- Bump @fluentui/react-provider to v0.0.0-nightly-
|
|
24
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
25
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
16
|
+
- Bump @fluentui/react-aria to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
17
|
+
- Bump @fluentui/react-avatar to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
21
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
22
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
23
|
+
- Bump @fluentui/react-provider to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
24
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
25
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250829-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/005adf2b3b451f7cc49bd2bfa88f08a155215b53) by beachball)
|
|
26
26
|
|
|
27
27
|
## [9.7.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tags_v9.7.5)
|
|
28
28
|
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ComponentState } from '@fluentui/react-utilities';
|
|
|
5
5
|
import type { EventData } from '@fluentui/react-utilities';
|
|
6
6
|
import type { EventHandler } from '@fluentui/react-utilities';
|
|
7
7
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
8
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
|
8
9
|
import * as React_2 from 'react';
|
|
9
10
|
import { Slot } from '@fluentui/react-utilities';
|
|
10
11
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
@@ -171,27 +172,27 @@ export declare type InteractionTagState<Value = TagValue> = ComponentState<Inter
|
|
|
171
172
|
/**
|
|
172
173
|
* Render the final JSX of InteractionTag
|
|
173
174
|
*/
|
|
174
|
-
export declare const renderInteractionTag_unstable: (state: InteractionTagState, contextValues: InteractionTagContextValues) =>
|
|
175
|
+
export declare const renderInteractionTag_unstable: (state: InteractionTagState, contextValues: InteractionTagContextValues) => JSXElement;
|
|
175
176
|
|
|
176
177
|
/**
|
|
177
178
|
* Render the final JSX of InteractionTagPrimary
|
|
178
179
|
*/
|
|
179
|
-
export declare const renderInteractionTagPrimary_unstable: (state: InteractionTagPrimaryState, contextValues: InteractionTagPrimaryContextValues) =>
|
|
180
|
+
export declare const renderInteractionTagPrimary_unstable: (state: InteractionTagPrimaryState, contextValues: InteractionTagPrimaryContextValues) => JSXElement;
|
|
180
181
|
|
|
181
182
|
/**
|
|
182
183
|
* Render the final JSX of InteractionTagSecondary
|
|
183
184
|
*/
|
|
184
|
-
export declare const renderInteractionTagSecondary_unstable: (state: InteractionTagSecondaryState) =>
|
|
185
|
+
export declare const renderInteractionTagSecondary_unstable: (state: InteractionTagSecondaryState) => JSXElement;
|
|
185
186
|
|
|
186
187
|
/**
|
|
187
188
|
* Render the final JSX of Tag
|
|
188
189
|
*/
|
|
189
|
-
export declare const renderTag_unstable: (state: TagState, contextValues: TagContextValues) =>
|
|
190
|
+
export declare const renderTag_unstable: (state: TagState, contextValues: TagContextValues) => JSXElement;
|
|
190
191
|
|
|
191
192
|
/**
|
|
192
193
|
* Render the final JSX of TagGroup
|
|
193
194
|
*/
|
|
194
|
-
export declare const renderTagGroup_unstable: (state: TagGroupState, contextValue: TagGroupContextValues) =>
|
|
195
|
+
export declare const renderTagGroup_unstable: (state: TagGroupState, contextValue: TagGroupContextValues) => JSXElement;
|
|
195
196
|
|
|
196
197
|
/**
|
|
197
198
|
* Tag component - a visual representation of an attribute.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InteractionTag/renderInteractionTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { InteractionTagState, InteractionTagSlots, InteractionTagContextValues } from './InteractionTag.types';\nimport { InteractionTagContextProvider } from '../../contexts/interactionTagContext';\n\n/**\n * Render the final JSX of InteractionTag\n */\nexport const renderInteractionTag_unstable = (\n state: InteractionTagState,\n contextValues: InteractionTagContextValues,\n) => {\n assertSlots<InteractionTagSlots>(state);\n\n return (\n <InteractionTagContextProvider value={contextValues.interactionTag}>\n <state.root />\n </InteractionTagContextProvider>\n );\n};\n"],"names":["assertSlots","InteractionTagContextProvider","renderInteractionTag_unstable","state","contextValues","value","interactionTag","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/InteractionTag/renderInteractionTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { InteractionTagState, InteractionTagSlots, InteractionTagContextValues } from './InteractionTag.types';\nimport { InteractionTagContextProvider } from '../../contexts/interactionTagContext';\n\n/**\n * Render the final JSX of InteractionTag\n */\nexport const renderInteractionTag_unstable = (\n state: InteractionTagState,\n contextValues: InteractionTagContextValues,\n): JSXElement => {\n assertSlots<InteractionTagSlots>(state);\n\n return (\n <InteractionTagContextProvider value={contextValues.interactionTag}>\n <state.root />\n </InteractionTagContextProvider>\n );\n};\n"],"names":["assertSlots","InteractionTagContextProvider","renderInteractionTag_unstable","state","contextValues","value","interactionTag","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,6BAA6B,QAAQ,uCAAuC;AAErF;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEAJ,YAAiCG;IAEjC,qBACE,KAACF;QAA8BI,OAAOD,cAAcE,cAAc;kBAChE,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InteractionTagPrimary/renderInteractionTagPrimary.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type {\n InteractionTagPrimaryState,\n InteractionTagPrimarySlots,\n InteractionTagPrimaryContextValues,\n} from './InteractionTagPrimary.types';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n\n/**\n * Render the final JSX of InteractionTagPrimary\n */\nexport const renderInteractionTagPrimary_unstable = (\n state: InteractionTagPrimaryState,\n contextValues: InteractionTagPrimaryContextValues,\n) => {\n assertSlots<InteractionTagPrimarySlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n {state.icon && <state.icon />}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderInteractionTagPrimary_unstable","state","contextValues","root","media","value","avatar","icon","primaryText","secondaryText"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/InteractionTagPrimary/renderInteractionTagPrimary.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type {\n InteractionTagPrimaryState,\n InteractionTagPrimarySlots,\n InteractionTagPrimaryContextValues,\n} from './InteractionTagPrimary.types';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n\n/**\n * Render the final JSX of InteractionTagPrimary\n */\nexport const renderInteractionTagPrimary_unstable = (\n state: InteractionTagPrimaryState,\n contextValues: InteractionTagPrimaryContextValues,\n): JSXElement => {\n assertSlots<InteractionTagPrimarySlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n {state.icon && <state.icon />}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderInteractionTagPrimary_unstable","state","contextValues","root","media","value","avatar","icon","primaryText","secondaryText"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAOxD,SAASC,qBAAqB,QAAQ,yBAAyB;AAE/D;;CAEC,GACD,OAAO,MAAMC,uCAAuC,CAClDC,OACAC;IAEAJ,YAAwCG;IAExC,qBACE,MAACA,MAAME,IAAI;;YACRF,MAAMG,KAAK,kBACV,KAACL;gBAAsBM,OAAOH,cAAcI,MAAM;0BAChD,cAAA,KAACL,MAAMG,KAAK;;YAGfH,MAAMM,IAAI,kBAAI,KAACN,MAAMM,IAAI;YACzBN,MAAMO,WAAW,kBAAI,KAACP,MAAMO,WAAW;YACvCP,MAAMQ,aAAa,kBAAI,KAACR,MAAMQ,aAAa;;;AAGlD,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InteractionTagSecondary/renderInteractionTagSecondary.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { InteractionTagSecondaryState, InteractionTagSecondarySlots } from './InteractionTagSecondary.types';\n\n/**\n * Render the final JSX of InteractionTagSecondary\n */\nexport const renderInteractionTagSecondary_unstable = (state: InteractionTagSecondaryState) => {\n assertSlots<InteractionTagSecondarySlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderInteractionTagSecondary_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/InteractionTagSecondary/renderInteractionTagSecondary.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { InteractionTagSecondaryState, InteractionTagSecondarySlots } from './InteractionTagSecondary.types';\n\n/**\n * Render the final JSX of InteractionTagSecondary\n */\nexport const renderInteractionTagSecondary_unstable = (state: InteractionTagSecondaryState): JSXElement => {\n assertSlots<InteractionTagSecondarySlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderInteractionTagSecondary_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,yCAAyC,CAACC;IACrDF,YAA0CE;IAE1C,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tag/renderTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagState, TagSlots, TagContextValues } from './Tag.types';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n\n/**\n * Render the final JSX of Tag\n */\nexport const renderTag_unstable = (state: TagState, contextValues: TagContextValues) => {\n assertSlots<TagSlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n\n {state.icon && <state.icon />}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.dismissIcon && state.dismissible && <state.dismissIcon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderTag_unstable","state","contextValues","root","media","value","avatar","icon","primaryText","secondaryText","dismissIcon","dismissible"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/Tag/renderTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TagState, TagSlots, TagContextValues } from './Tag.types';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n\n/**\n * Render the final JSX of Tag\n */\nexport const renderTag_unstable = (state: TagState, contextValues: TagContextValues): JSXElement => {\n assertSlots<TagSlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n\n {state.icon && <state.icon />}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.dismissIcon && state.dismissible && <state.dismissIcon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderTag_unstable","state","contextValues","root","media","value","avatar","icon","primaryText","secondaryText","dismissIcon","dismissible"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,qBAAqB,QAAQ,yBAAyB;AAE/D;;CAEC,GACD,OAAO,MAAMC,qBAAqB,CAACC,OAAiBC;IAClDJ,YAAsBG;IAEtB,qBACE,MAACA,MAAME,IAAI;;YACRF,MAAMG,KAAK,kBACV,KAACL;gBAAsBM,OAAOH,cAAcI,MAAM;0BAChD,cAAA,KAACL,MAAMG,KAAK;;YAIfH,MAAMM,IAAI,kBAAI,KAACN,MAAMM,IAAI;YACzBN,MAAMO,WAAW,kBAAI,KAACP,MAAMO,WAAW;YACvCP,MAAMQ,aAAa,kBAAI,KAACR,MAAMQ,aAAa;YAC3CR,MAAMS,WAAW,IAAIT,MAAMU,WAAW,kBAAI,KAACV,MAAMS,WAAW;;;AAGnE,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tag/useTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { DismissRegular } from '@fluentui/react-icons';\nimport type { TagProps, TagState } from './Tag.types';\nimport { Delete, Backspace } from '@fluentui/keyboard-keys';\nimport { useTagGroupContext_unstable } from '../../contexts/tagGroupContext';\n\nconst tagAvatarSizeMap = {\n medium: 28,\n small: 20,\n 'extra-small': 16,\n} as const;\n\nconst tagAvatarShapeMap = {\n rounded: 'square',\n circular: 'circular',\n} as const;\n\n/**\n * Create the state required to render Tag.\n *\n * The returned state can be modified with hooks such as useTagStyles_unstable,\n * before being passed to renderTag_unstable.\n *\n * @param props - props from this instance of Tag\n * @param ref - reference to root HTMLSpanElement or HTMLButtonElement of Tag\n */\nexport const useTag_unstable = (props: TagProps, ref: React.Ref<HTMLSpanElement | HTMLButtonElement>): TagState => {\n const {\n handleTagDismiss,\n size: contextSize,\n disabled: contextDisabled,\n appearance: contextAppearance,\n dismissible: contextDismissible,\n role: tagGroupRole,\n } = useTagGroupContext_unstable();\n\n const id = useId('fui-Tag', props.id);\n\n const {\n appearance = contextAppearance ?? 'filled',\n disabled = false,\n dismissible = contextDismissible ?? false,\n selected,\n shape = 'rounded',\n size = contextSize,\n value = id,\n } = props;\n\n const dismissOnClick = useEventCallback((ev: React.MouseEvent<HTMLButtonElement>) => {\n props.onClick?.(ev);\n if (!ev.defaultPrevented) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const dismissOnKeyDown = useEventCallback((ev: React.KeyboardEvent<HTMLButtonElement>) => {\n props?.onKeyDown?.(ev);\n if (!ev.defaultPrevented && (ev.key === Delete || ev.key === Backspace)) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const elementType = dismissible ? 'button' : 'span';\n const selectedProp = tagGroupRole === 'listbox' ? 'aria-selected' : 'aria-pressed';\n const selectable = typeof selected === 'boolean' || tagGroupRole === 'listbox';\n\n return {\n appearance,\n avatarShape: tagAvatarShapeMap[shape],\n avatarSize: tagAvatarSizeMap[size],\n disabled: contextDisabled ? true : disabled,\n dismissible,\n selected: !!selected,\n shape,\n size,\n\n components: {\n root: elementType,\n media: 'span',\n icon: 'span',\n primaryText: 'span',\n secondaryText: 'span',\n dismissIcon: 'span',\n },\n\n root: slot.always(\n getIntrinsicElementProps(elementType, {\n ref,\n role: tagGroupRole === 'listbox' ? 'option' : undefined,\n [selectedProp]: selectable ? selected : undefined,\n ...props,\n disabled: contextDisabled ? true : disabled,\n id,\n ...(dismissible && { onClick: dismissOnClick, onKeyDown: dismissOnKeyDown }),\n }),\n { elementType },\n ),\n\n media: slot.optional(props.media, { elementType: 'span' }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n primaryText: slot.optional(props.primaryText, {\n renderByDefault: true,\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, { elementType: 'span' }),\n dismissIcon: slot.optional(props.dismissIcon, {\n renderByDefault: dismissible,\n defaultProps: {\n children: <DismissRegular />,\n },\n elementType: 'span',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","useId","slot","DismissRegular","Delete","Backspace","useTagGroupContext_unstable","tagAvatarSizeMap","medium","small","tagAvatarShapeMap","rounded","circular","useTag_unstable","props","ref","handleTagDismiss","size","contextSize","disabled","contextDisabled","appearance","contextAppearance","dismissible","contextDismissible","role","tagGroupRole","id","selected","shape","value","dismissOnClick","ev","onClick","defaultPrevented","dismissOnKeyDown","onKeyDown","key","elementType","selectedProp","selectable","avatarShape","avatarSize","components","root","media","icon","primaryText","secondaryText","dismissIcon","always","undefined","
|
|
1
|
+
{"version":3,"sources":["../src/components/Tag/useTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { DismissRegular } from '@fluentui/react-icons';\nimport type { TagProps, TagState } from './Tag.types';\nimport { Delete, Backspace } from '@fluentui/keyboard-keys';\nimport { useTagGroupContext_unstable } from '../../contexts/tagGroupContext';\n\nconst tagAvatarSizeMap = {\n medium: 28,\n small: 20,\n 'extra-small': 16,\n} as const;\n\nconst tagAvatarShapeMap = {\n rounded: 'square',\n circular: 'circular',\n} as const;\n\n/**\n * Create the state required to render Tag.\n *\n * The returned state can be modified with hooks such as useTagStyles_unstable,\n * before being passed to renderTag_unstable.\n *\n * @param props - props from this instance of Tag\n * @param ref - reference to root HTMLSpanElement or HTMLButtonElement of Tag\n */\nexport const useTag_unstable = (props: TagProps, ref: React.Ref<HTMLSpanElement | HTMLButtonElement>): TagState => {\n const {\n handleTagDismiss,\n size: contextSize,\n disabled: contextDisabled,\n appearance: contextAppearance,\n dismissible: contextDismissible,\n role: tagGroupRole,\n } = useTagGroupContext_unstable();\n\n const id = useId('fui-Tag', props.id);\n\n const {\n appearance = contextAppearance ?? 'filled',\n disabled = false,\n dismissible = contextDismissible ?? false,\n selected,\n shape = 'rounded',\n size = contextSize,\n value = id,\n } = props;\n\n const dismissOnClick = useEventCallback((ev: React.MouseEvent<HTMLButtonElement>) => {\n props.onClick?.(ev);\n if (!ev.defaultPrevented) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const dismissOnKeyDown = useEventCallback((ev: React.KeyboardEvent<HTMLButtonElement>) => {\n props?.onKeyDown?.(ev);\n if (!ev.defaultPrevented && (ev.key === Delete || ev.key === Backspace)) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const elementType = dismissible ? 'button' : 'span';\n const selectedProp = tagGroupRole === 'listbox' ? 'aria-selected' : 'aria-pressed';\n const selectable = typeof selected === 'boolean' || tagGroupRole === 'listbox';\n\n return {\n appearance,\n avatarShape: tagAvatarShapeMap[shape],\n avatarSize: tagAvatarSizeMap[size],\n disabled: contextDisabled ? true : disabled,\n dismissible,\n selected: !!selected,\n shape,\n size,\n\n components: {\n root: elementType,\n media: 'span',\n icon: 'span',\n primaryText: 'span',\n secondaryText: 'span',\n dismissIcon: 'span',\n },\n\n root: slot.always(\n getIntrinsicElementProps(elementType, {\n ref,\n role: tagGroupRole === 'listbox' ? 'option' : undefined,\n [selectedProp]: selectable ? selected : undefined,\n ...props,\n disabled: contextDisabled ? true : disabled,\n id,\n ...(dismissible && { onClick: dismissOnClick, onKeyDown: dismissOnKeyDown }),\n }),\n {\n defaultProps: {\n type: elementType === 'button' ? 'button' : undefined,\n },\n elementType,\n },\n ),\n\n media: slot.optional(props.media, { elementType: 'span' }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n primaryText: slot.optional(props.primaryText, {\n renderByDefault: true,\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, { elementType: 'span' }),\n dismissIcon: slot.optional(props.dismissIcon, {\n renderByDefault: dismissible,\n defaultProps: {\n children: <DismissRegular />,\n },\n elementType: 'span',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","useId","slot","DismissRegular","Delete","Backspace","useTagGroupContext_unstable","tagAvatarSizeMap","medium","small","tagAvatarShapeMap","rounded","circular","useTag_unstable","props","ref","handleTagDismiss","size","contextSize","disabled","contextDisabled","appearance","contextAppearance","dismissible","contextDismissible","role","tagGroupRole","id","selected","shape","value","dismissOnClick","ev","onClick","defaultPrevented","dismissOnKeyDown","onKeyDown","key","elementType","selectedProp","selectable","avatarShape","avatarSize","components","root","media","icon","primaryText","secondaryText","dismissIcon","always","undefined","defaultProps","type","optional","renderByDefault","children"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagGroup/renderTagGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagGroupState, TagGroupSlots, TagGroupContextValues } from './TagGroup.types';\nimport { TagGroupContextProvider } from '../../contexts/tagGroupContext';\n\n/**\n * Render the final JSX of TagGroup\n */\nexport const renderTagGroup_unstable = (state: TagGroupState, contextValue: TagGroupContextValues) => {\n assertSlots<TagGroupSlots>(state);\n\n return (\n <TagGroupContextProvider value={contextValue.tagGroup}>\n <state.root />\n </TagGroupContextProvider>\n );\n};\n"],"names":["assertSlots","TagGroupContextProvider","renderTagGroup_unstable","state","contextValue","value","tagGroup","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/TagGroup/renderTagGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TagGroupState, TagGroupSlots, TagGroupContextValues } from './TagGroup.types';\nimport { TagGroupContextProvider } from '../../contexts/tagGroupContext';\n\n/**\n * Render the final JSX of TagGroup\n */\nexport const renderTagGroup_unstable = (state: TagGroupState, contextValue: TagGroupContextValues): JSXElement => {\n assertSlots<TagGroupSlots>(state);\n\n return (\n <TagGroupContextProvider value={contextValue.tagGroup}>\n <state.root />\n </TagGroupContextProvider>\n );\n};\n"],"names":["assertSlots","TagGroupContextProvider","renderTagGroup_unstable","state","contextValue","value","tagGroup","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAsBC;IAC5DJ,YAA2BG;IAE3B,qBACE,KAACF;QAAwBI,OAAOD,aAAaE,QAAQ;kBACnD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/interactionTagContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { InteractionTagState } from '../components/InteractionTag/index';\nimport type { TagDismissHandler, TagSelectHandler } from '../utils/types';\n\nexport const InteractionTagContext = React.createContext<InteractionTagContextValue | undefined>(undefined);\n\nconst interactionTagContextDefaultValue: InteractionTagContextValue = {\n appearance: 'filled',\n disabled: false,\n handleTagDismiss: () => ({}),\n handleTagSelect: () => ({}),\n interactionTagPrimaryId: '',\n selected: false,\n selectedValues: [],\n shape: 'rounded',\n size: 'medium',\n value: '',\n};\n\n/**\n * Context shared between InteractionTag and its children components\n */\nexport type InteractionTagContextValue<Value = string> = Required<\n Pick<InteractionTagState, 'appearance' | 'disabled' | 'selected' | 'selectedValues' | 'shape' | 'size'> & {\n handleTagDismiss: TagDismissHandler<Value>;\n interactionTagPrimaryId: string;\n value?: Value;\n }\n> & {\n handleTagSelect?: TagSelectHandler<Value>;\n};\n\nexport const InteractionTagContextProvider = InteractionTagContext.Provider;\n\nexport const useInteractionTagContext_unstable = () =>\n React.useContext(InteractionTagContext) ?? interactionTagContextDefaultValue;\n"],"names":["React","InteractionTagContext","createContext","undefined","interactionTagContextDefaultValue","appearance","disabled","handleTagDismiss","handleTagSelect","interactionTagPrimaryId","selected","selectedValues","shape","size","value","InteractionTagContextProvider","Provider","useInteractionTagContext_unstable","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,OAAO,MAAMC,sCAAwBD,MAAME,aAAa,CAAyCC,WAAW;AAE5G,MAAMC,oCAAgE;IACpEC,YAAY;IACZC,UAAU;IACVC,kBAAkB,IAAO,CAAA,CAAC,CAAA;IAC1BC,iBAAiB,IAAO,CAAA,CAAC,CAAA;IACzBC,yBAAyB;IACzBC,UAAU;IACVC,gBAAgB,EAAE;IAClBC,OAAO;IACPC,MAAM;IACNC,OAAO;AACT;AAeA,OAAO,MAAMC,gCAAgCd,sBAAsBe,QAAQ,CAAC;AAE5E,OAAO,MAAMC,oCAAoC;QAC/CjB;WAAAA,CAAAA,oBAAAA,MAAMkB,UAAU,CAACjB,oCAAjBD,+BAAAA,oBAA2CI;EAAkC"}
|
|
1
|
+
{"version":3,"sources":["../src/contexts/interactionTagContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { InteractionTagState } from '../components/InteractionTag/index';\nimport type { TagDismissHandler, TagSelectHandler } from '../utils/types';\n\nexport const InteractionTagContext = React.createContext<InteractionTagContextValue | undefined>(undefined);\n\nconst interactionTagContextDefaultValue: InteractionTagContextValue = {\n appearance: 'filled',\n disabled: false,\n handleTagDismiss: () => ({}),\n handleTagSelect: () => ({}),\n interactionTagPrimaryId: '',\n selected: false,\n selectedValues: [],\n shape: 'rounded',\n size: 'medium',\n value: '',\n};\n\n/**\n * Context shared between InteractionTag and its children components\n */\nexport type InteractionTagContextValue<Value = string> = Required<\n Pick<InteractionTagState, 'appearance' | 'disabled' | 'selected' | 'selectedValues' | 'shape' | 'size'> & {\n handleTagDismiss: TagDismissHandler<Value>;\n interactionTagPrimaryId: string;\n value?: Value;\n }\n> & {\n handleTagSelect?: TagSelectHandler<Value>;\n};\n\nexport const InteractionTagContextProvider = InteractionTagContext.Provider;\n\nexport const useInteractionTagContext_unstable = (): InteractionTagContextValue =>\n React.useContext(InteractionTagContext) ?? interactionTagContextDefaultValue;\n"],"names":["React","InteractionTagContext","createContext","undefined","interactionTagContextDefaultValue","appearance","disabled","handleTagDismiss","handleTagSelect","interactionTagPrimaryId","selected","selectedValues","shape","size","value","InteractionTagContextProvider","Provider","useInteractionTagContext_unstable","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,OAAO,MAAMC,sCAAwBD,MAAME,aAAa,CAAyCC,WAAW;AAE5G,MAAMC,oCAAgE;IACpEC,YAAY;IACZC,UAAU;IACVC,kBAAkB,IAAO,CAAA,CAAC,CAAA;IAC1BC,iBAAiB,IAAO,CAAA,CAAC,CAAA;IACzBC,yBAAyB;IACzBC,UAAU;IACVC,gBAAgB,EAAE;IAClBC,OAAO;IACPC,MAAM;IACNC,OAAO;AACT;AAeA,OAAO,MAAMC,gCAAgCd,sBAAsBe,QAAQ,CAAC;AAE5E,OAAO,MAAMC,oCAAoC;QAC/CjB;WAAAA,CAAAA,oBAAAA,MAAMkB,UAAU,CAACjB,oCAAjBD,+BAAAA,oBAA2CI;EAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/tagGroupContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TagGroupState } from '../components/TagGroup/index';\n\nexport const TagGroupContext = React.createContext<TagGroupContextValue | undefined>(undefined);\n\nconst tagGroupContextDefaultValue: TagGroupContextValue = {\n handleTagDismiss: () => ({}),\n size: 'medium',\n role: 'toolbar',\n handleTagSelect: undefined,\n};\n\n/**\n * Context shared between TagGroup and its children components\n */\nexport type TagGroupContextValue = Required<Pick<TagGroupState, 'handleTagDismiss' | 'size'>> &\n Partial<\n Pick<TagGroupState, 'disabled' | 'appearance' | 'dismissible' | 'handleTagSelect' | 'role' | 'selectedValues'>\n >;\n\nexport const TagGroupContextProvider = TagGroupContext.Provider;\n\nexport const useTagGroupContext_unstable = ()
|
|
1
|
+
{"version":3,"sources":["../src/contexts/tagGroupContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TagGroupState } from '../components/TagGroup/index';\n\nexport const TagGroupContext = React.createContext<TagGroupContextValue | undefined>(undefined);\n\nconst tagGroupContextDefaultValue: TagGroupContextValue = {\n handleTagDismiss: () => ({}),\n size: 'medium',\n role: 'toolbar',\n handleTagSelect: undefined,\n};\n\n/**\n * Context shared between TagGroup and its children components\n */\nexport type TagGroupContextValue = Required<Pick<TagGroupState, 'handleTagDismiss' | 'size'>> &\n Partial<\n Pick<TagGroupState, 'disabled' | 'appearance' | 'dismissible' | 'handleTagSelect' | 'role' | 'selectedValues'>\n >;\n\nexport const TagGroupContextProvider = TagGroupContext.Provider;\n\nexport const useTagGroupContext_unstable = (): TagGroupContextValue =>\n React.useContext(TagGroupContext) ?? tagGroupContextDefaultValue;\n"],"names":["React","TagGroupContext","createContext","undefined","tagGroupContextDefaultValue","handleTagDismiss","size","role","handleTagSelect","TagGroupContextProvider","Provider","useTagGroupContext_unstable","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,MAAMC,gCAAkBD,MAAME,aAAa,CAAmCC,WAAW;AAEhG,MAAMC,8BAAoD;IACxDC,kBAAkB,IAAO,CAAA,CAAC,CAAA;IAC1BC,MAAM;IACNC,MAAM;IACNC,iBAAiBL;AACnB;AAUA,OAAO,MAAMM,0BAA0BR,gBAAgBS,QAAQ,CAAC;AAEhE,OAAO,MAAMC,8BAA8B;QACzCX;WAAAA,CAAAA,oBAAAA,MAAMY,UAAU,CAACX,8BAAjBD,+BAAAA,oBAAqCI;EAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InteractionTag/renderInteractionTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { InteractionTagState, InteractionTagSlots, InteractionTagContextValues } from './InteractionTag.types';\nimport { InteractionTagContextProvider } from '../../contexts/interactionTagContext';\n\n/**\n * Render the final JSX of InteractionTag\n */\nexport const renderInteractionTag_unstable = (\n state: InteractionTagState,\n contextValues: InteractionTagContextValues,\n) => {\n assertSlots<InteractionTagSlots>(state);\n\n return (\n <InteractionTagContextProvider value={contextValues.interactionTag}>\n <state.root />\n </InteractionTagContextProvider>\n );\n};\n"],"names":["assertSlots","InteractionTagContextProvider","renderInteractionTag_unstable","state","contextValues","value","interactionTag","root"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../src/components/InteractionTag/renderInteractionTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { InteractionTagState, InteractionTagSlots, InteractionTagContextValues } from './InteractionTag.types';\nimport { InteractionTagContextProvider } from '../../contexts/interactionTagContext';\n\n/**\n * Render the final JSX of InteractionTag\n */\nexport const renderInteractionTag_unstable = (\n state: InteractionTagState,\n contextValues: InteractionTagContextValues,\n): JSXElement => {\n assertSlots<InteractionTagSlots>(state);\n\n return (\n <InteractionTagContextProvider value={contextValues.interactionTag}>\n <state.root />\n </InteractionTagContextProvider>\n );\n};\n"],"names":["assertSlots","InteractionTagContextProvider","renderInteractionTag_unstable","state","contextValues","value","interactionTag","root"],"mappings":";;;;+BAWaE;;;;;;4BAVb,gDAAiD;gCAErB,4BAA4B;uCAGV,uCAAuC;AAK9E,sCAAsC,CAC3CC,OACAC;QAEAJ,2BAAAA,EAAiCG;IAEjC,OAAA,WAAA,OACE,eAAA,EAACF,oDAAAA,EAAAA;QAA8BI,OAAOD,cAAcE,cAAc;kBAChE,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InteractionTagPrimary/renderInteractionTagPrimary.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type {\n InteractionTagPrimaryState,\n InteractionTagPrimarySlots,\n InteractionTagPrimaryContextValues,\n} from './InteractionTagPrimary.types';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n\n/**\n * Render the final JSX of InteractionTagPrimary\n */\nexport const renderInteractionTagPrimary_unstable = (\n state: InteractionTagPrimaryState,\n contextValues: InteractionTagPrimaryContextValues,\n) => {\n assertSlots<InteractionTagPrimarySlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n {state.icon && <state.icon />}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderInteractionTagPrimary_unstable","state","contextValues","root","media","value","avatar","icon","primaryText","secondaryText"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../src/components/InteractionTagPrimary/renderInteractionTagPrimary.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type {\n InteractionTagPrimaryState,\n InteractionTagPrimarySlots,\n InteractionTagPrimaryContextValues,\n} from './InteractionTagPrimary.types';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n\n/**\n * Render the final JSX of InteractionTagPrimary\n */\nexport const renderInteractionTagPrimary_unstable = (\n state: InteractionTagPrimaryState,\n contextValues: InteractionTagPrimaryContextValues,\n): JSXElement => {\n assertSlots<InteractionTagPrimarySlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n {state.icon && <state.icon />}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderInteractionTagPrimary_unstable","state","contextValues","root","media","value","avatar","icon","primaryText","secondaryText"],"mappings":";;;;+BAeaE;;;;;;4BAdb,iCAAiD;gCAErB,4BAA4B;6BAOlB,yBAAyB;AAKxD,6CAA6C,CAClDC,OACAC;QAEAJ,2BAAAA,EAAwCG;IAExC,OAAA,WAAA,OACE,gBAAA,EAACA,MAAME,IAAI,EAAA;;YACRF,MAAMG,KAAK,IAAA,WAAA,OACV,eAAA,EAACL,kCAAAA,EAAAA;gBAAsBM,OAAOH,cAAcI,MAAM;0BAChD,WAAA,OAAA,eAAA,EAACL,MAAMG,KAAK,EAAA,CAAA;;YAGfH,MAAMM,IAAI,IAAA,WAAA,OAAI,eAAA,EAACN,MAAMM,IAAI,EAAA,CAAA;YACzBN,MAAMO,WAAW,IAAA,WAAA,OAAI,eAAA,EAACP,MAAMO,WAAW,EAAA,CAAA;YACvCP,MAAMQ,aAAa,IAAA,WAAA,OAAI,eAAA,EAACR,MAAMQ,aAAa,EAAA,CAAA;;;AAGlD,EAAE"}
|
package/lib-commonjs/components/InteractionTagSecondary/renderInteractionTagSecondary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InteractionTagSecondary/renderInteractionTagSecondary.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { InteractionTagSecondaryState, InteractionTagSecondarySlots } from './InteractionTagSecondary.types';\n\n/**\n * Render the final JSX of InteractionTagSecondary\n */\nexport const renderInteractionTagSecondary_unstable = (state: InteractionTagSecondaryState) => {\n assertSlots<InteractionTagSecondarySlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderInteractionTagSecondary_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCACrB,4BAA4B;
|
|
1
|
+
{"version":3,"sources":["../src/components/InteractionTagSecondary/renderInteractionTagSecondary.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { InteractionTagSecondaryState, InteractionTagSecondarySlots } from './InteractionTagSecondary.types';\n\n/**\n * Render the final JSX of InteractionTagSecondary\n */\nexport const renderInteractionTagSecondary_unstable = (state: InteractionTagSecondaryState): JSXElement => {\n assertSlots<InteractionTagSecondarySlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderInteractionTagSecondary_unstable","state","root"],"mappings":";;;;;;;;;;4BACA,gDAAiD;gCACrB,4BAA4B;AAOjD,MAAMC,yCAAyC,CAACC;QACrDF,2BAAAA,EAA0CE;IAE1C,OAAA,WAAA,OAAO,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;AACpB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tag/renderTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagState, TagSlots, TagContextValues } from './Tag.types';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n\n/**\n * Render the final JSX of Tag\n */\nexport const renderTag_unstable = (state: TagState, contextValues: TagContextValues) => {\n assertSlots<TagSlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n\n {state.icon && <state.icon />}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.dismissIcon && state.dismissible && <state.dismissIcon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderTag_unstable","state","contextValues","root","media","value","avatar","icon","primaryText","secondaryText","dismissIcon","dismissible"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../src/components/Tag/renderTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TagState, TagSlots, TagContextValues } from './Tag.types';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n\n/**\n * Render the final JSX of Tag\n */\nexport const renderTag_unstable = (state: TagState, contextValues: TagContextValues): JSXElement => {\n assertSlots<TagSlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n\n {state.icon && <state.icon />}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.dismissIcon && state.dismissible && <state.dismissIcon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","AvatarContextProvider","renderTag_unstable","state","contextValues","root","media","value","avatar","icon","primaryText","secondaryText","dismissIcon","dismissible"],"mappings":";;;;+BAWaE;;;;;;4BAVb,iCAAiD;gCAErB,4BAA4B;6BAGlB,yBAAyB;AAKxD,2BAA2B,CAACC,OAAiBC;QAClDJ,2BAAAA,EAAsBG;IAEtB,OAAA,WAAA,OACE,gBAAA,EAACA,MAAME,IAAI,EAAA;;YACRF,MAAMG,KAAK,IAAA,WAAA,OACV,eAAA,EAACL,kCAAAA,EAAAA;gBAAsBM,OAAOH,cAAcI,MAAM;0BAChD,WAAA,OAAA,eAAA,EAACL,MAAMG,KAAK,EAAA,CAAA;;YAIfH,MAAMM,IAAI,IAAA,WAAA,OAAI,eAAA,EAACN,MAAMM,IAAI,EAAA,CAAA;YACzBN,MAAMO,WAAW,IAAA,WAAA,OAAI,eAAA,EAACP,MAAMO,WAAW,EAAA,CAAA;YACvCP,MAAMQ,aAAa,IAAA,WAAA,OAAI,eAAA,EAACR,MAAMQ,aAAa,EAAA,CAAA;YAC3CR,MAAMS,WAAW,IAAIT,MAAMU,WAAW,IAAA,WAAA,OAAI,eAAA,EAACV,MAAMS,WAAW,EAAA,CAAA;;;AAGnE,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tag/useTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { DismissRegular } from '@fluentui/react-icons';\nimport type { TagProps, TagState } from './Tag.types';\nimport { Delete, Backspace } from '@fluentui/keyboard-keys';\nimport { useTagGroupContext_unstable } from '../../contexts/tagGroupContext';\n\nconst tagAvatarSizeMap = {\n medium: 28,\n small: 20,\n 'extra-small': 16,\n} as const;\n\nconst tagAvatarShapeMap = {\n rounded: 'square',\n circular: 'circular',\n} as const;\n\n/**\n * Create the state required to render Tag.\n *\n * The returned state can be modified with hooks such as useTagStyles_unstable,\n * before being passed to renderTag_unstable.\n *\n * @param props - props from this instance of Tag\n * @param ref - reference to root HTMLSpanElement or HTMLButtonElement of Tag\n */\nexport const useTag_unstable = (props: TagProps, ref: React.Ref<HTMLSpanElement | HTMLButtonElement>): TagState => {\n const {\n handleTagDismiss,\n size: contextSize,\n disabled: contextDisabled,\n appearance: contextAppearance,\n dismissible: contextDismissible,\n role: tagGroupRole,\n } = useTagGroupContext_unstable();\n\n const id = useId('fui-Tag', props.id);\n\n const {\n appearance = contextAppearance ?? 'filled',\n disabled = false,\n dismissible = contextDismissible ?? false,\n selected,\n shape = 'rounded',\n size = contextSize,\n value = id,\n } = props;\n\n const dismissOnClick = useEventCallback((ev: React.MouseEvent<HTMLButtonElement>) => {\n props.onClick?.(ev);\n if (!ev.defaultPrevented) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const dismissOnKeyDown = useEventCallback((ev: React.KeyboardEvent<HTMLButtonElement>) => {\n props?.onKeyDown?.(ev);\n if (!ev.defaultPrevented && (ev.key === Delete || ev.key === Backspace)) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const elementType = dismissible ? 'button' : 'span';\n const selectedProp = tagGroupRole === 'listbox' ? 'aria-selected' : 'aria-pressed';\n const selectable = typeof selected === 'boolean' || tagGroupRole === 'listbox';\n\n return {\n appearance,\n avatarShape: tagAvatarShapeMap[shape],\n avatarSize: tagAvatarSizeMap[size],\n disabled: contextDisabled ? true : disabled,\n dismissible,\n selected: !!selected,\n shape,\n size,\n\n components: {\n root: elementType,\n media: 'span',\n icon: 'span',\n primaryText: 'span',\n secondaryText: 'span',\n dismissIcon: 'span',\n },\n\n root: slot.always(\n getIntrinsicElementProps(elementType, {\n ref,\n role: tagGroupRole === 'listbox' ? 'option' : undefined,\n [selectedProp]: selectable ? selected : undefined,\n ...props,\n disabled: contextDisabled ? true : disabled,\n id,\n ...(dismissible && { onClick: dismissOnClick, onKeyDown: dismissOnKeyDown }),\n }),\n { elementType },\n ),\n\n media: slot.optional(props.media, { elementType: 'span' }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n primaryText: slot.optional(props.primaryText, {\n renderByDefault: true,\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, { elementType: 'span' }),\n dismissIcon: slot.optional(props.dismissIcon, {\n renderByDefault: dismissible,\n defaultProps: {\n children: <DismissRegular />,\n },\n elementType: 'span',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","useId","slot","DismissRegular","Delete","Backspace","useTagGroupContext_unstable","tagAvatarSizeMap","medium","small","tagAvatarShapeMap","rounded","circular","useTag_unstable","props","ref","handleTagDismiss","size","contextSize","disabled","contextDisabled","appearance","contextAppearance","dismissible","contextDismissible","role","tagGroupRole","id","selected","shape","value","dismissOnClick","ev","onClick","defaultPrevented","dismissOnKeyDown","onKeyDown","key","elementType","selectedProp","selectable","avatarShape","avatarSize","components","root","media","icon","primaryText","secondaryText","dismissIcon","always","undefined","
|
|
1
|
+
{"version":3,"sources":["../src/components/Tag/useTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { DismissRegular } from '@fluentui/react-icons';\nimport type { TagProps, TagState } from './Tag.types';\nimport { Delete, Backspace } from '@fluentui/keyboard-keys';\nimport { useTagGroupContext_unstable } from '../../contexts/tagGroupContext';\n\nconst tagAvatarSizeMap = {\n medium: 28,\n small: 20,\n 'extra-small': 16,\n} as const;\n\nconst tagAvatarShapeMap = {\n rounded: 'square',\n circular: 'circular',\n} as const;\n\n/**\n * Create the state required to render Tag.\n *\n * The returned state can be modified with hooks such as useTagStyles_unstable,\n * before being passed to renderTag_unstable.\n *\n * @param props - props from this instance of Tag\n * @param ref - reference to root HTMLSpanElement or HTMLButtonElement of Tag\n */\nexport const useTag_unstable = (props: TagProps, ref: React.Ref<HTMLSpanElement | HTMLButtonElement>): TagState => {\n const {\n handleTagDismiss,\n size: contextSize,\n disabled: contextDisabled,\n appearance: contextAppearance,\n dismissible: contextDismissible,\n role: tagGroupRole,\n } = useTagGroupContext_unstable();\n\n const id = useId('fui-Tag', props.id);\n\n const {\n appearance = contextAppearance ?? 'filled',\n disabled = false,\n dismissible = contextDismissible ?? false,\n selected,\n shape = 'rounded',\n size = contextSize,\n value = id,\n } = props;\n\n const dismissOnClick = useEventCallback((ev: React.MouseEvent<HTMLButtonElement>) => {\n props.onClick?.(ev);\n if (!ev.defaultPrevented) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const dismissOnKeyDown = useEventCallback((ev: React.KeyboardEvent<HTMLButtonElement>) => {\n props?.onKeyDown?.(ev);\n if (!ev.defaultPrevented && (ev.key === Delete || ev.key === Backspace)) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const elementType = dismissible ? 'button' : 'span';\n const selectedProp = tagGroupRole === 'listbox' ? 'aria-selected' : 'aria-pressed';\n const selectable = typeof selected === 'boolean' || tagGroupRole === 'listbox';\n\n return {\n appearance,\n avatarShape: tagAvatarShapeMap[shape],\n avatarSize: tagAvatarSizeMap[size],\n disabled: contextDisabled ? true : disabled,\n dismissible,\n selected: !!selected,\n shape,\n size,\n\n components: {\n root: elementType,\n media: 'span',\n icon: 'span',\n primaryText: 'span',\n secondaryText: 'span',\n dismissIcon: 'span',\n },\n\n root: slot.always(\n getIntrinsicElementProps(elementType, {\n ref,\n role: tagGroupRole === 'listbox' ? 'option' : undefined,\n [selectedProp]: selectable ? selected : undefined,\n ...props,\n disabled: contextDisabled ? true : disabled,\n id,\n ...(dismissible && { onClick: dismissOnClick, onKeyDown: dismissOnKeyDown }),\n }),\n {\n defaultProps: {\n type: elementType === 'button' ? 'button' : undefined,\n },\n elementType,\n },\n ),\n\n media: slot.optional(props.media, { elementType: 'span' }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n primaryText: slot.optional(props.primaryText, {\n renderByDefault: true,\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, { elementType: 'span' }),\n dismissIcon: slot.optional(props.dismissIcon, {\n renderByDefault: dismissible,\n defaultProps: {\n children: <DismissRegular />,\n },\n elementType: 'span',\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","useId","slot","DismissRegular","Delete","Backspace","useTagGroupContext_unstable","tagAvatarSizeMap","medium","small","tagAvatarShapeMap","rounded","circular","useTag_unstable","props","ref","handleTagDismiss","size","contextSize","disabled","contextDisabled","appearance","contextAppearance","dismissible","contextDismissible","role","tagGroupRole","id","selected","shape","value","dismissOnClick","ev","onClick","defaultPrevented","dismissOnKeyDown","onKeyDown","key","elementType","selectedProp","selectable","avatarShape","avatarSize","components","root","media","icon","primaryText","secondaryText","dismissIcon","always","undefined","defaultProps","type","optional","renderByDefault","children"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TagGroup/renderTagGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagGroupState, TagGroupSlots, TagGroupContextValues } from './TagGroup.types';\nimport { TagGroupContextProvider } from '../../contexts/tagGroupContext';\n\n/**\n * Render the final JSX of TagGroup\n */\nexport const renderTagGroup_unstable = (state: TagGroupState, contextValue: TagGroupContextValues) => {\n assertSlots<TagGroupSlots>(state);\n\n return (\n <TagGroupContextProvider value={contextValue.tagGroup}>\n <state.root />\n </TagGroupContextProvider>\n );\n};\n"],"names":["assertSlots","TagGroupContextProvider","renderTagGroup_unstable","state","contextValue","value","tagGroup","root"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../src/components/TagGroup/renderTagGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TagGroupState, TagGroupSlots, TagGroupContextValues } from './TagGroup.types';\nimport { TagGroupContextProvider } from '../../contexts/tagGroupContext';\n\n/**\n * Render the final JSX of TagGroup\n */\nexport const renderTagGroup_unstable = (state: TagGroupState, contextValue: TagGroupContextValues): JSXElement => {\n assertSlots<TagGroupSlots>(state);\n\n return (\n <TagGroupContextProvider value={contextValue.tagGroup}>\n <state.root />\n </TagGroupContextProvider>\n );\n};\n"],"names":["assertSlots","TagGroupContextProvider","renderTagGroup_unstable","state","contextValue","value","tagGroup","root"],"mappings":";;;;+BAWaE;;;;;;4BAVb,gDAAiD;gCAErB,4BAA4B;iCAGhB,iCAAiC;AAKlE,gCAAgC,CAACC,OAAsBC;QAC5DJ,2BAAAA,EAA2BG;IAE3B,OAAA,WAAA,OACE,eAAA,EAACF,wCAAAA,EAAAA;QAAwBI,OAAOD,aAAaE,QAAQ;kBACnD,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/interactionTagContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { InteractionTagState } from '../components/InteractionTag/index';\nimport type { TagDismissHandler, TagSelectHandler } from '../utils/types';\n\nexport const InteractionTagContext = React.createContext<InteractionTagContextValue | undefined>(undefined);\n\nconst interactionTagContextDefaultValue: InteractionTagContextValue = {\n appearance: 'filled',\n disabled: false,\n handleTagDismiss: () => ({}),\n handleTagSelect: () => ({}),\n interactionTagPrimaryId: '',\n selected: false,\n selectedValues: [],\n shape: 'rounded',\n size: 'medium',\n value: '',\n};\n\n/**\n * Context shared between InteractionTag and its children components\n */\nexport type InteractionTagContextValue<Value = string> = Required<\n Pick<InteractionTagState, 'appearance' | 'disabled' | 'selected' | 'selectedValues' | 'shape' | 'size'> & {\n handleTagDismiss: TagDismissHandler<Value>;\n interactionTagPrimaryId: string;\n value?: Value;\n }\n> & {\n handleTagSelect?: TagSelectHandler<Value>;\n};\n\nexport const InteractionTagContextProvider = InteractionTagContext.Provider;\n\nexport const useInteractionTagContext_unstable = () =>\n React.useContext(InteractionTagContext) ?? interactionTagContextDefaultValue;\n"],"names":["React","InteractionTagContext","createContext","undefined","interactionTagContextDefaultValue","appearance","disabled","handleTagDismiss","handleTagSelect","interactionTagPrimaryId","selected","selectedValues","shape","size","value","InteractionTagContextProvider","Provider","useInteractionTagContext_unstable","useContext"],"mappings":";;;;;;;;;;;yBAIaC;;;iCA4BAc;;;qCAEAE;;;;;iEAlCU,QAAQ;AAIxB,MAAMhB,wBAAAA,WAAAA,GAAwBD,OAAME,aAAa,CAAyCC,WAAW;AAE5G,MAAMC,oCAAgE;IACpEC,YAAY;IACZC,UAAU;IACVC,kBAAkB,IAAO,GAAC,CAAA;IAC1BC,iBAAiB,IAAO,CAAA,EAAC,CAAA;IACzBC,yBAAyB;IACzBC,UAAU;IACVC,gBAAgB,EAAE;IAClBC,OAAO;IACPC,MAAM;IACNC,OAAO;AACT;AAeO,MAAMC,gCAAgCd,sBAAsBe,QAAQ,CAAC;AAErE,MAAMC,oCAAoC;QAC/CjB;WAAAA,CAAAA,oBAAAA,OAAMkB,UAAU,CAACjB,sBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAA2CI;EAAkC"}
|
|
1
|
+
{"version":3,"sources":["../src/contexts/interactionTagContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { InteractionTagState } from '../components/InteractionTag/index';\nimport type { TagDismissHandler, TagSelectHandler } from '../utils/types';\n\nexport const InteractionTagContext = React.createContext<InteractionTagContextValue | undefined>(undefined);\n\nconst interactionTagContextDefaultValue: InteractionTagContextValue = {\n appearance: 'filled',\n disabled: false,\n handleTagDismiss: () => ({}),\n handleTagSelect: () => ({}),\n interactionTagPrimaryId: '',\n selected: false,\n selectedValues: [],\n shape: 'rounded',\n size: 'medium',\n value: '',\n};\n\n/**\n * Context shared between InteractionTag and its children components\n */\nexport type InteractionTagContextValue<Value = string> = Required<\n Pick<InteractionTagState, 'appearance' | 'disabled' | 'selected' | 'selectedValues' | 'shape' | 'size'> & {\n handleTagDismiss: TagDismissHandler<Value>;\n interactionTagPrimaryId: string;\n value?: Value;\n }\n> & {\n handleTagSelect?: TagSelectHandler<Value>;\n};\n\nexport const InteractionTagContextProvider = InteractionTagContext.Provider;\n\nexport const useInteractionTagContext_unstable = (): InteractionTagContextValue =>\n React.useContext(InteractionTagContext) ?? interactionTagContextDefaultValue;\n"],"names":["React","InteractionTagContext","createContext","undefined","interactionTagContextDefaultValue","appearance","disabled","handleTagDismiss","handleTagSelect","interactionTagPrimaryId","selected","selectedValues","shape","size","value","InteractionTagContextProvider","Provider","useInteractionTagContext_unstable","useContext"],"mappings":";;;;;;;;;;;yBAIaC;;;iCA4BAc;;;qCAEAE;;;;;iEAlCU,QAAQ;AAIxB,MAAMhB,wBAAAA,WAAAA,GAAwBD,OAAME,aAAa,CAAyCC,WAAW;AAE5G,MAAMC,oCAAgE;IACpEC,YAAY;IACZC,UAAU;IACVC,kBAAkB,IAAO,GAAC,CAAA;IAC1BC,iBAAiB,IAAO,CAAA,EAAC,CAAA;IACzBC,yBAAyB;IACzBC,UAAU;IACVC,gBAAgB,EAAE;IAClBC,OAAO;IACPC,MAAM;IACNC,OAAO;AACT;AAeO,MAAMC,gCAAgCd,sBAAsBe,QAAQ,CAAC;AAErE,MAAMC,oCAAoC;QAC/CjB;WAAAA,CAAAA,oBAAAA,OAAMkB,UAAU,CAACjB,sBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAA2CI;EAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/tagGroupContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TagGroupState } from '../components/TagGroup/index';\n\nexport const TagGroupContext = React.createContext<TagGroupContextValue | undefined>(undefined);\n\nconst tagGroupContextDefaultValue: TagGroupContextValue = {\n handleTagDismiss: () => ({}),\n size: 'medium',\n role: 'toolbar',\n handleTagSelect: undefined,\n};\n\n/**\n * Context shared between TagGroup and its children components\n */\nexport type TagGroupContextValue = Required<Pick<TagGroupState, 'handleTagDismiss' | 'size'>> &\n Partial<\n Pick<TagGroupState, 'disabled' | 'appearance' | 'dismissible' | 'handleTagSelect' | 'role' | 'selectedValues'>\n >;\n\nexport const TagGroupContextProvider = TagGroupContext.Provider;\n\nexport const useTagGroupContext_unstable = ()
|
|
1
|
+
{"version":3,"sources":["../src/contexts/tagGroupContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TagGroupState } from '../components/TagGroup/index';\n\nexport const TagGroupContext = React.createContext<TagGroupContextValue | undefined>(undefined);\n\nconst tagGroupContextDefaultValue: TagGroupContextValue = {\n handleTagDismiss: () => ({}),\n size: 'medium',\n role: 'toolbar',\n handleTagSelect: undefined,\n};\n\n/**\n * Context shared between TagGroup and its children components\n */\nexport type TagGroupContextValue = Required<Pick<TagGroupState, 'handleTagDismiss' | 'size'>> &\n Partial<\n Pick<TagGroupState, 'disabled' | 'appearance' | 'dismissible' | 'handleTagSelect' | 'role' | 'selectedValues'>\n >;\n\nexport const TagGroupContextProvider = TagGroupContext.Provider;\n\nexport const useTagGroupContext_unstable = (): TagGroupContextValue =>\n React.useContext(TagGroupContext) ?? tagGroupContextDefaultValue;\n"],"names":["React","TagGroupContext","createContext","undefined","tagGroupContextDefaultValue","handleTagDismiss","size","role","handleTagSelect","TagGroupContextProvider","Provider","useTagGroupContext_unstable","useContext"],"mappings":";;;;;;;;;;;IAGaC,eAAAA;;;2BAiBAQ;;;+BAEAE;;;;;iEAtBU,QAAQ;AAGxB,wBAAMV,WAAAA,GAAkBD,OAAME,aAAa,CAAmCC,WAAW;AAEhG,MAAMC,8BAAoD;IACxDC,kBAAkB,IAAO,CAAA,EAAC,CAAA;IAC1BC,MAAM;IACNC,MAAM;IACNC,iBAAiBL;AACnB;AAUO,MAAMM,0BAA0BR,gBAAgBS,QAAQ,CAAC;AAEzD,MAAMC,8BAA8B;QACzCX;WAAAA,CAAAA,oBAAAA,OAAMY,UAAU,CAACX,gBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAAqCI;EAA4B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-tags",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250829-0406.1",
|
|
4
4
|
"description": "Fluent UI Tag component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,23 +12,23 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@fluentui/react-provider": "0.0.0-nightly-
|
|
15
|
+
"@fluentui/react-provider": "0.0.0-nightly-20250829-0406.1",
|
|
16
16
|
"@fluentui/eslint-plugin": "*",
|
|
17
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
|
18
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
17
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20250829-0406.1",
|
|
18
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20250829-0406.1",
|
|
19
19
|
"@fluentui/scripts-api-extractor": "*",
|
|
20
20
|
"@fluentui/scripts-cypress": "*"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@fluentui/keyboard-keys": "0.0.0-nightly-
|
|
24
|
-
"@fluentui/react-aria": "0.0.0-nightly-
|
|
25
|
-
"@fluentui/react-avatar": "0.0.0-nightly-
|
|
23
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly-20250829-0406.1",
|
|
24
|
+
"@fluentui/react-aria": "0.0.0-nightly-20250829-0406.1",
|
|
25
|
+
"@fluentui/react-avatar": "0.0.0-nightly-20250829-0406.1",
|
|
26
26
|
"@fluentui/react-icons": "^2.0.245",
|
|
27
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
|
28
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
|
29
|
-
"@fluentui/react-tabster": "0.0.0-nightly-
|
|
30
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
|
31
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
27
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20250829-0406.1",
|
|
28
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20250829-0406.1",
|
|
29
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20250829-0406.1",
|
|
30
|
+
"@fluentui/react-theme": "0.0.0-nightly-20250829-0406.1",
|
|
31
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20250829-0406.1",
|
|
32
32
|
"@griffel/react": "^1.5.22",
|
|
33
33
|
"@swc/helpers": "^0.5.1"
|
|
34
34
|
},
|