@basic-ui/material 1.0.0-alpha.30 → 1.0.0-alpha.32
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 +24 -5
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Chip/ButtonChip.d.ts +1 -1
- package/build/esm/Switch/Switch.d.ts +6 -2
- package/build/esm/Switch/Switch.js +17 -9
- package/build/esm/Switch/Switch.js.map +1 -1
- package/build/esm/Switch/styledComponents.js +7 -1
- package/build/esm/Switch/styledComponents.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/Switch/Switch.story.tsx +70 -13
- package/src/Switch/Switch.tsx +24 -6
- package/src/Switch/styledComponents.tsx +6 -0
|
@@ -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, "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>>> | "
|
|
9
|
+
export declare const ButtonChip: import("react").ForwardRefExoticComponent<Pick<ButtonChipProps, "slot" | "style" | "title" | "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>>> | "checked" | "disabled" | "placeholder" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "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" | "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" | "leadingIcon" | "trailingIcon"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import type { ElementType, InputHTMLAttributes } from 'react';
|
|
1
|
+
import type { ElementType, InputHTMLAttributes, ReactElement } from 'react';
|
|
2
2
|
import type { BoxProps } from '../Box';
|
|
3
3
|
export interface SwitchProps extends BoxProps<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>> {
|
|
4
4
|
as?: ElementType<any>;
|
|
5
5
|
checked?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
size?: 'small' | 'default';
|
|
8
|
+
icon?: ReactElement<{
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}>;
|
|
8
12
|
}
|
|
9
|
-
export declare const Switch: import("react").ForwardRefExoticComponent<Pick<SwitchProps, "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" | "
|
|
13
|
+
export declare const Switch: import("react").ForwardRefExoticComponent<Pick<SwitchProps, "form" | "p" | "slot" | "style" | "title" | "pattern" | "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" | "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" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "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" | "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" | "icon" | "key"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
var _excluded = ["as", "disabled", "checked", "onChange", "size", "__css", "icon"],
|
|
5
|
+
_excluded2 = ["as", "icon", "disabled", "children"];
|
|
6
|
+
import { cloneElement, forwardRef } from 'react';
|
|
7
7
|
import { CheckBox as _CheckBoxCore } from '@basic-ui/core';
|
|
8
8
|
import { rem } from 'polished';
|
|
9
9
|
import { RippleBox } from '../Ripple';
|
|
@@ -15,17 +15,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
var CheckBoxCore = _CheckBoxCore;
|
|
17
17
|
|
|
18
|
-
function getSizeCssVariables(size) {
|
|
19
|
-
var _ref;
|
|
18
|
+
function getSizeCssVariables(size, hasIcon) {
|
|
19
|
+
var _extends2, _ref;
|
|
20
20
|
|
|
21
21
|
var multiplier = size === 'small' ? 0.75 : 1;
|
|
22
22
|
var BORDER_WIDTH = 2;
|
|
23
23
|
var TRAIL_WIDTH = 52 * multiplier;
|
|
24
24
|
var TRAIL_HEIGHT = 32 * multiplier;
|
|
25
|
-
return
|
|
25
|
+
return _extends((_extends2 = {}, _defineProperty(_extends2, '--switch-border-width', rem(BORDER_WIDTH)), _defineProperty(_extends2, '--switch-trail-width', rem(TRAIL_WIDTH)), _defineProperty(_extends2, '--switch-trail-height', rem(TRAIL_HEIGHT)), _defineProperty(_extends2, '--switch-icon-size', rem(TRAIL_HEIGHT / 2)), _defineProperty(_extends2, '--switch-state-layer-size', rem(40 * multiplier)), _defineProperty(_extends2, '--switch-thumb-size-checked-inactive', rem(TRAIL_HEIGHT - BORDER_WIDTH * 4)), _defineProperty(_extends2, '--switch-thumb-size-checked-active', rem(TRAIL_HEIGHT - BORDER_WIDTH * 2)), _defineProperty(_extends2, '--switch-thumb-size-unchecked-inactive', rem(TRAIL_HEIGHT / 2)), _defineProperty(_extends2, '--switch-thumb-size-unchecked-active', rem(TRAIL_HEIGHT - BORDER_WIDTH * 2)), _extends2), hasIcon && (_ref = {}, _defineProperty(_ref, '--switch-thumb-size-unchecked-inactive', 'var(--switch-thumb-size-checked-inactive)'), _defineProperty(_ref, '--switch-thumb-size-unchecked-active', 'var(--switch-thumb-size-checked-active)'), _ref));
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
var SwitchInner = /*#__PURE__*/forwardRef(function SwitchInner(props, forwardedRef) {
|
|
29
|
+
var _cloneElement;
|
|
30
|
+
|
|
29
31
|
var _props$as = props.as,
|
|
30
32
|
Comp = _props$as === void 0 ? 'input' : _props$as,
|
|
31
33
|
disabled = props.disabled,
|
|
@@ -34,6 +36,7 @@ var SwitchInner = /*#__PURE__*/forwardRef(function SwitchInner(props, forwardedR
|
|
|
34
36
|
_props$size = props.size,
|
|
35
37
|
size = _props$size === void 0 ? 'default' : _props$size,
|
|
36
38
|
__css = props.__css,
|
|
39
|
+
icon = props.icon,
|
|
37
40
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
38
41
|
|
|
39
42
|
var color = checked ? 'primary' : 'on.surface';
|
|
@@ -42,7 +45,7 @@ var SwitchInner = /*#__PURE__*/forwardRef(function SwitchInner(props, forwardedR
|
|
|
42
45
|
display: "inline-block",
|
|
43
46
|
position: "relative",
|
|
44
47
|
minWidth: "auto",
|
|
45
|
-
sx: getSizeCssVariables(size),
|
|
48
|
+
sx: getSizeCssVariables(size, Boolean(icon)),
|
|
46
49
|
children: [/*#__PURE__*/_jsx(SwitchTrail, {
|
|
47
50
|
checked: checked,
|
|
48
51
|
disabled: disabled
|
|
@@ -82,7 +85,10 @@ var SwitchInner = /*#__PURE__*/forwardRef(function SwitchInner(props, forwardedR
|
|
|
82
85
|
position: 'absolute'
|
|
83
86
|
}, __css)
|
|
84
87
|
})), /*#__PURE__*/_jsx(SwitchCircle, {
|
|
85
|
-
checked: checked
|
|
88
|
+
checked: checked,
|
|
89
|
+
children: icon ? /*#__PURE__*/cloneElement(icon, (_cloneElement = {
|
|
90
|
+
checked: checked
|
|
91
|
+
}, _defineProperty(_cloneElement, 'data-checkbox-icon', ''), _defineProperty(_cloneElement, "disabled", disabled), _cloneElement)) : null
|
|
86
92
|
})]
|
|
87
93
|
})]
|
|
88
94
|
});
|
|
@@ -90,6 +96,7 @@ var SwitchInner = /*#__PURE__*/forwardRef(function SwitchInner(props, forwardedR
|
|
|
90
96
|
export var Switch = /*#__PURE__*/forwardRef(function Switch(props, forwardedRef) {
|
|
91
97
|
var _props$as2 = props.as,
|
|
92
98
|
as = _props$as2 === void 0 ? 'input' : _props$as2,
|
|
99
|
+
icon = props.icon,
|
|
93
100
|
disabled = props.disabled,
|
|
94
101
|
children = props.children,
|
|
95
102
|
otherProps = _objectWithoutProperties(props, _excluded2);
|
|
@@ -98,6 +105,7 @@ export var Switch = /*#__PURE__*/forwardRef(function Switch(props, forwardedRef)
|
|
|
98
105
|
as: SwitchInner,
|
|
99
106
|
innerAs: as,
|
|
100
107
|
ref: forwardedRef,
|
|
108
|
+
icon: icon,
|
|
101
109
|
disabled: disabled
|
|
102
110
|
}, otherProps));
|
|
103
111
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","names":["forwardRef","CheckBox","_CheckBoxCore","rem","RippleBox","Box","useTheme","SelectionControlLabel","SelectionControlText","SwitchTrail","SwitchThumb","SwitchCircle","CheckBoxCore","getSizeCssVariables","size","multiplier","BORDER_WIDTH","TRAIL_WIDTH","TRAIL_HEIGHT","SwitchInner","props","forwardedRef","as","Comp","disabled","checked","onChange","__css","otherProps","color","theme","top","left","backgroundColor","transform","width","height","appearance","outline","border","borderRadius","zIndex","position","Switch","children","inner"],"sources":["../../../src/Switch/Switch.tsx"],"sourcesContent":["import type { ElementType, FC, InputHTMLAttributes } from 'react';\nimport { forwardRef } from 'react';\nimport { CheckBox as _CheckBoxCore } from '@basic-ui/core';\nimport { rem } from 'polished';\n\nimport type { RippleBoxProps } from '../Ripple';\nimport { RippleBox } from '../Ripple';\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { useTheme } from '../theme';\nimport {\n SelectionControlLabel,\n SelectionControlText,\n} from '../SelectionControl';\nimport { SwitchTrail, SwitchThumb, SwitchCircle } from './styledComponents';\n\nconst CheckBoxCore: FC<\n SwitchProps & {\n innerAs?: ElementType<any>;\n }\n> = _CheckBoxCore as any;\n\nexport interface SwitchProps\n extends BoxProps<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>> {\n as?: ElementType<any>;\n checked?: boolean;\n disabled?: boolean;\n size?: 'small' | 'default';\n}\n\nfunction getSizeCssVariables(size: 'small' | 'default') {\n const multiplier = size === 'small' ? 0.75 : 1;\n const BORDER_WIDTH = 2;\n const TRAIL_WIDTH = 52 * multiplier;\n const TRAIL_HEIGHT = 32 * multiplier;\n return {\n ['--switch-border-width']: rem(BORDER_WIDTH),\n ['--switch-trail-width']: rem(TRAIL_WIDTH),\n ['--switch-trail-height']: rem(TRAIL_HEIGHT),\n ['--switch-state-layer-size']: rem(40 * multiplier),\n ['--switch-thumb-size-checked-inactive']: rem(\n TRAIL_HEIGHT - BORDER_WIDTH * 4\n ),\n ['--switch-thumb-size-checked-active']: rem(\n TRAIL_HEIGHT - BORDER_WIDTH * 2\n ),\n ['--switch-thumb-size-unchecked-inactive']: rem(TRAIL_HEIGHT / 2),\n ['--switch-thumb-size-unchecked-active']: rem(\n TRAIL_HEIGHT - BORDER_WIDTH * 2\n ),\n };\n}\n\nconst SwitchInner = forwardRef<HTMLInputElement, SwitchProps>(\n function SwitchInner(props, forwardedRef) {\n const {\n as: Comp = 'input',\n disabled,\n checked,\n onChange,\n size = 'default',\n __css,\n ...otherProps\n } = props;\n const color = checked ? 'primary' : 'on.surface';\n const theme = useTheme();\n\n return (\n <Box\n display=\"inline-block\"\n position=\"relative\"\n minWidth=\"auto\"\n sx={getSizeCssVariables(size)}\n >\n <SwitchTrail checked={checked} disabled={disabled} />\n <SwitchThumb checked={checked}>\n <RippleBox<\n RippleBoxProps<\n HTMLInputElement,\n InputHTMLAttributes<HTMLInputElement>\n >\n >\n as={Comp}\n role=\"switch\"\n type=\"checkbox\"\n checked={checked}\n onChange={onChange}\n theme={theme}\n ref={forwardedRef}\n aria-checked={checked ? 'true' : 'false'}\n rippleColor={color}\n baseOpacity={0}\n hoverOpacity={0.04}\n focusOpacity={0.12}\n center={true}\n disabled={disabled}\n data-switch-thumb=\"\"\n {...otherProps}\n __css={{\n top: '50%',\n left: '50%',\n backgroundColor: 'transparent',\n transform: 'translate(-50%, -50%)',\n width: '100%',\n height: '100%',\n appearance: 'none',\n ':focus': {\n outline: 'none',\n },\n border: 'none',\n borderRadius: 'full',\n zIndex: 1,\n position: 'absolute',\n ...__css,\n }}\n />\n <SwitchCircle checked={checked}
|
|
1
|
+
{"version":3,"file":"Switch.js","names":["cloneElement","forwardRef","CheckBox","_CheckBoxCore","rem","RippleBox","Box","useTheme","SelectionControlLabel","SelectionControlText","SwitchTrail","SwitchThumb","SwitchCircle","CheckBoxCore","getSizeCssVariables","size","hasIcon","multiplier","BORDER_WIDTH","TRAIL_WIDTH","TRAIL_HEIGHT","SwitchInner","props","forwardedRef","as","Comp","disabled","checked","onChange","__css","icon","otherProps","color","theme","Boolean","top","left","backgroundColor","transform","width","height","appearance","outline","border","borderRadius","zIndex","position","Switch","children","inner"],"sources":["../../../src/Switch/Switch.tsx"],"sourcesContent":["import type { ElementType, FC, InputHTMLAttributes, ReactElement } from 'react';\nimport { cloneElement, forwardRef } from 'react';\nimport { CheckBox as _CheckBoxCore } from '@basic-ui/core';\nimport { rem } from 'polished';\n\nimport type { RippleBoxProps } from '../Ripple';\nimport { RippleBox } from '../Ripple';\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { useTheme } from '../theme';\nimport {\n SelectionControlLabel,\n SelectionControlText,\n} from '../SelectionControl';\nimport { SwitchTrail, SwitchThumb, SwitchCircle } from './styledComponents';\n\nconst CheckBoxCore: FC<\n SwitchProps & {\n innerAs?: ElementType<any>;\n }\n> = _CheckBoxCore as any;\n\nexport interface SwitchProps\n extends BoxProps<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>> {\n as?: ElementType<any>;\n checked?: boolean;\n disabled?: boolean;\n size?: 'small' | 'default';\n icon?: ReactElement<{ checked?: boolean; disabled?: boolean }>;\n}\n\nfunction getSizeCssVariables(size: 'small' | 'default', hasIcon: boolean) {\n const multiplier = size === 'small' ? 0.75 : 1;\n const BORDER_WIDTH = 2;\n const TRAIL_WIDTH = 52 * multiplier;\n const TRAIL_HEIGHT = 32 * multiplier;\n return {\n ['--switch-border-width']: rem(BORDER_WIDTH),\n ['--switch-trail-width']: rem(TRAIL_WIDTH),\n ['--switch-trail-height']: rem(TRAIL_HEIGHT),\n ['--switch-icon-size']: rem(TRAIL_HEIGHT / 2),\n ['--switch-state-layer-size']: rem(40 * multiplier),\n ['--switch-thumb-size-checked-inactive']: rem(\n TRAIL_HEIGHT - BORDER_WIDTH * 4\n ),\n ['--switch-thumb-size-checked-active']: rem(\n TRAIL_HEIGHT - BORDER_WIDTH * 2\n ),\n ['--switch-thumb-size-unchecked-inactive']: rem(TRAIL_HEIGHT / 2),\n ['--switch-thumb-size-unchecked-active']: rem(\n TRAIL_HEIGHT - BORDER_WIDTH * 2\n ),\n ...(hasIcon && {\n ['--switch-thumb-size-unchecked-inactive']:\n 'var(--switch-thumb-size-checked-inactive)',\n ['--switch-thumb-size-unchecked-active']:\n 'var(--switch-thumb-size-checked-active)',\n }),\n };\n}\n\nconst SwitchInner = forwardRef<HTMLInputElement, SwitchProps>(\n function SwitchInner(props, forwardedRef) {\n const {\n as: Comp = 'input',\n disabled,\n checked,\n onChange,\n size = 'default',\n __css,\n icon,\n ...otherProps\n } = props;\n const color = checked ? 'primary' : 'on.surface';\n const theme = useTheme();\n\n return (\n <Box\n display=\"inline-block\"\n position=\"relative\"\n minWidth=\"auto\"\n sx={getSizeCssVariables(size, Boolean(icon))}\n >\n <SwitchTrail checked={checked} disabled={disabled} />\n <SwitchThumb checked={checked}>\n <RippleBox<\n RippleBoxProps<\n HTMLInputElement,\n InputHTMLAttributes<HTMLInputElement>\n >\n >\n as={Comp}\n role=\"switch\"\n type=\"checkbox\"\n checked={checked}\n onChange={onChange}\n theme={theme}\n ref={forwardedRef}\n aria-checked={checked ? 'true' : 'false'}\n rippleColor={color}\n baseOpacity={0}\n hoverOpacity={0.04}\n focusOpacity={0.12}\n center={true}\n disabled={disabled}\n data-switch-thumb=\"\"\n {...otherProps}\n __css={{\n top: '50%',\n left: '50%',\n backgroundColor: 'transparent',\n transform: 'translate(-50%, -50%)',\n width: '100%',\n height: '100%',\n appearance: 'none',\n ':focus': {\n outline: 'none',\n },\n border: 'none',\n borderRadius: 'full',\n zIndex: 1,\n position: 'absolute',\n ...__css,\n }}\n />\n <SwitchCircle checked={checked}>\n {icon\n ? cloneElement(icon, {\n checked,\n ['data-checkbox-icon' as any]: '',\n disabled,\n })\n : null}\n </SwitchCircle>\n </SwitchThumb>\n </Box>\n );\n }\n);\n\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>(function Switch(\n props,\n forwardedRef\n) {\n const { as = 'input', icon, disabled, children, ...otherProps } = props;\n\n const inner = (\n <CheckBoxCore\n as={SwitchInner}\n innerAs={as}\n ref={forwardedRef}\n icon={icon}\n disabled={disabled}\n {...otherProps}\n />\n );\n\n if (!children) {\n return inner;\n }\n\n return (\n <SelectionControlLabel>\n {inner}\n <SelectionControlText disabled={disabled}>\n {children}\n </SelectionControlText>\n </SelectionControlLabel>\n );\n});\n"],"mappings":";;;;;AACA,SAASA,YAAT,EAAuBC,UAAvB,QAAyC,OAAzC;AACA,SAASC,QAAQ,IAAIC,aAArB,QAA0C,gBAA1C;AACA,SAASC,GAAT,QAAoB,UAApB;AAGA,SAASC,SAAT,QAA0B,WAA1B;AAEA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,QAAT,QAAyB,UAAzB;AACA,SACEC,qBADF,EAEEC,oBAFF,QAGO,qBAHP;AAIA,SAASC,WAAT,EAAsBC,WAAtB,EAAmCC,YAAnC,QAAuD,oBAAvD;;;AAEA,IAAMC,YAIL,GAAGV,aAJJ;;AAeA,SAASW,mBAAT,CAA6BC,IAA7B,EAAwDC,OAAxD,EAA0E;EAAA;;EACxE,IAAMC,UAAU,GAAGF,IAAI,KAAK,OAAT,GAAmB,IAAnB,GAA0B,CAA7C;EACA,IAAMG,YAAY,GAAG,CAArB;EACA,IAAMC,WAAW,GAAG,KAAKF,UAAzB;EACA,IAAMG,YAAY,GAAG,KAAKH,UAA1B;EACA,4DACG,uBADH,EAC6Bb,GAAG,CAACc,YAAD,CADhC,8BAEG,sBAFH,EAE4Bd,GAAG,CAACe,WAAD,CAF/B,8BAGG,uBAHH,EAG6Bf,GAAG,CAACgB,YAAD,CAHhC,8BAIG,oBAJH,EAI0BhB,GAAG,CAACgB,YAAY,GAAG,CAAhB,CAJ7B,8BAKG,2BALH,EAKiChB,GAAG,CAAC,KAAKa,UAAN,CALpC,8BAMG,sCANH,EAM4Cb,GAAG,CAC3CgB,YAAY,GAAGF,YAAY,GAAG,CADa,CAN/C,8BASG,oCATH,EAS0Cd,GAAG,CACzCgB,YAAY,GAAGF,YAAY,GAAG,CADW,CAT7C,8BAYG,wCAZH,EAY8Cd,GAAG,CAACgB,YAAY,GAAG,CAAhB,CAZjD,8BAaG,sCAbH,EAa4ChB,GAA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,WADN;IAEE,OAAO,EAAEG,EAFX;IAGE,GAAG,EAAED,YAHP;IAIE,IAAI,EAAEO,IAJR;IAKE,QAAQ,EAAEJ;EALZ,GAMMK,UANN,EADF;;EAWA,IAAI,CAACiB,QAAL,EAAe;IACb,OAAOC,KAAP;EACD;;EAED,oBACE,MAAC,qBAAD;IAAA,WACGA,KADH,eAEE,KAAC,oBAAD;MAAsB,QAAQ,EAAEvB,QAAhC;MAAA,UACGsB;IADH,EAFF;EAAA,EADF;AAQD,CA7B+B,CAAzB"}
|
|
@@ -68,6 +68,9 @@ export var SwitchCircle = function SwitchCircle(_ref3) {
|
|
|
68
68
|
return /*#__PURE__*/_jsx(Box, _extends({
|
|
69
69
|
__css: {
|
|
70
70
|
position: 'absolute',
|
|
71
|
+
display: 'inline-flex',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
justifyContent: 'center',
|
|
71
74
|
width: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
72
75
|
height: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
73
76
|
boxSizing: 'border-box',
|
|
@@ -75,12 +78,14 @@ export var SwitchCircle = function SwitchCircle(_ref3) {
|
|
|
75
78
|
pointerEvents: 'none',
|
|
76
79
|
zIndex: 1,
|
|
77
80
|
backgroundColor: checked ? 'on.primary' : 'outline',
|
|
81
|
+
color: checked ? 'primary' : 'on.outline',
|
|
78
82
|
top: '50%',
|
|
79
83
|
left: '50%',
|
|
80
84
|
transform: 'translate(-50%, -50%)',
|
|
81
85
|
transition: 'inherit',
|
|
82
86
|
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &, [data-switch-thumb=""]:hover ~ &': {
|
|
83
|
-
backgroundColor: checked ? 'primary-container' : 'on.surface-variant'
|
|
87
|
+
backgroundColor: checked ? 'primary-container' : 'on.surface-variant',
|
|
88
|
+
color: checked ? 'on.primary-container' : 'surface-variant'
|
|
84
89
|
},
|
|
85
90
|
'[data-switch-thumb=""]:active ~ &, [data-switch-thumb=""]:focus-visible ~ &': {
|
|
86
91
|
height: checked ? CIRCLE_SIZE_ACTIVE_CHECKED : CIRCLE_SIZE_ACTIVE_UNCHECKED,
|
|
@@ -89,6 +94,7 @@ export var SwitchCircle = function SwitchCircle(_ref3) {
|
|
|
89
94
|
'[data-switch-thumb=""]:disabled ~ &': {
|
|
90
95
|
opacity: checked ? 1 : 0.38,
|
|
91
96
|
backgroundColor: checked ? 'surface' : 'on.surface',
|
|
97
|
+
color: checked ? 'on.surface' : 'surface',
|
|
92
98
|
height: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED,
|
|
93
99
|
width: checked ? CIRCLE_SIZE_INACTIVE_CHECKED : CIRCLE_SIZE_INACTIVE_UNCHECKED
|
|
94
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styledComponents.js","names":["Box","EASING_STANDARD","BORDER_WIDTH","TRAIL_WIDTH","TRAIL_HEIGHT","STATE_LAYER_SIZE","CIRCLE_SIZE_INACTIVE_CHECKED","CIRCLE_SIZE_ACTIVE_CHECKED","CIRCLE_SIZE_INACTIVE_UNCHECKED","CIRCLE_SIZE_ACTIVE_UNCHECKED","SwitchTrail","checked","disabled","otherProps","width","height","borderRadius","borderWidth","borderStyle","backgroundColor","borderColor","opacity","SwitchThumb","transform","WebkitTapHighlightColor","transition","SwitchCircle","position","boxSizing","pointerEvents","zIndex","top","left"],"sources":["../../../src/Switch/styledComponents.tsx"],"sourcesContent":["import { Box } from '../Box';\nimport { EASING_STANDARD } from '../motion';\n\nconst BORDER_WIDTH = 'var(--switch-border-width)';\nconst TRAIL_WIDTH = 'var(--switch-trail-width)';\nconst TRAIL_HEIGHT = 'var(--switch-trail-height)';\nconst STATE_LAYER_SIZE = 'var(--switch-state-layer-size)';\nconst CIRCLE_SIZE_INACTIVE_CHECKED =\n 'var(--switch-thumb-size-checked-inactive)';\nconst CIRCLE_SIZE_ACTIVE_CHECKED = 'var(--switch-thumb-size-checked-active)';\nconst CIRCLE_SIZE_INACTIVE_UNCHECKED =\n 'var(--switch-thumb-size-unchecked-inactive)';\nconst CIRCLE_SIZE_ACTIVE_UNCHECKED =\n 'var(--switch-thumb-size-unchecked-active)';\n\nexport const SwitchTrail = ({\n checked = false,\n disabled = false,\n ...otherProps\n}) => (\n <Box\n __css={{\n width: TRAIL_WIDTH,\n height: TRAIL_HEIGHT,\n borderRadius: 'full',\n borderWidth: BORDER_WIDTH,\n borderStyle: 'solid',\n backgroundColor: checked ? 'primary' : 'surface-variant',\n borderColor: checked ? 'primary' : 'outline',\n ...(disabled && {\n opacity: 0.12,\n backgroundColor: checked ? 'on.surface' : 'surface-variant',\n borderColor: 'on.surface',\n }),\n }}\n {...otherProps}\n />\n);\n\nexport const SwitchThumb = ({ checked = false, ...otherProps }) => (\n <Box\n position=\"absolute\"\n width={STATE_LAYER_SIZE}\n height={STATE_LAYER_SIZE}\n borderRadius=\"full\"\n left={'50%'}\n top={'50%'}\n __css={{\n transform: `translateX(calc(-50% ${checked ? '+' : '-'}\n (${TRAIL_WIDTH} - ${CIRCLE_SIZE_INACTIVE_CHECKED} - ${BORDER_WIDTH} * 4) / 2\n )) translateY(-50%)`,\n WebkitTapHighlightColor: 'transparent',\n transition: `background-color 90ms ${EASING_STANDARD},border-color 90ms ${EASING_STANDARD},transform 90ms ${EASING_STANDARD},height 90ms ${EASING_STANDARD},width 90ms ${EASING_STANDARD}`,\n '& > input': {\n width: STATE_LAYER_SIZE,\n height: STATE_LAYER_SIZE,\n },\n }}\n {...otherProps}\n />\n);\n\nexport const SwitchCircle = ({ checked = false, ...otherProps }) => (\n <Box\n __css={{\n position: 'absolute',\n width: checked\n ? CIRCLE_SIZE_INACTIVE_CHECKED\n : CIRCLE_SIZE_INACTIVE_UNCHECKED,\n height: checked\n ? CIRCLE_SIZE_INACTIVE_CHECKED\n : CIRCLE_SIZE_INACTIVE_UNCHECKED,\n boxSizing: 'border-box',\n borderRadius: 'full',\n pointerEvents: 'none',\n zIndex: 1,\n backgroundColor: checked ? 'on.primary' : 'outline',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n transition: 'inherit',\n '[data-switch-thumb=\"\"]:active ~ &, [data-switch-thumb=\"\"]:focus-visible ~ &, [data-switch-thumb=\"\"]:hover ~ &':\n {\n backgroundColor: checked ? 'primary-container' : 'on.surface-variant',\n },\n '[data-switch-thumb=\"\"]:active ~ &, [data-switch-thumb=\"\"]:focus-visible ~ &':\n {\n height: checked\n ? CIRCLE_SIZE_ACTIVE_CHECKED\n : CIRCLE_SIZE_ACTIVE_UNCHECKED,\n width: checked\n ? CIRCLE_SIZE_ACTIVE_CHECKED\n : CIRCLE_SIZE_ACTIVE_UNCHECKED,\n },\n '[data-switch-thumb=\"\"]:disabled ~ &': {\n opacity: checked ? 1 : 0.38,\n backgroundColor: checked ? 'surface' : 'on.surface',\n height: checked\n ? CIRCLE_SIZE_INACTIVE_CHECKED\n : CIRCLE_SIZE_INACTIVE_UNCHECKED,\n width: checked\n ? CIRCLE_SIZE_INACTIVE_CHECKED\n : CIRCLE_SIZE_INACTIVE_UNCHECKED,\n },\n }}\n data-switch-circle=\"\"\n role=\"presentation\"\n aria-hidden=\"true\"\n {...otherProps}\n />\n);\n"],"mappings":";;;;;AAAA,SAASA,GAAT,QAAoB,QAApB;AACA,SAASC,eAAT,QAAgC,WAAhC;;AAEA,IAAMC,YAAY,GAAG,4BAArB;AACA,IAAMC,WAAW,GAAG,2BAApB;AACA,IAAMC,YAAY,GAAG,4BAArB;AACA,IAAMC,gBAAgB,GAAG,gCAAzB;AACA,IAAMC,4BAA4B,GAChC,2CADF;AAEA,IAAMC,0BAA0B,GAAG,yCAAnC;AACA,IAAMC,8BAA8B,GAClC,6CADF;AAEA,IAAMC,4BAA4B,GAChC,2CADF;AAGA,OAAO,IAAMC,WAAW,GA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AuBP,OAAO,IAAMa,YAAY,GAAG,SAAfA,YAAe;EAAA,0BAAGf,OAAH;EAAA,IAAGA,OAAH,8BAAa,KAAb;EAAA,IAAuBE,UAAvB;;EAAA,oBAC1B,KAAC,GAAD;IACE,KAAK,EAAE;MACLc,QAAQ,EAAE,UADL;
|
|
1
|
+
{"version":3,"file":"styledComponents.js","names":["Box","EASING_STANDARD","BORDER_WIDTH","TRAIL_WIDTH","TRAIL_HEIGHT","STATE_LAYER_SIZE","CIRCLE_SIZE_INACTIVE_CHECKED","CIRCLE_SIZE_ACTIVE_CHECKED","CIRCLE_SIZE_INACTIVE_UNCHECKED","CIRCLE_SIZE_ACTIVE_UNCHECKED","SwitchTrail","checked","disabled","otherProps","width","height","borderRadius","borderWidth","borderStyle","backgroundColor","borderColor","opacity","SwitchThumb","transform","WebkitTapHighlightColor","transition","SwitchCircle","position","display","alignItems","justifyContent","boxSizing","pointerEvents","zIndex","color","top","left"],"sources":["../../../src/Switch/styledComponents.tsx"],"sourcesContent":["import { Box } from '../Box';\nimport { EASING_STANDARD } from '../motion';\n\nconst BORDER_WIDTH = 'var(--switch-border-width)';\nconst TRAIL_WIDTH = 'var(--switch-trail-width)';\nconst TRAIL_HEIGHT = 'var(--switch-trail-height)';\nconst STATE_LAYER_SIZE = 'var(--switch-state-layer-size)';\nconst CIRCLE_SIZE_INACTIVE_CHECKED =\n 'var(--switch-thumb-size-checked-inactive)';\nconst CIRCLE_SIZE_ACTIVE_CHECKED = 'var(--switch-thumb-size-checked-active)';\nconst CIRCLE_SIZE_INACTIVE_UNCHECKED =\n 'var(--switch-thumb-size-unchecked-inactive)';\nconst CIRCLE_SIZE_ACTIVE_UNCHECKED =\n 'var(--switch-thumb-size-unchecked-active)';\n\nexport const SwitchTrail = ({\n checked = false,\n disabled = false,\n ...otherProps\n}) => (\n <Box\n __css={{\n width: TRAIL_WIDTH,\n height: TRAIL_HEIGHT,\n borderRadius: 'full',\n borderWidth: BORDER_WIDTH,\n borderStyle: 'solid',\n backgroundColor: checked ? 'primary' : 'surface-variant',\n borderColor: checked ? 'primary' : 'outline',\n ...(disabled && {\n opacity: 0.12,\n backgroundColor: checked ? 'on.surface' : 'surface-variant',\n borderColor: 'on.surface',\n }),\n }}\n {...otherProps}\n />\n);\n\nexport const SwitchThumb = ({ checked = false, ...otherProps }) => (\n <Box\n position=\"absolute\"\n width={STATE_LAYER_SIZE}\n height={STATE_LAYER_SIZE}\n borderRadius=\"full\"\n left={'50%'}\n top={'50%'}\n __css={{\n transform: `translateX(calc(-50% ${checked ? '+' : '-'}\n (${TRAIL_WIDTH} - ${CIRCLE_SIZE_INACTIVE_CHECKED} - ${BORDER_WIDTH} * 4) / 2\n )) translateY(-50%)`,\n WebkitTapHighlightColor: 'transparent',\n transition: `background-color 90ms ${EASING_STANDARD},border-color 90ms ${EASING_STANDARD},transform 90ms ${EASING_STANDARD},height 90ms ${EASING_STANDARD},width 90ms ${EASING_STANDARD}`,\n '& > input': {\n width: STATE_LAYER_SIZE,\n height: STATE_LAYER_SIZE,\n },\n }}\n {...otherProps}\n />\n);\n\nexport const SwitchCircle = ({ checked = false, ...otherProps }) => (\n <Box\n __css={{\n position: 'absolute',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: checked\n ? CIRCLE_SIZE_INACTIVE_CHECKED\n : CIRCLE_SIZE_INACTIVE_UNCHECKED,\n height: checked\n ? CIRCLE_SIZE_INACTIVE_CHECKED\n : CIRCLE_SIZE_INACTIVE_UNCHECKED,\n boxSizing: 'border-box',\n borderRadius: 'full',\n pointerEvents: 'none',\n zIndex: 1,\n backgroundColor: checked ? 'on.primary' : 'outline',\n color: checked ? 'primary' : 'on.outline',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n transition: 'inherit',\n '[data-switch-thumb=\"\"]:active ~ &, [data-switch-thumb=\"\"]:focus-visible ~ &, [data-switch-thumb=\"\"]:hover ~ &':\n {\n backgroundColor: checked ? 'primary-container' : 'on.surface-variant',\n color: checked ? 'on.primary-container' : 'surface-variant',\n },\n '[data-switch-thumb=\"\"]:active ~ &, [data-switch-thumb=\"\"]:focus-visible ~ &':\n {\n height: checked\n ? CIRCLE_SIZE_ACTIVE_CHECKED\n : CIRCLE_SIZE_ACTIVE_UNCHECKED,\n width: checked\n ? CIRCLE_SIZE_ACTIVE_CHECKED\n : CIRCLE_SIZE_ACTIVE_UNCHECKED,\n },\n '[data-switch-thumb=\"\"]:disabled ~ &': {\n opacity: checked ? 1 : 0.38,\n backgroundColor: checked ? 'surface' : 'on.surface',\n color: checked ? 'on.surface' : 'surface',\n height: checked\n ? CIRCLE_SIZE_INACTIVE_CHECKED\n : CIRCLE_SIZE_INACTIVE_UNCHECKED,\n width: checked\n ? CIRCLE_SIZE_INACTIVE_CHECKED\n : CIRCLE_SIZE_INACTIVE_UNCHECKED,\n },\n }}\n data-switch-circle=\"\"\n role=\"presentation\"\n aria-hidden=\"true\"\n {...otherProps}\n />\n);\n"],"mappings":";;;;;AAAA,SAASA,GAAT,QAAoB,QAApB;AACA,SAASC,eAAT,QAAgC,WAAhC;;AAEA,IAAMC,YAAY,GAAG,4BAArB;AACA,IAAMC,WAAW,GAAG,2BAApB;AACA,IAAMC,YAAY,GAAG,4BAArB;AACA,IAAMC,gBAAgB,GAAG,gCAAzB;AACA,IAAMC,4BAA4B,GAChC,2CADF;AAEA,IAAMC,0BAA0B,GAAG,yCAAnC;AACA,IAAMC,8BAA8B,GAClC,6CADF;AAEA,IAAMC,4BAA4B,GAChC,2CADF;AAGA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAc;EAAA,wBACzBC,OADyB;EAAA,IACzBA,OADyB,6BACf,KADe;EAAA,yBAEzBC,QAFyB;EAAA,IAEzBA,QAFyB,8BAEd,KAFc;EAAA,IAGtBC,UAHsB;;EAAA,oBAKzB,KAAC,GAAD;IACE,KAAK;MACHC,KAAK,EAAEX,WADJ;MAEHY,MAAM,EAAEX,YAFL;MAGHY,YAAY,EAAE,MAHX;M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AKLhB,KAAK,EAAEH,OAAO,GACVL,4BADU,GAEVE,8BAPC;MAQLO,MAAM,EAAEJ,OAAO,GACXL,4BADW,GAEXE,8BAVC;MAWLuB,SAAS,EAAE,YAXN;MAYLf,YAAY,EAAE,MAZT;MAaLgB,aAAa,EAAE,MAbV;MAcLC,MAAM,EAAE,CAdH;MAeLd,eAAe,EAAER,OAAO,GAAG,YAAH,GAAkB,SAfrC;MAgBLuB,KAAK,EAAEvB,OAAO,GAAG,SAAH,GAAe,YAhBxB;MAiBLwB,GAAG,EAAE,KAjBA;MAkBLC,IAAI,EAAE,KAlBD;MAmBLb,SAAS,EAAE,uBAnBN;MAoBLE,UAAU,EAAE,SApBP;MAqBL,iHACE;QACEN,eAAe,EAAER,OAAO,GAAG,mBAAH,GAAyB,oBADnD;QAEEuB,KAAK,EAAEvB,OAAO,GAAG,sBAAH,GAA4B;MAF5C,CAtBG;MA0BL,+EACE;QACEI,MAAM,EAAEJ,OAAO,GACXJ,0BADW,GAEXE,4BAHN;QAIEK,KAAK,EAAEH,OAAO,GACVJ,0BADU,GAEVE;MANN,CA3BG;MAmCL,uCAAuC;QACrCY,OAAO,EAAEV,OAAO,GAAG,CAAH,GAAO,IADc;QAErCQ,eAAe,EAAER,OAAO,GAAG,SAAH,GAAe,YAFF;QAGrCuB,KAAK,EAAEvB,OAAO,GAAG,YAAH,GAAkB,SAHK;QAIrCI,MAAM,EAAEJ,OAAO,GACXL,4BADW,GAEXE,8BANiC;QAOrCM,KAAK,EAAEH,OAAO,GACVL,4BADU,GAEVE;MATiC;IAnClC,CADT;IAgDE,sBAAmB,EAhDrB;IAiDE,IAAI,EAAC,cAjDP;IAkDE,eAAY;EAlDd,GAmDMK,UAnDN,EAD0B;AAAA,CAArB"}
|
|
@@ -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, "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" | "
|
|
4
|
+
export declare const TableHead: import("react").ForwardRefExoticComponent<Pick<TableBodyProps, "slot" | "style" | "title" | "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>>> | "placeholder" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "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" | "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>>;
|