@tcn/ui 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/draggable.module-BgelQsuJ.js +5 -0
  2. package/dist/draggable.module-BgelQsuJ.js.map +1 -0
  3. package/dist/form/field/field.js +13 -10
  4. package/dist/form/field/field.js.map +1 -1
  5. package/dist/inputs/color_input/color_picker.js +5 -3
  6. package/dist/inputs/color_input/color_picker.js.map +1 -1
  7. package/dist/inputs/combo_box/combo_box.js +4 -2
  8. package/dist/inputs/combo_box/combo_box.js.map +1 -1
  9. package/dist/inputs/date_picker/date_picker.js +16 -14
  10. package/dist/inputs/date_picker/date_picker.js.map +1 -1
  11. package/dist/inputs/date_picker/date_picker_input.js +10 -8
  12. package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
  13. package/dist/inputs/date_picker/date_picker_year_selector.js +4 -2
  14. package/dist/inputs/date_picker/date_picker_year_selector.js.map +1 -1
  15. package/dist/inputs/mask_input/key_capture_input.js +15 -12
  16. package/dist/inputs/mask_input/key_capture_input.js.map +1 -1
  17. package/dist/inputs/mask_input/mask_input.js +13 -10
  18. package/dist/inputs/mask_input/mask_input.js.map +1 -1
  19. package/dist/inputs/multiselect/multiselect.js +9 -7
  20. package/dist/inputs/multiselect/multiselect.js.map +1 -1
  21. package/dist/inputs/phone_number_input/phone_number_input.d.ts +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 +136 -133
  24. package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
  25. package/dist/inputs/select/select.js +4 -2
  26. package/dist/inputs/select/select.js.map +1 -1
  27. package/dist/inputs/slider/slider.js +7 -5
  28. package/dist/inputs/slider/slider.js.map +1 -1
  29. package/dist/inputs/suggestions/suggestion_list.js +4 -2
  30. package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
  31. package/dist/inputs/switch/switch.js +16 -14
  32. package/dist/inputs/switch/switch.js.map +1 -1
  33. package/dist/inputs/unit_input/unit_input.js +16 -14
  34. package/dist/inputs/unit_input/unit_input.js.map +1 -1
  35. package/dist/navigation/tabs/state/link/tab_link.js +9 -6
  36. package/dist/navigation/tabs/state/link/tab_link.js.map +1 -1
  37. package/dist/navigation/tabs/state/link/use_tab_link.js +8 -8
  38. package/dist/navigation/tabs/state/link/use_tab_link.js.map +1 -1
  39. package/dist/overlay/caret/caret.d.ts +8 -0
  40. package/dist/overlay/caret/caret.d.ts.map +1 -0
  41. package/dist/overlay/caret/caret.js +20 -0
  42. package/dist/overlay/caret/caret.js.map +1 -0
  43. package/dist/overlay/menu/menu.js +34 -32
  44. package/dist/overlay/menu/menu.js.map +1 -1
  45. package/dist/overlay/popper/legacy/popper.js +22 -20
  46. package/dist/overlay/popper/legacy/popper.js.map +1 -1
  47. package/dist/overlay/popper/preview_popper.js +12 -9
  48. package/dist/overlay/popper/preview_popper.js.map +1 -1
  49. package/dist/overlay/tethered/hooks/calculate_origin.d.ts +23 -0
  50. package/dist/overlay/tethered/hooks/calculate_origin.d.ts.map +1 -0
  51. package/dist/overlay/tethered/hooks/calculate_origin.js +41 -0
  52. package/dist/overlay/tethered/hooks/calculate_origin.js.map +1 -0
  53. package/dist/overlay/tethered/hooks/useCaretRefDimensions.d.ts +9 -0
  54. package/dist/overlay/tethered/hooks/useCaretRefDimensions.d.ts.map +1 -0
  55. package/dist/overlay/tethered/hooks/useCaretRefDimensions.js +14 -0
  56. package/dist/overlay/tethered/hooks/useCaretRefDimensions.js.map +1 -0
  57. package/dist/overlay/tethered/hooks/useTether.d.ts +1 -1
  58. package/dist/overlay/tethered/hooks/useTether.d.ts.map +1 -1
  59. package/dist/overlay/tethered/hooks/useTether.js +22 -21
  60. package/dist/overlay/tethered/hooks/useTether.js.map +1 -1
  61. package/dist/overlay/tethered/hooks/useTetherContentRect.d.ts +3 -0
  62. package/dist/overlay/tethered/hooks/useTetherContentRect.d.ts.map +1 -0
  63. package/dist/overlay/tethered/hooks/useTetherContentRect.js +36 -0
  64. package/dist/overlay/tethered/hooks/useTetherContentRect.js.map +1 -0
  65. package/dist/overlay/tethered/hooks/useTetherOrigin.d.ts +14 -0
  66. package/dist/overlay/tethered/hooks/useTetherOrigin.d.ts.map +1 -0
  67. package/dist/overlay/tethered/hooks/useTetherOrigin.js +24 -0
  68. package/dist/overlay/tethered/hooks/useTetherOrigin.js.map +1 -0
  69. package/dist/overlay/tethered/tethered.d.ts +2 -1
  70. package/dist/overlay/tethered/tethered.d.ts.map +1 -1
  71. package/dist/overlay/tethered/tethered.js +71 -38
  72. package/dist/overlay/tethered/tethered.js.map +1 -1
  73. package/dist/stacks/box/box.js +29 -27
  74. package/dist/stacks/box/box.js.map +1 -1
  75. package/dist/stacks/h_collapsible_box.js +14 -12
  76. package/dist/stacks/h_collapsible_box.js.map +1 -1
  77. package/dist/stacks/v_collapsible_box.js +8 -6
  78. package/dist/stacks/v_collapsible_box.js.map +1 -1
  79. package/dist/surfaces/pop_confirm/pop_confirm.d.ts.map +1 -1
  80. package/dist/surfaces/pop_confirm/pop_confirm.js +14 -13
  81. package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
  82. package/dist/surfaces/tooltip/tooltip.d.ts.map +1 -1
  83. package/dist/surfaces/tooltip/tooltip.js +12 -11
  84. package/dist/surfaces/tooltip/tooltip.js.map +1 -1
  85. package/dist/tethered.css +1 -1
  86. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  87. package/dist/themes/themes/ergo/ergo_theme.js +82 -56
  88. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  89. package/dist/themes/themes/windows_98/windows_98.css +1 -1
  90. package/dist/themes/themes/windows_98/windows_98_theme.js +18 -18
  91. package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
  92. package/dist/utils/dnd/draggable/draggable.js +13 -12
  93. package/dist/utils/dnd/draggable/draggable.js.map +1 -1
  94. package/dist/utils/index.d.ts +2 -0
  95. package/dist/utils/index.d.ts.map +1 -1
  96. package/dist/utils/index.js +23 -19
  97. package/dist/utils/index.js.map +1 -1
  98. package/package.json +11 -11
  99. package/src/inputs/phone_number_input/phone_number_input.stories.tsx +24 -0
  100. package/src/inputs/phone_number_input/phone_number_input.tsx +8 -6
  101. package/src/navigation/tabs/state/link/use_tab_link.ts +4 -4
  102. package/src/overlay/{carrot/carrot.stories.tsx → caret/caret.stories.tsx} +14 -14
  103. package/src/overlay/caret/caret.tsx +24 -0
  104. package/src/overlay/tethered/__stories__/shared/base_story_config.ts +8 -0
  105. package/src/overlay/tethered/hooks/calculate_origin.ts +74 -0
  106. package/src/overlay/tethered/hooks/useCaretRefDimensions.ts +22 -0
  107. package/src/overlay/tethered/hooks/useTether.ts +4 -3
  108. package/src/overlay/tethered/hooks/useTetherContentRect.ts +49 -0
  109. package/src/overlay/tethered/hooks/useTetherOrigin.ts +49 -0
  110. package/src/overlay/tethered/tethered.module.css +55 -0
  111. package/src/overlay/tethered/tethered.tsx +44 -6
  112. package/src/surfaces/panel/__stories__/panel.stories.tsx +62 -27
  113. package/src/surfaces/panel/__stories__/panel_stories.module.css +14 -1
  114. package/src/surfaces/pop_confirm/pop_confirm.tsx +4 -3
  115. package/src/surfaces/tooltip/tooltip.tsx +1 -0
  116. package/src/themes/themes/ergo/ergo_theme.css +82 -56
  117. package/src/themes/themes/windows_98/windows_98.css +18 -18
  118. package/src/utils/index.ts +3 -0
  119. package/dist/overlay/carrot/base_carrot.d.ts +0 -8
  120. package/dist/overlay/carrot/base_carrot.d.ts.map +0 -1
  121. package/dist/overlay/carrot/base_carrot.js +0 -21
  122. package/dist/overlay/carrot/base_carrot.js.map +0 -1
  123. package/src/overlay/carrot/base_carrot.tsx +0 -24
@@ -1,10 +1,13 @@
1
+ import { clsx } from 'clsx';
1
2
  import { forwardRef, type PropsWithChildren } from 'react';
2
- import type { HorizontalTether, VerticalTether } from './types.js';
3
3
  import { ZStack, type ZStackProps } from '../../stacks/index.js';
4
4
  import { useForkRef, type Rectangle } from '../../utils/index.js';
5
- import { useTether } from './hooks/useTether.js';
6
- import { clsx } from 'clsx';
5
+ import { Caret } from '../caret/caret.js';
7
6
  import { Portal } from '../portal/portal.js';
7
+ import { useCaretRefDimensions } from './hooks/useCaretRefDimensions.js';
8
+ import { useTether } from './hooks/useTether.js';
9
+ import { useTetherOrigin } from './hooks/useTetherOrigin.js';
10
+ import type { HorizontalTether, VerticalTether } from './types.js';
8
11
 
9
12
  // Styles
10
13
  import styles from './tethered.module.css';
@@ -20,6 +23,7 @@ export interface BaseTetheredOwnProps {
20
23
 
21
24
  export interface TetheredOwnProp extends BaseTetheredOwnProps {
22
25
  anchor: Rectangle | null;
26
+ precision?: 'high' | 'low';
23
27
  }
24
28
  export interface TetheredProps extends TetheredOwnProp, ZStackProps {}
25
29
 
@@ -33,6 +37,7 @@ export const Tethered = forwardRef<HTMLElement, PropsWithChildren<TetheredProps>
33
37
  horizontalOrigin = 'start',
34
38
  verticalOffset = 0,
35
39
  horizontalOffset = 0,
40
+ precision = 'low',
36
41
  children,
37
42
  style,
38
43
  className,
@@ -49,22 +54,55 @@ export const Tethered = forwardRef<HTMLElement, PropsWithChildren<TetheredProps>
49
54
  verticalOffset,
50
55
  horizontalOffset,
51
56
  });
52
- const forkedRef = useForkRef(ref, tetherRef);
57
+
58
+ // Convert position from { top, left } to Position type { x, y }
59
+ const tetherPosition = { x: position.left, y: position.top };
60
+
61
+ const { originPosition, originOffset, containerRef, originDirection } =
62
+ useTetherOrigin(tetherPosition, horizontalOrigin, verticalOrigin, precision);
63
+
64
+ const { caretElementRef: setCaretElement, caretSize } = useCaretRefDimensions(
65
+ precision,
66
+ originDirection
67
+ );
68
+
69
+ const forkedRef = useForkRef(ref, tetherRef, containerRef);
53
70
 
54
71
  const cssVariables = {
55
72
  '--tethered-top': `${position.top}px`,
56
73
  '--tethered-left': `${position.left}px`,
74
+ '--tethered-origin-y': `${originPosition.y}px`,
75
+ '--tethered-origin-x': `${originPosition.x}px`,
76
+ '--tethered-origin-delta-y': `${originOffset.yOffset}px`,
77
+ '--tethered-origin-delta-x': `${originOffset.xOffset}px`,
78
+ '--origin-indicator-dimensions-width': `${caretSize.width}px`,
79
+ '--origin-indicator-dimensions-height': `${caretSize.height}px`,
57
80
  };
58
81
 
59
82
  return (
60
83
  <Portal>
61
84
  <ZStack
62
85
  ref={forkedRef}
63
- className={clsx(styles.tethered, className)}
64
- style={{ position: 'absolute', ...cssVariables, ...style }}
86
+ className={clsx(styles.tethered, 'tcn-tethered', className)}
87
+ style={{ ...cssVariables, ...style }}
88
+ data-v-anchor={verticalAnchor}
89
+ data-h-anchor={horizontalAnchor}
90
+ data-v-origin={verticalOrigin}
91
+ data-h-origin={horizontalOrigin}
92
+ data-anchor-direction={originDirection}
65
93
  {...rest}
66
94
  >
67
95
  {children}
96
+ {precision === 'high' && originDirection !== 'none' && (
97
+ <Caret
98
+ ref={setCaretElement}
99
+ direction={originDirection}
100
+ className={clsx(
101
+ styles['origin-indicator'],
102
+ 'tcn-tethered-origin-indicator'
103
+ )}
104
+ />
105
+ )}
68
106
  </ZStack>
69
107
  </Portal>
70
108
  );
@@ -1,17 +1,14 @@
1
- import { BugIcon } from '@tcn/icons/bug_icon.js';
2
- import { CrossIcon } from '@tcn/icons/cross_icon.js';
3
1
  import { GridOneIcon } from '@tcn/icons/grid_one_icon.js';
4
2
  import { Button } from '../../../actions/button/button/button.js';
5
3
  import { Footer } from '../../../layouts/footer/footer.js';
6
4
  import { Header } from '../../../layouts/header/header.js';
7
- import { Divider, VBody } from '../../../layouts/index.js';
5
+ import { Heading, Section, VBody } from '../../../layouts/index.js';
8
6
  import { UtilityBar } from '../../../layouts/utility_bar/utility_bar.js';
9
7
  import { Box, Spacer } from '../../../stacks/index.js';
10
8
  import { Title } from '../../../typography/title/title.js';
11
9
  import { VPanel } from '../v_panel.js';
12
10
  // Styles
13
11
  import styles from './panel_stories.module.css';
14
- import { SlimButton } from '../../../actions/index.js';
15
12
 
16
13
  export default {
17
14
  title: 'Surfaces/Panel',
@@ -19,6 +16,48 @@ export default {
19
16
  tags: ['autodocs'],
20
17
  };
21
18
 
19
+ const Ipsum = () => {
20
+ return (
21
+ <Box className={styles['content-container']}>
22
+ <Box className={styles['content']} />
23
+ </Box>
24
+ );
25
+ };
26
+
27
+ const SectionMockData: React.FC<{
28
+ depth: number;
29
+ count: number;
30
+ children?: React.ReactNode;
31
+ }> = ({ depth = 0, count = 0, children }) => {
32
+ return (
33
+ <Section>
34
+ <Heading>
35
+ Section: {depth} - {count}
36
+ <Spacer />
37
+ <UtilGroupExample />
38
+ </Heading>
39
+ <Ipsum />
40
+ {children}
41
+ </Section>
42
+ );
43
+ };
44
+
45
+ const UtilGroupExample = () => {
46
+ return (
47
+ <>
48
+ <Button utility hierarchy="tertiary">
49
+ <GridOneIcon />
50
+ </Button>
51
+ <Button utility hierarchy="secondary">
52
+ <GridOneIcon />
53
+ </Button>
54
+ <Button utility hierarchy="primary">
55
+ <GridOneIcon />
56
+ </Button>
57
+ </>
58
+ );
59
+ };
60
+
22
61
  export const Default = () => {
23
62
  return (
24
63
  <div className={styles['stories-container']}>
@@ -26,36 +65,32 @@ export const Default = () => {
26
65
  <Header>
27
66
  <Title emphasis="strong">Panel Primary Header</Title>
28
67
  <Spacer />
29
- <SlimButton hierarchy="tertiary">
30
- <GridOneIcon />
31
- </SlimButton>
32
- <Divider length="md" vertical />
33
- <SlimButton hierarchy="tertiary">
34
- <CrossIcon />
35
- </SlimButton>
68
+ <UtilGroupExample />
36
69
  </Header>
37
70
  <UtilityBar>
38
71
  <Title>Utility Bar</Title>
39
72
  <Spacer />
40
- <SlimButton hierarchy="tertiary">
41
- <BugIcon />
42
- </SlimButton>
43
- <SlimButton hierarchy="tertiary">
44
- <BugIcon />
45
- </SlimButton>
46
- <SlimButton size="md" hierarchy="tertiary">
47
- <BugIcon />
48
- </SlimButton>
49
- <SlimButton hierarchy="tertiary">
50
- <BugIcon />
51
- </SlimButton>
73
+ <UtilGroupExample />
52
74
  </UtilityBar>
53
75
 
54
76
  <VBody>
55
- <Box className={styles['content-box']} />
56
- <Box className={styles['content-box']} />
57
- <Box className={styles['content-box']} />
58
- <Box className={styles['content-box']} />
77
+ <SectionMockData depth={1} count={1}>
78
+ <SectionMockData depth={2} count={1}>
79
+ <SectionMockData depth={3} count={1}>
80
+ <SectionMockData depth={4} count={1} />
81
+ </SectionMockData>
82
+ </SectionMockData>
83
+ </SectionMockData>
84
+ <SectionMockData depth={1} count={2}>
85
+ <SectionMockData depth={2} count={1}>
86
+ <SectionMockData depth={3} count={1}>
87
+ <SectionMockData depth={4} count={1} />
88
+ </SectionMockData>
89
+ </SectionMockData>
90
+ </SectionMockData>
91
+ <Ipsum />
92
+ <Ipsum />
93
+ <Ipsum />
59
94
  </VBody>
60
95
  <Footer>
61
96
  <Title>Footer</Title>
@@ -1,9 +1,22 @@
1
- .content-box {
1
+ .content-container {
2
2
  background: rgba(0, 128, 0, 0.5);
3
+ width: 100%;
4
+ height: auto;
5
+ min-height: auto;
6
+ }
7
+
8
+ .content {
9
+ background: rgba(0, 128, 0, 0.8);
3
10
  min-height: 200px;
4
11
  width: 100%;
5
12
  }
6
13
 
14
+ .content-2 {
15
+ background: rgba(185, 1, 142, 0.8);
16
+ min-height: 100px;
17
+ width: 100%;
18
+ }
19
+
7
20
  .stories-container {
8
21
  width: 100%;
9
22
  height: 100%;
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
1
  import { clsx } from 'clsx';
2
+ import React from 'react';
3
+ import { Scaffold } from '../../layouts/index.js';
4
+ import { PopperDismissal } from '../../overlay/popper/base/dismissal_decorator.js';
3
5
  import {
4
6
  ElementPopper,
5
7
  type ElementPopperProps,
6
8
  } from '../../overlay/popper/element_popper.js';
7
- import { Scaffold } from '../../layouts/index.js';
8
- import { PopperDismissal } from '../../overlay/popper/base/dismissal_decorator.js';
9
9
 
10
10
  export type PopConfirmProps = ElementPopperProps;
11
11
 
@@ -17,6 +17,7 @@ export const PopConfirm = React.forwardRef<HTMLDivElement, PopConfirmProps>(
17
17
  return (
18
18
  <ElementPopper
19
19
  ref={ref}
20
+ precision="high"
20
21
  className={clsx(className, 'tcn-pop-confirm')}
21
22
  dismissals={dismissals}
22
23
  {...props}
@@ -49,6 +49,7 @@ export const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(function T
49
49
  verticalOrigin={verticalOrigin}
50
50
  horizontalAnchor={horizontalAnchor}
51
51
  horizontalOrigin={horizontalOrigin}
52
+ precision="high"
52
53
  className={clsx(className, styles.tooltip, 'tcn-surface', 'tcn-tooltip')}
53
54
  {...props}
54
55
  >
@@ -14,12 +14,17 @@
14
14
  --ergo-secondary-light: #ecf4fb;
15
15
  --ergo-secondary-dark: #497485;
16
16
  --ergo-tertiary: #dfd7cd;
17
+ --ergo-tertiary-light: #f9f4ed;
18
+ --ergo-tertiary-dark: #7e6c5d;
17
19
  --ergo-white: #ffffff;
18
20
 
19
21
  --ergo-accent-blue: #395578;
22
+ --ergo-accent-blue-light: #f3f4f6;
20
23
  --ergo-accent-green: #97bba3;
24
+ --ergo-accent-green-light: #eef8ef;
25
+ --ergo-accent-green-dark: #4f785c;
21
26
  --ergo-accent-yellow: #dbc97e;
22
- --ergo-accent-green: #97bba3;
27
+ --ergo-accent-yellow-light: #fef9e7;
23
28
 
24
29
  --ergo-grey: #aaaaaa;
25
30
  --ergo-grey-light: #d3d3d3;
@@ -298,6 +303,24 @@
298
303
  &[data-hover] {
299
304
  transform: translateY(-1px);
300
305
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.12);
306
+
307
+ /* Increases the clickable area by 2px on hover to avoid click events not firing due to the button transform y - or slight mouse wiggles */
308
+ &::before,
309
+ &::after {
310
+ content: "";
311
+ position: absolute;
312
+ left: 0;
313
+ right: 0;
314
+ height: 4px;
315
+ }
316
+
317
+ &::before {
318
+ top: -2px;
319
+ }
320
+
321
+ &::after {
322
+ bottom: -2px;
323
+ }
301
324
  }
302
325
 
303
326
  &:active,
@@ -613,8 +636,12 @@
613
636
  }
614
637
 
615
638
  :where(.tcn-body) {
616
- padding: 0 var(--scaffold-v-inset);
639
+ --section-tab-start: var(--scaffold-v-inset);
640
+
617
641
  gap: var(--gap-medium);
642
+ .tcn-section {
643
+ --section-tab-start: var(--scaffold-v-inset);
644
+ }
618
645
  }
619
646
 
620
647
  :where(.tcn-footer) {
@@ -746,6 +773,20 @@
746
773
  }
747
774
 
748
775
  /* SECTION */
776
+ .tcn-section {
777
+ --max-section-depth: 4;
778
+ --section-tab-width: 4px;
779
+ --section-tab-start: 8px;
780
+ --section-tab-depth: 0;
781
+ --section-tab: calc(
782
+ var(--section-tab-start) +
783
+ (var(--section-tab-width) * var(--section-tab-depth))
784
+ );
785
+ --section-action: var(--ergo-secondary);
786
+ --section-mat: var(--ergo-secondary-light);
787
+ --section-on-mat: var(--ergo-ink-primary);
788
+ }
789
+
749
790
  .tcn-heading {
750
791
  background-color: #f1f1f1;
751
792
  padding-inline-start: 8px;
@@ -754,59 +795,44 @@
754
795
  }
755
796
 
756
797
  .tcn-section > .tcn-heading {
757
- background-color: #f2f4f6;
758
- padding-inline-start: 8px;
759
- color: rgb(51, 51, 51);
760
- z-index: 4;
761
- }
762
-
763
- .tcn-section > .tcn-section > .tcn-heading {
764
- background-color: #fff7f0;
765
- padding-inline-start: 12px;
766
- color: #395578;
767
- z-index: 3;
768
- }
769
-
770
- .tcn-section > .tcn-section > .tcn-section > .tcn-heading {
771
- background-color: #eef8ef;
772
- padding-inline-start: 16px;
773
- color: #395578;
774
- z-index: 2;
775
- }
776
-
777
- .tcn-section > .tcn-section > .tcn-section > .tcn-section .tcn-heading {
778
- background-color: #ecf4fb;
779
- padding-inline-start: 20px;
780
- color: #395578;
781
- z-index: 1;
798
+ z-index: calc(var(--max-section-depth) - var(--section-tab-depth));
799
+ padding-inline-start: var(--section-tab);
800
+ --material: var(--section-mat);
801
+ --on-material: var(--section-on-mat);
802
+ --action: var(--section-action);
803
+ background-color: var(--material);
804
+ color: var(--on-material);
805
+ gap: var(--gap-small);
782
806
  }
783
807
 
784
808
  .tcn-section > :not(.tcn-heading, .tcn-section) {
785
- padding-inline-start: 8px;
809
+ padding-inline-start: var(--section-tab);
786
810
  }
787
811
 
788
- .tcn-section > .tcn-section > :not(.tcn-heading, .tcn-section) {
789
- padding-inline-start: 12px;
812
+ .tcn-section > .tcn-section {
813
+ --section-tab-depth: 1;
814
+ --section-mat: var(--ergo-accent-blue-light);
815
+ --section-action: var(--ergo-accent-blue);
790
816
  }
791
817
 
792
- .tcn-section > .tcn-section > .tcn-section > :not(.tcn-heading, .tcn-section) {
793
- padding-inline-start: 16px;
818
+ .tcn-section > .tcn-section > .tcn-section {
819
+ --section-tab-depth: 2;
820
+ --section-mat: var(--ergo-accent-green-light);
821
+ --section-action: var(--ergo-accent-green-dark);
794
822
  }
795
823
 
796
- .tcn-section
797
- > .tcn-section
798
- > .tcn-section
799
- > .tcn-section
800
- > :not(.tcn-heading, .tcn-section) {
801
- padding-inline-start: 20px;
824
+ .tcn-section > .tcn-section > .tcn-section > .tcn-section {
825
+ --section-tab-depth: 3;
826
+ --section-mat: var(--ergo-tertiary-light);
827
+ --section-action: var(--ergo-tertiary-dark);
802
828
  }
803
829
 
804
- .tcn-base-carrot {
805
- --carrot-size: 12px;
806
- --carrot-triangle-height: calc(var(--carrot-size) / 2);
807
- --carrot-triangle-width: var(--carrot-size);
808
- --carrot-triangle-base: var(--carrot-triangle-height) solid transparent;
809
- --carrot-triangle-peak: var(--carrot-triangle-width) solid var(--material);
830
+ .tcn-caret {
831
+ --caret-size: 12px;
832
+ --caret-triangle-height: calc(var(--caret-size) / 2);
833
+ --caret-triangle-width: var(--caret-size);
834
+ --caret-triangle-base: var(--caret-triangle-height) solid transparent;
835
+ --caret-triangle-peak: var(--caret-triangle-width) solid var(--material);
810
836
 
811
837
  width: 0;
812
838
  height: 0;
@@ -814,27 +840,27 @@
814
840
  display: inline-block;
815
841
 
816
842
  &[data-direction="top"] {
817
- border-bottom: var(--carrot-triangle-peak);
818
- border-left: var(--carrot-triangle-base);
819
- border-right: var(--carrot-triangle-base);
843
+ border-bottom: var(--caret-triangle-peak);
844
+ border-left: var(--caret-triangle-base);
845
+ border-right: var(--caret-triangle-base);
820
846
  }
821
847
 
822
848
  &[data-direction="bottom"] {
823
- border-top: var(--carrot-triangle-peak);
824
- border-left: var(--carrot-triangle-base);
825
- border-right: var(--carrot-triangle-base);
849
+ border-top: var(--caret-triangle-peak);
850
+ border-left: var(--caret-triangle-base);
851
+ border-right: var(--caret-triangle-base);
826
852
  }
827
853
 
828
854
  &[data-direction="start"] {
829
- border-right: var(--carrot-triangle-peak);
830
- border-top: var(--carrot-triangle-base);
831
- border-bottom: var(--carrot-triangle-base);
855
+ border-right: var(--caret-triangle-peak);
856
+ border-top: var(--caret-triangle-base);
857
+ border-bottom: var(--caret-triangle-base);
832
858
  }
833
859
 
834
860
  &[data-direction="end"] {
835
- border-left: var(--carrot-triangle-peak);
836
- border-top: var(--carrot-triangle-base);
837
- border-bottom: var(--carrot-triangle-base);
861
+ border-left: var(--caret-triangle-peak);
862
+ border-top: var(--caret-triangle-base);
863
+ border-bottom: var(--caret-triangle-base);
838
864
  }
839
865
  }
840
866
  }
@@ -1107,12 +1107,12 @@
1107
1107
  gap: 4px;
1108
1108
  }
1109
1109
 
1110
- .tcn-base-carrot {
1111
- --carrot-size: 12px;
1112
- --carrot-triangle-height: calc(var(--carrot-size) / 2);
1113
- --carrot-triangle-width: var(--carrot-size);
1114
- --carrot-triangle-base: var(--carrot-triangle-height) solid transparent;
1115
- --carrot-triangle-peak: var(--carrot-triangle-width) solid #000;
1110
+ .tcn-caret {
1111
+ --caret-size: 12px;
1112
+ --caret-triangle-height: calc(var(--caret-size) / 2);
1113
+ --caret-triangle-width: var(--caret-size);
1114
+ --caret-triangle-base: var(--caret-triangle-height) solid transparent;
1115
+ --caret-triangle-peak: var(--caret-triangle-width) solid #000;
1116
1116
 
1117
1117
  width: 0;
1118
1118
  height: 0;
@@ -1120,27 +1120,27 @@
1120
1120
  display: inline-block;
1121
1121
 
1122
1122
  &[data-direction="top"] {
1123
- border-bottom: var(--carrot-triangle-peak);
1124
- border-left: var(--carrot-triangle-base);
1125
- border-right: var(--carrot-triangle-base);
1123
+ border-bottom: var(--caret-triangle-peak);
1124
+ border-left: var(--caret-triangle-base);
1125
+ border-right: var(--caret-triangle-base);
1126
1126
  }
1127
1127
 
1128
1128
  &[data-direction="bottom"] {
1129
- border-top: var(--carrot-triangle-peak);
1130
- border-left: var(--carrot-triangle-base);
1131
- border-right: var(--carrot-triangle-base);
1129
+ border-top: var(--caret-triangle-peak);
1130
+ border-left: var(--caret-triangle-base);
1131
+ border-right: var(--caret-triangle-base);
1132
1132
  }
1133
1133
 
1134
1134
  &[data-direction="start"] {
1135
- border-right: var(--carrot-triangle-peak);
1136
- border-top: var(--carrot-triangle-base);
1137
- border-bottom: var(--carrot-triangle-base);
1135
+ border-right: var(--caret-triangle-peak);
1136
+ border-top: var(--caret-triangle-base);
1137
+ border-bottom: var(--caret-triangle-base);
1138
1138
  }
1139
1139
 
1140
1140
  &[data-direction="end"] {
1141
- border-left: var(--carrot-triangle-peak);
1142
- border-top: var(--carrot-triangle-base);
1143
- border-bottom: var(--carrot-triangle-base);
1141
+ border-left: var(--caret-triangle-peak);
1142
+ border-top: var(--caret-triangle-base);
1143
+ border-bottom: var(--caret-triangle-base);
1144
1144
  }
1145
1145
  }
1146
1146
  }
@@ -20,3 +20,6 @@ export * from './types/dimensions.js';
20
20
  export * from './types/variations.js';
21
21
 
22
22
  export * from './responsive/responsive_renderer.js';
23
+
24
+ export * from './dnd/draggable/draggable.js';
25
+ export * from './dnd/handle.js';
@@ -1,8 +0,0 @@
1
- import { BoxProps } from '../../stacks/box/box.js';
2
- export interface BaseCarrotOwnProps {
3
- direction: 'top' | 'bottom' | 'start' | 'end';
4
- }
5
- export interface BaseCarrotProps extends BaseCarrotOwnProps, BoxProps {
6
- }
7
- export declare const BaseCarrot: ({ direction, className, as, ...rest }: BaseCarrotProps) => import("react/jsx-runtime").JSX.Element;
8
- //# sourceMappingURL=base_carrot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base_carrot.d.ts","sourceRoot":"","sources":["../../../src/overlay/carrot/base_carrot.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;CAC/C;AAED,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,QAAQ;CAAG;AAExE,eAAO,MAAM,UAAU,GAAI,uCAKxB,eAAe,4CASjB,CAAC"}
@@ -1,21 +0,0 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import t from "clsx";
3
- import { Box as m } from "../../stacks/box/box.js";
4
- const i = ({
5
- direction: r,
6
- className: a,
7
- as: c = "span",
8
- ...o
9
- }) => /* @__PURE__ */ s(
10
- m,
11
- {
12
- as: "span",
13
- "data-direction": r,
14
- className: t("tcn-base-carrot", a),
15
- ...o
16
- }
17
- );
18
- export {
19
- i as BaseCarrot
20
- };
21
- //# sourceMappingURL=base_carrot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base_carrot.js","sources":["../../../src/overlay/carrot/base_carrot.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { Box, type BoxProps } from '../../stacks/box/box.js';\n\nexport interface BaseCarrotOwnProps {\n direction: 'top' | 'bottom' | 'start' | 'end';\n}\n\nexport interface BaseCarrotProps extends BaseCarrotOwnProps, BoxProps {}\n\nexport const BaseCarrot = ({\n direction,\n className,\n as = 'span',\n ...rest\n}: BaseCarrotProps) => {\n return (\n <Box\n as=\"span\"\n data-direction={direction}\n className={clsx('tcn-base-carrot', className)}\n {...rest}\n />\n );\n};\n"],"names":["BaseCarrot","direction","className","as","rest","jsx","Box","clsx"],"mappings":";;;AASO,MAAMA,IAAa,CAAC;AAAA,EACzB,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC,IAAK;AAAA,EACL,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,IAAG;AAAA,IACH,kBAAgBL;AAAA,IAChB,WAAWM,EAAK,mBAAmBL,CAAS;AAAA,IAC3C,GAAGE;AAAA,EAAA;AAAA;"}
@@ -1,24 +0,0 @@
1
- import clsx from 'clsx';
2
- import { Box, type BoxProps } from '../../stacks/box/box.js';
3
-
4
- export interface BaseCarrotOwnProps {
5
- direction: 'top' | 'bottom' | 'start' | 'end';
6
- }
7
-
8
- export interface BaseCarrotProps extends BaseCarrotOwnProps, BoxProps {}
9
-
10
- export const BaseCarrot = ({
11
- direction,
12
- className,
13
- as = 'span',
14
- ...rest
15
- }: BaseCarrotProps) => {
16
- return (
17
- <Box
18
- as="span"
19
- data-direction={direction}
20
- className={clsx('tcn-base-carrot', className)}
21
- {...rest}
22
- />
23
- );
24
- };