Skip to content

Commit 7925766

Browse files
authored
Merge pull request #130 from umbraco/feature/package-globals
2 parents efd4163 + e32b71a commit 7925766

File tree

131 files changed

+613
-367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+613
-367
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
"postcss-custom-properties-fallback": "1.0.1",
9595
"postcss-jsx": "0.36.4",
9696
"postcss-load-config": "3.1.0",
97-
"postcss-syntax": "0.36.2",
9897
"postcss-values-parser": "6.0.0",
9998
"prettier": "2.5.1",
10099
"rimraf": "3.0.2",

packages/rollup-package.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const createEsModulesConfig = (entryPoints = []) => {
2727
external: [/^lit/, /^@umbraco-ui/],
2828
plugins: [
2929
importCss({ from: undefined }),
30-
processLitCSSPlugin(),
3130
esbuild(),
31+
processLitCSSPlugin(),
3232
],
3333
};
3434
}),

packages/uui-action-bar/lib/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { UUIActionBarElement } from './uui-action-bar.element';
2-
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
3-
4-
defineElement('uui-action-bar', UUIActionBarElement);
5-
61
export * from './uui-action-bar.element';

packages/uui-action-bar/lib/uui-action-bar.element.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
12
import { UUIButtonGroupElement } from '@umbraco-ui/uui-button-group/lib';
23
import { css } from 'lit';
34

45
/**
56
* @element uui-action-bar
67
* @description - Extends button group to hold buttons with icons that represent actions.
78
*/
9+
@defineElement('uui-action-bar')
810
export class UUIActionBarElement extends UUIButtonGroupElement {
911
static styles = [
1012
...UUIButtonGroupElement.styles,
@@ -53,3 +55,9 @@ export class UUIActionBarElement extends UUIButtonGroupElement {
5355
`,
5456
];
5557
}
58+
59+
declare global {
60+
interface HTMLElementTagNameMap {
61+
'uui-action-bar': UUIActionBarElement;
62+
}
63+
}

packages/uui-action-bar/lib/uui-action-bar.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { html, fixture, expect } from '@open-wc/testing';
1+
import { expect, fixture, html } from '@open-wc/testing';
2+
23
import { UUIActionBarElement } from './uui-action-bar.element';
3-
import '.';
44

55
describe('UUIActionBarElement', () => {
66
let element: UUIActionBarElement;
@@ -9,6 +9,10 @@ describe('UUIActionBarElement', () => {
99
element = await fixture(html` <uui-action-bar></uui-action-bar> `);
1010
});
1111

12+
it('is defined', () => {
13+
expect(element).to.be.instanceOf(UUIActionBarElement);
14+
});
15+
1216
it('passes the a11y audit', async () => {
1317
await expect(element).shadowDom.to.be.accessible();
1418
});
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { UUIAvatarGroupElement } from './uui-avatar-group.element';
2-
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
3-
4-
defineElement('uui-avatar-group', UUIAvatarGroupElement);
5-
61
export * from './uui-avatar-group.element';

packages/uui-avatar-group/lib/uui-avatar-group.element.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { UUIAvatarElement } from '@umbraco-ui/uui-avatar/lib';
2+
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
23
import { css, html, LitElement } from 'lit';
34
import { property, queryAssignedElements, state } from 'lit/decorators.js';
45

@@ -7,6 +8,7 @@ import { property, queryAssignedElements, state } from 'lit/decorators.js';
78
* @element uui-avatar-group
89
* @slot for uui-avatar elements
910
*/
11+
@defineElement('uui-avatar-group')
1012
export class UUIAvatarGroupElement extends LitElement {
1113
static styles = [
1214
css`
@@ -88,3 +90,9 @@ export class UUIAvatarGroupElement extends LitElement {
8890
`;
8991
}
9092
}
93+
94+
declare global {
95+
interface HTMLElementTagNameMap {
96+
'uui-avatar-group': UUIAvatarGroupElement;
97+
}
98+
}

packages/uui-avatar/lib/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { UUIAvatarElement } from './uui-avatar.element';
2-
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
3-
4-
defineElement('uui-avatar', UUIAvatarElement);
5-
61
export * from './uui-avatar.element';

packages/uui-avatar/lib/uui-avatar.element.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { property, state } from 'lit/decorators.js';
2+
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
23
import { LitElement, html, css } from 'lit';
34

45
/**
56
* Avatar for displaying users
67
* @element uui-avatar
78
* @slot For anything other than initials (no more than 2-3 characters)
89
*/
10+
@defineElement('uui-avatar')
911
export class UUIAvatarElement extends LitElement {
1012
static styles = [
1113
css`
@@ -126,3 +128,9 @@ export class UUIAvatarElement extends LitElement {
126128
`;
127129
}
128130
}
131+
132+
declare global {
133+
interface HTMLElementTagNameMap {
134+
'uui-avatar': UUIAvatarElement;
135+
}
136+
}

packages/uui-badge/lib/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
import { UUIBadgeElement } from './uui-badge.element';
2-
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
3-
4-
defineElement('uui-badge', UUIBadgeElement);
5-
61
export * from './uui-badge.element';

0 commit comments

Comments
 (0)