@instructure/ui-form-field 11.6.0 → 11.6.1-snapshot-129
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 +46 -300
- package/es/FormField/{index.js → v1/index.js} +1 -1
- package/es/FormField/v2/index.js +78 -0
- package/es/FormField/v2/props.js +26 -0
- package/es/FormFieldGroup/{index.js → v1/index.js} +5 -4
- package/es/FormFieldGroup/v2/index.js +130 -0
- package/es/FormFieldGroup/v2/props.js +26 -0
- package/es/FormFieldGroup/v2/styles.js +49 -0
- package/es/FormFieldLabel/{index.js → v1/index.js} +1 -1
- package/es/FormFieldLabel/v2/index.js +83 -0
- package/es/FormFieldLabel/v2/props.js +26 -0
- package/es/FormFieldLabel/v2/styles.js +62 -0
- package/es/FormFieldLabel/v2/theme.js +52 -0
- package/es/FormFieldLayout/{index.js → v1/index.js} +2 -2
- package/es/FormFieldLayout/{styles.js → v1/styles.js} +2 -2
- package/es/FormFieldLayout/v2/index.js +207 -0
- package/es/FormFieldLayout/v2/props.js +26 -0
- package/es/FormFieldLayout/v2/styles.js +171 -0
- package/es/FormFieldMessage/{index.js → v1/index.js} +1 -1
- package/es/FormFieldMessage/v2/index.js +96 -0
- package/es/FormFieldMessage/v2/props.js +26 -0
- package/es/FormFieldMessage/v2/styles.js +69 -0
- package/es/FormFieldMessages/{index.js → v1/index.js} +2 -2
- package/es/FormFieldMessages/v2/index.js +88 -0
- package/es/FormFieldMessages/v2/props.js +26 -0
- package/es/FormFieldMessages/v2/styles.js +50 -0
- package/es/{index.js → exports/a.js} +6 -6
- package/es/exports/b.js +29 -0
- package/lib/FormField/{index.js → v1/index.js} +3 -3
- package/lib/FormField/v2/index.js +85 -0
- package/lib/FormField/v2/props.js +31 -0
- package/lib/FormFieldGroup/{index.js → v1/index.js} +11 -10
- package/lib/FormFieldGroup/v2/index.js +136 -0
- package/lib/FormFieldGroup/v2/props.js +31 -0
- package/lib/FormFieldGroup/v2/styles.js +55 -0
- package/lib/FormFieldLabel/{index.js → v1/index.js} +1 -1
- package/lib/FormFieldLabel/v2/index.js +89 -0
- package/lib/FormFieldLabel/v2/props.js +31 -0
- package/lib/FormFieldLabel/v2/styles.js +68 -0
- package/lib/FormFieldLabel/v2/theme.js +58 -0
- package/lib/FormFieldLayout/{index.js → v1/index.js} +3 -3
- package/lib/FormFieldLayout/{styles.js → v1/styles.js} +1 -1
- package/lib/FormFieldLayout/v2/index.js +220 -0
- package/lib/FormFieldLayout/v2/props.js +31 -0
- package/lib/FormFieldLayout/v2/styles.js +177 -0
- package/lib/FormFieldMessage/{index.js → v1/index.js} +2 -2
- package/lib/FormFieldMessage/v2/index.js +101 -0
- package/lib/FormFieldMessage/v2/props.js +31 -0
- package/lib/FormFieldMessage/v2/styles.js +75 -0
- package/lib/FormFieldMessages/{index.js → v1/index.js} +3 -3
- package/lib/FormFieldMessages/v2/index.js +93 -0
- package/lib/FormFieldMessages/v2/props.js +31 -0
- package/lib/FormFieldMessages/v2/styles.js +56 -0
- package/lib/{index.js → exports/a.js} +12 -12
- package/lib/exports/b.js +47 -0
- package/package.json +43 -21
- package/src/FormField/{index.tsx → v1/index.tsx} +1 -1
- package/src/FormField/{props.ts → v1/props.ts} +1 -1
- package/src/FormField/v2/README.md +43 -0
- package/src/FormField/v2/index.tsx +87 -0
- package/src/FormField/v2/props.ts +104 -0
- package/src/FormFieldGroup/{index.tsx → v1/index.tsx} +6 -4
- package/src/FormFieldGroup/{props.ts → v1/props.ts} +2 -2
- package/src/FormFieldGroup/v2/README.md +114 -0
- package/src/FormFieldGroup/v2/index.tsx +182 -0
- package/src/FormFieldGroup/v2/props.ts +103 -0
- package/src/FormFieldGroup/v2/styles.ts +58 -0
- package/src/FormFieldLabel/{index.tsx → v1/index.tsx} +1 -1
- package/src/FormFieldLabel/v2/index.tsx +95 -0
- package/src/FormFieldLabel/v2/props.ts +49 -0
- package/src/FormFieldLabel/v2/styles.ts +74 -0
- package/src/FormFieldLabel/v2/theme.ts +56 -0
- package/src/FormFieldLayout/{index.tsx → v1/index.tsx} +2 -2
- package/src/FormFieldLayout/{props.ts → v1/props.ts} +1 -1
- package/src/FormFieldLayout/{styles.ts → v1/styles.ts} +2 -2
- package/src/FormFieldLayout/v2/index.tsx +237 -0
- package/src/FormFieldLayout/v2/props.ts +157 -0
- package/src/FormFieldLayout/v2/styles.ts +209 -0
- package/src/FormFieldMessage/{index.tsx → v1/index.tsx} +1 -1
- package/src/FormFieldMessage/{props.ts → v1/props.ts} +4 -1
- package/src/FormFieldMessage/{styles.ts → v1/styles.ts} +2 -3
- package/src/FormFieldMessage/v2/index.tsx +104 -0
- package/src/FormFieldMessage/v2/props.ts +48 -0
- package/src/FormFieldMessage/v2/styles.ts +76 -0
- package/src/FormFieldMessages/{index.tsx → v1/index.tsx} +2 -2
- package/src/FormFieldMessages/{props.ts → v1/props.ts} +1 -1
- package/src/FormFieldMessages/v2/index.tsx +99 -0
- package/src/FormFieldMessages/v2/props.ts +59 -0
- package/src/FormFieldMessages/v2/styles.ts +55 -0
- package/src/{index.ts → exports/a.ts} +17 -13
- package/src/exports/b.ts +43 -0
- package/tsconfig.build.json +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/FormField/v1/index.d.ts.map +1 -0
- package/types/FormField/{props.d.ts → v1/props.d.ts} +1 -1
- package/types/FormField/v1/props.d.ts.map +1 -0
- package/types/FormField/v2/index.d.ts +23 -0
- package/types/FormField/v2/index.d.ts.map +1 -0
- package/types/FormField/v2/props.d.ts +57 -0
- package/types/FormField/v2/props.d.ts.map +1 -0
- package/types/FormFieldGroup/{index.d.ts → v1/index.d.ts} +1 -1
- package/types/FormFieldGroup/v1/index.d.ts.map +1 -0
- package/types/FormFieldGroup/{props.d.ts → v1/props.d.ts} +2 -2
- package/types/FormFieldGroup/v1/props.d.ts.map +1 -0
- package/types/FormFieldGroup/v1/styles.d.ts.map +1 -0
- package/types/FormFieldGroup/v1/theme.d.ts.map +1 -0
- package/types/FormFieldGroup/v2/index.d.ts +45 -0
- package/types/FormFieldGroup/v2/index.d.ts.map +1 -0
- package/types/FormFieldGroup/v2/props.d.ts +48 -0
- package/types/FormFieldGroup/v2/props.d.ts.map +1 -0
- package/types/FormFieldGroup/v2/styles.d.ts +14 -0
- package/types/FormFieldGroup/v2/styles.d.ts.map +1 -0
- package/types/FormFieldLabel/v1/index.d.ts.map +1 -0
- package/types/FormFieldLabel/v1/props.d.ts.map +1 -0
- package/types/FormFieldLabel/v1/styles.d.ts.map +1 -0
- package/types/FormFieldLabel/v1/theme.d.ts.map +1 -0
- package/types/FormFieldLabel/v2/index.d.ts +38 -0
- package/types/FormFieldLabel/v2/index.d.ts.map +1 -0
- package/types/FormFieldLabel/v2/props.d.ts +14 -0
- package/types/FormFieldLabel/v2/props.d.ts.map +1 -0
- package/types/FormFieldLabel/v2/styles.d.ts +15 -0
- package/types/FormFieldLabel/v2/styles.d.ts.map +1 -0
- package/types/FormFieldLabel/v2/theme.d.ts +10 -0
- package/types/FormFieldLabel/v2/theme.d.ts.map +1 -0
- package/types/FormFieldLayout/v1/index.d.ts.map +1 -0
- package/types/FormFieldLayout/{props.d.ts → v1/props.d.ts} +1 -1
- package/types/FormFieldLayout/v1/props.d.ts.map +1 -0
- package/types/FormFieldLayout/v1/styles.d.ts.map +1 -0
- package/types/FormFieldLayout/v1/theme.d.ts.map +1 -0
- package/types/FormFieldLayout/v2/index.d.ts +14 -0
- package/types/FormFieldLayout/v2/index.d.ts.map +1 -0
- package/types/FormFieldLayout/v2/props.d.ts +90 -0
- package/types/FormFieldLayout/v2/props.d.ts.map +1 -0
- package/types/FormFieldLayout/v2/styles.d.ts +25 -0
- package/types/FormFieldLayout/v2/styles.d.ts.map +1 -0
- package/types/FormFieldMessage/{index.d.ts → v1/index.d.ts} +2 -2
- package/types/FormFieldMessage/v1/index.d.ts.map +1 -0
- package/types/FormFieldMessage/{props.d.ts → v1/props.d.ts} +1 -1
- package/types/FormFieldMessage/v1/props.d.ts.map +1 -0
- package/types/FormFieldMessage/v1/styles.d.ts.map +1 -0
- package/types/FormFieldMessage/v1/theme.d.ts.map +1 -0
- package/types/FormFieldMessage/v2/index.d.ts +24 -0
- package/types/FormFieldMessage/v2/index.d.ts.map +1 -0
- package/types/FormFieldMessage/v2/props.d.ts +16 -0
- package/types/FormFieldMessage/v2/props.d.ts.map +1 -0
- package/types/FormFieldMessage/v2/styles.d.ts +18 -0
- package/types/FormFieldMessage/v2/styles.d.ts.map +1 -0
- package/types/FormFieldMessages/{index.d.ts → v1/index.d.ts} +1 -1
- package/types/FormFieldMessages/v1/index.d.ts.map +1 -0
- package/types/FormFieldMessages/{props.d.ts → v1/props.d.ts} +1 -1
- package/types/FormFieldMessages/v1/props.d.ts.map +1 -0
- package/types/FormFieldMessages/v1/styles.d.ts.map +1 -0
- package/types/FormFieldMessages/v1/theme.d.ts.map +1 -0
- package/types/FormFieldMessages/v2/index.d.ts +36 -0
- package/types/FormFieldMessages/v2/index.d.ts.map +1 -0
- package/types/FormFieldMessages/v2/props.d.ts +25 -0
- package/types/FormFieldMessages/v2/props.d.ts.map +1 -0
- package/types/FormFieldMessages/v2/styles.d.ts +14 -0
- package/types/FormFieldMessages/v2/styles.d.ts.map +1 -0
- package/types/exports/a.d.ts +14 -0
- package/types/exports/a.d.ts.map +1 -0
- package/types/exports/b.d.ts +14 -0
- package/types/exports/b.d.ts.map +1 -0
- package/types/utils/v1/FormPropTypes.d.ts.map +1 -0
- package/types/FormField/index.d.ts.map +0 -1
- package/types/FormField/props.d.ts.map +0 -1
- package/types/FormFieldGroup/index.d.ts.map +0 -1
- package/types/FormFieldGroup/props.d.ts.map +0 -1
- package/types/FormFieldGroup/styles.d.ts.map +0 -1
- package/types/FormFieldGroup/theme.d.ts.map +0 -1
- package/types/FormFieldLabel/index.d.ts.map +0 -1
- package/types/FormFieldLabel/props.d.ts.map +0 -1
- package/types/FormFieldLabel/styles.d.ts.map +0 -1
- package/types/FormFieldLabel/theme.d.ts.map +0 -1
- package/types/FormFieldLayout/index.d.ts.map +0 -1
- package/types/FormFieldLayout/props.d.ts.map +0 -1
- package/types/FormFieldLayout/styles.d.ts.map +0 -1
- package/types/FormFieldLayout/theme.d.ts.map +0 -1
- package/types/FormFieldMessage/index.d.ts.map +0 -1
- package/types/FormFieldMessage/props.d.ts.map +0 -1
- package/types/FormFieldMessage/styles.d.ts.map +0 -1
- package/types/FormFieldMessage/theme.d.ts.map +0 -1
- package/types/FormFieldMessages/index.d.ts.map +0 -1
- package/types/FormFieldMessages/props.d.ts.map +0 -1
- package/types/FormFieldMessages/styles.d.ts.map +0 -1
- package/types/FormFieldMessages/theme.d.ts.map +0 -1
- package/types/FormPropTypes.d.ts.map +0 -1
- package/types/index.d.ts +0 -14
- package/types/index.d.ts.map +0 -1
- /package/es/FormField/{props.js → v1/props.js} +0 -0
- /package/es/FormFieldGroup/{props.js → v1/props.js} +0 -0
- /package/es/FormFieldGroup/{styles.js → v1/styles.js} +0 -0
- /package/es/FormFieldGroup/{theme.js → v1/theme.js} +0 -0
- /package/es/FormFieldLabel/{props.js → v1/props.js} +0 -0
- /package/es/FormFieldLabel/{styles.js → v1/styles.js} +0 -0
- /package/es/FormFieldLabel/{theme.js → v1/theme.js} +0 -0
- /package/es/FormFieldLayout/{props.js → v1/props.js} +0 -0
- /package/es/FormFieldLayout/{theme.js → v1/theme.js} +0 -0
- /package/es/FormFieldMessage/{props.js → v1/props.js} +0 -0
- /package/es/FormFieldMessage/{styles.js → v1/styles.js} +0 -0
- /package/es/FormFieldMessage/{theme.js → v1/theme.js} +0 -0
- /package/es/FormFieldMessages/{props.js → v1/props.js} +0 -0
- /package/es/FormFieldMessages/{styles.js → v1/styles.js} +0 -0
- /package/es/FormFieldMessages/{theme.js → v1/theme.js} +0 -0
- /package/es/{FormPropTypes.js → utils/v1/FormPropTypes.js} +0 -0
- /package/lib/FormField/{props.js → v1/props.js} +0 -0
- /package/lib/FormFieldGroup/{props.js → v1/props.js} +0 -0
- /package/lib/FormFieldGroup/{styles.js → v1/styles.js} +0 -0
- /package/lib/FormFieldGroup/{theme.js → v1/theme.js} +0 -0
- /package/lib/FormFieldLabel/{props.js → v1/props.js} +0 -0
- /package/lib/FormFieldLabel/{styles.js → v1/styles.js} +0 -0
- /package/lib/FormFieldLabel/{theme.js → v1/theme.js} +0 -0
- /package/lib/FormFieldLayout/{props.js → v1/props.js} +0 -0
- /package/lib/FormFieldLayout/{theme.js → v1/theme.js} +0 -0
- /package/lib/FormFieldMessage/{props.js → v1/props.js} +0 -0
- /package/lib/FormFieldMessage/{styles.js → v1/styles.js} +0 -0
- /package/lib/FormFieldMessage/{theme.js → v1/theme.js} +0 -0
- /package/lib/FormFieldMessages/{props.js → v1/props.js} +0 -0
- /package/lib/FormFieldMessages/{styles.js → v1/styles.js} +0 -0
- /package/lib/FormFieldMessages/{theme.js → v1/theme.js} +0 -0
- /package/lib/{FormPropTypes.js → utils/v1/FormPropTypes.js} +0 -0
- /package/src/FormField/{README.md → v1/README.md} +0 -0
- /package/src/FormFieldGroup/{README.md → v1/README.md} +0 -0
- /package/src/FormFieldGroup/{styles.ts → v1/styles.ts} +0 -0
- /package/src/FormFieldGroup/{theme.ts → v1/theme.ts} +0 -0
- /package/src/FormFieldLabel/{props.ts → v1/props.ts} +0 -0
- /package/src/FormFieldLabel/{styles.ts → v1/styles.ts} +0 -0
- /package/src/FormFieldLabel/{theme.ts → v1/theme.ts} +0 -0
- /package/src/FormFieldLayout/{theme.ts → v1/theme.ts} +0 -0
- /package/src/FormFieldMessage/{theme.ts → v1/theme.ts} +0 -0
- /package/src/FormFieldMessages/{styles.ts → v1/styles.ts} +0 -0
- /package/src/FormFieldMessages/{theme.ts → v1/theme.ts} +0 -0
- /package/src/{FormPropTypes.ts → utils/v1/FormPropTypes.ts} +0 -0
- /package/types/FormField/{index.d.ts → v1/index.d.ts} +0 -0
- /package/types/FormFieldGroup/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/FormFieldGroup/{theme.d.ts → v1/theme.d.ts} +0 -0
- /package/types/FormFieldLabel/{index.d.ts → v1/index.d.ts} +0 -0
- /package/types/FormFieldLabel/{props.d.ts → v1/props.d.ts} +0 -0
- /package/types/FormFieldLabel/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/FormFieldLabel/{theme.d.ts → v1/theme.d.ts} +0 -0
- /package/types/FormFieldLayout/{index.d.ts → v1/index.d.ts} +0 -0
- /package/types/FormFieldLayout/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/FormFieldLayout/{theme.d.ts → v1/theme.d.ts} +0 -0
- /package/types/FormFieldMessage/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/FormFieldMessage/{theme.d.ts → v1/theme.d.ts} +0 -0
- /package/types/FormFieldMessages/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/FormFieldMessages/{theme.d.ts → v1/theme.d.ts} +0 -0
- /package/types/{FormPropTypes.d.ts → utils/v1/FormPropTypes.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormField/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;GAIG;AACH,cAAM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,YAAY,yDAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM;CAiBP;AAED,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
|
-
import type { FormMessage } from '
|
|
3
|
+
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
4
4
|
import type { Spacing } from '@instructure/emotion';
|
|
5
5
|
type FormFieldOwnProps = {
|
|
6
6
|
label: React.ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormField/v1/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAC5B,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAA;IAC7D;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAE9C;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,iBAAiB,CAAA;AAEvC,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,cAAc,GAAG,iBAAiB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAA;AAChF,QAAA,MAAM,YAAY,EAAE,eAcnB,CAAA;AAED,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { FormFieldProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
---
|
|
5
|
+
category: components
|
|
6
|
+
---
|
|
7
|
+
**/
|
|
8
|
+
declare class FormField extends Component<FormFieldProps> {
|
|
9
|
+
static readonly componentId = "FormField";
|
|
10
|
+
static allowedProps: readonly (keyof import("./props").FormFieldOwnProps)[];
|
|
11
|
+
static defaultProps: {
|
|
12
|
+
inline: boolean;
|
|
13
|
+
layout: string;
|
|
14
|
+
labelAlign: string;
|
|
15
|
+
vAlign: string;
|
|
16
|
+
};
|
|
17
|
+
ref: Element | null;
|
|
18
|
+
handleRef: (el: Element | null) => void;
|
|
19
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export default FormField;
|
|
22
|
+
export { FormField };
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormField/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;GAIG;AACH,cAAM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,YAAY,yDAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAKlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM;CAoBP;AAED,eAAe,SAAS,CAAA;AACxB,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OtherHTMLAttributes } from '@instructure/shared-types';
|
|
3
|
+
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
4
|
+
import type { Spacing } from '@instructure/emotion';
|
|
5
|
+
type FormFieldOwnProps = {
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* the id of the input (to link it to its label for a11y).
|
|
9
|
+
* Applied as the `for` HTML prop on the label.
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Array of objects with shape: `{
|
|
14
|
+
* text: React.ReactNode,
|
|
15
|
+
* type: One of: ['newError', 'error', 'hint', 'success', 'screenreader-only']
|
|
16
|
+
* }`
|
|
17
|
+
*/
|
|
18
|
+
messages?: FormMessage[];
|
|
19
|
+
/**
|
|
20
|
+
* id for the form field messages
|
|
21
|
+
*/
|
|
22
|
+
messagesId?: string;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
inline?: boolean;
|
|
25
|
+
layout?: 'stacked' | 'inline';
|
|
26
|
+
labelAlign?: 'start' | 'end';
|
|
27
|
+
vAlign?: 'top' | 'middle' | 'bottom';
|
|
28
|
+
width?: string;
|
|
29
|
+
inputContainerRef?: (element: HTMLSpanElement | null) => void;
|
|
30
|
+
/**
|
|
31
|
+
* provides a reference to the underlying html root element
|
|
32
|
+
*/
|
|
33
|
+
elementRef?: (element: Element | null) => void;
|
|
34
|
+
/**
|
|
35
|
+
* If `true`, displays an asterisk after the label to indicate the field is required
|
|
36
|
+
*/
|
|
37
|
+
isRequired?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Margin around the component. Accepts a `Spacing` token. See token values and example usage in [this guide](https://instructure.design/#layout-spacing).
|
|
40
|
+
*/
|
|
41
|
+
margin?: Spacing;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the field is disabled. When true, error and success messages will be hidden.
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the field is read-only. When true, error and success messages will be hidden.
|
|
48
|
+
*/
|
|
49
|
+
readOnly?: boolean;
|
|
50
|
+
};
|
|
51
|
+
type PropKeys = keyof FormFieldOwnProps;
|
|
52
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
53
|
+
type FormFieldProps = FormFieldOwnProps & OtherHTMLAttributes<FormFieldOwnProps>;
|
|
54
|
+
declare const allowedProps: AllowedPropKeys;
|
|
55
|
+
export type { FormFieldOwnProps, FormFieldProps };
|
|
56
|
+
export { allowedProps };
|
|
57
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormField/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;IAC5B,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAA;IAC7D;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,iBAAiB,CAAA;AAEvC,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,cAAc,GAAG,iBAAiB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAA;AAChF,QAAA,MAAM,YAAY,EAAE,eAiBnB,CAAA;AAED,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -10,7 +10,7 @@ declare class FormFieldGroup extends Component<FormFieldGroupProps> {
|
|
|
10
10
|
static allowedProps: readonly (keyof {
|
|
11
11
|
description: React.ReactNode;
|
|
12
12
|
as?: import("@instructure/shared-types").AsElementType;
|
|
13
|
-
messages?: import("
|
|
13
|
+
messages?: import("../../exports/a").FormMessage[];
|
|
14
14
|
messagesId?: string;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
children?: React.ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAA0C,MAAM,OAAO,CAAA;AAczE,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAE5E;;;;GAIG;AACH,cACM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,WAAW,oBAAmB;IAE9C,MAAM,CAAC,YAAY;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;MAOlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,IAAI,mBAAmB,IAAI,wBAAwB,CAQlD;IAED,IAAI,OAAO,YAOV;IAED,aAAa;IAkBb,cAAc;IAgBd,YAAY;IAUZ,MAAM;CA+CP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AsElementType, FormFieldGroupTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
2
2
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
-
import type { FormFieldLayoutOwnProps } from '
|
|
4
|
-
import type { FormMessage } from '
|
|
3
|
+
import type { FormFieldLayoutOwnProps } from '../../FormFieldLayout/v1/props';
|
|
4
|
+
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
5
5
|
type FormFieldGroupOwnProps = {
|
|
6
6
|
description: React.ReactNode;
|
|
7
7
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../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C,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,mBAAmB,GAAG,sBAAsB,GAC/C,cAAc,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,GACxD,mBAAmB,CAAC,sBAAsB,CAAC,GAG3C,IAAI,CACF,uBAAuB,EACvB,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CACvE,CAAA;AAEH,KAAK,mBAAmB,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAA;AAC3D,QAAA,MAAM,YAAY,EAAE,eAanB,CAAA;AAED,YAAY,EACV,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACpB,CAAA;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v1/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACpE,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAEhB;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,mBAAmB,EACnC,OAAO,mBAAmB,EAC1B,OAAO,wBAAwB,KAC9B,mBAuBF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v1/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAE/D;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,mBAgB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { FormFieldGroupProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
---
|
|
5
|
+
category: components
|
|
6
|
+
---
|
|
7
|
+
**/
|
|
8
|
+
declare class FormFieldGroup extends Component<FormFieldGroupProps> {
|
|
9
|
+
static readonly componentId = "FormFieldGroup";
|
|
10
|
+
static allowedProps: readonly (keyof {
|
|
11
|
+
description: React.ReactNode;
|
|
12
|
+
as?: import("@instructure/shared-types").AsElementType;
|
|
13
|
+
messages?: import("../../exports/a").FormMessage[];
|
|
14
|
+
messagesId?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
layout?: "stacked" | "columns" | "inline";
|
|
19
|
+
rowSpacing?: "none" | "small" | "medium" | "large";
|
|
20
|
+
colSpacing?: "none" | "small" | "medium" | "large";
|
|
21
|
+
vAlign?: "top" | "middle" | "bottom";
|
|
22
|
+
startAt?: "small" | "medium" | "large" | "x-large" | null;
|
|
23
|
+
elementRef?: (element: Element | null) => void;
|
|
24
|
+
})[];
|
|
25
|
+
static defaultProps: {
|
|
26
|
+
as: string;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
rowSpacing: string;
|
|
29
|
+
colSpacing: string;
|
|
30
|
+
vAlign: string;
|
|
31
|
+
isGroup: boolean;
|
|
32
|
+
};
|
|
33
|
+
ref: Element | null;
|
|
34
|
+
handleRef: (el: Element | null) => void;
|
|
35
|
+
componentDidMount(): void;
|
|
36
|
+
componentDidUpdate(): void;
|
|
37
|
+
get invalid(): boolean;
|
|
38
|
+
renderColumns(): import("@emotion/react/jsx-runtime").JSX.Element[] | null | undefined;
|
|
39
|
+
renderChildren(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
|
+
renderFields(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
42
|
+
}
|
|
43
|
+
export default FormFieldGroup;
|
|
44
|
+
export { FormFieldGroup };
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAA0C,MAAM,OAAO,CAAA;AAazE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;GAIG;AACH,cACM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,WAAW,oBAAmB;IAE9C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;MAOlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,IAAI,OAAO,YAOV;IAED,aAAa;IAkBb,cAAc;IAgBd,YAAY;IAUZ,MAAM;CA+CP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AsElementType, FormFieldGroupTheme, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
2
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
+
import type { FormFieldLayoutOwnProps } from '../../FormFieldLayout/v2/props';
|
|
4
|
+
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
5
|
+
type FormFieldGroupOwnProps = {
|
|
6
|
+
description: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* the element type to render as
|
|
9
|
+
*/
|
|
10
|
+
as?: AsElementType;
|
|
11
|
+
/**
|
|
12
|
+
* Array of objects with shape: `{
|
|
13
|
+
* text: React.ReactNode,
|
|
14
|
+
* type: One of: ['newError', 'error', 'hint', 'success', 'screenreader-only']
|
|
15
|
+
* }`
|
|
16
|
+
*/
|
|
17
|
+
messages?: FormMessage[];
|
|
18
|
+
/**
|
|
19
|
+
* id for the form field messages
|
|
20
|
+
*/
|
|
21
|
+
messagesId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the field group is disabled. When true, error and success messages will be hidden.
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the field group is read-only. When true, error and success messages will be hidden.
|
|
28
|
+
*/
|
|
29
|
+
readOnly?: boolean;
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
layout?: 'stacked' | 'columns' | 'inline';
|
|
32
|
+
rowSpacing?: 'none' | 'small' | 'medium' | 'large';
|
|
33
|
+
colSpacing?: 'none' | 'small' | 'medium' | 'large';
|
|
34
|
+
vAlign?: 'top' | 'middle' | 'bottom';
|
|
35
|
+
startAt?: 'small' | 'medium' | 'large' | 'x-large' | null;
|
|
36
|
+
/**
|
|
37
|
+
* provides a reference to the underlying html root element
|
|
38
|
+
*/
|
|
39
|
+
elementRef?: (element: Element | null) => void;
|
|
40
|
+
};
|
|
41
|
+
type PropKeys = keyof FormFieldGroupOwnProps;
|
|
42
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
43
|
+
type FormFieldGroupProps = FormFieldGroupOwnProps & WithStyleProps<FormFieldGroupTheme, FormFieldGroupStyle> & OtherHTMLAttributes<FormFieldGroupOwnProps> & Omit<FormFieldLayoutOwnProps, 'messages' | 'messagesId' | 'vAlign' | 'layout' | 'label' | 'children'>;
|
|
44
|
+
type FormFieldGroupStyle = ComponentStyle<'formFieldGroup'>;
|
|
45
|
+
declare const allowedProps: AllowedPropKeys;
|
|
46
|
+
export type { FormFieldGroupProps, FormFieldGroupStyle };
|
|
47
|
+
export { allowedProps };
|
|
48
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -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G,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,GAG3C,IAAI,CACF,uBAAuB,EACvB,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CACvE,CAAA;AAEH,KAAK,mBAAmB,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAA;AAC3D,QAAA,MAAM,YAAY,EAAE,eAcnB,CAAA;AAED,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FormFieldGroupProps, FormFieldGroupStyle } from './props';
|
|
2
|
+
/**
|
|
3
|
+
* ---
|
|
4
|
+
* private: true
|
|
5
|
+
* ---
|
|
6
|
+
* Generates the style object from the theme and provided additional information
|
|
7
|
+
* @param {Object} componentTheme The theme variable object.
|
|
8
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
9
|
+
* @param {Object} state the state of the component, the style is applied to
|
|
10
|
+
* @return {Object} The final style object, which will be used in the component
|
|
11
|
+
*/
|
|
12
|
+
declare const generateStyle: (_componentTheme: {}, props: FormFieldGroupProps) => FormFieldGroupStyle;
|
|
13
|
+
export default generateStyle;
|
|
14
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/FormFieldGroup/v2/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAEvE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,GAEjB,iBAAiB,EAAE,EACnB,OAAO,mBAAmB,KACzB,mBAeF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;;;;;;;;;;;GAiBG;AACH,cACM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,WAAW,oBAAmB;IAE9C,MAAM,CAAC,YAAY;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAET;IAEV,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAE9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAeP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/v1/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,aAAa,EACb,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;AAC3D,QAAA,MAAM,YAAY,EAAE,eAAoC,CAAA;AAExD,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/v1/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,GACjB,gBAAgB,mBAAmB,EACnC,OAAO,mBAAmB,KACzB,mBA6BF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/v1/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,GAAI,OAAO,KAAK,KAAG,mBAqB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import type { FormFieldLabelProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
---
|
|
5
|
+
parent: FormField
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
This is a helper component that is used by most of the custom form
|
|
9
|
+
components. In most cases it shouldn't be used directly.
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
---
|
|
13
|
+
type: example
|
|
14
|
+
---
|
|
15
|
+
<FormFieldLabel>Hello</FormFieldLabel>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
@deprecated since version 10. This is an internal component that will be
|
|
19
|
+
removed in the future
|
|
20
|
+
**/
|
|
21
|
+
declare class FormFieldLabel extends Component<FormFieldLabelProps> {
|
|
22
|
+
static readonly componentId = "FormFieldLabel";
|
|
23
|
+
static allowedProps: readonly (keyof {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
as?: import("@instructure/shared-types").AsElementType;
|
|
26
|
+
})[];
|
|
27
|
+
static defaultProps: {
|
|
28
|
+
readonly as: "span";
|
|
29
|
+
};
|
|
30
|
+
ref: Element | null;
|
|
31
|
+
handleRef: (el: Element | null) => void;
|
|
32
|
+
componentDidMount(): void;
|
|
33
|
+
componentDidUpdate(): void;
|
|
34
|
+
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
35
|
+
}
|
|
36
|
+
export default FormFieldLabel;
|
|
37
|
+
export { FormFieldLabel };
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;;;;;;;;;;;GAiBG;AACH,cACM,cAAe,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,WAAW,oBAAmB;IAE9C,MAAM,CAAC,YAAY;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAET;IAEV,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAE9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAeP;AAED,eAAe,cAAc,CAAA;AAC7B,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AsElementType, 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 allowedProps: AllowedPropKeys;
|
|
12
|
+
export type { FormFieldLabelProps, FormFieldLabelStyle };
|
|
13
|
+
export { allowedProps };
|
|
14
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,aAAa,EACb,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;AAC3D,QAAA,MAAM,YAAY,EAAE,eAAoC,CAAA;AAExD,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/v2/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,GACjB,gBAAgB,mBAAmB,EACnC,OAAO,mBAAmB,KACzB,mBA6BF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLabel/v2/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,GAAI,OAAO,KAAK,KAAG,mBAqB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWjC,OAAO,EAAgB,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAGnD;;;;GAIG;AACH,cAEM,eAAgB,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,YAAY,+DAAe;IAClC,MAAM,CAAC,YAAY;;;;;MAKT;gBAEE,KAAK,EAAE,oBAAoB;IAMvC,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,QAAQ,CAAQ;IAExB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,cAAc,QAAO,mBAAmB,CAUvC;IAED,IAAI,eAAe,YAElB;IAED,IAAI,WAAW,YAed;IAED,IAAI,WAAW,oQAEd;IAED,uBAAuB,GAAI,MAAM,WAAW,GAAG,IAAI,UAIlD;IAED,WAAW;IAiCX,qBAAqB;IAUrB,MAAM;CAiCP;AAED,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AsElementType, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
2
2
|
import type { WithStyleProps, ComponentStyle, Spacing } from '@instructure/emotion';
|
|
3
|
-
import type { FormMessage } from '
|
|
3
|
+
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
4
4
|
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils';
|
|
5
5
|
type FormFieldLayoutOwnProps = {
|
|
6
6
|
label: React.ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v1/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,OAAO,EACR,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAE3E,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;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AE,OAAO,CAAA;IACxB,wBAAwB,EAAE,OAAO,CAAA;CAClC,CAAA;AAED,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACxB,CAAA;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v1/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAiCrE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,oBAAoB,EACpC,OAAO,oBAAoB,EAC3B,YAAY,mBAAmB,KAC9B,oBAgHF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v1/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,oBAwB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { allowedProps } from './props';
|
|
2
|
+
/**
|
|
3
|
+
---
|
|
4
|
+
parent: FormField
|
|
5
|
+
---
|
|
6
|
+
**/
|
|
7
|
+
declare const FormFieldLayout: import("react").ForwardRefExoticComponent<import("./props").FormFieldLayoutOwnProps & {
|
|
8
|
+
themeOverride?: import("@instructure/emotion").ThemeOverrideValue;
|
|
9
|
+
} & Omit<import("react").AllHTMLAttributes<import("./props").FormFieldLayoutOwnProps & Element>, "dir" | keyof import("./props").FormFieldLayoutOwnProps> & {
|
|
10
|
+
dir?: "ltr" | "rtl";
|
|
11
|
+
} & import("@instructure/ui-react-utils").WithDeterministicIdProps & import("react").RefAttributes<Element>>;
|
|
12
|
+
export default FormFieldLayout;
|
|
13
|
+
export { FormFieldLayout, allowedProps };
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v2/index.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC;;;;GAIG;AACH,QAAA,MAAM,eAAe;;;;4GAgMpB,CAAA;AAID,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { AsElementType, OtherHTMLAttributes } from '@instructure/shared-types';
|
|
2
|
+
import type { ComponentStyle, Spacing, ThemeOverrideValue } from '@instructure/emotion';
|
|
3
|
+
import type { FormMessage } from '../../utils/v1/FormPropTypes';
|
|
4
|
+
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils';
|
|
5
|
+
type FormFieldLayoutOwnProps = {
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* the id of the input (to link it to its label for a11y)
|
|
9
|
+
*/
|
|
10
|
+
id?: string;
|
|
11
|
+
/**
|
|
12
|
+
* the element type to render as
|
|
13
|
+
*/
|
|
14
|
+
as?: AsElementType;
|
|
15
|
+
/**
|
|
16
|
+
* Array of objects with shape: `{
|
|
17
|
+
* text: React.ReactNode,
|
|
18
|
+
* type: One of: ['newError', 'error', 'hint', 'success', 'screenreader-only']
|
|
19
|
+
* }`
|
|
20
|
+
*/
|
|
21
|
+
messages?: FormMessage[];
|
|
22
|
+
/**
|
|
23
|
+
* id for the form field messages
|
|
24
|
+
*/
|
|
25
|
+
messagesId?: string;
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* If `true` use an inline layout -- content will flow on the left/right side
|
|
29
|
+
* of this component
|
|
30
|
+
*/
|
|
31
|
+
inline?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* In `stacked` mode the container is below the label, in `inline` mode the
|
|
34
|
+
* container is to the right/left (depending on text direction)
|
|
35
|
+
*/
|
|
36
|
+
layout?: 'stacked' | 'inline';
|
|
37
|
+
/**
|
|
38
|
+
* The horizontal alignment of the label. Only works in `inline` layout
|
|
39
|
+
*/
|
|
40
|
+
labelAlign?: 'start' | 'end';
|
|
41
|
+
/**
|
|
42
|
+
* The vertical alignment of the label and the controls.
|
|
43
|
+
* "top" by default
|
|
44
|
+
*/
|
|
45
|
+
vAlign?: 'top' | 'middle' | 'bottom';
|
|
46
|
+
width?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Provides a reference to the container that holds the input element
|
|
49
|
+
* @param element The element that holds the input control as its children
|
|
50
|
+
*/
|
|
51
|
+
inputContainerRef?: (element: HTMLElement | null) => void;
|
|
52
|
+
/**
|
|
53
|
+
* provides a reference to the underlying html root element
|
|
54
|
+
*/
|
|
55
|
+
elementRef?: (element: Element | null) => void;
|
|
56
|
+
isGroup?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* If `true`, displays an asterisk after the label to indicate the field is required
|
|
59
|
+
*/
|
|
60
|
+
isRequired?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Valid values are `0`, `none`, `auto`, and Spacing token values,
|
|
63
|
+
* see https://instructure.design/layout-spacing. Apply these values via
|
|
64
|
+
* familiar CSS-like shorthand. For example, `margin="small auto large"`.
|
|
65
|
+
*/
|
|
66
|
+
margin?: Spacing;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the field is disabled. When true, error and success messages will be hidden.
|
|
69
|
+
*/
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Whether the field is read-only. When true, error and success messages will be hidden.
|
|
73
|
+
*/
|
|
74
|
+
readOnly?: boolean;
|
|
75
|
+
};
|
|
76
|
+
type PropKeys = keyof FormFieldLayoutOwnProps;
|
|
77
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
78
|
+
type FormFieldLayoutProps = FormFieldLayoutOwnProps & {
|
|
79
|
+
themeOverride?: ThemeOverrideValue;
|
|
80
|
+
} & OtherHTMLAttributes<FormFieldLayoutOwnProps> & WithDeterministicIdProps;
|
|
81
|
+
type FormFieldLayoutStyle = ComponentStyle<'formFieldLayout' | 'formFieldLabel' | 'formFieldChildren' | 'requiredAsterisk'>;
|
|
82
|
+
declare const allowedProps: AllowedPropKeys;
|
|
83
|
+
type FormFieldStyleProps = {
|
|
84
|
+
hasMessages: boolean;
|
|
85
|
+
hasVisibleLabel: boolean;
|
|
86
|
+
hasErrorMsgAndIsGroup: boolean;
|
|
87
|
+
};
|
|
88
|
+
export type { FormFieldStyleProps, FormFieldLayoutProps, FormFieldLayoutStyle, FormFieldLayoutOwnProps };
|
|
89
|
+
export { allowedProps };
|
|
90
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAE3E,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OA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BAAgB,GAChB,mBAAmB,GACnB,kBAAkB,CACrB,CAAA;AACD,QAAA,MAAM,YAAY,EAAE,eAkBnB,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,OAAO,CAAA;IACpB,eAAe,EAAE,OAAO,CAAA;IACxB,qBAAqB,EAAE,OAAO,CAAA;CAC/B,CAAA;AAED,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACxB,CAAA;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FormFieldLayoutProps, FormFieldLayoutStyle, FormFieldStyleProps } from './props';
|
|
2
|
+
import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes';
|
|
3
|
+
type StyleParams = FormFieldStyleProps & {
|
|
4
|
+
inline: FormFieldLayoutProps['inline'];
|
|
5
|
+
layout: FormFieldLayoutProps['layout'];
|
|
6
|
+
vAlign: FormFieldLayoutProps['vAlign'];
|
|
7
|
+
labelAlign: FormFieldLayoutProps['labelAlign'];
|
|
8
|
+
margin: FormFieldLayoutProps['margin'];
|
|
9
|
+
messages: FormFieldLayoutProps['messages'];
|
|
10
|
+
isRequired: FormFieldLayoutProps['isRequired'];
|
|
11
|
+
invalid: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* ---
|
|
15
|
+
* private: true
|
|
16
|
+
* ---
|
|
17
|
+
* Generates the style object from the theme and provided additional information
|
|
18
|
+
* @param componentTheme The theme variable object.
|
|
19
|
+
* @param params Additional parameters to customize the style.
|
|
20
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
21
|
+
* @return The final style object, which will be used in the component
|
|
22
|
+
*/
|
|
23
|
+
declare const generateStyle: (componentTheme: NewComponentTypes["FormFieldLayout"], params: StyleParams, sharedTokens: SharedTokens) => FormFieldLayoutStyle;
|
|
24
|
+
export default generateStyle;
|
|
25
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/FormFieldLayout/v2/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG7E,KAAK,WAAW,GAAG,mBAAmB,GAAG;IACvC,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IACtC,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IACtC,UAAU,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAA;IAC9C,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAA;IACtC,QAAQ,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAA;IAC1C,UAAU,EAAE,oBAAoB,CAAC,YAAY,CAAC,CAAA;IAC9C,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAgCD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,iBAAiB,CAAC,iBAAiB,CAAC,EACpD,QAAQ,WAAW,EACnB,cAAc,YAAY,KACzB,oBAuHF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -18,8 +18,8 @@ type: example
|
|
|
18
18
|
declare class FormFieldMessage extends Component<FormFieldMessageProps> {
|
|
19
19
|
static readonly componentId = "FormFieldMessage";
|
|
20
20
|
static allowedProps: readonly (keyof {
|
|
21
|
-
variant?: import("
|
|
22
|
-
children?: import("
|
|
21
|
+
variant?: import("../../exports/a").FormMessageType;
|
|
22
|
+
children?: import("../../exports/a").FormMessageChild;
|
|
23
23
|
})[];
|
|
24
24
|
static defaultProps: {
|
|
25
25
|
variant: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/FormFieldMessage/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAYjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD;;;;;;;;;;;;;;GAcG;AACH,cACM,gBAAiB,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,WAAW,sBAAqB;IAEhD,MAAM,CAAC,YAAY;;;SAAe;IAClC,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAE9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,MAAM;CAoBP;AAED,eAAe,gBAAgB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FormFieldMessageTheme } from '@instructure/shared-types';
|
|
2
2
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
3
|
-
import type { FormMessageType, FormMessageChild } from '
|
|
3
|
+
import type { FormMessageType, FormMessageChild } from '../../utils/v1/FormPropTypes';
|
|
4
4
|
type FormFieldMessageOwnProps = {
|
|
5
5
|
variant?: FormMessageType;
|
|
6
6
|
children?: FormMessageChild;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/FormFieldMessage/v1/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,8BAA8B,CAAA;AAErC,KAAK,wBAAwB,GAAG;IAC9B,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CAC5B,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,wBAAwB,CAAA;AAE9C,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,qBAAqB,GAAG,wBAAwB,GACnD,cAAc,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAA;AAE9D,KAAK,qBAAqB,GAAG,cAAc,CAAC,kBAAkB,GAAG,WAAW,CAAC,CAAA;AAC7E,QAAA,MAAM,YAAY,EAAE,eAAyC,CAAA;AAE7D,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/FormFieldMessage/v1/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE3E;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,GACjB,gBAAgB,qBAAqB,EACrC,OAAO,qBAAqB,KAC3B,qBA2BF,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/FormFieldMessage/v1/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAsB,MAAM,wBAAwB,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAEjE;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,KAAK,KAAG,qBAyB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|