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/dist/aria.js ADDED
@@ -0,0 +1,42 @@
1
+ export function queryFocusables(root) {
2
+ const focusables = Array.from(root.querySelectorAll("button,input,textarea,a,[tabindex='0'],[tabindex='-1']"));
3
+ return focusables.filter((element) => !element["disabled"]);
4
+ }
5
+ export function queryGrid(root) {
6
+ const rows = Array.from(root.querySelectorAll('li[role="row"]'));
7
+ const rowsWithColumns = rows
8
+ .map((row) => Array.from(queryFocusables(row)))
9
+ .filter((row) => row.length > 0);
10
+ return rowsWithColumns;
11
+ }
12
+ export const normalizeGrid = (rows, rowIndex, columnIndex) => {
13
+ for (const row of rows) {
14
+ for (const column of row) {
15
+ column.tabIndex = -1;
16
+ }
17
+ }
18
+ const row = rows[rowIndex];
19
+ const column = row[columnIndex] ?? row[row.length - 1];
20
+ column.tabIndex = 0;
21
+ };
22
+ export const focusGridElement = (rows, rowIndex, columnIndex) => {
23
+ normalizeGrid(rows, rowIndex, columnIndex);
24
+ const row = rows[rowIndex];
25
+ const column = row[columnIndex] ?? row[row.length - 1];
26
+ column.focus();
27
+ column.scrollIntoView(false);
28
+ };
29
+ export const normalizeElements = (focusables, index) => {
30
+ for (const element of focusables) {
31
+ element.tabIndex = -1;
32
+ }
33
+ const element = focusables[index] ?? focusables[focusables.length - 1];
34
+ element.tabIndex = 0;
35
+ };
36
+ export const focusElement = (focusables, index) => {
37
+ normalizeElements(focusables, index);
38
+ const element = focusables[index] ?? focusables[focusables.length - 1];
39
+ element.focus();
40
+ // element.scrollIntoView(false);
41
+ };
42
+ //# sourceMappingURL=aria.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aria.js","sourceRoot":"","sources":["../src/aria.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe,CAAC,IAAiB;IAC/C,MAAM,UAAU,GAAgB,KAAK,CAAC,IAAI,CACxC,IAAI,CAAC,gBAAgB,CACnB,wDAAwD,CACzD,CACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,OAAkB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAiB;IACzC,MAAM,IAAI,GAAoB,KAAK,CAAC,IAAI,CACtC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CACxC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI;SACzB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;SAC9C,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEnC,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,IAAqB,EACrB,QAAgB,EAChB,WAAmB,EACb,EAAE;IACR,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,KAAK,MAAM,MAAM,IAAI,GAAG,EAAE;YACxB,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;SACtB;KACF;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,WAAW,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declare function guid(): string;
package/dist/guid.js ADDED
@@ -0,0 +1,7 @@
1
+ export function guid() {
2
+ return "ID-xxxxxxxx".replace(/[xy]/g, function (c) {
3
+ const r = (Math.random() * 16) | 0, v = c === "x" ? r : (r & 0x3) | 0x8;
4
+ return v.toString(16);
5
+ });
6
+ }
7
+ //# sourceMappingURL=guid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guid.js","sourceRoot":"","sources":["../src/guid.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI;IAClB,OAAO,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QAC/C,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAChC,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QACtC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/hash.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function hash(source: string, modulus?: number): number;
package/dist/hash.js ADDED
@@ -0,0 +1,20 @@
1
+ export function hash(source, modulus) {
2
+ let hash = 0;
3
+ let i;
4
+ let chr;
5
+ if (source.length === 0) {
6
+ return hash;
7
+ }
8
+ for (i = 0; i < source.length; i++) {
9
+ chr = source.charCodeAt(i);
10
+ hash = (hash << 5) - hash + chr;
11
+ hash |= 0; // Convert to 32bit integer
12
+ }
13
+ if (modulus) {
14
+ return Math.abs(hash) % modulus;
15
+ }
16
+ else {
17
+ return Math.abs(hash);
18
+ }
19
+ }
20
+ //# sourceMappingURL=hash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.js","sourceRoot":"","sources":["../src/hash.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI,CAAC,MAAc,EAAE,OAAgB;IACnD,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,IAAI,CAAS,CAAC;IACd,IAAI,GAAW,CAAC;IAEhB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QACvB,OAAO,IAAI,CAAC;KACb;IAED,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClC,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC;QAChC,IAAI,IAAI,CAAC,CAAC,CAAC,2BAA2B;KACvC;IAED,IAAI,OAAO,EAAE;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;KACjC;SAAM;QACL,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KACvB;AACH,CAAC"}
@@ -0,0 +1,65 @@
1
+ export * from "./aria";
2
+ export * from "./Badge";
3
+ export * from "./BaseButton";
4
+ export * from "./BaseInput";
5
+ export * from "./BaseLink";
6
+ export * from "./BaseList";
7
+ export * from "./BaseListAddOn";
8
+ export * from "./BaseListItem";
9
+ export * from "./BaseView";
10
+ export * from "./Box";
11
+ export * from "./Button";
12
+ export * from "./Calendar";
13
+ export * from "./Checkbox";
14
+ export * from "./Circle";
15
+ export * from "./Column";
16
+ export * from "./DarkMode";
17
+ export * from "./DateInput";
18
+ export * from "./DatePicker";
19
+ export * from "./DatetimeInput";
20
+ export * from "./Dialog";
21
+ export * from "./Dropdown";
22
+ export * from "./Emitter";
23
+ export * from "./FlexLayout";
24
+ export * from "./guid";
25
+ export * from "./Icon";
26
+ export * from "./IconButton";
27
+ export * from "./IconLink";
28
+ export * from "./IconType";
29
+ export * from "./jss";
30
+ export * from "./Link";
31
+ export * from "./List";
32
+ export * from "./ListButtonItem";
33
+ export * from "./ListDivider";
34
+ export * from "./ListHeaderItem";
35
+ export * from "./ListItem";
36
+ export * from "./ListLinkItem";
37
+ export * from "./ListSpacer";
38
+ export * from "./numberToBase";
39
+ export * from "./OnVisible";
40
+ export * from "./Popover";
41
+ export * from "./ProgressBar";
42
+ export * from "./ProgressCircle";
43
+ export * from "./Providers";
44
+ export * from "./RangeInput";
45
+ export * from "./RootView";
46
+ export * from "./Row";
47
+ export * from "./StackContext";
48
+ export * from "./stateMachineContextFactory";
49
+ export * from "./StaticCheckbox";
50
+ export * from "./Storage";
51
+ export * from "./Stream";
52
+ export * from "./Sublist";
53
+ export * from "./SubmitIconInput";
54
+ export * from "./Tabs";
55
+ export * from "./Text";
56
+ export * from "./TextArea";
57
+ export * from "./TextInput";
58
+ export * from "./TextInputWithState";
59
+ export * from "./TextPairing";
60
+ export * from "./TimeInput";
61
+ export * from "./TimeInput";
62
+ export * from "./useCookie";
63
+ export * from "./useNavigation";
64
+ export * from "./usePromise";
65
+ export * from "./useRefEffect";
package/dist/index.js ADDED
@@ -0,0 +1,66 @@
1
+ export * from "./aria";
2
+ export * from "./Badge";
3
+ export * from "./BaseButton";
4
+ export * from "./BaseInput";
5
+ export * from "./BaseLink";
6
+ export * from "./BaseList";
7
+ export * from "./BaseListAddOn";
8
+ export * from "./BaseListItem";
9
+ export * from "./BaseView";
10
+ export * from "./Box";
11
+ export * from "./Button";
12
+ export * from "./Calendar";
13
+ export * from "./Checkbox";
14
+ export * from "./Circle";
15
+ export * from "./Column";
16
+ export * from "./DarkMode";
17
+ export * from "./DateInput";
18
+ export * from "./DatePicker";
19
+ export * from "./DatetimeInput";
20
+ export * from "./Dialog";
21
+ export * from "./Dropdown";
22
+ export * from "./Emitter";
23
+ export * from "./FlexLayout";
24
+ export * from "./guid";
25
+ export * from "./Icon";
26
+ export * from "./IconButton";
27
+ export * from "./IconLink";
28
+ export * from "./IconType";
29
+ export * from "./jss";
30
+ export * from "./Link";
31
+ export * from "./List";
32
+ export * from "./ListButtonItem";
33
+ export * from "./ListDivider";
34
+ export * from "./ListHeaderItem";
35
+ export * from "./ListItem";
36
+ export * from "./ListLinkItem";
37
+ export * from "./ListSpacer";
38
+ export * from "./numberToBase";
39
+ export * from "./OnVisible";
40
+ export * from "./Popover";
41
+ export * from "./ProgressBar";
42
+ export * from "./ProgressCircle";
43
+ export * from "./Providers";
44
+ export * from "./RangeInput";
45
+ export * from "./RootView";
46
+ export * from "./Row";
47
+ export * from "./StackContext";
48
+ export * from "./stateMachineContextFactory";
49
+ export * from "./StaticCheckbox";
50
+ export * from "./Storage";
51
+ export * from "./Stream";
52
+ export * from "./Sublist";
53
+ export * from "./SubmitIconInput";
54
+ export * from "./Tabs";
55
+ export * from "./Text";
56
+ export * from "./TextArea";
57
+ export * from "./TextInput";
58
+ export * from "./TextInputWithState";
59
+ export * from "./TextPairing";
60
+ export * from "./TimeInput";
61
+ export * from "./TimeInput";
62
+ export * from "./useCookie";
63
+ export * from "./useNavigation";
64
+ export * from "./usePromise";
65
+ export * from "./useRefEffect";
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC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3
+ export type Styles = CSS.Properties<string | number | CSS.Properties<string | number>>;
4
+ export type JSStyle = Styles | null | false | undefined | {
5
+ [key: string]: Styles;
6
+ } | Array<JSStyle>;
7
+ export declare const jss: (jsStyle: JSStyle) => string;
8
+ export declare function JSStylesProvider({ themes, children, }: {
9
+ themes: {
10
+ dark: Theme;
11
+ light: Theme;
12
+ };
13
+ children: JSX.Element;
14
+ }): JSX.Element;
15
+ export declare function JSServerStyles(): JSX.Element;
16
+ export type Size = "xsmall" | "small" | "medium" | "large" | "xlarge";
17
+ export type Spacing = "none" | Size;
18
+ export type Gap = Spacing;
19
+ export type Padding = Spacing | [Spacing, Spacing];
20
+ export type Margin = Spacing | [Spacing, Spacing];
21
+ export type Direction = "horizontal" | "vertical";
22
+ export type Position = "start" | "end";
23
+ export type Justify = "none" | "center" | "flex-start" | "space-between" | "flex-end" | "stretch";
24
+ export type Align = "none" | "center" | "stretch" | "flex-start" | "flex-end";
25
+ export type FlexDirection = "row" | "column";
26
+ export type Color = "none" | "negative" | "warning" | "highlight" | "primary-background" | "secondary-background" | "divider" | "inherit";
27
+ export type TextColor = "primary" | "secondary" | "highlight" | "negative" | "subtle" | "light" | "inherit";
28
+ export declare function cssVar(string: keyof Theme): string;
29
+ export declare function getSize(size: Size): string;
30
+ export declare function getSpacing(spacing: Spacing): string;
31
+ export declare function getPadding(padding: Padding): JSStyle;
32
+ export declare function getMargin(margin: Margin): JSStyle;
33
+ export type Theme = {
34
+ ["--overlay-background"]: string;
35
+ ["--primary-background"]: string;
36
+ ["--secondary-background"]: string;
37
+ ["--divider"]: string;
38
+ ["--strong-divider"]: string;
39
+ ["--pressed-background"]: string;
40
+ ["--hovered-background"]: string;
41
+ ["--selected-background"]: string;
42
+ ["--nav-bar"]: string;
43
+ ["--warning"]: string;
44
+ ["--highlight"]: string;
45
+ ["--outline"]: string;
46
+ ["--light-highlight"]: string;
47
+ ["--primary-text"]: string;
48
+ ["--secondary-text"]: string;
49
+ ["--subtle-text"]: string;
50
+ ["--highlight-text"]: string;
51
+ ["--negative-text"]: string;
52
+ ["--light-text"]: string;
53
+ ["--background-button-positive"]: string;
54
+ ["--background-button-secondary"]: string;
55
+ ["--background-button-negative"]: string;
56
+ ["--background-button-disabled"]: string;
57
+ ["--spacing-xs"]: string;
58
+ ["--spacing-s"]: string;
59
+ ["--spacing-m"]: string;
60
+ ["--spacing-l"]: string;
61
+ ["--spacing-xl"]: string;
62
+ ["--spacing-xxl"]: string;
63
+ ["--spacing-xxxl"]: string;
64
+ ["--border-radius-s"]: string;
65
+ ["--border-radius-m"]: string;
66
+ ["--border-radius-l"]: string;
67
+ ["--nav-bar-height"]: string;
68
+ };
69
+ export declare const lightTheme: Theme;
70
+ export declare const darkTheme: Theme;
71
+ export declare const baseStyles: string;
72
+ export declare const getBackground: (color: Color) => JSStyle;
73
+ export declare const MOBILE = 750;
74
+ export declare const TABLET = 1000;
75
+ export declare const LAPTOP = 1200;
76
+ export declare const MOBILE_MEDIA: string;
77
+ export declare const TABLET_MEDIA: string;
78
+ export declare const LAPTOP_MEDIA: string;
79
+ export declare const DESKTOP_MEDIA: string;
80
+ export declare function mobile(jsStyle: JSStyle): {
81
+ [key: string]: JSStyle;
82
+ };
83
+ export declare function tablet(jsStyle: JSStyle): {
84
+ [key: string]: JSStyle;
85
+ };
86
+ export declare function laptop(jsStyle: JSStyle): {
87
+ [key: string]: JSStyle;
88
+ };
89
+ export declare function desktop(jsStyle: JSStyle): {
90
+ [key: string]: JSStyle;
91
+ };
92
+ export declare const getTextColor: (color: TextColor) => {
93
+ color: string;
94
+ } | {
95
+ color: string;
96
+ } | {
97
+ color: string;
98
+ } | {
99
+ color: string;
100
+ } | {
101
+ color: string;
102
+ } | {
103
+ color: string;
104
+ } | {
105
+ color: string;
106
+ };
107
+ export declare function getBaseStyles(themes: {
108
+ light: Theme;
109
+ dark: Theme;
110
+ }): string[];