@khanacademy/wonder-blocks-switch 3.0.7 → 3.1.0
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/CHANGELOG.md +166 -146
- package/LICENSE +21 -0
- package/dist/index.js +7 -11
- package/package.json +10 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,377 +1,397 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-switch
|
|
2
2
|
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f03298f: Tooling:
|
|
8
|
+
|
|
9
|
+
- Switching to `pnpm`.
|
|
10
|
+
- Upgrading `rollup` to v4 and `@babel/runtime` to match the current webapp version.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- bb2a026: pnpm: Switch to workspace protocol to handle dependency versions with changesets on monorepo setup"
|
|
15
|
+
- Updated dependencies [969864b]
|
|
16
|
+
- Updated dependencies [bb2a026]
|
|
17
|
+
- Updated dependencies [f03298f]
|
|
18
|
+
- @khanacademy/wonder-blocks-core@12.1.0
|
|
19
|
+
- @khanacademy/wonder-blocks-icon@5.1.0
|
|
20
|
+
- @khanacademy/wonder-blocks-theming@3.1.0
|
|
21
|
+
- @khanacademy/wonder-blocks-tokens@4.2.0
|
|
22
|
+
|
|
3
23
|
## 3.0.7
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
6
26
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
27
|
+
- Updated dependencies [0199324d]
|
|
28
|
+
- @khanacademy/wonder-blocks-core@12.0.0
|
|
29
|
+
- @khanacademy/wonder-blocks-icon@5.0.6
|
|
10
30
|
|
|
11
31
|
## 3.0.6
|
|
12
32
|
|
|
13
33
|
### Patch Changes
|
|
14
34
|
|
|
15
|
-
-
|
|
35
|
+
- 645fc67b: Migrate the Switch component to use `semanticColor` tokens instead of `color`. This will prepare the component for supporting a more global theming approach in the future.
|
|
16
36
|
|
|
17
37
|
## 3.0.5
|
|
18
38
|
|
|
19
39
|
### Patch Changes
|
|
20
40
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
41
|
+
- Updated dependencies [8cfaeab0]
|
|
42
|
+
- Updated dependencies [c162abb4]
|
|
43
|
+
- @khanacademy/wonder-blocks-tokens@4.1.0
|
|
24
44
|
|
|
25
45
|
## 3.0.4
|
|
26
46
|
|
|
27
47
|
### Patch Changes
|
|
28
48
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
49
|
+
- Updated dependencies [0de25cd8]
|
|
50
|
+
- @khanacademy/wonder-blocks-tokens@4.0.0
|
|
31
51
|
|
|
32
52
|
## 3.0.3
|
|
33
53
|
|
|
34
54
|
### Patch Changes
|
|
35
55
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
56
|
+
- Updated dependencies [7516b239]
|
|
57
|
+
- @khanacademy/wonder-blocks-core@11.1.0
|
|
58
|
+
- @khanacademy/wonder-blocks-icon@5.0.5
|
|
39
59
|
|
|
40
60
|
## 3.0.2
|
|
41
61
|
|
|
42
62
|
### Patch Changes
|
|
43
63
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
64
|
+
- 11a0f5c6: No functional changes. Adding prepublishOnly script.
|
|
65
|
+
- Updated dependencies [11a0f5c6]
|
|
66
|
+
- @khanacademy/wonder-blocks-theming@3.0.1
|
|
67
|
+
- @khanacademy/wonder-blocks-tokens@3.0.1
|
|
68
|
+
- @khanacademy/wonder-blocks-core@11.0.1
|
|
69
|
+
- @khanacademy/wonder-blocks-icon@5.0.4
|
|
50
70
|
|
|
51
71
|
## 3.0.1
|
|
52
72
|
|
|
53
73
|
### Patch Changes
|
|
54
74
|
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
75
|
+
- Updated dependencies [d23c9c5f]
|
|
76
|
+
- @khanacademy/wonder-blocks-core@11.0.0
|
|
77
|
+
- @khanacademy/wonder-blocks-icon@5.0.3
|
|
58
78
|
|
|
59
79
|
## 3.0.0
|
|
60
80
|
|
|
61
81
|
### Major Changes
|
|
62
82
|
|
|
63
|
-
-
|
|
83
|
+
- 56d961f1: - Migrate Wonder Blocks components off old id providers and onto new `Id` component
|
|
64
84
|
|
|
65
85
|
### Patch Changes
|
|
66
86
|
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
87
|
+
- b6009b77: Deprecate the ID provider and unique ID utilities
|
|
88
|
+
- Updated dependencies [b6009b77]
|
|
89
|
+
- Updated dependencies [897686bc]
|
|
90
|
+
- Updated dependencies [56d961f1]
|
|
91
|
+
- @khanacademy/wonder-blocks-core@10.0.0
|
|
92
|
+
- @khanacademy/wonder-blocks-icon@5.0.2
|
|
73
93
|
|
|
74
94
|
## 2.0.1
|
|
75
95
|
|
|
76
96
|
### Patch Changes
|
|
77
97
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
98
|
+
- Updated dependencies [f4abd572]
|
|
99
|
+
- @khanacademy/wonder-blocks-core@9.0.0
|
|
100
|
+
- @khanacademy/wonder-blocks-icon@5.0.1
|
|
81
101
|
|
|
82
102
|
## 2.0.0
|
|
83
103
|
|
|
84
104
|
### Major Changes
|
|
85
105
|
|
|
86
|
-
-
|
|
106
|
+
- e6abdd17: Upgrade to React 18
|
|
87
107
|
|
|
88
108
|
### Patch Changes
|
|
89
109
|
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
110
|
+
- Updated dependencies [e6abdd17]
|
|
111
|
+
- @khanacademy/wonder-blocks-theming@3.0.0
|
|
112
|
+
- @khanacademy/wonder-blocks-core@8.0.0
|
|
113
|
+
- @khanacademy/wonder-blocks-icon@5.0.0
|
|
114
|
+
- @khanacademy/wonder-blocks-tokens@3.0.0
|
|
95
115
|
|
|
96
116
|
## 1.1.24
|
|
97
117
|
|
|
98
118
|
### Patch Changes
|
|
99
119
|
|
|
100
|
-
-
|
|
101
|
-
-
|
|
120
|
+
- Updated dependencies [c1110599]
|
|
121
|
+
- @khanacademy/wonder-blocks-icon@4.2.0
|
|
102
122
|
|
|
103
123
|
## 1.1.23
|
|
104
124
|
|
|
105
125
|
### Patch Changes
|
|
106
126
|
|
|
107
|
-
-
|
|
108
|
-
-
|
|
127
|
+
- Updated dependencies [6999fd39]
|
|
128
|
+
- @khanacademy/wonder-blocks-tokens@2.1.0
|
|
109
129
|
|
|
110
130
|
## 1.1.22
|
|
111
131
|
|
|
112
132
|
### Patch Changes
|
|
113
133
|
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
134
|
+
- 02a1b298: Make sure we don't package tsconfig and tsbuildinfo files
|
|
135
|
+
- Updated dependencies [02a1b298]
|
|
136
|
+
- @khanacademy/wonder-blocks-core@7.0.1
|
|
137
|
+
- @khanacademy/wonder-blocks-icon@4.1.5
|
|
138
|
+
- @khanacademy/wonder-blocks-theming@2.0.4
|
|
139
|
+
- @khanacademy/wonder-blocks-tokens@2.0.1
|
|
120
140
|
|
|
121
141
|
## 1.1.21
|
|
122
142
|
|
|
123
143
|
### Patch Changes
|
|
124
144
|
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
145
|
+
- Updated dependencies [07f7f407]
|
|
146
|
+
- @khanacademy/wonder-blocks-core@7.0.0
|
|
147
|
+
- @khanacademy/wonder-blocks-icon@4.1.4
|
|
128
148
|
|
|
129
149
|
## 1.1.20
|
|
130
150
|
|
|
131
151
|
### Patch Changes
|
|
132
152
|
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
153
|
+
- Updated dependencies [f17dc1ee]
|
|
154
|
+
- Updated dependencies [991eb43f]
|
|
155
|
+
- @khanacademy/wonder-blocks-tokens@2.0.0
|
|
136
156
|
|
|
137
157
|
## 1.1.19
|
|
138
158
|
|
|
139
159
|
### Patch Changes
|
|
140
160
|
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
-
|
|
161
|
+
- 559e82d5: Update to build tooling, generating smaller output
|
|
162
|
+
- Updated dependencies [559e82d5]
|
|
163
|
+
- @khanacademy/wonder-blocks-core@6.4.3
|
|
164
|
+
- @khanacademy/wonder-blocks-icon@4.1.3
|
|
165
|
+
- @khanacademy/wonder-blocks-theming@2.0.3
|
|
166
|
+
- @khanacademy/wonder-blocks-tokens@1.3.1
|
|
147
167
|
|
|
148
168
|
## 1.1.18
|
|
149
169
|
|
|
150
170
|
### Patch Changes
|
|
151
171
|
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
172
|
+
- Updated dependencies [eab37b8b]
|
|
173
|
+
- @khanacademy/wonder-blocks-core@6.4.2
|
|
174
|
+
- @khanacademy/wonder-blocks-icon@4.1.2
|
|
155
175
|
|
|
156
176
|
## 1.1.17
|
|
157
177
|
|
|
158
178
|
### Patch Changes
|
|
159
179
|
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
180
|
+
- Updated dependencies [5dfac06e]
|
|
181
|
+
- @khanacademy/wonder-blocks-core@6.4.1
|
|
182
|
+
- @khanacademy/wonder-blocks-icon@4.1.1
|
|
163
183
|
|
|
164
184
|
## 1.1.16
|
|
165
185
|
|
|
166
186
|
### Patch Changes
|
|
167
187
|
|
|
168
|
-
-
|
|
169
|
-
-
|
|
188
|
+
- Updated dependencies [9bfeead9]
|
|
189
|
+
- @khanacademy/wonder-blocks-tokens@1.3.0
|
|
170
190
|
|
|
171
191
|
## 1.1.15
|
|
172
192
|
|
|
173
193
|
### Patch Changes
|
|
174
194
|
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
195
|
+
- Updated dependencies [58075352]
|
|
196
|
+
- @khanacademy/wonder-blocks-core@6.4.0
|
|
197
|
+
- @khanacademy/wonder-blocks-icon@4.1.0
|
|
178
198
|
|
|
179
199
|
## 1.1.14
|
|
180
200
|
|
|
181
201
|
### Patch Changes
|
|
182
202
|
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
203
|
+
- 874081aa: Remove wonder-blocks-color dependency in favor of wonder-blocks-tokens
|
|
204
|
+
- Updated dependencies [874081aa]
|
|
205
|
+
- Updated dependencies [874081aa]
|
|
206
|
+
- Updated dependencies [a9bf603a]
|
|
207
|
+
- @khanacademy/wonder-blocks-theming@2.0.2
|
|
208
|
+
- @khanacademy/wonder-blocks-tokens@1.2.0
|
|
189
209
|
|
|
190
210
|
## 1.1.13
|
|
191
211
|
|
|
192
212
|
### Patch Changes
|
|
193
213
|
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
214
|
+
- 7ed54137: Update khanmigo theme to match design specs
|
|
215
|
+
- Updated dependencies [4cfb4977]
|
|
216
|
+
- @khanacademy/wonder-blocks-tokens@1.1.0
|
|
197
217
|
|
|
198
218
|
## 1.1.12
|
|
199
219
|
|
|
200
220
|
### Patch Changes
|
|
201
221
|
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
222
|
+
- Updated dependencies [e83f8991]
|
|
223
|
+
- Updated dependencies [e83f8991]
|
|
224
|
+
- @khanacademy/wonder-blocks-tokens@1.0.0
|
|
225
|
+
- @khanacademy/wonder-blocks-theming@2.0.1
|
|
206
226
|
|
|
207
227
|
## 1.1.11
|
|
208
228
|
|
|
209
229
|
### Patch Changes
|
|
210
230
|
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
231
|
+
- 60aba5b8: Update internal spacing references (from wb-spacing to wb-tokens)
|
|
232
|
+
- 7cd7f6cc: Replace theming.tokens with wb-tokens and update callsites to use the new export
|
|
233
|
+
- Updated dependencies [7cd7f6cc]
|
|
234
|
+
- Updated dependencies [60aba5b8]
|
|
235
|
+
- Updated dependencies [7cd7f6cc]
|
|
236
|
+
- Updated dependencies [7c51f377]
|
|
237
|
+
- @khanacademy/wonder-blocks-theming@2.0.0
|
|
238
|
+
- @khanacademy/wonder-blocks-tokens@0.2.0
|
|
219
239
|
|
|
220
240
|
## 1.1.10
|
|
221
241
|
|
|
222
242
|
### Patch Changes
|
|
223
243
|
|
|
224
|
-
-
|
|
225
|
-
-
|
|
244
|
+
- Updated dependencies [80592e75]
|
|
245
|
+
- @khanacademy/wonder-blocks-theming@1.3.0
|
|
226
246
|
|
|
227
247
|
## 1.1.9
|
|
228
248
|
|
|
229
249
|
### Patch Changes
|
|
230
250
|
|
|
231
|
-
-
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
-
|
|
251
|
+
- Updated dependencies [23ab9f8c]
|
|
252
|
+
- Updated dependencies [6df21f71]
|
|
253
|
+
- @khanacademy/wonder-blocks-icon@4.0.1
|
|
254
|
+
- @khanacademy/wonder-blocks-core@6.3.1
|
|
235
255
|
|
|
236
256
|
## 1.1.8
|
|
237
257
|
|
|
238
258
|
### Patch Changes
|
|
239
259
|
|
|
240
|
-
-
|
|
241
|
-
-
|
|
260
|
+
- Updated dependencies [171e3b01]
|
|
261
|
+
- @khanacademy/wonder-blocks-icon@4.0.0
|
|
242
262
|
|
|
243
263
|
## 1.1.7
|
|
244
264
|
|
|
245
265
|
### Patch Changes
|
|
246
266
|
|
|
247
|
-
-
|
|
248
|
-
-
|
|
267
|
+
- Updated dependencies [96f675d2]
|
|
268
|
+
- @khanacademy/wonder-blocks-icon@3.0.0
|
|
249
269
|
|
|
250
270
|
## 1.1.6
|
|
251
271
|
|
|
252
272
|
### Patch Changes
|
|
253
273
|
|
|
254
|
-
-
|
|
255
|
-
-
|
|
274
|
+
- Updated dependencies [edcfbe14]
|
|
275
|
+
- @khanacademy/wonder-blocks-theming@1.2.1
|
|
256
276
|
|
|
257
277
|
## 1.1.5
|
|
258
278
|
|
|
259
279
|
### Patch Changes
|
|
260
280
|
|
|
261
|
-
-
|
|
262
|
-
-
|
|
263
|
-
-
|
|
281
|
+
- 3f854fe8: Export supported themes list, change WB components to use these new exports
|
|
282
|
+
- Updated dependencies [3f854fe8]
|
|
283
|
+
- @khanacademy/wonder-blocks-theming@1.2.0
|
|
264
284
|
|
|
265
285
|
## 1.1.4
|
|
266
286
|
|
|
267
287
|
### Patch Changes
|
|
268
288
|
|
|
269
|
-
-
|
|
270
|
-
-
|
|
271
|
-
-
|
|
272
|
-
-
|
|
289
|
+
- 45a30427: Add PhosphorIcon support to `Switch`
|
|
290
|
+
- Updated dependencies [7055ca94]
|
|
291
|
+
- @khanacademy/wonder-blocks-core@6.3.0
|
|
292
|
+
- @khanacademy/wonder-blocks-icon@2.2.1
|
|
273
293
|
|
|
274
294
|
## 1.1.3
|
|
275
295
|
|
|
276
296
|
### Patch Changes
|
|
277
297
|
|
|
278
|
-
-
|
|
279
|
-
-
|
|
298
|
+
- Updated dependencies [ea0e7c02]
|
|
299
|
+
- @khanacademy/wonder-blocks-icon@2.2.0
|
|
280
300
|
|
|
281
301
|
## 1.1.2
|
|
282
302
|
|
|
283
303
|
### Patch Changes
|
|
284
304
|
|
|
285
|
-
-
|
|
286
|
-
-
|
|
305
|
+
- 65148738: Add `not-allowed` cursor to disabled+hover
|
|
306
|
+
- @khanacademy/wonder-blocks-theming@1.1.1
|
|
287
307
|
|
|
288
308
|
## 1.1.1
|
|
289
309
|
|
|
290
310
|
### Patch Changes
|
|
291
311
|
|
|
292
|
-
-
|
|
312
|
+
- 1f263385: Use `aria-disabled` instead of `disabled` for enabling focus on Screen Readers.
|
|
293
313
|
|
|
294
314
|
## 1.1.0
|
|
295
315
|
|
|
296
316
|
### Minor Changes
|
|
297
317
|
|
|
298
|
-
-
|
|
318
|
+
- fc6cec0b: Add theming to Switch and new color tokens for theming
|
|
299
319
|
|
|
300
320
|
### Patch Changes
|
|
301
321
|
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
-
|
|
322
|
+
- Updated dependencies [5725703a]
|
|
323
|
+
- Updated dependencies [fc6cec0b]
|
|
324
|
+
- @khanacademy/wonder-blocks-theming@1.1.0
|
|
305
325
|
|
|
306
326
|
## 1.0.6
|
|
307
327
|
|
|
308
328
|
### Patch Changes
|
|
309
329
|
|
|
310
|
-
-
|
|
311
|
-
-
|
|
312
|
-
-
|
|
330
|
+
- Updated dependencies [4b97b9a2]
|
|
331
|
+
- @khanacademy/wonder-blocks-core@6.2.0
|
|
332
|
+
- @khanacademy/wonder-blocks-icon@2.1.6
|
|
313
333
|
|
|
314
334
|
## 1.0.5
|
|
315
335
|
|
|
316
336
|
### Patch Changes
|
|
317
337
|
|
|
318
|
-
-
|
|
319
|
-
-
|
|
320
|
-
-
|
|
338
|
+
- Updated dependencies [2871f0a9]
|
|
339
|
+
- @khanacademy/wonder-blocks-core@6.1.1
|
|
340
|
+
- @khanacademy/wonder-blocks-icon@2.1.5
|
|
321
341
|
|
|
322
342
|
## 1.0.4
|
|
323
343
|
|
|
324
344
|
### Patch Changes
|
|
325
345
|
|
|
326
|
-
-
|
|
327
|
-
-
|
|
328
|
-
-
|
|
329
|
-
-
|
|
346
|
+
- Updated dependencies [efb59c29]
|
|
347
|
+
- Updated dependencies [8bc40ed2]
|
|
348
|
+
- @khanacademy/wonder-blocks-core@6.1.0
|
|
349
|
+
- @khanacademy/wonder-blocks-icon@2.1.4
|
|
330
350
|
|
|
331
351
|
## 1.0.3
|
|
332
352
|
|
|
333
353
|
### Patch Changes
|
|
334
354
|
|
|
335
|
-
-
|
|
336
|
-
-
|
|
337
|
-
-
|
|
355
|
+
- Updated dependencies [f19da46e]
|
|
356
|
+
- @khanacademy/wonder-blocks-core@6.0.2
|
|
357
|
+
- @khanacademy/wonder-blocks-icon@2.1.3
|
|
338
358
|
|
|
339
359
|
## 1.0.2
|
|
340
360
|
|
|
341
361
|
### Patch Changes
|
|
342
362
|
|
|
343
|
-
-
|
|
363
|
+
- d00f17c0: Fix style generation
|
|
344
364
|
|
|
345
365
|
## 1.0.1
|
|
346
366
|
|
|
347
367
|
### Patch Changes
|
|
348
368
|
|
|
349
|
-
-
|
|
350
|
-
-
|
|
351
|
-
-
|
|
369
|
+
- Updated dependencies [1920feb8]
|
|
370
|
+
- @khanacademy/wonder-blocks-core@6.0.1
|
|
371
|
+
- @khanacademy/wonder-blocks-icon@2.1.2
|
|
352
372
|
|
|
353
373
|
## 1.0.0
|
|
354
374
|
|
|
355
375
|
### Major Changes
|
|
356
376
|
|
|
357
|
-
-
|
|
377
|
+
- 8c77f29d: Create new Switch component and add 'switch' role to ClickableRole
|
|
358
378
|
|
|
359
379
|
### Patch Changes
|
|
360
380
|
|
|
361
|
-
-
|
|
362
|
-
-
|
|
363
|
-
-
|
|
364
|
-
-
|
|
381
|
+
- Updated dependencies [674a1e5c]
|
|
382
|
+
- Updated dependencies [674a1e5c]
|
|
383
|
+
- @khanacademy/wonder-blocks-core@6.0.0
|
|
384
|
+
- @khanacademy/wonder-blocks-icon@2.1.1
|
|
365
385
|
|
|
366
386
|
## 0.1.0
|
|
367
387
|
|
|
368
388
|
### Minor Changes
|
|
369
389
|
|
|
370
|
-
-
|
|
390
|
+
- 0f10ca37: Adds `wonder-blocks-switch` package
|
|
371
391
|
|
|
372
392
|
### Patch Changes
|
|
373
393
|
|
|
374
|
-
-
|
|
375
|
-
-
|
|
376
|
-
-
|
|
377
|
-
-
|
|
394
|
+
- Updated dependencies [1344436f]
|
|
395
|
+
- @khanacademy/wonder-blocks-core@5.4.0
|
|
396
|
+
- @khanacademy/wonder-blocks-clickable@3.1.3
|
|
397
|
+
- @khanacademy/wonder-blocks-typography@2.1.2
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Khan Academy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -7,10 +7,7 @@ var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
|
|
|
7
7
|
var wonderBlocksTheming = require('@khanacademy/wonder-blocks-theming');
|
|
8
8
|
var tokens = require('@khanacademy/wonder-blocks-tokens');
|
|
9
9
|
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
function _interopNamespace(e) {
|
|
13
|
-
if (e && e.__esModule) return e;
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
14
11
|
var n = Object.create(null);
|
|
15
12
|
if (e) {
|
|
16
13
|
Object.keys(e).forEach(function (k) {
|
|
@@ -23,13 +20,12 @@ function _interopNamespace(e) {
|
|
|
23
20
|
}
|
|
24
21
|
});
|
|
25
22
|
}
|
|
26
|
-
n
|
|
23
|
+
n.default = e;
|
|
27
24
|
return Object.freeze(n);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var tokens__namespace = /*#__PURE__*/_interopNamespace(tokens);
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
28
|
+
var tokens__namespace = /*#__PURE__*/_interopNamespaceDefault(tokens);
|
|
33
29
|
|
|
34
30
|
const action = tokens.semanticColor.action.outlined.progressive;
|
|
35
31
|
const theme$1 = {
|
|
@@ -254,7 +250,7 @@ const _generateStyles = (checked, clickable, disabled, theme, themeName) => {
|
|
|
254
250
|
};
|
|
255
251
|
if (checked) {
|
|
256
252
|
newStyles = {
|
|
257
|
-
switch:
|
|
253
|
+
switch: _extends({
|
|
258
254
|
backgroundColor: disabled ? theme.color.bg.switch.disabledOn : theme.color.bg.switch.on,
|
|
259
255
|
":active": {
|
|
260
256
|
backgroundColor: !disabled && clickable ? theme.color.bg.switch.activeOn : undefined
|
|
@@ -270,7 +266,7 @@ const _generateStyles = (checked, clickable, disabled, theme, themeName) => {
|
|
|
270
266
|
};
|
|
271
267
|
} else {
|
|
272
268
|
newStyles = {
|
|
273
|
-
switch:
|
|
269
|
+
switch: _extends({
|
|
274
270
|
backgroundColor: disabled ? theme.color.bg.switch.disabledOff : theme.color.bg.switch.off,
|
|
275
271
|
":active": {
|
|
276
272
|
backgroundColor: !disabled && clickable ? theme.color.bg.switch.activeOff : undefined
|
|
@@ -288,7 +284,7 @@ const _generateStyles = (checked, clickable, disabled, theme, themeName) => {
|
|
|
288
284
|
return styles[checkedStyle];
|
|
289
285
|
};
|
|
290
286
|
const Switch = React__namespace.forwardRef(function Switch(props, ref) {
|
|
291
|
-
return React__namespace.createElement(ThemedSwitch, null, React__namespace.createElement(SwitchCore,
|
|
287
|
+
return React__namespace.createElement(ThemedSwitch, null, React__namespace.createElement(SwitchCore, _extends({}, props, {
|
|
292
288
|
ref: ref
|
|
293
289
|
})));
|
|
294
290
|
});
|
package/package.json
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-switch",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"description": "Switch components for Wonder Blocks.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
-
"prepublishOnly": "../../utils/publish/package-pre-publish-check.sh"
|
|
12
|
-
},
|
|
13
9
|
"author": "",
|
|
14
10
|
"license": "MIT",
|
|
15
11
|
"publishConfig": {
|
|
16
12
|
"access": "public"
|
|
17
13
|
},
|
|
18
14
|
"dependencies": {
|
|
19
|
-
"@babel/runtime": "^7.
|
|
20
|
-
"@khanacademy/wonder-blocks-core": "
|
|
21
|
-
"@khanacademy/wonder-blocks-icon": "
|
|
22
|
-
"@khanacademy/wonder-blocks-theming": "
|
|
23
|
-
"@khanacademy/wonder-blocks-tokens": "
|
|
15
|
+
"@babel/runtime": "^7.24.5",
|
|
16
|
+
"@khanacademy/wonder-blocks-core": "12.1.0",
|
|
17
|
+
"@khanacademy/wonder-blocks-icon": "5.1.0",
|
|
18
|
+
"@khanacademy/wonder-blocks-theming": "3.1.0",
|
|
19
|
+
"@khanacademy/wonder-blocks-tokens": "4.2.0"
|
|
24
20
|
},
|
|
25
21
|
"peerDependencies": {
|
|
26
22
|
"aphrodite": "^1.2.5",
|
|
27
23
|
"react": "18.2.0"
|
|
28
24
|
},
|
|
29
25
|
"devDependencies": {
|
|
30
|
-
"@khanacademy/wb-dev-build-settings": "
|
|
26
|
+
"@khanacademy/wb-dev-build-settings": "2.1.0"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
31
30
|
}
|
|
32
31
|
}
|