@codecademy/gamut-styles 17.13.2-alpha.c910ea.0 → 17.13.2-alpha.ca20ad.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/AssetProvider.d.ts +1 -1
- package/dist/AssetProvider.js +1 -1
- package/dist/ColorMode.d.ts +2 -2
- package/dist/globals/Typography.js +2 -2
- package/dist/remoteAssets/fonts.d.ts +1 -1
- package/dist/utilities/index.d.ts +0 -2
- package/dist/utilities/index.js +1 -3
- package/dist/variance/utils.d.ts +4 -3
- package/package.json +4 -4
- package/dist/__tests__/testUtils.d.ts +0 -2
- package/dist/utilities/directionIsRtl.d.ts +0 -14
- package/dist/utilities/directionIsRtl.js +0 -50
- package/dist/utilities/useLogicalProperties.d.ts +0 -8
- package/dist/utilities/useLogicalProperties.js +0 -13
- /package/dist/{utilities → utils}/fontUtils.d.ts +0 -0
- /package/dist/{utilities → utils}/fontUtils.js +0 -0
package/dist/AssetProvider.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from '@emotion/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { FontConfig } from './
|
|
3
|
+
import { FontConfig } from './utils/fontUtils';
|
|
4
4
|
export declare const createFontLinks: (fonts?: readonly FontConfig[]) => import("react/jsx-runtime").JSX.Element[];
|
|
5
5
|
export declare const AssetProvider: React.FC<{
|
|
6
6
|
theme?: Theme;
|
package/dist/AssetProvider.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { webFonts } from './remoteAssets/fonts';
|
|
3
3
|
import { coreTheme } from './themes';
|
|
4
|
-
import { getFonts } from './
|
|
4
|
+
import { getFonts } from './utils/fontUtils';
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Only preload woff2 fonts, since woff1 are only included as fallbacks.
|
package/dist/ColorMode.d.ts
CHANGED
|
@@ -1344,7 +1344,7 @@ export declare const VariableProvider: import("@emotion/styled").StyledComponent
|
|
|
1344
1344
|
} & {
|
|
1345
1345
|
variables?: CSSObject;
|
|
1346
1346
|
alwaysSetVariables?: boolean;
|
|
1347
|
-
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "property" | "rel" | "slot" | "title" | "rev" | "id" | "nonce" | "content" | "translate" | "children" | "className" | "part" | "prefix" | "role" | "suppressHydrationWarning" | "lang" | "tabIndex" | "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-describedby" | "aria-description" | "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-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" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | keyof import("react").ClassAttributes<HTMLDivElement>>, {}>;
|
|
1347
|
+
}, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "property" | "rel" | "slot" | "title" | "rev" | "id" | "nonce" | "content" | "translate" | "children" | "className" | "part" | "prefix" | "role" | "suppressHydrationWarning" | "lang" | "tabIndex" | "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-describedby" | "aria-description" | "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-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" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | keyof import("react").ClassAttributes<HTMLDivElement>>, {}>;
|
|
1348
1348
|
export declare const ColorMode: import("react").ForwardRefExoticComponent<Omit<Omit<{
|
|
1349
1349
|
theme?: Theme;
|
|
1350
1350
|
as?: React.ElementType;
|
|
@@ -1977,4 +1977,4 @@ export declare const ColorMode: import("react").ForwardRefExoticComponent<Omit<O
|
|
|
1977
1977
|
} & {
|
|
1978
1978
|
variables?: CSSObject;
|
|
1979
1979
|
alwaysSetVariables?: boolean;
|
|
1980
|
-
} & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "property" | "rel" | "slot" | "title" | "rev" | "id" | "nonce" | "content" | "translate" | "children" | "className" | "part" | "prefix" | "role" | "suppressHydrationWarning" | "lang" | "tabIndex" | "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-describedby" | "aria-description" | "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-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" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | keyof import("react").ClassAttributes<HTMLDivElement>>, "bg"> & ColorModeProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1980
|
+
} & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "property" | "rel" | "slot" | "title" | "rev" | "id" | "nonce" | "content" | "translate" | "children" | "className" | "part" | "prefix" | "role" | "suppressHydrationWarning" | "lang" | "tabIndex" | "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-describedby" | "aria-description" | "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-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" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | keyof import("react").ClassAttributes<HTMLDivElement>>, "bg"> & ColorModeProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, Global } from '@emotion/react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { getFonts } from '../
|
|
3
|
+
import { getFonts } from '../utils/fontUtils';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Typography component that applies global typography styles to the application.
|
|
@@ -37,7 +37,7 @@ export const Typography = ({
|
|
|
37
37
|
weight = 'normal',
|
|
38
38
|
extensions,
|
|
39
39
|
filePath
|
|
40
|
-
}) => /*#__PURE__*/css("@font-face{font-display:swap;font-family:'", name, "';font-style:", style, ";font-weight:", weight, ";src:", extensions.map(ext => `url("${filePath}.${ext}") format("${ext}")`).join(', '), ";};label:typographyGlobals;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
40
|
+
}) => /*#__PURE__*/css("@font-face{font-display:swap;font-family:'", name, "';font-style:", style, ";font-weight:", weight, ";src:", extensions.map(ext => `url("${filePath}.${ext}") format("${ext}")`).join(', '), ";};label:typographyGlobals;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nbG9iYWxzL1R5cG9ncmFwaHkudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZDNkIiLCJmaWxlIjoiLi4vLi4vc3JjL2dsb2JhbHMvVHlwb2dyYXBoeS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIEdsb2JhbCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0JztcblxuaW1wb3J0IHsgY29yZVRoZW1lIH0gZnJvbSAnLi4vdGhlbWVzJztcbmltcG9ydCB7IEZvbnRDb25maWcsIGdldEZvbnRzIH0gZnJvbSAnLi4vdXRpbHMvZm9udFV0aWxzJztcblxuLyoqXG4gKiBUeXBvZ3JhcGh5IGNvbXBvbmVudCB0aGF0IGFwcGxpZXMgZ2xvYmFsIHR5cG9ncmFwaHkgc3R5bGVzIHRvIHRoZSBhcHBsaWNhdGlvbi5cbiAqXG4gKiBUaGlzIGNvbXBvbmVudCBnZW5lcmF0ZXMgQ1NTLWluLUpTIHN0eWxlcyBmb3I6XG4gKiAtIEZvbnQgZmFjZSBkZWNsYXJhdGlvbnMgZm9yIGFsbCBjb25maWd1cmVkIGZvbnRzXG4gKiAtIEdsb2JhbCBoZWFkaW5nIHN0eWxlcyAoaDEtaDYpIHdpdGggdGhlbWUtYmFzZWQgc2l6aW5nIGFuZCBzcGFjaW5nXG4gKiAtIFNtYWxsIHRleHQgc3R5bGluZ1xuICpcbiAqIEBwYXJhbSBwcm9wcyAtIENvbXBvbmVudCBwcm9wc1xuICogQHBhcmFtIHByb3BzLnRoZW1lIC0gRW1vdGlvbiB0aGVtZSBvYmplY3QgY29udGFpbmluZyB0eXBvZ3JhcGh5IGNvbmZpZ3VyYXRpb24gYW5kIGFuIG9wdGlvbmFsIG5hbWVcbiAqIEByZXR1cm5zIEpTWCBlbGVtZW50IHdpdGggZ2xvYmFsIHR5cG9ncmFwaHkgc3R5bGVzIGFwcGxpZWRcbiAqXG4gKiBAZXhhbXBsZVxuICogYGBgdHN4XG4gKiA8VHlwb2dyYXBoeSB0aGVtZT17bXlUaGVtZX0gLz5cbiAqIGBgYFxuICovXG5cbmV4cG9ydCBjb25zdCBUeXBvZ3JhcGh5OiBSZWFjdC5GQzx7IHRoZW1lOiB0eXBlb2YgY29yZVRoZW1lIH0+ID0gKHtcbiAgdGhlbWUsXG59KSA9PiB7XG4gIHRyeSB7XG4gICAgY29uc3QgZm9udHMgPSBnZXRGb250cyh0aGVtZT8ubmFtZSk7XG5cbiAgICBpZiAoIUFycmF5LmlzQXJyYXkoZm9udHMpKSB7XG4gICAgICAvLyBFcnJvciBpZiB0aGUgZm9udHMgYXJlIG5vdCBhbiBhcnJheVxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGVcbiAgICAgIGNvbnNvbGUud2FybignVHlwb2dyYXBoeTogSW52YWxpZCBmb250cyBkYXRhIHJlY2VpdmVkJyk7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICBjb25zdCB0eXBvZ3JhcGh5R2xvYmFscyA9IGNzc2BcbiAgICAgICR7Zm9udHMubWFwKFxuICAgICAgICAoe1xuICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgc3R5bGUgPSAnbm9ybWFsJyxcbiAgICAgICAgICB3ZWlnaHQgPSAnbm9ybWFsJyxcbiAgICAgICAgICBleHRlbnNpb25zLFxuICAgICAgICAgIGZpbGVQYXRoLFxuICAgICAgICB9OiBGb250Q29uZmlnKSA9PiBjc3NgXG4gICAgICAgICAgQGZvbnQtZmFjZSB7XG4gICAgICAgICAgICBmb250LWRpc3BsYXk6IHN3YXA7XG4gICAgICAgICAgICBmb250LWZhbWlseTogJyR7bmFtZX0nO1xuICAgICAgICAgICAgZm9udC1zdHlsZTogJHtzdHlsZX07XG4gICAgICAgICAgICBmb250LXdlaWdodDogJHt3ZWlnaHR9O1xuICAgICAgICAgICAgc3JjOiAke2V4dGVuc2lvbnNcbiAgICAgICAgICAgICAgLm1hcCgoZXh0KSA9PiBgdXJsKFwiJHtmaWxlUGF0aH0uJHtleHR9XCIpIGZvcm1hdChcIiR7ZXh0fVwiKWApXG4gICAgICAgICAgICAgIC5qb2luKCcsICcpfTtcbiAgICAgICAgICB9XG4gICAgICAgIGBcbiAgICAgICl9XG5cbiAgICAgIGgxLFxuICAgIGgyLFxuICAgIGgzLFxuICAgIGg0LFxuICAgIGg1LFxuICAgIGg2IHtcbiAgICAgICAgbWFyZ2luLWJvdHRvbTogJHt0aGVtZS5zcGFjaW5nWzE2XX07XG4gICAgICAgIGZvbnQtd2VpZ2h0OiAke3RoZW1lLmZvbnRXZWlnaHQudGl0bGV9O1xuICAgICAgICBsaW5lLWhlaWdodDogJHt0aGVtZS5saW5lSGVpZ2h0LnRpdGxlfTtcbiAgICAgIH1cblxuICAgICAgaDEge1xuICAgICAgICBmb250LXNpemU6ICR7dGhlbWUuZm9udFNpemVbNjRdfTtcbiAgICAgIH1cbiAgICAgIGgyIHtcbiAgICAgICAgZm9udC1zaXplOiAke3RoZW1lLmZvbnRTaXplWzQ0XX07XG4gICAgICB9XG4gICAgICBoMyB7XG4gICAgICAgIGZvbnQtc2l6ZTogJHt0aGVtZS5mb250U2l6ZVszNF19O1xuICAgICAgfVxuICAgICAgaDQge1xuICAgICAgICBmb250LXNpemU6ICR7dGhlbWUuZm9udFNpemVbMjZdfTtcbiAgICAgIH1cbiAgICAgIGg1IHtcbiAgICAgICAgZm9udC1zaXplOiAke3RoZW1lLmZvbnRTaXplWzIyXX07XG4gICAgICB9XG4gICAgICBoNiB7XG4gICAgICAgIGZvbnQtc2l6ZTogJHt0aGVtZS5mb250U2l6ZVsyMF19O1xuICAgICAgfVxuXG4gICAgICBzbWFsbCB7XG4gICAgICAgIGZvbnQtc2l6ZTogJHt0aGVtZS5mb250U2l6ZVsxNF19O1xuICAgICAgICBmb250LXdlaWdodDogJHt0aGVtZS5mb250V2VpZ2h0LmJhc2V9O1xuICAgICAgfVxuICAgIGA7XG5cbiAgICByZXR1cm4gPEdsb2JhbCBzdHlsZXM9e3R5cG9ncmFwaHlHbG9iYWxzfSAvPjtcbiAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAvLyBIYW5kbGUgZm9udCBsb2FkaW5nIGVycm9ycyBncmFjZWZ1bGx5XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGVcbiAgICBjb25zb2xlLndhcm4oJ1R5cG9ncmFwaHk6IEZvbnQgbG9hZGluZyBmYWlsZWQ6JywgZXJyb3IpO1xuICAgIHJldHVybiBudWxsO1xuICB9XG59O1xuIl19 */"))), " h1,h2,h3,h4,h5,h6{margin-bottom:", theme.spacing[16], ";font-weight:", theme.fontWeight.title, ";line-height:", theme.lineHeight.title, ";}h1{font-size:", theme.fontSize[64], ";}h2{font-size:", theme.fontSize[44], ";}h3{font-size:", theme.fontSize[34], ";}h4{font-size:", theme.fontSize[26], ";}h5{font-size:", theme.fontSize[22], ";}h6{font-size:", theme.fontSize[20], ";}small{font-size:", theme.fontSize[14], ";font-weight:", theme.fontWeight.base, ";};label:typographyGlobals;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nbG9iYWxzL1R5cG9ncmFwaHkudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFDaUMiLCJmaWxlIjoiLi4vLi4vc3JjL2dsb2JhbHMvVHlwb2dyYXBoeS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MsIEdsb2JhbCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0JztcblxuaW1wb3J0IHsgY29yZVRoZW1lIH0gZnJvbSAnLi4vdGhlbWVzJztcbmltcG9ydCB7IEZvbnRDb25maWcsIGdldEZvbnRzIH0gZnJvbSAnLi4vdXRpbHMvZm9udFV0aWxzJztcblxuLyoqXG4gKiBUeXBvZ3JhcGh5IGNvbXBvbmVudCB0aGF0IGFwcGxpZXMgZ2xvYmFsIHR5cG9ncmFwaHkgc3R5bGVzIHRvIHRoZSBhcHBsaWNhdGlvbi5cbiAqXG4gKiBUaGlzIGNvbXBvbmVudCBnZW5lcmF0ZXMgQ1NTLWluLUpTIHN0eWxlcyBmb3I6XG4gKiAtIEZvbnQgZmFjZSBkZWNsYXJhdGlvbnMgZm9yIGFsbCBjb25maWd1cmVkIGZvbnRzXG4gKiAtIEdsb2JhbCBoZWFkaW5nIHN0eWxlcyAoaDEtaDYpIHdpdGggdGhlbWUtYmFzZWQgc2l6aW5nIGFuZCBzcGFjaW5nXG4gKiAtIFNtYWxsIHRleHQgc3R5bGluZ1xuICpcbiAqIEBwYXJhbSBwcm9wcyAtIENvbXBvbmVudCBwcm9wc1xuICogQHBhcmFtIHByb3BzLnRoZW1lIC0gRW1vdGlvbiB0aGVtZSBvYmplY3QgY29udGFpbmluZyB0eXBvZ3JhcGh5IGNvbmZpZ3VyYXRpb24gYW5kIGFuIG9wdGlvbmFsIG5hbWVcbiAqIEByZXR1cm5zIEpTWCBlbGVtZW50IHdpdGggZ2xvYmFsIHR5cG9ncmFwaHkgc3R5bGVzIGFwcGxpZWRcbiAqXG4gKiBAZXhhbXBsZVxuICogYGBgdHN4XG4gKiA8VHlwb2dyYXBoeSB0aGVtZT17bXlUaGVtZX0gLz5cbiAqIGBgYFxuICovXG5cbmV4cG9ydCBjb25zdCBUeXBvZ3JhcGh5OiBSZWFjdC5GQzx7IHRoZW1lOiB0eXBlb2YgY29yZVRoZW1lIH0+ID0gKHtcbiAgdGhlbWUsXG59KSA9PiB7XG4gIHRyeSB7XG4gICAgY29uc3QgZm9udHMgPSBnZXRGb250cyh0aGVtZT8ubmFtZSk7XG5cbiAgICBpZiAoIUFycmF5LmlzQXJyYXkoZm9udHMpKSB7XG4gICAgICAvLyBFcnJvciBpZiB0aGUgZm9udHMgYXJlIG5vdCBhbiBhcnJheVxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGVcbiAgICAgIGNvbnNvbGUud2FybignVHlwb2dyYXBoeTogSW52YWxpZCBmb250cyBkYXRhIHJlY2VpdmVkJyk7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICBjb25zdCB0eXBvZ3JhcGh5R2xvYmFscyA9IGNzc2BcbiAgICAgICR7Zm9udHMubWFwKFxuICAgICAgICAoe1xuICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgc3R5bGUgPSAnbm9ybWFsJyxcbiAgICAgICAgICB3ZWlnaHQgPSAnbm9ybWFsJyxcbiAgICAgICAgICBleHRlbnNpb25zLFxuICAgICAgICAgIGZpbGVQYXRoLFxuICAgICAgICB9OiBGb250Q29uZmlnKSA9PiBjc3NgXG4gICAgICAgICAgQGZvbnQtZmFjZSB7XG4gICAgICAgICAgICBmb250LWRpc3BsYXk6IHN3YXA7XG4gICAgICAgICAgICBmb250LWZhbWlseTogJyR7bmFtZX0nO1xuICAgICAgICAgICAgZm9udC1zdHlsZTogJHtzdHlsZX07XG4gICAgICAgICAgICBmb250LXdlaWdodDogJHt3ZWlnaHR9O1xuICAgICAgICAgICAgc3JjOiAke2V4dGVuc2lvbnNcbiAgICAgICAgICAgICAgLm1hcCgoZXh0KSA9PiBgdXJsKFwiJHtmaWxlUGF0aH0uJHtleHR9XCIpIGZvcm1hdChcIiR7ZXh0fVwiKWApXG4gICAgICAgICAgICAgIC5qb2luKCcsICcpfTtcbiAgICAgICAgICB9XG4gICAgICAgIGBcbiAgICAgICl9XG5cbiAgICAgIGgxLFxuICAgIGgyLFxuICAgIGgzLFxuICAgIGg0LFxuICAgIGg1LFxuICAgIGg2IHtcbiAgICAgICAgbWFyZ2luLWJvdHRvbTogJHt0aGVtZS5zcGFjaW5nWzE2XX07XG4gICAgICAgIGZvbnQtd2VpZ2h0OiAke3RoZW1lLmZvbnRXZWlnaHQudGl0bGV9O1xuICAgICAgICBsaW5lLWhlaWdodDogJHt0aGVtZS5saW5lSGVpZ2h0LnRpdGxlfTtcbiAgICAgIH1cblxuICAgICAgaDEge1xuICAgICAgICBmb250LXNpemU6ICR7dGhlbWUuZm9udFNpemVbNjRdfTtcbiAgICAgIH1cbiAgICAgIGgyIHtcbiAgICAgICAgZm9udC1zaXplOiAke3RoZW1lLmZvbnRTaXplWzQ0XX07XG4gICAgICB9XG4gICAgICBoMyB7XG4gICAgICAgIGZvbnQtc2l6ZTogJHt0aGVtZS5mb250U2l6ZVszNF19O1xuICAgICAgfVxuICAgICAgaDQge1xuICAgICAgICBmb250LXNpemU6ICR7dGhlbWUuZm9udFNpemVbMjZdfTtcbiAgICAgIH1cbiAgICAgIGg1IHtcbiAgICAgICAgZm9udC1zaXplOiAke3RoZW1lLmZvbnRTaXplWzIyXX07XG4gICAgICB9XG4gICAgICBoNiB7XG4gICAgICAgIGZvbnQtc2l6ZTogJHt0aGVtZS5mb250U2l6ZVsyMF19O1xuICAgICAgfVxuXG4gICAgICBzbWFsbCB7XG4gICAgICAgIGZvbnQtc2l6ZTogJHt0aGVtZS5mb250U2l6ZVsxNF19O1xuICAgICAgICBmb250LXdlaWdodDogJHt0aGVtZS5mb250V2VpZ2h0LmJhc2V9O1xuICAgICAgfVxuICAgIGA7XG5cbiAgICByZXR1cm4gPEdsb2JhbCBzdHlsZXM9e3R5cG9ncmFwaHlHbG9iYWxzfSAvPjtcbiAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAvLyBIYW5kbGUgZm9udCBsb2FkaW5nIGVycm9ycyBncmFjZWZ1bGx5XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGVcbiAgICBjb25zb2xlLndhcm4oJ1R5cG9ncmFwaHk6IEZvbnQgbG9hZGluZyBmYWlsZWQ6JywgZXJyb3IpO1xuICAgIHJldHVybiBudWxsO1xuICB9XG59O1xuIl19 */"));
|
|
41
41
|
return /*#__PURE__*/_jsx(Global, {
|
|
42
42
|
styles: typographyGlobals
|
|
43
43
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FontConfig } from '../
|
|
1
|
+
import { FontConfig } from '../utils/fontUtils';
|
|
2
2
|
export declare const FONT_ASSET_PATH = "https://www.codecademy.com/gamut";
|
|
3
3
|
export declare const core: readonly FontConfig[];
|
|
4
4
|
export declare const percipio: readonly FontConfig[];
|
package/dist/utilities/index.js
CHANGED
package/dist/variance/utils.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ThemeProps } from '@codecademy/variance';
|
|
2
|
+
import type React from 'react';
|
|
2
3
|
import { all as allProps } from './config';
|
|
3
4
|
declare const allPropnames: ["mode", "variant", ...[keyof typeof allProps]];
|
|
4
5
|
export type SystemPropNames = (typeof allPropnames)[number];
|
|
5
|
-
export type ElementOrProps = keyof JSX.IntrinsicElements | ThemeProps;
|
|
6
|
-
export type ForwardableProps<El extends ElementOrProps, Additional> = Exclude<El extends keyof JSX.IntrinsicElements ? keyof JSX.IntrinsicElements[El] : keyof Element, Additional | SystemPropNames>;
|
|
6
|
+
export type ElementOrProps = keyof React.JSX.IntrinsicElements | ThemeProps;
|
|
7
|
+
export type ForwardableProps<El extends ElementOrProps, Additional> = Exclude<El extends keyof React.JSX.IntrinsicElements ? keyof React.JSX.IntrinsicElements[El] : keyof Element, Additional | SystemPropNames>;
|
|
7
8
|
export declare function createStyledOptions<El extends ElementOrProps = 'div', Additional extends string = never>(additional?: readonly Additional[]): {
|
|
8
9
|
shouldForwardProp: (prop: PropertyKey) => prop is ForwardableProps<El, Additional>;
|
|
9
10
|
};
|
|
@@ -24,6 +25,6 @@ export declare function createStyledOptions<El extends ElementOrProps = 'div', A
|
|
|
24
25
|
*
|
|
25
26
|
*/
|
|
26
27
|
export declare const styledOptions: typeof createStyledOptions & {
|
|
27
|
-
shouldForwardProp: (prop: PropertyKey) => prop is "style" | "property" | "rel" | "slot" | "title" | "rev" | "id" | "nonce" | "content" | "translate" | "children" | "className" | "part" | "prefix" | "role" | "suppressHydrationWarning" | "lang" | "tabIndex" | "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-describedby" | "aria-description" | "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-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" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | keyof
|
|
28
|
+
shouldForwardProp: (prop: PropertyKey) => prop is "style" | "property" | "rel" | "slot" | "title" | "rev" | "id" | "nonce" | "content" | "translate" | "children" | "className" | "part" | "prefix" | "role" | "suppressHydrationWarning" | "lang" | "tabIndex" | "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-describedby" | "aria-description" | "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-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" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | keyof React.ClassAttributes<HTMLDivElement>;
|
|
28
29
|
};
|
|
29
30
|
export {};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut-styles",
|
|
3
3
|
"description": "Styleguide & Component library for codecademy.com",
|
|
4
|
-
"version": "17.13.2-alpha.
|
|
4
|
+
"version": "17.13.2-alpha.ca20ad.0",
|
|
5
5
|
"author": "Jake Hiller <jake@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codecademy/variance": "0.26.2-alpha.
|
|
7
|
+
"@codecademy/variance": "0.26.2-alpha.ca20ad.0",
|
|
8
8
|
"@emotion/is-prop-valid": "^1.1.0",
|
|
9
|
-
"framer-motion": "^
|
|
9
|
+
"framer-motion": "^12.0.0",
|
|
10
10
|
"get-nonce": "^1.0.0",
|
|
11
11
|
"polished": "^4.1.2"
|
|
12
12
|
},
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@emotion/react": "^11.4.0",
|
|
27
27
|
"@emotion/styled": "^11.3.0",
|
|
28
28
|
"lodash": "^4.17.23",
|
|
29
|
-
"react": "^17.0.2 || ^18.3.0",
|
|
29
|
+
"react": "^17.0.2 || ^18.3.0 || ^19.0.0",
|
|
30
30
|
"stylis": "^4.0.7"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Resolves whether layout direction is RTL for an element, including JSDOM where
|
|
4
|
-
* `getComputedStyle(el).direction` is often empty while `dir` is set on the root.
|
|
5
|
-
*/
|
|
6
|
-
export declare function directionIsRtl(el: Element): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Returns whether the resolved element’s direction is RTL, and updates when `dir`
|
|
9
|
-
* changes on the document subtree or after layout (so `ref.current` is current).
|
|
10
|
-
* Resolution uses {@link directionIsRtl}.
|
|
11
|
-
*
|
|
12
|
-
* @param elementRef - Optional ref; when missing or `current` is not an `Element`, uses `document.documentElement`.
|
|
13
|
-
*/
|
|
14
|
-
export declare function useDirectionIsRtl(elementRef?: RefObject<Element | null>): boolean;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { useEffect, useLayoutEffect, useReducer } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Resolves whether layout direction is RTL for an element, including JSDOM where
|
|
5
|
-
* `getComputedStyle(el).direction` is often empty while `dir` is set on the root.
|
|
6
|
-
*/
|
|
7
|
-
export function directionIsRtl(el) {
|
|
8
|
-
const ownDir = el.getAttribute('dir');
|
|
9
|
-
if (ownDir === 'rtl') return true;
|
|
10
|
-
if (ownDir === 'ltr') return false;
|
|
11
|
-
const {
|
|
12
|
-
direction
|
|
13
|
-
} = getComputedStyle(el);
|
|
14
|
-
if (direction === 'rtl' || direction === 'ltr') {
|
|
15
|
-
return direction === 'rtl';
|
|
16
|
-
}
|
|
17
|
-
return document.documentElement.getAttribute('dir') === 'rtl';
|
|
18
|
-
}
|
|
19
|
-
function resolveElement(elementRef) {
|
|
20
|
-
return elementRef?.current instanceof Element ? elementRef.current : document.documentElement;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Returns whether the resolved element’s direction is RTL, and updates when `dir`
|
|
25
|
-
* changes on the document subtree or after layout (so `ref.current` is current).
|
|
26
|
-
* Resolution uses {@link directionIsRtl}.
|
|
27
|
-
*
|
|
28
|
-
* @param elementRef - Optional ref; when missing or `current` is not an `Element`, uses `document.documentElement`.
|
|
29
|
-
*/
|
|
30
|
-
export function useDirectionIsRtl(elementRef) {
|
|
31
|
-
const [, bump] = useReducer(n => n + 1, 0);
|
|
32
|
-
useLayoutEffect(() => {
|
|
33
|
-
bump();
|
|
34
|
-
}, [elementRef]);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
const observer = new MutationObserver(() => {
|
|
37
|
-
bump();
|
|
38
|
-
});
|
|
39
|
-
observer.observe(document.documentElement, {
|
|
40
|
-
attributeFilter: ['dir'],
|
|
41
|
-
attributes: true,
|
|
42
|
-
subtree: true
|
|
43
|
-
});
|
|
44
|
-
return () => observer.disconnect();
|
|
45
|
-
}, []);
|
|
46
|
-
if (typeof document === 'undefined') {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
return directionIsRtl(resolveElement(elementRef));
|
|
50
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether Gamut system props emit logical CSS properties (`marginInlineStart`, etc.)
|
|
3
|
-
* vs physical (`marginLeft`, etc.). Matches `@codecademy/variance` when the theme
|
|
4
|
-
* omits the field: `theme.useLogicalProperties ?? true`.
|
|
5
|
-
*
|
|
6
|
-
* `GamutProvider` always merges an explicit boolean (default `false`).
|
|
7
|
-
*/
|
|
8
|
-
export declare function useLogicalProperties(): boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@emotion/react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Whether Gamut system props emit logical CSS properties (`marginInlineStart`, etc.)
|
|
5
|
-
* vs physical (`marginLeft`, etc.). Matches `@codecademy/variance` when the theme
|
|
6
|
-
* omits the field: `theme.useLogicalProperties ?? true`.
|
|
7
|
-
*
|
|
8
|
-
* `GamutProvider` always merges an explicit boolean (default `false`).
|
|
9
|
-
*/
|
|
10
|
-
export function useLogicalProperties() {
|
|
11
|
-
const theme = useTheme();
|
|
12
|
-
return theme.useLogicalProperties ?? true;
|
|
13
|
-
}
|
|
File without changes
|
|
File without changes
|