@tcn/ui 0.0.1 → 0.0.3
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/dist/actions/button/button/button.d.ts.map +1 -1
- package/dist/actions/button/button/button.js +12 -4
- package/dist/actions/button/button/button.js.map +1 -1
- package/dist/drawer_bottom.css +1 -1
- package/dist/drawer_end.css +1 -1
- package/dist/drawer_start.css +1 -1
- package/dist/drawer_top.css +1 -1
- package/dist/form/field/common/status_input/status_input.js.map +1 -1
- package/dist/form/field/h_field/h_field.d.ts.map +1 -1
- package/dist/form/field/h_field/h_field.js.map +1 -1
- package/dist/form/field/v_field/v_field.d.ts.map +1 -1
- package/dist/form/field/v_field/v_field.js.map +1 -1
- package/dist/form/field_presenters/options_field_presenter.d.ts.map +1 -1
- package/dist/form/field_presenters/options_field_presenter.js.map +1 -1
- package/dist/form/form_field.d.ts.map +1 -1
- package/dist/form/form_field.js.map +1 -1
- package/dist/form/index.d.ts +14 -5
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +27 -8
- package/dist/form/index.js.map +1 -1
- package/dist/h_body.css +1 -0
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +60 -51
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/layouts/body/h_body.d.ts +6 -0
- package/dist/layouts/body/h_body.d.ts.map +1 -0
- package/dist/layouts/body/h_body.js +21 -0
- package/dist/layouts/body/h_body.js.map +1 -0
- package/dist/layouts/body/v_body.d.ts +6 -0
- package/dist/layouts/body/v_body.d.ts.map +1 -0
- package/dist/layouts/body/v_body.js +21 -0
- package/dist/layouts/body/v_body.js.map +1 -0
- package/dist/layouts/divider/divider.d.ts +2 -2
- package/dist/layouts/divider/divider.d.ts.map +1 -1
- package/dist/layouts/divider/divider.js +17 -16
- package/dist/layouts/divider/divider.js.map +1 -1
- package/dist/layouts/footer/footer.d.ts +1 -1
- package/dist/layouts/footer/footer.d.ts.map +1 -1
- package/dist/layouts/footer/footer.js +5 -5
- package/dist/layouts/footer/footer.js.map +1 -1
- package/dist/layouts/header/header.d.ts +1 -1
- package/dist/layouts/header/header.d.ts.map +1 -1
- package/dist/layouts/header/header.js +10 -10
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/index.d.ts +2 -4
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +20 -24
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.js +13 -8
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
- package/dist/overlay/index.d.ts +6 -0
- package/dist/overlay/index.d.ts.map +1 -0
- package/dist/overlay/index.js +14 -0
- package/dist/overlay/index.js.map +1 -0
- package/dist/panel.css +1 -1
- package/dist/panel.module-DwGKncon.js +5 -0
- package/dist/panel.module-DwGKncon.js.map +1 -0
- package/dist/stack.css +1 -1
- package/dist/stacks/types/styles.d.ts +2 -2
- package/dist/stacks/types/styles.d.ts.map +1 -1
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.d.ts.map +1 -0
- package/dist/{layouts → surfaces}/drawers/drawer_bottom/drawer_bottom.js +1 -1
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +1 -0
- package/dist/surfaces/drawers/drawer_end/drawer_end.d.ts.map +1 -0
- package/dist/{layouts → surfaces}/drawers/drawer_end/drawer_end.js +2 -2
- package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +1 -0
- package/dist/surfaces/drawers/drawer_start/drawer_start.d.ts.map +1 -0
- package/dist/{layouts → surfaces}/drawers/drawer_start/drawer_start.js +1 -1
- package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -0
- package/dist/surfaces/drawers/drawer_top/drawer_top.d.ts.map +1 -0
- package/dist/{layouts → surfaces}/drawers/drawer_top/drawer_top.js +1 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -0
- package/dist/surfaces/index.d.ts +4 -0
- package/dist/surfaces/index.d.ts.map +1 -1
- package/dist/surfaces/index.js +20 -12
- package/dist/surfaces/index.js.map +1 -1
- package/dist/surfaces/panel/h_panel.d.ts +1 -1
- package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/h_panel.js +44 -33
- package/dist/surfaces/panel/h_panel.js.map +1 -1
- package/dist/surfaces/panel/v_panel.d.ts +1 -1
- package/dist/surfaces/panel/v_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/v_panel.js +36 -31
- package/dist/surfaces/panel/v_panel.js.map +1 -1
- package/dist/themes/index.js +82 -20
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/typography/title/title.d.ts +1 -1
- package/dist/typography/title/title.d.ts.map +1 -1
- package/dist/typography/title/title.js +16 -16
- package/dist/typography/title/title.js.map +1 -1
- package/dist/v_body.css +1 -0
- package/package.json +3 -3
- package/src/actions/button/button/button.tsx +10 -4
- package/src/form/field/common/status_input/status_input.tsx +1 -1
- package/src/form/field/h_field/h_field.tsx +1 -1
- package/src/form/field/v_field/v_field.tsx +1 -1
- package/src/form/field_presenters/options_field_presenter.ts +1 -1
- package/src/form/form_field.tsx +1 -1
- package/src/form/index.ts +50 -5
- package/src/inputs/phone_number_input/phone_number_input.tsx +9 -4
- package/src/layouts/body/h_body.module.css +5 -0
- package/src/layouts/body/h_body.tsx +23 -0
- package/src/layouts/body/v_body.module.css +5 -0
- package/src/layouts/body/v_body.tsx +23 -0
- package/src/layouts/divider/divider.tsx +5 -4
- package/src/layouts/footer/footer.tsx +4 -4
- package/src/layouts/header/header.tsx +4 -4
- package/src/layouts/index.ts +2 -4
- package/src/layouts/utility_bar/utility_bar.tsx +9 -4
- package/src/overlay/index.ts +5 -0
- package/src/stacks/stack.module.css +54 -5
- package/src/stacks/stacks.mdx +28 -28
- package/src/stacks/types/styles.ts +2 -2
- package/src/surfaces/index.ts +4 -0
- package/src/surfaces/panel/__stories__/panel.stories.tsx +68 -0
- package/src/surfaces/panel/__stories__/panel_stories.module.css +13 -0
- package/src/surfaces/panel/h_panel.tsx +18 -6
- package/src/surfaces/panel/panel.module.css +2 -7
- package/src/surfaces/panel/v_panel.tsx +11 -5
- package/src/themes/themes/ergo/ergo_theme.css +72 -10
- package/src/typography/title/title.tsx +2 -2
- package/dist/form/field/form_field.d.ts +0 -6
- package/dist/form/field/form_field.d.ts.map +0 -1
- package/dist/form/field/form_field.js +0 -18
- package/dist/form/field/form_field.js.map +0 -1
- package/dist/layouts/drawers/drawer_bottom/drawer_bottom.d.ts.map +0 -1
- package/dist/layouts/drawers/drawer_bottom/drawer_bottom.js.map +0 -1
- package/dist/layouts/drawers/drawer_end/drawer_end.d.ts.map +0 -1
- package/dist/layouts/drawers/drawer_end/drawer_end.js.map +0 -1
- package/dist/layouts/drawers/drawer_start/drawer_start.d.ts.map +0 -1
- package/dist/layouts/drawers/drawer_start/drawer_start.js.map +0 -1
- package/dist/layouts/drawers/drawer_top/drawer_top.d.ts.map +0 -1
- package/dist/layouts/drawers/drawer_top/drawer_top.js.map +0 -1
- package/dist/panel.module-CtikcmYB.js +0 -5
- package/dist/panel.module-CtikcmYB.js.map +0 -1
- package/src/form/field/form_field.tsx +0 -29
- /package/dist/{layouts → surfaces}/drawers/drawer_bottom/drawer_bottom.d.ts +0 -0
- /package/dist/{layouts → surfaces}/drawers/drawer_end/drawer_end.d.ts +0 -0
- /package/dist/{layouts → surfaces}/drawers/drawer_start/drawer_start.d.ts +0 -0
- /package/dist/{layouts → surfaces}/drawers/drawer_top/drawer_top.d.ts +0 -0
- /package/src/{layouts → surfaces}/drawers/__stories__/drawers.stories.tsx +0 -0
- /package/src/{layouts → surfaces}/drawers/drawer_bottom/drawer_bottom.module.css +0 -0
- /package/src/{layouts → surfaces}/drawers/drawer_bottom/drawer_bottom.tsx +0 -0
- /package/src/{layouts → surfaces}/drawers/drawer_end/drawer_end.module.css +0 -0
- /package/src/{layouts → surfaces}/drawers/drawer_end/drawer_end.tsx +0 -0
- /package/src/{layouts → surfaces}/drawers/drawer_start/drawer_start.module.css +0 -0
- /package/src/{layouts → surfaces}/drawers/drawer_start/drawer_start.tsx +0 -0
- /package/src/{layouts → surfaces}/drawers/drawer_top/drawer_top.module.css +0 -0
- /package/src/{layouts → surfaces}/drawers/drawer_top/drawer_top.tsx +0 -0
package/src/surfaces/index.ts
CHANGED
|
@@ -8,3 +8,7 @@ export * from './panel/h_panel.js';
|
|
|
8
8
|
export * from './panel/v_panel.js';
|
|
9
9
|
export * from './popover/popover.js';
|
|
10
10
|
export * from './window/window.js';
|
|
11
|
+
export * from './drawers/drawer_bottom/drawer_bottom.js';
|
|
12
|
+
export * from './drawers/drawer_top/drawer_top.js';
|
|
13
|
+
export * from './drawers/drawer_start/drawer_start.js';
|
|
14
|
+
export * from './drawers/drawer_end/drawer_end.js';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { BugIcon } from '@tcn/icons/bug_icon.js';
|
|
2
|
+
import { CrossIcon } from '@tcn/icons/cross_icon.js';
|
|
3
|
+
import { GridOneIcon } from '@tcn/icons/grid_one_icon.js';
|
|
4
|
+
import { Button } from '../../../actions/button/button/button.js';
|
|
5
|
+
import { Footer } from '../../../layouts/footer/footer.js';
|
|
6
|
+
import { Header } from '../../../layouts/header/header.js';
|
|
7
|
+
import { Divider, VBody } from '../../../layouts/index.js';
|
|
8
|
+
import { UtilityBar } from '../../../layouts/utility_bar/utility_bar.js';
|
|
9
|
+
import { Box, Spacer } from '../../../stacks/index.js';
|
|
10
|
+
import { Title } from '../../../typography/title/title.js';
|
|
11
|
+
import { VPanel } from '../v_panel.js';
|
|
12
|
+
// Styles
|
|
13
|
+
import styles from './panel_stories.module.css';
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
title: 'Surfaces/Panel',
|
|
17
|
+
component: VPanel,
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Default = () => {
|
|
22
|
+
return (
|
|
23
|
+
<div className={styles['stories-container']}>
|
|
24
|
+
<VPanel maxHeight="600px">
|
|
25
|
+
<Header>
|
|
26
|
+
<Title>Panel Primary Header</Title>
|
|
27
|
+
<Spacer />
|
|
28
|
+
<Button hierarchy="tertiary">
|
|
29
|
+
<GridOneIcon />
|
|
30
|
+
</Button>
|
|
31
|
+
<Divider length="md" vertical />
|
|
32
|
+
<Button hierarchy="tertiary">
|
|
33
|
+
<CrossIcon />
|
|
34
|
+
</Button>
|
|
35
|
+
</Header>
|
|
36
|
+
<UtilityBar>
|
|
37
|
+
<Title>Utility Bar</Title>
|
|
38
|
+
<Spacer />
|
|
39
|
+
<Button hierarchy="tertiary">
|
|
40
|
+
<BugIcon />
|
|
41
|
+
</Button>
|
|
42
|
+
<Button hierarchy="tertiary">
|
|
43
|
+
<BugIcon />
|
|
44
|
+
</Button>
|
|
45
|
+
<Button hierarchy="tertiary">
|
|
46
|
+
<BugIcon />
|
|
47
|
+
</Button>
|
|
48
|
+
<Button hierarchy="tertiary">
|
|
49
|
+
<BugIcon />
|
|
50
|
+
</Button>
|
|
51
|
+
</UtilityBar>
|
|
52
|
+
|
|
53
|
+
<VBody>
|
|
54
|
+
<Box className={styles['content-box']} />
|
|
55
|
+
<Box className={styles['content-box']} />
|
|
56
|
+
<Box className={styles['content-box']} />
|
|
57
|
+
<Box className={styles['content-box']} />
|
|
58
|
+
</VBody>
|
|
59
|
+
<Footer>
|
|
60
|
+
<Title>Footer</Title>
|
|
61
|
+
<Spacer />
|
|
62
|
+
<Button hierarchy="secondary">Secondary</Button>
|
|
63
|
+
<Button hierarchy="primary">Primary</Button>
|
|
64
|
+
</Footer>
|
|
65
|
+
</VPanel>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Box, type BoxProps } from '../../stacks/box/box.js';
|
|
2
|
-
import { Alignment } from '../../stacks/types/alignment.js';
|
|
3
|
-
import classNames from 'classnames';
|
|
4
1
|
import React from 'react';
|
|
5
|
-
import
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { Box, type BoxProps } from '../../stacks/box/box.js';
|
|
6
4
|
import { HStack } from '../../stacks/h_stack.js';
|
|
5
|
+
import type { Alignment } from '../../stacks/types/alignment.js';
|
|
6
|
+
// Styles
|
|
7
|
+
import styles from './panel.module.css';
|
|
7
8
|
|
|
8
9
|
export interface HPanelProps extends Omit<BoxProps, 'as'> {
|
|
9
10
|
vAlign?: Alignment;
|
|
@@ -37,7 +38,13 @@ export const HPanel = React.forwardRef<HTMLElement, HPanelProps>(function HPanel
|
|
|
37
38
|
maxHeight={maxHeight}
|
|
38
39
|
data-h-alignment={hAlign}
|
|
39
40
|
data-v-alignment={vAlign}
|
|
40
|
-
className={classNames(
|
|
41
|
+
className={classNames(
|
|
42
|
+
styles['panel'],
|
|
43
|
+
className,
|
|
44
|
+
'panel',
|
|
45
|
+
'tcn-panel',
|
|
46
|
+
'tcn-h-panel'
|
|
47
|
+
)}
|
|
41
48
|
{...props}
|
|
42
49
|
>
|
|
43
50
|
<HStack
|
|
@@ -49,7 +56,12 @@ export const HPanel = React.forwardRef<HTMLElement, HPanelProps>(function HPanel
|
|
|
49
56
|
hAlign={hAlign}
|
|
50
57
|
vAlign={vAlign}
|
|
51
58
|
ref={ref}
|
|
52
|
-
className={classNames(
|
|
59
|
+
className={classNames(
|
|
60
|
+
styles['panel-stack'],
|
|
61
|
+
className,
|
|
62
|
+
'panel-stack',
|
|
63
|
+
'tcn-panel-stack'
|
|
64
|
+
)}
|
|
53
65
|
zIndex={0}
|
|
54
66
|
>
|
|
55
67
|
{children}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
1
3
|
import { Box, type BoxProps } from '../../stacks/box/box.js';
|
|
4
|
+
import type { Alignment } from '../../stacks/types/alignment.js';
|
|
2
5
|
import { VStack } from '../../stacks/v_stack.js';
|
|
3
|
-
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import React from 'react';
|
|
6
|
+
// Styles
|
|
6
7
|
import styles from './panel.module.css';
|
|
7
8
|
|
|
8
9
|
export interface VPanelProps extends Omit<BoxProps, 'as'> {
|
|
@@ -37,7 +38,7 @@ export const VPanel = React.forwardRef<HTMLElement, VPanelProps>(function VPanel
|
|
|
37
38
|
maxHeight={maxHeight}
|
|
38
39
|
data-h-alignment={hAlign}
|
|
39
40
|
data-v-alignment={vAlign}
|
|
40
|
-
className={classNames(className,
|
|
41
|
+
className={classNames(className, 'panel', 'tcn-panel', 'tcn-v-panel')}
|
|
41
42
|
{...props}
|
|
42
43
|
>
|
|
43
44
|
<VStack
|
|
@@ -49,7 +50,12 @@ export const VPanel = React.forwardRef<HTMLElement, VPanelProps>(function VPanel
|
|
|
49
50
|
hAlign={hAlign}
|
|
50
51
|
vAlign={vAlign}
|
|
51
52
|
ref={ref}
|
|
52
|
-
className={classNames(
|
|
53
|
+
className={classNames(
|
|
54
|
+
styles['panel-stack'],
|
|
55
|
+
className,
|
|
56
|
+
'panel-stack',
|
|
57
|
+
'tcn-panel-stack'
|
|
58
|
+
)}
|
|
53
59
|
zIndex={0}
|
|
54
60
|
>
|
|
55
61
|
{children}
|
|
@@ -136,13 +136,13 @@ legend {
|
|
|
136
136
|
/* ===== CSS VARIABLES ===== */
|
|
137
137
|
:root {
|
|
138
138
|
--scalar: 1;
|
|
139
|
-
--gap-small:
|
|
140
|
-
--gap-medium:
|
|
141
|
-
--gap-large:
|
|
139
|
+
--gap-small: 4px;
|
|
140
|
+
--gap-medium: 8px;
|
|
141
|
+
--gap-large: 16px;
|
|
142
142
|
|
|
143
|
-
--padding-small:
|
|
144
|
-
--padding-medium:
|
|
145
|
-
--padding-large:
|
|
143
|
+
--padding-small: 4px;
|
|
144
|
+
--padding-medium: 8px;
|
|
145
|
+
--padding-large: 16px;
|
|
146
146
|
|
|
147
147
|
--status-color-disabled: #7f7f7f;
|
|
148
148
|
--status-color-info: #008cff;
|
|
@@ -170,9 +170,8 @@ legend {
|
|
|
170
170
|
--quaternary-color: #008cff;
|
|
171
171
|
--quaternary-color-strong: #008cff;
|
|
172
172
|
|
|
173
|
-
--font-color: #
|
|
174
|
-
--font-family:
|
|
175
|
-
"Arial", "Helvetica Neue", Helvetica, "Liberation Sans", "Arimo", sans-serif;
|
|
173
|
+
--font-color: #395578;
|
|
174
|
+
--font-family: "Lato", sans-serif;
|
|
176
175
|
--font-size: 12px;
|
|
177
176
|
|
|
178
177
|
--background-color-primary: #ffffff;
|
|
@@ -180,15 +179,78 @@ legend {
|
|
|
180
179
|
--background-color-tertiary: #ffffff;
|
|
181
180
|
--background-color-quaternary: #ffffff;
|
|
182
181
|
|
|
183
|
-
--foreground-color-primary: #
|
|
182
|
+
--foreground-color-primary: #aaa;
|
|
184
183
|
--foreground-color-secondary: #222222;
|
|
185
184
|
--foreground-color-tertiary: #222222;
|
|
186
185
|
--foreground-color-quaternary: #222222;
|
|
187
186
|
|
|
188
187
|
--accent-color: #008cff;
|
|
188
|
+
|
|
189
|
+
--shape-radius-small: 2px;
|
|
190
|
+
--shape-radius-medium: 4px;
|
|
191
|
+
--shape-radius-large: 8px;
|
|
189
192
|
}
|
|
190
193
|
|
|
191
194
|
* {
|
|
192
195
|
position: relative;
|
|
193
196
|
box-sizing: border-box;
|
|
194
197
|
}
|
|
198
|
+
|
|
199
|
+
/* ===== SURFACES ===== */
|
|
200
|
+
|
|
201
|
+
/* PANEL */
|
|
202
|
+
.tcn-panel {
|
|
203
|
+
--v-inset: var(--padding-large);
|
|
204
|
+
background-color: var(--background-color-primary);
|
|
205
|
+
border-radius: var(--shape-radius-medium);
|
|
206
|
+
|
|
207
|
+
:where(.tcn-header) {
|
|
208
|
+
min-height: 40px;
|
|
209
|
+
border-bottom: 1px solid var(--foreground-color-primary);
|
|
210
|
+
padding: 0 var(--v-inset);
|
|
211
|
+
gap: var(--gap-medium);
|
|
212
|
+
|
|
213
|
+
:where(.tcn-title) {
|
|
214
|
+
font-weight: 700;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:where(.tcn-button) {
|
|
218
|
+
padding: 0;
|
|
219
|
+
min-width: 18px;
|
|
220
|
+
min-height: 18px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:where(.tcn-divider) {
|
|
224
|
+
padding: 4px 0;
|
|
225
|
+
:where(.tcn-divider-line) {
|
|
226
|
+
width: 1.5px;
|
|
227
|
+
min-height: 18px;
|
|
228
|
+
height: auto;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
:where(.tcn-utility-bar) {
|
|
234
|
+
min-height: 32px;
|
|
235
|
+
border-bottom: 1px solid var(--foreground-color-primary);
|
|
236
|
+
padding: 0 var(--v-inset);
|
|
237
|
+
|
|
238
|
+
:where(.tcn-button) {
|
|
239
|
+
padding: 0;
|
|
240
|
+
min-width: 18px;
|
|
241
|
+
min-height: 18px;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:where(.tcn-body) {
|
|
246
|
+
padding: 0 var(--v-inset);
|
|
247
|
+
gap: var(--gap-medium);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:where(.tcn-footer) {
|
|
251
|
+
gap: var(--gap-medium);
|
|
252
|
+
min-height: 40px;
|
|
253
|
+
border-top: 1px solid var(--foreground-color-primary);
|
|
254
|
+
padding: 0 var(--v-inset);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { Emphasis, Hierarchy, Size } from '../../utils/index.js';
|
|
4
3
|
import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
|
|
4
|
+
import type { Emphasis, Hierarchy, Size } from '../../utils/index.js';
|
|
5
5
|
import styles from './title.module.css';
|
|
6
6
|
|
|
7
7
|
export interface TitleOwnProps {
|
|
@@ -78,7 +78,7 @@ export function Title({
|
|
|
78
78
|
data-hierarchy={hierarchy}
|
|
79
79
|
data-emphasis={emphasis}
|
|
80
80
|
data-selectable={selectable}
|
|
81
|
-
className={classnames(styles['title'], 'title', className)}
|
|
81
|
+
className={classnames(styles['title'], 'title', 'tcn-title', className)}
|
|
82
82
|
style={style}
|
|
83
83
|
data-size={size}
|
|
84
84
|
>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FieldPresenter, FieldState } from '../field_presenters/field_presenter.js';
|
|
2
|
-
export declare function FormField<T>({ field, children, }: {
|
|
3
|
-
field: FieldPresenter<T>;
|
|
4
|
-
children: (state: FieldState<T>, setValue: (value: T) => void, validate: () => Promise<void>) => React.ReactElement;
|
|
5
|
-
}): import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>;
|
|
6
|
-
//# sourceMappingURL=form_field.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form_field.d.ts","sourceRoot":"","sources":["../../../src/form/field/form_field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAEpF,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAC3B,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,QAAQ,EAAE,CACR,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC5B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAC1B,KAAK,CAAC,YAAY,CAAC;CACzB,0FAcA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useCallback as a } from "react";
|
|
2
|
-
import { useSignalValue as u } from "@tcn/state";
|
|
3
|
-
function m({
|
|
4
|
-
field: t,
|
|
5
|
-
children: e
|
|
6
|
-
}) {
|
|
7
|
-
const o = u(t.stateBroadcast), r = a(
|
|
8
|
-
(n) => {
|
|
9
|
-
t.setValue(n);
|
|
10
|
-
},
|
|
11
|
-
[t]
|
|
12
|
-
), s = a(() => t.validate(), [t]);
|
|
13
|
-
return e(o, r, s);
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
m as FormField
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=form_field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form_field.js","sources":["../../../src/form/field/form_field.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { useSignalValue } from '@tcn/state';\nimport { FieldPresenter, FieldState } from '../field_presenters/field_presenter.js';\n\nexport function FormField<T>({\n field,\n children,\n}: {\n field: FieldPresenter<T>;\n children: (\n state: FieldState<T>,\n setValue: (value: T) => void,\n validate: () => Promise<void>\n ) => React.ReactElement;\n}) {\n const state = useSignalValue(field.stateBroadcast);\n const setValue = useCallback(\n (value: T) => {\n field.setValue(value);\n },\n [field]\n );\n\n const validate = useCallback(() => {\n return field.validate();\n }, [field]);\n\n return children(state, setValue, validate);\n}\n"],"names":["FormField","field","children","state","useSignalValue","setValue","useCallback","value","validate"],"mappings":";;AAIO,SAASA,EAAa;AAAA,EAC3B,OAAAC;AAAA,EACA,UAAAC;AACF,GAOG;AACD,QAAMC,IAAQC,EAAeH,EAAM,cAAc,GAC3CI,IAAWC;AAAA,IACf,CAACC,MAAa;AACZ,MAAAN,EAAM,SAASM,CAAK;AAAA,IACtB;AAAA,IACA,CAACN,CAAK;AAAA,EAAA,GAGFO,IAAWF,EAAY,MACpBL,EAAM,SAAA,GACZ,CAACA,CAAK,CAAC;AAEV,SAAOC,EAASC,GAAOE,GAAUG,CAAQ;AAC3C;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer_bottom.d.ts","sourceRoot":"","sources":["../../../../src/layouts/drawers/drawer_bottom/drawer_bottom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,UAAU,CAAC;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY,uFAaxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer_bottom.js","sources":["../../../../src/layouts/drawers/drawer_bottom/drawer_bottom.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../../stacks/v_stack.js';\nimport classNames from 'classnames';\nimport React from 'react';\nimport styles from './drawer_bottom.module.css';\n\nexport interface DrawerBottomProps extends Omit<VStackProps, 'as' | 'children'> {\n children?: React.ReactNode;\n}\n\nexport const DrawerBottom = React.forwardRef<HTMLElement, DrawerBottomProps>(\n function DrawerBottom({ children, className, ...props }: DrawerBottomProps, ref) {\n return (\n <VStack\n ref={ref}\n as=\"section\"\n className={classNames(styles.drawerBottom, className, 'drawer-bottom')}\n {...props}\n >\n {children}\n </VStack>\n );\n }\n);\n"],"names":["DrawerBottom","React","children","className","props","ref","jsx","VStack","classNames","styles"],"mappings":";;;;4DASaA,IAAeC,EAAM;AAAA,EAChC,SAAsB,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAA4BC,GAAK;AAC/E,WACE,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAF;AAAA,QACA,IAAG;AAAA,QACH,WAAWG,EAAWC,EAAO,cAAcN,GAAW,eAAe;AAAA,QACpE,GAAGC;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer_end.d.ts","sourceRoot":"","sources":["../../../../src/layouts/drawers/drawer_end/drawer_end.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,oFAcpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer_end.js","sources":["../../../../src/layouts/drawers/drawer_end/drawer_end.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../../stacks/v_stack.js';\nimport classNames from 'classnames';\nimport React from 'react';\nimport styles from './drawer_end.module.css';\n\nexport interface DrawerEndProps extends Omit<VStackProps, 'as' | 'children'> {\n children?: React.ReactNode;\n}\n\nexport const DrawerEnd = React.forwardRef<HTMLElement, DrawerEndProps>(function DrawerEnd(\n { children, className, ...props }: DrawerEndProps,\n ref\n) {\n return (\n <VStack\n ref={ref}\n as=\"section\"\n className={classNames(styles.drawerEnd, className, 'drawerEnd')}\n {...props}\n >\n {children}\n </VStack>\n );\n});\n"],"names":["DrawerEnd","React","children","className","props","ref","jsx","VStack","classNames","styles"],"mappings":";;;;sDASaA,IAAYC,EAAM,WAAwC,SACrE,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAC1BC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,IAAG;AAAA,MACH,WAAWG,EAAWC,EAAO,WAAWN,GAAW,WAAW;AAAA,MAC7D,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer_start.d.ts","sourceRoot":"","sources":["../../../../src/layouts/drawers/drawer_start/drawer_start.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,UAAU,CAAC;IAC5E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,sFAavB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer_start.js","sources":["../../../../src/layouts/drawers/drawer_start/drawer_start.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../../stacks/v_stack.js';\nimport classNames from 'classnames';\nimport React from 'react';\nimport styles from './drawer_start.module.css';\n\nexport interface DrawerStartProps extends Omit<VStackProps, 'as' | 'children'> {\n children?: React.ReactNode;\n}\n\nexport const DrawerStart = React.forwardRef<HTMLElement, DrawerStartProps>(\n function DrawerStart({ children, className, ...props }: DrawerStartProps, ref) {\n return (\n <VStack\n ref={ref}\n as=\"section\"\n className={classNames(styles.drawerStart, className, 'drawerStart')}\n {...props}\n >\n {children}\n </VStack>\n );\n }\n);\n"],"names":["DrawerStart","React","children","className","props","ref","jsx","VStack","classNames","styles"],"mappings":";;;;0DASaA,IAAcC,EAAM;AAAA,EAC/B,SAAqB,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAA2BC,GAAK;AAC7E,WACE,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAAF;AAAA,QACA,IAAG;AAAA,QACH,WAAWG,EAAWC,EAAO,aAAaN,GAAW,aAAa;AAAA,QACjE,GAAGC;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer_top.d.ts","sourceRoot":"","sources":["../../../../src/layouts/drawers/drawer_top/drawer_top.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,oFAcpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer_top.js","sources":["../../../../src/layouts/drawers/drawer_top/drawer_top.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../../stacks/v_stack.js';\nimport classNames from 'classnames';\nimport React from 'react';\nimport styles from './drawer_top.module.css';\n\nexport interface DrawerTopProps extends Omit<VStackProps, 'as' | 'children'> {\n children?: React.ReactNode;\n}\n\nexport const DrawerTop = React.forwardRef<HTMLElement, DrawerTopProps>(function DrawerTop(\n { children, className, ...props }: DrawerTopProps,\n ref\n) {\n return (\n <VStack\n ref={ref}\n as=\"section\"\n className={classNames(styles.drawerTop, className, 'drawerTop')}\n {...props}\n >\n {children}\n </VStack>\n );\n});\n"],"names":["DrawerTop","React","children","className","props","ref","jsx","VStack","classNames","styles"],"mappings":";;;;4DASaA,IAAYC,EAAM,WAAwC,SACrE,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,EAAA,GAC1BC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,IAAG;AAAA,MACH,WAAWG,EAAWC,EAAO,WAAWN,GAAW,WAAW;AAAA,MAC7D,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"panel.module-CtikcmYB.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
import { useSignalValue } from '@tcn/state';
|
|
3
|
-
import { FieldPresenter, FieldState } from '../field_presenters/field_presenter.js';
|
|
4
|
-
|
|
5
|
-
export function FormField<T>({
|
|
6
|
-
field,
|
|
7
|
-
children,
|
|
8
|
-
}: {
|
|
9
|
-
field: FieldPresenter<T>;
|
|
10
|
-
children: (
|
|
11
|
-
state: FieldState<T>,
|
|
12
|
-
setValue: (value: T) => void,
|
|
13
|
-
validate: () => Promise<void>
|
|
14
|
-
) => React.ReactElement;
|
|
15
|
-
}) {
|
|
16
|
-
const state = useSignalValue(field.stateBroadcast);
|
|
17
|
-
const setValue = useCallback(
|
|
18
|
-
(value: T) => {
|
|
19
|
-
field.setValue(value);
|
|
20
|
-
},
|
|
21
|
-
[field]
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
const validate = useCallback(() => {
|
|
25
|
-
return field.validate();
|
|
26
|
-
}, [field]);
|
|
27
|
-
|
|
28
|
-
return children(state, setValue, validate);
|
|
29
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|