@tcn/ui 0.14.0 → 0.16.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.
- package/dist/column.css +1 -1
- package/dist/inputs/multiselect/multiselect_inline_values.js +9 -7
- package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +4 -2
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
- package/dist/layouts/containers/columns/column.d.ts +6 -0
- package/dist/layouts/containers/columns/column.d.ts.map +1 -0
- package/dist/layouts/containers/columns/column.js +20 -0
- package/dist/layouts/containers/columns/column.js.map +1 -0
- package/dist/layouts/containers/columns/columns.d.ts +6 -0
- package/dist/layouts/containers/columns/columns.d.ts.map +1 -0
- package/dist/layouts/containers/columns/columns.js +11 -0
- package/dist/layouts/containers/columns/columns.js.map +1 -0
- package/dist/layouts/index.d.ts +3 -5
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +27 -27
- package/dist/layouts/section/detail.d.ts +4 -0
- package/dist/layouts/section/detail.d.ts.map +1 -0
- package/dist/layouts/section/detail.js +11 -0
- package/dist/layouts/section/detail.js.map +1 -0
- package/dist/layouts/section/heading.js +1 -1
- package/dist/layouts/section/index.d.ts +4 -0
- package/dist/layouts/section/index.d.ts.map +1 -0
- package/dist/layouts/section/index.js +9 -0
- package/dist/layouts/section/index.js.map +1 -0
- package/dist/layouts/section/section.js +1 -1
- package/dist/section.css +1 -1
- package/dist/section.module-BXlxYmJK.js +5 -0
- package/dist/section.module-BXlxYmJK.js.map +1 -0
- package/dist/surfaces/pop_confirm/pop_confirm.js +4 -4
- package/dist/term.css +1 -0
- package/dist/themes/build_stylesheet.d.ts +2 -0
- package/dist/themes/build_stylesheet.d.ts.map +1 -0
- package/dist/themes/build_stylesheet.js +9 -0
- package/dist/themes/build_stylesheet.js.map +1 -0
- package/dist/themes/theme_variables.d.ts +7 -0
- package/dist/themes/theme_variables.d.ts.map +1 -1
- package/dist/themes/theme_variables.js +16 -9
- package/dist/themes/theme_variables.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/themes/themes/ergo/ergo_theme.d.ts.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.js +281 -161
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/themes/themes/ergo/tokens/system_tokens.css +1 -0
- package/dist/themes/themes/ergo/tokens/theme_tokens.css +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +4 -2
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/key/key.d.ts +8 -1
- package/dist/tokens/key/key.d.ts.map +1 -1
- package/dist/tokens/key/key.js +20 -3
- package/dist/tokens/key/key.js.map +1 -1
- package/dist/tokens/term/term.d.ts +4 -0
- package/dist/tokens/term/term.d.ts.map +1 -0
- package/dist/tokens/term/term.js +20 -0
- package/dist/tokens/term/term.js.map +1 -0
- package/dist/tokens/value/value.d.ts +8 -1
- package/dist/tokens/value/value.d.ts.map +1 -1
- package/dist/tokens/value/value.js +23 -5
- package/dist/tokens/value/value.js.map +1 -1
- package/dist/utils/types/variations.d.ts +1 -0
- package/dist/utils/types/variations.d.ts.map +1 -1
- package/dist/value.css +1 -0
- package/dist/value.module-DFaCouFD.js +5 -0
- package/dist/value.module-DFaCouFD.js.map +1 -0
- package/package.json +1 -1
- package/src/layouts/__stories__/columns.stories.tsx +46 -0
- package/src/layouts/__stories__/rail.stories.tsx +4 -4
- package/src/layouts/__stories__/utils.tsx +4 -4
- package/src/layouts/containers/columns/column.module.css +14 -0
- package/src/layouts/containers/columns/column.tsx +22 -0
- package/src/layouts/containers/columns/columns.tsx +16 -0
- package/src/layouts/index.ts +3 -5
- package/src/layouts/section/__stories__/section.stories.tsx +79 -50
- package/src/layouts/section/detail.tsx +14 -0
- package/src/layouts/section/index.ts +3 -0
- package/src/layouts/section/section.module.css +0 -36
- package/src/surfaces/page/page.stories.tsx +32 -28
- package/src/surfaces/panel/__stories__/panel.stories.tsx +147 -40
- package/src/themes/build_stylesheet.ts +5 -0
- package/src/themes/theme_variables.ts +9 -0
- package/src/themes/themes/ergo/ergo_theme.css +175 -222
- package/src/themes/themes/ergo/ergo_theme.ts +4 -2
- package/src/themes/themes/ergo/tokens/system_tokens.css +68 -0
- package/src/themes/themes/ergo/tokens/theme_tokens.css +99 -0
- package/src/tokens/index.ts +1 -0
- package/src/tokens/key/key.tsx +23 -2
- package/src/tokens/term/term.module.css +14 -0
- package/src/tokens/term/term.stories.tsx +84 -0
- package/src/tokens/term/term.tsx +20 -0
- package/src/tokens/value/value.module.css +5 -0
- package/src/tokens/value/value.tsx +24 -2
- package/src/utils/types/variations.ts +1 -0
- package/dist/layouts/column/column.d.ts +0 -10
- package/dist/layouts/column/column.d.ts.map +0 -1
- package/dist/layouts/column/column.js +0 -52
- package/dist/layouts/column/column.js.map +0 -1
- package/dist/layouts/containers/side/side.d.ts +0 -6
- package/dist/layouts/containers/side/side.d.ts.map +0 -1
- package/dist/layouts/containers/side/side.js +0 -22
- package/dist/layouts/containers/side/side.js.map +0 -1
- package/dist/layouts/row/row.d.ts +0 -4
- package/dist/layouts/row/row.d.ts.map +0 -1
- package/dist/layouts/row/row.js +0 -11
- package/dist/layouts/row/row.js.map +0 -1
- package/dist/row.css +0 -1
- package/dist/section.module-0wyGkhDg.js +0 -5
- package/dist/section.module-0wyGkhDg.js.map +0 -1
- package/dist/side.css +0 -1
- package/src/layouts/column/column.module.css +0 -35
- package/src/layouts/column/column.tsx +0 -57
- package/src/layouts/containers/side/side.module.css +0 -7
- package/src/layouts/containers/side/side.tsx +0 -25
- package/src/layouts/row/row.module.css +0 -5
- package/src/layouts/row/row.tsx +0 -15
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { buildStyleSheet } from '../../build_stylesheet';
|
|
2
|
+
import tokensCss from './tokens/theme_tokens.css?raw';
|
|
3
|
+
import systemTokensCss from './tokens/system_tokens.css?raw';
|
|
1
4
|
import css from './ergo_theme.css?raw';
|
|
2
5
|
import '@fontsource/lato';
|
|
3
6
|
|
|
4
|
-
export const ergoStyleSheet =
|
|
5
|
-
ergoStyleSheet.replaceSync(css);
|
|
7
|
+
export const ergoStyleSheet = buildStyleSheet([tokensCss, systemTokensCss, css]);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@layer tcn-theme {
|
|
2
|
+
:root {
|
|
3
|
+
/* ========== Blackcat System Tokens ========== */
|
|
4
|
+
--scalar: 1;
|
|
5
|
+
--accent-color: var(--ergo-primary);
|
|
6
|
+
|
|
7
|
+
/* Typography */
|
|
8
|
+
--font-color: var(--ergo-text-color-primary);
|
|
9
|
+
--font-family: "Lato", sans-serif;
|
|
10
|
+
--font-size: var(--ergo-text-size-default);
|
|
11
|
+
|
|
12
|
+
/* Spacing */
|
|
13
|
+
--gap-small: var(--ergo-spacing-sm);
|
|
14
|
+
--gap-medium: var(--ergo-spacing-md);
|
|
15
|
+
--gap-large: var(--ergo-spacing-lg);
|
|
16
|
+
|
|
17
|
+
--padding-small: var(--ergo-spacing-sm);
|
|
18
|
+
--padding-medium: var(--ergo-spacing-md);
|
|
19
|
+
--padding-large: var(--ergo-spacing-lg);
|
|
20
|
+
|
|
21
|
+
/* Status Colors */
|
|
22
|
+
--status-color-disabled: var(--ergo-grey-light);
|
|
23
|
+
--status-color-info: var(--ergo-status-blue);
|
|
24
|
+
--status-color-warning: var(--ergo-status-yellow);
|
|
25
|
+
--status-color-positive: var(--ergo-status-green);
|
|
26
|
+
--status-color-error: var(--ergo-status-red);
|
|
27
|
+
|
|
28
|
+
--async-color-initial: var(--ergo-grey);
|
|
29
|
+
--async-color-pending: var(--ergo-status-blue);
|
|
30
|
+
--async-color-success: var(--ergo-status-green);
|
|
31
|
+
--async-color-failed: var(--ergo-status-red);
|
|
32
|
+
|
|
33
|
+
/* Action Severity */
|
|
34
|
+
--action-severity-dangerous: var(--ergo-status-red);
|
|
35
|
+
--action-severity-cautious: var(--ergo-status-yellow);
|
|
36
|
+
--action-severity-neutral: var(--ergo-primary);
|
|
37
|
+
--action-severity-suggested: var(--ergo-status-blue);
|
|
38
|
+
--action-severity-encouraged: var(--ergo-status-green);
|
|
39
|
+
|
|
40
|
+
/* Palette */
|
|
41
|
+
--primary-color-faint: var(--ergo-grey-light);
|
|
42
|
+
--primary-color: var(--ergo-primary);
|
|
43
|
+
--primary-color-strong: var(--ergo-primary-dark);
|
|
44
|
+
|
|
45
|
+
--secondary-color-faint: var(--ergo-secondary-light);
|
|
46
|
+
--secondary-color: var(--ergo-secondary);
|
|
47
|
+
--secondary-color-strong: var(--ergo-secondary-dark);
|
|
48
|
+
|
|
49
|
+
--tertiary-color-faint: var(--ergo-tertiary-light);
|
|
50
|
+
--tertiary-color: var(--ergo-tertiary);
|
|
51
|
+
--tertiary-color-strong: var(--ergo-tertiary-dark);
|
|
52
|
+
|
|
53
|
+
--quaternary-color-faint: var(--ergo-accent-blue-light);
|
|
54
|
+
--quaternary-color: var(--ergo-accent-blue);
|
|
55
|
+
--quaternary-color-strong: var(--ergo-accent-blue-dark);
|
|
56
|
+
|
|
57
|
+
--background-color-primary: var(--ergo-material-bg-primary);
|
|
58
|
+
--background-color-secondary: var(--ergo-material-bg-secondary);
|
|
59
|
+
--background-color-tertiary: var(--ergo-material-bg-tertiary);
|
|
60
|
+
--background-color-quaternary: var(--ergo-material-bg-quaternary);
|
|
61
|
+
|
|
62
|
+
/* Not sure what other text colors are needed */
|
|
63
|
+
--foreground-color-primary: var(--ergo-text-color-primary);
|
|
64
|
+
--foreground-color-secondary: var(--ergo-text-color-primary);
|
|
65
|
+
--foreground-color-tertiary: var(--ergo-text-color-primary);
|
|
66
|
+
--foreground-color-quaternary: var(--ergo-text-color-primary);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@layer tcn-theme {
|
|
2
|
+
:root {
|
|
3
|
+
/* ========== Ergo Palette ========== */
|
|
4
|
+
--ergo-white: #ffffff;
|
|
5
|
+
|
|
6
|
+
--ergo-primary: #ce6b2b;
|
|
7
|
+
--ergo-primary-light: #fff7f0;
|
|
8
|
+
--ergo-primary-dark: #b86128;
|
|
9
|
+
|
|
10
|
+
--ergo-secondary: #669eb4;
|
|
11
|
+
--ergo-secondary-light: #ecf4fb;
|
|
12
|
+
--ergo-secondary-dark: #497485;
|
|
13
|
+
|
|
14
|
+
--ergo-tertiary: #dfd7cd;
|
|
15
|
+
--ergo-tertiary-light: #f9f4ed;
|
|
16
|
+
--ergo-tertiary-dark: #7e6c5d;
|
|
17
|
+
|
|
18
|
+
--ergo-accent-blue: #395578;
|
|
19
|
+
--ergo-accent-blue-light: #f3f4f6;
|
|
20
|
+
--ergo-accent-blue-dark: #627083;
|
|
21
|
+
|
|
22
|
+
--ergo-accent-green: #97bba3;
|
|
23
|
+
--ergo-accent-green-light: #eef8ef;
|
|
24
|
+
--ergo-accent-green-dark: #4f785c;
|
|
25
|
+
|
|
26
|
+
--ergo-accent-yellow: #dbc97e;
|
|
27
|
+
--ergo-accent-yellow-light: #fef9e7;
|
|
28
|
+
--ergo-accent-yellow-dark: #82722b;
|
|
29
|
+
|
|
30
|
+
--ergo-grey: #aaaaaa;
|
|
31
|
+
--ergo-grey-light: #d3d3d3;
|
|
32
|
+
--ergo-grey-dark: #808080;
|
|
33
|
+
|
|
34
|
+
--ergo-status-red: #ff6565;
|
|
35
|
+
--ergo-status-red-dark: #c24848;
|
|
36
|
+
--ergo-status-red-light: #fff4f4;
|
|
37
|
+
|
|
38
|
+
--ergo-status-yellow: #ffd439;
|
|
39
|
+
--ergo-status-yellow-dark: #dbb735;
|
|
40
|
+
--ergo-status-yellow-light: #ffeca9;
|
|
41
|
+
|
|
42
|
+
--ergo-status-blue: var(--ergo-secondary);
|
|
43
|
+
--ergo-status-blue-dark: var(--ergo-secondary-dark);
|
|
44
|
+
--ergo-status-blue-light: var(--ergo-secondary-light);
|
|
45
|
+
|
|
46
|
+
--ergo-status-green: #3fbc6a;
|
|
47
|
+
--ergo-status-green-dark: #2d904f;
|
|
48
|
+
--ergo-status-green-light: #87e8a8;
|
|
49
|
+
|
|
50
|
+
--ergo-material-bg-primary: #ffffff;
|
|
51
|
+
--ergo-material-bg-secondary: #fafafa;
|
|
52
|
+
--ergo-material-bg-tertiary: #f1f1f1;
|
|
53
|
+
--ergo-material-bg-quaternary: #ffffff;
|
|
54
|
+
|
|
55
|
+
--ergo-material-overlay: var(--ergo-secondary-dark);
|
|
56
|
+
--ergo-material-border: var(--ergo-grey);
|
|
57
|
+
--ergo-material-divider: var(--ergo-grey);
|
|
58
|
+
--ergo-material-disabled-outline: var(--ergo-grey-light);
|
|
59
|
+
--ergo-material-disabled-fill: var(--ergo-grey);
|
|
60
|
+
|
|
61
|
+
/* ========== Ergo Text ========== */
|
|
62
|
+
--ergo-text-size-input: 12px;
|
|
63
|
+
--ergo-text-size-default: 12px;
|
|
64
|
+
--ergo-text-color-primary: var(--ergo-accent-blue);
|
|
65
|
+
--ergo-text-color-inverse: var(--ergo-white);
|
|
66
|
+
--ergo-text-color-disabled-outline: var(--ergo-grey);
|
|
67
|
+
--ergo-text-color-disabled-fill: var(--ergo-white);
|
|
68
|
+
|
|
69
|
+
/* ========== Spacing ========== */
|
|
70
|
+
--ergo-spacing-xs: 2px;
|
|
71
|
+
--ergo-spacing-sm: 4px;
|
|
72
|
+
--ergo-spacing-md: 8px;
|
|
73
|
+
--ergo-spacing-lg: 16px;
|
|
74
|
+
--ergo-spacing-xl: 32px;
|
|
75
|
+
|
|
76
|
+
/* ========== Sizing ========== */
|
|
77
|
+
--ergo-sizing-bar-xs: 16px;
|
|
78
|
+
--ergo-sizing-bar-sm: 24px;
|
|
79
|
+
--ergo-sizing-bar-md: 32px;
|
|
80
|
+
--ergo-sizing-bar-lg: 40px;
|
|
81
|
+
--ergo-sizing-bar-xl: 48px;
|
|
82
|
+
|
|
83
|
+
--ergo-sizing-action-sm: 20px;
|
|
84
|
+
--ergo-sizing-action-md: 24px;
|
|
85
|
+
--ergo-sizing-action-lg: 32px;
|
|
86
|
+
|
|
87
|
+
/* ========== Shape ========== */
|
|
88
|
+
--ergo-shape-radius-small: 2px;
|
|
89
|
+
--ergo-shape-radius-medium: 4px;
|
|
90
|
+
--ergo-shape-radius-large: 8px;
|
|
91
|
+
--ergo-shape-triangle-medium: 12px;
|
|
92
|
+
|
|
93
|
+
/* Default Material - TODO: move to system once blackcat support material */
|
|
94
|
+
--action: var(--ergo-primary);
|
|
95
|
+
--on-action: var(--ergo-white);
|
|
96
|
+
--material: var(--ergo-white);
|
|
97
|
+
--on-material: var(--ergo-accent-blue);
|
|
98
|
+
}
|
|
99
|
+
}
|
package/src/tokens/index.ts
CHANGED
package/src/tokens/key/key.tsx
CHANGED
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import { HStack, HStackProps } from '../../stacks/h_stack.js';
|
|
3
|
+
import type { Emphasis, Severity } from '../../utils/index.js';
|
|
3
4
|
|
|
4
|
-
export
|
|
5
|
+
export interface KeyOwnProps {
|
|
6
|
+
emphasis?: Emphasis;
|
|
7
|
+
severity?: Severity;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface KeyProps extends HStackProps, KeyOwnProps {}
|
|
11
|
+
|
|
12
|
+
export const Key = ({
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
hAlign = 'start',
|
|
16
|
+
emphasis = 'normal',
|
|
17
|
+
severity = 'neutral',
|
|
18
|
+
...props
|
|
19
|
+
}: KeyProps) => {
|
|
5
20
|
return (
|
|
6
|
-
<HStack
|
|
21
|
+
<HStack
|
|
22
|
+
data-emphasis={emphasis}
|
|
23
|
+
data-severity={severity}
|
|
24
|
+
className={clsx(className, 'tcn-datum', 'tcn-key')}
|
|
25
|
+
hAlign={hAlign}
|
|
26
|
+
{...props}
|
|
27
|
+
>
|
|
7
28
|
{children}
|
|
8
29
|
</HStack>
|
|
9
30
|
);
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Term } from './term.js';
|
|
2
|
+
import { Key } from '../key/key.js';
|
|
3
|
+
import { Value } from '../value/value.js';
|
|
4
|
+
import { Chip } from '../chip/chip.js';
|
|
5
|
+
import { VStack } from '../../stacks/v_stack.js';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Tokens/Term',
|
|
9
|
+
component: Term,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const Default = () => (
|
|
14
|
+
<Term maxWidth="300px">
|
|
15
|
+
<Key>Status:</Key>
|
|
16
|
+
<Value>Active</Value>
|
|
17
|
+
</Term>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const WithChipValue = () => (
|
|
21
|
+
<Term maxWidth="300px">
|
|
22
|
+
<Key>Category:</Key>
|
|
23
|
+
<Value>
|
|
24
|
+
<Chip>Engineering</Chip>
|
|
25
|
+
</Value>
|
|
26
|
+
</Term>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const WithLongText = () => (
|
|
30
|
+
<Term maxWidth="300px">
|
|
31
|
+
<Key>Description:</Key>
|
|
32
|
+
<Value>This is a long value that will wrap across multiple lines</Value>
|
|
33
|
+
</Term>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export const Severity = () => (
|
|
37
|
+
<VStack maxWidth="300px">
|
|
38
|
+
<Term>
|
|
39
|
+
<Key>Neutral:</Key>
|
|
40
|
+
<Value severity="neutral">Default</Value>
|
|
41
|
+
</Term>
|
|
42
|
+
<Term>
|
|
43
|
+
<Key>Dangerous:</Key>
|
|
44
|
+
<Value severity="dangerous">Deleted</Value>
|
|
45
|
+
</Term>
|
|
46
|
+
<Term>
|
|
47
|
+
<Key>Cautious:</Key>
|
|
48
|
+
<Value severity="cautious">Pending Review</Value>
|
|
49
|
+
</Term>
|
|
50
|
+
<Term>
|
|
51
|
+
<Key>Suggested:</Key>
|
|
52
|
+
<Value severity="suggested">Recommended</Value>
|
|
53
|
+
</Term>
|
|
54
|
+
<Term>
|
|
55
|
+
<Key>Encouraged:</Key>
|
|
56
|
+
<Value severity="encouraged">Verified</Value>
|
|
57
|
+
</Term>
|
|
58
|
+
</VStack>
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
export const MultipleTerms = () => (
|
|
62
|
+
<VStack maxWidth="300px">
|
|
63
|
+
<Term>
|
|
64
|
+
<Key>Name:</Key>
|
|
65
|
+
<Value>Jane Smith</Value>
|
|
66
|
+
</Term>
|
|
67
|
+
<Term>
|
|
68
|
+
<Key>Role:</Key>
|
|
69
|
+
<Value>
|
|
70
|
+
<Chip>Admin</Chip>
|
|
71
|
+
</Value>
|
|
72
|
+
</Term>
|
|
73
|
+
<Term>
|
|
74
|
+
<Key emphasis="strong">Status (Strong):</Key>
|
|
75
|
+
<Value>
|
|
76
|
+
<Chip>Active</Chip>
|
|
77
|
+
</Value>
|
|
78
|
+
</Term>
|
|
79
|
+
<Term>
|
|
80
|
+
<Key emphasis="faint">Department (Faint):</Key>
|
|
81
|
+
<Value>Engineering</Value>
|
|
82
|
+
</Term>
|
|
83
|
+
</VStack>
|
|
84
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HStackProps, HStack } from '../../stacks/h_stack.js';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import styles from './term.module.css';
|
|
5
|
+
|
|
6
|
+
export const Term = React.forwardRef<HTMLDivElement, HStackProps>(function Term(
|
|
7
|
+
{ children, className, vAlign = 'start', as = 'div', ...props },
|
|
8
|
+
ref
|
|
9
|
+
) {
|
|
10
|
+
return (
|
|
11
|
+
<HStack
|
|
12
|
+
ref={ref}
|
|
13
|
+
vAlign={vAlign}
|
|
14
|
+
className={clsx(className, styles.term, 'tcn-term')}
|
|
15
|
+
{...props}
|
|
16
|
+
>
|
|
17
|
+
{children}
|
|
18
|
+
</HStack>
|
|
19
|
+
);
|
|
20
|
+
});
|
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import { HStack, HStackProps } from '../../stacks/h_stack.js';
|
|
3
|
+
import type { Emphasis, Severity } from '../../utils/index.js';
|
|
4
|
+
import styles from './value.module.css';
|
|
3
5
|
|
|
4
|
-
export
|
|
6
|
+
export interface ValueOwnProps {
|
|
7
|
+
emphasis?: Emphasis;
|
|
8
|
+
severity?: Severity;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ValueProps extends HStackProps, ValueOwnProps {}
|
|
12
|
+
|
|
13
|
+
export const Value = ({
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
hAlign = 'end',
|
|
17
|
+
emphasis = 'normal',
|
|
18
|
+
severity = 'neutral',
|
|
19
|
+
...props
|
|
20
|
+
}: ValueProps) => {
|
|
5
21
|
return (
|
|
6
|
-
<HStack
|
|
22
|
+
<HStack
|
|
23
|
+
data-emphasis={emphasis}
|
|
24
|
+
data-severity={severity}
|
|
25
|
+
className={clsx(className, styles.value, 'tcn-datum', 'tcn-value')}
|
|
26
|
+
hAlign={hAlign}
|
|
27
|
+
{...props}
|
|
28
|
+
>
|
|
7
29
|
{children}
|
|
8
30
|
</HStack>
|
|
9
31
|
);
|
|
@@ -2,3 +2,4 @@ export type Size = 'sm' | 'md' | 'lg';
|
|
|
2
2
|
export type ExpandedSize = Size | 'xs' | 'xl';
|
|
3
3
|
export type Hierarchy = 'primary' | 'secondary' | 'tertiary';
|
|
4
4
|
export type Emphasis = 'strong' | 'normal' | 'faint';
|
|
5
|
+
export type Severity = 'dangerous' | 'cautious' | 'neutral' | 'suggested' | 'encouraged';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { BoxProps } from '../../stacks/box/box.js';
|
|
3
|
-
import { Alignment } from '../../stacks/types/alignment.js';
|
|
4
|
-
export interface ColumnProps extends Omit<BoxProps, 'as' | 'children'> {
|
|
5
|
-
hAlign?: Alignment;
|
|
6
|
-
vAlign?: Alignment;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export declare const Column: React.ForwardRefExoticComponent<ColumnProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
-
//# sourceMappingURL=column.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../src/layouts/column/column.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAG5D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,UAAU,CAAC;IACpE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,MAAM,iFA2CjB,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as s } from "clsx";
|
|
3
|
-
import x from "react";
|
|
4
|
-
import { Box as b } from "../../stacks/box/box.js";
|
|
5
|
-
import { VStack as d } from "../../stacks/v_stack.js";
|
|
6
|
-
import '../../column.css';const i = "_column_ce05462", C = "_column-stack_80b940b", l = { column: i, "column-stack": C }, z = x.forwardRef(function({
|
|
7
|
-
children: r,
|
|
8
|
-
width: u,
|
|
9
|
-
height: a,
|
|
10
|
-
minWidth: o,
|
|
11
|
-
maxWidth: c,
|
|
12
|
-
minHeight: t,
|
|
13
|
-
maxHeight: n,
|
|
14
|
-
hAlign: e,
|
|
15
|
-
vAlign: f = "start",
|
|
16
|
-
className: k,
|
|
17
|
-
...p
|
|
18
|
-
}, _) {
|
|
19
|
-
return /* @__PURE__ */ m(
|
|
20
|
-
b,
|
|
21
|
-
{
|
|
22
|
-
width: u,
|
|
23
|
-
height: a,
|
|
24
|
-
minWidth: o,
|
|
25
|
-
maxWidth: c,
|
|
26
|
-
minHeight: t,
|
|
27
|
-
maxHeight: n,
|
|
28
|
-
className: s(k, l.column, "tcn-column"),
|
|
29
|
-
...p,
|
|
30
|
-
children: /* @__PURE__ */ m(
|
|
31
|
-
d,
|
|
32
|
-
{
|
|
33
|
-
minWidth: o,
|
|
34
|
-
maxWidth: c,
|
|
35
|
-
minHeight: t,
|
|
36
|
-
maxHeight: n,
|
|
37
|
-
hAlign: e,
|
|
38
|
-
vAlign: f,
|
|
39
|
-
ref: _,
|
|
40
|
-
as: "section",
|
|
41
|
-
className: s(l["column-stack"], "tcn-column-stack"),
|
|
42
|
-
zIndex: 0,
|
|
43
|
-
children: r
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
});
|
|
49
|
-
export {
|
|
50
|
-
z as Column
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=column.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"column.js","sources":["../../../src/layouts/column/column.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport styles from './column.module.css';\nimport { Box, type BoxProps } from '../../stacks/box/box.js';\nimport { Alignment } from '../../stacks/types/alignment.js';\nimport { VStack } from '../../stacks/v_stack.js';\n\nexport interface ColumnProps extends Omit<BoxProps, 'as' | 'children'> {\n hAlign?: Alignment;\n vAlign?: Alignment;\n children?: React.ReactNode;\n}\n\nexport const Column = React.forwardRef<HTMLElement, ColumnProps>(function Column(\n {\n children,\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n hAlign,\n vAlign = 'start',\n className,\n ...props\n }: ColumnProps,\n ref\n) {\n return (\n <Box\n width={width}\n height={height}\n minWidth={minWidth}\n maxWidth={maxWidth}\n minHeight={minHeight}\n maxHeight={maxHeight}\n className={clsx(className, styles['column'], 'tcn-column')}\n {...props}\n >\n <VStack\n minWidth={minWidth}\n maxWidth={maxWidth}\n minHeight={minHeight}\n maxHeight={maxHeight}\n hAlign={hAlign}\n vAlign={vAlign}\n ref={ref}\n as=\"section\"\n className={clsx(styles['column-stack'], 'tcn-column-stack')}\n zIndex={0}\n >\n {children}\n </VStack>\n </Box>\n );\n});\n"],"names":["Column","React","children","width","height","minWidth","maxWidth","minHeight","maxHeight","hAlign","vAlign","className","props","ref","jsx","Box","clsx","styles","VStack"],"mappings":";;;;;gGAaaA,IAASC,EAAM,WAAqC,SAC/D;AAAA,EACE,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAZ;AAAA,MACA,QAAAC;AAAA,MACA,UAAAC;AAAA,MACA,UAAAC;AAAA,MACA,WAAAC;AAAA,MACA,WAAAC;AAAA,MACA,WAAWQ,EAAKL,GAAWM,EAAO,QAAW,YAAY;AAAA,MACxD,GAAGL;AAAA,MAEJ,UAAA,gBAAAE;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,UAAAb;AAAA,UACA,UAAAC;AAAA,UACA,WAAAC;AAAA,UACA,WAAAC;AAAA,UACA,QAAAC;AAAA,UACA,QAAAC;AAAA,UACA,KAAAG;AAAA,UACA,IAAG;AAAA,UACH,WAAWG,EAAKC,EAAO,cAAc,GAAG,kBAAkB;AAAA,UAC1D,QAAQ;AAAA,UAEP,UAAAf;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { VStackProps } from '../../../stacks/v_stack.js';
|
|
3
|
-
export interface SideProps extends Omit<VStackProps, 'as'> {
|
|
4
|
-
}
|
|
5
|
-
export declare const Side: React.ForwardRefExoticComponent<SideProps & React.RefAttributes<HTMLElement>>;
|
|
6
|
-
//# sourceMappingURL=side.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"side.d.ts","sourceRoot":"","sources":["../../../../src/layouts/containers/side/side.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAItE,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;CAAG;AAE7D,eAAO,MAAM,IAAI,+EAgBf,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import m from "react";
|
|
3
|
-
import { clsx as a } from "clsx";
|
|
4
|
-
import { VStack as d } from "../../../stacks/v_stack.js";
|
|
5
|
-
import '../../../side.css';const f = "_side_02cc81d", n = { side: f }, S = m.forwardRef(function({ children: t, className: o, height: s = "100%", width: i = "auto", ...r }, e) {
|
|
6
|
-
return /* @__PURE__ */ c(
|
|
7
|
-
d,
|
|
8
|
-
{
|
|
9
|
-
ref: e,
|
|
10
|
-
width: i,
|
|
11
|
-
height: s,
|
|
12
|
-
className: a(n.side, "tcn-side", o),
|
|
13
|
-
as: "section",
|
|
14
|
-
...r,
|
|
15
|
-
children: t
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
export {
|
|
20
|
-
S as Side
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=side.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"side.js","sources":["../../../../src/layouts/containers/side/side.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport { VStack, type VStackProps } from '../../../stacks/v_stack.js';\n\nimport styles from './side.module.css';\n\nexport interface SideProps extends Omit<VStackProps, 'as'> {}\n\nexport const Side = React.forwardRef<HTMLElement, SideProps>(function UtilityStrip(\n { children, className, height = '100%', width = 'auto', ...props }: SideProps,\n ref\n) {\n return (\n <VStack\n ref={ref}\n width={width}\n height={height}\n className={clsx(styles['side'], 'tcn-side', className)}\n as=\"section\"\n {...props}\n >\n {children}\n </VStack>\n );\n});\n"],"names":["Side","React","children","className","height","width","props","ref","jsx","VStack","clsx","styles"],"mappings":";;;;4CAQaA,IAAOC,EAAM,WAAmC,SAC3D,EAAE,UAAAC,GAAU,WAAAC,GAAW,QAAAC,IAAS,QAAQ,OAAAC,IAAQ,QAAQ,GAAGC,EAAA,GAC3DC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,OAAAF;AAAA,MACA,QAAAD;AAAA,MACA,WAAWM,EAAKC,EAAO,MAAS,YAAYR,CAAS;AAAA,MACrD,IAAG;AAAA,MACF,GAAGG;AAAA,MAEH,UAAAJ;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"row.d.ts","sourceRoot":"","sources":["../../../src/layouts/row/row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAU,MAAM,yBAAyB,CAAC;AAI9D,eAAO,MAAM,GAAG,iGASd,CAAC"}
|
package/dist/layouts/row/row.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import m from "react";
|
|
3
|
-
import { HStack as f } from "../../stacks/h_stack.js";
|
|
4
|
-
import { clsx as a } from "clsx";
|
|
5
|
-
import '../../row.css';const e = "_row_59c35b2", n = { row: e }, d = m.forwardRef(function({ children: o, className: r, as: i = "div", ...t }, c) {
|
|
6
|
-
return /* @__PURE__ */ s(f, { ref: c, className: a(r, n.row, "tcn-row"), ...t, children: o });
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
d as Row
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=row.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"row.js","sources":["../../../src/layouts/row/row.tsx"],"sourcesContent":["import React from 'react';\nimport { HStackProps, HStack } from '../../stacks/h_stack.js';\nimport { clsx } from 'clsx';\nimport styles from './row.module.css';\n\nexport const Row = React.forwardRef<HTMLDivElement, HStackProps>(function Row(\n { children, className, as = 'div', ...props },\n ref\n) {\n return (\n <HStack ref={ref} className={clsx(className, styles.row, 'tcn-row')} {...props}>\n {children}\n </HStack>\n );\n});\n"],"names":["Row","React","children","className","as","props","ref","jsx","HStack","clsx","styles"],"mappings":";;;;0CAKaA,IAAMC,EAAM,WAAwC,SAC/D,EAAE,UAAAC,GAAU,WAAAC,GAAW,IAAAC,IAAK,OAAO,GAAGC,EAAA,GACtCC,GACA;AACA,SACE,gBAAAC,EAACC,GAAA,EAAO,KAAAF,GAAU,WAAWG,EAAKN,GAAWO,EAAO,KAAK,SAAS,GAAI,GAAGL,GACtE,UAAAH,EAAA,CACH;AAEJ,CAAC;"}
|
package/dist/row.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer tcn-system{:where(._row_59c35b2){padding-block:4px}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"section.module-0wyGkhDg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/side.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer tcn-system{:where(._side_02cc81d){min-width:0;height:100%;width:auto}}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
@layer tcn-system {
|
|
2
|
-
:where(.column) {
|
|
3
|
-
min-width: 250px;
|
|
4
|
-
height: 100%;
|
|
5
|
-
min-height: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:where(.column-stack) {
|
|
9
|
-
gap: 8px;
|
|
10
|
-
padding: 8px;
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:where(.column:after) {
|
|
16
|
-
content: "";
|
|
17
|
-
position: absolute;
|
|
18
|
-
bottom: var(--padding);
|
|
19
|
-
top: var(--padding);
|
|
20
|
-
right: 0;
|
|
21
|
-
width: 1px;
|
|
22
|
-
background-color: rgb(221, 221, 221);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
:where(.column:last-child:after) {
|
|
26
|
-
display: none;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:where(:global(.h-stack) > .column[data-width="default"]) {
|
|
30
|
-
width: auto;
|
|
31
|
-
flex-basis: auto;
|
|
32
|
-
flex-grow: 0;
|
|
33
|
-
flex-shrink: 0;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styles from './column.module.css';
|
|
4
|
-
import { Box, type BoxProps } from '../../stacks/box/box.js';
|
|
5
|
-
import { Alignment } from '../../stacks/types/alignment.js';
|
|
6
|
-
import { VStack } from '../../stacks/v_stack.js';
|
|
7
|
-
|
|
8
|
-
export interface ColumnProps extends Omit<BoxProps, 'as' | 'children'> {
|
|
9
|
-
hAlign?: Alignment;
|
|
10
|
-
vAlign?: Alignment;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const Column = React.forwardRef<HTMLElement, ColumnProps>(function Column(
|
|
15
|
-
{
|
|
16
|
-
children,
|
|
17
|
-
width,
|
|
18
|
-
height,
|
|
19
|
-
minWidth,
|
|
20
|
-
maxWidth,
|
|
21
|
-
minHeight,
|
|
22
|
-
maxHeight,
|
|
23
|
-
hAlign,
|
|
24
|
-
vAlign = 'start',
|
|
25
|
-
className,
|
|
26
|
-
...props
|
|
27
|
-
}: ColumnProps,
|
|
28
|
-
ref
|
|
29
|
-
) {
|
|
30
|
-
return (
|
|
31
|
-
<Box
|
|
32
|
-
width={width}
|
|
33
|
-
height={height}
|
|
34
|
-
minWidth={minWidth}
|
|
35
|
-
maxWidth={maxWidth}
|
|
36
|
-
minHeight={minHeight}
|
|
37
|
-
maxHeight={maxHeight}
|
|
38
|
-
className={clsx(className, styles['column'], 'tcn-column')}
|
|
39
|
-
{...props}
|
|
40
|
-
>
|
|
41
|
-
<VStack
|
|
42
|
-
minWidth={minWidth}
|
|
43
|
-
maxWidth={maxWidth}
|
|
44
|
-
minHeight={minHeight}
|
|
45
|
-
maxHeight={maxHeight}
|
|
46
|
-
hAlign={hAlign}
|
|
47
|
-
vAlign={vAlign}
|
|
48
|
-
ref={ref}
|
|
49
|
-
as="section"
|
|
50
|
-
className={clsx(styles['column-stack'], 'tcn-column-stack')}
|
|
51
|
-
zIndex={0}
|
|
52
|
-
>
|
|
53
|
-
{children}
|
|
54
|
-
</VStack>
|
|
55
|
-
</Box>
|
|
56
|
-
);
|
|
57
|
-
});
|