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.
- package/.eslintrc.json +2 -1
- package/bun.lockb +0 -0
- package/package.json +19 -14
- package/src/common/functions.tsx +54 -0
- package/src/components/App/index.css.ts +81 -0
- package/src/components/App/index.tsx +177 -0
- package/src/components/Button/index.css.ts +66 -0
- package/src/components/Button/index.tsx +206 -0
- package/src/components/Card/index.css.ts +12 -0
- package/src/components/Card/index.tsx +34 -0
- package/src/components/Code/index.css.ts +49 -0
- package/src/components/Code/index.tsx +89 -0
- package/src/components/Collapsible/index.css.ts +37 -0
- package/src/components/Collapsible/index.tsx +132 -0
- package/src/{Detail → components/Detail}/index.css.ts +3 -3
- package/src/components/Detail/index.tsx +48 -0
- package/src/{Hr → components/Hr}/index.css.ts +3 -2
- package/src/components/Hr/index.tsx +26 -0
- package/src/components/Image/index.css.ts +38 -0
- package/src/components/Image/index.tsx +85 -0
- package/src/components/Metric/index.tsx +59 -0
- package/src/components/Row/index.css.ts +30 -0
- package/src/components/Row/index.tsx +104 -0
- package/src/components/Summary/index.css.ts +16 -0
- package/src/components/Summary/index.tsx +59 -0
- package/src/{Tag → components/Tag}/index.css.ts +9 -6
- package/src/components/Tag/index.tsx +73 -0
- package/src/css/code.css.ts +112 -0
- package/src/css/colors.css.ts +124 -0
- package/src/css/dimensions.css.ts +67 -0
- package/src/css/global.css.ts +11 -0
- package/src/css/screens.ts +15 -0
- package/src/index.css.ts +4 -137
- package/src/index.ts +16 -24
- package/src/stores/LocalStore.tsx +52 -19
- package/src/stores/RouteStore.tsx +103 -0
- package/src/stores/SessionStore.tsx +40 -25
- package/src/stores/common.ts +6 -0
- package/tsconfig.json +19 -0
- package/.prettierrc +0 -5
- package/index.css.ts +0 -1
- package/index.ts +0 -12
- package/src/App/index.tsx +0 -18
- package/src/Avatar/index.css.ts +0 -17
- package/src/Avatar/index.tsx +0 -25
- package/src/Axis/index.css.ts +0 -19
- package/src/Axis/index.tsx +0 -36
- package/src/Button/index.css.ts +0 -57
- package/src/Button/index.tsx +0 -63
- package/src/Card/index.css.ts +0 -9
- package/src/Card/index.tsx +0 -13
- package/src/Collapsible/index.css.ts +0 -34
- package/src/Collapsible/index.tsx +0 -75
- package/src/Detail/index.tsx +0 -26
- package/src/Hr/index.tsx +0 -8
- package/src/Metric/index.tsx +0 -26
- package/src/Summary/index.css.ts +0 -17
- package/src/Summary/index.tsx +0 -32
- package/src/Tag/index.tsx +0 -26
- package/src/Ui/Header/DarkButton/index.tsx +0 -19
- package/src/Ui/Header/SideNav/index.css.ts +0 -23
- package/src/Ui/Header/SideNav/index.tsx +0 -14
- package/src/Ui/Header/SideNavButton/index.css.ts +0 -4
- package/src/Ui/Header/SideNavButton/index.tsx +0 -19
- package/src/Ui/Header/Title/index.css.ts +0 -10
- package/src/Ui/Header/Title/index.tsx +0 -9
- package/src/Ui/Header/TopNav/index.css.ts +0 -9
- package/src/Ui/Header/TopNav/index.tsx +0 -18
- package/src/Ui/Header/index.css.ts +0 -18
- package/src/Ui/Header/index.tsx +0 -32
- package/src/Ui/Main/Article/index.css.ts +0 -13
- package/src/Ui/Main/Article/index.tsx +0 -9
- package/src/Ui/Main/Footer/index.css.ts +0 -12
- package/src/Ui/Main/Footer/index.tsx +0 -9
- package/src/Ui/Main/index.css.ts +0 -16
- package/src/Ui/Main/index.tsx +0 -24
- package/src/Ui/index.css.ts +0 -9
- package/src/Ui/index.tsx +0 -50
- package/utils.ts +0 -1
- /package/src/{Metric → components/Metric}/index.css.ts +0 -0
package/src/Ui/Main/index.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/Ui/index.css.ts
DELETED
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
|