tinywidgets 0.0.11 → 1.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 (80) hide show
  1. package/.eslintrc.json +2 -1
  2. package/bun.lockb +0 -0
  3. package/package.json +19 -14
  4. package/src/common/functions.tsx +54 -0
  5. package/src/components/App/index.css.ts +81 -0
  6. package/src/components/App/index.tsx +177 -0
  7. package/src/components/Button/index.css.ts +66 -0
  8. package/src/components/Button/index.tsx +206 -0
  9. package/src/components/Card/index.css.ts +12 -0
  10. package/src/components/Card/index.tsx +34 -0
  11. package/src/components/Code/index.css.ts +49 -0
  12. package/src/components/Code/index.tsx +89 -0
  13. package/src/components/Collapsible/index.css.ts +37 -0
  14. package/src/components/Collapsible/index.tsx +132 -0
  15. package/src/{Detail → components/Detail}/index.css.ts +3 -3
  16. package/src/components/Detail/index.tsx +48 -0
  17. package/src/{Hr → components/Hr}/index.css.ts +3 -2
  18. package/src/components/Hr/index.tsx +26 -0
  19. package/src/components/Image/index.css.ts +38 -0
  20. package/src/components/Image/index.tsx +85 -0
  21. package/src/components/Metric/index.tsx +59 -0
  22. package/src/components/Row/index.css.ts +30 -0
  23. package/src/components/Row/index.tsx +104 -0
  24. package/src/components/Summary/index.css.ts +16 -0
  25. package/src/components/Summary/index.tsx +59 -0
  26. package/src/{Tag → components/Tag}/index.css.ts +9 -6
  27. package/src/components/Tag/index.tsx +73 -0
  28. package/src/css/code.css.ts +112 -0
  29. package/src/css/colors.css.ts +124 -0
  30. package/src/css/dimensions.css.ts +67 -0
  31. package/src/css/global.css.ts +11 -0
  32. package/src/css/screens.ts +15 -0
  33. package/src/index.css.ts +4 -137
  34. package/src/index.ts +16 -24
  35. package/src/stores/LocalStore.tsx +52 -19
  36. package/src/stores/RouteStore.tsx +103 -0
  37. package/src/stores/SessionStore.tsx +40 -25
  38. package/src/stores/common.ts +6 -0
  39. package/tsconfig.json +19 -0
  40. package/.prettierrc +0 -5
  41. package/index.css.ts +0 -1
  42. package/index.ts +0 -12
  43. package/src/App/index.tsx +0 -18
  44. package/src/Avatar/index.css.ts +0 -17
  45. package/src/Avatar/index.tsx +0 -25
  46. package/src/Axis/index.css.ts +0 -19
  47. package/src/Axis/index.tsx +0 -36
  48. package/src/Button/index.css.ts +0 -57
  49. package/src/Button/index.tsx +0 -63
  50. package/src/Card/index.css.ts +0 -9
  51. package/src/Card/index.tsx +0 -13
  52. package/src/Collapsible/index.css.ts +0 -34
  53. package/src/Collapsible/index.tsx +0 -75
  54. package/src/Detail/index.tsx +0 -26
  55. package/src/Hr/index.tsx +0 -8
  56. package/src/Metric/index.tsx +0 -26
  57. package/src/Summary/index.css.ts +0 -17
  58. package/src/Summary/index.tsx +0 -32
  59. package/src/Tag/index.tsx +0 -26
  60. package/src/Ui/Header/DarkButton/index.tsx +0 -19
  61. package/src/Ui/Header/SideNav/index.css.ts +0 -23
  62. package/src/Ui/Header/SideNav/index.tsx +0 -14
  63. package/src/Ui/Header/SideNavButton/index.css.ts +0 -4
  64. package/src/Ui/Header/SideNavButton/index.tsx +0 -19
  65. package/src/Ui/Header/Title/index.css.ts +0 -10
  66. package/src/Ui/Header/Title/index.tsx +0 -9
  67. package/src/Ui/Header/TopNav/index.css.ts +0 -9
  68. package/src/Ui/Header/TopNav/index.tsx +0 -18
  69. package/src/Ui/Header/index.css.ts +0 -18
  70. package/src/Ui/Header/index.tsx +0 -32
  71. package/src/Ui/Main/Article/index.css.ts +0 -13
  72. package/src/Ui/Main/Article/index.tsx +0 -9
  73. package/src/Ui/Main/Footer/index.css.ts +0 -12
  74. package/src/Ui/Main/Footer/index.tsx +0 -9
  75. package/src/Ui/Main/index.css.ts +0 -16
  76. package/src/Ui/Main/index.tsx +0 -24
  77. package/src/Ui/index.css.ts +0 -9
  78. package/src/Ui/index.tsx +0 -50
  79. package/utils.ts +0 -1
  80. /package/src/{Metric → components/Metric}/index.css.ts +0 -0
@@ -1,24 +0,0 @@
1
- /** @jsx createElement */
2
-
3
- import type { ReactNode } from 'react';
4
- import { classNames, createElement } from '../../index.ts';
5
- import { Article } from './Article/index.tsx';
6
- import { Footer } from './Footer/index.tsx';
7
- import { main, mainHasSideNav } from './index.css.ts';
8
-
9
- export const Main = ({
10
- article,
11
- footer,
12
- hasSideNav,
13
- }: {
14
- article?: ReactNode;
15
- footer?: ReactNode;
16
- hasSideNav: boolean;
17
- }) => {
18
- return (
19
- <main className={classNames(main, hasSideNav && mainHasSideNav)}>
20
- {article ? <Article article={article} /> : null}
21
- {footer ? <Footer footer={footer} /> : null}
22
- </main>
23
- );
24
- };
@@ -1,9 +0,0 @@
1
- import {style} from '@vanilla-extract/css';
2
- import {theme} from '../index.css.ts';
3
-
4
- export const ui = style({
5
- display: 'flex',
6
- height: '100dvh',
7
- width: '100dvw',
8
- color: theme.foreground,
9
- });
package/src/Ui/index.tsx DELETED
@@ -1,50 +0,0 @@
1
- /** @jsx createElement */
2
-
3
- import type { ReactNode } from 'react';
4
- import { themeDark, themeLight } from '../index.css.ts';
5
- import { classNames, createElement } from '../index.ts';
6
- import { useDarkChoice, useDarkPreference } from '../stores/LocalStore.tsx';
7
- import { Header } from './Header/index.tsx';
8
- import { ui } from './index.css.ts';
9
- import { Main } from './Main/index.tsx';
10
-
11
- export const Ui = ({
12
- title,
13
- topNavLeft,
14
- topNavRight,
15
- sideNav,
16
- article,
17
- footer,
18
- }: {
19
- title: ReactNode;
20
- topNavLeft?: ReactNode;
21
- topNavRight?: ReactNode;
22
- sideNav?: ReactNode;
23
- article?: ReactNode;
24
- footer?: ReactNode;
25
- }) => {
26
- const darkPreference = useDarkPreference();
27
- const darkChoice = useDarkChoice();
28
- return (
29
- <div
30
- className={classNames(
31
- ui,
32
- darkChoice == 1 || (darkChoice == 2 && darkPreference)
33
- ? themeDark
34
- : themeLight,
35
- )}
36
- >
37
- <Header
38
- title={title}
39
- topNavLeft={topNavLeft}
40
- topNavRight={topNavRight}
41
- sideNav={sideNav}
42
- />
43
- <Main
44
- article={article}
45
- footer={footer}
46
- hasSideNav={sideNav ? true : false}
47
- />
48
- </div>
49
- );
50
- };
package/utils.ts DELETED
@@ -1 +0,0 @@
1
- export {classNames, large, small} from './src/index.ts';
File without changes