@fluentui-copilot/react-attachments 0.0.0-nightly-20240314-0405-1a885976.1 → 0.8.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.
Files changed (43) hide show
  1. package/CHANGELOG.json +7 -13
  2. package/CHANGELOG.md +6 -7
  3. package/dist/index.d.ts +43 -1
  4. package/lib/components/AttachmentTag/useAttachmentTag.js +5 -48
  5. package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  6. package/lib/components/AttachmentTag/useAttachmentTagStyles.js +16 -4
  7. package/lib/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
  8. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +0 -1
  9. package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  10. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +1 -2
  11. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
  12. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +4 -3
  13. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
  14. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +9 -17
  15. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  16. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js +17 -9
  17. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
  18. package/lib/components/index.js +1 -0
  19. package/lib/components/index.js.map +1 -1
  20. package/lib/components/utils/useAttachmentTagSlots.js +62 -0
  21. package/lib/components/utils/useAttachmentTagSlots.js.map +1 -0
  22. package/lib/index.js +1 -0
  23. package/lib/index.js.map +1 -1
  24. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js +5 -45
  25. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  26. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js +12 -0
  27. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
  28. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  29. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +0 -2
  30. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
  31. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js +7 -2
  32. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
  33. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js +9 -16
  34. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  35. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js +18 -8
  36. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
  37. package/lib-commonjs/components/index.js +1 -0
  38. package/lib-commonjs/components/index.js.map +1 -1
  39. package/lib-commonjs/components/utils/useAttachmentTagSlots.js +62 -0
  40. package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -0
  41. package/lib-commonjs/index.js +16 -0
  42. package/lib-commonjs/index.js.map +1 -1
  43. package/package.json +7 -3
package/CHANGELOG.json CHANGED
@@ -2,22 +2,16 @@
2
2
  "name": "@fluentui-copilot/react-attachments",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 14 Mar 2024 04:10:47 GMT",
6
- "tag": "@fluentui-copilot/react-attachments_v0.0.0-nightly-20240314-0405-1a885976.1",
7
- "version": "0.0.0-nightly-20240314-0405-1a885976.1",
5
+ "date": "Thu, 14 Mar 2024 18:24:04 GMT",
6
+ "tag": "@fluentui-copilot/react-attachments_v0.8.1",
7
+ "version": "0.8.1",
8
8
  "comments": {
9
- "prerelease": [
10
- {
11
- "author": "fluentui-internal@service.microsoft.com",
12
- "package": "@fluentui-copilot/react-attachments",
13
- "commit": "not available",
14
- "comment": "Release nightly"
15
- },
9
+ "patch": [
16
10
  {
17
- "author": "beachball",
11
+ "author": "tristan.watanabe@gmail.com",
18
12
  "package": "@fluentui-copilot/react-attachments",
19
- "comment": "Bump @fluentui-copilot/react-provider to v0.0.0-nightly-20240314-0405-1a885976.1",
20
- "commit": "9cbe12abe7e65bc2516c076e8f6c4c183890c0fb"
13
+ "commit": "14ce40ddbee4d35f3f4bcf03521d60715b03d59c",
14
+ "comment": "feat: implement AttachmentTagItem component."
21
15
  }
22
16
  ]
23
17
  }
package/CHANGELOG.md CHANGED
@@ -1,18 +1,17 @@
1
1
  # Change Log - @fluentui-copilot/react-attachments
2
2
 
3
- This log was last generated on Thu, 14 Mar 2024 04:10:47 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 14 Mar 2024 18:24:04 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20240314-0405-1a885976.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.0.0-nightly-20240314-0405-1a885976.1)
7
+ ## [0.8.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.8.1)
8
8
 
9
- Thu, 14 Mar 2024 04:10:47 GMT
10
- [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.0..@fluentui-copilot/react-attachments_v0.0.0-nightly-20240314-0405-1a885976.1)
9
+ Thu, 14 Mar 2024 18:24:04 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.0..@fluentui-copilot/react-attachments_v0.8.1)
11
11
 
12
- ### Changes
12
+ ### Patches
13
13
 
14
- - Release nightly ([commit](https://github.com/microsoft/fluentai/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui-copilot/react-provider to v0.0.0-nightly-20240314-0405-1a885976.1 ([commit](https://github.com/microsoft/fluentai/commit/9cbe12abe7e65bc2516c076e8f6c4c183890c0fb) by beachball)
14
+ - feat: implement AttachmentTagItem component. ([PR #1435](https://github.com/microsoft/fluentai/pull/1435) by tristan.watanabe@gmail.com)
16
15
 
17
16
  ## [0.8.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.8.0)
18
17
 
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  import type { ComponentProps } from '@fluentui/react-components';
4
4
  import type { ComponentState } from '@fluentui/react-components';
5
5
  import type { ForwardRefComponent } from '@fluentui/react-components';
6
- import * as React_2 from 'react';
6
+ import type * as React_2 from 'react';
7
7
  import type { Slot } from '@fluentui/react-components';
8
8
  import type { SlotClassNames } from '@fluentui/react-components';
9
9
 
@@ -16,6 +16,27 @@ export declare type AttachmentTagDismissedData = {
16
16
  media?: AttachmentTagProps['media'];
17
17
  };
18
18
 
19
+ export declare const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps>;
20
+
21
+ export declare const attachmentTagItemClassNames: SlotClassNames<AttachmentTagItemSlots>;
22
+
23
+ /**
24
+ * AttachmentTagItem Props
25
+ */
26
+ export declare type AttachmentTagItemProps = ComponentProps<Partial<AttachmentTagItemSlots>>;
27
+
28
+ export declare type AttachmentTagItemSlots = {
29
+ root: NonNullable<Slot<'div'>>;
30
+ media?: Slot<'span'>;
31
+ content: NonNullable<Slot<'span'>>;
32
+ icon: NonNullable<Slot<'span'>>;
33
+ };
34
+
35
+ /**
36
+ * State used in rendering AttachmentTagItem
37
+ */
38
+ export declare type AttachmentTagItemState = ComponentState<AttachmentTagItemSlots>;
39
+
19
40
  export declare const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps>;
20
41
 
21
42
  export declare const attachmentTagListClassNames: SlotClassNames<AttachmentTagListSlots>;
@@ -67,6 +88,11 @@ export declare type AttachmentTagState = ComponentState<AttachmentTagSlots>;
67
88
  */
68
89
  export declare const renderAttachmentTag_unstable: (state: AttachmentTagState) => JSX.Element;
69
90
 
91
+ /**
92
+ * Render the final JSX of AttachmentTagItem
93
+ */
94
+ export declare const renderAttachmentTagItem_unstable: (state: AttachmentTagItemState) => JSX.Element;
95
+
70
96
  /**
71
97
  * Render the final JSX of AttachmentTagList
72
98
  */
@@ -83,6 +109,22 @@ export declare const renderAttachmentTagList_unstable: (state: AttachmentTagList
83
109
  */
84
110
  export declare const useAttachmentTag_unstable: (props: AttachmentTagProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagState;
85
111
 
112
+ /**
113
+ * Create the state required to render AttachmentTagItem.
114
+ *
115
+ * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,
116
+ * before being passed to renderAttachmentTagItem_unstable.
117
+ *
118
+ * @param props - props from this instance of AttachmentTagItem
119
+ * @param ref - reference to root HTMLElement of AttachmentTagItem
120
+ */
121
+ export declare const useAttachmentTagItem_unstable: (props: AttachmentTagItemProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagItemState;
122
+
123
+ /**
124
+ * Apply styling to the AttachmentTagItem slots based on the state
125
+ */
126
+ export declare const useAttachmentTagItemStyles_unstable: (state: AttachmentTagItemState) => AttachmentTagItemState;
127
+
86
128
  /**
87
129
  * Create the state required to render AttachmentTagList.
88
130
  *
@@ -1,9 +1,4 @@
1
- import * as React from 'react';
2
- import { getNativeElementProps, mergeCallbacks, slot } from '@fluentui/react-components';
3
- import { useHasParentContext } from '@fluentui/react-context-selector';
4
- import { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';
5
- import { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';
6
- import { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';
1
+ import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';
7
2
  /**
8
3
  * Create the state required to render AttachmentTag.
9
4
  *
@@ -14,51 +9,13 @@ import { AttachmentTagListContext } from '../../contexts/attachmentTagListContex
14
9
  * @param ref - reference to root HTMLElement of AttachmentTag
15
10
  */
16
11
  export const useAttachmentTag_unstable = (props, ref) => {
17
- const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);
18
- const {
19
- children,
20
- role
21
- } = props;
22
- const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
23
- const hasParentContext = useHasParentContext(AttachmentTagListContext);
24
- const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
25
- const root = slot.always(getNativeElementProps('button', {
26
- ref,
27
- ...props,
28
- role: rootRole
29
- }), {
30
- elementType: 'button'
31
- });
32
- root.onClick = mergeCallbacks(root.onClick, ev => onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {
33
- content: children,
34
- media
35
- }));
36
- const media = slot.optional(props.media, {
37
- elementType: 'span'
38
- });
39
- const content = slot.always(props.content, {
40
- defaultProps: {
41
- children
42
- },
43
- elementType: 'span'
44
- });
45
- const icon = slot.always(props.icon, {
46
- defaultProps: {
47
- children: /*#__PURE__*/React.createElement(DismissIcon, null)
48
- },
49
- elementType: 'span'
50
- });
51
- return {
52
- components: {
12
+ return useAttachmentTagSlots(props, ref, {
13
+ elementType: {
53
14
  root: 'button',
54
15
  media: 'span',
55
16
  content: 'span',
56
17
  icon: 'span'
57
- },
58
- root,
59
- media,
60
- content,
61
- icon
62
- };
18
+ }
19
+ });
63
20
  };
64
21
  //# sourceMappingURL=useAttachmentTag.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { getNativeElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\n\nimport { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';\n\nimport { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps, AttachmentTagState } from './AttachmentTag.types';\n\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (\n props: AttachmentTagProps,\n ref: React.Ref<HTMLElement>,\n): AttachmentTagState => {\n const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);\n\n const { children, role } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const hasParentContext = useHasParentContext(AttachmentTagListContext);\n const rootRole = role ?? (hasParentContext ? 'menuitem' : undefined);\n\n const root = slot.always(\n getNativeElementProps('button', {\n ref,\n ...props,\n role: rootRole,\n }),\n { elementType: 'button' },\n );\n root.onClick = mergeCallbacks(\n root.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n onAttachmentTagDismiss?.(ev, { content: children, media }),\n );\n\n const media = slot.optional(props.media, { elementType: 'span' });\n\n const content = slot.always(props.content, {\n defaultProps: {\n children,\n },\n elementType: 'span',\n });\n\n const icon = slot.always(props.icon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: 'span',\n });\n\n return {\n components: {\n root: 'button',\n media: 'span',\n content: 'span',\n icon: 'span',\n },\n\n root,\n media,\n content,\n icon,\n };\n};\n"],"names":["React","getNativeElementProps","mergeCallbacks","slot","useHasParentContext","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentTagListContext_unstable","AttachmentTagListContext","useAttachmentTag_unstable","props","ref","onAttachmentTagDismiss","context","children","role","DismissIcon","hasParentContext","rootRole","undefined","root","always","elementType","onClick","ev","content","media","optional","defaultProps","icon","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AACzF,SAASC,mBAAmB,QAAQ,mCAAmC;AACvE,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AAEtF,SAASC,oCAAoC,QAAQ,0CAA0C;AAE/F,SAASC,wBAAwB,QAAQ,0CAA0C;AAGnF;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,yBAAyBL,qCAAqCM,CAAAA,UAAWA,QAAQD,sBAAsB;IAE7G,MAAM,EAAEE,QAAQ,EAAEC,IAAI,EAAE,GAAGL;IAC3B,MAAMM,cAAcV,WAAWD,iBAAiBD;IAEhD,MAAMa,mBAAmBd,oBAAoBK;IAC7C,MAAMU,WAAWH,iBAAAA,kBAAAA,OAASE,mBAAmB,aAAaE;IAE1D,MAAMC,OAAOlB,KAAKmB,MAAM,CACtBrB,sBAAsB,UAAU;QAC9BW;QACA,GAAGD,KAAK;QACRK,MAAMG;IACR,IACA;QAAEI,aAAa;IAAS;IAE1BF,KAAKG,OAAO,GAAGtB,eACbmB,KAAKG,OAAO,EACZ,CAACC,KACCZ,mCAAAA,6CAAAA,uBAAyBY,IAAI;YAAEC,SAASX;YAAUY;QAAM;IAG5D,MAAMA,QAAQxB,KAAKyB,QAAQ,CAACjB,MAAMgB,KAAK,EAAE;QAAEJ,aAAa;IAAO;IAE/D,MAAMG,UAAUvB,KAAKmB,MAAM,CAACX,MAAMe,OAAO,EAAE;QACzCG,cAAc;YACZd;QACF;QACAQ,aAAa;IACf;IAEA,MAAMO,OAAO3B,KAAKmB,MAAM,CAACX,MAAMmB,IAAI,EAAE;QACnCD,cAAc;YACZd,wBAAU,oBAACE;QACb;QACAM,aAAa;IACf;IAEA,OAAO;QACLQ,YAAY;YACVV,MAAM;YACNM,OAAO;YACPD,SAAS;YACTI,MAAM;QACR;QAEAT;QACAM;QACAD;QACAI;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useAttachmentTag.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagProps, AttachmentTagState } from './AttachmentTag.types';\n\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (\n props: AttachmentTagProps,\n ref: React.Ref<HTMLElement>,\n): AttachmentTagState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'button', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagSlots","useAttachmentTag_unstable","props","ref","elementType","root","media","content","icon"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,iCAAiC;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,OAAOH,sBAAsBE,OAAOC,KAAK;QACvCC,aAAa;YAAEC,MAAM;YAAUC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC9E;AACF,EAAE"}
@@ -5,12 +5,24 @@ export const attachmentTagClassNames = {
5
5
  content: 'fai-AttachmentTag__content',
6
6
  icon: 'fai-AttachmentTag__icon'
7
7
  };
8
- const ATTACHMENTTAG_MAXWIDTH = '180px';
8
+ /**
9
+ * @internal
10
+ */
11
+ export const ATTACHMENTTAG_MAXWIDTH = '180px';
9
12
  const ATTACHMENTTAG_SIZE = '20px';
10
13
  const useRootBaseClassName = __resetStyles("r1km3emv", "r21ecva", [".r1km3emv{color:var(--colorNeutralForeground1);align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;max-width:180px;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalS);vertical-align:middle;}", ".r1km3emv:hover{border-color:var(--colorNeutralStroke1Hover);}", ".r1km3emv:hover .fai-AttachmentTag__icon{color:var(--colorBrandForegroundLinkHover);}", ".r1km3emv:hover:active{border-color:var(--colorNeutralStroke1Pressed);}", ".r1km3emv:hover:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}", ".r1km3emv:focus .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandHover);}", ".r1km3emv:focus:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}", ".r21ecva{color:var(--colorNeutralForeground1);align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;max-width:180px;padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalXS);vertical-align:middle;}", ".r21ecva:hover{border-color:var(--colorNeutralStroke1Hover);}", ".r21ecva:hover .fai-AttachmentTag__icon{color:var(--colorBrandForegroundLinkHover);}", ".r21ecva:hover:active{border-color:var(--colorNeutralStroke1Pressed);}", ".r21ecva:hover:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}", ".r21ecva:focus .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandHover);}", ".r21ecva:focus:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}"]);
11
- const useMediaBaseClassName = __resetStyles("r19jnv3a", null, [".r19jnv3a{font-size:20px;height:20px;line-height:20px;width:20px;}"]);
12
- const useContentBaseClassName = __resetStyles("rmt99gk", null, [".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}"]);
13
- const useIconBaseClassName = __resetStyles("r176grtk", null, [".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}"]);
14
+ /**
15
+ * @internal
16
+ */
17
+ export const useMediaBaseClassName = __resetStyles("r19jnv3a", null, [".r19jnv3a{font-size:20px;height:20px;line-height:20px;width:20px;}"]);
18
+ /**
19
+ * @internal
20
+ */
21
+ export const useContentBaseClassName = __resetStyles("rmt99gk", null, [".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}"]);
22
+ /**
23
+ * @internal
24
+ */
25
+ export const useIconBaseClassName = __resetStyles("r176grtk", null, [".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}"]);
14
26
  /**
15
27
  * Apply styling to the AttachmentTag slots based on the state
16
28
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTagStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { AttachmentTagSlots, AttachmentTagState } from './AttachmentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagClassNames: SlotClassNames<AttachmentTagSlots> = {\n root: 'fai-AttachmentTag',\n media: 'fai-AttachmentTag__media',\n content: 'fai-AttachmentTag__content',\n icon: 'fai-AttachmentTag__icon',\n};\nconst ATTACHMENTTAG_MAXWIDTH = '180px';\nconst ATTACHMENTTAG_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground1,\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n verticalAlign: 'middle',\n\n ':hover': {\n borderColor: tokens.colorNeutralStroke1Hover,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n\n ':hover:active': {\n borderColor: tokens.colorNeutralStroke1Pressed,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n ':focus': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':focus:active': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n fontSize: ATTACHMENTTAG_SIZE,\n height: ATTACHMENTTAG_SIZE,\n lineHeight: ATTACHMENTTAG_SIZE,\n width: ATTACHMENTTAG_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENTTAG_SIZE,\n height: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\n/**\n * Apply styling to the AttachmentTag slots based on the state\n */\nexport const useAttachmentTagStyles_unstable = (state: AttachmentTagState): AttachmentTagState => {\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","typographyStyles","attachmentTagClassNames","root","media","content","icon","ATTACHMENTTAG_MAXWIDTH","ATTACHMENTTAG_SIZE","useRootBaseClassName","color","colorNeutralForeground1","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","boxSizing","columnGap","spacingHorizontalSNudge","cursor","display","flexWrap","justifyContent","maxWidth","padding","spacingVerticalXS","spacingHorizontalXS","spacingHorizontalS","verticalAlign","borderColor","colorNeutralStroke1Hover","colorBrandForegroundLinkHover","colorNeutralStroke1Pressed","colorNeutralForeground2BrandPressed","colorNeutralForeground2BrandHover","useMediaBaseClassName","fontSize","height","lineHeight","width","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","spacingHorizontalXXS","minWidth","useAttachmentTagStyles_unstable","state","rootBaseClassName","mediaBaseClassName","contentBaseClassName","iconBaseClassName","className"],"mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAIrG,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR,EAAE;AACF,MAAMC,yBAAyB;AAC/B,MAAMC,qBAAqB;AAE3B,MAAMC,uBAAuBX,gBAAgB;IAC3CY,OAAOV,OAAOW,uBAAuB;IACrCC,YAAY;IACZC,iBAAiBb,OAAOc,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEf,OAAOgB,eAAe,CAAC,OAAO,EAAEhB,OAAOiB,mBAAmB,CAAC,CAAC;IACvEC,cAAclB,OAAOmB,kBAAkB;IACvCC,WAAW;IACXC,WAAWrB,OAAOsB,uBAAuB;IACzCC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,gBAAgB;IAChBC,UAAUpB;IACVqB,SAAS,CAAC,EAAE5B,OAAO6B,iBAAiB,CAAC,CAAC,EAAE7B,OAAO8B,mBAAmB,CAAC,CAAC,EAAE9B,OAAO6B,iBAAiB,CAAC,CAAC,EAAE7B,OAAO+B,kBAAkB,CAAC,CAAC;IAC7HC,eAAe;IAEf,UAAU;QACRC,aAAajC,OAAOkC,wBAAwB;QAE5C,CAAC,CAAC,GAAG,EAAEhC,wBAAwBI,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOV,OAAOmC,6BAA6B;QAC7C;IACF;IAEA,iBAAiB;QACfF,aAAajC,OAAOoC,0BAA0B;QAE9C,CAAC,CAAC,GAAG,EAAElC,wBAAwBI,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOV,OAAOqC,mCAAmC;QACnD;IACF;IAEA,UAAU;QACR,CAAC,CAAC,GAAG,EAAEnC,wBAAwBI,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOV,OAAOsC,iCAAiC;QACjD;IACF;IAEA,iBAAiB;QACf,CAAC,CAAC,GAAG,EAAEpC,wBAAwBI,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOV,OAAOqC,mCAAmC;QACnD;IACF;AACF;AAEA,MAAME,wBAAwBzC,gBAAgB;IAC5C0C,UAAUhC;IACViC,QAAQjC;IACRkC,YAAYlC;IACZmC,OAAOnC;AACT;AAEA,MAAMoC,0BAA0B9C,gBAAgB;IAC9C+C,WAAW;IACXC,cAAc;IACdC,YAAY;IACZ,GAAG9C,iBAAiB+C,KAAK;AAC3B;AAEA,MAAMC,uBAAuBnD,gBAAgB;IAC3Cc,YAAY;IACZM,cAAclB,OAAOkD,oBAAoB;IACzCnC,QAAQ,CAAC,EAAEf,OAAOgB,eAAe,CAAC,OAAO,EAAEhB,OAAOmD,sBAAsB,CAAC,CAAC;IAC1E/B,WAAW;IACXV,OAAOV,OAAOW,uBAAuB;IACrCa,SAAS;IACTgB,UAAUhC;IACViC,QAAQ,CAAC,KAAK,EAAEjC,mBAAmB,GAAG,EAAER,OAAOgB,eAAe,CAAC,OAAO,EAAEhB,OAAOoD,kBAAkB,CAAC,CAAC,CAAC;IACpG1B,gBAAgB;IAChBC,UAAU,CAAC,KAAK,EAAEnB,mBAAmB,GAAG,EAAER,OAAOgB,eAAe,CAAC,OAAO,EAAEhB,OAAOqD,oBAAoB,CAAC,CAAC,CAAC;IACxGC,UAAU,CAAC,KAAK,EAAE9C,mBAAmB,GAAG,EAAER,OAAOgB,eAAe,CAAC,OAAO,EAAEhB,OAAOqD,oBAAoB,CAAC,CAAC,CAAC;IACxGzB,SAAS,CAAC,KAAK,EAAE5B,OAAOoD,kBAAkB,CAAC,WAAW,EAAEpD,OAAOqD,oBAAoB,CAAC,KAAK,CAAC;AAC5F;AAEA;;CAEC,GACD,OAAO,MAAME,kCAAkC,CAACC;IAC9C,MAAMC,oBAAoBhD;IAC1B,MAAMiD,qBAAqBnB;IAC3B,MAAMoB,uBAAuBf;IAC7B,MAAMgB,oBAAoBX;IAE1BO,MAAMrD,IAAI,CAAC0D,SAAS,GAAG9D,aAAaG,wBAAwBC,IAAI,EAAEsD,mBAAmBD,MAAMrD,IAAI,CAAC0D,SAAS;IAEzG,IAAIL,MAAMpD,KAAK,EAAE;QACfoD,MAAMpD,KAAK,CAACyD,SAAS,GAAG9D,aAAaG,wBAAwBE,KAAK,EAAEsD,oBAAoBF,MAAMpD,KAAK,CAACyD,SAAS;IAC/G;IAEAL,MAAMnD,OAAO,CAACwD,SAAS,GAAG9D,aACxBG,wBAAwBG,OAAO,EAC/BsD,sBACAH,MAAMnD,OAAO,CAACwD,SAAS;IAGzBL,MAAMlD,IAAI,CAACuD,SAAS,GAAG9D,aAAaG,wBAAwBI,IAAI,EAAEsD,mBAAmBJ,MAAMlD,IAAI,CAACuD,SAAS;IAEzG,OAAOL;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachmentTagStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { AttachmentTagSlots, AttachmentTagState } from './AttachmentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagClassNames: SlotClassNames<AttachmentTagSlots> = {\n root: 'fai-AttachmentTag',\n media: 'fai-AttachmentTag__media',\n content: 'fai-AttachmentTag__content',\n icon: 'fai-AttachmentTag__icon',\n};\n\n/**\n * @internal\n */\nexport const ATTACHMENTTAG_MAXWIDTH = '180px';\nconst ATTACHMENTTAG_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground1,\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n verticalAlign: 'middle',\n\n ':hover': {\n borderColor: tokens.colorNeutralStroke1Hover,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n\n ':hover:active': {\n borderColor: tokens.colorNeutralStroke1Pressed,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n ':focus': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':focus:active': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n});\n\n/**\n * @internal\n */\nexport const useMediaBaseClassName = makeResetStyles({\n fontSize: ATTACHMENTTAG_SIZE,\n height: ATTACHMENTTAG_SIZE,\n lineHeight: ATTACHMENTTAG_SIZE,\n width: ATTACHMENTTAG_SIZE,\n});\n\n/**\n * @internal\n */\nexport const useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\n/**\n * @internal\n */\nexport const useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENTTAG_SIZE,\n height: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\n/**\n * Apply styling to the AttachmentTag slots based on the state\n */\nexport const useAttachmentTagStyles_unstable = (state: AttachmentTagState): AttachmentTagState => {\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","typographyStyles","attachmentTagClassNames","root","media","content","icon","ATTACHMENTTAG_MAXWIDTH","ATTACHMENTTAG_SIZE","useRootBaseClassName","color","colorNeutralForeground1","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","boxSizing","columnGap","spacingHorizontalSNudge","cursor","display","flexWrap","justifyContent","maxWidth","padding","spacingVerticalXS","spacingHorizontalXS","spacingHorizontalS","verticalAlign","borderColor","colorNeutralStroke1Hover","colorBrandForegroundLinkHover","colorNeutralStroke1Pressed","colorNeutralForeground2BrandPressed","colorNeutralForeground2BrandHover","useMediaBaseClassName","fontSize","height","lineHeight","width","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","spacingHorizontalXXS","minWidth","useAttachmentTagStyles_unstable","state","rootBaseClassName","mediaBaseClassName","contentBaseClassName","iconBaseClassName","className"],"mappings":"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"}
@@ -2,7 +2,6 @@ import * as React from 'react';
2
2
  import { useAttachmentTagItem_unstable } from './useAttachmentTagItem';
3
3
  import { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';
4
4
  import { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';
5
- // AttachmentTagItem component - TODO: add more docs
6
5
  export const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {
7
6
  const state = useAttachmentTagItem_unstable(props, ref);
8
7
  useAttachmentTagItemStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// AttachmentTagItem component - TODO: add more docs\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["React","useAttachmentTagItem_unstable","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","AttachmentTagItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AAInF,oDAAoD;AACpD,OAAO,MAAMC,kCAAiEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQP,8BAA8BK,OAAOC;IAEnDJ,oCAAoCK;IACpC,OAAON,iCAAiCM;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["React","useAttachmentTagItem_unstable","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","AttachmentTagItem","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AAInF,OAAO,MAAMC,kCAAiEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQP,8BAA8BK,OAAOC;IAEnDJ,oCAAoCK;IACpC,OAAON,iCAAiCM;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}
@@ -1,3 +1,2 @@
1
- export {}; // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from AttachmentTagItemProps.
2
- // & Required<Pick<AttachmentTagItemProps, 'propName'>>
1
+ export {};
3
2
  //# sourceMappingURL=AttachmentTagItem.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTagItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagItemSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * AttachmentTagItem Props\n */\nexport type AttachmentTagItemProps = ComponentProps<AttachmentTagItemSlots> & {};\n\n/**\n * State used in rendering AttachmentTagItem\n */\nexport type AttachmentTagItemState = ComponentState<AttachmentTagItemSlots>;\n// TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from AttachmentTagItemProps.\n// & Required<Pick<AttachmentTagItemProps, 'propName'>>\n"],"names":[],"mappings":"AAAA,WAc4E,CAC5E,kIAAkI;CAClI,uDAAuD"}
1
+ {"version":3,"sources":["AttachmentTagItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagItemSlots = {\n root: NonNullable<Slot<'div'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n icon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * AttachmentTagItem Props\n */\nexport type AttachmentTagItemProps = ComponentProps<Partial<AttachmentTagItemSlots>>;\n\n/**\n * State used in rendering AttachmentTagItem\n */\nexport type AttachmentTagItemState = ComponentState<AttachmentTagItemSlots>;\n"],"names":[],"mappings":"AAAA,WAiB4E"}
@@ -1,11 +1,12 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-components';
3
3
  /**
4
4
  * Render the final JSX of AttachmentTagItem
5
5
  */
6
6
  export const renderAttachmentTagItem_unstable = state => {
7
7
  assertSlots(state);
8
- // TODO Add additional slots in the appropriate place
9
- return /*#__PURE__*/_jsx(state.root, {});
8
+ return /*#__PURE__*/_jsxs(state.root, {
9
+ children: [state.media && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), /*#__PURE__*/_jsx(state.icon, {})]
10
+ });
10
11
  };
11
12
  //# sourceMappingURL=renderAttachmentTagItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachmentTagItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagItemState, AttachmentTagItemSlots } from './AttachmentTagItem.types';\n\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = (state: AttachmentTagItemState) => {\n assertSlots<AttachmentTagItemSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <state.root />;\n};\n"],"names":["assertSlots","renderAttachmentTagItem_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/CF,YAAoCE;IAEpC,qDAAqD;IACrD,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["renderAttachmentTagItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagItemState, AttachmentTagItemSlots } from './AttachmentTagItem.types';\n\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = (state: AttachmentTagItemState) => {\n assertSlots<AttachmentTagItemSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAttachmentTagItem_unstable","state","root","media","content","icon"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/CF,YAAoCE;IAEpC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,KAAK,kBAAI,KAACF,MAAME,KAAK;0BAC5B,KAACF,MAAMG,OAAO;0BACd,KAACH,MAAMI,IAAI;;;AAGjB,EAAE"}
@@ -1,5 +1,4 @@
1
- import { getNativeElementProps, slot } from '@fluentui/react-components';
2
- // If you add JSX to this file, be sure to change the file type to .tsx
1
+ import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';
3
2
  /**
4
3
  * Create the state required to render AttachmentTagItem.
5
4
  *
@@ -10,20 +9,13 @@ import { getNativeElementProps, slot } from '@fluentui/react-components';
10
9
  * @param ref - reference to root HTMLElement of AttachmentTagItem
11
10
  */
12
11
  export const useAttachmentTagItem_unstable = (props, ref) => {
13
- return {
14
- // TODO add appropriate props/defaults
15
- components: {
16
- // TODO add each slot's element type or component
17
- root: 'div'
18
- },
19
- // TODO add appropriate slots, for example:
20
- // mySlot: slot.optional(props.mySlot),
21
- root: slot.always(getNativeElementProps('div', {
22
- ref,
23
- ...props
24
- }), {
25
- elementType: 'div'
26
- })
27
- };
12
+ return useAttachmentTagSlots(props, ref, {
13
+ elementType: {
14
+ root: 'div',
15
+ media: 'span',
16
+ content: 'span',
17
+ icon: 'span'
18
+ }
19
+ });
28
20
  };
29
21
  //# sourceMappingURL=useAttachmentTagItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-components';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<HTMLElement>,\n): AttachmentTagItemState => {\n return {\n // TODO add appropriate props/defaults\n components: {\n // TODO add each slot's element type or component\n root: 'div',\n },\n // TODO add appropriate slots, for example:\n // mySlot: slot.optional(props.mySlot),\n root: slot.always(\n getNativeElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["getNativeElementProps","slot","useAttachmentTagItem_unstable","props","ref","components","root","always","elementType"],"mappings":"AACA,SAASA,qBAAqB,EAAEC,IAAI,QAAQ,6BAA6B;AAGzE,uEAAuE;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,OAAO;QACL,sCAAsC;QACtCC,YAAY;YACV,iDAAiD;YACjDC,MAAM;QACR;QACA,2CAA2C;QAC3C,uCAAuC;QACvCA,MAAML,KAAKM,MAAM,CACfP,sBAAsB,OAAO;YAC3BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEK,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<HTMLElement>,\n): AttachmentTagItemState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'div', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagSlots","useAttachmentTagItem_unstable","props","ref","elementType","root","media","content","icon"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,iCAAiC;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,OAAOH,sBAAsBE,OAAOC,KAAK;QACvCC,aAAa;YAAEC,MAAM;YAAOC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC3E;AACF,EAAE"}
@@ -1,21 +1,29 @@
1
- import { __styles, mergeClasses } from '@fluentui/react-components';
1
+ import { __resetStyles, mergeClasses, tokens } from '@fluentui/react-components';
2
+ import { ATTACHMENTTAG_MAXWIDTH, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from '../AttachmentTag/useAttachmentTagStyles';
2
3
  export const attachmentTagItemClassNames = {
3
- root: 'fai-AttachmentTagItem'
4
+ root: 'fai-AttachmentTagItem',
5
+ media: 'fai-AttachmentTagItem__media',
6
+ content: 'fai-AttachmentTagItem__content',
7
+ icon: 'fai-AttachmentTagItem__icon'
4
8
  };
5
9
  /**
6
10
  * Styles for the root slot
7
11
  */
8
- const useStyles = __styles({
9
- root: {}
10
- }, {});
12
+ const useRootBaseClassName = __resetStyles("rcbi0rb", null, [".rcbi0rb{display:inline-flex;flex-wrap:nowrap;column-gap:var(--spacingHorizontalSNudge);max-width:180px;align-items:center;}"]);
11
13
  /**
12
14
  * Apply styling to the AttachmentTagItem slots based on the state
13
15
  */
14
16
  export const useAttachmentTagItemStyles_unstable = state => {
15
- const styles = useStyles();
16
- state.root.className = mergeClasses(attachmentTagItemClassNames.root, styles.root, state.root.className);
17
- // TODO Add class names to slots, for example:
18
- // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
17
+ const rootBaseClassName = useRootBaseClassName();
18
+ const mediaBaseClassName = useMediaBaseClassName();
19
+ const contentBaseClassName = useContentBaseClassName();
20
+ const iconBaseClassName = useIconBaseClassName();
21
+ state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);
22
+ if (state.media) {
23
+ state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);
24
+ }
25
+ state.content.className = mergeClasses(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);
26
+ state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);
19
27
  return state;
20
28
  };
21
29
  //# sourceMappingURL=useAttachmentTagItemStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTagItemStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport type { AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagItemClassNames: SlotClassNames<AttachmentTagItemSlots> = {\n root: 'fai-AttachmentTagItem',\n // TODO: add class names for all slots on AttachmentTagItemSlots.\n // Should be of the form `<slotName>: 'fai-AttachmentTagItem__<slotName>`\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n // TODO Add default styles for the root element\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the AttachmentTagItem slots based on the state\n */\nexport const useAttachmentTagItemStyles_unstable = (state: AttachmentTagItemState): AttachmentTagItemState => {\n const styles = useStyles();\n state.root.className = mergeClasses(attachmentTagItemClassNames.root, styles.root, state.root.className);\n\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","attachmentTagItemClassNames","root","useStyles","useAttachmentTagItemStyles_unstable","state","styles","className"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AAItE,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;AAGR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;IAEN;AAGF;AAEA;;CAEC,GACD,OAAO,MAAME,sCAAsC,CAACC;IAClD,MAAMC,SAASH;IACfE,MAAMH,IAAI,CAACK,SAAS,GAAGP,aAAaC,4BAA4BC,IAAI,EAAEI,OAAOJ,IAAI,EAAEG,MAAMH,IAAI,CAACK,SAAS;IAEvG,8CAA8C;IAC9C,gFAAgF;IAEhF,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachmentTagItemStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport {\n ATTACHMENTTAG_MAXWIDTH,\n useContentBaseClassName,\n useIconBaseClassName,\n useMediaBaseClassName,\n} from '../AttachmentTag/useAttachmentTagStyles';\nimport type { AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagItemClassNames: SlotClassNames<AttachmentTagItemSlots> = {\n root: 'fai-AttachmentTagItem',\n media: 'fai-AttachmentTagItem__media',\n content: 'fai-AttachmentTagItem__content',\n icon: 'fai-AttachmentTagItem__icon',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n columnGap: tokens.spacingHorizontalSNudge,\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n alignItems: 'center',\n});\n\n/**\n * Apply styling to the AttachmentTagItem slots based on the state\n */\nexport const useAttachmentTagItemStyles_unstable = (state: AttachmentTagItemState): AttachmentTagItemState => {\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagItemClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","ATTACHMENTTAG_MAXWIDTH","useContentBaseClassName","useIconBaseClassName","useMediaBaseClassName","attachmentTagItemClassNames","root","media","content","icon","useRootBaseClassName","display","flexWrap","columnGap","spacingHorizontalSNudge","maxWidth","alignItems","useAttachmentTagItemStyles_unstable","state","rootBaseClassName","mediaBaseClassName","contentBaseClassName","iconBaseClassName","className"],"mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AACnF,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,oBAAoB,EACpBC,qBAAqB,QAChB,0CAA0C;AAIjD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,uBAAuBZ,gBAAgB;IAC3Ca,SAAS;IACTC,UAAU;IACVC,WAAWb,OAAOc,uBAAuB;IACzCC,UAAUd;IACVe,YAAY;AACd;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD,MAAMC,oBAAoBT;IAC1B,MAAMU,qBAAqBhB;IAC3B,MAAMiB,uBAAuBnB;IAC7B,MAAMoB,oBAAoBnB;IAE1Be,MAAMZ,IAAI,CAACiB,SAAS,GAAGxB,aAAaM,4BAA4BC,IAAI,EAAEa,mBAAmBD,MAAMZ,IAAI,CAACiB,SAAS;IAE7G,IAAIL,MAAMX,KAAK,EAAE;QACfW,MAAMX,KAAK,CAACgB,SAAS,GAAGxB,aAAaM,4BAA4BE,KAAK,EAAEa,oBAAoBF,MAAMX,KAAK,CAACgB,SAAS;IACnH;IAEAL,MAAMV,OAAO,CAACe,SAAS,GAAGxB,aACxBM,4BAA4BG,OAAO,EACnCa,sBACAH,MAAMV,OAAO,CAACe,SAAS;IAGzBL,MAAMT,IAAI,CAACc,SAAS,GAAGxB,aAAaM,4BAA4BI,IAAI,EAAEa,mBAAmBJ,MAAMT,IAAI,CAACc,SAAS;IAE7G,OAAOL;AACT,EAAE"}
@@ -1,3 +1,4 @@
1
1
  export * from './AttachmentTag';
2
2
  export * from './AttachmentTagList';
3
+ export * from './AttachmentTagItem';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB"}
@@ -0,0 +1,62 @@
1
+ import * as React from 'react';
2
+ import { getNativeElementProps, mergeCallbacks, slot } from '@fluentui/react-components';
3
+ import { useHasParentContext } from '@fluentui/react-context-selector';
4
+ import { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';
5
+ import { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';
6
+ import { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';
7
+ /**
8
+ * @internal
9
+ * Create the slots required to render AttachmentTag or AttachmentTagItem.
10
+ */
11
+ export function useAttachmentTagSlots(props, ref, options) {
12
+ const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);
13
+ const {
14
+ children,
15
+ role
16
+ } = props;
17
+ const {
18
+ elementType
19
+ } = options;
20
+ const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
21
+ const hasParentContext = useHasParentContext(AttachmentTagListContext);
22
+ const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
23
+ const root = slot.always(getNativeElementProps(elementType.root, {
24
+ ref,
25
+ ...props,
26
+ role: rootRole
27
+ }), {
28
+ elementType: elementType.root
29
+ });
30
+ root.onClick = mergeCallbacks(root.onClick, ev => onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {
31
+ content: children,
32
+ media
33
+ }));
34
+ const media = slot.optional(props.media, {
35
+ elementType: elementType.media
36
+ });
37
+ const content = slot.always(props.content, {
38
+ defaultProps: {
39
+ children
40
+ },
41
+ elementType: elementType.content
42
+ });
43
+ const icon = slot.always(props.icon, {
44
+ defaultProps: {
45
+ children: /*#__PURE__*/React.createElement(DismissIcon, null)
46
+ },
47
+ elementType: elementType.icon
48
+ });
49
+ return {
50
+ components: {
51
+ root: elementType.root,
52
+ media: elementType.media,
53
+ content: elementType.content,
54
+ icon: elementType.icon
55
+ },
56
+ root,
57
+ media,
58
+ content,
59
+ icon
60
+ };
61
+ }
62
+ //# sourceMappingURL=useAttachmentTagSlots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentTagSlots.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { getNativeElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\n\nimport { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';\n\nimport { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps, AttachmentTagState } from './../AttachmentTag/AttachmentTag.types';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './../AttachmentTagItem/AttachmentTagItem.types';\n\n/**\n * @internal\n * Create the slots required to render AttachmentTag or AttachmentTagItem.\n */\nexport function useAttachmentTagSlots<TAttachmentTagState extends AttachmentTagState | AttachmentTagItemState>(\n props: AttachmentTagProps | AttachmentTagItemProps,\n ref: React.Ref<HTMLElement>,\n options: {\n elementType: TAttachmentTagState['components'];\n },\n): TAttachmentTagState {\n const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);\n const { children, role } = props;\n const { elementType } = options;\n\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const hasParentContext = useHasParentContext(AttachmentTagListContext);\n const rootRole = role ?? (hasParentContext ? 'menuitem' : undefined);\n\n const root: TAttachmentTagState['root'] = slot.always(\n getNativeElementProps(elementType.root as unknown as string, {\n ref,\n ...props,\n role: rootRole,\n }),\n { elementType: elementType.root },\n );\n root.onClick = mergeCallbacks(\n root.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n onAttachmentTagDismiss?.(ev, { content: children, media }),\n );\n\n const media: TAttachmentTagState['media'] = slot.optional(props.media, { elementType: elementType.media });\n\n const content: TAttachmentTagState['content'] = slot.always(props.content, {\n defaultProps: {\n children,\n },\n elementType: elementType.content,\n });\n\n const icon: TAttachmentTagState['icon'] = slot.always(props.icon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: elementType.icon,\n });\n\n return {\n components: {\n root: elementType.root,\n media: elementType.media,\n content: elementType.content,\n icon: elementType.icon,\n },\n root,\n media,\n content,\n icon,\n } as TAttachmentTagState;\n}\n"],"names":["React","getNativeElementProps","mergeCallbacks","slot","useHasParentContext","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentTagListContext_unstable","AttachmentTagListContext","useAttachmentTagSlots","props","ref","options","onAttachmentTagDismiss","context","children","role","elementType","DismissIcon","hasParentContext","rootRole","undefined","root","always","onClick","ev","content","media","optional","defaultProps","icon","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AACzF,SAASC,mBAAmB,QAAQ,mCAAmC;AACvE,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AAEtF,SAASC,oCAAoC,QAAQ,0CAA0C;AAE/F,SAASC,wBAAwB,QAAQ,0CAA0C;AAInF;;;CAGC,GACD,OAAO,SAASC,sBACdC,KAAkD,EAClDC,GAA2B,EAC3BC,OAEC;IAED,MAAMC,yBAAyBN,qCAAqCO,CAAAA,UAAWA,QAAQD,sBAAsB;IAC7G,MAAM,EAAEE,QAAQ,EAAEC,IAAI,EAAE,GAAGN;IAC3B,MAAM,EAAEO,WAAW,EAAE,GAAGL;IAExB,MAAMM,cAAcZ,WAAWD,iBAAiBD;IAEhD,MAAMe,mBAAmBhB,oBAAoBK;IAC7C,MAAMY,WAAWJ,iBAAAA,kBAAAA,OAASG,mBAAmB,aAAaE;IAE1D,MAAMC,OAAoCpB,KAAKqB,MAAM,CACnDvB,sBAAsBiB,YAAYK,IAAI,EAAuB;QAC3DX;QACA,GAAGD,KAAK;QACRM,MAAMI;IACR,IACA;QAAEH,aAAaA,YAAYK,IAAI;IAAC;IAElCA,KAAKE,OAAO,GAAGvB,eACbqB,KAAKE,OAAO,EACZ,CAACC,KACCZ,mCAAAA,6CAAAA,uBAAyBY,IAAI;YAAEC,SAASX;YAAUY;QAAM;IAG5D,MAAMA,QAAsCzB,KAAK0B,QAAQ,CAAClB,MAAMiB,KAAK,EAAE;QAAEV,aAAaA,YAAYU,KAAK;IAAC;IAExG,MAAMD,UAA0CxB,KAAKqB,MAAM,CAACb,MAAMgB,OAAO,EAAE;QACzEG,cAAc;YACZd;QACF;QACAE,aAAaA,YAAYS,OAAO;IAClC;IAEA,MAAMI,OAAoC5B,KAAKqB,MAAM,CAACb,MAAMoB,IAAI,EAAE;QAChED,cAAc;YACZd,wBAAU,oBAACG;QACb;QACAD,aAAaA,YAAYa,IAAI;IAC/B;IAEA,OAAO;QACLC,YAAY;YACVT,MAAML,YAAYK,IAAI;YACtBK,OAAOV,YAAYU,KAAK;YACxBD,SAAST,YAAYS,OAAO;YAC5BI,MAAMb,YAAYa,IAAI;QACxB;QACAR;QACAK;QACAD;QACAI;IACF;AACF"}
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable } from './AttachmentTag';
2
2
  export { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';
3
+ export { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';
3
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport {\n AttachmentTag,\n attachmentTagClassNames,\n renderAttachmentTag_unstable,\n useAttachmentTagStyles_unstable,\n useAttachmentTag_unstable,\n} from './AttachmentTag';\nexport type {\n AttachmentTagDismissedData,\n AttachmentTagListProps,\n AttachmentTagListSlots,\n AttachmentTagListState,\n} from './AttachmentTagList';\nexport {\n AttachmentTagList,\n attachmentTagListClassNames,\n renderAttachmentTagList_unstable,\n useAttachmentTagListStyles_unstable,\n useAttachmentTagList_unstable,\n} from './AttachmentTagList';\n"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag';\nexport {\n AttachmentTag,\n attachmentTagClassNames,\n renderAttachmentTag_unstable,\n useAttachmentTagStyles_unstable,\n useAttachmentTag_unstable,\n} from './AttachmentTag';\nexport type {\n AttachmentTagDismissedData,\n AttachmentTagListProps,\n AttachmentTagListSlots,\n AttachmentTagListState,\n} from './AttachmentTagList';\nexport {\n AttachmentTagList,\n attachmentTagListClassNames,\n renderAttachmentTagList_unstable,\n useAttachmentTagListStyles_unstable,\n useAttachmentTagList_unstable,\n} from './AttachmentTagList';\n\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem';\nexport { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';\n"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,yBAAyB,QACpB,kBAAkB;AAOzB,SACEC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,6BAA6B,QACxB,sBAAsB;AAG7B,SAASC,iBAAiB,EAAEC,2BAA2B,EAAEC,gCAAgC,EAAEC,mCAAmC,EAAEC,6BAA6B,QAAQ,sBAAsB"}
@@ -8,54 +8,14 @@ Object.defineProperty(exports, "useAttachmentTag_unstable", {
8
8
  return useAttachmentTag_unstable;
9
9
  }
10
10
  });
11
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- const _reactcomponents = require("@fluentui/react-components");
14
- const _reactcontextselector = require("@fluentui/react-context-selector");
15
- const _reacticons = require("@fluentui/react-icons");
16
- const _attachmentTagListContext = require("../../contexts/attachmentTagListContext");
11
+ const _useAttachmentTagSlots = require("../utils/useAttachmentTagSlots");
17
12
  const useAttachmentTag_unstable = (props, ref)=>{
18
- const onAttachmentTagDismiss = (0, _attachmentTagListContext.useAttachmentTagListContext_unstable)((context)=>context.onAttachmentTagDismiss);
19
- const { children, role } = props;
20
- const DismissIcon = (0, _reacticons.bundleIcon)(_reacticons.Dismiss20Filled, _reacticons.Dismiss20Regular);
21
- const hasParentContext = (0, _reactcontextselector.useHasParentContext)(_attachmentTagListContext.AttachmentTagListContext);
22
- const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
23
- const root = _reactcomponents.slot.always((0, _reactcomponents.getNativeElementProps)('button', {
24
- ref,
25
- ...props,
26
- role: rootRole
27
- }), {
28
- elementType: 'button'
29
- });
30
- root.onClick = (0, _reactcomponents.mergeCallbacks)(root.onClick, (ev)=>onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {
31
- content: children,
32
- media
33
- }));
34
- const media = _reactcomponents.slot.optional(props.media, {
35
- elementType: 'span'
36
- });
37
- const content = _reactcomponents.slot.always(props.content, {
38
- defaultProps: {
39
- children
40
- },
41
- elementType: 'span'
42
- });
43
- const icon = _reactcomponents.slot.always(props.icon, {
44
- defaultProps: {
45
- children: /*#__PURE__*/ _react.createElement(DismissIcon, null)
46
- },
47
- elementType: 'span'
48
- });
49
- return {
50
- components: {
13
+ return (0, _useAttachmentTagSlots.useAttachmentTagSlots)(props, ref, {
14
+ elementType: {
51
15
  root: 'button',
52
16
  media: 'span',
53
17
  content: 'span',
54
18
  icon: 'span'
55
- },
56
- root,
57
- media,
58
- content,
59
- icon
60
- };
19
+ }
20
+ });
61
21
  }; //# sourceMappingURL=useAttachmentTag.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTag.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';\nimport { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (props, ref) => {\n const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);\n const {\n children,\n role\n } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const hasParentContext = useHasParentContext(AttachmentTagListContext);\n const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;\n const root = slot.always(getNativeElementProps('button', {\n ref,\n ...props,\n role: rootRole\n }), {\n elementType: 'button'\n });\n root.onClick = mergeCallbacks(root.onClick, ev => onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {\n content: children,\n media\n }));\n const media = slot.optional(props.media, {\n elementType: 'span'\n });\n const content = slot.always(props.content, {\n defaultProps: {\n children\n },\n elementType: 'span'\n });\n const icon = slot.always(props.icon, {\n defaultProps: {\n children: /*#__PURE__*/React.createElement(DismissIcon, null)\n },\n elementType: 'span'\n });\n return {\n components: {\n root: 'button',\n media: 'span',\n content: 'span',\n icon: 'span'\n },\n root,\n media,\n content,\n icon\n };\n};\n//# sourceMappingURL=useAttachmentTag.js.map"],"names":["useAttachmentTag_unstable","props","ref","onAttachmentTagDismiss","useAttachmentTagListContext_unstable","context","children","role","DismissIcon","bundleIcon","Dismiss20Filled","Dismiss20Regular","hasParentContext","useHasParentContext","AttachmentTagListContext","rootRole","undefined","root","slot","always","getNativeElementProps","elementType","onClick","mergeCallbacks","ev","content","media","optional","defaultProps","icon","React","createElement","components"],"mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;iCACqC;sCACxB;4BAC0B;0CACT;AAW9C,MAAMA,4BAA4B,CAACC,OAAOC;IAC/C,MAAMC,yBAAyBC,IAAAA,8DAAoC,EAACC,CAAAA,UAAWA,QAAQF,sBAAsB;IAC7G,MAAM,EACJG,QAAQ,EACRC,IAAI,EACL,GAAGN;IACJ,MAAMO,cAAcC,IAAAA,sBAAU,EAACC,2BAAe,EAAEC,4BAAgB;IAChE,MAAMC,mBAAmBC,IAAAA,yCAAmB,EAACC,kDAAwB;IACrE,MAAMC,WAAWR,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAOK,mBAAmB,aAAaI;IAC3F,MAAMC,OAAOC,qBAAI,CAACC,MAAM,CAACC,IAAAA,sCAAqB,EAAC,UAAU;QACvDlB;QACA,GAAGD,KAAK;QACRM,MAAMQ;IACR,IAAI;QACFM,aAAa;IACf;IACAJ,KAAKK,OAAO,GAAGC,IAAAA,+BAAc,EAACN,KAAKK,OAAO,EAAEE,CAAAA,KAAMrB,2BAA2B,QAAQA,2BAA2B,KAAK,IAAI,KAAK,IAAIA,uBAAuBqB,IAAI;YAC3JC,SAASnB;YACToB;QACF;IACA,MAAMA,QAAQR,qBAAI,CAACS,QAAQ,CAAC1B,MAAMyB,KAAK,EAAE;QACvCL,aAAa;IACf;IACA,MAAMI,UAAUP,qBAAI,CAACC,MAAM,CAAClB,MAAMwB,OAAO,EAAE;QACzCG,cAAc;YACZtB;QACF;QACAe,aAAa;IACf;IACA,MAAMQ,OAAOX,qBAAI,CAACC,MAAM,CAAClB,MAAM4B,IAAI,EAAE;QACnCD,cAAc;YACZtB,UAAU,WAAW,GAAEwB,OAAMC,aAAa,CAACvB,aAAa;QAC1D;QACAa,aAAa;IACf;IACA,OAAO;QACLW,YAAY;YACVf,MAAM;YACNS,OAAO;YACPD,SAAS;YACTI,MAAM;QACR;QACAZ;QACAS;QACAD;QACAI;IACF;AACF,GACA,4CAA4C"}
1
+ {"version":3,"sources":["useAttachmentTag.js"],"sourcesContent":["import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (props, ref) => {\n return useAttachmentTagSlots(props, ref, {\n elementType: {\n root: 'button',\n media: 'span',\n content: 'span',\n icon: 'span'\n }\n });\n};\n//# sourceMappingURL=useAttachmentTag.js.map"],"names":["useAttachmentTag_unstable","props","ref","useAttachmentTagSlots","elementType","root","media","content","icon"],"mappings":";;;;+BAUaA;;;eAAAA;;;uCAVyB;AAU/B,MAAMA,4BAA4B,CAACC,OAAOC;IAC/C,OAAOC,IAAAA,4CAAqB,EAACF,OAAOC,KAAK;QACvCE,aAAa;YACXC,MAAM;YACNC,OAAO;YACPC,SAAS;YACTC,MAAM;QACR;IACF;AACF,GACA,4CAA4C"}
@@ -12,6 +12,18 @@ _export(exports, {
12
12
  attachmentTagClassNames: function() {
13
13
  return attachmentTagClassNames;
14
14
  },
15
+ ATTACHMENTTAG_MAXWIDTH: function() {
16
+ return ATTACHMENTTAG_MAXWIDTH;
17
+ },
18
+ useMediaBaseClassName: function() {
19
+ return useMediaBaseClassName;
20
+ },
21
+ useContentBaseClassName: function() {
22
+ return useContentBaseClassName;
23
+ },
24
+ useIconBaseClassName: function() {
25
+ return useIconBaseClassName;
26
+ },
15
27
  useAttachmentTagStyles_unstable: function() {
16
28
  return useAttachmentTagStyles_unstable;
17
29
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTagStyles.js"],"sourcesContent":["import { __resetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nexport const attachmentTagClassNames = {\n root: 'fai-AttachmentTag',\n media: 'fai-AttachmentTag__media',\n content: 'fai-AttachmentTag__content',\n icon: 'fai-AttachmentTag__icon'\n};\nconst ATTACHMENTTAG_MAXWIDTH = '180px';\nconst ATTACHMENTTAG_SIZE = '20px';\nconst useRootBaseClassName = __resetStyles(\"r1km3emv\", \"r21ecva\", [\".r1km3emv{color:var(--colorNeutralForeground1);align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;max-width:180px;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalS);vertical-align:middle;}\", \".r1km3emv:hover{border-color:var(--colorNeutralStroke1Hover);}\", \".r1km3emv:hover .fai-AttachmentTag__icon{color:var(--colorBrandForegroundLinkHover);}\", \".r1km3emv:hover:active{border-color:var(--colorNeutralStroke1Pressed);}\", \".r1km3emv:hover:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}\", \".r1km3emv:focus .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandHover);}\", \".r1km3emv:focus:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}\", \".r21ecva{color:var(--colorNeutralForeground1);align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;max-width:180px;padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalXS);vertical-align:middle;}\", \".r21ecva:hover{border-color:var(--colorNeutralStroke1Hover);}\", \".r21ecva:hover .fai-AttachmentTag__icon{color:var(--colorBrandForegroundLinkHover);}\", \".r21ecva:hover:active{border-color:var(--colorNeutralStroke1Pressed);}\", \".r21ecva:hover:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}\", \".r21ecva:focus .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandHover);}\", \".r21ecva:focus:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}\"]);\nconst useMediaBaseClassName = __resetStyles(\"r19jnv3a\", null, [\".r19jnv3a{font-size:20px;height:20px;line-height:20px;width:20px;}\"]);\nconst useContentBaseClassName = __resetStyles(\"rmt99gk\", null, [\".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}\"]);\nconst useIconBaseClassName = __resetStyles(\"r176grtk\", null, [\".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}\"]);\n/**\n * Apply styling to the AttachmentTag slots based on the state\n */\nexport const useAttachmentTagStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(attachmentTagClassNames.content, contentBaseClassName, state.content.className);\n state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentTagStyles.js.map"],"names":["attachmentTagClassNames","useAttachmentTagStyles_unstable","root","media","content","icon","ATTACHMENTTAG_MAXWIDTH","ATTACHMENTTAG_SIZE","useRootBaseClassName","__resetStyles","useMediaBaseClassName","useContentBaseClassName","useIconBaseClassName","state","rootBaseClassName","mediaBaseClassName","contentBaseClassName","iconBaseClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,uBAAuB;eAAvBA;;IAeAC,+BAA+B;eAA/BA;;;iCAhByD;AAC/D,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR;AACA,MAAMC,yBAAyB;AAC/B,MAAMC,qBAAqB;AAC3B,MAAMC,uBAAuBC,IAAAA,8BAAa,EAAC,YAAY,WAAW;IAAC;IAA8f;IAAkE;IAAyF;IAA2E;IAAsG;IAA6F;IAAsG;IAA6f;IAAiE;IAAwF;IAA0E;IAAqG;IAA4F;CAAoG;AACrlE,MAAMC,wBAAwBD,IAAAA,8BAAa,EAAC,YAAY,MAAM;IAAC;CAAqE;AACpI,MAAME,0BAA0BF,IAAAA,8BAAa,EAAC,WAAW,MAAM;IAAC;CAAsN;AACtR,MAAMG,uBAAuBH,IAAAA,8BAAa,EAAC,YAAY,MAAM;IAAC;CAA+jB;AAItnB,MAAMR,kCAAkCY,CAAAA;IAC7C,MAAMC,oBAAoBN;IAC1B,MAAMO,qBAAqBL;IAC3B,MAAMM,uBAAuBL;IAC7B,MAAMM,oBAAoBL;IAC1BC,MAAMX,IAAI,CAACgB,SAAS,GAAGC,IAAAA,6BAAY,EAACnB,wBAAwBE,IAAI,EAAEY,mBAAmBD,MAAMX,IAAI,CAACgB,SAAS;IACzG,IAAIL,MAAMV,KAAK,EAAE;QACfU,MAAMV,KAAK,CAACe,SAAS,GAAGC,IAAAA,6BAAY,EAACnB,wBAAwBG,KAAK,EAAEY,oBAAoBF,MAAMV,KAAK,CAACe,SAAS;IAC/G;IACAL,MAAMT,OAAO,CAACc,SAAS,GAAGC,IAAAA,6BAAY,EAACnB,wBAAwBI,OAAO,EAAEY,sBAAsBH,MAAMT,OAAO,CAACc,SAAS;IACrHL,MAAMR,IAAI,CAACa,SAAS,GAAGC,IAAAA,6BAAY,EAACnB,wBAAwBK,IAAI,EAAEY,mBAAmBJ,MAAMR,IAAI,CAACa,SAAS;IACzG,OAAOL;AACT,GACA,kDAAkD"}
1
+ {"version":3,"sources":["useAttachmentTagStyles.js"],"sourcesContent":["import { __resetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nexport const attachmentTagClassNames = {\n root: 'fai-AttachmentTag',\n media: 'fai-AttachmentTag__media',\n content: 'fai-AttachmentTag__content',\n icon: 'fai-AttachmentTag__icon'\n};\n/**\n * @internal\n */\nexport const ATTACHMENTTAG_MAXWIDTH = '180px';\nconst ATTACHMENTTAG_SIZE = '20px';\nconst useRootBaseClassName = __resetStyles(\"r1km3emv\", \"r21ecva\", [\".r1km3emv{color:var(--colorNeutralForeground1);align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;max-width:180px;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalS);vertical-align:middle;}\", \".r1km3emv:hover{border-color:var(--colorNeutralStroke1Hover);}\", \".r1km3emv:hover .fai-AttachmentTag__icon{color:var(--colorBrandForegroundLinkHover);}\", \".r1km3emv:hover:active{border-color:var(--colorNeutralStroke1Pressed);}\", \".r1km3emv:hover:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}\", \".r1km3emv:focus .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandHover);}\", \".r1km3emv:focus:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}\", \".r21ecva{color:var(--colorNeutralForeground1);align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;max-width:180px;padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalXS);vertical-align:middle;}\", \".r21ecva:hover{border-color:var(--colorNeutralStroke1Hover);}\", \".r21ecva:hover .fai-AttachmentTag__icon{color:var(--colorBrandForegroundLinkHover);}\", \".r21ecva:hover:active{border-color:var(--colorNeutralStroke1Pressed);}\", \".r21ecva:hover:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}\", \".r21ecva:focus .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandHover);}\", \".r21ecva:focus:active .fai-AttachmentTag__icon{color:var(--colorNeutralForeground2BrandPressed);}\"]);\n/**\n * @internal\n */\nexport const useMediaBaseClassName = __resetStyles(\"r19jnv3a\", null, [\".r19jnv3a{font-size:20px;height:20px;line-height:20px;width:20px;}\"]);\n/**\n * @internal\n */\nexport const useContentBaseClassName = __resetStyles(\"rmt99gk\", null, [\".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}\"]);\n/**\n * @internal\n */\nexport const useIconBaseClassName = __resetStyles(\"r176grtk\", null, [\".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}\"]);\n/**\n * Apply styling to the AttachmentTag slots based on the state\n */\nexport const useAttachmentTagStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(attachmentTagClassNames.content, contentBaseClassName, state.content.className);\n state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentTagStyles.js.map"],"names":["attachmentTagClassNames","ATTACHMENTTAG_MAXWIDTH","useMediaBaseClassName","useContentBaseClassName","useIconBaseClassName","useAttachmentTagStyles_unstable","root","media","content","icon","ATTACHMENTTAG_SIZE","useRootBaseClassName","__resetStyles","state","rootBaseClassName","mediaBaseClassName","contentBaseClassName","iconBaseClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,uBAAuB;eAAvBA;;IASAC,sBAAsB;eAAtBA;;IAMAC,qBAAqB;eAArBA;;IAIAC,uBAAuB;eAAvBA;;IAIAC,oBAAoB;eAApBA;;IAIAC,+BAA+B;eAA/BA;;;iCA5ByD;AAC/D,MAAML,0BAA0B;IACrCM,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR;AAIO,MAAMR,yBAAyB;AACtC,MAAMS,qBAAqB;AAC3B,MAAMC,uBAAuBC,IAAAA,8BAAa,EAAC,YAAY,WAAW;IAAC;IAA8f;IAAkE;IAAyF;IAA2E;IAAsG;IAA6F;IAAsG;IAA6f;IAAiE;IAAwF;IAA0E;IAAqG;IAA4F;CAAoG;AAI9kE,MAAMV,wBAAwBU,IAAAA,8BAAa,EAAC,YAAY,MAAM;IAAC;CAAqE;AAIpI,MAAMT,0BAA0BS,IAAAA,8BAAa,EAAC,WAAW,MAAM;IAAC;CAAsN;AAItR,MAAMR,uBAAuBQ,IAAAA,8BAAa,EAAC,YAAY,MAAM;IAAC;CAA+jB;AAI7nB,MAAMP,kCAAkCQ,CAAAA;IAC7C,MAAMC,oBAAoBH;IAC1B,MAAMI,qBAAqBb;IAC3B,MAAMc,uBAAuBb;IAC7B,MAAMc,oBAAoBb;IAC1BS,MAAMP,IAAI,CAACY,SAAS,GAAGC,IAAAA,6BAAY,EAACnB,wBAAwBM,IAAI,EAAEQ,mBAAmBD,MAAMP,IAAI,CAACY,SAAS;IACzG,IAAIL,MAAMN,KAAK,EAAE;QACfM,MAAMN,KAAK,CAACW,SAAS,GAAGC,IAAAA,6BAAY,EAACnB,wBAAwBO,KAAK,EAAEQ,oBAAoBF,MAAMN,KAAK,CAACW,SAAS;IAC/G;IACAL,MAAML,OAAO,CAACU,SAAS,GAAGC,IAAAA,6BAAY,EAACnB,wBAAwBQ,OAAO,EAAEQ,sBAAsBH,MAAML,OAAO,CAACU,SAAS;IACrHL,MAAMJ,IAAI,CAACS,SAAS,GAAGC,IAAAA,6BAAY,EAACnB,wBAAwBS,IAAI,EAAEQ,mBAAmBJ,MAAMJ,IAAI,CAACS,SAAS;IACzG,OAAOL;AACT,GACA,kDAAkD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTagItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\n// AttachmentTagItem component - TODO: add more docs\nexport const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n//# sourceMappingURL=AttachmentTagItem.js.map"],"names":["AttachmentTagItem","React","forwardRef","props","ref","state","useAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","renderAttachmentTagItem_unstable","displayName"],"mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;sCACuB;yCACG;4CACG;AAE7C,MAAMA,oBAAoB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrE,MAAMC,QAAQC,IAAAA,mDAA6B,EAACH,OAAOC;IACnDG,IAAAA,+DAAmC,EAACF;IACpC,OAAOG,IAAAA,yDAAgC,EAACH;AAC1C;AACAL,kBAAkBS,WAAW,GAAG,qBAChC,6CAA6C"}
1
+ {"version":3,"sources":["AttachmentTagItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nexport const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n//# sourceMappingURL=AttachmentTagItem.js.map"],"names":["AttachmentTagItem","React","forwardRef","props","ref","state","useAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","renderAttachmentTagItem_unstable","displayName"],"mappings":";;;;+BAIaA;;;eAAAA;;;;iEAJU;sCACuB;yCACG;4CACG;AAC7C,MAAMA,oBAAoB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrE,MAAMC,QAAQC,IAAAA,mDAA6B,EAACH,OAAOC;IACnDG,IAAAA,+DAAmC,EAACF;IACpC,OAAOG,IAAAA,yDAAgC,EAACH;AAC1C;AACAL,kBAAkBS,WAAW,GAAG,qBAChC,6CAA6C"}
@@ -2,6 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from AttachmentTagItemProps.
6
- // & Required<Pick<AttachmentTagItemProps, 'propName'>>
7
5
  //# sourceMappingURL=AttachmentTagItem.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTagItem.types.js"],"sourcesContent":["export {}; // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from AttachmentTagItemProps.\n// & Required<Pick<AttachmentTagItemProps, 'propName'>>\n//# sourceMappingURL=AttachmentTagItem.types.js.map"],"names":[],"mappings":";;;;CAAW,kIAAkI;CAC7I,uDAAuD;CACvD,mDAAmD"}
1
+ {"version":3,"sources":["AttachmentTagItem.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=AttachmentTagItem.types.js.map"],"names":[],"mappings":";;;;CACA,mDAAmD"}
@@ -12,6 +12,11 @@ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
12
  const _reactcomponents = require("@fluentui/react-components");
13
13
  const renderAttachmentTagItem_unstable = (state)=>{
14
14
  (0, _reactcomponents.assertSlots)(state);
15
- // TODO Add additional slots in the appropriate place
16
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
15
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
+ children: [
17
+ state.media && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {}),
18
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
19
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {})
20
+ ]
21
+ });
17
22
  }; //# sourceMappingURL=renderAttachmentTagItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachmentTagItem.js"],"sourcesContent":["import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-components';\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = state => {\n assertSlots(state);\n // TODO Add additional slots in the appropriate place\n return /*#__PURE__*/_jsx(state.root, {});\n};\n//# sourceMappingURL=renderAttachmentTagItem.js.map"],"names":["renderAttachmentTagItem_unstable","state","assertSlots","_jsx","root"],"mappings":";;;;+BAKaA;;;eAAAA;;;4BALe;iCACA;AAIrB,MAAMA,mCAAmCC,CAAAA;IAC9CC,IAAAA,4BAAW,EAACD;IACZ,qDAAqD;IACrD,OAAO,WAAW,GAAEE,IAAAA,eAAI,EAACF,MAAMG,IAAI,EAAE,CAAC;AACxC,GACA,mDAAmD"}
1
+ {"version":3,"sources":["renderAttachmentTagItem.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-components';\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = state => {\n assertSlots(state);\n return /*#__PURE__*/_jsxs(state.root, {\n children: [state.media && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), /*#__PURE__*/_jsx(state.icon, {})]\n });\n};\n//# sourceMappingURL=renderAttachmentTagItem.js.map"],"names":["renderAttachmentTagItem_unstable","state","assertSlots","_jsxs","root","children","media","_jsx","content","icon"],"mappings":";;;;+BAKaA;;;eAAAA;;;4BAL8B;iCACf;AAIrB,MAAMA,mCAAmCC,CAAAA;IAC9CC,IAAAA,4BAAW,EAACD;IACZ,OAAO,WAAW,GAAEE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACpCC,UAAU;YAACJ,MAAMK,KAAK,IAAI,WAAW,GAAEC,IAAAA,eAAI,EAACN,MAAMK,KAAK,EAAE,CAAC;YAAI,WAAW,GAAEC,IAAAA,eAAI,EAACN,MAAMO,OAAO,EAAE,CAAC;YAAI,WAAW,GAAED,IAAAA,eAAI,EAACN,MAAMQ,IAAI,EAAE,CAAC;SAAG;IACxI;AACF,GACA,mDAAmD"}
@@ -8,21 +8,14 @@ Object.defineProperty(exports, "useAttachmentTagItem_unstable", {
8
8
  return useAttachmentTagItem_unstable;
9
9
  }
10
10
  });
11
- const _reactcomponents = require("@fluentui/react-components");
11
+ const _useAttachmentTagSlots = require("../utils/useAttachmentTagSlots");
12
12
  const useAttachmentTagItem_unstable = (props, ref)=>{
13
- return {
14
- // TODO add appropriate props/defaults
15
- components: {
16
- // TODO add each slot's element type or component
17
- root: 'div'
18
- },
19
- // TODO add appropriate slots, for example:
20
- // mySlot: slot.optional(props.mySlot),
21
- root: _reactcomponents.slot.always((0, _reactcomponents.getNativeElementProps)('div', {
22
- ref,
23
- ...props
24
- }), {
25
- elementType: 'div'
26
- })
27
- };
13
+ return (0, _useAttachmentTagSlots.useAttachmentTagSlots)(props, ref, {
14
+ elementType: {
15
+ root: 'div',
16
+ media: 'span',
17
+ content: 'span',
18
+ icon: 'span'
19
+ }
20
+ });
28
21
  }; //# sourceMappingURL=useAttachmentTagItem.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTagItem.js"],"sourcesContent":["import { getNativeElementProps, slot } from '@fluentui/react-components';\n// If you add JSX to this file, be sure to change the file type to .tsx\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (props, ref) => {\n return {\n // TODO add appropriate props/defaults\n components: {\n // TODO add each slot's element type or component\n root: 'div'\n },\n // TODO add appropriate slots, for example:\n // mySlot: slot.optional(props.mySlot),\n root: slot.always(getNativeElementProps('div', {\n ref,\n ...props\n }), {\n elementType: 'div'\n })\n };\n};\n//# sourceMappingURL=useAttachmentTagItem.js.map"],"names":["useAttachmentTagItem_unstable","props","ref","components","root","slot","always","getNativeElementProps","elementType"],"mappings":";;;;+BAWaA;;;eAAAA;;;iCAX+B;AAWrC,MAAMA,gCAAgC,CAACC,OAAOC;IACnD,OAAO;QACL,sCAAsC;QACtCC,YAAY;YACV,iDAAiD;YACjDC,MAAM;QACR;QACA,2CAA2C;QAC3C,uCAAuC;QACvCA,MAAMC,qBAAI,CAACC,MAAM,CAACC,IAAAA,sCAAqB,EAAC,OAAO;YAC7CL;YACA,GAAGD,KAAK;QACV,IAAI;YACFO,aAAa;QACf;IACF;AACF,GACA,gDAAgD"}
1
+ {"version":3,"sources":["useAttachmentTagItem.js"],"sourcesContent":["import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (props, ref) => {\n return useAttachmentTagSlots(props, ref, {\n elementType: {\n root: 'div',\n media: 'span',\n content: 'span',\n icon: 'span'\n }\n });\n};\n//# sourceMappingURL=useAttachmentTagItem.js.map"],"names":["useAttachmentTagItem_unstable","props","ref","useAttachmentTagSlots","elementType","root","media","content","icon"],"mappings":";;;;+BAUaA;;;eAAAA;;;uCAVyB;AAU/B,MAAMA,gCAAgC,CAACC,OAAOC;IACnD,OAAOC,IAAAA,4CAAqB,EAACF,OAAOC,KAAK;QACvCE,aAAa;YACXC,MAAM;YACNC,OAAO;YACPC,SAAS;YACTC,MAAM;QACR;IACF;AACF,GACA,gDAAgD"}
@@ -17,18 +17,28 @@ _export(exports, {
17
17
  }
18
18
  });
19
19
  const _reactcomponents = require("@fluentui/react-components");
20
+ const _useAttachmentTagStyles = require("../AttachmentTag/useAttachmentTagStyles");
20
21
  const attachmentTagItemClassNames = {
21
- root: 'fai-AttachmentTagItem'
22
+ root: 'fai-AttachmentTagItem',
23
+ media: 'fai-AttachmentTagItem__media',
24
+ content: 'fai-AttachmentTagItem__content',
25
+ icon: 'fai-AttachmentTagItem__icon'
22
26
  };
23
27
  /**
24
28
  * Styles for the root slot
25
- */ const useStyles = (0, _reactcomponents.__styles)({
26
- root: {}
27
- }, {});
29
+ */ const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("rcbi0rb", null, [
30
+ ".rcbi0rb{display:inline-flex;flex-wrap:nowrap;column-gap:var(--spacingHorizontalSNudge);max-width:180px;align-items:center;}"
31
+ ]);
28
32
  const useAttachmentTagItemStyles_unstable = (state)=>{
29
- const styles = useStyles();
30
- state.root.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.root, styles.root, state.root.className);
31
- // TODO Add class names to slots, for example:
32
- // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
33
+ const rootBaseClassName = useRootBaseClassName();
34
+ const mediaBaseClassName = (0, _useAttachmentTagStyles.useMediaBaseClassName)();
35
+ const contentBaseClassName = (0, _useAttachmentTagStyles.useContentBaseClassName)();
36
+ const iconBaseClassName = (0, _useAttachmentTagStyles.useIconBaseClassName)();
37
+ state.root.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);
38
+ if (state.media) {
39
+ state.media.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);
40
+ }
41
+ state.content.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);
42
+ state.icon.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);
33
43
  return state;
34
44
  }; //# sourceMappingURL=useAttachmentTagItemStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTagItemStyles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@fluentui/react-components';\nexport const attachmentTagItemClassNames = {\n root: 'fai-AttachmentTagItem'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = __styles({\n root: {}\n}, {});\n/**\n * Apply styling to the AttachmentTagItem slots based on the state\n */\nexport const useAttachmentTagItemStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(attachmentTagItemClassNames.root, styles.root, state.root.className);\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentTagItemStyles.js.map"],"names":["attachmentTagItemClassNames","useAttachmentTagItemStyles_unstable","root","useStyles","__styles","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,2BAA2B;eAA3BA;;IAYAC,mCAAmC;eAAnCA;;;iCAb0B;AAChC,MAAMD,8BAA8B;IACzCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAYC,IAAAA,yBAAQ,EAAC;IACzBF,MAAM,CAAC;AACT,GAAG,CAAC;AAIG,MAAMD,sCAAsCI,CAAAA;IACjD,MAAMC,SAASH;IACfE,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,6BAAY,EAACR,4BAA4BE,IAAI,EAAEI,OAAOJ,IAAI,EAAEG,MAAMH,IAAI,CAACK,SAAS;IACvG,8CAA8C;IAC9C,gFAAgF;IAChF,OAAOF;AACT,GACA,sDAAsD"}
1
+ {"version":3,"sources":["useAttachmentTagItemStyles.js"],"sourcesContent":["import { __resetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport { ATTACHMENTTAG_MAXWIDTH, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from '../AttachmentTag/useAttachmentTagStyles';\nexport const attachmentTagItemClassNames = {\n root: 'fai-AttachmentTagItem',\n media: 'fai-AttachmentTagItem__media',\n content: 'fai-AttachmentTagItem__content',\n icon: 'fai-AttachmentTagItem__icon'\n};\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = __resetStyles(\"rcbi0rb\", null, [\".rcbi0rb{display:inline-flex;flex-wrap:nowrap;column-gap:var(--spacingHorizontalSNudge);max-width:180px;align-items:center;}\"]);\n/**\n * Apply styling to the AttachmentTagItem slots based on the state\n */\nexport const useAttachmentTagItemStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);\n state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentTagItemStyles.js.map"],"names":["attachmentTagItemClassNames","useAttachmentTagItemStyles_unstable","root","media","content","icon","useRootBaseClassName","__resetStyles","state","rootBaseClassName","mediaBaseClassName","useMediaBaseClassName","contentBaseClassName","useContentBaseClassName","iconBaseClassName","useIconBaseClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,2BAA2B;eAA3BA;;IAaAC,mCAAmC;eAAnCA;;;iCAfuC;wCACyD;AACtG,MAAMD,8BAA8B;IACzCE,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,uBAAuBC,IAAAA,8BAAa,EAAC,WAAW,MAAM;IAAC;CAA+H;AAIrL,MAAMN,sCAAsCO,CAAAA;IACjD,MAAMC,oBAAoBH;IAC1B,MAAMI,qBAAqBC,IAAAA,6CAAqB;IAChD,MAAMC,uBAAuBC,IAAAA,+CAAuB;IACpD,MAAMC,oBAAoBC,IAAAA,4CAAoB;IAC9CP,MAAMN,IAAI,CAACc,SAAS,GAAGC,IAAAA,6BAAY,EAACjB,4BAA4BE,IAAI,EAAEO,mBAAmBD,MAAMN,IAAI,CAACc,SAAS;IAC7G,IAAIR,MAAML,KAAK,EAAE;QACfK,MAAML,KAAK,CAACa,SAAS,GAAGC,IAAAA,6BAAY,EAACjB,4BAA4BG,KAAK,EAAEO,oBAAoBF,MAAML,KAAK,CAACa,SAAS;IACnH;IACAR,MAAMJ,OAAO,CAACY,SAAS,GAAGC,IAAAA,6BAAY,EAACjB,4BAA4BI,OAAO,EAAEQ,sBAAsBJ,MAAMJ,OAAO,CAACY,SAAS;IACzHR,MAAMH,IAAI,CAACW,SAAS,GAAGC,IAAAA,6BAAY,EAACjB,4BAA4BK,IAAI,EAAES,mBAAmBN,MAAMH,IAAI,CAACW,SAAS;IAC7G,OAAOR;AACT,GACA,sDAAsD"}
@@ -5,4 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  const _export_star = require("@swc/helpers/_/_export_star");
6
6
  _export_star._(require("./AttachmentTag"), exports);
7
7
  _export_star._(require("./AttachmentTagList"), exports);
8
+ _export_star._(require("./AttachmentTagItem"), exports);
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;CACd,iCAAiC"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useAttachmentTagSlots", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useAttachmentTagSlots;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactcomponents = require("@fluentui/react-components");
14
+ const _reactcontextselector = require("@fluentui/react-context-selector");
15
+ const _reacticons = require("@fluentui/react-icons");
16
+ const _attachmentTagListContext = require("../../contexts/attachmentTagListContext");
17
+ function useAttachmentTagSlots(props, ref, options) {
18
+ const onAttachmentTagDismiss = (0, _attachmentTagListContext.useAttachmentTagListContext_unstable)((context)=>context.onAttachmentTagDismiss);
19
+ const { children, role } = props;
20
+ const { elementType } = options;
21
+ const DismissIcon = (0, _reacticons.bundleIcon)(_reacticons.Dismiss20Filled, _reacticons.Dismiss20Regular);
22
+ const hasParentContext = (0, _reactcontextselector.useHasParentContext)(_attachmentTagListContext.AttachmentTagListContext);
23
+ const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
24
+ const root = _reactcomponents.slot.always((0, _reactcomponents.getNativeElementProps)(elementType.root, {
25
+ ref,
26
+ ...props,
27
+ role: rootRole
28
+ }), {
29
+ elementType: elementType.root
30
+ });
31
+ root.onClick = (0, _reactcomponents.mergeCallbacks)(root.onClick, (ev)=>onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {
32
+ content: children,
33
+ media
34
+ }));
35
+ const media = _reactcomponents.slot.optional(props.media, {
36
+ elementType: elementType.media
37
+ });
38
+ const content = _reactcomponents.slot.always(props.content, {
39
+ defaultProps: {
40
+ children
41
+ },
42
+ elementType: elementType.content
43
+ });
44
+ const icon = _reactcomponents.slot.always(props.icon, {
45
+ defaultProps: {
46
+ children: /*#__PURE__*/ _react.createElement(DismissIcon, null)
47
+ },
48
+ elementType: elementType.icon
49
+ });
50
+ return {
51
+ components: {
52
+ root: elementType.root,
53
+ media: elementType.media,
54
+ content: elementType.content,
55
+ icon: elementType.icon
56
+ },
57
+ root,
58
+ media,
59
+ content,
60
+ icon
61
+ };
62
+ } //# sourceMappingURL=useAttachmentTagSlots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentTagSlots.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';\nimport { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';\n/**\n * @internal\n * Create the slots required to render AttachmentTag or AttachmentTagItem.\n */\nexport function useAttachmentTagSlots(props, ref, options) {\n const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);\n const {\n children,\n role\n } = props;\n const {\n elementType\n } = options;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const hasParentContext = useHasParentContext(AttachmentTagListContext);\n const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;\n const root = slot.always(getNativeElementProps(elementType.root, {\n ref,\n ...props,\n role: rootRole\n }), {\n elementType: elementType.root\n });\n root.onClick = mergeCallbacks(root.onClick, ev => onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {\n content: children,\n media\n }));\n const media = slot.optional(props.media, {\n elementType: elementType.media\n });\n const content = slot.always(props.content, {\n defaultProps: {\n children\n },\n elementType: elementType.content\n });\n const icon = slot.always(props.icon, {\n defaultProps: {\n children: /*#__PURE__*/React.createElement(DismissIcon, null)\n },\n elementType: elementType.icon\n });\n return {\n components: {\n root: elementType.root,\n media: elementType.media,\n content: elementType.content,\n icon: elementType.icon\n },\n root,\n media,\n content,\n icon\n };\n}\n//# sourceMappingURL=useAttachmentTagSlots.js.map"],"names":["useAttachmentTagSlots","props","ref","options","onAttachmentTagDismiss","useAttachmentTagListContext_unstable","context","children","role","elementType","DismissIcon","bundleIcon","Dismiss20Filled","Dismiss20Regular","hasParentContext","useHasParentContext","AttachmentTagListContext","rootRole","undefined","root","slot","always","getNativeElementProps","onClick","mergeCallbacks","ev","content","media","optional","defaultProps","icon","React","createElement","components"],"mappings":";;;;+BAUgBA;;;eAAAA;;;;iEAVO;iCACqC;sCACxB;4BAC0B;0CACT;AAM9C,SAASA,sBAAsBC,KAAK,EAAEC,GAAG,EAAEC,OAAO;IACvD,MAAMC,yBAAyBC,IAAAA,8DAAoC,EAACC,CAAAA,UAAWA,QAAQF,sBAAsB;IAC7G,MAAM,EACJG,QAAQ,EACRC,IAAI,EACL,GAAGP;IACJ,MAAM,EACJQ,WAAW,EACZ,GAAGN;IACJ,MAAMO,cAAcC,IAAAA,sBAAU,EAACC,2BAAe,EAAEC,4BAAgB;IAChE,MAAMC,mBAAmBC,IAAAA,yCAAmB,EAACC,kDAAwB;IACrE,MAAMC,WAAWT,SAAS,QAAQA,SAAS,KAAK,IAAIA,OAAOM,mBAAmB,aAAaI;IAC3F,MAAMC,OAAOC,qBAAI,CAACC,MAAM,CAACC,IAAAA,sCAAqB,EAACb,YAAYU,IAAI,EAAE;QAC/DjB;QACA,GAAGD,KAAK;QACRO,MAAMS;IACR,IAAI;QACFR,aAAaA,YAAYU,IAAI;IAC/B;IACAA,KAAKI,OAAO,GAAGC,IAAAA,+BAAc,EAACL,KAAKI,OAAO,EAAEE,CAAAA,KAAMrB,2BAA2B,QAAQA,2BAA2B,KAAK,IAAI,KAAK,IAAIA,uBAAuBqB,IAAI;YAC3JC,SAASnB;YACToB;QACF;IACA,MAAMA,QAAQP,qBAAI,CAACQ,QAAQ,CAAC3B,MAAM0B,KAAK,EAAE;QACvClB,aAAaA,YAAYkB,KAAK;IAChC;IACA,MAAMD,UAAUN,qBAAI,CAACC,MAAM,CAACpB,MAAMyB,OAAO,EAAE;QACzCG,cAAc;YACZtB;QACF;QACAE,aAAaA,YAAYiB,OAAO;IAClC;IACA,MAAMI,OAAOV,qBAAI,CAACC,MAAM,CAACpB,MAAM6B,IAAI,EAAE;QACnCD,cAAc;YACZtB,UAAU,WAAW,GAAEwB,OAAMC,aAAa,CAACtB,aAAa;QAC1D;QACAD,aAAaA,YAAYqB,IAAI;IAC/B;IACA,OAAO;QACLG,YAAY;YACVd,MAAMV,YAAYU,IAAI;YACtBQ,OAAOlB,YAAYkB,KAAK;YACxBD,SAASjB,YAAYiB,OAAO;YAC5BI,MAAMrB,YAAYqB,IAAI;QACxB;QACAX;QACAQ;QACAD;QACAI;IACF;AACF,EACA,iDAAiD"}
@@ -38,8 +38,24 @@ _export(exports, {
38
38
  },
39
39
  useAttachmentTagList_unstable: function() {
40
40
  return _AttachmentTagList.useAttachmentTagList_unstable;
41
+ },
42
+ AttachmentTagItem: function() {
43
+ return _AttachmentTagItem.AttachmentTagItem;
44
+ },
45
+ attachmentTagItemClassNames: function() {
46
+ return _AttachmentTagItem.attachmentTagItemClassNames;
47
+ },
48
+ renderAttachmentTagItem_unstable: function() {
49
+ return _AttachmentTagItem.renderAttachmentTagItem_unstable;
50
+ },
51
+ useAttachmentTagItemStyles_unstable: function() {
52
+ return _AttachmentTagItem.useAttachmentTagItemStyles_unstable;
53
+ },
54
+ useAttachmentTagItem_unstable: function() {
55
+ return _AttachmentTagItem.useAttachmentTagItem_unstable;
41
56
  }
42
57
  });
43
58
  const _AttachmentTag = require("./AttachmentTag");
44
59
  const _AttachmentTagList = require("./AttachmentTagList");
60
+ const _AttachmentTagItem = require("./AttachmentTagItem");
45
61
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable } from './AttachmentTag';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';\n//# sourceMappingURL=index.js.map"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable"],"mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAChIC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;;+BADZ;mCACoB;CACrK,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable } from './AttachmentTag';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';\nexport { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';\n//# sourceMappingURL=index.js.map"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable"],"mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAChIC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;IACpJC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;;+BAFZ;mCACoB;mCACA;CACrK,iCAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-attachments",
3
- "version": "0.0.0-nightly-20240314-0405-1a885976.1",
3
+ "version": "0.8.1",
4
4
  "description": "A set of components related to attaching files in Copilot experiences.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@fluentui-copilot/react-provider": "0.0.0-nightly-20240314-0405-1a885976.1",
15
+ "@fluentui-copilot/react-provider": "^0.8.0",
16
16
  "@swc/helpers": "^0.5.1"
17
17
  },
18
18
  "peerDependencies": {
@@ -27,7 +27,11 @@
27
27
  "react": ">=16.14.0 <19.0.0",
28
28
  "react-dom": ">=16.14.0 <19.0.0"
29
29
  },
30
- "beachball": {},
30
+ "beachball": {
31
+ "disallowedChangeTypes": [
32
+ "major"
33
+ ]
34
+ },
31
35
  "exports": {
32
36
  ".": {
33
37
  "types": "./dist/index.d.ts",