@wirecore/wirelayer-native 0.5.0 → 0.6.1
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/README.md +7 -0
- package/dist/components/Avatar/Avatar.d.ts +3 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.js +2 -2
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Progress/Progress.d.ts +5 -2
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Progress/Progress.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +9 -6
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/llms-full.txt +27 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,10 +8,17 @@ Around 145 accessible React Native (Expo) components with the prop names of the
|
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
|
+
With npm, pnpm, Yarn or Bun:
|
|
12
|
+
|
|
11
13
|
```sh
|
|
14
|
+
npm install @wirecore/wirelayer-native uniwind tailwindcss lucide-react-native react-native-svg expo-font
|
|
12
15
|
pnpm add @wirecore/wirelayer-native uniwind tailwindcss lucide-react-native react-native-svg expo-font
|
|
16
|
+
yarn add @wirecore/wirelayer-native uniwind tailwindcss lucide-react-native react-native-svg expo-font
|
|
17
|
+
bun add @wirecore/wirelayer-native uniwind tailwindcss lucide-react-native react-native-svg expo-font
|
|
13
18
|
```
|
|
14
19
|
|
|
20
|
+
In an Expo app, `npx expo install @wirecore/wirelayer-native uniwind tailwindcss lucide-react-native react-native-svg expo-font` picks the versions that fit your SDK.
|
|
21
|
+
|
|
15
22
|
## Usage
|
|
16
23
|
|
|
17
24
|
```css
|
|
@@ -4,6 +4,8 @@ import { type IconComponent } from '../../utils/Icon.js';
|
|
|
4
4
|
export interface AvatarProps extends Omit<ViewProps, 'children'> {
|
|
5
5
|
/** Person or organisation – accessible name of the avatar and source of the initials */
|
|
6
6
|
name?: string;
|
|
7
|
+
/** Own initials instead of the ones taken from `name`, e.g. "MS" for "my-server" */
|
|
8
|
+
initials?: string;
|
|
7
9
|
/** Image URL; initials (or the icon) are shown while it loads or if it fails */
|
|
8
10
|
src?: string;
|
|
9
11
|
/** Icon shown when there is neither an image nor a name (default: user icon) */
|
|
@@ -15,5 +17,5 @@ export interface AvatarProps extends Omit<ViewProps, 'children'> {
|
|
|
15
17
|
color?: AvatarColor | 'auto';
|
|
16
18
|
}
|
|
17
19
|
/** Image, initials (from the name) or an icon – one image named by `name` for screen readers */
|
|
18
|
-
export declare function Avatar({ name, src, icon, variant, size, shape, color, className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
20
|
+
export declare function Avatar({ name, initials: ownInitials, src, icon, variant, size, shape, color, className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
19
21
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EACrB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC5D,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,0HAA0H;IAC1H,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;CAChC;AAED,gGAAgG;AAChG,wBAAgB,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,EACrB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC5D,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,0HAA0H;IAC1H,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;CAChC;AAED,gGAAgG;AAChG,wBAAgB,MAAM,CAAC,EACnB,IAAI,EACJ,QAAQ,EAAE,WAAW,EACrB,GAAG,EACH,IAAW,EACX,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACX,EAAE,WAAW,+BAwCb"}
|
|
@@ -5,13 +5,13 @@ import { useState } from 'react';
|
|
|
5
5
|
import { Image, Text, View } from 'react-native';
|
|
6
6
|
import { Icon } from '../../utils/Icon.js';
|
|
7
7
|
/** Image, initials (from the name) or an icon – one image named by `name` for screen readers */
|
|
8
|
-
export function Avatar({ name, src, icon = User, variant, size, shape, color, className, ...props }) {
|
|
8
|
+
export function Avatar({ name, initials: ownInitials, src, icon = User, variant, size, shape, color, className, ...props }) {
|
|
9
9
|
const tint = color === 'auto' ? (name ? avatarColor(name) : undefined) : color;
|
|
10
10
|
const styles = avatar({ variant, size, shape, color: tint });
|
|
11
11
|
const [loaded, setLoaded] = useState(false);
|
|
12
12
|
// A failed image falls back to the initials (or the icon) – also when the source changes later
|
|
13
13
|
const [failed, setFailed] = useState(undefined);
|
|
14
|
-
const initials = name ? getInitials(name) : '';
|
|
14
|
+
const initials = ownInitials ?? (name ? getInitials(name) : '');
|
|
15
15
|
// With a name the avatar is one image for assistive tech; without it is decorative
|
|
16
16
|
return (_jsxs(View, { ...props, className: styles.base({ class: className }), role: name ? 'img' : undefined, "aria-label": name || undefined, "aria-hidden": name ? undefined : true, children: [!loaded &&
|
|
17
17
|
(initials ? (_jsx(Text, { className: styles.label(), "aria-hidden": true, children: initials })) : (_jsx(Icon, { icon: icon, className: styles.icon() }))), src && failed !== src && (_jsx(Image, { source: { uri: src }, className: styles.image({ class: loaded ? undefined : 'absolute opacity-0' }), onLoad: () => setLoaded(true), onError: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,MAAM,EACN,WAAW,EACX,WAAW,GAKd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,IAAI,EAAsB,MAAM,qBAAqB,CAAC;
|
|
1
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AS,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAC5C,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,gBAClB,IAAI,IAAI,SAAS,iBAChB,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,aAEnC,CAAC,MAAM;gBACJ,CAAC,QAAQ,CAAC,CAAC,CAAC,CACR,KAAC,IAAI,IAAC,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,iCAC1B,QAAQ,GACN,CACV,CAAC,CAAC,CAAC,CACA,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,GAAI,CACjD,CAAC,EACL,GAAG,IAAI,MAAM,KAAK,GAAG,IAAI,CACtB,KAAC,KAAK,IACF,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EACpB,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC,EAC7E,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC7B,OAAO,EAAE,GAAG,EAAE;oBACV,SAAS,CAAC,KAAK,CAAC,CAAC;oBACjB,SAAS,CAAC,GAAG,CAAC,CAAC;gBACnB,CAAC,EACD,GAAG,EAAC,EAAE,wBAER,CACL,IACE,CACV,CAAC;AACN,CAAC"}
|
|
@@ -28,8 +28,11 @@ export interface ProgressProps extends ViewProps {
|
|
|
28
28
|
orientation?: 'horizontal' | 'vertical';
|
|
29
29
|
/** `xs`: a thin bar with small text, e.g. in a list or a status bar */
|
|
30
30
|
size?: 'xs' | 'md';
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Colour of the filled part by its state, e.g. `danger` for a failed transfer, `neutral` (grey) for a cancelled
|
|
33
|
+
* one
|
|
34
|
+
*/
|
|
35
|
+
status?: 'info' | 'success' | 'warn' | 'danger' | 'neutral';
|
|
33
36
|
/** The label only for screen readers – it still names the progress bar */
|
|
34
37
|
hideLabel?: boolean;
|
|
35
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAE1G,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAM5E,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC5C,YAAY;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mDAAmD;IACnD,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,oFAAoF;IACpF,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gDAAgD;IAChD,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,uEAAuE;IACvE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src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,EACvC,QAAQ,EACR,KAAK,EACL,OAAe,EACf,QAAgB,EAChB,WAA0B,EAC1B,IAAI,EACJ,MAAM,EACN,SAAiB,EACjB,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACX,EAAE,aAAa,+BAoJf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.js","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAmB,MAAM,oCAAoC,CAAC;AAC1G,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAC5E,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"Progress.js","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAmB,MAAM,oCAAoC,CAAC;AAC1G,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAC5E,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MA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AM,GAAG,CAAC,IAAI,CACpB,KAAC,IAAI,IAAC,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,iCAC1B,QAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAC9B,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CACZ,MAAC,IAAI,IAAa,SAAS,EAAE,KAAK,CAAC,UAAU,EAAE,aAC3C,KAAC,IAAI,IACD,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;gCACpB,KAAK,EAAE,UAAU,CAAC;oCACd,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,cAAc,CAAC,KAAK,GAAG,cAAc,CAAC,MAAM,CAAC;iCACxE,CAAC;6BACL,CAAC,GACJ,EACF,KAAC,IAAI,IAAC,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,YAAG,OAAO,CAAC,KAAK,GAAQ,KARrD,KAAK,CAST,CACV,CAAC,CAAC,CAAC,IAAI,CACX,GACE,CACV,IACE,CACV,CAAC;AACN,CAAC"}
|
|
@@ -11,12 +11,15 @@ interface RadioGroupContextValue {
|
|
|
11
11
|
}
|
|
12
12
|
/** The surrounding RadioGroup (RadioCard) */
|
|
13
13
|
export declare const useRadioGroup: () => RadioGroupContextValue;
|
|
14
|
-
/**
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* `V`: the type of the values – a union like `'ssh' | 'sftp'` or numbers (default string); `R`: whether `required` is
|
|
16
|
+
* set (then onValueChange is typed `V`, not `V | null`)
|
|
17
|
+
*/
|
|
18
|
+
export interface RadioGroupProps<V extends string | number = string, R extends boolean = false> extends ViewProps {
|
|
16
19
|
/** Selected value; numbers when the items have number values */
|
|
17
20
|
value?: V | null;
|
|
18
21
|
defaultValue?: V | null;
|
|
19
|
-
onValueChange?: (value: V | null) => void;
|
|
22
|
+
onValueChange?: (value: R extends true ? V : V | null) => void;
|
|
20
23
|
/** Visible label, also the group's accessible name */
|
|
21
24
|
label?: string;
|
|
22
25
|
orientation?: RadioGroupOrientation;
|
|
@@ -24,12 +27,12 @@ export interface RadioGroupProps<V extends string | number = string> extends Vie
|
|
|
24
27
|
columns?: number;
|
|
25
28
|
disabled?: boolean;
|
|
26
29
|
invalid?: boolean;
|
|
27
|
-
/** Shows the required mark after the label */
|
|
28
|
-
required?:
|
|
30
|
+
/** Shows the required mark after the label; onValueChange is then typed `V` (a choice is never undone) */
|
|
31
|
+
required?: R;
|
|
29
32
|
children?: ReactNode;
|
|
30
33
|
}
|
|
31
34
|
/** One choice out of several (role radiogroup) named by its label; RadioGroupItem or RadioCard inside, cards in `columns` */
|
|
32
|
-
export declare function RadioGroup<V extends string | number = string>({ value, defaultValue, onValueChange, label, orientation, columns, disabled, invalid, required, className, children, ...props }: RadioGroupProps<V>): import("react").JSX.Element;
|
|
35
|
+
export declare function RadioGroup<V extends string | number = string, R extends boolean = false>({ value, defaultValue, onValueChange, label, orientation, columns, disabled, invalid, required, className, children, ...props }: RadioGroupProps<V, R>): import("react").JSX.Element;
|
|
33
36
|
export interface RadioGroupItemProps {
|
|
34
37
|
/** Value of the option – a number makes the group's value a number */
|
|
35
38
|
value: string | number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIrE,UAAU,sBAAsB;IAC5B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,gCAAgC;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,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,6HAA6H;AAC7H,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,OAAO,GAAG,KAAK,EAAE,EACtF,KAAK,EACL,YAAmB,EACnB,aAAa,EACb,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAgB,EAChB,OAAe,EACf,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACX,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,+BAkCvB;AAED,MAAM,WAAW,mBAAmB;IAChC,sEAAsE;IACtE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAqB3F"}
|
|
@@ -13,7 +13,7 @@ const RadioGroupContext = createContext({
|
|
|
13
13
|
/** The surrounding RadioGroup (RadioCard) */
|
|
14
14
|
export const useRadioGroup = () => useContext(RadioGroupContext);
|
|
15
15
|
/** One choice out of several (role radiogroup) named by its label; RadioGroupItem or RadioCard inside, cards in `columns` */
|
|
16
|
-
export function RadioGroup({ value, defaultValue = null, onValueChange, label, orientation, columns, disabled = false, invalid = false, required
|
|
16
|
+
export function RadioGroup({ value, defaultValue = null, onValueChange, label, orientation, columns, disabled = false, invalid = false, required, className, children, ...props }) {
|
|
17
17
|
const [current, setCurrent] = useControllable(value, defaultValue, onValueChange);
|
|
18
18
|
const labelId = `${useId()}label`;
|
|
19
19
|
const styles = radioGroup({ orientation });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA8B,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAWjE,MAAM,iBAAiB,GAAG,aAAa,CAAyB;IAC5D,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;IAChB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK;CACjB,CAAC,CAAC;AAEH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA8B,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAWjE,MAAM,iBAAiB,GAAG,aAAa,CAAyB;IAC5D,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;IAChB,QAAQ,EAAE,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C,KAAC,IAAI,IAAC,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,YAAG,QAAQ,GAAQ,CAAC,CAAC,CAAC,QAAQ,IACzF,CACf,CAAC;AACN,CAAC"}
|
package/llms-full.txt
CHANGED
|
@@ -190,6 +190,7 @@ Image, initials (from the name) or an icon – one image named by `name` for scr
|
|
|
190
190
|
| Prop | Type | Description |
|
|
191
191
|
| --- | --- | --- |
|
|
192
192
|
| name? | `string` | Person or organisation – accessible name of the avatar and source of the initials |
|
|
193
|
+
| initials? | `string` | Own initials instead of the ones taken from `name`, e.g. "MS" for "my-server" |
|
|
193
194
|
| src? | `string` | Image URL; initials (or the icon) are shown while it loads or if it fails |
|
|
194
195
|
| icon? | `IconComponent` | Icon shown when there is neither an image nor a name (default: user icon) |
|
|
195
196
|
| variant? | `AvatarVariant` | |
|
|
@@ -2741,7 +2742,7 @@ Progress bar (role progressbar) named by its label, with the value as text – a
|
|
|
2741
2742
|
| animated? | `boolean` | Moving stripes – only when motion is allowed |
|
|
2742
2743
|
| orientation? | `'horizontal' \| 'vertical'` | `vertical`: the bar fills from the bottom |
|
|
2743
2744
|
| size? | `'xs' \| 'md'` | `xs`: a thin bar with small text, e.g. in a list or a status bar |
|
|
2744
|
-
| status? | `'info' \| 'success' \| 'warn' \| 'danger'` | Colour of the filled part by its state, e.g. `danger` for a failed transfer |
|
|
2745
|
+
| status? | `'info' \| 'success' \| 'warn' \| 'danger' \| 'neutral'` | Colour of the filled part by its state, e.g. `danger` for a failed transfer, `neutral` (grey) for a cancelled one |
|
|
2745
2746
|
| hideLabel? | `boolean` | The label only for screen readers – it still names the progress bar |
|
|
2746
2747
|
| barText? | `string` | Short text in the bar, e.g. "42 %", "waiting" or "failed" (a taller bar; horizontal, without segments or steps) – screen readers get it after the value |
|
|
2747
2748
|
|
|
@@ -2857,13 +2858,13 @@ One choice out of several (role radiogroup) named by its label; RadioGroupItem o
|
|
|
2857
2858
|
| --- | --- | --- |
|
|
2858
2859
|
| value? | `V \| null` | Selected value; numbers when the items have number values |
|
|
2859
2860
|
| defaultValue? | `V \| null` | |
|
|
2860
|
-
| onValueChange? | `(value: V \| null) => void` | |
|
|
2861
|
+
| onValueChange? | `(value: R extends true ? V : V \| null) => void` | |
|
|
2861
2862
|
| label? | `string` | Visible label, also the group's accessible name |
|
|
2862
2863
|
| orientation? | `RadioGroupOrientation` | |
|
|
2863
2864
|
| columns? | `number` | Cards in a grid with this many columns – for RadioCard |
|
|
2864
2865
|
| disabled? | `boolean` | |
|
|
2865
2866
|
| invalid? | `boolean` | |
|
|
2866
|
-
| required? | `
|
|
2867
|
+
| required? | `R` | Shows the required mark after the label; onValueChange is then typed `V` (a choice is never undone) |
|
|
2867
2868
|
| children? | `ReactNode` | |
|
|
2868
2869
|
|
|
2869
2870
|
### RadioGroupItem (React Native)
|
|
@@ -4100,14 +4101,17 @@ In Storybook, the **Accessibility** panel also shows the axe results of the curr
|
|
|
4100
4101
|
|
|
4101
4102
|
### Installation
|
|
4102
4103
|
|
|
4103
|
-
The packages are published on npm:
|
|
4104
|
+
The packages are published on npm – install them with npm, pnpm, Yarn or Bun:
|
|
4104
4105
|
|
|
4105
4106
|
```sh
|
|
4106
|
-
|
|
4107
|
-
pnpm add @wirecore/wirelayer-
|
|
4108
|
-
|
|
4107
|
+
npm install @wirecore/wirelayer-vue
|
|
4108
|
+
pnpm add @wirecore/wirelayer-vue
|
|
4109
|
+
yarn add @wirecore/wirelayer-vue
|
|
4110
|
+
bun add @wirecore/wirelayer-vue
|
|
4109
4111
|
```
|
|
4110
4112
|
|
|
4113
|
+
The same for `@wirecore/wirelayer-react` and `@wirecore/wirelayer-native` (React Native / Expo).
|
|
4114
|
+
|
|
4111
4115
|
### Adding the styles
|
|
4112
4116
|
|
|
4113
4117
|
Tailwind CSS v4.1 or newer is required. The library ships the theme, the fonts and the classes of the components:
|
|
@@ -4751,6 +4755,22 @@ as `pdfjs-dist` (Apache-2.0), Chart.js, Tiptap and Shiki are installed by the ap
|
|
|
4751
4755
|
numbers); `Checkbox` with a boolean model gives booleans.
|
|
4752
4756
|
- **Compact parts:** `Progress size="xs"` with `hide-label`, `bar-text` and `status`; `Alert #actions`; `mono` on text
|
|
4753
4757
|
fields; `DialogContent title-position="header"` puts the title next to the close button.
|
|
4758
|
+
- **Values that are never empty:** with `required`, `RadioGroup` and `SegmentedControl` give v-model `V` instead of
|
|
4759
|
+
`V | null`; `NativeSelect` without `placeholder` gives `V` instead of `V | ''`; `NumberInput empty-fallback="min"` or
|
|
4760
|
+
`"previous"` refills an emptied field when it is left (typed `number`). `Select empty-value=""` treats an empty string
|
|
4761
|
+
like null – the placeholder shows, clearing gives `""` back.
|
|
4762
|
+
- **Focus in dialogs and wizards:** `data-autoselect` focuses a field and selects its text when the dialog opens (e.g. a
|
|
4763
|
+
prefilled name). For content that changes while it is open, `DialogContent` exposes `focusFirst()` (React:
|
|
4764
|
+
`focusFirst(element)`), and `Wizard focus-on-step-change` moves the focus into each new step. `Wizard finish-label`
|
|
4765
|
+
names the last button; `validate` may return a text, shown as the step's error.
|
|
4766
|
+
- **Panels elsewhere:** `TabsTrigger controls="pane-id"` points a tab at a pane outside the Tabs (`:controls="null"`
|
|
4767
|
+
for none); `Tabs` takes `null` for "no tab selected" – the first tab stays reachable with Tab.
|
|
4768
|
+
- **Context menus by keyboard:** `@before-open` gets a second argument `{ source: 'pointer' | 'keyboard', focused }` –
|
|
4769
|
+
with Shift+F10 or the menu key `focused` is the element with the focus (e.g. the list row).
|
|
4770
|
+
- **Canvas libraries** (xterm.js, charts): `resolveTokens()` gives the token colours of the current mode and theme as hex;
|
|
4771
|
+
`useResolvedTokens()` updates when the mode, the theme or the system colour scheme changes.
|
|
4772
|
+
- **More compact parts:** `Card size="sm"` for lists in dialogs, `Progress status="neutral"` for cancelled work,
|
|
4773
|
+
`Avatar initials="MS"`, and `Code` for code in a sentence without shiki (the look of `InlineCode` from `/code`).
|
|
4754
4774
|
|
|
4755
4775
|
### Custom theme
|
|
4756
4776
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecore/wirelayer-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "WireLayer components for React Native (Expo) with Uniwind",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"@expo-google-fonts/jetbrains-mono": "^0.4.1",
|
|
120
120
|
"@expo-google-fonts/schibsted-grotesk": "^0.4.2",
|
|
121
|
-
"@wirecore/wirelayer-recipes": "^0.
|
|
122
|
-
"@wirecore/wirelayer-tokens": "^0.
|
|
121
|
+
"@wirecore/wirelayer-recipes": "^0.8.1",
|
|
122
|
+
"@wirecore/wirelayer-tokens": "^0.5.1",
|
|
123
123
|
"uqr": "^0.1.3"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|