@arclux/arc-ui-preact 1.0.0 → 1.2.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/package.json +2 -2
- package/src/content/Card.tsx +3 -2
- package/src/content/CtaBanner.tsx +18 -0
- package/src/content/Tag.tsx +3 -2
- package/src/content/index.ts +3 -0
- package/src/index.ts +3 -0
- package/src/input/Button.tsx +4 -2
- package/src/input/Form.tsx +6 -2
- package/src/input/Input.tsx +4 -2
- package/src/layout/PageHeader.tsx +3 -2
- package/src/navigation/NavItem.tsx +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arclux/arc-ui-preact",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Preact wrappers for ARC UI Web Components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"preact": ">=10.19.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@arclux/arc-ui": "1.
|
|
47
|
+
"@arclux/arc-ui": "1.2.0"
|
|
48
48
|
},
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"keywords": [
|
package/src/content/Card.tsx
CHANGED
|
@@ -5,12 +5,13 @@ import '@arclux/arc-ui';
|
|
|
5
5
|
|
|
6
6
|
export interface CardProps {
|
|
7
7
|
href?: string;
|
|
8
|
+
_hasFooter?: string;
|
|
8
9
|
children?: preact.ComponentChildren;
|
|
9
10
|
[key: string]: unknown;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export const Card: FunctionComponent<CardProps> = ({ href, children, ...rest }) => (
|
|
13
|
-
<arc-card href={href} {...rest}>
|
|
13
|
+
export const Card: FunctionComponent<CardProps> = ({ href, _hasFooter, children, ...rest }) => (
|
|
14
|
+
<arc-card href={href} _hasFooter={_hasFooter} {...rest}>
|
|
14
15
|
{children}
|
|
15
16
|
</arc-card>
|
|
16
17
|
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Auto-generated by @arclux/prism — do not edit manually
|
|
2
|
+
|
|
3
|
+
import { type FunctionComponent } from 'preact';
|
|
4
|
+
import '@arclux/arc-ui';
|
|
5
|
+
|
|
6
|
+
export interface CtaBannerProps {
|
|
7
|
+
eyebrow?: string;
|
|
8
|
+
headline?: string;
|
|
9
|
+
nogradient?: boolean;
|
|
10
|
+
children?: preact.ComponentChildren;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const CtaBanner: FunctionComponent<CtaBannerProps> = ({ eyebrow, headline, nogradient, children, ...rest }) => (
|
|
15
|
+
<arc-cta-banner eyebrow={eyebrow} headline={headline} nogradient={nogradient} {...rest}>
|
|
16
|
+
{children}
|
|
17
|
+
</arc-cta-banner>
|
|
18
|
+
);
|
package/src/content/Tag.tsx
CHANGED
|
@@ -7,12 +7,13 @@ export interface TagProps {
|
|
|
7
7
|
variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
8
8
|
removable?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
color?: string;
|
|
10
11
|
children?: preact.ComponentChildren;
|
|
11
12
|
[key: string]: unknown;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const Tag: FunctionComponent<TagProps> = ({ variant, removable, disabled, children, ...rest }) => (
|
|
15
|
-
<arc-tag variant={variant} removable={removable} disabled={disabled} {...rest}>
|
|
15
|
+
export const Tag: FunctionComponent<TagProps> = ({ variant, removable, disabled, color, children, ...rest }) => (
|
|
16
|
+
<arc-tag variant={variant} removable={removable} disabled={disabled} color={color} {...rest}>
|
|
16
17
|
{children}
|
|
17
18
|
</arc-tag>
|
|
18
19
|
);
|
package/src/content/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -255,3 +255,6 @@ export type { MenuItemProps } from './shared/MenuItem.js';
|
|
|
255
255
|
|
|
256
256
|
export { Option } from './shared/Option.js';
|
|
257
257
|
export type { OptionProps } from './shared/Option.js';
|
|
258
|
+
|
|
259
|
+
export { CtaBanner } from './content/CtaBanner.js';
|
|
260
|
+
export type { CtaBannerProps } from './content/CtaBanner.js';
|
package/src/input/Button.tsx
CHANGED
|
@@ -9,12 +9,14 @@ export interface ButtonProps {
|
|
|
9
9
|
href?: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
type?: string;
|
|
12
|
+
_hasPrefix?: string;
|
|
13
|
+
_hasSuffix?: string;
|
|
12
14
|
children?: preact.ComponentChildren;
|
|
13
15
|
[key: string]: unknown;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
export const Button: FunctionComponent<ButtonProps> = ({ variant, size, href, disabled, type, children, ...rest }) => (
|
|
17
|
-
<arc-button variant={variant} size={size} href={href} disabled={disabled} type={type} {...rest}>
|
|
18
|
+
export const Button: FunctionComponent<ButtonProps> = ({ variant, size, href, disabled, type, _hasPrefix, _hasSuffix, children, ...rest }) => (
|
|
19
|
+
<arc-button variant={variant} size={size} href={href} disabled={disabled} type={type} _hasPrefix={_hasPrefix} _hasSuffix={_hasSuffix} {...rest}>
|
|
18
20
|
{children}
|
|
19
21
|
</arc-button>
|
|
20
22
|
);
|
package/src/input/Form.tsx
CHANGED
|
@@ -7,12 +7,16 @@ export interface FormProps {
|
|
|
7
7
|
action?: string;
|
|
8
8
|
method?: string;
|
|
9
9
|
novalidate?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
errorSummary?: boolean;
|
|
13
|
+
_errors?: string;
|
|
10
14
|
children?: preact.ComponentChildren;
|
|
11
15
|
[key: string]: unknown;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
export const Form: FunctionComponent<FormProps> = ({ action, method, novalidate, children, ...rest }) => (
|
|
15
|
-
<arc-form action={action} method={method} novalidate={novalidate} {...rest}>
|
|
18
|
+
export const Form: FunctionComponent<FormProps> = ({ action, method, novalidate, loading, disabled, errorSummary, _errors, children, ...rest }) => (
|
|
19
|
+
<arc-form action={action} method={method} novalidate={novalidate} loading={loading} disabled={disabled} errorSummary={errorSummary} _errors={_errors} {...rest}>
|
|
16
20
|
{children}
|
|
17
21
|
</arc-form>
|
|
18
22
|
);
|
package/src/input/Input.tsx
CHANGED
|
@@ -13,12 +13,14 @@ export interface InputProps {
|
|
|
13
13
|
required?: boolean;
|
|
14
14
|
multiline?: boolean;
|
|
15
15
|
rows?: number;
|
|
16
|
+
_hasPrefix?: string;
|
|
17
|
+
_hasSuffix?: string;
|
|
16
18
|
children?: preact.ComponentChildren;
|
|
17
19
|
[key: string]: unknown;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export const Input: FunctionComponent<InputProps> = ({ type, name, label, placeholder, value, disabled, required, multiline, rows, children, ...rest }) => (
|
|
21
|
-
<arc-input type={type} name={name} label={label} placeholder={placeholder} value={value} disabled={disabled} required={required} multiline={multiline} rows={rows} {...rest}>
|
|
22
|
+
export const Input: FunctionComponent<InputProps> = ({ type, name, label, placeholder, value, disabled, required, multiline, rows, _hasPrefix, _hasSuffix, children, ...rest }) => (
|
|
23
|
+
<arc-input type={type} name={name} label={label} placeholder={placeholder} value={value} disabled={disabled} required={required} multiline={multiline} rows={rows} _hasPrefix={_hasPrefix} _hasSuffix={_hasSuffix} {...rest}>
|
|
22
24
|
{children}
|
|
23
25
|
</arc-input>
|
|
24
26
|
);
|
|
@@ -6,12 +6,13 @@ import '@arclux/arc-ui';
|
|
|
6
6
|
export interface PageHeaderProps {
|
|
7
7
|
heading?: string;
|
|
8
8
|
description?: string;
|
|
9
|
+
border?: boolean;
|
|
9
10
|
children?: preact.ComponentChildren;
|
|
10
11
|
[key: string]: unknown;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const PageHeader: FunctionComponent<PageHeaderProps> = ({ heading, description, children, ...rest }) => (
|
|
14
|
-
<arc-page-header heading={heading} description={description} {...rest}>
|
|
14
|
+
export const PageHeader: FunctionComponent<PageHeaderProps> = ({ heading, description, border, children, ...rest }) => (
|
|
15
|
+
<arc-page-header heading={heading} description={description} border={border} {...rest}>
|
|
15
16
|
{children}
|
|
16
17
|
</arc-page-header>
|
|
17
18
|
);
|
|
@@ -6,13 +6,14 @@ import '@arclux/arc-ui';
|
|
|
6
6
|
export interface NavItemProps {
|
|
7
7
|
href?: string;
|
|
8
8
|
active?: boolean;
|
|
9
|
+
muted?: boolean;
|
|
9
10
|
description?: string;
|
|
10
11
|
children?: preact.ComponentChildren;
|
|
11
12
|
[key: string]: unknown;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const NavItem: FunctionComponent<NavItemProps> = ({ href, active, description, children, ...rest }) => (
|
|
15
|
-
<arc-nav-item href={href} active={active} description={description} {...rest}>
|
|
15
|
+
export const NavItem: FunctionComponent<NavItemProps> = ({ href, active, muted, description, children, ...rest }) => (
|
|
16
|
+
<arc-nav-item href={href} active={active} muted={muted} description={description} {...rest}>
|
|
16
17
|
{children}
|
|
17
18
|
</arc-nav-item>
|
|
18
19
|
);
|