@fluentui/react-field 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230321-0440.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.json +13 -13
- package/CHANGELOG.md +9 -9
- package/lib/Field.js +1 -1
- package/lib/Field.js.map +1 -1
- package/lib/components/Field/Field.js +5 -5
- package/lib/components/Field/Field.js.map +1 -1
- package/lib/components/Field/Field.types.js +1 -1
- package/lib/components/Field/Field.types.js.map +1 -1
- package/lib/components/Field/index.js +5 -5
- package/lib/components/Field/index.js.map +1 -1
- package/lib/components/Field/renderField.js +13 -3
- package/lib/components/Field/renderField.js.map +1 -1
- package/lib/components/Field/useField.js +29 -28
- package/lib/components/Field/useField.js.map +1 -1
- package/lib/components/Field/useFieldStyles.js +7 -7
- package/lib/components/Field/useFieldStyles.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/util/makeDeprecatedField.js +7 -4
- package/lib/util/makeDeprecatedField.js.map +1 -1
- package/lib-commonjs/Field.js +4 -5
- package/lib-commonjs/Field.js.map +1 -1
- package/lib-commonjs/components/Field/Field.js +12 -16
- package/lib-commonjs/components/Field/Field.js.map +1 -1
- package/lib-commonjs/components/Field/Field.types.js +2 -5
- package/lib-commonjs/components/Field/Field.types.js.map +1 -1
- package/lib-commonjs/components/Field/index.js +8 -9
- package/lib-commonjs/components/Field/index.js.map +1 -1
- package/lib-commonjs/components/Field/renderField.js +26 -13
- package/lib-commonjs/components/Field/renderField.js.map +1 -1
- package/lib-commonjs/components/Field/useField.js +102 -94
- package/lib-commonjs/components/Field/useField.js.map +1 -1
- package/lib-commonjs/components/Field/useFieldStyles.js +97 -138
- package/lib-commonjs/components/Field/useFieldStyles.js.map +1 -1
- package/lib-commonjs/index.js +49 -21
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/util/makeDeprecatedField.js +71 -53
- package/lib-commonjs/util/makeDeprecatedField.js.map +1 -1
- package/package.json +10 -9
- package/.swcrc +0 -39
@@ -1,154 +1,113 @@
|
|
1
1
|
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
function _export(target, all) {
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
7
|
-
enumerable: true,
|
8
|
-
get: all[name]
|
9
|
-
});
|
10
|
-
}
|
11
|
-
_export(exports, {
|
12
|
-
fieldClassNames: ()=>fieldClassNames,
|
13
|
-
useFieldStyles_unstable: ()=>useFieldStyles_unstable
|
4
|
+
value: true
|
14
5
|
});
|
15
|
-
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
6
|
+
exports.useFieldStyles_unstable = exports.fieldClassNames = void 0;
|
7
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
|
+
exports.fieldClassNames = {
|
10
|
+
root: `fui-Field`,
|
11
|
+
label: `fui-Field__label`,
|
12
|
+
validationMessage: `fui-Field__validationMessage`,
|
13
|
+
validationMessageIcon: `fui-Field__validationMessageIcon`,
|
14
|
+
hint: `fui-Field__hint`
|
22
15
|
};
|
23
16
|
// Size of the icon in the validation message
|
24
|
-
const iconSize =
|
17
|
+
const iconSize = '12px';
|
25
18
|
/**
|
26
19
|
* Styles for the root slot
|
27
|
-
*/
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
Budl1dq: "f1c2z91y"
|
41
|
-
}
|
20
|
+
*/
|
21
|
+
const useRootStyles = /*#__PURE__*/react_1.__styles({
|
22
|
+
base: {
|
23
|
+
mc9l5x: "f13qh94s"
|
24
|
+
},
|
25
|
+
horizontal: {
|
26
|
+
Budl1dq: "f2wwaib",
|
27
|
+
wkccdc: "f1645dqt"
|
28
|
+
},
|
29
|
+
horizontalNoLabel: {
|
30
|
+
uwmqm3: ["f15jqgz8", "fggqkej"],
|
31
|
+
Budl1dq: "f1c2z91y"
|
32
|
+
}
|
42
33
|
}, {
|
43
|
-
|
44
|
-
".f13qh94s{display:grid;}",
|
45
|
-
".f2wwaib{grid-template-columns:33% 1fr;}",
|
46
|
-
".f1645dqt{grid-template-rows:auto auto auto 1fr;}",
|
47
|
-
".f15jqgz8{padding-left:33%;}",
|
48
|
-
".fggqkej{padding-right:33%;}",
|
49
|
-
".f1c2z91y{grid-template-columns:1fr;}"
|
50
|
-
]
|
34
|
+
d: [".f13qh94s{display:grid;}", ".f2wwaib{grid-template-columns:33% 1fr;}", ".f1645dqt{grid-template-rows:auto auto auto 1fr;}", ".f15jqgz8{padding-left:33%;}", ".fggqkej{padding-right:33%;}", ".f1c2z91y{grid-template-columns:1fr;}"]
|
51
35
|
});
|
52
|
-
const useLabelStyles = /*#__PURE__*/
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
Ijaq50: "f16hsg94",
|
73
|
-
nk6f5a: "f1nzqi2z"
|
74
|
-
}
|
36
|
+
const useLabelStyles = /*#__PURE__*/react_1.__styles({
|
37
|
+
base: {
|
38
|
+
z8tnut: "fclwglc",
|
39
|
+
Byoj8tv: "fywfov9"
|
40
|
+
},
|
41
|
+
large: {
|
42
|
+
z8tnut: "f1sl3k7w",
|
43
|
+
Byoj8tv: "f1brlhvm"
|
44
|
+
},
|
45
|
+
vertical: {
|
46
|
+
jrapky: "fyacil5"
|
47
|
+
},
|
48
|
+
verticalLarge: {
|
49
|
+
jrapky: "f8l5zjj"
|
50
|
+
},
|
51
|
+
horizontal: {
|
52
|
+
t21cq0: ["fkujibs", "f199hnxi"],
|
53
|
+
Ijaq50: "f16hsg94",
|
54
|
+
nk6f5a: "f1nzqi2z"
|
55
|
+
}
|
75
56
|
}, {
|
76
|
-
|
77
|
-
".fclwglc{padding-top:var(--spacingVerticalXXS);}",
|
78
|
-
".fywfov9{padding-bottom:var(--spacingVerticalXXS);}",
|
79
|
-
".f1sl3k7w{padding-top:1px;}",
|
80
|
-
".f1brlhvm{padding-bottom:1px;}",
|
81
|
-
".fyacil5{margin-bottom:var(--spacingVerticalXXS);}",
|
82
|
-
".f8l5zjj{margin-bottom:var(--spacingVerticalXS);}",
|
83
|
-
".fkujibs{margin-right:var(--spacingHorizontalM);}",
|
84
|
-
".f199hnxi{margin-left:var(--spacingHorizontalM);}",
|
85
|
-
".f16hsg94{grid-row-start:1;}",
|
86
|
-
".f1nzqi2z{grid-row-end:-1;}"
|
87
|
-
]
|
57
|
+
d: [".fclwglc{padding-top:var(--spacingVerticalXXS);}", ".fywfov9{padding-bottom:var(--spacingVerticalXXS);}", ".f1sl3k7w{padding-top:1px;}", ".f1brlhvm{padding-bottom:1px;}", ".fyacil5{margin-bottom:var(--spacingVerticalXXS);}", ".f8l5zjj{margin-bottom:var(--spacingVerticalXS);}", ".fkujibs{margin-right:var(--spacingHorizontalM);}", ".f199hnxi{margin-left:var(--spacingHorizontalM);}", ".f16hsg94{grid-row-start:1;}", ".f1nzqi2z{grid-row-end:-1;}"]
|
88
58
|
});
|
89
|
-
const useSecondaryTextBaseClassName = /*#__PURE__*/
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
uwmqm3: [
|
98
|
-
"frawy03",
|
99
|
-
"fg4c52"
|
100
|
-
]
|
101
|
-
}
|
59
|
+
const useSecondaryTextBaseClassName = /*#__PURE__*/react_1.__resetStyles("r5c4z9l", null, [".r5c4z9l{margin-top:var(--spacingVerticalXXS);color:var(--colorNeutralForeground3);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);}"]);
|
60
|
+
const useSecondaryTextStyles = /*#__PURE__*/react_1.__styles({
|
61
|
+
error: {
|
62
|
+
sj55zd: "f1hcrxcs"
|
63
|
+
},
|
64
|
+
withIcon: {
|
65
|
+
uwmqm3: ["frawy03", "fg4c52"]
|
66
|
+
}
|
102
67
|
}, {
|
103
|
-
|
104
|
-
".f1hcrxcs{color:var(--colorPaletteRedForeground1);}",
|
105
|
-
".frawy03{padding-left:calc(12px + var(--spacingHorizontalXS));}",
|
106
|
-
".fg4c52{padding-right:calc(12px + var(--spacingHorizontalXS));}"
|
107
|
-
]
|
68
|
+
d: [".f1hcrxcs{color:var(--colorPaletteRedForeground1);}", ".frawy03{padding-left:calc(12px + var(--spacingHorizontalXS));}", ".fg4c52{padding-right:calc(12px + var(--spacingHorizontalXS));}"]
|
108
69
|
});
|
109
|
-
const useValidationMessageIconBaseClassName = /*#__PURE__*/
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
success: {
|
121
|
-
sj55zd: "ffmvakt"
|
122
|
-
}
|
70
|
+
const useValidationMessageIconBaseClassName = /*#__PURE__*/react_1.__resetStyles("ra7h1uk", "r1rh6bd7", [".ra7h1uk{display:inline-block;font-size:12px;margin-left:calc(-12px - var(--spacingHorizontalXS));margin-right:var(--spacingHorizontalXS);line-height:0;vertical-align:-1px;}", ".r1rh6bd7{display:inline-block;font-size:12px;margin-right:calc(-12px - var(--spacingHorizontalXS));margin-left:var(--spacingHorizontalXS);line-height:0;vertical-align:-1px;}"]);
|
71
|
+
const useValidationMessageIconStyles = /*#__PURE__*/react_1.__styles({
|
72
|
+
error: {
|
73
|
+
sj55zd: "f1hcrxcs"
|
74
|
+
},
|
75
|
+
warning: {
|
76
|
+
sj55zd: "f1k5f75o"
|
77
|
+
},
|
78
|
+
success: {
|
79
|
+
sj55zd: "ffmvakt"
|
80
|
+
}
|
123
81
|
}, {
|
124
|
-
|
125
|
-
".f1hcrxcs{color:var(--colorPaletteRedForeground1);}",
|
126
|
-
".f1k5f75o{color:var(--colorPaletteDarkOrangeForeground1);}",
|
127
|
-
".ffmvakt{color:var(--colorPaletteGreenForeground1);}"
|
128
|
-
]
|
82
|
+
d: [".f1hcrxcs{color:var(--colorPaletteRedForeground1);}", ".f1k5f75o{color:var(--colorPaletteDarkOrangeForeground1);}", ".ffmvakt{color:var(--colorPaletteGreenForeground1);}"]
|
129
83
|
});
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
84
|
+
/**
|
85
|
+
* Apply styling to the Field slots based on the state
|
86
|
+
*/
|
87
|
+
const useFieldStyles_unstable = state => {
|
88
|
+
const {
|
89
|
+
validationState
|
90
|
+
} = state;
|
91
|
+
const horizontal = state.orientation === 'horizontal';
|
92
|
+
const rootStyles = useRootStyles();
|
93
|
+
state.root.className = react_1.mergeClasses(exports.fieldClassNames.root, rootStyles.base, horizontal && rootStyles.horizontal, horizontal && !state.label && rootStyles.horizontalNoLabel, state.root.className);
|
94
|
+
const labelStyles = useLabelStyles();
|
95
|
+
if (state.label) {
|
96
|
+
state.label.className = react_1.mergeClasses(exports.fieldClassNames.label, labelStyles.base, horizontal && labelStyles.horizontal, !horizontal && labelStyles.vertical, state.label.size === 'large' && labelStyles.large, !horizontal && state.label.size === 'large' && labelStyles.verticalLarge, state.label.className);
|
97
|
+
}
|
98
|
+
const validationMessageIconBaseClassName = useValidationMessageIconBaseClassName();
|
99
|
+
const validationMessageIconStyles = useValidationMessageIconStyles();
|
100
|
+
if (state.validationMessageIcon) {
|
101
|
+
state.validationMessageIcon.className = react_1.mergeClasses(exports.fieldClassNames.validationMessageIcon, validationMessageIconBaseClassName, validationState !== 'none' && validationMessageIconStyles[validationState], state.validationMessageIcon.className);
|
102
|
+
}
|
103
|
+
const secondaryTextBaseClassName = useSecondaryTextBaseClassName();
|
104
|
+
const secondaryTextStyles = useSecondaryTextStyles();
|
105
|
+
if (state.validationMessage) {
|
106
|
+
state.validationMessage.className = react_1.mergeClasses(exports.fieldClassNames.validationMessage, secondaryTextBaseClassName, validationState === 'error' && secondaryTextStyles.error, !!state.validationMessageIcon && secondaryTextStyles.withIcon, state.validationMessage.className);
|
107
|
+
}
|
108
|
+
if (state.hint) {
|
109
|
+
state.hint.className = react_1.mergeClasses(exports.fieldClassNames.hint, secondaryTextBaseClassName, state.hint.className);
|
110
|
+
}
|
111
|
+
};
|
112
|
+
exports.useFieldStyles_unstable = useFieldStyles_unstable;
|
154
113
|
//# sourceMappingURL=useFieldStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["react_theme_1","require","react_1","exports","fieldClassNames","root","label","validationMessage","validationMessageIcon","hint","iconSize","useRootStyles","__styles","base","mc9l5x","horizontal","Budl1dq","wkccdc","horizontalNoLabel","uwmqm3","d","useLabelStyles","z8tnut","Byoj8tv","large","vertical","jrapky","verticalLarge","t21cq0","Ijaq50","nk6f5a","useSecondaryTextBaseClassName","__resetStyles","useSecondaryTextStyles","error","sj55zd","withIcon","useValidationMessageIconBaseClassName","useValidationMessageIconStyles","warning","success","useFieldStyles_unstable","state","validationState","orientation","rootStyles","className","mergeClasses","labelStyles","size","validationMessageIconBaseClassName","validationMessageIconStyles","secondaryTextBaseClassName","secondaryTextStyles"],"sources":["../../../../../../../../../packages/react-components/react-field/src/components/Field/useFieldStyles.ts"],"sourcesContent":["import { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { FieldSlots, FieldState } from './Field.types';\n\nexport const fieldClassNames: SlotClassNames<FieldSlots> = {\n root: `fui-Field`,\n label: `fui-Field__label`,\n validationMessage: `fui-Field__validationMessage`,\n validationMessageIcon: `fui-Field__validationMessageIcon`,\n hint: `fui-Field__hint`,\n};\n\n// Size of the icon in the validation message\nconst iconSize = '12px';\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n display: 'grid',\n },\n\n // In horizontal layout, the field is a grid with the label taking up the entire first column.\n // The last row is slack space in case the label is taller than the rest of the content.\n horizontal: {\n gridTemplateColumns: '33% 1fr',\n gridTemplateRows: 'auto auto auto 1fr',\n },\n\n // In horizontal layout without a label, replace the label's column with padding.\n // This lets grid auto-flow properly place the other children, and keeps fields with and without labels aligned.\n horizontalNoLabel: {\n paddingLeft: '33%',\n gridTemplateColumns: '1fr',\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n paddingTop: tokens.spacingVerticalXXS,\n paddingBottom: tokens.spacingVerticalXXS,\n },\n\n large: {\n paddingTop: '1px',\n paddingBottom: '1px',\n },\n\n vertical: {\n marginBottom: tokens.spacingVerticalXXS,\n },\n\n verticalLarge: {\n marginBottom: tokens.spacingVerticalXS,\n },\n\n horizontal: {\n marginRight: tokens.spacingHorizontalM,\n gridRowStart: '1',\n gridRowEnd: '-1',\n },\n});\n\nconst useSecondaryTextBaseClassName = makeResetStyles({\n marginTop: tokens.spacingVerticalXXS,\n color: tokens.colorNeutralForeground3,\n ...typographyStyles.caption1,\n});\n\nconst useSecondaryTextStyles = makeStyles({\n error: {\n color: tokens.colorPaletteRedForeground1,\n },\n\n withIcon: {\n // Add a gutter for the icon, to allow multiple lines of text to line up to the right of the icon.\n paddingLeft: `calc(${iconSize} + ${tokens.spacingHorizontalXS})`,\n },\n});\n\nconst useValidationMessageIconBaseClassName = makeResetStyles({\n display: 'inline-block',\n fontSize: iconSize,\n // Negative left margin puts the icon in the gutter of the validation message div's withIcon style.\n marginLeft: `calc(-${iconSize} - ${tokens.spacingHorizontalXS})`,\n marginRight: tokens.spacingHorizontalXS,\n // Line height of 0 prevents the verticalAlign from affecting the line height of the text.\n lineHeight: '0',\n // Negative verticalAlign shifts the inline icon down to align with the text (effectively top padding).\n verticalAlign: '-1px',\n});\n\nconst useValidationMessageIconStyles = makeStyles({\n error: {\n color: tokens.colorPaletteRedForeground1,\n },\n warning: {\n color: tokens.colorPaletteDarkOrangeForeground1,\n },\n success: {\n color: tokens.colorPaletteGreenForeground1,\n },\n});\n\n/**\n * Apply styling to the Field slots based on the state\n */\nexport const useFieldStyles_unstable = (state: FieldState) => {\n const { validationState } = state;\n const horizontal = state.orientation === 'horizontal';\n\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n fieldClassNames.root,\n rootStyles.base,\n horizontal && rootStyles.horizontal,\n horizontal && !state.label && rootStyles.horizontalNoLabel,\n state.root.className,\n );\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n fieldClassNames.label,\n labelStyles.base,\n horizontal && labelStyles.horizontal,\n !horizontal && labelStyles.vertical,\n state.label.size === 'large' && labelStyles.large,\n !horizontal && state.label.size === 'large' && labelStyles.verticalLarge,\n state.label.className,\n );\n }\n\n const validationMessageIconBaseClassName = useValidationMessageIconBaseClassName();\n const validationMessageIconStyles = useValidationMessageIconStyles();\n if (state.validationMessageIcon) {\n state.validationMessageIcon.className = mergeClasses(\n fieldClassNames.validationMessageIcon,\n validationMessageIconBaseClassName,\n validationState !== 'none' && validationMessageIconStyles[validationState],\n state.validationMessageIcon.className,\n );\n }\n\n const secondaryTextBaseClassName = useSecondaryTextBaseClassName();\n const secondaryTextStyles = useSecondaryTextStyles();\n if (state.validationMessage) {\n state.validationMessage.className = mergeClasses(\n fieldClassNames.validationMessage,\n secondaryTextBaseClassName,\n validationState === 'error' && secondaryTextStyles.error,\n !!state.validationMessageIcon && secondaryTextStyles.withIcon,\n state.validationMessage.className,\n );\n }\n\n if (state.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BAAqB,EAAE;IAC/BkC,KAAK,CAAClC,qBAAqB,CAACsC,SAAS,GAAG5C,OAAA,CAAA6C,YAAY,CAClD5C,OAAA,CAAAC,eAAe,CAACI,qBAAqB,EACrC0C,kCAAkC,EAClCP,eAAe,KAAK,MAAM,IAAIQ,2BAA2B,CAACR,eAAe,CAAC,EAC1ED,KAAK,CAAClC,qBAAqB,CAACsC,SAAS,CACtC;;EAGH,MAAMM,0BAA0B,GAAGrB,6BAA6B,EAAE;EAClE,MAAMsB,mBAAmB,GAAGpB,sBAAsB,EAAE;EACpD,IAAIS,KAAK,CAACnC,iBAAiB,EAAE;IAC3BmC,KAAK,CAACnC,iBAAiB,CAACuC,SAAS,GAAG5C,OAAA,CAAA6C,YAAY,CAC9C5C,OAAA,CAAAC,eAAe,CAACG,iBAAiB,EACjC6C,0BAA0B,EAC1BT,eAAe,KAAK,OAAO,IAAIU,mBAAmB,CAACnB,KAAK,EACxD,CAAC,CAACQ,KAAK,CAAClC,qBAAqB,IAAI6C,mBAAmB,CAACjB,QAAQ,EAC7DM,KAAK,CAACnC,iBAAiB,CAACuC,SAAS,CAClC;;EAGH,IAAIJ,KAAK,CAACjC,IAAI,EAAE;IACdiC,KAAK,CAACjC,IAAI,CAACqC,SAAS,GAAG5C,OAAA,CAAA6C,YAAY,CAAC5C,OAAA,CAAAC,eAAe,CAACK,IAAI,EAAE2C,0BAA0B,EAAEV,KAAK,CAACjC,IAAI,CAACqC,SAAS,CAAC;;AAE/G,CAAC;AApDY3C,OAAA,CAAAsC,uBAAuB,GAAAA,uBAAA"}
|
package/lib-commonjs/index.js
CHANGED
@@ -1,24 +1,52 @@
|
|
1
1
|
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
3
|
-
value: true
|
4
|
-
});
|
5
|
-
function _export(target, all) {
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
7
|
-
enumerable: true,
|
8
|
-
get: all[name]
|
9
|
-
});
|
10
|
-
}
|
11
|
-
_export(exports, {
|
12
|
-
Field: ()=>_field.Field,
|
13
|
-
fieldClassNames: ()=>_field.fieldClassNames,
|
14
|
-
renderField_unstable: ()=>_field.renderField_unstable,
|
15
|
-
useFieldStyles_unstable: ()=>_field.useFieldStyles_unstable,
|
16
|
-
useField_unstable: ()=>_field.useField_unstable,
|
17
|
-
getDeprecatedFieldClassNames: ()=>_makeDeprecatedField.getDeprecatedFieldClassNames,
|
18
|
-
makeDeprecatedField: ()=>_makeDeprecatedField.makeDeprecatedField
|
19
|
-
});
|
20
|
-
const _field = require("./Field");
|
21
|
-
const _makeDeprecatedField = require("./util/makeDeprecatedField");
|
22
|
-
//# sourceMappingURL=index.js.map
|
23
2
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.makeDeprecatedField = exports.getDeprecatedFieldClassNames = exports.useField_unstable = exports.useFieldStyles_unstable = exports.renderField_unstable = exports.fieldClassNames = exports.Field = void 0;
|
7
|
+
var Field_1 = /*#__PURE__*/require("./Field");
|
8
|
+
Object.defineProperty(exports, "Field", {
|
9
|
+
enumerable: true,
|
10
|
+
get: function () {
|
11
|
+
return Field_1.Field;
|
12
|
+
}
|
13
|
+
});
|
14
|
+
Object.defineProperty(exports, "fieldClassNames", {
|
15
|
+
enumerable: true,
|
16
|
+
get: function () {
|
17
|
+
return Field_1.fieldClassNames;
|
18
|
+
}
|
19
|
+
});
|
20
|
+
Object.defineProperty(exports, "renderField_unstable", {
|
21
|
+
enumerable: true,
|
22
|
+
get: function () {
|
23
|
+
return Field_1.renderField_unstable;
|
24
|
+
}
|
25
|
+
});
|
26
|
+
Object.defineProperty(exports, "useFieldStyles_unstable", {
|
27
|
+
enumerable: true,
|
28
|
+
get: function () {
|
29
|
+
return Field_1.useFieldStyles_unstable;
|
30
|
+
}
|
31
|
+
});
|
32
|
+
Object.defineProperty(exports, "useField_unstable", {
|
33
|
+
enumerable: true,
|
34
|
+
get: function () {
|
35
|
+
return Field_1.useField_unstable;
|
36
|
+
}
|
37
|
+
});
|
38
|
+
// eslint-disable-next-line deprecation/deprecation
|
39
|
+
var makeDeprecatedField_1 = /*#__PURE__*/require("./util/makeDeprecatedField");
|
40
|
+
Object.defineProperty(exports, "getDeprecatedFieldClassNames", {
|
41
|
+
enumerable: true,
|
42
|
+
get: function () {
|
43
|
+
return makeDeprecatedField_1.getDeprecatedFieldClassNames;
|
44
|
+
}
|
45
|
+
});
|
46
|
+
Object.defineProperty(exports, "makeDeprecatedField", {
|
47
|
+
enumerable: true,
|
48
|
+
get: function () {
|
49
|
+
return makeDeprecatedField_1.makeDeprecatedField;
|
50
|
+
}
|
51
|
+
});
|
24
52
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["Field_1","require","Object","defineProperty","exports","enumerable","get","Field","fieldClassNames","renderField_unstable","useFieldStyles_unstable","useField_unstable","makeDeprecatedField_1","getDeprecatedFieldClassNames","makeDeprecatedField"],"sources":["../../../../../../../packages/react-components/react-field/src/index.ts"],"sourcesContent":["export { Field, fieldClassNames, renderField_unstable, useFieldStyles_unstable, useField_unstable } from './Field';\nexport type { FieldProps, FieldSlots, FieldState } from './Field';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { getDeprecatedFieldClassNames, makeDeprecatedField } from './util/makeDeprecatedField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { DeprecatedFieldProps } from './util/makeDeprecatedField';\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,gBAAAC,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAO,KAAK;EAAA;AAAA;AAAEL,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAQ,eAAe;EAAA;AAAA;AAAEN,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAS,oBAAoB;EAAA;AAAA;AAAEP,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAU,uBAAuB;EAAA;AAAA;AAAER,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,OAAA,CAAAW,iBAAiB;EAAA;AAAA;AAGjG;AACA,IAAAC,qBAAA,gBAAAX,OAAA;AAASC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,qBAAA,CAAAC,4BAA4B;EAAA;AAAA;AAAEX,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAM,qBAAA,CAAAE,mBAAmB;EAAA;AAAA"}
|
@@ -1,61 +1,79 @@
|
|
1
|
-
|
1
|
+
"use strict";
|
2
|
+
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
3
|
-
|
4
|
-
});
|
5
|
-
function _export(target, all) {
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
7
|
-
enumerable: true,
|
8
|
-
get: all[name]
|
9
|
-
});
|
10
|
-
}
|
11
|
-
_export(exports, {
|
12
|
-
makeDeprecatedField: ()=>makeDeprecatedField,
|
13
|
-
getDeprecatedFieldClassNames: ()=>getDeprecatedFieldClassNames
|
4
|
+
value: true
|
14
5
|
});
|
15
|
-
|
16
|
-
|
17
|
-
const
|
6
|
+
exports.getDeprecatedFieldClassNames = exports.makeDeprecatedField = void 0;
|
7
|
+
/* eslint-disable deprecation/deprecation */
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
|
+
const Field_1 = /*#__PURE__*/require("../Field");
|
18
10
|
/**
|
19
11
|
* Partition the props used by the Field itself, from the props that are passed to the underlying field component.
|
20
|
-
*/
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
12
|
+
*/
|
13
|
+
function getPartitionedFieldProps(props) {
|
14
|
+
const {
|
15
|
+
className,
|
16
|
+
control,
|
17
|
+
hint,
|
18
|
+
label,
|
19
|
+
orientation,
|
20
|
+
required,
|
21
|
+
root,
|
22
|
+
size,
|
23
|
+
style,
|
24
|
+
validationMessage,
|
25
|
+
validationMessageIcon,
|
26
|
+
validationState = 'none',
|
27
|
+
...restOfProps
|
28
|
+
} = props;
|
29
|
+
return [{
|
30
|
+
className,
|
31
|
+
hint,
|
32
|
+
label,
|
33
|
+
orientation,
|
34
|
+
required,
|
35
|
+
size,
|
36
|
+
style,
|
37
|
+
validationMessage,
|
38
|
+
validationMessageIcon,
|
39
|
+
validationState,
|
40
|
+
...root
|
41
|
+
}, {
|
42
|
+
required,
|
43
|
+
size,
|
44
|
+
...restOfProps,
|
45
|
+
...control
|
46
|
+
}];
|
43
47
|
}
|
48
|
+
/**
|
49
|
+
* @deprecated Only for use to make deprecated [Control]Field shim components.
|
50
|
+
* @internal
|
51
|
+
*/
|
44
52
|
function makeDeprecatedField(Control, options = {}) {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
53
|
+
const {
|
54
|
+
mapProps = props => props,
|
55
|
+
displayName = `${Control.displayName}Field`
|
56
|
+
} = options;
|
57
|
+
const DeprecatedField = React.forwardRef((props, ref) => {
|
58
|
+
const [fieldProps, controlProps] = getPartitionedFieldProps(mapProps(props));
|
59
|
+
return React.createElement(Field_1.Field, {
|
60
|
+
...fieldProps
|
61
|
+
}, React.createElement(Control, {
|
62
|
+
...controlProps,
|
63
|
+
ref: ref
|
64
|
+
}));
|
65
|
+
});
|
66
|
+
DeprecatedField.displayName = displayName;
|
67
|
+
return DeprecatedField;
|
55
68
|
}
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
69
|
+
exports.makeDeprecatedField = makeDeprecatedField;
|
70
|
+
/**
|
71
|
+
* @deprecated Only for use to make deprecated [Control]Field shim components.
|
72
|
+
* @internal
|
73
|
+
*/
|
74
|
+
const getDeprecatedFieldClassNames = controlRootClassName => ({
|
75
|
+
...Field_1.fieldClassNames,
|
76
|
+
control: controlRootClassName
|
77
|
+
});
|
78
|
+
exports.getDeprecatedFieldClassNames = getDeprecatedFieldClassNames;
|
61
79
|
//# sourceMappingURL=makeDeprecatedField.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["React","require","Field_1","getPartitionedFieldProps","props","className","control","hint","label","orientation","required","root","size","style","validationMessage","validationMessageIcon","validationState","restOfProps","makeDeprecatedField","Control","options","mapProps","displayName","DeprecatedField","forwardRef","ref","fieldProps","controlProps","createElement","Field","exports","getDeprecatedFieldClassNames","controlRootClassName","fieldClassNames"],"sources":["../../../../../../../../packages/react-components/react-field/src/util/makeDeprecatedField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport * as React from 'react';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { FieldProps } from '../Field';\nimport { Field, fieldClassNames } from '../Field';\n\n/**\n * @deprecated Only for use to make deprecated [Control]Field shim components.\n * @internal\n */\nexport type DeprecatedFieldProps<ControlProps> = ControlProps & {\n root?: FieldProps;\n control?: ControlProps;\n} & Pick<\n FieldProps,\n | 'className'\n | 'hint'\n | 'label'\n | 'orientation'\n | 'style'\n | 'validationMessage'\n | 'validationMessageIcon'\n | 'validationState'\n >;\n\n/**\n * Partition the props used by the Field itself, from the props that are passed to the underlying field component.\n */\nfunction getPartitionedFieldProps<ControlProps>(\n props: DeprecatedFieldProps<ControlProps> & Pick<FieldProps, 'required' | 'size'>,\n) {\n const {\n className,\n control,\n hint,\n label,\n orientation,\n required,\n root,\n size,\n style,\n validationMessage,\n validationMessageIcon,\n validationState = 'none',\n ...restOfProps\n } = props;\n\n return [\n {\n className,\n hint,\n label,\n orientation,\n required,\n size,\n style,\n validationMessage,\n validationMessageIcon,\n validationState,\n ...root,\n },\n {\n required,\n size,\n ...restOfProps,\n ...control,\n },\n ];\n}\n\n/**\n * @deprecated Only for use to make deprecated [Control]Field shim components.\n * @internal\n */\nexport function makeDeprecatedField<ControlProps>(\n Control: React.ComponentType<ControlProps>,\n options: {\n mapProps?: (props: DeprecatedFieldProps<ControlProps>) => DeprecatedFieldProps<ControlProps>;\n displayName?: string;\n } = {},\n) {\n const { mapProps = props => props, displayName = `${Control.displayName}Field` } = options;\n\n const DeprecatedField = React.forwardRef((props, ref) => {\n const [fieldProps, controlProps] = getPartitionedFieldProps(mapProps(props));\n return (\n <Field {...fieldProps}>\n {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}\n <Control {...(controlProps as any)} ref={ref as any} />\n </Field>\n );\n }) as ForwardRefComponent<DeprecatedFieldProps<ControlProps>>;\n\n DeprecatedField.displayName = displayName;\n\n return DeprecatedField;\n}\n\n/**\n * @deprecated Only for use to make deprecated [Control]Field shim components.\n * @internal\n */\nexport const getDeprecatedFieldClassNames = (controlRootClassName: string) => ({\n ...fieldClassNames,\n control: controlRootClassName,\n});\n"],"mappings":";;;;;;AAAA;AACA,MAAAA,KAAA,gBAAAC,OAAA;AAGA,MAAAC,OAAA,gBAAAD,OAAA;AAqBA;;;AAGA,SAASE,wBAAwBA,CAC/BC,KAAiF;EAEjF,MAAM;IACJC,SAAS;IACTC,OAAO;IACPC,IAAI;IACJC,KAAK;IACLC,WAAW;IACXC,QAAQ;IACRC,IAAI;IACJC,IAAI;IACJC,KAAK;IACLC,iBAA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|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-field",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20230321-0440.1",
|
4
4
|
"description": "Fluent UI Field components",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -22,23 +22,23 @@
|
|
22
22
|
"storybook": "start-storybook",
|
23
23
|
"test": "jest --passWithNoTests",
|
24
24
|
"type-check": "tsc -b tsconfig.json",
|
25
|
-
"generate-api": "just-scripts
|
25
|
+
"generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
29
29
|
"@fluentui/react-conformance": "*",
|
30
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
30
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230321-0440.1",
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-context-selector": "0.0.0-nightly-
|
36
|
-
"@fluentui/react-icons": "^2.0.
|
37
|
-
"@fluentui/react-label": "0.0.0-nightly-
|
38
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
39
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
35
|
+
"@fluentui/react-context-selector": "0.0.0-nightly-20230321-0440.1",
|
36
|
+
"@fluentui/react-icons": "^2.0.196",
|
37
|
+
"@fluentui/react-label": "0.0.0-nightly-20230321-0440.1",
|
38
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230321-0440.1",
|
39
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230321-0440.1",
|
40
40
|
"@griffel/react": "^1.5.2",
|
41
|
-
"
|
41
|
+
"tslib": "^2.1.0"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
44
44
|
"@types/react": ">=16.8.0 <19.0.0",
|
@@ -50,6 +50,7 @@
|
|
50
50
|
"exports": {
|
51
51
|
".": {
|
52
52
|
"types": "./dist/index.d.ts",
|
53
|
+
"node": "./lib-commonjs/index.js",
|
53
54
|
"import": "./lib/index.js",
|
54
55
|
"require": "./lib-commonjs/index.js"
|
55
56
|
},
|