@dreamcommerce/aurora 3.0.0-82 → 3.0.0-84
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/build/cjs/packages/aurora/src/components/accordion/components/accordion_item.js +1 -1
- package/build/cjs/packages/aurora/src/components/accordion/components/accordion_trigger.js +2 -2
- package/build/cjs/packages/aurora/src/components/select/components/select_trigger.js +1 -1
- package/build/cjs/packages/aurora/src/components/tree/constants.js +8 -0
- package/build/cjs/packages/aurora/src/components/tree/constants.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/context/tree_context.js +23 -0
- package/build/cjs/packages/aurora/src/components/tree/context/tree_context.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/context/tree_provider.js +65 -0
- package/build/cjs/packages/aurora/src/components/tree/context/tree_provider.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/tree/index.js +33 -0
- package/build/cjs/packages/aurora/src/components/tree/index.js.map +1 -0
- package/build/cjs/packages/aurora/src/index.js +4 -2
- package/build/cjs/packages/aurora/src/index.js.map +1 -1
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_item.js +1 -1
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_trigger.js +2 -2
- package/build/esm/packages/aurora/src/components/select/components/select_trigger.js +1 -1
- package/build/esm/packages/aurora/src/components/tree/constants.js +4 -2
- package/build/esm/packages/aurora/src/components/tree/constants.js.map +1 -1
- package/build/esm/packages/aurora/src/components/tree/context/tree_context.js +16 -9
- package/build/esm/packages/aurora/src/components/tree/context/tree_context.js.map +1 -1
- package/build/esm/packages/aurora/src/components/tree/context/tree_provider.js +56 -28
- package/build/esm/packages/aurora/src/components/tree/context/tree_provider.js.map +1 -1
- package/build/esm/packages/aurora/src/components/tree/index.js +21 -8
- package/build/esm/packages/aurora/src/components/tree/index.js.map +1 -1
- package/build/esm/packages/aurora/src/index.d.ts +1 -0
- package/build/esm/packages/aurora/src/index.js +2 -1
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
7
|
-
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
8
7
|
var cn = require('../../../utilities/cn.js');
|
|
8
|
+
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
9
9
|
|
|
10
10
|
var _excluded = ["className", "borderStyle"];
|
|
11
11
|
var AccordionItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
7
|
+
var css_icon_color_tokens = require('../../../constants/css_tokens/css_icon_color_tokens.js');
|
|
8
|
+
var cn = require('../../../utilities/cn.js');
|
|
7
9
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
8
10
|
var accordion_constants = require('../accordion_constants.js');
|
|
9
|
-
var css_icon_color_tokens = require('../../../constants/css_tokens/css_icon_color_tokens.js');
|
|
10
11
|
var accordion_context = require('../context/accordion_context.js');
|
|
11
|
-
var cn = require('../../../utilities/cn.js');
|
|
12
12
|
var arrow_right = require('../../../assets/icons/arrow_right.js');
|
|
13
13
|
|
|
14
14
|
var _excluded = ["className", "children", "backgroundColor", "icon", "iconColor"];
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
7
|
+
var arrow_down_s_fill = require('../../../assets/icons/arrow_down_s_fill.js');
|
|
7
8
|
var cn = require('../../../utilities/cn.js');
|
|
8
9
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
9
|
-
var arrow_down_s_fill = require('../../../assets/icons/arrow_down_s_fill.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
12
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
var TreeContext = /*#__PURE__*/React.createContext({
|
|
8
|
+
addNode: function addNode() {},
|
|
9
|
+
updateNode: function updateNode() {},
|
|
10
|
+
removeNode: function removeNode() {},
|
|
11
|
+
toggleNode: function toggleNode() {},
|
|
12
|
+
getNode: function getNode() {
|
|
13
|
+
return undefined;
|
|
14
|
+
},
|
|
15
|
+
hasNode: function hasNode() {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var TreeContextProvider = TreeContext.Provider;
|
|
20
|
+
|
|
21
|
+
exports.TreeContext = TreeContext;
|
|
22
|
+
exports.TreeContextProvider = TreeContextProvider;
|
|
23
|
+
//# sourceMappingURL=tree_context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
7
|
+
var tree_context = require('./tree_context.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
+
|
|
13
|
+
var TreeProvider = function TreeProvider(_ref) {
|
|
14
|
+
var children = _ref.children;
|
|
15
|
+
var _useState = React.useState([]),
|
|
16
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
17
|
+
nodes = _useState2[0],
|
|
18
|
+
setNodes = _useState2[1];
|
|
19
|
+
var value = {
|
|
20
|
+
addNode: function addNode(node) {
|
|
21
|
+
setNodes(function (nodes) {
|
|
22
|
+
return [].concat(_rollupPluginBabelHelpers.toConsumableArray(nodes), [node]);
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
updateNode: function updateNode(nodeId, node) {
|
|
26
|
+
setNodes(function (nodes) {
|
|
27
|
+
return nodes.map(function (n) {
|
|
28
|
+
return n.id === nodeId ? _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, n), node) : n;
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
getNode: function getNode(nodeId) {
|
|
33
|
+
return nodes.find(function (node) {
|
|
34
|
+
return node.id === nodeId;
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
removeNode: function removeNode(nodeId) {
|
|
38
|
+
setNodes(function (nodes) {
|
|
39
|
+
return nodes.filter(function (node) {
|
|
40
|
+
return node.id !== nodeId;
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
toggleNode: function toggleNode(nodeId) {
|
|
45
|
+
setNodes(function (nodes) {
|
|
46
|
+
return nodes.map(function (node) {
|
|
47
|
+
return node.id === nodeId ? _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, node), {}, {
|
|
48
|
+
expanded: !node.expanded
|
|
49
|
+
}) : node;
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
hasNode: function hasNode(nodeId) {
|
|
54
|
+
return !!nodes.find(function (node) {
|
|
55
|
+
return node.id === nodeId;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/React__default['default'].createElement(tree_context.TreeContextProvider, {
|
|
60
|
+
value: value
|
|
61
|
+
}, children);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.TreeProvider = TreeProvider;
|
|
65
|
+
//# sourceMappingURL=tree_provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var cn = require('../../utilities/cn.js');
|
|
7
|
+
var constants = require('./constants.js');
|
|
8
|
+
var tree_provider = require('./context/tree_provider.js');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line react/display-name
|
|
15
|
+
var Tree = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, ref) {
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
cssClassNames = _ref.cssClassNames,
|
|
18
|
+
cssStyles = _ref.cssStyles,
|
|
19
|
+
onMouseEnter = _ref.onMouseEnter,
|
|
20
|
+
onMouseLeave = _ref.onMouseLeave;
|
|
21
|
+
return /*#__PURE__*/React__default['default'].createElement(tree_provider.TreeProvider, null, /*#__PURE__*/React__default['default'].createElement("ul", {
|
|
22
|
+
role: constants.TREE_ROLE_ATTRIBUTE,
|
|
23
|
+
onMouseEnter: onMouseEnter,
|
|
24
|
+
onMouseLeave: onMouseLeave,
|
|
25
|
+
ref: ref,
|
|
26
|
+
style: cssStyles,
|
|
27
|
+
className: cn.cn('aurora-list-none aurora-flex aurora-flex-col aurora-gap-2', cssClassNames)
|
|
28
|
+
}, children));
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
exports.Tree = Tree;
|
|
32
|
+
exports.default = Tree;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var accordion_constants = require('./components/accordion/accordion_constants.js');
|
|
6
5
|
var css_background_tokens = require('./constants/css_tokens/css_background_tokens.js');
|
|
7
6
|
var css_border_color_tokens = require('./constants/css_tokens/css_border_color_tokens.js');
|
|
8
7
|
var css_border_radius_tokens = require('./constants/css_tokens/css_border_radius_tokens.js');
|
|
@@ -18,6 +17,8 @@ var css_border_style_tokens = require('./constants/css_tokens/css_border_style_t
|
|
|
18
17
|
var css_position_tokens = require('./constants/css_tokens/css_position_tokens.js');
|
|
19
18
|
var css_border_width_tokens = require('./constants/css_tokens/css_border_width_tokens.js');
|
|
20
19
|
var css_icon_color_tokens = require('./constants/css_tokens/css_icon_color_tokens.js');
|
|
20
|
+
var index = require('./components/tree/index.js');
|
|
21
|
+
var accordion_constants = require('./components/accordion/accordion_constants.js');
|
|
21
22
|
var accordion = require('./components/accordion/accordion.js');
|
|
22
23
|
var accordion_content = require('./components/accordion/components/accordion_content.js');
|
|
23
24
|
var accordion_item = require('./components/accordion/components/accordion_item.js');
|
|
@@ -111,7 +112,6 @@ var use_toggle = require('./hooks/use_toggle.js');
|
|
|
111
112
|
|
|
112
113
|
|
|
113
114
|
|
|
114
|
-
exports.ACCORDION_SIZES = accordion_constants.ACCORDION_SIZES;
|
|
115
115
|
exports.CSS_BACKGROUND_TOKENS = css_background_tokens.CSS_BACKGROUND_TOKENS;
|
|
116
116
|
exports.CSS_BORDER_COLOR_TOKENS = css_border_color_tokens.CSS_BORDER_COLOR_TOKENS;
|
|
117
117
|
exports.CSS_BORDER_RADIUS_SIDE_TOKENS = css_border_radius_tokens.CSS_BORDER_RADIUS_SIDE_TOKENS;
|
|
@@ -129,6 +129,8 @@ exports.CSS_POSITION_TOKENS = css_position_tokens.CSS_POSITION_TOKENS;
|
|
|
129
129
|
exports.CSS_BORDER_WIDTH_SIDE_TOKENS = css_border_width_tokens.CSS_BORDER_WIDTH_SIDE_TOKENS;
|
|
130
130
|
exports.CSS_BORDER_WIDTH_TOKENS = css_border_width_tokens.CSS_BORDER_WIDTH_TOKENS;
|
|
131
131
|
exports.CSS_ICON_COLOR_TOKENS_VALUES = css_icon_color_tokens.CSS_ICON_COLOR_TOKENS_VALUES;
|
|
132
|
+
exports.Tree = index.Tree;
|
|
133
|
+
exports.ACCORDION_SIZES = accordion_constants.ACCORDION_SIZES;
|
|
132
134
|
exports.Accordion = accordion.Accordion;
|
|
133
135
|
exports.AccordionContent = accordion_content.AccordionContent;
|
|
134
136
|
exports.AccordionItem = accordion_item.AccordionItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef, createElement } from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
-
import { Item } from '@radix-ui/react-accordion';
|
|
4
3
|
import { cn } from '../../../utilities/cn.js';
|
|
4
|
+
import { Item } from '@radix-ui/react-accordion';
|
|
5
5
|
|
|
6
6
|
var _excluded = ["className", "borderStyle"];
|
|
7
7
|
var AccordionItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { forwardRef, useContext, createElement } from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { CSS_ICON_COLOR_TOKENS_VALUES } from '../../../constants/css_tokens/css_icon_color_tokens.js';
|
|
4
|
+
import { cn } from '../../../utilities/cn.js';
|
|
3
5
|
import { Header, Trigger } from '@radix-ui/react-accordion';
|
|
4
6
|
import { ACCORDION_SIZES } from '../accordion_constants.js';
|
|
5
|
-
import { CSS_ICON_COLOR_TOKENS_VALUES } from '../../../constants/css_tokens/css_icon_color_tokens.js';
|
|
6
7
|
import { AccordionContext } from '../context/accordion_context.js';
|
|
7
|
-
import { cn } from '../../../utilities/cn.js';
|
|
8
8
|
import { ArrowRightIcon } from '../../../assets/icons/arrow_right.js';
|
|
9
9
|
|
|
10
10
|
var _excluded = ["className", "children", "backgroundColor", "icon", "iconColor"];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { ArrowDownSFillIcon } from '../../../assets/icons/arrow_down_s_fill.js';
|
|
3
4
|
import { cn } from '../../../utilities/cn.js';
|
|
4
5
|
import { Trigger, Icon } from '@radix-ui/react-select';
|
|
5
|
-
import { ArrowDownSFillIcon } from '../../../assets/icons/arrow_down_s_fill.js';
|
|
6
6
|
|
|
7
7
|
var _excluded = ["className", "hasError", "children"];
|
|
8
8
|
var SelectTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
|
|
3
|
+
var TreeContext = /*#__PURE__*/createContext({
|
|
4
|
+
addNode: function addNode() {},
|
|
5
|
+
updateNode: function updateNode() {},
|
|
6
|
+
removeNode: function removeNode() {},
|
|
7
|
+
toggleNode: function toggleNode() {},
|
|
8
|
+
getNode: function getNode() {
|
|
9
|
+
return undefined;
|
|
10
|
+
},
|
|
11
|
+
hasNode: function hasNode() {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
9
14
|
});
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
var TreeContextProvider = TreeContext.Provider;
|
|
16
|
+
|
|
17
|
+
export { TreeContext, TreeContextProvider };
|
|
18
|
+
//# sourceMappingURL=tree_context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,29 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { slicedToArray as _slicedToArray, toConsumableArray as _toConsumableArray, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { TreeContextProvider } from './tree_context.js';
|
|
4
|
+
|
|
5
|
+
var TreeProvider = function TreeProvider(_ref) {
|
|
6
|
+
var children = _ref.children;
|
|
7
|
+
var _useState = useState([]),
|
|
8
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9
|
+
nodes = _useState2[0],
|
|
10
|
+
setNodes = _useState2[1];
|
|
11
|
+
var value = {
|
|
12
|
+
addNode: function addNode(node) {
|
|
13
|
+
setNodes(function (nodes) {
|
|
14
|
+
return [].concat(_toConsumableArray(nodes), [node]);
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
updateNode: function updateNode(nodeId, node) {
|
|
18
|
+
setNodes(function (nodes) {
|
|
19
|
+
return nodes.map(function (n) {
|
|
20
|
+
return n.id === nodeId ? _objectSpread2(_objectSpread2({}, n), node) : n;
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
getNode: function getNode(nodeId) {
|
|
25
|
+
return nodes.find(function (node) {
|
|
26
|
+
return node.id === nodeId;
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
removeNode: function removeNode(nodeId) {
|
|
30
|
+
setNodes(function (nodes) {
|
|
31
|
+
return nodes.filter(function (node) {
|
|
32
|
+
return node.id !== nodeId;
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
toggleNode: function toggleNode(nodeId) {
|
|
37
|
+
setNodes(function (nodes) {
|
|
38
|
+
return nodes.map(function (node) {
|
|
39
|
+
return node.id === nodeId ? _objectSpread2(_objectSpread2({}, node), {}, {
|
|
40
|
+
expanded: !node.expanded
|
|
41
|
+
}) : node;
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
hasNode: function hasNode(nodeId) {
|
|
46
|
+
return !!nodes.find(function (node) {
|
|
47
|
+
return node.id === nodeId;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return /*#__PURE__*/React.createElement(TreeContextProvider, {
|
|
52
|
+
value: value
|
|
53
|
+
}, children);
|
|
28
54
|
};
|
|
29
|
-
|
|
55
|
+
|
|
56
|
+
export { TreeProvider };
|
|
57
|
+
//# sourceMappingURL=tree_provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import '
|
|
3
|
-
import { TREE_ROLE_ATTRIBUTE } from './constants';
|
|
4
|
-
import { TreeProvider } from '
|
|
5
|
-
|
|
2
|
+
import { cn } from '../../utilities/cn.js';
|
|
3
|
+
import { TREE_ROLE_ATTRIBUTE } from './constants.js';
|
|
4
|
+
import { TreeProvider } from './context/tree_provider.js';
|
|
5
|
+
|
|
6
6
|
// eslint-disable-next-line react/display-name
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
var Tree = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8
|
+
var children = _ref.children,
|
|
9
|
+
cssClassNames = _ref.cssClassNames,
|
|
10
|
+
cssStyles = _ref.cssStyles,
|
|
11
|
+
onMouseEnter = _ref.onMouseEnter,
|
|
12
|
+
onMouseLeave = _ref.onMouseLeave;
|
|
13
|
+
return /*#__PURE__*/React.createElement(TreeProvider, null, /*#__PURE__*/React.createElement("ul", {
|
|
14
|
+
role: TREE_ROLE_ATTRIBUTE,
|
|
15
|
+
onMouseEnter: onMouseEnter,
|
|
16
|
+
onMouseLeave: onMouseLeave,
|
|
17
|
+
ref: ref,
|
|
18
|
+
style: cssStyles,
|
|
19
|
+
className: cn('aurora-list-none aurora-flex aurora-flex-col aurora-gap-2', cssClassNames)
|
|
20
|
+
}, children));
|
|
10
21
|
});
|
|
22
|
+
|
|
11
23
|
export default Tree;
|
|
12
|
-
|
|
24
|
+
export { Tree };
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { ACCORDION_SIZES } from './components/accordion/accordion_constants.js';
|
|
2
1
|
export { CSS_BACKGROUND_TOKENS } from './constants/css_tokens/css_background_tokens.js';
|
|
3
2
|
export { CSS_BORDER_COLOR_TOKENS } from './constants/css_tokens/css_border_color_tokens.js';
|
|
4
3
|
export { CSS_BORDER_RADIUS_SIDE_TOKENS, CSS_BORDER_RADIUS_TOKENS } from './constants/css_tokens/css_border_radius_tokens.js';
|
|
@@ -14,6 +13,8 @@ export { CSS_BORDER_STYLE_TOKENS } from './constants/css_tokens/css_border_style
|
|
|
14
13
|
export { CSS_POSITION_TOKENS } from './constants/css_tokens/css_position_tokens.js';
|
|
15
14
|
export { CSS_BORDER_WIDTH_SIDE_TOKENS, CSS_BORDER_WIDTH_TOKENS } from './constants/css_tokens/css_border_width_tokens.js';
|
|
16
15
|
export { CSS_ICON_COLOR_TOKENS_VALUES } from './constants/css_tokens/css_icon_color_tokens.js';
|
|
16
|
+
export { Tree } from './components/tree/index.js';
|
|
17
|
+
export { ACCORDION_SIZES } from './components/accordion/accordion_constants.js';
|
|
17
18
|
export { Accordion } from './components/accordion/accordion.js';
|
|
18
19
|
export { AccordionContent } from './components/accordion/components/accordion_content.js';
|
|
19
20
|
export { AccordionItem } from './components/accordion/components/accordion_item.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|