@transferwise/components 46.0.8 → 46.1.1
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/README.md +3 -5
- package/build/index.esm.js +8 -9
- package/build/index.esm.js.map +1 -1
- package/build/index.js +8 -9
- package/build/index.js.map +1 -1
- package/build/main.css +5481 -1
- package/build/styles/accordion/Accordion.css +60 -1
- package/build/styles/actionButton/ActionButton.css +53 -1
- package/build/styles/avatar/Avatar.css +205 -1
- package/build/styles/badge/Badge.css +68 -1
- package/build/styles/button/Button.css +20 -1
- package/build/styles/card/Card.css +100 -1
- package/build/styles/checkboxButton/CheckboxButton.css +24 -1
- package/build/styles/chips/Chip.css +190 -1
- package/build/styles/circularButton/CircularButton.css +211 -1
- package/build/styles/common/Option/Option.css +100 -1
- package/build/styles/common/RadioButton/RadioButton.css +4 -1
- package/build/styles/common/bottomSheet/BottomSheet.css +53 -1
- package/build/styles/common/card/Card.css +53 -1
- package/build/styles/common/closeButton/CloseButton.css +79 -1
- package/build/styles/common/panel/Panel.css +73 -1
- package/build/styles/criticalBanner/CriticalCommsBanner.css +77 -1
- package/build/styles/dateInput/DateInput.css +3 -1
- package/build/styles/dateLookup/DateLookup.css +98 -1
- package/build/styles/dateLookup/dateTrigger/DateTrigger.css +68 -1
- package/build/styles/decision/Decision.css +93 -1
- package/build/styles/definitionList/DefinitionList.css +53 -1
- package/build/styles/dimmer/Dimmer.css +70 -1
- package/build/styles/drawer/Drawer.css +100 -1
- package/build/styles/dropFade/DropFade.css +19 -1
- package/build/styles/dynamicFieldDefinitionList/FormattedValue/FormattedValue.css +5 -1
- package/build/styles/emphasis/Emphasis.css +31 -1
- package/build/styles/flowNavigation/FlowNavigation.css +50 -1
- package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +21 -1
- package/build/styles/flowNavigation/backButton/BackButton.css +32 -1
- package/build/styles/header/Header.css +28 -1
- package/build/styles/image/Image.css +13 -1
- package/build/styles/info/Info.css +32 -1
- package/build/styles/inputs/Input.css +106 -1
- package/build/styles/inputs/InputGroup.css +62 -1
- package/build/styles/inputs/SelectInput.css +374 -1
- package/build/styles/inputs/TextArea.css +110 -1
- package/build/styles/instructionsList/InstructionsList.css +22 -1
- package/build/styles/link/Link.css +15 -1
- package/build/styles/listItem/ListItem.css +6 -1
- package/build/styles/loader/Loader.css +313 -1
- package/build/styles/logo/Logo.css +26 -1
- package/build/styles/main.css +5481 -1
- package/build/styles/modal/Modal.css +155 -1
- package/build/styles/moneyInput/MoneyInput.css +66 -1
- package/build/styles/navigationOption/NavigationOption.css +69 -1
- package/build/styles/navigationOptionsList/NavigationOptionsList.css +13 -1
- package/build/styles/nudge/Nudge.css +182 -1
- package/build/styles/overlayHeader/OverlayHeader.css +15 -1
- package/build/styles/phoneNumberInput/PhoneNumberInput.css +23 -1
- package/build/styles/popover/Popover.css +43 -1
- package/build/styles/progress/Progress.css +43 -1
- package/build/styles/progressBar/ProgressBar.css +14 -1
- package/build/styles/promoCard/PromoCard.css +186 -1
- package/build/styles/section/Section.css +10 -1
- package/build/styles/select/Select.css +309 -1
- package/build/styles/slidingPanel/SlidingPanel.css +105 -1
- package/build/styles/snackbar/Snackbar.css +93 -1
- package/build/styles/statusIcon/StatusIcon.css +78 -1
- package/build/styles/stepper/Stepper.css +108 -1
- package/build/styles/summary/Summary.css +81 -1
- package/build/styles/switch/Switch.css +68 -1
- package/build/styles/tabs/Tabs.css +121 -1
- package/build/styles/tile/Tile.css +55 -1
- package/build/styles/tooltip/Tooltip.css +50 -1
- package/build/styles/typeahead/Typeahead.css +183 -1
- package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +9 -1
- package/build/styles/upload/Upload.css +15 -1
- package/build/styles/uploadInput/UploadInput.css +71 -1
- package/build/styles/uploadInput/uploadButton/UploadButton.css +49 -1
- package/build/styles/uploadInput/uploadItem/UploadItem.css +74 -1
- package/build/types/dateLookup/DateLookup.d.ts +1 -1
- package/build/types/select/option/Option.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
- package/build/types/typeahead/util/highlight.d.ts +1 -1
- package/build/types/typeahead/util/highlight.d.ts.map +1 -1
- package/package.json +4 -10
- package/src/accordion/Accordion.css +60 -1
- package/src/actionButton/ActionButton.css +53 -1
- package/src/avatar/Avatar.css +205 -1
- package/src/badge/Badge.css +68 -1
- package/src/button/Button.css +20 -1
- package/src/card/Card.css +100 -1
- package/src/checkboxButton/CheckboxButton.css +24 -1
- package/src/chips/Chip.css +190 -1
- package/src/circularButton/CircularButton.css +211 -1
- package/src/common/Option/Option.css +100 -1
- package/src/common/RadioButton/RadioButton.css +4 -1
- package/src/common/bottomSheet/BottomSheet.css +53 -1
- package/src/common/card/Card.css +53 -1
- package/src/common/closeButton/CloseButton.css +79 -1
- package/src/common/panel/Panel.css +73 -1
- package/src/criticalBanner/CriticalCommsBanner.css +77 -1
- package/src/dateInput/DateInput.css +3 -1
- package/src/dateLookup/DateLookup.css +98 -1
- package/src/dateLookup/DateLookup.js +2 -1
- package/src/dateLookup/DateLookup.proptypes.spec.js +28 -0
- package/src/dateLookup/DateLookup.story.js +12 -8
- package/src/dateLookup/dateTrigger/DateTrigger.css +68 -1
- package/src/decision/Decision.css +93 -1
- package/src/definitionList/DefinitionList.css +53 -1
- package/src/dimmer/Dimmer.css +70 -1
- package/src/drawer/Drawer.css +100 -1
- package/src/dropFade/DropFade.css +19 -1
- package/src/dynamicFieldDefinitionList/FormattedValue/FormattedValue.css +5 -1
- package/src/emphasis/Emphasis.css +31 -1
- package/src/flowNavigation/FlowNavigation.css +50 -1
- package/src/flowNavigation/animatedLabel/AnimatedLabel.css +21 -1
- package/src/flowNavigation/backButton/BackButton.css +32 -1
- package/src/header/Header.css +28 -1
- package/src/image/Image.css +13 -1
- package/src/info/Info.css +32 -1
- package/src/inputs/Input.css +106 -1
- package/src/inputs/InputGroup.css +62 -1
- package/src/inputs/SelectInput.css +374 -1
- package/src/inputs/TextArea.css +110 -1
- package/src/instructionsList/InstructionsList.css +22 -1
- package/src/link/Link.css +15 -1
- package/src/listItem/ListItem.css +6 -1
- package/src/loader/Loader.css +313 -1
- package/src/logo/Logo.css +26 -1
- package/src/main.css +5481 -1
- package/src/modal/Modal.css +155 -1
- package/src/moneyInput/MoneyInput.css +66 -1
- package/src/navigationOption/NavigationOption.css +69 -1
- package/src/navigationOptionsList/NavigationOptionsList.css +13 -1
- package/src/nudge/Nudge.css +182 -1
- package/src/overlayHeader/OverlayHeader.css +15 -1
- package/src/phoneNumberInput/PhoneNumberInput.css +23 -1
- package/src/popover/Popover.css +43 -1
- package/src/progress/Progress.css +43 -1
- package/src/progressBar/ProgressBar.css +14 -1
- package/src/promoCard/PromoCard.css +186 -1
- package/src/section/Section.css +10 -1
- package/src/select/Select.css +309 -1
- package/src/select/Select.less +1 -8
- package/src/select/option/Option.spec.js +3 -21
- package/src/select/option/Option.tsx +2 -7
- package/src/slidingPanel/SlidingPanel.css +105 -1
- package/src/snackbar/Snackbar.css +93 -1
- package/src/statusIcon/StatusIcon.css +78 -1
- package/src/stepper/Stepper.css +108 -1
- package/src/summary/Summary.css +81 -1
- package/src/switch/Switch.css +68 -1
- package/src/tabs/Tabs.css +121 -1
- package/src/tile/Tile.css +55 -1
- package/src/tooltip/Tooltip.css +50 -1
- package/src/typeahead/Typeahead.css +183 -1
- package/src/typeahead/typeaheadOption/TypeaheadOption.css +9 -1
- package/src/typeahead/typeaheadOption/TypeaheadOption.js +5 -3
- package/src/typeahead/util/highlight.js +1 -1
- package/src/upload/Upload.css +15 -1
- package/src/uploadInput/UploadInput.css +71 -1
- package/src/uploadInput/uploadButton/UploadButton.css +49 -1
- package/src/uploadInput/uploadItem/UploadItem.css +74 -1
|
@@ -1 +1,98 @@
|
|
|
1
|
-
.tw-date-lookup-menu
|
|
1
|
+
.tw-date-lookup-menu {
|
|
2
|
+
width: 400px;
|
|
3
|
+
}
|
|
4
|
+
.tw-date-lookup-calendar {
|
|
5
|
+
min-width: 300px;
|
|
6
|
+
text-align: center;
|
|
7
|
+
table-layout: fixed;
|
|
8
|
+
background-color: inherit;
|
|
9
|
+
}
|
|
10
|
+
.tw-date-lookup-calendar > tbody > tr > td.weekend button {
|
|
11
|
+
color: #5d7079;
|
|
12
|
+
color: var(--color-content-secondary);
|
|
13
|
+
}
|
|
14
|
+
.tw-date-lookup-calendar > tbody > tr > td {
|
|
15
|
+
padding: 4px;
|
|
16
|
+
padding: var(--size-4);
|
|
17
|
+
}
|
|
18
|
+
@media (max-width: 320px) {
|
|
19
|
+
.tw-date-lookup-calendar > tbody > tr > td {
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
.tw-date-lookup-calendar > tbody > tr > td:has(.tw-date-lookup-day-option) {
|
|
24
|
+
padding: 1px;
|
|
25
|
+
}
|
|
26
|
+
.tw-date-lookup-calendar > tbody > tr > td button {
|
|
27
|
+
width: 100%;
|
|
28
|
+
padding: 4px 0;
|
|
29
|
+
padding: var(--size-4) 0;
|
|
30
|
+
color: #0097c7;
|
|
31
|
+
color: var(--color-content-accent);
|
|
32
|
+
border: transparent;
|
|
33
|
+
border-radius: 10px;
|
|
34
|
+
border-radius: var(--radius-small);
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
font-weight: var(--font-weight-semi-bold);
|
|
38
|
+
color: #37517e;
|
|
39
|
+
color: var(--color-content-primary);
|
|
40
|
+
}
|
|
41
|
+
@media (max-width: 320px) {
|
|
42
|
+
.tw-date-lookup-calendar > tbody > tr > td button {
|
|
43
|
+
padding: 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.tw-date-lookup-calendar > tbody > tr > td button.tw-date-lookup-day-option {
|
|
47
|
+
height: 40px;
|
|
48
|
+
height: var(--size-40);
|
|
49
|
+
border-radius: 9999px;
|
|
50
|
+
border-radius: var(--radius-full);
|
|
51
|
+
line-height: 40px;
|
|
52
|
+
line-height: var(--size-40);
|
|
53
|
+
width: 40px;
|
|
54
|
+
width: var(--size-40);
|
|
55
|
+
padding: 0;
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
}
|
|
60
|
+
.tw-date-lookup-calendar > tbody > tr > td button.tw-date-lookup-day-option.today {
|
|
61
|
+
-webkit-text-decoration: underline;
|
|
62
|
+
text-decoration: underline;
|
|
63
|
+
text-decoration-thickness: 2px;
|
|
64
|
+
text-underline-offset: 4px;
|
|
65
|
+
}
|
|
66
|
+
.tw-date-lookup-calendar > tbody > tr > td:not(.disabled):not(:disabled) button.show-focus,
|
|
67
|
+
.tw-date-lookup-calendar > tbody > tr > td:hover button:not(.disabled):not(:disabled) {
|
|
68
|
+
background-color: var(--color-background-screen-hover);
|
|
69
|
+
}
|
|
70
|
+
.tw-date-lookup-calendar > tbody > tr > td:not(.disabled):not(:disabled) button.active {
|
|
71
|
+
background-color: var(--color-interactive-primary);
|
|
72
|
+
color: var(--color-interactive-contrast);
|
|
73
|
+
}
|
|
74
|
+
.tw-date-lookup-calendar abbr {
|
|
75
|
+
-webkit-text-decoration: none;
|
|
76
|
+
text-decoration: none;
|
|
77
|
+
}
|
|
78
|
+
.tw-date-lookup-header-current-container {
|
|
79
|
+
display: inline;
|
|
80
|
+
}
|
|
81
|
+
.np-theme-personal.tw-date-lookup-menu .table-bordered,
|
|
82
|
+
.np-theme-personal .tw-date-lookup-menu .table-bordered {
|
|
83
|
+
border: none;
|
|
84
|
+
}
|
|
85
|
+
.np-theme-personal.tw-date-lookup-menu thead,
|
|
86
|
+
.np-theme-personal .tw-date-lookup-menu thead {
|
|
87
|
+
background-color: transparent;
|
|
88
|
+
background-color: initial;
|
|
89
|
+
}
|
|
90
|
+
.np-theme-personal.tw-date-lookup-menu td,
|
|
91
|
+
.np-theme-personal .tw-date-lookup-menu td {
|
|
92
|
+
border: none;
|
|
93
|
+
}
|
|
94
|
+
.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-header-current,
|
|
95
|
+
.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-header-current {
|
|
96
|
+
color: #37517e;
|
|
97
|
+
color: var(--color-content-primary);
|
|
98
|
+
}
|
|
@@ -268,7 +268,7 @@ class DateLookup extends PureComponent {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
DateLookup.propTypes = {
|
|
271
|
-
value: PropTypes.instanceOf(Date)
|
|
271
|
+
value: PropTypes.instanceOf(Date),
|
|
272
272
|
min: PropTypes.instanceOf(Date),
|
|
273
273
|
max: PropTypes.instanceOf(Date),
|
|
274
274
|
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
@@ -283,6 +283,7 @@ DateLookup.propTypes = {
|
|
|
283
283
|
};
|
|
284
284
|
|
|
285
285
|
DateLookup.defaultProps = {
|
|
286
|
+
value: null,
|
|
286
287
|
min: null,
|
|
287
288
|
max: null,
|
|
288
289
|
size: Size.MEDIUM,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { render, mockMatchMedia } from '../test-utils';
|
|
2
|
+
|
|
3
|
+
import DateLookup from '.';
|
|
4
|
+
|
|
5
|
+
mockMatchMedia();
|
|
6
|
+
|
|
7
|
+
// This test suite could become redundant
|
|
8
|
+
// once we refactor the DateLookup component to TypeScript
|
|
9
|
+
|
|
10
|
+
describe('DateLookup propTypes', () => {
|
|
11
|
+
describe('when the value prop is set to null', () => {
|
|
12
|
+
it('renders without prop type warnings in the console', () => {
|
|
13
|
+
const consoleSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
|
|
14
|
+
|
|
15
|
+
render(<DateLookup value={null} onChange={jest.fn()} />);
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line no-console
|
|
18
|
+
expect(console.error).not.toHaveBeenCalledWith(
|
|
19
|
+
expect.stringContaining('Warning: Failed %s type'),
|
|
20
|
+
'prop',
|
|
21
|
+
'The prop `value` is marked as required in `DateLookup`, but its value is `null`.',
|
|
22
|
+
expect.anything(),
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
consoleSpy.mockRestore();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -11,13 +11,14 @@ export default {
|
|
|
11
11
|
title: 'Forms/DateLookup',
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
theFuture
|
|
16
|
-
|
|
17
|
-
thePast
|
|
14
|
+
const epoch = new Date('2011-01-01');
|
|
15
|
+
let theFuture = new Date(epoch);
|
|
16
|
+
theFuture.setUTCDate(epoch.getUTCDate() + 10);
|
|
17
|
+
let thePast = new Date(epoch);
|
|
18
|
+
thePast.setUTCDate(epoch.getUTCDate() - 10);
|
|
18
19
|
|
|
19
20
|
export const Basic = () => {
|
|
20
|
-
const [value, setValue] = useState(
|
|
21
|
+
const [value, setValue] = useState(epoch);
|
|
21
22
|
const disabled = boolean('disabled', false);
|
|
22
23
|
const label = text('label', 'label');
|
|
23
24
|
const monthFormat = select('monthFormat', ['long', 'short']);
|
|
@@ -36,7 +37,10 @@ export const Basic = () => {
|
|
|
36
37
|
size={size}
|
|
37
38
|
value={value}
|
|
38
39
|
clearable={clearable}
|
|
39
|
-
onChange={(v) =>
|
|
40
|
+
onChange={(v) => {
|
|
41
|
+
console.log(v);
|
|
42
|
+
setValue(v);
|
|
43
|
+
}}
|
|
40
44
|
/>
|
|
41
45
|
);
|
|
42
46
|
};
|
|
@@ -54,7 +58,7 @@ export const Basic400Zoom = storyConfig(
|
|
|
54
58
|
);
|
|
55
59
|
|
|
56
60
|
export const RightAligned = () => {
|
|
57
|
-
const [value, setValue] = useState(
|
|
61
|
+
const [value, setValue] = useState(epoch);
|
|
58
62
|
const disabled = boolean('disabled', false);
|
|
59
63
|
const label = text('label', 'label');
|
|
60
64
|
const monthFormat = select('monthFormat', ['long', 'short']);
|
|
@@ -78,8 +82,8 @@ export const RightAligned = () => {
|
|
|
78
82
|
<DateLookup
|
|
79
83
|
disabled={disabled}
|
|
80
84
|
label={label}
|
|
81
|
-
max={new Date(maxvalue)}
|
|
82
85
|
min={new Date(minvalue)}
|
|
86
|
+
max={new Date(maxvalue)}
|
|
83
87
|
monthFormat={monthFormat}
|
|
84
88
|
placeholder={placeholder}
|
|
85
89
|
size={size}
|
|
@@ -1 +1,68 @@
|
|
|
1
|
-
.np-date-trigger
|
|
1
|
+
.np-date-trigger {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
text-overflow: ellipsis;
|
|
4
|
+
white-space: nowrap;
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
.np-date-trigger .control-label {
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
font-weight: var(--font-weight-regular);
|
|
10
|
+
}
|
|
11
|
+
.np-theme-personal .np-date-trigger {
|
|
12
|
+
padding-left: 16px;
|
|
13
|
+
padding-left: var(--size-16);
|
|
14
|
+
}
|
|
15
|
+
.np-theme-personal .np-date-trigger .control-label + span {
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
font-weight: var(--font-weight-regular);
|
|
18
|
+
}
|
|
19
|
+
.clear-btn {
|
|
20
|
+
transition: color 0.15s ease-in-out;
|
|
21
|
+
color: #c9cbce;
|
|
22
|
+
color: var(--color-interactive-secondary);
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 16px;
|
|
25
|
+
top: var(--size-16);
|
|
26
|
+
right: 16px;
|
|
27
|
+
right: var(--size-16);
|
|
28
|
+
}
|
|
29
|
+
[dir="rtl"] .clear-btn {
|
|
30
|
+
left: 16px;
|
|
31
|
+
left: var(--size-16);
|
|
32
|
+
right: auto;
|
|
33
|
+
right: initial;
|
|
34
|
+
}
|
|
35
|
+
.np-theme-personal .clear-btn {
|
|
36
|
+
top: 8px;
|
|
37
|
+
top: var(--size-8);
|
|
38
|
+
right: 8px;
|
|
39
|
+
right: var(--size-8);
|
|
40
|
+
}
|
|
41
|
+
[dir="rtl"] .np-theme-personal .clear-btn {
|
|
42
|
+
left: 8px;
|
|
43
|
+
left: var(--size-8);
|
|
44
|
+
right: auto;
|
|
45
|
+
right: initial;
|
|
46
|
+
}
|
|
47
|
+
.clear-btn--sm {
|
|
48
|
+
top: 8px;
|
|
49
|
+
top: var(--size-8);
|
|
50
|
+
}
|
|
51
|
+
.np-theme-personal .clear-btn--sm {
|
|
52
|
+
top: 0;
|
|
53
|
+
}
|
|
54
|
+
.clear-btn--lg {
|
|
55
|
+
top: 28px;
|
|
56
|
+
}
|
|
57
|
+
.np-theme-personal .clear-btn--lg {
|
|
58
|
+
top: 20px;
|
|
59
|
+
}
|
|
60
|
+
.clear-btn:not(.disabled):not(:disabled):hover,
|
|
61
|
+
.clear-btn:not(.disabled):not(:disabled):focus {
|
|
62
|
+
color: #d03238;
|
|
63
|
+
color: var(--color-interactive-negative-hover);
|
|
64
|
+
}
|
|
65
|
+
.clear-btn:not(.disabled):not(:disabled):active {
|
|
66
|
+
color: #bf1e2c;
|
|
67
|
+
color: var(--color-interactive-negative-active);
|
|
68
|
+
}
|
|
@@ -1 +1,93 @@
|
|
|
1
|
-
.np-decision .decision
|
|
1
|
+
.np-decision .decision {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
.np-decision__tile--small + .np-decision__tile--small {
|
|
5
|
+
margin-left: 16px;
|
|
6
|
+
margin-left: var(--size-16);
|
|
7
|
+
}
|
|
8
|
+
[dir="rtl"] .np-decision__tile--small + .np-decision__tile--small {
|
|
9
|
+
margin-right: 16px;
|
|
10
|
+
margin-right: var(--size-16);
|
|
11
|
+
margin-left: 0;
|
|
12
|
+
margin-left: initial;
|
|
13
|
+
}
|
|
14
|
+
.np-decision.np-decision--grid .np-decision__tile--small {
|
|
15
|
+
margin-left: 0;
|
|
16
|
+
margin-bottom: 16px !important;
|
|
17
|
+
margin-bottom: var(--size-16) !important;
|
|
18
|
+
}
|
|
19
|
+
[dir="rtl"] .np-decision.np-decision--grid .np-decision__tile--small {
|
|
20
|
+
margin-right: 0;
|
|
21
|
+
margin-left: 0;
|
|
22
|
+
margin-left: initial;
|
|
23
|
+
}
|
|
24
|
+
.np-decision.np-decision--grid .np-decision__tile--small:not(:last-of-type) {
|
|
25
|
+
margin-right: 16px;
|
|
26
|
+
margin-right: var(--size-16);
|
|
27
|
+
}
|
|
28
|
+
[dir="rtl"] .np-decision.np-decision--grid .np-decision__tile--small:not(:last-of-type) {
|
|
29
|
+
margin-left: 16px;
|
|
30
|
+
margin-left: var(--size-16);
|
|
31
|
+
margin-right: 0;
|
|
32
|
+
margin-right: initial;
|
|
33
|
+
}
|
|
34
|
+
.np-decision__tile + .np-decision__tile {
|
|
35
|
+
margin-left: 24px;
|
|
36
|
+
margin-left: var(--size-24);
|
|
37
|
+
}
|
|
38
|
+
[dir="rtl"] .np-decision__tile + .np-decision__tile {
|
|
39
|
+
margin-right: 24px;
|
|
40
|
+
margin-right: var(--size-24);
|
|
41
|
+
margin-left: 0;
|
|
42
|
+
margin-left: initial;
|
|
43
|
+
}
|
|
44
|
+
.np-decision .np-text-title-subsection {
|
|
45
|
+
margin-bottom: 0;
|
|
46
|
+
}
|
|
47
|
+
.np-decision__tile--small .np-text-title-subsection {
|
|
48
|
+
font-size: 1rem;
|
|
49
|
+
font-size: var(--font-size-16);
|
|
50
|
+
line-height: 1.2;
|
|
51
|
+
line-height: var(--line-height-title);
|
|
52
|
+
margin-bottom: 0;
|
|
53
|
+
}
|
|
54
|
+
.np-decision.np-decision--grid .np-decision__tile {
|
|
55
|
+
margin-left: 0;
|
|
56
|
+
margin-bottom: 24px !important;
|
|
57
|
+
margin-bottom: var(--size-24) !important;
|
|
58
|
+
}
|
|
59
|
+
[dir="rtl"] .np-decision.np-decision--grid .np-decision__tile {
|
|
60
|
+
margin-right: 0;
|
|
61
|
+
margin-left: 0;
|
|
62
|
+
margin-left: initial;
|
|
63
|
+
}
|
|
64
|
+
.np-decision.np-decision--grid .np-decision__tile:not(:last-of-type) {
|
|
65
|
+
margin-right: 24px;
|
|
66
|
+
margin-right: var(--size-24);
|
|
67
|
+
}
|
|
68
|
+
[dir="rtl"] .np-decision.np-decision--grid .np-decision__tile:not(:last-of-type) {
|
|
69
|
+
margin-left: 24px;
|
|
70
|
+
margin-left: var(--size-24);
|
|
71
|
+
margin-right: 0;
|
|
72
|
+
margin-right: initial;
|
|
73
|
+
}
|
|
74
|
+
.np-decision.np-decision--grid .np-size-swapper {
|
|
75
|
+
margin-right: calc(0 - 24px);
|
|
76
|
+
margin-right: calc(0 - var(--size-24));
|
|
77
|
+
}
|
|
78
|
+
[dir="rtl"] .np-decision.np-decision--grid .np-size-swapper {
|
|
79
|
+
margin-left: calc(0 - 24px);
|
|
80
|
+
margin-left: calc(0 - var(--size-24));
|
|
81
|
+
margin-right: 0;
|
|
82
|
+
margin-right: initial;
|
|
83
|
+
}
|
|
84
|
+
.np-decision.np-decision--grid.np-decision--small .np-size-swapper {
|
|
85
|
+
margin-right: calc(0 - 16px);
|
|
86
|
+
margin-right: calc(0 - var(--size-16));
|
|
87
|
+
}
|
|
88
|
+
[dir="rtl"] .np-decision.np-decision--grid.np-decision--small .np-size-swapper {
|
|
89
|
+
margin-left: calc(0 - 16px);
|
|
90
|
+
margin-left: calc(0 - var(--size-16));
|
|
91
|
+
margin-right: 0;
|
|
92
|
+
margin-right: initial;
|
|
93
|
+
}
|
|
@@ -1 +1,53 @@
|
|
|
1
|
-
.tw-definition-list__item dd
|
|
1
|
+
.tw-definition-list__item dd {
|
|
2
|
+
word-break: break-all;
|
|
3
|
+
word-break: break-word;
|
|
4
|
+
}
|
|
5
|
+
.tw-definition-list__action {
|
|
6
|
+
align-self: center;
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
}
|
|
9
|
+
.tw-definition-list__button {
|
|
10
|
+
margin-top: -50%;
|
|
11
|
+
}
|
|
12
|
+
@media (max-width: 576px) {
|
|
13
|
+
.tw-definition-list--right-aligned-desktop {
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
@media (min-width: 576px) {
|
|
18
|
+
.tw-definition-list--right-aligned-desktop {
|
|
19
|
+
justify-content: flex-end;
|
|
20
|
+
}
|
|
21
|
+
.tw-definition-list.tw-definition-list--columns {
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
}
|
|
24
|
+
.tw-definition-list.tw-definition-list--columns .tw-definition-list__item {
|
|
25
|
+
width: 50%;
|
|
26
|
+
}
|
|
27
|
+
.tw-definition-list.tw-definition-list--horizontal .tw-definition-list__item {
|
|
28
|
+
display: flex;
|
|
29
|
+
}
|
|
30
|
+
.tw-definition-list.tw-definition-list--horizontal .tw-definition-list__item dt {
|
|
31
|
+
flex: 1;
|
|
32
|
+
min-width: 150px;
|
|
33
|
+
max-width: 30%;
|
|
34
|
+
margin-right: 8px;
|
|
35
|
+
margin-right: var(--size-8);
|
|
36
|
+
}
|
|
37
|
+
[dir="rtl"] .tw-definition-list.tw-definition-list--horizontal .tw-definition-list__item dt {
|
|
38
|
+
margin-left: 8px;
|
|
39
|
+
margin-left: var(--size-8);
|
|
40
|
+
margin-right: 0;
|
|
41
|
+
margin-right: initial;
|
|
42
|
+
}
|
|
43
|
+
.tw-definition-list.tw-definition-list--horizontal .tw-definition-list__item dd {
|
|
44
|
+
flex: 1;
|
|
45
|
+
align-items: center;
|
|
46
|
+
margin-bottom: 8px;
|
|
47
|
+
margin-bottom: var(--size-8);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.np-theme-personal .tw-definition-list dt {
|
|
51
|
+
color: #5d7079;
|
|
52
|
+
color: var(--color-content-secondary);
|
|
53
|
+
}
|
package/src/dimmer/Dimmer.css
CHANGED
|
@@ -1 +1,70 @@
|
|
|
1
|
-
.no-scroll
|
|
1
|
+
.no-scroll {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
}
|
|
4
|
+
.dimmer {
|
|
5
|
+
position: fixed;
|
|
6
|
+
z-index: 1050;
|
|
7
|
+
top: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
bottom: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
width: 100vw;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
height: 100dvh;
|
|
14
|
+
transition: background-color cubic-bezier(0, 0.94, 0.62, 1) 350ms;
|
|
15
|
+
}
|
|
16
|
+
.dimmer--scrollable {
|
|
17
|
+
overflow-y: auto;
|
|
18
|
+
}
|
|
19
|
+
[dir="rtl"] .dimmer {
|
|
20
|
+
left: 0;
|
|
21
|
+
right: auto;
|
|
22
|
+
right: initial;
|
|
23
|
+
}
|
|
24
|
+
[dir="rtl"] .dimmer {
|
|
25
|
+
right: 0;
|
|
26
|
+
left: auto;
|
|
27
|
+
left: initial;
|
|
28
|
+
}
|
|
29
|
+
.dimmer.dimmer--enter-done {
|
|
30
|
+
background: rgba(0, 0, 0, 0.4);
|
|
31
|
+
}
|
|
32
|
+
.np-theme-personal .dimmer.dimmer--enter-done {
|
|
33
|
+
background-color: rgba(14, 15, 12, 0.4);
|
|
34
|
+
}
|
|
35
|
+
.np-theme-personal--dark .dimmer.dimmer--enter-done {
|
|
36
|
+
background-color: rgba(243, 245, 241, 0.25);
|
|
37
|
+
}
|
|
38
|
+
.np-theme-personal--forest-green .dimmer.dimmer--enter-done,
|
|
39
|
+
.np-theme-personal--bright-green .dimmer.dimmer--enter-done {
|
|
40
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
41
|
+
}
|
|
42
|
+
.dimmer.dimmer--enter-done.dimmer--transparent {
|
|
43
|
+
background: transparent;
|
|
44
|
+
}
|
|
45
|
+
.dimmer.dimmer--enter-done.dimmer--enter-fade > * {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
.dimmer.dimmer--exit-fade > *,
|
|
49
|
+
.dimmer.dimmer--enter-fade > * {
|
|
50
|
+
transition: opacity cubic-bezier(0, 0.94, 0.62, 1) 350ms;
|
|
51
|
+
}
|
|
52
|
+
.dimmer.dimmer--exit-fade > * {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
|
+
.dimmer.dimmer--enter-fade > * {
|
|
56
|
+
opacity: 0;
|
|
57
|
+
}
|
|
58
|
+
.dimmer.dimmer--exit.dimmer--exit-fade > * {
|
|
59
|
+
opacity: 0;
|
|
60
|
+
}
|
|
61
|
+
.dimmer-content-positioner {
|
|
62
|
+
min-height: 100%;
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
}
|
|
65
|
+
:not(.dimmer--scrollable) > .dimmer-content-positioner {
|
|
66
|
+
height: 100%;
|
|
67
|
+
}
|
|
68
|
+
.dimmer-content-positioner > * {
|
|
69
|
+
pointer-events: all;
|
|
70
|
+
}
|
package/src/drawer/Drawer.css
CHANGED
|
@@ -1 +1,100 @@
|
|
|
1
|
-
.np-drawer
|
|
1
|
+
.np-drawer {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
width: 100vw;
|
|
6
|
+
max-width: 600px;
|
|
7
|
+
height: 100vh;
|
|
8
|
+
height: 100dvh;
|
|
9
|
+
max-height: 100vh;
|
|
10
|
+
max-height: 100dvh;
|
|
11
|
+
}
|
|
12
|
+
@media (max-width: 770px) {
|
|
13
|
+
.np-drawer {
|
|
14
|
+
max-width: none;
|
|
15
|
+
max-width: initial;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
.np-drawer .np-drawer-header {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
flex-wrap: nowrap;
|
|
22
|
+
min-height: 56px;
|
|
23
|
+
min-height: var(--size-56);
|
|
24
|
+
padding: 24px 16px;
|
|
25
|
+
padding: var(--size-24) var(--size-16);
|
|
26
|
+
}
|
|
27
|
+
.np-theme-personal .np-drawer .np-drawer-header {
|
|
28
|
+
padding: 24px;
|
|
29
|
+
padding: var(--size-24);
|
|
30
|
+
}
|
|
31
|
+
@media (max-width: 320px) {
|
|
32
|
+
.np-theme-personal .np-drawer .np-drawer-header {
|
|
33
|
+
padding: 16px;
|
|
34
|
+
padding: var(--size-16);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.np-theme-personal .np-drawer .np-drawer-header .np-close-button {
|
|
38
|
+
margin-top: calc(8px * -1);
|
|
39
|
+
margin-top: calc(var(--size-8) * -1);
|
|
40
|
+
margin-right: calc(8px * -1);
|
|
41
|
+
margin-right: calc(var(--size-8) * -1);
|
|
42
|
+
margin-bottom: calc(8px * -1);
|
|
43
|
+
margin-bottom: calc(var(--size-8) * -1);
|
|
44
|
+
}
|
|
45
|
+
.np-drawer .np-drawer-header.np-drawer-header--withborder {
|
|
46
|
+
box-shadow: inset 0 -1px 0 0 #e2e6e8;
|
|
47
|
+
}
|
|
48
|
+
.np-theme-personal .np-drawer .np-drawer-header.np-drawer-header--withborder {
|
|
49
|
+
box-shadow: inset 0 -1px 0 0 rgba(0,0,0,0.10196);
|
|
50
|
+
box-shadow: inset 0 -1px 0 0 var(--color-border-neutral);
|
|
51
|
+
}
|
|
52
|
+
.np-drawer .np-drawer-header .np-text-title-body {
|
|
53
|
+
margin-right: 16px;
|
|
54
|
+
margin-right: var(--size-16);
|
|
55
|
+
font-size: 1.125rem;
|
|
56
|
+
font-size: var(--font-size-18);
|
|
57
|
+
letter-spacing: -0.01em;
|
|
58
|
+
letter-spacing: var(--letter-spacing-negative-xs);
|
|
59
|
+
line-height: 1.5rem;
|
|
60
|
+
line-height: var(--line-height-24);
|
|
61
|
+
}
|
|
62
|
+
.np-drawer .np-drawer-header .np-close-button {
|
|
63
|
+
margin-left: auto;
|
|
64
|
+
}
|
|
65
|
+
.np-drawer .np-drawer-header .tw-icon {
|
|
66
|
+
display: block;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
fill: #00b9ff;
|
|
69
|
+
}
|
|
70
|
+
.np-drawer .np-drawer-content {
|
|
71
|
+
overflow-y: auto;
|
|
72
|
+
flex: 1;
|
|
73
|
+
}
|
|
74
|
+
.np-drawer .np-drawer-footer,
|
|
75
|
+
.np-drawer .np-drawer-content {
|
|
76
|
+
padding: 16px;
|
|
77
|
+
padding: var(--size-16);
|
|
78
|
+
}
|
|
79
|
+
.np-drawer .np-drawer-footer {
|
|
80
|
+
box-shadow: inset 0 1px 0 0 #e2e6e8;
|
|
81
|
+
}
|
|
82
|
+
.np-theme-personal .np-drawer .np-drawer-footer {
|
|
83
|
+
box-shadow: inset 0 1px 0 0 rgba(0,0,0,0.10196);
|
|
84
|
+
box-shadow: inset 0 1px 0 0 var(--color-border-neutral);
|
|
85
|
+
}
|
|
86
|
+
@media (min-width: 768px) {
|
|
87
|
+
.np-drawer .np-drawer-header {
|
|
88
|
+
padding: 32px 24px;
|
|
89
|
+
padding: var(--size-32) var(--size-24);
|
|
90
|
+
}
|
|
91
|
+
.np-theme-personal .np-drawer .np-drawer-header {
|
|
92
|
+
padding: 24px;
|
|
93
|
+
padding: var(--size-24);
|
|
94
|
+
}
|
|
95
|
+
.np-drawer .np-drawer-footer,
|
|
96
|
+
.np-drawer .np-drawer-content {
|
|
97
|
+
padding: 24px;
|
|
98
|
+
padding: var(--size-24);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
.np-dropfade
|
|
1
|
+
.np-dropfade,
|
|
2
|
+
.np-dropfade-enter {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
height: 0;
|
|
6
|
+
}
|
|
7
|
+
.np-dropfade-enter-active {
|
|
8
|
+
transition: height 150ms ease-in, opacity 150ms ease-in 150ms;
|
|
9
|
+
opacity: 1;
|
|
10
|
+
}
|
|
11
|
+
.np-dropfade-enter-done,
|
|
12
|
+
.np-dropfade-exit {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
height: auto;
|
|
15
|
+
}
|
|
16
|
+
.np-dropfade-exit-active {
|
|
17
|
+
transition: opacity 150ms ease-in, height 150ms ease-in 150ms;
|
|
18
|
+
opacity: 0;
|
|
19
|
+
}
|
|
@@ -1 +1,31 @@
|
|
|
1
|
-
.emphasis
|
|
1
|
+
.emphasis {
|
|
2
|
+
font-weight: 600;
|
|
3
|
+
font-weight: var(--font-weight-semi-bold);
|
|
4
|
+
font-style: normal;
|
|
5
|
+
}
|
|
6
|
+
.emphasis--important {
|
|
7
|
+
color: #37517e;
|
|
8
|
+
color: var(--color-content-primary);
|
|
9
|
+
}
|
|
10
|
+
.emphasis--positive {
|
|
11
|
+
color: #008026;
|
|
12
|
+
color: var(--color-content-positive);
|
|
13
|
+
}
|
|
14
|
+
.np-theme-personal .emphasis--positive {
|
|
15
|
+
color: var(--color-sentiment-positive);
|
|
16
|
+
}
|
|
17
|
+
.emphasis--negative {
|
|
18
|
+
color: #cf2929;
|
|
19
|
+
color: var(--color-content-negative);
|
|
20
|
+
}
|
|
21
|
+
.np-theme-personal .emphasis--negative {
|
|
22
|
+
color: var(--color-sentiment-negative);
|
|
23
|
+
}
|
|
24
|
+
.emphasis--warning {
|
|
25
|
+
color: #9a6500;
|
|
26
|
+
color: var(--color-content-warning);
|
|
27
|
+
}
|
|
28
|
+
.np-theme-personal .emphasis--warning {
|
|
29
|
+
color: #5d7079;
|
|
30
|
+
color: var(--color-content-secondary);
|
|
31
|
+
}
|