146 lines
4.0 KiB
JavaScript
146 lines
4.0 KiB
JavaScript
'use client';
|
|
"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, {
|
|
CELL_WIDTH: function() {
|
|
return CELL_WIDTH;
|
|
},
|
|
tableSelectionCellClassNames: function() {
|
|
return tableSelectionCellClassNames;
|
|
},
|
|
useTableSelectionCellStyles_unstable: function() {
|
|
return useTableSelectionCellStyles_unstable;
|
|
}
|
|
});
|
|
const _react = require("@griffel/react");
|
|
const CELL_WIDTH = 44;
|
|
const tableSelectionCellClassNames = {
|
|
root: 'fui-TableSelectionCell',
|
|
checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',
|
|
radioIndicator: 'fui-TableSelectionCell__radioIndicator'
|
|
};
|
|
const useTableLayoutStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
root: {
|
|
mc9l5x: "f15pt5es",
|
|
a9b677: "fksc0bp"
|
|
}
|
|
}, {
|
|
d: [
|
|
".f15pt5es{display:table-cell;}",
|
|
".fksc0bp{width:44px;}"
|
|
]
|
|
});
|
|
const useFlexLayoutStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
root: {
|
|
mc9l5x: "f22iagw",
|
|
xawz: 0,
|
|
Bh6795r: 0,
|
|
Bnnss6s: 0,
|
|
fkmc3a: "f1izfyrr",
|
|
Bf4jedk: "fvrlu0f",
|
|
B2u0y6b: "f1c71y05",
|
|
Brf1p80: "f4d9j23"
|
|
}
|
|
}, {
|
|
d: [
|
|
".f22iagw{display:flex;}",
|
|
[
|
|
".f1izfyrr{flex:1 1 0px;}",
|
|
{
|
|
p: -1
|
|
}
|
|
],
|
|
".fvrlu0f{min-width:44px;}",
|
|
".f1c71y05{max-width:44px;}",
|
|
".f4d9j23{justify-content:center;}"
|
|
]
|
|
});
|
|
/**
|
|
* Styles for the root slot
|
|
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
root: {
|
|
fsow6f: "f17mccla",
|
|
Huce71: "fz5stix",
|
|
Byoj8tv: 0,
|
|
uwmqm3: 0,
|
|
z189sj: 0,
|
|
z8tnut: 0,
|
|
B0ocmuz: "f1mk8lai",
|
|
Bfpq7zp: 0,
|
|
g9k6zt: 0,
|
|
Bn4voq9: 0,
|
|
giviqs: "f1dxfoyt",
|
|
Bw81rd7: 0,
|
|
kdpuga: 0,
|
|
dm238s: 0,
|
|
B6xbmo0: 0,
|
|
B3whbx2: "f2krc9w"
|
|
},
|
|
radioIndicator: {
|
|
mc9l5x: "f22iagw",
|
|
Bh6795r: "fqerorx",
|
|
Bt984gj: "f122n59",
|
|
Brf1p80: "f4d9j23"
|
|
},
|
|
subtle: {
|
|
abs64n: "fk73vx1",
|
|
B8a84jv: "f1y7ij6c"
|
|
},
|
|
hidden: {
|
|
abs64n: "fk73vx1"
|
|
}
|
|
}, {
|
|
d: [
|
|
".f17mccla{text-align:center;}",
|
|
".fz5stix{white-space:nowrap;}",
|
|
[
|
|
".f1mk8lai{padding:0;}",
|
|
{
|
|
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
|
|
}
|
|
],
|
|
".f22iagw{display:flex;}",
|
|
".fqerorx{flex-grow:1;}",
|
|
".f122n59{align-items:center;}",
|
|
".f4d9j23{justify-content:center;}",
|
|
".fk73vx1{opacity:0;}",
|
|
".f1y7ij6c[data-fui-focus-within]:focus-within{opacity:1;}"
|
|
]
|
|
});
|
|
const useTableSelectionCellStyles_unstable = (state)=>{
|
|
'use no memo';
|
|
const styles = useStyles();
|
|
const layoutStyles = {
|
|
table: useTableLayoutStyles(),
|
|
flex: useFlexLayoutStyles()
|
|
};
|
|
state.root.className = (0, _react.mergeClasses)(tableSelectionCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.subtle && state.checked === false && styles.subtle, state.hidden && styles.hidden, state.root.className);
|
|
if (state.checkboxIndicator) {
|
|
state.checkboxIndicator.className = (0, _react.mergeClasses)(tableSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);
|
|
}
|
|
if (state.radioIndicator) {
|
|
state.radioIndicator.className = (0, _react.mergeClasses)(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.radioIndicator.className);
|
|
}
|
|
return state;
|
|
};
|