@workday/canvas-kit-labs-react 5.3.0 → 5.3.4
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/common/lib/theming/index.ts +0 -1
- package/dist/commonjs/common/lib/theming/index.d.ts +0 -1
- package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/index.js +0 -1
- package/dist/commonjs/header/index.d.ts +5 -5
- package/dist/commonjs/header/index.d.ts.map +1 -1
- package/dist/commonjs/header/index.js +2 -2
- package/dist/commonjs/header/lib/GlobalHeader.d.ts +2 -11
- package/dist/commonjs/header/lib/GlobalHeader.d.ts.map +1 -1
- package/dist/commonjs/header/lib/GlobalHeader.js +8 -19
- package/dist/commonjs/header/lib/Header.d.ts +8 -17
- package/dist/commonjs/header/lib/Header.d.ts.map +1 -1
- package/dist/commonjs/header/lib/Header.js +14 -27
- package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +4 -13
- package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts.map +1 -1
- package/dist/commonjs/header/lib/parts/DubLogoTitle.js +11 -22
- package/dist/commonjs/{search-form/lib/SearchForm.d.ts → header/lib/parts/SearchBar.d.ts} +23 -22
- package/dist/commonjs/header/lib/parts/SearchBar.d.ts.map +1 -0
- package/dist/commonjs/{search-form/lib/SearchForm.js → header/lib/parts/SearchBar.js} +14 -13
- package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +5 -14
- package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts.map +1 -1
- package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.js +12 -25
- package/dist/commonjs/header/lib/parts/index.d.ts +3 -2
- package/dist/commonjs/header/lib/parts/index.d.ts.map +1 -1
- package/dist/commonjs/header/lib/parts/index.js +4 -2
- package/dist/commonjs/header/lib/shared/themes.d.ts +19 -28
- package/dist/commonjs/header/lib/shared/themes.d.ts.map +1 -1
- package/dist/commonjs/header/lib/shared/themes.js +36 -13
- package/dist/commonjs/header/lib/shared/types.d.ts +8 -3
- package/dist/commonjs/header/lib/shared/types.d.ts.map +1 -1
- package/dist/commonjs/header/lib/shared/types.js +23 -17
- package/dist/commonjs/index.d.ts +0 -2
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -2
- package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +1 -1
- package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/index.d.ts +0 -1
- package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/index.js +0 -1
- package/dist/es6/header/index.d.ts +5 -5
- package/dist/es6/header/index.d.ts.map +1 -1
- package/dist/es6/header/index.js +5 -5
- package/dist/es6/header/lib/GlobalHeader.d.ts +2 -11
- package/dist/es6/header/lib/GlobalHeader.d.ts.map +1 -1
- package/dist/es6/header/lib/GlobalHeader.js +11 -22
- package/dist/es6/header/lib/Header.d.ts +8 -17
- package/dist/es6/header/lib/Header.d.ts.map +1 -1
- package/dist/es6/header/lib/Header.js +17 -30
- package/dist/es6/header/lib/parts/DubLogoTitle.d.ts +4 -13
- package/dist/es6/header/lib/parts/DubLogoTitle.d.ts.map +1 -1
- package/dist/es6/header/lib/parts/DubLogoTitle.js +12 -23
- package/dist/es6/{search-form/lib/SearchForm.d.ts → header/lib/parts/SearchBar.d.ts} +23 -22
- package/dist/es6/header/lib/parts/SearchBar.d.ts.map +1 -0
- package/dist/es6/{search-form/lib/SearchForm.js → header/lib/parts/SearchBar.js} +12 -11
- package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +5 -14
- package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts.map +1 -1
- package/dist/es6/header/lib/parts/WorkdayLogoTitle.js +13 -26
- package/dist/es6/header/lib/parts/index.d.ts +3 -2
- package/dist/es6/header/lib/parts/index.d.ts.map +1 -1
- package/dist/es6/header/lib/parts/index.js +3 -2
- package/dist/es6/header/lib/shared/themes.d.ts +19 -28
- package/dist/es6/header/lib/shared/themes.d.ts.map +1 -1
- package/dist/es6/header/lib/shared/themes.js +37 -14
- package/dist/es6/header/lib/shared/types.d.ts +8 -3
- package/dist/es6/header/lib/shared/types.d.ts.map +1 -1
- package/dist/es6/header/lib/shared/types.js +23 -17
- package/dist/es6/index.d.ts +0 -2
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +0 -2
- package/dist/es6/layout/lib/utils/getValidChildren.d.ts +1 -1
- package/dist/es6/layout/lib/utils/getValidChildren.d.ts.map +1 -1
- package/header/README.md +181 -37
- package/header/index.ts +5 -5
- package/header/lib/GlobalHeader.tsx +9 -26
- package/header/lib/Header.tsx +26 -58
- package/header/lib/parts/DubLogoTitle.tsx +9 -26
- package/{search-form/lib/SearchForm.tsx → header/lib/parts/SearchBar.tsx} +31 -30
- package/header/lib/parts/WorkdayLogoTitle.tsx +11 -40
- package/header/lib/parts/index.ts +3 -2
- package/header/lib/shared/themes.tsx +56 -32
- package/header/lib/shared/types.tsx +9 -3
- package/index.ts +0 -2
- package/package.json +5 -7
- package/ts3.5/dist/commonjs/common/lib/theming/index.d.ts +0 -1
- package/ts3.5/dist/commonjs/header/index.d.ts +5 -5
- package/ts3.5/dist/commonjs/header/lib/GlobalHeader.d.ts +2 -11
- package/ts3.5/dist/commonjs/header/lib/Header.d.ts +8 -17
- package/ts3.5/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +4 -13
- package/ts3.5/dist/{es6/search-form/lib/SearchForm.d.ts → commonjs/header/lib/parts/SearchBar.d.ts} +23 -22
- package/ts3.5/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +5 -14
- package/ts3.5/dist/commonjs/header/lib/parts/index.d.ts +3 -2
- package/ts3.5/dist/commonjs/header/lib/shared/themes.d.ts +19 -28
- package/ts3.5/dist/commonjs/header/lib/shared/types.d.ts +8 -3
- package/ts3.5/dist/commonjs/index.d.ts +0 -2
- package/ts3.5/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +1 -1
- package/ts3.5/dist/es6/common/lib/theming/index.d.ts +0 -1
- package/ts3.5/dist/es6/header/index.d.ts +5 -5
- package/ts3.5/dist/es6/header/lib/GlobalHeader.d.ts +2 -11
- package/ts3.5/dist/es6/header/lib/Header.d.ts +8 -17
- package/ts3.5/dist/es6/header/lib/parts/DubLogoTitle.d.ts +4 -13
- package/ts3.5/dist/{commonjs/search-form/lib/SearchForm.d.ts → es6/header/lib/parts/SearchBar.d.ts} +23 -22
- package/ts3.5/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +5 -14
- package/ts3.5/dist/es6/header/lib/parts/index.d.ts +3 -2
- package/ts3.5/dist/es6/header/lib/shared/themes.d.ts +19 -28
- package/ts3.5/dist/es6/header/lib/shared/types.d.ts +8 -3
- package/ts3.5/dist/es6/index.d.ts +0 -2
- package/ts3.5/dist/es6/layout/lib/utils/getValidChildren.d.ts +1 -1
- package/common/lib/theming/useThemedRing.ts +0 -84
- package/dist/commonjs/common/lib/theming/useThemedRing.d.ts +0 -11
- package/dist/commonjs/common/lib/theming/useThemedRing.d.ts.map +0 -1
- package/dist/commonjs/common/lib/theming/useThemedRing.js +0 -61
- package/dist/commonjs/search-form/index.d.ts +0 -3
- package/dist/commonjs/search-form/index.d.ts.map +0 -1
- package/dist/commonjs/search-form/index.js +0 -7
- package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +0 -1
- package/dist/commonjs/search-form/lib/themes.d.ts +0 -21
- package/dist/commonjs/search-form/lib/themes.d.ts.map +0 -1
- package/dist/commonjs/search-form/lib/themes.js +0 -41
- package/dist/commonjs/text-input/index.d.ts +0 -7
- package/dist/commonjs/text-input/index.d.ts.map +0 -1
- package/dist/commonjs/text-input/index.js +0 -11
- package/dist/commonjs/text-input/lib/TextInput.d.ts +0 -21
- package/dist/commonjs/text-input/lib/TextInput.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/TextInput.js +0 -36
- package/dist/commonjs/text-input/lib/TextInputField.d.ts +0 -8
- package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/TextInputField.js +0 -66
- package/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -13
- package/dist/commonjs/text-input/lib/TextInputHint.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/TextInputHint.js +0 -46
- package/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -17
- package/dist/commonjs/text-input/lib/TextInputLabel.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/TextInputLabel.js +0 -54
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +0 -19
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +0 -16
- package/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts +0 -15
- package/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputHint.js +0 -12
- package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts +0 -15
- package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.js +0 -12
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +0 -17
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +0 -23
- package/dist/es6/common/lib/theming/useThemedRing.d.ts +0 -11
- package/dist/es6/common/lib/theming/useThemedRing.d.ts.map +0 -1
- package/dist/es6/common/lib/theming/useThemedRing.js +0 -55
- package/dist/es6/search-form/index.d.ts +0 -3
- package/dist/es6/search-form/index.d.ts.map +0 -1
- package/dist/es6/search-form/index.js +0 -2
- package/dist/es6/search-form/lib/SearchForm.d.ts.map +0 -1
- package/dist/es6/search-form/lib/themes.d.ts +0 -21
- package/dist/es6/search-form/lib/themes.d.ts.map +0 -1
- package/dist/es6/search-form/lib/themes.js +0 -39
- package/dist/es6/text-input/index.d.ts +0 -7
- package/dist/es6/text-input/index.d.ts.map +0 -1
- package/dist/es6/text-input/index.js +0 -6
- package/dist/es6/text-input/lib/TextInput.d.ts +0 -21
- package/dist/es6/text-input/lib/TextInput.d.ts.map +0 -1
- package/dist/es6/text-input/lib/TextInput.js +0 -31
- package/dist/es6/text-input/lib/TextInputField.d.ts +0 -8
- package/dist/es6/text-input/lib/TextInputField.d.ts.map +0 -1
- package/dist/es6/text-input/lib/TextInputField.js +0 -64
- package/dist/es6/text-input/lib/TextInputHint.d.ts +0 -13
- package/dist/es6/text-input/lib/TextInputHint.d.ts.map +0 -1
- package/dist/es6/text-input/lib/TextInputHint.js +0 -44
- package/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -17
- package/dist/es6/text-input/lib/TextInputLabel.d.ts.map +0 -1
- package/dist/es6/text-input/lib/TextInputLabel.js +0 -52
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +0 -19
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +0 -1
- package/dist/es6/text-input/lib/hooks/useTextInputField.js +0 -14
- package/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts +0 -15
- package/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts.map +0 -1
- package/dist/es6/text-input/lib/hooks/useTextInputHint.js +0 -10
- package/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts +0 -15
- package/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts.map +0 -1
- package/dist/es6/text-input/lib/hooks/useTextInputLabel.js +0 -10
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +0 -17
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +0 -1
- package/dist/es6/text-input/lib/hooks/useTextInputModel.js +0 -21
- package/search-form/LICENSE +0 -52
- package/search-form/README.md +0 -6
- package/search-form/index.ts +0 -2
- package/search-form/lib/themes.ts +0 -54
- package/search-form/package.json +0 -5
- package/text-input/LICENSE +0 -52
- package/text-input/README.md +0 -11
- package/text-input/index.ts +0 -6
- package/text-input/lib/TextInput.tsx +0 -34
- package/text-input/lib/TextInputField.tsx +0 -75
- package/text-input/lib/TextInputHint.tsx +0 -52
- package/text-input/lib/TextInputLabel.tsx +0 -74
- package/text-input/lib/hooks/useTextInputField.tsx +0 -15
- package/text-input/lib/hooks/useTextInputHint.tsx +0 -11
- package/text-input/lib/hooks/useTextInputLabel.tsx +0 -11
- package/text-input/lib/hooks/useTextInputModel.tsx +0 -45
- package/text-input/package.json +0 -5
- package/ts3.5/dist/commonjs/common/lib/theming/useThemedRing.d.ts +0 -11
- package/ts3.5/dist/commonjs/search-form/index.d.ts +0 -3
- package/ts3.5/dist/commonjs/search-form/lib/themes.d.ts +0 -21
- package/ts3.5/dist/commonjs/text-input/index.d.ts +0 -7
- package/ts3.5/dist/commonjs/text-input/lib/TextInput.d.ts +0 -21
- package/ts3.5/dist/commonjs/text-input/lib/TextInputField.d.ts +0 -8
- package/ts3.5/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -13
- package/ts3.5/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -17
- package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +0 -19
- package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts +0 -15
- package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts +0 -15
- package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +0 -17
- package/ts3.5/dist/es6/common/lib/theming/useThemedRing.d.ts +0 -11
- package/ts3.5/dist/es6/search-form/index.d.ts +0 -3
- package/ts3.5/dist/es6/search-form/lib/themes.d.ts +0 -21
- package/ts3.5/dist/es6/text-input/index.d.ts +0 -7
- package/ts3.5/dist/es6/text-input/lib/TextInput.d.ts +0 -21
- package/ts3.5/dist/es6/text-input/lib/TextInputField.d.ts +0 -8
- package/ts3.5/dist/es6/text-input/lib/TextInputHint.d.ts +0 -13
- package/ts3.5/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -17
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +0 -19
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts +0 -15
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts +0 -15
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +0 -17
package/text-input/README.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Canvas Kit React Text Input
|
|
2
|
-
|
|
3
|
-
<a href="https://github.com/Workday/canvas-kit/tree/master/modules/labs-react/README.md">
|
|
4
|
-
<img src="https://img.shields.io/badge/LABS-alpha-orange" alt="LABS: Alpha" />
|
|
5
|
-
</a> This component is work in progress and currently in prerelease.
|
|
6
|
-
|
|
7
|
-
View the
|
|
8
|
-
[documentation for Text Input](https://workday.github.io/canvas-kit/?path=/docs/labs-text-input-react--basic)
|
|
9
|
-
on Storybook.
|
|
10
|
-
|
|
11
|
-
[> Workday Design Reference](https://design.workday.com/components/inputs/text-input)
|
package/text-input/index.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './lib/TextInput';
|
|
2
|
-
export * from './lib/hooks/useTextInputModel';
|
|
3
|
-
export * from './lib/hooks/useTextInputHint';
|
|
4
|
-
export * from './lib/hooks/useTextInputField';
|
|
5
|
-
export * from './lib/hooks/useTextInputHint';
|
|
6
|
-
export * from './lib/hooks/useTextInputLabel';
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {createComponent, useDefaultModel} from '@workday/canvas-kit-react/common';
|
|
4
|
-
|
|
5
|
-
import {useTextInputModel, TextInputModel, TextInputModelConfig} from './hooks/useTextInputModel';
|
|
6
|
-
import {TextInputField} from './TextInputField';
|
|
7
|
-
import {TextInputLabel} from './TextInputLabel';
|
|
8
|
-
import {TextInputHint} from './TextInputHint';
|
|
9
|
-
|
|
10
|
-
export const TextInputModelContext = React.createContext<TextInputModel>({} as any);
|
|
11
|
-
|
|
12
|
-
export interface TextInputProps extends TextInputModelConfig {
|
|
13
|
-
model?: TextInputModel;
|
|
14
|
-
/**
|
|
15
|
-
* Children of the Text Input. Should contain a `<TextInput.Field>`, a `<TextInput.Label>` and an optional `<TextInput.Hint>`
|
|
16
|
-
*/
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const TextInput = createComponent()({
|
|
21
|
-
displayName: 'TextInput',
|
|
22
|
-
Component: ({children, model, ...config}: TextInputProps) => {
|
|
23
|
-
const value = useDefaultModel(model, config, useTextInputModel);
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<TextInputModelContext.Provider value={value}>{children}</TextInputModelContext.Provider>
|
|
27
|
-
);
|
|
28
|
-
},
|
|
29
|
-
subComponents: {
|
|
30
|
-
Field: TextInputField,
|
|
31
|
-
Label: TextInputLabel,
|
|
32
|
-
Hint: TextInputHint,
|
|
33
|
-
},
|
|
34
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import {jsx} from '@emotion/core';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
borderRadius,
|
|
6
|
-
CSSProperties,
|
|
7
|
-
inputColors,
|
|
8
|
-
space,
|
|
9
|
-
type,
|
|
10
|
-
} from '@workday/canvas-kit-react/tokens';
|
|
11
|
-
import {createComponent, ExtractProps, useModelContext} from '@workday/canvas-kit-react/common';
|
|
12
|
-
import {Box, useThemedRing, useThemeRTL} from '@workday/canvas-kit-labs-react/common';
|
|
13
|
-
|
|
14
|
-
import {TextInputModelContext} from './TextInput';
|
|
15
|
-
import {TextInputModel} from './hooks/useTextInputModel';
|
|
16
|
-
import {useTextInputField} from './hooks/useTextInputField';
|
|
17
|
-
|
|
18
|
-
export interface TextInputFieldProps extends ExtractProps<typeof Box, never> {
|
|
19
|
-
model?: TextInputModel;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const baseStyles: CSSProperties = {
|
|
23
|
-
...type.levels.subtext.large,
|
|
24
|
-
padding: space.xxs,
|
|
25
|
-
margin: 0,
|
|
26
|
-
minWidth: '280px',
|
|
27
|
-
border: `1px solid ${inputColors.border}`,
|
|
28
|
-
backgroundColor: inputColors.background,
|
|
29
|
-
borderRadius: borderRadius.m,
|
|
30
|
-
display: 'block',
|
|
31
|
-
height: '40px',
|
|
32
|
-
transition: '0.2s box-shadow, 0.2s border-color',
|
|
33
|
-
'&::placeholder': {
|
|
34
|
-
color: inputColors.placeholder,
|
|
35
|
-
},
|
|
36
|
-
'&:hover': {
|
|
37
|
-
borderColor: inputColors.hoverBorder,
|
|
38
|
-
},
|
|
39
|
-
'&:focus:not([disabled])': {
|
|
40
|
-
outline: 'none',
|
|
41
|
-
},
|
|
42
|
-
'&:disabled': {
|
|
43
|
-
backgroundColor: inputColors.disabled.background,
|
|
44
|
-
borderColor: inputColors.disabled.border,
|
|
45
|
-
color: inputColors.disabled.text,
|
|
46
|
-
'&::placeholder': {
|
|
47
|
-
color: inputColors.disabled.text,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
'::-ms-clear': {
|
|
51
|
-
display: 'none',
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const TextInputField = createComponent('input')({
|
|
56
|
-
displayName: 'TextInput.Field',
|
|
57
|
-
Component: ({model, ...elemProps}: TextInputFieldProps, ref) => {
|
|
58
|
-
const localModel = useModelContext(TextInputModelContext, model);
|
|
59
|
-
const props = useTextInputField(localModel, elemProps, ref);
|
|
60
|
-
|
|
61
|
-
const {themeRTL, theme} = useThemeRTL();
|
|
62
|
-
const errorRing = useThemedRing('error');
|
|
63
|
-
|
|
64
|
-
const focusStyles = localModel.state.hasError
|
|
65
|
-
? errorRing
|
|
66
|
-
: themeRTL({
|
|
67
|
-
'&:focus:not([disabled])': {
|
|
68
|
-
borderColor: theme.canvas.palette.common.focusOutline,
|
|
69
|
-
boxShadow: `inset 0 0 0 1px ${theme.canvas.palette.common.focusOutline}`,
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
return <Box as="input" css={[themeRTL(baseStyles), focusStyles]} {...props} />;
|
|
74
|
-
},
|
|
75
|
-
});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import {jsx} from '@emotion/core';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import {createComponent, ExtractProps, useModelContext} from '@workday/canvas-kit-react/common';
|
|
6
|
-
import {CSSProperties, space, type} from '@workday/canvas-kit-react/tokens';
|
|
7
|
-
import {Box, useThemeRTL} from '@workday/canvas-kit-labs-react/common';
|
|
8
|
-
|
|
9
|
-
import {TextInputModelContext} from './TextInput';
|
|
10
|
-
import {TextInputModel} from './hooks/useTextInputModel';
|
|
11
|
-
import {useTextInputHint} from './hooks/useTextInputHint';
|
|
12
|
-
|
|
13
|
-
export interface TextInputHintProps extends ExtractProps<typeof Box, never> {
|
|
14
|
-
model?: TextInputModel;
|
|
15
|
-
/**
|
|
16
|
-
* Hint text to show to the user regarding the Error/Alert
|
|
17
|
-
*/
|
|
18
|
-
children?: React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const baseStyles: CSSProperties = {
|
|
22
|
-
...type.levels.subtext.medium,
|
|
23
|
-
margin: `${space.xxs} 0 0`,
|
|
24
|
-
width: '100%',
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const TextInputHint = createComponent('p')({
|
|
28
|
-
displayName: 'TextInput.Hint',
|
|
29
|
-
Component: ({model, children, ...elemProps}: TextInputHintProps, ref, Element) => {
|
|
30
|
-
const localModel = useModelContext(TextInputModelContext, model);
|
|
31
|
-
const props = useTextInputHint(localModel, elemProps, ref);
|
|
32
|
-
const {themeRTL, theme} = useThemeRTL();
|
|
33
|
-
|
|
34
|
-
if (!children) {
|
|
35
|
-
// If there is no hint text just skip rendering
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<Box
|
|
41
|
-
as={Element}
|
|
42
|
-
css={themeRTL(
|
|
43
|
-
baseStyles,
|
|
44
|
-
localModel.state.hasError ? {color: theme.canvas.palette.error.main} : {}
|
|
45
|
-
)}
|
|
46
|
-
{...props}
|
|
47
|
-
>
|
|
48
|
-
{children}
|
|
49
|
-
</Box>
|
|
50
|
-
);
|
|
51
|
-
},
|
|
52
|
-
});
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import {jsx} from '@emotion/core';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
accessibleHide,
|
|
7
|
-
createComponent,
|
|
8
|
-
ExtractProps,
|
|
9
|
-
useModelContext,
|
|
10
|
-
} from '@workday/canvas-kit-react/common';
|
|
11
|
-
import {Box, ComponentStyles, useThemeRTL} from '@workday/canvas-kit-labs-react/common';
|
|
12
|
-
import {type} from '@workday/canvas-kit-react/tokens';
|
|
13
|
-
import {HStack} from '@workday/canvas-kit-labs-react/layout';
|
|
14
|
-
|
|
15
|
-
import {TextInputModelContext} from './TextInput';
|
|
16
|
-
import {TextInputModel} from './hooks/useTextInputModel';
|
|
17
|
-
import {useTextInputLabel} from './hooks/useTextInputLabel';
|
|
18
|
-
|
|
19
|
-
export interface TextInputLabelProps extends ExtractProps<typeof Box, never> {
|
|
20
|
-
model?: TextInputModel;
|
|
21
|
-
/**
|
|
22
|
-
* If true, apply the `accessibleHide` styles to the Label.
|
|
23
|
-
*/
|
|
24
|
-
isVisuallyHidden?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The text of the label.
|
|
27
|
-
*/
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const styles: ComponentStyles = {
|
|
32
|
-
label: {
|
|
33
|
-
...type.levels.subtext.large,
|
|
34
|
-
fontWeight: type.properties.fontWeights.medium,
|
|
35
|
-
minWidth: '180px',
|
|
36
|
-
},
|
|
37
|
-
label_visuallyHidden: {
|
|
38
|
-
...accessibleHide,
|
|
39
|
-
},
|
|
40
|
-
asterisk: {
|
|
41
|
-
fontSize: type.properties.fontSizes[16],
|
|
42
|
-
fontWeight: type.properties.fontWeights.regular,
|
|
43
|
-
textDecoration: 'unset',
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const TextInputLabel = createComponent('label')({
|
|
48
|
-
displayName: 'TextInput.Label',
|
|
49
|
-
Component: ({isVisuallyHidden, model, children, ...elemProps}: TextInputLabelProps, ref) => {
|
|
50
|
-
const localModel = useModelContext(TextInputModelContext, model);
|
|
51
|
-
const props = useTextInputLabel(localModel, elemProps, ref);
|
|
52
|
-
const {themeRTL, theme} = useThemeRTL();
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<Box
|
|
56
|
-
as="label"
|
|
57
|
-
css={themeRTL(styles.label, isVisuallyHidden ? styles.label_visuallyHidden : {})}
|
|
58
|
-
{...props}
|
|
59
|
-
>
|
|
60
|
-
<HStack spacing="xxxs">
|
|
61
|
-
<span>{children}</span>
|
|
62
|
-
{localModel.state.isRequired && (
|
|
63
|
-
<span
|
|
64
|
-
css={themeRTL(styles.asterisk, {color: theme.canvas.palette.error.main})}
|
|
65
|
-
aria-hidden="true"
|
|
66
|
-
>
|
|
67
|
-
*
|
|
68
|
-
</span>
|
|
69
|
-
)}
|
|
70
|
-
</HStack>
|
|
71
|
-
</Box>
|
|
72
|
-
);
|
|
73
|
-
},
|
|
74
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {createHook} from '@workday/canvas-kit-react/common';
|
|
2
|
-
import {TextInputModel} from './useTextInputModel';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Adds the necessary props to a `Field` component. Used by the TextInput.Field subcomponent.
|
|
6
|
-
*/
|
|
7
|
-
export const useTextInputField = createHook(({state}: TextInputModel) => {
|
|
8
|
-
return {
|
|
9
|
-
type: 'text',
|
|
10
|
-
required: state.isRequired ? true : undefined,
|
|
11
|
-
'aria-invalid': state.hasError ? true : undefined,
|
|
12
|
-
'aria-describedby': state.hintId,
|
|
13
|
-
id: state.inputId,
|
|
14
|
-
};
|
|
15
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {createHook} from '@workday/canvas-kit-react/common';
|
|
2
|
-
import {TextInputModel} from './useTextInputModel';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Adds the necessary props to a `Hint` component. Used by the TextInput.Hint subcomponent.
|
|
6
|
-
*/
|
|
7
|
-
export const useTextInputHint = createHook(({state}: TextInputModel) => {
|
|
8
|
-
return {
|
|
9
|
-
id: state.hintId,
|
|
10
|
-
};
|
|
11
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {createHook} from '@workday/canvas-kit-react/common';
|
|
2
|
-
import {TextInputModel} from './useTextInputModel';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Adds the necessary props to a `Label` component. Used by the TextInput.Label subcomponent.
|
|
6
|
-
*/
|
|
7
|
-
export const useTextInputLabel = createHook(({state}: TextInputModel) => {
|
|
8
|
-
return {
|
|
9
|
-
htmlFor: state.inputId,
|
|
10
|
-
};
|
|
11
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createEventMap,
|
|
3
|
-
Model,
|
|
4
|
-
ToModelConfig,
|
|
5
|
-
useEventMap,
|
|
6
|
-
useUniqueId,
|
|
7
|
-
} from '@workday/canvas-kit-react/common';
|
|
8
|
-
|
|
9
|
-
type TextInputState = {
|
|
10
|
-
hasError?: boolean;
|
|
11
|
-
inputId?: string;
|
|
12
|
-
hintId?: string;
|
|
13
|
-
isRequired?: boolean;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type TextInputEvents = {};
|
|
17
|
-
|
|
18
|
-
export type TextInputModel = Model<TextInputState, TextInputEvents>;
|
|
19
|
-
|
|
20
|
-
const textInputEventMap = createEventMap<TextInputEvents>()({
|
|
21
|
-
guards: {},
|
|
22
|
-
callbacks: {},
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export type TextInputModelConfig = TextInputState &
|
|
26
|
-
Partial<ToModelConfig<TextInputState, TextInputEvents, typeof textInputEventMap>>;
|
|
27
|
-
|
|
28
|
-
export const useTextInputModel = (config: TextInputModelConfig = {}): TextInputModel => {
|
|
29
|
-
const inputId = useUniqueId(config.inputId);
|
|
30
|
-
const hintId = useUniqueId(config.hintId);
|
|
31
|
-
|
|
32
|
-
const state = {
|
|
33
|
-
hasError: config.hasError,
|
|
34
|
-
isRequired: config.isRequired,
|
|
35
|
-
inputId,
|
|
36
|
-
hintId,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const events = useEventMap(textInputEventMap, state, config, {});
|
|
40
|
-
|
|
41
|
-
return {
|
|
42
|
-
state,
|
|
43
|
-
events,
|
|
44
|
-
};
|
|
45
|
-
};
|
package/text-input/package.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { CSSProperties } from '@workday/canvas-kit-react/tokens';
|
|
3
|
-
declare type paletteSelection = Exclude<keyof EmotionCanvasTheme['canvas']['palette'], 'common'>;
|
|
4
|
-
interface ContrastColors {
|
|
5
|
-
outer?: string;
|
|
6
|
-
inner?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function getPaletteColors(type: paletteSelection, theme?: EmotionCanvasTheme): ContrastColors;
|
|
9
|
-
export declare const useThemedRing: (type: "alert" | "error" | "primary" | "success" | "neutral") => CSSProperties;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=useThemedRing.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare enum SearchTheme {
|
|
2
|
-
Light = 0,
|
|
3
|
-
Dark = 1,
|
|
4
|
-
Transparent = 2
|
|
5
|
-
}
|
|
6
|
-
export interface SearchThemeAttributes {
|
|
7
|
-
background?: string;
|
|
8
|
-
backgroundFocus?: string;
|
|
9
|
-
backgroundHover?: string;
|
|
10
|
-
color?: string;
|
|
11
|
-
colorFocus?: string;
|
|
12
|
-
placeholderColor?: string;
|
|
13
|
-
placeholderColorFocus?: string;
|
|
14
|
-
boxShadow?: string | string[];
|
|
15
|
-
boxShadowFocus?: string | string[];
|
|
16
|
-
}
|
|
17
|
-
export interface SearchThemes {
|
|
18
|
-
[key: string]: SearchThemeAttributes;
|
|
19
|
-
}
|
|
20
|
-
export declare const searchThemes: SearchThemes;
|
|
21
|
-
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './lib/TextInput';
|
|
2
|
-
export * from './lib/hooks/useTextInputModel';
|
|
3
|
-
export * from './lib/hooks/useTextInputHint';
|
|
4
|
-
export * from './lib/hooks/useTextInputField';
|
|
5
|
-
export * from './lib/hooks/useTextInputHint';
|
|
6
|
-
export * from './lib/hooks/useTextInputLabel';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextInputModel, TextInputModelConfig } from './hooks/useTextInputModel';
|
|
3
|
-
export declare const TextInputModelContext: React.Context<import("@workday/canvas-kit-react/common").Model<{
|
|
4
|
-
hasError?: boolean | undefined;
|
|
5
|
-
inputId?: string | undefined;
|
|
6
|
-
hintId?: string | undefined;
|
|
7
|
-
isRequired?: boolean | undefined;
|
|
8
|
-
}, {}>>;
|
|
9
|
-
export interface TextInputProps extends TextInputModelConfig {
|
|
10
|
-
model?: TextInputModel;
|
|
11
|
-
/**
|
|
12
|
-
* Children of the Text Input. Should contain a `<TextInput.Field>`, a `<TextInput.Label>` and an optional `<TextInput.Hint>`
|
|
13
|
-
*/
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare const TextInput: import("@workday/canvas-kit-react/common").Component<TextInputProps> & {
|
|
17
|
-
Field: import("@workday/canvas-kit-react/common").ElementComponent<"input", import("./TextInputField").TextInputFieldProps>;
|
|
18
|
-
Label: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("./TextInputLabel").TextInputLabelProps>;
|
|
19
|
-
Hint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("./TextInputHint").TextInputHintProps>;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { Box } from '@workday/canvas-kit-labs-react/common';
|
|
3
|
-
import { TextInputModel } from './hooks/useTextInputModel';
|
|
4
|
-
export interface TextInputFieldProps extends ExtractProps<typeof Box, never> {
|
|
5
|
-
model?: TextInputModel;
|
|
6
|
-
}
|
|
7
|
-
export declare const TextInputField: import("@workday/canvas-kit-react/common").ElementComponent<"input", TextInputFieldProps>;
|
|
8
|
-
//# sourceMappingURL=TextInputField.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Box } from '@workday/canvas-kit-labs-react/common';
|
|
4
|
-
import { TextInputModel } from './hooks/useTextInputModel';
|
|
5
|
-
export interface TextInputHintProps extends ExtractProps<typeof Box, never> {
|
|
6
|
-
model?: TextInputModel;
|
|
7
|
-
/**
|
|
8
|
-
* Hint text to show to the user regarding the Error/Alert
|
|
9
|
-
*/
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const TextInputHint: import("@workday/canvas-kit-react/common").ElementComponent<"p", TextInputHintProps>;
|
|
13
|
-
//# sourceMappingURL=TextInputHint.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Box } from '@workday/canvas-kit-labs-react/common';
|
|
4
|
-
import { TextInputModel } from './hooks/useTextInputModel';
|
|
5
|
-
export interface TextInputLabelProps extends ExtractProps<typeof Box, never> {
|
|
6
|
-
model?: TextInputModel;
|
|
7
|
-
/**
|
|
8
|
-
* If true, apply the `accessibleHide` styles to the Label.
|
|
9
|
-
*/
|
|
10
|
-
isVisuallyHidden?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The text of the label.
|
|
13
|
-
*/
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare const TextInputLabel: import("@workday/canvas-kit-react/common").ElementComponent<"label", TextInputLabelProps>;
|
|
17
|
-
//# sourceMappingURL=TextInputLabel.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="@emotion/core" />
|
|
2
|
-
/**
|
|
3
|
-
* Adds the necessary props to a `Field` component. Used by the TextInput.Field subcomponent.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useTextInputField: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
|
|
6
|
-
hasError?: boolean | undefined;
|
|
7
|
-
inputId?: string | undefined;
|
|
8
|
-
hintId?: string | undefined;
|
|
9
|
-
isRequired?: boolean | undefined;
|
|
10
|
-
}, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
11
|
-
type: string;
|
|
12
|
-
required: boolean | undefined;
|
|
13
|
-
'aria-invalid': boolean | undefined;
|
|
14
|
-
'aria-describedby': string | undefined;
|
|
15
|
-
id: string | undefined;
|
|
16
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
17
|
-
ref: import("react").Ref<R>;
|
|
18
|
-
} : {});
|
|
19
|
-
//# sourceMappingURL=useTextInputField.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="@emotion/core" />
|
|
2
|
-
/**
|
|
3
|
-
* Adds the necessary props to a `Hint` component. Used by the TextInput.Hint subcomponent.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useTextInputHint: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
|
|
6
|
-
hasError?: boolean | undefined;
|
|
7
|
-
inputId?: string | undefined;
|
|
8
|
-
hintId?: string | undefined;
|
|
9
|
-
isRequired?: boolean | undefined;
|
|
10
|
-
}, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
11
|
-
id: string | undefined;
|
|
12
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
13
|
-
ref: import("react").Ref<R>;
|
|
14
|
-
} : {});
|
|
15
|
-
//# sourceMappingURL=useTextInputHint.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="@emotion/core" />
|
|
2
|
-
/**
|
|
3
|
-
* Adds the necessary props to a `Label` component. Used by the TextInput.Label subcomponent.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useTextInputLabel: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
|
|
6
|
-
hasError?: boolean | undefined;
|
|
7
|
-
inputId?: string | undefined;
|
|
8
|
-
hintId?: string | undefined;
|
|
9
|
-
isRequired?: boolean | undefined;
|
|
10
|
-
}, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
11
|
-
htmlFor: string | undefined;
|
|
12
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
13
|
-
ref: import("react").Ref<R>;
|
|
14
|
-
} : {});
|
|
15
|
-
//# sourceMappingURL=useTextInputLabel.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Model, ToModelConfig } from '@workday/canvas-kit-react/common';
|
|
2
|
-
declare type TextInputState = {
|
|
3
|
-
hasError?: boolean;
|
|
4
|
-
inputId?: string;
|
|
5
|
-
hintId?: string;
|
|
6
|
-
isRequired?: boolean;
|
|
7
|
-
};
|
|
8
|
-
declare type TextInputEvents = {};
|
|
9
|
-
export declare type TextInputModel = Model<TextInputState, TextInputEvents>;
|
|
10
|
-
declare const textInputEventMap: {
|
|
11
|
-
guards: {};
|
|
12
|
-
callbacks: {};
|
|
13
|
-
};
|
|
14
|
-
export declare type TextInputModelConfig = TextInputState & Partial<ToModelConfig<TextInputState, TextInputEvents, typeof textInputEventMap>>;
|
|
15
|
-
export declare const useTextInputModel: (config?: TextInputModelConfig) => Model<TextInputState, TextInputEvents>;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=useTextInputModel.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { CSSProperties } from '@workday/canvas-kit-react/tokens';
|
|
3
|
-
declare type paletteSelection = Exclude<keyof EmotionCanvasTheme['canvas']['palette'], 'common'>;
|
|
4
|
-
interface ContrastColors {
|
|
5
|
-
outer?: string;
|
|
6
|
-
inner?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function getPaletteColors(type: paletteSelection, theme?: EmotionCanvasTheme): ContrastColors;
|
|
9
|
-
export declare const useThemedRing: (type: "alert" | "error" | "primary" | "success" | "neutral") => CSSProperties;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=useThemedRing.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare enum SearchTheme {
|
|
2
|
-
Light = 0,
|
|
3
|
-
Dark = 1,
|
|
4
|
-
Transparent = 2
|
|
5
|
-
}
|
|
6
|
-
export interface SearchThemeAttributes {
|
|
7
|
-
background?: string;
|
|
8
|
-
backgroundFocus?: string;
|
|
9
|
-
backgroundHover?: string;
|
|
10
|
-
color?: string;
|
|
11
|
-
colorFocus?: string;
|
|
12
|
-
placeholderColor?: string;
|
|
13
|
-
placeholderColorFocus?: string;
|
|
14
|
-
boxShadow?: string | string[];
|
|
15
|
-
boxShadowFocus?: string | string[];
|
|
16
|
-
}
|
|
17
|
-
export interface SearchThemes {
|
|
18
|
-
[key: string]: SearchThemeAttributes;
|
|
19
|
-
}
|
|
20
|
-
export declare const searchThemes: SearchThemes;
|
|
21
|
-
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './lib/TextInput';
|
|
2
|
-
export * from './lib/hooks/useTextInputModel';
|
|
3
|
-
export * from './lib/hooks/useTextInputHint';
|
|
4
|
-
export * from './lib/hooks/useTextInputField';
|
|
5
|
-
export * from './lib/hooks/useTextInputHint';
|
|
6
|
-
export * from './lib/hooks/useTextInputLabel';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextInputModel, TextInputModelConfig } from './hooks/useTextInputModel';
|
|
3
|
-
export declare const TextInputModelContext: React.Context<import("@workday/canvas-kit-react/common").Model<{
|
|
4
|
-
hasError?: boolean | undefined;
|
|
5
|
-
inputId?: string | undefined;
|
|
6
|
-
hintId?: string | undefined;
|
|
7
|
-
isRequired?: boolean | undefined;
|
|
8
|
-
}, {}>>;
|
|
9
|
-
export interface TextInputProps extends TextInputModelConfig {
|
|
10
|
-
model?: TextInputModel;
|
|
11
|
-
/**
|
|
12
|
-
* Children of the Text Input. Should contain a `<TextInput.Field>`, a `<TextInput.Label>` and an optional `<TextInput.Hint>`
|
|
13
|
-
*/
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare const TextInput: import("@workday/canvas-kit-react/common").Component<TextInputProps> & {
|
|
17
|
-
Field: import("@workday/canvas-kit-react/common").ElementComponent<"input", import("./TextInputField").TextInputFieldProps>;
|
|
18
|
-
Label: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("./TextInputLabel").TextInputLabelProps>;
|
|
19
|
-
Hint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("./TextInputHint").TextInputHintProps>;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { Box } from '@workday/canvas-kit-labs-react/common';
|
|
3
|
-
import { TextInputModel } from './hooks/useTextInputModel';
|
|
4
|
-
export interface TextInputFieldProps extends ExtractProps<typeof Box, never> {
|
|
5
|
-
model?: TextInputModel;
|
|
6
|
-
}
|
|
7
|
-
export declare const TextInputField: import("@workday/canvas-kit-react/common").ElementComponent<"input", TextInputFieldProps>;
|
|
8
|
-
//# sourceMappingURL=TextInputField.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Box } from '@workday/canvas-kit-labs-react/common';
|
|
4
|
-
import { TextInputModel } from './hooks/useTextInputModel';
|
|
5
|
-
export interface TextInputHintProps extends ExtractProps<typeof Box, never> {
|
|
6
|
-
model?: TextInputModel;
|
|
7
|
-
/**
|
|
8
|
-
* Hint text to show to the user regarding the Error/Alert
|
|
9
|
-
*/
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const TextInputHint: import("@workday/canvas-kit-react/common").ElementComponent<"p", TextInputHintProps>;
|
|
13
|
-
//# sourceMappingURL=TextInputHint.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Box } from '@workday/canvas-kit-labs-react/common';
|
|
4
|
-
import { TextInputModel } from './hooks/useTextInputModel';
|
|
5
|
-
export interface TextInputLabelProps extends ExtractProps<typeof Box, never> {
|
|
6
|
-
model?: TextInputModel;
|
|
7
|
-
/**
|
|
8
|
-
* If true, apply the `accessibleHide` styles to the Label.
|
|
9
|
-
*/
|
|
10
|
-
isVisuallyHidden?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The text of the label.
|
|
13
|
-
*/
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export declare const TextInputLabel: import("@workday/canvas-kit-react/common").ElementComponent<"label", TextInputLabelProps>;
|
|
17
|
-
//# sourceMappingURL=TextInputLabel.d.ts.map
|