@sanity/ui 4.4.2 → 4.4.4
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/{arrow-A3jQ7LS0.js → arrow-MMVAW3Ew.js} +2 -2
- package/dist/{arrow-A3jQ7LS0.js.map → arrow-MMVAW3Ew.js.map} +1 -1
- package/dist/autocomplete.js +5 -5
- package/dist/breadcrumbs.js +4 -4
- package/dist/{button-dhq4ViVg.js → button-Bp0udHV9.js} +50 -47
- package/dist/button-Bp0udHV9.js.map +1 -0
- package/dist/button-dnqMFkWg.d.ts.map +1 -1
- package/dist/code.d.ts.map +1 -1
- package/dist/code.js +12 -6
- package/dist/code.js.map +1 -1
- package/dist/{flex-BqQXaSxS.js → flex-ohP2jG9d.js} +2 -2
- package/dist/{flex-BqQXaSxS.js.map → flex-ohP2jG9d.js.map} +1 -1
- package/dist/{grid-Bpb2bIJ6.js → grid-D-gOpN8z.js} +2 -2
- package/dist/{grid-Bpb2bIJ6.js.map → grid-D-gOpN8z.js.map} +1 -1
- package/dist/{hotkeys-Caqg1W-_.js → hotkeys-BPJuQ-gO.js} +9 -10
- package/dist/{hotkeys-Caqg1W-_.js.map → hotkeys-BPJuQ-gO.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +157 -127
- package/dist/index.js.map +1 -1
- package/dist/{layer-AWzYcY_j.js → layer-DP8gT1ex.js} +2 -2
- package/dist/{layer-AWzYcY_j.js.map → layer-DP8gT1ex.js.map} +1 -1
- package/dist/menu.d.ts +3 -3
- package/dist/menu.js +30 -19
- package/dist/menu.js.map +1 -1
- package/dist/{popover-CEDyHcBi.js → popover-BVbv1K3z.js} +4 -4
- package/dist/{popover-CEDyHcBi.js.map → popover-BVbv1K3z.js.map} +1 -1
- package/dist/popover.js +1 -1
- package/dist/responsiveFont-Cyvxxz-G.js +81 -0
- package/dist/responsiveFont-Cyvxxz-G.js.map +1 -0
- package/dist/{stack-Cv-WM-7p.js → stack-CPdFknrG.js} +22 -16
- package/dist/stack-CPdFknrG.js.map +1 -0
- package/dist/styles.css +137 -16
- package/dist/{textInput-Ddxi4mkC.js → textInput-CTqkq5UQ.js} +38 -17
- package/dist/textInput-CTqkq5UQ.js.map +1 -0
- package/dist/toast.js +5 -5
- package/dist/tooltip.js +3 -3
- package/dist/{useLayer-B0i19TTM.js → useLayer-D_TnC6On.js} +43 -28
- package/dist/useLayer-D_TnC6On.js.map +1 -0
- package/package.json +1 -1
- package/dist/button-dhq4ViVg.js.map +0 -1
- package/dist/codeFontStyle-B-bhR3hF.js +0 -11
- package/dist/codeFontStyle-B-bhR3hF.js.map +0 -1
- package/dist/responsiveFont-B08q0jwm.js +0 -57
- package/dist/responsiveFont-B08q0jwm.js.map +0 -1
- package/dist/stack-Cv-WM-7p.js.map +0 -1
- package/dist/textInput-Ddxi4mkC.js.map +0 -1
- package/dist/useLayer-B0i19TTM.js.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -22,6 +22,43 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
._2mi48t0 {
|
|
25
|
+
-webkit-font-smoothing: inherit;
|
|
26
|
+
appearance: none;
|
|
27
|
+
font: inherit;
|
|
28
|
+
-webkit-user-select: none;
|
|
29
|
+
user-select: none;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
text-align: left;
|
|
33
|
+
vertical-align: top;
|
|
34
|
+
border: 0;
|
|
35
|
+
outline: none;
|
|
36
|
+
align-items: center;
|
|
37
|
+
padding: 0;
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
position: relative;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
._2mi48t0::-moz-focus-inner {
|
|
44
|
+
border: 0;
|
|
45
|
+
padding: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
._2mi48t0 > span {
|
|
49
|
+
border-radius: inherit;
|
|
50
|
+
flex: 1;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
display: block;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
._2mi48t1 {
|
|
56
|
+
width: -moz-available;
|
|
57
|
+
width: -webkit-fill-available;
|
|
58
|
+
width: stretch;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
._2mi48t2 {
|
|
25
62
|
background-color: var(--card-bg-color);
|
|
26
63
|
border-radius: inherit;
|
|
27
64
|
z-index: 1;
|
|
@@ -335,6 +372,33 @@
|
|
|
335
372
|
}
|
|
336
373
|
|
|
337
374
|
._1jezl1b0 {
|
|
375
|
+
width: var(--avatar-size);
|
|
376
|
+
height: var(--avatar-size);
|
|
377
|
+
border-radius: calc(var(--avatar-size) / 2);
|
|
378
|
+
background-color: var(--avatar-bg-color);
|
|
379
|
+
box-sizing: border-box;
|
|
380
|
+
-webkit-user-select: none;
|
|
381
|
+
user-select: none;
|
|
382
|
+
box-shadow: 0 0 0 1px var(--card-bg-color);
|
|
383
|
+
position: relative;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
._1jezl1b0[data-status="inactive"] {
|
|
387
|
+
opacity: .5;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
._1jezl1b0[data-as="button"] {
|
|
391
|
+
-webkit-font-smoothing: inherit;
|
|
392
|
+
appearance: none;
|
|
393
|
+
font: inherit;
|
|
394
|
+
color: inherit;
|
|
395
|
+
border: 0;
|
|
396
|
+
outline: none;
|
|
397
|
+
margin: 0;
|
|
398
|
+
padding: 0;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
._1jezl1b1 {
|
|
338
402
|
box-sizing: border-box;
|
|
339
403
|
z-index: 0;
|
|
340
404
|
opacity: 0;
|
|
@@ -344,22 +408,22 @@
|
|
|
344
408
|
transform: rotate(-90deg) translate3d(0, 6px, 0);
|
|
345
409
|
}
|
|
346
410
|
|
|
347
|
-
[data-arrow-position="inside"] > .
|
|
411
|
+
[data-arrow-position="inside"] > ._1jezl1b1 {
|
|
348
412
|
opacity: 0;
|
|
349
413
|
transform: rotate(-90deg) translate3d(0, 6px, 0);
|
|
350
414
|
}
|
|
351
415
|
|
|
352
|
-
[data-arrow-position="top"] > .
|
|
416
|
+
[data-arrow-position="top"] > ._1jezl1b1 {
|
|
353
417
|
opacity: 1;
|
|
354
418
|
transform: rotate(0);
|
|
355
419
|
}
|
|
356
420
|
|
|
357
|
-
[data-arrow-position="bottom"] > .
|
|
421
|
+
[data-arrow-position="bottom"] > ._1jezl1b1 {
|
|
358
422
|
opacity: 1;
|
|
359
423
|
transform: rotate(-180deg);
|
|
360
424
|
}
|
|
361
425
|
|
|
362
|
-
.
|
|
426
|
+
._1jezl1b1 > svg {
|
|
363
427
|
width: 11px;
|
|
364
428
|
height: 7px;
|
|
365
429
|
position: absolute;
|
|
@@ -368,11 +432,11 @@
|
|
|
368
432
|
transform: translateX(-6px);
|
|
369
433
|
}
|
|
370
434
|
|
|
371
|
-
.
|
|
435
|
+
._1jezl1b1 > svg:not([hidden]) {
|
|
372
436
|
display: block;
|
|
373
437
|
}
|
|
374
438
|
|
|
375
|
-
.
|
|
439
|
+
._1jezl1b2 {
|
|
376
440
|
width: var(--avatar-size);
|
|
377
441
|
height: var(--avatar-size);
|
|
378
442
|
object-fit: contain;
|
|
@@ -380,11 +444,11 @@
|
|
|
380
444
|
position: relative;
|
|
381
445
|
}
|
|
382
446
|
|
|
383
|
-
.
|
|
447
|
+
._1jezl1b2:not([hidden]) {
|
|
384
448
|
display: block;
|
|
385
449
|
}
|
|
386
450
|
|
|
387
|
-
.
|
|
451
|
+
._1jezl1b3 {
|
|
388
452
|
width: var(--avatar-size);
|
|
389
453
|
height: var(--avatar-size);
|
|
390
454
|
pointer-events: none;
|
|
@@ -394,34 +458,49 @@
|
|
|
394
458
|
left: 0;
|
|
395
459
|
}
|
|
396
460
|
|
|
397
|
-
.
|
|
461
|
+
._1jezl1b4 {
|
|
398
462
|
stroke-width: 4px;
|
|
399
463
|
stroke: var(--card-bg-color);
|
|
400
464
|
}
|
|
401
465
|
|
|
402
|
-
.
|
|
466
|
+
._1jezl1b5 {
|
|
403
467
|
stroke-width: 2px;
|
|
404
468
|
stroke: var(--avatar-bg-color);
|
|
405
469
|
}
|
|
406
470
|
|
|
407
|
-
[data-status="editing"] .
|
|
471
|
+
[data-status="editing"] ._1jezl1b5 {
|
|
408
472
|
stroke-dasharray: 2 4;
|
|
409
473
|
stroke-linecap: round;
|
|
410
474
|
}
|
|
411
475
|
|
|
412
|
-
.
|
|
476
|
+
._1jezl1b6 {
|
|
413
477
|
white-space: nowrap;
|
|
414
478
|
}
|
|
415
479
|
|
|
416
|
-
.
|
|
480
|
+
._1jezl1b6 > div {
|
|
417
481
|
vertical-align: top;
|
|
418
482
|
}
|
|
419
483
|
|
|
420
|
-
.
|
|
484
|
+
._1jezl1b6 > div:not([hidden]) {
|
|
421
485
|
display: inline-block;
|
|
422
486
|
}
|
|
423
487
|
|
|
424
|
-
.
|
|
488
|
+
._1jezl1b7 {
|
|
489
|
+
box-sizing: border-box;
|
|
490
|
+
-webkit-user-select: none;
|
|
491
|
+
user-select: none;
|
|
492
|
+
color: var(--card-fg-color);
|
|
493
|
+
background: var(--card-bg-color);
|
|
494
|
+
box-shadow: 0 0 0 1px var(--card-bg-color), inset 0 0 0 1px var(--card-hairline-hard-color);
|
|
495
|
+
justify-content: center;
|
|
496
|
+
align-items: center;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
._1jezl1b7:not([hidden]) {
|
|
500
|
+
display: flex;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
._1jezl1b8 {
|
|
425
504
|
width: 100%;
|
|
426
505
|
height: 100%;
|
|
427
506
|
color: var(--avatar-fg-color);
|
|
@@ -432,7 +511,7 @@
|
|
|
432
511
|
align-items: center;
|
|
433
512
|
}
|
|
434
513
|
|
|
435
|
-
.
|
|
514
|
+
._1jezl1b8:not([hidden]) {
|
|
436
515
|
display: flex;
|
|
437
516
|
}
|
|
438
517
|
|
|
@@ -480,6 +559,48 @@
|
|
|
480
559
|
inset: 0;
|
|
481
560
|
}
|
|
482
561
|
|
|
562
|
+
.cn60s72 {
|
|
563
|
+
--switch-box-shadow: none;
|
|
564
|
+
pointer-events: none;
|
|
565
|
+
position: relative;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.cn60s72:not([hidden]) {
|
|
569
|
+
display: block;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.cn60s72:after {
|
|
573
|
+
content: "";
|
|
574
|
+
z-index: 1;
|
|
575
|
+
box-shadow: var(--switch-box-shadow);
|
|
576
|
+
border-radius: inherit;
|
|
577
|
+
display: block;
|
|
578
|
+
position: absolute;
|
|
579
|
+
inset: 0;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.cn60s73 {
|
|
583
|
+
background-color: var(--switch-bg-color);
|
|
584
|
+
position: absolute;
|
|
585
|
+
top: 0;
|
|
586
|
+
left: 0;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.cn60s73:not([hidden]) {
|
|
590
|
+
display: block;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.cn60s74 {
|
|
594
|
+
background: var(--switch-fg-color);
|
|
595
|
+
transition-property: transform;
|
|
596
|
+
position: absolute;
|
|
597
|
+
box-shadow: 0 1px #0000000d;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.cn60s74:not([hidden]) {
|
|
601
|
+
display: block;
|
|
602
|
+
}
|
|
603
|
+
|
|
483
604
|
._1omd6w40 {
|
|
484
605
|
width: 0;
|
|
485
606
|
height: 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as EMPTY_RECORD, i as _responsive, n as _getArrayProp, o as rem } from "./helpers-XThPpWje.js";
|
|
2
2
|
import { a as isHTMLElement, c as isHTMLTextAreaElement, i as isHTMLButtonElement, o as isHTMLInputElement, r as isHTMLAnchorElement, s as isHTMLSelectElement } from "./element-BYgCE_iK.js";
|
|
3
3
|
import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
|
|
4
|
-
import { l as useRootTheme, m as focusRingStyle, p as focusRingBorderStyle, s as Card, v as responsiveRadiusStyle, y as Box } from "./useLayer-
|
|
5
|
-
import { n as Text } from "./stack-
|
|
6
|
-
import { t as Button } from "./button-
|
|
4
|
+
import { l as useRootTheme, m as focusRingStyle, p as focusRingBorderStyle, s as Card, v as responsiveRadiusStyle, y as Box } from "./useLayer-D_TnC6On.js";
|
|
5
|
+
import { n as Text } from "./stack-CPdFknrG.js";
|
|
6
|
+
import { t as Button } from "./button-Bp0udHV9.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { clsx } from "clsx/lite";
|
|
9
9
|
import { isValidElement, useEffect, useImperativeHandle, useRef } from "react";
|
|
@@ -101,9 +101,17 @@ function responsiveInputPaddingIconRightStyle(props) {
|
|
|
101
101
|
$iconRight: !0
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
const textInputBaseStyle = css`appearance:none;background:none;border:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;margin:0;position:relative;z-index:1;display:block;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}&[data-as='textarea']{resize:none;}color:var(--input-fg-color);&::placeholder{color:var(--input-placeholder-color);}`;
|
|
105
|
+
function textInputColorStyle(props) {
|
|
106
|
+
let { $scheme, $tone } = props, { color } = getTheme_v2(props.theme);
|
|
107
|
+
return css`&[data-scheme='${$scheme}'][data-tone='${$tone}']{--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};&:not(:invalid):not(:disabled):not(:read-only){--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};}&:not(:invalid):disabled{--input-fg-color:${color.input.default.disabled.fg};--input-placeholder-color:${color.input.default.disabled.placeholder};}&:invalid{--input-fg-color:${color.input.invalid.enabled.fg};--input-placeholder-color:${color.input.invalid.enabled.placeholder};}&:read-only{--input-fg-color:${color.input.default.readOnly.fg};--input-placeholder-color:${color.input.default.readOnly.placeholder};}}`;
|
|
108
|
+
}
|
|
109
|
+
function textInputFontStyle(props) {
|
|
110
|
+
let { $weight } = props, { font } = getTheme_v2(props.theme);
|
|
111
|
+
return {
|
|
112
|
+
fontFamily: font.text.family,
|
|
113
|
+
fontWeight: `${$weight && font.text.weights[$weight] || font.text.weights.regular}`
|
|
114
|
+
};
|
|
107
115
|
}
|
|
108
116
|
function textInputFontSizeStyle(props) {
|
|
109
117
|
let { font, media } = getTheme_v2(props.theme);
|
|
@@ -116,8 +124,12 @@ function textInputFontSizeStyle(props) {
|
|
|
116
124
|
});
|
|
117
125
|
}
|
|
118
126
|
function textInputRepresentationStyle(props) {
|
|
119
|
-
let { $hasPrefix, $hasSuffix
|
|
120
|
-
return css`--input-box-shadow:none;position:absolute;top:0;left:0;right:0;bottom:0;display:block;pointer-events:none;z-index:0;background-color:var(--card-bg-color);box-shadow:var(--input-box-shadow);border-top-left-radius:${$hasPrefix ? 0 : void 0};border-bottom-left-radius:${$hasPrefix ? 0 : void 0};border-top-right-radius:${$hasSuffix ? 0 : void 0};border-bottom-right-radius:${$hasSuffix ? 0 : void 0}
|
|
127
|
+
let { $hasPrefix, $hasSuffix } = props;
|
|
128
|
+
return css`--input-box-shadow:none;position:absolute;top:0;left:0;right:0;bottom:0;display:block;pointer-events:none;z-index:0;background-color:var(--card-bg-color);box-shadow:var(--input-box-shadow);border-top-left-radius:${$hasPrefix ? 0 : void 0};border-bottom-left-radius:${$hasPrefix ? 0 : void 0};border-top-right-radius:${$hasSuffix ? 0 : void 0};border-bottom-right-radius:${$hasSuffix ? 0 : void 0};`;
|
|
129
|
+
}
|
|
130
|
+
function textInputRepresentationColorStyle(props) {
|
|
131
|
+
let { $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = getTheme_v2(props.theme);
|
|
132
|
+
return css`&[data-scheme='${$scheme}'][data-tone='${$tone}']{--card-bg-color:${color.input.default.enabled.bg};--card-fg-color:${color.input.default.enabled.fg};*:not(:disabled) + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
|
|
121
133
|
color: color.input.default.enabled.border,
|
|
122
134
|
width: input.border.width
|
|
123
135
|
})};}*:not(:disabled):invalid + &{--card-bg-color:${color.input.invalid.enabled.bg};--card-fg-color:${color.input.invalid.enabled.fg};&[data-border]{--input-box-shadow:${focusRingBorderStyle({
|
|
@@ -146,19 +158,28 @@ function textInputRepresentationStyle(props) {
|
|
|
146
158
|
var inputRoot = "_1lyk8y2", textAreaRoot = "_1lyk8y1 _1lyk8y0", textInputRoot = "_1lyk8y0";
|
|
147
159
|
const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, Prefix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
148
160
|
displayName: "Prefix",
|
|
149
|
-
componentId: "sc-
|
|
161
|
+
componentId: "sc-j9wa1r-0"
|
|
150
162
|
})`border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}`, Suffix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
151
163
|
displayName: "Suffix",
|
|
152
|
-
componentId: "sc-
|
|
153
|
-
})`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`,
|
|
164
|
+
componentId: "sc-j9wa1r-1"
|
|
165
|
+
})`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`, InputBase = styled.input.withConfig({
|
|
166
|
+
displayName: "InputBase",
|
|
167
|
+
componentId: "sc-j9wa1r-2"
|
|
168
|
+
})`${textInputBaseStyle}`, Input = /* @__PURE__ */ styled(/* @__PURE__ */ styled(InputBase).withConfig({
|
|
169
|
+
displayName: "InputColor",
|
|
170
|
+
componentId: "sc-j9wa1r-3"
|
|
171
|
+
})(textInputColorStyle)).withConfig({
|
|
154
172
|
displayName: "Input",
|
|
155
|
-
componentId: "sc-
|
|
156
|
-
})(responsiveInputPaddingStyle,
|
|
173
|
+
componentId: "sc-j9wa1r-4"
|
|
174
|
+
})(responsiveInputPaddingStyle, textInputFontStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled(/* @__PURE__ */ styled.span.withConfig({
|
|
175
|
+
displayName: "PresentationColor",
|
|
176
|
+
componentId: "sc-j9wa1r-5"
|
|
177
|
+
})(textInputRepresentationColorStyle)).withConfig({
|
|
157
178
|
displayName: "Presentation",
|
|
158
|
-
componentId: "sc-
|
|
179
|
+
componentId: "sc-j9wa1r-6"
|
|
159
180
|
})(responsiveRadiusStyle, textInputRepresentationStyle), RightCard = styled(Card).withConfig({
|
|
160
181
|
displayName: "RightCard",
|
|
161
|
-
componentId: "sc-
|
|
182
|
+
componentId: "sc-j9wa1r-7"
|
|
162
183
|
})`background-color:transparent;position:absolute;top:0;right:0;`;
|
|
163
184
|
/**
|
|
164
185
|
* Single line text input.
|
|
@@ -310,6 +331,6 @@ function _temp2(v) {
|
|
|
310
331
|
function _temp(event) {
|
|
311
332
|
event.preventDefault(), event.stopPropagation();
|
|
312
333
|
}
|
|
313
|
-
export {
|
|
334
|
+
export { isFocusable as _, textInputColorStyle as a, textInputRepresentationColorStyle as c, responsiveInputPaddingStyle as d, useCustomValidity as f, focusLastDescendant as g, focusFirstDescendant as h, textInputBaseStyle as i, textInputRepresentationStyle as l, attemptFocus as m, inputRoot as n, textInputFontSizeStyle as o, _hasFocus as p, textAreaRoot as r, textInputFontStyle as s, TextInput as t, responsiveInputPaddingIconRightStyle as u, _raf as v, _raf2 as y };
|
|
314
335
|
|
|
315
|
-
//# sourceMappingURL=textInput-
|
|
336
|
+
//# sourceMappingURL=textInput-CTqkq5UQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textInput-CTqkq5UQ.js","names":["() => {\n ref.current?.setCustomValidity(customValidity || '')\n }","[customValidity, ref]","ref.current?.setCustomValidity","_c","border = true","disabled = false","fontSizeProp = 2","gap = 3","paddingProp = 3","radiusProp = 2","type = 'text'","_getArrayProp(fontSizeProp)","_getArrayProp(paddingProp)","_getArrayProp(radiusProp)","_getArrayProp(gap)","() => ref.current","useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n }, [])","(event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (onClear) onClear()\n\n // Focus the input, in case focus has been lost when clicking the clear button\n ref.current?.focus()\n }","useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (onClear) onClear()\n\n // Focus the input, in case focus has been lost when clicking the clear button\n ref.current?.focus()\n },\n [onClear, ref],\n )","prefix && (\n <Prefix borderTop borderLeft borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{prefix}</span>\n </Prefix>\n )","useMemo(\n () =>\n prefix && (\n <Prefix borderTop borderLeft borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{prefix}</span>\n </Prefix>\n ),\n [prefix, radius],\n )","IconComponent && (\n <Box className={textInputLeftBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </Box>\n )","!$hasClearButton && IconRightComponent && (\n <Box className={textInputRightBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </Box>\n )","<Presentation\n $hasPrefix={$hasPrefix}\n $unstableDisableFocusRing={__unstable_disableFocusRing}\n $hasSuffix={$hasSuffix}\n $radius={radius}\n $scheme={rootTheme.scheme}\n $tone={rootTheme.tone}\n data-border={border ? '' : undefined}\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n data-ui=\"TextInput__presentation\"\n >\n {IconComponent && (\n <Box className={textInputLeftBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </Box>\n )}\n\n {!$hasClearButton && IconRightComponent && (\n <Box className={textInputRightBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </Box>\n )}\n </Presentation>","scheme","tone","border ? '' : undefined","useMemo(\n () => (\n <Presentation\n $hasPrefix={$hasPrefix}\n $unstableDisableFocusRing={__unstable_disableFocusRing}\n $hasSuffix={$hasSuffix}\n $radius={radius}\n $scheme={rootTheme.scheme}\n $tone={rootTheme.tone}\n data-border={border ? '' : undefined}\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n data-ui=\"TextInput__presentation\"\n >\n {IconComponent && (\n <Box className={textInputLeftBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </Box>\n )}\n\n {!$hasClearButton && IconRightComponent && (\n <Box className={textInputRightBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </Box>\n )}\n </Presentation>\n ),\n [\n __unstable_disableFocusRing,\n border,\n fontSize,\n IconComponent,\n IconRightComponent,\n padding,\n radius,\n rootTheme,\n $hasClearButton,\n $hasPrefix,\n $hasSuffix,\n ],\n )","padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n })","(v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n }","useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n }),\n [padding],\n )","padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n })","(v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n }","useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n }),\n [padding],\n )","!disabled &&\n !readOnly &&\n clearButton && (\n <RightCard\n forwardedAs=\"span\"\n padding={clearButtonBoxPadding}\n style={CLEAR_BUTTON_BOX_STYLE}\n tone={customValidity ? 'critical' : 'inherit'}\n >\n <Button\n aria-label=\"Clear\"\n data-qa=\"clear-button\"\n fontSize={fontSize}\n icon={CloseIcon}\n mode=\"bleed\"\n padding={clearButtonPadding}\n radius={radius}\n {...clearButtonProps}\n className={clsx(textInputClearButton, clearButtonProps.className)}\n onClick={handleClearClick}\n onMouseDown={handleClearMouseDown}\n />\n </RightCard>\n )","clearButtonProps.className","useMemo(\n () =>\n !disabled &&\n !readOnly &&\n clearButton && (\n <RightCard\n forwardedAs=\"span\"\n padding={clearButtonBoxPadding}\n style={CLEAR_BUTTON_BOX_STYLE}\n tone={customValidity ? 'critical' : 'inherit'}\n >\n <Button\n aria-label=\"Clear\"\n data-qa=\"clear-button\"\n fontSize={fontSize}\n icon={CloseIcon}\n mode=\"bleed\"\n padding={clearButtonPadding}\n radius={radius}\n {...clearButtonProps}\n className={clsx(textInputClearButton, clearButtonProps.className)}\n onClick={handleClearClick}\n onMouseDown={handleClearMouseDown}\n />\n </RightCard>\n ),\n [\n clearButton,\n clearButtonBoxPadding,\n clearButtonPadding,\n clearButtonProps,\n customValidity,\n disabled,\n fontSize,\n handleClearClick,\n handleClearMouseDown,\n radius,\n readOnly,\n ],\n )","suffix && (\n <Suffix borderTop borderRight borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{suffix}</span>\n </Suffix>\n )","useMemo(\n () =>\n suffix && (\n <Suffix borderTop borderRight borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{suffix}</span>\n </Suffix>\n ),\n [radius, suffix],\n )","<Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n data-ui=\"TextInput__input\"\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />","$hasIconRight || $hasClearButton","<span className={inputRoot}>\n <Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n data-ui=\"TextInput__input\"\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />\n\n {presentationNode}\n {clearButtonNode}\n </span>","<Card\n as=\"span\"\n className={textInputRoot}\n data-ui=\"TextInput\"\n display=\"flex\"\n tone={rootTheme.tone}\n >\n {prefixNode}\n\n <span className={inputRoot}>\n <Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n data-ui=\"TextInput__input\"\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />\n\n {presentationNode}\n {clearButtonNode}\n </span>\n\n {suffixNode}\n </Card>","v","_c"],"sources":["../src/core/helpers/animation.ts","../src/core/helpers/focus.ts","../src/core/hooks/useCustomValidity.ts","../src/core/styles/input/responsiveInputPaddingStyle.ts","../src/core/styles/input/textInputStyle.ts","../src/core/styles/input/textInput.css.ts","../src/core/primitives/textInput/textInput.css.ts","../src/core/primitives/textInput/textInput.tsx"],"sourcesContent":["/**\n * @internal\n */\nexport function _raf(fn: () => void): () => void {\n const frameId = requestAnimationFrame(fn)\n\n return () => {\n cancelAnimationFrame(frameId)\n }\n}\n\n/**\n * @internal\n */\nexport function _raf2(fn: () => void): () => void {\n let innerDispose: (() => void) | null = null\n\n const outerDispose = _raf(() => {\n innerDispose = _raf(fn)\n })\n\n return () => {\n if (innerDispose) innerDispose()\n\n outerDispose()\n }\n}\n","import {\n isHTMLAnchorElement,\n isHTMLButtonElement,\n isHTMLElement,\n isHTMLInputElement,\n isHTMLSelectElement,\n isHTMLTextAreaElement,\n} from './element'\n\n// export const globalFocusState = {\n// IgnoreUtilFocusChanges: false,\n// }\n\n/**\n * @internal\n */\nexport function _hasFocus(element: HTMLElement): boolean {\n return Boolean(document.activeElement) && element.contains(document.activeElement)\n}\n\n/**\n * @internal\n */\nexport function isFocusable(element: HTMLElement): boolean {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n\n if (isHTMLAnchorElement(element)) {\n return Boolean(element.href) && element.rel !== 'ignore'\n }\n\n if (isHTMLInputElement(element)) {\n return element.type !== 'hidden' && element.type !== 'file' && !element.disabled\n }\n\n if (\n isHTMLButtonElement(element) ||\n isHTMLSelectElement(element) ||\n isHTMLTextAreaElement(element)\n ) {\n return !element.disabled\n }\n\n return false\n}\n\n/**\n * @internal\n */\nexport function attemptFocus(element: HTMLElement): boolean {\n if (!isFocusable(element)) {\n return false\n }\n\n // globalFocusState.IgnoreUtilFocusChanges = true\n\n try {\n element.focus()\n } catch {\n // ignore\n }\n\n // globalFocusState.IgnoreUtilFocusChanges = false\n\n return document.activeElement === element\n}\n\n/**\n * @internal\n */\nexport function focusFirstDescendant(element: HTMLElement): boolean {\n for (let i = 0; i < element.childNodes.length; i++) {\n const child = element.childNodes[i]\n\n if (isHTMLElement(child) && (attemptFocus(child) || focusFirstDescendant(child))) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @internal\n */\nexport function focusLastDescendant(element: HTMLElement): boolean {\n for (let i = element.childNodes.length - 1; i >= 0; i--) {\n const child = element.childNodes[i]\n\n if (isHTMLElement(child) && (attemptFocus(child) || focusLastDescendant(child))) {\n return true\n }\n }\n\n return false\n}\n","import {useEffect} from 'react'\n\n/**\n * @beta\n */\nexport function useCustomValidity(\n ref: {current: null | {setCustomValidity: (validity: string) => void}},\n customValidity: string | undefined,\n): void {\n useEffect(() => {\n ref.current?.setCustomValidity(customValidity || '')\n }, [customValidity, ref])\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\n\nexport interface TextInputResponsivePaddingStyleProps {\n $fontSize: number[]\n $iconLeft?: boolean\n $iconRight?: boolean\n $padding: number[]\n $space: number[]\n}\n\nexport function responsiveInputPaddingStyle(\n props: TextInputResponsivePaddingStyleProps & ThemeProps,\n): CSSObject[] {\n const {$fontSize, $iconLeft, $iconRight, $padding, $space} = props\n const {font, media, space} = getTheme_v2(props.theme)\n const len = Math.max($padding.length, $space.length, $fontSize.length)\n const _padding: number[] = []\n const _space: number[] = []\n const _fontSize: number[] = []\n\n for (let i = 0; i < len; i += 1) {\n _fontSize[i] = $fontSize[i] === undefined ? _fontSize[i - 1] : $fontSize[i]\n _padding[i] = $padding[i] === undefined ? _padding[i - 1] : $padding[i]\n _space[i] = $space[i] === undefined ? _space[i - 1] : $space[i]\n }\n\n return _responsive(media, _padding, (_, i) => {\n const size = font.text.sizes[_fontSize[i]] || font.text.sizes[2]\n const emSize = size.lineHeight - size.ascenderHeight - size.descenderHeight\n const p = space[_padding[i]]\n const s = space[_space[i]]\n\n const styles = {\n paddingTop: rem(p - size.ascenderHeight),\n paddingRight: rem(p),\n paddingBottom: rem(p - size.descenderHeight),\n paddingLeft: rem(p),\n }\n\n if ($iconRight) styles.paddingRight = rem(p + emSize + s)\n if ($iconLeft) styles.paddingLeft = rem(p + emSize + s)\n\n return styles\n })\n}\n\nexport function responsiveInputPaddingIconRightStyle(\n props: {\n $fontSize: number[]\n $padding: number[]\n $space: number[]\n } & ThemeProps,\n): CSSObject[] {\n return responsiveInputPaddingStyle({...props, $iconRight: true})\n}\n","import {css} from 'styled-components'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {CSSObject} from '../../../theme/system/css'\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {CardTone} from '../../types/card'\nimport {focusRingBorderStyle, focusRingStyle} from '../focusRing'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\n\n/**\n * @internal\n */\nexport interface TextInputInputStyleProps {\n $fontSize: number[]\n $scheme: ThemeColorSchemeKey\n $tone: CardTone\n $weight?: ThemeFontWeightKey\n}\n\n/**\n * @internal\n */\nexport interface TextInputRepresentationStyleProps {\n $hasPrefix?: boolean\n $hasSuffix?: boolean\n $scheme: ThemeColorSchemeKey\n $tone: CardTone\n $unstableDisableFocusRing?: boolean\n}\n\nexport const textInputBaseStyle = css`\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome’s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n`\n\nexport function textInputColorStyle(\n props: Pick<TextInputInputStyleProps, '$scheme' | '$tone'> & ThemeProps,\n): ReturnType<typeof css> {\n const {$scheme, $tone} = props\n const {color} = getTheme_v2(props.theme)\n\n return css`\n &[data-scheme='${$scheme}'][data-tone='${$tone}'] {\n --input-fg-color: ${color.input.default.enabled.fg};\n --input-placeholder-color: ${color.input.default.enabled.placeholder};\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ${color.input.default.enabled.fg};\n --input-placeholder-color: ${color.input.default.enabled.placeholder};\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ${color.input.default.disabled.fg};\n --input-placeholder-color: ${color.input.default.disabled.placeholder};\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ${color.input.invalid.enabled.fg};\n --input-placeholder-color: ${color.input.invalid.enabled.placeholder};\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ${color.input.default.readOnly.fg};\n --input-placeholder-color: ${color.input.default.readOnly.placeholder};\n }\n }\n `\n}\n\nexport function textInputFontStyle(\n props: Pick<TextInputInputStyleProps, '$weight'> & ThemeProps,\n): CSSObject {\n const {$weight} = props\n const {font} = getTheme_v2(props.theme)\n\n return {\n fontFamily: font.text.family,\n fontWeight: `${($weight && font.text.weights[$weight]) || font.text.weights.regular}`,\n }\n}\n\nexport function textInputFontSizeStyle(props: TextInputInputStyleProps & ThemeProps): CSSObject[] {\n const {font, media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$fontSize, (sizeIndex) => {\n const size = font.text.sizes[sizeIndex] || font.text.sizes[2]\n\n return {\n fontSize: rem(size.fontSize),\n lineHeight: `${size.lineHeight / size.fontSize}`,\n }\n })\n}\n\nexport function textInputRepresentationStyle(\n props: Pick<TextInputRepresentationStyleProps, '$hasPrefix' | '$hasSuffix'>,\n): ReturnType<typeof css> {\n const {$hasPrefix, $hasSuffix} = props\n\n return css`\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ${$hasPrefix ? 0 : undefined};\n border-bottom-left-radius: ${$hasPrefix ? 0 : undefined};\n border-top-right-radius: ${$hasSuffix ? 0 : undefined};\n border-bottom-right-radius: ${$hasSuffix ? 0 : undefined};\n `\n}\n\nexport function textInputRepresentationColorStyle(\n props: Omit<TextInputRepresentationStyleProps, '$hasPrefix' | '$hasSuffix'> & ThemeProps,\n): ReturnType<typeof css> {\n const {$scheme, $tone, $unstableDisableFocusRing} = props\n const {color, input} = getTheme_v2(props.theme)\n\n return css`\n &[data-scheme='${$scheme}'][data-tone='${$tone}'] {\n --card-bg-color: ${color.input.default.enabled.bg};\n --card-fg-color: ${color.input.default.enabled.fg};\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.enabled.border,\n width: input.border.width,\n })};\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ${color.input.invalid.enabled.bg};\n --card-fg-color: ${color.input.invalid.enabled.fg};\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.enabled.border,\n width: input.border.width,\n })};\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ${\n $unstableDisableFocusRing\n ? undefined\n : focusRingStyle({\n border: {color: color.input.default.enabled.border, width: input.border.width},\n focusRing: input.text.focusRing,\n })\n };\n }\n\n &:not([data-border]) {\n --input-box-shadow: ${\n $unstableDisableFocusRing\n ? undefined\n : focusRingStyle({focusRing: input.text.focusRing})\n };\n }\n }\n\n /* disabled */\n *:not(:invalid):disabled + & {\n --card-bg-color: ${color.input.default.disabled.bg} !important;\n --card-fg-color: ${color.input.default.disabled.fg} !important;\n --card-icon-color: ${color.input.default.disabled.fg} !important;\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.disabled.border,\n width: input.border.width,\n })};\n }\n }\n\n *:invalid:disabled + & {\n --card-bg-color: ${color.input.invalid.disabled.bg} !important;\n --card-fg-color: ${color.input.invalid.disabled.fg} !important;\n --card-icon-color: ${color.input.invalid.disabled.fg} !important;\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.disabled.border,\n width: input.border.width,\n })};\n }\n }\n\n /* readOnly */\n *:not(:invalid):read-only + & {\n --card-bg-color: ${color.input.default.readOnly.bg} !important;\n --card-fg-color: ${color.input.default.readOnly.fg} !important;\n }\n\n *:invalid:read-only + & {\n --card-bg-color: ${color.input.invalid.readOnly.bg} !important;\n --card-fg-color: ${color.input.invalid.readOnly.fg} !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ${color.input.default.hovered.bg};\n --card-fg-color: ${color.input.default.hovered.fg};\n }\n\n *:invalid:not(:disabled):not(:read-only):hover + & {\n --card-bg-color: ${color.input.invalid.hovered.bg};\n --card-fg-color: ${color.input.invalid.hovered.fg};\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.hovered.border,\n width: input.border.width,\n })};\n }\n\n *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.hovered.border,\n width: input.border.width,\n })};\n }\n }\n }\n `\n}\n","import {style} from '@vanilla-extract/css'\n\n// TextInput renders its root as a Card, whose Box styles own `display`, so the\n// flex layout comes from the `display` prop there and only the alignment lives\n// here. TextArea's root is a plain span, so it reuses that class and adds display.\nexport const textInputRoot = style({\n alignItems: 'center',\n})\n\nexport const textAreaRoot = style([\n textInputRoot,\n {\n selectors: {\n '&:not([hidden])': {\n display: 'flex',\n },\n },\n },\n])\n\nexport const inputRoot = style({\n flex: 1,\n minWidth: 0,\n display: 'block',\n position: 'relative',\n})\n","import {style} from '@vanilla-extract/css'\n\nexport const textInputLeftBox = style({\n position: 'absolute',\n top: 0,\n left: 0,\n})\n\nexport const textInputRightBox = style({\n position: 'absolute',\n top: 0,\n right: 0,\n})\n\nexport const textInputClearButton = style({\n selectors: {\n '&:not([hidden])': {\n display: 'block',\n },\n },\n})\n","import {CloseIcon} from '@sanity/icons/Close'\nimport {clsx} from 'clsx/lite'\nimport {isValidElement, useCallback, useImperativeHandle, useMemo, useRef} from 'react'\nimport {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {EMPTY_RECORD} from '../../constants'\nimport {useCustomValidity} from '../../hooks/useCustomValidity'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {\n responsiveInputPaddingStyle,\n TextInputResponsivePaddingStyleProps,\n} from '../../styles/input/responsiveInputPaddingStyle'\nimport {\n textInputBaseStyle,\n textInputColorStyle,\n textInputFontSizeStyle,\n textInputFontStyle,\n TextInputInputStyleProps,\n textInputRepresentationColorStyle,\n textInputRepresentationStyle,\n TextInputRepresentationStyleProps,\n} from '../../styles/input/textInputStyle'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {useRootTheme} from '../../theme/useRootTheme'\nimport {Radius} from '../../types/radius'\nimport {Box} from '../box/box'\nimport {Button, ButtonOwnProps} from '../button/button'\nimport {Card} from '../card/card'\nimport {Text} from '../text/text'\n\nimport {inputRoot, textInputRoot} from '../../styles/input/textInput.css'\nimport {textInputClearButton, textInputLeftBox, textInputRightBox} from './textInput.css'\n\n/**\n * @public\n */\nexport type TextInputClearButtonProps = ButtonOwnProps &\n Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>\n\n/**\n * @public\n */\nexport type TextInputType =\n | 'search'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'url'\n | 'month'\n | 'number'\n | 'password'\n | 'tel'\n | 'time'\n | 'text'\n | 'week'\n | 'color'\n\n/**\n * @public\n */\nexport interface TextInputProps {\n /**\n * @beta\n */\n __unstable_disableFocusRing?: boolean\n border?: boolean\n /**\n * @beta\n */\n clearButton?: boolean | TextInputClearButtonProps\n customValidity?: string\n fontSize?: number | number[]\n // oxlint-disable-next-line no-redundant-type-constituents\n icon?: React.ElementType | React.ReactNode\n // oxlint-disable-next-line no-redundant-type-constituents\n iconRight?: React.ElementType | React.ReactNode\n /**\n * @beta\n */\n onClear?: () => void\n padding?: number | number[]\n prefix?: React.ReactNode\n radius?: Radius | Radius[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n gap?: number | number[]\n suffix?: React.ReactNode\n type?: TextInputType\n weight?: ThemeFontWeightKey\n}\n\nconst CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {zIndex: 2}\n\n// Prefix and Suffix stay on styled-components: their corner radius longhands\n// must beat Card's runtime `border-radius` shorthand at equal specificity,\n// which needs both rules in the runtime stylesheet.\nconst Prefix = styled(Card).attrs({forwardedAs: 'span'})`\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n`\n\nconst Suffix = styled(Card).attrs({forwardedAs: 'span'})`\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n`\n\nconst InputBase = styled.input`\n ${textInputBaseStyle}\n`\n\nconst InputColor = styled(InputBase)<TextInputInputStyleProps>(textInputColorStyle)\n\nconst Input = styled(InputColor)<TextInputResponsivePaddingStyleProps & TextInputInputStyleProps>(\n responsiveInputPaddingStyle,\n textInputFontStyle,\n textInputFontSizeStyle,\n)\n\nconst PresentationColor = styled.span<TextInputRepresentationStyleProps>(\n textInputRepresentationColorStyle,\n)\n\nconst Presentation = styled(PresentationColor)<\n ResponsiveRadiusStyleProps & TextInputRepresentationStyleProps\n>(responsiveRadiusStyle, textInputRepresentationStyle)\n\n// Stays on styled-components: `background-color: transparent` must beat Card's\n// runtime `background-color: var(--card-bg-color)` at equal specificity, which\n// needs both rules in the runtime stylesheet.\nconst RightCard = styled(Card)`\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n`\n\n/**\n * Single line text input.\n *\n * @public\n */\nexport function TextInput(\n props: TextInputProps & Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'prefix' | 'type'>,\n) {\n const {\n __unstable_disableFocusRing,\n border = true,\n clearButton,\n disabled = false,\n fontSize: fontSizeProp = 2,\n gap = 3,\n icon: IconComponent,\n iconRight: IconRightComponent,\n onClear,\n padding: paddingProp = 3,\n prefix,\n radius: radiusProp = 2,\n readOnly,\n ref: forwardedRef,\n suffix,\n customValidity,\n type = 'text',\n weight,\n ...restProps\n } = props\n const ref = useRef<HTMLInputElement | null>(null)\n\n const rootTheme = useRootTheme()\n\n const fontSize = _getArrayProp(fontSizeProp)\n const padding = _getArrayProp(paddingProp)\n const radius = _getArrayProp(radiusProp)\n const space = _getArrayProp(gap)\n\n // Transient properties\n const $hasClearButton = Boolean(clearButton)\n const $hasIcon = Boolean(IconComponent)\n const $hasIconRight = Boolean(IconRightComponent)\n const $hasSuffix = Boolean(suffix)\n const $hasPrefix = Boolean(prefix)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => ref.current,\n )\n\n useCustomValidity(ref, customValidity)\n\n // Prevent the clear button from taking the focus away from the input\n const handleClearMouseDown = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n }, [])\n\n const handleClearClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (onClear) onClear()\n\n // Focus the input, in case focus has been lost when clicking the clear button\n ref.current?.focus()\n },\n [onClear, ref],\n )\n\n // Render prefix (memoized)\n const prefixNode = useMemo(\n () =>\n prefix && (\n <Prefix borderTop borderLeft borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{prefix}</span>\n </Prefix>\n ),\n [prefix, radius],\n )\n\n // Render presentation (memoized)\n const presentationNode = useMemo(\n () => (\n <Presentation\n $hasPrefix={$hasPrefix}\n $unstableDisableFocusRing={__unstable_disableFocusRing}\n $hasSuffix={$hasSuffix}\n $radius={radius}\n $scheme={rootTheme.scheme}\n $tone={rootTheme.tone}\n data-border={border ? '' : undefined}\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n data-ui=\"TextInput__presentation\"\n >\n {IconComponent && (\n <Box className={textInputLeftBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </Box>\n )}\n\n {!$hasClearButton && IconRightComponent && (\n <Box className={textInputRightBox} padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </Box>\n )}\n </Presentation>\n ),\n [\n __unstable_disableFocusRing,\n border,\n fontSize,\n IconComponent,\n IconRightComponent,\n padding,\n radius,\n rootTheme,\n $hasClearButton,\n $hasPrefix,\n $hasSuffix,\n ],\n )\n\n // Render clear button (memoized)\n const clearButtonBoxPadding = useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n }),\n [padding],\n )\n const clearButtonPadding = useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n }),\n [padding],\n )\n const clearButtonProps: TextInputClearButtonProps =\n typeof clearButton === 'object' ? clearButton : EMPTY_RECORD\n const clearButtonNode = useMemo(\n () =>\n !disabled &&\n !readOnly &&\n clearButton && (\n <RightCard\n forwardedAs=\"span\"\n padding={clearButtonBoxPadding}\n style={CLEAR_BUTTON_BOX_STYLE}\n tone={customValidity ? 'critical' : 'inherit'}\n >\n <Button\n aria-label=\"Clear\"\n data-qa=\"clear-button\"\n fontSize={fontSize}\n icon={CloseIcon}\n mode=\"bleed\"\n padding={clearButtonPadding}\n radius={radius}\n {...clearButtonProps}\n className={clsx(textInputClearButton, clearButtonProps.className)}\n onClick={handleClearClick}\n onMouseDown={handleClearMouseDown}\n />\n </RightCard>\n ),\n [\n clearButton,\n clearButtonBoxPadding,\n clearButtonPadding,\n clearButtonProps,\n customValidity,\n disabled,\n fontSize,\n handleClearClick,\n handleClearMouseDown,\n radius,\n readOnly,\n ],\n )\n\n // Render suffix (memoized)\n const suffixNode = useMemo(\n () =>\n suffix && (\n <Suffix borderTop borderRight borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{suffix}</span>\n </Suffix>\n ),\n [radius, suffix],\n )\n\n return (\n <Card\n as=\"span\"\n className={textInputRoot}\n data-ui=\"TextInput\"\n display=\"flex\"\n tone={rootTheme.tone}\n >\n {prefixNode}\n\n <span className={inputRoot}>\n <Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n data-ui=\"TextInput__input\"\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />\n\n {presentationNode}\n {clearButtonNode}\n </span>\n\n {suffixNode}\n </Card>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAGA,SAAgB,KAAK,IAA4B;CAC/C,IAAM,UAAU,sBAAsB,EAAE;CAExC,aAAa;EACX,qBAAqB,OAAO;CAC9B;AACF;;;;AAKA,SAAgB,MAAM,IAA4B;CAChD,IAAI,eAAoC,MAElC,eAAe,WAAW;EAC9B,eAAe,KAAK,EAAE;CACxB,CAAC;CAED,aAAa;EAGX,AAFI,gBAAc,aAAa,GAE/B,aAAa;CACf;AACF;;;;ACVA,SAAgB,UAAU,SAA+B;CACvD,OAAO,EAAQ,SAAS,iBAAkB,QAAQ,SAAS,SAAS,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AA;CADF,OAQK,EAAA,QAAA,cAAA,EAAA,QAFejB,UAAAA,QAAAA,EAAAA,QA6Bf,cAAA,EAAA,QAzBDgB,OATF,MAAA,qBAAC,MAAD;EACE,IAAG;EACH,WAAW;EACX,WAAQ;EACR,SAAQ;EACR,MAAM,UAAU;EALlB,UAAA;GAOG;GAEDA;GAyBC;EACG;KA5BH,EAAA,MAAA,YAFehB,EAAAA,MAAAA,UAAAA,MA6Bf,EAAA,MAAA,YAzBDgB,EAAAA,MAAAA,iCATFC;AAqCJ;AArGkB,SAAA,OAAC,KAAM;CAKjB,OAJIC,QAAM,KACNA,QAAM,IAAU,IAChBA,QAAM,IAAU,IAEbA,MAAI;AACb;AAjBY,SAAA,OAAC,GAAM;CAKjB,OAJI,MAAM,IAAU,IAChB,MAAM,KACN,MAAM,IAAU,IAEb,IAAI;AACb;AAvFqC,SAAA,MAAC,OAA+C;CAEvF,AADA,MAAM,eAAe,GACrB,MAAM,gBAAgB;AACxB"}
|
package/dist/toast.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { _ as useTheme_v2, d as createGlobalScopedContext, i as usePrefersReducedMotion, n as LayerProvider, r as isRecord, s as Card, t as useLayer, y as Box } from "./useLayer-
|
|
3
|
-
import { t as Flex } from "./flex-
|
|
4
|
-
import { n as Text, t as Stack } from "./stack-
|
|
5
|
-
import { t as Button } from "./button-
|
|
6
|
-
import { t as Grid } from "./grid-
|
|
2
|
+
import { _ as useTheme_v2, d as createGlobalScopedContext, i as usePrefersReducedMotion, n as LayerProvider, r as isRecord, s as Card, t as useLayer, y as Box } from "./useLayer-D_TnC6On.js";
|
|
3
|
+
import { t as Flex } from "./flex-ohP2jG9d.js";
|
|
4
|
+
import { n as Text, t as Stack } from "./stack-CPdFknrG.js";
|
|
5
|
+
import { t as Button } from "./button-Bp0udHV9.js";
|
|
6
|
+
import { t as Grid } from "./grid-D-gOpN8z.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { clsx } from "clsx/lite";
|
|
9
9
|
import { startTransition, useContext, useState, useSyncExternalStore } from "react";
|
package/dist/tooltip.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { l as POPOVER_MOTION_PROPS, n as _getArrayProp } from "./helpers-XThPpWje.js";
|
|
3
|
-
import { _ as useTheme_v2, d as createGlobalScopedContext, i as usePrefersReducedMotion, s as Card } from "./useLayer-
|
|
3
|
+
import { _ as useTheme_v2, d as createGlobalScopedContext, i as usePrefersReducedMotion, s as Card } from "./useLayer-D_TnC6On.js";
|
|
4
4
|
import { a as useReferenceElement, i as origin, n as AnimateActivity, r as getTransformOrigin, s as useLatestRef, t as getElementRef } from "./getElementRef-BLVMlHTn.js";
|
|
5
|
-
import { a as resolvePortalElement, n as Portal, o as useBoundaryElement, r as usePortal, t as Arrow } from "./arrow-
|
|
6
|
-
import { t as Layer } from "./layer-
|
|
5
|
+
import { a as resolvePortalElement, n as Portal, o as useBoundaryElement, r as usePortal, t as Arrow } from "./arrow-MMVAW3Ew.js";
|
|
6
|
+
import { t as Layer } from "./layer-DP8gT1ex.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { clsx } from "clsx/lite";
|
|
9
9
|
import { Activity, cloneElement, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -16,9 +16,9 @@ const BASE_STYLE = { "&[data-as=\"ul\"],&[data-as=\"ol\"]": { listStyle: "none"
|
|
|
16
16
|
function boxStyle() {
|
|
17
17
|
return BASE_STYLE;
|
|
18
18
|
}
|
|
19
|
-
const RULES$
|
|
19
|
+
const RULES$3 = _ruleSet(responsiveBoxSizingStyle, responsiveBoxHeightStyle, responsiveBoxOverflowStyle, responsiveBoxDisplayStyle);
|
|
20
20
|
function responsiveBoxStyle() {
|
|
21
|
-
return RULES$
|
|
21
|
+
return RULES$3;
|
|
22
22
|
}
|
|
23
23
|
function responsiveBoxDisplayStyle(props) {
|
|
24
24
|
let { media } = getTheme_v2(props.theme);
|
|
@@ -36,20 +36,20 @@ function responsiveBoxOverflowStyle(props) {
|
|
|
36
36
|
let { media } = getTheme_v2(props.theme);
|
|
37
37
|
return _responsive(media, props.$overflow, (overflow) => ({ overflow }));
|
|
38
38
|
}
|
|
39
|
-
const RULES$
|
|
39
|
+
const RULES$2 = _ruleSet({
|
|
40
40
|
minWidth: 0,
|
|
41
41
|
minHeight: 0
|
|
42
42
|
}, responsiveFlexItemStyle);
|
|
43
43
|
function flexItemStyle() {
|
|
44
|
-
return RULES$
|
|
44
|
+
return RULES$2;
|
|
45
45
|
}
|
|
46
46
|
function responsiveFlexItemStyle(props) {
|
|
47
47
|
let { media } = getTheme_v2(props.theme);
|
|
48
48
|
return props.$flex ? _responsive(media, props.$flex, (flex) => ({ flex: `${flex}` })) : _ruleSet();
|
|
49
49
|
}
|
|
50
|
-
const RULES$
|
|
50
|
+
const RULES$1 = _ruleSet(responsiveGridItemRowStyle, responsiveGridItemRowStartStyle, responsiveGridItemRowEndStyle, responsiveGridItemColumnStyle, responsiveGridItemColumnStartStyle, responsiveGridItemColumnEndStyle);
|
|
51
51
|
function responsiveGridItemStyle() {
|
|
52
|
-
return RULES$
|
|
52
|
+
return RULES$1;
|
|
53
53
|
}
|
|
54
54
|
const GRID_ITEM_ROW = {
|
|
55
55
|
auto: "auto",
|
|
@@ -217,10 +217,19 @@ function useTheme_v2() {
|
|
|
217
217
|
let $ = c(2), t0 = useTheme(), t1;
|
|
218
218
|
return $[0] === t0 ? t1 = $[1] : (t1 = getTheme_v2(t0), $[0] = t0, $[1] = t1), t1;
|
|
219
219
|
}
|
|
220
|
+
const cache = /* @__PURE__ */ new WeakMap();
|
|
220
221
|
/**
|
|
222
|
+
* Joined once per pair of theme color objects, as themes are immutable.
|
|
223
|
+
*
|
|
221
224
|
* @internal
|
|
222
225
|
*/
|
|
223
226
|
function _cardColorStyle(base, color, checkered = !1) {
|
|
227
|
+
let byColor = cache.get(base);
|
|
228
|
+
byColor || cache.set(base, byColor = /* @__PURE__ */ new WeakMap());
|
|
229
|
+
let declarations = byColor.get(color);
|
|
230
|
+
return declarations === void 0 && (declarations = Object.entries(cardColorVariables(base, color)).filter(([, value]) => value).map(([name, value]) => `${name}: ${value};`).join(""), byColor.set(color, declarations)), checkered ? `${declarations}--card-bg-image: repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%);` : declarations;
|
|
231
|
+
}
|
|
232
|
+
function cardColorVariables(base, color) {
|
|
224
233
|
return {
|
|
225
234
|
"--card-backdrop-color": base.backdrop,
|
|
226
235
|
"--card-focus-ring-color": base.focusRing,
|
|
@@ -248,7 +257,6 @@ function _cardColorStyle(base, color, checkered = !1) {
|
|
|
248
257
|
"--card-avatar-cyan-bg-color": color.avatar.cyan.bg,
|
|
249
258
|
"--card-avatar-cyan-fg-color": color.avatar.cyan.fg,
|
|
250
259
|
"--card-bg-color": color.bg,
|
|
251
|
-
"--card-bg-image": checkered ? `repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%)` : void 0,
|
|
252
260
|
"--card-border-color": color.border,
|
|
253
261
|
"--card-badge-default-bg-color": color.badge.default.bg,
|
|
254
262
|
"--card-badge-default-dot-color": color.badge.default.dot,
|
|
@@ -308,9 +316,9 @@ function focusRingStyle(opts) {
|
|
|
308
316
|
focusRingOutsetWidth > 0 && `0 0 0 ${focusRingOutsetWidth}px var(--card-focus-ring-color)`
|
|
309
317
|
].filter(Boolean).join(",");
|
|
310
318
|
}
|
|
311
|
-
const RULES
|
|
319
|
+
const RULES = _ruleSet(border, borderTop, borderRight, borderBottom, borderLeft);
|
|
312
320
|
function responsiveBorderStyle() {
|
|
313
|
-
return RULES
|
|
321
|
+
return RULES;
|
|
314
322
|
}
|
|
315
323
|
function border(props) {
|
|
316
324
|
let { card, media } = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
@@ -446,33 +454,40 @@ function ThemeColorProvider(props) {
|
|
|
446
454
|
children
|
|
447
455
|
}), $[0] = children, $[1] = root.theme, $[2] = t0, $[3] = tone, $[4] = t1) : t1 = $[4], t1;
|
|
448
456
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
function cardBaseStyle(props) {
|
|
454
|
-
let { $checkered } = props, { space } = getTheme_v2(props.theme);
|
|
455
|
-
return css`${$checkered && css`background-size:${space[3]}px ${space[3]}px;background-position:50% 50%;background-image:var(--card-bg-image);`} &[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{outline:none;text-decoration:none;}&[data-as='pre']{font:inherit;}`;
|
|
457
|
+
function cardCheckeredStyle(props) {
|
|
458
|
+
if (!props.$checkered) return !1;
|
|
459
|
+
let { space } = getTheme_v2(props.theme);
|
|
460
|
+
return css`background-size:${space[3]}px ${space[3]}px;background-position:50% 50%;background-image:var(--card-bg-image);`;
|
|
456
461
|
}
|
|
462
|
+
const cardStaticStyle = css`color:var(--card-fg-color);&[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{outline:none;text-decoration:none;}&[data-as='pre']{font:inherit;}`;
|
|
457
463
|
function cardColorStyle(props) {
|
|
458
|
-
let { $checkered
|
|
464
|
+
let { $checkered } = props, { color } = getTheme_v2(props.theme);
|
|
465
|
+
return css`color-scheme:${color._dark ? "dark" : "light"};${_cardColorStyle(color, color, $checkered)} &[data-as='button']{--card-focus-ring-box-shadow:none;cursor:default;box-shadow:var(--card-focus-ring-box-shadow);}&[data-as='a']{cursor:pointer;box-shadow:var(--card-focus-ring-box-shadow);}&[data-as='button']:disabled,&[data-as='a'][data-disabled]{${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}}&[data-as='button']:not(:disabled),&[data-as='a']:not([data-disabled]){&[data-pressed]{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}&[data-selected]{${_cardColorStyle(color, color.selectable.default.selected, $checkered)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}}&:active{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}}}}`;
|
|
466
|
+
}
|
|
467
|
+
function cardStyle(props) {
|
|
468
|
+
let { card, color, style } = getTheme_v2(props.theme), border = {
|
|
459
469
|
width: card.border.width,
|
|
460
470
|
color: "var(--card-border-color)"
|
|
461
471
|
};
|
|
462
|
-
return css`
|
|
472
|
+
return css`background-color:${props.$muted ? "var(--card-muted-bg-color)" : "var(--card-bg-color)"};${props.$focusRing && css`&[data-as='button']:not(:disabled):focus-visible,&[data-as='a']:not([data-disabled]):focus-visible{--card-focus-ring-box-shadow:${focusRingStyle({
|
|
463
473
|
base: color,
|
|
464
474
|
border,
|
|
465
475
|
focusRing: card.focusRing
|
|
466
|
-
})
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
}
|
|
472
|
-
|
|
476
|
+
})};}`} ${style?.card?.root}`;
|
|
477
|
+
}
|
|
478
|
+
const CardStatic = styled(/* @__PURE__ */ styled(Box).withConfig({
|
|
479
|
+
displayName: "CardBorder",
|
|
480
|
+
componentId: "sc-ujszhm-0"
|
|
481
|
+
})(responsiveBorderStyle, cardCheckeredStyle)).withConfig({
|
|
482
|
+
displayName: "CardStatic",
|
|
483
|
+
componentId: "sc-ujszhm-1"
|
|
484
|
+
})`${cardStaticStyle}`, StyledCard = /* @__PURE__ */ styled(/* @__PURE__ */ styled(CardStatic).withConfig({
|
|
485
|
+
displayName: "CardColor",
|
|
486
|
+
componentId: "sc-ujszhm-2"
|
|
487
|
+
})(cardColorStyle)).withConfig({
|
|
473
488
|
displayName: "StyledCard",
|
|
474
|
-
componentId: "sc-
|
|
475
|
-
})(
|
|
489
|
+
componentId: "sc-ujszhm-3"
|
|
490
|
+
})(responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
|
|
476
491
|
function CardComponent(props) {
|
|
477
492
|
let $ = c(57), asProp, border, borderBottom, borderLeft, borderRight, borderTop, muted, pressed, ref, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
478
493
|
$[0] === props ? (asProp = $[1], border = $[2], borderBottom = $[3], borderLeft = $[4], borderRight = $[5], borderTop = $[6], muted = $[7], pressed = $[8], ref = $[9], restProps = $[10], scheme = $[11], selected = $[12], shadow = $[13], t0 = $[14], t1 = $[15], t2 = $[16], t3 = $[17]) : ({__unstable_checkered: t0, __unstable_focusRing: t1, as: asProp, border, borderTop, borderRight, borderBottom, borderLeft, muted, pressed, radius: t2, ref, scheme, selected, shadow, tone: t3, ...restProps} = props, $[0] = props, $[1] = asProp, $[2] = border, $[3] = borderBottom, $[4] = borderLeft, $[5] = borderRight, $[6] = borderTop, $[7] = muted, $[8] = pressed, $[9] = ref, $[10] = restProps, $[11] = scheme, $[12] = selected, $[13] = shadow, $[14] = t0, $[15] = t1, $[16] = t2, $[17] = t3);
|
|
@@ -723,4 +738,4 @@ function useLayer() {
|
|
|
723
738
|
}
|
|
724
739
|
export { useTheme_v2 as _, useMatchMedia as a, responsivePaddingStyle as b, ThemeColorProvider as c, createGlobalScopedContext as d, globalScope as f, useTheme$1 as g, _cardColorStyle as h, usePrefersReducedMotion as i, useRootTheme as l, focusRingStyle as m, LayerProvider as n, useMediaIndex as o, focusRingBorderStyle as p, isRecord as r, Card as s, useLayer as t, ThemeProvider$1 as u, responsiveRadiusStyle as v, flexItemStyle as x, Box as y };
|
|
725
740
|
|
|
726
|
-
//# sourceMappingURL=useLayer-
|
|
741
|
+
//# sourceMappingURL=useLayer-D_TnC6On.js.map
|