@react-aria/table 3.0.0-beta.1 → 3.0.0-nightly-4980928d3-240906

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 (239) hide show
  1. package/dist/TableKeyboardDelegate.main.js +132 -0
  2. package/dist/TableKeyboardDelegate.main.js.map +1 -0
  3. package/dist/TableKeyboardDelegate.mjs +127 -0
  4. package/dist/TableKeyboardDelegate.module.js +127 -0
  5. package/dist/TableKeyboardDelegate.module.js.map +1 -0
  6. package/dist/ar-AE.main.js +14 -0
  7. package/dist/ar-AE.main.js.map +1 -0
  8. package/dist/ar-AE.mjs +16 -0
  9. package/dist/ar-AE.module.js +16 -0
  10. package/dist/ar-AE.module.js.map +1 -0
  11. package/dist/bg-BG.main.js +14 -0
  12. package/dist/bg-BG.main.js.map +1 -0
  13. package/dist/bg-BG.mjs +16 -0
  14. package/dist/bg-BG.module.js +16 -0
  15. package/dist/bg-BG.module.js.map +1 -0
  16. package/dist/cs-CZ.main.js +14 -0
  17. package/dist/cs-CZ.main.js.map +1 -0
  18. package/dist/cs-CZ.mjs +16 -0
  19. package/dist/cs-CZ.module.js +16 -0
  20. package/dist/cs-CZ.module.js.map +1 -0
  21. package/dist/da-DK.main.js +14 -0
  22. package/dist/da-DK.main.js.map +1 -0
  23. package/dist/da-DK.mjs +16 -0
  24. package/dist/da-DK.module.js +16 -0
  25. package/dist/da-DK.module.js.map +1 -0
  26. package/dist/de-DE.main.js +14 -0
  27. package/dist/de-DE.main.js.map +1 -0
  28. package/dist/de-DE.mjs +16 -0
  29. package/dist/de-DE.module.js +16 -0
  30. package/dist/de-DE.module.js.map +1 -0
  31. package/dist/el-GR.main.js +14 -0
  32. package/dist/el-GR.main.js.map +1 -0
  33. package/dist/el-GR.mjs +16 -0
  34. package/dist/el-GR.module.js +16 -0
  35. package/dist/el-GR.module.js.map +1 -0
  36. package/dist/en-US.main.js +14 -0
  37. package/dist/en-US.main.js.map +1 -0
  38. package/dist/en-US.mjs +16 -0
  39. package/dist/en-US.module.js +16 -0
  40. package/dist/en-US.module.js.map +1 -0
  41. package/dist/es-ES.main.js +14 -0
  42. package/dist/es-ES.main.js.map +1 -0
  43. package/dist/es-ES.mjs +16 -0
  44. package/dist/es-ES.module.js +16 -0
  45. package/dist/es-ES.module.js.map +1 -0
  46. package/dist/et-EE.main.js +14 -0
  47. package/dist/et-EE.main.js.map +1 -0
  48. package/dist/et-EE.mjs +16 -0
  49. package/dist/et-EE.module.js +16 -0
  50. package/dist/et-EE.module.js.map +1 -0
  51. package/dist/fi-FI.main.js +14 -0
  52. package/dist/fi-FI.main.js.map +1 -0
  53. package/dist/fi-FI.mjs +16 -0
  54. package/dist/fi-FI.module.js +16 -0
  55. package/dist/fi-FI.module.js.map +1 -0
  56. package/dist/fr-FR.main.js +14 -0
  57. package/dist/fr-FR.main.js.map +1 -0
  58. package/dist/fr-FR.mjs +16 -0
  59. package/dist/fr-FR.module.js +16 -0
  60. package/dist/fr-FR.module.js.map +1 -0
  61. package/dist/he-IL.main.js +14 -0
  62. package/dist/he-IL.main.js.map +1 -0
  63. package/dist/he-IL.mjs +16 -0
  64. package/dist/he-IL.module.js +16 -0
  65. package/dist/he-IL.module.js.map +1 -0
  66. package/dist/hr-HR.main.js +14 -0
  67. package/dist/hr-HR.main.js.map +1 -0
  68. package/dist/hr-HR.mjs +16 -0
  69. package/dist/hr-HR.module.js +16 -0
  70. package/dist/hr-HR.module.js.map +1 -0
  71. package/dist/hu-HU.main.js +14 -0
  72. package/dist/hu-HU.main.js.map +1 -0
  73. package/dist/hu-HU.mjs +16 -0
  74. package/dist/hu-HU.module.js +16 -0
  75. package/dist/hu-HU.module.js.map +1 -0
  76. package/dist/import.mjs +34 -0
  77. package/dist/intlStrings.main.js +108 -0
  78. package/dist/intlStrings.main.js.map +1 -0
  79. package/dist/intlStrings.mjs +110 -0
  80. package/dist/intlStrings.module.js +110 -0
  81. package/dist/intlStrings.module.js.map +1 -0
  82. package/dist/it-IT.main.js +14 -0
  83. package/dist/it-IT.main.js.map +1 -0
  84. package/dist/it-IT.mjs +16 -0
  85. package/dist/it-IT.module.js +16 -0
  86. package/dist/it-IT.module.js.map +1 -0
  87. package/dist/ja-JP.main.js +14 -0
  88. package/dist/ja-JP.main.js.map +1 -0
  89. package/dist/ja-JP.mjs +16 -0
  90. package/dist/ja-JP.module.js +16 -0
  91. package/dist/ja-JP.module.js.map +1 -0
  92. package/dist/ko-KR.main.js +14 -0
  93. package/dist/ko-KR.main.js.map +1 -0
  94. package/dist/ko-KR.mjs +16 -0
  95. package/dist/ko-KR.module.js +16 -0
  96. package/dist/ko-KR.module.js.map +1 -0
  97. package/dist/lt-LT.main.js +14 -0
  98. package/dist/lt-LT.main.js.map +1 -0
  99. package/dist/lt-LT.mjs +16 -0
  100. package/dist/lt-LT.module.js +16 -0
  101. package/dist/lt-LT.module.js.map +1 -0
  102. package/dist/lv-LV.main.js +14 -0
  103. package/dist/lv-LV.main.js.map +1 -0
  104. package/dist/lv-LV.mjs +16 -0
  105. package/dist/lv-LV.module.js +16 -0
  106. package/dist/lv-LV.module.js.map +1 -0
  107. package/dist/main.js +26 -499
  108. package/dist/main.js.map +1 -1
  109. package/dist/module.js +12 -454
  110. package/dist/module.js.map +1 -1
  111. package/dist/nb-NO.main.js +14 -0
  112. package/dist/nb-NO.main.js.map +1 -0
  113. package/dist/nb-NO.mjs +16 -0
  114. package/dist/nb-NO.module.js +16 -0
  115. package/dist/nb-NO.module.js.map +1 -0
  116. package/dist/nl-NL.main.js +14 -0
  117. package/dist/nl-NL.main.js.map +1 -0
  118. package/dist/nl-NL.mjs +16 -0
  119. package/dist/nl-NL.module.js +16 -0
  120. package/dist/nl-NL.module.js.map +1 -0
  121. package/dist/pl-PL.main.js +14 -0
  122. package/dist/pl-PL.main.js.map +1 -0
  123. package/dist/pl-PL.mjs +16 -0
  124. package/dist/pl-PL.module.js +16 -0
  125. package/dist/pl-PL.module.js.map +1 -0
  126. package/dist/pt-BR.main.js +14 -0
  127. package/dist/pt-BR.main.js.map +1 -0
  128. package/dist/pt-BR.mjs +16 -0
  129. package/dist/pt-BR.module.js +16 -0
  130. package/dist/pt-BR.module.js.map +1 -0
  131. package/dist/pt-PT.main.js +14 -0
  132. package/dist/pt-PT.main.js.map +1 -0
  133. package/dist/pt-PT.mjs +16 -0
  134. package/dist/pt-PT.module.js +16 -0
  135. package/dist/pt-PT.module.js.map +1 -0
  136. package/dist/ro-RO.main.js +14 -0
  137. package/dist/ro-RO.main.js.map +1 -0
  138. package/dist/ro-RO.mjs +16 -0
  139. package/dist/ro-RO.module.js +16 -0
  140. package/dist/ro-RO.module.js.map +1 -0
  141. package/dist/ru-RU.main.js +14 -0
  142. package/dist/ru-RU.main.js.map +1 -0
  143. package/dist/ru-RU.mjs +16 -0
  144. package/dist/ru-RU.module.js +16 -0
  145. package/dist/ru-RU.module.js.map +1 -0
  146. package/dist/sk-SK.main.js +14 -0
  147. package/dist/sk-SK.main.js.map +1 -0
  148. package/dist/sk-SK.mjs +16 -0
  149. package/dist/sk-SK.module.js +16 -0
  150. package/dist/sk-SK.module.js.map +1 -0
  151. package/dist/sl-SI.main.js +14 -0
  152. package/dist/sl-SI.main.js.map +1 -0
  153. package/dist/sl-SI.mjs +16 -0
  154. package/dist/sl-SI.module.js +16 -0
  155. package/dist/sl-SI.module.js.map +1 -0
  156. package/dist/sr-SP.main.js +14 -0
  157. package/dist/sr-SP.main.js.map +1 -0
  158. package/dist/sr-SP.mjs +16 -0
  159. package/dist/sr-SP.module.js +16 -0
  160. package/dist/sr-SP.module.js.map +1 -0
  161. package/dist/sv-SE.main.js +14 -0
  162. package/dist/sv-SE.main.js.map +1 -0
  163. package/dist/sv-SE.mjs +16 -0
  164. package/dist/sv-SE.module.js +16 -0
  165. package/dist/sv-SE.module.js.map +1 -0
  166. package/dist/tr-TR.main.js +14 -0
  167. package/dist/tr-TR.main.js.map +1 -0
  168. package/dist/tr-TR.mjs +16 -0
  169. package/dist/tr-TR.module.js +16 -0
  170. package/dist/tr-TR.module.js.map +1 -0
  171. package/dist/types.d.ts +87 -25
  172. package/dist/types.d.ts.map +1 -1
  173. package/dist/uk-UA.main.js +14 -0
  174. package/dist/uk-UA.main.js.map +1 -0
  175. package/dist/uk-UA.mjs +16 -0
  176. package/dist/uk-UA.module.js +16 -0
  177. package/dist/uk-UA.module.js.map +1 -0
  178. package/dist/useTable.main.js +113 -0
  179. package/dist/useTable.main.js.map +1 -0
  180. package/dist/useTable.mjs +108 -0
  181. package/dist/useTable.module.js +108 -0
  182. package/dist/useTable.module.js.map +1 -0
  183. package/dist/useTableCell.main.js +36 -0
  184. package/dist/useTableCell.main.js.map +1 -0
  185. package/dist/useTableCell.mjs +31 -0
  186. package/dist/useTableCell.module.js +31 -0
  187. package/dist/useTableCell.module.js.map +1 -0
  188. package/dist/useTableColumnHeader.main.js +93 -0
  189. package/dist/useTableColumnHeader.main.js.map +1 -0
  190. package/dist/useTableColumnHeader.mjs +88 -0
  191. package/dist/useTableColumnHeader.module.js +88 -0
  192. package/dist/useTableColumnHeader.module.js.map +1 -0
  193. package/dist/useTableColumnResize.main.js +216 -0
  194. package/dist/useTableColumnResize.main.js.map +1 -0
  195. package/dist/useTableColumnResize.mjs +211 -0
  196. package/dist/useTableColumnResize.module.js +211 -0
  197. package/dist/useTableColumnResize.module.js.map +1 -0
  198. package/dist/useTableHeaderRow.main.js +32 -0
  199. package/dist/useTableHeaderRow.main.js.map +1 -0
  200. package/dist/useTableHeaderRow.mjs +27 -0
  201. package/dist/useTableHeaderRow.module.js +27 -0
  202. package/dist/useTableHeaderRow.module.js.map +1 -0
  203. package/dist/useTableRow.main.js +81 -0
  204. package/dist/useTableRow.main.js.map +1 -0
  205. package/dist/useTableRow.mjs +76 -0
  206. package/dist/useTableRow.module.js +76 -0
  207. package/dist/useTableRow.module.js.map +1 -0
  208. package/dist/useTableSelectionCheckbox.main.js +56 -0
  209. package/dist/useTableSelectionCheckbox.main.js.map +1 -0
  210. package/dist/useTableSelectionCheckbox.mjs +50 -0
  211. package/dist/useTableSelectionCheckbox.module.js +50 -0
  212. package/dist/useTableSelectionCheckbox.module.js.map +1 -0
  213. package/dist/utils.main.js +43 -0
  214. package/dist/utils.main.js.map +1 -0
  215. package/dist/utils.mjs +35 -0
  216. package/dist/utils.module.js +35 -0
  217. package/dist/utils.module.js.map +1 -0
  218. package/dist/zh-CN.main.js +14 -0
  219. package/dist/zh-CN.main.js.map +1 -0
  220. package/dist/zh-CN.mjs +16 -0
  221. package/dist/zh-CN.module.js +16 -0
  222. package/dist/zh-CN.module.js.map +1 -0
  223. package/dist/zh-TW.main.js +14 -0
  224. package/dist/zh-TW.main.js.map +1 -0
  225. package/dist/zh-TW.mjs +16 -0
  226. package/dist/zh-TW.module.js +16 -0
  227. package/dist/zh-TW.module.js.map +1 -0
  228. package/package.json +25 -17
  229. package/src/TableKeyboardDelegate.ts +18 -10
  230. package/src/index.ts +21 -7
  231. package/src/useTable.ts +62 -42
  232. package/src/useTableCell.ts +19 -9
  233. package/src/useTableColumnHeader.ts +53 -17
  234. package/src/useTableColumnResize.ts +275 -0
  235. package/src/useTableHeaderRow.ts +10 -4
  236. package/src/useTableRow.ts +60 -7
  237. package/src/useTableSelectionCheckbox.ts +17 -22
  238. package/src/utils.ts +1 -1
  239. package/LICENSE +0 -201
@@ -0,0 +1,16 @@
1
+ var $52535c35c24ec937$exports = {};
2
+ $52535c35c24ec937$exports = {
3
+ "ascending": `\u{C624}\u{B984}\u{CC28}\u{C21C}`,
4
+ "ascendingSort": (args)=>`${args.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{C624}\u{B984}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,
5
+ "columnSize": (args)=>`${args.value} \u{D53D}\u{C140}`,
6
+ "descending": `\u{B0B4}\u{B9BC}\u{CC28}\u{C21C}`,
7
+ "descendingSort": (args)=>`${args.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{B0B4}\u{B9BC}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,
8
+ "resizerDescription": `\u{D06C}\u{AE30} \u{C870}\u{C815}\u{C744} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} Enter\u{B97C} \u{B204}\u{B974}\u{C138}\u{C694}.`,
9
+ "select": `\u{C120}\u{D0DD}`,
10
+ "selectAll": `\u{BAA8}\u{B450} \u{C120}\u{D0DD}`,
11
+ "sortable": `\u{C815}\u{B82C} \u{AC00}\u{B2A5}\u{D55C} \u{C5F4}`
12
+ };
13
+
14
+
15
+ export {$52535c35c24ec937$exports as default};
16
+ //# sourceMappingURL=ko-KR.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,gCAAI,CAAC;IACrC,iBAAiB,CAAC,OAAS,CAAC,EAAE,KAAK,UAAU,CAAC,4HAAmB,CAAC;IAClE,cAAc,CAAC,OAAS,CAAC,EAAE,KAAK,KAAK,CAAC,iBAAG,CAAC;IAC1C,cAAc,CAAC,gCAAI,CAAC;IACpB,kBAAkB,CAAC,OAAS,CAAC,EAAE,KAAK,UAAU,CAAC,4HAAmB,CAAC;IACnE,sBAAsB,CAAC,kIAAyB,CAAC;IACjD,UAAU,CAAC,gBAAE,CAAC;IACd,aAAa,CAAC,iCAAK,CAAC;IACpB,YAAY,CAAC,kDAAQ,CAAC;AACxB","sources":["packages/@react-aria/table/intl/ko-KR.json"],"sourcesContent":["{\n \"ascending\": \"오름차순\",\n \"ascendingSort\": \"{columnName} 열을 기준으로 오름차순으로 정렬됨\",\n \"columnSize\": \"{value} 픽셀\",\n \"descending\": \"내림차순\",\n \"descendingSort\": \"{columnName} 열을 기준으로 내림차순으로 정렬됨\",\n \"resizerDescription\": \"크기 조정을 시작하려면 Enter를 누르세요.\",\n \"select\": \"선택\",\n \"selectAll\": \"모두 선택\",\n \"sortable\": \"정렬 가능한 열\"\n}\n"],"names":[],"version":3,"file":"ko-KR.module.js.map"}
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ "ascending": `did\u{117}jan\u{10D}ia tvarka`,
3
+ "ascendingSort": (args)=>`surikiuota pagal stulpel\u{12F} ${args.columnName} did\u{117}jan\u{10D}ia tvarka`,
4
+ "columnSize": (args)=>`${args.value} piks.`,
5
+ "descending": `ma\u{17E}\u{117}jan\u{10D}ia tvarka`,
6
+ "descendingSort": (args)=>`surikiuota pagal stulpel\u{12F} ${args.columnName} ma\u{17E}\u{117}jan\u{10D}ia tvarka`,
7
+ "resizerDescription": `Paspauskite \u{201E}Enter\u{201C}, kad prad\u{117}tum\u{117}te keisti dyd\u{12F}`,
8
+ "select": `Pasirinkti`,
9
+ "selectAll": `Pasirinkti visk\u{105}`,
10
+ "sortable": `rikiuojamas stulpelis`
11
+ };
12
+
13
+
14
+ //# sourceMappingURL=lt-LT.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,aAAa,CAAC,6BAAiB,CAAC;IAClD,iBAAiB,CAAC,OAAS,CAAC,gCAA0B,EAAE,KAAK,UAAU,CAAC,8BAAkB,CAAC;IAC3F,cAAc,CAAC,OAAS,CAAC,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC;IAC7C,cAAc,CAAC,mCAAiB,CAAC;IACjC,kBAAkB,CAAC,OAAS,CAAC,gCAA0B,EAAE,KAAK,UAAU,CAAC,oCAAkB,CAAC;IAC5F,sBAAsB,CAAC,gFAAgD,CAAC;IACxE,UAAU,CAAC,UAAU,CAAC;IACtB,aAAa,CAAC,sBAAgB,CAAC;IAC/B,YAAY,CAAC,qBAAqB,CAAC;AACrC","sources":["packages/@react-aria/table/intl/lt-LT.json"],"sourcesContent":["{\n \"ascending\": \"didėjančia tvarka\",\n \"ascendingSort\": \"surikiuota pagal stulpelį {columnName} didėjančia tvarka\",\n \"columnSize\": \"{value} piks.\",\n \"descending\": \"mažėjančia tvarka\",\n \"descendingSort\": \"surikiuota pagal stulpelį {columnName} mažėjančia tvarka\",\n \"resizerDescription\": \"Paspauskite „Enter“, kad pradėtumėte keisti dydį\",\n \"select\": \"Pasirinkti\",\n \"selectAll\": \"Pasirinkti viską\",\n \"sortable\": \"rikiuojamas stulpelis\"\n}\n"],"names":[],"version":3,"file":"lt-LT.main.js.map"}
package/dist/lt-LT.mjs ADDED
@@ -0,0 +1,16 @@
1
+ var $b37ee03672edfd1d$exports = {};
2
+ $b37ee03672edfd1d$exports = {
3
+ "ascending": `did\u{117}jan\u{10D}ia tvarka`,
4
+ "ascendingSort": (args)=>`surikiuota pagal stulpel\u{12F} ${args.columnName} did\u{117}jan\u{10D}ia tvarka`,
5
+ "columnSize": (args)=>`${args.value} piks.`,
6
+ "descending": `ma\u{17E}\u{117}jan\u{10D}ia tvarka`,
7
+ "descendingSort": (args)=>`surikiuota pagal stulpel\u{12F} ${args.columnName} ma\u{17E}\u{117}jan\u{10D}ia tvarka`,
8
+ "resizerDescription": `Paspauskite \u{201E}Enter\u{201C}, kad prad\u{117}tum\u{117}te keisti dyd\u{12F}`,
9
+ "select": `Pasirinkti`,
10
+ "selectAll": `Pasirinkti visk\u{105}`,
11
+ "sortable": `rikiuojamas stulpelis`
12
+ };
13
+
14
+
15
+ export {$b37ee03672edfd1d$exports as default};
16
+ //# sourceMappingURL=lt-LT.module.js.map
@@ -0,0 +1,16 @@
1
+ var $b37ee03672edfd1d$exports = {};
2
+ $b37ee03672edfd1d$exports = {
3
+ "ascending": `did\u{117}jan\u{10D}ia tvarka`,
4
+ "ascendingSort": (args)=>`surikiuota pagal stulpel\u{12F} ${args.columnName} did\u{117}jan\u{10D}ia tvarka`,
5
+ "columnSize": (args)=>`${args.value} piks.`,
6
+ "descending": `ma\u{17E}\u{117}jan\u{10D}ia tvarka`,
7
+ "descendingSort": (args)=>`surikiuota pagal stulpel\u{12F} ${args.columnName} ma\u{17E}\u{117}jan\u{10D}ia tvarka`,
8
+ "resizerDescription": `Paspauskite \u{201E}Enter\u{201C}, kad prad\u{117}tum\u{117}te keisti dyd\u{12F}`,
9
+ "select": `Pasirinkti`,
10
+ "selectAll": `Pasirinkti visk\u{105}`,
11
+ "sortable": `rikiuojamas stulpelis`
12
+ };
13
+
14
+
15
+ export {$b37ee03672edfd1d$exports as default};
16
+ //# sourceMappingURL=lt-LT.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,6BAAiB,CAAC;IAClD,iBAAiB,CAAC,OAAS,CAAC,gCAA0B,EAAE,KAAK,UAAU,CAAC,8BAAkB,CAAC;IAC3F,cAAc,CAAC,OAAS,CAAC,EAAE,KAAK,KAAK,CAAC,MAAM,CAAC;IAC7C,cAAc,CAAC,mCAAiB,CAAC;IACjC,kBAAkB,CAAC,OAAS,CAAC,gCAA0B,EAAE,KAAK,UAAU,CAAC,oCAAkB,CAAC;IAC5F,sBAAsB,CAAC,gFAAgD,CAAC;IACxE,UAAU,CAAC,UAAU,CAAC;IACtB,aAAa,CAAC,sBAAgB,CAAC;IAC/B,YAAY,CAAC,qBAAqB,CAAC;AACrC","sources":["packages/@react-aria/table/intl/lt-LT.json"],"sourcesContent":["{\n \"ascending\": \"didėjančia tvarka\",\n \"ascendingSort\": \"surikiuota pagal stulpelį {columnName} didėjančia tvarka\",\n \"columnSize\": \"{value} piks.\",\n \"descending\": \"mažėjančia tvarka\",\n \"descendingSort\": \"surikiuota pagal stulpelį {columnName} mažėjančia tvarka\",\n \"resizerDescription\": \"Paspauskite „Enter“, kad pradėtumėte keisti dydį\",\n \"select\": \"Pasirinkti\",\n \"selectAll\": \"Pasirinkti viską\",\n \"sortable\": \"rikiuojamas stulpelis\"\n}\n"],"names":[],"version":3,"file":"lt-LT.module.js.map"}
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ "ascending": `augo\u{161}\u{101} sec\u{12B}b\u{101}`,
3
+ "ascendingSort": (args)=>`k\u{101}rtots p\u{113}c kolonnas ${args.columnName} augo\u{161}\u{101} sec\u{12B}b\u{101}`,
4
+ "columnSize": (args)=>`${args.value} pikse\u{13C}i`,
5
+ "descending": `dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,
6
+ "descendingSort": (args)=>`k\u{101}rtots p\u{113}c kolonnas ${args.columnName} dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,
7
+ "resizerDescription": `Nospiediet Enter, lai s\u{101}ktu izm\u{113}ru main\u{12B}\u{161}anu`,
8
+ "select": `Atlas\u{12B}t`,
9
+ "selectAll": `Atlas\u{12B}t visu`,
10
+ "sortable": `k\u{101}rtojam\u{101} kolonna`
11
+ };
12
+
13
+
14
+ //# sourceMappingURL=lv-LV.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,aAAa,CAAC,qCAAa,CAAC;IAC9C,iBAAiB,CAAC,OAAS,CAAC,iCAAqB,EAAE,KAAK,UAAU,CAAC,sCAAc,CAAC;IAClF,cAAc,CAAC,OAAS,CAAC,EAAE,KAAK,KAAK,CAAC,cAAQ,CAAC;IAC/C,cAAc,CAAC,uCAAe,CAAC;IAC/B,kBAAkB,CAAC,OAAS,CAAC,iCAAqB,EAAE,KAAK,UAAU,CAAC,wCAAgB,CAAC;IACrF,sBAAsB,CAAC,oEAA4C,CAAC;IACpE,UAAU,CAAC,aAAO,CAAC;IACnB,aAAa,CAAC,kBAAY,CAAC;IAC3B,YAAY,CAAC,6BAAiB,CAAC;AACjC","sources":["packages/@react-aria/table/intl/lv-LV.json"],"sourcesContent":["{\n \"ascending\": \"augošā secībā\",\n \"ascendingSort\": \"kārtots pēc kolonnas {columnName} augošā secībā\",\n \"columnSize\": \"{value} pikseļi\",\n \"descending\": \"dilstošā secībā\",\n \"descendingSort\": \"kārtots pēc kolonnas {columnName} dilstošā secībā\",\n \"resizerDescription\": \"Nospiediet Enter, lai sāktu izmēru mainīšanu\",\n \"select\": \"Atlasīt\",\n \"selectAll\": \"Atlasīt visu\",\n \"sortable\": \"kārtojamā kolonna\"\n}\n"],"names":[],"version":3,"file":"lv-LV.main.js.map"}
package/dist/lv-LV.mjs ADDED
@@ -0,0 +1,16 @@
1
+ var $c7df6686b4189d56$exports = {};
2
+ $c7df6686b4189d56$exports = {
3
+ "ascending": `augo\u{161}\u{101} sec\u{12B}b\u{101}`,
4
+ "ascendingSort": (args)=>`k\u{101}rtots p\u{113}c kolonnas ${args.columnName} augo\u{161}\u{101} sec\u{12B}b\u{101}`,
5
+ "columnSize": (args)=>`${args.value} pikse\u{13C}i`,
6
+ "descending": `dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,
7
+ "descendingSort": (args)=>`k\u{101}rtots p\u{113}c kolonnas ${args.columnName} dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,
8
+ "resizerDescription": `Nospiediet Enter, lai s\u{101}ktu izm\u{113}ru main\u{12B}\u{161}anu`,
9
+ "select": `Atlas\u{12B}t`,
10
+ "selectAll": `Atlas\u{12B}t visu`,
11
+ "sortable": `k\u{101}rtojam\u{101} kolonna`
12
+ };
13
+
14
+
15
+ export {$c7df6686b4189d56$exports as default};
16
+ //# sourceMappingURL=lv-LV.module.js.map
@@ -0,0 +1,16 @@
1
+ var $c7df6686b4189d56$exports = {};
2
+ $c7df6686b4189d56$exports = {
3
+ "ascending": `augo\u{161}\u{101} sec\u{12B}b\u{101}`,
4
+ "ascendingSort": (args)=>`k\u{101}rtots p\u{113}c kolonnas ${args.columnName} augo\u{161}\u{101} sec\u{12B}b\u{101}`,
5
+ "columnSize": (args)=>`${args.value} pikse\u{13C}i`,
6
+ "descending": `dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,
7
+ "descendingSort": (args)=>`k\u{101}rtots p\u{113}c kolonnas ${args.columnName} dilsto\u{161}\u{101} sec\u{12B}b\u{101}`,
8
+ "resizerDescription": `Nospiediet Enter, lai s\u{101}ktu izm\u{113}ru main\u{12B}\u{161}anu`,
9
+ "select": `Atlas\u{12B}t`,
10
+ "selectAll": `Atlas\u{12B}t visu`,
11
+ "sortable": `k\u{101}rtojam\u{101} kolonna`
12
+ };
13
+
14
+
15
+ export {$c7df6686b4189d56$exports as default};
16
+ //# sourceMappingURL=lv-LV.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,qCAAa,CAAC;IAC9C,iBAAiB,CAAC,OAAS,CAAC,iCAAqB,EAAE,KAAK,UAAU,CAAC,sCAAc,CAAC;IAClF,cAAc,CAAC,OAAS,CAAC,EAAE,KAAK,KAAK,CAAC,cAAQ,CAAC;IAC/C,cAAc,CAAC,uCAAe,CAAC;IAC/B,kBAAkB,CAAC,OAAS,CAAC,iCAAqB,EAAE,KAAK,UAAU,CAAC,wCAAgB,CAAC;IACrF,sBAAsB,CAAC,oEAA4C,CAAC;IACpE,UAAU,CAAC,aAAO,CAAC;IACnB,aAAa,CAAC,kBAAY,CAAC;IAC3B,YAAY,CAAC,6BAAiB,CAAC;AACjC","sources":["packages/@react-aria/table/intl/lv-LV.json"],"sourcesContent":["{\n \"ascending\": \"augošā secībā\",\n \"ascendingSort\": \"kārtots pēc kolonnas {columnName} augošā secībā\",\n \"columnSize\": \"{value} pikseļi\",\n \"descending\": \"dilstošā secībā\",\n \"descendingSort\": \"kārtots pēc kolonnas {columnName} dilstošā secībā\",\n \"resizerDescription\": \"Nospiediet Enter, lai sāktu izmēru mainīšanu\",\n \"select\": \"Atlasīt\",\n \"selectAll\": \"Atlasīt visu\",\n \"sortable\": \"kārtojamā kolonna\"\n}\n"],"names":[],"version":3,"file":"lv-LV.module.js.map"}
package/dist/main.js CHANGED
@@ -1,41 +1,26 @@
1
- var {
2
- usePress
3
- } = require("@react-aria/interactions");
4
-
5
- var {
6
- useFocusable
7
- } = require("@react-aria/focus");
8
-
9
- var {
10
- useId,
11
- mergeProps
12
- } = require("@react-aria/utils");
13
-
14
- var {
15
- useCollator,
16
- useLocale
17
- } = require("@react-aria/i18n");
18
-
19
- var {
20
- useMemo
21
- } = require("react");
22
-
23
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
24
-
25
- var {
26
- useGridRowGroup,
27
- useGrid,
28
- GridKeyboardDelegate,
29
- useGridCell,
30
- useGridRow
31
- } = require("@react-aria/grid");
32
-
33
- exports.useTableRowGroup = useGridRowGroup;
34
-
35
- function $parcel$interopDefault(a) {
36
- return a && a.__esModule ? a.default : a;
37
- }
38
-
1
+ var $25d14c0f8fad722e$exports = require("./useTable.main.js");
2
+ var $7669c34a63ef0113$exports = require("./useTableColumnHeader.main.js");
3
+ var $10b2115217af7c93$exports = require("./useTableRow.main.js");
4
+ var $eb16c38321a72835$exports = require("./useTableHeaderRow.main.js");
5
+ var $32387a1f2c61cda2$exports = require("./useTableCell.main.js");
6
+ var $0b394e4562ac57c9$exports = require("./useTableSelectionCheckbox.main.js");
7
+ var $16d645f9e2153641$exports = require("./useTableColumnResize.main.js");
8
+ var $kJQf8$reactariagrid = require("@react-aria/grid");
9
+
10
+
11
+ function $parcel$export(e, n, v, s) {
12
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
+ }
14
+
15
+ $parcel$export(module.exports, "useTableRowGroup", () => $cd66afe5decb6adb$export$6fb1613bd7b28198);
16
+ $parcel$export(module.exports, "useTable", () => $25d14c0f8fad722e$exports.useTable);
17
+ $parcel$export(module.exports, "useTableColumnHeader", () => $7669c34a63ef0113$exports.useTableColumnHeader);
18
+ $parcel$export(module.exports, "useTableRow", () => $10b2115217af7c93$exports.useTableRow);
19
+ $parcel$export(module.exports, "useTableHeaderRow", () => $eb16c38321a72835$exports.useTableHeaderRow);
20
+ $parcel$export(module.exports, "useTableCell", () => $32387a1f2c61cda2$exports.useTableCell);
21
+ $parcel$export(module.exports, "useTableSelectionCheckbox", () => $0b394e4562ac57c9$exports.useTableSelectionCheckbox);
22
+ $parcel$export(module.exports, "useTableSelectAllCheckbox", () => $0b394e4562ac57c9$exports.useTableSelectAllCheckbox);
23
+ $parcel$export(module.exports, "useTableColumnResize", () => $16d645f9e2153641$exports.useTableColumnResize);
39
24
  /*
40
25
  * Copyright 2020 Adobe. All rights reserved.
41
26
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -46,475 +31,17 @@ function $parcel$interopDefault(a) {
46
31
  * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
47
32
  * OF ANY KIND, either express or implied. See the License for the specific language
48
33
  * governing permissions and limitations under the License.
49
- */
50
- const $b62c6c69dd91ba8b8df7cfb5ba576$export$gridIds = new WeakMap();
34
+ */
51
35
 
52
- function $b62c6c69dd91ba8b8df7cfb5ba576$var$normalizeKey(key) {
53
- if (typeof key === 'string') {
54
- return key.replace(/\s*/g, '');
55
- }
56
36
 
57
- return '' + key;
58
- }
59
37
 
60
- function $b62c6c69dd91ba8b8df7cfb5ba576$export$getColumnHeaderId(state, columnKey) {
61
- let gridId = $b62c6c69dd91ba8b8df7cfb5ba576$export$gridIds.get(state);
62
38
 
63
- if (!gridId) {
64
- throw new Error('Unknown grid');
65
- }
66
39
 
67
- return gridId + "-" + $b62c6c69dd91ba8b8df7cfb5ba576$var$normalizeKey(columnKey);
68
- }
69
40
 
70
- function $b62c6c69dd91ba8b8df7cfb5ba576$export$getCellId(state, rowKey, columnKey) {
71
- let gridId = $b62c6c69dd91ba8b8df7cfb5ba576$export$gridIds.get(state);
72
-
73
- if (!gridId) {
74
- throw new Error('Unknown grid');
75
- }
76
-
77
- return gridId + "-" + $b62c6c69dd91ba8b8df7cfb5ba576$var$normalizeKey(rowKey) + "-" + $b62c6c69dd91ba8b8df7cfb5ba576$var$normalizeKey(columnKey);
78
- }
79
41
 
80
- function $b62c6c69dd91ba8b8df7cfb5ba576$export$getRowLabelledBy(state, rowKey) {
81
- // A row is labelled by it's row headers.
82
- return [...state.collection.rowHeaderColumnKeys].map(columnKey => $b62c6c69dd91ba8b8df7cfb5ba576$export$getCellId(state, rowKey, columnKey)).join(' ');
42
+ function $cd66afe5decb6adb$export$6fb1613bd7b28198() {
43
+ return (0, $kJQf8$reactariagrid.useGridRowGroup)();
83
44
  }
84
45
 
85
- class $d19e2fa944f991da21b1694810eb968d$export$TableKeyboardDelegate extends GridKeyboardDelegate {
86
- isCell(node) {
87
- return node.type === 'cell' || node.type === 'rowheader' || node.type === 'column';
88
- }
89
-
90
- getKeyBelow(key) {
91
- let startItem = this.collection.getItem(key);
92
-
93
- if (!startItem) {
94
- return;
95
- } // If focus was on a column, then focus the first child column if any,
96
- // or find the corresponding cell in the first row.
97
-
98
-
99
- if (startItem.type === 'column') {
100
- let child = [...startItem.childNodes][0];
101
-
102
- if (child) {
103
- return child.key;
104
- }
105
-
106
- let firstItem = this.collection.getItem(this.getFirstKey());
107
- return [...firstItem.childNodes][startItem.index].key;
108
- }
109
-
110
- return super.getKeyBelow(key);
111
- }
112
-
113
- getKeyAbove(key) {
114
- let startItem = this.collection.getItem(key);
115
-
116
- if (!startItem) {
117
- return;
118
- } // If focus was on a column, focus the parent column if any
119
-
120
-
121
- if (startItem.type === 'column') {
122
- let parent = this.collection.getItem(startItem.parentKey);
123
-
124
- if (parent && parent.type === 'column') {
125
- return parent.key;
126
- }
127
-
128
- return;
129
- } // only return above row key if not header row
130
-
131
-
132
- let superKey = super.getKeyAbove(key);
133
-
134
- if (superKey && this.collection.getItem(superKey).type !== 'headerrow') {
135
- return superKey;
136
- } // If no item was found, and focus was on a cell, then focus the
137
- // corresponding column header.
138
-
139
-
140
- if (this.isCell(startItem)) {
141
- return this.collection.columns[startItem.index].key;
142
- } // If focus was on a row, then focus the first column header.
143
-
144
-
145
- return this.collection.columns[0].key;
146
- }
147
-
148
- findNextColumnKey(column) {
149
- // Search following columns
150
- let key = this.findNextKey(column.key, item => item.type === 'column');
151
-
152
- if (key != null) {
153
- return key;
154
- } // Wrap around to the first column
155
-
156
-
157
- let row = this.collection.headerRows[column.level];
158
-
159
- for (let item of row.childNodes) {
160
- if (item.type === 'column') {
161
- return item.key;
162
- }
163
- }
164
- }
165
-
166
- findPreviousColumnKey(column) {
167
- // Search previous columns
168
- let key = this.findPreviousKey(column.key, item => item.type === 'column');
169
-
170
- if (key != null) {
171
- return key;
172
- } // Wrap around to the last column
173
-
174
-
175
- let row = this.collection.headerRows[column.level];
176
- let childNodes = [...row.childNodes];
177
-
178
- for (let i = childNodes.length - 1; i >= 0; i--) {
179
- let item = childNodes[i];
180
-
181
- if (item.type === 'column') {
182
- return item.key;
183
- }
184
- }
185
- }
186
-
187
- getKeyRightOf(key) {
188
- let item = this.collection.getItem(key);
189
-
190
- if (!item) {
191
- return;
192
- } // If focus was on a column, then focus the next column
193
-
194
-
195
- if (item.type === 'column') {
196
- return this.direction === 'rtl' ? this.findPreviousColumnKey(item) : this.findNextColumnKey(item);
197
- }
198
-
199
- return super.getKeyRightOf(key);
200
- }
201
-
202
- getKeyLeftOf(key) {
203
- let item = this.collection.getItem(key);
204
-
205
- if (!item) {
206
- return;
207
- } // If focus was on a column, then focus the previous column
208
-
209
-
210
- if (item.type === 'column') {
211
- return this.direction === 'rtl' ? this.findNextColumnKey(item) : this.findPreviousColumnKey(item);
212
- }
213
-
214
- return super.getKeyLeftOf(key);
215
- }
216
-
217
- getKeyForSearch(search, fromKey) {
218
- if (!this.collator) {
219
- return null;
220
- }
221
-
222
- let collection = this.collection;
223
- let key = fromKey != null ? fromKey : this.getFirstKey(); // If the starting key is a cell, search from its parent row.
224
-
225
- let startItem = collection.getItem(key);
226
-
227
- if (startItem.type === 'cell') {
228
- key = startItem.parentKey;
229
- }
230
-
231
- let hasWrapped = false;
232
-
233
- while (key != null) {
234
- let item = collection.getItem(key); // Check each of the row header cells in this row for a match
235
-
236
- for (let cell of item.childNodes) {
237
- let column = collection.columns[cell.index];
238
-
239
- if (collection.rowHeaderColumnKeys.has(column.key) && cell.textValue) {
240
- let substring = cell.textValue.slice(0, search.length);
241
-
242
- if (this.collator.compare(substring, search) === 0) {
243
- // If we started on a cell, end on the matching cell. Otherwise, end on the row.
244
- let fromItem = fromKey != null ? collection.getItem(fromKey) : startItem;
245
- return fromItem.type === 'cell' ? cell.key : item.key;
246
- }
247
- }
248
- }
249
-
250
- key = this.getKeyBelow(key); // Wrap around when reaching the end of the collection
251
-
252
- if (key == null && !hasWrapped) {
253
- key = this.getFirstKey();
254
- hasWrapped = true;
255
- }
256
- }
257
-
258
- return null;
259
- }
260
-
261
- }
262
-
263
- /**
264
- * Provides the behavior and accessibility implementation for a table component.
265
- * A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys,
266
- * and optionally supports row selection and sorting.
267
- * @param props - Props for the table.
268
- * @param state - State for the table, as returned by `useTableState`.
269
- * @param ref - The ref attached to the table element.
270
- */
271
- function useTable(props, state, ref) {
272
- let {
273
- keyboardDelegate,
274
- isVirtualized,
275
- layout
276
- } = props; // By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
277
- // When virtualized, the layout object will be passed in as a prop and override this.
278
-
279
- let collator = useCollator({
280
- usage: 'search',
281
- sensitivity: 'base'
282
- });
283
- let {
284
- direction
285
- } = useLocale();
286
- let delegate = useMemo(() => keyboardDelegate || new $d19e2fa944f991da21b1694810eb968d$export$TableKeyboardDelegate({
287
- collection: state.collection,
288
- disabledKeys: state.disabledKeys,
289
- ref,
290
- direction,
291
- collator,
292
- layout
293
- }), [keyboardDelegate, state.collection, state.disabledKeys, ref, direction, collator, layout]);
294
- let id = useId();
295
- $b62c6c69dd91ba8b8df7cfb5ba576$export$gridIds.set(state, id);
296
- let {
297
- gridProps
298
- } = useGrid(_babelRuntimeHelpersExtends({}, props, {
299
- id,
300
- keyboardDelegate: delegate,
301
-
302
- getRowText(key) {
303
- let added = state.collection.getItem(key); // If the row has a textValue, use that.
304
-
305
- if (added.textValue != null) {
306
- return added.textValue;
307
- } // Otherwise combine the text of each of the row header columns.
308
-
309
-
310
- let rowHeaderColumnKeys = state.collection.rowHeaderColumnKeys;
311
-
312
- if (rowHeaderColumnKeys) {
313
- let text = [];
314
-
315
- for (let cell of added.childNodes) {
316
- let column = state.collection.columns[cell.index];
317
-
318
- if (rowHeaderColumnKeys.has(column.key) && cell.textValue) {
319
- text.push(cell.textValue);
320
- }
321
-
322
- if (text.length === rowHeaderColumnKeys.size) {
323
- break;
324
- }
325
- }
326
-
327
- return text.join(' ');
328
- }
329
-
330
- return '';
331
- }
332
-
333
- }), state, ref); // Override to include header rows
334
-
335
- if (isVirtualized) {
336
- gridProps['aria-rowcount'] = state.collection.size + state.collection.headerRows.length;
337
- }
338
-
339
- return {
340
- gridProps
341
- };
342
- }
343
-
344
- exports.useTable = useTable;
345
-
346
- /**
347
- * Provides the behavior and accessibility implementation for a column header in a table.
348
- * @param props - Props for the column header.
349
- * @param state - State of the table, as returned by `useTableState`.
350
- * @param ref - The ref attached to the column header element.
351
- */
352
- function useTableColumnHeader(props, state, ref) {
353
- let {
354
- node
355
- } = props;
356
- let {
357
- gridCellProps
358
- } = useGridCell(props, state, ref);
359
- let isSelectionCellDisabled = node.props.isSelectionCell && state.selectionManager.selectionMode === 'single';
360
- let {
361
- pressProps
362
- } = usePress({
363
- isDisabled: !node.props.allowsSorting || isSelectionCellDisabled,
364
-
365
- onPress() {
366
- state.sort(node.key);
367
- }
368
-
369
- }); // Needed to pick up the focusable context, enabling things like Tooltips for example
370
-
371
- let {
372
- focusableProps
373
- } = useFocusable({}, ref);
374
- let ariaSort = null;
375
-
376
- if (node.props.allowsSorting) {
377
- var _state$sortDescriptor;
378
-
379
- ariaSort = ((_state$sortDescriptor = state.sortDescriptor) == null ? void 0 : _state$sortDescriptor.column) === node.key ? state.sortDescriptor.direction : 'none';
380
- }
381
-
382
- return {
383
- columnHeaderProps: _babelRuntimeHelpersExtends({}, mergeProps(gridCellProps, pressProps, focusableProps), {
384
- role: 'columnheader',
385
- id: $b62c6c69dd91ba8b8df7cfb5ba576$export$getColumnHeaderId(state, node.key),
386
- 'aria-colspan': node.colspan && node.colspan > 1 ? node.colspan : null,
387
- 'aria-sort': ariaSort,
388
- 'aria-disabled': isSelectionCellDisabled || undefined
389
- })
390
- };
391
- }
392
-
393
- exports.useTableColumnHeader = useTableColumnHeader;
394
-
395
- /**
396
- * Provides the behavior and accessibility implementation for a row in a table.
397
- * @param props - Props for the row.
398
- * @param state - State of the table, as returned by `useTableState`.
399
- */
400
- function useTableRow(props, state, ref) {
401
- let {
402
- node
403
- } = props;
404
- let {
405
- rowProps
406
- } = useGridRow(props, state, ref);
407
- return {
408
- rowProps: _babelRuntimeHelpersExtends({}, rowProps, {
409
- 'aria-labelledby': $b62c6c69dd91ba8b8df7cfb5ba576$export$getRowLabelledBy(state, node.key)
410
- })
411
- };
412
- }
413
-
414
- exports.useTableRow = useTableRow;
415
-
416
- /**
417
- * Provides the behavior and accessibility implementation for a header row in a table.
418
- * @param props - Props for the row.
419
- * @param state - State of the table, as returned by `useTableState`.
420
- */
421
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
422
- function useTableHeaderRow(props, state, ref) {
423
- let {
424
- node,
425
- isVirtualized
426
- } = props;
427
- let rowProps = {
428
- role: 'row'
429
- };
430
-
431
- if (isVirtualized) {
432
- rowProps['aria-rowindex'] = node.index + 1; // aria-rowindex is 1 based
433
- }
434
-
435
- return {
436
- rowProps
437
- };
438
- }
439
-
440
- exports.useTableHeaderRow = useTableHeaderRow;
441
-
442
- /**
443
- * Provides the behavior and accessibility implementation for a cell in a table.
444
- * @param props - Props for the cell.
445
- * @param state - State of the table, as returned by `useTableState`.
446
- * @param ref - The ref attached to the cell element.
447
- */
448
- function useTableCell(props, state, ref) {
449
- let {
450
- gridCellProps
451
- } = useGridCell(props, state, ref);
452
- let columnKey = props.node.column.key;
453
-
454
- if (state.collection.rowHeaderColumnKeys.has(columnKey)) {
455
- gridCellProps.role = 'rowheader';
456
- gridCellProps.id = $b62c6c69dd91ba8b8df7cfb5ba576$export$getCellId(state, props.node.parentKey, columnKey);
457
- }
458
-
459
- return {
460
- gridCellProps
461
- };
462
- }
463
-
464
- exports.useTableCell = useTableCell;
465
-
466
- /**
467
- * Provides the behavior and accessibility implementation for a selection checkbox in a table.
468
- * @param props - Props for the selection checkbox.
469
- * @param state - State of the table, as returned by `useTableState`.
470
- */
471
- function useTableSelectionCheckbox(props, state) {
472
- let {
473
- key
474
- } = props;
475
- let manager = state.selectionManager;
476
- let checkboxId = useId();
477
- let isDisabled = state.disabledKeys.has(key);
478
- let isSelected = state.selectionManager.isSelected(key);
479
-
480
- let onChange = () => manager.select(key);
481
-
482
- return {
483
- checkboxProps: {
484
- id: checkboxId,
485
- 'aria-label': 'Select',
486
- 'aria-labelledby': checkboxId + " " + $b62c6c69dd91ba8b8df7cfb5ba576$export$getRowLabelledBy(state, key),
487
- isSelected,
488
- isDisabled: isDisabled || manager.selectionMode === 'none',
489
- onChange
490
- }
491
- };
492
- }
493
- /**
494
- * Provides the behavior and accessibility implementation for the select all checkbox in a table.
495
- * @param props - Props for the select all checkbox.
496
- * @param state - State of the table, as returned by `useTableState`.
497
- */
498
-
499
-
500
- exports.useTableSelectionCheckbox = useTableSelectionCheckbox;
501
-
502
- function useTableSelectAllCheckbox(state) {
503
- let {
504
- isEmpty,
505
- isSelectAll,
506
- selectionMode
507
- } = state.selectionManager;
508
- return {
509
- checkboxProps: {
510
- 'aria-label': 'Select All',
511
- isSelected: isSelectAll,
512
- isDisabled: selectionMode !== 'multiple',
513
- isIndeterminate: !isEmpty && !isSelectAll,
514
- onChange: () => state.selectionManager.toggleSelectAll()
515
- }
516
- };
517
- }
518
46
 
519
- exports.useTableSelectAllCheckbox = useTableSelectAllCheckbox;
520
47
  //# sourceMappingURL=main.js.map