@dspworkplace/ui 1.5.33 → 1.5.34
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/index.es.js +183 -15
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +256 -86
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,8 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
6
6
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
|
-
var styled =
|
|
9
|
+
var styled = require('styled-components');
|
|
10
|
+
var styled__default = _interopDefault(styled);
|
|
10
11
|
|
|
11
12
|
var defaultRadius = '2px';
|
|
12
13
|
var colors = {
|
|
@@ -119,7 +120,7 @@ function _templateObject() {
|
|
|
119
120
|
|
|
120
121
|
return data;
|
|
121
122
|
}
|
|
122
|
-
var Form =
|
|
123
|
+
var Form = styled__default.form(_templateObject(), function (props) {
|
|
123
124
|
return props.width ? props.width : '100%';
|
|
124
125
|
});
|
|
125
126
|
|
|
@@ -420,15 +421,15 @@ var handleSize = function handleSize(sizeType) {
|
|
|
420
421
|
}
|
|
421
422
|
};
|
|
422
423
|
|
|
423
|
-
var Frag =
|
|
424
|
-
var Label =
|
|
424
|
+
var Frag = styled__default.div(_templateObject$1());
|
|
425
|
+
var Label = styled__default.label(_templateObject2(), theme.font.medium.size, theme.colors.error.text);
|
|
425
426
|
var borderDefault = "\n border-width:1px;\n border-style:solid;\n";
|
|
426
|
-
var InputBase =
|
|
427
|
+
var InputBase = styled__default.input(_templateObject3(), theme.colors.neutrals.white, theme.colors.neutrals.silver, theme.form.input.radius, theme.font.small.size, theme.font.small.lineHeight, theme.form.input.padding, theme.colors.neutrals.gray, function (_ref) {
|
|
427
428
|
var size = _ref.size;
|
|
428
429
|
return handleSize(size);
|
|
429
430
|
}, theme.colors.extra.whiteSmoke, borderDefault, theme.colors.neutrals.silver, theme.colors.neutrals.medium, borderDefault, borderDefault, borderDefault, theme.colors.action, theme.colors.secondary, theme.colors.neutrals.silver, theme.font.small);
|
|
430
|
-
var SpanHelp =
|
|
431
|
-
var SpanError =
|
|
431
|
+
var SpanHelp = styled__default.span(_templateObject4(), theme.font.extraSmall.size);
|
|
432
|
+
var SpanError = styled__default(SpanHelp)(_templateObject5(), theme.colors.error.text);
|
|
432
433
|
|
|
433
434
|
var RequiredText = function RequiredText() {
|
|
434
435
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -436,19 +437,19 @@ var RequiredText = function RequiredText() {
|
|
|
436
437
|
}, "*");
|
|
437
438
|
};
|
|
438
439
|
|
|
439
|
-
var SelectUi =
|
|
440
|
+
var SelectUi = styled__default.div(_templateObject6(), function (_ref2) {
|
|
440
441
|
var size = _ref2.size;
|
|
441
442
|
return handleSize(size);
|
|
442
443
|
}, theme.colors.neutrals.silver, theme.colors.secondary, theme.colors.action, theme.colors.error.border, theme.colors.error.border, theme.colors.error.shadow, theme.colors.success.border, theme.colors.success.border, theme.colors.success.shadow);
|
|
443
|
-
var Value =
|
|
444
|
+
var Value = styled__default.span(_templateObject7(), function (props) {
|
|
444
445
|
return props.option ? '#707070' : theme.colors.neutrals.gray;
|
|
445
446
|
}, function (props) {
|
|
446
447
|
return props.option && "\n display:inline-block;\n flex:1;\n ";
|
|
447
448
|
});
|
|
448
|
-
var Options =
|
|
449
|
+
var Options = styled__default.ul(_templateObject8(), theme.colors.neutrals.silver, theme.colors.neutrals.silver, function (props) {
|
|
449
450
|
return props.isChild && "\n position:absolute;\n left:100%;\n margin-left:6px;\n top:-4px;\n\n &::before {\n content: \" \";\n height: 100%;\n width: 6px;\n background: transparent;\n display: block;\n position: absolute;\n left: -7px;\n }\n ";
|
|
450
451
|
}, theme.font.small.size, theme.colors.info.bg, theme.colors.neutrals.silver);
|
|
451
|
-
var OptionGroup =
|
|
452
|
+
var OptionGroup = styled__default.div(_templateObject9());
|
|
452
453
|
|
|
453
454
|
var phone = function phone(value) {
|
|
454
455
|
return value.replace(/\D/g, '').replace(/(\d{3})(\d)/, '$1-$2').replace(/(\d{3})(\d)/, '$1-$2').replace(/(\d{4})\d+?$/, '$1');
|
|
@@ -547,7 +548,7 @@ var handleMask = function handleMask(type) {
|
|
|
547
548
|
}
|
|
548
549
|
};
|
|
549
550
|
|
|
550
|
-
var InputBase$1 =
|
|
551
|
+
var InputBase$1 = styled__default.input(_templateObject$2(), theme.colors.neutrals.white, function (props) {
|
|
551
552
|
return handlerColor(props.validation);
|
|
552
553
|
}, theme.form.input.radius, theme.font.small.size, theme.font.small.lineHeight, theme.form.input.padding, theme.colors.neutrals.gray, function (_ref) {
|
|
553
554
|
var size = _ref.size;
|
|
@@ -557,9 +558,9 @@ var InputBase$1 = styled.input(_templateObject$2(), theme.colors.neutrals.white,
|
|
|
557
558
|
}, borderDefault$1, function (props) {
|
|
558
559
|
return handlerColor(props.validation);
|
|
559
560
|
}, borderDefault$1, theme.colors.action, theme.colors.secondary, theme.colors.neutrals.silver, theme.font.small, theme.colors.info.bg, theme.colors.neutrals.silver);
|
|
560
|
-
var Span =
|
|
561
|
-
var SpanError$1 =
|
|
562
|
-
var Frag$1 =
|
|
561
|
+
var Span = styled__default.span(_templateObject2$1(), theme.font.extraSmall.size);
|
|
562
|
+
var SpanError$1 = styled__default(Span)(_templateObject3$1(), theme.colors.error.text);
|
|
563
|
+
var Frag$1 = styled__default.div(_templateObject4$1(), function (_ref2) {
|
|
563
564
|
var size = _ref2.size;
|
|
564
565
|
return handleSize$1(size);
|
|
565
566
|
});
|
|
@@ -2226,7 +2227,7 @@ function _templateObject$3() {
|
|
|
2226
2227
|
}
|
|
2227
2228
|
|
|
2228
2229
|
var Wrapper = function Wrapper(Element) {
|
|
2229
|
-
var Svg =
|
|
2230
|
+
var Svg = styled__default(Element)(_templateObject$3(), function (props) {
|
|
2230
2231
|
return props.size ? props.size : '40px';
|
|
2231
2232
|
}, function (props) {
|
|
2232
2233
|
return props.size ? props.size : '40px';
|
|
@@ -2345,7 +2346,7 @@ function _templateObject$4() {
|
|
|
2345
2346
|
|
|
2346
2347
|
return data;
|
|
2347
2348
|
}
|
|
2348
|
-
var Help =
|
|
2349
|
+
var Help = styled__default.span(_templateObject$4(), theme.colors.info.bg, theme.colors.info.border, theme.colors.info.text);
|
|
2349
2350
|
|
|
2350
2351
|
var App = function App(_ref) {
|
|
2351
2352
|
var text = _ref.text;
|
|
@@ -2403,10 +2404,10 @@ function _templateObject$5() {
|
|
|
2403
2404
|
|
|
2404
2405
|
return data;
|
|
2405
2406
|
}
|
|
2406
|
-
var Title =
|
|
2407
|
-
var SubTitle =
|
|
2408
|
-
var ThirdTitle =
|
|
2409
|
-
var Text =
|
|
2407
|
+
var Title = styled__default.h1(_templateObject$5(), theme.colors.secondary);
|
|
2408
|
+
var SubTitle = styled__default.h3(_templateObject2$2(), theme.colors.info.text);
|
|
2409
|
+
var ThirdTitle = styled__default(SubTitle)(_templateObject3$2());
|
|
2410
|
+
var Text = styled__default.p(_templateObject4$2(), theme.colors.neutrals.gray);
|
|
2410
2411
|
|
|
2411
2412
|
function _templateObject12() {
|
|
2412
2413
|
var data = taggedTemplateLiteral(["\n height:24px;\n width:24px;\n box-sizing: border-box;\n margin-right:5px;\n border-radius:100%;\n border:2px solid white;\n background:", "\n z-index: ", ";\n margin-left:", "\n margin-top: 8px;\n margin-bottom: 8px;\n display: inline-block;\n"]);
|
|
@@ -2527,7 +2528,7 @@ function _templateObject$6() {
|
|
|
2527
2528
|
|
|
2528
2529
|
return data;
|
|
2529
2530
|
}
|
|
2530
|
-
var Frag$2 =
|
|
2531
|
+
var Frag$2 = styled__default.div(_templateObject$6());
|
|
2531
2532
|
|
|
2532
2533
|
var handleSize$2 = function handleSize(sizeType) {
|
|
2533
2534
|
switch (sizeType) {
|
|
@@ -2545,11 +2546,11 @@ var handleSize$2 = function handleSize(sizeType) {
|
|
|
2545
2546
|
}
|
|
2546
2547
|
};
|
|
2547
2548
|
|
|
2548
|
-
var SelectUi$1 =
|
|
2549
|
+
var SelectUi$1 = styled__default.div(_templateObject2$3(), function (_ref) {
|
|
2549
2550
|
var size = _ref.size;
|
|
2550
2551
|
return handleSize$2(size);
|
|
2551
2552
|
}, theme.colors.neutrals.silver, theme.colors.secondary, theme.colors.action, theme.colors.error.border, theme.colors.error.border, theme.colors.error.shadow, theme.colors.success.border, theme.colors.success.border, theme.colors.success.shadow, theme.colors.extra.whiteSmoke, theme.colors.neutrals.silver, theme.colors.neutrals.medium);
|
|
2552
|
-
var Value$1 =
|
|
2553
|
+
var Value$1 = styled__default(Text).attrs(function (props) {
|
|
2553
2554
|
return {
|
|
2554
2555
|
as: 'span'
|
|
2555
2556
|
};
|
|
@@ -2558,7 +2559,7 @@ var Value$1 = styled(Text).attrs(function (props) {
|
|
|
2558
2559
|
});
|
|
2559
2560
|
var maxOptions = 3;
|
|
2560
2561
|
var optionsSize = 32;
|
|
2561
|
-
var Options$1 =
|
|
2562
|
+
var Options$1 = styled__default.ul(_templateObject4$3(), theme.colors.neutrals.silver, theme.colors.neutrals.silver, function (props) {
|
|
2562
2563
|
return props.openTo === 'top' && "\n top:unset;\n bottom: 100%;\n ";
|
|
2563
2564
|
}, function (props) {
|
|
2564
2565
|
return !props.hasChildren && "\n max-height: ".concat(props.visibleOptionsQty ? props.visibleOptionsQty * optionsSize : maxOptions * optionsSize, "px;\n overflow-x:hidden;\n overflow-y:scroll;\n ");
|
|
@@ -2566,16 +2567,16 @@ var Options$1 = styled.ul(_templateObject4$3(), theme.colors.neutrals.silver, th
|
|
|
2566
2567
|
return props.isChild && "\n position:absolute;\n left:100%;\n margin-left:4px;\n top:-4px;\n ";
|
|
2567
2568
|
}, theme.font.small.size, theme.colors.info.bg, theme.colors.neutrals.silver);
|
|
2568
2569
|
var optionsSizeCustom = 42;
|
|
2569
|
-
var OptionsPeople =
|
|
2570
|
+
var OptionsPeople = styled__default(Options$1)(_templateObject5$1(), function (props) {
|
|
2570
2571
|
return props.visibleOptionsQty ? props.visibleOptionsQty * optionsSize : optionsSizeCustom * optionsSize;
|
|
2571
2572
|
});
|
|
2572
|
-
var Span$1 =
|
|
2573
|
-
var SpanError$2 =
|
|
2574
|
-
var SelectHidden =
|
|
2575
|
-
var PhotoCover =
|
|
2576
|
-
var CustomCheckBox =
|
|
2577
|
-
var OptionGroup$1 =
|
|
2578
|
-
var ColorOption =
|
|
2573
|
+
var Span$1 = styled__default.span(_templateObject6$1(), theme.font.extraSmall.size);
|
|
2574
|
+
var SpanError$2 = styled__default(Span$1)(_templateObject7$1(), theme.colors.error.text);
|
|
2575
|
+
var SelectHidden = styled__default.select(_templateObject8$1());
|
|
2576
|
+
var PhotoCover = styled__default.div(_templateObject9$1());
|
|
2577
|
+
var CustomCheckBox = styled__default.div(_templateObject10(), theme.colors.neutrals.white, theme.defaultRadius, theme.colors.neutrals.silver, theme.colors.secondary, theme.colors.action);
|
|
2578
|
+
var OptionGroup$1 = styled__default.div(_templateObject11());
|
|
2579
|
+
var ColorOption = styled__default.span(_templateObject12(), function (props) {
|
|
2579
2580
|
return props.color ? props.color : 'black';
|
|
2580
2581
|
}, function (props) {
|
|
2581
2582
|
return props.index > 0 ? 10 - props.index : 10;
|
|
@@ -3177,7 +3178,7 @@ var solveSpace = function solveSpace() {
|
|
|
3177
3178
|
return type * 4;
|
|
3178
3179
|
};
|
|
3179
3180
|
|
|
3180
|
-
var BaseSpace =
|
|
3181
|
+
var BaseSpace = styled__default.div(_templateObject$7(), function (props) {
|
|
3181
3182
|
return solveSpace(props.top);
|
|
3182
3183
|
}, function (props) {
|
|
3183
3184
|
return solveSpace(props.left);
|
|
@@ -3292,25 +3293,25 @@ function _templateObject$8() {
|
|
|
3292
3293
|
|
|
3293
3294
|
return data;
|
|
3294
3295
|
}
|
|
3295
|
-
var HiddenCheckbox =
|
|
3296
|
+
var HiddenCheckbox = styled__default.input.attrs({
|
|
3296
3297
|
type: 'checkbox'
|
|
3297
3298
|
})(_templateObject$8());
|
|
3298
|
-
var HiddenRadioBox =
|
|
3299
|
+
var HiddenRadioBox = styled__default.input.attrs({
|
|
3299
3300
|
type: 'radio'
|
|
3300
3301
|
})(_templateObject2$4());
|
|
3301
|
-
var CheckboxContainer =
|
|
3302
|
-
var CustomCheckBox$1 =
|
|
3302
|
+
var CheckboxContainer = styled__default.label(_templateObject3$4());
|
|
3303
|
+
var CustomCheckBox$1 = styled__default.div(_templateObject4$4(), theme.colors.neutrals.white, theme.defaultRadius, theme.colors.neutrals.silver, function (props) {
|
|
3303
3304
|
return props.radio ? '17px' : '16px';
|
|
3304
3305
|
}, function (props) {
|
|
3305
3306
|
return props.radio ? '17px' : '16px';
|
|
3306
3307
|
}, function (props) {
|
|
3307
3308
|
return props.radio ? '17px' : '2px';
|
|
3308
3309
|
}, HiddenCheckbox, HiddenRadioBox, theme.colors.secondary, theme.colors.action, HiddenCheckbox, HiddenRadioBox, theme.colors.neutrals.silver, HiddenCheckbox, HiddenRadioBox);
|
|
3309
|
-
var Title$1 =
|
|
3310
|
-
var Label$1 =
|
|
3311
|
-
var Span$2 =
|
|
3312
|
-
var SpanError$3 =
|
|
3313
|
-
var NoOptions =
|
|
3310
|
+
var Title$1 = styled__default.h5(_templateObject5$2(), theme.colors.error.text);
|
|
3311
|
+
var Label$1 = styled__default.span(_templateObject6$2());
|
|
3312
|
+
var Span$2 = styled__default.span(_templateObject7$2(), theme.font.extraSmall.size);
|
|
3313
|
+
var SpanError$3 = styled__default(Span$2)(_templateObject8$2(), theme.colors.error.text);
|
|
3314
|
+
var NoOptions = styled__default(Text)(_templateObject9$2(), theme.colors.neutrals.silver);
|
|
3314
3315
|
var CheckboxBase = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3315
3316
|
var name = _ref.name,
|
|
3316
3317
|
_ref$checked = _ref.checked,
|
|
@@ -3597,19 +3598,19 @@ function _templateObject$9() {
|
|
|
3597
3598
|
|
|
3598
3599
|
return data;
|
|
3599
3600
|
}
|
|
3600
|
-
var Frag$3 =
|
|
3601
|
-
var Span$3 =
|
|
3602
|
-
var SpanError$4 =
|
|
3603
|
-
var Select =
|
|
3601
|
+
var Frag$3 = styled__default.div(_templateObject$9());
|
|
3602
|
+
var Span$3 = styled__default.span(_templateObject2$5(), theme.font.extraSmall.size);
|
|
3603
|
+
var SpanError$4 = styled__default(Span$3)(_templateObject3$5(), theme.colors.error.text);
|
|
3604
|
+
var Select = styled__default(InputBase)(_templateObject4$5(), theme.colors.neutrals.white, theme.colors.action, theme.colors.secondary, theme.colors.error.border);
|
|
3604
3605
|
var maxOptions$1 = 5;
|
|
3605
3606
|
var optionsSize$1 = 32;
|
|
3606
|
-
var Options$2 =
|
|
3607
|
+
var Options$2 = styled__default.ul(_templateObject5$3(), theme.colors.neutrals.silver, theme.colors.neutrals.silver, function (props) {
|
|
3607
3608
|
return props.openTo === 'top' && "\n top:unset;\n bottom:100%;\n ";
|
|
3608
3609
|
}, function (props) {
|
|
3609
3610
|
return props.visibleOptionsQty ? props.visibleOptionsQty * optionsSize$1 : maxOptions$1 * optionsSize$1;
|
|
3610
3611
|
}, theme.font.small.size, theme.colors.info.bg);
|
|
3611
|
-
var TagsValues =
|
|
3612
|
-
var SelectHidden$1 =
|
|
3612
|
+
var TagsValues = styled__default.ul(_templateObject6$3());
|
|
3613
|
+
var SelectHidden$1 = styled__default.select(_templateObject7$3());
|
|
3613
3614
|
var Tag = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3614
3615
|
var _ref$name = _ref.name,
|
|
3615
3616
|
name = _ref$name === void 0 ? '' : _ref$name,
|
|
@@ -4076,13 +4077,13 @@ function _templateObject$a() {
|
|
|
4076
4077
|
|
|
4077
4078
|
return data;
|
|
4078
4079
|
}
|
|
4079
|
-
var Frag$4 =
|
|
4080
|
-
var Field =
|
|
4081
|
-
var WraperBucket =
|
|
4080
|
+
var Frag$4 = styled__default.div(_templateObject$a());
|
|
4081
|
+
var Field = styled__default.div(_templateObject2$6());
|
|
4082
|
+
var WraperBucket = styled__default.div(_templateObject3$6(), function (props) {
|
|
4082
4083
|
return props.background ? props.background : theme.colors.info.shadow;
|
|
4083
4084
|
}, theme.colors.action, theme.colors.secondary);
|
|
4084
|
-
var ColorBox =
|
|
4085
|
-
var SelectHidden$2 =
|
|
4085
|
+
var ColorBox = styled__default.ul(_templateObject4$6(), theme.colors.neutrals.gray, theme.colors.secondary, theme.defaultRadius, theme.colors.neutrals.gray, theme.defaultRadius);
|
|
4086
|
+
var SelectHidden$2 = styled__default.select(_templateObject5$4());
|
|
4086
4087
|
var InputColor = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
4087
4088
|
var name = _ref.name,
|
|
4088
4089
|
tooltip = _ref.tooltip,
|
|
@@ -4974,14 +4975,14 @@ var defaultShadow = function defaultShadow(color) {
|
|
|
4974
4975
|
return "0px 0px 6px ".concat(color);
|
|
4975
4976
|
};
|
|
4976
4977
|
|
|
4977
|
-
var Base =
|
|
4978
|
+
var Base = styled__default.button(_templateObject$b(), theme.defaultRadius, theme.colors.info.bg, theme.colors.secondary, theme.font.medium.size, theme.colors.info.shadow, theme.colors.secondary, theme.colors.info.shadow, theme.colors.info.bg, defaultShadow(theme.form.button.secondary.bg), theme.colors.info.shadow, defaultShadow(theme.form.button.secondary.bg), theme.form.button.secondary.bg);
|
|
4978
4979
|
var Primary = "\n background:".concat(theme.form.button.primary.bg, ";\n color:").concat(theme.colors.neutrals.white, ";\n\n > * {\n border-color: ").concat(theme.colors.neutrals.white, ";\n }\n\n svg path {\n fill: ").concat(theme.colors.neutrals.white, ";\n }\n\n &:hover,\n &.hover {\n background:").concat(theme.form.button.primary.hover, "\n }\n\n &:focus,\n &.focus {\n background:").concat(theme.form.button.primary.bg, ";\n box-shadow:").concat(defaultShadow(theme.form.button.primary.bg), ";\n }\n\n &:active,\n &.active {\n background:").concat(theme.form.button.primary.hover, "\n box-shadow:").concat(defaultShadow(theme.form.button.primary.bg), ";\n }\n\n &.selected {\n border: 1px solid ").concat(theme.colors.neutrals.white, ";\n }\n");
|
|
4979
4980
|
var Secondary = "\n background:".concat(theme.form.button.secondary.bg, ";\n color:").concat(theme.colors.neutrals.white, ";\n\n > * {\n border-color: ").concat(theme.colors.neutrals.white, ";\n }\n\n svg path {\n fill: ").concat(theme.colors.neutrals.white, ";\n }\n\n &:hover {\n background:").concat(theme.form.button.secondary.hover, "\n }\n\n &:focus {\n background:").concat(theme.form.button.secondary.bg, ";\n box-shadow:").concat(defaultShadow(theme.form.button.secondary.bg), ";\n }\n\n &:active,\n &.active {\n background:").concat(theme.form.button.secondary.hover, "\n box-shadow:").concat(defaultShadow(theme.form.button.secondary.bg), ";\n }\n\n &.selected {\n border: 1px solid ").concat(theme.colors.neutrals.white, ";\n }\n");
|
|
4980
4981
|
var Cancel = "\n background:transparent;\n color:".concat(theme.form.button.secondary.bg, ";\n\n > * {\n border-color: ").concat(theme.colors.info.shadow, ";\n }\n\n svg path {\n fill: ").concat(theme.colors.secondary, ";\n }\n\n &:hover {\n background:transparent;\n text-decoration:underline;\n }\n\n &:focus {\n background:").concat(theme.colors.neutrals.white, ";\n box-shadow:").concat(defaultShadow(theme.form.button.secondary.bg), ";\n }\n\n &:active,\n &.active {\n background:").concat(theme.colors.neutrals.white, ";\n box-shadow:").concat(defaultShadow(theme.form.button.secondary.bg), ";\n text-decoration:underline;\n }\n\n &.selected {\n border: 1px solid ").concat(theme.form.button.secondary.bg, ";\n }\n");
|
|
4981
4982
|
var Delete = "\n background:".concat(theme.colors.neutrals.white, ";\n color:").concat(theme.colors.error.text, ";\n border:1px solid ").concat(theme.colors.error.bg, ";\n\n > * {\n border-color: ").concat(theme.colors.error.shadow, ";\n }\n\n svg path {\n fill: ").concat(theme.colors.error.text, ";\n }\n\n &:hover {\n border-color:").concat(theme.colors.error.border, ";\n background:").concat(theme.colors.error.bg, ";\n }\n\n &:focus {\n background:").concat(theme.colors.neutrals.white, ";\n border-color:").concat(theme.colors.error.border, ";\n box-shadow:").concat(defaultShadow(theme.colors.error.shadow), ";\n }\n\n &:active,\n &.active {\n background:").concat(theme.colors.error.bg, ";\n border-color:").concat(theme.colors.error.border, ";\n box-shadow:").concat(defaultShadow(theme.colors.error.shadow), ";\n }\n\n &.selected {\n border: 1px solid ").concat(theme.colors.error.border, ";\n }\n");
|
|
4982
4983
|
var Small = "\n height:28px;\n line-height:28px;\n font-size:".concat(theme.font.small.size, ";\n padding:0 12px;\n");
|
|
4983
4984
|
var Big = "\n height:60px;\n line-height:60px;\n font-size:".concat(theme.font.big.size, ";\n padding:0 20px;\n");
|
|
4984
|
-
var Exportedd =
|
|
4985
|
+
var Exportedd = styled__default(Base)(_templateObject2$7(), function (props) {
|
|
4985
4986
|
return props.typeStyle === 'primary' && Primary;
|
|
4986
4987
|
}, function (props) {
|
|
4987
4988
|
return props.typeStyle === 'secondary' && Secondary;
|
|
@@ -5079,11 +5080,11 @@ function _templateObject$c() {
|
|
|
5079
5080
|
|
|
5080
5081
|
return data;
|
|
5081
5082
|
}
|
|
5082
|
-
var Frag$5 =
|
|
5083
|
-
var Wrapper$1 =
|
|
5084
|
-
var Input$1 =
|
|
5085
|
-
var Profile =
|
|
5086
|
-
var HiddenInput =
|
|
5083
|
+
var Frag$5 = styled__default.div(_templateObject$c());
|
|
5084
|
+
var Wrapper$1 = styled__default.label(_templateObject2$8(), theme.colors.info.bg, theme.colors.secondary, theme.colors.action, theme.colors.secondary, theme.colors.success.border, theme.colors.success.border, theme.colors.error.border, theme.colors.error.border);
|
|
5085
|
+
var Input$1 = styled__default(InputBase)(_templateObject3$7());
|
|
5086
|
+
var Profile = styled__default.div(_templateObject4$7(), theme.colors.neutrals.silver);
|
|
5087
|
+
var HiddenInput = styled__default.input(_templateObject5$5());
|
|
5087
5088
|
var Uploader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
5088
5089
|
var name = _ref.name,
|
|
5089
5090
|
label = _ref.label,
|
|
@@ -5223,8 +5224,8 @@ var processFileList = /*#__PURE__*/function () {
|
|
|
5223
5224
|
};
|
|
5224
5225
|
}();
|
|
5225
5226
|
|
|
5226
|
-
var DropUploaderList =
|
|
5227
|
-
var DropUploaderPreview =
|
|
5227
|
+
var DropUploaderList = styled__default.div(_templateObject6$4());
|
|
5228
|
+
var DropUploaderPreview = styled__default.div(_templateObject7$4(), theme.defaultRadius, theme.colors.neutrals.silver, theme.colors.extra.whiteSmoke, theme.font.extraSmall.size, theme.font.main, theme.colors.neutrals.silver, function (props) {
|
|
5228
5229
|
return typeof props.preview === 'string' && props.preview;
|
|
5229
5230
|
}, theme.colors.info.bg, theme.colors.secondary, theme.colors.secondary);
|
|
5230
5231
|
var DropUploader = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
@@ -5500,11 +5501,11 @@ function _templateObject$d() {
|
|
|
5500
5501
|
|
|
5501
5502
|
return data;
|
|
5502
5503
|
}
|
|
5503
|
-
var Frag$6 =
|
|
5504
|
-
var CheckBoxWrapper =
|
|
5505
|
-
var CheckBoxLabel =
|
|
5506
|
-
var CheckBox$1 =
|
|
5507
|
-
var ToggleLabel =
|
|
5504
|
+
var Frag$6 = styled__default.div(_templateObject$d());
|
|
5505
|
+
var CheckBoxWrapper = styled__default.div(_templateObject2$9());
|
|
5506
|
+
var CheckBoxLabel = styled__default.label(_templateObject3$8(), theme.colors.neutrals.white, theme.colors.neutrals.silver, theme.colors.action, theme.colors.secondary);
|
|
5507
|
+
var CheckBox$1 = styled__default.input(_templateObject4$8(), CheckBoxLabel, theme.colors.info.bg, theme.colors.info.border, theme.colors.info.text);
|
|
5508
|
+
var ToggleLabel = styled__default.label(_templateObject5$6(), theme.colors.neutrals.medium, theme.font.small.size);
|
|
5508
5509
|
var Toggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
5509
5510
|
var name = _ref.name,
|
|
5510
5511
|
label = _ref.label,
|
|
@@ -5723,7 +5724,7 @@ var fromMilliseconds = function fromMilliseconds(milliseconds) {
|
|
|
5723
5724
|
};
|
|
5724
5725
|
};
|
|
5725
5726
|
|
|
5726
|
-
var TimePickerOptionsStyle =
|
|
5727
|
+
var TimePickerOptionsStyle = styled__default.div(_templateObject$e(), Options, OptionGroup, theme.font.extraSmall.size, theme.font.extraSmall.lineHeight, theme.colors.neutrals.white, theme.colors.neutrals.white);
|
|
5727
5728
|
|
|
5728
5729
|
var TimePickerOptions = function TimePickerOptions(_ref5) {
|
|
5729
5730
|
var time = _ref5.time,
|
|
@@ -5984,7 +5985,7 @@ function _templateObject$f() {
|
|
|
5984
5985
|
|
|
5985
5986
|
return data;
|
|
5986
5987
|
}
|
|
5987
|
-
var Container =
|
|
5988
|
+
var Container = styled__default(Base).attrs(function (props) {
|
|
5988
5989
|
return {
|
|
5989
5990
|
as: 'div'
|
|
5990
5991
|
};
|
|
@@ -6003,7 +6004,7 @@ var Container = styled(Base).attrs(function (props) {
|
|
|
6003
6004
|
}, function (props) {
|
|
6004
6005
|
return props.divider && "\n ".concat(ArrowContainer, " {\n border-left-width: 1px;\n border-left-style: dashed;\n }\n ");
|
|
6005
6006
|
});
|
|
6006
|
-
var ArrowContainer =
|
|
6007
|
+
var ArrowContainer = styled__default.div(_templateObject2$a());
|
|
6007
6008
|
|
|
6008
6009
|
var Dropdown$1 = function Dropdown$$1(_ref) {
|
|
6009
6010
|
var children = _ref.children,
|
|
@@ -6096,7 +6097,7 @@ function _templateObject$g() {
|
|
|
6096
6097
|
|
|
6097
6098
|
return data;
|
|
6098
6099
|
}
|
|
6099
|
-
var BtnGroup =
|
|
6100
|
+
var BtnGroup = styled__default.div(_templateObject$g());
|
|
6100
6101
|
|
|
6101
6102
|
var ButtonGroup = function ButtonGroup(_ref) {
|
|
6102
6103
|
var children = _ref.children,
|
|
@@ -6117,6 +6118,174 @@ var ButtonGroup = function ButtonGroup(_ref) {
|
|
|
6117
6118
|
}));
|
|
6118
6119
|
};
|
|
6119
6120
|
|
|
6121
|
+
function _templateObject4$9() {
|
|
6122
|
+
var data = taggedTemplateLiteral(["\n position:relative;\n\n &:hover > ", " > * {\n animation-name: ", ";\n animation-duration: 300ms;\n animation-fill-mode: both;\n animation-timing-function: ease-in-out;\n }\n"]);
|
|
6123
|
+
|
|
6124
|
+
_templateObject4$9 = function _templateObject4() {
|
|
6125
|
+
return data;
|
|
6126
|
+
};
|
|
6127
|
+
|
|
6128
|
+
return data;
|
|
6129
|
+
}
|
|
6130
|
+
|
|
6131
|
+
function _templateObject3$9() {
|
|
6132
|
+
var data = taggedTemplateLiteral(["\n cursor:pointer;\n background:white;\n border-radius:100%;\n padding:8px;\n display:flex;\n justify-content:center;\n border:1px solid rgb(204, 204, 204);\n"]);
|
|
6133
|
+
|
|
6134
|
+
_templateObject3$9 = function _templateObject3() {
|
|
6135
|
+
return data;
|
|
6136
|
+
};
|
|
6137
|
+
|
|
6138
|
+
return data;
|
|
6139
|
+
}
|
|
6140
|
+
|
|
6141
|
+
function _templateObject2$b() {
|
|
6142
|
+
var data = taggedTemplateLiteral(["\n position:absolute;\n height:fit-content;\n padding:12px;\n white-space: nowrap;\n align-items:center;\n gap: ", "\n display:flex;\n visibility: hidden;\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"]);
|
|
6143
|
+
|
|
6144
|
+
_templateObject2$b = function _templateObject2() {
|
|
6145
|
+
return data;
|
|
6146
|
+
};
|
|
6147
|
+
|
|
6148
|
+
return data;
|
|
6149
|
+
}
|
|
6150
|
+
|
|
6151
|
+
function _templateObject$h() {
|
|
6152
|
+
var data = taggedTemplateLiteral(["\n 0% {\n opacity:0;\n visibility: hidden;\n transform: scale(0.6) translateY(-8px);\n }\n\n 100% {\n visibility: visible;\n opacity:1;\n }\n"]);
|
|
6153
|
+
|
|
6154
|
+
_templateObject$h = function _templateObject() {
|
|
6155
|
+
return data;
|
|
6156
|
+
};
|
|
6157
|
+
|
|
6158
|
+
return data;
|
|
6159
|
+
}
|
|
6160
|
+
var listAnimation = styled.keyframes(_templateObject$h());
|
|
6161
|
+
var POSITION_LIST = '100%';
|
|
6162
|
+
var POSITION_LIST_DISTANCE = '10%';
|
|
6163
|
+
|
|
6164
|
+
var generateAnimationDelay = function generateAnimationDelay(n, direction) {
|
|
6165
|
+
var style = '';
|
|
6166
|
+
|
|
6167
|
+
if (['left', 'top'].includes(direction)) {
|
|
6168
|
+
var delayNumber = 1;
|
|
6169
|
+
|
|
6170
|
+
for (var i = n; i >= 1; --i) {
|
|
6171
|
+
style += "\n > :nth-child(".concat(i, ") {\n animation-delay: ").concat(delayNumber * 90, "ms;\n }\n ");
|
|
6172
|
+
delayNumber++;
|
|
6173
|
+
}
|
|
6174
|
+
} else {
|
|
6175
|
+
for (var _i = 1; _i <= n; ++_i) {
|
|
6176
|
+
style += "\n > :nth-child(".concat(_i, ") {\n animation-delay: ").concat(_i * 90, "ms;\n }\n ");
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
6179
|
+
|
|
6180
|
+
return style;
|
|
6181
|
+
};
|
|
6182
|
+
|
|
6183
|
+
var ListContent = styled__default.div(_templateObject2$b(), function (props) {
|
|
6184
|
+
return props.spaceBetween;
|
|
6185
|
+
}, function (props) {
|
|
6186
|
+
return generateAnimationDelay(props.childrenQuantity, props.direction);
|
|
6187
|
+
}, function (props) {
|
|
6188
|
+
return props.direction === 'right' || props.direction === 'auto' && "\n flex-direction:row;\n top:0;\n bottom:0;\n left:".concat(POSITION_LIST, ";\n padding-left:").concat(POSITION_LIST_DISTANCE, ";\n ");
|
|
6189
|
+
}, function (props) {
|
|
6190
|
+
return props.direction === 'left' && "\n flex-direction:row;\n top:0;\n bottom:0;\n right:".concat(POSITION_LIST, ";\n padding-right:").concat(POSITION_LIST_DISTANCE, ";\n ");
|
|
6191
|
+
}, function (props) {
|
|
6192
|
+
return props.direction === 'top' && "\n flex-direction:column;\n justify-content:end;\n bottom:".concat(POSITION_LIST, ";\n right:0;\n left:0;\n padding-top:").concat(POSITION_LIST_DISTANCE, ";\n ");
|
|
6193
|
+
}, function (props) {
|
|
6194
|
+
return props.directiondirection === 'bottom' && "\n flex-direction:column;\n justify-content:start;\n top:".concat(POSITION_LIST, ";\n bottom:0;\n right:0;\n left:0;\n padding-top:").concat(POSITION_LIST_DISTANCE, ";\n ");
|
|
6195
|
+
});
|
|
6196
|
+
var PreviewContent = styled__default.div(_templateObject3$9());
|
|
6197
|
+
var Container$1 = styled__default.div(_templateObject4$9(), ListContent, listAnimation);
|
|
6198
|
+
|
|
6199
|
+
var ButtonIcon = function ButtonIcon(_ref) {
|
|
6200
|
+
var children = _ref.children,
|
|
6201
|
+
_ref$event = _ref.event;
|
|
6202
|
+
|
|
6203
|
+
if (children.length > 2) {
|
|
6204
|
+
throw 'This component only accepts a Button.Preview and Button.List component';
|
|
6205
|
+
}
|
|
6206
|
+
|
|
6207
|
+
var _children = slicedToArray(children, 2),
|
|
6208
|
+
Preview = _children[0],
|
|
6209
|
+
List = _children[1];
|
|
6210
|
+
|
|
6211
|
+
if (Preview.type.name !== 'ButtonPreview') {
|
|
6212
|
+
throw "The first component should be ButtonIcon.Preview, but got ".concat(Preview.type.name);
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6215
|
+
if (List.type.name !== 'ButtonList') {
|
|
6216
|
+
throw "The first component should be ButtonIcon.List, but got ".concat(Preview.type.name);
|
|
6217
|
+
}
|
|
6218
|
+
|
|
6219
|
+
return /*#__PURE__*/React__default.createElement(Container$1, null, Preview, List);
|
|
6220
|
+
};
|
|
6221
|
+
|
|
6222
|
+
var ButtonPreview = function ButtonPreview(_ref2) {
|
|
6223
|
+
var children = _ref2.children;
|
|
6224
|
+
var previewRef = React.useRef();
|
|
6225
|
+
return /*#__PURE__*/React__default.createElement(PreviewContent, {
|
|
6226
|
+
ref: previewRef
|
|
6227
|
+
}, children);
|
|
6228
|
+
};
|
|
6229
|
+
|
|
6230
|
+
ButtonIcon.Preview = ButtonPreview;
|
|
6231
|
+
var DIRECTIONS = ['bottom', 'left', 'right', 'top', 'auto'];
|
|
6232
|
+
|
|
6233
|
+
var ButtonList = function ButtonList(_ref3) {
|
|
6234
|
+
var children = _ref3.children,
|
|
6235
|
+
direction = _ref3.direction,
|
|
6236
|
+
spaceBetween = _ref3.spaceBetween;
|
|
6237
|
+
|
|
6238
|
+
var _useState = React.useState(direction),
|
|
6239
|
+
_useState2 = slicedToArray(_useState, 2),
|
|
6240
|
+
dir = _useState2[0],
|
|
6241
|
+
setDir = _useState2[1];
|
|
6242
|
+
|
|
6243
|
+
if (!DIRECTIONS.includes(dir)) {
|
|
6244
|
+
throw "Invalid direction argument on component ButtonIcon.List, expect ".concat(DIRECTIONS.join(', '));
|
|
6245
|
+
}
|
|
6246
|
+
|
|
6247
|
+
if (['left', 'top'].includes(dir)) {
|
|
6248
|
+
children = React.Children.toArray(children).reverse();
|
|
6249
|
+
}
|
|
6250
|
+
|
|
6251
|
+
var contentRef = React.useRef();
|
|
6252
|
+
React.useEffect(function () {
|
|
6253
|
+
if (!(contentRef === null || contentRef === void 0 ? void 0 : contentRef.current)) return;
|
|
6254
|
+
var bounds = contentRef.current.getBoundingClientRect();
|
|
6255
|
+
var windowWidth = window.innerWidth;
|
|
6256
|
+
var windowHeight = window.innerHeight;
|
|
6257
|
+
|
|
6258
|
+
if (bounds.right > windowWidth) {
|
|
6259
|
+
setDir('left');
|
|
6260
|
+
return;
|
|
6261
|
+
} else {
|
|
6262
|
+
return;
|
|
6263
|
+
}
|
|
6264
|
+
|
|
6265
|
+
if (bounds.left < 0) {
|
|
6266
|
+
setDir('bottom');
|
|
6267
|
+
return;
|
|
6268
|
+
}
|
|
6269
|
+
|
|
6270
|
+
if (bounds.bottom > windowHeight) {
|
|
6271
|
+
setDir('top');
|
|
6272
|
+
return;
|
|
6273
|
+
}
|
|
6274
|
+
}, [contentRef]);
|
|
6275
|
+
return /*#__PURE__*/React__default.createElement(ListContent, {
|
|
6276
|
+
ref: contentRef,
|
|
6277
|
+
direction: dir,
|
|
6278
|
+
spaceBetween: spaceBetween,
|
|
6279
|
+
childrenQuantity: children.length
|
|
6280
|
+
}, children);
|
|
6281
|
+
};
|
|
6282
|
+
|
|
6283
|
+
ButtonList.defaultProps = {
|
|
6284
|
+
direction: 'auto',
|
|
6285
|
+
spaceBetween: '8px'
|
|
6286
|
+
};
|
|
6287
|
+
ButtonIcon.List = ButtonList;
|
|
6288
|
+
|
|
6120
6289
|
var _ref$1t = /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("clipPath", {
|
|
6121
6290
|
id: "clip-path"
|
|
6122
6291
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
@@ -6212,52 +6381,52 @@ function _templateObject5$7() {
|
|
|
6212
6381
|
return data;
|
|
6213
6382
|
}
|
|
6214
6383
|
|
|
6215
|
-
function _templateObject4$
|
|
6384
|
+
function _templateObject4$a() {
|
|
6216
6385
|
var data = taggedTemplateLiteral(["\n font-size: ", ";\n line-height: ", ";\n"]);
|
|
6217
6386
|
|
|
6218
|
-
_templateObject4$
|
|
6387
|
+
_templateObject4$a = function _templateObject4() {
|
|
6219
6388
|
return data;
|
|
6220
6389
|
};
|
|
6221
6390
|
|
|
6222
6391
|
return data;
|
|
6223
6392
|
}
|
|
6224
6393
|
|
|
6225
|
-
function _templateObject3$
|
|
6394
|
+
function _templateObject3$a() {
|
|
6226
6395
|
var data = taggedTemplateLiteral(["\n font-size: ", ";\n line-height: ", ";\n"]);
|
|
6227
6396
|
|
|
6228
|
-
_templateObject3$
|
|
6397
|
+
_templateObject3$a = function _templateObject3() {
|
|
6229
6398
|
return data;
|
|
6230
6399
|
};
|
|
6231
6400
|
|
|
6232
6401
|
return data;
|
|
6233
6402
|
}
|
|
6234
6403
|
|
|
6235
|
-
function _templateObject2$
|
|
6404
|
+
function _templateObject2$c() {
|
|
6236
6405
|
var data = taggedTemplateLiteral(["\n font-family: ", ";\n font-weight: normal;\n font-size: ", ";\n line-height: ", ";\n"]);
|
|
6237
6406
|
|
|
6238
|
-
_templateObject2$
|
|
6407
|
+
_templateObject2$c = function _templateObject2() {
|
|
6239
6408
|
return data;
|
|
6240
6409
|
};
|
|
6241
6410
|
|
|
6242
6411
|
return data;
|
|
6243
6412
|
}
|
|
6244
6413
|
|
|
6245
|
-
function _templateObject$
|
|
6414
|
+
function _templateObject$i() {
|
|
6246
6415
|
var data = taggedTemplateLiteral(["\n padding: 7px;\n border-radius: ", ";\n border-width:1px;\n border-style:solid;\n display:flex;\n align-items:center;\n position:relative;\n\n ", "\n\n svg {\n margin-right: 8px;\n display: block;\n }\n"]);
|
|
6247
6416
|
|
|
6248
|
-
_templateObject$
|
|
6417
|
+
_templateObject$i = function _templateObject() {
|
|
6249
6418
|
return data;
|
|
6250
6419
|
};
|
|
6251
6420
|
|
|
6252
6421
|
return data;
|
|
6253
6422
|
}
|
|
6254
|
-
var Div =
|
|
6423
|
+
var Div = styled__default.div(_templateObject$i(), theme.defaultRadius, function (props) {
|
|
6255
6424
|
return props.useClose && "\n padding-right: 32px;\n ";
|
|
6256
6425
|
});
|
|
6257
|
-
var Title$2 =
|
|
6258
|
-
var Content =
|
|
6259
|
-
var SmallContent =
|
|
6260
|
-
var Close =
|
|
6426
|
+
var Title$2 = styled__default.h5(_templateObject2$c(), theme.font.main, theme.font.medium.size, theme.font.big.lineHeight);
|
|
6427
|
+
var Content = styled__default.p(_templateObject3$a(), theme.font.extraSmall.size, theme.font.small.lineHeight);
|
|
6428
|
+
var SmallContent = styled__default(Content)(_templateObject4$a(), theme.font.small.size, theme.font.small.lineHeight);
|
|
6429
|
+
var Close = styled__default.button.attrs(function (props) {
|
|
6261
6430
|
return {
|
|
6262
6431
|
type: 'button'
|
|
6263
6432
|
};
|
|
@@ -6343,6 +6512,7 @@ var index = {
|
|
|
6343
6512
|
};
|
|
6344
6513
|
|
|
6345
6514
|
exports.Theme = theme;
|
|
6515
|
+
exports.ButtonIcon = ButtonIcon;
|
|
6346
6516
|
exports.Button = Exported;
|
|
6347
6517
|
exports.ButtonDropdown = Dropdown$1;
|
|
6348
6518
|
exports.ButtonGroup = ButtonGroup;
|