aidos-ui 3.0.0

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 (339) hide show
  1. package/.prettierrc +4 -0
  2. package/LICENSE +21 -0
  3. package/README.md +55 -0
  4. package/dist/Badge.d.ts +7 -0
  5. package/dist/Badge.js +22 -0
  6. package/dist/Badge.js.map +1 -0
  7. package/dist/BaseButton.d.ts +13 -0
  8. package/dist/BaseButton.js +22 -0
  9. package/dist/BaseButton.js.map +1 -0
  10. package/dist/BaseInput.d.ts +15 -0
  11. package/dist/BaseInput.js +14 -0
  12. package/dist/BaseInput.js.map +1 -0
  13. package/dist/BaseLink.d.ts +17 -0
  14. package/dist/BaseLink.js +28 -0
  15. package/dist/BaseLink.js.map +1 -0
  16. package/dist/BaseList.d.ts +6 -0
  17. package/dist/BaseList.js +14 -0
  18. package/dist/BaseList.js.map +1 -0
  19. package/dist/BaseListAddOn.d.ts +5 -0
  20. package/dist/BaseListAddOn.js +7 -0
  21. package/dist/BaseListAddOn.js.map +1 -0
  22. package/dist/BaseListItem.d.ts +27 -0
  23. package/dist/BaseListItem.js +26 -0
  24. package/dist/BaseListItem.js.map +1 -0
  25. package/dist/BaseView.d.ts +12 -0
  26. package/dist/BaseView.js +26 -0
  27. package/dist/BaseView.js.map +1 -0
  28. package/dist/Box.d.ts +5 -0
  29. package/dist/Box.js +6 -0
  30. package/dist/Box.js.map +1 -0
  31. package/dist/Button.d.ts +20 -0
  32. package/dist/Button.js +20 -0
  33. package/dist/Button.js.map +1 -0
  34. package/dist/Calendar.d.ts +18 -0
  35. package/dist/Calendar.js +57 -0
  36. package/dist/Calendar.js.map +1 -0
  37. package/dist/Card.d.ts +4 -0
  38. package/dist/Card.js +12 -0
  39. package/dist/Card.js.map +1 -0
  40. package/dist/Checkbox.d.ts +12 -0
  41. package/dist/Checkbox.js +32 -0
  42. package/dist/Checkbox.js.map +1 -0
  43. package/dist/Circle.d.ts +6 -0
  44. package/dist/Circle.js +12 -0
  45. package/dist/Circle.js.map +1 -0
  46. package/dist/Column.d.ts +6 -0
  47. package/dist/Column.js +7 -0
  48. package/dist/Column.js.map +1 -0
  49. package/dist/DarkMode.d.ts +13 -0
  50. package/dist/DarkMode.js +61 -0
  51. package/dist/DarkMode.js.map +1 -0
  52. package/dist/DateInput.d.ts +13 -0
  53. package/dist/DateInput.js +29 -0
  54. package/dist/DateInput.js.map +1 -0
  55. package/dist/DatePicker.d.ts +12 -0
  56. package/dist/DatePicker.js +34 -0
  57. package/dist/DatePicker.js.map +1 -0
  58. package/dist/DatetimeInput.d.ts +13 -0
  59. package/dist/DatetimeInput.js +31 -0
  60. package/dist/DatetimeInput.js.map +1 -0
  61. package/dist/DesignBook.d.ts +2 -0
  62. package/dist/DesignBook.js +55 -0
  63. package/dist/DesignBook.js.map +1 -0
  64. package/dist/Dialog.d.ts +17 -0
  65. package/dist/Dialog.js +86 -0
  66. package/dist/Dialog.js.map +1 -0
  67. package/dist/Dropdown.d.ts +10 -0
  68. package/dist/Dropdown.js +64 -0
  69. package/dist/Dropdown.js.map +1 -0
  70. package/dist/Emitter.d.ts +6 -0
  71. package/dist/Emitter.js +19 -0
  72. package/dist/Emitter.js.map +1 -0
  73. package/dist/FlexLayout.d.ts +11 -0
  74. package/dist/FlexLayout.js +18 -0
  75. package/dist/FlexLayout.js.map +1 -0
  76. package/dist/Icon.d.ts +12 -0
  77. package/dist/Icon.js +69 -0
  78. package/dist/Icon.js.map +1 -0
  79. package/dist/IconButton.d.ts +9 -0
  80. package/dist/IconButton.js +31 -0
  81. package/dist/IconButton.js.map +1 -0
  82. package/dist/IconLink.d.ts +9 -0
  83. package/dist/IconLink.js +31 -0
  84. package/dist/IconLink.js.map +1 -0
  85. package/dist/IconType.d.ts +1 -0
  86. package/dist/IconType.js +2 -0
  87. package/dist/IconType.js.map +1 -0
  88. package/dist/Interactable.d.ts +48 -0
  89. package/dist/Interactable.js +131 -0
  90. package/dist/Interactable.js.map +1 -0
  91. package/dist/Link.d.ts +20 -0
  92. package/dist/Link.js +22 -0
  93. package/dist/Link.js.map +1 -0
  94. package/dist/List.d.ts +11 -0
  95. package/dist/List.js +17 -0
  96. package/dist/List.js.map +1 -0
  97. package/dist/ListButtonItem.d.ts +15 -0
  98. package/dist/ListButtonItem.js +9 -0
  99. package/dist/ListButtonItem.js.map +1 -0
  100. package/dist/ListDivider.d.ts +2 -0
  101. package/dist/ListDivider.js +12 -0
  102. package/dist/ListDivider.js.map +1 -0
  103. package/dist/ListHeaderItem.d.ts +11 -0
  104. package/dist/ListHeaderItem.js +13 -0
  105. package/dist/ListHeaderItem.js.map +1 -0
  106. package/dist/ListItem.d.ts +10 -0
  107. package/dist/ListItem.js +7 -0
  108. package/dist/ListItem.js.map +1 -0
  109. package/dist/ListLinkItem.d.ts +17 -0
  110. package/dist/ListLinkItem.js +9 -0
  111. package/dist/ListLinkItem.js.map +1 -0
  112. package/dist/ListSpacer.d.ts +2 -0
  113. package/dist/ListSpacer.js +13 -0
  114. package/dist/ListSpacer.js.map +1 -0
  115. package/dist/OnVisible.d.ts +5 -0
  116. package/dist/OnVisible.js +28 -0
  117. package/dist/OnVisible.js.map +1 -0
  118. package/dist/Popover.d.ts +21 -0
  119. package/dist/Popover.js +88 -0
  120. package/dist/Popover.js.map +1 -0
  121. package/dist/ProgressBar.d.ts +8 -0
  122. package/dist/ProgressBar.js +42 -0
  123. package/dist/ProgressBar.js.map +1 -0
  124. package/dist/ProgressCircle.d.ts +6 -0
  125. package/dist/ProgressCircle.js +12 -0
  126. package/dist/ProgressCircle.js.map +1 -0
  127. package/dist/Providers.d.ts +9 -0
  128. package/dist/Providers.js +16 -0
  129. package/dist/Providers.js.map +1 -0
  130. package/dist/RangeInput.d.ts +14 -0
  131. package/dist/RangeInput.js +32 -0
  132. package/dist/RangeInput.js.map +1 -0
  133. package/dist/ResultOrError.d.ts +13 -0
  134. package/dist/ResultOrError.js +7 -0
  135. package/dist/ResultOrError.js.map +1 -0
  136. package/dist/RootView.d.ts +5 -0
  137. package/dist/RootView.js +35 -0
  138. package/dist/RootView.js.map +1 -0
  139. package/dist/Router.d.ts +2 -0
  140. package/dist/Router.js +37 -0
  141. package/dist/Router.js.map +1 -0
  142. package/dist/RouterState.d.ts +38 -0
  143. package/dist/RouterState.js +111 -0
  144. package/dist/RouterState.js.map +1 -0
  145. package/dist/Row.d.ts +6 -0
  146. package/dist/Row.js +7 -0
  147. package/dist/Row.js.map +1 -0
  148. package/dist/StackContext.d.ts +8 -0
  149. package/dist/StackContext.js +25 -0
  150. package/dist/StackContext.js.map +1 -0
  151. package/dist/StaticCheckbox.d.ts +17 -0
  152. package/dist/StaticCheckbox.js +48 -0
  153. package/dist/StaticCheckbox.js.map +1 -0
  154. package/dist/Storage.d.ts +12 -0
  155. package/dist/Storage.js +148 -0
  156. package/dist/Storage.js.map +1 -0
  157. package/dist/Stream.d.ts +9 -0
  158. package/dist/Stream.js +36 -0
  159. package/dist/Stream.js.map +1 -0
  160. package/dist/Sublist.d.ts +12 -0
  161. package/dist/Sublist.js +18 -0
  162. package/dist/Sublist.js.map +1 -0
  163. package/dist/SubmitIconInput.d.ts +9 -0
  164. package/dist/SubmitIconInput.js +25 -0
  165. package/dist/SubmitIconInput.js.map +1 -0
  166. package/dist/Tabs.d.ts +20 -0
  167. package/dist/Tabs.js +35 -0
  168. package/dist/Tabs.js.map +1 -0
  169. package/dist/Text.d.ts +25 -0
  170. package/dist/Text.js +50 -0
  171. package/dist/Text.js.map +1 -0
  172. package/dist/TextArea.d.ts +10 -0
  173. package/dist/TextArea.js +22 -0
  174. package/dist/TextArea.js.map +1 -0
  175. package/dist/TextInput.d.ts +14 -0
  176. package/dist/TextInput.js +52 -0
  177. package/dist/TextInput.js.map +1 -0
  178. package/dist/TextInputWithState.d.ts +10 -0
  179. package/dist/TextInputWithState.js +14 -0
  180. package/dist/TextInputWithState.js.map +1 -0
  181. package/dist/TextPairing.d.ts +21 -0
  182. package/dist/TextPairing.js +26 -0
  183. package/dist/TextPairing.js.map +1 -0
  184. package/dist/TimeInput.d.ts +15 -0
  185. package/dist/TimeInput.js +58 -0
  186. package/dist/TimeInput.js.map +1 -0
  187. package/dist/Tooltip.d.ts +11 -0
  188. package/dist/Tooltip.js +72 -0
  189. package/dist/Tooltip.js.map +1 -0
  190. package/dist/aria.d.ts +8 -0
  191. package/dist/aria.js +42 -0
  192. package/dist/aria.js.map +1 -0
  193. package/dist/guid.d.ts +1 -0
  194. package/dist/guid.js +7 -0
  195. package/dist/guid.js.map +1 -0
  196. package/dist/hash.d.ts +1 -0
  197. package/dist/hash.js +20 -0
  198. package/dist/hash.js.map +1 -0
  199. package/dist/index.d.ts +65 -0
  200. package/dist/index.js +66 -0
  201. package/dist/index.js.map +1 -0
  202. package/dist/jss.d.ts +110 -0
  203. package/dist/jss.js +438 -0
  204. package/dist/jss.js.map +1 -0
  205. package/dist/numberToBase.d.ts +1 -0
  206. package/dist/numberToBase.js +44 -0
  207. package/dist/numberToBase.js.map +1 -0
  208. package/dist/stateMachineContextFactory.d.ts +36 -0
  209. package/dist/stateMachineContextFactory.js +48 -0
  210. package/dist/stateMachineContextFactory.js.map +1 -0
  211. package/dist/useCookie.d.ts +9 -0
  212. package/dist/useCookie.js +65 -0
  213. package/dist/useCookie.js.map +1 -0
  214. package/dist/useKeyboard.d.ts +8 -0
  215. package/dist/useKeyboard.js +26 -0
  216. package/dist/useKeyboard.js.map +1 -0
  217. package/dist/useNavigation.d.ts +5 -0
  218. package/dist/useNavigation.js +79 -0
  219. package/dist/useNavigation.js.map +1 -0
  220. package/dist/usePromise.d.ts +1 -0
  221. package/dist/usePromise.js +12 -0
  222. package/dist/usePromise.js.map +1 -0
  223. package/dist/useRefEffect.d.ts +1 -0
  224. package/dist/useRefEffect.js +15 -0
  225. package/dist/useRefEffect.js.map +1 -0
  226. package/next-env.d.ts +5 -0
  227. package/next.config.js +21 -0
  228. package/package.json +40 -0
  229. package/scripts/publish.js +27 -0
  230. package/src/Badge.tsx +36 -0
  231. package/src/BaseButton.tsx +58 -0
  232. package/src/BaseInput.tsx +57 -0
  233. package/src/BaseLink.tsx +77 -0
  234. package/src/BaseList.tsx +29 -0
  235. package/src/BaseListAddOn.tsx +10 -0
  236. package/src/BaseListItem.tsx +117 -0
  237. package/src/BaseView.tsx +57 -0
  238. package/src/Box.tsx +20 -0
  239. package/src/Button.tsx +84 -0
  240. package/src/Calendar.tsx +125 -0
  241. package/src/Card.tsx +17 -0
  242. package/src/Checkbox.tsx +63 -0
  243. package/src/Circle.tsx +24 -0
  244. package/src/Column.tsx +12 -0
  245. package/src/DarkMode.tsx +99 -0
  246. package/src/DateInput.tsx +63 -0
  247. package/src/DatePicker.tsx +67 -0
  248. package/src/DatetimeInput.tsx +71 -0
  249. package/src/DesignBook.tsx +697 -0
  250. package/src/Dialog.tsx +144 -0
  251. package/src/Dropdown.tsx +129 -0
  252. package/src/Emitter.ts +26 -0
  253. package/src/FlexLayout.tsx +53 -0
  254. package/src/Icon.tsx +96 -0
  255. package/src/IconButton.tsx +66 -0
  256. package/src/IconLink.tsx +58 -0
  257. package/src/IconType.ts +787 -0
  258. package/src/Interactable.tsx +159 -0
  259. package/src/Link.tsx +86 -0
  260. package/src/List.tsx +41 -0
  261. package/src/ListButtonItem.tsx +69 -0
  262. package/src/ListDivider.tsx +13 -0
  263. package/src/ListHeaderItem.tsx +45 -0
  264. package/src/ListItem.tsx +27 -0
  265. package/src/ListLinkItem.tsx +76 -0
  266. package/src/ListSpacer.tsx +14 -0
  267. package/src/OnVisible.tsx +42 -0
  268. package/src/Popover.tsx +141 -0
  269. package/src/ProgressBar.tsx +63 -0
  270. package/src/ProgressCircle.tsx +38 -0
  271. package/src/Providers.tsx +33 -0
  272. package/src/RangeInput.tsx +82 -0
  273. package/src/ResultOrError.ts +15 -0
  274. package/src/RootView.tsx +55 -0
  275. package/src/Router.tsx +62 -0
  276. package/src/RouterState.tsx +154 -0
  277. package/src/Row.tsx +12 -0
  278. package/src/StackContext.tsx +52 -0
  279. package/src/StaticCheckbox.tsx +74 -0
  280. package/src/Storage.tsx +200 -0
  281. package/src/Stream.tsx +50 -0
  282. package/src/Sublist.tsx +62 -0
  283. package/src/SubmitIconInput.tsx +45 -0
  284. package/src/Tabs.tsx +103 -0
  285. package/src/Text.tsx +102 -0
  286. package/src/TextArea.tsx +45 -0
  287. package/src/TextInput.tsx +111 -0
  288. package/src/TextInputWithState.tsx +35 -0
  289. package/src/TextPairing.tsx +115 -0
  290. package/src/TimeInput.tsx +109 -0
  291. package/src/Tooltip.tsx +108 -0
  292. package/src/aria.ts +72 -0
  293. package/src/examples/ExampleDialog.tsx +28 -0
  294. package/src/guid.ts +7 -0
  295. package/src/hash.ts +21 -0
  296. package/src/index.ts +65 -0
  297. package/src/jss.tsx +607 -0
  298. package/src/numberToBase.ts +52 -0
  299. package/src/pages/Badge.mdx +30 -0
  300. package/src/pages/Button.mdx +57 -0
  301. package/src/pages/Calendar.mdx +60 -0
  302. package/src/pages/Checkbox.mdx +56 -0
  303. package/src/pages/Dialog.mdx +32 -0
  304. package/src/pages/FlexLayout.mdx +77 -0
  305. package/src/pages/Hashing.mdx +20 -0
  306. package/src/pages/Icon.mdx +63 -0
  307. package/src/pages/IconButton.mdx +144 -0
  308. package/src/pages/Link.mdx +57 -0
  309. package/src/pages/List.mdx +292 -0
  310. package/src/pages/ListHeader.mdx +94 -0
  311. package/src/pages/Popover.mdx +101 -0
  312. package/src/pages/ProgressBar.mdx +20 -0
  313. package/src/pages/ProgressCircle.mdx +35 -0
  314. package/src/pages/RangeInput.mdx +109 -0
  315. package/src/pages/Tabs.mdx +168 -0
  316. package/src/pages/Text.mdx +133 -0
  317. package/src/pages/TextInput.mdx +110 -0
  318. package/src/pages/TextPairing.mdx +155 -0
  319. package/src/pages/TimeInput.mdx +73 -0
  320. package/src/pages/Tooltip.mdx +28 -0
  321. package/src/pages/_app.tsx +561 -0
  322. package/src/pages/_document.tsx +30 -0
  323. package/src/pages/css-in-js.mdx +127 -0
  324. package/src/pages/index.mdx +58 -0
  325. package/src/pages/navigation.mdx +56 -0
  326. package/src/pages/prism.css +3 -0
  327. package/src/pages/useCookie.mdx +15 -0
  328. package/src/pages/useKeyboard.mdx +20 -0
  329. package/src/pages/useNavigation.mdx +30 -0
  330. package/src/pages/usePromise.mdx +15 -0
  331. package/src/pages/useRefEffect.mdx +49 -0
  332. package/src/stateMachineContextFactory.tsx +111 -0
  333. package/src/useCookie.tsx +89 -0
  334. package/src/useKeyboard.tsx +43 -0
  335. package/src/useNavigation.tsx +89 -0
  336. package/src/usePromise.tsx +18 -0
  337. package/src/useRefEffect.tsx +18 -0
  338. package/tsconfig.build.json +23 -0
  339. package/tsconfig.json +23 -0
package/.prettierrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "tabWidth": 2,
3
+ "useTabs": false
4
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2023] [Gerard Moreno-Torres Bertran]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # Aidos UI
2
+
3
+ This is a React design system library with many utilities and zero dependencies. It was built with the aim to be simple, lightweight and beautiful.
4
+
5
+ Documentation can be found [here](https://simple-ui-core.vercel.app);
6
+
7
+ ## Why?
8
+
9
+ Over the years I have always have many side projects, and many of them needed a UI. Back in 2019 I thought, maybe I could make my own design system, and so I did. Since then it has changed quite a bit and it is now something I am more or less proud of. It has everything I have ever needed and it is done in the way I find simplest and least convoluted. This is all ultimately very subjective, and that is fine, because the first design decision of this library was that it would be extremely opinionated. With that said, although this library does not lend it self to modification, it does tend to be fairly easy to extend and compose with it. I am now making this documentation with the vague weak conviction that someone out there may benefit from it.
10
+
11
+ ---
12
+
13
+ ## Who is this for?
14
+
15
+ I initially only planned to use this myself so its features and design have so far reflected the things I have been working on. However I keep extending this library, and I think that with more users it may be possible to add more ideas and usecases so that this becomes a really complete system.
16
+
17
+ ---
18
+
19
+ ## Design philosophy
20
+
21
+ 1. <b>Opinionated</b>
22
+
23
+ First and foremost, this library is extremely opinionated. This is so because I believe HTML is too low level and error prone, CSS defaults are not beautiful enough, and the web in general too big a toolkit to make simple things work in the way you expect. So, for the sake of simplicity, this library imposes opinions at every step. These opinions will not fit everyone's needs, and that is a sacrifice that can be made for the sake of simplicity.
24
+
25
+ 3. <b>Modular</b>
26
+
27
+ There is no limit to the number of features and components that can be added, as long as every piece remains modular, or at most, composed out of its simpler parts. This is important to keep bundle sizes under control and also to keep the API sane. Modular components imply abstractions that do not depend on each other. This helps keep overall complexity low, so that it is simpler to extend the system.
28
+
29
+ 3. <b>Accessible</b>
30
+
31
+ By design every component should be accessible, paying attention to keyboard navigation, focusable elements, adding helpful aria properties and following wcag specificaitons as faithfully as possible.
32
+
33
+ 4. <b>Dependency free</b>
34
+
35
+ As few dependencies as possible, to keep things light and under control. The only dependency right now is [iconify](https://github.com/iconify/iconify) because I am not able to re-create all icons myself.
36
+
37
+ ---
38
+
39
+ ## Installation
40
+
41
+ This library can be installed through npm
42
+
43
+ ```bash
44
+ npm install --save aidos-ui
45
+ ```
46
+
47
+ ---
48
+
49
+ ## How to use
50
+
51
+ - Import components from the `dist` folder (e.g. `import {Button} from 'simple-ui-core/dist`)
52
+ - The `Providers` component somewhere in the application.
53
+ - If the application is running in nextjs, the `JSServerStyles` component has to be used in the \_document `<Head />`, this enables jss to work also server side.
54
+
55
+ ---
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Color, JSStyle, Size } from "./jss";
3
+ export declare function Badge({ size, color, jsStyle, }: {
4
+ size?: Size;
5
+ color?: Color;
6
+ jsStyle?: JSStyle;
7
+ }): JSX.Element;
package/dist/Badge.js ADDED
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BaseView } from "./BaseView";
3
+ import { getBackground } from "./jss";
4
+ const sizes = {
5
+ xsmall: 4,
6
+ small: 6,
7
+ medium: 12,
8
+ large: 18,
9
+ xlarge: 24,
10
+ };
11
+ export function Badge({ size = "medium", color = "highlight", jsStyle, }) {
12
+ return (_jsx(BaseView, { jsStyle: [
13
+ {
14
+ width: sizes[size],
15
+ height: sizes[size],
16
+ borderRadius: sizes[size] / 2,
17
+ },
18
+ getBackground(color),
19
+ jsStyle,
20
+ ] }));
21
+ }
22
+ //# sourceMappingURL=Badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../src/Badge.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAwB,aAAa,EAAE,MAAM,OAAO,CAAC;AAE5D,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;CACX,CAAC;AAEF,MAAM,UAAU,KAAK,CAAC,EACpB,IAAI,GAAG,QAAQ,EACf,KAAK,GAAG,WAAW,EACnB,OAAO,GAKR;IACC,OAAO,CACL,KAAC,QAAQ,IACP,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC;gBAClB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC;gBACnB,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;aAC9B;YACD,aAAa,CAAC,KAAK,CAAC;YACpB,OAAO;SACR,GACD,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { InteractableColor } from "./Interactable";
3
+ import { JSStyle, Padding } from "./jss";
4
+ export interface BaseButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
6
+ jsStyle?: JSStyle;
7
+ color: InteractableColor;
8
+ bare?: boolean;
9
+ className?: undefined;
10
+ animateInteraction?: boolean;
11
+ padding?: Padding;
12
+ }
13
+ export declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { getInteractableJSStyles } from "./Interactable";
4
+ import { jss } from "./jss";
5
+ export const BaseButton = React.forwardRef(({ onClick, children, jsStyle, color, bare = false, disabled, animateInteraction = true, padding, ...otherProps }, ref) => {
6
+ return (_jsx("button", { ...otherProps, "aria-disabled": disabled ? true : undefined, ref: ref, onClick: (event) => {
7
+ if (disabled) {
8
+ return;
9
+ }
10
+ onClick(event);
11
+ }, className: jss([
12
+ ...getInteractableJSStyles({
13
+ color,
14
+ bare,
15
+ disabled,
16
+ animateInteraction,
17
+ padding,
18
+ }),
19
+ jsStyle,
20
+ ]), children: children }));
21
+ });
22
+ //# sourceMappingURL=BaseButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseButton.js","sourceRoot":"","sources":["../src/BaseButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAqB,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAoB,GAAG,EAAE,MAAM,OAAO,CAAC;AAa9C,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACxC,CACE,EACE,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,GAAG,KAAK,EACZ,QAAQ,EACR,kBAAkB,GAAG,IAAI,EACzB,OAAO,EACP,GAAG,UAAU,EACG,EAClB,GAAkC,EAClC,EAAE;IACF,OAAO,CACL,oBACM,UAAU,mBACC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC1C,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YACjB,IAAI,QAAQ,EAAE;gBACZ,OAAO;aACR;YAED,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,EACD,SAAS,EAAE,GAAG,CAAC;YACb,GAAG,uBAAuB,CAAC;gBACzB,KAAK;gBACL,IAAI;gBACJ,QAAQ;gBACR,kBAAkB;gBAClB,OAAO;aACR,CAAC;YACF,OAAO;SACR,CAAC,YAED,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React, { ReactNode } from "react";
2
+ import { JSStyle, Size, TextColor } from "./jss";
3
+ export interface BaseInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
+ jsStyle?: JSStyle;
5
+ className?: undefined;
6
+ size?: undefined;
7
+ children?: undefined;
8
+ id?: undefined;
9
+ label?: ReactNode;
10
+ labelSize?: Size;
11
+ labelColor?: TextColor;
12
+ labelBold?: boolean;
13
+ labelPosition?: "start" | "end";
14
+ }
15
+ export declare const BaseInput: React.ForwardRefExoticComponent<BaseInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useId } from "react";
3
+ import { jss } from "./jss";
4
+ import { Label } from "./Text";
5
+ export const BaseInput = React.forwardRef(({ jsStyle, label, labelPosition = "end", labelSize, labelColor, labelBold, ...otherProps }, ref) => {
6
+ const id = useId();
7
+ const labelElement = (_jsx(Label, { size: labelSize, bold: labelBold, color: labelColor, jsStyle: {
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ }, htmlFor: id, children: label }));
12
+ return (_jsxs(_Fragment, { children: [label && labelPosition === "start" && labelElement, _jsx("input", { id: id, ref: ref, className: jss(jsStyle), ...otherProps }), label && labelPosition === "end" && labelElement] }));
13
+ });
14
+ //# sourceMappingURL=BaseInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseInput.js","sourceRoot":"","sources":["../src/BaseInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAa,KAAK,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAA4B,GAAG,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAgB/B,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACvC,CACE,EACE,OAAO,EACP,KAAK,EACL,aAAa,GAAG,KAAK,EACrB,SAAS,EACT,UAAU,EACV,SAAS,EACT,GAAG,UAAU,EACE,EACjB,GAAiC,EACjC,EAAE;IACF,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,MAAM,YAAY,GAAG,CACnB,KAAC,KAAK,IACJ,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;SACzB,EACD,OAAO,EAAE,EAAE,YAEV,KAAK,GACA,CACT,CAAC;IAEF,OAAO,CACL,8BACG,KAAK,IAAI,aAAa,KAAK,OAAO,IAAI,YAAY,EACnD,gBAAO,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,KAAM,UAAU,GAAI,EACnE,KAAK,IAAI,aAAa,KAAK,KAAK,IAAI,YAAY,IAChD,CACJ,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { InteractableColor } from "./Interactable";
3
+ import { JSStyle, Padding } from "./jss";
4
+ export interface BaseLinkProps extends React.LinkHTMLAttributes<HTMLAnchorElement> {
5
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
6
+ target?: string;
7
+ jsStyle?: JSStyle;
8
+ color: InteractableColor;
9
+ href: string;
10
+ disabled?: boolean;
11
+ bare?: boolean;
12
+ className?: undefined;
13
+ animateInteraction?: boolean;
14
+ padding?: Padding;
15
+ }
16
+ export declare const BaseLinkComponentOverrideContext: React.Context<(props: any) => JSX.Element>;
17
+ export declare const BaseLink: React.ForwardRefExoticComponent<BaseLinkProps & React.RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React, { useContext } from "react";
3
+ import { getInteractableJSStyles } from "./Interactable";
4
+ import { jss } from "./jss";
5
+ // This only exists to make NextJS happy, it should not be used in any other case
6
+ export const BaseLinkComponentOverrideContext = React.createContext((props) => (_jsx("a", { ...props })));
7
+ export const BaseLink = React.forwardRef(({ onClick, children, jsStyle, color, bare = false, disabled, animateInteraction = true, padding, href, role = "link", ...otherProps }, ref) => {
8
+ const Link = useContext(BaseLinkComponentOverrideContext);
9
+ return (_jsx(Link, { ...otherProps, "aria-disabled": disabled ? true : undefined, href: href, role: role, ref: ref, onClick: onClick
10
+ ? (event) => {
11
+ if (disabled) {
12
+ return;
13
+ }
14
+ onClick(event);
15
+ }
16
+ : undefined, className: jss([
17
+ ...getInteractableJSStyles({
18
+ color,
19
+ bare,
20
+ disabled,
21
+ animateInteraction,
22
+ padding,
23
+ }),
24
+ disabled && { pointerEvents: "none" },
25
+ jsStyle,
26
+ ]), children: children }));
27
+ });
28
+ //# sourceMappingURL=BaseLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseLink.js","sourceRoot":"","sources":["../src/BaseLink.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAqB,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAoB,GAAG,EAAE,MAAM,OAAO,CAAC;AAgB9C,iFAAiF;AACjF,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAC7E,eAAO,KAAK,GAAI,CACjB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CACE,EACE,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,IAAI,GAAG,KAAK,EACZ,QAAQ,EACR,kBAAkB,GAAG,IAAI,EACzB,OAAO,EACP,IAAI,EACJ,IAAI,GAAG,MAAM,EACb,GAAG,UAAU,EACC,EAChB,GAAkC,EAClC,EAAE;IACF,MAAM,IAAI,GAAG,UAAU,CAAC,gCAAgC,CAAC,CAAC;IAE1D,OAAO,CACL,KAAC,IAAI,OACC,UAAU,mBACC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC1C,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,OAAO,EACL,OAAO;YACL,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;gBACR,IAAI,QAAQ,EAAE;oBACZ,OAAO;iBACR;gBAED,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC;YACH,CAAC,CAAC,SAAS,EAEf,SAAS,EAAE,GAAG,CAAC;YACb,GAAG,uBAAuB,CAAC;gBACzB,KAAK;gBACL,IAAI;gBACJ,QAAQ;gBACR,kBAAkB;gBAClB,OAAO;aACR,CAAC;YACF,QAAQ,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE;YACrC,OAAO;SACR,CAAC,YAED,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { ColumnProps } from "./Column";
3
+ export interface BaseListProps extends ColumnProps {
4
+ tag?: undefined;
5
+ }
6
+ export declare const BaseList: React.ForwardRefExoticComponent<Pick<BaseListProps, "padding" | "style" | "slot" | "title" | "children" | "hidden" | "color" | "relative" | "justify" | "direction" | "translate" | "gap" | "dangerouslySetInnerHTML" | "grow" | "shrink" | "jsStyle" | "tag" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { Column } from "./Column";
4
+ export const BaseList = React.forwardRef(({ jsStyle, ...otherProps }, ref) => {
5
+ return (_jsx(Column, { ...otherProps, tag: "ul", jsStyle: [
6
+ {
7
+ listStyle: "none",
8
+ margin: 0,
9
+ padding: 0,
10
+ },
11
+ jsStyle,
12
+ ], ref: ref }));
13
+ });
14
+ //# sourceMappingURL=BaseList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseList.js","sourceRoot":"","sources":["../src/BaseList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAM/C,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CACE,EAAE,OAAO,EAAE,GAAG,UAAU,EAAiB,EACzC,GAA+B,EAC/B,EAAE;IACF,OAAO,CACL,KAAC,MAAM,OACD,UAAU,EACd,GAAG,EAAC,IAAI,EACR,OAAO,EAAE;YACP;gBACE,SAAS,EAAE,MAAM;gBACjB,MAAM,EAAE,CAAC;gBACT,OAAO,EAAE,CAAC;aACX;YACD,OAAO;SACR,EACD,GAAG,EAAE,GAAG,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { BaseViewProps } from "./BaseView";
3
+ export interface BaseListAddOnProps extends BaseViewProps {
4
+ }
5
+ export declare const BaseListAddOn: React.ForwardRefExoticComponent<Pick<BaseListAddOnProps, "style" | "slot" | "title" | "children" | "hidden" | "color" | "relative" | "translate" | "dangerouslySetInnerHTML" | "grow" | "shrink" | "jsStyle" | "tag" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { BaseView } from "./BaseView";
4
+ export const BaseListAddOn = React.forwardRef((props, ref) => {
5
+ return _jsx(BaseView, { ...props, ref: ref });
6
+ });
7
+ //# sourceMappingURL=BaseListAddOn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseListAddOn.js","sourceRoot":"","sources":["../src/BaseListAddOn.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAIrD,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAC3C,CAAC,KAAyB,EAAE,GAA+B,EAAE,EAAE;IAC7D,OAAO,KAAC,QAAQ,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,GAAI,CAAC;AAC3C,CAAC,CACF,CAAC"}
@@ -0,0 +1,27 @@
1
+ import React, { ReactNode } from "react";
2
+ import { RowProps } from "./Row";
3
+ import { JSStyle, Size, Position, Spacing, TextColor } from "./jss";
4
+ export interface BaseListItemProps extends RowProps {
5
+ children: (elements: {
6
+ content: JSX.Element;
7
+ }) => ReactNode;
8
+ jsStyle?: JSStyle;
9
+ withDivider?: boolean;
10
+ headline: string;
11
+ headlineSize?: Size;
12
+ headlineColor?: TextColor;
13
+ headlineAddOn?: ReactNode;
14
+ headlineBold?: boolean;
15
+ body?: string;
16
+ bodySize?: Size;
17
+ bodyColor?: TextColor;
18
+ addOn?: ReactNode;
19
+ addOnPosition?: Position;
20
+ outerAddOn?: ReactNode;
21
+ disabled?: boolean;
22
+ role?: undefined;
23
+ gap?: Spacing;
24
+ selected?: boolean;
25
+ bare?: boolean;
26
+ }
27
+ export declare const BaseListItem: React.ForwardRefExoticComponent<Pick<BaseListItemProps, "padding" | "style" | "body" | "slot" | "title" | "children" | "hidden" | "color" | "relative" | "justify" | "disabled" | "direction" | "translate" | "gap" | "dangerouslySetInnerHTML" | "grow" | "shrink" | "jsStyle" | "tag" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bare" | "selected" | "align" | "headline" | "headlineColor" | "headlineSize" | "headlineAddOn" | "bodyColor" | "bodySize" | "addOn" | "addOnPosition" | "headlineBold" | "withDivider" | "outerAddOn"> & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { ListDivider } from "./ListDivider";
4
+ import { Row } from "./Row";
5
+ import { cssVar } from "./jss";
6
+ import { TextPairing } from "./TextPairing";
7
+ import { BaseView } from "./BaseView";
8
+ export const BaseListItem = React.forwardRef(({ children, jsStyle, withDivider = true, headline, headlineSize = "medium", headlineColor = "primary", headlineAddOn, body, bodySize = "small", bodyColor = "secondary", addOn, addOnPosition, outerAddOn, disabled = false, padding = "medium", gap = "medium", selected, bare, headlineBold, ...otherProps }, ref) => {
9
+ const content = (_jsx(TextPairing, { headlineBold: headlineBold, padding: padding, gap: gap, addOn: addOn, addOnPosition: addOnPosition, headline: headline, headlineSize: headlineSize, headlineColor: disabled ? "subtle" : bare && selected ? "highlight" : headlineColor, headlineAddOn: headlineAddOn, body: body, bodySize: bodySize, bodyColor: disabled ? "subtle" : bodyColor, grow: true, shrink: false }));
10
+ return (_jsxs(_Fragment, { children: [_jsxs(Row, { ...otherProps, ref: ref, relative: true, tag: "li", role: "row", jsStyle: [
11
+ !bare && {
12
+ [":first-child *"]: {
13
+ borderTopLeftRadius: cssVar("--border-radius-l"),
14
+ borderTopRightRadius: cssVar("--border-radius-l"),
15
+ },
16
+ [":last-child *"]: {
17
+ borderBottomLeftRadius: cssVar("--border-radius-l"),
18
+ borderBottomRightRadius: cssVar("--border-radius-l"),
19
+ },
20
+ },
21
+ jsStyle,
22
+ ], children: [_jsx(Row, { grow: true, role: "gridcell", jsStyle: {
23
+ overflow: "hidden",
24
+ }, children: children({ content }) }), outerAddOn && _jsx(BaseView, { role: "gridcell", children: outerAddOn })] }), withDivider && _jsx(ListDivider, {})] }));
25
+ });
26
+ //# sourceMappingURL=BaseListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseListItem.js","sourceRoot":"","sources":["../src/BaseListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAY,MAAM,OAAO,CAAC;AACtC,OAAO,EAA+C,MAAM,EAAE,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAyBtC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAC1C,CACE,EACE,QAAQ,EACR,OAAO,EACP,WAAW,GAAG,IAAI,EAClB,QAAQ,EACR,YAAY,GAAG,QAAQ,EACvB,aAAa,GAAG,SAAS,EACzB,aAAa,EACb,IAAI,EACJ,QAAQ,GAAG,OAAO,EAClB,SAAS,GAAG,WAAW,EACvB,KAAK,EACL,aAAa,EACb,UAAU,EACV,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,QAAQ,EAClB,GAAG,GAAG,QAAQ,EACd,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,GAAG,UAAU,EACK,EACpB,GAA4B,EAC5B,EAAE;IACF,MAAM,OAAO,GAAG,CACd,KAAC,WAAW,IACV,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,aAAa,EACX,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,EAEtE,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAC1C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,KAAK,GACb,CACH,CAAC;IAEF,OAAO,CACL,8BACE,MAAC,GAAG,OACE,UAAU,EACd,GAAG,EAAE,GAAG,EACR,QAAQ,QACR,GAAG,EAAC,IAAI,EACR,IAAI,EAAC,KAAK,EACV,OAAO,EAAE;oBACP,CAAC,IAAI,IAAI;wBACP,CAAC,gBAAgB,CAAC,EAAE;4BAClB,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,CAAC;4BAChD,oBAAoB,EAAE,MAAM,CAAC,mBAAmB,CAAC;yBAClD;wBACD,CAAC,eAAe,CAAC,EAAE;4BACjB,sBAAsB,EAAE,MAAM,CAAC,mBAAmB,CAAC;4BACnD,uBAAuB,EAAE,MAAM,CAAC,mBAAmB,CAAC;yBACrD;qBACF;oBACD,OAAO;iBACR,aAED,KAAC,GAAG,IACF,IAAI,QACJ,IAAI,EAAC,UAAU,EACf,OAAO,EAAE;4BACP,QAAQ,EAAE,QAAQ;yBACnB,YAEA,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,GAClB,EACL,UAAU,IAAI,KAAC,QAAQ,IAAC,IAAI,EAAC,UAAU,YAAE,UAAU,GAAY,IAC5D,EACL,WAAW,IAAI,KAAC,WAAW,KAAG,IAC9B,CACJ,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { JSStyle } from "./jss";
3
+ export interface BaseViewProps extends React.HTMLAttributes<HTMLElement> {
4
+ jsStyle?: JSStyle;
5
+ ref?: React.Ref<HTMLDivElement>;
6
+ className?: undefined;
7
+ grow?: boolean;
8
+ shrink?: boolean;
9
+ relative?: boolean;
10
+ tag?: keyof HTMLElementTagNameMap;
11
+ }
12
+ export declare const BaseView: React.ForwardRefExoticComponent<Pick<BaseViewProps, "style" | "slot" | "title" | "children" | "hidden" | "color" | "relative" | "translate" | "dangerouslySetInnerHTML" | "grow" | "shrink" | "jsStyle" | "tag" | "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { jss } from "./jss";
4
+ const jsStyles = {
5
+ relative: {
6
+ position: "relative",
7
+ },
8
+ grow: {
9
+ flexGrow: 1,
10
+ },
11
+ shrink: {
12
+ flexShrink: 1,
13
+ },
14
+ };
15
+ export const BaseView = React.forwardRef(({ jsStyle, children, tag, grow, shrink, relative, ...otherProps }, ref) => {
16
+ const Tag = tag ?? "div";
17
+ return (
18
+ // @ts-ignore
19
+ _jsx(Tag, { ref: ref, className: jss([
20
+ jsStyle,
21
+ grow && jsStyles.grow,
22
+ shrink && jsStyles.shrink,
23
+ relative && jsStyles.relative,
24
+ ]), ...otherProps, children: children }));
25
+ });
26
+ //# sourceMappingURL=BaseView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseView.js","sourceRoot":"","sources":["../src/BaseView.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAW,GAAG,EAAE,MAAM,OAAO,CAAC;AAErC,MAAM,QAAQ,GAA+B;IAC3C,QAAQ,EAAE;QACR,QAAQ,EAAE,UAAU;KACrB;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,CAAC;KACZ;IACD,MAAM,EAAE;QACN,UAAU,EAAE,CAAC;KACd;CACF,CAAC;AAYF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CACE,EACE,OAAO,EACP,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,GAAG,UAAU,EACC,EAChB,GAA4B,EAC5B,EAAE;IACF,MAAM,GAAG,GAAW,GAAG,IAAI,KAAK,CAAC;IAEjC,OAAO;IACL,aAAa;IACb,KAAC,GAAG,IACF,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,GAAG,CAAC;YACb,OAAO;YACP,IAAI,IAAI,QAAQ,CAAC,IAAI;YACrB,MAAM,IAAI,QAAQ,CAAC,MAAM;YACzB,QAAQ,IAAI,QAAQ,CAAC,QAAQ;SAC9B,CAAC,KACE,UAAU,YAEb,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
package/dist/Box.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { FlexLayoutProps } from "./FlexLayout";
3
+ export interface BoxProps extends FlexLayoutProps {
4
+ }
5
+ export declare function Box({ padding, align, justify, ...otherProps }: BoxProps): JSX.Element;
package/dist/Box.js ADDED
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { FlexLayout } from "./FlexLayout";
3
+ export function Box({ padding = "medium", align = "center", justify = "center", ...otherProps }) {
4
+ return (_jsx(FlexLayout, { padding: padding, align: align, justify: justify, ...otherProps }));
5
+ }
6
+ //# sourceMappingURL=Box.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Box.js","sourceRoot":"","sources":["../src/Box.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,cAAc,CAAC;AAI3D,MAAM,UAAU,GAAG,CAAC,EAClB,OAAO,GAAG,QAAQ,EAClB,KAAK,GAAG,QAAQ,EAChB,OAAO,GAAG,QAAQ,EAClB,GAAG,UAAU,EACJ;IACT,OAAO,CACL,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,KACZ,UAAU,GACd,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { BaseButtonProps } from "./BaseButton";
3
+ import { IconType } from "./IconType";
4
+ import { FlexLayoutProps } from "./FlexLayout";
5
+ import { InteractableColor } from "./Interactable";
6
+ import { Align, Gap, Justify, Size } from "./jss";
7
+ export interface ButtonProps extends BaseButtonProps {
8
+ label: string;
9
+ color: InteractableColor;
10
+ size?: Size;
11
+ icon?: IconType;
12
+ iconSize?: Size;
13
+ children?: undefined;
14
+ iconPosition?: "left" | "right";
15
+ rowProps?: FlexLayoutProps;
16
+ align?: Align;
17
+ gap?: Gap;
18
+ justify?: Justify;
19
+ }
20
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
package/dist/Button.js ADDED
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { BaseButton } from "./BaseButton";
4
+ import { Text } from "./Text";
5
+ import { Row } from "./Row";
6
+ import { Icon } from "./Icon";
7
+ import { getGlyphColor } from "./Interactable";
8
+ import { cssVar, getPadding } from "./jss";
9
+ export const Button = React.forwardRef(({ label, color, bare, disabled, icon, iconSize = "medium", iconPosition = "left", align = "center", gap = "small", justify = "center", jsStyle, size = "medium", ...otherProps }, ref) => {
10
+ return (_jsx(BaseButton, { ...otherProps, bare: bare, ref: ref, color: color, disabled: disabled, jsStyle: [
11
+ {
12
+ borderRadius: cssVar("--border-radius-m"),
13
+ justifyContent: "center",
14
+ userSelect: "none",
15
+ },
16
+ getPadding("medium"),
17
+ jsStyle,
18
+ ], children: _jsxs(Row, { grow: true, align: align, gap: gap, justify: justify, children: [icon && iconPosition === "left" && (_jsx(Icon, { icon: icon, size: iconSize, color: getGlyphColor(color, disabled, bare) })), _jsx(Text, { size: size, color: getGlyphColor(color, disabled, bare), children: label }), icon && iconPosition === "right" && (_jsx(Icon, { icon: icon, size: iconSize, color: getGlyphColor(color, disabled, bare) }))] }) }));
19
+ });
20
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAmB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAqB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAA6B,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAgBtE,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CACpC,CACE,EACE,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,QAAQ,GAAG,QAAQ,EACnB,YAAY,GAAG,MAAM,EACrB,KAAK,GAAG,QAAQ,EAChB,GAAG,GAAG,OAAO,EACb,OAAO,GAAG,QAAQ,EAClB,OAAO,EACP,IAAI,GAAG,QAAQ,EACf,GAAG,UAAU,EACD,EACd,GAAkC,EAClC,EAAE;IACF,OAAO,CACL,KAAC,UAAU,OACL,UAAU,EACd,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,MAAM,CAAC,mBAAmB,CAAC;gBACzC,cAAc,EAAE,QAAQ;gBACxB,UAAU,EAAE,MAAM;aACnB;YACD,UAAU,CAAC,QAAQ,CAAC;YACpB,OAAO;SACR,YAED,MAAC,GAAG,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,aACtD,IAAI,IAAI,YAAY,KAAK,MAAM,IAAI,CAClC,KAAC,IAAI,IACH,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,GAC3C,CACH,EACD,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,YAC1D,KAAK,GACD,EACN,IAAI,IAAI,YAAY,KAAK,OAAO,IAAI,CACnC,KAAC,IAAI,IACH,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,GAC3C,CACH,IACG,GACK,CACd,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { JSStyle } from "./jss";
3
+ export declare const Calendar: React.ForwardRefExoticComponent<{
4
+ date: Date;
5
+ header: (props: {
6
+ weekday: string;
7
+ }) => JSX.Element;
8
+ jsStyle?: JSStyle;
9
+ cell: (props: {
10
+ today?: boolean;
11
+ date: Date;
12
+ outOfMonth: boolean;
13
+ top: boolean;
14
+ left: boolean;
15
+ right: boolean;
16
+ bottom: boolean;
17
+ }) => JSX.Element;
18
+ } & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,57 @@
1
+ import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import React, { useMemo } from "react";
3
+ import { BaseView } from "./BaseView";
4
+ const dateFormatter = Intl.DateTimeFormat("en-UK", {
5
+ weekday: "short",
6
+ });
7
+ const MON = dateFormatter.format(new Date(2000, 1, 7));
8
+ const TUE = dateFormatter.format(new Date(2000, 1, 8));
9
+ const WED = dateFormatter.format(new Date(2000, 1, 9));
10
+ const THU = dateFormatter.format(new Date(2000, 1, 10));
11
+ const FRI = dateFormatter.format(new Date(2000, 1, 11));
12
+ const SAT = dateFormatter.format(new Date(2000, 1, 12));
13
+ const SUN = dateFormatter.format(new Date(2000, 1, 13));
14
+ export const Calendar = React.forwardRef(({ date, cell, header, jsStyle, }, ref) => {
15
+ const year = date.getFullYear();
16
+ const month = date.getMonth();
17
+ const daysInMonth = new Date(year, month + 1, 0).getDate();
18
+ const firstDayOfTheMonth = new Date(year, month, 1).getDay();
19
+ const offset = firstDayOfTheMonth === 0 ? 6 : firstDayOfTheMonth - 1;
20
+ const headers = useMemo(() => {
21
+ return (_jsxs(_Fragment, { children: [header({ weekday: MON }), header({ weekday: TUE }), header({ weekday: WED }), header({ weekday: THU }), header({ weekday: FRI }), header({ weekday: SAT }), header({ weekday: SUN })] }));
22
+ }, []);
23
+ return (_jsxs(BaseView, { ref: ref, jsStyle: [
24
+ {
25
+ display: "grid",
26
+ gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr 1fr",
27
+ gridTemplateRows: "1fr",
28
+ },
29
+ jsStyle,
30
+ ], children: [headers, Array.from(Array(offset).keys()).map((index) => {
31
+ const dayDate = new Date(date.getFullYear(), date.getMonth(), index + 1 - offset);
32
+ return (_jsx(React.Fragment, { children: cell({
33
+ date: dayDate,
34
+ today: false,
35
+ top: true,
36
+ left: index % 7 === 0,
37
+ outOfMonth: true,
38
+ right: false,
39
+ bottom: false,
40
+ }) }, dayDate.toISOString()));
41
+ }), Array.from(Array(daysInMonth).keys()).map((index) => {
42
+ const dayDate = new Date(date.getFullYear(), date.getMonth(), index + 1, 12 // If we do not add this the ISO string would be from the day before at midnight
43
+ );
44
+ return (_jsx(React.Fragment, { children: cell({
45
+ date: dayDate,
46
+ top: index + offset < 7,
47
+ left: (index + offset) % 7 === 0,
48
+ right: (index + offset) % 7 === 7 - 1 || index === daysInMonth - 1,
49
+ bottom: index > daysInMonth - 7 - 1,
50
+ outOfMonth: false,
51
+ today: dayDate.getDate() == new Date().getDate() &&
52
+ dayDate.getMonth() == new Date().getMonth() &&
53
+ dayDate.getFullYear() == new Date().getFullYear(),
54
+ }) }, dayDate.toISOString()));
55
+ })] }));
56
+ });
57
+ //# sourceMappingURL=Calendar.js.map