@majoo-ui/react 1.63.0-rc.1 → 1.63.0-rc.3

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 (2) hide show
  1. package/index.esm.js +51 -35
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -1250,6 +1250,22 @@ function ThemeProvider({
1250
1250
  theme,
1251
1251
  children
1252
1252
  }) {
1253
+ // Apply theme class to document.body so that Radix Portal content
1254
+ // (which renders outside this ThemeProvider div) also inherits
1255
+ // the active theme's CSS variables.
1256
+ React__default.useEffect(() => {
1257
+ if (typeof document === 'undefined') return;
1258
+ const body = document.body;
1259
+ const themeClass = theme?.className || String(theme || '');
1260
+ if (themeClass) {
1261
+ body.classList.add(themeClass);
1262
+ }
1263
+ return () => {
1264
+ if (themeClass) {
1265
+ body.classList.remove(themeClass);
1266
+ }
1267
+ };
1268
+ }, [theme]);
1253
1269
  return /*#__PURE__*/React__default.createElement("div", {
1254
1270
  id: name,
1255
1271
  className: theme
@@ -3711,7 +3727,7 @@ createTheme({
3711
3727
  cardDescMd: '20px'
3712
3728
  }
3713
3729
  });
3714
- const colors$7 = foundations.colors;
3730
+ const colors$7 = theme.colors;
3715
3731
 
3716
3732
  const normalize = {
3717
3733
  '*,::before,::after': {
@@ -10451,7 +10467,7 @@ const Tag = /*#__PURE__*/React__default.forwardRef(({
10451
10467
  readOnly: readOnly
10452
10468
  }, /*#__PURE__*/React__default.createElement(CloseOutline, {
10453
10469
  size: 16,
10454
- color: theme.colors.iconSecondary.computedValue,
10470
+ color: colors$7.iconSecondary,
10455
10471
  style: {
10456
10472
  verticalAlign: 'middle'
10457
10473
  }
@@ -13910,7 +13926,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef(({
13910
13926
  }, !item?.hideCheck && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13911
13927
  color: colors$7.iconDisable
13912
13928
  }) : selectedValueSet.has(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default.createElement(CheckOutline, {
13913
- color: theme.colors.iconBrand.computedValue
13929
+ color: colors$7.iconBrand
13914
13930
  })), isShowSelectAll && item?.id === '!all' && selectedValue?.length && selectedValue?.length < itemsLength && !selectedValueSet.has('!all') ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, null, "-") : /*#__PURE__*/React__default.createElement("div", null)), /*#__PURE__*/React__default.createElement(Item$2, {
13915
13931
  css: {
13916
13932
  backgroundColor: 'unset',
@@ -13946,9 +13962,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef(({
13946
13962
  ...checkBoxCss
13947
13963
  }
13948
13964
  }, !item?.hideCheck && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13949
- color: theme.colors.iconDisable.computedValue
13965
+ color: colors$7.iconDisable
13950
13966
  }) : filterSelectedChild?.length === item?.children?.filter(e => !e.isDisabled)?.length ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13951
- color: theme.colors.iconBrand.computedValue
13967
+ color: colors$7.iconBrand
13952
13968
  }) : filterSelectedChild?.length > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, null, "-") : null), /*#__PURE__*/React__default.createElement(Item$2, {
13953
13969
  css: {
13954
13970
  backgroundColor: 'unset',
@@ -14186,7 +14202,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef(({
14186
14202
  }, !item?.hideCheck && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14187
14203
  color: colors$7.iconDisable
14188
14204
  }) : item?.children?.filter(e => selectedValueSet.has(e.id) && !e.isDisabled)?.length === item?.children?.filter(e => !e.isDisabled)?.length ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14189
- color: theme.colors.iconBrand.computedValue
14205
+ color: colors$7.iconBrand
14190
14206
  }) : item?.children?.filter(e => selectedValueSet.has(e.id) && !e.isDisabled)?.length > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, null, "-") : null), /*#__PURE__*/React__default.createElement(Item$2, {
14191
14207
  css: {
14192
14208
  backgroundColor: 'unset',
@@ -14530,7 +14546,7 @@ function InputCreatable({
14530
14546
  display: isOpen ? 'block' : 'none'
14531
14547
  }
14532
14548
  }, /*#__PURE__*/React__default.createElement(ItemWrapper, null, /*#__PURE__*/React__default.createElement(CirclePlusOutline, {
14533
- color: theme.colors.iconBrand.computedValue
14549
+ color: colors$7.iconBrand
14534
14550
  }), /*#__PURE__*/React__default.createElement(Item$1, {
14535
14551
  onClick: () => {
14536
14552
  if (onClickItem) onClickItem();
@@ -14966,7 +14982,7 @@ function InputResourceList({
14966
14982
  onClick: handleCheckedAllExpandable,
14967
14983
  border: !isAllSelected && !isIndeterminate,
14968
14984
  children: isAllSelected ? jsx(CheckOutline, {
14969
- color: theme.colors.iconBrand.computedValue
14985
+ color: colors$7.iconBrand
14970
14986
  }) : isIndeterminate ? jsx(IndeterminateFilled, {
14971
14987
  children: "-"
14972
14988
  }) : ''
@@ -15383,7 +15399,7 @@ const InputCounter = /*#__PURE__*/forwardRef((props, ref) => {
15383
15399
  onClick: handleDown,
15384
15400
  children: jsx(MinusOutline, {
15385
15401
  size: 24,
15386
- color: disabled || disabledDecrement ? theme.colors.iconDisable.computedValue : theme.colors.primary500.computedValue
15402
+ color: disabled || disabledDecrement ? colors$7.iconDisable : colors$7.primary500
15387
15403
  })
15388
15404
  }), jsx(Input$3, {
15389
15405
  ref: ref,
@@ -15407,7 +15423,7 @@ const InputCounter = /*#__PURE__*/forwardRef((props, ref) => {
15407
15423
  onClick: handleUp,
15408
15424
  children: jsx(PlusOutline, {
15409
15425
  size: 24,
15410
- color: disabled || disabledIncrement ? theme.colors.iconDisable.computedValue : theme.colors.primary500.computedValue
15426
+ color: disabled || disabledIncrement ? colors$7.iconDisable : colors$7.primary500
15411
15427
  })
15412
15428
  })]
15413
15429
  });
@@ -19028,11 +19044,11 @@ const IconStateFull$1 = props => {
19028
19044
  setIsHover(false);
19029
19045
  }
19030
19046
  return props.type === 'next' ? jsx(ChevronRightOutline, Object.assign({}, props, {
19031
- color: isHover && !props.disabled ? theme.colors.primary400.computedValue : theme.colors.iconPrimary.computedValue,
19047
+ color: isHover && !props.disabled ? colors$7.primary400 : colors$7.iconPrimary,
19032
19048
  onMouseEnter: handleHover,
19033
19049
  onMouseLeave: handleUnHover
19034
19050
  })) : jsx(ChevronLeftOutline, Object.assign({}, props, {
19035
- color: isHover && !props.disabled ? theme.colors.primary400.computedValue : theme.colors.iconPrimary.computedValue,
19051
+ color: isHover && !props.disabled ? colors$7.primary400 : colors$7.iconPrimary,
19036
19052
  onMouseEnter: handleHover,
19037
19053
  onMouseLeave: handleUnHover
19038
19054
  }));
@@ -20427,7 +20443,7 @@ const TabsList$1 = ({
20427
20443
  icon: true,
20428
20444
  onClick: () => listContainerRef.current.scrollLeft -= scrollAreaWidth / 2
20429
20445
  }, /*#__PURE__*/React__default.createElement(ChevronLgLeftOutline, {
20430
- color: theme.colors.iconBrand.computedValue
20446
+ color: colors$7.iconBrand
20431
20447
  }))), listContainerScrollPosition < scrollAreaWidth - 10 && /*#__PURE__*/React__default.createElement(ScrollButtonContainer, {
20432
20448
  position: "right"
20433
20449
  }, /*#__PURE__*/React__default.createElement(ScrollButton, {
@@ -20438,7 +20454,7 @@ const TabsList$1 = ({
20438
20454
  icon: true,
20439
20455
  onClick: () => listContainerRef.current.scrollLeft += scrollAreaWidth / 2
20440
20456
  }, /*#__PURE__*/React__default.createElement(ChevronLgRightOutline, {
20441
- color: theme.colors.iconBrand.computedValue
20457
+ color: colors$7.iconBrand
20442
20458
  }))));
20443
20459
  };
20444
20460
  const TabsTrigger$1 = ({
@@ -20466,7 +20482,7 @@ const TabsTrigger$1 = ({
20466
20482
  whiteSpace: 'nowrap'
20467
20483
  }
20468
20484
  }, icon && /*#__PURE__*/React__default.cloneElement(icon, {
20469
- color: activeTabs === value || isIconHovered ? theme.colors.iconBrand.computedValue : theme.colors.iconDisable.computedValue
20485
+ color: activeTabs === value || isIconHovered ? colors$7.iconBrand : colors$7.iconDisable
20470
20486
  }), (!icon || activeTabs === value) && children)));
20471
20487
  };
20472
20488
  TabsTrigger$1.propTypes = {
@@ -25322,13 +25338,13 @@ const IconStateFull = ({
25322
25338
  setIsHover(false);
25323
25339
  }
25324
25340
  return props.type === 'close' ? /*#__PURE__*/React__default.createElement(CloseIcon, _extends({}, props, {
25325
- color: isHover ? '#E13743' : '#DF2A36',
25341
+ color: isHover ? colors$7.red400 : colors$7.red500,
25326
25342
  onMouseEnter: handleEnter,
25327
25343
  onMouseLeave: handleLeave
25328
25344
  })) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, customPreviewIcon ? (/*#__PURE__*/React__default.cloneElement(customPreviewIcon, {
25329
25345
  ...customPreviewIcon.props,
25330
25346
  ...props,
25331
- color: isHover ? theme.colors.iconBrand.computedValue : customPreviewIcon.props.color,
25347
+ color: isHover ? colors$7.iconBrand : customPreviewIcon.props.color,
25332
25348
  onMouseEnter: handleEnter,
25333
25349
  onMouseLeave: handleLeave,
25334
25350
  style: {
@@ -25341,7 +25357,7 @@ const IconStateFull = ({
25341
25357
  ...customPreviewIcon.props.style
25342
25358
  }
25343
25359
  })) : /*#__PURE__*/React__default.createElement(EyeIcon, _extends({}, props, {
25344
- color: isHover ? theme.colors.iconBrand.computedValue : '#A5ABAB',
25360
+ color: isHover ? colors$7.iconBrand : colors$7.gray400,
25345
25361
  onMouseEnter: handleEnter,
25346
25362
  onMouseLeave: handleLeave
25347
25363
  })));
@@ -25386,7 +25402,7 @@ const Upload = ({
25386
25402
  customPreviewIcon,
25387
25403
  onPreviewIconClick,
25388
25404
  maxWidthOrHeight,
25389
- theme: theme$1,
25405
+ theme,
25390
25406
  uploadingLabel,
25391
25407
  placeholder,
25392
25408
  cancelLabel,
@@ -25996,7 +26012,7 @@ const Upload = ({
25996
26012
  justify: "center",
25997
26013
  align: "center"
25998
26014
  }, /*#__PURE__*/React__default.createElement(UploadOutline, {
25999
- color: disabled ? '#C0C4C4' : '#404545'
26015
+ color: disabled ? colors$7.gray300 : colors$7.gray800
26000
26016
  })), /*#__PURE__*/React__default.createElement(Text, {
26001
26017
  css: {
26002
26018
  margin: '$spacing-04 $spacing-05 0 $spacing-05'
@@ -26016,7 +26032,7 @@ const Upload = ({
26016
26032
  }
26017
26033
  },
26018
26034
  isMobile: isMobile,
26019
- theme: theme$1
26035
+ theme: theme
26020
26036
  }, /*#__PURE__*/React__default.createElement(ModalDialogTrigger, {
26021
26037
  asChild: true
26022
26038
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -26060,7 +26076,7 @@ const Upload = ({
26060
26076
  style: {
26061
26077
  cursor: 'pointer'
26062
26078
  },
26063
- color: aspect ? theme.colors.iconBrand.computedValue : theme.colors.iconPrimary.computedValue,
26079
+ color: aspect ? colors$7.iconBrand : colors$7.iconPrimary,
26064
26080
  onClick: toggleAspect
26065
26081
  })), /*#__PURE__*/React__default.createElement(Flex$1, {
26066
26082
  gap: 4
@@ -26830,7 +26846,7 @@ const Device = props => {
26830
26846
  onClick: prevSlide,
26831
26847
  buttonType: "secondary",
26832
26848
  children: jsx(ChevronLeftOutline, {
26833
- color: theme.colors.btnPrimary.computedValue
26849
+ color: colors$7.btnPrimary
26834
26850
  })
26835
26851
  }), jsxs(Flex$1, {
26836
26852
  align: "center",
@@ -26884,7 +26900,7 @@ const Device = props => {
26884
26900
  onClick: nextSlide,
26885
26901
  buttonType: "secondary",
26886
26902
  children: jsx(ChevronRightOutline, {
26887
- color: theme.colors.btnPrimary.computedValue
26903
+ color: colors$7.btnPrimary
26888
26904
  })
26889
26905
  })]
26890
26906
  });
@@ -28784,7 +28800,7 @@ const Navigation = props => {
28784
28800
  marginRight: 9
28785
28801
  },
28786
28802
  size: "24",
28787
- color: theme.colors.bgBrand.computedValue
28803
+ color: colors$7.bgBrand
28788
28804
  }), typeof data[i - 1].title === 'string' ? data[i - 1].title : data[i - 1].title?.(), data[i - 1]?.withTolltip && /*#__PURE__*/React__default.createElement(Tooltip$1, {
28789
28805
  align: "center",
28790
28806
  label: data[i - 1]?.tooltipsContents
@@ -28793,7 +28809,7 @@ const Navigation = props => {
28793
28809
  margin: '0 9px'
28794
28810
  },
28795
28811
  size: "20",
28796
- color: theme.colors.iconSecondary.computedValue
28812
+ color: colors$7.iconSecondary
28797
28813
  })), data[i - 1]?.comingSoon && /*#__PURE__*/React__default.createElement(Flex$1, {
28798
28814
  css: {
28799
28815
  marginLeft: data[i - 1]?.withTolltip ? 0 : '$spacing-03'
@@ -28823,7 +28839,7 @@ const Navigation = props => {
28823
28839
  label: data[i - 1]?.tooltipsContents
28824
28840
  }, /*#__PURE__*/React__default.createElement(StyledCircleInfoOutline, {
28825
28841
  size: "20",
28826
- color: theme.colors.iconPrimary.computedValue
28842
+ color: colors$7.iconPrimary
28827
28843
  })), data[i - 1]?.comingSoon && /*#__PURE__*/React__default.createElement(Flex$1, {
28828
28844
  align: "center",
28829
28845
  justify: "center",
@@ -29086,10 +29102,10 @@ Collapse.defaultProps = {
29086
29102
  const DesktopContainer = styled(Flex$1, {
29087
29103
  display: 'none',
29088
29104
  '& .active-scroll-spy': {
29089
- borderLeft: `4px solid ${theme.colors.primary500.computedValue} !important`
29105
+ borderLeft: `4px solid ${colors$7.primary500} !important`
29090
29106
  },
29091
29107
  '& .active-scroll-spy .link-title': {
29092
- color: `${theme.colors.primary500.computedValue} !important`
29108
+ color: `${colors$7.primary500} !important`
29093
29109
  },
29094
29110
  '@md': {
29095
29111
  display: 'unset'
@@ -29198,7 +29214,7 @@ function Content({
29198
29214
  marginLeft: '-4px !important',
29199
29215
  borderLeftWidth: '4px !important',
29200
29216
  borderLeftStyle: 'solid !important',
29201
- borderLeftColor: `${item?.id === activeId ? theme.colors.primary500.computedValue : 'transparent'} !important`,
29217
+ borderLeftColor: `${item?.id === activeId ? colors$7.primary500 : 'transparent'} !important`,
29202
29218
  paddingLeft: '16px !important',
29203
29219
  minHeight: 25
29204
29220
  },
@@ -47230,7 +47246,7 @@ function Remove(props) {
47230
47246
  css: props === null || props === void 0 ? void 0 : props.css,
47231
47247
  position: props === null || props === void 0 ? void 0 : props.position,
47232
47248
  onClick: props === null || props === void 0 ? void 0 : props.onRemove,
47233
- color: isHover ? theme.colors.red400.computedValue : theme.colors.gray400.computedValue,
47249
+ color: isHover ? colors$7.red400 : colors$7.gray400,
47234
47250
  onMouseEnter: onEnter,
47235
47251
  onMouseLeave: onLeave
47236
47252
  });
@@ -48363,13 +48379,13 @@ function ZoomControls({
48363
48379
  onClick: onZoomIn,
48364
48380
  children: jsx(PlusOutline, {
48365
48381
  size: 20,
48366
- color: theme.colors.iconBrand.computedValue
48382
+ color: colors$7.iconBrand
48367
48383
  })
48368
48384
  }), jsx(ZoomControlButton, {
48369
48385
  onClick: onZoomOut,
48370
48386
  children: jsx(MinusOutline, {
48371
48387
  size: 20,
48372
- color: theme.colors.iconBrand.computedValue
48388
+ color: colors$7.iconBrand
48373
48389
  })
48374
48390
  })]
48375
48391
  });
@@ -48475,8 +48491,8 @@ function MapPicker(props) {
48475
48491
  center: [center === null || center === void 0 ? void 0 : center.lat, center === null || center === void 0 ? void 0 : center.lng],
48476
48492
  radius: radius,
48477
48493
  pathOptions: {
48478
- color: theme.colors.bgBrand.computedValue,
48479
- fillColor: theme.colors.bgBrand.computedValue
48494
+ color: colors$7.bgBrand,
48495
+ fillColor: colors$7.bgBrand
48480
48496
  }
48481
48497
  }), jsx(TileLayer, {
48482
48498
  url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.63.0-rc.1",
3
+ "version": "1.63.0-rc.3",
4
4
  "main": "./index.esm.js",
5
5
  "exports": {
6
6
  ".": {