@epam/ai-dial-ui-kit 0.16.0-dev.44 → 0.16.0-dev.46
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 +7 -10
- package/dist/CHANGELOG.md +9 -2
- package/dist/DateCellRenderer-Bx79kGGv.cjs +63 -0
- package/dist/MarkdownEditor-BtLY7OVq.cjs +1 -0
- package/dist/components/New/Grid/Grid.js +19 -14
- package/dist/components/New/Popup/constants.js +1 -1
- package/dist/components-manifest.json +520 -3036
- package/dist/constants/public-class-names.js +0 -7
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/dial-ui-kit.js +373 -456
- package/dist/editors.cjs +1 -1
- package/dist/editors.js +4 -10
- package/dist/grid.cjs +1 -1
- package/dist/grid.js +23 -31
- package/dist/{merge-classes-B0SnCG4i.cjs → icon-D93YIwGJ.cjs} +1 -1
- package/dist/index.css +1 -1
- package/dist/migration-guides/0.16.0/legacy-file-manager-removal.md +5 -3
- package/dist/migration-guides/0.16.0/unused-legacy-components-removal.md +128 -0
- package/dist/migration-guides/README.md +1 -0
- package/dist/node_modules/react-dnd/dist/internals/registration.js +5 -13
- package/dist/src/components/New/MarkdownEditor/lazy.d.ts +8 -2
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/src/constants/public-class-names.d.ts +0 -7
- package/dist/src/index.d.ts +2 -53
- package/dist/src/subpaths/editors.d.ts +9 -15
- package/dist/src/subpaths/grid.d.ts +2 -8
- package/dist/src/types/editor.d.ts +0 -6
- package/dist/src/types/grid.d.ts +2 -2
- package/dist/src/utils/grid-registration.d.ts +6 -8
- package/package.json +1 -12
- package/dist/DateCellRenderer-FseALDXV.cjs +0 -63
- package/dist/IconButton-CsePS6PY.cjs +0 -1
- package/dist/JsonEditor-DQhHSm93.cjs +0 -1
- package/dist/MarkdownEditor-CvIPIbPq.cjs +0 -1
- package/dist/MarkdownEditor-TR6X_gdl.cjs +0 -1
- package/dist/MarkdownEditorContainer-JIn_VNUX.cjs +0 -1
- package/dist/Switch-HEL_aq23.cjs +0 -1
- package/dist/assets/icons/file/c.svg.js +0 -5
- package/dist/assets/icons/file/cpp.svg.js +0 -5
- package/dist/assets/icons/file/cs.svg.js +0 -5
- package/dist/assets/icons/file/ini.svg.js +0 -5
- package/dist/assets/icons/file/json.svg.js +0 -5
- package/dist/assets/icons/file/md.svg.js +0 -5
- package/dist/assets/icons/file/py.svg.js +0 -5
- package/dist/assets/icons/open-popup.svg.js +0 -5
- package/dist/components/AutocompleteInput/AutocompleteInputValue.js +0 -21
- package/dist/components/ButtonDropdown/ButtonDropdown.js +0 -33
- package/dist/components/ButtonDropdown/constants.js +0 -8
- package/dist/components/Checkbox/Checkbox.js +0 -64
- package/dist/components/Checkbox/constants.js +0 -4
- package/dist/components/CollapsibleSidebar/CollapsibleSidebar.js +0 -84
- package/dist/components/ConfirmationPopup/ConfirmationPopup.js +0 -75
- package/dist/components/ConfirmationPopup/constants.js +0 -32
- package/dist/components/DraggableItem/DraggableItem.js +0 -61
- package/dist/components/DraggableItem/constants.js +0 -6
- package/dist/components/DropdownIcon/DropdownIcon.js +0 -103
- package/dist/components/FileIcon/FileIcon.js +0 -37
- package/dist/components/FileIcon/constants.js +0 -60
- package/dist/components/FileName/FileName.js +0 -68
- package/dist/components/FolderName/FolderName.js +0 -57
- package/dist/components/FormItem/FormItem.js +0 -90
- package/dist/components/FormItem/constants.js +0 -9
- package/dist/components/FormPopup/FormPopup.js +0 -59
- package/dist/components/FormPopup/constants.js +0 -6
- package/dist/components/Grid/Grid.js +0 -333
- package/dist/components/Grid/constants.js +0 -33
- package/dist/components/Grid/renderers/DateCellRenderer.js +0 -27
- package/dist/components/Grid/renderers/constants.js +0 -25
- package/dist/components/InputPopup/InputPopup.js +0 -174
- package/dist/components/JsonEditor/JsonEditor.js +0 -65
- package/dist/components/JsonEditor/lazy.js +0 -4
- package/dist/components/MarkdownEditor/MarkdownEditor.js +0 -39
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +0 -82
- package/dist/components/MarkdownEditor/lazy.js +0 -4
- package/dist/components/Notification/Notification.js +0 -67
- package/dist/components/Notification/constants.js +0 -24
- package/dist/components/NumberInput/NumberInput.js +0 -41
- package/dist/components/Pagination/Pagination.js +0 -80
- package/dist/components/Pagination/utils.js +0 -10
- package/dist/components/PasswordInput/Icons/HideIcon.js +0 -16
- package/dist/components/PasswordInput/Icons/ShowIcon.js +0 -16
- package/dist/components/PasswordInput/PasswordInput.js +0 -21
- package/dist/components/Popup/Popup.js +0 -110
- package/dist/components/Popup/constants.js +0 -12
- package/dist/components/RadioButton/RadioButton.js +0 -103
- package/dist/components/RadioGroup/RadioGroup.js +0 -92
- package/dist/components/RadioGroup/constants.js +0 -10
- package/dist/components/RadioGroupPopupField/RadioGroupPopupField.js +0 -101
- package/dist/components/ResizableContainer/ConditionalResizableContainer.js +0 -6
- package/dist/components/ResizableContainer/ResizableContainer.js +0 -79
- package/dist/components/ResizableContainer/components/ResizeHandle.js +0 -20
- package/dist/components/ResizableContainer/components/ResizeIcon.js +0 -11
- package/dist/components/SchemaRenderer/SchemaRenderer.js +0 -151
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +0 -56
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +0 -74
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +0 -118
- package/dist/components/SchemaRenderer/components/SchemaField.js +0 -78
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +0 -114
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +0 -272
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +0 -36
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +0 -192
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +0 -161
- package/dist/components/SchemaRenderer/components/SchemaSection.js +0 -81
- package/dist/components/SchemaRenderer/context.js +0 -12
- package/dist/components/Search/Search.js +0 -63
- package/dist/components/Search/constants.js +0 -27
- package/dist/components/SegmentedControl/SegmentedControl.js +0 -87
- package/dist/components/SegmentedControl/constants.js +0 -8
- package/dist/components/Select/MultiSelectTags.js +0 -23
- package/dist/components/Select/Select.js +0 -435
- package/dist/components/Select/SelectSubMenuItem.js +0 -90
- package/dist/components/Select/constants.js +0 -15
- package/dist/components/SelectField/SelectField.js +0 -66
- package/dist/components/SharedEntityIndicator/SharedEntityIndicator.js +0 -34
- package/dist/components/Slider/Slider.js +0 -158
- package/dist/components/Switch/Switch.js +0 -70
- package/dist/components/TagInput/TagInput.js +0 -179
- package/dist/components/Textarea/Textarea.js +0 -43
- package/dist/constants/editor.js +0 -52
- package/dist/icon-CrGVkVpG.cjs +0 -1
- package/dist/icon-DhjrDQ8I.cjs +0 -1
- package/dist/lazy-kq-xfXXv.cjs +0 -1
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +0 -25
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +0 -21
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +0 -20
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +0 -19
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +0 -22
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +0 -15
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +0 -13
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +0 -23
- package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +0 -88
- package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +0 -87
- package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +0 -34
- package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +0 -24
- package/dist/src/components/ButtonDropdown/constants.d.ts +0 -2
- package/dist/src/components/Checkbox/Checkbox.d.ts +0 -36
- package/dist/src/components/Checkbox/constants.d.ts +0 -1
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +0 -46
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +0 -55
- package/dist/src/components/ConfirmationPopup/constants.d.ts +0 -18
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +0 -33
- package/dist/src/components/DraggableItem/constants.d.ts +0 -3
- package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +0 -38
- package/dist/src/components/FileIcon/FileIcon.d.ts +0 -33
- package/dist/src/components/FileIcon/constants.d.ts +0 -9
- package/dist/src/components/FileName/FileName.d.ts +0 -49
- package/dist/src/components/FolderName/FolderName.d.ts +0 -37
- package/dist/src/components/FormItem/FormItem.d.ts +0 -66
- package/dist/src/components/FormItem/constants.d.ts +0 -3
- package/dist/src/components/FormPopup/FormPopup.d.ts +0 -46
- package/dist/src/components/FormPopup/constants.d.ts +0 -3
- package/dist/src/components/Grid/Grid.d.ts +0 -120
- package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +0 -1
- package/dist/src/components/Grid/constants.d.ts +0 -28
- package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +0 -34
- package/dist/src/components/Grid/renderers/constants.d.ts +0 -7
- package/dist/src/components/Grid/renderers/utils.d.ts +0 -1
- package/dist/src/components/InputPopup/InputPopup.d.ts +0 -61
- package/dist/src/components/JsonEditor/JsonEditor.d.ts +0 -25
- package/dist/src/components/JsonEditor/lazy.d.ts +0 -14
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +0 -38
- package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +0 -51
- package/dist/src/components/MarkdownEditor/lazy.d.ts +0 -7
- package/dist/src/components/Notification/Notification.d.ts +0 -58
- package/dist/src/components/Notification/constants.d.ts +0 -8
- package/dist/src/components/NumberInput/NumberInput.d.ts +0 -34
- package/dist/src/components/Pagination/Pagination.d.ts +0 -11
- package/dist/src/components/Pagination/utils.d.ts +0 -9
- package/dist/src/components/PasswordInput/Icons/HideIcon.d.ts +0 -16
- package/dist/src/components/PasswordInput/Icons/ShowIcon.d.ts +0 -16
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +0 -26
- package/dist/src/components/Popup/Popup.d.ts +0 -64
- package/dist/src/components/Popup/constants.d.ts +0 -5
- package/dist/src/components/RadioButton/RadioButton.d.ts +0 -54
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +0 -66
- package/dist/src/components/RadioGroup/constants.d.ts +0 -5
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +0 -74
- package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +0 -35
- package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +0 -72
- package/dist/src/components/ResizableContainer/components/ResizeHandle.d.ts +0 -10
- package/dist/src/components/ResizableContainer/components/ResizeIcon.d.ts +0 -8
- package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +0 -30
- package/dist/src/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.d.ts +0 -20
- package/dist/src/components/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaArrayEditor.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaField.d.ts +0 -29
- package/dist/src/components/SchemaRenderer/components/SchemaFieldContent.d.ts +0 -25
- package/dist/src/components/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +0 -33
- package/dist/src/components/SchemaRenderer/components/SchemaObjectEditor.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaOneOfEditor.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaPrimitiveField.d.ts +0 -31
- package/dist/src/components/SchemaRenderer/components/SchemaSection.d.ts +0 -33
- package/dist/src/components/SchemaRenderer/context.d.ts +0 -19
- package/dist/src/components/SchemaRenderer/types.d.ts +0 -62
- package/dist/src/components/SchemaRenderer/utils.d.ts +0 -1
- package/dist/src/components/Search/Search.d.ts +0 -35
- package/dist/src/components/Search/constants.d.ts +0 -8
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +0 -40
- package/dist/src/components/SegmentedControl/constants.d.ts +0 -5
- package/dist/src/components/Select/MultiSelectTags.d.ts +0 -8
- package/dist/src/components/Select/Select.d.ts +0 -100
- package/dist/src/components/Select/SelectSubMenuItem.d.ts +0 -8
- package/dist/src/components/Select/constants.d.ts +0 -9
- package/dist/src/components/SelectField/SelectField.d.ts +0 -42
- package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +0 -31
- package/dist/src/components/Slider/Slider.d.ts +0 -57
- package/dist/src/components/Switch/Switch.d.ts +0 -34
- package/dist/src/components/TagInput/TagInput.d.ts +0 -52
- package/dist/src/components/Textarea/Textarea.d.ts +0 -39
- package/dist/src/constants/editor.d.ts +0 -2
- package/dist/src/constants/storybook/form-item.d.ts +0 -3
- package/dist/src/models/segmented-control.d.ts +0 -7
- package/dist/src/types/form-item.d.ts +0 -31
- package/dist/src/types/select.d.ts +0 -8
- package/dist/types/form-item.js +0 -4
- package/dist/types/select.js +0 -5
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { jsxs as w, jsx as o, Fragment as D } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as z, useCallback as y } from "react";
|
|
3
|
-
import { DialLabel as B } from "../Label/Label.js";
|
|
4
|
-
import { mergeClasses as u } from "../../utils/merge-classes.js";
|
|
5
|
-
const m = (t) => (t.toString().split(".")[1] ?? "").length, q = ({
|
|
6
|
-
value: t,
|
|
7
|
-
min: e = 0,
|
|
8
|
-
max: c = 1,
|
|
9
|
-
step: r = 0.1,
|
|
10
|
-
disabled: a = !1,
|
|
11
|
-
labelProps: g,
|
|
12
|
-
labels: s,
|
|
13
|
-
formatValue: M,
|
|
14
|
-
onChange: l,
|
|
15
|
-
className: F,
|
|
16
|
-
trackClassName: N,
|
|
17
|
-
fillClassName: A,
|
|
18
|
-
thumbClassName: P,
|
|
19
|
-
labelsClassName: R,
|
|
20
|
-
"aria-label": j,
|
|
21
|
-
"aria-labelledby": X,
|
|
22
|
-
...b
|
|
23
|
-
}) => {
|
|
24
|
-
const k = z(null), v = Math.max(
|
|
25
|
-
0,
|
|
26
|
-
Math.min(100, (t - e) / (c - e) * 100)
|
|
27
|
-
), I = m(r), K = M ? M(t) : t.toFixed(I), h = y(
|
|
28
|
-
(n) => {
|
|
29
|
-
const p = k.current;
|
|
30
|
-
if (!p) return t;
|
|
31
|
-
const d = p.getBoundingClientRect(), x = (n - d.left) / d.width, i = e + x * (c - e), f = m(r), $ = parseFloat(
|
|
32
|
-
(Math.round((i - e) / r) * r + e).toFixed(f)
|
|
33
|
-
);
|
|
34
|
-
return Math.min(c, Math.max(e, $));
|
|
35
|
-
},
|
|
36
|
-
[e, c, r, t]
|
|
37
|
-
), L = y(
|
|
38
|
-
(n) => {
|
|
39
|
-
a || (n.currentTarget.setPointerCapture(n.pointerId), l?.(h(n.clientX)));
|
|
40
|
-
},
|
|
41
|
-
[a, h, l]
|
|
42
|
-
), S = y(
|
|
43
|
-
(n) => {
|
|
44
|
-
a || n.buttons === 0 || l?.(h(n.clientX));
|
|
45
|
-
},
|
|
46
|
-
[a, h, l]
|
|
47
|
-
), V = y(
|
|
48
|
-
(n) => {
|
|
49
|
-
if (a) return;
|
|
50
|
-
const p = m(r), d = (f) => parseFloat((Math.round((f - e) / r) * r + e).toFixed(p)), x = (f) => Math.min(c, Math.max(e, f));
|
|
51
|
-
let i = t;
|
|
52
|
-
switch (n.key) {
|
|
53
|
-
case "ArrowRight":
|
|
54
|
-
case "ArrowUp":
|
|
55
|
-
i = x(d(t + r));
|
|
56
|
-
break;
|
|
57
|
-
case "ArrowLeft":
|
|
58
|
-
case "ArrowDown":
|
|
59
|
-
i = x(d(t - r));
|
|
60
|
-
break;
|
|
61
|
-
case "Home":
|
|
62
|
-
i = e;
|
|
63
|
-
break;
|
|
64
|
-
case "End":
|
|
65
|
-
i = c;
|
|
66
|
-
break;
|
|
67
|
-
default:
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
n.preventDefault(), i !== t && l?.(i);
|
|
71
|
-
},
|
|
72
|
-
[a, t, r, e, c, l]
|
|
73
|
-
);
|
|
74
|
-
return /* @__PURE__ */ w(
|
|
75
|
-
"div",
|
|
76
|
-
{
|
|
77
|
-
className: u(
|
|
78
|
-
"flex flex-col",
|
|
79
|
-
a && "pointer-events-none opacity-50",
|
|
80
|
-
F
|
|
81
|
-
),
|
|
82
|
-
...b,
|
|
83
|
-
children: [
|
|
84
|
-
g && /* @__PURE__ */ o(B, { ...g, htmlFor: b.id }),
|
|
85
|
-
/* @__PURE__ */ w(
|
|
86
|
-
"div",
|
|
87
|
-
{
|
|
88
|
-
ref: k,
|
|
89
|
-
className: "relative flex h-[38px] cursor-pointer items-center",
|
|
90
|
-
onPointerDown: L,
|
|
91
|
-
onPointerMove: S,
|
|
92
|
-
children: [
|
|
93
|
-
/* @__PURE__ */ o(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
className: u(
|
|
97
|
-
"pointer-events-none absolute inset-x-0 h-3 rounded-[10px] bg-layer-1",
|
|
98
|
-
N
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
),
|
|
102
|
-
/* @__PURE__ */ o(
|
|
103
|
-
"div",
|
|
104
|
-
{
|
|
105
|
-
className: u(
|
|
106
|
-
"pointer-events-none absolute left-0 h-3 rounded-[10px] bg-controls-accent-primary",
|
|
107
|
-
A
|
|
108
|
-
),
|
|
109
|
-
style: { width: `${v}%` }
|
|
110
|
-
}
|
|
111
|
-
),
|
|
112
|
-
/* @__PURE__ */ o(
|
|
113
|
-
"div",
|
|
114
|
-
{
|
|
115
|
-
role: "slider",
|
|
116
|
-
tabIndex: a ? -1 : 0,
|
|
117
|
-
"aria-valuenow": t,
|
|
118
|
-
"aria-valuemin": e,
|
|
119
|
-
"aria-valuemax": c,
|
|
120
|
-
"aria-disabled": a || void 0,
|
|
121
|
-
"aria-label": j,
|
|
122
|
-
"aria-labelledby": X,
|
|
123
|
-
className: u(
|
|
124
|
-
"dial-small-text absolute -translate-x-1/2 flex size-[38px] cursor-grab select-none items-center justify-center rounded-full bg-layer-3 text-primary shadow focus:outline-hidden focus-visible:ring-2 focus-visible:ring-focus",
|
|
125
|
-
P
|
|
126
|
-
),
|
|
127
|
-
style: { left: `${v}%` },
|
|
128
|
-
onKeyDown: V,
|
|
129
|
-
children: K
|
|
130
|
-
}
|
|
131
|
-
)
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
s && /* @__PURE__ */ o(
|
|
136
|
-
"div",
|
|
137
|
-
{
|
|
138
|
-
className: u(
|
|
139
|
-
"dial-tiny-text flex text-secondary",
|
|
140
|
-
R
|
|
141
|
-
),
|
|
142
|
-
children: s.length === 3 ? /* @__PURE__ */ w(D, { children: [
|
|
143
|
-
/* @__PURE__ */ o("span", { children: s[0] }),
|
|
144
|
-
/* @__PURE__ */ o("span", { className: "flex-1 text-center", children: s[1] }),
|
|
145
|
-
/* @__PURE__ */ o("span", { children: s[2] })
|
|
146
|
-
] }) : /* @__PURE__ */ w(D, { children: [
|
|
147
|
-
/* @__PURE__ */ o("span", { children: s[0] }),
|
|
148
|
-
/* @__PURE__ */ o("span", { className: "ml-auto", children: s[1] })
|
|
149
|
-
] })
|
|
150
|
-
}
|
|
151
|
-
)
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
);
|
|
155
|
-
};
|
|
156
|
-
export {
|
|
157
|
-
q as DialSlider
|
|
158
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import t from "classnames";
|
|
3
|
-
import { useCallback as x } from "react";
|
|
4
|
-
const y = ({
|
|
5
|
-
label: s,
|
|
6
|
-
switchId: c,
|
|
7
|
-
isOn: e = !1,
|
|
8
|
-
disabled: r,
|
|
9
|
-
onChange: o,
|
|
10
|
-
caption: l
|
|
11
|
-
}) => {
|
|
12
|
-
const n = t(
|
|
13
|
-
"flex shrink-0 w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",
|
|
14
|
-
e ? "flex-row-reverse" : "flex-row",
|
|
15
|
-
r ? "pointer-events-none" : "",
|
|
16
|
-
r ? e ? "bg-controls-disable" : "bg-layer-4" : e ? "bg-accent-primary" : "bg-layer-4"
|
|
17
|
-
), m = x(
|
|
18
|
-
(p) => {
|
|
19
|
-
p.stopPropagation(), o?.(!e);
|
|
20
|
-
},
|
|
21
|
-
[o, e]
|
|
22
|
-
);
|
|
23
|
-
return /* @__PURE__ */ i("div", { className: "flex flex-row items-start", role: "switch", children: [
|
|
24
|
-
/* @__PURE__ */ a(
|
|
25
|
-
"input",
|
|
26
|
-
{
|
|
27
|
-
type: "checkbox",
|
|
28
|
-
onChange: m,
|
|
29
|
-
id: c,
|
|
30
|
-
disabled: r,
|
|
31
|
-
className: "invisible size-0",
|
|
32
|
-
checked: e
|
|
33
|
-
}
|
|
34
|
-
),
|
|
35
|
-
/* @__PURE__ */ a(
|
|
36
|
-
"label",
|
|
37
|
-
{
|
|
38
|
-
htmlFor: c,
|
|
39
|
-
className: n,
|
|
40
|
-
"aria-describedby": l && "caption",
|
|
41
|
-
children: /* @__PURE__ */ a(
|
|
42
|
-
"span",
|
|
43
|
-
{
|
|
44
|
-
className: t(
|
|
45
|
-
"size-3 rounded-full",
|
|
46
|
-
r ? "bg-controls-disable-accent" : "bg-controls-enable-primary"
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
(s || l) && /* @__PURE__ */ i("div", { className: "flex flex-col gap-1 ml-2", children: [
|
|
53
|
-
s && /* @__PURE__ */ a(
|
|
54
|
-
"span",
|
|
55
|
-
{
|
|
56
|
-
className: t(
|
|
57
|
-
"dial-small-text py-[1px]",
|
|
58
|
-
r ? "text-secondary" : "text-primary"
|
|
59
|
-
),
|
|
60
|
-
"aria-label": "switch-title",
|
|
61
|
-
children: s
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
l && /* @__PURE__ */ a("span", { id: "caption", className: "dial-tiny-text text-secondary", children: l })
|
|
65
|
-
] })
|
|
66
|
-
] });
|
|
67
|
-
};
|
|
68
|
-
export {
|
|
69
|
-
y as DialSwitch
|
|
70
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { jsxs as N, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as C, useState as d, useCallback as H, useEffect as D } from "react";
|
|
3
|
-
import v from "classnames";
|
|
4
|
-
import { DialLabel as y } from "../Label/Label.js";
|
|
5
|
-
import { DialTag as x } from "../Tag/Tag.js";
|
|
6
|
-
import { DialErrorText as O, DialCaptionText as ee } from "../CaptionText/CaptionText.js";
|
|
7
|
-
import { DialTooltip as te } from "../Tooltip/Tooltip.js";
|
|
8
|
-
const k = 8, ne = 24, fe = ({
|
|
9
|
-
initialTags: a = [],
|
|
10
|
-
label: I,
|
|
11
|
-
required: K,
|
|
12
|
-
elementId: E,
|
|
13
|
-
placeholder: X,
|
|
14
|
-
captionDescription: _,
|
|
15
|
-
errorText: P,
|
|
16
|
-
invalid: F,
|
|
17
|
-
disabled: c,
|
|
18
|
-
collapseTagOverflow: i = !1,
|
|
19
|
-
readOnly: s = !1,
|
|
20
|
-
containerClassName: J,
|
|
21
|
-
tagClassName: V,
|
|
22
|
-
onChange: $
|
|
23
|
-
}) => {
|
|
24
|
-
const o = C(null), b = C([]), S = C(null), [n, w] = d(a), [h, R] = d(""), [T, U] = d(!1), [m, g] = d(a.length), q = H((e) => (t) => {
|
|
25
|
-
b.current[e] = t;
|
|
26
|
-
}, []), W = H(() => {
|
|
27
|
-
if (!i) return;
|
|
28
|
-
const e = o.current;
|
|
29
|
-
if (!e) return;
|
|
30
|
-
const t = e.offsetWidth;
|
|
31
|
-
if (t === 0) return;
|
|
32
|
-
const u = S.current?.offsetWidth ?? 0, z = t - (s ? 0 : ne) - k;
|
|
33
|
-
let p = 0, l = 0;
|
|
34
|
-
for (let f = 0; f < n.length; f++) {
|
|
35
|
-
const B = b.current[f];
|
|
36
|
-
if (!B) continue;
|
|
37
|
-
const G = B.offsetWidth + k;
|
|
38
|
-
if (p + G > z) break;
|
|
39
|
-
p += G, l++;
|
|
40
|
-
}
|
|
41
|
-
if (l < n.length && l > 0)
|
|
42
|
-
for (; p + u > z && l > 0; ) {
|
|
43
|
-
l--;
|
|
44
|
-
const f = b.current[l]?.offsetWidth ?? 0;
|
|
45
|
-
p -= f + k;
|
|
46
|
-
}
|
|
47
|
-
g(l);
|
|
48
|
-
}, [i, s, n.length]), j = (e) => {
|
|
49
|
-
const t = e.trim().replace(/,$/, "");
|
|
50
|
-
if (t && !n.includes(t)) {
|
|
51
|
-
const u = [t, ...n];
|
|
52
|
-
w(u), $?.(u);
|
|
53
|
-
}
|
|
54
|
-
}, Q = (e) => {
|
|
55
|
-
(e.key === "," || e.key === "Enter") && (e.preventDefault(), j(h), R(""));
|
|
56
|
-
}, Y = () => {
|
|
57
|
-
h.trim() && (j(h), R(""));
|
|
58
|
-
}, A = (e) => {
|
|
59
|
-
const t = n.filter((u, M) => M !== e);
|
|
60
|
-
w(t), $?.(t);
|
|
61
|
-
}, Z = () => P ? /* @__PURE__ */ r(O, { text: P }) : _ ? /* @__PURE__ */ r(ee, { text: _ }) : null;
|
|
62
|
-
D(() => {
|
|
63
|
-
if (i) return;
|
|
64
|
-
const e = new ResizeObserver(() => {
|
|
65
|
-
if (o.current) {
|
|
66
|
-
const t = o.current.scrollHeight > o.current.clientHeight + 10;
|
|
67
|
-
U(t);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
return o.current && e.observe(o.current), () => e.disconnect();
|
|
71
|
-
}, [n, i]), D(() => {
|
|
72
|
-
if (!i) {
|
|
73
|
-
g(n.length);
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
g(n.length);
|
|
77
|
-
const e = new ResizeObserver(() => {
|
|
78
|
-
W();
|
|
79
|
-
}), t = o.current;
|
|
80
|
-
return t && e.observe(t), W(), () => e.disconnect();
|
|
81
|
-
}, [i, W, n]), D(() => {
|
|
82
|
-
w(a);
|
|
83
|
-
}, [JSON.stringify(a)]);
|
|
84
|
-
const L = /* @__PURE__ */ N(
|
|
85
|
-
"div",
|
|
86
|
-
{
|
|
87
|
-
ref: o,
|
|
88
|
-
className: v(
|
|
89
|
-
"flex gap-2 items-center relative",
|
|
90
|
-
i ? "flex-nowrap overflow-hidden w-full min-w-0" : v("flex-wrap", T ? "flex-col-reverse" : "flex-row"),
|
|
91
|
-
J
|
|
92
|
-
),
|
|
93
|
-
children: [
|
|
94
|
-
(i ? n.slice(0, m) : n).map(
|
|
95
|
-
(e, t) => /* @__PURE__ */ r(
|
|
96
|
-
x,
|
|
97
|
-
{
|
|
98
|
-
label: e,
|
|
99
|
-
className: V,
|
|
100
|
-
closable: !c && !s,
|
|
101
|
-
onRemove: !c && !s ? () => A(t) : void 0
|
|
102
|
-
},
|
|
103
|
-
e + t
|
|
104
|
-
)
|
|
105
|
-
),
|
|
106
|
-
i && m < n.length && /* @__PURE__ */ r(
|
|
107
|
-
te,
|
|
108
|
-
{
|
|
109
|
-
tooltip: n.slice(m).join(", "),
|
|
110
|
-
triggerClassName: "inline-flex shrink-0 cursor-pointer",
|
|
111
|
-
children: /* @__PURE__ */ r(x, { label: `+${n.length - m}` })
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
!s && /* @__PURE__ */ r(
|
|
115
|
-
"input",
|
|
116
|
-
{
|
|
117
|
-
id: E,
|
|
118
|
-
type: "text",
|
|
119
|
-
value: h,
|
|
120
|
-
onChange: (e) => R(e.target.value),
|
|
121
|
-
onKeyDown: Q,
|
|
122
|
-
onBlur: Y,
|
|
123
|
-
className: v(
|
|
124
|
-
"dial-input outline-hidden !border-none w-full flex-1 !p-1 !h-auto",
|
|
125
|
-
i ? "min-w-0" : "min-w-[100px]"
|
|
126
|
-
),
|
|
127
|
-
placeholder: X ?? "",
|
|
128
|
-
disabled: c
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
i && /* @__PURE__ */ N(
|
|
132
|
-
"div",
|
|
133
|
-
{
|
|
134
|
-
className: "absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap",
|
|
135
|
-
"aria-hidden": !0,
|
|
136
|
-
children: [
|
|
137
|
-
n.map((e, t) => /* @__PURE__ */ r(
|
|
138
|
-
"div",
|
|
139
|
-
{
|
|
140
|
-
ref: q(t),
|
|
141
|
-
className: "inline-flex shrink-0",
|
|
142
|
-
children: /* @__PURE__ */ r(
|
|
143
|
-
x,
|
|
144
|
-
{
|
|
145
|
-
label: e,
|
|
146
|
-
className: V,
|
|
147
|
-
closable: !c && !s,
|
|
148
|
-
onRemove: !c && !s ? () => A(t) : void 0
|
|
149
|
-
}
|
|
150
|
-
)
|
|
151
|
-
},
|
|
152
|
-
`measure-${e}-${t}`
|
|
153
|
-
)),
|
|
154
|
-
/* @__PURE__ */ r("div", { ref: S, className: "inline-flex shrink-0", children: /* @__PURE__ */ r(x, { label: `+${n.length}` }) })
|
|
155
|
-
]
|
|
156
|
-
}
|
|
157
|
-
)
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
return s ? L : /* @__PURE__ */ N("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
162
|
-
/* @__PURE__ */ r(y, { label: I, required: K, htmlFor: E }),
|
|
163
|
-
/* @__PURE__ */ r(
|
|
164
|
-
"div",
|
|
165
|
-
{
|
|
166
|
-
className: v(
|
|
167
|
-
"dial-input min-h-[38px] p-[6px]",
|
|
168
|
-
F && "dial-input-error",
|
|
169
|
-
c && "dial-input-disable"
|
|
170
|
-
),
|
|
171
|
-
children: L
|
|
172
|
-
}
|
|
173
|
-
),
|
|
174
|
-
Z()
|
|
175
|
-
] });
|
|
176
|
-
};
|
|
177
|
-
export {
|
|
178
|
-
fe as DialTagInput
|
|
179
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import { mergeClasses as l } from "../../utils/merge-classes.js";
|
|
4
|
-
import { DialErrorText as u, DialCaptionText as g } from "../CaptionText/CaptionText.js";
|
|
5
|
-
import { DialLabel as v } from "../Label/Label.js";
|
|
6
|
-
const b = ({
|
|
7
|
-
className: s = "",
|
|
8
|
-
value: o,
|
|
9
|
-
onChange: m,
|
|
10
|
-
error: t,
|
|
11
|
-
containerClassName: n,
|
|
12
|
-
resize: x = !1,
|
|
13
|
-
labelProps: i,
|
|
14
|
-
caption: d,
|
|
15
|
-
id: r,
|
|
16
|
-
...a
|
|
17
|
-
}) => {
|
|
18
|
-
const p = l(
|
|
19
|
-
"dial-textarea dial-input px-3 py-2",
|
|
20
|
-
a.invalid && "dial-input-error",
|
|
21
|
-
a.disabled && "dial-input-disable",
|
|
22
|
-
x ? "resize" : "resize-none",
|
|
23
|
-
s
|
|
24
|
-
);
|
|
25
|
-
return /* @__PURE__ */ f("div", { className: l("flex flex-col gap-y-1", n), children: [
|
|
26
|
-
i && /* @__PURE__ */ e(v, { ...i, htmlFor: r }),
|
|
27
|
-
/* @__PURE__ */ e(
|
|
28
|
-
"textarea",
|
|
29
|
-
{
|
|
30
|
-
id: r,
|
|
31
|
-
value: o || "",
|
|
32
|
-
className: p,
|
|
33
|
-
onChange: (c) => m?.(c.currentTarget.value),
|
|
34
|
-
...a
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
/* @__PURE__ */ e(u, { text: t }),
|
|
38
|
-
!t && /* @__PURE__ */ e(g, { text: d })
|
|
39
|
-
] });
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
b as DialTextarea
|
|
43
|
-
};
|
package/dist/constants/editor.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { EditorThemes as r } from "../types/editor.js";
|
|
2
|
-
const e = {
|
|
3
|
-
[r.dark]: {
|
|
4
|
-
base: "vs-dark",
|
|
5
|
-
inherit: !1,
|
|
6
|
-
rules: [
|
|
7
|
-
{ token: "string.key.json", foreground: "#37BABC" },
|
|
8
|
-
{ token: "string.value.json", foreground: "#5C8DEA" },
|
|
9
|
-
{ token: "number", foreground: "#D97C27" },
|
|
10
|
-
{ token: "keyword.json", foreground: "#F4CE46" },
|
|
11
|
-
{ token: "delimiter", foreground: "#EEF1F7" },
|
|
12
|
-
{ token: "delimiter.bracket.json", foreground: "#A972FF" },
|
|
13
|
-
{ token: "delimiter.parenthesis", foreground: "#A972FF" }
|
|
14
|
-
],
|
|
15
|
-
colors: {
|
|
16
|
-
"editor.foreground": "#F76464",
|
|
17
|
-
"editor.background": "#161B2D",
|
|
18
|
-
"editorCursor.foreground": "#EEF1F7",
|
|
19
|
-
"editor.selectionBackground": "#5C8DEA2B",
|
|
20
|
-
"editorLineNumber.foreground": "#242C42",
|
|
21
|
-
"scrollbarSlider.background": "#242C42",
|
|
22
|
-
"scrollbarSlider.hoverBackground": "#242C42",
|
|
23
|
-
"scrollbarSlider.activeBackground": "#242C42"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
[r.light]: {
|
|
27
|
-
base: "vs",
|
|
28
|
-
inherit: !1,
|
|
29
|
-
rules: [
|
|
30
|
-
{ token: "string.key.json", foreground: "#009D9F" },
|
|
31
|
-
{ token: "string.value.json", foreground: "#2764D9" },
|
|
32
|
-
{ token: "number", foreground: "#B25500" },
|
|
33
|
-
{ token: "keyword.json", foreground: "#3F3D25" },
|
|
34
|
-
{ token: "delimiter", foreground: "#161B2D" },
|
|
35
|
-
{ token: "delimiter.bracket.json", foreground: "#7E39EC" },
|
|
36
|
-
{ token: "delimiter.parenthesis", foreground: "#7E39EC" }
|
|
37
|
-
],
|
|
38
|
-
colors: {
|
|
39
|
-
"editor.foreground": "#AE2F2F",
|
|
40
|
-
"editor.background": "#EEF1F7",
|
|
41
|
-
"editorCursor.foreground": "#161B2D",
|
|
42
|
-
"editor.selectionBackground": "#5C8DEA2B",
|
|
43
|
-
"editorLineNumber.foreground": "#242C42",
|
|
44
|
-
"scrollbarSlider.background": "#242C42",
|
|
45
|
-
"scrollbarSlider.hoverBackground": "#242C42",
|
|
46
|
-
"scrollbarSlider.activeBackground": "#242C42"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
e as EDITOR_THEMES_CONFIG
|
|
52
|
-
};
|
package/dist/icon-CrGVkVpG.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=(s=>(s[s.LG=24]="LG",s[s.MD=20]="MD",s[s.SM=16]="SM",s))(t||{});const S=18,r={size:S,stroke:2};exports.BASE_ICON_PROPS=r;exports.BASE_ICON_SIZE=S;exports.DIAL_ICON_SIZE=t;
|
package/dist/icon-DhjrDQ8I.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.DIAL_KIT_ICON_STROKE=1.5;
|
package/dist/lazy-kq-xfXXv.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var o=(r=>(r.dark="dark",r.light="light",r))(o||{});const e=()=>Promise.resolve().then(()=>require("./JsonEditor-DQhHSm93.cjs")),i=()=>Promise.resolve().then(()=>require("./MarkdownEditor-TR6X_gdl.cjs")),a=()=>Promise.resolve().then(()=>require("./MarkdownEditor-CvIPIbPq.cjs"));exports.EditorThemes=o;exports.LazyDialJsonEditor=e;exports.LazyDialMarkdownEditor=i;exports.LazyMarkdownEditor=a;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
class r {
|
|
2
|
-
beginDrag() {
|
|
3
|
-
const t = this.spec, o = this.monitor;
|
|
4
|
-
let n = null;
|
|
5
|
-
return typeof t.item == "object" ? n = t.item : typeof t.item == "function" ? n = t.item(o) : n = {}, n ?? null;
|
|
6
|
-
}
|
|
7
|
-
canDrag() {
|
|
8
|
-
const t = this.spec, o = this.monitor;
|
|
9
|
-
return typeof t.canDrag == "boolean" ? t.canDrag : typeof t.canDrag == "function" ? t.canDrag(o) : !0;
|
|
10
|
-
}
|
|
11
|
-
isDragging(t, o) {
|
|
12
|
-
const n = this.spec, e = this.monitor, { isDragging: s } = n;
|
|
13
|
-
return s ? s(e) : o === t.getSourceId();
|
|
14
|
-
}
|
|
15
|
-
endDrag() {
|
|
16
|
-
const t = this.spec, o = this.monitor, n = this.connector, { end: e } = t;
|
|
17
|
-
e && e(o.getItem(), o), n.reconnect();
|
|
18
|
-
}
|
|
19
|
-
constructor(t, o, n) {
|
|
20
|
-
this.spec = t, this.monitor = o, this.connector = n;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
r as DragSourceImpl
|
|
25
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useMemo as r } from "react";
|
|
2
|
-
function u(e) {
|
|
3
|
-
return r(
|
|
4
|
-
() => e.hooks.dragSource(),
|
|
5
|
-
[
|
|
6
|
-
e
|
|
7
|
-
]
|
|
8
|
-
);
|
|
9
|
-
}
|
|
10
|
-
function n(e) {
|
|
11
|
-
return r(
|
|
12
|
-
() => e.hooks.dragPreview(),
|
|
13
|
-
[
|
|
14
|
-
e
|
|
15
|
-
]
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
n as useConnectDragPreview,
|
|
20
|
-
u as useConnectDragSource
|
|
21
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { invariant as n } from "../../../../@react-dnd/invariant/dist/index.js";
|
|
2
|
-
import { useCollectedProps as c } from "../useCollectedProps.js";
|
|
3
|
-
import { useOptionalFactory as s } from "../useOptionalFactory.js";
|
|
4
|
-
import { useConnectDragSource as p, useConnectDragPreview as a } from "./connectors.js";
|
|
5
|
-
import { useDragSourceConnector as m } from "./useDragSourceConnector.js";
|
|
6
|
-
import { useDragSourceMonitor as u } from "./useDragSourceMonitor.js";
|
|
7
|
-
import { useRegisteredDragSource as g } from "./useRegisteredDragSource.js";
|
|
8
|
-
function w(t, i) {
|
|
9
|
-
const e = s(t, i);
|
|
10
|
-
n(!e.begin, "useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");
|
|
11
|
-
const r = u(), o = m(e.options, e.previewOptions);
|
|
12
|
-
return g(e, r, o), [
|
|
13
|
-
c(e.collect, r, o),
|
|
14
|
-
p(o),
|
|
15
|
-
a(o)
|
|
16
|
-
];
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
w as useDrag
|
|
20
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useMemo as f, useEffect as m } from "react";
|
|
2
|
-
import { DragSourceImpl as t } from "./DragSourceImpl.js";
|
|
3
|
-
function p(r, e, u) {
|
|
4
|
-
const o = f(
|
|
5
|
-
() => new t(r, e, u),
|
|
6
|
-
[
|
|
7
|
-
e,
|
|
8
|
-
u
|
|
9
|
-
]
|
|
10
|
-
);
|
|
11
|
-
return m(() => {
|
|
12
|
-
o.spec = r;
|
|
13
|
-
}, [
|
|
14
|
-
r
|
|
15
|
-
]), o;
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
p as useDragSource
|
|
19
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useMemo as t } from "react";
|
|
2
|
-
import { useDragDropManager as u } from "../useDragDropManager.js";
|
|
3
|
-
import { useIsomorphicLayoutEffect as c } from "../useIsomorphicLayoutEffect.js";
|
|
4
|
-
import { SourceConnector as m } from "../../internals/SourceConnector.js";
|
|
5
|
-
function g(o, e) {
|
|
6
|
-
const n = u(), r = t(
|
|
7
|
-
() => new m(n.getBackend()),
|
|
8
|
-
[
|
|
9
|
-
n
|
|
10
|
-
]
|
|
11
|
-
);
|
|
12
|
-
return c(() => (r.dragSourceOptions = o || null, r.reconnect(), () => r.disconnectDragSource()), [
|
|
13
|
-
r,
|
|
14
|
-
o
|
|
15
|
-
]), c(() => (r.dragPreviewOptions = e || null, r.reconnect(), () => r.disconnectDragPreview()), [
|
|
16
|
-
r,
|
|
17
|
-
e
|
|
18
|
-
]), r;
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
g as useDragSourceConnector
|
|
22
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useMemo as o } from "react";
|
|
2
|
-
import { useDragDropManager as e } from "../useDragDropManager.js";
|
|
3
|
-
import { DragSourceMonitorImpl as m } from "../../internals/DragSourceMonitorImpl.js";
|
|
4
|
-
function u() {
|
|
5
|
-
const r = e();
|
|
6
|
-
return o(
|
|
7
|
-
() => new m(r),
|
|
8
|
-
[
|
|
9
|
-
r
|
|
10
|
-
]
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
u as useDragSourceMonitor
|
|
15
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { invariant as t } from "../../../../@react-dnd/invariant/dist/index.js";
|
|
2
|
-
import { useMemo as n } from "react";
|
|
3
|
-
function i(e) {
|
|
4
|
-
return n(() => {
|
|
5
|
-
const r = e.type;
|
|
6
|
-
return t(r != null, "spec.type must be defined"), r;
|
|
7
|
-
}, [
|
|
8
|
-
e
|
|
9
|
-
]);
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
i as useDragType
|
|
13
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useDragDropManager as n } from "../useDragDropManager.js";
|
|
2
|
-
import { useIsomorphicLayoutEffect as g } from "../useIsomorphicLayoutEffect.js";
|
|
3
|
-
import { useDragSource as m } from "./useDragSource.js";
|
|
4
|
-
import { useDragType as f } from "./useDragType.js";
|
|
5
|
-
import { registerSource as c } from "../../internals/registration.js";
|
|
6
|
-
function h(t, r, e) {
|
|
7
|
-
const u = n(), a = m(t, r, e), o = f(t);
|
|
8
|
-
g(function() {
|
|
9
|
-
if (o != null) {
|
|
10
|
-
const [i, s] = c(o, a, u);
|
|
11
|
-
return r.receiveHandlerId(i), e.receiveHandlerId(i), s;
|
|
12
|
-
}
|
|
13
|
-
}, [
|
|
14
|
-
u,
|
|
15
|
-
r,
|
|
16
|
-
e,
|
|
17
|
-
a,
|
|
18
|
-
o
|
|
19
|
-
]);
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
h as useRegisteredDragSource
|
|
23
|
-
};
|