You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.1 KiB
68 lines
2.1 KiB
// Field — eidos compound API, disciplined option C.
|
|
//
|
|
// import { Field } from '$uix/eidos/components/field';
|
|
//
|
|
// <Field required>
|
|
// <Field.Label>Email <Field.RequiredIndicator /></Field.Label>
|
|
// <Field.Control>
|
|
// <Field.Input type="email" bind:value />
|
|
// </Field.Control>
|
|
// <Field.HelperText>Use your work email.</Field.HelperText>
|
|
// <Field.ErrorText>Enter a valid email.</Field.ErrorText>
|
|
// </Field>
|
|
import FieldComponent from './field.svelte';
|
|
import Label from './field-label.svelte';
|
|
import RequiredIndicator from './field-required-indicator.svelte';
|
|
import OptionalIndicator from './field-optional-indicator.svelte';
|
|
import Control from './field-control.svelte';
|
|
import Input from './field-input.svelte';
|
|
import HelperText from './field-helper-text.svelte';
|
|
import ErrorText from './field-error-text.svelte';
|
|
import Prefix from './field-prefix.svelte';
|
|
import Suffix from './field-suffix.svelte';
|
|
|
|
type FieldNamespace = typeof FieldComponent & {
|
|
Label: typeof Label;
|
|
RequiredIndicator: typeof RequiredIndicator;
|
|
OptionalIndicator: typeof OptionalIndicator;
|
|
Control: typeof Control;
|
|
Input: typeof Input;
|
|
HelperText: typeof HelperText;
|
|
ErrorText: typeof ErrorText;
|
|
Prefix: typeof Prefix;
|
|
Suffix: typeof Suffix;
|
|
};
|
|
|
|
const Field = FieldComponent as FieldNamespace;
|
|
Field.Label = Label;
|
|
Field.RequiredIndicator = RequiredIndicator;
|
|
Field.OptionalIndicator = OptionalIndicator;
|
|
Field.Control = Control;
|
|
Field.Input = Input;
|
|
Field.HelperText = HelperText;
|
|
Field.ErrorText = ErrorText;
|
|
Field.Prefix = Prefix;
|
|
Field.Suffix = Suffix;
|
|
|
|
export { Field };
|
|
|
|
export default Field;
|
|
|
|
export type {
|
|
FieldProps,
|
|
FieldLabelProps as LabelProps,
|
|
FieldRequiredIndicatorProps as RequiredIndicatorProps,
|
|
FieldOptionalIndicatorProps as OptionalIndicatorProps,
|
|
FieldControlProps as ControlProps,
|
|
FieldInputProps as InputProps,
|
|
FieldHelperTextProps as HelperTextProps,
|
|
FieldErrorTextProps as ErrorTextProps,
|
|
FieldPrefixProps as PrefixProps,
|
|
FieldSuffixProps as SuffixProps,
|
|
FieldProviderSnippetProps as ProviderSnippetProps,
|
|
FieldSize,
|
|
FieldVariant,
|
|
FieldOrientation,
|
|
FieldColor
|
|
} from './types';
|