@transferwise/components 46.1.0 → 46.2.0
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 +44 -23
- package/build/index.esm.js.map +1 -1
- package/build/index.js +44 -23
- package/build/index.js.map +1 -1
- package/build/main.css +5494 -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 +49 -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 +76 -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 +72 -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 +105 -1
- package/build/styles/inputs/InputGroup.css +62 -1
- package/build/styles/inputs/SelectInput.css +374 -1
- package/build/styles/inputs/TextArea.css +109 -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 +5494 -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 +179 -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/accordion/Accordion.d.ts +1 -0
- package/build/types/accordion/Accordion.d.ts.map +1 -1
- package/build/types/accordion/AccordionItem/AccordionItem.d.ts +3 -0
- package/build/types/accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +6 -3
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts +2 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts +2 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/select/option/Option.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 +5 -11
- package/src/accordion/Accordion.css +60 -1
- package/src/accordion/Accordion.story.tsx +8 -0
- package/src/accordion/Accordion.tsx +2 -0
- package/src/accordion/AccordionItem/AccordionItem.tsx +5 -0
- 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 +49 -1
- package/src/common/closeButton/CloseButton.css +79 -1
- package/src/common/panel/Panel.css +73 -1
- package/src/criticalBanner/CriticalCommsBanner.css +76 -1
- package/src/dateInput/DateInput.css +3 -1
- package/src/dateLookup/DateLookup.css +98 -1
- 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 +72 -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 +105 -1
- package/src/inputs/InputGroup.css +62 -1
- package/src/inputs/SelectInput.css +374 -1
- package/src/inputs/SelectInput.spec.tsx +52 -3
- package/src/inputs/SelectInput.story.tsx +1 -1
- package/src/inputs/SelectInput.tsx +30 -15
- package/src/inputs/TextArea.css +109 -1
- package/src/inputs/_BottomSheet.tsx +3 -0
- package/src/inputs/_Popover.tsx +3 -0
- 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 +5494 -1
- package/src/modal/Modal.css +155 -1
- package/src/moneyInput/MoneyInput.css +66 -1
- package/src/moneyInput/MoneyInput.js +3 -1
- package/src/moneyInput/MoneyInput.spec.js +4 -1
- package/src/navigationOption/NavigationOption.css +69 -1
- package/src/navigationOptionsList/NavigationOptionsList.css +13 -1
- package/src/nudge/Nudge.css +179 -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 +3 -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,79 @@
|
|
|
1
|
-
.np-close-button
|
|
1
|
+
.np-close-button {
|
|
2
|
+
transition: color 0.15s ease-in-out;
|
|
3
|
+
color: #00a2dd;
|
|
4
|
+
color: var(--color-interactive-accent);
|
|
5
|
+
border: none;
|
|
6
|
+
background: none;
|
|
7
|
+
padding: 0;
|
|
8
|
+
height: 16px;
|
|
9
|
+
height: var(--size-16);
|
|
10
|
+
--ring-outline-offset: 0;
|
|
11
|
+
}
|
|
12
|
+
.np-close-button--large,
|
|
13
|
+
.np-close-button--x-large {
|
|
14
|
+
height: 24px;
|
|
15
|
+
height: var(--size-24);
|
|
16
|
+
}
|
|
17
|
+
.np-close-button:hover {
|
|
18
|
+
color: #008fc9;
|
|
19
|
+
color: var(--color-interactive-accent-hover);
|
|
20
|
+
}
|
|
21
|
+
.np-theme-personal .np-close-button {
|
|
22
|
+
color: var(--color-interactive-primary);
|
|
23
|
+
height: 32px;
|
|
24
|
+
height: var(--size-32);
|
|
25
|
+
width: 32px;
|
|
26
|
+
width: var(--size-32);
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
border-radius: 9999px;
|
|
31
|
+
border-radius: var(--radius-full);
|
|
32
|
+
transition: background-color 0.1s ease;
|
|
33
|
+
}
|
|
34
|
+
@media (max-width: 320px) {
|
|
35
|
+
.np-theme-personal .np-close-button {
|
|
36
|
+
height: 64px;
|
|
37
|
+
height: var(--size-64);
|
|
38
|
+
width: 64px;
|
|
39
|
+
width: var(--size-64);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.np-theme-personal .np-close-button--large {
|
|
43
|
+
height: 40px;
|
|
44
|
+
height: var(--size-40);
|
|
45
|
+
width: 40px;
|
|
46
|
+
width: var(--size-40);
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
}
|
|
49
|
+
@media (max-width: 320px) {
|
|
50
|
+
.np-theme-personal .np-close-button--large {
|
|
51
|
+
height: 80px;
|
|
52
|
+
height: var(--size-80);
|
|
53
|
+
width: 80px;
|
|
54
|
+
width: var(--size-80);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
.np-theme-personal .np-close-button--x-large {
|
|
58
|
+
height: 48px;
|
|
59
|
+
height: var(--size-48);
|
|
60
|
+
width: 48px;
|
|
61
|
+
width: var(--size-48);
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
}
|
|
64
|
+
@media (max-width: 320px) {
|
|
65
|
+
.np-theme-personal .np-close-button--x-large {
|
|
66
|
+
height: 96px;
|
|
67
|
+
height: var(--size-96);
|
|
68
|
+
width: 96px;
|
|
69
|
+
width: var(--size-96);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
.np-theme-personal .np-close-button:not(.disabled):not(:disabled):hover {
|
|
73
|
+
color: var(--color-interactive-primary-hover);
|
|
74
|
+
background-color: var(--color-background-neutral-hover);
|
|
75
|
+
}
|
|
76
|
+
.np-theme-personal .np-close-button:not(.disabled):not(:disabled):active {
|
|
77
|
+
color: var(--color-interactive-primary-active);
|
|
78
|
+
background-color: var(--color-background-neutral-active);
|
|
79
|
+
}
|
|
@@ -1 +1,73 @@
|
|
|
1
|
-
.np-panel__content
|
|
1
|
+
.np-panel__content {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
visibility: hidden;
|
|
4
|
+
background-color: #ffffff;
|
|
5
|
+
background-color: var(--color-background-elevated);
|
|
6
|
+
border-radius: 10px;
|
|
7
|
+
border-radius: var(--radius-small);
|
|
8
|
+
box-shadow: 0 0 40px rgba(69, 71, 69, 0.2);
|
|
9
|
+
transition: opacity 0.2s cubic-bezier(0.6, 0.2, 0.1, 1), transform 0.2s cubic-bezier(0.6, 0.2, 0.1, 1), visibility 0s linear 0.2s;
|
|
10
|
+
}
|
|
11
|
+
.np-theme-personal .np-panel__content {
|
|
12
|
+
border-radius: 10px;
|
|
13
|
+
border-radius: var(--radius-small);
|
|
14
|
+
}
|
|
15
|
+
.np-theme-personal--forest-green .np-panel__content,
|
|
16
|
+
.np-theme-personal--bright-green .np-panel__content,
|
|
17
|
+
.np-theme-personal--dark .np-panel__content {
|
|
18
|
+
box-shadow: none;
|
|
19
|
+
}
|
|
20
|
+
.np-panel--open .np-panel__content {
|
|
21
|
+
transition: opacity 0.2s cubic-bezier(0.6, 0.2, 0.1, 1), transform 0.2s cubic-bezier(0.6, 0.2, 0.1, 1), visibility 0s linear 0s;
|
|
22
|
+
visibility: visible;
|
|
23
|
+
opacity: 1;
|
|
24
|
+
transform: none !important;
|
|
25
|
+
}
|
|
26
|
+
.np-panel__arrow,
|
|
27
|
+
.np-panel__arrow::before {
|
|
28
|
+
position: absolute;
|
|
29
|
+
width: 14px;
|
|
30
|
+
height: 14px;
|
|
31
|
+
}
|
|
32
|
+
.np-panel__arrow::before {
|
|
33
|
+
left: 0;
|
|
34
|
+
content: "";
|
|
35
|
+
transform: rotate(45deg);
|
|
36
|
+
background: #ffffff;
|
|
37
|
+
background: var(--color-background-elevated);
|
|
38
|
+
}
|
|
39
|
+
.np-panel[data-popper-placement^="top"] > .np-panel__content {
|
|
40
|
+
transform: translateY(10px) scale(0.95);
|
|
41
|
+
}
|
|
42
|
+
.np-panel[data-popper-placement^="top"] > .np-panel__content .np-panel__arrow {
|
|
43
|
+
bottom: -6px;
|
|
44
|
+
}
|
|
45
|
+
.np-panel[data-popper-placement^="right"] > .np-panel__content {
|
|
46
|
+
transform: translateX(-10px) scale(0.95);
|
|
47
|
+
}
|
|
48
|
+
.np-panel[data-popper-placement^="right"] > .np-panel__content .np-panel__arrow {
|
|
49
|
+
left: -6px;
|
|
50
|
+
}
|
|
51
|
+
.np-panel[data-popper-placement^="bottom"] > .np-panel__content {
|
|
52
|
+
transform: translateY(-10px) scale(0.95);
|
|
53
|
+
}
|
|
54
|
+
.np-panel[data-popper-placement^="bottom"] > .np-panel__content .np-panel__arrow {
|
|
55
|
+
top: -6px;
|
|
56
|
+
}
|
|
57
|
+
.np-panel[data-popper-placement^="left"] > .np-panel__content {
|
|
58
|
+
transform: translateX(10px) scale(0.95);
|
|
59
|
+
}
|
|
60
|
+
.np-panel[data-popper-placement^="left"] > .np-panel__content .np-panel__arrow {
|
|
61
|
+
right: -6px;
|
|
62
|
+
}
|
|
63
|
+
.np-theme-personal .np-panel__content {
|
|
64
|
+
border-radius: 16px;
|
|
65
|
+
border-radius: var(--radius-medium);
|
|
66
|
+
box-shadow: 0 0 40px rgba(69, 71, 69, 0.2);
|
|
67
|
+
}
|
|
68
|
+
.np-theme-personal--forest-green .np-dropdown-menu,
|
|
69
|
+
.np-theme-personal--bright-green .np-dropdown-menu,
|
|
70
|
+
.np-theme-personal--dark .np-dropdown-menu {
|
|
71
|
+
background-color: #ffffff;
|
|
72
|
+
background-color: var(--color-background-elevated);
|
|
73
|
+
}
|
|
@@ -1 +1,76 @@
|
|
|
1
|
-
div.critical-comms
|
|
1
|
+
div.critical-comms {
|
|
2
|
+
--critical-comms-background-color: var(--color-background-negative);
|
|
3
|
+
--critical-comms-title-color: var(--color-content-negative);
|
|
4
|
+
--critical-comms-subtitle-color: var(--color-content-secondary);
|
|
5
|
+
--critical-comms-subtitle-color-padding-left: var(--size-16);
|
|
6
|
+
--critical-comms-vertical-spacing: var(--size-8);
|
|
7
|
+
background-color: rgba(255,135,135,0.10196);
|
|
8
|
+
background-color: var(--critical-comms-background-color);
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
.np-theme-personal div.critical-comms,
|
|
14
|
+
.np-theme-personal--dark div.critical-comms {
|
|
15
|
+
--critical-comms-background-color: var(--color-sentiment-negative);
|
|
16
|
+
--critical-comms-title-color: var(--color-contrast);
|
|
17
|
+
--critical-comms-subtitle-color: var(--color-contrast);
|
|
18
|
+
--critical-comms-subtitle-color-padding-left: 0;
|
|
19
|
+
--critical-comms-vertical-spacing: var(--size-16);
|
|
20
|
+
padding: 24px;
|
|
21
|
+
padding: var(--padding-medium);
|
|
22
|
+
}
|
|
23
|
+
.np-theme-personal div.critical-comms .tw-icon-alert-circle-fill,
|
|
24
|
+
.np-theme-personal--dark div.critical-comms .tw-icon-alert-circle-fill {
|
|
25
|
+
color: var(--color-contrast);
|
|
26
|
+
}
|
|
27
|
+
.np-theme-personal div.critical-comms .tw-icon-alert-circle-fill svg,
|
|
28
|
+
.np-theme-personal--dark div.critical-comms .tw-icon-alert-circle-fill svg {
|
|
29
|
+
width: 48px;
|
|
30
|
+
height: 48px;
|
|
31
|
+
}
|
|
32
|
+
.np-theme-personal div.critical-comms .cta-btn,
|
|
33
|
+
.np-theme-personal--dark div.critical-comms .cta-btn {
|
|
34
|
+
background-color: var(--color-contrast);
|
|
35
|
+
}
|
|
36
|
+
.np-theme-personal div.critical-comms .cta-btn:not(.disabled):not(:disabled):focus,
|
|
37
|
+
.np-theme-personal--dark div.critical-comms .cta-btn:not(.disabled):not(:disabled):focus {
|
|
38
|
+
outline-color: var(--color-contrast);
|
|
39
|
+
}
|
|
40
|
+
@media (max-width: 767px) {
|
|
41
|
+
div.critical-comms {
|
|
42
|
+
display: inline;
|
|
43
|
+
display: initial;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
div.critical-comms .critical-comms--title {
|
|
47
|
+
color: var(--critical-comms-title-color);
|
|
48
|
+
}
|
|
49
|
+
div.critical-comms .critical-comms--subtitle {
|
|
50
|
+
color: var(--critical-comms-subtitle-color);
|
|
51
|
+
}
|
|
52
|
+
div.critical-comms .critical-comms--cta {
|
|
53
|
+
padding-left: 0;
|
|
54
|
+
}
|
|
55
|
+
@media (max-width: 767px) {
|
|
56
|
+
div.critical-comms .critical-comms--cta {
|
|
57
|
+
padding-left: var(--critical-comms-subtitle-color-padding-left);
|
|
58
|
+
padding-top: var(--critical-comms-vertical-spacing);
|
|
59
|
+
min-width: 100%;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
div.critical-comms .critical-comms-body {
|
|
63
|
+
display: flex;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
@media (max-width: 767px) {
|
|
67
|
+
div.critical-comms .critical-comms-body {
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
@media (max-width: 767px) {
|
|
72
|
+
div.critical-comms .critical-comms-content {
|
|
73
|
+
padding-top: var(--critical-comms-vertical-spacing);
|
|
74
|
+
flex-wrap: wrap;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|