@tcn/ui 0.10.0 → 0.12.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/feedback/index.d.ts +1 -0
- package/dist/feedback/index.d.ts.map +1 -1
- package/dist/feedback/index.js +6 -4
- package/dist/feedback/index.js.map +1 -1
- package/dist/feedback/progress/progress.d.ts +7 -0
- package/dist/feedback/progress/progress.d.ts.map +1 -0
- package/dist/feedback/progress/progress.js +38 -0
- package/dist/feedback/progress/progress.js.map +1 -0
- package/dist/feedback/progress/progress_bar.d.ts +0 -1
- package/dist/feedback/progress/progress_bar.d.ts.map +1 -1
- package/dist/feedback/progress/progress_bar.js +6 -46
- package/dist/feedback/progress/progress_bar.js.map +1 -1
- package/dist/form/field/common/status_input/status_input.js +4 -3
- 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 +33 -35
- 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 +34 -36
- package/dist/form/field/v_field/v_field.js.map +1 -1
- package/dist/frame.css +1 -1
- package/dist/inputs/color_input/color_input.d.ts.map +1 -1
- package/dist/inputs/color_input/color_input.js +47 -46
- package/dist/inputs/color_input/color_input.js.map +1 -1
- package/dist/inputs/combo_box/combo_box.d.ts.map +1 -1
- package/dist/inputs/combo_box/combo_box.js +61 -58
- package/dist/inputs/combo_box/combo_box.js.map +1 -1
- package/dist/inputs/index.d.ts +1 -0
- package/dist/inputs/index.d.ts.map +1 -1
- package/dist/inputs/index.js +34 -31
- package/dist/inputs/index.js.map +1 -1
- package/dist/inputs/input/input.js +9 -9
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/input_group/input_group.d.ts +5 -0
- package/dist/inputs/input_group/input_group.d.ts.map +1 -0
- package/dist/inputs/input_group/input_group.js +20 -0
- package/dist/inputs/input_group/input_group.js.map +1 -0
- package/dist/inputs/phone_number_input/countries_phone_information.d.ts +2 -2
- package/dist/inputs/phone_number_input/countries_phone_information.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/countries_phone_information.js +5 -353
- package/dist/inputs/phone_number_input/countries_phone_information.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_context.d.ts +24 -0
- package/dist/inputs/phone_number_input/phone_number_context.d.ts.map +1 -0
- package/dist/inputs/phone_number_input/phone_number_context.js +23 -0
- package/dist/inputs/phone_number_input/phone_number_context.js.map +1 -0
- package/dist/inputs/phone_number_input/phone_number_country_select_adapter.d.ts +19 -0
- package/dist/inputs/phone_number_input/phone_number_country_select_adapter.d.ts.map +1 -0
- package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js +77 -0
- package/dist/inputs/phone_number_input/phone_number_country_select_adapter.js.map +1 -0
- package/dist/inputs/phone_number_input/phone_number_input.d.ts +16 -14
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +104 -274
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input_adapter.d.ts +6 -0
- package/dist/inputs/phone_number_input/phone_number_input_adapter.d.ts.map +1 -0
- package/dist/inputs/phone_number_input/phone_number_input_adapter.js +95 -0
- package/dist/inputs/phone_number_input/phone_number_input_adapter.js.map +1 -0
- package/dist/inputs/phone_number_input/sip_input.d.ts +12 -0
- package/dist/inputs/phone_number_input/sip_input.d.ts.map +1 -0
- package/dist/inputs/phone_number_input/sip_input.js +111 -0
- package/dist/inputs/phone_number_input/sip_input.js.map +1 -0
- package/dist/inputs/select/select.d.ts.map +1 -1
- package/dist/inputs/select/select.js +3 -2
- package/dist/inputs/select/select.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts +4 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +148 -121
- package/dist/inputs/suggestions/suggestion_list.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.d.ts.map +1 -1
- package/dist/inputs/unit_input/unit_input.js +39 -39
- package/dist/inputs/unit_input/unit_input.js.map +1 -1
- package/dist/overlay/frame/frame.d.ts +8 -4
- package/dist/overlay/frame/frame.d.ts.map +1 -1
- package/dist/overlay/frame/frame.js +88 -24
- package/dist/overlay/frame/frame.js.map +1 -1
- package/dist/overlay/popper/base/dismissal_decorator.js.map +1 -1
- package/dist/overlay/popper/legacy/popper.d.ts.map +1 -1
- package/dist/overlay/popper/legacy/popper.js +52 -50
- package/dist/overlay/popper/legacy/popper.js.map +1 -1
- package/dist/phone_number_input.css +1 -1
- package/dist/progress_bar-CPP0Jyv-.js +38 -0
- package/dist/progress_bar-CPP0Jyv-.js.map +1 -0
- package/dist/progress_bar.css +1 -1
- package/dist/stacks/box/bottom_resize_handle.d.ts +2 -8
- package/dist/stacks/box/bottom_resize_handle.d.ts.map +1 -1
- package/dist/stacks/box/bottom_resize_handle.js.map +1 -1
- package/dist/stacks/box/box.d.ts +2 -2
- package/dist/stacks/box/box.d.ts.map +1 -1
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/box/end_resize_handle.d.ts +2 -8
- package/dist/stacks/box/end_resize_handle.d.ts.map +1 -1
- package/dist/stacks/box/end_resize_handle.js.map +1 -1
- package/dist/stacks/box/left_resize_handle.d.ts +2 -8
- package/dist/stacks/box/left_resize_handle.d.ts.map +1 -1
- package/dist/stacks/box/left_resize_handle.js.map +1 -1
- package/dist/stacks/box/resize_handlers.d.ts +3 -2
- package/dist/stacks/box/resize_handlers.d.ts.map +1 -1
- package/dist/stacks/box/resize_handlers.js +41 -37
- package/dist/stacks/box/resize_handlers.js.map +1 -1
- package/dist/stacks/box/right_resize_handle.d.ts +2 -8
- package/dist/stacks/box/right_resize_handle.d.ts.map +1 -1
- package/dist/stacks/box/right_resize_handle.js.map +1 -1
- package/dist/stacks/box/start_resize_handle.d.ts +2 -8
- package/dist/stacks/box/start_resize_handle.d.ts.map +1 -1
- package/dist/stacks/box/start_resize_handle.js +4 -4
- package/dist/stacks/box/start_resize_handle.js.map +1 -1
- package/dist/stacks/box/top_resize_handle.d.ts +2 -8
- package/dist/stacks/box/top_resize_handle.d.ts.map +1 -1
- package/dist/stacks/box/top_resize_handle.js +4 -4
- package/dist/stacks/box/top_resize_handle.js.map +1 -1
- package/dist/stacks/box/types.d.ts +18 -0
- package/dist/stacks/box/types.d.ts.map +1 -0
- package/dist/stacks/h_collapsible_box.js +25 -25
- package/dist/stacks/h_collapsible_box.js.map +1 -1
- package/dist/stacks/index.d.ts +1 -0
- package/dist/stacks/index.d.ts.map +1 -1
- package/dist/stacks/v_collapsible_box.js +25 -25
- package/dist/stacks/v_collapsible_box.js.map +1 -1
- package/dist/suggestion_list.css +1 -1
- package/dist/surfaces/modal/modal.d.ts +3 -4
- package/dist/surfaces/modal/modal.d.ts.map +1 -1
- package/dist/surfaces/modal/modal.js +10 -8
- package/dist/surfaces/modal/modal.js.map +1 -1
- package/dist/surfaces/window/window.d.ts +3 -4
- package/dist/surfaces/window/window.d.ts.map +1 -1
- package/dist/surfaces/window/window.js +26 -14
- package/dist/surfaces/window/window.js.map +1 -1
- package/dist/themes/stylesheets/reset.css +1 -1
- package/dist/themes/stylesheets/reset.js +8 -1
- 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 +186 -19
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/typography/body_text/body_text.d.ts.map +1 -1
- package/dist/typography/body_text/body_text.js +12 -10
- package/dist/typography/body_text/body_text.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 +22 -19
- package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -1
- package/package.json +4 -2
- package/src/feedback/index.ts +1 -0
- package/src/feedback/progress/progress.module.css +5 -0
- package/src/feedback/progress/progress.stories.tsx +48 -0
- package/src/feedback/progress/progress.tsx +39 -0
- package/src/feedback/progress/progress_bar.module.css +4 -28
- package/src/feedback/progress/progress_bar.stories.tsx +1 -1
- package/src/feedback/progress/progress_bar.tsx +14 -26
- package/src/form/field/h_field/h_field.tsx +0 -4
- package/src/form/field/v_field/v_field.stories.tsx +8 -0
- package/src/form/field/v_field/v_field.tsx +1 -4
- package/src/form/field_set/field_set.stories.tsx +2 -1
- package/src/inputs/__docs__/inputs.mdx +81 -0
- package/src/inputs/__docs__/inputs.stories.tsx +268 -0
- package/src/inputs/color_input/color_input.tsx +17 -17
- package/src/inputs/combo_box/combo_box.tsx +17 -13
- package/src/inputs/index.ts +2 -0
- package/src/inputs/input/input.tsx +1 -1
- package/src/inputs/input_group/input_group.tsx +26 -0
- package/src/inputs/phone_number_input/countries_phone_information.ts +6 -353
- package/src/inputs/phone_number_input/phone_number_context.tsx +32 -0
- package/src/inputs/phone_number_input/phone_number_country_select_adapter.tsx +126 -0
- package/src/inputs/phone_number_input/phone_number_input.module.css +5 -63
- package/src/inputs/phone_number_input/phone_number_input.stories.tsx +180 -150
- package/src/inputs/phone_number_input/phone_number_input.tsx +133 -400
- package/src/inputs/phone_number_input/phone_number_input_adapter.tsx +123 -0
- package/src/inputs/phone_number_input/sip_input.tsx +147 -0
- package/src/inputs/select/select.stories.tsx +23 -2
- package/src/inputs/select/select.tsx +13 -14
- package/src/inputs/suggestions/suggestion_list.module.css +1 -0
- package/src/inputs/suggestions/suggestion_list.stories.tsx +12 -8
- package/src/inputs/suggestions/suggestion_list.tsx +82 -42
- package/src/inputs/textarea/textarea.tsx +1 -1
- package/src/inputs/unit_input/unit_input.tsx +17 -17
- package/src/overlay/frame/frame.module.css +2 -4
- package/src/overlay/frame/frame.stories.tsx +13 -10
- package/src/overlay/frame/frame.tsx +121 -15
- package/src/overlay/popper/base/dismissal_decorator.tsx +1 -1
- package/src/overlay/popper/legacy/popper.tsx +5 -1
- package/src/stacks/box/bottom_resize_handle.tsx +2 -8
- package/src/stacks/box/box.tsx +14 -2
- package/src/stacks/box/end_resize_handle.tsx +3 -8
- package/src/stacks/box/left_resize_handle.tsx +3 -8
- package/src/stacks/box/resize_handlers.ts +28 -12
- package/src/stacks/box/right_resize_handle.tsx +2 -8
- package/src/stacks/box/start_resize_handle.tsx +4 -9
- package/src/stacks/box/top_resize_handle.tsx +4 -8
- package/src/stacks/box/types.ts +44 -0
- package/src/stacks/h_collapsible_box.tsx +2 -2
- package/src/stacks/index.ts +1 -0
- package/src/stacks/v_collapsible_box.tsx +2 -2
- package/src/surfaces/modal/modal.tsx +6 -4
- package/src/surfaces/window/window.stories.tsx +9 -1
- package/src/surfaces/window/window.tsx +19 -7
- package/src/themes/stories/controls_fieldset.tsx +1 -1
- package/src/themes/stylesheets/reset.css +8 -1
- package/src/themes/themes/ergo/ergo_theme.css +186 -19
- package/src/typography/body_text/body_text.tsx +2 -0
- package/src/utils/dnd/__stories__/draggable.stories.tsx +14 -8
- package/src/utils/dnd/hooks/use_drag_container.ts +13 -3
- package/src/inputs/phone_number_input/__tests__/utils.test.ts +0 -52
package/dist/feedback/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feedback/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feedback/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC"}
|
package/dist/feedback/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Loading as e } from "./loading/loading.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { P as a } from "../progress_bar-CPP0Jyv-.js";
|
|
3
|
+
import { Progress as m } from "./progress/progress.js";
|
|
4
|
+
import { Lazy as t } from "./lazy/lazy.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
t as Lazy,
|
|
6
7
|
e as Loading,
|
|
7
|
-
|
|
8
|
+
m as Progress,
|
|
9
|
+
a as ProgressBar
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React, HTMLAttributes } from 'react';
|
|
2
|
+
export interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
message: string;
|
|
4
|
+
value: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/feedback/progress/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAU9C,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,QAAQ,sFAuBnB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { BodyText as e } from "../../typography/body_text/body_text.js";
|
|
4
|
+
import "../../typography/callout/callout.js";
|
|
5
|
+
import "../../typography/caption/caption.js";
|
|
6
|
+
import "../../typography/footnote/footnote.js";
|
|
7
|
+
import "../../typography/headline/headline.js";
|
|
8
|
+
import "../../typography/subheadline/subheadline.js";
|
|
9
|
+
import "../../typography/title/title.js";
|
|
10
|
+
import { HStack as a } from "../../stacks/h_stack.js";
|
|
11
|
+
import { Spacer as s } from "../../stacks/spacer.js";
|
|
12
|
+
import { VStack as f } from "../../stacks/v_stack.js";
|
|
13
|
+
import d from "clsx";
|
|
14
|
+
import { P as l, s as g } from "../../progress_bar-CPP0Jyv-.js";
|
|
15
|
+
const H = c.forwardRef(function({ message: i, value: o, ...m }, p) {
|
|
16
|
+
const n = `${(o * 100).toFixed(0)}%`;
|
|
17
|
+
return /* @__PURE__ */ t(
|
|
18
|
+
f,
|
|
19
|
+
{
|
|
20
|
+
ref: p,
|
|
21
|
+
className: d(g["progress-container"], "tcn-progress-container"),
|
|
22
|
+
...m,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ t(a, { height: "auto", vAlign: "end", children: [
|
|
25
|
+
/* @__PURE__ */ r(e, { children: i }),
|
|
26
|
+
/* @__PURE__ */ r(s, {}),
|
|
27
|
+
/* @__PURE__ */ r(s, { width: "8px" }),
|
|
28
|
+
/* @__PURE__ */ r(e, { size: "sm", style: { flexShrink: 0 }, children: n })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ r(l, { value: o })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
H as Progress
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sources":["../../../src/feedback/progress/progress.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport { BodyText } from '../../typography/index.js';\nimport { HStack } from '../../stacks/h_stack.js';\nimport { Spacer } from '../../stacks/spacer.js';\nimport { VStack } from '../../stacks/v_stack.js';\nimport clsx from 'clsx';\n\nimport styles from './progress_bar.module.css';\nimport { ProgressBar } from './progress_bar.js';\n\nexport interface ProgressProps extends HTMLAttributes<HTMLDivElement> {\n message: string;\n value: number;\n}\n\nexport const Progress = React.forwardRef(function Progress(\n { message, value, ...props }: ProgressProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const progressPercent = `${(value * 100).toFixed(0)}%`;\n\n return (\n <VStack\n ref={ref}\n className={clsx(styles['progress-container'], 'tcn-progress-container')}\n {...props}\n >\n <HStack height=\"auto\" vAlign=\"end\">\n <BodyText>{message}</BodyText>\n <Spacer />\n <Spacer width=\"8px\" />\n <BodyText size=\"sm\" style={{ flexShrink: 0 }}>\n {progressPercent}\n </BodyText>\n </HStack>\n <ProgressBar value={value} />\n </VStack>\n );\n});\n"],"names":["Progress","React","message","value","props","ref","progressPercent","jsxs","VStack","clsx","styles","HStack","jsx","BodyText","Spacer","ProgressBar"],"mappings":";;;;;;;;;;;;;;AAeO,MAAMA,IAAWC,EAAM,WAAW,SACvC,EAAE,SAAAC,GAAS,OAAAC,GAAO,GAAGC,EAAA,GACrBC,GACA;AACA,QAAMC,IAAkB,IAAIH,IAAQ,KAAK,QAAQ,CAAC,CAAC;AAEnD,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,WAAWI,EAAKC,EAAO,oBAAoB,GAAG,wBAAwB;AAAA,MACrE,GAAGN;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAG,EAACI,GAAA,EAAO,QAAO,QAAO,QAAO,OAC3B,UAAA;AAAA,UAAA,gBAAAC,EAACC,KAAU,UAAAX,EAAA,CAAQ;AAAA,4BAClBY,GAAA,EAAO;AAAA,UACR,gBAAAF,EAACE,GAAA,EAAO,OAAM,MAAA,CAAM;AAAA,UACpB,gBAAAF,EAACC,KAAS,MAAK,MAAK,OAAO,EAAE,YAAY,EAAA,GACtC,UAAAP,EAAA,CACH;AAAA,QAAA,GACF;AAAA,QACA,gBAAAM,EAACG,KAAY,OAAAZ,EAAA,CAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGjC,CAAC;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React, HTMLAttributes } from 'react';
|
|
2
2
|
export interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
message: string;
|
|
4
3
|
value: number;
|
|
5
4
|
}
|
|
6
5
|
export declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress_bar.d.ts","sourceRoot":"","sources":["../../../src/feedback/progress/progress_bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"progress_bar.d.ts","sourceRoot":"","sources":["../../../src/feedback/progress/progress_bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAM9C,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,yFAyBtB,CAAC"}
|
|
@@ -1,49 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import "../../
|
|
6
|
-
import "../../typography/footnote/footnote.js";
|
|
7
|
-
import "../../typography/headline/headline.js";
|
|
8
|
-
import "../../typography/subheadline/subheadline.js";
|
|
9
|
-
import "../../typography/title/title.js";
|
|
10
|
-
import { HStack as l } from "../../stacks/h_stack.js";
|
|
11
|
-
import { Spacer as a } from "../../stacks/spacer.js";
|
|
12
|
-
import { VStack as d } from "../../stacks/v_stack.js";
|
|
13
|
-
import { ZStack as b } from "../../stacks/z_stack.js";
|
|
14
|
-
import f from "clsx";
|
|
15
|
-
import '../../progress_bar.css';const h = "_progress-bar-container_014b4d9", _ = "_progress-bar-background_9176cc0", x = "_progress-bar_057c33d", k = "_progress-bar-fill_00854f0", u = "_moveStripes_d219e85", s = { "progress-bar-container": h, "progress-bar-background": _, "progress-bar": x, "progress-bar-fill": k, moveStripes: u }, T = m.forwardRef(function({ message: i, value: p, ...c }, n) {
|
|
16
|
-
const o = `${(p * 100).toFixed(0)}%`, g = { "--progress-percentage": o };
|
|
17
|
-
return /* @__PURE__ */ e(
|
|
18
|
-
d,
|
|
19
|
-
{
|
|
20
|
-
ref: n,
|
|
21
|
-
className: f(s["progress-bar-container"], "tcn-progress-bar"),
|
|
22
|
-
...c,
|
|
23
|
-
children: [
|
|
24
|
-
/* @__PURE__ */ e(l, { height: "auto", vAlign: "end", children: [
|
|
25
|
-
/* @__PURE__ */ r(t, { children: i }),
|
|
26
|
-
/* @__PURE__ */ r(a, {}),
|
|
27
|
-
/* @__PURE__ */ r(a, { width: "8px" }),
|
|
28
|
-
/* @__PURE__ */ r(t, { size: "sm", style: { flexShrink: 0 }, children: o })
|
|
29
|
-
] }),
|
|
30
|
-
/* @__PURE__ */ e(b, { height: "8px", hAlign: "start", children: [
|
|
31
|
-
/* @__PURE__ */ r("div", { className: s["progress-bar-background"] }),
|
|
32
|
-
/* @__PURE__ */ r(
|
|
33
|
-
"div",
|
|
34
|
-
{
|
|
35
|
-
"data-finished": o === "100%",
|
|
36
|
-
style: g,
|
|
37
|
-
className: s["progress-bar-fill"]
|
|
38
|
-
}
|
|
39
|
-
),
|
|
40
|
-
/* @__PURE__ */ r("div", { className: s["progress-bar"] })
|
|
41
|
-
] })
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
});
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "../../stacks/z_stack.js";
|
|
4
|
+
import "clsx";
|
|
5
|
+
import { P as s } from "../../progress_bar-CPP0Jyv-.js";
|
|
46
6
|
export {
|
|
47
|
-
|
|
7
|
+
s as ProgressBar
|
|
48
8
|
};
|
|
49
9
|
//# sourceMappingURL=progress_bar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress_bar.js","sources":[
|
|
1
|
+
{"version":3,"file":"progress_bar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -4,7 +4,8 @@ import { LockTwoIcon as f } from "@tcn/icons/lock_two_icon.js";
|
|
|
4
4
|
import { HStack as m } from "../../../../stacks/h_stack.js";
|
|
5
5
|
import p from "react";
|
|
6
6
|
import { Loading as g } from "../../../../feedback/loading/loading.js";
|
|
7
|
-
import "../../../../
|
|
7
|
+
import "../../../../progress_bar-CPP0Jyv-.js";
|
|
8
|
+
import "../../../../feedback/progress/progress.js";
|
|
8
9
|
import "@tcn/state";
|
|
9
10
|
import "../../../../stacks/v_stack.js";
|
|
10
11
|
import { clsx as o } from "clsx";
|
|
@@ -25,7 +26,7 @@ import '../../../../status_input.css';const A = "_field-error_6d015c9", x = "_fi
|
|
|
25
26
|
default:
|
|
26
27
|
return null;
|
|
27
28
|
}
|
|
28
|
-
},
|
|
29
|
+
}, y = p.forwardRef(function({ children: i, state: t = "default", className: s, ...l }, c) {
|
|
29
30
|
const d = t === "default" || t === "error";
|
|
30
31
|
return /* @__PURE__ */ a(
|
|
31
32
|
m,
|
|
@@ -51,6 +52,6 @@ import '../../../../status_input.css';const A = "_field-error_6d015c9", x = "_fi
|
|
|
51
52
|
});
|
|
52
53
|
export {
|
|
53
54
|
I as AdornmentMap,
|
|
54
|
-
|
|
55
|
+
y as FieldStatusInput
|
|
55
56
|
};
|
|
56
57
|
//# sourceMappingURL=status_input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status_input.js","sources":["../../../../../src/form/field/common/status_input/status_input.tsx"],"sourcesContent":["import { AlertTriangleIcon } from '@tcn/icons/alert_triangle_icon.js';\nimport { LockTwoIcon } from '@tcn/icons/lock_two_icon.js';\nimport { HStack } from '../../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../../stacks/h_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../../stacks/types/as.js';\nimport React from 'react';\nimport { Loading } from '../../../../feedback/index.js';\nimport { clsx } from 'clsx';\nimport styles from './status_input.module.css';\n\n/*\n TODO: I really want to make these themeable.\n The way we do that is simply put a div placeholder with\n a class that the theme can override. They can use svgs as \n backgrounds for icons. This would make it so the component\n library doesn't dictate the icon set used. \n*/\nconst LockedAdornment: React.FC = () => {\n return <LockTwoIcon className=\"tcn-field-lock\" size=\"lg\" />;\n};\n\nconst LoadingAdornment: React.FC = () => {\n return <Loading size=\"20px\" className=\"tcn-field-loader\" />;\n};\n\nconst ErroredAdornment: React.FC = () => {\n return (\n <AlertTriangleIcon\n className={clsx(styles['field-error'], 'tcn-field-error')}\n size=\"lg\"\n />\n );\n};\n\nexport const AdornmentMap: React.FC<{ state: StatusInputState }> = ({ state }) => {\n switch (state) {\n case 'locked':\n return <LockedAdornment />;\n case 'loading':\n return <LoadingAdornment />;\n case 'error':\n return <ErroredAdornment />;\n default:\n return null;\n }\n};\n\nexport type StatusInputState = 'locked' | 'loading' | 'error' | 'default';\nexport interface StatusInputOwnProps {\n children: React.ReactNode;\n state?: StatusInputState;\n}\n\nexport type StatusInputProps = WithDetailedHTMLProps<\n StatusInputOwnProps & HStackOwnProps,\n 'div'\n>;\n\nexport const FieldStatusInput = React.forwardRef(function StatusInput(\n { children: Control, state = 'default', className, ...props }: StatusInputProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const showControl = state === 'default' || state === 'error';\n\n return (\n <HStack\n ref={ref}\n data-state={state}\n className={clsx(\n 'tcn-field-status-input',\n styles['field-status-input'],\n className,\n 'tcn-field-status-input'\n )}\n vAlign=\"center\"\n hAlign=\"end\"\n gap=\"4px\"\n {...props}\n >\n {showControl && Control}\n <AdornmentMap state={state} />\n </HStack>\n );\n});\n"],"names":["LockedAdornment","jsx","LockTwoIcon","LoadingAdornment","Loading","ErroredAdornment","AlertTriangleIcon","clsx","styles","AdornmentMap","state","FieldStatusInput","React","Control","className","props","ref","showControl","jsxs","HStack"],"mappings":"
|
|
1
|
+
{"version":3,"file":"status_input.js","sources":["../../../../../src/form/field/common/status_input/status_input.tsx"],"sourcesContent":["import { AlertTriangleIcon } from '@tcn/icons/alert_triangle_icon.js';\nimport { LockTwoIcon } from '@tcn/icons/lock_two_icon.js';\nimport { HStack } from '../../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../../stacks/h_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../../stacks/types/as.js';\nimport React from 'react';\nimport { Loading } from '../../../../feedback/index.js';\nimport { clsx } from 'clsx';\nimport styles from './status_input.module.css';\n\n/*\n TODO: I really want to make these themeable.\n The way we do that is simply put a div placeholder with\n a class that the theme can override. They can use svgs as \n backgrounds for icons. This would make it so the component\n library doesn't dictate the icon set used. \n*/\nconst LockedAdornment: React.FC = () => {\n return <LockTwoIcon className=\"tcn-field-lock\" size=\"lg\" />;\n};\n\nconst LoadingAdornment: React.FC = () => {\n return <Loading size=\"20px\" className=\"tcn-field-loader\" />;\n};\n\nconst ErroredAdornment: React.FC = () => {\n return (\n <AlertTriangleIcon\n className={clsx(styles['field-error'], 'tcn-field-error')}\n size=\"lg\"\n />\n );\n};\n\nexport const AdornmentMap: React.FC<{ state: StatusInputState }> = ({ state }) => {\n switch (state) {\n case 'locked':\n return <LockedAdornment />;\n case 'loading':\n return <LoadingAdornment />;\n case 'error':\n return <ErroredAdornment />;\n default:\n return null;\n }\n};\n\nexport type StatusInputState = 'locked' | 'loading' | 'error' | 'default';\nexport interface StatusInputOwnProps {\n children: React.ReactNode;\n state?: StatusInputState;\n}\n\nexport type StatusInputProps = WithDetailedHTMLProps<\n StatusInputOwnProps & HStackOwnProps,\n 'div'\n>;\n\nexport const FieldStatusInput = React.forwardRef(function StatusInput(\n { children: Control, state = 'default', className, ...props }: StatusInputProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const showControl = state === 'default' || state === 'error';\n\n return (\n <HStack\n ref={ref}\n data-state={state}\n className={clsx(\n 'tcn-field-status-input',\n styles['field-status-input'],\n className,\n 'tcn-field-status-input'\n )}\n vAlign=\"center\"\n hAlign=\"end\"\n gap=\"4px\"\n {...props}\n >\n {showControl && Control}\n <AdornmentMap state={state} />\n </HStack>\n );\n});\n"],"names":["LockedAdornment","jsx","LockTwoIcon","LoadingAdornment","Loading","ErroredAdornment","AlertTriangleIcon","clsx","styles","AdornmentMap","state","FieldStatusInput","React","Control","className","props","ref","showControl","jsxs","HStack"],"mappings":";;;;;;;;;;;wHAiBMA,IAA4B,MACzB,gBAAAC,EAACC,GAAA,EAAY,WAAU,kBAAiB,MAAK,MAAK,GAGrDC,IAA6B,MAC1B,gBAAAF,EAACG,GAAA,EAAQ,MAAK,QAAO,WAAU,oBAAmB,GAGrDC,IAA6B,MAE/B,gBAAAJ;AAAA,EAACK;AAAA,EAAA;AAAA,IACC,WAAWC,EAAKC,EAAO,aAAa,GAAG,iBAAiB;AAAA,IACxD,MAAK;AAAA,EAAA;AAAA,GAKEC,IAAsD,CAAC,EAAE,OAAAC,QAAY;AAChF,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,+BAAQV,GAAA,EAAgB;AAAA,IAC1B,KAAK;AACH,+BAAQG,GAAA,EAAiB;AAAA,IAC3B,KAAK;AACH,+BAAQE,GAAA,EAAiB;AAAA,IAC3B;AACE,aAAO;AAAA,EAAA;AAEb,GAaaM,IAAmBC,EAAM,WAAW,SAC/C,EAAE,UAAUC,GAAS,OAAAH,IAAQ,WAAW,WAAAI,GAAW,GAAGC,EAAA,GACtDC,GACA;AACA,QAAMC,IAAcP,MAAU,aAAaA,MAAU;AAErD,SACE,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,cAAYN;AAAA,MACZ,WAAWH;AAAA,QACT;AAAA,QACAC,EAAO,oBAAoB;AAAA,QAC3BM;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,QAAO;AAAA,MACP,QAAO;AAAA,MACP,KAAI;AAAA,MACH,GAAGC;AAAA,MAEH,UAAA;AAAA,QAAAE,KAAeJ;AAAA,QAChB,gBAAAZ,EAACQ,KAAa,OAAAC,EAAA,CAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGlC,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_field.d.ts","sourceRoot":"","sources":["../../../../src/form/field/h_field/h_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AACD,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAGxF,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"h_field.d.ts","sourceRoot":"","sources":["../../../../src/form/field/h_field/h_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AACD,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAGxF,eAAO,MAAM,MAAM,iGA+CjB,CAAC"}
|
|
@@ -1,60 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { HStack as
|
|
1
|
+
import { jsxs as x, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { HStack as F } from "../../../stacks/h_stack.js";
|
|
3
3
|
import { clsx as H } from "clsx";
|
|
4
4
|
import _, { useState as g } from "react";
|
|
5
|
-
import { FieldHeader as
|
|
5
|
+
import { FieldHeader as I } from "../common/field_header.js";
|
|
6
6
|
import { FieldControl as S } from "../common/field_control/field_control.js";
|
|
7
|
-
import { FieldStatusInput as
|
|
8
|
-
import '../../../h_field.css';const
|
|
9
|
-
let
|
|
10
|
-
const
|
|
11
|
-
label:
|
|
12
|
-
description:
|
|
13
|
-
errorMessage:
|
|
14
|
-
children:
|
|
15
|
-
labelWidth:
|
|
7
|
+
import { FieldStatusInput as j } from "../common/status_input/status_input.js";
|
|
8
|
+
import '../../../h_field.css';const v = "_h-field_845b93f", w = { "h-field": v };
|
|
9
|
+
let A = 0;
|
|
10
|
+
const q = _.forwardRef(function({
|
|
11
|
+
label: l,
|
|
12
|
+
description: a,
|
|
13
|
+
errorMessage: i,
|
|
14
|
+
children: f,
|
|
15
|
+
labelWidth: d = "40%",
|
|
16
16
|
locked: t = !1,
|
|
17
17
|
loading: e = !1,
|
|
18
|
-
className:
|
|
19
|
-
id:
|
|
20
|
-
required:
|
|
21
|
-
...
|
|
22
|
-
},
|
|
23
|
-
const [
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
18
|
+
className: s,
|
|
19
|
+
id: n,
|
|
20
|
+
required: c,
|
|
21
|
+
...m
|
|
22
|
+
}, h) {
|
|
23
|
+
const [p] = g(() => n || `h-field-${A++}`), o = !!i, u = t ? "locked" : e ? "loading" : o ? "error" : "default";
|
|
24
|
+
return /* @__PURE__ */ x(
|
|
25
|
+
F,
|
|
26
26
|
{
|
|
27
|
-
ref:
|
|
27
|
+
ref: h,
|
|
28
28
|
as: "div",
|
|
29
|
-
"aria-labelledby": u,
|
|
30
|
-
"aria-describedby": b,
|
|
31
29
|
"data-locked": t,
|
|
32
|
-
"data-error":
|
|
30
|
+
"data-error": o,
|
|
33
31
|
"data-loading": e,
|
|
34
|
-
className: H("tcn-base-field",
|
|
32
|
+
className: H("tcn-base-field", w["h-field"], "tcn-h-field", s),
|
|
35
33
|
vAlign: "start",
|
|
36
34
|
hAlign: "start",
|
|
37
35
|
height: "auto",
|
|
38
36
|
gap: "4px",
|
|
39
|
-
...
|
|
37
|
+
...m,
|
|
40
38
|
children: [
|
|
41
39
|
/* @__PURE__ */ r(
|
|
42
|
-
|
|
40
|
+
I,
|
|
43
41
|
{
|
|
44
|
-
minWidth:
|
|
45
|
-
width:
|
|
46
|
-
id:
|
|
47
|
-
label:
|
|
48
|
-
description:
|
|
49
|
-
required:
|
|
42
|
+
minWidth: d,
|
|
43
|
+
width: d,
|
|
44
|
+
id: p,
|
|
45
|
+
label: l,
|
|
46
|
+
description: a,
|
|
47
|
+
required: c
|
|
50
48
|
}
|
|
51
49
|
),
|
|
52
|
-
/* @__PURE__ */ r(S, { errorMessage:
|
|
50
|
+
/* @__PURE__ */ r(S, { errorMessage: i, loading: e, locked: t, children: /* @__PURE__ */ r(j, { state: u, children: f }) })
|
|
53
51
|
]
|
|
54
52
|
}
|
|
55
53
|
);
|
|
56
54
|
});
|
|
57
55
|
export {
|
|
58
|
-
|
|
56
|
+
q as HField
|
|
59
57
|
};
|
|
60
58
|
//# sourceMappingURL=h_field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"h_field.js","sources":["../../../../src/form/field/h_field/h_field.tsx"],"sourcesContent":["import { HStack } from '../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../stacks/h_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\nimport { clsx } from 'clsx';\nimport React, { useState } from 'react';\nimport styles from './h_field.module.css';\nimport type { FieldInput } from '../common/types.js';\nimport { FieldHeader } from '../common/field_header.js';\nimport { FieldControl } from '../common/field_control/field_control.js';\nimport { FieldStatusInput } from '../common/status_input/status_input.js';\n\nexport interface HFieldOwnProps extends FieldInput {\n labelWidth?: string;\n children: React.ReactNode;\n}\nexport type HFieldProps = WithDetailedHTMLProps<HFieldOwnProps, 'div'> & HStackOwnProps;\n\nlet idIndex = 0;\nexport const HField = React.forwardRef(function HField(\n {\n label,\n description,\n errorMessage,\n children: Control,\n labelWidth = '40%',\n locked = false,\n loading = false,\n className,\n id,\n required,\n ...props\n }: HFieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [finalId] = useState(() => id || `h-field-${idIndex++}`);\n const
|
|
1
|
+
{"version":3,"file":"h_field.js","sources":["../../../../src/form/field/h_field/h_field.tsx"],"sourcesContent":["import { HStack } from '../../../stacks/h_stack.js';\nimport type { HStackOwnProps } from '../../../stacks/h_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\nimport { clsx } from 'clsx';\nimport React, { useState } from 'react';\nimport styles from './h_field.module.css';\nimport type { FieldInput } from '../common/types.js';\nimport { FieldHeader } from '../common/field_header.js';\nimport { FieldControl } from '../common/field_control/field_control.js';\nimport { FieldStatusInput } from '../common/status_input/status_input.js';\n\nexport interface HFieldOwnProps extends FieldInput {\n labelWidth?: string;\n children: React.ReactNode;\n}\nexport type HFieldProps = WithDetailedHTMLProps<HFieldOwnProps, 'div'> & HStackOwnProps;\n\nlet idIndex = 0;\nexport const HField = React.forwardRef(function HField(\n {\n label,\n description,\n errorMessage,\n children: Control,\n labelWidth = '40%',\n locked = false,\n loading = false,\n className,\n id,\n required,\n ...props\n }: HFieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [finalId] = useState(() => id || `h-field-${idIndex++}`);\n const hasError = errorMessage ? true : false;\n const state = locked ? 'locked' : loading ? 'loading' : hasError ? 'error' : 'default';\n\n return (\n <HStack\n ref={ref}\n as=\"div\"\n data-locked={locked}\n data-error={hasError}\n data-loading={loading}\n className={clsx('tcn-base-field', styles['h-field'], 'tcn-h-field', className)}\n vAlign=\"start\"\n hAlign=\"start\"\n height=\"auto\"\n gap=\"4px\"\n {...props}\n >\n <FieldHeader\n minWidth={labelWidth}\n width={labelWidth}\n id={finalId}\n label={label}\n description={description}\n required={required}\n />\n <FieldControl errorMessage={errorMessage} loading={loading} locked={locked}>\n <FieldStatusInput state={state}>{Control}</FieldStatusInput>\n </FieldControl>\n </HStack>\n );\n});\n"],"names":["idIndex","HField","React","label","description","errorMessage","Control","labelWidth","locked","loading","className","id","required","props","ref","finalId","useState","hasError","state","jsxs","HStack","clsx","styles","jsx","FieldHeader","FieldControl","FieldStatusInput"],"mappings":";;;;;;;;AAiBA,IAAIA,IAAU;AACP,MAAMC,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAUC;AAAA,EACV,YAAAC,IAAa;AAAA,EACb,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAM,CAACC,CAAO,IAAIC,EAAS,MAAML,KAAM,WAAWX,GAAS,EAAE,GACvDiB,IAAW,EAAAZ,GACXa,IAAQV,IAAS,WAAWC,IAAU,YAAYQ,IAAW,UAAU;AAE7E,SACE,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAN;AAAA,MACA,IAAG;AAAA,MACH,eAAaN;AAAA,MACb,cAAYS;AAAA,MACZ,gBAAcR;AAAA,MACd,WAAWY,EAAK,kBAAkBC,EAAO,SAAS,GAAG,eAAeZ,CAAS;AAAA,MAC7E,QAAO;AAAA,MACP,QAAO;AAAA,MACP,QAAO;AAAA,MACP,KAAI;AAAA,MACH,GAAGG;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAU;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,UAAUjB;AAAA,YACV,OAAOA;AAAA,YACP,IAAIQ;AAAA,YACJ,OAAAZ;AAAA,YACA,aAAAC;AAAA,YACA,UAAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAW,EAACE,KAAa,cAAApB,GAA4B,SAAAI,GAAkB,QAAAD,GAC1D,UAAA,gBAAAe,EAACG,GAAA,EAAiB,OAAAR,GAAe,UAAAZ,EAAA,CAAQ,EAAA,CAC3C;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v_field.d.ts","sourceRoot":"","sources":["../../../../src/form/field/v_field/v_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAExF,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"v_field.d.ts","sourceRoot":"","sources":["../../../../src/form/field/v_field/v_field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC,cAAc,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAExF,eAAO,MAAM,MAAM,iGAqDjB,CAAC"}
|
|
@@ -1,61 +1,59 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { VStack as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { VStack as x } from "../../../stacks/v_stack.js";
|
|
3
|
+
import { clsx as g } from "clsx";
|
|
4
|
+
import v, { useState as F } from "react";
|
|
5
5
|
import { FieldControl as A } from "../common/field_control/field_control.js";
|
|
6
|
-
import { FieldHeader as
|
|
6
|
+
import { FieldHeader as I } from "../common/field_header.js";
|
|
7
7
|
import { FieldStatusInput as S } from "../common/status_input/status_input.js";
|
|
8
8
|
import '../../../v_field.css';const V = {};
|
|
9
|
-
let
|
|
10
|
-
const
|
|
11
|
-
label:
|
|
12
|
-
description:
|
|
13
|
-
errorMessage:
|
|
14
|
-
children:
|
|
9
|
+
let j = 0;
|
|
10
|
+
const N = v.forwardRef(function({
|
|
11
|
+
label: l,
|
|
12
|
+
description: d,
|
|
13
|
+
errorMessage: i,
|
|
14
|
+
children: o,
|
|
15
15
|
locked: t = !1,
|
|
16
|
-
loading:
|
|
17
|
-
maxWidth:
|
|
18
|
-
minWidth:
|
|
19
|
-
className:
|
|
20
|
-
id:
|
|
16
|
+
loading: r = !1,
|
|
17
|
+
maxWidth: W,
|
|
18
|
+
minWidth: _,
|
|
19
|
+
className: s,
|
|
20
|
+
id: n,
|
|
21
21
|
required: f,
|
|
22
22
|
...m
|
|
23
|
-
},
|
|
24
|
-
const [
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
23
|
+
}, c) {
|
|
24
|
+
const [h] = F(() => n || `v-field-${j++}`), a = !!i, p = t ? "locked" : r ? "loading" : a ? "error" : "default";
|
|
25
|
+
return /* @__PURE__ */ u(
|
|
26
|
+
x,
|
|
27
27
|
{
|
|
28
|
-
ref:
|
|
28
|
+
ref: c,
|
|
29
29
|
as: "div",
|
|
30
|
-
"aria-labelledby": h,
|
|
31
|
-
"aria-describedby": u,
|
|
32
30
|
"data-locked": t,
|
|
33
|
-
"data-error":
|
|
34
|
-
"data-loading":
|
|
35
|
-
className:
|
|
31
|
+
"data-error": a,
|
|
32
|
+
"data-loading": r,
|
|
33
|
+
className: g("tcn-base-field", V["v-field"], "tcn-v-field", s),
|
|
36
34
|
vAlign: "start",
|
|
37
35
|
hAlign: "start",
|
|
38
36
|
height: "auto",
|
|
39
37
|
gap: "4px",
|
|
40
38
|
...m,
|
|
41
39
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
I,
|
|
44
42
|
{
|
|
45
|
-
id:
|
|
46
|
-
label:
|
|
47
|
-
description:
|
|
43
|
+
id: h,
|
|
44
|
+
label: l,
|
|
45
|
+
description: d,
|
|
48
46
|
required: f
|
|
49
47
|
}
|
|
50
48
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ e(
|
|
52
50
|
A,
|
|
53
51
|
{
|
|
54
|
-
errorMessage:
|
|
55
|
-
loading:
|
|
52
|
+
errorMessage: i,
|
|
53
|
+
loading: r,
|
|
56
54
|
locked: t,
|
|
57
55
|
hAlign: "start",
|
|
58
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ e(S, { state: p, hAlign: "start", children: o })
|
|
59
57
|
}
|
|
60
58
|
)
|
|
61
59
|
]
|
|
@@ -63,6 +61,6 @@ const q = F.forwardRef(function({
|
|
|
63
61
|
);
|
|
64
62
|
});
|
|
65
63
|
export {
|
|
66
|
-
|
|
64
|
+
N as VField
|
|
67
65
|
};
|
|
68
66
|
//# sourceMappingURL=v_field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v_field.js","sources":["../../../../src/form/field/v_field/v_field.tsx"],"sourcesContent":["import { VStack } from '../../../stacks/v_stack.js';\nimport type { VStackOwnProps } from '../../../stacks/v_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\nimport { clsx } from 'clsx';\nimport React, { useState } from 'react';\nimport styles from './v_field.module.css';\nimport { FieldControl } from '../common/field_control/field_control.js';\nimport { FieldHeader } from '../common/field_header.js';\nimport { FieldStatusInput } from '../common/status_input/status_input.js';\nimport type { FieldInput } from '../common/types.js';\n\nexport interface VFieldOwnProps extends FieldInput {\n children: React.ReactNode;\n}\n\nexport type VFieldProps = WithDetailedHTMLProps<VFieldOwnProps, 'div'> & VStackOwnProps;\nlet idIndex = 0;\nexport const VField = React.forwardRef(function VField(\n {\n label,\n description,\n errorMessage,\n children: Control,\n locked = false,\n loading = false,\n maxWidth,\n minWidth,\n className,\n id,\n required,\n ...props\n }: VFieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [finalId] = useState(() => id || `v-field-${idIndex++}`);\n const hasError = errorMessage ? true : false;\n const
|
|
1
|
+
{"version":3,"file":"v_field.js","sources":["../../../../src/form/field/v_field/v_field.tsx"],"sourcesContent":["import { VStack } from '../../../stacks/v_stack.js';\nimport type { VStackOwnProps } from '../../../stacks/v_stack.js';\nimport type { WithDetailedHTMLProps } from '../../../stacks/types/as.js';\nimport { clsx } from 'clsx';\nimport React, { useState } from 'react';\nimport styles from './v_field.module.css';\nimport { FieldControl } from '../common/field_control/field_control.js';\nimport { FieldHeader } from '../common/field_header.js';\nimport { FieldStatusInput } from '../common/status_input/status_input.js';\nimport type { FieldInput } from '../common/types.js';\n\nexport interface VFieldOwnProps extends FieldInput {\n children: React.ReactNode;\n}\n\nexport type VFieldProps = WithDetailedHTMLProps<VFieldOwnProps, 'div'> & VStackOwnProps;\nlet idIndex = 0;\nexport const VField = React.forwardRef(function VField(\n {\n label,\n description,\n errorMessage,\n children: Control,\n locked = false,\n loading = false,\n maxWidth,\n minWidth,\n className,\n id,\n required,\n ...props\n }: VFieldProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const [finalId] = useState(() => id || `v-field-${idIndex++}`);\n const hasError = errorMessage ? true : false;\n const state = locked ? 'locked' : loading ? 'loading' : hasError ? 'error' : 'default';\n\n return (\n <VStack\n ref={ref}\n as=\"div\"\n data-locked={locked}\n data-error={hasError}\n data-loading={loading}\n className={clsx('tcn-base-field', styles['v-field'], 'tcn-v-field', className)}\n vAlign=\"start\"\n hAlign=\"start\"\n height=\"auto\"\n gap=\"4px\"\n {...props}\n >\n <FieldHeader\n id={finalId}\n label={label}\n description={description}\n required={required}\n />\n <FieldControl\n errorMessage={errorMessage}\n loading={loading}\n locked={locked}\n hAlign=\"start\"\n >\n <FieldStatusInput state={state} hAlign=\"start\">\n {Control}\n </FieldStatusInput>\n </FieldControl>\n </VStack>\n );\n});\n"],"names":["idIndex","VField","React","label","description","errorMessage","Control","locked","loading","maxWidth","minWidth","className","id","required","props","ref","finalId","useState","hasError","state","jsxs","VStack","clsx","styles","jsx","FieldHeader","FieldControl","FieldStatusInput"],"mappings":";;;;;;;;AAgBA,IAAIA,IAAU;AACP,MAAMC,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAUC;AAAA,EACV,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAM,CAACC,CAAO,IAAIC,EAAS,MAAML,KAAM,WAAWZ,GAAS,EAAE,GACvDkB,IAAW,EAAAb,GACXc,IAAQZ,IAAS,WAAWC,IAAU,YAAYU,IAAW,UAAU;AAE7E,SACE,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAN;AAAA,MACA,IAAG;AAAA,MACH,eAAaR;AAAA,MACb,cAAYW;AAAA,MACZ,gBAAcV;AAAA,MACd,WAAWc,EAAK,kBAAkBC,EAAO,SAAS,GAAG,eAAeZ,CAAS;AAAA,MAC7E,QAAO;AAAA,MACP,QAAO;AAAA,MACP,QAAO;AAAA,MACP,KAAI;AAAA,MACH,GAAGG;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAU;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,IAAIT;AAAA,YACJ,OAAAb;AAAA,YACA,aAAAC;AAAA,YACA,UAAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAW;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,cAAArB;AAAA,YACA,SAAAG;AAAA,YACA,QAAAD;AAAA,YACA,QAAO;AAAA,YAEP,UAAA,gBAAAiB,EAACG,GAAA,EAAiB,OAAAR,GAAc,QAAO,SACpC,UAAAb,EAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
package/dist/frame.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer tcn-system{:where(.
|
|
1
|
+
@layer tcn-system{:where(._frame-dialog_2a77c1d){overflow:hidden}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/color_input/color_input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color_input.d.ts","sourceRoot":"","sources":["../../../src/inputs/color_input/color_input.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAUvC,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;CAClD;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAc,EACd,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAc,EACd,QAAQ,EACR,QAAQ,EACR,SAAuB,EACvB,GAAG,KAAK,EACT,EAAE,eAAe,2CAmHjB"}
|