@majoo-ui/react 1.55.15 → 1.55.17
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/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('@stitches/react'), require('@majoo-ui/core'), require('@majoo-ui/icons'), require('react-transition-group'), require('react/jsx-runtime'), require('@majoo-ui/helpers'), require('react-i18next'), require('moment'), require('@radix-ui/react-avatar'), require('@radix-ui/react-tooltip'), require('@radix-ui/react-progress'), require('@radix-ui/react-label'), require('@radix-ui/react-checkbox'), require('@radix-ui/react-radio-group'), require('react-number-format'), require('@radix-ui/react-switch'), require('downshift'), require('react-infinite-scroller'), require('lodash.debounce'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', 'prop-types', '@stitches/react', '@majoo-ui/core', '@majoo-ui/icons', 'react-transition-group', 'react/jsx-runtime', '@majoo-ui/helpers', 'react-i18next', 'moment', '@radix-ui/react-avatar', '@radix-ui/react-tooltip', '@radix-ui/react-progress', '@radix-ui/react-label', '@radix-ui/react-checkbox', '@radix-ui/react-radio-group', 'react-number-format', '@radix-ui/react-switch', 'downshift', 'react-infinite-scroller', 'lodash.debounce', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.PropTypes, global.react, global.core, global.icons, global.reactTransitionGroup, global.jsxRuntime, global.helpers, global.reactI18next, global.moment, global.AvatarPrimitive, global.TooltipPrimitive, global.ProgressPrimitive, global.LabelPrimitive, global.CheckboxPrimitive, global.RadioGroupPrimitive, global.NumberFormat, global.SwitchPrimitive, global.Downshift, global.InfiniteScroll, global.debounce, global.
|
|
5
|
-
})(this, (function (exports, React, PropTypes, react, core, icons, reactTransitionGroup, jsxRuntime, helpers, reactI18next, moment, AvatarPrimitive, TooltipPrimitive, ProgressPrimitive, LabelPrimitive, CheckboxPrimitive, RadioGroupPrimitive, NumberFormat, SwitchPrimitive, Downshift, InfiniteScroll, debounce,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('@stitches/react'), require('@majoo-ui/core'), require('@majoo-ui/icons'), require('react-transition-group'), require('react/jsx-runtime'), require('@majoo-ui/helpers'), require('react-i18next'), require('moment'), require('@radix-ui/react-avatar'), require('@radix-ui/react-tooltip'), require('@radix-ui/react-progress'), require('@radix-ui/react-label'), require('@radix-ui/react-checkbox'), require('@radix-ui/react-radio-group'), require('react-number-format'), require('@radix-ui/react-switch'), require('downshift'), require('react-infinite-scroller'), require('lodash.debounce'), require('@floating-ui/react-dom-interactions'), require('otp-input-react'), require('@radix-ui/react-slider'), require('@radix-ui/react-tabs'), require('@radix-ui/react-separator'), require('@radix-ui/react-toggle-group'), require('@radix-ui/react-dialog'), require('@radix-ui/react-accordion'), require('dayzed'), require('react-table'), require('react-dom'), require('@radix-ui/react-alert-dialog'), require('@radix-ui/react-dropdown-menu'), require('@radix-ui/react-aspect-ratio'), require('react-color/lib/components/common'), require('react-color/lib/helpers/color'), require('react-step-wizard'), require('@react-google-maps/api'), require('superagent'), require('recharts'), require('draft-js'), require('react-draft-wysiwyg'), require('react-contextmenu'), require('react-loading-skeleton'), require('react-loading-skeleton/dist/skeleton.css'), require('react-ui-scrollspy'), require('react-image-crop'), require('browser-image-compression'), require('react-table-sticky')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', 'prop-types', '@stitches/react', '@majoo-ui/core', '@majoo-ui/icons', 'react-transition-group', 'react/jsx-runtime', '@majoo-ui/helpers', 'react-i18next', 'moment', '@radix-ui/react-avatar', '@radix-ui/react-tooltip', '@radix-ui/react-progress', '@radix-ui/react-label', '@radix-ui/react-checkbox', '@radix-ui/react-radio-group', 'react-number-format', '@radix-ui/react-switch', 'downshift', 'react-infinite-scroller', 'lodash.debounce', '@floating-ui/react-dom-interactions', 'otp-input-react', '@radix-ui/react-slider', '@radix-ui/react-tabs', '@radix-ui/react-separator', '@radix-ui/react-toggle-group', '@radix-ui/react-dialog', '@radix-ui/react-accordion', 'dayzed', 'react-table', 'react-dom', '@radix-ui/react-alert-dialog', '@radix-ui/react-dropdown-menu', '@radix-ui/react-aspect-ratio', 'react-color/lib/components/common', 'react-color/lib/helpers/color', 'react-step-wizard', '@react-google-maps/api', 'superagent', 'recharts', 'draft-js', 'react-draft-wysiwyg', 'react-contextmenu', 'react-loading-skeleton', 'react-loading-skeleton/dist/skeleton.css', 'react-ui-scrollspy', 'react-image-crop', 'browser-image-compression', 'react-table-sticky'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.PropTypes, global.react, global.core, global.icons, global.reactTransitionGroup, global.jsxRuntime, global.helpers, global.reactI18next, global.moment, global.AvatarPrimitive, global.TooltipPrimitive, global.ProgressPrimitive, global.LabelPrimitive, global.CheckboxPrimitive, global.RadioGroupPrimitive, global.NumberFormat, global.SwitchPrimitive, global.Downshift, global.InfiniteScroll, global.debounce, global.reactDomInteractions, global.OTPInput, global.SliderPrimitive, global.TabsPrimitive, global.SeparatorPrimitive, global.ToggleGroupPrimitive, global.DialogPrimitive, global.AccordionPrimitive, global.dayzed, global.reactTable, global.ReactDOM, global.ADialog, global.DropdownMenuPrimitive, global.AspectRatioPrimitive, global.common, global.color, global.StepWizard$1, global.api, global.request, global.recharts, global.draftJs, global.reactDraftWysiwyg, global.reactContextmenu, global.ReactSkeleton, null, global.ScrollSpy, global.ReactCrop, global.imageCompressionComponent, global.reactTableSticky));
|
|
5
|
+
})(this, (function (exports, React, PropTypes, react, core, icons, reactTransitionGroup, jsxRuntime, helpers, reactI18next, moment, AvatarPrimitive, TooltipPrimitive, ProgressPrimitive, LabelPrimitive, CheckboxPrimitive, RadioGroupPrimitive, NumberFormat, SwitchPrimitive, Downshift, InfiniteScroll, debounce, reactDomInteractions, OTPInput, SliderPrimitive, TabsPrimitive, SeparatorPrimitive, ToggleGroupPrimitive, DialogPrimitive, AccordionPrimitive, dayzed, reactTable, ReactDOM, ADialog, DropdownMenuPrimitive, AspectRatioPrimitive, common, color, StepWizard$1, api, request, recharts, draftJs, reactDraftWysiwyg, reactContextmenu, ReactSkeleton, skeleton_css, ScrollSpy, ReactCrop, imageCompressionComponent, reactTableSticky) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -2818,7 +2818,7 @@
|
|
|
2818
2818
|
fontWeight: '600'
|
|
2819
2819
|
},
|
|
2820
2820
|
pageTitle: {
|
|
2821
|
-
fontSize: '$page-title',
|
|
2821
|
+
fontSize: '$page-title-2',
|
|
2822
2822
|
lineHeight: '$page-title',
|
|
2823
2823
|
letterSpacing: '$page-title',
|
|
2824
2824
|
fontWeight: '600'
|
|
@@ -2854,7 +2854,7 @@
|
|
|
2854
2854
|
color: 'primary',
|
|
2855
2855
|
heading: 'h1'
|
|
2856
2856
|
};
|
|
2857
|
-
Heading.displayName =
|
|
2857
|
+
Heading.displayName = 'Heading';
|
|
2858
2858
|
|
|
2859
2859
|
const Paragraph = styled(Text$1, {
|
|
2860
2860
|
variants: {
|
|
@@ -5439,7 +5439,7 @@
|
|
|
5439
5439
|
color: "disable",
|
|
5440
5440
|
css: {
|
|
5441
5441
|
alignSelf: 'end',
|
|
5442
|
-
marginBottom: '$spacing-03'
|
|
5442
|
+
marginBottom: '$spacing-03 !important'
|
|
5443
5443
|
},
|
|
5444
5444
|
__self: undefined,
|
|
5445
5445
|
__source: {
|
|
@@ -6708,6 +6708,10 @@
|
|
|
6708
6708
|
}
|
|
6709
6709
|
}]
|
|
6710
6710
|
});
|
|
6711
|
+
const ContainerLabel = styled('label', {
|
|
6712
|
+
width: 'fit-content',
|
|
6713
|
+
cursor: 'pointer'
|
|
6714
|
+
});
|
|
6711
6715
|
const InputRadio = _ref => {
|
|
6712
6716
|
let {
|
|
6713
6717
|
id,
|
|
@@ -6719,28 +6723,38 @@
|
|
|
6719
6723
|
readOnly
|
|
6720
6724
|
} = _ref,
|
|
6721
6725
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
6722
|
-
function renderInputType(type,
|
|
6726
|
+
function renderInputType(type, checkedValue, onValueChange) {
|
|
6723
6727
|
switch (type) {
|
|
6724
6728
|
case 'number':
|
|
6725
6729
|
return /*#__PURE__*/React__default["default"].createElement(InputNumber, _extends({}, inputProps, {
|
|
6726
|
-
readOnly: readOnly
|
|
6730
|
+
readOnly: readOnly,
|
|
6731
|
+
onFocus: () => {
|
|
6732
|
+
var _inputProps$onFocus;
|
|
6733
|
+
onValueChange(props.value);
|
|
6734
|
+
inputProps === null || inputProps === void 0 ? void 0 : (_inputProps$onFocus = inputProps.onFocus) === null || _inputProps$onFocus === void 0 ? void 0 : _inputProps$onFocus.call(inputProps);
|
|
6735
|
+
},
|
|
6727
6736
|
asChild: true,
|
|
6728
6737
|
__self: this,
|
|
6729
6738
|
__source: {
|
|
6730
6739
|
fileName: _jsxFileName$G,
|
|
6731
|
-
lineNumber:
|
|
6732
|
-
columnNumber:
|
|
6740
|
+
lineNumber: 162,
|
|
6741
|
+
columnNumber: 11
|
|
6733
6742
|
}
|
|
6734
6743
|
}));
|
|
6735
6744
|
case 'text':
|
|
6736
6745
|
return /*#__PURE__*/React__default["default"].createElement(InputText, _extends({}, inputProps, {
|
|
6737
|
-
disabled: disabled
|
|
6738
|
-
readOnly: readOnly
|
|
6746
|
+
disabled: disabled,
|
|
6747
|
+
readOnly: readOnly,
|
|
6748
|
+
onFocus: () => {
|
|
6749
|
+
var _inputProps$onFocus2;
|
|
6750
|
+
onValueChange(props.value);
|
|
6751
|
+
inputProps === null || inputProps === void 0 ? void 0 : (_inputProps$onFocus2 = inputProps.onFocus) === null || _inputProps$onFocus2 === void 0 ? void 0 : _inputProps$onFocus2.call(inputProps);
|
|
6752
|
+
},
|
|
6739
6753
|
asChild: true,
|
|
6740
6754
|
__self: this,
|
|
6741
6755
|
__source: {
|
|
6742
6756
|
fileName: _jsxFileName$G,
|
|
6743
|
-
lineNumber:
|
|
6757
|
+
lineNumber: 175,
|
|
6744
6758
|
columnNumber: 11
|
|
6745
6759
|
}
|
|
6746
6760
|
}));
|
|
@@ -6754,12 +6768,12 @@
|
|
|
6754
6768
|
letterSpacing: '$long-content-regular',
|
|
6755
6769
|
fontWeight: '400',
|
|
6756
6770
|
cursor: 'pointer',
|
|
6757
|
-
color: disabled || readOnly &&
|
|
6771
|
+
color: disabled || readOnly && checkedValue !== props.value ? '$textDisable' : '$textPrimary'
|
|
6758
6772
|
},
|
|
6759
6773
|
__self: this,
|
|
6760
6774
|
__source: {
|
|
6761
6775
|
fileName: _jsxFileName$G,
|
|
6762
|
-
lineNumber:
|
|
6776
|
+
lineNumber: 189,
|
|
6763
6777
|
columnNumber: 11
|
|
6764
6778
|
}
|
|
6765
6779
|
}, props.label);
|
|
@@ -6769,28 +6783,37 @@
|
|
|
6769
6783
|
__self: undefined,
|
|
6770
6784
|
__source: {
|
|
6771
6785
|
fileName: _jsxFileName$G,
|
|
6772
|
-
lineNumber:
|
|
6786
|
+
lineNumber: 208,
|
|
6773
6787
|
columnNumber: 5
|
|
6774
6788
|
}
|
|
6775
6789
|
}, ({
|
|
6776
6790
|
defaultValue,
|
|
6777
6791
|
value,
|
|
6778
|
-
outlined
|
|
6792
|
+
outlined,
|
|
6793
|
+
onValueChange
|
|
6779
6794
|
}) => {
|
|
6780
|
-
const
|
|
6781
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
6795
|
+
const checkedValue = value != null ? value : defaultValue;
|
|
6796
|
+
return /*#__PURE__*/React__default["default"].createElement(ContainerLabel, {
|
|
6797
|
+
htmlFor: id,
|
|
6798
|
+
__self: undefined,
|
|
6799
|
+
__source: {
|
|
6800
|
+
fileName: _jsxFileName$G,
|
|
6801
|
+
lineNumber: 213,
|
|
6802
|
+
columnNumber: 11
|
|
6803
|
+
}
|
|
6804
|
+
}, /*#__PURE__*/React__default["default"].createElement(Container$a, {
|
|
6782
6805
|
direction: "column",
|
|
6783
6806
|
outlined: outlined,
|
|
6784
6807
|
disabledOutlined: outlined && (readOnly || disabled),
|
|
6785
6808
|
disabled: disabled,
|
|
6786
|
-
active: outlined &&
|
|
6809
|
+
active: outlined && checkedValue === props.value && !disabled && !readOnly,
|
|
6787
6810
|
withInputProps: !!inputProps,
|
|
6788
6811
|
css: css,
|
|
6789
6812
|
__self: undefined,
|
|
6790
6813
|
__source: {
|
|
6791
6814
|
fileName: _jsxFileName$G,
|
|
6792
|
-
lineNumber:
|
|
6793
|
-
columnNumber:
|
|
6815
|
+
lineNumber: 214,
|
|
6816
|
+
columnNumber: 13
|
|
6794
6817
|
}
|
|
6795
6818
|
}, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
6796
6819
|
align: "center",
|
|
@@ -6798,8 +6821,8 @@
|
|
|
6798
6821
|
__self: undefined,
|
|
6799
6822
|
__source: {
|
|
6800
6823
|
fileName: _jsxFileName$G,
|
|
6801
|
-
lineNumber:
|
|
6802
|
-
columnNumber:
|
|
6824
|
+
lineNumber: 223,
|
|
6825
|
+
columnNumber: 15
|
|
6803
6826
|
}
|
|
6804
6827
|
}, /*#__PURE__*/React__default["default"].createElement(StyledRadio, _extends({
|
|
6805
6828
|
id: id,
|
|
@@ -6809,17 +6832,17 @@
|
|
|
6809
6832
|
__self: undefined,
|
|
6810
6833
|
__source: {
|
|
6811
6834
|
fileName: _jsxFileName$G,
|
|
6812
|
-
lineNumber:
|
|
6813
|
-
columnNumber:
|
|
6835
|
+
lineNumber: 224,
|
|
6836
|
+
columnNumber: 17
|
|
6814
6837
|
}
|
|
6815
6838
|
}), /*#__PURE__*/React__default["default"].createElement(StyledIndicator$1, {
|
|
6816
6839
|
__self: undefined,
|
|
6817
6840
|
__source: {
|
|
6818
6841
|
fileName: _jsxFileName$G,
|
|
6819
|
-
lineNumber:
|
|
6820
|
-
columnNumber:
|
|
6842
|
+
lineNumber: 225,
|
|
6843
|
+
columnNumber: 19
|
|
6821
6844
|
}
|
|
6822
|
-
})), renderInputType(inputType,
|
|
6845
|
+
})), renderInputType(inputType, checkedValue, onValueChange)), description && /*#__PURE__*/React__default["default"].createElement(Text$1, {
|
|
6823
6846
|
variant: "caption",
|
|
6824
6847
|
color: "secondary",
|
|
6825
6848
|
css: {
|
|
@@ -6828,10 +6851,10 @@
|
|
|
6828
6851
|
__self: undefined,
|
|
6829
6852
|
__source: {
|
|
6830
6853
|
fileName: _jsxFileName$G,
|
|
6831
|
-
lineNumber:
|
|
6832
|
-
columnNumber:
|
|
6854
|
+
lineNumber: 230,
|
|
6855
|
+
columnNumber: 17
|
|
6833
6856
|
}
|
|
6834
|
-
}, description));
|
|
6857
|
+
}, description)));
|
|
6835
6858
|
});
|
|
6836
6859
|
};
|
|
6837
6860
|
InputRadio.propTypes = {
|
|
@@ -8248,7 +8271,7 @@
|
|
|
8248
8271
|
size: 24
|
|
8249
8272
|
};
|
|
8250
8273
|
|
|
8251
|
-
const _excluded$e = ["size", "onChange", "css", "disabled"];
|
|
8274
|
+
const _excluded$e = ["size", "onChange", "css", "disabled", "withDebounce", "defaultValue"];
|
|
8252
8275
|
var _jsxFileName$z = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSearchbox\\InputSearchbox.js";
|
|
8253
8276
|
const InputSearchbox = _ref => {
|
|
8254
8277
|
var _props$value;
|
|
@@ -8256,20 +8279,25 @@
|
|
|
8256
8279
|
size,
|
|
8257
8280
|
onChange,
|
|
8258
8281
|
css,
|
|
8259
|
-
disabled
|
|
8282
|
+
disabled,
|
|
8283
|
+
withDebounce,
|
|
8284
|
+
defaultValue
|
|
8260
8285
|
} = _ref,
|
|
8261
8286
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
8262
8287
|
const {
|
|
8263
8288
|
t
|
|
8264
8289
|
} = reactI18next.useTranslation(['MajooUI/inputSearchbox', 'translation']);
|
|
8265
|
-
const [value, setValue] =
|
|
8290
|
+
const [value, setValue] = React.useState(defaultValue);
|
|
8266
8291
|
const inputValue = (_props$value = props === null || props === void 0 ? void 0 : props.value) != null ? _props$value : value;
|
|
8267
|
-
const
|
|
8292
|
+
const debounceChange = React.useCallback(() => debounce__default["default"](e => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value), 1000), [onChange]);
|
|
8293
|
+
const handleChange = React.useCallback(e => {
|
|
8268
8294
|
setValue(e.target.value);
|
|
8269
|
-
if (
|
|
8270
|
-
|
|
8295
|
+
if (withDebounce) {
|
|
8296
|
+
debounceChange(e);
|
|
8297
|
+
} else {
|
|
8298
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
8271
8299
|
}
|
|
8272
|
-
}, [onChange]);
|
|
8300
|
+
}, [onChange, debounceChange, withDebounce]);
|
|
8273
8301
|
const handleClearButtonClick = e => {
|
|
8274
8302
|
e.preventDefault();
|
|
8275
8303
|
if (!disabled) {
|
|
@@ -8284,7 +8312,7 @@
|
|
|
8284
8312
|
__self: undefined,
|
|
8285
8313
|
__source: {
|
|
8286
8314
|
fileName: _jsxFileName$z,
|
|
8287
|
-
lineNumber:
|
|
8315
|
+
lineNumber: 38,
|
|
8288
8316
|
columnNumber: 5
|
|
8289
8317
|
}
|
|
8290
8318
|
}, /*#__PURE__*/React__default["default"].createElement(InputLeftElement, {
|
|
@@ -8292,14 +8320,14 @@
|
|
|
8292
8320
|
__self: undefined,
|
|
8293
8321
|
__source: {
|
|
8294
8322
|
fileName: _jsxFileName$z,
|
|
8295
|
-
lineNumber:
|
|
8323
|
+
lineNumber: 39,
|
|
8296
8324
|
columnNumber: 35
|
|
8297
8325
|
}
|
|
8298
8326
|
}),
|
|
8299
8327
|
__self: undefined,
|
|
8300
8328
|
__source: {
|
|
8301
8329
|
fileName: _jsxFileName$z,
|
|
8302
|
-
lineNumber:
|
|
8330
|
+
lineNumber: 39,
|
|
8303
8331
|
columnNumber: 7
|
|
8304
8332
|
}
|
|
8305
8333
|
}), /*#__PURE__*/React__default["default"].createElement(InputText, _extends({
|
|
@@ -8314,30 +8342,30 @@
|
|
|
8314
8342
|
__self: undefined,
|
|
8315
8343
|
__source: {
|
|
8316
8344
|
fileName: _jsxFileName$z,
|
|
8317
|
-
lineNumber:
|
|
8345
|
+
lineNumber: 40,
|
|
8318
8346
|
columnNumber: 7
|
|
8319
8347
|
}
|
|
8320
8348
|
})), /*#__PURE__*/React__default["default"].createElement(InputRightElement, {
|
|
8321
|
-
children: inputValue.length > 0 ? /*#__PURE__*/React__default["default"].createElement(SvgCloseFilled, {
|
|
8349
|
+
children: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(SvgCloseFilled, {
|
|
8322
8350
|
__self: undefined,
|
|
8323
8351
|
__source: {
|
|
8324
8352
|
fileName: _jsxFileName$z,
|
|
8325
|
-
lineNumber:
|
|
8326
|
-
columnNumber:
|
|
8353
|
+
lineNumber: 51,
|
|
8354
|
+
columnNumber: 44
|
|
8327
8355
|
}
|
|
8328
8356
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8329
8357
|
__self: undefined,
|
|
8330
8358
|
__source: {
|
|
8331
8359
|
fileName: _jsxFileName$z,
|
|
8332
|
-
lineNumber:
|
|
8333
|
-
columnNumber:
|
|
8360
|
+
lineNumber: 51,
|
|
8361
|
+
columnNumber: 62
|
|
8334
8362
|
}
|
|
8335
8363
|
}),
|
|
8336
8364
|
onClick: handleClearButtonClick,
|
|
8337
8365
|
__self: undefined,
|
|
8338
8366
|
__source: {
|
|
8339
8367
|
fileName: _jsxFileName$z,
|
|
8340
|
-
lineNumber:
|
|
8368
|
+
lineNumber: 50,
|
|
8341
8369
|
columnNumber: 7
|
|
8342
8370
|
}
|
|
8343
8371
|
}));
|
|
@@ -8349,7 +8377,8 @@
|
|
|
8349
8377
|
isInvalid: PropTypes__default["default"].bool,
|
|
8350
8378
|
readOnly: PropTypes__default["default"].bool,
|
|
8351
8379
|
disabled: PropTypes__default["default"].bool,
|
|
8352
|
-
onChange: PropTypes__default["default"].func
|
|
8380
|
+
onChange: PropTypes__default["default"].func,
|
|
8381
|
+
withDebounce: PropTypes__default["default"].bool
|
|
8353
8382
|
};
|
|
8354
8383
|
InputSearchbox.defaultProps = {
|
|
8355
8384
|
size: 'sm'
|
|
@@ -8507,6 +8536,144 @@
|
|
|
8507
8536
|
];
|
|
8508
8537
|
});
|
|
8509
8538
|
|
|
8539
|
+
const _excluded$d = ["children"];
|
|
8540
|
+
var _jsxFileName$y = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\popover\\Popover.js";
|
|
8541
|
+
const {
|
|
8542
|
+
zIndices
|
|
8543
|
+
} = core.foundations;
|
|
8544
|
+
const PopoverContext = /*#__PURE__*/React.createContext();
|
|
8545
|
+
const Popover = ({
|
|
8546
|
+
children,
|
|
8547
|
+
open: _open = false,
|
|
8548
|
+
onOpenChange,
|
|
8549
|
+
placement,
|
|
8550
|
+
sideOffset: _sideOffset = 5,
|
|
8551
|
+
hideOnScroll: _hideOnScroll = false
|
|
8552
|
+
}) => {
|
|
8553
|
+
const [openState, setOpenState] = React.useState(false);
|
|
8554
|
+
React.useEffect(() => {
|
|
8555
|
+
setOpenState(_open);
|
|
8556
|
+
}, [_open]);
|
|
8557
|
+
React.useEffect(() => {
|
|
8558
|
+
if (onOpenChange) onOpenChange(openState);
|
|
8559
|
+
}, [openState, onOpenChange]);
|
|
8560
|
+
const floatingHook = reactDomInteractions.useFloating({
|
|
8561
|
+
open: openState,
|
|
8562
|
+
onOpenChange: setOpenState,
|
|
8563
|
+
middleware: [reactDomInteractions.offset(_sideOffset), reactDomInteractions.flip(), reactDomInteractions.shift()],
|
|
8564
|
+
placement
|
|
8565
|
+
});
|
|
8566
|
+
const {
|
|
8567
|
+
getReferenceProps,
|
|
8568
|
+
getFloatingProps
|
|
8569
|
+
} = reactDomInteractions.useInteractions([reactDomInteractions.useClick(floatingHook.context), reactDomInteractions.useDismiss(floatingHook.context, {
|
|
8570
|
+
ancestorScroll: _hideOnScroll
|
|
8571
|
+
})]);
|
|
8572
|
+
const value = {
|
|
8573
|
+
openState,
|
|
8574
|
+
setOpenState,
|
|
8575
|
+
floatingHook,
|
|
8576
|
+
getReferenceProps,
|
|
8577
|
+
getFloatingProps
|
|
8578
|
+
};
|
|
8579
|
+
return /*#__PURE__*/React__default["default"].createElement(PopoverContext.Provider, {
|
|
8580
|
+
value: value,
|
|
8581
|
+
__self: undefined,
|
|
8582
|
+
__source: {
|
|
8583
|
+
fileName: _jsxFileName$y,
|
|
8584
|
+
lineNumber: 46,
|
|
8585
|
+
columnNumber: 10
|
|
8586
|
+
}
|
|
8587
|
+
}, children);
|
|
8588
|
+
};
|
|
8589
|
+
const PopoverTrigger = ({
|
|
8590
|
+
children,
|
|
8591
|
+
disabled
|
|
8592
|
+
}) => {
|
|
8593
|
+
const {
|
|
8594
|
+
floatingHook: {
|
|
8595
|
+
reference
|
|
8596
|
+
},
|
|
8597
|
+
getReferenceProps
|
|
8598
|
+
} = React.useContext(PopoverContext);
|
|
8599
|
+
return disabled ? children : /*#__PURE__*/React.cloneElement(children, getReferenceProps(Object.assign({
|
|
8600
|
+
ref: reference
|
|
8601
|
+
}, children.props)));
|
|
8602
|
+
};
|
|
8603
|
+
const PopoverContent = ({
|
|
8604
|
+
children,
|
|
8605
|
+
isMobile,
|
|
8606
|
+
style
|
|
8607
|
+
}) => {
|
|
8608
|
+
const {
|
|
8609
|
+
openState,
|
|
8610
|
+
floatingHook: {
|
|
8611
|
+
x,
|
|
8612
|
+
y,
|
|
8613
|
+
floating,
|
|
8614
|
+
strategy,
|
|
8615
|
+
context
|
|
8616
|
+
},
|
|
8617
|
+
getFloatingProps
|
|
8618
|
+
} = React.useContext(PopoverContext);
|
|
8619
|
+
return openState ? /*#__PURE__*/React__default["default"].createElement(reactDomInteractions.FloatingFocusManager, {
|
|
8620
|
+
context: context,
|
|
8621
|
+
modal: false,
|
|
8622
|
+
order: ['reference', 'content'],
|
|
8623
|
+
returnFocus: false,
|
|
8624
|
+
__self: undefined,
|
|
8625
|
+
__source: {
|
|
8626
|
+
fileName: _jsxFileName$y,
|
|
8627
|
+
lineNumber: 64,
|
|
8628
|
+
columnNumber: 5
|
|
8629
|
+
}
|
|
8630
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", _extends({}, getFloatingProps({
|
|
8631
|
+
ref: floating,
|
|
8632
|
+
style: Object.assign({
|
|
8633
|
+
position: strategy,
|
|
8634
|
+
top: isMobile ? 0 : y != null ? y : '',
|
|
8635
|
+
left: isMobile ? 0 : x != null ? x : '',
|
|
8636
|
+
zIndex: zIndices.popover
|
|
8637
|
+
}, style)
|
|
8638
|
+
}), {
|
|
8639
|
+
__self: undefined,
|
|
8640
|
+
__source: {
|
|
8641
|
+
fileName: _jsxFileName$y,
|
|
8642
|
+
lineNumber: 65,
|
|
8643
|
+
columnNumber: 7
|
|
8644
|
+
}
|
|
8645
|
+
}), children)) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
8646
|
+
};
|
|
8647
|
+
const PopoverClose = _ref => {
|
|
8648
|
+
let {
|
|
8649
|
+
children
|
|
8650
|
+
} = _ref,
|
|
8651
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
8652
|
+
const {
|
|
8653
|
+
setOpenState
|
|
8654
|
+
} = React.useContext(PopoverContext);
|
|
8655
|
+
return /*#__PURE__*/React__default["default"].createElement(Flex$1, _extends({}, props, {
|
|
8656
|
+
onClick: () => {
|
|
8657
|
+
if (props.onClick) props.onClick();
|
|
8658
|
+
setOpenState(false);
|
|
8659
|
+
},
|
|
8660
|
+
__self: undefined,
|
|
8661
|
+
__source: {
|
|
8662
|
+
fileName: _jsxFileName$y,
|
|
8663
|
+
lineNumber: 88,
|
|
8664
|
+
columnNumber: 5
|
|
8665
|
+
}
|
|
8666
|
+
}), children);
|
|
8667
|
+
};
|
|
8668
|
+
Popover.propTypes = {
|
|
8669
|
+
open: PropTypes__default["default"].bool,
|
|
8670
|
+
onOpenChange: PropTypes__default["default"].func,
|
|
8671
|
+
placement: PropTypes__default["default"].oneOf(['top', 'top-start', 'top-end', 'right', 'right-start', 'right-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end']),
|
|
8672
|
+
sideOffset: PropTypes__default["default"].number,
|
|
8673
|
+
hideOnScroll: PropTypes__default["default"].bool
|
|
8674
|
+
};
|
|
8675
|
+
Popover.displayName = 'Popover';
|
|
8676
|
+
|
|
8510
8677
|
var SelectContainer = styled('div', {
|
|
8511
8678
|
margin: 0,
|
|
8512
8679
|
flexDirection: 'column',
|
|
@@ -8664,6 +8831,11 @@
|
|
|
8664
8831
|
var OptionWrapper$2 = styled('div', {
|
|
8665
8832
|
display: 'none',
|
|
8666
8833
|
overflow: 'auto',
|
|
8834
|
+
fontFamily: 'inherit',
|
|
8835
|
+
fontVariantNumeric: 'tabular-nums',
|
|
8836
|
+
fontSize: '$short-content-regular',
|
|
8837
|
+
fontWeight: '400',
|
|
8838
|
+
textAlign: 'left',
|
|
8667
8839
|
zIndex: 1,
|
|
8668
8840
|
borderRadius: '$sm',
|
|
8669
8841
|
backgroundColor: '$bgWhite',
|
|
@@ -8802,58 +8974,60 @@
|
|
|
8802
8974
|
var option = _a.option,
|
|
8803
8975
|
onChange = _a.onChange,
|
|
8804
8976
|
value = _a.value,
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
_j = _a.hideArrowicon,
|
|
8820
|
-
hideArrowicon = _j === void 0 ? false : _j,
|
|
8977
|
+
placeholder = _a.placeholder,
|
|
8978
|
+
searchPlaceholder = _a.searchPlaceholder,
|
|
8979
|
+
_b = _a.embedSearch,
|
|
8980
|
+
embedSearch = _b === void 0 ? false : _b,
|
|
8981
|
+
_c = _a.size,
|
|
8982
|
+
size = _c === void 0 ? 'lg' : _c,
|
|
8983
|
+
_d = _a.disabled,
|
|
8984
|
+
disabled = _d === void 0 ? false : _d,
|
|
8985
|
+
_e = _a.search,
|
|
8986
|
+
search = _e === void 0 ? false : _e,
|
|
8987
|
+
_f = _a.iconColor,
|
|
8988
|
+
iconColor = _f === void 0 ? 'currentColor' : _f,
|
|
8989
|
+
_g = _a.hideArrowicon,
|
|
8990
|
+
hideArrowicon = _g === void 0 ? false : _g,
|
|
8821
8991
|
showLeadingIcon = _a.showLeadingIcon,
|
|
8822
|
-
|
|
8823
|
-
placement =
|
|
8992
|
+
_h = _a.placement,
|
|
8993
|
+
placement = _h === void 0 ? 'bottom' : _h,
|
|
8824
8994
|
disabledOptions = _a.disabledOptions,
|
|
8825
|
-
|
|
8826
|
-
textSelector =
|
|
8827
|
-
|
|
8828
|
-
valueSelector =
|
|
8829
|
-
|
|
8830
|
-
readOnly =
|
|
8831
|
-
|
|
8832
|
-
isInvalid =
|
|
8833
|
-
|
|
8834
|
-
noOptionIcon =
|
|
8995
|
+
_j = _a.textSelector,
|
|
8996
|
+
textSelector = _j === void 0 ? 'name' : _j,
|
|
8997
|
+
_k = _a.valueSelector,
|
|
8998
|
+
valueSelector = _k === void 0 ? 'value' : _k,
|
|
8999
|
+
_l = _a.readOnly,
|
|
9000
|
+
readOnly = _l === void 0 ? false : _l,
|
|
9001
|
+
_m = _a.isInvalid,
|
|
9002
|
+
isInvalid = _m === void 0 ? false : _m,
|
|
9003
|
+
_o = _a.noOptionIcon,
|
|
9004
|
+
noOptionIcon = _o === void 0 ? false : _o,
|
|
8835
9005
|
fetchData = _a.fetchData,
|
|
8836
9006
|
onSearch = _a.onSearch,
|
|
8837
|
-
|
|
8838
|
-
isLoading =
|
|
8839
|
-
|
|
8840
|
-
showTooltip =
|
|
9007
|
+
_p = _a.isLoading,
|
|
9008
|
+
isLoading = _p === void 0 ? false : _p,
|
|
9009
|
+
_q = _a.showTooltip,
|
|
9010
|
+
showTooltip = _q === void 0 ? false : _q,
|
|
8841
9011
|
css = _a.css,
|
|
8842
9012
|
renderFooter = _a.renderFooter,
|
|
8843
9013
|
props = __rest(_a, ["option", "onChange", "value", "placeholder", "searchPlaceholder", "embedSearch", "size", "disabled", "search", "iconColor", "hideArrowicon", "showLeadingIcon", "placement", "disabledOptions", "textSelector", "valueSelector", "readOnly", "isInvalid", "noOptionIcon", "fetchData", "onSearch", "isLoading", "showTooltip", "css", "renderFooter"]);
|
|
8844
9014
|
var t = reactI18next.useTranslation(['MajooUI/inputSelect', 'translation']).t;
|
|
8845
|
-
var
|
|
8846
|
-
options =
|
|
8847
|
-
setOptions =
|
|
8848
|
-
var
|
|
8849
|
-
item =
|
|
8850
|
-
setItem =
|
|
8851
|
-
var
|
|
8852
|
-
selectedValue =
|
|
8853
|
-
setSelectedValue =
|
|
8854
|
-
var
|
|
8855
|
-
query =
|
|
8856
|
-
setQuery =
|
|
9015
|
+
var _r = React.useState([]),
|
|
9016
|
+
options = _r[0],
|
|
9017
|
+
setOptions = _r[1];
|
|
9018
|
+
var _s = React.useState([]),
|
|
9019
|
+
item = _s[0],
|
|
9020
|
+
setItem = _s[1];
|
|
9021
|
+
var _t = React.useState(value),
|
|
9022
|
+
selectedValue = _t[0],
|
|
9023
|
+
setSelectedValue = _t[1];
|
|
9024
|
+
var _u = React.useState(),
|
|
9025
|
+
query = _u[0],
|
|
9026
|
+
setQuery = _u[1];
|
|
9027
|
+
var _v = React.useState(false),
|
|
9028
|
+
openOptions = _v[0],
|
|
9029
|
+
setOpenOptions = _v[1];
|
|
9030
|
+
var selectBoxRef = React.useRef(null);
|
|
8857
9031
|
var scrollerRef = React.useRef(null);
|
|
8858
9032
|
React.useEffect(function () {
|
|
8859
9033
|
var _a;
|
|
@@ -8941,6 +9115,7 @@
|
|
|
8941
9115
|
}
|
|
8942
9116
|
}, {
|
|
8943
9117
|
children: function (_a) {
|
|
9118
|
+
var _b, _c;
|
|
8944
9119
|
var getRootProps = _a.getRootProps,
|
|
8945
9120
|
getToggleButtonProps = _a.getToggleButtonProps,
|
|
8946
9121
|
getMenuProps = _a.getMenuProps,
|
|
@@ -8964,200 +9139,227 @@
|
|
|
8964
9139
|
}, void 0)
|
|
8965
9140
|
}), void 0);
|
|
8966
9141
|
};
|
|
8967
|
-
return jsxRuntime.
|
|
8968
|
-
|
|
9142
|
+
return jsxRuntime.jsx(Popover, __assign({
|
|
9143
|
+
open: openOptions,
|
|
9144
|
+
onOpenChange: setOpenOptions,
|
|
9145
|
+
placement: placement,
|
|
9146
|
+
hideOnScroll: true
|
|
8969
9147
|
}, {
|
|
8970
|
-
children:
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
return jsxRuntime.jsx(Tooltip$1, __assign({
|
|
8974
|
-
color: "dark",
|
|
8975
|
-
label: selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.name
|
|
8976
|
-
}, {
|
|
8977
|
-
children: children
|
|
8978
|
-
}), void 0);
|
|
8979
|
-
}
|
|
9148
|
+
children: jsxRuntime.jsxs(SelectContainer, __assign({
|
|
9149
|
+
css: css,
|
|
9150
|
+
ref: selectBoxRef
|
|
8980
9151
|
}, {
|
|
8981
|
-
children: jsxRuntime.
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
9152
|
+
children: [jsxRuntime.jsx(ConditionalWrapper, __assign({
|
|
9153
|
+
condition: showTooltip && selectedValue,
|
|
9154
|
+
wrapper: function (children) {
|
|
9155
|
+
return jsxRuntime.jsx(Tooltip$1, __assign({
|
|
9156
|
+
color: "dark",
|
|
9157
|
+
label: selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.name
|
|
9158
|
+
}, {
|
|
9159
|
+
children: children
|
|
9160
|
+
}), void 0);
|
|
9161
|
+
}
|
|
8990
9162
|
}, {
|
|
8991
|
-
children:
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
showLeadingIcon: showLeadingIcon,
|
|
8999
|
-
showClearIcon: hideArrowicon,
|
|
9163
|
+
children: jsxRuntime.jsx(PopoverTrigger, {
|
|
9164
|
+
children: jsxRuntime.jsxs(SelectBox, __assign({}, getRootProps({
|
|
9165
|
+
refKey: 'ref'
|
|
9166
|
+
}, {
|
|
9167
|
+
suppressRefError: true
|
|
9168
|
+
}), {
|
|
9169
|
+
size: size,
|
|
9000
9170
|
disabled: disabled,
|
|
9001
|
-
placeholder: placeholder,
|
|
9002
9171
|
readOnly: readOnly,
|
|
9003
|
-
|
|
9004
|
-
if (onSearch) onSearch(query);
|
|
9005
|
-
setQuery(query);
|
|
9006
|
-
},
|
|
9007
|
-
inputProps: getInputProps({
|
|
9008
|
-
onChange: function (event) {
|
|
9009
|
-
if (event.type !== 'change') return;
|
|
9010
|
-
var query = event.target.value;
|
|
9011
|
-
if (!fetchData) handleInputValue(query);else debouncedSearch(query);
|
|
9012
|
-
},
|
|
9013
|
-
disabled: disabled
|
|
9014
|
-
}),
|
|
9015
|
-
onClick: !isOpen ? getToggleButtonProps({
|
|
9016
|
-
disabled: disabled || readOnly
|
|
9017
|
-
}).onClick : undefined
|
|
9018
|
-
}, void 0)
|
|
9019
|
-
}), void 0) : jsxRuntime.jsx(Button$3, __assign({}, getToggleButtonProps({
|
|
9020
|
-
disabled: disabled || readOnly
|
|
9021
|
-
}), {
|
|
9022
|
-
disabled: disabled,
|
|
9023
|
-
size: size,
|
|
9024
|
-
readOnly: readOnly,
|
|
9025
|
-
type: "button"
|
|
9026
|
-
}, {
|
|
9027
|
-
children: selectedItem ? selectedItem.render ? selectedItem.render(selectedItem) : jsxRuntime.jsx(Text$1, __assign({
|
|
9028
|
-
color: disabled ? 'disable' : 'primary',
|
|
9029
|
-
css: StyledText$1
|
|
9172
|
+
isInvalid: isInvalid
|
|
9030
9173
|
}, {
|
|
9031
|
-
children:
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9174
|
+
children: [search ? jsxRuntime.jsx(Box, __assign({
|
|
9175
|
+
style: {
|
|
9176
|
+
width: '100%',
|
|
9177
|
+
flex: 1
|
|
9178
|
+
}
|
|
9179
|
+
}, {
|
|
9180
|
+
children: jsxRuntime.jsx(SelectInputSearch, {
|
|
9181
|
+
showLeadingIcon: showLeadingIcon,
|
|
9182
|
+
showClearIcon: hideArrowicon,
|
|
9183
|
+
disabled: disabled,
|
|
9184
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('placeholder', 'Pilih Item'),
|
|
9185
|
+
readOnly: readOnly,
|
|
9186
|
+
handleInputValue: !fetchData ? handleInputValue : function (query) {
|
|
9187
|
+
if (onSearch) onSearch(query);
|
|
9188
|
+
setQuery(query);
|
|
9189
|
+
},
|
|
9190
|
+
inputProps: getInputProps({
|
|
9191
|
+
onChange: function (event) {
|
|
9192
|
+
if (event.type !== 'change') return;
|
|
9193
|
+
var query = event.target.value;
|
|
9194
|
+
if (!fetchData) handleInputValue(query);else debouncedSearch(query);
|
|
9195
|
+
},
|
|
9196
|
+
disabled: disabled
|
|
9197
|
+
}),
|
|
9198
|
+
onClick: !isOpen ? getToggleButtonProps({
|
|
9199
|
+
disabled: disabled || readOnly
|
|
9200
|
+
}).onClick : undefined
|
|
9201
|
+
}, void 0)
|
|
9202
|
+
}), void 0) : jsxRuntime.jsx(Button$3, __assign({}, getToggleButtonProps({
|
|
9203
|
+
disabled: disabled || readOnly
|
|
9204
|
+
}), {
|
|
9205
|
+
disabled: disabled,
|
|
9206
|
+
size: size,
|
|
9207
|
+
readOnly: readOnly,
|
|
9208
|
+
type: "button"
|
|
9209
|
+
}, {
|
|
9210
|
+
children: selectedItem ? selectedItem.render ? selectedItem.render(selectedItem) : jsxRuntime.jsx(Text$1, __assign({
|
|
9211
|
+
color: disabled ? 'disable' : 'primary',
|
|
9212
|
+
css: StyledText$1
|
|
9213
|
+
}, {
|
|
9214
|
+
children: selectedItem.name
|
|
9215
|
+
}), void 0) : jsxRuntime.jsx(Text$1, __assign({
|
|
9216
|
+
color: "disable",
|
|
9217
|
+
css: StyledText$1
|
|
9218
|
+
}, {
|
|
9219
|
+
children: placeholder !== null && placeholder !== void 0 ? placeholder : t('placeholder', 'Pilih Item')
|
|
9220
|
+
}), void 0)
|
|
9221
|
+
}), void 0), handleDownOption()]
|
|
9037
9222
|
}), void 0)
|
|
9038
|
-
}
|
|
9039
|
-
}), void 0)
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
css: {
|
|
9044
|
-
position: 'absolute',
|
|
9045
|
-
inset: 0,
|
|
9046
|
-
zIndex: '$sticky',
|
|
9047
|
-
top: placement === 'top' ? '-20px' : item.length > 0 ? size === 'lg' ? '40px' : '32px' : size === 'lg' ? '64px' : '56px',
|
|
9048
|
-
// bottom: '80px',
|
|
9049
|
-
width: '100%',
|
|
9050
|
-
height: scrollerRef.current ? scrollerRef.current.clientHeight : '40px',
|
|
9051
|
-
backgroundColor: '$bgWhite',
|
|
9052
|
-
opacity: 0.8,
|
|
9053
|
-
transform: placement === 'top' ? 'translate(0, -100%)' : 'none'
|
|
9054
|
-
}
|
|
9055
|
-
}, {
|
|
9056
|
-
children: jsxRuntime.jsx(Text$1, __assign({
|
|
9057
|
-
variant: "caption"
|
|
9058
|
-
}, {
|
|
9059
|
-
children: "Loading...."
|
|
9060
|
-
}), void 0)
|
|
9061
|
-
}), void 0), jsxRuntime.jsx(ConditionalWrapper, __assign({
|
|
9062
|
-
condition: renderFooter && typeof renderFooter === 'function',
|
|
9063
|
-
wrapper: function (child) {
|
|
9064
|
-
return jsxRuntime.jsxs(Box, __assign({
|
|
9065
|
-
css: {
|
|
9066
|
-
position: 'absolute',
|
|
9067
|
-
float: 'left',
|
|
9068
|
-
display: isOpen ? 'block' : 'none',
|
|
9069
|
-
zIndex: '$popover',
|
|
9070
|
-
width: '100%'
|
|
9071
|
-
}
|
|
9072
|
-
}, {
|
|
9073
|
-
children: [child, renderFooter && typeof renderFooter === 'function' && jsxRuntime.jsx(StyledFooter, {
|
|
9074
|
-
children: renderFooter === null || renderFooter === void 0 ? void 0 : renderFooter()
|
|
9075
|
-
}, void 0)]
|
|
9076
|
-
}), void 0);
|
|
9077
|
-
}
|
|
9078
|
-
}, {
|
|
9079
|
-
children: jsxRuntime.jsxs(OptionWrapper$2, __assign({}, getMenuProps({
|
|
9080
|
-
ref: scrollerRef
|
|
9081
|
-
}, {
|
|
9082
|
-
suppressRefError: true
|
|
9083
|
-
}), {
|
|
9084
|
-
css: {
|
|
9085
|
-
display: isOpen ? 'block' : 'none',
|
|
9086
|
-
zIndex: '$popover'
|
|
9087
|
-
},
|
|
9088
|
-
withFooter: renderFooter && typeof renderFooter === 'function',
|
|
9089
|
-
placement: placement
|
|
9090
|
-
}, {
|
|
9091
|
-
children: [!search && embedSearch && isOpen && jsxRuntime.jsx(SelectContainer, __assign({
|
|
9092
|
-
css: {
|
|
9093
|
-
position: 'sticky',
|
|
9094
|
-
top: 0,
|
|
9095
|
-
zIndex: '$sticky',
|
|
9096
|
-
padding: '$spacing-04 $spacing-05 0',
|
|
9097
|
-
backgroundColor: '$bgWhite'
|
|
9223
|
+
}, void 0)
|
|
9224
|
+
}), void 0), jsxRuntime.jsx(helpers.Portal, {
|
|
9225
|
+
children: jsxRuntime.jsx(PopoverContent, __assign({
|
|
9226
|
+
style: {
|
|
9227
|
+
width: (_c = (_b = selectBoxRef === null || selectBoxRef === void 0 ? void 0 : selectBoxRef.current) === null || _b === void 0 ? void 0 : _b.clientWidth) !== null && _c !== void 0 ? _c : 0
|
|
9098
9228
|
}
|
|
9099
9229
|
}, {
|
|
9100
|
-
children: jsxRuntime.
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
useWindow: false
|
|
9230
|
+
children: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9231
|
+
children: [isOpen && isLoading && jsxRuntime.jsx(Flex$1, __assign({
|
|
9232
|
+
justify: "center",
|
|
9233
|
+
align: "center",
|
|
9234
|
+
css: {
|
|
9235
|
+
position: 'absolute',
|
|
9236
|
+
inset: 0,
|
|
9237
|
+
zIndex: '$tooltip',
|
|
9238
|
+
top: item.length > 0 ? '0px' : placement === 'top' ? '-20px' : '20px',
|
|
9239
|
+
// bottom: '80px',
|
|
9240
|
+
width: '100%',
|
|
9241
|
+
height: scrollerRef.current ? scrollerRef.current.clientHeight : '40px',
|
|
9242
|
+
backgroundColor: '$bgWhite',
|
|
9243
|
+
opacity: 0.8,
|
|
9244
|
+
transform: placement === 'top' ? 'translate(0, -100%)' : 'none'
|
|
9245
|
+
}
|
|
9117
9246
|
}, {
|
|
9118
|
-
children:
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
}
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
}
|
|
9139
|
-
}), item.render ? item.render(selectedItem) : item.name);
|
|
9140
|
-
})
|
|
9141
|
-
}, void 0)
|
|
9142
|
-
}), void 0) : jsxRuntime.jsx(SelectOption, {
|
|
9143
|
-
children: jsxRuntime.jsxs(StyledDiv$2, {
|
|
9144
|
-
children: [jsxRuntime.jsx("div", __assign({
|
|
9145
|
-
style: {
|
|
9146
|
-
marginRight: '6px'
|
|
9247
|
+
children: jsxRuntime.jsx(Text$1, __assign({
|
|
9248
|
+
variant: "caption"
|
|
9249
|
+
}, {
|
|
9250
|
+
children: "Loading...."
|
|
9251
|
+
}), void 0)
|
|
9252
|
+
}), void 0), jsxRuntime.jsx(ConditionalWrapper, __assign({
|
|
9253
|
+
condition: renderFooter && typeof renderFooter === 'function',
|
|
9254
|
+
wrapper: function (child) {
|
|
9255
|
+
return jsxRuntime.jsxs(Box, __assign({
|
|
9256
|
+
css: {
|
|
9257
|
+
position: 'absolute',
|
|
9258
|
+
float: 'left',
|
|
9259
|
+
display: isOpen ? 'block' : 'none',
|
|
9260
|
+
zIndex: '$popover',
|
|
9261
|
+
width: '100%'
|
|
9262
|
+
}
|
|
9263
|
+
}, {
|
|
9264
|
+
children: [child, renderFooter && typeof renderFooter === 'function' && jsxRuntime.jsx(StyledFooter, {
|
|
9265
|
+
children: renderFooter === null || renderFooter === void 0 ? void 0 : renderFooter()
|
|
9266
|
+
}, void 0)]
|
|
9267
|
+
}), void 0);
|
|
9147
9268
|
}
|
|
9148
9269
|
}, {
|
|
9149
|
-
children: jsxRuntime.
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9270
|
+
children: jsxRuntime.jsxs(OptionWrapper$2, __assign({}, getMenuProps({
|
|
9271
|
+
ref: scrollerRef
|
|
9272
|
+
}, {
|
|
9273
|
+
suppressRefError: true
|
|
9274
|
+
}), {
|
|
9275
|
+
css: {
|
|
9276
|
+
display: isOpen ? 'block' : 'none',
|
|
9277
|
+
zIndex: '$popover',
|
|
9278
|
+
pointerEvents: 'auto'
|
|
9279
|
+
},
|
|
9280
|
+
withFooter: renderFooter && typeof renderFooter === 'function',
|
|
9281
|
+
placement: placement
|
|
9282
|
+
}, {
|
|
9283
|
+
children: [!search && embedSearch && isOpen && jsxRuntime.jsx(SelectContainer, __assign({
|
|
9284
|
+
css: {
|
|
9285
|
+
position: 'sticky',
|
|
9286
|
+
top: 0,
|
|
9287
|
+
zIndex: '$sticky',
|
|
9288
|
+
padding: '$spacing-04 $spacing-05 0',
|
|
9289
|
+
backgroundColor: '$bgWhite'
|
|
9290
|
+
}
|
|
9291
|
+
}, {
|
|
9292
|
+
children: jsxRuntime.jsx(InputSearchbox, {
|
|
9293
|
+
size: 'sm',
|
|
9294
|
+
onChange: handleInputValue,
|
|
9295
|
+
placeholder: searchPlaceholder !== null && searchPlaceholder !== void 0 ? searchPlaceholder : t('searchPlaceholder', 'Cari ...')
|
|
9296
|
+
}, void 0)
|
|
9297
|
+
}), void 0), item.length > 0 || isLoading ? jsxRuntime.jsx(ConditionalWrapper, __assign({
|
|
9298
|
+
condition: !!fetchData && item.length > 0,
|
|
9299
|
+
wrapper: function (children) {
|
|
9300
|
+
return jsxRuntime.jsx(InfiniteScroll__default["default"], __assign({
|
|
9301
|
+
loadMore: function (_) {
|
|
9302
|
+
if (!isLoading && fetchData) fetchData({
|
|
9303
|
+
query: query
|
|
9304
|
+
});
|
|
9305
|
+
},
|
|
9306
|
+
hasMore: true,
|
|
9307
|
+
threshold: 5,
|
|
9308
|
+
useWindow: false
|
|
9309
|
+
}, {
|
|
9310
|
+
children: children
|
|
9311
|
+
}), void 0);
|
|
9312
|
+
}
|
|
9313
|
+
}, {
|
|
9314
|
+
children: jsxRuntime.jsx(PopoverClose, __assign({
|
|
9315
|
+
css: {
|
|
9316
|
+
display: 'block !important'
|
|
9317
|
+
}
|
|
9318
|
+
}, {
|
|
9319
|
+
children: jsxRuntime.jsx(SelectOption, {
|
|
9320
|
+
children: item.map(function (item, index) {
|
|
9321
|
+
var _a;
|
|
9322
|
+
return /*#__PURE__*/React.createElement(SelectItem, __assign({}, getItemProps({
|
|
9323
|
+
item: item,
|
|
9324
|
+
disabled: item.isDisabled
|
|
9325
|
+
}), {
|
|
9326
|
+
key: (_a = item.value) !== null && _a !== void 0 ? _a : index,
|
|
9327
|
+
css: item.isDisabled ? {
|
|
9328
|
+
backgroundColor: 'unset',
|
|
9329
|
+
cursor: 'not-allowed',
|
|
9330
|
+
color: '$textDisable'
|
|
9331
|
+
} : {
|
|
9332
|
+
backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
|
|
9333
|
+
fontWeight: 'normal',
|
|
9334
|
+
color: selectedItem && selectedItem.value === item.value ? '$textGreen' : '$textPrimary'
|
|
9335
|
+
}
|
|
9336
|
+
}), item.render ? item.render(selectedItem) : item.name);
|
|
9337
|
+
})
|
|
9338
|
+
}, void 0)
|
|
9339
|
+
}), void 0)
|
|
9340
|
+
}), void 0) : jsxRuntime.jsx(SelectOption, {
|
|
9341
|
+
children: jsxRuntime.jsxs(StyledDiv$2, {
|
|
9342
|
+
children: [jsxRuntime.jsx("div", __assign({
|
|
9343
|
+
style: {
|
|
9344
|
+
marginRight: '6px'
|
|
9345
|
+
}
|
|
9346
|
+
}, {
|
|
9347
|
+
children: jsxRuntime.jsx(icons.CircleInfoOutline, {
|
|
9348
|
+
size: "16px",
|
|
9349
|
+
color: colors$4.iconDisable,
|
|
9350
|
+
style: {
|
|
9351
|
+
verticalAlign: 'text-bottom'
|
|
9352
|
+
}
|
|
9353
|
+
}, void 0)
|
|
9354
|
+
}), void 0), t('noItemPlaceholder', 'Item tidak ditemukan')]
|
|
9355
|
+
}, void 0)
|
|
9356
|
+
}, void 0)]
|
|
9357
|
+
}), void 0)
|
|
9358
|
+
}), void 0)]
|
|
9157
9359
|
}, void 0)
|
|
9158
|
-
}, void 0)
|
|
9159
|
-
}
|
|
9160
|
-
}), void 0)
|
|
9360
|
+
}), void 0)
|
|
9361
|
+
}, void 0)]
|
|
9362
|
+
}), void 0)
|
|
9161
9363
|
}), void 0);
|
|
9162
9364
|
}
|
|
9163
9365
|
}), void 0);
|
|
@@ -9443,7 +9645,7 @@
|
|
|
9443
9645
|
}
|
|
9444
9646
|
});
|
|
9445
9647
|
|
|
9446
|
-
var _jsxFileName$
|
|
9648
|
+
var _jsxFileName$x = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectCheck\\icon\\CheckOutline.js";
|
|
9447
9649
|
const CheckOutline = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
9448
9650
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9449
9651
|
xmlSpace: "preserve",
|
|
@@ -9460,7 +9662,7 @@
|
|
|
9460
9662
|
}, props, {
|
|
9461
9663
|
__self: undefined,
|
|
9462
9664
|
__source: {
|
|
9463
|
-
fileName: _jsxFileName$
|
|
9665
|
+
fileName: _jsxFileName$x,
|
|
9464
9666
|
lineNumber: 4,
|
|
9465
9667
|
columnNumber: 3
|
|
9466
9668
|
}
|
|
@@ -9472,7 +9674,7 @@
|
|
|
9472
9674
|
},
|
|
9473
9675
|
__self: undefined,
|
|
9474
9676
|
__source: {
|
|
9475
|
-
fileName: _jsxFileName$
|
|
9677
|
+
fileName: _jsxFileName$x,
|
|
9476
9678
|
lineNumber: 19,
|
|
9477
9679
|
columnNumber: 5
|
|
9478
9680
|
}
|
|
@@ -9484,14 +9686,14 @@
|
|
|
9484
9686
|
},
|
|
9485
9687
|
__self: undefined,
|
|
9486
9688
|
__source: {
|
|
9487
|
-
fileName: _jsxFileName$
|
|
9689
|
+
fileName: _jsxFileName$x,
|
|
9488
9690
|
lineNumber: 26,
|
|
9489
9691
|
columnNumber: 5
|
|
9490
9692
|
}
|
|
9491
9693
|
}));
|
|
9492
9694
|
|
|
9493
|
-
const _excluded$
|
|
9494
|
-
var _jsxFileName$
|
|
9695
|
+
const _excluded$c = ["placeholder", "option", "value", "size", "disabled", "onChange", "search", "readOnly", "placement", "disabledOptions", "textEmptyItem", "onRemoveItem", "isInvalid", "sortBy", "showSelectAll", "selectAllLabel", "showSelectedTag", "unremovableTags", "helperText", "css", "showCounter", "labelCounter", "collapsible"];
|
|
9696
|
+
var _jsxFileName$w = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectCheck\\InputSelectCheck.js";
|
|
9495
9697
|
const Wrapper$1 = styled('div', {
|
|
9496
9698
|
margin: 0,
|
|
9497
9699
|
flexDirection: 'column',
|
|
@@ -9748,7 +9950,7 @@
|
|
|
9748
9950
|
labelCounter,
|
|
9749
9951
|
collapsible
|
|
9750
9952
|
} = _ref,
|
|
9751
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9953
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
9752
9954
|
const {
|
|
9753
9955
|
t
|
|
9754
9956
|
} = reactI18next.useTranslation(['MajooUI/inputSelectCheck', 'translation']);
|
|
@@ -9978,7 +10180,7 @@
|
|
|
9978
10180
|
}, props, {
|
|
9979
10181
|
__self: undefined,
|
|
9980
10182
|
__source: {
|
|
9981
|
-
fileName: _jsxFileName$
|
|
10183
|
+
fileName: _jsxFileName$w,
|
|
9982
10184
|
lineNumber: 523,
|
|
9983
10185
|
columnNumber: 7
|
|
9984
10186
|
}
|
|
@@ -9988,7 +10190,7 @@
|
|
|
9988
10190
|
isInvalid: isInvalid,
|
|
9989
10191
|
__self: undefined,
|
|
9990
10192
|
__source: {
|
|
9991
|
-
fileName: _jsxFileName$
|
|
10193
|
+
fileName: _jsxFileName$w,
|
|
9992
10194
|
lineNumber: 524,
|
|
9993
10195
|
columnNumber: 9
|
|
9994
10196
|
}
|
|
@@ -10003,7 +10205,7 @@
|
|
|
10003
10205
|
disabled: disabled || readOnly,
|
|
10004
10206
|
__self: undefined,
|
|
10005
10207
|
__source: {
|
|
10006
|
-
fileName: _jsxFileName$
|
|
10208
|
+
fileName: _jsxFileName$w,
|
|
10007
10209
|
lineNumber: 525,
|
|
10008
10210
|
columnNumber: 11
|
|
10009
10211
|
}
|
|
@@ -10014,12 +10216,12 @@
|
|
|
10014
10216
|
}, {
|
|
10015
10217
|
suppressRefError: true
|
|
10016
10218
|
}), {
|
|
10017
|
-
placeholder: placeholder,
|
|
10219
|
+
placeholder: placeholder != null ? placeholder : t('placeholder', 'Pilih Item'),
|
|
10018
10220
|
disabled: disabled || readOnly,
|
|
10019
10221
|
hiddden: !search,
|
|
10020
10222
|
__self: undefined,
|
|
10021
10223
|
__source: {
|
|
10022
|
-
fileName: _jsxFileName$
|
|
10224
|
+
fileName: _jsxFileName$w,
|
|
10023
10225
|
lineNumber: 535,
|
|
10024
10226
|
columnNumber: 13
|
|
10025
10227
|
}
|
|
@@ -10032,18 +10234,18 @@
|
|
|
10032
10234
|
hiddden: search,
|
|
10033
10235
|
__self: undefined,
|
|
10034
10236
|
__source: {
|
|
10035
|
-
fileName: _jsxFileName$
|
|
10237
|
+
fileName: _jsxFileName$w,
|
|
10036
10238
|
lineNumber: 541,
|
|
10037
10239
|
columnNumber: 13
|
|
10038
10240
|
}
|
|
10039
|
-
}), placeholder)), /*#__PURE__*/React__default["default"].createElement(IconWrapper, _extends({}, getToggleButtonProps({
|
|
10241
|
+
}), placeholder != null ? placeholder : t('placeholder', 'Pilih Item'))), /*#__PURE__*/React__default["default"].createElement(IconWrapper, _extends({}, getToggleButtonProps({
|
|
10040
10242
|
disabled: disabled || readOnly
|
|
10041
10243
|
}), {
|
|
10042
10244
|
disabled: disabled,
|
|
10043
10245
|
readOnly: readOnly,
|
|
10044
10246
|
__self: undefined,
|
|
10045
10247
|
__source: {
|
|
10046
|
-
fileName: _jsxFileName$
|
|
10248
|
+
fileName: _jsxFileName$w,
|
|
10047
10249
|
lineNumber: 551,
|
|
10048
10250
|
columnNumber: 11
|
|
10049
10251
|
}
|
|
@@ -10051,7 +10253,7 @@
|
|
|
10051
10253
|
color: disabled || readOnly ? colors$4.iconDisable : colors$4.iconPrimary,
|
|
10052
10254
|
__self: undefined,
|
|
10053
10255
|
__source: {
|
|
10054
|
-
fileName: _jsxFileName$
|
|
10256
|
+
fileName: _jsxFileName$w,
|
|
10055
10257
|
lineNumber: 556,
|
|
10056
10258
|
columnNumber: 13
|
|
10057
10259
|
}
|
|
@@ -10064,7 +10266,7 @@
|
|
|
10064
10266
|
},
|
|
10065
10267
|
__self: undefined,
|
|
10066
10268
|
__source: {
|
|
10067
|
-
fileName: _jsxFileName$
|
|
10269
|
+
fileName: _jsxFileName$w,
|
|
10068
10270
|
lineNumber: 560,
|
|
10069
10271
|
columnNumber: 11
|
|
10070
10272
|
}
|
|
@@ -10072,7 +10274,7 @@
|
|
|
10072
10274
|
disabled: disabled,
|
|
10073
10275
|
__self: undefined,
|
|
10074
10276
|
__source: {
|
|
10075
|
-
fileName: _jsxFileName$
|
|
10277
|
+
fileName: _jsxFileName$w,
|
|
10076
10278
|
lineNumber: 566,
|
|
10077
10279
|
columnNumber: 13
|
|
10078
10280
|
}
|
|
@@ -10102,7 +10304,7 @@
|
|
|
10102
10304
|
},
|
|
10103
10305
|
__self: undefined,
|
|
10104
10306
|
__source: {
|
|
10105
|
-
fileName: _jsxFileName$
|
|
10307
|
+
fileName: _jsxFileName$w,
|
|
10106
10308
|
lineNumber: 577,
|
|
10107
10309
|
columnNumber: 19
|
|
10108
10310
|
}
|
|
@@ -10112,14 +10314,14 @@
|
|
|
10112
10314
|
onClick: toggleCollapsible,
|
|
10113
10315
|
__self: undefined,
|
|
10114
10316
|
__source: {
|
|
10115
|
-
fileName: _jsxFileName$
|
|
10317
|
+
fileName: _jsxFileName$w,
|
|
10116
10318
|
lineNumber: 598,
|
|
10117
10319
|
columnNumber: 15
|
|
10118
10320
|
}
|
|
10119
10321
|
}, /*#__PURE__*/React__default["default"].createElement(Separator$2, {
|
|
10120
10322
|
__self: undefined,
|
|
10121
10323
|
__source: {
|
|
10122
|
-
fileName: _jsxFileName$
|
|
10324
|
+
fileName: _jsxFileName$w,
|
|
10123
10325
|
lineNumber: 599,
|
|
10124
10326
|
columnNumber: 17
|
|
10125
10327
|
}
|
|
@@ -10133,7 +10335,7 @@
|
|
|
10133
10335
|
},
|
|
10134
10336
|
__self: undefined,
|
|
10135
10337
|
__source: {
|
|
10136
|
-
fileName: _jsxFileName$
|
|
10338
|
+
fileName: _jsxFileName$w,
|
|
10137
10339
|
lineNumber: 600,
|
|
10138
10340
|
columnNumber: 17
|
|
10139
10341
|
}
|
|
@@ -10141,7 +10343,7 @@
|
|
|
10141
10343
|
color: colors$4.iconSecondary,
|
|
10142
10344
|
__self: undefined,
|
|
10143
10345
|
__source: {
|
|
10144
|
-
fileName: _jsxFileName$
|
|
10346
|
+
fileName: _jsxFileName$w,
|
|
10145
10347
|
lineNumber: 606,
|
|
10146
10348
|
columnNumber: 21
|
|
10147
10349
|
}
|
|
@@ -10149,7 +10351,7 @@
|
|
|
10149
10351
|
color: colors$4.iconSecondary,
|
|
10150
10352
|
__self: undefined,
|
|
10151
10353
|
__source: {
|
|
10152
|
-
fileName: _jsxFileName$
|
|
10354
|
+
fileName: _jsxFileName$w,
|
|
10153
10355
|
lineNumber: 608,
|
|
10154
10356
|
columnNumber: 21
|
|
10155
10357
|
}
|
|
@@ -10161,14 +10363,14 @@
|
|
|
10161
10363
|
color: "secondary",
|
|
10162
10364
|
__self: undefined,
|
|
10163
10365
|
__source: {
|
|
10164
|
-
fileName: _jsxFileName$
|
|
10366
|
+
fileName: _jsxFileName$w,
|
|
10165
10367
|
lineNumber: 610,
|
|
10166
10368
|
columnNumber: 19
|
|
10167
10369
|
}
|
|
10168
10370
|
}, showAllTags ? t('showSomeText', 'Tampilkan Sebagian') : t('showAllText', 'Tampilkan Semua'))), /*#__PURE__*/React__default["default"].createElement(Separator$2, {
|
|
10169
10371
|
__self: undefined,
|
|
10170
10372
|
__source: {
|
|
10171
|
-
fileName: _jsxFileName$
|
|
10373
|
+
fileName: _jsxFileName$w,
|
|
10172
10374
|
lineNumber: 614,
|
|
10173
10375
|
columnNumber: 17
|
|
10174
10376
|
}
|
|
@@ -10176,7 +10378,7 @@
|
|
|
10176
10378
|
disabled: disabled,
|
|
10177
10379
|
__self: undefined,
|
|
10178
10380
|
__source: {
|
|
10179
|
-
fileName: _jsxFileName$
|
|
10381
|
+
fileName: _jsxFileName$w,
|
|
10180
10382
|
lineNumber: 620,
|
|
10181
10383
|
columnNumber: 11
|
|
10182
10384
|
}
|
|
@@ -10204,7 +10406,7 @@
|
|
|
10204
10406
|
},
|
|
10205
10407
|
__self: undefined,
|
|
10206
10408
|
__source: {
|
|
10207
|
-
fileName: _jsxFileName$
|
|
10409
|
+
fileName: _jsxFileName$w,
|
|
10208
10410
|
lineNumber: 621,
|
|
10209
10411
|
columnNumber: 13
|
|
10210
10412
|
}
|
|
@@ -10216,7 +10418,7 @@
|
|
|
10216
10418
|
},
|
|
10217
10419
|
__self: undefined,
|
|
10218
10420
|
__source: {
|
|
10219
|
-
fileName: _jsxFileName$
|
|
10421
|
+
fileName: _jsxFileName$w,
|
|
10220
10422
|
lineNumber: 641,
|
|
10221
10423
|
columnNumber: 9
|
|
10222
10424
|
}
|
|
@@ -10225,7 +10427,7 @@
|
|
|
10225
10427
|
}), {
|
|
10226
10428
|
__self: undefined,
|
|
10227
10429
|
__source: {
|
|
10228
|
-
fileName: _jsxFileName$
|
|
10430
|
+
fileName: _jsxFileName$w,
|
|
10229
10431
|
lineNumber: 646,
|
|
10230
10432
|
columnNumber: 13
|
|
10231
10433
|
}
|
|
@@ -10243,7 +10445,7 @@
|
|
|
10243
10445
|
},
|
|
10244
10446
|
__self: undefined,
|
|
10245
10447
|
__source: {
|
|
10246
|
-
fileName: _jsxFileName$
|
|
10448
|
+
fileName: _jsxFileName$w,
|
|
10247
10449
|
lineNumber: 649,
|
|
10248
10450
|
columnNumber: 19
|
|
10249
10451
|
}
|
|
@@ -10256,7 +10458,7 @@
|
|
|
10256
10458
|
},
|
|
10257
10459
|
__self: undefined,
|
|
10258
10460
|
__source: {
|
|
10259
|
-
fileName: _jsxFileName$
|
|
10461
|
+
fileName: _jsxFileName$w,
|
|
10260
10462
|
lineNumber: 662,
|
|
10261
10463
|
columnNumber: 21
|
|
10262
10464
|
}
|
|
@@ -10264,7 +10466,7 @@
|
|
|
10264
10466
|
color: colors$4.iconDisable,
|
|
10265
10467
|
__self: undefined,
|
|
10266
10468
|
__source: {
|
|
10267
|
-
fileName: _jsxFileName$
|
|
10469
|
+
fileName: _jsxFileName$w,
|
|
10268
10470
|
lineNumber: 671,
|
|
10269
10471
|
columnNumber: 25
|
|
10270
10472
|
}
|
|
@@ -10272,21 +10474,21 @@
|
|
|
10272
10474
|
color: colors$4.iconGreen,
|
|
10273
10475
|
__self: undefined,
|
|
10274
10476
|
__source: {
|
|
10275
|
-
fileName: _jsxFileName$
|
|
10477
|
+
fileName: _jsxFileName$w,
|
|
10276
10478
|
lineNumber: 675,
|
|
10277
10479
|
columnNumber: 27
|
|
10278
10480
|
}
|
|
10279
10481
|
}), showSelectAll && (item === null || item === void 0 ? void 0 : item.id) === '!all' && selectedValue !== null && selectedValue !== void 0 && selectedValue.length && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) < (items === null || items === void 0 ? void 0 : items.length) ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled, {
|
|
10280
10482
|
__self: undefined,
|
|
10281
10483
|
__source: {
|
|
10282
|
-
fileName: _jsxFileName$
|
|
10484
|
+
fileName: _jsxFileName$w,
|
|
10283
10485
|
lineNumber: 682,
|
|
10284
10486
|
columnNumber: 25
|
|
10285
10487
|
}
|
|
10286
10488
|
}, "-") : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10287
10489
|
__self: undefined,
|
|
10288
10490
|
__source: {
|
|
10289
|
-
fileName: _jsxFileName$
|
|
10491
|
+
fileName: _jsxFileName$w,
|
|
10290
10492
|
lineNumber: 684,
|
|
10291
10493
|
columnNumber: 25
|
|
10292
10494
|
}
|
|
@@ -10296,7 +10498,7 @@
|
|
|
10296
10498
|
},
|
|
10297
10499
|
__self: undefined,
|
|
10298
10500
|
__source: {
|
|
10299
|
-
fileName: _jsxFileName$
|
|
10501
|
+
fileName: _jsxFileName$w,
|
|
10300
10502
|
lineNumber: 687,
|
|
10301
10503
|
columnNumber: 21
|
|
10302
10504
|
}
|
|
@@ -10309,14 +10511,14 @@
|
|
|
10309
10511
|
}), {
|
|
10310
10512
|
__self: undefined,
|
|
10311
10513
|
__source: {
|
|
10312
|
-
fileName: _jsxFileName$
|
|
10514
|
+
fileName: _jsxFileName$w,
|
|
10313
10515
|
lineNumber: 692,
|
|
10314
10516
|
columnNumber: 13
|
|
10315
10517
|
}
|
|
10316
10518
|
}), /*#__PURE__*/React__default["default"].createElement(StyledDiv$1, {
|
|
10317
10519
|
__self: undefined,
|
|
10318
10520
|
__source: {
|
|
10319
|
-
fileName: _jsxFileName$
|
|
10521
|
+
fileName: _jsxFileName$w,
|
|
10320
10522
|
lineNumber: 693,
|
|
10321
10523
|
columnNumber: 15
|
|
10322
10524
|
}
|
|
@@ -10326,7 +10528,7 @@
|
|
|
10326
10528
|
},
|
|
10327
10529
|
__self: undefined,
|
|
10328
10530
|
__source: {
|
|
10329
|
-
fileName: _jsxFileName$
|
|
10531
|
+
fileName: _jsxFileName$w,
|
|
10330
10532
|
lineNumber: 694,
|
|
10331
10533
|
columnNumber: 17
|
|
10332
10534
|
}
|
|
@@ -10338,7 +10540,7 @@
|
|
|
10338
10540
|
},
|
|
10339
10541
|
__self: undefined,
|
|
10340
10542
|
__source: {
|
|
10341
|
-
fileName: _jsxFileName$
|
|
10543
|
+
fileName: _jsxFileName$w,
|
|
10342
10544
|
lineNumber: 695,
|
|
10343
10545
|
columnNumber: 19
|
|
10344
10546
|
}
|
|
@@ -10370,7 +10572,6 @@
|
|
|
10370
10572
|
collapsible: PropTypes__default["default"].bool
|
|
10371
10573
|
};
|
|
10372
10574
|
InputSelectCheck.defaultProps = {
|
|
10373
|
-
placeholder: 'Select Item',
|
|
10374
10575
|
size: 'lg',
|
|
10375
10576
|
disabled: false,
|
|
10376
10577
|
readOnly: false,
|
|
@@ -10386,7 +10587,7 @@
|
|
|
10386
10587
|
collapsible: true
|
|
10387
10588
|
};
|
|
10388
10589
|
|
|
10389
|
-
var _jsxFileName$
|
|
10590
|
+
var _jsxFileName$v = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectTag\\InputSelectTag.js";
|
|
10390
10591
|
const InputSelectTag = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
10391
10592
|
return /*#__PURE__*/React__namespace.createElement(InputSelectCheck, _extends({
|
|
10392
10593
|
ref: ref,
|
|
@@ -10394,7 +10595,7 @@
|
|
|
10394
10595
|
}, props, {
|
|
10395
10596
|
__self: undefined,
|
|
10396
10597
|
__source: {
|
|
10397
|
-
fileName: _jsxFileName$
|
|
10598
|
+
fileName: _jsxFileName$v,
|
|
10398
10599
|
lineNumber: 6,
|
|
10399
10600
|
columnNumber: 10
|
|
10400
10601
|
}
|
|
@@ -10422,7 +10623,6 @@
|
|
|
10422
10623
|
collapsible: PropTypes__default["default"].bool
|
|
10423
10624
|
};
|
|
10424
10625
|
InputSelectTag.defaultProps = {
|
|
10425
|
-
placeholder: 'Select Item',
|
|
10426
10626
|
size: 'lg',
|
|
10427
10627
|
disabled: false,
|
|
10428
10628
|
readOnly: false,
|
|
@@ -10434,11 +10634,10 @@
|
|
|
10434
10634
|
unremovableTags: [],
|
|
10435
10635
|
sortBy: 'name',
|
|
10436
10636
|
showCounter: false,
|
|
10437
|
-
labelCounter: 'Item terpilih',
|
|
10438
10637
|
collapsible: true
|
|
10439
10638
|
};
|
|
10440
10639
|
|
|
10441
|
-
var _jsxFileName$
|
|
10640
|
+
var _jsxFileName$u = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputCreatable\\InputCreatable.js";
|
|
10442
10641
|
const Wrapper = styled('div', {
|
|
10443
10642
|
margin: 0,
|
|
10444
10643
|
flexDirection: 'column',
|
|
@@ -10611,7 +10810,7 @@
|
|
|
10611
10810
|
return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
|
|
10612
10811
|
__self: this,
|
|
10613
10812
|
__source: {
|
|
10614
|
-
fileName: _jsxFileName$
|
|
10813
|
+
fileName: _jsxFileName$u,
|
|
10615
10814
|
lineNumber: 169,
|
|
10616
10815
|
columnNumber: 5
|
|
10617
10816
|
}
|
|
@@ -10621,7 +10820,7 @@
|
|
|
10621
10820
|
disabled: disabled || readOnly,
|
|
10622
10821
|
__self: this,
|
|
10623
10822
|
__source: {
|
|
10624
|
-
fileName: _jsxFileName$
|
|
10823
|
+
fileName: _jsxFileName$u,
|
|
10625
10824
|
lineNumber: 170,
|
|
10626
10825
|
columnNumber: 7
|
|
10627
10826
|
}
|
|
@@ -10635,7 +10834,7 @@
|
|
|
10635
10834
|
onChange: event => handleInputValue(event.target.value),
|
|
10636
10835
|
__self: this,
|
|
10637
10836
|
__source: {
|
|
10638
|
-
fileName: _jsxFileName$
|
|
10837
|
+
fileName: _jsxFileName$u,
|
|
10639
10838
|
lineNumber: 171,
|
|
10640
10839
|
columnNumber: 9
|
|
10641
10840
|
}
|
|
@@ -10645,14 +10844,14 @@
|
|
|
10645
10844
|
},
|
|
10646
10845
|
__self: this,
|
|
10647
10846
|
__source: {
|
|
10648
|
-
fileName: _jsxFileName$
|
|
10847
|
+
fileName: _jsxFileName$u,
|
|
10649
10848
|
lineNumber: 181,
|
|
10650
10849
|
columnNumber: 7
|
|
10651
10850
|
}
|
|
10652
10851
|
}, /*#__PURE__*/React__default["default"].createElement(ItemWrapper, {
|
|
10653
10852
|
__self: this,
|
|
10654
10853
|
__source: {
|
|
10655
|
-
fileName: _jsxFileName$
|
|
10854
|
+
fileName: _jsxFileName$u,
|
|
10656
10855
|
lineNumber: 182,
|
|
10657
10856
|
columnNumber: 9
|
|
10658
10857
|
}
|
|
@@ -10660,7 +10859,7 @@
|
|
|
10660
10859
|
color: colors$4.iconGreen,
|
|
10661
10860
|
__self: this,
|
|
10662
10861
|
__source: {
|
|
10663
|
-
fileName: _jsxFileName$
|
|
10862
|
+
fileName: _jsxFileName$u,
|
|
10664
10863
|
lineNumber: 183,
|
|
10665
10864
|
columnNumber: 11
|
|
10666
10865
|
}
|
|
@@ -10671,7 +10870,7 @@
|
|
|
10671
10870
|
},
|
|
10672
10871
|
__self: this,
|
|
10673
10872
|
__source: {
|
|
10674
|
-
fileName: _jsxFileName$
|
|
10873
|
+
fileName: _jsxFileName$u,
|
|
10675
10874
|
lineNumber: 184,
|
|
10676
10875
|
columnNumber: 11
|
|
10677
10876
|
}
|
|
@@ -11069,7 +11268,18 @@
|
|
|
11069
11268
|
var _g = React.useState(items),
|
|
11070
11269
|
inputItems = _g[0],
|
|
11071
11270
|
setInputItems = _g[1];
|
|
11072
|
-
var _h =
|
|
11271
|
+
var _h = React.useState(false),
|
|
11272
|
+
openOptions = _h[0],
|
|
11273
|
+
setOpenOptions = _h[1];
|
|
11274
|
+
var selectBoxRef = React.useRef(null);
|
|
11275
|
+
var _j = React.useState(0),
|
|
11276
|
+
optionsWidth = _j[0],
|
|
11277
|
+
setOptionsWidth = _j[1];
|
|
11278
|
+
React.useLayoutEffect(function () {
|
|
11279
|
+
var _a, _b;
|
|
11280
|
+
setOptionsWidth((_b = (_a = selectBoxRef === null || selectBoxRef === void 0 ? void 0 : selectBoxRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0);
|
|
11281
|
+
}, [selectBoxRef]);
|
|
11282
|
+
var _k = Downshift.useCombobox({
|
|
11073
11283
|
items: inputItems,
|
|
11074
11284
|
defaultInputValue: defaultValue,
|
|
11075
11285
|
onInputValueChange: function (_a) {
|
|
@@ -11081,51 +11291,70 @@
|
|
|
11081
11291
|
}));
|
|
11082
11292
|
}
|
|
11083
11293
|
}),
|
|
11084
|
-
isOpen =
|
|
11085
|
-
getMenuProps =
|
|
11086
|
-
getInputProps =
|
|
11087
|
-
getComboboxProps =
|
|
11088
|
-
highlightedIndex =
|
|
11089
|
-
getItemProps =
|
|
11090
|
-
return jsxRuntime.
|
|
11091
|
-
|
|
11294
|
+
isOpen = _k.isOpen,
|
|
11295
|
+
getMenuProps = _k.getMenuProps,
|
|
11296
|
+
getInputProps = _k.getInputProps,
|
|
11297
|
+
getComboboxProps = _k.getComboboxProps,
|
|
11298
|
+
highlightedIndex = _k.highlightedIndex,
|
|
11299
|
+
getItemProps = _k.getItemProps;
|
|
11300
|
+
return jsxRuntime.jsx(Popover, __assign({
|
|
11301
|
+
open: openOptions || isOpen,
|
|
11302
|
+
onOpenChange: setOpenOptions,
|
|
11303
|
+
placement: placement,
|
|
11304
|
+
hideOnScroll: true
|
|
11092
11305
|
}, {
|
|
11093
|
-
children:
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
isInvalid: isInvalid
|
|
11097
|
-
}, {
|
|
11098
|
-
children: jsxRuntime.jsx(SelectInputSearch, __assign({
|
|
11099
|
-
showLeadingIcon: showLeadingIcon,
|
|
11100
|
-
disabled: disabled,
|
|
11101
|
-
placeholder: placeholder,
|
|
11102
|
-
inputProps: getInputProps({}, {
|
|
11103
|
-
suppressRefError: true
|
|
11104
|
-
})
|
|
11105
|
-
}, props, {
|
|
11106
|
-
ref: forwardedRef
|
|
11107
|
-
}), void 0)
|
|
11108
|
-
}), void 0), inputItems.length > 0 && jsxRuntime.jsx(OptionWrapper$2, __assign({}, getMenuProps(), {
|
|
11109
|
-
css: {
|
|
11110
|
-
display: isOpen ? 'block' : 'none'
|
|
11111
|
-
},
|
|
11112
|
-
placement: placement
|
|
11306
|
+
children: jsxRuntime.jsxs(SelectContainer, __assign({
|
|
11307
|
+
css: css,
|
|
11308
|
+
ref: selectBoxRef
|
|
11113
11309
|
}, {
|
|
11114
|
-
children: jsxRuntime.jsx(
|
|
11115
|
-
children:
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11310
|
+
children: [jsxRuntime.jsx(PopoverTrigger, {
|
|
11311
|
+
children: jsxRuntime.jsx(SelectBox, __assign({}, getComboboxProps(), {
|
|
11312
|
+
size: size,
|
|
11313
|
+
disabled: disabled,
|
|
11314
|
+
isInvalid: isInvalid
|
|
11315
|
+
}, {
|
|
11316
|
+
children: jsxRuntime.jsx(SelectInputSearch, __assign({
|
|
11317
|
+
showLeadingIcon: showLeadingIcon,
|
|
11318
|
+
disabled: disabled,
|
|
11319
|
+
placeholder: placeholder,
|
|
11320
|
+
inputProps: getInputProps({}, {
|
|
11321
|
+
suppressRefError: true
|
|
11322
|
+
})
|
|
11323
|
+
}, props, {
|
|
11324
|
+
ref: forwardedRef
|
|
11325
|
+
}), void 0)
|
|
11326
|
+
}), void 0)
|
|
11327
|
+
}, void 0), jsxRuntime.jsx(helpers.Portal, {
|
|
11328
|
+
children: jsxRuntime.jsx(PopoverContent, __assign({
|
|
11329
|
+
style: {
|
|
11330
|
+
width: optionsWidth
|
|
11331
|
+
}
|
|
11332
|
+
}, {
|
|
11333
|
+
children: inputItems.length > 0 && jsxRuntime.jsx(OptionWrapper$2, __assign({}, getMenuProps(), {
|
|
11121
11334
|
css: {
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
}
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11335
|
+
display: isOpen ? 'block' : 'none',
|
|
11336
|
+
pointerEvents: 'auto'
|
|
11337
|
+
},
|
|
11338
|
+
placement: placement
|
|
11339
|
+
}, {
|
|
11340
|
+
children: jsxRuntime.jsx(SelectOption, {
|
|
11341
|
+
children: inputItems.map(function (item, index) {
|
|
11342
|
+
return /*#__PURE__*/React.createElement(SelectItem, __assign({}, getItemProps({
|
|
11343
|
+
item: item,
|
|
11344
|
+
index: index
|
|
11345
|
+
}), {
|
|
11346
|
+
key: "".concat(item).concat(index),
|
|
11347
|
+
css: {
|
|
11348
|
+
backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
|
|
11349
|
+
fontWeight: 'normal'
|
|
11350
|
+
}
|
|
11351
|
+
}), item);
|
|
11352
|
+
})
|
|
11353
|
+
}, void 0)
|
|
11354
|
+
}), void 0)
|
|
11355
|
+
}), void 0)
|
|
11356
|
+
}, void 0)]
|
|
11357
|
+
}), void 0)
|
|
11129
11358
|
}), void 0);
|
|
11130
11359
|
});
|
|
11131
11360
|
|
|
@@ -11443,140 +11672,6 @@
|
|
|
11443
11672
|
size: 'lg'
|
|
11444
11673
|
};
|
|
11445
11674
|
|
|
11446
|
-
const _excluded$c = ["children"];
|
|
11447
|
-
var _jsxFileName$u = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\popover\\Popover.js";
|
|
11448
|
-
const {
|
|
11449
|
-
zIndices
|
|
11450
|
-
} = core.foundations;
|
|
11451
|
-
const PopoverContext = /*#__PURE__*/React.createContext();
|
|
11452
|
-
const Popover = ({
|
|
11453
|
-
children,
|
|
11454
|
-
open: _open = false,
|
|
11455
|
-
onOpenChange,
|
|
11456
|
-
placement,
|
|
11457
|
-
sideOffset: _sideOffset = 5
|
|
11458
|
-
}) => {
|
|
11459
|
-
const [openState, setOpenState] = React.useState(false);
|
|
11460
|
-
React.useEffect(() => {
|
|
11461
|
-
setOpenState(_open);
|
|
11462
|
-
}, [_open]);
|
|
11463
|
-
React.useEffect(() => {
|
|
11464
|
-
if (onOpenChange) onOpenChange(openState);
|
|
11465
|
-
}, [openState, onOpenChange]);
|
|
11466
|
-
const floatingHook = reactDomInteractions.useFloating({
|
|
11467
|
-
open: openState,
|
|
11468
|
-
onOpenChange: setOpenState,
|
|
11469
|
-
middleware: [reactDomInteractions.offset(_sideOffset), reactDomInteractions.flip(), reactDomInteractions.shift()],
|
|
11470
|
-
placement
|
|
11471
|
-
});
|
|
11472
|
-
const {
|
|
11473
|
-
getReferenceProps,
|
|
11474
|
-
getFloatingProps
|
|
11475
|
-
} = reactDomInteractions.useInteractions([reactDomInteractions.useClick(floatingHook.context), reactDomInteractions.useDismiss(floatingHook.context)]);
|
|
11476
|
-
const value = {
|
|
11477
|
-
openState,
|
|
11478
|
-
setOpenState,
|
|
11479
|
-
floatingHook,
|
|
11480
|
-
getReferenceProps,
|
|
11481
|
-
getFloatingProps
|
|
11482
|
-
};
|
|
11483
|
-
return /*#__PURE__*/React__default["default"].createElement(PopoverContext.Provider, {
|
|
11484
|
-
value: value,
|
|
11485
|
-
__self: undefined,
|
|
11486
|
-
__source: {
|
|
11487
|
-
fileName: _jsxFileName$u,
|
|
11488
|
-
lineNumber: 44,
|
|
11489
|
-
columnNumber: 10
|
|
11490
|
-
}
|
|
11491
|
-
}, children);
|
|
11492
|
-
};
|
|
11493
|
-
const PopoverTrigger = ({
|
|
11494
|
-
children,
|
|
11495
|
-
disabled
|
|
11496
|
-
}) => {
|
|
11497
|
-
const {
|
|
11498
|
-
floatingHook: {
|
|
11499
|
-
reference
|
|
11500
|
-
},
|
|
11501
|
-
getReferenceProps
|
|
11502
|
-
} = React.useContext(PopoverContext);
|
|
11503
|
-
return disabled ? children : /*#__PURE__*/React.cloneElement(children, getReferenceProps(Object.assign({
|
|
11504
|
-
ref: reference
|
|
11505
|
-
}, children.props)));
|
|
11506
|
-
};
|
|
11507
|
-
const PopoverContent = ({
|
|
11508
|
-
children,
|
|
11509
|
-
isMobile,
|
|
11510
|
-
style
|
|
11511
|
-
}) => {
|
|
11512
|
-
const {
|
|
11513
|
-
openState,
|
|
11514
|
-
floatingHook: {
|
|
11515
|
-
x,
|
|
11516
|
-
y,
|
|
11517
|
-
floating,
|
|
11518
|
-
strategy,
|
|
11519
|
-
context
|
|
11520
|
-
},
|
|
11521
|
-
getFloatingProps
|
|
11522
|
-
} = React.useContext(PopoverContext);
|
|
11523
|
-
return openState ? /*#__PURE__*/React__default["default"].createElement(reactDomInteractions.FloatingFocusManager, {
|
|
11524
|
-
context: context,
|
|
11525
|
-
modal: false,
|
|
11526
|
-
order: ['reference', 'content'],
|
|
11527
|
-
returnFocus: false,
|
|
11528
|
-
__self: undefined,
|
|
11529
|
-
__source: {
|
|
11530
|
-
fileName: _jsxFileName$u,
|
|
11531
|
-
lineNumber: 62,
|
|
11532
|
-
columnNumber: 5
|
|
11533
|
-
}
|
|
11534
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", _extends({}, getFloatingProps({
|
|
11535
|
-
ref: floating,
|
|
11536
|
-
style: Object.assign({
|
|
11537
|
-
position: strategy,
|
|
11538
|
-
top: isMobile ? 0 : y != null ? y : '',
|
|
11539
|
-
left: isMobile ? 0 : x != null ? x : '',
|
|
11540
|
-
zIndex: zIndices.popover
|
|
11541
|
-
}, style)
|
|
11542
|
-
}), {
|
|
11543
|
-
__self: undefined,
|
|
11544
|
-
__source: {
|
|
11545
|
-
fileName: _jsxFileName$u,
|
|
11546
|
-
lineNumber: 63,
|
|
11547
|
-
columnNumber: 7
|
|
11548
|
-
}
|
|
11549
|
-
}), children)) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
11550
|
-
};
|
|
11551
|
-
const PopoverClose = _ref => {
|
|
11552
|
-
let {
|
|
11553
|
-
children
|
|
11554
|
-
} = _ref,
|
|
11555
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
11556
|
-
const {
|
|
11557
|
-
setOpenState
|
|
11558
|
-
} = React.useContext(PopoverContext);
|
|
11559
|
-
return /*#__PURE__*/React__default["default"].createElement(Flex$1, _extends({}, props, {
|
|
11560
|
-
onClick: () => {
|
|
11561
|
-
if (props.onClick) props.onClick();
|
|
11562
|
-
setOpenState(false);
|
|
11563
|
-
},
|
|
11564
|
-
__self: undefined,
|
|
11565
|
-
__source: {
|
|
11566
|
-
fileName: _jsxFileName$u,
|
|
11567
|
-
lineNumber: 86,
|
|
11568
|
-
columnNumber: 5
|
|
11569
|
-
}
|
|
11570
|
-
}), children);
|
|
11571
|
-
};
|
|
11572
|
-
Popover.propTypes = {
|
|
11573
|
-
open: PropTypes__default["default"].bool,
|
|
11574
|
-
onOpenChange: PropTypes__default["default"].func,
|
|
11575
|
-
placement: PropTypes__default["default"].oneOf(['top', 'top-start', 'top-end', 'right', 'right-start', 'right-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end']),
|
|
11576
|
-
sideOffset: PropTypes__default["default"].number
|
|
11577
|
-
};
|
|
11578
|
-
Popover.displayName = 'Popover';
|
|
11579
|
-
|
|
11580
11675
|
const _excluded$b = ["className", "defaultValue", "value", "name", "disabled", "orientation", "dir", "min", "max", "step", "onValueChange", "minStepsBetweenThumbs", "color", "size", "width", "height"];
|
|
11581
11676
|
var _jsxFileName$t = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\slider\\Slider.js";
|
|
11582
11677
|
const StyledSlider = react.styled(SliderPrimitive__namespace.Root, {
|