@fluentui-copilot/react-attachments 0.12.4 → 0.13.0

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 (116) hide show
  1. package/CHANGELOG.json +54 -1
  2. package/CHANGELOG.md +24 -2
  3. package/dist/index.d.ts +0 -151
  4. package/lib/components/AgentTag/useAgentTagStyles.styles.js +4 -4
  5. package/lib/components/AgentTag/useAgentTagStyles.styles.js.map +1 -1
  6. package/lib/components/Attachment/useAttachmentStyles.styles.js +34 -12
  7. package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
  8. package/lib/components/index.js +0 -3
  9. package/lib/components/index.js.map +1 -1
  10. package/lib/index.js +0 -3
  11. package/lib/index.js.map +1 -1
  12. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js +2 -2
  13. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js.map +1 -1
  14. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js +52 -26
  15. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
  16. package/lib-commonjs/components/index.js +0 -60
  17. package/lib-commonjs/components/index.js.map +1 -1
  18. package/lib-commonjs/index.js +0 -48
  19. package/lib-commonjs/index.js.map +1 -1
  20. package/package.json +2 -2
  21. package/lib/AttachmentTag.js +0 -2
  22. package/lib/AttachmentTag.js.map +0 -1
  23. package/lib/AttachmentTagItem.js +0 -2
  24. package/lib/AttachmentTagItem.js.map +0 -1
  25. package/lib/AttachmentTagList.js +0 -2
  26. package/lib/AttachmentTagList.js.map +0 -1
  27. package/lib/components/AttachmentTag/AttachmentTag.js +0 -17
  28. package/lib/components/AttachmentTag/AttachmentTag.js.map +0 -1
  29. package/lib/components/AttachmentTag/AttachmentTag.types.js +0 -4
  30. package/lib/components/AttachmentTag/AttachmentTag.types.js.map +0 -1
  31. package/lib/components/AttachmentTag/index.js +0 -5
  32. package/lib/components/AttachmentTag/index.js.map +0 -1
  33. package/lib/components/AttachmentTag/renderAttachmentTag.js +0 -12
  34. package/lib/components/AttachmentTag/renderAttachmentTag.js.map +0 -1
  35. package/lib/components/AttachmentTag/useAttachmentTag.js +0 -21
  36. package/lib/components/AttachmentTag/useAttachmentTag.js.map +0 -1
  37. package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.js +0 -45
  38. package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.js.map +0 -1
  39. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +0 -15
  40. package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +0 -1
  41. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +0 -4
  42. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js.map +0 -1
  43. package/lib/components/AttachmentTagItem/index.js +0 -5
  44. package/lib/components/AttachmentTagItem/index.js.map +0 -1
  45. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +0 -12
  46. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js.map +0 -1
  47. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +0 -21
  48. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +0 -1
  49. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js +0 -32
  50. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js.map +0 -1
  51. package/lib/components/AttachmentTagList/AttachmentTagList.js +0 -19
  52. package/lib/components/AttachmentTagList/AttachmentTagList.js.map +0 -1
  53. package/lib/components/AttachmentTagList/AttachmentTagList.types.js +0 -2
  54. package/lib/components/AttachmentTagList/AttachmentTagList.types.js.map +0 -1
  55. package/lib/components/AttachmentTagList/index.js +0 -5
  56. package/lib/components/AttachmentTagList/index.js.map +0 -1
  57. package/lib/components/AttachmentTagList/renderAttachmentTagList.js +0 -14
  58. package/lib/components/AttachmentTagList/renderAttachmentTagList.js.map +0 -1
  59. package/lib/components/AttachmentTagList/useAttachmentTagList.js +0 -35
  60. package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +0 -1
  61. package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js +0 -13
  62. package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +0 -1
  63. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.js +0 -17
  64. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.js.map +0 -1
  65. package/lib/components/utils/useAttachmentTagSlots.js +0 -62
  66. package/lib/components/utils/useAttachmentTagSlots.js.map +0 -1
  67. package/lib/contexts/attachmentTagListContext.js +0 -8
  68. package/lib/contexts/attachmentTagListContext.js.map +0 -1
  69. package/lib-commonjs/AttachmentTag.js +0 -41
  70. package/lib-commonjs/AttachmentTag.js.map +0 -1
  71. package/lib-commonjs/AttachmentTagItem.js +0 -29
  72. package/lib-commonjs/AttachmentTagItem.js.map +0 -1
  73. package/lib-commonjs/AttachmentTagList.js +0 -29
  74. package/lib-commonjs/AttachmentTagList.js.map +0 -1
  75. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +0 -23
  76. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +0 -1
  77. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +0 -7
  78. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js.map +0 -1
  79. package/lib-commonjs/components/AttachmentTag/index.js +0 -44
  80. package/lib-commonjs/components/AttachmentTag/index.js.map +0 -1
  81. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js +0 -22
  82. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +0 -1
  83. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js +0 -21
  84. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +0 -1
  85. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.js +0 -78
  86. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.js.map +0 -1
  87. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +0 -21
  88. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +0 -1
  89. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +0 -7
  90. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js.map +0 -1
  91. package/lib-commonjs/components/AttachmentTagItem/index.js +0 -32
  92. package/lib-commonjs/components/AttachmentTagItem/index.js.map +0 -1
  93. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js +0 -22
  94. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +0 -1
  95. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js +0 -21
  96. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +0 -1
  97. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js +0 -45
  98. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js.map +0 -1
  99. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +0 -25
  100. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +0 -1
  101. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js +0 -5
  102. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js.map +0 -1
  103. package/lib-commonjs/components/AttachmentTagList/index.js +0 -32
  104. package/lib-commonjs/components/AttachmentTagList/index.js.map +0 -1
  105. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js +0 -20
  106. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js.map +0 -1
  107. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +0 -33
  108. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +0 -1
  109. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js +0 -20
  110. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +0 -1
  111. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.js +0 -31
  112. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.js.map +0 -1
  113. package/lib-commonjs/components/utils/useAttachmentTagSlots.js +0 -62
  114. package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +0 -1
  115. package/lib-commonjs/contexts/attachmentTagListContext.js +0 -28
  116. package/lib-commonjs/contexts/attachmentTagListContext.js.map +0 -1
@@ -1,2 +0,0 @@
1
- export { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './components/AttachmentTagList/index';
2
- //# sourceMappingURL=AttachmentTagList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["AttachmentTagList.ts"],"sourcesContent":["export type { AttachmentTagDismissedData, AttachmentTagListContextValues, AttachmentTagListProps, AttachmentTagListSlots, AttachmentTagListState } from './components/AttachmentTagList/index';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './components/AttachmentTagList/index';\n"],"names":["AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable"],"rangeMappings":"","mappings":"AACA,SAASA,iBAAiB,EAAEC,2BAA2B,EAAEC,gCAAgC,EAAEC,mCAAmC,EAAEC,6BAA6B,QAAQ,uCAAuC"}
@@ -1,17 +0,0 @@
1
- import * as React from 'react';
2
- import { useAttachmentTag_unstable } from './useAttachmentTag';
3
- import { renderAttachmentTag_unstable } from './renderAttachmentTag';
4
- import { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles.styles';
5
- import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
- /**
7
- * @deprecated use new Attachment component exported from \@fluentui-copilot/react-attachments package instead.
8
- * Deprecated on 4/9/2024.
9
- */
10
- export const AttachmentTag = /*#__PURE__*/React.forwardRef((props, ref) => {
11
- const state = useAttachmentTag_unstable(props, ref);
12
- useAttachmentTagStyles_unstable(state);
13
- useCustomStyleHook('useAttachmentTagStyles')(state);
14
- return renderAttachmentTag_unstable(state);
15
- });
16
- AttachmentTag.displayName = 'AttachmentTag';
17
- //# sourceMappingURL=AttachmentTag.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles.styles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["React","useAttachmentTag_unstable","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useCustomStyleHook","AttachmentTag","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,kCAAkC;AAGlF,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE;;;CAGC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CL,gCAAgCM;IAChCL,mBAAmB,0BAA0BK;IAE7C,OAAOP,6BAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
@@ -1,4 +0,0 @@
1
- /**
2
- * State used in rendering AttachmentTag
3
- */export {};
4
- //# sourceMappingURL=AttachmentTag.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["AttachmentTag.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagSlots = {\n root: NonNullable<Slot<'button'>>;\n\n media?: Slot<'span'>;\n\n content: NonNullable<Slot<'span'>>;\n\n icon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * AttachmentTag Props\n */\nexport type AttachmentTagProps = ComponentProps<Partial<AttachmentTagSlots>>;\n\n/**\n * State used in rendering AttachmentTag\n */\nexport type AttachmentTagState = ComponentState<AttachmentTagSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAiBA;;CAEC,GACD,WAAoE"}
@@ -1,5 +0,0 @@
1
- export { AttachmentTag } from './AttachmentTag';
2
- export { renderAttachmentTag_unstable } from './renderAttachmentTag';
3
- export { useAttachmentTag_unstable } from './useAttachmentTag';
4
- export { ATTACHMENTTAG_MAXWIDTH, attachmentTagClassNames, useAttachmentTagStyles_unstable, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from './useAttachmentTagStyles.styles';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { AttachmentTag } from './AttachmentTag';\nexport type { AttachmentTagProps, AttachmentTagSlots, AttachmentTagState } from './AttachmentTag.types';\nexport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nexport { useAttachmentTag_unstable } from './useAttachmentTag';\nexport { ATTACHMENTTAG_MAXWIDTH, attachmentTagClassNames, useAttachmentTagStyles_unstable, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from './useAttachmentTagStyles.styles';\n"],"names":["AttachmentTag","renderAttachmentTag_unstable","useAttachmentTag_unstable","ATTACHMENTTAG_MAXWIDTH","attachmentTagClassNames","useAttachmentTagStyles_unstable","useContentBaseClassName","useIconBaseClassName","useMediaBaseClassName"],"rangeMappings":";;;","mappings":"AAAA,SAASA,aAAa,QAAQ,kBAAkB;AAEhD,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,sBAAsB,EAAEC,uBAAuB,EAAEC,+BAA+B,EAAEC,uBAAuB,EAAEC,oBAAoB,EAAEC,qBAAqB,QAAQ,kCAAkC"}
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from '@fluentui/react-components';
3
- /**
4
- * Render the final JSX of AttachmentTag
5
- */
6
- export const renderAttachmentTag_unstable = state => {
7
- assertSlots(state);
8
- return /*#__PURE__*/_jsxs(state.root, {
9
- children: [state.media && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), /*#__PURE__*/_jsx(state.icon, {})]
10
- });
11
- };
12
- //# sourceMappingURL=renderAttachmentTag.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["renderAttachmentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagState, AttachmentTagSlots } from './AttachmentTag.types';\n\n/**\n * Render the final JSX of AttachmentTag\n */\nexport const renderAttachmentTag_unstable = (state: AttachmentTagState) => {\n assertSlots<AttachmentTagSlots>(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","renderAttachmentTag_unstable","state","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAAgCE;IAEhC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,KAAK,kBAAI,KAACF,MAAME,KAAK;0BAC5B,KAACF,MAAMG,OAAO;0BACd,KAACH,MAAMI,IAAI;;;AAGjB,EAAE"}
@@ -1,21 +0,0 @@
1
- import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';
2
- /**
3
- * Create the state required to render AttachmentTag.
4
- *
5
- * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,
6
- * before being passed to renderAttachmentTag_unstable.
7
- *
8
- * @param props - props from this instance of AttachmentTag
9
- * @param ref - reference to root HTMLElement of AttachmentTag
10
- */
11
- export const useAttachmentTag_unstable = (props, ref) => {
12
- return useAttachmentTagSlots(props, ref, {
13
- elementType: {
14
- root: 'button',
15
- media: 'span',
16
- content: 'span',
17
- icon: 'span'
18
- }
19
- });
20
- };
21
- //# sourceMappingURL=useAttachmentTag.js.map
@@ -1 +0,0 @@
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<HTMLButtonElement>,\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;","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"}
@@ -1,45 +0,0 @@
1
- import { __resetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';
2
- import { tokens } from '@fluentui-copilot/tokens';
3
- export const attachmentTagClassNames = {
4
- root: 'fai-AttachmentTag',
5
- media: 'fai-AttachmentTag__media',
6
- content: 'fai-AttachmentTag__content',
7
- icon: 'fai-AttachmentTag__icon'
8
- };
9
- /**
10
- * @internal
11
- */
12
- export const ATTACHMENTTAG_MAXWIDTH = '180px';
13
- const ATTACHMENTTAG_SIZE = '20px';
14
- 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);}"]);
15
- /**
16
- * @internal
17
- */
18
- export const useMediaBaseClassName = __resetStyles("r19jnv3a", null, [".r19jnv3a{font-size:20px;height:20px;line-height:20px;width:20px;}"]);
19
- /**
20
- * @internal
21
- */
22
- 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);}"]);
23
- /**
24
- * @internal
25
- */
26
- 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);}"]);
27
- /**
28
- * Apply styling to the AttachmentTag slots based on the state
29
- */
30
- export const useAttachmentTagStyles_unstable = state => {
31
- 'use no memo';
32
-
33
- const rootBaseClassName = useRootBaseClassName();
34
- const mediaBaseClassName = useMediaBaseClassName();
35
- const contentBaseClassName = useContentBaseClassName();
36
- const iconBaseClassName = useIconBaseClassName();
37
- state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);
38
- if (state.media) {
39
- state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);
40
- }
41
- state.content.className = mergeClasses(attachmentTagClassNames.content, contentBaseClassName, state.content.className);
42
- state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);
43
- return state;
44
- };
45
- //# sourceMappingURL=useAttachmentTagStyles.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useAttachmentTagStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\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 'use no memo';\n\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","typographyStyles","tokens","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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,6BAA6B;AAC7F,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,OAAO,MAAMC,yBAAyB,QAAQ;AAC9C,MAAMC,qBAAqB;AAE3B,MAAMC,uBAAuBX,gBAAgB;IAC3CY,OAAOT,OAAOU,uBAAuB;IACrCC,YAAY;IACZC,iBAAiBZ,OAAOa,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEd,OAAOe,eAAe,CAAC,OAAO,EAAEf,OAAOgB,mBAAmB,CAAC,CAAC;IACvEC,cAAcjB,OAAOkB,kBAAkB;IACvCC,WAAW;IACXC,WAAWpB,OAAOqB,uBAAuB;IACzCC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,gBAAgB;IAChBC,UAAUpB;IACVqB,SAAS,CAAC,EAAE3B,OAAO4B,iBAAiB,CAAC,CAAC,EAAE5B,OAAO6B,mBAAmB,CAAC,CAAC,EAAE7B,OAAO4B,iBAAiB,CAAC,CAAC,EAAE5B,OAAO8B,kBAAkB,CAAC,CAAC;IAC7HC,eAAe;IAEf,UAAU;QACRC,aAAahC,OAAOiC,wBAAwB;QAE5C,CAAC,CAAC,GAAG,EAAEhC,wBAAwBI,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOT,OAAOkC,6BAA6B;QAC7C;IACF;IAEA,iBAAiB;QACfF,aAAahC,OAAOmC,0BAA0B;QAE9C,CAAC,CAAC,GAAG,EAAElC,wBAAwBI,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOT,OAAOoC,mCAAmC;QACnD;IACF;IAEA,UAAU;QACR,CAAC,CAAC,GAAG,EAAEnC,wBAAwBI,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOT,OAAOqC,iCAAiC;QACjD;IACF;IAEA,iBAAiB;QACf,CAAC,CAAC,GAAG,EAAEpC,wBAAwBI,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOT,OAAOoC,mCAAmC;QACnD;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,wBAAwBzC,gBAAgB;IACnD0C,UAAUhC;IACViC,QAAQjC;IACRkC,YAAYlC;IACZmC,OAAOnC;AACT,GAAG;AAEH;;CAEC,GACD,OAAO,MAAMoC,0BAA0B9C,gBAAgB;IACrD+C,WAAW;IACXC,cAAc;IACdC,YAAY;IACZ,GAAG/C,iBAAiBgD,KAAK;AAC3B,GAAG;AAEH;;CAEC,GACD,OAAO,MAAMC,uBAAuBnD,gBAAgB;IAClDc,YAAY;IACZM,cAAcjB,OAAOiD,oBAAoB;IACzCnC,QAAQ,CAAC,EAAEd,OAAOe,eAAe,CAAC,OAAO,EAAEf,OAAOkD,sBAAsB,CAAC,CAAC;IAC1E/B,WAAW;IACXV,OAAOT,OAAOU,uBAAuB;IACrCa,SAAS;IACTgB,UAAUhC;IACViC,QAAQ,CAAC,KAAK,EAAEjC,mBAAmB,GAAG,EAAEP,OAAOe,eAAe,CAAC,OAAO,EAAEf,OAAOmD,kBAAkB,CAAC,CAAC,CAAC;IACpG1B,gBAAgB;IAChBC,UAAU,CAAC,KAAK,EAAEnB,mBAAmB,GAAG,EAAEP,OAAOe,eAAe,CAAC,OAAO,EAAEf,OAAOoD,oBAAoB,CAAC,CAAC,CAAC;IACxGC,UAAU,CAAC,KAAK,EAAE9C,mBAAmB,GAAG,EAAEP,OAAOe,eAAe,CAAC,OAAO,EAAEf,OAAOoD,oBAAoB,CAAC,CAAC,CAAC;IACxGzB,SAAS,CAAC,KAAK,EAAE3B,OAAOmD,kBAAkB,CAAC,WAAW,EAAEnD,OAAOoD,oBAAoB,CAAC,KAAK,CAAC;AAC5F,GAAG;AAEH;;CAEC,GACD,OAAO,MAAME,kCAAkC,CAACC;IAC9C;IAEA,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,15 +0,0 @@
1
- import * as React from 'react';
2
- import { useAttachmentTagItem_unstable } from './useAttachmentTagItem';
3
- import { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';
4
- import { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles.styles';
5
- /**
6
- * @deprecated use new AttachmentOverflowMenuItem component exported from \@fluentui-copilot/react-attachments package instead.
7
- * Deprecated on 4/9/2024.
8
- */
9
- export const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useAttachmentTagItem_unstable(props, ref);
11
- useAttachmentTagItemStyles_unstable(state);
12
- return renderAttachmentTagItem_unstable(state);
13
- });
14
- AttachmentTagItem.displayName = 'AttachmentTagItem';
15
- //# sourceMappingURL=AttachmentTagItem.js.map
@@ -1 +0,0 @@
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.styles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/**\n * @deprecated use new AttachmentOverflowMenuItem component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\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"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,sCAAsC;AAI1F;;;CAGC,GACD,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,4 +0,0 @@
1
- /**
2
- * State used in rendering AttachmentTagItem
3
- */export {};
4
- //# sourceMappingURL=AttachmentTagItem.types.js.map
@@ -1 +0,0 @@
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":[],"rangeMappings":";;","mappings":"AAcA;;CAEC,GACD,WAA4E"}
@@ -1,5 +0,0 @@
1
- export { AttachmentTagItem } from './AttachmentTagItem';
2
- export { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';
3
- export { useAttachmentTagItem_unstable } from './useAttachmentTagItem';
4
- export { attachmentTagItemClassNames, useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles.styles';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { AttachmentTagItem } from './AttachmentTagItem';\nexport type { AttachmentTagItemProps, AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem.types';\nexport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nexport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nexport { attachmentTagItemClassNames, useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles.styles';\n"],"names":["AttachmentTagItem","renderAttachmentTagItem_unstable","useAttachmentTagItem_unstable","attachmentTagItemClassNames","useAttachmentTagItemStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,iBAAiB,QAAQ,sBAAsB;AAExD,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,2BAA2B,EAAEC,mCAAmC,QAAQ,sCAAsC"}
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from '@fluentui/react-components';
3
- /**
4
- * Render the final JSX of AttachmentTagItem
5
- */
6
- export const renderAttachmentTagItem_unstable = state => {
7
- assertSlots(state);
8
- return /*#__PURE__*/_jsxs(state.root, {
9
- children: [state.media && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), /*#__PURE__*/_jsx(state.icon, {})]
10
- });
11
- };
12
- //# sourceMappingURL=renderAttachmentTagItem.js.map
@@ -1 +0,0 @@
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"],"rangeMappings":";;;;;;;;;;;;;","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,21 +0,0 @@
1
- import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';
2
- /**
3
- * Create the state required to render AttachmentTagItem.
4
- *
5
- * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,
6
- * before being passed to renderAttachmentTagItem_unstable.
7
- *
8
- * @param props - props from this instance of AttachmentTagItem
9
- * @param ref - reference to root HTMLElement of AttachmentTagItem
10
- */
11
- export const useAttachmentTagItem_unstable = (props, ref) => {
12
- return useAttachmentTagSlots(props, ref, {
13
- elementType: {
14
- root: 'div',
15
- media: 'span',
16
- content: 'span',
17
- icon: 'span'
18
- }
19
- });
20
- };
21
- //# sourceMappingURL=useAttachmentTagItem.js.map
@@ -1 +0,0 @@
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<HTMLDivElement>,\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;","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,32 +0,0 @@
1
- import { __resetStyles, mergeClasses } from '@fluentui/react-components';
2
- import { tokens } from '@fluentui-copilot/tokens';
3
- import { ATTACHMENTTAG_MAXWIDTH, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from '../AttachmentTag/useAttachmentTagStyles.styles';
4
- export const attachmentTagItemClassNames = {
5
- root: 'fai-AttachmentTagItem',
6
- media: 'fai-AttachmentTagItem__media',
7
- content: 'fai-AttachmentTagItem__content',
8
- icon: 'fai-AttachmentTagItem__icon'
9
- };
10
- /**
11
- * Styles for the root slot
12
- */
13
- const useRootBaseClassName = __resetStyles("rcbi0rb", null, [".rcbi0rb{display:inline-flex;flex-wrap:nowrap;column-gap:var(--spacingHorizontalSNudge);max-width:180px;align-items:center;}"]);
14
- /**
15
- * Apply styling to the AttachmentTagItem slots based on the state
16
- */
17
- export const useAttachmentTagItemStyles_unstable = state => {
18
- 'use no memo';
19
-
20
- const rootBaseClassName = useRootBaseClassName();
21
- const mediaBaseClassName = useMediaBaseClassName();
22
- const contentBaseClassName = useContentBaseClassName();
23
- const iconBaseClassName = useIconBaseClassName();
24
- state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);
25
- if (state.media) {
26
- state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);
27
- }
28
- state.content.className = mergeClasses(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);
29
- state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);
30
- return state;
31
- };
32
- //# sourceMappingURL=useAttachmentTagItemStyles.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useAttachmentTagItemStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport {\n ATTACHMENTTAG_MAXWIDTH,\n useContentBaseClassName,\n useIconBaseClassName,\n useMediaBaseClassName,\n} from '../AttachmentTag/useAttachmentTagStyles.styles';\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 'use no memo';\n\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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,6BAA6B;AAC3E,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SACEC,sBAAsB,EACtBC,uBAAuB,EACvBC,oBAAoB,EACpBC,qBAAqB,QAChB,iDAAiD;AAIxD,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;IAEA,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,19 +0,0 @@
1
- import * as React from 'react';
2
- import { renderAttachmentTagList_unstable } from './renderAttachmentTagList';
3
- import { useAttachmentTagList_unstable } from './useAttachmentTagList';
4
- import { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';
5
- import { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';
6
- import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
7
- /**
8
- * @deprecated use new AttachmentList component exported from \@fluentui-copilot/react-attachments package instead.
9
- * Deprecated on 4/9/2024.
10
- */
11
- export const AttachmentTagList = /*#__PURE__*/React.forwardRef((props, ref) => {
12
- const state = useAttachmentTagList_unstable(props, ref);
13
- const contextValues = useAttachmentTagListContextValues_unstable(state);
14
- useAttachmentTagListStyles_unstable(state);
15
- useCustomStyleHook('useAttachmentTagListStyles')(state);
16
- return renderAttachmentTagList_unstable(state, contextValues);
17
- });
18
- AttachmentTagList.displayName = 'AttachmentTagList';
19
- //# sourceMappingURL=AttachmentTagList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new AttachmentList component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagList_unstable(props, ref);\n const contextValues = useAttachmentTagListContextValues_unstable(state);\n\n useAttachmentTagListStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagListStyles')(state);\n\n return renderAttachmentTagList_unstable(state, contextValues);\n});\n\nAttachmentTagList.displayName = 'AttachmentTagList';\n"],"names":["React","renderAttachmentTagList_unstable","useAttachmentTagList_unstable","useAttachmentTagListContextValues_unstable","useAttachmentTagListStyles_unstable","useCustomStyleHook","AttachmentTagList","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0CAA0C,QAAQ,sCAAsC;AACjG,SAASC,mCAAmC,QAAQ,sCAAsC;AAG1F,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE;;;CAGC,GACD,OAAO,MAAMC,kCAAiEN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQR,8BAA8BM,OAAOC;IACnD,MAAME,gBAAgBR,2CAA2CO;IAEjEN,oCAAoCM;IACpCL,mBAAmB,8BAA8BK;IAEjD,OAAOT,iCAAiCS,OAAOC;AACjD,GAAG;AAEHL,kBAAkBM,WAAW,GAAG"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=AttachmentTagList.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["AttachmentTagList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentTagListContextValue } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps } from '../AttachmentTag/AttachmentTag.types';\n\nexport type AttachmentTagListSlots = {\n root: Slot<'div'>;\n};\n\nexport type AttachmentTagDismissedData = {\n content?: AttachmentTagProps['children'];\n media?: AttachmentTagProps['media'];\n};\n\n/**\n * AttachmentTagList Props\n */\nexport type AttachmentTagListProps = ComponentProps<AttachmentTagListSlots> & {\n onAttachmentTagDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>,\n data: AttachmentTagDismissedData,\n ) => void;\n};\n\n/**\n * State used in rendering AttachmentTagList\n */\nexport type AttachmentTagListState = ComponentState<AttachmentTagListSlots> &\n Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;\n\nexport type AttachmentTagListContextValues = {\n tagList: AttachmentTagListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AA6BA,WAEE"}
@@ -1,5 +0,0 @@
1
- export { AttachmentTagList } from './AttachmentTagList';
2
- export { renderAttachmentTagList_unstable } from './renderAttachmentTagList';
3
- export { useAttachmentTagList_unstable } from './useAttachmentTagList';
4
- export { attachmentTagListClassNames, useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { AttachmentTagList } from './AttachmentTagList';\nexport type { AttachmentTagDismissedData, AttachmentTagListContextValues, AttachmentTagListProps, AttachmentTagListSlots, AttachmentTagListState } from './AttachmentTagList.types';\nexport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nexport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nexport { attachmentTagListClassNames, useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';\n"],"names":["AttachmentTagList","renderAttachmentTagList_unstable","useAttachmentTagList_unstable","attachmentTagListClassNames","useAttachmentTagListStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,iBAAiB,QAAQ,sBAAsB;AAExD,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,2BAA2B,EAAEC,mCAAmC,QAAQ,sCAAsC"}
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from '@fluentui/react-components';
3
- import { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';
4
- /**
5
- * Render the final JSX of AttachmentTagList
6
- */
7
- export const renderAttachmentTagList_unstable = (state, contextValues) => {
8
- assertSlots(state);
9
- return /*#__PURE__*/_jsx(AttachmentTagListProvider, {
10
- value: contextValues.tagList,
11
- children: /*#__PURE__*/_jsx(state.root, {})
12
- });
13
- };
14
- //# sourceMappingURL=renderAttachmentTagList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["renderAttachmentTagList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';\nimport type {\n AttachmentTagListContextValues,\n AttachmentTagListState,\n AttachmentTagListSlots,\n} from './AttachmentTagList.types';\n\n/**\n * Render the final JSX of AttachmentTagList\n */\nexport const renderAttachmentTagList_unstable = (\n state: AttachmentTagListState,\n contextValues: AttachmentTagListContextValues,\n) => {\n assertSlots<AttachmentTagListSlots>(state);\n\n return (\n <AttachmentTagListProvider value={contextValues.tagList}>\n <state.root />\n </AttachmentTagListProvider>\n );\n};\n"],"names":["assertSlots","AttachmentTagListProvider","renderAttachmentTagList_unstable","state","contextValues","value","tagList","root"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAEzD,SAASC,yBAAyB,QAAQ,0CAA0C;AAOpF;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAC9CC,OACAC;IAEAJ,YAAoCG;IAEpC,qBACE,KAACF;QAA0BI,OAAOD,cAAcE,OAAO;kBACrD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
@@ -1,35 +0,0 @@
1
- import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';
2
- /**
3
- * Create the state required to render AttachmentTagList.
4
- *
5
- * The returned state can be modified with hooks such as useAttachmentTagListStyles_unstable,
6
- * before being passed to renderAttachmentTagList_unstable.
7
- *
8
- * @param props - props from this instance of AttachmentTagList
9
- * @param ref - reference to root HTMLElement of AttachmentTagList
10
- */
11
- export const useAttachmentTagList_unstable = (props, ref) => {
12
- const {
13
- onAttachmentTagDismiss
14
- } = props;
15
- const focusAttributes = useArrowNavigationGroup({
16
- axis: 'both',
17
- circular: true
18
- });
19
- return {
20
- onAttachmentTagDismiss,
21
- components: {
22
- root: 'div'
23
- },
24
- root: slot.always(getIntrinsicElementProps('div', {
25
- 'aria-label': 'Attachments',
26
- ref,
27
- role: 'menu',
28
- ...focusAttributes,
29
- ...props
30
- }), {
31
- elementType: 'div'
32
- })
33
- };
34
- };
35
- //# sourceMappingURL=useAttachmentTagList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useAttachmentTagList.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { AttachmentTagListProps, AttachmentTagListState } from './AttachmentTagList.types';\n\n/**\n * Create the state required to render AttachmentTagList.\n *\n * The returned state can be modified with hooks such as useAttachmentTagListStyles_unstable,\n * before being passed to renderAttachmentTagList_unstable.\n *\n * @param props - props from this instance of AttachmentTagList\n * @param ref - reference to root HTMLElement of AttachmentTagList\n */\nexport const useAttachmentTagList_unstable = (\n props: AttachmentTagListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagListState => {\n const { onAttachmentTagDismiss } = props;\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n });\n\n return {\n onAttachmentTagDismiss,\n\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref,\n role: 'menu',\n ...focusAttributes,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useArrowNavigationGroup","useAttachmentTagList_unstable","props","ref","onAttachmentTagDismiss","focusAttributes","axis","circular","components","root","always","role","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,wBAAwB,EAAEC,IAAI,EAAEC,uBAAuB,QAAQ,6BAA6B;AAGrG;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,sBAAsB,EAAE,GAAGF;IAEnC,MAAMG,kBAAkBL,wBAAwB;QAC9CM,MAAM;QACNC,UAAU;IACZ;IAEA,OAAO;QACLH;QAEAI,YAAY;YACVC,MAAM;QACR;QACAA,MAAMV,KAAKW,MAAM,CACfZ,yBAAyB,OAAO;YAC9B,cAAc;YACdK;YACAQ,MAAM;YACN,GAAGN,eAAe;YAClB,GAAGH,KAAK;QACV,IACA;YAAEU,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -1,13 +0,0 @@
1
- export function useAttachmentTagListContextValues_unstable(state) {
2
- const {
3
- onAttachmentTagDismiss
4
- } = state;
5
- // This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
6
- const tagList = {
7
- onAttachmentTagDismiss
8
- };
9
- return {
10
- tagList
11
- };
12
- }
13
- //# sourceMappingURL=useAttachmentTagListContextValues.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useAttachmentTagListContextValues.ts"],"sourcesContent":["import type { AttachmentTagListContextValues, AttachmentTagListState } from './AttachmentTagList.types';\n\nexport function useAttachmentTagListContextValues_unstable(\n state: AttachmentTagListState,\n): AttachmentTagListContextValues {\n const { onAttachmentTagDismiss } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const tagList = {\n onAttachmentTagDismiss,\n };\n\n return { tagList };\n}\n"],"names":["useAttachmentTagListContextValues_unstable","state","onAttachmentTagDismiss","tagList"],"rangeMappings":";;;;;;;;;","mappings":"AAEA,OAAO,SAASA,2CACdC,KAA6B;IAE7B,MAAM,EAAEC,sBAAsB,EAAE,GAAGD;IAEnC,mGAAmG;IACnG,MAAME,UAAU;QACdD;IACF;IAEA,OAAO;QAAEC;IAAQ;AACnB"}
@@ -1,17 +0,0 @@
1
- import { __resetStyles, mergeClasses } from '@fluentui/react-components';
2
- import { tokens } from '@fluentui-copilot/tokens';
3
- export const attachmentTagListClassNames = {
4
- root: 'fai-AttachmentTagList'
5
- };
6
- const useRootBaseClassName = __resetStyles("r168fwfa", null, [".r168fwfa{column-gap:var(--spacingHorizontalSNudge);display:flex;flex-direction:row;flex-shrink:0;flex-wrap:wrap;row-gap:var(--spacingVerticalXS);}"]);
7
- /**
8
- * Apply styling to the AttachmentTagList slots based on the state
9
- */
10
- export const useAttachmentTagListStyles_unstable = state => {
11
- 'use no memo';
12
-
13
- const rootBaseClassName = useRootBaseClassName();
14
- state.root.className = mergeClasses(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);
15
- return state;
16
- };
17
- //# sourceMappingURL=useAttachmentTagListStyles.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useAttachmentTagListStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { AttachmentTagListSlots, AttachmentTagListState } from './AttachmentTagList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagListClassNames: SlotClassNames<AttachmentTagListSlots> = {\n root: 'fai-AttachmentTagList',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n columnGap: tokens.spacingHorizontalSNudge,\n display: 'flex',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n rowGap: tokens.spacingVerticalXS,\n});\n\n/**\n * Apply styling to the AttachmentTagList slots based on the state\n */\nexport const useAttachmentTagListStyles_unstable = (state: AttachmentTagListState): AttachmentTagListState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","attachmentTagListClassNames","root","useRootBaseClassName","columnGap","spacingHorizontalSNudge","display","flexDirection","flexShrink","flexWrap","rowGap","spacingVerticalXS","useAttachmentTagListStyles_unstable","state","rootBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,6BAA6B;AAC3E,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,8BAAsE;IACjFC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBL,gBAAgB;IAC3CM,WAAWJ,OAAOK,uBAAuB;IACzCC,SAAS;IACTC,eAAe;IACfC,YAAY;IACZC,UAAU;IACVC,QAAQV,OAAOW,iBAAiB;AAClC;AAEA;;CAEC,GACD,OAAO,MAAMC,sCAAsC,CAACC;IAClD;IAEA,MAAMC,oBAAoBX;IAC1BU,MAAMX,IAAI,CAACa,SAAS,GAAGhB,aAAaE,4BAA4BC,IAAI,EAAEY,mBAAmBD,MAAMX,IAAI,CAACa,SAAS;IAE7G,OAAOF;AACT,EAAE"}
@@ -1,62 +0,0 @@
1
- import * as React from 'react';
2
- import { getIntrinsicElementProps, 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(getIntrinsicElementProps(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
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useAttachmentTagSlots.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { getIntrinsicElementProps, 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<HTMLButtonElement | HTMLDivElement>,\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 getIntrinsicElementProps(elementType.root as 'button' | 'div', {\n ref,\n ...props,\n role: rootRole,\n }),\n { elementType: elementType.root as 'button' | 'div' },\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","getIntrinsicElementProps","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"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AAC5F,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,GAAkD,EAClDC,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,yBAAyBiB,YAAYK,IAAI,EAAsB;QAC7DX;QACA,GAAGD,KAAK;QACRM,MAAMI;IACR,IACA;QAAEH,aAAaA,YAAYK,IAAI;IAAqB;IAEtDA,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"}
@@ -1,8 +0,0 @@
1
- import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
- export const AttachmentTagListContext = createContext(undefined);
3
- const tagListContextDefaultValue = {
4
- onAttachmentTagDismiss: () => null
5
- };
6
- export const AttachmentTagListProvider = AttachmentTagListContext.Provider;
7
- export const useAttachmentTagListContext_unstable = selector => useContextSelector(AttachmentTagListContext, (ctx = tagListContextDefaultValue) => selector(ctx));
8
- //# sourceMappingURL=attachmentTagListContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["attachmentTagListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentTagListProps } from '../components/index';\n\nexport const AttachmentTagListContext: Context<AttachmentTagListContextValue> = createContext<\n AttachmentTagListContextValue | undefined\n>(undefined) as Context<AttachmentTagListContextValue>;\n\nconst tagListContextDefaultValue: AttachmentTagListContextValue = {\n onAttachmentTagDismiss: () => null,\n};\n\n/**\n * Context shared between AttachmentTagList and its children components\n */\nexport type AttachmentTagListContextValue = Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;\n\nexport const AttachmentTagListProvider = AttachmentTagListContext.Provider;\n\nexport const useAttachmentTagListContext_unstable = <T>(selector: ContextSelector<AttachmentTagListContextValue, T>) =>\n useContextSelector(AttachmentTagListContext, (ctx = tagListContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","AttachmentTagListContext","undefined","tagListContextDefaultValue","onAttachmentTagDismiss","AttachmentTagListProvider","Provider","useAttachmentTagListContext_unstable","selector","ctx"],"rangeMappings":";;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,2BAAmEF,cAE9EG,WAAqD;AAEvD,MAAMC,6BAA4D;IAChEC,wBAAwB,IAAM;AAChC;AAOA,OAAO,MAAMC,4BAA4BJ,yBAAyBK,QAAQ,CAAC;AAE3E,OAAO,MAAMC,uCAAuC,CAAIC,WACtDR,mBAAmBC,0BAA0B,CAACQ,MAAMN,0BAA0B,GAAKK,SAASC,MAAM"}