Skip to content

Commit 36b623f

Browse files
committedNov 18, 2021
add namespace
1 parent 8e1f6f8 commit 36b623f

File tree

9 files changed

+15
-12
lines changed

9 files changed

+15
-12
lines changed
 

‎packages/rollup-package.config.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const createEsModulesConfig = (entryPoints = []) => {
2828
];
2929
};
3030

31-
const createBundleConfig = bundle => {
31+
const createBundleConfig = (bundle, namespace) => {
3232
const packageJson = readPackageJson('./');
3333
const bundleName = packageJson.name.replace('@umbraco-ui/', '');
3434

@@ -39,6 +39,7 @@ const createBundleConfig = bundle => {
3939
file: `./dist/${bundleName}.min.js`,
4040
format: 'umd',
4141
sourcemap: true,
42+
name: namespace
4243
},
4344
plugins: [
4445
nodeResolve(),
@@ -50,8 +51,8 @@ const createBundleConfig = bundle => {
5051
: undefined;
5152
};
5253

53-
export const UUIProdConfig = ({ entryPoints = [], bundle }) => {
54+
export const UUIProdConfig = ({ entryPoints = [], bundle, namespace = '' }) => {
5455
const esModulesConfig = createEsModulesConfig(entryPoints);
55-
const bundleConfig = createBundleConfig(bundle);
56+
const bundleConfig = createBundleConfig(bundle, namespace);
5657
return [...esModulesConfig, bundleConfig].filter(x => x);
5758
};
+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { unsafeCSS } from "lit";
2-
import css from './local-typography.css';
1+
import { unsafeCSS } from 'lit';
32

4-
export const LocalTypography = unsafeCSS(css);
3+
export const LocalTypography = unsafeCSS("@import \"./typography/local.css\";\n");

‎packages/uui-css/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@umbraco-ui/uui-base": "0.0.12"
3333
},
3434
"scripts": {
35-
"build": "postcss lib/custom-properties.css --base lib/ --dir dist && postcss lib/local-typography.css --base lib/ --dir dist && postcss lib/root.css --base lib/ --dir dist && npm run analyze && tsc --build --force && rollup -c rollup.config.js",
35+
"build": "postcss lib/custom-properties.css --base lib/ --dir dist && postcss lib/local-typography.css --base lib/ --dir dist && postcss lib/root.css --base lib/ --dir dist && tsc --build --force && rollup -c rollup.config.js",
3636
"clean": "tsc --build --clean && rimraf dist lib/*.js lib/**/*.js custom-elements.json",
3737
"analyze": "web-component-analyzer **/*.element.ts --outFile custom-elements.json"
3838
},

‎packages/uui-css/rollup.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { UUIProdConfig } from '../rollup-package.config';
22

33
export default UUIProdConfig({
4+
namespace: 'UUICSS',
45
entryPoints: ['local-typography'],
5-
bundle: 'index',
6+
bundle: 'local-typography',
67
});

‎packages/uui-css/typings.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module '*.css';

‎packages/uui-dialog-confirm/lib/uui-dialog-confirm.element.ts

-2
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ export class UUIDialogConfirmElement extends UUIDialogElement {
3939
protected renderActions() {
4040
return html`<slot name="actions"></slot>
4141
<uui-button
42-
slot="actions"
4342
@click=${() =>
4443
this.dispatchEvent(
4544
new UUIDialogConfirmEvent(UUIDialogConfirmEvent.CANCEL, this)
4645
)}>
4746
${this.cancelLabel}
4847
</uui-button>
4948
<uui-button
50-
slot="actions"
5149
.look=${this.look}
5250
@click=${() =>
5351
this.dispatchEvent(

‎packages/uui-dialog/lib/uui-dialog.element.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class UUIDialogElement extends LitElement {
3535
justify-content: flex-end;
3636
}
3737
38-
::slotted([slot='actions']) {
38+
::slotted([slot='actions']), .actions > * {
3939
margin-left: var(--uui-size-4);
4040
}
4141
`,

‎packages/uui-dialog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
],
3131
"dependencies": {
3232
"@umbraco-ui/uui-base": "0.0.12",
33-
"@umbraco-ui/uui-css": "0.0.12"
33+
"@umbraco-ui/uui-css": "0.0.0"
3434
},
3535
"scripts": {
3636
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",

‎packages/uui-dialog/tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"references": [
1818
{
1919
"path": "../uui-base"
20+
},
21+
{
22+
"path": "../uui-css"
2023
}
2124
]
2225
}

0 commit comments

Comments
 (0)