@tcn/ui 0.12.4 → 0.12.6
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/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.js +24 -24
- 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.js +14 -14
- 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/overlay/frame/frame.d.ts +2 -2
- package/dist/overlay/frame/frame.d.ts.map +1 -1
- package/dist/overlay/frame/frame.js +68 -66
- 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/slide.css +1 -0
- package/dist/stacks/box/box.d.ts +5 -4
- package/dist/stacks/box/box.d.ts.map +1 -1
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/stacks/box/detect_resize_bounds.d.ts +15 -0
- package/dist/stacks/box/detect_resize_bounds.d.ts.map +1 -0
- package/dist/stacks/box/detect_resize_bounds.js +49 -0
- package/dist/stacks/box/detect_resize_bounds.js.map +1 -0
- package/dist/stacks/box/resize_handlers.d.ts.map +1 -1
- package/dist/stacks/box/resize_handlers.js +51 -44
- package/dist/stacks/box/resize_handlers.js.map +1 -1
- package/dist/stacks/box/start_resize_handle.d.ts.map +1 -1
- package/dist/stacks/box/start_resize_handle.js +2 -1
- package/dist/stacks/box/start_resize_handle.js.map +1 -1
- package/dist/stacks/box/types.d.ts +17 -4
- package/dist/stacks/box/types.d.ts.map +1 -1
- 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 +23 -0
- package/dist/surfaces/drawers/drawer.js.map +1 -0
- package/dist/surfaces/index.d.ts +1 -4
- 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 -13
- package/dist/surfaces/modal/modal.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 +21 -24
- 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 +70 -6
- 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 +1 -1
- package/src/inputs/phone_number_input/phone_number_input_adapter.tsx +2 -2
- package/src/inputs/phone_number_input/sip_input.tsx +4 -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/overlay/frame/frame.tsx +43 -63
- package/src/overlay/slide/slide.module.css +30 -0
- package/src/overlay/slide/slide.stories.tsx +58 -0
- package/src/overlay/slide/slide.tsx +51 -0
- package/src/stacks/box/box.tsx +10 -16
- package/src/stacks/box/detect_resize_bounds.ts +84 -0
- package/src/stacks/box/resize_handlers.ts +27 -15
- package/src/stacks/box/start_resize_handle.tsx +6 -3
- package/src/stacks/box/types.ts +23 -25
- package/src/surfaces/drawers/drawer.stories.tsx +130 -0
- package/src/surfaces/drawers/drawer.tsx +26 -0
- package/src/surfaces/index.ts +1 -4
- package/src/surfaces/modal/__stories__/modal.stories.tsx +70 -3
- package/src/surfaces/modal/modal.tsx +11 -2
- package/src/surfaces/window/window.stories.tsx +64 -8
- package/src/surfaces/window/window.tsx +6 -9
- package/src/themes/stylesheets/reset.css +2 -2
- package/src/themes/themes/ergo/ergo_theme.css +70 -6
- package/src/utils/dnd/hooks/use_drag_container.ts +0 -7
- 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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize_handlers.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/resize_handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"resize_handlers.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/resize_handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,SAAS,CAAC;AAYjB,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,EACrD,aAAa,CAAC,EAAE,aAAa,EAC7B,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,EACrE,MAAM,GAAE,iBAA2B,EACnC,MAAM,UAAQ,EACd,gBAAgB,UAAQ,IAEc,OAAO,KAAK,CAAC,UAAU,UAgE9D;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,EACrD,cAAc,CAAC,EAAE,cAAc,EAC/B,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,KAAK,IAAI,EACxE,MAAM,UAAQ,EACd,MAAM,GAAE,kBAA6B,IAGD,OAAO,KAAK,CAAC,UAAU,UA2D5D"}
|
|
@@ -1,54 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { detectResizeBounds as D } from "./detect_resize_bounds.js";
|
|
2
|
+
function w() {
|
|
3
|
+
const n = window.document.createElement("div");
|
|
4
|
+
return n.style.position = "absolute", n.style.inset = "-500px", n.style.backgroundColor = "transparent", n.style.pointerEvents = "auto", n;
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
return function(
|
|
7
|
-
const
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
t.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
6
|
+
function C(n, v, f, p = "right", c = !1, b = !1) {
|
|
7
|
+
return function(t) {
|
|
8
|
+
const e = n.current;
|
|
9
|
+
if (e == null) return;
|
|
10
|
+
const a = w();
|
|
11
|
+
e.appendChild(a);
|
|
12
|
+
const d = (window.getComputedStyle(e).direction === "rtl" && !b ? !c : c) ? -1 : 1, g = t.clientX, u = e.getBoundingClientRect();
|
|
13
|
+
let s = u.width;
|
|
14
|
+
const r = (i) => {
|
|
15
|
+
const h = d * (i.clientX - g), m = u.width + h;
|
|
16
|
+
if (D({
|
|
17
|
+
element: e,
|
|
18
|
+
axis: "width",
|
|
19
|
+
nextSize: m
|
|
20
|
+
}).clamped) return;
|
|
21
|
+
const x = m - s;
|
|
22
|
+
s = m, e.style.width = `${m}px`, v?.({ width: m, origin: p, totalDelta: h, currentDelta: x }), i.stopPropagation(), i.preventDefault();
|
|
23
|
+
}, l = (i) => {
|
|
24
|
+
i.buttons === 0 && o();
|
|
25
|
+
}, o = () => {
|
|
26
|
+
e.removeChild(a), document.body.removeEventListener("mousemove", r), document.body.removeEventListener("mouseup", o), document.body.removeEventListener("mouseenter", l), t.stopPropagation(), t.preventDefault(), f?.(s, p);
|
|
23
27
|
};
|
|
24
|
-
document.body.addEventListener("mousemove",
|
|
28
|
+
document.body.addEventListener("mousemove", r), document.body.addEventListener("mouseup", o), document.body.addEventListener("mouseenter", l), t.stopPropagation(), t.preventDefault();
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
29
|
-
return function(
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
t.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
function P(n, v, f, p = !1, c = "bottom") {
|
|
32
|
+
const b = p ? -1 : 1;
|
|
33
|
+
return function(t) {
|
|
34
|
+
const e = n.current;
|
|
35
|
+
if (e == null) return;
|
|
36
|
+
const a = w();
|
|
37
|
+
e.appendChild(a);
|
|
38
|
+
const E = t.clientY, y = e.getBoundingClientRect();
|
|
39
|
+
let d = y.height;
|
|
40
|
+
const g = (r) => {
|
|
41
|
+
const l = b * (r.clientY - E), o = y.height + l;
|
|
42
|
+
if (D({
|
|
43
|
+
element: e,
|
|
44
|
+
axis: "height",
|
|
45
|
+
nextSize: o
|
|
46
|
+
}).clamped) return;
|
|
47
|
+
const h = o - d;
|
|
48
|
+
d = o, e.style.height = `${o}px`, v?.({ height: o, origin: c, totalDelta: l, currentDelta: h }), r.stopPropagation(), r.preventDefault();
|
|
49
|
+
}, u = (r) => {
|
|
50
|
+
r.buttons === 0 && s();
|
|
51
|
+
}, s = () => {
|
|
52
|
+
e.removeChild(a), document.body.removeEventListener("mousemove", g), document.body.removeEventListener("mouseup", s), document.body.removeEventListener("mouseenter", u), t.stopPropagation(), t.preventDefault(), f?.(d, c);
|
|
46
53
|
};
|
|
47
|
-
document.body.addEventListener("mousemove", g), document.body.addEventListener("mouseup",
|
|
54
|
+
document.body.addEventListener("mousemove", g), document.body.addEventListener("mouseup", s), document.body.addEventListener("mouseenter", u), t.stopPropagation(), t.preventDefault();
|
|
48
55
|
};
|
|
49
56
|
}
|
|
50
57
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
58
|
+
C as createHorizontalResizeHandler,
|
|
59
|
+
P as createVerticalResizeHandler
|
|
53
60
|
};
|
|
54
61
|
//# sourceMappingURL=resize_handlers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize_handlers.js","sources":["../../../src/stacks/box/resize_handlers.ts"],"sourcesContent":["import {\n OnWidthResize,\n type HeightResizeOrigin,\n type OnHeightResize,\n type WidthResizeOrigin,\n} from './types';\n\nfunction createVeil() {\n const veil = window.document.createElement('div');\n veil.style.position = 'absolute';\n veil.style.inset = '-500px';\n veil.style.backgroundColor = 'transparent';\n veil.style.pointerEvents = 'auto';\n return veil;\n}\n\nexport function createHorizontalResizeHandler(\n targetRef: React.MutableRefObject<HTMLElement | null>,\n onWidthResize?: OnWidthResize,\n onWidthResizeEnd?: (width: number, origin: WidthResizeOrigin) => void,\n origin: WidthResizeOrigin = 'right',\n invert = false,\n disableDirection = false\n) {\n return function startHorizontalResize(event: React.MouseEvent) {\n const box = targetRef.current;\n\n if (box == null)
|
|
1
|
+
{"version":3,"file":"resize_handlers.js","sources":["../../../src/stacks/box/resize_handlers.ts"],"sourcesContent":["import {\n OnWidthResize,\n type HeightResizeOrigin,\n type OnHeightResize,\n type WidthResizeOrigin,\n} from './types';\nimport { detectResizeBounds } from './detect_resize_bounds.js';\n\nfunction createVeil() {\n const veil = window.document.createElement('div');\n veil.style.position = 'absolute';\n veil.style.inset = '-500px';\n veil.style.backgroundColor = 'transparent';\n veil.style.pointerEvents = 'auto';\n return veil;\n}\n\nexport function createHorizontalResizeHandler(\n targetRef: React.MutableRefObject<HTMLElement | null>,\n onWidthResize?: OnWidthResize,\n onWidthResizeEnd?: (width: number, origin: WidthResizeOrigin) => void,\n origin: WidthResizeOrigin = 'right',\n invert = false,\n disableDirection = false\n) {\n return function startHorizontalResize(event: React.MouseEvent) {\n const box = targetRef.current;\n\n if (box == null) return;\n\n const veil = createVeil();\n box.appendChild(veil);\n\n const languageDirection = window.getComputedStyle(box).direction;\n const finalInvert =\n languageDirection === 'rtl' && !disableDirection ? !invert : invert;\n const direction = finalInvert ? -1 : 1;\n\n const startX = event.clientX;\n const startRect = box.getBoundingClientRect();\n let width = startRect.width;\n\n const drag = (event: MouseEvent) => {\n const totalDelta = direction * (event.clientX - startX);\n const newWidth = startRect.width + totalDelta;\n\n const result = detectResizeBounds({\n element: box,\n axis: 'width',\n nextSize: newWidth,\n });\n\n if (result.clamped) return;\n\n const currentDelta = newWidth - width;\n\n // apply the new width\n width = newWidth;\n box.style.width = `${newWidth}px`;\n\n onWidthResize?.({ width: newWidth, origin, totalDelta, currentDelta });\n event.stopPropagation();\n event.preventDefault();\n };\n\n const mouseEnter = (event: MouseEvent) => {\n if (event.buttons === 0) {\n endDrag();\n }\n };\n\n const endDrag = () => {\n box.removeChild(veil);\n\n document.body.removeEventListener('mousemove', drag);\n document.body.removeEventListener('mouseup', endDrag);\n document.body.removeEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n\n onWidthResizeEnd?.(width, origin);\n };\n\n document.body.addEventListener('mousemove', drag);\n document.body.addEventListener('mouseup', endDrag);\n document.body.addEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n };\n}\n\nexport function createVerticalResizeHandler(\n targetRef: React.MutableRefObject<HTMLElement | null>,\n onHeightResize?: OnHeightResize,\n onHeightResizeEnd?: (height: number, origin: HeightResizeOrigin) => void,\n invert = false,\n origin: HeightResizeOrigin = 'bottom'\n) {\n const direction = invert ? -1 : 1;\n return function startVerticalResize(event: React.MouseEvent) {\n const box = targetRef.current;\n\n if (box == null) return;\n\n const veil = createVeil();\n box.appendChild(veil);\n\n const startY = event.clientY;\n const startRect = box.getBoundingClientRect();\n let height = startRect.height;\n\n const drag = (event: MouseEvent) => {\n const totalDelta = direction * (event.clientY - startY);\n const newHeight = startRect.height + totalDelta;\n\n const result = detectResizeBounds({\n element: box,\n axis: 'height',\n nextSize: newHeight,\n });\n\n if (result.clamped) return;\n\n const currentDelta = newHeight - height;\n\n // apply the new height\n height = newHeight;\n box.style.height = `${newHeight}px`;\n\n onHeightResize?.({ height: newHeight, origin, totalDelta, currentDelta });\n event.stopPropagation();\n event.preventDefault();\n };\n\n const mouseEnter = (event: MouseEvent) => {\n if (event.buttons === 0) {\n endDrag();\n }\n };\n\n const endDrag = () => {\n box.removeChild(veil);\n\n document.body.removeEventListener('mousemove', drag);\n document.body.removeEventListener('mouseup', endDrag);\n document.body.removeEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n\n onHeightResizeEnd?.(height, origin);\n };\n\n document.body.addEventListener('mousemove', drag);\n document.body.addEventListener('mouseup', endDrag);\n document.body.addEventListener('mouseenter', mouseEnter);\n event.stopPropagation();\n event.preventDefault();\n };\n}\n"],"names":["createVeil","veil","createHorizontalResizeHandler","targetRef","onWidthResize","onWidthResizeEnd","origin","invert","disableDirection","event","box","direction","startX","startRect","width","drag","totalDelta","newWidth","detectResizeBounds","currentDelta","mouseEnter","endDrag","createVerticalResizeHandler","onHeightResize","onHeightResizeEnd","startY","height","newHeight"],"mappings":";AAQA,SAASA,IAAa;AACpB,QAAMC,IAAO,OAAO,SAAS,cAAc,KAAK;AAChD,SAAAA,EAAK,MAAM,WAAW,YACtBA,EAAK,MAAM,QAAQ,UACnBA,EAAK,MAAM,kBAAkB,eAC7BA,EAAK,MAAM,gBAAgB,QACpBA;AACT;AAEO,SAASC,EACdC,GACAC,GACAC,GACAC,IAA4B,SAC5BC,IAAS,IACTC,IAAmB,IACnB;AACA,SAAO,SAA+BC,GAAyB;AAC7D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1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_resize_handle.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/start_resize_handle.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"start_resize_handle.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/start_resize_handle.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAG9D,MAAM,MAAM,sBAAsB,GAAG,2BAA2B,CAAC;AAEjE,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,WAAW,EACX,aAAa,EACb,gBAAgB,GACjB,EAAE,sBAAsB,2CA0BxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start_resize_handle.js","sources":["../../../src/stacks/box/start_resize_handle.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { createHorizontalResizeHandler } from './resize_handlers.js';\nimport styles from './start_resize_handle.module.css';\nimport type { HorizontalResizeHandleProps } from './types.js';\n\nexport type StartResizeHandleProps = HorizontalResizeHandleProps;\n\nexport function StartResizeHandle({\n targetRef,\n handleProps,\n onWidthResize,\n onWidthResizeEnd,\n}: StartResizeHandleProps) {\n const resizeHandler = createHorizontalResizeHandler(\n targetRef,\n onWidthResize,\n onWidthResizeEnd,\n 'left'\n );\n const offset = handleProps?.offset ? handleProps.offset : -8;\n\n const startResizeHandleStyle
|
|
1
|
+
{"version":3,"file":"start_resize_handle.js","sources":["../../../src/stacks/box/start_resize_handle.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { createHorizontalResizeHandler } from './resize_handlers.js';\nimport styles from './start_resize_handle.module.css';\nimport type { HorizontalResizeHandleProps } from './types.js';\nimport { CSSProperties } from 'react';\n\nexport type StartResizeHandleProps = HorizontalResizeHandleProps;\n\nexport function StartResizeHandle({\n targetRef,\n handleProps,\n onWidthResize,\n onWidthResizeEnd,\n}: StartResizeHandleProps) {\n const resizeHandler = createHorizontalResizeHandler(\n targetRef,\n onWidthResize,\n onWidthResizeEnd,\n 'left',\n true\n );\n\n const offset = handleProps?.offset ? handleProps.offset : -8;\n\n const startResizeHandleStyle = {\n ...handleProps?.style,\n '--resize-offset': `${offset}px`,\n width: handleProps?.size || '16px',\n } as CSSProperties;\n\n return (\n <div\n className={clsx(styles['start-resize-handle'], 'tcn-start-resize-handle')}\n onMouseDown={resizeHandler}\n style={startResizeHandleStyle}\n >\n {handleProps?.children}\n </div>\n );\n}\n"],"names":["StartResizeHandle","targetRef","handleProps","onWidthResize","onWidthResizeEnd","resizeHandler","createHorizontalResizeHandler","offset","startResizeHandleStyle","jsx","clsx","styles"],"mappings":";;;;AAQO,SAASA,EAAkB;AAAA,EAChC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AACF,GAA2B;AACzB,QAAMC,IAAgBC;AAAA,IACpBL;AAAA,IACAE;AAAA,IACAC;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAGIG,IAASL,GAAa,SAASA,EAAY,SAAS,IAEpDM,IAAyB;AAAA,IAC7B,GAAGN,GAAa;AAAA,IAChB,mBAAmB,GAAGK,CAAM;AAAA,IAC5B,OAAOL,GAAa,QAAQ;AAAA,EAAA;AAG9B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKC,EAAO,qBAAqB,GAAG,yBAAyB;AAAA,MACxE,aAAaN;AAAA,MACb,OAAOG;AAAA,MAEN,UAAAN,GAAa;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
|
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
import { HandleProps } from './handle_props.js';
|
|
2
2
|
export type WidthResizeOrigin = 'left' | 'right';
|
|
3
3
|
export type HeightResizeOrigin = 'top' | 'bottom';
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export interface BaseOnResizePayload<Origin extends WidthResizeOrigin | HeightResizeOrigin> {
|
|
5
|
+
origin: Origin;
|
|
6
|
+
totalDelta: number;
|
|
7
|
+
currentDelta: number;
|
|
8
|
+
}
|
|
9
|
+
export interface OnWidthResizePayload extends BaseOnResizePayload<WidthResizeOrigin> {
|
|
10
|
+
width: number;
|
|
11
|
+
}
|
|
12
|
+
export interface OnHeightResizePayload extends BaseOnResizePayload<HeightResizeOrigin> {
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
15
|
+
export type OnWidthResizeEnd = (width: number, origin: WidthResizeOrigin) => void;
|
|
16
|
+
export type OnHeightResizeEnd = (height: number, origin: HeightResizeOrigin) => void;
|
|
17
|
+
export type OnWidthResize = (payload: OnWidthResizePayload) => void;
|
|
18
|
+
export type OnHeightResize = (payload: OnHeightResizePayload) => void;
|
|
6
19
|
export interface HorizontalResizeHandleProps {
|
|
7
20
|
targetRef: React.MutableRefObject<HTMLElement | null>;
|
|
8
21
|
handleProps?: HandleProps;
|
|
9
22
|
onWidthResize?: OnWidthResize;
|
|
10
|
-
onWidthResizeEnd?:
|
|
23
|
+
onWidthResizeEnd?: OnWidthResizeEnd;
|
|
11
24
|
}
|
|
12
25
|
export interface VerticalResizeHandleProps {
|
|
13
26
|
targetRef: React.MutableRefObject<HTMLElement | null>;
|
|
14
27
|
handleProps?: HandleProps;
|
|
15
28
|
onHeightResize?: OnHeightResize;
|
|
16
|
-
onHeightResizeEnd?:
|
|
29
|
+
onHeightResizeEnd?: OnHeightResizeEnd;
|
|
17
30
|
}
|
|
18
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/stacks/box/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AACjD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAA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WAAW,yBAAyB;IACxC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACvC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SlideProps } from '../../overlay/slide/slide.js';
|
|
3
|
+
export type DrawerProps = SlideProps;
|
|
4
|
+
export declare const Drawer: React.ForwardRefExoticComponent<Omit<import('../../overlay/index.js').FrameProps, "draggable" | "enableResizeOnTop" | "enableResizeOnEnd" | "enableResizeOnBottom" | "enableResizeOnStart" | "enableResizeOnLeft" | "enableResizeOnRight"> & import('../../overlay/slide/slide.js').SlideOwnProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/surfaces/drawers/drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC;AAErC,eAAO,MAAM,MAAM,uUAkBjB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as s } from "clsx";
|
|
3
|
+
import i from "react";
|
|
4
|
+
import { Scaffold as l } from "../../layouts/scaffold/scaffold.js";
|
|
5
|
+
import { Slide as d } from "../../overlay/slide/slide.js";
|
|
6
|
+
const D = i.forwardRef(function({ children: e, className: a, isOpen: f, veil: o = !1, resizable: t = !1, ...c }, m) {
|
|
7
|
+
return /* @__PURE__ */ r(
|
|
8
|
+
d,
|
|
9
|
+
{
|
|
10
|
+
ref: m,
|
|
11
|
+
isOpen: f,
|
|
12
|
+
veil: o,
|
|
13
|
+
resizable: t,
|
|
14
|
+
className: s("tcn-surface", "tcn-drawer", a),
|
|
15
|
+
...c,
|
|
16
|
+
children: /* @__PURE__ */ r(l, { className: "tcn-drawer-scaffold", width: "100%", height: "100%", children: e })
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
D as Drawer
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.js","sources":["../../../src/surfaces/drawers/drawer.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Scaffold } from '../../layouts/scaffold/scaffold.js';\nimport { Slide, type SlideProps } from '../../overlay/slide/slide.js';\n\nexport type DrawerProps = SlideProps;\n\nexport const Drawer = React.forwardRef<HTMLElement, DrawerProps>(function Drawer(\n { children, className, isOpen, veil = false, resizable = false, ...props }: DrawerProps,\n ref\n) {\n return (\n <Slide\n ref={ref}\n isOpen={isOpen}\n veil={veil}\n resizable={resizable}\n className={clsx('tcn-surface', 'tcn-drawer', className)}\n {...props}\n >\n <Scaffold className={'tcn-drawer-scaffold'} width=\"100%\" height=\"100%\">\n {children}\n </Scaffold>\n </Slide>\n );\n});\n"],"names":["Drawer","React","children","className","isOpen","veil","resizable","props","ref","jsx","Slide","clsx","Scaffold"],"mappings":";;;;;AAOO,MAAMA,IAASC,EAAM,WAAqC,SAC/D,EAAE,UAAAC,GAAU,WAAAC,GAAW,QAAAC,GAAQ,MAAAC,IAAO,IAAO,WAAAC,IAAY,IAAO,GAAGC,EAAA,GACnEC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,QAAAJ;AAAA,MACA,MAAAC;AAAA,MACA,WAAAC;AAAA,MACA,WAAWK,EAAK,eAAe,cAAcR,CAAS;AAAA,MACrD,GAAGI;AAAA,MAEJ,UAAA,gBAAAE,EAACG,KAAS,WAAW,uBAAuB,OAAM,QAAO,QAAO,QAC7D,UAAAV,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
package/dist/surfaces/index.d.ts
CHANGED
|
@@ -5,10 +5,7 @@ export * from './page/h_page.js';
|
|
|
5
5
|
export * from './page/v_page.js';
|
|
6
6
|
export * from './panel/panel.js';
|
|
7
7
|
export * from './popover/popover.js';
|
|
8
|
-
export
|
|
9
|
-
export * from './drawers/drawer_top/drawer_top.js';
|
|
10
|
-
export * from './drawers/drawer_start/drawer_start.js';
|
|
11
|
-
export * from './drawers/drawer_end/drawer_end.js';
|
|
8
|
+
export { Drawer, type DrawerProps } from './drawers/drawer.js';
|
|
12
9
|
export { Window, type WindowProps } from './window/window.js';
|
|
13
10
|
export { Modal, type ModalProps } from './modal/modal.js';
|
|
14
11
|
export { Tooltip, type TooltipProps } from './tooltip/tooltip.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/surfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/surfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/surfaces/index.js
CHANGED
|
@@ -1,33 +1,27 @@
|
|
|
1
1
|
import { Alert as e } from "./alert/alert.js";
|
|
2
|
-
import { Card as
|
|
3
|
-
import { Confirm as
|
|
2
|
+
import { Card as f } from "./card/card.js";
|
|
3
|
+
import { Confirm as t } from "./confirm/confirm.js";
|
|
4
4
|
import { HPage as a } from "./page/h_page.js";
|
|
5
|
-
import { VPage as
|
|
6
|
-
import { Panel as
|
|
7
|
-
import { Popover as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { Modal as V } from "./modal/modal.js";
|
|
14
|
-
import { Tooltip as b } from "./tooltip/tooltip.js";
|
|
15
|
-
import { PopConfirm as h } from "./pop_confirm/pop_confirm.js";
|
|
5
|
+
import { VPage as i } from "./page/v_page.js";
|
|
6
|
+
import { Panel as n } from "./panel/panel.js";
|
|
7
|
+
import { Popover as C } from "./popover/popover.js";
|
|
8
|
+
import { Drawer as w } from "./drawers/drawer.js";
|
|
9
|
+
import { Window as A } from "./window/window.js";
|
|
10
|
+
import { Modal as H } from "./modal/modal.js";
|
|
11
|
+
import { Tooltip as T } from "./tooltip/tooltip.js";
|
|
12
|
+
import { PopConfirm as W } from "./pop_confirm/pop_confirm.js";
|
|
16
13
|
export {
|
|
17
14
|
e as Alert,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
E as DrawerEnd,
|
|
22
|
-
A as DrawerStart,
|
|
23
|
-
T as DrawerTop,
|
|
15
|
+
f as Card,
|
|
16
|
+
t as Confirm,
|
|
17
|
+
w as Drawer,
|
|
24
18
|
a as HPage,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
H as Modal,
|
|
20
|
+
n as Panel,
|
|
21
|
+
W as PopConfirm,
|
|
22
|
+
C as Popover,
|
|
23
|
+
T as Tooltip,
|
|
24
|
+
i as VPage,
|
|
25
|
+
A as Window
|
|
32
26
|
};
|
|
33
27
|
//# 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":";;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { FrameProps } from '../../overlay/frame/frame.js';
|
|
3
3
|
export type ModalProps = FrameProps;
|
|
4
|
-
export declare const Modal: React.ForwardRefExoticComponent<
|
|
4
|
+
export declare const Modal: React.ForwardRefExoticComponent<import('../../stacks/index.js').BoxProps<HTMLElement> & import('../../overlay/index.js').FrameOwnProps & React.RefAttributes<HTMLElement>>;
|
|
5
5
|
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/surfaces/modal/modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAMtE,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC;AAEpC,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/surfaces/modal/modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAMtE,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC;AAEpC,eAAO,MAAM,KAAK,4KA2BhB,CAAC"}
|
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as
|
|
3
|
-
import
|
|
4
|
-
import { Frame as
|
|
5
|
-
import { Scaffold as
|
|
6
|
-
import '../../modal.css';const
|
|
2
|
+
import { clsx as s } from "clsx";
|
|
3
|
+
import d from "react";
|
|
4
|
+
import { Frame as n } from "../../overlay/frame/frame.js";
|
|
5
|
+
import { Scaffold as i } from "../../layouts/scaffold/scaffold.js";
|
|
6
|
+
import '../../modal.css';const p = "_modal_473c6ef", u = { modal: p }, R = d.forwardRef(function({
|
|
7
|
+
children: a,
|
|
8
|
+
className: t,
|
|
9
|
+
isOpen: r,
|
|
10
|
+
veil: m = !0,
|
|
11
|
+
resizable: f = !1,
|
|
12
|
+
draggable: l = !1,
|
|
13
|
+
...c
|
|
14
|
+
}, e) {
|
|
7
15
|
return /* @__PURE__ */ o(
|
|
8
|
-
|
|
16
|
+
n,
|
|
9
17
|
{
|
|
10
|
-
ref:
|
|
18
|
+
ref: e,
|
|
11
19
|
isOpen: r,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
veil: m,
|
|
21
|
+
draggable: l,
|
|
22
|
+
resizable: f,
|
|
23
|
+
className: s(u.modal, "tcn-surface", "tcn-modal", t),
|
|
24
|
+
...c,
|
|
25
|
+
children: /* @__PURE__ */ o(i, { className: "tcn-modal-scaffold", width: "100%", height: "100%", children: a })
|
|
17
26
|
}
|
|
18
27
|
);
|
|
19
28
|
});
|
|
20
29
|
export {
|
|
21
|
-
|
|
30
|
+
R as Modal
|
|
22
31
|
};
|
|
23
32
|
//# sourceMappingURL=modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../../src/surfaces/modal/modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Frame, type FrameProps } from '../../overlay/frame/frame.js';\nimport { Scaffold } from '../../layouts/scaffold/scaffold.js';\n\n// Styles\nimport styles from './modal.module.css';\n\nexport type ModalProps = FrameProps;\n\nexport const Modal = React.forwardRef<HTMLElement, ModalProps>(function Modal(\n {
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../../../src/surfaces/modal/modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Frame, type FrameProps } from '../../overlay/frame/frame.js';\nimport { Scaffold } from '../../layouts/scaffold/scaffold.js';\n\n// Styles\nimport styles from './modal.module.css';\n\nexport type ModalProps = FrameProps;\n\nexport const Modal = React.forwardRef<HTMLElement, ModalProps>(function Modal(\n {\n children,\n className,\n isOpen,\n veil = true,\n resizable = false,\n draggable = false,\n ...props\n }: ModalProps,\n ref\n) {\n return (\n <Frame\n ref={ref}\n isOpen={isOpen}\n veil={veil}\n draggable={draggable}\n resizable={resizable}\n className={clsx(styles['modal'], 'tcn-surface', 'tcn-modal', className)}\n {...props}\n >\n <Scaffold className={'tcn-modal-scaffold'} width=\"100%\" height=\"100%\">\n {children}\n </Scaffold>\n </Frame>\n );\n});\n"],"names":["Modal","React","children","className","isOpen","veil","resizable","draggable","props","ref","jsx","Frame","clsx","styles","Scaffold"],"mappings":";;;;;8CAUaA,IAAQC,EAAM,WAAoC,SAC7D;AAAA,EACE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GACAC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,QAAAL;AAAA,MACA,MAAAC;AAAA,MACA,WAAAE;AAAA,MACA,WAAAD;AAAA,MACA,WAAWM,EAAKC,EAAO,OAAU,eAAe,aAAaV,CAAS;AAAA,MACrE,GAAGK;AAAA,MAEJ,UAAA,gBAAAE,EAACI,KAAS,WAAW,sBAAsB,OAAM,QAAO,QAAO,QAC5D,UAAAZ,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { FrameProps } from '../../overlay/frame/frame.js';
|
|
3
3
|
export type WindowProps = FrameProps;
|
|
4
|
-
export declare const Window: React.ForwardRefExoticComponent<
|
|
4
|
+
export declare const Window: React.ForwardRefExoticComponent<import('../../stacks/index.js').BoxProps<HTMLElement> & import('../../overlay/index.js').FrameOwnProps & React.RefAttributes<HTMLElement>>;
|
|
5
5
|
//# sourceMappingURL=window.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/surfaces/window/window.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAMtE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC;AAErC,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/surfaces/window/window.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAMtE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC;AAErC,eAAO,MAAM,MAAM,4KA2BjB,CAAC"}
|
|
@@ -1,35 +1,32 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as
|
|
3
|
-
import
|
|
4
|
-
import { Frame as
|
|
5
|
-
import { Scaffold as
|
|
6
|
-
import '../../window.css';const
|
|
7
|
-
children:
|
|
8
|
-
className:
|
|
9
|
-
isOpen:
|
|
10
|
-
draggable: i = !0,
|
|
11
|
-
resizable: _ = !0,
|
|
2
|
+
import { clsx as d } from "clsx";
|
|
3
|
+
import w from "react";
|
|
4
|
+
import { Frame as a } from "../../overlay/frame/frame.js";
|
|
5
|
+
import { Scaffold as m } from "../../layouts/scaffold/scaffold.js";
|
|
6
|
+
import '../../window.css';const l = "_window_7610fdb", p = { window: l }, W = w.forwardRef(function({
|
|
7
|
+
children: t,
|
|
8
|
+
className: r,
|
|
9
|
+
isOpen: f,
|
|
12
10
|
veil: n = !1,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...
|
|
16
|
-
},
|
|
11
|
+
draggable: i = !0,
|
|
12
|
+
resizable: c = !1,
|
|
13
|
+
...e
|
|
14
|
+
}, s) {
|
|
17
15
|
return /* @__PURE__ */ o(
|
|
18
|
-
|
|
16
|
+
a,
|
|
19
17
|
{
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
ref: s,
|
|
19
|
+
isOpen: f,
|
|
22
20
|
veil: n,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
children: /* @__PURE__ */ o(l, { width: "100%", height: "100%", className: "tcn-window-scaffold", children: r })
|
|
21
|
+
draggable: i,
|
|
22
|
+
resizable: c,
|
|
23
|
+
className: d(p.window, "tcn-surface", "tcn-window", r),
|
|
24
|
+
...e,
|
|
25
|
+
children: /* @__PURE__ */ o(m, { className: "tcn-window-scaffold", width: "100%", height: "100%", children: t })
|
|
29
26
|
}
|
|
30
27
|
);
|
|
31
28
|
});
|
|
32
29
|
export {
|
|
33
|
-
|
|
30
|
+
W as Window
|
|
34
31
|
};
|
|
35
32
|
//# sourceMappingURL=window.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.js","sources":["../../../src/surfaces/window/window.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Frame, type FrameProps } from '../../overlay/frame/frame.js';\nimport { Scaffold } from '../../layouts/scaffold/scaffold.js';\n\n// Styles\nimport styles from './window.module.css';\n\nexport type WindowProps = FrameProps;\n\nexport const Window = React.forwardRef<HTMLElement, WindowProps>(function Window(\n {\n children,\n className,\n isOpen,\n
|
|
1
|
+
{"version":3,"file":"window.js","sources":["../../../src/surfaces/window/window.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\nimport { Frame, type FrameProps } from '../../overlay/frame/frame.js';\nimport { Scaffold } from '../../layouts/scaffold/scaffold.js';\n\n// Styles\nimport styles from './window.module.css';\n\nexport type WindowProps = FrameProps;\n\nexport const Window = React.forwardRef<HTMLElement, WindowProps>(function Window(\n {\n children,\n className,\n isOpen,\n veil = false,\n draggable = true,\n resizable = false,\n ...props\n }: WindowProps,\n ref\n) {\n return (\n <Frame\n ref={ref}\n isOpen={isOpen}\n veil={veil}\n draggable={draggable}\n resizable={resizable}\n className={clsx(styles['window'], 'tcn-surface', 'tcn-window', className)}\n {...props}\n >\n <Scaffold className={'tcn-window-scaffold'} width=\"100%\" height=\"100%\">\n {children}\n </Scaffold>\n </Frame>\n );\n});\n"],"names":["Window","React","children","className","isOpen","veil","draggable","resizable","props","ref","jsx","Frame","clsx","styles","Scaffold"],"mappings":";;;;;gDAUaA,IAASC,EAAM,WAAqC,SAC/D;AAAA,EACE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GACAC,GACA;AACA,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAF;AAAA,MACA,QAAAL;AAAA,MACA,MAAAC;AAAA,MACA,WAAAC;AAAA,MACA,WAAAC;AAAA,MACA,WAAWK,EAAKC,EAAO,QAAW,eAAe,cAAcV,CAAS;AAAA,MACvE,GAAGK;AAAA,MAEJ,UAAA,gBAAAE,EAACI,KAAS,WAAW,uBAAuB,OAAM,QAAO,QAAO,QAC7D,UAAAZ,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer tcn-reset{html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,button,video,dialog{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,hgroup,menu,nav{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}legend{all:unset;display:block;margin:0;padding:0;font:inherit;color:inherit}dialog{max-width:none;max-height:none;background:transparent;color:inherit}}
|
|
1
|
+
@layer tcn-reset{html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,button,video,dialog{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}header,section,article,aside,details,figcaption,figure,footer,hgroup,menu,nav{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}legend{all:unset;display:block;margin:0;padding:0;font:inherit;color:inherit}dialog{max-width:none;max-height:none;background:transparent;color:inherit}}
|
|
@@ -91,8 +91,8 @@ const n = `/* https://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
|
|
|
91
91
|
vertical-align: baseline;
|
|
92
92
|
}
|
|
93
93
|
/* HTML5 display-role reset for older browsers */
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
header,
|
|
95
|
+
section,
|
|
96
96
|
article,
|
|
97
97
|
aside,
|
|
98
98
|
details,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset.js","sources":["../../../src/themes/stylesheets/reset.css?raw","../../../src/themes/stylesheets/reset.ts"],"sourcesContent":["export default \"/* https://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */\\n@layer tcn-reset {\\n html,\\n body,\\n div,\\n span,\\n applet,\\n object,\\n iframe,\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6,\\n p,\\n blockquote,\\n pre,\\n a,\\n abbr,\\n acronym,\\n address,\\n big,\\n cite,\\n code,\\n del,\\n dfn,\\n em,\\n img,\\n ins,\\n kbd,\\n q,\\n s,\\n samp,\\n small,\\n strike,\\n strong,\\n sub,\\n sup,\\n tt,\\n var,\\n b,\\n u,\\n i,\\n center,\\n dl,\\n dt,\\n dd,\\n ol,\\n ul,\\n li,\\n fieldset,\\n form,\\n label,\\n legend,\\n table,\\n caption,\\n tbody,\\n tfoot,\\n thead,\\n tr,\\n th,\\n td,\\n article,\\n aside,\\n canvas,\\n details,\\n embed,\\n figure,\\n figcaption,\\n footer,\\n header,\\n hgroup,\\n menu,\\n nav,\\n output,\\n ruby,\\n section,\\n summary,\\n time,\\n mark,\\n audio,\\n button,\\n video,\\n dialog {\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font: inherit;\\n vertical-align: baseline;\\n }\\n /* HTML5 display-role reset for older browsers */\\n
|
|
1
|
+
{"version":3,"file":"reset.js","sources":["../../../src/themes/stylesheets/reset.css?raw","../../../src/themes/stylesheets/reset.ts"],"sourcesContent":["export default \"/* https://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */\\n@layer tcn-reset {\\n html,\\n body,\\n div,\\n span,\\n applet,\\n object,\\n iframe,\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6,\\n p,\\n blockquote,\\n pre,\\n a,\\n abbr,\\n acronym,\\n address,\\n big,\\n cite,\\n code,\\n del,\\n dfn,\\n em,\\n img,\\n ins,\\n kbd,\\n q,\\n s,\\n samp,\\n small,\\n strike,\\n strong,\\n sub,\\n sup,\\n tt,\\n var,\\n b,\\n u,\\n i,\\n center,\\n dl,\\n dt,\\n dd,\\n ol,\\n ul,\\n li,\\n fieldset,\\n form,\\n label,\\n legend,\\n table,\\n caption,\\n tbody,\\n tfoot,\\n thead,\\n tr,\\n th,\\n td,\\n article,\\n aside,\\n canvas,\\n details,\\n embed,\\n figure,\\n figcaption,\\n footer,\\n header,\\n hgroup,\\n menu,\\n nav,\\n output,\\n ruby,\\n section,\\n summary,\\n time,\\n mark,\\n audio,\\n button,\\n video,\\n dialog {\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font: inherit;\\n vertical-align: baseline;\\n }\\n /* HTML5 display-role reset for older browsers */\\n header,\\n section,\\n article,\\n aside,\\n details,\\n figcaption,\\n figure,\\n footer,\\n hgroup,\\n menu,\\n nav {\\n display: block;\\n }\\n body {\\n line-height: 1;\\n }\\n ol,\\n ul {\\n list-style: none;\\n }\\n blockquote,\\n q {\\n quotes: none;\\n }\\n blockquote:before,\\n blockquote:after,\\n q:before,\\n q:after {\\n content: \\\"\\\";\\n content: none;\\n }\\n table {\\n border-collapse: collapse;\\n border-spacing: 0;\\n }\\n\\n legend {\\n all: unset;\\n display: block;\\n margin: 0;\\n padding: 0;\\n font: inherit;\\n color: inherit;\\n }\\n dialog {\\n max-width: none;\\n max-height: none;\\n background: transparent;\\n color: inherit;\\n }\\n}\\n\"","import css from './reset.css?raw';\n\nexport const reset = new CSSStyleSheet();\nreset.replaceSync(css);\n"],"names":["css","reset"],"mappings":"AAAA,MAAAA,IAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GCEFC,IAAQ,IAAI,cAAA;AACzBA,EAAM,YAAYD,CAAG;"}
|