@amboss/design-system 4.2.2 → 4.2.3
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/build/cjs/components/Content/ContentList/ContentList.js +1 -1
- package/build/cjs/components/Content/DosageButton/DosageButton.js +1 -1
- package/build/cjs/components/Internal/LayoutFloat/LayoutFloat.d.ts +5 -3
- package/build/cjs/components/Internal/LayoutFloat/LayoutFloat.js +1 -1
- package/build/cjs/components/Internal/LayoutFloat/LayoutFloatDragHandle.d.ts +31 -0
- package/build/cjs/components/Internal/LayoutFloat/LayoutFloatDragHandle.js +1 -0
- package/build/cjs/components/Internal/LayoutFloat/LayoutFloatDragHandleGuard.d.ts +10 -0
- package/build/cjs/components/Internal/LayoutFloat/LayoutFloatDragHandleGuard.js +1 -0
- package/build/cjs/components/Internal/LayoutFloat/LayoutFloatDragProvider.d.ts +10 -0
- package/build/cjs/components/Internal/LayoutFloat/LayoutFloatDragProvider.js +1 -0
- package/build/cjs/components/Internal/LayoutFloat/useLayoutFloatDrag.d.ts +16 -0
- package/build/cjs/components/Internal/LayoutFloat/useLayoutFloatDrag.js +1 -0
- package/build/cjs/components/Internal/LayoutFloat/useLayoutFloatDragHandleContext.d.ts +22 -0
- package/build/cjs/components/Internal/LayoutFloat/useLayoutFloatDragHandleContext.js +1 -0
- package/build/cjs/components/Internal/Panel/Panel.d.ts +4 -0
- package/build/cjs/components/Internal/Panel/Panel.js +1 -1
- package/build/cjs/components/Internal/Sandwich/SandwichHeader.d.ts +1 -0
- package/build/cjs/components/Internal/Sandwich/SandwichHeader.js +1 -1
- package/build/cjs/components/Layout/-types.d.ts +96 -48
- package/build/cjs/components/Layout/Content/Content.d.ts +6 -2
- package/build/cjs/components/Layout/Content/Content.js +1 -1
- package/build/cjs/components/Layout/Content/ContentDocked.d.ts +12 -0
- package/build/cjs/components/Layout/Content/ContentDocked.js +1 -0
- package/build/cjs/components/Layout/Layout.js +1 -1
- package/build/cjs/components/Layout/RightPanel/RightPanel.d.ts +10 -8
- package/build/cjs/components/Layout/RightPanel/RightPanel.js +1 -1
- package/build/cjs/components/Layout/RightPanel/RightPanelDocked.d.ts +19 -0
- package/build/cjs/components/Layout/RightPanel/RightPanelDocked.js +1 -0
- package/build/cjs/components/Layout/RightPanel/RightPanelHeader.d.ts +14 -10
- package/build/cjs/components/Layout/RightPanel/RightPanelHeader.js +1 -1
- package/build/cjs/components/Layout/RightPanel/RightPanelSheet.d.ts +18 -0
- package/build/cjs/components/Layout/RightPanel/RightPanelSheet.js +1 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/ContentSplitBase.d.ts +13 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/ContentSplitBase.js +1 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/MobileSplitView.d.ts +11 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/MobileSplitView.js +1 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/StyledMobileSplitSlideLayer.d.ts +20 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/StyledMobileSplitSlideLayer.js +1 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/useMobileSplitStack.d.ts +20 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/useMobileSplitStack.js +1 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/useMobileSplitView.d.ts +27 -0
- package/build/cjs/components/Layout/Split/MobileSplitView/useMobileSplitView.js +1 -0
- package/build/cjs/components/Layout/Split/Split.d.ts +5 -4
- package/build/cjs/components/Layout/Split/Split.js +1 -1
- package/build/cjs/components/Layout/Split/SplitDocked.d.ts +9 -0
- package/build/cjs/components/Layout/Split/SplitDocked.js +1 -0
- package/build/cjs/components/Layout/index.d.ts +1 -0
- package/build/cjs/components/Layout/index.js +1 -1
- package/build/cjs/components/Layout/reducer.js +1 -1
- package/build/cjs/components/Layout/registry.d.ts +9 -1
- package/build/cjs/components/Layout/registry.js +1 -1
- package/build/cjs/components/Layout/useLayout.js +1 -1
- package/build/cjs/shared/useDragTransform.d.ts +39 -0
- package/build/cjs/shared/useDragTransform.js +1 -0
- package/build/cjs/web-tokens/_sizes.json +10 -0
- package/build/cjs/web-tokens/layout-vars.d.ts +2 -0
- package/build/cjs/web-tokens/layout-vars.js +1 -1
- package/build/cjs/web-tokens/layout-vars.ts +2 -0
- package/build/cjs/web-tokens/visualConfig.d.ts +9 -0
- package/build/cjs/web-tokens/visualConfig.js +1 -1
- package/build/esm/components/Content/ContentList/ContentList.js +1 -1
- package/build/esm/components/Content/DosageButton/DosageButton.js +1 -1
- package/build/esm/components/Internal/LayoutFloat/LayoutFloat.d.ts +5 -3
- package/build/esm/components/Internal/LayoutFloat/LayoutFloat.js +1 -1
- package/build/esm/components/Internal/LayoutFloat/LayoutFloatDragHandle.d.ts +31 -0
- package/build/esm/components/Internal/LayoutFloat/LayoutFloatDragHandle.js +1 -0
- package/build/esm/components/Internal/LayoutFloat/LayoutFloatDragHandleGuard.d.ts +10 -0
- package/build/esm/components/Internal/LayoutFloat/LayoutFloatDragHandleGuard.js +1 -0
- package/build/esm/components/Internal/LayoutFloat/LayoutFloatDragProvider.d.ts +10 -0
- package/build/esm/components/Internal/LayoutFloat/LayoutFloatDragProvider.js +1 -0
- package/build/esm/components/Internal/LayoutFloat/useLayoutFloatDrag.d.ts +16 -0
- package/build/esm/components/Internal/LayoutFloat/useLayoutFloatDrag.js +1 -0
- package/build/esm/components/Internal/LayoutFloat/useLayoutFloatDragHandleContext.d.ts +22 -0
- package/build/esm/components/Internal/LayoutFloat/useLayoutFloatDragHandleContext.js +1 -0
- package/build/esm/components/Internal/Panel/Panel.d.ts +4 -0
- package/build/esm/components/Internal/Panel/Panel.js +1 -1
- package/build/esm/components/Internal/Sandwich/SandwichHeader.d.ts +1 -0
- package/build/esm/components/Internal/Sandwich/SandwichHeader.js +1 -1
- package/build/esm/components/Layout/-types.d.ts +96 -48
- package/build/esm/components/Layout/Content/Content.d.ts +6 -2
- package/build/esm/components/Layout/Content/Content.js +1 -1
- package/build/esm/components/Layout/Content/ContentDocked.d.ts +12 -0
- package/build/esm/components/Layout/Content/ContentDocked.js +1 -0
- package/build/esm/components/Layout/Layout.js +1 -1
- package/build/esm/components/Layout/RightPanel/RightPanel.d.ts +10 -8
- package/build/esm/components/Layout/RightPanel/RightPanel.js +1 -1
- package/build/esm/components/Layout/RightPanel/RightPanelDocked.d.ts +19 -0
- package/build/esm/components/Layout/RightPanel/RightPanelDocked.js +1 -0
- package/build/esm/components/Layout/RightPanel/RightPanelHeader.d.ts +14 -10
- package/build/esm/components/Layout/RightPanel/RightPanelHeader.js +1 -1
- package/build/esm/components/Layout/RightPanel/RightPanelSheet.d.ts +18 -0
- package/build/esm/components/Layout/RightPanel/RightPanelSheet.js +1 -0
- package/build/esm/components/Layout/Split/MobileSplitView/ContentSplitBase.d.ts +13 -0
- package/build/esm/components/Layout/Split/MobileSplitView/ContentSplitBase.js +1 -0
- package/build/esm/components/Layout/Split/MobileSplitView/MobileSplitView.d.ts +11 -0
- package/build/esm/components/Layout/Split/MobileSplitView/MobileSplitView.js +1 -0
- package/build/esm/components/Layout/Split/MobileSplitView/StyledMobileSplitSlideLayer.d.ts +20 -0
- package/build/esm/components/Layout/Split/MobileSplitView/StyledMobileSplitSlideLayer.js +1 -0
- package/build/esm/components/Layout/Split/MobileSplitView/useMobileSplitStack.d.ts +20 -0
- package/build/esm/components/Layout/Split/MobileSplitView/useMobileSplitStack.js +1 -0
- package/build/esm/components/Layout/Split/MobileSplitView/useMobileSplitView.d.ts +27 -0
- package/build/esm/components/Layout/Split/MobileSplitView/useMobileSplitView.js +1 -0
- package/build/esm/components/Layout/Split/Split.d.ts +5 -4
- package/build/esm/components/Layout/Split/Split.js +1 -1
- package/build/esm/components/Layout/Split/SplitDocked.d.ts +9 -0
- package/build/esm/components/Layout/Split/SplitDocked.js +1 -0
- package/build/esm/components/Layout/index.d.ts +1 -0
- package/build/esm/components/Layout/index.js +1 -1
- package/build/esm/components/Layout/reducer.js +1 -1
- package/build/esm/components/Layout/registry.d.ts +9 -1
- package/build/esm/components/Layout/registry.js +1 -1
- package/build/esm/components/Layout/useLayout.js +1 -1
- package/build/esm/shared/useDragTransform.d.ts +39 -0
- package/build/esm/shared/useDragTransform.js +1 -0
- package/build/esm/web-tokens/_sizes.json +10 -0
- package/build/esm/web-tokens/layout-vars.d.ts +2 -0
- package/build/esm/web-tokens/layout-vars.js +1 -1
- package/build/esm/web-tokens/layout-vars.ts +2 -0
- package/build/esm/web-tokens/visualConfig.d.ts +9 -0
- package/build/esm/web-tokens/visualConfig.js +1 -1
- package/build/scss/_layout.scss +4 -0
- package/build/scss/_variables.scss +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"RightPanel",{enumerable:!0,get:function(){return RightPanel}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/_interop_require_default._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_constants=require("../-constants"),_registry=require("../registry"),_useLayout=require("../useLayout"),_context=require("../context"),_useBreakpoints=require("../../../shared/useBreakpoints"),_PanelContainer=require("../PanelContainer"),_Sheet=require("../../Sheet/Sheet"),StyledSheetPanelShell=(0,_styled.default)("div",{target:"e12v2el90",label:"StyledSheetPanelShell"})({height:_Sheet.SHEET_MAX_HEIGHT},"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjL2NvbXBvbmVudHMvTGF5b3V0L1JpZ2h0UGFuZWwvUmlnaHRQYW5lbC50c3giLCJzb3VyY2VzIjpbInNyYy9jb21wb25lbnRzL0xheW91dC9SaWdodFBhbmVsL1JpZ2h0UGFuZWwudHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWx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IjoiQUFvQjhCIn0= */"),StyledRightPanelSlot=(0,_styled.default)("div",{target:"e12v2el91",label:"StyledRightPanelSlot"})(({theme})=>({position:"absolute",left:0,right:0,bottom:0,top:`var(${_constants.SUBNAV_OFFSET_VAR}, 0px)`,overflow:"hidden",transition:`top ${theme.variables.animation.navSlide.open.duration} ${theme.variables.animation.navSlide.open.timingFunction}`}),"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjL2NvbXBvbmVudHMvTGF5b3V0L1JpZ2h0UGFuZWwvUmlnaHRQYW5lbC50c3giLCJzb3VyY2VzIjpbInNyYy9jb21wb25lbnRzL0xheW91dC9SaWdodFBhbmVsL1JpZ2h0UGFuZWwudHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgU2xvdCwgU1VCTkFWX09GRlNFVF9WQVIgfSBmcm9tIFwiLi4vLWNvbnN0YW50c1wiO1xuaW1wb3J0IHtcbiAgdXNlRGVjbGFyZVBhbmVsLFxuICB1c2VMYXlvdXRQb3J0YWwsXG4gIHVzZVJ1bkNhbGxiYWNrT25WYWx1ZUNoYW5nZSxcbn0gZnJvbSBcIi4uL3JlZ2lzdHJ5XCI7XG5pbXBvcnQgeyB1c2VMYXlvdXQgfSBmcm9tIFwiLi4vdXNlTGF5b3V0XCI7XG5pbXBvcnQgeyB1c2VDYW5SZW5kZXJQYW5lbCB9IGZyb20gXCIuLi9jb250ZXh0XCI7XG5pbXBvcnQgeyB1c2VCcmVha3BvaW50cyB9IGZyb20gXCIuLi8uLi8uLi9zaGFyZWQvdXNlQnJlYWtwb2ludHNcIjtcbmltcG9ydCB7IFBhbmVsQ29udGFpbmVyIH0gZnJvbSBcIi4uL1BhbmVsQ29udGFpbmVyXCI7XG5pbXBvcnQgeyBT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NpZGVDbGlja1xuICAgICAgICBkaXNhYmxlSW5pdGlhbEZvY3VzXG4gICAgICA+XG4gICAgICAgIDxTdHlsZWRTaGVldFBhbmVsU2hlbGw+XG4gICAgICAgICAgPFBhbmVsQ29udGFpbmVyXG4gICAgICAgICAgICBhcmlhLWxhYmVsPXthcmlhTGFiZWx9XG4gICAgICAgICAgICBzY3JvbGxDb250YWluZXJSZWY9e3Njcm9sbENvbnRhaW5lclJlZn1cbiAgICAgICAgICAgIG9uU2Nyb2xsPXtvblNjcm9sbH1cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgICAgPC9QYW5lbENvbnRhaW5lcj5cbiAgICAgICAgPC9TdHlsZWRTaGVldFBhbmVsU2hlbGw+XG4gICAgICA8L1NoZWV0PlxuICAgICk7XG4gIH1cbiAgcmV0dXJuIGRvY2tlZFBhbmVsO1xufTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyQjZCIn0= */"),RightPanel=({children,defaultSize=378,minSize=328,maxSize="30%",collapsible=!1,onVisibleChange,onVariantChange,"aria-label":ariaLabel,scrollContainerRef,onScroll})=>{let{isVisible,hide,state}=(0,_useLayout.useLayout)()[_constants.Slot.rightPanel],{isMobile}=(0,_useBreakpoints.useBreakpoints)(),canRender=(0,_context.useCanRenderPanel)();(0,_registry.useDeclarePanel)(_constants.Slot.rightPanel,{defaultSize,minSize,maxSize,collapsible}),(0,_registry.useRunCallbackOnValueChange)(isVisible,onVisibleChange),(0,_registry.useRunCallbackOnValueChange)(state.variant,onVariantChange);let dockedPanel=(0,_registry.useLayoutPortal)(_constants.Slot.rightPanel,canRender&&isVisible&&!isMobile?_react.default.createElement(StyledRightPanelSlot,null,_react.default.createElement(_PanelContainer.PanelContainer,{"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll,showBorderLeft:"float"!==state.variant},children)):null);return canRender?isMobile?_react.default.createElement(_Sheet.Sheet,{isVisible:isVisible,onClose:hide,hasBackdrop:!0,dismissOnOutsideClick:!0,disableInitialFocus:!0},_react.default.createElement(StyledSheetPanelShell,null,_react.default.createElement(_PanelContainer.PanelContainer,{"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll},children))):dockedPanel:null};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"RightPanel",{enumerable:!0,get:function(){return RightPanel}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),_constants=require("../-constants"),_registry=require("../registry"),_useLayout=require("../useLayout"),_context=require("../context"),_useBreakpoints=require("../../../shared/useBreakpoints"),_RightPanelDocked=require("./RightPanelDocked"),_RightPanelSheet=require("./RightPanelSheet"),RightPanel=({children,defaultSize=378,minSize=328,maxSize="30%",collapsible=!1,variant="sidebar",onVisibleChange,onVariantChange,"aria-label":ariaLabel,scrollContainerRef,onScroll})=>{let{state:layoutState,[_constants.Slot.rightPanel]:panel}=(0,_useLayout.useLayout)(),{isVisible,hide}=panel,{isMobile}=(0,_useBreakpoints.useBreakpoints)(),canRender=(0,_context.useCanRenderPanel)();(0,_registry.useDeclarePanel)(_constants.Slot.rightPanel,{defaultSize,minSize,maxSize,collapsible,variant});let resolvedVariant=layoutState[_constants.Slot.rightPanel].variant??variant;return((0,_registry.useRunCallbackOnValueChange)(isVisible,onVisibleChange),(0,_registry.useRunCallbackOnValueChange)(resolvedVariant,onVariantChange),canRender)?isMobile?_react.default.createElement(_RightPanelSheet.RightPanelSheet,{isVisible:isVisible,hide:hide,"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll},children):_react.default.createElement(_RightPanelDocked.RightPanelDocked,{isVisible:isVisible,variant:resolvedVariant,"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll},children):null};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { RightPanelVariant } from "../-types";
|
|
3
|
+
export type RightPanelDockedProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
/** Docked column vs. minimized floating window - only the border differs here. */
|
|
7
|
+
variant: RightPanelVariant;
|
|
8
|
+
"aria-label": string;
|
|
9
|
+
scrollContainerRef?: React.Ref<HTMLDivElement>;
|
|
10
|
+
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Docked (desktop) right panel. Portals its content into the `rightPanel` slot's
|
|
14
|
+
* host - an in-flow, resizable column - while the panel is visible. Content lives
|
|
15
|
+
* in a {@link PanelContainer} so `Layout.RightPanelHeader` /
|
|
16
|
+
* `Layout.RightPanelFooter` children stick to the edges. The mobile presentation
|
|
17
|
+
* is {@link RightPanelSheet}; `RightPanel` picks between the two by breakpoint.
|
|
18
|
+
*/
|
|
19
|
+
export declare const RightPanelDocked: React.FC<RightPanelDockedProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"RightPanelDocked",{enumerable:!0,get:function(){return RightPanelDocked}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/_interop_require_default._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_constants=require("../-constants"),_registry=require("../registry"),_PanelContainer=require("../PanelContainer"),StyledRightPanelSlot=(0,_styled.default)("div",{target:"eq48lip0",label:"StyledRightPanelSlot"})(({theme})=>({position:"absolute",left:0,right:0,bottom:0,top:`var(${_constants.SUBNAV_OFFSET_VAR}, 0px)`,overflow:"hidden",transition:`top ${theme.variables.animation.navSlide.open.duration} ${theme.variables.animation.navSlide.open.timingFunction}`}),"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjL2NvbXBvbmVudHMvTGF5b3V0L1JpZ2h0UGFuZWwvUmlnaHRQYW5lbERvY2tl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ibWFwcGluZ3MiOiJBQVU2QiJ9 */"),RightPanelDocked=({children,isVisible,variant,"aria-label":ariaLabel,scrollContainerRef,onScroll})=>(0,_registry.useLayoutPortal)(_constants.Slot.rightPanel,isVisible?_react.default.createElement(StyledRightPanelSlot,null,_react.default.createElement(_PanelContainer.PanelContainer,{"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll,showBorderLeft:"float"!==variant},children)):null);
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { RightPanelHeaderProps } from "../-types";
|
|
3
3
|
/**
|
|
4
|
-
* Optional sticky header for `Layout.RightPanel` - place it among the
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* into the
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
4
|
+
* Optional sticky header for `Layout.RightPanel` - place it among the panel's
|
|
5
|
+
* children; it sticks to the top while the rest of the content scrolls. Renders
|
|
6
|
+
* the `title` block after `leftSlot` and buttons at the header end (after
|
|
7
|
+
* `rightSlot`): a close button that hides the panel, plus a variant toggle
|
|
8
|
+
* that minimizes the panel into the float / docks it back - shown
|
|
9
|
+
* only when `slotProps.variantButton` is supplied, which is what opts the panel
|
|
10
|
+
* into floating at all. While floating (desktop only - the
|
|
11
|
+
* mobile sheet never mounts the float), the whole header becomes a
|
|
12
|
+
* `LayoutFloatDragHandle`; `leftSlot`, `rightSlot`, and the built-in buttons
|
|
13
|
+
* are each wrapped in `LayoutFloatDragHandle.Guard` so their own click/arrow-key
|
|
14
|
+
* behavior keeps working even though a drag can start on them. On mobile
|
|
15
|
+
* viewports the panel renders as a bottom sheet where dock/float has no meaning
|
|
16
|
+
* and the sheet brings its own dismiss affordances, so the variant toggle is
|
|
17
|
+
* omitted there too.
|
|
14
18
|
*/
|
|
15
19
|
export declare function RightPanelHeader({ leftSlot, rightSlot, title, slotProps, "data-e2e-test-id": dataE2eTestId, }: RightPanelHeaderProps): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"RightPanelHeader",{enumerable:!0,get:function(){return RightPanelHeader}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),_constants=require("../-constants"),_useLayout=require("../useLayout"),_useBreakpoints=require("../../../shared/useBreakpoints"),_Sandwich=require("../../Internal/Sandwich/Sandwich"),_PanelHeader=require("../../Internal/PanelHeader/PanelHeader"),_PictogramButton=require("../../PictogramButton/PictogramButton");function RightPanelHeader({leftSlot,rightSlot,title,slotProps,"data-e2e-test-id":dataE2eTestId}){let{hide,setVariant,state}=(0,_useLayout.useLayout)()[_constants.Slot.rightPanel],{isMobile}=(0,_useBreakpoints.useBreakpoints)(),isFloating="float"===state.variant;return _react.default.createElement(_Sandwich.Sandwich.Header,{"data-e2e-test-id":dataE2eTestId},_react.default.createElement(_PanelHeader.PanelHeader,{leftSlot:leftSlot,title:title,rightSlot:_react.default.createElement(_react.default.Fragment,null,rightSlot,!isMobile&&_react.default.createElement(_react.default.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"RightPanelHeader",{enumerable:!0,get:function(){return RightPanelHeader}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),_constants=require("../-constants"),_useLayout=require("../useLayout"),_useBreakpoints=require("../../../shared/useBreakpoints"),_Sandwich=require("../../Internal/Sandwich/Sandwich"),_PanelHeader=require("../../Internal/PanelHeader/PanelHeader"),_PictogramButton=require("../../PictogramButton/PictogramButton"),_Inline=require("../../Inline/Inline"),_LayoutFloatDragHandle=require("../../Internal/LayoutFloat/LayoutFloatDragHandle");function RightPanelHeader({leftSlot,rightSlot,title,slotProps,"data-e2e-test-id":dataE2eTestId}){let{hide,setVariant,state}=(0,_useLayout.useLayout)()[_constants.Slot.rightPanel],{isMobile}=(0,_useBreakpoints.useBreakpoints)(),isFloating="float"===state.variant,variantButtonSlotProps=slotProps.variantButton;return _react.default.createElement(_Sandwich.Sandwich.Header,{"data-e2e-test-id":dataE2eTestId},_react.default.createElement(_LayoutFloatDragHandle.LayoutFloatDragHandle,{isDraggable:isFloating,"aria-label":slotProps.dragHandle?.["aria-label"]},_react.default.createElement(_PanelHeader.PanelHeader,{leftSlot:_react.default.createElement(_LayoutFloatDragHandle.LayoutFloatDragHandle.Guard,null,leftSlot),title:title,rightSlot:_react.default.createElement(_react.default.Fragment,null,_react.default.createElement(_LayoutFloatDragHandle.LayoutFloatDragHandle.Guard,null,rightSlot),!isMobile&&_react.default.createElement(_LayoutFloatDragHandle.LayoutFloatDragHandle.Guard,null,_react.default.createElement(_Inline.Inline,{space:"xxs",vAlignItems:"center",noWrap:!0},variantButtonSlotProps&&_react.default.createElement(_PictogramButton.PictogramButton,{icon:isFloating?"open-sidebar-right":"minimize",size:"s",variant:"tertiary","aria-label":isFloating?variantButtonSlotProps.dockLabel:variantButtonSlotProps.minimizeLabel,onClick:()=>setVariant(isFloating?"sidebar":"float")}),_react.default.createElement(_PictogramButton.PictogramButton,{icon:"x",size:"s",variant:"tertiary","aria-label":slotProps.closeButton["aria-label"],onClick:hide}))))})))}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type RightPanelSheetProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
isVisible: boolean;
|
|
5
|
+
hide: () => void;
|
|
6
|
+
"aria-label": string;
|
|
7
|
+
scrollContainerRef?: React.Ref<HTMLDivElement>;
|
|
8
|
+
onScroll?: React.UIEventHandler<HTMLDivElement>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Mobile right panel. Renders its content as a bottom {@link Sheet} instead of an
|
|
12
|
+
* in-flow column - the Sheet portals itself, so the layout portal is bypassed
|
|
13
|
+
* here. Visibility is the shared `rightPanel` layout state, so `useLayout()`
|
|
14
|
+
* drives it identically to the docked desktop panel; outside-click / backdrop
|
|
15
|
+
* dismissal routes back through `hide`. Initial focus is suppressed so opening
|
|
16
|
+
* the sheet never pops the on-screen keyboard.
|
|
17
|
+
*/
|
|
18
|
+
export declare const RightPanelSheet: React.FC<RightPanelSheetProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"RightPanelSheet",{enumerable:!0,get:function(){return RightPanelSheet}});const _interop_require_default=require("@swc/helpers/_/_interop_require_default"),_react=/*#__PURE__*/_interop_require_default._(require("react")),_styled=/*#__PURE__*/_interop_require_default._(require("@emotion/styled")),_PanelContainer=require("../PanelContainer"),_Sheet=require("../../Sheet/Sheet"),StyledSheetPanelShell=(0,_styled.default)("div",{target:"e1wbhy260",label:"StyledSheetPanelShell"})({height:_Sheet.SHEET_MAX_HEIGHT},"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjL2NvbXBvbmVudHMvTGF5b3V0L1JpZ2h0UGFuZWwvUmlnaHRQYW5lbFNoZWV0LnRzeCIsInNvdXJjZXMiOlsic3JjL2NvbXBvbmVudHMvTGF5b3V0L1JpZ2h0UGFuZWwvUmlnaHRQYW5lbFNoZWV0LnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSBcInJlYWN0XCI7XG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB7IFBhbmVsQ29udGFpbmVyIH0gZnJvbSBcIi4uL1BhbmVsQ29udGFpbmVyXCI7XG5pbXBvcnQgeyBTaGVldCwgU0hFRVRfTUFYX0hFSUdIVCB9IGZyb20gXCIuLi8uLi9TaGVldC9TaGVldFwiO1xuXG4vLyBHaXZlcyB0aGUgcGFuZWwgc2hlbGwgYSBkZWZpbml0ZSBoZWlnaHQgaW5zaWRlIHRoZSB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bnRhaW5lcj5cbiAgICA8L1N0eWxlZFNoZWV0UGFuZWxTaGVsbD5cbiAgPC9TaGVldD5cbik7XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBVThCIn0= */"),RightPanelSheet=({children,isVisible,hide,"aria-label":ariaLabel,scrollContainerRef,onScroll})=>_react.default.createElement(_Sheet.Sheet,{isVisible:isVisible,onClose:hide,hasBackdrop:!0,dismissOnOutsideClick:!0,disableInitialFocus:!0},_react.default.createElement(StyledSheetPanelShell,null,_react.default.createElement(_PanelContainer.PanelContainer,{"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll},children)));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ContentSplitBaseProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Base layer of the mobile split stack - the presentation `Layout.Content` takes
|
|
7
|
+
* while a `Layout.Split` is stacked over it. Portals into the layout-root stack
|
|
8
|
+
* host and wraps in a sliding layer, so content and the split view share one
|
|
9
|
+
* containing block and slide against each other regardless of where their
|
|
10
|
+
* markers sit in the tree. The overlay layer is {@link MobileSplitView}; the
|
|
11
|
+
* in-flow presentation is {@link ContentDocked}.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ContentSplitBase: React.FC<ContentSplitBaseProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ContentSplitBase",{enumerable:!0,get:function(){return ContentSplitBase}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),_reactdom=require("react-dom"),_StyledMobileSplitSlideLayer=require("./StyledMobileSplitSlideLayer"),_useMobileSplitStack=require("./useMobileSplitStack"),_useMobileSplitView=require("./useMobileSplitView"),ContentSplitBase=({children})=>{let{isSplitViewActive}=(0,_useMobileSplitView.useMobileSplitView)(),{host}=(0,_useMobileSplitStack.useMobileSplitStack)();return host?(0,_reactdom.createPortal)(_react.default.createElement(_StyledMobileSplitSlideLayer.StyledMobileSplitSlideLayer,{layer:"base",offset:(0,_useMobileSplitView.contentOffsetFor)(isSplitViewActive)},children),host):null};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { MobileSplitViewProps } from "../../-types";
|
|
3
|
+
/**
|
|
4
|
+
* Mobile presentation of `Layout.Split`: a full-area layer that slides in over
|
|
5
|
+
* the base `content` view and back out, without unmounting. Registers its
|
|
6
|
+
* presence so `content` knows to join the sliding stack, and portals into the
|
|
7
|
+
* layout-root stack host so the two views share one containing block regardless
|
|
8
|
+
* of the marker's depth. Whether it's in front is the `splitview` slot's
|
|
9
|
+
* visibility. Renders nothing on desktop.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MobileSplitView: React.FC<MobileSplitViewProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"MobileSplitView",{enumerable:!0,get:function(){return MobileSplitView}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_reactdom=require("react-dom"),_PanelContainer=require("../../PanelContainer"),_StyledMobileSplitSlideLayer=require("./StyledMobileSplitSlideLayer"),_useMobileSplitStack=require("./useMobileSplitStack"),_useMobileSplitView=require("./useMobileSplitView"),MobileSplitView=({children,"aria-label":ariaLabel})=>{let enabled=(0,_useMobileSplitView.useMobileSplitViewEnabled)(),{isSplitViewActive}=(0,_useMobileSplitView.useMobileSplitView)(),{host,registerSplit}=(0,_useMobileSplitStack.useMobileSplitStack)();return((0,_react.useLayoutEffect)(()=>{if(enabled)return registerSplit()},[enabled,registerSplit]),enabled&&host)?(0,_reactdom.createPortal)(_react.default.createElement(_StyledMobileSplitSlideLayer.StyledMobileSplitSlideLayer,{layer:"overlay",offset:(0,_useMobileSplitView.splitViewOffsetFor)(isSplitViewActive)},_react.default.createElement(_PanelContainer.PanelContainer,{"aria-label":ariaLabel},children)),host):null};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MobileSplitViewOffset } from "./useMobileSplitView";
|
|
2
|
+
declare const LAYER_Z_INDEX: {
|
|
3
|
+
readonly base: 1;
|
|
4
|
+
readonly overlay: 2;
|
|
5
|
+
};
|
|
6
|
+
export type MobileSplitLayer = keyof typeof LAYER_Z_INDEX;
|
|
7
|
+
/**
|
|
8
|
+
* One layer of the two-view mobile split. Slides to `offset` - -1 (parked to the
|
|
9
|
+
* left), 0 (in view), 1 (parked to the right) - so switching pushes the outgoing
|
|
10
|
+
* view toward the side it rests on while the incoming one slides in from the
|
|
11
|
+
* opposite edge, like a Drawer.
|
|
12
|
+
*/
|
|
13
|
+
export declare const StyledMobileSplitSlideLayer: import("@emotion/styled").StyledComponent<{
|
|
14
|
+
theme?: import("@emotion/react").Theme;
|
|
15
|
+
as?: React.ElementType;
|
|
16
|
+
} & {
|
|
17
|
+
offset: MobileSplitViewOffset;
|
|
18
|
+
layer: MobileSplitLayer;
|
|
19
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"StyledMobileSplitSlideLayer",{enumerable:!0,get:function(){return StyledMobileSplitSlideLayer}});const _styled=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("@emotion/styled")),OFFSET_TRANSFORM={[-1]:"translateX(-100%)",0:"translateX(0)",1:"translateX(100%)"},LAYER_Z_INDEX={base:1,overlay:2},StyledMobileSplitSlideLayer=(0,_styled.default)("div",{shouldForwardProp:prop=>"offset"!==prop&&"layer"!==prop,target:"e187cevn0",label:"StyledMobileSplitSlideLayer"})(({theme,offset,layer})=>{let{duration,timingFunction}=theme.variables.animation.navSlide.open;return{position:"absolute",inset:0,zIndex:LAYER_Z_INDEX[layer],transform:OFFSET_TRANSFORM[offset],transition:`transform ${duration} ${timingFunction}`,pointerEvents:0===offset?"auto":"none","@media (prefers-reduced-motion: reduce)":{transition:"none"}}},"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjL2NvbXBvbmVudHMvTGF5b3V0L1NwbGl0L01vYmlsZVNwbGl0Vmlldy9TdHlsZWRNb2JpbGVTcGxpdFNsaWRlTGF5ZXIudHN4Iiwic291cmNlcyI6WyJzcmMvY29tcG9uZW50cy9MYXlvdXQvU3BsaXQvTW9iaWxlU3BsaXRWaWV3L1N0eWxlZE1vYmlsZVNwbGl0U2xpZGVMYXllci50c3giXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5pbXBvcnQgdHlwZSB7IE1vYmlsZVNwbGl0Vmlld09mZnNldCB9IGZyb20gXCIuL3VzZU1vYmlsZVNwbGl0Vmlld1wiO1xuXG5jb25zdCBPRkZTRVRfVFJBTlNGT1JNOiBSZWNvcmQ8TW9iaWxlU3BsaXRWaWV3T2Zmc2V0LCBzdHJpbmc+ID0ge1xuICBbLTFdOiBcInRyYW5zbGF0ZVgoLTEwMCUpXCIsXG4gIDA6IFwidHJhbnNsYXRlWCgwKVwiLFxuICAxOiBcInRyYW5zbGF0ZVgoMTAwJSlcIixcbn07XG5cbi8vIFRoZSBzcGxpdCB2aWV3IChgb3ZlcmxheWApIHN0YWNrcyBhYm92ZSB0aGUgYmFzZSBgY29udGVudGAgdmlldyAoYGJhc2VgKS5cbmNvbnN0IExBWUVSX1pfSU5ERVggPSB7IGJhc2U6IDEsIG92ZXJsYXk6IDIgfSBhcyBjb25zdDtcbmV4cG9ydCB0eXBlIE1vYmlsZVNwbGl0TGF5ZXIgPSBrZXlvZiB0eXBlb2YgTEFZRVJfWl9JTkRFWDtcblxuLyoqXG4gKiBPbmUgb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XG4gICAgICBwb2ludGVyRXZlbnRzOiBvZmZzZXQgPT09IDAgPyBcImF1dG9cIiA6IFwibm9uZVwiLFxuICAgICAgXCJAbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSlcIjogeyB0cmFuc2l0aW9uOiBcIm5vbmVcIiB9LFxuICAgIH07XG4gIH1cbik7XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUIyQyJ9 */");
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type MobileSplitStackValue = {
|
|
2
|
+
/** The full-area DOM node at the layout root that hosts the mobile split
|
|
3
|
+
* stack. `null` until it mounts (and on desktop, where it isn't rendered). */
|
|
4
|
+
host: HTMLElement | null;
|
|
5
|
+
/** True while a mobile split view is mounted, so `content` knows to join the
|
|
6
|
+
* sliding stack (vs. staying in-flow). */
|
|
7
|
+
isSplitPresent: boolean;
|
|
8
|
+
/** Register a mounted split view; returns its unregister cleanup. */
|
|
9
|
+
registerSplit: () => () => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Everything the two-view mobile split shares, scoped to one `<Layout>`: the
|
|
13
|
+
* stack host to portal into and whether a split view is present. `content` and
|
|
14
|
+
* the split view read this to slide against each other inside one containing
|
|
15
|
+
* block, regardless of where their markers sit in the tree. *Which* view is in
|
|
16
|
+
* front isn't stored here - it derives from the `splitview` slot's visibility
|
|
17
|
+
* (see {@link useMobileSplitView}).
|
|
18
|
+
*/
|
|
19
|
+
export declare const MobileSplitStackContext: React.Context<MobileSplitStackValue>;
|
|
20
|
+
export declare const useMobileSplitStack: () => MobileSplitStackValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get MobileSplitStackContext(){return MobileSplitStackContext},get useMobileSplitStack(){return useMobileSplitStack}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const _react=require("react"),MobileSplitStackContext=(0,_react.createContext)(null),useMobileSplitStack=()=>{let context=(0,_react.useContext)(MobileSplitStackContext);if(!context)throw Error("useMobileSplitStack must be used within a <Layout>.");return context};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Whether the mobile split stack applies to the current viewport: below the
|
|
2
|
+
* mobile breakpoint with panels enabled. */
|
|
3
|
+
export declare function useMobileSplitViewEnabled(): boolean;
|
|
4
|
+
/** A view's horizontal rest position in the mobile stack: `-1` (parked off the
|
|
5
|
+
* left edge), `0` (in view), `1` (parked off the right edge). */
|
|
6
|
+
export type MobileSplitViewOffset = -1 | 0 | 1;
|
|
7
|
+
/** The base `content` view parks off the left edge while the split view is in
|
|
8
|
+
* front; otherwise it's in view. */
|
|
9
|
+
export declare const contentOffsetFor: (isSplitViewActive: boolean) => MobileSplitViewOffset;
|
|
10
|
+
/** The split view rests off the right edge until it's brought to the front. */
|
|
11
|
+
export declare const splitViewOffsetFor: (isSplitViewActive: boolean) => MobileSplitViewOffset;
|
|
12
|
+
export type MobileSplitViewValue = {
|
|
13
|
+
/** Whether the split view is in front of the base content view. */
|
|
14
|
+
isSplitViewActive: boolean;
|
|
15
|
+
/** Bring the split view to the front. */
|
|
16
|
+
showSplitView: () => void;
|
|
17
|
+
/** Return to the base content view. */
|
|
18
|
+
showContent: () => void;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Mobile control for the two-view split: read whether the split view is in front
|
|
22
|
+
* and switch between it and the base `content` view - wire your own button to
|
|
23
|
+
* `showSplitView` / `showContent`. Backed by the `splitview` slot's visibility
|
|
24
|
+
* (the same state the desktop column tracks), so the two presentations never
|
|
25
|
+
* disagree; on desktop this just shows/hides the column.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useMobileSplitView(): MobileSplitViewValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get contentOffsetFor(){return contentOffsetFor},get splitViewOffsetFor(){return splitViewOffsetFor},get useMobileSplitView(){return useMobileSplitView},get useMobileSplitViewEnabled(){return useMobileSplitViewEnabled}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const _useBreakpoints=require("../../../../shared/useBreakpoints"),_constants=require("../../-constants"),_context=require("../../context"),_useLayout=require("../../useLayout");function useMobileSplitViewEnabled(){let{isMobile}=(0,_useBreakpoints.useBreakpoints)(),canRenderPanel=(0,_context.useCanRenderPanel)();return isMobile&&canRenderPanel}const contentOffsetFor=isSplitViewActive=>isSplitViewActive?-1:0,splitViewOffsetFor=isSplitViewActive=>+!isSplitViewActive;function useMobileSplitView(){let{isVisible,show,hide}=(0,_useLayout.useLayout)()[_constants.Slot.splitview];return{isSplitViewActive:isVisible,showSplitView:show,showContent:hide}}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { SplitProps } from "../-types";
|
|
3
3
|
/**
|
|
4
|
-
* Split view panel.
|
|
5
|
-
*
|
|
6
|
-
* `
|
|
7
|
-
*
|
|
4
|
+
* Split view panel. Picks its presentation by breakpoint: an in-flow resizable
|
|
5
|
+
* column on desktop ({@link SplitDocked}) and a full-area {@link MobileSplitView}
|
|
6
|
+
* that slides over `content` on mobile. Both are driven by the same state - the
|
|
7
|
+
* `splitview` slot's visibility (`useLayout().splitview` / `useMobileSplitView`)
|
|
8
|
+
* - so showing or hiding the split behaves identically on either breakpoint.
|
|
8
9
|
*/
|
|
9
10
|
export declare const Split: React.FC<SplitProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Split",{enumerable:!0,get:function(){return Split}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Split",{enumerable:!0,get:function(){return Split}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),_useBreakpoints=require("../../../shared/useBreakpoints"),_context=require("../context"),_MobileSplitView=require("./MobileSplitView/MobileSplitView"),_SplitDocked=require("./SplitDocked"),Split=({children,"aria-label":ariaLabel,defaultSize,minSize,maxSize,resizable})=>{let{isMobile}=(0,_useBreakpoints.useBreakpoints)();return(0,_context.useCanRenderPanel)()?isMobile?_react.default.createElement(_MobileSplitView.MobileSplitView,{"aria-label":ariaLabel},children):_react.default.createElement(_SplitDocked.SplitDocked,{"aria-label":ariaLabel,defaultSize:defaultSize,minSize:minSize,maxSize:maxSize,resizable:resizable},children):null};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SplitProps } from "../-types";
|
|
3
|
+
/**
|
|
4
|
+
* Desktop split view. Declares the `splitview` slot and portals its content
|
|
5
|
+
* while visible - an in-flow resizable column beside `content`.
|
|
6
|
+
* `Layout.SplitHeader` / `Layout.SplitFooter` children stick to the panel
|
|
7
|
+
* edges; the remaining content scrolls.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SplitDocked: React.FC<SplitProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"SplitDocked",{enumerable:!0,get:function(){return SplitDocked}});const _react=/*#__PURE__*/require("@swc/helpers/_/_interop_require_default")._(require("react")),_constants=require("../-constants"),_registry=require("../registry"),_useLayout=require("../useLayout"),_PanelContainer=require("../PanelContainer"),SplitDocked=({children,"aria-label":ariaLabel,defaultSize,minSize,maxSize,resizable})=>{let{isVisible}=(0,_useLayout.useLayout)()[_constants.Slot.splitview],canResize=!1!==resizable;return(0,_registry.useDeclarePanel)(_constants.Slot.splitview,{defaultSize,minSize,maxSize,collapsible:canResize,resizable:canResize}),(0,_registry.useLayoutPortal)(_constants.Slot.splitview,isVisible?_react.default.createElement(_PanelContainer.PanelContainer,{"aria-label":ariaLabel,showBorderLeft:!0},children):null)};
|
|
@@ -3,6 +3,7 @@ export { Layout } from "./Layout";
|
|
|
3
3
|
export { LayoutProvider } from "./LayoutProvider";
|
|
4
4
|
export { useLayoutVar } from "./LayoutCssVars";
|
|
5
5
|
export { useLayout } from "./useLayout";
|
|
6
|
+
export { useMobileSplitView, type MobileSplitViewValue, } from "./Split/MobileSplitView/useMobileSplitView";
|
|
6
7
|
export { useAutoScrollToBottom } from "./useAutoScrollToBottom";
|
|
7
8
|
export { createLayoutStore } from "./store";
|
|
8
9
|
export { createInitialState, layoutReducer } from "./reducer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get Layout(){return _Layout.Layout},get LayoutProvider(){return _LayoutProvider.LayoutProvider},get PANEL_WIDTH_VAR(){return _constants.PANEL_WIDTH_VAR},get SUBNAV_OFFSET_VAR(){return _constants.SUBNAV_OFFSET_VAR},get createInitialState(){return _reducer.createInitialState},get createLayoutStore(){return _store.createLayoutStore},get layoutReducer(){return _reducer.layoutReducer},get useAutoScrollToBottom(){return _useAutoScrollToBottom.useAutoScrollToBottom},get useLayout(){return _useLayout.useLayout},get useLayoutVar(){return _LayoutCssVars.useLayoutVar}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const _export_star=require("@swc/helpers/_/_export_star"),_constants=require("./-constants"),_Layout=require("./Layout"),_LayoutProvider=require("./LayoutProvider"),_LayoutCssVars=require("./LayoutCssVars"),_useLayout=require("./useLayout"),_useAutoScrollToBottom=require("./useAutoScrollToBottom"),_store=require("./store"),_reducer=require("./reducer");_export_star._(require("./-types"),exports);
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get Layout(){return _Layout.Layout},get LayoutProvider(){return _LayoutProvider.LayoutProvider},get PANEL_WIDTH_VAR(){return _constants.PANEL_WIDTH_VAR},get SUBNAV_OFFSET_VAR(){return _constants.SUBNAV_OFFSET_VAR},get createInitialState(){return _reducer.createInitialState},get createLayoutStore(){return _store.createLayoutStore},get layoutReducer(){return _reducer.layoutReducer},get useAutoScrollToBottom(){return _useAutoScrollToBottom.useAutoScrollToBottom},get useLayout(){return _useLayout.useLayout},get useLayoutVar(){return _LayoutCssVars.useLayoutVar},get useMobileSplitView(){return _useMobileSplitView.useMobileSplitView}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const _export_star=require("@swc/helpers/_/_export_star"),_constants=require("./-constants"),_Layout=require("./Layout"),_LayoutProvider=require("./LayoutProvider"),_LayoutCssVars=require("./LayoutCssVars"),_useLayout=require("./useLayout"),_useMobileSplitView=require("./Split/MobileSplitView/useMobileSplitView"),_useAutoScrollToBottom=require("./useAutoScrollToBottom"),_store=require("./store"),_reducer=require("./reducer");_export_star._(require("./-types"),exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get createInitialState(){return createInitialState},get layoutReducer(){return layoutReducer}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get createInitialState(){return createInitialState},get layoutReducer(){return layoutReducer}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});function sidePanelFields(config={}){return{kind:"sidePanel",visible:config.defaultVisible??!0,collapsible:config.collapsible??!0,size:config.defaultSize,minSize:config.minSize,maxSize:config.maxSize}}function panelState(config={}){return{kind:"panel",visible:config.defaultVisible??!0,size:config.defaultSize,minSize:config.minSize,maxSize:config.maxSize}}function createInitialState(config={}){return{leftPanel:sidePanelFields(config.leftPanel),rightPanel:{...sidePanelFields({defaultVisible:!1,...config.rightPanel}),variant:config.rightPanel?.variant},content:panelState(config.content),splitview:panelState({defaultVisible:!1,...config.splitview})}}const layoutReducer=(state,action,initial)=>{switch(action.type){case"setVisible":{let slot=state[action.slot];if(slot.visible===action.visible)return state;return{...state,[action.slot]:{...slot,visible:action.visible}}}case"setVariant":{let panel=state[action.panel];if(panel.variant===action.variant)return state;return{...state,[action.panel]:{...panel,variant:action.variant}}}case"resize":{let slot=state[action.slot];if(slot.size===action.size)return state;return{...state,[action.slot]:{...slot,size:action.size}}}case"reset":if(!initial)return state;if(!action.slot)return initial;if(state[action.slot]===initial[action.slot])return state;return{...state,[action.slot]:initial[action.slot]};default:return state}};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { PanelImperativeHandle } from "react-resizable-panels";
|
|
3
|
-
import type { Size, SlotKey } from "./-types";
|
|
3
|
+
import type { RightPanelVariant, Size, SlotKey } from "./-types";
|
|
4
4
|
export type PortalTargets = Partial<Record<SlotKey, HTMLElement | null>>;
|
|
5
5
|
export declare const LayoutPortalContext: React.Context<Partial<Record<"content" | "leftPanel" | "splitview" | "rightPanel", HTMLElement>>>;
|
|
6
6
|
/**
|
|
@@ -20,6 +20,12 @@ export type PanelReg = {
|
|
|
20
20
|
minSize?: Size;
|
|
21
21
|
maxSize?: Size;
|
|
22
22
|
collapsible?: boolean;
|
|
23
|
+
/** When `false`, the panel is fixed at `defaultSize` and can't be drag-resized
|
|
24
|
+
* (directly or via a neighbour). Defaults to resizable. */
|
|
25
|
+
resizable?: boolean;
|
|
26
|
+
/** Initial presentation from `RightPanel`'s `variant` prop. Read as the
|
|
27
|
+
* fallback wherever the store's variant is still unset. */
|
|
28
|
+
variant?: RightPanelVariant;
|
|
23
29
|
};
|
|
24
30
|
export type PanelRegistry = {
|
|
25
31
|
register: (slot: SlotKey, reg: PanelReg) => void;
|
|
@@ -28,6 +34,8 @@ export type PanelRegistry = {
|
|
|
28
34
|
export declare const PanelRegistryContext: React.Context<PanelRegistry>;
|
|
29
35
|
/** Register this slot as a panel for the marker's lifetime. */
|
|
30
36
|
export declare function useDeclarePanel(slot: SlotKey, reg: PanelReg): void;
|
|
37
|
+
export type PanelDeclarations = Partial<Record<SlotKey, PanelReg>>;
|
|
38
|
+
export declare const PanelDeclarationsContext: React.Context<Partial<Record<"content" | "leftPanel" | "splitview" | "rightPanel", PanelReg>>>;
|
|
31
39
|
/**
|
|
32
40
|
* Keeps an animating-out panel in the resizable row while its exit plays - the
|
|
33
41
|
* Group would otherwise drop the column the instant it's hidden. The panel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get LayoutPortalContext(){return LayoutPortalContext},get PanelAnimationContext(){return PanelAnimationContext},get PanelPresenceContext(){return PanelPresenceContext},get PanelRegistryContext(){return PanelRegistryContext},get useDeclarePanel(){return useDeclarePanel},get useLayoutPortal(){return useLayoutPortal},get usePanelAnimationControl(){return usePanelAnimationControl},get usePanelPresence(){return usePanelPresence},get useRunCallbackOnValueChange(){return useRunCallbackOnValueChange},get useVisibleChange(){return useVisibleChange}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const _react=require("react"),_reactdom=require("react-dom"),_constants=require("./-constants"),_context=require("./context"),LayoutPortalContext=(0,_react.createContext)({});function useLayoutPortal(slot,children){let slotNode=(0,_react.useContext)(LayoutPortalContext)[slot]??null;return slotNode?(0,_reactdom.createPortal)(children,slotNode):null}const PanelRegistryContext=(0,_react.createContext)(null);function useDeclarePanel(slot,reg){let registry=(0,_react.useContext)(PanelRegistryContext),declarationEnabled=!0===(0,_context.useLayoutPanelsEnabled)()||slot===_constants.Slot.content,{defaultSize,minSize,maxSize,collapsible}=reg;(0,_react.useLayoutEffect)(()=>{if(registry&&declarationEnabled)return registry.register(slot,{defaultSize,minSize,maxSize,collapsible}),()=>registry.unregister(slot)},[registry,declarationEnabled,slot,defaultSize,minSize,maxSize,collapsible])}const PanelPresenceContext=(0,_react.createContext)(null);function usePanelPresence(slot,isPresent){let presence=(0,_react.useContext)(PanelPresenceContext);(0,_react.useLayoutEffect)(()=>{if(presence)return presence.setPresent(slot,isPresent),()=>presence.setPresent(slot,!1)},[presence,slot,isPresent])}const PanelAnimationContext=(0,_react.createContext)(null);function usePanelAnimationControl(){return(0,_react.useContext)(PanelAnimationContext)}function useRunCallbackOnValueChange(value,onChange){let prev=(0,_react.useRef)(value);(0,_react.useEffect)(()=>{prev.current!==value&&(prev.current=value,onChange?.(value))},[value,onChange])}function useVisibleChange(visible,onChange){useRunCallbackOnValueChange(visible,onChange)}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var target=exports,all={get LayoutPortalContext(){return LayoutPortalContext},get PanelAnimationContext(){return PanelAnimationContext},get PanelDeclarationsContext(){return PanelDeclarationsContext},get PanelPresenceContext(){return PanelPresenceContext},get PanelRegistryContext(){return PanelRegistryContext},get useDeclarePanel(){return useDeclarePanel},get useLayoutPortal(){return useLayoutPortal},get usePanelAnimationControl(){return usePanelAnimationControl},get usePanelPresence(){return usePanelPresence},get useRunCallbackOnValueChange(){return useRunCallbackOnValueChange},get useVisibleChange(){return useVisibleChange}};for(var name in all)Object.defineProperty(target,name,{enumerable:!0,get:Object.getOwnPropertyDescriptor(all,name).get});const _react=require("react"),_reactdom=require("react-dom"),_constants=require("./-constants"),_context=require("./context"),LayoutPortalContext=(0,_react.createContext)({});function useLayoutPortal(slot,children){let slotNode=(0,_react.useContext)(LayoutPortalContext)[slot]??null;return slotNode?(0,_reactdom.createPortal)(children,slotNode):null}const PanelRegistryContext=(0,_react.createContext)(null);function useDeclarePanel(slot,reg){let registry=(0,_react.useContext)(PanelRegistryContext),declarationEnabled=!0===(0,_context.useLayoutPanelsEnabled)()||slot===_constants.Slot.content,{defaultSize,minSize,maxSize,collapsible,resizable,variant}=reg;(0,_react.useLayoutEffect)(()=>{if(registry&&declarationEnabled)return registry.register(slot,{defaultSize,minSize,maxSize,collapsible,resizable,variant}),()=>registry.unregister(slot)},[registry,declarationEnabled,slot,defaultSize,minSize,maxSize,collapsible,resizable,variant])}const PanelDeclarationsContext=(0,_react.createContext)({}),PanelPresenceContext=(0,_react.createContext)(null);function usePanelPresence(slot,isPresent){let presence=(0,_react.useContext)(PanelPresenceContext);(0,_react.useLayoutEffect)(()=>{if(presence)return presence.setPresent(slot,isPresent),()=>presence.setPresent(slot,!1)},[presence,slot,isPresent])}const PanelAnimationContext=(0,_react.createContext)(null);function usePanelAnimationControl(){return(0,_react.useContext)(PanelAnimationContext)}function useRunCallbackOnValueChange(value,onChange){let prev=(0,_react.useRef)(value);(0,_react.useEffect)(()=>{prev.current!==value&&(prev.current=value,onChange?.(value))},[value,onChange])}function useVisibleChange(visible,onChange){useRunCallbackOnValueChange(visible,onChange)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"useLayout",{enumerable:!0,get:function(){return useLayout}});const _context=require("./context"),selectAll=state=>state;function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"useLayout",{enumerable:!0,get:function(){return useLayout}});const _react=require("react"),_context=require("./context"),_registry=require("./registry"),selectAll=state=>state;function panelHandleActions({slot,visible,dispatch}){return{isVisible:visible,show:()=>dispatch({type:"setVisible",slot,visible:!0}),hide:()=>dispatch({type:"setVisible",slot,visible:!1}),resize:size=>dispatch({type:"resize",slot,size}),reset:()=>dispatch({type:"reset",slot})}}function useLayout(){let store=(0,_context.useLayoutStore)(),state=(0,_context.useLayoutSelector)(selectAll),declared=(0,_react.useContext)(_registry.PanelDeclarationsContext),{dispatch}=store;return{state,leftPanel:{state:state.leftPanel,...panelHandleActions({slot:"leftPanel",visible:state.leftPanel.visible,dispatch})},rightPanel:{state:{...state.rightPanel,variant:state.rightPanel.variant??declared.rightPanel?.variant??"sidebar"},setVariant:variant=>dispatch({type:"setVariant",panel:"rightPanel",variant}),...panelHandleActions({slot:"rightPanel",visible:state.rightPanel.visible,dispatch})},content:{state:state.content,...panelHandleActions({slot:"content",visible:state.content.visible,dispatch})},splitview:{state:state.splitview,...panelHandleActions({slot:"splitview",visible:state.splitview.visible,dispatch})}}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import type { MoveEndEvent, MoveMoveEvent, MoveStartEvent } from "@react-aria/interactions";
|
|
3
|
+
export type Position = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
export type UseDragTransformOptions<T extends HTMLElement> = {
|
|
8
|
+
/** Ref of the element to move */
|
|
9
|
+
ref: RefObject<T>;
|
|
10
|
+
/** Minimum distance to keep between the element and the viewport edges */
|
|
11
|
+
edgeOffset?: number;
|
|
12
|
+
/** Distance (px) the element moves per arrow-key press while the handle is
|
|
13
|
+
* focused. react-aria emits 1px keyboard deltas; this scales them. */
|
|
14
|
+
keyboardStep?: number;
|
|
15
|
+
/** Cursor shown on the element while a drag is in progress. Default `grabbing`. */
|
|
16
|
+
draggingCursor?: string;
|
|
17
|
+
/** Called once a drag ends, with the element's persisted translate offset */
|
|
18
|
+
onDragEnd?: (translate: Position) => void;
|
|
19
|
+
};
|
|
20
|
+
/** Pass these to a react-aria `useMove` call to drive the transform. */
|
|
21
|
+
export type DragMoveHandlers = {
|
|
22
|
+
onMoveStart: (event: MoveStartEvent) => void;
|
|
23
|
+
onMove: (event: MoveMoveEvent) => void;
|
|
24
|
+
onMoveEnd: (event: MoveEndEvent) => void;
|
|
25
|
+
};
|
|
26
|
+
export type UseDragTransformResult = DragMoveHandlers & {
|
|
27
|
+
isDragging: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Applies a clamped `translate3d` to an element from movement deltas, keeping it
|
|
31
|
+
* within `edgeOffset` px of the viewport edges. Input-agnostic: it consumes
|
|
32
|
+
* react-aria `useMove` events (pointer, touch, and keyboard), so the caller owns
|
|
33
|
+
* where `moveProps` is spread while this owns the geometry. Works with any
|
|
34
|
+
* existing positioning (fixed, absolute, floating-ui) because it only layers a
|
|
35
|
+
* translate delta on top of the element's own rendered position. The transform
|
|
36
|
+
* is written directly to the element per move
|
|
37
|
+
* to avoid a re-render per pixel; React state only tracks `isDragging`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function useDragTransform<T extends HTMLElement>({ ref, edgeOffset, keyboardStep, draggingCursor, onDragEnd, }: UseDragTransformOptions<T>): UseDragTransformResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"useDragTransform",{enumerable:!0,get:function(){return useDragTransform}});const _react=require("react"),_useWindow=require("./useWindow"),clamp=({value,min,max})=>max<min?min:Math.min(Math.max(value,min),max),computeClampedTopLeft=({proposedTopLeft,elementSize,viewportSize,edgeOffset})=>({x:clamp({value:proposedTopLeft.x,min:edgeOffset,max:viewportSize.width-elementSize.width-edgeOffset}),y:clamp({value:proposedTopLeft.y,min:edgeOffset,max:viewportSize.height-elementSize.height-edgeOffset})}),INITIAL_TRANSLATE={x:0,y:0};function useDragTransform({ref,edgeOffset=0,keyboardStep=10,draggingCursor="grabbing",onDragEnd}){let currentWindow=(0,_useWindow.useWindow)(),[isDragging,setIsDragging]=(0,_react.useState)(!1),appliedTranslateRef=(0,_react.useRef)(INITIAL_TRANSLATE),accumulatedDeltaRef=(0,_react.useRef)(INITIAL_TRANSLATE),rectAtDragStartRef=(0,_react.useRef)(null),previousElementCursorRef=(0,_react.useRef)(""),previousElementUserSelectRef=(0,_react.useRef)(""),resolveTranslate=(0,_react.useCallback)(()=>{let rectAtDragStart=rectAtDragStartRef.current;if(!rectAtDragStart||!currentWindow)return appliedTranslateRef.current;let clampedTopLeft=computeClampedTopLeft({proposedTopLeft:{x:rectAtDragStart.left+accumulatedDeltaRef.current.x,y:rectAtDragStart.top+accumulatedDeltaRef.current.y},elementSize:{width:rectAtDragStart.width,height:rectAtDragStart.height},viewportSize:{width:currentWindow.innerWidth,height:currentWindow.innerHeight},edgeOffset});return{x:appliedTranslateRef.current.x+(clampedTopLeft.x-rectAtDragStart.left),y:appliedTranslateRef.current.y+(clampedTopLeft.y-rectAtDragStart.top)}},[currentWindow,edgeOffset]),onMoveStart=(0,_react.useCallback)(()=>{let element=ref.current;element&&(rectAtDragStartRef.current=element.getBoundingClientRect(),accumulatedDeltaRef.current=INITIAL_TRANSLATE,previousElementCursorRef.current=element.style.cursor,previousElementUserSelectRef.current=element.style.userSelect,element.style.cursor=draggingCursor,element.style.userSelect="none",setIsDragging(!0))},[ref,draggingCursor]),onMove=(0,_react.useCallback)(event=>{let element=ref.current;if(!element||!rectAtDragStartRef.current)return;let factor="keyboard"===event.pointerType?keyboardStep:1;accumulatedDeltaRef.current={x:accumulatedDeltaRef.current.x+event.deltaX*factor,y:accumulatedDeltaRef.current.y+event.deltaY*factor};let{x,y}=resolveTranslate();element.style.transform=`translate3d(${x}px, ${y}px, 0)`},[ref,keyboardStep,resolveTranslate]),onMoveEnd=(0,_react.useCallback)(()=>{rectAtDragStartRef.current&&(appliedTranslateRef.current=resolveTranslate()),rectAtDragStartRef.current=null;let element=ref.current;element&&(element.style.cursor=previousElementCursorRef.current,element.style.userSelect=previousElementUserSelectRef.current),setIsDragging(!1),onDragEnd?.(appliedTranslateRef.current)},[ref,resolveTranslate,onDragEnd]);return(0,_react.useEffect)(()=>()=>{let element=ref.current;rectAtDragStartRef.current&&element&&(element.style.cursor=previousElementCursorRef.current,element.style.userSelect=previousElementUserSelectRef.current)},[ref]),(0,_react.useEffect)(()=>{if(!currentWindow)return;let reconcileFrame=0,reconcileTranslateToViewport=()=>{let element=ref.current,applied=appliedTranslateRef.current,isIdle=!rectAtDragStartRef.current,hasOffset=0!==applied.x||0!==applied.y;if(!element||!isIdle||!hasOffset)return;let rect=element.getBoundingClientRect(),clampedTopLeft=computeClampedTopLeft({proposedTopLeft:{x:rect.left,y:rect.top},elementSize:{width:rect.width,height:rect.height},viewportSize:{width:currentWindow.innerWidth,height:currentWindow.innerHeight},edgeOffset}),nextTranslate={x:applied.x+(clampedTopLeft.x-rect.left),y:applied.y+(clampedTopLeft.y-rect.top)};(nextTranslate.x!==applied.x||nextTranslate.y!==applied.y)&&(appliedTranslateRef.current=nextTranslate,element.style.transform=`translate3d(${nextTranslate.x}px, ${nextTranslate.y}px, 0)`)},handleResize=()=>{currentWindow.cancelAnimationFrame(reconcileFrame),reconcileFrame=currentWindow.requestAnimationFrame(reconcileTranslateToViewport)};return currentWindow.addEventListener("resize",handleResize),()=>{currentWindow.cancelAnimationFrame(reconcileFrame),currentWindow.removeEventListener("resize",handleResize)}},[currentWindow,edgeOffset,ref]),{isDragging,onMoveStart,onMove,onMoveEnd}}
|
|
@@ -319,6 +319,16 @@
|
|
|
319
319
|
"variableName": "$size-letter-spacing-m",
|
|
320
320
|
"isUsed": false
|
|
321
321
|
},
|
|
322
|
+
{
|
|
323
|
+
"category": "size",
|
|
324
|
+
"type": "font",
|
|
325
|
+
"name": "font xxs",
|
|
326
|
+
"subitemName": "xxs",
|
|
327
|
+
"value": "10px",
|
|
328
|
+
"original": 10,
|
|
329
|
+
"variableName": "$size-font-xxs",
|
|
330
|
+
"isUsed": false
|
|
331
|
+
},
|
|
322
332
|
{
|
|
323
333
|
"category": "size",
|
|
324
334
|
"type": "font",
|
|
@@ -2,6 +2,8 @@ export declare const LAYOUT_VARS: {
|
|
|
2
2
|
readonly contentWidth: "--ds-layout-content-width";
|
|
3
3
|
readonly rightPanelWidth: "--ds-layout-rightPanel-width";
|
|
4
4
|
readonly subnavOffset: "--ds-layout-subnav-offset";
|
|
5
|
+
readonly floatWidth: "--ds-layout-float-width";
|
|
6
|
+
readonly floatHeight: "--ds-layout-float-height";
|
|
5
7
|
};
|
|
6
8
|
export type LayoutVarKey = keyof typeof LAYOUT_VARS;
|
|
7
9
|
export type LayoutVarName = (typeof LAYOUT_VARS)[LayoutVarKey];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"LAYOUT_VARS",{enumerable:!0,get:function(){return LAYOUT_VARS}});const LAYOUT_VARS={contentWidth:"--ds-layout-content-width",rightPanelWidth:"--ds-layout-rightPanel-width",subnavOffset:"--ds-layout-subnav-offset"};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"LAYOUT_VARS",{enumerable:!0,get:function(){return LAYOUT_VARS}});const LAYOUT_VARS={contentWidth:"--ds-layout-content-width",rightPanelWidth:"--ds-layout-rightPanel-width",subnavOffset:"--ds-layout-subnav-offset",floatWidth:"--ds-layout-float-width",floatHeight:"--ds-layout-float-height"};
|
|
@@ -5,6 +5,8 @@ export const LAYOUT_VARS = {
|
|
|
5
5
|
contentWidth: "--ds-layout-content-width",
|
|
6
6
|
rightPanelWidth: "--ds-layout-rightPanel-width",
|
|
7
7
|
subnavOffset: "--ds-layout-subnav-offset",
|
|
8
|
+
floatWidth: "--ds-layout-float-width",
|
|
9
|
+
floatHeight: "--ds-layout-float-height",
|
|
8
10
|
} as const;
|
|
9
11
|
|
|
10
12
|
export type LayoutVarKey = keyof typeof LAYOUT_VARS;
|
|
@@ -81,6 +81,7 @@ type Variables = {
|
|
|
81
81
|
"m": string;
|
|
82
82
|
};
|
|
83
83
|
"font": {
|
|
84
|
+
"xxs": string;
|
|
84
85
|
"xs": string;
|
|
85
86
|
"s": string;
|
|
86
87
|
"m": string;
|
|
@@ -213,6 +214,14 @@ type Variables = {
|
|
|
213
214
|
"default": string;
|
|
214
215
|
};
|
|
215
216
|
};
|
|
217
|
+
"float": {
|
|
218
|
+
"width": {
|
|
219
|
+
"default": string;
|
|
220
|
+
};
|
|
221
|
+
"height": {
|
|
222
|
+
"default": string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
216
225
|
};
|
|
217
226
|
"opacity": {
|
|
218
227
|
"hidden": number;
|