@oaknational/oak-components 3.22.3 → 3.24.0
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/dist/npm/cjs/index.js +38 -27
- package/dist/npm/cjs/types.d.ts +5 -4
- package/dist/npm/es/components/form-elements/OakCheckBox/OakCheckBox.js +9 -5
- package/dist/npm/es/components/internal-components/InternalButton/InternalButton.js +8 -4
- package/dist/npm/es/components/internal-components/InternalCheckBox/InternalCheckBox.js +3 -11
- package/dist/npm/es/components/internal-components/InternalRadio/InternalRadio.js +3 -11
- package/dist/npm/es/hooks/useHoverDuration.js +24 -0
- package/dist/npm/es/types.d.ts +5 -4
- package/package.json +1 -1
package/dist/npm/cjs/index.js
CHANGED
|
@@ -818,17 +818,21 @@ var templateObject_1$1Q;
|
|
|
818
818
|
var internalButtonCss = styled.css(templateObject_1$1P || (templateObject_1$1P = tslib.__makeTemplateObject(["\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n"], ["\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n"])), typographyStyle, colorStyle, spacingStyle, displayStyle, borderStyle, dropShadowStyle);
|
|
819
819
|
var UnstyledInternalButton = function (props) {
|
|
820
820
|
var onClick = props.onClick, onHovered = props.onHovered, _a = props.element, Component = _a === void 0 ? "button" : _a, rest = tslib.__rest(props, ["onClick", "onHovered", "element"]);
|
|
821
|
-
var hoverStart = React.useRef(
|
|
821
|
+
var hoverStart = React.useRef(null);
|
|
822
822
|
var handleClick = function (event) {
|
|
823
823
|
if (onClick) {
|
|
824
824
|
onClick(event);
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
|
-
var handleMouseEnter = function () {
|
|
828
|
-
hoverStart.current =
|
|
827
|
+
var handleMouseEnter = function (event) {
|
|
828
|
+
hoverStart.current = event.timeStamp;
|
|
829
829
|
};
|
|
830
830
|
var handleMouseLeave = function (event) {
|
|
831
|
-
|
|
831
|
+
if (hoverStart.current === null) {
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
var delta = event.timeStamp - hoverStart.current;
|
|
835
|
+
hoverStart.current = null;
|
|
832
836
|
if (onHovered) {
|
|
833
837
|
onHovered(event, delta);
|
|
834
838
|
}
|
|
@@ -2008,18 +2012,30 @@ var OakAccordion = function (props) {
|
|
|
2008
2012
|
};
|
|
2009
2013
|
var templateObject_1$1w;
|
|
2010
2014
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2015
|
+
/**
|
|
2016
|
+
* Returns mouseEnter/mouseLeave handlers that call `onHovered` with the hover duration (ms) on leave
|
|
2017
|
+
*/
|
|
2018
|
+
var useHoverDuration = function (value, id, onHovered) {
|
|
2019
|
+
var hoverStart = React.useRef(null);
|
|
2020
|
+
var handleMouseEnter = function (event) {
|
|
2021
|
+
hoverStart.current = event.timeStamp;
|
|
2016
2022
|
};
|
|
2017
|
-
var handleMouseLeave = function () {
|
|
2018
|
-
|
|
2023
|
+
var handleMouseLeave = function (event) {
|
|
2024
|
+
if (hoverStart.current === null) {
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
2027
|
+
var delta = event.timeStamp - hoverStart.current;
|
|
2028
|
+
hoverStart.current = null;
|
|
2019
2029
|
if (onHovered) {
|
|
2020
|
-
onHovered(
|
|
2030
|
+
onHovered(value, id, delta);
|
|
2021
2031
|
}
|
|
2022
2032
|
};
|
|
2033
|
+
return { handleMouseEnter: handleMouseEnter, handleMouseLeave: handleMouseLeave };
|
|
2034
|
+
};
|
|
2035
|
+
|
|
2036
|
+
var BaseCheckBox = React.forwardRef(function (props, ref) {
|
|
2037
|
+
var onHovered = props.onHovered, rest = tslib.__rest(props, ["onHovered"]);
|
|
2038
|
+
var _a = useHoverDuration(props.value, props.id, onHovered), handleMouseEnter = _a.handleMouseEnter, handleMouseLeave = _a.handleMouseLeave;
|
|
2023
2039
|
return (React__default.default.createElement("input", tslib.__assign({ ref: ref, type: "checkbox", onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, name: props.id }, rest)));
|
|
2024
2040
|
});
|
|
2025
2041
|
/**
|
|
@@ -2155,12 +2171,16 @@ var OakCheckBox = function (props) {
|
|
|
2155
2171
|
* The outer border color of the checkbox when checked.
|
|
2156
2172
|
*/
|
|
2157
2173
|
checkedBorderColor = _k === void 0 ? "border-primary" : _k, _l = props.disabledColor, disabledColor = _l === void 0 ? "text-disabled" : _l, _m = props.$labelGap, $labelGap = _m === void 0 ? "spacing-16" : _m, _o = props.$labelAlignItems, $labelAlignItems = _o === void 0 ? "center" : _o, _p = props.checkedBackgroundFill, checkedBackgroundFill = _p === void 0 ? true : _p, checkedIcon = props.checkedIcon, dataTestId = props["data-testid"], rest = tslib.__rest(props, ["id", "value", "displayValue", "disabled", "defaultChecked", "checked", "onChange", "onFocus", "onBlur", "onHovered", "iconPadding", "hoverBorderRadius", "checkboxSize", "checkboxBorder", "checkboxBorderRadius", "defaultColor", "uncheckedBorderColor", "checkedBorderColor", "disabledColor", "$labelGap", "$labelAlignItems", "checkedBackgroundFill", "checkedIcon", "data-testid"]);
|
|
2158
|
-
var hoverStart = React.useRef(
|
|
2159
|
-
var handleMouseEnter = function () {
|
|
2160
|
-
hoverStart.current =
|
|
2174
|
+
var hoverStart = React.useRef(null);
|
|
2175
|
+
var handleMouseEnter = function (event) {
|
|
2176
|
+
hoverStart.current = event.timeStamp;
|
|
2161
2177
|
};
|
|
2162
|
-
var handleMouseLeave = function () {
|
|
2163
|
-
|
|
2178
|
+
var handleMouseLeave = function (event) {
|
|
2179
|
+
if (hoverStart.current === null) {
|
|
2180
|
+
return;
|
|
2181
|
+
}
|
|
2182
|
+
var delta = event.timeStamp - hoverStart.current;
|
|
2183
|
+
hoverStart.current = null;
|
|
2164
2184
|
if (onHovered) {
|
|
2165
2185
|
onHovered(value, id, delta);
|
|
2166
2186
|
}
|
|
@@ -2909,16 +2929,7 @@ var templateObject_1$1h;
|
|
|
2909
2929
|
|
|
2910
2930
|
var BaseRadio = React.forwardRef(function (props, ref) {
|
|
2911
2931
|
var onHovered = props.onHovered, rest = tslib.__rest(props, ["onHovered"]);
|
|
2912
|
-
var
|
|
2913
|
-
var handleMouseEnter = function () {
|
|
2914
|
-
hoverStart.current = Date.now();
|
|
2915
|
-
};
|
|
2916
|
-
var handleMouseLeave = function () {
|
|
2917
|
-
var delta = Date.now() - hoverStart.current;
|
|
2918
|
-
if (onHovered) {
|
|
2919
|
-
onHovered(props.value, props.id, delta);
|
|
2920
|
-
}
|
|
2921
|
-
};
|
|
2932
|
+
var _a = useHoverDuration(props.value, props.id, onHovered), handleMouseEnter = _a.handleMouseEnter, handleMouseLeave = _a.handleMouseLeave;
|
|
2922
2933
|
return (React__default.default.createElement("input", tslib.__assign({ ref: ref, type: "radio", onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, rest)));
|
|
2923
2934
|
});
|
|
2924
2935
|
/**
|
package/dist/npm/cjs/types.d.ts
CHANGED
|
@@ -2962,7 +2962,7 @@ declare const OakMaxWidth: styled_components_dist_types.IStyledComponentBase<"we
|
|
|
2962
2962
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | (React$1.CSSProperties & {
|
|
2963
2963
|
[key: `--${string}`]: string | number | undefined;
|
|
2964
2964
|
}) | undefined;
|
|
2965
|
-
}, OakFlexProps>, "children" | "ref" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "
|
|
2965
|
+
}, OakFlexProps>, "children" | "ref" | "role" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "$flexDirection" | "$flexWrap" | "$alignItems" | "$alignContent" | "$justifyContent" | "$alignSelf" | "$flexGrow" | "$flexShrink" | "$order" | "$flexBasis" | "$gap" | "$columnGap" | "$rowGap" | "focusable" | "aria-label" | "aria-description" | "aria-labelledby" | "aria-describedby" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "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" | "onResize" | "onResizeCapture" | "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" | "$width" | "$minWidth" | "$maxWidth" | "$height" | "$minHeight" | "$maxHeight" | "$aspectRatio" | "$boxSizing" | "$opacity" | "$transform" | "$transformOrigin" | "$transition" | "$zIndex" | "$scrollMarginTop" | "$scrollMarginLeft" | "as" | "forwardedAs"> & Partial<Pick<styled_components_dist_types.Merged<Omit<styled_components.FastOmit<styled_components_dist_types.Merged<Omit<Omit<styled_components.FastOmit<styled_components_dist_types.Merged<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
2966
2966
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | undefined;
|
|
2967
2967
|
}, OakBoxProps>, "as" | "forwardedAs"> & {
|
|
2968
2968
|
as?: styled_components.WebTarget | undefined;
|
|
@@ -2980,7 +2980,7 @@ declare const OakMaxWidth: styled_components_dist_types.IStyledComponentBase<"we
|
|
|
2980
2980
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | (React$1.CSSProperties & {
|
|
2981
2981
|
[key: `--${string}`]: string | number | undefined;
|
|
2982
2982
|
}) | undefined;
|
|
2983
|
-
}, OakFlexProps>, "children" | "ref" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "
|
|
2983
|
+
}, OakFlexProps>, "children" | "ref" | "role" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "$flexDirection" | "$flexWrap" | "$alignItems" | "$alignContent" | "$justifyContent" | "$alignSelf" | "$flexGrow" | "$flexShrink" | "$order" | "$flexBasis" | "$gap" | "$columnGap" | "$rowGap" | "focusable" | "aria-label" | "aria-description" | "aria-labelledby" | "aria-describedby" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "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" | "onResize" | "onResizeCapture" | "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" | "$width" | "$minWidth" | "$maxWidth" | "$height" | "$minHeight" | "$maxHeight" | "$aspectRatio" | "$boxSizing" | "$opacity" | "$transform" | "$transformOrigin" | "$transition" | "$zIndex" | "$scrollMarginTop" | "$scrollMarginLeft" | "as" | "forwardedAs">>> & string;
|
|
2984
2984
|
|
|
2985
2985
|
type OakAccordionProps = {
|
|
2986
2986
|
/**
|
|
@@ -3340,6 +3340,7 @@ type OakTagFunctionalProps = {
|
|
|
3340
3340
|
iconName?: OakIconName;
|
|
3341
3341
|
isTrailingIcon?: boolean;
|
|
3342
3342
|
useSpan?: boolean;
|
|
3343
|
+
as?: "span" | "div";
|
|
3343
3344
|
} & Omit<OakFlexProps, "onClick" | "label">;
|
|
3344
3345
|
declare const OakTagFunctional: (props: OakTagFunctionalProps) => React__default.JSX.Element;
|
|
3345
3346
|
|
|
@@ -5347,9 +5348,9 @@ declare const oakLIDefaults: {
|
|
|
5347
5348
|
};
|
|
5348
5349
|
declare const OakLI: styled_components_dist_types.IStyledComponentBase<"web", Omit<styled_components_dist_types.Merged<styled_components_dist_types.Merged<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style"> & {
|
|
5349
5350
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | undefined;
|
|
5350
|
-
}, OakLIProps>, OakLIProps>, "children" | "ref" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "
|
|
5351
|
+
}, OakLIProps>, OakLIProps>, "children" | "ref" | "role" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "value" | "$flexDirection" | "$flexWrap" | "$alignItems" | "$alignContent" | "$justifyContent" | "$alignSelf" | "$flexGrow" | "$flexShrink" | "$order" | "$flexBasis" | "$gap" | "$columnGap" | "$rowGap" | "focusable" | "aria-label" | "aria-description" | "aria-labelledby" | "aria-describedby" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "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" | "onResize" | "onResizeCapture" | "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" | "$width" | "$minWidth" | "$maxWidth" | "$height" | "$minHeight" | "$maxHeight" | "$aspectRatio" | "$boxSizing" | "$opacity" | "$transform" | "$transformOrigin" | "$transition" | "$zIndex" | "$scrollMarginTop" | "$scrollMarginLeft" | "$listStyle"> & Partial<Pick<styled_components_dist_types.Merged<styled_components_dist_types.Merged<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style"> & {
|
|
5351
5352
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | undefined;
|
|
5352
|
-
}, OakLIProps>, OakLIProps>, "children" | "ref" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "
|
|
5353
|
+
}, OakLIProps>, OakLIProps>, "children" | "ref" | "role" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "value" | "$flexDirection" | "$flexWrap" | "$alignItems" | "$alignContent" | "$justifyContent" | "$alignSelf" | "$flexGrow" | "$flexShrink" | "$order" | "$flexBasis" | "$gap" | "$columnGap" | "$rowGap" | "focusable" | "aria-label" | "aria-description" | "aria-labelledby" | "aria-describedby" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "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" | "onResize" | "onResizeCapture" | "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" | "$width" | "$minWidth" | "$maxWidth" | "$height" | "$minHeight" | "$maxHeight" | "$aspectRatio" | "$boxSizing" | "$opacity" | "$transform" | "$transformOrigin" | "$transition" | "$zIndex" | "$scrollMarginTop" | "$scrollMarginLeft" | "$listStyle">>> & string;
|
|
5353
5354
|
|
|
5354
5355
|
type OakOLProps = MarginStyleProps & ColorStyleProps & TypographyStyleProps;
|
|
5355
5356
|
/**
|
|
@@ -46,12 +46,16 @@ var OakCheckBox = function (props) {
|
|
|
46
46
|
* The outer border color of the checkbox when checked.
|
|
47
47
|
*/
|
|
48
48
|
checkedBorderColor = _k === void 0 ? "border-primary" : _k, _l = props.disabledColor, disabledColor = _l === void 0 ? "text-disabled" : _l, _m = props.$labelGap, $labelGap = _m === void 0 ? "spacing-16" : _m, _o = props.$labelAlignItems, $labelAlignItems = _o === void 0 ? "center" : _o, _p = props.checkedBackgroundFill, checkedBackgroundFill = _p === void 0 ? true : _p, checkedIcon = props.checkedIcon, dataTestId = props["data-testid"], rest = __rest(props, ["id", "value", "displayValue", "disabled", "defaultChecked", "checked", "onChange", "onFocus", "onBlur", "onHovered", "iconPadding", "hoverBorderRadius", "checkboxSize", "checkboxBorder", "checkboxBorderRadius", "defaultColor", "uncheckedBorderColor", "checkedBorderColor", "disabledColor", "$labelGap", "$labelAlignItems", "checkedBackgroundFill", "checkedIcon", "data-testid"]);
|
|
49
|
-
var hoverStart = useRef(
|
|
50
|
-
var handleMouseEnter = function () {
|
|
51
|
-
hoverStart.current =
|
|
49
|
+
var hoverStart = useRef(null);
|
|
50
|
+
var handleMouseEnter = function (event) {
|
|
51
|
+
hoverStart.current = event.timeStamp;
|
|
52
52
|
};
|
|
53
|
-
var handleMouseLeave = function () {
|
|
54
|
-
|
|
53
|
+
var handleMouseLeave = function (event) {
|
|
54
|
+
if (hoverStart.current === null) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
var delta = event.timeStamp - hoverStart.current;
|
|
58
|
+
hoverStart.current = null;
|
|
55
59
|
if (onHovered) {
|
|
56
60
|
onHovered(value, id, delta);
|
|
57
61
|
}
|
|
@@ -11,17 +11,21 @@ import { borderStyle } from '../../../styles/utils/borderStyle.js';
|
|
|
11
11
|
var internalButtonCss = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n"], ["\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n"])), typographyStyle, colorStyle, spacingStyle, displayStyle, borderStyle, dropShadowStyle);
|
|
12
12
|
var UnstyledInternalButton = function (props) {
|
|
13
13
|
var onClick = props.onClick, onHovered = props.onHovered, _a = props.element, Component = _a === void 0 ? "button" : _a, rest = __rest(props, ["onClick", "onHovered", "element"]);
|
|
14
|
-
var hoverStart = useRef(
|
|
14
|
+
var hoverStart = useRef(null);
|
|
15
15
|
var handleClick = function (event) {
|
|
16
16
|
if (onClick) {
|
|
17
17
|
onClick(event);
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
var handleMouseEnter = function () {
|
|
21
|
-
hoverStart.current =
|
|
20
|
+
var handleMouseEnter = function (event) {
|
|
21
|
+
hoverStart.current = event.timeStamp;
|
|
22
22
|
};
|
|
23
23
|
var handleMouseLeave = function (event) {
|
|
24
|
-
|
|
24
|
+
if (hoverStart.current === null) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
var delta = event.timeStamp - hoverStart.current;
|
|
28
|
+
hoverStart.current = null;
|
|
25
29
|
if (onHovered) {
|
|
26
30
|
onHovered(event, delta);
|
|
27
31
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __rest, __assign, __makeTemplateObject } from 'tslib';
|
|
2
|
-
import React, { forwardRef
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
+
import { useHoverDuration } from '../../../hooks/useHoverDuration.js';
|
|
4
5
|
import { parseBorderRadius } from '../../../styles/helpers/parseBorderRadius.js';
|
|
5
6
|
import { parseColor } from '../../../styles/helpers/parseColor.js';
|
|
6
7
|
import { parseDropShadow } from '../../../styles/helpers/parseDropShadow.js';
|
|
@@ -11,16 +12,7 @@ import { spacingStyle } from '../../../styles/utils/spacingStyle.js';
|
|
|
11
12
|
|
|
12
13
|
var BaseCheckBox = forwardRef(function (props, ref) {
|
|
13
14
|
var onHovered = props.onHovered, rest = __rest(props, ["onHovered"]);
|
|
14
|
-
var
|
|
15
|
-
var handleMouseEnter = function () {
|
|
16
|
-
hoverStart.current = Date.now();
|
|
17
|
-
};
|
|
18
|
-
var handleMouseLeave = function () {
|
|
19
|
-
var delta = Date.now() - hoverStart.current;
|
|
20
|
-
if (onHovered) {
|
|
21
|
-
onHovered(props.value, props.id, delta);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
15
|
+
var _a = useHoverDuration(props.value, props.id, onHovered), handleMouseEnter = _a.handleMouseEnter, handleMouseLeave = _a.handleMouseLeave;
|
|
24
16
|
return (React.createElement("input", __assign({ ref: ref, type: "checkbox", onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, name: props.id }, rest)));
|
|
25
17
|
});
|
|
26
18
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __rest, __assign, __makeTemplateObject } from 'tslib';
|
|
2
|
-
import React, { forwardRef
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
+
import { useHoverDuration } from '../../../hooks/useHoverDuration.js';
|
|
4
5
|
import { parseBorderRadius } from '../../../styles/helpers/parseBorderRadius.js';
|
|
5
6
|
import { parseColor } from '../../../styles/helpers/parseColor.js';
|
|
6
7
|
import { parseDropShadow } from '../../../styles/helpers/parseDropShadow.js';
|
|
@@ -11,16 +12,7 @@ import { spacingStyle } from '../../../styles/utils/spacingStyle.js';
|
|
|
11
12
|
|
|
12
13
|
var BaseRadio = forwardRef(function (props, ref) {
|
|
13
14
|
var onHovered = props.onHovered, rest = __rest(props, ["onHovered"]);
|
|
14
|
-
var
|
|
15
|
-
var handleMouseEnter = function () {
|
|
16
|
-
hoverStart.current = Date.now();
|
|
17
|
-
};
|
|
18
|
-
var handleMouseLeave = function () {
|
|
19
|
-
var delta = Date.now() - hoverStart.current;
|
|
20
|
-
if (onHovered) {
|
|
21
|
-
onHovered(props.value, props.id, delta);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
15
|
+
var _a = useHoverDuration(props.value, props.id, onHovered), handleMouseEnter = _a.handleMouseEnter, handleMouseLeave = _a.handleMouseLeave;
|
|
24
16
|
return (React.createElement("input", __assign({ ref: ref, type: "radio", onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, rest)));
|
|
25
17
|
});
|
|
26
18
|
/**
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns mouseEnter/mouseLeave handlers that call `onHovered` with the hover duration (ms) on leave
|
|
5
|
+
*/
|
|
6
|
+
var useHoverDuration = function (value, id, onHovered) {
|
|
7
|
+
var hoverStart = useRef(null);
|
|
8
|
+
var handleMouseEnter = function (event) {
|
|
9
|
+
hoverStart.current = event.timeStamp;
|
|
10
|
+
};
|
|
11
|
+
var handleMouseLeave = function (event) {
|
|
12
|
+
if (hoverStart.current === null) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
var delta = event.timeStamp - hoverStart.current;
|
|
16
|
+
hoverStart.current = null;
|
|
17
|
+
if (onHovered) {
|
|
18
|
+
onHovered(value, id, delta);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return { handleMouseEnter: handleMouseEnter, handleMouseLeave: handleMouseLeave };
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { useHoverDuration };
|
package/dist/npm/es/types.d.ts
CHANGED
|
@@ -2962,7 +2962,7 @@ declare const OakMaxWidth: styled_components_dist_types.IStyledComponentBase<"we
|
|
|
2962
2962
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | (React$1.CSSProperties & {
|
|
2963
2963
|
[key: `--${string}`]: string | number | undefined;
|
|
2964
2964
|
}) | undefined;
|
|
2965
|
-
}, OakFlexProps>, "children" | "ref" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "
|
|
2965
|
+
}, OakFlexProps>, "children" | "ref" | "role" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "$flexDirection" | "$flexWrap" | "$alignItems" | "$alignContent" | "$justifyContent" | "$alignSelf" | "$flexGrow" | "$flexShrink" | "$order" | "$flexBasis" | "$gap" | "$columnGap" | "$rowGap" | "focusable" | "aria-label" | "aria-description" | "aria-labelledby" | "aria-describedby" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "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" | "onResize" | "onResizeCapture" | "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" | "$width" | "$minWidth" | "$maxWidth" | "$height" | "$minHeight" | "$maxHeight" | "$aspectRatio" | "$boxSizing" | "$opacity" | "$transform" | "$transformOrigin" | "$transition" | "$zIndex" | "$scrollMarginTop" | "$scrollMarginLeft" | "as" | "forwardedAs"> & Partial<Pick<styled_components_dist_types.Merged<Omit<styled_components.FastOmit<styled_components_dist_types.Merged<Omit<Omit<styled_components.FastOmit<styled_components_dist_types.Merged<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
2966
2966
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | undefined;
|
|
2967
2967
|
}, OakBoxProps>, "as" | "forwardedAs"> & {
|
|
2968
2968
|
as?: styled_components.WebTarget | undefined;
|
|
@@ -2980,7 +2980,7 @@ declare const OakMaxWidth: styled_components_dist_types.IStyledComponentBase<"we
|
|
|
2980
2980
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | (React$1.CSSProperties & {
|
|
2981
2981
|
[key: `--${string}`]: string | number | undefined;
|
|
2982
2982
|
}) | undefined;
|
|
2983
|
-
}, OakFlexProps>, "children" | "ref" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "
|
|
2983
|
+
}, OakFlexProps>, "children" | "ref" | "role" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "$flexDirection" | "$flexWrap" | "$alignItems" | "$alignContent" | "$justifyContent" | "$alignSelf" | "$flexGrow" | "$flexShrink" | "$order" | "$flexBasis" | "$gap" | "$columnGap" | "$rowGap" | "focusable" | "aria-label" | "aria-description" | "aria-labelledby" | "aria-describedby" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "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" | "onResize" | "onResizeCapture" | "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" | "$width" | "$minWidth" | "$maxWidth" | "$height" | "$minHeight" | "$maxHeight" | "$aspectRatio" | "$boxSizing" | "$opacity" | "$transform" | "$transformOrigin" | "$transition" | "$zIndex" | "$scrollMarginTop" | "$scrollMarginLeft" | "as" | "forwardedAs">>> & string;
|
|
2984
2984
|
|
|
2985
2985
|
type OakAccordionProps = {
|
|
2986
2986
|
/**
|
|
@@ -3340,6 +3340,7 @@ type OakTagFunctionalProps = {
|
|
|
3340
3340
|
iconName?: OakIconName;
|
|
3341
3341
|
isTrailingIcon?: boolean;
|
|
3342
3342
|
useSpan?: boolean;
|
|
3343
|
+
as?: "span" | "div";
|
|
3343
3344
|
} & Omit<OakFlexProps, "onClick" | "label">;
|
|
3344
3345
|
declare const OakTagFunctional: (props: OakTagFunctionalProps) => React__default.JSX.Element;
|
|
3345
3346
|
|
|
@@ -5347,9 +5348,9 @@ declare const oakLIDefaults: {
|
|
|
5347
5348
|
};
|
|
5348
5349
|
declare const OakLI: styled_components_dist_types.IStyledComponentBase<"web", Omit<styled_components_dist_types.Merged<styled_components_dist_types.Merged<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style"> & {
|
|
5349
5350
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | undefined;
|
|
5350
|
-
}, OakLIProps>, OakLIProps>, "children" | "ref" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "
|
|
5351
|
+
}, OakLIProps>, OakLIProps>, "children" | "ref" | "role" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "value" | "$flexDirection" | "$flexWrap" | "$alignItems" | "$alignContent" | "$justifyContent" | "$alignSelf" | "$flexGrow" | "$flexShrink" | "$order" | "$flexBasis" | "$gap" | "$columnGap" | "$rowGap" | "focusable" | "aria-label" | "aria-description" | "aria-labelledby" | "aria-describedby" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "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" | "onResize" | "onResizeCapture" | "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" | "$width" | "$minWidth" | "$maxWidth" | "$height" | "$minHeight" | "$maxHeight" | "$aspectRatio" | "$boxSizing" | "$opacity" | "$transform" | "$transformOrigin" | "$transition" | "$zIndex" | "$scrollMarginTop" | "$scrollMarginLeft" | "$listStyle"> & Partial<Pick<styled_components_dist_types.Merged<styled_components_dist_types.Merged<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style"> & {
|
|
5351
5352
|
style?: React$1.CSSProperties | styled_components_dist_types.CSSPropertiesWithVars | undefined;
|
|
5352
|
-
}, OakLIProps>, OakLIProps>, "children" | "ref" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "
|
|
5353
|
+
}, OakLIProps>, OakLIProps>, "children" | "ref" | "role" | "slot" | "style" | "title" | "$pa" | "$ph" | "$pv" | "$pt" | "$pb" | "$ba" | "$borderRadius" | "$borderColor" | "$background" | "$color" | "$font" | "$textDecoration" | "$textAlign" | "$whiteSpace" | "$wordWrap" | "$textOverflow" | "$overflow" | "$textWrap" | "$pl" | "$pr" | "$ma" | "$mh" | "$mv" | "$ml" | "$mr" | "$mt" | "$mb" | "$display" | "$bt" | "$br" | "$bb" | "$bl" | "$bh" | "$bv" | "$borderStyle" | "$btlr" | "$btrr" | "$bblr" | "$bbrr" | "$btr" | "$bbr" | "$dropShadow" | "$position" | "$top" | "$right" | "$bottom" | "$left" | "$inset" | "$overflowX" | "$overflowY" | "$objectFit" | "$objectPosition" | "$pointerEvents" | "$visibility" | "$verticalAlign" | "value" | "$flexDirection" | "$flexWrap" | "$alignItems" | "$alignContent" | "$justifyContent" | "$alignSelf" | "$flexGrow" | "$flexShrink" | "$order" | "$flexBasis" | "$gap" | "$columnGap" | "$rowGap" | "focusable" | "aria-label" | "aria-description" | "aria-labelledby" | "aria-describedby" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "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-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "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" | "onResize" | "onResizeCapture" | "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" | "$width" | "$minWidth" | "$maxWidth" | "$height" | "$minHeight" | "$maxHeight" | "$aspectRatio" | "$boxSizing" | "$opacity" | "$transform" | "$transformOrigin" | "$transition" | "$zIndex" | "$scrollMarginTop" | "$scrollMarginLeft" | "$listStyle">>> & string;
|
|
5353
5354
|
|
|
5354
5355
|
type OakOLProps = MarginStyleProps & ColorStyleProps & TypographyStyleProps;
|
|
5355
5356
|
/**
|