@arclux/arc-ui-preact 1.3.0 → 1.5.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/Accordion.tsx +3 -2
- package/src/content/Avatar.tsx +4 -2
- package/src/content/Badge.tsx +3 -2
- package/src/content/Callout.tsx +5 -3
- package/src/content/Card.tsx +4 -2
- package/src/content/Divider.tsx +3 -2
- package/src/content/Skeleton.tsx +3 -2
- package/src/content/Stat.tsx +4 -2
- package/src/content/Tag.tsx +3 -2
- package/src/feedback/Alert.tsx +4 -3
- package/src/feedback/Modal.tsx +3 -2
- package/src/feedback/Progress.tsx +3 -2
- package/src/input/Button.tsx +3 -2
- package/src/input/Checkbox.tsx +3 -2
- package/src/input/Input.tsx +4 -2
- package/src/input/RadioGroup.tsx +3 -2
- package/src/input/Select.tsx +4 -2
- package/src/input/Textarea.tsx +4 -2
- package/src/input/Toggle.tsx +3 -2
- package/src/layout/Container.tsx +4 -2
- package/src/navigation/Breadcrumb.tsx +3 -2
- package/src/navigation/Footer.tsx +3 -2
- package/src/navigation/Link.tsx +3 -2
- package/src/navigation/Pagination.tsx +3 -2
- package/src/navigation/Sidebar.tsx +3 -2
- package/src/navigation/Tabs.tsx +4 -2
- package/src/navigation/TopBar.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.5.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.5.0"
|
|
48
48
|
},
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"keywords": [
|
|
@@ -4,14 +4,15 @@ import { type FunctionComponent } from 'preact';
|
|
|
4
4
|
import '@arclux/arc-ui';
|
|
5
5
|
|
|
6
6
|
export interface AccordionProps {
|
|
7
|
+
multiple?: boolean;
|
|
7
8
|
_items?: string;
|
|
8
9
|
_openItems?: string;
|
|
9
10
|
children?: preact.ComponentChildren;
|
|
10
11
|
[key: string]: unknown;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const Accordion: FunctionComponent<AccordionProps> = ({ _items, _openItems, children, ...rest }) => (
|
|
14
|
-
<arc-accordion _items={_items} _openItems={_openItems} {...rest}>
|
|
14
|
+
export const Accordion: FunctionComponent<AccordionProps> = ({ multiple, _items, _openItems, children, ...rest }) => (
|
|
15
|
+
<arc-accordion multiple={multiple} _items={_items} _openItems={_openItems} {...rest}>
|
|
15
16
|
{children}
|
|
16
17
|
</arc-accordion>
|
|
17
18
|
);
|
package/src/content/Avatar.tsx
CHANGED
|
@@ -7,12 +7,14 @@ export interface AvatarProps {
|
|
|
7
7
|
src?: string;
|
|
8
8
|
name?: string;
|
|
9
9
|
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
shape?: 'square' | 'rounded';
|
|
11
|
+
status?: 'online' | 'offline' | 'busy' | 'away';
|
|
10
12
|
children?: preact.ComponentChildren;
|
|
11
13
|
[key: string]: unknown;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
export const Avatar: FunctionComponent<AvatarProps> = ({ src, name, size, children, ...rest }) => (
|
|
15
|
-
<arc-avatar src={src} name={name} size={size} {...rest}>
|
|
16
|
+
export const Avatar: FunctionComponent<AvatarProps> = ({ src, name, size, shape, status, children, ...rest }) => (
|
|
17
|
+
<arc-avatar src={src} name={name} size={size} shape={shape} status={status} {...rest}>
|
|
16
18
|
{children}
|
|
17
19
|
</arc-avatar>
|
|
18
20
|
);
|
package/src/content/Badge.tsx
CHANGED
|
@@ -5,13 +5,14 @@ import '@arclux/arc-ui';
|
|
|
5
5
|
|
|
6
6
|
export interface BadgeProps {
|
|
7
7
|
variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
8
|
+
size?: 'sm' | 'lg';
|
|
8
9
|
color?: string;
|
|
9
10
|
children?: preact.ComponentChildren;
|
|
10
11
|
[key: string]: unknown;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const Badge: FunctionComponent<BadgeProps> = ({ variant, color, children, ...rest }) => (
|
|
14
|
-
<arc-badge variant={variant} color={color} {...rest}>
|
|
14
|
+
export const Badge: FunctionComponent<BadgeProps> = ({ variant, size, color, children, ...rest }) => (
|
|
15
|
+
<arc-badge variant={variant} size={size} color={color} {...rest}>
|
|
15
16
|
{children}
|
|
16
17
|
</arc-badge>
|
|
17
18
|
);
|
package/src/content/Callout.tsx
CHANGED
|
@@ -4,13 +4,15 @@ import { type FunctionComponent } from 'preact';
|
|
|
4
4
|
import '@arclux/arc-ui';
|
|
5
5
|
|
|
6
6
|
export interface CalloutProps {
|
|
7
|
-
variant?:
|
|
7
|
+
variant?: string;
|
|
8
|
+
dismissible?: boolean;
|
|
9
|
+
_dismissed?: string;
|
|
8
10
|
children?: preact.ComponentChildren;
|
|
9
11
|
[key: string]: unknown;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
export const Callout: FunctionComponent<CalloutProps> = ({ variant, children, ...rest }) => (
|
|
13
|
-
<arc-callout variant={variant} {...rest}>
|
|
14
|
+
export const Callout: FunctionComponent<CalloutProps> = ({ variant, dismissible, _dismissed, children, ...rest }) => (
|
|
15
|
+
<arc-callout variant={variant} dismissible={dismissible} _dismissed={_dismissed} {...rest}>
|
|
14
16
|
{children}
|
|
15
17
|
</arc-callout>
|
|
16
18
|
);
|
package/src/content/Card.tsx
CHANGED
|
@@ -5,13 +5,15 @@ import '@arclux/arc-ui';
|
|
|
5
5
|
|
|
6
6
|
export interface CardProps {
|
|
7
7
|
href?: string;
|
|
8
|
+
padding?: 'none' | 'sm' | 'lg';
|
|
9
|
+
interactive?: boolean;
|
|
8
10
|
_hasFooter?: string;
|
|
9
11
|
children?: preact.ComponentChildren;
|
|
10
12
|
[key: string]: unknown;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
export const Card: FunctionComponent<CardProps> = ({ href, _hasFooter, children, ...rest }) => (
|
|
14
|
-
<arc-card href={href} _hasFooter={_hasFooter} {...rest}>
|
|
15
|
+
export const Card: FunctionComponent<CardProps> = ({ href, padding, interactive, _hasFooter, children, ...rest }) => (
|
|
16
|
+
<arc-card href={href} padding={padding} interactive={interactive} _hasFooter={_hasFooter} {...rest}>
|
|
15
17
|
{children}
|
|
16
18
|
</arc-card>
|
|
17
19
|
);
|
package/src/content/Divider.tsx
CHANGED
|
@@ -7,12 +7,13 @@ export interface DividerProps {
|
|
|
7
7
|
variant?: 'subtle' | 'glow' | 'line-white' | 'line-primary' | 'line-gradient';
|
|
8
8
|
align?: 'left' | 'right';
|
|
9
9
|
vertical?: boolean;
|
|
10
|
+
label?: string;
|
|
10
11
|
children?: preact.ComponentChildren;
|
|
11
12
|
[key: string]: unknown;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const Divider: FunctionComponent<DividerProps> = ({ variant, align, vertical, children, ...rest }) => (
|
|
15
|
-
<arc-divider variant={variant} align={align} vertical={vertical} {...rest}>
|
|
15
|
+
export const Divider: FunctionComponent<DividerProps> = ({ variant, align, vertical, label, children, ...rest }) => (
|
|
16
|
+
<arc-divider variant={variant} align={align} vertical={vertical} label={label} {...rest}>
|
|
16
17
|
{children}
|
|
17
18
|
</arc-divider>
|
|
18
19
|
);
|
package/src/content/Skeleton.tsx
CHANGED
|
@@ -7,12 +7,13 @@ export interface SkeletonProps {
|
|
|
7
7
|
variant?: 'text' | 'circle' | 'rect';
|
|
8
8
|
width?: string;
|
|
9
9
|
height?: string;
|
|
10
|
+
count?: number;
|
|
10
11
|
children?: preact.ComponentChildren;
|
|
11
12
|
[key: string]: unknown;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const Skeleton: FunctionComponent<SkeletonProps> = ({ variant, width, height, children, ...rest }) => (
|
|
15
|
-
<arc-skeleton variant={variant} width={width} height={height} {...rest}>
|
|
15
|
+
export const Skeleton: FunctionComponent<SkeletonProps> = ({ variant, width, height, count, children, ...rest }) => (
|
|
16
|
+
<arc-skeleton variant={variant} width={width} height={height} count={count} {...rest}>
|
|
16
17
|
{children}
|
|
17
18
|
</arc-skeleton>
|
|
18
19
|
);
|
package/src/content/Stat.tsx
CHANGED
|
@@ -6,12 +6,14 @@ import '@arclux/arc-ui';
|
|
|
6
6
|
export interface StatProps {
|
|
7
7
|
value?: string;
|
|
8
8
|
label?: string;
|
|
9
|
+
trend?: 'up' | 'down' | 'neutral';
|
|
10
|
+
change?: string;
|
|
9
11
|
children?: preact.ComponentChildren;
|
|
10
12
|
[key: string]: unknown;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
export const Stat: FunctionComponent<StatProps> = ({ value, label, children, ...rest }) => (
|
|
14
|
-
<arc-stat value={value} label={label} {...rest}>
|
|
15
|
+
export const Stat: FunctionComponent<StatProps> = ({ value, label, trend, change, children, ...rest }) => (
|
|
16
|
+
<arc-stat value={value} label={label} trend={trend} change={change} {...rest}>
|
|
15
17
|
{children}
|
|
16
18
|
</arc-stat>
|
|
17
19
|
);
|
package/src/content/Tag.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import '@arclux/arc-ui';
|
|
|
5
5
|
|
|
6
6
|
export interface TagProps {
|
|
7
7
|
variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
8
|
+
size?: 'sm' | 'lg';
|
|
8
9
|
removable?: boolean;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
color?: string;
|
|
@@ -12,8 +13,8 @@ export interface TagProps {
|
|
|
12
13
|
[key: string]: unknown;
|
|
13
14
|
}
|
|
14
15
|
|
|
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
|
+
export const Tag: FunctionComponent<TagProps> = ({ variant, size, removable, disabled, color, children, ...rest }) => (
|
|
17
|
+
<arc-tag variant={variant} size={size} removable={removable} disabled={disabled} color={color} {...rest}>
|
|
17
18
|
{children}
|
|
18
19
|
</arc-tag>
|
|
19
20
|
);
|
package/src/feedback/Alert.tsx
CHANGED
|
@@ -4,15 +4,16 @@ import { type FunctionComponent } from 'preact';
|
|
|
4
4
|
import '@arclux/arc-ui';
|
|
5
5
|
|
|
6
6
|
export interface AlertProps {
|
|
7
|
-
variant?:
|
|
7
|
+
variant?: string;
|
|
8
|
+
compact?: boolean;
|
|
8
9
|
dismissible?: boolean;
|
|
9
10
|
heading?: string;
|
|
10
11
|
children?: preact.ComponentChildren;
|
|
11
12
|
[key: string]: unknown;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const Alert: FunctionComponent<AlertProps> = ({ variant, dismissible, heading, children, ...rest }) => (
|
|
15
|
-
<arc-alert variant={variant} dismissible={dismissible} heading={heading} {...rest}>
|
|
15
|
+
export const Alert: FunctionComponent<AlertProps> = ({ variant, compact, dismissible, heading, children, ...rest }) => (
|
|
16
|
+
<arc-alert variant={variant} compact={compact} dismissible={dismissible} heading={heading} {...rest}>
|
|
16
17
|
{children}
|
|
17
18
|
</arc-alert>
|
|
18
19
|
);
|
package/src/feedback/Modal.tsx
CHANGED
|
@@ -7,13 +7,14 @@ export interface ModalProps {
|
|
|
7
7
|
open?: boolean;
|
|
8
8
|
heading?: string;
|
|
9
9
|
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
fullscreen?: boolean;
|
|
10
11
|
closable?: boolean;
|
|
11
12
|
children?: preact.ComponentChildren;
|
|
12
13
|
[key: string]: unknown;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export const Modal: FunctionComponent<ModalProps> = ({ open, heading, size, closable, children, ...rest }) => (
|
|
16
|
-
<arc-modal open={open} heading={heading} size={size} closable={closable} {...rest}>
|
|
16
|
+
export const Modal: FunctionComponent<ModalProps> = ({ open, heading, size, fullscreen, closable, children, ...rest }) => (
|
|
17
|
+
<arc-modal open={open} heading={heading} size={size} fullscreen={fullscreen} closable={closable} {...rest}>
|
|
17
18
|
{children}
|
|
18
19
|
</arc-modal>
|
|
19
20
|
);
|
|
@@ -8,13 +8,14 @@ export interface ProgressProps {
|
|
|
8
8
|
variant?: string;
|
|
9
9
|
size?: 'sm' | 'md' | 'lg';
|
|
10
10
|
indeterminate?: boolean;
|
|
11
|
+
showValue?: boolean;
|
|
11
12
|
label?: string;
|
|
12
13
|
children?: preact.ComponentChildren;
|
|
13
14
|
[key: string]: unknown;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export const Progress: FunctionComponent<ProgressProps> = ({ value, variant, size, indeterminate, label, children, ...rest }) => (
|
|
17
|
-
<arc-progress value={value} variant={variant} size={size} indeterminate={indeterminate} label={label} {...rest}>
|
|
17
|
+
export const Progress: FunctionComponent<ProgressProps> = ({ value, variant, size, indeterminate, showValue, label, children, ...rest }) => (
|
|
18
|
+
<arc-progress value={value} variant={variant} size={size} indeterminate={indeterminate} showValue={showValue} label={label} {...rest}>
|
|
18
19
|
{children}
|
|
19
20
|
</arc-progress>
|
|
20
21
|
);
|
package/src/input/Button.tsx
CHANGED
|
@@ -8,6 +8,7 @@ export interface ButtonProps {
|
|
|
8
8
|
size?: 'sm' | 'md' | 'lg';
|
|
9
9
|
href?: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
loading?: boolean;
|
|
11
12
|
type?: string;
|
|
12
13
|
_hasPrefix?: string;
|
|
13
14
|
_hasSuffix?: string;
|
|
@@ -15,8 +16,8 @@ export interface ButtonProps {
|
|
|
15
16
|
[key: string]: unknown;
|
|
16
17
|
}
|
|
17
18
|
|
|
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}>
|
|
19
|
+
export const Button: FunctionComponent<ButtonProps> = ({ variant, size, href, disabled, loading, type, _hasPrefix, _hasSuffix, children, ...rest }) => (
|
|
20
|
+
<arc-button variant={variant} size={size} href={href} disabled={disabled} loading={loading} type={type} _hasPrefix={_hasPrefix} _hasSuffix={_hasSuffix} {...rest}>
|
|
20
21
|
{children}
|
|
21
22
|
</arc-button>
|
|
22
23
|
);
|
package/src/input/Checkbox.tsx
CHANGED
|
@@ -7,6 +7,7 @@ export interface CheckboxProps {
|
|
|
7
7
|
checked?: boolean;
|
|
8
8
|
indeterminate?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
size?: 'sm' | 'lg';
|
|
10
11
|
label?: string;
|
|
11
12
|
name?: string;
|
|
12
13
|
value?: string;
|
|
@@ -14,8 +15,8 @@ export interface CheckboxProps {
|
|
|
14
15
|
[key: string]: unknown;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
export const Checkbox: FunctionComponent<CheckboxProps> = ({ checked, indeterminate, disabled, label, name, value, children, ...rest }) => (
|
|
18
|
-
<arc-checkbox checked={checked} indeterminate={indeterminate} disabled={disabled} label={label} name={name} value={value} {...rest}>
|
|
18
|
+
export const Checkbox: FunctionComponent<CheckboxProps> = ({ checked, indeterminate, disabled, size, label, name, value, children, ...rest }) => (
|
|
19
|
+
<arc-checkbox checked={checked} indeterminate={indeterminate} disabled={disabled} size={size} label={label} name={name} value={value} {...rest}>
|
|
19
20
|
{children}
|
|
20
21
|
</arc-checkbox>
|
|
21
22
|
);
|
package/src/input/Input.tsx
CHANGED
|
@@ -11,6 +11,8 @@ export interface InputProps {
|
|
|
11
11
|
value?: string;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
required?: boolean;
|
|
14
|
+
error?: string;
|
|
15
|
+
size?: 'sm' | 'lg';
|
|
14
16
|
multiline?: boolean;
|
|
15
17
|
rows?: number;
|
|
16
18
|
_hasPrefix?: string;
|
|
@@ -19,8 +21,8 @@ export interface InputProps {
|
|
|
19
21
|
[key: string]: unknown;
|
|
20
22
|
}
|
|
21
23
|
|
|
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}>
|
|
24
|
+
export const Input: FunctionComponent<InputProps> = ({ type, name, label, placeholder, value, disabled, required, error, size, multiline, rows, _hasPrefix, _hasSuffix, children, ...rest }) => (
|
|
25
|
+
<arc-input type={type} name={name} label={label} placeholder={placeholder} value={value} disabled={disabled} required={required} error={error} size={size} multiline={multiline} rows={rows} _hasPrefix={_hasPrefix} _hasSuffix={_hasSuffix} {...rest}>
|
|
24
26
|
{children}
|
|
25
27
|
</arc-input>
|
|
26
28
|
);
|
package/src/input/RadioGroup.tsx
CHANGED
|
@@ -7,14 +7,15 @@ export interface RadioGroupProps {
|
|
|
7
7
|
value?: string;
|
|
8
8
|
name?: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
size?: 'sm' | 'lg';
|
|
10
11
|
orientation?: 'horizontal';
|
|
11
12
|
_radios?: string;
|
|
12
13
|
children?: preact.ComponentChildren;
|
|
13
14
|
[key: string]: unknown;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export const RadioGroup: FunctionComponent<RadioGroupProps> = ({ value, name, disabled, orientation, _radios, children, ...rest }) => (
|
|
17
|
-
<arc-radio-group value={value} name={name} disabled={disabled} orientation={orientation} _radios={_radios} {...rest}>
|
|
17
|
+
export const RadioGroup: FunctionComponent<RadioGroupProps> = ({ value, name, disabled, size, orientation, _radios, children, ...rest }) => (
|
|
18
|
+
<arc-radio-group value={value} name={name} disabled={disabled} size={size} orientation={orientation} _radios={_radios} {...rest}>
|
|
18
19
|
{children}
|
|
19
20
|
</arc-radio-group>
|
|
20
21
|
);
|
package/src/input/Select.tsx
CHANGED
|
@@ -9,14 +9,16 @@ export interface SelectProps {
|
|
|
9
9
|
label?: string;
|
|
10
10
|
name?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
+
size?: 'sm' | 'lg';
|
|
13
|
+
error?: string;
|
|
12
14
|
open?: boolean;
|
|
13
15
|
_options?: string;
|
|
14
16
|
children?: preact.ComponentChildren;
|
|
15
17
|
[key: string]: unknown;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
export const Select: FunctionComponent<SelectProps> = ({ value, placeholder, label, name, disabled, open, _options, children, ...rest }) => (
|
|
19
|
-
<arc-select value={value} placeholder={placeholder} label={label} name={name} disabled={disabled} open={open} _options={_options} {...rest}>
|
|
20
|
+
export const Select: FunctionComponent<SelectProps> = ({ value, placeholder, label, name, disabled, size, error, open, _options, children, ...rest }) => (
|
|
21
|
+
<arc-select value={value} placeholder={placeholder} label={label} name={name} disabled={disabled} size={size} error={error} open={open} _options={_options} {...rest}>
|
|
20
22
|
{children}
|
|
21
23
|
</arc-select>
|
|
22
24
|
);
|
package/src/input/Textarea.tsx
CHANGED
|
@@ -12,13 +12,15 @@ export interface TextareaProps {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
readonly?: boolean;
|
|
14
14
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
15
|
+
size?: 'sm' | 'lg';
|
|
16
|
+
autoResize?: boolean;
|
|
15
17
|
error?: string;
|
|
16
18
|
children?: preact.ComponentChildren;
|
|
17
19
|
[key: string]: unknown;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export const Textarea: FunctionComponent<TextareaProps> = ({ value, placeholder, label, rows, maxlength, disabled, readonly, resize, error, children, ...rest }) => (
|
|
21
|
-
<arc-textarea value={value} placeholder={placeholder} label={label} rows={rows} maxlength={maxlength} disabled={disabled} readonly={readonly} resize={resize} error={error} {...rest}>
|
|
22
|
+
export const Textarea: FunctionComponent<TextareaProps> = ({ value, placeholder, label, rows, maxlength, disabled, readonly, resize, size, autoResize, error, children, ...rest }) => (
|
|
23
|
+
<arc-textarea value={value} placeholder={placeholder} label={label} rows={rows} maxlength={maxlength} disabled={disabled} readonly={readonly} resize={resize} size={size} autoResize={autoResize} error={error} {...rest}>
|
|
22
24
|
{children}
|
|
23
25
|
</arc-textarea>
|
|
24
26
|
);
|
package/src/input/Toggle.tsx
CHANGED
|
@@ -6,14 +6,15 @@ import '@arclux/arc-ui';
|
|
|
6
6
|
export interface ToggleProps {
|
|
7
7
|
checked?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
size?: 'sm' | 'lg';
|
|
9
10
|
label?: string;
|
|
10
11
|
name?: string;
|
|
11
12
|
children?: preact.ComponentChildren;
|
|
12
13
|
[key: string]: unknown;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export const Toggle: FunctionComponent<ToggleProps> = ({ checked, disabled, label, name, children, ...rest }) => (
|
|
16
|
-
<arc-toggle checked={checked} disabled={disabled} label={label} name={name} {...rest}>
|
|
16
|
+
export const Toggle: FunctionComponent<ToggleProps> = ({ checked, disabled, size, label, name, children, ...rest }) => (
|
|
17
|
+
<arc-toggle checked={checked} disabled={disabled} size={size} label={label} name={name} {...rest}>
|
|
17
18
|
{children}
|
|
18
19
|
</arc-toggle>
|
|
19
20
|
);
|
package/src/layout/Container.tsx
CHANGED
|
@@ -5,12 +5,14 @@ import '@arclux/arc-ui';
|
|
|
5
5
|
|
|
6
6
|
export interface ContainerProps {
|
|
7
7
|
narrow?: boolean;
|
|
8
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
9
|
+
padding?: 'none' | 'sm' | 'lg';
|
|
8
10
|
children?: preact.ComponentChildren;
|
|
9
11
|
[key: string]: unknown;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
|
-
export const Container: FunctionComponent<ContainerProps> = ({ narrow, children, ...rest }) => (
|
|
13
|
-
<arc-container narrow={narrow} {...rest}>
|
|
14
|
+
export const Container: FunctionComponent<ContainerProps> = ({ narrow, size, padding, children, ...rest }) => (
|
|
15
|
+
<arc-container narrow={narrow} size={size} padding={padding} {...rest}>
|
|
14
16
|
{children}
|
|
15
17
|
</arc-container>
|
|
16
18
|
);
|
|
@@ -4,13 +4,14 @@ import { type FunctionComponent } from 'preact';
|
|
|
4
4
|
import '@arclux/arc-ui';
|
|
5
5
|
|
|
6
6
|
export interface BreadcrumbProps {
|
|
7
|
+
separator?: string;
|
|
7
8
|
_items?: string;
|
|
8
9
|
children?: preact.ComponentChildren;
|
|
9
10
|
[key: string]: unknown;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export const Breadcrumb: FunctionComponent<BreadcrumbProps> = ({ _items, children, ...rest }) => (
|
|
13
|
-
<arc-breadcrumb _items={_items} {...rest}>
|
|
13
|
+
export const Breadcrumb: FunctionComponent<BreadcrumbProps> = ({ separator, _items, children, ...rest }) => (
|
|
14
|
+
<arc-breadcrumb separator={separator} _items={_items} {...rest}>
|
|
14
15
|
{children}
|
|
15
16
|
</arc-breadcrumb>
|
|
16
17
|
);
|
|
@@ -6,12 +6,13 @@ import '@arclux/arc-ui';
|
|
|
6
6
|
export interface FooterProps {
|
|
7
7
|
compact?: boolean;
|
|
8
8
|
border?: boolean;
|
|
9
|
+
align?: 'center';
|
|
9
10
|
children?: preact.ComponentChildren;
|
|
10
11
|
[key: string]: unknown;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const Footer: FunctionComponent<FooterProps> = ({ compact, border, children, ...rest }) => (
|
|
14
|
-
<arc-footer compact={compact} border={border} {...rest}>
|
|
14
|
+
export const Footer: FunctionComponent<FooterProps> = ({ compact, border, align, children, ...rest }) => (
|
|
15
|
+
<arc-footer compact={compact} border={border} align={align} {...rest}>
|
|
15
16
|
{children}
|
|
16
17
|
</arc-footer>
|
|
17
18
|
);
|
package/src/navigation/Link.tsx
CHANGED
|
@@ -6,14 +6,15 @@ import '@arclux/arc-ui';
|
|
|
6
6
|
export interface LinkProps {
|
|
7
7
|
href?: string;
|
|
8
8
|
variant?: 'muted' | 'nav';
|
|
9
|
+
underline?: 'always' | 'never';
|
|
9
10
|
active?: boolean;
|
|
10
11
|
external?: boolean;
|
|
11
12
|
children?: preact.ComponentChildren;
|
|
12
13
|
[key: string]: unknown;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export const Link: FunctionComponent<LinkProps> = ({ href, variant, active, external, children, ...rest }) => (
|
|
16
|
-
<arc-link href={href} variant={variant} active={active} external={external} {...rest}>
|
|
16
|
+
export const Link: FunctionComponent<LinkProps> = ({ href, variant, underline, active, external, children, ...rest }) => (
|
|
17
|
+
<arc-link href={href} variant={variant} underline={underline} active={active} external={external} {...rest}>
|
|
17
18
|
{children}
|
|
18
19
|
</arc-link>
|
|
19
20
|
);
|
|
@@ -7,12 +7,13 @@ export interface PaginationProps {
|
|
|
7
7
|
total?: number;
|
|
8
8
|
current?: number;
|
|
9
9
|
siblings?: number;
|
|
10
|
+
compact?: boolean;
|
|
10
11
|
children?: preact.ComponentChildren;
|
|
11
12
|
[key: string]: unknown;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const Pagination: FunctionComponent<PaginationProps> = ({ total, current, siblings, children, ...rest }) => (
|
|
15
|
-
<arc-pagination total={total} current={current} siblings={siblings} {...rest}>
|
|
15
|
+
export const Pagination: FunctionComponent<PaginationProps> = ({ total, current, siblings, compact, children, ...rest }) => (
|
|
16
|
+
<arc-pagination total={total} current={current} siblings={siblings} compact={compact} {...rest}>
|
|
16
17
|
{children}
|
|
17
18
|
</arc-pagination>
|
|
18
19
|
);
|
|
@@ -6,6 +6,7 @@ import '@arclux/arc-ui';
|
|
|
6
6
|
export interface SidebarProps {
|
|
7
7
|
active?: string;
|
|
8
8
|
collapsed?: boolean;
|
|
9
|
+
position?: 'right';
|
|
9
10
|
width?: string;
|
|
10
11
|
glow?: boolean;
|
|
11
12
|
_sections?: string;
|
|
@@ -13,8 +14,8 @@ export interface SidebarProps {
|
|
|
13
14
|
[key: string]: unknown;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export const Sidebar: FunctionComponent<SidebarProps> = ({ active, collapsed, width, glow, _sections, children, ...rest }) => (
|
|
17
|
-
<arc-sidebar active={active} collapsed={collapsed} width={width} glow={glow} _sections={_sections} {...rest}>
|
|
17
|
+
export const Sidebar: FunctionComponent<SidebarProps> = ({ active, collapsed, position, width, glow, _sections, children, ...rest }) => (
|
|
18
|
+
<arc-sidebar active={active} collapsed={collapsed} position={position} width={width} glow={glow} _sections={_sections} {...rest}>
|
|
18
19
|
{children}
|
|
19
20
|
</arc-sidebar>
|
|
20
21
|
);
|
package/src/navigation/Tabs.tsx
CHANGED
|
@@ -6,13 +6,15 @@ import '@arclux/arc-ui';
|
|
|
6
6
|
export interface TabsProps {
|
|
7
7
|
items?: unknown[];
|
|
8
8
|
selected?: number;
|
|
9
|
+
align?: 'center' | 'end';
|
|
10
|
+
variant?: 'pills';
|
|
9
11
|
_tabs?: string;
|
|
10
12
|
children?: preact.ComponentChildren;
|
|
11
13
|
[key: string]: unknown;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
export const Tabs: FunctionComponent<TabsProps> = ({ items, selected, _tabs, children, ...rest }) => (
|
|
15
|
-
<arc-tabs items={items} selected={selected} _tabs={_tabs} {...rest}>
|
|
16
|
+
export const Tabs: FunctionComponent<TabsProps> = ({ items, selected, align, variant, _tabs, children, ...rest }) => (
|
|
17
|
+
<arc-tabs items={items} selected={selected} align={align} variant={variant} _tabs={_tabs} {...rest}>
|
|
16
18
|
{children}
|
|
17
19
|
</arc-tabs>
|
|
18
20
|
);
|
|
@@ -9,12 +9,13 @@ export interface TopBarProps {
|
|
|
9
9
|
menuOpen?: boolean;
|
|
10
10
|
mobileMenu?: string;
|
|
11
11
|
menuPosition?: string;
|
|
12
|
+
navAlign?: string;
|
|
12
13
|
children?: preact.ComponentChildren;
|
|
13
14
|
[key: string]: unknown;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export const TopBar: FunctionComponent<TopBarProps> = ({ heading, fixed, menuOpen, mobileMenu, menuPosition, children, ...rest }) => (
|
|
17
|
-
<arc-top-bar heading={heading} fixed={fixed} menuOpen={menuOpen} mobileMenu={mobileMenu} menuPosition={menuPosition} {...rest}>
|
|
17
|
+
export const TopBar: FunctionComponent<TopBarProps> = ({ heading, fixed, menuOpen, mobileMenu, menuPosition, navAlign, children, ...rest }) => (
|
|
18
|
+
<arc-top-bar heading={heading} fixed={fixed} menuOpen={menuOpen} mobileMenu={mobileMenu} menuPosition={menuPosition} navAlign={navAlign} {...rest}>
|
|
18
19
|
{children}
|
|
19
20
|
</arc-top-bar>
|
|
20
21
|
);
|