@vireo-ai/trellis-ui 0.1.8 → 0.1.10
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 +8 -4
- package/packages/client/src/components/app/styles.css +1 -30
- package/packages/client/src/components/button/styles.css +1 -122
- package/packages/client/src/components/date-picker/styles.css +47 -77
- package/packages/client/src/components/field/styles.css +10 -0
- package/packages/client/src/components/file-upload/styles.css +0 -28
- package/packages/client/src/components/panels/styles.css +43 -0
- package/packages/client/src/components/radio/styles.css +26 -21
- package/packages/client/src/components/scroll-area/styles.css +0 -4
- package/packages/client/src/components/select/styles.css +0 -30
- package/packages/client/src/components/sidebar/styles.css +8 -0
- package/packages/client/src/components/toast/styles.css +14 -7
- package/packages/client/src/styles/components.css +1 -0
- package/packages/client/src/styles/generated/theme-fonts.css +5 -0
- package/packages/client/src/styles/generated/theme-palette.css +2656 -0
- package/packages/client/src/styles/generated/theme-runtime.css +2966 -0
- package/packages/client/src/styles/generated-sources.css +1 -1
- package/packages/client/src/styles/static.css +1 -0
- package/packages/client/src/styles/theme.css +777 -738
- package/packages/client/types/cdn.d.ts +1 -4
- package/packages/client/types/component-api.d.ts +21 -0
- package/packages/client/types/components/accordion/contract.d.ts +3 -2
- package/packages/client/types/components/accordion/index.d.ts +28 -42
- package/packages/client/types/components/accordion/machine.d.ts +131 -0
- package/packages/client/types/components/accordion/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/action/contract.d.ts +3 -3
- package/packages/client/types/components/app/contract.d.ts +25 -12
- package/packages/client/types/components/app/index.d.ts +2 -2
- package/packages/client/types/components/badge/contract.d.ts +5 -5
- package/packages/client/types/components/box/contract.d.ts +25 -28
- package/packages/client/types/components/brand/contract.d.ts +2 -2
- package/packages/client/types/components/button/contract.d.ts +5 -5
- package/packages/client/types/components/card/contract.d.ts +28 -31
- package/packages/client/types/components/checkbox/contract.d.ts +17 -17
- package/packages/client/types/components/checkbox/index.d.ts +20 -26
- package/packages/client/types/components/checkbox/machine.d.ts +41 -0
- package/packages/client/types/components/checkbox/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/common.d.ts +53 -235
- package/packages/client/types/components/container/contract.d.ts +11 -12
- package/packages/client/types/components/date-picker/contract.d.ts +21 -16
- package/packages/client/types/components/date-picker/index.d.ts +38 -60
- package/packages/client/types/components/date-picker/machine.d.ts +529 -0
- package/packages/client/types/components/date-picker/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/date-picker/value.d.ts +28 -0
- package/packages/client/types/components/dropdown/contract.d.ts +4 -4
- package/packages/client/types/components/dropdown/index.d.ts +20 -45
- package/packages/client/types/components/dropdown/machine.d.ts +93 -0
- package/packages/client/types/components/dropdown/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/field/contract.d.ts +10 -6
- package/packages/client/types/components/field/index.d.ts +6 -6
- package/packages/client/types/components/field/machine.d.ts +13 -0
- package/packages/client/types/components/field/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/file-upload/contract.d.ts +7 -4
- package/packages/client/types/components/file-upload/index.d.ts +34 -31
- package/packages/client/types/components/file-upload/machine.d.ts +127 -0
- package/packages/client/types/components/file-upload/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/flex/contract.d.ts +16 -17
- package/packages/client/types/components/frame/contract.d.ts +41 -47
- package/packages/client/types/components/frame/index.d.ts +2 -2
- package/packages/client/types/components/grid/contract.d.ts +20 -21
- package/packages/client/types/components/heading/contract.d.ts +1 -1
- package/packages/client/types/components/image/contract.d.ts +3 -3
- package/packages/client/types/components/input/contract.d.ts +2 -2
- package/packages/client/types/components/input/index.d.ts +15 -12
- package/packages/client/types/components/input/machine.d.ts +20 -0
- package/packages/client/types/components/layout.d.ts +44 -225
- package/packages/client/types/components/menu/contract.d.ts +14 -8
- package/packages/client/types/components/modal/contract.d.ts +12 -12
- package/packages/client/types/components/modal/index.d.ts +41 -75
- package/packages/client/types/components/modal/machine.d.ts +129 -0
- package/packages/client/types/components/modal/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/overlay/contract.d.ts +3 -3
- package/packages/client/types/components/panels/contract.d.ts +39 -0
- package/packages/client/types/components/panels/index.d.ts +54 -0
- package/packages/client/types/components/panels/machine.d.ts +151 -0
- package/packages/client/types/components/panels/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/radio/contract.d.ts +11 -11
- package/packages/client/types/components/radio/index.d.ts +19 -23
- package/packages/client/types/components/radio/machine.d.ts +40 -0
- package/packages/client/types/components/radio/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/runtime.d.ts +16 -19
- package/packages/client/types/components/scroll-area/contract.d.ts +4 -7
- package/packages/client/types/components/scroll-area/index.d.ts +23 -49
- package/packages/client/types/components/scroll-area/machine.d.ts +21 -0
- package/packages/client/types/components/scroll-area/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/section/contract.d.ts +12 -13
- package/packages/client/types/components/select/contract.d.ts +19 -15
- package/packages/client/types/components/select/index.d.ts +42 -89
- package/packages/client/types/components/select/machine.d.ts +476 -0
- package/packages/client/types/components/select/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/shared/controlled-open.d.ts +11 -0
- package/packages/client/types/components/sidebar/contract.d.ts +19 -12
- package/packages/client/types/components/sidebar/index.d.ts +51 -88
- package/packages/client/types/components/sidebar/machine.d.ts +100 -0
- package/packages/client/types/components/sidebar/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/slider/contract.d.ts +3 -3
- package/packages/client/types/components/slider/index.d.ts +17 -21
- package/packages/client/types/components/slider/machine.d.ts +37 -0
- package/packages/client/types/components/slider/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/stack/contract.d.ts +16 -17
- package/packages/client/types/components/surface-manifest.d.ts +9 -0
- package/packages/client/types/components/switch/contract.d.ts +11 -11
- package/packages/client/types/components/switch/index.d.ts +13 -18
- package/packages/client/types/components/switch/machine.d.ts +19 -0
- package/packages/client/types/components/switch/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/table/contract.d.ts +18 -18
- package/packages/client/types/components/tabs/contract.d.ts +10 -5
- package/packages/client/types/components/tabs/index.d.ts +33 -51
- package/packages/client/types/components/tabs/machine.d.ts +84 -0
- package/packages/client/types/components/tabs/runtime-docs.d.ts +2 -0
- package/packages/client/types/components/text/contract.d.ts +1 -1
- package/packages/client/types/components/textarea/contract.d.ts +2 -2
- package/packages/client/types/components/toast/contract.d.ts +5 -4
- package/packages/client/types/components/toast/index.d.ts +38 -12
- package/packages/client/types/components/toast/machine.d.ts +115 -0
- package/packages/client/types/components/toast/runtime-docs.d.ts +2 -0
- package/packages/client/types/directives/index.d.ts +3 -1
- package/packages/client/types/directives/layout.d.ts +3 -0
- package/packages/client/types/directives/request.d.ts +1 -2
- package/packages/client/types/directives/transition.d.ts +3 -0
- package/packages/client/types/docs/transition-docs.d.ts +30 -0
- package/packages/client/types/index.d.ts +8 -40
- package/packages/client/types/motion/animate.d.ts +5 -44
- package/packages/client/types/motion/controller.d.ts +33 -0
- package/packages/client/types/motion/index.d.ts +43 -20
- package/packages/client/types/motion/owned.d.ts +5 -0
- package/packages/client/types/motion/plan.d.ts +46 -0
- package/packages/client/types/motion/recipe.d.ts +56 -0
- package/packages/client/types/motion/registry.d.ts +12 -0
- package/packages/client/types/motion/resize.d.ts +15 -0
- package/packages/client/types/motion/subject.d.ts +10 -0
- package/packages/client/types/motion/targets.d.ts +2 -5
- package/packages/client/types/motion/view.d.ts +7 -2
- package/packages/client/types/runtime/alpine-machine.d.ts +68 -0
- package/packages/client/types/runtime/anchored-popover.d.ts +10 -2
- package/packages/client/types/runtime/codecs.d.ts +16 -2
- package/packages/client/types/runtime/{resizable.d.ts → drag-and-drop/index.d.ts} +4 -2
- package/packages/client/types/runtime/engine/request.d.ts +2 -2
- package/packages/client/types/runtime/engine/stream.d.ts +11 -5
- package/packages/client/types/runtime/focus-scope.d.ts +7 -0
- package/packages/client/types/runtime/identity.d.ts +3 -0
- package/packages/client/types/runtime/index.d.ts +9 -75
- package/packages/client/types/runtime/merge-bindings.d.ts +1 -1
- package/packages/client/types/runtime/semantic-observer.d.ts +10 -0
- package/packages/client/types/runtime/state-machine/index.d.ts +4 -0
- package/packages/client/types/runtime/state-machine/machine.d.ts +83 -0
- package/packages/client/types/runtime/state-machine/props-change.d.ts +12 -0
- package/packages/client/types/runtime/transition-coordinator.d.ts +52 -0
- package/packages/client/types/runtime/ui.d.ts +15 -0
- package/packages/client/types/utils/index.d.ts +2 -1
- package/packages/client/types/utils/number.d.ts +2 -0
- package/packages/client/types/utils/object.d.ts +4 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.css +9097 -2595
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min.css +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +17313 -13281
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js.map +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +8 -15
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +8 -15
- package/packages/client/types/bindings/disclosure.d.ts +0 -3
- package/packages/client/types/bindings/index.d.ts +0 -7
- package/packages/client/types/bindings/motion.d.ts +0 -3
- package/packages/client/types/bindings/state.d.ts +0 -3
- package/packages/client/types/bindings/types.d.ts +0 -33
- package/packages/client/types/components/combobox/contract.d.ts +0 -60
- package/packages/client/types/components/combobox/index.d.ts +0 -80
- package/packages/client/types/components/textarea/index.d.ts +0 -13
- package/packages/client/types/motion/presence.d.ts +0 -34
- package/packages/client/types/runtime/class-name.d.ts +0 -9
- package/packages/client/types/runtime/create.d.ts +0 -8
- package/packages/client/types/runtime/machine.d.ts +0 -55
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cally-TZl4LpyH.js +0 -1134
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cally-TZl4LpyH.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SchemaToProps } from '../../runtime';
|
|
2
2
|
declare const TABLE_LAYOUTS: readonly ["auto", "fixed"];
|
|
3
3
|
declare const TABLE_DENSITIES: readonly ["compact", "default", "comfortable"];
|
|
4
4
|
declare const TABLE_VARIANTS: readonly ["ghost", "surface"];
|
|
@@ -14,7 +14,7 @@ declare const tableSchema: {
|
|
|
14
14
|
layout: import("../../runtime/codecs").OneOfCodec<"fixed" | "auto">;
|
|
15
15
|
density: import("../../runtime/codecs").OneOfCodec<"default" | "compact" | "comfortable">;
|
|
16
16
|
variant: import("../../runtime/codecs").OneOfCodec<"ghost" | "surface">;
|
|
17
|
-
border: import("../../runtime/codecs").OneOfCodec<"
|
|
17
|
+
border: import("../../runtime/codecs").OneOfCodec<"none" | "grid" | "row">;
|
|
18
18
|
flush: import("../../runtime/codecs").BoolCodec;
|
|
19
19
|
zebra: import("../../runtime/codecs").BoolCodec;
|
|
20
20
|
hover: import("../../runtime/codecs").BoolCodec;
|
|
@@ -25,7 +25,7 @@ declare const tableSchema: {
|
|
|
25
25
|
tableClass: import("../../runtime/codecs").StringCodec;
|
|
26
26
|
};
|
|
27
27
|
declare const tableCaptionSchema: {
|
|
28
|
-
side: import("../../runtime/codecs").OneOfCodec<"
|
|
28
|
+
side: import("../../runtime/codecs").OneOfCodec<"top" | "bottom">;
|
|
29
29
|
class: import("../../runtime/codecs").StringCodec;
|
|
30
30
|
};
|
|
31
31
|
declare const tableSectionSchema: {
|
|
@@ -39,8 +39,8 @@ declare const tableRowSchema: {
|
|
|
39
39
|
class: import("../../runtime/codecs").StringCodec;
|
|
40
40
|
};
|
|
41
41
|
declare const tableColumnSchema: {
|
|
42
|
-
align: import("../../runtime/codecs").OneOfCodec<"
|
|
43
|
-
valign: import("../../runtime/codecs").OneOfCodec<"
|
|
42
|
+
align: import("../../runtime/codecs").OneOfCodec<"start" | "center" | "end">;
|
|
43
|
+
valign: import("../../runtime/codecs").OneOfCodec<"top" | "bottom" | "baseline" | "middle">;
|
|
44
44
|
key: import("../../runtime/codecs").StringCodec;
|
|
45
45
|
target: import("../../runtime/codecs").StringCodec;
|
|
46
46
|
width: import("../../runtime/codecs").StringCodec;
|
|
@@ -61,14 +61,14 @@ declare const tableColumnFilterSchema: {
|
|
|
61
61
|
class: import("../../runtime/codecs").StringCodec;
|
|
62
62
|
};
|
|
63
63
|
declare const tableRowHeaderSchema: {
|
|
64
|
-
align: import("../../runtime/codecs").OneOfCodec<"
|
|
65
|
-
valign: import("../../runtime/codecs").OneOfCodec<"
|
|
64
|
+
align: import("../../runtime/codecs").OneOfCodec<"start" | "center" | "end">;
|
|
65
|
+
valign: import("../../runtime/codecs").OneOfCodec<"top" | "bottom" | "baseline" | "middle">;
|
|
66
66
|
scope: import("../../runtime/codecs").OneOfCodec<"row" | "rowgroup">;
|
|
67
67
|
class: import("../../runtime/codecs").StringCodec;
|
|
68
68
|
};
|
|
69
69
|
declare const tableCellSchema: {
|
|
70
|
-
align: import("../../runtime/codecs").OneOfCodec<"
|
|
71
|
-
valign: import("../../runtime/codecs").OneOfCodec<"
|
|
70
|
+
align: import("../../runtime/codecs").OneOfCodec<"start" | "center" | "end">;
|
|
71
|
+
valign: import("../../runtime/codecs").OneOfCodec<"top" | "bottom" | "baseline" | "middle">;
|
|
72
72
|
class: import("../../runtime/codecs").StringCodec;
|
|
73
73
|
};
|
|
74
74
|
declare const tableEmptySchema: {
|
|
@@ -87,14 +87,14 @@ type TableSort = typeof TABLE_SORTS[number];
|
|
|
87
87
|
type TableColumnScope = typeof TABLE_COLUMN_SCOPES[number];
|
|
88
88
|
type TableRowHeaderScope = typeof TABLE_ROW_HEADER_SCOPES[number];
|
|
89
89
|
type TableFilterAs = typeof TABLE_FILTER_AS_VALUES[number];
|
|
90
|
-
type TableProps =
|
|
91
|
-
type TableCaptionProps =
|
|
92
|
-
type TableSectionProps =
|
|
93
|
-
type TableRowProps =
|
|
94
|
-
type TableColumnProps =
|
|
95
|
-
type TableColumnFilterProps =
|
|
96
|
-
type TableRowHeaderProps =
|
|
97
|
-
type TableCellProps =
|
|
98
|
-
type TableEmptyProps =
|
|
90
|
+
type TableProps = SchemaToProps<typeof tableSchema>;
|
|
91
|
+
type TableCaptionProps = SchemaToProps<typeof tableCaptionSchema>;
|
|
92
|
+
type TableSectionProps = SchemaToProps<typeof tableSectionSchema>;
|
|
93
|
+
type TableRowProps = SchemaToProps<typeof tableRowSchema>;
|
|
94
|
+
type TableColumnProps = SchemaToProps<typeof tableColumnSchema>;
|
|
95
|
+
type TableColumnFilterProps = SchemaToProps<typeof tableColumnFilterSchema>;
|
|
96
|
+
type TableRowHeaderProps = SchemaToProps<typeof tableRowHeaderSchema>;
|
|
97
|
+
type TableCellProps = SchemaToProps<typeof tableCellSchema>;
|
|
98
|
+
type TableEmptyProps = SchemaToProps<typeof tableEmptySchema>;
|
|
99
99
|
export { TABLE_ALIGNS, TABLE_BORDERS, TABLE_COLUMN_SCOPES, TABLE_DENSITIES, TABLE_FILTER_AS_VALUES, TABLE_LAYOUTS, TABLE_ROW_HEADER_SCOPES, TABLE_SORTS, TABLE_VALIGNS, TABLE_VARIANTS, TABLE_WIDTHS, tableCaptionSchema, tableCellSchema, tableColumnFilterSchema, tableColumnSchema, tableEmptySchema, tableRowHeaderSchema, tableRowSchema, tableSchema, tableSectionSchema, };
|
|
100
100
|
export type { TableAlign, TableBorder, TableCaptionProps, TableCellProps, TableColumnFilterProps, TableColumnProps, TableColumnScope, TableDensity, TableEmptyProps, TableFilterAs, TableLayout, TableProps, TableRowHeaderProps, TableRowHeaderScope, TableRowProps, TableSectionProps, TableSort, TableValign, TableVariant, TableWidth, };
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type Orientation } from '../common';
|
|
1
|
+
import { type SchemaToProps } from '../../runtime';
|
|
2
|
+
import { type LayoutSpace, type Orientation } from '../common';
|
|
3
3
|
declare const TABS_ACTIVATIONS: readonly ["manual", "automatic"];
|
|
4
4
|
declare const TABS_ORIENTATIONS: readonly ["vertical", "horizontal"];
|
|
5
5
|
declare const TABS_LIST_ORIENTATIONS: readonly ["inherit", "vertical", "horizontal"];
|
|
6
|
+
declare const TABS_LIST_GAPS: readonly ["auto", "0", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7", "7.5", "8", "8.5", "9", "9.5", "10", "10.5", "11", "11.5", "12"];
|
|
6
7
|
declare const TABS_VARIANTS: readonly ["subtle", "line", "segmented", "pills"];
|
|
7
8
|
declare const TABS_SIZES: readonly ["sm", "md"];
|
|
8
9
|
declare const tabsSchema: {
|
|
9
10
|
id: import("../../runtime/codecs").StringCodec;
|
|
11
|
+
animate: import("../../runtime/codecs").BoolCodec;
|
|
10
12
|
defaultValue: import("../../runtime/codecs").StringCodec;
|
|
11
13
|
value: import("../../runtime/codecs").StringCodec;
|
|
12
14
|
activation: import("../../runtime/codecs").OneOfCodec<"manual" | "automatic">;
|
|
13
15
|
orientation: import("../../runtime/codecs").OneOfCodec<"vertical" | "horizontal">;
|
|
16
|
+
gap: import("../../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5" | "auto">;
|
|
14
17
|
loop: import("../../runtime/codecs").BoolCodec;
|
|
15
18
|
panels: import("../../runtime/codecs").StringCodec;
|
|
16
19
|
class: import("../../runtime/codecs").StringCodec;
|
|
17
20
|
};
|
|
18
21
|
type TabsActivation = typeof TABS_ACTIVATIONS[number];
|
|
19
22
|
type TabsOrientation = Orientation;
|
|
23
|
+
type TabsGap = 'auto' | LayoutSpace;
|
|
20
24
|
type TabsListOrientation = typeof TABS_LIST_ORIENTATIONS[number];
|
|
25
|
+
type TabsListGap = TabsGap;
|
|
21
26
|
type TabsVariant = typeof TABS_VARIANTS[number];
|
|
22
27
|
type TabsSize = typeof TABS_SIZES[number];
|
|
23
|
-
type TabsProps =
|
|
24
|
-
export { TABS_ACTIVATIONS, TABS_LIST_ORIENTATIONS, TABS_ORIENTATIONS, TABS_SIZES, TABS_VARIANTS, tabsSchema, };
|
|
25
|
-
export type { TabsActivation, TabsListOrientation, TabsOrientation, TabsProps, TabsSize, TabsVariant, };
|
|
28
|
+
type TabsProps = SchemaToProps<typeof tabsSchema>;
|
|
29
|
+
export { TABS_ACTIVATIONS, TABS_LIST_ORIENTATIONS, TABS_LIST_GAPS, TABS_ORIENTATIONS, TABS_SIZES, TABS_VARIANTS, tabsSchema, };
|
|
30
|
+
export type { TabsActivation, TabsGap, TabsListOrientation, TabsListGap, TabsOrientation, TabsProps, TabsSize, TabsVariant, };
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type Alpine from 'alpinejs';
|
|
2
|
-
import { type
|
|
3
|
-
import { type
|
|
4
|
-
type
|
|
5
|
-
type
|
|
6
|
-
tab: TabsTabElement;
|
|
7
|
-
value: string;
|
|
8
|
-
isDisabled: boolean;
|
|
9
|
-
panel: HTMLElement | null;
|
|
10
|
-
};
|
|
2
|
+
import { type AlpineMachine, type BindingObject, type TrellisAlpineComponent } from '../../runtime';
|
|
3
|
+
import { type MotionHandle, type MotionTransitionSubject } from '../../motion';
|
|
4
|
+
import { type TabsProps } from './contract';
|
|
5
|
+
import { type TabsContext, tabsHooks } from './machine';
|
|
11
6
|
type TabsChangeDetail = {
|
|
12
7
|
value: string;
|
|
13
8
|
};
|
|
@@ -15,48 +10,35 @@ type TabsActivateDetail = {
|
|
|
15
10
|
value: string;
|
|
16
11
|
panelId: string;
|
|
17
12
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
applyProps(changedKeys?: string[]): void;
|
|
37
|
-
setActiveValue(value: string, tab?: TabsTabElement): void;
|
|
38
|
-
syncAll(): void;
|
|
39
|
-
syncRoot(): void;
|
|
40
|
-
syncList(list: HTMLElement): void;
|
|
41
|
-
syncTab(item: TabsItem): void;
|
|
42
|
-
syncPanel(panel: HTMLElement): void;
|
|
43
|
-
setupEvents(): void;
|
|
44
|
-
teardown(): void;
|
|
45
|
-
tabFromEvent(event: Event): TabsTabElement | null;
|
|
46
|
-
itemFromTab(tab: TabsTabElement): TabsItem | null;
|
|
47
|
-
collectionNav(): CollectionNavigation;
|
|
48
|
-
handleClick(event: Event): void;
|
|
49
|
-
handleFocus(event: Event): void;
|
|
50
|
-
handleKeydown(event: KeyboardEvent): void;
|
|
51
|
-
focusNext(): void;
|
|
52
|
-
focusPrevious(): void;
|
|
53
|
-
focusFirst(): void;
|
|
54
|
-
focusLast(): void;
|
|
55
|
-
activateFocused(): void;
|
|
56
|
-
dispatchChange(): void;
|
|
57
|
-
dispatchActivate(tab: TabsTabElement, panel: HTMLElement | null): void;
|
|
13
|
+
/**
|
|
14
|
+
* Public Alpine API for `ui.tabs`.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
interface UiTabsApi {
|
|
19
|
+
/** Currently selected tab value. */
|
|
20
|
+
readonly value: string;
|
|
21
|
+
/** Select an enabled tab that belongs to this Tabs owner. */
|
|
22
|
+
select(value: string): void;
|
|
23
|
+
/** Whether `value` is currently selected. */
|
|
24
|
+
isActive(value: string): boolean;
|
|
25
|
+
}
|
|
26
|
+
type TabsData = AlpineMachine<TabsContext, TabsProps, typeof tabsHooks> & UiTabsApi & {
|
|
27
|
+
readonly root: BindingObject;
|
|
28
|
+
init(): void;
|
|
29
|
+
destroy(): void;
|
|
30
|
+
transitionIndicator(transition: TabsMotionTransition): MotionHandle | Promise<void>;
|
|
58
31
|
};
|
|
32
|
+
type TabsMotionTransition = MotionTransitionSubject & Readonly<{
|
|
33
|
+
el: unknown;
|
|
34
|
+
event: {
|
|
35
|
+
motion?: boolean;
|
|
36
|
+
};
|
|
37
|
+
props: {
|
|
38
|
+
animate: boolean;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
59
41
|
declare const UiTabs: () => TrellisAlpineComponent<TabsData>;
|
|
60
42
|
declare const registerTabs: (AlpineInstance: Alpine.Alpine) => void;
|
|
61
|
-
export { registerTabs, UiTabs
|
|
62
|
-
export type { TabsActivateDetail, TabsChangeDetail,
|
|
43
|
+
export { registerTabs, UiTabs };
|
|
44
|
+
export type { TabsActivateDetail, TabsChangeDetail, UiTabsApi };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type Machine, type MachineScope } from '../../runtime/state-machine';
|
|
2
|
+
import type { TabsProps } from './contract';
|
|
3
|
+
type TabsContext = {
|
|
4
|
+
selection: {
|
|
5
|
+
value: string;
|
|
6
|
+
};
|
|
7
|
+
change: {
|
|
8
|
+
previousValue: string;
|
|
9
|
+
value: string;
|
|
10
|
+
panelId: string;
|
|
11
|
+
};
|
|
12
|
+
collection: {
|
|
13
|
+
values: string[];
|
|
14
|
+
disabledValues: string[];
|
|
15
|
+
panelIds: Record<string, string>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type TabsTransitionData = TabsContext['change'];
|
|
19
|
+
type TabsMachineEffects = {
|
|
20
|
+
prepareSwitch(scope: MachineScope<TabsContext, TabsProps>): void;
|
|
21
|
+
finishSwitch(scope: MachineScope<TabsContext, TabsProps>): void;
|
|
22
|
+
syncProps(scope: MachineScope<TabsContext, TabsProps>): void;
|
|
23
|
+
syncItems(scope: MachineScope<TabsContext, TabsProps>): void;
|
|
24
|
+
};
|
|
25
|
+
type CreateTabsMachineOptions = {
|
|
26
|
+
props: TabsProps;
|
|
27
|
+
context: TabsContext;
|
|
28
|
+
effects: TabsMachineEffects;
|
|
29
|
+
};
|
|
30
|
+
declare const tabsHooks: readonly [Readonly<{
|
|
31
|
+
name: "switching";
|
|
32
|
+
state: string;
|
|
33
|
+
onDone: string;
|
|
34
|
+
onError: string;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
sends?: Record<string, import("../..").TransitionEventCreator>;
|
|
37
|
+
project?: (snapshot: Readonly<{
|
|
38
|
+
value: import("../..").MachineStateValue;
|
|
39
|
+
tags: readonly string[];
|
|
40
|
+
context: Readonly<TabsContext>;
|
|
41
|
+
props: Readonly<import("../..").SchemaToProps<{
|
|
42
|
+
id: import("../../runtime/codecs").StringCodec;
|
|
43
|
+
animate: import("../../runtime/codecs").BoolCodec;
|
|
44
|
+
defaultValue: import("../../runtime/codecs").StringCodec;
|
|
45
|
+
value: import("../../runtime/codecs").StringCodec;
|
|
46
|
+
activation: import("../../runtime/codecs").OneOfCodec<"manual" | "automatic">;
|
|
47
|
+
orientation: import("../../runtime/codecs").OneOfCodec<"vertical" | "horizontal">;
|
|
48
|
+
gap: import("../../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5" | "auto">;
|
|
49
|
+
loop: import("../../runtime/codecs").BoolCodec;
|
|
50
|
+
panels: import("../../runtime/codecs").StringCodec;
|
|
51
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
52
|
+
}>>;
|
|
53
|
+
generations: Readonly<Record<string, number>>;
|
|
54
|
+
}>) => {
|
|
55
|
+
previousValue: string;
|
|
56
|
+
value: string;
|
|
57
|
+
panelId: string;
|
|
58
|
+
};
|
|
59
|
+
projectEach?: (snapshot: Readonly<{
|
|
60
|
+
value: import("../..").MachineStateValue;
|
|
61
|
+
tags: readonly string[];
|
|
62
|
+
context: Readonly<TabsContext>;
|
|
63
|
+
props: Readonly<import("../..").SchemaToProps<{
|
|
64
|
+
id: import("../../runtime/codecs").StringCodec;
|
|
65
|
+
animate: import("../../runtime/codecs").BoolCodec;
|
|
66
|
+
defaultValue: import("../../runtime/codecs").StringCodec;
|
|
67
|
+
value: import("../../runtime/codecs").StringCodec;
|
|
68
|
+
activation: import("../../runtime/codecs").OneOfCodec<"manual" | "automatic">;
|
|
69
|
+
orientation: import("../../runtime/codecs").OneOfCodec<"vertical" | "horizontal">;
|
|
70
|
+
gap: import("../../runtime/codecs").OneOfCodec<"1" | "0" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "6.5" | "7.5" | "8.5" | "9.5" | "10.5" | "11.5" | "auto">;
|
|
71
|
+
loop: import("../../runtime/codecs").BoolCodec;
|
|
72
|
+
panels: import("../../runtime/codecs").StringCodec;
|
|
73
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
74
|
+
}>>;
|
|
75
|
+
generations: Readonly<Record<string, number>>;
|
|
76
|
+
}>) => readonly {
|
|
77
|
+
previousValue: string;
|
|
78
|
+
value: string;
|
|
79
|
+
panelId: string;
|
|
80
|
+
}[];
|
|
81
|
+
}>];
|
|
82
|
+
declare const createTabsMachine: ({ props, context, effects, }: CreateTabsMachineOptions) => Machine<TabsContext, TabsProps>;
|
|
83
|
+
export { createTabsMachine, tabsHooks };
|
|
84
|
+
export type { CreateTabsMachineOptions, TabsContext, TabsMachineEffects, TabsTransitionData, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TypographyColor } from '../common';
|
|
2
2
|
declare const TEXT_AS_VALUES: readonly ["span", "p", "div", "label", "kbd", "code", "strong"];
|
|
3
|
-
declare const TEXT_SIZE_VALUES: readonly ["
|
|
3
|
+
declare const TEXT_SIZE_VALUES: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"];
|
|
4
4
|
declare const TEXT_WEIGHT_VALUES: readonly ["normal", "medium", "semibold", "bold"];
|
|
5
5
|
declare const TEXT_COLOR_VALUES: readonly ["inherit", "muted", "subtle", "accent", "danger"];
|
|
6
6
|
type TextAs = typeof TEXT_AS_VALUES[number];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SchemaToProps } from '../../runtime';
|
|
2
2
|
declare const TEXTAREA_RESIZE_VALUES: readonly ["vertical", "horizontal", "both", "none"];
|
|
3
3
|
type TextareaResize = typeof TEXTAREA_RESIZE_VALUES[number];
|
|
4
4
|
declare const textareaSchema: {
|
|
@@ -18,6 +18,6 @@ declare const textareaSchema: {
|
|
|
18
18
|
controlClass: import("../../runtime/codecs").StringCodec;
|
|
19
19
|
class: import("../../runtime/codecs").StringCodec;
|
|
20
20
|
};
|
|
21
|
-
type TextareaProps =
|
|
21
|
+
type TextareaProps = SchemaToProps<typeof textareaSchema>;
|
|
22
22
|
export { textareaSchema, TEXTAREA_RESIZE_VALUES };
|
|
23
23
|
export type { TextareaProps, TextareaResize };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PropState } from '../../runtime';
|
|
1
|
+
import { type PropState, type SchemaToProps } from '../../runtime';
|
|
2
2
|
declare const TOAST_LEVELS: readonly ["info", "success", "warning", "danger", "debug"];
|
|
3
3
|
declare const TOAST_COLORS: readonly ["auto", "neutral", "accent", "success", "warning", "danger"];
|
|
4
4
|
declare const TOAST_RESOLVED_COLORS: readonly ["neutral", "accent", "success", "warning", "danger"];
|
|
@@ -6,8 +6,8 @@ declare const TOAST_VARIANTS: readonly ["default", "soft", "surface", "solid", "
|
|
|
6
6
|
declare const TOAST_POSITIONS: readonly ["top-right", "top-left", "top-center", "bottom-right", "bottom-left", "bottom-center"];
|
|
7
7
|
declare const toastSchema: {
|
|
8
8
|
level: import("../../runtime/codecs").OneOfCodec<"danger" | "success" | "warning" | "info" | "debug">;
|
|
9
|
-
color: import("../../runtime/codecs").OneOfCodec<"accent" | "danger" | "neutral" | "
|
|
10
|
-
variant: import("../../runtime/codecs").OneOfCodec<"
|
|
9
|
+
color: import("../../runtime/codecs").OneOfCodec<"accent" | "danger" | "neutral" | "auto" | "success" | "warning">;
|
|
10
|
+
variant: import("../../runtime/codecs").OneOfCodec<"default" | "outline" | "solid" | "soft" | "surface">;
|
|
11
11
|
title: import("../../runtime/codecs").StringCodec;
|
|
12
12
|
description: import("../../runtime/codecs").StringCodec;
|
|
13
13
|
duration: import("../../runtime/codecs").NumberCodec;
|
|
@@ -21,6 +21,7 @@ declare const toastOutletSchema: {
|
|
|
21
21
|
position: import("../../runtime/codecs").OneOfCodec<"top-right" | "top-left" | "top-center" | "bottom-right" | "bottom-left" | "bottom-center">;
|
|
22
22
|
duration: import("../../runtime/codecs").NumberCodec;
|
|
23
23
|
includeMessages: import("../../runtime/codecs").BoolCodec;
|
|
24
|
+
maxItems: import("../../runtime/codecs").NumberCodec;
|
|
24
25
|
class: import("../../runtime/codecs").StringCodec;
|
|
25
26
|
};
|
|
26
27
|
type ToastLevel = typeof TOAST_LEVELS[number];
|
|
@@ -28,7 +29,7 @@ type ToastColor = typeof TOAST_COLORS[number];
|
|
|
28
29
|
type ToastResolvedColor = typeof TOAST_RESOLVED_COLORS[number];
|
|
29
30
|
type ToastVariant = typeof TOAST_VARIANTS[number];
|
|
30
31
|
type ToastPosition = typeof TOAST_POSITIONS[number];
|
|
31
|
-
type ToastProps =
|
|
32
|
+
type ToastProps = SchemaToProps<typeof toastSchema>;
|
|
32
33
|
type ToastOutletProps = PropState<typeof toastOutletSchema>;
|
|
33
34
|
export { TOAST_COLORS, TOAST_LEVELS, TOAST_POSITIONS, TOAST_RESOLVED_COLORS, TOAST_VARIANTS, toastOutletSchema, toastSchema };
|
|
34
35
|
export type { ToastColor, ToastLevel, ToastOutletProps, ToastPosition, ToastProps, ToastResolvedColor, ToastVariant };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type Alpine from 'alpinejs';
|
|
2
|
-
import { type
|
|
2
|
+
import { type AlpineMachine, type TrellisAlpineComponent } from '../../runtime';
|
|
3
|
+
import { type CleanupStack } from '../../utils';
|
|
3
4
|
import { type ToastOutletProps, type ToastProps } from './contract';
|
|
5
|
+
import { toastHooks, type ToastContext } from './machine';
|
|
4
6
|
type ToastDetail = {
|
|
5
7
|
description?: unknown;
|
|
6
8
|
title?: unknown;
|
|
@@ -10,23 +12,47 @@ type ToastDetail = {
|
|
|
10
12
|
duration?: unknown;
|
|
11
13
|
dismissible?: unknown;
|
|
12
14
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Public Alpine API for `ui.toast`.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
interface UiToastApi {
|
|
21
|
+
/** Whether the opening transition has settled. */
|
|
22
|
+
readonly isOpen: boolean;
|
|
23
|
+
/** Whether any pause source currently holds the lifetime timer. */
|
|
24
|
+
readonly isPaused: boolean;
|
|
25
|
+
/** Auto-dismiss lifetime remaining in milliseconds. */
|
|
26
|
+
readonly remaining: number;
|
|
27
|
+
/** Dismisses the notification through its closing transition. */
|
|
20
28
|
dismiss(): void;
|
|
29
|
+
/** Adds the consumer pause source. */
|
|
30
|
+
pause(): void;
|
|
31
|
+
/** Releases the consumer pause source. */
|
|
32
|
+
resume(): void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Public Alpine API for `ui.toast.outlet`.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
interface UiToastOutletApi {
|
|
40
|
+
/** Adds a notification using the same lifecycle as server-rendered markup. */
|
|
41
|
+
add(detail: ToastDetail): void;
|
|
42
|
+
}
|
|
43
|
+
type ToastData = AlpineMachine<ToastContext, ToastProps, typeof toastHooks> & UiToastApi & {
|
|
44
|
+
init(): void;
|
|
45
|
+
destroy(): void;
|
|
21
46
|
};
|
|
22
|
-
type ToastOutletData = {
|
|
47
|
+
type ToastOutletData = UiToastOutletApi & {
|
|
23
48
|
props: ToastOutletProps;
|
|
24
49
|
cleanup: CleanupStack;
|
|
25
50
|
sync(): void;
|
|
26
|
-
|
|
51
|
+
init(): void;
|
|
52
|
+
destroy(): void;
|
|
27
53
|
};
|
|
28
54
|
declare const UiToast: () => TrellisAlpineComponent<ToastData>;
|
|
29
|
-
declare const UiToastOutlet: () => TrellisAlpineComponent<ToastOutletData>;
|
|
55
|
+
declare const UiToastOutlet: (AlpineInstance: Alpine.Alpine) => TrellisAlpineComponent<ToastOutletData>;
|
|
30
56
|
declare const registerToast: (AlpineInstance: Alpine.Alpine) => void;
|
|
31
57
|
export { registerToast, UiToast, UiToastOutlet };
|
|
32
|
-
export type { ToastData, ToastDetail, ToastOutletData };
|
|
58
|
+
export type { ToastData, ToastDetail, ToastOutletData, UiToastApi, UiToastOutletApi };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { type Machine } from '../../runtime/state-machine';
|
|
2
|
+
import type { ToastProps } from './contract';
|
|
3
|
+
type ToastDismissReason = 'timeout' | 'close' | 'api' | 'swipe';
|
|
4
|
+
type ToastContext = {
|
|
5
|
+
timer: {
|
|
6
|
+
remaining: number;
|
|
7
|
+
paused: boolean;
|
|
8
|
+
};
|
|
9
|
+
dismissal: {
|
|
10
|
+
reason: ToastDismissReason;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type ToastMachineEffects = {
|
|
14
|
+
prepareOpen(): void;
|
|
15
|
+
finishOpen(): void;
|
|
16
|
+
startTimer(): void;
|
|
17
|
+
stopTimer(): void;
|
|
18
|
+
prepareClose(): void;
|
|
19
|
+
finishClose(reason: ToastDismissReason): void;
|
|
20
|
+
syncProps(): void;
|
|
21
|
+
};
|
|
22
|
+
declare const toastHooks: readonly [Readonly<{
|
|
23
|
+
name: "opening";
|
|
24
|
+
state: string;
|
|
25
|
+
onDone: string;
|
|
26
|
+
onError: string;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
sends?: Record<string, import("../..").TransitionEventCreator>;
|
|
29
|
+
project?: (snapshot: Readonly<{
|
|
30
|
+
value: import("../..").MachineStateValue;
|
|
31
|
+
tags: readonly string[];
|
|
32
|
+
context: Readonly<ToastContext>;
|
|
33
|
+
props: Readonly<import("../..").SchemaToProps<{
|
|
34
|
+
level: import("../../runtime/codecs").OneOfCodec<"danger" | "success" | "warning" | "info" | "debug">;
|
|
35
|
+
color: import("../../runtime/codecs").OneOfCodec<"accent" | "danger" | "neutral" | "auto" | "success" | "warning">;
|
|
36
|
+
variant: import("../../runtime/codecs").OneOfCodec<"default" | "outline" | "solid" | "soft" | "surface">;
|
|
37
|
+
title: import("../../runtime/codecs").StringCodec;
|
|
38
|
+
description: import("../../runtime/codecs").StringCodec;
|
|
39
|
+
duration: import("../../runtime/codecs").NumberCodec;
|
|
40
|
+
dismissible: import("../../runtime/codecs").BoolCodec;
|
|
41
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
42
|
+
contentClass: import("../../runtime/codecs").StringCodec;
|
|
43
|
+
closeClass: import("../../runtime/codecs").StringCodec;
|
|
44
|
+
}>>;
|
|
45
|
+
generations: Readonly<Record<string, number>>;
|
|
46
|
+
}>) => Record<string, never>;
|
|
47
|
+
projectEach?: (snapshot: Readonly<{
|
|
48
|
+
value: import("../..").MachineStateValue;
|
|
49
|
+
tags: readonly string[];
|
|
50
|
+
context: Readonly<ToastContext>;
|
|
51
|
+
props: Readonly<import("../..").SchemaToProps<{
|
|
52
|
+
level: import("../../runtime/codecs").OneOfCodec<"danger" | "success" | "warning" | "info" | "debug">;
|
|
53
|
+
color: import("../../runtime/codecs").OneOfCodec<"accent" | "danger" | "neutral" | "auto" | "success" | "warning">;
|
|
54
|
+
variant: import("../../runtime/codecs").OneOfCodec<"default" | "outline" | "solid" | "soft" | "surface">;
|
|
55
|
+
title: import("../../runtime/codecs").StringCodec;
|
|
56
|
+
description: import("../../runtime/codecs").StringCodec;
|
|
57
|
+
duration: import("../../runtime/codecs").NumberCodec;
|
|
58
|
+
dismissible: import("../../runtime/codecs").BoolCodec;
|
|
59
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
60
|
+
contentClass: import("../../runtime/codecs").StringCodec;
|
|
61
|
+
closeClass: import("../../runtime/codecs").StringCodec;
|
|
62
|
+
}>>;
|
|
63
|
+
generations: Readonly<Record<string, number>>;
|
|
64
|
+
}>) => readonly Record<string, never>[];
|
|
65
|
+
}>, Readonly<{
|
|
66
|
+
name: "closing";
|
|
67
|
+
state: string;
|
|
68
|
+
onDone: string;
|
|
69
|
+
onError: string;
|
|
70
|
+
required?: boolean;
|
|
71
|
+
sends?: Record<string, import("../..").TransitionEventCreator>;
|
|
72
|
+
project?: (snapshot: Readonly<{
|
|
73
|
+
value: import("../..").MachineStateValue;
|
|
74
|
+
tags: readonly string[];
|
|
75
|
+
context: Readonly<ToastContext>;
|
|
76
|
+
props: Readonly<import("../..").SchemaToProps<{
|
|
77
|
+
level: import("../../runtime/codecs").OneOfCodec<"danger" | "success" | "warning" | "info" | "debug">;
|
|
78
|
+
color: import("../../runtime/codecs").OneOfCodec<"accent" | "danger" | "neutral" | "auto" | "success" | "warning">;
|
|
79
|
+
variant: import("../../runtime/codecs").OneOfCodec<"default" | "outline" | "solid" | "soft" | "surface">;
|
|
80
|
+
title: import("../../runtime/codecs").StringCodec;
|
|
81
|
+
description: import("../../runtime/codecs").StringCodec;
|
|
82
|
+
duration: import("../../runtime/codecs").NumberCodec;
|
|
83
|
+
dismissible: import("../../runtime/codecs").BoolCodec;
|
|
84
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
85
|
+
contentClass: import("../../runtime/codecs").StringCodec;
|
|
86
|
+
closeClass: import("../../runtime/codecs").StringCodec;
|
|
87
|
+
}>>;
|
|
88
|
+
generations: Readonly<Record<string, number>>;
|
|
89
|
+
}>) => {
|
|
90
|
+
reason: ToastDismissReason;
|
|
91
|
+
};
|
|
92
|
+
projectEach?: (snapshot: Readonly<{
|
|
93
|
+
value: import("../..").MachineStateValue;
|
|
94
|
+
tags: readonly string[];
|
|
95
|
+
context: Readonly<ToastContext>;
|
|
96
|
+
props: Readonly<import("../..").SchemaToProps<{
|
|
97
|
+
level: import("../../runtime/codecs").OneOfCodec<"danger" | "success" | "warning" | "info" | "debug">;
|
|
98
|
+
color: import("../../runtime/codecs").OneOfCodec<"accent" | "danger" | "neutral" | "auto" | "success" | "warning">;
|
|
99
|
+
variant: import("../../runtime/codecs").OneOfCodec<"default" | "outline" | "solid" | "soft" | "surface">;
|
|
100
|
+
title: import("../../runtime/codecs").StringCodec;
|
|
101
|
+
description: import("../../runtime/codecs").StringCodec;
|
|
102
|
+
duration: import("../../runtime/codecs").NumberCodec;
|
|
103
|
+
dismissible: import("../../runtime/codecs").BoolCodec;
|
|
104
|
+
class: import("../../runtime/codecs").StringCodec;
|
|
105
|
+
contentClass: import("../../runtime/codecs").StringCodec;
|
|
106
|
+
closeClass: import("../../runtime/codecs").StringCodec;
|
|
107
|
+
}>>;
|
|
108
|
+
generations: Readonly<Record<string, number>>;
|
|
109
|
+
}>) => readonly {
|
|
110
|
+
reason: ToastDismissReason;
|
|
111
|
+
}[];
|
|
112
|
+
}>];
|
|
113
|
+
declare const createToastMachine: (props: ToastProps, effects: ToastMachineEffects) => Machine<ToastContext, ToastProps>;
|
|
114
|
+
export { createToastMachine, toastHooks };
|
|
115
|
+
export type { ToastContext, ToastDismissReason, ToastMachineEffects };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type Alpine from 'alpinejs';
|
|
2
2
|
declare const REQUEST_ROOT_SELECTOR = "[x-ui-request], [x-ui-request\\.navigate]";
|
|
3
|
-
declare const registerRequestMagic: (AlpineInstance: Alpine.Alpine) => void;
|
|
4
3
|
declare const registerRequestDirective: (AlpineInstance: Alpine.Alpine) => void;
|
|
5
|
-
export { REQUEST_ROOT_SELECTOR, registerRequestDirective
|
|
4
|
+
export { REQUEST_ROOT_SELECTOR, registerRequestDirective };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type TransitionHookLike = {
|
|
2
|
+
name: string;
|
|
3
|
+
state: string;
|
|
4
|
+
sends?: Record<string, (...args: never[]) => unknown>;
|
|
5
|
+
};
|
|
6
|
+
type TransitionDocDetails = {
|
|
7
|
+
description: string;
|
|
8
|
+
default?: string;
|
|
9
|
+
};
|
|
10
|
+
type TransitionDetails<THooks extends readonly TransitionHookLike[]> = {
|
|
11
|
+
[THook in THooks[number] as THook['name']]: TransitionDocDetails;
|
|
12
|
+
};
|
|
13
|
+
type DefineTransitionDocsOptions<THooks extends readonly TransitionHookLike[]> = {
|
|
14
|
+
component: string;
|
|
15
|
+
hooks: THooks;
|
|
16
|
+
details: TransitionDetails<THooks>;
|
|
17
|
+
};
|
|
18
|
+
type ComponentTransitionDocs = {
|
|
19
|
+
component: string;
|
|
20
|
+
transitions: Array<{
|
|
21
|
+
name: string;
|
|
22
|
+
state: string;
|
|
23
|
+
description: string;
|
|
24
|
+
default?: string;
|
|
25
|
+
sends: string[];
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
28
|
+
declare const defineTransitionDocs: <const THooks extends readonly TransitionHookLike[]>({ component, hooks, details, }: DefineTransitionDocsOptions<THooks>) => ComponentTransitionDocs;
|
|
29
|
+
export { defineTransitionDocs };
|
|
30
|
+
export type { ComponentTransitionDocs, DefineTransitionDocsOptions, TransitionDocDetails, TransitionDetails, TransitionHookLike, };
|