@instructure/ui-form-field 10.12.0 → 10.12.1-snapshot-1
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/CHANGELOG.md +11 -0
- package/es/FormField/index.js +0 -1
- package/es/FormFieldGroup/__new-tests__/FormFieldGroup.test.js +4 -4
- package/es/FormFieldGroup/index.js +18 -4
- package/es/FormFieldLayout/__new-tests__/FormFieldLayout.test.js +10 -8
- package/es/FormFieldLayout/index.js +73 -54
- package/es/FormFieldLayout/styles.js +109 -10
- package/es/FormFieldLayout/theme.js +28 -2
- package/es/FormFieldMessages/props.js +3 -2
- package/es/FormFieldMessages/styles.js +5 -3
- package/es/FormPropTypes.js +6 -0
- package/es/index.js +0 -1
- package/lib/FormField/index.js +0 -1
- package/lib/FormFieldGroup/__new-tests__/FormFieldGroup.test.js +4 -4
- package/lib/FormFieldGroup/index.js +18 -4
- package/lib/FormFieldLayout/__new-tests__/FormFieldLayout.test.js +9 -7
- package/lib/FormFieldLayout/index.js +72 -54
- package/lib/FormFieldLayout/styles.js +109 -10
- package/lib/FormFieldLayout/theme.js +28 -2
- package/lib/FormFieldMessages/props.js +3 -2
- package/lib/FormFieldMessages/styles.js +5 -3
- package/lib/FormPropTypes.js +6 -0
- package/lib/index.js +0 -7
- package/package.json +15 -15
- package/src/FormField/README.md +31 -3
- package/src/FormField/index.tsx +0 -1
- package/src/FormFieldGroup/__new-tests__/FormFieldGroup.test.tsx +4 -6
- package/src/FormFieldGroup/index.tsx +41 -6
- package/src/FormFieldLayout/__new-tests__/FormFieldLayout.test.tsx +6 -8
- package/src/FormFieldLayout/index.tsx +78 -92
- package/src/FormFieldLayout/props.ts +28 -2
- package/src/FormFieldLayout/styles.ts +128 -14
- package/src/FormFieldLayout/theme.ts +30 -4
- package/src/FormFieldMessages/props.ts +8 -2
- package/src/FormFieldMessages/styles.ts +5 -4
- package/src/FormPropTypes.ts +4 -0
- package/src/index.ts +0 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/FormField/index.d.ts.map +1 -1
- package/types/FormFieldGroup/index.d.ts +1 -0
- package/types/FormFieldGroup/index.d.ts.map +1 -1
- package/types/FormFieldLayout/index.d.ts +8 -7
- package/types/FormFieldLayout/index.d.ts.map +1 -1
- package/types/FormFieldLayout/props.d.ts +27 -3
- package/types/FormFieldLayout/props.d.ts.map +1 -1
- package/types/FormFieldLayout/styles.d.ts +4 -3
- package/types/FormFieldLayout/styles.d.ts.map +1 -1
- package/types/FormFieldLayout/theme.d.ts +7 -1
- package/types/FormFieldLayout/theme.d.ts.map +1 -1
- package/types/FormFieldMessages/index.d.ts +8 -2
- package/types/FormFieldMessages/index.d.ts.map +1 -1
- package/types/FormFieldMessages/props.d.ts +5 -0
- package/types/FormFieldMessages/props.d.ts.map +1 -1
- package/types/FormFieldMessages/styles.d.ts +2 -3
- package/types/FormFieldMessages/styles.d.ts.map +1 -1
- package/types/FormPropTypes.d.ts +3 -0
- package/types/FormPropTypes.d.ts.map +1 -1
- package/types/index.d.ts +0 -2
- package/types/index.d.ts.map +1 -1
- package/es/FormFieldLabel/__new-tests__/FormFieldLabel.test.js +0 -66
- package/es/FormFieldLabel/index.js +0 -79
- package/es/FormFieldLabel/props.js +0 -31
- package/es/FormFieldLabel/styles.js +0 -62
- package/es/FormFieldLabel/theme.js +0 -52
- package/lib/FormFieldLabel/__new-tests__/FormFieldLabel.test.js +0 -68
- package/lib/FormFieldLabel/index.js +0 -85
- package/lib/FormFieldLabel/props.js +0 -37
- package/lib/FormFieldLabel/styles.js +0 -68
- package/lib/FormFieldLabel/theme.js +0 -58
- package/src/FormFieldLabel/__new-tests__/FormFieldLabel.test.tsx +0 -79
- package/src/FormFieldLabel/index.tsx +0 -95
- package/src/FormFieldLabel/props.ts +0 -58
- package/src/FormFieldLabel/styles.ts +0 -74
- package/src/FormFieldLabel/theme.ts +0 -56
- package/types/FormFieldLabel/__new-tests__/FormFieldLabel.test.d.ts +0 -2
- package/types/FormFieldLabel/__new-tests__/FormFieldLabel.test.d.ts.map +0 -1
- package/types/FormFieldLabel/index.d.ts +0 -42
- package/types/FormFieldLabel/index.d.ts.map +0 -1
- package/types/FormFieldLabel/props.d.ts +0 -15
- package/types/FormFieldLabel/props.d.ts.map +0 -1
- package/types/FormFieldLabel/styles.d.ts +0 -15
- package/types/FormFieldLabel/styles.d.ts.map +0 -1
- package/types/FormFieldLabel/theme.d.ts +0 -10
- package/types/FormFieldLabel/theme.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldLabel.test.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/__new-tests__/FormFieldLabel.test.tsx"],"names":[],"mappings":"AA4BA,OAAO,2BAA2B,CAAA"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { Component } from 'react';
|
|
3
|
-
import { jsx } from '@instructure/emotion';
|
|
4
|
-
import type { FormFieldLabelProps } from './props';
|
|
5
|
-
/**
|
|
6
|
-
---
|
|
7
|
-
parent: FormField
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
This is a helper component that is used by most of the custom form
|
|
11
|
-
components. In most cases it shouldn't be used directly.
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
---
|
|
15
|
-
type: example
|
|
16
|
-
---
|
|
17
|
-
<FormFieldLabel>Hello</FormFieldLabel>
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
**/
|
|
21
|
-
declare class FormFieldLabel extends Component<FormFieldLabelProps> {
|
|
22
|
-
static readonly componentId = "FormFieldLabel";
|
|
23
|
-
static propTypes: import("@instructure/shared-types").PropValidators<keyof {
|
|
24
|
-
children: React.ReactNode;
|
|
25
|
-
as?: import("@instructure/shared-types").AsElementType;
|
|
26
|
-
}>;
|
|
27
|
-
static allowedProps: readonly (keyof {
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
as?: import("@instructure/shared-types").AsElementType;
|
|
30
|
-
})[];
|
|
31
|
-
static defaultProps: {
|
|
32
|
-
readonly as: "span";
|
|
33
|
-
};
|
|
34
|
-
ref: Element | null;
|
|
35
|
-
handleRef: (el: Element | null) => void;
|
|
36
|
-
componentDidMount(): void;
|
|
37
|
-
componentDidUpdate(): void;
|
|
38
|
-
render(): jsx.JSX.Element;
|
|
39
|
-
}
|
|
40
|
-
export default FormFieldLabel;
|
|
41
|
-
export { FormFieldLabel };
|
|
42
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FormFieldLabel/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;;;;;;;;;GAeG;AACH,cACM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,WAAW,oBAAmB;IAE9C,MAAM,CAAC,SAAS;kBAvBK,MAAO,SAAS;;OAuBT;IAC5B,MAAM,CAAC,YAAY;kBAxBE,MAAO,SAAS;;SAwBH;IAClC,MAAM,CAAC,YAAY;;MAET;IAEV,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,OAAQ,OAAO,GAAG,IAAI,UAE9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAeP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { AsElementType, PropValidators, FormFieldLabelTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
2
|
-
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
-
type FormFieldLabelOwnProps = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
as?: AsElementType;
|
|
6
|
-
};
|
|
7
|
-
type PropKeys = keyof FormFieldLabelOwnProps;
|
|
8
|
-
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
9
|
-
type FormFieldLabelProps = FormFieldLabelOwnProps & WithStyleProps<FormFieldLabelTheme, FormFieldLabelStyle> & OtherHTMLAttributes<FormFieldLabelOwnProps>;
|
|
10
|
-
type FormFieldLabelStyle = ComponentStyle<'formFieldLabel'>;
|
|
11
|
-
declare const propTypes: PropValidators<PropKeys>;
|
|
12
|
-
declare const allowedProps: AllowedPropKeys;
|
|
13
|
-
export type { FormFieldLabelProps, FormFieldLabelStyle };
|
|
14
|
-
export { propTypes, allowedProps };
|
|
15
|
-
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/FormFieldLabel/props.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,EAAE,CAAC,EAAE,aAAa,CAAA;CACnB,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,sBAAsB,CAAA;AAE5C,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,mBAAmB,GAAG,sBAAsB,GAC/C,cAAc,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,GACxD,mBAAmB,CAAC,sBAAsB,CAAC,CAAA;AAE7C,KAAK,mBAAmB,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAA;AAE3D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAGvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAAoC,CAAA;AAExD,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { FormFieldLabelTheme } from '@instructure/shared-types';
|
|
2
|
-
import type { FormFieldLabelProps, FormFieldLabelStyle } from './props';
|
|
3
|
-
/**
|
|
4
|
-
* ---
|
|
5
|
-
* private: true
|
|
6
|
-
* ---
|
|
7
|
-
* Generates the style object from the theme and provided additional information
|
|
8
|
-
* @param {Object} componentTheme The theme variable object.
|
|
9
|
-
* @param {Object} props the props of the component, the style is applied to
|
|
10
|
-
* @param {Object} state the state of the component, the style is applied to
|
|
11
|
-
* @return {Object} The final style object, which will be used in the component
|
|
12
|
-
*/
|
|
13
|
-
declare const generateStyle: (componentTheme: FormFieldLabelTheme, props: FormFieldLabelProps) => FormFieldLabelStyle;
|
|
14
|
-
export default generateStyle;
|
|
15
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/FormFieldLabel/styles.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAEvE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,mBAAmB,SAC5B,mBAAmB,KACzB,mBA6BF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@instructure/ui-themes';
|
|
2
|
-
import { FormFieldLabelTheme } from '@instructure/shared-types';
|
|
3
|
-
/**
|
|
4
|
-
* Generates the theme object for the component from the theme and provided additional information
|
|
5
|
-
* @param {Object} theme The actual theme object.
|
|
6
|
-
* @return {Object} The final theme object with the overrides and component variables
|
|
7
|
-
*/
|
|
8
|
-
declare const generateComponentTheme: (theme: Theme) => FormFieldLabelTheme;
|
|
9
|
-
export default generateComponentTheme;
|
|
10
|
-
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/FormFieldLabel/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAE/D;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,mBAqB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|