@dhis2-ui/menu 10.1.0 → 10.1.2
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/build/cjs/menu-item/menu-item.js +1 -1
- package/build/cjs/menu-item/menu-item.prod.stories.js +13 -1
- package/build/cjs/menu-item/menu-item.styles.js +2 -2
- package/build/es/menu-item/menu-item.js +1 -1
- package/build/es/menu-item/menu-item.prod.stories.js +11 -0
- package/build/es/menu-item/menu-item.styles.js +2 -2
- package/package.json +8 -8
|
@@ -113,7 +113,7 @@ const MenuItem = _ref2 => {
|
|
|
113
113
|
destructive,
|
|
114
114
|
disabled,
|
|
115
115
|
dense,
|
|
116
|
-
active: active || showSubMenu
|
|
116
|
+
active: active || showSubMenu,
|
|
117
117
|
'with-chevron': children || chevron
|
|
118
118
|
}) || "")
|
|
119
119
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.ToggleMenuItem = exports.SuffixAndChevron = exports.Suffix = exports.SubMenus = exports.RTLSuffixAndChevron = exports.OnClick = exports.Link = exports.Icon = exports.Disabled = exports.Destructive = exports.Dense = exports.Default = exports.Chevron = exports.Active = void 0;
|
|
6
|
+
exports.default = exports.ToggleMenuItem = exports.SuffixAndChevron = exports.Suffix = exports.SubMenus = exports.RTLSuffixAndChevron = exports.OnClick = exports.Link = exports.InContainer = exports.Icon = exports.Disabled = exports.Destructive = exports.Dense = exports.Default = exports.Chevron = exports.Active = void 0;
|
|
7
7
|
var _ui = require("@dhis2/ui");
|
|
8
8
|
var _uiConstants = require("@dhis2/ui-constants");
|
|
9
9
|
var _uiIcons = require("@dhis2/ui-icons");
|
|
@@ -104,6 +104,18 @@ Icon.parameters = {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
+
const InContainer = args => {
|
|
108
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
109
|
+
style: {
|
|
110
|
+
height: 40,
|
|
111
|
+
width: 300,
|
|
112
|
+
overflow: 'hidden'
|
|
113
|
+
}
|
|
114
|
+
}, /*#__PURE__*/_react.default.createElement(_index.Menu, args, /*#__PURE__*/_react.default.createElement(_menuItem.MenuItem, {
|
|
115
|
+
label: "Menu item"
|
|
116
|
+
})));
|
|
117
|
+
};
|
|
118
|
+
exports.InContainer = InContainer;
|
|
107
119
|
const Suffix = exports.Suffix = Template.bind({});
|
|
108
120
|
Suffix.args = {
|
|
109
121
|
label: 'Open in Data Visualizer',
|
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _uiConstants = require("@dhis2/ui-constants");
|
|
8
|
-
const _defaultExport = [`li.jsx-
|
|
9
|
-
_defaultExport.__hash = "
|
|
8
|
+
const _defaultExport = [`li.jsx-1688414627{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:0;cursor:pointer;list-style:none;background-color:${_uiConstants.colors.white};color:${_uiConstants.colors.grey900};fill:${_uiConstants.colors.grey900};font-size:14px;line-height:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}`, `li.jsx-1688414627:hover{background-color:${_uiConstants.colors.grey200};}`, `li.jsx-1688414627:active,li.active.jsx-1688414627{background-color:${_uiConstants.colors.grey300};}`, `li.destructive.jsx-1688414627{color:${_uiConstants.colors.red700};fill:${_uiConstants.colors.red600};}`, `li.destructive.jsx-1688414627:hover{background-color:${_uiConstants.colors.red050};}`, `li.destructive.jsx-1688414627:active,li.destructive.active.jsx-1688414627{background-color:${_uiConstants.colors.red100};}`, `li.disabled.jsx-1688414627{cursor:not-allowed;color:${_uiConstants.colors.grey500};fill:${_uiConstants.colors.grey500};}`, `li.disabled.jsx-1688414627:hover{background-color:${_uiConstants.colors.white};}`, `li.jsx-1688414627:focus{outline:3px solid ${_uiConstants.theme.focus};outline-offset:-3px;}`, "li.jsx-1688414627:focus.jsx-1688414627:not(:focus-visible){outline:none;}", `a.jsx-1688414627{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 ${_uiConstants.spacers.dp16};min-height:40px;-webkit-text-decoration:none;text-decoration:none;color:inherit;}`, `li.with-chevron.jsx-1688414627 a.jsx-1688414627{padding-inline-end:${_uiConstants.spacers.dp8};}`, `li.dense.jsx-1688414627 a.jsx-1688414627{padding:0 ${_uiConstants.spacers.dp12};min-height:32px;}`, `li.with-chevron.dense.jsx-1688414627 a.jsx-1688414627{padding-inline-end:${_uiConstants.spacers.dp4};}`, `.label.jsx-1688414627{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding:${_uiConstants.spacers.dp12} 0;}`, `li.dense.jsx-1688414627 .label.jsx-1688414627{padding:${_uiConstants.spacers.dp8} 0;}`, `.icon.jsx-1688414627{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;margin-inline-end:${_uiConstants.spacers.dp12};width:24px;height:24px;}`, `.suffix.jsx-1688414627{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-inline-start:${_uiConstants.spacers.dp8};}`, `.chevron.jsx-1688414627{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;margin-inline-start:${_uiConstants.spacers.dp24};}`, ".chevron.jsx-1688414627:dir(rtl){-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}", `li.dense.jsx-1688414627 .icon.jsx-1688414627{margin-inline-end:${_uiConstants.spacers.dp8};width:16px;height:16px;}`, "li.jsx-1688414627 .icon.jsx-1688414627>svg{width:24px;height:24px;}", "li.dense.jsx-1688414627 .icon.jsx-1688414627>svg,li.jsx-1688414627 .chevron.jsx-1688414627>svg{width:16px;height:16px;}"];
|
|
9
|
+
_defaultExport.__hash = "1688414627";
|
|
10
10
|
var _default = exports.default = _defaultExport;
|
|
@@ -104,7 +104,7 @@ const MenuItem = _ref2 => {
|
|
|
104
104
|
destructive,
|
|
105
105
|
disabled,
|
|
106
106
|
dense,
|
|
107
|
-
active: active || showSubMenu
|
|
107
|
+
active: active || showSubMenu,
|
|
108
108
|
'with-chevron': children || chevron
|
|
109
109
|
}) || "")
|
|
110
110
|
}, /*#__PURE__*/React.createElement("a", {
|
|
@@ -95,6 +95,17 @@ Icon.parameters = {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
+
export const InContainer = args => {
|
|
99
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
style: {
|
|
101
|
+
height: 40,
|
|
102
|
+
width: 300,
|
|
103
|
+
overflow: 'hidden'
|
|
104
|
+
}
|
|
105
|
+
}, /*#__PURE__*/React.createElement(Menu, args, /*#__PURE__*/React.createElement(MenuItem, {
|
|
106
|
+
label: "Menu item"
|
|
107
|
+
})));
|
|
108
|
+
};
|
|
98
109
|
export const Suffix = Template.bind({});
|
|
99
110
|
Suffix.args = {
|
|
100
111
|
label: 'Open in Data Visualizer',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { colors, spacers, theme } from '@dhis2/ui-constants';
|
|
2
|
-
const _defaultExport = [`li.jsx-
|
|
3
|
-
_defaultExport.__hash = "
|
|
2
|
+
const _defaultExport = [`li.jsx-1688414627{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;padding:0;cursor:pointer;list-style:none;background-color:${colors.white};color:${colors.grey900};fill:${colors.grey900};font-size:14px;line-height:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}`, `li.jsx-1688414627:hover{background-color:${colors.grey200};}`, `li.jsx-1688414627:active,li.active.jsx-1688414627{background-color:${colors.grey300};}`, `li.destructive.jsx-1688414627{color:${colors.red700};fill:${colors.red600};}`, `li.destructive.jsx-1688414627:hover{background-color:${colors.red050};}`, `li.destructive.jsx-1688414627:active,li.destructive.active.jsx-1688414627{background-color:${colors.red100};}`, `li.disabled.jsx-1688414627{cursor:not-allowed;color:${colors.grey500};fill:${colors.grey500};}`, `li.disabled.jsx-1688414627:hover{background-color:${colors.white};}`, `li.jsx-1688414627:focus{outline:3px solid ${theme.focus};outline-offset:-3px;}`, "li.jsx-1688414627:focus.jsx-1688414627:not(:focus-visible){outline:none;}", `a.jsx-1688414627{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 ${spacers.dp16};min-height:40px;-webkit-text-decoration:none;text-decoration:none;color:inherit;}`, `li.with-chevron.jsx-1688414627 a.jsx-1688414627{padding-inline-end:${spacers.dp8};}`, `li.dense.jsx-1688414627 a.jsx-1688414627{padding:0 ${spacers.dp12};min-height:32px;}`, `li.with-chevron.dense.jsx-1688414627 a.jsx-1688414627{padding-inline-end:${spacers.dp4};}`, `.label.jsx-1688414627{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;padding:${spacers.dp12} 0;}`, `li.dense.jsx-1688414627 .label.jsx-1688414627{padding:${spacers.dp8} 0;}`, `.icon.jsx-1688414627{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;margin-inline-end:${spacers.dp12};width:24px;height:24px;}`, `.suffix.jsx-1688414627{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-inline-start:${spacers.dp8};}`, `.chevron.jsx-1688414627{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;margin-inline-start:${spacers.dp24};}`, ".chevron.jsx-1688414627:dir(rtl){-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}", `li.dense.jsx-1688414627 .icon.jsx-1688414627{margin-inline-end:${spacers.dp8};width:16px;height:16px;}`, "li.jsx-1688414627 .icon.jsx-1688414627>svg{width:24px;height:24px;}", "li.dense.jsx-1688414627 .icon.jsx-1688414627>svg,li.jsx-1688414627 .chevron.jsx-1688414627>svg{width:16px;height:16px;}"];
|
|
3
|
+
_defaultExport.__hash = "1688414627";
|
|
4
4
|
export default _defaultExport;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/menu",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.2",
|
|
4
4
|
"description": "UI Menu",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2-ui/card": "10.1.
|
|
37
|
-
"@dhis2-ui/divider": "10.1.
|
|
38
|
-
"@dhis2-ui/layer": "10.1.
|
|
39
|
-
"@dhis2-ui/popper": "10.1.
|
|
40
|
-
"@dhis2-ui/portal": "10.1.
|
|
41
|
-
"@dhis2/ui-constants": "10.1.
|
|
42
|
-
"@dhis2/ui-icons": "10.1.
|
|
36
|
+
"@dhis2-ui/card": "10.1.2",
|
|
37
|
+
"@dhis2-ui/divider": "10.1.2",
|
|
38
|
+
"@dhis2-ui/layer": "10.1.2",
|
|
39
|
+
"@dhis2-ui/popper": "10.1.2",
|
|
40
|
+
"@dhis2-ui/portal": "10.1.2",
|
|
41
|
+
"@dhis2/ui-constants": "10.1.2",
|
|
42
|
+
"@dhis2/ui-icons": "10.1.2",
|
|
43
43
|
"classnames": "^2.3.1",
|
|
44
44
|
"prop-types": "^15.7.2"
|
|
45
45
|
},
|