@eightshift/ui-components 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Dialog-DSquJZb-.js → Dialog-BdtBguys.js} +1 -1
- package/dist/Heading-DGnF6JDc.js +17 -0
- package/dist/List-Bx2anbX-.js +583 -0
- package/dist/{RSPContexts-DQtGvvpM.js → RSPContexts-2lR5GG9p.js} +2 -2
- package/dist/{Select-49a62830.esm-D8voKavK.js → Select-c7902d94.esm-DtzFQzf-.js} +6 -4
- package/dist/assets/style.css +1 -1
- package/dist/components/animated-visibility/animated-visibility.js +139 -118
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +18 -11
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +1 -0
- package/dist/components/draggable/draggable-handle.js +45 -0
- package/dist/components/draggable/draggable.js +5138 -96
- package/dist/components/draggable-list/draggable-list-item.js +16 -25
- package/dist/components/draggable-list/draggable-list.js +54 -86
- package/dist/components/expandable/expandable.js +63 -40
- package/dist/components/index.js +6 -4
- package/dist/components/link-input/link-input.js +2 -2
- package/dist/components/menu/menu.js +2 -2
- package/dist/components/modal/modal.js +4 -15
- package/dist/components/options-panel/options-panel.js +55 -1
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/repeater/repeater-item.js +76 -27
- package/dist/components/repeater/repeater.js +72 -5110
- package/dist/components/select/async-multi-select.js +1 -1
- package/dist/components/select/async-single-select.js +1 -1
- package/dist/components/select/multi-select.js +1 -1
- package/dist/components/select/single-select.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +6 -4
- package/dist/{react-jsx-parser.min-CAGfntg1.js → react-jsx-parser.min-sPC96O_U.js} +124 -85
- package/dist/{react-select-async.esm-DY-cP0QK.js → react-select-async.esm-CxA8wpeT.js} +1 -1
- package/dist/{react-select.esm-DNlXj0hV.js → react-select.esm-CeE7o5M9.js} +1 -1
- package/dist/{useMenuTrigger-BbwpSVmh.js → useMenuTrigger-CT2-BFLo.js} +1 -1
- package/package.json +14 -14
- package/dist/components/draggable/draggable-item.js +0 -66
- package/dist/swapy-qb4t7itb.js +0 -3059
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
|
-
import { A as AsyncSelect$1 } from "../../react-select-async.esm-
|
|
3
|
+
import { A as AsyncSelect$1 } from "../../react-select-async.esm-CxA8wpeT.js";
|
|
4
4
|
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValue, b as getMultiValueRemove } from "../../multi-select-components-DTvEidE3.js";
|
|
5
5
|
import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
|
|
6
6
|
import { CustomSelectDefaultMultiValueRemove, CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { A as AsyncSelect$1 } from "../../react-select-async.esm-
|
|
2
|
+
import { A as AsyncSelect$1 } from "../../react-select-async.esm-CxA8wpeT.js";
|
|
3
3
|
import { CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
|
|
4
4
|
import { BaseControl } from "../base-control/base-control.js";
|
|
5
5
|
import { eightshiftSelectClasses } from "./styles.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
|
-
import { S as StateManagedSelect$1 } from "../../react-select.esm-
|
|
3
|
+
import { S as StateManagedSelect$1 } from "../../react-select.esm-CeE7o5M9.js";
|
|
4
4
|
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValue, b as getMultiValueRemove } from "../../multi-select-components-DTvEidE3.js";
|
|
5
5
|
import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
|
|
6
6
|
import { CustomSelectDefaultMultiValueRemove, CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { S as StateManagedSelect$1 } from "../../react-select.esm-
|
|
2
|
+
import { S as StateManagedSelect$1 } from "../../react-select.esm-CeE7o5M9.js";
|
|
3
3
|
import { CustomSelectDefaultDropdownIndicator, CustomSelectDefaultClearIndicator } from "./custom-select-default-components.js";
|
|
4
4
|
import { getValue } from "./shared.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
package/dist/icons/jsx-svg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { s as svgToJsxString, a as source_default } from "../react-jsx-parser.min-
|
|
2
|
+
import { s as svgToJsxString, a as source_default } from "../react-jsx-parser.min-sPC96O_U.js";
|
|
3
3
|
/**
|
|
4
4
|
* Renders SVG string as JSX SVGs.
|
|
5
5
|
*
|
package/dist/index.js
CHANGED
|
@@ -10,8 +10,9 @@ import { ColorPicker } from "./components/color-pickers/color-picker.js";
|
|
|
10
10
|
import { ColumnConfigSlider, ColumnConfigSliderOutput } from "./components/slider/column-config-slider.js";
|
|
11
11
|
import { DraggableList } from "./components/draggable-list/draggable-list.js";
|
|
12
12
|
import { DraggableListItem, DraggableListItemHandle } from "./components/draggable-list/draggable-list-item.js";
|
|
13
|
+
import { DraggableContext } from "./components/draggable/draggable-context.js";
|
|
13
14
|
import { Draggable } from "./components/draggable/draggable.js";
|
|
14
|
-
import {
|
|
15
|
+
import { DraggableHandle } from "./components/draggable/draggable-handle.js";
|
|
15
16
|
import { Expandable } from "./components/expandable/expandable.js";
|
|
16
17
|
import { FilePlaceholder } from "./components/placeholders/file-placeholder.js";
|
|
17
18
|
import { GradientEditor } from "./components/color-pickers/gradient-editor.js";
|
|
@@ -40,7 +41,7 @@ import { Modal } from "./components/modal/modal.js";
|
|
|
40
41
|
import { MultiSelect } from "./components/select/multi-select.js";
|
|
41
42
|
import { RSClearIndicator, RSDropdownIndicator, RSMultiValue, RSMultiValueContainer, RSMultiValueLabel, RSMultiValueRemove, RSOption, RSSingleValue } from "./components/select/react-select-component-wrappers.js";
|
|
42
43
|
import { OptionSelect } from "./components/option-select/option-select.js";
|
|
43
|
-
import { OptionsPanel, OptionsPanelSection } from "./components/options-panel/options-panel.js";
|
|
44
|
+
import { OptionsPanel, OptionsPanelHeader, OptionsPanelSection } from "./components/options-panel/options-panel.js";
|
|
44
45
|
import { Select } from "./components/select/single-select.js";
|
|
45
46
|
import { Slider } from "./components/slider/slider.js";
|
|
46
47
|
import { SolidColorPicker } from "./components/color-pickers/solid-color-picker.js";
|
|
@@ -69,8 +70,8 @@ export {
|
|
|
69
70
|
ContainerPanel,
|
|
70
71
|
D as DecorativeTooltip,
|
|
71
72
|
Draggable,
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
DraggableContext,
|
|
74
|
+
DraggableHandle,
|
|
74
75
|
DraggableList,
|
|
75
76
|
DraggableListItem,
|
|
76
77
|
DraggableListItemHandle,
|
|
@@ -95,6 +96,7 @@ export {
|
|
|
95
96
|
NumberPicker,
|
|
96
97
|
OptionSelect,
|
|
97
98
|
OptionsPanel,
|
|
99
|
+
OptionsPanelHeader,
|
|
98
100
|
OptionsPanelSection,
|
|
99
101
|
Popover,
|
|
100
102
|
RSClearIndicator,
|
|
@@ -383,8 +383,8 @@ function svgToJsxString(svgString) {
|
|
|
383
383
|
return _JsxComponentString("svg", properties, children);
|
|
384
384
|
}
|
|
385
385
|
var __create = Object.create;
|
|
386
|
-
var __defProp2 = Object.defineProperty;
|
|
387
386
|
var __getProtoOf = Object.getPrototypeOf;
|
|
387
|
+
var __defProp2 = Object.defineProperty;
|
|
388
388
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
389
389
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
390
390
|
var __toESM = (mod, isNodeMode, target) => {
|
|
@@ -5758,7 +5758,7 @@ var require_xhtml = __commonJS((exports, module) => {
|
|
|
5758
5758
|
};
|
|
5759
5759
|
});
|
|
5760
5760
|
var require_acorn_jsx = __commonJS((exports, module) => {
|
|
5761
|
-
|
|
5761
|
+
function getJsxTokens(acorn) {
|
|
5762
5762
|
acorn = acorn.Parser.acorn || acorn;
|
|
5763
5763
|
let acornJsx = acornJsxMap.get(acorn);
|
|
5764
5764
|
if (!acornJsx) {
|
|
@@ -5797,8 +5797,8 @@ var require_acorn_jsx = __commonJS((exports, module) => {
|
|
|
5797
5797
|
acornJsxMap.set(acorn, acornJsx);
|
|
5798
5798
|
}
|
|
5799
5799
|
return acornJsx;
|
|
5800
|
-
}
|
|
5801
|
-
|
|
5800
|
+
}
|
|
5801
|
+
function getQualifiedJSXName(object) {
|
|
5802
5802
|
if (!object)
|
|
5803
5803
|
return object;
|
|
5804
5804
|
if (object.type === "JSXIdentifier")
|
|
@@ -5807,8 +5807,8 @@ var require_acorn_jsx = __commonJS((exports, module) => {
|
|
|
5807
5807
|
return object.namespace.name + ":" + object.name.name;
|
|
5808
5808
|
if (object.type === "JSXMemberExpression")
|
|
5809
5809
|
return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
|
|
5810
|
-
}
|
|
5811
|
-
|
|
5810
|
+
}
|
|
5811
|
+
function plugin(options, Parser3) {
|
|
5812
5812
|
const acorn = Parser3.acorn || require_acorn();
|
|
5813
5813
|
const acornJsx = getJsxTokens(acorn);
|
|
5814
5814
|
const tt = acorn.tokTypes;
|
|
@@ -6153,7 +6153,7 @@ var require_acorn_jsx = __commonJS((exports, module) => {
|
|
|
6153
6153
|
}
|
|
6154
6154
|
}
|
|
6155
6155
|
};
|
|
6156
|
-
}
|
|
6156
|
+
}
|
|
6157
6157
|
var XHTMLEntities = require_xhtml();
|
|
6158
6158
|
var hexNumber = /^[\da-fA-F]+$/;
|
|
6159
6159
|
var decimalNumber = /^\d+$/;
|
|
@@ -7965,7 +7965,7 @@ var require_react = __commonJS((exports, module) => {
|
|
|
7965
7965
|
module.exports = react_development;
|
|
7966
7966
|
}
|
|
7967
7967
|
});
|
|
7968
|
-
|
|
7968
|
+
function isInAstralSet(code, set) {
|
|
7969
7969
|
var pos = 65536;
|
|
7970
7970
|
for (var i2 = 0; i2 < set.length; i2 += 2) {
|
|
7971
7971
|
pos += set[i2];
|
|
@@ -7978,8 +7978,8 @@ var isInAstralSet = function(code, set) {
|
|
|
7978
7978
|
}
|
|
7979
7979
|
}
|
|
7980
7980
|
return false;
|
|
7981
|
-
}
|
|
7982
|
-
|
|
7981
|
+
}
|
|
7982
|
+
function isIdentifierStart(code, astral) {
|
|
7983
7983
|
if (code < 65) {
|
|
7984
7984
|
return code === 36;
|
|
7985
7985
|
}
|
|
@@ -7999,8 +7999,8 @@ var isIdentifierStart = function(code, astral) {
|
|
|
7999
7999
|
return false;
|
|
8000
8000
|
}
|
|
8001
8001
|
return isInAstralSet(code, astralIdentifierStartCodes);
|
|
8002
|
-
}
|
|
8003
|
-
|
|
8002
|
+
}
|
|
8003
|
+
function isIdentifierChar(code, astral) {
|
|
8004
8004
|
if (code < 48) {
|
|
8005
8005
|
return code === 36;
|
|
8006
8006
|
}
|
|
@@ -8026,20 +8026,20 @@ var isIdentifierChar = function(code, astral) {
|
|
|
8026
8026
|
return false;
|
|
8027
8027
|
}
|
|
8028
8028
|
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
|
|
8029
|
-
}
|
|
8030
|
-
|
|
8029
|
+
}
|
|
8030
|
+
function binop(name, prec) {
|
|
8031
8031
|
return new TokenType(name, { beforeExpr: true, binop: prec });
|
|
8032
|
-
}
|
|
8033
|
-
|
|
8032
|
+
}
|
|
8033
|
+
function kw(name, options) {
|
|
8034
8034
|
if (options === void 0)
|
|
8035
8035
|
options = {};
|
|
8036
8036
|
options.keyword = name;
|
|
8037
8037
|
return keywords[name] = new TokenType(name, options);
|
|
8038
|
-
}
|
|
8039
|
-
|
|
8038
|
+
}
|
|
8039
|
+
function isNewLine(code) {
|
|
8040
8040
|
return code === 10 || code === 13 || code === 8232 || code === 8233;
|
|
8041
|
-
}
|
|
8042
|
-
|
|
8041
|
+
}
|
|
8042
|
+
function nextLineBreak(code, from, end) {
|
|
8043
8043
|
if (end === void 0)
|
|
8044
8044
|
end = code.length;
|
|
8045
8045
|
for (var i2 = from; i2 < end; i2++) {
|
|
@@ -8049,18 +8049,18 @@ var nextLineBreak = function(code, from, end) {
|
|
|
8049
8049
|
}
|
|
8050
8050
|
}
|
|
8051
8051
|
return -1;
|
|
8052
|
-
}
|
|
8053
|
-
|
|
8052
|
+
}
|
|
8053
|
+
function wordsRegexp(words) {
|
|
8054
8054
|
return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$"));
|
|
8055
|
-
}
|
|
8056
|
-
|
|
8055
|
+
}
|
|
8056
|
+
function codePointToString(code) {
|
|
8057
8057
|
if (code <= 65535) {
|
|
8058
8058
|
return String.fromCharCode(code);
|
|
8059
8059
|
}
|
|
8060
8060
|
code -= 65536;
|
|
8061
8061
|
return String.fromCharCode((code >> 10) + 55296, (code & 1023) + 56320);
|
|
8062
|
-
}
|
|
8063
|
-
|
|
8062
|
+
}
|
|
8063
|
+
function getLineInfo(input, offset2) {
|
|
8064
8064
|
for (var line = 1, cur = 0; ; ) {
|
|
8065
8065
|
var nextBreak = nextLineBreak(input, cur, offset2);
|
|
8066
8066
|
if (nextBreak < 0) {
|
|
@@ -8069,8 +8069,8 @@ var getLineInfo = function(input, offset2) {
|
|
|
8069
8069
|
++line;
|
|
8070
8070
|
cur = nextBreak;
|
|
8071
8071
|
}
|
|
8072
|
-
}
|
|
8073
|
-
|
|
8072
|
+
}
|
|
8073
|
+
function getOptions(opts) {
|
|
8074
8074
|
var options = {};
|
|
8075
8075
|
for (var opt in defaultOptions) {
|
|
8076
8076
|
options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt];
|
|
@@ -8102,8 +8102,8 @@ var getOptions = function(opts) {
|
|
|
8102
8102
|
options.onComment = pushComment(options, options.onComment);
|
|
8103
8103
|
}
|
|
8104
8104
|
return options;
|
|
8105
|
-
}
|
|
8106
|
-
|
|
8105
|
+
}
|
|
8106
|
+
function pushComment(options, array) {
|
|
8107
8107
|
return function(block, text, start, end, startLoc, endLoc) {
|
|
8108
8108
|
var comment = {
|
|
8109
8109
|
type: block ? "Block" : "Line",
|
|
@@ -8119,11 +8119,11 @@ var pushComment = function(options, array) {
|
|
|
8119
8119
|
}
|
|
8120
8120
|
array.push(comment);
|
|
8121
8121
|
};
|
|
8122
|
-
}
|
|
8123
|
-
|
|
8122
|
+
}
|
|
8123
|
+
function functionFlags(async, generator) {
|
|
8124
8124
|
return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
|
|
8125
|
-
}
|
|
8126
|
-
|
|
8125
|
+
}
|
|
8126
|
+
function isPrivateNameConflicted(privateNameMap, element) {
|
|
8127
8127
|
var name = element.key.name;
|
|
8128
8128
|
var curr = privateNameMap[name];
|
|
8129
8129
|
var next = "true";
|
|
@@ -8139,19 +8139,19 @@ var isPrivateNameConflicted = function(privateNameMap, element) {
|
|
|
8139
8139
|
} else {
|
|
8140
8140
|
return true;
|
|
8141
8141
|
}
|
|
8142
|
-
}
|
|
8143
|
-
|
|
8142
|
+
}
|
|
8143
|
+
function checkKeyName(node, name) {
|
|
8144
8144
|
var computed = node.computed;
|
|
8145
8145
|
var key = node.key;
|
|
8146
8146
|
return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
|
|
8147
|
-
}
|
|
8148
|
-
|
|
8147
|
+
}
|
|
8148
|
+
function isLocalVariableAccess(node) {
|
|
8149
8149
|
return node.type === "Identifier" || node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression);
|
|
8150
|
-
}
|
|
8151
|
-
|
|
8150
|
+
}
|
|
8151
|
+
function isPrivateFieldAccess(node) {
|
|
8152
8152
|
return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) || node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression);
|
|
8153
|
-
}
|
|
8154
|
-
|
|
8153
|
+
}
|
|
8154
|
+
function finishNodeAt(node, type, pos, loc) {
|
|
8155
8155
|
node.type = type;
|
|
8156
8156
|
node.end = pos;
|
|
8157
8157
|
if (this.options.locations) {
|
|
@@ -8161,8 +8161,8 @@ var finishNodeAt = function(node, type, pos, loc) {
|
|
|
8161
8161
|
node.range[1] = pos;
|
|
8162
8162
|
}
|
|
8163
8163
|
return node;
|
|
8164
|
-
}
|
|
8165
|
-
|
|
8164
|
+
}
|
|
8165
|
+
function buildUnicodeData(ecmaVersion2) {
|
|
8166
8166
|
var d = data[ecmaVersion2] = {
|
|
8167
8167
|
binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion2] + " " + unicodeGeneralCategoryValues),
|
|
8168
8168
|
binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion2]),
|
|
@@ -8175,53 +8175,53 @@ var buildUnicodeData = function(ecmaVersion2) {
|
|
|
8175
8175
|
d.nonBinary.gc = d.nonBinary.General_Category;
|
|
8176
8176
|
d.nonBinary.sc = d.nonBinary.Script;
|
|
8177
8177
|
d.nonBinary.scx = d.nonBinary.Script_Extensions;
|
|
8178
|
-
}
|
|
8179
|
-
|
|
8178
|
+
}
|
|
8179
|
+
function hasProp(obj) {
|
|
8180
8180
|
for (var _ in obj) {
|
|
8181
8181
|
return true;
|
|
8182
8182
|
}
|
|
8183
8183
|
return false;
|
|
8184
|
-
}
|
|
8185
|
-
|
|
8184
|
+
}
|
|
8185
|
+
function isSyntaxCharacter(ch) {
|
|
8186
8186
|
return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125;
|
|
8187
|
-
}
|
|
8188
|
-
|
|
8187
|
+
}
|
|
8188
|
+
function isRegExpIdentifierStart(ch) {
|
|
8189
8189
|
return isIdentifierStart(ch, true) || ch === 36 || ch === 95;
|
|
8190
|
-
}
|
|
8191
|
-
|
|
8190
|
+
}
|
|
8191
|
+
function isRegExpIdentifierPart(ch) {
|
|
8192
8192
|
return isIdentifierChar(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205;
|
|
8193
|
-
}
|
|
8194
|
-
|
|
8193
|
+
}
|
|
8194
|
+
function isControlLetter(ch) {
|
|
8195
8195
|
return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122;
|
|
8196
|
-
}
|
|
8197
|
-
|
|
8196
|
+
}
|
|
8197
|
+
function isValidUnicode(ch) {
|
|
8198
8198
|
return ch >= 0 && ch <= 1114111;
|
|
8199
|
-
}
|
|
8200
|
-
|
|
8199
|
+
}
|
|
8200
|
+
function isCharacterClassEscape(ch) {
|
|
8201
8201
|
return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87;
|
|
8202
|
-
}
|
|
8203
|
-
|
|
8202
|
+
}
|
|
8203
|
+
function isUnicodePropertyNameCharacter(ch) {
|
|
8204
8204
|
return isControlLetter(ch) || ch === 95;
|
|
8205
|
-
}
|
|
8206
|
-
|
|
8205
|
+
}
|
|
8206
|
+
function isUnicodePropertyValueCharacter(ch) {
|
|
8207
8207
|
return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch);
|
|
8208
|
-
}
|
|
8209
|
-
|
|
8208
|
+
}
|
|
8209
|
+
function isClassSetReservedDoublePunctuatorCharacter(ch) {
|
|
8210
8210
|
return ch === 33 || ch >= 35 && ch <= 38 || ch >= 42 && ch <= 44 || ch === 46 || ch >= 58 && ch <= 64 || ch === 94 || ch === 96 || ch === 126;
|
|
8211
|
-
}
|
|
8212
|
-
|
|
8211
|
+
}
|
|
8212
|
+
function isClassSetSyntaxCharacter(ch) {
|
|
8213
8213
|
return ch === 40 || ch === 41 || ch === 45 || ch === 47 || ch >= 91 && ch <= 93 || ch >= 123 && ch <= 125;
|
|
8214
|
-
}
|
|
8215
|
-
|
|
8214
|
+
}
|
|
8215
|
+
function isClassSetReservedPunctuator(ch) {
|
|
8216
8216
|
return ch === 33 || ch === 35 || ch === 37 || ch === 38 || ch === 44 || ch === 45 || ch >= 58 && ch <= 62 || ch === 64 || ch === 96 || ch === 126;
|
|
8217
|
-
}
|
|
8218
|
-
|
|
8217
|
+
}
|
|
8218
|
+
function isDecimalDigit(ch) {
|
|
8219
8219
|
return ch >= 48 && ch <= 57;
|
|
8220
|
-
}
|
|
8221
|
-
|
|
8220
|
+
}
|
|
8221
|
+
function isHexDigit(ch) {
|
|
8222
8222
|
return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102;
|
|
8223
|
-
}
|
|
8224
|
-
|
|
8223
|
+
}
|
|
8224
|
+
function hexToInt(ch) {
|
|
8225
8225
|
if (ch >= 65 && ch <= 70) {
|
|
8226
8226
|
return 10 + (ch - 65);
|
|
8227
8227
|
}
|
|
@@ -8229,22 +8229,22 @@ var hexToInt = function(ch) {
|
|
|
8229
8229
|
return 10 + (ch - 97);
|
|
8230
8230
|
}
|
|
8231
8231
|
return ch - 48;
|
|
8232
|
-
}
|
|
8233
|
-
|
|
8232
|
+
}
|
|
8233
|
+
function isOctalDigit(ch) {
|
|
8234
8234
|
return ch >= 48 && ch <= 55;
|
|
8235
|
-
}
|
|
8236
|
-
|
|
8235
|
+
}
|
|
8236
|
+
function stringToNumber(str, isLegacyOctalNumericLiteral) {
|
|
8237
8237
|
if (isLegacyOctalNumericLiteral) {
|
|
8238
8238
|
return parseInt(str, 8);
|
|
8239
8239
|
}
|
|
8240
8240
|
return parseFloat(str.replace(/_/g, ""));
|
|
8241
|
-
}
|
|
8242
|
-
|
|
8241
|
+
}
|
|
8242
|
+
function stringToBigInt(str) {
|
|
8243
8243
|
if (typeof BigInt !== "function") {
|
|
8244
8244
|
return null;
|
|
8245
8245
|
}
|
|
8246
8246
|
return BigInt(str.replace(/_/g, ""));
|
|
8247
|
-
}
|
|
8247
|
+
}
|
|
8248
8248
|
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
8249
8249
|
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
|
|
8250
8250
|
var nonASCIIidentifierChars = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
|
|
@@ -13053,11 +13053,50 @@ Parser.acorn = {
|
|
|
13053
13053
|
var AcornJSX = __toESM(require_acorn_jsx());
|
|
13054
13054
|
var import_react = __toESM(require_react());
|
|
13055
13055
|
var attributeNames_default = {
|
|
13056
|
+
acceptcharset: "acceptCharset",
|
|
13057
|
+
accesskey: "accessKey",
|
|
13058
|
+
allowfullscreen: "allowFullScreen",
|
|
13059
|
+
autocapitalize: "autoCapitalize",
|
|
13060
|
+
autocomplete: "autoComplete",
|
|
13061
|
+
autofocus: "autoFocus",
|
|
13062
|
+
autoplay: "autoPlay",
|
|
13063
|
+
cellpadding: "cellPadding",
|
|
13064
|
+
cellspacing: "cellSpacing",
|
|
13065
|
+
charset: "charSet",
|
|
13056
13066
|
class: "className",
|
|
13067
|
+
colspan: "colSpan",
|
|
13068
|
+
contenteditable: "contentEditable",
|
|
13069
|
+
crossorigin: "crossOrigin",
|
|
13070
|
+
datetime: "dateTime",
|
|
13071
|
+
enctype: "encType",
|
|
13057
13072
|
for: "htmlFor",
|
|
13073
|
+
formaction: "formAction",
|
|
13074
|
+
formenctype: "formEncType",
|
|
13075
|
+
formmethod: "formMethod",
|
|
13076
|
+
formnovalidate: "formNoValidate",
|
|
13077
|
+
formtarget: "formTarget",
|
|
13078
|
+
frameborder: "frameBorder",
|
|
13079
|
+
hreflang: "hrefLang",
|
|
13080
|
+
httpequiv: "httpEquiv",
|
|
13081
|
+
inputmode: "inputMode",
|
|
13082
|
+
keyparams: "keyParams",
|
|
13083
|
+
keytype: "keyType",
|
|
13084
|
+
marginheight: "marginHeight",
|
|
13085
|
+
marginwidth: "marginWidth",
|
|
13058
13086
|
maxlength: "maxLength",
|
|
13059
|
-
|
|
13060
|
-
|
|
13087
|
+
mediagroup: "mediaGroup",
|
|
13088
|
+
minlength: "minLength",
|
|
13089
|
+
novalidate: "noValidate",
|
|
13090
|
+
radiogroup: "radioGroup",
|
|
13091
|
+
readonly: "readOnly",
|
|
13092
|
+
referrerpolicy: "referrerPolicy",
|
|
13093
|
+
rowspan: "rowSpan",
|
|
13094
|
+
spellcheck: "spellCheck",
|
|
13095
|
+
srcdoc: "srcDoc",
|
|
13096
|
+
srclang: "srcLang",
|
|
13097
|
+
srcset: "srcSet",
|
|
13098
|
+
tabindex: "tabIndex",
|
|
13099
|
+
usemap: "useMap"
|
|
13061
13100
|
};
|
|
13062
13101
|
function canHaveChildren(tagName) {
|
|
13063
13102
|
return VOID_ELEMENTS.indexOf(tagName.toLowerCase()) === -1;
|
|
@@ -13170,7 +13209,7 @@ class JsxParser extends import_react.default.Component {
|
|
|
13170
13209
|
return __privateGet(this, _parseExpression).call(this, expression.expression, scope);
|
|
13171
13210
|
case "JSXText":
|
|
13172
13211
|
const key = this.props.disableKeyGeneration ? void 0 : randomHash();
|
|
13173
|
-
return this.props.disableFragments ? expression.value : import_react.default.createElement(import_react.Fragment, {
|
|
13212
|
+
return this.props.disableFragments ? expression.value : /* @__PURE__ */ import_react.default.createElement(import_react.Fragment, {
|
|
13174
13213
|
key
|
|
13175
13214
|
}, expression.value);
|
|
13176
13215
|
case "ArrayExpression":
|
|
@@ -13388,7 +13427,7 @@ class JsxParser extends import_react.default.Component {
|
|
|
13388
13427
|
const jsx = (this.props.jsx || "").trim().replace(/<!DOCTYPE([^>]*)>/g, "");
|
|
13389
13428
|
this.ParsedChildren = __privateGet(this, _parseJSX).call(this, jsx);
|
|
13390
13429
|
const className = [.../* @__PURE__ */ new Set(["jsx-parser", ...String(this.props.className).split(" ")])].filter(Boolean).join(" ");
|
|
13391
|
-
return this.props.renderInWrapper ? import_react.default.createElement("div", {
|
|
13430
|
+
return this.props.renderInWrapper ? /* @__PURE__ */ import_react.default.createElement("div", {
|
|
13392
13431
|
className
|
|
13393
13432
|
}, this.ParsedChildren) : this.ParsedChildren;
|
|
13394
13433
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as _objectWithoutProperties, b as _slicedToArray, h as handleInputChange, d as _objectSpread2, e as _defineProperty, _ as _extends } from "./index-a301f526.esm-BMg114iK.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useRef, useState, useEffect, useCallback, forwardRef } from "react";
|
|
4
|
-
import { u as useStateManager, S as Select } from "./Select-
|
|
4
|
+
import { u as useStateManager, S as Select } from "./Select-c7902d94.esm-DtzFQzf-.js";
|
|
5
5
|
import "./index-BTCzc3zb.js";
|
|
6
6
|
var _excluded = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
|
|
7
7
|
function useAsync(_ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useStateManager, S as Select } from "./Select-
|
|
1
|
+
import { u as useStateManager, S as Select } from "./Select-c7902d94.esm-DtzFQzf-.js";
|
|
2
2
|
import { _ as _extends } from "./index-a301f526.esm-BMg114iK.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { forwardRef } from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { e as $bdb11010cef70236$export$f680877a34711e37 } from "./utils-Du2x3YVu.js";
|
|
2
2
|
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-m03yY3xi.js";
|
|
3
3
|
import { n as $8a26561d2877236e$export$c24ed0104d07eab9 } from "./SelectionManager-Ctbzoj1E.js";
|
|
4
|
-
import { m as $628037886ba31236$export$f9d5c8beee7d008d } from "./Dialog-
|
|
4
|
+
import { m as $628037886ba31236$export$f9d5c8beee7d008d } from "./Dialog-BdtBguys.js";
|
|
5
5
|
var $c0398ad35c3639b7$exports = {};
|
|
6
6
|
$c0398ad35c3639b7$exports = {
|
|
7
7
|
"longPressMessage": `اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/ui-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"@dnd-kit/react": "^0.0.5",
|
|
43
43
|
"react": "^18.3.1",
|
|
44
44
|
"react-dom": "^18.3.1",
|
|
45
|
-
"react-jsx-parser": "^2.
|
|
46
|
-
"
|
|
47
|
-
"
|
|
45
|
+
"react-jsx-parser": "^2.1.0",
|
|
46
|
+
"react-movable": "^3.3.1",
|
|
47
|
+
"svg-to-jsx-string": "^0.1.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@adobe/react-spectrum": "^3.36.3",
|
|
@@ -55,18 +55,18 @@
|
|
|
55
55
|
"@eslint/compat": "^1.1.1",
|
|
56
56
|
"@react-stately/collections": "^3.10.9",
|
|
57
57
|
"@stylistic/eslint-plugin-js": "^2.8.0",
|
|
58
|
-
"@types/react": "^18.3.
|
|
58
|
+
"@types/react": "^18.3.9",
|
|
59
59
|
"@types/react-dom": "^18.3.0",
|
|
60
60
|
"@vitejs/plugin-react-swc": "^3.7.0",
|
|
61
|
-
"@wordpress/i18n": "^5.
|
|
61
|
+
"@wordpress/i18n": "^5.8.0",
|
|
62
62
|
"autoprefixer": "^10.4.20",
|
|
63
63
|
"clsx": "^2.1.1",
|
|
64
64
|
"css-gradient-parser": "^0.0.16",
|
|
65
|
-
"eslint": "^9.
|
|
65
|
+
"eslint": "^9.11.1",
|
|
66
66
|
"eslint-config-prettier": "^9.1.0",
|
|
67
|
-
"eslint-plugin-jsdoc": "^50.
|
|
67
|
+
"eslint-plugin-jsdoc": "^50.3.0",
|
|
68
68
|
"eslint-plugin-prettier": "^5.2.1",
|
|
69
|
-
"framer-motion": "^11.
|
|
69
|
+
"framer-motion": "^11.8.0",
|
|
70
70
|
"glob": "^11.0.0",
|
|
71
71
|
"globals": "^15.9.0",
|
|
72
72
|
"just-camel-case": "^6.2.0",
|
|
@@ -76,18 +76,18 @@
|
|
|
76
76
|
"just-kebab-case": "^4.2.0",
|
|
77
77
|
"just-throttle": "^4.2.0",
|
|
78
78
|
"lightningcss": "^1.27.0",
|
|
79
|
-
"postcss": "^8.4.
|
|
79
|
+
"postcss": "^8.4.47",
|
|
80
80
|
"prettier": "^3.3.3",
|
|
81
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
81
|
+
"prettier-plugin-tailwindcss": "^0.6.8",
|
|
82
82
|
"react-aria": "^3.34.3",
|
|
83
83
|
"react-aria-components": "^1.3.3",
|
|
84
|
-
"react-select": "^5.8.
|
|
84
|
+
"react-select": "^5.8.1",
|
|
85
85
|
"react-stately": "^3.32.2",
|
|
86
|
-
"tailwindcss": "^3.4.
|
|
86
|
+
"tailwindcss": "^3.4.13",
|
|
87
87
|
"tailwindcss-animate": "^1.0.7",
|
|
88
88
|
"tailwindcss-react-aria-components": "^1.1.5",
|
|
89
89
|
"tailwindcss-scoped-preflight": "^3.4.4",
|
|
90
|
-
"vite": "^5.4.
|
|
90
|
+
"vite": "^5.4.8",
|
|
91
91
|
"vite-plugin-lib-inject-css": "^2.1.1"
|
|
92
92
|
},
|
|
93
93
|
"scripts": {
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
3
|
-
import "../../default-i18n-BqWys-1G.js";
|
|
4
|
-
import { DraggableContext } from "./draggable-context.js";
|
|
5
|
-
import { useContext } from "react";
|
|
6
|
-
import { icons } from "../../icons/icons.js";
|
|
7
|
-
import "../../react-jsx-parser.min-CAGfntg1.js";
|
|
8
|
-
/**
|
|
9
|
-
* A Draggable item.
|
|
10
|
-
*
|
|
11
|
-
* @component
|
|
12
|
-
* @param {Object} props - Component props.
|
|
13
|
-
* @param {string} [props.className] - Classes to pass to the container.
|
|
14
|
-
*
|
|
15
|
-
* @returns {JSX.Element} The DraggableList component.
|
|
16
|
-
*
|
|
17
|
-
* @see {@link DraggableList} for usage example.
|
|
18
|
-
*
|
|
19
|
-
* @preserve
|
|
20
|
-
*/
|
|
21
|
-
const DraggableItem = (props) => {
|
|
22
|
-
const { children, className, ...rest } = props;
|
|
23
|
-
const { itemId } = useContext(DraggableContext);
|
|
24
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
-
"div",
|
|
26
|
-
{
|
|
27
|
-
"data-swapy-item": itemId,
|
|
28
|
-
className,
|
|
29
|
-
...rest,
|
|
30
|
-
children
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* A Draggable item handle.
|
|
36
|
-
*
|
|
37
|
-
* @component
|
|
38
|
-
* @param {Object} props - Component props.
|
|
39
|
-
* @param {string} [props.className] - Classes to pass to the handle.
|
|
40
|
-
*
|
|
41
|
-
* @returns {JSX.Element} The DraggableItemHandle component.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* <DraggableItemHandle />
|
|
45
|
-
*
|
|
46
|
-
* @preserve
|
|
47
|
-
*/
|
|
48
|
-
const DraggableItemHandle = (props) => {
|
|
49
|
-
const { className, children, ...rest } = props;
|
|
50
|
-
return /* @__PURE__ */ jsx(
|
|
51
|
-
"div",
|
|
52
|
-
{
|
|
53
|
-
"data-swapy-handle": true,
|
|
54
|
-
className: clsx(
|
|
55
|
-
"es-uic-w-fit es-uic-cursor-pointer es-uic-rounded es-uic-border es-uic-border-gray-100 es-uic-bg-white es-uic-py-0.5 es-uic-text-gray-400 [&>svg]:es-uic-size-4",
|
|
56
|
-
className
|
|
57
|
-
),
|
|
58
|
-
...rest,
|
|
59
|
-
children: children ?? icons.reorderGrabberV
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
DraggableItem,
|
|
65
|
-
DraggableItemHandle
|
|
66
|
-
};
|