@spaced-out/ui-design-system 0.1.100 → 0.1.102
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/.cspell/custom-words.txt +2 -0
- package/.github/workflows/publish_to_npm.yml +1 -1
- package/CHANGELOG.md +15 -0
- package/design-tokens/size/base-size.json +3 -0
- package/lib/components/Button/Button.js +16 -3
- package/lib/components/Button/Button.js.flow +13 -0
- package/lib/components/Button/Button.module.css +15 -1
- package/lib/components/DateRangePicker/DateRangePicker.js +8 -6
- package/lib/components/DateRangePicker/DateRangePicker.js.flow +13 -8
- package/lib/components/DateRangePicker/DateRangeWrapper.js +11 -10
- package/lib/components/DateRangePicker/DateRangeWrapper.js.flow +26 -22
- package/lib/components/DateRangePicker/utils.js +12 -9
- package/lib/components/DateRangePicker/utils.js.flow +15 -9
- package/lib/components/FormTitleWrapper/FormTitleWrapper.js +42 -0
- package/lib/components/FormTitleWrapper/FormTitleWrapper.js.flow +68 -0
- package/lib/components/FormTitleWrapper/FormTitleWrapper.module.css +24 -0
- package/lib/components/FormTitleWrapper/index.js +16 -0
- package/lib/components/FormTitleWrapper/index.js.flow +3 -0
- package/lib/components/index.js +11 -0
- package/lib/components/index.js.flow +1 -0
- package/lib/styles/index.css +2 -0
- package/lib/styles/index.js +3 -1
- package/lib/styles/index.js.flow +2 -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
package/.cspell/custom-words.txt
CHANGED
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
- name: Check Permissions
|
|
23
23
|
id: check-permissions
|
|
24
24
|
env:
|
|
25
|
-
ALLOWED_USERS: superrover, Anant-Raj, ashwini-sensehq, vish-sah, VishalBarnawal, sanskar-s, VivekJangid
|
|
25
|
+
ALLOWED_USERS: superrover, Anant-Raj, ashwini-sensehq, vish-sah, VishalBarnawal, sanskar-s, VivekJangid, sharad-kushwah
|
|
26
26
|
if: ${{ !contains(env.ALLOWED_USERS, github.actor) }}
|
|
27
27
|
run: |
|
|
28
28
|
echo "You don't have correct permissions to do this release"
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.102](https://github.com/spaced-out/ui-design-system/compare/v0.1.101...v0.1.102) (2024-07-03)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 🌈 form title wrapper gradient button and basic table ([#232](https://github.com/spaced-out/ui-design-system/issues/232)) ([8905147](https://github.com/spaced-out/ui-design-system/commit/89051477ad5320dfb1324f657a1ad745f43269c4))
|
|
11
|
+
|
|
12
|
+
### [0.1.101](https://github.com/spaced-out/ui-design-system/compare/v0.1.100...v0.1.101) (2024-06-21)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* [GDS-413] tz offset in dateRangePicker prop ([#230](https://github.com/spaced-out/ui-design-system/issues/230)) ([e155e85](https://github.com/spaced-out/ui-design-system/commit/e155e85779589fd0a3c31dbeb5818f212415bf48))
|
|
18
|
+
* timeZone changed to timezone ([#231](https://github.com/spaced-out/ui-design-system/issues/231)) ([1a680f0](https://github.com/spaced-out/ui-design-system/commit/1a680f02d49095cc53a6c1d7a785e05cb6648f65))
|
|
19
|
+
|
|
5
20
|
### [0.1.100](https://github.com/spaced-out/ui-design-system/compare/v0.1.99...v0.1.100) (2024-06-13)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -14,12 +14,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
14
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
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
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
/**
|
|
18
|
+
* Note(Nishant): Although Button supports gradient as a type, its not currently customizable really.
|
|
19
|
+
* This only supports pre-defined gradient that moves from left to right.
|
|
20
|
+
* If someone wants to add more gradients, the expectation is that they would add it through a wrapper className.
|
|
21
|
+
*
|
|
22
|
+
* We could have taken an extra prop to take in the Gradient colors but that should not be encouraged
|
|
23
|
+
* as it would add an additional overhead on the component to figure out exact color values from string tokens
|
|
24
|
+
* and since this is rarely used type anyway, it should be avoided.
|
|
25
|
+
*/
|
|
17
26
|
const BUTTON_TYPES = Object.freeze({
|
|
18
27
|
primary: 'primary',
|
|
19
28
|
secondary: 'secondary',
|
|
20
29
|
tertiary: 'tertiary',
|
|
21
30
|
ghost: 'ghost',
|
|
22
|
-
danger: 'danger'
|
|
31
|
+
danger: 'danger',
|
|
32
|
+
gradient: 'gradient'
|
|
23
33
|
});
|
|
24
34
|
exports.BUTTON_TYPES = BUTTON_TYPES;
|
|
25
35
|
const BUTTON_ACTION_TYPE = Object.freeze({
|
|
@@ -33,14 +43,16 @@ const ButtonTypeToIconColorMap = {
|
|
|
33
43
|
secondary: 'clickable',
|
|
34
44
|
tertiary: 'primary',
|
|
35
45
|
ghost: 'primary',
|
|
36
|
-
danger: 'inversePrimary'
|
|
46
|
+
danger: 'inversePrimary',
|
|
47
|
+
gradient: 'inversePrimary'
|
|
37
48
|
};
|
|
38
49
|
const ButtonTypeToLoaderColorMap = {
|
|
39
50
|
primary: 'colorTextInversePrimary',
|
|
40
51
|
secondary: 'colorTextClickable',
|
|
41
52
|
tertiary: 'colorTextPrimary',
|
|
42
53
|
ghost: 'colorTextPrimary',
|
|
43
|
-
danger: 'colorTextInversePrimary'
|
|
54
|
+
danger: 'colorTextInversePrimary',
|
|
55
|
+
gradient: 'colorTextInversePrimary'
|
|
44
56
|
};
|
|
45
57
|
const UnstyledButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
46
58
|
let {
|
|
@@ -98,6 +110,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
98
110
|
[_ButtonModule.default.tertiary]: type === 'tertiary',
|
|
99
111
|
[_ButtonModule.default.ghost]: type === 'ghost',
|
|
100
112
|
[_ButtonModule.default.danger]: type === 'danger',
|
|
113
|
+
[_ButtonModule.default.gradient]: type === 'gradient',
|
|
101
114
|
[_ButtonModule.default.disabled]: disabled,
|
|
102
115
|
[_ButtonModule.default.small]: size === 'small',
|
|
103
116
|
[_ButtonModule.default.medium]: size === 'medium',
|
|
@@ -13,12 +13,22 @@ import css from './Button.module.css';
|
|
|
13
13
|
|
|
14
14
|
type ClassNames = $ReadOnly<{wrapper?: string, icon?: string, text?: string}>;
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Note(Nishant): Although Button supports gradient as a type, its not currently customizable really.
|
|
18
|
+
* This only supports pre-defined gradient that moves from left to right.
|
|
19
|
+
* If someone wants to add more gradients, the expectation is that they would add it through a wrapper className.
|
|
20
|
+
*
|
|
21
|
+
* We could have taken an extra prop to take in the Gradient colors but that should not be encouraged
|
|
22
|
+
* as it would add an additional overhead on the component to figure out exact color values from string tokens
|
|
23
|
+
* and since this is rarely used type anyway, it should be avoided.
|
|
24
|
+
*/
|
|
16
25
|
export const BUTTON_TYPES = Object.freeze({
|
|
17
26
|
primary: 'primary',
|
|
18
27
|
secondary: 'secondary',
|
|
19
28
|
tertiary: 'tertiary',
|
|
20
29
|
ghost: 'ghost',
|
|
21
30
|
danger: 'danger',
|
|
31
|
+
gradient: 'gradient',
|
|
22
32
|
});
|
|
23
33
|
|
|
24
34
|
export const BUTTON_ACTION_TYPE = Object.freeze({
|
|
@@ -66,6 +76,7 @@ const ButtonTypeToIconColorMap = {
|
|
|
66
76
|
tertiary: 'primary',
|
|
67
77
|
ghost: 'primary',
|
|
68
78
|
danger: 'inversePrimary',
|
|
79
|
+
gradient: 'inversePrimary',
|
|
69
80
|
};
|
|
70
81
|
|
|
71
82
|
const ButtonTypeToLoaderColorMap = {
|
|
@@ -74,6 +85,7 @@ const ButtonTypeToLoaderColorMap = {
|
|
|
74
85
|
tertiary: 'colorTextPrimary',
|
|
75
86
|
ghost: 'colorTextPrimary',
|
|
76
87
|
danger: 'colorTextInversePrimary',
|
|
88
|
+
gradient: 'colorTextInversePrimary',
|
|
77
89
|
};
|
|
78
90
|
|
|
79
91
|
export const UnstyledButton: React$AbstractComponent<
|
|
@@ -146,6 +158,7 @@ export const Button: React$AbstractComponent<ButtonProps, HTMLButtonElement> =
|
|
|
146
158
|
[css.tertiary]: type === 'tertiary',
|
|
147
159
|
[css.ghost]: type === 'ghost',
|
|
148
160
|
[css.danger]: type === 'danger',
|
|
161
|
+
[css.gradient]: type === 'gradient',
|
|
149
162
|
[css.disabled]: disabled,
|
|
150
163
|
[css.small]: size === 'small',
|
|
151
164
|
[css.medium]: size === 'medium',
|
|
@@ -29,7 +29,10 @@
|
|
|
29
29
|
colorTextClickable,
|
|
30
30
|
colorTextDisabled,
|
|
31
31
|
|
|
32
|
-
colorBorderSecondary
|
|
32
|
+
colorBorderSecondary,
|
|
33
|
+
|
|
34
|
+
colorFillPrimary,
|
|
35
|
+
colorInformation
|
|
33
36
|
|
|
34
37
|
) from '../../styles/variables/_color.css';
|
|
35
38
|
|
|
@@ -151,6 +154,16 @@ button {
|
|
|
151
154
|
background-color: colorButtonFillPrimaryPressed;
|
|
152
155
|
}
|
|
153
156
|
|
|
157
|
+
/* Currently Gradient Buttons don't support hover / active states */
|
|
158
|
+
.gradient {
|
|
159
|
+
color: colorTextInversePrimary;
|
|
160
|
+
background-image: linear-gradient(
|
|
161
|
+
to right,
|
|
162
|
+
colorFillPrimary,
|
|
163
|
+
colorInformation
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
154
167
|
.secondary {
|
|
155
168
|
color: colorTextClickable;
|
|
156
169
|
background-color: colorButtonFillSecondaryEnabled;
|
|
@@ -231,6 +244,7 @@ button {
|
|
|
231
244
|
color: colorTextDisabled;
|
|
232
245
|
background-color: colorFillDisabled;
|
|
233
246
|
border: initial;
|
|
247
|
+
background-image: initial;
|
|
234
248
|
}
|
|
235
249
|
|
|
236
250
|
.hidden {
|
|
@@ -21,16 +21,17 @@ const DateRangePicker = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
21
21
|
onApply,
|
|
22
22
|
onCancel,
|
|
23
23
|
classNames,
|
|
24
|
-
|
|
24
|
+
selectedDateRange = {},
|
|
25
|
+
hideTimezone = false
|
|
25
26
|
} = _ref;
|
|
26
27
|
const today = (0, _utils.formatIsoDate)();
|
|
27
|
-
const currentTimezone = _momentTimezone.default.tz.guess();
|
|
28
28
|
const {
|
|
29
|
+
timezone: initialTimezone,
|
|
29
30
|
dateRange: initialRange,
|
|
30
31
|
monthRange
|
|
31
|
-
} = (0, _utils.getInitialDates)(
|
|
32
|
+
} = (0, _utils.getInitialDates)(selectedDateRange);
|
|
32
33
|
const [dateRange, setDateRange] = React.useState(initialRange);
|
|
33
|
-
const [
|
|
34
|
+
const [timezone, setTimezone] = React.useState(initialTimezone);
|
|
34
35
|
const [rangeStartMonth, setRangeStartMonth] = React.useState(monthRange.rangeStartMonth);
|
|
35
36
|
const [rangeEndMonth, setRangeEndMonth] = React.useState(monthRange.rangeEndMonth);
|
|
36
37
|
const [hoverDay, setHoverDay] = React.useState('');
|
|
@@ -92,14 +93,15 @@ const DateRangePicker = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
92
93
|
handlers: handlers,
|
|
93
94
|
hoverDay: hoverDay,
|
|
94
95
|
onCancel: onCancel,
|
|
95
|
-
|
|
96
|
+
timezone: timezone,
|
|
96
97
|
dateRange: dateRange,
|
|
97
|
-
|
|
98
|
+
setTimezone: setTimezone,
|
|
98
99
|
rangeStartMonth: rangeStartMonth,
|
|
99
100
|
rangeEndMonth: rangeEndMonth,
|
|
100
101
|
inHoverRange: inHoverRange,
|
|
101
102
|
setRangeStartMonth: setRangeStartMonthValidated,
|
|
102
103
|
setRangeEndMonth: setRangeEndMonthValidated,
|
|
104
|
+
hideTimezone: hideTimezone,
|
|
103
105
|
cardWrapperClass: (0, _classify.default)(_DateRangePickerModule.default.container, classNames?.wrapper)
|
|
104
106
|
});
|
|
105
107
|
});
|
|
@@ -25,9 +25,10 @@ type ClassNames = $ReadOnly<{wrapper?: string}>;
|
|
|
25
25
|
|
|
26
26
|
export type DateRangePickerProps = {
|
|
27
27
|
classNames?: ClassNames,
|
|
28
|
-
|
|
28
|
+
selectedDateRange?: DateRangeWithTimezone,
|
|
29
29
|
onApply: (datePickerSelectedRange: DateRangeWithTimezone) => void,
|
|
30
30
|
onCancel: () => void,
|
|
31
|
+
hideTimezone?: boolean,
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
export const DateRangePicker: React$AbstractComponent<
|
|
@@ -39,18 +40,21 @@ export const DateRangePicker: React$AbstractComponent<
|
|
|
39
40
|
onApply,
|
|
40
41
|
onCancel,
|
|
41
42
|
classNames,
|
|
42
|
-
|
|
43
|
+
selectedDateRange = {},
|
|
44
|
+
hideTimezone = false,
|
|
43
45
|
}: DateRangePickerProps,
|
|
44
46
|
ref,
|
|
45
47
|
): React.Node => {
|
|
46
48
|
const today = formatIsoDate();
|
|
47
|
-
const currentTimezone = moment.tz.guess();
|
|
48
49
|
|
|
49
|
-
const {
|
|
50
|
-
|
|
50
|
+
const {
|
|
51
|
+
timezone: initialTimezone,
|
|
52
|
+
dateRange: initialRange,
|
|
53
|
+
monthRange,
|
|
54
|
+
} = getInitialDates(selectedDateRange);
|
|
51
55
|
|
|
52
56
|
const [dateRange, setDateRange] = React.useState<DateRange>(initialRange);
|
|
53
|
-
const [
|
|
57
|
+
const [timezone, setTimezone] = React.useState<string>(initialTimezone);
|
|
54
58
|
const [rangeStartMonth, setRangeStartMonth] = React.useState<string>(
|
|
55
59
|
monthRange.rangeStartMonth,
|
|
56
60
|
);
|
|
@@ -156,14 +160,15 @@ export const DateRangePicker: React$AbstractComponent<
|
|
|
156
160
|
handlers={handlers}
|
|
157
161
|
hoverDay={hoverDay}
|
|
158
162
|
onCancel={onCancel}
|
|
159
|
-
|
|
163
|
+
timezone={timezone}
|
|
160
164
|
dateRange={dateRange}
|
|
161
|
-
|
|
165
|
+
setTimezone={setTimezone}
|
|
162
166
|
rangeStartMonth={rangeStartMonth}
|
|
163
167
|
rangeEndMonth={rangeEndMonth}
|
|
164
168
|
inHoverRange={inHoverRange}
|
|
165
169
|
setRangeStartMonth={setRangeStartMonthValidated}
|
|
166
170
|
setRangeEndMonth={setRangeEndMonthValidated}
|
|
171
|
+
hideTimezone={hideTimezone}
|
|
167
172
|
cardWrapperClass={classify(css.container, classNames?.wrapper)}
|
|
168
173
|
/>
|
|
169
174
|
);
|
|
@@ -81,15 +81,16 @@ const DateRangeWrapper = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
81
81
|
onCancel,
|
|
82
82
|
handlers,
|
|
83
83
|
hoverDay,
|
|
84
|
-
|
|
84
|
+
timezone,
|
|
85
85
|
dateRange,
|
|
86
86
|
rangeStartMonth,
|
|
87
|
-
|
|
87
|
+
setTimezone,
|
|
88
88
|
rangeEndMonth,
|
|
89
89
|
inHoverRange,
|
|
90
90
|
setRangeStartMonth,
|
|
91
91
|
setRangeEndMonth,
|
|
92
|
-
cardWrapperClass
|
|
92
|
+
cardWrapperClass,
|
|
93
|
+
hideTimezone
|
|
93
94
|
} = _ref2;
|
|
94
95
|
const canNavigateCloser = (0, _momentTimezone.default)(rangeStartMonth).year() !== (0, _momentTimezone.default)(rangeEndMonth).year() || Math.abs((0, _momentTimezone.default)(rangeStartMonth).month() - (0, _momentTimezone.default)(rangeEndMonth).month()) > 1;
|
|
95
96
|
const handleApplyClick = () => {
|
|
@@ -97,14 +98,14 @@ const DateRangeWrapper = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
97
98
|
startDate,
|
|
98
99
|
endDate
|
|
99
100
|
} = dateRange;
|
|
100
|
-
const startDateUTC = startDate && (0, _utils.
|
|
101
|
-
const endDateUTC = endDate && (0, _utils.
|
|
101
|
+
const startDateUTC = startDate && (0, _utils.addTimezone)(startDate, timezone);
|
|
102
|
+
const endDateUTC = endDate && (0, _utils.addTimezone)(endDate, timezone);
|
|
102
103
|
onApply({
|
|
103
104
|
startDate,
|
|
104
105
|
endDate,
|
|
105
106
|
startDateUTC,
|
|
106
107
|
endDateUTC,
|
|
107
|
-
|
|
108
|
+
timezone
|
|
108
109
|
});
|
|
109
110
|
};
|
|
110
111
|
const {
|
|
@@ -155,13 +156,13 @@ const DateRangeWrapper = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
155
156
|
value: rangeEndMonth
|
|
156
157
|
}, commonProps))), /*#__PURE__*/React.createElement(_Card.CardFooter, null, /*#__PURE__*/React.createElement(_Card.CardTitle, {
|
|
157
158
|
className: _DateRangeWrapperModule.default.timezoneDropdownContainer
|
|
158
|
-
}, /*#__PURE__*/React.createElement(_Dropdown.SimpleDropdown, {
|
|
159
|
-
options: (0, _utils.
|
|
159
|
+
}, !hideTimezone && /*#__PURE__*/React.createElement(_Dropdown.SimpleDropdown, {
|
|
160
|
+
options: (0, _utils.getTimezones)(),
|
|
160
161
|
classNames: {
|
|
161
162
|
box: _DateRangeWrapperModule.default.timezoneDropdown
|
|
162
163
|
},
|
|
163
|
-
selectedKeys: [
|
|
164
|
-
onChange: event =>
|
|
164
|
+
selectedKeys: [timezone],
|
|
165
|
+
onChange: event => setTimezone(event.key),
|
|
165
166
|
size: "small",
|
|
166
167
|
menuVirtualization: {
|
|
167
168
|
enable: true
|
|
@@ -21,12 +21,12 @@ import {ClickableIcon} from '../Icon';
|
|
|
21
21
|
import {Calendar} from './Calendar.js';
|
|
22
22
|
import type {DateRange, DateRangeWithTimezone} from './utils';
|
|
23
23
|
import {
|
|
24
|
-
|
|
24
|
+
addTimezone,
|
|
25
25
|
generateAvailableYears,
|
|
26
26
|
getAddedDate,
|
|
27
27
|
getAvailableMonths,
|
|
28
28
|
getMonthStartDate,
|
|
29
|
-
|
|
29
|
+
getTimezones,
|
|
30
30
|
MARKERS,
|
|
31
31
|
MONTHS,
|
|
32
32
|
NAVIGATION_ACTION,
|
|
@@ -55,11 +55,12 @@ type DateRangeWrapperProps = {
|
|
|
55
55
|
cardWrapperClass: ?string,
|
|
56
56
|
setRangeStartMonth: (string) => void,
|
|
57
57
|
setRangeEndMonth: (string) => void,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
setTimezone: (string) => void,
|
|
59
|
+
timezone: string,
|
|
60
60
|
onApply: (datePickerSelectedRange: DateRangeWithTimezone) => void,
|
|
61
61
|
onCancel: () => void,
|
|
62
62
|
inHoverRange: (day: string) => boolean,
|
|
63
|
+
hideTimezone: boolean,
|
|
63
64
|
handlers: {
|
|
64
65
|
onDayClick: (day: string) => void,
|
|
65
66
|
onDayHover: (day: string) => void,
|
|
@@ -149,15 +150,16 @@ export const DateRangeWrapper: React$AbstractComponent<
|
|
|
149
150
|
onCancel,
|
|
150
151
|
handlers,
|
|
151
152
|
hoverDay,
|
|
152
|
-
|
|
153
|
+
timezone,
|
|
153
154
|
dateRange,
|
|
154
155
|
rangeStartMonth,
|
|
155
|
-
|
|
156
|
+
setTimezone,
|
|
156
157
|
rangeEndMonth,
|
|
157
158
|
inHoverRange,
|
|
158
159
|
setRangeStartMonth,
|
|
159
160
|
setRangeEndMonth,
|
|
160
161
|
cardWrapperClass,
|
|
162
|
+
hideTimezone,
|
|
161
163
|
}: DateRangeWrapperProps,
|
|
162
164
|
ref,
|
|
163
165
|
): React.Node => {
|
|
@@ -169,14 +171,14 @@ export const DateRangeWrapper: React$AbstractComponent<
|
|
|
169
171
|
|
|
170
172
|
const handleApplyClick = () => {
|
|
171
173
|
const {startDate, endDate} = dateRange;
|
|
172
|
-
const startDateUTC = startDate &&
|
|
173
|
-
const endDateUTC = endDate &&
|
|
174
|
+
const startDateUTC = startDate && addTimezone(startDate, timezone);
|
|
175
|
+
const endDateUTC = endDate && addTimezone(endDate, timezone);
|
|
174
176
|
onApply({
|
|
175
177
|
startDate,
|
|
176
178
|
endDate,
|
|
177
179
|
startDateUTC,
|
|
178
180
|
endDateUTC,
|
|
179
|
-
|
|
181
|
+
timezone,
|
|
180
182
|
});
|
|
181
183
|
};
|
|
182
184
|
|
|
@@ -252,19 +254,21 @@ export const DateRangeWrapper: React$AbstractComponent<
|
|
|
252
254
|
</CardContent>
|
|
253
255
|
<CardFooter>
|
|
254
256
|
<CardTitle className={css.timezoneDropdownContainer}>
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
257
|
+
{!hideTimezone && (
|
|
258
|
+
<SimpleDropdown
|
|
259
|
+
options={getTimezones()}
|
|
260
|
+
classNames={{
|
|
261
|
+
box: css.timezoneDropdown,
|
|
262
|
+
}}
|
|
263
|
+
selectedKeys={[timezone]}
|
|
264
|
+
onChange={(event) => setTimezone(event.key)}
|
|
265
|
+
size="small"
|
|
266
|
+
menuVirtualization={{
|
|
267
|
+
enable: true,
|
|
268
|
+
}}
|
|
269
|
+
allowSearch
|
|
270
|
+
/>
|
|
271
|
+
)}
|
|
268
272
|
</CardTitle>
|
|
269
273
|
<CardActions>
|
|
270
274
|
<Button type="ghost" onClick={onCancel} size="small">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.wrangleMoment = exports.isStartOfRange = exports.isStartDateEndDateSame = exports.isEndOfRange = exports.inDateRange = exports.
|
|
6
|
+
exports.wrangleMoment = exports.isStartOfRange = exports.isStartDateEndDateSame = exports.isEndOfRange = exports.inDateRange = exports.getTimezones = exports.getSubtractedDate = exports.getMonthStartDate = exports.getInitialDates = exports.getDaysInMonth = exports.getAvailableMonths = exports.getAddedDate = exports.generateAvailableYears = exports.formatIsoDate = exports.addTimezone = exports.WEEKDAYS = exports.NAVIGATION_ACTION = exports.MONTHS = exports.MARKERS = void 0;
|
|
7
7
|
var _formatISO = _interopRequireDefault(require("date-fns/formatISO"));
|
|
8
8
|
var _parseISO = _interopRequireDefault(require("date-fns/parseISO"));
|
|
9
9
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
@@ -153,16 +153,16 @@ const getSubtractedDate = (date, subtractCount, timeUnit) => formatIsoDate((0, _
|
|
|
153
153
|
exports.getSubtractedDate = getSubtractedDate;
|
|
154
154
|
const getMonthStartDate = date => formatIsoDate((0, _momentTimezone.default)(date).startOf('M'));
|
|
155
155
|
exports.getMonthStartDate = getMonthStartDate;
|
|
156
|
-
const
|
|
157
|
-
exports.
|
|
158
|
-
const
|
|
156
|
+
const addTimezone = (date, timezone) => _momentTimezone.default.tz(date, timezone).startOf('d').utc().toISOString();
|
|
157
|
+
exports.addTimezone = addTimezone;
|
|
158
|
+
const getTimezones = () => Object.keys(_timezones.TIMEZONES).reduce((menuOptions, key) => {
|
|
159
159
|
menuOptions.push({
|
|
160
160
|
key,
|
|
161
161
|
label: _timezones.TIMEZONES[key]
|
|
162
162
|
});
|
|
163
163
|
return menuOptions;
|
|
164
164
|
}, []);
|
|
165
|
-
exports.
|
|
165
|
+
exports.getTimezones = getTimezones;
|
|
166
166
|
const generateAvailableYears = (count, firstCalendarDate, secondCalendarDate, marker) => {
|
|
167
167
|
const startYear = (0, _momentTimezone.default)().year() - count + 1;
|
|
168
168
|
const firstCalendarYear = (0, _momentTimezone.default)(firstCalendarDate).add(1, 'M').year();
|
|
@@ -201,12 +201,14 @@ const getAvailableMonths = (Months, first, second, marker) => {
|
|
|
201
201
|
});
|
|
202
202
|
};
|
|
203
203
|
exports.getAvailableMonths = getAvailableMonths;
|
|
204
|
-
const getInitialDates =
|
|
204
|
+
const getInitialDates = selectedDateRange => {
|
|
205
205
|
const today = formatIsoDate();
|
|
206
|
+
const currentTimezone = _momentTimezone.default.tz.guess();
|
|
206
207
|
const {
|
|
207
208
|
startDate,
|
|
208
|
-
endDate
|
|
209
|
-
|
|
209
|
+
endDate,
|
|
210
|
+
timezone
|
|
211
|
+
} = selectedDateRange;
|
|
210
212
|
const isStartDateValid = (0, _momentTimezone.default)(startDate).isSameOrBefore(today);
|
|
211
213
|
const isEndDateValid = (0, _momentTimezone.default)(endDate).isSameOrBefore(today);
|
|
212
214
|
const dateRange = startDate && endDate && isStartDateValid && isEndDateValid && (0, _momentTimezone.default)(endDate).isSameOrAfter(startDate) ? {
|
|
@@ -227,7 +229,8 @@ const getInitialDates = initialDateRange => {
|
|
|
227
229
|
};
|
|
228
230
|
return {
|
|
229
231
|
dateRange,
|
|
230
|
-
monthRange
|
|
232
|
+
monthRange,
|
|
233
|
+
timezone: timezone ?? currentTimezone
|
|
231
234
|
};
|
|
232
235
|
};
|
|
233
236
|
exports.getInitialDates = getInitialDates;
|
|
@@ -19,13 +19,14 @@ export type DateRangeWithTimezone = {|
|
|
|
19
19
|
...DateRange,
|
|
20
20
|
startDateUTC?: string,
|
|
21
21
|
endDateUTC?: string,
|
|
22
|
-
|
|
22
|
+
timezone?: string,
|
|
23
23
|
|};
|
|
24
24
|
|
|
25
25
|
type MonthRange = {rangeStartMonth: string, rangeEndMonth: string};
|
|
26
|
-
type
|
|
26
|
+
type SelectedDateRangeTimezone = {
|
|
27
27
|
dateRange: DateRange,
|
|
28
28
|
monthRange: MonthRange,
|
|
29
|
+
timezone: string,
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
export const NAVIGATION_ACTION = Object.freeze({
|
|
@@ -141,10 +142,10 @@ export const getSubtractedDate = (
|
|
|
141
142
|
export const getMonthStartDate = (date: string): string =>
|
|
142
143
|
formatIsoDate(moment(date).startOf('M'));
|
|
143
144
|
|
|
144
|
-
export const
|
|
145
|
-
moment.tz(date,
|
|
145
|
+
export const addTimezone = (date: string, timezone: string): string =>
|
|
146
|
+
moment.tz(date, timezone).startOf('d').utc().toISOString();
|
|
146
147
|
|
|
147
|
-
export const
|
|
148
|
+
export const getTimezones = (): Array<MenuOption> =>
|
|
148
149
|
Object.keys(TIMEZONES).reduce((menuOptions, key) => {
|
|
149
150
|
menuOptions.push({
|
|
150
151
|
key,
|
|
@@ -206,10 +207,11 @@ export const getAvailableMonths = (
|
|
|
206
207
|
};
|
|
207
208
|
|
|
208
209
|
export const getInitialDates = (
|
|
209
|
-
|
|
210
|
-
):
|
|
210
|
+
selectedDateRange: DateRangeWithTimezone,
|
|
211
|
+
): SelectedDateRangeTimezone => {
|
|
211
212
|
const today = formatIsoDate();
|
|
212
|
-
const
|
|
213
|
+
const currentTimezone = moment.tz.guess();
|
|
214
|
+
const {startDate, endDate, timezone} = selectedDateRange;
|
|
213
215
|
|
|
214
216
|
const isStartDateValid = moment(startDate).isSameOrBefore(today);
|
|
215
217
|
const isEndDateValid = moment(endDate).isSameOrBefore(today);
|
|
@@ -235,5 +237,9 @@ export const getInitialDates = (
|
|
|
235
237
|
}
|
|
236
238
|
|
|
237
239
|
const monthRange = {rangeStartMonth: startMonth, rangeEndMonth: endMonth};
|
|
238
|
-
return {
|
|
240
|
+
return {
|
|
241
|
+
dateRange,
|
|
242
|
+
monthRange,
|
|
243
|
+
timezone: timezone ?? currentTimezone,
|
|
244
|
+
};
|
|
239
245
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FormTitleWrapper = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
9
|
+
var _Icon = require("../Icon");
|
|
10
|
+
var _FormTitleWrapperModule = _interopRequireDefault(require("./FormTitleWrapper.module.css"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
|
|
15
|
+
const FormTitleWrapper = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
16
|
+
let {
|
|
17
|
+
classNames,
|
|
18
|
+
iconType,
|
|
19
|
+
iconName,
|
|
20
|
+
iconSize = 'small',
|
|
21
|
+
iconColor,
|
|
22
|
+
title,
|
|
23
|
+
rightSlot
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
ref: ref,
|
|
27
|
+
"data-testid": "FormTitleWrapper",
|
|
28
|
+
className: _FormTitleWrapperModule.default.container
|
|
29
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: (0, _classify.default)(_FormTitleWrapperModule.default.leftSection, classNames?.wrapper)
|
|
31
|
+
}, !!iconName && /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
32
|
+
type: iconType,
|
|
33
|
+
name: iconName,
|
|
34
|
+
size: iconSize,
|
|
35
|
+
color: iconColor
|
|
36
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: (0, _classify.default)(_FormTitleWrapperModule.default.componentHousing, classNames?.title)
|
|
38
|
+
}, title)), /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: (0, _classify.default)(_FormTitleWrapperModule.default.rightSection, classNames?.rightSlot)
|
|
40
|
+
}, rightSlot));
|
|
41
|
+
});
|
|
42
|
+
exports.FormTitleWrapper = FormTitleWrapper;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import type {ColorTypes} from '../../types/typography';
|
|
6
|
+
import classify from '../../utils/classify';
|
|
7
|
+
import type {IconSize, IconType} from '../Icon';
|
|
8
|
+
import {Icon} from '../Icon';
|
|
9
|
+
|
|
10
|
+
import css from './FormTitleWrapper.module.css';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
type ClassNames = $ReadOnly<{
|
|
14
|
+
wrapper?: string,
|
|
15
|
+
title?: string,
|
|
16
|
+
rightSlot?: string,
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
export type FormTitleWrapperProps = {
|
|
20
|
+
classNames?: ClassNames,
|
|
21
|
+
iconType?: IconType,
|
|
22
|
+
iconName?: string,
|
|
23
|
+
iconSize?: IconSize,
|
|
24
|
+
iconColor?: ColorTypes,
|
|
25
|
+
title: React.Node, // Should always atleast have a title
|
|
26
|
+
rightSlot?: React.Node,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const FormTitleWrapper: React$AbstractComponent<
|
|
30
|
+
FormTitleWrapperProps,
|
|
31
|
+
HTMLDivElement,
|
|
32
|
+
> = React.forwardRef<FormTitleWrapperProps, HTMLDivElement>(
|
|
33
|
+
(
|
|
34
|
+
{
|
|
35
|
+
classNames,
|
|
36
|
+
iconType,
|
|
37
|
+
iconName,
|
|
38
|
+
iconSize = 'small',
|
|
39
|
+
iconColor,
|
|
40
|
+
title,
|
|
41
|
+
rightSlot,
|
|
42
|
+
}: FormTitleWrapperProps,
|
|
43
|
+
ref,
|
|
44
|
+
) => (
|
|
45
|
+
<div ref={ref} data-testid="FormTitleWrapper" className={css.container}>
|
|
46
|
+
<div className={classify(css.leftSection, classNames?.wrapper)}>
|
|
47
|
+
{!!iconName && (
|
|
48
|
+
<Icon
|
|
49
|
+
type={iconType}
|
|
50
|
+
name={iconName}
|
|
51
|
+
size={iconSize}
|
|
52
|
+
color={iconColor}
|
|
53
|
+
/>
|
|
54
|
+
)}
|
|
55
|
+
{/* This is to safeguard semantics as it internally composes from a subTitleSmall className
|
|
56
|
+
we don't fix the component here as <SubtitleSmall> resolves to <h4> and since title is a React.Node,
|
|
57
|
+
this would break semantics in case custom components are passed inside
|
|
58
|
+
*/}
|
|
59
|
+
<div className={classify(css.componentHousing, classNames?.title)}>
|
|
60
|
+
{title}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div className={classify(css.rightSection, classNames?.rightSlot)}>
|
|
64
|
+
{rightSlot}
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
),
|
|
68
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@value (colorFillPrimary) from '../../styles/variables/_color.css';
|
|
2
|
+
@value (sizeFluid) from '../../styles/variables/_size.css';
|
|
3
|
+
@value (spaceSmall, spaceXSmall) from '../../styles/variables/_space.css';
|
|
4
|
+
|
|
5
|
+
.container {
|
|
6
|
+
display: flex;
|
|
7
|
+
composes: borderTopPrimary from '../../styles/border.module.css';
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: center;
|
|
10
|
+
width: sizeFluid;
|
|
11
|
+
padding-top: spaceSmall;
|
|
12
|
+
padding-bottom: spaceSmall;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.leftSection {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: spaceXSmall;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.componentHousing {
|
|
22
|
+
display: flex;
|
|
23
|
+
composes: subTitleSmall from '../../styles/typography.module.css';
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _FormTitleWrapper = require("./FormTitleWrapper");
|
|
7
|
+
Object.keys(_FormTitleWrapper).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _FormTitleWrapper[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _FormTitleWrapper[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/lib/components/index.js
CHANGED
|
@@ -256,6 +256,17 @@ Object.keys(_FocusManagerWithArrowKeyNavigation).forEach(function (key) {
|
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
258
|
});
|
|
259
|
+
var _FormTitleWrapper = require("./FormTitleWrapper");
|
|
260
|
+
Object.keys(_FormTitleWrapper).forEach(function (key) {
|
|
261
|
+
if (key === "default" || key === "__esModule") return;
|
|
262
|
+
if (key in exports && exports[key] === _FormTitleWrapper[key]) return;
|
|
263
|
+
Object.defineProperty(exports, key, {
|
|
264
|
+
enumerable: true,
|
|
265
|
+
get: function () {
|
|
266
|
+
return _FormTitleWrapper[key];
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
});
|
|
259
270
|
var _Grid = require("./Grid");
|
|
260
271
|
Object.keys(_Grid).forEach(function (key) {
|
|
261
272
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -23,6 +23,7 @@ export * from './ErrorMessage';
|
|
|
23
23
|
export * from './FileUpload';
|
|
24
24
|
export * from './FocusManager';
|
|
25
25
|
export * from './FocusManagerWithArrowKeyNavigation';
|
|
26
|
+
export * from './FormTitleWrapper';
|
|
26
27
|
export * from './Grid';
|
|
27
28
|
export * from './Icon';
|
|
28
29
|
export * from './InContextAlert';
|
package/lib/styles/index.css
CHANGED
package/lib/styles/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.colorTextTertiary = exports.colorTextSuccess = exports.colorTextSecondary = exports.colorTextPrimary = exports.colorTextNeutral = exports.colorTextInverseSecondary = exports.colorTextInversePrimary = exports.colorTextInformation = exports.colorTextFavorite = exports.colorTextDisabled = exports.colorTextDanger = exports.colorTextClickable = exports.colorSuccessLightest = exports.colorSuccessLight = exports.colorSuccessDarkest = exports.colorSuccessDark = exports.colorSuccess = exports.colorSubMenuStar = exports.colorSubMenuBackgroundDefault = exports.colorSideMenuIconDefault = exports.colorSideMenuIconActive = exports.colorSideMenuBackgroundSelected = exports.colorSideMenuBackgroundHovered = exports.colorSideMenuBackgroundDefault = exports.colorSideMenuAccountBarFill = exports.colorNeutralLightest = exports.colorNeutralLight = exports.colorNeutralDarkest = exports.colorNeutralDark = exports.colorNeutral = exports.colorInformationLightest = exports.colorInformationLight = exports.colorInformationDarkest = exports.colorInformationDark = exports.colorInformation = exports.colorGroupMenuTextDefault = exports.colorGroupMenuBackgroundSelected = exports.colorGroupMenuBackgroundHovered = exports.colorGroupMenuBackgroundDefault = exports.colorGrayLightest = exports.colorFocusPrimary = exports.colorFocusDanger = exports.colorFillSecondary = exports.colorFillPrimary = exports.colorFillNone = exports.colorFillInversePrimary = exports.colorFillDisabled = exports.colorDataViz8 = exports.colorDataViz7 = exports.colorDataViz6 = exports.colorDataViz5 = exports.colorDataViz4 = exports.colorDataViz3 = exports.colorDataViz2 = exports.colorDataViz1 = exports.colorDangerLightest = exports.colorDangerLight = exports.colorDangerDarkest = exports.colorDangerDark = exports.colorDanger = exports.colorButtonFillTertiaryPressed = exports.colorButtonFillTertiaryHovered = exports.colorButtonFillTertiaryEnabled = exports.colorButtonFillTableActionPressed = exports.colorButtonFillTableActionHovered = exports.colorButtonFillTableActionEnabled = exports.colorButtonFillTableActionBorder = 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.colorBorderTertiary = exports.colorBorderSecondary = exports.colorBorderPrimary = exports.colorBorderDanger = exports.colorBackgroundTertiary = exports.colorBackgroundSecondary = exports.colorBackgroundPrimary = exports.colorBackgroundBrand = exports.colorBackdropFill = exports.borderWidthTertiary = exports.borderWidthSecondary = exports.borderWidthPrimary = exports.borderWidthNone = exports.borderRadiusXSmall = exports.borderRadiusXLarge = exports.borderRadiusSmall = exports.borderRadiusRadioButton = exports.borderRadiusNone = exports.borderRadiusMedium = exports.borderRadiusLarge = exports.borderRadiusCircle = void 0;
|
|
7
7
|
exports.size2 = exports.size180 = exports.size18 = exports.size160 = exports.size140 = exports.size1280 = exports.size125 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = exports.shadowBoxShadow4Y = exports.shadowBoxShadow4X = exports.shadowBoxShadow4Type = exports.shadowBoxShadow4Spread = exports.shadowBoxShadow4Color = exports.shadowBoxShadow4Blur = exports.shadowBoxShadow3Y = exports.shadowBoxShadow3X = exports.shadowBoxShadow3Type = exports.shadowBoxShadow3Spread = exports.shadowBoxShadow3Color = exports.shadowBoxShadow3Blur = exports.shadowBoxShadow2Y = exports.shadowBoxShadow2X = exports.shadowBoxShadow2Type = exports.shadowBoxShadow2Spread = exports.shadowBoxShadow2Color = exports.shadowBoxShadow2Blur = exports.shadowBoxShadow1Y = exports.shadowBoxShadow1X = exports.shadowBoxShadow1Type = exports.shadowBoxShadow1Spread = exports.shadowBoxShadow1Color = exports.shadowBoxShadow1Blur = exports.opacity95 = exports.opacity90 = exports.opacity85 = exports.opacity80 = exports.opacity70 = exports.opacity60 = exports.opacity50 = exports.opacity5 = exports.opacity40 = exports.opacity30 = exports.opacity20 = exports.opacity15 = exports.opacity100 = exports.opacity10 = exports.opacity0 = exports.motionEaseInEaseOut = exports.motionDurationSlowest = exports.motionDurationSlower = exports.motionDurationSlow = exports.motionDurationNormal = exports.motionDurationFast = exports.fontWeightMedium = exports.fontWeightBook = exports.fontTextDecorationNone = exports.fontTextCaseNone = exports.fontSize46 = exports.fontSize36 = exports.fontSize26 = exports.fontSize24 = exports.fontSize18 = exports.fontSize16 = exports.fontSize14 = exports.fontSize13 = exports.fontSize12 = exports.fontParagraphSpacing0 = exports.fontLineHeight170 = exports.fontLineHeight150 = exports.fontLineHeight140 = exports.fontLineHeight130 = exports.fontLineHeight125 = exports.fontLineHeight120 = exports.fontLineHeight100 = exports.fontLetterSpacingMinus4 = exports.fontLetterSpacingMinus3 = exports.fontLetterSpacingMinus2 = exports.fontLetterSpacingMinus1 = exports.fontLetterSpacing4 = exports.fontLetterSpacing2 = exports.fontLetterSpacing1 = exports.fontLetterSpacing0 = exports.fontFamilyCentra = exports.elevationTooltip = exports.elevationToast = exports.elevationNone = exports.elevationModal = exports.elevationMenu = exports.elevationCard = exports.elevationBackdrop = exports.colorWarningLightest = exports.colorWarningLight = exports.colorWarningDarkest = exports.colorWarningDark = exports.colorWarning = exports.colorTooltipFill = exports.colorTextWarning = void 0;
|
|
8
|
-
exports.spaceXXSmall = exports.spaceXXLarge = exports.spaceXSmall = exports.spaceXLarge = exports.spaceSmall = exports.spaceNone = exports.spaceNegHalfFluid = exports.spaceNegFluid = exports.spaceMedium = exports.spaceLarge = exports.spaceHalfFluid = exports.spaceFluid = exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size880 = exports.size8 = exports.size720 = exports.size70 = exports.size660 = exports.size66 = exports.size640 = exports.size60 = exports.size580 = exports.size58 = exports.size540 = exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size44 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size32 = exports.size300 = exports.size30 = exports.size28 = exports.size276 = exports.size260 = exports.size26 = exports.size252 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size200 = exports.size20 = void 0;
|
|
8
|
+
exports.spaceXXSmall = exports.spaceXXLarge = exports.spaceXSmall = exports.spaceXLarge = exports.spaceSmall = exports.spaceNone = exports.spaceNegHalfFluid = exports.spaceNegFluid = exports.spaceMedium = exports.spaceLarge = exports.spaceHalfFluid = exports.spaceFluid = exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size880 = exports.size800 = exports.size8 = exports.size720 = exports.size70 = exports.size660 = exports.size66 = exports.size640 = exports.size60 = exports.size580 = exports.size58 = exports.size540 = exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size44 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size32 = exports.size300 = exports.size30 = exports.size28 = exports.size276 = exports.size260 = exports.size26 = exports.size252 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size200 = exports.size20 = void 0;
|
|
9
9
|
|
|
10
10
|
const borderWidthNone = '0px';
|
|
11
11
|
exports.borderWidthNone = borderWidthNone;
|
|
@@ -485,6 +485,8 @@ const size660 = '660px';
|
|
|
485
485
|
exports.size660 = size660;
|
|
486
486
|
const size720 = '720px';
|
|
487
487
|
exports.size720 = size720;
|
|
488
|
+
const size800 = '800px';
|
|
489
|
+
exports.size800 = size800;
|
|
488
490
|
const size880 = '880px';
|
|
489
491
|
exports.size880 = size880;
|
|
490
492
|
const size960 = '960px';
|
package/lib/styles/index.js.flow
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size880 = exports.size8 = exports.size720 = exports.size70 = exports.size660 = exports.size66 = exports.size640 = exports.size60 = exports.size580 = exports.size58 = exports.size540 = exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size44 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size32 = exports.size300 = exports.size30 = exports.size28 = exports.size276 = exports.size260 = exports.size26 = exports.size252 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size200 = exports.size20 = exports.size2 = exports.size180 = exports.size18 = exports.size160 = exports.size140 = exports.size1280 = exports.size125 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = void 0;
|
|
6
|
+
exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size880 = exports.size800 = exports.size8 = exports.size720 = exports.size70 = exports.size660 = exports.size66 = exports.size640 = exports.size60 = exports.size580 = exports.size58 = exports.size540 = exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size44 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size32 = exports.size300 = exports.size30 = exports.size28 = exports.size276 = exports.size260 = exports.size26 = exports.size252 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size200 = exports.size20 = exports.size2 = exports.size180 = exports.size18 = exports.size160 = exports.size140 = exports.size1280 = exports.size125 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = void 0;
|
|
7
7
|
|
|
8
8
|
const size2 = '2px';
|
|
9
9
|
exports.size2 = size2;
|
|
@@ -105,6 +105,8 @@ const size660 = '660px';
|
|
|
105
105
|
exports.size660 = size660;
|
|
106
106
|
const size720 = '720px';
|
|
107
107
|
exports.size720 = size720;
|
|
108
|
+
const size800 = '800px';
|
|
109
|
+
exports.size800 = size800;
|
|
108
110
|
const size880 = '880px';
|
|
109
111
|
exports.size880 = size880;
|
|
110
112
|
const size960 = '960px';
|