@uniformdev/design-system 13.0.1-alpha.132
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/LICENSE +2 -0
- package/dist/esm/index.js +772 -0
- package/dist/index.d.ts +408 -0
- package/dist/index.js +772 -0
- package/package.json +44 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,772 @@
|
|
|
1
|
+
var zo=Object.create;var H=Object.defineProperty;var Eo=Object.getOwnPropertyDescriptor;var Vo=Object.getOwnPropertyNames;var Ho=Object.getPrototypeOf,Oo=Object.prototype.hasOwnProperty;var Go=(o,r)=>{for(var n in r)H(o,n,{get:r[n],enumerable:!0})},ne=(o,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Vo(r))!Oo.call(o,t)&&t!==n&&H(o,t,{get:()=>r[t],enumerable:!(a=Eo(r,t))||a.enumerable});return o};var b=(o,r,n)=>(n=o!=null?zo(Ho(o)):{},ne(r||!o||!o.__esModule?H(n,"default",{value:o,enumerable:!0}):n,o)),Fo=o=>ne(H({},"__esModule",{value:!0}),o);var lr={};Go(lr,{Button:()=>$o,Callout:()=>or,Caption:()=>I,ErrorMessage:()=>S,Heading:()=>ar,Icon:()=>_,IconsProvider:()=>No,Input:()=>q,InputComboBox:()=>Ko,InputInlineSelect:()=>_o,InputKeywordSearch:()=>qo,InputSelect:()=>Jo,InputToggle:()=>Qo,LoadingIcon:()=>bo,LoadingIndicator:()=>tr,LoadingOverlay:()=>nr,Menu:()=>Xo,MenuContext:()=>J,MenuItem:()=>jo,ScrollableList:()=>ir,ScrollableListItem:()=>sr,Theme:()=>Zo,UniformBadge:()=>Ao,UniformLogo:()=>Do,breakpoints:()=>Me,input:()=>k,inputError:()=>P,inputSelect:()=>G,labelText:()=>x,mq:()=>K,scrollbarStyles:()=>F,useIconContext:()=>Y,useMenuContext:()=>Q});module.exports=Fo(lr);var e=require("@emotion/react"),u=b(require("react"));var ae=b(require("react")),Zo=({disableReset:o=!1})=>(0,e.jsx)(ae.default.Fragment,null,(0,e.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&family=Quantico:wght@700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap",rel:"stylesheet"}),o?null:(0,e.jsx)("style",{dangerouslySetInnerHTML:{__html:`
|
|
2
|
+
/*** The new CSS Reset - version 1.2.0 (last updated 23.7.2021) ***/
|
|
3
|
+
|
|
4
|
+
/* Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property */
|
|
5
|
+
*:where(:not(iframe, canvas, img, svg, video):not(svg *)) {
|
|
6
|
+
all: unset;
|
|
7
|
+
display: revert;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Preferred box-sizing value */
|
|
11
|
+
*,
|
|
12
|
+
*::before,
|
|
13
|
+
*::after {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
Remove list styles (bullets/numbers)
|
|
19
|
+
in case you use it with normalize.css
|
|
20
|
+
*/
|
|
21
|
+
ol,
|
|
22
|
+
ul {
|
|
23
|
+
list-style: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* For images to not be able to exceed their container */
|
|
27
|
+
img {
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Removes spacing between cells in tables */
|
|
32
|
+
table {
|
|
33
|
+
border-collapse: collapse;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Revert the 'white-space' property for textarea elements on Safari */
|
|
37
|
+
textarea {
|
|
38
|
+
white-space: revert;
|
|
39
|
+
}`}}),(0,e.jsx)("style",{dangerouslySetInnerHTML:{__html:`
|
|
40
|
+
:root {
|
|
41
|
+
--brand-primary-1: #438fd5; /* bright blue */
|
|
42
|
+
--brand-primary-2: #f4220b; /* red */
|
|
43
|
+
--brand-primary-3: #83c6e1; /* slate blue */
|
|
44
|
+
|
|
45
|
+
/* secondary colours */
|
|
46
|
+
--brand-secondary-1: #1f2b34; /* carbon */
|
|
47
|
+
--brand-secondary-2: #ecf1f1; /* silver */
|
|
48
|
+
--brand-secondary-3: #2ecdb4; /* teal */
|
|
49
|
+
--brand-secondary-4: #f6f1c3; /* yellow */
|
|
50
|
+
--brand-secondary-5: #d9534f; /* brick red */
|
|
51
|
+
--brand-secondary-6: #dbf6f2; /* mint */
|
|
52
|
+
|
|
53
|
+
/* off brand */
|
|
54
|
+
--input-border: rgba(31, 43, 52, 0.5);
|
|
55
|
+
--ring: 0 0 0 0 var(--white), 0 0 0 3px var(--brand-primary-3);
|
|
56
|
+
--ring-inset: inset 0 0 0 0 var(--white), inset 0 0 0 3px var(--brand-primary-3);
|
|
57
|
+
|
|
58
|
+
/* site settings */
|
|
59
|
+
--site-width: 1536px;
|
|
60
|
+
|
|
61
|
+
--spacing-base: 1rem;
|
|
62
|
+
--spacing-xs: calc(var(--spacing-base) - 0.75rem);
|
|
63
|
+
--spacing-sm: calc(var(--spacing-base) - 0.5rem);
|
|
64
|
+
--spacing-3: calc(var(--spacing-base) - 0.25rem);
|
|
65
|
+
--spacing-md: calc(var(--spacing-base) * 1.5);
|
|
66
|
+
--spacing-lg: calc(var(--spacing-base) * 2);
|
|
67
|
+
--spacing-xl: calc(var(--spacing-base) * 2.5);
|
|
68
|
+
--spacing-2xl: calc(var(--spacing-base) * 3);
|
|
69
|
+
|
|
70
|
+
/* font sizes */
|
|
71
|
+
--fluid-font-base: 2vw + 1rem;
|
|
72
|
+
|
|
73
|
+
--fs-base: 1rem; /* 16px */
|
|
74
|
+
--fs-xxs: calc(var(--fs-base) - 0.5rem);
|
|
75
|
+
--fs-xs: calc(var(--fs-base) - 0.25rem);
|
|
76
|
+
--fs-sm: calc(var(--fs-base) - 0.125rem);
|
|
77
|
+
--fs-md: calc(var(--fs-base) * 1.25);
|
|
78
|
+
--fs-lg: calc(var(--fs-base) * 1.5);
|
|
79
|
+
--fs-xl: clamp(calc(var(--fs-base) * 1.5), var(--fluid-font-base), calc(var(--fs-base) * 2));
|
|
80
|
+
--fs-xxl: calc(var(--fs-base) * 2.25);
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/* font-weight */
|
|
84
|
+
--fw-regular: 400;
|
|
85
|
+
--fw-medium: 500;
|
|
86
|
+
--fw-bold: 700;
|
|
87
|
+
|
|
88
|
+
/* font family */
|
|
89
|
+
--ff-base: 'DM Sans', sans-serif;
|
|
90
|
+
--ff-heading: 'Quantico', sans-serif;
|
|
91
|
+
--ff-mono: 'Space Mono', monospace
|
|
92
|
+
|
|
93
|
+
/* max text width */
|
|
94
|
+
--prose: 65ch;
|
|
95
|
+
|
|
96
|
+
/* brand shadow styles */
|
|
97
|
+
--shadow-base: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px,
|
|
98
|
+
rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
|
|
99
|
+
|
|
100
|
+
/* rounder corners */
|
|
101
|
+
--rounded-base: 6px;
|
|
102
|
+
--rounded-md: 0.375rem;
|
|
103
|
+
--rounded-full: 99999px;
|
|
104
|
+
|
|
105
|
+
/* gray spectrum */
|
|
106
|
+
--white: #fff;
|
|
107
|
+
--gray-50: #f9fafb;
|
|
108
|
+
--gray-100: #f3f4f6;
|
|
109
|
+
--gray-200: #e5e7eb;
|
|
110
|
+
--gray-300: #d1d5db;
|
|
111
|
+
--gray-400: #9ca3af;
|
|
112
|
+
--gray-500: #6b7280;
|
|
113
|
+
--gray-600: #4b5563;
|
|
114
|
+
--gray-700: #374151;
|
|
115
|
+
--gray-800: #1f2937;
|
|
116
|
+
--gray-900: #111827;
|
|
117
|
+
|
|
118
|
+
/* green spectrum */
|
|
119
|
+
--green-50: rgb(236 253 245 / 1);
|
|
120
|
+
|
|
121
|
+
--alert: #facc15;
|
|
122
|
+
|
|
123
|
+
/* z-indexs */
|
|
124
|
+
--z-10: 10;
|
|
125
|
+
|
|
126
|
+
/* opacity */
|
|
127
|
+
--opacity-75: 0.75;
|
|
128
|
+
|
|
129
|
+
/* animation function times */
|
|
130
|
+
--timing-ease-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
131
|
+
--duration-fast: 0.25s;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
html,
|
|
135
|
+
body {
|
|
136
|
+
color: var(--brand-secondary-1);
|
|
137
|
+
font-family: var(--ff-base);
|
|
138
|
+
scroll-behavior: smooth;
|
|
139
|
+
font-weight: var(--fw-regular);
|
|
140
|
+
line-height: 1.5;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
li {
|
|
144
|
+
line-height: 1.5rem;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
a, button {
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
button, input, optgroup, select, textarea {
|
|
152
|
+
font-family: inherit;
|
|
153
|
+
font-size: inherit;
|
|
154
|
+
color: inherit;
|
|
155
|
+
line-height: 1.25rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[role=button], button {
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
audio, canvas, embed, iframe, img, object, svg, video {
|
|
163
|
+
display: block;
|
|
164
|
+
vertical-align: middle;
|
|
165
|
+
}
|
|
166
|
+
`}}));var v=require("@emotion/react"),O=v.css`
|
|
167
|
+
position: relative;
|
|
168
|
+
`,x=v.css`
|
|
169
|
+
display: flex;
|
|
170
|
+
font-weight: var(--fw-bold);
|
|
171
|
+
margin: 0 0 var(--spacing-xs);
|
|
172
|
+
align-items: center;
|
|
173
|
+
`,k=v.css`
|
|
174
|
+
appearance: none;
|
|
175
|
+
background-color: var(--white);
|
|
176
|
+
border: 1px solid var(--gray-400);
|
|
177
|
+
border-radius: var(--rounded-md);
|
|
178
|
+
color: var(--gray-700);
|
|
179
|
+
padding: var(--spacing-base) var(--spacing-md) var(--spacing-base) var(--spacing-base);
|
|
180
|
+
width: 100%;
|
|
181
|
+
position: relative;
|
|
182
|
+
white-space: nowrap;
|
|
183
|
+
transition: background var(--duration-fast) var(--timing-ease-out),
|
|
184
|
+
border-color var(--duration-fast) var(--timing-ease-out),
|
|
185
|
+
color var(--duration-fast) var(--timing-ease-out);
|
|
186
|
+
|
|
187
|
+
&::placeholder {
|
|
188
|
+
color: var(--gray-400);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:focus,
|
|
192
|
+
&:focus-within {
|
|
193
|
+
border-color: var(--brand-secondary-1);
|
|
194
|
+
outline: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:disabled,
|
|
198
|
+
&:disabled::placeholder {
|
|
199
|
+
cursor: not-allowed;
|
|
200
|
+
color: var(--gray-300);
|
|
201
|
+
border-color: var(--gray-300);
|
|
202
|
+
}
|
|
203
|
+
`,P=v.css`
|
|
204
|
+
border-color: var(--brand-secondary-5);
|
|
205
|
+
`,ie=v.css`
|
|
206
|
+
align-items: center;
|
|
207
|
+
display: flex;
|
|
208
|
+
position: absolute;
|
|
209
|
+
inset: 0 var(--spacing-base) 0 auto;
|
|
210
|
+
pointer-event: one;
|
|
211
|
+
`,se=v.css`
|
|
212
|
+
padding-right: var(--spacing-2xl);
|
|
213
|
+
`,G=v.css`
|
|
214
|
+
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z' fill='currentColor' /%3E%3C/svg%3E");
|
|
215
|
+
background-position: right var(--spacing-sm) center;
|
|
216
|
+
background-repeat: no-repeat;
|
|
217
|
+
background-size: 1rem;
|
|
218
|
+
padding-right: var(--spacing-xl);
|
|
219
|
+
`,le=v.css`
|
|
220
|
+
color: var(--brand-secondary-1);
|
|
221
|
+
height: 1.25rem;
|
|
222
|
+
width: 1.25rem;
|
|
223
|
+
`,ce=v.css`
|
|
224
|
+
align-items: center;
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
display: inline-flex;
|
|
227
|
+
gap: var(--spacing-sm);
|
|
228
|
+
margin: var(--spacing-sm) 0;
|
|
229
|
+
flex-wrap: wrap;
|
|
230
|
+
`,pe=v.css`
|
|
231
|
+
border: 1px solid var(--brand-secondary-1);
|
|
232
|
+
background: var(--white);
|
|
233
|
+
width: var(--spacing-md);
|
|
234
|
+
height: var(--spacing-md);
|
|
235
|
+
transition: background var(--duration) var(--timing), border-color var(--duration) var(--timing),
|
|
236
|
+
color var(--duration) var(--timing);
|
|
237
|
+
|
|
238
|
+
&[type='radio'] {
|
|
239
|
+
border-radius: var(--rounded-full);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&[type='checkbox'] {
|
|
243
|
+
border-radius: var(--rounded-base);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&:checked,
|
|
247
|
+
&:checked:hover,
|
|
248
|
+
&:checked:focus {
|
|
249
|
+
background: var(--brand-secondary-3)
|
|
250
|
+
url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M10.5858 13.4142L7.75735 10.5858L6.34314 12L10.5858 16.2427L17.6568 9.1716L16.2426 7.75739L10.5858 13.4142Z' fill='%23fff' /%3E%3C/svg%3E")
|
|
251
|
+
no-repeat center center;
|
|
252
|
+
border-color: var(--brand-secondary-3);
|
|
253
|
+
color: var(--white);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
&:disabled {
|
|
257
|
+
cursor: not-allowed;
|
|
258
|
+
color: var(--gray-300);
|
|
259
|
+
border-color: var(--gray-300);
|
|
260
|
+
}
|
|
261
|
+
`,de=v.css`
|
|
262
|
+
font-weight: var(--font-medium);
|
|
263
|
+
`,ue=v.css`
|
|
264
|
+
cursor: not-allowed;
|
|
265
|
+
color: var(--gray-400);
|
|
266
|
+
`,me=v.css`
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-direction: column;
|
|
269
|
+
flex-basis: 100%;
|
|
270
|
+
padding-left: var(--spacing-lg);
|
|
271
|
+
margin-top: -0.5rem;
|
|
272
|
+
line-height: 1.15;
|
|
273
|
+
`;var ge=require("@emotion/react"),F=ge.css`
|
|
274
|
+
@supports ((scrollbar-color: #d1d5db transparent) and (scrollbar-width: thin)) {
|
|
275
|
+
/*
|
|
276
|
+
#d1d5db = bg-gray-300
|
|
277
|
+
scrollbar-color first arg is the thumb, the second arg is the trackbar color
|
|
278
|
+
hover state in firefox is controlled within the browser
|
|
279
|
+
*/
|
|
280
|
+
scrollbar-color: #d1d5db transparent;
|
|
281
|
+
scrollbar-width: thin;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
&::-webkit-scrollbar {
|
|
285
|
+
width: 8px;
|
|
286
|
+
height: 8px;
|
|
287
|
+
}
|
|
288
|
+
&::-webkit-scrollbar-track {
|
|
289
|
+
background: transparent;
|
|
290
|
+
border-radius: var(--rounded-base);
|
|
291
|
+
}
|
|
292
|
+
&::-webkit-scrollbar-thumb {
|
|
293
|
+
background: var(--gray-300);
|
|
294
|
+
border-radius: var(--rounded-base);
|
|
295
|
+
}
|
|
296
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
297
|
+
background: var(--gray-500);
|
|
298
|
+
}
|
|
299
|
+
`;var Z=require("@emotion/react"),A=Z.css`
|
|
300
|
+
display: block;
|
|
301
|
+
`,D=Z.css`
|
|
302
|
+
background: transparent;
|
|
303
|
+
color: var(--brand-secondary-1);
|
|
304
|
+
`,$=Z.css`
|
|
305
|
+
background: var(--brand-secondary-1);
|
|
306
|
+
color: var(--white);
|
|
307
|
+
`;var Ao=({theme:o="light",...r})=>(0,e.jsx)("svg",{width:"38",height:"44",viewBox:"0 0 87 101",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-test-id":"uniform-Badge",css:[A,o==="dark"?$:D],...r},(0,e.jsx)("path",{d:"M28.998 0 0 16.744V50.23l28.998-16.744 29.004-16.743L28.998 0Z",fill:"#83C6E1"}),(0,e.jsx)("path",{d:"M28.998 66.974V33.487L0 50.231v33.487l28.998 16.744 29.004-16.744V50.23L28.998 66.974Z",fill:"#438FD5"}),(0,e.jsx)("path",{d:"M58.002 16.744 28.998 33.487l29.004 16.744v33.487L87 66.975V33.487L58.002 16.744Z",fill:"#F4220B"}));var Do=({theme:o="light"})=>(0,e.jsx)("div",{"data-test-id":"uniform-Logo"},(0,e.jsx)("svg",{width:"153",height:"53",viewBox:"0 0 153 39",fill:"none",xmlns:"http://www.w3.org/2000/svg",css:[A,o==="dark"?$:D]},(0,e.jsx)("path",{d:"M11.249 0 0 6.495v12.99l11.249-6.495L22.5 6.495 11.25 0Z",fill:"#83C6E1"}),(0,e.jsx)("path",{d:"M11.249 25.98V12.99L0 19.486v12.99l11.249 6.495L22.5 32.476v-12.99L11.25 25.98Z",fill:"#438FD5"}),(0,e.jsx)("path",{d:"m22.5 6.495-11.25 6.496 11.25 6.495v12.99l11.25-6.495V12.99L22.5 6.495Z",fill:"#F4220B"}),(0,e.jsx)("path",{d:"M86.45 12.98h-4.076v14.87h4.076V12.98Zm.146-6.843h-4.371v4.076h4.37V6.137Zm5.861 1.993v4.85h-2.736v3.477h2.736V27.85h4.076V16.457h3.27V12.98h-3.27V9.617h3.27v-3.48h-3.896l-3.45 1.992Zm13.503 4.7-3.45 1.993v11.183l3.45 1.992h6.335l3.45-1.992V14.823l-3.45-1.992h-6.335Zm5.71 11.688h-5.087v-8.21h5.087v8.21Zm12.607-10.315-2.119-1.224h-1.954v14.87h4.076V16.457h5.115V12.98h-2.999l-2.119 1.224ZM71.034 12.83l-2.375 1.373-2.379-1.372h-1.6v15.018h4.075V16.31h5.084v11.54h4.076V14.823l-3.45-1.992h-3.431ZM56.145 24.517h-5.087V12.98h-4.073v13.027l3.45 1.992h3.593l2.111-1.22.003.002.003-.003v.003l2.108 1.218h1.965v-15.02h-4.073v11.538Zm93.68-11.687h-2.855l-2.794 1.604-2.767-1.603h-2.854l-2.111 1.218-2.111-1.218h-1.965v15.018h4.076V16.31h4.343v11.54h4.073V16.31h4.343v11.54h4.073V14.823l-3.451-1.992Z",fill:"currentColor"})));var we=b(require("react")),Ce=require("reakit/Button");var C=require("@emotion/react"),fe=C.css`
|
|
308
|
+
align-items: center;
|
|
309
|
+
border: 1px solid transparent;
|
|
310
|
+
cursor: pointer;
|
|
311
|
+
display: inline-flex;
|
|
312
|
+
font-weight: var(--fw-medium);
|
|
313
|
+
transition: opacity var(--duration-fast) var(--timing-ease-out),
|
|
314
|
+
color var(--duration-fast) var(--timing-ease-out),
|
|
315
|
+
border-color var(--duration-fast) var(--timing-ease-out);
|
|
316
|
+
|
|
317
|
+
&:focus {
|
|
318
|
+
outline: none;
|
|
319
|
+
border-color: var(--gray-700);
|
|
320
|
+
box-shadow: var(--ring);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&:hover,
|
|
324
|
+
&:active {
|
|
325
|
+
opacity: var(--opacity-75);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
&:disabled {
|
|
329
|
+
cursor: not-allowed;
|
|
330
|
+
}
|
|
331
|
+
`,ve=C.css`
|
|
332
|
+
background: var(--brand-secondary-1);
|
|
333
|
+
color: var(--white);
|
|
334
|
+
|
|
335
|
+
&:disabled {
|
|
336
|
+
background: var(--gray-500);
|
|
337
|
+
color: var(--white);
|
|
338
|
+
}
|
|
339
|
+
`,be=C.css`
|
|
340
|
+
background: var(--brand-secondary-5);
|
|
341
|
+
color: var(--white);
|
|
342
|
+
|
|
343
|
+
&:disabled {
|
|
344
|
+
background: var(--gray-500);
|
|
345
|
+
color: var(--white);
|
|
346
|
+
}
|
|
347
|
+
`,he=C.css`
|
|
348
|
+
background: var(--brand-secondary-2);
|
|
349
|
+
color: var(--brand-secondary-1);
|
|
350
|
+
|
|
351
|
+
&:disabled {
|
|
352
|
+
background: var(--brand-secondary-2);
|
|
353
|
+
color: var(--gray-400);
|
|
354
|
+
}
|
|
355
|
+
`,ye=C.css`
|
|
356
|
+
background: transparent;
|
|
357
|
+
color: var(--brand-secondary-3);
|
|
358
|
+
|
|
359
|
+
&:hover {
|
|
360
|
+
border-color: var(--brand-secondary-3);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
&:disabled {
|
|
364
|
+
background: transparent;
|
|
365
|
+
border-color: var(--gray-400);
|
|
366
|
+
color: var(--gray-400);
|
|
367
|
+
}
|
|
368
|
+
`,xe=C.css`
|
|
369
|
+
background: var(--brand-secondary-3);
|
|
370
|
+
color: var(--white);
|
|
371
|
+
|
|
372
|
+
&:disabled {
|
|
373
|
+
background: var(--gray-500);
|
|
374
|
+
color: var(--white);
|
|
375
|
+
}
|
|
376
|
+
`;var $o=we.forwardRef(({buttonType:o="primary",size:r="md",children:n,...a},t)=>{let s={primary:ve,secondary:be,ghost:ye,unimportant:he,tertiary:xe},c={xs:"padding: 0.375rem 0.625rem; font-size: var(--fs-xs);",sm:"padding: var(--spacing-sm) 0.75rem; font-size: var(--fs-sm);",md:"padding: var(--spacing-sm) var(--spacing-base); font-size: var(--fs-sm);",lg:"padding: var(--spacing-sm) var(--spacing-base)",xl:"padding: 0.75rem var(--spacing-md)"};return(0,e.jsx)(Ce.Button,{"data-testid":"uniform-button",ref:t,css:[fe,s[o],c[r]],...a},n)});var Be=b(require("react"));var h=require("react"),Ie=require("param-case"),Se=(0,h.createContext)({iconsMap:{},isLoading:!0});function Y(){return(0,h.useContext)(Se)}function No({children:o}){let[r,n]=(0,h.useState)(!0),[a,t]=(0,h.useState)({});return(0,h.useEffect)(()=>{import("react-icons/cg").then(s=>{let c=Object.entries(s).reduce((p,[d,g])=>{if(d==="default")return p;let f=Uo(d);return{...p,[f]:g}},{});t(c),n(!1)})},[]),(0,e.jsx)(Se.Provider,{value:{iconsMap:a,isLoading:r}},o)}function Uo(o){return(0,Ie.paramCase)(o.replace("Cg",""))}var L=require("@emotion/react");var Me={sm:"640px",md:"768px",lg:"1025px",xl:"1280px","2xl":"1536px"},K=o=>`@media (min-width: ${Me[o]})`;var Re=L.css`
|
|
377
|
+
display: hidden;
|
|
378
|
+
|
|
379
|
+
${K("sm")} {
|
|
380
|
+
display: block;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
& svg {
|
|
384
|
+
display: block;
|
|
385
|
+
vertical-align: middle;
|
|
386
|
+
}
|
|
387
|
+
`,ke=L.css`
|
|
388
|
+
color: var(--brand-secondary-3);
|
|
389
|
+
`,Pe=L.css`
|
|
390
|
+
color: var(--brand-secondary-5);
|
|
391
|
+
`,Le=L.css`
|
|
392
|
+
color: var(--gray-500);
|
|
393
|
+
`,Te=L.css`
|
|
394
|
+
color: currentColor;
|
|
395
|
+
`;var Yo=({icon:o,iconColorClass:r="green",...n})=>{let a=typeof o=="string",{iconsMap:t,isLoading:s}=Y(),c={green:ke,gray:Le,red:Pe,currentColor:Te};if(a&&s)return null;let p=a?t[o]:o;return a&&p===void 0?(console.error(`We don't seem to have the icon you're looking for ("${o}"). Make sure you're using <IconsProvider> and try an icon from our Storybook.`),null):(0,e.jsx)(p,{role:"img",...n,css:[Re,c[r]]})},_=Be.default.memo(Yo);var ze=require("@emotion/react"),Ee=ze.css`
|
|
396
|
+
color: var(--gray-500);
|
|
397
|
+
display: block;
|
|
398
|
+
font-size: var(--fs-base);
|
|
399
|
+
margin: var(--spacing-sm) 0;
|
|
400
|
+
max-width: var(--prose);
|
|
401
|
+
`;var I=({children:o})=>(0,e.jsx)("small",{css:Ee},o);var Ve=require("@emotion/react"),He=Ve.css`
|
|
402
|
+
align-items: center;
|
|
403
|
+
color: var(--brand-secondary-5);
|
|
404
|
+
display: flex;
|
|
405
|
+
gap: var(--spacing-sm);
|
|
406
|
+
margin: var(--spacing-xs) 0;
|
|
407
|
+
`;var S=({message:o})=>o?(0,e.jsx)("span",{css:He},(0,e.jsx)("svg",{width:"12",height:"12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.jsx)("g",{clipPath:"url(#a)"},(0,e.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.67 1.125A.77.77 0 0 0 6.005.75a.769.769 0 0 0-.665.375l-5.236 9a.735.735 0 0 0 0 .75.79.79 0 0 0 .664.376h10.473a.749.749 0 0 0 .76-.75.773.773 0 0 0-.095-.377L6.67 1.125Zm.1 8.623H5.24V8.246h1.53v1.502Zm0-2.253H5.24V4.49h1.53v3.005Z",fill:"currentColor"})),(0,e.jsx)("defs",null,(0,e.jsx)("clipPath",{id:"a"},(0,e.jsx)("path",{fill:"#fff",d:"M0 0h12v12H0z"})))),o):null;var Oe=b(require("react"));var q=({label:o,icon:r,id:n,caption:a,showLabel:t=!0,errorMessage:s,classNameContainer:c,classNameControl:p,classNameLabel:d,...g})=>(0,e.jsx)(Oe.Fragment,null,t?(0,e.jsx)("label",{htmlFor:n,css:[x,typeof d=="object"?d:void 0],className:typeof d=="string"?d:""},o):null,(0,e.jsx)("div",{css:[O,typeof c=="object"?c:void 0],className:typeof c=="string"?c:""},(0,e.jsx)("input",{id:n,css:[k,typeof p=="object"?p:void 0,s?P:void 0,r?se:""],"aria-label":t?void 0:o,className:typeof p=="string"?p:"",...g}),r?(0,e.jsx)("div",{css:ie},r):null),a?(0,e.jsx)(I,null,a):null,s?(0,e.jsx)(S,{message:s}):null);var Ge=b(require("react-select"));function Ko(o){return(0,e.jsx)(Ge.default,{...o,styles:{...o.styles,singleValue:(r,n)=>{var a,t;return{...r,...(t=(a=o.styles)==null?void 0:a.singleValue)==null?void 0:t.call(a,r,n),color:"#828282"}},valueContainer:(r,n)=>{var a,t;return{...r,...(t=(a=o.styles)==null?void 0:a.valueContainer)==null?void 0:t.call(a,r,n),padding:"var(--spacing-base)"}},input:(r,n)=>{var a,t;return{...r,...(t=(a=o.styles)==null?void 0:a.input)==null?void 0:t.call(a,r,n),margin:"0",padding:"0","& > input":{boxShadow:"none !important"}}},control:(r,n)=>({...r,border:n.isFocused?"1px solid transparent":"1px solid var(--gray-400)",outline:n.isFocused?"1px solid var(--brand-secondary-1)":"none",outlineOffset:0,boxShadow:"none","&:hover":{boxShadow:"none"}})}})}var Ne=require("@emotion/react"),Ue=b(require("react")),N=require("react");var T=require("@emotion/react"),Fe=T.css`
|
|
408
|
+
margin-inline: auto;
|
|
409
|
+
max-width: fit-content;
|
|
410
|
+
`,Ze=T.css`
|
|
411
|
+
align-items: center;
|
|
412
|
+
background: var(--brand-secondary-3);
|
|
413
|
+
border: 2px solid var(--brand-secondary-3);
|
|
414
|
+
border-radius: var(--rounded-base);
|
|
415
|
+
cursor: pointer;
|
|
416
|
+
color: var(--white);
|
|
417
|
+
display: flex;
|
|
418
|
+
gap: var(--spacing-sm);
|
|
419
|
+
font-size: var(--fs-sm);
|
|
420
|
+
padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-xs) var(--spacing-base);
|
|
421
|
+
|
|
422
|
+
&:disabled {
|
|
423
|
+
background: var(--white);
|
|
424
|
+
border-color: var(--gray-200);
|
|
425
|
+
cursor: default;
|
|
426
|
+
color: var(--gray-500);
|
|
427
|
+
padding-right: var(--spacing-base);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
&:focus {
|
|
431
|
+
outline: 2px solid var(--brand-secondary-1);
|
|
432
|
+
}
|
|
433
|
+
`,Ae=T.css`
|
|
434
|
+
background: var(--white);
|
|
435
|
+
border: 1px solid var(--brand-secondary-3);
|
|
436
|
+
border-top: none;
|
|
437
|
+
color: var(--brand-secondary-1);
|
|
438
|
+
display: block;
|
|
439
|
+
text-align: center;
|
|
440
|
+
position: absolute;
|
|
441
|
+
inset: auto 0;
|
|
442
|
+
transform: translateY(-0.2rem);
|
|
443
|
+
`,De=T.css`
|
|
444
|
+
cursor: pointer;
|
|
445
|
+
display: block;
|
|
446
|
+
font-size: var(--fs-sm);
|
|
447
|
+
padding: var(--spacing-xs) var(--spacing-base);
|
|
448
|
+
width: 100%;
|
|
449
|
+
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
450
|
+
|
|
451
|
+
&:focus {
|
|
452
|
+
outline: 2px solid var(--brand-secondary-1);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
&:hover {
|
|
456
|
+
background: var(--gray-50);
|
|
457
|
+
}
|
|
458
|
+
`,$e=T.css`
|
|
459
|
+
position: absolute;
|
|
460
|
+
overflow: hidden;
|
|
461
|
+
height: 1px;
|
|
462
|
+
width: 1px;
|
|
463
|
+
clip: rect(0, 0, 0, 0);
|
|
464
|
+
padding: 0;
|
|
465
|
+
`;var We=require("react-icons/cg"),_o=({classNameContainer:o,options:r,value:n,onChange:a,disabled:t,...s})=>{var f;let[c,p]=(0,N.useState)(!1),d=(0,N.useRef)(null);Ue.useEffect(()=>{let m=w=>{d.current&&!d.current.contains(w.target)&&p(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[d]);let g=r.find(m=>m.value===n);return(0,e.jsx)("div",{ref:d,css:o?Ne.css`
|
|
466
|
+
max-width: fit-content;
|
|
467
|
+
${typeof o=="object"?o:void 0}
|
|
468
|
+
`:Fe,className:typeof o=="string"?o:""},(0,e.jsx)("button",{type:"button","aria-controls":`and-or-${s.id}`,"aria-expanded":c,css:Ze,onClick:()=>{t||p(m=>!m)},disabled:t,...s},(0,e.jsx)("span",null,(f=g==null?void 0:g.label)!=null?f:n),t?null:(0,e.jsx)(_,{icon:We.CgChevronDown,iconColorClass:"currentColor"})),(0,e.jsx)("div",{id:`and-or-${s.id}`,css:[Ae,c?void 0:$e],"aria-hidden":!c},r.map(m=>(0,e.jsx)("button",{key:m.value,type:"button",css:De,onClick:()=>{a(m),p(w=>!w)}},m.label))))};var qo=({onSearchTextChanged:o,disabled:r=!1,placeholder:n="Keyword search",inputFieldName:a="keywordSearch",disabledFieldSubmission:t=!1,value:s})=>(0,e.jsx)(q,{type:"text",name:a,placeholder:n,showLabel:!1,value:s,icon:(0,e.jsx)("svg",{width:"26",height:"24",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",css:le},(0,e.jsx)("g",{clipPath:"url(#clip0)"},(0,e.jsx)("path",{d:"M11.539 0C5.48429 0 0.558105 4.74145 0.558105 10.5691C0.558105 16.3971 5.48429 21.1382 11.539 21.1382C17.594 21.1382 22.5199 16.3971 22.5199 10.5691C22.5199 4.74145 17.594 0 11.539 0ZM11.539 19.187C6.60198 19.187 2.58535 15.321 2.58535 10.5691C2.58535 5.81728 6.60198 1.95122 11.539 1.95122C16.476 1.95122 20.4926 5.81723 20.4926 10.5691C20.4926 15.321 16.476 19.187 11.539 19.187Z"}),(0,e.jsx)("path",{d:"M25.196 22.3344L19.3846 16.7409C18.9886 16.3598 18.3473 16.3598 17.9513 16.7409C17.5553 17.1217 17.5553 17.7397 17.9513 18.1205L23.7627 23.714C23.9607 23.9045 24.2199 23.9998 24.4794 23.9998C24.7385 23.9998 24.998 23.9045 25.196 23.714C25.592 23.3332 25.592 22.7153 25.196 22.3344Z"})),(0,e.jsx)("defs",null,(0,e.jsx)("clipPath",{id:"clip0"},(0,e.jsx)("rect",{width:"24.9351",height:"24",fill:"white",transform:"translate(0.558105)"})))),onChange:d=>{o(d.currentTarget.value)},onKeyPress:d=>{d.key==="Enter"&&t&&d.preventDefault()},disabled:r,"aria-label":n});var Jo=({label:o,defaultOption:r,options:n,caption:a,errorMessage:t,showLabel:s=!0,labelCta:c,classNameContainer:p,classNameControl:d,classNameLabel:g,...f})=>(0,e.jsx)("div",{css:[O,typeof p=="object"?p:void 0],className:typeof p=="string"?p:""},s?(0,e.jsx)("label",{htmlFor:f.id,css:[x,typeof g=="object"?g:void 0],className:typeof g=="string"?g:""},o,c):null,(0,e.jsx)("select",{title:o,"aria-label":s?void 0:o,css:[k,G,t?P:void 0,typeof d=="object"?d:void 0],className:typeof d=="string"?d:"",...f},r?(0,e.jsx)("option",{value:""},r):null,n.map((m,w)=>(0,e.jsx)("option",{key:w,value:m.label,...m}))),a?(0,e.jsx)(I,null,a):null,t?(0,e.jsx)(S,{message:t}):null);var Qo=({label:o,type:r,disabled:n,checked:a,name:t,caption:s,errorMessage:c,...p})=>(0,e.jsx)("label",{css:[ce,n?ue:void 0]},(0,e.jsx)("input",{type:r,css:pe,checked:a,name:t,disabled:n,...p}),(0,e.jsx)("span",{css:de},o),s||c?(0,e.jsx)("span",{css:me},s?(0,e.jsx)(I,null,s):null,c?(0,e.jsx)(S,{message:c}):null):null);var B=b(require("react")),z=require("reakit/Menu");var Ye=require("@emotion/react"),Ke=Ye.css`
|
|
469
|
+
border: 1px solid var(--gray-500);
|
|
470
|
+
border-radius: var(--rounded-base);
|
|
471
|
+
outline: none;
|
|
472
|
+
overflow: hidden;
|
|
473
|
+
z-index: 50;
|
|
474
|
+
`;var J=B.createContext({}),Q=()=>B.useContext(J),Xo=({menuLabel:o,menuTrigger:r,placement:n="auto",children:a})=>{let t=(0,z.useMenuState)({placement:n});return(0,e.jsx)(J.Provider,{value:t},(0,e.jsx)(z.MenuButton,{...t,ref:r.ref,...r.props},s=>B.cloneElement(r,s)),(0,e.jsx)(z.Menu,{...t,"aria-label":o,css:Ke},a))};var Je=b(require("react")),ee=require("reakit");var X=require("@emotion/react"),j=X.css`
|
|
475
|
+
background: var(--white);
|
|
476
|
+
border-top: 1px solid var(--gray-500);
|
|
477
|
+
color: var(--brand-secondary-1);
|
|
478
|
+
display: block;
|
|
479
|
+
padding: var(--spacing-sm) var(--spacing-base);
|
|
480
|
+
font-weight: var(--fw-bold);
|
|
481
|
+
width: 100%;
|
|
482
|
+
|
|
483
|
+
&:first-of-type {
|
|
484
|
+
border-top-color: var(--white);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
&:disabled {
|
|
488
|
+
color: var(--gray-500);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
&:focus {
|
|
492
|
+
outline: none;
|
|
493
|
+
box-shadow: var(--ring-inset);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
&:hover {
|
|
497
|
+
background: var(--gray-200);
|
|
498
|
+
}
|
|
499
|
+
`,_e=X.css`
|
|
500
|
+
align-items: center;
|
|
501
|
+
display: flex;
|
|
502
|
+
justify-content: space-between;
|
|
503
|
+
gap: var(--spacing-base);
|
|
504
|
+
|
|
505
|
+
svg {
|
|
506
|
+
align-self: center;
|
|
507
|
+
width: var(--spacing-base);
|
|
508
|
+
height: var(--spacing-base);
|
|
509
|
+
}
|
|
510
|
+
`;var jo=Je.forwardRef(({children:o,className:r,hideMenuOnClick:n=!0,icon:a,...t},s)=>{let c=Q(),p=g=>{let f={...g};if(f.onClick){let m=f.onClick;f.onClick=w=>{c.hide(),m(w)}}return f};if(typeof o=="function")return(0,e.jsx)(ee.MenuItem,{ref:s,"data-testid":"uniform-menuItem",...c,...t,css:j},g=>{let f=n?p(g):g,m=o(f);return a?qe(m,a):m});let d=n?p(t):t;return(0,e.jsx)(ee.MenuItem,{ref:s,...c,...d,css:j},a?qe(o,a):o)});function qe(o,r){return(0,e.jsx)("span",{css:_e},o," ",r)}var l=require("@emotion/react");var Qe=({...o})=>(0,e.jsx)("svg",{role:"img","data-img":"info",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...o},(0,e.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})),Xe=({...o})=>(0,e.jsx)("svg",{role:"img","data-img":"danger",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...o},(0,e.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})),je=({...o})=>(0,e.jsx)("svg",{role:"img","data-img":"note",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...o},(0,e.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})),eo=({...o})=>(0,e.jsx)("svg",{role:"img","data-img":"tip",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...o},(0,e.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})),oe=({...o})=>(0,e.jsx)("svg",{role:"img","data-img":"caution",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...o},(0,e.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})),oo=({...o})=>(0,e.jsx)("svg",{role:"img","data-img":"success",width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...o},(0,e.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"}));var M=require("@emotion/react"),ro=M.css`
|
|
511
|
+
--caution-desc: rgb(161, 98, 7);
|
|
512
|
+
--caution-icon: rgb(250, 204, 21);
|
|
513
|
+
--caution-title: rgb(133, 77, 14);
|
|
514
|
+
--caution-container: rgb(254, 252, 232);
|
|
515
|
+
|
|
516
|
+
--danger-desc: rgb(185, 28, 28);
|
|
517
|
+
--danger-icon: rgb(248, 113, 113);
|
|
518
|
+
--danger-title: rgb(153, 27, 27);
|
|
519
|
+
--danger-container: rgb(254, 242, 242);
|
|
520
|
+
|
|
521
|
+
--info-desc: rgb(29, 78, 216);
|
|
522
|
+
--info-icon: rgb(96, 165, 250);
|
|
523
|
+
--info-title: rgb(30, 64, 175);
|
|
524
|
+
--info-container: rgb(239, 246, 255);
|
|
525
|
+
|
|
526
|
+
--note-desc: var(--gray-700);
|
|
527
|
+
--note-icon: var(--gray-400);
|
|
528
|
+
--note-title: var(--gray-800);
|
|
529
|
+
--note-container: var(--gray-50);
|
|
530
|
+
|
|
531
|
+
--success-desc: rgb(21, 128, 61);
|
|
532
|
+
--success-icon: rgb(74, 222, 128);
|
|
533
|
+
--success-title: rgb(22, 101, 52);
|
|
534
|
+
--success-container: rgb(240, 253, 250);
|
|
535
|
+
|
|
536
|
+
border-radius: var(--rounded-base);
|
|
537
|
+
padding: var(--spacing-base);
|
|
538
|
+
`,to=M.css`
|
|
539
|
+
display: flex;
|
|
540
|
+
gap: var(--spacing-base);
|
|
541
|
+
`,no=M.css`
|
|
542
|
+
flex-shrink: 0;
|
|
543
|
+
`,ao=M.css`
|
|
544
|
+
font-size: var(--fs-sm);
|
|
545
|
+
font-weight: var(--fw-bold);
|
|
546
|
+
margin: 0 0 var(--spacing-sm);
|
|
547
|
+
`,io=M.css`
|
|
548
|
+
font-size: var(--fs-sm);
|
|
549
|
+
`,so=M.css`
|
|
550
|
+
width: 1.25rem;
|
|
551
|
+
height: 1.25rem;
|
|
552
|
+
`;var er={caution:{icon:oe,descriptionColor:l.css`
|
|
553
|
+
color: var(--caution-desc);
|
|
554
|
+
`,iconColor:l.css`
|
|
555
|
+
color: var(--caution-icon);
|
|
556
|
+
`,titleColor:l.css`
|
|
557
|
+
color: var(--caution-title);
|
|
558
|
+
`,containerColor:l.css`
|
|
559
|
+
background-color: var(--caution-container);
|
|
560
|
+
`},danger:{icon:Xe,descriptionColor:l.css`
|
|
561
|
+
color: var(--danger-desc);
|
|
562
|
+
`,iconColor:l.css`
|
|
563
|
+
color: var(--danger-icon);
|
|
564
|
+
`,titleColor:l.css`
|
|
565
|
+
color: var(--danger-title);
|
|
566
|
+
`,containerColor:l.css`
|
|
567
|
+
background-color: var(--danger-container);
|
|
568
|
+
`},error:{icon:oe,descriptionColor:l.css`
|
|
569
|
+
color: var(--danger-desc);
|
|
570
|
+
`,iconColor:l.css`
|
|
571
|
+
color: var(--danger-icon);
|
|
572
|
+
`,titleColor:l.css`
|
|
573
|
+
color: var(--danger-title);
|
|
574
|
+
`,containerColor:l.css`
|
|
575
|
+
background-color: var(--danger-container);
|
|
576
|
+
`},info:{icon:Qe,descriptionColor:l.css`
|
|
577
|
+
color: var(--info-desc);
|
|
578
|
+
`,iconColor:l.css`
|
|
579
|
+
color: var(--info-icon);
|
|
580
|
+
`,titleColor:l.css`
|
|
581
|
+
color: var(--info-title);
|
|
582
|
+
`,containerColor:l.css`
|
|
583
|
+
background-color: var(--info-container);
|
|
584
|
+
`},note:{icon:je,descriptionColor:l.css`
|
|
585
|
+
color: var(--note-desc);
|
|
586
|
+
`,iconColor:l.css`
|
|
587
|
+
color: var(--note-icon);
|
|
588
|
+
`,titleColor:l.css`
|
|
589
|
+
color: var(--note-title);
|
|
590
|
+
`,containerColor:l.css`
|
|
591
|
+
background-color: var(--note-container);
|
|
592
|
+
`},success:{icon:oo,descriptionColor:l.css`
|
|
593
|
+
color: var(--success-desc);
|
|
594
|
+
`,iconColor:l.css`
|
|
595
|
+
color: var(--success-icon);
|
|
596
|
+
`,titleColor:l.css`
|
|
597
|
+
color: var(--success-title);
|
|
598
|
+
`,containerColor:l.css`
|
|
599
|
+
background-color: var(--success-container);
|
|
600
|
+
`},tip:{icon:eo,descriptionColor:l.css`
|
|
601
|
+
color: var(--success-desc);
|
|
602
|
+
`,iconColor:l.css`
|
|
603
|
+
color: var(--success-icon);
|
|
604
|
+
`,titleColor:l.css`
|
|
605
|
+
color: var(--success-title);
|
|
606
|
+
`,containerColor:l.css`
|
|
607
|
+
background-color: var(--success-container);
|
|
608
|
+
`}},or=({type:o="info",title:r,children:n,className:a})=>{let t=er[o];if(!t)return null;let s=t.icon;return(0,e.jsx)("div",{"data-testid":"sdk-ui-callout",css:[ro,t.containerColor,typeof a=="object"?a:""],className:`${typeof a=="string"?a:""}`},(0,e.jsx)("div",{css:to},(0,e.jsx)("div",{css:no},(0,e.jsx)(s,{css:[so,t.iconColor]})),(0,e.jsx)("div",null,r?(0,e.jsx)("h3",{css:[ao,t.titleColor]},r):null,n?(0,e.jsx)("div",{css:[io,t.descriptionColor]},n):null)))};var E=require("@emotion/react"),rr=E.keyframes`
|
|
609
|
+
0%, 100% {
|
|
610
|
+
opacity: 1.0;
|
|
611
|
+
transform: translateY(0);
|
|
612
|
+
}
|
|
613
|
+
30% {
|
|
614
|
+
opacity: 0.6;
|
|
615
|
+
}
|
|
616
|
+
80% {
|
|
617
|
+
opacity: 0.4;
|
|
618
|
+
transform: translateY(-10px);
|
|
619
|
+
}
|
|
620
|
+
90% {
|
|
621
|
+
opacity: 0.2;
|
|
622
|
+
transform: translateY(-5px);
|
|
623
|
+
}
|
|
624
|
+
`,lo=E.css`
|
|
625
|
+
display: inline-flex;
|
|
626
|
+
justify-content: center;
|
|
627
|
+
`,U=E.css`
|
|
628
|
+
background-color: var(--gray-700);
|
|
629
|
+
display: block;
|
|
630
|
+
border-radius: var(--rounded-full);
|
|
631
|
+
animation: ${rr} 0.75s infinite ease-in-out;
|
|
632
|
+
width: 8px;
|
|
633
|
+
height: 8px;
|
|
634
|
+
margin: 0 var(--spacing-xs);
|
|
635
|
+
transform: translateY(0);
|
|
636
|
+
|
|
637
|
+
&:nth-of-type(1) {
|
|
638
|
+
animation-delay: 0.15s;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
&:nth-of-type(2) {
|
|
642
|
+
animation-delay: 0.3s;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
&:nth-of-type(3) {
|
|
646
|
+
animation-delay: 0.6s;
|
|
647
|
+
}
|
|
648
|
+
`;var tr=()=>(0,e.jsx)("div",{css:lo,role:"alert"},(0,e.jsx)("span",{css:U}),(0,e.jsx)("span",{css:U}),(0,e.jsx)("span",{css:U}));var vo=require("@emotion/react");var R=require("@emotion/react"),co=R.css`
|
|
649
|
+
align-items: center;
|
|
650
|
+
position: absolute;
|
|
651
|
+
inset: 0 0;
|
|
652
|
+
overflow: hidden;
|
|
653
|
+
z-index: 9999;
|
|
654
|
+
justify-content: center;
|
|
655
|
+
`,po=R.css`
|
|
656
|
+
display: flex;
|
|
657
|
+
`,uo=R.css`
|
|
658
|
+
display: none;
|
|
659
|
+
`,mo=R.css`
|
|
660
|
+
background: var(--white);
|
|
661
|
+
opacity: 0.5;
|
|
662
|
+
position: absolute;
|
|
663
|
+
inset: 0 0;
|
|
664
|
+
`,go=R.css`
|
|
665
|
+
align-items: center;
|
|
666
|
+
display: flex;
|
|
667
|
+
flex-direction: column;
|
|
668
|
+
`,fo=R.css`
|
|
669
|
+
color: var(--gray-500);
|
|
670
|
+
margin: var(--spacing-base) 0 0;
|
|
671
|
+
`;var nr=({isActive:o,statusMessage:r})=>(0,e.jsx)("div",{role:"alert",css:[co,o?po:uo],"aria-hidden":!o},(0,e.jsx)("div",{css:mo}),(0,e.jsx)("div",{css:vo.css`
|
|
672
|
+
position: relative;
|
|
673
|
+
`},(0,e.jsx)("div",{css:go},(0,e.jsx)(bo,{height:128,width:128}),r?(0,e.jsx)("div",{css:fo},r):null))),bo=({height:o,width:r})=>(0,e.jsx)("svg",{"data-testid":"svg",viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",width:r!=null?r:40,height:o!=null?o:40,stroke:"currentColor"},(0,e.jsx)("g",{fill:"none",fillRule:"evenodd"},(0,e.jsx)("g",{transform:"translate(1 1)",strokeWidth:"2"},(0,e.jsx)("circle",{strokeOpacity:".25",cx:"18",cy:"18",r:"18"}),(0,e.jsx)("path",{d:"M36 18c0-9.94-8.06-18-18-18",transform:"rotate(166.645 18 18)"},(0,e.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.8s",repeatCount:"indefinite"})))));var y=require("@emotion/react"),ho=y.css`
|
|
674
|
+
font-family: var(--ff-heading);
|
|
675
|
+
font-size: clamp(1.5rem, var(--fluid-font-base), 2.25rem);
|
|
676
|
+
font-weight: var(--font-bold);
|
|
677
|
+
`,yo=y.css`
|
|
678
|
+
font-size: clamp(1.35rem, var(--fluid-font-base), 1.75rem);
|
|
679
|
+
`,xo=y.css`
|
|
680
|
+
font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
|
|
681
|
+
`,wo=y.css`
|
|
682
|
+
font-size: clamp(1.15rem, var(--fluid-font-base), 1.35rem);
|
|
683
|
+
`,Co=y.css`
|
|
684
|
+
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.25rem);
|
|
685
|
+
`,Io=y.css`
|
|
686
|
+
font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
|
|
687
|
+
`,So=y.css`
|
|
688
|
+
font-weight: var(--fw-bold);
|
|
689
|
+
font-family: var(--ff-base);
|
|
690
|
+
`,Rt=y.css`
|
|
691
|
+
line-height: 1.35;
|
|
692
|
+
`;var ar=({level:o=2,children:r})=>{let n=`h${o}`,a={h1:ho,h2:yo,h3:xo,h4:wo,h5:Co,h6:Io},t=n.includes("h1")?void 0:So;return(0,e.jsx)(n,{css:[a[n],t]},r)};var ko=require("@emotion/react");var re=require("@emotion/react"),Mo=re.css`
|
|
693
|
+
position: relative;
|
|
694
|
+
`,Ro=re.css`
|
|
695
|
+
background: var(--gray-50);
|
|
696
|
+
border-top: 1px solid var(--gray-200);
|
|
697
|
+
border-bottom: 1px solid var(--gray-200);
|
|
698
|
+
max-height: 24rem;
|
|
699
|
+
overflow-y: auto;
|
|
700
|
+
padding: var(--spacing-sm);
|
|
701
|
+
`;var ir=({label:o,children:r})=>(0,e.jsx)("div",{css:Mo},o?(0,e.jsx)("span",{css:ko.css`
|
|
702
|
+
${x}
|
|
703
|
+
`},o):null,(0,e.jsx)("div",{css:[Ro,F]},r));var W=require("@emotion/react"),Po=W.css`
|
|
704
|
+
align-items: center;
|
|
705
|
+
background: var(--white);
|
|
706
|
+
border-radius: var(--rounded-base);
|
|
707
|
+
box-shadow: var(--shadow-base);
|
|
708
|
+
border: 2px solid var(--gray-200);
|
|
709
|
+
display: flex;
|
|
710
|
+
padding: var(--spacing-3);
|
|
711
|
+
margin-block: var(--spacing-sm);
|
|
712
|
+
min-height: 52px;
|
|
713
|
+
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
714
|
+
|
|
715
|
+
&:first-of-type,
|
|
716
|
+
&:last-of-type {
|
|
717
|
+
margin-block: 0;
|
|
718
|
+
}
|
|
719
|
+
`,Lo=W.css`
|
|
720
|
+
border-color: var(--brand-secondary-3);
|
|
721
|
+
`,To=W.css`
|
|
722
|
+
align-items: center;
|
|
723
|
+
display: flex;
|
|
724
|
+
justify-content: space-between;
|
|
725
|
+
width: 100%;
|
|
726
|
+
outline: none;
|
|
727
|
+
|
|
728
|
+
&:focus {
|
|
729
|
+
outline: none;
|
|
730
|
+
}
|
|
731
|
+
`;var te=require("@emotion/react");var V=require("@emotion/react"),Ht=V.keyframes`
|
|
732
|
+
0%,
|
|
733
|
+
100% {
|
|
734
|
+
transform: scale(1);
|
|
735
|
+
opacity: 1;
|
|
736
|
+
}
|
|
737
|
+
50% {
|
|
738
|
+
transform: scale(1.15);
|
|
739
|
+
opacity: 1;
|
|
740
|
+
}
|
|
741
|
+
`,Bo=V.keyframes`
|
|
742
|
+
0% {
|
|
743
|
+
opacity: 0;
|
|
744
|
+
transform: translateY(10px);
|
|
745
|
+
}
|
|
746
|
+
100% {
|
|
747
|
+
opacity: 1;
|
|
748
|
+
transform: translateY(0);
|
|
749
|
+
}
|
|
750
|
+
`,Ot=V.keyframes`
|
|
751
|
+
0% {
|
|
752
|
+
opacity: 1;
|
|
753
|
+
transform: translateY(0);
|
|
754
|
+
}
|
|
755
|
+
100% {
|
|
756
|
+
opacity: 0;
|
|
757
|
+
transform: translateY(10px);
|
|
758
|
+
}
|
|
759
|
+
`,Gt=V.keyframes`
|
|
760
|
+
0% {
|
|
761
|
+
opacity: 0;
|
|
762
|
+
}
|
|
763
|
+
100% {
|
|
764
|
+
opacity: 1;
|
|
765
|
+
}
|
|
766
|
+
`;var sr=({buttonText:o,active:r,...n})=>(0,e.jsx)("div",{css:[Po,r?Lo:void 0],className:"flex items-center space-x-2 p-3 bg-white border-2 rounded-md shadow-md border-gray-300"},(0,e.jsx)("button",{css:To,className:"flex items-center justify-between w-full outline-none focus:outline-none",type:"button",...n},(0,e.jsx)("span",null,o),(0,e.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!r,css:te.css`
|
|
767
|
+
color: var(--brand-secondary-3);
|
|
768
|
+
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
769
|
+
${r?te.css`
|
|
770
|
+
animation: ${Bo} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
771
|
+
`:"opacity: 0;"}
|
|
772
|
+
`},(0,e.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"}))));0&&(module.exports={Button,Callout,Caption,ErrorMessage,Heading,Icon,IconsProvider,Input,InputComboBox,InputInlineSelect,InputKeywordSearch,InputSelect,InputToggle,LoadingIcon,LoadingIndicator,LoadingOverlay,Menu,MenuContext,MenuItem,ScrollableList,ScrollableListItem,Theme,UniformBadge,UniformLogo,breakpoints,input,inputError,inputSelect,labelText,mq,scrollbarStyles,useIconContext,useMenuContext});
|