@elaraai/east-ui 1.0.34 → 1.0.35
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/src/charts/chart/index.d.ts +8 -0
- package/dist/src/charts/chart/index.d.ts.map +1 -1
- package/dist/src/charts/chart/index.js +3 -3
- package/dist/src/charts/chart/index.js.map +1 -1
- package/dist/src/charts/spec/index.d.ts +11 -0
- package/dist/src/charts/spec/index.d.ts.map +1 -1
- package/dist/src/charts/spec/index.js +1 -0
- package/dist/src/charts/spec/index.js.map +1 -1
- package/dist/src/charts/spec/types.d.ts +2 -0
- package/dist/src/charts/spec/types.d.ts.map +1 -1
- package/dist/src/charts/spec/types.js +2 -0
- package/dist/src/charts/spec/types.js.map +1 -1
- package/dist/src/component.d.ts +39 -0
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +13 -0
- package/dist/src/component.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +1 -1
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +1 -1
- package/dist/src/internal.js.map +1 -1
- package/dist/src/layout/dock/index.d.ts +144 -0
- package/dist/src/layout/dock/index.d.ts.map +1 -0
- package/dist/src/layout/dock/index.js +150 -0
- package/dist/src/layout/dock/index.js.map +1 -0
- package/dist/src/layout/dock/types.d.ts +133 -0
- package/dist/src/layout/dock/types.d.ts.map +1 -0
- package/dist/src/layout/dock/types.js +70 -0
- package/dist/src/layout/dock/types.js.map +1 -0
- package/dist/src/layout/index.d.ts +1 -0
- package/dist/src/layout/index.d.ts.map +1 -1
- package/dist/src/layout/index.js +1 -0
- package/dist/src/layout/index.js.map +1 -1
- package/dist/src/overlays/drawer/index.d.ts +2 -0
- package/dist/src/overlays/drawer/index.d.ts.map +1 -1
- package/dist/src/overlays/drawer/index.js +4 -1
- package/dist/src/overlays/drawer/index.js.map +1 -1
- package/dist/src/overlays/drawer/types.d.ts +8 -0
- package/dist/src/overlays/drawer/types.d.ts.map +1 -1
- package/dist/src/overlays/drawer/types.js +4 -0
- package/dist/src/overlays/drawer/types.js.map +1 -1
- package/dist/src/runtime/layout/dock.d.ts +53 -0
- package/dist/src/runtime/layout/dock.d.ts.map +1 -0
- package/dist/src/runtime/layout/dock.js +51 -0
- package/dist/src/runtime/layout/dock.js.map +1 -0
- package/dist/src/runtime/layout/index.d.ts +1 -0
- package/dist/src/runtime/layout/index.d.ts.map +1 -1
- package/dist/src/runtime/layout/index.js +1 -0
- package/dist/src/runtime/layout/index.js.map +1 -1
- package/dist/test/charts/chart.examples.js +3 -3
- package/dist/test/charts/chart.examples.js.map +1 -1
- package/dist/test/layout/aligned-stack.examples.d.ts +17 -0
- package/dist/test/layout/aligned-stack.examples.d.ts.map +1 -1
- package/dist/test/layout/aligned-stack.examples.js +49 -2
- package/dist/test/layout/aligned-stack.examples.js.map +1 -1
- package/dist/test/layout/dock.examples.d.ts +34 -0
- package/dist/test/layout/dock.examples.d.ts.map +1 -0
- package/dist/test/layout/dock.examples.js +77 -0
- package/dist/test/layout/dock.examples.js.map +1 -0
- package/dist/test/overlays/drawer.examples.d.ts +1 -0
- package/dist/test/overlays/drawer.examples.d.ts.map +1 -1
- package/dist/test/overlays/drawer.examples.js +46 -0
- package/dist/test/overlays/drawer.examples.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { East, ArrayType, BooleanType, FunctionType, NullType, OptionType, StructType, variant, some, none, } from "@elaraai/east";
|
|
6
|
+
import { UIComponentType } from "../../component.js";
|
|
7
|
+
import { DockStyleType, DockOrientationType, DockSideType, DockPersistType, } from "./types.js";
|
|
8
|
+
// Re-export types
|
|
9
|
+
export { DockStyleType, DockOrientationType, DockSideType, DockPersistType, } from "./types.js";
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// DockType — standalone mirror of the inline `Dock` variant
|
|
12
|
+
// ============================================================================
|
|
13
|
+
/**
|
|
14
|
+
* Concrete struct mirroring the inline `Dock` variant in `component.ts`.
|
|
15
|
+
* Renderers reference this for `equalFor` / `ValueTypeOf`.
|
|
16
|
+
*
|
|
17
|
+
* @property body - The expanded content (UIComps) — kept mounted across collapse by default
|
|
18
|
+
* @property collapsed - Collapsed state (synced on change; omit for uncontrolled toggling)
|
|
19
|
+
* @property defaultCollapsed - Uncontrolled initial collapsed state
|
|
20
|
+
* @property onCollapsedChange - Callback invoked with the new collapsed state
|
|
21
|
+
* @property style - Presentation + behaviour sub-struct
|
|
22
|
+
*/
|
|
23
|
+
export const DockType = StructType({
|
|
24
|
+
body: ArrayType(UIComponentType),
|
|
25
|
+
collapsed: OptionType(BooleanType),
|
|
26
|
+
defaultCollapsed: OptionType(BooleanType),
|
|
27
|
+
onCollapsedChange: OptionType(FunctionType([BooleanType], NullType)),
|
|
28
|
+
style: OptionType(DockStyleType),
|
|
29
|
+
});
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Dock Factory
|
|
32
|
+
// ============================================================================
|
|
33
|
+
/** Resolve a variant string shorthand (or pass a value/expression through). */
|
|
34
|
+
function orientationValue(v) {
|
|
35
|
+
return typeof v === "string" ? East.value(variant(v, null), DockOrientationType) : v;
|
|
36
|
+
}
|
|
37
|
+
function sideValue(v) {
|
|
38
|
+
return typeof v === "string" ? East.value(variant(v, null), DockSideType) : v;
|
|
39
|
+
}
|
|
40
|
+
function persistValue(v) {
|
|
41
|
+
return typeof v === "string" ? East.value(variant(v, null), DockPersistType) : v;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Creates a Dock — an inline panel that collapses along one axis to a compact
|
|
45
|
+
* icon rail and expands back to its full content, without leaving the
|
|
46
|
+
* document flow (siblings reflow; it never overlays).
|
|
47
|
+
*
|
|
48
|
+
* @param children - The expanded content (UIComps)
|
|
49
|
+
* @param options - Optional collapsed-state / behaviour / presentation fields
|
|
50
|
+
* @returns An East expression representing the Dock component
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* The in-flow, collapse-to-rail sibling of `Expandable` (which does the
|
|
54
|
+
* opposite — a CSS takeover that fills the app container). A Dock stays an
|
|
55
|
+
* ordinary flex child: collapsed, it shrinks to `railSize` and the freed
|
|
56
|
+
* space is reclaimed by its siblings — so it can sit beside a drop target (a
|
|
57
|
+
* `Planner`, a board) and tuck away without covering it. Arbitrarily nestable;
|
|
58
|
+
* each dock keyed by its own structural storage key. Drive it from state with
|
|
59
|
+
* `collapsed` + `onCollapsedChange`, or omit both for uncontrolled toggling
|
|
60
|
+
* (optionally `persist`ed). Distinct from the disclosure `Collapsible`
|
|
61
|
+
* (trigger + content show/hide) and `Dialog` / `Drawer` (portalled overlays).
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* import { East } from "@elaraai/east";
|
|
66
|
+
* import { Box, Dock, Text, UIComponentType } from "@elaraai/east-ui/internal";
|
|
67
|
+
*
|
|
68
|
+
* const sidebar = East.function([], UIComponentType, _$ =>
|
|
69
|
+
* Dock.Root(
|
|
70
|
+
* [Box.Root([Text.Root("Bookings library")], { padding: "3" })],
|
|
71
|
+
* { icon: "book", label: "Bookings", expandedSize: "25%" },
|
|
72
|
+
* ),
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
function createDock(children, options) {
|
|
77
|
+
const hasStyle = options !== undefined && (options.orientation !== undefined || options.side !== undefined
|
|
78
|
+
|| options.expandedSize !== undefined || options.railSize !== undefined
|
|
79
|
+
|| options.icon !== undefined || options.label !== undefined || options.badge !== undefined
|
|
80
|
+
|| options.persist !== undefined || options.keepMounted !== undefined
|
|
81
|
+
|| options.lazy !== undefined || options.animated !== undefined);
|
|
82
|
+
const styleValue = hasStyle
|
|
83
|
+
? East.value({
|
|
84
|
+
orientation: options.orientation !== undefined ? some(orientationValue(options.orientation)) : none,
|
|
85
|
+
side: options.side !== undefined ? some(sideValue(options.side)) : none,
|
|
86
|
+
expandedSize: options.expandedSize !== undefined ? some(options.expandedSize) : none,
|
|
87
|
+
railSize: options.railSize !== undefined ? some(options.railSize) : none,
|
|
88
|
+
icon: options.icon !== undefined ? some(options.icon) : none,
|
|
89
|
+
label: options.label !== undefined ? some(options.label) : none,
|
|
90
|
+
badge: options.badge !== undefined ? some(options.badge) : none,
|
|
91
|
+
persist: options.persist !== undefined ? some(persistValue(options.persist)) : none,
|
|
92
|
+
keepMounted: options.keepMounted !== undefined ? some(options.keepMounted) : none,
|
|
93
|
+
lazy: options.lazy !== undefined ? some(options.lazy) : none,
|
|
94
|
+
animated: options.animated !== undefined ? some(options.animated) : none,
|
|
95
|
+
}, DockStyleType)
|
|
96
|
+
: undefined;
|
|
97
|
+
return East.value(variant("Dock", {
|
|
98
|
+
body: children,
|
|
99
|
+
collapsed: options?.collapsed !== undefined ? some(options.collapsed) : none,
|
|
100
|
+
defaultCollapsed: options?.defaultCollapsed !== undefined ? some(options.defaultCollapsed) : none,
|
|
101
|
+
onCollapsedChange: options?.onCollapsedChange ? some(options.onCollapsedChange) : none,
|
|
102
|
+
style: styleValue ? some(styleValue) : none,
|
|
103
|
+
}), UIComponentType);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Dock primitive — an inline panel that collapses along an axis to an icon
|
|
107
|
+
* rail, staying in the document flow.
|
|
108
|
+
*
|
|
109
|
+
* @remarks
|
|
110
|
+
* Use `Dock.Root(children, opts)`. Types are exposed via `Dock.Types`.
|
|
111
|
+
*/
|
|
112
|
+
export const Dock = {
|
|
113
|
+
/**
|
|
114
|
+
* Creates a Dock component.
|
|
115
|
+
*
|
|
116
|
+
* @param children - The expanded content (UIComps)
|
|
117
|
+
* @param options - Optional collapsed-state / behaviour / presentation fields
|
|
118
|
+
* @returns An East expression representing the Dock component
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* import { East } from "@elaraai/east";
|
|
123
|
+
* import { Box, Dock, Text, UIComponentType } from "@elaraai/east-ui/internal";
|
|
124
|
+
*
|
|
125
|
+
* const ex = East.function([], UIComponentType, _$ =>
|
|
126
|
+
* Dock.Root(
|
|
127
|
+
* [Box.Root([Text.Root("Bookings library")], { padding: "3" })],
|
|
128
|
+
* { icon: "book", label: "Bookings", expandedSize: "25%" },
|
|
129
|
+
* ),
|
|
130
|
+
* );
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
Root: createDock,
|
|
134
|
+
Types: {
|
|
135
|
+
/**
|
|
136
|
+
* The concrete East type for Dock — mirrors the inline `Dock` variant
|
|
137
|
+
* in `component.ts`.
|
|
138
|
+
*/
|
|
139
|
+
Dock: DockType,
|
|
140
|
+
/** Presentation + behaviour config struct for Dock. */
|
|
141
|
+
Style: DockStyleType,
|
|
142
|
+
/** Collapse-axis variant (`horizontal` / `vertical`). */
|
|
143
|
+
Orientation: DockOrientationType,
|
|
144
|
+
/** Rail-edge variant (`start` / `end`). */
|
|
145
|
+
Side: DockSideType,
|
|
146
|
+
/** Persistence variant (`none` / `local` / `session`). */
|
|
147
|
+
Persist: DockPersistType,
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/layout/dock/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGH,IAAI,EACJ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,OAAO,EACP,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,O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,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI;QACjG,iBAAiB,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,IAAI;QACtF,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI;KAC9C,CAAC,EAAE,eAAe,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE;QACH;;;WAGG;QACH,IAAI,EAAE,QAAQ;QACd,uDAAuD;QACvD,KAAK,EAAE,aAAa;QACpB,yDAAyD;QACzD,WAAW,EAAE,mBAAmB;QAChC,2CAA2C;QAC3C,IAAI,EAAE,YAAY;QAClB,0DAA0D;QAC1D,OAAO,EAAE,eAAe;KAC3B;CACK,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type SubtypeExprOrValue, BooleanType, FunctionType, NullType, OptionType, StringType, StructType, VariantType } from "@elaraai/east";
|
|
6
|
+
/**
|
|
7
|
+
* The axis a {@link DockStyleType} collapses along.
|
|
8
|
+
*
|
|
9
|
+
* @property horizontal - Collapses its width to a vertical rail (a sidebar)
|
|
10
|
+
* @property vertical - Collapses its height to a horizontal rail (a tray)
|
|
11
|
+
*/
|
|
12
|
+
export declare const DockOrientationType: VariantType<{
|
|
13
|
+
readonly horizontal: NullType;
|
|
14
|
+
readonly vertical: NullType;
|
|
15
|
+
}>;
|
|
16
|
+
export type DockOrientationType = typeof DockOrientationType;
|
|
17
|
+
/**
|
|
18
|
+
* Which edge the collapsed rail pins to — also sets the toggle chevron
|
|
19
|
+
* direction.
|
|
20
|
+
*
|
|
21
|
+
* @property start - Leading edge (left when horizontal, top when vertical)
|
|
22
|
+
* @property end - Trailing edge (right when horizontal, bottom when vertical)
|
|
23
|
+
*/
|
|
24
|
+
export declare const DockSideType: VariantType<{
|
|
25
|
+
readonly start: NullType;
|
|
26
|
+
readonly end: NullType;
|
|
27
|
+
}>;
|
|
28
|
+
export type DockSideType = typeof DockSideType;
|
|
29
|
+
/**
|
|
30
|
+
* Where the uncontrolled collapsed state is persisted, keyed by the dock's
|
|
31
|
+
* structural storage key.
|
|
32
|
+
*
|
|
33
|
+
* @property none - Not persisted (resets on reload)
|
|
34
|
+
* @property local - `localStorage` (survives reload + browser restart)
|
|
35
|
+
* @property session - `sessionStorage` (survives reload, cleared with the tab)
|
|
36
|
+
*/
|
|
37
|
+
export declare const DockPersistType: VariantType<{
|
|
38
|
+
readonly none: NullType;
|
|
39
|
+
readonly local: NullType;
|
|
40
|
+
readonly session: NullType;
|
|
41
|
+
}>;
|
|
42
|
+
export type DockPersistType = typeof DockPersistType;
|
|
43
|
+
/**
|
|
44
|
+
* Presentation + behaviour configuration for a Dock. Every field optional;
|
|
45
|
+
* the renderer falls back to a horizontal sidebar that pins to the `start`
|
|
46
|
+
* edge, `44px` rail, keep-mounted body.
|
|
47
|
+
*
|
|
48
|
+
* @property orientation - Axis it collapses along (default `horizontal`)
|
|
49
|
+
* @property side - Edge the rail pins to → chevron direction (default `start`)
|
|
50
|
+
* @property expandedSize - Size ALONG the axis when expanded (px or %, e.g. `"25%"`)
|
|
51
|
+
* @property railSize - Size when collapsed — the icon rail (default `44px`)
|
|
52
|
+
* @property icon - Font Awesome icon name shown on the rail + header
|
|
53
|
+
* @property label - Header title (expanded) + rail tooltip / accessible name (collapsed)
|
|
54
|
+
* @property badge - Optional count/label shown on the rail + header
|
|
55
|
+
* @property persist - Where the uncontrolled collapsed state is persisted (default `none`)
|
|
56
|
+
* @property keepMounted - Keep the body mounted while collapsed to preserve its scroll / drag / search state (default `true`)
|
|
57
|
+
* @property lazy - Mount the body only on first expand (default `false`)
|
|
58
|
+
* @property animated - Smoothly transition the size between rail and expanded (default `false`)
|
|
59
|
+
*/
|
|
60
|
+
export declare const DockStyleType: StructType<{
|
|
61
|
+
readonly orientation: OptionType<VariantType<{
|
|
62
|
+
readonly horizontal: NullType;
|
|
63
|
+
readonly vertical: NullType;
|
|
64
|
+
}>>;
|
|
65
|
+
readonly side: OptionType<VariantType<{
|
|
66
|
+
readonly start: NullType;
|
|
67
|
+
readonly end: NullType;
|
|
68
|
+
}>>;
|
|
69
|
+
readonly expandedSize: OptionType<StringType>;
|
|
70
|
+
readonly railSize: OptionType<StringType>;
|
|
71
|
+
readonly icon: OptionType<StringType>;
|
|
72
|
+
readonly label: OptionType<StringType>;
|
|
73
|
+
readonly badge: OptionType<StringType>;
|
|
74
|
+
readonly persist: OptionType<VariantType<{
|
|
75
|
+
readonly none: NullType;
|
|
76
|
+
readonly local: NullType;
|
|
77
|
+
readonly session: NullType;
|
|
78
|
+
}>>;
|
|
79
|
+
readonly keepMounted: OptionType<BooleanType>;
|
|
80
|
+
readonly lazy: OptionType<BooleanType>;
|
|
81
|
+
readonly animated: OptionType<BooleanType>;
|
|
82
|
+
}>;
|
|
83
|
+
export type DockStyleType = typeof DockStyleType;
|
|
84
|
+
/** String shorthand for {@link DockOrientationType}. */
|
|
85
|
+
export type DockOrientationLiteral = "horizontal" | "vertical";
|
|
86
|
+
/** String shorthand for {@link DockSideType}. */
|
|
87
|
+
export type DockSideLiteral = "start" | "end";
|
|
88
|
+
/** String shorthand for {@link DockPersistType}. */
|
|
89
|
+
export type DockPersistLiteral = "none" | "local" | "session";
|
|
90
|
+
/**
|
|
91
|
+
* TypeScript style interface for {@link DockStyleType} — the flat config bag.
|
|
92
|
+
*/
|
|
93
|
+
export interface DockStyle {
|
|
94
|
+
/** Axis it collapses along (default `horizontal`). */
|
|
95
|
+
orientation?: SubtypeExprOrValue<DockOrientationType> | DockOrientationLiteral;
|
|
96
|
+
/** Edge the rail pins to → chevron direction (default `start`). */
|
|
97
|
+
side?: SubtypeExprOrValue<DockSideType> | DockSideLiteral;
|
|
98
|
+
/** Size along the axis when expanded (px or %, e.g. `"25%"`). */
|
|
99
|
+
expandedSize?: SubtypeExprOrValue<StringType>;
|
|
100
|
+
/** Size when collapsed — the icon rail (default `44px`). */
|
|
101
|
+
railSize?: SubtypeExprOrValue<StringType>;
|
|
102
|
+
/** Font Awesome icon name shown on the rail + header. */
|
|
103
|
+
icon?: SubtypeExprOrValue<StringType>;
|
|
104
|
+
/** Header title (expanded) + rail tooltip / accessible name (collapsed). */
|
|
105
|
+
label?: SubtypeExprOrValue<StringType>;
|
|
106
|
+
/** Optional count/label shown on the rail + header. */
|
|
107
|
+
badge?: SubtypeExprOrValue<StringType>;
|
|
108
|
+
/** Where the uncontrolled collapsed state is persisted (default `none`). */
|
|
109
|
+
persist?: SubtypeExprOrValue<DockPersistType> | DockPersistLiteral;
|
|
110
|
+
/** Keep the body mounted while collapsed to preserve its state (default `true`). */
|
|
111
|
+
keepMounted?: SubtypeExprOrValue<BooleanType>;
|
|
112
|
+
/** Mount the body only on first expand (default `false`). */
|
|
113
|
+
lazy?: SubtypeExprOrValue<BooleanType>;
|
|
114
|
+
/** Smoothly transition the size between rail and expanded (default `false`). */
|
|
115
|
+
animated?: SubtypeExprOrValue<BooleanType>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Dock options — passed to `Dock.Root(children, opts)`. Extends
|
|
119
|
+
* {@link DockStyle} with the collapsed-state behaviour fields.
|
|
120
|
+
*/
|
|
121
|
+
export interface DockOptions extends DockStyle {
|
|
122
|
+
/**
|
|
123
|
+
* Collapsed state. Synced on change (forms convention), so a
|
|
124
|
+
* `State.bind`-driven value controls the dock reactively; omit for
|
|
125
|
+
* uncontrolled toggling via the built-in control.
|
|
126
|
+
*/
|
|
127
|
+
collapsed?: SubtypeExprOrValue<BooleanType>;
|
|
128
|
+
/** Uncontrolled initial collapsed state (default `false`). */
|
|
129
|
+
defaultCollapsed?: SubtypeExprOrValue<BooleanType>;
|
|
130
|
+
/** Callback invoked with the new collapsed state when the user toggles. */
|
|
131
|
+
onCollapsedChange?: SubtypeExprOrValue<FunctionType<[BooleanType], NullType>>;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/layout/dock/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACd,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;EAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;EAGvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;EAI1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;EAYxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD,wDAAwD;AACxD,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,UAAU,CAAC;AAC/D,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,KAAK,CAAC;AAC9C,oDAAoD;AACpD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW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copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { BooleanType, FunctionType, NullType, OptionType, StringType, StructType, VariantType, } from "@elaraai/east";
|
|
6
|
+
/**
|
|
7
|
+
* The axis a {@link DockStyleType} collapses along.
|
|
8
|
+
*
|
|
9
|
+
* @property horizontal - Collapses its width to a vertical rail (a sidebar)
|
|
10
|
+
* @property vertical - Collapses its height to a horizontal rail (a tray)
|
|
11
|
+
*/
|
|
12
|
+
export const DockOrientationType = VariantType({
|
|
13
|
+
horizontal: NullType,
|
|
14
|
+
vertical: NullType,
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* Which edge the collapsed rail pins to — also sets the toggle chevron
|
|
18
|
+
* direction.
|
|
19
|
+
*
|
|
20
|
+
* @property start - Leading edge (left when horizontal, top when vertical)
|
|
21
|
+
* @property end - Trailing edge (right when horizontal, bottom when vertical)
|
|
22
|
+
*/
|
|
23
|
+
export const DockSideType = VariantType({
|
|
24
|
+
start: NullType,
|
|
25
|
+
end: NullType,
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Where the uncontrolled collapsed state is persisted, keyed by the dock's
|
|
29
|
+
* structural storage key.
|
|
30
|
+
*
|
|
31
|
+
* @property none - Not persisted (resets on reload)
|
|
32
|
+
* @property local - `localStorage` (survives reload + browser restart)
|
|
33
|
+
* @property session - `sessionStorage` (survives reload, cleared with the tab)
|
|
34
|
+
*/
|
|
35
|
+
export const DockPersistType = VariantType({
|
|
36
|
+
none: NullType,
|
|
37
|
+
local: NullType,
|
|
38
|
+
session: NullType,
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* Presentation + behaviour configuration for a Dock. Every field optional;
|
|
42
|
+
* the renderer falls back to a horizontal sidebar that pins to the `start`
|
|
43
|
+
* edge, `44px` rail, keep-mounted body.
|
|
44
|
+
*
|
|
45
|
+
* @property orientation - Axis it collapses along (default `horizontal`)
|
|
46
|
+
* @property side - Edge the rail pins to → chevron direction (default `start`)
|
|
47
|
+
* @property expandedSize - Size ALONG the axis when expanded (px or %, e.g. `"25%"`)
|
|
48
|
+
* @property railSize - Size when collapsed — the icon rail (default `44px`)
|
|
49
|
+
* @property icon - Font Awesome icon name shown on the rail + header
|
|
50
|
+
* @property label - Header title (expanded) + rail tooltip / accessible name (collapsed)
|
|
51
|
+
* @property badge - Optional count/label shown on the rail + header
|
|
52
|
+
* @property persist - Where the uncontrolled collapsed state is persisted (default `none`)
|
|
53
|
+
* @property keepMounted - Keep the body mounted while collapsed to preserve its scroll / drag / search state (default `true`)
|
|
54
|
+
* @property lazy - Mount the body only on first expand (default `false`)
|
|
55
|
+
* @property animated - Smoothly transition the size between rail and expanded (default `false`)
|
|
56
|
+
*/
|
|
57
|
+
export const DockStyleType = StructType({
|
|
58
|
+
orientation: OptionType(DockOrientationType),
|
|
59
|
+
side: OptionType(DockSideType),
|
|
60
|
+
expandedSize: OptionType(StringType),
|
|
61
|
+
railSize: OptionType(StringType),
|
|
62
|
+
icon: OptionType(StringType),
|
|
63
|
+
label: OptionType(StringType),
|
|
64
|
+
badge: OptionType(StringType),
|
|
65
|
+
persist: OptionType(DockPersistType),
|
|
66
|
+
keepMounted: OptionType(BooleanType),
|
|
67
|
+
lazy: OptionType(BooleanType),
|
|
68
|
+
animated: OptionType(BooleanType),
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/layout/dock/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEH,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,GACd,MAAM,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC3C,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,QAAQ;CACrB,CAAC,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC;IACpC,KAAK,EAAE,QAAQ;IACf,GAAG,EAAE,QAAQ;CAChB,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACvC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,QAAQ;CACpB,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACpC,WAAW,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAC5C,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC;IAC9B,YAAY,EAAE,UAAU,CAAC,UAAU,CAAC;IACpC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;IAChC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC;IAC5B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;IAC7B,OAAO,EAAE,UAAU,CAAC,eAAe,CAAC;IACpC,WAAW,EAAE,UAAU,CAAC,WAAW,CAAC;IACpC,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7B,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;CACpC,CAAC,CAAC"}
|
|
@@ -12,4 +12,5 @@ export { Splitter } from "./splitter/index.js";
|
|
|
12
12
|
export { Sticky } from "./sticky/index.js";
|
|
13
13
|
export { ScrollArea } from "./scroll-area/index.js";
|
|
14
14
|
export { Expandable } from "./expandable/index.js";
|
|
15
|
+
export { Dock } from "./dock/index.js";
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/src/layout/index.js
CHANGED
|
@@ -12,4 +12,5 @@ export { Splitter } from "./splitter/index.js";
|
|
|
12
12
|
export { Sticky } from "./sticky/index.js";
|
|
13
13
|
export { ScrollArea } from "./scroll-area/index.js";
|
|
14
14
|
export { Expandable } from "./expandable/index.js";
|
|
15
|
+
export { Dock } from "./dock/index.js";
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -236,6 +236,8 @@ export declare const Drawer: {
|
|
|
236
236
|
readonly bodyPadding: OptionType<StringType>;
|
|
237
237
|
readonly flush: OptionType<import("@elaraai/east").BooleanType>;
|
|
238
238
|
readonly fillBody: OptionType<import("@elaraai/east").BooleanType>;
|
|
239
|
+
readonly stacked: OptionType<import("@elaraai/east").BooleanType>;
|
|
240
|
+
readonly stackIcon: OptionType<StringType>;
|
|
239
241
|
}>;
|
|
240
242
|
/**
|
|
241
243
|
* Size variant type for Drawer component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlays/drawer/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAEvB,UAAU,EAAE,UAAU,EACtB,UAAU,EACV,SAAS,EAIT,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAGH,eAAe,EACf,KAAK,WAAW,EACnB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,KAAK,WAAW,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAM5E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC;IAChC,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,EAAE,SAAS,CAAC,eAAe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Value || style.contained !== undefined ||
|
|
72
72
|
style.onOpenChange !== undefined || style.onExitComplete !== undefined ||
|
|
73
|
-
style.bodyPadding !== undefined || style.flush !== undefined || style.fillBody !== undefined
|
|
73
|
+
style.bodyPadding !== undefined || style.flush !== undefined || style.fillBody !== undefined ||
|
|
74
|
+
style.stacked !== undefined || style.stackIcon !== undefined;
|
|
74
75
|
return East.value(variant("Drawer", {
|
|
75
76
|
trigger: trigger,
|
|
76
77
|
body: body,
|
|
@@ -87,6 +88,8 @@ function createDrawer(body, options) {
|
|
|
87
88
|
bodyPadding: style.bodyPadding !== undefined ? some(style.bodyPadding) : none,
|
|
88
89
|
flush: style.flush !== undefined ? some(style.flush) : none,
|
|
89
90
|
fillBody: style.fillBody !== undefined ? some(style.fillBody) : none,
|
|
91
|
+
stacked: style.stacked !== undefined ? some(style.stacked) : none,
|
|
92
|
+
stackIcon: style.stackIcon !== undefined ? some(style.stackIcon) : none,
|
|
90
93
|
}, DrawerStyleType))
|
|
91
94
|
: none,
|
|
92
95
|
}), UIComponentType);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/overlays/drawer/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGH,IAAI,EACJ,UAAU,EAAE,UAAU,EACtB,UAAU,EACV,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,eAAe,EAElB,MAAM,YAAY,CAAC;AAEpB,kBAAkB;AAClB,OAAO,EACH,cAAc,EACd,mBAAmB,EACnB,eAAe,GAElB,MAAM,YAAY,CAAC;AAGpB,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAOlB,UAAU,C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AK,EAAE,eAAe;QACtB;;;;;;;;;WASG;QACH,IAAI,EAAE,cAAc;QACpB;;;;;;;WAOG;QACH,SAAS,EAAE,mBAAmB;QAC9B;;;;;;;;;;;WAWG;QACH,SAAS,EAAE,mBAAmB;KACjC;CACK,CAAC"}
|
|
@@ -77,6 +77,10 @@ export declare const DrawerStyleType: StructType<{
|
|
|
77
77
|
readonly flush: OptionType<BooleanType>;
|
|
78
78
|
/** When `true`, body becomes a definite-height flex column so a single child fills + owns its scroll */
|
|
79
79
|
readonly fillBody: OptionType<BooleanType>;
|
|
80
|
+
/** When `true`, this drawer collapses to a thin vertical rail (icon + rotated title) while a deeper drawer is open on top of it, instead of hiding behind it (#328); clicking the rail pops the stack back to it */
|
|
81
|
+
readonly stacked: OptionType<BooleanType>;
|
|
82
|
+
/** Font Awesome icon name shown on the collapsed stack rail (#328); falls back to a chevron */
|
|
83
|
+
readonly stackIcon: OptionType<StringType>;
|
|
80
84
|
}>;
|
|
81
85
|
export type DrawerStyleType = typeof DrawerStyleType;
|
|
82
86
|
/**
|
|
@@ -135,5 +139,9 @@ export interface DrawerStyle {
|
|
|
135
139
|
flush?: SubtypeExprOrValue<BooleanType>;
|
|
136
140
|
/** When `true`, the body is a definite-height flex column (`minHeight:0`, clipped) so a single `height:100%`/`flex:1` child fills the panel and owns its internal scroll instead of the whole panel scrolling. */
|
|
137
141
|
fillBody?: SubtypeExprOrValue<BooleanType>;
|
|
142
|
+
/** When `true`, this drawer collapses to a thin vertical rail (icon + rotated title) while a deeper drawer is open on top of it — instead of hiding behind it — so the stack you drilled through stays a visible, navigable spine (#328). Click the rail to pop back to this drawer (closing the deeper ones); Esc pops one level. */
|
|
143
|
+
stacked?: SubtypeExprOrValue<BooleanType>;
|
|
144
|
+
/** Font Awesome icon name shown on the collapsed stack rail (#328); falls back to a chevron. */
|
|
145
|
+
stackIcon?: SubtypeExprOrValue<StringType>;
|
|
138
146
|
}
|
|
139
147
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/overlays/drawer/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,EACf,MAAM,eAAe,CAAC;AAMvB;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;;EAOzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAM1E;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;EAK9B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC;AAC7D,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AAMxE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;IAIxB,iDAAiD;;IAEjD,uDAAuD;;IAEvD,iEAAiE;;IAEjE,8EAA8E;;IAE9E,wGAAwG;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/overlays/drawer/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,EACf,MAAM,eAAe,CAAC;AAMvB;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;;EAOzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,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0B;IAC1B,aAAa,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAChD,sCAAsC;IACtC,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC5C,0BAA0B;IAC1B,aAAa,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAChD,iDAAiD;IACjD,YAAY,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzE,uDAAuD;IACvD,cAAc,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;IAChE,kEAAkE;IAClE,WAAW,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC7C,kIAAkI;IAClI,KAAK,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IACxC,kNAAkN;IAClN,QAAQ,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC3C,sUAAsU;IACtU,OAAO,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC1C,gGAAgG;IAChG,SAAS,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;CAC9C"}
|
|
@@ -70,5 +70,9 @@ export const DrawerStyleType = StructType({
|
|
|
70
70
|
flush: OptionType(BooleanType),
|
|
71
71
|
/** When `true`, body becomes a definite-height flex column so a single child fills + owns its scroll */
|
|
72
72
|
fillBody: OptionType(BooleanType),
|
|
73
|
+
/** When `true`, this drawer collapses to a thin vertical rail (icon + rotated title) while a deeper drawer is open on top of it, instead of hiding behind it (#328); clicking the rail pops the stack back to it */
|
|
74
|
+
stacked: OptionType(BooleanType),
|
|
75
|
+
/** Font Awesome icon name shown on the collapsed stack rail (#328); falls back to a chevron */
|
|
76
|
+
stackIcon: OptionType(StringType),
|
|
73
77
|
});
|
|
74
78
|
//# sourceMappingURL=types.js.map
|
|
@@ -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EAAE,UAAU,CAAC,YAAY,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;IACtD,iEAAiE;IACjE,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,8EAA8E;IAC9E,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IAC9B,wGAAwG;IACxG,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IACjC,oNAAoN;IACpN,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC;IAChC,+FAA+F;IAC/F,SAAS,EAAE,UAAU,CAAC,UAAU,CAAC;CACpC,CAAC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* `<Dock>` tag — see the export's JSDoc.
|
|
7
|
+
*/
|
|
8
|
+
import { Dock as DockFactory } from "../../layout/dock/index.js";
|
|
9
|
+
import { type ContainerProps, type JsxTag } from "../combinators.js";
|
|
10
|
+
/**
|
|
11
|
+
* An inline panel that collapses along one axis to a compact icon rail and
|
|
12
|
+
* expands back to its children, without leaving the document flow — siblings
|
|
13
|
+
* reflow to reclaim the freed space; it never overlays. The in-flow,
|
|
14
|
+
* collapse-to-rail sibling of `<Expandable>` (which instead fills the app
|
|
15
|
+
* container). Reach for it when a source panel should tuck away beside the
|
|
16
|
+
* thing it feeds — a `<Library>` drag-source beside a `<Planner>` drop-target,
|
|
17
|
+
* a filter rail beside a board — so the board grows while the panel is stowed
|
|
18
|
+
* and the drop-target is never covered.
|
|
19
|
+
*
|
|
20
|
+
* Collapsed, it shrinks to `railSize` and shows the `icon`, a chevron toggle
|
|
21
|
+
* (pointing away from `side`), and any `badge`; `label` becomes the rail's
|
|
22
|
+
* accessible name. Expanded, it is `expandedSize` along the axis with a header
|
|
23
|
+
* (`icon` + `label` + `badge` + collapse chevron) above the children. Drive it
|
|
24
|
+
* from state with `collapsed` + `onCollapsedChange`, or omit both for
|
|
25
|
+
* uncontrolled toggling — optionally `persist`ed across reloads. It is an
|
|
26
|
+
* ordinary flex child: place it in a `<Flex>` / `<HStack>` (horizontal) or
|
|
27
|
+
* `<VStack>` (vertical) whose sibling is `flex="1" minWidth="0"`. Arbitrarily
|
|
28
|
+
* nestable. Esc does NOT collapse it (it's inline content, not a modal).
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
33
|
+
* import { East } from "@elaraai/east";
|
|
34
|
+
* import { Box, Dock, HStack, Planner, Text, UIComponentType } from "@elaraai/east-ui";
|
|
35
|
+
*
|
|
36
|
+
* const board = East.function([], UIComponentType, _$ => (
|
|
37
|
+
* <HStack gap="4" width="100%">
|
|
38
|
+
* <Dock icon="book" label="Bookings" expandedSize="25%">
|
|
39
|
+
* <Box padding="3" background="bg.surface"><Text>Drag source…</Text></Box>
|
|
40
|
+
* </Dock>
|
|
41
|
+
* <Box flex="1" minWidth="0"><Text>Board / drop target…</Text></Box>
|
|
42
|
+
* </HStack>
|
|
43
|
+
* ));
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Carries `Dock.Types` — the East data type and config struct. Desugars to
|
|
48
|
+
* `Dock.Root(children, options)`.
|
|
49
|
+
*/
|
|
50
|
+
export declare const Dock: JsxTag<ContainerProps<typeof DockFactory.Root>> & {
|
|
51
|
+
Types: typeof DockFactory.Types;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=dock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock.d.ts","sourceRoot":"","sources":["../../../../src/runtime/layout/dock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG;IAAE,KAAK,EAAE,OAAO,WAAW,CAAC,KAAK,CAAA;CAC1B,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* `<Dock>` tag — see the export's JSDoc.
|
|
7
|
+
*/
|
|
8
|
+
import { Dock as DockFactory } from "../../layout/dock/index.js";
|
|
9
|
+
import { container } from "../combinators.js";
|
|
10
|
+
/**
|
|
11
|
+
* An inline panel that collapses along one axis to a compact icon rail and
|
|
12
|
+
* expands back to its children, without leaving the document flow — siblings
|
|
13
|
+
* reflow to reclaim the freed space; it never overlays. The in-flow,
|
|
14
|
+
* collapse-to-rail sibling of `<Expandable>` (which instead fills the app
|
|
15
|
+
* container). Reach for it when a source panel should tuck away beside the
|
|
16
|
+
* thing it feeds — a `<Library>` drag-source beside a `<Planner>` drop-target,
|
|
17
|
+
* a filter rail beside a board — so the board grows while the panel is stowed
|
|
18
|
+
* and the drop-target is never covered.
|
|
19
|
+
*
|
|
20
|
+
* Collapsed, it shrinks to `railSize` and shows the `icon`, a chevron toggle
|
|
21
|
+
* (pointing away from `side`), and any `badge`; `label` becomes the rail's
|
|
22
|
+
* accessible name. Expanded, it is `expandedSize` along the axis with a header
|
|
23
|
+
* (`icon` + `label` + `badge` + collapse chevron) above the children. Drive it
|
|
24
|
+
* from state with `collapsed` + `onCollapsedChange`, or omit both for
|
|
25
|
+
* uncontrolled toggling — optionally `persist`ed across reloads. It is an
|
|
26
|
+
* ordinary flex child: place it in a `<Flex>` / `<HStack>` (horizontal) or
|
|
27
|
+
* `<VStack>` (vertical) whose sibling is `flex="1" minWidth="0"`. Arbitrarily
|
|
28
|
+
* nestable. Esc does NOT collapse it (it's inline content, not a modal).
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // .tsx file with the `@jsxImportSource @elaraai/east-ui` pragma
|
|
33
|
+
* import { East } from "@elaraai/east";
|
|
34
|
+
* import { Box, Dock, HStack, Planner, Text, UIComponentType } from "@elaraai/east-ui";
|
|
35
|
+
*
|
|
36
|
+
* const board = East.function([], UIComponentType, _$ => (
|
|
37
|
+
* <HStack gap="4" width="100%">
|
|
38
|
+
* <Dock icon="book" label="Bookings" expandedSize="25%">
|
|
39
|
+
* <Box padding="3" background="bg.surface"><Text>Drag source…</Text></Box>
|
|
40
|
+
* </Dock>
|
|
41
|
+
* <Box flex="1" minWidth="0"><Text>Board / drop target…</Text></Box>
|
|
42
|
+
* </HStack>
|
|
43
|
+
* ));
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Carries `Dock.Types` — the East data type and config struct. Desugars to
|
|
48
|
+
* `Dock.Root(children, options)`.
|
|
49
|
+
*/
|
|
50
|
+
export const Dock = Object.assign(container(DockFactory.Root), { Types: DockFactory.Types });
|
|
51
|
+
//# sourceMappingURL=dock.js.map
|