@tpc-mare/mare-ui-components-react 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/dist/.storybook/main.d.ts +3 -0
- package/dist/.storybook/manager.d.ts +1 -0
- package/dist/.storybook/preview.d.ts +3 -0
- package/dist/button/Button.d.ts +2 -0
- package/dist/button/Button.types.d.ts +18 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +4 -0
- package/dist/checkbox/Checkbox.d.ts +2 -0
- package/dist/checkbox/Checkbox.types.d.ts +69 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +4 -0
- package/dist/combobox/Combobox.d.ts +13 -0
- package/dist/combobox/Combobox.types.d.ts +16 -0
- package/dist/combobox/index.d.ts +2 -0
- package/dist/combobox/index.js +4 -0
- package/dist/dialog/Dialog.d.ts +2 -0
- package/dist/dialog/Dialog.types.d.ts +55 -0
- package/dist/dialog/DialogFooter.d.ts +2 -0
- package/dist/dialog/DialogHeader.d.ts +2 -0
- package/dist/dialog/index.d.ts +4 -0
- package/dist/dialog/index.js +6 -0
- package/dist/index/index.d.ts +24 -0
- package/dist/index/index.js +33 -0
- package/dist/input-number/InputNumber.d.ts +2 -0
- package/dist/input-number/InputNumber.types.d.ts +30 -0
- package/dist/input-number/index.d.ts +2 -0
- package/dist/input-number/index.js +4 -0
- package/dist/input-text/CharacterCount.d.ts +5 -0
- package/dist/input-text/FloatLabel.d.ts +6 -0
- package/dist/input-text/FormField.d.ts +8 -0
- package/dist/input-text/HelperText.d.ts +4 -0
- package/dist/input-text/IconField.d.ts +7 -0
- package/dist/input-text/InputText.d.ts +2 -0
- package/dist/input-text/InputText.types.d.ts +14 -0
- package/dist/input-text/field-layout.d.ts +6 -0
- package/dist/input-text/index.d.ts +11 -0
- package/dist/input-text/index.js +9 -0
- package/dist/progress-spinner/ProgressSpinner.d.ts +10 -0
- package/dist/progress-spinner/index.d.ts +2 -0
- package/dist/progress-spinner/index.js +4 -0
- package/dist/radio-group/RadioGroup.d.ts +2 -0
- package/dist/radio-group/RadioGroup.types.d.ts +62 -0
- package/dist/radio-group/index.d.ts +2 -0
- package/dist/radio-group/index.js +4 -0
- package/dist/select-field/SelectField.d.ts +14 -0
- package/dist/select-field/SelectField.types.d.ts +11 -0
- package/dist/select-field/index.d.ts +2 -0
- package/dist/select-field/index.js +4 -0
- package/dist/shared/Button-AfMqNCme.js +177 -0
- package/dist/shared/Checkbox-DsM70wQl.js +134 -0
- package/dist/shared/Combobox-DeUG_muZ.js +134 -0
- package/dist/shared/DialogFooter-DLWy6Mln.js +154 -0
- package/dist/shared/HelperText-D656H0Lf.js +103 -0
- package/dist/shared/InputNumber-D1KL6s55.js +62 -0
- package/dist/shared/ProgressSpinner-B-lrS-tu.js +35 -0
- package/dist/shared/RadioGroup-lw27DCoV.js +133 -0
- package/dist/shared/SelectField-BSTmWjYy.js +118 -0
- package/dist/shared/Switch-D6E2OmgE.js +104 -0
- package/dist/shared/Tabs-BqIorZYD.js +66 -0
- package/dist/shared/Textarea-0XAczkH1.js +40 -0
- package/dist/shared/field-layout-BXKpp5E_.js +49 -0
- package/dist/shared/icons-DeVfnVLm.js +37 -0
- package/dist/shared/icons.d.ts +7 -0
- package/dist/switch/Switch.d.ts +2 -0
- package/dist/switch/Switch.types.d.ts +59 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +4 -0
- package/dist/tabs/Tabs.d.ts +10 -0
- package/dist/tabs/Tabs.types.d.ts +7 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +4 -0
- package/dist/textarea/Textarea.d.ts +2 -0
- package/dist/textarea/Textarea.types.d.ts +15 -0
- package/dist/textarea/index.d.ts +2 -0
- package/dist/textarea/index.js +4 -0
- package/dist/themes/baglioni-resorts.css +1 -0
- package/dist/themes/baglioni.css +1 -0
- package/dist/themes/le-blanc.css +1 -0
- package/dist/themes/palace.css +1 -0
- package/dist/themes/the-palace-company.css +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +73 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ButtonSeverity, ButtonSize, ButtonVariant, IconPosition } from '@tpc-development/mare-ui-components-core/button';
|
|
3
|
+
export type { ButtonSeverity, ButtonSize, ButtonVariant, IconPosition, } from '@tpc-development/mare-ui-components-core/button';
|
|
4
|
+
type ForwardedNativeProperties = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style' | 'children' | 'color'>;
|
|
5
|
+
export interface ButtonProperties extends ForwardedNativeProperties {
|
|
6
|
+
label?: string;
|
|
7
|
+
severity?: ButtonSeverity;
|
|
8
|
+
size?: ButtonSize;
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
iconOnly?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
link?: boolean;
|
|
14
|
+
linkAnimation?: boolean;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
iconPos?: IconPosition;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CheckboxSize } from '@tpc-development/mare-ui-components-core/checkbox';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type { CheckboxSize } from '@tpc-development/mare-ui-components-core/checkbox';
|
|
4
|
+
/**
|
|
5
|
+
* CheckedState can be boolean or 'indeterminate' (Ark's convention).
|
|
6
|
+
*/
|
|
7
|
+
export type CheckedState = boolean | 'indeterminate';
|
|
8
|
+
export interface CheckboxProperties {
|
|
9
|
+
/**
|
|
10
|
+
* The controlled checked state.
|
|
11
|
+
*/
|
|
12
|
+
checked?: CheckedState;
|
|
13
|
+
/**
|
|
14
|
+
* Initial checked state (uncontrolled mode).
|
|
15
|
+
*/
|
|
16
|
+
defaultChecked?: CheckedState;
|
|
17
|
+
/**
|
|
18
|
+
* Handler called when checked state changes.
|
|
19
|
+
*/
|
|
20
|
+
onCheckedChange?: (details: {
|
|
21
|
+
checked: CheckedState;
|
|
22
|
+
}) => void;
|
|
23
|
+
/**
|
|
24
|
+
* The checkbox label (can also use children).
|
|
25
|
+
*/
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Size variant.
|
|
29
|
+
* @default 'small'
|
|
30
|
+
*/
|
|
31
|
+
size?: CheckboxSize;
|
|
32
|
+
/**
|
|
33
|
+
* Disables interaction.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Marks the checkbox as invalid (red border/background).
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
invalid?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Makes the checkbox read-only.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Marks the checkbox as required for form validation.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
required?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The name attribute for form submission.
|
|
54
|
+
*/
|
|
55
|
+
name?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The value submitted with the form when checked.
|
|
58
|
+
* @default 'on'
|
|
59
|
+
*/
|
|
60
|
+
value?: string;
|
|
61
|
+
/**
|
|
62
|
+
* ID of an associated form element.
|
|
63
|
+
*/
|
|
64
|
+
form?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Unique identifier for the checkbox.
|
|
67
|
+
*/
|
|
68
|
+
id?: string;
|
|
69
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ComboboxProperties, ComboboxOptionItem } from './Combobox.types';
|
|
3
|
+
interface ComboboxReactProperties extends ComboboxProperties {
|
|
4
|
+
value?: string | null;
|
|
5
|
+
onValueChange?: (value: string | null) => void;
|
|
6
|
+
leadingIcon?: ReactNode;
|
|
7
|
+
triggerIcon?: ReactNode;
|
|
8
|
+
checkIcon?: ReactNode;
|
|
9
|
+
clearIcon?: ReactNode;
|
|
10
|
+
renderOption?: (option: ComboboxOptionItem) => ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function Combobox({ value, onValueChange, options, placeholder, searchPlaceholder, size, disabled, invalid, clearable, emptyText, label, leadingIcon, triggerIcon, checkIcon, clearIcon, renderOption, }: ComboboxReactProperties): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComboboxSize, ComboboxOptionItem } from '@tpc-development/mare-ui-components-core/combobox';
|
|
2
|
+
export type { ComboboxSize, ComboboxOptionItem, } from '@tpc-development/mare-ui-components-core/combobox';
|
|
3
|
+
export interface ComboboxProperties {
|
|
4
|
+
options: ComboboxOptionItem[];
|
|
5
|
+
/** Text shown in the trigger when nothing is selected. */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** Placeholder for the search input inside the panel. */
|
|
8
|
+
searchPlaceholder?: string;
|
|
9
|
+
size?: ComboboxSize;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
/** Show a '×' button in the trigger to clear the selected value. */
|
|
13
|
+
clearable?: boolean;
|
|
14
|
+
label?: string;
|
|
15
|
+
emptyText?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DialogProperties } from './Dialog.types';
|
|
2
|
+
export declare function Dialog({ open, onOpenChange, size, fullScreen, modal, closeOnEscape, dismissableMask, maskColor, portalContainer, header, footer, children, 'aria-label': ariaLabel, }: DialogProperties): import("react").JSX.Element;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { DialogSize, DialogFooterLayout } from '@tpc-development/mare-ui-components-core/dialog';
|
|
3
|
+
export type { DialogSize, DialogFooterLayout, } from '@tpc-development/mare-ui-components-core/dialog';
|
|
4
|
+
export interface DialogProperties {
|
|
5
|
+
/** Controlled open state. */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Change handler — receives the next open state. */
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
|
+
/** Desktop width. Mobile is always full-width regardless. @default 'medium' */
|
|
10
|
+
size?: DialogSize;
|
|
11
|
+
/** Stretches to fill the screen on mobile (no top rounding); barely
|
|
12
|
+
* changes desktop (just max-height, same as the non-fullScreen case).
|
|
13
|
+
* @default false */
|
|
14
|
+
fullScreen?: boolean;
|
|
15
|
+
/** @default true */
|
|
16
|
+
modal?: boolean;
|
|
17
|
+
/** @default true */
|
|
18
|
+
closeOnEscape?: boolean;
|
|
19
|
+
/** Close when clicking the backdrop. @default true */
|
|
20
|
+
dismissableMask?: boolean;
|
|
21
|
+
/** Overrides the backdrop's background class. @default undefined (uses the token overlay color) */
|
|
22
|
+
maskColor?: string;
|
|
23
|
+
/** Where the dialog portals to. Ark defaults to `document.body` — override
|
|
24
|
+
* this if your app scopes `data-theme` (or any other CSS custom property)
|
|
25
|
+
* to a sub-tree rather than the document root, otherwise the portaled
|
|
26
|
+
* dialog renders outside that scope and loses the tokens. */
|
|
27
|
+
portalContainer?: RefObject<HTMLElement | null>;
|
|
28
|
+
/** Typically a `<DialogHeader />`. */
|
|
29
|
+
header?: ReactNode;
|
|
30
|
+
/** Typically a `<DialogFooter>` with action buttons. */
|
|
31
|
+
footer?: ReactNode;
|
|
32
|
+
/** The scrollable body, between header and footer. */
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
/** Fallback accessible label when no title is rendered in the header. */
|
|
35
|
+
'aria-label'?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface DialogHeaderProperties {
|
|
38
|
+
title?: string;
|
|
39
|
+
/** Closes the dialog on click (matches the legacy DialogHeader: the LEFT
|
|
40
|
+
* icon always closes, regardless of which glyph it shows). @default a close (X) icon */
|
|
41
|
+
leftIcon?: ReactNode;
|
|
42
|
+
/** Does NOT close the dialog on click — wire that yourself if you need it. @default undefined (no button) */
|
|
43
|
+
rightIcon?: ReactNode;
|
|
44
|
+
onLeftIconClick?: () => void;
|
|
45
|
+
onRightIconClick?: () => void;
|
|
46
|
+
/** @default false */
|
|
47
|
+
border?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface DialogFooterProperties {
|
|
50
|
+
/** @default 'row' */
|
|
51
|
+
layout?: DialogFooterLayout;
|
|
52
|
+
/** @default false */
|
|
53
|
+
border?: boolean;
|
|
54
|
+
children?: ReactNode;
|
|
55
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { Button } from '../button';
|
|
2
|
+
export type { ButtonProperties, ButtonSeverity, ButtonSize, ButtonVariant, IconPosition, } from '../button';
|
|
3
|
+
export { SelectField } from '../select-field';
|
|
4
|
+
export type { SelectFieldProperties, SelectFieldSize, SelectOptionItem, } from '../select-field';
|
|
5
|
+
export { Combobox } from '../combobox';
|
|
6
|
+
export type { ComboboxProperties, ComboboxSize, ComboboxOptionItem, } from '../combobox';
|
|
7
|
+
export { Tabs } from '../tabs';
|
|
8
|
+
export type { TabsProperties, TabItem, TabSize } from '../tabs';
|
|
9
|
+
export { ProgressSpinner } from '../progress-spinner';
|
|
10
|
+
export type { ProgressSpinnerProperties } from '../progress-spinner';
|
|
11
|
+
export { InputText, CharacterCount, FormField, FloatLabel, IconField, HelperText, } from '../input-text';
|
|
12
|
+
export type { InputTextProperties, InputTextSize, CharacterCountProperties, } from '../input-text';
|
|
13
|
+
export { Textarea } from '../textarea';
|
|
14
|
+
export type { TextareaProperties } from '../textarea';
|
|
15
|
+
export { InputNumber } from '../input-number';
|
|
16
|
+
export type { InputNumberProperties, InputNumberSize, } from '../input-number';
|
|
17
|
+
export { Checkbox } from '../checkbox';
|
|
18
|
+
export type { CheckboxProperties, CheckboxSize, CheckedState, } from '../checkbox';
|
|
19
|
+
export { RadioGroup } from '../radio-group';
|
|
20
|
+
export type { RadioGroupProperties, RadioGroupSize, RadioGroupOrientation, RadioOptionItem, } from '../radio-group';
|
|
21
|
+
export { Switch } from '../switch';
|
|
22
|
+
export type { SwitchProperties, SwitchSize } from '../switch';
|
|
23
|
+
export { Dialog, DialogHeader, DialogFooter } from '../dialog';
|
|
24
|
+
export type { DialogProperties, DialogSize, DialogHeaderProperties, DialogFooterProperties, DialogFooterLayout, } from '../dialog';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { B as a } from "../shared/Button-AfMqNCme.js";
|
|
2
|
+
import { S as t } from "../shared/SelectField-BSTmWjYy.js";
|
|
3
|
+
import { C as p } from "../shared/Combobox-DeUG_muZ.js";
|
|
4
|
+
import { T as m } from "../shared/Tabs-BqIorZYD.js";
|
|
5
|
+
import { P as l } from "../shared/ProgressSpinner-B-lrS-tu.js";
|
|
6
|
+
import { C as b, F as n, a as C, H as F, I as u, b as T } from "../shared/HelperText-D656H0Lf.js";
|
|
7
|
+
import { T as d } from "../shared/Textarea-0XAczkH1.js";
|
|
8
|
+
import { I as S } from "../shared/InputNumber-D1KL6s55.js";
|
|
9
|
+
import { C as D } from "../shared/Checkbox-DsM70wQl.js";
|
|
10
|
+
import { R as H } from "../shared/RadioGroup-lw27DCoV.js";
|
|
11
|
+
import { S as P } from "../shared/Switch-D6E2OmgE.js";
|
|
12
|
+
import { D as k, a as w, b as G } from "../shared/DialogFooter-DLWy6Mln.js";
|
|
13
|
+
export {
|
|
14
|
+
a as Button,
|
|
15
|
+
b as CharacterCount,
|
|
16
|
+
D as Checkbox,
|
|
17
|
+
p as Combobox,
|
|
18
|
+
k as Dialog,
|
|
19
|
+
w as DialogFooter,
|
|
20
|
+
G as DialogHeader,
|
|
21
|
+
n as FloatLabel,
|
|
22
|
+
C as FormField,
|
|
23
|
+
F as HelperText,
|
|
24
|
+
u as IconField,
|
|
25
|
+
S as InputNumber,
|
|
26
|
+
T as InputText,
|
|
27
|
+
l as ProgressSpinner,
|
|
28
|
+
H as RadioGroup,
|
|
29
|
+
t as SelectField,
|
|
30
|
+
P as Switch,
|
|
31
|
+
m as Tabs,
|
|
32
|
+
d as Textarea
|
|
33
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { InputNumberProperties } from './InputNumber.types';
|
|
2
|
+
export declare function InputNumber({ value, onValueChange, size, rounded, invalid, disabled, readOnly, step, clampValueOnBlur, placeholder, id, name, min, max, formatOptions, locale, allowMouseWheel, }: InputNumberProperties): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InputNumberSize } from '@tpc-development/mare-ui-components-core/input-number';
|
|
2
|
+
export type { InputNumberSize } from '@tpc-development/mare-ui-components-core/input-number';
|
|
3
|
+
export interface InputNumberProperties {
|
|
4
|
+
/** Controlled numeric value. `null` when the field is empty. */
|
|
5
|
+
value?: number | null;
|
|
6
|
+
/** Change handler — receives the next number, or `null` when cleared. */
|
|
7
|
+
onValueChange?: (value: number | null) => void;
|
|
8
|
+
size?: InputNumberSize;
|
|
9
|
+
rounded?: boolean;
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
/** Minimum allowed value. */
|
|
17
|
+
min?: number;
|
|
18
|
+
/** Maximum allowed value. */
|
|
19
|
+
max?: number;
|
|
20
|
+
/** Step for keyboard/scrub increments. @default 1 */
|
|
21
|
+
step?: number;
|
|
22
|
+
/** Intl.NumberFormat options — currency, percent, unit, decimals, grouping. */
|
|
23
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
24
|
+
/** BCP 47 locale used for formatting/parsing. */
|
|
25
|
+
locale?: string;
|
|
26
|
+
/** Increment/decrement the value with the mouse wheel while focused. */
|
|
27
|
+
allowMouseWheel?: boolean;
|
|
28
|
+
/** Clamp the value to min/max when the field loses focus. @default true */
|
|
29
|
+
clampValueOnBlur?: boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FormFieldProperties {
|
|
3
|
+
invalid?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function FormField({ invalid, disabled, required, children, }: FormFieldProperties): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface IconFieldProperties {
|
|
3
|
+
icon: ReactNode;
|
|
4
|
+
position?: 'left' | 'right';
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function IconField({ icon, position, children, }: IconFieldProperties): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { InputTextSize } from '@tpc-development/mare-ui-components-core/input-text';
|
|
3
|
+
export type { InputTextSize } from '@tpc-development/mare-ui-components-core/input-text';
|
|
4
|
+
type ForwardedNativeProperties = Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'size' | 'className' | 'style'>;
|
|
5
|
+
export interface InputTextProperties extends ForwardedNativeProperties {
|
|
6
|
+
/** Controlled value. */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** Controlled change handler — receives the next string value. */
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
size?: InputTextSize;
|
|
11
|
+
rounded?: boolean;
|
|
12
|
+
invalid?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { InputText } from './InputText';
|
|
2
|
+
export { CharacterCount } from './CharacterCount';
|
|
3
|
+
export { FormField } from './FormField';
|
|
4
|
+
export { FloatLabel } from './FloatLabel';
|
|
5
|
+
export { IconField } from './IconField';
|
|
6
|
+
export { HelperText } from './HelperText';
|
|
7
|
+
export type { InputTextProperties, InputTextSize } from './InputText.types';
|
|
8
|
+
export type { CharacterCountProperties } from './CharacterCount';
|
|
9
|
+
export type { FormFieldProperties } from './FormField';
|
|
10
|
+
export type { FloatLabelProperties } from './FloatLabel';
|
|
11
|
+
export type { IconFieldProperties } from './IconField';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mare ProgressSpinner — React. Ark has no spinner (pure SVG + CSS), so it's
|
|
3
|
+
* Mare-owned. Identical markup to the Vue version. Dash keyframe in styles.css.
|
|
4
|
+
*/
|
|
5
|
+
export interface ProgressSpinnerProperties {
|
|
6
|
+
/** Extra classes for the <circle> (e.g. stroke color per Button severity). */
|
|
7
|
+
circleClass?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ProgressSpinner({ circleClass, className, }: ProgressSpinnerProperties): import("react").JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { RadioGroupSize, RadioGroupOrientation, RadioOptionItem } from '@tpc-development/mare-ui-components-core/radio-group';
|
|
2
|
+
export type { RadioGroupSize, RadioGroupOrientation, RadioOptionItem, } from '@tpc-development/mare-ui-components-core/radio-group';
|
|
3
|
+
export interface RadioGroupProperties {
|
|
4
|
+
/**
|
|
5
|
+
* The available options.
|
|
6
|
+
*/
|
|
7
|
+
items: RadioOptionItem[];
|
|
8
|
+
/**
|
|
9
|
+
* The controlled selected value.
|
|
10
|
+
*/
|
|
11
|
+
value?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Initial selected value (uncontrolled mode).
|
|
14
|
+
*/
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Handler called when the selected value changes.
|
|
18
|
+
*/
|
|
19
|
+
onValueChange?: (value: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Size variant.
|
|
22
|
+
* @default 'small'
|
|
23
|
+
*/
|
|
24
|
+
size?: RadioGroupSize;
|
|
25
|
+
/**
|
|
26
|
+
* Layout direction of the items.
|
|
27
|
+
* @default 'vertical'
|
|
28
|
+
*/
|
|
29
|
+
orientation?: RadioGroupOrientation;
|
|
30
|
+
/**
|
|
31
|
+
* Disables the entire group.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Marks the group as invalid (red styling).
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
invalid?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Makes the group read-only.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
readOnly?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Marks the group as required for form validation.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
required?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The name attribute for form submission.
|
|
52
|
+
*/
|
|
53
|
+
name?: string;
|
|
54
|
+
/**
|
|
55
|
+
* ID of an associated form element.
|
|
56
|
+
*/
|
|
57
|
+
form?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Unique identifier for the group.
|
|
60
|
+
*/
|
|
61
|
+
id?: string;
|
|
62
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SelectFieldProperties, SelectOptionItem } from './SelectField.types';
|
|
3
|
+
interface SelectFieldReactProperties extends SelectFieldProperties {
|
|
4
|
+
value?: string | null;
|
|
5
|
+
onValueChange?: (value: string | null) => void;
|
|
6
|
+
leadingIcon?: ReactNode;
|
|
7
|
+
indicator?: ReactNode;
|
|
8
|
+
clearIcon?: ReactNode;
|
|
9
|
+
checkIcon?: ReactNode;
|
|
10
|
+
renderValue?: (item: SelectOptionItem) => ReactNode;
|
|
11
|
+
renderOption?: (option: SelectOptionItem) => ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function SelectField({ value, onValueChange, options, placeholder, size, disabled, invalid, clearable, label, leadingIcon, indicator, clearIcon, checkIcon, renderValue, renderOption, }: SelectFieldReactProperties): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SelectFieldSize, SelectOptionItem } from '@tpc-development/mare-ui-components-core/select-field';
|
|
2
|
+
export type { SelectFieldSize, SelectOptionItem, } from '@tpc-development/mare-ui-components-core/select-field';
|
|
3
|
+
export interface SelectFieldProperties {
|
|
4
|
+
options: SelectOptionItem[];
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
size?: SelectFieldSize;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
invalid?: boolean;
|
|
9
|
+
clearable?: boolean;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|