@majoo-ui/react 1.55.16 → 1.55.18

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('otp-input-react'), require('@floating-ui/react-dom-interactions'), 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', 'otp-input-react', '@floating-ui/react-dom-interactions', '@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.OTPInput, global.reactDomInteractions, 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, OTPInput, reactDomInteractions, 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';
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 = "Heading";
2857
+ Heading.displayName = 'Heading';
2858
2858
 
2859
2859
  const Paragraph = styled(Text$1, {
2860
2860
  variants: {
@@ -4945,7 +4945,7 @@
4945
4945
  const _excluded$s = ["children", "label", "color", "css", "withClick", "side", "align"];
4946
4946
  var _jsxFileName$T = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\tooltip\\Tooltip.js";
4947
4947
  const {
4948
- zIndices: zIndices$1
4948
+ zIndices: zIndices$2
4949
4949
  } = core.foundations;
4950
4950
  const slideUpAndFade$2 = keyframes({
4951
4951
  '0%': {
@@ -4988,7 +4988,7 @@
4988
4988
  }
4989
4989
  });
4990
4990
  const StyledContent$6 = styled(TooltipPrimitive__namespace.Content, {
4991
- zIndex: zIndices$1.tooltip,
4991
+ zIndex: zIndices$2.tooltip,
4992
4992
  borderRadius: 8,
4993
4993
  padding: '8px',
4994
4994
  fontSize: '$helper',
@@ -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, checked) {
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 || checked !== props.value,
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: 159,
6732
- columnNumber: 16
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 || checked !== props.value,
6738
- readOnly: readOnly || checked !== props.value,
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: 163,
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 && checked !== props.value ? '$textDisable' : '$textPrimary'
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: 173,
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: 192,
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 checked = value != null ? value : defaultValue;
6781
- return /*#__PURE__*/React__default["default"].createElement(Container$a, {
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 && checked === props.value && !disabled && !readOnly,
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: 197,
6793
- columnNumber: 11
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: 206,
6802
- columnNumber: 13
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: 207,
6813
- columnNumber: 15
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: 208,
6820
- columnNumber: 17
6842
+ lineNumber: 225,
6843
+ columnNumber: 19
6821
6844
  }
6822
- })), renderInputType(inputType, checked)), description && /*#__PURE__*/React__default["default"].createElement(Text$1, {
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: 213,
6832
- columnNumber: 15
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] = React__default["default"].useState('');
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 handleChange = React__default["default"].useCallback(e => {
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 (onChange) {
8270
- onChange(e.target.value);
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: 33,
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: 34,
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: 34,
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: 35,
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: 46,
8326
- columnNumber: 43
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: 46,
8333
- columnNumber: 61
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: 45,
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,145 @@
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: zIndices$1
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$1.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
+
8677
+ var zIndices = core.foundations.zIndices;
8510
8678
  var SelectContainer = styled('div', {
8511
8679
  margin: 0,
8512
8680
  flexDirection: 'column',
@@ -8664,6 +8832,11 @@
8664
8832
  var OptionWrapper$2 = styled('div', {
8665
8833
  display: 'none',
8666
8834
  overflow: 'auto',
8835
+ fontFamily: 'inherit',
8836
+ fontVariantNumeric: 'tabular-nums',
8837
+ fontSize: '$short-content-regular',
8838
+ fontWeight: '400',
8839
+ textAlign: 'left',
8667
8840
  zIndex: 1,
8668
8841
  borderRadius: '$sm',
8669
8842
  backgroundColor: '$bgWhite',
@@ -8852,6 +9025,10 @@
8852
9025
  var _u = React.useState(),
8853
9026
  query = _u[0],
8854
9027
  setQuery = _u[1];
9028
+ var _v = React.useState(false),
9029
+ openOptions = _v[0],
9030
+ setOpenOptions = _v[1];
9031
+ var selectBoxRef = React.useRef(null);
8855
9032
  var scrollerRef = React.useRef(null);
8856
9033
  React.useEffect(function () {
8857
9034
  var _a;
@@ -8939,6 +9116,7 @@
8939
9116
  }
8940
9117
  }, {
8941
9118
  children: function (_a) {
9119
+ var _b, _c;
8942
9120
  var getRootProps = _a.getRootProps,
8943
9121
  getToggleButtonProps = _a.getToggleButtonProps,
8944
9122
  getMenuProps = _a.getMenuProps,
@@ -8962,200 +9140,228 @@
8962
9140
  }, void 0)
8963
9141
  }), void 0);
8964
9142
  };
8965
- return jsxRuntime.jsxs(SelectContainer, __assign({
8966
- css: css
9143
+ return jsxRuntime.jsx(Popover, __assign({
9144
+ open: openOptions,
9145
+ onOpenChange: setOpenOptions,
9146
+ placement: placement,
9147
+ hideOnScroll: true
8967
9148
  }, {
8968
- children: [jsxRuntime.jsx(ConditionalWrapper, __assign({
8969
- condition: showTooltip && selectedValue,
8970
- wrapper: function (children) {
8971
- return jsxRuntime.jsx(Tooltip$1, __assign({
8972
- color: "dark",
8973
- label: selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.name
8974
- }, {
8975
- children: children
8976
- }), void 0);
8977
- }
9149
+ children: jsxRuntime.jsxs(SelectContainer, __assign({
9150
+ css: css,
9151
+ ref: selectBoxRef
8978
9152
  }, {
8979
- children: jsxRuntime.jsxs(SelectBox, __assign({}, getRootProps({
8980
- refKey: 'ref'
8981
- }, {
8982
- suppressRefError: true
8983
- }), {
8984
- size: size,
8985
- disabled: disabled,
8986
- readOnly: readOnly,
8987
- isInvalid: isInvalid
9153
+ children: [jsxRuntime.jsx(ConditionalWrapper, __assign({
9154
+ condition: showTooltip && selectedValue,
9155
+ wrapper: function (children) {
9156
+ return jsxRuntime.jsx(Tooltip$1, __assign({
9157
+ color: "dark",
9158
+ label: selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.name
9159
+ }, {
9160
+ children: children
9161
+ }), void 0);
9162
+ }
8988
9163
  }, {
8989
- children: [search ? jsxRuntime.jsx(Box, __assign({
8990
- style: {
8991
- width: '100%',
8992
- flex: 1
8993
- }
8994
- }, {
8995
- children: jsxRuntime.jsx(SelectInputSearch, {
8996
- showLeadingIcon: showLeadingIcon,
8997
- showClearIcon: hideArrowicon,
9164
+ children: jsxRuntime.jsx(PopoverTrigger, {
9165
+ children: jsxRuntime.jsxs(SelectBox, __assign({}, getRootProps({
9166
+ refKey: 'ref'
9167
+ }, {
9168
+ suppressRefError: true
9169
+ }), {
9170
+ size: size,
8998
9171
  disabled: disabled,
8999
- placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('placeholder', 'Pilih Item'),
9000
9172
  readOnly: readOnly,
9001
- handleInputValue: !fetchData ? handleInputValue : function (query) {
9002
- if (onSearch) onSearch(query);
9003
- setQuery(query);
9004
- },
9005
- inputProps: getInputProps({
9006
- onChange: function (event) {
9007
- if (event.type !== 'change') return;
9008
- var query = event.target.value;
9009
- if (!fetchData) handleInputValue(query);else debouncedSearch(query);
9010
- },
9011
- disabled: disabled
9012
- }),
9013
- onClick: !isOpen ? getToggleButtonProps({
9014
- disabled: disabled || readOnly
9015
- }).onClick : undefined
9016
- }, void 0)
9017
- }), void 0) : jsxRuntime.jsx(Button$3, __assign({}, getToggleButtonProps({
9018
- disabled: disabled || readOnly
9019
- }), {
9020
- disabled: disabled,
9021
- size: size,
9022
- readOnly: readOnly,
9023
- type: "button"
9024
- }, {
9025
- children: selectedItem ? selectedItem.render ? selectedItem.render(selectedItem) : jsxRuntime.jsx(Text$1, __assign({
9026
- color: disabled ? 'disable' : 'primary',
9027
- css: StyledText$1
9028
- }, {
9029
- children: selectedItem.name
9030
- }), void 0) : jsxRuntime.jsx(Text$1, __assign({
9031
- color: "disable",
9032
- css: StyledText$1
9173
+ isInvalid: isInvalid
9033
9174
  }, {
9034
- children: placeholder !== null && placeholder !== void 0 ? placeholder : t('placeholder', 'Pilih Item')
9175
+ children: [search ? jsxRuntime.jsx(Box, __assign({
9176
+ style: {
9177
+ width: '100%',
9178
+ flex: 1
9179
+ }
9180
+ }, {
9181
+ children: jsxRuntime.jsx(SelectInputSearch, {
9182
+ showLeadingIcon: showLeadingIcon,
9183
+ showClearIcon: hideArrowicon,
9184
+ disabled: disabled,
9185
+ placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('placeholder', 'Pilih Item'),
9186
+ readOnly: readOnly,
9187
+ handleInputValue: !fetchData ? handleInputValue : function (query) {
9188
+ if (onSearch) onSearch(query);
9189
+ setQuery(query);
9190
+ },
9191
+ inputProps: getInputProps({
9192
+ onChange: function (event) {
9193
+ if (event.type !== 'change') return;
9194
+ var query = event.target.value;
9195
+ if (!fetchData) handleInputValue(query);else debouncedSearch(query);
9196
+ },
9197
+ disabled: disabled
9198
+ }),
9199
+ onClick: !isOpen ? getToggleButtonProps({
9200
+ disabled: disabled || readOnly
9201
+ }).onClick : undefined
9202
+ }, void 0)
9203
+ }), void 0) : jsxRuntime.jsx(Button$3, __assign({}, getToggleButtonProps({
9204
+ disabled: disabled || readOnly
9205
+ }), {
9206
+ disabled: disabled,
9207
+ size: size,
9208
+ readOnly: readOnly,
9209
+ type: "button"
9210
+ }, {
9211
+ children: selectedItem ? selectedItem.render ? selectedItem.render(selectedItem) : jsxRuntime.jsx(Text$1, __assign({
9212
+ color: disabled ? 'disable' : 'primary',
9213
+ css: StyledText$1
9214
+ }, {
9215
+ children: selectedItem.name
9216
+ }), void 0) : jsxRuntime.jsx(Text$1, __assign({
9217
+ color: "disable",
9218
+ css: StyledText$1
9219
+ }, {
9220
+ children: placeholder !== null && placeholder !== void 0 ? placeholder : t('placeholder', 'Pilih Item')
9221
+ }), void 0)
9222
+ }), void 0), handleDownOption()]
9035
9223
  }), void 0)
9036
- }), void 0), handleDownOption()]
9037
- }), void 0)
9038
- }), void 0), isOpen && isLoading && jsxRuntime.jsx(Flex$1, __assign({
9039
- justify: "center",
9040
- align: "center",
9041
- css: {
9042
- position: 'absolute',
9043
- inset: 0,
9044
- zIndex: '$sticky',
9045
- top: placement === 'top' ? '-20px' : item.length > 0 ? size === 'lg' ? '40px' : '32px' : size === 'lg' ? '64px' : '56px',
9046
- // bottom: '80px',
9047
- width: '100%',
9048
- height: scrollerRef.current ? scrollerRef.current.clientHeight : '40px',
9049
- backgroundColor: '$bgWhite',
9050
- opacity: 0.8,
9051
- transform: placement === 'top' ? 'translate(0, -100%)' : 'none'
9052
- }
9053
- }, {
9054
- children: jsxRuntime.jsx(Text$1, __assign({
9055
- variant: "caption"
9056
- }, {
9057
- children: "Loading...."
9058
- }), void 0)
9059
- }), void 0), jsxRuntime.jsx(ConditionalWrapper, __assign({
9060
- condition: renderFooter && typeof renderFooter === 'function',
9061
- wrapper: function (child) {
9062
- return jsxRuntime.jsxs(Box, __assign({
9063
- css: {
9064
- position: 'absolute',
9065
- float: 'left',
9066
- display: isOpen ? 'block' : 'none',
9067
- zIndex: '$popover',
9068
- width: '100%'
9069
- }
9070
- }, {
9071
- children: [child, renderFooter && typeof renderFooter === 'function' && jsxRuntime.jsx(StyledFooter, {
9072
- children: renderFooter === null || renderFooter === void 0 ? void 0 : renderFooter()
9073
- }, void 0)]
9074
- }), void 0);
9075
- }
9076
- }, {
9077
- children: jsxRuntime.jsxs(OptionWrapper$2, __assign({}, getMenuProps({
9078
- ref: scrollerRef
9079
- }, {
9080
- suppressRefError: true
9081
- }), {
9082
- css: {
9083
- display: isOpen ? 'block' : 'none',
9084
- zIndex: '$popover'
9085
- },
9086
- withFooter: renderFooter && typeof renderFooter === 'function',
9087
- placement: placement
9088
- }, {
9089
- children: [!search && embedSearch && isOpen && jsxRuntime.jsx(SelectContainer, __assign({
9090
- css: {
9091
- position: 'sticky',
9092
- top: 0,
9093
- zIndex: '$sticky',
9094
- padding: '$spacing-04 $spacing-05 0',
9095
- backgroundColor: '$bgWhite'
9224
+ }, void 0)
9225
+ }), void 0), jsxRuntime.jsx(helpers.Portal, {
9226
+ children: jsxRuntime.jsx(PopoverContent, __assign({
9227
+ style: {
9228
+ 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,
9229
+ zIndex: zIndices.tooltip
9096
9230
  }
9097
9231
  }, {
9098
- children: jsxRuntime.jsx(InputSearchbox, {
9099
- size: 'sm',
9100
- onChange: handleInputValue,
9101
- placeholder: searchPlaceholder !== null && searchPlaceholder !== void 0 ? searchPlaceholder : t('searchPlaceholder', 'Cari ...')
9102
- }, void 0)
9103
- }), void 0), item.length > 0 || isLoading ? jsxRuntime.jsx(ConditionalWrapper, __assign({
9104
- condition: !!fetchData && item.length > 0,
9105
- wrapper: function (children) {
9106
- return jsxRuntime.jsx(InfiniteScroll__default["default"], __assign({
9107
- loadMore: function (_) {
9108
- if (!isLoading && fetchData) fetchData({
9109
- query: query
9110
- });
9111
- },
9112
- hasMore: true,
9113
- threshold: 5,
9114
- useWindow: false
9232
+ children: jsxRuntime.jsxs(jsxRuntime.Fragment, {
9233
+ children: [isOpen && isLoading && jsxRuntime.jsx(Flex$1, __assign({
9234
+ justify: "center",
9235
+ align: "center",
9236
+ css: {
9237
+ position: 'absolute',
9238
+ inset: 0,
9239
+ zIndex: '$tooltip',
9240
+ top: item.length > 0 ? '0px' : placement === 'top' ? '-20px' : '20px',
9241
+ // bottom: '80px',
9242
+ width: '100%',
9243
+ height: scrollerRef.current ? scrollerRef.current.clientHeight : '40px',
9244
+ backgroundColor: '$bgWhite',
9245
+ opacity: 0.8,
9246
+ transform: placement === 'top' ? 'translate(0, -100%)' : 'none'
9247
+ }
9115
9248
  }, {
9116
- children: children
9117
- }), void 0);
9118
- }
9119
- }, {
9120
- children: jsxRuntime.jsx(SelectOption, {
9121
- children: item.map(function (item, index) {
9122
- var _a;
9123
- return /*#__PURE__*/React.createElement(SelectItem, __assign({}, getItemProps({
9124
- item: item,
9125
- disabled: item.isDisabled
9126
- }), {
9127
- key: (_a = item.value) !== null && _a !== void 0 ? _a : index,
9128
- css: item.isDisabled ? {
9129
- backgroundColor: 'unset',
9130
- cursor: 'not-allowed',
9131
- color: '$textDisable'
9132
- } : {
9133
- backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
9134
- fontWeight: 'normal',
9135
- color: selectedItem && selectedItem.value === item.value ? '$textGreen' : '$textPrimary'
9136
- }
9137
- }), item.render ? item.render(selectedItem) : item.name);
9138
- })
9139
- }, void 0)
9140
- }), void 0) : jsxRuntime.jsx(SelectOption, {
9141
- children: jsxRuntime.jsxs(StyledDiv$2, {
9142
- children: [jsxRuntime.jsx("div", __assign({
9143
- style: {
9144
- marginRight: '6px'
9249
+ children: jsxRuntime.jsx(Text$1, __assign({
9250
+ variant: "caption"
9251
+ }, {
9252
+ children: "Loading...."
9253
+ }), void 0)
9254
+ }), void 0), jsxRuntime.jsx(ConditionalWrapper, __assign({
9255
+ condition: renderFooter && typeof renderFooter === 'function',
9256
+ wrapper: function (child) {
9257
+ return jsxRuntime.jsxs(Box, __assign({
9258
+ css: {
9259
+ position: 'absolute',
9260
+ float: 'left',
9261
+ display: isOpen ? 'block' : 'none',
9262
+ zIndex: '$popover',
9263
+ width: '100%'
9264
+ }
9265
+ }, {
9266
+ children: [child, renderFooter && typeof renderFooter === 'function' && jsxRuntime.jsx(StyledFooter, {
9267
+ children: renderFooter === null || renderFooter === void 0 ? void 0 : renderFooter()
9268
+ }, void 0)]
9269
+ }), void 0);
9145
9270
  }
9146
9271
  }, {
9147
- children: jsxRuntime.jsx(icons.CircleInfoOutline, {
9148
- size: "16px",
9149
- color: colors$4.iconDisable,
9150
- style: {
9151
- verticalAlign: 'text-bottom'
9152
- }
9153
- }, void 0)
9154
- }), void 0), t('noItemPlaceholder', 'Item tidak ditemukan')]
9272
+ children: jsxRuntime.jsxs(OptionWrapper$2, __assign({}, getMenuProps({
9273
+ ref: scrollerRef
9274
+ }, {
9275
+ suppressRefError: true
9276
+ }), {
9277
+ css: {
9278
+ display: isOpen ? 'block' : 'none',
9279
+ zIndex: '$popover',
9280
+ pointerEvents: 'auto'
9281
+ },
9282
+ withFooter: renderFooter && typeof renderFooter === 'function',
9283
+ placement: placement
9284
+ }, {
9285
+ children: [!search && embedSearch && isOpen && jsxRuntime.jsx(SelectContainer, __assign({
9286
+ css: {
9287
+ position: 'sticky',
9288
+ top: 0,
9289
+ zIndex: '$sticky',
9290
+ padding: '$spacing-04 $spacing-05 0',
9291
+ backgroundColor: '$bgWhite'
9292
+ }
9293
+ }, {
9294
+ children: jsxRuntime.jsx(InputSearchbox, {
9295
+ size: 'sm',
9296
+ onChange: handleInputValue,
9297
+ placeholder: searchPlaceholder !== null && searchPlaceholder !== void 0 ? searchPlaceholder : t('searchPlaceholder', 'Cari ...')
9298
+ }, void 0)
9299
+ }), void 0), item.length > 0 || isLoading ? jsxRuntime.jsx(ConditionalWrapper, __assign({
9300
+ condition: !!fetchData && item.length > 0,
9301
+ wrapper: function (children) {
9302
+ return jsxRuntime.jsx(InfiniteScroll__default["default"], __assign({
9303
+ loadMore: function (_) {
9304
+ if (!isLoading && fetchData) fetchData({
9305
+ query: query
9306
+ });
9307
+ },
9308
+ hasMore: true,
9309
+ threshold: 5,
9310
+ useWindow: false
9311
+ }, {
9312
+ children: children
9313
+ }), void 0);
9314
+ }
9315
+ }, {
9316
+ children: jsxRuntime.jsx(PopoverClose, __assign({
9317
+ css: {
9318
+ display: 'block !important'
9319
+ }
9320
+ }, {
9321
+ children: jsxRuntime.jsx(SelectOption, {
9322
+ children: item.map(function (item, index) {
9323
+ var _a;
9324
+ return /*#__PURE__*/React.createElement(SelectItem, __assign({}, getItemProps({
9325
+ item: item,
9326
+ disabled: item.isDisabled
9327
+ }), {
9328
+ key: (_a = item.value) !== null && _a !== void 0 ? _a : index,
9329
+ css: item.isDisabled ? {
9330
+ backgroundColor: 'unset',
9331
+ cursor: 'not-allowed',
9332
+ color: '$textDisable'
9333
+ } : {
9334
+ backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
9335
+ fontWeight: 'normal',
9336
+ color: selectedItem && selectedItem.value === item.value ? '$textGreen' : '$textPrimary'
9337
+ }
9338
+ }), item.render ? item.render(selectedItem) : item.name);
9339
+ })
9340
+ }, void 0)
9341
+ }), void 0)
9342
+ }), void 0) : jsxRuntime.jsx(SelectOption, {
9343
+ children: jsxRuntime.jsxs(StyledDiv$2, {
9344
+ children: [jsxRuntime.jsx("div", __assign({
9345
+ style: {
9346
+ marginRight: '6px'
9347
+ }
9348
+ }, {
9349
+ children: jsxRuntime.jsx(icons.CircleInfoOutline, {
9350
+ size: "16px",
9351
+ color: colors$4.iconDisable,
9352
+ style: {
9353
+ verticalAlign: 'text-bottom'
9354
+ }
9355
+ }, void 0)
9356
+ }), void 0), t('noItemPlaceholder', 'Item tidak ditemukan')]
9357
+ }, void 0)
9358
+ }, void 0)]
9359
+ }), void 0)
9360
+ }), void 0)]
9155
9361
  }, void 0)
9156
- }, void 0)]
9157
- }), void 0)
9158
- }), void 0)]
9362
+ }), void 0)
9363
+ }, void 0)]
9364
+ }), void 0)
9159
9365
  }), void 0);
9160
9366
  }
9161
9367
  }), void 0);
@@ -9441,7 +9647,7 @@
9441
9647
  }
9442
9648
  });
9443
9649
 
9444
- var _jsxFileName$y = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectCheck\\icon\\CheckOutline.js";
9650
+ var _jsxFileName$x = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectCheck\\icon\\CheckOutline.js";
9445
9651
  const CheckOutline = props => /*#__PURE__*/React__namespace.createElement("svg", _extends({
9446
9652
  xmlns: "http://www.w3.org/2000/svg",
9447
9653
  xmlSpace: "preserve",
@@ -9458,7 +9664,7 @@
9458
9664
  }, props, {
9459
9665
  __self: undefined,
9460
9666
  __source: {
9461
- fileName: _jsxFileName$y,
9667
+ fileName: _jsxFileName$x,
9462
9668
  lineNumber: 4,
9463
9669
  columnNumber: 3
9464
9670
  }
@@ -9470,7 +9676,7 @@
9470
9676
  },
9471
9677
  __self: undefined,
9472
9678
  __source: {
9473
- fileName: _jsxFileName$y,
9679
+ fileName: _jsxFileName$x,
9474
9680
  lineNumber: 19,
9475
9681
  columnNumber: 5
9476
9682
  }
@@ -9482,14 +9688,14 @@
9482
9688
  },
9483
9689
  __self: undefined,
9484
9690
  __source: {
9485
- fileName: _jsxFileName$y,
9691
+ fileName: _jsxFileName$x,
9486
9692
  lineNumber: 26,
9487
9693
  columnNumber: 5
9488
9694
  }
9489
9695
  }));
9490
9696
 
9491
- const _excluded$d = ["placeholder", "option", "value", "size", "disabled", "onChange", "search", "readOnly", "placement", "disabledOptions", "textEmptyItem", "onRemoveItem", "isInvalid", "sortBy", "showSelectAll", "selectAllLabel", "showSelectedTag", "unremovableTags", "helperText", "css", "showCounter", "labelCounter", "collapsible"];
9492
- var _jsxFileName$x = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectCheck\\InputSelectCheck.js";
9697
+ 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"];
9698
+ var _jsxFileName$w = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectCheck\\InputSelectCheck.js";
9493
9699
  const Wrapper$1 = styled('div', {
9494
9700
  margin: 0,
9495
9701
  flexDirection: 'column',
@@ -9746,7 +9952,7 @@
9746
9952
  labelCounter,
9747
9953
  collapsible
9748
9954
  } = _ref,
9749
- props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
9955
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
9750
9956
  const {
9751
9957
  t
9752
9958
  } = reactI18next.useTranslation(['MajooUI/inputSelectCheck', 'translation']);
@@ -9976,7 +10182,7 @@
9976
10182
  }, props, {
9977
10183
  __self: undefined,
9978
10184
  __source: {
9979
- fileName: _jsxFileName$x,
10185
+ fileName: _jsxFileName$w,
9980
10186
  lineNumber: 523,
9981
10187
  columnNumber: 7
9982
10188
  }
@@ -9986,7 +10192,7 @@
9986
10192
  isInvalid: isInvalid,
9987
10193
  __self: undefined,
9988
10194
  __source: {
9989
- fileName: _jsxFileName$x,
10195
+ fileName: _jsxFileName$w,
9990
10196
  lineNumber: 524,
9991
10197
  columnNumber: 9
9992
10198
  }
@@ -10001,7 +10207,7 @@
10001
10207
  disabled: disabled || readOnly,
10002
10208
  __self: undefined,
10003
10209
  __source: {
10004
- fileName: _jsxFileName$x,
10210
+ fileName: _jsxFileName$w,
10005
10211
  lineNumber: 525,
10006
10212
  columnNumber: 11
10007
10213
  }
@@ -10017,7 +10223,7 @@
10017
10223
  hiddden: !search,
10018
10224
  __self: undefined,
10019
10225
  __source: {
10020
- fileName: _jsxFileName$x,
10226
+ fileName: _jsxFileName$w,
10021
10227
  lineNumber: 535,
10022
10228
  columnNumber: 13
10023
10229
  }
@@ -10030,7 +10236,7 @@
10030
10236
  hiddden: search,
10031
10237
  __self: undefined,
10032
10238
  __source: {
10033
- fileName: _jsxFileName$x,
10239
+ fileName: _jsxFileName$w,
10034
10240
  lineNumber: 541,
10035
10241
  columnNumber: 13
10036
10242
  }
@@ -10041,7 +10247,7 @@
10041
10247
  readOnly: readOnly,
10042
10248
  __self: undefined,
10043
10249
  __source: {
10044
- fileName: _jsxFileName$x,
10250
+ fileName: _jsxFileName$w,
10045
10251
  lineNumber: 551,
10046
10252
  columnNumber: 11
10047
10253
  }
@@ -10049,7 +10255,7 @@
10049
10255
  color: disabled || readOnly ? colors$4.iconDisable : colors$4.iconPrimary,
10050
10256
  __self: undefined,
10051
10257
  __source: {
10052
- fileName: _jsxFileName$x,
10258
+ fileName: _jsxFileName$w,
10053
10259
  lineNumber: 556,
10054
10260
  columnNumber: 13
10055
10261
  }
@@ -10062,7 +10268,7 @@
10062
10268
  },
10063
10269
  __self: undefined,
10064
10270
  __source: {
10065
- fileName: _jsxFileName$x,
10271
+ fileName: _jsxFileName$w,
10066
10272
  lineNumber: 560,
10067
10273
  columnNumber: 11
10068
10274
  }
@@ -10070,7 +10276,7 @@
10070
10276
  disabled: disabled,
10071
10277
  __self: undefined,
10072
10278
  __source: {
10073
- fileName: _jsxFileName$x,
10279
+ fileName: _jsxFileName$w,
10074
10280
  lineNumber: 566,
10075
10281
  columnNumber: 13
10076
10282
  }
@@ -10100,7 +10306,7 @@
10100
10306
  },
10101
10307
  __self: undefined,
10102
10308
  __source: {
10103
- fileName: _jsxFileName$x,
10309
+ fileName: _jsxFileName$w,
10104
10310
  lineNumber: 577,
10105
10311
  columnNumber: 19
10106
10312
  }
@@ -10110,14 +10316,14 @@
10110
10316
  onClick: toggleCollapsible,
10111
10317
  __self: undefined,
10112
10318
  __source: {
10113
- fileName: _jsxFileName$x,
10319
+ fileName: _jsxFileName$w,
10114
10320
  lineNumber: 598,
10115
10321
  columnNumber: 15
10116
10322
  }
10117
10323
  }, /*#__PURE__*/React__default["default"].createElement(Separator$2, {
10118
10324
  __self: undefined,
10119
10325
  __source: {
10120
- fileName: _jsxFileName$x,
10326
+ fileName: _jsxFileName$w,
10121
10327
  lineNumber: 599,
10122
10328
  columnNumber: 17
10123
10329
  }
@@ -10131,7 +10337,7 @@
10131
10337
  },
10132
10338
  __self: undefined,
10133
10339
  __source: {
10134
- fileName: _jsxFileName$x,
10340
+ fileName: _jsxFileName$w,
10135
10341
  lineNumber: 600,
10136
10342
  columnNumber: 17
10137
10343
  }
@@ -10139,7 +10345,7 @@
10139
10345
  color: colors$4.iconSecondary,
10140
10346
  __self: undefined,
10141
10347
  __source: {
10142
- fileName: _jsxFileName$x,
10348
+ fileName: _jsxFileName$w,
10143
10349
  lineNumber: 606,
10144
10350
  columnNumber: 21
10145
10351
  }
@@ -10147,7 +10353,7 @@
10147
10353
  color: colors$4.iconSecondary,
10148
10354
  __self: undefined,
10149
10355
  __source: {
10150
- fileName: _jsxFileName$x,
10356
+ fileName: _jsxFileName$w,
10151
10357
  lineNumber: 608,
10152
10358
  columnNumber: 21
10153
10359
  }
@@ -10159,14 +10365,14 @@
10159
10365
  color: "secondary",
10160
10366
  __self: undefined,
10161
10367
  __source: {
10162
- fileName: _jsxFileName$x,
10368
+ fileName: _jsxFileName$w,
10163
10369
  lineNumber: 610,
10164
10370
  columnNumber: 19
10165
10371
  }
10166
10372
  }, showAllTags ? t('showSomeText', 'Tampilkan Sebagian') : t('showAllText', 'Tampilkan Semua'))), /*#__PURE__*/React__default["default"].createElement(Separator$2, {
10167
10373
  __self: undefined,
10168
10374
  __source: {
10169
- fileName: _jsxFileName$x,
10375
+ fileName: _jsxFileName$w,
10170
10376
  lineNumber: 614,
10171
10377
  columnNumber: 17
10172
10378
  }
@@ -10174,7 +10380,7 @@
10174
10380
  disabled: disabled,
10175
10381
  __self: undefined,
10176
10382
  __source: {
10177
- fileName: _jsxFileName$x,
10383
+ fileName: _jsxFileName$w,
10178
10384
  lineNumber: 620,
10179
10385
  columnNumber: 11
10180
10386
  }
@@ -10202,7 +10408,7 @@
10202
10408
  },
10203
10409
  __self: undefined,
10204
10410
  __source: {
10205
- fileName: _jsxFileName$x,
10411
+ fileName: _jsxFileName$w,
10206
10412
  lineNumber: 621,
10207
10413
  columnNumber: 13
10208
10414
  }
@@ -10214,7 +10420,7 @@
10214
10420
  },
10215
10421
  __self: undefined,
10216
10422
  __source: {
10217
- fileName: _jsxFileName$x,
10423
+ fileName: _jsxFileName$w,
10218
10424
  lineNumber: 641,
10219
10425
  columnNumber: 9
10220
10426
  }
@@ -10223,7 +10429,7 @@
10223
10429
  }), {
10224
10430
  __self: undefined,
10225
10431
  __source: {
10226
- fileName: _jsxFileName$x,
10432
+ fileName: _jsxFileName$w,
10227
10433
  lineNumber: 646,
10228
10434
  columnNumber: 13
10229
10435
  }
@@ -10241,7 +10447,7 @@
10241
10447
  },
10242
10448
  __self: undefined,
10243
10449
  __source: {
10244
- fileName: _jsxFileName$x,
10450
+ fileName: _jsxFileName$w,
10245
10451
  lineNumber: 649,
10246
10452
  columnNumber: 19
10247
10453
  }
@@ -10254,7 +10460,7 @@
10254
10460
  },
10255
10461
  __self: undefined,
10256
10462
  __source: {
10257
- fileName: _jsxFileName$x,
10463
+ fileName: _jsxFileName$w,
10258
10464
  lineNumber: 662,
10259
10465
  columnNumber: 21
10260
10466
  }
@@ -10262,7 +10468,7 @@
10262
10468
  color: colors$4.iconDisable,
10263
10469
  __self: undefined,
10264
10470
  __source: {
10265
- fileName: _jsxFileName$x,
10471
+ fileName: _jsxFileName$w,
10266
10472
  lineNumber: 671,
10267
10473
  columnNumber: 25
10268
10474
  }
@@ -10270,21 +10476,21 @@
10270
10476
  color: colors$4.iconGreen,
10271
10477
  __self: undefined,
10272
10478
  __source: {
10273
- fileName: _jsxFileName$x,
10479
+ fileName: _jsxFileName$w,
10274
10480
  lineNumber: 675,
10275
10481
  columnNumber: 27
10276
10482
  }
10277
10483
  }), 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, {
10278
10484
  __self: undefined,
10279
10485
  __source: {
10280
- fileName: _jsxFileName$x,
10486
+ fileName: _jsxFileName$w,
10281
10487
  lineNumber: 682,
10282
10488
  columnNumber: 25
10283
10489
  }
10284
10490
  }, "-") : /*#__PURE__*/React__default["default"].createElement("div", {
10285
10491
  __self: undefined,
10286
10492
  __source: {
10287
- fileName: _jsxFileName$x,
10493
+ fileName: _jsxFileName$w,
10288
10494
  lineNumber: 684,
10289
10495
  columnNumber: 25
10290
10496
  }
@@ -10294,7 +10500,7 @@
10294
10500
  },
10295
10501
  __self: undefined,
10296
10502
  __source: {
10297
- fileName: _jsxFileName$x,
10503
+ fileName: _jsxFileName$w,
10298
10504
  lineNumber: 687,
10299
10505
  columnNumber: 21
10300
10506
  }
@@ -10307,14 +10513,14 @@
10307
10513
  }), {
10308
10514
  __self: undefined,
10309
10515
  __source: {
10310
- fileName: _jsxFileName$x,
10516
+ fileName: _jsxFileName$w,
10311
10517
  lineNumber: 692,
10312
10518
  columnNumber: 13
10313
10519
  }
10314
10520
  }), /*#__PURE__*/React__default["default"].createElement(StyledDiv$1, {
10315
10521
  __self: undefined,
10316
10522
  __source: {
10317
- fileName: _jsxFileName$x,
10523
+ fileName: _jsxFileName$w,
10318
10524
  lineNumber: 693,
10319
10525
  columnNumber: 15
10320
10526
  }
@@ -10324,7 +10530,7 @@
10324
10530
  },
10325
10531
  __self: undefined,
10326
10532
  __source: {
10327
- fileName: _jsxFileName$x,
10533
+ fileName: _jsxFileName$w,
10328
10534
  lineNumber: 694,
10329
10535
  columnNumber: 17
10330
10536
  }
@@ -10336,7 +10542,7 @@
10336
10542
  },
10337
10543
  __self: undefined,
10338
10544
  __source: {
10339
- fileName: _jsxFileName$x,
10545
+ fileName: _jsxFileName$w,
10340
10546
  lineNumber: 695,
10341
10547
  columnNumber: 19
10342
10548
  }
@@ -10383,7 +10589,7 @@
10383
10589
  collapsible: true
10384
10590
  };
10385
10591
 
10386
- var _jsxFileName$w = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectTag\\InputSelectTag.js";
10592
+ var _jsxFileName$v = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectTag\\InputSelectTag.js";
10387
10593
  const InputSelectTag = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
10388
10594
  return /*#__PURE__*/React__namespace.createElement(InputSelectCheck, _extends({
10389
10595
  ref: ref,
@@ -10391,7 +10597,7 @@
10391
10597
  }, props, {
10392
10598
  __self: undefined,
10393
10599
  __source: {
10394
- fileName: _jsxFileName$w,
10600
+ fileName: _jsxFileName$v,
10395
10601
  lineNumber: 6,
10396
10602
  columnNumber: 10
10397
10603
  }
@@ -10433,7 +10639,7 @@
10433
10639
  collapsible: true
10434
10640
  };
10435
10641
 
10436
- var _jsxFileName$v = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputCreatable\\InputCreatable.js";
10642
+ var _jsxFileName$u = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputCreatable\\InputCreatable.js";
10437
10643
  const Wrapper = styled('div', {
10438
10644
  margin: 0,
10439
10645
  flexDirection: 'column',
@@ -10606,7 +10812,7 @@
10606
10812
  return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
10607
10813
  __self: this,
10608
10814
  __source: {
10609
- fileName: _jsxFileName$v,
10815
+ fileName: _jsxFileName$u,
10610
10816
  lineNumber: 169,
10611
10817
  columnNumber: 5
10612
10818
  }
@@ -10616,7 +10822,7 @@
10616
10822
  disabled: disabled || readOnly,
10617
10823
  __self: this,
10618
10824
  __source: {
10619
- fileName: _jsxFileName$v,
10825
+ fileName: _jsxFileName$u,
10620
10826
  lineNumber: 170,
10621
10827
  columnNumber: 7
10622
10828
  }
@@ -10630,7 +10836,7 @@
10630
10836
  onChange: event => handleInputValue(event.target.value),
10631
10837
  __self: this,
10632
10838
  __source: {
10633
- fileName: _jsxFileName$v,
10839
+ fileName: _jsxFileName$u,
10634
10840
  lineNumber: 171,
10635
10841
  columnNumber: 9
10636
10842
  }
@@ -10640,14 +10846,14 @@
10640
10846
  },
10641
10847
  __self: this,
10642
10848
  __source: {
10643
- fileName: _jsxFileName$v,
10849
+ fileName: _jsxFileName$u,
10644
10850
  lineNumber: 181,
10645
10851
  columnNumber: 7
10646
10852
  }
10647
10853
  }, /*#__PURE__*/React__default["default"].createElement(ItemWrapper, {
10648
10854
  __self: this,
10649
10855
  __source: {
10650
- fileName: _jsxFileName$v,
10856
+ fileName: _jsxFileName$u,
10651
10857
  lineNumber: 182,
10652
10858
  columnNumber: 9
10653
10859
  }
@@ -10655,7 +10861,7 @@
10655
10861
  color: colors$4.iconGreen,
10656
10862
  __self: this,
10657
10863
  __source: {
10658
- fileName: _jsxFileName$v,
10864
+ fileName: _jsxFileName$u,
10659
10865
  lineNumber: 183,
10660
10866
  columnNumber: 11
10661
10867
  }
@@ -10666,7 +10872,7 @@
10666
10872
  },
10667
10873
  __self: this,
10668
10874
  __source: {
10669
- fileName: _jsxFileName$v,
10875
+ fileName: _jsxFileName$u,
10670
10876
  lineNumber: 184,
10671
10877
  columnNumber: 11
10672
10878
  }
@@ -11064,7 +11270,18 @@
11064
11270
  var _g = React.useState(items),
11065
11271
  inputItems = _g[0],
11066
11272
  setInputItems = _g[1];
11067
- var _h = Downshift.useCombobox({
11273
+ var _h = React.useState(false),
11274
+ openOptions = _h[0],
11275
+ setOpenOptions = _h[1];
11276
+ var selectBoxRef = React.useRef(null);
11277
+ var _j = React.useState(0),
11278
+ optionsWidth = _j[0],
11279
+ setOptionsWidth = _j[1];
11280
+ React.useLayoutEffect(function () {
11281
+ var _a, _b;
11282
+ 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);
11283
+ }, [selectBoxRef]);
11284
+ var _k = Downshift.useCombobox({
11068
11285
  items: inputItems,
11069
11286
  defaultInputValue: defaultValue,
11070
11287
  onInputValueChange: function (_a) {
@@ -11076,51 +11293,70 @@
11076
11293
  }));
11077
11294
  }
11078
11295
  }),
11079
- isOpen = _h.isOpen,
11080
- getMenuProps = _h.getMenuProps,
11081
- getInputProps = _h.getInputProps,
11082
- getComboboxProps = _h.getComboboxProps,
11083
- highlightedIndex = _h.highlightedIndex,
11084
- getItemProps = _h.getItemProps;
11085
- return jsxRuntime.jsxs(SelectContainer, __assign({
11086
- css: css
11296
+ isOpen = _k.isOpen,
11297
+ getMenuProps = _k.getMenuProps,
11298
+ getInputProps = _k.getInputProps,
11299
+ getComboboxProps = _k.getComboboxProps,
11300
+ highlightedIndex = _k.highlightedIndex,
11301
+ getItemProps = _k.getItemProps;
11302
+ return jsxRuntime.jsx(Popover, __assign({
11303
+ open: openOptions || isOpen,
11304
+ onOpenChange: setOpenOptions,
11305
+ placement: placement,
11306
+ hideOnScroll: true
11087
11307
  }, {
11088
- children: [jsxRuntime.jsx(SelectBox, __assign({}, getComboboxProps(), {
11089
- size: size,
11090
- disabled: disabled,
11091
- isInvalid: isInvalid
11092
- }, {
11093
- children: jsxRuntime.jsx(SelectInputSearch, __assign({
11094
- showLeadingIcon: showLeadingIcon,
11095
- disabled: disabled,
11096
- placeholder: placeholder,
11097
- inputProps: getInputProps({}, {
11098
- suppressRefError: true
11099
- })
11100
- }, props, {
11101
- ref: forwardedRef
11102
- }), void 0)
11103
- }), void 0), inputItems.length > 0 && jsxRuntime.jsx(OptionWrapper$2, __assign({}, getMenuProps(), {
11104
- css: {
11105
- display: isOpen ? 'block' : 'none'
11106
- },
11107
- placement: placement
11308
+ children: jsxRuntime.jsxs(SelectContainer, __assign({
11309
+ css: css,
11310
+ ref: selectBoxRef
11108
11311
  }, {
11109
- children: jsxRuntime.jsx(SelectOption, {
11110
- children: inputItems.map(function (item, index) {
11111
- return /*#__PURE__*/React.createElement(SelectItem, __assign({}, getItemProps({
11112
- item: item,
11113
- index: index
11114
- }), {
11115
- key: "".concat(item).concat(index),
11312
+ children: [jsxRuntime.jsx(PopoverTrigger, {
11313
+ children: jsxRuntime.jsx(SelectBox, __assign({}, getComboboxProps(), {
11314
+ size: size,
11315
+ disabled: disabled,
11316
+ isInvalid: isInvalid
11317
+ }, {
11318
+ children: jsxRuntime.jsx(SelectInputSearch, __assign({
11319
+ showLeadingIcon: showLeadingIcon,
11320
+ disabled: disabled,
11321
+ placeholder: placeholder,
11322
+ inputProps: getInputProps({}, {
11323
+ suppressRefError: true
11324
+ })
11325
+ }, props, {
11326
+ ref: forwardedRef
11327
+ }), void 0)
11328
+ }), void 0)
11329
+ }, void 0), jsxRuntime.jsx(helpers.Portal, {
11330
+ children: jsxRuntime.jsx(PopoverContent, __assign({
11331
+ style: {
11332
+ width: optionsWidth
11333
+ }
11334
+ }, {
11335
+ children: inputItems.length > 0 && jsxRuntime.jsx(OptionWrapper$2, __assign({}, getMenuProps(), {
11116
11336
  css: {
11117
- backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
11118
- fontWeight: 'normal'
11119
- }
11120
- }), item);
11121
- })
11122
- }, void 0)
11123
- }), void 0)]
11337
+ display: isOpen ? 'block' : 'none',
11338
+ pointerEvents: 'auto'
11339
+ },
11340
+ placement: placement
11341
+ }, {
11342
+ children: jsxRuntime.jsx(SelectOption, {
11343
+ children: inputItems.map(function (item, index) {
11344
+ return /*#__PURE__*/React.createElement(SelectItem, __assign({}, getItemProps({
11345
+ item: item,
11346
+ index: index
11347
+ }), {
11348
+ key: "".concat(item).concat(index),
11349
+ css: {
11350
+ backgroundColor: highlightedIndex === index ? '$bgGray' : 'white',
11351
+ fontWeight: 'normal'
11352
+ }
11353
+ }), item);
11354
+ })
11355
+ }, void 0)
11356
+ }), void 0)
11357
+ }), void 0)
11358
+ }, void 0)]
11359
+ }), void 0)
11124
11360
  }), void 0);
11125
11361
  });
11126
11362
 
@@ -11438,140 +11674,6 @@
11438
11674
  size: 'lg'
11439
11675
  };
11440
11676
 
11441
- const _excluded$c = ["children"];
11442
- var _jsxFileName$u = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\popover\\Popover.js";
11443
- const {
11444
- zIndices
11445
- } = core.foundations;
11446
- const PopoverContext = /*#__PURE__*/React.createContext();
11447
- const Popover = ({
11448
- children,
11449
- open: _open = false,
11450
- onOpenChange,
11451
- placement,
11452
- sideOffset: _sideOffset = 5
11453
- }) => {
11454
- const [openState, setOpenState] = React.useState(false);
11455
- React.useEffect(() => {
11456
- setOpenState(_open);
11457
- }, [_open]);
11458
- React.useEffect(() => {
11459
- if (onOpenChange) onOpenChange(openState);
11460
- }, [openState, onOpenChange]);
11461
- const floatingHook = reactDomInteractions.useFloating({
11462
- open: openState,
11463
- onOpenChange: setOpenState,
11464
- middleware: [reactDomInteractions.offset(_sideOffset), reactDomInteractions.flip(), reactDomInteractions.shift()],
11465
- placement
11466
- });
11467
- const {
11468
- getReferenceProps,
11469
- getFloatingProps
11470
- } = reactDomInteractions.useInteractions([reactDomInteractions.useClick(floatingHook.context), reactDomInteractions.useDismiss(floatingHook.context)]);
11471
- const value = {
11472
- openState,
11473
- setOpenState,
11474
- floatingHook,
11475
- getReferenceProps,
11476
- getFloatingProps
11477
- };
11478
- return /*#__PURE__*/React__default["default"].createElement(PopoverContext.Provider, {
11479
- value: value,
11480
- __self: undefined,
11481
- __source: {
11482
- fileName: _jsxFileName$u,
11483
- lineNumber: 44,
11484
- columnNumber: 10
11485
- }
11486
- }, children);
11487
- };
11488
- const PopoverTrigger = ({
11489
- children,
11490
- disabled
11491
- }) => {
11492
- const {
11493
- floatingHook: {
11494
- reference
11495
- },
11496
- getReferenceProps
11497
- } = React.useContext(PopoverContext);
11498
- return disabled ? children : /*#__PURE__*/React.cloneElement(children, getReferenceProps(Object.assign({
11499
- ref: reference
11500
- }, children.props)));
11501
- };
11502
- const PopoverContent = ({
11503
- children,
11504
- isMobile,
11505
- style
11506
- }) => {
11507
- const {
11508
- openState,
11509
- floatingHook: {
11510
- x,
11511
- y,
11512
- floating,
11513
- strategy,
11514
- context
11515
- },
11516
- getFloatingProps
11517
- } = React.useContext(PopoverContext);
11518
- return openState ? /*#__PURE__*/React__default["default"].createElement(reactDomInteractions.FloatingFocusManager, {
11519
- context: context,
11520
- modal: false,
11521
- order: ['reference', 'content'],
11522
- returnFocus: false,
11523
- __self: undefined,
11524
- __source: {
11525
- fileName: _jsxFileName$u,
11526
- lineNumber: 62,
11527
- columnNumber: 5
11528
- }
11529
- }, /*#__PURE__*/React__default["default"].createElement("div", _extends({}, getFloatingProps({
11530
- ref: floating,
11531
- style: Object.assign({
11532
- position: strategy,
11533
- top: isMobile ? 0 : y != null ? y : '',
11534
- left: isMobile ? 0 : x != null ? x : '',
11535
- zIndex: zIndices.popover
11536
- }, style)
11537
- }), {
11538
- __self: undefined,
11539
- __source: {
11540
- fileName: _jsxFileName$u,
11541
- lineNumber: 63,
11542
- columnNumber: 7
11543
- }
11544
- }), children)) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null);
11545
- };
11546
- const PopoverClose = _ref => {
11547
- let {
11548
- children
11549
- } = _ref,
11550
- props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
11551
- const {
11552
- setOpenState
11553
- } = React.useContext(PopoverContext);
11554
- return /*#__PURE__*/React__default["default"].createElement(Flex$1, _extends({}, props, {
11555
- onClick: () => {
11556
- if (props.onClick) props.onClick();
11557
- setOpenState(false);
11558
- },
11559
- __self: undefined,
11560
- __source: {
11561
- fileName: _jsxFileName$u,
11562
- lineNumber: 86,
11563
- columnNumber: 5
11564
- }
11565
- }), children);
11566
- };
11567
- Popover.propTypes = {
11568
- open: PropTypes__default["default"].bool,
11569
- onOpenChange: PropTypes__default["default"].func,
11570
- 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']),
11571
- sideOffset: PropTypes__default["default"].number
11572
- };
11573
- Popover.displayName = 'Popover';
11574
-
11575
11677
  const _excluded$b = ["className", "defaultValue", "value", "name", "disabled", "orientation", "dir", "min", "max", "step", "onValueChange", "minStepsBetweenThumbs", "color", "size", "width", "height"];
11576
11678
  var _jsxFileName$t = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\slider\\Slider.js";
11577
11679
  const StyledSlider = react.styled(SliderPrimitive__namespace.Root, {
@@ -12079,8 +12181,8 @@
12079
12181
 
12080
12182
  const _excluded$9 = ["children"],
12081
12183
  _excluded2$3 = ["children", "activeTabs"],
12082
- _excluded3 = ["children", "icon", "activeTabs", "value"],
12083
- _excluded4 = ["activeTabs"];
12184
+ _excluded3$1 = ["children", "icon", "activeTabs", "value"],
12185
+ _excluded4$1 = ["activeTabs"];
12084
12186
  var _jsxFileName$r = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\tabs\\Tabs.js";
12085
12187
  const StyledTabs = styled(TabsPrimitive__namespace.Root, {
12086
12188
  display: 'flex',
@@ -12344,7 +12446,7 @@
12344
12446
  activeTabs,
12345
12447
  value
12346
12448
  } = _ref3,
12347
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
12449
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3$1);
12348
12450
  const [isIconHovered, setIsIconHovered] = React.useState(false);
12349
12451
  return /*#__PURE__*/React__default["default"].createElement(StyledTrigger$1, _extends({
12350
12452
  value: value
@@ -12392,7 +12494,7 @@
12392
12494
  }), (!icon || activeTabs === value) && children)));
12393
12495
  };
12394
12496
  const TabsContent$1 = _ref4 => {
12395
- let props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
12497
+ let props = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
12396
12498
  return /*#__PURE__*/React__default["default"].createElement(StyledContent$5, _extends({}, props, {
12397
12499
  __self: undefined,
12398
12500
  __source: {
@@ -21251,7 +21353,9 @@
21251
21353
  const AlertDialogConfirm = ADialog__namespace.Action;
21252
21354
 
21253
21355
  const _excluded = ["side", "align", "children"],
21254
- _excluded2 = ["children"];
21356
+ _excluded2 = ["children"],
21357
+ _excluded3 = ["asChild"],
21358
+ _excluded4 = ["rightIcon"];
21255
21359
  var _jsxFileName$a = "C:\\Users\\Acer\\Documents\\project\\majoo\\majoo-ui\\packages\\react\\src\\components\\dropdownMenu\\DropdownMenu.js";
21256
21360
  const Context = /*#__PURE__*/React__default["default"].createContext();
21257
21361
  const slideUpAndFade = keyframes({
@@ -21442,14 +21546,19 @@
21442
21546
  children
21443
21547
  } = _ref2,
21444
21548
  props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
21445
- return /*#__PURE__*/React__default["default"].createElement(DropdownMenuPrimitive__namespace.Trigger, _extends({}, props, {
21549
+ const {
21550
+ asChild
21551
+ } = props,
21552
+ rest = _objectWithoutPropertiesLoose(props, _excluded3);
21553
+ return /*#__PURE__*/React__default["default"].createElement(DropdownMenuPrimitive__namespace.Trigger, _extends({}, rest, {
21554
+ asChild: asChild,
21446
21555
  ref: ref,
21447
- children: children && /*#__PURE__*/React__default["default"].cloneElement(children, Object.assign({}, props)),
21556
+ children: children && /*#__PURE__*/React__default["default"].cloneElement(children, Object.assign({}, rest)),
21448
21557
  __self: undefined,
21449
21558
  __source: {
21450
21559
  fileName: _jsxFileName$a,
21451
- lineNumber: 146,
21452
- columnNumber: 3
21560
+ lineNumber: 148,
21561
+ columnNumber: 5
21453
21562
  }
21454
21563
  }));
21455
21564
  });
@@ -21472,17 +21581,23 @@
21472
21581
  }
21473
21582
  }
21474
21583
  });
21475
- const ButtonDropdown = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement(StyledDropdown, _extends({
21476
- ref: ref,
21477
- css: props.css
21478
- }, props, {
21479
- __self: undefined,
21480
- __source: {
21481
- fileName: _jsxFileName$a,
21482
- lineNumber: 171,
21483
- columnNumber: 3
21484
- }
21485
- }), props.children, props.rightIcon && props.rightIcon));
21584
+ const ButtonDropdown = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => {
21585
+ const {
21586
+ rightIcon
21587
+ } = props,
21588
+ rest = _objectWithoutPropertiesLoose(props, _excluded4);
21589
+ return /*#__PURE__*/React__default["default"].createElement(StyledDropdown, _extends({
21590
+ ref: ref,
21591
+ css: rest.css
21592
+ }, rest, {
21593
+ __self: undefined,
21594
+ __source: {
21595
+ fileName: _jsxFileName$a,
21596
+ lineNumber: 177,
21597
+ columnNumber: 5
21598
+ }
21599
+ }), rest.children, rightIcon && rightIcon);
21600
+ });
21486
21601
  ButtonDropdown.propTypes = {
21487
21602
  children: PropTypes__default["default"].node.isRequired,
21488
21603
  css: PropTypes__default["default"].object,