@tcn/ui 0.0.2 → 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.
Files changed (94) hide show
  1. package/dist/actions/button/button/button.d.ts.map +1 -1
  2. package/dist/actions/button/button/button.js +12 -4
  3. package/dist/actions/button/button/button.js.map +1 -1
  4. package/dist/form/field/common/status_input/status_input.js.map +1 -1
  5. package/dist/form/field/h_field/h_field.d.ts.map +1 -1
  6. package/dist/form/field/h_field/h_field.js.map +1 -1
  7. package/dist/form/field/v_field/v_field.d.ts.map +1 -1
  8. package/dist/form/field/v_field/v_field.js.map +1 -1
  9. package/dist/form/field_presenters/options_field_presenter.d.ts.map +1 -1
  10. package/dist/form/field_presenters/options_field_presenter.js.map +1 -1
  11. package/dist/form/form_field.d.ts.map +1 -1
  12. package/dist/form/form_field.js.map +1 -1
  13. package/dist/form/index.d.ts +14 -11
  14. package/dist/form/index.d.ts.map +1 -1
  15. package/dist/form/index.js +27 -20
  16. package/dist/form/index.js.map +1 -1
  17. package/dist/h_body.css +1 -1
  18. package/dist/layouts/body/h_body.d.ts.map +1 -1
  19. package/dist/layouts/body/h_body.js +11 -10
  20. package/dist/layouts/body/h_body.js.map +1 -1
  21. package/dist/layouts/body/v_body.d.ts.map +1 -1
  22. package/dist/layouts/body/v_body.js +10 -9
  23. package/dist/layouts/body/v_body.js.map +1 -1
  24. package/dist/layouts/divider/divider.d.ts +2 -2
  25. package/dist/layouts/divider/divider.d.ts.map +1 -1
  26. package/dist/layouts/divider/divider.js +17 -16
  27. package/dist/layouts/divider/divider.js.map +1 -1
  28. package/dist/layouts/footer/footer.d.ts +1 -1
  29. package/dist/layouts/footer/footer.d.ts.map +1 -1
  30. package/dist/layouts/footer/footer.js +5 -5
  31. package/dist/layouts/footer/footer.js.map +1 -1
  32. package/dist/layouts/header/header.d.ts +1 -1
  33. package/dist/layouts/header/header.d.ts.map +1 -1
  34. package/dist/layouts/header/header.js +10 -10
  35. package/dist/layouts/header/header.js.map +1 -1
  36. package/dist/layouts/utility_bar/utility_bar.d.ts +1 -1
  37. package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
  38. package/dist/layouts/utility_bar/utility_bar.js +13 -8
  39. package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
  40. package/dist/panel.css +1 -1
  41. package/dist/panel.module-DwGKncon.js +5 -0
  42. package/dist/panel.module-DwGKncon.js.map +1 -0
  43. package/dist/stack.css +1 -1
  44. package/dist/stacks/types/styles.d.ts +2 -2
  45. package/dist/stacks/types/styles.d.ts.map +1 -1
  46. package/dist/surfaces/panel/h_panel.d.ts +1 -1
  47. package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
  48. package/dist/surfaces/panel/h_panel.js +44 -33
  49. package/dist/surfaces/panel/h_panel.js.map +1 -1
  50. package/dist/surfaces/panel/v_panel.d.ts +1 -1
  51. package/dist/surfaces/panel/v_panel.d.ts.map +1 -1
  52. package/dist/surfaces/panel/v_panel.js +36 -31
  53. package/dist/surfaces/panel/v_panel.js.map +1 -1
  54. package/dist/themes/index.js +82 -20
  55. package/dist/themes/index.js.map +1 -1
  56. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  57. package/dist/typography/title/title.d.ts +1 -1
  58. package/dist/typography/title/title.d.ts.map +1 -1
  59. package/dist/typography/title/title.js +16 -16
  60. package/dist/typography/title/title.js.map +1 -1
  61. package/dist/v_body.css +1 -1
  62. package/package.json +3 -3
  63. package/src/actions/button/button/button.tsx +10 -4
  64. package/src/form/field/common/status_input/status_input.tsx +1 -1
  65. package/src/form/field/h_field/h_field.tsx +1 -1
  66. package/src/form/field/v_field/v_field.tsx +1 -1
  67. package/src/form/field_presenters/options_field_presenter.ts +1 -1
  68. package/src/form/form_field.tsx +1 -1
  69. package/src/form/index.ts +50 -11
  70. package/src/layouts/body/h_body.module.css +3 -2
  71. package/src/layouts/body/h_body.tsx +4 -3
  72. package/src/layouts/body/v_body.module.css +3 -2
  73. package/src/layouts/body/v_body.tsx +4 -3
  74. package/src/layouts/divider/divider.tsx +5 -4
  75. package/src/layouts/footer/footer.tsx +4 -4
  76. package/src/layouts/header/header.tsx +4 -4
  77. package/src/layouts/utility_bar/utility_bar.tsx +9 -4
  78. package/src/stacks/stack.module.css +54 -5
  79. package/src/stacks/stacks.mdx +28 -28
  80. package/src/stacks/types/styles.ts +2 -2
  81. package/src/surfaces/panel/__stories__/panel.stories.tsx +68 -0
  82. package/src/surfaces/panel/__stories__/panel_stories.module.css +13 -0
  83. package/src/surfaces/panel/h_panel.tsx +18 -6
  84. package/src/surfaces/panel/panel.module.css +2 -7
  85. package/src/surfaces/panel/v_panel.tsx +11 -5
  86. package/src/themes/themes/ergo/ergo_theme.css +72 -10
  87. package/src/typography/title/title.tsx +2 -2
  88. package/dist/form/field/form_field.d.ts +0 -6
  89. package/dist/form/field/form_field.d.ts.map +0 -1
  90. package/dist/form/field/form_field.js +0 -18
  91. package/dist/form/field/form_field.js.map +0 -1
  92. package/dist/panel.module-CtikcmYB.js +0 -5
  93. package/dist/panel.module-CtikcmYB.js.map +0 -1
  94. package/src/form/field/form_field.tsx +0 -29
@@ -34,14 +34,14 @@ Here is the list of components that you will use with stacks:
34
34
  ### HStack
35
35
 
36
36
  This example uses `HStack` to arrange elements horizontally. It places a `Box` on either
37
- side and a `Box` with width set to `flex` in the middle, creating a simple, evenly spaced layout. The `Box`
38
- components are set to occupy 25% of the width each, while the `Box` with width set to `flex` automatically
37
+ side and a `Box` with width set to `fill` in the middle, creating a simple, evenly spaced layout. The `Box`
38
+ components are set to occupy 25% of the width each, while the `Box` with width set to `fill` automatically
39
39
  takes up the remaining space.
40
40
 
41
41
  <StyleBox height="auto" padding="10px" border="1px solid #ccc">
42
42
  <HStack height="100px">
43
43
  <Rect color="#abdef0" width="25%">25%</Rect>
44
- <Rect color="#89d9c8" width="flex">flex</Rect>
44
+ <Rect color="#89d9c8" width="fill">fill</Rect>
45
45
  <Rect color="#abdef0" width="25%">25%</Rect>
46
46
  </HStack>
47
47
  </StyleBox>
@@ -49,22 +49,22 @@ takes up the remaining space.
49
49
  ```tsx
50
50
  <HStack height="100px">
51
51
  <Box width="25%">25%</Box>
52
- <Box width="flex">flex</Box>
52
+ <Box width="fill">fill</Box>
53
53
  <Box width="25%">25%</Box>
54
54
  </HStack>
55
55
  ```
56
56
 
57
57
  ---
58
58
 
59
- Here, two `Box` components with width set to `flex` are placed between `Box` elements. Each `Box` will
60
- evenly share the available space between them, making it ideal for creating flexible
59
+ Here, two `Box` components with width set to `fill` are placed between `Box` elements. Each `Box` will
60
+ evenly share the available space between them, making it ideal for creating fillible
61
61
  layouts where multiple components need equal space.
62
62
 
63
63
  <StyleBox height="auto" padding="10px" border="1px solid #ccc">
64
64
  <HStack height="100px">
65
65
  <Rect color="#abdef0" width="25%">25%</Rect>
66
- <Rect color="#89d9c8" width="flex">flex</Rect>
67
- <Rect color="#89d9c8" width="flex">flex</Rect>
66
+ <Rect color="#89d9c8" width="fill">fill</Rect>
67
+ <Rect color="#89d9c8" width="fill">fill</Rect>
68
68
  <Rect color="#abdef0" width="25%">25%</Rect>
69
69
  </HStack>
70
70
  </StyleBox>
@@ -72,15 +72,15 @@ layouts where multiple components need equal space.
72
72
  ```tsx
73
73
  <HStack height="100px">
74
74
  <Box width="25%">25%</Box>
75
- <Box width="flex">flex</Box>
76
- <Box width="flex">flex</Box>
75
+ <Box width="fill">fill</Box>
76
+ <Box width="fill">fill</Box>
77
77
  <Box width="25%">25%</Box>
78
78
  </HStack>
79
79
  ```
80
80
 
81
81
  ---
82
82
 
83
- Using `Spacer` components between the `Box` components with width set to `flex` evenly distributes space
83
+ Using `Spacer` components between the `Box` components with width set to `fill` evenly distributes space
84
84
  between the elements. This is useful when you want to create consistent gaps between
85
85
  components without needing to specify exact widths.
86
86
 
@@ -88,9 +88,9 @@ components without needing to specify exact widths.
88
88
  <HStack height="100px">
89
89
  <Rect color="#abdef0" width="25%">25%</Rect>
90
90
  <Spacer />
91
- <Rect color="#89d9c8" width="flex">flex</Rect>
91
+ <Rect color="#89d9c8" width="fill">fill</Rect>
92
92
  <Spacer />
93
- <Rect color="#89d9c8" width="flex">flex</Rect>
93
+ <Rect color="#89d9c8" width="fill">fill</Rect>
94
94
  <Spacer />
95
95
  <Rect color="#abdef0" width="25%">25%</Rect>
96
96
  </HStack>
@@ -100,9 +100,9 @@ components without needing to specify exact widths.
100
100
  <HStack height="100px">
101
101
  <Box width="25%">25%</Box>
102
102
  <Spacer />
103
- <Box width="flex">flex</Box>
103
+ <Box width="fill">fill</Box>
104
104
  <Spacer />
105
- <Box width="flex">flex</Box>
105
+ <Box width="fill">fill</Box>
106
106
  <Spacer />
107
107
  <Box width="25%">25%</Box>
108
108
  </HStack>
@@ -118,9 +118,9 @@ automatically fill the available space.
118
118
  <HStack height="100px">
119
119
  <Rect width="25%" color="#abdef0">25%</Rect>
120
120
  <Spacer width="10px" />
121
- <Rect width="flex" color="#89d9c8">flex</Rect>
121
+ <Rect width="fill" color="#89d9c8">fill</Rect>
122
122
  <Spacer width="10px" />
123
- <Rect width="flex" color="#89d9c8">flex</Rect>
123
+ <Rect width="fill" color="#89d9c8">fill</Rect>
124
124
  <Spacer width="10px" />
125
125
  <Rect width="25%" color="#abdef0">25%</Rect>
126
126
  </HStack>
@@ -130,9 +130,9 @@ automatically fill the available space.
130
130
  <HStack height="100px">
131
131
  <Box width="25%">25%</Box>
132
132
  <Spacer width="10px" />
133
- <Box width="flex">flex</Box>
133
+ <Box width="fill">fill</Box>
134
134
  <Spacer width="10px" />
135
- <Box width="flex">flex</Box>
135
+ <Box width="fill">fill</Box>
136
136
  <Spacer width="10px" />
137
137
  <Box width="25%">25%</Box>
138
138
  </HStack>
@@ -143,13 +143,13 @@ automatically fill the available space.
143
143
  ### VStack
144
144
 
145
145
  This example uses `VStack` to arrange elements vertically. The `Box` components at the top
146
- and bottom occupy 25% of the height each, while the `Box` with height set to `flex` fills the remaining space,
146
+ and bottom occupy 25% of the height each, while the `Box` with height set to `fill` fills the remaining space,
147
147
  making it ideal for creating header-body-footer layouts.
148
148
 
149
149
  <StyleBox height="400px" padding="10px" border="1px solid #ccc">
150
150
  <VStack height="100%">
151
151
  <Rect height="25%" color="#abdef0">25%</Rect>
152
- <Rect height="flex" color="#89d9c8">flex</Rect>
152
+ <Rect height="fill" color="#89d9c8">fill</Rect>
153
153
  <Rect height="25%" color="#abdef0">25%</Rect>
154
154
  </VStack>
155
155
  </StyleBox>
@@ -157,7 +157,7 @@ making it ideal for creating header-body-footer layouts.
157
157
  ```tsx
158
158
  <VStack height="100%">
159
159
  <Box height="25%">25%</Box>
160
- <Box height="flex">flex</Box>
160
+ <Box height="fill">fill</Box>
161
161
  <Box height="25%">25%</Box>
162
162
  </VStack>
163
163
  ```
@@ -170,7 +170,7 @@ prop to create consistent gaps between the header, body, and footer sections.
170
170
  <StyleBox height="400px" width="100%" padding="10px" border="1px solid #ccc">
171
171
  <VStack height="100%" gap="10px">
172
172
  <Rect height="40px" color="#abdef0">Header</Rect>
173
- <Rect height="flex" color="#ededed">Body</Rect>
173
+ <Rect height="fill" color="#ededed">Body</Rect>
174
174
  <Rect height="40px" color="#abdef0">Footer</Rect>
175
175
  </VStack>
176
176
  </StyleBox>
@@ -178,7 +178,7 @@ prop to create consistent gaps between the header, body, and footer sections.
178
178
  ```tsx
179
179
  <VStack height="100%" gap="10px">
180
180
  <Box height="40px">Header</Box>
181
- <Box height="flex">Body</Box>
181
+ <Box height="fill">Body</Box>
182
182
  <Box height="40px">Footer</Box>
183
183
  </VStack>
184
184
  ```
@@ -192,9 +192,9 @@ between the header, sidebar, and footer sections.
192
192
  <StyleBox height="400px" width="100%" padding="10px" border="1px solid #ccc">
193
193
  <VStack height="100%" gap="10px">
194
194
  <Rect height="40px" color="#abdef0">Header</Rect>
195
- <HStack height="flex" gap="10px">
195
+ <HStack height="fill" gap="10px">
196
196
  <Rect width="200px" minWidth="200px" height="100%" zIndex="1" enableResizeOnEnd color="#ededed">Sidebar</Rect>
197
- <Rect width="flex" height="100%" color="#ededed">
197
+ <Rect width="fill" height="100%" color="#ededed">
198
198
  <VStack width="100%" height="100%" overflowY="auto">
199
199
  <Grid itemHeight={100} itemWidth={100} columnAmount={4} gap="10px" padding="10px">
200
200
  <Rect width="100%" height="100%" color="#abdef0">1</Rect>
@@ -218,9 +218,9 @@ between the header, sidebar, and footer sections.
218
218
  ```tsx
219
219
  <VStack height="100%" gap="10px">
220
220
  <Box height="40px">Header</Box>
221
- <HStack height="flex" gap="10px">
221
+ <HStack height="fill" gap="10px">
222
222
  <Box width="200px" minWidth="200px" height="100%" zIndex="1" enableResizeOnEnd>Sidebar</Box>
223
- <VStack width="flex" height="100%" overflowY="auto">
223
+ <VStack width="fill" height="100%" overflowY="auto">
224
224
  <Grid itemHeight={100} itemWidth={100} columnAmount={4} gap="10px" padding="10px">
225
225
  <Box width="100%" height="100%">1</Box>
226
226
  <Box width="100%" height="100%">2</Box>
@@ -3,10 +3,10 @@ import { Alignment } from './alignment.js';
3
3
  export interface StackStyleProps {
4
4
  hAlign?: Alignment;
5
5
  vAlign?: Alignment;
6
- width?: 'default' | 'flex' | 'auto' | string | number;
6
+ width?: 'default' | 'flex' | 'auto' | 'fill' | string | number;
7
7
  minWidth?: string | number;
8
8
  maxWidth?: string | number;
9
- height?: 'default' | 'flex' | 'auto' | string | number;
9
+ height?: 'default' | 'flex' | 'auto' | 'fill' | string | number;
10
10
  minHeight?: string | number;
11
11
  maxHeight?: string | number;
12
12
  growWeight?: number;
@@ -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
+ };
@@ -0,0 +1,13 @@
1
+ .content-box {
2
+ background: rgba(0, 128, 0, 0.5);
3
+ min-height: 200px;
4
+ width: 100%;
5
+ }
6
+
7
+ .stories-container {
8
+ width: 100%;
9
+ height: 100%;
10
+ padding: 16px;
11
+ background-color: #ccc;
12
+ overflow: auto;
13
+ }
@@ -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 styles from './panel.module.css';
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(className, styles['panel'], 'panel')}
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(styles['panel-stack'], className, 'panel-stack')}
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,14 +1,9 @@
1
- .panel {
2
- background-color: #ffffff;
3
- border-radius: 4px;
4
- }
5
-
6
1
  .panel-stack {
7
2
  width: 100%;
8
3
  height: 100%;
9
4
  overflow: auto;
10
5
  }
11
6
 
12
- .page-stack > :global(.stack) {
7
+ /* .page-stack > :global(.stack) {
13
8
  gap: var(--gap);
14
- }
9
+ } */
@@ -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
- import { Alignment } from '../../stacks/types/alignment.js';
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, styles['panel'], 'panel')}
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(styles['panel-stack'], className, 'panel-stack')}
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: 2px;
140
- --gap-medium: 4px;
141
- --gap-large: 8px;
139
+ --gap-small: 4px;
140
+ --gap-medium: 8px;
141
+ --gap-large: 16px;
142
142
 
143
- --padding-small: 2px;
144
- --padding-medium: 4px;
145
- --padding-large: 8px;
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: #222222;
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: #222222;
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,5 +0,0 @@
1
- import './panel.css';const a = "_panel_c1dbe05", s = "_panel-stack_f1896f3", t = "_page-stack_53ad282", c = { panel: a, "panel-stack": s, "page-stack": t };
2
- export {
3
- c as s
4
- };
5
- //# sourceMappingURL=panel.module-CtikcmYB.js.map
@@ -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
- }