@fluentui/react-tags 9.9.8 → 9.9.9
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 +10 -2
- package/lib/components/InteractionTag/InteractionTag.js.map +1 -1
- package/lib/components/InteractionTag/InteractionTag.types.js.map +1 -1
- package/lib/components/InteractionTag/index.js.map +1 -1
- package/lib/components/InteractionTag/renderInteractionTag.js +2 -2
- package/lib/components/InteractionTag/renderInteractionTag.js.map +1 -1
- package/lib/components/InteractionTag/useInteractionTag.js.map +1 -1
- package/lib/components/InteractionTag/useInteractionTagContextValues.js.map +1 -1
- package/lib/components/InteractionTag/useInteractionTagStyles.styles.raw.js.map +1 -1
- package/lib/components/InteractionTagPrimary/InteractionTagPrimary.js.map +1 -1
- package/lib/components/InteractionTagPrimary/InteractionTagPrimary.types.js.map +1 -1
- package/lib/components/InteractionTagPrimary/index.js.map +1 -1
- package/lib/components/InteractionTagPrimary/renderInteractionTagPrimary.js +2 -2
- package/lib/components/InteractionTagPrimary/renderInteractionTagPrimary.js.map +1 -1
- package/lib/components/InteractionTagPrimary/useInteractionTagPrimary.js.map +1 -1
- package/lib/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.raw.js.map +1 -1
- package/lib/components/InteractionTagSecondary/InteractionTagSecondary.js.map +1 -1
- package/lib/components/InteractionTagSecondary/InteractionTagSecondary.types.js.map +1 -1
- package/lib/components/InteractionTagSecondary/index.js.map +1 -1
- package/lib/components/InteractionTagSecondary/renderInteractionTagSecondary.js +2 -2
- package/lib/components/InteractionTagSecondary/renderInteractionTagSecondary.js.map +1 -1
- package/lib/components/InteractionTagSecondary/useInteractionTagSecondary.js +1 -2
- package/lib/components/InteractionTagSecondary/useInteractionTagSecondary.js.map +1 -1
- package/lib/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.raw.js.map +1 -1
- package/lib/components/Tag/Tag.js.map +1 -1
- package/lib/components/Tag/Tag.types.js.map +1 -1
- package/lib/components/Tag/index.js.map +1 -1
- package/lib/components/Tag/renderTag.js +2 -2
- package/lib/components/Tag/renderTag.js.map +1 -1
- package/lib/components/Tag/useTag.js +1 -2
- package/lib/components/Tag/useTag.js.map +1 -1
- package/lib/components/Tag/useTagStyles.styles.raw.js.map +1 -1
- package/lib/components/TagGroup/TagGroup.js.map +1 -1
- package/lib/components/TagGroup/TagGroup.types.js.map +1 -1
- package/lib/components/TagGroup/index.js.map +1 -1
- package/lib/components/TagGroup/renderTagGroup.js +2 -2
- package/lib/components/TagGroup/renderTagGroup.js.map +1 -1
- package/lib/components/TagGroup/useTagGroup.js.map +1 -1
- package/lib/components/TagGroup/useTagGroupContextValues.js.map +1 -1
- package/lib/components/TagGroup/useTagGroupStyles.styles.raw.js.map +1 -1
- package/lib/contexts/interactionTagContext.js.map +1 -1
- package/lib/contexts/tagGroupContext.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/useTagAvatarContextValues.js.map +1 -1
- package/lib-commonjs/InteractionTag.cjs +8 -8
- package/lib-commonjs/InteractionTagPrimary.cjs +7 -7
- package/lib-commonjs/InteractionTagSecondary.cjs +7 -7
- package/lib-commonjs/Tag.cjs +11 -11
- package/lib-commonjs/Tag.cjs.map +1 -1
- package/lib-commonjs/TagGroup.cjs +8 -8
- package/lib-commonjs/components/InteractionTag/InteractionTag.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTag/InteractionTag.types.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTag/index.cjs +8 -8
- package/lib-commonjs/components/InteractionTag/index.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTag/renderInteractionTag.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTag/useInteractionTag.cjs +3 -3
- package/lib-commonjs/components/InteractionTag/useInteractionTag.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTag/useInteractionTagContextValues.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTag/useInteractionTagStyles.styles.cjs +3 -3
- package/lib-commonjs/components/InteractionTag/useInteractionTagStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTag/useInteractionTagStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/InteractionTag/useInteractionTagStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagPrimary/InteractionTagPrimary.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagPrimary/InteractionTagPrimary.types.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagPrimary/index.cjs +7 -7
- package/lib-commonjs/components/InteractionTagPrimary/index.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagPrimary/renderInteractionTagPrimary.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimary.cjs +3 -3
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimary.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.cjs +3 -3
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagSecondary/InteractionTagSecondary.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagSecondary/InteractionTagSecondary.types.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagSecondary/index.cjs +7 -7
- package/lib-commonjs/components/InteractionTagSecondary/index.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagSecondary/renderInteractionTagSecondary.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondary.cjs +4 -5
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondary.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.cjs +3 -3
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Tag/Tag.cjs.map +1 -1
- package/lib-commonjs/components/Tag/Tag.types.cjs.map +1 -1
- package/lib-commonjs/components/Tag/index.cjs +11 -11
- package/lib-commonjs/components/Tag/index.cjs.map +1 -1
- package/lib-commonjs/components/Tag/renderTag.cjs.map +1 -1
- package/lib-commonjs/components/Tag/useTag.cjs +4 -5
- package/lib-commonjs/components/Tag/useTag.cjs.map +1 -1
- package/lib-commonjs/components/Tag/useTagStyles.styles.cjs +7 -7
- package/lib-commonjs/components/Tag/useTagStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Tag/useTagStyles.styles.raw.cjs +7 -7
- package/lib-commonjs/components/Tag/useTagStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TagGroup/TagGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagGroup/TagGroup.types.cjs.map +1 -1
- package/lib-commonjs/components/TagGroup/index.cjs +8 -8
- package/lib-commonjs/components/TagGroup/index.cjs.map +1 -1
- package/lib-commonjs/components/TagGroup/renderTagGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagGroup/useTagGroup.cjs +3 -3
- package/lib-commonjs/components/TagGroup/useTagGroup.cjs.map +1 -1
- package/lib-commonjs/components/TagGroup/useTagGroupContextValues.cjs.map +1 -1
- package/lib-commonjs/components/TagGroup/useTagGroupStyles.styles.cjs +3 -3
- package/lib-commonjs/components/TagGroup/useTagGroupStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TagGroup/useTagGroupStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/TagGroup/useTagGroupStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/contexts/interactionTagContext.cjs +4 -4
- package/lib-commonjs/contexts/interactionTagContext.cjs.map +1 -1
- package/lib-commonjs/contexts/tagGroupContext.cjs +4 -4
- package/lib-commonjs/contexts/tagGroupContext.cjs.map +1 -1
- package/lib-commonjs/index.cjs +38 -38
- package/lib-commonjs/index.cjs.map +1 -1
- package/lib-commonjs/utils/index.cjs.map +1 -1
- package/lib-commonjs/utils/types.cjs.map +1 -1
- package/lib-commonjs/utils/useTagAvatarContextValues.cjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-tags
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Tue, 10 Nov 2026 16:49:10 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.9.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-tags_v9.9.9)
|
|
8
|
+
|
|
9
|
+
Tue, 10 Nov 2026 16:49:10 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui/react-avatar to v9.11.10 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
14
|
+
|
|
7
15
|
## [9.9.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-tags_v9.9.8)
|
|
8
16
|
|
|
9
|
-
Mon, 19 Oct 2026
|
|
17
|
+
Mon, 19 Oct 2026 16:49:01 GMT
|
|
10
18
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tags_v9.9.7..@fluentui/react-tags_v9.9.8)
|
|
11
19
|
|
|
12
20
|
### Patches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTag/InteractionTag.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useInteractionTag_unstable } from './useInteractionTag';\nimport { renderInteractionTag_unstable } from './renderInteractionTag';\nimport { useInteractionTagStyles_unstable } from './useInteractionTagStyles.styles';\nimport { useInteractionTagContextValues_unstable } from './useInteractionTagContextValues';\nimport type { InteractionTagProps } from './InteractionTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * InteractionTag component - a visual representation of an attribute with primary and secondary actions.\n * Can have `InteractionTagPrimary` and `InteractionTagSecondary` components as its children.\n */\nexport const InteractionTag: ForwardRefComponent<InteractionTagProps> = React.forwardRef((props, ref) => {\n const state = useInteractionTag_unstable(props, ref);\n\n useInteractionTagStyles_unstable(state);\n\n useCustomStyleHook_unstable('useInteractionTagStyles_unstable')(state);\n\n return renderInteractionTag_unstable(state, useInteractionTagContextValues_unstable(state));\n});\n\nInteractionTag.displayName = 'InteractionTag';\n"],"names":["React","useInteractionTag_unstable","renderInteractionTag_unstable","useInteractionTagStyles_unstable","useInteractionTagContextValues_unstable","useCustomStyleHook_unstable","InteractionTag","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,gCAAgC,QAAQ,sCAAmC;AACpF,SAASC,uCAAuC,QAAQ,sCAAmC;AAG3F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,+BAA2DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQT,2BAA2BO,OAAOC;IAEhDN,iCAAiCO;IAEjCL,4BAA4B,oCAAoCK;IAEhE,OAAOR,8BAA8BQ,OAAON,wCAAwCM;AACtF,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTag/InteractionTag.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { InteractionTagContextValue } from '../../contexts/interactionTagContext';\nimport type {\n TagAppearance,\n TagShape,\n TagSize,\n TagValue,\n TagDismissHandler,\n TagSelectHandler,\n} from '../../utils/types';\n\nexport type InteractionTagContextValues = {\n interactionTag: InteractionTagContextValue;\n};\n\nexport type InteractionTagSlots = {\n root: NonNullable<Slot<'div'>>;\n};\n\n/**\n * InteractionTag Props\n */\nexport type InteractionTagProps<Value = TagValue> = ComponentProps<Partial<InteractionTagSlots>> & {\n /**\n * An InteractionTag can have filled, outlined or brand experience.\n *\n * @default 'filled'\n */\n appearance?: TagAppearance;\n\n /**\n * An InteractionTag can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * An InteractionTag can be selected.\n * Note: This prop only changes the appearance of the tag at the moment. A future PR will add the integration with TagGroup.\n *\n * @default false\n */\n selected?: boolean;\n\n /**\n * An InteractionTag can have rounded or circular shape.\n *\n * @default 'round'\n */\n shape?: TagShape;\n\n /**\n * An InteractionTag has three sizes.\n *\n * @default 'medium'\n */\n size?: TagSize;\n\n /**\n * Unique value identifying the tag within a TagGroup\n */\n value?: Value;\n};\n\n/**\n * State used in rendering InteractionTag\n */\nexport type InteractionTagState<Value = TagValue> = ComponentState<InteractionTagSlots> &\n Required<Pick<InteractionTagProps, 'appearance' | 'disabled' | 'selected' | 'shape' | 'size' | 'value'>> & {\n /**\n * Event handler from TagGroup context that allows TagGroup to dismiss the tag\n */\n handleTagDismiss: TagDismissHandler<Value>;\n\n /**\n * Event handler from TagGroup context that allows TagGroup to select the tag\n */\n handleTagSelect?: TagSelectHandler<Value>;\n\n /**\n * Selected values from TagGroup context\n */\n selectedValues: Value[];\n\n /**\n * id to assign to InteractionTagPrimary\n */\n interactionTagPrimaryId: string;\n };\n\n/**\n * InteractionTag Base Props - omits design-only props\n */\nexport type InteractionTagBaseProps<Value = TagValue> = Omit<\n InteractionTagProps<Value>,\n 'appearance' | 'size' | 'shape'\n>;\n\n/**\n * InteractionTag Base State - omits design-only state\n */\nexport type InteractionTagBaseState<Value = TagValue> = Omit<\n InteractionTagState<Value>,\n 'appearance' | 'size' | 'shape'\n>;\n"],"names":[],"mappings":"AAmGA;;CAEC,GACD,WAGE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTag/index.ts"],"sourcesContent":["export { InteractionTag } from './InteractionTag';\nexport type {\n InteractionTagBaseProps,\n InteractionTagBaseState,\n InteractionTagContextValues,\n InteractionTagProps,\n InteractionTagSlots,\n InteractionTagState,\n} from './InteractionTag.types';\nexport { renderInteractionTag_unstable } from './renderInteractionTag';\nexport { useInteractionTagBase_unstable, useInteractionTag_unstable } from './useInteractionTag';\nexport { interactionTagClassNames, useInteractionTagStyles_unstable } from './useInteractionTagStyles.styles';\nexport { useInteractionTagContextValues_unstable } from './useInteractionTagContextValues';\n"],"names":["InteractionTag","renderInteractionTag_unstable","useInteractionTagBase_unstable","useInteractionTag_unstable","interactionTagClassNames","useInteractionTagStyles_unstable","useInteractionTagContextValues_unstable"],"mappings":"AAAA,SAASA,cAAc,QAAQ,sBAAmB;AASlD,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,8BAA8B,EAAEC,0BAA0B,QAAQ,yBAAsB;AACjG,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,sCAAmC;AAC9G,SAASC,uCAAuC,QAAQ,sCAAmC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
import { InteractionTagContextProvider } from "../../contexts/interactionTagContext.js";
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of InteractionTag
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
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 { InteractionTagBaseState, 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: InteractionTagBaseState,\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,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,6BAA6B,QAAQ,0CAAuC;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":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTag/useInteractionTag.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport type {\n InteractionTagBaseProps,\n InteractionTagBaseState,\n InteractionTagProps,\n InteractionTagState,\n} from './InteractionTag.types';\nimport { useTagGroupContext_unstable } from '../../contexts/tagGroupContext';\n\n/**\n * Create the base state required to render InteractionTag, without design-only props.\n *\n * @param props - props from this instance of InteractionTag (without appearance, size, shape)\n * @param ref - reference to root HTMLDivElement of InteractionTag\n */\nexport const useInteractionTagBase_unstable = (\n props: InteractionTagBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): InteractionTagBaseState => {\n const {\n handleTagDismiss,\n handleTagSelect,\n disabled: contextDisabled,\n selectedValues = [],\n } = useTagGroupContext_unstable();\n\n const id = useId('fui-InteractionTag-', props.id);\n\n const interactionTagPrimaryId = useId('fui-InteractionTagPrimary-');\n\n const { disabled = false, selected = false, value = id } = props;\n\n return {\n disabled: contextDisabled ? true : disabled,\n handleTagDismiss,\n handleTagSelect,\n interactionTagPrimaryId,\n selected: selectedValues.includes(value) || selected,\n selectedValues,\n value,\n\n components: {\n root: 'div',\n },\n\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n disabled: contextDisabled ? true : disabled,\n id,\n }),\n { elementType: 'div' },\n ),\n };\n};\n\n/**\n * Create the state required to render InteractionTag.\n *\n * The returned state can be modified with hooks such as useInteractionTagStyles_unstable,\n * before being passed to renderInteractionTag_unstable.\n *\n * @param props - props from this instance of InteractionTag\n * @param ref - reference to root HTMLDivElement of InteractionTag\n */\nexport const useInteractionTag_unstable = (\n props: InteractionTagProps,\n ref: React.Ref<HTMLDivElement>,\n): InteractionTagState => {\n const { size: contextSize, appearance: contextAppearance } = useTagGroupContext_unstable();\n\n const { appearance = contextAppearance ?? 'filled', shape = 'rounded', size = contextSize } = props;\n\n return {\n ...useInteractionTagBase_unstable(props, ref),\n appearance,\n shape,\n size,\n };\n};\n"],"names":["getIntrinsicElementProps","useId","slot","useTagGroupContext_unstable","useInteractionTagBase_unstable","props","ref","handleTagDismiss","handleTagSelect","disabled","contextDisabled","selectedValues","id","interactionTagPrimaryId","selected","value","includes","components","root","always","elementType","useInteractionTag_unstable","size","contextSize","appearance","contextAppearance","shape"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAOlF,SAASC,2BAA2B,QAAQ,oCAAiC;AAE7E;;;;;CAKC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC;IAEA,MAAM,EACJC,gBAAgB,EAChBC,eAAe,EACfC,UAAUC,eAAe,EACzBC,iBAAiB,EAAE,EACpB,GAAGR;IAEJ,MAAMS,KAAKX,MAAM,uBAAuBI,MAAMO,EAAE;IAEhD,MAAMC,0BAA0BZ,MAAM;IAEtC,MAAM,EAAEQ,WAAW,KAAK,EAAEK,WAAW,KAAK,EAAEC,QAAQH,EAAE,EAAE,GAAGP;IAE3D,OAAO;QACLI,UAAUC,kBAAkB,OAAOD;QACnCF;QACAC;QACAK;QACAC,UAAUH,eAAeK,QAAQ,CAACD,UAAUD;QAC5CH;QACAI;QAEAE,YAAY;YACVC,MAAM;QACR;QAEAA,MAAMhB,KAAKiB,MAAM,CACfnB,yBAAyB,OAAO;YAC9BM;YACA,GAAGD,KAAK;YACRI,UAAUC,kBAAkB,OAAOD;YACnCG;QACF,IACA;YAAEQ,aAAa;QAAM;IAEzB;AACF,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxChB,OACAC;IAEA,MAAM,EAAEgB,MAAMC,WAAW,EAAEC,YAAYC,iBAAiB,EAAE,GAAGtB;IAE7D,MAAM,EAAEqB,aAAaC,8BAAAA,+BAAAA,oBAAqB,QAAQ,EAAEC,QAAQ,SAAS,EAAEJ,OAAOC,WAAW,EAAE,GAAGlB;IAE9F,OAAO;QACL,GAAGD,+BAA+BC,OAAOC,IAAI;QAC7CkB;QACAE;QACAJ;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTag/useInteractionTagContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { InteractionTagState, InteractionTagContextValues } from './InteractionTag.types';\n\nexport function useInteractionTagContextValues_unstable(state: InteractionTagState): InteractionTagContextValues {\n const {\n appearance,\n disabled,\n handleTagDismiss,\n handleTagSelect,\n interactionTagPrimaryId,\n selected,\n selectedValues,\n shape,\n size,\n value,\n } = state;\n\n return {\n interactionTag: React.useMemo(\n () => ({\n appearance,\n disabled,\n handleTagDismiss,\n handleTagSelect,\n interactionTagPrimaryId,\n selected,\n selectedValues,\n shape,\n size,\n value,\n }),\n [\n appearance,\n disabled,\n handleTagDismiss,\n handleTagSelect,\n interactionTagPrimaryId,\n selected,\n selectedValues,\n shape,\n size,\n value,\n ],\n ),\n };\n}\n"],"names":["React","useInteractionTagContextValues_unstable","state","appearance","disabled","handleTagDismiss","handleTagSelect","interactionTagPrimaryId","selected","selectedValues","shape","size","value","interactionTag","useMemo"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,wCAAwCC,KAA0B;IAChF,MAAM,EACJC,UAAU,EACVC,QAAQ,EACRC,gBAAgB,EAChBC,eAAe,EACfC,uBAAuB,EACvBC,QAAQ,EACRC,cAAc,EACdC,KAAK,EACLC,IAAI,EACJC,KAAK,EACN,GAAGV;IAEJ,OAAO;QACLW,gBAAgBb,MAAMc,OAAO,CAC3B,IAAO,CAAA;gBACLX;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;YACF,CAAA,GACA;YACET;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;SACD;IAEL;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTag/useInteractionTagStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { InteractionTagSlots, InteractionTagState } from './InteractionTag.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const interactionTagClassNames: SlotClassNames<InteractionTagSlots> = {\n root: 'fui-InteractionTag',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n alignItems: 'center',\n boxSizing: 'border-box',\n width: 'fit-content',\n});\n\nconst useRootStyles = makeStyles({\n rounded: { borderRadius: tokens.borderRadiusMedium },\n circular: { borderRadius: tokens.borderRadiusCircular },\n\n medium: {\n height: '32px',\n },\n small: {\n height: '24px',\n },\n 'extra-small': {\n height: '20px',\n },\n});\n\n/**\n * Apply styling to the InteractionTag slots based on the state\n */\nexport const useInteractionTagStyles_unstable = (state: InteractionTagState): InteractionTagState => {\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n\n const { shape, size } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n interactionTagClassNames.root,\n rootBaseClassName,\n rootStyles[shape],\n rootStyles[size],\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","interactionTagClassNames","root","useRootBaseClassName","display","alignItems","boxSizing","width","useRootStyles","rounded","borderRadius","borderRadiusMedium","circular","borderRadiusCircular","medium","height","small","useInteractionTagStyles_unstable","state","rootBaseClassName","rootStyles","shape","size","className"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAG3E,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBN,gBAAgB;IAC3CO,SAAS;IACTC,YAAY;IACZC,WAAW;IACXC,OAAO;AACT;AAEA,MAAMC,gBAAgBV,WAAW;IAC/BW,SAAS;QAAEC,cAAcV,OAAOW,kBAAkB;IAAC;IACnDC,UAAU;QAAEF,cAAcV,OAAOa,oBAAoB;IAAC;IAEtDC,QAAQ;QACNC,QAAQ;IACV;IACAC,OAAO;QACLD,QAAQ;IACV;IACA,eAAe;QACbA,QAAQ;IACV;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,mCAAmC,CAACC;IAC/C,MAAMC,oBAAoBhB;IAC1B,MAAMiB,aAAaZ;IAEnB,MAAM,EAAEa,KAAK,EAAEC,IAAI,EAAE,GAAGJ;IAExB,oDAAoD;IACpDA,MAAMhB,IAAI,CAACqB,SAAS,GAAGxB,aACrBE,yBAAyBC,IAAI,EAC7BiB,mBACAC,UAAU,CAACC,MAAM,EACjBD,UAAU,CAACE,KAAK,EAChBJ,MAAMhB,IAAI,CAACqB,SAAS;IAGtB,OAAOL;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagPrimary/InteractionTagPrimary.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useInteractionTagPrimary_unstable } from './useInteractionTagPrimary';\nimport { renderInteractionTagPrimary_unstable } from './renderInteractionTagPrimary';\nimport { useInteractionTagPrimaryStyles_unstable } from './useInteractionTagPrimaryStyles.styles';\nimport type { InteractionTagPrimaryProps } from './InteractionTagPrimary.types';\nimport { useTagAvatarContextValues_unstable } from '../../utils';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * InteractionTagPrimary component - used as the first child of the `InteractionTag` component.\n * Provides visual attributes such as media, icon, primary and secondary text, as well as the ability to attach a primary action.\n */\nexport const InteractionTagPrimary: ForwardRefComponent<InteractionTagPrimaryProps> = React.forwardRef((props, ref) => {\n const state = useInteractionTagPrimary_unstable(props, ref);\n\n useInteractionTagPrimaryStyles_unstable(state);\n\n useCustomStyleHook_unstable('useInteractionTagPrimaryStyles_unstable')(state);\n\n return renderInteractionTagPrimary_unstable(state, useTagAvatarContextValues_unstable(state));\n});\n\nInteractionTagPrimary.displayName = 'InteractionTagPrimary';\n"],"names":["React","useInteractionTagPrimary_unstable","renderInteractionTagPrimary_unstable","useInteractionTagPrimaryStyles_unstable","useTagAvatarContextValues_unstable","useCustomStyleHook_unstable","InteractionTagPrimary","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,iCAAiC,QAAQ,gCAA6B;AAC/E,SAASC,oCAAoC,QAAQ,mCAAgC;AACrF,SAASC,uCAAuC,QAAQ,6CAA0C;AAElG,SAASC,kCAAkC,QAAQ,uBAAc;AACjE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,sCAAyEN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7G,MAAMC,QAAQT,kCAAkCO,OAAOC;IAEvDN,wCAAwCO;IAExCL,4BAA4B,2CAA2CK;IAEvE,OAAOR,qCAAqCQ,OAAON,mCAAmCM;AACxF,GAAG;AAEHJ,sBAAsBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagPrimary/InteractionTagPrimary.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { InteractionTagContextValue } from '../../contexts/interactionTagContext';\nimport type { TagAvatarContextValues, UseTagAvatarContextValuesOptions } from '../../utils/useTagAvatarContextValues';\n\nexport type InteractionTagPrimaryContextValues = TagAvatarContextValues;\n\nexport type InteractionTagPrimarySlots = {\n root: NonNullable<Slot<'button'>>;\n\n /**\n * Slot for a visual element, usually an avatar\n */\n media?: Slot<'span'>;\n\n /**\n * Slot for an icon\n */\n icon?: Slot<'span'>;\n\n /**\n * Main text for the InteractionTagPrimary button. Children of the root slot are automatically rendered here\n */\n primaryText: Slot<'span'>;\n\n /**\n * Secondary text that describes or complements the main text\n */\n secondaryText?: Slot<'span'>;\n};\n\n/**\n * InteractionTagPrimary Props\n */\nexport type InteractionTagPrimaryProps = ComponentProps<Partial<InteractionTagPrimarySlots>> & {\n /**\n * Whether the `InteractionTag` component has a `Secondary` component that provides an secondary action.\n * If `true`, the `InteractionTagPrimary` component will adjust its styles to accommodate the `Secondary` component.\n *\n * @default false\n */\n hasSecondaryAction?: boolean;\n};\n\n/**\n * State used in rendering InteractionTagPrimary\n */\nexport type InteractionTagPrimaryState = ComponentState<InteractionTagPrimarySlots> &\n Required<\n Pick<InteractionTagContextValue, 'appearance' | 'disabled' | 'selected' | 'shape' | 'size'> &\n Pick<InteractionTagPrimaryProps, 'hasSecondaryAction'>\n > &\n UseTagAvatarContextValuesOptions;\n\n/**\n * InteractionTagPrimary Base Props - same as InteractionTagPrimaryProps (no design-only own props)\n */\nexport type InteractionTagPrimaryBaseProps = InteractionTagPrimaryProps;\n\n/**\n * InteractionTagPrimary Base State - omits design-only state derived from context\n */\nexport type InteractionTagPrimaryBaseState = Omit<\n InteractionTagPrimaryState,\n 'appearance' | 'size' | 'shape' | 'avatarShape' | 'avatarSize'\n>;\n"],"names":[],"mappings":"AA0DA;;CAEC,GACD,WAGE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagPrimary/index.ts"],"sourcesContent":["export { InteractionTagPrimary } from './InteractionTagPrimary';\nexport type {\n InteractionTagPrimaryBaseProps,\n InteractionTagPrimaryBaseState,\n InteractionTagPrimaryContextValues,\n InteractionTagPrimaryProps,\n InteractionTagPrimarySlots,\n InteractionTagPrimaryState,\n} from './InteractionTagPrimary.types';\nexport { renderInteractionTagPrimary_unstable } from './renderInteractionTagPrimary';\nexport { useInteractionTagPrimaryBase_unstable, useInteractionTagPrimary_unstable } from './useInteractionTagPrimary';\nexport {\n interactionTagPrimaryClassNames,\n useInteractionTagPrimaryStyles_unstable,\n} from './useInteractionTagPrimaryStyles.styles';\n"],"names":["InteractionTagPrimary","renderInteractionTagPrimary_unstable","useInteractionTagPrimaryBase_unstable","useInteractionTagPrimary_unstable","interactionTagPrimaryClassNames","useInteractionTagPrimaryStyles_unstable"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,6BAA0B;AAShE,SAASC,oCAAoC,QAAQ,mCAAgC;AACrF,SAASC,qCAAqC,EAAEC,iCAAiC,QAAQ,gCAA6B;AACtH,SACEC,+BAA+B,EAC/BC,uCAAuC,QAClC,6CAA0C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
import { AvatarContextProvider } from "@fluentui/react-avatar";
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of InteractionTagPrimary
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
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 InteractionTagPrimaryBaseState,\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: InteractionTagPrimaryBaseState,\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,GAEjD,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":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagPrimary/useInteractionTagPrimary.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot, useEventCallback } from '@fluentui/react-utilities';\nimport type {\n InteractionTagPrimaryBaseProps,\n InteractionTagPrimaryBaseState,\n InteractionTagPrimaryProps,\n InteractionTagPrimaryState,\n} from './InteractionTagPrimary.types';\nimport { useInteractionTagContext_unstable } from '../../contexts/interactionTagContext';\n\nconst avatarSizeMap = {\n medium: 28,\n small: 20,\n 'extra-small': 16,\n} as const;\n\nconst avatarShapeMap = {\n rounded: 'square',\n circular: 'circular',\n} as const;\n\n/**\n * Create the base state required to render InteractionTagPrimary, without design-only props.\n *\n * @param props - props from this instance of InteractionTagPrimary\n * @param ref - reference to root HTMLButtonElement of InteractionTagPrimary\n */\nexport const useInteractionTagPrimaryBase_unstable = (\n props: InteractionTagPrimaryBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): InteractionTagPrimaryBaseState => {\n const {\n disabled,\n handleTagSelect,\n interactionTagPrimaryId,\n selected: contextSelected,\n selectedValues,\n value,\n } = useInteractionTagContext_unstable();\n const { hasSecondaryAction = false } = props;\n\n const onClick = useEventCallback(\n mergeCallbacks(props?.onClick, (event: React.MouseEvent<HTMLButtonElement>) =>\n handleTagSelect?.(event, { type: 'click', event, value, selectedValues }),\n ),\n );\n\n return {\n disabled,\n hasSecondaryAction,\n selected: contextSelected,\n\n components: {\n root: 'button',\n media: 'span',\n icon: 'span',\n primaryText: 'span',\n secondaryText: 'span',\n },\n\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref,\n disabled,\n id: interactionTagPrimaryId,\n ...(handleTagSelect !== undefined && { 'aria-pressed': contextSelected }),\n onClick,\n ...props,\n }),\n { elementType: 'button' },\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 };\n};\n\n/**\n * Create the state required to render InteractionTagPrimary.\n *\n * The returned state can be modified with hooks such as useInteractionTagPrimaryStyles_unstable,\n * before being passed to renderInteractionTagPrimary_unstable.\n *\n * @param props - props from this instance of InteractionTagPrimary\n * @param ref - reference to root HTMLButtonElement of InteractionTagPrimary\n */\nexport const useInteractionTagPrimary_unstable = (\n props: InteractionTagPrimaryProps,\n ref: React.Ref<HTMLButtonElement>,\n): InteractionTagPrimaryState => {\n const { appearance, shape, size } = useInteractionTagContext_unstable();\n\n return {\n ...useInteractionTagPrimaryBase_unstable(props, ref),\n appearance,\n avatarShape: avatarShapeMap[shape],\n avatarSize: avatarSizeMap[size],\n shape,\n size,\n };\n};\n"],"names":["getIntrinsicElementProps","mergeCallbacks","slot","useEventCallback","useInteractionTagContext_unstable","avatarSizeMap","medium","small","avatarShapeMap","rounded","circular","useInteractionTagPrimaryBase_unstable","props","ref","disabled","handleTagSelect","interactionTagPrimaryId","selected","contextSelected","selectedValues","value","hasSecondaryAction","onClick","event","type","components","root","media","icon","primaryText","secondaryText","always","id","undefined","elementType","optional","renderByDefault","defaultProps","children","useInteractionTagPrimary_unstable","appearance","shape","size","avatarShape","avatarSize"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,4BAA4B;AAO7G,SAASC,iCAAiC,QAAQ,0CAAuC;AAEzF,MAAMC,gBAAgB;IACpBC,QAAQ;IACRC,OAAO;IACP,eAAe;AACjB;AAEA,MAAMC,iBAAiB;IACrBC,SAAS;IACTC,UAAU;AACZ;AAEA;;;;;CAKC,GACD,OAAO,MAAMC,wCAAwC,CACnDC,OACAC;IAEA,MAAM,EACJC,QAAQ,EACRC,eAAe,EACfC,uBAAuB,EACvBC,UAAUC,eAAe,EACzBC,cAAc,EACdC,KAAK,EACN,GAAGhB;IACJ,MAAM,EAAEiB,qBAAqB,KAAK,EAAE,GAAGT;IAEvC,MAAMU,UAAUnB,iBACdF,eAAeW,kBAAAA,4BAAAA,MAAOU,OAAO,EAAE,CAACC,QAC9BR,4BAAAA,sCAAAA,gBAAkBQ,OAAO;YAAEC,MAAM;YAASD;YAAOH;YAAOD;QAAe;IAI3E,OAAO;QACLL;QACAO;QACAJ,UAAUC;QAEVO,YAAY;YACVC,MAAM;YACNC,OAAO;YACPC,MAAM;YACNC,aAAa;YACbC,eAAe;QACjB;QAEAJ,MAAMxB,KAAK6B,MAAM,CACf/B,yBAAyB,UAAU;YACjCa;YACAC;YACAkB,IAAIhB;YACJ,GAAID,oBAAoBkB,aAAa;gBAAE,gBAAgBf;YAAgB,CAAC;YACxEI;YACA,GAAGV,KAAK;QACV,IACA;YAAEsB,aAAa;QAAS;QAG1BP,OAAOzB,KAAKiC,QAAQ,CAACvB,MAAMe,KAAK,EAAE;YAAEO,aAAa;QAAO;QACxDN,MAAM1B,KAAKiC,QAAQ,CAACvB,MAAMgB,IAAI,EAAE;YAAEM,aAAa;QAAO;QACtDL,aAAa3B,KAAKiC,QAAQ,CAACvB,MAAMiB,WAAW,EAAE;YAC5CO,iBAAiB;YACjBC,cAAc;gBACZC,UAAU1B,MAAM0B,QAAQ;YAC1B;YACAJ,aAAa;QACf;QACAJ,eAAe5B,KAAKiC,QAAQ,CAACvB,MAAMkB,aAAa,EAAE;YAAEI,aAAa;QAAO;IAC1E;AACF,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMK,oCAAoC,CAC/C3B,OACAC;IAEA,MAAM,EAAE2B,UAAU,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGtC;IAEpC,OAAO;QACL,GAAGO,sCAAsCC,OAAOC,IAAI;QACpD2B;QACAG,aAAanC,cAAc,CAACiC,MAAM;QAClCG,YAAYvC,aAAa,CAACqC,KAAK;QAC/BD;QACAC;IACF;AACF,EAAE"}
|
package/lib/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.raw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { GriffelResetStyle } from '@griffel/react';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { InteractionTagPrimarySlots, InteractionTagPrimaryState } from './InteractionTagPrimary.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport {\n useIconStyles,\n useMediaStyles,\n usePrimaryTextStyles,\n useSecondaryTextBaseClassName,\n} from '../Tag/useTagStyles.styles';\n\nexport const interactionTagPrimaryClassNames: SlotClassNames<InteractionTagPrimarySlots> = {\n root: 'fui-InteractionTagPrimary',\n media: 'fui-InteractionTagPrimary__media',\n icon: 'fui-InteractionTagPrimary__icon',\n primaryText: 'fui-InteractionTagPrimary__primaryText',\n secondaryText: 'fui-InteractionTagPrimary__secondaryText',\n};\n\nconst baseStyles: GriffelResetStyle = {\n // reset default button style:\n color: 'inherit',\n fontFamily: 'inherit',\n padding: '0px',\n borderStyle: 'none',\n appearance: 'button',\n textAlign: 'unset',\n backgroundColor: 'transparent',\n\n display: 'inline-grid',\n height: '100%',\n alignItems: 'center',\n gridTemplateAreas: `\n \"media primary \"\n \"media secondary\"\n `,\n\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n zIndex: 1,\n }),\n};\n\nconst useRootRoundedBaseClassName = makeResetStyles({\n ...baseStyles,\n borderRadius: tokens.borderRadiusMedium,\n\n /**\n * Pseudo element to draw the border for windows high contrast mode -\n * when Tag is with secondary text, primary text has negative margin that covers the border.\n */\n '@media (forced-colors: active)': {\n position: 'relative',\n '::before': {\n content: '\"\"',\n borderTop: `${tokens.strokeWidthThin} solid`,\n position: 'absolute',\n inset: '-1px',\n borderTopLeftRadius: tokens.borderRadiusMedium,\n borderTopRightRadius: tokens.borderRadiusMedium,\n },\n },\n});\n\nconst useRootCircularBaseClassName = makeResetStyles({\n ...baseStyles,\n borderRadius: tokens.borderRadiusCircular,\n\n /**\n * Pseudo element to draw the border for windows high contrast mode -\n * when Tag is with secondary text, primary text has negative margin that covers the border.\n */\n '@media (forced-colors: active)': {\n position: 'relative',\n '::before': {\n content: '\"\"',\n borderTop: `${tokens.strokeWidthThin} solid`,\n borderLeft: `${tokens.strokeWidthThin} solid`,\n position: 'absolute',\n inset: '-1px',\n borderTopLeftRadius: tokens.borderRadiusCircular,\n borderBottomLeftRadius: tokens.borderRadiusCircular,\n },\n },\n});\n\n/**\n * Style override for pseudo element that draws the border for windows high contrast mode\n */\nconst useRootCircularContrastStyles = makeStyles({\n withoutSecondaryAction: {\n '@media (forced-colors: active)': {\n position: 'relative',\n '::before': {\n borderRight: `${tokens.strokeWidthThin} solid transparent`,\n borderTopRightRadius: tokens.borderRadiusCircular,\n borderBottomRightRadius: tokens.borderRadiusCircular,\n },\n },\n },\n});\n\nconst useRootStyles = makeStyles({\n filled: {\n backgroundColor: tokens.colorNeutralBackground3,\n color: tokens.colorNeutralForeground2,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n outline: {\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForeground2,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n color: tokens.colorNeutralForeground2BrandHover,\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorBrandForeground2,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorBrandBackground2Hover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackground2Pressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n selected: {\n background: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorBrandStroke1),\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n color: tokens.colorNeutralForegroundOnBrand,\n [`& .${iconFilledClassName}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n color: tokens.colorNeutralForegroundOnBrand,\n [`& .${iconFilledClassName}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n },\n medium: {\n paddingRight: '7px',\n },\n small: {\n paddingRight: '5px',\n },\n 'extra-small': {\n paddingRight: '5px',\n position: 'relative',\n\n // Increase clickable area to meet WCAG 2.2 AA\n // https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html\n '@media (forced-colors: none)': {\n '&:before, &:after': {\n content: '\"\"',\n position: 'absolute',\n height: '2px',\n left: '0',\n width: '100%',\n },\n '&:before': {\n bottom: '100%',\n },\n '&:after': {\n top: '100%',\n },\n },\n },\n});\nconst useRootDisabledAppearances = makeStyles({\n filled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n },\n outline: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n brand: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n },\n});\n\n/**\n * Styles for InteractionTagPrimary without leading media/icon\n */\nconst useRootWithoutMediaStyles = makeStyles({\n medium: {\n paddingLeft: '7px',\n },\n small: {\n paddingLeft: '5px',\n },\n 'extra-small': {\n paddingLeft: '5px',\n },\n});\n/**\n * Styles for InteractionTagPrimary when InteractionTag has a Secondary button\n */\nconst useRootWithSecondaryActionStyles = makeStyles({\n base: {\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n ...createCustomFocusIndicatorStyle({\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n }),\n '@media (forced-colors: active)': {\n '::before': {\n borderTopRightRadius: '0',\n },\n },\n },\n medium: {\n paddingRight: tokens.spacingHorizontalS,\n },\n small: {\n paddingRight: tokens.spacingHorizontalSNudge,\n },\n 'extra-small': {\n paddingRight: tokens.spacingHorizontalSNudge,\n },\n});\n\nexport const useInteractionTagPrimaryStyles_unstable = (\n state: InteractionTagPrimaryState,\n): InteractionTagPrimaryState => {\n const rootRoundedBaseClassName = useRootRoundedBaseClassName();\n const rootCircularBaseClassName = useRootCircularBaseClassName();\n const rootStyles = useRootStyles();\n const rootDisabledAppearances = useRootDisabledAppearances();\n const rootWithoutMediaStyles = useRootWithoutMediaStyles();\n const rootWithSecondaryActionStyles = useRootWithSecondaryActionStyles();\n\n const iconStyles = useIconStyles();\n const mediaStyles = useMediaStyles();\n const primaryTextStyles = usePrimaryTextStyles();\n const secondaryTextBaseClassName = useSecondaryTextBaseClassName();\n\n const rootCircularContrastStyles = useRootCircularContrastStyles();\n\n const { disabled, shape, size, appearance, selected } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n interactionTagPrimaryClassNames.root,\n\n shape === 'rounded' ? rootRoundedBaseClassName : rootCircularBaseClassName,\n\n shape === 'circular' && !state.hasSecondaryAction && rootCircularContrastStyles.withoutSecondaryAction,\n\n disabled ? rootDisabledAppearances[appearance] : rootStyles[appearance],\n selected && !disabled && rootStyles.selected,\n rootStyles[size],\n\n !state.media && !state.icon && rootWithoutMediaStyles[size],\n state.hasSecondaryAction && rootWithSecondaryActionStyles.base,\n state.hasSecondaryAction && rootWithSecondaryActionStyles[size],\n\n state.root.className,\n );\n\n if (state.media) {\n // eslint-disable-next-line react-hooks/immutability\n state.media.className = mergeClasses(\n interactionTagPrimaryClassNames.media,\n mediaStyles.base,\n mediaStyles[size],\n state.media.className,\n );\n }\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(\n interactionTagPrimaryClassNames.icon,\n iconStyles.base,\n iconStyles[size],\n state.icon.className,\n );\n }\n if (state.primaryText) {\n // eslint-disable-next-line react-hooks/immutability\n state.primaryText.className = mergeClasses(\n interactionTagPrimaryClassNames.primaryText,\n\n primaryTextStyles.base,\n primaryTextStyles[size],\n\n state.secondaryText ? primaryTextStyles.withSecondaryText : primaryTextStyles.withoutSecondaryText,\n\n state.primaryText.className,\n );\n }\n if (state.secondaryText) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryText.className = mergeClasses(\n interactionTagPrimaryClassNames.secondaryText,\n secondaryTextBaseClassName,\n state.secondaryText.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","createCustomFocusIndicatorStyle","tokens","iconFilledClassName","iconRegularClassName","useIconStyles","useMediaStyles","usePrimaryTextStyles","useSecondaryTextBaseClassName","interactionTagPrimaryClassNames","root","media","icon","primaryText","secondaryText","baseStyles","color","fontFamily","padding","borderStyle","appearance","textAlign","backgroundColor","display","height","alignItems","gridTemplateAreas","border","strokeWidthThin","colorTransparentStroke","outline","strokeWidthThick","colorStrokeFocus2","zIndex","useRootRoundedBaseClassName","borderRadius","borderRadiusMedium","position","content","borderTop","inset","borderTopLeftRadius","borderTopRightRadius","useRootCircularBaseClassName","borderRadiusCircular","borderLeft","borderBottomLeftRadius","useRootCircularContrastStyles","withoutSecondaryAction","borderRight","borderBottomRightRadius","useRootStyles","filled","colorNeutralBackground3","colorNeutralForeground2","cursor","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","colorSubtleBackground","borderColor","colorNeutralStroke1","colorSubtleBackgroundHover","colorNeutralForeground2BrandHover","colorSubtleBackgroundPressed","colorNeutralForeground2BrandPressed","brand","colorBrandBackground2","colorBrandForeground2","colorBrandBackground2Hover","colorCompoundBrandForeground1Hover","colorBrandBackground2Pressed","colorCompoundBrandForeground1Pressed","selected","background","colorBrandBackground","colorNeutralForegroundOnBrand","colorBrandStroke1","forcedColorAdjust","colorBrandBackgroundHover","colorBrandBackgroundPressed","medium","paddingRight","small","left","width","bottom","top","useRootDisabledAppearances","colorNeutralBackgroundDisabled","colorNeutralForegroundDisabled","colorTransparentStrokeDisabled","colorNeutralStrokeDisabled","useRootWithoutMediaStyles","paddingLeft","useRootWithSecondaryActionStyles","base","borderRadiusNone","borderRightStyle","spacingHorizontalS","spacingHorizontalSNudge","useInteractionTagPrimaryStyles_unstable","state","rootRoundedBaseClassName","rootCircularBaseClassName","rootStyles","rootDisabledAppearances","rootWithoutMediaStyles","rootWithSecondaryActionStyles","iconStyles","mediaStyles","primaryTextStyles","secondaryTextBaseClassName","rootCircularContrastStyles","disabled","shape","size","className","hasSecondaryAction","withSecondaryText","withoutSecondaryText"],"mappings":"AAAA;AAGA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAGvF,SAASC,+BAA+B,QAAQ,0BAA0B;AAC1E,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,wBAAwB;AAClF,SACEC,aAAa,EACbC,cAAc,EACdC,oBAAoB,EACpB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E,KAAK,EACrCoG,YAAYd,IAAI,EAChBc,WAAW,CAACM,KAAK,EACjBd,MAAM5F,KAAK,CAAC2G,SAAS;IAEzB;IACA,IAAIf,MAAM3F,IAAI,EAAE;QACd,oDAAoD;QACpD2F,MAAM3F,IAAI,CAAC0G,SAAS,GAAGvH,aACrBU,gCAAgCG,IAAI,EACpCkG,WAAWb,IAAI,EACfa,UAAU,CAACO,KAAK,EAChBd,MAAM3F,IAAI,CAAC0G,SAAS;IAExB;IACA,IAAIf,MAAM1F,WAAW,EAAE;QACrB,oDAAoD;QACpD0F,MAAM1F,WAAW,CAACyG,SAAS,GAAGvH,aAC5BU,gCAAgCI,WAAW,EAE3CmG,kBAAkBf,IAAI,EACtBe,iBAAiB,CAACK,KAAK,EAEvBd,MAAMzF,aAAa,GAAGkG,kBAAkBQ,iBAAiB,GAAGR,kBAAkBS,oBAAoB,EAElGlB,MAAM1F,WAAW,CAACyG,SAAS;IAE/B;IACA,IAAIf,MAAMzF,aAAa,EAAE;QACvB,oDAAoD;QACpDyF,MAAMzF,aAAa,CAACwG,SAAS,GAAGvH,aAC9BU,gCAAgCK,aAAa,EAC7CmG,4BACAV,MAAMzF,aAAa,CAACwG,SAAS;IAEjC;IAEA,OAAOf;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport type { GriffelResetStyle } from '@griffel/react';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { InteractionTagPrimarySlots, InteractionTagPrimaryState } from './InteractionTagPrimary.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport {\n useIconStyles,\n useMediaStyles,\n usePrimaryTextStyles,\n useSecondaryTextBaseClassName,\n} from '../Tag/useTagStyles.styles';\n\nexport const interactionTagPrimaryClassNames: SlotClassNames<InteractionTagPrimarySlots> = {\n root: 'fui-InteractionTagPrimary',\n media: 'fui-InteractionTagPrimary__media',\n icon: 'fui-InteractionTagPrimary__icon',\n primaryText: 'fui-InteractionTagPrimary__primaryText',\n secondaryText: 'fui-InteractionTagPrimary__secondaryText',\n};\n\nconst baseStyles: GriffelResetStyle = {\n // reset default button style:\n color: 'inherit',\n fontFamily: 'inherit',\n padding: '0px',\n borderStyle: 'none',\n appearance: 'button',\n textAlign: 'unset',\n backgroundColor: 'transparent',\n\n display: 'inline-grid',\n height: '100%',\n alignItems: 'center',\n gridTemplateAreas: `\n \"media primary \"\n \"media secondary\"\n `,\n\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n zIndex: 1,\n }),\n};\n\nconst useRootRoundedBaseClassName = makeResetStyles({\n ...baseStyles,\n borderRadius: tokens.borderRadiusMedium,\n\n /**\n * Pseudo element to draw the border for windows high contrast mode -\n * when Tag is with secondary text, primary text has negative margin that covers the border.\n */\n '@media (forced-colors: active)': {\n position: 'relative',\n '::before': {\n content: '\"\"',\n borderTop: `${tokens.strokeWidthThin} solid`,\n position: 'absolute',\n inset: '-1px',\n borderTopLeftRadius: tokens.borderRadiusMedium,\n borderTopRightRadius: tokens.borderRadiusMedium,\n },\n },\n});\n\nconst useRootCircularBaseClassName = makeResetStyles({\n ...baseStyles,\n borderRadius: tokens.borderRadiusCircular,\n\n /**\n * Pseudo element to draw the border for windows high contrast mode -\n * when Tag is with secondary text, primary text has negative margin that covers the border.\n */\n '@media (forced-colors: active)': {\n position: 'relative',\n '::before': {\n content: '\"\"',\n borderTop: `${tokens.strokeWidthThin} solid`,\n borderLeft: `${tokens.strokeWidthThin} solid`,\n position: 'absolute',\n inset: '-1px',\n borderTopLeftRadius: tokens.borderRadiusCircular,\n borderBottomLeftRadius: tokens.borderRadiusCircular,\n },\n },\n});\n\n/**\n * Style override for pseudo element that draws the border for windows high contrast mode\n */\nconst useRootCircularContrastStyles = makeStyles({\n withoutSecondaryAction: {\n '@media (forced-colors: active)': {\n position: 'relative',\n '::before': {\n borderRight: `${tokens.strokeWidthThin} solid transparent`,\n borderTopRightRadius: tokens.borderRadiusCircular,\n borderBottomRightRadius: tokens.borderRadiusCircular,\n },\n },\n },\n});\n\nconst useRootStyles = makeStyles({\n filled: {\n backgroundColor: tokens.colorNeutralBackground3,\n color: tokens.colorNeutralForeground2,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n outline: {\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForeground2,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n color: tokens.colorNeutralForeground2BrandHover,\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorBrandForeground2,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorBrandBackground2Hover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackground2Pressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n selected: {\n background: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorBrandStroke1),\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n color: tokens.colorNeutralForegroundOnBrand,\n [`& .${iconFilledClassName}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n color: tokens.colorNeutralForegroundOnBrand,\n [`& .${iconFilledClassName}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n },\n medium: {\n paddingRight: '7px',\n },\n small: {\n paddingRight: '5px',\n },\n 'extra-small': {\n paddingRight: '5px',\n position: 'relative',\n\n // Increase clickable area to meet WCAG 2.2 AA\n // https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html\n '@media (forced-colors: none)': {\n '&:before, &:after': {\n content: '\"\"',\n position: 'absolute',\n height: '2px',\n left: '0',\n width: '100%',\n },\n '&:before': {\n bottom: '100%',\n },\n '&:after': {\n top: '100%',\n },\n },\n },\n});\nconst useRootDisabledAppearances = makeStyles({\n filled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n },\n outline: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n brand: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n },\n});\n\n/**\n * Styles for InteractionTagPrimary without leading media/icon\n */\nconst useRootWithoutMediaStyles = makeStyles({\n medium: {\n paddingLeft: '7px',\n },\n small: {\n paddingLeft: '5px',\n },\n 'extra-small': {\n paddingLeft: '5px',\n },\n});\n/**\n * Styles for InteractionTagPrimary when InteractionTag has a Secondary button\n */\nconst useRootWithSecondaryActionStyles = makeStyles({\n base: {\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n ...createCustomFocusIndicatorStyle({\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n }),\n '@media (forced-colors: active)': {\n '::before': {\n borderTopRightRadius: '0',\n },\n },\n },\n medium: {\n paddingRight: tokens.spacingHorizontalS,\n },\n small: {\n paddingRight: tokens.spacingHorizontalSNudge,\n },\n 'extra-small': {\n paddingRight: tokens.spacingHorizontalSNudge,\n },\n});\n\nexport const useInteractionTagPrimaryStyles_unstable = (\n state: InteractionTagPrimaryState,\n): InteractionTagPrimaryState => {\n const rootRoundedBaseClassName = useRootRoundedBaseClassName();\n const rootCircularBaseClassName = useRootCircularBaseClassName();\n const rootStyles = useRootStyles();\n const rootDisabledAppearances = useRootDisabledAppearances();\n const rootWithoutMediaStyles = useRootWithoutMediaStyles();\n const rootWithSecondaryActionStyles = useRootWithSecondaryActionStyles();\n\n const iconStyles = useIconStyles();\n const mediaStyles = useMediaStyles();\n const primaryTextStyles = usePrimaryTextStyles();\n const secondaryTextBaseClassName = useSecondaryTextBaseClassName();\n\n const rootCircularContrastStyles = useRootCircularContrastStyles();\n\n const { disabled, shape, size, appearance, selected } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n interactionTagPrimaryClassNames.root,\n\n shape === 'rounded' ? rootRoundedBaseClassName : rootCircularBaseClassName,\n\n shape === 'circular' && !state.hasSecondaryAction && rootCircularContrastStyles.withoutSecondaryAction,\n\n disabled ? rootDisabledAppearances[appearance] : rootStyles[appearance],\n selected && !disabled && rootStyles.selected,\n rootStyles[size],\n\n !state.media && !state.icon && rootWithoutMediaStyles[size],\n state.hasSecondaryAction && rootWithSecondaryActionStyles.base,\n state.hasSecondaryAction && rootWithSecondaryActionStyles[size],\n\n state.root.className,\n );\n\n if (state.media) {\n // eslint-disable-next-line react-hooks/immutability\n state.media.className = mergeClasses(\n interactionTagPrimaryClassNames.media,\n mediaStyles.base,\n mediaStyles[size],\n state.media.className,\n );\n }\n if (state.icon) {\n // eslint-disable-next-line react-hooks/immutability\n state.icon.className = mergeClasses(\n interactionTagPrimaryClassNames.icon,\n iconStyles.base,\n iconStyles[size],\n state.icon.className,\n );\n }\n if (state.primaryText) {\n // eslint-disable-next-line react-hooks/immutability\n state.primaryText.className = mergeClasses(\n interactionTagPrimaryClassNames.primaryText,\n\n primaryTextStyles.base,\n primaryTextStyles[size],\n\n state.secondaryText ? primaryTextStyles.withSecondaryText : primaryTextStyles.withoutSecondaryText,\n\n state.primaryText.className,\n );\n }\n if (state.secondaryText) {\n // eslint-disable-next-line react-hooks/immutability\n state.secondaryText.className = mergeClasses(\n interactionTagPrimaryClassNames.secondaryText,\n secondaryTextBaseClassName,\n state.secondaryText.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","createCustomFocusIndicatorStyle","tokens","iconFilledClassName","iconRegularClassName","useIconStyles","useMediaStyles","usePrimaryTextStyles","useSecondaryTextBaseClassName","interactionTagPrimaryClassNames","root","media","icon","primaryText","secondaryText","baseStyles","color","fontFamily","padding","borderStyle","appearance","textAlign","backgroundColor","display","height","alignItems","gridTemplateAreas","border","strokeWidthThin","colorTransparentStroke","outline","strokeWidthThick","colorStrokeFocus2","zIndex","useRootRoundedBaseClassName","borderRadius","borderRadiusMedium","position","content","borderTop","inset","borderTopLeftRadius","borderTopRightRadius","useRootCircularBaseClassName","borderRadiusCircular","borderLeft","borderBottomLeftRadius","useRootCircularContrastStyles","withoutSecondaryAction","borderRight","borderBottomRightRadius","useRootStyles","filled","colorNeutralBackground3","colorNeutralForeground2","cursor","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","colorSubtleBackground","borderColor","colorNeutralStroke1","colorSubtleBackgroundHover","colorNeutralForeground2BrandHover","colorSubtleBackgroundPressed","colorNeutralForeground2BrandPressed","brand","colorBrandBackground2","colorBrandForeground2","colorBrandBackground2Hover","colorCompoundBrandForeground1Hover","colorBrandBackground2Pressed","colorCompoundBrandForeground1Pressed","selected","background","colorBrandBackground","colorNeutralForegroundOnBrand","colorBrandStroke1","forcedColorAdjust","colorBrandBackgroundHover","colorBrandBackgroundPressed","medium","paddingRight","small","left","width","bottom","top","useRootDisabledAppearances","colorNeutralBackgroundDisabled","colorNeutralForegroundDisabled","colorTransparentStrokeDisabled","colorNeutralStrokeDisabled","useRootWithoutMediaStyles","paddingLeft","useRootWithSecondaryActionStyles","base","borderRadiusNone","borderRightStyle","spacingHorizontalS","spacingHorizontalSNudge","useInteractionTagPrimaryStyles_unstable","state","rootRoundedBaseClassName","rootCircularBaseClassName","rootStyles","rootDisabledAppearances","rootWithoutMediaStyles","rootWithSecondaryActionStyles","iconStyles","mediaStyles","primaryTextStyles","secondaryTextBaseClassName","rootCircularContrastStyles","disabled","shape","size","className","hasSecondaryAction","withSecondaryText","withoutSecondaryText"],"mappings":"AAAA;AAGA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ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,kBAAkB,IAAIV,6BAA6B,CAACQ,KAAK,EAE/Dd,MAAM7F,IAAI,CAAC4G,SAAS;IAGtB,IAAIf,MAAM5F,KAAK,EAAE;QACf,oDAAoD;QACpD4F,MAAM5F,KAAK,CAAC2G,SAAS,GAAGvH,aACtBU,gCAAgCE,KAAK,EACrCoG,YAAYd,IAAI,EAChBc,WAAW,CAACM,KAAK,EACjBd,MAAM5F,KAAK,CAAC2G,SAAS;IAEzB;IACA,IAAIf,MAAM3F,IAAI,EAAE;QACd,oDAAoD;QACpD2F,MAAM3F,IAAI,CAAC0G,SAAS,GAAGvH,aACrBU,gCAAgCG,IAAI,EACpCkG,WAAWb,IAAI,EACfa,UAAU,CAACO,KAAK,EAChBd,MAAM3F,IAAI,CAAC0G,SAAS;IAExB;IACA,IAAIf,MAAM1F,WAAW,EAAE;QACrB,oDAAoD;QACpD0F,MAAM1F,WAAW,CAACyG,SAAS,GAAGvH,aAC5BU,gCAAgCI,WAAW,EAE3CmG,kBAAkBf,IAAI,EACtBe,iBAAiB,CAACK,KAAK,EAEvBd,MAAMzF,aAAa,GAAGkG,kBAAkBQ,iBAAiB,GAAGR,kBAAkBS,oBAAoB,EAElGlB,MAAM1F,WAAW,CAACyG,SAAS;IAE/B;IACA,IAAIf,MAAMzF,aAAa,EAAE;QACvB,oDAAoD;QACpDyF,MAAMzF,aAAa,CAACwG,SAAS,GAAGvH,aAC9BU,gCAAgCK,aAAa,EAC7CmG,4BACAV,MAAMzF,aAAa,CAACwG,SAAS;IAEjC;IAEA,OAAOf;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagSecondary/InteractionTagSecondary.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useInteractionTagSecondary_unstable } from './useInteractionTagSecondary';\nimport { renderInteractionTagSecondary_unstable } from './renderInteractionTagSecondary';\nimport { useInteractionTagSecondaryStyles_unstable } from './useInteractionTagSecondaryStyles.styles';\nimport type { InteractionTagSecondaryProps } from './InteractionTagSecondary.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * InteractionTagSecondary component - used as the second child of the `InteractionTag` component and provides the secondary action, which is dismiss by default.\n */\nexport const InteractionTagSecondary: ForwardRefComponent<InteractionTagSecondaryProps> = React.forwardRef(\n (props, ref) => {\n const state = useInteractionTagSecondary_unstable(props, ref);\n\n useInteractionTagSecondaryStyles_unstable(state);\n\n useCustomStyleHook_unstable('useInteractionTagSecondaryStyles_unstable')(state);\n\n return renderInteractionTagSecondary_unstable(state);\n },\n);\n\nInteractionTagSecondary.displayName = 'InteractionTagSecondary';\n"],"names":["React","useInteractionTagSecondary_unstable","renderInteractionTagSecondary_unstable","useInteractionTagSecondaryStyles_unstable","useCustomStyleHook_unstable","InteractionTagSecondary","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,mCAAmC,QAAQ,kCAA+B;AACnF,SAASC,sCAAsC,QAAQ,qCAAkC;AACzF,SAASC,yCAAyC,QAAQ,+CAA4C;AAEtG,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,wCAA6EL,MAAMM,UAAU,CACxG,CAACC,OAAOC;IACN,MAAMC,QAAQR,oCAAoCM,OAAOC;IAEzDL,0CAA0CM;IAE1CL,4BAA4B,6CAA6CK;IAEzE,OAAOP,uCAAuCO;AAChD,GACA;AAEFJ,wBAAwBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagSecondary/InteractionTagSecondary.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { InteractionTagContextValue } from '../../contexts/interactionTagContext';\n\nexport type InteractionTagSecondarySlots = {\n root: NonNullable<Slot<'button'>>;\n};\n\n/**\n * InteractionTagSecondary Props\n */\nexport type InteractionTagSecondaryProps = ComponentProps<InteractionTagSecondarySlots>;\n\n/**\n * State used in rendering InteractionTagSecondary\n */\nexport type InteractionTagSecondaryState = ComponentState<InteractionTagSecondarySlots> &\n Required<Pick<InteractionTagContextValue, 'appearance' | 'disabled' | 'selected' | 'shape' | 'size'>>;\n\n/**\n * InteractionTagSecondary Base Props - same as InteractionTagSecondaryProps (no design-only own props)\n */\nexport type InteractionTagSecondaryBaseProps = InteractionTagSecondaryProps;\n\n/**\n * InteractionTagSecondary Base State - omits design-only state derived from context\n */\nexport type InteractionTagSecondaryBaseState = Omit<InteractionTagSecondaryState, 'appearance' | 'size' | 'shape'>;\n"],"names":[],"mappings":"AAuBA;;CAEC,GACD,WAAmH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagSecondary/index.ts"],"sourcesContent":["export { InteractionTagSecondary } from './InteractionTagSecondary';\nexport type {\n InteractionTagSecondaryBaseProps,\n InteractionTagSecondaryBaseState,\n InteractionTagSecondaryProps,\n InteractionTagSecondarySlots,\n InteractionTagSecondaryState,\n} from './InteractionTagSecondary.types';\nexport { renderInteractionTagSecondary_unstable } from './renderInteractionTagSecondary';\nexport {\n useInteractionTagSecondaryBase_unstable,\n useInteractionTagSecondary_unstable,\n} from './useInteractionTagSecondary';\nexport {\n interactionTagSecondaryClassNames,\n useInteractionTagSecondaryStyles_unstable,\n} from './useInteractionTagSecondaryStyles.styles';\n"],"names":["InteractionTagSecondary","renderInteractionTagSecondary_unstable","useInteractionTagSecondaryBase_unstable","useInteractionTagSecondary_unstable","interactionTagSecondaryClassNames","useInteractionTagSecondaryStyles_unstable"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,+BAA4B;AAQpE,SAASC,sCAAsC,QAAQ,qCAAkC;AACzF,SACEC,uCAAuC,EACvCC,mCAAmC,QAC9B,kCAA+B;AACtC,SACEC,iCAAiC,EACjCC,yCAAyC,QACpC,+CAA4C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of InteractionTagSecondary
|
|
5
5
|
*/ export const renderInteractionTagSecondary_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
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 { InteractionTagSecondaryBaseState, InteractionTagSecondarySlots } from './InteractionTagSecondary.types';\n\n/**\n * Render the final JSX of InteractionTagSecondary\n */\nexport const renderInteractionTagSecondary_unstable = (state: InteractionTagSecondaryBaseState): JSXElement => {\n assertSlots<InteractionTagSecondarySlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderInteractionTagSecondary_unstable","state","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,yCAAyC,CAACC;IACrDF,YAA0CE;IAE1C,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -59,10 +59,9 @@ import { useInteractionTagContext_unstable } from "../../contexts/interactionTag
|
|
|
59
59
|
* @param props - props from this instance of InteractionTagSecondary
|
|
60
60
|
* @param ref - reference to root HTMLButtonElement of InteractionTagSecondary
|
|
61
61
|
*/ export const useInteractionTagSecondary_unstable = (props, ref)=>{
|
|
62
|
-
var _baseState_root;
|
|
62
|
+
var _baseState_root, _children;
|
|
63
63
|
const { appearance, shape, size } = useInteractionTagContext_unstable();
|
|
64
64
|
const baseState = useInteractionTagSecondaryBase_unstable(props, ref);
|
|
65
|
-
var _children;
|
|
66
65
|
(_children = (_baseState_root = baseState.root).children) !== null && _children !== void 0 ? _children : _baseState_root.children = /*#__PURE__*/ React.createElement(DismissRegular, null);
|
|
67
66
|
return {
|
|
68
67
|
...baseState,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagSecondary/useInteractionTagSecondary.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, slot, useId } from '@fluentui/react-utilities';\nimport { Delete, Backspace } from '@fluentui/keyboard-keys';\nimport { DismissRegular } from '@fluentui/react-icons';\nimport type {\n InteractionTagSecondaryBaseProps,\n InteractionTagSecondaryBaseState,\n InteractionTagSecondaryProps,\n InteractionTagSecondaryState,\n} from './InteractionTagSecondary.types';\nimport { useInteractionTagContext_unstable } from '../../contexts/interactionTagContext';\n\n/**\n * Create the base state required to render InteractionTagSecondary, without design-only props.\n *\n * @param props - props from this instance of InteractionTagSecondary\n * @param ref - reference to root HTMLButtonElement of InteractionTagSecondary\n */\nexport const useInteractionTagSecondaryBase_unstable = (\n props: InteractionTagSecondaryBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): InteractionTagSecondaryBaseState => {\n const { disabled, handleTagDismiss, interactionTagPrimaryId, selected, value } = useInteractionTagContext_unstable();\n\n const id = useId('fui-InteractionTagSecondary-', props.id);\n\n const onClick = useEventCallback((ev: React.MouseEvent<HTMLButtonElement>) => {\n props?.onClick?.(ev);\n if (!ev.defaultPrevented) {\n handleTagDismiss?.(ev, { value });\n }\n });\n\n const onKeyDown = 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 return {\n disabled,\n selected,\n components: {\n root: 'button',\n },\n\n root: slot.always(\n getIntrinsicElementProps('button', {\n type: 'button',\n disabled,\n ref,\n 'aria-labelledby': `${interactionTagPrimaryId} ${id}`,\n ...props,\n id,\n onClick,\n onKeyDown,\n }),\n { elementType: 'button' },\n ),\n };\n};\n\n/**\n * Create the state required to render InteractionTagSecondary.\n *\n * The returned state can be modified with hooks such as useInteractionTagSecondaryStyles_unstable,\n * before being passed to renderInteractionTagSecondary_unstable.\n *\n * @param props - props from this instance of InteractionTagSecondary\n * @param ref - reference to root HTMLButtonElement of InteractionTagSecondary\n */\nexport const useInteractionTagSecondary_unstable = (\n props: InteractionTagSecondaryProps,\n ref: React.Ref<HTMLButtonElement>,\n): InteractionTagSecondaryState => {\n const { appearance, shape, size } = useInteractionTagContext_unstable();\n const baseState = useInteractionTagSecondaryBase_unstable(props, ref);\n\n baseState.root.children ??= <DismissRegular />;\n\n return {\n ...baseState,\n appearance,\n shape,\n size,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","slot","useId","Delete","Backspace","DismissRegular","useInteractionTagContext_unstable","useInteractionTagSecondaryBase_unstable","props","ref","disabled","handleTagDismiss","interactionTagPrimaryId","selected","value","id","onClick","ev","defaultPrevented","onKeyDown","key","components","root","always","type","elementType","useInteractionTagSecondary_unstable","baseState","appearance","shape","size","children"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,KAAK,QAAQ,4BAA4B;AACpG,SAASC,MAAM,EAAEC,SAAS,QAAQ,0BAA0B;AAC5D,SAASC,cAAc,QAAQ,wBAAwB;AAOvD,SAASC,iCAAiC,QAAQ,0CAAuC;AAEzF;;;;;CAKC,GACD,OAAO,MAAMC,0CAA0C,CACrDC,OACAC;IAEA,MAAM,EAAEC,QAAQ,EAAEC,gBAAg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,SAAS;QACZC;QACAC;QACAC;IACF;AACF,EAAE"}
|
package/lib/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.raw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { InteractionTagSecondarySlots, InteractionTagSecondaryState } from './InteractionTagSecondary.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const interactionTagSecondaryClassNames: SlotClassNames<InteractionTagSecondarySlots> = {\n root: 'fui-InteractionTagSecondary',\n};\n\nconst mediumIconSize = '20px';\nconst smallIconSize = '16px';\nconst extraSmallIconSize = '12px';\n\nconst useRootBaseClassName = makeResetStyles({\n // reset default button style:\n color: 'inherit',\n fontFamily: 'inherit',\n padding: '0px',\n borderStyle: 'none',\n appearance: 'button',\n textAlign: 'unset',\n backgroundColor: 'transparent',\n\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n }),\n\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n});\n\nconst useRootStyles = makeStyles({\n filled: {\n backgroundColor: tokens.colorNeutralBackground3,\n color: tokens.colorNeutralForeground2,\n borderTopWidth: 0,\n borderBottomWidth: 0,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2BrandHover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n '@media (forced-colors: active)': {\n borderTopWidth: `${tokens.strokeWidthThin}`,\n borderBottomWidth: `${tokens.strokeWidthThin}`,\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n outline: {\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForeground2,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2BrandHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorBrandForeground2,\n borderLeftColor: tokens.colorBrandStroke2, // divider\n borderTopWidth: 0,\n borderBottomWidth: 0,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorBrandBackground2Hover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackground2Pressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n '@media (forced-colors: active)': {\n borderTopWidth: `${tokens.strokeWidthThin}`,\n borderBottomWidth: `${tokens.strokeWidthThin}`,\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n selected: {\n background: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorBrandStroke1),\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n // divider\n borderLeftColor: tokens.colorNeutralStrokeOnBrand2,\n },\n\n rounded: {\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n },\n circular: {\n borderTopRightRadius: tokens.borderRadiusCircular,\n borderBottomRightRadius: tokens.borderRadiusCircular,\n },\n\n medium: {\n fontSize: mediumIconSize,\n paddingLeft: '5px',\n paddingRight: '5px',\n },\n small: {\n fontSize: smallIconSize,\n paddingLeft: '3px',\n paddingRight: '3px',\n },\n 'extra-small': {\n fontSize: extraSmallIconSize,\n paddingLeft: '5px',\n paddingRight: '5px',\n position: 'relative',\n\n '@media (forced-colors: none)': {\n '&:before, &:after': {\n content: '\"\"',\n position: 'absolute',\n height: '2px',\n left: '0',\n width: '100%',\n },\n '&:before': {\n bottom: '100%',\n },\n '&:after': {\n top: '100%',\n },\n },\n },\n});\nconst useRootDisabledStyles = makeStyles({\n filled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n borderLeftColor: tokens.colorNeutralStrokeDisabled, // divider\n },\n outline: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n brand: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n borderLeftColor: tokens.colorNeutralStrokeDisabled, // divider\n },\n});\n\nexport const useInteractionTagSecondaryStyles_unstable = (\n state: InteractionTagSecondaryState,\n): InteractionTagSecondaryState => {\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n\n const { disabled, selected, shape, size, appearance } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n interactionTagSecondaryClassNames.root,\n rootBaseClassName,\n disabled ? rootDisabledStyles[appearance] : rootStyles[appearance],\n rootStyles[shape],\n rootStyles[size],\n selected && !disabled && rootStyles.selected,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","createCustomFocusIndicatorStyle","tokens","interactionTagSecondaryClassNames","root","mediumIconSize","smallIconSize","extraSmallIconSize","useRootBaseClassName","color","fontFamily","padding","borderStyle","appearance","textAlign","backgroundColor","display","height","alignItems","outline","strokeWidthThick","colorStrokeFocus2","border","strokeWidthThin","colorTransparentStroke","borderLeftColor","colorNeutralStroke1","borderTopLeftRadius","borderRadiusNone","borderBottomLeftRadius","useRootStyles","filled","colorNeutralBackground3","colorNeutralForeground2","borderTopWidth","borderBottomWidth","cursor","colorNeutralBackground3Hover","colorNeutralForeground2BrandHover","colorNeutralBackground3Pressed","colorNeutralForeground2BrandPressed","colorSubtleBackground","borderColor","colorSubtleBackgroundHover","colorSubtleBackgroundPressed","brand","colorBrandBackground2","colorBrandForeground2","colorBrandStroke2","colorBrandBackground2Hover","colorCompoundBrandForeground1Hover","colorBrandBackground2Pressed","colorCompoundBrandForeground1Pressed","selected","background","colorBrandBackground","colorNeutralForegroundOnBrand","colorBrandStroke1","forcedColorAdjust","colorBrandBackgroundHover","colorBrandBackgroundPressed","colorNeutralStrokeOnBrand2","rounded","borderTopRightRadius","borderRadiusMedium","borderBottomRightRadius","circular","borderRadiusCircular","medium","fontSize","paddingLeft","paddingRight","small","position","content","left","width","bottom","top","useRootDisabledStyles","colorNeutralBackgroundDisabled","colorNeutralForegroundDisabled","colorTransparentStrokeDisabled","colorNeutralStrokeDisabled","useInteractionTagSecondaryStyles_unstable","state","rootBaseClassName","rootStyles","rootDisabledStyles","disabled","shape","size","className"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAGvF,SAASC,+BAA+B,QAAQ,0BAA0B;AAC1E,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,OAAO,MAAMC,oCAAkF;IAC7FC,MAAM;AACR,EAAE;AAEF,MAAMC,iBAAiB;AACvB,MAAMC,gBAAgB;AACtB,MAAMC,qBAAqB;AAE3B,MAAMC,uBAAuBX,gBAAgB;IAC3C,8BAA8B;IAC9BY,OAAO;IACPC,YAAY;IACZC,SAAS;IACTC,aAAa;IACbC,YAAY;IACZC,WAAW;IACXC,iBAAiB;IAEjBC,SAAS;IACTC,QAAQ;IACRC,YAAY;IAEZ,GAAGjB,gCAAgC;QACjCkB,SAAS,GAAGjB,OAAOkB,gBAAgB,CAAC,OAAO,EAAElB,OAAOmB,iBAAiB,EAAE;IACzE,EAAE;IAEFC,QAAQ,GAAGpB,OAAOqB,eAAe,CAAC,OAAO,EAAErB,OAAOsB,sBAAsB,EAAE;IAE1E,WAAW;IACXC,iBAAiBvB,OAAOwB,mBAAmB;IAC3CC,qBAAqBzB,OAAO0B,gBAAgB;IAC5CC,wBAAwB3B,OAAO0B,gBAAgB;AACjD;AAEA,MAAME,gBAAgBhC,WAAW;IAC/BiC,QAAQ;QACNhB,iBAAiBb,OAAO8B,uBAAuB;QAC/CvB,OAAOP,OAAO+B,uBAAuB;QACrCC,gBAAgB;QAChBC,mBAAmB;QACnB,UAAU;YACRC,QAAQ;YACRrB,iBAAiBb,OAAOmC,4BAA4B;YACpD5B,OAAOP,OAAOoC,iCAAiC;QACjD;QACA,WAAW;YACTvB,iBAAiBb,OAAOqC,8BAA8B;YACtD9B,OAAOP,OAAOsC,mCAAmC;QACnD;QACA,kCAAkC;YAChCN,gBAAgB,GAAGhC,OAAO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CAACxC,OAAOiF,0BAA0B,CAAC;IAC9D;IACAtC,OAAO;QACLT,QAAQ;QACRrB,iBAAiBb,OAAO8E,8BAA8B;QACtDvE,OAAOP,OAAO+E,8BAA8B;QAC5C,GAAGjF,WAAW0C,WAAW,CAACxC,OAAOgF,8BAA8B,CAAC;QAChEzD,iBAAiBvB,OAAOiF,0BAA0B;IACpD;AACF;AAEA,OAAO,MAAMC,4CAA4C,CACvDC;IAEA,MAAMC,oBAAoB9E;IAC1B,MAAM+E,aAAazD;IACnB,MAAM0D,qBAAqBT;IAE3B,MAAM,EAAEU,QAAQ,EAAEpC,QAAQ,EAAEqC,KAAK,EAAEC,IAAI,EAAE9E,UAAU,EAAE,GAAGwE;IAExD,oDAAoD;IACpDA,MAAMjF,IAAI,CAACwF,SAAS,GAAG7F,aACrBI,kCAAkCC,IAAI,EACtCkF,mBACAG,WAAWD,kBAAkB,CAAC3E,WAAW,GAAG0E,UAAU,CAAC1E,WAAW,EAClE0E,UAAU,CAACG,MAAM,EACjBH,UAAU,CAACI,KAAK,EAChBtC,YAAY,CAACoC,YAAYF,WAAWlC,QAAQ,EAC5CgC,MAAMjF,IAAI,CAACwF,SAAS;IAGtB,OAAOP;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { InteractionTagSecondarySlots, InteractionTagSecondaryState } from './InteractionTagSecondary.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const interactionTagSecondaryClassNames: SlotClassNames<InteractionTagSecondarySlots> = {\n root: 'fui-InteractionTagSecondary',\n};\n\nconst mediumIconSize = '20px';\nconst smallIconSize = '16px';\nconst extraSmallIconSize = '12px';\n\nconst useRootBaseClassName = makeResetStyles({\n // reset default button style:\n color: 'inherit',\n fontFamily: 'inherit',\n padding: '0px',\n borderStyle: 'none',\n appearance: 'button',\n textAlign: 'unset',\n backgroundColor: 'transparent',\n\n display: 'flex',\n height: '100%',\n alignItems: 'center',\n\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n }),\n\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n});\n\nconst useRootStyles = makeStyles({\n filled: {\n backgroundColor: tokens.colorNeutralBackground3,\n color: tokens.colorNeutralForeground2,\n borderTopWidth: 0,\n borderBottomWidth: 0,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2BrandHover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n '@media (forced-colors: active)': {\n borderTopWidth: `${tokens.strokeWidthThin}`,\n borderBottomWidth: `${tokens.strokeWidthThin}`,\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n outline: {\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForeground2,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2BrandHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorBrandForeground2,\n borderLeftColor: tokens.colorBrandStroke2, // divider\n borderTopWidth: 0,\n borderBottomWidth: 0,\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorBrandBackground2Hover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackground2Pressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n '@media (forced-colors: active)': {\n borderTopWidth: `${tokens.strokeWidthThin}`,\n borderBottomWidth: `${tokens.strokeWidthThin}`,\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n selected: {\n background: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorBrandStroke1),\n '@media (forced-colors: active)': {\n forcedColorAdjust: 'none',\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n color: tokens.colorNeutralForegroundOnBrand,\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n color: 'HighlightText',\n },\n },\n // divider\n borderLeftColor: tokens.colorNeutralStrokeOnBrand2,\n },\n\n rounded: {\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n },\n circular: {\n borderTopRightRadius: tokens.borderRadiusCircular,\n borderBottomRightRadius: tokens.borderRadiusCircular,\n },\n\n medium: {\n fontSize: mediumIconSize,\n paddingLeft: '5px',\n paddingRight: '5px',\n },\n small: {\n fontSize: smallIconSize,\n paddingLeft: '3px',\n paddingRight: '3px',\n },\n 'extra-small': {\n fontSize: extraSmallIconSize,\n paddingLeft: '5px',\n paddingRight: '5px',\n position: 'relative',\n\n '@media (forced-colors: none)': {\n '&:before, &:after': {\n content: '\"\"',\n position: 'absolute',\n height: '2px',\n left: '0',\n width: '100%',\n },\n '&:before': {\n bottom: '100%',\n },\n '&:after': {\n top: '100%',\n },\n },\n },\n});\nconst useRootDisabledStyles = makeStyles({\n filled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n borderLeftColor: tokens.colorNeutralStrokeDisabled, // divider\n },\n outline: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorSubtleBackground,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n brand: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n borderLeftColor: tokens.colorNeutralStrokeDisabled, // divider\n },\n});\n\nexport const useInteractionTagSecondaryStyles_unstable = (\n state: InteractionTagSecondaryState,\n): InteractionTagSecondaryState => {\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n\n const { disabled, selected, shape, size, appearance } = state;\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n interactionTagSecondaryClassNames.root,\n rootBaseClassName,\n disabled ? rootDisabledStyles[appearance] : rootStyles[appearance],\n rootStyles[shape],\n rootStyles[size],\n selected && !disabled && rootStyles.selected,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","createCustomFocusIndicatorStyle","tokens","interactionTagSecondaryClassNames","root","mediumIconSize","smallIconSize","extraSmallIconSize","useRootBaseClassName","color","fontFamily","padding","borderStyle","appearance","textAlign","backgroundColor","display","height","alignItems","outline","strokeWidthThick","colorStrokeFocus2","border","strokeWidthThin","colorTransparentStroke","borderLeftColor","colorNeutralStroke1","borderTopLeftRadius","borderRadiusNone","borderBottomLeftRadius","useRootStyles","filled","colorNeutralBackground3","colorNeutralForeground2","borderTopWidth","borderBottomWidth","cursor","colorNeutralBackground3Hover","colorNeutralForeground2BrandHover","colorNeutralBackground3Pressed","colorNeutralForeground2BrandPressed","colorSubtleBackground","borderColor","colorSubtleBackgroundHover","colorSubtleBackgroundPressed","brand","colorBrandBackground2","colorBrandForeground2","colorBrandStroke2","colorBrandBackground2Hover","colorCompoundBrandForeground1Hover","colorBrandBackground2Pressed","colorCompoundBrandForeground1Pressed","selected","background","colorBrandBackground","colorNeutralForegroundOnBrand","colorBrandStroke1","forcedColorAdjust","colorBrandBackgroundHover","colorBrandBackgroundPressed","colorNeutralStrokeOnBrand2","rounded","borderTopRightRadius","borderRadiusMedium","borderBottomRightRadius","circular","borderRadiusCircular","medium","fontSize","paddingLeft","paddingRight","small","position","content","left","width","bottom","top","useRootDisabledStyles","colorNeutralBackgroundDisabled","colorNeutralForegroundDisabled","colorTransparentStrokeDisabled","colorNeutralStrokeDisabled","useInteractionTagSecondaryStyles_unstable","state","rootBaseClassName","rootStyles","rootDisabledStyles","disabled","shape","size","className"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAGvF,SAASC,+BAA+B,QAAQ,0BAA0B;AAC1E,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,OAAO,MAAMC,oCAAkF;IAC7FC,MAAM;AACR,EAAE;AAEF,MAAMC,iBAAiB;AACvB,MAAMC,gBAAgB;AACtB,MAAMC,qBAAqB;AAE3B,MAAMC,uBAAuBX,gBAAgB;IAC3C,8BAA8B;IAC9BY,OAAO;IACPC,YAAY;IACZC,SAAS;IACTC,aAAa;IACbC,YAAY;IACZC,WAAW;IACXC,iBAAiB;IAEjBC,SAAS;IACTC,QAAQ;IACRC,YAAY;IAEZ,GAAGjB,gCAAgC;QACjCkB,SAAS,GAAGjB,OAAOk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W,EAClE0E,UAAU,CAACG,MAAM,EACjBH,UAAU,CAACI,KAAK,EAChBtC,YAAY,CAACoC,YAAYF,WAAWlC,QAAQ,EAC5CgC,MAAMjF,IAAI,CAACwF,SAAS;IAGtB,OAAOP;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Tag/Tag.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTag_unstable } from './useTag';\nimport { renderTag_unstable } from './renderTag';\nimport { useTagStyles_unstable } from './useTagStyles.styles';\nimport type { TagProps } from './Tag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useTagAvatarContextValues_unstable } from '../../utils';\n\n/**\n * Tag component - a visual representation of an attribute.\n * Provides visual attributes such as media, icon, primary and secondary text, as well as the ability to attach an action (by default it is dismiss)\n */\nexport const Tag: ForwardRefComponent<TagProps> = React.forwardRef((props, ref) => {\n const state = useTag_unstable(props, ref);\n\n useTagStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTagStyles_unstable')(state);\n\n return renderTag_unstable(state, useTagAvatarContextValues_unstable(state));\n});\n\nTag.displayName = 'Tag';\n"],"names":["React","useTag_unstable","renderTag_unstable","useTagStyles_unstable","useCustomStyleHook_unstable","useTagAvatarContextValues_unstable","Tag","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,QAAQ,cAAW;AAC3C,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,qBAAqB,QAAQ,2BAAwB;AAG9D,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,kCAAkC,QAAQ,uBAAc;AAEjE;;;CAGC,GACD,OAAO,MAAMC,oBAAqCN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACzE,MAAMC,QAAQT,gBAAgBO,OAAOC;IAErCN,sBAAsBO;IAEtBN,4BAA4B,yBAAyBM;IAErD,OAAOR,mBAAmBQ,OAAOL,mCAAmCK;AACtE,GAAG;AAEHJ,IAAIK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Tag/Tag.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { TagAppearance, TagShape, TagSize } from '../../utils/types';\nimport type { TagAvatarContextValues, UseTagAvatarContextValuesOptions } from '../../utils/useTagAvatarContextValues';\n\nexport type TagContextValues = TagAvatarContextValues;\n\nexport type TagSlots = {\n root: NonNullable<Slot<'button', 'span'>>;\n\n /**\n * Slot for a visual element, usually an avatar\n */\n media?: Slot<'span'>;\n\n /**\n * Slot for an icon\n */\n icon?: Slot<'span'>;\n\n /**\n * Main text for the Tag. Children of the root slot are automatically rendered here\n */\n primaryText: Slot<'span'>;\n\n /**\n * Secondary text that describes or complements the main text\n */\n secondaryText?: Slot<'span'>;\n\n /**\n * Slot for the dismiss icon\n */\n dismissIcon?: Slot<'span'>;\n};\n\n/**\n * Tag Props\n */\nexport type TagProps<Value = string> = ComponentProps<Partial<TagSlots>> & {\n /**\n * A Tag can have filled, outlined or brand experience.\n *\n * @default 'filled'\n */\n appearance?: TagAppearance;\n\n /**\n * A Tag can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * A Tag can be dismissible\n *\n * @default false\n */\n dismissible?: boolean;\n\n /**\n * An InteractionTag can be selected.\n * Note: This prop only changes the appearance of the tag at the moment. A future PR will add the integration with TagGroup.\n *\n * @default false\n */\n selected?: boolean;\n\n /**\n * A Tag can have rounded or circular shape.\n *\n * @default 'round'\n */\n shape?: TagShape;\n\n /**\n * A Tag has three sizes.\n *\n * @default 'medium'\n */\n size?: TagSize;\n\n /**\n * Unique value identifying the tag within a TagGroup\n */\n value?: Value;\n};\n\n/**\n * State used in rendering Tag\n */\nexport type TagState = ComponentState<TagSlots> &\n Required<Pick<TagProps, 'appearance' | 'disabled' | 'dismissible' | 'selected' | 'shape' | 'size'>> &\n UseTagAvatarContextValuesOptions;\n\n/**\n * Tag Base Props - omits design-only props\n */\nexport type TagBaseProps = DistributiveOmit<TagProps, 'appearance' | 'size' | 'shape'>;\n\n/**\n * Tag Base State - omits design-only state\n */\nexport type TagBaseState = DistributiveOmit<TagState, 'appearance' | 'size' | 'shape' | 'avatarShape' | 'avatarSize'>;\n"],"names":[],"mappings":"AAoGA;;CAEC,GACD,WAAsH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Tag/index.ts"],"sourcesContent":["export { Tag } from './Tag';\nexport type { TagBaseProps, TagBaseState, TagContextValues, TagProps, TagSlots, TagState } from './Tag.types';\nexport { renderTag_unstable } from './renderTag';\nexport { useTagBase_unstable, useTag_unstable } from './useTag';\nexport {\n tagClassNames,\n useIconStyles,\n useMediaStyles,\n usePrimaryTextStyles,\n useSecondaryTextBaseClassName,\n useTagStyles_unstable,\n} from './useTagStyles.styles';\n"],"names":["Tag","renderTag_unstable","useTagBase_unstable","useTag_unstable","tagClassNames","useIconStyles","useMediaStyles","usePrimaryTextStyles","useSecondaryTextBaseClassName","useTagStyles_unstable"],"mappings":"AAAA,SAASA,GAAG,QAAQ,WAAQ;AAE5B,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,cAAW;AAChE,SACEC,aAAa,EACbC,aAAa,EACbC,cAAc,EACdC,oBAAoB,EACpBC,6BAA6B,EAC7BC,qBAAqB,QAChB,2BAAwB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
import { AvatarContextProvider } from "@fluentui/react-avatar";
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of Tag
|