@amboss/design-system 4.9.4-canary.2 → 4.9.4
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/Internal/Panel/Panel.d.ts +3 -5
- package/build/cjs/components/Internal/Panel/Panel.js +1 -1
- package/build/cjs/components/Internal/PanelHeader/PanelHeader.d.ts +1 -1
- package/build/cjs/components/Internal/PanelHeader/PanelHeader.js +1 -1
- package/build/cjs/components/Layout/-constants.d.ts +0 -10
- package/build/cjs/components/Layout/-constants.js +1 -1
- package/build/cjs/components/Layout/-types.d.ts +11 -26
- package/build/cjs/components/Layout/Layout.d.ts +0 -4
- package/build/cjs/components/Layout/Layout.js +1 -1
- package/build/cjs/components/Layout/LayoutProvider.js +1 -1
- package/build/cjs/components/Layout/LeftPanel/LeftPanelDrawer.d.ts +4 -3
- package/build/cjs/components/Layout/LeftPanel/LeftPanelDrawer.js +1 -1
- package/build/cjs/components/Layout/PanelContainer.d.ts +1 -1
- package/build/cjs/components/Layout/PanelContainer.js +1 -1
- package/build/cjs/components/Layout/RightPanel/RightPanel.js +1 -1
- package/build/cjs/components/Layout/Split/MobileSplitView/MobileSplitView.js +1 -1
- package/build/cjs/components/Layout/Split/Split.js +1 -1
- package/build/cjs/components/Layout/Split/SplitDocked.js +1 -1
- package/build/cjs/components/Layout/index.d.ts +0 -1
- package/build/cjs/components/Layout/registry.d.ts +4 -8
- package/build/cjs/components/Layout/useLayout.js +1 -1
- package/build/cjs/components/Layout/usePanelDockedSlide.js +1 -1
- package/build/cjs/components/VirtualScrollList/VirtualScrollList.js +1 -1
- package/build/cjs/components/VirtualScrollList/VirtualScrollListReducer.d.ts +8 -1
- package/build/cjs/components/VirtualScrollList/VirtualScrollListReducer.js +1 -1
- package/build/cjs/shared/FocusTrapWrapper.d.ts +1 -1
- package/build/cjs/shared/FocusTrapWrapper.js +1 -1
- package/build/cjs/web-tokens/_sizes.json +55 -55
- package/build/cjs/web-tokens/layout-vars.d.ts +0 -7
- package/build/cjs/web-tokens/layout-vars.js +1 -1
- package/build/cjs/web-tokens/layout-vars.ts +0 -7
- package/build/cjs/web-tokens/visualConfig.d.ts +0 -25
- package/build/cjs/web-tokens/visualConfig.js +1 -1
- package/build/esm/components/Internal/Panel/Panel.d.ts +3 -5
- package/build/esm/components/Internal/Panel/Panel.js +1 -1
- package/build/esm/components/Internal/PanelHeader/PanelHeader.d.ts +1 -1
- package/build/esm/components/Internal/PanelHeader/PanelHeader.js +1 -1
- package/build/esm/components/Layout/-constants.d.ts +0 -10
- package/build/esm/components/Layout/-constants.js +1 -1
- package/build/esm/components/Layout/-types.d.ts +11 -26
- package/build/esm/components/Layout/Layout.d.ts +0 -4
- package/build/esm/components/Layout/Layout.js +1 -1
- package/build/esm/components/Layout/LayoutProvider.js +1 -1
- package/build/esm/components/Layout/LeftPanel/LeftPanelDrawer.d.ts +4 -3
- package/build/esm/components/Layout/LeftPanel/LeftPanelDrawer.js +1 -1
- package/build/esm/components/Layout/PanelContainer.d.ts +1 -1
- package/build/esm/components/Layout/PanelContainer.js +1 -1
- package/build/esm/components/Layout/RightPanel/RightPanel.js +1 -1
- package/build/esm/components/Layout/Split/MobileSplitView/MobileSplitView.js +1 -1
- package/build/esm/components/Layout/Split/Split.js +1 -1
- package/build/esm/components/Layout/Split/SplitDocked.js +1 -1
- package/build/esm/components/Layout/index.d.ts +0 -1
- package/build/esm/components/Layout/registry.d.ts +4 -8
- package/build/esm/components/Layout/useLayout.js +1 -1
- package/build/esm/components/Layout/usePanelDockedSlide.js +1 -1
- package/build/esm/components/VirtualScrollList/VirtualScrollList.js +1 -1
- package/build/esm/components/VirtualScrollList/VirtualScrollListReducer.d.ts +8 -1
- package/build/esm/components/VirtualScrollList/VirtualScrollListReducer.js +1 -1
- package/build/esm/shared/FocusTrapWrapper.d.ts +1 -1
- package/build/esm/shared/FocusTrapWrapper.js +1 -1
- package/build/esm/web-tokens/_sizes.json +55 -55
- package/build/esm/web-tokens/layout-vars.d.ts +0 -7
- package/build/esm/web-tokens/layout-vars.js +1 -1
- package/build/esm/web-tokens/layout-vars.ts +0 -7
- package/build/esm/web-tokens/visualConfig.d.ts +0 -25
- package/build/esm/web-tokens/visualConfig.js +1 -1
- package/build/scss/_layout.scss +0 -14
- package/package.json +1 -1
- package/build/cjs/components/Layout/BottomBar/LayoutBottomBar.d.ts +0 -9
- package/build/cjs/components/Layout/BottomBar/LayoutBottomBar.js +0 -1
- package/build/cjs/components/Layout/BottomBar/LayoutBottomBarItem.d.ts +0 -14
- package/build/cjs/components/Layout/BottomBar/LayoutBottomBarItem.js +0 -1
- package/build/cjs/components/Layout/BottomBar/StyledLayoutBottomBar.d.ts +0 -11
- package/build/cjs/components/Layout/BottomBar/StyledLayoutBottomBar.js +0 -1
- package/build/cjs/components/Layout/BottomBar/StyledLayoutBottomBarSection.d.ts +0 -10
- package/build/cjs/components/Layout/BottomBar/StyledLayoutBottomBarSection.js +0 -1
- package/build/cjs/components/Layout/BottomBar/getBottomBarLayout.d.ts +0 -39
- package/build/cjs/components/Layout/BottomBar/getBottomBarLayout.js +0 -1
- package/build/cjs/components/Layout/BottomBar/getBottomBarOuterSpaceStyles.d.ts +0 -14
- package/build/cjs/components/Layout/BottomBar/getBottomBarOuterSpaceStyles.js +0 -1
- package/build/cjs/components/Layout/LayoutPortal.d.ts +0 -7
- package/build/cjs/components/Layout/LayoutPortal.js +0 -1
- package/build/cjs/components/Layout/usePanelAnimations.d.ts +0 -12
- package/build/cjs/components/Layout/usePanelAnimations.js +0 -1
- package/build/esm/components/Layout/BottomBar/LayoutBottomBar.d.ts +0 -9
- package/build/esm/components/Layout/BottomBar/LayoutBottomBar.js +0 -1
- package/build/esm/components/Layout/BottomBar/LayoutBottomBarItem.d.ts +0 -14
- package/build/esm/components/Layout/BottomBar/LayoutBottomBarItem.js +0 -1
- package/build/esm/components/Layout/BottomBar/StyledLayoutBottomBar.d.ts +0 -11
- package/build/esm/components/Layout/BottomBar/StyledLayoutBottomBar.js +0 -1
- package/build/esm/components/Layout/BottomBar/StyledLayoutBottomBarSection.d.ts +0 -10
- package/build/esm/components/Layout/BottomBar/StyledLayoutBottomBarSection.js +0 -1
- package/build/esm/components/Layout/BottomBar/getBottomBarLayout.d.ts +0 -39
- package/build/esm/components/Layout/BottomBar/getBottomBarLayout.js +0 -1
- package/build/esm/components/Layout/BottomBar/getBottomBarOuterSpaceStyles.d.ts +0 -14
- package/build/esm/components/Layout/BottomBar/getBottomBarOuterSpaceStyles.js +0 -1
- package/build/esm/components/Layout/LayoutPortal.d.ts +0 -7
- package/build/esm/components/Layout/LayoutPortal.js +0 -1
- package/build/esm/components/Layout/usePanelAnimations.d.ts +0 -12
- package/build/esm/components/Layout/usePanelAnimations.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from"react";import{Slot}from"../-constants";import{useDeclarePanel,useLayoutPortal}from"../registry";import{useLayout}from"../useLayout";import{PanelContainer}from"../PanelContainer";export const SplitDocked=({children,
|
|
1
|
+
import React from"react";import{Slot}from"../-constants";import{useDeclarePanel,useLayoutPortal}from"../registry";import{useLayout}from"../useLayout";import{PanelContainer}from"../PanelContainer";export const SplitDocked=({children,"aria-label":ariaLabel,scrollContainerRef,onScroll,"data-e2e-test-id":dataE2eTestId})=>{let{isVisible}=useLayout()[Slot.splitview];return useDeclarePanel(Slot.splitview,{}),useLayoutPortal(Slot.splitview,isVisible?React.createElement(PanelContainer,{"aria-label":ariaLabel,scrollContainerRef:scrollContainerRef,onScroll:onScroll,"data-e2e-test-id":dataE2eTestId},children):null)};
|
|
@@ -7,4 +7,3 @@ export { useAutoScrollToBottom } from "./useAutoScrollToBottom";
|
|
|
7
7
|
export { createLayoutStore } from "./store";
|
|
8
8
|
export { createInitialState, layoutReducer } from "./reducer";
|
|
9
9
|
export * from "./-types";
|
|
10
|
-
export type { LayoutBottomBarProps } from "./BottomBar/LayoutBottomBar";
|
|
@@ -2,16 +2,13 @@ import { type ReactNode } from "react";
|
|
|
2
2
|
import type { PanelImperativeHandle } from "react-resizable-panels";
|
|
3
3
|
import type { RightPanelVariant, Size, SlotKey } from "./-types";
|
|
4
4
|
export type PortalTargets = Partial<Record<SlotKey, HTMLElement | null>>;
|
|
5
|
-
|
|
6
|
-
root?: HTMLElement | null;
|
|
7
|
-
};
|
|
8
|
-
export declare const LayoutPortalContext: React.Context<LayoutPortalTargets>;
|
|
5
|
+
export declare const LayoutPortalContext: React.Context<Partial<Record<"content" | "leftPanel" | "rightPanel" | "splitview", HTMLElement | null>>>;
|
|
9
6
|
/**
|
|
10
7
|
* Portal `children` into the host DOM node registered for `slot`. Returns the
|
|
11
8
|
* portal (or `null` if the host isn't mounted yet). Call unconditionally -
|
|
12
9
|
* gate content by passing `null` as `children`, not by skipping the call.
|
|
13
10
|
*/
|
|
14
|
-
export declare function useLayoutPortal(slot: SlotKey
|
|
11
|
+
export declare function useLayoutPortal(slot: SlotKey, children: ReactNode): ReactNode;
|
|
15
12
|
/**
|
|
16
13
|
* Panel descriptor a marker contributes. The Group renders one resizable Panel
|
|
17
14
|
* per *declared* panel that is currently shown - regardless of nesting depth.
|
|
@@ -23,8 +20,8 @@ export type PanelReg = {
|
|
|
23
20
|
minSize?: Size;
|
|
24
21
|
maxSize?: Size;
|
|
25
22
|
collapsible?: boolean;
|
|
26
|
-
/** When `false`,
|
|
27
|
-
*
|
|
23
|
+
/** When `false`, the panel is fixed at `defaultSize` and can't be drag-resized
|
|
24
|
+
* (directly or via a neighbour). Defaults to resizable. */
|
|
28
25
|
resizable?: boolean;
|
|
29
26
|
/** Lock this column's width when the window resizes, leaving the change to
|
|
30
27
|
* the columns without it. Declared by the docked side panels, which are
|
|
@@ -92,4 +89,3 @@ export declare function usePanelAnimationControl(): PanelAnimationControl | null
|
|
|
92
89
|
export declare function useRunCallbackOnValueChange<T>(value: T, onChange?: (value: T) => void): void;
|
|
93
90
|
/** Fire `onChange(visible)` when `visible` transitions (not on initial mount). */
|
|
94
91
|
export declare function useVisibleChange(visible: boolean, onChange?: (visible: boolean) => void): void;
|
|
95
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext}from"react";import{useLayoutSelector,useLayoutStore}from"./context";import{
|
|
1
|
+
import{useContext}from"react";import{useLayoutSelector,useLayoutStore}from"./context";import{PanelDeclarationsContext}from"./registry";import{DEFAULT_LEFT_PANEL_VARIANT}from"./-constants";let 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}),reset:()=>dispatch({type:"reset",slot})}}export function useLayout(){let store=useLayoutStore(),state=useLayoutSelector(selectAll),declared=useContext(PanelDeclarationsContext),{dispatch}=store;return{state,leftPanel:{state:{...state.leftPanel,variant:state.leftPanel.variant??DEFAULT_LEFT_PANEL_VARIANT},setVariant:variant=>dispatch({type:"setVariant",panel:"leftPanel",variant}),...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})}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useLayoutEffect,
|
|
1
|
+
import{useLayoutEffect,useRef,useState}from"react";import{useTheme}from"@emotion/react";import{useWindow}from"../../shared/useWindow";import{parseDurationMs}from"../../shared/parseDurationMs";import{prefersReducedMotion}from"../../shared/prefersReducedMotion";import{useDeclarePanel,usePanelAnimationControl,usePanelPresence,usePanelRow}from"./registry";import{useLayout}from"./useLayout";let resolveSizePx=(size,groupWidthPx)=>{if("number"==typeof size)return size;if("string"!=typeof size)return null;let parsed=parseFloat(size);return Number.isFinite(parsed)?size.trim().endsWith("px")?parsed:null!=groupWidthPx?parsed/100*groupWidthPx:null:null},groupColumnsOf=element=>{let columns=element.closest("[data-group]")?.querySelectorAll("[data-panel]");return columns?Array.from(columns):[element]},isHandleReady=handle=>{try{return handle.isCollapsed(),!0}catch{return!1}},mountDefaultSizeFor=({collapsedSize,defaultSize,isVisible,isSlidingIn})=>void 0!==collapsedSize?isVisible?defaultSize:collapsedSize:isSlidingIn?0:defaultSize,minSizeFor=({collapsedSize,isVisible,minSize})=>void 0===collapsedSize?minSize:isVisible?minSize??collapsedSize:collapsedSize;export const getMaxSize=({collapsedSize,isVisible,maxSize,openSize,phase})=>void 0===collapsedSize?maxSize:isVisible||"idle"!==phase?maxSize??openSize:collapsedSize;export function usePanelDockedSlide({slot,defaultSize,minSize,maxSize,collapsible,resizable,lockWidthOnWindowResize,collapsedSize}){let{isVisible,state}=useLayout()[slot],theme=useTheme(),window=useWindow(),animation=usePanelAnimationControl(),rowKey=usePanelRow(),reducedMotion=prefersReducedMotion(window),hasCollapsedRest=void 0!==collapsedSize,isCollapsible=collapsible&&!hasCollapsedRest,[isMounted,setIsMounted]=useState(isVisible),[phase,setPhase]=useState("idle"),[fixedWidth,setFixedWidth]=useState(null),[prevVisible,setPrevVisible]=useState(isVisible);isVisible!==prevVisible&&(setPrevVisible(isVisible),setPhase(isVisible?"entering":"exiting"),isVisible&&setIsMounted(!0),animation?.setResizeSuppressed(slot,!0));let openSize=hasCollapsedRest?state.size??defaultSize:defaultSize;useDeclarePanel(slot,{defaultSize:mountDefaultSizeFor({collapsedSize,defaultSize:openSize,isVisible,isSlidingIn:"entering"===phase&&collapsible&&!reducedMotion}),minSize:minSizeFor({collapsedSize,isVisible,minSize}),maxSize:getMaxSize({collapsedSize,isVisible,maxSize,openSize,phase}),collapsible:isCollapsible,resizable,lockWidthOnWindowResize}),usePanelPresence(slot,hasCollapsedRest||isMounted);let latestRest=useRef({isVisible,openSize,phase});return latestRest.current={isVisible,openSize,phase},useLayoutEffect(()=>{if(!hasCollapsedRest)return;let frame=0,cancelled=!1,resizeToRest=attempt=>{if(cancelled)return;let handle=animation?.getHandle(slot)??null;if(handle&&isHandleReady(handle)){let rest=latestRest.current;if("idle"!==rest.phase)return;let restSize=rest.isVisible?rest.openSize??minSize:collapsedSize;try{void 0!==restSize&&handle.resize(restSize)}catch{}return}animation&&!(attempt>=30)&&(frame=window.requestAnimationFrame(()=>resizeToRest(attempt+1)))};return Promise.resolve().then(()=>resizeToRest(0)),()=>{cancelled=!0,window.cancelAnimationFrame(frame)}},[rowKey]),useLayoutEffect(()=>{if("idle"===phase)return;let cancelled=!1,frame=0,settleTimer=0,animatedColumns=[];animation?.setResizeSuppressed(slot,!0);let{duration,timingFunction}=hasCollapsedRest?theme.variables.animation.navSlide.collapse:theme.variables.animation.navSlide.open,durationMs=parseDurationMs(duration),setColumnTransitions=enabled=>{animatedColumns.forEach(column=>{enabled?column.style.setProperty("transition",`flex-grow ${duration} ${timingFunction}`):column.style.removeProperty("transition")})},targetSize=state.size??defaultSize??minSize,openColumn=(handle,targetPx)=>{handle.isCollapsed()&&handle.expand(),handle.resize(targetPx??targetSize??minSize??"20%")},settle=handle=>{if(setColumnTransitions(!1),animation?.setResizeSuppressed(slot,!1),"entering"===phase&&handle&&!hasCollapsedRest)try{handle.getSize().inPixels<1&&openColumn(handle,null)}catch{}setFixedWidth(null),"exiting"!==phase||hasCollapsedRest||setIsMounted(!1),setPhase("idle")},runSlide=(handle,element)=>{animatedColumns=groupColumnsOf(element);let groupWidthPx=element.closest("[data-group]")?.getBoundingClientRect().width??null,targetPx=resolveSizePx(targetSize,groupWidthPx),collapsedPx=resolveSizePx(collapsedSize,groupWidthPx);setFixedWidth("entering"===phase?targetPx:handle.getSize().inPixels),reducedMotion||setColumnTransitions(!0),element.getBoundingClientRect();try{"entering"===phase?openColumn(handle,targetPx):hasCollapsedRest?handle.resize(collapsedPx??collapsedSize):handle.collapse()}catch{settle(handle);return}settleTimer=window.setTimeout(()=>settle(handle),reducedMotion?0:durationMs+80)},waitForColumn=attempt=>{if(cancelled)return;if(0===attempt&&hasCollapsedRest){frame=window.requestAnimationFrame(()=>waitForColumn(attempt+1));return}let handle=animation?.getHandle(slot)??null,element=animation?.getElement(slot)??null;return handle&&element&&isHandleReady(handle)?void runSlide(handle,element):"exiting"===phase||!animation||attempt>=30?void settle(handle):void(frame=window.requestAnimationFrame(()=>waitForColumn(attempt+1)))};return collapsible||hasCollapsedRest?waitForColumn(0):settle(animation?.getHandle(slot)??null),()=>{cancelled=!0,window.cancelAnimationFrame(frame),window.clearTimeout(settleTimer),setColumnTransitions(!1),animation?.setResizeSuppressed(slot,!1)}},[phase,slot,collapsible,hasCollapsedRest,reducedMotion,animation,window,theme]),{isMounted:hasCollapsedRest||isMounted,fixedWidth}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import styled from"@emotion/styled";import React,{useRef,useReducer,useLayoutEffect,useEffect}from"react";import{VirtualScrollReducer}from"./VirtualScrollListReducer";let StyledContainer=styled("div",{target:"
|
|
1
|
+
import styled from"@emotion/styled";import React,{useRef,useReducer,useLayoutEffect,useEffect}from"react";import{VirtualScrollReducer}from"./VirtualScrollListReducer";let StyledContainer=styled("div",{target:"eawkr7u0",label:"StyledContainer"})(({maxHeight})=>({overflow:"auto",width:"100%",height:"100%",maxHeight})),StyledScrollableContent=styled("div",{target:"eawkr7u1",label:"StyledScrollableContent"})(({maxContentHeight})=>({overflow:"hidden",boxSizing:"border-box",height:maxContentHeight})),measureViewport=node=>({height:node.getBoundingClientRect().height,items:Array.from(node.children,child=>({offsetTop:child.offsetTop,height:child.getBoundingClientRect().height}))});export function VirtualScrollList({id,maxHeight,itemHeight,itemAmount,emptyState=()=>null,itemInView,itemTemplate,containerStyle,"data-e2e-test-id":dataE2eTestId,onContentHeightChange,role,...ariaAttributes}){let scrollableContainerRef=useRef(null),viewportRef=useRef(null),adjustedForReflow=useRef(!1),[{scrolledItemCount=0,amountOfItemsInView=0,scrolledInPx,maxContentHeight=maxHeight,recommendedScrollPosition},dispatch]=useReducer(VirtualScrollReducer,{});useLayoutEffect(()=>{dispatch({type:"reset",itemHeight,maxHeight,overscan:10});let scrollableContainer=scrollableContainerRef.current;scrollableContainer&&(scrollableContainer.scrollTop=0)},[itemHeight,itemAmount,maxHeight]),useEffect(()=>{let scrollableContainer=scrollableContainerRef.current;scrollableContainer&&dispatch({type:"recommendScrollPosition",scrollTop:scrollableContainer.scrollTop,itemToBeInView:itemInView})},[itemInView]),useEffect(()=>{if(null==recommendedScrollPosition)return;let scrollableContainer=scrollableContainerRef.current;scrollableContainer&&(scrollableContainer.scrollTop=recommendedScrollPosition)},[recommendedScrollPosition]),useLayoutEffect(()=>{viewportRef.current&&dispatch({type:"updateViewport",measurements:measureViewport(viewportRef.current),itemAmount})},[itemAmount,scrolledItemCount,amountOfItemsInView]),useEffect(()=>{onContentHeightChange?.()},[maxContentHeight,onContentHeightChange]);let itemCountToBeRendered=Math.min(Math.max(0,itemAmount-scrolledItemCount),amountOfItemsInView);return maxContentHeight>maxHeight&&!adjustedForReflow.current&&viewportRef.current&&(setTimeout(()=>{let viewportNode=viewportRef.current;viewportNode&&dispatch({type:"updateViewport",measurements:measureViewport(viewportNode),itemAmount})}),adjustedForReflow.current=!0),React.createElement(StyledContainer,{ref:scrollableContainerRef,maxHeight:maxHeight,style:{maxHeight,...containerStyle},"data-e2e-test-id":dataE2eTestId,"data-ds-id":"VirtualScrollList",onScroll:e=>{dispatch({type:"scroll",scrollTop:e.currentTarget.scrollTop})}},0===itemAmount?emptyState():React.createElement(StyledScrollableContent,{maxContentHeight:maxContentHeight},React.createElement("div",{ref:viewportRef,style:{transform:`translateY(${scrolledInPx}px`},role:role,id:id,...ariaAttributes},!!itemCountToBeRendered&&Array(itemCountToBeRendered).fill(0).map((_,index)=>itemTemplate(scrolledItemCount+index)))))}
|
|
@@ -2,6 +2,13 @@ type Offset = {
|
|
|
2
2
|
amount: number;
|
|
3
3
|
isInterpolated: boolean;
|
|
4
4
|
};
|
|
5
|
+
export type ViewportMeasurements = {
|
|
6
|
+
readonly height: number;
|
|
7
|
+
readonly items: readonly {
|
|
8
|
+
readonly offsetTop: number;
|
|
9
|
+
readonly height: number;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
5
12
|
type State = {
|
|
6
13
|
avgItemHeight?: number;
|
|
7
14
|
overscan?: number;
|
|
@@ -20,7 +27,7 @@ type Action = {
|
|
|
20
27
|
scrollTop: number;
|
|
21
28
|
} | {
|
|
22
29
|
type: "updateViewport";
|
|
23
|
-
|
|
30
|
+
measurements: ViewportMeasurements;
|
|
24
31
|
itemAmount: number;
|
|
25
32
|
} | {
|
|
26
33
|
type: "reset";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let findClosestOffsetIndex=(arr,val)=>{let start=0,end=arr.length-1,mid=Math.floor((start+end)/2);for(;start<=end&&arr[mid=Math.floor((start+end)/2)].amount!==val;)val<arr[mid].amount?end=mid-1:start=mid+1;return mid},getMaxHeight=(maxAmountOfItems,offsets,lastItemHeight)=>{let amountOfOffsets=Math.min(offsets.length,maxAmountOfItems);return(offsets[amountOfOffsets-1]?.amount||0)+(lastItemHeight??0)},reduceScroll=(prevState,scrollTop)=>{let{topOffsets=[],overscan:tolerance=0}=prevState,scrolledItemCount=Math.max(0,findClosestOffsetIndex(topOffsets,scrollTop)-tolerance/2),scrolledInPx=topOffsets[scrolledItemCount]?.amount||0;return{...prevState,scrolledItemCount,scrolledInPx}},reduceUpdateViewport=(prevState,
|
|
1
|
+
let findClosestOffsetIndex=(arr,val)=>{let start=0,end=arr.length-1,mid=Math.floor((start+end)/2);for(;start<=end&&arr[mid=Math.floor((start+end)/2)].amount!==val;)val<arr[mid].amount?end=mid-1:start=mid+1;return mid},getMaxHeight=(maxAmountOfItems,offsets,lastItemHeight)=>{let amountOfOffsets=Math.min(offsets.length,maxAmountOfItems);return(offsets[amountOfOffsets-1]?.amount||0)+(lastItemHeight??0)},reduceScroll=(prevState,scrollTop)=>{let{topOffsets=[],overscan:tolerance=0}=prevState,scrolledItemCount=Math.max(0,findClosestOffsetIndex(topOffsets,scrollTop)-tolerance/2),scrolledInPx=topOffsets[scrolledItemCount]?.amount||0;return{...prevState,scrolledItemCount,scrolledInPx}},reduceUpdateViewport=({prevState,measurements,itemAmount})=>{let{topOffsets=[],scrolledInPx=0,scrolledItemCount=0,avgItemHeight=0,lastItemHeight,maxHeight=0,overscan:tolerance=0}=prevState,newTopOffsets=[...topOffsets],updatedLastItemHeight=lastItemHeight;measurements.items.forEach((child,i)=>{newTopOffsets[i+scrolledItemCount]={amount:scrolledInPx+child.offsetTop,isInterpolated:!1},i+scrolledItemCount!==itemAmount-1||lastItemHeight||(updatedLastItemHeight=child.height)});let newAvgItemHeight=Math.max(avgItemHeight,measurements.height/(measurements.items.length||1));for(let i=0;i<itemAmount;i+=1)(!newTopOffsets[i]||newTopOffsets[i].isInterpolated)&&(newTopOffsets[i]={amount:newTopOffsets[i-1].amount+newAvgItemHeight,isInterpolated:!0});let maxContentHeight=getMaxHeight(itemAmount,newTopOffsets,updatedLastItemHeight);return{...prevState,lastItemHeight:updatedLastItemHeight,avgItemHeight:newAvgItemHeight,topOffsets:newTopOffsets,amountOfItemsInView:Math.round(maxHeight/newAvgItemHeight)+tolerance,maxContentHeight}},reduceReset=(prevState,itemHeight,maxHeight,overscan)=>({...prevState,lastItemHeight:null,topOffsets:[{amount:0,isInterpolated:!1}],scrolledInPx:0,scrolledItemCount:0,maxHeight,avgItemHeight:itemHeight,overscan}),reduceRecommendScrollPosition=(prevState,scrollTop,itemToBeInView)=>{let{topOffsets,maxHeight}=prevState;if(!topOffsets||void 0===maxHeight)return prevState;let bottomOfTarget=topOffsets[itemToBeInView+1]?.amount,topOfTarget=topOffsets[itemToBeInView]?.amount,recommendedScrollPosition=null;return topOfTarget<scrollTop&&(recommendedScrollPosition=topOfTarget),bottomOfTarget>=scrollTop+maxHeight&&(recommendedScrollPosition=bottomOfTarget-maxHeight),itemToBeInView===topOffsets.length-1&&(recommendedScrollPosition=topOffsets[itemToBeInView].amount),{...prevState,recommendedScrollPosition}};export const VirtualScrollReducer=(prevState,action)=>{switch(action.type){case"reset":return reduceReset(prevState,action.itemHeight,action.maxHeight,action.overscan);case"scroll":return reduceScroll(prevState,action.scrollTop);case"updateViewport":return reduceUpdateViewport({prevState,measurements:action.measurements,itemAmount:action.itemAmount});case"recommendScrollPosition":return reduceRecommendScrollPosition(prevState,action.scrollTop,action.itemToBeInView);default:throw Error()}};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
/**
|
|
3
|
-
|
|
3
|
+
Wraps focus-trap-react. It fires onPostDeactivate only on an outside click or Escape, not on unmount, and it pauses the trap while an aria-modal="true" dialog outside every wrapped trap holds focus or takes a pointer press.
|
|
4
4
|
*/
|
|
5
5
|
type FocusTrapWrapperProps = {
|
|
6
6
|
active?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React,{useContext,useEffect,useRef}from"react";import FocusTrap from"focus-trap-react";import{FloatingPositionedContext}from"../components/Tooltip/FloatingPositionedContext";export const FocusTrapWrapper=({active,focusTrapOptions,children})=>{let isClickedOutside=useRef(!1),isEscaped=useRef(!1),isPositioned=useContext(FloatingPositionedContext),{onPostDeactivate,clickOutsideDeactivates,escapeDeactivates,...rest}=focusTrapOptions,onPostDeactivateRef=useRef(onPostDeactivate),clickOutsideDeactivatesRef=useRef(clickOutsideDeactivates),escapeDeactivatesRef=useRef(escapeDeactivates);
|
|
1
|
+
import React,{Children,cloneElement,useCallback,useContext,useEffect,useLayoutEffect,useRef,useState}from"react";import{flushSync}from"react-dom";import FocusTrap from"focus-trap-react";import{FloatingPositionedContext}from"../components/Tooltip/FloatingPositionedContext";import{useWindow}from"./useWindow";let isReact19OrLater=parseInt(React.version,10)>=19,getElementRef=element=>isReact19OrLater?element.props.ref:element.ref,focusTrapContainers=new Set,isInsideFocusTrap=element=>Array.from(focusTrapContainers).some(container=>container.contains(element)),findForeignModalDialog=(target,container)=>{if(!container||!(target instanceof Element))return null;let dialog=target.closest('[aria-modal="true"]');return!dialog||dialog.contains(container)||isInsideFocusTrap(dialog)?null:dialog},isDisplayed=dialog=>!!dialog?.isConnected&&("function"!=typeof dialog?.checkVisibility||dialog.checkVisibility());export const FocusTrapWrapper=({active,focusTrapOptions,children})=>{let isClickedOutside=useRef(!1),isEscaped=useRef(!1),isPositioned=useContext(FloatingPositionedContext),containerRef=useRef(null),foreignModalDialog=useRef(null),[isYieldingToForeignModal,setIsYieldingToForeignModal]=useState(!1),isPauseRendered=useRef(!1),win=useWindow();useLayoutEffect(()=>{isPauseRendered.current=isYieldingToForeignModal},[isYieldingToForeignModal]);let{onPostDeactivate,clickOutsideDeactivates,escapeDeactivates,...rest}=focusTrapOptions,onPostDeactivateRef=useRef(onPostDeactivate),clickOutsideDeactivatesRef=useRef(clickOutsideDeactivates),escapeDeactivatesRef=useRef(escapeDeactivates);useEffect(()=>{onPostDeactivateRef.current=onPostDeactivate},[onPostDeactivate]),useEffect(()=>{clickOutsideDeactivatesRef.current=clickOutsideDeactivates},[clickOutsideDeactivates]),useEffect(()=>{escapeDeactivatesRef.current=escapeDeactivates},[escapeDeactivates]);let isTrapActive=!1!==active&&isPositioned;useEffect(()=>{if(!isTrapActive){foreignModalDialog.current=null,setIsYieldingToForeignModal(!1);return}let yieldToForeignModal=dialog=>{foreignModalDialog.current=dialog,flushSync(()=>setIsYieldingToForeignModal(!0))},handleFocusIn=evt=>{let container=containerRef.current,dialog=findForeignModalDialog(evt.target,container);if(dialog){yieldToForeignModal(dialog),isPauseRendered.current||evt.stopPropagation();return}foreignModalDialog.current&&(evt.target instanceof Node&&container?.contains(evt.target)||!isDisplayed(foreignModalDialog.current))&&(foreignModalDialog.current=null,setIsYieldingToForeignModal(!1))},handlePointerDown=evt=>{let dialog=findForeignModalDialog(evt.target,containerRef.current);dialog&&yieldToForeignModal(dialog)};return win.addEventListener("focusin",handleFocusIn,!0),win.addEventListener("pointerdown",handlePointerDown,!0),()=>{win.removeEventListener("focusin",handleFocusIn,!0),win.removeEventListener("pointerdown",handlePointerDown,!0)}},[isTrapActive,win]);let child=Children.only(children),childRef=getElementRef(child),setContainer=useCallback(element=>{containerRef.current&&focusTrapContainers.delete(containerRef.current),element&&focusTrapContainers.add(element),containerRef.current=element,"function"==typeof childRef?childRef(element):childRef&&(childRef.current=element)},[childRef]);return React.createElement(FocusTrap,{active:isTrapActive,paused:isYieldingToForeignModal,focusTrapOptions:{...rest,clickOutsideDeactivates:evt=>{let cb=clickOutsideDeactivatesRef.current,shouldDeactivate="function"==typeof cb?cb(evt):cb;return!1!==shouldDeactivate&&(isClickedOutside.current=!0),shouldDeactivate},escapeDeactivates:evt=>{let cb=escapeDeactivatesRef.current,shouldDeactivate="function"==typeof cb?cb(evt):cb;return!1!==shouldDeactivate&&(isEscaped.current=!0),shouldDeactivate},onPostDeactivate:()=>{(isClickedOutside.current||isEscaped.current)&&onPostDeactivateRef.current?.(),isEscaped.current=!1,isClickedOutside.current=!1}}},cloneElement(child,{ref:setContainer}))};
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"value": "1024px",
|
|
38
38
|
"original": 1024,
|
|
39
39
|
"variableName": "$size-dimension-content-max-width",
|
|
40
|
-
"isUsed":
|
|
40
|
+
"isUsed": false
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"category": "size",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"value": "16px",
|
|
48
48
|
"original": 16,
|
|
49
49
|
"variableName": "$size-dimension-divider-m",
|
|
50
|
-
"isUsed":
|
|
50
|
+
"isUsed": false
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"category": "size",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"value": "24px",
|
|
58
58
|
"original": 24,
|
|
59
59
|
"variableName": "$size-dimension-divider-l",
|
|
60
|
-
"isUsed":
|
|
60
|
+
"isUsed": false
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"category": "size",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"value": "32px",
|
|
68
68
|
"original": 32,
|
|
69
69
|
"variableName": "$size-dimension-divider-xl",
|
|
70
|
-
"isUsed":
|
|
70
|
+
"isUsed": false
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"category": "size",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"value": "16px",
|
|
78
78
|
"original": 16,
|
|
79
79
|
"variableName": "$size-dimension-checkbox-s",
|
|
80
|
-
"isUsed":
|
|
80
|
+
"isUsed": false
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"category": "size",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"value": "24px",
|
|
88
88
|
"original": 24,
|
|
89
89
|
"variableName": "$size-dimension-checkbox-m",
|
|
90
|
-
"isUsed":
|
|
90
|
+
"isUsed": false
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"category": "size",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"value": "16px",
|
|
98
98
|
"original": 16,
|
|
99
99
|
"variableName": "$size-dimension-kbd-min-width",
|
|
100
|
-
"isUsed":
|
|
100
|
+
"isUsed": false
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"category": "size",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"value": "16px",
|
|
108
108
|
"original": 16,
|
|
109
109
|
"variableName": "$size-dimension-radio-s",
|
|
110
|
-
"isUsed":
|
|
110
|
+
"isUsed": false
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
"category": "size",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"value": "24px",
|
|
118
118
|
"original": 24,
|
|
119
119
|
"variableName": "$size-dimension-radio-m",
|
|
120
|
-
"isUsed":
|
|
120
|
+
"isUsed": false
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
"category": "size",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"value": "6px",
|
|
128
128
|
"original": 6,
|
|
129
129
|
"variableName": "$size-dimension-radio-point-s",
|
|
130
|
-
"isUsed":
|
|
130
|
+
"isUsed": false
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"category": "size",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"value": "10px",
|
|
138
138
|
"original": 10,
|
|
139
139
|
"variableName": "$size-dimension-radio-point-m",
|
|
140
|
-
"isUsed":
|
|
140
|
+
"isUsed": false
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"category": "size",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"value": "16px",
|
|
148
148
|
"original": 16,
|
|
149
149
|
"variableName": "$size-dimension-toggle-height-s",
|
|
150
|
-
"isUsed":
|
|
150
|
+
"isUsed": false
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
"category": "size",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"value": "24px",
|
|
158
158
|
"original": 24,
|
|
159
159
|
"variableName": "$size-dimension-toggle-height-m",
|
|
160
|
-
"isUsed":
|
|
160
|
+
"isUsed": false
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
"category": "size",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"value": "28px",
|
|
168
168
|
"original": 28,
|
|
169
169
|
"variableName": "$size-dimension-toggle-width-s",
|
|
170
|
-
"isUsed":
|
|
170
|
+
"isUsed": false
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
"category": "size",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"value": "40px",
|
|
178
178
|
"original": 40,
|
|
179
179
|
"variableName": "$size-dimension-toggle-width-m",
|
|
180
|
-
"isUsed":
|
|
180
|
+
"isUsed": false
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
"category": "size",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"value": "36px",
|
|
188
188
|
"original": 36,
|
|
189
189
|
"variableName": "$size-dimension-textarea-min-height-m",
|
|
190
|
-
"isUsed":
|
|
190
|
+
"isUsed": false
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
"category": "size",
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
"value": "8px",
|
|
198
198
|
"original": 8,
|
|
199
199
|
"variableName": "$size-dimension-toggle-point-s",
|
|
200
|
-
"isUsed":
|
|
200
|
+
"isUsed": false
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
"category": "size",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"value": "16px",
|
|
208
208
|
"original": 16,
|
|
209
209
|
"variableName": "$size-dimension-toggle-point-m",
|
|
210
|
-
"isUsed":
|
|
210
|
+
"isUsed": false
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
"category": "size",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"value": "32px",
|
|
218
218
|
"original": 32,
|
|
219
219
|
"variableName": "$size-dimension-toggle-button-height-m",
|
|
220
|
-
"isUsed":
|
|
220
|
+
"isUsed": false
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
"category": "size",
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"value": "120px",
|
|
228
228
|
"original": 120,
|
|
229
229
|
"variableName": "$size-dimension-dropdown-menu-width",
|
|
230
|
-
"isUsed":
|
|
230
|
+
"isUsed": false
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
"category": "size",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"value": "320px",
|
|
238
238
|
"original": 320,
|
|
239
239
|
"variableName": "$size-dimension-prompt-button-group-popover-min-width",
|
|
240
|
-
"isUsed":
|
|
240
|
+
"isUsed": false
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
"category": "size",
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
"value": "560px",
|
|
248
248
|
"original": 560,
|
|
249
249
|
"variableName": "$size-dimension-modal-width-m",
|
|
250
|
-
"isUsed":
|
|
250
|
+
"isUsed": false
|
|
251
251
|
},
|
|
252
252
|
{
|
|
253
253
|
"category": "size",
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
"value": "720px",
|
|
258
258
|
"original": 720,
|
|
259
259
|
"variableName": "$size-dimension-modal-width-l",
|
|
260
|
-
"isUsed":
|
|
260
|
+
"isUsed": false
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
263
|
"category": "size",
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
"value": "800px",
|
|
268
268
|
"original": 800,
|
|
269
269
|
"variableName": "$size-dimension-modal-max-height-l",
|
|
270
|
-
"isUsed":
|
|
270
|
+
"isUsed": false
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
"category": "size",
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
"value": "40px",
|
|
278
278
|
"original": 40,
|
|
279
279
|
"variableName": "$size-dimension-modal-margin-l",
|
|
280
|
-
"isUsed":
|
|
280
|
+
"isUsed": false
|
|
281
281
|
},
|
|
282
282
|
{
|
|
283
283
|
"category": "size",
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"value": "1280px",
|
|
288
288
|
"original": 1280,
|
|
289
289
|
"variableName": "$size-dimension-modal-full-screen-content-width",
|
|
290
|
-
"isUsed":
|
|
290
|
+
"isUsed": false
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
293
|
"category": "size",
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
"value": "1px",
|
|
298
298
|
"original": 1,
|
|
299
299
|
"variableName": "$size-dimension-media-viewer-bar-separator-width",
|
|
300
|
-
"isUsed":
|
|
300
|
+
"isUsed": false
|
|
301
301
|
},
|
|
302
302
|
{
|
|
303
303
|
"category": "size",
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
"value": "12px",
|
|
308
308
|
"original": 12,
|
|
309
309
|
"variableName": "$size-dimension-legend-key-width",
|
|
310
|
-
"isUsed":
|
|
310
|
+
"isUsed": false
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
313
|
"category": "size",
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
"value": "56px",
|
|
318
318
|
"original": 56,
|
|
319
319
|
"variableName": "$size-dimension-left-nav-bar-width",
|
|
320
|
-
"isUsed":
|
|
320
|
+
"isUsed": false
|
|
321
321
|
},
|
|
322
322
|
{
|
|
323
323
|
"category": "size",
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
"value": "0px",
|
|
328
328
|
"original": 0,
|
|
329
329
|
"variableName": "$size-letter-spacing-none",
|
|
330
|
-
"isUsed":
|
|
330
|
+
"isUsed": false
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
333
|
"category": "size",
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
"value": "0.5px",
|
|
338
338
|
"original": 0.5,
|
|
339
339
|
"variableName": "$size-letter-spacing-s",
|
|
340
|
-
"isUsed":
|
|
340
|
+
"isUsed": false
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
343
|
"category": "size",
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
"value": "1px",
|
|
348
348
|
"original": 1,
|
|
349
349
|
"variableName": "$size-letter-spacing-m",
|
|
350
|
-
"isUsed":
|
|
350
|
+
"isUsed": false
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
353
|
"category": "size",
|
|
@@ -357,7 +357,7 @@
|
|
|
357
357
|
"value": "10px",
|
|
358
358
|
"original": 10,
|
|
359
359
|
"variableName": "$size-font-xxs",
|
|
360
|
-
"isUsed":
|
|
360
|
+
"isUsed": false
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
363
|
"category": "size",
|
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
"value": "12px",
|
|
368
368
|
"original": 12,
|
|
369
369
|
"variableName": "$size-font-xs",
|
|
370
|
-
"isUsed":
|
|
370
|
+
"isUsed": false
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
"category": "size",
|
|
@@ -377,7 +377,7 @@
|
|
|
377
377
|
"value": "14px",
|
|
378
378
|
"original": 14,
|
|
379
379
|
"variableName": "$size-font-s",
|
|
380
|
-
"isUsed":
|
|
380
|
+
"isUsed": false
|
|
381
381
|
},
|
|
382
382
|
{
|
|
383
383
|
"category": "size",
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
"value": "16px",
|
|
388
388
|
"original": 16,
|
|
389
389
|
"variableName": "$size-font-m",
|
|
390
|
-
"isUsed":
|
|
390
|
+
"isUsed": false
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
393
|
"category": "size",
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
"value": "18px",
|
|
398
398
|
"original": 18,
|
|
399
399
|
"variableName": "$size-font-l",
|
|
400
|
-
"isUsed":
|
|
400
|
+
"isUsed": false
|
|
401
401
|
},
|
|
402
402
|
{
|
|
403
403
|
"category": "size",
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
"value": "20px",
|
|
408
408
|
"original": 20,
|
|
409
409
|
"variableName": "$size-font-xl",
|
|
410
|
-
"isUsed":
|
|
410
|
+
"isUsed": false
|
|
411
411
|
},
|
|
412
412
|
{
|
|
413
413
|
"category": "size",
|
|
@@ -417,7 +417,7 @@
|
|
|
417
417
|
"value": "24px",
|
|
418
418
|
"original": 24,
|
|
419
419
|
"variableName": "$size-font-xxl",
|
|
420
|
-
"isUsed":
|
|
420
|
+
"isUsed": false
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
423
|
"category": "size",
|
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
"value": "26px",
|
|
428
428
|
"original": 26,
|
|
429
429
|
"variableName": "$size-font-xxxl",
|
|
430
|
-
"isUsed":
|
|
430
|
+
"isUsed": false
|
|
431
431
|
},
|
|
432
432
|
{
|
|
433
433
|
"category": "size",
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
"value": "2px",
|
|
448
448
|
"original": 2,
|
|
449
449
|
"variableName": "$size-spacing-xxxs",
|
|
450
|
-
"isUsed":
|
|
450
|
+
"isUsed": false
|
|
451
451
|
},
|
|
452
452
|
{
|
|
453
453
|
"category": "size",
|
|
@@ -527,7 +527,7 @@
|
|
|
527
527
|
"value": "0px",
|
|
528
528
|
"original": 0,
|
|
529
529
|
"variableName": "$size-border-radius-none",
|
|
530
|
-
"isUsed":
|
|
530
|
+
"isUsed": false
|
|
531
531
|
},
|
|
532
532
|
{
|
|
533
533
|
"category": "size",
|
|
@@ -537,7 +537,7 @@
|
|
|
537
537
|
"value": "4px",
|
|
538
538
|
"original": 4,
|
|
539
539
|
"variableName": "$size-border-radius-xs",
|
|
540
|
-
"isUsed":
|
|
540
|
+
"isUsed": false
|
|
541
541
|
},
|
|
542
542
|
{
|
|
543
543
|
"category": "size",
|
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
"value": "8px",
|
|
548
548
|
"original": 8,
|
|
549
549
|
"variableName": "$size-border-radius-s",
|
|
550
|
-
"isUsed":
|
|
550
|
+
"isUsed": false
|
|
551
551
|
},
|
|
552
552
|
{
|
|
553
553
|
"category": "size",
|
|
@@ -557,7 +557,7 @@
|
|
|
557
557
|
"value": "12px",
|
|
558
558
|
"original": 12,
|
|
559
559
|
"variableName": "$size-border-radius-m",
|
|
560
|
-
"isUsed":
|
|
560
|
+
"isUsed": false
|
|
561
561
|
},
|
|
562
562
|
{
|
|
563
563
|
"category": "size",
|
|
@@ -567,7 +567,7 @@
|
|
|
567
567
|
"value": "16px",
|
|
568
568
|
"original": 16,
|
|
569
569
|
"variableName": "$size-border-radius-l",
|
|
570
|
-
"isUsed":
|
|
570
|
+
"isUsed": false
|
|
571
571
|
},
|
|
572
572
|
{
|
|
573
573
|
"category": "size",
|
|
@@ -577,7 +577,7 @@
|
|
|
577
577
|
"value": "24px",
|
|
578
578
|
"original": 24,
|
|
579
579
|
"variableName": "$size-border-radius-xl",
|
|
580
|
-
"isUsed":
|
|
580
|
+
"isUsed": false
|
|
581
581
|
},
|
|
582
582
|
{
|
|
583
583
|
"category": "size",
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
"value": "9999px",
|
|
588
588
|
"original": 9999,
|
|
589
589
|
"variableName": "$size-border-radius-full",
|
|
590
|
-
"isUsed":
|
|
590
|
+
"isUsed": false
|
|
591
591
|
},
|
|
592
592
|
{
|
|
593
593
|
"category": "size",
|
|
@@ -597,7 +597,7 @@
|
|
|
597
597
|
"value": 1.1428571429,
|
|
598
598
|
"original": 1.1428571429,
|
|
599
599
|
"variableName": "$size-line-height-xs",
|
|
600
|
-
"isUsed":
|
|
600
|
+
"isUsed": false
|
|
601
601
|
},
|
|
602
602
|
{
|
|
603
603
|
"category": "size",
|
|
@@ -607,7 +607,7 @@
|
|
|
607
607
|
"value": 1.25,
|
|
608
608
|
"original": 1.25,
|
|
609
609
|
"variableName": "$size-line-height-s",
|
|
610
|
-
"isUsed":
|
|
610
|
+
"isUsed": false
|
|
611
611
|
},
|
|
612
612
|
{
|
|
613
613
|
"category": "size",
|
|
@@ -617,7 +617,7 @@
|
|
|
617
617
|
"value": 1.3333333,
|
|
618
618
|
"original": 1.3333333,
|
|
619
619
|
"variableName": "$size-line-height-m",
|
|
620
|
-
"isUsed":
|
|
620
|
+
"isUsed": false
|
|
621
621
|
},
|
|
622
622
|
{
|
|
623
623
|
"category": "size",
|
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
"value": 1.4285714286,
|
|
628
628
|
"original": 1.4285714286,
|
|
629
629
|
"variableName": "$size-line-height-l",
|
|
630
|
-
"isUsed":
|
|
630
|
+
"isUsed": false
|
|
631
631
|
},
|
|
632
632
|
{
|
|
633
633
|
"category": "size",
|
|
@@ -637,7 +637,7 @@
|
|
|
637
637
|
"value": 1.5,
|
|
638
638
|
"original": 1.5,
|
|
639
639
|
"variableName": "$size-line-height-xl",
|
|
640
|
-
"isUsed":
|
|
640
|
+
"isUsed": false
|
|
641
641
|
},
|
|
642
642
|
{
|
|
643
643
|
"category": "size",
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
"value": 1.625,
|
|
648
648
|
"original": 1.625,
|
|
649
649
|
"variableName": "$size-line-height-xxl",
|
|
650
|
-
"isUsed":
|
|
650
|
+
"isUsed": false
|
|
651
651
|
},
|
|
652
652
|
{
|
|
653
653
|
"category": "size",
|
|
@@ -657,6 +657,6 @@
|
|
|
657
657
|
"value": 1.714286,
|
|
658
658
|
"original": 1.714286,
|
|
659
659
|
"variableName": "$size-line-height-xxxl",
|
|
660
|
-
"isUsed":
|
|
660
|
+
"isUsed": false
|
|
661
661
|
}
|
|
662
662
|
]
|