glints-aries 4.0.382 → 4.0.384
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/es/@next/Menu/Menu.d.ts +1 -0
- package/es/@next/Menu/Menu.js +3 -1
- package/es/@next/Menu/components/MenuOptionLabel.d.ts +5 -2
- package/es/@next/Menu/components/MenuOptionLabel.js +16 -3
- package/es/@next/Menu/components/MenuOptionLabelStyle.d.ts +3 -0
- package/es/@next/Menu/components/MenuOptionLabelStyle.js +5 -0
- package/es/@next/Select/Select.stories.d.ts +1 -0
- package/es/@next/SideSheet/SideSheetStyle.js +3 -3
- package/lib/@next/Menu/Menu.d.ts +1 -0
- package/lib/@next/Menu/Menu.js +3 -1
- package/lib/@next/Menu/components/MenuOptionLabel.d.ts +5 -2
- package/lib/@next/Menu/components/MenuOptionLabel.js +16 -3
- package/lib/@next/Menu/components/MenuOptionLabelStyle.d.ts +3 -0
- package/lib/@next/Menu/components/MenuOptionLabelStyle.js +11 -0
- package/lib/@next/Select/Select.stories.d.ts +1 -0
- package/lib/@next/SideSheet/SideSheetStyle.js +3 -3
- package/package.json +1 -1
package/es/@next/Menu/Menu.d.ts
CHANGED
package/es/@next/Menu/Menu.js
CHANGED
|
@@ -29,6 +29,7 @@ export var Menu = function Menu(_ref) {
|
|
|
29
29
|
return /*#__PURE__*/React.createElement(StyledMenu, null, options == null ? void 0 : options.map(function (option) {
|
|
30
30
|
var value = option.value,
|
|
31
31
|
label = option.label,
|
|
32
|
+
sublabel = option.sublabel,
|
|
32
33
|
disabled = option.disabled,
|
|
33
34
|
id = option.id;
|
|
34
35
|
var randomId = nextId('glints-menu-option');
|
|
@@ -42,7 +43,8 @@ export var Menu = function Menu(_ref) {
|
|
|
42
43
|
onClick: onClick,
|
|
43
44
|
allowMultiple: allowMultiple
|
|
44
45
|
}, /*#__PURE__*/React.createElement(MenuOptionLabel, {
|
|
45
|
-
label: label
|
|
46
|
+
label: label,
|
|
47
|
+
sublabel: sublabel
|
|
46
48
|
}));
|
|
47
49
|
}));
|
|
48
50
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface MenuOptionLabelProps {
|
|
3
3
|
label: React.ReactNode;
|
|
4
|
-
|
|
4
|
+
sublabel?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const MenuOptionLabel: ({ label, sublabel }: MenuOptionLabelProps) => JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Typography } from '../../Typography';
|
|
3
3
|
import { Neutral } from '../../utilities/colors';
|
|
4
|
+
import { MenuOptionLabelContainer } from './MenuOptionLabelStyle';
|
|
4
5
|
export var MenuOptionLabel = function MenuOptionLabel(_ref) {
|
|
5
|
-
var label = _ref.label
|
|
6
|
-
|
|
6
|
+
var label = _ref.label,
|
|
7
|
+
sublabel = _ref.sublabel;
|
|
8
|
+
if (!sublabel) {
|
|
9
|
+
return /*#__PURE__*/React.createElement(Typography, {
|
|
10
|
+
as: "span",
|
|
11
|
+
variant: "body1",
|
|
12
|
+
color: Neutral.B18
|
|
13
|
+
}, label);
|
|
14
|
+
}
|
|
15
|
+
return /*#__PURE__*/React.createElement(MenuOptionLabelContainer, null, /*#__PURE__*/React.createElement(Typography, {
|
|
7
16
|
as: "span",
|
|
8
17
|
variant: "body1",
|
|
9
18
|
color: Neutral.B18
|
|
10
|
-
}, label)
|
|
19
|
+
}, label), /*#__PURE__*/React.createElement(Typography, {
|
|
20
|
+
as: "span",
|
|
21
|
+
variant: "subtitle2",
|
|
22
|
+
color: Neutral.B40
|
|
23
|
+
}, sublabel));
|
|
11
24
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export var MenuOptionLabelContainer = styled.div.withConfig({
|
|
3
|
+
displayName: "MenuOptionLabelStyle__MenuOptionLabelContainer",
|
|
4
|
+
componentId: "sc-oryr0t-0"
|
|
5
|
+
})(["display:flex;flex-direction:column;align-items:center;padding:4px 0;"]);
|
|
@@ -12,15 +12,15 @@ export var StyledSideSheetContainer = styled.div.withConfig({
|
|
|
12
12
|
export var StyledSideSheetHeader = styled.div.withConfig({
|
|
13
13
|
displayName: "SideSheetStyle__StyledSideSheetHeader",
|
|
14
14
|
componentId: "sc-z0rzf0-2"
|
|
15
|
-
})(["display:flex;align-items:top;padding:16px 20px;"]);
|
|
15
|
+
})(["display:flex;align-items:top;padding:16px 20px;gap:8px;"]);
|
|
16
16
|
export var StyledButtonContainer = styled.div.withConfig({
|
|
17
17
|
displayName: "SideSheetStyle__StyledButtonContainer",
|
|
18
18
|
componentId: "sc-z0rzf0-3"
|
|
19
|
-
})(["cursor:pointer;margin:
|
|
19
|
+
})(["cursor:pointer;margin-top:3px;svg{width:24px;fill:", ";}"], Neutral.B40);
|
|
20
20
|
export var StyledRightContainer = styled.div.withConfig({
|
|
21
21
|
displayName: "SideSheetStyle__StyledRightContainer",
|
|
22
22
|
componentId: "sc-z0rzf0-4"
|
|
23
|
-
})(["margin-left:auto;"]);
|
|
23
|
+
})(["margin-left:auto;display:flex;align-items:top;"]);
|
|
24
24
|
export var StyledHorizontalLine = styled.hr.withConfig({
|
|
25
25
|
displayName: "SideSheetStyle__StyledHorizontalLine",
|
|
26
26
|
componentId: "sc-z0rzf0-5"
|
package/lib/@next/Menu/Menu.d.ts
CHANGED
package/lib/@next/Menu/Menu.js
CHANGED
|
@@ -34,6 +34,7 @@ var Menu = function Menu(_ref) {
|
|
|
34
34
|
return /*#__PURE__*/_react["default"].createElement(_MenuStyle.StyledMenu, null, options == null ? void 0 : options.map(function (option) {
|
|
35
35
|
var value = option.value,
|
|
36
36
|
label = option.label,
|
|
37
|
+
sublabel = option.sublabel,
|
|
37
38
|
disabled = option.disabled,
|
|
38
39
|
id = option.id;
|
|
39
40
|
var randomId = (0, _reactIdGenerator["default"])('glints-menu-option');
|
|
@@ -47,7 +48,8 @@ var Menu = function Menu(_ref) {
|
|
|
47
48
|
onClick: onClick,
|
|
48
49
|
allowMultiple: allowMultiple
|
|
49
50
|
}, /*#__PURE__*/_react["default"].createElement(_MenuOptionLabel.MenuOptionLabel, {
|
|
50
|
-
label: label
|
|
51
|
+
label: label,
|
|
52
|
+
sublabel: sublabel
|
|
51
53
|
}));
|
|
52
54
|
}));
|
|
53
55
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface MenuOptionLabelProps {
|
|
3
3
|
label: React.ReactNode;
|
|
4
|
-
|
|
4
|
+
sublabel?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const MenuOptionLabel: ({ label, sublabel }: MenuOptionLabelProps) => JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -6,12 +6,25 @@ exports.MenuOptionLabel = void 0;
|
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
var _Typography = require("../../Typography");
|
|
8
8
|
var _colors = require("../../utilities/colors");
|
|
9
|
+
var _MenuOptionLabelStyle = require("./MenuOptionLabelStyle");
|
|
9
10
|
var MenuOptionLabel = function MenuOptionLabel(_ref) {
|
|
10
|
-
var label = _ref.label
|
|
11
|
-
|
|
11
|
+
var label = _ref.label,
|
|
12
|
+
sublabel = _ref.sublabel;
|
|
13
|
+
if (!sublabel) {
|
|
14
|
+
return /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
|
|
15
|
+
as: "span",
|
|
16
|
+
variant: "body1",
|
|
17
|
+
color: _colors.Neutral.B18
|
|
18
|
+
}, label);
|
|
19
|
+
}
|
|
20
|
+
return /*#__PURE__*/_react["default"].createElement(_MenuOptionLabelStyle.MenuOptionLabelContainer, null, /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
|
|
12
21
|
as: "span",
|
|
13
22
|
variant: "body1",
|
|
14
23
|
color: _colors.Neutral.B18
|
|
15
|
-
}, label)
|
|
24
|
+
}, label), /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
|
|
25
|
+
as: "span",
|
|
26
|
+
variant: "subtitle2",
|
|
27
|
+
color: _colors.Neutral.B40
|
|
28
|
+
}, sublabel));
|
|
16
29
|
};
|
|
17
30
|
exports.MenuOptionLabel = MenuOptionLabel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.MenuOptionLabelContainer = void 0;
|
|
6
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
7
|
+
var MenuOptionLabelContainer = _styledComponents["default"].div.withConfig({
|
|
8
|
+
displayName: "MenuOptionLabelStyle__MenuOptionLabelContainer",
|
|
9
|
+
componentId: "sc-oryr0t-0"
|
|
10
|
+
})(["display:flex;flex-direction:column;align-items:center;padding:4px 0;"]);
|
|
11
|
+
exports.MenuOptionLabelContainer = MenuOptionLabelContainer;
|
|
@@ -21,17 +21,17 @@ exports.StyledSideSheetContainer = StyledSideSheetContainer;
|
|
|
21
21
|
var StyledSideSheetHeader = _styledComponents["default"].div.withConfig({
|
|
22
22
|
displayName: "SideSheetStyle__StyledSideSheetHeader",
|
|
23
23
|
componentId: "sc-z0rzf0-2"
|
|
24
|
-
})(["display:flex;align-items:top;padding:16px 20px;"]);
|
|
24
|
+
})(["display:flex;align-items:top;padding:16px 20px;gap:8px;"]);
|
|
25
25
|
exports.StyledSideSheetHeader = StyledSideSheetHeader;
|
|
26
26
|
var StyledButtonContainer = _styledComponents["default"].div.withConfig({
|
|
27
27
|
displayName: "SideSheetStyle__StyledButtonContainer",
|
|
28
28
|
componentId: "sc-z0rzf0-3"
|
|
29
|
-
})(["cursor:pointer;margin:
|
|
29
|
+
})(["cursor:pointer;margin-top:3px;svg{width:24px;fill:", ";}"], _colors.Neutral.B40);
|
|
30
30
|
exports.StyledButtonContainer = StyledButtonContainer;
|
|
31
31
|
var StyledRightContainer = _styledComponents["default"].div.withConfig({
|
|
32
32
|
displayName: "SideSheetStyle__StyledRightContainer",
|
|
33
33
|
componentId: "sc-z0rzf0-4"
|
|
34
|
-
})(["margin-left:auto;"]);
|
|
34
|
+
})(["margin-left:auto;display:flex;align-items:top;"]);
|
|
35
35
|
exports.StyledRightContainer = StyledRightContainer;
|
|
36
36
|
var StyledHorizontalLine = _styledComponents["default"].hr.withConfig({
|
|
37
37
|
displayName: "SideSheetStyle__StyledHorizontalLine",
|