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, "SwatchPickerRow", {
enumerable: true,
get: function() {
return SwatchPickerRow;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useSwatchPickerRow = require("./useSwatchPickerRow");
const _renderSwatchPickerRow = require("./renderSwatchPickerRow");
const _useSwatchPickerRowStylesstyles = require("./useSwatchPickerRowStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const SwatchPickerRow = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useSwatchPickerRow.useSwatchPickerRow_unstable)(props, ref);
(0, _useSwatchPickerRowStylesstyles.useSwatchPickerRowStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useSwatchPickerRowStyles_unstable')(state);
return (0, _renderSwatchPickerRow.renderSwatchPickerRow_unstable)(state);
});
SwatchPickerRow.displayName = 'SwatchPickerRow';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/SwatchPickerRow/SwatchPickerRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useSwatchPickerRow_unstable } from './useSwatchPickerRow';\nimport { renderSwatchPickerRow_unstable } from './renderSwatchPickerRow';\nimport { useSwatchPickerRowStyles_unstable } from './useSwatchPickerRowStyles.styles';\nimport type { SwatchPickerRowProps } from './SwatchPickerRow.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SwatchPickerRow component is used to render a row of swatches.\n */\nexport const SwatchPickerRow: ForwardRefComponent<SwatchPickerRowProps> = React.forwardRef((props, ref) => {\n const state = useSwatchPickerRow_unstable(props, ref);\n\n useSwatchPickerRowStyles_unstable(state);\n useCustomStyleHook_unstable('useSwatchPickerRowStyles_unstable')(state);\n return renderSwatchPickerRow_unstable(state);\n});\n\nSwatchPickerRow.displayName = 'SwatchPickerRow';\n"],"names":["SwatchPickerRow","React","forwardRef","props","ref","state","useSwatchPickerRow_unstable","useSwatchPickerRowStyles_unstable","useCustomStyleHook_unstable","renderSwatchPickerRow_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;oCAEqB;uCACG;gDACG;qCAEN;AAKrC,MAAMA,kBAAAA,WAAAA,GAA6DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQC,IAAAA,+CAAAA,EAA4BH,OAAOC;IAEjDG,IAAAA,iEAAAA,EAAkCF;IAClCG,IAAAA,gDAAAA,EAA4B,qCAAqCH;IACjE,OAAOI,IAAAA,qDAAAA,EAA+BJ;AACxC;AAEAL,gBAAgBU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering SwatchPickerRow
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/SwatchPickerRow/SwatchPickerRow.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { SwatchPickerProps } from '../SwatchPicker/SwatchPicker.types';\n\nexport type SwatchPickerRowSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * SwatchPickerRow Props\n */\nexport type SwatchPickerRowProps = ComponentProps<SwatchPickerRowSlots>;\n\n/**\n * State used in rendering SwatchPickerRow\n */\nexport type SwatchPickerRowState = ComponentState<SwatchPickerRowSlots> & Pick<SwatchPickerProps, 'spacing'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC"}
@@ -0,0 +1,31 @@
"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, {
SwatchPickerRow: function() {
return _SwatchPickerRow.SwatchPickerRow;
},
renderSwatchPickerRow_unstable: function() {
return _renderSwatchPickerRow.renderSwatchPickerRow_unstable;
},
swatchPickerRowClassNames: function() {
return _useSwatchPickerRowStylesstyles.swatchPickerRowClassNames;
},
useSwatchPickerRowStyles_unstable: function() {
return _useSwatchPickerRowStylesstyles.useSwatchPickerRowStyles_unstable;
},
useSwatchPickerRow_unstable: function() {
return _useSwatchPickerRow.useSwatchPickerRow_unstable;
}
});
const _SwatchPickerRow = require("./SwatchPickerRow");
const _renderSwatchPickerRow = require("./renderSwatchPickerRow");
const _useSwatchPickerRow = require("./useSwatchPickerRow");
const _useSwatchPickerRowStylesstyles = require("./useSwatchPickerRowStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/SwatchPickerRow/index.ts"],"sourcesContent":["export { SwatchPickerRow } from './SwatchPickerRow';\nexport type { SwatchPickerRowProps, SwatchPickerRowSlots, SwatchPickerRowState } from './SwatchPickerRow.types';\nexport { renderSwatchPickerRow_unstable } from './renderSwatchPickerRow';\nexport { useSwatchPickerRow_unstable } from './useSwatchPickerRow';\nexport { swatchPickerRowClassNames, useSwatchPickerRowStyles_unstable } from './useSwatchPickerRowStyles.styles';\n"],"names":["SwatchPickerRow","renderSwatchPickerRow_unstable","swatchPickerRowClassNames","useSwatchPickerRowStyles_unstable","useSwatchPickerRow_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,eAAe;eAAfA,gCAAe;;IAEfC,8BAA8B;eAA9BA,qDAA8B;;IAE9BC,yBAAyB;eAAzBA,yDAAyB;;IAAEC,iCAAiC;eAAjCA,iEAAiC;;IAD5DC,2BAA2B;eAA3BA,+CAA2B;;;iCAHJ;uCAEe;oCACH;gDACiC"}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderSwatchPickerRow_unstable", {
enumerable: true,
get: function() {
return renderSwatchPickerRow_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderSwatchPickerRow_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/SwatchPickerRow/renderSwatchPickerRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { SwatchPickerRowState, SwatchPickerRowSlots } from './SwatchPickerRow.types';\n\n/**\n * Render the final JSX of SwatchPickerRow\n */\nexport const renderSwatchPickerRow_unstable = (state: SwatchPickerRowState) => {\n assertSlots<SwatchPickerRowSlots>(state);\n return <state.root />;\n};\n"],"names":["renderSwatchPickerRow_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,iCAAiC,CAACC;IAC7CC,IAAAA,2BAAAA,EAAkCD;IAClC,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useSwatchPickerRow_unstable", {
enumerable: true,
get: function() {
return useSwatchPickerRow_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 _swatchPicker = require("../../contexts/swatchPicker");
const useSwatchPickerRow_unstable = (props, ref)=>{
const { style, ...rest } = props;
const spacing = (0, _swatchPicker.useSwatchPickerContextValue_unstable)((ctx)=>ctx.spacing);
return {
components: {
root: 'div'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
ref,
role: 'row',
...rest
}), {
elementType: 'div'
}),
spacing
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/SwatchPickerRow/useSwatchPickerRow.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { SwatchPickerRowProps, SwatchPickerRowState } from './SwatchPickerRow.types';\nimport { useSwatchPickerContextValue_unstable } from '../../contexts/swatchPicker';\n\n/**\n * Create the state required to render SwatchPickerRow.\n *\n * The returned state can be modified with hooks such as useSwatchPickerRowStyles_unstable,\n * before being passed to renderSwatchPickerRow_unstable.\n *\n * @param props - props from this instance of SwatchPickerRow\n * @param ref - reference to root HTMLDivElement of SwatchPickerRow\n */\nexport const useSwatchPickerRow_unstable = (\n props: SwatchPickerRowProps,\n ref: React.Ref<HTMLDivElement>,\n): SwatchPickerRowState => {\n const { style, ...rest } = props;\n const spacing = useSwatchPickerContextValue_unstable(ctx => ctx.spacing);\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'row',\n ...rest,\n }),\n { elementType: 'div' },\n ),\n spacing,\n };\n};\n"],"names":["useSwatchPickerRow_unstable","props","ref","style","rest","spacing","useSwatchPickerContextValue_unstable","ctx","components","root","slot","always","getIntrinsicElementProps","role","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;gCACwB;8BAEM;AAW9C,MAAMA,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGH;IAC3B,MAAMI,UAAUC,IAAAA,kDAAAA,EAAqCC,CAAAA,MAAOA,IAAIF,OAAO;IAEvE,OAAO;QACLG,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,OAAO;YAC9BV;YACAW,MAAM;YACN,GAAGT,IAAI;QACT,IACA;YAAEU,aAAa;QAAM;QAEvBT;IACF;AACF"}
@@ -0,0 +1,48 @@
"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, {
swatchPickerRowClassNames: function() {
return swatchPickerRowClassNames;
},
useSwatchPickerRowStyles_unstable: function() {
return useSwatchPickerRowStyles_unstable;
}
});
const _react = require("@griffel/react");
const swatchPickerRowClassNames = {
root: 'fui-SwatchPickerRow'
};
/**
* Styles for the root slot
*/ const useResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r1xhj18k", null, [
".r1xhj18k{display:flex;flex-direction:row;}"
]);
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
spacingSmall: {
i8kkvl: "f16mnhsx"
},
spacingMedium: {
i8kkvl: "f1q8lukm"
}
}, {
d: [
".f16mnhsx{column-gap:2px;}",
".f1q8lukm{column-gap:4px;}"
]
});
const useSwatchPickerRowStyles_unstable = (state)=>{
'use no memo';
const resetStyles = useResetStyles();
const styles = useStyles();
const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;
state.root.className = (0, _react.mergeClasses)(swatchPickerRowClassNames.root, resetStyles, spacingStyle, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useSwatchPickerRowStyles.styles.js"],"sourcesContent":["import { makeResetStyles, mergeClasses, makeStyles } from '@griffel/react';\nexport const swatchPickerRowClassNames = {\n root: 'fui-SwatchPickerRow'\n};\n/**\n * Styles for the root slot\n */ const useResetStyles = makeResetStyles({\n display: 'flex',\n flexDirection: 'row'\n});\nconst useStyles = makeStyles({\n spacingSmall: {\n columnGap: '2px'\n },\n spacingMedium: {\n columnGap: '4px'\n }\n});\n/**\n * Apply styling to the SwatchPickerRow slots based on the state\n */ export const useSwatchPickerRowStyles_unstable = (state)=>{\n 'use no memo';\n const resetStyles = useResetStyles();\n const styles = useStyles();\n const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium;\n state.root.className = mergeClasses(swatchPickerRowClassNames.root, resetStyles, spacingStyle, state.root.className);\n return state;\n};\n"],"names":["swatchPickerRowClassNames","useSwatchPickerRowStyles_unstable","root","useResetStyles","__resetStyles","useStyles","__styles","spacingSmall","i8kkvl","spacingMedium","d","state","resetStyles","styles","spacingStyle","spacing","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACaA,yBAAyB;eAAzBA;;IAmBIC,iCAAiC;eAAjCA;;;uBApByC;AACnD,MAAMD,4BAA4B;IACrCE,MAAM;AACV;AACA;;CAEA,GAAI,MAAMC,iBAAc,WAAA,GAAGC,IAAAA,oBAAA,EAAA,YAAA,MAAA;IAAA;CAG1B;AACD,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,cAAA;QAAAC,QAAA;IAAA;IAAAC,eAAA;QAAAD,QAAA;IAAA;AAAA,GAAA;IAAAE,GAAA;QAAA;QAAA;KAAA;AAAA;AAUP,MAAMT,oCAAqCU,CAAAA;IAClD;IACA,MAAMC,cAAcT;IACpB,MAAMU,SAASR;IACf,MAAMS,eAAeH,MAAMI,OAAO,KAAK,UAAUF,OAAON,YAAY,GAAGM,OAAOJ,aAAa;IAC3FE,MAAMT,IAAI,CAACc,SAAS,GAAGC,IAAAA,mBAAY,EAACjB,0BAA0BE,IAAI,EAAEU,aAAaE,cAAcH,MAAMT,IAAI,CAACc,SAAS;IACnH,OAAOL;AACX"}