@uoguelph/web-components 0.0.7

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 (76) hide show
  1. package/README.md +4 -0
  2. package/dist/cjs/index-160752dd.js +1825 -0
  3. package/dist/cjs/index.cjs.js +2 -0
  4. package/dist/cjs/loader.cjs.js +22 -0
  5. package/dist/cjs/uofg-footer_3.cjs.entry.js +528 -0
  6. package/dist/cjs/uofg-web-components.cjs.js +26 -0
  7. package/dist/collection/collection-manifest.json +14 -0
  8. package/dist/collection/components/uofg-footer/footer-links.js +5 -0
  9. package/dist/collection/components/uofg-footer/improve-life.svg +4 -0
  10. package/dist/collection/components/uofg-footer/social-links.js +5 -0
  11. package/dist/collection/components/uofg-footer/uofg-footer.css +173 -0
  12. package/dist/collection/components/uofg-footer/uofg-footer.js +23 -0
  13. package/dist/collection/components/uofg-header/decoration.svg +1 -0
  14. package/dist/collection/components/uofg-header/global-links.js +2 -0
  15. package/dist/collection/components/uofg-header/hello-you.js +4 -0
  16. package/dist/collection/components/uofg-header/logo-full-size.svg +1 -0
  17. package/dist/collection/components/uofg-header/logo-reduced-size.svg +1 -0
  18. package/dist/collection/components/uofg-header/page-specific.js +15 -0
  19. package/dist/collection/components/uofg-header/search.js +4 -0
  20. package/dist/collection/components/uofg-header/single-sign-on.js +2 -0
  21. package/dist/collection/components/uofg-header/uofg-header.css +548 -0
  22. package/dist/collection/components/uofg-header/uofg-header.js +131 -0
  23. package/dist/collection/components/uofg-menu/uofg-menu.js +440 -0
  24. package/dist/collection/index.js +1 -0
  25. package/dist/collection/utils/feature-check.js +2 -0
  26. package/dist/collection/utils/font-awesome-icon.js +7 -0
  27. package/dist/components/index.d.ts +36 -0
  28. package/dist/components/index.js +4 -0
  29. package/dist/components/index2.js +82 -0
  30. package/dist/components/uofg-footer.d.ts +11 -0
  31. package/dist/components/uofg-footer.js +100 -0
  32. package/dist/components/uofg-header.d.ts +11 -0
  33. package/dist/components/uofg-header.js +156 -0
  34. package/dist/components/uofg-menu.d.ts +11 -0
  35. package/dist/components/uofg-menu.js +6 -0
  36. package/dist/components/uofg-menu2.js +264 -0
  37. package/dist/esm/index-48bb3110.js +1796 -0
  38. package/dist/esm/index.js +1 -0
  39. package/dist/esm/loader.js +18 -0
  40. package/dist/esm/polyfills/core-js.js +11 -0
  41. package/dist/esm/polyfills/css-shim.js +1 -0
  42. package/dist/esm/polyfills/dom.js +79 -0
  43. package/dist/esm/polyfills/es5-html-element.js +1 -0
  44. package/dist/esm/polyfills/index.js +34 -0
  45. package/dist/esm/polyfills/system.js +6 -0
  46. package/dist/esm/uofg-footer_3.entry.js +522 -0
  47. package/dist/esm/uofg-web-components.js +21 -0
  48. package/dist/index.cjs.js +1 -0
  49. package/dist/index.js +1 -0
  50. package/dist/loader/cdn.js +3 -0
  51. package/dist/loader/index.cjs.js +3 -0
  52. package/dist/loader/index.d.ts +21 -0
  53. package/dist/loader/index.es2017.js +3 -0
  54. package/dist/loader/index.js +4 -0
  55. package/dist/loader/package.json +11 -0
  56. package/dist/types/components/uofg-footer/footer-links.d.ts +2 -0
  57. package/dist/types/components/uofg-footer/social-links.d.ts +2 -0
  58. package/dist/types/components/uofg-footer/uofg-footer.d.ts +3 -0
  59. package/dist/types/components/uofg-header/global-links.d.ts +2 -0
  60. package/dist/types/components/uofg-header/hello-you.d.ts +6 -0
  61. package/dist/types/components/uofg-header/page-specific.d.ts +17 -0
  62. package/dist/types/components/uofg-header/search.d.ts +2 -0
  63. package/dist/types/components/uofg-header/single-sign-on.d.ts +2 -0
  64. package/dist/types/components/uofg-header/uofg-header.d.ts +19 -0
  65. package/dist/types/components/uofg-menu/uofg-menu.d.ts +67 -0
  66. package/dist/types/components.d.ts +132 -0
  67. package/dist/types/index.d.ts +1 -0
  68. package/dist/types/stencil-public-runtime.d.ts +1640 -0
  69. package/dist/types/utils/feature-check.d.ts +2 -0
  70. package/dist/types/utils/font-awesome-icon.d.ts +5 -0
  71. package/dist/uofg-web-components/index.esm.js +0 -0
  72. package/dist/uofg-web-components/p-24bd712c.entry.js +1 -0
  73. package/dist/uofg-web-components/p-b6a9700a.js +2 -0
  74. package/dist/uofg-web-components/uofg-web-components.css +1 -0
  75. package/dist/uofg-web-components/uofg-web-components.esm.js +1 -0
  76. package/package.json +51 -0
@@ -0,0 +1,4 @@
1
+
2
+ (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
+ export * from '../esm/polyfills/index.js';
4
+ export * from '../esm/loader.js';
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "uofg-web-components-loader",
3
+ "private": true,
4
+ "typings": "./index.d.ts",
5
+ "module": "./index.js",
6
+ "main": "./index.cjs.js",
7
+ "jsnext:main": "./index.es2017.js",
8
+ "es2015": "./index.es2017.js",
9
+ "es2017": "./index.es2017.js",
10
+ "unpkg": "./cdn.js"
11
+ }
@@ -0,0 +1,2 @@
1
+ import { FunctionalComponent } from '../../stencil-public-runtime';
2
+ export declare const FooterLinks: FunctionalComponent;
@@ -0,0 +1,2 @@
1
+ import { FunctionalComponent } from '../../stencil-public-runtime';
2
+ export declare const SocialLinks: FunctionalComponent;
@@ -0,0 +1,3 @@
1
+ export declare class UofgFooter {
2
+ render(): any;
3
+ }
@@ -0,0 +1,2 @@
1
+ import { type FunctionalComponent } from '../../stencil-public-runtime';
2
+ export declare const GlobalLinks: FunctionalComponent;
@@ -0,0 +1,6 @@
1
+ import { FunctionalComponent } from '../../stencil-public-runtime';
2
+ type HelloYouProps = {
3
+ autoCollapse: boolean;
4
+ };
5
+ export declare const HelloYou: FunctionalComponent<HelloYouProps>;
6
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type FunctionalComponent } from '../../stencil-public-runtime';
2
+ export interface PageSpecificLink {
3
+ text: string;
4
+ href: string;
5
+ attributes?: Record<string, string>;
6
+ }
7
+ export interface PageSpecificSubMenu {
8
+ title: string;
9
+ links: PageSpecificLink[];
10
+ }
11
+ export type PageSpecificContent = Array<PageSpecificLink | PageSpecificSubMenu | null | undefined>;
12
+ type PageSpecificProps = {
13
+ content: PageSpecificContent;
14
+ autoCollapseMenus?: boolean;
15
+ };
16
+ export declare const PageSpecific: FunctionalComponent<PageSpecificProps>;
17
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FunctionalComponent } from '../../stencil-public-runtime';
2
+ export declare const SearchBar: FunctionalComponent;
@@ -0,0 +1,2 @@
1
+ import { type FunctionalComponent } from '../../stencil-public-runtime';
2
+ export declare const SingleSignOn: FunctionalComponent;
@@ -0,0 +1,19 @@
1
+ import { type PageSpecificContent } from './page-specific';
2
+ export declare class UofgHeader {
3
+ /**
4
+ * The title of the pages that the header is being used on. For example, for the Convocation pages, this would be set to "Convocation".
5
+ */
6
+ pageTitle: string;
7
+ /**
8
+ * The URL to the home/landing page for the pages the header is being used on. For example, for the Convocation pages, this would be set to "https://www.uoguelph.ca/convocation/".
9
+ */
10
+ pageUrl: string;
11
+ el: HTMLUofgHeaderElement;
12
+ isFullSize: boolean;
13
+ pageSpecificContent: PageSpecificContent;
14
+ private observer;
15
+ connectedCallback(): void;
16
+ updateFullSize(): void;
17
+ private updatePageSpecificContent;
18
+ render(): any;
19
+ }
@@ -0,0 +1,67 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class UofgMenu {
3
+ el: HTMLUofgMenuElement;
4
+ isExpanded: boolean;
5
+ /**
6
+ * Controls whether the menu should automatically collapse when the focused element in the page is not contained within the menu (e.g. it's button or content). This is useful for when you want the menu to collapse whenever a user interacts with any other part of the page.
7
+ */
8
+ autoCollapse: boolean;
9
+ /**
10
+ * Dispatched whenever the menu is expanded whether by user interaction or or programmatically (e.g. expand()).
11
+ */
12
+ expanded: EventEmitter<void>;
13
+ /**
14
+ * Dispatched whenever the menu is collapsed whether by user interaction or programmatically (e.g. collapse()).
15
+ */
16
+ collapsed: EventEmitter<void>;
17
+ /**
18
+ * Dispatched whenever the menu is expanding or collapsing and the animation has started. This event is not dispatched if the animation is disabled (e.g. due to reduced motion, css variable set to none, or lack of Web Animations API support).
19
+ */
20
+ animationStarted: EventEmitter<boolean>;
21
+ /**
22
+ * Dispatched whenever the menu is expanding or collapsing and the animation has ended. This event is not dispatched if the animation is disabled (e.g. due to reduced motion, css variable set to none, or lack of Web Animations API support).
23
+ */
24
+ animationEnded: EventEmitter<boolean>;
25
+ private computedStyle;
26
+ private button;
27
+ private content;
28
+ private contentComputedStyle;
29
+ connectedCallback(): void;
30
+ private handleChildListChange;
31
+ private updateButton;
32
+ private updateContent;
33
+ private handleButtonClick;
34
+ private handleFocusout;
35
+ handleIsExpandedChange(newValue: boolean): void;
36
+ private getAnimationType;
37
+ private getAnimationDuration;
38
+ private getAnimationEasing;
39
+ private fadeAnimation;
40
+ private slideAnimation;
41
+ render(): any;
42
+ /**
43
+ * Get the current expanded state of the menu.
44
+ * @returns A promise which will resolve to the current expanded state.
45
+ */
46
+ getExpanded(): Promise<boolean>;
47
+ /**
48
+ * Set the expanded state of the menu.
49
+ * @param value The new expanded state.
50
+ */
51
+ setExpanded(value: boolean): Promise<void>;
52
+ /**
53
+ * Toggle the expanded state of the menu.
54
+ * @returns A promise which will resolve to the new expanded state.
55
+ */
56
+ toggle(): Promise<boolean>;
57
+ /**
58
+ * Collapse the menu. This is the same as setting the expanded state to false.
59
+ * @returns empty Promise.
60
+ */
61
+ collapse(): Promise<void>;
62
+ /**
63
+ * Expand the menu. This is the same as setting the expanded state to true.
64
+ * @returns empty Promise.
65
+ */
66
+ expand(): Promise<void>;
67
+ }
@@ -0,0 +1,132 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ export namespace Components {
9
+ interface UofgFooter {
10
+ }
11
+ interface UofgHeader {
12
+ /**
13
+ * The title of the pages that the header is being used on. For example, for the Convocation pages, this would be set to "Convocation".
14
+ */
15
+ "pageTitle": string;
16
+ /**
17
+ * The URL to the home/landing page for the pages the header is being used on. For example, for the Convocation pages, this would be set to "https://www.uoguelph.ca/convocation/".
18
+ */
19
+ "pageUrl": string;
20
+ }
21
+ interface UofgMenu {
22
+ /**
23
+ * Controls whether the menu should automatically collapse when the focused element in the page is not contained within the menu (e.g. it's button or content). This is useful for when you want the menu to collapse whenever a user interacts with any other part of the page.
24
+ */
25
+ "autoCollapse": boolean;
26
+ /**
27
+ * Collapse the menu. This is the same as setting the expanded state to false.
28
+ * @returns empty Promise.
29
+ */
30
+ "collapse": () => Promise<void>;
31
+ /**
32
+ * Expand the menu. This is the same as setting the expanded state to true.
33
+ * @returns empty Promise.
34
+ */
35
+ "expand": () => Promise<void>;
36
+ /**
37
+ * Get the current expanded state of the menu.
38
+ * @returns A promise which will resolve to the current expanded state.
39
+ */
40
+ "getExpanded": () => Promise<boolean>;
41
+ /**
42
+ * Set the expanded state of the menu.
43
+ * @param value The new expanded state.
44
+ */
45
+ "setExpanded": (value: boolean) => Promise<void>;
46
+ /**
47
+ * Toggle the expanded state of the menu.
48
+ * @returns A promise which will resolve to the new expanded state.
49
+ */
50
+ "toggle": () => Promise<boolean>;
51
+ }
52
+ }
53
+ export interface UofgMenuCustomEvent<T> extends CustomEvent<T> {
54
+ detail: T;
55
+ target: HTMLUofgMenuElement;
56
+ }
57
+ declare global {
58
+ interface HTMLUofgFooterElement extends Components.UofgFooter, HTMLStencilElement {
59
+ }
60
+ var HTMLUofgFooterElement: {
61
+ prototype: HTMLUofgFooterElement;
62
+ new (): HTMLUofgFooterElement;
63
+ };
64
+ interface HTMLUofgHeaderElement extends Components.UofgHeader, HTMLStencilElement {
65
+ }
66
+ var HTMLUofgHeaderElement: {
67
+ prototype: HTMLUofgHeaderElement;
68
+ new (): HTMLUofgHeaderElement;
69
+ };
70
+ interface HTMLUofgMenuElement extends Components.UofgMenu, HTMLStencilElement {
71
+ }
72
+ var HTMLUofgMenuElement: {
73
+ prototype: HTMLUofgMenuElement;
74
+ new (): HTMLUofgMenuElement;
75
+ };
76
+ interface HTMLElementTagNameMap {
77
+ "uofg-footer": HTMLUofgFooterElement;
78
+ "uofg-header": HTMLUofgHeaderElement;
79
+ "uofg-menu": HTMLUofgMenuElement;
80
+ }
81
+ }
82
+ declare namespace LocalJSX {
83
+ interface UofgFooter {
84
+ }
85
+ interface UofgHeader {
86
+ /**
87
+ * The title of the pages that the header is being used on. For example, for the Convocation pages, this would be set to "Convocation".
88
+ */
89
+ "pageTitle"?: string;
90
+ /**
91
+ * The URL to the home/landing page for the pages the header is being used on. For example, for the Convocation pages, this would be set to "https://www.uoguelph.ca/convocation/".
92
+ */
93
+ "pageUrl"?: string;
94
+ }
95
+ interface UofgMenu {
96
+ /**
97
+ * Controls whether the menu should automatically collapse when the focused element in the page is not contained within the menu (e.g. it's button or content). This is useful for when you want the menu to collapse whenever a user interacts with any other part of the page.
98
+ */
99
+ "autoCollapse"?: boolean;
100
+ /**
101
+ * Dispatched whenever the menu is expanding or collapsing and the animation has ended. This event is not dispatched if the animation is disabled (e.g. due to reduced motion, css variable set to none, or lack of Web Animations API support).
102
+ */
103
+ "onAnimationEnded"?: (event: UofgMenuCustomEvent<boolean>) => void;
104
+ /**
105
+ * Dispatched whenever the menu is expanding or collapsing and the animation has started. This event is not dispatched if the animation is disabled (e.g. due to reduced motion, css variable set to none, or lack of Web Animations API support).
106
+ */
107
+ "onAnimationStarted"?: (event: UofgMenuCustomEvent<boolean>) => void;
108
+ /**
109
+ * Dispatched whenever the menu is collapsed whether by user interaction or programmatically (e.g. collapse()).
110
+ */
111
+ "onCollapsed"?: (event: UofgMenuCustomEvent<void>) => void;
112
+ /**
113
+ * Dispatched whenever the menu is expanded whether by user interaction or or programmatically (e.g. expand()).
114
+ */
115
+ "onExpanded"?: (event: UofgMenuCustomEvent<void>) => void;
116
+ }
117
+ interface IntrinsicElements {
118
+ "uofg-footer": UofgFooter;
119
+ "uofg-header": UofgHeader;
120
+ "uofg-menu": UofgMenu;
121
+ }
122
+ }
123
+ export { LocalJSX as JSX };
124
+ declare module "@stencil/core" {
125
+ export namespace JSX {
126
+ interface IntrinsicElements {
127
+ "uofg-footer": LocalJSX.UofgFooter & JSXBase.HTMLAttributes<HTMLUofgFooterElement>;
128
+ "uofg-header": LocalJSX.UofgHeader & JSXBase.HTMLAttributes<HTMLUofgHeaderElement>;
129
+ "uofg-menu": LocalJSX.UofgMenu & JSXBase.HTMLAttributes<HTMLUofgMenuElement>;
130
+ }
131
+ }
132
+ }
@@ -0,0 +1 @@
1
+ export * from './components';