@fluentui-copilot/react-attachments 0.0.0-nightly-20240313-0404-8abc883d.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 (106) hide show
  1. package/CHANGELOG.json +662 -0
  2. package/CHANGELOG.md +213 -0
  3. package/LICENSE +23 -0
  4. package/README.md +5 -0
  5. package/dist/index.d.ts +107 -0
  6. package/lib/AttachmentTag.js +2 -0
  7. package/lib/AttachmentTag.js.map +1 -0
  8. package/lib/AttachmentTagItem.js +2 -0
  9. package/lib/AttachmentTagItem.js.map +1 -0
  10. package/lib/AttachmentTagList.js +2 -0
  11. package/lib/AttachmentTagList.js.map +1 -0
  12. package/lib/components/AttachmentTag/AttachmentTag.js +14 -0
  13. package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -0
  14. package/lib/components/AttachmentTag/AttachmentTag.types.js +2 -0
  15. package/lib/components/AttachmentTag/AttachmentTag.types.js.map +1 -0
  16. package/lib/components/AttachmentTag/index.js +6 -0
  17. package/lib/components/AttachmentTag/index.js.map +1 -0
  18. package/lib/components/AttachmentTag/renderAttachmentTag.js +12 -0
  19. package/lib/components/AttachmentTag/renderAttachmentTag.js.map +1 -0
  20. package/lib/components/AttachmentTag/useAttachmentTag.js +64 -0
  21. package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -0
  22. package/lib/components/AttachmentTag/useAttachmentTagStyles.js +30 -0
  23. package/lib/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -0
  24. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +12 -0
  25. package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -0
  26. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +3 -0
  27. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -0
  28. package/lib/components/AttachmentTagItem/index.js +6 -0
  29. package/lib/components/AttachmentTagItem/index.js.map +1 -0
  30. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +11 -0
  31. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -0
  32. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +29 -0
  33. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -0
  34. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js +21 -0
  35. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -0
  36. package/lib/components/AttachmentTagList/AttachmentTagList.js +16 -0
  37. package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -0
  38. package/lib/components/AttachmentTagList/AttachmentTagList.types.js +2 -0
  39. package/lib/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -0
  40. package/lib/components/AttachmentTagList/index.js +6 -0
  41. package/lib/components/AttachmentTagList/index.js.map +1 -0
  42. package/lib/components/AttachmentTagList/renderAttachmentTagList.js +14 -0
  43. package/lib/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -0
  44. package/lib/components/AttachmentTagList/useAttachmentTagList.js +35 -0
  45. package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +1 -0
  46. package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js +13 -0
  47. package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -0
  48. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js +14 -0
  49. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -0
  50. package/lib/components/index.js +3 -0
  51. package/lib/components/index.js.map +1 -0
  52. package/lib/contexts/attachmentTagListContext.js +8 -0
  53. package/lib/contexts/attachmentTagListContext.js.map +1 -0
  54. package/lib/index.js +3 -0
  55. package/lib/index.js.map +1 -0
  56. package/lib-commonjs/AttachmentTag.js +7 -0
  57. package/lib-commonjs/AttachmentTag.js.map +1 -0
  58. package/lib-commonjs/AttachmentTagItem.js +7 -0
  59. package/lib-commonjs/AttachmentTagItem.js.map +1 -0
  60. package/lib-commonjs/AttachmentTagList.js +7 -0
  61. package/lib-commonjs/AttachmentTagList.js.map +1 -0
  62. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +23 -0
  63. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -0
  64. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +5 -0
  65. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js.map +1 -0
  66. package/lib-commonjs/components/AttachmentTag/index.js +11 -0
  67. package/lib-commonjs/components/AttachmentTag/index.js.map +1 -0
  68. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js +22 -0
  69. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -0
  70. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js +61 -0
  71. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -0
  72. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js +65 -0
  73. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -0
  74. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +21 -0
  75. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -0
  76. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +7 -0
  77. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -0
  78. package/lib-commonjs/components/AttachmentTagItem/index.js +11 -0
  79. package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -0
  80. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js +17 -0
  81. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -0
  82. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js +28 -0
  83. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -0
  84. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js +34 -0
  85. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -0
  86. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +25 -0
  87. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -0
  88. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js +5 -0
  89. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -0
  90. package/lib-commonjs/components/AttachmentTagList/index.js +11 -0
  91. package/lib-commonjs/components/AttachmentTagList/index.js.map +1 -0
  92. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js +20 -0
  93. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -0
  94. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +33 -0
  95. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -0
  96. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js +20 -0
  97. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -0
  98. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js +30 -0
  99. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -0
  100. package/lib-commonjs/components/index.js +8 -0
  101. package/lib-commonjs/components/index.js.map +1 -0
  102. package/lib-commonjs/contexts/attachmentTagListContext.js +28 -0
  103. package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -0
  104. package/lib-commonjs/index.js +45 -0
  105. package/lib-commonjs/index.js.map +1 -0
  106. package/package.json +40 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,213 @@
1
+ # Change Log - @fluentui-copilot/react-attachments
2
+
3
+ This log was last generated on Wed, 13 Mar 2024 04:09:45 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly-20240313-0404-8abc883d.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.0.0-nightly-20240313-0404-8abc883d.1)
8
+
9
+ Wed, 13 Mar 2024 04:09:45 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.7.1..@fluentui-copilot/react-attachments_v0.0.0-nightly-20240313-0404-8abc883d.1)
11
+
12
+ ### Changes
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-20240313-0404-8abc883d.1 ([commit](https://github.com/microsoft/fluentai/commit/6953fd36fa1f984fe4271557d1ab88e559056e47) by beachball)
16
+
17
+ ## [0.7.1](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.7.1)
18
+
19
+ Fri, 01 Mar 2024 20:07:29 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.7.0..@fluentai/attachments_v0.7.1)
21
+
22
+ ### Patches
23
+
24
+ - fix: hook up AttachmentTag ref correctly. ([PR #1383](https://github.com/microsoft/fluentai/pull/1383) by tristan.watanabe@gmail.com)
25
+
26
+ ## [0.7.0](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.7.0)
27
+
28
+ Thu, 15 Feb 2024 20:24:48 GMT
29
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.6.4..@fluentai/attachments_v0.7.0)
30
+
31
+ ### Minor changes
32
+
33
+ - chore: initial release to NPM. ([PR #1358](https://github.com/microsoft/fluentai/pull/1358) by tristan.watanabe@gmail.com)
34
+
35
+ ## [0.6.3](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.6.3)
36
+
37
+ Thu, 18 Jan 2024 00:29:43 GMT
38
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.6.2..@fluentai/attachments_v0.6.3)
39
+
40
+ ### Patches
41
+
42
+ - chore: remove unneeded peer dependencies. ([PR #1314](https://github.com/microsoft/fluentai/pull/1314) by tristan.watanabe@gmail.com)
43
+
44
+ ## [0.6.2](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.6.2)
45
+
46
+ Tue, 09 Jan 2024 21:07:23 GMT
47
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.6.0..@fluentai/attachments_v0.6.2)
48
+
49
+ ### Patches
50
+
51
+ - fix: Attachment icon uses correct hover token, improving HC theme ([PR #1277](https://github.com/microsoft/fluentai/pull/1277) by etwinter@microsoft.com)
52
+
53
+ ## [0.6.0](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.6.0)
54
+
55
+ Tue, 12 Dec 2023 16:35:16 GMT
56
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.5.0..@fluentai/attachments_v0.6.0)
57
+
58
+ ### Minor changes
59
+
60
+ - chore: Removing deprecated components in @fluentai/attachments. ([PR #1172](https://github.com/microsoft/fluentai/pull/1172) by Humberto.Morimoto@microsoft.com)
61
+
62
+ ## [0.5.0](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.5.0)
63
+
64
+ Wed, 15 Nov 2023 00:55:21 GMT
65
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.4.1..@fluentai/attachments_v0.5.0)
66
+
67
+ ### Minor changes
68
+
69
+ - chore: move @fluentui dependencies to peer dependencies. ([PR #979](https://github.com/microsoft/fluentai/pull/979) by tristan.watanabe@gmail.com)
70
+ - Bump @fluentai/provider to v0.6.0 ([PR #1169](https://github.com/microsoft/fluentai/pull/1169) by beachball)
71
+
72
+ ### Patches
73
+
74
+ - chore: Migrate to new slots API. ([PR #956](https://github.com/microsoft/fluentai/pull/956) by owcampbe@microsoft.com)
75
+ - chore: bump peer deep range to latest @fluentui/react-components 9.37.3. ([PR #1125](https://github.com/microsoft/fluentai/pull/1125) by tristan.watanabe@gmail.com)
76
+ - fix: align peer dependency ranges with all other react copilot components. ([PR #976](https://github.com/microsoft/fluentai/pull/976) by tristan.watanabe@gmail.com)
77
+ - chore: deprecate AttachmentMenu,AttachmentMenuList,AttachmentMenuTrigger,AttachmentMenuPopover & AttachmentMenuItem. ([PR #1015](https://github.com/microsoft/fluentai/pull/1015) by tristan.watanabe@gmail.com)
78
+
79
+ ## [0.4.1](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.4.1)
80
+
81
+ Mon, 25 Sep 2023 20:31:08 GMT
82
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.4.0..@fluentai/attachments_v0.4.1)
83
+
84
+ ### Patches
85
+
86
+ - fix: bump swc core to mitigate transpilation memory leaks. ([PR #972](https://github.com/microsoft/fluentai/pull/972) by tristan.watanabe@gmail.com)
87
+ - Bump @fluentai/provider to v0.5.1 ([commit](https://github.com/microsoft/fluentai/commit/f633e55414cd3ed596793f7e8916d87a242d8c0d) by beachball)
88
+
89
+ ## [0.4.0](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.4.0)
90
+
91
+ Fri, 22 Sep 2023 02:11:56 GMT
92
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.3.0..@fluentai/attachments_v0.4.0)
93
+
94
+ ### Minor changes
95
+
96
+ - Bump @fluentai/provider to v0.5.0 ([PR #961](https://github.com/microsoft/fluentai/pull/961) by beachball)
97
+
98
+ ### Patches
99
+
100
+ - chore: bump fluentui v9 dependencies to latest. ([PR #928](https://github.com/microsoft/fluentai/pull/928) by tristan.watanabe@gmail.com)
101
+
102
+ ## [0.3.0](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.3.0)
103
+
104
+ Fri, 08 Sep 2023 18:32:55 GMT
105
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.2.1..@fluentai/attachments_v0.3.0)
106
+
107
+ ### Minor changes
108
+
109
+ - [breaking]: removed default Tooltip that showed even if text was not truncated ([PR #899](https://github.com/microsoft/fluentai/pull/899) by mgodbolt@microsoft.com)
110
+
111
+ ### Patches
112
+
113
+ - test: add playwright e2e testing setup and WCAG testing. ([PR #874](https://github.com/microsoft/fluentai/pull/874) by tristan.watanabe@gmail.com)
114
+
115
+ ## [0.2.1](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.2.1)
116
+
117
+ Tue, 22 Aug 2023 23:54:15 GMT
118
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.2.0..@fluentai/attachments_v0.2.1)
119
+
120
+ ### Patches
121
+
122
+ - chore: bump fluentui dependencies. ([PR #836](https://github.com/microsoft/fluentai/pull/836) by tristan.watanabe@gmail.com)
123
+ - add useCustomStyleHook to all components ([PR #843](https://github.com/microsoft/fluentai/pull/843) by eysjiang@gmail.com)
124
+ - chore: Use menu util exported from fluentui and remove duplicated local one. ([PR #857](https://github.com/microsoft/fluentai/pull/857) by Humberto.Morimoto@microsoft.com)
125
+ - Bump @fluentai/provider to v0.4.0 ([PR #878](https://github.com/microsoft/fluentai/pull/878) by beachball)
126
+
127
+ ## [0.2.0](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.2.0)
128
+
129
+ Mon, 24 Jul 2023 22:38:51 GMT
130
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.1.7..@fluentai/attachments_v0.2.0)
131
+
132
+ ### Minor changes
133
+
134
+ - Bump @fluentai/provider to v0.3.0 ([PR #778](https://github.com/microsoft/fluentai/pull/778) by beachball)
135
+
136
+ ### Patches
137
+
138
+ - Added explicit button color to ensure dark mode compatibility ([PR #678](https://github.com/microsoft/fluentai/pull/678) by mgodbolt@microsoft.com)
139
+ - chore: bump react-components to latest ([PR #741](https://github.com/microsoft/fluentai/pull/741) by mgodbolt@microsoft.com)
140
+
141
+ ## [0.1.7](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.1.7)
142
+
143
+ Wed, 28 Jun 2023 21:11:32 GMT
144
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.1.6..@fluentai/attachments_v0.1.7)
145
+
146
+ ### Patches
147
+
148
+ - fix: only use griffel preset during babel transpilation in build step. ([PR #662](https://github.com/microsoft/fluentai/pull/662) by tristan.watanabe@gmail.com)
149
+ - Bump @fluentai/provider to v0.2.2 ([PR #662](https://github.com/microsoft/fluentai/pull/662) by beachball)
150
+
151
+ ## [0.1.6](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.1.6)
152
+
153
+ Mon, 26 Jun 2023 18:30:47 GMT
154
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.1.5..@fluentai/attachments_v0.1.6)
155
+
156
+ ### Patches
157
+
158
+ - chore: add LICENSE file to package. ([PR #606](https://github.com/microsoft/fluentai/pull/606) by tristan.watanabe@gmail.com)
159
+ - chore: update babel configuration to support Griffel build time optimizations. ([PR #618](https://github.com/microsoft/fluentai/pull/618) by seanmonahan@microsoft.com)
160
+ - Bump @fluentai/provider to v0.2.1 ([PR #618](https://github.com/microsoft/fluentai/pull/618) by beachball)
161
+
162
+ ## [0.1.5](https://github.com/microsoft/fluentai/tree/@fluentai/attachments_v0.1.5)
163
+
164
+ Mon, 12 Jun 2023 20:28:32 GMT
165
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/attachments_v0.1.4..@fluentai/attachments_v0.1.5)
166
+
167
+ ### Patches
168
+
169
+ - chore: Moving AttachmentTag and AttachmentTagList out of 'in development'. ([PR #465](https://github.com/microsoft/fluentai/pull/465) by Humberto.Morimoto@microsoft.com)
170
+ - fix: add provider dependency ([PR #532](https://github.com/microsoft/fluentai/pull/532) by mgodbolt@microsoft.com)
171
+ - feat: Adding initial AttachmentMenu, AttachmentMenuPopover and AttachmentMenuTrigger components. ([PR #392](https://github.com/microsoft/fluentai/pull/392) by makotom@microsoft.com)
172
+ - add package dependencies ([PR #575](https://github.com/microsoft/fluentai/pull/575) by mgodbolt@microsoft.com)
173
+ - feat: Building end-to-end example and adding callbacks for adding and removing attachments. ([PR #496](https://github.com/microsoft/fluentai/pull/496) by Humberto.Morimoto@microsoft.com)
174
+ - chore: bump @fluentui/react-components and shared-contexts dependency to latest. ([PR #523](https://github.com/microsoft/fluentai/pull/523) by tristan.watanabe@gmail.com)
175
+ - fix: Fixing some a11y issues in the AttachmentMenu pattern. ([PR #574](https://github.com/microsoft/fluentai/pull/574) by makotom@microsoft.com)
176
+ - chore: bump @fluentui/react-icons to 2.0.201. ([PR #514](https://github.com/microsoft/fluentai/pull/514) by tristan.watanabe@gmail.com)
177
+ - fix: add missing fluentui dependencies to package.json. ([PR #509](https://github.com/microsoft/fluentai/pull/509) by tristan.watanabe@gmail.com)
178
+ - fix: add missing dependencies. ([PR #576](https://github.com/microsoft/fluentai/pull/576) by tristan.watanabe@gmail.com)
179
+ - Bump @fluentai/provider to v0.2.0 ([PR #573](https://github.com/microsoft/fluentai/pull/573) by beachball)
180
+
181
+ ## 0.1.4
182
+
183
+ Mon, 22 May 2023 18:06:18 GMT
184
+
185
+ ### Patches
186
+
187
+ - feat: Adding initial AttachmentMenuItem and AttachmentMenuList components. (Humberto.Morimoto@microsoft.com)
188
+ - fix: Make AttachmentTag and AttachmentTagList more accessible. (makotom@microsoft.com)
189
+
190
+ ## 0.1.3
191
+
192
+ Mon, 08 May 2023 15:45:26 GMT
193
+
194
+ ### Patches
195
+
196
+ - fix: publish missing lib and lib-commonjs folders. (tristan.watanabe@gmail.com)
197
+
198
+ ## 0.1.2
199
+
200
+ Mon, 08 May 2023 14:06:39 GMT
201
+
202
+ ### Patches
203
+
204
+ - chore: remove star exports and explicitly define package exports. (tristan.watanabe@gmail.com)
205
+ - chore: Scaffolding components needed for attach menu pattern. (Humberto.Morimoto@microsoft.com)
206
+
207
+ ## 0.1.1
208
+
209
+ Wed, 03 May 2023 22:41:34 GMT
210
+
211
+ ### Patches
212
+
213
+ - chore: Making @fluentai/attachments public. (Humberto.Morimoto@microsoft.com)
package/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ @fluentui-copilot/react-attachments
2
+
3
+ MIT License
4
+
5
+ Copyright (c) Microsoft Corporation.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @fluentui-copilot/react-attachments
2
+
3
+ **For internal use only. External use is not supported at this time.**
4
+
5
+ **Attachments components for [Fluent AI React](https://ai.fluentui.dev/)**
@@ -0,0 +1,107 @@
1
+ /// <reference types="react" />
2
+
3
+ import type { ComponentProps } from '@fluentui/react-components';
4
+ import type { ComponentState } from '@fluentui/react-components';
5
+ import type { ForwardRefComponent } from '@fluentui/react-components';
6
+ import * as React_2 from 'react';
7
+ import type { Slot } from '@fluentui/react-components';
8
+ import type { SlotClassNames } from '@fluentui/react-components';
9
+
10
+ export declare const AttachmentTag: ForwardRefComponent<AttachmentTagProps>;
11
+
12
+ export declare const attachmentTagClassNames: SlotClassNames<AttachmentTagSlots>;
13
+
14
+ export declare type AttachmentTagDismissedData = {
15
+ content?: AttachmentTagProps['children'];
16
+ media?: AttachmentTagProps['media'];
17
+ };
18
+
19
+ export declare const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps>;
20
+
21
+ export declare const attachmentTagListClassNames: SlotClassNames<AttachmentTagListSlots>;
22
+
23
+ /**
24
+ * Context shared between AttachmentTagList and its children components
25
+ */
26
+ declare type AttachmentTagListContextValue = Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;
27
+
28
+ declare type AttachmentTagListContextValues = {
29
+ tagList: AttachmentTagListContextValue;
30
+ };
31
+
32
+ /**
33
+ * AttachmentTagList Props
34
+ */
35
+ export declare type AttachmentTagListProps = ComponentProps<AttachmentTagListSlots> & {
36
+ onAttachmentTagDismiss?: (e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, data: AttachmentTagDismissedData) => void;
37
+ };
38
+
39
+ export declare type AttachmentTagListSlots = {
40
+ root: Slot<'div'>;
41
+ };
42
+
43
+ /**
44
+ * State used in rendering AttachmentTagList
45
+ */
46
+ export declare type AttachmentTagListState = ComponentState<AttachmentTagListSlots> & Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;
47
+
48
+ /**
49
+ * AttachmentTag Props
50
+ */
51
+ export declare type AttachmentTagProps = ComponentProps<Partial<AttachmentTagSlots>>;
52
+
53
+ export declare type AttachmentTagSlots = {
54
+ root: NonNullable<Slot<'button'>>;
55
+ media?: Slot<'span'>;
56
+ content: NonNullable<Slot<'span'>>;
57
+ icon: NonNullable<Slot<'span'>>;
58
+ };
59
+
60
+ /**
61
+ * State used in rendering AttachmentTag
62
+ */
63
+ export declare type AttachmentTagState = ComponentState<AttachmentTagSlots>;
64
+
65
+ /**
66
+ * Render the final JSX of AttachmentTag
67
+ */
68
+ export declare const renderAttachmentTag_unstable: (state: AttachmentTagState) => JSX.Element;
69
+
70
+ /**
71
+ * Render the final JSX of AttachmentTagList
72
+ */
73
+ export declare const renderAttachmentTagList_unstable: (state: AttachmentTagListState, contextValues: AttachmentTagListContextValues) => JSX.Element;
74
+
75
+ /**
76
+ * Create the state required to render AttachmentTag.
77
+ *
78
+ * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,
79
+ * before being passed to renderAttachmentTag_unstable.
80
+ *
81
+ * @param props - props from this instance of AttachmentTag
82
+ * @param ref - reference to root HTMLElement of AttachmentTag
83
+ */
84
+ export declare const useAttachmentTag_unstable: (props: AttachmentTagProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagState;
85
+
86
+ /**
87
+ * Create the state required to render AttachmentTagList.
88
+ *
89
+ * The returned state can be modified with hooks such as useAttachmentTagListStyles_unstable,
90
+ * before being passed to renderAttachmentTagList_unstable.
91
+ *
92
+ * @param props - props from this instance of AttachmentTagList
93
+ * @param ref - reference to root HTMLElement of AttachmentTagList
94
+ */
95
+ export declare const useAttachmentTagList_unstable: (props: AttachmentTagListProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagListState;
96
+
97
+ /**
98
+ * Apply styling to the AttachmentTagList slots based on the state
99
+ */
100
+ export declare const useAttachmentTagListStyles_unstable: (state: AttachmentTagListState) => AttachmentTagListState;
101
+
102
+ /**
103
+ * Apply styling to the AttachmentTag slots based on the state
104
+ */
105
+ export declare const useAttachmentTagStyles_unstable: (state: AttachmentTagState) => AttachmentTagState;
106
+
107
+ export { }
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentTag/index';
2
+ //# sourceMappingURL=AttachmentTag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentTag.ts"],"sourcesContent":["export * from './components/AttachmentTag/index';\n"],"names":[],"mappings":"AAAA,cAAc,mCAAmC"}
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentTagItem/index';
2
+ //# sourceMappingURL=AttachmentTagItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentTagItem.ts"],"sourcesContent":["export * from './components/AttachmentTagItem/index';\n"],"names":[],"mappings":"AAAA,cAAc,uCAAuC"}
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentTagList/index';
2
+ //# sourceMappingURL=AttachmentTagList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentTagList.ts"],"sourcesContent":["export * from './components/AttachmentTagList/index';\n"],"names":[],"mappings":"AAAA,cAAc,uCAAuC"}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { useAttachmentTag_unstable } from './useAttachmentTag';
3
+ import { renderAttachmentTag_unstable } from './renderAttachmentTag';
4
+ import { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';
5
+ import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
+ // AttachmentTag component - TODO: add more docs
7
+ export const AttachmentTag = /*#__PURE__*/React.forwardRef((props, ref) => {
8
+ const state = useAttachmentTag_unstable(props, ref);
9
+ useAttachmentTagStyles_unstable(state);
10
+ useCustomStyleHook('useAttachmentTagStyles')(state);
11
+ return renderAttachmentTag_unstable(state);
12
+ });
13
+ AttachmentTag.displayName = 'AttachmentTag';
14
+ //# sourceMappingURL=AttachmentTag.js.map
@@ -0,0 +1 @@
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';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// AttachmentTag component - TODO: add more docs\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"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAG3E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,gDAAgD;AAChD,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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentTag.types.js.map
@@ -0,0 +1 @@
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":[],"mappings":"AAAA,WAoBoE"}
@@ -0,0 +1,6 @@
1
+ export * from './AttachmentTag';
2
+ export * from './AttachmentTag.types';
3
+ export * from './renderAttachmentTag';
4
+ export * from './useAttachmentTag';
5
+ export * from './useAttachmentTagStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTag.types';\nexport * from './renderAttachmentTag';\nexport * from './useAttachmentTag';\nexport * from './useAttachmentTagStyles';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,2BAA2B"}
@@ -0,0 +1,12 @@
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
@@ -0,0 +1 @@
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"],"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"}
@@ -0,0 +1,64 @@
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
+ * Create the state required to render AttachmentTag.
9
+ *
10
+ * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,
11
+ * before being passed to renderAttachmentTag_unstable.
12
+ *
13
+ * @param props - props from this instance of AttachmentTag
14
+ * @param ref - reference to root HTMLElement of AttachmentTag
15
+ */
16
+ 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: {
53
+ root: 'button',
54
+ media: 'span',
55
+ content: 'span',
56
+ icon: 'span'
57
+ },
58
+ root,
59
+ media,
60
+ content,
61
+ icon
62
+ };
63
+ };
64
+ //# sourceMappingURL=useAttachmentTag.js.map
@@ -0,0 +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"}
@@ -0,0 +1,30 @@
1
+ import { __resetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';
2
+ export const attachmentTagClassNames = {
3
+ root: 'fai-AttachmentTag',
4
+ media: 'fai-AttachmentTag__media',
5
+ content: 'fai-AttachmentTag__content',
6
+ icon: 'fai-AttachmentTag__icon'
7
+ };
8
+ const ATTACHMENTTAG_MAXWIDTH = '180px';
9
+ const ATTACHMENTTAG_SIZE = '20px';
10
+ 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
+ * Apply styling to the AttachmentTag slots based on the state
16
+ */
17
+ export const useAttachmentTagStyles_unstable = state => {
18
+ const rootBaseClassName = useRootBaseClassName();
19
+ const mediaBaseClassName = useMediaBaseClassName();
20
+ const contentBaseClassName = useContentBaseClassName();
21
+ const iconBaseClassName = useIconBaseClassName();
22
+ state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);
23
+ if (state.media) {
24
+ state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);
25
+ }
26
+ state.content.className = mergeClasses(attachmentTagClassNames.content, contentBaseClassName, state.content.className);
27
+ state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);
28
+ return state;
29
+ };
30
+ //# sourceMappingURL=useAttachmentTagStyles.js.map
@@ -0,0 +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":"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"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { useAttachmentTagItem_unstable } from './useAttachmentTagItem';
3
+ import { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';
4
+ import { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';
5
+ // AttachmentTagItem component - TODO: add more docs
6
+ export const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {
7
+ const state = useAttachmentTagItem_unstable(props, ref);
8
+ useAttachmentTagItemStyles_unstable(state);
9
+ return renderAttachmentTagItem_unstable(state);
10
+ });
11
+ AttachmentTagItem.displayName = 'AttachmentTagItem';
12
+ //# sourceMappingURL=AttachmentTagItem.js.map
@@ -0,0 +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"}
@@ -0,0 +1,3 @@
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'>>
3
+ //# sourceMappingURL=AttachmentTagItem.types.js.map
@@ -0,0 +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"}
@@ -0,0 +1,6 @@
1
+ export * from './AttachmentTagItem';
2
+ export * from './AttachmentTagItem.types';
3
+ export * from './renderAttachmentTagItem';
4
+ export * from './useAttachmentTagItem';
5
+ export * from './useAttachmentTagItemStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagItem';\nexport * from './AttachmentTagItem.types';\nexport * from './renderAttachmentTagItem';\nexport * from './useAttachmentTagItem';\nexport * from './useAttachmentTagItemStyles';\n"],"names":[],"mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,yBAAyB;AACvC,cAAc,+BAA+B"}
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } 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
+ // TODO Add additional slots in the appropriate place
9
+ return /*#__PURE__*/_jsx(state.root, {});
10
+ };
11
+ //# sourceMappingURL=renderAttachmentTagItem.js.map
@@ -0,0 +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"}