@basic-ui/material 1.0.0-alpha.23 → 1.0.0-alpha.24
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/index.js +109 -16
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Badge/Badge.d.ts +2 -2
- package/build/esm/Badge/Badge.js +27 -2
- package/build/esm/Badge/Badge.js.map +1 -1
- package/build/esm/Chip/ButtonChip.d.ts +1 -1
- package/build/esm/NavRail/NavRailItem.d.ts +3 -3
- package/build/esm/NavRail/NavRailItem.js +0 -1
- package/build/esm/NavRail/NavRailItem.js.map +1 -1
- package/build/esm/NavRail/icons/test-icons.d.ts +4 -0
- package/build/esm/NavRail/icons/test-icons.js +42 -0
- package/build/esm/NavRail/icons/test-icons.js.map +1 -0
- package/build/esm/Tab/Tab.d.ts +1 -1
- package/build/esm/Tab/Tab.js +17 -6
- package/build/esm/Tab/Tab.js.map +1 -1
- package/build/esm/Tab/TabList.d.ts +2 -1
- package/build/esm/Tab/TabList.js +5 -2
- package/build/esm/Tab/TabList.js.map +1 -1
- package/build/esm/Tab/context.d.ts +1 -0
- package/build/esm/Tab/context.js +2 -1
- package/build/esm/Tab/context.js.map +1 -1
- package/build/esm/TabIndicator/TabIndicator.d.ts +4 -2
- package/build/esm/TabIndicator/TabIndicator.js +75 -9
- package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
- package/build/esm/Table/TableHead.d.ts +1 -1
- package/build/tsconfig-build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/Badge/Badge.story.tsx +68 -0
- package/src/Badge/Badge.tsx +32 -3
- package/src/NavRail/NavRail.story.tsx +1 -45
- package/src/NavRail/NavRailItem.tsx +0 -1
- package/src/NavRail/icons/test-icons.tsx +46 -0
- package/src/Tab/Tab.story.tsx +170 -14
- package/src/Tab/Tab.tsx +26 -7
- package/src/Tab/TabList.tsx +5 -1
- package/src/Tab/context.ts +2 -0
- package/src/TabIndicator/TabIndicator.tsx +83 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { BoxProps } from '../Box';
|
|
3
3
|
export interface BadgeProps extends BoxProps {
|
|
4
|
-
|
|
4
|
+
size?: 'small' | 'large';
|
|
5
5
|
}
|
|
6
|
-
export declare const Badge: import("react").ForwardRefExoticComponent<Pick<BadgeProps, "
|
|
6
|
+
export declare const Badge: import("react").ForwardRefExoticComponent<Pick<BadgeProps, "bottom" | "top" | "hidden" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & import("react").RefAttributes<HTMLDivElement>>;
|
package/build/esm/Badge/Badge.js
CHANGED
|
@@ -1,12 +1,37 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["size", "__css"];
|
|
2
4
|
import { forwardRef } from 'react';
|
|
3
5
|
import { Box } from '../Box';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
7
|
export var Badge = /*#__PURE__*/forwardRef(function Badge(props, forwardedRef) {
|
|
6
|
-
var
|
|
8
|
+
var _props$size = props.size,
|
|
9
|
+
size = _props$size === void 0 ? 'large' : _props$size,
|
|
10
|
+
__css = props.__css,
|
|
11
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
7
12
|
|
|
8
13
|
return /*#__PURE__*/_jsx(Box, _extends({
|
|
9
|
-
ref: forwardedRef
|
|
14
|
+
ref: forwardedRef,
|
|
15
|
+
__css: _extends(_extends({
|
|
16
|
+
variant: 'text.label-small',
|
|
17
|
+
bg: 'error',
|
|
18
|
+
color: 'on.error',
|
|
19
|
+
borderRadius: 'full'
|
|
20
|
+
}, size === 'small' ? {
|
|
21
|
+
maxWidth: "0.375rem",
|
|
22
|
+
maxHeight: "0.375rem",
|
|
23
|
+
minWidth: "0.375rem",
|
|
24
|
+
minHeight: "0.375rem"
|
|
25
|
+
} : {
|
|
26
|
+
px: 1,
|
|
27
|
+
maxHeight: "1rem",
|
|
28
|
+
minWidth: "1rem",
|
|
29
|
+
minHeight: "1rem"
|
|
30
|
+
}), {}, {
|
|
31
|
+
display: 'inline-flex',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
justifyContent: 'center'
|
|
34
|
+
}, __css)
|
|
10
35
|
}, otherProps));
|
|
11
36
|
});
|
|
12
37
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","names":["forwardRef","Box","Badge","props","forwardedRef","otherProps"],"sources":["../../../src/Badge/Badge.tsx"],"sourcesContent":["import { forwardRef } from 'react';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\n\nexport interface BadgeProps extends BoxProps {\n
|
|
1
|
+
{"version":3,"file":"Badge.js","names":["forwardRef","Box","Badge","props","forwardedRef","size","__css","otherProps","variant","bg","color","borderRadius","maxWidth","maxHeight","minWidth","minHeight","px","display","alignItems","justifyContent"],"sources":["../../../src/Badge/Badge.tsx"],"sourcesContent":["import { rem } from 'polished';\nimport { forwardRef } from 'react';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\n\nexport interface BadgeProps extends BoxProps {\n size?: 'small' | 'large';\n}\n\nexport const Badge = forwardRef<HTMLDivElement, BadgeProps>(function Badge(\n props,\n forwardedRef\n) {\n const { size = 'large', __css, ...otherProps } = props;\n\n return (\n <Box\n ref={forwardedRef}\n __css={{\n variant: 'text.label-small',\n bg: 'error',\n color: 'on.error',\n borderRadius: 'full',\n ...(size === 'small'\n ? {\n maxWidth: rem(6),\n maxHeight: rem(6),\n minWidth: rem(6),\n minHeight: rem(6),\n }\n : {\n px: 1,\n maxHeight: rem(16),\n minWidth: rem(16),\n minHeight: rem(16),\n }),\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n ...__css,\n }}\n {...otherProps}\n />\n );\n});\n"],"mappings":";;;AACA,SAASA,UAAT,QAA2B,OAA3B;AAGA,SAASC,GAAT,QAAoB,QAApB;;AAMA,OAAO,IAAMC,KAAK,gBAAGF,UAAU,CAA6B,SAASE,KAAT,CAC1DC,KAD0D,EAE1DC,YAF0D,EAG1D;EACA,kBAAiDD,KAAjD,CAAQE,IAAR;EAAA,IAAQA,IAAR,4BAAe,OAAf;EAAA,IAAwBC,KAAxB,GAAiDH,KAAjD,CAAwBG,KAAxB;EAAA,IAAkCC,UAAlC,4BAAiDJ,KAAjD;;EAEA,oBACE,KAAC,GAAD;IACE,GAAG,EAAEC,YADP;IAEE,KAAK;MACHI,OAAO,EAAE,kBADN;MAEHC,EAAE,EAAE,OAFD;MAGHC,KAAK,EAAE,UAHJ;MAIHC,YAAY,EAAE;IAJX,GAKCN,IAAI,KAAK,OAAT,GACA;MACEO,QAAQ,YADV;MAEEC,SAAS,YAFX;MAGEC,QAAQ,YAHV;MAIEC,SAAS;IAJX,CADA,GAOA;MACEC,EAAE,EAAE,CADN;MAEEH,SAAS,QAFX;MAGEC,QAAQ,QAHV;MAIEC,SAAS;IAJX,CAZD;MAkBHE,OAAO,EAAE,aAlBN;MAmBHC,UAAU,EAAE,QAnBT;MAoBHC,cAAc,EAAE;IApBb,GAqBAb,KArBA;EAFP,GAyBMC,UAzBN,EADF;AA6BD,CAnC8B,CAAxB"}
|
|
@@ -6,4 +6,4 @@ export declare type ButtonChipProps = ChipBaseProps & {
|
|
|
6
6
|
leadingIcon?: ReactNode;
|
|
7
7
|
trailingIcon?: ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export declare const ButtonChip: import("react").ForwardRefExoticComponent<Pick<ButtonChipProps, "
|
|
9
|
+
export declare const ButtonChip: import("react").ForwardRefExoticComponent<Pick<ButtonChipProps, "hidden" | keyof import("..").BaseProps | keyof import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> | keyof import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> | keyof import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> | keyof import("styled-system").GridProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").BackgroundProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Background<import("styled-system").TLengthStyledSystem>> | keyof import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").ShadowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | "disabled" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "borderOpacity" | "checked" | "leadingIcon" | "trailingIcon"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -9,7 +9,7 @@ export interface NavRailItemProps extends Omit<BoxProps, 'color'> {
|
|
|
9
9
|
color?: string;
|
|
10
10
|
}
|
|
11
11
|
export declare type NavRailIndicatorProps = BoxProps;
|
|
12
|
-
export declare const NavRailIndicator: import("react").ForwardRefExoticComponent<Pick<NavRailIndicatorProps, "
|
|
12
|
+
export declare const NavRailIndicator: import("react").ForwardRefExoticComponent<Pick<NavRailIndicatorProps, "hidden" | keyof import("../Box").BaseProps | keyof import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> | keyof import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> | keyof import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> | keyof import("styled-system").GridProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").BackgroundProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Background<import("styled-system").TLengthStyledSystem>> | keyof import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | keyof import("styled-system").ShadowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export declare type NavRailLabelProps = TextProps;
|
|
14
|
-
export declare const NavRailLabel: import("react").ForwardRefExoticComponent<Pick<TextProps, "
|
|
15
|
-
export declare const NavRailItem: import("react").ForwardRefExoticComponent<Pick<NavRailItemProps, "
|
|
14
|
+
export declare const NavRailLabel: import("react").ForwardRefExoticComponent<Pick<TextProps, "bottom" | "top" | "hidden" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export declare const NavRailItem: import("react").ForwardRefExoticComponent<Pick<NavRailItemProps, "bottom" | "top" | "hidden" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "disabled" | "selected"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavRailItem.js","names":["forwardRef","useMemo","get","Box","useTheme","Text","useRippleSurface","EASING_STANDARD","NavRailIndicator","props","forwardedRef","as","children","__css","otherProps","width","height","maxWidth","maxHeight","borderRadius","bg","display","alignItems","justifyContent","minHeight","transition","pointerEvents","NavRailLabel","pt","pb","color","NavRailItem","selected","disabled","style","onKeyDown","onPointerDown","theme","baseOpacity","hoverOpacity","focusOpacity","pressedOpacity","ripple","rippleColor","rippleCss","ret","keys","Object","key","startsWith","newKey","replace","flexDirection","border","outline","backgroundColor","margin","padding","
|
|
1
|
+
{"version":3,"file":"NavRailItem.js","names":["forwardRef","useMemo","get","Box","useTheme","Text","useRippleSurface","EASING_STANDARD","NavRailIndicator","props","forwardedRef","as","children","__css","otherProps","width","height","maxWidth","maxHeight","borderRadius","bg","display","alignItems","justifyContent","minHeight","transition","pointerEvents","NavRailLabel","pt","pb","color","NavRailItem","selected","disabled","style","onKeyDown","onPointerDown","theme","baseOpacity","hoverOpacity","focusOpacity","pressedOpacity","ripple","rippleColor","rippleCss","ret","keys","Object","key","startsWith","newKey","replace","flexDirection","border","outline","backgroundColor","margin","padding","cursor","textDecoration","WebkitTapHighlightColor"],"sources":["../../../src/NavRail/NavRailItem.tsx"],"sourcesContent":["import type { ElementType, ReactNode } from 'react';\nimport { forwardRef, useMemo } from 'react';\nimport { rem } from 'polished';\nimport { get } from 'styled-system';\n\nimport type { BoxProps, SxStyleProp } from '../Box';\nimport { Box } from '../Box';\nimport { useTheme } from '../theme';\nimport { Text } from '../Text';\nimport type { TextProps } from '../Text';\nimport { useRippleSurface } from '../Ripple';\nimport { EASING_STANDARD } from '../motion';\n\nexport interface NavRailItemProps extends Omit<BoxProps, 'color'> {\n as?: ElementType<any>;\n children?: ReactNode;\n disabled?: boolean;\n selected?: boolean;\n color?: string;\n}\n\nexport type NavRailIndicatorProps = BoxProps;\n\nexport const NavRailIndicator = forwardRef<\n HTMLDivElement,\n NavRailIndicatorProps\n>(function NavRailIndicator(props, forwardedRef) {\n const { as = 'div', children, __css, ...otherProps } = props;\n\n return (\n <Box\n color=\"currentColor\"\n ref={forwardedRef}\n as={as}\n data-nav-rail-item-indicator=\"\"\n {...otherProps}\n __css={{\n width: '100%',\n height: '100%',\n maxWidth: rem(56),\n maxHeight: rem(56),\n borderRadius: 'full',\n bg: 'var(--indicator-background-color)',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: rem(32),\n transition: `background-color .2s ${EASING_STANDARD}`,\n pointerEvents: 'none',\n ...__css,\n }}\n >\n {children}\n </Box>\n );\n});\n\nexport type NavRailLabelProps = TextProps;\n\nexport const NavRailLabel = forwardRef<HTMLDivElement, NavRailLabelProps>(\n function NavRailLabel(props, forwardedRef) {\n const { as = 'div', children, __css, ...otherProps } = props;\n\n return (\n <Text\n ref={forwardedRef}\n as={as}\n variant=\"label-small\"\n lineHeight={1}\n {...otherProps}\n __css={{\n pt: rem(4),\n pb: rem(12),\n color: 'inherit',\n pointerEvents: 'none',\n ...__css,\n }}\n >\n {children}\n </Text>\n );\n }\n);\n\nexport const NavRailItem = forwardRef<HTMLDivElement, NavRailItemProps>(\n function NavRailItem(props, forwardedRef) {\n const {\n as = 'button',\n children,\n color = 'primary-container',\n selected = false,\n disabled = false,\n style,\n onKeyDown,\n onPointerDown,\n __css,\n ...otherProps\n } = props;\n const theme = useTheme();\n const baseOpacity = 0,\n hoverOpacity = 0.04,\n focusOpacity = 0.12,\n pressedOpacity = 0.12;\n const ripple = useRippleSurface({\n rippleColor: 'currentColor',\n onKeyDown,\n onPointerDown,\n baseOpacity,\n hoverOpacity,\n focusOpacity,\n pressedOpacity,\n });\n\n // Apply ripple from nav item to nav indicator\n const rippleCss = useMemo(() => {\n const ret: SxStyleProp = {};\n const keys = Object.keys(ripple.__css);\n for (const key of keys) {\n if (!key.startsWith('&')) {\n ret['& [data-nav-rail-item-indicator]'] =\n ret['& [data-nav-rail-item-indicator]'] || {};\n ret['& [data-nav-rail-item-indicator]'][key] = ripple.__css[key];\n continue;\n }\n\n const newKey = key.replace(\n /(.+?)::(before|after)/g,\n '$1 [data-nav-rail-item-indicator]::$2'\n );\n ret[newKey] = ripple.__css[key];\n }\n return ret;\n }, [ripple.__css]);\n\n return (\n <Box\n ref={forwardedRef}\n as={as}\n {...otherProps}\n onPointerDown={ripple.onPointerDown}\n onKeyDown={ripple.onKeyDown}\n aria-pressed={selected}\n type=\"button\"\n style={{ ...ripple.style, ...style }}\n disabled={disabled}\n __css={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n transition: `color .2s ${EASING_STANDARD}`,\n color: selected ? `on.${color}` : 'on.surface-variant',\n '--indicator-background-color': selected\n ? get(theme, `colors.${color}`)\n : 'transparent',\n border: 'none',\n ':focus': {\n outline: 'none',\n },\n backgroundColor: 'transparent',\n margin: 0,\n padding: 0,\n minHeight: rem(60),\n height: rem(60),\n cursor: 'pointer',\n textDecoration: 'none',\n WebkitTapHighlightColor: 'transparent',\n ...rippleCss,\n ...__css,\n }}\n >\n {children}\n </Box>\n );\n }\n);\n"],"mappings":";;;;;AACA,SAASA,UAAT,EAAqBC,OAArB,QAAoC,OAApC;AAEA,SAASC,GAAT,QAAoB,eAApB;AAGA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,QAAT,QAAyB,UAAzB;AACA,SAASC,IAAT,QAAqB,SAArB;AAEA,SAASC,gBAAT,QAAiC,WAAjC;AACA,SAASC,eAAT,QAAgC,WAAhC;;AAYA,OAAO,IAAMC,gBAAgB,gBAAGR,UAAU,CAGxC,SAASQ,gBAAT,CAA0BC,KAA1B,EAAiCC,YAAjC,EAA+C;EAC/C,gBAAuDD,KAAvD,CAAQE,EAAR;EAAA,IAAQA,EAAR,0BAAa,KAAb;EAAA,IAAoBC,QAApB,GAAuDH,KAAvD,CAAoBG,QAApB;EAAA,IAA8BC,KAA9B,GAAuDJ,KAAvD,CAA8BI,KAA9B;EAAA,IAAwCC,UAAxC,4BAAuDL,KAAvD;;EAEA,oBACE,KAAC,GAAD;IACE,KAAK,EAAC,cADR;IAEE,GAAG,EAAEC,YAFP;IAGE,EAAE,EAAEC,EAHN;IAIE,gCAA6B;EAJ/B,GAKMG,UALN;IAME,KAAK;MACHC,KAAK,EAAE,MADJ;MAEHC,MAAM,EAAE,MAFL;MAGHC,QAAQ,UAHL;MAIHC,S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ributes<SVGSVGElement>) => JSX.Element;
|
|
3
|
+
export declare const KitchenIcon: (props: SVGAttributes<SVGSVGElement>) => JSX.Element;
|
|
4
|
+
export declare const MenuIcon: (props: SVGAttributes<SVGSVGElement>) => JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export var ListIcon = function ListIcon(props) {
|
|
4
|
+
return /*#__PURE__*/_jsx("svg", _extends(_extends({
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
height: 16,
|
|
7
|
+
width: 16,
|
|
8
|
+
viewBox: "0 0 24 24"
|
|
9
|
+
}, props), {}, {
|
|
10
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
d: "M8 17q.425 0 .713-.288Q9 16.425 9 16t-.287-.713Q8.425 15 8 15t-.713.287Q7 15.575 7 16t.287.712Q7.575 17 8 17Zm0-4q.425 0 .713-.288Q9 12.425 9 12t-.287-.713Q8.425 11 8 11t-.713.287Q7 11.575 7 12t.287.712Q7.575 13 8 13Zm0-4q.425 0 .713-.288Q9 8.425 9 8t-.287-.713Q8.425 7 8 7t-.713.287Q7 7.575 7 8t.287.712Q7.575 9 8 9Zm3 8h6v-2h-6Zm0-4h6v-2h-6Zm0-4h6V7h-6ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14ZM5 5v14V5Z"
|
|
13
|
+
})
|
|
14
|
+
}));
|
|
15
|
+
};
|
|
16
|
+
export var KitchenIcon = function KitchenIcon(props) {
|
|
17
|
+
return /*#__PURE__*/_jsx("svg", _extends(_extends({
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
height: 16,
|
|
20
|
+
width: 16,
|
|
21
|
+
viewBox: "0 0 24 24"
|
|
22
|
+
}, props), {}, {
|
|
23
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
24
|
+
fill: "currentColor",
|
|
25
|
+
d: "M8 8V5h2v3Zm0 9v-5h2v5Zm-2 5q-.825 0-1.412-.587Q4 20.825 4 20V4q0-.825.588-1.413Q5.175 2 6 2h12q.825 0 1.413.587Q20 3.175 20 4v16q0 .825-.587 1.413Q18.825 22 18 22Zm0-2h12v-9H6v9ZM6 9h12V4H6Z"
|
|
26
|
+
})
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
export var MenuIcon = function MenuIcon(props) {
|
|
30
|
+
return /*#__PURE__*/_jsx("svg", _extends(_extends({
|
|
31
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
+
height: 16,
|
|
33
|
+
width: 16,
|
|
34
|
+
viewBox: "0 0 24 24"
|
|
35
|
+
}, props), {}, {
|
|
36
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
37
|
+
fill: "currentColor",
|
|
38
|
+
d: "M17 22v-8h-3V7q0-2.075 1.463-3.537Q16.925 2 19 2v20ZM7 22v-9.15q-1.275-.35-2.137-1.4Q4 10.4 4 9V2h2v7h1V2h2v7h1V2h2v7q0 1.4-.863 2.45-.862 1.05-2.137 1.4V22Z"
|
|
39
|
+
})
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=test-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-icons.js","names":["ListIcon","props","KitchenIcon","MenuIcon"],"sources":["../../../../src/NavRail/icons/test-icons.tsx"],"sourcesContent":["import type { SVGAttributes } from 'react';\n\nexport const ListIcon = (props: SVGAttributes<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height={16}\n width={16}\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M8 17q.425 0 .713-.288Q9 16.425 9 16t-.287-.713Q8.425 15 8 15t-.713.287Q7 15.575 7 16t.287.712Q7.575 17 8 17Zm0-4q.425 0 .713-.288Q9 12.425 9 12t-.287-.713Q8.425 11 8 11t-.713.287Q7 11.575 7 12t.287.712Q7.575 13 8 13Zm0-4q.425 0 .713-.288Q9 8.425 9 8t-.287-.713Q8.425 7 8 7t-.713.287Q7 7.575 7 8t.287.712Q7.575 9 8 9Zm3 8h6v-2h-6Zm0-4h6v-2h-6Zm0-4h6V7h-6ZM5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14ZM5 5v14V5Z\"\n />\n </svg>\n);\n\nexport const KitchenIcon = (props: SVGAttributes<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height={16}\n width={16}\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M8 8V5h2v3Zm0 9v-5h2v5Zm-2 5q-.825 0-1.412-.587Q4 20.825 4 20V4q0-.825.588-1.413Q5.175 2 6 2h12q.825 0 1.413.587Q20 3.175 20 4v16q0 .825-.587 1.413Q18.825 22 18 22Zm0-2h12v-9H6v9ZM6 9h12V4H6Z\"\n />\n </svg>\n);\n\nexport const MenuIcon = (props: SVGAttributes<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height={16}\n width={16}\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M17 22v-8h-3V7q0-2.075 1.463-3.537Q16.925 2 19 2v20ZM7 22v-9.15q-1.275-.35-2.137-1.4Q4 10.4 4 9V2h2v7h1V2h2v7h1V2h2v7q0 1.4-.863 2.45-.862 1.05-2.137 1.4V22Z\"\n />\n </svg>\n);\n"],"mappings":";;AAEA,OAAO,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD;EAAA,oBACtB;IACE,KAAK,EAAC,4BADR;IAEE,MAAM,EAAE,EAFV;IAGE,KAAK,EAAE,EAHT;IAIE,OAAO,EAAC;EAJV,GAKMA,KALN;IAAA,uBAOE;MACE,IAAI,EAAC,cADP;MAEE,CAAC,EAAC;IAFJ;EAPF,GADsB;AAAA,CAAjB;AAeP,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAACD,KAAD;EAAA,oBACzB;IACE,KAAK,EAAC,4BADR;IAEE,MAAM,EAAE,EAFV;IAGE,KAAK,EAAE,EAHT;IAIE,OAAO,EAAC;EAJV,GAKMA,KALN;IAAA,uBAOE;MACE,IAAI,EAAC,cADP;MAEE,CAAC,EAAC;IAFJ;EAPF,GADyB;AAAA,CAApB;AAeP,OAAO,IAAME,QAAQ,GAAG,SAAXA,QAAW,CAACF,KAAD;EAAA,oBACtB;IACE,KAAK,EAAC,4BADR;IAEE,MAAM,EAAE,EAFV;IAGE,KAAK,EAAE,EAHT;IAIE,OAAO,EAAC;EAJV,GAKMA,KALN;IAAA,uBAOE;MACE,IAAI,EAAC,cADP;MAEE,CAAC,EAAC;IAFJ;EAPF,GADsB;AAAA,CAAjB"}
|
package/build/esm/Tab/Tab.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import type { ButtonHTMLAttributes } from 'react';
|
|
|
2
2
|
import type { TabProps as TabPropsCore } from '@basic-ui/core';
|
|
3
3
|
import type { RippleBoxProps } from '../Ripple';
|
|
4
4
|
export declare type TabProps = TabPropsCore & RippleBoxProps<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
5
|
-
export declare const Tab: import("react").ForwardRefExoticComponent<Pick<TabProps, "
|
|
5
|
+
export declare const Tab: import("react").ForwardRefExoticComponent<Pick<TabProps, "bottom" | "top" | "hidden" | "center" | "left" | "right" | "as" | "sx" | "__css" | "variant" | "tx" | "theme" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "p" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "display" | "verticalAlign" | "size" | "overflow" | "overflowX" | "overflowY" | "fontFamily" | "fontSize" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontStyle" | "textAlign" | "color" | "bg" | "backgroundColor" | "opacity" | "alignItems" | "alignContent" | "justifyItems" | "justifyContent" | "flexWrap" | "flexDirection" | "flex" | "flexGrow" | "flexShrink" | "flexBasis" | "justifySelf" | "alignSelf" | "order" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "gridGap" | "gridColumnGap" | "gridRowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "background" | "backgroundImage" | "backgroundSize" | "backgroundPosition" | "backgroundRepeat" | "position" | "zIndex" | "boxShadow" | "textShadow" | "autoFocus" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "innerAs" | "key" | "baseOpacity" | "hoverOpacity" | "focusOpacity" | "pressedOpacity" | "rippleColor" | "rippleEnabled" | "mouseFocus"> & import("react").RefAttributes<HTMLButtonElement>>;
|
package/build/esm/Tab/Tab.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["innerAs", "selected", "children", "disabled"],
|
|
4
4
|
_excluded2 = ["as"];
|
|
5
|
-
import { forwardRef } from 'react';
|
|
5
|
+
import { useRef, forwardRef } from 'react';
|
|
6
6
|
import { Tab as TabCore } from '@basic-ui/core';
|
|
7
7
|
import { RippleBox } from '../Ripple';
|
|
8
8
|
import { alpha } from '../color';
|
|
@@ -22,13 +22,16 @@ var TabInner = /*#__PURE__*/forwardRef(function Tab(props, forwardedRef) {
|
|
|
22
22
|
var _useTabListContext = useTabListContext(),
|
|
23
23
|
textColor = _useTabListContext.textColor,
|
|
24
24
|
indicatorColor = _useTabListContext.indicatorColor,
|
|
25
|
-
selectedTextColor = _useTabListContext.selectedTextColor
|
|
25
|
+
selectedTextColor = _useTabListContext.selectedTextColor,
|
|
26
|
+
variant = _useTabListContext.variant;
|
|
26
27
|
|
|
28
|
+
var labelRef = useRef(null);
|
|
27
29
|
return /*#__PURE__*/_jsxs(Box, {
|
|
28
30
|
position: "relative",
|
|
29
31
|
display: "flex",
|
|
30
32
|
flex: 1,
|
|
31
33
|
flexDirection: "column",
|
|
34
|
+
height: "100%",
|
|
32
35
|
children: [/*#__PURE__*/_jsx(RippleBox, _extends(_extends({
|
|
33
36
|
as: innerAs,
|
|
34
37
|
ref: forwardedRef,
|
|
@@ -36,9 +39,9 @@ var TabInner = /*#__PURE__*/forwardRef(function Tab(props, forwardedRef) {
|
|
|
36
39
|
disabled: disabled,
|
|
37
40
|
__css: {
|
|
38
41
|
px: 3,
|
|
39
|
-
position: 'relative',
|
|
40
42
|
color: selected ? selectedTextColor || indicatorColor : alpha(textColor, disabled ? 0.37 : 0.7),
|
|
41
|
-
|
|
43
|
+
minHeight: "3rem",
|
|
44
|
+
height: '100%',
|
|
42
45
|
backgroundColor: 'transparent',
|
|
43
46
|
border: 'none',
|
|
44
47
|
':focus': {
|
|
@@ -50,15 +53,23 @@ var TabInner = /*#__PURE__*/forwardRef(function Tab(props, forwardedRef) {
|
|
|
50
53
|
}, otherProps), {}, {
|
|
51
54
|
children: /*#__PURE__*/_jsx(Text, {
|
|
52
55
|
as: "span",
|
|
53
|
-
|
|
56
|
+
display: "inline-flex",
|
|
57
|
+
justifyContent: "center",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
variant: "title-small",
|
|
54
60
|
color: "inherit",
|
|
55
61
|
height: "100%",
|
|
56
62
|
textAlign: "center",
|
|
63
|
+
position: "relative",
|
|
64
|
+
flexDirection: "column",
|
|
65
|
+
ref: labelRef,
|
|
57
66
|
children: children
|
|
58
67
|
})
|
|
59
68
|
})), /*#__PURE__*/_jsx(TabIndicator, {
|
|
60
69
|
selected: selected,
|
|
61
|
-
color: indicatorColor
|
|
70
|
+
color: indicatorColor,
|
|
71
|
+
variant: variant,
|
|
72
|
+
labelRef: labelRef
|
|
62
73
|
})]
|
|
63
74
|
});
|
|
64
75
|
});
|
package/build/esm/Tab/Tab.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","names":["forwardRef","Tab","TabCore","RippleBox","alpha","Text","Box","TabIndicator","useTabListContext","TabInner","props","forwardedRef","innerAs","selected","children","disabled","otherProps","textColor","indicatorColor","selectedTextColor","
|
|
1
|
+
{"version":3,"file":"Tab.js","names":["useRef","forwardRef","Tab","TabCore","RippleBox","alpha","Text","Box","TabIndicator","useTabListContext","TabInner","props","forwardedRef","innerAs","selected","children","disabled","otherProps","textColor","indicatorColor","selectedTextColor","variant","labelRef","px","color","minHeight","height","backgroundColor","border","outline","width","alignItems","as"],"sources":["../../../src/Tab/Tab.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes } from 'react';\nimport { useRef, forwardRef } from 'react';\nimport type { TabProps as TabPropsCore } from '@basic-ui/core';\nimport { Tab as TabCore } from '@basic-ui/core';\nimport { rem } from 'polished';\n\nimport type { RippleBoxProps } from '../Ripple';\nimport { RippleBox } from '../Ripple';\nimport { alpha } from '../color';\nimport { Text } from '../Text';\nimport { Box } from '../Box';\nimport { TabIndicator } from '../TabIndicator';\nimport { useTabListContext } from './context';\n\nexport type TabProps = TabPropsCore &\n RippleBoxProps<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>;\n\nconst TabInner = forwardRef<\n HTMLButtonElement,\n TabProps & { selected?: boolean }\n>(function Tab(props, forwardedRef) {\n const { innerAs, selected, children, disabled, ...otherProps } = props;\n const { textColor, indicatorColor, selectedTextColor, variant } =\n useTabListContext();\n const labelRef = useRef<HTMLParagraphElement>(null);\n\n return (\n <Box\n position=\"relative\"\n display=\"flex\"\n flex={1}\n flexDirection=\"column\"\n height=\"100%\"\n >\n <RippleBox<\n RippleBoxProps<\n HTMLButtonElement,\n ButtonHTMLAttributes<HTMLButtonElement>\n >\n >\n as={innerAs}\n ref={forwardedRef}\n rippleColor={indicatorColor}\n disabled={disabled}\n __css={{\n px: 3,\n color: selected\n ? selectedTextColor || indicatorColor\n : alpha(textColor, disabled ? 0.37 : 0.7),\n minHeight: rem(48),\n height: '100%',\n backgroundColor: 'transparent',\n border: 'none',\n ':focus': {\n outline: 'none',\n },\n width: '100%',\n alignItems: 'center',\n }}\n {...otherProps}\n >\n <Text\n as=\"span\"\n display=\"inline-flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n variant=\"title-small\"\n color=\"inherit\"\n height=\"100%\"\n textAlign=\"center\"\n position=\"relative\"\n flexDirection=\"column\"\n ref={labelRef}\n >\n {children}\n </Text>\n </RippleBox>\n <TabIndicator\n selected={selected}\n color={indicatorColor}\n variant={variant}\n labelRef={labelRef}\n />\n </Box>\n );\n});\n\nexport const Tab = forwardRef<HTMLButtonElement, TabProps>(function Tab(\n props,\n forwardedRef\n) {\n const { as = 'button', ...otherProps } = props;\n\n return (\n <TabCore as={TabInner} innerAs={as} ref={forwardedRef} {...otherProps} />\n );\n});\n"],"mappings":";;;;AACA,SAASA,MAAT,EAAiBC,UAAjB,QAAmC,OAAnC;AAEA,SAASC,GAAG,IAAIC,OAAhB,QAA+B,gBAA/B;AAIA,SAASC,SAAT,QAA0B,WAA1B;AACA,SAASC,KAAT,QAAsB,UAAtB;AACA,SAASC,IAAT,QAAqB,SAArB;AACA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,iBAAT,QAAkC,WAAlC;;;AAKA,IAAMC,QAAQ,gBAAGT,UAAU,CAGzB,SAASC,GAAT,CAAaS,KAAb,EAAoBC,YAApB,EAAkC;EAClC,IAAQC,OAAR,GAAiEF,KAAjE,CAAQE,OAAR;EAAA,IAAiBC,QAAjB,GAAiEH,KAAjE,CAAiBG,QAAjB;EAAA,IAA2BC,QAA3B,GAAiEJ,KAAjE,CAA2BI,QAA3B;EAAA,IAAqCC,QAArC,GAAiEL,KAAjE,CAAqCK,QAArC;EAAA,IAAkDC,UAAlD,4BAAiEN,KAAjE;;EACA,yBACEF,iBAAiB,EADnB;EAAA,IAAQS,SAAR,sBAAQA,SAAR;EAAA,IAAmBC,cAAnB,sBAAmBA,cAAnB;EAAA,IAAmCC,iBAAnC,sBAAmCA,iBAAnC;EAAA,IAAsDC,OAAtD,sBAAsDA,OAAtD;;EAEA,IAAMC,QAAQ,GAAGtB,MAAM,CAAuB,IAAvB,CAAvB;EAEA,oBACE,MAAC,GAA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