@tcn/ui 0.3.0 → 0.3.1
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/Color-ASIRERSW-B4GaVKuQ.js +990 -0
- package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +1 -0
- package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js +1485 -0
- package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +1 -0
- package/dist/actions/__docs__/components/gallery.d.ts +8 -0
- package/dist/actions/__docs__/components/gallery.d.ts.map +1 -0
- package/dist/actions/__docs__/components/gallery.js +20 -0
- package/dist/actions/__docs__/components/gallery.js.map +1 -0
- package/dist/actions/__docs__/components/showcase.d.ts +27 -0
- package/dist/actions/__docs__/components/showcase.d.ts.map +1 -0
- package/dist/actions/__docs__/components/showcase.js +15 -0
- package/dist/actions/__docs__/components/showcase.js.map +1 -0
- package/dist/actions/button/base_button/base_button.d.ts +2 -0
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +18 -16
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button/button.js +6 -6
- package/dist/actions/button/button_group/button_group.js +1 -1
- package/dist/actions/button/select_group/select_group.js +13 -13
- package/dist/actions/button/select_group/single_select_group.js +6 -6
- package/dist/actions/button/slim_button/slim_button.js +2 -2
- package/dist/actions/types.d.ts +2 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/actions/types.js +2 -0
- package/dist/actions/types.js.map +1 -0
- package/dist/feedback/loading/loading.js +12 -12
- package/dist/feedback/loading/loading.js.map +1 -1
- package/dist/feedback/progress/progress_bar.js +1 -1
- package/dist/form/field/common/field_control/field_control.js +8 -8
- package/dist/form/field/common/status_input/status_input.js +6 -6
- package/dist/form/field/field.js +5 -5
- package/dist/form/field/h_field/h_field.js +11 -11
- package/dist/form/field/v_field/v_field.js +10 -10
- package/dist/form/field_set/field_set.js +3 -3
- package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +6 -0
- package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +1 -0
- package/dist/gallery.css +1 -0
- package/dist/inputs/checkbox/checkbox.js +11 -11
- package/dist/inputs/color_input/color_picker.js +5 -5
- package/dist/inputs/combo_box/combo_box.js +16 -16
- package/dist/inputs/date_picker/date_picker.js +18 -18
- package/dist/inputs/date_picker/date_picker_body.js +2 -2
- package/dist/inputs/date_picker/date_picker_input.js +18 -18
- package/dist/inputs/input/input.js +5 -5
- package/dist/inputs/mask_input/key_capture_input.js +7 -7
- package/dist/inputs/mask_input/mask_input.js +4 -4
- package/dist/inputs/multi_combo_box/multi_combo_box.js +17 -17
- package/dist/inputs/multiselect/multiselect.js +13 -13
- package/dist/inputs/multiselect/multiselect_row.js +8 -8
- package/dist/inputs/phone_number_input/phone_number_input.js +11 -11
- package/dist/inputs/radio/radio.js +10 -10
- package/dist/inputs/radio/radio_row.js +3 -3
- package/dist/inputs/select/select.js +14 -14
- package/dist/inputs/slider/slider.js +10 -10
- package/dist/inputs/switch/switch.js +4 -4
- package/dist/inputs/textarea/textarea.js +7 -7
- package/dist/inputs/unit_input/unit_input.js +4 -4
- package/dist/layouts/body/h_body.js +7 -7
- package/dist/layouts/body/v_body.js +6 -6
- package/dist/layouts/column/column.js +17 -17
- package/dist/layouts/footer/footer.js +7 -7
- package/dist/layouts/grid/grid.js +24 -24
- package/dist/layouts/header/header.js +2 -2
- package/dist/layouts/list/item.js +2 -2
- package/dist/layouts/list/list.js +7 -7
- package/dist/layouts/list/section_header.js +6 -6
- package/dist/layouts/scaffold/scaffold.js +16 -16
- package/dist/layouts/sidebar_end/sidebar_end.js +14 -14
- package/dist/layouts/sidebar_start/sidebar_start.js +10 -10
- package/dist/layouts/utility_bar/utility_bar.js +10 -10
- package/dist/overlay/frame/frame.js +4 -4
- package/dist/overlay/menu/menu.js +34 -34
- package/dist/overlay/portal/portal_platform_context.js +4 -4
- package/dist/showcase-WfP6kBEb.js +58401 -0
- package/dist/showcase-WfP6kBEb.js.map +1 -0
- package/dist/showcase.css +1 -0
- package/dist/stacks/box/box.js +23 -23
- package/dist/stacks/h_collapsible_box.js +2 -2
- package/dist/stacks/h_stack.js +41 -41
- package/dist/stacks/spacer.js +11 -11
- package/dist/stacks/story_components/circle.js +10 -10
- package/dist/stacks/story_components/picture_placeholder.js +9 -9
- package/dist/stacks/story_components/rect.js +7 -7
- package/dist/stacks/story_components/style_box.js +4 -4
- package/dist/stacks/utils/use_is_collapsed.js +6 -6
- package/dist/stacks/v_collapsible_box.js +2 -2
- package/dist/stacks/v_stack.js +42 -42
- package/dist/stacks/z_stack.js +39 -39
- package/dist/surfaces/alert/alert.js +4 -4
- package/dist/surfaces/card/card.js +4 -4
- package/dist/surfaces/confirm/confirm.js +9 -9
- package/dist/surfaces/drawers/drawer_start/drawer_start.js +2 -2
- package/dist/surfaces/drawers/drawer_top/drawer_top.js +2 -2
- package/dist/surfaces/modal/modal.js +5 -5
- package/dist/surfaces/page/h_page.js +7 -7
- package/dist/surfaces/page/v_page.js +5 -5
- package/dist/surfaces/panel/h_panel.js +14 -14
- package/dist/surfaces/panel/v_panel.js +9 -9
- package/dist/surfaces/pop_confirm/pop_confirm.js +6 -6
- package/dist/surfaces/popconfirm/pop_confirm.js +8 -8
- package/dist/surfaces/tooltip/tooltip.js +8 -8
- package/dist/surfaces/window/window.js +9 -9
- package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js +3777 -0
- package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +1 -0
- package/dist/themes/themes/ergo/ergo_theme.js +33 -1
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/tokens/badge/badge.js +9 -9
- package/dist/tokens/bubble/bubble.js +8 -8
- package/dist/tokens/chip/chip.js +3 -3
- package/dist/utils/click_away_listener.js +10 -10
- package/dist/utils/click_away_listener.js.map +1 -1
- package/dist/utils/dnd/draggable/draggable.js +4 -4
- package/dist/utils/dnd/handle.js +8 -8
- package/dist/utils/focus_redirect.js +5 -5
- package/dist/utils/hooks/make_context_hook.js +4 -4
- package/dist/utils/hooks/use_media_query.js +2 -2
- package/dist/utils/hooks/use_media_query.js.map +1 -1
- package/package.json +1 -1
- package/src/actions/__docs__/actions.mdx +131 -0
- package/src/actions/__docs__/actions.stories.tsx +309 -0
- package/src/actions/__docs__/components/gallery.module.css +6 -0
- package/src/actions/__docs__/components/gallery.tsx +28 -0
- package/src/actions/__docs__/components/showcase.module.css +55 -0
- package/src/actions/__docs__/components/showcase.tsx +121 -0
- package/src/actions/button/base_button/base_button.tsx +5 -1
- package/src/actions/types.ts +6 -0
- package/src/themes/themes/ergo/ergo_theme.css +33 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { HStack as
|
|
2
|
+
import { HStack as _ } from "../../../stacks/h_stack.js";
|
|
3
3
|
import { clsx as l } from "clsx";
|
|
4
4
|
import n from "react";
|
|
5
|
-
import { Button as
|
|
6
|
-
import '../../../select_group.css';const
|
|
5
|
+
import { Button as v } from "../button/button.js";
|
|
6
|
+
import '../../../select_group.css';const x = "_select-group_c24986f", y = "_select-group-option_28f4dfd", b = "_select-group-divider_b5b865b", a = { "select-group": x, "select-group-option": y, "select-group-divider": b }, C = n.forwardRef(function({ children: o, value: c, className: u, onChange: d, disabled: t = !1, ...f }, m) {
|
|
7
7
|
const g = Array.isArray(o) ? o : [o], h = (e, p) => {
|
|
8
|
-
if (
|
|
8
|
+
if (t) return;
|
|
9
9
|
const r = [...c];
|
|
10
10
|
if (p) {
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const s = c.indexOf(e);
|
|
12
|
+
s > -1 && r.splice(s, 1);
|
|
13
13
|
} else
|
|
14
14
|
r.push(e);
|
|
15
15
|
d?.(r);
|
|
16
16
|
};
|
|
17
17
|
return /* @__PURE__ */ i(
|
|
18
|
-
|
|
18
|
+
_,
|
|
19
19
|
{
|
|
20
20
|
ref: m,
|
|
21
21
|
as: "div",
|
|
22
22
|
inline: !0,
|
|
23
23
|
width: "auto",
|
|
24
24
|
height: "auto",
|
|
25
|
-
"data-is-disabled":
|
|
25
|
+
"data-is-disabled": t,
|
|
26
26
|
className: l(a["select-group"], "select-group", u),
|
|
27
27
|
...f,
|
|
28
28
|
children: g.map((e, p) => {
|
|
29
|
-
const r = c.includes(e.props.value),
|
|
29
|
+
const r = c.includes(e.props.value), s = () => {
|
|
30
30
|
h(e.props.value, r);
|
|
31
31
|
};
|
|
32
32
|
return /* @__PURE__ */ i(n.Fragment, { children: /* @__PURE__ */ i(
|
|
33
|
-
|
|
33
|
+
v,
|
|
34
34
|
{
|
|
35
|
-
disabled:
|
|
36
|
-
"data-is-disabled":
|
|
35
|
+
disabled: t || e.props.disabled,
|
|
36
|
+
"data-is-disabled": t || e.props.disabled,
|
|
37
37
|
className: l(a["select-group-option"], "select-group-option"),
|
|
38
38
|
hierarchy: r ? "primary" : "secondary",
|
|
39
|
-
onClick:
|
|
39
|
+
onClick: s,
|
|
40
40
|
value: e.props.value,
|
|
41
41
|
children: e.props.children
|
|
42
42
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
3
|
import { SelectGroup as m } from "./select_group.js";
|
|
4
|
-
const
|
|
4
|
+
const s = h.forwardRef(function({
|
|
5
5
|
children: t,
|
|
6
6
|
value: n,
|
|
7
7
|
className: o,
|
|
8
8
|
onChange: r,
|
|
9
9
|
disabled: l = !1,
|
|
10
|
-
...
|
|
11
|
-
},
|
|
10
|
+
...f
|
|
11
|
+
}, c) {
|
|
12
12
|
const g = (e) => {
|
|
13
13
|
if (e.length === 0)
|
|
14
14
|
return;
|
|
@@ -18,17 +18,17 @@ const G = h.forwardRef(function({
|
|
|
18
18
|
return /* @__PURE__ */ p(
|
|
19
19
|
m,
|
|
20
20
|
{
|
|
21
|
-
ref:
|
|
21
|
+
ref: c,
|
|
22
22
|
value: n != null ? [n] : [],
|
|
23
23
|
onChange: g,
|
|
24
24
|
disabled: l,
|
|
25
25
|
className: o,
|
|
26
|
-
...
|
|
26
|
+
...f,
|
|
27
27
|
children: t
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
});
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
s as SingleSelectGroup
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=single_select_group.js.map
|
|
@@ -2,12 +2,12 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import n from "react";
|
|
3
3
|
import { Button as i } from "../button/button.js";
|
|
4
4
|
import { clsx as l } from "clsx";
|
|
5
|
-
import '../../../slim_button.css';const
|
|
5
|
+
import '../../../slim_button.css';const u = "_slim-button_188fdc3", c = { "slim-button": u }, b = n.forwardRef(
|
|
6
6
|
({ children: t, className: o, ...m }, s) => /* @__PURE__ */ r(
|
|
7
7
|
i,
|
|
8
8
|
{
|
|
9
9
|
ref: s,
|
|
10
|
-
className: l(
|
|
10
|
+
className: l(c["slim-button"], "tcn-slim-button", o),
|
|
11
11
|
...m,
|
|
12
12
|
children: t
|
|
13
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/actions/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,WAAW,GACX,UAAU,GACV,SAAS,GACT,WAAW,GACX,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import M from "react";
|
|
3
|
-
import '../../loading.css';const
|
|
3
|
+
import '../../loading.css';const f = "_loading-line_e364229", p = "_linePulse_bde300c", u = { "loading-line": f, linePulse: p }, I = M.forwardRef(
|
|
4
4
|
({
|
|
5
|
-
size:
|
|
5
|
+
size: s = "1em",
|
|
6
6
|
color: l = "var(--accent-color)",
|
|
7
|
-
lineCount:
|
|
7
|
+
lineCount: n = 12,
|
|
8
8
|
animationDuration: t = 1200,
|
|
9
9
|
className: r,
|
|
10
10
|
style: h
|
|
11
|
-
},
|
|
12
|
-
const
|
|
11
|
+
}, d) => {
|
|
12
|
+
const v = Array.from({ length: n }), g = 360 / n;
|
|
13
13
|
return /* @__PURE__ */ c(
|
|
14
14
|
"svg",
|
|
15
15
|
{
|
|
16
|
-
ref:
|
|
16
|
+
ref: d,
|
|
17
17
|
width: 50,
|
|
18
18
|
height: 50,
|
|
19
19
|
viewBox: "0 0 50 50",
|
|
20
20
|
className: r,
|
|
21
21
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
-
style: { height:
|
|
22
|
+
style: { height: s, width: s, ...h },
|
|
23
23
|
fill: "none",
|
|
24
|
-
children:
|
|
25
|
-
const
|
|
24
|
+
children: v.map((_, e) => {
|
|
25
|
+
const a = g * e, i = 50 / 4.5, o = 50 / 2.25, m = 50 / 2 + i * Math.cos(a * Math.PI / 180), S = 50 / 2 + i * Math.sin(a * Math.PI / 180), z = 50 / 2 + o * Math.cos(a * Math.PI / 180), w = 50 / 2 + o * Math.sin(a * Math.PI / 180);
|
|
26
26
|
return /* @__PURE__ */ c(
|
|
27
27
|
"line",
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
29
|
+
className: u["loading-line"],
|
|
30
30
|
style: {
|
|
31
|
-
animationDelay: `${
|
|
31
|
+
animationDelay: `${e * t / n}ms`,
|
|
32
32
|
animationDuration: `${t}ms`
|
|
33
33
|
},
|
|
34
34
|
x1: m,
|
|
@@ -39,7 +39,7 @@ import '../../loading.css';const p = "_loading-line_e364229", y = "_linePulse_bd
|
|
|
39
39
|
strokeWidth: 3,
|
|
40
40
|
strokeLinecap: "round"
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
e
|
|
43
43
|
);
|
|
44
44
|
})
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.js","sources":["../../../src/feedback/loading/loading.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react';\nimport styles from './loading.module.css';\n\nexport interface LoadingProps {\n size?: string;\n color?: string;\n lineCount?: number;\n animationDuration?: number;\n className?: string;\n style?: CSSProperties;\n}\n\nexport const Loading = React.forwardRef(\n (\n {\n size = '1em',\n color = 'var(--accent-color)',\n lineCount = 12,\n animationDuration = 1200,\n className,\n style,\n }: LoadingProps,\n ref: React.Ref<SVGSVGElement>\n ) => {\n const canvasSize = 50;\n const lines = Array.from({ length: lineCount });\n const angleStep = 360 / lineCount;\n\n return (\n <svg\n ref={ref}\n width={canvasSize}\n height={canvasSize}\n viewBox={`0 0 ${canvasSize} ${canvasSize}`}\n className={className}\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ height: size, width: size, ...style }}\n fill=\"none\"\n >\n {lines.map((_, i) => {\n const angle = angleStep * i;\n const innerRadius = canvasSize / 4.5;\n const outerRadius = canvasSize / 2.25;\n\n const x1 = canvasSize / 2 + innerRadius * Math.cos((angle * Math.PI) / 180);\n const y1 = canvasSize / 2 + innerRadius * Math.sin((angle * Math.PI) / 180);\n const x2 = canvasSize / 2 + outerRadius * Math.cos((angle * Math.PI) / 180);\n const y2 = canvasSize / 2 + outerRadius * Math.sin((angle * Math.PI) / 180);\n\n return (\n <line\n className={styles['loading-line']}\n style={{\n animationDelay: `${(i * animationDuration) / lineCount}ms`,\n animationDuration: `${animationDuration}ms`,\n }}\n key={i}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n stroke={color}\n strokeWidth={3}\n strokeLinecap=\"round\"\n />\n );\n })}\n </svg>\n );\n }\n);\n"],"names":["Loading","React","size","color","lineCount","animationDuration","className","style","ref","lines","angleStep","jsx","
|
|
1
|
+
{"version":3,"file":"loading.js","sources":["../../../src/feedback/loading/loading.tsx"],"sourcesContent":["import React, { CSSProperties } from 'react';\nimport styles from './loading.module.css';\n\nexport interface LoadingProps {\n size?: string;\n color?: string;\n lineCount?: number;\n animationDuration?: number;\n className?: string;\n style?: CSSProperties;\n}\n\nexport const Loading = React.forwardRef(\n (\n {\n size = '1em',\n color = 'var(--accent-color)',\n lineCount = 12,\n animationDuration = 1200,\n className,\n style,\n }: LoadingProps,\n ref: React.Ref<SVGSVGElement>\n ) => {\n const canvasSize = 50;\n const lines = Array.from({ length: lineCount });\n const angleStep = 360 / lineCount;\n\n return (\n <svg\n ref={ref}\n width={canvasSize}\n height={canvasSize}\n viewBox={`0 0 ${canvasSize} ${canvasSize}`}\n className={className}\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ height: size, width: size, ...style }}\n fill=\"none\"\n >\n {lines.map((_, i) => {\n const angle = angleStep * i;\n const innerRadius = canvasSize / 4.5;\n const outerRadius = canvasSize / 2.25;\n\n const x1 = canvasSize / 2 + innerRadius * Math.cos((angle * Math.PI) / 180);\n const y1 = canvasSize / 2 + innerRadius * Math.sin((angle * Math.PI) / 180);\n const x2 = canvasSize / 2 + outerRadius * Math.cos((angle * Math.PI) / 180);\n const y2 = canvasSize / 2 + outerRadius * Math.sin((angle * Math.PI) / 180);\n\n return (\n <line\n className={styles['loading-line']}\n style={{\n animationDelay: `${(i * animationDuration) / lineCount}ms`,\n animationDuration: `${animationDuration}ms`,\n }}\n key={i}\n x1={x1}\n y1={y1}\n x2={x2}\n y2={y2}\n stroke={color}\n strokeWidth={3}\n strokeLinecap=\"round\"\n />\n );\n })}\n </svg>\n );\n }\n);\n"],"names":["Loading","React","size","color","lineCount","animationDuration","className","style","ref","lines","angleStep","jsx","i","angle","innerRadius","outerRadius","x1","y1","x2","y2","styles"],"mappings":";;sGAYaA,IAAUC,EAAM;AAAA,EAC3B,CACE;AAAA,IACE,MAAAC,IAAO;AAAA,IACP,OAAAC,IAAQ;AAAA,IACR,WAAAC,IAAY;AAAA,IACZ,mBAAAC,IAAoB;AAAA,IACpB,WAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,GAEFC,MACG;AAEH,UAAMC,IAAQ,MAAM,KAAK,EAAE,QAAQL,GAAW,GACxCM,IAAY,MAAMN;AAExB,WACE,gBAAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAH;AAAA,QACA,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,WAAAF;AAAA,QACA,OAAM;AAAA,QACN,OAAO,EAAE,QAAQJ,GAAM,OAAOA,GAAM,GAAGK,EAAA;AAAA,QACvC,MAAK;AAAA,QAEJ,UAAAE,EAAM,IAAI,CAAC,GAAGG,MAAM;AACnB,gBAAMC,IAAQH,IAAYE,GACpBE,IAAc,KAAa,KAC3BC,IAAc,KAAa,MAE3BC,IAAK,KAAa,IAAIF,IAAc,KAAK,IAAKD,IAAQ,KAAK,KAAM,GAAG,GACpEI,IAAK,KAAa,IAAIH,IAAc,KAAK,IAAKD,IAAQ,KAAK,KAAM,GAAG,GACpEK,IAAK,KAAa,IAAIH,IAAc,KAAK,IAAKF,IAAQ,KAAK,KAAM,GAAG,GACpEM,IAAK,KAAa,IAAIJ,IAAc,KAAK,IAAKF,IAAQ,KAAK,KAAM,GAAG;AAE1E,iBACE,gBAAAF;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWS,EAAO,cAAc;AAAA,cAChC,OAAO;AAAA,gBACL,gBAAgB,GAAIR,IAAIP,IAAqBD,CAAS;AAAA,gBACtD,mBAAmB,GAAGC,CAAiB;AAAA,cAAA;AAAA,cAGzC,IAAAW;AAAA,cACA,IAAAC;AAAA,cACA,IAAAC;AAAA,cACA,IAAAC;AAAA,cACA,QAAQhB;AAAA,cACR,aAAa;AAAA,cACb,eAAc;AAAA,YAAA;AAAA,YAPTS;AAAA,UAAA;AAAA,QAUX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;"}
|
|
@@ -12,7 +12,7 @@ import { HStack as l } from "../../stacks/h_stack.js";
|
|
|
12
12
|
import { Spacer as a } from "../../stacks/spacer.js";
|
|
13
13
|
import { VStack as d } from "../../stacks/v_stack.js";
|
|
14
14
|
import { ZStack as b } from "../../stacks/z_stack.js";
|
|
15
|
-
import '../../progress_bar.css';const f = "_progress-bar-container_014b4d9", h = "_progress-bar-background_9176cc0", _ = "_progress-bar_057c33d", k = "_progress-bar-fill_00854f0",
|
|
15
|
+
import '../../progress_bar.css';const f = "_progress-bar-container_014b4d9", h = "_progress-bar-background_9176cc0", _ = "_progress-bar_057c33d", k = "_progress-bar-fill_00854f0", u = "_moveStripes_d219e85", s = { "progress-bar-container": f, "progress-bar-background": h, "progress-bar": _, "progress-bar-fill": k, moveStripes: u }, H = m.forwardRef(function({ message: i, value: p, ...c }, n) {
|
|
16
16
|
const o = `${(p * 100).toFixed(0)}%`, g = { "--progress-percentage": o };
|
|
17
17
|
return /* @__PURE__ */ e(d, { ref: n, className: s["progress-bar-container"], ...c, children: [
|
|
18
18
|
/* @__PURE__ */ e(l, { height: "auto", vAlign: "end", children: [
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { VStack as
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { VStack as c } from "../../../../stacks/v_stack.js";
|
|
4
4
|
import { clsx as s } from "clsx";
|
|
5
5
|
import { FieldErrorMessage as m } from "../field_error.js";
|
|
6
|
-
import '../../../../field_control.css';const h = "_field-error_44124ee", p = "_field-control_ca50e63", x = { "field-error": h, "field-control": p }, k =
|
|
6
|
+
import '../../../../field_control.css';const h = "_field-error_44124ee", p = "_field-control_ca50e63", x = { "field-error": h, "field-control": p }, k = f.forwardRef(function({
|
|
7
7
|
children: o,
|
|
8
8
|
errorMessage: r,
|
|
9
9
|
locked: e = !1,
|
|
10
10
|
loading: l = !1,
|
|
11
11
|
className: t,
|
|
12
12
|
...i
|
|
13
|
-
},
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
13
|
+
}, d) {
|
|
14
|
+
return /* @__PURE__ */ n(
|
|
15
|
+
c,
|
|
16
16
|
{
|
|
17
|
-
ref:
|
|
17
|
+
ref: d,
|
|
18
18
|
"data-locked": e,
|
|
19
19
|
"data-loading": l,
|
|
20
20
|
"data-error": !!r,
|
|
@@ -8,14 +8,14 @@ import "../../../../feedback/progress/progress_bar.js";
|
|
|
8
8
|
import "@tcn/state";
|
|
9
9
|
import "../../../../stacks/v_stack.js";
|
|
10
10
|
import { clsx as o } from "clsx";
|
|
11
|
-
import '../../../../status_input.css';const A = "_field-error_6d015c9", x = "_field-status-input_c30d6fb", n = { "field-error": A, "field-status-input": x },
|
|
11
|
+
import '../../../../status_input.css';const A = "_field-error_6d015c9", x = "_field-status-input_c30d6fb", n = { "field-error": A, "field-status-input": x }, _ = () => /* @__PURE__ */ r(f, { className: "field-lock", size: "lg" }), h = () => /* @__PURE__ */ r(g, { size: "20px", className: "field-loader" }), k = () => /* @__PURE__ */ r(u, { className: o(n["field-error"], "field-error"), size: "lg" }), I = ({ state: e }) => {
|
|
12
12
|
switch (e) {
|
|
13
13
|
case "locked":
|
|
14
|
-
return /* @__PURE__ */ r(
|
|
14
|
+
return /* @__PURE__ */ r(_, {});
|
|
15
15
|
case "loading":
|
|
16
|
-
return /* @__PURE__ */ r(
|
|
16
|
+
return /* @__PURE__ */ r(h, {});
|
|
17
17
|
case "error":
|
|
18
|
-
return /* @__PURE__ */ r(
|
|
18
|
+
return /* @__PURE__ */ r(k, {});
|
|
19
19
|
default:
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
@@ -38,13 +38,13 @@ import '../../../../status_input.css';const A = "_field-error_6d015c9", x = "_fi
|
|
|
38
38
|
...l,
|
|
39
39
|
children: [
|
|
40
40
|
a && i,
|
|
41
|
-
/* @__PURE__ */ r(
|
|
41
|
+
/* @__PURE__ */ r(I, { state: t })
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
});
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
I as AdornmentMap,
|
|
48
48
|
v as FieldStatusInput
|
|
49
49
|
};
|
|
50
50
|
//# sourceMappingURL=status_input.js.map
|
package/dist/form/field/field.js
CHANGED
|
@@ -7,13 +7,13 @@ import "../../utils/focus_redirect.js";
|
|
|
7
7
|
import "../../utils/scroll_away_listener.js";
|
|
8
8
|
import { useForkRef as l } from "../../utils/hooks/use_fork_ref.js";
|
|
9
9
|
import { useResizeObserver as p } from "../../utils/hooks/use_resize_observer.js";
|
|
10
|
-
const
|
|
11
|
-
const [
|
|
10
|
+
const z = c.forwardRef(function({ children: t, breakpointPixels: i = 500, ...e }, f) {
|
|
11
|
+
const [m, n] = u(!0), s = p((d) => {
|
|
12
12
|
n(d >= i);
|
|
13
|
-
}), o = l(
|
|
14
|
-
return /* @__PURE__ */ r(a, { children:
|
|
13
|
+
}), o = l(f, s);
|
|
14
|
+
return /* @__PURE__ */ r(a, { children: m ? /* @__PURE__ */ r(F, { ...e, ref: o, ...e, children: t }) : /* @__PURE__ */ r(R, { ...e, ref: o, ...e, children: t }) });
|
|
15
15
|
});
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
z as Field
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=field.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as F, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { HStack as I } from "../../../stacks/h_stack.js";
|
|
3
3
|
import { clsx as H } from "clsx";
|
|
4
|
-
import
|
|
5
|
-
import { FieldHeader as
|
|
6
|
-
import { FieldControl as
|
|
7
|
-
import { FieldStatusInput as
|
|
8
|
-
import '../../../h_field.css';const
|
|
9
|
-
let
|
|
10
|
-
const B =
|
|
4
|
+
import _, { useState as g } from "react";
|
|
5
|
+
import { FieldHeader as y } from "../common/field_header.js";
|
|
6
|
+
import { FieldControl as S } from "../common/field_control/field_control.js";
|
|
7
|
+
import { FieldStatusInput as $ } from "../common/status_input/status_input.js";
|
|
8
|
+
import '../../../h_field.css';const j = "_h-field_845b93f", v = { "h-field": j };
|
|
9
|
+
let w = 0;
|
|
10
|
+
const B = _.forwardRef(function({
|
|
11
11
|
label: o,
|
|
12
12
|
description: s,
|
|
13
13
|
errorMessage: d,
|
|
@@ -20,7 +20,7 @@ const B = g.forwardRef(function({
|
|
|
20
20
|
required: m,
|
|
21
21
|
...h
|
|
22
22
|
}, p) {
|
|
23
|
-
const [i] =
|
|
23
|
+
const [i] = g(() => c || `h-field-${w++}`), u = `${i}-label`, b = `${i}-description`, a = !!d, x = t ? "locked" : e ? "loading" : a ? "error" : "default";
|
|
24
24
|
return /* @__PURE__ */ F(
|
|
25
25
|
I,
|
|
26
26
|
{
|
|
@@ -31,7 +31,7 @@ const B = g.forwardRef(function({
|
|
|
31
31
|
"data-locked": t,
|
|
32
32
|
"data-error": a,
|
|
33
33
|
"data-loading": e,
|
|
34
|
-
className: H("base-field",
|
|
34
|
+
className: H("base-field", v["h-field"], "h-field", f),
|
|
35
35
|
vAlign: "start",
|
|
36
36
|
hAlign: "start",
|
|
37
37
|
height: "auto",
|
|
@@ -39,7 +39,7 @@ const B = g.forwardRef(function({
|
|
|
39
39
|
...h,
|
|
40
40
|
children: [
|
|
41
41
|
/* @__PURE__ */ r(
|
|
42
|
-
|
|
42
|
+
y,
|
|
43
43
|
{
|
|
44
44
|
minWidth: l,
|
|
45
45
|
width: l,
|
|
@@ -49,7 +49,7 @@ const B = g.forwardRef(function({
|
|
|
49
49
|
required: m
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
/* @__PURE__ */ r(
|
|
52
|
+
/* @__PURE__ */ r(S, { errorMessage: d, loading: e, locked: t, children: /* @__PURE__ */ r($, { state: x, children: n }) })
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
);
|
|
@@ -7,21 +7,21 @@ import { FieldHeader as y } 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
9
|
let $ = 0;
|
|
10
|
-
const
|
|
10
|
+
const q = F.forwardRef(function({
|
|
11
11
|
label: d,
|
|
12
12
|
description: o,
|
|
13
13
|
errorMessage: a,
|
|
14
14
|
children: s,
|
|
15
15
|
locked: t = !1,
|
|
16
|
-
loading:
|
|
16
|
+
loading: e = !1,
|
|
17
17
|
maxWidth: R,
|
|
18
18
|
minWidth: W,
|
|
19
19
|
className: n,
|
|
20
|
-
id:
|
|
21
|
-
required:
|
|
20
|
+
id: f,
|
|
21
|
+
required: c,
|
|
22
22
|
...m
|
|
23
23
|
}, p) {
|
|
24
|
-
const [
|
|
24
|
+
const [r] = I(() => f || `v-field-${$++}`), l = !!a, h = `${r}-label`, u = `${r}-description`, b = t ? "locked" : e ? "loading" : l ? "error" : "default";
|
|
25
25
|
return /* @__PURE__ */ x(
|
|
26
26
|
g,
|
|
27
27
|
{
|
|
@@ -31,7 +31,7 @@ const z = F.forwardRef(function({
|
|
|
31
31
|
"aria-describedby": u,
|
|
32
32
|
"data-locked": t,
|
|
33
33
|
"data-error": l,
|
|
34
|
-
"data-loading":
|
|
34
|
+
"data-loading": e,
|
|
35
35
|
className: v("base-field", V["v-field"], "v-field", n),
|
|
36
36
|
vAlign: "start",
|
|
37
37
|
hAlign: "start",
|
|
@@ -42,17 +42,17 @@ const z = F.forwardRef(function({
|
|
|
42
42
|
/* @__PURE__ */ i(
|
|
43
43
|
y,
|
|
44
44
|
{
|
|
45
|
-
id:
|
|
45
|
+
id: r,
|
|
46
46
|
label: d,
|
|
47
47
|
description: o,
|
|
48
|
-
required:
|
|
48
|
+
required: c
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
51
|
/* @__PURE__ */ i(
|
|
52
52
|
A,
|
|
53
53
|
{
|
|
54
54
|
errorMessage: a,
|
|
55
|
-
loading:
|
|
55
|
+
loading: e,
|
|
56
56
|
locked: t,
|
|
57
57
|
hAlign: "start",
|
|
58
58
|
children: /* @__PURE__ */ i(S, { state: b, hAlign: "start", children: s })
|
|
@@ -63,6 +63,6 @@ const z = F.forwardRef(function({
|
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
q as VField
|
|
67
67
|
};
|
|
68
68
|
//# sourceMappingURL=v_field.js.map
|
|
@@ -11,8 +11,8 @@ import { HStack as b } from "../../stacks/h_stack.js";
|
|
|
11
11
|
import { Spacer as f } from "../../stacks/spacer.js";
|
|
12
12
|
import { VStack as m } from "../../stacks/v_stack.js";
|
|
13
13
|
import y, { useMemo as S } from "react";
|
|
14
|
-
import '../../field_set.css';const
|
|
15
|
-
let
|
|
14
|
+
import '../../field_set.css';const u = "_field-set_8e981d9", x = "_field-set-body_4cd3139", c = { "field-set": u, "field-set-body": x };
|
|
15
|
+
let _ = 0;
|
|
16
16
|
const q = y.forwardRef(function({
|
|
17
17
|
legend: l,
|
|
18
18
|
startAdornments: d,
|
|
@@ -21,7 +21,7 @@ const q = y.forwardRef(function({
|
|
|
21
21
|
children: n,
|
|
22
22
|
...t
|
|
23
23
|
}, p) {
|
|
24
|
-
const s = `field-set-${S(() =>
|
|
24
|
+
const s = `field-set-${S(() => _++, [])}`;
|
|
25
25
|
return /* @__PURE__ */ r(
|
|
26
26
|
m,
|
|
27
27
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter-QJ4M4OGQ-DaIl2Wi_.js","sources":["../../../node_modules/.pnpm/storybook@10.1.11_@testing-library+dom@10.4.1_prettier@2.8.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/storybook/dist/_browser-chunks/formatter-QJ4M4OGQ.js"],"sourcesContent":["import {\n require_memoizerific\n} from \"./chunk-WJYERY3R.js\";\nimport {\n dedent\n} from \"./chunk-JP7NCOJX.js\";\nimport {\n __toESM\n} from \"./chunk-A242L54C.js\";\n\n// src/components/components/syntaxhighlighter/formatter.ts\nvar import_memoizerific = __toESM(require_memoizerific(), 1);\nvar formatter = (0, import_memoizerific.default)(2)(async (type, source) => type === !1 ? source : dedent(source));\nexport {\n formatter\n};\n"],"names":["import_memoizerific","__toESM","require_memoizerific","formatter","type","source","dedent"],"mappings":";AAWA,IAAIA,IAAsBC,EAAQC,EAAoB,GAAI,CAAC,GACvDC,QAAgBH,EAAoB,SAAS,CAAC,EAAE,OAAOI,GAAMC,MAAWD,MAAS,KAAKC,IAASC,EAAOD,CAAM,CAAC;","x_google_ignoreList":[0]}
|
package/dist/gallery.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_932284e{display:grid;grid-template-columns:repeat(auto-fit,minmax(var(--min-column-width),1fr));gap:20px;max-width:var(--max-gallery-width)}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as
|
|
3
|
-
import
|
|
4
|
-
import '../../checkbox.css';const
|
|
2
|
+
import { clsx as d } from "clsx";
|
|
3
|
+
import f from "react";
|
|
4
|
+
import '../../checkbox.css';const i = "_checkbox_cb77818", l = { checkbox: i }, _ = f.forwardRef(function({
|
|
5
5
|
style: a,
|
|
6
6
|
className: r,
|
|
7
7
|
width: s,
|
|
8
8
|
height: b,
|
|
9
|
-
checked:
|
|
10
|
-
inputRef:
|
|
11
|
-
onChange:
|
|
9
|
+
checked: e,
|
|
10
|
+
inputRef: k,
|
|
11
|
+
onChange: c,
|
|
12
12
|
...o
|
|
13
13
|
}, n) {
|
|
14
14
|
return /* @__PURE__ */ x(
|
|
15
15
|
"input",
|
|
16
16
|
{
|
|
17
17
|
ref: n,
|
|
18
|
-
"data-checked":
|
|
18
|
+
"data-checked": e,
|
|
19
19
|
"data-is-disabled": o.disabled || !1,
|
|
20
|
-
checked:
|
|
20
|
+
checked: e,
|
|
21
21
|
type: "checkbox",
|
|
22
22
|
onChange: (t) => {
|
|
23
|
-
|
|
23
|
+
c && c(!!t.currentTarget.checked, t);
|
|
24
24
|
},
|
|
25
25
|
...o,
|
|
26
|
-
className:
|
|
26
|
+
className: d(r, l.checkbox, "checkbox"),
|
|
27
27
|
style: { width: s, height: b, ...a }
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
});
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
_ as Checkbox
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -7,23 +7,23 @@ import { useForkRef as k } from "../../utils/hooks/use_fork_ref.js";
|
|
|
7
7
|
import "../../utils/hooks/use_resize_observer.js";
|
|
8
8
|
import { ZStack as l } from "../../stacks/z_stack.js";
|
|
9
9
|
import { clsx as u } from "clsx";
|
|
10
|
-
import { ChromePicker as
|
|
11
|
-
import '../../color_picker.css';const
|
|
12
|
-
const r = n(null),
|
|
10
|
+
import { ChromePicker as d } from "react-color";
|
|
11
|
+
import '../../color_picker.css';const h = "_color-picker_4757d5a", R = "_chrome-picker_2f64060", e = { "color-picker": h, "chrome-picker": R }, F = s.forwardRef(function({ color: c, onColorChange: t, className: i, ...m }, f) {
|
|
12
|
+
const r = n(null), p = k(r, f);
|
|
13
13
|
return a(() => {
|
|
14
14
|
r.current && r.current.focus();
|
|
15
15
|
}, []), /* @__PURE__ */ o(
|
|
16
16
|
l,
|
|
17
17
|
{
|
|
18
18
|
tabIndex: 0,
|
|
19
|
-
ref:
|
|
19
|
+
ref: p,
|
|
20
20
|
padding: "8px",
|
|
21
21
|
height: "auto",
|
|
22
22
|
width: "auto",
|
|
23
23
|
className: u(e["color-picker"], i),
|
|
24
24
|
...m,
|
|
25
25
|
children: /* @__PURE__ */ o(
|
|
26
|
-
|
|
26
|
+
d,
|
|
27
27
|
{
|
|
28
28
|
className: e["chrome-picker"],
|
|
29
29
|
color: c,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as w, Fragment as D, jsx as S } from "react/jsx-runtime";
|
|
2
2
|
import "../../utils/click_away_listener.js";
|
|
3
3
|
import "../../utils/focus_redirect.js";
|
|
4
4
|
import "../../utils/scroll_away_listener.js";
|
|
5
|
-
import
|
|
6
|
-
import { useForkRef as
|
|
5
|
+
import L, { useRef as s, useState as x } from "react";
|
|
6
|
+
import { useForkRef as N } from "../../utils/hooks/use_fork_ref.js";
|
|
7
7
|
import "../../utils/hooks/use_resize_observer.js";
|
|
8
|
-
import { clsx as
|
|
9
|
-
import { SuggestionList as
|
|
10
|
-
import { Input as
|
|
11
|
-
const ee =
|
|
8
|
+
import { clsx as V } from "clsx";
|
|
9
|
+
import { SuggestionList as z } from "../suggestions/suggestion_list.js";
|
|
10
|
+
import { Input as G } from "../input/input.js";
|
|
11
|
+
const ee = L.forwardRef(function({
|
|
12
12
|
onOptionSelect: a,
|
|
13
13
|
children: C = [],
|
|
14
14
|
onKeyDown: o,
|
|
@@ -21,18 +21,18 @@ const ee = N.forwardRef(function({
|
|
|
21
21
|
onMouseUp: g,
|
|
22
22
|
...i
|
|
23
23
|
}, y) {
|
|
24
|
-
const A = s(!1), d = s(c), n = s(!1), [E, F] = x(null), f = s(null), [h, R] = x(!1), T =
|
|
24
|
+
const A = s(!1), d = s(c), n = s(!1), [E, F] = x(null), f = s(null), [h, R] = x(!1), T = N(y, f);
|
|
25
25
|
function l() {
|
|
26
26
|
R(!0);
|
|
27
27
|
}
|
|
28
28
|
function r() {
|
|
29
29
|
n.current = !1, R(!1);
|
|
30
30
|
}
|
|
31
|
-
function I(e, t,
|
|
31
|
+
function I(e, t, q) {
|
|
32
32
|
n.current = !0;
|
|
33
33
|
const u = f.current;
|
|
34
34
|
requestAnimationFrame(() => {
|
|
35
|
-
u != null && (u.value = e, u.focus(), u.setSelectionRange(t,
|
|
35
|
+
u != null && (u.value = e, u.focus(), u.setSelectionRange(t, q));
|
|
36
36
|
}), i.onChange && i.onChange(e), r();
|
|
37
37
|
}
|
|
38
38
|
function M(e) {
|
|
@@ -53,25 +53,25 @@ const ee = N.forwardRef(function({
|
|
|
53
53
|
function U(e) {
|
|
54
54
|
F(e.currentTarget), A.current = document.activeElement === e.currentTarget, p && p(e);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function _(e) {
|
|
57
57
|
n.current && (n.current = !1, r()), l(), g && g(e);
|
|
58
58
|
}
|
|
59
|
-
return /* @__PURE__ */ D
|
|
59
|
+
return /* @__PURE__ */ w(D, { children: [
|
|
60
60
|
/* @__PURE__ */ S(
|
|
61
|
-
|
|
61
|
+
G,
|
|
62
62
|
{
|
|
63
63
|
ref: T,
|
|
64
|
-
className:
|
|
64
|
+
className: V(b, "combo-box-input"),
|
|
65
65
|
...i,
|
|
66
66
|
value: c,
|
|
67
67
|
onKeyDown: j,
|
|
68
68
|
onKeyUp: B,
|
|
69
69
|
onMouseDown: U,
|
|
70
|
-
onMouseUp:
|
|
70
|
+
onMouseUp: _
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
73
|
h && /* @__PURE__ */ S(
|
|
74
|
-
|
|
74
|
+
z,
|
|
75
75
|
{
|
|
76
76
|
anchorElement: E,
|
|
77
77
|
onClose: I,
|