@codecademy/gamut 68.1.3-alpha.76714f.0 → 68.1.3-alpha.77bf63.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/AccordionButtonDeprecated/ButtonDeprecated/index.d.ts +2 -2
- package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.js +1 -1
- package/dist/Alert/Alert.d.ts +0 -1
- package/dist/Alert/elements.d.ts +29 -10
- package/dist/Alert/variants.d.ts +1 -2
- package/dist/Anchor/index.d.ts +35 -14
- package/dist/Anchor/index.js +3 -6
- package/dist/Animation/ExpandInCollapseOut.d.ts +0 -1
- package/dist/AppWrapper/index.d.ts +12 -5
- package/dist/AppWrapper/index.js +6 -8
- package/dist/Badge/index.d.ts +2 -3
- package/dist/Box/Box.d.ts +3 -4
- package/dist/Box/FlexBox.d.ts +3 -4
- package/dist/Box/GridBox.d.ts +3 -4
- package/dist/Box/props.d.ts +3 -3
- package/dist/Breadcrumbs/index.d.ts +5 -5
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Button/CTAButton.d.ts +15 -7
- package/dist/Button/CTAButton.js +1 -5
- package/dist/Button/FillButton.d.ts +36 -9
- package/dist/Button/FillButton.js +2 -6
- package/dist/Button/IconButton.d.ts +43 -9
- package/dist/Button/IconButton.js +2 -6
- package/dist/Button/StrokeButton.d.ts +36 -9
- package/dist/Button/StrokeButton.js +2 -6
- package/dist/Button/TextButton.d.ts +36 -9
- package/dist/Button/TextButton.js +2 -6
- package/dist/Button/shared/InlineIconButton.d.ts +29 -10
- package/dist/Button/shared/InlineIconButton.js +1 -2
- package/dist/Button/shared/styles.d.ts +16 -13
- package/dist/Button/shared/types.d.ts +2 -4
- package/dist/Button/shared/variants.d.ts +6 -6
- package/dist/ButtonBase/ButtonBase.d.ts +12 -11
- package/dist/ButtonBase/ButtonBase.js +4 -8
- package/dist/Card/elements.d.ts +43 -87
- package/dist/Card/styles.d.ts +2 -2
- package/dist/ConnectedForm/ConnectedForm.d.ts +1 -1
- package/dist/ConnectedForm/ConnectedFormGroup.js +4 -3
- package/dist/ConnectedForm/ConnectedInputs/ConnectedNestedCheckboxes/utils.d.ts +0 -1
- package/dist/ConnectedForm/utils.d.ts +9 -3
- package/dist/ConnectedForm/utils.js +1 -1
- package/dist/ContentContainer/index.d.ts +6 -7
- package/dist/ContentContainer/index.js +3 -7
- package/dist/DataList/Tables/Rows/elements.d.ts +2 -3
- package/dist/DataList/hooks/useListControls.d.ts +1 -2
- package/dist/DataList/hooks/useListState.d.ts +0 -1
- package/dist/Disclosure/elements.d.ts +104 -26
- package/dist/Disclosure/helpers.d.ts +4 -4
- package/dist/Disclosure/types.d.ts +0 -1
- package/dist/Drawer/index.d.ts +0 -1
- package/dist/FeatureShimmer/index.d.ts +0 -1
- package/dist/Form/SelectDropdown/SelectDropdown.js +1 -1
- package/dist/Form/SelectDropdown/elements/constants.d.ts +0 -1
- package/dist/Form/SelectDropdown/elements/containers.d.ts +0 -1
- package/dist/Form/SelectDropdown/elements/containers.js +1 -1
- package/dist/Form/SelectDropdown/elements/controls.js +1 -1
- package/dist/Form/SelectDropdown/elements/multi-value.js +1 -1
- package/dist/Form/SelectDropdown/styles.d.ts +1 -1
- package/dist/Form/SelectDropdown/utils.d.ts +2 -2
- package/dist/Form/SelectDropdown/utils.js +2 -1
- package/dist/Form/__fixtures__/utils.d.ts +0 -1
- package/dist/Form/elements/Form.d.ts +4 -4
- package/dist/Form/elements/FormError.d.ts +1 -1
- package/dist/Form/elements/FormGroup.d.ts +5 -5
- package/dist/Form/elements/FormGroupDescription.d.ts +3 -4
- package/dist/Form/elements/FormGroupLabel.d.ts +2 -2
- package/dist/Form/inputs/Checkbox.d.ts +1 -2
- package/dist/Form/inputs/Checkbox.js +9 -10
- package/dist/Form/inputs/Input.d.ts +4 -8
- package/dist/Form/inputs/Radio.d.ts +8 -8
- package/dist/Form/inputs/Select.d.ts +5 -2
- package/dist/Form/inputs/Select.js +5 -6
- package/dist/Form/inputs/TextArea.d.ts +4 -2
- package/dist/Form/inputs/TextArea.js +3 -4
- package/dist/Form/styles/Checkbox-styles.d.ts +8 -16
- package/dist/Form/styles/Radio-styles.d.ts +4 -8
- package/dist/Form/styles/shared-system-props.d.ts +7 -12
- package/dist/GridForm/GridFormButtons/index.d.ts +34 -2
- package/dist/GridForm/GridFormInputGroup/__fixtures__/assertions.d.ts +2 -2
- package/dist/GridForm/GridFormSections/GridFormSectionBreak.d.ts +2 -2
- package/dist/HiddenText/index.d.ts +4 -5
- package/dist/HiddenText/index.js +7 -11
- package/dist/InternalFloatingCard/InternalFloatingCard.d.ts +4 -4
- package/dist/Layout/Column.d.ts +6 -4
- package/dist/Layout/Column.js +3 -4
- package/dist/Layout/LayoutGrid.d.ts +5 -3
- package/dist/Layout/LayoutGrid.js +3 -4
- package/dist/List/Header/ListHeaderCol.d.ts +1 -2
- package/dist/List/Header/ListHeaderCol.js +2 -3
- package/dist/List/ListCol.d.ts +1 -2
- package/dist/List/ListCol.js +2 -3
- package/dist/List/ListProvider.d.ts +0 -1
- package/dist/List/TableHeader.d.ts +1 -2
- package/dist/List/TableHeader.js +2 -3
- package/dist/List/elements.d.ts +46 -64
- package/dist/List/hooks.d.ts +1 -2
- package/dist/Menu/Menu.d.ts +4 -7
- package/dist/Menu/Menu.js +2 -5
- package/dist/Menu/MenuContext.d.ts +0 -1
- package/dist/Menu/MenuItem.d.ts +1 -3
- package/dist/Menu/MenuItem.js +2 -3
- package/dist/Menu/elements.d.ts +15 -15
- package/dist/Modals/Dialog.js +2 -1
- package/dist/Modals/Modal.js +2 -1
- package/dist/Modals/elements.d.ts +3 -4
- package/dist/Pagination/AnimatedPaginationButtons.d.ts +160 -177
- package/dist/Pagination/EllipsisButton.d.ts +38 -8
- package/dist/Pagination/EllipsisButton.js +1 -4
- package/dist/Pagination/PaginationButton.d.ts +57 -18
- package/dist/Pagination/PaginationButton.js +2 -6
- package/dist/Pagination/styles.d.ts +4 -4
- package/dist/Pagination/utils.d.ts +162 -177
- package/dist/Popover/Popover.d.ts +0 -1
- package/dist/Popover/elements.d.ts +18 -19
- package/dist/Popover/styles/base.d.ts +2 -2
- package/dist/Popover/styles/beak.d.ts +1 -1
- package/dist/Popover/styles/variants.d.ts +6 -6
- package/dist/Popover/utils.d.ts +1 -1
- package/dist/PopoverContainer/hooks.d.ts +0 -1
- package/dist/PopoverContainer/hooks.js +2 -1
- package/dist/PopoverContainer/utils.d.ts +1 -1
- package/dist/SkipToContent/index.d.ts +2 -2
- package/dist/Tabs/TabButton.d.ts +15 -5
- package/dist/Tabs/TabButton.js +3 -4
- package/dist/Tabs/TabNav.d.ts +5 -4
- package/dist/Tabs/TabNav.js +3 -4
- package/dist/Tabs/TabNavLink.d.ts +17 -7
- package/dist/Tabs/TabNavLink.js +1 -4
- package/dist/Tabs/TabPanels.d.ts +5 -4
- package/dist/Tabs/TabPanels.js +3 -4
- package/dist/Tabs/TabProvider.d.ts +0 -1
- package/dist/Tabs/styles.d.ts +2 -2
- package/dist/Tag/elements.d.ts +73 -21
- package/dist/Tag/index.js +1 -1
- package/dist/Tag/styles.d.ts +12 -22
- package/dist/Tip/InfoTip/InfoTipButton.d.ts +39 -9
- package/dist/Tip/InfoTip/InfoTipButton.js +2 -6
- package/dist/Tip/InfoTip/index.d.ts +0 -1
- package/dist/Tip/InfoTip/styles.d.ts +9 -12
- package/dist/Tip/PreviewTip/elements.d.ts +32 -8
- package/dist/Tip/PreviewTip/utils.d.ts +1 -1
- package/dist/Tip/ToolTip/elements.d.ts +4 -5
- package/dist/Tip/ToolTip/index.d.ts +0 -1
- package/dist/Tip/__tests__/helpers.d.ts +6 -6
- package/dist/Tip/shared/InlineTip.d.ts +0 -1
- package/dist/Tip/shared/elements.d.ts +22 -23
- package/dist/Tip/shared/styles/composeVariantsUtils.d.ts +2 -2
- package/dist/Tip/shared/styles/styles.d.ts +4 -4
- package/dist/Tip/shared/utils.d.ts +0 -1
- package/dist/Tip/shared/utils.js +1 -1
- package/dist/Toggle/elements.d.ts +12 -13
- package/dist/Toggle/utils.d.ts +1 -1
- package/dist/Typography/Text.d.ts +11 -8
- package/dist/Typography/Text.js +3 -6
- package/dist/Video/lib/ReactPlayer.d.ts +2 -3
- package/dist/Video/lib/VideoLayout.d.ts +0 -1
- package/dist/utils/nullish.d.ts +10 -0
- package/dist/utils/nullish.js +11 -0
- package/dist/utils/react.js +2 -1
- package/dist/utils/types.d.ts +0 -1
- package/package.json +8 -8
package/dist/Tip/shared/utils.js
CHANGED
|
@@ -95,7 +95,7 @@ export const isFloatingElementOpen = element => {
|
|
|
95
95
|
* Only perform this expensive querySelector operation after all other checks pass.
|
|
96
96
|
*/
|
|
97
97
|
const toggleButton = element.querySelector('button[aria-expanded], [role="button"][aria-expanded]');
|
|
98
|
-
if (toggleButton
|
|
98
|
+
if (toggleButton?.getAttribute('aria-expanded') === 'false') {
|
|
99
99
|
return false;
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { system } from '@codecademy/gamut-styles';
|
|
3
2
|
import { StyleProps } from '@codecademy/variance';
|
|
4
3
|
export declare const sizes: {
|
|
@@ -12,10 +11,10 @@ export declare const sizes: {
|
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
13
|
export declare const ToggleTrack: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme
|
|
16
|
-
as?:
|
|
14
|
+
theme?: import("@emotion/react").Theme;
|
|
15
|
+
as?: React.ElementType;
|
|
17
16
|
} & import("@codecademy/variance/dist/types/config").VariantProps<"size", false | "small" | "medium"> & {
|
|
18
|
-
theme?: import("@emotion/react").Theme
|
|
17
|
+
theme?: import("@emotion/react").Theme;
|
|
19
18
|
} & {
|
|
20
19
|
color?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
21
20
|
readonly property: "color";
|
|
@@ -181,21 +180,21 @@ export declare const ToggleTrack: import("@emotion/styled").StyledComponent<{
|
|
|
181
180
|
}>;
|
|
182
181
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
183
182
|
export declare const Circle: import("@emotion/styled").StyledComponent<{
|
|
184
|
-
theme?: import("@emotion/react").Theme
|
|
185
|
-
as?:
|
|
186
|
-
} & import("../Box").BoxProps & 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" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "
|
|
187
|
-
theme?: import("@emotion/react").Theme
|
|
183
|
+
theme?: import("@emotion/react").Theme;
|
|
184
|
+
as?: React.ElementType;
|
|
185
|
+
} & import("../Box").BoxProps & 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" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "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"> & {
|
|
186
|
+
theme?: import("@emotion/react").Theme;
|
|
188
187
|
}, {}, {}>;
|
|
189
188
|
export declare const ToggleInput: import("@emotion/styled").StyledComponent<{
|
|
190
|
-
theme?: import("@emotion/react").Theme
|
|
191
|
-
as?:
|
|
189
|
+
theme?: import("@emotion/react").Theme;
|
|
190
|
+
as?: React.ElementType;
|
|
192
191
|
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
193
192
|
export type ToggleStyleProps = StyleProps<typeof system.space>;
|
|
194
193
|
export declare const ToggleLabel: import("@emotion/styled").StyledComponent<{
|
|
195
|
-
theme?: import("@emotion/react").Theme
|
|
196
|
-
as?:
|
|
194
|
+
theme?: import("@emotion/react").Theme;
|
|
195
|
+
as?: React.ElementType;
|
|
197
196
|
} & Partial<Record<"disabled" | "labelRight", boolean>> & {
|
|
198
|
-
theme?: import("@emotion/react").Theme
|
|
197
|
+
theme?: import("@emotion/react").Theme;
|
|
199
198
|
} & {
|
|
200
199
|
p?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
201
200
|
readonly property: "padding";
|
package/dist/Toggle/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ToggleInputStyledProps, ToggleProps } from './types';
|
|
2
|
-
export declare const getToggleElementProps: <Props extends ToggleProps>({ ariaLabel, as, checked, disabled, label, onChange, onClick, }: Pick<Props, "
|
|
2
|
+
export declare const getToggleElementProps: <Props extends ToggleProps>({ ariaLabel, as, checked, disabled, label, onChange, onClick, }: Pick<Props, "ariaLabel" | "as" | "checked" | "disabled" | "label" | "onChange" | "onClick">) => Omit<ToggleInputStyledProps, "size" | "color">;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { StyleProps } from '@codecademy/variance';
|
|
2
|
-
import type { ComponentPropsWithoutRef, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
2
|
declare const displayVariants: (props: import("@codecademy/variance/dist/types/config").VariantProps<"variant", false | "title-xxl" | "title-xl" | "title-lg" | "title-md" | "title-sm" | "title-xs" | "p-base" | "p-small" | "p-large"> & {
|
|
4
|
-
theme?: import("@emotion/react").Theme
|
|
3
|
+
theme?: import("@emotion/react").Theme;
|
|
5
4
|
}) => import("@codecademy/variance").CSSObject;
|
|
6
5
|
declare const elementVariants: (props: import("@codecademy/variance/dist/types/config").VariantProps<"as", false | "small" | "code" | "div" | "figcaption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "p" | "span" | "strong"> & {
|
|
7
|
-
theme?: import("@emotion/react").Theme
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
8
7
|
}) => import("@codecademy/variance").CSSObject;
|
|
9
8
|
declare const truncateVariants: (props: import("@codecademy/variance/dist/types/config").VariantProps<"truncate", false | "ellipsis" | "fade"> & {
|
|
10
|
-
theme?: import("@emotion/react").Theme
|
|
9
|
+
theme?: import("@emotion/react").Theme;
|
|
11
10
|
}) => import("@codecademy/variance").CSSObject;
|
|
12
11
|
declare const textStates: (props: Partial<Record<"center" | "block" | "highlight" | "screenreader" | "smooth", boolean>> & {
|
|
13
|
-
theme?: import("@emotion/react").Theme
|
|
12
|
+
theme?: import("@emotion/react").Theme;
|
|
14
13
|
}) => import("@codecademy/variance").CSSObject;
|
|
15
14
|
declare const textProps: import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").Compose<[import("@codecademy/variance/dist/types/config").Parser<import("@codecademy/variance/dist/types/config").TransformerMap<{
|
|
16
15
|
readonly flexBasis: {
|
|
@@ -377,7 +376,11 @@ export interface TextNoTruncateProps extends BaseTextProps {
|
|
|
377
376
|
truncate?: never;
|
|
378
377
|
}
|
|
379
378
|
export type TextProps = TextTruncateProps | TextNoTruncateProps;
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
export declare const Text: import("react").ForwardRefExoticComponent<(Omit<{
|
|
380
|
+
theme?: import("@emotion/react").Theme;
|
|
381
|
+
as?: React.ElementType;
|
|
382
|
+
} & TextTruncateProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "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" | keyof import("react").ClassAttributes<HTMLSpanElement>>, "ref"> | Omit<{
|
|
383
|
+
theme?: import("@emotion/react").Theme;
|
|
384
|
+
as?: React.ElementType;
|
|
385
|
+
} & TextNoTruncateProps & Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "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" | keyof import("react").ClassAttributes<HTMLSpanElement>>, "ref">) & import("react").RefAttributes<HTMLSpanElement>>;
|
|
383
386
|
export {};
|
package/dist/Typography/Text.js
CHANGED
|
@@ -107,13 +107,11 @@ const textProps = variance.compose(system.layout, system.typography, system.colo
|
|
|
107
107
|
|
|
108
108
|
// if you're going to truncate, you need to provide both of these props or neither
|
|
109
109
|
|
|
110
|
-
/** Props for Text component including element attributes. Use when wrapping or composing Text. */
|
|
111
|
-
|
|
112
110
|
const StyledText = /*#__PURE__*/_styled('span', _extends({}, {
|
|
113
111
|
target: "e8i0p5k0",
|
|
114
112
|
label: "StyledText"
|
|
115
|
-
}, styledOptions()))(elementVariants, truncateVariants, displayVariants, textStates, textProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
116
|
-
const
|
|
113
|
+
}, styledOptions()))(elementVariants, truncateVariants, displayVariants, textStates, textProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9UeXBvZ3JhcGh5L1RleHQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZJbUIiLCJmaWxlIjoiLi4vLi4vc3JjL1R5cG9ncmFwaHkvVGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBzdGF0ZXMsXG4gIHN0eWxlZE9wdGlvbnMsXG4gIHN5c3RlbSxcbiAgdmFyaWFudCxcbn0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtc3R5bGVzJztcbmltcG9ydCB7IFN0eWxlUHJvcHMsIHZhcmlh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4gIHRydW5jYXRlTGluZXM/OiBuZXZlcjtcbiAgdHJ1bmNhdGU/OiBuZXZlcjtcbn1cblxuZXhwb3J0IHR5cGUgVGV4dFByb3BzID0gVGV4dFRydW5jYXRlUHJvcHMgfCBUZXh0Tm9UcnVuY2F0ZVByb3BzO1xuXG5jb25zdCBTdHlsZWRUZXh0ID0gc3R5bGVkKCdzcGFuJywgc3R5bGVkT3B0aW9uczwnc3Bhbic+KCkpPFRleHRQcm9wcz4oXG4gIGVsZW1lbnRWYXJpYW50cyxcbiAgdHJ1bmNhdGVWYXJpYW50cyxcbiAgZGlzcGxheVZhcmlhbnRzLFxuICB0ZXh0U3RhdGVzLFxuICB0ZXh0UHJvcHNcbik7XG5cbmV4cG9ydCBjb25zdCBUZXh0ID0gZm9yd2FyZFJlZjxcbiAgSFRNTFNwYW5FbGVtZW50LFxuICBDb21wb25lbnRQcm9wczx0eXBlb2YgU3R5bGVkVGV4dD5cbj4oKHsgYXMgPSAnc3BhbicsIG0gPSAwLCAuLi5yZXN0IH0sIHJlZikgPT4gKFxuICA8U3R5bGVkVGV4dCBhcz17YXN9IG09e219IHJlZj17cmVmfSB7Li4ucmVzdH0gLz5cbikpO1xuIl19 */");
|
|
114
|
+
export const Text = /*#__PURE__*/forwardRef(({
|
|
117
115
|
as = 'span',
|
|
118
116
|
m = 0,
|
|
119
117
|
...rest
|
|
@@ -122,5 +120,4 @@ const TextComponent = /*#__PURE__*/forwardRef(({
|
|
|
122
120
|
m: m,
|
|
123
121
|
ref: ref,
|
|
124
122
|
...rest
|
|
125
|
-
}));
|
|
126
|
-
export const Text = TextComponent;
|
|
123
|
+
}));
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import ReactPlayer from 'react-player';
|
|
3
2
|
export declare const ReactVideoPlayer: import("@emotion/styled").StyledComponent<import("react-player").ReactPlayerProps & {
|
|
4
|
-
theme?: import("@emotion/react").Theme
|
|
3
|
+
theme?: import("@emotion/react").Theme;
|
|
5
4
|
}, {}, {
|
|
6
5
|
ref?: import("react").Ref<ReactPlayer> | undefined;
|
|
7
6
|
}>;
|
|
8
7
|
export declare const OverlayPlayButton: ({ videoTitle }: {
|
|
9
|
-
videoTitle?: string
|
|
8
|
+
videoTitle?: string;
|
|
10
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
/**
|
|
12
11
|
* @remarks ReactPlayer has optional key 'wrapper' that we require for the onReady callback
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when `value` is `null` or `undefined`.
|
|
3
|
+
* Use instead of `value == null` when `eqeqeq` is enforced.
|
|
4
|
+
*/
|
|
5
|
+
export declare const isNullish: (value: unknown) => value is null | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* True when `value` is neither `null` nor `undefined`.
|
|
8
|
+
* Use instead of `value != null` when `eqeqeq` is enforced.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isDefined: <T>(value: T | null | undefined) => value is T;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when `value` is `null` or `undefined`.
|
|
3
|
+
* Use instead of `value == null` when `eqeqeq` is enforced.
|
|
4
|
+
*/
|
|
5
|
+
export const isNullish = value => value === null || value === undefined;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* True when `value` is neither `null` nor `undefined`.
|
|
9
|
+
* Use instead of `value != null` when `eqeqeq` is enforced.
|
|
10
|
+
*/
|
|
11
|
+
export const isDefined = value => value !== undefined && value !== null;
|
package/dist/utils/react.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Children, isValidElement } from 'react';
|
|
2
|
+
import { isNullish } from './nullish';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Recursively extracts plain text content from React children.
|
|
@@ -29,7 +30,7 @@ export const extractTextContent = children => {
|
|
|
29
30
|
if (typeof child === 'string' || typeof child === 'number') {
|
|
30
31
|
return String(child);
|
|
31
32
|
}
|
|
32
|
-
if (typeof child === 'boolean' || child
|
|
33
|
+
if (typeof child === 'boolean' || isNullish(child)) {
|
|
33
34
|
return '';
|
|
34
35
|
}
|
|
35
36
|
if (/*#__PURE__*/isValidElement(child)) {
|
package/dist/utils/types.d.ts
CHANGED
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.1.3-alpha.
|
|
4
|
+
"version": "68.1.3-alpha.77bf63.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codecademy/gamut-icons": "9.57.1-alpha.
|
|
8
|
-
"@codecademy/gamut-illustrations": "0.58.8-alpha.
|
|
9
|
-
"@codecademy/gamut-patterns": "0.10.27-alpha.
|
|
10
|
-
"@codecademy/gamut-styles": "17.12.2-alpha.
|
|
11
|
-
"@codecademy/variance": "0.26.1-alpha.
|
|
7
|
+
"@codecademy/gamut-icons": "9.57.1-alpha.77bf63.0",
|
|
8
|
+
"@codecademy/gamut-illustrations": "0.58.8-alpha.77bf63.0",
|
|
9
|
+
"@codecademy/gamut-patterns": "0.10.27-alpha.77bf63.0",
|
|
10
|
+
"@codecademy/gamut-styles": "17.12.2-alpha.77bf63.0",
|
|
11
|
+
"@codecademy/variance": "0.26.1-alpha.77bf63.0",
|
|
12
12
|
"@react-aria/interactions": "3.25.0",
|
|
13
13
|
"@types/marked": "^4.0.8",
|
|
14
14
|
"@vidstack/react": "^1.12.12",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"polished": "^4.1.2",
|
|
22
22
|
"react-aria-components": "1.7.1",
|
|
23
23
|
"react-focus-on": "3.10.0",
|
|
24
|
-
"react-hook-form": "^7.
|
|
24
|
+
"react-hook-form": "^7.71.2",
|
|
25
25
|
"react-player": "^2.16.0",
|
|
26
26
|
"react-select": "^5.2.2",
|
|
27
27
|
"react-truncate-markup": "^5.1.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"dist/**/[A-Z]**/[A-Z]*.js",
|
|
60
60
|
"dist/**/[A-Z]**/index.js"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "2b9fc62e41c84dbe7c0f25fe7f5b9f22335cc223"
|
|
63
63
|
}
|