@dreamcommerce/aurora 2.8.0-1 → 2.8.0-3

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.
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var icon = require('./icon.js');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
+
12
+ const LockClosed = () => (React__default['default'].createElement(icon['default'], null,
13
+ React__default['default'].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
14
+ React__default['default'].createElement("g", { id: "Frame" },
15
+ React__default['default'].createElement("g", { id: "Vector" },
16
+ React__default['default'].createElement("path", { d: "M2.00065 9.29841C2.00065 8.56203 2.5976 7.96507 3.33398 7.96507H12.6673C13.4037 7.96507 14.0007 8.56203 14.0007 9.29841V14.0002C14.0007 14.7365 13.4037 15.3335 12.6673 15.3335H3.33398C2.5976 15.3335 2.00065 14.7365 2.00065 14.0002V9.29841Z", fill: "#3C83EC" }),
17
+ React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.10473 2.53377C5.8727 1.7653 6.91439 1.3335 8.00065 1.3335C9.08692 1.3335 10.1286 1.7653 10.8966 2.53377C11.6645 3.30223 12.0959 4.34439 12.0959 5.43096V7.29841H12.6673C13.7719 7.29841 14.6673 8.19384 14.6673 9.29841V14.0002C14.6673 15.1047 13.7719 16.0002 12.6673 16.0002H3.33398C2.22941 16.0002 1.33398 15.1047 1.33398 14.0002V9.29841C1.33398 8.19384 2.22942 7.29841 3.33398 7.29841H3.90541V5.43096C3.90541 4.34439 4.33677 3.30223 5.10473 2.53377ZM3.33398 8.63174C2.96579 8.63174 2.66732 8.93022 2.66732 9.29841V14.0002C2.66732 14.3684 2.96579 14.6668 3.33398 14.6668H12.6673C13.0355 14.6668 13.334 14.3684 13.334 14.0002V9.29841C13.334 8.93022 13.0355 8.63174 12.6673 8.63174H3.33398ZM10.7626 7.29841H5.23875V5.43096C5.23875 4.69773 5.52984 3.99461 6.04784 3.47627C6.56583 2.95794 7.26829 2.66683 8.00065 2.66683C8.73301 2.66683 9.43547 2.95794 9.95346 3.47627C10.4715 3.99461 10.7626 4.69773 10.7626 5.43096V7.29841Z", fill: "#3C83EC" }))))));
18
+
19
+ exports.default = LockClosed;
20
+ //# sourceMappingURL=lock_closed.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;"}
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var icon = require('./icon.js');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
+
12
+ const LockOpened = () => (React__default['default'].createElement(icon['default'], null,
13
+ React__default['default'].createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
14
+ React__default['default'].createElement("g", { id: "Frame", clipPath: "url(#clip0_30888_11215)" },
15
+ React__default['default'].createElement("g", { id: "Vector" },
16
+ React__default['default'].createElement("path", { d: "M2.00065 9.64994C2.00065 8.91356 2.5976 8.3166 3.33398 8.3166C6.4451 8.3166 9.55621 8.3166 12.6673 8.3166C13.4037 8.3166 14.0007 8.91356 14.0007 9.64994V14.0008C14.0007 14.7372 13.4037 15.3341 12.6673 15.3341H3.33398C2.5976 15.3341 2.00065 14.7372 2.00065 14.0008V9.64994Z", fill: "#ABB4CD" }),
17
+ React__default['default'].createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.11636 1.85154C5.87081 1.13255 6.90354 0.66748 8.00065 0.66748C9.09776 0.66748 10.1305 1.13255 10.8849 1.85154C11.7077 2.63565 12.0959 3.89708 12.0959 5.26824C12.0959 5.63643 11.7974 5.93491 11.4292 5.93491C11.061 5.93491 10.7626 5.63643 10.7626 5.26824C10.7626 4.10455 10.4283 3.25817 9.96509 2.81676C9.43358 2.31022 8.72217 2.00081 8.00065 2.00081C7.27914 2.00081 6.56773 2.31022 6.03621 2.81676C5.57303 3.25817 5.23875 4.10455 5.23875 5.26824V7.64994H12.6673C13.7719 7.64994 14.6673 8.54537 14.6673 9.64994V14.0008C14.6673 15.1054 13.7719 16.0008 12.6673 16.0008H3.33398C2.22941 16.0008 1.33398 15.1054 1.33398 14.0008V9.64994C1.33398 8.54537 2.22942 7.64994 3.33398 7.64994H3.90542V5.26824C3.90542 3.89708 4.29358 2.63565 5.11636 1.85154ZM3.33398 8.98327C2.96579 8.98327 2.66732 9.28175 2.66732 9.64994V14.0008C2.66732 14.369 2.96579 14.6675 3.33398 14.6675H12.6673C13.0355 14.6675 13.334 14.369 13.334 14.0008V9.64994C13.334 9.28175 13.0355 8.98327 12.6673 8.98327H3.33398Z", fill: "#ABB4CD" }))),
18
+ React__default['default'].createElement("defs", null,
19
+ React__default['default'].createElement("clipPath", { id: "clip0_30888_11215" },
20
+ React__default['default'].createElement("rect", { width: "16", height: "16", fill: "white" }))))));
21
+
22
+ exports.default = LockOpened;
23
+ //# sourceMappingURL=lock_opened.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;"}
@@ -3,24 +3,35 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
+ var index = require('../../stack/index.js');
6
7
  var use_toggle = require('../../dropdown/hooks/use_toggle.js');
8
+ var lock_closed = require('../../../assets/lock_closed.js');
9
+ var lock_opened = require('../../../assets/lock_opened.js');
7
10
 
8
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
12
 
10
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
14
 
12
- const ValuesSyncer = ({ areLocked = false, childrenRender }) => {
13
- const [locked, toggleLock] = use_toggle.useToggle(areLocked);
14
- const [firstControlValue, setFirstControlValue] = React.useState();
15
- const [secondControlValue, setSecondControlValue] = React.useState();
16
- return (React__default['default'].createElement("div", null, childrenRender === null || childrenRender === void 0 ? void 0 : childrenRender({
17
- areLocked: locked,
18
- toggle: toggleLock,
19
- firstControlValue,
20
- secondControlValue,
21
- setFirstControlValue,
22
- setSecondControlValue
23
- })));
15
+ const ValuesSyncer = ({ firstControl, secondControl, initialFirstValue, initialSecondValue }) => {
16
+ const [locked, toggleLock] = use_toggle.useToggle(false);
17
+ const [firstControlValue, setFirstControlValue] = React.useState(initialFirstValue);
18
+ const [secondControlValue, setSecondControlValue] = React.useState(initialSecondValue);
19
+ const setFirstControl = (value) => {
20
+ setFirstControlValue(value);
21
+ if (locked) {
22
+ setSecondControlValue(value);
23
+ }
24
+ };
25
+ const setSecondControl = (value) => {
26
+ setSecondControlValue(value);
27
+ if (locked) {
28
+ setFirstControlValue(value);
29
+ }
30
+ };
31
+ return (React__default['default'].createElement(index['default'], { spacing: 16, align: "center" },
32
+ firstControl(firstControlValue, setFirstControl),
33
+ React__default['default'].createElement("button", { "aria-label": "Lock values", type: "button", onClick: toggleLock }, locked ? React__default['default'].createElement(lock_closed['default'], null) : React__default['default'].createElement(lock_opened['default'], null)),
34
+ secondControl(secondControlValue, setSecondControl)));
24
35
  };
25
36
 
26
37
  exports.default = ValuesSyncer;
@@ -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;"}
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;"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var styleInject_es = require('../../../../../external/style-inject/dist/style-inject.es.js');
6
6
 
7
- var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tabs__item-list__2R9BF {\n display: flex;\n list-style: none;\n}\n.main-module_tabs__item-list__2R9BF:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item-list__2R9BF) {\n gap: 8px;\n}\n.main-module_tabs__item__2peSO {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.main-module_tabs__item__2peSO:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO) {\n padding: 8px 12px;\n background-color: #f3f4f8;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n font-weight: 600;\n color: #5c657e;\n text-transform: uppercase;\n}\n.main-module_tabs__item_active__1LSjR {\n position: relative;\n z-index: 1;\n}\n.main-module_tabs__item_active__1LSjR:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR) {\n margin-top: -2px;\n margin-bottom: -1px;\n background-color: #ffffff;\n border-top: 2px solid #3c83ec;\n border-bottom: 1px solid #ffffff;\n color: #2d3748;\n box-shadow: 0 0 9px 0 rgba(92, 101, 126, 0.2);\n -webkit-clip-path: inset(-9px -9px 0 -9px);\n clip-path: inset(-9px -9px 0 -9px);\n}\n.main-module_tabs__panel-list__3Ob_w:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__panel-list__3Ob_w) {\n margin: 0 -16px;\n padding: 16px 16px 0 16px;\n background-color: #ffffff;\n box-shadow: 0 -1px 5px 0 rgba(92, 101, 126, 0.1);\n -webkit-clip-path: inset(-5px 0 0 0);\n clip-path: inset(-5px 0 0 0);\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item-list__2R9BF {\n border: 1px solid #f3f4f8;\n border-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO {\n position: relative;\n flex: 1;\n justify-content: center;\n padding: 10px;\n background-color: transparent;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO:last-child) {\n border-right: 1px solid #f3f4f8;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR {\n background-color: #3c83ec;\n color: #ffffff;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR > * {\n fill: #ffffff;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR:first-child {\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR:last-child {\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR::after {\n content: '';\n position: absolute;\n bottom: -8px;\n width: 0;\n height: 0;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-top: 8px solid #3c83ec;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__panel-list__3Ob_w {\n margin-top: 8px;\n}\n";
7
+ var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tabs__item-list__2R9BF {\n display: flex;\n list-style: none;\n}\n.main-module_tabs__item-list__2R9BF:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item-list__2R9BF) {\n gap: 8px;\n}\n.main-module_tabs__item__2peSO {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.main-module_tabs__item__2peSO:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO) {\n padding: 8px 12px;\n background-color: #f3f4f8;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n font-weight: 600;\n color: #5c657e;\n text-transform: uppercase;\n}\n.main-module_tabs__item_active__1LSjR {\n position: relative;\n z-index: 1;\n}\n.main-module_tabs__item_active__1LSjR:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR) {\n margin-top: -2px;\n margin-bottom: -1px;\n background-color: #ffffff;\n border-top: 2px solid #3c83ec;\n border-bottom: 1px solid #ffffff;\n color: #2d3748;\n box-shadow: 0 0 9px 0 rgba(92, 101, 126, 0.2);\n -webkit-clip-path: inset(-9px -9px 0 -9px);\n clip-path: inset(-9px -9px 0 -9px);\n}\n.main-module_tabs__panel-list__3Ob_w:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__panel-list__3Ob_w) {\n margin: 0 -16px;\n padding: 16px 16px 0 16px;\n background-color: #ffffff;\n box-shadow: 0 -1px 5px 0 rgba(92, 101, 126, 0.1);\n -webkit-clip-path: inset(-5px 0 0 0);\n clip-path: inset(-5px 0 0 0);\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item-list__2R9BF {\n border: 1px solid #f3f4f8;\n border-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO {\n position: relative;\n flex: 1;\n justify-content: center;\n padding: 10px;\n background-color: transparent;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO:last-child) {\n border-right: 1px solid #f3f4f8;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR {\n background-color: #3c83ec;\n color: #ffffff;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR svg * {\n fill: #ffffff;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR:first-child {\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR:last-child {\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR::after {\n content: '';\n position: absolute;\n bottom: -8px;\n width: 0;\n height: 0;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-top: 8px solid #3c83ec;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__panel-list__3Ob_w {\n margin-top: 8px;\n}\n";
8
8
  var cssClasses = {"tabs__item-list":"main-module_tabs__item-list__2R9BF","tabs_secondary":"main-module_tabs_secondary__1QmBJ","tabs__item":"main-module_tabs__item__2peSO","tabs__item_active":"main-module_tabs__item_active__1LSjR","tabs__panel-list":"main-module_tabs__panel-list__3Ob_w"};
9
9
  styleInject_es['default'](css_248z);
10
10
 
@@ -0,0 +1,2 @@
1
+ declare const LockClosed: () => JSX.Element;
2
+ export default LockClosed;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import Icon from './icon.js';
3
+
4
+ const LockClosed = () => (React.createElement(Icon, null,
5
+ React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
6
+ React.createElement("g", { id: "Frame" },
7
+ React.createElement("g", { id: "Vector" },
8
+ React.createElement("path", { d: "M2.00065 9.29841C2.00065 8.56203 2.5976 7.96507 3.33398 7.96507H12.6673C13.4037 7.96507 14.0007 8.56203 14.0007 9.29841V14.0002C14.0007 14.7365 13.4037 15.3335 12.6673 15.3335H3.33398C2.5976 15.3335 2.00065 14.7365 2.00065 14.0002V9.29841Z", fill: "#3C83EC" }),
9
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.10473 2.53377C5.8727 1.7653 6.91439 1.3335 8.00065 1.3335C9.08692 1.3335 10.1286 1.7653 10.8966 2.53377C11.6645 3.30223 12.0959 4.34439 12.0959 5.43096V7.29841H12.6673C13.7719 7.29841 14.6673 8.19384 14.6673 9.29841V14.0002C14.6673 15.1047 13.7719 16.0002 12.6673 16.0002H3.33398C2.22941 16.0002 1.33398 15.1047 1.33398 14.0002V9.29841C1.33398 8.19384 2.22942 7.29841 3.33398 7.29841H3.90541V5.43096C3.90541 4.34439 4.33677 3.30223 5.10473 2.53377ZM3.33398 8.63174C2.96579 8.63174 2.66732 8.93022 2.66732 9.29841V14.0002C2.66732 14.3684 2.96579 14.6668 3.33398 14.6668H12.6673C13.0355 14.6668 13.334 14.3684 13.334 14.0002V9.29841C13.334 8.93022 13.0355 8.63174 12.6673 8.63174H3.33398ZM10.7626 7.29841H5.23875V5.43096C5.23875 4.69773 5.52984 3.99461 6.04784 3.47627C6.56583 2.95794 7.26829 2.66683 8.00065 2.66683C8.73301 2.66683 9.43547 2.95794 9.95346 3.47627C10.4715 3.99461 10.7626 4.69773 10.7626 5.43096V7.29841Z", fill: "#3C83EC" }))))));
10
+
11
+ export default LockClosed;
12
+ //# sourceMappingURL=lock_closed.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;"}
@@ -0,0 +1,2 @@
1
+ declare const LockOpened: () => JSX.Element;
2
+ export default LockOpened;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import Icon from './icon.js';
3
+
4
+ const LockOpened = () => (React.createElement(Icon, null,
5
+ React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
6
+ React.createElement("g", { id: "Frame", clipPath: "url(#clip0_30888_11215)" },
7
+ React.createElement("g", { id: "Vector" },
8
+ React.createElement("path", { d: "M2.00065 9.64994C2.00065 8.91356 2.5976 8.3166 3.33398 8.3166C6.4451 8.3166 9.55621 8.3166 12.6673 8.3166C13.4037 8.3166 14.0007 8.91356 14.0007 9.64994V14.0008C14.0007 14.7372 13.4037 15.3341 12.6673 15.3341H3.33398C2.5976 15.3341 2.00065 14.7372 2.00065 14.0008V9.64994Z", fill: "#ABB4CD" }),
9
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.11636 1.85154C5.87081 1.13255 6.90354 0.66748 8.00065 0.66748C9.09776 0.66748 10.1305 1.13255 10.8849 1.85154C11.7077 2.63565 12.0959 3.89708 12.0959 5.26824C12.0959 5.63643 11.7974 5.93491 11.4292 5.93491C11.061 5.93491 10.7626 5.63643 10.7626 5.26824C10.7626 4.10455 10.4283 3.25817 9.96509 2.81676C9.43358 2.31022 8.72217 2.00081 8.00065 2.00081C7.27914 2.00081 6.56773 2.31022 6.03621 2.81676C5.57303 3.25817 5.23875 4.10455 5.23875 5.26824V7.64994H12.6673C13.7719 7.64994 14.6673 8.54537 14.6673 9.64994V14.0008C14.6673 15.1054 13.7719 16.0008 12.6673 16.0008H3.33398C2.22941 16.0008 1.33398 15.1054 1.33398 14.0008V9.64994C1.33398 8.54537 2.22942 7.64994 3.33398 7.64994H3.90542V5.26824C3.90542 3.89708 4.29358 2.63565 5.11636 1.85154ZM3.33398 8.98327C2.96579 8.98327 2.66732 9.28175 2.66732 9.64994V14.0008C2.66732 14.369 2.96579 14.6675 3.33398 14.6675H12.6673C13.0355 14.6675 13.334 14.369 13.334 14.0008V9.64994C13.334 9.28175 13.0355 8.98327 12.6673 8.98327H3.33398Z", fill: "#ABB4CD" }))),
10
+ React.createElement("defs", null,
11
+ React.createElement("clipPath", { id: "clip0_30888_11215" },
12
+ React.createElement("rect", { width: "16", height: "16", fill: "white" }))))));
13
+
14
+ export default LockOpened;
15
+ //# sourceMappingURL=lock_opened.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;"}
@@ -1,15 +1,9 @@
1
1
  import React from 'react';
2
2
  export declare type TChildrenRenderProps = {
3
- areLocked: boolean;
4
- toggle: () => void;
5
- firstControlValue: unknown;
6
- secondControlValue: unknown;
7
- setFirstControlValue: (value: unknown) => void;
8
- setSecondControlValue: (value: unknown) => void;
3
+ firstControl: (value: unknown, setValue: (value: unknown) => void) => React.ReactNode;
4
+ secondControl: (value: unknown, setValue: (value: unknown) => void) => React.ReactNode;
5
+ initialFirstValue?: unknown;
6
+ initialSecondValue?: unknown;
9
7
  };
10
- export declare type TControlsLockerProps = {
11
- areLocked?: boolean;
12
- childrenRender?: (props: TChildrenRenderProps) => React.ReactNode;
13
- };
14
- declare const ValuesSyncer: ({ areLocked, childrenRender }: TControlsLockerProps) => JSX.Element;
8
+ declare const ValuesSyncer: ({ firstControl, secondControl, initialFirstValue, initialSecondValue }: TChildrenRenderProps) => JSX.Element;
15
9
  export default ValuesSyncer;
@@ -1,18 +1,29 @@
1
1
  import React, { useState } from 'react';
2
+ import Stack from '../../stack/index.js';
2
3
  import { useToggle } from '../../dropdown/hooks/use_toggle.js';
4
+ import LockClosed from '../../../assets/lock_closed.js';
5
+ import LockOpened from '../../../assets/lock_opened.js';
3
6
 
4
- const ValuesSyncer = ({ areLocked = false, childrenRender }) => {
5
- const [locked, toggleLock] = useToggle(areLocked);
6
- const [firstControlValue, setFirstControlValue] = useState();
7
- const [secondControlValue, setSecondControlValue] = useState();
8
- return (React.createElement("div", null, childrenRender === null || childrenRender === void 0 ? void 0 : childrenRender({
9
- areLocked: locked,
10
- toggle: toggleLock,
11
- firstControlValue,
12
- secondControlValue,
13
- setFirstControlValue,
14
- setSecondControlValue
15
- })));
7
+ const ValuesSyncer = ({ firstControl, secondControl, initialFirstValue, initialSecondValue }) => {
8
+ const [locked, toggleLock] = useToggle(false);
9
+ const [firstControlValue, setFirstControlValue] = useState(initialFirstValue);
10
+ const [secondControlValue, setSecondControlValue] = useState(initialSecondValue);
11
+ const setFirstControl = (value) => {
12
+ setFirstControlValue(value);
13
+ if (locked) {
14
+ setSecondControlValue(value);
15
+ }
16
+ };
17
+ const setSecondControl = (value) => {
18
+ setSecondControlValue(value);
19
+ if (locked) {
20
+ setFirstControlValue(value);
21
+ }
22
+ };
23
+ return (React.createElement(Stack, { spacing: 16, align: "center" },
24
+ firstControl(firstControlValue, setFirstControl),
25
+ React.createElement("button", { "aria-label": "Lock values", type: "button", onClick: toggleLock }, locked ? React.createElement(LockClosed, null) : React.createElement(LockOpened, null)),
26
+ secondControl(secondControlValue, setSecondControl)));
16
27
  };
17
28
 
18
29
  export default ValuesSyncer;
@@ -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;"}
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;"}
@@ -1,6 +1,6 @@
1
1
  import styleInject from '../../../../../external/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tabs__item-list__2R9BF {\n display: flex;\n list-style: none;\n}\n.main-module_tabs__item-list__2R9BF:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item-list__2R9BF) {\n gap: 8px;\n}\n.main-module_tabs__item__2peSO {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.main-module_tabs__item__2peSO:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO) {\n padding: 8px 12px;\n background-color: #f3f4f8;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n font-weight: 600;\n color: #5c657e;\n text-transform: uppercase;\n}\n.main-module_tabs__item_active__1LSjR {\n position: relative;\n z-index: 1;\n}\n.main-module_tabs__item_active__1LSjR:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR) {\n margin-top: -2px;\n margin-bottom: -1px;\n background-color: #ffffff;\n border-top: 2px solid #3c83ec;\n border-bottom: 1px solid #ffffff;\n color: #2d3748;\n box-shadow: 0 0 9px 0 rgba(92, 101, 126, 0.2);\n -webkit-clip-path: inset(-9px -9px 0 -9px);\n clip-path: inset(-9px -9px 0 -9px);\n}\n.main-module_tabs__panel-list__3Ob_w:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__panel-list__3Ob_w) {\n margin: 0 -16px;\n padding: 16px 16px 0 16px;\n background-color: #ffffff;\n box-shadow: 0 -1px 5px 0 rgba(92, 101, 126, 0.1);\n -webkit-clip-path: inset(-5px 0 0 0);\n clip-path: inset(-5px 0 0 0);\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item-list__2R9BF {\n border: 1px solid #f3f4f8;\n border-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO {\n position: relative;\n flex: 1;\n justify-content: center;\n padding: 10px;\n background-color: transparent;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO:last-child) {\n border-right: 1px solid #f3f4f8;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR {\n background-color: #3c83ec;\n color: #ffffff;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR > * {\n fill: #ffffff;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR:first-child {\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR:last-child {\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR::after {\n content: '';\n position: absolute;\n bottom: -8px;\n width: 0;\n height: 0;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-top: 8px solid #3c83ec;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__panel-list__3Ob_w {\n margin-top: 8px;\n}\n";
3
+ var css_248z = "/* font colors */\n/* actions */\n/* background */\n/* errors */\n/* borders */\n/* grid */\n/* scrollBar */\n/* sizes */\n.main-module_tabs__item-list__2R9BF {\n display: flex;\n list-style: none;\n}\n.main-module_tabs__item-list__2R9BF:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item-list__2R9BF) {\n gap: 8px;\n}\n.main-module_tabs__item__2peSO {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.main-module_tabs__item__2peSO:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO) {\n padding: 8px 12px;\n background-color: #f3f4f8;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n font-weight: 600;\n color: #5c657e;\n text-transform: uppercase;\n}\n.main-module_tabs__item_active__1LSjR {\n position: relative;\n z-index: 1;\n}\n.main-module_tabs__item_active__1LSjR:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR) {\n margin-top: -2px;\n margin-bottom: -1px;\n background-color: #ffffff;\n border-top: 2px solid #3c83ec;\n border-bottom: 1px solid #ffffff;\n color: #2d3748;\n box-shadow: 0 0 9px 0 rgba(92, 101, 126, 0.2);\n -webkit-clip-path: inset(-9px -9px 0 -9px);\n clip-path: inset(-9px -9px 0 -9px);\n}\n.main-module_tabs__panel-list__3Ob_w:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__panel-list__3Ob_w) {\n margin: 0 -16px;\n padding: 16px 16px 0 16px;\n background-color: #ffffff;\n box-shadow: 0 -1px 5px 0 rgba(92, 101, 126, 0.1);\n -webkit-clip-path: inset(-5px 0 0 0);\n clip-path: inset(-5px 0 0 0);\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item-list__2R9BF {\n border: 1px solid #f3f4f8;\n border-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO {\n position: relative;\n flex: 1;\n justify-content: center;\n padding: 10px;\n background-color: transparent;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO:not(.main-module_tabs_secondary__1QmBJ .main-module_tabs__item__2peSO:last-child) {\n border-right: 1px solid #f3f4f8;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR {\n background-color: #3c83ec;\n color: #ffffff;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR svg * {\n fill: #ffffff;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR:first-child {\n border-top-left-radius: 2px;\n border-bottom-left-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR:last-child {\n border-top-right-radius: 2px;\n border-bottom-right-radius: 2px;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__item_active__1LSjR::after {\n content: '';\n position: absolute;\n bottom: -8px;\n width: 0;\n height: 0;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-top: 8px solid #3c83ec;\n}\n.main-module_tabs_secondary__1QmBJ .main-module_tabs__panel-list__3Ob_w {\n margin-top: 8px;\n}\n";
4
4
  var cssClasses = {"tabs__item-list":"main-module_tabs__item-list__2R9BF","tabs_secondary":"main-module_tabs_secondary__1QmBJ","tabs__item":"main-module_tabs__item__2peSO","tabs__item_active":"main-module_tabs__item_active__1LSjR","tabs__panel-list":"main-module_tabs__panel-list__3Ob_w"};
5
5
  styleInject(css_248z);
6
6
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "2.8.0-1",
5
+ "version": "2.8.0-3",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",