@transferwise/components 0.0.0-experimental-696128b → 0.0.0-experimental-328f2cc
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/avatarLayout/AvatarLayout.js +4 -10
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +4 -10
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/button/Button.js +79 -81
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +80 -82
- package/build/button/Button.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +2 -2
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +1 -1
- package/build/header/Header.js +2 -2
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +1 -1
- package/build/index.js +4 -2
- package/build/index.js.map +1 -1
- package/build/index.mjs +2 -1
- package/build/index.mjs.map +1 -1
- package/build/link/Link.js +3 -8
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +3 -8
- package/build/link/Link.mjs.map +1 -1
- package/build/main.css +13 -224
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js +3 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js.map +1 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs +3 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js +4 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js.map +1 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs +4 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs.map +1 -1
- package/build/select/Select.js +2 -2
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +1 -1
- package/build/styles/avatarLayout/AvatarLayout.css +2 -12
- package/build/styles/button/Button.css +15 -204
- package/build/styles/main.css +13 -224
- package/build/styles/nudge/Nudge.css +11 -0
- package/build/table/Table.js +166 -0
- package/build/table/Table.js.map +1 -0
- package/build/table/Table.messages.js +24 -0
- package/build/table/Table.messages.js.map +1 -0
- package/build/table/Table.messages.mjs +22 -0
- package/build/table/Table.messages.mjs.map +1 -0
- package/build/table/Table.mjs +164 -0
- package/build/table/Table.mjs.map +1 -0
- package/build/table/TableCell.js +86 -0
- package/build/table/TableCell.js.map +1 -0
- package/build/table/TableCell.mjs +84 -0
- package/build/table/TableCell.mjs.map +1 -0
- package/build/table/TableHeader.js +57 -0
- package/build/table/TableHeader.js.map +1 -0
- package/build/table/TableHeader.mjs +55 -0
- package/build/table/TableHeader.mjs.map +1 -0
- package/build/table/TableRow.js +85 -0
- package/build/table/TableRow.js.map +1 -0
- package/build/table/TableRow.mjs +83 -0
- package/build/table/TableRow.mjs.map +1 -0
- package/build/table/TableStatusText.js +54 -0
- package/build/table/TableStatusText.js.map +1 -0
- package/build/table/TableStatusText.mjs +52 -0
- package/build/table/TableStatusText.mjs.map +1 -0
- package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
- package/build/types/button/Button.d.ts +23 -2
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/index.d.ts +2 -2
- package/build/types/button/index.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/link/Link.d.ts +2 -2
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/nudge/Nudge.d.ts +1 -1
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts +2 -6
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveButton/src/PrimitiveButton.d.ts.map +1 -1
- package/build/types/test-utils/story-config.d.ts +1 -1
- package/build/types/test-utils/story-config.d.ts.map +1 -1
- package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +2 -2
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -1
- package/build/upload/steps/processingStep/processingStep.js +2 -2
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -1
- package/build/uploadInput/UploadInput.js +3 -3
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -1
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js +23 -3
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js.map +1 -1
- package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs +23 -3
- package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs.map +1 -1
- package/package.json +3 -3
- package/src/alert/Alert.tests.story.tsx +1 -1
- package/src/avatarLayout/AvatarLayout.css +2 -12
- package/src/avatarLayout/AvatarLayout.less +2 -19
- package/src/avatarLayout/AvatarLayout.tsx +3 -10
- package/src/button/Button.css +15 -204
- package/src/button/Button.less +14 -211
- package/src/button/Button.spec.tsx +227 -75
- package/src/button/Button.story.tsx +135 -728
- package/src/button/Button.tsx +131 -94
- package/src/button/__snapshots__/Button.spec.tsx.snap +309 -0
- package/src/button/index.ts +3 -2
- package/src/drawer/Drawer.spec.tsx +93 -0
- package/src/field/Field.story.tsx +1 -1
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +1 -1
- package/src/index.ts +12 -0
- package/src/inputs/SelectInput.story.tsx +1 -1
- package/src/label/Label.story.tsx +1 -1
- package/src/link/Link.tsx +6 -15
- package/src/main.css +13 -224
- package/src/main.less +0 -1
- package/src/nudge/Nudge.css +11 -0
- package/src/nudge/Nudge.less +3 -0
- package/src/nudge/Nudge.story.tsx +10 -0
- package/src/nudge/Nudge.tsx +2 -1
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.tsx +7 -1
- package/src/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.ts +2 -7
- package/src/primitives/PrimitiveAnchor/test/PrimitiveAnchor.spec.tsx +3 -1
- package/src/primitives/PrimitiveButton/src/PrimitiveButton.tsx +8 -1
- package/src/primitives/PrimitiveButton/test/PrimitiveButton.spec.tsx +5 -2
- package/src/test-utils/Parameters.d.ts +1 -9
- package/src/test-utils/story-config.ts +1 -10
- package/src/uploadInput/UploadInput.tests.story.tsx +5 -5
- package/src/uploadInput/uploadButton/getAllowedFileTypes.spec.ts +12 -0
- package/src/uploadInput/uploadButton/getAllowedFileTypes.ts +33 -7
- package/build/button/Button.resolver.js +0 -74
- package/build/button/Button.resolver.js.map +0 -1
- package/build/button/Button.resolver.mjs +0 -72
- package/build/button/Button.resolver.mjs.map +0 -1
- package/build/button/LegacyButton.js +0 -114
- package/build/button/LegacyButton.js.map +0 -1
- package/build/button/LegacyButton.mjs +0 -112
- package/build/button/LegacyButton.mjs.map +0 -1
- package/build/styles/button/Button.vars.css +0 -39
- package/build/styles/button/LegacyButton.css +0 -23
- package/build/types/button/Button.resolver.d.ts +0 -33
- package/build/types/button/Button.resolver.d.ts.map +0 -1
- package/build/types/button/Button.types.d.ts +0 -58
- package/build/types/button/Button.types.d.ts.map +0 -1
- package/build/types/button/LegacyButton.d.ts +0 -30
- package/build/types/button/LegacyButton.d.ts.map +0 -1
- package/src/button/Button.resolver.tsx +0 -73
- package/src/button/Button.tests.story.tsx +0 -27
- package/src/button/Button.types.ts +0 -74
- package/src/button/Button.vars.css +0 -39
- package/src/button/Button.vars.less +0 -50
- package/src/button/LegacyButton.css +0 -23
- package/src/button/LegacyButton.less +0 -24
- package/src/button/LegacyButton.spec.tsx +0 -147
- package/src/button/LegacyButton.story.tsx +0 -225
- package/src/button/LegacyButton.tsx +0 -160
- package/src/drawer/Drawer.rtl.spec.tsx +0 -59
- package/src/drawer/Drawer.spec.js +0 -101
- package/src/drawer/__snapshots__/Drawer.rtl.spec.tsx.snap +0 -55
|
@@ -1,212 +1,23 @@
|
|
|
1
|
-
.
|
|
2
|
-
--Button-background: var(--color-interactive-accent);
|
|
3
|
-
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
4
|
-
--Button-background-active: var(--color-interactive-accent-active);
|
|
5
|
-
--Button-color: var(--color-interactive-control);
|
|
6
|
-
--Button-border-radius: var(--radius-full);
|
|
7
|
-
--Button-label-gap: var(--size-4);
|
|
8
|
-
--Button-large-padding: var(--size-12) var(--size-16);
|
|
9
|
-
--Button-medium-padding: var(--size-8) var(--size-12);
|
|
10
|
-
--Button-small-padding: calc(var(--size-10) * 0.5) var(--size-12);
|
|
11
|
-
--Button-avatar-border-color: var(--color-border-neutral);
|
|
12
|
-
--Button-transition-duration: 150ms;
|
|
13
|
-
--Button-transition-easing: ease-in-out;
|
|
14
|
-
--Button-secondary-background: var(--color-interactive-neutral);
|
|
15
|
-
--Button-secondary-background-hover: var(--color-interactive-neutral-hover);
|
|
16
|
-
--Button-secondary-background-active: var(--color-interactive-neutral-active);
|
|
17
|
-
--Button-secondary-color: var(--color-interactive-primary);
|
|
18
|
-
--Button-tertiary-background: var(--color-background-neutral);
|
|
19
|
-
--Button-tertiary-background-hover: var(--color-background-neutral-hover);
|
|
20
|
-
--Button-tertiary-background-active: var(--color-background-neutral-active);
|
|
21
|
-
--Button-tertiary-color: var(--color-content-primary);
|
|
22
|
-
--Button-minimal-background: transparent;
|
|
23
|
-
--Button-minimal-background-hover: var(--color-background-screen-hover);
|
|
24
|
-
--Button-minimal-background-active: var(--color-background-screen-active);
|
|
25
|
-
--Button-minimal-color: var(--color-interactive-primary);
|
|
26
|
-
--Button-primary-negative-background: var(--color-sentiment-negative-primary);
|
|
27
|
-
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
28
|
-
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
29
|
-
--Button-primary-negative-color: var(--color-contrast);
|
|
30
|
-
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
31
|
-
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
32
|
-
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
33
|
-
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
34
|
-
}
|
|
35
|
-
.np-theme-personal--bright-green .wds-Button {
|
|
36
|
-
--color-contrast: #FFFFFF;
|
|
37
|
-
--Button-secondary-color: var(--color-interactive-control);
|
|
38
|
-
--Button-secondary-negative-color: var(--color-contrast);
|
|
39
|
-
}
|
|
40
|
-
/* Button Styles */
|
|
41
|
-
.wds-Button {
|
|
42
|
-
display: inline-flex;
|
|
43
|
-
flex: none;
|
|
44
|
-
width: auto;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
vertical-align: middle;
|
|
48
|
-
text-align: center;
|
|
49
|
-
-webkit-text-decoration: none;
|
|
50
|
-
text-decoration: none;
|
|
51
|
-
white-space: nowrap;
|
|
52
|
-
word-wrap: break-word;
|
|
53
|
-
-webkit-appearance: none;
|
|
54
|
-
-moz-appearance: none;
|
|
55
|
-
appearance: none;
|
|
56
|
-
background-color: var(--Button-background);
|
|
57
|
-
border: none;
|
|
58
|
-
border-radius: var(--Button-border-radius);
|
|
59
|
-
color: var(--Button-color);
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
transition: color, background-color var(--Button-transition-duration) var(--Button-transition-easing);
|
|
62
|
-
}
|
|
63
|
-
.wds-Button:hover {
|
|
64
|
-
background-color: var(--Button-background-hover);
|
|
65
|
-
}
|
|
66
|
-
.wds-Button:active {
|
|
67
|
-
background-color: var(--Button-background-active);
|
|
68
|
-
}
|
|
69
|
-
.wds-Button.wds-Button--disabled,
|
|
70
|
-
.wds-Button:disabled {
|
|
71
|
-
mix-blend-mode: luminosity;
|
|
72
|
-
opacity: 0.45;
|
|
73
|
-
cursor: not-allowed;
|
|
74
|
-
}
|
|
75
|
-
.wds-Button.wds-Button--disabled:hover,
|
|
76
|
-
.wds-Button:disabled:hover,
|
|
77
|
-
.wds-Button.wds-Button--disabled:active,
|
|
78
|
-
.wds-Button:disabled:active {
|
|
79
|
-
background-color: var(--Button-background);
|
|
80
|
-
}
|
|
81
|
-
.wds-Button--secondary {
|
|
82
|
-
--Button-background: var(--Button-secondary-background);
|
|
83
|
-
--Button-background-hover: var(--Button-secondary-background-hover);
|
|
84
|
-
--Button-background-active: var(--Button-secondary-background-active);
|
|
85
|
-
--Button-color: var(--Button-secondary-color);
|
|
86
|
-
}
|
|
87
|
-
.wds-Button--tertiary {
|
|
88
|
-
--Button-background: var(--Button-tertiary-background);
|
|
89
|
-
--Button-background-hover: var(--Button-tertiary-background-hover);
|
|
90
|
-
--Button-background-active: var(--Button-tertiary-background-active);
|
|
91
|
-
--Button-color: var(--Button-tertiary-color);
|
|
92
|
-
}
|
|
93
|
-
.wds-Button--tertiary .wds-Button-icon--end {
|
|
94
|
-
color: var(--color-interactive-primary);
|
|
95
|
-
}
|
|
96
|
-
.wds-Button--minimal {
|
|
97
|
-
--Button-background: var(--Button-minimal-background);
|
|
98
|
-
--Button-background-hover: var(--Button-minimal-background-hover);
|
|
99
|
-
--Button-background-active: var(--Button-minimal-background-active);
|
|
100
|
-
--Button-color: var(--Button-minimal-color);
|
|
101
|
-
-webkit-text-decoration: underline;
|
|
102
|
-
text-decoration: underline;
|
|
103
|
-
text-underline-offset: 3px;
|
|
104
|
-
text-decoration-thickness: 1px;
|
|
105
|
-
}
|
|
106
|
-
.wds-Button--negative.wds-Button--primary {
|
|
107
|
-
--Button-background: var(--Button-primary-negative-background);
|
|
108
|
-
--Button-background-hover: var(--Button-primary-negative-background-hover);
|
|
109
|
-
--Button-background-active: var(--Button-primary-negative-background-active);
|
|
110
|
-
--Button-color: var(--Button-primary-negative-color);
|
|
111
|
-
}
|
|
112
|
-
.wds-Button--negative.wds-Button--secondary {
|
|
113
|
-
--Button-background: var(--Button-secondary-negative-background);
|
|
114
|
-
--Button-background-hover: var(--Button-secondary-negative-background-hover);
|
|
115
|
-
--Button-background-active: var(--Button-secondary-negative-background-active);
|
|
116
|
-
--Button-color: var(--Button-secondary-negative-color);
|
|
117
|
-
}
|
|
118
|
-
.wds-Button--large {
|
|
119
|
-
padding: var(--Button-large-padding);
|
|
120
|
-
}
|
|
121
|
-
.wds-Button--medium {
|
|
122
|
-
padding: var(--Button-medium-padding);
|
|
123
|
-
}
|
|
124
|
-
.wds-Button--medium:has(.wds-Button-avatars) {
|
|
125
|
-
padding-inline-start: 8px;
|
|
126
|
-
padding-inline-start: var(--size-8);
|
|
127
|
-
}
|
|
128
|
-
.wds-Button--medium:has(.wds-Button-icon--end) {
|
|
129
|
-
padding-inline-end: 8px;
|
|
130
|
-
padding-inline-end: var(--size-8);
|
|
131
|
-
}
|
|
132
|
-
.wds-Button--medium .wds-Button-icon--start {
|
|
133
|
-
margin-inline-end: var(--Button-label-gap);
|
|
134
|
-
}
|
|
135
|
-
.wds-Button--small {
|
|
136
|
-
padding: var(--Button-small-padding);
|
|
137
|
-
}
|
|
138
|
-
.wds-Button--small:has(.wds-Button-icon--start) {
|
|
139
|
-
padding-inline-start: 8px;
|
|
140
|
-
padding-inline-start: var(--size-8);
|
|
141
|
-
}
|
|
142
|
-
.wds-Button--small:has(.wds-Button-icon--end) {
|
|
143
|
-
padding-inline-end: 8px;
|
|
144
|
-
padding-inline-end: var(--size-8);
|
|
145
|
-
}
|
|
146
|
-
.wds-Button--block {
|
|
147
|
-
width: 100%;
|
|
148
|
-
}
|
|
149
|
-
.wds-Button-avatars {
|
|
150
|
-
display: inline-flex;
|
|
151
|
-
}
|
|
152
|
-
.wds-Button-avatars .np-avatar-view .np-avatar-view-content {
|
|
153
|
-
color: var(--Button-color);
|
|
154
|
-
}
|
|
155
|
-
.wds-Button-icon {
|
|
156
|
-
display: inline-block;
|
|
157
|
-
}
|
|
158
|
-
.wds-Button-content {
|
|
159
|
-
position: relative;
|
|
160
|
-
}
|
|
161
|
-
.wds-Button-content--loading .wds-Button-label,
|
|
162
|
-
.wds-Button-content--loading .wds-Button-media,
|
|
163
|
-
.wds-Button-content--loading .wds-Button-icon {
|
|
164
|
-
visibility: hidden;
|
|
165
|
-
opacity: 0;
|
|
166
|
-
}
|
|
167
|
-
.wds-Button-label {
|
|
168
|
-
display: flex;
|
|
169
|
-
justify-content: center;
|
|
170
|
-
align-items: center;
|
|
171
|
-
gap: var(--Button-label-gap);
|
|
1
|
+
.np-btn {
|
|
172
2
|
position: relative;
|
|
173
3
|
}
|
|
174
|
-
.
|
|
4
|
+
.np-btn.np-btn-block > span.btn-loader {
|
|
175
5
|
position: absolute;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
align-items: center;
|
|
179
|
-
width: 100%;
|
|
180
|
-
height: 100%;
|
|
181
|
-
}
|
|
182
|
-
.wds-Button-loader .process-circle {
|
|
183
|
-
stroke: var(--Button-color);
|
|
184
|
-
}
|
|
185
|
-
/* RTL Styles */
|
|
186
|
-
[dir="rtl"] .wds-Button .tw-icon-chevron-right,[dir="rtl"] .wds-Button .tw-icon-arrow-right {
|
|
187
|
-
transform: rotate(180deg);
|
|
188
|
-
}
|
|
189
|
-
[dir="rtl"] .wds-Button .tw-icon-chevron-left,[dir="rtl"] .wds-Button .tw-icon-arrow-left {
|
|
190
|
-
transform: rotate(180deg);
|
|
6
|
+
left: 24px;
|
|
7
|
+
left: var(--size-24);
|
|
191
8
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
9
|
+
[dir="rtl"] .np-btn.np-btn-block > span.btn-loader {
|
|
10
|
+
right: 24px;
|
|
11
|
+
right: var(--size-24);
|
|
12
|
+
left: auto;
|
|
13
|
+
left: initial;
|
|
196
14
|
}
|
|
197
|
-
.np-
|
|
198
|
-
|
|
199
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--tertiary .wds-Button-avatars .np-circle,
|
|
200
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
201
|
-
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
15
|
+
.np-btn.np-btn-xs > span.btn-loader {
|
|
16
|
+
background-size: 16px 16px;
|
|
202
17
|
}
|
|
203
|
-
.np-
|
|
204
|
-
|
|
205
|
-
.np-theme-personal--forest-green .wds-Button--primary .wds-Button-avatars .np-circle,
|
|
206
|
-
.np-theme-personal--forest-green .wds-Button--primary.wds-Button--negative .wds-Button-avatars .np-circle {
|
|
207
|
-
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
18
|
+
.np-btn.np-btn-xs.btn-block > span.btn-loader {
|
|
19
|
+
top: 0;
|
|
208
20
|
}
|
|
209
|
-
.np-
|
|
210
|
-
|
|
211
|
-
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
21
|
+
.np-btn.disabled[class] {
|
|
22
|
+
pointer-events: auto;
|
|
212
23
|
}
|
package/build/styles/main.css
CHANGED
|
@@ -518,20 +518,13 @@ div.critical-comms .critical-comms-body {
|
|
|
518
518
|
-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);
|
|
519
519
|
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);
|
|
520
520
|
}
|
|
521
|
-
[dir="rtl"] .np-avatar-layout-diagonal-mask {
|
|
522
|
-
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) left calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
523
|
-
mask-image: radial-gradient(circle at bottom calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)) left calc(100% - var(--np-avatar-size) - var(--np-avatar-offset)), transparent 0, transparent calc(var(--np-avatar-size) / 2 + 2px), black 0);
|
|
524
|
-
}
|
|
525
521
|
.np-avatar-layout-diagonal-child {
|
|
526
522
|
margin-left: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
527
523
|
margin-top: calc(var(--np-avatar-layout-size) - var(--np-avatar-size));
|
|
528
524
|
}
|
|
529
|
-
[dir="rtl"] .np-avatar-layout-diagonal-child {
|
|
530
|
-
margin-left: 0;
|
|
531
|
-
margin-right: calc(var(--np-avatar-layout-size) - var(--np-avatar-size) * 2);
|
|
532
|
-
}
|
|
533
525
|
.np-avatar-layout-horizontal {
|
|
534
|
-
width: calc(var(--np-avatar-size) *
|
|
526
|
+
width: calc(var(--np-avatar-size) * var(--np-avatar-avatars-count) - (var(--np-avatar-offset) * (var(--np-avatar-avatars-count) - 1)));
|
|
527
|
+
width: calc(var(--np-avatar-size) * var(--np-avatar-avatars-count) - calc(var(--np-avatar-offset) * calc(var(--np-avatar-avatars-count) - 1)));
|
|
535
528
|
height: var(--np-avatar-layout-size);
|
|
536
529
|
}
|
|
537
530
|
.np-avatar-layout-horizontal-mask {
|
|
@@ -543,9 +536,6 @@ div.critical-comms .critical-comms-body {
|
|
|
543
536
|
.np-avatar-layout-horizontal-child {
|
|
544
537
|
margin-left: calc(var(--np-avatar-offset) * -1);
|
|
545
538
|
}
|
|
546
|
-
[dir="rtl"] .np-avatar-layout-horizontal-child {
|
|
547
|
-
margin-right: calc(var(--np-avatar-offset) * -1);
|
|
548
|
-
}
|
|
549
539
|
.np-icon-button {
|
|
550
540
|
border: none;
|
|
551
541
|
}
|
|
@@ -716,218 +706,6 @@ div.critical-comms .critical-comms-body {
|
|
|
716
706
|
.np-btn.disabled[class] {
|
|
717
707
|
pointer-events: auto;
|
|
718
708
|
}
|
|
719
|
-
.wds-Button {
|
|
720
|
-
--Button-background: var(--color-interactive-accent);
|
|
721
|
-
--Button-background-hover: var(--color-interactive-accent-hover);
|
|
722
|
-
--Button-background-active: var(--color-interactive-accent-active);
|
|
723
|
-
--Button-color: var(--color-interactive-control);
|
|
724
|
-
--Button-border-radius: var(--radius-full);
|
|
725
|
-
--Button-label-gap: var(--size-4);
|
|
726
|
-
--Button-large-padding: var(--size-12) var(--size-16);
|
|
727
|
-
--Button-medium-padding: var(--size-8) var(--size-12);
|
|
728
|
-
--Button-small-padding: calc(var(--size-10) * 0.5) var(--size-12);
|
|
729
|
-
--Button-avatar-border-color: var(--color-border-neutral);
|
|
730
|
-
--Button-transition-duration: 150ms;
|
|
731
|
-
--Button-transition-easing: ease-in-out;
|
|
732
|
-
--Button-secondary-background: var(--color-interactive-neutral);
|
|
733
|
-
--Button-secondary-background-hover: var(--color-interactive-neutral-hover);
|
|
734
|
-
--Button-secondary-background-active: var(--color-interactive-neutral-active);
|
|
735
|
-
--Button-secondary-color: var(--color-interactive-primary);
|
|
736
|
-
--Button-tertiary-background: var(--color-background-neutral);
|
|
737
|
-
--Button-tertiary-background-hover: var(--color-background-neutral-hover);
|
|
738
|
-
--Button-tertiary-background-active: var(--color-background-neutral-active);
|
|
739
|
-
--Button-tertiary-color: var(--color-content-primary);
|
|
740
|
-
--Button-minimal-background: transparent;
|
|
741
|
-
--Button-minimal-background-hover: var(--color-background-screen-hover);
|
|
742
|
-
--Button-minimal-background-active: var(--color-background-screen-active);
|
|
743
|
-
--Button-minimal-color: var(--color-interactive-primary);
|
|
744
|
-
--Button-primary-negative-background: var(--color-sentiment-negative-primary);
|
|
745
|
-
--Button-primary-negative-background-hover: var(--color-sentiment-negative-primary-hover);
|
|
746
|
-
--Button-primary-negative-background-active: var(--color-sentiment-negative-primary-active);
|
|
747
|
-
--Button-primary-negative-color: var(--color-contrast);
|
|
748
|
-
--Button-secondary-negative-background: var(--color-sentiment-negative-secondary);
|
|
749
|
-
--Button-secondary-negative-background-hover: var(--color-sentiment-negative-secondary-hover);
|
|
750
|
-
--Button-secondary-negative-background-active: var(--color-sentiment-negative-secondary-active);
|
|
751
|
-
--Button-secondary-negative-color: var(--color-sentiment-negative-primary);
|
|
752
|
-
}
|
|
753
|
-
.np-theme-personal--bright-green .wds-Button {
|
|
754
|
-
--color-contrast: #FFFFFF;
|
|
755
|
-
--Button-secondary-color: var(--color-interactive-control);
|
|
756
|
-
--Button-secondary-negative-color: var(--color-contrast);
|
|
757
|
-
}
|
|
758
|
-
/* Button Styles */
|
|
759
|
-
.wds-Button {
|
|
760
|
-
display: inline-flex;
|
|
761
|
-
flex: none;
|
|
762
|
-
width: auto;
|
|
763
|
-
align-items: center;
|
|
764
|
-
justify-content: center;
|
|
765
|
-
vertical-align: middle;
|
|
766
|
-
text-align: center;
|
|
767
|
-
-webkit-text-decoration: none;
|
|
768
|
-
text-decoration: none;
|
|
769
|
-
white-space: nowrap;
|
|
770
|
-
word-wrap: break-word;
|
|
771
|
-
-webkit-appearance: none;
|
|
772
|
-
-moz-appearance: none;
|
|
773
|
-
appearance: none;
|
|
774
|
-
background-color: var(--Button-background);
|
|
775
|
-
border: none;
|
|
776
|
-
border-radius: var(--Button-border-radius);
|
|
777
|
-
color: var(--Button-color);
|
|
778
|
-
cursor: pointer;
|
|
779
|
-
transition: color, background-color var(--Button-transition-duration) var(--Button-transition-easing);
|
|
780
|
-
}
|
|
781
|
-
.wds-Button:hover {
|
|
782
|
-
background-color: var(--Button-background-hover);
|
|
783
|
-
}
|
|
784
|
-
.wds-Button:active {
|
|
785
|
-
background-color: var(--Button-background-active);
|
|
786
|
-
}
|
|
787
|
-
.wds-Button.wds-Button--disabled,
|
|
788
|
-
.wds-Button:disabled {
|
|
789
|
-
mix-blend-mode: luminosity;
|
|
790
|
-
opacity: 0.45;
|
|
791
|
-
cursor: not-allowed;
|
|
792
|
-
}
|
|
793
|
-
.wds-Button.wds-Button--disabled:hover,
|
|
794
|
-
.wds-Button:disabled:hover,
|
|
795
|
-
.wds-Button.wds-Button--disabled:active,
|
|
796
|
-
.wds-Button:disabled:active {
|
|
797
|
-
background-color: var(--Button-background);
|
|
798
|
-
}
|
|
799
|
-
.wds-Button--secondary {
|
|
800
|
-
--Button-background: var(--Button-secondary-background);
|
|
801
|
-
--Button-background-hover: var(--Button-secondary-background-hover);
|
|
802
|
-
--Button-background-active: var(--Button-secondary-background-active);
|
|
803
|
-
--Button-color: var(--Button-secondary-color);
|
|
804
|
-
}
|
|
805
|
-
.wds-Button--tertiary {
|
|
806
|
-
--Button-background: var(--Button-tertiary-background);
|
|
807
|
-
--Button-background-hover: var(--Button-tertiary-background-hover);
|
|
808
|
-
--Button-background-active: var(--Button-tertiary-background-active);
|
|
809
|
-
--Button-color: var(--Button-tertiary-color);
|
|
810
|
-
}
|
|
811
|
-
.wds-Button--tertiary .wds-Button-icon--end {
|
|
812
|
-
color: var(--color-interactive-primary);
|
|
813
|
-
}
|
|
814
|
-
.wds-Button--minimal {
|
|
815
|
-
--Button-background: var(--Button-minimal-background);
|
|
816
|
-
--Button-background-hover: var(--Button-minimal-background-hover);
|
|
817
|
-
--Button-background-active: var(--Button-minimal-background-active);
|
|
818
|
-
--Button-color: var(--Button-minimal-color);
|
|
819
|
-
-webkit-text-decoration: underline;
|
|
820
|
-
text-decoration: underline;
|
|
821
|
-
text-underline-offset: 3px;
|
|
822
|
-
text-decoration-thickness: 1px;
|
|
823
|
-
}
|
|
824
|
-
.wds-Button--negative.wds-Button--primary {
|
|
825
|
-
--Button-background: var(--Button-primary-negative-background);
|
|
826
|
-
--Button-background-hover: var(--Button-primary-negative-background-hover);
|
|
827
|
-
--Button-background-active: var(--Button-primary-negative-background-active);
|
|
828
|
-
--Button-color: var(--Button-primary-negative-color);
|
|
829
|
-
}
|
|
830
|
-
.wds-Button--negative.wds-Button--secondary {
|
|
831
|
-
--Button-background: var(--Button-secondary-negative-background);
|
|
832
|
-
--Button-background-hover: var(--Button-secondary-negative-background-hover);
|
|
833
|
-
--Button-background-active: var(--Button-secondary-negative-background-active);
|
|
834
|
-
--Button-color: var(--Button-secondary-negative-color);
|
|
835
|
-
}
|
|
836
|
-
.wds-Button--large {
|
|
837
|
-
padding: var(--Button-large-padding);
|
|
838
|
-
}
|
|
839
|
-
.wds-Button--medium {
|
|
840
|
-
padding: var(--Button-medium-padding);
|
|
841
|
-
}
|
|
842
|
-
.wds-Button--medium:has(.wds-Button-avatars) {
|
|
843
|
-
padding-inline-start: 8px;
|
|
844
|
-
padding-inline-start: var(--size-8);
|
|
845
|
-
}
|
|
846
|
-
.wds-Button--medium:has(.wds-Button-icon--end) {
|
|
847
|
-
padding-inline-end: 8px;
|
|
848
|
-
padding-inline-end: var(--size-8);
|
|
849
|
-
}
|
|
850
|
-
.wds-Button--medium .wds-Button-icon--start {
|
|
851
|
-
margin-inline-end: var(--Button-label-gap);
|
|
852
|
-
}
|
|
853
|
-
.wds-Button--small {
|
|
854
|
-
padding: var(--Button-small-padding);
|
|
855
|
-
}
|
|
856
|
-
.wds-Button--small:has(.wds-Button-icon--start) {
|
|
857
|
-
padding-inline-start: 8px;
|
|
858
|
-
padding-inline-start: var(--size-8);
|
|
859
|
-
}
|
|
860
|
-
.wds-Button--small:has(.wds-Button-icon--end) {
|
|
861
|
-
padding-inline-end: 8px;
|
|
862
|
-
padding-inline-end: var(--size-8);
|
|
863
|
-
}
|
|
864
|
-
.wds-Button--block {
|
|
865
|
-
width: 100%;
|
|
866
|
-
}
|
|
867
|
-
.wds-Button-avatars {
|
|
868
|
-
display: inline-flex;
|
|
869
|
-
}
|
|
870
|
-
.wds-Button-avatars .np-avatar-view .np-avatar-view-content {
|
|
871
|
-
color: var(--Button-color);
|
|
872
|
-
}
|
|
873
|
-
.wds-Button-icon {
|
|
874
|
-
display: inline-block;
|
|
875
|
-
}
|
|
876
|
-
.wds-Button-content {
|
|
877
|
-
position: relative;
|
|
878
|
-
}
|
|
879
|
-
.wds-Button-content--loading .wds-Button-label,
|
|
880
|
-
.wds-Button-content--loading .wds-Button-media,
|
|
881
|
-
.wds-Button-content--loading .wds-Button-icon {
|
|
882
|
-
visibility: hidden;
|
|
883
|
-
opacity: 0;
|
|
884
|
-
}
|
|
885
|
-
.wds-Button-label {
|
|
886
|
-
display: flex;
|
|
887
|
-
justify-content: center;
|
|
888
|
-
align-items: center;
|
|
889
|
-
gap: var(--Button-label-gap);
|
|
890
|
-
position: relative;
|
|
891
|
-
}
|
|
892
|
-
.wds-Button-loader {
|
|
893
|
-
position: absolute;
|
|
894
|
-
display: flex;
|
|
895
|
-
justify-content: center;
|
|
896
|
-
align-items: center;
|
|
897
|
-
width: 100%;
|
|
898
|
-
height: 100%;
|
|
899
|
-
}
|
|
900
|
-
.wds-Button-loader .process-circle {
|
|
901
|
-
stroke: var(--Button-color);
|
|
902
|
-
}
|
|
903
|
-
/* RTL Styles */
|
|
904
|
-
[dir="rtl"] .wds-Button .tw-icon-chevron-right,[dir="rtl"] .wds-Button .tw-icon-arrow-right {
|
|
905
|
-
transform: rotate(180deg);
|
|
906
|
-
}
|
|
907
|
-
[dir="rtl"] .wds-Button .tw-icon-chevron-left,[dir="rtl"] .wds-Button .tw-icon-arrow-left {
|
|
908
|
-
transform: rotate(180deg);
|
|
909
|
-
}
|
|
910
|
-
/* Avatar border transparency */
|
|
911
|
-
/* dark buttons get 20% transparency, light buttons get 12% */
|
|
912
|
-
.wds-Button-avatars .np-circle {
|
|
913
|
-
--circle-border-color: color-mix(in srgb, var(--Button-color) 20%, transparent);
|
|
914
|
-
}
|
|
915
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--secondary.wds-Button--negative .wds-Button-avatars .np-circle,
|
|
916
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--secondary .wds-Button-avatars .np-circle,
|
|
917
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--tertiary .wds-Button-avatars .np-circle,
|
|
918
|
-
.np-theme-personal:not(.np-theme-personal--dark):not(.np-theme-personal--forest-green):not(.np-theme-personal--bright-green) .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
919
|
-
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
920
|
-
}
|
|
921
|
-
.np-theme-personal--dark .wds-Button--primary .wds-Button-avatars .np-circle,
|
|
922
|
-
.np-theme-personal--dark .wds-Button--primary.wds-Button--negative .wds-Button-avatars .np-circle,
|
|
923
|
-
.np-theme-personal--forest-green .wds-Button--primary .wds-Button-avatars .np-circle,
|
|
924
|
-
.np-theme-personal--forest-green .wds-Button--primary.wds-Button--negative .wds-Button-avatars .np-circle {
|
|
925
|
-
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
926
|
-
}
|
|
927
|
-
.np-theme-personal--bright-green .wds-Button--tertiary .wds-Button-avatars .np-circle,
|
|
928
|
-
.np-theme-personal--bright-green .wds-Button--minimal .wds-Button-avatars .np-circle {
|
|
929
|
-
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
930
|
-
}
|
|
931
709
|
.np-card {
|
|
932
710
|
overflow: hidden;
|
|
933
711
|
transition-property: transform, box-shadow;
|
|
@@ -3911,6 +3689,17 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
3911
3689
|
margin-left: 0;
|
|
3912
3690
|
margin-right: 1px;
|
|
3913
3691
|
}
|
|
3692
|
+
.wds-nudge-media-flower {
|
|
3693
|
+
margin-left: -8px;
|
|
3694
|
+
margin-top: 8px;
|
|
3695
|
+
position: absolute;
|
|
3696
|
+
width: 123px;
|
|
3697
|
+
}
|
|
3698
|
+
[dir="rtl"] .wds-nudge-media-flower {
|
|
3699
|
+
transform: scaleX(-1);
|
|
3700
|
+
margin-left: 0;
|
|
3701
|
+
margin-right: -8px;
|
|
3702
|
+
}
|
|
3914
3703
|
.wds-nudge-container {
|
|
3915
3704
|
align-items: stretch;
|
|
3916
3705
|
display: flex;
|
|
@@ -136,6 +136,17 @@
|
|
|
136
136
|
margin-left: 0;
|
|
137
137
|
margin-right: 1px;
|
|
138
138
|
}
|
|
139
|
+
.wds-nudge-media-flower {
|
|
140
|
+
margin-left: -8px;
|
|
141
|
+
margin-top: 8px;
|
|
142
|
+
position: absolute;
|
|
143
|
+
width: 123px;
|
|
144
|
+
}
|
|
145
|
+
[dir="rtl"] .wds-nudge-media-flower {
|
|
146
|
+
transform: scaleX(-1);
|
|
147
|
+
margin-left: 0;
|
|
148
|
+
margin-right: -8px;
|
|
149
|
+
}
|
|
139
150
|
.wds-nudge-container {
|
|
140
151
|
align-items: stretch;
|
|
141
152
|
display: flex;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var reactIntl = require('react-intl');
|
|
4
|
+
var TableCell = require('./TableCell.js');
|
|
5
|
+
var TableHeader = require('./TableHeader.js');
|
|
6
|
+
var TableRow = require('./TableRow.js');
|
|
7
|
+
var Alert = require('../alert/Alert.js');
|
|
8
|
+
var Table_messages = require('./Table.messages.js');
|
|
9
|
+
var Loader = require('../loader/Loader.js');
|
|
10
|
+
require('../common/theme.js');
|
|
11
|
+
require('../common/direction.js');
|
|
12
|
+
require('../common/propsValues/control.js');
|
|
13
|
+
require('../common/propsValues/breakpoint.js');
|
|
14
|
+
var size = require('../common/propsValues/size.js');
|
|
15
|
+
require('../common/propsValues/typography.js');
|
|
16
|
+
require('../common/propsValues/width.js');
|
|
17
|
+
require('../common/propsValues/type.js');
|
|
18
|
+
require('../common/propsValues/dateMode.js');
|
|
19
|
+
require('../common/propsValues/monthFormat.js');
|
|
20
|
+
require('../common/propsValues/position.js');
|
|
21
|
+
require('../common/propsValues/layouts.js');
|
|
22
|
+
require('../common/propsValues/status.js');
|
|
23
|
+
var sentiment = require('../common/propsValues/sentiment.js');
|
|
24
|
+
require('../common/propsValues/profileType.js');
|
|
25
|
+
require('../common/propsValues/variant.js');
|
|
26
|
+
require('../common/propsValues/scroll.js');
|
|
27
|
+
require('../common/propsValues/markdownNodeType.js');
|
|
28
|
+
require('../common/fileType.js');
|
|
29
|
+
require('@transferwise/icons');
|
|
30
|
+
var clsx = require('clsx');
|
|
31
|
+
require('react');
|
|
32
|
+
require('../common/closeButton/CloseButton.messages.js');
|
|
33
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
34
|
+
var StatusIcon = require('../statusIcon/StatusIcon.js');
|
|
35
|
+
var componentsTheming = require('@wise/components-theming');
|
|
36
|
+
var Body = require('../body/Body.js');
|
|
37
|
+
|
|
38
|
+
const Table = ({
|
|
39
|
+
'aria-labelledby': ariaLabelledBy,
|
|
40
|
+
data,
|
|
41
|
+
loading,
|
|
42
|
+
className,
|
|
43
|
+
fullWidth = true,
|
|
44
|
+
error
|
|
45
|
+
}) => {
|
|
46
|
+
const {
|
|
47
|
+
formatMessage
|
|
48
|
+
} = reactIntl.useIntl();
|
|
49
|
+
const {
|
|
50
|
+
theme
|
|
51
|
+
} = componentsTheming.useTheme();
|
|
52
|
+
const isEmptyHeader = loading ?? (data?.headers && !data?.headers.length);
|
|
53
|
+
const getRowLength = () => {
|
|
54
|
+
const columnsLength = data?.headers?.length ?? 0;
|
|
55
|
+
return data?.onRowClick ? columnsLength + 1 : columnsLength;
|
|
56
|
+
};
|
|
57
|
+
const getTableContent = () => {
|
|
58
|
+
if (loading) {
|
|
59
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableRow, {
|
|
60
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TableCell, {
|
|
61
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Loader, {
|
|
62
|
+
"data-testid": "np-table-loader"
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
// Shows the `emptyData` message when there is no data to display
|
|
68
|
+
if (!data?.rows?.length) {
|
|
69
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableRow, {
|
|
70
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TableCell, {
|
|
71
|
+
colSpan: data?.headers?.length,
|
|
72
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
73
|
+
className: "np-table-empty-data",
|
|
74
|
+
"data-testid": "np-table-empty-data",
|
|
75
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
76
|
+
sentiment: sentiment.Sentiment.WARNING,
|
|
77
|
+
size: size.Size.MEDIUM
|
|
78
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
79
|
+
type: "body-default-bold",
|
|
80
|
+
children: formatMessage(Table_messages.emptyData)
|
|
81
|
+
})]
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return data?.rows?.map((rowData, rowIndex) => {
|
|
87
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableRow, {
|
|
88
|
+
rowData: rowData,
|
|
89
|
+
hasSeparator: data?.rows?.length ? data.rows.length - 1 !== rowIndex : false,
|
|
90
|
+
onRowClick: data?.onRowClick
|
|
91
|
+
}, 'table-row-'.concat(rowIndex.toString()));
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
if (error) {
|
|
95
|
+
return /*#__PURE__*/jsxRuntime.jsx(Alert.default, {
|
|
96
|
+
className: "np-table-error",
|
|
97
|
+
message: error.message,
|
|
98
|
+
type: sentiment.Sentiment.NEGATIVE,
|
|
99
|
+
action: {
|
|
100
|
+
href: error?.action?.href ?? '/',
|
|
101
|
+
text: error?.action?.text ?? formatMessage(Table_messages.refreshPage)
|
|
102
|
+
},
|
|
103
|
+
"data-testid": "np-table-error"
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
107
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
108
|
+
"aria-live": "polite",
|
|
109
|
+
className: "sr-only",
|
|
110
|
+
children: formatMessage(Table_messages[loading ? 'loading' : 'loaded'])
|
|
111
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
112
|
+
role: loading ? 'presentation' : 'region',
|
|
113
|
+
"aria-labelledby": ariaLabelledBy,
|
|
114
|
+
className: clsx.clsx('np-table-outer-container', className, {
|
|
115
|
+
'np-theme-personal': theme === 'bright-green',
|
|
116
|
+
'np-table-outer-container--center': !fullWidth,
|
|
117
|
+
'np-table-outer-container--full-width': fullWidth
|
|
118
|
+
})
|
|
119
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
120
|
+
,
|
|
121
|
+
tabIndex: 0,
|
|
122
|
+
"data-testid": "np-table-outer-container",
|
|
123
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
124
|
+
className: clsx.clsx('np-table-container', {
|
|
125
|
+
'np-table-container--loading': loading
|
|
126
|
+
}),
|
|
127
|
+
"data-testid": "np-table-container",
|
|
128
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
129
|
+
className: "np-table-inner-container",
|
|
130
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("table", {
|
|
131
|
+
className: "np-table",
|
|
132
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("thead", {
|
|
133
|
+
"aria-hidden": isEmptyHeader,
|
|
134
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("tr", {
|
|
135
|
+
children: [isEmptyHeader ? /*#__PURE__*/jsxRuntime.jsx(TableHeader, {}) : data?.headers?.map((headerItem, index) => /*#__PURE__*/jsxRuntime.jsx(TableHeader, {
|
|
136
|
+
...headerItem
|
|
137
|
+
}, headerItem.header?.concat(index.toString()))), data?.onRowClick && /*#__PURE__*/jsxRuntime.jsx(TableHeader, {
|
|
138
|
+
isActionHeader: true
|
|
139
|
+
})]
|
|
140
|
+
})
|
|
141
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("tbody", {
|
|
142
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
143
|
+
"aria-hidden": "true",
|
|
144
|
+
className: "np-table-row np-table-row--cosmetic",
|
|
145
|
+
children: /*#__PURE__*/jsxRuntime.jsx("td", {
|
|
146
|
+
className: "np-table-cell",
|
|
147
|
+
colSpan: getRowLength()
|
|
148
|
+
})
|
|
149
|
+
}, "first-np-table-row--cosmetic"), getTableContent(), /*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
150
|
+
"aria-hidden": "true",
|
|
151
|
+
className: "np-table-row np-table-row--cosmetic",
|
|
152
|
+
children: /*#__PURE__*/jsxRuntime.jsx("td", {
|
|
153
|
+
className: "np-table-cell",
|
|
154
|
+
colSpan: getRowLength()
|
|
155
|
+
})
|
|
156
|
+
}, "last-np-table-row--cosmetic")]
|
|
157
|
+
})]
|
|
158
|
+
})
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
})]
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
module.exports = Table;
|
|
166
|
+
//# sourceMappingURL=Table.js.map
|