@spaced-out/ui-design-system 0.0.7 → 0.0.9
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/CHANGELOG.md +97 -93
- package/design-tokens/color/app-color.json +15 -0
- package/design-tokens/size/base-size.json +3 -0
- package/lib/components/Avatar/Avatar.js +7 -5
- package/lib/components/Avatar/Avatar.js.flow +17 -5
- package/lib/components/Button/Button.module.css +2 -0
- package/lib/components/Icon/Icon.js +6 -1
- package/lib/components/Icon/Icon.js.flow +6 -1
- package/lib/components/InContextAlert/InContextAlert.module.css +16 -0
- package/lib/components/Menu/Menu.js +4 -0
- package/lib/components/Menu/Menu.js.flow +47 -28
- package/lib/components/Tab/Tab.js +90 -0
- package/lib/components/Tab/Tab.js.flow +130 -0
- package/lib/components/Tab/Tab.module.css +66 -0
- package/lib/components/Tab/index.js +18 -0
- package/lib/components/Tab/index.js.flow +4 -0
- package/lib/components/TabList/TabDropdown.js +80 -0
- package/lib/components/TabList/TabDropdown.js.flow +110 -0
- package/lib/components/TabList/TabDropdown.module.css +20 -0
- package/lib/components/TabList/TabList.js +128 -0
- package/lib/components/TabList/TabList.js.flow +147 -0
- package/lib/components/TabList/TabList.module.css +11 -0
- package/lib/components/TabList/index.js +16 -0
- package/lib/components/TabList/index.js.flow +4 -0
- package/lib/components/Text/Text.js +26 -14
- package/lib/components/Text/Text.js.flow +14 -0
- package/lib/components/Text/index.js +6 -0
- package/lib/components/Text/index.js.flow +1 -0
- package/lib/styles/typography.module.css +6 -0
- package/lib/styles/variables/_color.css +10 -0
- package/lib/styles/variables/_color.js +11 -1
- package/lib/styles/variables/_color.js.flow +10 -0
- package/lib/styles/variables/_size.css +2 -0
- package/lib/styles/variables/_size.js +3 -1
- package/lib/styles/variables/_size.js.flow +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TabList = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _size = require("../../styles/variables/_size");
|
|
9
|
+
var _space = require("../../styles/variables/_space");
|
|
10
|
+
var _classify = require("../../utils/classify");
|
|
11
|
+
var _TabDropdown = require("./TabDropdown.js");
|
|
12
|
+
var _TabListModule = _interopRequireDefault(require("./TabList.module.css"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
|
|
17
|
+
const TabList = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
classNames,
|
|
20
|
+
children,
|
|
21
|
+
size,
|
|
22
|
+
onSelect,
|
|
23
|
+
selectedTab,
|
|
24
|
+
menuWidth
|
|
25
|
+
} = _ref;
|
|
26
|
+
const ref = React.useRef(null);
|
|
27
|
+
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
28
|
+
const childrenWithProps = () => {
|
|
29
|
+
const childrenArray = React.Children.toArray(children);
|
|
30
|
+
const totalChildCount = childrenArray.length;
|
|
31
|
+
let tabListWidth = 0;
|
|
32
|
+
const menuOptions = [];
|
|
33
|
+
let nodes = [];
|
|
34
|
+
const tabListNodes = [];
|
|
35
|
+
for (let i = 0; i < totalChildCount; i++) {
|
|
36
|
+
const child = childrenArray[i];
|
|
37
|
+
const {
|
|
38
|
+
width = _size.size100,
|
|
39
|
+
tabId,
|
|
40
|
+
label,
|
|
41
|
+
disabled,
|
|
42
|
+
iconName,
|
|
43
|
+
iconType
|
|
44
|
+
} = child.props;
|
|
45
|
+
const widthInt = parseInt(width);
|
|
46
|
+
tabListWidth = tabListWidth + widthInt;
|
|
47
|
+
if (tabListWidth < containerWidth || i === 0) {
|
|
48
|
+
const childOnSelect = params => {
|
|
49
|
+
onSelect && onSelect(params); // call the tab level onSelect
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
tabListNodes.push( /*#__PURE__*/React.cloneElement(child, {
|
|
53
|
+
size,
|
|
54
|
+
onSelect: childOnSelect,
|
|
55
|
+
selectedTab
|
|
56
|
+
}));
|
|
57
|
+
} else {
|
|
58
|
+
menuOptions.push({
|
|
59
|
+
key: tabId,
|
|
60
|
+
label,
|
|
61
|
+
disabled,
|
|
62
|
+
iconLeft: iconName,
|
|
63
|
+
iconLeftType: iconType
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const menuOnSelect = _ref2 => {
|
|
68
|
+
let {
|
|
69
|
+
key,
|
|
70
|
+
label
|
|
71
|
+
} = _ref2;
|
|
72
|
+
onSelect && onSelect({
|
|
73
|
+
tabId: key,
|
|
74
|
+
label
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const selectedOption = {
|
|
78
|
+
key: selectedTab?.tabId,
|
|
79
|
+
label: selectedTab?.label || ''
|
|
80
|
+
};
|
|
81
|
+
const isMenuOptionSelected = (() => {
|
|
82
|
+
for (let i = 0; i < menuOptions.length; i++) {
|
|
83
|
+
if (menuOptions[i].key === selectedTab?.tabId) {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
})();
|
|
89
|
+
const tabDropDownNode = menuOptions.length ? /*#__PURE__*/React.createElement(_TabDropdown.TabDropdown, {
|
|
90
|
+
key: 'tabDropdown' + menuOptions.length,
|
|
91
|
+
size: size,
|
|
92
|
+
onOptionSelect: menuOnSelect,
|
|
93
|
+
props: {
|
|
94
|
+
tab: {
|
|
95
|
+
label: '...',
|
|
96
|
+
tabId: 'tab-dropdown',
|
|
97
|
+
selectedTab: {
|
|
98
|
+
tabId: isMenuOptionSelected ? 'tab-dropdown' : ''
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
menu: {
|
|
102
|
+
isFluid: false,
|
|
103
|
+
menuDisabled: false,
|
|
104
|
+
options: menuOptions,
|
|
105
|
+
selectedOption,
|
|
106
|
+
width: menuWidth
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}) : null;
|
|
110
|
+
nodes = [...tabListNodes, tabDropDownNode];
|
|
111
|
+
return nodes;
|
|
112
|
+
};
|
|
113
|
+
React.useLayoutEffect(() => {
|
|
114
|
+
if (ref.current && ref.current.offsetWidth) {
|
|
115
|
+
const availableContainerWidth = ref.current.offsetWidth - (parseInt(_size.size36) + parseInt(_space.spaceMedium));
|
|
116
|
+
setContainerWidth(availableContainerWidth);
|
|
117
|
+
}
|
|
118
|
+
}, [ref.current]);
|
|
119
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
ref: ref,
|
|
121
|
+
"data-testid": "Tabs",
|
|
122
|
+
className: (0, _classify.classify)(_TabListModule.default.tabsContainer, {
|
|
123
|
+
[_TabListModule.default.mediumSize]: size === 'medium',
|
|
124
|
+
[_TabListModule.default.smallSize]: size === 'small'
|
|
125
|
+
}, classNames?.wrapper)
|
|
126
|
+
}, containerWidth ? childrenWithProps() : null);
|
|
127
|
+
};
|
|
128
|
+
exports.TabList = TabList;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import {size36, size100} from '../../styles/variables/_size';
|
|
6
|
+
import {spaceMedium} from '../../styles/variables/_space';
|
|
7
|
+
import {classify} from '../../utils/classify';
|
|
8
|
+
|
|
9
|
+
import {TabDropdown} from './TabDropdown.js';
|
|
10
|
+
|
|
11
|
+
import css from './TabList.module.css';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
type ClassNames = $ReadOnly<{wrapper?: string}>;
|
|
15
|
+
|
|
16
|
+
export type TabsProps = {
|
|
17
|
+
classNames?: ClassNames,
|
|
18
|
+
onSelect?: ({tabId?: string, label?: string}) => mixed,
|
|
19
|
+
children?: React.Node,
|
|
20
|
+
size?: 'medium',
|
|
21
|
+
selectedTab?: {tabId?: string, label?: string},
|
|
22
|
+
menuWidth?: string,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const TabList = ({
|
|
26
|
+
classNames,
|
|
27
|
+
children,
|
|
28
|
+
size,
|
|
29
|
+
onSelect,
|
|
30
|
+
selectedTab,
|
|
31
|
+
menuWidth,
|
|
32
|
+
}: TabsProps): React.Node => {
|
|
33
|
+
const ref = React.useRef(null);
|
|
34
|
+
|
|
35
|
+
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
36
|
+
|
|
37
|
+
const childrenWithProps = () => {
|
|
38
|
+
const childrenArray = React.Children.toArray(children);
|
|
39
|
+
const totalChildCount = childrenArray.length;
|
|
40
|
+
let tabListWidth = 0;
|
|
41
|
+
const menuOptions = [];
|
|
42
|
+
|
|
43
|
+
let nodes: React.Node[] = [];
|
|
44
|
+
const tabListNodes: React.Node[] = [];
|
|
45
|
+
for (let i = 0; i < totalChildCount; i++) {
|
|
46
|
+
const child = childrenArray[i];
|
|
47
|
+
const {
|
|
48
|
+
width = size100,
|
|
49
|
+
tabId,
|
|
50
|
+
label,
|
|
51
|
+
disabled,
|
|
52
|
+
iconName,
|
|
53
|
+
iconType,
|
|
54
|
+
} = child.props;
|
|
55
|
+
const widthInt = parseInt(width);
|
|
56
|
+
tabListWidth = tabListWidth + widthInt;
|
|
57
|
+
|
|
58
|
+
if (tabListWidth < containerWidth || i === 0) {
|
|
59
|
+
const childOnSelect = (params) => {
|
|
60
|
+
onSelect && onSelect(params); // call the tab level onSelect
|
|
61
|
+
};
|
|
62
|
+
tabListNodes.push(
|
|
63
|
+
React.cloneElement(child, {
|
|
64
|
+
size,
|
|
65
|
+
onSelect: childOnSelect,
|
|
66
|
+
selectedTab,
|
|
67
|
+
}),
|
|
68
|
+
);
|
|
69
|
+
} else {
|
|
70
|
+
menuOptions.push({
|
|
71
|
+
key: tabId,
|
|
72
|
+
label,
|
|
73
|
+
disabled,
|
|
74
|
+
iconLeft: iconName,
|
|
75
|
+
iconLeftType: iconType,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const menuOnSelect = ({key, label}) => {
|
|
81
|
+
onSelect && onSelect({tabId: key, label});
|
|
82
|
+
};
|
|
83
|
+
const selectedOption = {
|
|
84
|
+
key: selectedTab?.tabId,
|
|
85
|
+
label: selectedTab?.label || '',
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const isMenuOptionSelected = (() => {
|
|
89
|
+
for (let i = 0; i < menuOptions.length; i++) {
|
|
90
|
+
if (menuOptions[i].key === selectedTab?.tabId) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return false;
|
|
95
|
+
})();
|
|
96
|
+
|
|
97
|
+
const tabDropDownNode = menuOptions.length ? (
|
|
98
|
+
<TabDropdown
|
|
99
|
+
key={'tabDropdown' + menuOptions.length}
|
|
100
|
+
size={size}
|
|
101
|
+
onOptionSelect={menuOnSelect}
|
|
102
|
+
props={{
|
|
103
|
+
tab: {
|
|
104
|
+
label: '...',
|
|
105
|
+
tabId: 'tab-dropdown',
|
|
106
|
+
selectedTab: {tabId: isMenuOptionSelected ? 'tab-dropdown' : ''},
|
|
107
|
+
},
|
|
108
|
+
menu: {
|
|
109
|
+
isFluid: false,
|
|
110
|
+
menuDisabled: false,
|
|
111
|
+
options: menuOptions,
|
|
112
|
+
selectedOption,
|
|
113
|
+
width: menuWidth,
|
|
114
|
+
},
|
|
115
|
+
}}
|
|
116
|
+
/>
|
|
117
|
+
) : null;
|
|
118
|
+
|
|
119
|
+
nodes = [...tabListNodes, tabDropDownNode];
|
|
120
|
+
return nodes;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
React.useLayoutEffect(() => {
|
|
124
|
+
if (ref.current && ref.current.offsetWidth) {
|
|
125
|
+
const availableContainerWidth =
|
|
126
|
+
ref.current.offsetWidth - (parseInt(size36) + parseInt(spaceMedium));
|
|
127
|
+
setContainerWidth(availableContainerWidth);
|
|
128
|
+
}
|
|
129
|
+
}, [ref.current]);
|
|
130
|
+
|
|
131
|
+
return (
|
|
132
|
+
<div
|
|
133
|
+
ref={ref}
|
|
134
|
+
data-testid="Tabs"
|
|
135
|
+
className={classify(
|
|
136
|
+
css.tabsContainer,
|
|
137
|
+
{
|
|
138
|
+
[css.mediumSize]: size === 'medium',
|
|
139
|
+
[css.smallSize]: size === 'small',
|
|
140
|
+
},
|
|
141
|
+
classNames?.wrapper,
|
|
142
|
+
)}
|
|
143
|
+
>
|
|
144
|
+
{containerWidth ? childrenWithProps() : null}
|
|
145
|
+
</div>
|
|
146
|
+
);
|
|
147
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@value (colorFillPrimary) from '../../styles/variables/_color.css';
|
|
2
|
+
@value (spaceMedium) from '../../styles/variables/_space.css';
|
|
3
|
+
|
|
4
|
+
@value ( sizeFluid) from '../../styles/variables/_size.css';
|
|
5
|
+
|
|
6
|
+
.tabsContainer {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
gap: spaceMedium;
|
|
10
|
+
width: sizeFluid;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _TabList = require("./TabList");
|
|
7
|
+
Object.keys(_TabList).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _TabList[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _TabList[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TitleMedium = exports.SubTitleSmall = exports.SubTitleMedium = exports.SubTitleLarge = exports.SubTitleExtraSmall = exports.JumboMedium = exports.FormLabelSmall = exports.FormLabelMedium = exports.FormInputSmall = exports.FormInputMedium = exports.ButtonTextSmall = exports.ButtonTextMedium = exports.BodySmall = exports.BodyMedium = exports.BodyLarge = void 0;
|
|
6
|
+
exports.TitleMedium = exports.SubTitleSmall = exports.SubTitleMedium = exports.SubTitleLarge = exports.SubTitleExtraSmall = exports.JumboMedium = exports.FormLabelSmall = exports.FormLabelMedium = exports.FormInputSmall = exports.FormInputMedium = exports.ButtonTextSmall = exports.ButtonTextMedium = exports.ButtonTextExtraSmall = exports.BodySmall = exports.BodyMedium = exports.BodyLarge = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _typography = require("../../types/typography");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
@@ -108,85 +108,97 @@ const ButtonTextSmall = _ref8 => {
|
|
|
108
108
|
}), children);
|
|
109
109
|
};
|
|
110
110
|
exports.ButtonTextSmall = ButtonTextSmall;
|
|
111
|
-
const
|
|
111
|
+
const ButtonTextExtraSmall = _ref9 => {
|
|
112
112
|
let {
|
|
113
113
|
color = _typography.TEXT_COLORS.primary,
|
|
114
114
|
children,
|
|
115
115
|
className,
|
|
116
116
|
...props
|
|
117
117
|
} = _ref9;
|
|
118
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
119
|
+
className: (0, _classify.default)(_typographyModule.default.buttonTextExtraSmall, _typographyModule.default[color], className)
|
|
120
|
+
}), children);
|
|
121
|
+
};
|
|
122
|
+
exports.ButtonTextExtraSmall = ButtonTextExtraSmall;
|
|
123
|
+
const FormInputMedium = _ref10 => {
|
|
124
|
+
let {
|
|
125
|
+
color = _typography.TEXT_COLORS.primary,
|
|
126
|
+
children,
|
|
127
|
+
className,
|
|
128
|
+
...props
|
|
129
|
+
} = _ref10;
|
|
118
130
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
119
131
|
className: (0, _classify.default)(_typographyModule.default.formInputMedium, _typographyModule.default[color], className)
|
|
120
132
|
}), children);
|
|
121
133
|
};
|
|
122
134
|
exports.FormInputMedium = FormInputMedium;
|
|
123
|
-
const FormInputSmall =
|
|
135
|
+
const FormInputSmall = _ref11 => {
|
|
124
136
|
let {
|
|
125
137
|
color = _typography.TEXT_COLORS.primary,
|
|
126
138
|
children,
|
|
127
139
|
className,
|
|
128
140
|
...props
|
|
129
|
-
} =
|
|
141
|
+
} = _ref11;
|
|
130
142
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
131
143
|
className: (0, _classify.default)(_typographyModule.default.formInputSmall, _typographyModule.default[color], className)
|
|
132
144
|
}), children);
|
|
133
145
|
};
|
|
134
146
|
exports.FormInputSmall = FormInputSmall;
|
|
135
|
-
const BodyLarge =
|
|
147
|
+
const BodyLarge = _ref12 => {
|
|
136
148
|
let {
|
|
137
149
|
color = _typography.TEXT_COLORS.primary,
|
|
138
150
|
children,
|
|
139
151
|
className,
|
|
140
152
|
...props
|
|
141
|
-
} =
|
|
153
|
+
} = _ref12;
|
|
142
154
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
143
155
|
className: (0, _classify.default)(_typographyModule.default.bodyLarge, _typographyModule.default[color], className)
|
|
144
156
|
}), children);
|
|
145
157
|
};
|
|
146
158
|
exports.BodyLarge = BodyLarge;
|
|
147
|
-
const BodyMedium =
|
|
159
|
+
const BodyMedium = _ref13 => {
|
|
148
160
|
let {
|
|
149
161
|
color = _typography.TEXT_COLORS.primary,
|
|
150
162
|
children,
|
|
151
163
|
className,
|
|
152
164
|
...props
|
|
153
|
-
} =
|
|
165
|
+
} = _ref13;
|
|
154
166
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
155
167
|
className: (0, _classify.default)(_typographyModule.default.bodyMedium, _typographyModule.default[color], className)
|
|
156
168
|
}), children);
|
|
157
169
|
};
|
|
158
170
|
exports.BodyMedium = BodyMedium;
|
|
159
|
-
const BodySmall =
|
|
171
|
+
const BodySmall = _ref14 => {
|
|
160
172
|
let {
|
|
161
173
|
color = _typography.TEXT_COLORS.primary,
|
|
162
174
|
children,
|
|
163
175
|
className,
|
|
164
176
|
...props
|
|
165
|
-
} =
|
|
177
|
+
} = _ref14;
|
|
166
178
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
167
179
|
className: (0, _classify.default)(_typographyModule.default.bodySmall, _typographyModule.default[color], className)
|
|
168
180
|
}), children);
|
|
169
181
|
};
|
|
170
182
|
exports.BodySmall = BodySmall;
|
|
171
|
-
const FormLabelMedium =
|
|
183
|
+
const FormLabelMedium = _ref15 => {
|
|
172
184
|
let {
|
|
173
185
|
color = _typography.TEXT_COLORS.primary,
|
|
174
186
|
children,
|
|
175
187
|
className,
|
|
176
188
|
...props
|
|
177
|
-
} =
|
|
189
|
+
} = _ref15;
|
|
178
190
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
179
191
|
className: (0, _classify.default)(_typographyModule.default.formLabelMedium, _typographyModule.default[color], className)
|
|
180
192
|
}), children);
|
|
181
193
|
};
|
|
182
194
|
exports.FormLabelMedium = FormLabelMedium;
|
|
183
|
-
const FormLabelSmall =
|
|
195
|
+
const FormLabelSmall = _ref16 => {
|
|
184
196
|
let {
|
|
185
197
|
color = _typography.TEXT_COLORS.primary,
|
|
186
198
|
children,
|
|
187
199
|
className,
|
|
188
200
|
...props
|
|
189
|
-
} =
|
|
201
|
+
} = _ref16;
|
|
190
202
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
191
203
|
className: (0, _classify.default)(_typographyModule.default.formLabelSmall, _typographyModule.default[color], className)
|
|
192
204
|
}), children);
|
|
@@ -116,6 +116,20 @@ export const ButtonTextSmall = ({
|
|
|
116
116
|
</span>
|
|
117
117
|
);
|
|
118
118
|
|
|
119
|
+
export const ButtonTextExtraSmall = ({
|
|
120
|
+
color = TEXT_COLORS.primary,
|
|
121
|
+
children,
|
|
122
|
+
className,
|
|
123
|
+
...props
|
|
124
|
+
}: TextProps): React.Node => (
|
|
125
|
+
<span
|
|
126
|
+
{...props}
|
|
127
|
+
className={classify(css.buttonTextExtraSmall, css[color], className)}
|
|
128
|
+
>
|
|
129
|
+
{children}
|
|
130
|
+
</span>
|
|
131
|
+
);
|
|
132
|
+
|
|
119
133
|
export const FormInputMedium = ({
|
|
120
134
|
color = TEXT_COLORS.primary,
|
|
121
135
|
children,
|
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "BodySmall", {
|
|
|
21
21
|
return _Text.BodySmall;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "ButtonTextExtraSmall", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _Text.ButtonTextExtraSmall;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "ButtonTextMedium", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function () {
|
|
@@ -103,6 +103,12 @@
|
|
|
103
103
|
letter-spacing: fontLetterSpacing1;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
.buttonTextExtraSmall {
|
|
107
|
+
composes: baseType;
|
|
108
|
+
font-size: fontSize12;
|
|
109
|
+
letter-spacing: fontLetterSpacing1;
|
|
110
|
+
}
|
|
111
|
+
|
|
106
112
|
.formInputMedium {
|
|
107
113
|
composes: baseType;
|
|
108
114
|
font-size: fontSize14;
|
|
@@ -84,6 +84,8 @@
|
|
|
84
84
|
|
|
85
85
|
@value colorNeutral: #706f9b;
|
|
86
86
|
|
|
87
|
+
@value colorNeutralLighter: #d3d2e0;
|
|
88
|
+
|
|
87
89
|
@value colorNeutralLightest: #f1f1f5;
|
|
88
90
|
|
|
89
91
|
@value colorNeutralLight: #bdbdd1;
|
|
@@ -94,6 +96,8 @@
|
|
|
94
96
|
|
|
95
97
|
@value colorSuccess: #03964d;
|
|
96
98
|
|
|
99
|
+
@value colorSuccessLighter: #b1dec8;
|
|
100
|
+
|
|
97
101
|
@value colorSuccessLightest: #e6f5ed;
|
|
98
102
|
|
|
99
103
|
@value colorSuccessLight: #8bcfad;
|
|
@@ -104,6 +108,8 @@
|
|
|
104
108
|
|
|
105
109
|
@value colorInformation: #0769f0;
|
|
106
110
|
|
|
111
|
+
@value colorInformationLighter: #b2d1fa;
|
|
112
|
+
|
|
107
113
|
@value colorInformationLightest: #e6f0fe;
|
|
108
114
|
|
|
109
115
|
@value colorInformationLight: #8dbaf8;
|
|
@@ -114,6 +120,8 @@
|
|
|
114
120
|
|
|
115
121
|
@value colorWarning: #df7e0c;
|
|
116
122
|
|
|
123
|
+
@value colorWarningLighter: #f5d7b4;
|
|
124
|
+
|
|
117
125
|
@value colorWarningLightest: #fcf2e7;
|
|
118
126
|
|
|
119
127
|
@value colorWarningLight: #f0c48f;
|
|
@@ -124,6 +132,8 @@
|
|
|
124
132
|
|
|
125
133
|
@value colorDanger: #e31c4c;
|
|
126
134
|
|
|
135
|
+
@value colorDangerLighter: #f6b9c8;
|
|
136
|
+
|
|
127
137
|
@value colorDangerLightest: #fce8ed;
|
|
128
138
|
|
|
129
139
|
@value colorDangerLight: #f297ad;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.colorWarningLightest = exports.colorWarningLight = exports.colorWarningDarkest = exports.colorWarningDark = exports.colorWarning = exports.colorTooltipFill = exports.colorTextWarning = exports.colorTextTertiary = exports.colorTextSuccess = exports.colorTextSelected = exports.colorTextSecondary = exports.colorTextPrimary = exports.colorTextNeutral = exports.colorTextInverseSecondary = exports.colorTextInversePrimary = exports.colorTextInformation = exports.colorTextDisabled = exports.colorTextDanger = exports.colorSuccessLightest = exports.colorSuccessLight = exports.colorSuccessDarkest = exports.colorSuccessDark = exports.colorSuccess = exports.colorNeutralLightest = exports.colorNeutralLight = exports.colorNeutralDarkest = exports.colorNeutralDark = exports.colorNeutral = exports.colorInformationLightest = exports.colorInformationLight = exports.colorInformationDarkest = exports.colorInformationDark = exports.colorInformation = exports.colorGrayLightest = exports.colorFocusPrimary = exports.colorFocusDanger = exports.colorFillSecondary = exports.colorFillPrimary = exports.colorFillNone = exports.colorFillDisabled = exports.colorDangerLightest = exports.colorDangerLight = exports.colorDangerDarkest = exports.colorDangerDark = exports.colorDanger = exports.colorButtonFillTertiaryPressed = exports.colorButtonFillTertiaryHovered = exports.colorButtonFillTertiaryEnabled = exports.colorButtonFillSecondaryPressed = exports.colorButtonFillSecondaryHovered = exports.colorButtonFillSecondaryEnabled = exports.colorButtonFillPrimaryPressed = exports.colorButtonFillPrimaryHovered = exports.colorButtonFillPrimaryEnabled = exports.colorButtonFillGhostPressed = exports.colorButtonFillGhostHovered = exports.colorButtonFillGhostEnabled = exports.colorButtonFillDangerPressed = exports.colorButtonFillDangerHovered = exports.colorButtonFillDangerEnabled = exports.colorBorderSecondary = exports.colorBorderPrimary = exports.colorBorderDanger = exports.colorBackgroundTertiary = exports.colorBackgroundSecondary = exports.colorBackgroundPrimary = exports.colorBackdropFill = void 0;
|
|
6
|
+
exports.colorWarningLightest = exports.colorWarningLighter = exports.colorWarningLight = exports.colorWarningDarkest = exports.colorWarningDark = exports.colorWarning = exports.colorTooltipFill = exports.colorTextWarning = exports.colorTextTertiary = exports.colorTextSuccess = exports.colorTextSelected = exports.colorTextSecondary = exports.colorTextPrimary = exports.colorTextNeutral = exports.colorTextInverseSecondary = exports.colorTextInversePrimary = exports.colorTextInformation = exports.colorTextDisabled = exports.colorTextDanger = exports.colorSuccessLightest = exports.colorSuccessLighter = exports.colorSuccessLight = exports.colorSuccessDarkest = exports.colorSuccessDark = exports.colorSuccess = exports.colorNeutralLightest = exports.colorNeutralLighter = exports.colorNeutralLight = exports.colorNeutralDarkest = exports.colorNeutralDark = exports.colorNeutral = exports.colorInformationLightest = exports.colorInformationLighter = exports.colorInformationLight = exports.colorInformationDarkest = exports.colorInformationDark = exports.colorInformation = exports.colorGrayLightest = exports.colorFocusPrimary = exports.colorFocusDanger = exports.colorFillSecondary = exports.colorFillPrimary = exports.colorFillNone = exports.colorFillDisabled = exports.colorDangerLightest = exports.colorDangerLighter = exports.colorDangerLight = exports.colorDangerDarkest = exports.colorDangerDark = exports.colorDanger = exports.colorButtonFillTertiaryPressed = exports.colorButtonFillTertiaryHovered = exports.colorButtonFillTertiaryEnabled = exports.colorButtonFillSecondaryPressed = exports.colorButtonFillSecondaryHovered = exports.colorButtonFillSecondaryEnabled = exports.colorButtonFillPrimaryPressed = exports.colorButtonFillPrimaryHovered = exports.colorButtonFillPrimaryEnabled = exports.colorButtonFillGhostPressed = exports.colorButtonFillGhostHovered = exports.colorButtonFillGhostEnabled = exports.colorButtonFillDangerPressed = exports.colorButtonFillDangerHovered = exports.colorButtonFillDangerEnabled = exports.colorBorderSecondary = exports.colorBorderPrimary = exports.colorBorderDanger = exports.colorBackgroundTertiary = exports.colorBackgroundSecondary = exports.colorBackgroundPrimary = exports.colorBackdropFill = void 0;
|
|
7
7
|
|
|
8
8
|
const colorTextPrimary = '#17172A';
|
|
9
9
|
exports.colorTextPrimary = colorTextPrimary;
|
|
@@ -91,6 +91,8 @@ const colorGrayLightest = '#EBEBEB';
|
|
|
91
91
|
exports.colorGrayLightest = colorGrayLightest;
|
|
92
92
|
const colorNeutral = '#706f9b';
|
|
93
93
|
exports.colorNeutral = colorNeutral;
|
|
94
|
+
const colorNeutralLighter = '#d3d2e0';
|
|
95
|
+
exports.colorNeutralLighter = colorNeutralLighter;
|
|
94
96
|
const colorNeutralLightest = '#f1f1f5';
|
|
95
97
|
exports.colorNeutralLightest = colorNeutralLightest;
|
|
96
98
|
const colorNeutralLight = '#bdbdd1';
|
|
@@ -101,6 +103,8 @@ const colorNeutralDarkest = '#2C2C47';
|
|
|
101
103
|
exports.colorNeutralDarkest = colorNeutralDarkest;
|
|
102
104
|
const colorSuccess = '#03964d';
|
|
103
105
|
exports.colorSuccess = colorSuccess;
|
|
106
|
+
const colorSuccessLighter = '#b1dec8';
|
|
107
|
+
exports.colorSuccessLighter = colorSuccessLighter;
|
|
104
108
|
const colorSuccessLightest = '#e6f5ed';
|
|
105
109
|
exports.colorSuccessLightest = colorSuccessLightest;
|
|
106
110
|
const colorSuccessLight = '#8bcfad';
|
|
@@ -111,6 +115,8 @@ const colorSuccessDarkest = '#013f20';
|
|
|
111
115
|
exports.colorSuccessDarkest = colorSuccessDarkest;
|
|
112
116
|
const colorInformation = '#0769f0';
|
|
113
117
|
exports.colorInformation = colorInformation;
|
|
118
|
+
const colorInformationLighter = '#b2d1fa';
|
|
119
|
+
exports.colorInformationLighter = colorInformationLighter;
|
|
114
120
|
const colorInformationLightest = '#e6f0fe';
|
|
115
121
|
exports.colorInformationLightest = colorInformationLightest;
|
|
116
122
|
const colorInformationLight = '#8dbaf8';
|
|
@@ -121,6 +127,8 @@ const colorInformationDarkest = '#032c65';
|
|
|
121
127
|
exports.colorInformationDarkest = colorInformationDarkest;
|
|
122
128
|
const colorWarning = '#df7e0c';
|
|
123
129
|
exports.colorWarning = colorWarning;
|
|
130
|
+
const colorWarningLighter = '#f5d7b4';
|
|
131
|
+
exports.colorWarningLighter = colorWarningLighter;
|
|
124
132
|
const colorWarningLightest = '#fcf2e7';
|
|
125
133
|
exports.colorWarningLightest = colorWarningLightest;
|
|
126
134
|
const colorWarningLight = '#f0c48f';
|
|
@@ -131,6 +139,8 @@ const colorWarningDarkest = '#5e3505';
|
|
|
131
139
|
exports.colorWarningDarkest = colorWarningDarkest;
|
|
132
140
|
const colorDanger = '#e31c4c';
|
|
133
141
|
exports.colorDanger = colorDanger;
|
|
142
|
+
const colorDangerLighter = '#f6b9c8';
|
|
143
|
+
exports.colorDangerLighter = colorDangerLighter;
|
|
134
144
|
const colorDangerLightest = '#fce8ed';
|
|
135
145
|
exports.colorDangerLightest = colorDangerLightest;
|
|
136
146
|
const colorDangerLight = '#f297ad';
|
|
@@ -86,6 +86,8 @@ export const colorGrayLightest = '#EBEBEB';
|
|
|
86
86
|
|
|
87
87
|
export const colorNeutral = '#706f9b';
|
|
88
88
|
|
|
89
|
+
export const colorNeutralLighter = '#d3d2e0';
|
|
90
|
+
|
|
89
91
|
export const colorNeutralLightest = '#f1f1f5';
|
|
90
92
|
|
|
91
93
|
export const colorNeutralLight = '#bdbdd1';
|
|
@@ -96,6 +98,8 @@ export const colorNeutralDarkest = '#2C2C47';
|
|
|
96
98
|
|
|
97
99
|
export const colorSuccess = '#03964d';
|
|
98
100
|
|
|
101
|
+
export const colorSuccessLighter = '#b1dec8';
|
|
102
|
+
|
|
99
103
|
export const colorSuccessLightest = '#e6f5ed';
|
|
100
104
|
|
|
101
105
|
export const colorSuccessLight = '#8bcfad';
|
|
@@ -106,6 +110,8 @@ export const colorSuccessDarkest = '#013f20';
|
|
|
106
110
|
|
|
107
111
|
export const colorInformation = '#0769f0';
|
|
108
112
|
|
|
113
|
+
export const colorInformationLighter = '#b2d1fa';
|
|
114
|
+
|
|
109
115
|
export const colorInformationLightest = '#e6f0fe';
|
|
110
116
|
|
|
111
117
|
export const colorInformationLight = '#8dbaf8';
|
|
@@ -116,6 +122,8 @@ export const colorInformationDarkest = '#032c65';
|
|
|
116
122
|
|
|
117
123
|
export const colorWarning = '#df7e0c';
|
|
118
124
|
|
|
125
|
+
export const colorWarningLighter = '#f5d7b4';
|
|
126
|
+
|
|
119
127
|
export const colorWarningLightest = '#fcf2e7';
|
|
120
128
|
|
|
121
129
|
export const colorWarningLight = '#f0c48f';
|
|
@@ -126,6 +134,8 @@ export const colorWarningDarkest = '#5e3505';
|
|
|
126
134
|
|
|
127
135
|
export const colorDanger = '#e31c4c';
|
|
128
136
|
|
|
137
|
+
export const colorDangerLighter = '#f6b9c8';
|
|
138
|
+
|
|
129
139
|
export const colorDangerLightest = '#fce8ed';
|
|
130
140
|
|
|
131
141
|
export const colorDangerLight = '#f297ad';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.sizeFluid = exports.size960 = exports.size8 = exports.size720 = exports.size60 = exports.size580 = exports.size500 = exports.size5 = exports.size480 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size36 = exports.size34 = exports.size300 = exports.size30 = exports.size276 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size20 = exports.size2 = exports.size18 = exports.size160 = exports.size140 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = void 0;
|
|
6
|
+
exports.sizeFluid = exports.size960 = exports.size8 = exports.size720 = exports.size60 = exports.size580 = exports.size500 = exports.size5 = exports.size480 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size300 = exports.size30 = exports.size276 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size20 = exports.size2 = exports.size18 = exports.size160 = exports.size140 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = void 0;
|
|
7
7
|
|
|
8
8
|
const size2 = '2px';
|
|
9
9
|
exports.size2 = size2;
|
|
@@ -31,6 +31,8 @@ const size34 = '34px';
|
|
|
31
31
|
exports.size34 = size34;
|
|
32
32
|
const size36 = '36px';
|
|
33
33
|
exports.size36 = size36;
|
|
34
|
+
const size38 = '38px';
|
|
35
|
+
exports.size38 = size38;
|
|
34
36
|
const size40 = '40px';
|
|
35
37
|
exports.size40 = size40;
|
|
36
38
|
const size42 = '42px';
|