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,15 @@
'use client';
import * as React from 'react';
import { useTableCellActions_unstable } from './useTableCellActions';
import { renderTableCellActions_unstable } from './renderTableCellActions';
import { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles.styles';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* TableCellActions component
*/ export const TableCellActions = /*#__PURE__*/ React.forwardRef((props, ref)=>{
const state = useTableCellActions_unstable(props, ref);
useTableCellActionsStyles_unstable(state);
useCustomStyleHook_unstable('useTableCellActionsStyles_unstable')(state);
return renderTableCellActions_unstable(state);
});
TableCellActions.displayName = 'TableCellActions';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCellActions/TableCellActions.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useTableCellActions_unstable } from './useTableCellActions';\nimport { renderTableCellActions_unstable } from './renderTableCellActions';\nimport { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles.styles';\nimport type { TableCellActionsProps } from './TableCellActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableCellActions component\n */\nexport const TableCellActions: ForwardRefComponent<TableCellActionsProps> = React.forwardRef((props, ref) => {\n const state = useTableCellActions_unstable(props, ref);\n\n useTableCellActionsStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableCellActionsStyles_unstable')(state);\n\n return renderTableCellActions_unstable(state);\n});\n\nTableCellActions.displayName = 'TableCellActions';\n"],"names":["React","useTableCellActions_unstable","renderTableCellActions_unstable","useTableCellActionsStyles_unstable","useCustomStyleHook_unstable","TableCellActions","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,qCAAqC;AAGxF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,iCAA+DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQR,6BAA6BM,OAAOC;IAElDL,mCAAmCM;IAEnCL,4BAA4B,sCAAsCK;IAElE,OAAOP,gCAAgCO;AACzC,GAAG;AAEHJ,iBAAiBK,WAAW,GAAG"}

View File

@@ -0,0 +1,3 @@
/**
* State used in rendering TableCellActions
*/ export { };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCellActions/TableCellActions.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellActionsSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * TableCellActions Props\n */\nexport type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {\n /**\n * When true, the actions are always visible regardless of row hover.\n * Can be useful keeping the actions visible when a popout surface is opened.\n */\n visible?: boolean;\n};\n\n/**\n * State used in rendering TableCellActions\n */\nexport type TableCellActionsState = ComponentState<TableCellActionsSlots> &\n Pick<Required<TableCellActionsProps>, 'visible'>;\n"],"names":[],"mappings":"AAiBA;;CAEC,GACD,WACmD"}

View File

@@ -0,0 +1,4 @@
export { TableCellActions } from './TableCellActions';
export { renderTableCellActions_unstable } from './renderTableCellActions';
export { useTableCellActions_unstable } from './useTableCellActions';
export { tableCellActionsClassNames, useTableCellActionsStyles_unstable } from './useTableCellActionsStyles.styles';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCellActions/index.ts"],"sourcesContent":["export { TableCellActions } from './TableCellActions';\nexport type { TableCellActionsProps, TableCellActionsSlots, TableCellActionsState } from './TableCellActions.types';\nexport { renderTableCellActions_unstable } from './renderTableCellActions';\nexport { useTableCellActions_unstable } from './useTableCellActions';\nexport { tableCellActionsClassNames, useTableCellActionsStyles_unstable } from './useTableCellActionsStyles.styles';\n"],"names":["TableCellActions","renderTableCellActions_unstable","useTableCellActions_unstable","tableCellActionsClassNames","useTableCellActionsStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,qBAAqB;AAEtD,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,0BAA0B,EAAEC,kCAAkC,QAAQ,qCAAqC"}

View File

@@ -0,0 +1,8 @@
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
import { assertSlots } from '@fluentui/react-utilities';
/**
* Render the final JSX of TableCellActions
*/ export const renderTableCellActions_unstable = (state)=>{
assertSlots(state);
return /*#__PURE__*/ _jsx(state.root, {});
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCellActions/renderTableCellActions.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState): JSXElement => {\n assertSlots<TableCellActionsSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableCellActions_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9CF,YAAmCE;IAEnC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}

View File

@@ -0,0 +1,28 @@
import * as React from 'react';
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
/**
* Create the state required to render TableCellActions.
*
* The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,
* before being passed to renderTableCellActions_unstable.
*
* @param props - props from this instance of TableCellActions
* @param ref - reference to root HTMLElement of TableCellActions
*/ export const useTableCellActions_unstable = (props, ref)=>{
var _props_visible;
return {
components: {
root: 'div'
},
root: slot.always(getIntrinsicElementProps('div', {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref,
...props
}), {
elementType: 'div'
}),
visible: (_props_visible = props.visible) !== null && _props_visible !== void 0 ? _props_visible : false
};
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCellActions/useTableCellActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableCellActionsProps, TableCellActionsState } from './TableCellActions.types';\n\n/**\n * Create the state required to render TableCellActions.\n *\n * The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,\n * before being passed to renderTableCellActions_unstable.\n *\n * @param props - props from this instance of TableCellActions\n * @param ref - reference to root HTMLElement of TableCellActions\n */\nexport const useTableCellActions_unstable = (\n props: TableCellActionsProps,\n ref: React.Ref<HTMLElement>,\n): TableCellActionsState => {\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n visible: props.visible ?? false,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableCellActions_unstable","props","ref","components","root","always","elementType","visible"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;QAgBWD;IAdX,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAML,KAAKM,MAAM,CACfP,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FI,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEK,aAAa;QAAM;QAEvBC,SAASN,CAAAA,iBAAAA,MAAMM,OAAO,cAAbN,4BAAAA,iBAAiB;IAC5B;AACF,EAAE"}

View File

@@ -0,0 +1,35 @@
'use client';
import { __styles, mergeClasses } from '@griffel/react';
export const tableCellActionsClassNames = {
root: 'fui-TableCellActions'
};
/**
* Styles for the root slot
*/
const useStyles = /*#__PURE__*/__styles({
root: {
De3pzq: "f1u2r49w",
qhf8xq: "f1euv43f",
j35jbq: ["f10k790i", "f1xynx9j"],
Bhzewxz: "f1i1t8d1",
Bz10aip: "f188r07x",
abs64n: "fk73vx1",
Frg6f3: ["fcgxt0o", "f1ujusj6"]
},
visible: {
abs64n: "f5p0z4x"
}
}, {
d: [".f1u2r49w{background-color:inherit;}", ".f1euv43f{position:absolute;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f1i1t8d1{top:50%;}", ".f188r07x{transform:translateY(-50%);}", ".fk73vx1{opacity:0;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f5p0z4x{opacity:1;}"]
});
/**
* Apply styling to the TableCellActions slots based on the state
*/
export const useTableCellActionsStyles_unstable = state => {
'use no memo';
const styles = useStyles();
state.root.className = mergeClasses(tableCellActionsClassNames.root, styles.root, state.visible && styles.visible, state.root.className);
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"names":["__styles","mergeClasses","tableCellActionsClassNames","root","useStyles","De3pzq","qhf8xq","j35jbq","Bhzewxz","Bz10aip","abs64n","Frg6f3","visible","d","useTableCellActionsStyles_unstable","state","styles","className"],"sources":["useTableCellActionsStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const tableCellActionsClassNames = {\n root: 'fui-TableCellActions'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n backgroundColor: 'inherit',\n position: 'absolute',\n right: '0px',\n top: '50%',\n transform: 'translateY(-50%)',\n opacity: 0,\n marginLeft: 'auto'\n },\n visible: {\n opacity: 1\n }\n});\n/**\n * Apply styling to the TableCellActions slots based on the state\n */ export const useTableCellActionsStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellActionsClassNames.root, styles.root, state.visible && styles.visible, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,YAAY,QAAQ,gBAAgB;AACzD,OAAO,MAAMC,0BAA0B,GAAG;EACtCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGJ,QAAA;EAAAG,IAAA;IAAAE,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,OAAA;IAAAF,MAAA;EAAA;AAAA;EAAAG,CAAA;AAAA,CAarB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,kCAAkC,GAAIC,KAAK,IAAG;EAC3D,aAAa;;EACb,MAAMC,MAAM,GAAGZ,SAAS,CAAC,CAAC;EAC1BW,KAAK,CAACZ,IAAI,CAACc,SAAS,GAAGhB,YAAY,CAACC,0BAA0B,CAACC,IAAI,EAAEa,MAAM,CAACb,IAAI,EAAEY,KAAK,CAACH,OAAO,IAAII,MAAM,CAACJ,OAAO,EAAEG,KAAK,CAACZ,IAAI,CAACc,SAAS,CAAC;EACxI,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}

View File

@@ -0,0 +1,29 @@
'use client';
import { makeStyles, mergeClasses } from '@griffel/react';
export const tableCellActionsClassNames = {
root: 'fui-TableCellActions'
};
/**
* Styles for the root slot
*/ const useStyles = makeStyles({
root: {
backgroundColor: 'inherit',
position: 'absolute',
right: '0px',
top: '50%',
transform: 'translateY(-50%)',
opacity: 0,
marginLeft: 'auto'
},
visible: {
opacity: 1
}
});
/**
* Apply styling to the TableCellActions slots based on the state
*/ export const useTableCellActionsStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
state.root.className = mergeClasses(tableCellActionsClassNames.root, styles.root, state.visible && styles.visible, state.root.className);
return state;
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCellActions/useTableCellActionsStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TableCellActionsSlots, TableCellActionsState } from './TableCellActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots> = {\n root: 'fui-TableCellActions',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n backgroundColor: 'inherit',\n position: 'absolute',\n right: '0px',\n top: '50%',\n transform: 'translateY(-50%)',\n opacity: 0,\n marginLeft: 'auto',\n },\n\n visible: {\n opacity: 1,\n },\n});\n\n/**\n * Apply styling to the TableCellActions slots based on the state\n */\nexport const useTableCellActionsStyles_unstable = (state: TableCellActionsState): TableCellActionsState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n tableCellActionsClassNames.root,\n styles.root,\n state.visible && styles.visible,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tableCellActionsClassNames","root","useStyles","backgroundColor","position","right","top","transform","opacity","marginLeft","visible","useTableCellActionsStyles_unstable","state","styles","className"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAI1D,OAAO,MAAMC,6BAAoE;IAC/EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYJ,WAAW;IAC3BG,MAAM;QACJE,iBAAiB;QACjBC,UAAU;QACVC,OAAO;QACPC,KAAK;QACLC,WAAW;QACXC,SAAS;QACTC,YAAY;IACd;IAEAC,SAAS;QACPF,SAAS;IACX;AACF;AAEA;;CAEC,GACD,OAAO,MAAMG,qCAAqC,CAACC;IACjD;IAEA,MAAMC,SAASX;IACfU,MAAMX,IAAI,CAACa,SAAS,GAAGf,aACrBC,2BAA2BC,IAAI,EAC/BY,OAAOZ,IAAI,EACXW,MAAMF,OAAO,IAAIG,OAAOH,OAAO,EAC/BE,MAAMX,IAAI,CAACa,SAAS;IAGtB,OAAOF;AACT,EAAE"}