@economic/taco 2.18.0 → 2.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (359) hide show
  1. package/dist/components/Provider/Localization.d.ts +18 -0
  2. package/dist/components/Report/components/Body/Body.d.ts +8 -0
  3. package/dist/components/Report/components/Cell/Cell.d.ts +3 -0
  4. package/dist/components/Report/components/Cell/DisplayCell.d.ts +7 -0
  5. package/dist/components/Report/components/Cell/GroupedCell.d.ts +7 -0
  6. package/dist/components/Report/components/Cell/util.d.ts +18 -0
  7. package/dist/components/Report/components/Footer/Footer.d.ts +6 -0
  8. package/dist/components/Report/components/Footer/Summary.d.ts +7 -0
  9. package/dist/components/Report/components/Header/Header.d.ts +37 -0
  10. package/dist/components/Report/components/Header/components/Goto.d.ts +6 -0
  11. package/dist/components/Report/components/Header/components/Menu.d.ts +17 -0
  12. package/dist/components/Report/components/Header/components/Resizer.d.ts +12 -0
  13. package/dist/components/Report/components/Header/components/SortIndicator.d.ts +15 -0
  14. package/dist/components/Report/components/Header/util.d.ts +4 -0
  15. package/dist/components/Report/components/Internal/Actions.d.ts +13 -0
  16. package/dist/components/Report/components/Internal/Expansion.d.ts +4 -0
  17. package/dist/components/Report/components/Internal/Selection.d.ts +4 -0
  18. package/dist/components/Report/components/Row/DisplayRow.d.ts +16 -0
  19. package/dist/components/Report/components/Row/Row.d.ts +8 -0
  20. package/dist/components/Report/components/Row/RowContext.d.ts +9 -0
  21. package/dist/components/Report/components/Row/SkeletonRow.d.ts +10 -0
  22. package/dist/components/Report/components/Toolbar/Toolbar.d.ts +15 -0
  23. package/dist/components/Report/components/Toolbar/components/Filters/Filters.d.ts +7 -0
  24. package/dist/components/Report/components/Toolbar/components/Filters/ManageFiltersPopover.d.ts +7 -0
  25. package/dist/components/Report/components/Toolbar/components/Filters/components/Filter.d.ts +12 -0
  26. package/dist/components/Report/components/Toolbar/components/Filters/components/FilterColumn.d.ts +9 -0
  27. package/dist/components/Report/components/Toolbar/components/Filters/components/FilterComparator.d.ts +7 -0
  28. package/dist/components/Report/components/Toolbar/components/Filters/components/FilterValue.d.ts +10 -0
  29. package/dist/components/Report/components/Toolbar/components/Filters/components/Placeholder.d.ts +12 -0
  30. package/dist/components/Report/components/Toolbar/components/Filters/util.d.ts +2 -0
  31. package/dist/components/Report/components/Toolbar/components/Print/Print.d.ts +9 -0
  32. package/dist/components/Report/components/Toolbar/components/Print/PrintDialog.d.ts +17 -0
  33. package/dist/components/Report/components/Toolbar/components/Search/Search.d.ts +8 -0
  34. package/dist/components/Report/components/Toolbar/components/Settings/HideOrOrderPopover.d.ts +7 -0
  35. package/dist/components/Report/components/Toolbar/components/Settings/Settings.d.ts +8 -0
  36. package/dist/components/Report/features/useReportExport.d.ts +3 -0
  37. package/dist/components/Report/styles/useColumnPinningStylesheet.d.ts +2 -0
  38. package/dist/components/Report/styles/useCssGridStylesheet.d.ts +3 -0
  39. package/dist/components/Report/styles/useStylesheet.d.ts +3 -0
  40. package/dist/components/Report/styles/util.d.ts +3 -0
  41. package/dist/components/Report/types.d.ts +20 -0
  42. package/dist/components/Report/useReport.d.ts +14 -0
  43. package/dist/components/Report/util/rows.d.ts +7 -0
  44. package/dist/components/Report/util/useTableGlobalShortcuts.d.ts +4 -0
  45. package/dist/components/Report/util/useTableRenderer.d.ts +9 -0
  46. package/dist/components/Select2/Select2.d.ts +2 -0
  47. package/dist/components/Select2/components/Context.d.ts +2 -0
  48. package/dist/components/Select2/components/Group.d.ts +2 -0
  49. package/dist/components/Select2/components/Option.d.ts +3 -0
  50. package/dist/components/Table3/Table3.d.ts +1 -1
  51. package/dist/components/Table3/components/rows/Row.d.ts +1 -1
  52. package/dist/components/Table3/components/toolbar/FontSize.d.ts +0 -4
  53. package/dist/components/Table3/hooks/features/usePrinting.d.ts +7 -0
  54. package/dist/components/Table3/hooks/useCssGrid.d.ts +2 -2
  55. package/dist/components/Table3/hooks/useCssVars.d.ts +3 -2
  56. package/dist/components/Table3/hooks/useTable.d.ts +5 -5
  57. package/dist/components/Table3/types.d.ts +23 -5
  58. package/dist/esm/index.css +12 -12
  59. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +1 -1
  60. package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
  61. package/dist/esm/packages/taco/src/components/Alert/Alert.js +1 -1
  62. package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
  63. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +1 -1
  64. package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
  65. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
  66. package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
  67. package/dist/esm/packages/taco/src/components/Badge/Badge.js +1 -1
  68. package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
  69. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +1 -1
  70. package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
  71. package/dist/esm/packages/taco/src/components/Banner/Banner.js +2 -2
  72. package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
  73. package/dist/esm/packages/taco/src/components/Button/Button.js +1 -1
  74. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  75. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +1 -1
  76. package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
  77. package/dist/esm/packages/taco/src/components/Card/Card.js +2 -2
  78. package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
  79. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +1 -1
  80. package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
  81. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +1 -1
  82. package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
  83. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +1 -1
  84. package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
  85. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +5 -5
  86. package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
  87. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +1 -1
  88. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
  89. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +1 -1
  90. package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
  91. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +1 -1
  92. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
  93. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +1 -1
  94. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
  95. package/dist/esm/packages/taco/src/components/Drawer/util.js +1 -1
  96. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
  97. package/dist/esm/packages/taco/src/components/Field/Field.js +1 -1
  98. package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
  99. package/dist/esm/packages/taco/src/components/Form/Form.js +1 -1
  100. package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
  101. package/dist/esm/packages/taco/src/components/Group/Group.js +1 -1
  102. package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
  103. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +2 -2
  104. package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
  105. package/dist/esm/packages/taco/src/components/Header/Header.js +1 -1
  106. package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
  107. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +1 -1
  108. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
  109. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +2 -2
  110. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
  111. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +2 -2
  112. package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
  113. package/dist/esm/packages/taco/src/components/Header/components/Button.js +1 -1
  114. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  115. package/dist/esm/packages/taco/src/components/Header/components/Link.js +1 -1
  116. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  117. package/dist/esm/packages/taco/src/components/Header/components/Logo.js +1 -1
  118. package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
  119. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +1 -1
  120. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  121. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +1 -1
  122. package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
  123. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +1 -1
  124. package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
  125. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +1 -1
  126. package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
  127. package/dist/esm/packages/taco/src/components/Icon/Icon.js +1 -1
  128. package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
  129. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +1 -1
  130. package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
  131. package/dist/esm/packages/taco/src/components/Input/Input.js +1 -1
  132. package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
  133. package/dist/esm/packages/taco/src/components/Input/util.js +1 -1
  134. package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
  135. package/dist/esm/packages/taco/src/components/Layout/Layout.js +2 -2
  136. package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
  137. package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
  138. package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
  139. package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
  140. package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
  141. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +2 -2
  142. package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
  143. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +1 -1
  144. package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
  145. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +1 -1
  146. package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
  147. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +1 -1
  148. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  149. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +1 -1
  150. package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
  151. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +1 -1
  152. package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
  153. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +1 -1
  154. package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
  155. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +1 -1
  156. package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
  157. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +1 -1
  158. package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
  159. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +1 -1
  160. package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
  161. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +1 -1
  162. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  163. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +1 -1
  164. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  165. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +1 -1
  166. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  167. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +2 -2
  168. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  169. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +1 -1
  170. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  171. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +1 -1
  172. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
  173. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +1 -1
  174. package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
  175. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +1 -1
  176. package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
  177. package/dist/esm/packages/taco/src/components/Popover/Popover.js +1 -1
  178. package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
  179. package/dist/esm/packages/taco/src/components/Progress/Progress.js +1 -1
  180. package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
  181. package/dist/esm/packages/taco/src/components/Provider/Localization.js +18 -0
  182. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  183. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +1 -1
  184. package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
  185. package/dist/esm/packages/taco/src/components/RadioGroup/util.js +1 -1
  186. package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
  187. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +1 -1
  188. package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
  189. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +3 -3
  190. package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
  191. package/dist/esm/packages/taco/src/components/Select/Select.js +1 -1
  192. package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
  193. package/dist/esm/packages/taco/src/components/Select/useSelect.js +1 -1
  194. package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
  195. package/dist/esm/packages/taco/src/components/Select2/Select2.js +3 -1
  196. package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
  197. package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
  198. package/dist/esm/packages/taco/src/components/Select2/components/Create.js +1 -1
  199. package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
  200. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +1 -1
  201. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
  202. package/dist/esm/packages/taco/src/components/Select2/components/Group.js +5 -2
  203. package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
  204. package/dist/esm/packages/taco/src/components/Select2/components/Option.js +9 -3
  205. package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
  206. package/dist/esm/packages/taco/src/components/Select2/components/Search.js +1 -1
  207. package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
  208. package/dist/esm/packages/taco/src/components/Select2/components/Title.js +1 -1
  209. package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
  210. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +2 -2
  211. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
  212. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +1 -1
  213. package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
  214. package/dist/esm/packages/taco/src/components/Select2/utilities.js +1 -1
  215. package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
  216. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +1 -1
  217. package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
  218. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +1 -1
  219. package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
  220. package/dist/esm/packages/taco/src/components/Switch/Switch.js +1 -1
  221. package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
  222. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +2 -2
  223. package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
  224. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +1 -1
  225. package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
  226. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +1 -1
  227. package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
  228. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +1 -1
  229. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
  230. package/dist/esm/packages/taco/src/components/Table3/Table3.js +5 -11
  231. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  232. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +1 -1
  233. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +1 -1
  234. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +4 -2
  235. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +1 -1
  236. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +2 -1
  237. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +1 -1
  238. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js +2 -2
  239. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Highlight.js.map +1 -1
  240. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Indicator.js +1 -1
  241. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Indicator.js.map +1 -1
  242. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +2 -2
  243. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +1 -1
  244. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js +1 -1
  245. package/dist/esm/packages/taco/src/components/Table3/components/columns/footer/Footer.js.map +1 -1
  246. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js +1 -1
  247. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Group.js.map +1 -1
  248. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +5 -2
  249. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +1 -1
  250. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +1 -1
  251. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +1 -1
  252. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Resizer.js +1 -1
  253. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Resizer.js.map +1 -1
  254. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +4 -4
  255. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +1 -1
  256. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +1 -1
  257. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +1 -1
  258. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +1 -1
  259. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
  260. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js +1 -1
  261. package/dist/esm/packages/taco/src/components/Table3/components/columns/styles.js.map +1 -1
  262. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +1 -1
  263. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +1 -1
  264. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js +2 -2
  265. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/ColumnSettings.js.map +1 -1
  266. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js +1 -1
  267. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/Filters.js.map +1 -1
  268. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterValue.js +1 -1
  269. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Filter/filters/components/FilterValue.js.map +1 -1
  270. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/FontSize.js +5 -9
  271. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/FontSize.js.map +1 -1
  272. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintIFrame.js +1 -1
  273. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/RowHeight.js +3 -3
  274. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/RowHeight.js.map +1 -1
  275. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/Settings.js +1 -1
  276. package/dist/esm/packages/taco/src/{primitives/Table/useTable/features/useTablePrinting.js → components/Table3/hooks/features/usePrinting.js} +3 -3
  277. package/dist/esm/packages/taco/src/components/Table3/hooks/features/usePrinting.js.map +1 -0
  278. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssGrid.js.map +1 -1
  279. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js +10 -10
  280. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js.map +1 -1
  281. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +4 -3
  282. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
  283. package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
  284. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +1 -1
  285. package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
  286. package/dist/esm/packages/taco/src/components/Tag/Tag.js +2 -2
  287. package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
  288. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +1 -1
  289. package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
  290. package/dist/esm/packages/taco/src/components/Toast/Toast.js +2 -2
  291. package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
  292. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +2 -2
  293. package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
  294. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +1 -1
  295. package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
  296. package/dist/esm/packages/taco/src/index.js +1 -1
  297. package/dist/esm/packages/taco/src/primitives/Table/types.js +25 -8
  298. package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
  299. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js +1 -1
  300. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableColumnOrdering.js.map +1 -1
  301. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableFontSize.js.map +1 -1
  302. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js +11 -21
  303. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowActive.js.map +1 -1
  304. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowClick.js.map +1 -1
  305. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js +1 -1
  306. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowGoto.js.map +1 -1
  307. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js +1 -0
  308. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableRowSelection.js.map +1 -1
  309. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js +42 -2
  310. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTableServerLoading.js.map +1 -1
  311. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js +7 -7
  312. package/dist/esm/packages/taco/src/primitives/Table/useTable/listeners/useTableFontSizeListener.js.map +1 -1
  313. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/columns.js +14 -12
  314. package/dist/esm/packages/taco/src/primitives/Table/useTable/util/columns.js.map +1 -1
  315. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +7 -0
  316. package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -0
  317. package/dist/esm/packages/taco/src/types.js +7 -1
  318. package/dist/esm/packages/taco/src/types.js.map +1 -1
  319. package/dist/esm/packages/taco/src/utils/dom.js +10 -1
  320. package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
  321. package/dist/index.css +12 -12
  322. package/dist/primitives/Table/types.d.ts +186 -7
  323. package/dist/primitives/Table/useTable/features/useTableColumnFreezing.d.ts +6 -0
  324. package/dist/primitives/Table/useTable/features/useTableFontSize.d.ts +2 -2
  325. package/dist/primitives/Table/useTable/features/useTableFooter.d.ts +3 -0
  326. package/dist/primitives/Table/useTable/features/useTablePrinting.d.ts +1 -0
  327. package/dist/primitives/Table/useTable/features/useTableRef.d.ts +4 -0
  328. package/dist/primitives/Table/useTable/features/useTableRowActions.d.ts +6 -0
  329. package/dist/primitives/Table/useTable/features/useTableRowActive.d.ts +0 -1
  330. package/dist/primitives/Table/useTable/features/useTableRowClick.d.ts +1 -1
  331. package/dist/primitives/Table/useTable/features/useTableRowExpansion.d.ts +5 -0
  332. package/dist/primitives/Table/useTable/features/useTableRowGoto.d.ts +1 -1
  333. package/dist/primitives/Table/useTable/features/useTableRowGroups.d.ts +5 -0
  334. package/dist/primitives/Table/useTable/features/useTableRowSelection.d.ts +1 -0
  335. package/dist/primitives/Table/useTable/features/useTableSearch.d.ts +11 -0
  336. package/dist/primitives/Table/useTable/features/useTableServerLoading.d.ts +5 -2
  337. package/dist/primitives/Table/useTable/features/useTableSettings.d.ts +3 -0
  338. package/dist/primitives/Table/useTable/listeners/useTableRowHeightListener.d.ts +2 -0
  339. package/dist/primitives/Table/useTable/listeners/useTableSearchListener.d.ts +2 -0
  340. package/dist/primitives/Table/useTable/listeners/useTableSettingsListener.d.ts +3 -0
  341. package/dist/primitives/Table/useTable/useTable.d.ts +57 -0
  342. package/dist/primitives/Table/useTable/util/columns.d.ts +9 -3
  343. package/dist/primitives/Table/useTable/util/columns.spec.d.ts +1 -0
  344. package/dist/primitives/Table/useTable/util/filtering.d.ts +7 -0
  345. package/dist/primitives/Table/useTable/util/presets.d.ts +2 -0
  346. package/dist/primitives/Table/useTable/util/search.d.ts +2 -0
  347. package/dist/primitives/Table/useTable/util/settings.d.ts +13 -0
  348. package/dist/primitives/Table/useTable/util/setup.d.ts +14 -0
  349. package/dist/primitives/Table/useTable/util/sorting.d.ts +2 -0
  350. package/dist/primitives/Table/useTableDataLoader.d.ts +23 -0
  351. package/dist/taco.cjs.development.js +215 -131
  352. package/dist/taco.cjs.development.js.map +1 -1
  353. package/dist/taco.cjs.production.min.js +1 -1
  354. package/dist/taco.cjs.production.min.js.map +1 -1
  355. package/dist/types.d.ts +6 -0
  356. package/dist/utils/dom.d.ts +1 -0
  357. package/package.json +4 -3
  358. package/types.json +25105 -11841
  359. package/dist/esm/packages/taco/src/primitives/Table/useTable/features/useTablePrinting.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.js","sources":["../../../../../../../src/components/Navigation/Navigation.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { TreeviewProps, Treeview, TreeviewGroupProps, TreeviewItemProps } from '../Treeview/Treeview';\nimport { Icon } from '../Icon/Icon';\nimport { useDropTarget } from '../../utils/hooks/useDropTarget';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport './Navigation.css';\n\n// Item\nexport type NavigationItemProps = Omit<TreeviewItemProps, 'prefix'> & {\n /** Change the style to indicate the link is selected */\n active?: boolean;\n /** Handler to be used when dropping a dragged element over the navigation link */\n onDrop?: React.DragEventHandler;\n /**\n * Small amount of information placed next to the text of the link.\n * This can be any valid react element, for e.g. a `span`.\n * Should be used to indicate a relevant information of the link,\n * for e.g. the number of unread notifications\n */\n postfix?: React.ReactNode;\n /**\n * Small amount of information placed before the text of the link.\n * This can be any valid react element, for e.g. a `span`.\n * Should be used to indicate a feedback for user,\n * for e.g. display some sort of visual informational state or a relevant icon.\n */\n prefix?: React.ReactNode;\n /** Target of the link */\n target?: string;\n};\n\nconst Item = React.forwardRef(function Item(props: NavigationItemProps, ref: React.Ref<HTMLAnchorElement>) {\n const { active, children, onDrop, postfix, prefix, role, ...otherProps } = props;\n const proxyRef = useMergedRef<HTMLAnchorElement>(ref);\n const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);\n const isTreeitem = role === 'treeitem';\n const className = cn(\n 'yt-navigation__item cursor-pointer',\n {\n 'w-full mb-px py-1 px-3 flex items-center hover:bg-grey-300': isTreeitem,\n 'bg-white w-full h-10 px-3 flex-shrink-0 flex items-center justify-between cursor-pointer': !isTreeitem,\n 'yt-navigation__item--active': active && !isDraggedOver,\n 'bg-grey-300': isTreeitem && active && !isDraggedOver,\n 'yt-navigation__item--dropping bg-blue-500': isDraggedOver,\n },\n props.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLSpanElement>): void => {\n if (event.target instanceof HTMLAnchorElement || event.target instanceof HTMLButtonElement) {\n return;\n }\n\n if (proxyRef.current) {\n proxyRef.current.click();\n }\n };\n\n return (\n <span {...dropTargetProps} className={className} onClick={handleClick} role={role}>\n {prefix && <span className=\"yt-navigation__item__prefix flex items-center\">{prefix}</span>}\n <a {...otherProps} className=\"block flex-grow truncate\" ref={proxyRef}>\n {children}\n </a>\n {postfix && <span className=\"yt-navigation__item__postfix ml-1\">{postfix}</span>}\n </span>\n );\n});\n\n// Panel\nexport type NavigationPanelProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst Panel = React.forwardRef(function Panel(props: NavigationPanelProps, ref: React.Ref<HTMLDivElement>) {\n return <div {...props} className={cn('w-full bg-white p-3', props.className)} ref={ref} />;\n});\n\n// Group\nexport type NavigationMenuGroupProps = TreeviewGroupProps;\n\nconst MenuGroup = React.forwardRef(function MenuGroup(props: NavigationMenuGroupProps, ref: React.Ref<HTMLDivElement>) {\n const className = cn(\n 'flex-shrink-0 space-y-1 outline-none',\n {\n 'bg-white pb-2': props.fixed,\n },\n typeof props.className === 'function' ? props.className(false) : props.className\n );\n const title = (expanded: boolean): JSX.Element => {\n const className = cn('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {\n 'mb-1': expanded,\n 'cursor-pointer hover:text-blue-500': !props.fixed,\n });\n\n return (\n <span className={className}>\n {typeof props.title === 'function' ? props.title(expanded) : props.title}\n {!props.fixed && <Icon name={expanded ? 'chevron-up' : 'chevron-down'} />}\n </span>\n );\n };\n\n return <Treeview.Group {...props} className={className} title={title} ref={ref} />;\n});\n\n// Menu\nexport type NavigationMenuProps = React.PropsWithChildren<TreeviewProps>;\n\nexport type ForwardedNavigationMenuWithStatics = React.ForwardRefExoticComponent<\n NavigationMenuProps & React.RefAttributes<HTMLDivElement>\n> & {\n /** Expandable region reprezenting a group of related links */\n Group: React.ForwardRefExoticComponent<NavigationMenuGroupProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nconst Menu = React.forwardRef(function Menu(props: NavigationMenuProps, ref: React.Ref<HTMLDivElement>) {\n const scrollableAreas = React.useMemo(() => {\n const scrollableAreas: React.ReactNode[] = [];\n\n const children = React.Children.toArray(props.children).filter(\n child => !!child\n ) as React.ReactElement<NavigationMenuGroupProps>[];\n\n children.forEach(child => {\n if (child.props.fixed) {\n scrollableAreas.push(child);\n } else {\n const x = scrollableAreas[scrollableAreas.length - 1];\n if (Array.isArray(x)) {\n x.push(child);\n } else {\n scrollableAreas.push([child]);\n }\n }\n });\n\n return scrollableAreas;\n }, [props.children]);\n\n return (\n <Treeview\n {...props}\n className={cn('divide-grey-100 flex flex-grow flex-col divide-y-2 overflow-y-auto', props.className)}\n ref={ref}>\n {scrollableAreas.map((area, i) =>\n Array.isArray(area) ? (\n <div\n className=\"divide-grey-100 flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto\"\n key={i}>\n {area}\n </div>\n ) : (\n area\n )\n )}\n </Treeview>\n );\n}) as ForwardedNavigationMenuWithStatics;\n\nMenu.Group = MenuGroup;\n\n// Navigation\nexport type NavigationProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport type ForwardedNavigationWithStatics = React.ForwardRefExoticComponent<\n NavigationProps & React.RefAttributes<HTMLDivElement>\n> & {\n /** Navigation link */\n Item: React.ForwardRefExoticComponent<NavigationItemProps & React.RefAttributes<HTMLAnchorElement>>;\n /**\n * Container for the expandable groups that hold navigation links.\n * Should be used as a direct child of Navigation component, e.g. `Navigation.Menu`.\n * Should have the menu groups as a direct child, e.g. `Navigation.Menu.Group`\n */\n Menu: ForwardedNavigationMenuWithStatics;\n /**\n * Isolated container within the Navigation.\n * This can be used to create a region in the Navigation that is usually not scrollable, nor expandable,\n * containing useful information for user and quick actions\n */\n Panel: React.ForwardRefExoticComponent<NavigationPanelProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nexport const Navigation = React.forwardRef(function Navigation(props: NavigationProps, ref: React.Ref<HTMLDivElement>) {\n const { children, ...otherProps } = props;\n const className = cn('h-full flex flex-col bg-grey-100 divide-y-2 divide-grey-100', props.className);\n\n return (\n <div {...otherProps} className={className} data-taco=\"navigation\" ref={ref}>\n {children}\n </div>\n );\n}) as ForwardedNavigationWithStatics;\n\nNavigation.Menu = Menu;\nNavigation.Item = Item;\nNavigation.Panel = Panel;\n"],"names":["Item","React","forwardRef","props","ref","active","children","onDrop","postfix","prefix","role","otherProps","proxyRef","useMergedRef","isDraggedOver","dropTargetProps","useDropTarget","isTreeitem","className","cn","handleClick","event","target","HTMLAnchorElement","HTMLButtonElement","current","click","onClick","Panel","MenuGroup","fixed","title","expanded","Icon","name","Treeview","Group","Menu","scrollableAreas","useMemo","Children","toArray","filter","child","forEach","push","x","length","Array","isArray","map","area","i","key","Navigation"],"mappings":";;;;;;;AAgCA,MAAMA,IAAI,gBAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,IAAIA,CAACG,KAA0B,EAAEC,GAAiC;EACrG,MAAM;IAAEC,MAAM;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,OAAO;IAAEC,MAAM;IAAEC,IAAI;IAAE,GAAGC;GAAY,GAAGR,KAAK;EAChF,MAAMS,QAAQ,GAAGC,YAAY,CAAoBT,GAAG,CAAC;EACrD,MAAM,CAACU,aAAa,EAAEC,eAAe,CAAC,GAAGC,aAAa,CAACT,MAAM,CAAC;EAC9D,MAAMU,UAAU,GAAGP,IAAI,KAAK,UAAU;EACtC,MAAMQ,SAAS,GAAGC,EAAE,CAChB,oCAAoC,EACpC;IACI,4DAA4D,EAAEF,UAAU;IACxE,0FAA0F,EAAE,CAACA,UAAU;IACvG,6BAA6B,EAAEZ,MAAM,IAAI,CAACS,aAAa;IACvD,aAAa,EAAEG,UAAU,IAAIZ,MAAM,IAAI,CAACS,aAAa;IACrD,2CAA2C,EAAEA;GAChD,EACDX,KAAK,CAACe,SAAS,CAClB;EAED,MAAME,WAAW,GAAIC,KAAwC;IACzD,IAAIA,KAAK,CAACC,MAAM,YAAYC,iBAAiB,IAAIF,KAAK,CAACC,MAAM,YAAYE,iBAAiB,EAAE;MACxF;;IAGJ,IAAIZ,QAAQ,CAACa,OAAO,EAAE;MAClBb,QAAQ,CAACa,OAAO,CAACC,KAAK,EAAE;;GAE/B;EAED,oBACIzB,uDAAUc,eAAe;IAAEG,SAAS,EAAEA,SAAS;IAAES,OAAO,EAAEP,WAAW;IAAEV,IAAI,EAAEA;MACxED,MAAM,iBAAIR;IAA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G;IAC1GmC,GAAG,EAAED;KACJD,IAAI,CACH,IAENA,IACH,CACJ,CACM;AAEnB,CAAC,CAAuC;AAExCd,IAAI,CAACD,KAAK,GAAGP,SAAS;MAwBTyB,UAAU,gBAAGrD,cAAK,CAACC,UAAU,CAAC,SAASoD,UAAUA,CAACnD,KAAsB,EAAEC,GAA8B;EACjH,MAAM;IAAEE,QAAQ;IAAE,GAAGK;GAAY,GAAGR,KAAK;EACzC,MAAMe,SAAS,GAAGC,EAAE,CAAC,6DAA6D,EAAEhB,KAAK,CAACe,SAAS,CAAC;EAEpG,oBACIjB,sDAASU,UAAU;IAAEO,SAAS,EAAEA,SAAS;iBAAY,YAAY;IAACd,GAAG,EAAEA;MAClEE,QAAQ,CACP;AAEd,CAAC;AAEDgD,UAAU,CAACjB,IAAI,GAAGA,IAAI;AACtBiB,UAAU,CAACtD,IAAI,GAAGA,IAAI;AACtBsD,UAAU,CAAC1B,KAAK,GAAGA,KAAK;;;;"}
1
+ {"version":3,"file":"Navigation.js","sources":["../../../../../../../src/components/Navigation/Navigation.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { TreeviewProps, Treeview, TreeviewGroupProps, TreeviewItemProps } from '../Treeview/Treeview';\nimport { Icon } from '../Icon/Icon';\nimport { useDropTarget } from '../../utils/hooks/useDropTarget';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport './Navigation.css';\n\n// Item\nexport type NavigationItemProps = Omit<TreeviewItemProps, 'prefix'> & {\n /** Change the style to indicate the link is selected */\n active?: boolean;\n /** Handler to be used when dropping a dragged element over the navigation link */\n onDrop?: React.DragEventHandler;\n /**\n * Small amount of information placed next to the text of the link.\n * This can be any valid react element, for e.g. a `span`.\n * Should be used to indicate a relevant information of the link,\n * for e.g. the number of unread notifications\n */\n postfix?: React.ReactNode;\n /**\n * Small amount of information placed before the text of the link.\n * This can be any valid react element, for e.g. a `span`.\n * Should be used to indicate a feedback for user,\n * for e.g. display some sort of visual informational state or a relevant icon.\n */\n prefix?: React.ReactNode;\n /** Target of the link */\n target?: string;\n};\n\nconst Item = React.forwardRef(function Item(props: NavigationItemProps, ref: React.Ref<HTMLAnchorElement>) {\n const { active, children, onDrop, postfix, prefix, role, ...otherProps } = props;\n const proxyRef = useMergedRef<HTMLAnchorElement>(ref);\n const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);\n const isTreeitem = role === 'treeitem';\n const className = cn(\n 'yt-navigation__item cursor-pointer',\n {\n 'w-full mb-px py-1 px-3 flex items-center hover:bg-grey-300': isTreeitem,\n 'bg-white w-full h-10 px-3 flex-shrink-0 flex items-center justify-between cursor-pointer': !isTreeitem,\n 'yt-navigation__item--active': active && !isDraggedOver,\n 'bg-grey-300': isTreeitem && active && !isDraggedOver,\n 'yt-navigation__item--dropping bg-blue-500': isDraggedOver,\n },\n props.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLSpanElement>): void => {\n if (event.target instanceof HTMLAnchorElement || event.target instanceof HTMLButtonElement) {\n return;\n }\n\n if (proxyRef.current) {\n proxyRef.current.click();\n }\n };\n\n return (\n <span {...dropTargetProps} className={className} onClick={handleClick} role={role}>\n {prefix && <span className=\"yt-navigation__item__prefix flex items-center\">{prefix}</span>}\n <a {...otherProps} className=\"block flex-grow truncate\" ref={proxyRef}>\n {children}\n </a>\n {postfix && <span className=\"yt-navigation__item__postfix ml-1\">{postfix}</span>}\n </span>\n );\n});\n\n// Panel\nexport type NavigationPanelProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst Panel = React.forwardRef(function Panel(props: NavigationPanelProps, ref: React.Ref<HTMLDivElement>) {\n return <div {...props} className={cn('w-full bg-white p-3', props.className)} ref={ref} />;\n});\n\n// Group\nexport type NavigationMenuGroupProps = TreeviewGroupProps;\n\nconst MenuGroup = React.forwardRef(function MenuGroup(props: NavigationMenuGroupProps, ref: React.Ref<HTMLDivElement>) {\n const className = cn(\n 'flex-shrink-0 space-y-1 outline-none',\n {\n 'bg-white pb-2': props.fixed,\n },\n typeof props.className === 'function' ? props.className(false) : props.className\n );\n const title = (expanded: boolean): JSX.Element => {\n const className = cn('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {\n 'mb-1': expanded,\n 'cursor-pointer hover:text-blue-500': !props.fixed,\n });\n\n return (\n <span className={className}>\n {typeof props.title === 'function' ? props.title(expanded) : props.title}\n {!props.fixed && <Icon name={expanded ? 'chevron-up' : 'chevron-down'} />}\n </span>\n );\n };\n\n return <Treeview.Group {...props} className={className} title={title} ref={ref} />;\n});\n\n// Menu\nexport type NavigationMenuProps = React.PropsWithChildren<TreeviewProps>;\n\nexport type ForwardedNavigationMenuWithStatics = React.ForwardRefExoticComponent<\n NavigationMenuProps & React.RefAttributes<HTMLDivElement>\n> & {\n /** Expandable region reprezenting a group of related links */\n Group: React.ForwardRefExoticComponent<NavigationMenuGroupProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nconst Menu = React.forwardRef(function Menu(props: NavigationMenuProps, ref: React.Ref<HTMLDivElement>) {\n const scrollableAreas = React.useMemo(() => {\n const scrollableAreas: React.ReactNode[] = [];\n\n const children = React.Children.toArray(props.children).filter(\n child => !!child\n ) as React.ReactElement<NavigationMenuGroupProps>[];\n\n children.forEach(child => {\n if (child.props.fixed) {\n scrollableAreas.push(child);\n } else {\n const x = scrollableAreas[scrollableAreas.length - 1];\n if (Array.isArray(x)) {\n x.push(child);\n } else {\n scrollableAreas.push([child]);\n }\n }\n });\n\n return scrollableAreas;\n }, [props.children]);\n\n return (\n <Treeview\n {...props}\n className={cn('divide-grey-100 flex flex-grow flex-col divide-y-2 overflow-y-auto', props.className)}\n ref={ref}>\n {scrollableAreas.map((area, i) =>\n Array.isArray(area) ? (\n <div\n className=\"divide-grey-100 flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto\"\n key={i}>\n {area}\n </div>\n ) : (\n area\n )\n )}\n </Treeview>\n );\n}) as ForwardedNavigationMenuWithStatics;\n\nMenu.Group = MenuGroup;\n\n// Navigation\nexport type NavigationProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport type ForwardedNavigationWithStatics = React.ForwardRefExoticComponent<\n NavigationProps & React.RefAttributes<HTMLDivElement>\n> & {\n /** Navigation link */\n Item: React.ForwardRefExoticComponent<NavigationItemProps & React.RefAttributes<HTMLAnchorElement>>;\n /**\n * Container for the expandable groups that hold navigation links.\n * Should be used as a direct child of Navigation component, e.g. `Navigation.Menu`.\n * Should have the menu groups as a direct child, e.g. `Navigation.Menu.Group`\n */\n Menu: ForwardedNavigationMenuWithStatics;\n /**\n * Isolated container within the Navigation.\n * This can be used to create a region in the Navigation that is usually not scrollable, nor expandable,\n * containing useful information for user and quick actions\n */\n Panel: React.ForwardRefExoticComponent<NavigationPanelProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nexport const Navigation = React.forwardRef(function Navigation(props: NavigationProps, ref: React.Ref<HTMLDivElement>) {\n const { children, ...otherProps } = props;\n const className = cn('h-full flex flex-col bg-grey-100 divide-y-2 divide-grey-100', props.className);\n\n return (\n <div {...otherProps} className={className} data-taco=\"navigation\" ref={ref}>\n {children}\n </div>\n );\n}) as ForwardedNavigationWithStatics;\n\nNavigation.Menu = Menu;\nNavigation.Item = Item;\nNavigation.Panel = Panel;\n"],"names":["Item","React","forwardRef","props","ref","active","children","onDrop","postfix","prefix","role","otherProps","proxyRef","useMergedRef","isDraggedOver","dropTargetProps","useDropTarget","isTreeitem","className","cn","handleClick","event","target","HTMLAnchorElement","HTMLButtonElement","current","click","onClick","Panel","MenuGroup","fixed","title","expanded","Icon","name","Treeview","Group","Menu","scrollableAreas","useMemo","Children","toArray","filter","child","forEach","push","x","length","Array","isArray","map","area","i","key","Navigation"],"mappings":";;;;;;;AAgCA,MAAMA,IAAI,gBAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,IAAIA,CAACG,KAA0B,EAAEC,GAAiC;EACrG,MAAM;IAAEC,MAAM;IAAEC,QAAQ;IAAEC,MAAM;IAAEC,OAAO;IAAEC,MA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AAEO,SAAS,EAAEA,SAAS;iBAAY,YAAY;IAACd,GAAG,EAAEA;MAClEE,QAAQ,CACP;AAEd,CAAC;AAEDgD,UAAU,CAACjB,IAAI,GAAGA,IAAI;AACtBiB,UAAU,CAACtD,IAAI,GAAGA,IAAI;AACtBsD,UAAU,CAAC1B,KAAK,GAAGA,KAAK;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import cn from 'classnames';
2
+ import cn from 'clsx';
3
3
  import { Group } from './components/Group.js';
4
4
  import { Link } from './components/Link.js';
5
5
  export { getNavigationLinkClasses } from './components/Link.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation2.js","sources":["../../../../../../../src/components/Navigation2/Navigation2.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Group } from './components/Group';\nimport { Link } from './components/Link';\nimport { Section } from './components/Section';\nimport { Content } from './components/Content';\n\nexport type Navigation2Props = React.HTMLAttributes<HTMLUListElement>;\n\nexport const Navigation2 = React.forwardRef<HTMLUListElement, Navigation2Props>(function Navigation2(props, ref) {\n const { children, ...attributes } = props;\n const className = cn('m-0 py-2 flex flex-col gap-y-px overflow-auto h-full w-full bg-grey-50', props.className);\n\n return (\n <ul {...attributes} className={className} data-taco=\"navigation2\" ref={ref} role=\"menubar\" style={{ opacity: 0.999 }}>\n {children}\n </ul>\n );\n}) as React.ForwardRefExoticComponent<Navigation2Props> & {\n Group: typeof Group;\n Link: typeof Link;\n Section: typeof Section;\n Content: typeof Content;\n};\n\nNavigation2.Group = Group;\nNavigation2.Link = Link;\nNavigation2.Section = Section;\nNavigation2.Content = Content;\n\nexport { getNavigationLinkClasses } from './components/Link';\n\nexport type { Navigation2ContentProps } from './components/Content';\nexport type { Navigation2GroupProps } from './components/Group';\nexport type { Navigation2LinkProps } from './components/Link';\nexport type { Navigation2SectionProps } from './components/Section';\n"],"names":["Navigation2","React","forwardRef","props","ref","children","attributes","className","cn","role","style","opacity","Group","Link","Section","Content"],"mappings":";;;;;;;;MASaA,WAAW,gBAAGC,cAAK,CAACC,UAAU,CAAqC,SAASF,WAAWA,CAACG,KAAK,EAAEC,GAAG;EAC3G,MAAM;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGH,KAAK;EACzC,MAAMI,SAAS,GAAGC,EAAE,CAAC,wEAAwE,EAAEL,KAAK,CAACI,SAAS,CAAC;EAE/G,oBACIN,qDAAQK,UAAU;IAAEC,SAAS,EAAEA,SAAS;iBAAY,aAAa;IAACH,GAAG,EAAEA,GAAG;IAAEK,IAAI,EAAC,SAAS;IAACC,KAAK,EAAE;MAAEC,OAAO,EAAE;;MACxGN,QAAQ,CACR;AAEb,CAAC;AAODL,WAAW,CAACY,KAAK,GAAGA,KAAK;AACzBZ,WAAW,CAACa,IAAI,GAAGA,IAAI;AACvBb,WAAW,CAACc,OAAO,GAAGA,OAAO;AAC7Bd,WAAW,CAACe,OAAO,GAAGA,OAAO;;;;"}
1
+ {"version":3,"file":"Navigation2.js","sources":["../../../../../../../src/components/Navigation2/Navigation2.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Group } from './components/Group';\nimport { Link } from './components/Link';\nimport { Section } from './components/Section';\nimport { Content } from './components/Content';\n\nexport type Navigation2Props = React.HTMLAttributes<HTMLUListElement>;\n\nexport const Navigation2 = React.forwardRef<HTMLUListElement, Navigation2Props>(function Navigation2(props, ref) {\n const { children, ...attributes } = props;\n const className = cn('m-0 py-2 flex flex-col gap-y-px overflow-auto h-full w-full bg-grey-50', props.className);\n\n return (\n <ul {...attributes} className={className} data-taco=\"navigation2\" ref={ref} role=\"menubar\" style={{ opacity: 0.999 }}>\n {children}\n </ul>\n );\n}) as React.ForwardRefExoticComponent<Navigation2Props> & {\n Group: typeof Group;\n Link: typeof Link;\n Section: typeof Section;\n Content: typeof Content;\n};\n\nNavigation2.Group = Group;\nNavigation2.Link = Link;\nNavigation2.Section = Section;\nNavigation2.Content = Content;\n\nexport { getNavigationLinkClasses } from './components/Link';\n\nexport type { Navigation2ContentProps } from './components/Content';\nexport type { Navigation2GroupProps } from './components/Group';\nexport type { Navigation2LinkProps } from './components/Link';\nexport type { Navigation2SectionProps } from './components/Section';\n"],"names":["Navigation2","React","forwardRef","props","ref","children","attributes","className","cn","role","style","opacity","Group","Link","Section","Content"],"mappings":";;;;;;;;MASaA,WAAW,gBAAGC,cAAK,CAACC,UAAU,CAAqC,SAASF,WAAWA,CAACG,KAAK,EAAEC,GAAG;EAC3G,MAAM;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGH,KAAK;EACzC,MAAMI,SAAS,GAAGC,EAAE,CAAC,wEAAwE,EAAEL,KAAK,CAACI,SAAS,CAAC;EAE/G,oBACIN,qDAAQK,UAAU;IAAEC,SAAS,EAAEA,SAAS;iBAAY,aAAa;IAACH,GAAG,EAAEA,GAAG;IAAEK,IAAI,EAAC,SAAS;IAACC,KAAK,EAAE;MAAEC,OAAO,EAAE;;MACxGN,QAAQ,CACR;AAEb,CAAC;AAODL,WAAW,CAACY,KAAK,GAAGA,KAAK;AACzBZ,WAAW,CAACa,IAAI,GAAGA,IAAI;AACvBb,WAAW,CAACc,OAAO,GAAGA,OAAO;AAC7Bd,WAAW,CAACe,OAAO,GAAGA,OAAO;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import cn from 'classnames';
2
+ import cn from 'clsx';
3
3
  import { getAdjacentClasses } from './util.js';
4
4
 
5
5
  const Content = /*#__PURE__*/React__default.forwardRef(function Navigation2(props, ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sources":["../../../../../../../../src/components/Navigation2/components/Content.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { getAdjacentClasses } from './util';\n\nexport type Navigation2ContentProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nexport const Content = React.forwardRef<HTMLLIElement, Navigation2ContentProps>(function Navigation2(props, ref) {\n const { children, ...attributes } = props;\n const className = cn(\n 'w-full overflow-auto p-3 mt-auto border-grey-200 flex-shrink-0 z-10 bg-grey-50 [[role=menubar]>&:last-child]:pb-0',\n getAdjacentClasses(),\n props.className\n );\n\n return (\n <li {...attributes} className={className} data-taco=\"navigation2-content\" ref={ref} role=\"none\">\n {children}\n </li>\n );\n});\n"],"names":["Content","React","forwardRef","Navigation2","props","ref","children","attributes","className","cn","getAdjacentClasses","role"],"mappings":";;;;MAMaA,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAAyC,SAASC,WAAWA,CAACC,KAAK,EAAEC,GAAG;EAC3G,MAAM;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGH,KAAK;EACzC,MAAMI,SAAS,GAAGC,EAAE,CAChB,mHAAmH,EACnHC,kBAAkB,EAAE,EACpBN,KAAK,CAACI,SAAS,CAClB;EAED,oBACIP,qDAAQM,UAAU;IAAEC,SAAS,EAAEA,SAAS;iBAAY,qBAAqB;IAACH,GAAG,EAAEA,GAAG;IAAEM,IAAI,EAAC;MACpFL,QAAQ,CACR;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"Content.js","sources":["../../../../../../../../src/components/Navigation2/components/Content.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { getAdjacentClasses } from './util';\n\nexport type Navigation2ContentProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nexport const Content = React.forwardRef<HTMLLIElement, Navigation2ContentProps>(function Navigation2(props, ref) {\n const { children, ...attributes } = props;\n const className = cn(\n 'w-full overflow-auto p-3 mt-auto border-grey-200 flex-shrink-0 z-10 bg-grey-50 [[role=menubar]>&:last-child]:pb-0',\n getAdjacentClasses(),\n props.className\n );\n\n return (\n <li {...attributes} className={className} data-taco=\"navigation2-content\" ref={ref} role=\"none\">\n {children}\n </li>\n );\n});\n"],"names":["Content","React","forwardRef","Navigation2","props","ref","children","attributes","className","cn","getAdjacentClasses","role"],"mappings":";;;;MAMaA,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAAyC,SAASC,WAAWA,CAACC,KAAK,EAAEC,GAAG;EAC3G,MAAM;IAAEC,QAAQ;IAAE,GAAGC;GAAY,GAAGH,KAAK;EACzC,MAAMI,SAAS,GAAGC,EAAE,CAChB,mHAAmH,EACnHC,kBAAkB,EAAE,EACpBN,KAAK,CAACI,SAAS,CAClB;EAED,oBACIP,qDAAQM,UAAU;IAAEC,SAAS,EAAEA,SAAS;iBAAY,qBAAqB;IAACH,GAAG,EAAEA,GAAG;IAAEM,IAAI,EAAC;MACpFL,QAAQ,CACR;AAEb,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import cn from 'classnames';
2
+ import cn from 'clsx';
3
3
  import { Icon } from '../../Icon/Icon.js';
4
4
 
5
5
  const Group = /*#__PURE__*/React__default.forwardRef(function Group(props, ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"Group.js","sources":["../../../../../../../../src/components/Navigation2/components/Group.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon } from '../../Icon/Icon';\n\nexport type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {\n defaultExpanded?: boolean;\n heading: string | JSX.Element;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nexport const Group = React.forwardRef<HTMLLIElement, Navigation2GroupProps>(function Group(props, ref) {\n const { children, defaultExpanded = false, heading, onClick, ...attributes } = props;\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const className = cn(\n 'flex w-full cursor-pointer items-center rounded px-3 font-bold text-left leading-8 hover:bg-black/[.06] focus-visible:yt-focus-dark',\n attributes.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setExpanded(!expanded);\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <li {...attributes} role=\"none\" className=\"[[role=menubar]>&]:px-3\" ref={ref}>\n <button\n aria-haspopup=\"true\"\n aria-expanded={expanded}\n data-taco=\"navigation2-group\"\n className={className}\n onClick={handleClick}\n role=\"menuitem\">\n <Icon className=\"-ml-2 !h-5 !w-5\" name={expanded ? 'chevron-down-solid' : 'chevron-right-solid'} />\n <span className=\"flex-grow truncate\">{heading}</span>\n </button>\n <ul className={cn('mb-0 flex flex-col gap-y-px pt-px', { hidden: !expanded })} role=\"menu\">\n {children}\n </ul>\n </li>\n );\n});\n"],"names":["Group","React","forwardRef","props","ref","children","defaultExpanded","heading","onClick","attributes","expanded","setExpanded","useState","className","cn","handleClick","event","role","Icon","name","hidden"],"mappings":";;;;MAUaA,KAAK,gBAAGC,cAAK,CAACC,UAAU,CAAuC,SAASF,KAAKA,CAACG,KAAK,EAAEC,GAAG;EACjG,MAAM;IAAEC,QAAQ;IAAEC,eAAe,GAAG,KAAK;IAAEC,OAAO;IAAEC,OAAO;IAAE,GAAGC;GAAY,GAAGN,KAAK;EACpF,MAAM,CAACO,QAAQ,EAAEC,WAAW,CAAC,GAAGV,cAAK,CAACW,QAAQ,CAACN,eAAe,CAAC;EAC/D,MAAMO,SAAS,GAAGC,EAAE,CAChB,qIAAqI,EACrIL,UAAU,CAACI,SAAS,CACvB;EAED,MAAME,WAAW,GAAIC,KAA0C;IAC3DL,WAAW,CAAC,CAACD,QAAQ,CAAC;IAEtB,IAAIF,OAAO,EAAE;MACTA,OAAO,CAACQ,KAAK,CAAC;;GAErB;EAED,oBACIf,qDAAQQ,UAAU;IAAEQ,IAAI,EAAC,MAAM;IAACJ,SAAS,EAAC,yBAAyB;IAACT,GAAG,EAAEA;mBACrEH;qBACkB,MAAM;qBACLS,QAAQ;iBACb,mBAAmB;IAC7BG,SAAS,EAAEA,SAAS;IACpBL,OAAO,EAAEO,WAAW;IACpBE,IAAI,EAAC;kBACLhB,6BAACiB,IAAI;IAACL,SAAS,EAAC,iBAAiB;IAACM,IAAI,EAAET,QAAQ,GAAG,oBAAoB,GAAG;IAAyB,eACnGT;IAAMY,SAAS,EAAC;KAAsBN,OAAO,CAAQ,CAChD,eACTN;IAAIY,SAAS,EAAEC,EAAE,CAAC,mCAAmC,EAAE;MAAEM,MAAM,EAAE,CAACV;KAAU,CAAC;IAAEO,IAAI,EAAC;KAC/EZ,QAAQ,CACR,CACJ;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"Group.js","sources":["../../../../../../../../src/components/Navigation2/components/Group.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Icon } from '../../Icon/Icon';\n\nexport type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {\n defaultExpanded?: boolean;\n heading: string | JSX.Element;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nexport const Group = React.forwardRef<HTMLLIElement, Navigation2GroupProps>(function Group(props, ref) {\n const { children, defaultExpanded = false, heading, onClick, ...attributes } = props;\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const className = cn(\n 'flex w-full cursor-pointer items-center rounded px-3 font-bold text-left leading-8 hover:bg-black/[.06] focus-visible:yt-focus-dark',\n attributes.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setExpanded(!expanded);\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <li {...attributes} role=\"none\" className=\"[[role=menubar]>&]:px-3\" ref={ref}>\n <button\n aria-haspopup=\"true\"\n aria-expanded={expanded}\n data-taco=\"navigation2-group\"\n className={className}\n onClick={handleClick}\n role=\"menuitem\">\n <Icon className=\"-ml-2 !h-5 !w-5\" name={expanded ? 'chevron-down-solid' : 'chevron-right-solid'} />\n <span className=\"flex-grow truncate\">{heading}</span>\n </button>\n <ul className={cn('mb-0 flex flex-col gap-y-px pt-px', { hidden: !expanded })} role=\"menu\">\n {children}\n </ul>\n </li>\n );\n});\n"],"names":["Group","React","forwardRef","props","ref","children","defaultExpanded","heading","onClick","attributes","expanded","setExpanded","useState","className","cn","handleClick","event","role","Icon","name","hidden"],"mappings":";;;;MAUaA,KAAK,gBAAGC,cAAK,CAACC,UAAU,CAAuC,SAASF,KAAKA,CAACG,KAAK,EAAEC,GAAG;EACjG,MAAM;IAAEC,QAAQ;IAAEC,eAAe,GAAG,KAAK;IAAEC,OAAO;IAAEC,OAAO;IAAE,GAAGC;GAAY,GAAGN,KAAK;EACpF,MAAM,CAACO,QAAQ,EAAEC,WAAW,CAAC,GAAGV,cAAK,CAACW,QAAQ,CAACN,eAAe,CAAC;EAC/D,MAAMO,SAAS,GAAGC,EAAE,CAChB,qIAAqI,EACrIL,UAAU,CAACI,SAAS,CACvB;EAED,MAAME,WAAW,GAAIC,KAA0C;IAC3DL,WAAW,CAAC,CAACD,QAAQ,CAAC;IAEtB,IAAIF,OAAO,EAAE;MACTA,OAAO,CAACQ,KAAK,CAAC;;GAErB;EAED,oBACIf,qDAAQQ,UAAU;IAAEQ,IAAI,EAAC,MAAM;IAACJ,SAAS,EAAC,yBAAyB;IAACT,GAAG,EAAEA;mBACrEH;qBACkB,MAAM;qBACLS,QAAQ;iBACb,mBAAmB;IAC7BG,SAAS,EAAEA,SAAS;IACpBL,OAAO,EAAEO,WAAW;IACpBE,IAAI,EAAC;kBACLhB,6BAACiB,IAAI;IAACL,SAAS,EAAC,iBAAiB;IAACM,IAAI,EAAET,QAAQ,GAAG,oBAAoB,GAAG;IAAyB,eACnGT;IAAMY,SAAS,EAAC;KAAsBN,OAAO,CAAQ,CAChD,eACTN;IAAIY,SAAS,EAAEC,EAAE,CAAC,mCAAmC,EAAE;MAAEM,MAAM,EAAE,CAACV;KAAU,CAAC;IAAEO,IAAI,EAAC;KAC/EZ,QAAQ,CACR,CACJ;AAEb,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import cn from 'classnames';
2
+ import cn from 'clsx';
3
3
  import { Icon } from '../../Icon/Icon.js';
4
4
  import { Badge } from '../../Badge/Badge.js';
5
5
  import { IconButton } from '../../IconButton/IconButton.js';
@@ -43,7 +43,7 @@ const Link = /*#__PURE__*/React__default.forwardRef(function Link(props, ref) {
43
43
  role: "menuitem",
44
44
  tabIndex: 0
45
45
  }), icon ? /*#__PURE__*/React__default.createElement(Icon, {
46
- className: "mr-1.5 [[role=menu]>li>a>&]:mr-0.5 [[role=menu]>li>a>&]:-ml-1.5",
46
+ className: "mr-1.5 [[role=menu]>li>a>&]:-ml-1.5 [[role=menu]>li>a>&]:mr-0.5",
47
47
  name: icon
48
48
  }) : null, /*#__PURE__*/React__default.createElement("span", {
49
49
  className: "flex flex-grow items-center truncate"
@@ -1 +1 @@
1
- {"version":3,"file":"Link.js","sources":["../../../../../../../../src/components/Navigation2/components/Link.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon, IconName } from '../../Icon/Icon';\nimport { useDropTarget } from '../../../utils/hooks/useDropTarget';\nimport { IconButton } from '../../IconButton/IconButton';\nimport { Badge } from '../../Badge/Badge';\nimport { MenuProps } from '../../Menu/Menu';\nimport { getAdjacentClasses } from './util';\n\nexport const getNavigationLinkClasses = (isDraggedOver = false) =>\n cn(\n 'group relative flex w-full items-center rounded leading-8 !text-black px-2 focus-visible:yt-focus-dark',\n // override styles for links that are children of collapsible menus\n 'font-bold [[role=menu]>li>&]:font-normal [[role=menu]>li>&]:pl-5',\n // override styles to adjust icons included in menu links\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n // override styles to adjust badges included in menu links\n '[&>span_[data-taco=\"badge\"]]:mr-2.5 [[role=menu]>li>&>span_[data-taco=\"badge\"]]:mr-2',\n {\n 'hover:bg-black/[.06] aria-current-page:bg-blue-500/[.1]': !isDraggedOver,\n '!bg-blue-500 !text-white [&>*]:!text-white': isDraggedOver,\n }\n );\n\nexport type Navigation2LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n active?: boolean;\n icon?: IconName;\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n /** Handler to be used when dropping a dragged element over the Navigation2 link */\n onDrop?: React.DragEventHandler;\n /** Total shown inside a Badge component */\n total?: number;\n};\n\nexport const Link = React.forwardRef<HTMLAnchorElement, Navigation2LinkProps>(function Link(props, ref) {\n const { active, children, icon, menu, onDrop, total, ...attributes } = props;\n const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);\n\n const className = cn(getNavigationLinkClasses(isDraggedOver), attributes.className);\n\n const listClassName = cn('[[role=menubar]>&]:px-3 border-grey-200', getAdjacentClasses(), {\n '[&>*]:pointer-events-none': isDraggedOver,\n });\n\n return (\n <li {...dropTargetProps} className={listClassName} data-taco=\"navigation2-link-item\" role=\"none\">\n <a\n {...attributes}\n aria-current={active ? 'page' : undefined}\n className={className}\n data-taco=\"navigation2-link\"\n ref={ref}\n role=\"menuitem\"\n tabIndex={0}>\n {icon ? <Icon className=\"mr-1.5 [[role=menu]>li>a>&]:mr-0.5 [[role=menu]>li>a>&]:-ml-1.5\" name={icon} /> : null}\n <span className=\"flex flex-grow items-center truncate\">{children}</span>\n {menu ? (\n <IconButton\n appearance=\"discrete\"\n icon=\"more\"\n aria-label=\"More\"\n rounded\n className={cn(\n '-mr-1.5 hidden flex-shrink-0 flex-grow-0 transition-none group-hover:flex aria-expanded:flex',\n {\n 'absolute right-0 !mr-0.5': total !== undefined,\n }\n )}\n menu={menu}\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n ) : null}\n {total !== undefined ? (\n <Badge\n className={cn('flex-shrink-0 flex-grow-0 !font-normal', {\n 'group-hover:hidden [[aria-expanded=\"true\"]+&]:hidden ': menu,\n })}\n color=\"transparent\">\n {total}\n </Badge>\n ) : null}\n </a>\n </li>\n );\n});\n"],"names":["getNavigationLinkClasses","isDraggedOver","cn","Link","React","forwardRef","props","ref","active","children","icon","menu","onDrop","total","attributes","dropTargetProps","useDropTarget","className","listClassName","getAdjacentClasses","role","undefined","tabIndex","Icon","name","IconButton","appearance","rounded","onClick","event","preventDefault","stopPropagation","Badge","color"],"mappings":";;;;;;;;MASaA,wBAAwB,GAAGA,CAACC,aAAa,GAAG,KAAK,KAC1DC,EAAE,CACE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Q;KACzC,CACJ;IACDV,IAAI,EAAEA,IAAI;IACViB,OAAO,EAAEC,KAAK;MACVA,KAAK,CAACC,cAAc,EAAE;MACtBD,KAAK,CAACE,eAAe,EAAE;;IAE7B,IACF,IAAI,EACPlB,KAAK,KAAKQ,SAAS,kBAChBjB,6BAAC4B,KAAK;IACFf,SAAS,EAAEf,EAAE,CAAC,wCAAwC,EAAE;MACpD,uDAAuD,EAAES;KAC5D,CAAC;IACFsB,KAAK,EAAC;KACLpB,KAAK,CACF,IACR,IAAI,CACR,CACH;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"Link.js","sources":["../../../../../../../../src/components/Navigation2/components/Link.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { Icon, IconName } from '../../Icon/Icon';\nimport { useDropTarget } from '../../../utils/hooks/useDropTarget';\nimport { IconButton } from '../../IconButton/IconButton';\nimport { Badge } from '../../Badge/Badge';\nimport { MenuProps } from '../../Menu/Menu';\nimport { getAdjacentClasses } from './util';\n\nexport const getNavigationLinkClasses = (isDraggedOver = false) =>\n cn(\n 'group relative flex w-full items-center rounded leading-8 !text-black px-2 focus-visible:yt-focus-dark',\n // override styles for links that are children of collapsible menus\n 'font-bold [[role=menu]>li>&]:font-normal [[role=menu]>li>&]:pl-5',\n // override styles to adjust icons included in menu links\n '[&_[data-taco=\"icon\"]]:!h-5 [&_[data-taco=\"icon\"]]:!w-5',\n // override styles to adjust badges included in menu links\n '[&>span_[data-taco=\"badge\"]]:mr-2.5 [[role=menu]>li>&>span_[data-taco=\"badge\"]]:mr-2',\n {\n 'hover:bg-black/[.06] aria-current-page:bg-blue-500/[.1]': !isDraggedOver,\n '!bg-blue-500 !text-white [&>*]:!text-white': isDraggedOver,\n }\n );\n\nexport type Navigation2LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n active?: boolean;\n icon?: IconName;\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n /** Handler to be used when dropping a dragged element over the Navigation2 link */\n onDrop?: React.DragEventHandler;\n /** Total shown inside a Badge component */\n total?: number;\n};\n\nexport const Link = React.forwardRef<HTMLAnchorElement, Navigation2LinkProps>(function Link(props, ref) {\n const { active, children, icon, menu, onDrop, total, ...attributes } = props;\n const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);\n\n const className = cn(getNavigationLinkClasses(isDraggedOver), attributes.className);\n\n const listClassName = cn('[[role=menubar]>&]:px-3 border-grey-200', getAdjacentClasses(), {\n '[&>*]:pointer-events-none': isDraggedOver,\n });\n\n return (\n <li {...dropTargetProps} className={listClassName} data-taco=\"navigation2-link-item\" role=\"none\">\n <a\n {...attributes}\n aria-current={active ? 'page' : undefined}\n className={className}\n data-taco=\"navigation2-link\"\n ref={ref}\n role=\"menuitem\"\n tabIndex={0}>\n {icon ? <Icon className=\"mr-1.5 [[role=menu]>li>a>&]:-ml-1.5 [[role=menu]>li>a>&]:mr-0.5\" name={icon} /> : null}\n <span className=\"flex flex-grow items-center truncate\">{children}</span>\n {menu ? (\n <IconButton\n appearance=\"discrete\"\n icon=\"more\"\n aria-label=\"More\"\n rounded\n className={cn(\n '-mr-1.5 hidden flex-shrink-0 flex-grow-0 transition-none group-hover:flex aria-expanded:flex',\n {\n 'absolute right-0 !mr-0.5': total !== undefined,\n }\n )}\n menu={menu}\n onClick={event => {\n event.preventDefault();\n event.stopPropagation();\n }}\n />\n ) : null}\n {total !== undefined ? (\n <Badge\n className={cn('flex-shrink-0 flex-grow-0 !font-normal', {\n 'group-hover:hidden [[aria-expanded=\"true\"]+&]:hidden ': menu,\n })}\n color=\"transparent\">\n {total}\n </Badge>\n ) : null}\n </a>\n </li>\n );\n});\n"],"names":["getNavigationLinkClasses","isDraggedOver","cn","Link","React","forwardRef","props","ref","active","children","icon","menu","onDrop","total","attributes","dropTargetProps","useDropTarget","className","listClassName","getAdjacentClasses","role","undefined","tabIndex","Icon","name","IconButton","appearance","rounded","onClick","event","preventDefault","stopPropagation","Badge","color"],"m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IACPV,SAAS,EAAEf,EAAE,CACT,8FAA8F,EAC9F;MACI,0BAA0B,EAAEW,KAAK,KAAKQ;KACzC,CACJ;IACDV,IAAI,EAAEA,IAAI;IACViB,OAAO,EAAEC,KAAK;MACVA,KAAK,CAACC,cAAc,EAAE;MACtBD,KAAK,CAACE,eAAe,EAAE;;IAE7B,IACF,IAAI,EACPlB,KAAK,KAAKQ,SAAS,kBAChBjB,6BAAC4B,KAAK;IACFf,SAAS,EAAEf,EAAE,CAAC,wCAAwC,EAAE;MACpD,uDAAuD,EAAES;KAC5D,CAAC;IACFsB,KAAK,EAAC;KACLpB,KAAK,CACF,IACR,IAAI,CACR,CACH;AAEb,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import cn from 'classnames';
2
+ import cn from 'clsx';
3
3
  import { getAdjacentClasses } from './util.js';
4
4
 
5
5
  const Section = /*#__PURE__*/React__default.forwardRef(function Navigation2(props, ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"Section.js","sources":["../../../../../../../../src/components/Navigation2/components/Section.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { getAdjacentClasses } from './util';\n\nexport type Navigation2SectionProps = React.LiHTMLAttributes<HTMLLIElement> & {\n heading?: string;\n};\n\nexport const Section = React.forwardRef<HTMLLIElement, Navigation2SectionProps>(function Navigation2(props, ref) {\n const { children, heading, ...attributes } = props;\n const className = cn(\n 'w-full overflow-auto px-3 py-2 flex-grow border-grey-200 bg-grey-50 [[role=menubar]>&:first-child]:pt-0',\n getAdjacentClasses(),\n props.className\n );\n\n return (\n <li {...attributes} className={className} data-taco=\"navigation2-section\" ref={ref} role=\"none\">\n {heading ? (\n <span className=\"text-grey-500 mb-px truncate pl-5 text-xs font-bold uppercase leading-8 lg:hidden\">\n {heading}\n </span>\n ) : null}\n <ul className=\"mb-0 flex flex-col gap-y-px\">{children}</ul>\n </li>\n );\n});\n"],"names":["Section","React","forwardRef","Navigation2","props","ref","children","heading","attributes","className","cn","getAdjacentClasses","role"],"mappings":";;;;MAQaA,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAAyC,SAASC,WAAWA,CAACC,KAAK,EAAEC,GAAG;EAC3G,MAAM;IAAEC,QAAQ;IAAEC,OAAO;IAAE,GAAGC;GAAY,GAAGJ,KAAK;EAClD,MAAMK,SAAS,GAAGC,EAAE,CAChB,yGAAyG,EACzGC,kBAAkB,EAAE,EACpBP,KAAK,CAACK,SAAS,CAClB;EAED,oBACIR,qDAAQO,UAAU;IAAEC,SAAS,EAAEA,SAAS;iBAAY,qBAAqB;IAACJ,GAAG,EAAEA,GAAG;IAAEO,IAAI,EAAC;MACpFL,OAAO,kBACJN;IAAMQ,SAAS,EAAC;KACXF,OAAO,CACL,IACP,IAAI,eACRN;IAAIQ,SAAS,EAAC;KAA+BH,QAAQ,CAAM,CAC1D;AAEb,CAAC;;;;"}
1
+ {"version":3,"file":"Section.js","sources":["../../../../../../../../src/components/Navigation2/components/Section.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { getAdjacentClasses } from './util';\n\nexport type Navigation2SectionProps = React.LiHTMLAttributes<HTMLLIElement> & {\n heading?: string;\n};\n\nexport const Section = React.forwardRef<HTMLLIElement, Navigation2SectionProps>(function Navigation2(props, ref) {\n const { children, heading, ...attributes } = props;\n const className = cn(\n 'w-full overflow-auto px-3 py-2 flex-grow border-grey-200 bg-grey-50 [[role=menubar]>&:first-child]:pt-0',\n getAdjacentClasses(),\n props.className\n );\n\n return (\n <li {...attributes} className={className} data-taco=\"navigation2-section\" ref={ref} role=\"none\">\n {heading ? (\n <span className=\"text-grey-500 mb-px truncate pl-5 text-xs font-bold uppercase leading-8 lg:hidden\">\n {heading}\n </span>\n ) : null}\n <ul className=\"mb-0 flex flex-col gap-y-px\">{children}</ul>\n </li>\n );\n});\n"],"names":["Section","React","forwardRef","Navigation2","props","ref","children","heading","attributes","className","cn","getAdjacentClasses","role"],"mappings":";;;;MAQaA,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAAyC,SAASC,WAAWA,CAACC,KAAK,EAAEC,GAAG;EAC3G,MAAM;IAAEC,QAAQ;IAAEC,OAAO;IAAE,GAAGC;GAAY,GAAGJ,KAAK;EAClD,MAAMK,SAAS,GAAGC,EAAE,CAChB,yGAAyG,EACzGC,kBAAkB,EAAE,EACpBP,KAAK,CAACK,SAAS,CAClB;EAED,oBACIR,qDAAQO,UAAU;IAAEC,SAAS,EAAEA,SAAS;iBAAY,qBAAqB;IAACJ,GAAG,EAAEA,GAAG;IAAEO,IAAI,EAAC;MACpFL,OAAO,kBACJN;IAAMQ,SAAS,EAAC;KACXF,OAAO,CACL,IACP,IAAI,eACRN;IAAIQ,SAAS,EAAC;KAA+BH,QAAQ,CAAM,CAC1D;AAEb,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- import cn from 'classnames';
1
+ import cn from 'clsx';
2
2
 
3
3
  const getAdjacentClasses = () => cn(
4
4
  // styling if the element is proceeded by a link item
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sources":["../../../../../../../../src/components/Navigation2/components/util.ts"],"sourcesContent":["import cn from 'classnames';\n\nexport const getAdjacentClasses = () =>\n cn(\n // styling if the element is proceeded by a link item\n '[[role=menubar]>[data-taco=navigation2-link-item]+&]:mt-2',\n \"[[role=menubar]>[data-taco='navigation2-link-item']+&]:border-t-2\",\n \"[[role=menubar]>[data-taco='navigation2-link-item']+&]:pt-2 \",\n // styling if the element is proceeded by content\n \"[[role=menubar]>[data-taco='navigation2-content']+&]:border-t-2\",\n \"[[role=menubar]>[data-taco='navigation2-content']+&]:pt-2\",\n // styling if the element is proceeded by a section\n \"[[role=menubar]>[data-taco='navigation2-section']+&]:border-t-2\",\n \"[[role=menubar]>[data-taco='navigation2-section']+&]:pt-2\"\n );\n"],"names":["getAdjacentClasses","cn"],"mappings":";;MAEaA,kBAAkB,GAAGA,MAC9BC,EAAE;AACE;AACA,2DAA2D,EAC3D,mEAAmE,EACnE,8DAA8D;AAC9D;AACA,iEAAiE,EACjE,2DAA2D;AAC3D;AACA,iEAAiE,EACjE,2DAA2D;;;;"}
1
+ {"version":3,"file":"util.js","sources":["../../../../../../../../src/components/Navigation2/components/util.ts"],"sourcesContent":["import cn from 'clsx';\n\nexport const getAdjacentClasses = () =>\n cn(\n // styling if the element is proceeded by a link item\n '[[role=menubar]>[data-taco=navigation2-link-item]+&]:mt-2',\n \"[[role=menubar]>[data-taco='navigation2-link-item']+&]:border-t-2\",\n \"[[role=menubar]>[data-taco='navigation2-link-item']+&]:pt-2 \",\n // styling if the element is proceeded by content\n \"[[role=menubar]>[data-taco='navigation2-content']+&]:border-t-2\",\n \"[[role=menubar]>[data-taco='navigation2-content']+&]:pt-2\",\n // styling if the element is proceeded by a section\n \"[[role=menubar]>[data-taco='navigation2-section']+&]:border-t-2\",\n \"[[role=menubar]>[data-taco='navigation2-section']+&]:pt-2\"\n );\n"],"names":["getAdjacentClasses","cn"],"mappings":";;MAEaA,kBAAkB,GAAGA,MAC9BC,EAAE;AACE;AACA,2DAA2D,EAC3D,mEAAmE,EACnE,8DAA8D;AAC9D;AACA,iEAAiE,EACjE,2DAA2D;AAC3D;AACA,iEAAiE,EACjE,2DAA2D;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import cn from 'classnames';
2
+ import cn from 'clsx';
3
3
  import { useMergedRef } from '../../hooks/useMergedRef.js';
4
4
  import { IconButton } from '../IconButton/IconButton.js';
5
5
  import { Menu } from '../Menu/Menu.js';
@@ -1 +1 @@
1
- {"version":3,"file":"OverflowGroup.js","sources":["../../../../../../../src/components/OverflowGroup/OverflowGroup.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { ButtonProps } from '../Button/Button';\nimport { Menu } from '../Menu/Menu';\nimport { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport { IconButton } from '../IconButton/IconButton';\n\nconst sanitizeButtonPropsForMenuItem = (button: any, index) => {\n const href: string | undefined = button.props.to || button.props.href;\n const Tag = href ? Menu.Link : Menu.Item;\n\n // Removing className prop so that custom styling cannot be applied on Menu.Link\n const {\n as,\n className: _,\n appearance: _1,\n drawer: _2,\n fluid: _3,\n hanger: _4,\n menu: _5,\n popover: _6,\n tooltip: _7,\n ...attributes\n } = button.props;\n\n const props = {\n ...attributes,\n key: index,\n target: href ? (href.startsWith('http') ? '_blank' : '_self') : undefined,\n };\n\n if (as) {\n return React.cloneElement(button, { as: Tag, ...props });\n }\n\n return <Tag {...props} />;\n};\n\ntype OverflowGroupProps = React.HTMLAttributes<HTMLElement> & {\n moreButton?: React.ReactElement<ButtonProps>;\n};\n\nconst DEFAULT_OFFSET = 32 + 8;\n\nexport const OverflowGroup = React.forwardRef(function OverflowGroup(props: OverflowGroupProps, ref: React.Ref<HTMLDivElement>) {\n const { moreButton: MoreButton, ...attributes } = props;\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n // determine width of more button, to add intersection observer margin\n const [buttonWidth, setButtonWidth] = React.useState(DEFAULT_OFFSET);\n const buttonRefCallback = React.useCallback((el: HTMLElement) => setButtonWidth(el?.getBoundingClientRect()?.width), []);\n const button = MoreButton ?? <IconButton icon=\"more\" />;\n\n const intersectedChildIndex = useIntersectionObserver(internalRef, buttonWidth);\n const children = React.Children.toArray(props.children) as React.ReactElement<ButtonProps>[];\n const hiddenChildren = intersectedChildIndex !== undefined ? children.slice(intersectedChildIndex) : [];\n\n const className = cn('flex overflow-hidden', props.className);\n\n return (\n <div {...attributes} className={className} data-taco=\"overflow-group\" ref={internalRef}>\n {children.map((child, index) =>\n React.cloneElement(child, {\n className: cn(child.props.className, {\n visible: intersectedChildIndex === undefined || index < intersectedChildIndex,\n 'invisible order-[100] pointer-events-none':\n intersectedChildIndex !== undefined && index >= intersectedChildIndex,\n }),\n })\n )}\n {hiddenChildren.length\n ? React.cloneElement(button, {\n className: cn('sticky right-0 order-[99]', button.props.className),\n 'data-observer-ignore': true,\n menu: menuProps => (\n <Menu {...menuProps}>\n <Menu.Content>{hiddenChildren.map(sanitizeButtonPropsForMenuItem)}</Menu.Content>\n </Menu>\n ),\n ref: buttonRefCallback,\n })\n : null}\n </div>\n );\n});\n"],"names":["sanitizeButtonPropsForMenuItem","button","index","href","props","to","Tag","Menu","Link","Item","as","className","_","appearance","_1","drawer","_2","fluid","_3","hanger","_4","menu","_5","popover","_6","tooltip","_7","attributes","key","target","startsWith","undefined","React","cloneElement","DEFAULT_OFFSET","OverflowGroup","forwardRef","ref","moreButton","MoreButton","internalRef","useMergedRef","buttonWidth","setButtonWidth","useState","buttonRefCallback","useCallback","el","_el$getBoundingClient","getBoundingClientRect","width","IconButton","icon","intersectedChildIndex","useIntersectionObserver","children","Children","toArray","hiddenChildren","slice","cn","map","child","visible","length","menuProps","Content"],"mappings":";;;;;;;AAQA,MAAMA,8BAA8B,GAAGA,CAACC,MAAW,EAAEC,KAAK;EACtD,MAAMC,IAAI,GAAuBF,MAAM,CAACG,KAAK,CAACC,EAAE,IAAIJ,MAAM,CAACG,KAAK,CAACD,IAAI;EACrE,MAAMG,GAAG,GAAGH,IAAI,GAAGI,IAAI,CAACC,IAAI,GAAGD,IAAI,CAACE,IAAI;;EAGxC,MAAM;IACFC,EAAE;IACFC,SAAS,EAAEC,CAAC;IACZC,UAAU,EAAEC,EAAE;IACdC,MAAM,EAAEC,EAAE;IACVC,KAAK,EAAEC,EAAE;IACTC,MAAM,EAAEC,EAAE;IACVC,IAAI,EAAEC,EAAE;IACRC,OAAO,EAAEC,EAAE;IACXC,OAAO,EAAEC,EAAE;IACX,GAAGC;GACN,GAAG1B,MAAM,CAACG,KAAK;EAEhB,MAAMA,KAAK,GAAG;IACV,GAAGuB,UAAU;IACbC,GAAG,EAAE1B,KAAK;IACV2B,MAAM,EAAE1B,IAAI,GAAIA,IAAI,CAAC2B,UAAU,CAAC,MAAM,CAAC,GAAG,QAAQ,GAAG,OAAO,GAAIC;GACnE;EAED,IAAIrB,EAAE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ACO,SAAS,CAAC;EAE7D,oBACIqB,sDAASL,UAAU;IAAEhB,SAAS,EAAEA,SAAS;iBAAY,gBAAgB;IAAC0B,GAAG,EAAEG;MACtEe,QAAQ,CAACM,GAAG,CAAC,CAACC,KAAK,EAAE5D,KAAK,kBACvB8B,cAAK,CAACC,YAAY,CAAC6B,KAAK,EAAE;IACtBnD,SAAS,EAAEiD,EAAE,CAACE,KAAK,CAAC1D,KAAK,CAACO,SAAS,EAAE;MACjCoD,OAAO,EAAEV,qBAAqB,KAAKtB,SAAS,IAAI7B,KAAK,GAAGmD,qBAAqB;MAC7E,2CAA2C,EACvCA,qBAAqB,KAAKtB,SAAS,IAAI7B,KAAK,IAAImD;KACvD;GACJ,CAAC,CACL,EACAK,cAAc,CAACM,MAAM,gBAChBhC,cAAK,CAACC,YAAY,CAAChC,MAAM,EAAE;IACvBU,SAAS,EAAEiD,EAAE,CAAC,2BAA2B,EAAE3D,MAAM,CAACG,KAAK,CAACO,SAAS,CAAC;IAClE,sBAAsB,EAAE,IAAI;IAC5BU,IAAI,EAAE4C,SAAS,mBACXjC,6BAACzB,IAAI,oBAAK0D,SAAS,gBACfjC,6BAACzB,IAAI,CAAC2D,OAAO,QAAER,cAAc,CAACG,GAAG,CAAC7D,8BAA8B,CAAC,CAAgB,CAC9E,CACV;IACDqC,GAAG,EAAEQ;GACR,CAAC,GACF,IAAI,CACR;AAEd,CAAC;;;;"}
1
+ {"version":3,"file":"OverflowGroup.js","sources":["../../../../../../../src/components/OverflowGroup/OverflowGroup.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { ButtonProps } from '../Button/Button';\nimport { Menu } from '../Menu/Menu';\nimport { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport { IconButton } from '../IconButton/IconButton';\n\nconst sanitizeButtonPropsForMenuItem = (button: any, index) => {\n const href: string | undefined = button.props.to || button.props.href;\n const Tag = href ? Menu.Link : Menu.Item;\n\n // Removing className prop so that custom styling cannot be applied on Menu.Link\n const {\n as,\n className: _,\n appearance: _1,\n drawer: _2,\n fluid: _3,\n hanger: _4,\n menu: _5,\n popover: _6,\n tooltip: _7,\n ...attributes\n } = button.props;\n\n const props = {\n ...attributes,\n key: index,\n target: href ? (href.startsWith('http') ? '_blank' : '_self') : undefined,\n };\n\n if (as) {\n return React.cloneElement(button, { as: Tag, ...props });\n }\n\n return <Tag {...props} />;\n};\n\ntype OverflowGroupProps = React.HTMLAttributes<HTMLElement> & {\n moreButton?: React.ReactElement<ButtonProps>;\n};\n\nconst DEFAULT_OFFSET = 32 + 8;\n\nexport const OverflowGroup = React.forwardRef(function OverflowGroup(props: OverflowGroupProps, ref: React.Ref<HTMLDivElement>) {\n const { moreButton: MoreButton, ...attributes } = props;\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n // determine width of more button, to add intersection observer margin\n const [buttonWidth, setButtonWidth] = React.useState(DEFAULT_OFFSET);\n const buttonRefCallback = React.useCallback((el: HTMLElement) => setButtonWidth(el?.getBoundingClientRect()?.width), []);\n const button = MoreButton ?? <IconButton icon=\"more\" />;\n\n const intersectedChildIndex = useIntersectionObserver(internalRef, buttonWidth);\n const children = React.Children.toArray(props.children) as React.ReactElement<ButtonProps>[];\n const hiddenChildren = intersectedChildIndex !== undefined ? children.slice(intersectedChildIndex) : [];\n\n const className = cn('flex overflow-hidden', props.className);\n\n return (\n <div {...attributes} className={className} data-taco=\"overflow-group\" ref={internalRef}>\n {children.map((child, index) =>\n React.cloneElement(child, {\n className: cn(child.props.className, {\n visible: intersectedChildIndex === undefined || index < intersectedChildIndex,\n 'invisible order-[100] pointer-events-none':\n intersectedChildIndex !== undefined && index >= intersectedChildIndex,\n }),\n })\n )}\n {hiddenChildren.length\n ? React.cloneElement(button, {\n className: cn('sticky right-0 order-[99]', button.props.className),\n 'data-observer-ignore': true,\n menu: menuProps => (\n <Menu {...menuProps}>\n <Menu.Content>{hiddenChildren.map(sanitizeButtonPropsForMenuItem)}</Menu.Content>\n </Menu>\n ),\n ref: buttonRefCallback,\n })\n : null}\n </div>\n );\n});\n"],"names":["sanitizeButtonPropsForMenuItem","button","index","href","props","to","Tag","Menu","Link","Item","as","className","_","appearance","_1","drawer","_2","fluid","_3","hanger","_4","menu","_5","popover","_6","tooltip","_7","attributes","key","target","startsWith","undefined","React","cloneElement","DEFAULT_OFFSET","OverflowGroup","forwardRef","ref","moreButton","MoreButton","internalRef","useMergedRef","buttonWidth","setButtonWidth","useState","buttonRefCallback","useCallback","el","_el$getBoundingClient","getBoundingClientRect","width","IconButton","icon","intersectedChildIndex","useIntersectionObserver","children","Children","toArray","hiddenChildren","slice","cn","map","child","visible","length","menuProps","Content"],"mappings":";;;;;;;AAQA,MAAMA,8BAA8B,GAAGA,CAACC,MAAW,EAAEC,KAAK;EACtD,MAAMC,IAAI,GAAuBF,MAAM,CAACG,KAAK,CAACC,EAAE,IAAIJ,MAAM,CAACG,KAAK,CAACD,IAAI;EACrE,MAAMG,GAAG,GAAGH,IAAI,GAAGI,IAAI,CAACC,IAAI,GAAGD,IAAI,CAACE,IAAI;;EAGxC,MAAM;IACFC,EAAE;IACFC,SAAS,EAAEC,CAAC;IACZC,UAAU,EAAEC,EAAE;IACdC,MAAM,EAAEC,EAAE;IACVC,KAAK,EAAEC,EAAE;IACTC,MAAM,EAAEC,EAAE;IACVC,IAAI,EAAEC,EAAE;IACRC,OAAO,EAAEC,EAAE;IACXC,OAAO,EAAEC,EAAE;IACX,GAAGC;GACN,GAAG1B,MAAM,CAACG,KAAK;EAEhB,MAAMA,KAAK,GAAG;IACV,GAAGuB,UAAU;IACbC,GAAG,EAAE1B,KAAK;IACV2B,MAAM,EAAE1B,IAAI,GAAIA,IAAI,CAAC2B,UAAU,CAAC,MAAM,CAAC,GAAG,QAAQ,GAAG,OAAO,GAAIC;GACnE;EAED,IAAIrB,EAAE,EAAE;IACJ,oBAAOsB,cAAK,CAACC,YAAY,CAAChC,MAAM,EAAE;MAAES,EAAE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;iBAAY,gBAAgB;IAAC0B,GAAG,EAAEG;MACtEe,QAAQ,CAACM,GAAG,CAAC,CAACC,KAAK,EAAE5D,KAAK,kBACvB8B,cAAK,CAACC,YAAY,CAAC6B,KAAK,EAAE;IACtBnD,SAAS,EAAEiD,EAAE,CAACE,KAAK,CAAC1D,KAAK,CAACO,SAAS,EAAE;MACjCoD,OAAO,EAAEV,qBAAqB,KAAKtB,SAAS,IAAI7B,KAAK,GAAGmD,qBAAqB;MAC7E,2CAA2C,EACvCA,qBAAqB,KAAKtB,SAAS,IAAI7B,KAAK,IAAImD;KACvD;GACJ,CAAC,CACL,EACAK,cAAc,CAACM,MAAM,gBAChBhC,cAAK,CAACC,YAAY,CAAChC,MAAM,EAAE;IACvBU,SAAS,EAAEiD,EAAE,CAAC,2BAA2B,EAAE3D,MAAM,CAACG,KAAK,CAACO,SAAS,CAAC;IAClE,sBAAsB,EAAE,IAAI;IAC5BU,IAAI,EAAE4C,SAAS,mBACXjC,6BAACzB,IAAI,oBAAK0D,SAAS,gBACfjC,6BAACzB,IAAI,CAAC2D,OAAO,QAAER,cAAc,CAACG,GAAG,CAAC7D,8BAA8B,CAAC,CAAgB,CAC9E,CACV;IACDqC,GAAG,EAAEQ;GACR,CAAC,GACF,IAAI,CACR;AAEd,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { forwardRef, createElement } from 'react';
2
- import cn from 'classnames';
2
+ import cn from 'clsx';
3
3
  import { IconButton } from '../IconButton/IconButton.js';
4
4
  import { useLocalization } from '../Provider/Localization.js';
5
5
  import { Group } from '../Group/Group.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","sources":["../../../../../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { PageNumbers } from './PageNumbers';\nimport { LocalizationTexts, useLocalization } from '../Provider/Localization';\nimport { Select } from '../Select/Select';\nimport { Group } from '../Group/Group';\nimport { IconButton } from '../IconButton/IconButton';\nimport { usePaginationValues } from './usePagination';\nimport { usePaginationShortcuts } from './usePaginationShortcuts';\n\nexport * from './usePagination';\n\nexport type PaginationTextsActions = {\n /**\n * Aria-label for first page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n firstPage: string;\n /**\n * Aria-label for first page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n firstPageWithShortcut: string;\n /**\n * Aria-label for next page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n nextPage: string;\n /**\n * Aria-label for next page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n nextPageWithShortcut: string;\n /**\n * Aria-label for previous page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n previousPage: string;\n /**\n * Aria-label for previous page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n previousPageWithShortcut: string;\n /**\n * Aria-label for last page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n lastPage: string;\n /**\n * Aria-label for last page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n lastPageWithShortcut: string;\n /**\n * Aria-label for page X action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n pageX: string;\n};\n\nexport type PaginationTexts = {\n /**\n * Aria-label provided for page numbers and page actions group.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n label: string;\n /**\n * Aria-label provided for page size selection.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n pageSize: string;\n /**\n * Text that indicates the number of the first and last element displayed on the current page, out of total items\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n showingXofYofTotal: string;\n /**\n * Aria-labels provided for page action buttons.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n actions: PaginationTextsActions;\n};\n\nexport type PaginationProps = React.HTMLAttributes<HTMLDivElement> &\n usePaginationValues & {\n /** Indicate total number of items that will be paginated */\n length: number;\n /** Page size options */\n pageSizes?: number[];\n /** Shows page controls */\n showPageControls?: boolean;\n /** Shows page numbers between navigation buttons, which allows users to quickly navigate to a specific page */\n showPageNumbers?: boolean;\n /** Shows a dropdown with page sizes, which allows user to change the number of items displayed on the page */\n showPageSize?: boolean;\n /** Enable pagination shortcuts */\n dangerouslyHijackGlobalKeyboardNavigation?: boolean;\n };\n\nconst getShowingLabel = (length: number, pageIndex: number, pageSize: number, texts: LocalizationTexts): string => {\n const minItemIndex = pageIndex * pageSize + 1;\n const maxItemIndex = (pageIndex + 1) * pageSize;\n\n return texts.pagination.showingXofYofTotal\n .replace('[X]', length === 0 ? '0' : String(minItemIndex))\n .replace('[Y]', String(maxItemIndex > length ? length : maxItemIndex))\n .replace('[total]', String(length));\n};\n\nexport const Pagination = React.forwardRef(function Pagination(props: PaginationProps, ref: React.Ref<HTMLDivElement>) {\n const {\n length,\n pageIndex,\n pageSize,\n pageSizes = [10, 25, 50, 100, 500],\n setPageIndex,\n setPageSize,\n showPageControls = true,\n showPageNumbers = true,\n showPageSize = true,\n dangerouslyHijackGlobalKeyboardNavigation = false,\n ...otherProps\n } = props;\n const { texts } = useLocalization();\n\n const maxPageIndex = Math.ceil(length / pageSize) - 1;\n const showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;\n\n usePaginationShortcuts({\n setPageIndex,\n maxPageIndex,\n pageIndex,\n dangerouslyHijackGlobalKeyboardNavigation,\n });\n\n const pageCount = Math.ceil(length / pageSize);\n const canPreviousPage = pageIndex > 0;\n const canNextPage = pageIndex < pageCount - 1;\n\n const className = cn('inline-flex relative justify-between items-center', props.className);\n\n return (\n <div {...otherProps} className={className} data-taco=\"pagination\" ref={ref}>\n {showPageSize && (\n <span className=\"mr-4\">\n {getShowingLabel(length, pageIndex, pageSize, texts)}\n <Select\n aria-label={texts.pagination.pageSize}\n className=\"ml-4 !w-20\"\n data={pageSizes.map(pageSize => ({\n text: String(pageSize),\n value: pageSize,\n }))}\n onChange={event => {\n setPageIndex(0);\n setPageSize(Number(event.target.value));\n }}\n value={pageSize}\n />\n </span>\n )}\n {showPageControls && (\n <Group as=\"nav\" aria-label={texts.pagination.label}>\n <IconButton\n appearance=\"default\"\n disabled={!canPreviousPage}\n icon=\"arrow-start\"\n onClick={() => setPageIndex(0)}\n aria-label={\n showShortcutTexts\n ? texts.pagination.actions.firstPageWithShortcut\n : texts.pagination.actions.firstPage\n }\n tooltip={\n showShortcutTexts\n ? texts.pagination.actions.firstPageWithShortcut\n : texts.pagination.actions.firstPage\n }\n />\n <IconButton\n appearance=\"default\"\n disabled={!canPreviousPage}\n icon=\"arrow-left\"\n onClick={() => setPageIndex(pageIndex - 1)}\n aria-label={\n showShortcutTexts\n ? texts.pagination.actions.previousPageWithShortcut\n : texts.pagination.actions.previousPage\n }\n tooltip={\n showShortcutTexts\n ? texts.pagination.actions.previousPageWithShortcut\n : texts.pagination.actions.previousPage\n }\n />\n {showPageNumbers && pageCount > 0 && (\n <PageNumbers pageCount={pageCount} currentPageIndex={pageIndex} onClick={setPageIndex} />\n )}\n <IconButton\n appearance=\"default\"\n disabled={!canNextPage}\n icon=\"arrow-right\"\n onClick={() => setPageIndex(pageIndex + 1)}\n aria-label={\n showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage\n }\n tooltip={\n showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage\n }\n />\n <IconButton\n appearance=\"default\"\n disabled={!canNextPage}\n icon=\"arrow-end\"\n onClick={() => setPageIndex(pageCount - 1)}\n aria-label={\n showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage\n }\n tooltip={\n showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage\n }\n />\n </Group>\n )}\n </div>\n );\n});\n"],"names":["getShowingLabel","length","pageIndex","pageSize","texts","minItemIndex","maxItemIndex","pagination","showingXofYofTotal","replace","String","Pagination","React","props","ref","pageSizes","setPageIndex","setPageSize","showPageControls","showPageNumbers","showPageSize","dangerouslyHijackGlobalKeyboardNavigation","otherProps","useLocalization","maxPageIndex","Math","ceil","showShortcutTexts","usePaginationShortcuts","pageCount","canPreviousPage","canNextPage","className","cn","Select","data","map","text","value","onChange","event","Number","target","Group","as","label","IconButton","appearance","disabled","icon","onClick","actions","firstPageWithShortcut","firstPage","tooltip","previousPageWithShortcut","previousPage","PageNumbers","currentPageIndex","nextPageWithShortcut","nextPage","lastPageWithShortcut","lastPage"],"mappings":";;;;;;;;;;AAmGA,MAAMA,eAAe,GAAGA,CAACC,MAAc,EAAEC,SAAiB,EAAEC,QAAgB,EAAEC,KAAwB;EAClG,MAAMC,YAAY,GAAGH,SAAS,GAAGC,QAAQ,GAAG,CAAC;EAC7C,MAAMG,YAAY,GAAG,CAACJ,SAAS,GAAG,CAAC,IAAIC,QAAQ;EAE/C,OAAOC,KAAK,CAACG,UAAU,CAACC,kBAAkB,CACrCC,OAAO,CAAC,KAAK,EAAER,MAAM,KAAK,CAAC,GAAG,GAAG,GAAGS,MAAM,CAACL,YAAY,CAAC,CAAC,CACzDI,OAAO,CAAC,KAAK,EAAEC,MAAM,CAACJ,YAAY,GAAGL,MAAM,GAAGA,MAAM,GAAGK,YAAY,CAAC,CAAC,CACrEG,OAAO,CAAC,SAAS,EAAEC,MAAM,CAACT,MAAM,CAAC,CAAC;AAC3C,CAAC;MAEYU,UAAU,gBAAGC,UAAgB,CAAC,SAASD,UAAUA,CAACE,KAAsB,EAAEC,GAA8B;EACjH,MAAM;IACFb,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRY,SAAS,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC;IAClCC,YAAY;IACZC,WAAW;IACXC,gBAAgB,GAAG,IAAI;IACvBC,eAAe,GAAG,IAAI;IACtBC,YAAY,GAAG,IAAI;IACnBC,yCAAyC,GAAG,KAAK;IACjD,GAAGC;GACN,GAAGT,KAAK;EACT,MAAM;IAAET;GAAO,GAAGmB,eAAe,EAAE;EAEnC,MAAM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ACG,UAAU,CAAC4C,OAAO,CAACS,QAAQ;IAEzGN,OAAO,EACH3B,iBAAiB,GAAGvB,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACQ,oBAAoB,GAAGvD,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACS;IAEnG,eACFhD,cAACkC,UAAU;IACPC,UAAU,EAAC,SAAS;IACpBC,QAAQ,EAAE,CAACjB,WAAW;IACtBkB,IAAI,EAAC,WAAW;IAChBC,OAAO,EAAEA,MAAMlC,YAAY,CAACa,SAAS,GAAG,CAAC,CAAC;kBAEtCF,iBAAiB,GAAGvB,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACU,oBAAoB,GAAGzD,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACW,QAAQ;IAEzGR,OAAO,EACH3B,iBAAiB,GAAGvB,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACU,oBAAoB,GAAGzD,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACW;IAEnG,CACE,CACX,CACC;AAEd,CAAC;;;;"}
1
+ {"version":3,"file":"Pagination.js","sources":["../../../../../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport { PageNumbers } from './PageNumbers';\nimport { LocalizationTexts, useLocalization } from '../Provider/Localization';\nimport { Select } from '../Select/Select';\nimport { Group } from '../Group/Group';\nimport { IconButton } from '../IconButton/IconButton';\nimport { usePaginationValues } from './usePagination';\nimport { usePaginationShortcuts } from './usePaginationShortcuts';\n\nexport * from './usePagination';\n\nexport type PaginationTextsActions = {\n /**\n * Aria-label for first page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n firstPage: string;\n /**\n * Aria-label for first page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n firstPageWithShortcut: string;\n /**\n * Aria-label for next page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n nextPage: string;\n /**\n * Aria-label for next page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n nextPageWithShortcut: string;\n /**\n * Aria-label for previous page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n previousPage: string;\n /**\n * Aria-label for previous page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n previousPageWithShortcut: string;\n /**\n * Aria-label for last page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n lastPage: string;\n /**\n * Aria-label for last page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n lastPageWithShortcut: string;\n /**\n * Aria-label for page X action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n pageX: string;\n};\n\nexport type PaginationTexts = {\n /**\n * Aria-label provided for page numbers and page actions group.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n label: string;\n /**\n * Aria-label provided for page size selection.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n pageSize: string;\n /**\n * Text that indicates the number of the first and last element displayed on the current page, out of total items\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n showingXofYofTotal: string;\n /**\n * Aria-labels provided for page action buttons.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n actions: PaginationTextsActions;\n};\n\nexport type PaginationProps = React.HTMLAttributes<HTMLDivElement> &\n usePaginationValues & {\n /** Indicate total number of items that will be paginated */\n length: number;\n /** Page size options */\n pageSizes?: number[];\n /** Shows page controls */\n showPageControls?: boolean;\n /** Shows page numbers between navigation buttons, which allows users to quickly navigate to a specific page */\n showPageNumbers?: boolean;\n /** Shows a dropdown with page sizes, which allows user to change the number of items displayed on the page */\n showPageSize?: boolean;\n /** Enable pagination shortcuts */\n dangerouslyHijackGlobalKeyboardNavigation?: boolean;\n };\n\nconst getShowingLabel = (length: number, pageIndex: number, pageSize: number, texts: LocalizationTexts): string => {\n const minItemIndex = pageIndex * pageSize + 1;\n const maxItemIndex = (pageIndex + 1) * pageSize;\n\n return texts.pagination.showingXofYofTotal\n .replace('[X]', length === 0 ? '0' : String(minItemIndex))\n .replace('[Y]', String(maxItemIndex > length ? length : maxItemIndex))\n .replace('[total]', String(length));\n};\n\nexport const Pagination = React.forwardRef(function Pagination(props: PaginationProps, ref: React.Ref<HTMLDivElement>) {\n const {\n length,\n pageIndex,\n pageSize,\n pageSizes = [10, 25, 50, 100, 500],\n setPageIndex,\n setPageSize,\n showPageControls = true,\n showPageNumbers = true,\n showPageSize = true,\n dangerouslyHijackGlobalKeyboardNavigation = false,\n ...otherProps\n } = props;\n const { texts } = useLocalization();\n\n const maxPageIndex = Math.ceil(length / pageSize) - 1;\n const showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;\n\n usePaginationShortcuts({\n setPageIndex,\n maxPageIndex,\n pageIndex,\n dangerouslyHijackGlobalKeyboardNavigation,\n });\n\n const pageCount = Math.ceil(length / pageSize);\n const canPreviousPage = pageIndex > 0;\n const canNextPage = pageIndex < pageCount - 1;\n\n const className = cn('inline-flex relative justify-between items-center', props.className);\n\n return (\n <div {...otherProps} className={className} data-taco=\"pagination\" ref={ref}>\n {showPageSize && (\n <span className=\"mr-4\">\n {getShowingLabel(length, pageIndex, pageSize, texts)}\n <Select\n aria-label={texts.pagination.pageSize}\n className=\"ml-4 !w-20\"\n data={pageSizes.map(pageSize => ({\n text: String(pageSize),\n value: pageSize,\n }))}\n onChange={event => {\n setPageIndex(0);\n setPageSize(Number(event.target.value));\n }}\n value={pageSize}\n />\n </span>\n )}\n {showPageControls && (\n <Group as=\"nav\" aria-label={texts.pagination.label}>\n <IconButton\n appearance=\"default\"\n disabled={!canPreviousPage}\n icon=\"arrow-start\"\n onClick={() => setPageIndex(0)}\n aria-label={\n showShortcutTexts\n ? texts.pagination.actions.firstPageWithShortcut\n : texts.pagination.actions.firstPage\n }\n tooltip={\n showShortcutTexts\n ? texts.pagination.actions.firstPageWithShortcut\n : texts.pagination.actions.firstPage\n }\n />\n <IconButton\n appearance=\"default\"\n disabled={!canPreviousPage}\n icon=\"arrow-left\"\n onClick={() => setPageIndex(pageIndex - 1)}\n aria-label={\n showShortcutTexts\n ? texts.pagination.actions.previousPageWithShortcut\n : texts.pagination.actions.previousPage\n }\n tooltip={\n showShortcutTexts\n ? texts.pagination.actions.previousPageWithShortcut\n : texts.pagination.actions.previousPage\n }\n />\n {showPageNumbers && pageCount > 0 && (\n <PageNumbers pageCount={pageCount} currentPageIndex={pageIndex} onClick={setPageIndex} />\n )}\n <IconButton\n appearance=\"default\"\n disabled={!canNextPage}\n icon=\"arrow-right\"\n onClick={() => setPageIndex(pageIndex + 1)}\n aria-label={\n showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage\n }\n tooltip={\n showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage\n }\n />\n <IconButton\n appearance=\"default\"\n disabled={!canNextPage}\n icon=\"arrow-end\"\n onClick={() => setPageIndex(pageCount - 1)}\n aria-label={\n showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage\n }\n tooltip={\n showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage\n }\n />\n </Group>\n )}\n </div>\n );\n});\n"],"names":["getShowingLabel","length","pageIndex","pageSize","texts","minItemIndex","maxItemIndex","pagination","showingXofYofTotal","replace","String","Pagination","React","props","ref","pageSizes","setPageIndex","setPageSize","showPageControls","showPageNumbers","showPageSize","dangerouslyHijackGlobalKeyboardNavigation","otherProps","useLocalization","maxPageIndex","Math","ceil","showShortcutTexts","usePaginationShortcuts","pageCount","canPreviousPage","canNextPage","className","cn","Select","data","map","text","value","onChange","event","Number","target","Group","as","label","IconButton","appearance","disabled","icon","onClick","actions","firstPageWithShortcut","firstPage","tooltip","previousPageWithShortcut","previousPage","PageNumbers","currentPageIndex","nextPageWithShortcut","nextPage","lastPageWithShortcut","lastPage"],"mappings":";;;;;;;;;;AAmGA,MAAMA,eAAe,GAAGA,CAACC,MAAc,EAAEC,SAAiB,EAAEC,QAAgB,EAAE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;kBAEtCF,iBAAiB,GAAGvB,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACU,oBAAoB,GAAGzD,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACW,QAAQ;IAEzGR,OAAO,EACH3B,iBAAiB,GAAGvB,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACU,oBAAoB,GAAGzD,KAAK,CAACG,UAAU,CAAC4C,OAAO,CAACW;IAEnG,CACE,CACX,CACC;AAEd,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { forwardRef, useMemo, createElement, createContext, useContext, isValidElement } from 'react';
2
- import cn from 'classnames';
2
+ import cn from 'clsx';
3
3
  import { mergeRefs } from '../../utils/mergeRefs.js';
4
4
  import { Root, Portal, Anchor as Anchor$1, Trigger as Trigger$1, Content as Content$1, Close as Close$1 } from '@radix-ui/react-popover';
5
5
  import { UnstyledArrow } from './Primitives.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../../../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport { Placement } from '../..';\nimport { UnstyledArrow } from './Primitives';\nimport { mergeRefs } from '../../utils/mergeRefs';\nimport { getPopoverStyleClassnames } from './util';\n\ntype PopoverContextValue = { props: any; ref: React.Ref<HTMLElement> };\n\nconst PopoverContext = React.createContext<PopoverContextValue>({\n props: {},\n ref: null,\n});\n\nexport type PopoverAnchorProps = React.HTMLAttributes<HTMLElement>;\nconst Anchor = React.forwardRef(function PopoverAnchor(props: PopoverAnchorProps, ref: React.Ref<HTMLDivElement>) {\n return <PopoverPrimitive.Anchor {...props} asChild ref={ref} />;\n});\n\nexport type PopoverTriggerProps = React.HTMLAttributes<HTMLElement>;\nconst Trigger = React.forwardRef(function PopoverTrigger(props: PopoverTriggerProps, externalRef: React.Ref<HTMLElement>) {\n const { ref: parentRef, props: parentProps } = React.useContext(PopoverContext);\n const refCallback = mergeRefs([parentRef, externalRef]);\n\n let children = props.children;\n\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\n console.warn(\n `Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`\n );\n children = <span>{props.children}</span>;\n }\n\n return (\n <PopoverPrimitive.Trigger {...parentProps} {...props} ref={refCallback} asChild>\n {children}\n </PopoverPrimitive.Trigger>\n );\n});\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('hide'));\n };\n\n return children({ close, ref });\n});\n\nexport type PopoverContentRenderProps = { close: () => void };\nexport type PopoverContentProps = Omit<PopoverPrimitive.PopoverContentProps, 'side'> & {\n children: React.ReactNode | ((props: PopoverContentRenderProps) => React.ReactNode);\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function PopoverContent(props: PopoverContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, ...popoverContentProps } = props;\n const className = cn(getPopoverStyleClassnames(), props.className);\n\n let output;\n\n if (typeof props.children === 'function') {\n output = (\n <PopoverPrimitive.Close asChild>\n <RenderPropWrapper>{props.children}</RenderPropWrapper>\n </PopoverPrimitive.Close>\n );\n } else {\n output = props.children;\n }\n\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n {...popoverContentProps}\n className={className}\n data-taco=\"popover\"\n side={side}\n sideOffset={1}\n ref={ref}>\n {output}\n <UnstyledArrow className=\"text-white\" />\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement>;\nconst Close = React.forwardRef(\n (props: PopoverCloseProps, ref: React.Ref<HTMLButtonElement>): JSX.Element => (\n <PopoverPrimitive.Close {...props} ref={ref} asChild />\n )\n);\n\nexport type PopoverProps = React.PropsWithChildren<{\n anchor?: JSX.Element;\n modal?: boolean;\n /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n /** Set whether the popover is open by default or not, use when not providing a trigger */\n defaultOpen?: boolean;\n /** Control the open state of the popover from outside the component */\n open?: boolean;\n /** Called when the popover opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n}>;\nexport type ForwardedPopoverWithStatics = React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.ForwardRefExoticComponent<PopoverAnchorProps>;\n Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;\n Content: React.ForwardRefExoticComponent<PopoverContentProps>;\n Close: React.ForwardRefExoticComponent<PopoverCloseProps>;\n Portal: React.FunctionComponent<PopoverPrimitive.PortalProps>;\n};\n\nexport const Popover = React.forwardRef<HTMLElement, PopoverProps>(function Popover(props, ref) {\n const { anchor, children, defaultOpen, modal = false, open, onChange, trigger, ...otherProps } = props;\n const context = React.useMemo(() => ({ props: otherProps, ref }), [otherProps]);\n\n return (\n <PopoverContext.Provider value={context}>\n <PopoverPrimitive.Root defaultOpen={defaultOpen} modal={modal} open={open} onOpenChange={onChange}>\n {anchor ? <Anchor>{anchor}</Anchor> : null}\n {trigger && !anchor ? <Trigger>{trigger}</Trigger> : null}\n {children}\n </PopoverPrimitive.Root>\n </PopoverContext.Provider>\n );\n}) as ForwardedPopoverWithStatics;\nPopover.Anchor = Anchor;\nPopover.Trigger = Trigger;\nPopover.Content = Content;\nPopover.Close = Close;\nPopover.Portal = PopoverPrimitive.Portal;\n"],"names":["PopoverContext","React","props","ref","Anchor","PopoverAnchor","PopoverPrimitive","asChild","Trigger","PopoverTrigger","externalRef","parentRef","parentProps","refCallback","mergeRefs","children","_props$children","type","console","warn","name","RenderPropWrapper","onClick","close","CustomEvent","Content","PopoverContent","placement","side","popoverContentProps","className","cn","getPopoverStyleClassnames","output","sideOffset","UnstyledArrow","Close","Popover","anchor","defaultOpen","modal","open","onChange","trigger","otherProps","context","Provider","value","onOpenChange","Portal"],"mappings":";;;;;;;AAUA,MAAMA,cAAc,gBAAGC,aAAmB,CAAsB;EAC5DC,KAAK,EAAE,EAAE;EACTC,GAAG,EAAE;CACR,CAAC;AAGF,MAAMC,MAAM,gBAAGH,UAAgB,CAAC,SAASI,aAAaA,CAACH,KAAyB,EAAEC,GAA8B;EAC5G,oBAAOF,cAACK,QAAuB,oBAAKJ,KAAK;IAAEK,OAAO;IAACJ,GAAG,EAAEA;KAAO;AACnE,CAAC,CAAC;AAGF,MAAMK,OAAO,gBAAGP,UAAgB,CAAC,SAASQ,cAAcA,CAACP,KAA0B,EAAEQ,WAAmC;;EACpH,MAAM;IAAEP,GAAG,EAAEQ,SAAS;IAAET,KAAK,EAAEU;GAAa,GAAGX,UAAgB,CAACD,cAAc,CAAC;EAC/E,MAAMa,WAAW,GAAGC,SAAS,CAAC,CAACH,SAAS,EAAED,WAAW,CAAC,CAAC;EAEvD,IAAIK,QAAQ,GAAGb,KAAK,CAACa,QAAQ;EAE7B,kBAAId,cAAoB,CAACC,KAAK,CAACa,QAAQ,CAAC,IAAI,SAAAC,eAAA,GAAOd,KAAK,CAACa,QAAQ,cAAAC,eAAA,uBAAdA,eAAA,CAAgBC,IAAI,MAAK,UAAU,EAAE;IACpFC,OAAO,CAACC,IAAI,qHAC4GjB,KAAK,CAACa,QAAQ,CAACE,IAAI,CAACG,kDAAkDlB,KAAK,CAACa,QAAQ,CAACE,IAAI,CAACG,sFAAsF,CACvS;IACDL,QAAQ,gBAAGd,4BAAOC,KAAK,CAACa,QAAQ,CAAQ;;EAG5C,oBACId,cAACK,SAAwB,oBAAKM,WAAW,EAAMV,KAAK;IAAEC,GAAG,EAAEU,WAAW;IAAEN,OAAO;MAC1EQ,QAAQ,CACc;AAEnC,CAAC,CAAC;AAEF,MAAMM,iBAAiB,gBAAGpB,UAAgB,CAAC,SAASoB,iBAAiBA,CAAC;EAAEN,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,MAAM;IAAEvB,QAAQ;IAAEwB,WAAW;IAAEC,KAAK,GAAG,KAAK;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,OAAO;IAAE,GAAGC;GAAY,GAAG1C,KAAK;EACtG,MAAM2C,OAAO,GAAG5C,OAAa,CAAC,OAAO;IAAEC,KAAK,EAAE0C,UAAU;IAAEzC;GAAK,CAAC,EAAE,CAACyC,UAAU,CAAC,CAAC;EAE/E,oBACI3C,cAACD,cAAc,CAAC8C,QAAQ;IAACC,KAAK,EAAEF;kBAC5B5C,cAACK,IAAqB;IAACiC,WAAW,EAAEA,WAAW;IAAEC,KAAK,EAAEA,KAAK;IAAEC,IAAI,EAAEA,IAAI;IAAEO,YAAY,EAAEN;KACpFJ,MAAM,gBAAGrC,cAACG,MAAM,QAAEkC,MAAM,CAAU,GAAG,IAAI,EACzCK,OAAO,IAAI,CAACL,MAAM,gBAAGrC,cAACO,OAAO,QAAEmC,OAAO,CAAW,GAAG,IAAI,EACxD5B,QAAQ,CACW,CACF;AAElC,CAAC;AACDsB,OAAO,CAACjC,MAAM,GAAGA,MAAM;AACvBiC,OAAO,CAAC7B,OAAO,GAAGA,OAAO;AACzB6B,OAAO,CAACZ,OAAO,GAAGA,OAAO;AACzBY,OAAO,CAACD,KAAK,GAAGA,KAAK;AACrBC,OAAO,CAACY,MAAM,GAAG3C,MAAuB;;;;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../../../../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'clsx';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport { Placement } from '../..';\nimport { UnstyledArrow } from './Primitives';\nimport { mergeRefs } from '../../utils/mergeRefs';\nimport { getPopoverStyleClassnames } from './util';\n\ntype PopoverContextValue = { props: any; ref: React.Ref<HTMLElement> };\n\nconst PopoverContext = React.createContext<PopoverContextValue>({\n props: {},\n ref: null,\n});\n\nexport type PopoverAnchorProps = React.HTMLAttributes<HTMLElement>;\nconst Anchor = React.forwardRef(function PopoverAnchor(props: PopoverAnchorProps, ref: React.Ref<HTMLDivElement>) {\n return <PopoverPrimitive.Anchor {...props} asChild ref={ref} />;\n});\n\nexport type PopoverTriggerProps = React.HTMLAttributes<HTMLElement>;\nconst Trigger = React.forwardRef(function PopoverTrigger(props: PopoverTriggerProps, externalRef: React.Ref<HTMLElement>) {\n const { ref: parentRef, props: parentProps } = React.useContext(PopoverContext);\n const refCallback = mergeRefs([parentRef, externalRef]);\n\n let children = props.children;\n\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\n console.warn(\n `Popover.Trigger requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`\n );\n children = <span>{props.children}</span>;\n }\n\n return (\n <PopoverPrimitive.Trigger {...parentProps} {...props} ref={refCallback} asChild>\n {children}\n </PopoverPrimitive.Trigger>\n );\n});\n\nconst RenderPropWrapper = React.forwardRef(function RenderPropWrapper({ children, onClick }: any, ref) {\n const close = () => {\n onClick(new CustomEvent('hide'));\n };\n\n return children({ close, ref });\n});\n\nexport type PopoverContentRenderProps = { close: () => void };\nexport type PopoverContentProps = Omit<PopoverPrimitive.PopoverContentProps, 'side'> & {\n children: React.ReactNode | ((props: PopoverContentRenderProps) => React.ReactNode);\n /** Set the position of the Popover relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function PopoverContent(props: PopoverContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement: side, ...popoverContentProps } = props;\n const className = cn(getPopoverStyleClassnames(), props.className);\n\n let output;\n\n if (typeof props.children === 'function') {\n output = (\n <PopoverPrimitive.Close asChild>\n <RenderPropWrapper>{props.children}</RenderPropWrapper>\n </PopoverPrimitive.Close>\n );\n } else {\n output = props.children;\n }\n\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n {...popoverContentProps}\n className={className}\n data-taco=\"popover\"\n side={side}\n sideOffset={1}\n ref={ref}>\n {output}\n <UnstyledArrow className=\"text-white\" />\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n );\n});\n\nexport type PopoverCloseProps = React.HTMLAttributes<HTMLButtonElement>;\nconst Close = React.forwardRef(\n (props: PopoverCloseProps, ref: React.Ref<HTMLButtonElement>): JSX.Element => (\n <PopoverPrimitive.Close {...props} ref={ref} asChild />\n )\n);\n\nexport type PopoverProps = React.PropsWithChildren<{\n anchor?: JSX.Element;\n modal?: boolean;\n /** A trigger to be used for the popover, should not be set if `children` already contains a trigger */\n trigger?: JSX.Element;\n /** Set whether the popover is open by default or not, use when not providing a trigger */\n defaultOpen?: boolean;\n /** Control the open state of the popover from outside the component */\n open?: boolean;\n /** Called when the popover opens or closes, must be used in conjunction with open */\n onChange?: (open: boolean) => void;\n}>;\nexport type ForwardedPopoverWithStatics = React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>> & {\n Anchor: React.ForwardRefExoticComponent<PopoverAnchorProps>;\n Trigger: React.ForwardRefExoticComponent<PopoverTriggerProps>;\n Content: React.ForwardRefExoticComponent<PopoverContentProps>;\n Close: React.ForwardRefExoticComponent<PopoverCloseProps>;\n Portal: React.FunctionComponent<PopoverPrimitive.PortalProps>;\n};\n\nexport const Popover = React.forwardRef<HTMLElement, PopoverProps>(function Popover(props, ref) {\n const { anchor, children, defaultOpen, modal = false, open, onChange, trigger, ...otherProps } = props;\n const context = React.useMemo(() => ({ props: otherProps, ref }), [otherProps]);\n\n return (\n <PopoverContext.Provider value={context}>\n <PopoverPrimitive.Root defaultOpen={defaultOpen} modal={modal} open={open} onOpenChange={onChange}>\n {anchor ? <Anchor>{anchor}</Anchor> : null}\n {trigger && !anchor ? <Trigger>{trigger}</Trigger> : null}\n {children}\n </PopoverPrimitive.Root>\n </PopoverContext.Provider>\n );\n}) as ForwardedPopoverWithStatics;\nPopover.Anchor = Anchor;\nPopover.Trigger = Trigger;\nPopover.Content = Content;\nPopover.Close = Close;\nPopover.Portal = PopoverPrimitive.Portal;\n"],"names":["PopoverContext","React","props","ref","Anchor","PopoverAnchor","PopoverPrimitive","asChild","Trigger","PopoverTrigger","externalRef","parentRef","parentProps","refCallback","mergeRefs","children","_props$children","type","console","warn","name","RenderPropWrapper","onClick","close","CustomEvent","Content","PopoverContent","placement","side","popoverContentProps","className","cn","getPopoverStyleClassnames","output","sideOffset","UnstyledArrow","Close","Popover","anchor","defaultOpen","modal","open","onChange","trigger","otherProps","context","Provider","value","onOpenChange","Portal"],"mappings":";;;;;;;AAUA,MAAMA,cAAc,gBAAGC,aAAmB,CAAsB;EAC5DC,KAAK,EAAE,EAAE;EACTC,GAAG,EAAE;CACR,CAAC;AAGF,MAAMC,MAAM,gBAAGH,UAAgB,CAAC,SAASI,aAAaA,CAACH,KAAyB,EAAEC,GAA8B;EAC5G,oBAAOF,cAACK,QAAuB,oBAAKJ,KAAK;IAAEK,OAAO;IAACJ,GAAG,EAAEA;KAAO;AACnE,CAAC,CAAC;AAGF,MAAMK,OAAO,gBAAGP,UAAgB,CAAC,SAASQ,cAAcA,CAACP,KAA0B,EAAEQ,WAAmC;;EACpH,MAAM;IAAEP,GAAG,EAAEQ,SAAS;IAAET,KAAK,EAAEU;GAAa,GAAGX,UAAgB,CAACD,cAAc,CAAC;EAC/E,MAAMa,WAAW,GAAGC,SAAS,CAAC,CAACH,SAAS,EAAED,WAAW,CAAC,CAAC;EAEvD,IAAIK,QAAQ,GAAGb,KAAK,CAACa,QAAQ;EAE7B,kBAAId,cAAoB,CAACC,KAAK,CAACa,QAAQ,CAAC,IAAI,SAAAC,eAAA,GAAOd,KAAK,CAACa,QAAQ,cAAAC,eAAA,uBAAdA,eAAA,CAAgBC,IAAI,MAAK,UAAU,EAAE;IACpFC,OAAO,CAACC,IAAI,qHAC4GjB,KAAK,CAACa,QAAQ,CAACE,IAAI,CAACG,kDAAkDlB,KAAK,CAACa,QAAQ,CAACE,IAAI,CAACG,sFA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= undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.js","sources":["../../../../../../../src/components/Progress/Progress.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport './Progress.css';\n\nexport type ProgressProps = React.HTMLAttributes<HTMLSpanElement> & {\n /**\n * Indicates how long (in milliseconds) a progress bar will take to progress through.\n * By default, progress bar has no duration\n */\n duration?: number;\n};\n\nexport const Progress = ({ duration = undefined, ...props }: ProgressProps): JSX.Element => {\n let style;\n\n if (duration) {\n style = {\n animationDuration: `${duration}ms`,\n };\n }\n\n const className = cn('bg-grey-100 rounded block h-1 overflow-hidden w-full', props.className);\n\n const progressClassName = cn('yt-progress__bar block h-1', {\n \"w-full before:h-1 before:bg-grey-300 before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']\":\n !duration,\n [`w-0 bg-grey-300 animate-[progress_linear]`]: duration,\n });\n\n return (\n <span {...props} data-taco=\"progress\" className={className}>\n <span className={progressClassName} data-taco=\"progress-bar\" style={style} />\n </span>\n );\n};\n"],"names":["Progress","duration","undefined","props","style","animationDuration","className","cn","progressClassName","React"],"mappings":";;;MAYaA,QAAQ,GAAGA,CAAC;EAAEC,QAAQ,GAAGC,SAAS;EAAE,GAAGC;CAAsB;EACtE,IAAIC,KAAK;EAET,IAAIH,QAAQ,EAAE;IACVG,KAAK,GAAG;MACJC,iBAAiB,KAAKJ;KACzB;;EAGL,MAAMK,SAAS,GAAGC,EAAE,CAAC,sDAAsD,EAAEJ,KAAK,CAACG,SAAS,CAAC;EAE7F,MAAME,iBAAiB,GAAGD,EAAE,CAAC,4BAA4B,EAAE;IACvD,sJAAsJ,EAClJ,CAACN,QAAQ;IACb,4CAA4C,GAAGA;GAClD,CAAC;EAEF,oBACIQ,uDAAUN,KAAK;iBAAY,UAAU;IAACG,SAAS,EAAEA;mBAC7CG;IAAMH,SAAS,EAAEE,iBAAiB;iBAAY,cAAc;IAACJ,KAAK,EAAEA;IAAS,CAC1E;AAEf;;;;"}
1
+ {"version":3,"file":"Progress.js","sources":["../../../../../../../src/components/Progress/Progress.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'clsx';\nimport './Progress.css';\n\nexport type ProgressProps = React.HTMLAttributes<HTMLSpanElement> & {\n /**\n * Indicates how long (in milliseconds) a progress bar will take to progress through.\n * By default, progress bar has no duration\n */\n duration?: number;\n};\n\nexport const Progress = ({ duration = undefined, ...props }: ProgressProps): JSX.Element => {\n let style;\n\n if (duration) {\n style = {\n animationDuration: `${duration}ms`,\n };\n }\n\n const className = cn('bg-grey-100 rounded block h-1 overflow-hidden w-full', props.className);\n\n const progressClassName = cn('yt-progress__bar block h-1', {\n \"w-full before:h-1 before:bg-grey-300 before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']\":\n !duration,\n [`w-0 bg-grey-300 animate-[progress_linear]`]: duration,\n });\n\n return (\n <span {...props} data-taco=\"progress\" className={className}>\n <span className={progressClassName} data-taco=\"progress-bar\" style={style} />\n </span>\n );\n};\n"],"names":["Progress","duration","undefined","props","style","animationDuration","className","cn","progressClassName","React"],"mappings":";;;MAYaA,QAAQ,GAAGA,CAAC;EAAEC,QAAQ,GAAGC,SAAS;EAAE,GAAGC;CAAsB;EACtE,IAAIC,KAAK;EAET,IAAIH,QAAQ,EAAE;IACVG,KAAK,GAAG;MACJC,iBAAiB,KAAKJ;KACzB;;EAGL,MAAMK,SAAS,GAAGC,EAAE,CAAC,sDAAsD,EAAEJ,KAAK,CAACG,SAAS,CAAC;EAE7F,MAAME,iBAAiB,GAAGD,EAAE,CAAC,4BAA4B,EAAE;IACvD,sJAAsJ,EAClJ,CAACN,QAAQ;IACb,4CAA4C,GAAGA;GAClD,CAAC;EAEF,oBACIQ,uDAAUN,KAAK;iBAAY,UAAU;IAACG,SAAS,EAAEA;mBAC7CG;IAAMH,SAAS,EAAEE,iBAAiB;iBAAY,cAAc;IAACJ,KAAK,EAAEA;IAAS,CAC1E;AAEf;;;;"}
@@ -180,6 +180,7 @@ const defaultLocalisationTexts = {
180
180
  value: 'Value'
181
181
  },
182
182
  hiddenColumn: 'Hidden column',
183
+ hiddenGroupedColumn: 'Hidden grouped column',
183
184
  tooltip: 'Apply filters',
184
185
  total: 'Viewing [CURRENT] of [TOTAL]'
185
186
  },
@@ -208,6 +209,23 @@ const defaultLocalisationTexts = {
208
209
  checkboxVisibilityLabel: "Don't show again",
209
210
  cancelButtonText: 'Cancel',
210
211
  printButtonText: 'Print'
212
+ },
213
+ settingsDialog: {
214
+ title: 'Print settings',
215
+ size: 'Paper size',
216
+ sizeA5: 'A5',
217
+ sizeA4: 'A4',
218
+ sizeA3: 'A3',
219
+ sizeLetter: 'Letter',
220
+ sizeLegal: 'Legal',
221
+ orientation: 'Paper orientation',
222
+ orientationLandscape: 'Landscape',
223
+ orientationPortrait: 'Portrait',
224
+ rows: 'Print rows',
225
+ rowsAll: 'All',
226
+ rowsSelected: 'Selected',
227
+ layout: 'Page layout',
228
+ layoutSplitGroups: 'New page for each [COLUMN]'
211
229
  }
212
230
  },
213
231
  rowHeight: {