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
+36
View File
@@ -0,0 +1,36 @@
"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, {
DIALOG_GAP: function() {
return DIALOG_GAP;
},
FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
return FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
},
MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
return MEDIA_QUERY_BREAKPOINT_SELECTOR;
},
MEDIA_QUERY_SHORT_SCREEN: function() {
return MEDIA_QUERY_SHORT_SCREEN;
},
SURFACE_BORDER_WIDTH: function() {
return SURFACE_BORDER_WIDTH;
},
SURFACE_PADDING: function() {
return SURFACE_PADDING;
}
});
const MEDIA_QUERY_BREAKPOINT_SELECTOR = '@media screen and (max-width: 480px)';
const MEDIA_QUERY_SHORT_SCREEN = '@media screen and (max-height: 359px)';
const SURFACE_PADDING = '24px';
const DIALOG_GAP = '8px';
const SURFACE_BORDER_WIDTH = '1px';
const FULLSCREEN_DIALOG_SCROLLBAR_OFFSET = '4px';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/contexts/constants.ts"],"sourcesContent":["export const MEDIA_QUERY_BREAKPOINT_SELECTOR = '@media screen and (max-width: 480px)';\nexport const MEDIA_QUERY_SHORT_SCREEN = '@media screen and (max-height: 359px)';\nexport const SURFACE_PADDING = '24px';\nexport const DIALOG_GAP = '8px';\nexport const SURFACE_BORDER_WIDTH = '1px';\nexport const FULLSCREEN_DIALOG_SCROLLBAR_OFFSET = '4px';\n"],"names":["DIALOG_GAP","FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","MEDIA_QUERY_BREAKPOINT_SELECTOR","MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,UAAAA;eAAAA;;IAEAC,kCAAAA;eAAAA;;IALAC,+BAAAA;eAAAA;;IACAC,wBAAAA;eAAAA;;IAGAC,oBAAAA;eAAAA;;IAFAC,eAAAA;eAAAA;;;AAFN,MAAMH,kCAAkC;AACxC,MAAMC,2BAA2B;AACjC,MAAME,kBAAkB;AACxB,MAAML,aAAa;AACnB,MAAMI,uBAAuB;AAC7B,MAAMH,qCAAqC"}
@@ -0,0 +1,38 @@
"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, {
DialogContext: function() {
return DialogContext;
},
DialogProvider: function() {
return DialogProvider;
},
useDialogContext_unstable: function() {
return useDialogContext_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactcontextselector = require("@fluentui/react-context-selector");
const defaultContextValue = {
open: false,
inertTrapFocus: false,
modalType: 'modal',
isNestedDialog: false,
dialogRef: {
current: null
},
requestOpenChange () {
/* noop */ }
};
const DialogContext = (0, _reactcontextselector.createContext)(undefined);
const DialogProvider = DialogContext.Provider;
const useDialogContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(DialogContext, (ctx = defaultContextValue)=>selector(ctx));
@@ -0,0 +1 @@
{"version":3,"sources":["../src/contexts/dialogContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext, ContextSelector, useContextSelector } from '@fluentui/react-context-selector';\nimport { DialogSurfaceElement } from '../DialogSurface';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { DialogModalType, DialogOpenChangeData } from '../Dialog';\nimport { useModalAttributes } from '@fluentui/react-tabster';\n\nexport type DialogContextValue = {\n open: boolean;\n inertTrapFocus: boolean;\n dialogTitleId?: string;\n isNestedDialog: boolean;\n dialogRef: React.Ref<DialogSurfaceElement>;\n modalType: DialogModalType;\n /**\n * Requests dialog main component to update it's internal open state\n */\n requestOpenChange: (data: DialogOpenChangeData) => void;\n} & Partial<ReturnType<typeof useModalAttributes>>;\n\nconst defaultContextValue: DialogContextValue = {\n open: false,\n inertTrapFocus: false,\n modalType: 'modal',\n isNestedDialog: false,\n dialogRef: { current: null },\n requestOpenChange() {\n /* noop */\n },\n};\n\n// Contexts should default to undefined\nexport const DialogContext: Context<DialogContextValue | undefined> = createContext<DialogContextValue | undefined>(\n undefined,\n);\n\nexport const DialogProvider = DialogContext.Provider;\nexport const useDialogContext_unstable = <T>(selector: ContextSelector<DialogContextValue, T>): T =>\n useContextSelector(DialogContext, (ctx = defaultContextValue) => selector(ctx));\n"],"names":["DialogContext","DialogProvider","useDialogContext_unstable","defaultContextValue","open","inertTrapFocus","modalType","isNestedDialog","dialogRef","current","requestOpenChange","createContext","undefined","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAgCaA,aAAAA;eAAAA;;IAIAC,cAAAA;eAAAA;;IACAC,yBAAAA;eAAAA;;;;iEArCU;sCAC4C;AAmBnE,MAAMC,sBAA0C;IAC9CC,MAAM;IACNC,gBAAgB;IAChBC,WAAW;IACXC,gBAAgB;IAChBC,WAAW;QAAEC,SAAS;IAAK;IAC3BC;IACE,QAAQ,GACV;AACF;AAGO,MAAMV,gBAAyDW,IAAAA,mCAAAA,EACpEC;AAGK,MAAMX,iBAAiBD,cAAca,QAAQ;AAC7C,MAAMX,4BAA4B,CAAIY,WAC3CC,IAAAA,wCAAAA,EAAmBf,eAAe,CAACgB,MAAMb,mBAAmB,GAAKW,SAASE"}
@@ -0,0 +1,30 @@
"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, {
DialogSurfaceContext: function() {
return DialogSurfaceContext;
},
DialogSurfaceProvider: function() {
return DialogSurfaceProvider;
},
useDialogSurfaceContext_unstable: function() {
return useDialogSurfaceContext_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const defaultContextValue = false;
const DialogSurfaceContext = /*#__PURE__*/ _react.createContext(undefined);
const DialogSurfaceProvider = DialogSurfaceContext.Provider;
const useDialogSurfaceContext_unstable = ()=>{
var _React_useContext;
return (_React_useContext = _react.useContext(DialogSurfaceContext)) !== null && _React_useContext !== void 0 ? _React_useContext : defaultContextValue;
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/contexts/dialogSurfaceContext.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type DialogSurfaceContextValue = boolean;\n\nconst defaultContextValue: DialogSurfaceContextValue = false;\n\nexport const DialogSurfaceContext = React.createContext<DialogSurfaceContextValue | undefined>(undefined);\n\nexport const DialogSurfaceProvider = DialogSurfaceContext.Provider;\n\nexport const useDialogSurfaceContext_unstable = () => React.useContext(DialogSurfaceContext) ?? defaultContextValue;\n"],"names":["DialogSurfaceContext","DialogSurfaceProvider","useDialogSurfaceContext_unstable","defaultContextValue","React","createContext","undefined","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,oBAAAA;eAAAA;;IAEAC,qBAAAA;eAAAA;;IAEAC,gCAAAA;eAAAA;;;;iEAVU;AAIvB,MAAMC,sBAAiD;AAEhD,MAAMH,qCAAuBI,OAAMC,aAAa,CAAwCC;AAExF,MAAML,wBAAwBD,qBAAqBO,QAAQ;AAE3D,MAAML,mCAAmC;QAAME;WAAAA,CAAAA,oBAAAA,OAAMI,UAAU,CAACR,qBAAAA,MAAAA,QAAjBI,sBAAAA,KAAAA,IAAAA,oBAA0CD;AAAkB"}
+51
View File
@@ -0,0 +1,51 @@
"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, {
DIALOG_GAP: function() {
return _constants.DIALOG_GAP;
},
DialogContext: function() {
return _dialogContext.DialogContext;
},
DialogProvider: function() {
return _dialogContext.DialogProvider;
},
DialogSurfaceContext: function() {
return _dialogSurfaceContext.DialogSurfaceContext;
},
DialogSurfaceProvider: function() {
return _dialogSurfaceContext.DialogSurfaceProvider;
},
FULLSCREEN_DIALOG_SCROLLBAR_OFFSET: function() {
return _constants.FULLSCREEN_DIALOG_SCROLLBAR_OFFSET;
},
MEDIA_QUERY_BREAKPOINT_SELECTOR: function() {
return _constants.MEDIA_QUERY_BREAKPOINT_SELECTOR;
},
MEDIA_QUERY_SHORT_SCREEN: function() {
return _constants.MEDIA_QUERY_SHORT_SCREEN;
},
SURFACE_BORDER_WIDTH: function() {
return _constants.SURFACE_BORDER_WIDTH;
},
SURFACE_PADDING: function() {
return _constants.SURFACE_PADDING;
},
useDialogContext_unstable: function() {
return _dialogContext.useDialogContext_unstable;
},
useDialogSurfaceContext_unstable: function() {
return _dialogSurfaceContext.useDialogSurfaceContext_unstable;
}
});
const _constants = require("./constants");
const _dialogContext = require("./dialogContext");
const _dialogSurfaceContext = require("./dialogSurfaceContext");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export {\n DIALOG_GAP,\n FULLSCREEN_DIALOG_SCROLLBAR_OFFSET,\n MEDIA_QUERY_BREAKPOINT_SELECTOR,\n MEDIA_QUERY_SHORT_SCREEN,\n SURFACE_BORDER_WIDTH,\n SURFACE_PADDING,\n} from './constants';\nexport type { DialogContextValue } from './dialogContext';\nexport { DialogContext, DialogProvider, useDialogContext_unstable } from './dialogContext';\nexport type { DialogSurfaceContextValue } from './dialogSurfaceContext';\nexport { DialogSurfaceContext, DialogSurfaceProvider, useDialogSurfaceContext_unstable } from './dialogSurfaceContext';\n"],"names":["DIALOG_GAP","DialogContext","DialogProvider","DialogSurfaceContext","DialogSurfaceProvider","FULLSCREEN_DIALOG_SCROLLBAR_OFFSET","MEDIA_QUERY_BREAKPOINT_SELECTOR","MEDIA_QUERY_SHORT_SCREEN","SURFACE_BORDER_WIDTH","SURFACE_PADDING","useDialogContext_unstable","useDialogSurfaceContext_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,UAAU;eAAVA,qBAAU;;IAQHC,aAAa;eAAbA,4BAAa;;IAAEC,cAAc;eAAdA,6BAAc;;IAE7BC,oBAAoB;eAApBA,0CAAoB;;IAAEC,qBAAqB;eAArBA,2CAAqB;;IATlDC,kCAAkC;eAAlCA,6CAAkC;;IAClCC,+BAA+B;eAA/BA,0CAA+B;;IAC/BC,wBAAwB;eAAxBA,mCAAwB;;IACxBC,oBAAoB;eAApBA,+BAAoB;;IACpBC,eAAe;eAAfA,0BAAe;;IAGuBC,yBAAyB;eAAzBA,wCAAyB;;IAEXC,gCAAgC;eAAhCA,sDAAgC;;;2BAJ/E;+BAEkE;sCAEqB"}