@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.
Files changed (37) hide show
  1. package/build/cjs/index.js +109 -16
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/esm/Badge/Badge.d.ts +2 -2
  4. package/build/esm/Badge/Badge.js +27 -2
  5. package/build/esm/Badge/Badge.js.map +1 -1
  6. package/build/esm/Chip/ButtonChip.d.ts +1 -1
  7. package/build/esm/NavRail/NavRailItem.d.ts +3 -3
  8. package/build/esm/NavRail/NavRailItem.js +0 -1
  9. package/build/esm/NavRail/NavRailItem.js.map +1 -1
  10. package/build/esm/NavRail/icons/test-icons.d.ts +4 -0
  11. package/build/esm/NavRail/icons/test-icons.js +42 -0
  12. package/build/esm/NavRail/icons/test-icons.js.map +1 -0
  13. package/build/esm/Tab/Tab.d.ts +1 -1
  14. package/build/esm/Tab/Tab.js +17 -6
  15. package/build/esm/Tab/Tab.js.map +1 -1
  16. package/build/esm/Tab/TabList.d.ts +2 -1
  17. package/build/esm/Tab/TabList.js +5 -2
  18. package/build/esm/Tab/TabList.js.map +1 -1
  19. package/build/esm/Tab/context.d.ts +1 -0
  20. package/build/esm/Tab/context.js +2 -1
  21. package/build/esm/Tab/context.js.map +1 -1
  22. package/build/esm/TabIndicator/TabIndicator.d.ts +4 -2
  23. package/build/esm/TabIndicator/TabIndicator.js +75 -9
  24. package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
  25. package/build/esm/Table/TableHead.d.ts +1 -1
  26. package/build/tsconfig-build.tsbuildinfo +1 -1
  27. package/package.json +2 -2
  28. package/src/Badge/Badge.story.tsx +68 -0
  29. package/src/Badge/Badge.tsx +32 -3
  30. package/src/NavRail/NavRail.story.tsx +1 -45
  31. package/src/NavRail/NavRailItem.tsx +0 -1
  32. package/src/NavRail/icons/test-icons.tsx +46 -0
  33. package/src/Tab/Tab.story.tsx +170 -14
  34. package/src/Tab/Tab.tsx +26 -7
  35. package/src/Tab/TabList.tsx +5 -1
  36. package/src/Tab/context.ts +2 -0
  37. package/src/TabIndicator/TabIndicator.tsx +83 -7
@@ -5,5 +5,6 @@ export declare type TabListProps = TabListPropsCore & BoxProps & {
5
5
  indicatorColor?: string;
6
6
  textColor?: string;
7
7
  selectedTextColor?: string;
8
+ variant?: 'primary' | 'secondary';
8
9
  };
9
- export declare const TabList: import("react").ForwardRefExoticComponent<Pick<TabListProps, "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "color" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textShadow" | "top" | "translate" | "verticalAlign" | "width" | "background" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "variant" | "size" | "hidden" | "as" | "sx" | "__css" | "tx" | "theme" | "borderX" | "borderY" | "gridGap" | "gridColumnGap" | "gridRowGap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "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" | "vertical" | "innerAs" | "manualActivation" | "indicatorColor" | "textColor" | "selectedTextColor"> & import("react").RefAttributes<HTMLDivElement>>;
10
+ export declare const TabList: import("react").ForwardRefExoticComponent<Pick<TabListProps, "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" | "vertical" | "innerAs" | "textColor" | "indicatorColor" | "selectedTextColor" | "manualActivation"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["innerAs"],
4
- _excluded2 = ["as", "indicatorColor", "textColor", "selectedTextColor"];
4
+ _excluded2 = ["as", "indicatorColor", "textColor", "selectedTextColor", "variant"];
5
5
  import { forwardRef, useRef } from 'react';
6
6
  import { TabList as TabListCore } from '@basic-ui/core';
7
7
  import { Box } from '../Box';
@@ -30,6 +30,8 @@ export var TabList = /*#__PURE__*/forwardRef(function TabList(props, forwardedRe
30
30
  _props$textColor = props.textColor,
31
31
  textColor = _props$textColor === void 0 ? 'on.surface' : _props$textColor,
32
32
  selectedTextColor = props.selectedTextColor,
33
+ _props$variant = props.variant,
34
+ variant = _props$variant === void 0 ? 'secondary' : _props$variant,
33
35
  otherProps = _objectWithoutProperties(props, _excluded2);
34
36
 
35
37
  var currentIndicator = useRef(null);
@@ -37,7 +39,8 @@ export var TabList = /*#__PURE__*/forwardRef(function TabList(props, forwardedRe
37
39
  value: {
38
40
  indicatorColor: indicatorColor,
39
41
  textColor: textColor,
40
- selectedTextColor: selectedTextColor
42
+ selectedTextColor: selectedTextColor,
43
+ variant: variant
41
44
  },
42
45
  children: /*#__PURE__*/_jsx(TabIndicatorProvider, {
43
46
  value: {
@@ -1 +1 @@
1
- {"version":3,"file":"TabList.js","names":["forwardRef","useRef","TabList","TabListCore","Box","TabIndicatorProvider","TabListProvider","TabListInner","props","forwardedRef","innerAs","otherProps","minWidth","display","alignItems","as","indicatorColor","textColor","selectedTextColor","currentIndicator"],"sources":["../../../src/Tab/TabList.tsx"],"sourcesContent":["import { forwardRef, useRef } from 'react';\nimport type { TabListProps as TabListPropsCore } from '@basic-ui/core';\nimport { TabList as TabListCore } from '@basic-ui/core';\nimport { rem } from 'polished';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { TabIndicatorProvider } from '../TabIndicator';\nimport { TabListProvider } from './context';\n\nexport type TabListProps = TabListPropsCore &\n BoxProps & {\n indicatorColor?: string;\n textColor?: string;\n selectedTextColor?: string;\n };\n\nconst TabListInner = forwardRef<HTMLDivElement, TabListProps>(\n function TabListInner(props, forwardedRef) {\n const { innerAs, ...otherProps } = props;\n\n return (\n <Box\n as={innerAs}\n ref={forwardedRef}\n __css={{ minWidth: rem(360), display: 'flex', alignItems: 'center' }}\n {...otherProps}\n />\n );\n }\n);\n\nexport const TabList = forwardRef<HTMLDivElement, TabListProps>(\n function TabList(props, forwardedRef) {\n const {\n as = 'div',\n indicatorColor = 'primary',\n textColor = 'on.surface',\n selectedTextColor,\n ...otherProps\n } = props;\n const currentIndicator = useRef<HTMLSpanElement>(null);\n\n return (\n <TabListProvider value={{ indicatorColor, textColor, selectedTextColor }}>\n <TabIndicatorProvider value={{ currentIndicator }}>\n <TabListCore\n as={TabListInner}\n innerAs={as}\n ref={forwardedRef}\n {...otherProps}\n />\n </TabIndicatorProvider>\n </TabListProvider>\n );\n }\n);\n"],"mappings":";;;;AAAA,SAASA,UAAT,EAAqBC,MAArB,QAAmC,OAAnC;AAEA,SAASC,OAAO,IAAIC,WAApB,QAAuC,gBAAvC;AAIA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,oBAAT,QAAqC,iBAArC;AACA,SAASC,eAAT,QAAgC,WAAhC;;AASA,IAAMC,YAAY,gBAAGP,UAAU,CAC7B,SAASO,YAAT,CAAsBC,KAAtB,EAA6BC,YAA7B,EAA2C;EACzC,IAAQC,OAAR,GAAmCF,KAAnC,CAAQE,OAAR;EAAA,IAAoBC,UAApB,4BAAmCH,KAAnC;;EAEA,oBACE,KAAC,GAAD;IACE,EAAE,EAAEE,OADN;IAEE,GAAG,EAAED,YAFP;IAGE,KAAK,EAAE;MAAEG,QAAQ,WAAV;MAAsBC,OAAO,EAAE,MAA/B;MAAuCC,UAAU,EAAE;IAAnD;EAHT,GAIMH,UAJN,EADF;AAQD,CAZ4B,CAA/B;AAeA,OAAO,IAAMT,OAAO,gBAAGF,UAAU,CAC/B,SAASE,OAAT,CAAiBM,KAAjB,EAAwBC,YAAxB,EAAsC;EACpC,gBAMID,KANJ,CACEO,EADF;EAAA,IACEA,EADF,0BACO,KADP;EAAA,4BAMIP,KANJ,CAEEQ,cAFF;EAAA,IAEEA,cAFF,sCAEmB,SAFnB;EAAA,uBAMIR,KANJ,CAGES,SAHF;EAAA,IAGEA,SAHF,iCAGc,YAHd;EAAA,IAIEC,iBAJF,GAMIV,KANJ,CAIEU,iBAJF;EAAA,IAKKP,UALL,4BAMIH,KANJ;;EAOA,IAAMW,gBAAgB,GAAGlB,MAAM,CAAkB,IAAlB,CAA/B;EAEA,oBACE,KAAC,eAAD;IAAiB,KAAK,EAAE;MAAEe,cAAc,EAAdA,cAAF;MAAkBC,SAAS,EAATA,SAAlB;MAA6BC,iBAAiB,EAAjBA;IAA7B,CAAxB;IAAA,uBACE,KAAC,oBAAD;MAAsB,KAAK,EAAE;QAAEC,gBAAgB,EAAhBA;MAAF,CAA7B;MAAA,uBACE,KAAC,WAAD;QACE,EAAE,EAAEZ,YADN;QAEE,OAAO,EAAEQ,EAFX;QAGE,GAAG,EAAEN;MAHP,GAIME,UAJN;IADF;EADF,EADF;AAYD,CAvB8B,CAA1B"}
1
+ {"version":3,"file":"TabList.js","names":["forwardRef","useRef","TabList","TabListCore","Box","TabIndicatorProvider","TabListProvider","TabListInner","props","forwardedRef","innerAs","otherProps","minWidth","display","alignItems","as","indicatorColor","textColor","selectedTextColor","variant","currentIndicator"],"sources":["../../../src/Tab/TabList.tsx"],"sourcesContent":["import { forwardRef, useRef } from 'react';\nimport type { TabListProps as TabListPropsCore } from '@basic-ui/core';\nimport { TabList as TabListCore } from '@basic-ui/core';\nimport { rem } from 'polished';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { TabIndicatorProvider } from '../TabIndicator';\nimport { TabListProvider } from './context';\n\nexport type TabListProps = TabListPropsCore &\n BoxProps & {\n indicatorColor?: string;\n textColor?: string;\n selectedTextColor?: string;\n variant?: 'primary' | 'secondary';\n };\n\nconst TabListInner = forwardRef<HTMLDivElement, TabListProps>(\n function TabListInner(props, forwardedRef) {\n const { innerAs, ...otherProps } = props;\n\n return (\n <Box\n as={innerAs}\n ref={forwardedRef}\n __css={{ minWidth: rem(360), display: 'flex', alignItems: 'center' }}\n {...otherProps}\n />\n );\n }\n);\n\nexport const TabList = forwardRef<HTMLDivElement, TabListProps>(\n function TabList(props, forwardedRef) {\n const {\n as = 'div',\n indicatorColor = 'primary',\n textColor = 'on.surface',\n selectedTextColor,\n variant = 'secondary',\n ...otherProps\n } = props;\n const currentIndicator = useRef<HTMLSpanElement>(null);\n\n return (\n <TabListProvider\n value={{ indicatorColor, textColor, selectedTextColor, variant }}\n >\n <TabIndicatorProvider value={{ currentIndicator }}>\n <TabListCore\n as={TabListInner}\n innerAs={as}\n ref={forwardedRef}\n {...otherProps}\n />\n </TabIndicatorProvider>\n </TabListProvider>\n );\n }\n);\n"],"mappings":";;;;AAAA,SAASA,UAAT,EAAqBC,MAArB,QAAmC,OAAnC;AAEA,SAASC,OAAO,IAAIC,WAApB,QAAuC,gBAAvC;AAIA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,oBAAT,QAAqC,iBAArC;AACA,SAASC,eAAT,QAAgC,WAAhC;;AAUA,IAAMC,YAAY,gBAAGP,UAAU,CAC7B,SAASO,YAAT,CAAsBC,KAAtB,EAA6BC,YAA7B,EAA2C;EACzC,IAAQC,OAAR,GAAmCF,KAAnC,CAAQE,OAAR;EAAA,IAAoBC,UAApB,4BAAmCH,KAAnC;;EAEA,oBACE,KAAC,GAAD;IACE,EAAE,EAAEE,OADN;IAEE,GAAG,EAAED,YAFP;IAGE,KAAK,EAAE;MAAEG,QAAQ,WAAV;MAAsBC,OAAO,EAAE,MAA/B;MAAuCC,UAAU,EAAE;IAAnD;EAHT,GAIMH,UAJN,EADF;AAQD,CAZ4B,CAA/B;AAeA,OAAO,IAAMT,OAAO,gBAAGF,UAAU,CAC/B,SAASE,OAAT,CAAiBM,KAAjB,EAAwBC,YAAxB,EAAsC;EACpC,gBAOID,KAPJ,CACEO,EADF;EAAA,IACEA,EADF,0BACO,KADP;EAAA,4BAOIP,KAPJ,CAEEQ,cAFF;EAAA,IAEEA,cAFF,sCAEmB,SAFnB;EAAA,uBAOIR,KAPJ,CAGES,SAHF;EAAA,IAGEA,SAHF,iCAGc,YAHd;EAAA,IAIEC,iBAJF,GAOIV,KAPJ,CAIEU,iBAJF;EAAA,qBAOIV,KAPJ,CAKEW,OALF;EAAA,IAKEA,OALF,+BAKY,WALZ;EAAA,IAMKR,UANL,4BAOIH,KAPJ;;EAQA,IAAMY,gBAAgB,GAAGnB,MAAM,CAAkB,IAAlB,CAA/B;EAEA,oBACE,KAAC,eAAD;IACE,KAAK,EAAE;MAAEe,cAAc,EAAdA,cAAF;MAAkBC,SAAS,EAATA,SAAlB;MAA6BC,iBAAiB,EAAjBA,iBAA7B;MAAgDC,OAAO,EAAPA;IAAhD,CADT;IAAA,uBAGE,KAAC,oBAAD;MAAsB,KAAK,EAAE;QAAEC,gBAAgB,EAAhBA;MAAF,CAA7B;MAAA,uBACE,KAAC,WAAD;QACE,EAAE,EAAEb,YADN;QAEE,OAAO,EAAEQ,EAFX;QAGE,GAAG,EAAEN;MAHP,GAIME,UAJN;IADF;EAHF,EADF;AAcD,CA1B8B,CAA1B"}
@@ -3,6 +3,7 @@ export interface TabListContextProps {
3
3
  indicatorColor: string;
4
4
  textColor: string;
5
5
  selectedTextColor?: string;
6
+ variant: 'primary' | 'secondary';
6
7
  }
7
8
  export declare const TabListProvider: import("react").Provider<TabListContextProps>;
8
9
  export declare const useTabListContext: () => TabListContextProps;
@@ -2,7 +2,8 @@ import { createContext, useContext } from 'react'; // TabList Component
2
2
 
3
3
  var TabListContext = /*#__PURE__*/createContext({
4
4
  indicatorColor: 'primary',
5
- textColor: 'on.surface'
5
+ textColor: 'on.surface',
6
+ variant: 'secondary'
6
7
  });
7
8
  var TabListProvider = TabListContext.Provider;
8
9
  export { TabListProvider };
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","names":["createContext","useContext","TabListContext","indicatorColor","textColor","TabListProvider","Provider","useTabListContext"],"sources":["../../../src/Tab/context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\n// TabList Component\nexport interface TabListContextProps {\n indicatorColor: string;\n textColor: string;\n selectedTextColor?: string;\n}\n\nconst TabListContext = createContext<TabListContextProps>({\n indicatorColor: 'primary',\n textColor: 'on.surface',\n});\nexport const { Provider: TabListProvider } = TabListContext;\nexport const useTabListContext = () => useContext(TabListContext);\n"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,UAAxB,QAA0C,OAA1C,C,CAEA;;AAOA,IAAMC,cAAc,gBAAGF,aAAa,CAAsB;EACxDG,cAAc,EAAE,SADwC;EAExDC,SAAS,EAAE;AAF6C,CAAtB,CAApC;AAIO,IAAkBC,eAAlB,GAAsCH,cAAtC,CAAQI,QAAR;;AACP,OAAO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB;EAAA,OAAMN,UAAU,CAACC,cAAD,CAAhB;AAAA,CAA1B"}
1
+ {"version":3,"file":"context.js","names":["createContext","useContext","TabListContext","indicatorColor","textColor","variant","TabListProvider","Provider","useTabListContext"],"sources":["../../../src/Tab/context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\n// TabList Component\nexport interface TabListContextProps {\n indicatorColor: string;\n textColor: string;\n selectedTextColor?: string;\n variant: 'primary' | 'secondary';\n}\n\nconst TabListContext = createContext<TabListContextProps>({\n indicatorColor: 'primary',\n textColor: 'on.surface',\n variant: 'secondary',\n});\nexport const { Provider: TabListProvider } = TabListContext;\nexport const useTabListContext = () => useContext(TabListContext);\n"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,UAAxB,QAA0C,OAA1C,C,CAEA;;AAQA,IAAMC,cAAc,gBAAGF,aAAa,CAAsB;EACxDG,cAAc,EAAE,SADwC;EAExDC,SAAS,EAAE,YAF6C;EAGxDC,OAAO,EAAE;AAH+C,CAAtB,CAApC;AAKO,IAAkBC,eAAlB,GAAsCJ,cAAtC,CAAQK,QAAR;;AACP,OAAO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB;EAAA,OAAMP,UAAU,CAACC,cAAD,CAAhB;AAAA,CAA1B"}
@@ -1,7 +1,9 @@
1
- /// <reference types="react" />
1
+ import type { RefObject } from 'react';
2
2
  import type { BoxProps } from '../Box';
3
3
  export interface TabIndicatorProps extends BoxProps {
4
4
  selected?: boolean;
5
5
  color?: string;
6
+ variant: 'primary' | 'secondary';
7
+ labelRef: RefObject<HTMLParagraphElement | null>;
6
8
  }
7
- export declare const TabIndicator: import("react").ForwardRefExoticComponent<Pick<TabIndicatorProps, "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "backgroundImage" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "bottom" | "color" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflowX" | "overflowY" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textShadow" | "top" | "translate" | "verticalAlign" | "width" | "background" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bg" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "variant" | "size" | "hidden" | "as" | "sx" | "__css" | "tx" | "theme" | "borderX" | "borderY" | "gridGap" | "gridColumnGap" | "gridRowGap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "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" | "selected"> & import("react").RefAttributes<HTMLDivElement>>;
9
+ export declare const TabIndicator: import("react").ForwardRefExoticComponent<Pick<TabIndicatorProps, "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" | "selected" | "labelRef"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,12 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["as", "selected", "color"];
4
+ var _excluded = ["as", "selected", "color", "variant", "labelRef"];
4
5
  import { forwardRef, useEffect, useRef, useLayoutEffect } from 'react';
5
6
  import { assignMultipleRefs } from '@basic-ui/core';
6
7
  import { Box } from '../Box';
7
8
  import { useTabIndicatorContext } from './context';
8
9
  import { EASING_STANDARD } from '../motion';
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
+ var WIDTH_PROPERTY_NAME = '--indicator-width';
12
+ var SCALE_PROPERTY_NAME = '--indicator-scale';
10
13
  var useEnhancedEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
11
14
  export var TabIndicator = /*#__PURE__*/forwardRef(function TabIndicator(props, forwardedRef) {
12
15
  var _props$as = props.as,
@@ -14,6 +17,8 @@ export var TabIndicator = /*#__PURE__*/forwardRef(function TabIndicator(props, f
14
17
  selected = props.selected,
15
18
  _props$color = props.color,
16
19
  color = _props$color === void 0 ? 'primary' : _props$color,
20
+ variant = props.variant,
21
+ labelRef = props.labelRef,
17
22
  otherProps = _objectWithoutProperties(props, _excluded);
18
23
 
19
24
  var ref = useRef(null);
@@ -21,43 +26,104 @@ export var TabIndicator = /*#__PURE__*/forwardRef(function TabIndicator(props, f
21
26
  var _useTabIndicatorConte = useTabIndicatorContext(),
22
27
  currentIndicator = _useTabIndicatorConte.currentIndicator;
23
28
 
29
+ var resizeObserverRef = useRef();
24
30
  useEnhancedEffect(function () {
25
31
  if (selected && ref.current) {
26
32
  if (currentIndicator.current !== null) {
27
33
  // We are switching indicator, let's slide!
28
34
  var previousClientRect = currentIndicator.current.getBoundingClientRect();
29
35
  var currentClientRect = ref.current.getBoundingClientRect();
30
- var widthDelta = previousClientRect.width / currentClientRect.width;
31
36
  var xPosition = previousClientRect.left - currentClientRect.left;
32
37
  var prevTransition = ref.current.style.transition;
33
38
  var prevTransform = ref.current.style.transform;
34
39
  ref.current.style.transition = 'none';
35
- ref.current.style.transform = "translateX(".concat(xPosition, "px) scaleX(").concat(widthDelta, ")"); // Force repaint before updating classes and transform to ensure the transform properly takes effect
40
+
41
+ if (variant === 'primary') {
42
+ var prevWidth = currentIndicator.current.style.getPropertyValue(WIDTH_PROPERTY_NAME);
43
+ var currentWidth = ref.current.style.getPropertyValue(WIDTH_PROPERTY_NAME);
44
+ var widthDelta = String(parseFloat(prevWidth) / parseFloat(currentWidth));
45
+ ref.current.style.setProperty(SCALE_PROPERTY_NAME, widthDelta);
46
+ ref.current.style.transform = "translateX(".concat(xPosition, "px)");
47
+ } else {
48
+ var _widthDelta = previousClientRect.width / currentClientRect.width;
49
+
50
+ ref.current.style.transform = "translateX(".concat(xPosition, "px) scaleX(").concat(_widthDelta, ")");
51
+ } // Force repaint before updating classes and transform to ensure the transform properly takes effect
52
+
36
53
 
37
54
  ref.current.getBoundingClientRect(); // Restore and let transition do it's magic
38
55
 
39
56
  ref.current.style.transition = prevTransition;
40
57
  ref.current.style.transform = prevTransform;
58
+
59
+ if (variant === 'primary') {
60
+ ref.current.style.setProperty(SCALE_PROPERTY_NAME, '1');
61
+ }
41
62
  }
42
63
 
43
64
  currentIndicator.current = ref.current;
44
65
  }
45
- }, [selected]);
66
+ }, [selected, variant]);
67
+ useEffect(function () {
68
+ if (variant === 'secondary') {
69
+ return;
70
+ }
71
+
72
+ if (labelRef.current && ref.current) {
73
+ var width = labelRef.current.getBoundingClientRect().width;
74
+ ref.current.style.setProperty(WIDTH_PROPERTY_NAME, "".concat(width, "px"));
75
+
76
+ if (typeof ResizeObserver === 'function') {
77
+ var _resizeObserverRef$cu, _resizeObserverRef$cu2;
78
+
79
+ (_resizeObserverRef$cu = resizeObserverRef.current) !== null && _resizeObserverRef$cu !== void 0 ? _resizeObserverRef$cu : resizeObserverRef.current = new ResizeObserver(function (_ref) {
80
+ var _ref2 = _slicedToArray(_ref, 1),
81
+ entry = _ref2[0];
82
+
83
+ if (ref.current) {
84
+ ref.current.style.setProperty(WIDTH_PROPERTY_NAME, "".concat(entry.contentRect.width, "px"));
85
+ }
86
+ });
87
+ (_resizeObserverRef$cu2 = resizeObserverRef.current) === null || _resizeObserverRef$cu2 === void 0 ? void 0 : _resizeObserverRef$cu2.observe(labelRef.current);
88
+ return function () {
89
+ var _resizeObserverRef$cu3;
90
+
91
+ return (_resizeObserverRef$cu3 = resizeObserverRef.current) === null || _resizeObserverRef$cu3 === void 0 ? void 0 : _resizeObserverRef$cu3.disconnect();
92
+ };
93
+ }
94
+ }
95
+ }, [labelRef, variant]);
46
96
  return /*#__PURE__*/_jsx(Box, _extends({
47
97
  as: as,
48
98
  ref: assignMultipleRefs(ref, forwardedRef),
49
- width: "100%",
50
- height: "0.125rem",
51
- __css: {
99
+ __css: _extends({
52
100
  bg: color,
53
101
  position: 'absolute',
54
102
  bottom: 0,
55
103
  transform: "scale(1)",
56
104
  opacity: selected ? 1 : 0,
57
- transformOrigin: 'left',
58
105
  transition: "transform .25s ".concat(EASING_STANDARD),
59
106
  zIndex: 1
60
- }
107
+ }, variant === 'secondary' ? {
108
+ width: '100%',
109
+ height: "0.125rem"
110
+ } : {
111
+ width: '100%',
112
+ '&::before': {
113
+ content: '""',
114
+ width: "var(".concat(WIDTH_PROPERTY_NAME, ", 0px)"),
115
+ height: "0.1875rem",
116
+ borderTopLeftRadius: "0.1875rem",
117
+ borderTopRightRadius: "0.1875rem",
118
+ bg: color,
119
+ position: 'absolute',
120
+ transformOrigin: 'center',
121
+ bottom: 0,
122
+ left: '50%',
123
+ transition: "inherit",
124
+ transform: "translateX(-50%) scaleX(var(".concat(SCALE_PROPERTY_NAME, ", 1))}")
125
+ }
126
+ })
61
127
  }, otherProps));
62
128
  });
63
129
  //# sourceMappingURL=TabIndicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabIndicator.js","names":["forwardRef","useEffect","useRef","useLayoutEffect","assignMultipleRefs","Box","useTabIndicatorContext","EASING_STANDARD","useEnhancedEffect","window","TabIndicator","props","forwardedRef","as","selected","color","otherProps","ref","currentIndicator","current","previousClientRect","getBoundingClientRect","currentClientRect","widthDelta","width","xPosition","left","prevTransition","style","transition","prevTransform","transform","bg","position","bottom","opacity","transformOrigin","zIndex"],"sources":["../../../src/TabIndicator/TabIndicator.tsx"],"sourcesContent":["import { forwardRef, useEffect, useRef, useLayoutEffect } from 'react';\nimport { rem } from 'polished';\nimport { assignMultipleRefs } from '@basic-ui/core';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { useTabIndicatorContext } from './context';\nimport { EASING_STANDARD } from '../motion';\n\nexport interface TabIndicatorProps extends BoxProps {\n selected?: boolean;\n color?: string;\n}\n\nconst useEnhancedEffect =\n typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n\nexport const TabIndicator = forwardRef<HTMLDivElement, TabIndicatorProps>(\n function TabIndicator(props, forwardedRef) {\n const { as = 'span', selected, color = 'primary', ...otherProps } = props;\n const ref = useRef<HTMLSpanElement>(null);\n const { currentIndicator } = useTabIndicatorContext();\n\n useEnhancedEffect(() => {\n if (selected && ref.current) {\n if (currentIndicator.current !== null) {\n // We are switching indicator, let's slide!\n const previousClientRect =\n currentIndicator.current.getBoundingClientRect();\n const currentClientRect = ref.current.getBoundingClientRect();\n const widthDelta = previousClientRect.width / currentClientRect.width;\n const xPosition = previousClientRect.left - currentClientRect.left;\n\n const prevTransition = ref.current.style.transition;\n const prevTransform = ref.current.style.transform;\n ref.current.style.transition = 'none';\n ref.current.style.transform = `translateX(${xPosition}px) scaleX(${widthDelta})`;\n\n // Force repaint before updating classes and transform to ensure the transform properly takes effect\n ref.current.getBoundingClientRect();\n\n // Restore and let transition do it's magic\n ref.current.style.transition = prevTransition;\n ref.current.style.transform = prevTransform;\n }\n currentIndicator.current = ref.current;\n }\n }, [selected]);\n\n return (\n <Box\n as={as}\n ref={assignMultipleRefs(ref, forwardedRef)}\n width=\"100%\"\n height={rem(2)}\n __css={{\n bg: color,\n position: 'absolute',\n bottom: 0,\n transform: `scale(1)`,\n opacity: selected ? 1 : 0,\n transformOrigin: 'left',\n transition: `transform .25s ${EASING_STANDARD}`,\n zIndex: 1,\n }}\n {...otherProps}\n />\n );\n }\n);\n"],"mappings":";;;AAAA,SAASA,UAAT,EAAqBC,SAArB,EAAgCC,MAAhC,EAAwCC,eAAxC,QAA+D,OAA/D;AAEA,SAASC,kBAAT,QAAmC,gBAAnC;AAGA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,sBAAT,QAAuC,WAAvC;AACA,SA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E,OAAJ,CAAYS,KAAZ,CAAkBG,SAAlB,wBAA4CN,SAA5C,wBAAmEF,UAAnE,OAXqC,CAarC;;QACAN,GAAG,CAACE,OAAJ,CAAYE,qBAAZ,GAdqC,CAgBrC;;QACAJ,GAAG,CAACE,OAAJ,CAAYS,KAAZ,CAAkBC,UAAlB,GAA+BF,cAA/B;QACAV,GAAG,CAACE,OAAJ,CAAYS,KAAZ,CAAkBG,SAAlB,GAA8BD,aAA9B;MACD;;MACDZ,gBAAgB,CAACC,OAAjB,GAA2BF,GAAG,CAACE,OAA/B;IACD;EACF,CAxBgB,EAwBd,CAACL,QAAD,CAxBc,CAAjB;EA0BA,oBACE,KAAC,GAAD;IACE,EAAE,EAAED,EADN;IAEE,GAAG,EAAET,kBAAkB,CAACa,GAAD,EAAML,YAAN,CAFzB;IAGE,KAAK,EAAC,MAHR;IAIE,MAAM,YAJR;IAKE,KAAK,EAAE;MACLoB,EAAE,EAAEjB,KADC;MAELkB,QAAQ,EAAE,UAFL;MAGLC,MAAM,EAAE,CAHH;MAILH,SAAS,YAJJ;MAKLI,OAAO,EAAErB,QAAQ,GAAG,CAAH,GAAO,CALnB;MAMLsB,eAAe,EAAE,MANZ;MAOLP,UAAU,2BAAoBtB,eAApB,CAPL;MAQL8B,MAAM,EAAE;IARH;EALT,GAeMrB,UAfN,EADF;AAmBD,CAnDmC,CAA/B"}
1
+ {"version":3,"file":"TabIndicator.js","names":["forwardRef","useEffect","useRef","useLayoutEffect","assignMultipleRefs","Box","useTabIndicatorContext","EASING_STANDARD","WIDTH_PROPERTY_NAME","SCALE_PROPERTY_NAME","useEnhancedEffect","window","TabIndicator","props","forwardedRef","as","selected","color","variant","labelRef","otherProps","ref","currentIndicator","resizeObserverRef","current","previousClientRect","getBoundingClientRect","currentClientRect","xPosition","left","prevTransition","style","transition","prevTransform","transform","prevWidth","getPropertyValue","currentWidth","widthDelta","String","parseFloat","setProperty","width","ResizeObserver","entry","contentRect","observe","disconnect","bg","position","bottom","opacity","zIndex","height","content","borderTopLeftRadius","borderTopRightRadius","transformOrigin"],"sources":["../../../src/TabIndicator/TabIndicator.tsx"],"sourcesContent":["import type { RefObject } from 'react';\nimport { forwardRef, useEffect, useRef, useLayoutEffect } from 'react';\nimport { rem } from 'polished';\nimport { assignMultipleRefs } from '@basic-ui/core';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { useTabIndicatorContext } from './context';\nimport { EASING_STANDARD } from '../motion';\n\nexport interface TabIndicatorProps extends BoxProps {\n selected?: boolean;\n color?: string;\n variant: 'primary' | 'secondary';\n labelRef: RefObject<HTMLParagraphElement | null>;\n}\n\nconst WIDTH_PROPERTY_NAME = '--indicator-width';\nconst SCALE_PROPERTY_NAME = '--indicator-scale';\n\nconst useEnhancedEffect =\n typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n\nexport const TabIndicator = forwardRef<HTMLDivElement, TabIndicatorProps>(\n function TabIndicator(props, forwardedRef) {\n const {\n as = 'span',\n selected,\n color = 'primary',\n variant,\n labelRef,\n ...otherProps\n } = props;\n const ref = useRef<HTMLSpanElement>(null);\n const { currentIndicator } = useTabIndicatorContext();\n const resizeObserverRef = useRef<ResizeObserver>();\n\n useEnhancedEffect(() => {\n if (selected && ref.current) {\n if (currentIndicator.current !== null) {\n // We are switching indicator, let's slide!\n const previousClientRect =\n currentIndicator.current.getBoundingClientRect();\n const currentClientRect = ref.current.getBoundingClientRect();\n const xPosition = previousClientRect.left - currentClientRect.left;\n\n const prevTransition = ref.current.style.transition;\n const prevTransform = ref.current.style.transform;\n ref.current.style.transition = 'none';\n if (variant === 'primary') {\n const prevWidth =\n currentIndicator.current.style.getPropertyValue(\n WIDTH_PROPERTY_NAME\n );\n const currentWidth =\n ref.current.style.getPropertyValue(WIDTH_PROPERTY_NAME);\n const widthDelta = String(\n parseFloat(prevWidth) / parseFloat(currentWidth)\n );\n ref.current.style.setProperty(SCALE_PROPERTY_NAME, widthDelta);\n ref.current.style.transform = `translateX(${xPosition}px)`;\n } else {\n const widthDelta =\n previousClientRect.width / currentClientRect.width;\n ref.current.style.transform = `translateX(${xPosition}px) scaleX(${widthDelta})`;\n }\n\n // Force repaint before updating classes and transform to ensure the transform properly takes effect\n ref.current.getBoundingClientRect();\n\n // Restore and let transition do it's magic\n ref.current.style.transition = prevTransition;\n ref.current.style.transform = prevTransform;\n if (variant === 'primary') {\n ref.current.style.setProperty(SCALE_PROPERTY_NAME, '1');\n }\n }\n currentIndicator.current = ref.current;\n }\n }, [selected, variant]);\n\n useEffect(() => {\n if (variant === 'secondary') {\n return;\n }\n\n if (labelRef.current && ref.current) {\n const width = labelRef.current.getBoundingClientRect().width;\n ref.current.style.setProperty(WIDTH_PROPERTY_NAME, `${width}px`);\n\n if (typeof ResizeObserver === 'function') {\n resizeObserverRef.current ??= new ResizeObserver(([entry]) => {\n if (ref.current) {\n ref.current.style.setProperty(\n WIDTH_PROPERTY_NAME,\n `${entry.contentRect.width}px`\n );\n }\n });\n\n resizeObserverRef.current?.observe(labelRef.current);\n return () => resizeObserverRef.current?.disconnect();\n }\n }\n }, [labelRef, variant]);\n\n return (\n <Box\n as={as}\n ref={assignMultipleRefs(ref, forwardedRef)}\n __css={{\n bg: color,\n position: 'absolute',\n bottom: 0,\n transform: `scale(1)`,\n opacity: selected ? 1 : 0,\n transition: `transform .25s ${EASING_STANDARD}`,\n zIndex: 1,\n ...(variant === 'secondary'\n ? {\n width: '100%',\n height: rem(2),\n }\n : {\n width: '100%',\n '&::before': {\n content: '\"\"',\n width: `var(${WIDTH_PROPERTY_NAME}, 0px)`,\n height: rem(3),\n borderTopLeftRadius: rem(3),\n borderTopRightRadius: rem(3),\n bg: color,\n position: 'absolute',\n transformOrigin: 'center',\n bottom: 0,\n left: '50%',\n transition: `inherit`,\n transform: `translateX(-50%) scaleX(var(${SCALE_PROPERTY_NAME}, 1))}`,\n },\n }),\n }}\n {...otherProps}\n />\n );\n }\n);\n"],"mappings":";;;;AACA,SAASA,UAAT,EAAqBC,SAAr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YAAN,CAFzB;IAGE,KAAK;MACHkC,EAAE,EAAE/B,KADD;MAEHgC,QAAQ,EAAE,UAFP;MAGHC,MAAM,EAAE,CAHL;MAIHhB,SAAS,YAJN;MAKHiB,OAAO,EAAEnC,QAAQ,GAAG,CAAH,GAAO,CALrB;MAMHgB,UAAU,2BAAoBzB,eAApB,CANP;MAOH6C,MAAM,EAAE;IAPL,GAQClC,OAAO,KAAK,WAAZ,GACA;MACEwB,KAAK,EAAE,MADT;MAEEW,MAAM;IAFR,CADA,GAKA;MACEX,KAAK,EAAE,MADT;MAEE,aAAa;QACXY,OAAO,EAAE,IADE;QAEXZ,KAAK,gBAASlC,mBAAT,WAFM;QAGX6C,MAAM,aAHK;QAIXE,mBAAmB,aAJR;QAKXC,oBAAoB,aALT;QAMXR,EAAE,EAAE/B,KANO;QAOXgC,QAAQ,EAAE,UAPC;QAQXQ,eAAe,EAAE,QARN;QASXP,MAAM,EAAE,CATG;QAUXrB,IAAI,EAAE,KAVK;QAWXG,UAAU,WAXC;QAYXE,SAAS,wCAAiCzB,mBAAjC;MAZE;IAFf,CAbD;EAHP,GAkCMW,UAlCN,EADF;AAsCD,CAzHmC,CAA/B"}
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import type { TableBodyProps } from './TableBody';
3
3
  export declare type TableHeadProps = TableBodyProps;
4
- export declare const TableHead: import("react").ForwardRefExoticComponent<Pick<TableBodyProps, "translate" | "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>>> | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "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>>;
4
+ export declare const TableHead: import("react").ForwardRefExoticComponent<Pick<TableBodyProps, "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>>> | "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>>;