@microbit/ui 0.1.0-alpha.17 → 0.1.0-alpha.19
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/LICENSE.md +8 -0
- package/README.md +34 -11
- package/lang/ui.ca.json +36 -0
- package/lang/ui.cy.json +36 -0
- package/lang/ui.de.json +36 -0
- package/lang/ui.en-us.json +36 -0
- package/lang/ui.en.json +28 -0
- package/lang/ui.es-es.json +36 -0
- package/lang/ui.fr.json +36 -0
- package/lang/ui.ga-ie.json +36 -0
- package/lang/ui.it.json +36 -0
- package/lang/ui.ja.json +36 -0
- package/lang/ui.ko.json +36 -0
- package/lang/ui.lol.json +36 -0
- package/lang/ui.nl.json +36 -0
- package/lang/ui.pl.json +36 -0
- package/lang/ui.pt-br.json +36 -0
- package/lang/ui.zh-cn.json +36 -0
- package/lang/ui.zh-tw.json +36 -0
- package/package.json +1 -1
- package/src/Avatar.recipe.ts +3 -1
- package/src/Checkbox.recipe.ts +5 -0
- package/src/Checkbox.tsx +42 -2
- package/src/CheckboxGroup.tsx +6 -10
- package/src/ComboBox.tsx +38 -16
- package/src/Field.recipe.ts +113 -0
- package/src/Field.tsx +189 -0
- package/src/Input.recipe.ts +4 -2
- package/src/NativeSelectField.tsx +84 -0
- package/src/NumberField.recipe.ts +25 -7
- package/src/NumberField.tsx +52 -22
- package/src/Radio.recipe.ts +4 -0
- package/src/Radio.tsx +1 -63
- package/src/RadioGroup.tsx +69 -0
- package/src/Select.recipe.ts +27 -17
- package/src/Select.tsx +38 -15
- package/src/Skeleton.tsx +5 -3
- package/src/Switch.recipe.ts +19 -0
- package/src/Switch.tsx +34 -3
- package/src/TextField.tsx +19 -8
- package/src/Toast.tsx +17 -2
- package/src/base-preset.ts +45 -10
- package/src/index.ts +3 -1
- package/src/FieldSupport.tsx +0 -68
- package/src/TextField.recipe.ts +0 -58
package/src/TextField.recipe.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* (c) 2026, Micro:bit Educational Foundation and contributors
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/
|
|
6
|
-
import { defineSlotRecipe } from "@pandacss/dev";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Field slot recipe — Chakra's FormControl parts (FormLabel/FormHelperText/
|
|
10
|
-
* FormErrorMessage, light mode). Consumed by the shared-ui TextField, which
|
|
11
|
-
* maps the slots onto react-aria-components' TextField/Label/Text/FieldError;
|
|
12
|
-
* the input itself is styled by the `input` recipe (Input.recipe.ts).
|
|
13
|
-
*
|
|
14
|
-
* Registered in the base preset (base-preset.ts). No variants, so it
|
|
15
|
-
* needs no `staticCss` entry.
|
|
16
|
-
*/
|
|
17
|
-
export const field = defineSlotRecipe({
|
|
18
|
-
className: "field",
|
|
19
|
-
slots: ["root", "label", "requiredIndicator", "helperText", "errorMessage"],
|
|
20
|
-
base: {
|
|
21
|
-
root: {
|
|
22
|
-
display: "flex",
|
|
23
|
-
flexDirection: "column",
|
|
24
|
-
alignItems: "stretch",
|
|
25
|
-
width: "100%",
|
|
26
|
-
},
|
|
27
|
-
label: {
|
|
28
|
-
display: "block",
|
|
29
|
-
fontSize: "md",
|
|
30
|
-
fontWeight: "medium",
|
|
31
|
-
marginEnd: "3",
|
|
32
|
-
mb: "2",
|
|
33
|
-
"&[data-disabled]": { opacity: 0.4 },
|
|
34
|
-
},
|
|
35
|
-
requiredIndicator: {
|
|
36
|
-
marginStart: "1",
|
|
37
|
-
color: "danger.500",
|
|
38
|
-
},
|
|
39
|
-
helperText: {
|
|
40
|
-
// RAC's Text renders a span, and RadioGroup/CheckboxGroup roots are not
|
|
41
|
-
// flex containers to blockify it, where an inline box would drop the
|
|
42
|
-
// margin below (gotcha #44).
|
|
43
|
-
display: "block",
|
|
44
|
-
mt: "2",
|
|
45
|
-
fontSize: "sm",
|
|
46
|
-
lineHeight: "normal",
|
|
47
|
-
color: "gray.600",
|
|
48
|
-
},
|
|
49
|
-
errorMessage: {
|
|
50
|
-
display: "flex",
|
|
51
|
-
alignItems: "center",
|
|
52
|
-
mt: "2",
|
|
53
|
-
fontSize: "sm",
|
|
54
|
-
lineHeight: "normal",
|
|
55
|
-
color: "danger.500",
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
});
|