@fluentui/react-tags 0.0.0-nightly-20231004-0414.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +958 -0
- package/CHANGELOG.md +302 -0
- package/LICENSE +15 -0
- package/README.md +72 -0
- package/dist/index.d.ts +405 -0
- package/lib/InteractionTag.js +1 -0
- package/lib/InteractionTag.js.map +1 -0
- package/lib/InteractionTagPrimary.js +1 -0
- package/lib/InteractionTagPrimary.js.map +1 -0
- package/lib/InteractionTagSecondary.js +1 -0
- package/lib/InteractionTagSecondary.js.map +1 -0
- package/lib/Tag.js +1 -0
- package/lib/Tag.js.map +1 -0
- package/lib/TagGroup.js +1 -0
- package/lib/TagGroup.js.map +1 -0
- package/lib/components/InteractionTag/InteractionTag.js +16 -0
- package/lib/components/InteractionTag/InteractionTag.js.map +1 -0
- package/lib/components/InteractionTag/InteractionTag.types.js +1 -0
- package/lib/components/InteractionTag/InteractionTag.types.js.map +1 -0
- package/lib/components/InteractionTag/index.js +6 -0
- package/lib/components/InteractionTag/index.js.map +1 -0
- package/lib/components/InteractionTag/renderInteractionTag.js +12 -0
- package/lib/components/InteractionTag/renderInteractionTag.js.map +1 -0
- package/lib/components/InteractionTag/useInteractionTag.js +36 -0
- package/lib/components/InteractionTag/useInteractionTag.js.map +1 -0
- package/lib/components/InteractionTag/useInteractionTagContextValues.js +23 -0
- package/lib/components/InteractionTag/useInteractionTagContextValues.js.map +1 -0
- package/lib/components/InteractionTag/useInteractionTagStyles.styles.js +45 -0
- package/lib/components/InteractionTag/useInteractionTagStyles.styles.js.map +1 -0
- package/lib/components/InteractionTagPrimary/InteractionTagPrimary.js +16 -0
- package/lib/components/InteractionTagPrimary/InteractionTagPrimary.js.map +1 -0
- package/lib/components/InteractionTagPrimary/InteractionTagPrimary.types.js +1 -0
- package/lib/components/InteractionTagPrimary/InteractionTagPrimary.types.js.map +1 -0
- package/lib/components/InteractionTagPrimary/index.js +5 -0
- package/lib/components/InteractionTagPrimary/index.js.map +1 -0
- package/lib/components/InteractionTagPrimary/renderInteractionTagPrimary.js +19 -0
- package/lib/components/InteractionTagPrimary/renderInteractionTagPrimary.js.map +1 -0
- package/lib/components/InteractionTagPrimary/useInteractionTagPrimary.js +64 -0
- package/lib/components/InteractionTagPrimary/useInteractionTagPrimary.js.map +1 -0
- package/lib/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.js +232 -0
- package/lib/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.js.map +1 -0
- package/lib/components/InteractionTagSecondary/InteractionTagSecondary.js +14 -0
- package/lib/components/InteractionTagSecondary/InteractionTagSecondary.js.map +1 -0
- package/lib/components/InteractionTagSecondary/InteractionTagSecondary.types.js +1 -0
- package/lib/components/InteractionTagSecondary/InteractionTagSecondary.types.js.map +1 -0
- package/lib/components/InteractionTagSecondary/index.js +5 -0
- package/lib/components/InteractionTagSecondary/index.js.map +1 -0
- package/lib/components/InteractionTagSecondary/renderInteractionTagSecondary.js +8 -0
- package/lib/components/InteractionTagSecondary/renderInteractionTagSecondary.js.map +1 -0
- package/lib/components/InteractionTagSecondary/useInteractionTagSecondary.js +57 -0
- package/lib/components/InteractionTagSecondary/useInteractionTagSecondary.js.map +1 -0
- package/lib/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.js +126 -0
- package/lib/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.js.map +1 -0
- package/lib/components/Tag/Tag.js +16 -0
- package/lib/components/Tag/Tag.js.map +1 -0
- package/lib/components/Tag/Tag.types.js +1 -0
- package/lib/components/Tag/Tag.types.js.map +1 -0
- package/lib/components/Tag/index.js +5 -0
- package/lib/components/Tag/index.js.map +1 -0
- package/lib/components/Tag/renderTag.js +20 -0
- package/lib/components/Tag/renderTag.js.map +1 -0
- package/lib/components/Tag/useTag.js +98 -0
- package/lib/components/Tag/useTag.js.map +1 -0
- package/lib/components/Tag/useTagStyles.styles.js +320 -0
- package/lib/components/Tag/useTagStyles.styles.js.map +1 -0
- package/lib/components/TagGroup/TagGroup.js +16 -0
- package/lib/components/TagGroup/TagGroup.js.map +1 -0
- package/lib/components/TagGroup/TagGroup.types.js +1 -0
- package/lib/components/TagGroup/TagGroup.types.js.map +1 -0
- package/lib/components/TagGroup/index.js +6 -0
- package/lib/components/TagGroup/index.js.map +1 -0
- package/lib/components/TagGroup/renderTagGroup.js +12 -0
- package/lib/components/TagGroup/renderTagGroup.js.map +1 -0
- package/lib/components/TagGroup/useTagGroup.js +67 -0
- package/lib/components/TagGroup/useTagGroup.js.map +1 -0
- package/lib/components/TagGroup/useTagGroupContextValues.js +13 -0
- package/lib/components/TagGroup/useTagGroupContextValues.js.map +1 -0
- package/lib/components/TagGroup/useTagGroupStyles.styles.js +36 -0
- package/lib/components/TagGroup/useTagGroupStyles.styles.js.map +1 -0
- package/lib/contexts/interactionTagContext.js +16 -0
- package/lib/contexts/interactionTagContext.js.map +1 -0
- package/lib/contexts/tagGroupContext.js +11 -0
- package/lib/contexts/tagGroupContext.js.map +1 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/index.js +2 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/types.js +1 -0
- package/lib/utils/types.js.map +1 -0
- package/lib/utils/useTagAvatarContextValues.js +14 -0
- package/lib/utils/useTagAvatarContextValues.js.map +1 -0
- package/lib-commonjs/InteractionTag.js +6 -0
- package/lib-commonjs/InteractionTag.js.map +1 -0
- package/lib-commonjs/InteractionTagPrimary.js +6 -0
- package/lib-commonjs/InteractionTagPrimary.js.map +1 -0
- package/lib-commonjs/InteractionTagSecondary.js +6 -0
- package/lib-commonjs/InteractionTagSecondary.js.map +1 -0
- package/lib-commonjs/Tag.js +6 -0
- package/lib-commonjs/Tag.js.map +1 -0
- package/lib-commonjs/TagGroup.js +6 -0
- package/lib-commonjs/TagGroup.js.map +1 -0
- package/lib-commonjs/components/InteractionTag/InteractionTag.js +24 -0
- package/lib-commonjs/components/InteractionTag/InteractionTag.js.map +1 -0
- package/lib-commonjs/components/InteractionTag/InteractionTag.types.js +4 -0
- package/lib-commonjs/components/InteractionTag/InteractionTag.types.js.map +1 -0
- package/lib-commonjs/components/InteractionTag/index.js +11 -0
- package/lib-commonjs/components/InteractionTag/index.js.map +1 -0
- package/lib-commonjs/components/InteractionTag/renderInteractionTag.js +20 -0
- package/lib-commonjs/components/InteractionTag/renderInteractionTag.js.map +1 -0
- package/lib-commonjs/components/InteractionTag/useInteractionTag.js +39 -0
- package/lib-commonjs/components/InteractionTag/useInteractionTag.js.map +1 -0
- package/lib-commonjs/components/InteractionTag/useInteractionTagContextValues.js +34 -0
- package/lib-commonjs/components/InteractionTag/useInteractionTagContextValues.js.map +1 -0
- package/lib-commonjs/components/InteractionTag/useInteractionTagStyles.styles.js +93 -0
- package/lib-commonjs/components/InteractionTag/useInteractionTagStyles.styles.js.map +1 -0
- package/lib-commonjs/components/InteractionTagPrimary/InteractionTagPrimary.js +24 -0
- package/lib-commonjs/components/InteractionTagPrimary/InteractionTagPrimary.js.map +1 -0
- package/lib-commonjs/components/InteractionTagPrimary/InteractionTagPrimary.types.js +4 -0
- package/lib-commonjs/components/InteractionTagPrimary/InteractionTagPrimary.types.js.map +1 -0
- package/lib-commonjs/components/InteractionTagPrimary/index.js +10 -0
- package/lib-commonjs/components/InteractionTagPrimary/index.js.map +1 -0
- package/lib-commonjs/components/InteractionTagPrimary/renderInteractionTagPrimary.js +27 -0
- package/lib-commonjs/components/InteractionTagPrimary/renderInteractionTagPrimary.js.map +1 -0
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimary.js +67 -0
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimary.js.map +1 -0
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.js +431 -0
- package/lib-commonjs/components/InteractionTagPrimary/useInteractionTagPrimaryStyles.styles.js.map +1 -0
- package/lib-commonjs/components/InteractionTagSecondary/InteractionTagSecondary.js +23 -0
- package/lib-commonjs/components/InteractionTagSecondary/InteractionTagSecondary.js.map +1 -0
- package/lib-commonjs/components/InteractionTagSecondary/InteractionTagSecondary.types.js +4 -0
- package/lib-commonjs/components/InteractionTagSecondary/InteractionTagSecondary.types.js.map +1 -0
- package/lib-commonjs/components/InteractionTagSecondary/index.js +10 -0
- package/lib-commonjs/components/InteractionTagSecondary/index.js.map +1 -0
- package/lib-commonjs/components/InteractionTagSecondary/renderInteractionTagSecondary.js +16 -0
- package/lib-commonjs/components/InteractionTagSecondary/renderInteractionTagSecondary.js.map +1 -0
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondary.js +60 -0
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondary.js.map +1 -0
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.js +261 -0
- package/lib-commonjs/components/InteractionTagSecondary/useInteractionTagSecondaryStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Tag/Tag.js +24 -0
- package/lib-commonjs/components/Tag/Tag.js.map +1 -0
- package/lib-commonjs/components/Tag/Tag.types.js +4 -0
- package/lib-commonjs/components/Tag/Tag.types.js.map +1 -0
- package/lib-commonjs/components/Tag/index.js +10 -0
- package/lib-commonjs/components/Tag/index.js.map +1 -0
- package/lib-commonjs/components/Tag/renderTag.js +28 -0
- package/lib-commonjs/components/Tag/renderTag.js.map +1 -0
- package/lib-commonjs/components/Tag/useTag.js +101 -0
- package/lib-commonjs/components/Tag/useTag.js.map +1 -0
- package/lib-commonjs/components/Tag/useTagStyles.styles.js +569 -0
- package/lib-commonjs/components/Tag/useTagStyles.styles.js.map +1 -0
- package/lib-commonjs/components/TagGroup/TagGroup.js +24 -0
- package/lib-commonjs/components/TagGroup/TagGroup.js.map +1 -0
- package/lib-commonjs/components/TagGroup/TagGroup.types.js +4 -0
- package/lib-commonjs/components/TagGroup/TagGroup.types.js.map +1 -0
- package/lib-commonjs/components/TagGroup/index.js +11 -0
- package/lib-commonjs/components/TagGroup/index.js.map +1 -0
- package/lib-commonjs/components/TagGroup/renderTagGroup.js +20 -0
- package/lib-commonjs/components/TagGroup/renderTagGroup.js.map +1 -0
- package/lib-commonjs/components/TagGroup/useTagGroup.js +70 -0
- package/lib-commonjs/components/TagGroup/useTagGroup.js.map +1 -0
- package/lib-commonjs/components/TagGroup/useTagGroupContextValues.js +24 -0
- package/lib-commonjs/components/TagGroup/useTagGroupContextValues.js.map +1 -0
- package/lib-commonjs/components/TagGroup/useTagGroupStyles.styles.js +51 -0
- package/lib-commonjs/components/TagGroup/useTagGroupStyles.styles.js.map +1 -0
- package/lib-commonjs/contexts/interactionTagContext.js +38 -0
- package/lib-commonjs/contexts/interactionTagContext.js.map +1 -0
- package/lib-commonjs/contexts/tagGroupContext.js +33 -0
- package/lib-commonjs/contexts/tagGroupContext.js.map +1 -0
- package/lib-commonjs/index.js +102 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/utils/index.js +7 -0
- package/lib-commonjs/utils/index.js.map +1 -0
- package/lib-commonjs/utils/types.js +6 -0
- package/lib-commonjs/utils/types.js.map +1 -0
- package/lib-commonjs/utils/useTagAvatarContextValues.js +25 -0
- package/lib-commonjs/utils/useTagAvatarContextValues.js.map +1 -0
- package/package.json +67 -0
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { Tag, renderTag_unstable, tagClassNames, useTagStyles_unstable, useTag_unstable } from './Tag';\nexport type { TagProps, TagSlots, TagState } from './Tag';\n\nexport {\n InteractionTag,\n renderInteractionTag_unstable,\n interactionTagClassNames,\n useInteractionTagStyles_unstable,\n useInteractionTag_unstable,\n useInteractionTagContextValues_unstable,\n} from './InteractionTag';\nexport type { InteractionTagProps, InteractionTagSlots, InteractionTagState } from './InteractionTag';\nexport {\n InteractionTagPrimary,\n interactionTagPrimaryClassNames,\n renderInteractionTagPrimary_unstable,\n useInteractionTagPrimaryStyles_unstable,\n useInteractionTagPrimary_unstable,\n} from './InteractionTagPrimary';\nexport type {\n InteractionTagPrimaryContextValues,\n InteractionTagPrimaryProps,\n InteractionTagPrimarySlots,\n InteractionTagPrimaryState,\n} from './InteractionTagPrimary';\nexport {\n InteractionTagSecondary,\n renderInteractionTagSecondary_unstable,\n interactionTagSecondaryClassNames,\n useInteractionTagSecondaryStyles_unstable,\n useInteractionTagSecondary_unstable,\n} from './InteractionTagSecondary';\nexport type {\n InteractionTagSecondaryProps,\n InteractionTagSecondarySlots,\n InteractionTagSecondaryState,\n} from './InteractionTagSecondary';\n\nexport {\n TagGroup,\n renderTagGroup_unstable,\n tagGroupClassNames,\n useTagGroupStyles_unstable,\n useTagGroup_unstable,\n useTagGroupContextValues_unstable,\n} from './TagGroup';\nexport type { TagGroupProps, TagGroupSlots, TagGroupState } from './TagGroup';\n\nexport { useTagAvatarContextValues_unstable } from './utils';\nexport type {\n TagAppearance,\n TagShape,\n TagSize,\n TagValue,\n TagDismissData,\n TagDismissEvent,\n TagDismissHandler,\n} from './utils/types';\n"],"names":["Tag","renderTag_unstable","tagClassNames","useTagStyles_unstable","useTag_unstable","InteractionTag","renderInteractionTag_unstable","interactionTagClassNames","useInteractionTagStyles_unstable","useInteractionTag_unstable","useInteractionTagContextValues_unstable","InteractionTagPrimary","interactionTagPrimaryClassNames","renderInteractionTagPrimary_unstable","useInteractionTagPrimaryStyles_unstable","useInteractionTagPrimary_unstable","InteractionTagSecondary","renderInteractionTagSecondary_unstable","interactionTagSecondaryClassNames","useInteractionTagSecondaryStyles_unstable","useInteractionTagSecondary_unstable","TagGroup","renderTagGroup_unstable","tagGroupClassNames","useTagGroupStyles_unstable","useTagGroup_unstable","useTagGroupContextValues_unstable","useTagAvatarContextValues_unstable"],"mappings":"AAAA,SAASA,GAAG,EAAEC,kBAAkB,EAAEC,aAAa,EAAEC,qBAAqB,EAAEC,eAAe,QAAQ,QAAQ;AAGvG,SACEC,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,EAC1BC,uCAAuC,QAClC,mBAAmB;AAE1B,SACEC,qBAAqB,EACrBC,+BAA+B,EAC/BC,oCAAoC,EACpCC,uCAAuC,EACvCC,iCAAiC,QAC5B,0BAA0B;AAOjC,SACEC,uBAAuB,EACvBC,sCAAsC,EACtCC,iCAAiC,EACjCC,yCAAyC,EACzCC,mCAAmC,QAC9B,4BAA4B;AAOnC,SACEC,QAAQ,EACRC,uBAAuB,EACvBC,kBAAkB,EAClBC,0BAA0B,EAC1BC,oBAAoB,EACpBC,iCAAiC,QAC5B,aAAa;AAGpB,SAASC,kCAAkC,QAAQ,UAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './types';\nexport * from './useTagAvatarContextValues';\n"],"names":[],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,8BAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type TagAppearance = 'filled' | 'outline' | 'brand';\nexport type TagShape = 'rounded' | 'circular';\nexport type TagSize = 'extra-small' | 'small' | 'medium';\n\nexport type TagValue = string;\n\nexport type TagDismissData<Value = TagValue> = {\n value: Value;\n};\n\nexport type TagDismissEvent = React.MouseEvent | React.KeyboardEvent;\n\nexport type TagDismissHandler<Value = TagValue> = (e: TagDismissEvent, data: TagDismissData<Value>) => void;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export function useTagAvatarContextValues_unstable(state) {
|
|
3
|
+
const { avatarSize, avatarShape } = state;
|
|
4
|
+
const avatar = React.useMemo(()=>({
|
|
5
|
+
size: avatarSize,
|
|
6
|
+
shape: avatarShape
|
|
7
|
+
}), [
|
|
8
|
+
avatarShape,
|
|
9
|
+
avatarSize
|
|
10
|
+
]);
|
|
11
|
+
return {
|
|
12
|
+
avatar
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useTagAvatarContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport { AvatarSize, AvatarShape } from '@fluentui/react-avatar';\n\nexport type UseTagAvatarContextValuesOptions = {\n avatarSize: AvatarSize;\n avatarShape: AvatarShape;\n};\n\nexport type TagAvatarContextValues = {\n avatar: {\n size?: AvatarSize;\n shape?: AvatarShape;\n };\n};\n\nexport function useTagAvatarContextValues_unstable(state: UseTagAvatarContextValuesOptions): TagAvatarContextValues {\n const { avatarSize, avatarShape } = state;\n\n const avatar = React.useMemo(\n () => ({\n size: avatarSize,\n shape: avatarShape,\n }),\n [avatarShape, avatarSize],\n );\n\n return {\n avatar,\n };\n}\n"],"names":["React","useTagAvatarContextValues_unstable","state","avatarSize","avatarShape","avatar","useMemo","size","shape"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAe/B,OAAO,SAASC,mCAAmCC,KAAuC;IACxF,MAAM,EAAEC,UAAU,EAAEC,WAAW,EAAE,GAAGF;IAEpC,MAAMG,SAASL,MAAMM,OAAO,CAC1B,IAAO,CAAA;YACLC,MAAMJ;YACNK,OAAOJ;QACT,CAAA,GACA;QAACA;QAAaD;KAAW;IAG3B,OAAO;QACLE;IACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InteractionTag.js"],"sourcesContent":["export * from './components/InteractionTag/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InteractionTagPrimary.js"],"sourcesContent":["export * from './components/InteractionTagPrimary/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InteractionTagSecondary.js"],"sourcesContent":["export * from './components/InteractionTagSecondary/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Tag.js"],"sourcesContent":["export * from './components/Tag/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["TagGroup.js"],"sourcesContent":["export * from './components/TagGroup/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "InteractionTag", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return InteractionTag;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useInteractionTag = require("./useInteractionTag");
|
|
14
|
+
const _renderInteractionTag = require("./renderInteractionTag");
|
|
15
|
+
const _useInteractionTagStylesstyles = require("./useInteractionTagStyles.styles");
|
|
16
|
+
const _useInteractionTagContextValues = require("./useInteractionTagContextValues");
|
|
17
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
18
|
+
const InteractionTag = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
19
|
+
const state = (0, _useInteractionTag.useInteractionTag_unstable)(props, ref);
|
|
20
|
+
(0, _useInteractionTagStylesstyles.useInteractionTagStyles_unstable)(state);
|
|
21
|
+
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useInteractionTagStyles_unstable')(state);
|
|
22
|
+
return (0, _renderInteractionTag.renderInteractionTag_unstable)(state, (0, _useInteractionTagContextValues.useInteractionTagContextValues_unstable)(state));
|
|
23
|
+
});
|
|
24
|
+
InteractionTag.displayName = 'InteractionTag';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InteractionTag.js"],"sourcesContent":["import * 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 { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 */ export const InteractionTag = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useInteractionTag_unstable(props, ref);\n useInteractionTagStyles_unstable(state);\n useCustomStyleHook_unstable('useInteractionTagStyles_unstable')(state);\n return renderInteractionTag_unstable(state, useInteractionTagContextValues_unstable(state));\n});\nInteractionTag.displayName = 'InteractionTag';\n"],"names":["InteractionTag","React","forwardRef","props","ref","state","useInteractionTag_unstable","useInteractionTagStyles_unstable","useCustomStyleHook_unstable","renderInteractionTag_unstable","useInteractionTagContextValues_unstable","displayName"],"mappings":";;;;+BASiBA;;;eAAAA;;;;iEATM;mCACoB;sCACG;+CACG;gDACO;qCACZ;AAIjC,MAAMA,iBAAiB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrE,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,+DAAgC,EAACF;IACjCG,IAAAA,gDAA2B,EAAC,oCAAoCH;IAChE,OAAOI,IAAAA,mDAA6B,EAACJ,OAAOK,IAAAA,uEAAuC,EAACL;AACxF;AACAL,eAAeW,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./InteractionTag"), exports);
|
|
7
|
+
_export_star._(require("./InteractionTag.types"), exports);
|
|
8
|
+
_export_star._(require("./renderInteractionTag"), exports);
|
|
9
|
+
_export_star._(require("./useInteractionTag"), exports);
|
|
10
|
+
_export_star._(require("./useInteractionTagStyles.styles"), exports);
|
|
11
|
+
_export_star._(require("./useInteractionTagContextValues"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './InteractionTag';\nexport * from './InteractionTag.types';\nexport * from './renderInteractionTag';\nexport * from './useInteractionTag';\nexport * from './useInteractionTagStyles.styles';\nexport * from './useInteractionTagContextValues';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderInteractionTag_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderInteractionTag_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
13
|
+
const _interactionTagContext = require("../../contexts/interactionTagContext");
|
|
14
|
+
const renderInteractionTag_unstable = (state, contextValues)=>{
|
|
15
|
+
(0, _reactutilities.assertSlots)(state);
|
|
16
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_interactionTagContext.InteractionTagContextProvider, {
|
|
17
|
+
value: contextValues.interactionTag,
|
|
18
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
|
|
19
|
+
});
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderInteractionTag.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { InteractionTagContextProvider } from '../../contexts/interactionTagContext';\n/**\n * Render the final JSX of InteractionTag\n */ export const renderInteractionTag_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsx(InteractionTagContextProvider, {\n value: contextValues.interactionTag,\n children: /*#__PURE__*/ _jsx(state.root, {})\n });\n};\n"],"names":["renderInteractionTag_unstable","state","contextValues","assertSlots","_jsx","InteractionTagContextProvider","value","interactionTag","children","root"],"mappings":";;;;+BAKiBA;;;eAAAA;;;4BALa;gCACF;uCACkB;AAGnC,MAAMA,gCAAgC,CAACC,OAAOC;IACrDC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,eAAI,EAACC,oDAA6B,EAAE;QACrDC,OAAOJ,cAAcK,cAAc;QACnCC,UAAU,WAAW,GAAGJ,IAAAA,eAAI,EAACH,MAAMQ,IAAI,EAAE,CAAC;IAC9C;AACJ"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useInteractionTag_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useInteractionTag_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
14
|
+
const _tagGroupContext = require("../../contexts/tagGroupContext");
|
|
15
|
+
const useInteractionTag_unstable = (props, ref)=>{
|
|
16
|
+
const { handleTagDismiss, size: contextSize } = (0, _tagGroupContext.useTagGroupContext_unstable)();
|
|
17
|
+
const id = (0, _reactutilities.useId)('fui-InteractionTag-', props.id);
|
|
18
|
+
const interactionTagPrimaryId = (0, _reactutilities.useId)('fui-InteractionTagPrimary-');
|
|
19
|
+
const { appearance = 'filled', disabled = false, shape = 'rounded', size = contextSize, value = id } = props;
|
|
20
|
+
return {
|
|
21
|
+
appearance,
|
|
22
|
+
disabled,
|
|
23
|
+
handleTagDismiss,
|
|
24
|
+
interactionTagPrimaryId,
|
|
25
|
+
shape,
|
|
26
|
+
size,
|
|
27
|
+
value,
|
|
28
|
+
components: {
|
|
29
|
+
root: 'div'
|
|
30
|
+
},
|
|
31
|
+
root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
|
|
32
|
+
ref,
|
|
33
|
+
...props,
|
|
34
|
+
id
|
|
35
|
+
}), {
|
|
36
|
+
elementType: 'div'
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useInteractionTag.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { useTagGroupContext_unstable } from '../../contexts/tagGroupContext';\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 */ export const useInteractionTag_unstable = (props, ref)=>{\n const { handleTagDismiss, size: contextSize } = useTagGroupContext_unstable();\n const id = useId('fui-InteractionTag-', props.id);\n const interactionTagPrimaryId = useId('fui-InteractionTagPrimary-');\n const { appearance = 'filled', disabled = false, shape = 'rounded', size = contextSize, value = id } = props;\n return {\n appearance,\n disabled,\n handleTagDismiss,\n interactionTagPrimaryId,\n shape,\n size,\n value,\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref,\n ...props,\n id\n }), {\n elementType: 'div'\n })\n };\n};\n"],"names":["useInteractionTag_unstable","props","ref","handleTagDismiss","size","contextSize","useTagGroupContext_unstable","id","useId","interactionTagPrimaryId","appearance","disabled","shape","value","components","root","slot","always","getNativeElementProps","elementType"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCAC4B;iCACP;AASjC,MAAMA,6BAA6B,CAACC,OAAOC;IAClD,MAAM,EAAEC,gBAAgB,EAAEC,MAAMC,WAAW,EAAE,GAAGC,IAAAA,4CAA2B;IAC3E,MAAMC,KAAKC,IAAAA,qBAAK,EAAC,uBAAuBP,MAAMM,EAAE;IAChD,MAAME,0BAA0BD,IAAAA,qBAAK,EAAC;IACtC,MAAM,EAAEE,aAAa,QAAQ,EAAEC,WAAW,KAAK,EAAEC,QAAQ,SAAS,EAAER,OAAOC,WAAW,EAAEQ,QAAQN,EAAE,EAAE,GAAGN;IACvG,OAAO;QACHS;QACAC;QACAR;QACAM;QACAG;QACAR;QACAS;QACAC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3ChB;YACA,GAAGD,KAAK;YACRM;QACJ,IAAI;YACAY,aAAa;QACjB;IACJ;AACJ"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useInteractionTagContextValues_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useInteractionTagContextValues_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
function useInteractionTagContextValues_unstable(state) {
|
|
14
|
+
const { appearance, disabled, handleTagDismiss, interactionTagPrimaryId, shape, size, value } = state;
|
|
15
|
+
return {
|
|
16
|
+
interactionTag: _react.useMemo(()=>({
|
|
17
|
+
appearance,
|
|
18
|
+
disabled,
|
|
19
|
+
handleTagDismiss,
|
|
20
|
+
interactionTagPrimaryId,
|
|
21
|
+
shape,
|
|
22
|
+
size,
|
|
23
|
+
value
|
|
24
|
+
}), [
|
|
25
|
+
appearance,
|
|
26
|
+
disabled,
|
|
27
|
+
handleTagDismiss,
|
|
28
|
+
interactionTagPrimaryId,
|
|
29
|
+
shape,
|
|
30
|
+
size,
|
|
31
|
+
value
|
|
32
|
+
])
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useInteractionTagContextValues.js"],"sourcesContent":["import * as React from 'react';\nexport function useInteractionTagContextValues_unstable(state) {\n const { appearance, disabled, handleTagDismiss, interactionTagPrimaryId, shape, size, value } = state;\n return {\n interactionTag: React.useMemo(()=>({\n appearance,\n disabled,\n handleTagDismiss,\n interactionTagPrimaryId,\n shape,\n size,\n value\n }), [\n appearance,\n disabled,\n handleTagDismiss,\n interactionTagPrimaryId,\n shape,\n size,\n value\n ])\n };\n}\n"],"names":["useInteractionTagContextValues_unstable","state","appearance","disabled","handleTagDismiss","interactionTagPrimaryId","shape","size","value","interactionTag","React","useMemo"],"mappings":";;;;+BACgBA;;;eAAAA;;;;iEADO;AAChB,SAASA,wCAAwCC,KAAK;IACzD,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,uBAAuB,EAAEC,KAAK,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGP;IAChG,OAAO;QACHQ,gBAAgBC,OAAMC,OAAO,CAAC,IAAK,CAAA;gBAC3BT;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;gBACAC;YACJ,CAAA,GAAI;YACJN;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;SACH;IACL;AACJ"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
interactionTagClassNames: function() {
|
|
13
|
+
return interactionTagClassNames;
|
|
14
|
+
},
|
|
15
|
+
useInteractionTagStyles_unstable: function() {
|
|
16
|
+
return useInteractionTagStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _react = require("@griffel/react");
|
|
20
|
+
const interactionTagClassNames = {
|
|
21
|
+
root: 'fui-InteractionTag'
|
|
22
|
+
};
|
|
23
|
+
const useRootBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("r1y684pp", null, [
|
|
24
|
+
".r1y684pp{display:inline-flex;align-items:center;box-sizing:border-box;width:fit-content;}"
|
|
25
|
+
]);
|
|
26
|
+
const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
27
|
+
rounded: {
|
|
28
|
+
Bbmb7ep: [
|
|
29
|
+
"f1aa9q02",
|
|
30
|
+
"f16jpd5f"
|
|
31
|
+
],
|
|
32
|
+
Beyfa6y: [
|
|
33
|
+
"f16jpd5f",
|
|
34
|
+
"f1aa9q02"
|
|
35
|
+
],
|
|
36
|
+
B7oj6ja: [
|
|
37
|
+
"f1jar5jt",
|
|
38
|
+
"fyu767a"
|
|
39
|
+
],
|
|
40
|
+
Btl43ni: [
|
|
41
|
+
"fyu767a",
|
|
42
|
+
"f1jar5jt"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
circular: {
|
|
46
|
+
Bbmb7ep: [
|
|
47
|
+
"f8fbkgy",
|
|
48
|
+
"f1nfllo7"
|
|
49
|
+
],
|
|
50
|
+
Beyfa6y: [
|
|
51
|
+
"f1nfllo7",
|
|
52
|
+
"f8fbkgy"
|
|
53
|
+
],
|
|
54
|
+
B7oj6ja: [
|
|
55
|
+
"f1djnp8u",
|
|
56
|
+
"f1s8kh49"
|
|
57
|
+
],
|
|
58
|
+
Btl43ni: [
|
|
59
|
+
"f1s8kh49",
|
|
60
|
+
"f1djnp8u"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
medium: {
|
|
64
|
+
Bqenvij: "f1d2rq10"
|
|
65
|
+
},
|
|
66
|
+
small: {
|
|
67
|
+
Bqenvij: "frvgh55"
|
|
68
|
+
},
|
|
69
|
+
"extra-small": {
|
|
70
|
+
Bqenvij: "fjamq6b"
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
d: [
|
|
74
|
+
".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",
|
|
75
|
+
".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",
|
|
76
|
+
".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",
|
|
77
|
+
".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",
|
|
78
|
+
".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}",
|
|
79
|
+
".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}",
|
|
80
|
+
".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}",
|
|
81
|
+
".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}",
|
|
82
|
+
".f1d2rq10{height:32px;}",
|
|
83
|
+
".frvgh55{height:24px;}",
|
|
84
|
+
".fjamq6b{height:20px;}"
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
const useInteractionTagStyles_unstable = (state)=>{
|
|
88
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
89
|
+
const rootStyles = useRootStyles();
|
|
90
|
+
const { shape, size } = state;
|
|
91
|
+
state.root.className = (0, _react.mergeClasses)(interactionTagClassNames.root, rootBaseClassName, rootStyles[shape], rootStyles[size], state.root.className);
|
|
92
|
+
return state;
|
|
93
|
+
}; //# sourceMappingURL=useInteractionTagStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useInteractionTagStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const interactionTagClassNames = {\n root: 'fui-InteractionTag'\n};\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r1y684pp\", null, [\".r1y684pp{display:inline-flex;align-items:center;box-sizing:border-box;width:fit-content;}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n rounded: {\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"]\n },\n circular: {\n Bbmb7ep: [\"f8fbkgy\", \"f1nfllo7\"],\n Beyfa6y: [\"f1nfllo7\", \"f8fbkgy\"],\n B7oj6ja: [\"f1djnp8u\", \"f1s8kh49\"],\n Btl43ni: [\"f1s8kh49\", \"f1djnp8u\"]\n },\n medium: {\n Bqenvij: \"f1d2rq10\"\n },\n small: {\n Bqenvij: \"frvgh55\"\n },\n \"extra-small\": {\n Bqenvij: \"fjamq6b\"\n }\n}, {\n d: [\".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}\", \".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}\", \".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}\", \".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}\", \".f1d2rq10{height:32px;}\", \".frvgh55{height:24px;}\", \".fjamq6b{height:20px;}\"]\n});\n/**\n * Apply styling to the InteractionTag slots based on the state\n */\nexport const useInteractionTagStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n const {\n shape,\n size\n } = state;\n state.root.className = mergeClasses(interactionTagClassNames.root, rootBaseClassName, rootStyles[shape], rootStyles[size], state.root.className);\n return state;\n};\n//# sourceMappingURL=useInteractionTagStyles.styles.js.map"],"names":["interactionTagClassNames","useInteractionTagStyles_unstable","root","useRootBaseClassName","__resetStyles","useRootStyles","__styles","rounded","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","circular","medium","Bqenvij","small","d","state","rootBaseClassName","rootStyles","shape","size","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,wBAAwB;eAAxBA;;IAgCAC,gCAAgC;eAAhCA;;;uBAlCqD;AAE3D,MAAMD,2BAA2B;IACtCE,MAAM;AACR;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,MAAM;IAAC;CAA6F;AACxK,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IAC1CC,SAAS;QACPC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;YAAC;YAAW;SAAW;IAClC;IACAC,UAAU;QACRJ,SAAS;YAAC;YAAW;SAAW;QAChCC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAW;IACnC;IACAE,QAAQ;QACNC,SAAS;IACX;IACAC,OAAO;QACLD,SAAS;IACX;IACA,eAAe;QACbA,SAAS;IACX;AACF,GAAG;IACDE,GAAG;QAAC;QAAoE;QAAmE;QAAiE;QAA+D;QAAqE;QAAqE;QAAmE;QAAkE;QAA2B;QAA0B;KAAyB;AAC1mB;AAIO,MAAMf,mCAAmCgB,CAAAA;IAC9C,MAAMC,oBAAoBf;IAC1B,MAAMgB,aAAad;IACnB,MAAM,EACJe,KAAK,EACLC,IAAI,EACL,GAAGJ;IACJA,MAAMf,IAAI,CAACoB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,yBAAyBE,IAAI,EAAEgB,mBAAmBC,UAAU,CAACC,MAAM,EAAED,UAAU,CAACE,KAAK,EAAEJ,MAAMf,IAAI,CAACoB,SAAS;IAC/I,OAAOL;AACT,GACA,0DAA0D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "InteractionTagPrimary", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return InteractionTagPrimary;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useInteractionTagPrimary = require("./useInteractionTagPrimary");
|
|
14
|
+
const _renderInteractionTagPrimary = require("./renderInteractionTagPrimary");
|
|
15
|
+
const _useInteractionTagPrimaryStylesstyles = require("./useInteractionTagPrimaryStyles.styles");
|
|
16
|
+
const _utils = require("../../utils");
|
|
17
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
18
|
+
const InteractionTagPrimary = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
19
|
+
const state = (0, _useInteractionTagPrimary.useInteractionTagPrimary_unstable)(props, ref);
|
|
20
|
+
(0, _useInteractionTagPrimaryStylesstyles.useInteractionTagPrimaryStyles_unstable)(state);
|
|
21
|
+
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useInteractionTagPrimaryStyles_unstable')(state);
|
|
22
|
+
return (0, _renderInteractionTagPrimary.renderInteractionTagPrimary_unstable)(state, (0, _utils.useTagAvatarContextValues_unstable)(state));
|
|
23
|
+
});
|
|
24
|
+
InteractionTagPrimary.displayName = 'InteractionTagPrimary';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["InteractionTagPrimary.js"],"sourcesContent":["import * as React from 'react';\nimport { useInteractionTagPrimary_unstable } from './useInteractionTagPrimary';\nimport { renderInteractionTagPrimary_unstable } from './renderInteractionTagPrimary';\nimport { useInteractionTagPrimaryStyles_unstable } from './useInteractionTagPrimaryStyles.styles';\nimport { useTagAvatarContextValues_unstable } from '../../utils';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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 */ export const InteractionTagPrimary = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useInteractionTagPrimary_unstable(props, ref);\n useInteractionTagPrimaryStyles_unstable(state);\n useCustomStyleHook_unstable('useInteractionTagPrimaryStyles_unstable')(state);\n return renderInteractionTagPrimary_unstable(state, useTagAvatarContextValues_unstable(state));\n});\nInteractionTagPrimary.displayName = 'InteractionTagPrimary';\n"],"names":["InteractionTagPrimary","React","forwardRef","props","ref","state","useInteractionTagPrimary_unstable","useInteractionTagPrimaryStyles_unstable","useCustomStyleHook_unstable","renderInteractionTagPrimary_unstable","useTagAvatarContextValues_unstable","displayName"],"mappings":";;;;+BASiBA;;;eAAAA;;;;iEATM;0CAC2B;6CACG;sDACG;uBACL;qCACP;AAIjC,MAAMA,wBAAwB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC5E,MAAMC,QAAQC,IAAAA,2DAAiC,EAACH,OAAOC;IACvDG,IAAAA,6EAAuC,EAACF;IACxCG,IAAAA,gDAA2B,EAAC,2CAA2CH;IACvE,OAAOI,IAAAA,iEAAoC,EAACJ,OAAOK,IAAAA,yCAAkC,EAACL;AAC1F;AACAL,sBAAsBW,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./InteractionTagPrimary"), exports);
|
|
7
|
+
_export_star._(require("./InteractionTagPrimary.types"), exports);
|
|
8
|
+
_export_star._(require("./renderInteractionTagPrimary"), exports);
|
|
9
|
+
_export_star._(require("./useInteractionTagPrimary"), exports);
|
|
10
|
+
_export_star._(require("./useInteractionTagPrimaryStyles.styles"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './InteractionTagPrimary';\nexport * from './InteractionTagPrimary.types';\nexport * from './renderInteractionTagPrimary';\nexport * from './useInteractionTagPrimary';\nexport * from './useInteractionTagPrimaryStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderInteractionTagPrimary_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderInteractionTagPrimary_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
13
|
+
const _reactavatar = require("@fluentui/react-avatar");
|
|
14
|
+
const renderInteractionTagPrimary_unstable = (state, contextValues)=>{
|
|
15
|
+
(0, _reactutilities.assertSlots)(state);
|
|
16
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
17
|
+
children: [
|
|
18
|
+
state.media && /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactavatar.AvatarContextProvider, {
|
|
19
|
+
value: contextValues.avatar,
|
|
20
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {})
|
|
21
|
+
}),
|
|
22
|
+
state.icon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {}),
|
|
23
|
+
state.primaryText && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.primaryText, {}),
|
|
24
|
+
state.secondaryText && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.secondaryText, {})
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderInteractionTagPrimary.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\n/**\n * Render the final JSX of InteractionTagPrimary\n */ export const renderInteractionTagPrimary_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.media && /*#__PURE__*/ _jsx(AvatarContextProvider, {\n value: contextValues.avatar,\n children: /*#__PURE__*/ _jsx(state.media, {})\n }),\n state.icon && /*#__PURE__*/ _jsx(state.icon, {}),\n state.primaryText && /*#__PURE__*/ _jsx(state.primaryText, {}),\n state.secondaryText && /*#__PURE__*/ _jsx(state.secondaryText, {})\n ]\n });\n};\n"],"names":["renderInteractionTagPrimary_unstable","state","contextValues","assertSlots","_jsxs","root","children","media","_jsx","AvatarContextProvider","value","avatar","icon","primaryText","secondaryText"],"mappings":";;;;+BAKiBA;;;eAAAA;;;4BAL4B;gCACjB;6BACU;AAG3B,MAAMA,uCAAuC,CAACC,OAAOC;IAC5DC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,gBAAK,EAACH,MAAMI,IAAI,EAAE;QACnCC,UAAU;YACNL,MAAMM,KAAK,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACC,kCAAqB,EAAE;gBACrDC,OAAOR,cAAcS,MAAM;gBAC3BL,UAAU,WAAW,GAAGE,IAAAA,eAAI,EAACP,MAAMM,KAAK,EAAE,CAAC;YAC/C;YACAN,MAAMW,IAAI,IAAI,WAAW,GAAGJ,IAAAA,eAAI,EAACP,MAAMW,IAAI,EAAE,CAAC;YAC9CX,MAAMY,WAAW,IAAI,WAAW,GAAGL,IAAAA,eAAI,EAACP,MAAMY,WAAW,EAAE,CAAC;YAC5DZ,MAAMa,aAAa,IAAI,WAAW,GAAGN,IAAAA,eAAI,EAACP,MAAMa,aAAa,EAAE,CAAC;SACnE;IACL;AACJ"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useInteractionTagPrimary_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useInteractionTagPrimary_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
|
14
|
+
const _interactionTagContext = require("../../contexts/interactionTagContext");
|
|
15
|
+
const avatarSizeMap = {
|
|
16
|
+
medium: 28,
|
|
17
|
+
small: 20,
|
|
18
|
+
'extra-small': 16
|
|
19
|
+
};
|
|
20
|
+
const avatarShapeMap = {
|
|
21
|
+
rounded: 'square',
|
|
22
|
+
circular: 'circular'
|
|
23
|
+
};
|
|
24
|
+
const useInteractionTagPrimary_unstable = (props, ref)=>{
|
|
25
|
+
const { appearance, disabled, interactionTagPrimaryId, shape, size } = (0, _interactionTagContext.useInteractionTagContext_unstable)();
|
|
26
|
+
const { hasSecondaryAction = false } = props;
|
|
27
|
+
return {
|
|
28
|
+
appearance,
|
|
29
|
+
avatarShape: avatarShapeMap[shape],
|
|
30
|
+
avatarSize: avatarSizeMap[size],
|
|
31
|
+
disabled,
|
|
32
|
+
hasSecondaryAction,
|
|
33
|
+
shape,
|
|
34
|
+
size,
|
|
35
|
+
components: {
|
|
36
|
+
root: 'button',
|
|
37
|
+
media: 'span',
|
|
38
|
+
icon: 'span',
|
|
39
|
+
primaryText: 'span',
|
|
40
|
+
secondaryText: 'span'
|
|
41
|
+
},
|
|
42
|
+
root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('button', {
|
|
43
|
+
ref,
|
|
44
|
+
disabled,
|
|
45
|
+
id: interactionTagPrimaryId,
|
|
46
|
+
...props
|
|
47
|
+
}), {
|
|
48
|
+
elementType: 'button'
|
|
49
|
+
}),
|
|
50
|
+
media: _reactutilities.slot.optional(props.media, {
|
|
51
|
+
elementType: 'span'
|
|
52
|
+
}),
|
|
53
|
+
icon: _reactutilities.slot.optional(props.icon, {
|
|
54
|
+
elementType: 'span'
|
|
55
|
+
}),
|
|
56
|
+
primaryText: _reactutilities.slot.optional(props.primaryText, {
|
|
57
|
+
renderByDefault: true,
|
|
58
|
+
defaultProps: {
|
|
59
|
+
children: props.children
|
|
60
|
+
},
|
|
61
|
+
elementType: 'span'
|
|
62
|
+
}),
|
|
63
|
+
secondaryText: _reactutilities.slot.optional(props.secondaryText, {
|
|
64
|
+
elementType: 'span'
|
|
65
|
+
})
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useInteractionTagPrimary.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useInteractionTagContext_unstable } from '../../contexts/interactionTagContext';\nconst avatarSizeMap = {\n medium: 28,\n small: 20,\n 'extra-small': 16\n};\nconst avatarShapeMap = {\n rounded: 'square',\n circular: 'circular'\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 */ export const useInteractionTagPrimary_unstable = (props, ref)=>{\n const { appearance, disabled, interactionTagPrimaryId, shape, size } = useInteractionTagContext_unstable();\n const { hasSecondaryAction = false } = props;\n return {\n appearance,\n avatarShape: avatarShapeMap[shape],\n avatarSize: avatarSizeMap[size],\n disabled,\n hasSecondaryAction,\n shape,\n size,\n components: {\n root: 'button',\n media: 'span',\n icon: 'span',\n primaryText: 'span',\n secondaryText: 'span'\n },\n root: slot.always(getNativeElementProps('button', {\n ref,\n disabled,\n id: interactionTagPrimaryId,\n ...props\n }), {\n elementType: 'button'\n }),\n media: slot.optional(props.media, {\n elementType: 'span'\n }),\n icon: slot.optional(props.icon, {\n elementType: 'span'\n }),\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, {\n elementType: 'span'\n })\n };\n};\n"],"names":["useInteractionTagPrimary_unstable","avatarSizeMap","medium","small","avatarShapeMap","rounded","circular","props","ref","appearance","disabled","interactionTagPrimaryId","shape","size","useInteractionTagContext_unstable","hasSecondaryAction","avatarShape","avatarSize","components","root","media","icon","primaryText","secondaryText","slot","always","getNativeElementProps","id","elementType","optional","renderByDefault","defaultProps","children"],"mappings":";;;;+BAoBiBA;;;eAAAA;;;;iEApBM;gCACqB;uCACM;AAClD,MAAMC,gBAAgB;IAClBC,QAAQ;IACRC,OAAO;IACP,eAAe;AACnB;AACA,MAAMC,iBAAiB;IACnBC,SAAS;IACTC,UAAU;AACd;AASW,MAAMN,oCAAoC,CAACO,OAAOC;IACzD,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,uBAAuB,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGC,IAAAA,wDAAiC;IACxG,MAAM,EAAEC,qBAAqB,KAAK,EAAE,GAAGR;IACvC,OAAO;QACHE;QACAO,aAAaZ,cAAc,CAACQ,MAAM;QAClCK,YAAYhB,aAAa,CAACY,KAAK;QAC/BH;QACAK;QACAH;QACAC;QACAK,YAAY;YACRC,MAAM;YACNC,OAAO;YACPC,MAAM;YACNC,aAAa;YACbC,eAAe;QACnB;QACAJ,MAAMK,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,UAAU;YAC9ClB;YACAE;YACAiB,IAAIhB;YACJ,GAAGJ,KAAK;QACZ,IAAI;YACAqB,aAAa;QACjB;QACAR,OAAOI,oBAAI,CAACK,QAAQ,CAACtB,MAAMa,KAAK,EAAE;YAC9BQ,aAAa;QACjB;QACAP,MAAMG,oBAAI,CAACK,QAAQ,CAACtB,MAAMc,IAAI,EAAE;YAC5BO,aAAa;QACjB;QACAN,aAAaE,oBAAI,CAACK,QAAQ,CAACtB,MAAMe,WAAW,EAAE;YAC1CQ,iBAAiB;YACjBC,cAAc;gBACVC,UAAUzB,MAAMyB,QAAQ;YAC5B;YACAJ,aAAa;QACjB;QACAL,eAAeC,oBAAI,CAACK,QAAQ,CAACtB,MAAMgB,aAAa,EAAE;YAC9CK,aAAa;QACjB;IACJ;AACJ"}
|