@tcn/ui 0.12.5 → 0.12.7

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 (131) hide show
  1. package/dist/aside.css +1 -0
  2. package/dist/inputs/color_input/color_input.js +18 -18
  3. package/dist/inputs/color_input/color_input.js.map +1 -1
  4. package/dist/inputs/control/control.d.ts +10 -0
  5. package/dist/inputs/control/control.d.ts.map +1 -0
  6. package/dist/inputs/control/control.js +17 -0
  7. package/dist/inputs/control/control.js.map +1 -0
  8. package/dist/inputs/control_set/control_set.d.ts +5 -0
  9. package/dist/inputs/control_set/control_set.d.ts.map +1 -0
  10. package/dist/inputs/control_set/control_set.js +20 -0
  11. package/dist/inputs/{input_group/input_group.js.map → control_set/control_set.js.map} +1 -1
  12. package/dist/inputs/date_picker/date_picker_input.js +20 -20
  13. package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
  14. package/dist/inputs/index.d.ts +2 -1
  15. package/dist/inputs/index.d.ts.map +1 -1
  16. package/dist/inputs/index.js +27 -24
  17. package/dist/inputs/index.js.map +1 -1
  18. package/dist/inputs/input/input.js +6 -6
  19. package/dist/inputs/input/input.js.map +1 -1
  20. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js +15 -15
  21. package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js.map +1 -1
  22. package/dist/inputs/phone_number_input/phone_number_input.js +24 -24
  23. package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
  24. package/dist/inputs/phone_number_input/phone_number_input_adapter.js +21 -21
  25. package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -1
  26. package/dist/inputs/phone_number_input/sip_input.js +14 -14
  27. package/dist/inputs/phone_number_input/sip_input.js.map +1 -1
  28. package/dist/inputs/select/select.js +6 -6
  29. package/dist/inputs/select/select.js.map +1 -1
  30. package/dist/inputs/textarea/textarea.js +8 -8
  31. package/dist/inputs/textarea/textarea.js.map +1 -1
  32. package/dist/inputs/unit_input/unit_input.js +20 -20
  33. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  34. package/dist/overlay/frame/frame.d.ts +2 -2
  35. package/dist/overlay/frame/frame.d.ts.map +1 -1
  36. package/dist/overlay/frame/frame.js +67 -59
  37. package/dist/overlay/frame/frame.js.map +1 -1
  38. package/dist/overlay/slide/slide.d.ts +9 -0
  39. package/dist/overlay/slide/slide.d.ts.map +1 -0
  40. package/dist/overlay/slide/slide.js +29 -0
  41. package/dist/overlay/slide/slide.js.map +1 -0
  42. package/dist/slide.css +1 -0
  43. package/dist/surfaces/aside/aside.d.ts +5 -0
  44. package/dist/surfaces/aside/aside.d.ts.map +1 -0
  45. package/dist/surfaces/aside/aside.js +19 -0
  46. package/dist/surfaces/aside/aside.js.map +1 -0
  47. package/dist/surfaces/drawers/drawer.d.ts +5 -0
  48. package/dist/surfaces/drawers/drawer.d.ts.map +1 -0
  49. package/dist/surfaces/drawers/drawer.js +23 -0
  50. package/dist/surfaces/drawers/drawer.js.map +1 -0
  51. package/dist/surfaces/index.d.ts +2 -4
  52. package/dist/surfaces/index.d.ts.map +1 -1
  53. package/dist/surfaces/index.js +22 -26
  54. package/dist/surfaces/index.js.map +1 -1
  55. package/dist/surfaces/modal/modal.d.ts +1 -1
  56. package/dist/surfaces/modal/modal.d.ts.map +1 -1
  57. package/dist/surfaces/window/window.d.ts +1 -1
  58. package/dist/surfaces/window/window.d.ts.map +1 -1
  59. package/dist/themes/stylesheets/reset.css +1 -1
  60. package/dist/themes/stylesheets/reset.js +2 -2
  61. package/dist/themes/stylesheets/reset.js.map +1 -1
  62. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  63. package/dist/themes/themes/ergo/ergo_theme.js +95 -8
  64. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  65. package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +1 -1
  66. package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -1
  67. package/package.json +2 -2
  68. package/src/inputs/color_input/color_input.tsx +3 -3
  69. package/src/inputs/control/control.stories.tsx +158 -0
  70. package/src/inputs/control/control.tsx +32 -0
  71. package/src/inputs/control/control_stories.module.css +7 -0
  72. package/src/inputs/control_set/control_set.stories.tsx +46 -0
  73. package/src/inputs/{input_group/input_group.tsx → control_set/control_set.tsx} +5 -5
  74. package/src/inputs/date_picker/date_picker_input.stories.tsx +1 -1
  75. package/src/inputs/date_picker/date_picker_input.tsx +1 -1
  76. package/src/inputs/index.ts +2 -1
  77. package/src/inputs/input/input.tsx +1 -1
  78. package/src/inputs/phone_number_input/phone_number_country_select_adapter.tsx +1 -1
  79. package/src/inputs/phone_number_input/phone_number_input.tsx +1 -1
  80. package/src/inputs/phone_number_input/phone_number_input_adapter.tsx +2 -2
  81. package/src/inputs/phone_number_input/sip_input.tsx +4 -4
  82. package/src/inputs/select/select.tsx +1 -1
  83. package/src/inputs/textarea/textarea.stories.tsx +1 -1
  84. package/src/inputs/textarea/textarea.tsx +1 -1
  85. package/src/inputs/unit_input/unit_input.tsx +3 -3
  86. package/src/overlay/frame/frame.tsx +13 -16
  87. package/src/overlay/slide/slide.module.css +30 -0
  88. package/src/overlay/slide/slide.stories.tsx +58 -0
  89. package/src/overlay/slide/slide.tsx +51 -0
  90. package/src/surfaces/aside/aside.module.css +5 -0
  91. package/src/surfaces/aside/aside.stories.tsx +56 -0
  92. package/src/surfaces/aside/aside.tsx +22 -0
  93. package/src/surfaces/drawers/drawer.stories.tsx +130 -0
  94. package/src/surfaces/drawers/drawer.tsx +26 -0
  95. package/src/surfaces/index.ts +2 -4
  96. package/src/themes/stylesheets/reset.css +2 -2
  97. package/src/themes/themes/ergo/ergo_theme.css +95 -8
  98. package/src/utils/dnd/hooks/use_drag_container.ts +0 -7
  99. package/tsconfig.json +5 -33
  100. package/dist/drawer_bottom.css +0 -1
  101. package/dist/drawer_end.css +0 -1
  102. package/dist/drawer_start.css +0 -1
  103. package/dist/drawer_top.css +0 -1
  104. package/dist/inputs/input_group/input_group.d.ts +0 -5
  105. package/dist/inputs/input_group/input_group.d.ts.map +0 -1
  106. package/dist/inputs/input_group/input_group.js +0 -20
  107. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.d.ts +0 -7
  108. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.d.ts.map +0 -1
  109. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js +0 -22
  110. package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +0 -1
  111. package/dist/surfaces/drawers/drawer_end/drawer_end.d.ts +0 -7
  112. package/dist/surfaces/drawers/drawer_end/drawer_end.d.ts.map +0 -1
  113. package/dist/surfaces/drawers/drawer_end/drawer_end.js +0 -20
  114. package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +0 -1
  115. package/dist/surfaces/drawers/drawer_start/drawer_start.d.ts +0 -7
  116. package/dist/surfaces/drawers/drawer_start/drawer_start.d.ts.map +0 -1
  117. package/dist/surfaces/drawers/drawer_start/drawer_start.js +0 -22
  118. package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +0 -1
  119. package/dist/surfaces/drawers/drawer_top/drawer_top.d.ts +0 -7
  120. package/dist/surfaces/drawers/drawer_top/drawer_top.d.ts.map +0 -1
  121. package/dist/surfaces/drawers/drawer_top/drawer_top.js +0 -20
  122. package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +0 -1
  123. package/src/surfaces/drawers/__stories__/drawers.stories.tsx +0 -26
  124. package/src/surfaces/drawers/drawer_bottom/drawer_bottom.module.css +0 -5
  125. package/src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx +0 -23
  126. package/src/surfaces/drawers/drawer_end/drawer_end.module.css +0 -5
  127. package/src/surfaces/drawers/drawer_end/drawer_end.tsx +0 -24
  128. package/src/surfaces/drawers/drawer_start/drawer_start.module.css +0 -5
  129. package/src/surfaces/drawers/drawer_start/drawer_start.tsx +0 -23
  130. package/src/surfaces/drawers/drawer_top/drawer_top.module.css +0 -5
  131. package/src/surfaces/drawers/drawer_top/drawer_top.tsx +0 -24
@@ -0,0 +1,56 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Footer, HBody, Header, Rail, VBody } from '../../layouts/index.js';
3
+ import { Box } from '../../stacks/index.js';
4
+ import { Aside } from './aside.js';
5
+ import { BodyText, Title } from '../../typography/index.js';
6
+ import { Panel } from '../panel/panel.js';
7
+ import { theme } from '../../themes/theme_variables.js';
8
+
9
+ const meta: Meta<typeof Aside> = {
10
+ title: 'Surfaces/Aside',
11
+ component: Aside,
12
+ tags: ['autodocs'],
13
+ };
14
+
15
+ export default meta;
16
+
17
+ type Story = StoryObj<typeof Aside>;
18
+
19
+ export const Baseline: Story = {
20
+ render: () => (
21
+ <Box
22
+ height="100vh"
23
+ minHeight="400px"
24
+ padding="16px"
25
+ style={{ backgroundColor: theme.backgroundColors.tertiary }}
26
+ >
27
+ <Panel>
28
+ <Header>
29
+ <Title>Parent Container Title</Title>
30
+ </Header>
31
+ <HBody>
32
+ <Rail>
33
+ <Aside width="240px">
34
+ <Header>
35
+ <Title>Aside - Secondary</Title>
36
+ </Header>
37
+ <VBody>
38
+ <BodyText>Aside Body</BodyText>
39
+ </VBody>
40
+ <Footer>
41
+ <BodyText>Aside Footer</BodyText>
42
+ </Footer>
43
+ </Aside>
44
+ <VBody>
45
+ <BodyText>Primary Content</BodyText>
46
+ </VBody>
47
+ </Rail>
48
+ </HBody>
49
+
50
+ <Footer>
51
+ <Title>Parent Container Footer</Title>
52
+ </Footer>
53
+ </Panel>
54
+ </Box>
55
+ ),
56
+ };
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { Scaffold, type ScaffoldProps } from '../../layouts/scaffold/scaffold.js';
3
+ import clsx from 'clsx';
4
+
5
+ import styles from './aside.module.css';
6
+
7
+ export type AsideProps = ScaffoldProps;
8
+
9
+ export const Aside = React.forwardRef<HTMLElement, AsideProps>(function Aside(
10
+ { children, className, ...props }: AsideProps,
11
+ ref
12
+ ) {
13
+ return (
14
+ <Scaffold
15
+ ref={ref}
16
+ className={clsx(styles['aside'], 'tcn-surface', 'tcn-aside', className)}
17
+ {...props}
18
+ >
19
+ {children}
20
+ </Scaffold>
21
+ );
22
+ });
@@ -0,0 +1,130 @@
1
+ import { useState } from 'react';
2
+ import { Button } from '../../actions/index.js';
3
+ import { Footer, Header, UtilityBar, VBody } from '../../layouts/index.js';
4
+ import { ZStack } from '../../stacks/z_stack.js';
5
+ import { BodyText, Title } from '../../typography/index.js';
6
+ import { Drawer, type DrawerProps } from './drawer.js';
7
+ import { Spacer } from '../../stacks/index.js';
8
+ import { CrossIcon } from '@tcn/icons/cross_icon.js';
9
+ import { BugIcon } from '@tcn/icons/bug_icon.js';
10
+
11
+ export default {
12
+ title: 'Surfaces/Drawer',
13
+ component: Drawer,
14
+ tags: ['autodocs'],
15
+ argTypes: {
16
+ side: {
17
+ control: 'select',
18
+ options: ['start', 'end', 'top', 'bottom'],
19
+ },
20
+ veil: {
21
+ control: 'boolean',
22
+ },
23
+ resizable: {
24
+ control: 'boolean',
25
+ },
26
+ size: {
27
+ control: 'text',
28
+ description: 'Arg to swap between setting width and height',
29
+ },
30
+ minSize: {
31
+ control: 'text',
32
+ description: 'Arg to set the minimum size of the drawer',
33
+ },
34
+ maxSize: {
35
+ control: 'text',
36
+ description: 'Arg to set the maximum size of the drawer',
37
+ },
38
+ },
39
+ args: {
40
+ resizable: true,
41
+ veil: false,
42
+ side: 'start',
43
+ size: '400px',
44
+ minSize: '240px',
45
+ maxSize: '90%',
46
+ },
47
+ };
48
+
49
+ type DrawerStoryProps = Pick<DrawerProps, 'resizable' | 'veil' | 'side'> & {
50
+ size?: string;
51
+ minSize?: string;
52
+ maxSize?: string;
53
+ };
54
+
55
+ export const Baseline = ({
56
+ veil,
57
+ resizable,
58
+ side,
59
+ size,
60
+ minSize,
61
+ maxSize,
62
+ }: DrawerStoryProps) => {
63
+ const [isOpen, setIsOpen] = useState(false);
64
+
65
+ function toggle() {
66
+ setIsOpen(!isOpen);
67
+ }
68
+
69
+ const useWidth = side === 'start' || side === 'end';
70
+
71
+ return (
72
+ <ZStack height="100%" width="100%" minHeight="600px">
73
+ <Button hierarchy="secondary" onClick={toggle}>
74
+ {isOpen ? 'Close' : 'Open'}
75
+ </Button>
76
+
77
+ <Drawer
78
+ side={side}
79
+ isOpen={isOpen}
80
+ veil={veil}
81
+ resizable={resizable}
82
+ width={useWidth ? size : undefined}
83
+ minWidth={useWidth ? minSize : undefined}
84
+ maxWidth={useWidth ? maxSize : undefined}
85
+ height={useWidth ? undefined : size}
86
+ minHeight={useWidth ? undefined : minSize}
87
+ maxHeight={useWidth ? undefined : maxSize}
88
+ >
89
+ {/* Add a drag handle around the areas of the modal you want to be draggable (usually the header) */}
90
+ {/* <DragHandle> */}
91
+ <Header>
92
+ <Title>Drawer Title</Title>
93
+ <Spacer />
94
+ <Button utility hierarchy="tertiary" onClick={toggle}>
95
+ <CrossIcon />
96
+ </Button>
97
+ <Button utility hierarchy="secondary" onClick={toggle}>
98
+ <CrossIcon />
99
+ </Button>
100
+ <Button utility hierarchy="primary" onClick={toggle}>
101
+ <CrossIcon />
102
+ </Button>
103
+ </Header>
104
+ {/* </DragHandle> */}
105
+
106
+ <UtilityBar>
107
+ <Title>Utility Bar</Title>
108
+ <Spacer />
109
+ <Button utility hierarchy="tertiary">
110
+ <BugIcon />
111
+ </Button>
112
+ <Button utility hierarchy="secondary">
113
+ <BugIcon />
114
+ </Button>
115
+ <Button utility hierarchy="primary">
116
+ <BugIcon />
117
+ </Button>
118
+ </UtilityBar>
119
+ <VBody>
120
+ <BodyText>This is a drawer</BodyText>
121
+ </VBody>
122
+ <Footer>
123
+ <Spacer />
124
+ <Button hierarchy="secondary">Cancel</Button>
125
+ <Button hierarchy="primary">Save</Button>
126
+ </Footer>
127
+ </Drawer>
128
+ </ZStack>
129
+ );
130
+ };
@@ -0,0 +1,26 @@
1
+ import { clsx } from 'clsx';
2
+ import React from 'react';
3
+ import { Scaffold } from '../../layouts/scaffold/scaffold.js';
4
+ import { Slide, type SlideProps } from '../../overlay/slide/slide.js';
5
+
6
+ export type DrawerProps = SlideProps;
7
+
8
+ export const Drawer = React.forwardRef<HTMLElement, DrawerProps>(function Drawer(
9
+ { children, className, isOpen, veil = false, resizable = false, ...props }: DrawerProps,
10
+ ref
11
+ ) {
12
+ return (
13
+ <Slide
14
+ ref={ref}
15
+ isOpen={isOpen}
16
+ veil={veil}
17
+ resizable={resizable}
18
+ className={clsx('tcn-surface', 'tcn-drawer', className)}
19
+ {...props}
20
+ >
21
+ <Scaffold className={'tcn-drawer-scaffold'} width="100%" height="100%">
22
+ {children}
23
+ </Scaffold>
24
+ </Slide>
25
+ );
26
+ });
@@ -4,11 +4,9 @@ export * from './confirm/confirm.js';
4
4
  export * from './page/h_page.js';
5
5
  export * from './page/v_page.js';
6
6
  export * from './panel/panel.js';
7
+ export * from './aside/aside.js';
7
8
  export * from './popover/popover.js';
8
- export * from './drawers/drawer_bottom/drawer_bottom.js';
9
- export * from './drawers/drawer_top/drawer_top.js';
10
- export * from './drawers/drawer_start/drawer_start.js';
11
- export * from './drawers/drawer_end/drawer_end.js';
9
+ export { Drawer, type DrawerProps } from './drawers/drawer.js';
12
10
  export { Window, type WindowProps } from './window/window.js';
13
11
  export { Modal, type ModalProps } from './modal/modal.js';
14
12
  export { Tooltip, type TooltipProps } from './tooltip/tooltip.js';
@@ -91,8 +91,8 @@
91
91
  vertical-align: baseline;
92
92
  }
93
93
  /* HTML5 display-role reset for older browsers */
94
- /* FIXME: sometimes reset breaks stacks display value (flex) */
95
- /* header, section */
94
+ header,
95
+ section,
96
96
  article,
97
97
  aside,
98
98
  details,
@@ -110,8 +110,8 @@
110
110
  --quaternary-color-strong: #008cff;
111
111
 
112
112
  --background-color-primary: #ffffff;
113
- --background-color-secondary: #ffffff;
114
- --background-color-tertiary: #ffffff;
113
+ --background-color-secondary: #fafafa;
114
+ --background-color-tertiary: #f1f1f1;
115
115
  --background-color-quaternary: #ffffff;
116
116
 
117
117
  --foreground-color-primary: #aaa;
@@ -794,6 +794,30 @@
794
794
  }
795
795
  }
796
796
 
797
+ /* DRAWER: */
798
+ .tcn-drawer {
799
+ --divide-header: 0;
800
+ box-shadow: 0px 4px 34px 0px #00000096;
801
+
802
+ :where(.tcn-scaffold) {
803
+ background-color: var(--background-color-primary);
804
+ overflow: hidden;
805
+ }
806
+
807
+ :where(.tcn-header) {
808
+ --material: var(--ergo-secondary-dark);
809
+ --on-material: var(--ergo-white);
810
+ --action: var(--ergo-tertiary);
811
+ --on-action: var(--ergo-secondary-dark);
812
+
813
+ background-color: var(--material);
814
+ color: var(--on-material);
815
+ :where(.tcn-typography) {
816
+ color: inherit;
817
+ }
818
+ }
819
+ }
820
+
797
821
  /* WINDOW: */
798
822
  .tcn-window {
799
823
  box-shadow: 0px 4px 34px 0px #00000096;
@@ -885,6 +909,29 @@
885
909
  background-color: var(--material);
886
910
  border-radius: var(--shape-radius-medium);
887
911
  overflow: hidden;
912
+
913
+ :where(.tcn-title) {
914
+ font-size: 18px;
915
+ }
916
+ }
917
+
918
+ /* Aside */
919
+ .tcn-aside {
920
+ --material: var(--background-color-secondary);
921
+ background-color: var(--material);
922
+ overflow: hidden;
923
+
924
+ :where(.tcn-header) {
925
+ min-height: var(--bar-md);
926
+ }
927
+
928
+ :where(.tcn-footer) {
929
+ min-height: var(--bar-md);
930
+ }
931
+
932
+ :where(.tcn-title) {
933
+ font-size: 16px;
934
+ }
888
935
  }
889
936
 
890
937
  /* Card */
@@ -1148,6 +1195,7 @@
1148
1195
  }
1149
1196
 
1150
1197
  /* ===== INPUTS ===== */
1198
+ .tcn-entry,
1151
1199
  .tcn-control {
1152
1200
  --act: var(--action);
1153
1201
  --mat: var(--material);
@@ -1165,7 +1213,7 @@
1165
1213
  background: var(--act-raised);
1166
1214
  }
1167
1215
 
1168
- .tcn-control:focus-visible {
1216
+ .tcn-control:focus-within {
1169
1217
  outline: 2px solid var(--ergo-primary);
1170
1218
  outline-offset: 2px;
1171
1219
  }
@@ -1188,6 +1236,43 @@
1188
1236
  color: var(--on-material-disabled);
1189
1237
  }
1190
1238
 
1239
+ .tcn-control {
1240
+ display: flex;
1241
+ justify-content: center;
1242
+ gap: var(--gap-small);
1243
+ }
1244
+
1245
+ .tcn-control-row {
1246
+ min-height: 22px;
1247
+ height: auto;
1248
+ align-items: center;
1249
+ gap: var(--gap-small);
1250
+ padding-block: 2px;
1251
+ }
1252
+
1253
+ .tcn-control-row > .tcn-icon {
1254
+ color: var(--ergo-grey);
1255
+ }
1256
+
1257
+ .tcn-control .tcn-entry {
1258
+ border: none;
1259
+ background: transparent;
1260
+ padding: 0;
1261
+ min-height: unset;
1262
+ border-radius: 0;
1263
+ height: 100%;
1264
+ flex-grow: 1;
1265
+
1266
+ &:hover,
1267
+ &:active,
1268
+ &:focus-visible,
1269
+ &:focus {
1270
+ outline: none;
1271
+ border: none;
1272
+ background: transparent;
1273
+ }
1274
+ }
1275
+
1191
1276
  .tcn-input {
1192
1277
  height: auto;
1193
1278
  }
@@ -1197,7 +1282,7 @@
1197
1282
  cursor: text;
1198
1283
  }
1199
1284
 
1200
- .tcn-input-group {
1285
+ .tcn-control-set {
1201
1286
  border-radius: var(--shape-radius-medium);
1202
1287
 
1203
1288
  &:focus-within {
@@ -1205,7 +1290,7 @@
1205
1290
  outline-offset: 2px;
1206
1291
  }
1207
1292
 
1208
- .tcn-input-group-slot {
1293
+ .tcn-control-set-item {
1209
1294
  z-index: 1;
1210
1295
  border-radius: 0;
1211
1296
  height: auto;
@@ -1218,16 +1303,16 @@
1218
1303
  }
1219
1304
  }
1220
1305
 
1221
- .tcn-input-group-slot:first-child {
1306
+ .tcn-control-set-item:first-child {
1222
1307
  border-top-left-radius: var(--shape-radius-medium);
1223
1308
  border-bottom-left-radius: var(--shape-radius-medium);
1224
1309
  }
1225
1310
 
1226
- .tcn-input-group-slot:not(:last-child) {
1311
+ .tcn-control-set-item:not(:last-child) {
1227
1312
  margin-right: -1px;
1228
1313
  }
1229
1314
 
1230
- .tcn-input-group-slot:last-child {
1315
+ .tcn-control-set-item:last-child {
1231
1316
  border-top-right-radius: var(--shape-radius-medium);
1232
1317
  border-bottom-right-radius: var(--shape-radius-medium);
1233
1318
  }
@@ -1299,11 +1384,13 @@
1299
1384
  .tcn-input,
1300
1385
  .tcn-select,
1301
1386
  .tcn-slider,
1387
+ .tcn-textarea,
1302
1388
  .tcn-checkbox,
1303
1389
  .tcn-switch-wrapper,
1304
1390
  .tcn-date-picker,
1305
1391
  .tcn-date-picker-year-selector,
1306
1392
  .tcn-radio,
1393
+ .tcn-date-picker-input,
1307
1394
  .tcn-suggestion-list-search-input,
1308
1395
  .tcn-suggestion-list {
1309
1396
  --accent-color: var(--ergo-primary);
@@ -10,14 +10,7 @@ export interface UseDragContainerOptions {
10
10
  export function useMakeDragContainer(options: UseDragContainerOptions): DragContainer {
11
11
  const [handles, setHandles] = useState<React.RefObject<HTMLElement>[]>([]);
12
12
  const positionRef = useRef<Position>(options.initialPosition ?? { x: 0, y: 0 });
13
- /**
14
- * The value that triggers re-renders. It’s updated in dragCallback so the UI
15
- * moves while dragging, and it’s what the hook returns so the consumer can
16
- * render the element at that position
17
- * (e.g. style={{ left: position.x, top: position.y }}).
18
- */
19
13
  const [position, setPosition] = useState(positionRef.current);
20
-
21
14
  const [isDragging, setIsDragging] = useState(false);
22
15
 
23
16
  useDraggable({
package/tsconfig.json CHANGED
@@ -1,36 +1,8 @@
1
1
  {
2
+ "extends": "../../tsconfig.base.json",
2
3
  "compilerOptions": {
3
- "esModuleInterop": true,
4
- "jsx": "react-jsx",
5
- "paths": {
6
- "~aip-160/*": [
7
- "../aip-160/src/*"
8
- ],
9
- "~aip-160-editor/*": [
10
- "../aip-160-editor/src/*"
11
- ],
12
- "~icons/*": [
13
- "../icons/src/*"
14
- ],
15
- "~resource-store/*": [
16
- "../resource-store/src/*"
17
- ],
18
- "~sb-blackcat-addon/*": [
19
- "../sb-blackcat-addon/src/*"
20
- ],
21
- "~state/*": [
22
- "../state/src/*"
23
- ],
24
- "~ui/*": [
25
- "./src/*"
26
- ],
27
- "~ui-table/*": [
28
- "../ui-table/src/*"
29
- ]
30
- }
4
+ "rootDir": ".",
5
+ "noImplicitAny": false
31
6
  },
32
- "include": [
33
- "src/**/*",
34
- "types/**/*"
35
- ]
36
- }
7
+ "include": ["src/**/*", ".storybook/**/*", "types/**/*", "package.json"]
8
+ }
@@ -1 +0,0 @@
1
- @layer tcn-system{:where(._drawerBottom_9359033){background-color:var(--background-color-primary)}}
@@ -1 +0,0 @@
1
- @layer tcn-system{:where(._drawerEnd_39acb27){background-color:var(--background-color-primary)}}
@@ -1 +0,0 @@
1
- @layer tcn-system{:where(._drawerStart_3abbf56){background-color:var(--background-color-primary)}}
@@ -1 +0,0 @@
1
- @layer tcn-system{:where(._drawerBottom_7a0635a){background-color:var(--background-color-primary)}}
@@ -1,5 +0,0 @@
1
- import { default as React } from 'react';
2
- import { HStackProps } from '../../stacks/h_stack.js';
3
- export type InputGroupProps = HStackProps;
4
- export declare const InputGroup: React.ForwardRefExoticComponent<InputGroupProps & React.RefAttributes<HTMLElement>>;
5
- //# sourceMappingURL=input_group.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input_group.d.ts","sourceRoot":"","sources":["../../../src/inputs/input_group/input_group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC;AAE1C,eAAO,MAAM,UAAU,qFAmBtB,CAAC"}
@@ -1,20 +0,0 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import r from "react";
3
- import { clsx as t } from "clsx";
4
- import { HStack as c } from "../../stacks/h_stack.js";
5
- const N = r.forwardRef(
6
- function({ children: n, as: p = "div", className: e, ...m }, s) {
7
- const a = r.Children.map(
8
- n,
9
- (o) => r.isValidElement(o) ? r.cloneElement(o, {
10
- ...o.props,
11
- className: t(o.props.className, "tcn-input-group-slot")
12
- }) : o
13
- );
14
- return /* @__PURE__ */ u(c, { ref: s, as: p, className: t(e, "tcn-input-group"), ...m, children: a });
15
- }
16
- );
17
- export {
18
- N as InputGroup
19
- };
20
- //# sourceMappingURL=input_group.js.map
@@ -1,7 +0,0 @@
1
- import { VStackProps } from '../../../stacks/v_stack.js';
2
- import { default as React } from 'react';
3
- export interface DrawerBottomProps extends Omit<VStackProps, 'as' | 'children'> {
4
- children?: React.ReactNode;
5
- }
6
- export declare const DrawerBottom: React.ForwardRefExoticComponent<DrawerBottomProps & React.RefAttributes<HTMLElement>>;
7
- //# sourceMappingURL=drawer_bottom.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer_bottom.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/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,22 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { VStack as a } from "../../../stacks/v_stack.js";
3
- import { clsx as s } from "clsx";
4
- import c from "react";
5
- import '../../../drawer_bottom.css';const f = "_drawerBottom_9359033", n = { drawerBottom: f }, l = c.forwardRef(
6
- function({ children: t, className: o, ...r }, m) {
7
- return /* @__PURE__ */ e(
8
- a,
9
- {
10
- ref: m,
11
- as: "section",
12
- className: s(n.drawerBottom, o, "tcn-drawer-bottom"),
13
- ...r,
14
- children: t
15
- }
16
- );
17
- }
18
- );
19
- export {
20
- l as DrawerBottom
21
- };
22
- //# sourceMappingURL=drawer_bottom.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer_bottom.js","sources":["../../../../src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../../stacks/v_stack.js';\nimport { clsx } from 'clsx';\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={clsx(styles.drawerBottom, className, 'tcn-drawer-bottom')}\n {...props}\n >\n {children}\n </VStack>\n );\n }\n);\n"],"names":["DrawerBottom","React","children","className","props","ref","jsx","VStack","clsx","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,EAAKC,EAAO,cAAcN,GAAW,mBAAmB;AAAA,QAClE,GAAGC;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;"}
@@ -1,7 +0,0 @@
1
- import { VStackProps } from '../../../stacks/v_stack.js';
2
- import { default as React } from 'react';
3
- export interface DrawerEndProps extends Omit<VStackProps, 'as' | 'children'> {
4
- children?: React.ReactNode;
5
- }
6
- export declare const DrawerEnd: React.ForwardRefExoticComponent<DrawerEndProps & React.RefAttributes<HTMLElement>>;
7
- //# sourceMappingURL=drawer_end.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer_end.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/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,20 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { VStack as n } from "../../../stacks/v_stack.js";
3
- import { clsx as d } from "clsx";
4
- import c from "react";
5
- import '../../../drawer_end.css';const s = "_drawerEnd_39acb27", m = { drawerEnd: s }, l = c.forwardRef(function({ children: r, className: t, ...o }, a) {
6
- return /* @__PURE__ */ e(
7
- n,
8
- {
9
- ref: a,
10
- as: "section",
11
- className: d(m.drawerEnd, t, "tcn-drawerEnd"),
12
- ...o,
13
- children: r
14
- }
15
- );
16
- });
17
- export {
18
- l as DrawerEnd
19
- };
20
- //# sourceMappingURL=drawer_end.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer_end.js","sources":["../../../../src/surfaces/drawers/drawer_end/drawer_end.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../../stacks/v_stack.js';\nimport { clsx } from 'clsx';\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={clsx(styles.drawerEnd, className, 'tcn-drawerEnd')}\n {...props}\n >\n {children}\n </VStack>\n );\n});\n"],"names":["DrawerEnd","React","children","className","props","ref","jsx","VStack","clsx","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,EAAKC,EAAO,WAAWN,GAAW,eAAe;AAAA,MAC3D,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -1,7 +0,0 @@
1
- import { VStackProps } from '../../../stacks/v_stack.js';
2
- import { default as React } from 'react';
3
- export interface DrawerStartProps extends Omit<VStackProps, 'as' | 'children'> {
4
- children?: React.ReactNode;
5
- }
6
- export declare const DrawerStart: React.ForwardRefExoticComponent<DrawerStartProps & React.RefAttributes<HTMLElement>>;
7
- //# sourceMappingURL=drawer_start.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer_start.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/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,22 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { VStack as s } from "../../../stacks/v_stack.js";
3
- import { clsx as c } from "clsx";
4
- import f from "react";
5
- import '../../../drawer_start.css';const m = "_drawerStart_3abbf56", n = { drawerStart: m }, l = f.forwardRef(
6
- function({ children: r, className: t, ...a }, o) {
7
- return /* @__PURE__ */ e(
8
- s,
9
- {
10
- ref: o,
11
- as: "section",
12
- className: c(n.drawerStart, t, "tcn-drawerStart"),
13
- ...a,
14
- children: r
15
- }
16
- );
17
- }
18
- );
19
- export {
20
- l as DrawerStart
21
- };
22
- //# sourceMappingURL=drawer_start.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer_start.js","sources":["../../../../src/surfaces/drawers/drawer_start/drawer_start.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../../stacks/v_stack.js';\nimport { clsx } from 'clsx';\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={clsx(styles.drawerStart, className, 'tcn-drawerStart')}\n {...props}\n >\n {children}\n </VStack>\n );\n }\n);\n"],"names":["DrawerStart","React","children","className","props","ref","jsx","VStack","clsx","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,EAAKC,EAAO,aAAaN,GAAW,iBAAiB;AAAA,QAC/D,GAAGC;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;"}