@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.
Files changed (152) 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/drawer_bottom.css +1 -1
  5. package/dist/drawer_end.css +1 -1
  6. package/dist/drawer_start.css +1 -1
  7. package/dist/drawer_top.css +1 -1
  8. package/dist/form/field/common/status_input/status_input.js.map +1 -1
  9. package/dist/form/field/h_field/h_field.d.ts.map +1 -1
  10. package/dist/form/field/h_field/h_field.js.map +1 -1
  11. package/dist/form/field/v_field/v_field.d.ts.map +1 -1
  12. package/dist/form/field/v_field/v_field.js.map +1 -1
  13. package/dist/form/field_presenters/options_field_presenter.d.ts.map +1 -1
  14. package/dist/form/field_presenters/options_field_presenter.js.map +1 -1
  15. package/dist/form/form_field.d.ts.map +1 -1
  16. package/dist/form/form_field.js.map +1 -1
  17. package/dist/form/index.d.ts +14 -5
  18. package/dist/form/index.d.ts.map +1 -1
  19. package/dist/form/index.js +27 -8
  20. package/dist/form/index.js.map +1 -1
  21. package/dist/h_body.css +1 -0
  22. package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
  23. package/dist/inputs/phone_number_input/phone_number_input.js +60 -51
  24. package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
  25. package/dist/layouts/body/h_body.d.ts +6 -0
  26. package/dist/layouts/body/h_body.d.ts.map +1 -0
  27. package/dist/layouts/body/h_body.js +21 -0
  28. package/dist/layouts/body/h_body.js.map +1 -0
  29. package/dist/layouts/body/v_body.d.ts +6 -0
  30. package/dist/layouts/body/v_body.d.ts.map +1 -0
  31. package/dist/layouts/body/v_body.js +21 -0
  32. package/dist/layouts/body/v_body.js.map +1 -0
  33. package/dist/layouts/divider/divider.d.ts +2 -2
  34. package/dist/layouts/divider/divider.d.ts.map +1 -1
  35. package/dist/layouts/divider/divider.js +17 -16
  36. package/dist/layouts/divider/divider.js.map +1 -1
  37. package/dist/layouts/footer/footer.d.ts +1 -1
  38. package/dist/layouts/footer/footer.d.ts.map +1 -1
  39. package/dist/layouts/footer/footer.js +5 -5
  40. package/dist/layouts/footer/footer.js.map +1 -1
  41. package/dist/layouts/header/header.d.ts +1 -1
  42. package/dist/layouts/header/header.d.ts.map +1 -1
  43. package/dist/layouts/header/header.js +10 -10
  44. package/dist/layouts/header/header.js.map +1 -1
  45. package/dist/layouts/index.d.ts +2 -4
  46. package/dist/layouts/index.d.ts.map +1 -1
  47. package/dist/layouts/index.js +20 -24
  48. package/dist/layouts/index.js.map +1 -1
  49. package/dist/layouts/utility_bar/utility_bar.d.ts +1 -1
  50. package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
  51. package/dist/layouts/utility_bar/utility_bar.js +13 -8
  52. package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
  53. package/dist/overlay/index.d.ts +6 -0
  54. package/dist/overlay/index.d.ts.map +1 -0
  55. package/dist/overlay/index.js +14 -0
  56. package/dist/overlay/index.js.map +1 -0
  57. package/dist/panel.css +1 -1
  58. package/dist/panel.module-DwGKncon.js +5 -0
  59. package/dist/panel.module-DwGKncon.js.map +1 -0
  60. package/dist/stack.css +1 -1
  61. package/dist/stacks/types/styles.d.ts +2 -2
  62. package/dist/stacks/types/styles.d.ts.map +1 -1
  63. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.d.ts.map +1 -0
  64. package/dist/{layouts → surfaces}/drawers/drawer_bottom/drawer_bottom.js +1 -1
  65. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +1 -0
  66. package/dist/surfaces/drawers/drawer_end/drawer_end.d.ts.map +1 -0
  67. package/dist/{layouts → surfaces}/drawers/drawer_end/drawer_end.js +2 -2
  68. package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +1 -0
  69. package/dist/surfaces/drawers/drawer_start/drawer_start.d.ts.map +1 -0
  70. package/dist/{layouts → surfaces}/drawers/drawer_start/drawer_start.js +1 -1
  71. package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +1 -0
  72. package/dist/surfaces/drawers/drawer_top/drawer_top.d.ts.map +1 -0
  73. package/dist/{layouts → surfaces}/drawers/drawer_top/drawer_top.js +1 -1
  74. package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +1 -0
  75. package/dist/surfaces/index.d.ts +4 -0
  76. package/dist/surfaces/index.d.ts.map +1 -1
  77. package/dist/surfaces/index.js +20 -12
  78. package/dist/surfaces/index.js.map +1 -1
  79. package/dist/surfaces/panel/h_panel.d.ts +1 -1
  80. package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
  81. package/dist/surfaces/panel/h_panel.js +44 -33
  82. package/dist/surfaces/panel/h_panel.js.map +1 -1
  83. package/dist/surfaces/panel/v_panel.d.ts +1 -1
  84. package/dist/surfaces/panel/v_panel.d.ts.map +1 -1
  85. package/dist/surfaces/panel/v_panel.js +36 -31
  86. package/dist/surfaces/panel/v_panel.js.map +1 -1
  87. package/dist/themes/index.js +82 -20
  88. package/dist/themes/index.js.map +1 -1
  89. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  90. package/dist/typography/title/title.d.ts +1 -1
  91. package/dist/typography/title/title.d.ts.map +1 -1
  92. package/dist/typography/title/title.js +16 -16
  93. package/dist/typography/title/title.js.map +1 -1
  94. package/dist/v_body.css +1 -0
  95. package/package.json +3 -3
  96. package/src/actions/button/button/button.tsx +10 -4
  97. package/src/form/field/common/status_input/status_input.tsx +1 -1
  98. package/src/form/field/h_field/h_field.tsx +1 -1
  99. package/src/form/field/v_field/v_field.tsx +1 -1
  100. package/src/form/field_presenters/options_field_presenter.ts +1 -1
  101. package/src/form/form_field.tsx +1 -1
  102. package/src/form/index.ts +50 -5
  103. package/src/inputs/phone_number_input/phone_number_input.tsx +9 -4
  104. package/src/layouts/body/h_body.module.css +5 -0
  105. package/src/layouts/body/h_body.tsx +23 -0
  106. package/src/layouts/body/v_body.module.css +5 -0
  107. package/src/layouts/body/v_body.tsx +23 -0
  108. package/src/layouts/divider/divider.tsx +5 -4
  109. package/src/layouts/footer/footer.tsx +4 -4
  110. package/src/layouts/header/header.tsx +4 -4
  111. package/src/layouts/index.ts +2 -4
  112. package/src/layouts/utility_bar/utility_bar.tsx +9 -4
  113. package/src/overlay/index.ts +5 -0
  114. package/src/stacks/stack.module.css +54 -5
  115. package/src/stacks/stacks.mdx +28 -28
  116. package/src/stacks/types/styles.ts +2 -2
  117. package/src/surfaces/index.ts +4 -0
  118. package/src/surfaces/panel/__stories__/panel.stories.tsx +68 -0
  119. package/src/surfaces/panel/__stories__/panel_stories.module.css +13 -0
  120. package/src/surfaces/panel/h_panel.tsx +18 -6
  121. package/src/surfaces/panel/panel.module.css +2 -7
  122. package/src/surfaces/panel/v_panel.tsx +11 -5
  123. package/src/themes/themes/ergo/ergo_theme.css +72 -10
  124. package/src/typography/title/title.tsx +2 -2
  125. package/dist/form/field/form_field.d.ts +0 -6
  126. package/dist/form/field/form_field.d.ts.map +0 -1
  127. package/dist/form/field/form_field.js +0 -18
  128. package/dist/form/field/form_field.js.map +0 -1
  129. package/dist/layouts/drawers/drawer_bottom/drawer_bottom.d.ts.map +0 -1
  130. package/dist/layouts/drawers/drawer_bottom/drawer_bottom.js.map +0 -1
  131. package/dist/layouts/drawers/drawer_end/drawer_end.d.ts.map +0 -1
  132. package/dist/layouts/drawers/drawer_end/drawer_end.js.map +0 -1
  133. package/dist/layouts/drawers/drawer_start/drawer_start.d.ts.map +0 -1
  134. package/dist/layouts/drawers/drawer_start/drawer_start.js.map +0 -1
  135. package/dist/layouts/drawers/drawer_top/drawer_top.d.ts.map +0 -1
  136. package/dist/layouts/drawers/drawer_top/drawer_top.js.map +0 -1
  137. package/dist/panel.module-CtikcmYB.js +0 -5
  138. package/dist/panel.module-CtikcmYB.js.map +0 -1
  139. package/src/form/field/form_field.tsx +0 -29
  140. /package/dist/{layouts → surfaces}/drawers/drawer_bottom/drawer_bottom.d.ts +0 -0
  141. /package/dist/{layouts → surfaces}/drawers/drawer_end/drawer_end.d.ts +0 -0
  142. /package/dist/{layouts → surfaces}/drawers/drawer_start/drawer_start.d.ts +0 -0
  143. /package/dist/{layouts → surfaces}/drawers/drawer_top/drawer_top.d.ts +0 -0
  144. /package/src/{layouts → surfaces}/drawers/__stories__/drawers.stories.tsx +0 -0
  145. /package/src/{layouts → surfaces}/drawers/drawer_bottom/drawer_bottom.module.css +0 -0
  146. /package/src/{layouts → surfaces}/drawers/drawer_bottom/drawer_bottom.tsx +0 -0
  147. /package/src/{layouts → surfaces}/drawers/drawer_end/drawer_end.module.css +0 -0
  148. /package/src/{layouts → surfaces}/drawers/drawer_end/drawer_end.tsx +0 -0
  149. /package/src/{layouts → surfaces}/drawers/drawer_start/drawer_start.module.css +0 -0
  150. /package/src/{layouts → surfaces}/drawers/drawer_start/drawer_start.tsx +0 -0
  151. /package/src/{layouts → surfaces}/drawers/drawer_top/drawer_top.module.css +0 -0
  152. /package/src/{layouts → surfaces}/drawers/drawer_top/drawer_top.tsx +0 -0
@@ -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
+ };
@@ -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 +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,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
- }