@guardian/stand 0.0.20 → 0.0.22
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/components/menu/Menu.cjs +1 -7
- package/dist/components/menu/Menu.js +1 -9
- package/dist/components/menu/styles.cjs +25 -11
- package/dist/components/menu/styles.js +25 -11
- package/dist/components/text-input/TextInput.cjs +28 -0
- package/dist/components/text-input/TextInput.js +12 -0
- package/dist/components/text-input/styles.cjs +35 -0
- package/dist/components/text-input/styles.js +32 -0
- package/dist/components/topbar/topBarToolName/TopBarToolName.cjs +21 -2
- package/dist/components/topbar/topBarToolName/TopBarToolName.js +11 -3
- package/dist/components/topbar/topBarToolName/styles.cjs +39 -0
- package/dist/components/topbar/topBarToolName/styles.js +38 -1
- package/dist/index.cjs +2 -0
- package/dist/index.js +1 -0
- package/dist/styleD/build/css/component/TopBar.css +22 -0
- package/dist/styleD/build/css/component/menu.css +2 -0
- package/dist/styleD/build/css/component/textInput.css +29 -0
- package/dist/styleD/build/css/semantic/typography.css +88 -0
- package/dist/styleD/build/typescript/component/TopBar.cjs +32 -0
- package/dist/styleD/build/typescript/component/TopBar.js +32 -0
- package/dist/styleD/build/typescript/component/menu.cjs +5 -1
- package/dist/styleD/build/typescript/component/menu.js +5 -1
- package/dist/styleD/build/typescript/component/textInput.cjs +45 -0
- package/dist/styleD/build/typescript/component/textInput.js +43 -0
- package/dist/styleD/build/typescript/semantic/typography.cjs +120 -0
- package/dist/styleD/build/typescript/semantic/typography.js +120 -0
- package/dist/text-input.cjs +9 -0
- package/dist/text-input.js +2 -0
- package/dist/types/TopBar.d.ts +1 -0
- package/dist/types/components/menu/styles.d.ts +1 -1
- package/dist/types/components/text-input/TextInput.d.ts +2 -0
- package/dist/types/components/text-input/sandbox.d.ts +5 -0
- package/dist/types/components/text-input/styles.d.ts +7 -0
- package/dist/types/components/text-input/types.d.ts +4 -0
- package/dist/types/components/topbar/topBarToolName/TopBarToolName.d.ts +1 -1
- package/dist/types/components/topbar/topBarToolName/styles.d.ts +2 -0
- package/dist/types/components/topbar/topBarToolName/types.d.ts +7 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/menu.d.ts +0 -1
- package/dist/types/styleD/build/typescript/component/TopBar.d.ts +32 -0
- package/dist/types/styleD/build/typescript/component/menu.d.ts +4 -0
- package/dist/types/styleD/build/typescript/component/textInput.d.ts +45 -0
- package/dist/types/styleD/build/typescript/semantic/typography.d.ts +120 -0
- package/dist/types/text-input.d.ts +20 -0
- package/package.json +11 -7
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const componentName = "TextInput";
|
|
2
|
+
export declare const componentTsx = "import { TextInput } from '@guardian/stand/text-input';\n\nexport const Component = () => (\n\t<>\n\t\t<TextInput\n\t\t\tlabel=\"Name\"\n\t\t\tdescription=\"This is a description for the text input.\"\n\t\t/>\n\n\t\t<TextInput\n\t\t\tsize=\"sm\"\n\t\t\tlabel=\"Username\"\n\t\t\tisInvalid\n\t\t\tdefaultValue=\"guardian_user\"\n\t\t\terror=\"Username is already taken\"\n\t\t/>\n\n\t\t<TextInput\n\t\t\tlabel=\"Password\"\n\t\t\tdescription=\"Showing a different type\"\n\t\t\ttype=\"password\"\n\t\t/>\n\n\t\t<TextInput label=\"Notes\" isDisabled defaultValue=\"Read only content\" />\n\t</>\n);\n";
|
|
3
|
+
export declare const componentCss = "\n/* import the text input, form, inline message styles */\n@import '@guardian/stand/component/inlineMessage.css';\n@import '@guardian/stand/component/form.css';\n@import '@guardian/stand/component/textInput.css';\n\n/* inline message styles - error */\n.stand-inline-message {\n display: var(--component-inline-message-shared-display);\n align-items: var(--component-inline-message-shared-align-items);\n gap: var(--component-inline-message-shared-gap);\n font: var(--component-inline-message-shared-typography-font);\n letter-spacing: var(\n --component-inline-message-shared-typography-letter-spacing\n );\n font-variation-settings: \"wdth\"\n var(--component-inline-message-shared-typography-font-width);\n}\n\n.stand-inline-message > .material-symbols {\n font-size: var(--component-inline-message-shared-icon-size);\n}\n\n.stand-inline-message > svg {\n width: var(--component-inline-message-shared-icon-size);\n height: var(--component-inline-message-shared-icon-size);\n}\n\n.stand-inline-message-error {\n color: var(--component-inline-message-error-color);\n fill: var(--component-inline-message-error-color);\n}\n\n/* form input container styles */\n\n.stand-form-input-container {\n\tdisplay: var(--component-form-input-shared-container-display);\n\tflex-direction: var(--component-form-input-shared-container-flex-direction);\n\tgap: var(--component-form-input-shared-container-gap);\n\twidth: var(--component-form-input-shared-container-width);\n}\n\n.stand-form-input-container.sm {\n\tmax-width: var(--component-form-input-sm-container-max-width);\n}\n\n.stand-form-input-container.md {\n\tmax-width: var(--component-form-input-md-container-max-width);\n}\n\n.stand-form-input-container > label {\n\tcolor: var(--component-form-input-shared-label-color);\n\tfont: var(--component-form-input-md-label-typography-font);\n\tletter-spacing: var(--component-form-input-md-label-typography-letter-spacing);\n\tfont-variation-settings: \"wdth\" var(--component-form-input-md-label-typography-font-width);\n}\n\n.stand-form-input-container[data-disabled] > label {\n\tcolor: var(--component-form-input-shared-label-disabled-color);\n}\n\n.stand-form-input-container > span.description {\n\tcolor: var(--component-form-input-shared-description-color);\n\tfont: var(--component-form-input-shared-description-typography-font);\n\tletter-spacing: var(--component-form-input-shared-description-typography-letter-spacing);\n\tfont-variation-settings: \"wdth\" var(--component-form-input-shared-description-typography-font-width);\n}\n\n.stand-form-input-container[data-disabled] > span.description {\n\tcolor: var(--component-form-input-shared-description-disabled-color);\n}\n\n/* text input styles */\n\n.stand-text-input {\n\tbackground-color: var(--component-text-input-shared-background-color);\n\tborder-radius: var(--component-text-input-shared-border-radius);\n\tborder: var(--component-text-input-shared-border);\n\tcolor: var(--component-text-input-shared-color);\n\tcursor: var(--component-text-input-shared-cursor);\n\tmargin-top: var(--component-text-input-shared-margin-top);\n\tpadding-top: var(--component-text-input-shared-padding-top);\n\tpadding-right: var(--component-text-input-shared-padding-right);\n\tpadding-bottom: var(--component-text-input-shared-padding-bottom);\n\tpadding-left: var(--component-text-input-shared-padding-left);\n}\n\n.stand-text-input[disabled] {\n\tbackground-color: var(--component-text-input-shared-disabled-background-color);\n\tborder: var(--component-text-input-shared-disabled-border);\n\tcolor: var(--component-text-input-shared-disabled-color);\n\tcursor: var(--component-text-input-shared-disabled-cursor);\n}\n\n.stand-text-input[data-invalid] {\n\tborder: var(--component-text-input-shared-error-border);\n}\n\n.stand-text-input.md {\n\theight: var(--component-text-input-md-height);\n\tfont: var(--component-text-input-md-typography-font);\n\tletter-spacing: var(--component-text-input-md-typography-letter-spacing);\n\tfont-variation-settings: \"wdth\" var(--component-text-input-md-typography-font-width);\n}\n\n.stand-text-input.sm {\n\theight: var(--component-text-input-sm-height);\n\tfont: var(--component-text-input-sm-typography-font);\n\tletter-spacing: var(--component-text-input-sm-typography-letter-spacing);\n\tfont-variation-settings: \"wdth\" var(--component-text-input-sm-typography-font-width);\n}\n";
|
|
4
|
+
export declare const componentHtml = "<div class=\"container flow-column\">\n\t<div class=\"stand-form-input-container md\">\n\t\t<label for=\"name\">Name</label>\n\t\t<span class=\"description\">This is a description for the text input.</span>\n\t\t<input id=\"name\" class=\"stand-text-input md\" type=\"text\" />\n\t</div>\n\t<div class=\"stand-form-input-container sm\">\n\t\t<label for=\"username\">Username</label>\n\t\t<input\n\t\t\tid=\"username\"\n\t\t\tclass=\"stand-text-input sm\"\n\t\t\ttype=\"text\"\n\t\t\tvalue=\"guardian_user\"\n\t\t\tdata-invalid\n\t\t/>\n\t\t<span class=\"stand-inline-message stand-inline-message-error\"><span class=\"material-symbols\">warning</span> Username is already taken</span>\n\t</div>\n\t<div class=\"stand-form-input-container md\">\n\t\t<label for=\"password\">Password</label>\n\t\t<span class=\"description\">Showing a different type</span>\n\t\t<input id=\"password\" class=\"stand-text-input md\" type=\"password\" />\n\t</div>\n\t<div class=\"stand-form-input-container md\" data-disabled>\n\t\t<label for=\"notes\">Notes</label>\n\t\t<input\n\t\t\tid=\"notes\"\n\t\t\tclass=\"stand-text-input md\"\n\t\t\ttype=\"text\"\n\t\t\tvalue=\"Read only content\"\n\t\t\tdisabled\n\t\t/>\n\t</div>\n</div>\n";
|
|
5
|
+
export declare const componentJs = "\nimport { componentTextInput, componentForm, componentInlineMessage } from \"@guardian/stand\";\n\n// example of creating a stylesheet in js\nconst sheet = new CSSStyleSheet();\n\n// apply the rules to the sheet\nsheet.replaceSync(`\n/* inline message styles - error */\n.js-stand-inline-message {\n display: ${componentInlineMessage.shared.display};\n align-items: ${componentInlineMessage.shared['align-items']};\n gap: ${componentInlineMessage.shared.gap};\n font: ${componentInlineMessage.shared.typography.font};\n letter-spacing: ${componentInlineMessage.shared.typography.letterSpacing};\n font-variation-settings: \"wdth\" ${componentInlineMessage.shared.typography.fontWidth};\n}\n\n.js-stand-inline-message > .material-symbols {\n font-size: ${componentInlineMessage.shared.icon.size};\n}\n\n.js-stand-inline-message > svg {\n width: ${componentInlineMessage.shared.icon.size};\n height: ${componentInlineMessage.shared.icon.size};\n}\n\n.js-stand-inline-message-error {\n color: ${componentInlineMessage.error.color};\n fill: ${componentInlineMessage.error.color};\n}\n\n/* form input container styles */\n\n.js-stand-form-input-container {\n\tdisplay: ${componentForm.input.shared.container.display};\n\tflex-direction: ${componentForm.input.shared.container['flex-direction']};\n\tgap: ${componentForm.input.shared.container.gap};\n\twidth: ${componentForm.input.shared.container.width};\n}\n\n.js-stand-form-input-container.sm {\n\tmax-width: ${componentForm.input.sm.container['max-width']};\n}\n\n.js-stand-form-input-container.md {\n\tmax-width: ${componentForm.input.md.container['max-width']};\n}\n\n.js-stand-form-input-container > label {\n\tcolor: ${componentForm.input.shared.label.color};\n\tfont: ${componentForm.input.md.label.typography.font};\n\tletter-spacing: ${componentForm.input.md.label.typography.letterSpacing};\n\tfont-variation-settings: \"wdth\" ${componentForm.input.md.label.typography.fontWidth};\n}\n\n.js-stand-form-input-container[data-disabled] > label {\n\tcolor: ${componentForm.input.shared.label.disabled.color};\n}\n\n.js-stand-form-input-container > span.description {\n\tcolor: ${componentForm.input.shared.description.color};\n\tfont: ${componentForm.input.shared.description.typography.font};\n\tletter-spacing: ${componentForm.input.shared.description.typography.letterSpacing};\n\tfont-variation-settings: \"wdth\" ${componentForm.input.shared.description.typography.fontWidth};\n}\n\n.js-stand-form-input-container[data-disabled] > span.description {\n\tcolor: ${componentForm.input.shared.description.disabled.color};\n}\n\n/* text input styles */\n\n.js-stand-text-input {\n\tbackground-color: ${componentTextInput.shared['background-color']};\n\tborder-radius: ${componentTextInput.shared['border-radius']};\n\tborder: ${componentTextInput.shared.border};\n\tcolor: ${componentTextInput.shared.color};\n\tcursor: ${componentTextInput.shared.cursor};\n\tmargin-top: ${componentTextInput.shared['margin-top']};\n\tpadding-top: ${componentTextInput.shared.padding.top};\n\tpadding-right: ${componentTextInput.shared.padding.right};\n\tpadding-bottom: ${componentTextInput.shared.padding.bottom};\n\tpadding-left: ${componentTextInput.shared.padding.left};\n}\n\n.js-stand-text-input[disabled] {\n\tbackground-color: ${componentTextInput.shared.disabled.backgroundColor};\n\tborder: ${componentTextInput.shared.disabled.border};\n\tcolor: ${componentTextInput.shared.disabled.color};\n\tcursor: ${componentTextInput.shared.disabled.cursor};\n}\n\n.js-stand-text-input[data-invalid] {\n\tborder: ${componentTextInput.shared.errorBorder};\n}\n\n.js-stand-text-input.md {\n\theight: ${componentTextInput.md.height};\n\tfont: ${componentTextInput.md.typography.font};\n\tletter-spacing: ${componentTextInput.md.typography.letterSpacing};\n\tfont-variation-settings: \"wdth\" ${componentTextInput.md.typography.fontWidth};\n}\n\n.js-stand-text-input.sm {\n\theight: ${componentTextInput.sm.height};\n\tfont: ${componentTextInput.sm.typography.font};\n\tletter-spacing: ${componentTextInput.sm.typography.letterSpacing};\n\tfont-variation-settings: \"wdth\" ${componentTextInput.sm.typography.fontWidth};\n}\n`);\n\n// update the document with the sheet\ndocument.adoptedStyleSheets.push(sheet);\n\n// modify the dom with the button components using the generated stylesheet\ndocument.getElementById(\"app\").innerHTML = `\n<div class=\"container flow-column\">\n\t<div class=\"js-stand-form-input-container md\">\n\t\t<label for=\"name\">Name</label>\n\t\t<span class=\"description\">This is a description for the text input.</span>\n\t\t<input id=\"name\" class=\"js-stand-text-input md\" type=\"text\" />\n\t</div>\n\t<div class=\"js-stand-form-input-container sm\">\n\t\t<label for=\"username\">Username</label>\n\t\t<input\n\t\t\tid=\"username\"\n\t\t\tclass=\"js-stand-text-input sm\"\n\t\t\ttype=\"text\"\n\t\t/>\n\t\t<span class=\"js-stand-inline-message js-stand-inline-message-error\"><span class=\"material-symbols\">warning</span> Username is already taken</span>\n\t</div>\n\t<div class=\"js-stand-form-input-container md\">\n\t\t<label for=\"password\">Password</label>\n\t\t<span class=\"description\">Showing a different type</span>\n\t\t<input id=\"password\" class=\"js-stand-text-input md\" type=\"password\" />\n\t</div>\n\t<div class=\"js-stand-form-input-container md\" data-disabled>\n\t\t<label for=\"notes\">Notes</label>\n\t\t<input\n\t\t\tid=\"notes\"\n\t\t\tclass=\"js-stand-text-input md\"\n\t\t\ttype=\"text\"\n\t\t\tvalue=\"Read only content\"\n\t\t\tdisabled\n\t\t />\n\t</div>\n</div>\n`;\n";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import type { ComponentTextInput } from '../../styleD/build/typescript/component/textInput';
|
|
3
|
+
import type { Prettify } from '../../util/types';
|
|
4
|
+
import type { TextInputProps } from './types';
|
|
5
|
+
export type TextInputTheme = Prettify<ComponentTextInput>;
|
|
6
|
+
export declare const defaultTextInputTheme: TextInputTheme;
|
|
7
|
+
export declare const textInputStyles: (theme: TextInputTheme, { size, isInvalid }: Required<Pick<TextInputProps, 'size' | 'isInvalid'>>) => SerializedStyles;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { TextFieldProps as RACTextInputProps } from 'react-aria-components';
|
|
2
|
+
import type { FormInputContainerDefaultProps } from '../form/types';
|
|
3
|
+
import type { TextInputTheme } from './styles';
|
|
4
|
+
export type TextInputProps = FormInputContainerDefaultProps<RACTextInputProps, TextInputTheme>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { TopBarToolNameProps } from './types';
|
|
2
|
-
export declare const TopBarToolName: (
|
|
2
|
+
export declare const TopBarToolName: (props: TopBarToolNameProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,8 @@ import type { DeepPartial, Prettify } from '../../../util/types';
|
|
|
4
4
|
export type TopBarToolNameTheme = Prettify<ComponentTopBar['ToolName']>;
|
|
5
5
|
export type PartialTopBarToolNameTheme = DeepPartial<TopBarToolNameTheme>;
|
|
6
6
|
export declare const defaultToolNameTheme: TopBarToolNameTheme;
|
|
7
|
+
export declare const toolNameHoverLinkStyles: (theme: TopBarToolNameTheme) => SerializedStyles;
|
|
8
|
+
export declare const toolNameLinkStyles: (theme: TopBarToolNameTheme) => SerializedStyles;
|
|
7
9
|
export declare const toolNameStyles: (theme: TopBarToolNameTheme) => SerializedStyles;
|
|
8
10
|
export declare const toolNameTypography: (theme: TopBarToolNameTheme) => SerializedStyles;
|
|
9
11
|
export declare const dividerStyles: (theme: TopBarToolNameTheme) => SerializedStyles;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { LinkProps as RACLinkProps } from 'react-aria-components';
|
|
1
2
|
import type { DefaultProps } from '../../../util/types';
|
|
2
3
|
import type { FaviconProps } from '../../favicon/types';
|
|
3
4
|
import type { IconProps } from '../../icon/types';
|
|
4
5
|
import type { TopBarToolNameTheme } from './styles';
|
|
5
|
-
export interface TopBarToolNameProps extends DefaultProps<TopBarToolNameTheme> {
|
|
6
|
+
export interface TopBarToolNameProps extends DefaultProps<TopBarToolNameTheme, RACLinkProps['className']>, Omit<RACLinkProps, 'children'> {
|
|
6
7
|
/**
|
|
7
8
|
* Name of the tool to display
|
|
8
9
|
*/
|
|
@@ -19,4 +20,9 @@ export interface TopBarToolNameProps extends DefaultProps<TopBarToolNameTheme> {
|
|
|
19
20
|
* Icon that represents the content type (optional)
|
|
20
21
|
* */
|
|
21
22
|
subsectionIcon?: IconProps['symbol'] | Exclude<IconProps['children'], string>;
|
|
23
|
+
/**
|
|
24
|
+
* Text to display on hover, labels the link
|
|
25
|
+
* e.g. 'Back to dashboard'
|
|
26
|
+
*/
|
|
27
|
+
hoverText?: string;
|
|
22
28
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export { componentIcon } from './styleD/build/typescript/component/icon';
|
|
|
26
26
|
export type { ComponentIcon } from './styleD/build/typescript/component/icon';
|
|
27
27
|
export { componentFavicon } from './styleD/build/typescript/component/favicon';
|
|
28
28
|
export type { ComponentFavicon } from './styleD/build/typescript/component/favicon';
|
|
29
|
+
export { componentTextInput } from './styleD/build/typescript/component/textInput';
|
|
30
|
+
export type { ComponentTextInput } from './styleD/build/typescript/component/textInput';
|
|
29
31
|
export { componentInlineMessage } from './styleD/build/typescript/component/inlineMessage';
|
|
30
32
|
export type { ComponentInlineMessage } from './styleD/build/typescript/component/inlineMessage';
|
|
31
33
|
export { componentSelect } from './styleD/build/typescript/component/select';
|
package/dist/types/menu.d.ts
CHANGED
|
@@ -117,6 +117,38 @@ export declare const componentTopBar: {
|
|
|
117
117
|
fontWidth: number;
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
|
+
link: {
|
|
121
|
+
textDecoration: string;
|
|
122
|
+
color: string;
|
|
123
|
+
position: string;
|
|
124
|
+
width: string;
|
|
125
|
+
height: string;
|
|
126
|
+
};
|
|
127
|
+
hoverLink: {
|
|
128
|
+
color: string;
|
|
129
|
+
paddingLeft: string;
|
|
130
|
+
paddingRight: string;
|
|
131
|
+
backgroundColor: string;
|
|
132
|
+
opacity: string;
|
|
133
|
+
typography: {
|
|
134
|
+
font: string;
|
|
135
|
+
letterSpacing: string;
|
|
136
|
+
fontWidth: number;
|
|
137
|
+
};
|
|
138
|
+
position: string;
|
|
139
|
+
width: string;
|
|
140
|
+
height: string;
|
|
141
|
+
hover: {
|
|
142
|
+
opacity: string;
|
|
143
|
+
};
|
|
144
|
+
pressed: {
|
|
145
|
+
backgroundColor: string;
|
|
146
|
+
};
|
|
147
|
+
focused: {
|
|
148
|
+
outline: string;
|
|
149
|
+
'outline-offset': string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
120
152
|
};
|
|
121
153
|
};
|
|
122
154
|
export type ComponentTopBar = typeof componentTopBar;
|
|
@@ -97,11 +97,15 @@ export declare const componentMenu: {
|
|
|
97
97
|
};
|
|
98
98
|
':hover': {
|
|
99
99
|
'background-color': string;
|
|
100
|
+
outline: string;
|
|
100
101
|
};
|
|
101
102
|
':focus-visible': {
|
|
102
103
|
outline: string;
|
|
103
104
|
'outline-offset': string;
|
|
104
105
|
};
|
|
106
|
+
':pressed': {
|
|
107
|
+
'background-color': string;
|
|
108
|
+
};
|
|
105
109
|
};
|
|
106
110
|
sm: {
|
|
107
111
|
icon: {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/
|
|
4
|
+
export declare const componentTextInput: {
|
|
5
|
+
shared: {
|
|
6
|
+
color: string;
|
|
7
|
+
cursor: string;
|
|
8
|
+
padding: {
|
|
9
|
+
top: string;
|
|
10
|
+
right: string;
|
|
11
|
+
bottom: string;
|
|
12
|
+
left: string;
|
|
13
|
+
};
|
|
14
|
+
'margin-top': string;
|
|
15
|
+
'border-radius': string;
|
|
16
|
+
border: string;
|
|
17
|
+
'background-color': string;
|
|
18
|
+
disabled: {
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
cursor: string;
|
|
21
|
+
color: string;
|
|
22
|
+
border: string;
|
|
23
|
+
};
|
|
24
|
+
error: {
|
|
25
|
+
border: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
sm: {
|
|
29
|
+
height: string;
|
|
30
|
+
typography: {
|
|
31
|
+
font: string;
|
|
32
|
+
letterSpacing: string;
|
|
33
|
+
fontWidth: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
md: {
|
|
37
|
+
height: string;
|
|
38
|
+
typography: {
|
|
39
|
+
font: string;
|
|
40
|
+
letterSpacing: string;
|
|
41
|
+
fontWidth: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export type ComponentTextInput = typeof componentTextInput;
|
|
@@ -82,6 +82,11 @@ export declare const semanticTypography: {
|
|
|
82
82
|
letterSpacing: string;
|
|
83
83
|
fontWidth: number;
|
|
84
84
|
};
|
|
85
|
+
'body-xs': {
|
|
86
|
+
font: string;
|
|
87
|
+
letterSpacing: string;
|
|
88
|
+
fontWidth: number;
|
|
89
|
+
};
|
|
85
90
|
'body-sm': {
|
|
86
91
|
font: string;
|
|
87
92
|
letterSpacing: string;
|
|
@@ -102,6 +107,36 @@ export declare const semanticTypography: {
|
|
|
102
107
|
letterSpacing: string;
|
|
103
108
|
fontWidth: number;
|
|
104
109
|
};
|
|
110
|
+
'body-bold-xs': {
|
|
111
|
+
font: string;
|
|
112
|
+
letterSpacing: string;
|
|
113
|
+
fontWidth: number;
|
|
114
|
+
};
|
|
115
|
+
'body-bold-sm': {
|
|
116
|
+
font: string;
|
|
117
|
+
letterSpacing: string;
|
|
118
|
+
fontWidth: number;
|
|
119
|
+
};
|
|
120
|
+
'body-bold-md': {
|
|
121
|
+
font: string;
|
|
122
|
+
letterSpacing: string;
|
|
123
|
+
fontWidth: number;
|
|
124
|
+
};
|
|
125
|
+
'body-bold-lg': {
|
|
126
|
+
font: string;
|
|
127
|
+
letterSpacing: string;
|
|
128
|
+
fontWidth: number;
|
|
129
|
+
};
|
|
130
|
+
'body-bold-xl': {
|
|
131
|
+
font: string;
|
|
132
|
+
letterSpacing: string;
|
|
133
|
+
fontWidth: number;
|
|
134
|
+
};
|
|
135
|
+
'body-italic-xs': {
|
|
136
|
+
font: string;
|
|
137
|
+
letterSpacing: string;
|
|
138
|
+
fontWidth: number;
|
|
139
|
+
};
|
|
105
140
|
'body-italic-sm': {
|
|
106
141
|
font: string;
|
|
107
142
|
letterSpacing: string;
|
|
@@ -122,6 +157,36 @@ export declare const semanticTypography: {
|
|
|
122
157
|
letterSpacing: string;
|
|
123
158
|
fontWidth: number;
|
|
124
159
|
};
|
|
160
|
+
'body-italic-bold-xs': {
|
|
161
|
+
font: string;
|
|
162
|
+
letterSpacing: string;
|
|
163
|
+
fontWidth: number;
|
|
164
|
+
};
|
|
165
|
+
'body-italic-bold-sm': {
|
|
166
|
+
font: string;
|
|
167
|
+
letterSpacing: string;
|
|
168
|
+
fontWidth: number;
|
|
169
|
+
};
|
|
170
|
+
'body-italic-bold-md': {
|
|
171
|
+
font: string;
|
|
172
|
+
letterSpacing: string;
|
|
173
|
+
fontWidth: number;
|
|
174
|
+
};
|
|
175
|
+
'body-italic-bold-lg': {
|
|
176
|
+
font: string;
|
|
177
|
+
letterSpacing: string;
|
|
178
|
+
fontWidth: number;
|
|
179
|
+
};
|
|
180
|
+
'body-italic-bold-xl': {
|
|
181
|
+
font: string;
|
|
182
|
+
letterSpacing: string;
|
|
183
|
+
fontWidth: number;
|
|
184
|
+
};
|
|
185
|
+
'body-compact-xs': {
|
|
186
|
+
font: string;
|
|
187
|
+
letterSpacing: string;
|
|
188
|
+
fontWidth: number;
|
|
189
|
+
};
|
|
125
190
|
'body-compact-sm': {
|
|
126
191
|
font: string;
|
|
127
192
|
letterSpacing: string;
|
|
@@ -142,6 +207,36 @@ export declare const semanticTypography: {
|
|
|
142
207
|
letterSpacing: string;
|
|
143
208
|
fontWidth: number;
|
|
144
209
|
};
|
|
210
|
+
'body-compact-bold-xs': {
|
|
211
|
+
font: string;
|
|
212
|
+
letterSpacing: string;
|
|
213
|
+
fontWidth: number;
|
|
214
|
+
};
|
|
215
|
+
'body-compact-bold-sm': {
|
|
216
|
+
font: string;
|
|
217
|
+
letterSpacing: string;
|
|
218
|
+
fontWidth: number;
|
|
219
|
+
};
|
|
220
|
+
'body-compact-bold-md': {
|
|
221
|
+
font: string;
|
|
222
|
+
letterSpacing: string;
|
|
223
|
+
fontWidth: number;
|
|
224
|
+
};
|
|
225
|
+
'body-compact-bold-lg': {
|
|
226
|
+
font: string;
|
|
227
|
+
letterSpacing: string;
|
|
228
|
+
fontWidth: number;
|
|
229
|
+
};
|
|
230
|
+
'body-compact-bold-xl': {
|
|
231
|
+
font: string;
|
|
232
|
+
letterSpacing: string;
|
|
233
|
+
fontWidth: number;
|
|
234
|
+
};
|
|
235
|
+
'body-compact-italic-xs': {
|
|
236
|
+
font: string;
|
|
237
|
+
letterSpacing: string;
|
|
238
|
+
fontWidth: number;
|
|
239
|
+
};
|
|
145
240
|
'body-compact-italic-sm': {
|
|
146
241
|
font: string;
|
|
147
242
|
letterSpacing: string;
|
|
@@ -162,6 +257,31 @@ export declare const semanticTypography: {
|
|
|
162
257
|
letterSpacing: string;
|
|
163
258
|
fontWidth: number;
|
|
164
259
|
};
|
|
260
|
+
'body-compact-italic-bold-xs': {
|
|
261
|
+
font: string;
|
|
262
|
+
letterSpacing: string;
|
|
263
|
+
fontWidth: number;
|
|
264
|
+
};
|
|
265
|
+
'body-compact-italic-bold-sm': {
|
|
266
|
+
font: string;
|
|
267
|
+
letterSpacing: string;
|
|
268
|
+
fontWidth: number;
|
|
269
|
+
};
|
|
270
|
+
'body-compact-italic-bold-md': {
|
|
271
|
+
font: string;
|
|
272
|
+
letterSpacing: string;
|
|
273
|
+
fontWidth: number;
|
|
274
|
+
};
|
|
275
|
+
'body-compact-italic-bold-lg': {
|
|
276
|
+
font: string;
|
|
277
|
+
letterSpacing: string;
|
|
278
|
+
fontWidth: number;
|
|
279
|
+
};
|
|
280
|
+
'body-compact-italic-bold-xl': {
|
|
281
|
+
font: string;
|
|
282
|
+
letterSpacing: string;
|
|
283
|
+
fontWidth: number;
|
|
284
|
+
};
|
|
165
285
|
'meta-md': {
|
|
166
286
|
font: string;
|
|
167
287
|
letterSpacing: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextInput component entry point
|
|
3
|
+
*
|
|
4
|
+
* Peer dependencies required to use these components:
|
|
5
|
+
* - `@emotion/react`
|
|
6
|
+
* - `react`
|
|
7
|
+
* - `react-dom`
|
|
8
|
+
* - `typescript`
|
|
9
|
+
* - `react-aria-components`
|
|
10
|
+
*
|
|
11
|
+
* See the `peerDependencies` section of package.json for compatible versions.
|
|
12
|
+
*
|
|
13
|
+
* If you only need the built CSS (./component/textInput.css),
|
|
14
|
+
* you don't need to install these.
|
|
15
|
+
*/
|
|
16
|
+
export { TextInput } from './components/text-input/TextInput';
|
|
17
|
+
export type { TextInputProps } from './components/text-input/types';
|
|
18
|
+
export type { TextInputTheme } from './components/text-input/styles';
|
|
19
|
+
export { componentTextInput } from './styleD/build/typescript/component/textInput';
|
|
20
|
+
export type { ComponentTextInput } from './styleD/build/typescript/component/textInput';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/stand",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"//exports": "Each component has its own entry point for optimal tree-shaking. Main entry point only includes design tokens and utilities. New components/foundations should follow the same pattern.",
|
|
6
6
|
"exports": {
|
|
@@ -84,6 +84,11 @@
|
|
|
84
84
|
"import": "./dist/select.js",
|
|
85
85
|
"require": "./dist/select.cjs"
|
|
86
86
|
},
|
|
87
|
+
"./text-input": {
|
|
88
|
+
"types": "./dist/types/text-input.d.ts",
|
|
89
|
+
"import": "./dist/text-input.js",
|
|
90
|
+
"require": "./dist/text-input.cjs"
|
|
91
|
+
},
|
|
87
92
|
"./byline": {
|
|
88
93
|
"types": "./dist/types/byline.d.ts",
|
|
89
94
|
"import": "./dist/byline.js",
|
|
@@ -131,7 +136,8 @@
|
|
|
131
136
|
"./component/TopBar.css": "./dist/styleD/build/css/component/TopBar.css",
|
|
132
137
|
"./component/form.css": "./dist/styleD/build/css/component/form.css",
|
|
133
138
|
"./component/inlineMessage.css": "./dist/styleD/build/css/component/inlineMessage.css",
|
|
134
|
-
"./component/select.css": "./dist/styleD/build/css/component/select.css"
|
|
139
|
+
"./component/select.css": "./dist/styleD/build/css/component/select.css",
|
|
140
|
+
"./component/textInput.css": "./dist/styleD/build/css/component/textInput.css"
|
|
135
141
|
},
|
|
136
142
|
"//typesVersions": "Provides backward compatibility for TypeScript moduleResolution: node - maps subpath imports to correct type definition files. When adding new components with their own entry points, ensure to add them here.",
|
|
137
143
|
"typesVersions": {
|
|
@@ -192,6 +198,9 @@
|
|
|
192
198
|
],
|
|
193
199
|
"select": [
|
|
194
200
|
"./dist/types/select.d.ts"
|
|
201
|
+
],
|
|
202
|
+
"text-input": [
|
|
203
|
+
"./dist/types/text-input.d.ts"
|
|
195
204
|
]
|
|
196
205
|
}
|
|
197
206
|
},
|
|
@@ -216,7 +225,6 @@
|
|
|
216
225
|
"@guardian/tsconfig": "1.0.1",
|
|
217
226
|
"@material-design-icons/svg": "^0.14.15",
|
|
218
227
|
"@playwright/experimental-ct-react17": "^1.59.1",
|
|
219
|
-
"@react-aria/focus": "3.21.5",
|
|
220
228
|
"@rollup/plugin-commonjs": "29.0.2",
|
|
221
229
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
222
230
|
"@rollup/plugin-typescript": "12.3.0",
|
|
@@ -262,7 +270,6 @@
|
|
|
262
270
|
"peerDependencies": {
|
|
263
271
|
"@emotion/react": ">=11.11.4 <=11.14.0",
|
|
264
272
|
"@guardian/prosemirror-invisibles": "3.1.1",
|
|
265
|
-
"@react-aria/focus": "^3.21.5",
|
|
266
273
|
"prosemirror-dropcursor": "1.8.2",
|
|
267
274
|
"prosemirror-history": "1.4.1",
|
|
268
275
|
"prosemirror-keymap": "1.2.2",
|
|
@@ -281,9 +288,6 @@
|
|
|
281
288
|
"@guardian/prosemirror-invisibles": {
|
|
282
289
|
"optional": true
|
|
283
290
|
},
|
|
284
|
-
"@react-aria/focus": {
|
|
285
|
-
"optional": true
|
|
286
|
-
},
|
|
287
291
|
"prosemirror-dropcursor": {
|
|
288
292
|
"optional": true
|
|
289
293
|
},
|