@tcn/ui 0.0.4 → 0.2.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/README.md +38 -3
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +17 -12
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button/button.d.ts.map +1 -1
- package/dist/actions/button/button/button.js +7 -7
- package/dist/actions/button/button/button.js.map +1 -1
- package/dist/actions/button/slim_button/slim_button.js +2 -2
- package/dist/actions/button/slim_button/slim_button.js.map +1 -1
- package/dist/button.css +1 -1
- package/dist/draggable.css +1 -0
- package/dist/feedback/progress/progress_bar.js +1 -1
- package/dist/footer.css +1 -1
- package/dist/form/field/common/field_description.js +1 -1
- package/dist/form/field/common/field_error.js +4 -3
- package/dist/form/field/common/field_error.js.map +1 -1
- package/dist/form/field/common/field_label.js +1 -1
- package/dist/inputs/date_picker/date_picker_date.js +1 -1
- package/dist/inputs/date_picker/date_picker_day.js +1 -1
- package/dist/inputs/date_picker/date_picker_time_selector.js +1 -1
- package/dist/inputs/date_picker/date_picker_year_selector.js +1 -1
- package/dist/inputs/input/input.d.ts +2 -2
- package/dist/inputs/input/input.d.ts.map +1 -1
- package/dist/inputs/input/input.js.map +1 -1
- package/dist/inputs/options/option.d.ts +1 -0
- package/dist/inputs/options/option.d.ts.map +1 -1
- package/dist/inputs/options/option.js.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts +8 -1
- package/dist/inputs/phone_number_input/phone_number_input.d.ts.map +1 -1
- package/dist/inputs/phone_number_input/phone_number_input.js +187 -137
- package/dist/inputs/phone_number_input/phone_number_input.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.d.ts +1 -1
- package/dist/inputs/suggestions/suggestion_item.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_item.js +23 -18
- package/dist/inputs/suggestions/suggestion_item.js.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts +1 -1
- package/dist/inputs/suggestions/suggestion_list.d.ts.map +1 -1
- package/dist/inputs/suggestions/suggestion_list.js +106 -96
- package/dist/inputs/suggestions/suggestion_list.js.map +1 -1
- package/dist/inputs/textarea/textarea.d.ts +2 -2
- package/dist/inputs/textarea/textarea.d.ts.map +1 -1
- package/dist/inputs/textarea/textarea.js.map +1 -1
- package/dist/layouts/footer/footer.js +5 -5
- package/dist/layouts/footer/footer.js.map +1 -1
- package/dist/layouts/header/header.d.ts.map +1 -1
- package/dist/layouts/header/header.js.map +1 -1
- package/dist/layouts/index.d.ts +3 -2
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +26 -24
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/list/item.d.ts +1 -0
- package/dist/layouts/list/item.d.ts.map +1 -1
- package/dist/layouts/list/item.js +17 -6
- package/dist/layouts/list/item.js.map +1 -1
- package/dist/layouts/list/list.js +10 -10
- package/dist/layouts/list/list.js.map +1 -1
- package/dist/overlay/context_menu/context_menu.js +4 -4
- package/dist/overlay/frame/frame.d.ts +11 -0
- package/dist/overlay/frame/frame.d.ts.map +1 -0
- package/dist/overlay/frame/frame.js +18 -0
- package/dist/overlay/frame/frame.js.map +1 -0
- package/dist/overlay/index.d.ts +1 -0
- package/dist/overlay/index.d.ts.map +1 -1
- package/dist/overlay/index.js +5 -3
- package/dist/overlay/index.js.map +1 -1
- package/dist/overlay/popper/popper.js +12 -12
- package/dist/{portal-qqIp4SIl.js → overlay/portal/portal.js} +3 -3
- package/dist/overlay/portal/portal.js.map +1 -0
- package/dist/overlay/portal/portal_platform.js +3 -4
- package/dist/overlay/portal/portal_platform.js.map +1 -1
- package/dist/phone_number_input.css +1 -1
- package/dist/slim_button.css +1 -1
- package/dist/stacks/box/box.d.ts +1 -1
- package/dist/stacks/box/box.d.ts.map +1 -1
- package/dist/stacks/box/box.js.map +1 -1
- package/dist/surfaces/card/card.d.ts.map +1 -1
- package/dist/surfaces/card/card.js +7 -16
- package/dist/surfaces/card/card.js.map +1 -1
- package/dist/surfaces/confirm/confirm.js +4 -4
- package/dist/surfaces/index.d.ts +2 -2
- package/dist/surfaces/index.d.ts.map +1 -1
- package/dist/surfaces/index.js +22 -22
- package/dist/surfaces/modal/modal.d.ts +3 -2
- package/dist/surfaces/modal/modal.d.ts.map +1 -1
- package/dist/surfaces/modal/modal.js +14 -13
- package/dist/surfaces/modal/modal.js.map +1 -1
- package/dist/surfaces/window/window.d.ts +3 -2
- package/dist/surfaces/window/window.d.ts.map +1 -1
- package/dist/surfaces/window/window.js +17 -7
- package/dist/surfaces/window/window.js.map +1 -1
- package/dist/themes/index.js +6 -141
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/stylesheets/reset.js +140 -0
- package/dist/themes/stylesheets/reset.js.map +1 -0
- package/dist/themes/themes/ergo/ergo_theme.js +664 -0
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -0
- package/dist/tokens/bubble/bubble.js +17 -16
- package/dist/tokens/bubble/bubble.js.map +1 -1
- package/dist/tokens/chip/chip.js +9 -8
- package/dist/tokens/chip/chip.js.map +1 -1
- package/dist/typography/title/title.d.ts +2 -1
- package/dist/typography/title/title.d.ts.map +1 -1
- package/dist/typography/title/title.js +24 -23
- package/dist/typography/title/title.js.map +1 -1
- package/dist/utils/dnd/context.d.ts +4 -0
- package/dist/utils/dnd/context.d.ts.map +1 -0
- package/dist/utils/dnd/context.js +20 -0
- package/dist/utils/dnd/context.js.map +1 -0
- package/dist/utils/dnd/draggable/draggable.d.ts +7 -0
- package/dist/utils/dnd/draggable/draggable.d.ts.map +1 -0
- package/dist/utils/dnd/draggable/draggable.js +27 -0
- package/dist/utils/dnd/draggable/draggable.js.map +1 -0
- package/dist/utils/dnd/handle.d.ts +6 -0
- package/dist/utils/dnd/handle.d.ts.map +1 -0
- package/dist/utils/dnd/handle.js +22 -0
- package/dist/utils/dnd/handle.js.map +1 -0
- package/dist/utils/dnd/hooks/use_drag_container.d.ts +7 -0
- package/dist/utils/dnd/hooks/use_drag_container.d.ts.map +1 -0
- package/dist/utils/dnd/hooks/use_drag_container.js +30 -0
- package/dist/utils/dnd/hooks/use_drag_container.js.map +1 -0
- package/dist/utils/{hooks → dnd/hooks}/use_draggable.d.ts +3 -3
- package/dist/utils/dnd/hooks/use_draggable.d.ts.map +1 -0
- package/dist/utils/dnd/hooks/use_draggable.js +41 -0
- package/dist/utils/dnd/hooks/use_draggable.js.map +1 -0
- package/dist/utils/dnd/types.d.ts +10 -0
- package/dist/utils/dnd/types.d.ts.map +1 -0
- package/dist/utils/dnd/types.js +2 -0
- package/dist/utils/dnd/types.js.map +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +9 -3
- package/src/actions/button/base_button/base_button.tsx +7 -2
- package/src/actions/button/button/button.module.css +0 -78
- package/src/actions/button/button/button.tsx +2 -4
- package/src/actions/button/slim_button/slim_button.module.css +0 -26
- package/src/actions/button/slim_button/slim_button.tsx +1 -1
- package/src/inputs/input/input.tsx +3 -2
- package/src/inputs/options/option.tsx +1 -0
- package/src/inputs/phone_number_input/phone_number_input.module.css +12 -0
- package/src/inputs/phone_number_input/phone_number_input.stories.tsx +8 -0
- package/src/inputs/phone_number_input/phone_number_input.tsx +107 -21
- package/src/inputs/suggestions/suggestion_item.tsx +12 -2
- package/src/inputs/suggestions/suggestion_list.tsx +22 -3
- package/src/inputs/textarea/textarea.tsx +2 -2
- package/src/layouts/footer/footer.module.css +0 -1
- package/src/layouts/footer/footer.tsx +1 -1
- package/src/layouts/header/header.tsx +0 -1
- package/src/layouts/index.ts +3 -2
- package/src/layouts/list/item.tsx +10 -2
- package/src/layouts/list/list.tsx +2 -2
- package/src/overlay/frame/frame.stories.tsx +40 -0
- package/src/overlay/frame/frame.tsx +34 -0
- package/src/overlay/frame/frame_stories.module.css +14 -0
- package/src/overlay/index.ts +1 -0
- package/src/stacks/box/box.tsx +8 -2
- package/src/surfaces/card/card.tsx +2 -8
- package/src/surfaces/index.ts +2 -2
- package/src/surfaces/modal/__stories__/modal.stories.tsx +19 -27
- package/src/surfaces/modal/modal.tsx +13 -10
- package/src/surfaces/panel/__stories__/panel.stories.tsx +13 -12
- package/src/surfaces/window/window.stories.tsx +37 -4
- package/src/surfaces/window/window.tsx +14 -6
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_inverted_materials.module.css +34 -0
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_material_picker.tsx +52 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_card.module.css +5 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_card.tsx +40 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.tsx +83 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/types.ts +7 -0
- package/src/themes/themes/ergo/__stories__/material.stories.tsx +154 -0
- package/src/themes/themes/ergo/__stories__/sb_materials.module.css +110 -0
- package/src/themes/themes/ergo/__stories__/utils.ts +92 -0
- package/src/themes/themes/ergo/ergo_theme.css +358 -26
- package/src/typography/title/title.tsx +23 -19
- package/src/utils/dnd/__stories__/draggable.stories.tsx +48 -0
- package/src/utils/dnd/__stories__/draggable_stories.module.css +21 -0
- package/src/utils/{__stories__ → dnd/__stories__}/use_draggable.stories.tsx +15 -10
- package/src/utils/dnd/context.ts +24 -0
- package/src/utils/dnd/draggable/draggable.module.css +8 -0
- package/src/utils/dnd/draggable/draggable.tsx +42 -0
- package/src/utils/dnd/handle.tsx +32 -0
- package/src/utils/dnd/hooks/use_drag_container.ts +42 -0
- package/src/utils/{hooks → dnd/hooks}/use_draggable.ts +23 -17
- package/src/utils/dnd/types.ts +6 -0
- package/src/utils/index.ts +1 -1
- package/tsconfig.json +0 -3
- package/dist/card.css +0 -1
- package/dist/portal-qqIp4SIl.js.map +0 -1
- package/dist/themes/stylesheets/reset.css +0 -1
- package/dist/themes/themes/ergo/ergo_theme.css +0 -1
- package/dist/themes/themes/windows_98/windows_98.css +0 -1
- package/dist/title.module-B16de2jd.js +0 -5
- package/dist/title.module-B16de2jd.js.map +0 -1
- package/dist/utils/hooks/use_draggable.d.ts.map +0 -1
- package/dist/utils/hooks/use_draggable.js +0 -30
- package/dist/utils/hooks/use_draggable.js.map +0 -1
- package/src/surfaces/card/card.module.css +0 -5
- /package/dist/{overlay/portal/portal.css → portal_platform.css} +0 -0
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { clsx as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as s } from "clsx";
|
|
3
3
|
import u from "react";
|
|
4
4
|
import { theme as f } from "../../themes/theme_variables.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import "../../themes/stylesheets/reset.js";
|
|
6
|
+
import { HStack as p } from "../../stacks/h_stack.js";
|
|
7
|
+
import '../../bubble.css';const d = "_bubble_d3b757e", h = { bubble: d }, R = u.forwardRef(function({
|
|
7
8
|
children: e,
|
|
8
9
|
className: t,
|
|
9
10
|
style: o,
|
|
10
11
|
backgroundColor: b = f.accentColor,
|
|
11
|
-
textColor:
|
|
12
|
-
size:
|
|
12
|
+
textColor: r = "#fff",
|
|
13
|
+
size: l = "md",
|
|
13
14
|
elevate: a = !1,
|
|
14
15
|
...c
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
"--bubble-text-color":
|
|
16
|
+
}, i) {
|
|
17
|
+
const n = {
|
|
18
|
+
"--bubble-text-color": r,
|
|
18
19
|
"--bubble-color": b,
|
|
19
20
|
...o
|
|
20
21
|
};
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
|
|
22
|
+
return /* @__PURE__ */ m(
|
|
23
|
+
p,
|
|
23
24
|
{
|
|
24
25
|
inline: !0,
|
|
25
|
-
className:
|
|
26
|
+
className: s(h.bubble, "bubble", t),
|
|
26
27
|
width: "auto",
|
|
27
28
|
height: "auto",
|
|
28
|
-
ref:
|
|
29
|
-
style:
|
|
29
|
+
ref: i,
|
|
30
|
+
style: n,
|
|
30
31
|
hAlign: "center",
|
|
31
32
|
vAlign: "center",
|
|
32
|
-
"data-size":
|
|
33
|
+
"data-size": l,
|
|
33
34
|
"data-elevate": a,
|
|
34
35
|
padding: "4px",
|
|
35
36
|
...c,
|
|
@@ -38,6 +39,6 @@ import '../../bubble.css';const p = "_bubble_d3b757e", h = { bubble: p }, B = u.
|
|
|
38
39
|
);
|
|
39
40
|
});
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
R as Bubble
|
|
42
43
|
};
|
|
43
44
|
//# sourceMappingURL=bubble.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.js","sources":["../../../src/tokens/bubble/bubble.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React, { HTMLAttributes } from 'react';\nimport styles from './bubble.module.css';\nimport { theme } from '../../themes/index.js';\nimport { HStack } from '../../stacks/h_stack.js';\nimport { Size } from '../../utils/index.js';\n\nexport interface BubbleProps extends HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n backgroundColor?: string;\n textColor?: string;\n elevate?: boolean;\n size?: Size;\n}\n\nexport const Bubble = React.forwardRef(function Bubble(\n {\n children,\n className,\n style: defaultStyle,\n backgroundColor = theme.accentColor,\n textColor = '#fff',\n size = 'md',\n elevate = false,\n ...props\n }: BubbleProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const style = {\n '--bubble-text-color': textColor,\n '--bubble-color': backgroundColor,\n ...defaultStyle,\n } as React.CSSProperties;\n\n return (\n <HStack\n inline\n className={clsx(styles.bubble, 'bubble', className)}\n width=\"auto\"\n height=\"auto\"\n ref={ref}\n style={style}\n hAlign=\"center\"\n vAlign=\"center\"\n data-size={size}\n data-elevate={elevate}\n padding=\"4px\"\n {...props}\n >\n {children}\n </HStack>\n );\n});\n"],"names":["Bubble","React","children","className","defaultStyle","backgroundColor","theme","textColor","size","elevate","props","ref","style","jsx","HStack","clsx","styles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"bubble.js","sources":["../../../src/tokens/bubble/bubble.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React, { HTMLAttributes } from 'react';\nimport styles from './bubble.module.css';\nimport { theme } from '../../themes/index.js';\nimport { HStack } from '../../stacks/h_stack.js';\nimport { Size } from '../../utils/index.js';\n\nexport interface BubbleProps extends HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n backgroundColor?: string;\n textColor?: string;\n elevate?: boolean;\n size?: Size;\n}\n\nexport const Bubble = React.forwardRef(function Bubble(\n {\n children,\n className,\n style: defaultStyle,\n backgroundColor = theme.accentColor,\n textColor = '#fff',\n size = 'md',\n elevate = false,\n ...props\n }: BubbleProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const style = {\n '--bubble-text-color': textColor,\n '--bubble-color': backgroundColor,\n ...defaultStyle,\n } as React.CSSProperties;\n\n return (\n <HStack\n inline\n className={clsx(styles.bubble, 'bubble', className)}\n width=\"auto\"\n height=\"auto\"\n ref={ref}\n style={style}\n hAlign=\"center\"\n vAlign=\"center\"\n data-size={size}\n data-elevate={elevate}\n padding=\"4px\"\n {...props}\n >\n {children}\n </HStack>\n );\n});\n"],"names":["Bubble","React","children","className","defaultStyle","backgroundColor","theme","textColor","size","elevate","props","ref","style","jsx","HStack","clsx","styles"],"mappings":";;;;;;gDAeaA,IAASC,EAAM,WAAW,SACrC;AAAA,EACE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAOC;AAAA,EACP,iBAAAC,IAAkBC,EAAM;AAAA,EACxB,WAAAC,IAAY;AAAA,EACZ,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAQ;AAAA,IACZ,uBAAuBL;AAAA,IACvB,kBAAkBF;AAAA,IAClB,GAAGD;AAAA,EAAA;AAGL,SACE,gBAAAS;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAM;AAAA,MACN,WAAWC,EAAKC,EAAO,QAAQ,UAAUb,CAAS;AAAA,MAClD,OAAM;AAAA,MACN,QAAO;AAAA,MACP,KAAAQ;AAAA,MACA,OAAAC;AAAA,MACA,QAAO;AAAA,MACP,QAAO;AAAA,MACP,aAAWJ;AAAA,MACX,gBAAcC;AAAA,MACd,SAAQ;AAAA,MACP,GAAGC;AAAA,MAEH,UAAAR;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
package/dist/tokens/chip/chip.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { HStack as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { HStack as n } from "../../stacks/h_stack.js";
|
|
3
3
|
import { clsx as f } from "clsx";
|
|
4
4
|
import h from "react";
|
|
5
5
|
import { theme as s } from "../../themes/theme_variables.js";
|
|
6
|
-
import
|
|
7
|
-
|
|
6
|
+
import "../../themes/stylesheets/reset.js";
|
|
7
|
+
import '../../chip.css';const l = "_chip_35f6f0b", a = { chip: l }, R = h.forwardRef(function({ children: t, style: o, className: i, color: r = s.accentColor, ...c }, e) {
|
|
8
|
+
const p = {
|
|
8
9
|
"--chip-color": r,
|
|
9
10
|
...o
|
|
10
11
|
};
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
12
|
+
return /* @__PURE__ */ m(
|
|
13
|
+
n,
|
|
13
14
|
{
|
|
14
15
|
ref: e,
|
|
15
16
|
inline: !0,
|
|
@@ -17,13 +18,13 @@ import '../../chip.css';const l = "_chip_35f6f0b", a = { chip: l }, w = h.forwar
|
|
|
17
18
|
height: "auto",
|
|
18
19
|
vAlign: "center",
|
|
19
20
|
className: f(a.chip, "chip", i),
|
|
20
|
-
style:
|
|
21
|
+
style: p,
|
|
21
22
|
...c,
|
|
22
23
|
children: t
|
|
23
24
|
}
|
|
24
25
|
);
|
|
25
26
|
});
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
R as Chip
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=chip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sources":["../../../src/tokens/chip/chip.tsx"],"sourcesContent":["import { HStack, HStackProps } from '../../stacks/h_stack.js';\nimport { clsx } from 'clsx';\nimport React from 'react';\nimport styles from './chip.module.css';\nimport { theme } from '../../themes/index.js';\n\nexport interface ChipProps extends HStackProps {\n children?: React.ReactNode;\n color?: string;\n disabled?: boolean;\n}\n\nexport const Chip = React.forwardRef(function Chip(\n { children, style, className, color = theme.accentColor, ...props }: ChipProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const finalStyle = {\n '--chip-color': color,\n ...style,\n };\n\n return (\n <HStack\n ref={ref}\n inline\n width=\"auto\"\n height=\"auto\"\n vAlign=\"center\"\n className={clsx(styles.chip, 'chip', className)}\n style={finalStyle}\n {...props}\n >\n {children}\n </HStack>\n );\n});\n"],"names":["Chip","React","children","style","className","color","theme","props","ref","finalStyle","jsx","HStack","clsx","styles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"chip.js","sources":["../../../src/tokens/chip/chip.tsx"],"sourcesContent":["import { HStack, HStackProps } from '../../stacks/h_stack.js';\nimport { clsx } from 'clsx';\nimport React from 'react';\nimport styles from './chip.module.css';\nimport { theme } from '../../themes/index.js';\n\nexport interface ChipProps extends HStackProps {\n children?: React.ReactNode;\n color?: string;\n disabled?: boolean;\n}\n\nexport const Chip = React.forwardRef(function Chip(\n { children, style, className, color = theme.accentColor, ...props }: ChipProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const finalStyle = {\n '--chip-color': color,\n ...style,\n };\n\n return (\n <HStack\n ref={ref}\n inline\n width=\"auto\"\n height=\"auto\"\n vAlign=\"center\"\n className={clsx(styles.chip, 'chip', className)}\n style={finalStyle}\n {...props}\n >\n {children}\n </HStack>\n );\n});\n"],"names":["Chip","React","children","style","className","color","theme","props","ref","finalStyle","jsx","HStack","clsx","styles"],"mappings":";;;;;;4CAYaA,IAAOC,EAAM,WAAW,SACnC,EAAE,UAAAC,GAAU,OAAAC,GAAO,WAAAC,GAAW,OAAAC,IAAQC,EAAM,aAAa,GAAGC,EAAA,GAC5DC,GACA;AACA,QAAMC,IAAa;AAAA,IACjB,gBAAgBJ;AAAA,IAChB,GAAGF;AAAA,EAAA;AAGL,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,QAAM;AAAA,MACN,OAAM;AAAA,MACN,QAAO;AAAA,MACP,QAAO;AAAA,MACP,WAAWI,EAAKC,EAAO,MAAM,QAAQT,CAAS;AAAA,MAC9C,OAAOK;AAAA,MACN,GAAGF;AAAA,MAEH,UAAAL;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { WithDetailedHTMLProps } from '../../stacks/types/as.js';
|
|
2
3
|
import { Emphasis, Hierarchy, Size } from '../../utils/index.js';
|
|
3
4
|
export interface TitleOwnProps {
|
|
@@ -15,5 +16,5 @@ export interface TitleOwnProps {
|
|
|
15
16
|
as?: string;
|
|
16
17
|
}
|
|
17
18
|
export type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;
|
|
18
|
-
export declare
|
|
19
|
+
export declare const Title: React.ForwardRefExoticComponent<Omit<TitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
19
20
|
//# sourceMappingURL=title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/typography/title/title.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../src/typography/title/title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAGtE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC,aAAa,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAElF,eAAO,MAAM,KAAK,oGAoEhB,CAAC"}
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
size:
|
|
6
|
-
emphasis:
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x } from "react";
|
|
3
|
+
import { clsx as b } from "clsx";
|
|
4
|
+
import '../../title.css';const I = "_title_64bd0fd", T = { title: I }, N = x(function({
|
|
5
|
+
size: n = "md",
|
|
6
|
+
emphasis: m = "normal",
|
|
7
7
|
hierarchy: c = "primary",
|
|
8
|
-
color:
|
|
9
|
-
children:
|
|
10
|
-
className:
|
|
8
|
+
color: e,
|
|
9
|
+
children: p,
|
|
10
|
+
className: g,
|
|
11
11
|
style: i = {},
|
|
12
12
|
padStart: r,
|
|
13
|
-
padEnd:
|
|
13
|
+
padEnd: a,
|
|
14
14
|
padBottom: f,
|
|
15
15
|
padTop: l,
|
|
16
|
-
pad:
|
|
17
|
-
selectable:
|
|
18
|
-
as:
|
|
19
|
-
}) {
|
|
20
|
-
let t =
|
|
21
|
-
return
|
|
16
|
+
pad: d,
|
|
17
|
+
selectable: h = !0,
|
|
18
|
+
as: o
|
|
19
|
+
}, s) {
|
|
20
|
+
let t = o;
|
|
21
|
+
return o == null && (n === "lg" ? t = "h1" : n === "md" ? t = "h2" : t = "h3"), d && (i.padding = d), r && (i.paddingInlineStart = r), a && (i.paddingInlineEnd = a), l && (i.paddingTop = l), f && (i.paddingBottom = f), e && (i.color = e), /* @__PURE__ */ u(
|
|
22
22
|
t,
|
|
23
23
|
{
|
|
24
|
+
ref: s,
|
|
24
25
|
"data-hierarchy": c,
|
|
25
|
-
"data-emphasis":
|
|
26
|
-
"data-selectable":
|
|
27
|
-
className:
|
|
26
|
+
"data-emphasis": m,
|
|
27
|
+
"data-selectable": h,
|
|
28
|
+
className: b(T.title, "title", "tcn-typography", "tcn-title", g),
|
|
28
29
|
style: i,
|
|
29
|
-
"data-size":
|
|
30
|
-
children:
|
|
30
|
+
"data-size": n,
|
|
31
|
+
children: p
|
|
31
32
|
}
|
|
32
33
|
);
|
|
33
|
-
}
|
|
34
|
+
});
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
N as Title
|
|
36
37
|
};
|
|
37
38
|
//# sourceMappingURL=title.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React from 'react';\nimport { clsx } from 'clsx';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport function Title({\n
|
|
1
|
+
{"version":3,"file":"title.js","sources":["../../../src/typography/title/title.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport type { WithDetailedHTMLProps } from '../../stacks/types/as.js';\nimport type { Emphasis, Hierarchy, Size } from '../../utils/index.js';\nimport styles from './title.module.css';\n\nexport interface TitleOwnProps {\n children?: string;\n size?: Size;\n emphasis?: Emphasis;\n hierarchy?: Hierarchy;\n color?: string;\n pad?: string;\n padStart?: string;\n padEnd?: string;\n padTop?: string;\n padBottom?: string;\n selectable?: boolean;\n as?: string;\n}\n\nexport type TitleProps = WithDetailedHTMLProps<TitleOwnProps, 'h1' | 'h2' | 'h3'>;\n\nexport const Title = forwardRef<HTMLHeadingElement, TitleProps>(function Title(\n {\n size = 'md',\n emphasis = 'normal',\n hierarchy = 'primary',\n color,\n children,\n className,\n style = {},\n padStart,\n padEnd,\n padBottom,\n padTop,\n pad,\n selectable = true,\n as,\n },\n ref\n) {\n let As: React.ElementType = as as React.ElementType;\n\n if (as == null) {\n if (size === 'lg') {\n As = 'h1';\n } else if (size === 'md') {\n As = 'h2';\n } else {\n As = 'h3';\n }\n }\n\n if (pad) {\n style.padding = pad;\n }\n\n if (padStart) {\n style.paddingInlineStart = padStart;\n }\n\n if (padEnd) {\n style.paddingInlineEnd = padEnd;\n }\n\n if (padTop) {\n style.paddingTop = padTop;\n }\n\n if (padBottom) {\n style.paddingBottom = padBottom;\n }\n\n if (color) {\n style.color = color;\n }\n\n return (\n <As\n ref={ref}\n data-hierarchy={hierarchy}\n data-emphasis={emphasis}\n data-selectable={selectable}\n className={clsx(styles['title'], 'title', 'tcn-typography', 'tcn-title', className)}\n style={style}\n data-size={size}\n >\n {children}\n </As>\n );\n});\n"],"names":["Title","forwardRef","size","emphasis","hierarchy","color","children","className","style","padStart","padEnd","padBottom","padTop","pad","selectable","as","ref","As","jsx","clsx","styles"],"mappings":";;;8CAuBaA,IAAQC,EAA2C,SAC9D;AAAA,EACE,MAAAC,IAAO;AAAA,EACP,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ,CAAA;AAAA,EACR,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,IAAAC;AACF,GACAC,GACA;AACA,MAAIC,IAAwBF;AAE5B,SAAIA,KAAM,SACJb,MAAS,OACXe,IAAK,OACIf,MAAS,OAClBe,IAAK,OAELA,IAAK,OAILJ,MACFL,EAAM,UAAUK,IAGdJ,MACFD,EAAM,qBAAqBC,IAGzBC,MACFF,EAAM,mBAAmBE,IAGvBE,MACFJ,EAAM,aAAaI,IAGjBD,MACFH,EAAM,gBAAgBG,IAGpBN,MACFG,EAAM,QAAQH,IAId,gBAAAa;AAAA,IAACD;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,kBAAgBZ;AAAA,MAChB,iBAAeD;AAAA,MACf,mBAAiBW;AAAA,MACjB,WAAWK,EAAKC,EAAO,OAAU,SAAS,kBAAkB,aAAab,CAAS;AAAA,MAClF,OAAAC;AAAA,MACA,aAAWN;AAAA,MAEV,UAAAI;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/utils/dnd/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAShD,eAAO,MAAM,oBAAoB,wCAA6C,CAAC;AAE/E,wBAAgB,gBAAgB,IAAI,aAAa,CAWhD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContext as t, useContext as r } from "react";
|
|
2
|
+
const n = {
|
|
3
|
+
registerHandle: () => {
|
|
4
|
+
},
|
|
5
|
+
unregisterHandle: () => {
|
|
6
|
+
},
|
|
7
|
+
isDragging: !1,
|
|
8
|
+
position: { x: 0, y: 0 }
|
|
9
|
+
}, o = t(n);
|
|
10
|
+
function i() {
|
|
11
|
+
const e = r(o);
|
|
12
|
+
return e === n && console.warn(
|
|
13
|
+
"useDragContainer: No DragContainerContext found. Handles may will not register or trigger drag events."
|
|
14
|
+
), e;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
o as DragContainerContext,
|
|
18
|
+
i as useDragContainer
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../src/utils/dnd/context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { DragContainer } from './types.js';\n\nconst defaultValue: DragContainer = {\n registerHandle: () => {},\n unregisterHandle: () => {},\n isDragging: false,\n position: { x: 0, y: 0 },\n};\n\nexport const DragContainerContext = createContext<DragContainer>(defaultValue);\n\nexport function useDragContainer(): DragContainer {\n const context = useContext(DragContainerContext);\n\n if (context === defaultValue) {\n // biome-ignore lint/suspicious/noConsole: Let devs know if they're not using the context correctly\n console.warn(\n 'useDragContainer: No DragContainerContext found. Handles may will not register or trigger drag events.'\n );\n }\n\n return context;\n}\n"],"names":["defaultValue","DragContainerContext","createContext","useDragContainer","context","useContext"],"mappings":";AAGA,MAAMA,IAA8B;AAAA,EAClC,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,kBAAkB,MAAM;AAAA,EAAC;AAAA,EACzB,YAAY;AAAA,EACZ,UAAU,EAAE,GAAG,GAAG,GAAG,EAAA;AACvB,GAEaC,IAAuBC,EAA6BF,CAAY;AAEtE,SAASG,IAAkC;AAChD,QAAMC,IAAUC,EAAWJ,CAAoB;AAE/C,SAAIG,MAAYJ,KAEd,QAAQ;AAAA,IACN;AAAA,EAAA,GAIGI;AACT;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draggable.d.ts","sourceRoot":"","sources":["../../../../src/utils/dnd/draggable/draggable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA4B9C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import i, { useMemo as n } from "react";
|
|
3
|
+
import { DragContainerContext as g } from "../context.js";
|
|
4
|
+
import l from "clsx";
|
|
5
|
+
import { useMakeDragContainer as p } from "../hooks/use_drag_container.js";
|
|
6
|
+
import '../../../draggable.css';const c = "_draggable_db40376", m = { draggable: c }, y = ({
|
|
7
|
+
children: a,
|
|
8
|
+
draggable: t = !0
|
|
9
|
+
}) => {
|
|
10
|
+
const o = p({}), r = n(
|
|
11
|
+
() => ({
|
|
12
|
+
"--position-x": `${o.position.x}px`,
|
|
13
|
+
"--position-y": `${o.position.y}px`
|
|
14
|
+
}),
|
|
15
|
+
[o.position]
|
|
16
|
+
), e = i.cloneElement(a, {
|
|
17
|
+
className: l("tcn-draggable", m.draggable, a.props.className),
|
|
18
|
+
style: { ...r, ...a.props.style },
|
|
19
|
+
"data-is-dragging": o.isDragging,
|
|
20
|
+
"data-is-draggable": t
|
|
21
|
+
});
|
|
22
|
+
return /* @__PURE__ */ s(g.Provider, { value: o, children: e });
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
y as Draggable
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=draggable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draggable.js","sources":["../../../../src/utils/dnd/draggable/draggable.tsx"],"sourcesContent":["import React, { useMemo, type CSSProperties } from 'react';\n\nimport { DragContainerContext } from '../context.js';\nimport clsx from 'clsx';\nimport { useMakeDragContainer } from '../hooks/use_drag_container.js';\n\nimport styles from './draggable.module.css';\n\nexport interface DraggableProps {\n children: React.ReactElement;\n draggable?: boolean;\n}\n\nexport const Draggable: React.FC<DraggableProps> = ({\n children,\n draggable: isDraggable = true,\n}) => {\n const context = useMakeDragContainer({});\n\n const cssVariables = useMemo(\n () =>\n ({\n '--position-x': `${context.position.x}px`,\n '--position-y': `${context.position.y}px`,\n }) as CSSProperties,\n\n [context.position]\n );\n\n const clonedChildren = React.cloneElement(children, {\n className: clsx('tcn-draggable', styles.draggable, children.props.className),\n style: { ...cssVariables, ...children.props.style },\n 'data-is-dragging': context.isDragging,\n 'data-is-draggable': isDraggable,\n });\n\n return (\n <DragContainerContext.Provider value={context}>\n {clonedChildren}\n </DragContainerContext.Provider>\n );\n};\n"],"names":["Draggable","children","isDraggable","context","useMakeDragContainer","cssVariables","useMemo","clonedChildren","React","clsx","styles","DragContainerContext"],"mappings":";;;;;sDAaaA,IAAsC,CAAC;AAAA,EAClD,UAAAC;AAAA,EACA,WAAWC,IAAc;AAC3B,MAAM;AACJ,QAAMC,IAAUC,EAAqB,EAAE,GAEjCC,IAAeC;AAAA,IACnB,OACG;AAAA,MACC,gBAAgB,GAAGH,EAAQ,SAAS,CAAC;AAAA,MACrC,gBAAgB,GAAGA,EAAQ,SAAS,CAAC;AAAA,IAAA;AAAA,IAGzC,CAACA,EAAQ,QAAQ;AAAA,EAAA,GAGbI,IAAiBC,EAAM,aAAaP,GAAU;AAAA,IAClD,WAAWQ,EAAK,iBAAiBC,EAAO,WAAWT,EAAS,MAAM,SAAS;AAAA,IAC3E,OAAO,EAAE,GAAGI,GAAc,GAAGJ,EAAS,MAAM,MAAA;AAAA,IAC5C,oBAAoBE,EAAQ;AAAA,IAC5B,qBAAqBD;AAAA,EAAA,CACtB;AAED,2BACGS,EAAqB,UAArB,EAA8B,OAAOR,GACnC,UAAAI,GACH;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle.d.ts","sourceRoot":"","sources":["../../../src/utils/dnd/handle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsBhD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import s, { useRef as f, useEffect as u } from "react";
|
|
2
|
+
import a from "clsx";
|
|
3
|
+
import { useDragContainer as l } from "./context.js";
|
|
4
|
+
import { useForkRef as m } from "../hooks/use_fork_ref.js";
|
|
5
|
+
const d = ({ children: e }) => {
|
|
6
|
+
const { registerHandle: t, unregisterHandle: n } = l(), r = f(null);
|
|
7
|
+
u(() => {
|
|
8
|
+
if (r.current != null)
|
|
9
|
+
return t(r), () => {
|
|
10
|
+
r.current != null && n(r);
|
|
11
|
+
};
|
|
12
|
+
}, [t, n]);
|
|
13
|
+
const o = m(r, e.props.ref);
|
|
14
|
+
return s.cloneElement(e, {
|
|
15
|
+
className: a("tcn-drag-handle", e.props.className),
|
|
16
|
+
ref: o
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
d as DragHandle
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=handle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle.js","sources":["../../../src/utils/dnd/handle.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport clsx from 'clsx';\nimport { useDragContainer } from './context.js';\nimport { useForkRef } from '../hooks/use_fork_ref.js';\n\nexport interface DragHandleProps {\n children: React.ReactElement;\n}\n\nexport const DragHandle: React.FC<DragHandleProps> = ({ children }) => {\n const { registerHandle, unregisterHandle } = useDragContainer();\n const ref = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (ref.current == null) {\n return;\n }\n registerHandle(ref);\n return () => {\n if (ref.current == null) {\n return;\n }\n unregisterHandle(ref);\n };\n }, [registerHandle, unregisterHandle]);\n\n const mergedRef = useForkRef(ref, children.props.ref);\n return React.cloneElement(children, {\n className: clsx('tcn-drag-handle', children.props.className),\n ref: mergedRef,\n });\n};\n"],"names":["DragHandle","children","registerHandle","unregisterHandle","useDragContainer","ref","useRef","useEffect","mergedRef","useForkRef","React","clsx"],"mappings":";;;;AASO,MAAMA,IAAwC,CAAC,EAAE,UAAAC,QAAe;AACrE,QAAM,EAAE,gBAAAC,GAAgB,kBAAAC,EAAA,IAAqBC,EAAA,GACvCC,IAAMC,EAA2B,IAAI;AAE3C,EAAAC,EAAU,MAAM;AACd,QAAIF,EAAI,WAAW;AAGnB,aAAAH,EAAeG,CAAG,GACX,MAAM;AACX,QAAIA,EAAI,WAAW,QAGnBF,EAAiBE,CAAG;AAAA,MACtB;AAAA,EACF,GAAG,CAACH,GAAgBC,CAAgB,CAAC;AAErC,QAAMK,IAAYC,EAAWJ,GAAKJ,EAAS,MAAM,GAAG;AACpD,SAAOS,EAAM,aAAaT,GAAU;AAAA,IAClC,WAAWU,EAAK,mBAAmBV,EAAS,MAAM,SAAS;AAAA,IAC3D,KAAKO;AAAA,EAAA,CACN;AACH;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Position } from '../../index.js';
|
|
2
|
+
import { DragContainer } from '../types.js';
|
|
3
|
+
export interface UseDragContainerOptions {
|
|
4
|
+
initialPosition?: Position;
|
|
5
|
+
}
|
|
6
|
+
export declare function useMakeDragContainer(options: UseDragContainerOptions): DragContainer;
|
|
7
|
+
//# sourceMappingURL=use_drag_container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_drag_container.d.ts","sourceRoot":"","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,QAAQ,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa,CAgCpF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useState as n, useRef as b, useCallback as o } from "react";
|
|
2
|
+
import { useDraggable as k } from "./use_draggable.js";
|
|
3
|
+
function m(l) {
|
|
4
|
+
const [c, a] = n([]), r = b(l.initialPosition ?? { x: 0, y: 0 }), [s, g] = n(r.current), [u, i] = n(!1);
|
|
5
|
+
k({
|
|
6
|
+
handles: c,
|
|
7
|
+
startDragCallback: () => {
|
|
8
|
+
i(!0);
|
|
9
|
+
},
|
|
10
|
+
dragCallback: (e, t) => {
|
|
11
|
+
g({
|
|
12
|
+
x: r.current.x + e,
|
|
13
|
+
y: r.current.y + t
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
endDragCallback: () => {
|
|
17
|
+
i(!1), r.current = s;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const f = o((e) => {
|
|
21
|
+
a((t) => [...t, e]);
|
|
22
|
+
}, []), d = o((e) => {
|
|
23
|
+
a((t) => t.filter((D) => D !== e));
|
|
24
|
+
}, []);
|
|
25
|
+
return { registerHandle: f, unregisterHandle: d, position: s, isDragging: u };
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
m as useMakeDragContainer
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=use_drag_container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_drag_container.js","sources":["../../../../src/utils/dnd/hooks/use_drag_container.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport { useDraggable } from './use_draggable.js';\nimport type { Position } from '../../index.js';\nimport type { DragContainer } from '../types.js';\n\nexport interface UseDragContainerOptions {\n initialPosition?: Position;\n}\n\nexport function useMakeDragContainer(options: UseDragContainerOptions): DragContainer {\n const [handles, setHandles] = useState<React.RefObject<HTMLElement>[]>([]);\n const positionRef = useRef<Position>(options.initialPosition ?? { x: 0, y: 0 });\n const [position, setPosition] = useState(positionRef.current);\n const [isDragging, setIsDragging] = useState(false);\n\n useDraggable({\n handles: handles,\n startDragCallback: () => {\n setIsDragging(true);\n },\n dragCallback: (deltaX, deltaY) => {\n setPosition({\n x: positionRef.current.x + deltaX,\n y: positionRef.current.y + deltaY,\n });\n },\n endDragCallback: () => {\n setIsDragging(false);\n positionRef.current = position;\n },\n });\n\n const registerHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => [...prev, handle]);\n }, []);\n\n const unregisterHandle = useCallback((handle: React.RefObject<HTMLElement>) => {\n setHandles(prev => prev.filter(h => h !== handle));\n }, []);\n\n return { registerHandle, unregisterHandle, position, isDragging };\n}\n"],"names":["useMakeDragContainer","options","handles","setHandles","useState","positionRef","useRef","position","setPosition","isDragging","setIsDragging","useDraggable","deltaX","deltaY","registerHandle","useCallback","handle","prev","unregisterHandle","h"],"mappings":";;AASO,SAASA,EAAqBC,GAAiD;AACpF,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAyC,CAAA,CAAE,GACnEC,IAAcC,EAAiBL,EAAQ,mBAAmB,EAAE,GAAG,GAAG,GAAG,GAAG,GACxE,CAACM,GAAUC,CAAW,IAAIJ,EAASC,EAAY,OAAO,GACtD,CAACI,GAAYC,CAAa,IAAIN,EAAS,EAAK;AAElD,EAAAO,EAAa;AAAA,IACX,SAAAT;AAAA,IACA,mBAAmB,MAAM;AACvB,MAAAQ,EAAc,EAAI;AAAA,IACpB;AAAA,IACA,cAAc,CAACE,GAAQC,MAAW;AAChC,MAAAL,EAAY;AAAA,QACV,GAAGH,EAAY,QAAQ,IAAIO;AAAA,QAC3B,GAAGP,EAAY,QAAQ,IAAIQ;AAAA,MAAA,CAC5B;AAAA,IACH;AAAA,IACA,iBAAiB,MAAM;AACrB,MAAAH,EAAc,EAAK,GACnBL,EAAY,UAAUE;AAAA,IACxB;AAAA,EAAA,CACD;AAED,QAAMO,IAAiBC,EAAY,CAACC,MAAyC;AAC3E,IAAAb,EAAW,CAAAc,MAAQ,CAAC,GAAGA,GAAMD,CAAM,CAAC;AAAA,EACtC,GAAG,CAAA,CAAE,GAECE,IAAmBH,EAAY,CAACC,MAAyC;AAC7E,IAAAb,EAAW,OAAQc,EAAK,OAAO,CAAAE,MAAKA,MAAMH,CAAM,CAAC;AAAA,EACnD,GAAG,CAAA,CAAE;AAEL,SAAO,EAAE,gBAAAF,GAAgB,kBAAAI,GAAkB,UAAAX,GAAU,YAAAE,EAAA;AACvD;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
interface
|
|
1
|
+
export interface UseDraggableOptions {
|
|
2
2
|
startDragCallback: (startX: number, startY: number) => void;
|
|
3
3
|
dragCallback: (deltaX: number, deltaY: number, startX: number, startY: number) => void;
|
|
4
4
|
endDragCallback: (deltaX: number, deltaY: number, startX: number, startY: number) => void;
|
|
5
|
+
handles?: React.RefObject<HTMLElement>[] | React.RefObject<HTMLElement>;
|
|
5
6
|
}
|
|
6
|
-
export declare function useDraggable(options:
|
|
7
|
-
export {};
|
|
7
|
+
export declare function useDraggable(options: UseDraggableOptions): void;
|
|
8
8
|
//# sourceMappingURL=use_draggable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_draggable.d.ts","sourceRoot":"","sources":["../../../../src/utils/dnd/hooks/use_draggable.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvF,eAAe,EAAE,CACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,KACX,IAAI,CAAC;IACV,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;CACzE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,QAiExD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useRef as s, useEffect as f } from "react";
|
|
2
|
+
function g(t) {
|
|
3
|
+
const m = s(t.startDragCallback);
|
|
4
|
+
m.current = t.startDragCallback;
|
|
5
|
+
const i = s(t.dragCallback);
|
|
6
|
+
i.current = t.dragCallback;
|
|
7
|
+
const v = s(t.endDragCallback);
|
|
8
|
+
v.current = t.endDragCallback, f(() => {
|
|
9
|
+
const r = t.handles;
|
|
10
|
+
if (r === void 0) return;
|
|
11
|
+
let n = 0, a = 0;
|
|
12
|
+
function d(e) {
|
|
13
|
+
const l = e.clientX - n, u = e.clientY - a;
|
|
14
|
+
i.current(l, u, n, a);
|
|
15
|
+
}
|
|
16
|
+
function o(e) {
|
|
17
|
+
const l = e.clientX !== void 0 ? e.clientX - n : 0, u = e.clientY !== void 0 ? e.clientY - a : 0;
|
|
18
|
+
v.current(l, u, n, a), document.body.removeEventListener("mousemove", d), document.body.removeEventListener("mouseup", o), document.body.removeEventListener("mouseleave", o);
|
|
19
|
+
}
|
|
20
|
+
function c(e) {
|
|
21
|
+
n = e.clientX, a = e.clientY, m.current(n, a), document.body.addEventListener("mousemove", d), document.body.addEventListener("mouseup", o), document.body.addEventListener("mouseleave", o);
|
|
22
|
+
}
|
|
23
|
+
if (Array.isArray(r))
|
|
24
|
+
for (const e of r)
|
|
25
|
+
e?.current?.addEventListener("mousedown", c);
|
|
26
|
+
else
|
|
27
|
+
r?.current?.addEventListener("mousedown", c);
|
|
28
|
+
return () => {
|
|
29
|
+
if (Array.isArray(r))
|
|
30
|
+
for (const e of r)
|
|
31
|
+
e?.current?.removeEventListener("mousedown", c);
|
|
32
|
+
else
|
|
33
|
+
r?.current?.removeEventListener("mousedown", c);
|
|
34
|
+
document.body.removeEventListener("mousemove", d), document.body.removeEventListener("mouseup", o), document.body.removeEventListener("mouseleave", o);
|
|
35
|
+
};
|
|
36
|
+
}, [t.handles]);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
g as useDraggable
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=use_draggable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_draggable.js","sources":["../../../../src/utils/dnd/hooks/use_draggable.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nexport interface UseDraggableOptions {\n startDragCallback: (startX: number, startY: number) => void;\n dragCallback: (deltaX: number, deltaY: number, startX: number, startY: number) => void;\n endDragCallback: (\n deltaX: number,\n deltaY: number,\n startX: number,\n startY: number\n ) => void;\n handles?: React.RefObject<HTMLElement>[] | React.RefObject<HTMLElement>;\n}\n\nexport function useDraggable(options: UseDraggableOptions) {\n const startDragCallbackRef = useRef(options.startDragCallback);\n startDragCallbackRef.current = options.startDragCallback;\n const dragCallbackRef = useRef(options.dragCallback);\n dragCallbackRef.current = options.dragCallback;\n const endDragCallbackRef = useRef(options.endDragCallback);\n endDragCallbackRef.current = options.endDragCallback;\n\n useEffect(() => {\n const handles = options.handles;\n if (handles === undefined) return;\n let startX = 0;\n let startY = 0;\n\n function drag(event: MouseEvent) {\n const deltaX = event.clientX - startX;\n const deltaY = event.clientY - startY;\n\n dragCallbackRef.current(deltaX, deltaY, startX, startY);\n }\n\n function endDrag(event: MouseEvent) {\n const deltaX = event.clientX !== undefined ? event.clientX - startX : 0;\n const deltaY = event.clientY !== undefined ? event.clientY - startY : 0;\n endDragCallbackRef.current(deltaX, deltaY, startX, startY);\n document.body.removeEventListener('mousemove', drag);\n document.body.removeEventListener('mouseup', endDrag);\n document.body.removeEventListener('mouseleave', endDrag);\n }\n\n function startDrag(event: MouseEvent) {\n startX = event.clientX;\n startY = event.clientY;\n\n startDragCallbackRef.current(startX, startY);\n\n document.body.addEventListener('mousemove', drag);\n document.body.addEventListener('mouseup', endDrag);\n document.body.addEventListener('mouseleave', endDrag);\n }\n\n if (Array.isArray(handles)) {\n for (const element of handles) {\n if (element != null) {\n element.current?.addEventListener('mousedown', startDrag);\n }\n }\n } else {\n handles?.current?.addEventListener('mousedown', startDrag);\n }\n return () => {\n if (Array.isArray(handles)) {\n for (const element of handles) {\n if (element != null) {\n element.current?.removeEventListener('mousedown', startDrag);\n }\n }\n } else {\n handles?.current?.removeEventListener('mousedown', startDrag);\n }\n document.body.removeEventListener('mousemove', drag);\n document.body.removeEventListener('mouseup', endDrag);\n document.body.removeEventListener('mouseleave', endDrag);\n };\n }, [options.handles]);\n}\n"],"names":["useDraggable","options","startDragCallbackRef","useRef","dragCallbackRef","endDragCallbackRef","useEffect","handles","startX","startY","drag","event","deltaX","deltaY","endDrag","startDrag","element"],"mappings":";AAcO,SAASA,EAAaC,GAA8B;AACzD,QAAMC,IAAuBC,EAAOF,EAAQ,iBAAiB;AAC7D,EAAAC,EAAqB,UAAUD,EAAQ;AACvC,QAAMG,IAAkBD,EAAOF,EAAQ,YAAY;AACnD,EAAAG,EAAgB,UAAUH,EAAQ;AAClC,QAAMI,IAAqBF,EAAOF,EAAQ,eAAe;AACzD,EAAAI,EAAmB,UAAUJ,EAAQ,iBAErCK,EAAU,MAAM;AACd,UAAMC,IAAUN,EAAQ;AACxB,QAAIM,MAAY,OAAW;AAC3B,QAAIC,IAAS,GACTC,IAAS;AAEb,aAASC,EAAKC,GAAmB;AAC/B,YAAMC,IAASD,EAAM,UAAUH,GACzBK,IAASF,EAAM,UAAUF;AAE/B,MAAAL,EAAgB,QAAQQ,GAAQC,GAAQL,GAAQC,CAAM;AAAA,IACxD;AAEA,aAASK,EAAQH,GAAmB;AAClC,YAAMC,IAASD,EAAM,YAAY,SAAYA,EAAM,UAAUH,IAAS,GAChEK,IAASF,EAAM,YAAY,SAAYA,EAAM,UAAUF,IAAS;AACtE,MAAAJ,EAAmB,QAAQO,GAAQC,GAAQL,GAAQC,CAAM,GACzD,SAAS,KAAK,oBAAoB,aAAaC,CAAI,GACnD,SAAS,KAAK,oBAAoB,WAAWI,CAAO,GACpD,SAAS,KAAK,oBAAoB,cAAcA,CAAO;AAAA,IACzD;AAEA,aAASC,EAAUJ,GAAmB;AACpC,MAAAH,IAASG,EAAM,SACfF,IAASE,EAAM,SAEfT,EAAqB,QAAQM,GAAQC,CAAM,GAE3C,SAAS,KAAK,iBAAiB,aAAaC,CAAI,GAChD,SAAS,KAAK,iBAAiB,WAAWI,CAAO,GACjD,SAAS,KAAK,iBAAiB,cAAcA,CAAO;AAAA,IACtD;AAEA,QAAI,MAAM,QAAQP,CAAO;AACvB,iBAAWS,KAAWT;AACpB,QACES,GAAQ,SAAS,iBAAiB,aAAaD,CAAS;AAAA;AAI5D,MAAAR,GAAS,SAAS,iBAAiB,aAAaQ,CAAS;AAE3D,WAAO,MAAM;AACX,UAAI,MAAM,QAAQR,CAAO;AACvB,mBAAWS,KAAWT;AACpB,UACES,GAAQ,SAAS,oBAAoB,aAAaD,CAAS;AAAA;AAI/D,QAAAR,GAAS,SAAS,oBAAoB,aAAaQ,CAAS;AAE9D,eAAS,KAAK,oBAAoB,aAAaL,CAAI,GACnD,SAAS,KAAK,oBAAoB,WAAWI,CAAO,GACpD,SAAS,KAAK,oBAAoB,cAAcA,CAAO;AAAA,IACzD;AAAA,EACF,GAAG,CAACb,EAAQ,OAAO,CAAC;AACtB;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DragContainer {
|
|
2
|
+
registerHandle: (handle: React.RefObject<HTMLElement>) => void;
|
|
3
|
+
unregisterHandle: (handle: React.RefObject<HTMLElement>) => void;
|
|
4
|
+
isDragging: boolean;
|
|
5
|
+
position: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/dnd/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/D,gBAAgB,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACjE,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './focus_redirect.js';
|
|
|
2
2
|
export * from './click_away_listener.js';
|
|
3
3
|
export * from './scroll_away_listener.js';
|
|
4
4
|
export * from './hooks/make_context_hook.js';
|
|
5
|
-
export * from './hooks/use_draggable.js';
|
|
5
|
+
export * from './dnd/hooks/use_draggable.js';
|
|
6
6
|
export * from './hooks/use_fork_ref.js';
|
|
7
7
|
export * from './hooks/use_media_query.js';
|
|
8
8
|
export * from './hooks/use_resize_observer.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAE1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAE/C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAE/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { FocusRedirect as o } from "./focus_redirect.js";
|
|
|
2
2
|
import { ClickAwayListener as f } from "./click_away_listener.js";
|
|
3
3
|
import { ScrollAwayListener as m } from "./scroll_away_listener.js";
|
|
4
4
|
import { makeContextHook as p } from "./hooks/make_context_hook.js";
|
|
5
|
-
import { useDraggable as i } from "./hooks/use_draggable.js";
|
|
5
|
+
import { useDraggable as i } from "./dnd/hooks/use_draggable.js";
|
|
6
6
|
import { useForkRef as u } from "./hooks/use_fork_ref.js";
|
|
7
7
|
import { useMediaQuery as l } from "./hooks/use_media_query.js";
|
|
8
8
|
import { TriggerConfig as c, useResizeObserver as d } from "./hooks/use_resize_observer.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tcn/ui",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "TCN",
|
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
"import": "./dist/actions/index.js",
|
|
42
42
|
"default": "./dist/actions/index.js"
|
|
43
43
|
},
|
|
44
|
+
"./dnd": {
|
|
45
|
+
"@bc-monorepo/source": "./src/dnd/index.ts",
|
|
46
|
+
"types": "./dist/dnd/index.d.ts",
|
|
47
|
+
"import": "./dist/dnd/index.js",
|
|
48
|
+
"default": "./dist/dnd/index.js"
|
|
49
|
+
},
|
|
44
50
|
"./feedback": {
|
|
45
51
|
"@bc-monorepo/source": "./src/feedback/index.ts",
|
|
46
52
|
"types": "./dist/feedback/index.d.ts",
|
|
@@ -128,8 +134,8 @@
|
|
|
128
134
|
"dependencies": {
|
|
129
135
|
"clsx": "^2.1.1",
|
|
130
136
|
"react-color": "^2.19.3",
|
|
131
|
-
"@tcn/state": "1.0.
|
|
132
|
-
"@tcn/icons": "2.1.
|
|
137
|
+
"@tcn/state": "1.0.1",
|
|
138
|
+
"@tcn/icons": "2.1.1"
|
|
133
139
|
},
|
|
134
140
|
"scripts": {
|
|
135
141
|
"build": "vite build",
|
|
@@ -27,7 +27,7 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
|
|
|
27
27
|
style,
|
|
28
28
|
color,
|
|
29
29
|
hierarchy = 'secondary',
|
|
30
|
-
size = '
|
|
30
|
+
size = 'md',
|
|
31
31
|
onTouchStart,
|
|
32
32
|
onContextMenu,
|
|
33
33
|
...props
|
|
@@ -68,7 +68,12 @@ export const BaseButton = React.forwardRef<HTMLButtonElement, BaseButtonProps>(
|
|
|
68
68
|
data-hierarchy={hierarchy}
|
|
69
69
|
data-size={size}
|
|
70
70
|
data-is-disabled={Boolean(props.disabled)}
|
|
71
|
-
className={clsx(
|
|
71
|
+
className={clsx(
|
|
72
|
+
styles['base-button'],
|
|
73
|
+
'tcn-interactive',
|
|
74
|
+
'tcn-base-button',
|
|
75
|
+
className
|
|
76
|
+
)}
|
|
72
77
|
style={finalStyle}
|
|
73
78
|
onTouchStart={handleTouchStart}
|
|
74
79
|
onContextMenu={handleContextMenu}
|