@koine/react 1.0.9 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/Alert/Alert.js +7 -13
  2. package/Animations/Reveal.js +12 -10
  3. package/Animations/Underline.js +3 -13
  4. package/Animations/useReveal.js +18 -17
  5. package/Autocomplete/AutocompleteDownshift.js +1 -1
  6. package/Autocomplete/AutocompleteDownshiftMultiselect.js +1 -1
  7. package/Autocomplete/AutocompleteMui.js +61 -56
  8. package/Autocomplete/AutocompleteReach.js +1 -1
  9. package/Autocomplete/components.js +17 -72
  10. package/Autocomplete/helpers.js +1 -1
  11. package/Bg/BgColor.js +14 -24
  12. package/Bg/BgPhoto.js +11 -54
  13. package/Bg/BgSvg.js +6 -9
  14. package/Breadcrumbs/Breadcrumbs.js +14 -54
  15. package/Buttons/Button.js +8 -73
  16. package/Buttons/ButtonComposite.js +20 -41
  17. package/Buttons/ButtonFab.js +4 -6
  18. package/Buttons/ButtonLink.js +7 -6
  19. package/Buttons/IconButton.js +5 -17
  20. package/Calendar/CalendarDaygridCell.js +20 -14
  21. package/Calendar/CalendarDaygridNav.js +10 -9
  22. package/Calendar/CalendarDaygridTable.js +32 -30
  23. package/Calendar/CalendarLegend.js +7 -2
  24. package/Calendar/calendar-api-google.js +101 -68
  25. package/Calendar/useCalendar.js +114 -113
  26. package/Calendar/utils.js +73 -74
  27. package/Carousel/Carousel.js +1 -1
  28. package/Carousel/CarouselCss.js +14 -27
  29. package/Collapsable/Collapsable.d.ts +1 -1
  30. package/Collapsable/Collapsable.js +1 -1
  31. package/Collapsable/CollapsableReach.d.ts +4 -64
  32. package/Collapsable/CollapsableReach.js +247 -129
  33. package/Collapsable/index.d.ts +1 -1
  34. package/Collapsable/index.js +2 -1
  35. package/Debug/Debug.js +5 -17
  36. package/Details/Details.d.ts +114 -0
  37. package/Details/Details.js +65 -0
  38. package/Details/index.d.ts +1 -0
  39. package/Details/index.js +1 -0
  40. package/{Forms/Form → Details}/package.json +1 -1
  41. package/Dialog/DialogMui.d.ts +1 -1
  42. package/Dialog/DialogMui.js +22 -20
  43. package/Dialog/css/bare.js +17 -15
  44. package/Dialog/m/bare.js +17 -13
  45. package/Dialog/m/basic.js +2 -2
  46. package/Dialog/m/index.js +4 -4
  47. package/Dialog/sc/bare.js +25 -43
  48. package/Dialog/sc/framer.js +6 -6
  49. package/Dialog/sc/framerMaterial.js +6 -6
  50. package/Dialog/sc/material.js +17 -37
  51. package/Dialog/tw/bare.js +25 -19
  52. package/Dialog/tw/elegant.js +17 -15
  53. package/Dialog/tw/framer.js +6 -6
  54. package/Dialog/tw/framerMaterial.js +6 -6
  55. package/Dialog/tw/material.js +17 -15
  56. package/Editor/Editor--tiptap.js +14 -11
  57. package/Editor/components.js +6 -24
  58. package/Favicon/FaviconTags.js +2 -1
  59. package/Form/Form.d.ts +111 -0
  60. package/Form/Form.js +61 -0
  61. package/{Forms/Form → Form}/index.d.ts +0 -0
  62. package/{Forms/Form → Form}/index.js +0 -0
  63. package/Form/package.json +6 -0
  64. package/Form/sc/bare.d.ts +33 -0
  65. package/Form/sc/bare.js +20 -0
  66. package/Forms/Checkbox/Checkbox.js +9 -15
  67. package/Forms/Feedback/Feedback.js +6 -7
  68. package/Forms/Field/Field.js +15 -26
  69. package/Forms/Field/FieldControl.js +19 -15
  70. package/Forms/Field/FieldHint.js +3 -5
  71. package/Forms/Input/Input.js +10 -16
  72. package/Forms/InputGroup/InputGroup.js +9 -36
  73. package/Forms/Label/Label.js +5 -23
  74. package/Forms/Password/Password.js +10 -23
  75. package/Forms/Radio/Radio.js +15 -18
  76. package/Forms/Switch/Switch.js +9 -39
  77. package/Forms/Textarea/Textarea.js +6 -7
  78. package/Forms/Textarea/TextareaRich.js +10 -24
  79. package/Forms/Toggle/Toggle.js +21 -68
  80. package/Forms/Toggle/useToggle.js +29 -29
  81. package/Forms/antispam.js +12 -12
  82. package/Forms/helpers.js +8 -7
  83. package/Forms/index.d.ts +0 -1
  84. package/Forms/index.js +0 -1
  85. package/Forms/styles.js +12 -43
  86. package/Gauge/Gauge.js +1 -1
  87. package/Grid/Grid.js +25 -51
  88. package/Hamburger/Hamburger.js +35 -47
  89. package/Header/useHeader.js +12 -12
  90. package/Hidden/Hidden.js +9 -13
  91. package/Img/sc/bare.js +3 -1
  92. package/Link/Link.js +3 -1
  93. package/Link/LinkBlank.js +8 -17
  94. package/Menu/Menu.js +3 -10
  95. package/MenuItem/MenuItem.js +3 -19
  96. package/Meta/Meta.js +3 -2
  97. package/NoJs/NoJs.js +2 -2
  98. package/Pagination/PaginationNav.js +26 -48
  99. package/Pagination/PaginationResults.js +7 -6
  100. package/Pill/Pill.js +6 -36
  101. package/Progress/ProgressCircular.js +9 -30
  102. package/Progress/ProgressLinear.js +8 -16
  103. package/Progress/ProgressOverlay.js +11 -27
  104. package/Rating/Rating.js +26 -45
  105. package/Rating/index.js +19 -15
  106. package/Select/SelectDownshift.js +1 -1
  107. package/Select/components.js +6 -12
  108. package/Sidebar/Sidebar.js +13 -38
  109. package/Spacing/Spacing.js +12 -12
  110. package/Sticky/Sticky.js +1 -1
  111. package/Sticky/StickyCss.js +4 -2
  112. package/Tabs/TabsMui.d.ts +244 -0
  113. package/Tabs/TabsMui.js +46 -0
  114. package/Tabs/index.d.ts +1 -1
  115. package/Tabs/index.js +1 -1
  116. package/Tabs/sc/bare.d.ts +5 -0
  117. package/Tabs/sc/bare.js +87 -0
  118. package/Tabs/tw/bare.d.ts +248 -0
  119. package/Tabs/tw/bare.js +17 -0
  120. package/Tabs/tw/material.d.ts +472 -0
  121. package/Tabs/tw/material.js +18 -0
  122. package/Tabs/useTabs.d.ts +43 -0
  123. package/Tabs/useTabs.js +44 -0
  124. package/Typography/CopyPasteVisible.js +3 -5
  125. package/Typography/Native.js +12 -45
  126. package/Typography/ReadMore.js +26 -52
  127. package/Typography/TextLoop.js +19 -22
  128. package/Typography/TypeStairs.js +20 -16
  129. package/css/index.js +1 -0
  130. package/helpers/classed.js +22 -18
  131. package/helpers/extend-component.js +6 -6
  132. package/hooks/index.d.ts +8 -0
  133. package/hooks/index.js +8 -0
  134. package/hooks/types.d.ts +8 -0
  135. package/hooks/types.js +1 -0
  136. package/hooks/useAsyncFn.d.ts +26 -0
  137. package/hooks/useAsyncFn.js +36 -0
  138. package/hooks/useDateLocale.js +22 -13
  139. package/hooks/useEffectOnce.d.ts +5 -0
  140. package/hooks/useEffectOnce.js +8 -0
  141. package/hooks/useFirstMountState.d.ts +4 -0
  142. package/hooks/useFirstMountState.js +12 -0
  143. package/hooks/useFocus.js +3 -3
  144. package/hooks/useId.d.ts +4 -0
  145. package/hooks/useId.js +8 -0
  146. package/hooks/useIsomorphicLayoutEffect.d.ts +5 -0
  147. package/hooks/useIsomorphicLayoutEffect.js +8 -0
  148. package/hooks/useMount.d.ts +4 -0
  149. package/hooks/useMount.js +9 -0
  150. package/hooks/useMountedState.d.ts +4 -0
  151. package/hooks/useMountedState.js +15 -0
  152. package/hooks/usePrevious.js +2 -2
  153. package/hooks/useScrollPosition.js +21 -16
  154. package/hooks/useScrollTo.js +7 -5
  155. package/hooks/useTraceUpdate.js +4 -3
  156. package/hooks/useUpdateEffect.d.ts +5 -0
  157. package/hooks/useUpdateEffect.js +14 -0
  158. package/hooks/useWindowSize.js +3 -3
  159. package/m/MotionProvider.js +4 -2
  160. package/node/Alert/Alert.js +9 -16
  161. package/node/Alert/index.js +1 -1
  162. package/node/Animations/Reveal.js +15 -13
  163. package/node/Animations/Underline.js +5 -16
  164. package/node/Animations/index.js +1 -1
  165. package/node/Animations/useReveal.js +19 -18
  166. package/node/Autocomplete/AutocompleteMui.js +69 -64
  167. package/node/Autocomplete/components.js +26 -82
  168. package/node/Autocomplete/helpers.js +2 -2
  169. package/node/Bg/BgColor.js +18 -29
  170. package/node/Bg/BgPhoto.js +15 -59
  171. package/node/Bg/BgSvg.js +8 -12
  172. package/node/Bg/index.js +1 -1
  173. package/node/Breadcrumbs/Breadcrumbs.js +20 -61
  174. package/node/Breadcrumbs/index.js +1 -1
  175. package/node/Buttons/Button.js +10 -76
  176. package/node/Buttons/ButtonComposite.js +23 -45
  177. package/node/Buttons/ButtonFab.js +6 -9
  178. package/node/Buttons/ButtonLink.js +10 -10
  179. package/node/Buttons/IconButton.js +7 -20
  180. package/node/Buttons/index.js +1 -1
  181. package/node/Calendar/CalendarDaygridCell.js +24 -18
  182. package/node/Calendar/CalendarDaygridNav.js +14 -13
  183. package/node/Calendar/CalendarDaygridTable.js +39 -38
  184. package/node/Calendar/CalendarLegend.js +8 -3
  185. package/node/Calendar/calendar-api-google.js +105 -73
  186. package/node/Calendar/index.js +1 -1
  187. package/node/Calendar/useCalendar.js +117 -116
  188. package/node/Calendar/utils.js +82 -84
  189. package/node/Carousel/CarouselCss.js +17 -31
  190. package/node/Carousel/index.js +1 -1
  191. package/node/Collapsable/Collapsable.js +2 -2
  192. package/node/Collapsable/CollapsableReach.js +246 -134
  193. package/node/Collapsable/index.js +3 -2
  194. package/node/Debug/Debug.js +7 -20
  195. package/node/Debug/index.js +1 -1
  196. package/node/Details/Details.js +67 -0
  197. package/node/Details/index.js +4 -0
  198. package/node/Dialog/DialogMui.js +12 -11
  199. package/node/Dialog/css/bare.js +11 -10
  200. package/node/Dialog/m/bare.js +18 -14
  201. package/node/Dialog/m/basic.js +1 -1
  202. package/node/Dialog/m/index.js +4 -4
  203. package/node/Dialog/sc/bare.js +22 -41
  204. package/node/Dialog/sc/framer.js +5 -5
  205. package/node/Dialog/sc/framerMaterial.js +5 -5
  206. package/node/Dialog/sc/material.js +12 -33
  207. package/node/Dialog/tw/bare.js +19 -14
  208. package/node/Dialog/tw/elegant.js +11 -9
  209. package/node/Dialog/tw/framer.js +5 -5
  210. package/node/Dialog/tw/framerMaterial.js +5 -5
  211. package/node/Dialog/tw/material.js +11 -9
  212. package/node/Editor/Editor--tiptap.js +19 -17
  213. package/node/Editor/components.js +9 -28
  214. package/node/Editor/index.js +1 -1
  215. package/node/Favicon/FaviconTags.js +3 -2
  216. package/node/Favicon/index.js +1 -1
  217. package/node/Form/Form.js +65 -0
  218. package/node/{Forms/Form → Form}/index.js +1 -1
  219. package/node/Form/sc/bare.js +23 -0
  220. package/node/Forms/Checkbox/Checkbox.js +13 -20
  221. package/node/Forms/Checkbox/index.js +1 -1
  222. package/node/Forms/Feedback/Feedback.js +8 -10
  223. package/node/Forms/Feedback/index.js +1 -1
  224. package/node/Forms/Field/Field.js +18 -30
  225. package/node/Forms/Field/FieldControl.js +26 -22
  226. package/node/Forms/Field/FieldHint.js +4 -7
  227. package/node/Forms/Field/index.js +1 -1
  228. package/node/Forms/Input/Input.js +15 -22
  229. package/node/Forms/Input/index.js +1 -1
  230. package/node/Forms/InputGroup/InputGroup.js +14 -42
  231. package/node/Forms/InputGroup/index.js +1 -1
  232. package/node/Forms/Label/Label.js +6 -25
  233. package/node/Forms/Label/index.js +1 -1
  234. package/node/Forms/Password/Password.js +16 -30
  235. package/node/Forms/Password/index.js +1 -1
  236. package/node/Forms/Radio/Radio.js +21 -25
  237. package/node/Forms/Radio/index.js +1 -1
  238. package/node/Forms/Switch/Switch.js +15 -46
  239. package/node/Forms/Switch/index.js +1 -1
  240. package/node/Forms/Textarea/Textarea.js +11 -13
  241. package/node/Forms/Textarea/TextareaRich.js +16 -31
  242. package/node/Forms/Textarea/index.js +1 -1
  243. package/node/Forms/Toggle/Toggle.js +24 -72
  244. package/node/Forms/Toggle/index.js +1 -1
  245. package/node/Forms/Toggle/useToggle.js +33 -33
  246. package/node/Forms/antispam.js +14 -14
  247. package/node/Forms/helpers.js +9 -8
  248. package/node/Forms/index.js +1 -2
  249. package/node/Forms/styles.js +16 -48
  250. package/node/Gauge/Gauge.js +1 -1
  251. package/node/Grid/Grid.js +24 -51
  252. package/node/Grid/index.js +1 -1
  253. package/node/Hamburger/Hamburger.js +37 -50
  254. package/node/Hamburger/index.js +1 -1
  255. package/node/Header/index.js +1 -1
  256. package/node/Header/useHeader.js +16 -16
  257. package/node/Hidden/Hidden.js +10 -15
  258. package/node/Hidden/index.js +1 -1
  259. package/node/Img/index.js +1 -1
  260. package/node/Img/sc/bare.js +4 -3
  261. package/node/Link/Link.js +4 -3
  262. package/node/Link/LinkBlank.js +11 -21
  263. package/node/Link/index.js +1 -1
  264. package/node/Menu/Menu.js +4 -12
  265. package/node/Menu/index.js +1 -1
  266. package/node/MenuItem/MenuItem.js +4 -21
  267. package/node/MenuItem/index.js +1 -1
  268. package/node/Meta/Meta.js +4 -3
  269. package/node/Meta/index.js +1 -1
  270. package/node/NoJs/NoJs.js +3 -3
  271. package/node/NoJs/index.js +1 -1
  272. package/node/Pagination/PaginationNav.js +30 -53
  273. package/node/Pagination/PaginationResults.js +10 -10
  274. package/node/Pagination/index.js +1 -1
  275. package/node/Pill/Pill.js +7 -38
  276. package/node/Pill/index.js +1 -1
  277. package/node/Progress/ProgressCircular.js +11 -33
  278. package/node/Progress/ProgressLinear.js +11 -20
  279. package/node/Progress/ProgressOverlay.js +18 -35
  280. package/node/Progress/index.js +1 -1
  281. package/node/Rating/Rating.js +28 -48
  282. package/node/Rating/index.js +20 -16
  283. package/node/Select/components.js +11 -18
  284. package/node/Sidebar/Sidebar.js +21 -47
  285. package/node/Sidebar/index.js +1 -1
  286. package/node/Spacing/Spacing.js +16 -17
  287. package/node/Spacing/index.js +1 -1
  288. package/node/Sticky/StickyCss.js +5 -3
  289. package/node/Sticky/index.js +1 -1
  290. package/node/Tabs/TabsMui.js +49 -0
  291. package/node/Tabs/index.js +2 -2
  292. package/node/Tabs/sc/bare.js +87 -0
  293. package/node/Tabs/tw/bare.js +20 -0
  294. package/node/Tabs/tw/material.js +21 -0
  295. package/node/Tabs/useTabs.js +48 -0
  296. package/node/Typography/CopyPasteVisible.js +4 -7
  297. package/node/Typography/Native.js +14 -48
  298. package/node/Typography/ReadMore.js +30 -57
  299. package/node/Typography/TextLoop.js +22 -25
  300. package/node/Typography/TypeStairs.js +22 -18
  301. package/node/Typography/index.js +1 -1
  302. package/node/css/index.js +2 -1
  303. package/node/helpers/classed.js +23 -19
  304. package/node/helpers/extend-component.js +7 -7
  305. package/node/helpers/index.js +1 -1
  306. package/node/hooks/index.js +9 -1
  307. package/node/hooks/types.js +2 -0
  308. package/node/hooks/useAsyncFn.js +40 -0
  309. package/node/hooks/useDateLocale.js +23 -37
  310. package/node/hooks/useEffectOnce.js +12 -0
  311. package/node/hooks/useFirstMountState.js +16 -0
  312. package/node/hooks/useFocus.js +4 -4
  313. package/node/hooks/useId.js +12 -0
  314. package/node/hooks/useIsomorphicLayoutEffect.js +11 -0
  315. package/node/hooks/useMount.js +13 -0
  316. package/node/hooks/useMountedState.js +19 -0
  317. package/node/hooks/usePrevious.js +3 -3
  318. package/node/hooks/useScrollPosition.js +23 -19
  319. package/node/hooks/useScrollTo.js +9 -7
  320. package/node/hooks/useTraceUpdate.js +5 -4
  321. package/node/hooks/useUpdateEffect.js +18 -0
  322. package/node/hooks/useWindowSize.js +4 -4
  323. package/node/index.js +1 -1
  324. package/node/m/MotionProvider.js +6 -4
  325. package/node/m/index.js +1 -1
  326. package/node/m/lite.js +1 -1
  327. package/node/m/max.js +1 -1
  328. package/node/sc/index.js +4 -2
  329. package/node/scm/index.js +2 -1
  330. package/node/shared/index.js +1 -1
  331. package/node/styles/Body.js +5 -10
  332. package/node/styles/Global.js +5 -37
  333. package/node/styles/index.js +1 -1
  334. package/node/styles/media.js +42 -38
  335. package/node/styles/spacing.js +15 -16
  336. package/node/styles/styled.js +7 -21
  337. package/node/styles/theme--vanilla.js +21 -19
  338. package/node/styles/theme.js +9 -9
  339. package/node/tw/index.js +2 -1
  340. package/node/twm/index.js +2 -1
  341. package/package.json +20 -9
  342. package/sc/index.d.ts +1 -0
  343. package/sc/index.js +1 -0
  344. package/scm/index.js +1 -0
  345. package/styles/Body.js +4 -8
  346. package/styles/Global.js +4 -36
  347. package/styles/media.js +41 -36
  348. package/styles/spacing.js +15 -16
  349. package/styles/styled.js +7 -21
  350. package/styles/theme--vanilla.js +21 -19
  351. package/styles/theme.js +11 -11
  352. package/tw/index.js +1 -0
  353. package/twm/index.js +1 -0
  354. package/Forms/Form/Form.d.ts +0 -31
  355. package/Forms/Form/Form.js +0 -62
  356. package/Tabs/Tabs.d.ts +0 -27
  357. package/Tabs/Tabs.js +0 -62
  358. package/node/Forms/Form/Form.js +0 -67
  359. package/node/Tabs/Tabs.js +0 -67
package/Gauge/Gauge.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // import styled, { keyframes } from "styled-components";
2
2
  // import { m } from "framer-motion";
3
- export const Gauge = (_props) => null;
3
+ export var Gauge = function (_props) { return null; };
4
4
  // export type GaugeProps = {
5
5
  // /** In percentage */
6
6
  // value: number;
package/Grid/Grid.js CHANGED
@@ -1,60 +1,33 @@
1
+ import { __makeTemplateObject } from "tslib";
1
2
  import styled from "styled-components";
2
- export const GRID_COLUMNS = 12;
3
- export const GRID_GUTTER_DEFAULT = "half";
4
- export const Container = styled.div `
5
- max-width: ${(p) => p.theme.breakpoints[p.size]}px;
6
- margin: 0 auto;
7
- padding: 0 ${(p) => p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]}px;
8
- ${(p) => (p.clamp ? "overflow: hidden;" : "")}
9
- `;
10
- export const ContainerFluid = styled.div `
11
- padding: 0 ${(p) => p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]}px;
12
- `;
13
- export const Row = styled.div `
14
- margin: 0 -${(p) => p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]}px;
15
- display: flex;
16
- ${(p) => (p.$noWrap ? "overflow: auto;" : "flex-wrap: wrap;")}
17
- ${(p) => (p.$valign ? `align-items: ${p.$valign}` : "")};
18
- ${(p) => p.$reverse &&
19
- `@media (${p.$reverse.split(":")[0]}-width: ${p.$reverse.split(":")[1]}px) {
20
- flex-direction: row-reverse;
21
- }`}
22
- `;
23
- export const Col = styled.div `
24
- padding: 0 ${(p) => p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]}px;
25
- display: ${(p) => (p.$flex ? "flex" : "block")};
26
- ${(p) => (p.$valign ? "align-items: " + p.$valign : "")};
27
- ${(p) => getColCss(p)};
28
- `;
3
+ export var GRID_COLUMNS = 12;
4
+ export var GRID_GUTTER_DEFAULT = "half";
5
+ export var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: ", "px;\n margin: 0 auto;\n padding: 0 ", "px;\n ", "\n"], ["\n max-width: ", "px;\n margin: 0 auto;\n padding: 0 ", "px;\n ", "\n"])), function (p) { return p.theme.breakpoints[p.size]; }, function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.clamp ? "overflow: hidden;" : ""); });
6
+ export var ContainerFluid = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 0 ", "px;\n"], ["\n padding: 0 ", "px;\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; });
7
+ export var Row = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin: 0 -", "px;\n display: flex;\n ", "\n ", ";\n ", "\n"], ["\n margin: 0 -", "px;\n display: flex;\n ", "\n ", ";\n ", "\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.$noWrap ? "overflow: auto;" : "flex-wrap: wrap;"); }, function (p) { return (p.$valign ? "align-items: ".concat(p.$valign) : ""); }, function (p) {
8
+ return p.$reverse &&
9
+ "@media (".concat(p.$reverse.split(":")[0], "-width: ").concat(p.$reverse.split(":")[1], "px) {\n flex-direction: row-reverse;\n }");
10
+ });
11
+ export var Col = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 0 ", "px;\n display: ", ";\n ", ";\n ", ";\n"], ["\n padding: 0 ", "px;\n display: ", ";\n ", ";\n ", ";\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.$flex ? "flex" : "block"); }, function (p) { return (p.$valign ? "align-items: " + p.$valign : ""); }, function (p) { return getColCss(p); });
29
12
  function getColWidth(breakpoints, breakpoint, value) {
30
- const breakpointValue = breakpoints[breakpoint] + "px";
31
- const width = (value * 100) / GRID_COLUMNS;
32
- const cssValue = `
33
- min-width: ${width}%;
34
- flex: 0 0 ${width}%;
35
- `;
13
+ var breakpointValue = breakpoints[breakpoint] + "px";
14
+ var width = (value * 100) / GRID_COLUMNS;
15
+ var cssValue = "\n min-width: ".concat(width, "%;\n flex: 0 0 ").concat(width, "%;\n");
36
16
  if (breakpoint === Object.keys(breakpoints)[0]) {
37
17
  return cssValue;
38
18
  }
39
- return `
40
- @media (min-width: ${breakpointValue}){
41
- ${cssValue}
42
- }`;
19
+ return "\n @media (min-width: ".concat(breakpointValue, "){\n ").concat(cssValue, "\n }");
43
20
  }
44
21
  function getColCss(props) {
45
- const { $auto, $offset, $width } = props;
46
- const { breakpoints } = props.theme;
47
- let css = "";
22
+ var $auto = props.$auto, $offset = props.$offset, $width = props.$width;
23
+ var breakpoints = props.theme.breakpoints;
24
+ var css = "";
48
25
  if ($offset) {
49
- const offsets = $offset.split(",");
50
- for (let i = 0; i <= offsets.length; i++) {
26
+ var offsets = $offset.split(",");
27
+ for (var i = 0; i <= offsets.length; i++) {
51
28
  if (offsets[i]) {
52
- const [offsetBreakpoint, offsetSize] = offsets[i].split(":");
53
- css += `
54
- @media(min-width: ${breakpoints[offsetBreakpoint]}px){
55
- margin-left: ${(100 * offsetSize) / GRID_COLUMNS}%;
56
- }
57
- `;
29
+ var _a = offsets[i].split(":"), offsetBreakpoint = _a[0], offsetSize = _a[1];
30
+ css += " \n @media(min-width: ".concat(breakpoints[offsetBreakpoint], "px){\n margin-left: ").concat((100 * offsetSize) / GRID_COLUMNS, "%;\n }\n ");
58
31
  }
59
32
  }
60
33
  }
@@ -62,11 +35,11 @@ function getColCss(props) {
62
35
  // do nothing, width is set explicitly
63
36
  }
64
37
  else if ($auto) {
65
- css += `flex: 0 0 auto; width: auto; max-width: none;`;
38
+ css += "flex: 0 0 auto; width: auto; max-width: none;";
66
39
  }
67
40
  else {
68
- for (const breakpoint in breakpoints) {
69
- const value = props[breakpoint];
41
+ for (var breakpoint in breakpoints) {
42
+ var value = props[breakpoint];
70
43
  if (typeof value !== "undefined") {
71
44
  css += getColWidth(breakpoints, breakpoint, value);
72
45
  }
@@ -77,3 +50,4 @@ function getColCss(props) {
77
50
  }
78
51
  return css;
79
52
  }
53
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -1,3 +1,4 @@
1
+ import { __assign, __makeTemplateObject, __rest } from "tslib";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  /**
3
4
  * @file
@@ -5,60 +6,47 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
6
  * Simplified from https://github.com/luukdv/hamburger-react
6
7
  */
7
8
  import styled from "styled-components";
8
- const HamburgerLabel = styled.div `
9
- position: absolute;
10
- top: 30px;
11
- font-size: ${({ $toggled }) => ($toggled ? "0" : "9px")};
12
- text-transform: uppercase;
13
- left: 7px;
14
- letter-spacing: 3px;
15
- `;
16
- const area = 48;
17
- const lines = 3;
18
- const width = 32;
19
- const room = Math.round((area - width) / 2);
20
- const barHeightRaw = width / 12;
21
- const barHeight = Math.round(barHeightRaw);
22
- const space = 0.5;
23
- const marginRaw = width / (lines * (space + (lines === 3 ? 1 : 1.25)));
24
- const margin = Math.round(marginRaw);
25
- const height = barHeight * lines + margin * (lines - 1);
26
- const topOffset = Math.round((area - height) / 2);
27
- const translate = 4.6325;
28
- const deviation = (barHeightRaw - barHeight + (marginRaw - margin)) / (lines === 3 ? 1 : 2);
29
- const move = parseFloat((width / translate - deviation / (4 / 3)).toFixed(2));
30
- const time = 0.4;
31
- const easing = "cubic-bezier(0, 0, 0, 1)";
32
- const transition = `${time}s ${easing}`;
33
- const burgerStyles = {
9
+ var HamburgerLabel = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 30px;\n font-size: ", ";\n text-transform: uppercase;\n left: 7px;\n letter-spacing: 3px;\n"], ["\n position: absolute;\n top: 30px;\n font-size: ", ";\n text-transform: uppercase;\n left: 7px;\n letter-spacing: 3px;\n"])), function (_a) {
10
+ var $toggled = _a.$toggled;
11
+ return ($toggled ? "0" : "9px");
12
+ });
13
+ var area = 48;
14
+ var lines = 3;
15
+ var width = 32;
16
+ var room = Math.round((area - width) / 2);
17
+ var barHeightRaw = width / 12;
18
+ var barHeight = Math.round(barHeightRaw);
19
+ var space = 0.5;
20
+ var marginRaw = width / (lines * (space + (lines === 3 ? 1 : 1.25)));
21
+ var margin = Math.round(marginRaw);
22
+ var height = barHeight * lines + margin * (lines - 1);
23
+ var topOffset = Math.round((area - height) / 2);
24
+ var translate = 4.6325;
25
+ var deviation = (barHeightRaw - barHeight + (marginRaw - margin)) / (lines === 3 ? 1 : 2);
26
+ var move = parseFloat((width / translate - deviation / (4 / 3)).toFixed(2));
27
+ var time = 0.4;
28
+ var easing = "cubic-bezier(0, 0, 0, 1)";
29
+ var transition = "".concat(time, "s ").concat(easing);
30
+ var burgerStyles = {
34
31
  marginRight: "-8px",
35
32
  position: "relative",
36
- width: `${area}px`,
37
- height: `${area}px`,
33
+ width: "".concat(area, "px"),
34
+ height: "".concat(area, "px"),
38
35
  userSelect: "none",
39
36
  outline: "0px",
40
37
  cursor: "pointer",
41
- transition,
38
+ transition: transition,
42
39
  };
43
- const barStyles = {
40
+ var barStyles = {
44
41
  position: "absolute",
45
- width: `${width}px`,
46
- height: `${barHeight}px`,
47
- left: `${room}px`,
42
+ width: "".concat(width, "px"),
43
+ height: "".concat(barHeight, "px"),
44
+ left: "".concat(room, "px"),
48
45
  background: "currentColor",
49
- transition,
46
+ transition: transition,
50
47
  };
51
- export const Hamburger = ({ toggled, ...props }) => {
52
- return (_jsxs("div", { style: {
53
- ...burgerStyles,
54
- transform: `${toggled ? `rotate(90deg)` : "none"}`,
55
- }, tabIndex: 0, ...props, children: [_jsx("div", { style: {
56
- ...barStyles,
57
- top: `${topOffset}px`,
58
- transform: `${toggled ? `rotate(-45deg) translate(0px, ${move}px)` : "none"}`,
59
- } }), _jsx("div", { style: {
60
- ...barStyles,
61
- top: `${topOffset + barHeight + margin}px`,
62
- transform: `${toggled ? `rotate(45deg) translate(0, -${move}px)` : "none"}`,
63
- } }), _jsx(HamburgerLabel, { "$toggled": toggled, children: "Menu" })] }));
48
+ export var Hamburger = function (_a) {
49
+ var toggled = _a.toggled, props = __rest(_a, ["toggled"]);
50
+ return (_jsxs("div", __assign({ style: __assign(__assign({}, burgerStyles), { transform: "".concat(toggled ? "rotate(90deg)" : "none") }), tabIndex: 0 }, props, { children: [_jsx("div", { style: __assign(__assign({}, barStyles), { top: "".concat(topOffset, "px"), transform: "".concat(toggled ? "rotate(-45deg) translate(0px, ".concat(move, "px)") : "none") }) }), _jsx("div", { style: __assign(__assign({}, barStyles), { top: "".concat(topOffset + barHeight + margin, "px"), transform: "".concat(toggled ? "rotate(45deg) translate(0, -".concat(move, "px)") : "none") }) }), _jsx(HamburgerLabel, __assign({ "$toggled": toggled }, { children: "Menu" }))] })));
64
51
  };
52
+ var templateObject_1;
@@ -2,21 +2,21 @@ import { useEffect, useState } from "react";
2
2
  import { useScrollPosition } from "../hooks/useScrollPosition";
3
3
  import { useTheme } from "../styles/theme";
4
4
  import { useMedia } from "../styles/media";
5
- export const useHeader = () => {
6
- const [isSticky, setIsSticky] = useState(false);
7
- const { header: themed } = useTheme();
8
- const isDesktopLayout = useMedia(`min:${themed.breakpoint}`);
9
- const valueIdx = isDesktopLayout ? 1 : 0;
10
- const [headerHeight, setHeaderHeight] = useState(themed.height[valueIdx]);
11
- const [placeholderHeight, setPlaceholderHeight] = useState(themed.height[valueIdx]);
12
- const [logoWidth, setLogoWidth] = useState(themed.logoWidth[valueIdx]);
13
- useScrollPosition((currentPosition) => {
14
- const isPastThreshold = currentPosition.y * -1 > 40;
5
+ export var useHeader = function () {
6
+ var _a = useState(false), isSticky = _a[0], setIsSticky = _a[1];
7
+ var themed = useTheme().header;
8
+ var isDesktopLayout = useMedia("min:".concat(themed.breakpoint));
9
+ var valueIdx = isDesktopLayout ? 1 : 0;
10
+ var _b = useState(themed.height[valueIdx]), headerHeight = _b[0], setHeaderHeight = _b[1];
11
+ var _c = useState(themed.height[valueIdx]), placeholderHeight = _c[0], setPlaceholderHeight = _c[1];
12
+ var _d = useState(themed.logoWidth[valueIdx]), logoWidth = _d[0], setLogoWidth = _d[1];
13
+ useScrollPosition(function (currentPosition) {
14
+ var isPastThreshold = currentPosition.y * -1 > 40;
15
15
  if (isSticky !== isPastThreshold)
16
16
  setIsSticky(isPastThreshold);
17
17
  }, [isSticky]);
18
- useEffect(() => {
19
- const valueIdx = isDesktopLayout ? 1 : 0;
18
+ useEffect(function () {
19
+ var valueIdx = isDesktopLayout ? 1 : 0;
20
20
  setPlaceholderHeight(themed.height[valueIdx]);
21
21
  setHeaderHeight(isSticky ? themed.heightSticky[valueIdx] : themed.height[valueIdx]);
22
22
  setLogoWidth(isSticky ? themed.logoWidthSticky[valueIdx] : themed.logoWidth[valueIdx]);
package/Hidden/Hidden.js CHANGED
@@ -1,14 +1,10 @@
1
+ import { __makeTemplateObject } from "tslib";
1
2
  import styled from "styled-components";
2
- export const Hidden = styled.div `
3
- ${(p) => `${p.$min
4
- ? `
5
- @media (min-width: ${p.theme.breakpoints[p.$min]}px) {
6
- display: none;
7
- }`
8
- : ""} ${p.$max
9
- ? `
10
- @media (max-width: ${p.theme.breakpoints[p.$max]}px) {
11
- display: none;
12
- }`
13
- : ""}`}
14
- `;
3
+ export var Hidden = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (p) {
4
+ return "".concat(p.$min
5
+ ? "\n @media (min-width: ".concat(p.theme.breakpoints[p.$min], "px) {\n display: none;\n }")
6
+ : "", " ").concat(p.$max
7
+ ? "\n @media (max-width: ".concat(p.theme.breakpoints[p.$max], "px) {\n display: none;\n }")
8
+ : "");
9
+ });
10
+ var templateObject_1;
package/Img/sc/bare.js CHANGED
@@ -1,9 +1,11 @@
1
+ import { __makeTemplateObject } from "tslib";
1
2
  import styled from "styled-components";
2
3
  // export type KoineImgProps = {
3
4
  // /** @default "cover" */
4
5
  // $fit?: "cover" | "contain";
5
6
  // };
6
- export const KoineImg = styled.img ``;
7
+ export var KoineImg = styled.img(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
8
+ var templateObject_1;
7
9
  // export const KoineImg = styled.img<KoineImgProps>`
8
10
  // object-fit: ${(p) => p.$fit || "cover"};
9
11
  // `;
package/Link/Link.js CHANGED
@@ -1,2 +1,4 @@
1
+ import { __makeTemplateObject } from "tslib";
1
2
  import styled from "styled-components";
2
- export const KoineLink = styled.a ``;
3
+ export var KoineLink = styled.a(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
4
+ var templateObject_1;
package/Link/LinkBlank.js CHANGED
@@ -1,26 +1,17 @@
1
+ import { __assign, __makeTemplateObject, __rest } from "tslib";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import styled from "styled-components";
3
4
  import { MdLaunch as IconOutboundLink } from "react-icons/md";
4
5
  import { max } from "../styles/media";
5
- export const LinkBlankA = styled.a.attrs({
6
+ export var LinkBlankA = styled.a.attrs({
6
7
  target: "_blank",
7
8
  rel: "noopener",
8
- }) ``;
9
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
9
10
  // TODO: use `touch` class on <html> instead of relying on screenwidth,
10
11
  // probably implement a lean Modernizr like thing with react-helmet
11
- export const LinkBlankIcon = styled(IconOutboundLink) `
12
- color: var(---grey100);
13
- font-size: inherit;
14
- margin-left: 3px;
15
- line-height: inherit;
16
- vertical-align: middle;
17
- width: 0px;
18
- transition: width 0.1s ease-in-out;
19
- ${max.sm} {
20
- width: 20px;
21
- opacity: 0.8;
22
- }
23
- `;
24
- export const LinkBlank = ({ children, target, rel, ...props }) => {
25
- return (_jsxs(LinkBlankA, { ...props, children: [children, _jsx(LinkBlankIcon, {})] }));
12
+ export var LinkBlankIcon = styled(IconOutboundLink)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: var(---grey100);\n font-size: inherit;\n margin-left: 3px;\n line-height: inherit;\n vertical-align: middle;\n width: 0px;\n transition: width 0.1s ease-in-out;\n ", " {\n width: 20px;\n opacity: 0.8;\n }\n"], ["\n color: var(---grey100);\n font-size: inherit;\n margin-left: 3px;\n line-height: inherit;\n vertical-align: middle;\n width: 0px;\n transition: width 0.1s ease-in-out;\n ", " {\n width: 20px;\n opacity: 0.8;\n }\n"])), max.sm);
13
+ export var LinkBlank = function (_a) {
14
+ var children = _a.children, target = _a.target, rel = _a.rel, props = __rest(_a, ["children", "target", "rel"]);
15
+ return (_jsxs(LinkBlankA, __assign({}, props, { children: [children, _jsx(LinkBlankIcon, {})] })));
26
16
  };
17
+ var templateObject_1, templateObject_2;
package/Menu/Menu.js CHANGED
@@ -1,11 +1,4 @@
1
+ import { __makeTemplateObject } from "tslib";
1
2
  import styled from "styled-components";
2
- export const Menu = styled.ul `
3
- z-index: 3;
4
- position: absolute;
5
- list-style-type: none;
6
- margin: 0;
7
- padding: 0;
8
- background: #fff;
9
- width: 100%;
10
- box-shadow: var(--shadow);
11
- `;
3
+ export var Menu = styled.ul(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n z-index: 3;\n position: absolute;\n list-style-type: none;\n margin: 0;\n padding: 0;\n background: #fff;\n width: 100%;\n box-shadow: var(--shadow);\n"], ["\n z-index: 3;\n position: absolute;\n list-style-type: none;\n margin: 0;\n padding: 0;\n background: #fff;\n width: 100%;\n box-shadow: var(--shadow);\n"])));
4
+ var templateObject_1;
@@ -1,20 +1,4 @@
1
+ import { __makeTemplateObject } from "tslib";
1
2
  import styled from "styled-components";
2
- export const MenuItem = styled.li `
3
- padding: 8px 16px;
4
-
5
- &[aria-selected="true"] {
6
- background: var(--accent400);
7
- }
8
-
9
- /** DEP: this is just for MultiselectMui? */
10
- &.Mui-focused,
11
- &[data-focus="true"] {
12
- background: var(--accent300);
13
- color: white;
14
- }
15
-
16
- &:not([disabled]):hover {
17
- cursor: pointer;
18
- background: var(--accent300);
19
- }
20
- `;
3
+ export var MenuItem = styled.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 8px 16px;\n\n &[aria-selected=\"true\"] {\n background: var(--accent400);\n }\n\n /** DEP: this is just for MultiselectMui? */\n &.Mui-focused,\n &[data-focus=\"true\"] {\n background: var(--accent300);\n color: white;\n }\n\n &:not([disabled]):hover {\n cursor: pointer;\n background: var(--accent300);\n }\n"], ["\n padding: 8px 16px;\n\n &[aria-selected=\"true\"] {\n background: var(--accent400);\n }\n\n /** DEP: this is just for MultiselectMui? */\n &.Mui-focused,\n &[data-focus=\"true\"] {\n background: var(--accent300);\n color: white;\n }\n\n &:not([disabled]):hover {\n cursor: pointer;\n background: var(--accent300);\n }\n"])));
4
+ var templateObject_1;
package/Meta/Meta.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export const Meta = ({ zoom }) => {
3
- return (_jsx("meta", { name: "viewport", content: `width=device-width, initial-scale=1, maximum-scale=1${zoom ? "" : ", user-scalable=0"}` }));
2
+ export var Meta = function (_a) {
3
+ var zoom = _a.zoom;
4
+ return (_jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1".concat(zoom ? "" : ", user-scalable=0") }));
4
5
  };
package/NoJs/NoJs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export const NoJs = (_props) => {
2
+ export var NoJs = function (_props) {
3
3
  return (_jsx("script", { id: "no-js", dangerouslySetInnerHTML: {
4
- __html: `document.querySelector("html").className=document.querySelector("html").className.replace(/no-js/,"") + "js";`,
4
+ __html: "document.querySelector(\"html\").className=document.querySelector(\"html\").className.replace(/no-js/,\"\") + \"js\";",
5
5
  } }));
6
6
  };
@@ -1,42 +1,16 @@
1
+ import { __assign, __makeTemplateObject } from "tslib";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import styled from "styled-components";
3
4
  import { CgArrowRightR as IconArrowRight, CgArrowLeftR as IconArrowLeft, } from "react-icons/cg";
4
5
  import { ensureInt } from "@koine/utils";
5
- const Root = styled.nav `
6
- display: flex;
7
- align-items: center;
8
- justify-content: center;
9
- padding: 20px 0 40px;
10
- font-weight: 600;
11
-
12
- & a {
13
- text-decoration: none;
14
- }
15
- `;
16
- const item = `
17
- display: block;
18
- padding: 5px 10px;
19
- `;
20
- const ItemCurrent = styled.span `
21
- ${item}
22
- background: var(--accent400);
23
- border-radius: 2px;
24
- `;
25
- const ItemLink = styled.a `
26
- ${item}
27
-
28
- ${(props) => (props.prev ? "color: var(--grey100);" : "")}
29
- `;
30
- const DotsSeparator = styled.span `
31
- color: var(--grey100);
32
- `;
33
- const arrow = `display: flex; font-size: 20px;`;
34
- const ItemPrev = styled.a `
35
- ${arrow}
36
- `;
37
- const ItemNext = styled.a `
38
- ${arrow}
39
- `;
6
+ var Root = styled.nav(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px 0 40px;\n font-weight: 600;\n\n & a {\n text-decoration: none;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px 0 40px;\n font-weight: 600;\n\n & a {\n text-decoration: none;\n }\n"])));
7
+ var item = "\n display: block;\n padding: 5px 10px;\n";
8
+ var ItemCurrent = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n background: var(--accent400);\n border-radius: 2px;\n"], ["\n ", "\n background: var(--accent400);\n border-radius: 2px;\n"])), item);
9
+ var ItemLink = styled.a(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), item, function (props) { return (props.prev ? "color: var(--grey100);" : ""); });
10
+ var DotsSeparator = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: var(--grey100);\n"], ["\n color: var(--grey100);\n"])));
11
+ var arrow = "display: flex; font-size: 20px;";
12
+ var ItemPrev = styled.a(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), arrow);
13
+ var ItemNext = styled.a(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), arrow);
40
14
  /*
41
15
  * Possible outcomes:
42
16
  * [1] 2 3 ... 78 >
@@ -45,7 +19,8 @@ const ItemNext = styled.a `
45
19
  * < 1 ... 75 76 [77] 78 >
46
20
  * < 1 ... 76 77 [78]
47
21
  */
48
- export const KoinePaginationNav = ({ total, perPage, currentPage, baseUrl, showOffset = 2, currentUrl = "/", Link = "a", }) => {
22
+ export var KoinePaginationNav = function (_a) {
23
+ var total = _a.total, perPage = _a.perPage, currentPage = _a.currentPage, baseUrl = _a.baseUrl, _b = _a.showOffset, showOffset = _b === void 0 ? 2 : _b, _c = _a.currentUrl, currentUrl = _c === void 0 ? "/" : _c, _d = _a.Link, Link = _d === void 0 ? "a" : _d;
49
24
  total = ensureInt(total);
50
25
  currentPage = ensureInt(currentPage);
51
26
  perPage = ensureInt(perPage);
@@ -56,15 +31,15 @@ export const KoinePaginationNav = ({ total, perPage, currentPage, baseUrl, showO
56
31
  if (total < perPage) {
57
32
  return null;
58
33
  }
59
- const firstPage = 1;
60
- const lastPage = Math.ceil(total / perPage);
61
- const prevPage = currentPage - 1 > firstPage ? currentPage - 1 : "";
62
- const nextPage = currentPage + 1 < lastPage ? currentPage + 1 : lastPage;
63
- const prevArrow = currentPage > firstPage;
64
- const nextArrow = currentPage < lastPage;
65
- const pages = [];
34
+ var firstPage = 1;
35
+ var lastPage = Math.ceil(total / perPage);
36
+ var prevPage = currentPage - 1 > firstPage ? currentPage - 1 : "";
37
+ var nextPage = currentPage + 1 < lastPage ? currentPage + 1 : lastPage;
38
+ var prevArrow = currentPage > firstPage;
39
+ var nextArrow = currentPage < lastPage;
40
+ var pages = [];
66
41
  // fill the pages before the current
67
- for (let i = currentPage - showOffset; i < currentPage; i++) {
42
+ for (var i = currentPage - showOffset; i < currentPage; i++) {
68
43
  if (i > 1) {
69
44
  pages.push(i);
70
45
  }
@@ -72,12 +47,15 @@ export const KoinePaginationNav = ({ total, perPage, currentPage, baseUrl, showO
72
47
  // add the current
73
48
  pages.push(currentPage);
74
49
  // fill the pages after the current
75
- for (let i = currentPage + 1; i < currentPage + 1 + showOffset; i++) {
50
+ for (var i = currentPage + 1; i < currentPage + 1 + showOffset; i++) {
76
51
  if (i < lastPage) {
77
52
  pages.push(i);
78
53
  }
79
54
  }
80
- const prevDots = pages[0] > firstPage + 1;
81
- const nextDots = pages[pages.length - 1] < lastPage - 1;
82
- return (_jsxs(Root, { children: [prevArrow && (_jsx(ItemPrev, { as: Link, href: `${baseUrl}/${prevPage}`, children: _jsx(IconArrowLeft, {}) })), firstPage !== currentPage && (_jsx(ItemLink, { as: Link, href: `${baseUrl}`, prev: true, children: firstPage })), prevDots && _jsx(DotsSeparator, { children: "..." }), pages.map((page) => page === currentPage ? (_jsx(ItemCurrent, { children: page }, page)) : (_jsx(ItemLink, { as: Link, href: `${baseUrl}/${page}`, prev: page < currentPage, next: page > currentPage, children: page }, `pagination-${page}`))), nextDots && _jsx(DotsSeparator, { children: "..." }), lastPage !== currentPage && (_jsx(ItemLink, { as: Link, href: `${baseUrl}/${lastPage}`, next: true, children: lastPage })), nextArrow && (_jsx(ItemNext, { as: Link, href: `${baseUrl}/${nextPage}`, children: _jsx(IconArrowRight, {}) }))] }));
55
+ var prevDots = pages[0] > firstPage + 1;
56
+ var nextDots = pages[pages.length - 1] < lastPage - 1;
57
+ return (_jsxs(Root, { children: [prevArrow && (_jsx(ItemPrev, __assign({ as: Link, href: "".concat(baseUrl, "/").concat(prevPage) }, { children: _jsx(IconArrowLeft, {}) }))), firstPage !== currentPage && (_jsx(ItemLink, __assign({ as: Link, href: "".concat(baseUrl), prev: true }, { children: firstPage }))), prevDots && _jsx(DotsSeparator, { children: "..." }), pages.map(function (page) {
58
+ return page === currentPage ? (_jsx(ItemCurrent, { children: page }, page)) : (_jsx(ItemLink, __assign({ as: Link, href: "".concat(baseUrl, "/").concat(page), prev: page < currentPage, next: page > currentPage }, { children: page }), "pagination-".concat(page)));
59
+ }), nextDots && _jsx(DotsSeparator, { children: "..." }), lastPage !== currentPage && (_jsx(ItemLink, __assign({ as: Link, href: "".concat(baseUrl, "/").concat(lastPage), next: true }, { children: lastPage }))), nextArrow && (_jsx(ItemNext, __assign({ as: Link, href: "".concat(baseUrl, "/").concat(nextPage) }, { children: _jsx(IconArrowRight, {}) })))] }));
83
60
  };
61
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -1,10 +1,11 @@
1
+ import { __assign, __makeTemplateObject } from "tslib";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import styled from "styled-components";
3
4
  import { AnimatePresence, m } from "framer-motion";
4
- const Root = styled.div `
5
- // overflow: hidden;
6
- `;
7
- const Inner = styled(m.div) ``;
8
- export const PaginationResults = ({ children }) => {
9
- return (_jsx(AnimatePresence, { exitBeforeEnter: true, initial: true, children: _jsx(Root, { children: _jsx(Inner, { initial: { opacity: 0, x: -100 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: 100 }, transition: { type: "linear", staggerChildren: 0.3 }, children: children }) }) }));
5
+ var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // overflow: hidden;\n"], ["\n // overflow: hidden;\n"])));
6
+ var Inner = styled(m.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""])));
7
+ export var PaginationResults = function (_a) {
8
+ var children = _a.children;
9
+ return (_jsx(AnimatePresence, __assign({ exitBeforeEnter: true, initial: true }, { children: _jsx(Root, { children: _jsx(Inner, __assign({ initial: { opacity: 0, x: -100 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: 100 }, transition: { type: "linear", staggerChildren: 0.3 } }, { children: children })) }) })));
10
10
  };
11
+ var templateObject_1, templateObject_2;
package/Pill/Pill.js CHANGED
@@ -1,37 +1,7 @@
1
+ import { __makeTemplateObject } from "tslib";
1
2
  import styled from "styled-components";
2
- export const Pill = styled.div `
3
- display: inline-block;
4
- padding: 5px 10px;
5
- margin: 0 0.5em 0.5em 0;
6
- border-radius: 2px;
7
- text-decoration: none;
8
- font-size: 13px;
9
- font-weight: 600;
10
- `;
11
- export const PillGreyLight = styled(Pill) `
12
- background: var(--grey800);
13
- color: var(--grey100);
14
-
15
- &:hover {
16
- color: white;
17
- background: var(--grey300);
18
- }
19
- `;
20
- export const PillAccentLight = styled(Pill) `
21
- background: var(--accent400);
22
- color: var(--grey100);
23
-
24
- &:hover {
25
- color: #fff;
26
- background: var(--accent300);
27
- }
28
- `;
29
- export const PillAccentLightOutlined = styled(Pill) `
30
- border: 1px solid var(--accent300);
31
- color: var(--accent200);
32
-
33
- &:hover {
34
- color: #fff;
35
- background: var(--accent300);
36
- }
37
- `;
3
+ export var Pill = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n padding: 5px 10px;\n margin: 0 0.5em 0.5em 0;\n border-radius: 2px;\n text-decoration: none;\n font-size: 13px;\n font-weight: 600;\n"], ["\n display: inline-block;\n padding: 5px 10px;\n margin: 0 0.5em 0.5em 0;\n border-radius: 2px;\n text-decoration: none;\n font-size: 13px;\n font-weight: 600;\n"])));
4
+ export var PillGreyLight = styled(Pill)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: var(--grey800);\n color: var(--grey100);\n\n &:hover {\n color: white;\n background: var(--grey300);\n }\n"], ["\n background: var(--grey800);\n color: var(--grey100);\n\n &:hover {\n color: white;\n background: var(--grey300);\n }\n"])));
5
+ export var PillAccentLight = styled(Pill)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: var(--accent400);\n color: var(--grey100);\n\n &:hover {\n color: #fff;\n background: var(--accent300);\n }\n"], ["\n background: var(--accent400);\n color: var(--grey100);\n\n &:hover {\n color: #fff;\n background: var(--accent300);\n }\n"])));
6
+ export var PillAccentLightOutlined = styled(Pill)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: 1px solid var(--accent300);\n color: var(--accent200);\n\n &:hover {\n color: #fff;\n background: var(--accent300);\n }\n"], ["\n border: 1px solid var(--accent300);\n color: var(--accent200);\n\n &:hover {\n color: #fff;\n background: var(--accent300);\n }\n"])));
7
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -1,36 +1,15 @@
1
+ import { __assign, __makeTemplateObject, __rest } from "tslib";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import styled, { keyframes } from "styled-components";
3
- const animationRotation = keyframes `
4
- 0% {
5
- transform: rotate(0deg);
6
- }
7
- 100% {
8
- transform: rotate(360deg);
9
- }
10
- `;
11
- const animationCircle = keyframes `
12
- 0% {
13
- stroke-dasharray: 1px, 200px;
14
- stroke-dashoffset: 0;
15
- }
16
- 50% {
17
- stroke-dasharray: 100px, 200px;
18
- stroke-dashoffset: -15px;
19
- }
20
- 100% {
21
- stroke-dasharray: 100px, 200px;
22
- stroke-dashoffset: -125px;
23
- }
24
- `;
25
- const ProgressCircularSvg = styled.svg `
26
- animation: ${animationRotation} 1.5s linear infinite;
27
- `;
28
- const ProgressCircularCircle = styled.circle `
29
- animation: ${animationCircle} 1.5s linear infinite;
30
- `;
4
+ var animationRotation = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
5
+ var animationCircle = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"], ["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])));
6
+ var ProgressCircularSvg = styled.svg(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n animation: ", " 1.5s linear infinite;\n"], ["\n animation: ", " 1.5s linear infinite;\n"])), animationRotation);
7
+ var ProgressCircularCircle = styled.circle(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n animation: ", " 1.5s linear infinite;\n"], ["\n animation: ", " 1.5s linear infinite;\n"])), animationCircle);
31
8
  /**
32
9
  * @see https://mui.com/components/progress/
33
10
  */
34
- export const ProgressCircular = ({ size = "1em", thickness = 1, color = "currentColor", ...props }) => {
35
- return (_jsx(ProgressCircularSvg, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 44 44", style: { width: size, height: size }, ...props, children: _jsx(ProgressCircularCircle, { cx: "22", cy: "22", r: "20", fill: "none", strokeWidth: thickness, style: { stroke: color } }) }));
11
+ export var ProgressCircular = function (_a) {
12
+ var _b = _a.size, size = _b === void 0 ? "1em" : _b, _c = _a.thickness, thickness = _c === void 0 ? 1 : _c, _d = _a.color, color = _d === void 0 ? "currentColor" : _d, props = __rest(_a, ["size", "thickness", "color"]);
13
+ return (_jsx(ProgressCircularSvg, __assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 44 44", style: { width: size, height: size } }, props, { children: _jsx(ProgressCircularCircle, { cx: "22", cy: "22", r: "20", fill: "none", strokeWidth: thickness, style: { stroke: color } }) })));
36
14
  };
15
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;