@majoo-ui/react 1.61.17-b → 1.61.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.esm.js +29 -31
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -11,7 +11,7 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
|
11
11
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
12
12
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
13
13
|
import { Transition } from 'react-transition-group';
|
|
14
|
-
import { Portal } from '@majoo-ui/helpers';
|
|
14
|
+
import { Portal, useThemeProvider } from '@majoo-ui/helpers';
|
|
15
15
|
import axios from 'axios';
|
|
16
16
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
17
17
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
@@ -21508,7 +21508,7 @@ function addPropsToChildren(children, props) {
|
|
|
21508
21508
|
const _excluded$8 = ["children"],
|
|
21509
21509
|
_excluded2$1 = ["children", "activeTabs"],
|
|
21510
21510
|
_excluded3$1 = ["children", "icon", "activeTabs", "value"],
|
|
21511
|
-
_excluded4 = ["activeTabs"];
|
|
21511
|
+
_excluded4$1 = ["activeTabs"];
|
|
21512
21512
|
var _jsxFileName$o = "E:\\Coding\\Majoo\\majoo-ui\\packages\\react\\src\\components\\tabs\\Tabs.js";
|
|
21513
21513
|
const StyledTabs = styled(TabsPrimitive.Root, {
|
|
21514
21514
|
display: 'flex',
|
|
@@ -21833,7 +21833,7 @@ TabsTrigger$1.propTypes = {
|
|
|
21833
21833
|
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
21834
21834
|
};
|
|
21835
21835
|
const TabsContent$1 = _ref4 => {
|
|
21836
|
-
let props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
21836
|
+
let props = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
|
|
21837
21837
|
return /*#__PURE__*/React__default.createElement(StyledContent$2, _extends({}, props, {
|
|
21838
21838
|
__self: undefined,
|
|
21839
21839
|
__source: {
|
|
@@ -26703,8 +26703,9 @@ const AlertDialogCancel = ADialog.Cancel;
|
|
|
26703
26703
|
const AlertDialogConfirm = ADialog.Action;
|
|
26704
26704
|
|
|
26705
26705
|
const _excluded$1 = ["side", "align", "children"],
|
|
26706
|
-
_excluded2 = ["
|
|
26707
|
-
_excluded3 = ["
|
|
26706
|
+
_excluded2 = ["theme"],
|
|
26707
|
+
_excluded3 = ["children"],
|
|
26708
|
+
_excluded4 = ["asChild"];
|
|
26708
26709
|
var _jsxFileName$a = "E:\\Coding\\Majoo\\majoo-ui\\packages\\react\\src\\components\\dropdownMenu\\DropdownMenu.js";
|
|
26709
26710
|
const Context = /*#__PURE__*/React__default.createContext();
|
|
26710
26711
|
const slideUpAndFade = keyframes({
|
|
@@ -26750,7 +26751,7 @@ const slideLeftAndFade = keyframes({
|
|
|
26750
26751
|
const StyledContent = styled(DropdownMenuPrimitive.Content, {
|
|
26751
26752
|
width: 143,
|
|
26752
26753
|
maxWidth: 243,
|
|
26753
|
-
backgroundColor: '
|
|
26754
|
+
backgroundColor: '$bgWhite',
|
|
26754
26755
|
borderRadius: 4,
|
|
26755
26756
|
padding: 8,
|
|
26756
26757
|
zIndex: '$sticky',
|
|
@@ -26780,7 +26781,6 @@ const itemStyles = {
|
|
|
26780
26781
|
all: 'unset',
|
|
26781
26782
|
fontSize: 13,
|
|
26782
26783
|
lineHeight: 1,
|
|
26783
|
-
// color: colors.gray900,
|
|
26784
26784
|
borderRadius: 3,
|
|
26785
26785
|
display: 'flex',
|
|
26786
26786
|
alignItems: 'center',
|
|
@@ -26789,17 +26789,17 @@ const itemStyles = {
|
|
|
26789
26789
|
position: 'relative',
|
|
26790
26790
|
userSelect: 'none',
|
|
26791
26791
|
'&[data-disabled]': {
|
|
26792
|
-
color:
|
|
26792
|
+
color: '$gray400',
|
|
26793
26793
|
pointerEvents: 'none'
|
|
26794
26794
|
},
|
|
26795
26795
|
'&:hover': {
|
|
26796
26796
|
cursor: 'pointer'
|
|
26797
26797
|
},
|
|
26798
26798
|
'&:active': {
|
|
26799
|
-
backgroundColor:
|
|
26799
|
+
backgroundColor: '$gray150'
|
|
26800
26800
|
},
|
|
26801
26801
|
'&:focus': {
|
|
26802
|
-
backgroundColor:
|
|
26802
|
+
backgroundColor: '$gray100'
|
|
26803
26803
|
}
|
|
26804
26804
|
};
|
|
26805
26805
|
const StyledItem = styled(DropdownMenuPrimitive.Item, Object.assign({}, itemStyles));
|
|
@@ -26810,22 +26810,15 @@ StyledItem.propTypes = {
|
|
|
26810
26810
|
};
|
|
26811
26811
|
const StyledCheckboxItem = styled(DropdownMenuPrimitive.CheckboxItem, Object.assign({}, itemStyles));
|
|
26812
26812
|
const StyledRadioItem = styled(DropdownMenuPrimitive.RadioItem, Object.assign({}, itemStyles));
|
|
26813
|
-
// const StyledTriggerItem = styled(DropdownMenuPrimitive.TriggerItem, {
|
|
26814
|
-
// '&[data-state="open"]': {
|
|
26815
|
-
// backgroundColor: colors.gray50,
|
|
26816
|
-
// },
|
|
26817
|
-
// ...itemStyles,
|
|
26818
|
-
// });
|
|
26819
|
-
|
|
26820
26813
|
const StyledLabel = styled(DropdownMenuPrimitive.Label, {
|
|
26821
26814
|
padding: '8px 0',
|
|
26822
26815
|
fontSize: 12,
|
|
26823
26816
|
lineHeight: '25px',
|
|
26824
|
-
color:
|
|
26817
|
+
color: '$gray700'
|
|
26825
26818
|
});
|
|
26826
26819
|
const StyledSeparator = styled(DropdownMenuPrimitive.Separator, {
|
|
26827
26820
|
height: 1,
|
|
26828
|
-
backgroundColor:
|
|
26821
|
+
backgroundColor: '$gray150',
|
|
26829
26822
|
margin: 5
|
|
26830
26823
|
});
|
|
26831
26824
|
const StyledItemIndicator = styled(DropdownMenuPrimitive.ItemIndicator, {
|
|
@@ -26850,7 +26843,7 @@ const DropdownMenuContext = _ref => {
|
|
|
26850
26843
|
__self: undefined,
|
|
26851
26844
|
__source: {
|
|
26852
26845
|
fileName: _jsxFileName$a,
|
|
26853
|
-
lineNumber:
|
|
26846
|
+
lineNumber: 121,
|
|
26854
26847
|
columnNumber: 5
|
|
26855
26848
|
}
|
|
26856
26849
|
}), /*#__PURE__*/React__default.createElement(Context.Provider, {
|
|
@@ -26861,7 +26854,7 @@ const DropdownMenuContext = _ref => {
|
|
|
26861
26854
|
__self: undefined,
|
|
26862
26855
|
__source: {
|
|
26863
26856
|
fileName: _jsxFileName$a,
|
|
26864
|
-
lineNumber:
|
|
26857
|
+
lineNumber: 122,
|
|
26865
26858
|
columnNumber: 7
|
|
26866
26859
|
}
|
|
26867
26860
|
}, children));
|
|
@@ -26870,11 +26863,16 @@ DropdownMenuContext.propTypes = {
|
|
|
26870
26863
|
side: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
26871
26864
|
align: PropTypes.oneOfType(['start', 'center', 'end'])
|
|
26872
26865
|
};
|
|
26873
|
-
const DropdownMenuContentContext =
|
|
26866
|
+
const DropdownMenuContentContext = _ref2 => {
|
|
26867
|
+
let {
|
|
26868
|
+
theme
|
|
26869
|
+
} = _ref2,
|
|
26870
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
26874
26871
|
const {
|
|
26875
26872
|
side,
|
|
26876
26873
|
align
|
|
26877
26874
|
} = React__default.useContext(Context);
|
|
26875
|
+
const themeProvider = useThemeProvider(theme);
|
|
26878
26876
|
const ref = useCallback(node => {
|
|
26879
26877
|
const appElement = document.getElementById('app');
|
|
26880
26878
|
if (appElement) {
|
|
@@ -26886,7 +26884,7 @@ const DropdownMenuContentContext = props => {
|
|
|
26886
26884
|
}
|
|
26887
26885
|
}, []);
|
|
26888
26886
|
return /*#__PURE__*/React__default.createElement(StyledContent, _extends({
|
|
26889
|
-
className:
|
|
26887
|
+
className: `dropdown-content ${(themeProvider == null ? void 0 : themeProvider.theme) || ''}`,
|
|
26890
26888
|
side: side,
|
|
26891
26889
|
align: align,
|
|
26892
26890
|
ref: ref
|
|
@@ -26894,7 +26892,7 @@ const DropdownMenuContentContext = props => {
|
|
|
26894
26892
|
__self: undefined,
|
|
26895
26893
|
__source: {
|
|
26896
26894
|
fileName: _jsxFileName$a,
|
|
26897
|
-
lineNumber:
|
|
26895
|
+
lineNumber: 147,
|
|
26898
26896
|
columnNumber: 5
|
|
26899
26897
|
}
|
|
26900
26898
|
}), props.children);
|
|
@@ -26904,15 +26902,15 @@ DropdownMenuContentContext.propTypes = {
|
|
|
26904
26902
|
alignOffset: PropTypes.number,
|
|
26905
26903
|
asChild: PropTypes.bool
|
|
26906
26904
|
};
|
|
26907
|
-
const DropdownTrigger = /*#__PURE__*/React__default.forwardRef((
|
|
26905
|
+
const DropdownTrigger = /*#__PURE__*/React__default.forwardRef((_ref3, ref) => {
|
|
26908
26906
|
let {
|
|
26909
26907
|
children
|
|
26910
|
-
} =
|
|
26911
|
-
props = _objectWithoutPropertiesLoose(
|
|
26908
|
+
} = _ref3,
|
|
26909
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
26912
26910
|
const {
|
|
26913
26911
|
asChild
|
|
26914
26912
|
} = props,
|
|
26915
|
-
rest = _objectWithoutPropertiesLoose(props,
|
|
26913
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded4);
|
|
26916
26914
|
return /*#__PURE__*/React__default.createElement(DropdownMenuPrimitive.Trigger, _extends({}, rest, {
|
|
26917
26915
|
asChild: asChild,
|
|
26918
26916
|
ref: ref,
|
|
@@ -26920,7 +26918,7 @@ const DropdownTrigger = /*#__PURE__*/React__default.forwardRef((_ref2, ref) => {
|
|
|
26920
26918
|
__self: undefined,
|
|
26921
26919
|
__source: {
|
|
26922
26920
|
fileName: _jsxFileName$a,
|
|
26923
|
-
lineNumber:
|
|
26921
|
+
lineNumber: 162,
|
|
26924
26922
|
columnNumber: 5
|
|
26925
26923
|
}
|
|
26926
26924
|
}));
|
|
@@ -26934,7 +26932,7 @@ const RightSlot = styled('div', {
|
|
|
26934
26932
|
color: 'white'
|
|
26935
26933
|
},
|
|
26936
26934
|
'[data-disabled] &': {
|
|
26937
|
-
color:
|
|
26935
|
+
color: '$gray400'
|
|
26938
26936
|
}
|
|
26939
26937
|
});
|
|
26940
26938
|
const StyledDropdown = styled(Button$4, {
|
|
@@ -26954,7 +26952,7 @@ const ButtonDropdown = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
|
26954
26952
|
__self: undefined,
|
|
26955
26953
|
__source: {
|
|
26956
26954
|
fileName: _jsxFileName$a,
|
|
26957
|
-
lineNumber:
|
|
26955
|
+
lineNumber: 193,
|
|
26958
26956
|
columnNumber: 5
|
|
26959
26957
|
}
|
|
26960
26958
|
}), rest.children);
|