@genesislcap/foundation-ui 14.168.0 → 14.170.0-genxgit.1

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.
@@ -1,5 +1,6 @@
1
1
  import { NotificationStructure } from '@genesislcap/foundation-notifications';
2
2
  import { FoundationElement } from '@microsoft/fast-foundation';
3
+ import type { DialogType, DialogPosition } from './dialog.types';
3
4
  export declare const foundationDialogShadowOptions: ShadowRootInit;
4
5
  export declare const defaultDialogConfig: {};
5
6
  export declare abstract class DialogElement extends FoundationElement {
@@ -10,7 +11,8 @@ export declare abstract class DialogElement extends FoundationElement {
10
11
  mainElement: HTMLDialogElement;
11
12
  notification: NotificationStructure;
12
13
  notificationChanged(): void;
13
- position: 'centre' | 'left' | 'right';
14
+ type: DialogType;
15
+ position: DialogPosition;
14
16
  /**
15
17
  * Whether or not to show the close icon
16
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAO/D,eAAO,MAAM,6BAA6B,EAAE,cAG3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,IAAK,CAAC;AAEtC,8BAAsB,aAAc,SAAQ,iBAAiB;IAC3D;;;OAGG;IACH,WAAW,EAAG,iBAAiB,CAAC;IACpB,YAAY,EAAG,qBAAqB,CAAC;IACjD,mBAAmB;IAIb,QAAQ,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAY;IAEvD;;OAEG;IACsD,aAAa,EAAE,OAAO,CAAQ;IAEvF;;OAEG;IACS,cAAc,EAAE,MAAM,IAAI,CAAC;IAEvC;;OAEG;IACS,eAAe,EAAE,MAAM,IAAI,CAAC;IAExC,iBAAiB;IAYjB;;OAEG;IACH,IACI,IAAI,IAAI,OAAO,CA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AAa;IACvC,IAAI,IAAI,IAAI;CAIb;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAM3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.styles.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,sBAAsB,EAAE,aAsDpC,CAAC"}
1
+ {"version":3,"file":"dialog.styles.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,sBAAsB,EAAE,aAgFpC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type DialogType = 'default' | 'alert' | 'success';
2
+ export type DialogPosition = 'center' | 'left' | 'right';
3
+ //# sourceMappingURL=dialog.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.types.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC"}
@@ -14,7 +14,8 @@ export const defaultDialogConfig = {};
14
14
  export class DialogElement extends FoundationElement {
15
15
  constructor() {
16
16
  super(...arguments);
17
- this.position = 'centre';
17
+ this.type = 'default';
18
+ this.position = 'center';
18
19
  /**
19
20
  * Whether or not to show the close icon
20
21
  */
@@ -33,6 +34,9 @@ export class DialogElement extends FoundationElement {
33
34
  if (this.onCloseCallback)
34
35
  this.onCloseCallback();
35
36
  });
37
+ if (this.hasAttribute('open')) {
38
+ this.shadowRoot.querySelector('dialog').setAttribute('open', '');
39
+ }
36
40
  }
37
41
  /**
38
42
  * Determine if the dialog is showing or closed.
@@ -72,6 +76,9 @@ export class DialogElement extends FoundationElement {
72
76
  __decorate([
73
77
  observable
74
78
  ], DialogElement.prototype, "notification", void 0);
79
+ __decorate([
80
+ attr({ attribute: 'type' })
81
+ ], DialogElement.prototype, "type", void 0);
75
82
  __decorate([
76
83
  attr
77
84
  ], DialogElement.prototype, "position", void 0);
@@ -1,5 +1,31 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  export const foundationDialogStyles = css `
3
+ dialog[type='error'],
4
+ dialog[type='success'] {
5
+ padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px)
6
+ calc(var(--design-unit) * 2px) calc(var(--design-unit) * 6px);
7
+ }
8
+
9
+ dialog[type='error']::before,
10
+ dialog[type='success']::before {
11
+ content: '';
12
+ position: absolute;
13
+ top: 50%;
14
+ transform: translateY(-50%);
15
+ left: calc(var(--design-unit) * 3px - 2px);
16
+ height: calc(100% - (var(--design-unit) * 4px));
17
+ width: 4px;
18
+ border-radius: 2px;
19
+ }
20
+
21
+ dialog[type='error']::before {
22
+ background-color: var(--color-error);
23
+ }
24
+
25
+ dialog[type='success']::before {
26
+ background-color: var(--color-success);
27
+ }
28
+
3
29
  :host {
4
30
  --dialog-min-width: 358px;
5
31
  --notification-details-min-height: 40px;
@@ -2,7 +2,7 @@ import { html, ref, repeat, when } from '@microsoft/fast-element';
2
2
  import { closeIcon } from '../_common/icons';
3
3
  import { getPrefix } from '../utils';
4
4
  export const getDialogTemplate = (prefix) => html `
5
- <dialog ${ref('mainElement')} part="dialog">
5
+ <dialog ${ref('mainElement')} part="dialog" type=${(x) => x.type}>
6
6
  <div class="content-wrapper">
7
7
  <div part="top" class="top">
8
8
  <slot name="top">
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-ui",
3
3
  "description": "Genesis Foundation UI",
4
- "version": "14.168.0",
4
+ "version": "14.170.0-genxgit.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -74,13 +74,13 @@
74
74
  "test:debug": "genx test --debug"
75
75
  },
76
76
  "devDependencies": {
77
- "@genesislcap/foundation-testing": "14.168.0",
78
- "@genesislcap/genx": "14.168.0",
79
- "@genesislcap/rollup-builder": "14.168.0",
80
- "@genesislcap/ts-builder": "14.168.0",
81
- "@genesislcap/uvu-playwright-builder": "14.168.0",
82
- "@genesislcap/vite-builder": "14.168.0",
83
- "@genesislcap/webpack-builder": "14.168.0",
77
+ "@genesislcap/foundation-testing": "14.170.0-genxgit.1",
78
+ "@genesislcap/genx": "14.170.0-genxgit.1",
79
+ "@genesislcap/rollup-builder": "14.170.0-genxgit.1",
80
+ "@genesislcap/ts-builder": "14.170.0-genxgit.1",
81
+ "@genesislcap/uvu-playwright-builder": "14.170.0-genxgit.1",
82
+ "@genesislcap/vite-builder": "14.170.0-genxgit.1",
83
+ "@genesislcap/webpack-builder": "14.170.0-genxgit.1",
84
84
  "copyfiles": "^2.4.1",
85
85
  "rimraf": "^3.0.2",
86
86
  "rxjs": "^7.5.4"
@@ -91,12 +91,12 @@
91
91
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
92
92
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
93
93
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^4.0.0",
94
- "@genesislcap/foundation-comms": "14.168.0",
95
- "@genesislcap/foundation-criteria": "14.168.0",
96
- "@genesislcap/foundation-errors": "14.168.0",
97
- "@genesislcap/foundation-logger": "14.168.0",
98
- "@genesislcap/foundation-notifications": "14.168.0",
99
- "@genesislcap/foundation-utils": "14.168.0",
94
+ "@genesislcap/foundation-comms": "14.170.0-genxgit.1",
95
+ "@genesislcap/foundation-criteria": "14.170.0-genxgit.1",
96
+ "@genesislcap/foundation-errors": "14.170.0-genxgit.1",
97
+ "@genesislcap/foundation-logger": "14.170.0-genxgit.1",
98
+ "@genesislcap/foundation-notifications": "14.170.0-genxgit.1",
99
+ "@genesislcap/foundation-utils": "14.170.0-genxgit.1",
100
100
  "@microsoft/fast-colors": "^5.3.1",
101
101
  "@microsoft/fast-components": "^2.30.6",
102
102
  "@microsoft/fast-element": "^1.12.0",
@@ -118,5 +118,5 @@
118
118
  "access": "public"
119
119
  },
120
120
  "customElements": "dist/custom-elements.json",
121
- "gitHead": "5c2dfe8431713254545105d0ce1da29bc62ff483"
121
+ "gitHead": "63c42feb1ea6f7bc16d8bd50ae4d90af80b7a9e5"
122
122
  }