@react-spectrum/numberfield 3.7.1 → 3.7.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/import.mjs +120 -96
- package/dist/main.css +1 -1
- package/dist/main.js +120 -96
- package/dist/main.js.map +1 -1
- package/dist/module.js +120 -96
- package/dist/module.js.map +1 -1
- package/package.json +18 -18
package/dist/module.js
CHANGED
|
@@ -69,114 +69,138 @@ function $parcel$export(e, n, v, s) {
|
|
|
69
69
|
|
|
70
70
|
var $ba58a329f3e1a776$exports = {};
|
|
71
71
|
|
|
72
|
-
$parcel$export($ba58a329f3e1a776$exports, "
|
|
73
|
-
$parcel$export($ba58a329f3e1a776$exports, "
|
|
74
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-LogicButton", () => $ba58a329f3e1a776$export$36ae67a131730482, (v) => $ba58a329f3e1a776$export$36ae67a131730482 = v);
|
|
75
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-FieldButton", () => $ba58a329f3e1a776$export$a024c99ecf6b5741, (v) => $ba58a329f3e1a776$export$a024c99ecf6b5741 = v);
|
|
76
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-ClearButton", () => $ba58a329f3e1a776$export$b752ce409e5660c, (v) => $ba58a329f3e1a776$export$b752ce409e5660c = v);
|
|
77
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-button", () => $ba58a329f3e1a776$export$4e11596482f95f63, (v) => $ba58a329f3e1a776$export$4e11596482f95f63 = v);
|
|
78
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper", () => $ba58a329f3e1a776$export$f49c123746e1fb8, (v) => $ba58a329f3e1a776$export$f49c123746e1fb8 = v);
|
|
72
|
+
$parcel$export($ba58a329f3e1a776$exports, "decrement", () => $ba58a329f3e1a776$export$8f85cc9753f280aa, (v) => $ba58a329f3e1a776$export$8f85cc9753f280aa = v);
|
|
73
|
+
$parcel$export($ba58a329f3e1a776$exports, "field", () => $ba58a329f3e1a776$export$e0f35d825088c098, (v) => $ba58a329f3e1a776$export$e0f35d825088c098 = v);
|
|
79
74
|
$parcel$export($ba58a329f3e1a776$exports, "focus-ring", () => $ba58a329f3e1a776$export$f39a09f249340e2a, (v) => $ba58a329f3e1a776$export$f39a09f249340e2a = v);
|
|
80
|
-
$parcel$export($ba58a329f3e1a776$exports, "
|
|
81
|
-
$parcel$export($ba58a329f3e1a776$exports, "
|
|
82
|
-
$parcel$export($ba58a329f3e1a776$exports, "
|
|
75
|
+
$parcel$export($ba58a329f3e1a776$exports, "i18nFontFamily", () => $ba58a329f3e1a776$export$8c4ee2c50c22c514, (v) => $ba58a329f3e1a776$export$8c4ee2c50c22c514 = v);
|
|
76
|
+
$parcel$export($ba58a329f3e1a776$exports, "increment", () => $ba58a329f3e1a776$export$a2647aa13413c947, (v) => $ba58a329f3e1a776$export$a2647aa13413c947 = v);
|
|
77
|
+
$parcel$export($ba58a329f3e1a776$exports, "is-active", () => $ba58a329f3e1a776$export$20fd0f7cd4e6112f, (v) => $ba58a329f3e1a776$export$20fd0f7cd4e6112f = v);
|
|
78
|
+
$parcel$export($ba58a329f3e1a776$exports, "is-disabled", () => $ba58a329f3e1a776$export$d35bc1e505d1ebbf, (v) => $ba58a329f3e1a776$export$d35bc1e505d1ebbf = v);
|
|
79
|
+
$parcel$export($ba58a329f3e1a776$exports, "is-focused", () => $ba58a329f3e1a776$export$e7dc768d35940237, (v) => $ba58a329f3e1a776$export$e7dc768d35940237 = v);
|
|
83
80
|
$parcel$export($ba58a329f3e1a776$exports, "is-hovered", () => $ba58a329f3e1a776$export$b8813cd5d7824ce7, (v) => $ba58a329f3e1a776$export$b8813cd5d7824ce7 = v);
|
|
84
|
-
$parcel$export($ba58a329f3e1a776$exports, "
|
|
81
|
+
$parcel$export($ba58a329f3e1a776$exports, "is-invalid", () => $ba58a329f3e1a776$export$14a30de2866685fa, (v) => $ba58a329f3e1a776$export$14a30de2866685fa = v);
|
|
82
|
+
$parcel$export($ba58a329f3e1a776$exports, "is-open", () => $ba58a329f3e1a776$export$a9781837241c946d, (v) => $ba58a329f3e1a776$export$a9781837241c946d = v);
|
|
83
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-BaseButton", () => $ba58a329f3e1a776$export$f7b415378ab4f839, (v) => $ba58a329f3e1a776$export$f7b415378ab4f839 = v);
|
|
84
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-FocusRing-ring", () => $ba58a329f3e1a776$export$4109102f950813a6, (v) => $ba58a329f3e1a776$export$4109102f950813a6 = v);
|
|
85
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-FocusRing", () => $ba58a329f3e1a776$export$24c7f46a6e3605dd, (v) => $ba58a329f3e1a776$export$24c7f46a6e3605dd = v);
|
|
86
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-ActionButton", () => $ba58a329f3e1a776$export$53da69f51b770d3, (v) => $ba58a329f3e1a776$export$53da69f51b770d3 = v);
|
|
87
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-ActionButton--quiet", () => $ba58a329f3e1a776$export$40e1f009544bacf3, (v) => $ba58a329f3e1a776$export$40e1f009544bacf3 = v);
|
|
88
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-ActionButton-hold", () => $ba58a329f3e1a776$export$4a4f01c443eff992, (v) => $ba58a329f3e1a776$export$4a4f01c443eff992 = v);
|
|
89
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-ActionButton-label", () => $ba58a329f3e1a776$export$ebb4635c66bacdb9, (v) => $ba58a329f3e1a776$export$ebb4635c66bacdb9 = v);
|
|
90
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Button", () => $ba58a329f3e1a776$export$1db4cca5b4ade39a, (v) => $ba58a329f3e1a776$export$1db4cca5b4ade39a = v);
|
|
85
91
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Button--iconOnly", () => $ba58a329f3e1a776$export$c1d306ec0fae3838, (v) => $ba58a329f3e1a776$export$c1d306ec0fae3838 = v);
|
|
86
92
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Button--pending", () => $ba58a329f3e1a776$export$54592d0984f245d5, (v) => $ba58a329f3e1a776$export$54592d0984f245d5 = v);
|
|
87
93
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Button-circleLoader", () => $ba58a329f3e1a776$export$76d4531f0342bbe0, (v) => $ba58a329f3e1a776$export$76d4531f0342bbe0 = v);
|
|
88
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-
|
|
89
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-
|
|
90
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-ActionButton--quiet", () => $ba58a329f3e1a776$export$40e1f009544bacf3, (v) => $ba58a329f3e1a776$export$40e1f009544bacf3 = v);
|
|
91
|
-
$parcel$export($ba58a329f3e1a776$exports, "is-disabled", () => $ba58a329f3e1a776$export$d35bc1e505d1ebbf, (v) => $ba58a329f3e1a776$export$d35bc1e505d1ebbf = v);
|
|
92
|
-
$parcel$export($ba58a329f3e1a776$exports, "is-open", () => $ba58a329f3e1a776$export$a9781837241c946d, (v) => $ba58a329f3e1a776$export$a9781837241c946d = v);
|
|
94
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Button-label", () => $ba58a329f3e1a776$export$c081ba562e204942, (v) => $ba58a329f3e1a776$export$c081ba562e204942 = v);
|
|
95
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-ClearButton", () => $ba58a329f3e1a776$export$b752ce409e5660c, (v) => $ba58a329f3e1a776$export$b752ce409e5660c = v);
|
|
93
96
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-ClearButton--small", () => $ba58a329f3e1a776$export$49280ffa5236ba8b, (v) => $ba58a329f3e1a776$export$49280ffa5236ba8b = v);
|
|
97
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-FieldButton", () => $ba58a329f3e1a776$export$a024c99ecf6b5741, (v) => $ba58a329f3e1a776$export$a024c99ecf6b5741 = v);
|
|
98
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-FocusRing--quiet", () => $ba58a329f3e1a776$export$2927016961429360, (v) => $ba58a329f3e1a776$export$2927016961429360 = v);
|
|
99
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-FieldButton--quiet", () => $ba58a329f3e1a776$export$5ca7b274e4fff9fc, (v) => $ba58a329f3e1a776$export$5ca7b274e4fff9fc = v);
|
|
100
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Icon", () => $ba58a329f3e1a776$export$d374b04f30360026, (v) => $ba58a329f3e1a776$export$d374b04f30360026 = v);
|
|
101
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-LogicButton", () => $ba58a329f3e1a776$export$36ae67a131730482, (v) => $ba58a329f3e1a776$export$36ae67a131730482 = v);
|
|
102
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper", () => $ba58a329f3e1a776$export$f49c123746e1fb8, (v) => $ba58a329f3e1a776$export$f49c123746e1fb8 = v);
|
|
94
103
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper--isMobile", () => $ba58a329f3e1a776$export$75e6f9c4d1d95421, (v) => $ba58a329f3e1a776$export$75e6f9c4d1d95421 = v);
|
|
95
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper
|
|
104
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper--isQuiet", () => $ba58a329f3e1a776$export$70ed0eb2ba7512f8, (v) => $ba58a329f3e1a776$export$70ed0eb2ba7512f8 = v);
|
|
105
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper--readonly", () => $ba58a329f3e1a776$export$ba8faf273ff0a970, (v) => $ba58a329f3e1a776$export$ba8faf273ff0a970 = v);
|
|
106
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper--showStepper", () => $ba58a329f3e1a776$export$a4e366275982a12f, (v) => $ba58a329f3e1a776$export$a4e366275982a12f = v);
|
|
107
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-button", () => $ba58a329f3e1a776$export$4e11596482f95f63, (v) => $ba58a329f3e1a776$export$4e11596482f95f63 = v);
|
|
96
108
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-button--stepDown", () => $ba58a329f3e1a776$export$e4ad52f6ba4e317b, (v) => $ba58a329f3e1a776$export$e4ad52f6ba4e317b = v);
|
|
109
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-button--stepUp", () => $ba58a329f3e1a776$export$6c76d609d604c6e5, (v) => $ba58a329f3e1a776$export$6c76d609d604c6e5 = v);
|
|
110
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-button-icon", () => $ba58a329f3e1a776$export$7d7cb0c4055e98ab, (v) => $ba58a329f3e1a776$export$7d7cb0c4055e98ab = v);
|
|
111
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-container", () => $ba58a329f3e1a776$export$f49a6eb8460c3f93, (v) => $ba58a329f3e1a776$export$f49a6eb8460c3f93 = v);
|
|
112
|
+
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-container--isMobile", () => $ba58a329f3e1a776$export$3486d98f7bb904b1, (v) => $ba58a329f3e1a776$export$3486d98f7bb904b1 = v);
|
|
97
113
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-field", () => $ba58a329f3e1a776$export$faac6573b15f75d6, (v) => $ba58a329f3e1a776$export$faac6573b15f75d6 = v);
|
|
98
114
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-icon", () => $ba58a329f3e1a776$export$639c56ba6082b615, (v) => $ba58a329f3e1a776$export$639c56ba6082b615 = v);
|
|
99
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper--showStepper", () => $ba58a329f3e1a776$export$a4e366275982a12f, (v) => $ba58a329f3e1a776$export$a4e366275982a12f = v);
|
|
100
115
|
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-input", () => $ba58a329f3e1a776$export$8273fb931edd57d4, (v) => $ba58a329f3e1a776$export$8273fb931edd57d4 = v);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper-button-icon", () => $ba58a329f3e1a776$export$7d7cb0c4055e98ab, (v) => $ba58a329f3e1a776$export$7d7cb0c4055e98ab = v);
|
|
104
|
-
$parcel$export($ba58a329f3e1a776$exports, "is-active", () => $ba58a329f3e1a776$export$20fd0f7cd4e6112f, (v) => $ba58a329f3e1a776$export$20fd0f7cd4e6112f = v);
|
|
105
|
-
$parcel$export($ba58a329f3e1a776$exports, "is-focused", () => $ba58a329f3e1a776$export$e7dc768d35940237, (v) => $ba58a329f3e1a776$export$e7dc768d35940237 = v);
|
|
106
|
-
$parcel$export($ba58a329f3e1a776$exports, "is-invalid", () => $ba58a329f3e1a776$export$14a30de2866685fa, (v) => $ba58a329f3e1a776$export$14a30de2866685fa = v);
|
|
107
|
-
$parcel$export($ba58a329f3e1a776$exports, "spectrum-Stepper--readonly", () => $ba58a329f3e1a776$export$ba8faf273ff0a970, (v) => $ba58a329f3e1a776$export$ba8faf273ff0a970 = v);
|
|
108
|
-
var $ba58a329f3e1a776$export$1db4cca5b4ade39a;
|
|
109
|
-
var $ba58a329f3e1a776$export$53da69f51b770d3;
|
|
110
|
-
var $ba58a329f3e1a776$export$36ae67a131730482;
|
|
111
|
-
var $ba58a329f3e1a776$export$a024c99ecf6b5741;
|
|
112
|
-
var $ba58a329f3e1a776$export$b752ce409e5660c;
|
|
113
|
-
var $ba58a329f3e1a776$export$4e11596482f95f63;
|
|
114
|
-
var $ba58a329f3e1a776$export$f49c123746e1fb8;
|
|
116
|
+
var $ba58a329f3e1a776$export$8f85cc9753f280aa;
|
|
117
|
+
var $ba58a329f3e1a776$export$e0f35d825088c098;
|
|
115
118
|
var $ba58a329f3e1a776$export$f39a09f249340e2a;
|
|
116
|
-
var $ba58a329f3e1a776$export$
|
|
117
|
-
var $ba58a329f3e1a776$export$
|
|
118
|
-
var $ba58a329f3e1a776$export$
|
|
119
|
+
var $ba58a329f3e1a776$export$8c4ee2c50c22c514;
|
|
120
|
+
var $ba58a329f3e1a776$export$a2647aa13413c947;
|
|
121
|
+
var $ba58a329f3e1a776$export$20fd0f7cd4e6112f;
|
|
122
|
+
var $ba58a329f3e1a776$export$d35bc1e505d1ebbf;
|
|
123
|
+
var $ba58a329f3e1a776$export$e7dc768d35940237;
|
|
119
124
|
var $ba58a329f3e1a776$export$b8813cd5d7824ce7;
|
|
120
|
-
var $ba58a329f3e1a776$export$
|
|
125
|
+
var $ba58a329f3e1a776$export$14a30de2866685fa;
|
|
126
|
+
var $ba58a329f3e1a776$export$a9781837241c946d;
|
|
127
|
+
var $ba58a329f3e1a776$export$f7b415378ab4f839;
|
|
128
|
+
var $ba58a329f3e1a776$export$4109102f950813a6;
|
|
129
|
+
var $ba58a329f3e1a776$export$24c7f46a6e3605dd;
|
|
130
|
+
var $ba58a329f3e1a776$export$53da69f51b770d3;
|
|
131
|
+
var $ba58a329f3e1a776$export$40e1f009544bacf3;
|
|
132
|
+
var $ba58a329f3e1a776$export$4a4f01c443eff992;
|
|
133
|
+
var $ba58a329f3e1a776$export$ebb4635c66bacdb9;
|
|
134
|
+
var $ba58a329f3e1a776$export$1db4cca5b4ade39a;
|
|
121
135
|
var $ba58a329f3e1a776$export$c1d306ec0fae3838;
|
|
122
136
|
var $ba58a329f3e1a776$export$54592d0984f245d5;
|
|
123
137
|
var $ba58a329f3e1a776$export$76d4531f0342bbe0;
|
|
124
|
-
var $ba58a329f3e1a776$export$
|
|
125
|
-
var $ba58a329f3e1a776$export$
|
|
126
|
-
var $ba58a329f3e1a776$export$40e1f009544bacf3;
|
|
127
|
-
var $ba58a329f3e1a776$export$d35bc1e505d1ebbf;
|
|
128
|
-
var $ba58a329f3e1a776$export$a9781837241c946d;
|
|
138
|
+
var $ba58a329f3e1a776$export$c081ba562e204942;
|
|
139
|
+
var $ba58a329f3e1a776$export$b752ce409e5660c;
|
|
129
140
|
var $ba58a329f3e1a776$export$49280ffa5236ba8b;
|
|
141
|
+
var $ba58a329f3e1a776$export$a024c99ecf6b5741;
|
|
142
|
+
var $ba58a329f3e1a776$export$2927016961429360;
|
|
143
|
+
var $ba58a329f3e1a776$export$5ca7b274e4fff9fc;
|
|
144
|
+
var $ba58a329f3e1a776$export$d374b04f30360026;
|
|
145
|
+
var $ba58a329f3e1a776$export$36ae67a131730482;
|
|
146
|
+
var $ba58a329f3e1a776$export$f49c123746e1fb8;
|
|
130
147
|
var $ba58a329f3e1a776$export$75e6f9c4d1d95421;
|
|
131
|
-
var $ba58a329f3e1a776$export$
|
|
148
|
+
var $ba58a329f3e1a776$export$70ed0eb2ba7512f8;
|
|
149
|
+
var $ba58a329f3e1a776$export$ba8faf273ff0a970;
|
|
150
|
+
var $ba58a329f3e1a776$export$a4e366275982a12f;
|
|
151
|
+
var $ba58a329f3e1a776$export$4e11596482f95f63;
|
|
132
152
|
var $ba58a329f3e1a776$export$e4ad52f6ba4e317b;
|
|
153
|
+
var $ba58a329f3e1a776$export$6c76d609d604c6e5;
|
|
154
|
+
var $ba58a329f3e1a776$export$7d7cb0c4055e98ab;
|
|
155
|
+
var $ba58a329f3e1a776$export$f49a6eb8460c3f93;
|
|
156
|
+
var $ba58a329f3e1a776$export$3486d98f7bb904b1;
|
|
133
157
|
var $ba58a329f3e1a776$export$faac6573b15f75d6;
|
|
134
158
|
var $ba58a329f3e1a776$export$639c56ba6082b615;
|
|
135
|
-
var $ba58a329f3e1a776$export$a4e366275982a12f;
|
|
136
159
|
var $ba58a329f3e1a776$export$8273fb931edd57d4;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
$ba58a329f3e1a776$export$
|
|
145
|
-
$ba58a329f3e1a776$export$
|
|
146
|
-
$ba58a329f3e1a776$export$
|
|
147
|
-
$ba58a329f3e1a776$export$
|
|
148
|
-
$ba58a329f3e1a776$export$
|
|
149
|
-
$ba58a329f3e1a776$export$
|
|
150
|
-
$ba58a329f3e1a776$export$
|
|
151
|
-
$ba58a329f3e1a776$export$
|
|
152
|
-
$ba58a329f3e1a776$export$
|
|
153
|
-
$ba58a329f3e1a776$export$
|
|
154
|
-
$ba58a329f3e1a776$export$
|
|
155
|
-
$ba58a329f3e1a776$export$
|
|
156
|
-
$ba58a329f3e1a776$export$
|
|
157
|
-
$ba58a329f3e1a776$export$
|
|
158
|
-
$ba58a329f3e1a776$export$
|
|
159
|
-
$ba58a329f3e1a776$export$
|
|
160
|
-
$ba58a329f3e1a776$export$
|
|
161
|
-
$ba58a329f3e1a776$export$
|
|
162
|
-
$ba58a329f3e1a776$export$
|
|
163
|
-
$ba58a329f3e1a776$export$
|
|
164
|
-
$ba58a329f3e1a776$export$
|
|
165
|
-
$ba58a329f3e1a776$export$
|
|
166
|
-
$ba58a329f3e1a776$export$
|
|
167
|
-
$ba58a329f3e1a776$export$
|
|
168
|
-
$ba58a329f3e1a776$export$
|
|
169
|
-
$ba58a329f3e1a776$export$
|
|
170
|
-
$ba58a329f3e1a776$export$
|
|
171
|
-
$ba58a329f3e1a776$export$a4e366275982a12f =
|
|
172
|
-
$ba58a329f3e1a776$export$
|
|
173
|
-
$ba58a329f3e1a776$export$
|
|
174
|
-
$ba58a329f3e1a776$export$
|
|
175
|
-
$ba58a329f3e1a776$export$7d7cb0c4055e98ab =
|
|
176
|
-
$ba58a329f3e1a776$export$
|
|
177
|
-
$ba58a329f3e1a776$export$
|
|
178
|
-
$ba58a329f3e1a776$export$
|
|
179
|
-
$ba58a329f3e1a776$export$
|
|
160
|
+
$ba58a329f3e1a776$export$8f85cc9753f280aa = `Ug6T-W_decrement`;
|
|
161
|
+
$ba58a329f3e1a776$export$e0f35d825088c098 = `Ug6T-W_field`;
|
|
162
|
+
$ba58a329f3e1a776$export$f39a09f249340e2a = `Ug6T-W_focus-ring`;
|
|
163
|
+
$ba58a329f3e1a776$export$8c4ee2c50c22c514 = `Ug6T-W_i18nFontFamily`;
|
|
164
|
+
$ba58a329f3e1a776$export$a2647aa13413c947 = `Ug6T-W_increment`;
|
|
165
|
+
$ba58a329f3e1a776$export$20fd0f7cd4e6112f = `Ug6T-W_is-active`;
|
|
166
|
+
$ba58a329f3e1a776$export$d35bc1e505d1ebbf = `Ug6T-W_is-disabled`;
|
|
167
|
+
$ba58a329f3e1a776$export$e7dc768d35940237 = `Ug6T-W_is-focused`;
|
|
168
|
+
$ba58a329f3e1a776$export$b8813cd5d7824ce7 = `Ug6T-W_is-hovered`;
|
|
169
|
+
$ba58a329f3e1a776$export$14a30de2866685fa = `Ug6T-W_is-invalid`;
|
|
170
|
+
$ba58a329f3e1a776$export$a9781837241c946d = `Ug6T-W_is-open`;
|
|
171
|
+
$ba58a329f3e1a776$export$f7b415378ab4f839 = `Ug6T-W_spectrum-BaseButton ${$ba58a329f3e1a776$export$8c4ee2c50c22c514}`;
|
|
172
|
+
$ba58a329f3e1a776$export$4109102f950813a6 = `Ug6T-W_spectrum-FocusRing-ring`;
|
|
173
|
+
$ba58a329f3e1a776$export$24c7f46a6e3605dd = `Ug6T-W_spectrum-FocusRing ${$ba58a329f3e1a776$export$4109102f950813a6}`;
|
|
174
|
+
$ba58a329f3e1a776$export$53da69f51b770d3 = `Ug6T-W_spectrum-ActionButton ${$ba58a329f3e1a776$export$f7b415378ab4f839} ${$ba58a329f3e1a776$export$24c7f46a6e3605dd}`;
|
|
175
|
+
$ba58a329f3e1a776$export$40e1f009544bacf3 = `Ug6T-W_spectrum-ActionButton--quiet`;
|
|
176
|
+
$ba58a329f3e1a776$export$4a4f01c443eff992 = `Ug6T-W_spectrum-ActionButton-hold`;
|
|
177
|
+
$ba58a329f3e1a776$export$ebb4635c66bacdb9 = `Ug6T-W_spectrum-ActionButton-label`;
|
|
178
|
+
$ba58a329f3e1a776$export$1db4cca5b4ade39a = `Ug6T-W_spectrum-Button ${$ba58a329f3e1a776$export$f7b415378ab4f839} ${$ba58a329f3e1a776$export$24c7f46a6e3605dd}`;
|
|
179
|
+
$ba58a329f3e1a776$export$c1d306ec0fae3838 = `Ug6T-W_spectrum-Button--iconOnly`;
|
|
180
|
+
$ba58a329f3e1a776$export$54592d0984f245d5 = `Ug6T-W_spectrum-Button--pending`;
|
|
181
|
+
$ba58a329f3e1a776$export$76d4531f0342bbe0 = `Ug6T-W_spectrum-Button-circleLoader`;
|
|
182
|
+
$ba58a329f3e1a776$export$c081ba562e204942 = `Ug6T-W_spectrum-Button-label`;
|
|
183
|
+
$ba58a329f3e1a776$export$b752ce409e5660c = `Ug6T-W_spectrum-ClearButton ${$ba58a329f3e1a776$export$f7b415378ab4f839} ${$ba58a329f3e1a776$export$24c7f46a6e3605dd}`;
|
|
184
|
+
$ba58a329f3e1a776$export$49280ffa5236ba8b = `Ug6T-W_spectrum-ClearButton--small`;
|
|
185
|
+
$ba58a329f3e1a776$export$a024c99ecf6b5741 = `Ug6T-W_spectrum-FieldButton ${$ba58a329f3e1a776$export$f7b415378ab4f839} ${$ba58a329f3e1a776$export$24c7f46a6e3605dd}`;
|
|
186
|
+
$ba58a329f3e1a776$export$2927016961429360 = `Ug6T-W_spectrum-FocusRing--quiet`;
|
|
187
|
+
$ba58a329f3e1a776$export$5ca7b274e4fff9fc = `Ug6T-W_spectrum-FieldButton--quiet ${$ba58a329f3e1a776$export$2927016961429360}`;
|
|
188
|
+
$ba58a329f3e1a776$export$d374b04f30360026 = `Ug6T-W_spectrum-Icon`;
|
|
189
|
+
$ba58a329f3e1a776$export$36ae67a131730482 = `Ug6T-W_spectrum-LogicButton ${$ba58a329f3e1a776$export$f7b415378ab4f839} ${$ba58a329f3e1a776$export$24c7f46a6e3605dd}`;
|
|
190
|
+
$ba58a329f3e1a776$export$f49c123746e1fb8 = `Ug6T-W_spectrum-Stepper ${$ba58a329f3e1a776$export$24c7f46a6e3605dd}`;
|
|
191
|
+
$ba58a329f3e1a776$export$75e6f9c4d1d95421 = `Ug6T-W_spectrum-Stepper--isMobile`;
|
|
192
|
+
$ba58a329f3e1a776$export$70ed0eb2ba7512f8 = `Ug6T-W_spectrum-Stepper--isQuiet ${$ba58a329f3e1a776$export$2927016961429360}`;
|
|
193
|
+
$ba58a329f3e1a776$export$ba8faf273ff0a970 = `Ug6T-W_spectrum-Stepper--readonly`;
|
|
194
|
+
$ba58a329f3e1a776$export$a4e366275982a12f = `Ug6T-W_spectrum-Stepper--showStepper`;
|
|
195
|
+
$ba58a329f3e1a776$export$4e11596482f95f63 = `Ug6T-W_spectrum-Stepper-button ${$ba58a329f3e1a776$export$f7b415378ab4f839}`;
|
|
196
|
+
$ba58a329f3e1a776$export$e4ad52f6ba4e317b = `Ug6T-W_spectrum-Stepper-button--stepDown`;
|
|
197
|
+
$ba58a329f3e1a776$export$6c76d609d604c6e5 = `Ug6T-W_spectrum-Stepper-button--stepUp`;
|
|
198
|
+
$ba58a329f3e1a776$export$7d7cb0c4055e98ab = `Ug6T-W_spectrum-Stepper-button-icon`;
|
|
199
|
+
$ba58a329f3e1a776$export$f49a6eb8460c3f93 = `Ug6T-W_spectrum-Stepper-container`;
|
|
200
|
+
$ba58a329f3e1a776$export$3486d98f7bb904b1 = `Ug6T-W_spectrum-Stepper-container--isMobile`;
|
|
201
|
+
$ba58a329f3e1a776$export$faac6573b15f75d6 = `Ug6T-W_spectrum-Stepper-field`;
|
|
202
|
+
$ba58a329f3e1a776$export$639c56ba6082b615 = `Ug6T-W_spectrum-Stepper-icon`;
|
|
203
|
+
$ba58a329f3e1a776$export$8273fb931edd57d4 = `Ug6T-W_spectrum-Stepper-input`;
|
|
180
204
|
|
|
181
205
|
|
|
182
206
|
|
|
@@ -184,16 +208,16 @@ $ba58a329f3e1a776$export$ba8faf273ff0a970 = "spectrum-Stepper--readonly_8890ad";
|
|
|
184
208
|
|
|
185
209
|
function $7f00b388e0d3b2f6$var$StepButton(props, ref) {
|
|
186
210
|
props = (0, $k6K00$useProviderProps)(props);
|
|
187
|
-
let { scale: scale
|
|
188
|
-
let { direction: direction
|
|
211
|
+
let { scale: scale } = (0, $k6K00$useProvider)();
|
|
212
|
+
let { direction: direction, isDisabled: isDisabled, isQuiet: isQuiet } = props;
|
|
189
213
|
/**
|
|
190
214
|
* Must use div for now because Safari pointer event bugs on disabled form elements.
|
|
191
215
|
* Link https://bugs.webkit.org/show_bug.cgi?id=219188.
|
|
192
|
-
*/ let { buttonProps: buttonProps
|
|
216
|
+
*/ let { buttonProps: buttonProps, isPressed: isPressed } = (0, $k6K00$useButton)({
|
|
193
217
|
...props,
|
|
194
218
|
elementType: "div"
|
|
195
219
|
}, ref);
|
|
196
|
-
let { hoverProps: hoverProps
|
|
220
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $k6K00$useHover)(props);
|
|
197
221
|
return /*#__PURE__*/ (0, $k6K00$react).createElement((0, $k6K00$FocusRing), {
|
|
198
222
|
focusRingClass: (0, $k6K00$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ba58a329f3e1a776$exports))), "focus-ring")
|
|
199
223
|
}, /*#__PURE__*/ (0, $k6K00$react).createElement("div", {
|
|
@@ -233,19 +257,19 @@ function $7f00b388e0d3b2f6$var$StepButton(props, ref) {
|
|
|
233
257
|
function $48b879bdd771eb85$var$NumberField(props, ref) {
|
|
234
258
|
props = (0, $k6K00$useProviderProps)(props);
|
|
235
259
|
let provider = (0, $k6K00$useProvider)();
|
|
236
|
-
let { isQuiet: isQuiet
|
|
237
|
-
let { styleProps: style
|
|
238
|
-
let { locale: locale
|
|
260
|
+
let { isQuiet: isQuiet, isReadOnly: isReadOnly, isDisabled: isDisabled, hideStepper: hideStepper } = props;
|
|
261
|
+
let { styleProps: style } = (0, $k6K00$useStyleProps)(props);
|
|
262
|
+
let { locale: locale } = (0, $k6K00$useLocale)();
|
|
239
263
|
let state = (0, $k6K00$useNumberFieldState)({
|
|
240
264
|
...props,
|
|
241
265
|
locale: locale
|
|
242
266
|
});
|
|
243
267
|
let inputRef = (0, $k6K00$useRef)();
|
|
244
268
|
let domRef = (0, $k6K00$useFocusableRef)(ref, inputRef);
|
|
245
|
-
let { groupProps: groupProps
|
|
269
|
+
let { groupProps: groupProps, labelProps: labelProps, inputProps: inputProps, incrementButtonProps: incrementButtonProps, decrementButtonProps: decrementButtonProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $k6K00$useNumberField)(props, state, inputRef);
|
|
246
270
|
let isMobile = provider.scale === "large";
|
|
247
271
|
let showStepper = !hideStepper;
|
|
248
|
-
let { isHovered: isHovered
|
|
272
|
+
let { isHovered: isHovered, hoverProps: hoverProps } = (0, $k6K00$useHover)({
|
|
249
273
|
isDisabled: isDisabled
|
|
250
274
|
});
|
|
251
275
|
let className = (0, $k6K00$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ba58a329f3e1a776$exports))), "spectrum-Stepper", {
|
|
@@ -281,7 +305,7 @@ function $48b879bdd771eb85$var$NumberField(props, ref) {
|
|
|
281
305
|
}));
|
|
282
306
|
}
|
|
283
307
|
const $48b879bdd771eb85$var$NumberFieldInput = /*#__PURE__*/ (0, $k6K00$react).forwardRef(function NumberFieldInput(props, ref) {
|
|
284
|
-
let { groupProps: groupProps
|
|
308
|
+
let { groupProps: groupProps, inputProps: inputProps, inputRef: inputRef, incrementProps: incrementProps, decrementProps: decrementProps, className: className, style: style, autoFocus: autoFocus, isQuiet: isQuiet, isDisabled: isDisabled, hideStepper: hideStepper, validationState: validationState, name: name, state: state } = props;
|
|
285
309
|
let showStepper = !hideStepper;
|
|
286
310
|
return /*#__PURE__*/ (0, $k6K00$react).createElement((0, $k6K00$FocusRing), {
|
|
287
311
|
within: true,
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;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,IAAI,0DAAe,CAAA,GAAA,YAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/numberfield/src/index.ts","packages/@react-spectrum/numberfield/src/NumberField.tsx","packages/@react-spectrum/numberfield/src/StepButton.tsx","packages/@adobe/spectrum-css-temp/components/stepper/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n/// <reference types=\"css-module-types\" />\n\nexport {NumberField} from './NumberField';\nexport type {SpectrumNumberFieldProps} from '@react-types/numberfield';\n","/*\n * Copyright 2020 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 {AriaButtonProps} from '@react-types/button';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {Field} from '@react-spectrum/label';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport {NumberFieldState, useNumberFieldState} from '@react-stately/numberfield';\nimport React, {HTMLAttributes, InputHTMLAttributes, RefObject, useRef} from 'react';\nimport {SpectrumNumberFieldProps} from '@react-types/numberfield';\nimport {StepButton} from './StepButton';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useNumberField} from '@react-aria/numberfield';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\n\nfunction NumberField(props: SpectrumNumberFieldProps, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let provider = useProvider();\n let {\n isQuiet,\n isReadOnly,\n isDisabled,\n hideStepper\n } = props;\n\n let {styleProps: style} = useStyleProps(props);\n\n let {locale} = useLocale();\n let state = useNumberFieldState({...props, locale});\n let inputRef = useRef<HTMLInputElement>();\n let domRef = useFocusableRef<HTMLElement>(ref, inputRef);\n let {\n groupProps,\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n descriptionProps,\n errorMessageProps\n } = useNumberField(props, state, inputRef);\n let isMobile = provider.scale === 'large';\n let showStepper = !hideStepper;\n\n let {isHovered, hoverProps} = useHover({isDisabled});\n\n let className =\n classNames(\n stepperStyle,\n 'spectrum-Stepper',\n {\n 'spectrum-Stepper--isQuiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-Stepper--readonly': isReadOnly,\n 'is-invalid': props.validationState === 'invalid' && !isDisabled,\n 'spectrum-Stepper--showStepper': showStepper,\n 'spectrum-Stepper--isMobile': isMobile,\n 'is-hovered': isHovered,\n // because FocusRing won't pass along the className from Field, we have to handle that ourselves\n [style.className]: !props.label && style.className\n }\n );\n\n return (\n <Field\n {...props as Omit<SpectrumNumberFieldProps, 'onChange'>}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n labelProps={labelProps}\n ref={domRef}\n wrapperClassName={classNames(\n stepperStyle,\n 'spectrum-Stepper-container',\n {\n 'spectrum-Stepper-container--isMobile': isMobile\n }\n )}>\n <NumberFieldInput\n {...props}\n groupProps={mergeProps(groupProps, hoverProps)}\n inputProps={inputProps}\n inputRef={inputRef}\n incrementProps={incrementButtonProps}\n decrementProps={decrementButtonProps}\n className={className}\n style={style}\n state={state} />\n </Field>\n );\n}\n\n\ninterface NumberFieldInputProps extends SpectrumNumberFieldProps {\n groupProps: HTMLAttributes<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement>,\n incrementProps: AriaButtonProps,\n decrementProps: AriaButtonProps,\n className?: string,\n style?: React.CSSProperties,\n state: NumberFieldState\n}\n\nconst NumberFieldInput = React.forwardRef(function NumberFieldInput(props: NumberFieldInputProps, ref: RefObject<HTMLElement>) {\n let {\n groupProps,\n inputProps,\n inputRef,\n incrementProps,\n decrementProps,\n className,\n style,\n autoFocus,\n isQuiet,\n isDisabled,\n hideStepper,\n validationState,\n name,\n state\n } = props;\n let showStepper = !hideStepper;\n\n return (\n <FocusRing\n within\n isTextInput\n focusClass={classNames(stepperStyle, 'is-focused')}\n focusRingClass={classNames(stepperStyle, 'focus-ring')}\n autoFocus={autoFocus}>\n <div\n {...groupProps}\n ref={ref as RefObject<HTMLDivElement>}\n style={style}\n className={className}>\n <TextFieldBase\n UNSAFE_className={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-field'\n )\n }\n inputClassName={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-input'\n )\n }\n validationIconClassName={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-icon'\n )\n }\n isQuiet={isQuiet}\n inputRef={inputRef}\n validationState={validationState}\n inputProps={inputProps}\n isDisabled={isDisabled}\n disableFocusRing />\n {showStepper &&\n <>\n <StepButton direction=\"up\" isQuiet={isQuiet} {...incrementProps} />\n <StepButton direction=\"down\" isQuiet={isQuiet} {...decrementProps} />\n </>\n }\n {name && <input type=\"hidden\" name={name} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </div>\n </FocusRing>\n );\n});\n\n/**\n * NumberFields allow users to enter a number, and increment or decrement the value using stepper buttons.\n */\nlet _NumberField = React.forwardRef(NumberField);\nexport {_NumberField as NumberField};\n","/*\n * Copyright 2020 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 Add from '@spectrum-icons/workflow/Add';\nimport {AriaButtonProps} from '@react-types/button';\nimport ChevronDownSmall from '@spectrum-icons/ui/ChevronDownSmall';\nimport ChevronUpSmall from '@spectrum-icons/ui/ChevronUpSmall';\nimport {classNames} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport Remove from '@spectrum-icons/workflow/Remove';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\n\ninterface StepButtonProps extends AriaButtonProps {\n isQuiet: boolean,\n direction: 'up' | 'down'\n}\n\nfunction StepButton(props: StepButtonProps, ref: RefObject<HTMLDivElement>) {\n props = useProviderProps(props);\n let {scale} = useProvider();\n let {direction, isDisabled, isQuiet} = props;\n /**\n * Must use div for now because Safari pointer event bugs on disabled form elements.\n * Link https://bugs.webkit.org/show_bug.cgi?id=219188.\n */\n let {buttonProps, isPressed} = useButton({...props, elementType: 'div'}, ref);\n let {hoverProps, isHovered} = useHover(props);\n return (\n <FocusRing focusRingClass={classNames(stepperStyle, 'focus-ring')}>\n <div\n className={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-button',\n {\n 'spectrum-Stepper-button--stepUp': direction === 'up',\n 'spectrum-Stepper-button--stepDown': direction === 'down',\n 'spectrum-Stepper-button--isQuiet': isQuiet,\n 'is-hovered': isHovered,\n 'is-active': isPressed,\n 'is-disabled': isDisabled\n }\n )\n }\n {...mergeProps(hoverProps, buttonProps)}\n ref={ref}>\n {direction === 'up' && scale === 'large' &&\n <Add UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')} size=\"S\" />\n }\n {direction === 'up' && scale === 'medium' &&\n <ChevronUpSmall UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')} />\n }\n {direction === 'down' && scale === 'large' &&\n <Remove UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')} size=\"S\" />\n }\n {direction === 'down' && scale === 'medium' &&\n <ChevronDownSmall UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')} />\n }\n </div>\n </FocusRing>\n );\n}\n\n/**\n * Buttons for NumberField.\n */\nlet _StepButton = React.forwardRef(StepButton);\nexport {_StepButton as StepButton};\n","/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;;;;;ACVD;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVD,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;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um/numberfield/src/index.ts","packages/@react-spectrum/numberfield/src/NumberField.tsx","packages/@react-spectrum/numberfield/src/StepButton.tsx","packages/@adobe/spectrum-css-temp/components/stepper/vars.css"],"sourcesContent":["/*\n * Copyright 2020 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\n/// <reference types=\"css-module-types\" />\n\nexport {NumberField} from './NumberField';\nexport type {SpectrumNumberFieldProps} from '@react-types/numberfield';\n","/*\n * Copyright 2020 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 {AriaButtonProps} from '@react-types/button';\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {Field} from '@react-spectrum/label';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport {NumberFieldState, useNumberFieldState} from '@react-stately/numberfield';\nimport React, {HTMLAttributes, InputHTMLAttributes, RefObject, useRef} from 'react';\nimport {SpectrumNumberFieldProps} from '@react-types/numberfield';\nimport {StepButton} from './StepButton';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {TextFieldBase} from '@react-spectrum/textfield';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useNumberField} from '@react-aria/numberfield';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\n\nfunction NumberField(props: SpectrumNumberFieldProps, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n let provider = useProvider();\n let {\n isQuiet,\n isReadOnly,\n isDisabled,\n hideStepper\n } = props;\n\n let {styleProps: style} = useStyleProps(props);\n\n let {locale} = useLocale();\n let state = useNumberFieldState({...props, locale});\n let inputRef = useRef<HTMLInputElement>();\n let domRef = useFocusableRef<HTMLElement>(ref, inputRef);\n let {\n groupProps,\n labelProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n descriptionProps,\n errorMessageProps\n } = useNumberField(props, state, inputRef);\n let isMobile = provider.scale === 'large';\n let showStepper = !hideStepper;\n\n let {isHovered, hoverProps} = useHover({isDisabled});\n\n let className =\n classNames(\n stepperStyle,\n 'spectrum-Stepper',\n {\n 'spectrum-Stepper--isQuiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-Stepper--readonly': isReadOnly,\n 'is-invalid': props.validationState === 'invalid' && !isDisabled,\n 'spectrum-Stepper--showStepper': showStepper,\n 'spectrum-Stepper--isMobile': isMobile,\n 'is-hovered': isHovered,\n // because FocusRing won't pass along the className from Field, we have to handle that ourselves\n [style.className]: !props.label && style.className\n }\n );\n\n return (\n <Field\n {...props as Omit<SpectrumNumberFieldProps, 'onChange'>}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n labelProps={labelProps}\n ref={domRef}\n wrapperClassName={classNames(\n stepperStyle,\n 'spectrum-Stepper-container',\n {\n 'spectrum-Stepper-container--isMobile': isMobile\n }\n )}>\n <NumberFieldInput\n {...props}\n groupProps={mergeProps(groupProps, hoverProps)}\n inputProps={inputProps}\n inputRef={inputRef}\n incrementProps={incrementButtonProps}\n decrementProps={decrementButtonProps}\n className={className}\n style={style}\n state={state} />\n </Field>\n );\n}\n\n\ninterface NumberFieldInputProps extends SpectrumNumberFieldProps {\n groupProps: HTMLAttributes<HTMLDivElement>,\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement>,\n incrementProps: AriaButtonProps,\n decrementProps: AriaButtonProps,\n className?: string,\n style?: React.CSSProperties,\n state: NumberFieldState\n}\n\nconst NumberFieldInput = React.forwardRef(function NumberFieldInput(props: NumberFieldInputProps, ref: RefObject<HTMLElement>) {\n let {\n groupProps,\n inputProps,\n inputRef,\n incrementProps,\n decrementProps,\n className,\n style,\n autoFocus,\n isQuiet,\n isDisabled,\n hideStepper,\n validationState,\n name,\n state\n } = props;\n let showStepper = !hideStepper;\n\n return (\n <FocusRing\n within\n isTextInput\n focusClass={classNames(stepperStyle, 'is-focused')}\n focusRingClass={classNames(stepperStyle, 'focus-ring')}\n autoFocus={autoFocus}>\n <div\n {...groupProps}\n ref={ref as RefObject<HTMLDivElement>}\n style={style}\n className={className}>\n <TextFieldBase\n UNSAFE_className={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-field'\n )\n }\n inputClassName={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-input'\n )\n }\n validationIconClassName={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-icon'\n )\n }\n isQuiet={isQuiet}\n inputRef={inputRef}\n validationState={validationState}\n inputProps={inputProps}\n isDisabled={isDisabled}\n disableFocusRing />\n {showStepper &&\n <>\n <StepButton direction=\"up\" isQuiet={isQuiet} {...incrementProps} />\n <StepButton direction=\"down\" isQuiet={isQuiet} {...decrementProps} />\n </>\n }\n {name && <input type=\"hidden\" name={name} value={isNaN(state.numberValue) ? '' : state.numberValue} />}\n </div>\n </FocusRing>\n );\n});\n\n/**\n * NumberFields allow users to enter a number, and increment or decrement the value using stepper buttons.\n */\nlet _NumberField = React.forwardRef(NumberField);\nexport {_NumberField as NumberField};\n","/*\n * Copyright 2020 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 Add from '@spectrum-icons/workflow/Add';\nimport {AriaButtonProps} from '@react-types/button';\nimport ChevronDownSmall from '@spectrum-icons/ui/ChevronDownSmall';\nimport ChevronUpSmall from '@spectrum-icons/ui/ChevronUpSmall';\nimport {classNames} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport Remove from '@spectrum-icons/workflow/Remove';\nimport stepperStyle from '@adobe/spectrum-css-temp/components/stepper/vars.css';\nimport {useButton} from '@react-aria/button';\nimport {useHover} from '@react-aria/interactions';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\n\ninterface StepButtonProps extends AriaButtonProps {\n isQuiet: boolean,\n direction: 'up' | 'down'\n}\n\nfunction StepButton(props: StepButtonProps, ref: RefObject<HTMLDivElement>) {\n props = useProviderProps(props);\n let {scale} = useProvider();\n let {direction, isDisabled, isQuiet} = props;\n /**\n * Must use div for now because Safari pointer event bugs on disabled form elements.\n * Link https://bugs.webkit.org/show_bug.cgi?id=219188.\n */\n let {buttonProps, isPressed} = useButton({...props, elementType: 'div'}, ref);\n let {hoverProps, isHovered} = useHover(props);\n return (\n <FocusRing focusRingClass={classNames(stepperStyle, 'focus-ring')}>\n <div\n className={\n classNames(\n stepperStyle,\n 'spectrum-Stepper-button',\n {\n 'spectrum-Stepper-button--stepUp': direction === 'up',\n 'spectrum-Stepper-button--stepDown': direction === 'down',\n 'spectrum-Stepper-button--isQuiet': isQuiet,\n 'is-hovered': isHovered,\n 'is-active': isPressed,\n 'is-disabled': isDisabled\n }\n )\n }\n {...mergeProps(hoverProps, buttonProps)}\n ref={ref}>\n {direction === 'up' && scale === 'large' &&\n <Add UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')} size=\"S\" />\n }\n {direction === 'up' && scale === 'medium' &&\n <ChevronUpSmall UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepUpIcon')} />\n }\n {direction === 'down' && scale === 'large' &&\n <Remove UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')} size=\"S\" />\n }\n {direction === 'down' && scale === 'medium' &&\n <ChevronDownSmall UNSAFE_className={classNames(stepperStyle, 'spectrum-Stepper-button-icon', 'spectrum-Stepper-stepDownIcon')} />\n }\n </div>\n </FocusRing>\n );\n}\n\n/**\n * Buttons for NumberField.\n */\nlet _StepButton = React.forwardRef(StepButton);\nexport {_StepButton as StepButton};\n","/*\n * Copyright 2020 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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/numberfield",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.3",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/button": "^3.8.
|
|
40
|
-
"@react-aria/focus": "^3.14.
|
|
41
|
-
"@react-aria/i18n": "^3.8.
|
|
42
|
-
"@react-aria/interactions": "^3.
|
|
43
|
-
"@react-aria/numberfield": "^3.
|
|
44
|
-
"@react-aria/utils": "^3.
|
|
45
|
-
"@react-spectrum/button": "^3.
|
|
46
|
-
"@react-spectrum/label": "^3.
|
|
47
|
-
"@react-spectrum/textfield": "^3.10.
|
|
48
|
-
"@react-spectrum/utils": "^3.
|
|
49
|
-
"@react-stately/numberfield": "^3.6.
|
|
50
|
-
"@react-types/button": "^3.
|
|
51
|
-
"@react-types/numberfield": "^3.6.
|
|
52
|
-
"@react-types/shared": "^3.
|
|
53
|
-
"@spectrum-icons/ui": "^3.
|
|
54
|
-
"@spectrum-icons/workflow": "^4.2.
|
|
39
|
+
"@react-aria/button": "^3.8.4",
|
|
40
|
+
"@react-aria/focus": "^3.14.3",
|
|
41
|
+
"@react-aria/i18n": "^3.8.4",
|
|
42
|
+
"@react-aria/interactions": "^3.19.1",
|
|
43
|
+
"@react-aria/numberfield": "^3.9.1",
|
|
44
|
+
"@react-aria/utils": "^3.21.1",
|
|
45
|
+
"@react-spectrum/button": "^3.14.1",
|
|
46
|
+
"@react-spectrum/label": "^3.15.1",
|
|
47
|
+
"@react-spectrum/textfield": "^3.10.7",
|
|
48
|
+
"@react-spectrum/utils": "^3.11.1",
|
|
49
|
+
"@react-stately/numberfield": "^3.6.2",
|
|
50
|
+
"@react-types/button": "^3.9.0",
|
|
51
|
+
"@react-types/numberfield": "^3.6.1",
|
|
52
|
+
"@react-types/shared": "^3.21.0",
|
|
53
|
+
"@spectrum-icons/ui": "^3.6.1",
|
|
54
|
+
"@spectrum-icons/workflow": "^4.2.6",
|
|
55
55
|
"@swc/helpers": "^0.5.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "3ecf62dcceea437cb12df1851636dd491bb6591c"
|
|
70
70
|
}
|