@fluentui/web-components 3.0.0-beta.4 → 3.0.0-beta.6

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/dist/dts/dialog/define.d.ts +1 -0
  3. package/dist/dts/dialog/dialog.d.ts +192 -0
  4. package/dist/dts/dialog/dialog.definition.d.ts +9 -0
  5. package/dist/dts/dialog/dialog.options.d.ts +11 -0
  6. package/dist/dts/dialog/dialog.styles.d.ts +4 -0
  7. package/dist/dts/dialog/dialog.template.d.ts +7 -0
  8. package/dist/dts/dialog/index.d.ts +4 -0
  9. package/dist/dts/index.d.ts +1 -0
  10. package/dist/esm/dialog/define.js +4 -0
  11. package/dist/esm/dialog/define.js.map +1 -0
  12. package/dist/esm/dialog/dialog.definition.js +17 -0
  13. package/dist/esm/dialog/dialog.definition.js.map +1 -0
  14. package/dist/esm/dialog/dialog.js +370 -0
  15. package/dist/esm/dialog/dialog.js.map +1 -0
  16. package/dist/esm/dialog/dialog.options.js +10 -0
  17. package/dist/esm/dialog/dialog.options.js.map +1 -0
  18. package/dist/esm/dialog/dialog.styles.js +102 -0
  19. package/dist/esm/dialog/dialog.styles.js.map +1 -0
  20. package/dist/esm/dialog/dialog.template.js +61 -0
  21. package/dist/esm/dialog/dialog.template.js.map +1 -0
  22. package/dist/esm/dialog/index.js +5 -0
  23. package/dist/esm/dialog/index.js.map +1 -0
  24. package/dist/esm/index.js +1 -0
  25. package/dist/esm/index.js.map +1 -1
  26. package/dist/fluent-web-components.api.json +813 -0
  27. package/dist/storybook/{677.939f187f.iframe.bundle.js → 350.e4be85c2.iframe.bundle.js} +3 -3
  28. package/dist/storybook/{677.939f187f.iframe.bundle.js.LICENSE.txt → 350.e4be85c2.iframe.bundle.js.LICENSE.txt} +5 -0
  29. package/dist/storybook/{677.939f187f.iframe.bundle.js.map → 350.e4be85c2.iframe.bundle.js.map} +1 -1
  30. package/dist/storybook/iframe.html +1 -1
  31. package/dist/storybook/main.c651bad5.iframe.bundle.js +2 -0
  32. package/dist/storybook/project.json +1 -1
  33. package/dist/web-components.d.ts +222 -0
  34. package/dist/web-components.js +1973 -1592
  35. package/dist/web-components.min.js +103 -95
  36. package/docs/api-report.md +33 -0
  37. package/package.json +7 -1
  38. package/dist/storybook/main.c98b42a5.iframe.bundle.js +0 -2
  39. /package/dist/storybook/{main.c98b42a5.iframe.bundle.js.LICENSE.txt → main.c651bad5.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- {"generatedAt":1697170546268,"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"}}}
1
+ {"generatedAt":1698293687724,"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"}}}
@@ -1784,6 +1784,228 @@ export declare const curveEasyEaseMax: CSSDesignToken<string>;
1784
1784
 
1785
1785
  export declare const curveLinear: CSSDesignToken<string>;
1786
1786
 
1787
+ /**
1788
+ * Dialog component that extends the FASTElement class.
1789
+ *
1790
+ * @public
1791
+ * @extends FASTElement
1792
+ */
1793
+ export declare class Dialog extends FASTElement {
1794
+ /**
1795
+ * @private
1796
+ * Indicates whether focus is being trapped within the dialog
1797
+ */
1798
+ private isTrappingFocus;
1799
+ /**
1800
+ * @public
1801
+ * Lifecycle method called when the element is connected to the DOM
1802
+ */
1803
+ connectedCallback(): void;
1804
+ /**
1805
+ * @public
1806
+ * Lifecycle method called when the element is disconnected from the DOM
1807
+ */
1808
+ disconnectedCallback(): void;
1809
+ /**
1810
+ * @public
1811
+ * The dialog element
1812
+ */
1813
+ dialog: HTMLDialogElement;
1814
+ /**
1815
+ * @public
1816
+ * The title action elements
1817
+ */
1818
+ titleAction: HTMLElement[];
1819
+ /**
1820
+ * @public
1821
+ * The default title action button
1822
+ */
1823
+ defaultTitleAction?: Button;
1824
+ /**
1825
+ * @public
1826
+ * The ID of the element that describes the dialog
1827
+ */
1828
+ ariaDescribedby?: string;
1829
+ /**
1830
+ * @public
1831
+ * The ID of the element that labels the dialog
1832
+ */
1833
+ ariaLabelledby?: string;
1834
+ /**
1835
+ * @public
1836
+ * The type of the dialog modal
1837
+ */
1838
+ modalType: DialogModalType;
1839
+ /**
1840
+ * @public
1841
+ * Indicates whether the dialog is open
1842
+ */
1843
+ open: boolean;
1844
+ /**
1845
+ * @public
1846
+ * Indicates whether the dialog has a title action
1847
+ */
1848
+ noTitleAction: boolean;
1849
+ /**
1850
+ * @private
1851
+ * Indicates whether focus should be trapped within the dialog
1852
+ */
1853
+ private trapFocus;
1854
+ /**
1855
+ * @public
1856
+ * Method called when the 'open' attribute changes
1857
+ */
1858
+ openChanged(oldValue: boolean, newValue: boolean): void;
1859
+ /**
1860
+ * @public
1861
+ * Method called when the 'modalType' attribute changes
1862
+ */
1863
+ modalTypeChanged(oldValue: DialogModalType, newValue: DialogModalType): void;
1864
+ /**
1865
+ * @public
1866
+ * Method to set the component's state based on its attributes
1867
+ */
1868
+ setComponent(): void;
1869
+ /**
1870
+ * @public
1871
+ * Method to emit an event when the dialog's open state changes
1872
+ * @param dismissed - Indicates whether the dialog was dismissed
1873
+ */
1874
+ onOpenChangeEvent: (dismissed?: boolean) => void;
1875
+ /**
1876
+ * @public
1877
+ * Method to show the dialog
1878
+ */
1879
+ show(): void;
1880
+ /**
1881
+ * @public
1882
+ * Method to hide the dialog
1883
+ * @param dismissed - Indicates whether the dialog was dismissed
1884
+ */
1885
+ hide(dismissed?: boolean): void;
1886
+ /**
1887
+ * @public
1888
+ * Method to dismiss the dialog
1889
+ */
1890
+ dismiss(): void;
1891
+ /**
1892
+ * @public
1893
+ * Handles click events on the dialog
1894
+ * @param event - The click event
1895
+ * @returns boolean
1896
+ */
1897
+ handleClick(event: Event): boolean;
1898
+ /**
1899
+ * @public
1900
+ * Handles keydown events on the dialog
1901
+ * @param e - The keydown event
1902
+ * @returns boolean | void
1903
+ */
1904
+ handleKeydown: (e: KeyboardEvent) => boolean | void;
1905
+ /**
1906
+ * @private
1907
+ * Handles keydown events on the document
1908
+ * @param e - The keydown event
1909
+ */
1910
+ private handleDocumentKeydown;
1911
+ /**
1912
+ * @private
1913
+ * Handles tab keydown events
1914
+ * @param e - The keydown event
1915
+ */
1916
+ private handleTabKeyDown;
1917
+ /**
1918
+ * @private
1919
+ * Gets the bounds of the tab queue
1920
+ * @returns (HTMLElement | SVGElement)[]
1921
+ */
1922
+ private getTabQueueBounds;
1923
+ /**
1924
+ * @private
1925
+ * Focuses the first element in the tab queue
1926
+ */
1927
+ private focusFirstElement;
1928
+ /**
1929
+ * @private
1930
+ * Determines if focus should be forced
1931
+ * @param currentFocusElement - The currently focused element
1932
+ * @returns boolean
1933
+ */
1934
+ private shouldForceFocus;
1935
+ /**
1936
+ * @private
1937
+ * Determines if focus should be trapped
1938
+ * @returns boolean
1939
+ */
1940
+ private shouldTrapFocus;
1941
+ /**
1942
+ * @private
1943
+ * Handles focus events on the document
1944
+ * @param e - The focus event
1945
+ */
1946
+ private handleDocumentFocus;
1947
+ /**
1948
+ * @private
1949
+ * Updates the state of focus trapping
1950
+ * @param shouldTrapFocusOverride - Optional override for whether focus should be trapped
1951
+ */
1952
+ private updateTrapFocus;
1953
+ /**
1954
+ * @private
1955
+ * Reduces the list of tabbable items
1956
+ * @param elements - The current list of elements
1957
+ * @param element - The element to consider adding to the list
1958
+ * @returns HTMLElement[]
1959
+ */
1960
+ private static reduceTabbableItems;
1961
+ /**
1962
+ * @private
1963
+ * Determines if an element is a focusable FASTElement
1964
+ * @param element - The element to check
1965
+ * @returns boolean
1966
+ */
1967
+ private static isFocusableFastElement;
1968
+ /**
1969
+ * @private
1970
+ * Determines if an element has a tabbable shadow
1971
+ * @param element - The element to check
1972
+ * @returns boolean
1973
+ */
1974
+ private static hasTabbableShadow;
1975
+ }
1976
+
1977
+ /**
1978
+ * The Fluent Dialog Element
1979
+ *
1980
+ * @public
1981
+ * @remarks
1982
+ * HTML Element: \<fluent-dialog\>
1983
+ */
1984
+ export declare const DialogDefinition: FASTElementDefinition<typeof Dialog>;
1985
+
1986
+ /**
1987
+ * Dialog modal type
1988
+ * @public
1989
+ */
1990
+ declare const DialogModalType: {
1991
+ readonly modal: "modal";
1992
+ readonly nonModal: "non-modal";
1993
+ readonly alert: "alert";
1994
+ };
1995
+
1996
+ declare type DialogModalType = ValuesOf<typeof DialogModalType>;
1997
+
1998
+ /** Dialog styles
1999
+ * @public
2000
+ */
2001
+ export declare const DialogStyles: ElementStyles;
2002
+
2003
+ /**
2004
+ * Template for the Dialog component
2005
+ * @public
2006
+ */
2007
+ export declare const DialogTemplate: ElementViewTemplate<Dialog>;
2008
+
1787
2009
  /**
1788
2010
  * @class Divider component
1789
2011
  *