@tcn/ui 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/button/button/button.d.ts.map +1 -1
- package/dist/actions/button/button/button.js +12 -4
- package/dist/actions/button/button/button.js.map +1 -1
- package/dist/form/field/common/status_input/status_input.js.map +1 -1
- package/dist/form/field/h_field/h_field.d.ts.map +1 -1
- package/dist/form/field/h_field/h_field.js.map +1 -1
- package/dist/form/field/v_field/v_field.d.ts.map +1 -1
- package/dist/form/field/v_field/v_field.js.map +1 -1
- package/dist/form/field_presenters/options_field_presenter.d.ts.map +1 -1
- package/dist/form/field_presenters/options_field_presenter.js.map +1 -1
- package/dist/form/form_field.d.ts.map +1 -1
- package/dist/form/form_field.js.map +1 -1
- package/dist/form/index.d.ts +14 -11
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +27 -20
- package/dist/form/index.js.map +1 -1
- package/dist/h_body.css +1 -1
- package/dist/layouts/body/h_body.d.ts.map +1 -1
- package/dist/layouts/body/h_body.js +11 -10
- package/dist/layouts/body/h_body.js.map +1 -1
- package/dist/layouts/body/v_body.d.ts.map +1 -1
- package/dist/layouts/body/v_body.js +10 -9
- package/dist/layouts/body/v_body.js.map +1 -1
- package/dist/layouts/divider/divider.d.ts +2 -2
- package/dist/layouts/divider/divider.d.ts.map +1 -1
- package/dist/layouts/divider/divider.js +17 -16
- package/dist/layouts/divider/divider.js.map +1 -1
- package/dist/layouts/footer/footer.d.ts +1 -1
- package/dist/layouts/footer/footer.d.ts.map +1 -1
- package/dist/layouts/footer/footer.js +5 -5
- package/dist/layouts/footer/footer.js.map +1 -1
- package/dist/layouts/header/header.d.ts +1 -1
- package/dist/layouts/header/header.d.ts.map +1 -1
- package/dist/layouts/header/header.js +10 -10
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts +1 -1
- package/dist/layouts/utility_bar/utility_bar.d.ts.map +1 -1
- package/dist/layouts/utility_bar/utility_bar.js +13 -8
- package/dist/layouts/utility_bar/utility_bar.js.map +1 -1
- package/dist/panel.css +1 -1
- package/dist/panel.module-DwGKncon.js +5 -0
- package/dist/panel.module-DwGKncon.js.map +1 -0
- package/dist/stack.css +1 -1
- package/dist/stacks/types/styles.d.ts +2 -2
- package/dist/stacks/types/styles.d.ts.map +1 -1
- package/dist/surfaces/panel/h_panel.d.ts +1 -1
- package/dist/surfaces/panel/h_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/h_panel.js +44 -33
- package/dist/surfaces/panel/h_panel.js.map +1 -1
- package/dist/surfaces/panel/v_panel.d.ts +1 -1
- package/dist/surfaces/panel/v_panel.d.ts.map +1 -1
- package/dist/surfaces/panel/v_panel.js +36 -31
- package/dist/surfaces/panel/v_panel.js.map +1 -1
- package/dist/themes/index.js +82 -20
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/typography/title/title.d.ts +1 -1
- package/dist/typography/title/title.d.ts.map +1 -1
- package/dist/typography/title/title.js +16 -16
- package/dist/typography/title/title.js.map +1 -1
- package/dist/v_body.css +1 -1
- package/package.json +3 -3
- package/src/actions/button/button/button.tsx +10 -4
- package/src/form/field/common/status_input/status_input.tsx +1 -1
- package/src/form/field/h_field/h_field.tsx +1 -1
- package/src/form/field/v_field/v_field.tsx +1 -1
- package/src/form/field_presenters/options_field_presenter.ts +1 -1
- package/src/form/form_field.tsx +1 -1
- package/src/form/index.ts +50 -11
- package/src/layouts/body/h_body.module.css +3 -2
- package/src/layouts/body/h_body.tsx +4 -3
- package/src/layouts/body/v_body.module.css +3 -2
- package/src/layouts/body/v_body.tsx +4 -3
- package/src/layouts/divider/divider.tsx +5 -4
- package/src/layouts/footer/footer.tsx +4 -4
- package/src/layouts/header/header.tsx +4 -4
- package/src/layouts/utility_bar/utility_bar.tsx +9 -4
- package/src/stacks/stack.module.css +54 -5
- package/src/stacks/stacks.mdx +28 -28
- package/src/stacks/types/styles.ts +2 -2
- package/src/surfaces/panel/__stories__/panel.stories.tsx +68 -0
- package/src/surfaces/panel/__stories__/panel_stories.module.css +13 -0
- package/src/surfaces/panel/h_panel.tsx +18 -6
- package/src/surfaces/panel/panel.module.css +2 -7
- package/src/surfaces/panel/v_panel.tsx +11 -5
- package/src/themes/themes/ergo/ergo_theme.css +72 -10
- package/src/typography/title/title.tsx +2 -2
- package/dist/form/field/form_field.d.ts +0 -6
- package/dist/form/field/form_field.d.ts.map +0 -1
- package/dist/form/field/form_field.js +0 -18
- package/dist/form/field/form_field.js.map +0 -1
- package/dist/panel.module-CtikcmYB.js +0 -5
- package/dist/panel.module-CtikcmYB.js.map +0 -1
- package/src/form/field/form_field.tsx +0 -29
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import u from "classnames";
|
|
3
3
|
import { s as x } from "../../title.module-B16de2jd.js";
|
|
4
4
|
function j({
|
|
5
|
-
size:
|
|
5
|
+
size: t = "md",
|
|
6
6
|
emphasis: o = "normal",
|
|
7
7
|
hierarchy: s = "primary",
|
|
8
8
|
color: e,
|
|
9
|
-
children:
|
|
10
|
-
className:
|
|
9
|
+
children: c,
|
|
10
|
+
className: g,
|
|
11
11
|
style: i = {},
|
|
12
12
|
padStart: n,
|
|
13
|
-
padEnd:
|
|
14
|
-
padBottom:
|
|
15
|
-
padTop:
|
|
16
|
-
pad:
|
|
17
|
-
selectable:
|
|
18
|
-
as:
|
|
13
|
+
padEnd: r,
|
|
14
|
+
padBottom: f,
|
|
15
|
+
padTop: m,
|
|
16
|
+
pad: l,
|
|
17
|
+
selectable: h = !0,
|
|
18
|
+
as: d
|
|
19
19
|
}) {
|
|
20
|
-
let a =
|
|
21
|
-
return
|
|
20
|
+
let a = d;
|
|
21
|
+
return d == null && (t === "lg" ? a = "h1" : t === "md" ? a = "h2" : a = "h3"), l && (i.padding = l), n && (i.paddingInlineStart = n), r && (i.paddingInlineEnd = r), m && (i.paddingTop = m), f && (i.paddingBottom = f), e && (i.color = e), /* @__PURE__ */ p(
|
|
22
22
|
a,
|
|
23
23
|
{
|
|
24
24
|
"data-hierarchy": s,
|
|
25
25
|
"data-emphasis": o,
|
|
26
|
-
"data-selectable":
|
|
27
|
-
className: u(x.title, "title",
|
|
26
|
+
"data-selectable": h,
|
|
27
|
+
className: u(x.title, "title", "tcn-title", g),
|
|
28
28
|
style: i,
|
|
29
|
-
"data-size":
|
|
30
|
-
children:
|
|
29
|
+
"data-size": t,
|
|
30
|
+
children: c
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {
|
|
1
|
+
{"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport function Title({\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n as,\n}: TitleProps) {\n let As: React.ElementType = as as React.ElementType;\n\n if (as == null) {\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={classnames(styles['title'], 'title', 'tcn-title', className)}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n}\n"],"names":["Title","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","as","As","jsx","classnames","styles"],"mappings":";;;AAuBO,SAASA,EAAM;AAAA,EACpB,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,IAAAC;AACF,GAAe;AACb,MAAIC,IAAwBD;AAE5B,SAAIA,KAAM,SACJb,MAAS,OACXc,IAAK,OACId,MAAS,OAClBc,IAAK,OAELA,IAAK,OAILH,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAY;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,kBAAgBZ;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWI,EAAWC,EAAO,OAAU,SAAS,aAAaZ,CAAS;AAAA,MACtE,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/v_body.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._v-body_d8f1917{
|
|
1
|
+
._v-body_d8f1917{min-height:0;flex-grow:1;width:100%}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tcn/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "TCN",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"dependencies": {
|
|
110
110
|
"classnames": "^2.5.1",
|
|
111
111
|
"react-color": "^2.19.3",
|
|
112
|
-
"@tcn/
|
|
113
|
-
"@tcn/
|
|
112
|
+
"@tcn/state": "1.0.0",
|
|
113
|
+
"@tcn/icons": "2.1.0"
|
|
114
114
|
},
|
|
115
115
|
"scripts": {
|
|
116
116
|
"build": "vite build",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import cln from 'classnames';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import
|
|
2
|
+
import cln from 'classnames';
|
|
3
|
+
import { BaseButton, type BaseButtonProps } from '../base_button/base_button.js';
|
|
4
4
|
import styles from './button.module.css';
|
|
5
5
|
|
|
6
6
|
export interface ButtonProps extends BaseButtonProps {}
|
|
@@ -10,9 +10,15 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function
|
|
|
10
10
|
ref
|
|
11
11
|
) {
|
|
12
12
|
return (
|
|
13
|
-
<BaseButton
|
|
13
|
+
<BaseButton
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cln(styles.button, 'button', 'tcn-button', className)}
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
14
18
|
{typeof children === 'string' ? (
|
|
15
|
-
<span className={cln(styles['button-text'], 'button-text')}>
|
|
19
|
+
<span className={cln(styles['button-text'], 'button-text', 'tcn-button-text')}>
|
|
20
|
+
{children}
|
|
21
|
+
</span>
|
|
16
22
|
) : (
|
|
17
23
|
children
|
|
18
24
|
)}
|
|
@@ -9,7 +9,7 @@ import classNames from 'classnames';
|
|
|
9
9
|
import styles from './status_input.module.css';
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
|
-
TODO: I really want to make these
|
|
12
|
+
TODO: I really want to make these themeable.
|
|
13
13
|
The way we do that is simply put a div placeholder with
|
|
14
14
|
a class that the theme can override. They can use svgs as
|
|
15
15
|
backgrounds for icons. This would make it so the component
|
|
@@ -4,7 +4,7 @@ import type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import styles from './h_field.module.css';
|
|
7
|
-
import { FieldInput } from '../common/types.js';
|
|
7
|
+
import type { FieldInput } from '../common/types.js';
|
|
8
8
|
import { FieldHeader } from '../common/field_header.js';
|
|
9
9
|
import { FieldControl } from '../common/field_control/field_control.js';
|
|
10
10
|
import { FieldStatusInput } from '../common/status_input/status_input.js';
|
|
@@ -7,7 +7,7 @@ import styles from './v_field.module.css';
|
|
|
7
7
|
import { FieldControl } from '../common/field_control/field_control.js';
|
|
8
8
|
import { FieldHeader } from '../common/field_header.js';
|
|
9
9
|
import { FieldStatusInput } from '../common/status_input/status_input.js';
|
|
10
|
-
import { FieldInput } from '../common/types.js';
|
|
10
|
+
import type { FieldInput } from '../common/types.js';
|
|
11
11
|
|
|
12
12
|
export interface VFieldOwnProps extends FieldInput {
|
|
13
13
|
children: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Signal } from '@tcn/state';
|
|
2
|
-
import { FieldOptions, FieldPresenter, FieldState } from './field_presenter.js';
|
|
2
|
+
import { type FieldOptions, FieldPresenter, type FieldState } from './field_presenter.js';
|
|
3
3
|
|
|
4
4
|
export interface OptionsFieldState<TValue = string, TOption = string>
|
|
5
5
|
extends FieldState<TValue> {
|
package/src/form/form_field.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
import { useSignalValue } from '@tcn/state';
|
|
3
|
-
import { FieldPresenter, FieldState } from './field_presenters/field_presenter.js';
|
|
3
|
+
import { FieldPresenter, type FieldState } from './field_presenters/field_presenter.js';
|
|
4
4
|
|
|
5
5
|
export function FormField<T>({
|
|
6
6
|
field,
|
package/src/form/index.ts
CHANGED
|
@@ -1,11 +1,50 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
export {
|
|
2
|
+
type FieldControlOwnProps,
|
|
3
|
+
type FieldControlProps,
|
|
4
|
+
FieldControl,
|
|
5
|
+
} from './field/common/field_control/field_control.js';
|
|
6
|
+
export {
|
|
7
|
+
AdornmentMap,
|
|
8
|
+
type StatusInputState,
|
|
9
|
+
type StatusInputOwnProps,
|
|
10
|
+
type StatusInputProps,
|
|
11
|
+
FieldStatusInput,
|
|
12
|
+
} from './field/common/status_input/status_input.js';
|
|
13
|
+
export {
|
|
14
|
+
FieldDescription,
|
|
15
|
+
type FieldDescriptionOwnProps,
|
|
16
|
+
} from './field/common/field_description.js';
|
|
17
|
+
export {
|
|
18
|
+
type FieldErrorMessageOwnProps,
|
|
19
|
+
FieldErrorMessage,
|
|
20
|
+
} from './field/common/field_error.js';
|
|
21
|
+
export {
|
|
22
|
+
FieldHeader,
|
|
23
|
+
type FieldHeaderProps,
|
|
24
|
+
type FieldHeaderOwnProps,
|
|
25
|
+
} from './field/common/field_header.js';
|
|
26
|
+
export { FieldLabel, type FieldLabelOwnProps } from './field/common/field_label.js';
|
|
27
|
+
export type { FieldInput } from './field/common/types.js';
|
|
28
|
+
export {
|
|
29
|
+
HField,
|
|
30
|
+
type HFieldProps,
|
|
31
|
+
type HFieldOwnProps,
|
|
32
|
+
} from './field/h_field/h_field.js';
|
|
33
|
+
export {
|
|
34
|
+
VField,
|
|
35
|
+
type VFieldProps,
|
|
36
|
+
type VFieldOwnProps,
|
|
37
|
+
} from './field/v_field/v_field.js';
|
|
38
|
+
export { Field, type FieldProps } from './field/field.js';
|
|
39
|
+
export {
|
|
40
|
+
FieldPresenter,
|
|
41
|
+
type FieldState,
|
|
42
|
+
type FieldOptions,
|
|
43
|
+
} from './field_presenters/field_presenter.js';
|
|
44
|
+
export {
|
|
45
|
+
OptionsFieldPresenter,
|
|
46
|
+
type OptionsFieldState,
|
|
47
|
+
type OptionsFieldOptions,
|
|
48
|
+
} from './field_presenters/options_field_presenter.js';
|
|
49
|
+
export { FieldSet, type FieldSetProps } from './field_set/field_set.js';
|
|
50
|
+
export { FormField } from './form_field.js';
|
|
@@ -6,14 +6,15 @@ import styles from './h_body.module.css';
|
|
|
6
6
|
export interface HBodyProps extends Omit<HStackProps, 'as'> {}
|
|
7
7
|
|
|
8
8
|
export const HBody = React.forwardRef<HTMLElement, HBodyProps>(function HBody(
|
|
9
|
-
{ children, className, ...props }: HBodyProps,
|
|
9
|
+
{ children, className, overflowX = 'auto', ...props }: HBodyProps,
|
|
10
10
|
ref
|
|
11
11
|
) {
|
|
12
12
|
return (
|
|
13
13
|
<HStack
|
|
14
14
|
ref={ref}
|
|
15
|
-
as="
|
|
16
|
-
|
|
15
|
+
as="div"
|
|
16
|
+
overflowX={overflowX}
|
|
17
|
+
className={classNames(styles['h-body'], className, 'tcn-h-body', 'body')}
|
|
17
18
|
{...props}
|
|
18
19
|
>
|
|
19
20
|
{children}
|
|
@@ -6,14 +6,15 @@ import styles from './v_body.module.css';
|
|
|
6
6
|
export interface VBodyProps extends Omit<VStackProps, 'as'> {}
|
|
7
7
|
|
|
8
8
|
export const VBody = React.forwardRef<HTMLElement, VBodyProps>(function VBody(
|
|
9
|
-
{ children, className, ...props }: VBodyProps,
|
|
9
|
+
{ children, className, overflowY = 'auto', ...props }: VBodyProps,
|
|
10
10
|
ref
|
|
11
11
|
) {
|
|
12
12
|
return (
|
|
13
13
|
<VStack
|
|
14
14
|
ref={ref}
|
|
15
|
-
as="
|
|
16
|
-
|
|
15
|
+
as="div"
|
|
16
|
+
overflowY={overflowY}
|
|
17
|
+
className={classNames(styles['v-body'], className, 'tcn-body', 'tcn-v-body')}
|
|
17
18
|
{...props}
|
|
18
19
|
>
|
|
19
20
|
{children}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
|
|
1
|
+
import React, { type CSSProperties } from 'react';
|
|
3
2
|
import classnames from 'classnames';
|
|
4
|
-
import
|
|
3
|
+
import type { WithDetailedHTMLProps } from '../../stacks/types/as.js';
|
|
4
|
+
import type { Emphasis, Size } from '../../utils/index.js';
|
|
5
5
|
import styles from './divider.module.css';
|
|
6
6
|
|
|
7
7
|
export type DividerOrientation =
|
|
@@ -59,7 +59,7 @@ export const Divider: React.FC<DividerProps> = ({
|
|
|
59
59
|
data-thickness={thickness}
|
|
60
60
|
data-length={length}
|
|
61
61
|
data-orientation={orientation}
|
|
62
|
-
className={classnames(styles[`divider`], 'divider', className)}
|
|
62
|
+
className={classnames(styles[`divider`], 'divider', 'tcn-divider', className)}
|
|
63
63
|
{...props}
|
|
64
64
|
>
|
|
65
65
|
<div
|
|
@@ -71,6 +71,7 @@ export const Divider: React.FC<DividerProps> = ({
|
|
|
71
71
|
className={classnames(
|
|
72
72
|
styles[`divider-line`],
|
|
73
73
|
'divider-line',
|
|
74
|
+
'tcn-divider-line',
|
|
74
75
|
'material',
|
|
75
76
|
className
|
|
76
77
|
)}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
1
|
import React from 'react';
|
|
4
|
-
import
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
5
4
|
import type { Hierarchy, Size } from '../../utils/index.js';
|
|
5
|
+
import styles from './footer.module.css';
|
|
6
6
|
|
|
7
7
|
export interface FooterProps extends Omit<HStackProps, 'as' | 'children'> {
|
|
8
8
|
hierarchy?: Hierarchy;
|
|
@@ -18,7 +18,7 @@ export const Footer = React.forwardRef<HTMLElement, FooterProps>(function Footer
|
|
|
18
18
|
<HStack
|
|
19
19
|
ref={ref}
|
|
20
20
|
as="footer"
|
|
21
|
-
className={classNames(styles.footer, className, 'footer')}
|
|
21
|
+
className={classNames(styles.footer, className, 'footer', 'tcn-footer')}
|
|
22
22
|
data-hierarchy={hierarchy}
|
|
23
23
|
data-size={size}
|
|
24
24
|
{...props}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
1
|
import React from 'react';
|
|
4
|
-
import
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
5
4
|
import type { Hierarchy, Size } from '../../utils/index.js';
|
|
5
|
+
import styles from './header.module.css';
|
|
6
6
|
|
|
7
7
|
// UtilityBar
|
|
8
8
|
export interface HeaderProps extends Omit<HStackProps, 'as'> {
|
|
@@ -25,7 +25,7 @@ export const Header = React.forwardRef<HTMLElement, HeaderProps>(function Header
|
|
|
25
25
|
<HStack
|
|
26
26
|
ref={ref}
|
|
27
27
|
as="header"
|
|
28
|
-
className={classNames(styles.header, className, 'header')}
|
|
28
|
+
className={classNames(styles.header, className, 'tcn-header', 'header')}
|
|
29
29
|
data-hierarchy={hierarchy}
|
|
30
30
|
data-size={size}
|
|
31
31
|
height={height}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
1
|
import React from 'react';
|
|
4
|
-
import
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
5
4
|
import type { Hierarchy, Size } from '../../utils/index.js';
|
|
5
|
+
import styles from './utility_bar.module.css';
|
|
6
6
|
|
|
7
7
|
// UtilityBar
|
|
8
8
|
export interface UtilityBarProps extends Omit<HStackProps, 'as'> {
|
|
@@ -26,7 +26,12 @@ export const UtilityBar = React.forwardRef<HTMLElement, UtilityBarProps>(
|
|
|
26
26
|
<HStack
|
|
27
27
|
ref={ref}
|
|
28
28
|
as="header"
|
|
29
|
-
className={classNames(
|
|
29
|
+
className={classNames(
|
|
30
|
+
styles['utility-bar'],
|
|
31
|
+
className,
|
|
32
|
+
'utility-bar',
|
|
33
|
+
'tcn-utility-bar'
|
|
34
|
+
)}
|
|
30
35
|
data-hierarchy={hierarchy}
|
|
31
36
|
data-size={size}
|
|
32
37
|
height={height}
|
|
@@ -20,7 +20,8 @@ HStack CSS
|
|
|
20
20
|
display: inline-grid;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.box[data-height="flex"]
|
|
23
|
+
.box[data-height="flex"],
|
|
24
|
+
.box[data-height="fill"] {
|
|
24
25
|
height: auto;
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -127,13 +128,30 @@ HStack CSS
|
|
|
127
128
|
:where(.h-stack > .h-stack[data-width="flex"]),
|
|
128
129
|
:where(.h-stack > .z-stack[data-width="flex"]),
|
|
129
130
|
:where(.h-stack > .v-stack[data-width="flex"]),
|
|
130
|
-
:where(.h-stack > .stack-flex[data-width="flex"])
|
|
131
|
+
:where(.h-stack > .stack-flex[data-width="flex"]),
|
|
132
|
+
:where(.h-stack > .h-stack[data-width="fill"]),
|
|
133
|
+
:where(.h-stack > .z-stack[data-width="fill"]),
|
|
134
|
+
:where(.h-stack > .v-stack[data-width="fill"]),
|
|
135
|
+
:where(.h-stack > .stack-flex[data-width="fill"]),
|
|
136
|
+
:where(.h-stack > .box[data-width="fill"]) {
|
|
131
137
|
flex-grow: 1;
|
|
132
138
|
flex-shrink: 0;
|
|
133
139
|
flex-basis: 0%;
|
|
134
140
|
width: auto;
|
|
135
141
|
}
|
|
136
142
|
|
|
143
|
+
:where(.h-stack > .h-stack[data-height="flex"]),
|
|
144
|
+
:where(.h-stack > .z-stack[data-height="flex"]),
|
|
145
|
+
:where(.h-stack > .v-stack[data-height="flex"]),
|
|
146
|
+
:where(.h-stack > .stack-flex[data-height="flex"]),
|
|
147
|
+
:where(.h-stack > .h-stack[data-height="fill"]),
|
|
148
|
+
:where(.h-stack > .z-stack[data-height="fill"]),
|
|
149
|
+
:where(.h-stack > .v-stack[data-height="fill"]),
|
|
150
|
+
:where(.h-stack > .stack-flex[data-height="fill"]),
|
|
151
|
+
:where(.h-stack > .box[data-height="fill"]) {
|
|
152
|
+
height: 100%;
|
|
153
|
+
}
|
|
154
|
+
|
|
137
155
|
:where(.reveal-layout .h-stack:after),
|
|
138
156
|
:where(.reveal-h-stack .h-stack:after) {
|
|
139
157
|
content: "";
|
|
@@ -189,17 +207,38 @@ HStack CSS
|
|
|
189
207
|
:where(.v-stack > .h-stack[data-height="flex"]),
|
|
190
208
|
:where(.v-stack > .z-stack[data-height="flex"]),
|
|
191
209
|
:where(.v-stack > .v-stack[data-height="flex"]),
|
|
192
|
-
:where(.v-stack > .stack-flex[data-height="flex"])
|
|
210
|
+
:where(.v-stack > .stack-flex[data-height="flex"]),
|
|
211
|
+
:where(.v-stack > .h-stack[data-height="fill"]),
|
|
212
|
+
:where(.v-stack > .z-stack[data-height="fill"]),
|
|
213
|
+
:where(.v-stack > .v-stack[data-height="fill"]),
|
|
214
|
+
:where(.v-stack > .stack-flex[data-height="fill"]),
|
|
215
|
+
:where(.v-stack > .box[data-height="fill"]) {
|
|
193
216
|
flex-grow: 1;
|
|
194
217
|
flex-shrink: 0;
|
|
195
218
|
flex-basis: 0%;
|
|
196
219
|
height: auto;
|
|
197
220
|
}
|
|
198
221
|
|
|
222
|
+
:where(.v-stack > .h-stack[data-width="flex"]),
|
|
223
|
+
:where(.v-stack > .z-stack[data-width="flex"]),
|
|
224
|
+
:where(.v-stack > .v-stack[data-width="flex"]),
|
|
225
|
+
:where(.v-stack > .stack-flex[data-width="flex"]),
|
|
226
|
+
:where(.v-stack > .h-stack[data-width="fill"]),
|
|
227
|
+
:where(.v-stack > .z-stack[data-width="fill"]),
|
|
228
|
+
:where(.v-stack > .v-stack[data-width="fill"]),
|
|
229
|
+
:where(.v-stack > .stack-flex[data-width="fill"]),
|
|
230
|
+
:where(.v-stack > .box[data-width="fill"]) {
|
|
231
|
+
width: 100%;
|
|
232
|
+
}
|
|
233
|
+
|
|
199
234
|
:where(.v-stack[data-height="auto"] > .h-stack[data-height="flex"]),
|
|
200
235
|
:where(.v-stack[data-height="auto"] > .z-stack[data-height="flex"]),
|
|
201
236
|
:where(.v-stack[data-height="auto"] > .v-stack[data-height="flex"]),
|
|
202
|
-
:where(.v-stack[data-height="auto"] > .stack-flex[data-height="flex"])
|
|
237
|
+
:where(.v-stack[data-height="auto"] > .stack-flex[data-height="flex"]),
|
|
238
|
+
:where(.v-stack[data-height="auto"] > .h-stack[data-height="fill"]),
|
|
239
|
+
:where(.v-stack[data-height="auto"] > .z-stack[data-height="fill"]),
|
|
240
|
+
:where(.v-stack[data-height="auto"] > .v-stack[data-height="fill"]),
|
|
241
|
+
:where(.v-stack[data-height="auto"] > .stack-flex[data-height="fill"]) {
|
|
203
242
|
flex-basis: auto;
|
|
204
243
|
}
|
|
205
244
|
|
|
@@ -259,12 +298,18 @@ ZStack CSS
|
|
|
259
298
|
|
|
260
299
|
:where(.z-stack > .h-stack[data-height="flex"]),
|
|
261
300
|
:where(.z-stack > .v-stack[data-height="flex"]),
|
|
301
|
+
:where(.z-stack > .h-stack[data-height="fill"]),
|
|
302
|
+
:where(.z-stack > .v-stack[data-height="fill"]),
|
|
303
|
+
:where(.z-stack > .stack-flex[data-height="fill"]),
|
|
262
304
|
:where(.z-stack > .stack-flex[data-height="default"]) {
|
|
263
305
|
height: 100%;
|
|
264
306
|
}
|
|
265
307
|
|
|
266
308
|
:where(.z-stack > .h-stack[data-width="flex"]),
|
|
267
309
|
:where(.z-stack > .v-stack[data-width="flex"]),
|
|
310
|
+
:where(.z-stack > .h-stack[data-width="fill"]),
|
|
311
|
+
:where(.z-stack > .v-stack[data-width="fill"]),
|
|
312
|
+
:where(.z-stack > .stack-flex[data-width="fill"]),
|
|
268
313
|
:where(.z-stack > .stack-flex[data-width="default"]) {
|
|
269
314
|
width: 100%;
|
|
270
315
|
}
|
|
@@ -311,7 +356,11 @@ Defaults CSS
|
|
|
311
356
|
:where(.h-stack[data-width="auto"] > .h-stack[data-width="flex"]),
|
|
312
357
|
:where(.h-stack[data-width="auto"] > .z-stack[data-width="flex"]),
|
|
313
358
|
:where(.h-stack[data-width="auto"] > .v-stack[data-width="flex"]),
|
|
314
|
-
:where(.h-stack[data-width="auto"] > .stack-flex[data-width="flex"])
|
|
359
|
+
:where(.h-stack[data-width="auto"] > .stack-flex[data-width="flex"]),
|
|
360
|
+
:where(.h-stack[data-width="auto"] > .h-stack[data-width="fill"]),
|
|
361
|
+
:where(.h-stack[data-width="auto"] > .z-stack[data-width="fill"]),
|
|
362
|
+
:where(.h-stack[data-width="auto"] > .v-stack[data-width="fill"]),
|
|
363
|
+
:where(.h-stack[data-width="auto"] > .stack-flex[data-width="fill"]) {
|
|
315
364
|
flex-basis: auto;
|
|
316
365
|
}
|
|
317
366
|
|