@fluentui/react-migration-v0-v9 9.0.0 → 9.0.2
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 +67 -1
- package/CHANGELOG.md +26 -2
- package/lib/components/Button/ButtonMigration.mixins.js +61 -62
- package/lib/components/Button/ButtonMigration.mixins.js.map +1 -1
- package/lib/components/Button/index.js +0 -1
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Flex/Flex.js +53 -65
- package/lib/components/Flex/Flex.js.map +1 -1
- package/lib/components/Flex/Flex.styles.js.map +1 -1
- package/lib/components/Flex/FlexItem.mixins.js +71 -72
- package/lib/components/Flex/FlexItem.mixins.js.map +1 -1
- package/lib/components/Flex/index.js +0 -1
- package/lib/components/Flex/index.js.map +1 -1
- package/lib/components/FormField/FormFieldShim.js +32 -38
- package/lib/components/FormField/FormFieldShim.js.map +1 -1
- package/lib/components/FormField/index.js +0 -1
- package/lib/components/FormField/index.js.map +1 -1
- package/lib/components/Grid/Grid.mixins.js +11 -12
- package/lib/components/Grid/Grid.mixins.js.map +1 -1
- package/lib/components/Grid/Grid.styles.js.map +1 -1
- package/lib/components/Grid/GridShim.js +23 -27
- package/lib/components/Grid/GridShim.js.map +1 -1
- package/lib/components/Grid/index.js +0 -1
- package/lib/components/Grid/index.js.map +1 -1
- package/lib/components/Input/Input.mixins.js +16 -17
- package/lib/components/Input/Input.mixins.js.map +1 -1
- package/lib/components/Input/index.js +0 -1
- package/lib/components/Input/index.js.map +1 -1
- package/lib/components/ItemLayout/ItemLayout.js +47 -51
- package/lib/components/ItemLayout/ItemLayout.js.map +1 -1
- package/lib/components/ItemLayout/ItemLayout.styles.js +0 -0
- package/lib/components/ItemLayout/ItemLayout.styles.js.map +1 -1
- package/lib/components/ItemLayout/index.js +0 -1
- package/lib/components/ItemLayout/index.js.map +1 -1
- package/lib/components/Primitive/Primitive.js +10 -14
- package/lib/components/Primitive/Primitive.js.map +1 -1
- package/lib/components/Primitive/index.js +0 -1
- package/lib/components/Primitive/index.js.map +1 -1
- package/lib/components/Segment/Segment.js +9 -14
- package/lib/components/Segment/Segment.js.map +1 -1
- package/lib/components/Segment/Segment.styles.js.map +1 -1
- package/lib/components/Segment/index.js +0 -1
- package/lib/components/Segment/index.js.map +1 -1
- package/lib/components/Slider/Slider.mixins.js +4 -5
- package/lib/components/Slider/Slider.mixins.js.map +1 -1
- package/lib/components/Slider/index.js +0 -1
- package/lib/components/Slider/index.js.map +1 -1
- package/lib/components/Spinner/SpinnerMigration.mixins.js +11 -12
- package/lib/components/Spinner/SpinnerMigration.mixins.js.map +1 -1
- package/lib/components/Spinner/index.js +0 -1
- package/lib/components/Spinner/index.js.map +1 -1
- package/lib/components/StyledText/StyledText.js +31 -45
- package/lib/components/StyledText/StyledText.js.map +1 -1
- package/lib/components/StyledText/StyledText.styles.js.map +1 -1
- package/lib/components/StyledText/index.js +0 -1
- package/lib/components/StyledText/index.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Button/ButtonMigration.mixins.js +1 -3
- package/lib-commonjs/components/Button/ButtonMigration.mixins.js.map +1 -1
- package/lib-commonjs/components/Button/index.js +0 -3
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Flex/Flex.js +1 -3
- package/lib-commonjs/components/Flex/Flex.js.map +1 -1
- package/lib-commonjs/components/Flex/Flex.styles.js +0 -2
- package/lib-commonjs/components/Flex/Flex.styles.js.map +1 -1
- package/lib-commonjs/components/Flex/FlexItem.mixins.js +1 -3
- package/lib-commonjs/components/Flex/FlexItem.mixins.js.map +1 -1
- package/lib-commonjs/components/Flex/index.js +0 -3
- package/lib-commonjs/components/Flex/index.js.map +1 -1
- package/lib-commonjs/components/FormField/FormFieldShim.js +1 -3
- package/lib-commonjs/components/FormField/FormFieldShim.js.map +1 -1
- package/lib-commonjs/components/FormField/index.js +0 -3
- package/lib-commonjs/components/FormField/index.js.map +1 -1
- package/lib-commonjs/components/Grid/Grid.mixins.js +1 -3
- package/lib-commonjs/components/Grid/Grid.mixins.js.map +1 -1
- package/lib-commonjs/components/Grid/Grid.styles.js +0 -2
- package/lib-commonjs/components/Grid/Grid.styles.js.map +1 -1
- package/lib-commonjs/components/Grid/GridShim.js +1 -3
- package/lib-commonjs/components/Grid/GridShim.js.map +1 -1
- package/lib-commonjs/components/Grid/index.js +0 -3
- package/lib-commonjs/components/Grid/index.js.map +1 -1
- package/lib-commonjs/components/Input/Input.mixins.js +1 -3
- package/lib-commonjs/components/Input/Input.mixins.js.map +1 -1
- package/lib-commonjs/components/Input/index.js +0 -3
- package/lib-commonjs/components/Input/index.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/ItemLayout.js +1 -3
- package/lib-commonjs/components/ItemLayout/ItemLayout.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/ItemLayout.styles.js +0 -2
- package/lib-commonjs/components/ItemLayout/ItemLayout.styles.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/index.js +0 -3
- package/lib-commonjs/components/ItemLayout/index.js.map +1 -1
- package/lib-commonjs/components/Primitive/Primitive.js +1 -3
- package/lib-commonjs/components/Primitive/Primitive.js.map +1 -1
- package/lib-commonjs/components/Primitive/index.js +0 -3
- package/lib-commonjs/components/Primitive/index.js.map +1 -1
- package/lib-commonjs/components/Segment/Segment.js +1 -3
- package/lib-commonjs/components/Segment/Segment.js.map +1 -1
- package/lib-commonjs/components/Segment/Segment.styles.js +0 -2
- package/lib-commonjs/components/Segment/Segment.styles.js.map +1 -1
- package/lib-commonjs/components/Segment/index.js +0 -3
- package/lib-commonjs/components/Segment/index.js.map +1 -1
- package/lib-commonjs/components/Slider/Slider.mixins.js +1 -3
- package/lib-commonjs/components/Slider/Slider.mixins.js.map +1 -1
- package/lib-commonjs/components/Slider/index.js +0 -3
- package/lib-commonjs/components/Slider/index.js.map +1 -1
- package/lib-commonjs/components/Spinner/SpinnerMigration.mixins.js +1 -3
- package/lib-commonjs/components/Spinner/SpinnerMigration.mixins.js.map +1 -1
- package/lib-commonjs/components/Spinner/index.js +0 -3
- package/lib-commonjs/components/Spinner/index.js.map +1 -1
- package/lib-commonjs/components/StyledText/StyledText.js +1 -3
- package/lib-commonjs/components/StyledText/StyledText.js.map +1 -1
- package/lib-commonjs/components/StyledText/StyledText.styles.js +0 -2
- package/lib-commonjs/components/StyledText/StyledText.styles.js.map +1 -1
- package/lib-commonjs/components/StyledText/index.js +0 -3
- package/lib-commonjs/components/StyledText/index.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["FlexItem.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst ALIGN = {\n auto: { alignSelf: 'auto' },\n start: { alignSelf: 'flex-start' },\n end: { alignSelf: 'flex-end' },\n center: { alignSelf: 'center' },\n baseline: { alignSelf: 'baseline' },\n stretch: { alignSelf: 'stretch' },\n};\n\nconst SIZE = {\n half: { flexBasis: '50%' },\n quarter: { flexBasis: '25%' },\n small: { flexBasis: '150px' },\n medium: { flexBasis: '200px' },\n large: { flexBasis: '300px' },\n};\n\nconst align = (value: 'auto' | 'start' | 'end' | 'center' | 'baseline' | 'stretch'): GriffelStyle => ALIGN[value];\n\nconst size = (value: 'half' | 'quarter' | 'small' | 'medium' | 'large'): GriffelStyle => SIZE[value];\n\nconst grow = (flexGrow: boolean | number): GriffelStyle | undefined => {\n if (flexGrow === true) {\n return { flexGrow: 1 };\n } else if (flexGrow) {\n return { flexGrow };\n } else {\n return undefined;\n }\n};\n\nconst shrink = (flexShrink: boolean | number): GriffelStyle | undefined => {\n if (typeof flexShrink === 'number') {\n return { flexShrink };\n } else if (flexShrink === false) {\n return { flexShrink: 0 };\n } else {\n return undefined;\n }\n};\n\nconst pushRow = (): GriffelStyle => ({ marginLeft: 'auto' });\nconst pushColumn = (): GriffelStyle => ({ marginTop: 'auto' });\n\nexport const flexItem = {\n align,\n size,\n grow,\n shrink,\n pushRow,\n pushColumn,\n};\n"],"names":["ALIGN","auto","alignSelf","start","end","center","baseline","stretch","SIZE","half","flexBasis","quarter","small","medium","large","align","value","size","grow","flexGrow","undefined","shrink","flexShrink","pushRow","marginLeft","pushColumn","marginTop","flexItem"],"mappings":"AAEA,MAAMA,QAAQ;IACZC,MAAM;QAAEC,WAAW;IAAO;IAC1BC,OAAO;QAAED,WAAW;IAAa;IACjCE,KAAK;QAAEF,WAAW;IAAW;IAC7BG,QAAQ;QAAEH,WAAW;IAAS;IAC9BI,UAAU;QAAEJ,WAAW;IAAW;IAClCK,SAAS;QAAEL,WAAW;IAAU;AAClC;AAEA,MAAMM,OAAO;IACXC,MAAM;QAAEC,WAAW;IAAM;IACzBC,SAAS;QAAED,WAAW;IAAM;IAC5BE,OAAO;QAAEF,WAAW;IAAQ;IAC5BG,QAAQ;QAAEH,WAAW;IAAQ;IAC7BI,OAAO;QAAEJ,WAAW;IAAQ;AAC9B;AAEA,MAAMK,QAAQ,CAACC,QAAsFhB,KAAK,CAACgB,MAAM;AAEjH,MAAMC,OAAO,CAACD,QAA2ER,IAAI,CAACQ,MAAM;AAEpG,MAAME,OAAO,CAACC,WAAyD;IACrE,IAAIA,aAAa,IAAI,EAAE;QACrB,OAAO;YAAEA,UAAU;QAAE;IACvB,OAAO,IAAIA,UAAU;QACnB,OAAO;YAAEA;QAAS;IACpB,OAAO;QACL,OAAOC;IACT,CAAC;AACH;AAEA,MAAMC,SAAS,CAACC,aAA2D;IACzE,IAAI,OAAOA,eAAe,UAAU;QAClC,OAAO;YAAEA;QAAW;IACtB,OAAO,IAAIA,eAAe,KAAK,EAAE;QAC/B,OAAO;YAAEA,YAAY;QAAE;IACzB,OAAO;QACL,OAAOF;IACT,CAAC;AACH;AAEA,MAAMG,UAAU,IAAqB,CAAA;QAAEC,YAAY;IAAO,CAAA;AAC1D,MAAMC,aAAa,IAAqB,CAAA;QAAEC,WAAW;IAAO,CAAA;AAE5D,OAAO,MAAMC,WAAW;IACtBZ;IACAE;IACAC;IACAG;IACAE;IACAE;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { Flex, flexClassName } from './Flex';\nexport type { FlexProps } from './Flex';\nexport { useFlexStyles } from './Flex.styles';\nexport { flexItem } from './FlexItem.mixins';\n"],"names":["Flex","flexClassName","useFlexStyles","flexItem"],"mappings":"AAAA,SAASA,IAAI,EAAEC,aAAa,QAAQ,SAAS;AAE7C,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,QAAQ,QAAQ,oBAAoB"}
|
|
@@ -1,46 +1,40 @@
|
|
|
1
1
|
import { renderField_unstable, useFieldContextValues_unstable, useFieldStyles_unstable, useField_unstable } from '@fluentui/react-components';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export const FormFieldShim = /*#__PURE__*/React.forwardRef((props, ref)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
fieldProps.validationMessage = errorMessage.content;
|
|
3
|
+
export const FormFieldShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
4
|
+
const { errorMessage , required , control , label } = props;
|
|
5
|
+
const fieldProps = {
|
|
6
|
+
required
|
|
7
|
+
};
|
|
8
|
+
if (errorMessage && (control === null || control === void 0 ? void 0 : control.error) === 'true') {
|
|
9
|
+
fieldProps.validationState = 'error';
|
|
10
|
+
if (typeof errorMessage === 'object') {
|
|
11
|
+
fieldProps.validationMessage = errorMessage.content;
|
|
12
|
+
}
|
|
13
|
+
if (typeof errorMessage === 'string') {
|
|
14
|
+
fieldProps.validationMessage = errorMessage;
|
|
15
|
+
}
|
|
17
16
|
}
|
|
18
|
-
if (
|
|
19
|
-
|
|
17
|
+
if (label) {
|
|
18
|
+
if (typeof label === 'object') {
|
|
19
|
+
fieldProps.label = label.content;
|
|
20
|
+
} else {
|
|
21
|
+
fieldProps.label = label;
|
|
22
|
+
}
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
const children = props.children || (control === null || control === void 0 ? void 0 : control.content);
|
|
25
|
+
if (/*#__PURE__*/ React.isValidElement(children)) {
|
|
26
|
+
const child = children;
|
|
27
|
+
// Use the Field's child render function to pass the field control props to the child
|
|
28
|
+
fieldProps.children = (fieldControlProps)=>/*#__PURE__*/ React.cloneElement(child, {
|
|
29
|
+
...fieldControlProps,
|
|
30
|
+
...child.props
|
|
31
|
+
});
|
|
25
32
|
} else {
|
|
26
|
-
|
|
33
|
+
fieldProps.children = children;
|
|
27
34
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// Use the Field's child render function to pass the field control props to the child
|
|
33
|
-
fieldProps.children = fieldControlProps => /*#__PURE__*/React.cloneElement(child, {
|
|
34
|
-
...fieldControlProps,
|
|
35
|
-
...child.props
|
|
36
|
-
});
|
|
37
|
-
} else {
|
|
38
|
-
fieldProps.children = children;
|
|
39
|
-
}
|
|
40
|
-
const state = useField_unstable(fieldProps, ref);
|
|
41
|
-
useFieldStyles_unstable(state);
|
|
42
|
-
const context = useFieldContextValues_unstable(state);
|
|
43
|
-
return renderField_unstable(state, context);
|
|
35
|
+
const state = useField_unstable(fieldProps, ref);
|
|
36
|
+
useFieldStyles_unstable(state);
|
|
37
|
+
const context = useFieldContextValues_unstable(state);
|
|
38
|
+
return renderField_unstable(state, context);
|
|
44
39
|
});
|
|
45
40
|
FormFieldShim.displayName = 'FormFieldShim';
|
|
46
|
-
//# sourceMappingURL=FormFieldShim.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["FormFieldShim.tsx"],"sourcesContent":["import {\n FieldProps,\n renderField_unstable,\n useFieldContextValues_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-components';\nimport type { ObjectShorthandValue } from '@fluentui/react-northstar';\n\nimport * as React from 'react';\n\ntype WithContent = ObjectShorthandValue<React.HTMLAttributes<HTMLDivElement>> | string;\n\n/**\n *\n */\ntype CustomInputFieldProps = React.PropsWithChildren<{\n /**\n * Message to be shown when error state is true\n */\n errorMessage?: WithContent;\n /**\n * Whether the field label should be marked as required.\n */\n required?: boolean;\n /**\n * Control to be rendered\n */\n control?: ObjectShorthandValue<{\n /**\n * Control content\n */\n content?: React.ReactNode;\n }> & {\n /**\n * Error state\n */\n error?: 'true' | 'false';\n };\n /**\n * Label to be rendered\n */\n label?: WithContent;\n}>;\n\nexport const FormFieldShim = React.forwardRef<HTMLInputElement, CustomInputFieldProps>((props, ref) => {\n const { errorMessage, required, control, label } = props;\n const fieldProps: FieldProps = { required };\n\n if (errorMessage && control?.error === 'true') {\n fieldProps.validationState = 'error';\n if (typeof errorMessage === 'object') {\n fieldProps.validationMessage = errorMessage.content;\n }\n if (typeof errorMessage === 'string') {\n fieldProps.validationMessage = errorMessage;\n }\n }\n\n if (label) {\n if (typeof label === 'object') {\n fieldProps.label = label.content;\n } else {\n fieldProps.label = label;\n }\n }\n\n const children: FieldProps['children'] = props.children || control?.content;\n\n if (React.isValidElement(children)) {\n const child: React.ReactElement = children;\n\n // Use the Field's child render function to pass the field control props to the child\n fieldProps.children = fieldControlProps => React.cloneElement(child, { ...fieldControlProps, ...child.props });\n } else {\n fieldProps.children = children;\n }\n\n const state = useField_unstable(fieldProps, ref);\n useFieldStyles_unstable(state);\n const context = useFieldContextValues_unstable(state);\n return renderField_unstable(state, context);\n});\n\nFormFieldShim.displayName = 'FormFieldShim';\n"],"names":["renderField_unstable","useFieldContextValues_unstable","useFieldStyles_unstable","useField_unstable","React","FormFieldShim","forwardRef","props","ref","errorMessage","required","control","label","fieldProps","error","validationState","validationMessage","content","children","isValidElement","child","fieldControlProps","cloneElement","state","context","displayName"],"mappings":"AAAA,SAEEA,oBAAoB,EACpBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,iBAAiB,QACZ,6BAA6B;AAGpC,YAAYC,WAAW,QAAQ;AAoC/B,OAAO,MAAMC,8BAAgBD,MAAME,UAAU,CAA0C,CAACC,OAAOC,MAAQ;IACrG,MAAM,EAAEC,aAAY,EAAEC,SAAQ,EAAEC,QAAO,EAAEC,MAAK,EAAE,GAAGL;IACnD,MAAMM,aAAyB;QAAEH;IAAS;IAE1C,IAAID,gBAAgBE,CAAAA,oBAAAA,qBAAAA,KAAAA,IAAAA,QAASG,KAAK,AAAD,MAAM,QAAQ;QAC7CD,WAAWE,eAAe,GAAG;QAC7B,IAAI,OAAON,iBAAiB,UAAU;YACpCI,WAAWG,iBAAiB,GAAGP,aAAaQ,OAAO;QACrD,CAAC;QACD,IAAI,OAAOR,iBAAiB,UAAU;YACpCI,WAAWG,iBAAiB,GAAGP;QACjC,CAAC;IACH,CAAC;IAED,IAAIG,OAAO;QACT,IAAI,OAAOA,UAAU,UAAU;YAC7BC,WAAWD,KAAK,GAAGA,MAAMK,OAAO;QAClC,OAAO;YACLJ,WAAWD,KAAK,GAAGA;QACrB,CAAC;IACH,CAAC;IAED,MAAMM,WAAmCX,MAAMW,QAAQ,IAAIP,CAAAA,oBAAAA,qBAAAA,KAAAA,IAAAA,QAASM,OAAO,AAAD;IAE1E,kBAAIb,MAAMe,cAAc,CAACD,WAAW;QAClC,MAAME,QAA4BF;QAElC,qFAAqF;QACrFL,WAAWK,QAAQ,GAAGG,CAAAA,kCAAqBjB,MAAMkB,YAAY,CAACF,OAAO;gBAAE,GAAGC,iBAAiB;gBAAE,GAAGD,MAAMb,KAAK;YAAC;IAC9G,OAAO;QACLM,WAAWK,QAAQ,GAAGA;IACxB,CAAC;IAED,MAAMK,QAAQpB,kBAAkBU,YAAYL;IAC5CN,wBAAwBqB;IACxB,MAAMC,UAAUvB,+BAA+BsB;IAC/C,OAAOvB,qBAAqBuB,OAAOC;AACrC,GAAG;AAEHnB,cAAcoB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './FormFieldShim';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
const getCSSTemplateValue = template
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const getCSSTemplateValue = (template)=>{
|
|
2
|
+
const templateAsNumber = Number(template);
|
|
3
|
+
return !isNaN(templateAsNumber) && templateAsNumber > 0 ? `repeat(${template}, 1fr)` : String(template);
|
|
4
4
|
};
|
|
5
|
-
const columns = template
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
const rows = template
|
|
9
|
-
|
|
10
|
-
});
|
|
5
|
+
const columns = (template)=>({
|
|
6
|
+
gridTemplateColumns: getCSSTemplateValue(template)
|
|
7
|
+
});
|
|
8
|
+
const rows = (template)=>({
|
|
9
|
+
gridTemplateRows: getCSSTemplateValue(template)
|
|
10
|
+
});
|
|
11
11
|
export const grid = {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
columns,
|
|
13
|
+
rows
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=Grid.mixins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Grid.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst getCSSTemplateValue = (template: string | number): string => {\n const templateAsNumber = Number(template);\n\n return !isNaN(templateAsNumber) && templateAsNumber > 0 ? `repeat(${template}, 1fr)` : String(template);\n};\n\nconst columns = (template: string): GriffelStyle => ({\n gridTemplateColumns: getCSSTemplateValue(template),\n});\n\nconst rows = (template: string): GriffelStyle => ({\n gridTemplateRows: getCSSTemplateValue(template),\n});\n\nexport const grid = {\n columns,\n rows,\n};\n"],"names":["getCSSTemplateValue","template","templateAsNumber","Number","isNaN","String","columns","gridTemplateColumns","rows","gridTemplateRows","grid"],"mappings":"AAEA,MAAMA,sBAAsB,CAACC,WAAsC;IACjE,MAAMC,mBAAmBC,OAAOF;IAEhC,OAAO,CAACG,MAAMF,qBAAqBA,mBAAmB,IAAI,CAAC,OAAO,EAAED,SAAS,MAAM,CAAC,GAAGI,OAAOJ,SAAS;AACzG;AAEA,MAAMK,UAAU,CAACL,WAAoC,CAAA;QACnDM,qBAAqBP,oBAAoBC;IAC3C,CAAA;AAEA,MAAMO,OAAO,CAACP,WAAoC,CAAA;QAChDQ,kBAAkBT,oBAAoBC;IACxC,CAAA;AAEA,OAAO,MAAMS,OAAO;IAClBJ;IACAE;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","useGridStyles","grid","mc9l5x","Brf1p80","onlyRows","Bxotwcr","rows1","wkccdc","rows2","rows3","columns1","Budl1dq","columns2","columns3","columnsDefault","d"],"sources":["
|
|
1
|
+
{"version":3,"names":["__styles","useGridStyles","grid","mc9l5x","Brf1p80","onlyRows","Bxotwcr","rows1","wkccdc","rows2","rows3","columns1","Budl1dq","columns2","columns3","columnsDefault","d"],"sources":["Grid.styles.js"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nexport const useGridStyles = makeStyles({\n grid: {\n display: 'grid',\n justifyContent: 'space-evenly'\n },\n onlyRows: {\n gridAutoFlow: 'column'\n },\n rows1: {\n gridTemplateRows: 'repeat(1, 1fr)'\n },\n rows2: {\n gridTemplateRows: 'repeat(2, 1fr)'\n },\n rows3: {\n gridTemplateRows: 'repeat(3, 1fr)'\n },\n columns1: {\n gridTemplateColumns: 'repeat(1, 1fr)'\n },\n columns2: {\n gridTemplateColumns: 'repeat(2, 1fr)'\n },\n columns3: {\n gridTemplateColumns: 'repeat(3, 1fr)'\n },\n columnsDefault: {\n gridTemplateColumns: 'repeat(5, 1fr)'\n }\n});\n"],"mappings":"AAAA,SAAAA,QAAA,QAA2B,4BAA4B;AACvD,OAAO,MAAMC,aAAa,gBAAGD,QAAA;EAAAE,IAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,QAAA;IAAAC,OAAA;EAAA;EAAAC,KAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAD,MAAA;EAAA;EAAAE,KAAA;IAAAF,MAAA;EAAA;EAAAG,QAAA;IAAAC,OAAA;EAAA;EAAAC,QAAA;IAAAD,OAAA;EAAA;EAAAE,QAAA;IAAAF,OAAA;EAAA;EAAAG,cAAA;IAAAH,OAAA;EAAA;AAAA;EAAAI,CAAA;AAAA,CA6B5B,CAAC"}
|
|
@@ -2,32 +2,28 @@ import { mergeClasses } from '@fluentui/react-components';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useGridStyles } from './Grid.styles';
|
|
4
4
|
export const gridShimClassName = 'fui-Grid';
|
|
5
|
-
export const GridShim = /*#__PURE__*/React.forwardRef((props, ref)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
className: gridClasses,
|
|
29
|
-
...rest
|
|
30
|
-
});
|
|
5
|
+
export const GridShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
6
|
+
const { rows , columns , className , ...rest } = props;
|
|
7
|
+
const classes = useGridStyles();
|
|
8
|
+
const classMaps = React.useMemo(()=>({
|
|
9
|
+
rowsClasses: {
|
|
10
|
+
1: classes.rows1,
|
|
11
|
+
2: classes.rows2,
|
|
12
|
+
3: classes.rows3
|
|
13
|
+
},
|
|
14
|
+
columnsClasses: {
|
|
15
|
+
1: classes.columns1,
|
|
16
|
+
2: classes.columns2,
|
|
17
|
+
3: classes.columns3
|
|
18
|
+
}
|
|
19
|
+
}), [
|
|
20
|
+
classes
|
|
21
|
+
]);
|
|
22
|
+
const gridClasses = mergeClasses(gridShimClassName, classes.grid, !rows && !columns && classes.columnsDefault, rows && !columns && classes.onlyRows, rows && classMaps.rowsClasses[rows], columns && classMaps.columnsClasses[columns], className);
|
|
23
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
24
|
+
ref: ref,
|
|
25
|
+
className: gridClasses,
|
|
26
|
+
...rest
|
|
27
|
+
});
|
|
31
28
|
});
|
|
32
29
|
GridShim.displayName = 'GridShim';
|
|
33
|
-
//# sourceMappingURL=GridShim.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["GridShim.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useGridStyles } from './Grid.styles';\n\nexport interface GridShimProps {\n /**\n * The columns of the grid with a space-separated list of values.\n * The values represent the track size, and the space between them represents the grid line.\n */\n columns?: 1 | 2 | 3;\n\n /**\n * The rows of the grid with a space-separated list of values.\n * The values represent the track size, and the space between them represents the grid line.\n */\n rows?: 1 | 2 | 3;\n}\n\nexport const gridShimClassName = 'fui-Grid';\n\nexport const GridShim = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & GridShimProps>(\n (props, ref) => {\n const { rows, columns, className, ...rest } = props;\n const classes = useGridStyles();\n\n const classMaps = React.useMemo(\n () => ({\n rowsClasses: {\n 1: classes.rows1,\n 2: classes.rows2,\n 3: classes.rows3,\n },\n columnsClasses: {\n 1: classes.columns1,\n 2: classes.columns2,\n 3: classes.columns3,\n },\n }),\n [classes],\n );\n\n const gridClasses = mergeClasses(\n gridShimClassName,\n classes.grid,\n !rows && !columns && classes.columnsDefault,\n rows && !columns && classes.onlyRows,\n rows && classMaps.rowsClasses[rows],\n columns && classMaps.columnsClasses[columns],\n className,\n );\n return <div ref={ref} className={gridClasses} {...rest} />;\n },\n);\n\nGridShim.displayName = 'GridShim';\n"],"names":["mergeClasses","React","useGridStyles","gridShimClassName","GridShim","forwardRef","props","ref","rows","columns","className","rest","classes","classMaps","useMemo","rowsClasses","rows1","rows2","rows3","columnsClasses","columns1","columns2","columns3","gridClasses","grid","columnsDefault","onlyRows","div","displayName"],"mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,aAAa,QAAQ,gBAAgB;AAgB9C,OAAO,MAAMC,oBAAoB,WAAW;AAE5C,OAAO,MAAMC,yBAAWH,MAAMI,UAAU,CACtC,CAACC,OAAOC,MAAQ;IACd,MAAM,EAAEC,KAAI,EAAEC,QAAO,EAAEC,UAAS,EAAE,GAAGC,MAAM,GAAGL;IAC9C,MAAMM,UAAUV;IAEhB,MAAMW,YAAYZ,MAAMa,OAAO,CAC7B,IAAO,CAAA;YACLC,aAAa;gBACX,GAAGH,QAAQI,KAAK;gBAChB,GAAGJ,QAAQK,KAAK;gBAChB,GAAGL,QAAQM,KAAK;YAClB;YACAC,gBAAgB;gBACd,GAAGP,QAAQQ,QAAQ;gBACnB,GAAGR,QAAQS,QAAQ;gBACnB,GAAGT,QAAQU,QAAQ;YACrB;QACF,CAAA,GACA;QAACV;KAAQ;IAGX,MAAMW,cAAcvB,aAClBG,mBACAS,QAAQY,IAAI,EACZ,CAAChB,QAAQ,CAACC,WAAWG,QAAQa,cAAc,EAC3CjB,QAAQ,CAACC,WAAWG,QAAQc,QAAQ,EACpClB,QAAQK,UAAUE,WAAW,CAACP,KAAK,EACnCC,WAAWI,UAAUM,cAAc,CAACV,QAAQ,EAC5CC;IAEF,qBAAO,oBAACiB;QAAIpB,KAAKA;QAAKG,WAAWa;QAAc,GAAGZ,IAAI;;AACxD,GACA;AAEFP,SAASwB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { GridShim, gridShimClassName as gridClassName } from './GridShim';\nexport type { GridShimProps } from './GridShim';\nexport { useGridStyles } from './Grid.styles';\nexport { grid } from './Grid.mixins';\n"],"names":["GridShim","gridShimClassName","gridClassName","useGridStyles","grid"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,qBAAqBC,aAAa,QAAQ,aAAa;AAE1E,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,IAAI,QAAQ,gBAAgB"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { shorthands, tokens } from '@fluentui/react-components';
|
|
2
|
-
const fluid = ()
|
|
3
|
-
|
|
4
|
-
});
|
|
5
|
-
const error = ()
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
const errorIndicator = ()
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
const successIndicator = ()
|
|
12
|
-
|
|
13
|
-
});
|
|
2
|
+
const fluid = ()=>({
|
|
3
|
+
width: '100%'
|
|
4
|
+
});
|
|
5
|
+
const error = ()=>({
|
|
6
|
+
...shorthands.border('1px', 'solid', tokens.colorPaletteRedBorderActive)
|
|
7
|
+
});
|
|
8
|
+
const errorIndicator = ()=>({
|
|
9
|
+
color: tokens.colorPaletteRedBorderActive
|
|
10
|
+
});
|
|
11
|
+
const successIndicator = ()=>({
|
|
12
|
+
color: tokens.colorPaletteGreenForeground1
|
|
13
|
+
});
|
|
14
14
|
export const input = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
error,
|
|
16
|
+
errorIndicator,
|
|
17
|
+
fluid,
|
|
18
|
+
successIndicator
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=Input.mixins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Input.mixins.ts"],"sourcesContent":["import { GriffelStyle, shorthands, tokens } from '@fluentui/react-components';\n\nconst fluid = (): GriffelStyle => ({ width: '100%' });\n\nconst error = (): GriffelStyle => ({\n ...shorthands.border('1px', 'solid', tokens.colorPaletteRedBorderActive),\n});\n\nconst errorIndicator = (): GriffelStyle => ({\n color: tokens.colorPaletteRedBorderActive,\n});\n\nconst successIndicator = (): GriffelStyle => ({\n color: tokens.colorPaletteGreenForeground1,\n});\n\nexport const input = {\n error,\n errorIndicator,\n fluid,\n successIndicator,\n};\n"],"names":["shorthands","tokens","fluid","width","error","border","colorPaletteRedBorderActive","errorIndicator","color","successIndicator","colorPaletteGreenForeground1","input"],"mappings":"AAAA,SAAuBA,UAAU,EAAEC,MAAM,QAAQ,6BAA6B;AAE9E,MAAMC,QAAQ,IAAqB,CAAA;QAAEC,OAAO;IAAO,CAAA;AAEnD,MAAMC,QAAQ,IAAqB,CAAA;QACjC,GAAGJ,WAAWK,MAAM,CAAC,OAAO,SAASJ,OAAOK,2BAA2B,CAAC;IAC1E,CAAA;AAEA,MAAMC,iBAAiB,IAAqB,CAAA;QAC1CC,OAAOP,OAAOK,2BAA2B;IAC3C,CAAA;AAEA,MAAMG,mBAAmB,IAAqB,CAAA;QAC5CD,OAAOP,OAAOS,4BAA4B;IAC5C,CAAA;AAEA,OAAO,MAAMC,QAAQ;IACnBP;IACAG;IACAL;IACAO;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { input } from './Input.mixins';\n"],"names":["input"],"mappings":"AAAA,SAASA,KAAK,QAAQ,iBAAiB"}
|
|
@@ -1,58 +1,54 @@
|
|
|
1
|
-
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { mergeClasses } from '@fluentui/react-components';
|
|
4
4
|
import { getNativeElementProps, getSlotsNext, resolveShorthand } from '@fluentui/react-utilities';
|
|
5
5
|
import { useItemLayoutStyles } from './ItemLayout.styles';
|
|
6
6
|
export const itemLayoutClassName = 'fui-ItemLayout';
|
|
7
|
-
export const ItemLayout = /*#__PURE__*/React.forwardRef((props, ref)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
slots,
|
|
53
|
-
slotProps
|
|
54
|
-
} = getSlotsNext(state);
|
|
55
|
-
return /*#__PURE__*/createElement(slots.root, slotProps.root, slots.startMedia && /*#__PURE__*/createElement(slots.startMedia, slotProps.startMedia), slots.header && /*#__PURE__*/createElement(slots.header, slotProps.header), slots.headerMedia && /*#__PURE__*/createElement(slots.headerMedia, slotProps.headerMedia), slots.contentWrapper && /*#__PURE__*/createElement(slots.contentWrapper, slotProps.contentWrapper, state.root.children), slots.contentMedia && /*#__PURE__*/createElement(slots.contentMedia, slotProps.contentMedia), slots.endMedia && /*#__PURE__*/createElement(slots.endMedia, slotProps.endMedia));
|
|
7
|
+
export const ItemLayout = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
8
|
+
const state = {
|
|
9
|
+
components: {
|
|
10
|
+
root: 'div',
|
|
11
|
+
contentWrapper: 'div',
|
|
12
|
+
contentMedia: 'div',
|
|
13
|
+
header: 'div',
|
|
14
|
+
headerMedia: 'div',
|
|
15
|
+
startMedia: 'div',
|
|
16
|
+
endMedia: 'div'
|
|
17
|
+
},
|
|
18
|
+
root: getNativeElementProps('div', {
|
|
19
|
+
...props,
|
|
20
|
+
ref
|
|
21
|
+
}),
|
|
22
|
+
contentMedia: resolveShorthand(props.contentMedia),
|
|
23
|
+
contentWrapper: resolveShorthand(props.contentWrapper, {
|
|
24
|
+
required: true
|
|
25
|
+
}),
|
|
26
|
+
header: resolveShorthand(props.header),
|
|
27
|
+
headerMedia: resolveShorthand(props.headerMedia),
|
|
28
|
+
startMedia: resolveShorthand(props.startMedia),
|
|
29
|
+
endMedia: resolveShorthand(props.endMedia)
|
|
30
|
+
};
|
|
31
|
+
const styles = useItemLayoutStyles();
|
|
32
|
+
state.root.className = mergeClasses(itemLayoutClassName, styles.root, state.root.className);
|
|
33
|
+
if (state.contentWrapper) {
|
|
34
|
+
state.contentWrapper.className = mergeClasses(styles.contentWrapper, state.contentWrapper.className);
|
|
35
|
+
}
|
|
36
|
+
if (state.contentMedia) {
|
|
37
|
+
state.contentMedia.className = mergeClasses(styles.contentMedia, state.contentMedia.className);
|
|
38
|
+
}
|
|
39
|
+
if (state.header) {
|
|
40
|
+
state.header.className = mergeClasses(styles.header, state.header.className);
|
|
41
|
+
}
|
|
42
|
+
if (state.headerMedia) {
|
|
43
|
+
state.headerMedia.className = mergeClasses(styles.headerMedia, state.headerMedia.className);
|
|
44
|
+
}
|
|
45
|
+
if (state.startMedia) {
|
|
46
|
+
state.startMedia.className = mergeClasses(styles.startMedia, state.startMedia.className);
|
|
47
|
+
}
|
|
48
|
+
if (state.endMedia) {
|
|
49
|
+
state.endMedia.className = mergeClasses(styles.endMedia, state.endMedia.className);
|
|
50
|
+
}
|
|
51
|
+
const { slots , slotProps } = getSlotsNext(state);
|
|
52
|
+
return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.startMedia && /*#__PURE__*/ createElement(slots.startMedia, slotProps.startMedia), slots.header && /*#__PURE__*/ createElement(slots.header, slotProps.header), slots.headerMedia && /*#__PURE__*/ createElement(slots.headerMedia, slotProps.headerMedia), slots.contentWrapper && /*#__PURE__*/ createElement(slots.contentWrapper, slotProps.contentWrapper, state.root.children), slots.contentMedia && /*#__PURE__*/ createElement(slots.contentMedia, slotProps.contentMedia), slots.endMedia && /*#__PURE__*/ createElement(slots.endMedia, slotProps.endMedia));
|
|
56
53
|
});
|
|
57
54
|
ItemLayout.displayName = 'ItemLayout';
|
|
58
|
-
//# sourceMappingURL=ItemLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["ItemLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport {\n ComponentProps,\n ComponentState,\n getNativeElementProps,\n getSlotsNext,\n Slot,\n resolveShorthand,\n} from '@fluentui/react-utilities';\n\nimport { useItemLayoutStyles } from './ItemLayout.styles';\n\ntype ItemLayoutSlots = {\n root: Slot<'div'>;\n\n contentMedia?: Slot<'div'>;\n contentWrapper?: Slot<'div'>;\n\n header?: Slot<'div'>;\n headerMedia?: Slot<'div'>;\n\n startMedia?: Slot<'div'>;\n endMedia?: Slot<'div'>;\n};\n\ntype ItemLayoutProps = ComponentProps<ItemLayoutSlots>;\n\ntype ItemLayoutState = ComponentState<ItemLayoutSlots>;\n\nexport const itemLayoutClassName = 'fui-ItemLayout';\n\nexport const ItemLayout = React.forwardRef<HTMLDivElement, ItemLayoutProps>((props, ref) => {\n const state: ItemLayoutState = {\n components: {\n root: 'div',\n contentWrapper: 'div',\n contentMedia: 'div',\n header: 'div',\n headerMedia: 'div',\n startMedia: 'div',\n endMedia: 'div',\n },\n root: getNativeElementProps('div', { ...props, ref }),\n contentMedia: resolveShorthand(props.contentMedia),\n contentWrapper: resolveShorthand(props.contentWrapper, {\n required: true,\n }),\n header: resolveShorthand(props.header),\n headerMedia: resolveShorthand(props.headerMedia),\n startMedia: resolveShorthand(props.startMedia),\n endMedia: resolveShorthand(props.endMedia),\n };\n const styles = useItemLayoutStyles();\n\n state.root.className = mergeClasses(itemLayoutClassName, styles.root, state.root.className);\n if (state.contentWrapper) {\n state.contentWrapper.className = mergeClasses(styles.contentWrapper, state.contentWrapper.className);\n }\n\n if (state.contentMedia) {\n state.contentMedia.className = mergeClasses(styles.contentMedia, state.contentMedia.className);\n }\n\n if (state.header) {\n state.header.className = mergeClasses(styles.header, state.header.className);\n }\n\n if (state.headerMedia) {\n state.headerMedia.className = mergeClasses(styles.headerMedia, state.headerMedia.className);\n }\n\n if (state.startMedia) {\n state.startMedia.className = mergeClasses(styles.startMedia, state.startMedia.className);\n }\n\n if (state.endMedia) {\n state.endMedia.className = mergeClasses(styles.endMedia, state.endMedia.className);\n }\n\n const { slots, slotProps } = getSlotsNext<ItemLayoutSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.startMedia && <slots.startMedia {...slotProps.startMedia} />}\n\n {slots.header && <slots.header {...slotProps.header} />}\n {slots.headerMedia && <slots.headerMedia {...slotProps.headerMedia} />}\n {slots.contentWrapper && (\n <slots.contentWrapper {...slotProps.contentWrapper}>{state.root.children}</slots.contentWrapper>\n )}\n {slots.contentMedia && <slots.contentMedia {...slotProps.contentMedia} />}\n\n {slots.endMedia && <slots.endMedia {...slotProps.endMedia} />}\n </slots.root>\n );\n});\n\nItemLayout.displayName = 'ItemLayout';\n"],"names":["createElement","React","mergeClasses","getNativeElementProps","getSlotsNext","resolveShorthand","useItemLayoutStyles","itemLayoutClassName","ItemLayout","forwardRef","props","ref","state","components","root","contentWrapper","contentMedia","header","headerMedia","startMedia","endMedia","required","styles","className","slots","slotProps","children","displayName"],"mappings":"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"}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","useItemLayoutStyles","root","mc9l5x","Budl1dq","sshi5w","contentMedia","qb2dma","Br312pm","Bw0ie65","Ijaq50","nk6f5a","Be2twd7","Bg96gwp","contentWrapper","t21cq0","header","headerMedia","startMedia","endMedia","d"],"sources":["
|
|
1
|
+
{"version":3,"names":["__styles","useItemLayoutStyles","root","mc9l5x","Budl1dq","sshi5w","contentMedia","qb2dma","Br312pm","Bw0ie65","Ijaq50","nk6f5a","Be2twd7","Bg96gwp","contentWrapper","t21cq0","header","headerMedia","startMedia","endMedia","d"],"sources":["ItemLayout.styles.js"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nexport const useItemLayoutStyles = makeStyles({\n root: {\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto auto',\n minHeight: '48px'\n },\n contentMedia: {\n alignSelf: 'start',\n gridColumnStart: 3,\n gridColumnEnd: 4,\n gridRowStart: 2,\n gridRowEnd: 3,\n fontSize: '12px',\n lineHeight: 1.3333\n },\n contentWrapper: {\n alignSelf: 'start',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n gridRowStart: 2,\n gridRowEnd: 3,\n marginRight: '8px',\n fontSize: '12px',\n lineHeight: 1.3333\n },\n header: {\n alignSelf: 'end',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n gridRowStart: 1,\n gridRowEnd: 2,\n fontSize: '14px',\n marginRight: '8px'\n },\n headerMedia: {\n alignSelf: 'end',\n gridColumnStart: 3,\n gridColumnEnd: 4,\n gridRowStart: 1,\n gridRowEnd: 2,\n fontSize: '12px',\n lineHeight: 1.3333\n },\n startMedia: {\n alignSelf: 'center',\n gridColumnStart: 1,\n gridColumnEnd: 2,\n gridRowStart: 1,\n gridRowEnd: 3,\n marginRight: '8px'\n },\n endMedia: {\n alignSelf: 'center',\n gridColumnStart: 4,\n gridColumnEnd: 5,\n gridRowStart: 1,\n gridRowEnd: 3\n }\n});\n"],"mappings":"AAAA,SAAAA,QAAA,QAA2B,4BAA4B;AACvD,OAAO,MAAMC,mBAAmB,gBAAGD,QAAA;EAAAE,IAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,YAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,cAAA;IAAAP,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAI,MAAA;IAAAH,OAAA;IAAAC,OAAA;EAAA;EAAAG,MAAA;IAAAT,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAG,MAAA;EAAA;EAAAE,WAAA;IAAAV,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAK,UAAA;IAAAX,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAI,MAAA;EAAA;EAAAI,QAAA;IAAAZ,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;AAAA;EAAAS,CAAA;AAAA,CA0DlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"sourcesContent":["export * from './ItemLayout';\nexport * from './ItemLayout.styles';\n"],"names":[],"mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,sBAAsB"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { mergeClasses } from '@fluentui/react-components';
|
|
3
3
|
export const primitiveClassName = 'fui-Primitive';
|
|
4
|
-
export const Primitive = /*#__PURE__*/React.forwardRef((props, ref)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
className: className,
|
|
15
|
-
ref: ref
|
|
16
|
-
});
|
|
4
|
+
export const Primitive = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
5
|
+
const { as: Component = 'div' , ...rest } = props;
|
|
6
|
+
const dir = typeof props.children === 'string' ? 'auto' : undefined;
|
|
7
|
+
const className = mergeClasses(primitiveClassName, props.className);
|
|
8
|
+
return /*#__PURE__*/ React.createElement(Component, {
|
|
9
|
+
dir: dir,
|
|
10
|
+
...rest,
|
|
11
|
+
className: className,
|
|
12
|
+
ref: ref
|
|
13
|
+
});
|
|
17
14
|
});
|
|
18
15
|
Primitive.displayName = 'Primitive';
|
|
19
|
-
//# sourceMappingURL=Primitive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["Primitive.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\n\n// Simplified version from https://github.com/reach/reach-ui/blob/55d28eda39afc4c667e97f5f62a48d1de034b93f/packages/utils/src/polymorphic.ts\ninterface PrimitiveComponent {\n /**\n * Infers props from JSX.IntrinsicElements based on \"as\" value. Explicitly avoids `React.ElementType` and manually\n * narrow the prop types so that events are typed when using JSX.IntrinsicElements.\n */\n <As extends keyof JSX.IntrinsicElements>(props: { as?: As } & JSX.IntrinsicElements[As]): React.ReactElement | null;\n\n displayName: string;\n}\n\nexport const primitiveClassName = 'fui-Primitive';\n\nexport const Primitive = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & { as: 'div' }>(\n (props, ref) => {\n const { as: Component = 'div', ...rest } = props;\n\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n\n const className = mergeClasses(primitiveClassName, props.className);\n\n return <Component dir={dir} {...rest} className={className} ref={ref} />;\n },\n) as PrimitiveComponent;\n\nPrimitive.displayName = 'Primitive';\n"],"names":["React","mergeClasses","primitiveClassName","Primitive","forwardRef","props","ref","as","Component","rest","dir","children","undefined","className","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,6BAA6B;AAa1D,OAAO,MAAMC,qBAAqB,gBAAgB;AAElD,OAAO,MAAMC,0BAAYH,MAAMI,UAAU,CACvC,CAACC,OAAOC,MAAQ;IACd,MAAM,EAAEC,IAAIC,YAAY,KAAK,CAAA,EAAE,GAAGC,MAAM,GAAGJ;IAE3C,MAAMK,MAAM,OAAOL,MAAMM,QAAQ,KAAK,WAAW,SAASC,SAAS;IAEnE,MAAMC,YAAYZ,aAAaC,oBAAoBG,MAAMQ,SAAS;IAElE,qBAAO,oBAACL;QAAUE,KAAKA;QAAM,GAAGD,IAAI;QAAEI,WAAWA;QAAWP,KAAKA;;AACnE,GACsB;AAExBH,UAAUW,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"sourcesContent":["export * from './Primitive';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc"}
|