react-material-design 0.0.0-stage → 0.5.1
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 +12 -2
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/components/Button/context.cjs +1 -0
- package/dist/components/Button/context.d.ts +29 -0
- package/dist/components/Button/context.js +41 -0
- package/dist/components/Button/default/index.cjs +1 -0
- package/dist/components/Button/default/index.d.ts +26 -0
- package/dist/components/Button/default/index.js +22 -0
- package/dist/components/Button/default/render.cjs +1 -0
- package/dist/components/Button/default/render.d.ts +3 -0
- package/dist/components/Button/default/render.js +203 -0
- package/dist/components/Button/default/style.css +1 -0
- package/dist/components/Button/group/index.cjs +1 -0
- package/dist/components/Button/group/index.d.ts +2 -0
- package/dist/components/Button/group/index.js +1 -0
- package/dist/components/Button/group/render.cjs +1 -0
- package/dist/components/Button/group/render.d.ts +49 -0
- package/dist/components/Button/group/render.js +100 -0
- package/dist/components/Button/group/style.css +1 -0
- package/dist/components/Button/icon/index.cjs +1 -0
- package/dist/components/Button/icon/index.d.ts +22 -0
- package/dist/components/Button/icon/index.js +23 -0
- package/dist/components/Button/icon/render.cjs +1 -0
- package/dist/components/Button/icon/render.d.ts +4 -0
- package/dist/components/Button/icon/render.js +178 -0
- package/dist/components/Button/icon/style.css +1 -0
- package/dist/components/Button/index.cjs +1 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js +55 -0
- package/dist/components/Button/split/index.cjs +1 -0
- package/dist/components/Button/split/index.d.ts +6 -0
- package/dist/components/Button/split/index.js +33 -0
- package/dist/components/Button/split/style.css +1 -0
- package/dist/components/Button/types.d.ts +19 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Chip/index.cjs +1 -0
- package/dist/components/Chip/index.d.ts +50 -0
- package/dist/components/Chip/index.js +156 -0
- package/dist/components/Chip/style.css +1 -0
- package/dist/components/ContextMenu/index.cjs +1 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/ContextMenu/index.js +19 -0
- package/dist/components/ContextMenu/render.cjs +1 -0
- package/dist/components/ContextMenu/render.d.ts +4 -0
- package/dist/components/ContextMenu/render.js +59 -0
- package/dist/components/Dialog/Dialog.cjs +1 -0
- package/dist/components/Dialog/Dialog.d.ts +23 -0
- package/dist/components/Dialog/Dialog.js +182 -0
- package/dist/components/Dialog/DialogActions.cjs +1 -0
- package/dist/components/Dialog/DialogActions.d.ts +3 -0
- package/dist/components/Dialog/DialogActions.js +17 -0
- package/dist/components/Dialog/index.cjs +1 -0
- package/dist/components/Dialog/index.d.ts +4 -0
- package/dist/components/Dialog/index.js +3 -0
- package/dist/components/Dialog/style.css +1 -0
- package/dist/components/Divider/index.cjs +1 -0
- package/dist/components/Divider/index.d.ts +6 -0
- package/dist/components/Divider/index.js +29 -0
- package/dist/components/Divider/style.css +1 -0
- package/dist/components/Font/index.d.ts +9 -0
- package/dist/components/Icon/Icon.cjs +1 -0
- package/dist/components/Icon/Icon.d.ts +18 -0
- package/dist/components/Icon/Icon.js +47 -0
- package/dist/components/Icon/index.cjs +1 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Icon/index.js +1 -0
- package/dist/components/Icon/style.css +1 -0
- package/dist/components/Menu/Menu.cjs +1 -0
- package/dist/components/Menu/Menu.d.ts +4 -0
- package/dist/components/Menu/Menu.js +10 -0
- package/dist/components/Menu/Menu.render.cjs +1 -0
- package/dist/components/Menu/Menu.render.d.ts +15 -0
- package/dist/components/Menu/Menu.render.js +55 -0
- package/dist/components/Menu/MenuContainer.cjs +1 -0
- package/dist/components/Menu/MenuContainer.d.ts +7 -0
- package/dist/components/Menu/MenuContainer.js +46 -0
- package/dist/components/Menu/MenuGroup.cjs +1 -0
- package/dist/components/Menu/MenuGroup.d.ts +11 -0
- package/dist/components/Menu/MenuGroup.js +34 -0
- package/dist/components/Menu/MenuGroup.render.cjs +1 -0
- package/dist/components/Menu/MenuGroup.render.d.ts +6 -0
- package/dist/components/Menu/MenuGroup.render.js +31 -0
- package/dist/components/Menu/MenuItem.cjs +1 -0
- package/dist/components/Menu/MenuItem.d.ts +19 -0
- package/dist/components/Menu/MenuItem.js +30 -0
- package/dist/components/Menu/MenuItem.render.cjs +1 -0
- package/dist/components/Menu/MenuItem.render.d.ts +7 -0
- package/dist/components/Menu/MenuItem.render.js +75 -0
- package/dist/components/Menu/index.cjs +1 -0
- package/dist/components/Menu/index.d.ts +3 -0
- package/dist/components/Menu/index.js +4 -0
- package/dist/components/Menu/style.css +1 -0
- package/dist/components/Menubar/MenuSection.cjs +1 -0
- package/dist/components/Menubar/MenuSection.d.ts +8 -0
- package/dist/components/Menubar/MenuSection.js +21 -0
- package/dist/components/Menubar/index.cjs +1 -0
- package/dist/components/Menubar/index.d.ts +3 -0
- package/dist/components/Menubar/index.js +20 -0
- package/dist/components/Menubar/render.cjs +1 -0
- package/dist/components/Menubar/render.d.ts +3 -0
- package/dist/components/Menubar/render.js +58 -0
- package/dist/components/Menubar/style.css +1 -0
- package/dist/components/NumberField/NumberField.cjs +1 -0
- package/dist/components/NumberField/NumberField.d.ts +2 -0
- package/dist/components/NumberField/NumberField.js +19 -0
- package/dist/components/NumberField/NumberField.render.cjs +1 -0
- package/dist/components/NumberField/NumberField.render.d.ts +10 -0
- package/dist/components/NumberField/NumberField.render.js +268 -0
- package/dist/components/NumberField/index.cjs +1 -0
- package/dist/components/NumberField/index.d.ts +2 -0
- package/dist/components/NumberField/index.js +1 -0
- package/dist/components/NumberField/style.css +1 -0
- package/dist/components/ProgressIndicator/index.d.ts +9 -0
- package/dist/components/Select/Option.cjs +1 -0
- package/dist/components/Select/Option.d.ts +10 -0
- package/dist/components/Select/Option.js +24 -0
- package/dist/components/Select/Select.cjs +1 -0
- package/dist/components/Select/Select.d.ts +32 -0
- package/dist/components/Select/Select.js +265 -0
- package/dist/components/Select/index.cjs +1 -0
- package/dist/components/Select/index.d.ts +4 -0
- package/dist/components/Select/index.js +3 -0
- package/dist/components/Select/style.css +1 -0
- package/dist/components/Slider/Slider.cjs +1 -0
- package/dist/components/Slider/Slider.d.ts +26 -0
- package/dist/components/Slider/Slider.js +342 -0
- package/dist/components/Slider/index.cjs +1 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.js +1 -0
- package/dist/components/Slider/style.css +1 -0
- package/dist/components/TextField/TextField.cjs +1 -0
- package/dist/components/TextField/TextField.d.ts +2 -0
- package/dist/components/TextField/TextField.js +19 -0
- package/dist/components/TextField/TextField.render.cjs +1 -0
- package/dist/components/TextField/TextField.render.d.ts +19 -0
- package/dist/components/TextField/TextField.render.js +159 -0
- package/dist/components/TextField/index.cjs +1 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/TextField/index.js +1 -0
- package/dist/components/TextField/style.css +1 -0
- package/dist/components/Theme/Theme.cjs +4 -0
- package/dist/components/Theme/Theme.d.ts +14 -0
- package/dist/components/Theme/Theme.js +183 -0
- package/dist/components/Theme/index.cjs +1 -0
- package/dist/components/Theme/index.d.ts +1 -0
- package/dist/components/Theme/index.js +1 -0
- package/dist/components/Theme/style.css +1 -0
- package/dist/components/Theme/types.d.ts +29 -0
- package/dist/components/Toolbar/Toolbar.cjs +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +3 -0
- package/dist/components/Toolbar/Toolbar.js +19 -0
- package/dist/components/Toolbar/Toolbar.render.cjs +1 -0
- package/dist/components/Toolbar/Toolbar.render.d.ts +14 -0
- package/dist/components/Toolbar/Toolbar.render.js +64 -0
- package/dist/components/Toolbar/index.cjs +1 -0
- package/dist/components/Toolbar/index.d.ts +2 -0
- package/dist/components/Toolbar/index.js +1 -0
- package/dist/components/Toolbar/style.css +1 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +12 -0
- package/dist/components/Tooltip/Tooltip.js +52 -0
- package/dist/components/Tooltip/index.cjs +1 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/components/Tooltip/style.css +1 -0
- package/dist/components/containers/FilledField/index.cjs +1 -0
- package/dist/components/containers/FilledField/index.d.ts +9 -0
- package/dist/components/containers/FilledField/index.js +40 -0
- package/dist/components/containers/FilledField/style.css +1 -0
- package/dist/components/containers/OutlinedField/index.cjs +1 -0
- package/dist/components/containers/OutlinedField/index.d.ts +9 -0
- package/dist/components/containers/OutlinedField/index.js +59 -0
- package/dist/components/containers/OutlinedField/style.css +1 -0
- package/dist/components/misc/FloatingElement/index.cjs +1 -0
- package/dist/components/misc/FloatingElement/index.d.ts +17 -0
- package/dist/components/misc/FloatingElement/index.js +106 -0
- package/dist/components/misc/FloatingElement/style.css +1 -0
- package/dist/components/misc/OrderedCollection/index.cjs +1 -0
- package/dist/components/misc/OrderedCollection/index.d.ts +27 -0
- package/dist/components/misc/OrderedCollection/index.js +98 -0
- package/dist/components/misc/OrderedCollection/style.css +1 -0
- package/dist/components/misc/Polymorphic.cjs +1 -0
- package/dist/components/misc/Polymorphic.d.ts +15 -0
- package/dist/components/misc/Polymorphic.js +51 -0
- package/dist/components/misc/StateLayer/index.cjs +1 -0
- package/dist/components/misc/StateLayer/index.d.ts +7 -0
- package/dist/components/misc/StateLayer/index.js +67 -0
- package/dist/components/misc/StateLayer/style.css +1 -0
- package/dist/components/misc/Transitionable/index.cjs +1 -0
- package/dist/components/misc/Transitionable/index.d.ts +6 -0
- package/dist/components/misc/Transitionable/index.js +54 -0
- package/dist/components/misc/Transitionable/style.css +1 -0
- package/dist/components/types.cjs +1 -0
- package/dist/components/types.d.ts +20 -0
- package/dist/components/types.js +13 -0
- package/dist/hooks/useFloating/autoUpdate.cjs +1 -0
- package/dist/hooks/useFloating/autoUpdate.d.ts +9 -0
- package/dist/hooks/useFloating/autoUpdate.js +64 -0
- package/dist/hooks/useFloating/index.cjs +1 -0
- package/dist/hooks/useFloating/index.d.ts +30 -0
- package/dist/hooks/useFloating/index.js +97 -0
- package/dist/hooks/useFloating/middleware/flip.cjs +1 -0
- package/dist/hooks/useFloating/middleware/flip.d.ts +2 -0
- package/dist/hooks/useFloating/middleware/flip.js +88 -0
- package/dist/hooks/useFloating/middleware/offset.cjs +1 -0
- package/dist/hooks/useFloating/middleware/offset.d.ts +2 -0
- package/dist/hooks/useFloating/middleware/offset.js +42 -0
- package/dist/hooks/useFloating/middleware/shift.cjs +1 -0
- package/dist/hooks/useFloating/middleware/shift.d.ts +2 -0
- package/dist/hooks/useFloating/middleware/shift.js +11 -0
- package/dist/hooks/useFloating/middleware/size.cjs +1 -0
- package/dist/hooks/useFloating/middleware/size.d.ts +6 -0
- package/dist/hooks/useFloating/middleware/size.js +7 -0
- package/dist/hooks/useFloating/utils.cjs +1 -0
- package/dist/hooks/useFloating/utils.d.ts +22 -0
- package/dist/hooks/useFloating/utils.js +145 -0
- package/dist/layouts/Content.cjs +1 -0
- package/dist/layouts/Content.d.ts +3 -0
- package/dist/layouts/Content.js +17 -0
- package/dist/layouts/Page/index.cjs +1 -0
- package/dist/layouts/Page/index.d.ts +7 -0
- package/dist/layouts/Page/index.js +135 -0
- package/dist/layouts/Page/style.css +1 -0
- package/dist/layouts/Panes/Pane.cjs +1 -0
- package/dist/layouts/Panes/Pane.d.ts +11 -0
- package/dist/layouts/Panes/Pane.js +27 -0
- package/dist/layouts/Panes/Pane.render.cjs +1 -0
- package/dist/layouts/Panes/Pane.render.d.ts +6 -0
- package/dist/layouts/Panes/Pane.render.js +36 -0
- package/dist/layouts/Panes/Panes.cjs +1 -0
- package/dist/layouts/Panes/Panes.d.ts +28 -0
- package/dist/layouts/Panes/Panes.js +182 -0
- package/dist/layouts/Panes/index.cjs +1 -0
- package/dist/layouts/Panes/index.d.ts +4 -0
- package/dist/layouts/Panes/index.js +3 -0
- package/dist/layouts/Panes/style.css +1 -0
- package/dist/layouts/Tabs/Tab.cjs +1 -0
- package/dist/layouts/Tabs/Tab.d.ts +13 -0
- package/dist/layouts/Tabs/Tab.js +33 -0
- package/dist/layouts/Tabs/Tabs.cjs +1 -0
- package/dist/layouts/Tabs/Tabs.d.ts +9 -0
- package/dist/layouts/Tabs/Tabs.js +110 -0
- package/dist/layouts/Tabs/index.cjs +1 -0
- package/dist/layouts/Tabs/index.d.ts +4 -0
- package/dist/layouts/Tabs/index.js +3 -0
- package/dist/layouts/Tabs/style.css +1 -0
- package/dist/layouts/Toolbox/index.cjs +1 -0
- package/dist/layouts/Toolbox/index.d.ts +5 -0
- package/dist/layouts/Toolbox/index.js +129 -0
- package/dist/layouts/Toolbox/style.css +1 -0
- package/dist/style/motions.d.ts +37 -0
- package/dist/style/shapes/12_sided_cookie.d.ts +3 -0
- package/dist/style/shapes/4_leaf_clover.d.ts +3 -0
- package/dist/style/shapes/4_sided_cookie.d.ts +3 -0
- package/dist/style/shapes/6_sided_cookie.d.ts +3 -0
- package/dist/style/shapes/7_sided_cookie.d.ts +3 -0
- package/dist/style/shapes/8_leaf_clover.d.ts +3 -0
- package/dist/style/shapes/9_sided_cookie.d.ts +3 -0
- package/dist/style/shapes/arch.d.ts +3 -0
- package/dist/style/shapes/arrow.d.ts +3 -0
- package/dist/style/shapes/boom.d.ts +3 -0
- package/dist/style/shapes/bun.d.ts +3 -0
- package/dist/style/shapes/burst.d.ts +3 -0
- package/dist/style/shapes/circle.d.ts +3 -0
- package/dist/style/shapes/clamshell.d.ts +3 -0
- package/dist/style/shapes/diamond.d.ts +3 -0
- package/dist/style/shapes/fan.d.ts +3 -0
- package/dist/style/shapes/flower.d.ts +3 -0
- package/dist/style/shapes/gem.d.ts +3 -0
- package/dist/style/shapes/ghost_ish.d.ts +3 -0
- package/dist/style/shapes/heart.d.ts +3 -0
- package/dist/style/shapes/index.d.ts +109 -0
- package/dist/style/shapes/oval.d.ts +3 -0
- package/dist/style/shapes/pentagon.d.ts +3 -0
- package/dist/style/shapes/pill.d.ts +3 -0
- package/dist/style/shapes/pixel_circle.d.ts +3 -0
- package/dist/style/shapes/pixel_triangle.d.ts +3 -0
- package/dist/style/shapes/puffy.d.ts +3 -0
- package/dist/style/shapes/puffy_diamond.d.ts +3 -0
- package/dist/style/shapes/semicircle.d.ts +3 -0
- package/dist/style/shapes/slanted.d.ts +3 -0
- package/dist/style/shapes/soft_boom.d.ts +3 -0
- package/dist/style/shapes/soft_burst.d.ts +3 -0
- package/dist/style/shapes/square.d.ts +3 -0
- package/dist/style/shapes/sunny.d.ts +3 -0
- package/dist/style/shapes/triangle.d.ts +3 -0
- package/dist/style/shapes/very_sunny.d.ts +3 -0
- package/dist/style/symbols.d.ts +2 -0
- package/dist/utils/dom.cjs +1 -0
- package/dist/utils/dom.d.ts +2 -0
- package/dist/utils/dom.js +53 -0
- package/dist/utils/hooks.cjs +1 -0
- package/dist/utils/hooks.d.ts +17 -0
- package/dist/utils/hooks.js +9 -0
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts +44 -0
- package/dist/utils/index.js +78 -0
- package/package.json +169 -4
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SizeUnit } from '../../utils/index';
|
|
2
|
+
import { PointerEvent, PropsWithChildren } from 'react';
|
|
3
|
+
export interface SavedPane {
|
|
4
|
+
size: SizeUnit;
|
|
5
|
+
collapsed: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface PanesProps extends PropsWithChildren {
|
|
8
|
+
orientation?: "horizontal" | "vertical";
|
|
9
|
+
className?: string;
|
|
10
|
+
defaultLayout?: Record<string, SavedPane>;
|
|
11
|
+
autoSaveId?: string;
|
|
12
|
+
onLayoutChange?: (layout: Record<string, SavedPane>) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface PaneData {
|
|
15
|
+
id: string;
|
|
16
|
+
size: SizeUnit | "auto";
|
|
17
|
+
snapped: boolean;
|
|
18
|
+
collapsed: boolean;
|
|
19
|
+
isRecovering: boolean;
|
|
20
|
+
isAnimating: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface PanesContext {
|
|
23
|
+
activeDrag: string | null;
|
|
24
|
+
startDrag: (leftId: string, rightId: string, event: PointerEvent) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const PanesContext: import('react').Context<PanesContext | null>;
|
|
27
|
+
export declare const usePanes: () => PanesContext;
|
|
28
|
+
export default function Panes(props: PanesProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { formatSizeFromPx as e, getComponentTokenValue as t, isBrowser as n, parseSizeToPx as r } from "../../utils/index.js";
|
|
2
|
+
import { useIsomorphicLayoutEffect as i } from "../../utils/hooks.js";
|
|
3
|
+
import a from "../../components/misc/OrderedCollection/index.js";
|
|
4
|
+
import o from "./Pane.render.js";
|
|
5
|
+
import './style.css';/* empty css */
|
|
6
|
+
import { c as s } from "react/compiler-runtime";
|
|
7
|
+
import c from "classnames";
|
|
8
|
+
import { Fragment as l, createContext as u, useCallback as d, useContext as f, useEffectEvent as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
9
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
10
|
+
import { useElementRef as y, useWindowEventListener as b } from "react-dom-event-hooks";
|
|
11
|
+
//#region lib/layouts/Panes/Panes.tsx
|
|
12
|
+
var x = u(null), S = () => {
|
|
13
|
+
let e = f(x);
|
|
14
|
+
if (!e) throw Error("MenuPane or MenuGroup must be used in Menu component");
|
|
15
|
+
return e;
|
|
16
|
+
};
|
|
17
|
+
function C(e) {
|
|
18
|
+
let t = s(10), { startDrag: n, activeDrag: r } = S(), i = r === e.leftId, a;
|
|
19
|
+
t[0] !== e.leftId || t[1] !== e.rightId || t[2] !== n ? (a = (t) => n(e.leftId, e.rightId, t), t[0] = e.leftId, t[1] = e.rightId, t[2] = n, t[3] = a) : a = t[3];
|
|
20
|
+
let o = a, l;
|
|
21
|
+
t[4] === i ? l = t[5] : (l = c("ResizeHandle", { dragging: i }), t[4] = i, t[5] = l);
|
|
22
|
+
let u;
|
|
23
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ _("div", { className: "handle" }), t[6] = u) : u = t[6];
|
|
24
|
+
let d;
|
|
25
|
+
return t[7] !== o || t[8] !== l ? (d = /* @__PURE__ */ _("div", {
|
|
26
|
+
className: l,
|
|
27
|
+
role: "separator",
|
|
28
|
+
onPointerDown: o,
|
|
29
|
+
children: u
|
|
30
|
+
}), t[7] = o, t[8] = l, t[9] = d) : d = t[9], d;
|
|
31
|
+
}
|
|
32
|
+
function w(s) {
|
|
33
|
+
let { orientation: u = "horizontal", autoSaveId: f, onLayoutChange: S } = s, [w, T] = g(0), [E, D] = g(0), { saveRef: O } = y(d((e) => {
|
|
34
|
+
let n = e.getBoundingClientRect();
|
|
35
|
+
D(u === "horizontal" ? n.width : n.height), T(t(e, "panes-handle-size"));
|
|
36
|
+
}, [u])), [k, A] = g([]), [j, M] = g({}), N = m(() => Math.max(0, k.length - 1) * w, [w, k.length]), P = m(() => Math.max(0, E - N), [E, N]), [F, I] = g(null), L = h(null), R = h(null), z = h({}), B = d((e, t) => !(e.id !== t.id || e.defaultSize !== t.defaultSize || e.minSize !== t.minSize || e.snapPoints?.length !== t.snapPoints?.length || t.snapPoints?.every((t, n) => t !== e.snapPoints?.at(n)) || e.className !== t.className || e.children !== t.children), []), V = d((e) => {
|
|
37
|
+
A(e), M(e.reduce((e, t) => {
|
|
38
|
+
let n = j[t.id];
|
|
39
|
+
return e[t.id] = {
|
|
40
|
+
id: t.id,
|
|
41
|
+
size: n ? n.size : L.current?.[t.id]?.size ?? t.defaultSize ?? "auto",
|
|
42
|
+
snapped: n ? n.snapped : !1,
|
|
43
|
+
collapsed: n ? n.collapsed : L.current?.[t.id]?.collapsed ?? !1,
|
|
44
|
+
isRecovering: n ? n.isRecovering : !1,
|
|
45
|
+
isAnimating: n ? n.isAnimating : !1
|
|
46
|
+
}, e;
|
|
47
|
+
}, {}));
|
|
48
|
+
}, [j]), H = p(() => {
|
|
49
|
+
M((e) => {
|
|
50
|
+
let t = k.filter((t) => e[t.id]?.size === "auto"), n = { ...e }, i, a = 0, o = 0, s, c;
|
|
51
|
+
return t.length === 0 ? e : (k.forEach((t) => {
|
|
52
|
+
i = e[t.id]?.size, i && i !== "auto" && (typeof i == "string" && i.endsWith("%") && (o += parseFloat(i)), a += r(i, P, 0));
|
|
53
|
+
}), P > 0 ? (s = Math.max(0, P - a), c = s / P * 100 / t.length, t.forEach((e) => n[e.id] = {
|
|
54
|
+
...n[e.id],
|
|
55
|
+
size: `${c}%`
|
|
56
|
+
})) : (s = Math.max(0, 100 - o), c = s / t.length, t.forEach((e) => n[e.id] = {
|
|
57
|
+
...n[e.id],
|
|
58
|
+
size: `${c}%`
|
|
59
|
+
})), n);
|
|
60
|
+
});
|
|
61
|
+
}), U = d((e) => {
|
|
62
|
+
let t = {};
|
|
63
|
+
for (let n in e) t[n] = {
|
|
64
|
+
size: e[n].size,
|
|
65
|
+
collapsed: e[n].collapsed
|
|
66
|
+
};
|
|
67
|
+
f && typeof window < "u" && localStorage.setItem(`material-panes-${f}`, JSON.stringify(t)), S?.(t);
|
|
68
|
+
}, [f, S]), W = m(() => ({
|
|
69
|
+
activeDrag: F,
|
|
70
|
+
startDrag(e, t, n) {
|
|
71
|
+
let i = j[e], a = j[t];
|
|
72
|
+
i && a && P && (n.preventDefault(), n.currentTarget.setPointerCapture(n.pointerId), R.current = {
|
|
73
|
+
leftId: e,
|
|
74
|
+
rightId: t,
|
|
75
|
+
startX: n.clientX,
|
|
76
|
+
startY: n.clientY,
|
|
77
|
+
startLeftPx: r(i.size, P),
|
|
78
|
+
startRightPx: r(a.size, P)
|
|
79
|
+
}, I(e));
|
|
80
|
+
}
|
|
81
|
+
}), [
|
|
82
|
+
F,
|
|
83
|
+
P,
|
|
84
|
+
j
|
|
85
|
+
]), G = m(() => k.map((e, t) => {
|
|
86
|
+
let n = j[e.id];
|
|
87
|
+
return n ? /* @__PURE__ */ v(l, { children: [!!t && /* @__PURE__ */ _(C, {
|
|
88
|
+
leftId: k[t - 1]?.id,
|
|
89
|
+
rightId: e.id
|
|
90
|
+
}), /* @__PURE__ */ _(o, {
|
|
91
|
+
...n,
|
|
92
|
+
...e,
|
|
93
|
+
totalHandlesSize: N,
|
|
94
|
+
activeDrag: F,
|
|
95
|
+
children: e.children
|
|
96
|
+
})] }, n.id) : null;
|
|
97
|
+
}), [
|
|
98
|
+
F,
|
|
99
|
+
j,
|
|
100
|
+
k,
|
|
101
|
+
N
|
|
102
|
+
]);
|
|
103
|
+
return b("pointermove", (t) => {
|
|
104
|
+
if (!R.current) return;
|
|
105
|
+
let { leftId: n, rightId: i, startX: a, startY: o, startLeftPx: s, startRightPx: c } = R.current, l = u === "horizontal" ? t.clientX - a : t.clientY - o, d = s + c, f = k.find((e) => e.id === n), p = k.find((e) => e.id === i), m = j[n], h = j[i], g = r(f?.minSize, P, 0), _ = r(p?.minSize, P, 0), v = s + l, y = c - l, b, x = !1, S = !1, C = !1, w = !1, T = !1, E, D, O;
|
|
106
|
+
if (f?.snapPoints) {
|
|
107
|
+
for (let e of f.snapPoints) if (b = r(e, P), Math.abs(v - b) < 20) {
|
|
108
|
+
v = b, y = d - v, x = !0, w = !0;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (!x && p?.snapPoints) {
|
|
113
|
+
for (let e of p.snapPoints) if (b = r(e, P), Math.abs(y - b) < 20) {
|
|
114
|
+
y = b, v = d - y, T = !0;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
v < g / 2 ? (S = !0, v = 0, y = d) : v < g && (v = g, y = d - g), y < _ / 2 ? (C = !0, y = 0, v = d) : y < _ && (y = _, v = d - _), v < 0 && (v = 0, y = d), y < 0 && (v = d, y = 0), E = !S && m.collapsed || !w && m.snapped, D = !C && h.collapsed || !T && h.snapped, O = m.isRecovering || h.isRecovering || !1, E || D ? (O = !0, z.current[n] && clearTimeout(z.current[n]), z.current[n] = setTimeout(() => {
|
|
119
|
+
M((e) => {
|
|
120
|
+
let t = { ...e };
|
|
121
|
+
return t[n] && (t[n] = {
|
|
122
|
+
...t[n],
|
|
123
|
+
isRecovering: !1,
|
|
124
|
+
isAnimating: !1
|
|
125
|
+
}), t[i] && (t[i] = {
|
|
126
|
+
...t[i],
|
|
127
|
+
isRecovering: !1,
|
|
128
|
+
isAnimating: !1
|
|
129
|
+
}), t;
|
|
130
|
+
});
|
|
131
|
+
}, 200)) : (S || w || C || T) && (O = !1, z.current[n] && clearTimeout(z.current[n])), M((t) => {
|
|
132
|
+
let r = e(v, t[n].size, P), a = e(y, t[i].size, P), o = S || w || C || T || O;
|
|
133
|
+
return {
|
|
134
|
+
...t,
|
|
135
|
+
[n]: {
|
|
136
|
+
...t[n],
|
|
137
|
+
snapped: w,
|
|
138
|
+
collapsed: S,
|
|
139
|
+
isRecovering: O,
|
|
140
|
+
isAnimating: o,
|
|
141
|
+
size: r
|
|
142
|
+
},
|
|
143
|
+
[i]: {
|
|
144
|
+
...t[i],
|
|
145
|
+
snapped: T,
|
|
146
|
+
collapsed: C,
|
|
147
|
+
isRecovering: O,
|
|
148
|
+
isAnimating: o,
|
|
149
|
+
size: a
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
}), b("pointerup", () => {
|
|
154
|
+
R.current && (U(j), R.current = null, I(null));
|
|
155
|
+
}), i(() => {
|
|
156
|
+
let e;
|
|
157
|
+
if (L.current === null) {
|
|
158
|
+
if (s.defaultLayout) L.current = s.defaultLayout;
|
|
159
|
+
else if (s.autoSaveId && n()) try {
|
|
160
|
+
e = localStorage.getItem(`material-panes-${s.autoSaveId}`), e && (L.current = JSON.parse(e));
|
|
161
|
+
} catch (e) {
|
|
162
|
+
console.error("localStorage error:", e);
|
|
163
|
+
}
|
|
164
|
+
L.current ||= {};
|
|
165
|
+
}
|
|
166
|
+
H();
|
|
167
|
+
}), /* @__PURE__ */ _("div", {
|
|
168
|
+
ref: O,
|
|
169
|
+
className: c("Panes", u, s.className),
|
|
170
|
+
children: /* @__PURE__ */ v(x, {
|
|
171
|
+
value: W,
|
|
172
|
+
children: [G, /* @__PURE__ */ _(a, {
|
|
173
|
+
childName: "Pane",
|
|
174
|
+
onChildrenChange: V,
|
|
175
|
+
compareChild: B,
|
|
176
|
+
children: s.children
|
|
177
|
+
})]
|
|
178
|
+
})
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
export { x as PanesContext, w as default, S as usePanes };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./Panes.cjs"),t=require("./Pane.cjs");exports.Pane=t.default,exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Panes{background-color:var(--md-comp-panes-container-color);height:300px;display:flex}.Panes.horizontal{flex-direction:row}.Panes.horizontal>.ResizeHandle{cursor:col-resize}.Panes.horizontal>.ResizeHandle:before{width:var(--md-comp-panes-handle-indicator-inline-size);height:var(--md-comp-panes-handle-indicator-block-size)}.Panes.horizontal>.ResizeHandle.dragging:before{width:var(--md-comp-panes-handle-indicator-dragging-inline-size)}.Panes.vertical{flex-direction:column}.Panes.vertical>.ResizeHandle{cursor:row-resize}.Panes.vertical>.ResizeHandle:before{width:var(--md-comp-panes-handle-indicator-block-size);height:var(--md-comp-panes-handle-indicator-inline-size)}.Panes.vertical>.ResizeHandle.dragging:before{height:var(--md-comp-panes-handle-indicator-dragging-inline-size)}.Panes>.ResizeHandle{flex:0 0 var(--md-comp-panes-handle-size);position:relative}.Panes>.ResizeHandle:before{content:"";background-color:var(--md-comp-panes-handle-indicator-color);border-radius:var(--md-comp-panes-handle-indicator-shape);transition:width var(--md-sys-motion-spring-expressive-fast-effects-duration) var(--md-sys-motion-spring-expressive-fast-effects-easing), height var(--md-sys-motion-spring-expressive-fast-effects-duration) var(--md-sys-motion-spring-expressive-fast-effects-easing), background-color var(--md-sys-motion-spring-expressive-fast-effects-duration) var(--md-sys-motion-spring-expressive-fast-effects-easing);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.Panes>.ResizeHandle.dragging:before{background-color:var(--md-comp-panes-handle-indicator-dragging-color)}.Panes>.Pane{flex:0 1 var(--pane-size);background-color:var(--md-comp-panes-pane-container-color);border-radius:var(--md-comp-panes-pane-container-shape);box-sizing:border-box;overflow:auto}.Panes>.Pane.animating{transition:all var(--md-sys-motion-spring-expressive-fast-effects-duration) var(--md-sys-motion-spring-expressive-fast-effects-easing)}.Panes>.Pane.collapsed{overflow:hidden}.Panes>.Pane.inline-padding{padding-inline:var(--md-sys-measurement-space200)}.Panes>.Pane.block-padding{padding-block:var(--md-sys-measurement-space200)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../../components/Icon/Icon.cjs"),t=require("../../components/misc/OrderedCollection/index.cjs"),n=require("./Tabs.cjs");let r=require("react/compiler-runtime"),i=require("react"),a=require("react/jsx-runtime");function o(o){let s=(0,r.c)(21),{label:c,icon:l}=o,u=(0,i.useContext)(n.TabsContext),d;s[0]!==u||s[1]!==c||s[2]!==o.id?(d=typeof c==`function`?c(u===o.id):c,s[0]=u,s[1]=c,s[2]=o.id,s[3]=d):d=s[3];let f=d,p;s[4]!==u||s[5]!==l||s[6]!==o.id?(p=typeof l==`function`?l(u===o.id):l,s[4]=u,s[5]=l,s[6]=o.id,s[7]=p):p=s[7];let m=p,h;s[8]===m?h=s[9]:(h=e.convertIconDefinition(m),s[8]=m,s[9]=h);let g=h,_;s[10]!==g||s[11]!==f||s[12]!==o.blockContentPadding||s[13]!==o.children||s[14]!==o.contentPadding||s[15]!==o.id||s[16]!==o.inlineContentPadding?(_={id:o.id,label:f,icon:g,inlineContentPadding:o.inlineContentPadding,blockContentPadding:o.blockContentPadding,contentPadding:o.contentPadding,children:o.children},s[10]=g,s[11]=f,s[12]=o.blockContentPadding,s[13]=o.children,s[14]=o.contentPadding,s[15]=o.id,s[16]=o.inlineContentPadding,s[17]=_):_=s[17];let v=_,y;return s[18]!==v||s[19]!==o.id?(y=(0,a.jsx)(t.OrderedCollectionChild,{name:`Tab`,id:o.id,content:v}),s[18]=v,s[19]=o.id,s[20]=y):y=s[20],y}exports.default=o;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IconDefinition } from '../../components/Icon/Icon';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { LayoutPadding } from '../types';
|
|
4
|
+
export interface TabProps extends PropsWithChildren, LayoutPadding {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string | ((current: boolean) => string);
|
|
7
|
+
icon?: IconDefinition | ((current: boolean) => IconDefinition);
|
|
8
|
+
}
|
|
9
|
+
export interface TabData extends TabProps {
|
|
10
|
+
label: string;
|
|
11
|
+
icon?: IconDefinition;
|
|
12
|
+
}
|
|
13
|
+
export default function Tab(props: TabProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { convertIconDefinition as e } from "../../components/Icon/Icon.js";
|
|
2
|
+
import { OrderedCollectionChild as t } from "../../components/misc/OrderedCollection/index.js";
|
|
3
|
+
import { TabsContext as n } from "./Tabs.js";
|
|
4
|
+
import { c as r } from "react/compiler-runtime";
|
|
5
|
+
import { useContext as i } from "react";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
//#region lib/layouts/Tabs/Tab.tsx
|
|
8
|
+
function o(o) {
|
|
9
|
+
let s = r(21), { label: c, icon: l } = o, u = i(n), d;
|
|
10
|
+
s[0] !== u || s[1] !== c || s[2] !== o.id ? (d = typeof c == "function" ? c(u === o.id) : c, s[0] = u, s[1] = c, s[2] = o.id, s[3] = d) : d = s[3];
|
|
11
|
+
let f = d, p;
|
|
12
|
+
s[4] !== u || s[5] !== l || s[6] !== o.id ? (p = typeof l == "function" ? l(u === o.id) : l, s[4] = u, s[5] = l, s[6] = o.id, s[7] = p) : p = s[7];
|
|
13
|
+
let m = p, h;
|
|
14
|
+
s[8] === m ? h = s[9] : (h = e(m), s[8] = m, s[9] = h);
|
|
15
|
+
let g = h, _;
|
|
16
|
+
s[10] !== g || s[11] !== f || s[12] !== o.blockContentPadding || s[13] !== o.children || s[14] !== o.contentPadding || s[15] !== o.id || s[16] !== o.inlineContentPadding ? (_ = {
|
|
17
|
+
id: o.id,
|
|
18
|
+
label: f,
|
|
19
|
+
icon: g,
|
|
20
|
+
inlineContentPadding: o.inlineContentPadding,
|
|
21
|
+
blockContentPadding: o.blockContentPadding,
|
|
22
|
+
contentPadding: o.contentPadding,
|
|
23
|
+
children: o.children
|
|
24
|
+
}, s[10] = g, s[11] = f, s[12] = o.blockContentPadding, s[13] = o.children, s[14] = o.contentPadding, s[15] = o.id, s[16] = o.inlineContentPadding, s[17] = _) : _ = s[17];
|
|
25
|
+
let v = _, y;
|
|
26
|
+
return s[18] !== v || s[19] !== o.id ? (y = /* @__PURE__ */ a(t, {
|
|
27
|
+
name: "Tab",
|
|
28
|
+
id: o.id,
|
|
29
|
+
content: v
|
|
30
|
+
}), s[18] = v, s[19] = o.id, s[20] = y) : y = s[20], y;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { o as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('./style.css');const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../components/Icon/Icon.cjs"),n=require("../../utils/index.cjs"),r=require("../../utils/hooks.cjs"),i=require("../../components/misc/OrderedCollection/index.cjs"),a=require("../../components/misc/StateLayer/index.cjs"),o=require("../../components/misc/Transitionable/index.cjs");;/* empty css */let s=require("classnames");s=e.__toESM(s,1);let c=require("react"),l=require("react/jsx-runtime"),u=require("react-dom-event-hooks");var d=(0,c.createContext)(void 0);function f(e){let{variant:f=`primary`,defaultActiveTab:p,activeTab:m,onActiveTabChange:h}=e,[g,_]=(0,c.useState)([]),v=(0,c.useMemo)(()=>g.some(e=>!!e.label),[g]),y=(0,c.useMemo)(()=>g.some(e=>!!e.icon),[g]),[b,x]=(0,c.useState)(p??m??``),S=(0,c.useMemo)(()=>{let e=m??b;return g.find(t=>t.id===e)?e:p},[m,b,p,g]),{saveRef:C,ref:w}=(0,u.useMultiElementRef)(),T=(0,c.useRef)(null),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=(0,c.useCallback)(e=>{x(t=>t||(e.at(0)?.id??``)),_(e)},[]),k=(0,c.useCallback)((e=!1)=>{let t=w.current.get(S??``),r,i;D.current!==null&&(D.current=cancelAnimationFrame(D.current)??null),D.current=requestAnimationFrame(()=>{t&&T.current&&(r=T.current.getBoundingClientRect(),i=f===`primary`?n.getRelativeRect(t,r):n.getRelativeRect(t.parentElement,r),e&&E.current?.classList.add(`immediate`),E.current?.style.setProperty(`--position-left`,`${i.left}px`),E.current?.style.setProperty(`--position-right`,`${r.width-i.right}px`),e&&setTimeout(()=>E.current?.classList.remove(`immediate`)))})},[S,w,f]),{saveRef:A}=(0,u.useResizeObserver)(()=>k(!0)),j=(0,c.useCallback)(e=>{let t=e.currentTarget.dataset.id;t&&(m||x(t),h?.(t))},[m,h]);return r.useIsomorphicLayoutEffect(()=>{k()},[S,g.length,k]),(0,l.jsx)(d,{value:S,children:(0,l.jsxs)(`div`,{className:(0,s.default)(`Tabs`,f),children:[(0,l.jsx)(`nav`,{ref:A,className:(0,s.default)(`navigation`,{labels:v,icons:y}),children:(0,l.jsxs)(`div`,{ref:T,className:`container`,children:[g.map(e=>(0,l.jsxs)(`button`,{className:(0,s.default)(`button`,{active:e.id===S}),"data-id":e.id,onClick:j,children:[(0,l.jsx)(a.default,{}),(0,l.jsxs)(`div`,{ref:C,className:`content`,"data-key":e.id,children:[(0,l.jsx)(t.IconProvider,{size:24,fill:e.id===S,children:(0,l.jsx)(o.default,{value:e.icon,className:`icon`})}),(0,l.jsx)(o.default,{value:e.label,className:`label`})]})]},e.id)),(0,l.jsx)(`div`,{ref:E,className:`indicator`})]})}),(0,l.jsx)(`div`,{className:`activities`,children:g.map(e=>(0,l.jsx)(c.Activity,{name:`Tab_`+e.id,mode:e.id===S?`visible`:`hidden`,children:(0,l.jsx)(`div`,{className:(0,s.default)(`content`,{"inline-padding":e.inlineContentPadding??e.contentPadding??!1,"block-padding":e.blockContentPadding??e.contentPadding??!1}),children:e.children})},e.id))}),(0,l.jsx)(i.default,{name:`Tabs`,childName:`Tab`,onChildrenChange:O,compareChild:n.shallowEqual,children:e.children})]})})}exports.TabsContext=d,exports.default=f;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export interface TabsProps {
|
|
3
|
+
variant?: "primary" | "secondary";
|
|
4
|
+
defaultActiveTab?: string;
|
|
5
|
+
activeTab?: string;
|
|
6
|
+
onActiveTabChange?: (active: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const TabsContext: import('react').Context<string | undefined>;
|
|
9
|
+
export default function Tabs(props: PropsWithChildren<TabsProps>): import('react').JSX.Element;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { IconProvider as e } from "../../components/Icon/Icon.js";
|
|
2
|
+
import { getRelativeRect as t, shallowEqual as n } from "../../utils/index.js";
|
|
3
|
+
import { useIsomorphicLayoutEffect as r } from "../../utils/hooks.js";
|
|
4
|
+
import i from "../../components/misc/OrderedCollection/index.js";
|
|
5
|
+
import a from "../../components/misc/StateLayer/index.js";
|
|
6
|
+
import o from "../../components/misc/Transitionable/index.js";
|
|
7
|
+
import './style.css';/* empty css */
|
|
8
|
+
import s from "classnames";
|
|
9
|
+
import { Activity as c, createContext as l, useCallback as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
10
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
11
|
+
import { useMultiElementRef as g, useResizeObserver as _ } from "react-dom-event-hooks";
|
|
12
|
+
//#region lib/layouts/Tabs/Tabs.tsx
|
|
13
|
+
var v = l(void 0);
|
|
14
|
+
function y(l) {
|
|
15
|
+
let { variant: y = "primary", defaultActiveTab: b, activeTab: x, onActiveTabChange: S } = l, [C, w] = p([]), T = d(() => C.some((e) => !!e.label), [C]), E = d(() => C.some((e) => !!e.icon), [C]), [D, O] = p(b ?? x ?? ""), k = d(() => {
|
|
16
|
+
let e = x ?? D;
|
|
17
|
+
return C.find((t) => t.id === e) ? e : b;
|
|
18
|
+
}, [
|
|
19
|
+
x,
|
|
20
|
+
D,
|
|
21
|
+
b,
|
|
22
|
+
C
|
|
23
|
+
]), { saveRef: A, ref: j } = g(), M = f(null), N = f(null), P = f(null), F = u((e) => {
|
|
24
|
+
O((t) => t || (e.at(0)?.id ?? "")), w(e);
|
|
25
|
+
}, []), I = u((e = !1) => {
|
|
26
|
+
let n = j.current.get(k ?? ""), r, i;
|
|
27
|
+
P.current !== null && (P.current = cancelAnimationFrame(P.current) ?? null), P.current = requestAnimationFrame(() => {
|
|
28
|
+
n && M.current && (r = M.current.getBoundingClientRect(), i = t(y === "primary" ? n : n.parentElement, r), e && N.current?.classList.add("immediate"), N.current?.style.setProperty("--position-left", `${i.left}px`), N.current?.style.setProperty("--position-right", `${r.width - i.right}px`), e && setTimeout(() => N.current?.classList.remove("immediate")));
|
|
29
|
+
});
|
|
30
|
+
}, [
|
|
31
|
+
k,
|
|
32
|
+
j,
|
|
33
|
+
y
|
|
34
|
+
]), { saveRef: L } = _(() => I(!0)), R = u((e) => {
|
|
35
|
+
let t = e.currentTarget.dataset.id;
|
|
36
|
+
t && (x || O(t), S?.(t));
|
|
37
|
+
}, [x, S]);
|
|
38
|
+
return r(() => {
|
|
39
|
+
I();
|
|
40
|
+
}, [
|
|
41
|
+
k,
|
|
42
|
+
C.length,
|
|
43
|
+
I
|
|
44
|
+
]), /* @__PURE__ */ m(v, {
|
|
45
|
+
value: k,
|
|
46
|
+
children: /* @__PURE__ */ h("div", {
|
|
47
|
+
className: s("Tabs", y),
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ m("nav", {
|
|
50
|
+
ref: L,
|
|
51
|
+
className: s("navigation", {
|
|
52
|
+
labels: T,
|
|
53
|
+
icons: E
|
|
54
|
+
}),
|
|
55
|
+
children: /* @__PURE__ */ h("div", {
|
|
56
|
+
ref: M,
|
|
57
|
+
className: "container",
|
|
58
|
+
children: [C.map((t) => /* @__PURE__ */ h("button", {
|
|
59
|
+
className: s("button", { active: t.id === k }),
|
|
60
|
+
"data-id": t.id,
|
|
61
|
+
onClick: R,
|
|
62
|
+
children: [/* @__PURE__ */ m(a, {}), /* @__PURE__ */ h("div", {
|
|
63
|
+
ref: A,
|
|
64
|
+
className: "content",
|
|
65
|
+
"data-key": t.id,
|
|
66
|
+
children: [/* @__PURE__ */ m(e, {
|
|
67
|
+
size: 24,
|
|
68
|
+
fill: t.id === k,
|
|
69
|
+
children: /* @__PURE__ */ m(o, {
|
|
70
|
+
value: t.icon,
|
|
71
|
+
className: "icon"
|
|
72
|
+
})
|
|
73
|
+
}), /* @__PURE__ */ m(o, {
|
|
74
|
+
value: t.label,
|
|
75
|
+
className: "label"
|
|
76
|
+
})]
|
|
77
|
+
})]
|
|
78
|
+
}, t.id)), /* @__PURE__ */ m("div", {
|
|
79
|
+
ref: N,
|
|
80
|
+
className: "indicator"
|
|
81
|
+
})]
|
|
82
|
+
})
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ m("div", {
|
|
85
|
+
className: "activities",
|
|
86
|
+
children: C.map((e) => /* @__PURE__ */ m(c, {
|
|
87
|
+
name: "Tab_" + e.id,
|
|
88
|
+
mode: e.id === k ? "visible" : "hidden",
|
|
89
|
+
children: /* @__PURE__ */ m("div", {
|
|
90
|
+
className: s("content", {
|
|
91
|
+
"inline-padding": e.inlineContentPadding ?? e.contentPadding ?? !1,
|
|
92
|
+
"block-padding": e.blockContentPadding ?? e.contentPadding ?? !1
|
|
93
|
+
}),
|
|
94
|
+
children: e.children
|
|
95
|
+
})
|
|
96
|
+
}, e.id))
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ m(i, {
|
|
99
|
+
name: "Tabs",
|
|
100
|
+
childName: "Tab",
|
|
101
|
+
onChildrenChange: F,
|
|
102
|
+
compareChild: n,
|
|
103
|
+
children: l.children
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
export { v as TabsContext, y as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./Tabs.cjs"),t=require("./Tab.cjs");exports.Tab=t.default,exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Tabs{flex-direction:column;width:100%;height:100%;display:flex}.Tabs>.navigation{width:100%;overflow-x:auto}.Tabs>.navigation>.container{flex-flow:row;width:max-content;min-width:100%;height:100%;display:flex;position:relative}.Tabs>.navigation>.container>.button{flex:1 0 max-content;padding:0;cursor:pointer;background-color:#0000;border:none;border-radius:0;outline:none;justify-content:center;align-items:center;margin:0;padding-inline:8px;display:flex}.Tabs>.navigation>.container>.button>.content{display:flex}.Tabs>.navigation>.container>.button>.content>.icon,.Tabs>.navigation>.container>.button>.content>.label{transition:color var(--md-sys-motion-spring-expressive-fast-effects-duration) var(--md-sys-motion-spring-expressive-fast-effects-easing)}.Tabs>.navigation>.container>.button:focus-visible>.StateLayer{border-radius:var(--md-sys-shape-corner-large)}.Tabs>.navigation>.container>.button>.StateLayer{outline-offset:calc(-1 * var(--md-comp-state-focus-indicator-thickness))}.Tabs>.navigation>.container>.indicator{position:absolute;bottom:0}.Tabs>.navigation>.container>.indicator:not(.immediate){transition:inset var(--md-sys-motion-spring-expressive-default-spatial-duration) var(--md-sys-motion-spring-expressive-default-spatial-easing), background-color var(--md-sys-motion-spring-expressive-fast-effects-duration) var(--md-sys-motion-spring-expressive-fast-effects-easing)}.Tabs>.activities{box-sizing:border-box;scrollbar-color:var(--md-sys-color-surface-variant) var(--md-sys-color-surface);flex:1;overflow:auto}.Tabs>.activities>.content{box-sizing:border-box;width:100%;height:100%}.Tabs>.activities>.content.inline-padding{padding-inline:var(--md-sys-measurement-space200)}.Tabs>.activities>.content.block-padding{padding-block:var(--md-sys-measurement-space200)}.Tabs.primary>.navigation{height:var(--md-comp-primary-navigation-tab-container-height);min-height:var(--md-comp-primary-navigation-tab-container-height);background-color:var(--md-comp-primary-navigation-tab-container-color)}.Tabs.primary>.navigation:is(.labels,.icons){height:var(--md-comp-primary-navigation-tab-with-icon-and-label-text-container-height)}.Tabs.primary>.navigation>.container>.button{--md-comp-state-focus-indicator-color:var(--md-comp-primary-navigation-tab-focus-indicator-color);--md-comp-state-focus-indicator-thickness:var(--md-comp-primary-navigation-tab-focus-indicator-thickness);--md-comp-state-focus-indicator-outer-offset:var(--md-comp-primary-navigation-tab-focus-indicator-outline-offset)}.Tabs.primary>.navigation>.container>.button.active{--md-comp-state-hover-state-layer-opacity:var(--md-comp-primary-navigation-tab-active-hover-state-layer-opacity);--md-comp-state-focused-state-layer-opacity:var(--md-comp-primary-navigation-tab-active-focus-state-layer-opacity);--md-comp-state-pressed-state-layer-opacity:var(--md-comp-primary-navigation-tab-active-pressed-state-layer-opacity);--md-comp-state-hover-state-layer-color:var(--md-comp-primary-navigation-tab-active-hover-state-layer-color);--md-comp-state-focused-state-layer-color:var(--md-comp-primary-navigation-tab-active-focus-state-layer-color);--md-comp-state-pressed-state-layer-color:var(--md-comp-primary-navigation-tab-active-pressed-state-layer-color)}.Tabs.primary>.navigation>.container>.button.active>.content>.label{color:var(--md-comp-primary-navigation-tab-with-label-text-active-label-text-color)}.Tabs.primary>.navigation>.container>.button.active>.content>.icon{color:var(--md-comp-primary-navigation-tab-with-icon-active-icon-color)}.Tabs.primary>.navigation>.container>.button.active:hover>.content>.label{color:var(--md-comp-primary-navigation-tab-with-label-text-active-hover-label-text-color)}.Tabs.primary>.navigation>.container>.button.active:hover>.content>.icon{color:var(--md-comp-primary-navigation-tab-with-icon-active-hover-icon-color)}.Tabs.primary>.navigation>.container>.button:not(.active){--md-comp-state-hover-state-layer-opacity:var(--md-comp-primary-navigation-tab-inactive-hover-state-layer-opacity);--md-comp-state-focused-state-layer-opacity:var(--md-comp-primary-navigation-tab-inactive-focus-state-layer-opacity);--md-comp-state-pressed-state-layer-opacity:var(--md-comp-primary-navigation-tab-inactive-pressed-state-layer-opacity);--md-comp-state-hover-state-layer-color:var(--md-comp-primary-navigation-tab-inactive-hover-state-layer-color);--md-comp-state-focused-state-layer-color:var(--md-comp-primary-navigation-tab-inactive-focus-state-layer-color);--md-comp-state-pressed-state-layer-color:var(--md-comp-primary-navigation-tab-inactive-pressed-state-layer-color)}.Tabs.primary>.navigation>.container>.button:not(.active)>.content>.label{color:var(--md-comp-primary-navigation-tab-with-label-text-inactive-label-text-color)}.Tabs.primary>.navigation>.container>.button:not(.active)>.content>.icon{color:var(--md-comp-primary-navigation-tab-with-icon-inactive-icon-color)}.Tabs.primary>.navigation>.container>.button:not(.active):hover>.content>.label{color:var(--md-comp-primary-navigation-tab-with-label-text-inactive-hover-label-text-color)}.Tabs.primary>.navigation>.container>.button:not(.active):hover>.content>.icon{color:var(--md-comp-primary-navigation-tab-with-icon-inactive-hover-icon-color)}.Tabs.primary>.navigation>.container>.button:not(.active):active:not(.disabled,.dragged)>.content>.label{color:var(--md-comp-primary-navigation-tab-with-label-text-inactive-pressed-label-text-color)}.Tabs.primary>.navigation>.container>.button:not(.active):active:not(.disabled,.dragged)>.content>.icon{color:var(--md-comp-primary-navigation-tab-with-icon-inactive-pressed-icon-color)}.Tabs.primary>.navigation>.container>.button>.content{flex-direction:column;align-items:center}.Tabs.primary>.navigation>.container>.button>.content>.label{font-family:var(--md-comp-primary-navigation-tab-with-label-text-label-text-font);font-weight:var(--md-comp-primary-navigation-tab-with-label-text-label-text-weight);font-size:var(--md-comp-primary-navigation-tab-with-label-text-label-text-size);letter-spacing:var(--md-comp-primary-navigation-tab-with-label-text-label-text-tracking);line-height:var(--md-comp-primary-navigation-tab-with-label-text-label-text-line-height);font-variation-settings:"wght" var(--md-comp-primary-navigation-tab-with-label-text-label-text-wght), "GRAD" var(--md-comp-primary-navigation-tab-with-label-text-label-text-grad), "wdth" var(--md-comp-primary-navigation-tab-with-label-text-label-text-wdth), "ROND" var(--md-comp-primary-navigation-tab-with-label-text-label-text-rond), "opsz" var(--md-comp-primary-navigation-tab-with-label-text-label-text-opsz), "CRSV" var(--md-comp-primary-navigation-tab-with-label-text-label-text-crsv), "slnt" var(--md-comp-primary-navigation-tab-with-label-text-label-text-slnt), "FILL" var(--md-comp-primary-navigation-tab-with-label-text-label-text-fill), "HEXP" var(--md-comp-primary-navigation-tab-with-label-text-label-text-hexp)}.Tabs.primary>.navigation>.container>.indicator{height:var(--md-comp-primary-navigation-tab-active-indicator-height);background-color:var(--md-comp-primary-navigation-tab-active-indicator-color);border-radius:var(--md-comp-primary-navigation-tab-active-indicator-height);left:calc(var(--position-left) + 2px);right:calc(var(--position-right) + 2px);border-bottom-right-radius:0;border-bottom-left-radius:0}.Tabs.secondary>.navigation{height:var(--md-comp-secondary-navigation-tab-container-height);min-height:var(--md-comp-secondary-navigation-tab-container-height);background-color:var(--md-comp-secondary-navigation-tab-container-color)}.Tabs.secondary>.navigation>.container>.button{--md-comp-state-hover-state-layer-opacity:var(--md-comp-secondary-navigation-tab-hover-state-layer-opacity);--md-comp-state-focused-state-layer-opacity:var(--md-comp-secondary-navigation-tab-focus-state-layer-opacity);--md-comp-state-pressed-state-layer-opacity:var(--md-comp-secondary-navigation-tab-pressed-state-layer-opacity);--md-comp-state-hover-state-layer-color:var(--md-comp-secondary-navigation-tab-hover-state-layer-color);--md-comp-state-focused-state-layer-color:var(--md-comp-secondary-navigation-tab-focus-state-layer-color);--md-comp-state-pressed-state-layer-color:var(--md-comp-secondary-navigation-tab-pressed-state-layer-color);--md-comp-state-focus-indicator-color:var(--md-comp-secondary-navigation-tab-focus-indicator-color);--md-comp-state-focus-indicator-thickness:var(--md-comp-secondary-navigation-tab-focus-indicator-thickness);--md-comp-state-focus-indicator-outer-offset:var(--md-comp-secondary-navigation-tab-focus-indicator-outline-offset)}.Tabs.secondary>.navigation>.container>.button.active>.content>.label{color:var(--md-comp-secondary-navigation-tab-active-label-text-color)}.Tabs.secondary>.navigation>.container>.button.active>.content>.icon{color:var(--md-comp-secondary-navigation-tab-with-icon-active-icon-color)}.Tabs.secondary>.navigation>.container>.button.active:hover>.content>.label{color:var(--md-comp-secondary-navigation-tab-hover-label-text-color)}.Tabs.secondary>.navigation>.container>.button.active:hover>.content>.icon{color:var(--md-comp-secondary-navigation-tab-with-icon-hover-icon-color)}.Tabs.secondary>.navigation>.container>.button:not(.active)>.content>.label{color:var(--md-comp-secondary-navigation-tab-inactive-label-text-color)}.Tabs.secondary>.navigation>.container>.button:not(.active)>.content>.icon{color:var(--md-comp-secondary-navigation-tab-with-icon-inactive-icon-color)}.Tabs.secondary>.navigation>.container>.button:not(.active):hover>.content>.label{color:var(--md-comp-secondary-navigation-tab-hover-label-text-color)}.Tabs.secondary>.navigation>.container>.button:not(.active):hover>.content>.icon{color:var(--md-comp-secondary-navigation-tab-with-icon-hover-icon-color)}.Tabs.secondary>.navigation>.container>.button:not(.active):active:not(.disabled,.dragged)>.content>.label{color:var(--md-comp-secondary-navigation-tab-pressed-label-text-color)}.Tabs.secondary>.navigation>.container>.button:not(.active):active:not(.disabled,.dragged)>.content>.icon{color:var(--md-comp-secondary-navigation-tab-with-icon-pressed-icon-color)}.Tabs.secondary>.navigation>.container>.button>.content{flex-direction:row;align-items:center;gap:8px}.Tabs.secondary>.navigation>.container>.button>.content>.label{font-family:var(--md-comp-secondary-navigation-tab-label-text-font);font-weight:var(--md-comp-secondary-navigation-tab-label-text-weight);font-size:var(--md-comp-secondary-navigation-tab-label-text-size);letter-spacing:var(--md-comp-secondary-navigation-tab-label-text-tracking);line-height:var(--md-comp-secondary-navigation-tab-label-text-line-height);font-variation-settings:"wght" var(--md-comp-secondary-navigation-tab-label-text-wght), "GRAD" var(--md-comp-secondary-navigation-tab-label-text-grad), "wdth" var(--md-comp-secondary-navigation-tab-label-text-wdth), "ROND" var(--md-comp-secondary-navigation-tab-label-text-rond), "opsz" var(--md-comp-secondary-navigation-tab-label-text-opsz), "CRSV" var(--md-comp-secondary-navigation-tab-label-text-crsv), "slnt" var(--md-comp-secondary-navigation-tab-label-text-slnt), "FILL" var(--md-comp-secondary-navigation-tab-label-text-fill), "HEXP" var(--md-comp-secondary-navigation-tab-label-text-hexp)}.Tabs.secondary>.navigation>.container>.indicator{height:var(--md-comp-secondary-navigation-tab-active-indicator-height);background-color:var(--md-comp-secondary-navigation-tab-active-indicator-color);left:var(--position-left);right:var(--position-right)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});require('./style.css');const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utils/index.cjs"),n=require("../../components/misc/OrderedCollection/index.cjs"),r=require("../../components/ContextMenu/render.cjs"),i=require("../../components/Toolbar/Toolbar.render.cjs");;/* empty css */let a=require("react/compiler-runtime"),o=require("classnames");o=e.__toESM(o,1);let s=require("react"),c=require("react/jsx-runtime");function l(e){let r=(0,a.c)(45),i;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],r[0]=i):i=r[0];let[l,_]=(0,s.useState)(i),v;r[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=[`Content`,`Toolbar`,`ContextMenu`],r[1]=v):v=r[1];let y=v,b;r[2]===l?b=r[3]:(b=l.filter(g),r[2]=l,r[3]=b);let x=b,S;r[4]===l?S=r[5]:(S=l.filter(h),r[4]=l,r[5]=S);let C=S,w;r[6]===l?w=r[7]:(w=l.filter(m),r[6]=l,r[7]=w);let T=w,E;r[8]===C?E=r[9]:(E=C.filter(p),r[8]=C,r[9]=E);let D=E,O;r[10]===C?O=r[11]:(O=C.filter(ne),r[10]=C,r[11]=O);let k=O,A;r[12]===k?A=r[13]:(A=k.filter(te),r[12]=k,r[13]=A);let j=A,M;r[14]===k?M=r[15]:(M=k.filter(ee),r[14]=k,r[15]=M);let N=M,P;r[16]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],r[16]=P):P=r[16];let F=P,I;r[17]!==D||r[18]!==N?(I=[...D,...N],r[17]=D,r[18]=N,r[19]=I):I=r[19];let L=I,R=j,z;r[20]===Symbol.for(`react.memo_cache_sentinel`)?(z=[],r[20]=z):z=r[20];let B=z,V=e.inlineContentPadding??e.contentPadding??!1,H=e.blockContentPadding??e.contentPadding??!1,U=f,W;r[21]!==H||r[22]!==V?(W=(0,o.default)(`Toolbox`,{"inline-padding":V,"block-padding":H}),r[21]=H,r[22]=V,r[23]=W):W=r[23];let G;r[24]===Symbol.for(`react.memo_cache_sentinel`)?(G=!!F.length&&(0,c.jsx)(`div`,{className:`tools top`,children:F.map(U)}),r[24]=G):G=r[24];let K;r[25]===L?K=r[26]:(K=!!L.length&&(0,c.jsx)(`div`,{className:`tools bottom`,children:L.map(U)}),r[25]=L,r[26]=K);let q;r[27]===R?q=r[28]:(q=!!R.length&&(0,c.jsx)(`div`,{className:`tools left`,children:R.map(U)}),r[27]=R,r[28]=q);let J;r[29]===Symbol.for(`react.memo_cache_sentinel`)?(J=!!B.length&&(0,c.jsx)(`div`,{className:`tools right`,children:B.map(U)}),r[29]=J):J=r[29];let Y;r[30]===T?Y=r[31]:(Y=T.map(d),r[30]=T,r[31]=Y);let X;r[32]===x?X=r[33]:(X=x.map(u),r[32]=x,r[33]=X);let Z;r[34]!==Y||r[35]!==X?(Z=(0,c.jsxs)(`div`,{className:`content`,children:[Y,X]}),r[34]=Y,r[35]=X,r[36]=Z):Z=r[36];let Q;r[37]===e.children?Q=r[38]:(Q=(0,c.jsx)(n.default,{name:`Toolbox`,childName:y,onChildrenChange:_,compareChild:t.shallowEqual,children:e.children}),r[37]=e.children,r[38]=Q);let $;return r[39]!==W||r[40]!==K||r[41]!==q||r[42]!==Z||r[43]!==Q?($=(0,c.jsxs)(`div`,{className:W,children:[G,K,q,J,Z,Q]}),r[39]=W,r[40]=K,r[41]=q,r[42]=Z,r[43]=Q,r[44]=$):$=r[44],$}function u(e){return(0,c.jsx)(s.Fragment,{children:e.children},e.id)}function d(e){return(0,c.jsx)(r.default,{...e},e.id)}function f(e){switch(e.orderedCollectionName){case`Toolbar`:return(0,c.jsx)(i.default,{...e},e.id);default:return null}}function ee(e){return!e.orientation||e.orientation===`horizontal`}function te(e){return e.orientation===`vertical`}function ne(e){return e.variant===`floating`}function p(e){return e.variant===`docked`}function m(e){return e.orderedCollectionName===`ContextMenu`}function h(e){return e.orderedCollectionName===`Toolbar`}function g(e){return e.orderedCollectionName===`Content`}exports.default=l;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { shallowEqual as e } from "../../utils/index.js";
|
|
2
|
+
import t from "../../components/misc/OrderedCollection/index.js";
|
|
3
|
+
import n from "../../components/ContextMenu/render.js";
|
|
4
|
+
import r from "../../components/Toolbar/Toolbar.render.js";
|
|
5
|
+
import './style.css';/* empty css */
|
|
6
|
+
import { c as i } from "react/compiler-runtime";
|
|
7
|
+
import a from "classnames";
|
|
8
|
+
import { Fragment as o, useState as ee } from "react";
|
|
9
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
10
|
+
//#region lib/layouts/Toolbox/index.tsx
|
|
11
|
+
function l(n) {
|
|
12
|
+
let r = i(45), o;
|
|
13
|
+
r[0] === Symbol.for("react.memo_cache_sentinel") ? (o = [], r[0] = o) : o = r[0];
|
|
14
|
+
let [l, _] = ee(o), v;
|
|
15
|
+
r[1] === Symbol.for("react.memo_cache_sentinel") ? (v = [
|
|
16
|
+
"Content",
|
|
17
|
+
"Toolbar",
|
|
18
|
+
"ContextMenu"
|
|
19
|
+
], r[1] = v) : v = r[1];
|
|
20
|
+
let y = v, b;
|
|
21
|
+
r[2] === l ? b = r[3] : (b = l.filter(g), r[2] = l, r[3] = b);
|
|
22
|
+
let x = b, S;
|
|
23
|
+
r[4] === l ? S = r[5] : (S = l.filter(h), r[4] = l, r[5] = S);
|
|
24
|
+
let C = S, w;
|
|
25
|
+
r[6] === l ? w = r[7] : (w = l.filter(m), r[6] = l, r[7] = w);
|
|
26
|
+
let T = w, E;
|
|
27
|
+
r[8] === C ? E = r[9] : (E = C.filter(p), r[8] = C, r[9] = E);
|
|
28
|
+
let D = E, O;
|
|
29
|
+
r[10] === C ? O = r[11] : (O = C.filter(re), r[10] = C, r[11] = O);
|
|
30
|
+
let k = O, A;
|
|
31
|
+
r[12] === k ? A = r[13] : (A = k.filter(ne), r[12] = k, r[13] = A);
|
|
32
|
+
let j = A, M;
|
|
33
|
+
r[14] === k ? M = r[15] : (M = k.filter(te), r[14] = k, r[15] = M);
|
|
34
|
+
let N = M, P;
|
|
35
|
+
r[16] === Symbol.for("react.memo_cache_sentinel") ? (P = [], r[16] = P) : P = r[16];
|
|
36
|
+
let F = P, I;
|
|
37
|
+
r[17] !== D || r[18] !== N ? (I = [...D, ...N], r[17] = D, r[18] = N, r[19] = I) : I = r[19];
|
|
38
|
+
let L = I, R = j, z;
|
|
39
|
+
r[20] === Symbol.for("react.memo_cache_sentinel") ? (z = [], r[20] = z) : z = r[20];
|
|
40
|
+
let B = z, V = n.inlineContentPadding ?? n.contentPadding ?? !1, H = n.blockContentPadding ?? n.contentPadding ?? !1, U = f, W;
|
|
41
|
+
r[21] !== H || r[22] !== V ? (W = a("Toolbox", {
|
|
42
|
+
"inline-padding": V,
|
|
43
|
+
"block-padding": H
|
|
44
|
+
}), r[21] = H, r[22] = V, r[23] = W) : W = r[23];
|
|
45
|
+
let G;
|
|
46
|
+
r[24] === Symbol.for("react.memo_cache_sentinel") ? (G = !!F.length && /* @__PURE__ */ s("div", {
|
|
47
|
+
className: "tools top",
|
|
48
|
+
children: F.map(U)
|
|
49
|
+
}), r[24] = G) : G = r[24];
|
|
50
|
+
let K;
|
|
51
|
+
r[25] === L ? K = r[26] : (K = !!L.length && /* @__PURE__ */ s("div", {
|
|
52
|
+
className: "tools bottom",
|
|
53
|
+
children: L.map(U)
|
|
54
|
+
}), r[25] = L, r[26] = K);
|
|
55
|
+
let q;
|
|
56
|
+
r[27] === R ? q = r[28] : (q = !!R.length && /* @__PURE__ */ s("div", {
|
|
57
|
+
className: "tools left",
|
|
58
|
+
children: R.map(U)
|
|
59
|
+
}), r[27] = R, r[28] = q);
|
|
60
|
+
let J;
|
|
61
|
+
r[29] === Symbol.for("react.memo_cache_sentinel") ? (J = !!B.length && /* @__PURE__ */ s("div", {
|
|
62
|
+
className: "tools right",
|
|
63
|
+
children: B.map(U)
|
|
64
|
+
}), r[29] = J) : J = r[29];
|
|
65
|
+
let Y;
|
|
66
|
+
r[30] === T ? Y = r[31] : (Y = T.map(d), r[30] = T, r[31] = Y);
|
|
67
|
+
let X;
|
|
68
|
+
r[32] === x ? X = r[33] : (X = x.map(u), r[32] = x, r[33] = X);
|
|
69
|
+
let Z;
|
|
70
|
+
r[34] !== Y || r[35] !== X ? (Z = /* @__PURE__ */ c("div", {
|
|
71
|
+
className: "content",
|
|
72
|
+
children: [Y, X]
|
|
73
|
+
}), r[34] = Y, r[35] = X, r[36] = Z) : Z = r[36];
|
|
74
|
+
let Q;
|
|
75
|
+
r[37] === n.children ? Q = r[38] : (Q = /* @__PURE__ */ s(t, {
|
|
76
|
+
name: "Toolbox",
|
|
77
|
+
childName: y,
|
|
78
|
+
onChildrenChange: _,
|
|
79
|
+
compareChild: e,
|
|
80
|
+
children: n.children
|
|
81
|
+
}), r[37] = n.children, r[38] = Q);
|
|
82
|
+
let $;
|
|
83
|
+
return r[39] !== W || r[40] !== K || r[41] !== q || r[42] !== Z || r[43] !== Q ? ($ = /* @__PURE__ */ c("div", {
|
|
84
|
+
className: W,
|
|
85
|
+
children: [
|
|
86
|
+
G,
|
|
87
|
+
K,
|
|
88
|
+
q,
|
|
89
|
+
J,
|
|
90
|
+
Z,
|
|
91
|
+
Q
|
|
92
|
+
]
|
|
93
|
+
}), r[39] = W, r[40] = K, r[41] = q, r[42] = Z, r[43] = Q, r[44] = $) : $ = r[44], $;
|
|
94
|
+
}
|
|
95
|
+
function u(e) {
|
|
96
|
+
return /* @__PURE__ */ s(o, { children: e.children }, e.id);
|
|
97
|
+
}
|
|
98
|
+
function d(e) {
|
|
99
|
+
return /* @__PURE__ */ s(n, { ...e }, e.id);
|
|
100
|
+
}
|
|
101
|
+
function f(e) {
|
|
102
|
+
switch (e.orderedCollectionName) {
|
|
103
|
+
case "Toolbar": return /* @__PURE__ */ s(r, { ...e }, e.id);
|
|
104
|
+
default: return null;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function te(e) {
|
|
108
|
+
return !e.orientation || e.orientation === "horizontal";
|
|
109
|
+
}
|
|
110
|
+
function ne(e) {
|
|
111
|
+
return e.orientation === "vertical";
|
|
112
|
+
}
|
|
113
|
+
function re(e) {
|
|
114
|
+
return e.variant === "floating";
|
|
115
|
+
}
|
|
116
|
+
function p(e) {
|
|
117
|
+
return e.variant === "docked";
|
|
118
|
+
}
|
|
119
|
+
function m(e) {
|
|
120
|
+
return e.orderedCollectionName === "ContextMenu";
|
|
121
|
+
}
|
|
122
|
+
function h(e) {
|
|
123
|
+
return e.orderedCollectionName === "Toolbar";
|
|
124
|
+
}
|
|
125
|
+
function g(e) {
|
|
126
|
+
return e.orderedCollectionName === "Content";
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
export { l as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Toolbox{box-sizing:border-box;--toolbox-content-default-spacing:var(--md-sys-measurement-space200);--toolbox-tools-top-size:max(var(--toolbox-tools-top-toolbar-size,var(--toolbox-content-default-spacing,0)));--toolbox-tools-bottom-size:max(var(--toolbox-tools-bottom-toolbar-size,var(--toolbox-content-default-spacing,0)));--toolbox-tools-left-size:max(var(--toolbox-tools-left-toolbar-size,var(--toolbox-content-default-spacing,0)));--toolbox-tools-right-size:max(var(--toolbox-tools-right-toolbar-size,var(--toolbox-content-default-spacing,0)));flex:1;justify-content:stretch;align-items:stretch;width:100%;height:100%;display:flex;position:relative}.Toolbox:has(>.tools.top>.Toolbar.floating){--toolbox-tools-top-toolbar-size:calc(var(--md-comp-toolbar-floating-horizontal-container-height) + var(--md-comp-toolbar-floating-horizontal-container-external-space) * 2)}.Toolbox:has(>.tools.bottom>.Toolbar.docked){--toolbox-tools-bottom-toolbar-size:calc(var(--md-comp-toolbar-docked-container-height) + var(--md-sys-measurement-space200))}.Toolbox:has(>.tools.bottom>.Toolbar.floating){--toolbox-tools-bottom-toolbar-size:calc(var(--md-comp-toolbar-floating-horizontal-container-height) + var(--md-comp-toolbar-floating-horizontal-container-external-space) * 2)}.Toolbox:has(>.tools.left>.Toolbar.floating){--toolbox-tools-left-toolbar-size:calc(var(--md-comp-toolbar-floating-vertical-container-width) + var(--md-comp-toolbar-floating-vertical-container-external-space) * 2)}.Toolbox:has(>.tools.right>.Toolbar.floating){--toolbox-tools-right-toolbar-size:calc(var(--md-comp-toolbar-floating-vertical-container-width) + var(--md-comp-toolbar-floating-vertical-container-external-space) * 2)}.Toolbox>.tools{z-index:4;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute}.Toolbox>.tools>*{pointer-events:initial}.Toolbox>.tools.top{top:0;left:0;right:0}.Toolbox>.tools.top>.Toolbar.floating{margin-top:var(--md-comp-toolbar-floating-horizontal-container-external-space)}.Toolbox>.tools.bottom{bottom:0;left:0;right:0}.Toolbox>.tools.bottom:not(:has(>.Toolbar.docked)){padding-inline:var(--md-sys-measurement-space200)}.Toolbox>.tools.bottom>.Toolbar.docked{flex:1}.Toolbox>.tools.bottom>.Toolbar.floating{margin-bottom:var(--md-comp-toolbar-floating-horizontal-container-external-space)}.Toolbox>.tools.left{padding-block:var(--md-sys-measurement-space300);top:0;bottom:0;left:0}.Toolbox>.tools.left>.Toolbar.floating{margin-left:var(--md-comp-toolbar-floating-vertical-container-external-space)}.Toolbox>.tools.right{padding-block:var(--md-sys-measurement-space300);top:0;bottom:0;right:0}.Toolbox>.tools.right>.Toolbar.floating{margin-right:var(--md-comp-toolbar-floating-vertical-container-external-space)}.Toolbox.inline-padding>.content{padding-inline:var(--toolbox-tools-left-size) var(--toolbox-tools-right-size)}.Toolbox.block-padding>.content{padding-block:var(--toolbox-tools-top-size) var(--toolbox-tools-bottom-size)}.Toolbox>.content{flex:1;overflow:auto}.Toolbox>.content>*{--toolbox-tools-top-size:initial;--toolbox-tools-bottom-size:initial;--toolbox-tools-left-size:initial;--toolbox-tools-right-size:initial;--toolbox-tools-top-menubar-size:initial;--toolbox-tools-top-toolbar-size:initial;--toolbox-tools-bottom-toolbar-size:initial;--toolbox-tools-left-toolbar-size:initial;--toolbox-tools-right-toolbar-size:initial}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
interface MotionSpringCssConfig {
|
|
2
|
+
duration: number;
|
|
3
|
+
easing: string;
|
|
4
|
+
}
|
|
5
|
+
interface MotionSpringConfig {
|
|
6
|
+
duration: number;
|
|
7
|
+
easing: (offset: number) => number;
|
|
8
|
+
}
|
|
9
|
+
export declare const MotionSpringCss: {
|
|
10
|
+
ExpressiveFastSpatial: MotionSpringCssConfig;
|
|
11
|
+
ExpressiveDefaultSpatial: MotionSpringCssConfig;
|
|
12
|
+
ExpressiveSlowSpatial: MotionSpringCssConfig;
|
|
13
|
+
ExpressiveFastEffects: MotionSpringCssConfig;
|
|
14
|
+
ExpressiveDefaultEffects: MotionSpringCssConfig;
|
|
15
|
+
ExpressiveSlowEffects: MotionSpringCssConfig;
|
|
16
|
+
StandardFastSpatial: MotionSpringCssConfig;
|
|
17
|
+
StandardDefaultSpatial: MotionSpringCssConfig;
|
|
18
|
+
StandardSlowSpatial: MotionSpringCssConfig;
|
|
19
|
+
StandardFastEffects: MotionSpringCssConfig;
|
|
20
|
+
StandardDefaultEffects: MotionSpringCssConfig;
|
|
21
|
+
StandardSlowEffects: MotionSpringCssConfig;
|
|
22
|
+
};
|
|
23
|
+
export declare const MotionSpring: {
|
|
24
|
+
ExpressiveFastSpatial: MotionSpringConfig;
|
|
25
|
+
ExpressiveDefaultSpatial: MotionSpringConfig;
|
|
26
|
+
ExpressiveSlowSpatial: MotionSpringConfig;
|
|
27
|
+
ExpressiveFastEffects: MotionSpringConfig;
|
|
28
|
+
ExpressiveDefaultEffects: MotionSpringConfig;
|
|
29
|
+
ExpressiveSlowEffects: MotionSpringConfig;
|
|
30
|
+
StandardFastSpatial: MotionSpringConfig;
|
|
31
|
+
StandardDefaultSpatial: MotionSpringConfig;
|
|
32
|
+
StandardSlowSpatial: MotionSpringConfig;
|
|
33
|
+
StandardFastEffects: MotionSpringConfig;
|
|
34
|
+
StandardDefaultEffects: MotionSpringConfig;
|
|
35
|
+
StandardSlowEffects: MotionSpringConfig;
|
|
36
|
+
};
|
|
37
|
+
export {};
|