@majoo-ui/react 1.46.8 → 1.46.9-rc.1

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.
Files changed (3) hide show
  1. package/index.esm.js +28 -23
  2. package/index.umd.js +28 -23
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -8128,6 +8128,7 @@ const SelectOption = styled('div', {
8128
8128
  borderRadius: '$lg',
8129
8129
  padding: '12px 16px',
8130
8130
  overflowY: 'auto',
8131
+ minHeight: '40px',
8131
8132
  height: '100%'
8132
8133
  });
8133
8134
  const SelectItem = styled('div', {
@@ -8379,7 +8380,7 @@ function InputSelect(_a) {
8379
8380
  },
8380
8381
  disabled
8381
8382
  }),
8382
- onClick: getToggleButtonProps().onClick
8383
+ onClick: !isOpen ? getToggleButtonProps().onClick : undefined
8383
8384
  }, void 0)
8384
8385
  }), void 0) : jsx(Button$1, Object.assign({}, getToggleButtonProps({
8385
8386
  disabled: disabled || readOnly
@@ -8400,14 +8401,36 @@ function InputSelect(_a) {
8400
8401
  children: placeholder
8401
8402
  }), void 0)
8402
8403
  }), void 0), handleDownOption()]
8403
- }), void 0), jsxs(OptionWrapper$2, Object.assign({}, getMenuProps({}, {
8404
+ }), void 0), isOpen && isLoading && jsx(Flex$1, Object.assign({
8405
+ justify: "center",
8406
+ align: "center",
8407
+ css: {
8408
+ position: 'absolute',
8409
+ inset: 0,
8410
+ zIndex: '$sticky',
8411
+ top: placement === 'top' ? '-20px' : item.length > 0 ? size === 'lg' ? '40px' : '32px' : size === 'lg' ? '64px' : '56px',
8412
+ // bottom: '80px',
8413
+ width: '100%',
8414
+ height: scrollerRef.current ? scrollerRef.current.clientHeight : '40px',
8415
+ backgroundColor: '$bgWhite',
8416
+ opacity: 0.8,
8417
+ transform: placement === 'top' ? 'translate(0, -100%)' : 'none'
8418
+ }
8419
+ }, {
8420
+ children: jsx(Text$1, Object.assign({
8421
+ variant: "caption"
8422
+ }, {
8423
+ children: "Loading...."
8424
+ }), void 0)
8425
+ }), void 0), jsxs(OptionWrapper$2, Object.assign({}, getMenuProps({
8426
+ ref: scrollerRef
8427
+ }, {
8404
8428
  suppressRefError: true
8405
8429
  }), {
8406
8430
  css: {
8407
8431
  display: isOpen ? 'block' : 'none'
8408
8432
  },
8409
- placement: placement,
8410
- ref: scrollerRef
8433
+ placement: placement
8411
8434
  }, {
8412
8435
  children: [!search && embedSearch && isOpen && jsx(SelectContainer, Object.assign({
8413
8436
  css: {
@@ -8423,25 +8446,7 @@ function InputSelect(_a) {
8423
8446
  onChange: handleInputValue,
8424
8447
  placeholder: searchPlaceholder
8425
8448
  }, void 0)
8426
- }), void 0), isLoading && jsx(Flex$1, Object.assign({
8427
- justify: "center",
8428
- align: "center",
8429
- css: {
8430
- position: 'absolute',
8431
- inset: 0,
8432
- zIndex: '$sticky',
8433
- width: '100%',
8434
- height: '100%',
8435
- backgroundColor: '$bgWhite',
8436
- opacity: 0.8
8437
- }
8438
- }, {
8439
- children: jsx(Text$1, Object.assign({
8440
- variant: "caption"
8441
- }, {
8442
- children: "Loading .... "
8443
- }), void 0)
8444
- }), void 0), item.length > 0 ? jsx(ConditionalWrapper, Object.assign({
8449
+ }), void 0), item.length > 0 || isLoading ? jsx(ConditionalWrapper, Object.assign({
8445
8450
  condition: !!fetchData && item.length > 0,
8446
8451
  wrapper: children => jsx(InfiniteScroll, Object.assign({
8447
8452
  loadMore: _ => {
package/index.umd.js CHANGED
@@ -8212,6 +8212,7 @@
8212
8212
  borderRadius: '$lg',
8213
8213
  padding: '12px 16px',
8214
8214
  overflowY: 'auto',
8215
+ minHeight: '40px',
8215
8216
  height: '100%'
8216
8217
  });
8217
8218
  var SelectItem = styled('div', {
@@ -8515,7 +8516,7 @@
8515
8516
  },
8516
8517
  disabled: disabled
8517
8518
  }),
8518
- onClick: getToggleButtonProps().onClick
8519
+ onClick: !isOpen ? getToggleButtonProps().onClick : undefined
8519
8520
  }, void 0)
8520
8521
  }), void 0) : jsxRuntime.jsx(Button$1, __assign({}, getToggleButtonProps({
8521
8522
  disabled: disabled || readOnly
@@ -8536,14 +8537,36 @@
8536
8537
  children: placeholder
8537
8538
  }), void 0)
8538
8539
  }), void 0), handleDownOption()]
8539
- }), void 0), jsxRuntime.jsxs(OptionWrapper$2, __assign({}, getMenuProps({}, {
8540
+ }), void 0), isOpen && isLoading && jsxRuntime.jsx(Flex$1, __assign({
8541
+ justify: "center",
8542
+ align: "center",
8543
+ css: {
8544
+ position: 'absolute',
8545
+ inset: 0,
8546
+ zIndex: '$sticky',
8547
+ top: placement === 'top' ? '-20px' : item.length > 0 ? size === 'lg' ? '40px' : '32px' : size === 'lg' ? '64px' : '56px',
8548
+ // bottom: '80px',
8549
+ width: '100%',
8550
+ height: scrollerRef.current ? scrollerRef.current.clientHeight : '40px',
8551
+ backgroundColor: '$bgWhite',
8552
+ opacity: 0.8,
8553
+ transform: placement === 'top' ? 'translate(0, -100%)' : 'none'
8554
+ }
8555
+ }, {
8556
+ children: jsxRuntime.jsx(Text$1, __assign({
8557
+ variant: "caption"
8558
+ }, {
8559
+ children: "Loading...."
8560
+ }), void 0)
8561
+ }), void 0), jsxRuntime.jsxs(OptionWrapper$2, __assign({}, getMenuProps({
8562
+ ref: scrollerRef
8563
+ }, {
8540
8564
  suppressRefError: true
8541
8565
  }), {
8542
8566
  css: {
8543
8567
  display: isOpen ? 'block' : 'none'
8544
8568
  },
8545
- placement: placement,
8546
- ref: scrollerRef
8569
+ placement: placement
8547
8570
  }, {
8548
8571
  children: [!search && embedSearch && isOpen && jsxRuntime.jsx(SelectContainer, __assign({
8549
8572
  css: {
@@ -8559,25 +8582,7 @@
8559
8582
  onChange: handleInputValue,
8560
8583
  placeholder: searchPlaceholder
8561
8584
  }, void 0)
8562
- }), void 0), isLoading && jsxRuntime.jsx(Flex$1, __assign({
8563
- justify: "center",
8564
- align: "center",
8565
- css: {
8566
- position: 'absolute',
8567
- inset: 0,
8568
- zIndex: '$sticky',
8569
- width: '100%',
8570
- height: '100%',
8571
- backgroundColor: '$bgWhite',
8572
- opacity: 0.8
8573
- }
8574
- }, {
8575
- children: jsxRuntime.jsx(Text$1, __assign({
8576
- variant: "caption"
8577
- }, {
8578
- children: "Loading .... "
8579
- }), void 0)
8580
- }), void 0), item.length > 0 ? jsxRuntime.jsx(ConditionalWrapper, __assign({
8585
+ }), void 0), item.length > 0 || isLoading ? jsxRuntime.jsx(ConditionalWrapper, __assign({
8581
8586
  condition: !!fetchData && item.length > 0,
8582
8587
  wrapper: function (children) {
8583
8588
  return jsxRuntime.jsx(InfiniteScroll__default["default"], __assign({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.46.8",
3
+ "version": "1.46.9-rc.1",
4
4
  "dependencies": {
5
5
  "@majoo-ui/core": "^1.31.1",
6
6
  "@majoo-ui/helpers": "^1.30.4",