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, "TeachingPopoverTitle", {
enumerable: true,
get: function() {
return TeachingPopoverTitle;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useTeachingPopoverTitle = require("./useTeachingPopoverTitle");
const _renderTeachingPopoverTitle = require("./renderTeachingPopoverTitle");
const _useTeachingPopoverTitleStylesstyles = require("./useTeachingPopoverTitleStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const TeachingPopoverTitle = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useTeachingPopoverTitle.useTeachingPopoverTitle_unstable)(props, ref);
(0, _useTeachingPopoverTitleStylesstyles.useTeachingPopoverTitleStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useTeachingPopoverTitleStyles_unstable')(state);
return (0, _renderTeachingPopoverTitle.renderTeachingPopoverTitle_unstable)(state);
});
TeachingPopoverTitle.displayName = 'TeachingPopoverTitle';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverTitle/TeachingPopoverTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTeachingPopoverTitle_unstable } from './useTeachingPopoverTitle';\nimport { renderTeachingPopoverTitle_unstable } from './renderTeachingPopoverTitle';\nimport { useTeachingPopoverTitleStyles_unstable } from './useTeachingPopoverTitleStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport type { TeachingPopoverTitleProps } from './TeachingPopoverTitle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled TeachingPopoverTitle, using the `useTeachingPopoverTitle_unstable` and `useTeachingPopoverTitleStyles_unstable`\n * hooks.\n *\n * TeachingPopoverTitle is similar to TeachingPopoverHeader, but it is intended to be placed within a TeachingPopoverBody\n * TeachingPopoverTitle can also optionally render a dismiss button, however this should only be enabled when there is no TeachingPopoverHeader/dismiss.\n */\nexport const TeachingPopoverTitle: ForwardRefComponent<TeachingPopoverTitleProps> = React.forwardRef((props, ref) => {\n const state = useTeachingPopoverTitle_unstable(props, ref);\n\n useTeachingPopoverTitleStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTeachingPopoverTitleStyles_unstable')(state);\n\n return renderTeachingPopoverTitle_unstable(state);\n});\n\nTeachingPopoverTitle.displayName = 'TeachingPopoverTitle';\n"],"names":["TeachingPopoverTitle","React","forwardRef","props","ref","state","useTeachingPopoverTitle_unstable","useTeachingPopoverTitleStyles_unstable","useCustomStyleHook_unstable","renderTeachingPopoverTitle_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;yCAC0B;4CACG;qDACG;qCACX;AAWrC,MAAMA,uBAAAA,WAAAA,GAAuEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3G,MAAMC,QAAQC,IAAAA,yDAAAA,EAAiCH,OAAOC;IAEtDG,IAAAA,2EAAAA,EAAuCF;IAEvCG,IAAAA,gDAAAA,EAA4B,0CAA0CH;IAEtE,OAAOI,IAAAA,+DAAAA,EAAoCJ;AAC7C;AAEAL,qBAAqBU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering TeachingPopoverTitle
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverTitle/TeachingPopoverTitle.types.ts"],"sourcesContent":["import { PopoverContextValue } from '@fluentui/react-popover';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TeachingPopoverTitleSlots = {\n /**\n * Title for teaching bubble\n */\n root: Slot<'h2', 'h1' | 'h3' | 'h4' | 'h5' | 'h6' | 'div'>;\n /**\n * An alternate close button path if not placed in the TeachingPopoverHeader\n */\n dismissButton?: Slot<'button'>;\n};\n\n/**\n * TeachingPopoverTitle Props\n */\nexport type TeachingPopoverTitleProps = ComponentProps<TeachingPopoverTitleSlots>;\n\n/**\n * State used in rendering TeachingPopoverTitle\n */\nexport type TeachingPopoverTitleState = ComponentState<TeachingPopoverTitleSlots> &\n Pick<PopoverContextValue, 'appearance'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;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, {
TeachingPopoverTitle: function() {
return _TeachingPopoverTitle.TeachingPopoverTitle;
},
renderTeachingPopoverTitle_unstable: function() {
return _renderTeachingPopoverTitle.renderTeachingPopoverTitle_unstable;
},
teachingPopoverTitleClassNames: function() {
return _useTeachingPopoverTitleStylesstyles.teachingPopoverTitleClassNames;
},
useTeachingPopoverTitleStyles_unstable: function() {
return _useTeachingPopoverTitleStylesstyles.useTeachingPopoverTitleStyles_unstable;
},
useTeachingPopoverTitle_unstable: function() {
return _useTeachingPopoverTitle.useTeachingPopoverTitle_unstable;
}
});
const _TeachingPopoverTitle = require("./TeachingPopoverTitle");
const _renderTeachingPopoverTitle = require("./renderTeachingPopoverTitle");
const _useTeachingPopoverTitle = require("./useTeachingPopoverTitle");
const _useTeachingPopoverTitleStylesstyles = require("./useTeachingPopoverTitleStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverTitle/index.ts"],"sourcesContent":["export { TeachingPopoverTitle } from './TeachingPopoverTitle';\nexport type {\n TeachingPopoverTitleProps,\n TeachingPopoverTitleSlots,\n TeachingPopoverTitleState,\n} from './TeachingPopoverTitle.types';\nexport { renderTeachingPopoverTitle_unstable } from './renderTeachingPopoverTitle';\nexport { useTeachingPopoverTitle_unstable } from './useTeachingPopoverTitle';\nexport {\n teachingPopoverTitleClassNames,\n useTeachingPopoverTitleStyles_unstable,\n} from './useTeachingPopoverTitleStyles.styles';\n"],"names":["TeachingPopoverTitle","renderTeachingPopoverTitle_unstable","teachingPopoverTitleClassNames","useTeachingPopoverTitleStyles_unstable","useTeachingPopoverTitle_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,oBAAoB;eAApBA,0CAAoB;;IAMpBC,mCAAmC;eAAnCA,+DAAmC;;IAG1CC,8BAA8B;eAA9BA,mEAA8B;;IAC9BC,sCAAsC;eAAtCA,2EAAsC;;IAH/BC,gCAAgC;eAAhCA,yDAAgC;;;sCAPJ;4CAMe;yCACH;qDAI1C"}
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderTeachingPopoverTitle_unstable", {
enumerable: true,
get: function() {
return renderTeachingPopoverTitle_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const renderTeachingPopoverTitle_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
children: [
state.root.children,
state.dismissButton && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.dismissButton, {})
]
});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverTitle/renderTeachingPopoverTitle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport type { TeachingPopoverTitleState } from './TeachingPopoverTitle.types';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { TeachingPopoverTitleSlots } from './TeachingPopoverTitle.types';\n\n/**\n * Render the final JSX of TeachingPopoverTitle\n */\nexport const renderTeachingPopoverTitle_unstable = (state: TeachingPopoverTitleState) => {\n assertSlots<TeachingPopoverTitleSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.dismissButton && <state.dismissButton />}\n </state.root>\n );\n};\n"],"names":["renderTeachingPopoverTitle_unstable","state","assertSlots","_jsxs","root","children","dismissButton","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,sCAAsC,CAACC;IAClDC,IAAAA,2BAAAA,EAAuCD;IAEvC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMG,IAAI,CAACC,QAAQ;YACnBJ,MAAMK,aAAa,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACN,MAAMK,aAAa,EAAA,CAAA;;;AAGlD"}
@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useTeachingPopoverTitle_unstable", {
enumerable: true,
get: function() {
return useTeachingPopoverTitle_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 _reacticons = require("@fluentui/react-icons");
const _reactpopover = require("@fluentui/react-popover");
const DismissIcon = (0, _reacticons.bundleIcon)(_reacticons.DismissFilled, _reacticons.DismissRegular);
const useTeachingPopoverTitle_unstable = (props, ref)=>{
const { dismissButton } = props;
const setOpen = (0, _reactpopover.usePopoverContext_unstable)((context)=>context.setOpen);
const triggerRef = (0, _reactpopover.usePopoverContext_unstable)((context)=>context.triggerRef);
const appearance = (0, _reactpopover.usePopoverContext_unstable)((context)=>context.appearance);
const onDismissButtonClick = (0, _reactutilities.useEventCallback)((ev)=>{
if (!ev.defaultPrevented) {
setOpen(ev, false);
}
if (triggerRef.current) {
triggerRef.current.focus();
}
});
return {
appearance,
components: {
root: 'h2',
dismissButton: 'button'
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('h2', {
ref,
...props
}), {
elementType: 'h2'
}),
dismissButton: _reactutilities.slot.optional(dismissButton, {
renderByDefault: false,
defaultProps: {
children: /*#__PURE__*/ _react.createElement(DismissIcon, null),
onClick: onDismissButtonClick,
'aria-label': 'dismiss',
'aria-hidden': true
},
elementType: 'button'
})
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/TeachingPopoverTitle/useTeachingPopoverTitle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { TeachingPopoverTitleProps, TeachingPopoverTitleState } from './TeachingPopoverTitle.types';\nimport { DismissFilled, DismissRegular, bundleIcon } from '@fluentui/react-icons';\nimport { usePopoverContext_unstable } from '@fluentui/react-popover';\n\nconst DismissIcon = bundleIcon(DismissFilled, DismissRegular);\n/**\n * Returns the props and state required to render the component\n * @param props - TeachingPopoverTitle properties\n * @param ref - reference to root HTMLElement of TeachingPopoverTitle\n */\nexport const useTeachingPopoverTitle_unstable = (\n props: TeachingPopoverTitleProps,\n ref: React.Ref<HTMLDivElement>,\n): TeachingPopoverTitleState => {\n const { dismissButton } = props;\n\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const triggerRef = usePopoverContext_unstable(context => context.triggerRef);\n const appearance = usePopoverContext_unstable(context => context.appearance);\n\n const onDismissButtonClick = useEventCallback((ev: React.MouseEvent<HTMLButtonElement>) => {\n if (!ev.defaultPrevented) {\n setOpen(ev, false);\n }\n\n if (triggerRef.current) {\n triggerRef.current.focus();\n }\n });\n\n return {\n appearance,\n components: {\n root: 'h2',\n dismissButton: 'button',\n },\n root: slot.always(\n getIntrinsicElementProps('h2', {\n ref,\n ...props,\n }),\n { elementType: 'h2' },\n ),\n dismissButton: slot.optional(dismissButton, {\n renderByDefault: false,\n defaultProps: {\n children: <DismissIcon />,\n onClick: onDismissButtonClick,\n 'aria-label': 'dismiss',\n 'aria-hidden': true,\n },\n elementType: 'button',\n }),\n };\n};\n"],"names":["useTeachingPopoverTitle_unstable","DismissIcon","bundleIcon","DismissFilled","DismissRegular","props","ref","dismissButton","setOpen","usePopoverContext_unstable","context","triggerRef","appearance","onDismissButtonClick","useEventCallback","ev","defaultPrevented","current","focus","components","root","slot","always","getIntrinsicElementProps","elementType","optional","renderByDefault","defaultProps","children","React","createElement","onClick"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;gCAC0C;4BAEP;8BACf;AAE3C,MAAMC,cAAcC,IAAAA,sBAAAA,EAAWC,yBAAAA,EAAeC,0BAAAA;AAMvC,MAAMJ,mCAAmC,CAC9CK,OACAC;IAEA,MAAM,EAAEC,aAAa,EAAE,GAAGF;IAE1B,MAAMG,UAAUC,IAAAA,wCAAAA,EAA2BC,CAAAA,UAAWA,QAAQF,OAAO;IACrE,MAAMG,aAAaF,IAAAA,wCAAAA,EAA2BC,CAAAA,UAAWA,QAAQC,UAAU;IAC3E,MAAMC,aAAaH,IAAAA,wCAAAA,EAA2BC,CAAAA,UAAWA,QAAQE,UAAU;IAE3E,MAAMC,uBAAuBC,IAAAA,gCAAAA,EAAiB,CAACC;QAC7C,IAAI,CAACA,GAAGC,gBAAgB,EAAE;YACxBR,QAAQO,IAAI;QACd;QAEA,IAAIJ,WAAWM,OAAO,EAAE;YACtBN,WAAWM,OAAO,CAACC,KAAK;QAC1B;IACF;IAEA,OAAO;QACLN;QACAO,YAAY;YACVC,MAAM;YACNb,eAAe;QACjB;QACAa,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,MAAM;YAC7BjB;YACA,GAAGD,KAAK;QACV,IACA;YAAEmB,aAAa;QAAK;QAEtBjB,eAAec,oBAAAA,CAAKI,QAAQ,CAAClB,eAAe;YAC1CmB,iBAAiB;YACjBC,cAAc;gBACZC,UAAAA,WAAAA,GAAUC,OAAAC,aAAA,CAAC7B,aAAAA;gBACX8B,SAASlB;gBACT,cAAc;gBACd,eAAe;YACjB;YACAW,aAAa;QACf;IACF;AACF"}
@@ -0,0 +1,165 @@
"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, {
teachingPopoverTitleClassNames: function() {
return teachingPopoverTitleClassNames;
},
useTeachingPopoverTitleStyles_unstable: function() {
return useTeachingPopoverTitleStyles_unstable;
}
});
const _react = require("@griffel/react");
const teachingPopoverTitleClassNames = {
root: 'fui-TeachingPopoverTitle',
dismissButton: 'fui-TeachingPopoverTitle__dismissButton'
};
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "f22iagw",
Beiy3e4: "f1063pyq",
Brf1p80: "f1869bpl",
Be2twd7: "fod5ikn",
Bhrd7zp: "fl43uef",
sj55zd: "f19n0e5",
Bg96gwp: "faaz57k",
Byoj8tv: "f5b47ha",
B6of3ja: "f1jkagg5",
jrapky: "fi2ljxd"
},
rootBrand: {
sj55zd: "f1phragk"
},
dismissButton: {
qhf8xq: "f10pi13n",
Bgfg5da: 0,
B9xav0g: 0,
oivjwe: 0,
Bn0qgzm: 0,
B4g9neb: 0,
zhjwy3: 0,
wvpqe5: 0,
ibv6hh: 0,
u1mtju: 0,
h3c5rm: 0,
vrafjx: [
"f1n71otn",
"f1deefiw"
],
Bekrc4i: 0,
i8vvqc: 0,
g2u3we: 0,
icvyot: 0,
B4j52fo: 0,
irswps: "f88035w",
mc9l5x: "f22iagw",
Bt984gj: "f122n59",
Bceei9c: "f1k6fduh",
Bahqtrf: "fk6fouc",
Be2twd7: "fkhj508",
Bhrd7zp: "figsok6",
Bg96gwp: "f1i3iumi",
De3pzq: "f1c21dwh",
B7ck84d: "f1ewtqcl",
B7oj6ja: [
"f3fg2lr",
"f13av6d4"
],
Bbmb7ep: [
"fzi6hpg",
"fyowgf4"
],
Bfpq7zp: 0,
g9k6zt: 0,
Bn4voq9: 0,
giviqs: "f89hs3r",
Bw81rd7: 0,
kdpuga: 0,
dm238s: 0,
B6xbmo0: 0,
B3whbx2: "f2krc9w",
B8q5s1w: "f8hki3x",
Bci5o5g: [
"f1d2448m",
"ffh67wi"
],
n8qw10: "f1bjia2o",
Bdrgwmp: [
"ffh67wi",
"f1d2448m"
],
Jyy4pa: "f1lfeew"
},
dismissBrand: {
sj55zd: "f1phragk"
}
}, {
d: [
".f22iagw{display:flex;}",
".f1063pyq{flex-direction:row;}",
".f1869bpl{justify-content:space-between;}",
".fod5ikn{font-size:var(--fontSizeBase400);}",
".fl43uef{font-weight:var(--fontWeightSemibold);}",
".f19n0e5{color:var(--colorNeutralForeground1);}",
".faaz57k{line-height:var(--lineHeightBase400);}",
".f5b47ha{padding-bottom:var(--spacingVerticalS);}",
".f1jkagg5{margin-top:var(--spacingHorizontalNone);}",
".fi2ljxd{margin-bottom:var(--spacingHorizontalNone);}",
".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",
".f10pi13n{position:relative;}",
[
".f88035w{border:var(--strokeWidthThin) solid var(--colorTransparentStroke);}",
{
p: -2
}
],
".f122n59{align-items:center;}",
".f1k6fduh{cursor:pointer;}",
".fk6fouc{font-family:var(--fontFamilyBase);}",
".fkhj508{font-size:var(--fontSizeBase300);}",
".figsok6{font-weight:var(--fontWeightRegular);}",
".f1i3iumi{line-height:var(--lineHeightBase300);}",
".f1c21dwh{background-color:var(--colorTransparentBackground);}",
".f1ewtqcl{box-sizing:border-box;}",
".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}",
".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}",
".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}",
".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}",
".f1n71otn{border-right-style:none;}",
".f1deefiw{border-left-style:none;}",
[
".f89hs3r[data-fui-focus-visible]{outline:var(--strokeWidthThick) solid var(--colorStrokeFocus2);}",
{
p: -1
}
],
[
".f2krc9w[data-fui-focus-visible]{border-radius:var(--borderRadiusMedium);}",
{
p: -1
}
],
".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",
".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",
".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",
".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",
".f1lfeew{-webkit-margin-start:auto;margin-inline-start:auto;}"
]
});
const useTeachingPopoverTitleStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const { appearance } = state;
state.root.className = (0, _react.mergeClasses)(teachingPopoverTitleClassNames.root, styles.root, appearance === 'brand' && styles.rootBrand, state.root.className);
if (state.dismissButton) {
state.dismissButton.className = (0, _react.mergeClasses)(teachingPopoverTitleClassNames.dismissButton, styles.dismissButton, appearance === 'brand' ? styles.dismissBrand : undefined, state.dismissButton.className);
}
return state;
};
File diff suppressed because one or more lines are too long