@vireo-ai/trellis-ui 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/LICENSE +21 -0
- package/README.md +1 -0
- package/package.json +84 -0
- package/src/theme.css +536 -0
- package/trellis_ui/static/trellis_ui/css/styles.css +4382 -0
- package/trellis_ui/static/trellis_ui/js/esm/chunks/cally-TZl4LpyH.js +1134 -0
- package/trellis_ui/static/trellis_ui/js/esm/chunks/cally-TZl4LpyH.js.map +1 -0
- package/trellis_ui/static/trellis_ui/js/esm/chunks/dist-DMX3Q5Zu.js +551 -0
- package/trellis_ui/static/trellis_ui/js/esm/chunks/dist-DMX3Q5Zu.js.map +1 -0
- package/trellis_ui/static/trellis_ui/js/esm/index.js +14181 -0
- package/trellis_ui/static/trellis_ui/js/esm/index.js.map +1 -0
- package/trellis_ui/static/trellis_ui/js/index.js +10 -0
- package/types/bindings/disclosure.d.ts +3 -0
- package/types/bindings/index.d.ts +7 -0
- package/types/bindings/motion.d.ts +3 -0
- package/types/bindings/state.d.ts +3 -0
- package/types/bindings/types.d.ts +35 -0
- package/types/components/accordion/contract.d.ts +29 -0
- package/types/components/accordion/index.d.ts +44 -0
- package/types/components/action/contract.d.ts +14 -0
- package/types/components/action/index.d.ts +2 -0
- package/types/components/app/contract.d.ts +29 -0
- package/types/components/app/index.d.ts +2 -0
- package/types/components/badge/contract.d.ts +42 -0
- package/types/components/badge/index.d.ts +0 -0
- package/types/components/box/contract.d.ts +44 -0
- package/types/components/box/index.d.ts +2 -0
- package/types/components/brand/contract.d.ts +18 -0
- package/types/components/brand/index.d.ts +0 -0
- package/types/components/button/contract.d.ts +34 -0
- package/types/components/button/index.d.ts +3 -0
- package/types/components/card/contract.d.ts +56 -0
- package/types/components/card/index.d.ts +0 -0
- package/types/components/checkbox/contract.d.ts +85 -0
- package/types/components/checkbox/index.d.ts +34 -0
- package/types/components/combobox/contract.d.ts +57 -0
- package/types/components/combobox/index.d.ts +74 -0
- package/types/components/common.d.ts +61 -0
- package/types/components/date-picker/contract.d.ts +86 -0
- package/types/components/date-picker/index.d.ts +70 -0
- package/types/components/dropdown/contract.d.ts +18 -0
- package/types/components/dropdown/index.d.ts +53 -0
- package/types/components/field/contract.d.ts +67 -0
- package/types/components/field/index.d.ts +11 -0
- package/types/components/file-upload/contract.d.ts +60 -0
- package/types/components/file-upload/index.d.ts +35 -0
- package/types/components/frame/contract.d.ts +60 -0
- package/types/components/frame/index.d.ts +2 -0
- package/types/components/heading/contract.d.ts +8 -0
- package/types/components/heading/index.d.ts +0 -0
- package/types/components/image/contract.d.ts +19 -0
- package/types/components/image/index.d.ts +1 -0
- package/types/components/index.d.ts +1 -0
- package/types/components/input/contract.d.ts +49 -0
- package/types/components/input/index.d.ts +17 -0
- package/types/components/menu/contract.d.ts +34 -0
- package/types/components/menu/index.d.ts +0 -0
- package/types/components/modal/contract.d.ts +56 -0
- package/types/components/modal/index.d.ts +85 -0
- package/types/components/overlay/contract.d.ts +13 -0
- package/types/components/overlay/index.d.ts +0 -0
- package/types/components/radio/contract.d.ts +55 -0
- package/types/components/radio/index.d.ts +28 -0
- package/types/components/runtime.d.ts +35 -0
- package/types/components/scroll-area/contract.d.ts +23 -0
- package/types/components/scroll-area/index.d.ts +68 -0
- package/types/components/select/contract.d.ts +90 -0
- package/types/components/select/index.d.ts +92 -0
- package/types/components/separator/contract.d.ts +7 -0
- package/types/components/separator/index.d.ts +0 -0
- package/types/components/sidebar/contract.d.ts +66 -0
- package/types/components/sidebar/index.d.ts +106 -0
- package/types/components/slider/contract.d.ts +56 -0
- package/types/components/slider/index.d.ts +40 -0
- package/types/components/spacer/index.d.ts +0 -0
- package/types/components/stream/index.d.ts +0 -0
- package/types/components/switch/contract.d.ts +57 -0
- package/types/components/switch/index.d.ts +24 -0
- package/types/components/table/contract.d.ts +99 -0
- package/types/components/table/index.d.ts +2 -0
- package/types/components/tabs/contract.d.ts +25 -0
- package/types/components/tabs/index.d.ts +60 -0
- package/types/components/text/contract.d.ts +10 -0
- package/types/components/text/index.d.ts +0 -0
- package/types/components/textarea/contract.d.ts +22 -0
- package/types/components/textarea/index.d.ts +0 -0
- package/types/components/theme/contract.d.ts +6 -0
- package/types/components/theme/index.d.ts +0 -0
- package/types/components/toast/contract.d.ts +28 -0
- package/types/components/toast/index.d.ts +27 -0
- package/types/index.d.ts +46 -0
- package/types/motion/animate.d.ts +49 -0
- package/types/motion/index.d.ts +24 -0
- package/types/motion/presence.d.ts +34 -0
- package/types/motion/reduced-motion.d.ts +9 -0
- package/types/motion/stream.d.ts +18 -0
- package/types/motion/targets.d.ts +31 -0
- package/types/motion/view.d.ts +22 -0
- package/types/runtime/anchored-popover.d.ts +20 -0
- package/types/runtime/class-name.d.ts +9 -0
- package/types/runtime/codecs.d.ts +66 -0
- package/types/runtime/collection-navigation.d.ts +33 -0
- package/types/runtime/confirm.d.ts +18 -0
- package/types/runtime/create.d.ts +8 -0
- package/types/runtime/dismissable-layer.d.ts +8 -0
- package/types/runtime/dom.d.ts +39 -0
- package/types/runtime/form-control.d.ts +44 -0
- package/types/runtime/index.d.ts +85 -0
- package/types/runtime/manifest.d.ts +49 -0
- package/types/runtime/option-data.d.ts +5 -0
- package/types/runtime/props.d.ts +9 -0
- package/types/runtime/resizable.d.ts +36 -0
- package/types/runtime/scroll-lock.d.ts +3 -0
- package/types/runtime/stream.d.ts +47 -0
- package/types/runtime/styles.d.ts +28 -0
- package/types/runtime/theme.d.ts +17 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type Alpine from 'alpinejs';
|
|
2
|
+
import { type AnchoredPopover, type BindingObject, type TrellisAlpineComponent } from '../../runtime';
|
|
3
|
+
import type { PresenceLifecycle } from '../../motion';
|
|
4
|
+
import { type ComboboxProps } from './contract';
|
|
5
|
+
type PopoverElement = HTMLElement & {
|
|
6
|
+
showPopover?: () => void;
|
|
7
|
+
hidePopover?: () => void;
|
|
8
|
+
};
|
|
9
|
+
type ComboboxOption = {
|
|
10
|
+
el: HTMLElement;
|
|
11
|
+
id: string;
|
|
12
|
+
value: string;
|
|
13
|
+
label: string;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
selected: boolean;
|
|
16
|
+
visible: boolean;
|
|
17
|
+
};
|
|
18
|
+
type ComboboxData = {
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
query: string;
|
|
21
|
+
selectedValues: string[];
|
|
22
|
+
selectedLabels: string[];
|
|
23
|
+
activeValue: string;
|
|
24
|
+
inputId: string;
|
|
25
|
+
listboxId: string;
|
|
26
|
+
props: ComboboxProps;
|
|
27
|
+
popover: AnchoredPopover | null;
|
|
28
|
+
listboxMotion: PresenceLifecycle | null;
|
|
29
|
+
listeners: Array<() => void>;
|
|
30
|
+
observer: MutationObserver | null;
|
|
31
|
+
renderedChipsKey: string;
|
|
32
|
+
renderedHiddenInputsKey: string;
|
|
33
|
+
root: BindingObject;
|
|
34
|
+
control(): HTMLElement;
|
|
35
|
+
input(): HTMLInputElement;
|
|
36
|
+
listbox(): PopoverElement;
|
|
37
|
+
chipsEl(): HTMLElement | null;
|
|
38
|
+
hiddenInputsEl(): HTMLElement | null;
|
|
39
|
+
options(): ComboboxOption[];
|
|
40
|
+
enabledVisibleOptions(): ComboboxOption[];
|
|
41
|
+
hasSelection(): boolean;
|
|
42
|
+
hasClearValue(): boolean;
|
|
43
|
+
open(event?: Event): void;
|
|
44
|
+
close(event?: Event): void;
|
|
45
|
+
toggle(event?: Event): void;
|
|
46
|
+
clear(event?: Event): void;
|
|
47
|
+
removeValue(value: string): void;
|
|
48
|
+
selectOption(option: ComboboxOption, event?: Event): void;
|
|
49
|
+
setActive(option: ComboboxOption | null): void;
|
|
50
|
+
moveActive(delta: 1 | -1): void;
|
|
51
|
+
focusFirst(): void;
|
|
52
|
+
focusLast(): void;
|
|
53
|
+
handleInput(event: Event): void;
|
|
54
|
+
handleKeydown(event: KeyboardEvent): void;
|
|
55
|
+
handleFocusout(event: FocusEvent): void;
|
|
56
|
+
removeLastValue(event?: Event): void;
|
|
57
|
+
sync(): void;
|
|
58
|
+
syncOptions(): void;
|
|
59
|
+
syncInput(): void;
|
|
60
|
+
syncControl(): void;
|
|
61
|
+
syncListbox(): void;
|
|
62
|
+
syncHiddenInputs(): void;
|
|
63
|
+
syncChips(): void;
|
|
64
|
+
syncPosition(): void;
|
|
65
|
+
mount(): void;
|
|
66
|
+
unmount(): void;
|
|
67
|
+
setup(): void;
|
|
68
|
+
resolveOptionLabel(el: HTMLElement): string;
|
|
69
|
+
optionValue(el: HTMLElement, label: string): string;
|
|
70
|
+
};
|
|
71
|
+
declare const UiCombobox: () => TrellisAlpineComponent<ComboboxData>;
|
|
72
|
+
declare const registerCombobox: (AlpineInstance: Alpine.Alpine) => void;
|
|
73
|
+
export { registerCombobox, UiCombobox };
|
|
74
|
+
export type { ComboboxData, ComboboxOption };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare const CONTROL_SIZES: readonly ["xs", "sm", "md", "lg", "xlg"];
|
|
2
|
+
declare const CONTROL_VARIANTS: readonly ["outline", "filled"];
|
|
3
|
+
declare const ICON_VARIANTS: readonly ["outline", "solid", "mini", "micro"];
|
|
4
|
+
declare const BUTTON_TYPES: readonly ["button", "submit", "reset"];
|
|
5
|
+
declare const ALIGNMENTS: readonly ["start", "center", "end"];
|
|
6
|
+
declare const POSITIONS: readonly ["bottom", "top", "left", "right"];
|
|
7
|
+
declare const EDGE_POSITIONS: readonly ["top", "right", "bottom", "left"];
|
|
8
|
+
declare const ORIENTATIONS: readonly ["vertical", "horizontal"];
|
|
9
|
+
declare const INDICATOR_PLACEMENTS: readonly ["leading", "trailing", "center", "top-leading", "top-trailing", "bottom-leading", "bottom-trailing"];
|
|
10
|
+
declare const DEFAULT_VARIANTS: readonly ["default"];
|
|
11
|
+
declare const HEADING_LEVELS: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
12
|
+
declare const CONTROL_ROOT_CLASSES: string[];
|
|
13
|
+
declare const CONTROL_MULTILINE_ROOT_CLASSES: string[];
|
|
14
|
+
declare const CONTROL_OPEN_CLASSES: string[];
|
|
15
|
+
declare const CONTROL_SIZE_CLASSES: {
|
|
16
|
+
xs: string;
|
|
17
|
+
sm: string;
|
|
18
|
+
md: string;
|
|
19
|
+
lg: string;
|
|
20
|
+
xlg: string;
|
|
21
|
+
};
|
|
22
|
+
declare const CONTROL_MIN_SIZE_CLASSES: {
|
|
23
|
+
xs: string;
|
|
24
|
+
sm: string;
|
|
25
|
+
md: string;
|
|
26
|
+
lg: string;
|
|
27
|
+
xlg: string;
|
|
28
|
+
};
|
|
29
|
+
declare const CONTROL_MULTILINE_SIZE_CLASSES: {
|
|
30
|
+
xs: string;
|
|
31
|
+
sm: string;
|
|
32
|
+
md: string;
|
|
33
|
+
lg: string;
|
|
34
|
+
xlg: string;
|
|
35
|
+
};
|
|
36
|
+
declare const CONTROL_VARIANT_CLASSES: {
|
|
37
|
+
outline: string;
|
|
38
|
+
filled: string;
|
|
39
|
+
};
|
|
40
|
+
declare const CONTROL_INPUT_CLASSES: string[];
|
|
41
|
+
declare const CONTROL_ACTION_CLASSES: string[];
|
|
42
|
+
declare const CONTROL_NATIVE_CLASSES: string[];
|
|
43
|
+
declare const POPOVER_SURFACE_CLASSES: string[];
|
|
44
|
+
declare const INTERACTIVE_ITEM_CLASSES: string[];
|
|
45
|
+
declare const INTERACTIVE_SURFACE_CLASSES: string[];
|
|
46
|
+
declare const OPTION_ITEM_CLASSES: (string | string[])[];
|
|
47
|
+
declare const OPTION_ICON_CLASSES = "size-icon shrink-0 fill-current text-current opacity-70";
|
|
48
|
+
declare const OPTION_INDICATOR_CLASSES = "ml-auto size-icon shrink-0 fill-current text-current opacity-0 data-selected:opacity-100";
|
|
49
|
+
type ControlSize = typeof CONTROL_SIZES[number];
|
|
50
|
+
type ControlVariant = typeof CONTROL_VARIANTS[number];
|
|
51
|
+
type IconVariant = typeof ICON_VARIANTS[number];
|
|
52
|
+
type CommonButtonType = typeof BUTTON_TYPES[number];
|
|
53
|
+
type Alignment = typeof ALIGNMENTS[number];
|
|
54
|
+
type Position = typeof POSITIONS[number];
|
|
55
|
+
type EdgePosition = typeof EDGE_POSITIONS[number];
|
|
56
|
+
type Orientation = typeof ORIENTATIONS[number];
|
|
57
|
+
type IndicatorPlacement = typeof INDICATOR_PLACEMENTS[number];
|
|
58
|
+
type DefaultVariant = typeof DEFAULT_VARIANTS[number];
|
|
59
|
+
type HeadingLevel = typeof HEADING_LEVELS[number];
|
|
60
|
+
export { ALIGNMENTS, BUTTON_TYPES, CONTROL_ACTION_CLASSES, CONTROL_INPUT_CLASSES, CONTROL_MIN_SIZE_CLASSES, CONTROL_MULTILINE_ROOT_CLASSES, CONTROL_MULTILINE_SIZE_CLASSES, CONTROL_NATIVE_CLASSES, CONTROL_OPEN_CLASSES, CONTROL_ROOT_CLASSES, CONTROL_SIZES, CONTROL_SIZE_CLASSES, CONTROL_VARIANT_CLASSES, CONTROL_VARIANTS, DEFAULT_VARIANTS, EDGE_POSITIONS, HEADING_LEVELS, ICON_VARIANTS, INDICATOR_PLACEMENTS, INTERACTIVE_ITEM_CLASSES, INTERACTIVE_SURFACE_CLASSES, OPTION_ICON_CLASSES, OPTION_INDICATOR_CLASSES, OPTION_ITEM_CLASSES, ORIENTATIONS, POPOVER_SURFACE_CLASSES, POSITIONS, };
|
|
61
|
+
export type { Alignment, CommonButtonType, ControlSize, ControlVariant, DefaultVariant, EdgePosition, HeadingLevel, IconVariant, IndicatorPlacement, Orientation, Position, };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type PropState } from '../../runtime';
|
|
2
|
+
import { type Alignment, type Position } from '../common';
|
|
3
|
+
declare const DATE_PICKER_MODES: readonly ["single", "range"];
|
|
4
|
+
declare const DATE_PICKER_VARIANTS: readonly ["enhanced", "native"];
|
|
5
|
+
declare const DATE_PICKER_MOBILE: readonly ["popover", "modal", "native"];
|
|
6
|
+
declare const DATE_PICKER_CLOSE: readonly ["select", "confirm"];
|
|
7
|
+
declare const DATE_PICKER_COLORS: readonly ["neutral", "accent"];
|
|
8
|
+
declare const DATE_PICKER_PRESETS_POSITIONS: readonly ["left", "right", "top", "bottom"];
|
|
9
|
+
type DatePickerMode = typeof DATE_PICKER_MODES[number];
|
|
10
|
+
type DatePickerVariant = typeof DATE_PICKER_VARIANTS[number];
|
|
11
|
+
type DatePickerMobile = typeof DATE_PICKER_MOBILE[number];
|
|
12
|
+
type DatePickerClose = typeof DATE_PICKER_CLOSE[number];
|
|
13
|
+
type DatePickerColor = typeof DATE_PICKER_COLORS[number];
|
|
14
|
+
type DatePickerPresetsPosition = typeof DATE_PICKER_PRESETS_POSITIONS[number];
|
|
15
|
+
type DatePickerSide = Position;
|
|
16
|
+
type DatePickerAlign = Alignment;
|
|
17
|
+
type DatePickerPreset = {
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
start: string;
|
|
21
|
+
end: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
};
|
|
24
|
+
declare const datePickerSchema: {
|
|
25
|
+
name: import("../../runtime/codecs").StringCodec;
|
|
26
|
+
value: import("../../runtime/codecs").StringCodec;
|
|
27
|
+
startName: import("../../runtime/codecs").StringCodec;
|
|
28
|
+
endName: import("../../runtime/codecs").StringCodec;
|
|
29
|
+
mode: import("../../runtime/codecs").OneOfCodec<"single" | "range">;
|
|
30
|
+
placeholder: import("../../runtime/codecs").StringCodec;
|
|
31
|
+
min: import("../../runtime/codecs").StringCodec;
|
|
32
|
+
max: import("../../runtime/codecs").StringCodec;
|
|
33
|
+
today: import("../../runtime/codecs").StringCodec;
|
|
34
|
+
openTo: import("../../runtime/codecs").StringCodec;
|
|
35
|
+
forceOpenTo: import("../../runtime/codecs").BoolCodec;
|
|
36
|
+
months: import("../../runtime/codecs").NumberCodec;
|
|
37
|
+
firstDayOfWeek: import("../../runtime/codecs").NumberCodec;
|
|
38
|
+
locale: import("../../runtime/codecs").StringCodec;
|
|
39
|
+
showOutsideDays: import("../../runtime/codecs").BoolCodec;
|
|
40
|
+
showWeekNumbers: import("../../runtime/codecs").BoolCodec;
|
|
41
|
+
fixedWeeks: import("../../runtime/codecs").BoolCodec;
|
|
42
|
+
selectableHeader: import("../../runtime/codecs").BoolCodec;
|
|
43
|
+
withToday: import("../../runtime/codecs").BoolCodec;
|
|
44
|
+
clearable: import("../../runtime/codecs").BoolCodec;
|
|
45
|
+
disabled: import("../../runtime/codecs").BoolCodec;
|
|
46
|
+
readonly: import("../../runtime/codecs").BoolCodec;
|
|
47
|
+
required: import("../../runtime/codecs").BoolCodec;
|
|
48
|
+
invalid: import("../../runtime/codecs").BoolCodec;
|
|
49
|
+
side: import("../../runtime/codecs").OneOfCodec<"bottom" | "left" | "right" | "top">;
|
|
50
|
+
align: import("../../runtime/codecs").OneOfCodec<"end" | "center" | "start">;
|
|
51
|
+
offset: import("../../runtime/codecs").NumberCodec;
|
|
52
|
+
gap: import("../../runtime/codecs").NumberCodec;
|
|
53
|
+
mobile: import("../../runtime/codecs").OneOfCodec<"popover" | "modal" | "native">;
|
|
54
|
+
variant: import("../../runtime/codecs").OneOfCodec<"enhanced" | "native">;
|
|
55
|
+
color: import("../../runtime/codecs").OneOfCodec<"neutral" | "accent">;
|
|
56
|
+
close: import("../../runtime/codecs").OneOfCodec<"select" | "confirm">;
|
|
57
|
+
presets: import("../../runtime/codecs").JsonCodec<DatePickerPreset[]>;
|
|
58
|
+
presetsPosition: import("../../runtime/codecs").OneOfCodec<"bottom" | "left" | "right" | "top">;
|
|
59
|
+
preset: import("../../runtime/codecs").StringCodec;
|
|
60
|
+
presetName: import("../../runtime/codecs").StringCodec;
|
|
61
|
+
triggerClass: import("../../runtime/codecs").StringCodec;
|
|
62
|
+
inputClass: import("../../runtime/codecs").StringCodec;
|
|
63
|
+
popoverClass: import("../../runtime/codecs").StringCodec;
|
|
64
|
+
calendarClass: import("../../runtime/codecs").StringCodec;
|
|
65
|
+
presetsClass: import("../../runtime/codecs").StringCodec;
|
|
66
|
+
presetClass: import("../../runtime/codecs").StringCodec;
|
|
67
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
68
|
+
form: import("../../runtime/codecs").StringCodec;
|
|
69
|
+
};
|
|
70
|
+
declare const datePickerPresetSchema: {
|
|
71
|
+
value: import("../../runtime/codecs").StringCodec;
|
|
72
|
+
label: import("../../runtime/codecs").StringCodec;
|
|
73
|
+
start: import("../../runtime/codecs").StringCodec;
|
|
74
|
+
end: import("../../runtime/codecs").StringCodec;
|
|
75
|
+
disabled: import("../../runtime/codecs").BoolCodec;
|
|
76
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
77
|
+
};
|
|
78
|
+
declare const datePickerPresetsSchema: {
|
|
79
|
+
position: import("../../runtime/codecs").OneOfCodec<"bottom" | "left" | "right" | "top">;
|
|
80
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
81
|
+
};
|
|
82
|
+
type DatePickerProps = PropState<typeof datePickerSchema>;
|
|
83
|
+
type DatePickerPresetProps = PropState<typeof datePickerPresetSchema>;
|
|
84
|
+
type DatePickerPresetsProps = PropState<typeof datePickerPresetsSchema>;
|
|
85
|
+
export { DATE_PICKER_CLOSE, DATE_PICKER_COLORS, DATE_PICKER_MOBILE, DATE_PICKER_MODES, DATE_PICKER_PRESETS_POSITIONS, DATE_PICKER_VARIANTS, datePickerPresetSchema, datePickerPresetsSchema, datePickerSchema, };
|
|
86
|
+
export type { DatePickerAlign, DatePickerClose, DatePickerColor, DatePickerMobile, DatePickerMode, DatePickerPreset, DatePickerPresetProps, DatePickerPresetsPosition, DatePickerPresetsProps, DatePickerProps, DatePickerSide, DatePickerVariant, };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type Alpine from 'alpinejs';
|
|
2
|
+
import { type AnchoredPopover, type BindingObject, type TrellisAlpineComponent } from '../../runtime';
|
|
3
|
+
import type { PresenceLifecycle } from '../../motion';
|
|
4
|
+
import { type DatePickerPreset, type DatePickerProps } from './contract';
|
|
5
|
+
type CalendarElement = HTMLElement & {
|
|
6
|
+
readonly value: string;
|
|
7
|
+
focus: (options?: FocusOptions & {
|
|
8
|
+
target?: 'day' | 'next' | 'previous';
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
type PopoverElement = HTMLElement & {
|
|
12
|
+
showPopover?: () => void;
|
|
13
|
+
hidePopover?: () => void;
|
|
14
|
+
};
|
|
15
|
+
type DatePickerData = {
|
|
16
|
+
isOpen: boolean;
|
|
17
|
+
value: string;
|
|
18
|
+
pendingValue: string;
|
|
19
|
+
presetValue: string;
|
|
20
|
+
triggerId: string;
|
|
21
|
+
popoverId: string;
|
|
22
|
+
liveMessage: string;
|
|
23
|
+
props: DatePickerProps;
|
|
24
|
+
popover: AnchoredPopover | null;
|
|
25
|
+
popoverMotion: PresenceLifecycle | null;
|
|
26
|
+
listeners: Array<() => void>;
|
|
27
|
+
hiddenInputsKey: string;
|
|
28
|
+
presetInputKey: string;
|
|
29
|
+
root: BindingObject;
|
|
30
|
+
trigger(): HTMLElement;
|
|
31
|
+
input(): HTMLInputElement;
|
|
32
|
+
toggleButton(): HTMLButtonElement | null;
|
|
33
|
+
popoverEl(): PopoverElement;
|
|
34
|
+
calendar(): CalendarElement | null;
|
|
35
|
+
hiddenInputsEl(): HTMLElement | null;
|
|
36
|
+
presetInputsEl(): HTMLElement | null;
|
|
37
|
+
presetItems(): DatePickerPreset[];
|
|
38
|
+
isRange(): boolean;
|
|
39
|
+
closeMode(): 'select' | 'confirm';
|
|
40
|
+
displayValue(): string;
|
|
41
|
+
effectivePlaceholder(): string;
|
|
42
|
+
effectiveMonths(): number;
|
|
43
|
+
open(event?: Event): void;
|
|
44
|
+
close(event?: Event): void;
|
|
45
|
+
toggle(event?: Event): void;
|
|
46
|
+
clear(event?: Event): void;
|
|
47
|
+
cancel(event?: Event): void;
|
|
48
|
+
apply(event?: Event): void;
|
|
49
|
+
commitValue(value: string): void;
|
|
50
|
+
selectToday(event?: Event): void;
|
|
51
|
+
selectPreset(el: HTMLElement, event?: Event): void;
|
|
52
|
+
handleInput(event: Event): void;
|
|
53
|
+
handleKeydown(event: KeyboardEvent): void;
|
|
54
|
+
handleCalendarChange(event: Event): void;
|
|
55
|
+
handleCalendarFocus(event: Event): void;
|
|
56
|
+
sync(): void;
|
|
57
|
+
syncControl(): void;
|
|
58
|
+
syncCalendar(): void;
|
|
59
|
+
syncCalendarHeading(focusedDate?: string): void;
|
|
60
|
+
syncTodayButton(): void;
|
|
61
|
+
syncHiddenInputs(): void;
|
|
62
|
+
syncPresetInput(): void;
|
|
63
|
+
syncPresets(): void;
|
|
64
|
+
syncPosition(): void;
|
|
65
|
+
setup(): void;
|
|
66
|
+
};
|
|
67
|
+
declare const UiDatePicker: () => TrellisAlpineComponent<DatePickerData>;
|
|
68
|
+
declare const registerDatePicker: (AlpineInstance: Alpine.Alpine) => void;
|
|
69
|
+
export { registerDatePicker, UiDatePicker };
|
|
70
|
+
export type { DatePickerData };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PropState } from '../../runtime';
|
|
2
|
+
import { type Alignment, type Position } from '../common';
|
|
3
|
+
declare const DROPDOWN_SIDES: readonly ["bottom", "top", "left", "right"];
|
|
4
|
+
declare const DROPDOWN_ALIGNS: readonly ["start", "center", "end"];
|
|
5
|
+
type DropdownSide = Position;
|
|
6
|
+
type DropdownAlign = Alignment;
|
|
7
|
+
declare const dropdownSchema: {
|
|
8
|
+
side: import("../../runtime/codecs").OneOfCodec<"bottom" | "left" | "right" | "top">;
|
|
9
|
+
align: import("../../runtime/codecs").OneOfCodec<"end" | "center" | "start">;
|
|
10
|
+
offset: import("../../runtime/codecs").NumberCodec;
|
|
11
|
+
gap: import("../../runtime/codecs").NumberCodec;
|
|
12
|
+
open: import("../../runtime/codecs").BoolCodec;
|
|
13
|
+
disabled: import("../../runtime/codecs").BoolCodec;
|
|
14
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
15
|
+
};
|
|
16
|
+
type DropdownProps = PropState<typeof dropdownSchema>;
|
|
17
|
+
export { DROPDOWN_ALIGNS, DROPDOWN_SIDES, dropdownSchema, };
|
|
18
|
+
export type { DropdownAlign, DropdownSide, DropdownProps };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type Alpine from 'alpinejs';
|
|
2
|
+
import { type AnchoredPopover, type BindingObject, type CollectionNavigation, type TrellisAlpineComponent } from '../../runtime';
|
|
3
|
+
import type { PresenceLifecycle } from '../../motion';
|
|
4
|
+
import { type DropdownProps } from './contract';
|
|
5
|
+
type PopoverElement = HTMLElement & {
|
|
6
|
+
showPopover(): void;
|
|
7
|
+
hidePopover(): void;
|
|
8
|
+
};
|
|
9
|
+
type DropdownData = {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
menuMotion: PresenceLifecycle | null;
|
|
12
|
+
triggerId: string;
|
|
13
|
+
menuId: string;
|
|
14
|
+
props: DropdownProps;
|
|
15
|
+
collection: CollectionNavigation | null;
|
|
16
|
+
popover: AnchoredPopover | null;
|
|
17
|
+
triggerCleanup: Array<() => void>;
|
|
18
|
+
menuCleanup: Array<() => void>;
|
|
19
|
+
open(event?: Event): void;
|
|
20
|
+
close(event?: Event): void;
|
|
21
|
+
toggle(event?: Event): void;
|
|
22
|
+
focusNext(): void;
|
|
23
|
+
focusPrevious(): void;
|
|
24
|
+
focusFirst(): void;
|
|
25
|
+
focusLast(): void;
|
|
26
|
+
activateItem(el: HTMLElement): void;
|
|
27
|
+
clearActiveItem(): void;
|
|
28
|
+
root: BindingObject;
|
|
29
|
+
menu(el: HTMLElement): BindingObject;
|
|
30
|
+
menuItem(el: HTMLElement): BindingObject;
|
|
31
|
+
triggerEl(): HTMLElement;
|
|
32
|
+
menuEl(): PopoverElement;
|
|
33
|
+
allItemEls(): HTMLElement[];
|
|
34
|
+
itemEls(): HTMLElement[];
|
|
35
|
+
mount(): void;
|
|
36
|
+
unmount(): void;
|
|
37
|
+
syncFromPopover(event: ToggleEvent): void;
|
|
38
|
+
syncPosition(): void;
|
|
39
|
+
syncMenuAttributes(): void;
|
|
40
|
+
syncTriggerAttributes(): void;
|
|
41
|
+
finishClose(): void;
|
|
42
|
+
setupMenu(): void;
|
|
43
|
+
setupTrigger(): void;
|
|
44
|
+
teardownTrigger(): void;
|
|
45
|
+
teardownMenu(): void;
|
|
46
|
+
selectItem(el: HTMLElement, event: Event): void;
|
|
47
|
+
focusItem(el: HTMLElement): void;
|
|
48
|
+
collectionNav(): CollectionNavigation;
|
|
49
|
+
};
|
|
50
|
+
declare const UiDropdown: () => TrellisAlpineComponent<DropdownData>;
|
|
51
|
+
declare const registerDropdown: (AlpineInstance: Alpine.Alpine) => void;
|
|
52
|
+
export { registerDropdown, UiDropdown };
|
|
53
|
+
export type { DropdownData };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type PropState } from '../../runtime';
|
|
2
|
+
import { type Orientation } from '../common';
|
|
3
|
+
declare const FIELD_LAYOUTS: readonly ["stack", "grid", "inline"];
|
|
4
|
+
declare const FIELD_GROUP_LAYOUTS: readonly ["stack", "row", "grid"];
|
|
5
|
+
declare const FIELD_ORIENTATIONS: readonly ["vertical", "horizontal"];
|
|
6
|
+
type FieldLayout = typeof FIELD_LAYOUTS[number];
|
|
7
|
+
type FieldGroupLayout = typeof FIELD_GROUP_LAYOUTS[number];
|
|
8
|
+
type FieldOrientation = Orientation;
|
|
9
|
+
declare const fieldSchema: {
|
|
10
|
+
name: import("../../runtime/codecs").StringCodec;
|
|
11
|
+
controlId: import("../../runtime/codecs").StringCodec;
|
|
12
|
+
label: import("../../runtime/codecs").StringCodec;
|
|
13
|
+
description: import("../../runtime/codecs").StringCodec;
|
|
14
|
+
descriptionTrailing: import("../../runtime/codecs").StringCodec;
|
|
15
|
+
error: import("../../runtime/codecs").StringCodec;
|
|
16
|
+
errors: import("../../runtime/codecs").StringCodec;
|
|
17
|
+
badge: import("../../runtime/codecs").StringCodec;
|
|
18
|
+
orientation: import("../../runtime/codecs").OneOfCodec<"vertical" | "horizontal">;
|
|
19
|
+
layout: import("../../runtime/codecs").OneOfCodec<"grid" | "stack" | "inline">;
|
|
20
|
+
disabled: import("../../runtime/codecs").BoolCodec;
|
|
21
|
+
required: import("../../runtime/codecs").BoolCodec;
|
|
22
|
+
invalid: import("../../runtime/codecs").BoolCodec;
|
|
23
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
24
|
+
};
|
|
25
|
+
declare const fieldLabelSchema: {
|
|
26
|
+
controlId: import("../../runtime/codecs").StringCodec;
|
|
27
|
+
badge: import("../../runtime/codecs").StringCodec;
|
|
28
|
+
required: import("../../runtime/codecs").BoolCodec;
|
|
29
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
30
|
+
};
|
|
31
|
+
declare const fieldDescriptionSchema: {
|
|
32
|
+
id: import("../../runtime/codecs").StringCodec;
|
|
33
|
+
placement: import("../../runtime/codecs").OneOfCodec<"default" | "trailing">;
|
|
34
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
35
|
+
};
|
|
36
|
+
declare const fieldErrorSchema: {
|
|
37
|
+
id: import("../../runtime/codecs").StringCodec;
|
|
38
|
+
message: import("../../runtime/codecs").StringCodec;
|
|
39
|
+
errors: import("../../runtime/codecs").StringCodec;
|
|
40
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
41
|
+
};
|
|
42
|
+
declare const fieldGroupSchema: {
|
|
43
|
+
layout: import("../../runtime/codecs").OneOfCodec<"grid" | "stack" | "row">;
|
|
44
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
45
|
+
};
|
|
46
|
+
declare const fieldsetSchema: {
|
|
47
|
+
name: import("../../runtime/codecs").StringCodec;
|
|
48
|
+
legend: import("../../runtime/codecs").StringCodec;
|
|
49
|
+
description: import("../../runtime/codecs").StringCodec;
|
|
50
|
+
error: import("../../runtime/codecs").StringCodec;
|
|
51
|
+
errors: import("../../runtime/codecs").StringCodec;
|
|
52
|
+
layout: import("../../runtime/codecs").OneOfCodec<"grid" | "stack" | "inline">;
|
|
53
|
+
disabled: import("../../runtime/codecs").BoolCodec;
|
|
54
|
+
required: import("../../runtime/codecs").BoolCodec;
|
|
55
|
+
invalid: import("../../runtime/codecs").BoolCodec;
|
|
56
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
57
|
+
};
|
|
58
|
+
declare const fieldsetLegendSchema: {
|
|
59
|
+
badge: import("../../runtime/codecs").StringCodec;
|
|
60
|
+
required: import("../../runtime/codecs").BoolCodec;
|
|
61
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
62
|
+
};
|
|
63
|
+
type FieldProps = PropState<typeof fieldSchema>;
|
|
64
|
+
type FieldGroupProps = PropState<typeof fieldGroupSchema>;
|
|
65
|
+
type FieldsetProps = PropState<typeof fieldsetSchema>;
|
|
66
|
+
export { FIELD_GROUP_LAYOUTS, FIELD_LAYOUTS, FIELD_ORIENTATIONS, fieldDescriptionSchema, fieldErrorSchema, fieldGroupSchema, fieldLabelSchema, fieldSchema, fieldsetLegendSchema, fieldsetSchema, };
|
|
67
|
+
export type { FieldGroupLayout, FieldGroupProps, FieldLayout, FieldOrientation, FieldProps, FieldsetProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type Alpine from 'alpinejs';
|
|
2
|
+
import { type CleanupStack, type TrellisAlpineComponent } from '../../runtime';
|
|
3
|
+
type FieldData = {
|
|
4
|
+
observer: MutationObserver | null;
|
|
5
|
+
listeners: CleanupStack;
|
|
6
|
+
sync(): void;
|
|
7
|
+
};
|
|
8
|
+
declare const UiField: () => TrellisAlpineComponent<FieldData>;
|
|
9
|
+
declare const registerField: (AlpineInstance: Alpine.Alpine) => void;
|
|
10
|
+
export { registerField, UiField };
|
|
11
|
+
export type { FieldData };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type PropState } from '../../runtime';
|
|
2
|
+
declare const FILE_UPLOAD_LAYOUTS: readonly ["stack", "inline"];
|
|
3
|
+
declare const FILE_UPLOAD_PREVIEWS: readonly ["auto", "image", "none"];
|
|
4
|
+
declare const FILE_UPLOAD_SIZES: readonly ["sm", "md", "lg"];
|
|
5
|
+
type FileUploadLayout = (typeof FILE_UPLOAD_LAYOUTS)[number];
|
|
6
|
+
type FileUploadPreview = (typeof FILE_UPLOAD_PREVIEWS)[number];
|
|
7
|
+
type FileUploadSize = (typeof FILE_UPLOAD_SIZES)[number];
|
|
8
|
+
declare const fileUploadSchema: {
|
|
9
|
+
name: import("../../runtime/codecs").StringCodec;
|
|
10
|
+
accept: import("../../runtime/codecs").StringCodec;
|
|
11
|
+
capture: import("../../runtime/codecs").StringCodec;
|
|
12
|
+
multiple: import("../../runtime/codecs").BoolCodec;
|
|
13
|
+
required: import("../../runtime/codecs").BoolCodec;
|
|
14
|
+
disabled: import("../../runtime/codecs").BoolCodec;
|
|
15
|
+
invalid: import("../../runtime/codecs").BoolCodec;
|
|
16
|
+
preview: import("../../runtime/codecs").OneOfCodec<"image" | "none" | "auto">;
|
|
17
|
+
layout: import("../../runtime/codecs").OneOfCodec<"stack" | "inline">;
|
|
18
|
+
size: import("../../runtime/codecs").OneOfCodec<"sm" | "md" | "lg">;
|
|
19
|
+
heading: import("../../runtime/codecs").StringCodec;
|
|
20
|
+
text: import("../../runtime/codecs").StringCodec;
|
|
21
|
+
browseLabel: import("../../runtime/codecs").StringCodec;
|
|
22
|
+
empty: import("../../runtime/codecs").StringCodec;
|
|
23
|
+
maxItems: import("../../runtime/codecs").NumberCodec;
|
|
24
|
+
clearable: import("../../runtime/codecs").BoolCodec;
|
|
25
|
+
rootClass: import("../../runtime/codecs").StringCodec;
|
|
26
|
+
dropzoneClass: import("../../runtime/codecs").StringCodec;
|
|
27
|
+
listClass: import("../../runtime/codecs").StringCodec;
|
|
28
|
+
itemClass: import("../../runtime/codecs").StringCodec;
|
|
29
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
30
|
+
};
|
|
31
|
+
declare const fileUploadDropzoneSchema: {
|
|
32
|
+
heading: import("../../runtime/codecs").StringCodec;
|
|
33
|
+
text: import("../../runtime/codecs").StringCodec;
|
|
34
|
+
icon: import("../../runtime/codecs").StringCodec;
|
|
35
|
+
layout: import("../../runtime/codecs").OneOfCodec<"stack" | "inline">;
|
|
36
|
+
size: import("../../runtime/codecs").OneOfCodec<"sm" | "md" | "lg">;
|
|
37
|
+
disabled: import("../../runtime/codecs").BoolCodec;
|
|
38
|
+
invalid: import("../../runtime/codecs").BoolCodec;
|
|
39
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
40
|
+
};
|
|
41
|
+
declare const fileUploadListSchema: {
|
|
42
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
43
|
+
};
|
|
44
|
+
declare const fileUploadItemSchema: {
|
|
45
|
+
filename: import("../../runtime/codecs").StringCodec;
|
|
46
|
+
filesize: import("../../runtime/codecs").StringCodec;
|
|
47
|
+
mime: import("../../runtime/codecs").StringCodec;
|
|
48
|
+
preview: import("../../runtime/codecs").StringCodec;
|
|
49
|
+
icon: import("../../runtime/codecs").StringCodec;
|
|
50
|
+
invalid: import("../../runtime/codecs").BoolCodec;
|
|
51
|
+
error: import("../../runtime/codecs").StringCodec;
|
|
52
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
53
|
+
};
|
|
54
|
+
declare const fileUploadRemoveSchema: {
|
|
55
|
+
label: import("../../runtime/codecs").StringCodec;
|
|
56
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
57
|
+
};
|
|
58
|
+
type FileUploadProps = PropState<typeof fileUploadSchema>;
|
|
59
|
+
export { FILE_UPLOAD_LAYOUTS, FILE_UPLOAD_PREVIEWS, FILE_UPLOAD_SIZES, fileUploadDropzoneSchema, fileUploadItemSchema, fileUploadListSchema, fileUploadRemoveSchema, fileUploadSchema, };
|
|
60
|
+
export type { FileUploadLayout, FileUploadPreview, FileUploadProps, FileUploadSize, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type Alpine from 'alpinejs';
|
|
2
|
+
import { type CleanupStack, type TrellisAlpineComponent } from '../../runtime';
|
|
3
|
+
import { type FileUploadProps } from './contract';
|
|
4
|
+
type PendingFile = {
|
|
5
|
+
id: string;
|
|
6
|
+
file: File;
|
|
7
|
+
name: string;
|
|
8
|
+
size: string;
|
|
9
|
+
type: string;
|
|
10
|
+
previewUrl: string;
|
|
11
|
+
};
|
|
12
|
+
type FileUploadData = {
|
|
13
|
+
props: FileUploadProps;
|
|
14
|
+
listeners: CleanupStack;
|
|
15
|
+
files: PendingFile[];
|
|
16
|
+
limitReached: boolean;
|
|
17
|
+
root(): HTMLElement;
|
|
18
|
+
input(): HTMLInputElement;
|
|
19
|
+
dropzone(): HTMLElement | null;
|
|
20
|
+
list(): HTMLElement | null;
|
|
21
|
+
isInputUnavailable(): boolean;
|
|
22
|
+
sync(): void;
|
|
23
|
+
syncFormEncoding(): void;
|
|
24
|
+
syncInputAttributes(): void;
|
|
25
|
+
syncFromInput(): void;
|
|
26
|
+
addFiles(files: File[]): void;
|
|
27
|
+
removePending(index: number): void;
|
|
28
|
+
clearExisting(button: HTMLElement): void;
|
|
29
|
+
renderFiles(): void;
|
|
30
|
+
setDragging(value: boolean): void;
|
|
31
|
+
};
|
|
32
|
+
declare const UiFileUpload: () => TrellisAlpineComponent<FileUploadData>;
|
|
33
|
+
declare const registerFileUpload: (AlpineInstance: Alpine.Alpine) => void;
|
|
34
|
+
export { registerFileUpload, UiFileUpload, };
|
|
35
|
+
export type { FileUploadData, PendingFile };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type PropState } from '../../runtime';
|
|
2
|
+
declare const FRAME_AS_VALUES: readonly ["div", "section", "article", "aside", "main", "nav", "form"];
|
|
3
|
+
declare const FRAME_REGION_AS_VALUES: readonly ["div", "header", "footer", "section", "nav", "form"];
|
|
4
|
+
declare const FRAME_BODY_AS_VALUES: readonly ["div", "section", "main", "form"];
|
|
5
|
+
declare const FRAME_LAYOUTS: readonly ["regions", "stack"];
|
|
6
|
+
declare const FRAME_REGION_LAYOUTS: readonly ["block", "row", "stack", "cluster"];
|
|
7
|
+
declare const FRAME_SPACES: readonly ["0", "1", "2", "3", "4", "5", "6"];
|
|
8
|
+
declare const FRAME_SURFACES: readonly ["none", "app", "subtle", "surface", "raised"];
|
|
9
|
+
declare const FRAME_BORDERS: readonly ["none", "default"];
|
|
10
|
+
declare const FRAME_RADII: readonly ["none", "sm", "md", "lg"];
|
|
11
|
+
declare const FRAME_SHADOWS: readonly ["none", "border", "sm", "md", "lg"];
|
|
12
|
+
declare const FRAME_WIDTHS: readonly ["auto", "full", "xs", "sm", "md", "lg", "xl", "prose"];
|
|
13
|
+
declare const FRAME_HEIGHTS: readonly ["auto", "full", "xs", "sm", "md", "lg", "xl", "prose"];
|
|
14
|
+
declare const FRAME_ALIGNS: readonly ["start", "center", "end", "stretch"];
|
|
15
|
+
declare const FRAME_JUSTIFIES: readonly ["start", "center", "end", "between"];
|
|
16
|
+
declare const frameSchema: {
|
|
17
|
+
as: import("../../runtime/codecs").OneOfCodec<"article" | "aside" | "div" | "form" | "main" | "nav" | "section">;
|
|
18
|
+
layout: import("../../runtime/codecs").OneOfCodec<"stack" | "regions">;
|
|
19
|
+
gap: import("../../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6">;
|
|
20
|
+
surface: import("../../runtime/codecs").OneOfCodec<"none" | "subtle" | "surface" | "app" | "raised">;
|
|
21
|
+
border: import("../../runtime/codecs").OneOfCodec<"default" | "none">;
|
|
22
|
+
radius: import("../../runtime/codecs").OneOfCodec<"none" | "sm" | "md" | "lg">;
|
|
23
|
+
shadow: import("../../runtime/codecs").OneOfCodec<"border" | "none" | "sm" | "md" | "lg">;
|
|
24
|
+
width: import("../../runtime/codecs").OneOfCodec<"xs" | "sm" | "md" | "lg" | "auto" | "xl" | "full" | "prose">;
|
|
25
|
+
height: import("../../runtime/codecs").OneOfCodec<"xs" | "sm" | "md" | "lg" | "auto" | "xl" | "full" | "prose">;
|
|
26
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
27
|
+
};
|
|
28
|
+
declare const frameRegionSchema: {
|
|
29
|
+
as: import("../../runtime/codecs").OneOfCodec<"div" | "footer" | "form" | "header" | "nav" | "section">;
|
|
30
|
+
padding: import("../../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6">;
|
|
31
|
+
layout: import("../../runtime/codecs").OneOfCodec<"stack" | "block" | "row" | "cluster">;
|
|
32
|
+
align: import("../../runtime/codecs").OneOfCodec<"end" | "center" | "start" | "stretch">;
|
|
33
|
+
justify: import("../../runtime/codecs").OneOfCodec<"end" | "center" | "start" | "between">;
|
|
34
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
35
|
+
};
|
|
36
|
+
declare const frameBodySchema: {
|
|
37
|
+
as: import("../../runtime/codecs").OneOfCodec<"div" | "form" | "main" | "section">;
|
|
38
|
+
padding: import("../../runtime/codecs").OneOfCodec<"0" | "1" | "2" | "3" | "4" | "5" | "6">;
|
|
39
|
+
scroll: import("../../runtime/codecs").BoolCodec;
|
|
40
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
41
|
+
};
|
|
42
|
+
type FrameAs = typeof FRAME_AS_VALUES[number];
|
|
43
|
+
type FrameRegionAs = typeof FRAME_REGION_AS_VALUES[number];
|
|
44
|
+
type FrameBodyAs = typeof FRAME_BODY_AS_VALUES[number];
|
|
45
|
+
type FrameLayout = typeof FRAME_LAYOUTS[number];
|
|
46
|
+
type FrameRegionLayout = typeof FRAME_REGION_LAYOUTS[number];
|
|
47
|
+
type FrameSpace = typeof FRAME_SPACES[number];
|
|
48
|
+
type FrameSurface = typeof FRAME_SURFACES[number];
|
|
49
|
+
type FrameBorder = typeof FRAME_BORDERS[number];
|
|
50
|
+
type FrameRadius = typeof FRAME_RADII[number];
|
|
51
|
+
type FrameShadow = typeof FRAME_SHADOWS[number];
|
|
52
|
+
type FrameWidth = typeof FRAME_WIDTHS[number];
|
|
53
|
+
type FrameHeight = typeof FRAME_HEIGHTS[number];
|
|
54
|
+
type FrameAlign = typeof FRAME_ALIGNS[number];
|
|
55
|
+
type FrameJustify = typeof FRAME_JUSTIFIES[number];
|
|
56
|
+
type FrameProps = PropState<typeof frameSchema>;
|
|
57
|
+
type FrameRegionProps = PropState<typeof frameRegionSchema>;
|
|
58
|
+
type FrameBodyProps = PropState<typeof frameBodySchema>;
|
|
59
|
+
export { FRAME_ALIGNS, FRAME_AS_VALUES, FRAME_BODY_AS_VALUES, FRAME_BORDERS, FRAME_HEIGHTS, FRAME_JUSTIFIES, FRAME_LAYOUTS, FRAME_RADII, FRAME_REGION_AS_VALUES, FRAME_REGION_LAYOUTS, FRAME_SHADOWS, FRAME_SPACES, FRAME_SURFACES, FRAME_WIDTHS, frameBodySchema, frameRegionSchema, frameSchema, };
|
|
60
|
+
export type { FrameAlign, FrameAs, FrameBodyAs, FrameBodyProps, FrameBorder, FrameHeight, FrameJustify, FrameLayout, FrameProps, FrameRadius, FrameRegionAs, FrameRegionLayout, FrameRegionProps, FrameShadow, FrameSpace, FrameSurface, FrameWidth, };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { FRAME_ALIGNS, FRAME_AS_VALUES, FRAME_BODY_AS_VALUES, FRAME_BORDERS, FRAME_HEIGHTS, FRAME_JUSTIFIES, FRAME_LAYOUTS, FRAME_RADII, FRAME_REGION_AS_VALUES, FRAME_REGION_LAYOUTS, FRAME_SHADOWS, FRAME_SPACES, FRAME_SURFACES, FRAME_WIDTHS, frameBodySchema, frameRegionSchema, frameSchema, } from './contract';
|
|
2
|
+
export type { FrameAlign, FrameAs, FrameBodyAs, FrameBodyProps, FrameBorder, FrameHeight, FrameJustify, FrameLayout, FrameProps, FrameRadius, FrameRegionAs, FrameRegionLayout, FrameRegionProps, FrameShadow, FrameSpace, FrameSurface, FrameWidth, } from './contract';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const HEADING_AS_VALUES: readonly ["div", "h1", "h2", "h3", "h4", "h5", "h6"];
|
|
2
|
+
declare const HEADING_SIZE_VALUES: readonly ["base", "lg", "xl"];
|
|
3
|
+
declare const HEADING_COLOR_VALUES: readonly ["default", "muted", "accent", "inherit"];
|
|
4
|
+
type HeadingAs = typeof HEADING_AS_VALUES[number];
|
|
5
|
+
type HeadingSize = typeof HEADING_SIZE_VALUES[number];
|
|
6
|
+
type HeadingColor = typeof HEADING_COLOR_VALUES[number];
|
|
7
|
+
export { HEADING_AS_VALUES, HEADING_COLOR_VALUES, HEADING_SIZE_VALUES, };
|
|
8
|
+
export type { HeadingAs, HeadingColor, HeadingSize };
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type PropState } from '../../runtime';
|
|
2
|
+
declare const IMAGE_FITS: readonly ["cover", "contain", "fill", "none", "scale-down"];
|
|
3
|
+
declare const IMAGE_LOADINGS: readonly ["lazy", "eager"];
|
|
4
|
+
declare const IMAGE_DECODINGS: readonly ["async", "sync", "auto"];
|
|
5
|
+
declare const imageSchema: {
|
|
6
|
+
src: import("../../runtime/codecs").StringCodec;
|
|
7
|
+
alt: import("../../runtime/codecs").StringCodec;
|
|
8
|
+
fit: import("../../runtime/codecs").OneOfCodec<"contain" | "fill" | "none" | "cover" | "scale-down">;
|
|
9
|
+
loading: import("../../runtime/codecs").OneOfCodec<"eager" | "lazy">;
|
|
10
|
+
decoding: import("../../runtime/codecs").OneOfCodec<"sync" | "auto" | "async">;
|
|
11
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
12
|
+
imageClass: import("../../runtime/codecs").StringCodec;
|
|
13
|
+
};
|
|
14
|
+
type ImageFit = typeof IMAGE_FITS[number];
|
|
15
|
+
type ImageLoading = typeof IMAGE_LOADINGS[number];
|
|
16
|
+
type ImageDecoding = typeof IMAGE_DECODINGS[number];
|
|
17
|
+
type ImageProps = PropState<typeof imageSchema>;
|
|
18
|
+
export { IMAGE_DECODINGS, IMAGE_FITS, IMAGE_LOADINGS, imageSchema, };
|
|
19
|
+
export type { ImageDecoding, ImageFit, ImageLoading, ImageProps, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { imageSchema } from './contract';
|