@atomic-ui/ui-react 0.0.0-stage → 0.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/README.md CHANGED
@@ -1,3 +1,13 @@
1
- # Temporary Holding Version
1
+ # @atomic-ui/ui-react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React components for the `@atomic-ui/ui` custom elements. Each one has typed props and typed events, and sets properties on the element where React 18 would otherwise only set attributes.
4
+
5
+ ```tsx
6
+ import '@atomic-ui/ui';
7
+ import { Button, TextInput } from '@atomic-ui/ui-react';
8
+
9
+ <TextInput label="Postcode" onChange={(e) => setPostcode(e.detail.value)} />
10
+ <Button variant="primary">Continue</Button>
11
+ ```
12
+
13
+ Import `@atomic-ui/ui` once, so the custom elements are defined before React renders them.
@@ -0,0 +1,29 @@
1
+ import { type EventName } from '@lit/react';
2
+ import { ImpktButton, ImpktTextInput, ImpktSelect, ImpktCheckbox, ImpktRadioGroup, ImpktAlert, ImpktStack, ImpktCard, ImpktHeading, ImpktText, ImpktGrid, ImpktHelp } from '@atomic-ui/ui';
3
+ /** What a control reports when its value changes. */
4
+ export type ImpktChangeEvent = CustomEvent<{
5
+ value: string;
6
+ }>;
7
+ export declare const Button: import("@lit/react").ReactWebComponent<ImpktButton, {
8
+ onClick: EventName<MouseEvent>;
9
+ }>;
10
+ export declare const TextInput: import("@lit/react").ReactWebComponent<ImpktTextInput, {
11
+ onChange: EventName<ImpktChangeEvent>;
12
+ }>;
13
+ export declare const Select: import("@lit/react").ReactWebComponent<ImpktSelect, {
14
+ onChange: EventName<ImpktChangeEvent>;
15
+ }>;
16
+ export declare const Checkbox: import("@lit/react").ReactWebComponent<ImpktCheckbox, {
17
+ onChange: EventName<ImpktChangeEvent>;
18
+ }>;
19
+ export declare const RadioGroup: import("@lit/react").ReactWebComponent<ImpktRadioGroup, {
20
+ onChange: EventName<ImpktChangeEvent>;
21
+ }>;
22
+ export declare const Alert: import("@lit/react").ReactWebComponent<ImpktAlert, {}>;
23
+ export declare const Stack: import("@lit/react").ReactWebComponent<ImpktStack, {}>;
24
+ export declare const Card: import("@lit/react").ReactWebComponent<ImpktCard, {}>;
25
+ export declare const Heading: import("@lit/react").ReactWebComponent<ImpktHeading, {}>;
26
+ export declare const Text: import("@lit/react").ReactWebComponent<ImpktText, {}>;
27
+ export type { RadioOption, SelectOption, AlertTone, HelpKind } from '@atomic-ui/ui';
28
+ export declare const Grid: import("@lit/react").ReactWebComponent<ImpktGrid, {}>;
29
+ export declare const Help: import("@lit/react").ReactWebComponent<ImpktHelp, {}>;