@transferwise/components 0.0.0-experimental-102c421 → 0.0.0-experimental-151e673
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/ProcessIndicator/ProcessIndicator.js +1 -1
- package/build/ProcessIndicator/ProcessIndicator.js.map +1 -1
- package/build/ProcessIndicator/ProcessIndicator.mjs +1 -1
- package/build/ProcessIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/SegmentedControl/SegmentedControl.js +9 -2
- package/build/SegmentedControl/SegmentedControl.js.map +1 -1
- package/build/SegmentedControl/SegmentedControl.mjs +9 -2
- package/build/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/build/main.css +54 -62
- package/build/styles/AvatarLayout/AvatarLayout.css +26 -9
- package/build/styles/AvatarView/AvatarView.css +0 -8
- package/build/styles/AvatarView/Dot/Dot.css +0 -8
- package/build/styles/CheckboxButton/CheckboxButton.css +0 -3
- package/build/styles/SegmentedControl/SegmentedControl.css +2 -1
- package/build/styles/SlidingPanel/SlidingPanel.css +0 -8
- package/build/styles/UploadInput/UploadItem/UploadItem.css +5 -4
- package/build/styles/_deprecated/Badge/Badge.css +2 -4
- package/build/styles/css/accordion.css +0 -3
- package/build/styles/css/buttons.css +7 -1
- package/build/styles/css/chevron.css +0 -3
- package/build/styles/css/neptune.css +19 -25
- package/build/styles/css/process.css +9 -15
- package/build/styles/css/tick.css +3 -6
- package/build/styles/main.css +54 -62
- package/build/styles/styles/less/accordion.css +0 -3
- package/build/styles/styles/less/buttons.css +7 -1
- package/build/styles/styles/less/chevron.css +0 -3
- package/build/styles/styles/less/neptune.css +19 -25
- package/build/styles/styles/less/process.css +9 -15
- package/build/styles/styles/less/tick.css +3 -6
- package/build/types/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/AvatarLayout/AvatarLayout.css +26 -9
- package/src/AvatarLayout/AvatarLayout.less +46 -22
- package/src/AvatarLayout/_stories/AvatarLayout.test.story.tsx +17 -42
- package/src/AvatarView/AvatarView.css +0 -8
- package/src/AvatarView/Dot/Dot.css +0 -8
- package/src/AvatarView/Dot/Dot.less +1 -7
- package/src/Button/_stories/Button.test.story.tsx +1 -1
- package/src/Checkbox/_stories/Checkbox.story.tsx +1 -1
- package/src/Checkbox/_stories/Checkbox.test.story.tsx +2 -3
- package/src/CheckboxButton/CheckboxButton.css +0 -3
- package/src/CheckboxButton/CheckboxButton.less +0 -4
- package/src/Chevron/_stories/Chevron.test.story.tsx +2 -2
- package/src/Field/_stories/Field.test.story.tsx +48 -37
- package/src/FlowNavigation/_stories/FlowNavigation.rtl.test.story.tsx +78 -0
- package/src/FlowNavigation/_stories/FlowNavigation.test.story.tsx +0 -44
- package/src/Header/_stories/Header.test.story.tsx +1 -1
- package/src/Info/_stories/Info.rtl.test.story.tsx +10 -35
- package/src/Info/_stories/Info.story.tsx +1 -1
- package/src/Inputs/SelectInput/_stories/SelectInput.test.story.tsx +1 -1
- package/src/Label/_stories/Label.test.story.tsx +35 -22
- package/src/ListItem/_stories/subcomponents.tsx +1 -1
- package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +1 -1
- package/src/Nudge/_stories/Nudge.test.story.tsx +12 -29
- package/src/PhoneNumberInput/_stories/{PhoneNumberInput.rtl.test.story.tsx → PhoneNumberInput.test.story.tsx} +10 -18
- package/src/Popover/_stories/Popover.rtl.test.story.tsx +40 -50
- package/src/ProcessIndicator/ProcessIndicator.tsx +1 -1
- package/src/ProgressBar/_stories/ProgressBar.test.story.tsx +19 -33
- package/src/SegmentedControl/SegmentedControl.css +2 -1
- package/src/SegmentedControl/SegmentedControl.less +4 -2
- package/src/SegmentedControl/SegmentedControl.tsx +8 -2
- package/src/SegmentedControl/_stories/SegmentedControl.test.story.tsx +16 -8
- package/src/SlidingPanel/SlidingPanel.css +0 -8
- package/src/SlidingPanel/SlidingPanel.less +0 -6
- package/src/SlidingPanel/_stories/SlidingPanel.rtl.test.story.tsx +3 -4
- package/src/Snackbar/_stories/Snackbar.rtl.test.story.tsx +16 -14
- package/src/Snackbar/_stories/Snackbar.story.tsx +1 -1
- package/src/Snackbar/_stories/Snackbar.test.story.tsx +1 -1
- package/src/StatusIcon/_stories/StatusIcon.test.story.tsx +4 -12
- package/src/UploadInput/UploadItem/UploadItem.css +5 -4
- package/src/UploadInput/UploadItem/UploadItem.less +6 -7
- package/src/UploadInput/_stories/UploadInput.test.story.tsx +1 -1
- package/src/_deprecated/Badge/Badge.css +2 -4
- package/src/_deprecated/Badge/Badge.less +14 -7
- package/src/_deprecated/CriticalBanner/_stories/CriticalCommsBanner.test.story.tsx +16 -0
- package/src/_deprecated/OverlayHeader/_stories/OverlayHeader.test.story.tsx +0 -15
- package/src/main.css +54 -62
- package/src/styles/less/accordion.css +0 -3
- package/src/styles/less/buttons.css +7 -1
- package/src/styles/less/buttons.less +11 -3
- package/src/styles/less/chevron.css +0 -3
- package/src/styles/less/chevron.less +0 -4
- package/src/styles/less/neptune.css +19 -25
- package/src/styles/less/process.css +9 -15
- package/src/styles/less/process.less +6 -13
- package/src/styles/less/tick.css +3 -6
- package/src/styles/less/tick.less +3 -7
- package/src/Loader/_stories/Loader.test.story.tsx +0 -23
- package/src/ProcessIndicator/_stories/ProcessIndicator.test.story.tsx +0 -32
|
@@ -1277,11 +1277,17 @@ input[type="button"].btn-block {
|
|
|
1277
1277
|
display: inline-flex;
|
|
1278
1278
|
align-items: center;
|
|
1279
1279
|
}
|
|
1280
|
-
.btn-loading:not(.btn-block) .btn-loader
|
|
1280
|
+
.btn-loading:not(.btn-block) .btn-loader {
|
|
1281
1281
|
margin-block-end: 0;
|
|
1282
|
+
}
|
|
1283
|
+
:not([dir="rtl"]) .btn-loading:not(.btn-block) .btn-loader {
|
|
1282
1284
|
margin-inline-start: 16px;
|
|
1283
1285
|
margin-inline-end: 0;
|
|
1284
1286
|
}
|
|
1287
|
+
[dir="rtl"] .btn-loading:not(.btn-block) .btn-loader {
|
|
1288
|
+
margin-inline-start: 0 !important;
|
|
1289
|
+
margin-inline-end: 16px !important;
|
|
1290
|
+
}
|
|
1285
1291
|
.btn-loading.btn-block .btn-loader {
|
|
1286
1292
|
inset-block-start: 0;
|
|
1287
1293
|
inset-block-end: 0;
|
|
@@ -5350,9 +5350,6 @@ tbody.collapse.in {
|
|
|
5350
5350
|
.tw-chevron.top {
|
|
5351
5351
|
transform: rotate(0deg);
|
|
5352
5352
|
}
|
|
5353
|
-
[dir="rtl"] .tw-chevron.top {
|
|
5354
|
-
transform: rotate(360deg);
|
|
5355
|
-
}
|
|
5356
5353
|
.tw-chevron.right {
|
|
5357
5354
|
transform: rotate(90deg);
|
|
5358
5355
|
}
|
|
@@ -7496,11 +7493,17 @@ input[type="button"].btn-block {
|
|
|
7496
7493
|
display: inline-flex;
|
|
7497
7494
|
align-items: center;
|
|
7498
7495
|
}
|
|
7499
|
-
.btn-loading:not(.btn-block) .btn-loader
|
|
7496
|
+
.btn-loading:not(.btn-block) .btn-loader {
|
|
7500
7497
|
margin-block-end: 0;
|
|
7498
|
+
}
|
|
7499
|
+
:not([dir="rtl"]) .btn-loading:not(.btn-block) .btn-loader {
|
|
7501
7500
|
margin-inline-start: 16px;
|
|
7502
7501
|
margin-inline-end: 0;
|
|
7503
7502
|
}
|
|
7503
|
+
[dir="rtl"] .btn-loading:not(.btn-block) .btn-loader {
|
|
7504
|
+
margin-inline-start: 0 !important;
|
|
7505
|
+
margin-inline-end: 16px !important;
|
|
7506
|
+
}
|
|
7504
7507
|
.btn-loading.btn-block .btn-loader {
|
|
7505
7508
|
inset-block-start: 0;
|
|
7506
7509
|
inset-block-end: 0;
|
|
@@ -16957,9 +16960,6 @@ button.popover-close {
|
|
|
16957
16960
|
inset-inline-start: 25%;
|
|
16958
16961
|
inset-block-start: 25%;
|
|
16959
16962
|
}
|
|
16960
|
-
[dir="rtl"] .process-icon-container {
|
|
16961
|
-
transform: rotate(45deg) scaleX(-1);
|
|
16962
|
-
}
|
|
16963
16963
|
.process-icon-horizontal,
|
|
16964
16964
|
.process-icon-vertical {
|
|
16965
16965
|
position: absolute;
|
|
@@ -17039,37 +17039,37 @@ button.popover-close {
|
|
|
17039
17039
|
.process-stopped .process-icon-container {
|
|
17040
17040
|
display: none;
|
|
17041
17041
|
}
|
|
17042
|
-
.process-
|
|
17042
|
+
.process-xs {
|
|
17043
17043
|
inline-size: 12px;
|
|
17044
17044
|
block-size: 12px;
|
|
17045
17045
|
}
|
|
17046
|
-
.process-
|
|
17046
|
+
.process-xs .process-circle {
|
|
17047
17047
|
/* Hide before animation to prevent glitching */
|
|
17048
17048
|
stroke-dashoffset: 31.41592654px;
|
|
17049
17049
|
stroke-dasharray: 31.41592654px;
|
|
17050
17050
|
stroke-width: 1.5px;
|
|
17051
17051
|
}
|
|
17052
|
-
.process-
|
|
17052
|
+
.process-xs.process-danger .process-icon-horizontal {
|
|
17053
17053
|
inset-block-start: 2.5px;
|
|
17054
17054
|
block-size: 1px;
|
|
17055
17055
|
}
|
|
17056
|
-
.process-
|
|
17056
|
+
.process-xs.process-danger .process-icon-vertical {
|
|
17057
17057
|
inset-inline-start: 2.5px;
|
|
17058
17058
|
inline-size: 1px;
|
|
17059
17059
|
}
|
|
17060
|
-
.process-
|
|
17061
|
-
.process-
|
|
17060
|
+
.process-xs .process-icon-horizontal,
|
|
17061
|
+
.process-xs .process-icon-vertical {
|
|
17062
17062
|
border-radius: 0.5px;
|
|
17063
17063
|
}
|
|
17064
|
-
.process-
|
|
17064
|
+
.process-xs.process-success .process-icon-container {
|
|
17065
17065
|
inline-size: 2.5px;
|
|
17066
17066
|
block-size: 5px;
|
|
17067
17067
|
inset-inline-start: 4.5px;
|
|
17068
17068
|
}
|
|
17069
|
-
.process-
|
|
17069
|
+
.process-xs.process-success .process-icon-horizontal {
|
|
17070
17070
|
block-size: 1px;
|
|
17071
17071
|
}
|
|
17072
|
-
.process-
|
|
17072
|
+
.process-xs.process-success .process-icon-vertical {
|
|
17073
17073
|
inline-size: 1px;
|
|
17074
17074
|
}
|
|
17075
17075
|
.process-xs {
|
|
@@ -17171,9 +17171,6 @@ button.popover-close {
|
|
|
17171
17171
|
.process-xl.process-success .process-icon-vertical {
|
|
17172
17172
|
inline-size: 8px;
|
|
17173
17173
|
}
|
|
17174
|
-
.process-xxs .process-icon-container {
|
|
17175
|
-
display: none;
|
|
17176
|
-
}
|
|
17177
17174
|
.process-xxs .process-circle {
|
|
17178
17175
|
animation-name: process-chase-circle-xxs;
|
|
17179
17176
|
}
|
|
@@ -18814,13 +18811,10 @@ a[data-toggle="tooltip"] {
|
|
|
18814
18811
|
position: absolute;
|
|
18815
18812
|
background: #ffffff;
|
|
18816
18813
|
background: var(--color-background-screen);
|
|
18817
|
-
transform: translateX(
|
|
18814
|
+
transform: translateX(0.5px) rotate(-45deg);
|
|
18818
18815
|
transform-origin: left bottom;
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
[dir="rtl"] .tw-checkbox-check::after {
|
|
18822
|
-
transform: translateX(-1.5px) rotate(-45deg) scaleX(-1);
|
|
18823
|
-
transform-origin: right bottom;
|
|
18816
|
+
inset-inline-start: 8px;
|
|
18817
|
+
inset-inline-start: var(--size-8);
|
|
18824
18818
|
}
|
|
18825
18819
|
.tw-checkbox-check .has-error::before,
|
|
18826
18820
|
.tw-checkbox-check .has-error::after {
|
|
@@ -55,9 +55,6 @@
|
|
|
55
55
|
inset-inline-start: 25%;
|
|
56
56
|
inset-block-start: 25%;
|
|
57
57
|
}
|
|
58
|
-
[dir="rtl"] .process-icon-container {
|
|
59
|
-
transform: rotate(45deg) scaleX(-1);
|
|
60
|
-
}
|
|
61
58
|
.process-icon-horizontal,
|
|
62
59
|
.process-icon-vertical {
|
|
63
60
|
position: absolute;
|
|
@@ -137,37 +134,37 @@
|
|
|
137
134
|
.process-stopped .process-icon-container {
|
|
138
135
|
display: none;
|
|
139
136
|
}
|
|
140
|
-
.process-
|
|
137
|
+
.process-xs {
|
|
141
138
|
inline-size: 12px;
|
|
142
139
|
block-size: 12px;
|
|
143
140
|
}
|
|
144
|
-
.process-
|
|
141
|
+
.process-xs .process-circle {
|
|
145
142
|
/* Hide before animation to prevent glitching */
|
|
146
143
|
stroke-dashoffset: 31.41592654px;
|
|
147
144
|
stroke-dasharray: 31.41592654px;
|
|
148
145
|
stroke-width: 1.5px;
|
|
149
146
|
}
|
|
150
|
-
.process-
|
|
147
|
+
.process-xs.process-danger .process-icon-horizontal {
|
|
151
148
|
inset-block-start: 2.5px;
|
|
152
149
|
block-size: 1px;
|
|
153
150
|
}
|
|
154
|
-
.process-
|
|
151
|
+
.process-xs.process-danger .process-icon-vertical {
|
|
155
152
|
inset-inline-start: 2.5px;
|
|
156
153
|
inline-size: 1px;
|
|
157
154
|
}
|
|
158
|
-
.process-
|
|
159
|
-
.process-
|
|
155
|
+
.process-xs .process-icon-horizontal,
|
|
156
|
+
.process-xs .process-icon-vertical {
|
|
160
157
|
border-radius: 0.5px;
|
|
161
158
|
}
|
|
162
|
-
.process-
|
|
159
|
+
.process-xs.process-success .process-icon-container {
|
|
163
160
|
inline-size: 2.5px;
|
|
164
161
|
block-size: 5px;
|
|
165
162
|
inset-inline-start: 4.5px;
|
|
166
163
|
}
|
|
167
|
-
.process-
|
|
164
|
+
.process-xs.process-success .process-icon-horizontal {
|
|
168
165
|
block-size: 1px;
|
|
169
166
|
}
|
|
170
|
-
.process-
|
|
167
|
+
.process-xs.process-success .process-icon-vertical {
|
|
171
168
|
inline-size: 1px;
|
|
172
169
|
}
|
|
173
170
|
.process-xs {
|
|
@@ -269,9 +266,6 @@
|
|
|
269
266
|
.process-xl.process-success .process-icon-vertical {
|
|
270
267
|
inline-size: 8px;
|
|
271
268
|
}
|
|
272
|
-
.process-xxs .process-icon-container {
|
|
273
|
-
display: none;
|
|
274
|
-
}
|
|
275
269
|
.process-xxs .process-circle {
|
|
276
270
|
animation-name: process-chase-circle-xxs;
|
|
277
271
|
}
|
|
@@ -10,13 +10,10 @@
|
|
|
10
10
|
position: absolute;
|
|
11
11
|
background: #ffffff;
|
|
12
12
|
background: var(--color-background-screen);
|
|
13
|
-
transform: translateX(
|
|
13
|
+
transform: translateX(0.5px) rotate(-45deg);
|
|
14
14
|
transform-origin: left bottom;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[dir="rtl"] .tw-checkbox-check::after {
|
|
18
|
-
transform: translateX(-1.5px) rotate(-45deg) scaleX(-1);
|
|
19
|
-
transform-origin: right bottom;
|
|
15
|
+
inset-inline-start: 8px;
|
|
16
|
+
inset-inline-start: var(--size-8);
|
|
20
17
|
}
|
|
21
18
|
.tw-checkbox-check .has-error::before,
|
|
22
19
|
.tw-checkbox-check .has-error::after {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../src/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../src/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AAOA,KAAK,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,KAAK,OAAO,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAClD,KAAK,mBAAmB,GAAG,WAAW,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,SAAS,OAAO,EAAE,GAAG,SAAS,mBAAmB,EAAE,CAAC;AAE3E,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAC1C,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAC3D,CAAC,yBAAyB,GAAG,0BAA0B,CAAC,CAAC;AAE3D,QAAA,MAAM,gBAAgB,GAAI,4CAMvB,qBAAqB,gCAqIvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,35 +8,52 @@
|
|
|
8
8
|
block-size: var(--np-avatar-layout-size);
|
|
9
9
|
}
|
|
10
10
|
.np-avatar-layout-diagonal-mask {
|
|
11
|
+
--np-avatar-layout-mask-direction: right;
|
|
11
12
|
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) right calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
12
13
|
mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) right calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
14
|
+
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) var(--np-avatar-layout-mask-direction) calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
15
|
+
mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) var(--np-avatar-layout-mask-direction) calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
13
16
|
}
|
|
14
17
|
[dir="rtl"] .np-avatar-layout-diagonal-mask {
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
--np-avatar-layout-mask-direction: left;
|
|
19
|
+
margin-inline-start: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
20
|
+
margin-inline-end: unset;
|
|
17
21
|
}
|
|
18
22
|
.np-avatar-layout-diagonal-child {
|
|
19
23
|
margin-inline-start: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
20
24
|
margin-block-start: calc(var(--np-avatar-layout-size) - var(--np-avatar-size));
|
|
21
25
|
}
|
|
22
26
|
[dir="rtl"] .np-avatar-layout-diagonal-child {
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
-webkit-mask-image: initial;
|
|
28
|
+
mask-image: initial;
|
|
25
29
|
}
|
|
26
30
|
.np-avatar-layout-horizontal {
|
|
31
|
+
--np-avatar-layout-mask-direction: left;
|
|
27
32
|
inline-size: calc(var(--np-avatar-size) * var(--np-avatar-avatars-count) - (var(--np-avatar-offset) * (var(--np-avatar-avatars-count) - 1)));
|
|
28
33
|
inline-size: calc(var(--np-avatar-size) * var(--np-avatar-avatars-count) - calc(var(--np-avatar-offset) * calc(var(--np-avatar-avatars-count) - 1)));
|
|
29
34
|
block-size: var(--np-avatar-layout-size);
|
|
30
35
|
}
|
|
31
|
-
.np-avatar-layout-horizontal
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
[dir="rtl"] .np-avatar-layout-horizontal {
|
|
37
|
+
--np-avatar-layout-mask-direction: right;
|
|
38
|
+
}
|
|
39
|
+
.np-avatar-layout-horizontal-mask,
|
|
40
|
+
[dir="rtl"] .np-avatar-layout-horizontal-child {
|
|
41
|
+
-webkit-mask-image: radial-gradient(circle at top calc(100% - (var(--np-avatar-size) / 2)) var(--np-avatar-layout-mask-direction) calc(100% + (var(--np-avatar-size) / 2) - var(--np-avatar-offset)), transparent, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
42
|
+
mask-image: radial-gradient(circle at top calc(100% - (var(--np-avatar-size) / 2)) var(--np-avatar-layout-mask-direction) calc(100% + (var(--np-avatar-size) / 2) - var(--np-avatar-offset)), transparent, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
43
|
+
-webkit-mask-image: radial-gradient(circle at top calc(100% - calc(var(--np-avatar-size) / 2)) var(--np-avatar-layout-mask-direction) calc(100% + calc(var(--np-avatar-size) / 2) - var(--np-avatar-offset)), transparent, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
44
|
+
mask-image: radial-gradient(circle at top calc(100% - calc(var(--np-avatar-size) / 2)) var(--np-avatar-layout-mask-direction) calc(100% + calc(var(--np-avatar-size) / 2) - var(--np-avatar-offset)), transparent, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
45
|
+
}
|
|
46
|
+
[dir="rtl"] .np-avatar-layout-horizontal-mask {
|
|
47
|
+
margin-inline-end: calc(var(--np-avatar-offset) * -1);
|
|
48
|
+
}
|
|
49
|
+
[dir="rtl"] .np-avatar-layout-horizontal-mask:last-child {
|
|
50
|
+
-webkit-mask-image: initial;
|
|
51
|
+
mask-image: initial;
|
|
36
52
|
}
|
|
37
53
|
.np-avatar-layout-horizontal-child {
|
|
38
54
|
margin-inline-start: calc(var(--np-avatar-offset) * -1);
|
|
39
55
|
}
|
|
40
56
|
[dir="rtl"] .np-avatar-layout-horizontal-child {
|
|
57
|
+
margin-inline-start: unset;
|
|
41
58
|
margin-inline-end: calc(var(--np-avatar-offset) * -1);
|
|
42
59
|
}
|
|
@@ -8,18 +8,20 @@
|
|
|
8
8
|
height: var(--np-avatar-layout-size);
|
|
9
9
|
|
|
10
10
|
&-mask {
|
|
11
|
-
mask-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
--np-avatar-layout-mask-direction: right;
|
|
12
|
+
mask-image: radial-gradient(
|
|
13
|
+
circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset))
|
|
14
|
+
var(--np-avatar-layout-mask-direction)
|
|
15
|
+
calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)),
|
|
16
|
+
transparent 0,
|
|
17
|
+
transparent calc(var(--np-avatar-size) / 2 + 2px),
|
|
18
|
+
black 0
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
[dir="rtl"] & {
|
|
22
|
+
--np-avatar-layout-mask-direction: left;
|
|
23
|
+
margin-left: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
24
|
+
margin-right: unset;
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
|
|
@@ -27,30 +29,52 @@
|
|
|
27
29
|
margin-left: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
28
30
|
margin-top: calc(var(--np-avatar-layout-size) - var(--np-avatar-size));
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
margin-right: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
32
|
+
[dir="rtl"] & {
|
|
33
|
+
mask-image: unset;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
&-horizontal {
|
|
38
|
-
|
|
39
|
+
--np-avatar-layout-mask-direction: left;
|
|
40
|
+
width: calc(
|
|
41
|
+
var(--np-avatar-size) * var(--np-avatar-avatars-count) -
|
|
42
|
+
calc(var(--np-avatar-offset) * calc(var(--np-avatar-avatars-count) - 1))
|
|
43
|
+
);
|
|
39
44
|
height: var(--np-avatar-layout-size);
|
|
40
45
|
|
|
46
|
+
[dir="rtl"] & {
|
|
47
|
+
--np-avatar-layout-mask-direction: right;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&-mask,
|
|
51
|
+
[dir="rtl"] &-child {
|
|
52
|
+
mask-image: radial-gradient(
|
|
53
|
+
circle at top calc(100% - calc(var(--np-avatar-size) / 2))
|
|
54
|
+
var(--np-avatar-layout-mask-direction)
|
|
55
|
+
calc(100% + calc(var(--np-avatar-size) / 2) - var(--np-avatar-offset)),
|
|
56
|
+
transparent,
|
|
57
|
+
transparent calc(var(--np-avatar-size) / 2 + 2px),
|
|
58
|
+
black 0
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
41
62
|
&-mask {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
63
|
+
[dir="rtl"] & {
|
|
64
|
+
&:last-child {
|
|
65
|
+
mask-image: unset;
|
|
66
|
+
}
|
|
67
|
+
margin-right: calc(var(--np-avatar-offset) * -1);
|
|
68
|
+
}
|
|
46
69
|
}
|
|
47
70
|
|
|
48
71
|
&-child {
|
|
49
72
|
margin-left: calc(var(--np-avatar-offset) * -1);
|
|
50
73
|
|
|
51
|
-
|
|
74
|
+
[dir="rtl"] & {
|
|
75
|
+
margin-left: unset;
|
|
52
76
|
margin-right: calc(var(--np-avatar-offset) * -1);
|
|
53
77
|
}
|
|
54
78
|
}
|
|
55
79
|
}
|
|
56
|
-
}
|
|
80
|
+
}
|
|
@@ -117,27 +117,26 @@ export const EdgeInstances: Story = {
|
|
|
117
117
|
),
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
+
const horizontalSizes = [16, 24, 32, 40, 48, 56, 72, 88, 96] as const;
|
|
121
|
+
const diagonalSizes = [24, 32, 40, 48, 56, 72, 88, 96] as const;
|
|
122
|
+
|
|
123
|
+
const rowStyle = { display: 'flex', alignItems: 'center', gap: '16px', flexWrap: 'wrap' } as const;
|
|
124
|
+
const twoAvatars = [{ asset: <Plane /> }, { asset: <Plane /> }] as const;
|
|
125
|
+
|
|
120
126
|
export const RTLDiff: Story = {
|
|
121
127
|
render: () => (
|
|
122
128
|
<>
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<AvatarLayout
|
|
130
|
-
orientation="horizontal"
|
|
131
|
-
size={48}
|
|
132
|
-
interactive
|
|
133
|
-
avatars={[{ asset: <Freeze /> }, { asset: <Freeze /> }]}
|
|
134
|
-
/>
|
|
129
|
+
<div style={rowStyle}>
|
|
130
|
+
{horizontalSizes.map((size) => (
|
|
131
|
+
<AvatarLayout key={size} orientation="horizontal" size={size} avatars={[...twoAvatars]} />
|
|
132
|
+
))}
|
|
133
|
+
</div>
|
|
135
134
|
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
<div style={rowStyle}>
|
|
136
|
+
{diagonalSizes.map((size) => (
|
|
137
|
+
<AvatarLayout key={size} orientation="diagonal" size={size} avatars={[...twoAvatars]} />
|
|
138
|
+
))}
|
|
139
|
+
</div>
|
|
141
140
|
|
|
142
141
|
<AvatarLayout
|
|
143
142
|
orientation="horizontal"
|
|
@@ -148,32 +147,8 @@ export const RTLDiff: Story = {
|
|
|
148
147
|
|
|
149
148
|
<AvatarLayout
|
|
150
149
|
orientation="horizontal"
|
|
151
|
-
size={32}
|
|
152
|
-
avatars={[{ asset: <Flag code="eu" /> }, { asset: <Flag code="gb" /> }]}
|
|
153
|
-
/>
|
|
154
|
-
|
|
155
|
-
<AvatarLayout
|
|
156
|
-
orientation="horizontal"
|
|
157
|
-
size={72}
|
|
158
|
-
avatars={[{ asset: <Freeze /> }, { asset: <Freeze /> }, { asset: <Freeze /> }]}
|
|
159
|
-
/>
|
|
160
|
-
|
|
161
|
-
<AvatarLayout
|
|
162
|
-
orientation="diagonal"
|
|
163
|
-
size={48}
|
|
164
|
-
avatars={[{ asset: <Flag code="br" /> }, { asset: <Flag code="jp" /> }]}
|
|
165
|
-
/>
|
|
166
|
-
|
|
167
|
-
<AvatarLayout
|
|
168
|
-
orientation="diagonal"
|
|
169
|
-
size={48}
|
|
170
|
-
avatars={[{ profileName: 'Jay Jay' }, { profileName: 'Amy Amy' }]}
|
|
171
|
-
/>
|
|
172
|
-
|
|
173
|
-
<AvatarLayout
|
|
174
|
-
orientation="diagonal"
|
|
175
150
|
size={72}
|
|
176
|
-
avatars={[{ asset: <
|
|
151
|
+
avatars={[{ asset: <Plane /> }, { asset: <Plane /> }, { asset: <Plane /> }]}
|
|
177
152
|
/>
|
|
178
153
|
</>
|
|
179
154
|
),
|
|
@@ -4,18 +4,10 @@
|
|
|
4
4
|
display: inline-block;
|
|
5
5
|
}
|
|
6
6
|
.np-dot-mask {
|
|
7
|
-
--np-dot-h-side: left;
|
|
8
7
|
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) left calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
9
8
|
mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) left calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
10
|
-
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
11
|
-
mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
12
9
|
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
13
10
|
mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
14
|
-
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
15
|
-
mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
16
|
-
}
|
|
17
|
-
[dir="rtl"] .np-dot-mask {
|
|
18
|
-
--np-dot-h-side: right;
|
|
19
11
|
}
|
|
20
12
|
.np-dot-badge {
|
|
21
13
|
position: absolute;
|
|
@@ -4,18 +4,10 @@
|
|
|
4
4
|
display: inline-block;
|
|
5
5
|
}
|
|
6
6
|
.np-dot-mask {
|
|
7
|
-
--np-dot-h-side: left;
|
|
8
7
|
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) left calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
9
8
|
mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) left calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
10
|
-
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
11
|
-
mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
12
9
|
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
13
10
|
mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
14
|
-
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
15
|
-
mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
|
|
16
|
-
}
|
|
17
|
-
[dir="rtl"] .np-dot-mask {
|
|
18
|
-
--np-dot-h-side: right;
|
|
19
11
|
}
|
|
20
12
|
.np-dot-badge {
|
|
21
13
|
position: absolute;
|
|
@@ -4,14 +4,8 @@
|
|
|
4
4
|
display: inline-block;
|
|
5
5
|
|
|
6
6
|
&-mask {
|
|
7
|
-
--np-dot-h-side: left;
|
|
8
|
-
|
|
9
|
-
[dir="rtl"] & {
|
|
10
|
-
--np-dot-h-side: right;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
7
|
mask-image: radial-gradient(
|
|
14
|
-
circle at bottom calc(100% - calc(var(--np-dot-size) / 2))
|
|
8
|
+
circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left
|
|
15
9
|
calc(100% - calc(var(--np-dot-size) / 2)),
|
|
16
10
|
transparent 0,
|
|
17
11
|
transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)),
|
|
@@ -34,7 +34,7 @@ const buttonPriorities = ['primary', 'secondary', 'secondary-neutral', 'tertiary
|
|
|
34
34
|
const buttonSizes = ['sm', 'md', 'lg'] as const;
|
|
35
35
|
export const AllVariants: Story = {
|
|
36
36
|
tags: ['!autodocs'],
|
|
37
|
-
...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green'], {
|
|
37
|
+
...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green', 'rtl'], {
|
|
38
38
|
parameters: {
|
|
39
39
|
padding: '0',
|
|
40
40
|
},
|
|
@@ -30,7 +30,7 @@ export const MultipleMobile: Story = {
|
|
|
30
30
|
</>
|
|
31
31
|
);
|
|
32
32
|
},
|
|
33
|
-
...withVariantConfig(['default', 'dark', 'mobile']),
|
|
33
|
+
...withVariantConfig(['default', 'dark', 'rtl', 'mobile']),
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -41,9 +41,8 @@ export const MultipleMobile: Story = {
|
|
|
41
41
|
export const RTLDiff: Story = {
|
|
42
42
|
render: () => (
|
|
43
43
|
<>
|
|
44
|
-
<Checkbox
|
|
44
|
+
<Checkbox label="Label only" onChange={() => {}} />
|
|
45
45
|
<Checkbox
|
|
46
|
-
checked
|
|
47
46
|
label="Label with secondary"
|
|
48
47
|
secondary="Secondary description text"
|
|
49
48
|
onChange={() => {}}
|
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
background: var(--color-background-screen);
|
|
33
33
|
transform: translate(-50%, -50%);
|
|
34
34
|
}
|
|
35
|
-
[dir="rtl"] .np-tw-checkbox-indeterminate::after {
|
|
36
|
-
transform: translate(50%, -50%);
|
|
37
|
-
}
|
|
38
35
|
.np-tw-checkbox-indeterminate .has-error::after {
|
|
39
36
|
background-color: #e74848;
|
|
40
37
|
background-color: var(--color-interactive-negative);
|
|
@@ -17,10 +17,10 @@ type Story = StoryObj<typeof Chevron>;
|
|
|
17
17
|
*/
|
|
18
18
|
export const RTLDiff: Story = {
|
|
19
19
|
render: () => (
|
|
20
|
-
|
|
20
|
+
<div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
|
|
21
21
|
<Chevron orientation="left" size="md" />
|
|
22
22
|
<Chevron orientation="right" size="md" />
|
|
23
|
-
|
|
23
|
+
</div>
|
|
24
24
|
),
|
|
25
25
|
...withRTLDiff(),
|
|
26
26
|
};
|