@codecademy/gamut 67.4.2-alpha.fe8d77.0 → 67.4.2
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.
|
@@ -3,3 +3,4 @@ export * from './ConnectedForm';
|
|
|
3
3
|
export * from './ConnectedInputs';
|
|
4
4
|
export * from './SubmitButton';
|
|
5
5
|
export { submitSuccessStatus, USE_DEBOUNCED_FIELD_DIRTY_KEY, useConnectedForm, useDebouncedField, useField, useFormState, useGetInitialFormValue, useSubmitState, } from './utils';
|
|
6
|
+
export type { Validate, UseFormReturn, SubmitHandler } from 'react-hook-form';
|
|
@@ -44,7 +44,7 @@ export declare const useConnectedForm: <Values extends {}, ValidationRules exten
|
|
|
44
44
|
export declare const submitSuccessStatus: (wasSubmitSuccessful: boolean | undefined, isSubmitSuccessful: boolean | undefined) => boolean | undefined;
|
|
45
45
|
export declare const useFormState: () => {
|
|
46
46
|
clearErrors: import("react-hook-form").UseFormClearErrors<import("react-hook-form").FieldValues>;
|
|
47
|
-
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any>;
|
|
47
|
+
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any, import("react-hook-form").FieldValues>;
|
|
48
48
|
errors: import("react-hook-form").FieldErrors<import("react-hook-form").FieldValues>;
|
|
49
49
|
formState: import("react-hook-form").FormState<import("react-hook-form").FieldValues>;
|
|
50
50
|
getValues: import("react-hook-form").UseFormGetValues<import("react-hook-form").FieldValues>;
|
|
@@ -66,7 +66,7 @@ interface useFieldProps extends SubmitContextProps {
|
|
|
66
66
|
name: string;
|
|
67
67
|
}
|
|
68
68
|
export declare const useField: ({ name, disabled, loading }: useFieldProps) => {
|
|
69
|
-
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any>;
|
|
69
|
+
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any, import("react-hook-form").FieldValues>;
|
|
70
70
|
error: string | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
|
|
71
71
|
getValues: import("react-hook-form").UseFormGetValues<import("react-hook-form").FieldValues>;
|
|
72
72
|
isDisabled: boolean;
|
|
@@ -122,7 +122,7 @@ export declare function useDebouncedField<T extends InputTypes>({ name, watchUpd
|
|
|
122
122
|
value: T extends "checkbox" ? boolean : string;
|
|
123
123
|
error: string | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
|
|
124
124
|
ref: import("react-hook-form").UseFormRegisterReturn<string>;
|
|
125
|
-
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any>;
|
|
125
|
+
control: import("react-hook-form").Control<import("react-hook-form").FieldValues, any, import("react-hook-form").FieldValues>;
|
|
126
126
|
isDisabled: boolean;
|
|
127
127
|
isLoading: boolean | undefined;
|
|
128
128
|
isSoloField: boolean | undefined;
|
package/dist/Form/types.d.ts
CHANGED
package/dist/Tabs/Tab.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { TabProps as ReactAriaTabProps } from 'react-aria-components';
|
|
|
3
3
|
import { TabButtonProps } from './TabButton';
|
|
4
4
|
interface TabBaseProps extends TabButtonProps, ReactAriaTabProps {
|
|
5
5
|
}
|
|
6
|
-
export type TabProps = Omit<
|
|
6
|
+
export type TabProps = TabBaseProps & Omit<ReactAriaTabProps, 'id'> & {
|
|
7
7
|
/**
|
|
8
8
|
* the id matches up the tab and tab panel
|
|
9
9
|
*/
|
package/dist/Tabs/Tab.js
CHANGED
|
@@ -8,7 +8,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
8
8
|
const TabBase = /*#__PURE__*/_styled(ReactAriaTab, {
|
|
9
9
|
target: "eknaphq0",
|
|
10
10
|
label: "TabBase"
|
|
11
|
-
})(tabVariants, tabStates, tabElementBaseProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
11
|
+
})(tabVariants, tabStates, tabElementBaseProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,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FzZVByb3BzXG4pO1xuXG5leHBvcnQgY29uc3QgVGFiOiBSZWFjdC5GQzxUYWJQcm9wcz4gPSAocHJvcHMpID0+IHtcbiAgY29uc3QgeyB2YXJpYW50IH0gPSB1c2VUYWIoKTtcblxuICByZXR1cm4gPFRhYkJhc2Ugey4uLnByb3BzfSB2YXJpYW50PXt2YXJpYW50fSAvPjtcbn07XG4iXX0= */");
|
|
12
12
|
export const Tab = props => {
|
|
13
13
|
const {
|
|
14
14
|
variant
|
package/dist/Tabs/TabPanel.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { TabPanelProps as ReactAriaTabPanelProps } from 'react-aria-components';
|
|
3
3
|
import { TabElementStyleProps } from './props';
|
|
4
4
|
interface TabPanelBaseProps extends TabElementStyleProps, ReactAriaTabPanelProps {
|
|
5
5
|
}
|
|
6
|
-
export type TabPanelProps = Omit<
|
|
6
|
+
export type TabPanelProps = TabPanelBaseProps & Omit<ReactAriaTabPanelProps, 'id'> & {
|
|
7
7
|
/**
|
|
8
8
|
* the id matches up the tab and tab panel
|
|
9
9
|
*/
|
|
10
10
|
id: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const TabPanel: import("@emotion/styled").StyledComponent<ReactAriaTabPanelProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
13
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
+
} & TabPanelBaseProps & Omit<ReactAriaTabPanelProps, "id"> & {
|
|
11
15
|
/**
|
|
12
|
-
*
|
|
13
|
-
* This is a wrapper around the `shouldForceMount` prop in react-aria-components that also visually hides the inactive tab panel.
|
|
16
|
+
* the id matches up the tab and tab panel
|
|
14
17
|
*/
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
export declare const TabPanel: React.FC<TabPanelProps>;
|
|
18
|
+
id: string;
|
|
19
|
+
}, {}, {}>;
|
|
18
20
|
export {};
|
package/dist/Tabs/TabPanel.js
CHANGED
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
|
-
import { system } from '@codecademy/gamut-styles';
|
|
3
|
-
import * as React from 'react';
|
|
4
2
|
import { TabPanel as ReactAriaTabPanel } from 'react-aria-components';
|
|
5
3
|
import { tabElementBaseProps } from './props';
|
|
6
|
-
|
|
7
|
-
const tabPanelStates = system.states({
|
|
8
|
-
shouldForceMount: {
|
|
9
|
-
"&[data-inert='true']": {
|
|
10
|
-
display: 'none'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const StyledTabPanel = /*#__PURE__*/_styled(ReactAriaTabPanel, {
|
|
4
|
+
export const TabPanel = /*#__PURE__*/_styled(ReactAriaTabPanel, {
|
|
15
5
|
target: "e1bw1p150",
|
|
16
|
-
label: "
|
|
17
|
-
})(tabElementBaseProps,
|
|
18
|
-
export const TabPanel = props => {
|
|
19
|
-
return /*#__PURE__*/_jsx(StyledTabPanel, {
|
|
20
|
-
...props
|
|
21
|
-
});
|
|
22
|
-
};
|
|
6
|
+
label: "TabPanel"
|
|
7
|
+
})(tabElementBaseProps, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9UYWJzL1RhYlBhbmVsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQkUiLCJmaWxlIjoiLi4vLi4vc3JjL1RhYnMvVGFiUGFuZWwudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHtcbiAgVGFiUGFuZWwgYXMgUmVhY3RBcmlhVGFiUGFuZWwsXG4gIFRhYlBhbmVsUHJvcHMgYXMgUmVhY3RBcmlhVGFiUGFuZWxQcm9wcyxcbn0gZnJvbSAncmVhY3QtYXJpYS1jb21wb25lbnRzJztcblxuaW1wb3J0IHsgdGFiRWxlbWVudEJhc2VQcm9wcywgVGFiRWxlbWVudFN0eWxlUHJvcHMgfSBmcm9tICcuL3Byb3BzJztcblxuaW50ZXJmYWNlIFRhYlBhbmVsQmFzZVByb3BzXG4gIGV4dGVuZHMgVGFiRWxlbWVudFN0eWxlUHJvcHMsXG4gICAgUmVhY3RBcmlhVGFiUGFuZWxQcm9wcyB7fVxuXG5leHBvcnQgdHlwZSBUYWJQYW5lbFByb3BzID0gVGFiUGFuZWxCYXNlUHJvcHMgJlxuICBPbWl0PFJlYWN0QXJpYVRhYlBhbmVsUHJvcHMsICdpZCc+ICYge1xuICAgIC8qKlxuICAgICAqIHRoZSBpZCBtYXRjaGVzIHVwIHRoZSB0YWIgYW5kIHRhYiBwYW5lbFxuICAgICAqL1xuICAgIGlkOiBzdHJpbmc7XG4gIH07XG5cbmV4cG9ydCBjb25zdCBUYWJQYW5lbCA9XG4gIHN0eWxlZChSZWFjdEFyaWFUYWJQYW5lbCk8VGFiUGFuZWxQcm9wcz4odGFiRWxlbWVudEJhc2VQcm9wcyk7XG4iXX0= */");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut",
|
|
3
3
|
"description": "Styleguide & Component library for Codecademy",
|
|
4
|
-
"version": "67.4.2
|
|
4
|
+
"version": "67.4.2",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@codecademy/gamut-icons": "9.52.1",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-aria-components": "1.8.0",
|
|
22
22
|
"react-aria-tabpanel": "^4.4.0",
|
|
23
23
|
"react-focus-on": "^3.10.0",
|
|
24
|
-
"react-hook-form": "^7.
|
|
24
|
+
"react-hook-form": "^7.65.0",
|
|
25
25
|
"react-player": "^2.16.0",
|
|
26
26
|
"react-select": "^5.2.2",
|
|
27
27
|
"react-truncate-markup": "^5.1.2",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"dist/**/[A-Z]**/[A-Z]*.js",
|
|
57
57
|
"dist/**/[A-Z]**/index.js"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "744ff3c93e9b07a521e644609f13a30ec53232ab"
|
|
60
60
|
}
|