Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "TableCell", {
enumerable: true,
get: function() {
return TableCell;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useTableCell = require("./useTableCell");
const _renderTableCell = require("./renderTableCell");
const _useTableCellStylesstyles = require("./useTableCellStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const TableCell = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useTableCell.useTableCell_unstable)(props, ref);
(0, _useTableCellStylesstyles.useTableCellStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useTableCellStyles_unstable')(state);
return (0, _renderTableCell.renderTableCell_unstable)(state);
});
TableCell.displayName = 'TableCell';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCell/TableCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles.styles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableCell component\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableCellStyles_unstable')(state);\n\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"names":["TableCell","React","forwardRef","props","ref","state","useTableCell_unstable","useTableCellStyles_unstable","useCustomStyleHook_unstable","renderTableCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;8BACe;iCACG;0CACG;qCAGA;AAKrC,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAE5BG,IAAAA,gDAAAA,EAA4B,+BAA+BH;IAE3D,OAAOI,IAAAA,yCAAAA,EAAyBJ;AAClC;AAEAL,UAAUU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering TableCell
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCell/TableCell.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
TableCell: function() {
return _TableCell.TableCell;
},
renderTableCell_unstable: function() {
return _renderTableCell.renderTableCell_unstable;
},
tableCellClassName: function() {
return _useTableCellStylesstyles.tableCellClassName;
},
tableCellClassNames: function() {
return _useTableCellStylesstyles.tableCellClassNames;
},
useTableCellStyles_unstable: function() {
return _useTableCellStylesstyles.useTableCellStyles_unstable;
},
useTableCell_unstable: function() {
return _useTableCell.useTableCell_unstable;
}
});
const _TableCell = require("./TableCell");
const _renderTableCell = require("./renderTableCell");
const _useTableCell = require("./useTableCell");
const _useTableCellStylesstyles = require("./useTableCellStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCell/index.ts"],"sourcesContent":["export { TableCell } from './TableCell';\nexport type { TableCellProps, TableCellSlots, TableCellState } from './TableCell.types';\nexport { renderTableCell_unstable } from './renderTableCell';\nexport { useTableCell_unstable } from './useTableCell';\nexport { tableCellClassName, tableCellClassNames, useTableCellStyles_unstable } from './useTableCellStyles.styles';\n"],"names":["TableCell","renderTableCell_unstable","tableCellClassName","tableCellClassNames","useTableCellStyles_unstable","useTableCell_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,SAAS;eAATA,oBAAS;;IAETC,wBAAwB;eAAxBA,yCAAwB;;IAExBC,kBAAkB;eAAlBA,4CAAkB;;IAAEC,mBAAmB;eAAnBA,6CAAmB;;IAAEC,2BAA2B;eAA3BA,qDAA2B;;IADpEC,qBAAqB;eAArBA,mCAAqB;;;2BAHJ;iCAEe;8BACH;0CAC+C"}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderTableCell_unstable", {
enumerable: true,
get: function() {
return renderTableCell_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderTableCell_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCell/renderTableCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableCellState, TableCellSlots } from './TableCell.types';\n\n/**\n * Render the final JSX of TableCell\n */\nexport const renderTableCell_unstable = (state: TableCellState) => {\n assertSlots<TableCellSlots>(state);\n\n return <state.root />;\n};\n"],"names":["renderTableCell_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;gCAC4B;AAMrB,MAAMA,2BAA2B,CAACC;IACvCC,IAAAA,2BAAAA,EAA4BD;IAE5B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useTableCell_unstable", {
enumerable: true,
get: function() {
return useTableCell_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const _tableContext = require("../../contexts/tableContext");
const useTableCell_unstable = (props, ref)=>{
const { noNativeElements, size } = (0, _tableContext.useTableContext)();
var _props_as;
const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'td';
return {
components: {
root: rootComponent
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(rootComponent, {
// 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,
role: rootComponent === 'div' ? 'cell' : undefined,
...props
}), {
elementType: rootComponent
}),
noNativeElements,
size
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TableCell/useTableCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableCellProps, TableCellState } from './TableCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableCell.\n *\n * The returned state can be modified with hooks such as useTableCellStyles_unstable,\n * before being passed to renderTableCell_unstable.\n *\n * @param props - props from this instance of TableCell\n * @param ref - reference to root HTMLElement of TableCell\n */\nexport const useTableCell_unstable = (props: TableCellProps, ref: React.Ref<HTMLElement>): TableCellState => {\n const { noNativeElements, size } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\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 role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n size,\n };\n};\n"],"names":["useTableCell_unstable","props","ref","noNativeElements","size","useTableContext","rootComponent","as","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;gCACwB;8BAEf;AAWzB,MAAMA,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGC,IAAAA,6BAAAA;QAEbJ;IAAtB,MAAMK,gBAAgBL,CAAAA,CAAAA,YAAAA,MAAMM,EAAE,AAAFA,MAAE,QAARN,cAAAA,KAAAA,IAAAA,YAAYE,gBAAAA,IAAmB,QAAQ;IAE7D,OAAO;QACLK,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBN,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKA;YACLW,MAAMP,kBAAkB,QAAQ,SAASQ;YACzC,GAAGb,KAAK;QACV,IACA;YAAEc,aAAaT;QAAc;QAE/BH;QACAC;IACF;AACF"}
@@ -0,0 +1,137 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
tableCellClassName: function() {
return tableCellClassName;
},
tableCellClassNames: function() {
return tableCellClassNames;
},
useTableCellStyles_unstable: function() {
return useTableCellStyles_unstable;
}
});
const _react = require("@griffel/react");
const tableCellClassName = 'fui-TableCell';
const tableCellClassNames = {
root: tableCellClassName
};
const useTableLayoutStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "f15pt5es",
ha4doy: "fmrv4ls"
},
medium: {
Bqenvij: "f1ft4266"
},
small: {
Bqenvij: "fbsu25e"
},
"extra-small": {
Bqenvij: "frvgh55"
}
}, {
d: [
".f15pt5es{display:table-cell;}",
".fmrv4ls{vertical-align:middle;}",
".f1ft4266{height:44px;}",
".fbsu25e{height:34px;}",
".frvgh55{height:24px;}"
]
});
const useFlexLayoutStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "f22iagw",
Bf4jedk: "f10tiqix",
Bt984gj: "f122n59",
xawz: 0,
Bh6795r: 0,
Bnnss6s: 0,
fkmc3a: "f1izfyrr"
},
medium: {
sshi5w: "f5pgtk9"
},
small: {
sshi5w: "fcep9tg"
},
"extra-small": {
sshi5w: "f1pha7fy"
}
}, {
d: [
".f22iagw{display:flex;}",
".f10tiqix{min-width:0px;}",
".f122n59{align-items:center;}",
[
".f1izfyrr{flex:1 1 0px;}",
{
p: -1
}
],
".f5pgtk9{min-height:44px;}",
".fcep9tg{min-height:34px;}",
".f1pha7fy{min-height:24px;}"
]
});
/**
* Styles for the root slot
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
qhf8xq: "f10pi13n",
Byoj8tv: 0,
uwmqm3: 0,
z189sj: 0,
z8tnut: 0,
B0ocmuz: "f3gpkru",
Bfpq7zp: 0,
g9k6zt: 0,
Bn4voq9: 0,
giviqs: "f1dxfoyt",
Bw81rd7: 0,
kdpuga: 0,
dm238s: 0,
B6xbmo0: 0,
B3whbx2: "f2krc9w"
}
}, {
d: [
".f10pi13n{position:relative;}",
[
".f3gpkru{padding:0px var(--spacingHorizontalS);}",
{
p: -1
}
],
[
".f1dxfoyt[data-fui-focus-visible]{outline:2px solid var(--colorStrokeFocus2);}",
{
p: -1
}
],
[
".f2krc9w[data-fui-focus-visible]{border-radius:var(--borderRadiusMedium);}",
{
p: -1
}
]
]
});
const useTableCellStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const layoutStyles = {
table: useTableLayoutStyles(),
flex: useFlexLayoutStyles()
};
state.root.className = (0, _react.mergeClasses)(tableCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size], state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useTableCellStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const tableCellClassName = 'fui-TableCell';\nexport const tableCellClassNames = {\n root: tableCellClassName\n};\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle'\n },\n medium: {\n height: '44px'\n },\n small: {\n height: '34px'\n },\n 'extra-small': {\n height: '24px'\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n minWidth: '0px',\n alignItems: 'center',\n flex: '1 1 0px'\n },\n medium: {\n minHeight: '44px'\n },\n small: {\n minHeight: '34px'\n },\n 'extra-small': {\n minHeight: '24px'\n }\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n position: 'relative',\n padding: `0px ${tokens.spacingHorizontalS}`,\n ...createCustomFocusIndicatorStyle({\n outline: `2px solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium\n }, {\n selector: 'focus'\n })\n }\n});\n/**\n * Apply styling to the TableCell slots based on the state\n */ export const useTableCellStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size], state.root.className);\n return state;\n};\n"],"names":["tableCellClassName","tableCellClassNames","useTableCellStyles_unstable","root","useTableLayoutStyles","__styles","mc9l5x","ha4doy","medium","Bqenvij","small","d","useFlexLayoutStyles","Bf4jedk","Bt984gj","xawz","Bh6795r","Bnnss6s","fkmc3a","sshi5w","p","useStyles","qhf8xq","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","state","styles","layoutStyles","table","flex","className","mergeClasses","noNativeElements","size"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,kBAAkB;eAAlBA;;IACAC,mBAAmB;eAAnBA;;IAmDIC,2BAA2B;eAA3BA;;;uBAvDwB;AAGlC,MAAMF,qBAAqB;AAC3B,MAAMC,sBAAsB;IAC/BE,MAAMH;AACV;AACA,MAAMI,uBAAoB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAC,QAAA;IAAA;IAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAC,OAAA;QAAAD,SAAA;IAAA;IAAA,eAAA;QAAAA,SAAA;IAAA;AAAA,GAAA;IAAAE,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAe7B,MAAMC,sBAAmB,WAAA,GAAGP,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAA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