@tcn/ui 0.12.5 → 0.13.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/aside.css +1 -0
- package/dist/body.css +1 -1
- package/dist/inputs/color_input/color_input.js +18 -18
- package/dist/inputs/color_input/color_input.js.map +1 -1
- package/dist/inputs/control/control.d.ts +10 -0
- package/dist/inputs/control/control.d.ts.map +1 -0
- package/dist/inputs/control/control.js +17 -0
- package/dist/inputs/control/control.js.map +1 -0
- package/dist/inputs/control_set/control_set.d.ts +5 -0
- package/dist/inputs/control_set/control_set.d.ts.map +1 -0
- package/dist/inputs/control_set/control_set.js +20 -0
- package/dist/inputs/{input_group/input_group.js.map → control_set/control_set.js.map} +1 -1
- package/dist/inputs/date_picker/date_picker_input.js +20 -20
- package/dist/inputs/date_picker/date_picker_input.js.map +1 -1
- package/dist/inputs/index.d.ts +2 -1
- package/dist/inputs/index.d.ts.map +1 -1
- package/dist/inputs/index.js +27 -24
- package/dist/inputs/index.js.map +1 -1
- package/dist/inputs/input/input.js +6 -6
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js +15 -15
- package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts +2 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +45 -43
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input_adapter.js +21 -21
- package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -1
- package/dist/inputs/phone_number_input/sip_input.d.ts +2 -1
- package/dist/inputs/phone_number_input/sip_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/sip_input.js +51 -49
- package/dist/inputs/phone_number_input/sip_input.js.map +1 -1
- package/dist/inputs/select/select.js +6 -6
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/textarea/textarea.js +8 -8
- package/dist/inputs/textarea/textarea.js.map +1 -1
- package/dist/inputs/unit_input/unit_input.js +20 -20
- package/dist/inputs/unit_input/unit_input.js.map +1 -1
- package/dist/layouts/body/body.d.ts +17 -0
- package/dist/layouts/body/body.d.ts.map +1 -1
- package/dist/layouts/body/body.js +11 -12
- package/dist/layouts/body/body.js.map +1 -1
- package/dist/layouts/index.d.ts +1 -2
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +38 -40
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/scaffold/scaffold.js +1 -1
- package/dist/layouts/scaffold/scaffold.js.map +1 -1
- package/dist/layouts/section/section.d.ts.map +1 -1
- package/dist/layouts/section/section.js +14 -13
- package/dist/layouts/section/section.js.map +1 -1
- package/dist/overlay/frame/frame.d.ts +2 -2
- package/dist/overlay/frame/frame.d.ts.map +1 -1
- package/dist/overlay/frame/frame.js +67 -59
- package/dist/overlay/frame/frame.js.map +1 -1
- package/dist/overlay/slide/slide.d.ts +9 -0
- package/dist/overlay/slide/slide.d.ts.map +1 -0
- package/dist/overlay/slide/slide.js +29 -0
- package/dist/overlay/slide/slide.js.map +1 -0
- package/dist/page.css +1 -1
- package/dist/slide.css +1 -0
- package/dist/surfaces/aside/aside.d.ts +5 -0
- package/dist/surfaces/aside/aside.d.ts.map +1 -0
- package/dist/surfaces/aside/aside.js +19 -0
- package/dist/surfaces/aside/aside.js.map +1 -0
- package/dist/surfaces/drawers/drawer.d.ts +5 -0
- package/dist/surfaces/drawers/drawer.d.ts.map +1 -0
- package/dist/surfaces/drawers/drawer.js +31 -0
- package/dist/surfaces/drawers/drawer.js.map +1 -0
- package/dist/surfaces/index.d.ts +3 -6
- package/dist/surfaces/index.d.ts.map +1 -1
- package/dist/surfaces/index.js +20 -26
- package/dist/surfaces/index.js.map +1 -1
- package/dist/surfaces/modal/modal.d.ts +1 -1
- package/dist/surfaces/modal/modal.d.ts.map +1 -1
- package/dist/surfaces/modal/modal.js +22 -14
- package/dist/surfaces/modal/modal.js.map +1 -1
- package/dist/surfaces/page/page.d.ts +5 -0
- package/dist/surfaces/page/page.d.ts.map +1 -0
- package/dist/surfaces/page/page.js +19 -0
- package/dist/surfaces/page/page.js.map +1 -0
- package/dist/surfaces/pop_confirm/pop_confirm.d.ts.map +1 -1
- package/dist/surfaces/pop_confirm/pop_confirm.js +23 -16
- package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
- package/dist/surfaces/window/window.d.ts +1 -1
- package/dist/surfaces/window/window.d.ts.map +1 -1
- package/dist/surfaces/window/window.js +27 -19
- package/dist/surfaces/window/window.js.map +1 -1
- package/dist/themes/stylesheets/reset.css +1 -1
- package/dist/themes/stylesheets/reset.js +2 -2
- package/dist/themes/stylesheets/reset.js.map +1 -1
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/themes/themes/ergo/ergo_theme.js +134 -44
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +1 -1
- package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -1
- package/package.json +2 -2
- package/src/inputs/color_input/color_input.tsx +3 -3
- package/src/inputs/control/control.stories.tsx +158 -0
- package/src/inputs/control/control.tsx +32 -0
- package/src/inputs/control/control_stories.module.css +7 -0
- package/src/inputs/control_set/control_set.stories.tsx +46 -0
- package/src/inputs/{input_group/input_group.tsx → control_set/control_set.tsx} +5 -5
- package/src/inputs/date_picker/date_picker_input.stories.tsx +1 -1
- package/src/inputs/date_picker/date_picker_input.tsx +1 -1
- package/src/inputs/index.ts +2 -1
- package/src/inputs/input/input.tsx +1 -1
- package/src/inputs/phone_number_input/phone_number_country_select_adapter.tsx +1 -1
- package/src/inputs/phone_number_input/phone_number_input.tsx +4 -1
- package/src/inputs/phone_number_input/phone_number_input_adapter.tsx +2 -2
- package/src/inputs/phone_number_input/sip_input.tsx +7 -4
- package/src/inputs/select/select.tsx +1 -1
- package/src/inputs/textarea/textarea.stories.tsx +1 -1
- package/src/inputs/textarea/textarea.tsx +1 -1
- package/src/inputs/unit_input/unit_input.tsx +3 -3
- package/src/layouts/__stories__/composed_stories.module.css +1 -7
- package/src/layouts/__stories__/rail.stories.tsx +20 -13
- package/src/layouts/__stories__/scaffold.stories.tsx +34 -22
- package/src/layouts/__stories__/utils.tsx +10 -7
- package/src/layouts/body/body.module.css +0 -8
- package/src/layouts/body/body.tsx +19 -3
- package/src/layouts/index.ts +1 -2
- package/src/layouts/scaffold/scaffold.tsx +1 -1
- package/src/layouts/section/section.tsx +2 -1
- package/src/overlay/frame/frame.tsx +13 -16
- package/src/overlay/slide/slide.module.css +30 -0
- package/src/overlay/slide/slide.stories.tsx +61 -0
- package/src/overlay/slide/slide.tsx +51 -0
- package/src/surfaces/aside/aside.module.css +5 -0
- package/src/surfaces/aside/aside.stories.tsx +75 -0
- package/src/surfaces/aside/aside.tsx +22 -0
- package/src/surfaces/card/card.stories.tsx +8 -5
- package/src/surfaces/card/card_stories.module.css +4 -2
- package/src/surfaces/drawers/drawer.stories.tsx +144 -0
- package/src/surfaces/drawers/drawer.tsx +30 -0
- package/src/surfaces/index.ts +3 -6
- package/src/surfaces/modal/__stories__/modal.stories.tsx +21 -4
- package/src/surfaces/modal/modal.tsx +5 -1
- package/src/surfaces/page/page.module.css +0 -6
- package/src/surfaces/page/page.stories.tsx +71 -0
- package/src/surfaces/page/page.tsx +22 -0
- package/src/surfaces/panel/__stories__/panel.stories.tsx +66 -60
- package/src/surfaces/pop_confirm/pop_confirm.stories.tsx +43 -31
- package/src/surfaces/pop_confirm/pop_confirm.tsx +5 -1
- package/src/surfaces/tooltip/__stories__/tooltip.stories.tsx +31 -0
- package/src/surfaces/window/window.stories.tsx +15 -4
- package/src/surfaces/window/window.tsx +5 -1
- package/src/themes/stylesheets/reset.css +2 -2
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_card.tsx +16 -15
- package/src/themes/themes/ergo/__stories__/material.stories.tsx +6 -4
- package/src/themes/themes/ergo/ergo_theme.css +134 -44
- package/src/utils/dnd/hooks/use_drag_container.ts +0 -7
- package/dist/body.module-BbFZ7KNP.js +0 -5
- package/dist/body.module-BbFZ7KNP.js.map +0 -1
- package/dist/drawer_bottom.css +0 -1
- package/dist/drawer_end.css +0 -1
- package/dist/drawer_start.css +0 -1
- package/dist/drawer_top.css +0 -1
- package/dist/inputs/input_group/input_group.d.ts +0 -5
- package/dist/inputs/input_group/input_group.d.ts.map +0 -1
- package/dist/inputs/input_group/input_group.js +0 -20
- package/dist/layouts/body/h_body.d.ts +0 -6
- package/dist/layouts/body/h_body.d.ts.map +0 -1
- package/dist/layouts/body/h_body.js +0 -27
- package/dist/layouts/body/h_body.js.map +0 -1
- package/dist/layouts/body/v_body.d.ts +0 -6
- package/dist/layouts/body/v_body.d.ts.map +0 -1
- package/dist/layouts/body/v_body.js +0 -27
- package/dist/layouts/body/v_body.js.map +0 -1
- package/dist/page.module-DXhph-u6.js +0 -5
- package/dist/page.module-DXhph-u6.js.map +0 -1
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.d.ts +0 -7
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.d.ts.map +0 -1
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js +0 -22
- package/dist/surfaces/drawers/drawer_bottom/drawer_bottom.js.map +0 -1
- package/dist/surfaces/drawers/drawer_end/drawer_end.d.ts +0 -7
- package/dist/surfaces/drawers/drawer_end/drawer_end.d.ts.map +0 -1
- package/dist/surfaces/drawers/drawer_end/drawer_end.js +0 -20
- package/dist/surfaces/drawers/drawer_end/drawer_end.js.map +0 -1
- package/dist/surfaces/drawers/drawer_start/drawer_start.d.ts +0 -7
- package/dist/surfaces/drawers/drawer_start/drawer_start.d.ts.map +0 -1
- package/dist/surfaces/drawers/drawer_start/drawer_start.js +0 -22
- package/dist/surfaces/drawers/drawer_start/drawer_start.js.map +0 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.d.ts +0 -7
- package/dist/surfaces/drawers/drawer_top/drawer_top.d.ts.map +0 -1
- package/dist/surfaces/drawers/drawer_top/drawer_top.js +0 -20
- package/dist/surfaces/drawers/drawer_top/drawer_top.js.map +0 -1
- package/dist/surfaces/page/h_page.d.ts +0 -6
- package/dist/surfaces/page/h_page.d.ts.map +0 -1
- package/dist/surfaces/page/h_page.js +0 -22
- package/dist/surfaces/page/h_page.js.map +0 -1
- package/dist/surfaces/page/v_page.d.ts +0 -6
- package/dist/surfaces/page/v_page.d.ts.map +0 -1
- package/dist/surfaces/page/v_page.js +0 -21
- package/dist/surfaces/page/v_page.js.map +0 -1
- package/src/layouts/body/h_body.module.css +0 -7
- package/src/layouts/body/h_body.tsx +0 -28
- package/src/layouts/body/v_body.module.css +0 -7
- package/src/layouts/body/v_body.tsx +0 -28
- package/src/surfaces/drawers/__stories__/drawers.stories.tsx +0 -26
- package/src/surfaces/drawers/drawer_bottom/drawer_bottom.module.css +0 -5
- package/src/surfaces/drawers/drawer_bottom/drawer_bottom.tsx +0 -23
- package/src/surfaces/drawers/drawer_end/drawer_end.module.css +0 -5
- package/src/surfaces/drawers/drawer_end/drawer_end.tsx +0 -24
- package/src/surfaces/drawers/drawer_start/drawer_start.module.css +0 -5
- package/src/surfaces/drawers/drawer_start/drawer_start.tsx +0 -23
- package/src/surfaces/drawers/drawer_top/drawer_top.module.css +0 -5
- package/src/surfaces/drawers/drawer_top/drawer_top.tsx +0 -24
- package/src/surfaces/page/h_page.tsx +0 -23
- package/src/surfaces/page/v_page.tsx +0 -22
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { HStackProps } from '../../stacks/h_stack.js';
|
|
3
|
-
export interface HPageProps extends Omit<HStackProps, 'as'> {
|
|
4
|
-
}
|
|
5
|
-
export declare const HPage: React.ForwardRefExoticComponent<HPageProps & React.RefAttributes<HTMLElement>>;
|
|
6
|
-
//# sourceMappingURL=h_page.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"h_page.d.ts","sourceRoot":"","sources":["../../../src/surfaces/page/h_page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;CAAG;AAE9D,eAAO,MAAM,KAAK,gFAehB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as e } from "clsx";
|
|
3
|
-
import s from "react";
|
|
4
|
-
import { s as f } from "../../page.module-DXhph-u6.js";
|
|
5
|
-
import { HStack as i } from "../../stacks/h_stack.js";
|
|
6
|
-
const x = s.forwardRef(function({ children: r, className: t, ...a }, o) {
|
|
7
|
-
return /* @__PURE__ */ m(
|
|
8
|
-
i,
|
|
9
|
-
{
|
|
10
|
-
ref: o,
|
|
11
|
-
as: "main",
|
|
12
|
-
className: e(f.page, t, "tcn-h-page"),
|
|
13
|
-
vAlign: "start",
|
|
14
|
-
...a,
|
|
15
|
-
children: r
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
export {
|
|
20
|
-
x as HPage
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=h_page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"h_page.js","sources":["../../../src/surfaces/page/h_page.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport styles from './page.module.css';\nimport { HStack, type HStackProps } from '../../stacks/h_stack.js';\n\nexport interface HPageProps extends Omit<HStackProps, 'as'> {}\n\nexport const HPage = React.forwardRef<HTMLElement, HPageProps>(function HPage(\n { children, className, ...props }: HPageProps,\n ref\n) {\n return (\n <HStack\n ref={ref}\n as=\"main\"\n className={clsx(styles.page, className, 'tcn-h-page')}\n vAlign=\"start\"\n {...props}\n >\n {children}\n </HStack>\n );\n});\n"],"names":["HPage","React","children","className","props","ref","jsx","HStack","clsx","styles"],"mappings":";;;;;AAOO,MAAMA,IAAQC,EAAM,WAAoC,SAC7D,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,MAAMN,GAAW,YAAY;AAAA,MACpD,QAAO;AAAA,MACN,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { VStackProps } from '../../stacks/v_stack.js';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
|
-
export interface VPageProps extends Omit<VStackProps, 'as'> {
|
|
4
|
-
}
|
|
5
|
-
export declare const VPage: React.ForwardRefExoticComponent<VPageProps & React.RefAttributes<HTMLElement>>;
|
|
6
|
-
//# sourceMappingURL=v_page.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v_page.d.ts","sourceRoot":"","sources":["../../../src/surfaces/page/v_page.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC;CAAG;AAE9D,eAAO,MAAM,KAAK,gFAchB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { VStack as e } from "../../stacks/v_stack.js";
|
|
3
|
-
import { clsx as s } from "clsx";
|
|
4
|
-
import f from "react";
|
|
5
|
-
import { s as p } from "../../page.module-DXhph-u6.js";
|
|
6
|
-
const x = f.forwardRef(function({ children: r, className: o, ...t }, a) {
|
|
7
|
-
return /* @__PURE__ */ m(
|
|
8
|
-
e,
|
|
9
|
-
{
|
|
10
|
-
ref: a,
|
|
11
|
-
as: "main",
|
|
12
|
-
className: s(p.page, o, "tcn-v-page"),
|
|
13
|
-
...t,
|
|
14
|
-
children: r
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
});
|
|
18
|
-
export {
|
|
19
|
-
x as VPage
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=v_page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v_page.js","sources":["../../../src/surfaces/page/v_page.tsx"],"sourcesContent":["import { VStack, type VStackProps } from '../../stacks/v_stack.js';\nimport { clsx } from 'clsx';\nimport React from 'react';\nimport styles from './page.module.css';\n\nexport interface VPageProps extends Omit<VStackProps, 'as'> {}\n\nexport const VPage = React.forwardRef<HTMLElement, VPageProps>(function VPage(\n { children, className, ...props }: VPageProps,\n ref\n) {\n return (\n <VStack\n ref={ref}\n as=\"main\"\n className={clsx(styles.page, className, 'tcn-v-page')}\n {...props}\n >\n {children}\n </VStack>\n );\n});\n"],"names":["VPage","React","children","className","props","ref","jsx","VStack","clsx","styles"],"mappings":";;;;;AAOO,MAAMA,IAAQC,EAAM,WAAoC,SAC7D,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,MAAMN,GAAW,YAAY;AAAA,MACnD,GAAGC;AAAA,MAEH,UAAAF;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import styles from './body.module.css';
|
|
5
|
-
|
|
6
|
-
export interface HBodyProps extends Omit<HStackProps, 'as'> {}
|
|
7
|
-
|
|
8
|
-
export const HBody = React.forwardRef<HTMLElement, HBodyProps>(function HBody(
|
|
9
|
-
{ children, className, ...props }: HBodyProps,
|
|
10
|
-
ref
|
|
11
|
-
) {
|
|
12
|
-
return (
|
|
13
|
-
<HStack
|
|
14
|
-
ref={ref}
|
|
15
|
-
as="div"
|
|
16
|
-
className={clsx(
|
|
17
|
-
styles['body'],
|
|
18
|
-
styles['h-body'],
|
|
19
|
-
className,
|
|
20
|
-
'tcn-h-body',
|
|
21
|
-
'tcn-body'
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
>
|
|
25
|
-
{children}
|
|
26
|
-
</HStack>
|
|
27
|
-
);
|
|
28
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { VStack, type VStackProps } from '../../stacks/v_stack.js';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import styles from './body.module.css';
|
|
5
|
-
|
|
6
|
-
export interface VBodyProps extends Omit<VStackProps, 'as'> {}
|
|
7
|
-
|
|
8
|
-
export const VBody = React.forwardRef<HTMLElement, VBodyProps>(function VBody(
|
|
9
|
-
{ children, className, ...props }: VBodyProps,
|
|
10
|
-
ref
|
|
11
|
-
) {
|
|
12
|
-
return (
|
|
13
|
-
<VStack
|
|
14
|
-
ref={ref}
|
|
15
|
-
as="div"
|
|
16
|
-
className={clsx(
|
|
17
|
-
styles['body'],
|
|
18
|
-
styles['v-body'],
|
|
19
|
-
className,
|
|
20
|
-
'tcn-body',
|
|
21
|
-
'tcn-v-body'
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
>
|
|
25
|
-
{children}
|
|
26
|
-
</VStack>
|
|
27
|
-
);
|
|
28
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { DrawerStart } from '../drawer_start/drawer_start';
|
|
2
|
-
import { DrawerEnd } from '../drawer_end/drawer_end';
|
|
3
|
-
import { DrawerTop } from '../drawer_top/drawer_top';
|
|
4
|
-
import { DrawerBottom } from '../drawer_bottom/drawer_bottom';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Surfaces/Drawers',
|
|
8
|
-
component: DrawerStart,
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const DrawerStartStory = () => {
|
|
13
|
-
return <DrawerStart>drawer start</DrawerStart>;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const DrawerEndStory = () => {
|
|
17
|
-
return <DrawerEnd>drawer end</DrawerEnd>;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const DrawerTopStory = () => {
|
|
21
|
-
return <DrawerTop>drawer top</DrawerTop>;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const DrawerBottomStory = () => {
|
|
25
|
-
return <DrawerBottom>drawer bottom</DrawerBottom>;
|
|
26
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import styles from './drawer_bottom.module.css';
|
|
5
|
-
|
|
6
|
-
export interface DrawerBottomProps extends Omit<VStackProps, 'as' | 'children'> {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const DrawerBottom = React.forwardRef<HTMLElement, DrawerBottomProps>(
|
|
11
|
-
function DrawerBottom({ children, className, ...props }: DrawerBottomProps, ref) {
|
|
12
|
-
return (
|
|
13
|
-
<VStack
|
|
14
|
-
ref={ref}
|
|
15
|
-
as="section"
|
|
16
|
-
className={clsx(styles.drawerBottom, className, 'tcn-drawer-bottom')}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
19
|
-
{children}
|
|
20
|
-
</VStack>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import styles from './drawer_end.module.css';
|
|
5
|
-
|
|
6
|
-
export interface DrawerEndProps extends Omit<VStackProps, 'as' | 'children'> {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const DrawerEnd = React.forwardRef<HTMLElement, DrawerEndProps>(function DrawerEnd(
|
|
11
|
-
{ children, className, ...props }: DrawerEndProps,
|
|
12
|
-
ref
|
|
13
|
-
) {
|
|
14
|
-
return (
|
|
15
|
-
<VStack
|
|
16
|
-
ref={ref}
|
|
17
|
-
as="section"
|
|
18
|
-
className={clsx(styles.drawerEnd, className, 'tcn-drawerEnd')}
|
|
19
|
-
{...props}
|
|
20
|
-
>
|
|
21
|
-
{children}
|
|
22
|
-
</VStack>
|
|
23
|
-
);
|
|
24
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import styles from './drawer_start.module.css';
|
|
5
|
-
|
|
6
|
-
export interface DrawerStartProps extends Omit<VStackProps, 'as' | 'children'> {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const DrawerStart = React.forwardRef<HTMLElement, DrawerStartProps>(
|
|
11
|
-
function DrawerStart({ children, className, ...props }: DrawerStartProps, ref) {
|
|
12
|
-
return (
|
|
13
|
-
<VStack
|
|
14
|
-
ref={ref}
|
|
15
|
-
as="section"
|
|
16
|
-
className={clsx(styles.drawerStart, className, 'tcn-drawerStart')}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
19
|
-
{children}
|
|
20
|
-
</VStack>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { VStack, type VStackProps } from '../../../stacks/v_stack.js';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import styles from './drawer_top.module.css';
|
|
5
|
-
|
|
6
|
-
export interface DrawerTopProps extends Omit<VStackProps, 'as' | 'children'> {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const DrawerTop = React.forwardRef<HTMLElement, DrawerTopProps>(function DrawerTop(
|
|
11
|
-
{ children, className, ...props }: DrawerTopProps,
|
|
12
|
-
ref
|
|
13
|
-
) {
|
|
14
|
-
return (
|
|
15
|
-
<VStack
|
|
16
|
-
ref={ref}
|
|
17
|
-
as="section"
|
|
18
|
-
className={clsx(styles.drawerTop, className, 'tcn-drawerTop')}
|
|
19
|
-
{...props}
|
|
20
|
-
>
|
|
21
|
-
{children}
|
|
22
|
-
</VStack>
|
|
23
|
-
);
|
|
24
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import styles from './page.module.css';
|
|
4
|
-
import { HStack, type HStackProps } from '../../stacks/h_stack.js';
|
|
5
|
-
|
|
6
|
-
export interface HPageProps extends Omit<HStackProps, 'as'> {}
|
|
7
|
-
|
|
8
|
-
export const HPage = React.forwardRef<HTMLElement, HPageProps>(function HPage(
|
|
9
|
-
{ children, className, ...props }: HPageProps,
|
|
10
|
-
ref
|
|
11
|
-
) {
|
|
12
|
-
return (
|
|
13
|
-
<HStack
|
|
14
|
-
ref={ref}
|
|
15
|
-
as="main"
|
|
16
|
-
className={clsx(styles.page, className, 'tcn-h-page')}
|
|
17
|
-
vAlign="start"
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
</HStack>
|
|
22
|
-
);
|
|
23
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { VStack, type VStackProps } from '../../stacks/v_stack.js';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import styles from './page.module.css';
|
|
5
|
-
|
|
6
|
-
export interface VPageProps extends Omit<VStackProps, 'as'> {}
|
|
7
|
-
|
|
8
|
-
export const VPage = React.forwardRef<HTMLElement, VPageProps>(function VPage(
|
|
9
|
-
{ children, className, ...props }: VPageProps,
|
|
10
|
-
ref
|
|
11
|
-
) {
|
|
12
|
-
return (
|
|
13
|
-
<VStack
|
|
14
|
-
ref={ref}
|
|
15
|
-
as="main"
|
|
16
|
-
className={clsx(styles.page, className, 'tcn-v-page')}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
19
|
-
{children}
|
|
20
|
-
</VStack>
|
|
21
|
-
);
|
|
22
|
-
});
|