@doist/reactist 12.1.1 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/reactist.cjs.development.js +57 -621
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/components/color-picker/color-picker.js +4 -4
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/{dropdown → deprecated-dropdown}/dropdown.js +0 -0
- package/es/components/deprecated-dropdown/dropdown.js.map +1 -0
- package/es/components/{dropdown → deprecated-dropdown}/index.js +0 -0
- package/es/components/{checkbox → deprecated-dropdown}/index.js.map +0 -0
- package/es/components/{input → deprecated-input}/index.js +0 -0
- package/es/components/{dropdown → deprecated-input}/index.js.map +0 -0
- package/es/components/{input → deprecated-input}/input.js +0 -0
- package/es/components/deprecated-input/input.js.map +1 -0
- package/es/components/{select → deprecated-select}/index.js +0 -0
- package/es/components/{input → deprecated-select}/index.js.map +0 -0
- package/es/components/{select → deprecated-select}/select.js +0 -0
- package/es/components/deprecated-select/select.js.map +1 -0
- package/es/index.js +3 -7
- package/es/index.js.map +1 -1
- package/es/new-components/base-button/base-button.js +12 -9
- package/es/new-components/base-button/base-button.js.map +1 -1
- package/es/new-components/base-button/base-button.module.css.js +1 -1
- package/lib/components/color-picker/color-picker.js +1 -1
- package/lib/components/color-picker/color-picker.js.map +1 -1
- package/lib/components/{dropdown → deprecated-dropdown}/dropdown.d.ts +0 -0
- package/lib/components/{dropdown → deprecated-dropdown}/dropdown.js +0 -0
- package/lib/components/deprecated-dropdown/dropdown.js.map +1 -0
- package/lib/components/{dropdown → deprecated-dropdown}/dropdown.test.d.ts +0 -0
- package/lib/components/{dropdown → deprecated-dropdown}/index.d.ts +0 -0
- package/lib/components/{dropdown → deprecated-dropdown}/index.js +0 -0
- package/lib/components/{checkbox → deprecated-dropdown}/index.js.map +0 -0
- package/lib/components/{input → deprecated-input}/index.d.ts +0 -0
- package/lib/components/{input → deprecated-input}/index.js +0 -0
- package/lib/components/{dropdown → deprecated-input}/index.js.map +0 -0
- package/lib/components/{input → deprecated-input}/input.d.ts +0 -0
- package/lib/components/{input → deprecated-input}/input.js +0 -0
- package/lib/components/deprecated-input/input.js.map +1 -0
- package/lib/components/{input → deprecated-input}/input.test.d.ts +0 -0
- package/lib/components/{select → deprecated-select}/index.d.ts +0 -0
- package/lib/components/{select → deprecated-select}/index.js +0 -0
- package/lib/components/{input → deprecated-select}/index.js.map +0 -0
- package/lib/components/{select → deprecated-select}/select.d.ts +0 -0
- package/lib/components/{select → deprecated-select}/select.js +0 -0
- package/lib/components/deprecated-select/select.js.map +1 -0
- package/lib/components/{select → deprecated-select}/select.test.d.ts +0 -0
- package/lib/index.d.ts +3 -7
- package/lib/index.js +1 -1
- package/lib/new-components/base-button/base-button.d.ts +7 -4
- package/lib/new-components/base-button/base-button.js +1 -1
- package/lib/new-components/base-button/base-button.js.map +1 -1
- package/lib/new-components/base-button/base-button.module.css.js +1 -1
- package/package.json +1 -1
- package/styles/alert.css +1 -1
- package/styles/base-button.css +1 -1
- package/styles/base-button.module.css.css +1 -1
- package/styles/modal.css +1 -1
- package/styles/reactist.css +4 -8
- package/es/components/checkbox/checkbox.js +0 -24
- package/es/components/checkbox/checkbox.js.map +0 -1
- package/es/components/checkbox/index.js +0 -6
- package/es/components/deprecated-loading/deprecated-loading.js +0 -39
- package/es/components/deprecated-loading/deprecated-loading.js.map +0 -1
- package/es/components/deprecated-modal/deprecated-modal.js +0 -207
- package/es/components/deprecated-modal/deprecated-modal.js.map +0 -1
- package/es/components/deprecated-modal/index.js +0 -11
- package/es/components/deprecated-modal/index.js.map +0 -1
- package/es/components/dropdown/dropdown.js.map +0 -1
- package/es/components/input/input.js.map +0 -1
- package/es/components/popover/index.js +0 -6
- package/es/components/popover/index.js.map +0 -1
- package/es/components/popover/popover.js +0 -206
- package/es/components/popover/popover.js.map +0 -1
- package/es/components/popover/positioning-utils.js +0 -104
- package/es/components/popover/positioning-utils.js.map +0 -1
- package/es/components/select/index.js.map +0 -1
- package/es/components/select/select.js.map +0 -1
- package/lib/components/checkbox/checkbox.d.ts +0 -13
- package/lib/components/checkbox/checkbox.js +0 -2
- package/lib/components/checkbox/checkbox.js.map +0 -1
- package/lib/components/checkbox/checkbox.test.d.ts +0 -1
- package/lib/components/checkbox/index.d.ts +0 -2
- package/lib/components/checkbox/index.js +0 -2
- package/lib/components/deprecated-loading/deprecated-loading.d.ts +0 -19
- package/lib/components/deprecated-loading/deprecated-loading.js +0 -2
- package/lib/components/deprecated-loading/deprecated-loading.js.map +0 -1
- package/lib/components/deprecated-loading/deprecated-loading.test.d.ts +0 -1
- package/lib/components/deprecated-loading/index.d.ts +0 -1
- package/lib/components/deprecated-modal/deprecated-modal.d.ts +0 -88
- package/lib/components/deprecated-modal/deprecated-modal.js +0 -2
- package/lib/components/deprecated-modal/deprecated-modal.js.map +0 -1
- package/lib/components/deprecated-modal/deprecated-modal.test.d.ts +0 -1
- package/lib/components/deprecated-modal/index.d.ts +0 -10
- package/lib/components/deprecated-modal/index.js +0 -2
- package/lib/components/deprecated-modal/index.js.map +0 -1
- package/lib/components/dropdown/dropdown.js.map +0 -1
- package/lib/components/input/input.js.map +0 -1
- package/lib/components/popover/index.d.ts +0 -2
- package/lib/components/popover/index.js +0 -2
- package/lib/components/popover/index.js.map +0 -1
- package/lib/components/popover/popover.d.ts +0 -54
- package/lib/components/popover/popover.js +0 -2
- package/lib/components/popover/popover.js.map +0 -1
- package/lib/components/popover/popover.test.d.ts +0 -1
- package/lib/components/popover/positioning-utils.d.ts +0 -19
- package/lib/components/popover/positioning-utils.js +0 -2
- package/lib/components/popover/positioning-utils.js.map +0 -1
- package/lib/components/popover/positioning-utils.test.d.ts +0 -1
- package/lib/components/select/index.js.map +0 -1
- package/lib/components/select/select.js.map +0 -1
- package/styles/checkbox.css +0 -1
- package/styles/deprecated-loading.css +0 -1
- package/styles/deprecated-modal.css +0 -1
- package/styles/popover.css +0 -1
|
@@ -579,9 +579,9 @@ function Spinner({
|
|
|
579
579
|
})));
|
|
580
580
|
}
|
|
581
581
|
|
|
582
|
-
var modules_b9569bce = {"baseButton":"
|
|
582
|
+
var modules_b9569bce = {"baseButton":"a8af2163","label":"bbdb467b","shape-rounded":"ca02fc07","size-small":"_45ffe137","size-normal":"_352995bd","size-large":"_3991076f","disabled":"f82232b7","iconButton":"ef4c88db","startIcon":"a08c25c7","endIcon":"_2f6adc11","variant-primary":"_3d1243b2","variant-secondary":"_16b6b062","variant-tertiary":"cffaea5e","variant-quaternary":"_98cd5c3f","tone-destructive":"_99cb1c4d"};
|
|
583
583
|
|
|
584
|
-
const _excluded$7 = ["as", "variant", "tone", "size", "
|
|
584
|
+
const _excluded$7 = ["as", "variant", "tone", "size", "shape", "disabled", "loading", "tooltip", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "icon", "width", "align"];
|
|
585
585
|
|
|
586
586
|
function preventDefault(event) {
|
|
587
587
|
event.preventDefault();
|
|
@@ -601,10 +601,10 @@ const BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, r
|
|
|
601
601
|
variant,
|
|
602
602
|
tone = 'normal',
|
|
603
603
|
size = 'normal',
|
|
604
|
+
shape = 'normal',
|
|
604
605
|
disabled = false,
|
|
605
606
|
loading = false,
|
|
606
607
|
tooltip,
|
|
607
|
-
tooltipGapSize,
|
|
608
608
|
onClick,
|
|
609
609
|
exceptionallySetClassName,
|
|
610
610
|
children,
|
|
@@ -612,7 +612,7 @@ const BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, r
|
|
|
612
612
|
endIcon,
|
|
613
613
|
icon,
|
|
614
614
|
width = 'auto',
|
|
615
|
-
align
|
|
615
|
+
align = 'center'
|
|
616
616
|
} = _ref,
|
|
617
617
|
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
618
618
|
|
|
@@ -623,23 +623,26 @@ const BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, r
|
|
|
623
623
|
"aria-disabled": isDisabled,
|
|
624
624
|
onClick: isDisabled ? preventDefault : onClick,
|
|
625
625
|
width: icon ? undefined : width,
|
|
626
|
-
className: [exceptionallySetClassName, modules_b9569bce.baseButton, modules_b9569bce["variant-" + variant], modules_b9569bce["tone-" + tone], modules_b9569bce["size-" + size],
|
|
626
|
+
className: [exceptionallySetClassName, modules_b9569bce.baseButton, modules_b9569bce["variant-" + variant], modules_b9569bce["tone-" + tone], modules_b9569bce["size-" + size], shape === 'rounded' ? modules_b9569bce['shape-rounded'] : null, icon ? modules_b9569bce.iconButton : null, disabled ? modules_b9569bce.disabled : null]
|
|
627
627
|
}), icon ? loading && /*#__PURE__*/React.createElement(Spinner, null) || icon : /*#__PURE__*/React.createElement(React.Fragment, null, startIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
628
628
|
display: "flex",
|
|
629
629
|
className: modules_b9569bce.startIcon,
|
|
630
630
|
"aria-hidden": true
|
|
631
|
-
}, loading && !endIcon ? /*#__PURE__*/React.createElement(Spinner, null) : startIcon) : null, children ? /*#__PURE__*/React.createElement(
|
|
632
|
-
|
|
631
|
+
}, loading && !endIcon ? /*#__PURE__*/React.createElement(Spinner, null) : startIcon) : null, children ? /*#__PURE__*/React.createElement(Box, {
|
|
632
|
+
as: "span",
|
|
633
|
+
className: modules_b9569bce.label,
|
|
634
|
+
overflow: "hidden",
|
|
635
|
+
width: width === 'full' ? 'full' : undefined,
|
|
636
|
+
textAlign: width === 'auto' ? 'center' : align
|
|
633
637
|
}, children) : null, endIcon || loading && !startIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
634
638
|
display: "flex",
|
|
635
639
|
className: modules_b9569bce.endIcon,
|
|
636
640
|
"aria-hidden": true
|
|
637
641
|
}, loading ? /*#__PURE__*/React.createElement(Spinner, null) : endIcon) : null)); // If it's an icon-only button, make sure it uses the aria-label as tooltip if no tooltip was provided
|
|
638
642
|
|
|
639
|
-
const tooltipContent = icon
|
|
643
|
+
const tooltipContent = icon && tooltip === undefined ? props['aria-label'] : tooltip;
|
|
640
644
|
return tooltipContent ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
641
|
-
content: tooltipContent
|
|
642
|
-
gapSize: tooltipGapSize
|
|
645
|
+
content: tooltipContent
|
|
643
646
|
}, buttonElement) : buttonElement;
|
|
644
647
|
});
|
|
645
648
|
|
|
@@ -1967,26 +1970,6 @@ function Avatar(_ref) {
|
|
|
1967
1970
|
|
|
1968
1971
|
Avatar.displayName = 'Avatar';
|
|
1969
1972
|
|
|
1970
|
-
function Checkbox({
|
|
1971
|
-
label,
|
|
1972
|
-
disabled,
|
|
1973
|
-
checked = false,
|
|
1974
|
-
onChange
|
|
1975
|
-
}) {
|
|
1976
|
-
return /*#__PURE__*/React__default.createElement("label", {
|
|
1977
|
-
className: "reactist_checkbox"
|
|
1978
|
-
}, /*#__PURE__*/React__default.createElement("input", {
|
|
1979
|
-
className: "reactist_checkbox--input",
|
|
1980
|
-
value: label,
|
|
1981
|
-
checked: checked,
|
|
1982
|
-
disabled: disabled,
|
|
1983
|
-
onChange: disabled || !onChange ? undefined : event => onChange(event.target.checked),
|
|
1984
|
-
type: "checkbox"
|
|
1985
|
-
}), label);
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
Checkbox.displayName = 'Checkbox';
|
|
1989
|
-
|
|
1990
1973
|
const _excluded$p = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
|
|
1991
1974
|
/**
|
|
1992
1975
|
* @deprecated
|
|
@@ -2303,15 +2286,6 @@ function ColorItem({
|
|
|
2303
2286
|
|
|
2304
2287
|
ColorItem.displayName = 'ColorItem';
|
|
2305
2288
|
|
|
2306
|
-
const Input = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
2307
|
-
const className = classNames('reactist_input', props.className);
|
|
2308
|
-
return /*#__PURE__*/React__default.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2309
|
-
className: className,
|
|
2310
|
-
ref: ref
|
|
2311
|
-
}));
|
|
2312
|
-
});
|
|
2313
|
-
Input.displayName = 'Input';
|
|
2314
|
-
|
|
2315
2289
|
const _excluded$r = ["children", "className", "translateKey", "isMac"];
|
|
2316
2290
|
// Support for setting up how to translate modifiers globally.
|
|
2317
2291
|
//
|
|
@@ -2590,308 +2564,6 @@ function KeyCapturer(props) {
|
|
|
2590
2564
|
}, composingEventHandlers));
|
|
2591
2565
|
}
|
|
2592
2566
|
|
|
2593
|
-
const hasEnoughSpace = (windowDimensions, elementDimensions, wrapperDimensions, wrapperPosition, position, gap = 0) => {
|
|
2594
|
-
const {
|
|
2595
|
-
height: windowHeight,
|
|
2596
|
-
width: windowWidth
|
|
2597
|
-
} = windowDimensions;
|
|
2598
|
-
const {
|
|
2599
|
-
height: elementHeight,
|
|
2600
|
-
width: elementWidth
|
|
2601
|
-
} = elementDimensions;
|
|
2602
|
-
const {
|
|
2603
|
-
height: wrapperHeight,
|
|
2604
|
-
width: wrapperWidth
|
|
2605
|
-
} = wrapperDimensions;
|
|
2606
|
-
const {
|
|
2607
|
-
x: wrapperX,
|
|
2608
|
-
y: wrapperY
|
|
2609
|
-
} = wrapperPosition;
|
|
2610
|
-
|
|
2611
|
-
const verticalPosition = _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2612
|
-
|
|
2613
|
-
const horizontalPosition = _calculateHorizontalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2614
|
-
|
|
2615
|
-
const canPlaceVertically = verticalPosition >= 0 && verticalPosition + elementWidth <= windowWidth;
|
|
2616
|
-
const canPlaceHorizontally = horizontalPosition >= 0 && horizontalPosition + elementHeight <= windowHeight;
|
|
2617
|
-
|
|
2618
|
-
if (position === 'top') {
|
|
2619
|
-
return canPlaceVertically && wrapperY - elementHeight - gap >= 0;
|
|
2620
|
-
} else if (position === 'right') {
|
|
2621
|
-
return canPlaceHorizontally && wrapperX + wrapperWidth + elementWidth + gap <= windowWidth;
|
|
2622
|
-
} else if (position === 'left') {
|
|
2623
|
-
return canPlaceHorizontally && wrapperX - elementWidth - gap >= 0;
|
|
2624
|
-
} else if (position === 'bottom') {
|
|
2625
|
-
return canPlaceVertically && wrapperY + wrapperHeight + elementHeight + gap <= windowHeight;
|
|
2626
|
-
}
|
|
2627
|
-
|
|
2628
|
-
return false;
|
|
2629
|
-
};
|
|
2630
|
-
|
|
2631
|
-
function _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions) {
|
|
2632
|
-
return wrapperPosition.x + (wrapperDimensions.width - elementDimensions.width) / 2;
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
|
-
function _calculateHorizontalPosition(wrapperPosition, wrapperDimensions, elementDimensions) {
|
|
2636
|
-
return wrapperPosition.y + (wrapperDimensions.height - elementDimensions.height) / 2;
|
|
2637
|
-
}
|
|
2638
|
-
|
|
2639
|
-
const calculateTopCenterPosition = (wrapperDimensions, wrapperPosition, elementDimensions, gap = 0) => {
|
|
2640
|
-
const x = _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2641
|
-
|
|
2642
|
-
const y = wrapperPosition.y - elementDimensions.height - gap;
|
|
2643
|
-
return {
|
|
2644
|
-
x,
|
|
2645
|
-
y
|
|
2646
|
-
};
|
|
2647
|
-
};
|
|
2648
|
-
|
|
2649
|
-
const calculateBottomCenterPosition = (wrapperDimensions, wrapperPosition, elementDimensions, gap = 0) => {
|
|
2650
|
-
const x = _calculateVerticalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2651
|
-
|
|
2652
|
-
const y = wrapperPosition.y + wrapperDimensions.height + gap;
|
|
2653
|
-
return {
|
|
2654
|
-
x,
|
|
2655
|
-
y
|
|
2656
|
-
};
|
|
2657
|
-
};
|
|
2658
|
-
|
|
2659
|
-
const calculateRightCenterPosition = (wrapperDimensions, wrapperPosition, elementDimensions, gap = 0) => {
|
|
2660
|
-
const x = wrapperPosition.x + wrapperDimensions.width + gap;
|
|
2661
|
-
|
|
2662
|
-
const y = _calculateHorizontalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2663
|
-
|
|
2664
|
-
return {
|
|
2665
|
-
x,
|
|
2666
|
-
y
|
|
2667
|
-
};
|
|
2668
|
-
};
|
|
2669
|
-
|
|
2670
|
-
const calculateLeftCenterPosition = (wrapperDimensions, wrapperPosition, elementDimensions, gap = 0) => {
|
|
2671
|
-
const x = wrapperPosition.x - elementDimensions.width - gap;
|
|
2672
|
-
|
|
2673
|
-
const y = _calculateHorizontalPosition(wrapperPosition, wrapperDimensions, elementDimensions);
|
|
2674
|
-
|
|
2675
|
-
return {
|
|
2676
|
-
x,
|
|
2677
|
-
y
|
|
2678
|
-
};
|
|
2679
|
-
};
|
|
2680
|
-
|
|
2681
|
-
const calculatePosition = (position, wrapperDimensions, wrapperPosition, elementDimensions, gap = 0) => {
|
|
2682
|
-
if (position === 'top') {
|
|
2683
|
-
return calculateTopCenterPosition(wrapperDimensions, wrapperPosition, elementDimensions, gap);
|
|
2684
|
-
} else if (position === 'right') {
|
|
2685
|
-
return calculateRightCenterPosition(wrapperDimensions, wrapperPosition, elementDimensions, gap);
|
|
2686
|
-
} else if (position === 'bottom') {
|
|
2687
|
-
return calculateBottomCenterPosition(wrapperDimensions, wrapperPosition, elementDimensions, gap);
|
|
2688
|
-
} else if (position === 'left') {
|
|
2689
|
-
return calculateLeftCenterPosition(wrapperDimensions, wrapperPosition, elementDimensions, gap);
|
|
2690
|
-
}
|
|
2691
|
-
|
|
2692
|
-
return wrapperPosition;
|
|
2693
|
-
};
|
|
2694
|
-
|
|
2695
|
-
class Popover extends React__default.Component {
|
|
2696
|
-
constructor(...args) {
|
|
2697
|
-
super(...args);
|
|
2698
|
-
this.popover = void 0;
|
|
2699
|
-
this.wrapper = void 0;
|
|
2700
|
-
|
|
2701
|
-
this._updatePopoverPosition = () => {
|
|
2702
|
-
const {
|
|
2703
|
-
position,
|
|
2704
|
-
allowVaguePositioning,
|
|
2705
|
-
gapSize
|
|
2706
|
-
} = this.props;
|
|
2707
|
-
const wrapperRect = this.wrapper.getBoundingClientRect();
|
|
2708
|
-
const popoverRect = this.popover.getBoundingClientRect(); // Instead of using the documentElement find the nearest absolutely positioned element
|
|
2709
|
-
|
|
2710
|
-
const documentEl = document.documentElement;
|
|
2711
|
-
let node = this.wrapper;
|
|
2712
|
-
let foundParent = false;
|
|
2713
|
-
|
|
2714
|
-
while (!foundParent) {
|
|
2715
|
-
const styles = getComputedStyle(node);
|
|
2716
|
-
const position = styles.getPropertyValue('position');
|
|
2717
|
-
|
|
2718
|
-
if (position === 'absolute' || node === documentEl || !node.parentElement) {
|
|
2719
|
-
foundParent = true;
|
|
2720
|
-
} else {
|
|
2721
|
-
node = node.parentElement;
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2724
|
-
|
|
2725
|
-
const nodeRect = node.getBoundingClientRect();
|
|
2726
|
-
const windowDimensions = {
|
|
2727
|
-
height: nodeRect.height,
|
|
2728
|
-
width: nodeRect.width
|
|
2729
|
-
};
|
|
2730
|
-
const popoverDimensions = {
|
|
2731
|
-
height: popoverRect.height,
|
|
2732
|
-
width: popoverRect.width
|
|
2733
|
-
};
|
|
2734
|
-
const wrapperDimensions = {
|
|
2735
|
-
height: wrapperRect.height,
|
|
2736
|
-
width: wrapperRect.width
|
|
2737
|
-
};
|
|
2738
|
-
const wrapperPositionRelative = {
|
|
2739
|
-
x: wrapperRect.left - nodeRect.left,
|
|
2740
|
-
y: wrapperRect.top - nodeRect.top
|
|
2741
|
-
};
|
|
2742
|
-
const wrapperPositionAbsolute = {
|
|
2743
|
-
x: wrapperRect.left,
|
|
2744
|
-
y: wrapperRect.top
|
|
2745
|
-
};
|
|
2746
|
-
const positionsToTry = position === 'auto' ? ['top', 'right', 'bottom', 'left', 'top'] : position === 'vertical' ? ['top', 'bottom'] : position === 'horizontal' ? ['left', 'right'] : [position];
|
|
2747
|
-
|
|
2748
|
-
for (let index = 0; index < positionsToTry.length; index++) {
|
|
2749
|
-
const currentPosition = positionsToTry[index];
|
|
2750
|
-
const enoughSpaceAtPosition = currentPosition != null ? hasEnoughSpace(windowDimensions, popoverDimensions, wrapperDimensions, wrapperPositionRelative, currentPosition, gapSize) : false;
|
|
2751
|
-
|
|
2752
|
-
if (enoughSpaceAtPosition || index === positionsToTry.length - 1) {
|
|
2753
|
-
const popoverPosition = currentPosition != null ? calculatePosition(currentPosition, wrapperDimensions, wrapperPositionAbsolute, popoverDimensions, gapSize) : wrapperPositionAbsolute;
|
|
2754
|
-
this.popover.style.top = popoverPosition.y + "px";
|
|
2755
|
-
this.popover.style.left = popoverPosition.x + "px";
|
|
2756
|
-
/**
|
|
2757
|
-
* Correct placement if vague positioning is allowed.
|
|
2758
|
-
* When it's not allowed we "cut off" popovers and display them
|
|
2759
|
-
* out of the viewport to maintain their centered position.
|
|
2760
|
-
*/
|
|
2761
|
-
|
|
2762
|
-
if (allowVaguePositioning) {
|
|
2763
|
-
// correct horizontally
|
|
2764
|
-
if (popoverPosition.x < 0) {
|
|
2765
|
-
this.popover.style.left = 2 * gapSize + "px";
|
|
2766
|
-
} // correct vertically
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
if (popoverPosition.y + popoverDimensions.height > windowDimensions.height) {
|
|
2770
|
-
this.popover.style.top = windowDimensions.height - popoverDimensions.height - 2 * gapSize + "px";
|
|
2771
|
-
}
|
|
2772
|
-
}
|
|
2773
|
-
|
|
2774
|
-
if (currentPosition !== position) {
|
|
2775
|
-
this.popover.className = this._getClassNameForPosition(currentPosition);
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
break;
|
|
2779
|
-
}
|
|
2780
|
-
}
|
|
2781
|
-
};
|
|
2782
|
-
|
|
2783
|
-
this._getClassNameForPosition = position => {
|
|
2784
|
-
const {
|
|
2785
|
-
visible,
|
|
2786
|
-
withArrow,
|
|
2787
|
-
arrowClassName
|
|
2788
|
-
} = this.props;
|
|
2789
|
-
const className = classNames('reactist_popover', {
|
|
2790
|
-
visible
|
|
2791
|
-
});
|
|
2792
|
-
|
|
2793
|
-
if (visible && withArrow) {
|
|
2794
|
-
return classNames(className, arrowClassName, {
|
|
2795
|
-
arrow_top: position === 'bottom',
|
|
2796
|
-
arrow_right: position === 'left',
|
|
2797
|
-
arrow_bottom: position === 'auto' || position === 'top',
|
|
2798
|
-
arrow_left: position === 'right'
|
|
2799
|
-
});
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
return className;
|
|
2803
|
-
};
|
|
2804
|
-
|
|
2805
|
-
this._updatePopoverRef = popover => {
|
|
2806
|
-
this.popover = popover;
|
|
2807
|
-
|
|
2808
|
-
if (typeof this.props.popoverRef === 'function') {
|
|
2809
|
-
this.props.popoverRef(popover);
|
|
2810
|
-
}
|
|
2811
|
-
};
|
|
2812
|
-
|
|
2813
|
-
this._updateWrapperRef = wrapper => {
|
|
2814
|
-
this.wrapper = wrapper;
|
|
2815
|
-
|
|
2816
|
-
if (typeof this.props.wrapperRef === 'function') {
|
|
2817
|
-
this.props.wrapperRef(wrapper);
|
|
2818
|
-
}
|
|
2819
|
-
};
|
|
2820
|
-
}
|
|
2821
|
-
|
|
2822
|
-
componentDidMount() {
|
|
2823
|
-
if (this.props.visible) {
|
|
2824
|
-
this._updatePopoverPosition();
|
|
2825
|
-
}
|
|
2826
|
-
}
|
|
2827
|
-
|
|
2828
|
-
componentDidUpdate(prevProps) {
|
|
2829
|
-
if (this.wrapper && this.props.visible) {
|
|
2830
|
-
const positionChanged = prevProps.position !== this.props.position;
|
|
2831
|
-
const vaguePositioningChanged = prevProps.allowVaguePositioning !== this.props.allowVaguePositioning;
|
|
2832
|
-
const visibilityChanged = prevProps.visible !== this.props.visible;
|
|
2833
|
-
const arrowChanged = prevProps.withArrow !== this.props.withArrow;
|
|
2834
|
-
const gapSizeChanged = prevProps.gapSize !== this.props.gapSize;
|
|
2835
|
-
const contentChanged = prevProps.content !== this.props.content;
|
|
2836
|
-
|
|
2837
|
-
if (positionChanged || vaguePositioningChanged || visibilityChanged || arrowChanged || gapSizeChanged || contentChanged) {
|
|
2838
|
-
this._updatePopoverPosition();
|
|
2839
|
-
}
|
|
2840
|
-
}
|
|
2841
|
-
}
|
|
2842
|
-
|
|
2843
|
-
render() {
|
|
2844
|
-
const {
|
|
2845
|
-
position,
|
|
2846
|
-
wrapperClassName,
|
|
2847
|
-
popoverClassName,
|
|
2848
|
-
onMouseEnter,
|
|
2849
|
-
onMouseLeave,
|
|
2850
|
-
onClick,
|
|
2851
|
-
trigger,
|
|
2852
|
-
content
|
|
2853
|
-
} = this.props;
|
|
2854
|
-
const popoverClass = position ? this._getClassNameForPosition(position) : '';
|
|
2855
|
-
const popoverContentClass = classNames('reactist_popover__content', popoverClassName);
|
|
2856
|
-
const wrapperClass = classNames('reactist_popover__wrapper', wrapperClassName);
|
|
2857
|
-
const triggerElement = React__default.Children.only(trigger);
|
|
2858
|
-
|
|
2859
|
-
function handleTriggerClick(event) {
|
|
2860
|
-
// @ts-expect-error This is temporary while we revisit the Popover interface
|
|
2861
|
-
if (onClick) onClick(event); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
2862
|
-
|
|
2863
|
-
if (typeof triggerElement.props.onClick === 'function') {
|
|
2864
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call
|
|
2865
|
-
triggerElement.props.onClick(event);
|
|
2866
|
-
}
|
|
2867
|
-
}
|
|
2868
|
-
|
|
2869
|
-
return /*#__PURE__*/React__default.createElement("span", {
|
|
2870
|
-
className: wrapperClass,
|
|
2871
|
-
onMouseEnter: onMouseEnter,
|
|
2872
|
-
onMouseLeave: onMouseLeave,
|
|
2873
|
-
ref: this._updateWrapperRef
|
|
2874
|
-
}, /*#__PURE__*/React__default.cloneElement(triggerElement, {
|
|
2875
|
-
onClick: handleTriggerClick
|
|
2876
|
-
}), /*#__PURE__*/React__default.createElement("span", {
|
|
2877
|
-
className: popoverClass,
|
|
2878
|
-
ref: this._updatePopoverRef
|
|
2879
|
-
}, this.props.visible ? /*#__PURE__*/React__default.createElement("span", {
|
|
2880
|
-
className: popoverContentClass
|
|
2881
|
-
}, typeof content === 'function' ? content() : content) : null));
|
|
2882
|
-
}
|
|
2883
|
-
|
|
2884
|
-
}
|
|
2885
|
-
|
|
2886
|
-
Popover.displayName = void 0;
|
|
2887
|
-
Popover.defaultProps = void 0;
|
|
2888
|
-
Popover.displayName = 'Popover';
|
|
2889
|
-
Popover.defaultProps = {
|
|
2890
|
-
position: 'auto',
|
|
2891
|
-
gapSize: 5 // default size of the arrow (see `tooltip.less`)
|
|
2892
|
-
|
|
2893
|
-
};
|
|
2894
|
-
|
|
2895
2567
|
function ProgressBar({
|
|
2896
2568
|
fillPercentage = 0,
|
|
2897
2569
|
className,
|
|
@@ -2915,41 +2587,6 @@ function ProgressBar({
|
|
|
2915
2587
|
|
|
2916
2588
|
ProgressBar.displayName = 'ProgressBar';
|
|
2917
2589
|
|
|
2918
|
-
const _excluded$s = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
|
|
2919
|
-
|
|
2920
|
-
function Select(_ref) {
|
|
2921
|
-
let {
|
|
2922
|
-
value,
|
|
2923
|
-
options = [],
|
|
2924
|
-
onChange,
|
|
2925
|
-
disabled = true,
|
|
2926
|
-
className = '',
|
|
2927
|
-
defaultValue
|
|
2928
|
-
} = _ref,
|
|
2929
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$s);
|
|
2930
|
-
|
|
2931
|
-
const selectClassName = classNames('reactist_select', {
|
|
2932
|
-
disabled
|
|
2933
|
-
}, className);
|
|
2934
|
-
return /*#__PURE__*/React__default.createElement("select", _objectSpread2({
|
|
2935
|
-
className: selectClassName,
|
|
2936
|
-
value: value,
|
|
2937
|
-
onChange: event => onChange ? onChange(event.target.value) : undefined,
|
|
2938
|
-
disabled: disabled,
|
|
2939
|
-
defaultValue: defaultValue
|
|
2940
|
-
}, otherProps), options == null ? void 0 : options.map(option => /*#__PURE__*/React__default.createElement("option", {
|
|
2941
|
-
key: option.key || option.value,
|
|
2942
|
-
value: option.value,
|
|
2943
|
-
disabled: option.disabled
|
|
2944
|
-
}, option.text)));
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
Select.displayName = 'Select';
|
|
2948
|
-
Select.defaultProps = {
|
|
2949
|
-
options: [],
|
|
2950
|
-
disabled: false
|
|
2951
|
-
};
|
|
2952
|
-
|
|
2953
2590
|
dayjs.extend(LocalizedFormat);
|
|
2954
2591
|
const TimeUtils = {
|
|
2955
2592
|
SHORT_FORMAT_CURRENT_YEAR: 'L',
|
|
@@ -3147,7 +2784,7 @@ const CloseIcon$1 = () => /*#__PURE__*/React__default.createElement("svg", {
|
|
|
3147
2784
|
d: "M11.293 12L5.146 5.854a.5.5 0 1 1 .708-.708L12 11.293l6.146-6.147a.5.5 0 0 1 .708.708L12.707 12l6.147 6.146a.5.5 0 0 1-.708.708L12 12.707l-6.146 6.147a.5.5 0 0 1-.708-.708L11.293 12z"
|
|
3148
2785
|
}));
|
|
3149
2786
|
|
|
3150
|
-
const _excluded$
|
|
2787
|
+
const _excluded$s = ["id", "icon", "title", "subtitle", "children", "customCloseButton", "onClick", "onClose", "closeAltText", "className", "aria-live"];
|
|
3151
2788
|
|
|
3152
2789
|
function Notification(_ref) {
|
|
3153
2790
|
let {
|
|
@@ -3163,7 +2800,7 @@ function Notification(_ref) {
|
|
|
3163
2800
|
className,
|
|
3164
2801
|
'aria-live': ariaLive = 'polite'
|
|
3165
2802
|
} = _ref,
|
|
3166
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
2803
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
3167
2804
|
|
|
3168
2805
|
const titleId = title ? id + "-title" : null;
|
|
3169
2806
|
const titleIdAttribute = titleId ? {
|
|
@@ -3213,7 +2850,7 @@ function Notification(_ref) {
|
|
|
3213
2850
|
}, customCloseButton != null ? customCloseButton : /*#__PURE__*/React__default.createElement(CloseIcon$1, null)) : null);
|
|
3214
2851
|
}
|
|
3215
2852
|
|
|
3216
|
-
const _excluded$
|
|
2853
|
+
const _excluded$t = ["children", "onItemSelect"],
|
|
3217
2854
|
_excluded2$3 = ["exceptionallySetClassName"],
|
|
3218
2855
|
_excluded3$2 = ["exceptionallySetClassName"],
|
|
3219
2856
|
_excluded4$1 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName", "as"],
|
|
@@ -3235,7 +2872,7 @@ function Menu(_ref) {
|
|
|
3235
2872
|
children,
|
|
3236
2873
|
onItemSelect
|
|
3237
2874
|
} = _ref,
|
|
3238
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2875
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
3239
2876
|
|
|
3240
2877
|
const state = Ariakit.useMenuState(_objectSpread2({
|
|
3241
2878
|
focusLoop: true,
|
|
@@ -3411,268 +3048,69 @@ const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref5, re
|
|
|
3411
3048
|
}, label) : null, children);
|
|
3412
3049
|
});
|
|
3413
3050
|
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
const modalElement = document.getElementById('modal_box');
|
|
3423
|
-
ReactDOM.unmountComponentAtNode(modalElement);
|
|
3424
|
-
};
|
|
3425
|
-
|
|
3426
|
-
this._handleKeyDown = event => {
|
|
3427
|
-
if (event.keyCode === 27) {
|
|
3428
|
-
// ESC
|
|
3429
|
-
this._closeModal();
|
|
3430
|
-
|
|
3431
|
-
if (event.preventDefault) event.preventDefault();
|
|
3432
|
-
}
|
|
3433
|
-
};
|
|
3434
|
-
|
|
3435
|
-
this._handleOverlayClick = event => {
|
|
3436
|
-
if (event.target instanceof Element && (event.target.id === 'reactist-overlay' || event.target.id === 'reactist-overlay-inner')) {
|
|
3437
|
-
this._closeModal();
|
|
3438
|
-
}
|
|
3439
|
-
};
|
|
3440
|
-
}
|
|
3441
|
-
|
|
3442
|
-
componentDidMount() {
|
|
3443
|
-
window.addEventListener('keydown', this._handleKeyDown);
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
|
-
componentWillUnmount() {
|
|
3447
|
-
window.removeEventListener('keydown', this._handleKeyDown);
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
render() {
|
|
3451
|
-
const {
|
|
3452
|
-
large,
|
|
3453
|
-
medium,
|
|
3454
|
-
style,
|
|
3455
|
-
children,
|
|
3456
|
-
closeOnOverlayClick
|
|
3457
|
-
} = this.props;
|
|
3458
|
-
const className = classNames('reactist_modal_box', {
|
|
3459
|
-
large,
|
|
3460
|
-
medium
|
|
3461
|
-
}, this.props.className);
|
|
3462
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
3463
|
-
className: "reactist_overlay",
|
|
3464
|
-
id: "reactist-overlay",
|
|
3465
|
-
onClick: closeOnOverlayClick ? this._handleOverlayClick : undefined
|
|
3466
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3467
|
-
className: "reactist_overlay_inner",
|
|
3468
|
-
id: "reactist-overlay-inner"
|
|
3469
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3470
|
-
style: style,
|
|
3471
|
-
className: className
|
|
3472
|
-
}, children)));
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
|
-
}
|
|
3476
|
-
|
|
3477
|
-
Box$2.displayName = void 0;
|
|
3478
|
-
Box$2.defaultProps = void 0;
|
|
3479
|
-
Box$2.displayName = 'Modal.Box';
|
|
3480
|
-
Box$2.defaultProps = {
|
|
3481
|
-
large: false,
|
|
3482
|
-
closeOnOverlayClick: false
|
|
3483
|
-
};
|
|
3484
|
-
/** @deprecated */
|
|
3485
|
-
|
|
3486
|
-
class Header extends React__default.Component {
|
|
3487
|
-
_closeModal(event) {
|
|
3488
|
-
event.preventDefault();
|
|
3489
|
-
|
|
3490
|
-
if (typeof this.props.beforeClose === 'function') {
|
|
3491
|
-
this.props.beforeClose();
|
|
3492
|
-
} // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
const modalElement = document.getElementById('modal_box');
|
|
3496
|
-
ReactDOM.unmountComponentAtNode(modalElement);
|
|
3497
|
-
}
|
|
3498
|
-
|
|
3499
|
-
render() {
|
|
3500
|
-
return (
|
|
3501
|
-
/*#__PURE__*/
|
|
3502
|
-
|
|
3503
|
-
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
3504
|
-
React__default.createElement("div", {
|
|
3505
|
-
className: "reactist_modal_box__header"
|
|
3506
|
-
}, /*#__PURE__*/React__default.createElement("p", null, this.props.title && /*#__PURE__*/React__default.createElement("span", {
|
|
3507
|
-
className: "title"
|
|
3508
|
-
}, this.props.title), this.props.subtitle && /*#__PURE__*/React__default.createElement("span", {
|
|
3509
|
-
className: "subtitle"
|
|
3510
|
-
}, this.props.subtitle), this.props.children), /*#__PURE__*/React__default.createElement("a", {
|
|
3511
|
-
className: "close",
|
|
3512
|
-
onClick: this._closeModal.bind(this),
|
|
3513
|
-
href: "#"
|
|
3514
|
-
}, /*#__PURE__*/React__default.createElement(CloseIcon$1, null)))
|
|
3515
|
-
/* eslint-enable jsx-a11y/anchor-is-valid */
|
|
3516
|
-
|
|
3517
|
-
);
|
|
3518
|
-
}
|
|
3519
|
-
|
|
3520
|
-
}
|
|
3521
|
-
|
|
3522
|
-
Header.displayName = void 0;
|
|
3523
|
-
Header.defaultProps = void 0;
|
|
3524
|
-
Header.displayName = 'Modal.Header';
|
|
3525
|
-
/** @deprecated */
|
|
3526
|
-
|
|
3527
|
-
class Body$1 extends React__default.Component {
|
|
3528
|
-
_closeModal(event) {
|
|
3529
|
-
event.preventDefault(); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3530
|
-
|
|
3531
|
-
const modalElement = document.getElementById('modal_box');
|
|
3532
|
-
ReactDOM.unmountComponentAtNode(modalElement);
|
|
3533
|
-
}
|
|
3534
|
-
|
|
3535
|
-
render() {
|
|
3536
|
-
const {
|
|
3537
|
-
icon,
|
|
3538
|
-
plain,
|
|
3539
|
-
children,
|
|
3540
|
-
style,
|
|
3541
|
-
showCloseIcon
|
|
3542
|
-
} = this.props;
|
|
3543
|
-
const className = classNames('reactist_modal_box__body', {
|
|
3544
|
-
plain
|
|
3545
|
-
}, this.props.className);
|
|
3546
|
-
return (
|
|
3547
|
-
/*#__PURE__*/
|
|
3548
|
-
|
|
3549
|
-
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
3550
|
-
React__default.createElement("div", {
|
|
3551
|
-
className: className,
|
|
3552
|
-
style: style
|
|
3553
|
-
}, showCloseIcon && /*#__PURE__*/React__default.createElement("a", {
|
|
3554
|
-
className: "close",
|
|
3555
|
-
onClick: this._closeModal.bind(this),
|
|
3556
|
-
href: "#"
|
|
3557
|
-
}, /*#__PURE__*/React__default.createElement(CloseIcon$1, null)), icon ? /*#__PURE__*/React__default.createElement("div", {
|
|
3558
|
-
className: "dialog"
|
|
3559
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
3560
|
-
className: "reactist_icon"
|
|
3561
|
-
}, icon), /*#__PURE__*/React__default.createElement("div", {
|
|
3562
|
-
className: "content"
|
|
3563
|
-
}, children)) : children)
|
|
3564
|
-
/* eslint-enable jsx-a11y/anchor-is-valid */
|
|
3565
|
-
|
|
3566
|
-
);
|
|
3567
|
-
}
|
|
3568
|
-
|
|
3569
|
-
}
|
|
3570
|
-
|
|
3571
|
-
Body$1.displayName = void 0;
|
|
3572
|
-
Body$1.defaultProps = void 0;
|
|
3573
|
-
Body$1.displayName = 'Modal.Body';
|
|
3574
|
-
Body$1.defaultProps = {
|
|
3575
|
-
showCloseIcon: false
|
|
3576
|
-
};
|
|
3577
|
-
/** @deprecated */
|
|
3578
|
-
|
|
3579
|
-
class Actions extends React__default.Component {
|
|
3580
|
-
_onClick(onClick) {
|
|
3581
|
-
if (onClick) {
|
|
3582
|
-
onClick();
|
|
3583
|
-
} // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3584
|
-
|
|
3051
|
+
const Input = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
3052
|
+
const className = classNames('reactist_input', props.className);
|
|
3053
|
+
return /*#__PURE__*/React__default.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
3054
|
+
className: className,
|
|
3055
|
+
ref: ref
|
|
3056
|
+
}));
|
|
3057
|
+
});
|
|
3058
|
+
Input.displayName = 'Input';
|
|
3585
3059
|
|
|
3586
|
-
|
|
3587
|
-
ReactDOM.unmountComponentAtNode(modalElement);
|
|
3588
|
-
}
|
|
3060
|
+
const _excluded$u = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
|
|
3589
3061
|
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
} else {
|
|
3601
|
-
return child ? /*#__PURE__*/React__default.cloneElement(child) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
3602
|
-
}
|
|
3603
|
-
});
|
|
3604
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
3605
|
-
className: "reactist_modal_box__actions"
|
|
3606
|
-
}, children);
|
|
3607
|
-
}
|
|
3062
|
+
function Select(_ref) {
|
|
3063
|
+
let {
|
|
3064
|
+
value,
|
|
3065
|
+
options = [],
|
|
3066
|
+
onChange,
|
|
3067
|
+
disabled = true,
|
|
3068
|
+
className = '',
|
|
3069
|
+
defaultValue
|
|
3070
|
+
} = _ref,
|
|
3071
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$u);
|
|
3608
3072
|
|
|
3073
|
+
const selectClassName = classNames('reactist_select', {
|
|
3074
|
+
disabled
|
|
3075
|
+
}, className);
|
|
3076
|
+
return /*#__PURE__*/React__default.createElement("select", _objectSpread2({
|
|
3077
|
+
className: selectClassName,
|
|
3078
|
+
value: value,
|
|
3079
|
+
onChange: event => onChange ? onChange(event.target.value) : undefined,
|
|
3080
|
+
disabled: disabled,
|
|
3081
|
+
defaultValue: defaultValue
|
|
3082
|
+
}, otherProps), options == null ? void 0 : options.map(option => /*#__PURE__*/React__default.createElement("option", {
|
|
3083
|
+
key: option.key || option.value,
|
|
3084
|
+
value: option.value,
|
|
3085
|
+
disabled: option.disabled
|
|
3086
|
+
}, option.text)));
|
|
3609
3087
|
}
|
|
3610
3088
|
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
Box: Box$2,
|
|
3616
|
-
Header,
|
|
3617
|
-
Body: Body$1,
|
|
3618
|
-
Actions
|
|
3089
|
+
Select.displayName = 'Select';
|
|
3090
|
+
Select.defaultProps = {
|
|
3091
|
+
options: [],
|
|
3092
|
+
disabled: false
|
|
3619
3093
|
};
|
|
3620
3094
|
|
|
3621
|
-
/** @deprecated */
|
|
3622
|
-
|
|
3623
|
-
function Loading$1({
|
|
3624
|
-
className,
|
|
3625
|
-
spinnerColor = '#3F82EF',
|
|
3626
|
-
bgColor = '#D9E6FB',
|
|
3627
|
-
size = 24,
|
|
3628
|
-
'aria-label': ariaLabel = 'Loading'
|
|
3629
|
-
}) {
|
|
3630
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
3631
|
-
className: classNames('reactist_loading', className),
|
|
3632
|
-
"aria-label": ariaLabel,
|
|
3633
|
-
"aria-live": "assertive",
|
|
3634
|
-
role: "alert"
|
|
3635
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
3636
|
-
className: "reactist_loading--spinner"
|
|
3637
|
-
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
3638
|
-
width: size,
|
|
3639
|
-
height: size,
|
|
3640
|
-
viewBox: '0 0 24 24'
|
|
3641
|
-
}, /*#__PURE__*/React__default.createElement("g", {
|
|
3642
|
-
fill: "none",
|
|
3643
|
-
fillRule: "nonzero"
|
|
3644
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
3645
|
-
fill: spinnerColor,
|
|
3646
|
-
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
3647
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
3648
|
-
fill: bgColor,
|
|
3649
|
-
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
3650
|
-
})))));
|
|
3651
|
-
}
|
|
3652
|
-
|
|
3653
|
-
Loading$1.displayName = 'Loading';
|
|
3654
|
-
|
|
3655
3095
|
exports.Alert = Alert;
|
|
3656
3096
|
exports.Avatar = Avatar;
|
|
3657
3097
|
exports.Box = Box;
|
|
3658
3098
|
exports.Button = Button;
|
|
3659
3099
|
exports.ButtonLink = ButtonLink;
|
|
3660
3100
|
exports.COLORS = COLORS;
|
|
3661
|
-
exports.Checkbox = Checkbox;
|
|
3662
3101
|
exports.CheckboxField = CheckboxField;
|
|
3663
3102
|
exports.ColorPicker = ColorPicker;
|
|
3664
3103
|
exports.Column = Column;
|
|
3665
3104
|
exports.Columns = Columns;
|
|
3666
3105
|
exports.DeprecatedButton = Button$1;
|
|
3667
|
-
exports.
|
|
3668
|
-
exports.
|
|
3106
|
+
exports.DeprecatedDropdown = Dropdown;
|
|
3107
|
+
exports.DeprecatedInput = Input;
|
|
3108
|
+
exports.DeprecatedSelect = Select;
|
|
3669
3109
|
exports.Divider = Divider;
|
|
3670
|
-
exports.Dropdown = Dropdown;
|
|
3671
3110
|
exports.Heading = Heading;
|
|
3672
3111
|
exports.Hidden = Hidden;
|
|
3673
3112
|
exports.HiddenVisually = HiddenVisually;
|
|
3674
3113
|
exports.Inline = Inline;
|
|
3675
|
-
exports.Input = Input;
|
|
3676
3114
|
exports.KeyCapturer = KeyCapturer;
|
|
3677
3115
|
exports.KeyboardShortcut = KeyboardShortcut;
|
|
3678
3116
|
exports.Loading = Loading;
|
|
@@ -3690,10 +3128,8 @@ exports.ModalHeader = ModalHeader;
|
|
|
3690
3128
|
exports.Notice = Notice;
|
|
3691
3129
|
exports.Notification = Notification;
|
|
3692
3130
|
exports.PasswordField = PasswordField;
|
|
3693
|
-
exports.Popover = Popover;
|
|
3694
3131
|
exports.ProgressBar = ProgressBar;
|
|
3695
3132
|
exports.SUPPORTED_KEYS = SUPPORTED_KEYS;
|
|
3696
|
-
exports.Select = Select;
|
|
3697
3133
|
exports.SelectField = SelectField;
|
|
3698
3134
|
exports.Stack = Stack;
|
|
3699
3135
|
exports.SubMenu = SubMenu;
|