@fluentui/web-components 3.0.0-beta.1 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -2
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/menu/define.d.ts +1 -0
- package/dist/dts/menu/index.d.ts +4 -0
- package/dist/dts/menu/menu.d.ts +194 -0
- package/dist/dts/menu/menu.definition.d.ts +9 -0
- package/dist/dts/menu/menu.styles.d.ts +4 -0
- package/dist/dts/menu/menu.template.d.ts +4 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/menu/define.js +4 -0
- package/dist/esm/menu/define.js.map +1 -0
- package/dist/esm/menu/index.js +5 -0
- package/dist/esm/menu/index.js.map +1 -0
- package/dist/esm/menu/menu.definition.js +17 -0
- package/dist/esm/menu/menu.definition.js.map +1 -0
- package/dist/esm/menu/menu.js +413 -0
- package/dist/esm/menu/menu.js.map +1 -0
- package/dist/esm/menu/menu.styles.js +17 -0
- package/dist/esm/menu/menu.styles.js.map +1 -0
- package/dist/esm/menu/menu.template.js +24 -0
- package/dist/esm/menu/menu.template.js.map +1 -0
- package/dist/fluent-web-components.api.json +1081 -0
- package/dist/storybook/591.f5bf0d78d2f203de19f5.manager.bundle.js +2 -0
- package/dist/storybook/677.939f187f.iframe.bundle.js +462 -0
- package/dist/storybook/{885.6558041f.iframe.bundle.js.map → 677.939f187f.iframe.bundle.js.map} +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.html +1 -1
- package/dist/storybook/{main.18c2c615e57574af12cd.manager.bundle.js → main.5d7b916dc1e37293b1d8.manager.bundle.js} +1 -1
- package/dist/storybook/main.b782e9fb.iframe.bundle.js +2 -0
- package/dist/storybook/main.b782e9fb.iframe.bundle.js.LICENSE.txt +1 -0
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/runtime~main.dbf00b470fe610082919.manager.bundle.js +1 -0
- package/dist/web-components.d.ts +209 -0
- package/dist/web-components.js +558 -222
- package/dist/web-components.min.js +67 -66
- package/docs/api-report.md +40 -0
- package/package.json +33 -29
- package/dist/storybook/761.21909e5ef44f985ae0d4.manager.bundle.js +0 -2
- package/dist/storybook/885.6558041f.iframe.bundle.js +0 -462
- package/dist/storybook/main.2c02ce39.iframe.bundle.js +0 -1
- package/dist/storybook/runtime~main.8db883e762072830487f.manager.bundle.js +0 -1
- /package/dist/storybook/{761.21909e5ef44f985ae0d4.manager.bundle.js.LICENSE.txt → 591.f5bf0d78d2f203de19f5.manager.bundle.js.LICENSE.txt} +0 -0
- /package/dist/storybook/{885.6558041f.iframe.bundle.js.LICENSE.txt → 677.939f187f.iframe.bundle.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1695874631964,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"monorepo":"Nx","packageManager":{"type":"yarn","version":"1.23.34"},"storybookVersion":"6.5.15","language":"typescript","storybookPackages":{"@storybook/html":{"version":null}},"framework":{"name":"html"},"addons":{"@storybook/addon-docs":{"version":"6.5.15"},"@storybook/addon-essentials":{"options":{"backgrounds":false,"viewport":false,"toolbars":false,"actions":true},"version":"6.5.15"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(!1&priority||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every((key=>__webpack_require__.O[key](chunkIds[j])))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach((key=>def[key]=()=>value[key]));return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce(((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises)),[])),__webpack_require__.u=chunkId=>chunkId+"."+{108:"78b731e00015540915a8",401:"c9bdfaf0dda8b194127f",709:"b131e33993a6b94d7ad8",721:"c225c101a0a55a8f98eb",858:"e08e25a6901d2e21e9d8",950:"674e7934b4a26a022608",954:"7f985e2fdf9f15a7748b"}[chunkId]+".manager.bundle.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=module=>((module=Object.create(module)).children||(module.children=[]),Object.defineProperty(module,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+module.id)}}),module),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")=="@fluentui/web-components:"+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",script.timeout=120,__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack","@fluentui/web-components:"+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach((fn=>fn(event))),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{var installedChunks={303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(303!=chunkId){var promise=new Promise(((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]));promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,(event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}}),"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some((id=>0!==installedChunks[id]))){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunk_fluentui_web_components=self.webpackChunk_fluentui_web_components||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
package/dist/web-components.d.ts
CHANGED
|
@@ -2131,6 +2131,199 @@ export declare const lineHeightHero800: CSSDesignToken<string>;
|
|
|
2131
2131
|
|
|
2132
2132
|
export declare const lineHeightHero900: CSSDesignToken<string>;
|
|
2133
2133
|
|
|
2134
|
+
/**
|
|
2135
|
+
* The Menu class represents a menu component.
|
|
2136
|
+
* @public
|
|
2137
|
+
*/
|
|
2138
|
+
export declare class Menu extends FASTElement {
|
|
2139
|
+
/**
|
|
2140
|
+
* Determines if the menu should open on hover.
|
|
2141
|
+
* @public
|
|
2142
|
+
*/
|
|
2143
|
+
openOnHover?: boolean;
|
|
2144
|
+
/**
|
|
2145
|
+
* Determines if the menu should open on right click.
|
|
2146
|
+
* @public
|
|
2147
|
+
*/
|
|
2148
|
+
openOnContext?: boolean;
|
|
2149
|
+
/**
|
|
2150
|
+
* Determines if the menu should close on scroll.
|
|
2151
|
+
* @public
|
|
2152
|
+
*/
|
|
2153
|
+
closeOnScroll?: boolean;
|
|
2154
|
+
/**
|
|
2155
|
+
* Determines if the menu open state should persis on click of menu item
|
|
2156
|
+
* @public
|
|
2157
|
+
*/
|
|
2158
|
+
persistOnItemClick?: boolean;
|
|
2159
|
+
/**
|
|
2160
|
+
* Defines whether the menu is open or not.
|
|
2161
|
+
* @public
|
|
2162
|
+
*/
|
|
2163
|
+
open: boolean;
|
|
2164
|
+
/**
|
|
2165
|
+
* Holds the slotted menu list.
|
|
2166
|
+
* @public
|
|
2167
|
+
*/
|
|
2168
|
+
slottedMenuList: MenuList[];
|
|
2169
|
+
/**
|
|
2170
|
+
* Holds the slotted triggers.
|
|
2171
|
+
* @public
|
|
2172
|
+
*/
|
|
2173
|
+
slottedTriggers: HTMLElement[];
|
|
2174
|
+
/**
|
|
2175
|
+
* The positioning container of the menu.
|
|
2176
|
+
* @internal
|
|
2177
|
+
*/
|
|
2178
|
+
positioningContainer?: HTMLElement;
|
|
2179
|
+
/**
|
|
2180
|
+
* The trigger element of the menu.
|
|
2181
|
+
* @private
|
|
2182
|
+
*/
|
|
2183
|
+
private _trigger?;
|
|
2184
|
+
/**
|
|
2185
|
+
* The menu list element of the menu.
|
|
2186
|
+
* @private
|
|
2187
|
+
*/
|
|
2188
|
+
private _menuList?;
|
|
2189
|
+
/**
|
|
2190
|
+
* Holds a reference to a function that is used to cleanup resources.
|
|
2191
|
+
* @public
|
|
2192
|
+
*/
|
|
2193
|
+
cleanup?: () => void;
|
|
2194
|
+
/**
|
|
2195
|
+
* Called when the element is connected to the DOM.
|
|
2196
|
+
* Sets up the component.
|
|
2197
|
+
* @public
|
|
2198
|
+
*/
|
|
2199
|
+
connectedCallback(): void;
|
|
2200
|
+
/**
|
|
2201
|
+
* Called when the element is disconnected from the DOM.
|
|
2202
|
+
* Removes event listeners.
|
|
2203
|
+
* @public
|
|
2204
|
+
*/
|
|
2205
|
+
disconnectedCallback(): void;
|
|
2206
|
+
/**
|
|
2207
|
+
* Sets the component.
|
|
2208
|
+
* Sets the trigger and menu list elements and adds event listeners.
|
|
2209
|
+
* @public
|
|
2210
|
+
*/
|
|
2211
|
+
setComponent(): void;
|
|
2212
|
+
/**
|
|
2213
|
+
* Toggles the open state of the menu.
|
|
2214
|
+
* @public
|
|
2215
|
+
*/
|
|
2216
|
+
toggleMenu: () => void;
|
|
2217
|
+
/**
|
|
2218
|
+
* Closes the menu.
|
|
2219
|
+
* @public
|
|
2220
|
+
*/
|
|
2221
|
+
closeMenu: () => void;
|
|
2222
|
+
/**
|
|
2223
|
+
* Opens the menu.
|
|
2224
|
+
* @public
|
|
2225
|
+
*/
|
|
2226
|
+
openMenu: (e?: Event) => void;
|
|
2227
|
+
/**
|
|
2228
|
+
* Focuses on the menu list.
|
|
2229
|
+
* @public
|
|
2230
|
+
*/
|
|
2231
|
+
focusMenuList(): void;
|
|
2232
|
+
/**
|
|
2233
|
+
* Focuses on the menu trigger.
|
|
2234
|
+
* @public
|
|
2235
|
+
*/
|
|
2236
|
+
focusTrigger(): void;
|
|
2237
|
+
/**
|
|
2238
|
+
* Called whenever the open state changes.
|
|
2239
|
+
* Updates the 'aria-expanded' attribute and sets the positioning of the menu.
|
|
2240
|
+
* Sets menu list position
|
|
2241
|
+
* emits openChanged event
|
|
2242
|
+
* @public
|
|
2243
|
+
* @param {boolean} oldValue - The previous value of 'open'.
|
|
2244
|
+
* @param {boolean} newValue - The new value of 'open'.
|
|
2245
|
+
*/
|
|
2246
|
+
openChanged(oldValue: boolean, newValue: boolean): void;
|
|
2247
|
+
/**
|
|
2248
|
+
* Called whenever the 'openOnHover' property changes.
|
|
2249
|
+
* Adds or removes a 'mouseover' event listener to the trigger based on the new value.
|
|
2250
|
+
* @public
|
|
2251
|
+
* @param {boolean} oldValue - The previous value of 'openOnHover'.
|
|
2252
|
+
* @param {boolean} newValue - The new value of 'openOnHover'.
|
|
2253
|
+
*/
|
|
2254
|
+
openOnHoverChanged(oldValue: boolean, newValue: boolean): void;
|
|
2255
|
+
/**
|
|
2256
|
+
* Called whenever the 'persistOnItemClick' property changes.
|
|
2257
|
+
* Adds or removes a 'click' event listener to the menu list based on the new value.
|
|
2258
|
+
* @public
|
|
2259
|
+
* @param {boolean} oldValue - The previous value of 'persistOnItemClick'.
|
|
2260
|
+
* @param {boolean} newValue - The new value of 'persistOnItemClick'.
|
|
2261
|
+
*/
|
|
2262
|
+
persistOnItemClickChanged(oldValue: boolean, newValue: boolean): void;
|
|
2263
|
+
/**
|
|
2264
|
+
* Called whenever the 'openOnContext' property changes.
|
|
2265
|
+
* Adds or removes a 'contextmenu' event listener to the trigger based on the new value.
|
|
2266
|
+
* @public
|
|
2267
|
+
* @param {boolean} oldValue - The previous value of 'openOnContext'.
|
|
2268
|
+
* @param {boolean} newValue - The new value of 'openOnContext'.
|
|
2269
|
+
*/
|
|
2270
|
+
openOnContextChanged(oldValue: boolean, newValue: boolean): void;
|
|
2271
|
+
/**
|
|
2272
|
+
* Called whenever the 'closeOnScroll' property changes.
|
|
2273
|
+
* Adds or removes a 'closeOnScroll' event listener to the trigger based on the new value.
|
|
2274
|
+
* @public
|
|
2275
|
+
* @param {boolean} oldValue - The previous value of 'closeOnScroll'.
|
|
2276
|
+
* @param {boolean} newValue - The new value of 'closeOnScroll'.
|
|
2277
|
+
*/
|
|
2278
|
+
closeOnScrollChanged(oldValue: boolean, newValue: boolean): void;
|
|
2279
|
+
/**
|
|
2280
|
+
* The task to set the positioning of the menu.
|
|
2281
|
+
* @protected
|
|
2282
|
+
*/
|
|
2283
|
+
protected setPositioningTask: () => void;
|
|
2284
|
+
/**
|
|
2285
|
+
* Sets the positioning of the menu.
|
|
2286
|
+
* @protected
|
|
2287
|
+
*/
|
|
2288
|
+
protected setPositioning(): void;
|
|
2289
|
+
/**
|
|
2290
|
+
* Adds event listeners.
|
|
2291
|
+
* Adds click and keydown event listeners to the trigger and a click event listener to the document.
|
|
2292
|
+
* If 'openOnHover' is true, adds a 'mouseover' event listener to the trigger.
|
|
2293
|
+
* @public
|
|
2294
|
+
*/
|
|
2295
|
+
private addListeners;
|
|
2296
|
+
/**
|
|
2297
|
+
* Removes event listeners.
|
|
2298
|
+
* Removes click and keydown event listeners from the trigger and a click event listener from the document.
|
|
2299
|
+
* Also removes 'mouseover' event listeners from the trigger.
|
|
2300
|
+
* @private
|
|
2301
|
+
*/
|
|
2302
|
+
private removeListeners;
|
|
2303
|
+
/**
|
|
2304
|
+
* Handles keyboard interaction for the menu.
|
|
2305
|
+
* Closes the menu and focuses on the trigger when the Escape key is pressed.
|
|
2306
|
+
* Closes the menu when the Tab key is pressed.
|
|
2307
|
+
* @public
|
|
2308
|
+
* @param {KeyboardEvent} e - the keyboard event
|
|
2309
|
+
*/
|
|
2310
|
+
handleMenuKeydown(e: KeyboardEvent): boolean | void;
|
|
2311
|
+
/**
|
|
2312
|
+
* Handles keyboard interaction for the trigger.
|
|
2313
|
+
* Toggles the menu when the Space or Enter key is pressed.
|
|
2314
|
+
* If the menu is open, focuses on the menu list.
|
|
2315
|
+
* @public
|
|
2316
|
+
* @param {KeyboardEvent} e - the keyboard event
|
|
2317
|
+
*/
|
|
2318
|
+
handleTriggerKeydown: (e: KeyboardEvent) => boolean | void;
|
|
2319
|
+
/**
|
|
2320
|
+
* Handles document click events to close the menu when a click occurs outside of the menu or the trigger.
|
|
2321
|
+
* @private
|
|
2322
|
+
* @param {Event} e - The event triggered on document click.
|
|
2323
|
+
*/
|
|
2324
|
+
private handleDocumentClick;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2134
2327
|
/**
|
|
2135
2328
|
* The base class used for constructing a fluent-menu-button custom element
|
|
2136
2329
|
* @public
|
|
@@ -2204,6 +2397,15 @@ export declare type MenuButtonSize = ValuesOf<typeof MenuButtonSize>;
|
|
|
2204
2397
|
*/
|
|
2205
2398
|
export declare const MenuButtonTemplate: ElementViewTemplate<MenuButton>;
|
|
2206
2399
|
|
|
2400
|
+
/**
|
|
2401
|
+
* The Fluent Menu Element.
|
|
2402
|
+
*
|
|
2403
|
+
* @public
|
|
2404
|
+
* @remarks
|
|
2405
|
+
* HTML Element: <fluent-menu>
|
|
2406
|
+
*/
|
|
2407
|
+
export declare const MenuDefinition: FASTElementDefinition<typeof Menu>;
|
|
2408
|
+
|
|
2207
2409
|
/**
|
|
2208
2410
|
* The base class used for constructing a fluent-menu-item custom element
|
|
2209
2411
|
* @public
|
|
@@ -2260,6 +2462,13 @@ export declare const MenuListStyles: ElementStyles;
|
|
|
2260
2462
|
|
|
2261
2463
|
export declare const MenuListTemplate: ElementViewTemplate<MenuList>;
|
|
2262
2464
|
|
|
2465
|
+
/** Menu styles
|
|
2466
|
+
* @public
|
|
2467
|
+
*/
|
|
2468
|
+
export declare const MenuStyles: ElementStyles;
|
|
2469
|
+
|
|
2470
|
+
export declare const MenuTemplate: ElementViewTemplate<Menu>;
|
|
2471
|
+
|
|
2263
2472
|
/**
|
|
2264
2473
|
* The base class used for constructing a fluent-progress-bar custom element
|
|
2265
2474
|
* @public
|