@uniformdev/design-system 13.0.1-alpha.96

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/dist/index.js ADDED
@@ -0,0 +1,682 @@
1
+ var vo=Object.create;var E=Object.defineProperty;var bo=Object.getOwnPropertyDescriptor;var yo=Object.getOwnPropertyNames;var ho=Object.getPrototypeOf,xo=Object.prototype.hasOwnProperty;var Co=(o,r)=>{for(var n in r)E(o,n,{get:r[n],enumerable:!0})},Q=(o,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of yo(r))!xo.call(o,t)&&t!==n&&E(o,t,{get:()=>r[t],enumerable:!(a=bo(r,t))||a.enumerable});return o};var b=(o,r,n)=>(n=o!=null?vo(ho(o)):{},Q(r||!o||!o.__esModule?E(n,"default",{value:o,enumerable:!0}):n,o)),wo=o=>Q(E({},"__esModule",{value:!0}),o);var Zo={};Co(Zo,{Button:()=>So,Callout:()=>Fo,Caption:()=>C,ErrorMessage:()=>w,Heading:()=>Go,Icon:()=>Z,IconsProvider:()=>Mo,Input:()=>N,InputInlineSelect:()=>zo,InputKeywordSearch:()=>Lo,InputSelect:()=>To,InputToggle:()=>Bo,LoadingIcon:()=>so,LoadingIndicator:()=>Do,LoadingOverlay:()=>Vo,Menu:()=>Eo,MenuContext:()=>W,MenuItem:()=>Ho,Theme:()=>Io,breakpoints:()=>be,input:()=>M,inputError:()=>R,inputSelect:()=>F,mq:()=>G,scrollbarStyles:()=>ie,useIconContext:()=>V,useMenuContext:()=>$});module.exports=wo(Zo);var e=require("@emotion/react"),g=b(require("react"));var J=b(require("react")),Io=({disableReset:o=!1})=>(0,e.jsx)(J.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",null,`
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",null,`
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 {
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"),H=v.css`
167
+ position: relative;
168
+ `,O=v.css`
169
+ display: block;
170
+ font-weight: var(--fw-bold);
171
+ margin: 0 0 var(--spacing-xs);
172
+ `,M=v.css`
173
+ appearance: none;
174
+ background-color: var(--white);
175
+ border: 1px solid var(--gray-400);
176
+ border-radius: var(--rounded-md);
177
+ color: var(--gray-700);
178
+ padding: var(--spacing-base);
179
+ width: 100%;
180
+ position: relative;
181
+ transition: background var(--duration-fast) var(--timing-ease-out),
182
+ border-color var(--duration-fast) var(--timing-ease-out),
183
+ color var(--duration-fast) var(--timing-ease-out);
184
+
185
+ &::placeholder {
186
+ color: var(--gray-400);
187
+ }
188
+
189
+ &:focus,
190
+ &:focus-within {
191
+ border-color: var(--brand-secondary-1);
192
+ outline: none;
193
+ }
194
+
195
+ &:disabled,
196
+ &:disabled::placeholder {
197
+ cursor: not-allowed;
198
+ color: var(--gray-300);
199
+ border-color: var(--gray-300);
200
+ }
201
+ `,R=v.css`
202
+ border-color: var(--brand-secondary-5);
203
+ `,X=v.css`
204
+ align-items: center;
205
+ display: flex;
206
+ position: absolute;
207
+ inset: 0 var(--spacing-base) 0 auto;
208
+ pointer-event: one;
209
+ `,_=v.css`
210
+ padding-right: var(--spacing-2xl);
211
+ `,F=v.css`
212
+ 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");
213
+ background-position: right var(--spacing-sm) center;
214
+ background-repeat: no-repeat;
215
+ background-size: 1rem;
216
+ padding-right: var(--spacing-xl);
217
+ `,j=v.css`
218
+ color: var(--brand-secondary-1);
219
+ height: 1.25rem;
220
+ width: 1.25rem;
221
+ `,ee=v.css`
222
+ align-items: center;
223
+ cursor: pointer;
224
+ display: inline-flex;
225
+ gap: var(--spacing-sm);
226
+ margin: var(--spacing-sm) 0;
227
+ flex-wrap: wrap;
228
+ `,oe=v.css`
229
+ border: 1px solid var(--brand-secondary-1);
230
+ background: var(--white);
231
+ width: var(--spacing-md);
232
+ height: var(--spacing-md);
233
+ transition: background var(--duration) var(--timing), border-color var(--duration) var(--timing),
234
+ color var(--duration) var(--timing);
235
+
236
+ &[type='radio'] {
237
+ border-radius: var(--rounded-full);
238
+ }
239
+
240
+ &[type='checkbox'] {
241
+ border-radius: var(--rounded-base);
242
+ }
243
+
244
+ &:checked,
245
+ &:checked:hover,
246
+ &:checked:focus {
247
+ background: var(--brand-secondary-3)
248
+ 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")
249
+ no-repeat center center;
250
+ border-color: var(--brand-secondary-3);
251
+ color: var(--white);
252
+ }
253
+
254
+ &:disabled {
255
+ cursor: not-allowed;
256
+ color: var(--gray-300);
257
+ border-color: var(--gray-300);
258
+ }
259
+ `,re=v.css`
260
+ font-weight: var(--font-medium);
261
+ `,te=v.css`
262
+ cursor: not-allowed;
263
+ color: var(--gray-400);
264
+ `,ne=v.css`
265
+ display: flex;
266
+ flex-direction: column;
267
+ flex-basis: 100%;
268
+ padding-left: var(--spacing-lg);
269
+ margin-top: -0.5rem;
270
+ line-height: 1.15;
271
+ `;var ae=require("@emotion/react"),ie=ae.css`
272
+ @supports ((scrollbar-color: #d1d5db transparent) and (scrollbar-width: thin)) {
273
+ /*
274
+ #d1d5db = bg-gray-300
275
+ scrollbar-color first arg is the thumb, the second arg is the trackbar color
276
+ hover state in firefox is controlled within the browser
277
+ */
278
+ scrollbar-color: #d1d5db transparent;
279
+ scrollbar-width: thin;
280
+ }
281
+
282
+ &::-webkit-scrollbar {
283
+ width: 8px;
284
+ height: 8px;
285
+ }
286
+ &::-webkit-scrollbar-track {
287
+ background: transparent;
288
+ border-radius: var(--rounded-base);
289
+ }
290
+ &::-webkit-scrollbar-thumb {
291
+ background: var(--gray-300);
292
+ border-radius: var(--rounded-base);
293
+ }
294
+ &::-webkit-scrollbar-thumb:hover {
295
+ background: var(--gray-500);
296
+ }
297
+ `;var ge=b(require("react")),me=require("reakit/Button");var x=require("@emotion/react"),se=x.css`
298
+ align-items: center;
299
+ border: 1px solid transparent;
300
+ cursor: pointer;
301
+ display: inline-flex;
302
+ font-weight: var(--fw-medium);
303
+ transition: opacity var(--duration-fast) var(--timing-ease-out),
304
+ color var(--duration-fast) var(--timing-ease-out),
305
+ border-color var(--duration-fast) var(--timing-ease-out);
306
+
307
+ &:focus {
308
+ outline: none;
309
+ border-color: var(--gray-700);
310
+ box-shadow: var(--ring);
311
+ }
312
+
313
+ &:hover,
314
+ &:active {
315
+ opacity: var(--opacity-75);
316
+ }
317
+
318
+ &:disabled {
319
+ cursor: not-allowed;
320
+ }
321
+ `,ce=x.css`
322
+ background: var(--brand-secondary-1);
323
+ color: var(--white);
324
+
325
+ &:disabled {
326
+ background: var(--gray-500);
327
+ color: var(--white);
328
+ }
329
+ `,le=x.css`
330
+ background: var(--brand-secondary-5);
331
+ color: var(--white);
332
+
333
+ &:disabled {
334
+ background: var(--gray-500);
335
+ color: var(--white);
336
+ }
337
+ `,de=x.css`
338
+ background: var(--brand-secondary-2);
339
+ color: var(--brand-secondary-1);
340
+
341
+ &:disabled {
342
+ background: var(--brand-secondary-2);
343
+ color: var(--gray-400);
344
+ }
345
+ `,pe=x.css`
346
+ background: transparent;
347
+ color: var(--brand-secondary-3);
348
+
349
+ &:hover {
350
+ border-color: var(--brand-secondary-3);
351
+ }
352
+
353
+ &:disabled {
354
+ background: transparent;
355
+ border-color: var(--gray-400);
356
+ color: var(--gray-400);
357
+ }
358
+ `,ue=x.css`
359
+ background: var(--brand-secondary-3);
360
+ color: var(--white);
361
+
362
+ &:disabled {
363
+ background: var(--gray-500);
364
+ color: var(--white);
365
+ }
366
+ `;var So=ge.forwardRef(({buttonType:o="primary",size:r="md",children:n,...a},t)=>{let s={primary:ce,secondary:le,ghost:pe,unimportant:de,tertiary:ue},l={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)(me.Button,{"data-testid":"uniform-button",ref:t,css:[se,s[o],l[r]],...a},n)});var Ie=b(require("react"));var y=require("react"),fe=require("param-case"),ve=(0,y.createContext)({iconsMap:{},isLoading:!0});function V(){return(0,y.useContext)(ve)}function Mo({children:o}){let[r,n]=(0,y.useState)(!0),[a,t]=(0,y.useState)({});return(0,y.useEffect)(()=>{import("react-icons/cg").then(s=>{let l=Object.entries(s).reduce((d,[p,m])=>{if(p==="default")return d;let f=Ro(p);return{...d,[f]:m}},{});t(l),n(!1)})},[]),(0,e.jsx)(ve.Provider,{value:{iconsMap:a,isLoading:r}},o)}function Ro(o){return(0,fe.paramCase)(o.replace("Cg",""))}var k=require("@emotion/react");var be={sm:"640px",md:"768px",lg:"1025px",xl:"1280px","2xl":"1536px"},G=o=>`@media (min-width: ${be[o]})`;var ye=k.css`
367
+ display: hidden;
368
+
369
+ ${G("sm")} {
370
+ display: block;
371
+ }
372
+
373
+ & svg {
374
+ display: block;
375
+ vertical-align: middle;
376
+ }
377
+ `,he=k.css`
378
+ color: var(--brand-secondary-3);
379
+ `,xe=k.css`
380
+ color: var(--brand-secondary-5);
381
+ `,Ce=k.css`
382
+ color: var(--gray-500);
383
+ `,we=k.css`
384
+ color: currentColor;
385
+ `;var Po=({icon:o,iconColorClass:r="green",...n})=>{let a=typeof o=="string",{iconsMap:t,isLoading:s}=V(),l={green:he,gray:Ce,red:xe,currentColor:we};if(a&&s)return null;let d=a?t[o]:o;return a&&d===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)(d,{role:"img",...n,css:[ye,l[r]]})},Z=Ie.default.memo(Po);var Se=require("@emotion/react"),Me=Se.css`
386
+ color: var(--gray-500);
387
+ display: block;
388
+ font-size: var(--fs-base);
389
+ margin: var(--spacing-sm) 0;
390
+ max-width: var(--prose);
391
+ `;var C=({children:o})=>(0,e.jsx)("small",{css:Me},o);var Re=require("@emotion/react"),ke=Re.css`
392
+ align-items: center;
393
+ color: var(--brand-secondary-5);
394
+ display: flex;
395
+ gap: var(--spacing-sm);
396
+ margin: var(--spacing-xs) 0;
397
+ `;var w=({message:o})=>o?(0,e.jsx)("span",{css:ke},(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 Pe=b(require("react"));var N=({label:o,icon:r,id:n,caption:a,showLabel:t=!0,errorMessage:s,classNameContainer:l,classNameControl:d,classNameLabel:p,...m})=>(0,e.jsx)(Pe.Fragment,null,t?(0,e.jsx)("label",{htmlFor:n,css:[O,typeof p=="object"?p:void 0],className:typeof p=="string"?p:""},o):null,(0,e.jsx)("div",{css:[H,typeof l=="object"?l:void 0],className:typeof l=="string"?l:""},(0,e.jsx)("input",{id:n,css:[M,typeof d=="object"?d:void 0,s?R:void 0,r?_:""],"aria-label":t?void 0:o,className:typeof d=="string"?d:"",...m}),r?(0,e.jsx)("div",{css:X},r):null),a?(0,e.jsx)(C,null,a):null,s?(0,e.jsx)(w,{message:s}):null);var To=({label:o,defaultOption:r,options:n,caption:a,errorMessage:t,showLabel:s=!0,classNameContainer:l,classNameControl:d,classNameLabel:p,...m})=>(0,e.jsx)("div",{css:[H,typeof l=="object"?l:void 0],className:typeof l=="string"?l:""},s?(0,e.jsx)("label",{htmlFor:m.id,css:[O,typeof p=="object"?p:void 0],className:typeof p=="string"?p:""},o):null,(0,e.jsx)("select",{title:o,"aria-label":s?void 0:o,css:[M,F,t?R:void 0,typeof d=="object"?d:void 0],className:typeof d=="string"?d:"",...m},r?(0,e.jsx)("option",{value:""},r):null,n.map((f,u)=>(0,e.jsx)("option",{key:u,value:f.label,...f}))),a?(0,e.jsx)(C,null,a):null,t?(0,e.jsx)(w,{message:t}):null);var He=require("@emotion/react"),Oe=b(require("react")),A=require("react");var P=require("@emotion/react"),Te=P.css`
398
+ margin-inline: auto;
399
+ max-width: fit-content;
400
+ `,ze=P.css`
401
+ align-items: center;
402
+ background: var(--brand-secondary-3);
403
+ border: 2px solid var(--brand-secondary-3);
404
+ border-radius: var(--rounded-base);
405
+ cursor: pointer;
406
+ color: var(--white);
407
+ display: flex;
408
+ gap: var(--spacing-sm);
409
+ font-size: var(--fs-sm);
410
+ padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-xs) var(--spacing-base);
411
+
412
+ &:disabled {
413
+ background: var(--white);
414
+ border-color: var(--gray-200);
415
+ cursor: default;
416
+ color: var(--gray-500);
417
+ padding-right: var(--spacing-base);
418
+ }
419
+
420
+ &:focus {
421
+ outline: 2px solid var(--brand-secondary-1);
422
+ }
423
+ `,Le=P.css`
424
+ background: var(--white);
425
+ border: 1px solid var(--brand-secondary-3);
426
+ border-top: none;
427
+ color: var(--brand-secondary-1);
428
+ display: block;
429
+ text-align: center;
430
+ position: absolute;
431
+ inset: auto 0;
432
+ transform: translateY(-0.2rem);
433
+ `,Be=P.css`
434
+ cursor: pointer;
435
+ display: block;
436
+ font-size: var(--fs-sm);
437
+ padding: var(--spacing-xs) var(--spacing-base);
438
+ width: 100%;
439
+ transition: background-color var(--duration-fast) var(--timing-ease-out);
440
+
441
+ &:focus {
442
+ outline: 2px solid var(--brand-secondary-1);
443
+ }
444
+
445
+ &:hover {
446
+ background: var(--gray-50);
447
+ }
448
+ `,Ee=P.css`
449
+ position: absolute;
450
+ overflow: hidden;
451
+ height: 1px;
452
+ width: 1px;
453
+ clip: rect(0, 0, 0, 0);
454
+ padding: 0;
455
+ `;var Fe=require("react-icons/cg"),zo=({classNameContainer:o,options:r,value:n,onChange:a,disabled:t,...s})=>{var f;let[l,d]=(0,A.useState)(!1),p=(0,A.useRef)(null);Oe.useEffect(()=>{let u=L=>{p.current&&!p.current.contains(L.target)&&d(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[p]);let m=r.find(u=>u.value===n);return(0,e.jsx)("div",{ref:p,css:o?He.css`
456
+ max-width: fit-content;
457
+ ${typeof o=="object"?o:void 0}
458
+ `:Te,className:typeof o=="string"?o:""},(0,e.jsx)("button",{type:"button","aria-controls":`and-or-${s.id}`,"aria-expanded":l,css:ze,onClick:()=>{t||d(u=>!u)},disabled:t,...s},(0,e.jsx)("span",null,(f=m==null?void 0:m.label)!=null?f:n),t?null:(0,e.jsx)(Z,{icon:Fe.CgChevronDown,iconColorClass:"currentColor"})),(0,e.jsx)("div",{id:`and-or-${s.id}`,css:[Le,l?void 0:Ee],"aria-hidden":!l},r.map(u=>(0,e.jsx)("button",{key:u.value,type:"button",css:Be,onClick:()=>{a(u),d(L=>!L)}},u.label))))};var Lo=({onSearchTextChanged:o,disabled:r=!1,placeholder:n="Keyword search",inputFieldName:a="keywordSearch",disabledFieldSubmission:t=!1,value:s})=>(0,e.jsx)(N,{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:j},(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:p=>{o(p.currentTarget.value)},onKeyPress:p=>{p.key==="Enter"&&t&&p.preventDefault()},disabled:r,"aria-label":n});var Bo=({label:o,type:r,disabled:n,checked:a,name:t,caption:s,errorMessage:l,...d})=>(0,e.jsx)("label",{css:[ee,n?te:void 0]},(0,e.jsx)("input",{type:r,css:oe,checked:a,name:t,disabled:n,...d}),(0,e.jsx)("span",{css:re},o),s||l?(0,e.jsx)("span",{css:ne},s?(0,e.jsx)(C,null,s):null,l?(0,e.jsx)(w,{message:l}):null):null);var T=b(require("react")),z=require("reakit/Menu");var Ae=require("@emotion/react"),De=Ae.css`
459
+ border: 1px solid var(--gray-500);
460
+ border-radius: var(--rounded-base);
461
+ outline: none;
462
+ overflow: hidden;
463
+ z-index: 50;
464
+ `;var W=T.createContext({}),$=()=>T.useContext(W),Eo=({menuLabel:o,menuTrigger:r,placement:n="auto",children:a})=>{let t=(0,z.useMenuState)({placement:n});return(0,e.jsx)(W.Provider,{value:t},(0,e.jsx)(z.MenuButton,{...t,ref:r.ref,...r.props},s=>T.cloneElement(r,s)),(0,e.jsx)(z.Menu,{...t,"aria-label":o,css:De},a))};var Ze=b(require("react")),U=require("reakit");var K=require("@emotion/react"),Y=K.css`
465
+ background: var(--white);
466
+ border-top: 1px solid var(--gray-500);
467
+ color: var(--brand-secondary-1);
468
+ display: block;
469
+ padding: var(--spacing-sm) var(--spacing-base);
470
+ font-weight: var(--fw-bold);
471
+ width: 100%;
472
+
473
+ &:first-of-type {
474
+ border-top-color: var(--white);
475
+ }
476
+
477
+ &:disabled {
478
+ color: var(--gray-500);
479
+ }
480
+
481
+ &:focus {
482
+ outline: none;
483
+ box-shadow: var(--ring-inset);
484
+ }
485
+
486
+ &:hover {
487
+ background: var(--gray-200);
488
+ }
489
+ `,Ve=K.css`
490
+ align-items: center;
491
+ display: flex;
492
+ justify-content: space-between;
493
+ gap: var(--spacing-base);
494
+
495
+ svg {
496
+ align-self: center;
497
+ width: var(--spacing-base);
498
+ height: var(--spacing-base);
499
+ }
500
+ `;var Ho=Ze.forwardRef(({children:o,className:r,hideMenuOnClick:n=!0,icon:a,...t},s)=>{let l=$(),d=m=>{let f={...m};if(f.onClick){let u=f.onClick;f.onClick=L=>{l.hide(),u(L)}}return f};if(typeof o=="function")return(0,e.jsx)(U.MenuItem,{ref:s,"data-testid":"uniform-menuItem",...l,...t,css:Y},m=>{let f=n?d(m):m,u=o(f);return a?Ge(u,a):u});let p=n?d(t):t;return(0,e.jsx)(U.MenuItem,{ref:s,...l,...p,css:Y},a?Ge(o,a):o)});function Ge(o,r){return(0,e.jsx)("span",{css:Ve},o," ",r)}var c=require("@emotion/react");var Ne=({...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"})),We=({...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"})),$e=({...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"})),Ke=({...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"})),q=({...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"})),Ye=({...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 I=require("@emotion/react"),Ue=I.css`
501
+ --caution-desc: rgb(161, 98, 7);
502
+ --caution-icon: rgb(250, 204, 21);
503
+ --caution-title: rgb(133, 77, 14);
504
+ --caution-container: rgb(254, 252, 232);
505
+
506
+ --danger-desc: rgb(185, 28, 28);
507
+ --danger-icon: rgb(248, 113, 113);
508
+ --danger-title: rgb(153, 27, 27);
509
+ --danger-container: rgb(254, 242, 242);
510
+
511
+ --info-desc: rgb(29, 78, 216);
512
+ --info-icon: rgb(96, 165, 250);
513
+ --info-title: rgb(30, 64, 175);
514
+ --info-container: rgb(239, 246, 255);
515
+
516
+ --note-desc: var(--gray-700);
517
+ --note-icon: var(--gray-400);
518
+ --note-title: var(--gray-800);
519
+ --note-container: var(--gray-50);
520
+
521
+ --success-desc: rgb(21, 128, 61);
522
+ --success-icon: rgb(74, 222, 128);
523
+ --success-title: rgb(22, 101, 52);
524
+ --success-container: rgb(240, 253, 250);
525
+
526
+ border-radius: var(--rounded-base);
527
+ padding: var(--spacing-base);
528
+ `,qe=I.css`
529
+ display: flex;
530
+ gap: var(--spacing-base);
531
+ `,Qe=I.css`
532
+ flex-shrink: 0;
533
+ `,Je=I.css`
534
+ font-size: var(--fs-sm);
535
+ font-weight: var(--fw-bold);
536
+ margin: 0 0 var(--spacing-sm);
537
+ `,Xe=I.css`
538
+ font-size: var(--fs-sm);
539
+ `,_e=I.css`
540
+ width: 1.25rem;
541
+ height: 1.25rem;
542
+ `;var Oo={caution:{icon:q,descriptionColor:c.css`
543
+ color: var(--caution-desc);
544
+ `,iconColor:c.css`
545
+ color: var(--caution-icon);
546
+ `,titleColor:c.css`
547
+ color: var(--caution-title);
548
+ `,containerColor:c.css`
549
+ background-color: var(--caution-container);
550
+ `},danger:{icon:We,descriptionColor:c.css`
551
+ color: var(--danger-desc);
552
+ `,iconColor:c.css`
553
+ color: var(--danger-icon);
554
+ `,titleColor:c.css`
555
+ color: var(--danger-title);
556
+ `,containerColor:c.css`
557
+ background-color: var(--danger-container);
558
+ `},error:{icon:q,descriptionColor:c.css`
559
+ color: var(--danger-desc);
560
+ `,iconColor:c.css`
561
+ color: var(--danger-icon);
562
+ `,titleColor:c.css`
563
+ color: var(--danger-title);
564
+ `,containerColor:c.css`
565
+ background-color: var(--danger-container);
566
+ `},info:{icon:Ne,descriptionColor:c.css`
567
+ color: var(--info-desc);
568
+ `,iconColor:c.css`
569
+ color: var(--info-icon);
570
+ `,titleColor:c.css`
571
+ color: var(--info-title);
572
+ `,containerColor:c.css`
573
+ background-color: var(--info-container);
574
+ `},note:{icon:$e,descriptionColor:c.css`
575
+ color: var(--note-desc);
576
+ `,iconColor:c.css`
577
+ color: var(--note-icon);
578
+ `,titleColor:c.css`
579
+ color: var(--note-title);
580
+ `,containerColor:c.css`
581
+ background-color: var(--note-container);
582
+ `},success:{icon:Ye,descriptionColor:c.css`
583
+ color: var(--success-desc);
584
+ `,iconColor:c.css`
585
+ color: var(--success-icon);
586
+ `,titleColor:c.css`
587
+ color: var(--success-title);
588
+ `,containerColor:c.css`
589
+ background-color: var(--success-container);
590
+ `},tip:{icon:Ke,descriptionColor:c.css`
591
+ color: var(--success-desc);
592
+ `,iconColor:c.css`
593
+ color: var(--success-icon);
594
+ `,titleColor:c.css`
595
+ color: var(--success-title);
596
+ `,containerColor:c.css`
597
+ background-color: var(--success-container);
598
+ `}},Fo=({type:o="info",title:r,children:n,className:a})=>{let t=Oo[o];if(!t)return null;let s=t.icon;return(0,e.jsx)("div",{"data-testid":"sdk-ui-callout",css:[Ue,t.containerColor,typeof a=="object"?a:""],className:`${typeof a=="string"?a:""}`},(0,e.jsx)("div",{css:qe},(0,e.jsx)("div",{css:Qe},(0,e.jsx)(s,{css:[_e,t.iconColor]})),(0,e.jsx)("div",{className:"ml-3"},r?(0,e.jsx)("h3",{css:[Je,t.titleColor]},r):null,n?(0,e.jsx)("div",{css:[Xe,t.descriptionColor]},n):null)))};var B=require("@emotion/react"),Ao=B.keyframes`
599
+ 0%, 100% {
600
+ opacity: 1.0;
601
+ transform: translateY(0);
602
+ }
603
+ 30% {
604
+ opacity: 0.6;
605
+ }
606
+ 80% {
607
+ opacity: 0.4;
608
+ transform: translateY(-10px);
609
+ }
610
+ 90% {
611
+ opacity: 0.2;
612
+ transform: translateY(-5px);
613
+ }
614
+ `,je=B.css`
615
+ display: inline-flex;
616
+ justify-content: center;
617
+ `,D=B.css`
618
+ background-color: var(--gray-700);
619
+ display: block;
620
+ border-radius: var(--rounded-full);
621
+ animation: ${Ao} 0.75s infinite ease-in-out;
622
+ width: 8px;
623
+ height: 8px;
624
+ margin: 0 var(--spacing-xs);
625
+ transform: translateY(0);
626
+
627
+ &:nth-of-type(1) {
628
+ animation-delay: 0.15s;
629
+ }
630
+
631
+ &:nth-of-type(2) {
632
+ animation-delay: 0.3s;
633
+ }
634
+
635
+ &:nth-of-type(3) {
636
+ animation-delay: 0.6s;
637
+ }
638
+ `;var Do=()=>(0,e.jsx)("div",{css:je,role:"alert"},(0,e.jsx)("span",{css:D}),(0,e.jsx)("span",{css:D}),(0,e.jsx)("span",{css:D}));var io=require("@emotion/react");var S=require("@emotion/react"),eo=S.css`
639
+ align-items: center;
640
+ position: absolute;
641
+ inset: 0 0;
642
+ overflow: hidden;
643
+ z-index: 9999;
644
+ justify-content: center;
645
+ `,oo=S.css`
646
+ display: flex;
647
+ `,ro=S.css`
648
+ display: none;
649
+ `,to=S.css`
650
+ background: var(--white);
651
+ opacity: 0.5;
652
+ position: absolute;
653
+ inset: 0 0;
654
+ `,no=S.css`
655
+ align-items: center;
656
+ display: flex;
657
+ flex-direction: column;
658
+ `,ao=S.css`
659
+ color: var(--gray-500);
660
+ margin: var(--spacing-base) 0 0;
661
+ `;var Vo=({isActive:o,statusMessage:r})=>(0,e.jsx)("div",{role:"alert",css:[eo,o?oo:ro]},(0,e.jsx)("div",{css:to}),(0,e.jsx)("div",{css:io.css`
662
+ position: relative;
663
+ `},(0,e.jsx)("div",{css:no},(0,e.jsx)(so,{height:128,width:128}),r?(0,e.jsx)("div",{css:ao},r):null))),so=({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 h=require("@emotion/react"),co=h.css`
664
+ font-family: var(--ff-heading);
665
+ font-size: clamp(1.5rem, var(--fluid-font-base), 2.25rem);
666
+ font-weight: var(--font-bold);
667
+ `,lo=h.css`
668
+ font-size: clamp(1.35rem, var(--fluid-font-base), 1.75rem);
669
+ `,po=h.css`
670
+ font-size: clamp(1.25rem, var(--fluid-font-base), 1.5rem);
671
+ `,uo=h.css`
672
+ font-size: clamp(1.15rem, var(--fluid-font-base), 1.35rem);
673
+ `,go=h.css`
674
+ font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.25rem);
675
+ `,mo=h.css`
676
+ font-size: clamp(var(--fs-base), var(--fluid-font-base), 1.15rem);
677
+ `,fo=h.css`
678
+ font-weight: var(--fw-bold);
679
+ font-family: var(--ff-base);
680
+ `,_r=h.css`
681
+ line-height: 1.35;
682
+ `;var Go=({level:o=2,children:r})=>{let n=`h${o}`,a={h1:co,h2:lo,h3:po,h4:uo,h5:go,h6:mo},t=n.includes("h1")?void 0:fo;return(0,e.jsx)(n,{css:[a[n],t]},r)};0&&(module.exports={Button,Callout,Caption,ErrorMessage,Heading,Icon,IconsProvider,Input,InputInlineSelect,InputKeywordSearch,InputSelect,InputToggle,LoadingIcon,LoadingIndicator,LoadingOverlay,Menu,MenuContext,MenuItem,Theme,breakpoints,input,inputError,inputSelect,mq,scrollbarStyles,useIconContext,useMenuContext});