Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createElementFromSlotComponent", {
enumerable: true,
get: function() {
return createElementFromSlotComponent;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _getMetadataFromSlotComponent = require("../utils/getMetadataFromSlotComponent");
function createElementFromSlotComponent(type, overrideChildren) {
const { elementType, renderFunction, props } = (0, _getMetadataFromSlotComponent.getMetadataFromSlotComponent)(type);
if (renderFunction) {
if (overrideChildren.length > 0) {
props.children = _react.createElement(_react.Fragment, {}, ...overrideChildren);
}
return _react.createElement(_react.Fragment, {}, renderFunction(elementType, props));
}
return _react.createElement(elementType, props, ...overrideChildren);
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/jsx/createElementFromSlotComponent.ts"],"sourcesContent":["import * as React from 'react';\nimport type { SlotComponentType, UnknownSlotProps } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\n\n/**\n * @internal\n * creates a ReactElement from a slot declaration\n */\nexport function createElementFromSlotComponent<Props extends UnknownSlotProps>(\n type: SlotComponentType<Props>,\n overrideChildren: React.ReactNode[],\n): React.ReactElement<Props> {\n const { elementType, renderFunction, props } = getMetadataFromSlotComponent(type);\n\n if (renderFunction) {\n if (overrideChildren.length > 0) {\n props.children = React.createElement(React.Fragment, {}, ...overrideChildren);\n }\n\n return React.createElement(\n React.Fragment,\n {},\n renderFunction(elementType as React.ElementType<Props>, props),\n ) as React.ReactElement<Props>;\n }\n\n return React.createElement(elementType, props, ...overrideChildren);\n}\n"],"names":["createElementFromSlotComponent","type","overrideChildren","elementType","renderFunction","props","getMetadataFromSlotComponent","length","children","React","createElement","Fragment"],"mappings":";;;;+BAQgBA;;;eAAAA;;;;iEARO;8CAEsB;AAMtC,SAASA,+BACdC,IAA8B,EAC9BC,gBAAmC;IAEnC,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,KAAK,EAAE,GAAGC,IAAAA,0DAA4B,EAACL;IAE5E,IAAIG,gBAAgB;QAClB,IAAIF,iBAAiBK,MAAM,GAAG,GAAG;YAC/BF,MAAMG,QAAQ,GAAGC,OAAMC,aAAa,CAACD,OAAME,QAAQ,EAAE,CAAC,MAAMT;QAC9D;QAEA,OAAOO,OAAMC,aAAa,CACxBD,OAAME,QAAQ,EACd,CAAC,GACDP,eAAeD,aAAyCE;IAE5D;IAEA,OAAOI,OAAMC,aAAa,CAACP,aAAaE,UAAUH;AACpD"}

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createJSX", {
enumerable: true,
get: function() {
return createJSX;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _reactutilities = require("@fluentui/react-utilities");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _createCompatSlotComponent = require("../utils/createCompatSlotComponent");
const _warnIfElementTypeIsInvalid = require("../utils/warnIfElementTypeIsInvalid");
function createJSX(runtime, slotRuntime) {
return function jsx(type, overrideProps, key, source, self) {
// TODO:
// this is for backwards compatibility with getSlotsNext
// it should be removed once getSlotsNext is obsolete
if ((0, _reactutilities.isSlot)(overrideProps)) {
return slotRuntime((0, _createCompatSlotComponent.createCompatSlotComponent)(type, overrideProps), null, key, source, self);
}
if ((0, _reactutilities.isSlot)(type)) {
return slotRuntime(type, overrideProps, key, source, self);
}
(0, _warnIfElementTypeIsInvalid.warnIfElementTypeIsInvalid)(type);
return runtime(type, overrideProps, key, source, self);
};
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/jsx/createJSX.ts"],"sourcesContent":["import { isSlot } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { createCompatSlotComponent } from '../utils/createCompatSlotComponent';\nimport { JSXRuntime, JSXSlotRuntime } from '../utils/types';\nimport { warnIfElementTypeIsInvalid } from '../utils/warnIfElementTypeIsInvalid';\n\nexport function createJSX(runtime: JSXRuntime, slotRuntime: JSXSlotRuntime) {\n return function jsx<Props extends {}>(\n type: React.ElementType<Props>,\n overrideProps: Props | null,\n key?: React.Key,\n source?: unknown,\n self?: unknown,\n ): React.ReactElement<Props> {\n // TODO:\n // this is for backwards compatibility with getSlotsNext\n // it should be removed once getSlotsNext is obsolete\n if (isSlot<Props>(overrideProps)) {\n return slotRuntime<Props>(createCompatSlotComponent(type, overrideProps), null, key, source, self);\n }\n if (isSlot<Props>(type)) {\n return slotRuntime(type, overrideProps, key, source, self);\n }\n warnIfElementTypeIsInvalid(type);\n return runtime(type, overrideProps, key, source, self);\n };\n}\n"],"names":["createJSX","runtime","slotRuntime","jsx","type","overrideProps","key","source","self","isSlot","createCompatSlotComponent","warnIfElementTypeIsInvalid"],"mappings":";;;;+BAMgBA;;;eAAAA;;;;gCANO;iEACA;2CACmB;4CAEC;AAEpC,SAASA,UAAUC,OAAmB,EAAEC,WAA2B;IACxE,OAAO,SAASC,IACdC,IAA8B,EAC9BC,aAA2B,EAC3BC,GAAe,EACfC,MAAgB,EAChBC,IAAc;QAEd,QAAQ;QACR,wDAAwD;QACxD,qDAAqD;QACrD,IAAIC,IAAAA,sBAAM,EAAQJ,gBAAgB;YAChC,OAAOH,YAAmBQ,IAAAA,oDAAyB,EAACN,MAAMC,gBAAgB,MAAMC,KAAKC,QAAQC;QAC/F;QACA,IAAIC,IAAAA,sBAAM,EAAQL,OAAO;YACvB,OAAOF,YAAYE,MAAMC,eAAeC,KAAKC,QAAQC;QACvD;QACAG,IAAAA,sDAA0B,EAACP;QAC3B,OAAOH,QAAQG,MAAMC,eAAeC,KAAKC,QAAQC;IACnD;AACF"}

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "jsxDEVSlot", {
enumerable: true,
get: function() {
return jsxDEVSlot;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _getMetadataFromSlotComponent = require("../utils/getMetadataFromSlotComponent");
const _DevRuntime = require("../utils/DevRuntime");
const jsxDEVSlot = (type, overrideProps, key, source, self)=>{
const { elementType, renderFunction, props: slotProps } = (0, _getMetadataFromSlotComponent.getMetadataFromSlotComponent)(type);
const props = {
...slotProps,
...overrideProps
};
if (renderFunction) {
// if runtime is static
if (source === true) {
return _DevRuntime.DevRuntime.jsxDEV(_react.Fragment, {
children: renderFunction(elementType, {
...props,
/**
* If the runtime is static then children is an array and this array won't be keyed.
* Then we should wrap children by a static fragment
* as there's no way to know if renderFunction will render statically or dynamically
*/ children: _DevRuntime.DevRuntime.jsxDEV(_react.Fragment, {
children: props.children
}, undefined, true, self)
})
}, key, false, self);
}
// if runtime is dynamic (source = false) things are simpler
return _DevRuntime.DevRuntime.jsxDEV(_react.Fragment, {
children: renderFunction(elementType, props)
}, key, source, self);
}
return _DevRuntime.DevRuntime.jsxDEV(elementType, props, key, source, self);
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/jsx/jsxDEVSlot.ts"],"sourcesContent":["import * as React from 'react';\nimport { SlotComponentType, UnknownSlotProps } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\nimport { DevRuntime } from '../utils/DevRuntime';\n\nexport const jsxDEVSlot = <Props extends UnknownSlotProps>(\n type: SlotComponentType<Props>,\n overrideProps: Props | null,\n key?: React.Key,\n source?: unknown,\n self?: unknown,\n): React.ReactElement<Props> => {\n const { elementType, renderFunction, props: slotProps } = getMetadataFromSlotComponent(type);\n\n const props: Props = { ...slotProps, ...overrideProps };\n\n if (renderFunction) {\n // if runtime is static\n if (source === true) {\n return DevRuntime.jsxDEV(\n React.Fragment,\n {\n children: renderFunction(elementType, {\n ...props,\n /**\n * If the runtime is static then children is an array and this array won't be keyed.\n * Then we should wrap children by a static fragment\n * as there's no way to know if renderFunction will render statically or dynamically\n */\n children: DevRuntime.jsxDEV(React.Fragment, { children: props.children }, undefined, true, self),\n }),\n },\n key,\n false, // by marking source as false we're declaring that this render is dynamic\n self,\n ) as React.ReactElement<Props>;\n }\n // if runtime is dynamic (source = false) things are simpler\n return DevRuntime.jsxDEV(\n React.Fragment,\n { children: renderFunction(elementType, props) },\n key,\n source,\n self,\n ) as React.ReactElement<Props>;\n }\n return DevRuntime.jsxDEV(elementType, props, key, source, self);\n};\n"],"names":["jsxDEVSlot","type","overrideProps","key","source","self","elementType","renderFunction","props","slotProps","getMetadataFromSlotComponent","DevRuntime","jsxDEV","React","Fragment","children","undefined"],"mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;8CAEsB;4BAClB;AAEpB,MAAMA,aAAa,CACxBC,MACAC,eACAC,KACAC,QACAC;IAEA,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,OAAOC,SAAS,EAAE,GAAGC,IAAAA,0DAA4B,EAACT;IAEvF,MAAMO,QAAe;QAAE,GAAGC,SAAS;QAAE,GAAGP,aAAa;IAAC;IAEtD,IAAIK,gBAAgB;QAClB,uBAAuB;QACvB,IAAIH,WAAW,MAAM;YACnB,OAAOO,sBAAU,CAACC,MAAM,CACtBC,OAAMC,QAAQ,EACd;gBACEC,UAAUR,eAAeD,aAAa;oBACpC,GAAGE,KAAK;oBACR;;;;aAIC,GACDO,UAAUJ,sBAAU,CAACC,MAAM,CAACC,OAAMC,QAAQ,EAAE;wBAAEC,UAAUP,MAAMO,QAAQ;oBAAC,GAAGC,WAAW,MAAMX;gBAC7F;YACF,GACAF,KACA,OACAE;QAEJ;QACA,4DAA4D;QAC5D,OAAOM,sBAAU,CAACC,MAAM,CACtBC,OAAMC,QAAQ,EACd;YAAEC,UAAUR,eAAeD,aAAaE;QAAO,GAC/CL,KACAC,QACAC;IAEJ;IACA,OAAOM,sBAAU,CAACC,MAAM,CAACN,aAAaE,OAAOL,KAAKC,QAAQC;AAC5D"}

View File

@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "jsxSlot", {
enumerable: true,
get: function() {
return jsxSlot;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _getMetadataFromSlotComponent = require("../utils/getMetadataFromSlotComponent");
const _Runtime = require("../utils/Runtime");
const jsxSlot = (type, overrideProps, key)=>{
const { elementType, renderFunction, props: slotProps } = (0, _getMetadataFromSlotComponent.getMetadataFromSlotComponent)(type);
const props = {
...slotProps,
...overrideProps
};
if (renderFunction) {
return _Runtime.Runtime.jsx(_react.Fragment, {
children: renderFunction(elementType, props)
}, key);
}
return _Runtime.Runtime.jsx(elementType, props, key);
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/jsx/jsxSlot.ts"],"sourcesContent":["import * as React from 'react';\nimport { SlotComponentType, UnknownSlotProps } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\nimport { Runtime } from '../utils/Runtime';\n\nexport const jsxSlot = <Props extends UnknownSlotProps>(\n type: SlotComponentType<Props>,\n overrideProps: Props | null,\n key?: React.Key,\n): React.ReactElement<Props> => {\n const { elementType, renderFunction, props: slotProps } = getMetadataFromSlotComponent(type);\n\n const props: Props = { ...slotProps, ...overrideProps };\n\n if (renderFunction) {\n return Runtime.jsx(\n React.Fragment,\n { children: renderFunction(elementType, props) },\n key,\n ) as React.ReactElement<Props>;\n }\n return Runtime.jsx(elementType, props, key);\n};\n"],"names":["jsxSlot","type","overrideProps","key","elementType","renderFunction","props","slotProps","getMetadataFromSlotComponent","Runtime","jsx","React","Fragment","children"],"mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;8CAEsB;yBACrB;AAEjB,MAAMA,UAAU,CACrBC,MACAC,eACAC;IAEA,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,OAAOC,SAAS,EAAE,GAAGC,IAAAA,0DAA4B,EAACP;IAEvF,MAAMK,QAAe;QAAE,GAAGC,SAAS;QAAE,GAAGL,aAAa;IAAC;IAEtD,IAAIG,gBAAgB;QAClB,OAAOI,gBAAO,CAACC,GAAG,CAChBC,OAAMC,QAAQ,EACd;YAAEC,UAAUR,eAAeD,aAAaE;QAAO,GAC/CH;IAEJ;IACA,OAAOM,gBAAO,CAACC,GAAG,CAACN,aAAaE,OAAOH;AACzC"}

View File

@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "jsxsSlot", {
enumerable: true,
get: function() {
return jsxsSlot;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _getMetadataFromSlotComponent = require("../utils/getMetadataFromSlotComponent");
const _Runtime = require("../utils/Runtime");
const jsxsSlot = (type, overrideProps, key)=>{
const { elementType, renderFunction, props: slotProps } = (0, _getMetadataFromSlotComponent.getMetadataFromSlotComponent)(type);
const props = {
...slotProps,
...overrideProps
};
if (renderFunction) {
/**
* In static runtime then children is an array and this array won't be keyed.
* We should wrap children by a static fragment
* as there's no way to know if renderFunction will render statically or dynamically
*/ return _Runtime.Runtime.jsx(_react.Fragment, {
children: renderFunction(elementType, {
...props,
children: _Runtime.Runtime.jsxs(_react.Fragment, {
children: props.children
}, undefined)
})
}, key);
}
return _Runtime.Runtime.jsxs(elementType, props, key);
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/jsx/jsxsSlot.ts"],"sourcesContent":["import * as React from 'react';\nimport { SlotComponentType, UnknownSlotProps } from '@fluentui/react-utilities';\nimport { getMetadataFromSlotComponent } from '../utils/getMetadataFromSlotComponent';\nimport { Runtime } from '../utils/Runtime';\n\nexport const jsxsSlot = <Props extends UnknownSlotProps>(\n type: SlotComponentType<Props>,\n overrideProps: Props | null,\n key?: React.Key,\n): React.ReactElement<Props> => {\n const { elementType, renderFunction, props: slotProps } = getMetadataFromSlotComponent(type);\n\n const props: Props = { ...slotProps, ...overrideProps };\n\n if (renderFunction) {\n /**\n * In static runtime then children is an array and this array won't be keyed.\n * We should wrap children by a static fragment\n * as there's no way to know if renderFunction will render statically or dynamically\n */\n return Runtime.jsx(\n React.Fragment,\n {\n children: renderFunction(elementType, {\n ...props,\n children: Runtime.jsxs(React.Fragment, { children: props.children }, undefined),\n }),\n },\n key,\n ) as React.ReactElement<Props>;\n }\n return Runtime.jsxs(elementType, props, key);\n};\n"],"names":["jsxsSlot","type","overrideProps","key","elementType","renderFunction","props","slotProps","getMetadataFromSlotComponent","Runtime","jsx","React","Fragment","children","jsxs","undefined"],"mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;8CAEsB;yBACrB;AAEjB,MAAMA,WAAW,CACtBC,MACAC,eACAC;IAEA,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,OAAOC,SAAS,EAAE,GAAGC,IAAAA,0DAA4B,EAACP;IAEvF,MAAMK,QAAe;QAAE,GAAGC,SAAS;QAAE,GAAGL,aAAa;IAAC;IAEtD,IAAIG,gBAAgB;QAClB;;;;KAIC,GACD,OAAOI,gBAAO,CAACC,GAAG,CAChBC,OAAMC,QAAQ,EACd;YACEC,UAAUR,eAAeD,aAAa;gBACpC,GAAGE,KAAK;gBACRO,UAAUJ,gBAAO,CAACK,IAAI,CAACH,OAAMC,QAAQ,EAAE;oBAAEC,UAAUP,MAAMO,QAAQ;gBAAC,GAAGE;YACvE;QACF,GACAZ;IAEJ;IACA,OAAOM,gBAAO,CAACK,IAAI,CAACV,aAAaE,OAAOH;AAC1C"}