@fluentui/react-list 0.0.0-nightly-20250107-0406.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 (113) hide show
  1. package/CHANGELOG.md +352 -0
  2. package/LICENSE +15 -0
  3. package/README.md +5 -0
  4. package/dist/index.d.ts +148 -0
  5. package/lib/List.js +1 -0
  6. package/lib/List.js.map +1 -0
  7. package/lib/ListItem.js +1 -0
  8. package/lib/ListItem.js.map +1 -0
  9. package/lib/components/List/List.js +14 -0
  10. package/lib/components/List/List.js.map +1 -0
  11. package/lib/components/List/List.types.js +1 -0
  12. package/lib/components/List/List.types.js.map +1 -0
  13. package/lib/components/List/index.js +4 -0
  14. package/lib/components/List/index.js.map +1 -0
  15. package/lib/components/List/listContext.js +11 -0
  16. package/lib/components/List/listContext.js.map +1 -0
  17. package/lib/components/List/renderList.js +12 -0
  18. package/lib/components/List/renderList.js.map +1 -0
  19. package/lib/components/List/useList.js +75 -0
  20. package/lib/components/List/useList.js.map +1 -0
  21. package/lib/components/List/useListContextValues.js +12 -0
  22. package/lib/components/List/useListContextValues.js.map +1 -0
  23. package/lib/components/List/useListStyles.styles.js +15 -0
  24. package/lib/components/List/useListStyles.styles.js.map +1 -0
  25. package/lib/components/ListItem/ListItem.js +12 -0
  26. package/lib/components/ListItem/ListItem.js.map +1 -0
  27. package/lib/components/ListItem/ListItem.types.js +3 -0
  28. package/lib/components/ListItem/ListItem.types.js.map +1 -0
  29. package/lib/components/ListItem/index.js +4 -0
  30. package/lib/components/ListItem/index.js.map +1 -0
  31. package/lib/components/ListItem/renderListItem.js +13 -0
  32. package/lib/components/ListItem/renderListItem.js.map +1 -0
  33. package/lib/components/ListItem/useListItem.js +185 -0
  34. package/lib/components/ListItem/useListItem.js.map +1 -0
  35. package/lib/components/ListItem/useListItemStyles.styles.js +48 -0
  36. package/lib/components/ListItem/useListItemStyles.styles.js.map +1 -0
  37. package/lib/events/ListItemActionEvent.js +9 -0
  38. package/lib/events/ListItemActionEvent.js.map +1 -0
  39. package/lib/hooks/index.js +1 -0
  40. package/lib/hooks/index.js.map +1 -0
  41. package/lib/hooks/types.js +1 -0
  42. package/lib/hooks/types.js.map +1 -0
  43. package/lib/hooks/useListSelection.js +41 -0
  44. package/lib/hooks/useListSelection.js.map +1 -0
  45. package/lib/index.js +2 -0
  46. package/lib/index.js.map +1 -0
  47. package/lib/utils/calculateListItemRoleForListRole.js +16 -0
  48. package/lib/utils/calculateListItemRoleForListRole.js.map +1 -0
  49. package/lib/utils/calculateListRole.js +14 -0
  50. package/lib/utils/calculateListRole.js.map +1 -0
  51. package/lib/utils/index.js +5 -0
  52. package/lib/utils/index.js.map +1 -0
  53. package/lib/utils/validateGridCellsArePresent.js +16 -0
  54. package/lib/utils/validateGridCellsArePresent.js.map +1 -0
  55. package/lib/utils/validateProperElementTypes.js +12 -0
  56. package/lib/utils/validateProperElementTypes.js.map +1 -0
  57. package/lib/utils/validateProperRolesAreUsed.js +36 -0
  58. package/lib/utils/validateProperRolesAreUsed.js.map +1 -0
  59. package/lib-commonjs/List.js +28 -0
  60. package/lib-commonjs/List.js.map +1 -0
  61. package/lib-commonjs/ListItem.js +28 -0
  62. package/lib-commonjs/ListItem.js.map +1 -0
  63. package/lib-commonjs/components/List/List.js +25 -0
  64. package/lib-commonjs/components/List/List.js.map +1 -0
  65. package/lib-commonjs/components/List/List.types.js +6 -0
  66. package/lib-commonjs/components/List/List.types.js.map +1 -0
  67. package/lib-commonjs/components/List/index.js +31 -0
  68. package/lib-commonjs/components/List/index.js.map +1 -0
  69. package/lib-commonjs/components/List/listContext.js +32 -0
  70. package/lib-commonjs/components/List/listContext.js.map +1 -0
  71. package/lib-commonjs/components/List/renderList.js +20 -0
  72. package/lib-commonjs/components/List/renderList.js.map +1 -0
  73. package/lib-commonjs/components/List/useList.js +78 -0
  74. package/lib-commonjs/components/List/useList.js.map +1 -0
  75. package/lib-commonjs/components/List/useListContextValues.js +22 -0
  76. package/lib-commonjs/components/List/useListContextValues.js.map +1 -0
  77. package/lib-commonjs/components/List/useListStyles.styles.js +31 -0
  78. package/lib-commonjs/components/List/useListStyles.styles.js.map +1 -0
  79. package/lib-commonjs/components/ListItem/ListItem.js +23 -0
  80. package/lib-commonjs/components/ListItem/ListItem.js.map +1 -0
  81. package/lib-commonjs/components/ListItem/ListItem.types.js +6 -0
  82. package/lib-commonjs/components/ListItem/ListItem.types.js.map +1 -0
  83. package/lib-commonjs/components/ListItem/index.js +31 -0
  84. package/lib-commonjs/components/ListItem/index.js.map +1 -0
  85. package/lib-commonjs/components/ListItem/renderListItem.js +21 -0
  86. package/lib-commonjs/components/ListItem/renderListItem.js.map +1 -0
  87. package/lib-commonjs/components/ListItem/useListItem.js +188 -0
  88. package/lib-commonjs/components/ListItem/useListItem.js.map +1 -0
  89. package/lib-commonjs/components/ListItem/useListItemStyles.styles.js +71 -0
  90. package/lib-commonjs/components/ListItem/useListItemStyles.styles.js.map +1 -0
  91. package/lib-commonjs/events/ListItemActionEvent.js +28 -0
  92. package/lib-commonjs/events/ListItemActionEvent.js.map +1 -0
  93. package/lib-commonjs/hooks/index.js +11 -0
  94. package/lib-commonjs/hooks/index.js.map +1 -0
  95. package/lib-commonjs/hooks/types.js +6 -0
  96. package/lib-commonjs/hooks/types.js.map +1 -0
  97. package/lib-commonjs/hooks/useListSelection.js +52 -0
  98. package/lib-commonjs/hooks/useListSelection.js.map +1 -0
  99. package/lib-commonjs/index.js +44 -0
  100. package/lib-commonjs/index.js.map +1 -0
  101. package/lib-commonjs/utils/calculateListItemRoleForListRole.js +26 -0
  102. package/lib-commonjs/utils/calculateListItemRoleForListRole.js.map +1 -0
  103. package/lib-commonjs/utils/calculateListRole.js +24 -0
  104. package/lib-commonjs/utils/calculateListRole.js.map +1 -0
  105. package/lib-commonjs/utils/index.js +32 -0
  106. package/lib-commonjs/utils/index.js.map +1 -0
  107. package/lib-commonjs/utils/validateGridCellsArePresent.js +26 -0
  108. package/lib-commonjs/utils/validateGridCellsArePresent.js.map +1 -0
  109. package/lib-commonjs/utils/validateProperElementTypes.js +22 -0
  110. package/lib-commonjs/utils/validateProperElementTypes.js.map +1 -0
  111. package/lib-commonjs/utils/validateProperRolesAreUsed.js +46 -0
  112. package/lib-commonjs/utils/validateProperRolesAreUsed.js.map +1 -0
  113. package/package.json +56 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,352 @@
1
+ # Change Log - @fluentui/react-list
2
+
3
+ This log was last generated on Tue, 07 Jan 2025 04:11:08 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly-20250107-0406.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-list_v0.0.0-nightly-20250107-0406.1)
8
+
9
+ Tue, 07 Jan 2025 04:11:08 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.4.4..@fluentui/react-list_v0.0.0-nightly-20250107-0406.1)
11
+
12
+ ### Changes
13
+
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
+ - Bump @fluentui/react-checkbox to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
16
+ - Bump @fluentui/react-context-selector to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
18
+ - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
19
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
20
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
21
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
22
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
23
+ - Bump @fluentui/react-provider to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
24
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
25
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250107-0406.1 ([commit](https://github.com/microsoft/fluentui/commit/5a8301df9fb7e31b8ad132988ffbe577332756f1) by beachball)
26
+
27
+ ## [0.4.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.4.4)
28
+
29
+ Mon, 16 Dec 2024 16:26:49 GMT
30
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.4.3..@fluentui/react-list-preview_v0.4.4)
31
+
32
+ ### Patches
33
+
34
+ - Bump @fluentui/react-checkbox to v9.2.44 ([PR #33468](https://github.com/microsoft/fluentui/pull/33468) by beachball)
35
+ - Bump @fluentui/react-context-selector to v9.1.71 ([PR #33468](https://github.com/microsoft/fluentui/pull/33468) by beachball)
36
+ - Bump @fluentui/react-jsx-runtime to v9.0.48 ([PR #33468](https://github.com/microsoft/fluentui/pull/33468) by beachball)
37
+ - Bump @fluentui/react-tabster to v9.23.2 ([PR #33468](https://github.com/microsoft/fluentui/pull/33468) by beachball)
38
+ - Bump @fluentui/react-theme to v9.1.24 ([PR #33468](https://github.com/microsoft/fluentui/pull/33468) by beachball)
39
+ - Bump @fluentui/react-utilities to v9.18.19 ([PR #33468](https://github.com/microsoft/fluentui/pull/33468) by beachball)
40
+ - Bump @fluentui/react-shared-contexts to v9.21.2 ([PR #33468](https://github.com/microsoft/fluentui/pull/33468) by beachball)
41
+
42
+ ## [0.4.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.4.3)
43
+
44
+ Mon, 09 Dec 2024 17:38:16 GMT
45
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.4.2..@fluentui/react-list-preview_v0.4.3)
46
+
47
+ ### Patches
48
+
49
+ - Bump @fluentui/react-checkbox to v9.2.43 ([PR #33431](https://github.com/microsoft/fluentui/pull/33431) by beachball)
50
+
51
+ ## [0.4.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.4.2)
52
+
53
+ Fri, 06 Dec 2024 12:53:39 GMT
54
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.4.1..@fluentui/react-list-preview_v0.4.2)
55
+
56
+ ### Patches
57
+
58
+ - chore: remove usage of "export *" ([PR #33380](https://github.com/microsoft/fluentui/pull/33380) by olfedias@microsoft.com)
59
+ - Bump @fluentui/react-checkbox to v9.2.42 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
60
+ - Bump @fluentui/react-context-selector to v9.1.70 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
61
+ - Bump @fluentui/react-jsx-runtime to v9.0.47 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
62
+ - Bump @fluentui/react-tabster to v9.23.1 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
63
+ - Bump @fluentui/react-theme to v9.1.23 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
64
+ - Bump @fluentui/react-utilities to v9.18.18 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
65
+ - Bump @fluentui/react-shared-contexts to v9.21.1 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
66
+
67
+ ## [0.4.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.4.1)
68
+
69
+ Mon, 18 Nov 2024 09:44:40 GMT
70
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.4.0..@fluentui/react-list-preview_v0.4.1)
71
+
72
+ ### Patches
73
+
74
+ - Bump @fluentui/react-checkbox to v9.2.41 ([PR #33229](https://github.com/microsoft/fluentui/pull/33229) by beachball)
75
+
76
+ ## [0.4.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.4.0)
77
+
78
+ Mon, 11 Nov 2024 10:00:42 GMT
79
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.9..@fluentui/react-list-preview_v0.4.0)
80
+
81
+ ### Minor changes
82
+
83
+ - Breaking: Render List/ListItem as "div" when in composite nav mode ([PR #33197](https://github.com/microsoft/fluentui/pull/33197) by jirivyhnalek@microsoft.com)
84
+ - Bump @fluentui/react-checkbox to v9.2.40 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
85
+ - Bump @fluentui/react-context-selector to v9.1.69 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
86
+ - Bump @fluentui/react-jsx-runtime to v9.0.46 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
87
+ - Bump @fluentui/keyboard-keys to v9.0.8 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
88
+ - Bump @fluentui/react-tabster to v9.23.0 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
89
+ - Bump @fluentui/react-theme to v9.1.22 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
90
+ - Bump @fluentui/react-utilities to v9.18.17 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
91
+ - Bump @fluentui/react-shared-contexts to v9.21.0 ([PR #33238](https://github.com/microsoft/fluentui/pull/33238) by beachball)
92
+
93
+ ### Patches
94
+
95
+ - chore: replace npm-scripts and just-scrtips with nx inferred tasks ([PR #33074](https://github.com/microsoft/fluentui/pull/33074) by martinhochel@microsoft.com)
96
+
97
+ ## [0.3.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.9)
98
+
99
+ Tue, 15 Oct 2024 17:17:53 GMT
100
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.8..@fluentui/react-list-preview_v0.3.9)
101
+
102
+ ### Patches
103
+
104
+ - Bump @fluentui/react-checkbox to v9.2.39 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
105
+ - Bump @fluentui/react-context-selector to v9.1.68 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
106
+ - Bump @fluentui/react-jsx-runtime to v9.0.45 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
107
+ - Bump @fluentui/react-tabster to v9.22.9 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
108
+ - Bump @fluentui/react-theme to v9.1.21 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
109
+ - Bump @fluentui/react-utilities to v9.18.16 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
110
+ - Bump @fluentui/react-shared-contexts to v9.20.2 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
111
+
112
+ ## [0.3.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.8)
113
+
114
+ Tue, 08 Oct 2024 22:05:57 GMT
115
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.7..@fluentui/react-list-preview_v0.3.8)
116
+
117
+ ### Patches
118
+
119
+ - Bump @fluentui/react-checkbox to v9.2.38 ([PR #33007](https://github.com/microsoft/fluentui/pull/33007) by beachball)
120
+ - Bump @fluentui/react-tabster to v9.22.8 ([PR #33007](https://github.com/microsoft/fluentui/pull/33007) by beachball)
121
+
122
+ ## [0.3.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.7)
123
+
124
+ Mon, 23 Sep 2024 12:40:13 GMT
125
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.6..@fluentui/react-list-preview_v0.3.7)
126
+
127
+ ### Patches
128
+
129
+ - Bump @fluentui/react-checkbox to v9.2.37 ([PR #32840](https://github.com/microsoft/fluentui/pull/32840) by beachball)
130
+ - Bump @fluentui/react-context-selector to v9.1.67 ([PR #32840](https://github.com/microsoft/fluentui/pull/32840) by beachball)
131
+ - Bump @fluentui/react-jsx-runtime to v9.0.44 ([PR #32840](https://github.com/microsoft/fluentui/pull/32840) by beachball)
132
+ - Bump @fluentui/react-tabster to v9.22.7 ([PR #32840](https://github.com/microsoft/fluentui/pull/32840) by beachball)
133
+ - Bump @fluentui/react-theme to v9.1.20 ([PR #32840](https://github.com/microsoft/fluentui/pull/32840) by beachball)
134
+ - Bump @fluentui/react-utilities to v9.18.15 ([PR #32840](https://github.com/microsoft/fluentui/pull/32840) by beachball)
135
+ - Bump @fluentui/react-shared-contexts to v9.20.1 ([PR #32840](https://github.com/microsoft/fluentui/pull/32840) by beachball)
136
+
137
+ ## [0.3.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.6)
138
+
139
+ Tue, 10 Sep 2024 10:19:12 GMT
140
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.5..@fluentui/react-list-preview_v0.3.6)
141
+
142
+ ### Patches
143
+
144
+ - Bump @fluentui/react-checkbox to v9.2.36 ([PR #32494](https://github.com/microsoft/fluentui/pull/32494) by beachball)
145
+ - Bump @fluentui/react-context-selector to v9.1.66 ([PR #32494](https://github.com/microsoft/fluentui/pull/32494) by beachball)
146
+ - Bump @fluentui/react-jsx-runtime to v9.0.43 ([PR #32494](https://github.com/microsoft/fluentui/pull/32494) by beachball)
147
+ - Bump @fluentui/react-tabster to v9.22.6 ([PR #32494](https://github.com/microsoft/fluentui/pull/32494) by beachball)
148
+ - Bump @fluentui/react-utilities to v9.18.14 ([PR #32494](https://github.com/microsoft/fluentui/pull/32494) by beachball)
149
+
150
+ ## [0.3.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.5)
151
+
152
+ Thu, 15 Aug 2024 13:49:46 GMT
153
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.4..@fluentui/react-list-preview_v0.3.5)
154
+
155
+ ### Patches
156
+
157
+ - Bump @fluentui/react-checkbox to v9.2.35 ([PR #32313](https://github.com/microsoft/fluentui/pull/32313) by beachball)
158
+ - Bump @fluentui/react-tabster to v9.22.5 ([PR #32313](https://github.com/microsoft/fluentui/pull/32313) by beachball)
159
+
160
+ ## [0.3.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.4)
161
+
162
+ Thu, 15 Aug 2024 08:22:11 GMT
163
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.3..@fluentui/react-list-preview_v0.3.4)
164
+
165
+ ### Patches
166
+
167
+ - chore: ensures useMergedTabsterAttributes supports Partial attributes ([PR #32300](https://github.com/microsoft/fluentui/pull/32300) by bernardo.sunderhus@gmail.com)
168
+ - Bump @fluentui/react-checkbox to v9.2.34 ([PR #31885](https://github.com/microsoft/fluentui/pull/31885) by beachball)
169
+ - Bump @fluentui/react-tabster to v9.22.4 ([PR #31885](https://github.com/microsoft/fluentui/pull/31885) by beachball)
170
+
171
+ ## [0.3.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.3)
172
+
173
+ Tue, 30 Jul 2024 18:47:35 GMT
174
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.2..@fluentui/react-list-preview_v0.3.3)
175
+
176
+ ### Patches
177
+
178
+ - Bump @fluentui/react-checkbox to v9.2.33 ([PR #32157](https://github.com/microsoft/fluentui/pull/32157) by beachball)
179
+
180
+ ## [0.3.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.2)
181
+
182
+ Tue, 23 Jul 2024 20:13:14 GMT
183
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.1..@fluentui/react-list-preview_v0.3.2)
184
+
185
+ ### Patches
186
+
187
+ - Bump @fluentui/react-checkbox to v9.2.32 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
188
+ - Bump @fluentui/react-context-selector to v9.1.65 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
189
+ - Bump @fluentui/react-jsx-runtime to v9.0.42 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
190
+ - Bump @fluentui/react-tabster to v9.22.3 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
191
+ - Bump @fluentui/react-utilities to v9.18.13 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
192
+ - Bump @fluentui/react-shared-contexts to v9.20.0 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
193
+
194
+ ## [0.3.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.1)
195
+
196
+ Mon, 15 Jul 2024 17:25:33 GMT
197
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.3.0..@fluentui/react-list-preview_v0.3.1)
198
+
199
+ ### Patches
200
+
201
+ - fix: revert incorectly set npm versions in all packages ([PR #31937](https://github.com/microsoft/fluentui/pull/31937) by martinhochel@microsoft.com)
202
+ - Bump @fluentui/react-checkbox to v9.2.31 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
203
+ - Bump @fluentui/react-context-selector to v9.1.64 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
204
+ - Bump @fluentui/react-jsx-runtime to v9.0.41 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
205
+ - Bump @fluentui/react-tabster to v9.22.2 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
206
+ - Bump @fluentui/react-utilities to v9.18.12 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
207
+ - Bump @fluentui/react-shared-contexts to v9.19.1 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
208
+
209
+ ## [0.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.3.0)
210
+
211
+ Mon, 01 Jul 2024 20:30:52 GMT
212
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.9..@fluentui/react-list-preview_v0.3.0)
213
+
214
+ ### Minor changes
215
+
216
+ - feat: Pass data with value to onAction callback ([PR #31803](https://github.com/microsoft/fluentui/pull/31803) by jirivyhnalek@microsoft.com)
217
+ - Bump @fluentui/react-checkbox to v9.2.30 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
218
+ - Bump @fluentui/react-context-selector to v9.1.63 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
219
+ - Bump @fluentui/react-jsx-runtime to v9.0.40 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
220
+ - Bump @fluentui/react-tabster to v9.22.1 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
221
+ - Bump @fluentui/react-utilities to v9.18.11 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
222
+
223
+ ### Patches
224
+
225
+ - chore: add eslint react-compiler ([PR #31457](https://github.com/microsoft/fluentui/pull/31457) by seanmonahan@microsoft.com)
226
+
227
+ ## [0.2.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.9)
228
+
229
+ Mon, 17 Jun 2024 07:34:17 GMT
230
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.8..@fluentui/react-list-preview_v0.2.9)
231
+
232
+ ### Patches
233
+
234
+ - Bump @fluentui/react-checkbox to v9.2.29 ([commit](https://github.com/microsoft/fluentui/commit/9ae683c22f2e65d94422a571ad5d3f97d0a77234) by beachball)
235
+ - Bump @fluentui/react-context-selector to v9.1.62 ([commit](https://github.com/microsoft/fluentui/commit/9ae683c22f2e65d94422a571ad5d3f97d0a77234) by beachball)
236
+ - Bump @fluentui/react-tabster to v9.22.0 ([commit](https://github.com/microsoft/fluentui/commit/9ae683c22f2e65d94422a571ad5d3f97d0a77234) by beachball)
237
+
238
+ ## [0.2.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.8)
239
+
240
+ Thu, 06 Jun 2024 15:26:34 GMT
241
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.7..@fluentui/react-list-preview_v0.2.8)
242
+
243
+ ### Patches
244
+
245
+ - chore: ensure only state or defaultState is provided on useControllableState hook invocation ([PR #31461](https://github.com/microsoft/fluentui/pull/31461) by bernardo.sunderhus@gmail.com)
246
+ - Bump @fluentui/react-checkbox to v9.2.28 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
247
+ - Bump @fluentui/react-context-selector to v9.1.61 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
248
+ - Bump @fluentui/react-jsx-runtime to v9.0.39 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
249
+ - Bump @fluentui/react-tabster to v9.21.5 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
250
+ - Bump @fluentui/react-utilities to v9.18.10 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
251
+
252
+ ## [0.2.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.7)
253
+
254
+ Thu, 23 May 2024 08:02:44 GMT
255
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.6..@fluentui/react-list-preview_v0.2.7)
256
+
257
+ ### Patches
258
+
259
+ - chore: replace usage of .shorthands() in styles ([PR #31432](https://github.com/microsoft/fluentui/pull/31432) by olfedias@microsoft.com)
260
+ - Bump @fluentui/react-checkbox to v9.2.27 ([commit](https://github.com/microsoft/fluentui/commit/03599d609e8310b08c57d1f871cffbf717d79207) by beachball)
261
+ - Bump @fluentui/react-tabster to v9.21.4 ([commit](https://github.com/microsoft/fluentui/commit/03599d609e8310b08c57d1f871cffbf717d79207) by beachball)
262
+
263
+ ## [0.2.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.6)
264
+
265
+ Mon, 20 May 2024 12:44:57 GMT
266
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.5..@fluentui/react-list-preview_v0.2.6)
267
+
268
+ ### Patches
269
+
270
+ - chore: bump @griffel/react ([PR #31258](https://github.com/microsoft/fluentui/pull/31258) by olfedias@microsoft.com)
271
+ - Bump @fluentui/react-checkbox to v9.2.26 ([PR #26682](https://github.com/microsoft/fluentui/pull/26682) by beachball)
272
+ - Bump @fluentui/react-context-selector to v9.1.60 ([PR #26682](https://github.com/microsoft/fluentui/pull/26682) by beachball)
273
+ - Bump @fluentui/react-jsx-runtime to v9.0.38 ([PR #26682](https://github.com/microsoft/fluentui/pull/26682) by beachball)
274
+ - Bump @fluentui/react-tabster to v9.21.3 ([PR #26682](https://github.com/microsoft/fluentui/pull/26682) by beachball)
275
+ - Bump @fluentui/react-utilities to v9.18.9 ([PR #26682](https://github.com/microsoft/fluentui/pull/26682) by beachball)
276
+ - Bump @fluentui/react-shared-contexts to v9.19.0 ([PR #26682](https://github.com/microsoft/fluentui/pull/26682) by beachball)
277
+
278
+ ## [0.2.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.5)
279
+
280
+ Thu, 16 May 2024 09:25:20 GMT
281
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.4..@fluentui/react-list-preview_v0.2.5)
282
+
283
+ ### Patches
284
+
285
+ - Bump @fluentui/react-checkbox to v9.2.25 ([PR #31390](https://github.com/microsoft/fluentui/pull/31390) by beachball)
286
+
287
+ ## [0.2.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.4)
288
+
289
+ Thu, 09 May 2024 19:35:12 GMT
290
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.3..@fluentui/react-list-preview_v0.2.4)
291
+
292
+ ### Patches
293
+
294
+ - Bump @fluentui/react-checkbox to v9.2.24 ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by beachball)
295
+ - Bump @fluentui/react-tabster to v9.21.2 ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by beachball)
296
+
297
+ ## [0.2.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.3)
298
+
299
+ Mon, 06 May 2024 12:55:02 GMT
300
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.2..@fluentui/react-list-preview_v0.2.3)
301
+
302
+ ### Patches
303
+
304
+ - Bump @fluentui/react-checkbox to v9.2.23 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
305
+ - Bump @fluentui/react-context-selector to v9.1.59 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
306
+ - Bump @fluentui/react-jsx-runtime to v9.0.37 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
307
+ - Bump @fluentui/react-tabster to v9.21.1 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
308
+ - Bump @fluentui/react-utilities to v9.18.8 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
309
+ - Bump @fluentui/react-shared-contexts to v9.18.0 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
310
+
311
+ ## [0.2.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.2)
312
+
313
+ Thu, 02 May 2024 11:36:44 GMT
314
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.1..@fluentui/react-list-preview_v0.2.2)
315
+
316
+ ### Patches
317
+
318
+ - Bump @fluentui/react-checkbox to v9.2.22 ([PR #31231](https://github.com/microsoft/fluentui/pull/31231) by beachball)
319
+ - Bump @fluentui/react-tabster to v9.21.0 ([PR #31231](https://github.com/microsoft/fluentui/pull/31231) by beachball)
320
+
321
+ ## [0.2.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.1)
322
+
323
+ Tue, 23 Apr 2024 08:17:49 GMT
324
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.2.0..@fluentui/react-list-preview_v0.2.1)
325
+
326
+ ### Patches
327
+
328
+ - Bump @fluentui/react-checkbox to v9.2.21 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
329
+ - Bump @fluentui/react-context-selector to v9.1.58 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
330
+ - Bump @fluentui/react-jsx-runtime to v9.0.36 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
331
+ - Bump @fluentui/react-tabster to v9.20.1 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
332
+ - Bump @fluentui/react-utilities to v9.18.7 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
333
+ - Bump @fluentui/react-shared-contexts to v9.17.0 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
334
+
335
+ ## [0.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.2.0)
336
+
337
+ Wed, 17 Apr 2024 21:53:54 GMT
338
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-list-preview_v0.1.0..@fluentui/react-list-preview_v0.2.0)
339
+
340
+ ### Minor changes
341
+
342
+ - Tabster 7.1.0. ([PR #30969](https://github.com/microsoft/fluentui/pull/30969) by marata@microsoft.com)
343
+ - Bump @fluentui/react-checkbox to v9.2.20 ([PR #31100](https://github.com/microsoft/fluentui/pull/31100) by beachball)
344
+ - Bump @fluentui/react-tabster to v9.20.0 ([PR #31100](https://github.com/microsoft/fluentui/pull/31100) by beachball)
345
+
346
+ ## [0.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-list-preview_v0.1.0)
347
+
348
+ Thu, 04 Apr 2024 12:08:07 GMT
349
+
350
+ ### Minor changes
351
+
352
+ - feat: Release preview package ([PR #30898](https://github.com/microsoft/fluentui/pull/30898) by jirivyhnalek@microsoft.com)
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ @fluentui/react-list
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ All rights reserved.
6
+
7
+ MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+
15
+ Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @fluentui/react-list
2
+
3
+ **React List components for [Fluent UI React](https://react.fluentui.dev/)**
4
+
5
+ These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
@@ -0,0 +1,148 @@
1
+ /// <reference types="react" />
2
+
3
+ import { Checkbox } from '@fluentui/react-checkbox';
4
+ import type { ComponentProps } from '@fluentui/react-utilities';
5
+ import type { ComponentState } from '@fluentui/react-utilities';
6
+ import type { EventData } from '@fluentui/react-utilities';
7
+ import type { EventHandler } from '@fluentui/react-utilities';
8
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
9
+ import * as React_2 from 'react';
10
+ import { SelectionItemId } from '@fluentui/react-utilities';
11
+ import type { SelectionMode as SelectionMode_2 } from '@fluentui/react-utilities';
12
+ import type { Slot } from '@fluentui/react-utilities';
13
+ import type { SlotClassNames } from '@fluentui/react-utilities';
14
+
15
+ export declare const List: ForwardRefComponent<ListProps>;
16
+
17
+ export declare const listClassNames: SlotClassNames<ListSlots>;
18
+
19
+ declare type ListContextValue = {
20
+ navigationMode: ListNavigationMode | undefined;
21
+ selection?: ListSelectionState;
22
+ listItemRole: string;
23
+ validateListItem: (listItemElement: HTMLElement) => void;
24
+ };
25
+
26
+ declare type ListContextValues = {
27
+ listContext: ListContextValue;
28
+ };
29
+
30
+ export declare const ListItem: ForwardRefComponent<ListItemProps>;
31
+
32
+ declare type ListItemActionEvent = CustomEvent<ListItemActionEventDetail>;
33
+
34
+ declare type ListItemActionEventData = EventData<typeof ListItemActionEventName, ListItemActionEvent> & {
35
+ value: ListItemValue;
36
+ };
37
+
38
+ declare interface ListItemActionEventDetail {
39
+ originalEvent: React_2.MouseEvent | React_2.KeyboardEvent;
40
+ }
41
+
42
+ declare const ListItemActionEventName = "ListItemAction";
43
+
44
+ export declare const listItemClassNames: SlotClassNames<ListItemSlots>;
45
+
46
+ /**
47
+ * ListItem Props
48
+ */
49
+ export declare type ListItemProps = ComponentProps<ListItemSlots> & {
50
+ value?: ListItemValue;
51
+ onAction?: EventHandler<ListItemActionEventData>;
52
+ };
53
+
54
+ export declare type ListItemSlots = {
55
+ root: NonNullable<Slot<'li', 'div'>>;
56
+ checkmark?: Slot<typeof Checkbox>;
57
+ };
58
+
59
+ /**
60
+ * State used in rendering ListItem
61
+ */
62
+ export declare type ListItemState = ComponentState<ListItemSlots> & {
63
+ selectable: boolean;
64
+ navigable: boolean;
65
+ };
66
+
67
+ declare type ListItemValue = string | number;
68
+
69
+ declare type ListNavigationMode = 'items' | 'composite';
70
+
71
+ /**
72
+ * List Props
73
+ */
74
+ export declare type ListProps = ComponentProps<ListSlots> & {
75
+ navigationMode?: ListNavigationMode;
76
+ selectionMode?: SelectionMode_2;
77
+ selectedItems?: SelectionItemId[];
78
+ defaultSelectedItems?: SelectionItemId[];
79
+ onSelectionChange?: EventHandler<OnListSelectionChangeData>;
80
+ };
81
+
82
+ declare type ListSelectionState = {
83
+ isSelected: (item: string | number) => boolean;
84
+ toggleItem: (e: React_2.SyntheticEvent, id: string | number) => void;
85
+ deselectItem: (e: React_2.SyntheticEvent, id: string | number) => void;
86
+ selectItem: (e: React_2.SyntheticEvent, id: string | number) => void;
87
+ clearSelection: (e: React_2.SyntheticEvent) => void;
88
+ toggleAllItems: (e: React_2.SyntheticEvent, itemIds: string[] | number[]) => void;
89
+ setSelectedItems: React_2.Dispatch<React_2.SetStateAction<Iterable<SelectionItemId>>>;
90
+ selectedItems: SelectionItemId[];
91
+ };
92
+
93
+ export declare type ListSlots = {
94
+ root: NonNullable<Slot<'ul', 'div' | 'ol'>>;
95
+ };
96
+
97
+ /**
98
+ * State used in rendering List
99
+ */
100
+ export declare type ListState = ComponentState<ListSlots> & ListContextValue;
101
+
102
+ declare type OnListSelectionChangeData = EventData<'change', React_2.SyntheticEvent> & {
103
+ selectedItems: SelectionItemId[];
104
+ };
105
+
106
+ /**
107
+ * Render the final JSX of List
108
+ */
109
+ export declare const renderList_unstable: (state: ListState, contextValues: ListContextValues) => JSX.Element;
110
+
111
+ /**
112
+ * Render the final JSX of ListItem
113
+ */
114
+ export declare const renderListItem_unstable: (state: ListItemState) => JSX.Element;
115
+
116
+ /**
117
+ * Create the state required to render List.
118
+ *
119
+ * The returned state can be modified with hooks such as useListStyles_unstable,
120
+ * before being passed to renderList_unstable.
121
+ *
122
+ * @param props - props from this instance of List
123
+ * @param ref - reference to root HTMLElement of List
124
+ */
125
+ export declare const useList_unstable: (props: ListProps, ref: React_2.Ref<HTMLDivElement | HTMLUListElement | HTMLOListElement>) => ListState;
126
+
127
+ /**
128
+ * Create the state required to render ListItem.
129
+ *
130
+ * The returned state can be modified with hooks such as useListItemStyles_unstable,
131
+ * before being passed to renderListItem_unstable.
132
+ *
133
+ * @param props - props from this instance of ListItem
134
+ * @param ref - reference to root HTMLLIElement | HTMLDivElementof ListItem
135
+ */
136
+ export declare const useListItem_unstable: (props: ListItemProps, ref: React_2.Ref<HTMLLIElement | HTMLDivElement>) => ListItemState;
137
+
138
+ /**
139
+ * Apply styling to the ListItem slots based on the state
140
+ */
141
+ export declare const useListItemStyles_unstable: (state: ListItemState) => ListItemState;
142
+
143
+ /**
144
+ * Apply styling to the List slots based on the state
145
+ */
146
+ export declare const useListStyles_unstable: (state: ListState) => ListState;
147
+
148
+ export { }
package/lib/List.js ADDED
@@ -0,0 +1 @@
1
+ export { List, listClassNames, renderList_unstable, useListStyles_unstable, useList_unstable } from './components/List/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/List.ts"],"sourcesContent":["export type {\n ListContextValue,\n ListContextValues,\n ListNavigationMode,\n ListProps,\n ListSlots,\n ListState,\n OnListSelectionChangeData,\n} from './components/List/index';\nexport {\n List,\n listClassNames,\n renderList_unstable,\n useListStyles_unstable,\n useList_unstable,\n} from './components/List/index';\n"],"names":["List","listClassNames","renderList_unstable","useListStyles_unstable","useList_unstable"],"rangeMappings":"","mappings":"AASA,SACEA,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,sBAAsB,EACtBC,gBAAgB,QACX,0BAA0B"}
@@ -0,0 +1 @@
1
+ export { ListItem, listItemClassNames, renderListItem_unstable, useListItemStyles_unstable, useListItem_unstable } from './components/ListItem/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ListItem.ts"],"sourcesContent":["export type {\n ListItemActionEventData,\n ListItemProps,\n ListItemSlots,\n ListItemState,\n ListItemValue,\n} from './components/ListItem/index';\nexport {\n ListItem,\n listItemClassNames,\n renderListItem_unstable,\n useListItemStyles_unstable,\n useListItem_unstable,\n} from './components/ListItem/index';\n"],"names":["ListItem","listItemClassNames","renderListItem_unstable","useListItemStyles_unstable","useListItem_unstable"],"rangeMappings":"","mappings":"AAOA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,8BAA8B"}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
3
+ import { useList_unstable } from './useList';
4
+ import { renderList_unstable } from './renderList';
5
+ import { useListStyles_unstable } from './useListStyles.styles';
6
+ import { useListContextValues_unstable } from './useListContextValues';
7
+ export const List = /*#__PURE__*/ React.forwardRef((props, ref)=>{
8
+ const state = useList_unstable(props, ref);
9
+ const contextValues = useListContextValues_unstable(state);
10
+ useListStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useListStyles_unstable')(state);
12
+ return renderList_unstable(state, contextValues);
13
+ });
14
+ List.displayName = 'List';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/List/List.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useList_unstable } from './useList';\nimport { renderList_unstable } from './renderList';\nimport { useListStyles_unstable } from './useListStyles.styles';\nimport type { ListProps } from './List.types';\nimport { useListContextValues_unstable } from './useListContextValues';\n\nexport const List: ForwardRefComponent<ListProps> = React.forwardRef((props, ref) => {\n const state = useList_unstable(props, ref);\n const contextValues = useListContextValues_unstable(state);\n\n useListStyles_unstable(state);\n useCustomStyleHook_unstable('useListStyles_unstable')(state);\n\n return renderList_unstable(state, contextValues);\n});\n\nList.displayName = 'List';\n"],"names":["React","useCustomStyleHook_unstable","useList_unstable","renderList_unstable","useListStyles_unstable","useListContextValues_unstable","List","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,sBAAsB,QAAQ,yBAAyB;AAEhE,SAASC,6BAA6B,QAAQ,yBAAyB;AAEvE,OAAO,MAAMC,qBAAuCN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC3E,MAAMC,QAAQR,iBAAiBM,OAAOC;IACtC,MAAME,gBAAgBN,8BAA8BK;IAEpDN,uBAAuBM;IACvBT,4BAA4B,0BAA0BS;IAEtD,OAAOP,oBAAoBO,OAAOC;AACpC,GAAG;AAEHL,KAAKM,WAAW,GAAG"}
@@ -0,0 +1 @@
1
+ import * as React from 'react';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/List/List.types.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type {\n ComponentProps,\n ComponentState,\n Slot,\n SelectionMode,\n SelectionItemId,\n EventHandler,\n EventData,\n} from '@fluentui/react-utilities';\nimport type { ListSelectionState } from '../../hooks/types';\n\nexport type ListSlots = {\n root: NonNullable<Slot<'ul', 'div' | 'ol'>>;\n};\n\nexport type OnListSelectionChangeData = EventData<'change', React.SyntheticEvent> & {\n selectedItems: SelectionItemId[];\n};\n\nexport type ListNavigationMode = 'items' | 'composite';\n\n/**\n * List Props\n */\nexport type ListProps = ComponentProps<ListSlots> & {\n navigationMode?: ListNavigationMode;\n selectionMode?: SelectionMode;\n selectedItems?: SelectionItemId[];\n defaultSelectedItems?: SelectionItemId[];\n onSelectionChange?: EventHandler<OnListSelectionChangeData>;\n};\n\nexport type ListContextValue = {\n navigationMode: ListNavigationMode | undefined;\n selection?: ListSelectionState;\n listItemRole: string;\n validateListItem: (listItemElement: HTMLElement) => void;\n};\n\nexport type ListContextValues = {\n listContext: ListContextValue;\n};\n\n/**\n * State used in rendering List\n */\nexport type ListState = ComponentState<ListSlots> & ListContextValue;\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -0,0 +1,4 @@
1
+ export { List } from './List';
2
+ export { renderList_unstable } from './renderList';
3
+ export { useList_unstable } from './useList';
4
+ export { listClassNames, useListStyles_unstable } from './useListStyles.styles';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/List/index.ts"],"sourcesContent":["export { List } from './List';\nexport type {\n ListContextValue,\n ListContextValues,\n ListNavigationMode,\n ListProps,\n ListSlots,\n ListState,\n OnListSelectionChangeData,\n} from './List.types';\nexport { renderList_unstable } from './renderList';\nexport { useList_unstable } from './useList';\nexport { listClassNames, useListStyles_unstable } from './useListStyles.styles';\n"],"names":["List","renderList_unstable","useList_unstable","listClassNames","useListStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,IAAI,QAAQ,SAAS;AAU9B,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,cAAc,EAAEC,sBAAsB,QAAQ,yBAAyB"}
@@ -0,0 +1,11 @@
1
+ import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
+ export const listContextDefaultValue = {
3
+ navigationMode: undefined,
4
+ selection: undefined,
5
+ listItemRole: 'listitem',
6
+ validateListItem: ()=>{
7
+ /* noop */ }
8
+ };
9
+ const listContext = createContext(undefined);
10
+ export const ListContextProvider = listContext.Provider;
11
+ export const useListContext_unstable = (selector)=>useContextSelector(listContext, (ctx = listContextDefaultValue)=>selector(ctx));
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/List/listContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport { ListContextValue } from './List.types';\n\nexport const listContextDefaultValue: ListContextValue = {\n navigationMode: undefined,\n selection: undefined,\n listItemRole: 'listitem',\n validateListItem: () => {\n /* noop */\n },\n};\n\nconst listContext = createContext<ListContextValue | undefined>(undefined);\n\nexport const ListContextProvider = listContext.Provider;\n\nexport const useListContext_unstable = <T>(selector: ContextSelector<ListContextValue, T>): T =>\n useContextSelector(listContext, (ctx = listContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","listContextDefaultValue","navigationMode","undefined","selection","listItemRole","validateListItem","listContext","ListContextProvider","Provider","useListContext_unstable","selector","ctx"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,0BAA4C;IACvDC,gBAAgBC;IAChBC,WAAWD;IACXE,cAAc;IACdC,kBAAkB;IAChB,QAAQ,GACV;AACF,EAAE;AAEF,MAAMC,cAAcR,cAA4CI;AAEhE,OAAO,MAAMK,sBAAsBD,YAAYE,QAAQ,CAAC;AAExD,OAAO,MAAMC,0BAA0B,CAAIC,WACzCX,mBAAmBO,aAAa,CAACK,MAAMX,uBAAuB,GAAKU,SAASC,MAAM"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
+ import { ListContextProvider } from './listContext';
4
+ /**
5
+ * Render the final JSX of List
6
+ */ export const renderList_unstable = (state, contextValues)=>{
7
+ assertSlots(state);
8
+ return /*#__PURE__*/ _jsx(ListContextProvider, {
9
+ value: contextValues.listContext,
10
+ children: /*#__PURE__*/ _jsx(state.root, {})
11
+ });
12
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/List/renderList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { ListState, ListSlots, ListContextValues } from './List.types';\nimport { ListContextProvider } from './listContext';\n\n/**\n * Render the final JSX of List\n */\nexport const renderList_unstable = (state: ListState, contextValues: ListContextValues) => {\n assertSlots<ListSlots>(state);\n\n return (\n <ListContextProvider value={contextValues.listContext}>\n <state.root />\n </ListContextProvider>\n );\n};\n"],"names":["assertSlots","ListContextProvider","renderList_unstable","state","contextValues","value","listContext","root"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,mBAAmB,QAAQ,gBAAgB;AAEpD;;CAEC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAkBC;IACpDJ,YAAuBG;IAEvB,qBACE,KAACF;QAAoBI,OAAOD,cAAcE,WAAW;kBACnD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}