@transferwise/components 0.0.0-experimental-45ef85b → 0.0.0-experimental-cbe505a
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/build/i18n/en.json +1 -0
- package/build/index.js +2455 -2354
- package/build/index.js.map +1 -1
- package/build/index.mjs +2457 -2357
- package/build/index.mjs.map +1 -1
- package/build/main.css +93 -41
- package/build/styles/inputs/SelectInput.css +51 -41
- package/build/styles/main.css +93 -41
- package/build/styles/selectOption/SelectOption.css +42 -0
- package/build/types/common/responsivePanel/ResponsivePanel.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/build/types/selectOption/SelectOption.d.ts +21 -0
- package/build/types/selectOption/SelectOption.d.ts.map +1 -0
- package/build/types/selectOption/SelectOption.messages.d.ts +8 -0
- package/build/types/selectOption/SelectOption.messages.d.ts.map +1 -0
- package/build/types/selectOption/index.d.ts +3 -0
- package/build/types/selectOption/index.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/common/responsivePanel/ResponsivePanel.tsx +2 -0
- package/src/i18n/en.json +1 -0
- package/src/index.ts +2 -0
- package/src/inputs/SelectInput.css +51 -41
- package/src/inputs/_BottomSheet.less +49 -35
- package/src/inputs/_BottomSheet.tsx +27 -22
- package/src/inputs/_Popover.less +2 -2
- package/src/main.css +93 -41
- package/src/main.less +1 -0
- package/src/selectOption/SelectOption.css +42 -0
- package/src/selectOption/SelectOption.less +40 -0
- package/src/selectOption/SelectOption.messages.ts +8 -0
- package/src/selectOption/SelectOption.spec.tsx +101 -0
- package/src/selectOption/SelectOption.story.tsx +230 -0
- package/src/selectOption/SelectOption.tsx +157 -0
- package/src/selectOption/index.ts +2 -0
- package/src/ssr.spec.js +1 -0
- package/build/types/common/hooks/useVirtualKeyboard.d.ts +0 -2
- package/build/types/common/hooks/useVirtualKeyboard.d.ts.map +0 -1
- package/src/common/hooks/useVirtualKeyboard.ts +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectOption.messages.d.ts","sourceRoot":"","sources":["../../../src/selectOption/SelectOption.messages.ts"],"names":[],"mappings":";;;;;;AAEA,wBAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/selectOption/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ const ResponsivePanel = forwardRef<HTMLDivElement, PanelProps>(function Responsi
|
|
|
16
16
|
onClose,
|
|
17
17
|
open = false,
|
|
18
18
|
position = Position.BOTTOM,
|
|
19
|
+
anchorWidth = false,
|
|
19
20
|
}: PanelProps,
|
|
20
21
|
reference,
|
|
21
22
|
) {
|
|
@@ -35,6 +36,7 @@ const ResponsivePanel = forwardRef<HTMLDivElement, PanelProps>(function Responsi
|
|
|
35
36
|
arrow={arrow}
|
|
36
37
|
open={open}
|
|
37
38
|
position={position}
|
|
39
|
+
anchorWidth={anchorWidth}
|
|
38
40
|
anchorRef={anchorRef}
|
|
39
41
|
className={className}
|
|
40
42
|
onClose={onClose}
|
package/src/i18n/en.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "Select an option...",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
26
|
+
"neptune.SelectOption.action.label": "Choose",
|
|
26
27
|
"neptune.Summary.statusDone": "Item done",
|
|
27
28
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
28
29
|
"neptune.Summary.statusPending": "Item pending",
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export type { AccordionItem, AccordionProps } from './accordion';
|
|
5
5
|
export type { ActionOptionProps } from './actionOption';
|
|
6
|
+
export type { SelectOptionProps, SelectOptionValue, SelectOptiopsSection } from './selectOption';
|
|
6
7
|
export type { AlertAction, AlertProps, AlertType } from './alert';
|
|
7
8
|
export type { AvatarProps } from './avatar';
|
|
8
9
|
export type { BadgeProps } from './badge';
|
|
@@ -86,6 +87,7 @@ export type { UploadError, UploadResponse, UploadedFile } from './uploadInput/ty
|
|
|
86
87
|
export { default as Accordion } from './accordion';
|
|
87
88
|
export { default as ActionButton } from './actionButton';
|
|
88
89
|
export { default as ActionOption } from './actionOption';
|
|
90
|
+
export { default as SelectOption } from './selectOption';
|
|
89
91
|
export { default as Alert } from './alert';
|
|
90
92
|
export { default as Avatar } from './avatar';
|
|
91
93
|
export { default as AvatarWrapper } from './avatarWrapper';
|
|
@@ -2,37 +2,67 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
z-index: 1060;
|
|
4
4
|
}
|
|
5
|
+
.np-bottom-sheet-v2-backdrop-container--enter,
|
|
6
|
+
.np-bottom-sheet-v2-backdrop-container--leave {
|
|
7
|
+
transition-property: opacity;
|
|
8
|
+
transition-timing-function: ease-out;
|
|
9
|
+
transition-duration: 300ms;
|
|
10
|
+
}
|
|
11
|
+
.np-bottom-sheet-v2-backdrop-container--enter-from,
|
|
12
|
+
.np-bottom-sheet-v2-backdrop-container--leave-to {
|
|
13
|
+
opacity: 0;
|
|
14
|
+
}
|
|
5
15
|
.np-bottom-sheet-v2-backdrop {
|
|
6
16
|
position: fixed;
|
|
7
17
|
inset: 0px;
|
|
8
18
|
background-color: #37517e;
|
|
9
19
|
background-color: var(--color-content-primary);
|
|
10
20
|
opacity: 0.4;
|
|
11
|
-
transition-property: opacity;
|
|
12
|
-
transition-timing-function: ease-out;
|
|
13
|
-
transition-duration: 300ms;
|
|
14
|
-
}
|
|
15
|
-
.np-bottom-sheet-v2-backdrop--closed {
|
|
16
|
-
opacity: 0;
|
|
17
21
|
}
|
|
18
22
|
.np-bottom-sheet-v2 {
|
|
19
23
|
position: fixed;
|
|
20
24
|
inset: 0px;
|
|
21
|
-
bottom: env(keyboard-inset-height, 0px);
|
|
22
|
-
margin-left: 8px;
|
|
23
|
-
margin-left: var(--size-8);
|
|
24
|
-
margin-right: 8px;
|
|
25
|
-
margin-right: var(--size-8);
|
|
26
|
-
margin-top: 64px;
|
|
27
|
-
margin-top: var(--size-64);
|
|
28
25
|
display: flex;
|
|
29
26
|
flex-direction: column;
|
|
30
27
|
justify-content: flex-end;
|
|
28
|
+
padding-left: 8px;
|
|
29
|
+
padding-left: var(--size-8);
|
|
30
|
+
padding-right: 8px;
|
|
31
|
+
padding-right: var(--size-8);
|
|
32
|
+
padding-top: 64px;
|
|
33
|
+
padding-top: var(--size-64);
|
|
31
34
|
}
|
|
32
35
|
.np-bottom-sheet-v2-content {
|
|
36
|
+
max-height: 100%;
|
|
37
|
+
}
|
|
38
|
+
.np-bottom-sheet-v2-content--enter,
|
|
39
|
+
.np-bottom-sheet-v2-content--leave {
|
|
40
|
+
transition-property: transform;
|
|
41
|
+
transition-timing-function: ease-out;
|
|
42
|
+
transition-duration: 300ms;
|
|
43
|
+
}
|
|
44
|
+
@media (prefers-reduced-motion: reduce) {
|
|
45
|
+
.np-bottom-sheet-v2-content--enter,
|
|
46
|
+
.np-bottom-sheet-v2-content--leave {
|
|
47
|
+
transition-property: opacity;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
51
|
+
.np-bottom-sheet-v2-content--enter-from,
|
|
52
|
+
.np-bottom-sheet-v2-content--leave-to {
|
|
53
|
+
transform: translateY(100%);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
@media (prefers-reduced-motion: reduce) {
|
|
57
|
+
.np-bottom-sheet-v2-content--enter-from,
|
|
58
|
+
.np-bottom-sheet-v2-content--leave-to {
|
|
59
|
+
opacity: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.np-bottom-sheet-v2-content-inner-container {
|
|
33
63
|
display: flex;
|
|
64
|
+
height: 100%;
|
|
34
65
|
flex-direction: column;
|
|
35
|
-
overflow: auto;
|
|
36
66
|
border-top-left-radius: 32px;
|
|
37
67
|
/* TODO: Tokenize */
|
|
38
68
|
border-top-right-radius: 32px;
|
|
@@ -41,50 +71,30 @@
|
|
|
41
71
|
background-color: var(--color-background-elevated);
|
|
42
72
|
box-shadow: 0 0 40px rgba(69, 71, 69, 0.2);
|
|
43
73
|
}
|
|
44
|
-
.np-bottom-sheet-v2-content:focus {
|
|
74
|
+
.np-bottom-sheet-v2-content-inner-container:focus {
|
|
45
75
|
outline: none;
|
|
46
76
|
}
|
|
47
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
48
|
-
.np-bottom-sheet-v2-content {
|
|
49
|
-
transition-property: transform;
|
|
50
|
-
transition-timing-function: ease-out;
|
|
51
|
-
transition-duration: 300ms;
|
|
52
|
-
}
|
|
53
|
-
.np-bottom-sheet-v2-content--closed {
|
|
54
|
-
transform: translateY(100%);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
@media (prefers-reduced-motion: reduce) {
|
|
58
|
-
.np-bottom-sheet-v2-content {
|
|
59
|
-
transition-property: opacity;
|
|
60
|
-
transition-timing-function: ease-out;
|
|
61
|
-
transition-duration: 300ms;
|
|
62
|
-
}
|
|
63
|
-
.np-bottom-sheet-v2-content--closed {
|
|
64
|
-
opacity: 0;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
77
|
.np-bottom-sheet-v2-header {
|
|
68
78
|
align-self: flex-end;
|
|
69
79
|
padding: 16px;
|
|
70
80
|
padding: var(--size-16);
|
|
71
81
|
}
|
|
72
82
|
.np-bottom-sheet-v2-content-inner {
|
|
83
|
+
padding-top: 0px;
|
|
73
84
|
display: grid;
|
|
74
|
-
grid-template-rows: minmax(0, 1fr);
|
|
75
85
|
grid-row-gap: 8px;
|
|
76
86
|
grid-row-gap: var(--size-8);
|
|
77
87
|
row-gap: 8px;
|
|
78
88
|
row-gap: var(--size-8);
|
|
79
|
-
overflow: auto;
|
|
89
|
+
overflow-y: auto;
|
|
90
|
+
grid-template-rows: repeat(1, minmax(0, 1fr));
|
|
80
91
|
}
|
|
81
92
|
.np-bottom-sheet-v2-content-inner--has-title {
|
|
82
|
-
grid-template-rows: auto
|
|
93
|
+
grid-template-rows: auto 1fr;
|
|
83
94
|
}
|
|
84
95
|
.np-bottom-sheet-v2-content-inner--padding-md {
|
|
85
96
|
padding: 16px;
|
|
86
97
|
padding: var(--size-16);
|
|
87
|
-
padding-top: 0px;
|
|
88
98
|
}
|
|
89
99
|
.np-bottom-sheet-v2-title {
|
|
90
100
|
color: #37517e;
|
|
@@ -131,10 +141,10 @@
|
|
|
131
141
|
row-gap: 8px;
|
|
132
142
|
row-gap: var(--size-8);
|
|
133
143
|
overflow-y: auto;
|
|
134
|
-
grid-template-rows: minmax(0, 1fr);
|
|
144
|
+
grid-template-rows: repeat(1, minmax(0, 1fr));
|
|
135
145
|
}
|
|
136
146
|
.np-popover-v2--has-title {
|
|
137
|
-
grid-template-rows: auto
|
|
147
|
+
grid-template-rows: auto 1fr;
|
|
138
148
|
}
|
|
139
149
|
.np-popover-v2--padding-md {
|
|
140
150
|
padding: 16px;
|
|
@@ -3,84 +3,98 @@
|
|
|
3
3
|
z-index: 1060;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
.np-bottom-sheet-v2-backdrop-container {
|
|
7
|
+
&--enter, &--leave {
|
|
8
|
+
transition-property: opacity;
|
|
9
|
+
transition-timing-function: ease-out;
|
|
10
|
+
transition-duration: 300ms;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&--enter-from, &--leave-to {
|
|
14
|
+
opacity: 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
6
18
|
.np-bottom-sheet-v2-backdrop {
|
|
7
19
|
position: fixed;
|
|
8
20
|
inset: 0px;
|
|
9
21
|
background-color: var(--color-content-primary);
|
|
10
22
|
opacity: 0.4;
|
|
11
|
-
transition-property: opacity;
|
|
12
|
-
transition-timing-function: ease-out;
|
|
13
|
-
transition-duration: 300ms;
|
|
14
|
-
|
|
15
|
-
&--closed {
|
|
16
|
-
opacity: 0;
|
|
17
|
-
}
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
.np-bottom-sheet-v2 {
|
|
21
26
|
position: fixed;
|
|
22
27
|
inset: 0px;
|
|
23
|
-
bottom: env(keyboard-inset-height, 0px);
|
|
24
|
-
margin-left: var(--size-8);
|
|
25
|
-
margin-right: var(--size-8);
|
|
26
|
-
margin-top: var(--size-64);
|
|
27
28
|
display: flex;
|
|
28
29
|
flex-direction: column;
|
|
29
30
|
justify-content: flex-end;
|
|
31
|
+
padding-left: var(--size-8);
|
|
32
|
+
padding-right: var(--size-8);
|
|
33
|
+
padding-top: var(--size-64);
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
.np-bottom-sheet-v2-content {
|
|
33
|
-
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
overflow: auto;
|
|
36
|
-
border-top-left-radius: 32px; /* TODO: Tokenize */
|
|
37
|
-
border-top-right-radius: 32px; /* TODO: Tokenize */
|
|
38
|
-
background-color: var(--color-background-elevated);
|
|
39
|
-
box-shadow: 0 0 40px rgb(69 71 69 / 0.2);
|
|
40
|
-
|
|
41
|
-
&:focus {
|
|
42
|
-
outline: none;
|
|
43
|
-
}
|
|
37
|
+
max-height: 100%;
|
|
44
38
|
|
|
45
|
-
|
|
39
|
+
&--enter, &--leave {
|
|
46
40
|
transition-property: transform;
|
|
47
41
|
transition-timing-function: ease-out;
|
|
48
42
|
transition-duration: 300ms;
|
|
49
43
|
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
@media (prefers-reduced-motion: reduce) {
|
|
45
|
+
& {
|
|
46
|
+
transition-property: opacity;
|
|
47
|
+
}
|
|
52
48
|
}
|
|
53
49
|
}
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
&--enter-from, &--leave-to {
|
|
52
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
53
|
+
& {
|
|
54
|
+
transform: translateY(100%);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
& {
|
|
60
|
+
opacity: 0;
|
|
61
|
+
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
.np-bottom-sheet-v2-content-inner-container {
|
|
67
|
+
display: flex;
|
|
68
|
+
height: 100%;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
border-top-left-radius: 32px; /* TODO: Tokenize */
|
|
71
|
+
border-top-right-radius: 32px; /* TODO: Tokenize */
|
|
72
|
+
background-color: var(--color-background-elevated);
|
|
73
|
+
box-shadow: 0 0 40px rgb(69 71 69 / 0.2);
|
|
74
|
+
|
|
75
|
+
&:focus {
|
|
76
|
+
outline: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
66
80
|
.np-bottom-sheet-v2-header {
|
|
67
81
|
align-self: flex-end;
|
|
68
82
|
padding: var(--size-16);
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
.np-bottom-sheet-v2-content-inner {
|
|
86
|
+
padding-top: 0px;
|
|
72
87
|
display: grid;
|
|
73
|
-
grid-template-rows: minmax(0, 1fr);
|
|
74
88
|
row-gap: var(--size-8);
|
|
75
|
-
overflow: auto;
|
|
89
|
+
overflow-y: auto;
|
|
90
|
+
grid-template-rows: repeat(1, minmax(0, 1fr));
|
|
76
91
|
|
|
77
92
|
&--has-title {
|
|
78
|
-
grid-template-rows: auto
|
|
93
|
+
grid-template-rows: auto 1fr;
|
|
79
94
|
}
|
|
80
95
|
|
|
81
96
|
&--padding-md {
|
|
82
97
|
padding: var(--size-16);
|
|
83
|
-
padding-top: 0px;
|
|
84
98
|
}
|
|
85
99
|
}
|
|
86
100
|
|
|
@@ -10,10 +10,9 @@ import { Transition } from '@headlessui/react';
|
|
|
10
10
|
import { FocusScope } from '@react-aria/focus';
|
|
11
11
|
import { ThemeProvider, useTheme } from '@wise/components-theming';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
|
-
import {
|
|
13
|
+
import { useState } from 'react';
|
|
14
14
|
|
|
15
15
|
import { CloseButton } from '../common/closeButton';
|
|
16
|
-
import { useVirtualKeyboard } from '../common/hooks/useVirtualKeyboard';
|
|
17
16
|
import { PreventScroll } from '../common/preventScroll/PreventScroll';
|
|
18
17
|
import { Size } from '../common/propsValues/size';
|
|
19
18
|
|
|
@@ -43,8 +42,6 @@ export function BottomSheet({
|
|
|
43
42
|
onClose,
|
|
44
43
|
onCloseEnd,
|
|
45
44
|
}: BottomSheetProps) {
|
|
46
|
-
useVirtualKeyboard();
|
|
47
|
-
|
|
48
45
|
const { refs, context } = useFloating<Element>({
|
|
49
46
|
open,
|
|
50
47
|
onOpenChange: (value) => {
|
|
@@ -85,22 +82,28 @@ export function BottomSheet({
|
|
|
85
82
|
afterLeave={onCloseEnd}
|
|
86
83
|
>
|
|
87
84
|
<Transition.Child
|
|
88
|
-
|
|
89
|
-
enterFrom="np-bottom-sheet-v2-backdrop--
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
enter="np-bottom-sheet-v2-backdrop-container--enter"
|
|
86
|
+
enterFrom="np-bottom-sheet-v2-backdrop-container--enter-from"
|
|
87
|
+
leave="np-bottom-sheet-v2-backdrop-container--leave"
|
|
88
|
+
leaveTo="np-bottom-sheet-v2-backdrop-container--leave-to"
|
|
89
|
+
>
|
|
90
|
+
<div className="np-bottom-sheet-v2-backdrop" />
|
|
91
|
+
</Transition.Child>
|
|
92
92
|
|
|
93
93
|
<div className="np-bottom-sheet-v2">
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
<Transition.Child
|
|
95
|
+
className="np-bottom-sheet-v2-content"
|
|
96
|
+
enter="np-bottom-sheet-v2-content--enter"
|
|
97
|
+
enterFrom="np-bottom-sheet-v2-content--enter-from"
|
|
98
|
+
leave="np-bottom-sheet-v2-content--leave"
|
|
99
|
+
leaveTo="np-bottom-sheet-v2-content--leave-to"
|
|
100
|
+
>
|
|
101
|
+
<FocusScope>
|
|
102
|
+
<FloatingFocusManager context={context} initialFocus={initialFocusRef}>
|
|
103
|
+
<div
|
|
104
|
+
key={floatingKey} // Force inner state invalidation on open
|
|
100
105
|
ref={refs.setFloating}
|
|
101
|
-
className="np-bottom-sheet-v2-content"
|
|
102
|
-
enterFrom="np-bottom-sheet-v2-content--closed"
|
|
103
|
-
leaveTo="np-bottom-sheet-v2-content--closed"
|
|
106
|
+
className="np-bottom-sheet-v2-content-inner-container"
|
|
104
107
|
{...getFloatingProps()}
|
|
105
108
|
>
|
|
106
109
|
<div className="np-bottom-sheet-v2-header">
|
|
@@ -115,7 +118,9 @@ export function BottomSheet({
|
|
|
115
118
|
className={classNames(
|
|
116
119
|
'np-bottom-sheet-v2-content-inner',
|
|
117
120
|
title && 'np-bottom-sheet-v2-content-inner--has-title',
|
|
118
|
-
|
|
121
|
+
{
|
|
122
|
+
'np-bottom-sheet-v2-content-inner--padding-md': padding === 'md',
|
|
123
|
+
},
|
|
119
124
|
)}
|
|
120
125
|
>
|
|
121
126
|
{title ? (
|
|
@@ -125,10 +130,10 @@ export function BottomSheet({
|
|
|
125
130
|
{children}
|
|
126
131
|
</div>
|
|
127
132
|
</div>
|
|
128
|
-
</
|
|
129
|
-
</
|
|
130
|
-
</
|
|
131
|
-
</
|
|
133
|
+
</div>
|
|
134
|
+
</FloatingFocusManager>
|
|
135
|
+
</FocusScope>
|
|
136
|
+
</Transition.Child>
|
|
132
137
|
</div>
|
|
133
138
|
</Transition>
|
|
134
139
|
</ThemeProvider>
|
package/src/inputs/_Popover.less
CHANGED
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
display: grid;
|
|
27
27
|
row-gap: var(--size-8);
|
|
28
28
|
overflow-y: auto;
|
|
29
|
-
grid-template-rows: minmax(0, 1fr);
|
|
29
|
+
grid-template-rows: repeat(1, minmax(0, 1fr));
|
|
30
30
|
|
|
31
31
|
&--has-title {
|
|
32
|
-
grid-template-rows: auto
|
|
32
|
+
grid-template-rows: auto 1fr;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&--padding-md {
|
package/src/main.css
CHANGED
|
@@ -1484,6 +1484,48 @@ button.np-option {
|
|
|
1484
1484
|
border-radius: var(--radius-small);
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
|
+
.np-select-option {
|
|
1488
|
+
border-radius: 10px;
|
|
1489
|
+
border-radius: var(--radius-small);
|
|
1490
|
+
padding: 16px;
|
|
1491
|
+
padding: var(--size-16);
|
|
1492
|
+
}
|
|
1493
|
+
.np-select-option-placeholder {
|
|
1494
|
+
background-color: rgba(134,167,189,0.10196);
|
|
1495
|
+
background-color: var(--color-background-neutral);
|
|
1496
|
+
}
|
|
1497
|
+
.np-select-option-placeholder:hover {
|
|
1498
|
+
background-color: var(--color-background-neutral-hover);
|
|
1499
|
+
}
|
|
1500
|
+
.np-select-option-placeholder:focus,
|
|
1501
|
+
.np-select-option-placeholder:active {
|
|
1502
|
+
background-color: var(--color-background-neutral-active);
|
|
1503
|
+
}
|
|
1504
|
+
.np-select-option-selected {
|
|
1505
|
+
border: 1px solid #c9cbce;
|
|
1506
|
+
border: 1px solid var(--color-interactive-secondary);
|
|
1507
|
+
}
|
|
1508
|
+
.np-select-option-list {
|
|
1509
|
+
max-height: 350px;
|
|
1510
|
+
overflow-y: auto;
|
|
1511
|
+
}
|
|
1512
|
+
.np-select-option-section {
|
|
1513
|
+
margin-top: 0 !important;
|
|
1514
|
+
}
|
|
1515
|
+
.has-error * .np-select-option {
|
|
1516
|
+
--ring-outline-color: var(--color-sentiment-negative);
|
|
1517
|
+
--ring-outline-offset: 0;
|
|
1518
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
1519
|
+
outline-offset: 0;
|
|
1520
|
+
outline-offset: var(--ring-outline-offset);
|
|
1521
|
+
}
|
|
1522
|
+
.has-error * .np-select-option:focus {
|
|
1523
|
+
outline: none;
|
|
1524
|
+
}
|
|
1525
|
+
.has-error * .np-select-option:focus-visible {
|
|
1526
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
1527
|
+
outline-offset: var(--ring-outline-offset);
|
|
1528
|
+
}
|
|
1487
1529
|
.np-panel__content {
|
|
1488
1530
|
opacity: 0;
|
|
1489
1531
|
visibility: hidden;
|
|
@@ -2400,37 +2442,67 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2400
2442
|
position: relative;
|
|
2401
2443
|
z-index: 1060;
|
|
2402
2444
|
}
|
|
2445
|
+
.np-bottom-sheet-v2-backdrop-container--enter,
|
|
2446
|
+
.np-bottom-sheet-v2-backdrop-container--leave {
|
|
2447
|
+
transition-property: opacity;
|
|
2448
|
+
transition-timing-function: ease-out;
|
|
2449
|
+
transition-duration: 300ms;
|
|
2450
|
+
}
|
|
2451
|
+
.np-bottom-sheet-v2-backdrop-container--enter-from,
|
|
2452
|
+
.np-bottom-sheet-v2-backdrop-container--leave-to {
|
|
2453
|
+
opacity: 0;
|
|
2454
|
+
}
|
|
2403
2455
|
.np-bottom-sheet-v2-backdrop {
|
|
2404
2456
|
position: fixed;
|
|
2405
2457
|
inset: 0px;
|
|
2406
2458
|
background-color: #37517e;
|
|
2407
2459
|
background-color: var(--color-content-primary);
|
|
2408
2460
|
opacity: 0.4;
|
|
2409
|
-
transition-property: opacity;
|
|
2410
|
-
transition-timing-function: ease-out;
|
|
2411
|
-
transition-duration: 300ms;
|
|
2412
|
-
}
|
|
2413
|
-
.np-bottom-sheet-v2-backdrop--closed {
|
|
2414
|
-
opacity: 0;
|
|
2415
2461
|
}
|
|
2416
2462
|
.np-bottom-sheet-v2 {
|
|
2417
2463
|
position: fixed;
|
|
2418
2464
|
inset: 0px;
|
|
2419
|
-
bottom: env(keyboard-inset-height, 0px);
|
|
2420
|
-
margin-left: 8px;
|
|
2421
|
-
margin-left: var(--size-8);
|
|
2422
|
-
margin-right: 8px;
|
|
2423
|
-
margin-right: var(--size-8);
|
|
2424
|
-
margin-top: 64px;
|
|
2425
|
-
margin-top: var(--size-64);
|
|
2426
2465
|
display: flex;
|
|
2427
2466
|
flex-direction: column;
|
|
2428
2467
|
justify-content: flex-end;
|
|
2468
|
+
padding-left: 8px;
|
|
2469
|
+
padding-left: var(--size-8);
|
|
2470
|
+
padding-right: 8px;
|
|
2471
|
+
padding-right: var(--size-8);
|
|
2472
|
+
padding-top: 64px;
|
|
2473
|
+
padding-top: var(--size-64);
|
|
2429
2474
|
}
|
|
2430
2475
|
.np-bottom-sheet-v2-content {
|
|
2476
|
+
max-height: 100%;
|
|
2477
|
+
}
|
|
2478
|
+
.np-bottom-sheet-v2-content--enter,
|
|
2479
|
+
.np-bottom-sheet-v2-content--leave {
|
|
2480
|
+
transition-property: transform;
|
|
2481
|
+
transition-timing-function: ease-out;
|
|
2482
|
+
transition-duration: 300ms;
|
|
2483
|
+
}
|
|
2484
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2485
|
+
.np-bottom-sheet-v2-content--enter,
|
|
2486
|
+
.np-bottom-sheet-v2-content--leave {
|
|
2487
|
+
transition-property: opacity;
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
2491
|
+
.np-bottom-sheet-v2-content--enter-from,
|
|
2492
|
+
.np-bottom-sheet-v2-content--leave-to {
|
|
2493
|
+
transform: translateY(100%);
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2497
|
+
.np-bottom-sheet-v2-content--enter-from,
|
|
2498
|
+
.np-bottom-sheet-v2-content--leave-to {
|
|
2499
|
+
opacity: 0;
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
.np-bottom-sheet-v2-content-inner-container {
|
|
2431
2503
|
display: flex;
|
|
2504
|
+
height: 100%;
|
|
2432
2505
|
flex-direction: column;
|
|
2433
|
-
overflow: auto;
|
|
2434
2506
|
border-top-left-radius: 32px;
|
|
2435
2507
|
/* TODO: Tokenize */
|
|
2436
2508
|
border-top-right-radius: 32px;
|
|
@@ -2439,50 +2511,30 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2439
2511
|
background-color: var(--color-background-elevated);
|
|
2440
2512
|
box-shadow: 0 0 40px rgba(69, 71, 69, 0.2);
|
|
2441
2513
|
}
|
|
2442
|
-
.np-bottom-sheet-v2-content:focus {
|
|
2514
|
+
.np-bottom-sheet-v2-content-inner-container:focus {
|
|
2443
2515
|
outline: none;
|
|
2444
2516
|
}
|
|
2445
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
2446
|
-
.np-bottom-sheet-v2-content {
|
|
2447
|
-
transition-property: transform;
|
|
2448
|
-
transition-timing-function: ease-out;
|
|
2449
|
-
transition-duration: 300ms;
|
|
2450
|
-
}
|
|
2451
|
-
.np-bottom-sheet-v2-content--closed {
|
|
2452
|
-
transform: translateY(100%);
|
|
2453
|
-
}
|
|
2454
|
-
}
|
|
2455
|
-
@media (prefers-reduced-motion: reduce) {
|
|
2456
|
-
.np-bottom-sheet-v2-content {
|
|
2457
|
-
transition-property: opacity;
|
|
2458
|
-
transition-timing-function: ease-out;
|
|
2459
|
-
transition-duration: 300ms;
|
|
2460
|
-
}
|
|
2461
|
-
.np-bottom-sheet-v2-content--closed {
|
|
2462
|
-
opacity: 0;
|
|
2463
|
-
}
|
|
2464
|
-
}
|
|
2465
2517
|
.np-bottom-sheet-v2-header {
|
|
2466
2518
|
align-self: flex-end;
|
|
2467
2519
|
padding: 16px;
|
|
2468
2520
|
padding: var(--size-16);
|
|
2469
2521
|
}
|
|
2470
2522
|
.np-bottom-sheet-v2-content-inner {
|
|
2523
|
+
padding-top: 0px;
|
|
2471
2524
|
display: grid;
|
|
2472
|
-
grid-template-rows: minmax(0, 1fr);
|
|
2473
2525
|
grid-row-gap: 8px;
|
|
2474
2526
|
grid-row-gap: var(--size-8);
|
|
2475
2527
|
row-gap: 8px;
|
|
2476
2528
|
row-gap: var(--size-8);
|
|
2477
|
-
overflow: auto;
|
|
2529
|
+
overflow-y: auto;
|
|
2530
|
+
grid-template-rows: repeat(1, minmax(0, 1fr));
|
|
2478
2531
|
}
|
|
2479
2532
|
.np-bottom-sheet-v2-content-inner--has-title {
|
|
2480
|
-
grid-template-rows: auto
|
|
2533
|
+
grid-template-rows: auto 1fr;
|
|
2481
2534
|
}
|
|
2482
2535
|
.np-bottom-sheet-v2-content-inner--padding-md {
|
|
2483
2536
|
padding: 16px;
|
|
2484
2537
|
padding: var(--size-16);
|
|
2485
|
-
padding-top: 0px;
|
|
2486
2538
|
}
|
|
2487
2539
|
.np-bottom-sheet-v2-title {
|
|
2488
2540
|
color: #37517e;
|
|
@@ -2529,10 +2581,10 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2529
2581
|
row-gap: 8px;
|
|
2530
2582
|
row-gap: var(--size-8);
|
|
2531
2583
|
overflow-y: auto;
|
|
2532
|
-
grid-template-rows: minmax(0, 1fr);
|
|
2584
|
+
grid-template-rows: repeat(1, minmax(0, 1fr));
|
|
2533
2585
|
}
|
|
2534
2586
|
.np-popover-v2--has-title {
|
|
2535
|
-
grid-template-rows: auto
|
|
2587
|
+
grid-template-rows: auto 1fr;
|
|
2536
2588
|
}
|
|
2537
2589
|
.np-popover-v2--padding-md {
|
|
2538
2590
|
padding: 16px;
|
package/src/main.less
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@import "./common/card/Card.less";
|
|
14
14
|
@import "./common/closeButton/CloseButton.less";
|
|
15
15
|
@import "./common/Option/Option.less";
|
|
16
|
+
@import "./selectOption/SelectOption.less";
|
|
16
17
|
@import "./common/panel/Panel.less";
|
|
17
18
|
@import "./common/RadioButton/RadioButton.less";
|
|
18
19
|
@import "./dateInput/DateInput.less";
|