@koine/react 1.0.11 → 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 (306) 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 +12 -26
  29. package/Collapsable/Collapsable.js +1 -1
  30. package/Debug/Debug.js +5 -17
  31. package/Details/Details.js +30 -27
  32. package/Dialog/DialogMui.js +22 -20
  33. package/Dialog/css/bare.js +17 -15
  34. package/Dialog/m/bare.js +17 -13
  35. package/Dialog/m/basic.js +2 -2
  36. package/Dialog/m/index.js +4 -4
  37. package/Dialog/sc/bare.js +25 -43
  38. package/Dialog/sc/framer.js +6 -6
  39. package/Dialog/sc/framerMaterial.js +6 -6
  40. package/Dialog/sc/material.js +17 -37
  41. package/Dialog/tw/bare.js +25 -19
  42. package/Dialog/tw/elegant.js +17 -15
  43. package/Dialog/tw/framer.js +6 -6
  44. package/Dialog/tw/framerMaterial.js +6 -6
  45. package/Dialog/tw/material.js +17 -15
  46. package/Editor/Editor--tiptap.js +14 -11
  47. package/Editor/components.js +6 -24
  48. package/Favicon/FaviconTags.js +2 -1
  49. package/Form/Form.js +30 -28
  50. package/Form/sc/bare.js +9 -18
  51. package/Forms/Checkbox/Checkbox.js +9 -15
  52. package/Forms/Feedback/Feedback.js +6 -7
  53. package/Forms/Field/Field.js +15 -26
  54. package/Forms/Field/FieldControl.js +19 -15
  55. package/Forms/Field/FieldHint.js +3 -5
  56. package/Forms/Input/Input.js +10 -16
  57. package/Forms/InputGroup/InputGroup.js +9 -36
  58. package/Forms/Label/Label.js +5 -23
  59. package/Forms/Password/Password.js +10 -23
  60. package/Forms/Radio/Radio.js +15 -18
  61. package/Forms/Switch/Switch.js +9 -39
  62. package/Forms/Textarea/Textarea.js +6 -7
  63. package/Forms/Textarea/TextareaRich.js +10 -24
  64. package/Forms/Toggle/Toggle.js +19 -67
  65. package/Forms/Toggle/useToggle.js +29 -29
  66. package/Forms/antispam.js +12 -12
  67. package/Forms/helpers.js +7 -6
  68. package/Forms/styles.js +12 -43
  69. package/Gauge/Gauge.js +1 -1
  70. package/Grid/Grid.js +25 -51
  71. package/Hamburger/Hamburger.js +35 -47
  72. package/Header/useHeader.js +12 -12
  73. package/Hidden/Hidden.js +9 -13
  74. package/Img/sc/bare.js +3 -1
  75. package/Link/Link.js +3 -1
  76. package/Link/LinkBlank.js +8 -17
  77. package/Menu/Menu.js +3 -10
  78. package/MenuItem/MenuItem.js +3 -19
  79. package/Meta/Meta.js +3 -2
  80. package/NoJs/NoJs.js +2 -2
  81. package/Pagination/PaginationNav.js +26 -48
  82. package/Pagination/PaginationResults.js +7 -6
  83. package/Pill/Pill.js +6 -36
  84. package/Progress/ProgressCircular.js +9 -30
  85. package/Progress/ProgressLinear.js +8 -16
  86. package/Progress/ProgressOverlay.js +11 -27
  87. package/Rating/Rating.js +24 -44
  88. package/Rating/index.js +19 -15
  89. package/Select/SelectDownshift.js +1 -1
  90. package/Select/components.js +6 -12
  91. package/Sidebar/Sidebar.js +13 -38
  92. package/Spacing/Spacing.js +12 -12
  93. package/Sticky/Sticky.js +1 -1
  94. package/Sticky/StickyCss.js +4 -2
  95. package/Tabs/TabsMui.js +19 -16
  96. package/Tabs/tw/bare.js +13 -11
  97. package/Tabs/tw/material.js +15 -11
  98. package/Tabs/useTabs.js +16 -16
  99. package/Typography/CopyPasteVisible.js +3 -5
  100. package/Typography/Native.js +12 -45
  101. package/Typography/ReadMore.js +25 -51
  102. package/Typography/TextLoop.js +19 -22
  103. package/Typography/TypeStairs.js +20 -16
  104. package/helpers/classed.js +21 -18
  105. package/helpers/extend-component.js +6 -6
  106. package/hooks/useAsyncFn.js +18 -11
  107. package/hooks/useDateLocale.js +22 -13
  108. package/hooks/useEffectOnce.js +1 -1
  109. package/hooks/useFirstMountState.js +1 -1
  110. package/hooks/useFocus.js +3 -3
  111. package/hooks/useId.js +3 -2
  112. package/hooks/useIsomorphicLayoutEffect.js +1 -1
  113. package/hooks/useMount.js +2 -2
  114. package/hooks/useMountedState.js +4 -4
  115. package/hooks/usePrevious.js +2 -2
  116. package/hooks/useScrollPosition.js +20 -15
  117. package/hooks/useScrollTo.js +7 -5
  118. package/hooks/useTraceUpdate.js +4 -3
  119. package/hooks/useUpdateEffect.js +3 -3
  120. package/hooks/useWindowSize.js +3 -3
  121. package/m/MotionProvider.js +4 -2
  122. package/node/Alert/Alert.js +9 -16
  123. package/node/Alert/index.js +1 -1
  124. package/node/Animations/Reveal.js +15 -13
  125. package/node/Animations/Underline.js +5 -16
  126. package/node/Animations/index.js +1 -1
  127. package/node/Animations/useReveal.js +19 -18
  128. package/node/Autocomplete/AutocompleteMui.js +69 -64
  129. package/node/Autocomplete/components.js +26 -82
  130. package/node/Autocomplete/helpers.js +2 -2
  131. package/node/Bg/BgColor.js +18 -29
  132. package/node/Bg/BgPhoto.js +15 -59
  133. package/node/Bg/BgSvg.js +8 -12
  134. package/node/Bg/index.js +1 -1
  135. package/node/Breadcrumbs/Breadcrumbs.js +20 -61
  136. package/node/Breadcrumbs/index.js +1 -1
  137. package/node/Buttons/Button.js +10 -76
  138. package/node/Buttons/ButtonComposite.js +23 -45
  139. package/node/Buttons/ButtonFab.js +6 -9
  140. package/node/Buttons/ButtonLink.js +10 -10
  141. package/node/Buttons/IconButton.js +7 -20
  142. package/node/Buttons/index.js +1 -1
  143. package/node/Calendar/CalendarDaygridCell.js +24 -18
  144. package/node/Calendar/CalendarDaygridNav.js +14 -13
  145. package/node/Calendar/CalendarDaygridTable.js +39 -38
  146. package/node/Calendar/CalendarLegend.js +8 -3
  147. package/node/Calendar/calendar-api-google.js +105 -73
  148. package/node/Calendar/index.js +1 -1
  149. package/node/Calendar/useCalendar.js +117 -116
  150. package/node/Calendar/utils.js +82 -84
  151. package/node/Carousel/CarouselCss.js +17 -32
  152. package/node/Carousel/index.js +1 -1
  153. package/node/Collapsable/index.js +1 -1
  154. package/node/Debug/Debug.js +7 -20
  155. package/node/Debug/index.js +1 -1
  156. package/node/Details/Details.js +24 -22
  157. package/node/Details/index.js +1 -1
  158. package/node/Dialog/DialogMui.js +12 -11
  159. package/node/Dialog/css/bare.js +11 -10
  160. package/node/Dialog/m/bare.js +18 -14
  161. package/node/Dialog/m/basic.js +1 -1
  162. package/node/Dialog/m/index.js +4 -4
  163. package/node/Dialog/sc/bare.js +22 -41
  164. package/node/Dialog/sc/framer.js +5 -5
  165. package/node/Dialog/sc/framerMaterial.js +5 -5
  166. package/node/Dialog/sc/material.js +12 -33
  167. package/node/Dialog/tw/bare.js +19 -14
  168. package/node/Dialog/tw/elegant.js +11 -9
  169. package/node/Dialog/tw/framer.js +5 -5
  170. package/node/Dialog/tw/framerMaterial.js +5 -5
  171. package/node/Dialog/tw/material.js +11 -9
  172. package/node/Editor/Editor--tiptap.js +19 -17
  173. package/node/Editor/components.js +9 -28
  174. package/node/Editor/index.js +1 -1
  175. package/node/Favicon/FaviconTags.js +3 -2
  176. package/node/Favicon/index.js +1 -1
  177. package/node/Form/Form.js +20 -18
  178. package/node/Form/index.js +1 -1
  179. package/node/Form/sc/bare.js +12 -22
  180. package/node/Forms/Checkbox/Checkbox.js +13 -20
  181. package/node/Forms/Checkbox/index.js +1 -1
  182. package/node/Forms/Feedback/Feedback.js +8 -10
  183. package/node/Forms/Feedback/index.js +1 -1
  184. package/node/Forms/Field/Field.js +18 -30
  185. package/node/Forms/Field/FieldControl.js +26 -22
  186. package/node/Forms/Field/FieldHint.js +4 -7
  187. package/node/Forms/Field/index.js +1 -1
  188. package/node/Forms/Input/Input.js +15 -22
  189. package/node/Forms/Input/index.js +1 -1
  190. package/node/Forms/InputGroup/InputGroup.js +14 -42
  191. package/node/Forms/InputGroup/index.js +1 -1
  192. package/node/Forms/Label/Label.js +6 -25
  193. package/node/Forms/Label/index.js +1 -1
  194. package/node/Forms/Password/Password.js +16 -30
  195. package/node/Forms/Password/index.js +1 -1
  196. package/node/Forms/Radio/Radio.js +21 -25
  197. package/node/Forms/Radio/index.js +1 -1
  198. package/node/Forms/Switch/Switch.js +15 -46
  199. package/node/Forms/Switch/index.js +1 -1
  200. package/node/Forms/Textarea/Textarea.js +11 -13
  201. package/node/Forms/Textarea/TextareaRich.js +16 -31
  202. package/node/Forms/Textarea/index.js +1 -1
  203. package/node/Forms/Toggle/Toggle.js +23 -72
  204. package/node/Forms/Toggle/index.js +1 -1
  205. package/node/Forms/Toggle/useToggle.js +33 -33
  206. package/node/Forms/antispam.js +14 -14
  207. package/node/Forms/helpers.js +8 -7
  208. package/node/Forms/index.js +1 -1
  209. package/node/Forms/styles.js +16 -48
  210. package/node/Gauge/Gauge.js +1 -1
  211. package/node/Grid/Grid.js +24 -51
  212. package/node/Grid/index.js +1 -1
  213. package/node/Hamburger/Hamburger.js +37 -50
  214. package/node/Hamburger/index.js +1 -1
  215. package/node/Header/index.js +1 -1
  216. package/node/Header/useHeader.js +16 -16
  217. package/node/Hidden/Hidden.js +10 -15
  218. package/node/Hidden/index.js +1 -1
  219. package/node/Img/index.js +1 -1
  220. package/node/Img/sc/bare.js +4 -3
  221. package/node/Link/Link.js +4 -3
  222. package/node/Link/LinkBlank.js +11 -21
  223. package/node/Link/index.js +1 -1
  224. package/node/Menu/Menu.js +4 -12
  225. package/node/Menu/index.js +1 -1
  226. package/node/MenuItem/MenuItem.js +4 -21
  227. package/node/MenuItem/index.js +1 -1
  228. package/node/Meta/Meta.js +4 -3
  229. package/node/Meta/index.js +1 -1
  230. package/node/NoJs/NoJs.js +3 -3
  231. package/node/NoJs/index.js +1 -1
  232. package/node/Pagination/PaginationNav.js +30 -53
  233. package/node/Pagination/PaginationResults.js +10 -10
  234. package/node/Pagination/index.js +1 -1
  235. package/node/Pill/Pill.js +7 -38
  236. package/node/Pill/index.js +1 -1
  237. package/node/Progress/ProgressCircular.js +11 -33
  238. package/node/Progress/ProgressLinear.js +11 -20
  239. package/node/Progress/ProgressOverlay.js +18 -35
  240. package/node/Progress/index.js +1 -1
  241. package/node/Rating/Rating.js +28 -49
  242. package/node/Rating/index.js +20 -16
  243. package/node/Select/components.js +11 -18
  244. package/node/Sidebar/Sidebar.js +21 -47
  245. package/node/Sidebar/index.js +1 -1
  246. package/node/Spacing/Spacing.js +16 -17
  247. package/node/Spacing/index.js +1 -1
  248. package/node/Sticky/StickyCss.js +5 -3
  249. package/node/Sticky/index.js +1 -1
  250. package/node/Tabs/TabsMui.js +16 -14
  251. package/node/Tabs/index.js +1 -1
  252. package/node/Tabs/tw/bare.js +9 -8
  253. package/node/Tabs/tw/material.js +11 -7
  254. package/node/Tabs/useTabs.js +19 -19
  255. package/node/Typography/CopyPasteVisible.js +4 -7
  256. package/node/Typography/Native.js +14 -48
  257. package/node/Typography/ReadMore.js +30 -57
  258. package/node/Typography/TextLoop.js +22 -25
  259. package/node/Typography/TypeStairs.js +22 -18
  260. package/node/Typography/index.js +1 -1
  261. package/node/css/index.js +1 -1
  262. package/node/helpers/classed.js +22 -19
  263. package/node/helpers/extend-component.js +7 -7
  264. package/node/helpers/index.js +1 -1
  265. package/node/hooks/index.js +1 -1
  266. package/node/hooks/useAsyncFn.js +20 -13
  267. package/node/hooks/useDateLocale.js +23 -37
  268. package/node/hooks/useEffectOnce.js +2 -2
  269. package/node/hooks/useFirstMountState.js +2 -2
  270. package/node/hooks/useFocus.js +4 -4
  271. package/node/hooks/useId.js +4 -3
  272. package/node/hooks/useIsomorphicLayoutEffect.js +2 -2
  273. package/node/hooks/useMount.js +3 -3
  274. package/node/hooks/useMountedState.js +5 -5
  275. package/node/hooks/usePrevious.js +3 -3
  276. package/node/hooks/useScrollPosition.js +23 -18
  277. package/node/hooks/useScrollTo.js +9 -7
  278. package/node/hooks/useTraceUpdate.js +5 -4
  279. package/node/hooks/useUpdateEffect.js +5 -5
  280. package/node/hooks/useWindowSize.js +4 -4
  281. package/node/index.js +1 -1
  282. package/node/m/MotionProvider.js +6 -4
  283. package/node/m/index.js +1 -1
  284. package/node/m/lite.js +1 -1
  285. package/node/m/max.js +1 -1
  286. package/node/sc/index.js +1 -1
  287. package/node/scm/index.js +1 -1
  288. package/node/shared/index.js +1 -1
  289. package/node/styles/Body.js +5 -10
  290. package/node/styles/Global.js +5 -37
  291. package/node/styles/index.js +1 -1
  292. package/node/styles/media.js +42 -38
  293. package/node/styles/spacing.js +15 -16
  294. package/node/styles/styled.js +7 -21
  295. package/node/styles/theme--vanilla.js +21 -19
  296. package/node/styles/theme.js +9 -9
  297. package/node/tw/index.js +1 -1
  298. package/node/twm/index.js +1 -1
  299. package/package.json +3 -2
  300. package/styles/Body.js +4 -8
  301. package/styles/Global.js +4 -36
  302. package/styles/media.js +41 -36
  303. package/styles/spacing.js +15 -16
  304. package/styles/styled.js +7 -21
  305. package/styles/theme--vanilla.js +20 -18
  306. package/styles/theme.js +11 -11
@@ -1,3 +1,4 @@
1
+ import { __assign, __rest } from "tslib";
1
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { useCallback, useMemo } from "react";
3
4
  import { useWatch } from "react-hook-form";
@@ -32,25 +33,25 @@ import { InputInvisible } from "../styles";
32
33
  * an array of options with the shape of `Option`
33
34
  */
34
35
  export function useToggle(props, ref) {
35
- const { name, control, register, label, options, value: propValue, ...restProps } = props;
36
- let { id, valueTrue, valueFalse,
36
+ var name = props.name, control = props.control, register = props.register, label = props.label, options = props.options, propValue = props.value, restProps = __rest(props, ["name", "control", "register", "label", "options", "value"]);
37
+ var id = restProps.id, valueTrue = restProps.valueTrue, valueFalse = restProps.valueFalse,
37
38
  // defaultChecked,
38
39
  // defaultValue,
39
40
  // eslint-disable-next-line prefer-const
40
- ...remainingInputProps } = restProps;
41
+ remainingInputProps = __rest(restProps, ["id", "valueTrue", "valueFalse"]);
41
42
  // use options data convention to pass on the true/false values
42
43
  if (options) {
43
44
  valueTrue = options
44
- .filter((opt) => opt.value === "true")[0]
45
+ .filter(function (opt) { return opt.value === "true"; })[0]
45
46
  .label.toString();
46
47
  valueFalse = options
47
- .filter((opt) => opt.value === "false")[0]
48
+ .filter(function (opt) { return opt.value === "false"; })[0]
48
49
  .label.toString();
49
50
  }
50
- id = `switch-${name}`;
51
- const idTrue = `${id}-true`;
52
- const idFalse = `${id}-false`;
53
- const isRadio = !!(valueTrue && valueFalse);
51
+ id = "switch-".concat(name);
52
+ var idTrue = "".concat(id, "-true");
53
+ var idFalse = "".concat(id, "-false");
54
+ var isRadio = !!(valueTrue && valueFalse);
54
55
  // // manage default values for both toggle modes
55
56
  // defaultChecked = isUndefined(defaultChecked) ? false : defaultChecked;
56
57
  // // TODO: maybe throw an error if the defaultValue that arrives here is not
@@ -61,9 +62,9 @@ export function useToggle(props, ref) {
61
62
  // : valueFalse;
62
63
  // get the value either from the uncontrolled watched input or from the given
63
64
  // prop to control the component
64
- let value = useWatch({
65
- name,
66
- control,
65
+ var value = useWatch({
66
+ name: name,
67
+ control: control,
67
68
  // defaultValue: isRadio ? defaultValue : defaultChecked,
68
69
  });
69
70
  if (propValue) {
@@ -73,14 +74,14 @@ export function useToggle(props, ref) {
73
74
  // a `register` function, then check if we have a `control` object or just
74
75
  // rely on the `name` prop and `ref`, they probably would be passed alongside
75
76
  // an `onChange` prop that is spreaded on the inputs
76
- const inputProps = useMemo(() => {
77
+ var inputProps = useMemo(function () {
77
78
  return register
78
79
  ? register(name)
79
80
  : control
80
81
  ? control.register(name)
81
82
  : {
82
- name,
83
- ref,
83
+ name: name,
84
+ ref: ref,
84
85
  };
85
86
  }, [register, control, name, ref]);
86
87
  /**
@@ -89,15 +90,15 @@ export function useToggle(props, ref) {
89
90
  * Fake the spacebar keyboard behaviour on the radio mode of the checkbox.
90
91
  * Without this *only* the arrow keys would change the checkbox state
91
92
  */
92
- const handleKeyDown = useCallback((event) => {
93
+ var handleKeyDown = useCallback(function (event) {
93
94
  if (event.key === " ") {
94
95
  event.preventDefault();
95
96
  event.stopPropagation();
96
- const firstInput = event.target;
97
- const next = firstInput.nextElementSibling;
98
- const prev = firstInput.previousElementSibling;
99
- const secondInput = next?.tagName === "INPUT" ? next : prev;
100
- let target = firstInput;
97
+ var firstInput = event.target;
98
+ var next = firstInput.nextElementSibling;
99
+ var prev = firstInput.previousElementSibling;
100
+ var secondInput = (next === null || next === void 0 ? void 0 : next.tagName) === "INPUT" ? next : prev;
101
+ var target = firstInput;
101
102
  if (firstInput.checked) {
102
103
  target = secondInput;
103
104
  }
@@ -113,7 +114,7 @@ export function useToggle(props, ref) {
113
114
  }, [valueTrue]);
114
115
  // collect all the return values that are dependent on the current value
115
116
  // of the input
116
- const valueDependentProps = useMemo(() => ({
117
+ var valueDependentProps = useMemo(function () { return ({
117
118
  rootProps: {
118
119
  htmlFor: isRadio
119
120
  ? !value || value === valueFalse
@@ -122,9 +123,11 @@ export function useToggle(props, ref) {
122
123
  : id,
123
124
  },
124
125
  label: label ? label : value,
125
- value,
126
- }), [value, valueFalse, isRadio, id, idTrue, idFalse, label]);
127
- const Inputs = useMemo(() => isRadio ? (_jsxs(_Fragment, { children: [_jsx(InputInvisible, { id: idFalse, ...inputProps, ...remainingInputProps, onKeyDown: handleKeyDown, type: "radio", value: valueFalse }), _jsx(InputInvisible, { id: idTrue, ...inputProps, ...remainingInputProps, onKeyDown: handleKeyDown, type: "radio", value: valueTrue })] })) : (_jsx(InputInvisible, { id: id, type: "checkbox", ...inputProps, ...remainingInputProps })), [
126
+ value: value,
127
+ }); }, [value, valueFalse, isRadio, id, idTrue, idFalse, label]);
128
+ var Inputs = useMemo(function () {
129
+ return isRadio ? (_jsxs(_Fragment, { children: [_jsx(InputInvisible, __assign({ id: idFalse }, inputProps, remainingInputProps, { onKeyDown: handleKeyDown, type: "radio", value: valueFalse })), _jsx(InputInvisible, __assign({ id: idTrue }, inputProps, remainingInputProps, { onKeyDown: handleKeyDown, type: "radio", value: valueTrue }))] })) : (_jsx(InputInvisible, __assign({ id: id, type: "checkbox" }, inputProps, remainingInputProps)));
130
+ }, [
128
131
  inputProps,
129
132
  remainingInputProps,
130
133
  handleKeyDown,
@@ -138,8 +141,5 @@ export function useToggle(props, ref) {
138
141
  // defaultValue,
139
142
  ]);
140
143
  // console.log("useToggle: render", value);
141
- return {
142
- ...valueDependentProps,
143
- Inputs,
144
- };
144
+ return __assign(__assign({}, valueDependentProps), { Inputs: Inputs });
145
145
  }
package/Forms/antispam.js CHANGED
@@ -10,19 +10,19 @@ import { encode, decode, isUndefined } from "@koine/utils";
10
10
  * form data not created by user input.
11
11
  */
12
12
  export function encodeForm(validationRules) {
13
- const encoded = {};
14
- const encodedNames = {};
15
- for (const name in validationRules) {
16
- if (!name.startsWith("_")) {
17
- const encodedName = encode(name);
18
- encoded[encodedName] = validationRules[name];
19
- encodedNames[name] = encodedName;
13
+ var encoded = {};
14
+ var encodedNames = {};
15
+ for (var name_1 in validationRules) {
16
+ if (!name_1.startsWith("_")) {
17
+ var encodedName = encode(name_1);
18
+ encoded[encodedName] = validationRules[name_1];
19
+ encodedNames[name_1] = encodedName;
20
20
  }
21
21
  }
22
22
  // we need `.required()` to correctly infer the type @see
23
23
  // https://github.com/jquense/yup/issues/946
24
- const encodedSchema = object(encoded).required();
25
- return { encodedSchema, encodedNames };
24
+ var encodedSchema = object(encoded).required();
25
+ return { encodedSchema: encodedSchema, encodedNames: encodedNames };
26
26
  }
27
27
  /**
28
28
  * Decode form data
@@ -34,9 +34,9 @@ export function encodeForm(validationRules) {
34
34
  * which are considered programmatic form data not created by user input.
35
35
  */
36
36
  export function decodeForm(formData) {
37
- const json = {};
38
- for (const encodedName in formData) {
39
- const decodedName = decode(encodedName);
37
+ var json = {};
38
+ for (var encodedName in formData) {
39
+ var decodedName = decode(encodedName);
40
40
  // always add underscore prefixed names as they are treated as internal
41
41
  // private inputs outside of the honeypot system, normalise them here removing
42
42
  // the underscore prefix
package/Forms/helpers.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { isString, matchSorter } from "@koine/utils";
2
- export const normaliseOptions = (options = []) => {
3
- return options.map((option) => {
2
+ export var normaliseOptions = function (options) {
3
+ if (options === void 0) { options = []; }
4
+ return options.map(function (option) {
4
5
  return isString(option)
5
6
  ? {
6
7
  label: option,
@@ -21,14 +22,14 @@ export function defaultOptionsFilterFn(options, inputValue) {
21
22
  export function triggerOnChange(onChange, name, value) {
22
23
  // @ts-expect-error nevermind
23
24
  if (onChange)
24
- onChange({ target: { name, value } });
25
+ onChange({ target: { name: name, value: value } });
25
26
  }
26
27
  /**
27
28
  * @see https://hustle.bizongo.in/simulate-react-on-change-on-controlled-components-baa336920e04
28
29
  * @deprecated
29
30
  */
30
31
  export function triggerChange(input, value) {
31
- const obj = window.Object;
32
+ var obj = window.Object;
32
33
  if (!obj) {
33
34
  // if (process.env["NODE_ENV"] !== "production") {
34
35
  // console.warn("triggerChange: window.Object does not exists, bailing.");
@@ -36,9 +37,9 @@ export function triggerChange(input, value) {
36
37
  return;
37
38
  }
38
39
  // @ts-expect-error nevermind
39
- const nativeInputValueSetter = obj.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set;
40
+ var nativeInputValueSetter = obj.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set;
40
41
  // @ts-expect-error nevermind
41
42
  nativeInputValueSetter.call(input, value);
42
- const inputEvent = new Event("input", { bubbles: true });
43
+ var inputEvent = new Event("input", { bubbles: true });
43
44
  input.dispatchEvent(inputEvent);
44
45
  }
package/Forms/styles.js CHANGED
@@ -1,60 +1,29 @@
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 { stateFocus } from "../styles/styled";
4
5
  import { ProgressLinear } from "../Progress/ProgressLinear";
5
6
  import { invisible } from "../styles/styled";
6
- export const InputInvisible = styled.input `
7
- ${invisible}
8
- `;
9
- export const InputHoneypot = styled(InputInvisible).attrs({
7
+ export var InputInvisible = styled.input(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), invisible);
8
+ export var InputHoneypot = styled(InputInvisible).attrs({
10
9
  type: "text",
11
10
  autoComplete: "new-password",
12
11
  tabIndex: -1,
13
- }) ``;
14
- export const InputProgress = styled((p) => (_jsx(ProgressLinear, { fg: "var(--accent300)", bg: "var(--accent400)", ...p }))) `
15
- position: absolute;
16
- bottom: 0;
17
- left: 0;
18
- width: 100%;
19
- `;
12
+ })(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""])));
13
+ export var InputProgress = styled(function (p) { return (_jsx(ProgressLinear, __assign({ fg: "var(--accent300)", bg: "var(--accent400)" }, p))); })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n"], ["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n"])));
20
14
  /**
21
15
  * Remove the default light blue background on autofilled inputs. To be used as
22
16
  * a function that outputs a CSS string.
23
17
  *
24
18
  * @see https://stackoverflow.com/a/62624824/1938970
25
19
  */
26
- export const inputResetAutofill = `
27
- &:-webkit-autofill,
28
- &:-webkit-autofill:hover,
29
- &:-webkit-autofill:focus,
30
- &:-webkit-autofill:active {
31
- -webkit-background-clip: text;
32
- }
33
- `;
20
+ export var inputResetAutofill = "\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-background-clip: text;\n }\n";
34
21
  /* FIXME: find a nice way to override this styling from implementation */
35
22
  // border-bottom: 1px solid var(--forms-border-color);
36
23
  // border: 0;
37
- export const inputBorder = `
38
- border: 1px solid var(--forms-border-color);
39
- `;
40
- export const inputPadding = `
41
- padding: var(--forms-gutter-y) var(--forms-gutter-x);
42
- `;
43
- export const inputReset = `
44
- width: 100%;
45
- min-height: 44px;
46
- ${inputBorder}
47
- ${inputPadding}
48
- `;
49
- export const inputBase = `
50
- ${inputReset}
51
- ${inputResetAutofill}
52
- background: transparent;
53
- `;
54
- export const inputFocus = `
55
- &:focus {
56
- outline: 0px;
57
- appearance: none;
58
- ${stateFocus}
59
- }
60
- `;
24
+ export var inputBorder = "\n border: 1px solid var(--forms-border-color);\n";
25
+ export var inputPadding = "\n padding: var(--forms-gutter-y) var(--forms-gutter-x);\n";
26
+ export var inputReset = "\n width: 100%;\n min-height: 44px;\n ".concat(inputBorder, "\n ").concat(inputPadding, "\n");
27
+ export var inputBase = "\n ".concat(inputReset, "\n ").concat(inputResetAutofill, "\n background: transparent;\n");
28
+ export var inputFocus = "\n &:focus {\n outline: 0px;\n appearance: none;\n ".concat(stateFocus, "\n }\n");
29
+ var templateObject_1, templateObject_2, templateObject_3;
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;