@workday/canvas-kit-preview-react 7.0.0-alpha.0-next.6 → 7.0.0-alpha.79-next.7
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/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx +51 -22
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +2 -2
- package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +1 -0
- package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +5 -1
- package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +1 -1
- package/color-picker/lib/ColorPicker.tsx +3 -3
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +33 -5
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +2 -2
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +2 -2
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +2 -2
- package/dist/commonjs/form-field/lib/FormField.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormField.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.js +2 -2
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldInput.js +2 -2
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +2 -3
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts +4 -4
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +24 -9
- package/dist/commonjs/text-area/lib/TextArea.js +1 -1
- package/dist/commonjs/text-input/lib/TextInput.js +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +35 -7
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +2 -2
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +2 -2
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.js +3 -3
- package/dist/es6/form-field/lib/FormField.d.ts +1 -1
- package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormField.js +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.js +1 -1
- package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldInput.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldInput.js +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.js +1 -2
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +1 -1
- package/dist/es6/side-panel/lib/SidePanel.d.ts +4 -4
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +26 -11
- package/dist/es6/text-area/lib/TextArea.js +1 -1
- package/dist/es6/text-input/lib/TextInput.js +1 -1
- package/form-field/lib/FormField.tsx +1 -1
- package/form-field/lib/FormFieldHint.tsx +1 -1
- package/form-field/lib/FormFieldInput.tsx +1 -1
- package/form-field/lib/FormFieldLabel.tsx +1 -2
- package/form-field/lib/hooks/useFormFieldOrientation.tsx +1 -1
- package/menu/lib/Menu.tsx +1 -1
- package/package.json +4 -4
- package/side-panel/lib/SidePanel.tsx +36 -21
- package/text-area/lib/TextArea.tsx +1 -1
- package/text-input/lib/TextInput.tsx +1 -1
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
- package/ts3.5/dist/commonjs/form-field/lib/FormField.d.ts +1 -1
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +1 -1
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +1 -1
- package/ts3.5/dist/commonjs/side-panel/lib/SidePanel.d.ts +4 -4
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
- package/ts3.5/dist/es6/form-field/lib/FormField.d.ts +1 -1
- package/ts3.5/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
- package/ts3.5/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
- package/ts3.5/dist/es6/form-field/lib/FormFieldLabel.d.ts +1 -1
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +1 -1
- package/ts3.5/dist/es6/side-panel/lib/SidePanel.d.ts +4 -4
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {styled, useIsRTL
|
|
5
|
-
import {css, jsx, keyframes} from '@emotion/react';
|
|
6
|
-
import {
|
|
7
|
-
import {space, colors} from '@workday/canvas-kit-react/tokens';
|
|
4
|
+
import {styled, useIsRTL} from '@workday/canvas-kit-react/common';
|
|
5
|
+
import {css, jsx, keyframes, CSSObject} from '@emotion/react';
|
|
6
|
+
import {TertiaryButton, TertiaryButtonProps} from '@workday/canvas-kit-react/button';
|
|
7
|
+
import {space, colors, depth} from '@workday/canvas-kit-react/tokens';
|
|
8
8
|
import {transformationImportIcon} from '@workday/canvas-system-icons-web';
|
|
9
9
|
import {Tooltip} from '@workday/canvas-kit-react/tooltip';
|
|
10
|
-
import {Box} from '@workday/canvas-kit-labs-react/common';
|
|
11
10
|
|
|
12
11
|
export type SidePanelVariant = 'standard' | 'alternate';
|
|
13
12
|
export type SidePanelTransitionStates = 'collapsed' | 'collapsing' | 'expanded' | 'expanding';
|
|
@@ -57,7 +56,7 @@ export interface SidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
57
56
|
*/
|
|
58
57
|
onStateTransition?: (state?: SidePanelTransitionStates) => void;
|
|
59
58
|
/**
|
|
60
|
-
* The style variant of the side panel. 'standard' is with a `soap100` background, no depth. 'alternate' is a `frenchVanilla100` background with a level
|
|
59
|
+
* The style variant of the side panel. 'standard' is with a `soap100` background, no depth. 'alternate' is a `frenchVanilla100` background with a level 6 depth.
|
|
61
60
|
*
|
|
62
61
|
* @default 'standard'
|
|
63
62
|
*/
|
|
@@ -89,7 +88,17 @@ const createKeyframes = (from: number | string, to: number | string) => {
|
|
|
89
88
|
`;
|
|
90
89
|
};
|
|
91
90
|
|
|
92
|
-
const
|
|
91
|
+
const containerVariantStyle: Record<SidePanelVariant, CSSObject> = {
|
|
92
|
+
alternate: {
|
|
93
|
+
backgroundColor: colors.frenchVanilla100,
|
|
94
|
+
...depth[5],
|
|
95
|
+
},
|
|
96
|
+
standard: {
|
|
97
|
+
backgroundColor: colors.soap100,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const Panel = styled('section')<Pick<SidePanelProps, 'as'>>({
|
|
93
102
|
overflow: 'hidden',
|
|
94
103
|
position: 'relative',
|
|
95
104
|
boxSizing: 'border-box',
|
|
@@ -112,7 +121,7 @@ const SidePanel = ({
|
|
|
112
121
|
onExpandedChange,
|
|
113
122
|
onStateTransition,
|
|
114
123
|
origin = 'left',
|
|
115
|
-
|
|
124
|
+
variant = 'standard',
|
|
116
125
|
touched,
|
|
117
126
|
...elemProps
|
|
118
127
|
}: SidePanelProps) => {
|
|
@@ -169,15 +178,20 @@ const SidePanel = ({
|
|
|
169
178
|
};
|
|
170
179
|
|
|
171
180
|
return (
|
|
172
|
-
<
|
|
181
|
+
<Panel
|
|
173
182
|
as={as}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
css={[
|
|
184
|
+
{
|
|
185
|
+
width: expanded ? expandedWidth : collapsedWidth,
|
|
186
|
+
maxWidth: expanded ? expandedWidth : collapsedWidth,
|
|
187
|
+
// mounted.current will be false on the first render, thus you won't get an unwanted animation here
|
|
188
|
+
// Will animate again if you force a re-render (like in Storybook)
|
|
189
|
+
animation: touched
|
|
190
|
+
? `${expanded ? motion.expand : motion.collapse} 200ms ease-out`
|
|
191
|
+
: undefined,
|
|
192
|
+
},
|
|
193
|
+
containerVariantStyle[variant],
|
|
194
|
+
]}
|
|
181
195
|
onAnimationEnd={handleAnimationEnd}
|
|
182
196
|
onAnimationStart={handleAnimationStart}
|
|
183
197
|
{...elemProps}
|
|
@@ -190,11 +204,11 @@ const SidePanel = ({
|
|
|
190
204
|
>
|
|
191
205
|
{children}
|
|
192
206
|
</SidePanelContext.Provider>
|
|
193
|
-
</
|
|
207
|
+
</Panel>
|
|
194
208
|
);
|
|
195
209
|
};
|
|
196
210
|
|
|
197
|
-
export type ToggleButtonProps =
|
|
211
|
+
export type ToggleButtonProps = TertiaryButtonProps & {
|
|
198
212
|
/**
|
|
199
213
|
* The tooltip text to expand the side panel
|
|
200
214
|
* @default 'Expand'
|
|
@@ -211,7 +225,7 @@ export type ToggleButtonProps = IconButtonProps & {
|
|
|
211
225
|
* A toggle button styled specifically for the side panel container.
|
|
212
226
|
*/
|
|
213
227
|
const ToggleButton = ({
|
|
214
|
-
variant =
|
|
228
|
+
variant = undefined,
|
|
215
229
|
icon = transformationImportIcon,
|
|
216
230
|
tooltipTextExpand: expandLabel = 'Expand',
|
|
217
231
|
tooltipTextCollapse: collapseLabel = 'Collapse',
|
|
@@ -235,9 +249,10 @@ const ToggleButton = ({
|
|
|
235
249
|
const buttonStyle = css({
|
|
236
250
|
position: 'absolute',
|
|
237
251
|
top: space.m,
|
|
252
|
+
width: space.l,
|
|
238
253
|
right: context.state === 'collapsed' ? 0 : rtlOrigin === 'left' ? space.s : undefined,
|
|
239
254
|
left: context.state === 'collapsed' ? 0 : rtlOrigin === 'right' ? space.s : undefined,
|
|
240
|
-
margin: context.state === 'collapsed' ? 'auto' : 0, // to override the -8px margin for
|
|
255
|
+
margin: context.state === 'collapsed' ? 'auto' : 0, // to override the -8px margin for TertiaryButton.Plain
|
|
241
256
|
transform:
|
|
242
257
|
context.state === 'collapsed' || context.state === 'collapsing'
|
|
243
258
|
? `scaleX(${rtlOrigin === 'left' ? '1' : '-1'})`
|
|
@@ -246,7 +261,7 @@ const ToggleButton = ({
|
|
|
246
261
|
|
|
247
262
|
return (
|
|
248
263
|
<Tooltip title={context.state === 'collapsed' ? expandLabel : collapseLabel} type="muted">
|
|
249
|
-
<
|
|
264
|
+
<TertiaryButton type="button" css={buttonStyle} icon={icon} variant={variant} {...rest} />
|
|
250
265
|
</Tooltip>
|
|
251
266
|
);
|
|
252
267
|
};
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
FormFieldModelContext,
|
|
7
7
|
useFormFieldOrientation,
|
|
8
8
|
} from '@workday/canvas-kit-preview-react/form-field';
|
|
9
|
-
import {Stack} from '@workday/canvas-kit-
|
|
9
|
+
import {Stack} from '@workday/canvas-kit-react/layout';
|
|
10
10
|
|
|
11
11
|
import {TextAreaModel, useTextAreaModel} from './hooks';
|
|
12
12
|
import {TextAreaField} from './TextAreaField';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
FormFieldModelContext,
|
|
7
7
|
useFormFieldOrientation,
|
|
8
8
|
} from '@workday/canvas-kit-preview-react/form-field';
|
|
9
|
-
import {Stack} from '@workday/canvas-kit-
|
|
9
|
+
import {Stack} from '@workday/canvas-kit-react/layout';
|
|
10
10
|
|
|
11
11
|
import {useTextInputModel, TextInputModel} from './hooks';
|
|
12
12
|
import {TextInputField} from './TextInputField';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
3
|
-
export interface DropdownButtonProps extends
|
|
3
|
+
export interface DropdownButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
/**
|
|
5
5
|
* The accessibility label for the button
|
|
6
6
|
*/
|
|
@@ -16,5 +16,5 @@ export interface DropdownButtonProps extends IconButtonProps {
|
|
|
16
16
|
*/
|
|
17
17
|
toggled: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const DropdownButton: import("@workday/canvas-kit-react/common").ElementComponent<
|
|
19
|
+
export declare const DropdownButton: import("@workday/canvas-kit-react/common").ElementComponent<"button", DropdownButtonProps>;
|
|
20
20
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Stack, StackSpacing } from '@workday/canvas-kit-
|
|
3
|
+
import { Stack, StackSpacing } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { FormFieldModel, FormFieldModelConfig } from './hooks';
|
|
5
5
|
export declare const FormFieldModelContext: React.Context<import("@workday/canvas-kit-react/common").Model<{
|
|
6
6
|
hasError?: boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Box } from '@workday/canvas-kit-
|
|
3
|
+
import { Box } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { FormFieldModel } from './hooks';
|
|
5
5
|
export interface FormFieldHintProps extends ExtractProps<typeof Box, never> {
|
|
6
6
|
model?: FormFieldModel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { Box } from '@workday/canvas-kit-
|
|
2
|
+
import { Box } from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import { FormFieldModel } from './hooks';
|
|
4
4
|
export interface FormFieldInputProps extends ExtractProps<typeof Box, never> {
|
|
5
5
|
model?: FormFieldModel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { HStack, StackSpacing } from '@workday/canvas-kit-
|
|
3
|
+
import { HStack, StackSpacing } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { FormFieldModel } from './hooks';
|
|
5
5
|
export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
|
|
6
6
|
model?: FormFieldModel;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { TertiaryButtonProps } from '@workday/canvas-kit-react/button';
|
|
6
6
|
export declare type SidePanelVariant = 'standard' | 'alternate';
|
|
7
7
|
export declare type SidePanelTransitionStates = 'collapsed' | 'collapsing' | 'expanded' | 'expanding';
|
|
8
8
|
export interface SidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -50,7 +50,7 @@ export interface SidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
50
50
|
*/
|
|
51
51
|
onStateTransition?: (state?: SidePanelTransitionStates) => void;
|
|
52
52
|
/**
|
|
53
|
-
* The style variant of the side panel. 'standard' is with a `soap100` background, no depth. 'alternate' is a `frenchVanilla100` background with a level
|
|
53
|
+
* The style variant of the side panel. 'standard' is with a `soap100` background, no depth. 'alternate' is a `frenchVanilla100` background with a level 6 depth.
|
|
54
54
|
*
|
|
55
55
|
* @default 'standard'
|
|
56
56
|
*/
|
|
@@ -67,10 +67,10 @@ export declare const SidePanelContext: React.Context<{
|
|
|
67
67
|
origin: string;
|
|
68
68
|
}>;
|
|
69
69
|
declare const SidePanel: {
|
|
70
|
-
({ as, children, collapsedWidth, expanded, expandedWidth, onAnimationEnd, onAnimationStart, onExpandedChange, onStateTransition, origin, touched, ...elemProps }: SidePanelProps): jsx.JSX.Element;
|
|
70
|
+
({ as, children, collapsedWidth, expanded, expandedWidth, onAnimationEnd, onAnimationStart, onExpandedChange, onStateTransition, origin, variant, touched, ...elemProps }: SidePanelProps): jsx.JSX.Element;
|
|
71
71
|
ToggleButton: ({ variant, icon, tooltipTextExpand: expandLabel, tooltipTextCollapse: collapseLabel, ...rest }: ToggleButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>) => jsx.JSX.Element;
|
|
72
72
|
};
|
|
73
|
-
export declare type ToggleButtonProps =
|
|
73
|
+
export declare type ToggleButtonProps = TertiaryButtonProps & {
|
|
74
74
|
/**
|
|
75
75
|
* The tooltip text to expand the side panel
|
|
76
76
|
* @default 'Expand'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
3
|
-
export interface DropdownButtonProps extends
|
|
3
|
+
export interface DropdownButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
/**
|
|
5
5
|
* The accessibility label for the button
|
|
6
6
|
*/
|
|
@@ -16,5 +16,5 @@ export interface DropdownButtonProps extends IconButtonProps {
|
|
|
16
16
|
*/
|
|
17
17
|
toggled: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const DropdownButton: import("@workday/canvas-kit-react/common").ElementComponent<
|
|
19
|
+
export declare const DropdownButton: import("@workday/canvas-kit-react/common").ElementComponent<"button", DropdownButtonProps>;
|
|
20
20
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Stack, StackSpacing } from '@workday/canvas-kit-
|
|
3
|
+
import { Stack, StackSpacing } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { FormFieldModel, FormFieldModelConfig } from './hooks';
|
|
5
5
|
export declare const FormFieldModelContext: React.Context<import("@workday/canvas-kit-react/common").Model<{
|
|
6
6
|
hasError?: boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Box } from '@workday/canvas-kit-
|
|
3
|
+
import { Box } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { FormFieldModel } from './hooks';
|
|
5
5
|
export interface FormFieldHintProps extends ExtractProps<typeof Box, never> {
|
|
6
6
|
model?: FormFieldModel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { Box } from '@workday/canvas-kit-
|
|
2
|
+
import { Box } from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import { FormFieldModel } from './hooks';
|
|
4
4
|
export interface FormFieldInputProps extends ExtractProps<typeof Box, never> {
|
|
5
5
|
model?: FormFieldModel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { HStack, StackSpacing } from '@workday/canvas-kit-
|
|
3
|
+
import { HStack, StackSpacing } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { FormFieldModel } from './hooks';
|
|
5
5
|
export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
|
|
6
6
|
model?: FormFieldModel;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { TertiaryButtonProps } from '@workday/canvas-kit-react/button';
|
|
6
6
|
export declare type SidePanelVariant = 'standard' | 'alternate';
|
|
7
7
|
export declare type SidePanelTransitionStates = 'collapsed' | 'collapsing' | 'expanded' | 'expanding';
|
|
8
8
|
export interface SidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -50,7 +50,7 @@ export interface SidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
50
50
|
*/
|
|
51
51
|
onStateTransition?: (state?: SidePanelTransitionStates) => void;
|
|
52
52
|
/**
|
|
53
|
-
* The style variant of the side panel. 'standard' is with a `soap100` background, no depth. 'alternate' is a `frenchVanilla100` background with a level
|
|
53
|
+
* The style variant of the side panel. 'standard' is with a `soap100` background, no depth. 'alternate' is a `frenchVanilla100` background with a level 6 depth.
|
|
54
54
|
*
|
|
55
55
|
* @default 'standard'
|
|
56
56
|
*/
|
|
@@ -67,10 +67,10 @@ export declare const SidePanelContext: React.Context<{
|
|
|
67
67
|
origin: string;
|
|
68
68
|
}>;
|
|
69
69
|
declare const SidePanel: {
|
|
70
|
-
({ as, children, collapsedWidth, expanded, expandedWidth, onAnimationEnd, onAnimationStart, onExpandedChange, onStateTransition, origin, touched, ...elemProps }: SidePanelProps): jsx.JSX.Element;
|
|
70
|
+
({ as, children, collapsedWidth, expanded, expandedWidth, onAnimationEnd, onAnimationStart, onExpandedChange, onStateTransition, origin, variant, touched, ...elemProps }: SidePanelProps): jsx.JSX.Element;
|
|
71
71
|
ToggleButton: ({ variant, icon, tooltipTextExpand: expandLabel, tooltipTextCollapse: collapseLabel, ...rest }: ToggleButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>) => jsx.JSX.Element;
|
|
72
72
|
};
|
|
73
|
-
export declare type ToggleButtonProps =
|
|
73
|
+
export declare type ToggleButtonProps = TertiaryButtonProps & {
|
|
74
74
|
/**
|
|
75
75
|
* The tooltip text to expand the side panel
|
|
76
76
|
* @default 'Expand'
|