@react-spectrum/color 3.0.1 → 3.0.3
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/ColorArea.main.js +2 -5
- package/dist/ColorArea.main.js.map +1 -1
- package/dist/ColorArea.mjs +2 -5
- package/dist/ColorArea.module.js +2 -5
- package/dist/ColorArea.module.js.map +1 -1
- package/dist/ColorEditor.f85fa1f2.css +20 -0
- package/dist/ColorEditor.f85fa1f2.css.map +1 -0
- package/dist/ColorEditor.main.js +13 -16
- package/dist/ColorEditor.main.js.map +1 -1
- package/dist/ColorEditor.mjs +13 -16
- package/dist/ColorEditor.module.js +13 -16
- package/dist/ColorEditor.module.js.map +1 -1
- package/dist/ColorField.main.js +2 -5
- package/dist/ColorField.main.js.map +1 -1
- package/dist/ColorField.mjs +2 -5
- package/dist/ColorField.module.js +2 -5
- package/dist/ColorField.module.js.map +1 -1
- package/dist/ColorPicker.96797a19.css +206 -0
- package/dist/ColorPicker.96797a19.css.map +1 -0
- package/dist/ColorPicker.main.js +37 -40
- package/dist/ColorPicker.main.js.map +1 -1
- package/dist/ColorPicker.mjs +37 -40
- package/dist/ColorPicker.module.js +37 -40
- package/dist/ColorPicker.module.js.map +1 -1
- package/dist/ColorSlider.main.js +3 -6
- package/dist/ColorSlider.main.js.map +1 -1
- package/dist/ColorSlider.mjs +3 -6
- package/dist/ColorSlider.module.js +3 -6
- package/dist/ColorSlider.module.js.map +1 -1
- package/dist/ColorSwatch.fabed858.css +260 -0
- package/dist/ColorSwatch.fabed858.css.map +1 -0
- package/dist/ColorSwatch.main.js +31 -34
- package/dist/ColorSwatch.main.js.map +1 -1
- package/dist/ColorSwatch.mjs +32 -35
- package/dist/ColorSwatch.module.js +32 -35
- package/dist/ColorSwatch.module.js.map +1 -1
- package/dist/ColorSwatchPicker.25f8fb63.css +356 -0
- package/dist/ColorSwatchPicker.25f8fb63.css.map +1 -0
- package/dist/ColorSwatchPicker.main.js +42 -45
- package/dist/ColorSwatchPicker.main.js.map +1 -1
- package/dist/ColorSwatchPicker.mjs +42 -45
- package/dist/ColorSwatchPicker.module.js +42 -45
- package/dist/ColorSwatchPicker.module.js.map +1 -1
- package/dist/ColorWheel.main.js +2 -6
- package/dist/ColorWheel.main.js.map +1 -1
- package/dist/ColorWheel.mjs +2 -6
- package/dist/ColorWheel.module.js +2 -6
- package/dist/ColorWheel.module.js.map +1 -1
- package/dist/colorhandle_vars_css.main.js.map +1 -1
- package/dist/colorhandle_vars_css.module.js.map +1 -1
- package/dist/colorslider_vars_css.main.js.map +1 -1
- package/dist/colorslider_vars_css.module.js.map +1 -1
- package/dist/colorwheel_vars_css.main.js.map +1 -1
- package/dist/colorwheel_vars_css.module.js.map +1 -1
- package/dist/types.d.ts +7 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/{vars.d78ec0e6.css → vars.a54898d8.css} +2 -2
- package/dist/{vars.d78ec0e6.css.map → vars.a54898d8.css.map} +1 -1
- package/package.json +23 -23
- package/src/ColorArea.tsx +5 -8
- package/src/ColorEditor.tsx +5 -8
- package/src/ColorField.tsx +5 -8
- package/src/ColorPicker.tsx +5 -8
- package/src/ColorSlider.tsx +5 -8
- package/src/ColorSwatch.tsx +5 -8
- package/src/ColorSwatchPicker.tsx +5 -8
- package/src/ColorWheel.tsx +5 -9
- package/dist/ColorEditor.32e497e8.css +0 -20
- package/dist/ColorEditor.32e497e8.css.map +0 -1
- package/dist/ColorPicker.ab9f47c0.css +0 -204
- package/dist/ColorPicker.ab9f47c0.css.map +0 -1
- package/dist/ColorSwatch.f6e6f811.css +0 -260
- package/dist/ColorSwatch.f6e6f811.css.map +0 -1
- package/dist/ColorSwatchPicker.1575be06.css +0 -356
- package/dist/ColorSwatchPicker.1575be06.css.map +0 -1
@@ -0,0 +1,206 @@
|
|
1
|
+
@layer s1-a;
|
2
|
+
|
3
|
+
@layer s1-b {
|
4
|
+
.s1-5-enzrfps1-b:lang(ar) {
|
5
|
+
font-family: myriad-arabic, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
@layer s1-c {
|
10
|
+
.s1-5-enzwzjs1-c:lang(he) {
|
11
|
+
font-family: myriad-hebrew, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
@layer s1-d {
|
16
|
+
.s1-5-enzykds1-d:lang(ja) {
|
17
|
+
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
@layer s1-e {
|
22
|
+
.s1-5-enzzrgs1-e:lang(ko) {
|
23
|
+
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
@layer s1-f {
|
28
|
+
.s1-5-eo0c6ss1-f:lang(zh) {
|
29
|
+
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
@layer s1-g {
|
34
|
+
.s1-5-1uotwbws1-g:lang(zh-hant) {
|
35
|
+
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
@layer s1-h {
|
40
|
+
.s1-5-bc1l9os1-h:-webkit-any(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
41
|
+
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
42
|
+
}
|
43
|
+
|
44
|
+
.s1-5-bc1l9os1-h:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
45
|
+
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
@layer a {
|
50
|
+
.s1-bs1-a {
|
51
|
+
background-color: #0000;
|
52
|
+
}
|
53
|
+
|
54
|
+
.s1-As1-f {
|
55
|
+
border-style: none;
|
56
|
+
}
|
57
|
+
|
58
|
+
.s1-Is1-a {
|
59
|
+
padding-top: 0;
|
60
|
+
}
|
61
|
+
|
62
|
+
.s1-Js1-a {
|
63
|
+
padding-bottom: 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
.s1-Gs1-a {
|
67
|
+
padding-inline-start: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
.s1-Hs1-a {
|
71
|
+
padding-inline-end: 0;
|
72
|
+
}
|
73
|
+
|
74
|
+
.s1-_Ss1-d {
|
75
|
+
display: flex;
|
76
|
+
}
|
77
|
+
|
78
|
+
.s1-_Us1-c {
|
79
|
+
align-items: center;
|
80
|
+
}
|
81
|
+
|
82
|
+
.s1-ls1-M {
|
83
|
+
row-gap: .714286em;
|
84
|
+
}
|
85
|
+
|
86
|
+
.s1-ms1-M {
|
87
|
+
column-gap: .714286em;
|
88
|
+
}
|
89
|
+
|
90
|
+
.s1-5s1-a {
|
91
|
+
font-family: adobe-clean, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
|
92
|
+
}
|
93
|
+
|
94
|
+
.s1-as1-___K {
|
95
|
+
color: var(--spectrum-alias-text-color, var(--spectrum-global-color-gray-800));
|
96
|
+
}
|
97
|
+
|
98
|
+
.s1-6s1-a {
|
99
|
+
font-size: var(--spectrum-global-dimension-font-size-50);
|
100
|
+
}
|
101
|
+
|
102
|
+
.s1-6s1-b {
|
103
|
+
font-size: var(--spectrum-global-dimension-font-size-75);
|
104
|
+
}
|
105
|
+
|
106
|
+
.s1-6s1-c {
|
107
|
+
font-size: var(--spectrum-global-dimension-font-size-100);
|
108
|
+
}
|
109
|
+
|
110
|
+
.s1-6s1-d {
|
111
|
+
font-size: var(--spectrum-global-dimension-font-size-200);
|
112
|
+
}
|
113
|
+
|
114
|
+
.s1-_Es1-a {
|
115
|
+
outline-style: none;
|
116
|
+
}
|
117
|
+
|
118
|
+
.s1-_Es1-b {
|
119
|
+
outline-style: solid;
|
120
|
+
}
|
121
|
+
|
122
|
+
.s1-ds1-___I {
|
123
|
+
outline-color: var(--spectrum-alias-focus-color, var(--spectrum-global-color-blue-400));
|
124
|
+
}
|
125
|
+
|
126
|
+
.s1-_Gs1-c {
|
127
|
+
outline-width: var(--spectrum-alias-border-size-thick, var(--spectrum-global-dimension-static-size-25));
|
128
|
+
}
|
129
|
+
|
130
|
+
.s1-_Fs1-c {
|
131
|
+
outline-offset: var(--spectrum-alias-border-size-thick, var(--spectrum-global-dimension-static-size-25));
|
132
|
+
}
|
133
|
+
|
134
|
+
.s1-_ps1-c:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
135
|
+
border-top-left-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
136
|
+
}
|
137
|
+
|
138
|
+
.s1-_ps1-c:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
139
|
+
border-top-left-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
140
|
+
}
|
141
|
+
|
142
|
+
.s1-_ps1-c:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
143
|
+
border-top-right-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
144
|
+
}
|
145
|
+
|
146
|
+
.s1-_ps1-c:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
147
|
+
border-top-right-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
148
|
+
}
|
149
|
+
|
150
|
+
.s1-_qs1-c:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
151
|
+
border-top-right-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
152
|
+
}
|
153
|
+
|
154
|
+
.s1-_qs1-c:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
155
|
+
border-top-right-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
156
|
+
}
|
157
|
+
|
158
|
+
.s1-_qs1-c:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
159
|
+
border-top-left-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
160
|
+
}
|
161
|
+
|
162
|
+
.s1-_qs1-c:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
163
|
+
border-top-left-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
164
|
+
}
|
165
|
+
|
166
|
+
.s1-_rs1-c:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
167
|
+
border-bottom-left-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
168
|
+
}
|
169
|
+
|
170
|
+
.s1-_rs1-c:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
171
|
+
border-bottom-left-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
172
|
+
}
|
173
|
+
|
174
|
+
.s1-_rs1-c:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
175
|
+
border-bottom-right-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
176
|
+
}
|
177
|
+
|
178
|
+
.s1-_rs1-c:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
179
|
+
border-bottom-right-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
180
|
+
}
|
181
|
+
|
182
|
+
.s1-_ss1-c:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
183
|
+
border-bottom-right-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
184
|
+
}
|
185
|
+
|
186
|
+
.s1-_ss1-c:not(:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi))) {
|
187
|
+
border-bottom-right-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
188
|
+
}
|
189
|
+
|
190
|
+
.s1-_ss1-c:-webkit-any(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
191
|
+
border-bottom-left-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
192
|
+
}
|
193
|
+
|
194
|
+
.s1-_ss1-c:is(:lang(ae), :lang(ar), :lang(arc), :lang(bcc), :lang(bqi), :lang(ckb), :lang(dv), :lang(fa), :lang(glk), :lang(he), :lang(ku), :lang(mzn), :lang(nqo), :lang(pnb), :lang(ps), :lang(sd), :lang(ug), :lang(ur), :lang(yi)) {
|
195
|
+
border-bottom-left-radius: var(--spectrum-alias-border-radius-regular, var(--spectrum-global-dimension-size-50));
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
@layer s1-b.s1-a {
|
200
|
+
@media (forced-colors: active) {
|
201
|
+
.s1-ds1-as1-___D {
|
202
|
+
outline-color: highlight;
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
206
|
+
/*# sourceMappingURL=ColorPicker.96797a19.css.map */
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":"ACAA;;AAAA;EA4EI;;;;;AA5EJ;EAoFI;;;;;AApFJ;EA4FI;;;;;AA5FJ;EAoGI;;;;;AApGJ;EA4GI;;;;;AA5GJ;EAoHI;;;;;AApHJ;EA4HI;;;;EAAA;;;;;AA1HJ;EACE;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAYA;;;;EA8DA;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAMA;;;;EAxJA;;;;EAMA;;;;EAMA;;;;EAcA;;;;EAMA;;;;EAMA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAMA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAMA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAMA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAvCF;EACE;IACE","sources":["4265cbe66e3f0344","packages/@react-spectrum/color/src/ColorPicker.tsx"],"sourcesContent":["@import \"01eac0e6ccf8a0b9\";\n@import \"e3400cf9c7231dbc\";\n","@layer s1-a, s1-b, s1-c, s1-d, s1-e, s1-f, s1-g, s1-h;\n\n@layer a {\n .s1-bs1-a {\n background-color: transparent;\n }\n}\n\n@layer a {\n .s1-As1-f {\n border-style: none;\n }\n}\n\n@layer a {\n .s1-Is1-a {\n padding-top: 0px;\n }\n}\n\n@layer a {\n .s1-Js1-a {\n padding-bottom: 0px;\n }\n}\n\n@layer a {\n .s1-Gs1-a {\n padding-inline-start: 0px;\n }\n}\n\n@layer a {\n .s1-Hs1-a {\n padding-inline-end: 0px;\n }\n}\n\n@layer a {\n .s1-_Ss1-d {\n display: flex;\n }\n}\n\n@layer a {\n .s1-_Us1-c {\n align-items: center;\n }\n}\n\n@layer a {\n .s1-ls1-M {\n row-gap: 0.7142857142857143em;\n }\n}\n\n@layer a {\n .s1-ms1-M {\n column-gap: 0.7142857142857143em;\n }\n}\n\n@layer a {\n .s1-_Es1-a {\n outline-style: none;\n }\n}\n\n@layer a {\n .s1-5s1-a {\n font-family: adobe-clean, ui-sans-serif, system-ui, sans-serif;\n }\n}\n\n@layer s1-b {\n .s1-5-enzrfps1-b {\n &:lang(ar) {\n font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;\n }\n }\n}\n\n@layer s1-c {\n .s1-5-enzwzjs1-c {\n &:lang(he) {\n font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;\n }\n }\n}\n\n@layer s1-d {\n .s1-5-enzykds1-d {\n &:lang(ja) {\n font-family: adobe-clean-han-japanese, 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', Osaka, YuGothic, 'Yu Gothic', 'メイリオ', Meiryo, 'MS Pゴシック', 'MS PGothic', sans-serif;\n }\n }\n}\n\n@layer s1-e {\n .s1-5-enzzrgs1-e {\n &:lang(ko) {\n font-family: adobe-clean-han-korean, source-han-korean, 'Malgun Gothic', 'Apple Gothic', sans-serif;\n }\n }\n}\n\n@layer s1-f {\n .s1-5-eo0c6ss1-f {\n &:lang(zh) {\n font-family: adobe-clean-han-traditional, source-han-traditional, 'MingLiu', 'Heiti TC Light', sans-serif;\n }\n }\n}\n\n@layer s1-g {\n .s1-5-1uotwbws1-g {\n &:lang(zh-hant) {\n font-family: adobe-clean-han-traditional, source-han-traditional, 'MingLiu', 'Microsoft JhengHei UI', 'Microsoft JhengHei', 'Heiti TC Light', sans-serif;\n }\n }\n}\n\n@layer s1-h {\n .s1-5-bc1l9os1-h {\n &:lang(zh-Hans, zh-CN, zh-SG) {\n font-family: adobe-clean-han-simplified-c, source-han-simplified-c, 'SimSun', 'Heiti SC Light', sans-serif;\n }\n }\n}\n\n@layer a {\n .s1-as1-___K {\n color: var(--spectrum-alias-text-color, var(--spectrum-global-color-gray-800));\n }\n}\n\n@layer a {\n .s1-6s1-a {\n font-size: var(--spectrum-global-dimension-font-size-50);\n }\n}\n\n@layer a {\n .s1-6s1-b {\n font-size: var(--spectrum-global-dimension-font-size-75);\n }\n}\n\n@layer a {\n .s1-6s1-c {\n font-size: var(--spectrum-global-dimension-font-size-100);\n }\n}\n\n@layer a {\n .s1-6s1-d {\n font-size: var(--spectrum-global-dimension-font-size-200);\n }\n}\n\n"],"names":[],"version":3,"file":"ColorPicker.96797a19.css.map"}
|
package/dist/ColorPicker.main.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require("./ColorPicker.
|
1
|
+
require("./ColorPicker.96797a19.css");
|
2
2
|
var $f076f5c85640192a$exports = require("./ColorSwatch.main.js");
|
3
3
|
var $64NP6$reactariacomponents = require("react-aria-components");
|
4
4
|
var $64NP6$reactspectrumview = require("@react-spectrum/view");
|
@@ -34,7 +34,7 @@ $parcel$export(module.exports, "ColorPicker", () => $0c330b4a4fe337a6$export$9fe
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
-
|
37
|
+
const $0c330b4a4fe337a6$export$9feb1bc2e5f1ccb3 = /*#__PURE__*/ (0, ($parcel$interopDefault($64NP6$react))).forwardRef(function ColorPicker(props, ref) {
|
38
38
|
let swatchRef = (0, $64NP6$react.useRef)(null);
|
39
39
|
let domRef = (0, $64NP6$reactspectrumutils.useFocusableRef)(ref);
|
40
40
|
let labelId = (0, $64NP6$reactariautils.useId)();
|
@@ -46,30 +46,30 @@ function $0c330b4a4fe337a6$var$ColorPicker(props, ref) {
|
|
46
46
|
ref: domRef,
|
47
47
|
className: function anonymous(props) {
|
48
48
|
let rules = "";
|
49
|
-
rules += '
|
50
|
-
rules += '
|
51
|
-
rules += '
|
52
|
-
rules += '
|
53
|
-
rules += '
|
54
|
-
rules += '
|
55
|
-
rules += '
|
56
|
-
rules += '
|
57
|
-
rules += '
|
58
|
-
rules += '
|
59
|
-
rules += '
|
60
|
-
rules += '
|
61
|
-
rules += '
|
62
|
-
rules += '
|
63
|
-
rules += '
|
64
|
-
rules += '
|
65
|
-
rules += '
|
66
|
-
rules += '
|
67
|
-
rules += '
|
68
|
-
rules += '
|
69
|
-
if (props.size === "L") rules += '
|
70
|
-
else if (props.size === "M") rules += '
|
71
|
-
else if (props.size === "S") rules += '
|
72
|
-
else if (props.size === "XS") rules += '
|
49
|
+
rules += ' s1-bs1-a';
|
50
|
+
rules += ' s1-As1-f';
|
51
|
+
rules += ' s1-Is1-a';
|
52
|
+
rules += ' s1-Js1-a';
|
53
|
+
rules += ' s1-Gs1-a';
|
54
|
+
rules += ' s1-Hs1-a';
|
55
|
+
rules += ' s1-_Ss1-d';
|
56
|
+
rules += ' s1-_Us1-c';
|
57
|
+
rules += ' s1-ls1-M';
|
58
|
+
rules += ' s1-ms1-M';
|
59
|
+
rules += ' s1-_Es1-a';
|
60
|
+
rules += ' s1-5-bc1l9os1-h';
|
61
|
+
rules += ' s1-5-1uotwbws1-g';
|
62
|
+
rules += ' s1-5-eo0c6ss1-f';
|
63
|
+
rules += ' s1-5-enzzrgs1-e';
|
64
|
+
rules += ' s1-5-enzykds1-d';
|
65
|
+
rules += ' s1-5-enzwzjs1-c';
|
66
|
+
rules += ' s1-5-enzrfps1-b';
|
67
|
+
rules += ' s1-5s1-a';
|
68
|
+
rules += ' s1-as1-___K';
|
69
|
+
if (props.size === "L") rules += ' s1-6s1-d';
|
70
|
+
else if (props.size === "M") rules += ' s1-6s1-c';
|
71
|
+
else if (props.size === "S") rules += ' s1-6s1-b';
|
72
|
+
else if (props.size === "XS") rules += ' s1-6s1-a';
|
73
73
|
return rules;
|
74
74
|
}({
|
75
75
|
size: props.size || 'M'
|
@@ -77,16 +77,16 @@ function $0c330b4a4fe337a6$var$ColorPicker(props, ref) {
|
|
77
77
|
}, ({ isFocusVisible: isFocusVisible })=>/*#__PURE__*/ (0, ($parcel$interopDefault($64NP6$react))).createElement((0, ($parcel$interopDefault($64NP6$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($64NP6$react))).createElement("div", {
|
78
78
|
className: function anonymous(props) {
|
79
79
|
let rules = "";
|
80
|
-
if (props.isFocusVisible) rules += '
|
81
|
-
else rules += '
|
82
|
-
rules += '
|
83
|
-
rules += '
|
84
|
-
rules += '
|
85
|
-
rules += '
|
86
|
-
rules += '
|
87
|
-
rules += '
|
88
|
-
rules += '
|
89
|
-
rules += '
|
80
|
+
if (props.isFocusVisible) rules += ' s1-_Es1-b';
|
81
|
+
else rules += ' s1-_Es1-a';
|
82
|
+
rules += ' s1-ds1-as1-___D';
|
83
|
+
rules += ' s1-ds1-___I';
|
84
|
+
rules += ' s1-_Gs1-c';
|
85
|
+
rules += ' s1-_Fs1-c';
|
86
|
+
rules += ' s1-_ps1-c';
|
87
|
+
rules += ' s1-_qs1-c';
|
88
|
+
rules += ' s1-_rs1-c';
|
89
|
+
rules += ' s1-_ss1-c';
|
90
90
|
return rules;
|
91
91
|
}({
|
92
92
|
isFocusVisible: isFocusVisible
|
@@ -117,10 +117,7 @@ function $0c330b4a4fe337a6$var$ColorPicker(props, ref) {
|
|
117
117
|
padding: 'var(--spectrum-global-dimension-size-200)'
|
118
118
|
}
|
119
119
|
}, props.children))));
|
120
|
-
}
|
121
|
-
/**
|
122
|
-
* A ColorPicker combines a swatch with a customizable popover for editing a color.
|
123
|
-
*/ let $0c330b4a4fe337a6$export$9feb1bc2e5f1ccb3 = /*#__PURE__*/ (0, ($parcel$interopDefault($64NP6$react))).forwardRef($0c330b4a4fe337a6$var$ColorPicker);
|
120
|
+
});
|
124
121
|
|
125
122
|
|
126
123
|
//# sourceMappingURL=ColorPicker.main.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgCM,MAAM,0DAAc,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,YAAY,KAA+B,EAAE,GAAoC;IACpI,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,UAAU,CAAA,GAAA,2BAAI;IAClB,qBACE,0DAAC,CAAA,GAAA,sCAAc,GAAM,qBACnB,0DAAC,CAAA,GAAA,wCAAY;QAAE,MAAK;QAAU,YAAW;QAAO,WAAW,CAAA,GAAA,sCAAW,EAAE;qBACtE,0DAAC,CAAA,GAAA,iCAAK;QACJ,KAAK;QACL,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkBR;YAAC,MAAM,MAAM,IAAI,IAAI;QAAG;OAC1B,CAAC,kBAAC,cAAc,EAAC,iBAChB,oIACE,0DAAC;YACC,WAAW;;;;;;;;;;;;;cASR;gCAAC;YAAc;yBAClB,0DAAC,CAAA,GAAA,qCAAU;YACT,KAAK;YACL,OAAO,MAAM,KAAK;YAClB,MAAM,MAAM,IAAI;YAChB,UAAU,MAAM,QAAQ;YACxB,cAAY,KAAK,CAAC,aAAa;YAC/B,mBAAiB,KAAK,CAAC,kBAAkB;YACzC,oBAAkB,KAAK,CAAC,mBAAmB;YAC3C,gBAAc,KAAK,CAAC,eAAe;aAEtC,MAAM,KAAK,kBACV,0DAAC;YAAK,IAAI;WAAU,MAAM,KAAK,mBAKvC,0DAAC,CAAA,GAAA,iCAAK;QACJ,mBAAiB,MAAM,KAAK,GAAG,UAAU,KAAK,CAAC,kBAAkB;QACjE,cAAY,KAAK,CAAC,aAAa;QAC/B,cAAc;YACZ,OAAO;YACP,UAAU;YACV,QAAQ,SAAS,sBAAsB;QACzC;qBACA,0DAAC,CAAA,GAAA,gCAAM;QACL,cAAc;YACZ,UAAU;YACV,QAAQ;YACR,SAAS;QACX;OACC,MAAM,QAAQ;AAM3B","sources":["packages/@react-spectrum/color/src/ColorPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ColorPicker as AriaColorPicker, Button, Color} from 'react-aria-components';\nimport {AriaLabelingProps, FocusableRef, ValueBase} from '@react-types/shared';\nimport {ColorSwatch} from './ColorSwatch';\nimport {Content} from '@react-spectrum/view';\nimport {Dialog, DialogTrigger} from '@react-spectrum/dialog';\nimport React, {ReactNode, useRef} from 'react';\nimport {style} from '@react-spectrum/style-macro-s1' with {type: 'macro'};\nimport {unwrapDOMRef, useFocusableRef} from '@react-spectrum/utils';\nimport {useId} from '@react-aria/utils';\n\nexport interface SpectrumColorPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps {\n /** A visual label for the color picker. */\n label?: ReactNode,\n /** The contents of the color picker popover, e.g. `<ColorEditor />`. */\n children?: ReactNode,\n /**\n * The size of the color swatch.\n * @default \"M\"\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the color swatch.\n * @default \"default\"\n */\n rounding?: 'default' | 'none' | 'full'\n}\n\n/**\n * A ColorPicker combines a swatch with a customizable popover for editing a color.\n */\nexport const ColorPicker = React.forwardRef(function ColorPicker(props: SpectrumColorPickerProps, ref: FocusableRef<HTMLButtonElement>) {\n let swatchRef = useRef(null);\n let domRef = useFocusableRef(ref);\n let labelId = useId();\n return (\n <AriaColorPicker {...props}>\n <DialogTrigger type=\"popover\" mobileType=\"tray\" targetRef={unwrapDOMRef(swatchRef)}>\n <Button \n ref={domRef}\n className={style({\n backgroundColor: 'transparent',\n borderStyle: 'none',\n padding: 0,\n display: 'flex',\n alignItems: 'center',\n gap: 'text-to-control',\n outlineStyle: 'none',\n fontFamily: 'sans',\n color: 'body',\n fontSize: {\n size: {\n XS: 'xs',\n S: 'sm',\n M: 'base',\n L: 'lg'\n }\n }\n })({size: props.size || 'M'})}>\n {({isFocusVisible}) => (\n <>\n <div\n className={style({\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid'\n },\n outlineColor: 'focus-ring',\n outlineWidth: 2,\n outlineOffset: 2,\n borderRadius: 'default'\n })({isFocusVisible})}>\n <ColorSwatch\n ref={swatchRef}\n color={props.value}\n size={props.size}\n rounding={props.rounding}\n aria-label={props['aria-label']}\n aria-labelledby={props['aria-labelledby']}\n aria-describedby={props['aria-describedby']}\n aria-details={props['aria-details']} />\n </div>\n {props.label && \n <span id={labelId}>{props.label}</span>\n }\n </>\n )}\n </Button>\n <Dialog \n aria-labelledby={props.label ? labelId : props['aria-labelledby']}\n aria-label={props['aria-label']}\n UNSAFE_style={{\n width: 'fit-content',\n minWidth: 0,\n margin: '0 auto' // Center within tray.\n }}>\n <Content \n UNSAFE_style={{\n position: 'relative',\n margin: 'calc(var(--spectrum-dialog-padding) * -1)',\n padding: 'var(--spectrum-global-dimension-size-200)'\n }}>\n {props.children}\n </Content>\n </Dialog>\n </DialogTrigger>\n </AriaColorPicker>\n );\n});\n"],"names":[],"version":3,"file":"ColorPicker.main.js.map"}
|
package/dist/ColorPicker.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import "./ColorPicker.
|
1
|
+
import "./ColorPicker.96797a19.css";
|
2
2
|
import {ColorSwatch as $d68786ae409fa722$export$cae13e90592f246a} from "./ColorSwatch.mjs";
|
3
3
|
import {ColorPicker as $5bRyn$ColorPicker, Button as $5bRyn$Button} from "react-aria-components";
|
4
4
|
import {Content as $5bRyn$Content} from "@react-spectrum/view";
|
@@ -24,7 +24,7 @@ import {useId as $5bRyn$useId} from "@react-aria/utils";
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
|
27
|
+
const $d9654c66f3a7e70a$export$9feb1bc2e5f1ccb3 = /*#__PURE__*/ (0, $5bRyn$react).forwardRef(function ColorPicker(props, ref) {
|
28
28
|
let swatchRef = (0, $5bRyn$useRef)(null);
|
29
29
|
let domRef = (0, $5bRyn$useFocusableRef)(ref);
|
30
30
|
let labelId = (0, $5bRyn$useId)();
|
@@ -36,30 +36,30 @@ function $d9654c66f3a7e70a$var$ColorPicker(props, ref) {
|
|
36
36
|
ref: domRef,
|
37
37
|
className: function anonymous(props) {
|
38
38
|
let rules = "";
|
39
|
-
rules += '
|
40
|
-
rules += '
|
41
|
-
rules += '
|
42
|
-
rules += '
|
43
|
-
rules += '
|
44
|
-
rules += '
|
45
|
-
rules += '
|
46
|
-
rules += '
|
47
|
-
rules += '
|
48
|
-
rules += '
|
49
|
-
rules += '
|
50
|
-
rules += '
|
51
|
-
rules += '
|
52
|
-
rules += '
|
53
|
-
rules += '
|
54
|
-
rules += '
|
55
|
-
rules += '
|
56
|
-
rules += '
|
57
|
-
rules += '
|
58
|
-
rules += '
|
59
|
-
if (props.size === "L") rules += '
|
60
|
-
else if (props.size === "M") rules += '
|
61
|
-
else if (props.size === "S") rules += '
|
62
|
-
else if (props.size === "XS") rules += '
|
39
|
+
rules += ' s1-bs1-a';
|
40
|
+
rules += ' s1-As1-f';
|
41
|
+
rules += ' s1-Is1-a';
|
42
|
+
rules += ' s1-Js1-a';
|
43
|
+
rules += ' s1-Gs1-a';
|
44
|
+
rules += ' s1-Hs1-a';
|
45
|
+
rules += ' s1-_Ss1-d';
|
46
|
+
rules += ' s1-_Us1-c';
|
47
|
+
rules += ' s1-ls1-M';
|
48
|
+
rules += ' s1-ms1-M';
|
49
|
+
rules += ' s1-_Es1-a';
|
50
|
+
rules += ' s1-5-bc1l9os1-h';
|
51
|
+
rules += ' s1-5-1uotwbws1-g';
|
52
|
+
rules += ' s1-5-eo0c6ss1-f';
|
53
|
+
rules += ' s1-5-enzzrgs1-e';
|
54
|
+
rules += ' s1-5-enzykds1-d';
|
55
|
+
rules += ' s1-5-enzwzjs1-c';
|
56
|
+
rules += ' s1-5-enzrfps1-b';
|
57
|
+
rules += ' s1-5s1-a';
|
58
|
+
rules += ' s1-as1-___K';
|
59
|
+
if (props.size === "L") rules += ' s1-6s1-d';
|
60
|
+
else if (props.size === "M") rules += ' s1-6s1-c';
|
61
|
+
else if (props.size === "S") rules += ' s1-6s1-b';
|
62
|
+
else if (props.size === "XS") rules += ' s1-6s1-a';
|
63
63
|
return rules;
|
64
64
|
}({
|
65
65
|
size: props.size || 'M'
|
@@ -67,16 +67,16 @@ function $d9654c66f3a7e70a$var$ColorPicker(props, ref) {
|
|
67
67
|
}, ({ isFocusVisible: isFocusVisible })=>/*#__PURE__*/ (0, $5bRyn$react).createElement((0, $5bRyn$react).Fragment, null, /*#__PURE__*/ (0, $5bRyn$react).createElement("div", {
|
68
68
|
className: function anonymous(props) {
|
69
69
|
let rules = "";
|
70
|
-
if (props.isFocusVisible) rules += '
|
71
|
-
else rules += '
|
72
|
-
rules += '
|
73
|
-
rules += '
|
74
|
-
rules += '
|
75
|
-
rules += '
|
76
|
-
rules += '
|
77
|
-
rules += '
|
78
|
-
rules += '
|
79
|
-
rules += '
|
70
|
+
if (props.isFocusVisible) rules += ' s1-_Es1-b';
|
71
|
+
else rules += ' s1-_Es1-a';
|
72
|
+
rules += ' s1-ds1-as1-___D';
|
73
|
+
rules += ' s1-ds1-___I';
|
74
|
+
rules += ' s1-_Gs1-c';
|
75
|
+
rules += ' s1-_Fs1-c';
|
76
|
+
rules += ' s1-_ps1-c';
|
77
|
+
rules += ' s1-_qs1-c';
|
78
|
+
rules += ' s1-_rs1-c';
|
79
|
+
rules += ' s1-_ss1-c';
|
80
80
|
return rules;
|
81
81
|
}({
|
82
82
|
isFocusVisible: isFocusVisible
|
@@ -107,10 +107,7 @@ function $d9654c66f3a7e70a$var$ColorPicker(props, ref) {
|
|
107
107
|
padding: 'var(--spectrum-global-dimension-size-200)'
|
108
108
|
}
|
109
109
|
}, props.children))));
|
110
|
-
}
|
111
|
-
/**
|
112
|
-
* A ColorPicker combines a swatch with a customizable popover for editing a color.
|
113
|
-
*/ let $d9654c66f3a7e70a$export$9feb1bc2e5f1ccb3 = /*#__PURE__*/ (0, $5bRyn$react).forwardRef($d9654c66f3a7e70a$var$ColorPicker);
|
110
|
+
});
|
114
111
|
|
115
112
|
|
116
113
|
export {$d9654c66f3a7e70a$export$9feb1bc2e5f1ccb3 as ColorPicker};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import "./ColorPicker.
|
1
|
+
import "./ColorPicker.96797a19.css";
|
2
2
|
import {ColorSwatch as $d68786ae409fa722$export$cae13e90592f246a} from "./ColorSwatch.module.js";
|
3
3
|
import {ColorPicker as $5bRyn$ColorPicker, Button as $5bRyn$Button} from "react-aria-components";
|
4
4
|
import {Content as $5bRyn$Content} from "@react-spectrum/view";
|
@@ -24,7 +24,7 @@ import {useId as $5bRyn$useId} from "@react-aria/utils";
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
|
27
|
+
const $d9654c66f3a7e70a$export$9feb1bc2e5f1ccb3 = /*#__PURE__*/ (0, $5bRyn$react).forwardRef(function ColorPicker(props, ref) {
|
28
28
|
let swatchRef = (0, $5bRyn$useRef)(null);
|
29
29
|
let domRef = (0, $5bRyn$useFocusableRef)(ref);
|
30
30
|
let labelId = (0, $5bRyn$useId)();
|
@@ -36,30 +36,30 @@ function $d9654c66f3a7e70a$var$ColorPicker(props, ref) {
|
|
36
36
|
ref: domRef,
|
37
37
|
className: function anonymous(props) {
|
38
38
|
let rules = "";
|
39
|
-
rules += '
|
40
|
-
rules += '
|
41
|
-
rules += '
|
42
|
-
rules += '
|
43
|
-
rules += '
|
44
|
-
rules += '
|
45
|
-
rules += '
|
46
|
-
rules += '
|
47
|
-
rules += '
|
48
|
-
rules += '
|
49
|
-
rules += '
|
50
|
-
rules += '
|
51
|
-
rules += '
|
52
|
-
rules += '
|
53
|
-
rules += '
|
54
|
-
rules += '
|
55
|
-
rules += '
|
56
|
-
rules += '
|
57
|
-
rules += '
|
58
|
-
rules += '
|
59
|
-
if (props.size === "L") rules += '
|
60
|
-
else if (props.size === "M") rules += '
|
61
|
-
else if (props.size === "S") rules += '
|
62
|
-
else if (props.size === "XS") rules += '
|
39
|
+
rules += ' s1-bs1-a';
|
40
|
+
rules += ' s1-As1-f';
|
41
|
+
rules += ' s1-Is1-a';
|
42
|
+
rules += ' s1-Js1-a';
|
43
|
+
rules += ' s1-Gs1-a';
|
44
|
+
rules += ' s1-Hs1-a';
|
45
|
+
rules += ' s1-_Ss1-d';
|
46
|
+
rules += ' s1-_Us1-c';
|
47
|
+
rules += ' s1-ls1-M';
|
48
|
+
rules += ' s1-ms1-M';
|
49
|
+
rules += ' s1-_Es1-a';
|
50
|
+
rules += ' s1-5-bc1l9os1-h';
|
51
|
+
rules += ' s1-5-1uotwbws1-g';
|
52
|
+
rules += ' s1-5-eo0c6ss1-f';
|
53
|
+
rules += ' s1-5-enzzrgs1-e';
|
54
|
+
rules += ' s1-5-enzykds1-d';
|
55
|
+
rules += ' s1-5-enzwzjs1-c';
|
56
|
+
rules += ' s1-5-enzrfps1-b';
|
57
|
+
rules += ' s1-5s1-a';
|
58
|
+
rules += ' s1-as1-___K';
|
59
|
+
if (props.size === "L") rules += ' s1-6s1-d';
|
60
|
+
else if (props.size === "M") rules += ' s1-6s1-c';
|
61
|
+
else if (props.size === "S") rules += ' s1-6s1-b';
|
62
|
+
else if (props.size === "XS") rules += ' s1-6s1-a';
|
63
63
|
return rules;
|
64
64
|
}({
|
65
65
|
size: props.size || 'M'
|
@@ -67,16 +67,16 @@ function $d9654c66f3a7e70a$var$ColorPicker(props, ref) {
|
|
67
67
|
}, ({ isFocusVisible: isFocusVisible })=>/*#__PURE__*/ (0, $5bRyn$react).createElement((0, $5bRyn$react).Fragment, null, /*#__PURE__*/ (0, $5bRyn$react).createElement("div", {
|
68
68
|
className: function anonymous(props) {
|
69
69
|
let rules = "";
|
70
|
-
if (props.isFocusVisible) rules += '
|
71
|
-
else rules += '
|
72
|
-
rules += '
|
73
|
-
rules += '
|
74
|
-
rules += '
|
75
|
-
rules += '
|
76
|
-
rules += '
|
77
|
-
rules += '
|
78
|
-
rules += '
|
79
|
-
rules += '
|
70
|
+
if (props.isFocusVisible) rules += ' s1-_Es1-b';
|
71
|
+
else rules += ' s1-_Es1-a';
|
72
|
+
rules += ' s1-ds1-as1-___D';
|
73
|
+
rules += ' s1-ds1-___I';
|
74
|
+
rules += ' s1-_Gs1-c';
|
75
|
+
rules += ' s1-_Fs1-c';
|
76
|
+
rules += ' s1-_ps1-c';
|
77
|
+
rules += ' s1-_qs1-c';
|
78
|
+
rules += ' s1-_rs1-c';
|
79
|
+
rules += ' s1-_ss1-c';
|
80
80
|
return rules;
|
81
81
|
}({
|
82
82
|
isFocusVisible: isFocusVisible
|
@@ -107,10 +107,7 @@ function $d9654c66f3a7e70a$var$ColorPicker(props, ref) {
|
|
107
107
|
padding: 'var(--spectrum-global-dimension-size-200)'
|
108
108
|
}
|
109
109
|
}, props.children))));
|
110
|
-
}
|
111
|
-
/**
|
112
|
-
* A ColorPicker combines a swatch with a customizable popover for editing a color.
|
113
|
-
*/ let $d9654c66f3a7e70a$export$9feb1bc2e5f1ccb3 = /*#__PURE__*/ (0, $5bRyn$react).forwardRef($d9654c66f3a7e70a$var$ColorPicker);
|
110
|
+
});
|
114
111
|
|
115
112
|
|
116
113
|
export {$d9654c66f3a7e70a$export$9feb1bc2e5f1ccb3 as ColorPicker};
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgCM,MAAM,0DAAc,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,YAAY,KAA+B,EAAE,GAAoC;IACpI,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,UAAU,CAAA,GAAA,YAAI;IAClB,qBACE,gCAAC,CAAA,GAAA,kBAAc,GAAM,qBACnB,gCAAC,CAAA,GAAA,oBAAY;QAAE,MAAK;QAAU,YAAW;QAAO,WAAW,CAAA,GAAA,mBAAW,EAAE;qBACtE,gCAAC,CAAA,GAAA,aAAK;QACJ,KAAK;QACL,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkBR;YAAC,MAAM,MAAM,IAAI,IAAI;QAAG;OAC1B,CAAC,kBAAC,cAAc,EAAC,iBAChB,gFACE,gCAAC;YACC,WAAW;;;;;;;;;;;;;cASR;gCAAC;YAAc;yBAClB,gCAAC,CAAA,GAAA,yCAAU;YACT,KAAK;YACL,OAAO,MAAM,KAAK;YAClB,MAAM,MAAM,IAAI;YAChB,UAAU,MAAM,QAAQ;YACxB,cAAY,KAAK,CAAC,aAAa;YAC/B,mBAAiB,KAAK,CAAC,kBAAkB;YACzC,oBAAkB,KAAK,CAAC,mBAAmB;YAC3C,gBAAc,KAAK,CAAC,eAAe;aAEtC,MAAM,KAAK,kBACV,gCAAC;YAAK,IAAI;WAAU,MAAM,KAAK,mBAKvC,gCAAC,CAAA,GAAA,aAAK;QACJ,mBAAiB,MAAM,KAAK,GAAG,UAAU,KAAK,CAAC,kBAAkB;QACjE,cAAY,KAAK,CAAC,aAAa;QAC/B,cAAc;YACZ,OAAO;YACP,UAAU;YACV,QAAQ,SAAS,sBAAsB;QACzC;qBACA,gCAAC,CAAA,GAAA,cAAM;QACL,cAAc;YACZ,UAAU;YACV,QAAQ;YACR,SAAS;QACX;OACC,MAAM,QAAQ;AAM3B","sources":["packages/@react-spectrum/color/src/ColorPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ColorPicker as AriaColorPicker, Button, Color} from 'react-aria-components';\nimport {AriaLabelingProps, FocusableRef, ValueBase} from '@react-types/shared';\nimport {ColorSwatch} from './ColorSwatch';\nimport {Content} from '@react-spectrum/view';\nimport {Dialog, DialogTrigger} from '@react-spectrum/dialog';\nimport React, {ReactNode, useRef} from 'react';\nimport {style} from '@react-spectrum/style-macro-s1' with {type: 'macro'};\nimport {unwrapDOMRef, useFocusableRef} from '@react-spectrum/utils';\nimport {useId} from '@react-aria/utils';\n\nexport interface SpectrumColorPickerProps extends ValueBase<string | Color, Color>, AriaLabelingProps {\n /** A visual label for the color picker. */\n label?: ReactNode,\n /** The contents of the color picker popover, e.g. `<ColorEditor />`. */\n children?: ReactNode,\n /**\n * The size of the color swatch.\n * @default \"M\"\n */\n size?: 'XS' | 'S' | 'M' | 'L',\n /**\n * The corner rounding of the color swatch.\n * @default \"default\"\n */\n rounding?: 'default' | 'none' | 'full'\n}\n\n/**\n * A ColorPicker combines a swatch with a customizable popover for editing a color.\n */\nexport const ColorPicker = React.forwardRef(function ColorPicker(props: SpectrumColorPickerProps, ref: FocusableRef<HTMLButtonElement>) {\n let swatchRef = useRef(null);\n let domRef = useFocusableRef(ref);\n let labelId = useId();\n return (\n <AriaColorPicker {...props}>\n <DialogTrigger type=\"popover\" mobileType=\"tray\" targetRef={unwrapDOMRef(swatchRef)}>\n <Button \n ref={domRef}\n className={style({\n backgroundColor: 'transparent',\n borderStyle: 'none',\n padding: 0,\n display: 'flex',\n alignItems: 'center',\n gap: 'text-to-control',\n outlineStyle: 'none',\n fontFamily: 'sans',\n color: 'body',\n fontSize: {\n size: {\n XS: 'xs',\n S: 'sm',\n M: 'base',\n L: 'lg'\n }\n }\n })({size: props.size || 'M'})}>\n {({isFocusVisible}) => (\n <>\n <div\n className={style({\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid'\n },\n outlineColor: 'focus-ring',\n outlineWidth: 2,\n outlineOffset: 2,\n borderRadius: 'default'\n })({isFocusVisible})}>\n <ColorSwatch\n ref={swatchRef}\n color={props.value}\n size={props.size}\n rounding={props.rounding}\n aria-label={props['aria-label']}\n aria-labelledby={props['aria-labelledby']}\n aria-describedby={props['aria-describedby']}\n aria-details={props['aria-details']} />\n </div>\n {props.label && \n <span id={labelId}>{props.label}</span>\n }\n </>\n )}\n </Button>\n <Dialog \n aria-labelledby={props.label ? labelId : props['aria-labelledby']}\n aria-label={props['aria-label']}\n UNSAFE_style={{\n width: 'fit-content',\n minWidth: 0,\n margin: '0 auto' // Center within tray.\n }}>\n <Content \n UNSAFE_style={{\n position: 'relative',\n margin: 'calc(var(--spectrum-dialog-padding) * -1)',\n padding: 'var(--spectrum-global-dimension-size-200)'\n }}>\n {props.children}\n </Content>\n </Dialog>\n </DialogTrigger>\n </AriaColorPicker>\n );\n});\n"],"names":[],"version":3,"file":"ColorPicker.module.js.map"}
|
package/dist/ColorSlider.main.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
var $2b9adc23f6c7cae1$exports = require("./ColorThumb.main.js");
|
2
|
-
require("./vars.
|
2
|
+
require("./vars.a54898d8.css");
|
3
3
|
var $28060baf29cc5ac7$exports = require("./colorslider_vars_css.main.js");
|
4
4
|
var $5EHW1$reactspectrumutils = require("@react-spectrum/utils");
|
5
5
|
var $5EHW1$reactariacomponents = require("react-aria-components");
|
@@ -42,7 +42,7 @@ $parcel$export(module.exports, "ColorSlider", () => $4537dec0de08c277$export$44f
|
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
-
|
45
|
+
const $4537dec0de08c277$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, ($parcel$interopDefault($5EHW1$react))).forwardRef(function ColorSlider(props, ref) {
|
46
46
|
props = (0, $5EHW1$reactspectrumprovider.useProviderProps)(props);
|
47
47
|
let inputRef = (0, $5EHW1$react.useRef)(null);
|
48
48
|
let trackRef = (0, $5EHW1$react.useRef)(null);
|
@@ -120,10 +120,7 @@ function $4537dec0de08c277$var$ColorSlider(props, ref) {
|
|
120
120
|
ref: inputRef,
|
121
121
|
className: (0, $5EHW1$reactspectrumutils.classNames)((0, ($parcel$interopDefault($28060baf29cc5ac7$exports))), 'spectrum-ColorSlider-slider')
|
122
122
|
}))));
|
123
|
-
}
|
124
|
-
/**
|
125
|
-
* ColorSliders allow users to adjust an individual channel of a color value.
|
126
|
-
*/ let $4537dec0de08c277$export$44fd664bcca5b6fb = /*#__PURE__*/ (0, ($parcel$interopDefault($5EHW1$react))).forwardRef($4537dec0de08c277$var$ColorSlider);
|
123
|
+
});
|
127
124
|
|
128
125
|
|
129
126
|
//# sourceMappingURL=ColorSlider.main.js.map
|