@codecademy/gamut 68.0.2-alpha.2a7dc4.0 → 68.0.2-alpha.76819c.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/Box/GridBox.d.ts +1 -0
- package/dist/Box/GridBox.js +1 -1
- package/dist/Button/CTAButton.d.ts +0 -1
- package/dist/Button/shared/styles.d.ts +0 -1
- package/dist/Card/index.d.ts +2 -2
- package/dist/Card/index.js +5 -4
- package/dist/Card/types.d.ts +3 -1
- package/dist/DataList/Tables/Rows/elements.d.ts +0 -1
- package/dist/Modals/elements.d.ts +0 -1
- package/dist/Tabs/TabButton.d.ts +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/typings/react-19-compat.d.ts +33 -0
- package/package.json +7 -7
- package/dist/typings/react-optional-resize.d.ts +0 -14
package/dist/Box/GridBox.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare const GridBox: import("@emotion/styled").StyledComponent<{
|
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
6
6
|
} & GridBoxProps, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof import("react").ClassAttributes<HTMLDivElement> | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "onResize" | "onResizeCapture" | "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-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" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "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" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">, {}>;
|
|
7
|
+
export type { GridBoxProps } from './props';
|
package/dist/Box/GridBox.js
CHANGED
|
@@ -7,4 +7,4 @@ export const GridBox = /*#__PURE__*/_styled('div', _extends({}, {
|
|
|
7
7
|
label: "GridBox"
|
|
8
8
|
}, styledOptions(['fit', 'center', 'fitContent'])))(system.css({
|
|
9
9
|
display: 'grid'
|
|
10
|
-
}), sharedStates, gridStates, boxProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
10
|
+
}), sharedStates, gridStates, boxProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Cb3gvR3JpZEJveC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS3VCIiwiZmlsZSI6Ii4uLy4uL3NyYy9Cb3gvR3JpZEJveC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzdHlsZWRPcHRpb25zLCBzeXN0ZW0gfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBib3hQcm9wcywgR3JpZEJveFByb3BzLCBncmlkU3RhdGVzLCBzaGFyZWRTdGF0ZXMgfSBmcm9tICcuL3Byb3BzJztcblxuZXhwb3J0IGNvbnN0IEdyaWRCb3ggPSBzdHlsZWQoXG4gICdkaXYnLFxuICBzdHlsZWRPcHRpb25zKFsnZml0JywgJ2NlbnRlcicsICdmaXRDb250ZW50J10pXG4pPEdyaWRCb3hQcm9wcz4oXG4gIHN5c3RlbS5jc3MoeyBkaXNwbGF5OiAnZ3JpZCcgfSksXG4gIHNoYXJlZFN0YXRlcyxcbiAgZ3JpZFN0YXRlcyxcbiAgYm94UHJvcHNcbik7XG5cbmV4cG9ydCB0eXBlIHsgR3JpZEJveFByb3BzIH0gZnJvbSAnLi9wcm9wcyc7XG4iXX0= */");
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const CTAButton: import("@emotion/styled").StyledComponent<Omit<import("../ButtonBase/ButtonBase").ButtonBaseProps, "ref"> & import("react").RefAttributes<import("..").ButtonBaseElements | null> & {
|
|
3
2
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
3
|
} & import("./shared").ButtonBaseProps & {
|
package/dist/Card/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { CardProps } from './types';
|
|
3
|
-
export declare const Card:
|
|
3
|
+
export declare const Card: import("react").ForwardRefExoticComponent<Omit<CardProps, "ref"> & import("react").RefAttributes<HTMLDivElement | null>>;
|
package/dist/Card/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CheckerDense } from '@codecademy/gamut-patterns';
|
|
2
2
|
import { borderRadii } from '@codecademy/gamut-styles';
|
|
3
|
-
import
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
4
|
import { DynamicCardWrapper, MotionBox, StaticCardWrapper } from './elements';
|
|
5
5
|
import { hoverShadowLeft, hoverShadowRight, patternFadeInOut } from './styles';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
export const Card = ({
|
|
7
|
+
export const Card = /*#__PURE__*/forwardRef(({
|
|
8
8
|
children,
|
|
9
9
|
variant = 'default',
|
|
10
10
|
shadow = 'none',
|
|
@@ -14,7 +14,7 @@ export const Card = ({
|
|
|
14
14
|
width = '100%',
|
|
15
15
|
height = '100%',
|
|
16
16
|
...rest
|
|
17
|
-
}) => {
|
|
17
|
+
}, ref) => {
|
|
18
18
|
const defaultBorderRadius = isInteractive ? 'md' : 'none';
|
|
19
19
|
const trueBorderRadius = borderRadius ?? defaultBorderRadius;
|
|
20
20
|
const resolvedBorderRadius = borderRadii[trueBorderRadius];
|
|
@@ -58,6 +58,7 @@ export const Card = ({
|
|
|
58
58
|
maxWidth: "100%",
|
|
59
59
|
p: 16,
|
|
60
60
|
position: "relative",
|
|
61
|
+
ref: ref,
|
|
61
62
|
shadow: shadow,
|
|
62
63
|
variant: variant,
|
|
63
64
|
variants: setHoverShadow,
|
|
@@ -65,4 +66,4 @@ export const Card = ({
|
|
|
65
66
|
children: children
|
|
66
67
|
})]
|
|
67
68
|
});
|
|
68
|
-
};
|
|
69
|
+
});
|
package/dist/Card/types.d.ts
CHANGED
|
@@ -17,4 +17,6 @@ export interface CardWrapperProps extends StyleProps<typeof cardVariants>, Style
|
|
|
17
17
|
*/
|
|
18
18
|
pattern?: React.ComponentType<PatternProps>;
|
|
19
19
|
}
|
|
20
|
-
export type CardProps = Omit<React.ComponentProps<typeof DynamicCardWrapper>, 'bg'
|
|
20
|
+
export type CardProps = Omit<React.ComponentProps<typeof DynamicCardWrapper>, 'bg' | 'ref'> & {
|
|
21
|
+
ref?: React.Ref<HTMLDivElement | null>;
|
|
22
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const StyledHeaderRow: import("@emotion/styled").StyledComponent<Omit<import("../../../List").TableHeaderProps, "ref"> & import("react").RefAttributes<HTMLTableRowElement | null> & {
|
|
3
2
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
3
|
} & Partial<Record<"invisible" | "isDataList", boolean>>, {}, {}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { StyleProps } from '@codecademy/variance';
|
|
3
2
|
declare const sizeVariant: (props: import("@codecademy/variance/dist/types/config").VariantProps<"size", false | "small" | "large" | "medium" | "fluid"> & {
|
|
4
3
|
theme?: import("@emotion/react").Theme | undefined;
|
package/dist/Tabs/TabButton.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* eslint-disable-next-line @typescript-eslint/triple-slash-reference --
|
|
2
|
-
/// <reference path="./typings/react-
|
|
1
|
+
/* eslint-disable-next-line @typescript-eslint/triple-slash-reference -- React 19 compat; remove when Emotion/React types support React 19 */
|
|
2
|
+
/// <reference path="./typings/react-19-compat.d.ts" />
|
|
3
3
|
export * from './AccordionDeprecated';
|
|
4
4
|
export * from './AccordionAreaDeprecated';
|
|
5
5
|
export * from './AccordionButtonDeprecated';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React 19 / Emotion type compatibility polyfills.
|
|
3
|
+
*
|
|
4
|
+
* REMOVE THIS FILE when @emotion/styled and @types/react fully support React 19
|
|
5
|
+
* (e.g. optional onResize, nullable refs). Until then, these module augmentations
|
|
6
|
+
* keep Gamut and its consumers type-checking with both React 18 and 19.
|
|
7
|
+
*
|
|
8
|
+
* Contents:
|
|
9
|
+
* - HTMLAttributes: onResize / onResizeCapture optional (React 19 added them as required)
|
|
10
|
+
* - RefAttributes: ref accepts LegacyRef<T | null> (useRef(null) gives RefObject<T | null>)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { SyntheticEvent } from 'react';
|
|
14
|
+
import type React from 'react';
|
|
15
|
+
|
|
16
|
+
declare module 'react' {
|
|
17
|
+
interface HTMLAttributes<T> {
|
|
18
|
+
onResize?: (event: SyntheticEvent<T>) => void;
|
|
19
|
+
onResizeCapture?: (event: SyntheticEvent<T>) => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface RefAttributes<T> {
|
|
23
|
+
ref?: React.LegacyRef<T | null> | undefined;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Not in this file (must stay in component code until upstream fixes):
|
|
29
|
+
* - forwardRef<T | null> and ref prop overrides (ButtonBaseRef, etc.) – component API
|
|
30
|
+
* - Casts when passing ref to DOM (ref as LegacyRef<T>) – implementation detail
|
|
31
|
+
* - Button union (onAnimationStart) casts in SubmitButton/GridFormButtons – union typing
|
|
32
|
+
* - Optional href on ButtonProps – Gamut API choice for link-style buttons
|
|
33
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut",
|
|
3
3
|
"description": "Styleguide & Component library for Codecademy",
|
|
4
|
-
"version": "68.0.2-alpha.
|
|
4
|
+
"version": "68.0.2-alpha.76819c.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codecademy/gamut-icons": "9.55.1-alpha.
|
|
8
|
-
"@codecademy/gamut-illustrations": "0.58.3-alpha.
|
|
9
|
-
"@codecademy/gamut-patterns": "0.10.22-alpha.
|
|
10
|
-
"@codecademy/gamut-styles": "17.11.3-alpha.
|
|
11
|
-
"@codecademy/variance": "0.25.3-alpha.
|
|
7
|
+
"@codecademy/gamut-icons": "9.55.1-alpha.76819c.0",
|
|
8
|
+
"@codecademy/gamut-illustrations": "0.58.3-alpha.76819c.0",
|
|
9
|
+
"@codecademy/gamut-patterns": "0.10.22-alpha.76819c.0",
|
|
10
|
+
"@codecademy/gamut-styles": "17.11.3-alpha.76819c.0",
|
|
11
|
+
"@codecademy/variance": "0.25.3-alpha.76819c.0",
|
|
12
12
|
"@types/marked": "^4.0.8",
|
|
13
13
|
"@vidstack/react": "^1.12.12",
|
|
14
14
|
"classnames": "^2.2.5",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"dist/**/[A-Z]**/[A-Z]*.js",
|
|
58
58
|
"dist/**/[A-Z]**/index.js"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "784a8d8f01b9e441cec9814736132e851903dac3"
|
|
61
61
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Makes onResize and onResizeCapture optional on DOM attributes.
|
|
3
|
-
* React 19 added these to HTMLAttributes; without this augmentation they can
|
|
4
|
-
* be required and break every component that forwards div/anchor/etc. props.
|
|
5
|
-
* One central fix keeps Gamut compatible with both React 18 and 19.
|
|
6
|
-
*/
|
|
7
|
-
import type { SyntheticEvent } from 'react';
|
|
8
|
-
|
|
9
|
-
declare module 'react' {
|
|
10
|
-
interface HTMLAttributes<T> {
|
|
11
|
-
onResize?: (event: SyntheticEvent<T>) => void;
|
|
12
|
-
onResizeCapture?: (event: SyntheticEvent<T>) => void;
|
|
13
|
-
}
|
|
14
|
-
}
|