@aquera/nile-elements 0.0.32 → 0.0.34
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.
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.css.js +18 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +35 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.js +61 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js +47 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +34 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +74 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.css.js +71 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.d.ts +26 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.js +46 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-card/nile-card.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.js +2 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/arrowright.d.ts +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/arrowright.js +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/arrowright.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.d.ts +2 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js +9 -6
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +5 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.css.js +7 -15
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js +21 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.css.js +4 -4
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.css.js +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.js +2 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +255 -140
- package/dist/nile-breadcrumb/index.cjs.js +2 -0
- package/dist/nile-breadcrumb/index.cjs.js.map +1 -0
- package/dist/nile-breadcrumb/index.esm.js +1 -0
- package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +2 -0
- package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -0
- package/dist/nile-breadcrumb/nile-breadcrumb.css.cjs.js +2 -0
- package/dist/nile-breadcrumb/nile-breadcrumb.css.cjs.js.map +1 -0
- package/dist/nile-breadcrumb/nile-breadcrumb.css.esm.js +6 -0
- package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +6 -0
- package/dist/nile-breadcrumb-item/index.cjs.js +2 -0
- package/dist/nile-breadcrumb-item/index.cjs.js.map +1 -0
- package/dist/nile-breadcrumb-item/index.esm.js +1 -0
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +2 -0
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -0
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js +2 -0
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js.map +1 -0
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.esm.js +35 -0
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +13 -0
- package/dist/nile-card/index.cjs.js +2 -0
- package/dist/nile-card/index.cjs.js.map +1 -0
- package/dist/nile-card/index.esm.js +1 -0
- package/dist/nile-card/nile-card.cjs.js +2 -0
- package/dist/nile-card/nile-card.cjs.js.map +1 -0
- package/dist/nile-card/nile-card.css.cjs.js +2 -0
- package/dist/nile-card/nile-card.css.cjs.js.map +1 -0
- package/dist/nile-card/nile-card.css.esm.js +59 -0
- package/dist/nile-card/nile-card.esm.js +9 -0
- package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +2 -2
- package/dist/nile-icon/icons/svg/arrowright.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/arrowright.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/arrowright.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +4 -3
- package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
- package/dist/nile-switcher/nile-switcher.esm.js +3 -3
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.esm.js +9 -17
- package/dist/nile-tag/nile-tag.esm.js +3 -3
- package/dist/nile-toast/nile-toast.css.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.css.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.css.esm.js +4 -4
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.esm.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.esm.js +2 -2
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-breadcrumb/index.d.ts +1 -0
- package/dist/src/nile-breadcrumb/index.js +2 -0
- package/dist/src/nile-breadcrumb/index.js.map +1 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.css.d.ts +12 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.css.js +18 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.css.js.map +1 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +35 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.js +61 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -0
- package/dist/src/nile-breadcrumb-item/index.d.ts +1 -0
- package/dist/src/nile-breadcrumb-item/index.js +2 -0
- package/dist/src/nile-breadcrumb-item/index.js.map +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.d.ts +12 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js +47 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js.map +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +34 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +74 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -0
- package/dist/src/nile-card/index.d.ts +1 -0
- package/dist/src/nile-card/index.js +2 -0
- package/dist/src/nile-card/index.js.map +1 -0
- package/dist/src/nile-card/nile-card.css.d.ts +12 -0
- package/dist/src/nile-card/nile-card.css.js +71 -0
- package/dist/src/nile-card/nile-card.css.js.map +1 -0
- package/dist/src/nile-card/nile-card.d.ts +26 -0
- package/dist/src/nile-card/nile-card.js +46 -0
- package/dist/src/nile-card/nile-card.js.map +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.js +2 -2
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/arrowright.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/arrowright.js +1 -1
- package/dist/src/nile-icon/icons/svg/arrowright.js.map +1 -1
- package/dist/src/nile-icon-button/nile-icon-button.d.ts +2 -1
- package/dist/src/nile-icon-button/nile-icon-button.js +9 -6
- package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/dist/src/nile-switcher/nile-switcher.d.ts +1 -0
- package/dist/src/nile-switcher/nile-switcher.js +5 -3
- package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.css.js +7 -15
- package/dist/src/nile-tag/nile-tag.css.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.d.ts +1 -0
- package/dist/src/nile-tag/nile-tag.js +21 -2
- package/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/dist/src/nile-toast/nile-toast.css.js +4 -4
- package/dist/src/nile-toast/nile-toast.css.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.css.js +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.js +2 -2
- package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/src/index.ts +3 -0
- package/src/nile-breadcrumb/index.ts +1 -0
- package/src/nile-breadcrumb/nile-breadcrumb.css.ts +20 -0
- package/src/nile-breadcrumb/nile-breadcrumb.ts +78 -0
- package/src/nile-breadcrumb-item/index.ts +1 -0
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.css.ts +49 -0
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +83 -0
- package/src/nile-card/index.ts +1 -0
- package/src/nile-card/nile-card.css.ts +73 -0
- package/src/nile-card/nile-card.ts +53 -0
- package/src/nile-code-editor/nile-code-editor.ts +8 -3
- package/src/nile-icon/icons/svg/arrowright.ts +1 -1
- package/src/nile-icon-button/nile-icon-button.ts +9 -6
- package/src/nile-switcher/nile-switcher.ts +6 -4
- package/src/nile-tag/nile-tag.css.ts +7 -15
- package/src/nile-tag/nile-tag.ts +24 -2
- package/src/nile-toast/nile-toast.css.ts +4 -4
- package/src/nile-tooltip/nile-tooltip.css.ts +1 -1
- package/src/nile-tooltip/nile-tooltip.ts +2 -2
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
4
4
|
"license": "MIT",
|
5
5
|
"author": "nile-elements",
|
6
|
-
"version": "0.0.
|
6
|
+
"version": "0.0.34",
|
7
7
|
"main": "dist/src/index.js",
|
8
8
|
"type": "module",
|
9
9
|
"module": "dist/src/index.js",
|
@@ -34,7 +34,9 @@
|
|
34
34
|
"element-internals-polyfill": "^1.1.20",
|
35
35
|
"lit": "^2.0.2",
|
36
36
|
"@floating-ui/dom": "^1.2.1",
|
37
|
-
"composed-offset-position": "^0.0.4"
|
37
|
+
"composed-offset-position": "^0.0.4",
|
38
|
+
"@codemirror/lang-javascript": "6.2.1",
|
39
|
+
"codemirror": "6.0.1"
|
38
40
|
},
|
39
41
|
"devDependencies": {
|
40
42
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
package/src/index.ts
CHANGED
@@ -41,3 +41,6 @@ export { NileTab } from './nile-tab';
|
|
41
41
|
export { NileTabPanel } from './nile-tab-panel';
|
42
42
|
export { NileCodeEditor } from './nile-code-editor';
|
43
43
|
export { NileToast } from './nile-toast';
|
44
|
+
export { NileBreadcrumb } from './nile-breadcrumb';
|
45
|
+
export { NileBreadcrumbItem } from './nile-breadcrumb-item';
|
46
|
+
export { NileCard } from './nile-card';
|
@@ -0,0 +1 @@
|
|
1
|
+
export {NileBreadcrumb} from './nile-breadcrumb';
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { css } from 'lit-element';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Breadcrumb CSS
|
12
|
+
*/
|
13
|
+
export const styles = css`
|
14
|
+
:host {
|
15
|
+
display: flex;
|
16
|
+
align-items: center;
|
17
|
+
}
|
18
|
+
`;
|
19
|
+
|
20
|
+
export default [styles];
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {
|
9
|
+
LitElement,
|
10
|
+
html,
|
11
|
+
property,
|
12
|
+
CSSResultArray,
|
13
|
+
TemplateResult,
|
14
|
+
} from 'lit-element';
|
15
|
+
import { customElement } from 'lit/decorators.js';
|
16
|
+
import { styles } from './nile-breadcrumb.css';
|
17
|
+
import NileElement from '../internal/nile-element';
|
18
|
+
/**
|
19
|
+
* Nile BreadCrumb component.
|
20
|
+
*
|
21
|
+
* @tag nile-breadcrumb
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
@customElement('nile-breadcrumb')
|
25
|
+
export class NileBreadcrumb extends NileElement {
|
26
|
+
/**
|
27
|
+
* The styles for Breadcrumb
|
28
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
29
|
+
*/
|
30
|
+
public static get styles(): CSSResultArray {
|
31
|
+
return [styles];
|
32
|
+
}
|
33
|
+
|
34
|
+
/* #endregion */
|
35
|
+
|
36
|
+
/* #region Methods */
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Render method
|
40
|
+
* @slot This is a slot test
|
41
|
+
*/
|
42
|
+
connectedCallback() {
|
43
|
+
super.connectedCallback();
|
44
|
+
this.updateComplete.then(() => {
|
45
|
+
this.changeLastItem();
|
46
|
+
});
|
47
|
+
}
|
48
|
+
|
49
|
+
private changeLastItem() {
|
50
|
+
const items: any = [...this.querySelectorAll('nile-breadcrumb-item')];
|
51
|
+
const itemslength = items.length;
|
52
|
+
const lastItem = items[itemslength - 1];
|
53
|
+
lastItem.isLast = true;
|
54
|
+
}
|
55
|
+
|
56
|
+
private handleRemoveClick(event: any) {
|
57
|
+
this.emit('nile-click', { value: event.target.innerText });
|
58
|
+
}
|
59
|
+
|
60
|
+
public render(): TemplateResult {
|
61
|
+
return html`
|
62
|
+
<slot
|
63
|
+
@nile-click-item=${this.handleRemoveClick}
|
64
|
+
class="breadcrumb"
|
65
|
+
></slot>
|
66
|
+
`;
|
67
|
+
}
|
68
|
+
|
69
|
+
/* #endregion */
|
70
|
+
}
|
71
|
+
|
72
|
+
export default NileBreadcrumb;
|
73
|
+
|
74
|
+
declare global {
|
75
|
+
interface HTMLElementTagNameMap {
|
76
|
+
'nile-breadcrumb': NileBreadcrumb;
|
77
|
+
}
|
78
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {NileBreadcrumbItem} from './nile-breadcrumb-item';
|
@@ -0,0 +1,49 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { css } from 'lit-element';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Breadcrumb-item CSS
|
12
|
+
*/
|
13
|
+
export const styles = css`
|
14
|
+
:host {
|
15
|
+
display: flex;
|
16
|
+
align-items: center;
|
17
|
+
text-align: center;
|
18
|
+
font-feature-settings: 'clig' off, 'liga' off;
|
19
|
+
font-family: var(--nile-font-family-serif);
|
20
|
+
font-size: var(--nile-font-size-small);
|
21
|
+
font-style: normal;
|
22
|
+
font-weight: var(--nile-font-weight-regular);
|
23
|
+
line-height:16.8px;
|
24
|
+
letter-spacing: 0.2px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.nile-breadcrumb-item__arrow {
|
28
|
+
margin: 0 8px;
|
29
|
+
}
|
30
|
+
|
31
|
+
.nile-breadcrumb-item__arrow-hidden {
|
32
|
+
display: none;
|
33
|
+
}
|
34
|
+
|
35
|
+
.nile-breadcrumb-item__slot-text {
|
36
|
+
color: var(--nile-colors-dark-500);
|
37
|
+
}
|
38
|
+
|
39
|
+
.nile-breadcrumb-item__slot-text:hover {
|
40
|
+
color: var(--nile-colors-primary-600);
|
41
|
+
cursor: pointer;
|
42
|
+
}
|
43
|
+
|
44
|
+
.nile-breadcrumb-item__last-slot-text {
|
45
|
+
color: #026e78;
|
46
|
+
}
|
47
|
+
`;
|
48
|
+
|
49
|
+
export default [styles];
|
@@ -0,0 +1,83 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {
|
9
|
+
LitElement,
|
10
|
+
html,
|
11
|
+
property,
|
12
|
+
CSSResultArray,
|
13
|
+
TemplateResult,
|
14
|
+
} from 'lit-element';
|
15
|
+
import { customElement, state } from 'lit/decorators.js';
|
16
|
+
import { classMap } from 'lit/directives/class-map.js';
|
17
|
+
import { styles } from './nile-breadcrumb-item.css';
|
18
|
+
import NileElement from '../internal/nile-element';
|
19
|
+
/**
|
20
|
+
* Nile BreadCrumb Item component.
|
21
|
+
*
|
22
|
+
* @tag nile-breadcrumb-item
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
@customElement('nile-breadcrumb-item')
|
26
|
+
export class NileBreadcrumbItem extends NileElement {
|
27
|
+
/**
|
28
|
+
* The styles for BreadcrumbItem
|
29
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
30
|
+
*/
|
31
|
+
public static get styles(): CSSResultArray {
|
32
|
+
return [styles];
|
33
|
+
}
|
34
|
+
|
35
|
+
@state() private isLast = false;
|
36
|
+
|
37
|
+
/* #endregion */
|
38
|
+
|
39
|
+
/* #region Methods */
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Render method
|
43
|
+
* @slot This is a slot test
|
44
|
+
*/
|
45
|
+
private handleClick() {
|
46
|
+
if (this.isLast) {
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
this.emit('nile-click-item');
|
50
|
+
}
|
51
|
+
|
52
|
+
public render(): TemplateResult {
|
53
|
+
return html`
|
54
|
+
<slot
|
55
|
+
class=${classMap({
|
56
|
+
'nile-breadcrumb-item__slot-text': !this.isLast,
|
57
|
+
'nile-breadcrumb-item__last-slot-text': this.isLast,
|
58
|
+
})}
|
59
|
+
@click=${this.handleClick}
|
60
|
+
></slot>
|
61
|
+
<nile-icon
|
62
|
+
name="arrowright"
|
63
|
+
aria-label="arrowright"
|
64
|
+
color="var(--nile-colors-dark-500)"
|
65
|
+
class=${classMap({
|
66
|
+
'nile-breadcrumb-item__arrow': true,
|
67
|
+
'nile-breadcrumb-item__arrow-hidden': this.isLast,
|
68
|
+
})}
|
69
|
+
size="14"
|
70
|
+
></nile-icon>
|
71
|
+
`;
|
72
|
+
}
|
73
|
+
|
74
|
+
/* #endregion */
|
75
|
+
}
|
76
|
+
|
77
|
+
export default NileBreadcrumbItem;
|
78
|
+
|
79
|
+
declare global {
|
80
|
+
interface HTMLElementTagNameMap {
|
81
|
+
'nile-breadcrumb-item': NileBreadcrumbItem;
|
82
|
+
}
|
83
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { NileCard } from './nile-card';
|
@@ -0,0 +1,73 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {css} from 'lit-element';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Card CSS
|
12
|
+
*/
|
13
|
+
export const styles = css`
|
14
|
+
|
15
|
+
:host {
|
16
|
+
box-sizing: border-box;
|
17
|
+
}
|
18
|
+
|
19
|
+
:host *,
|
20
|
+
:host *::before,
|
21
|
+
:host *::after {
|
22
|
+
box-sizing: inherit;
|
23
|
+
}
|
24
|
+
|
25
|
+
[hidden] {
|
26
|
+
display: none !important;
|
27
|
+
}
|
28
|
+
|
29
|
+
:host {
|
30
|
+
--border-color: var(--nile-colors-neutral-400);
|
31
|
+
--border-radius: 8px;
|
32
|
+
--border-width: 1px;
|
33
|
+
--padding: 18px;
|
34
|
+
--footer-padding: 9px 18px;
|
35
|
+
;
|
36
|
+
|
37
|
+
display: inline-block;
|
38
|
+
}
|
39
|
+
|
40
|
+
.card {
|
41
|
+
display: flex;
|
42
|
+
flex-direction: column;
|
43
|
+
background-color: var(--nile-colors-white-base);
|
44
|
+
border: solid var(--border-width) var(--border-color);
|
45
|
+
border-radius: var(--border-radius);
|
46
|
+
}
|
47
|
+
|
48
|
+
.card__body {
|
49
|
+
display: block;
|
50
|
+
padding: var(--padding);
|
51
|
+
}
|
52
|
+
|
53
|
+
.card--has-footer {
|
54
|
+
border-radius: var(--border-radius) var(--border-radius) 0 0;
|
55
|
+
border-bottom: none;
|
56
|
+
}
|
57
|
+
|
58
|
+
.card__footer {
|
59
|
+
display: block;
|
60
|
+
border-top: solid var(--border-width) var(--border-color);
|
61
|
+
padding: var(--footer-padding);
|
62
|
+
border: 1px solid var(--nile-colors-neutral-500);
|
63
|
+
background: var(--nile-colors-neutral-100);
|
64
|
+
border-radius: 0 0 4px 4px;
|
65
|
+
}
|
66
|
+
|
67
|
+
.card:not(.card--has-footer) .card__footer {
|
68
|
+
display: none;
|
69
|
+
}
|
70
|
+
|
71
|
+
`;
|
72
|
+
|
73
|
+
export default [styles];
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';
|
9
|
+
import { customElement } from 'lit/decorators.js';
|
10
|
+
import {styles} from './nile-card.css';
|
11
|
+
import { classMap } from 'lit/directives/class-map.js';
|
12
|
+
import { HasSlotController } from '../internal/slot';
|
13
|
+
import NileElements from '../internal/nile-element';
|
14
|
+
import { CSSResultGroup } from 'lit';
|
15
|
+
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Nile icon component.
|
19
|
+
*
|
20
|
+
* @tag nile-card
|
21
|
+
*
|
22
|
+
*/
|
23
|
+
@customElement('nile-card')
|
24
|
+
export class NileCard extends NileElements {
|
25
|
+
|
26
|
+
static styles: CSSResultGroup = styles;
|
27
|
+
|
28
|
+
private readonly hasSlotController = new HasSlotController(this, 'footer');
|
29
|
+
|
30
|
+
render() {
|
31
|
+
return html`
|
32
|
+
<div
|
33
|
+
part="base"
|
34
|
+
class=${classMap({
|
35
|
+
card: true,
|
36
|
+
'card--has-footer': this.hasSlotController.test('footer'),
|
37
|
+
})}
|
38
|
+
>
|
39
|
+
<slot part="body" class="card__body"></slot>
|
40
|
+
</div>
|
41
|
+
<slot name="footer" part="footer" ?hidden="${!this.hasSlotController.test('footer')}" class="card__footer"></slot>
|
42
|
+
`;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
export default NileCard;
|
48
|
+
|
49
|
+
declare global {
|
50
|
+
interface HTMLElementTagNameMap {
|
51
|
+
'nile-card': NileCard;
|
52
|
+
}
|
53
|
+
}
|
@@ -17,9 +17,14 @@ import { styles } from './nile-code-editor.css';
|
|
17
17
|
import { EditorView } from 'codemirror';
|
18
18
|
import { ViewUpdate } from '@codemirror/view';
|
19
19
|
import { EditorState, Compartment } from '@codemirror/state';
|
20
|
-
import {
|
20
|
+
import {
|
21
|
+
javascript,
|
22
|
+
javascriptLanguage,
|
23
|
+
scopeCompletionSource,
|
24
|
+
completionPath,
|
25
|
+
} from '@codemirror/lang-javascript';
|
21
26
|
import { autocompletion } from '@codemirror/autocomplete';
|
22
|
-
import { CompletionContext } from '@codemirror/autocomplete';
|
27
|
+
import { CompletionContext, Completion } from '@codemirror/autocomplete';
|
23
28
|
import NileElement from '../internal/nile-element';
|
24
29
|
import { basicSetup } from './extensionSetup';
|
25
30
|
|
@@ -61,7 +66,7 @@ export class NileCodeEditor extends NileElement {
|
|
61
66
|
|
62
67
|
updated() {
|
63
68
|
const customAutoCompletions = javascriptLanguage.data.of({
|
64
|
-
autocomplete: this.customOptions,
|
69
|
+
autocomplete: scopeCompletionSource(this.customOptions),
|
65
70
|
});
|
66
71
|
let startState = EditorState.create({
|
67
72
|
doc: !this.multiline ? this.convertToSingleLine(this.value) : this.value,
|
@@ -2,4 +2,4 @@
|
|
2
2
|
* Do not edit directly
|
3
3
|
*/
|
4
4
|
|
5
|
-
export default "
|
5
|
+
export default "PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuOTk5OTggMTUuMjFMNC4yODk5OCAxNC41TDEwLjI5IDguNDk5OThMNC4yODk5OCAyLjQ5OTk4TDQuOTk5OTggMS43ODk5OEwxMS43MSA4LjQ5OTk4TDQuOTk5OTggMTUuMjFaIiBmaWxsPSIjN0Y3RjdGIi8+PC9zdmc+";
|
@@ -79,7 +79,9 @@ export class NileIconButton extends NileElement {
|
|
79
79
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
80
80
|
|
81
81
|
/**Default color to icon */
|
82
|
-
@property({ type: String, reflect: true }) color
|
82
|
+
@property({ type: String, reflect: true }) color?: string;
|
83
|
+
|
84
|
+
@property({ type: Boolean, reflect: true }) ishovered: boolean = false;
|
83
85
|
|
84
86
|
private handleBlur() {
|
85
87
|
this.hasFocus = false;
|
@@ -114,16 +116,16 @@ export class NileIconButton extends NileElement {
|
|
114
116
|
}
|
115
117
|
|
116
118
|
private handleMouseOver(e: any) {
|
117
|
-
this.
|
119
|
+
this.ishovered = true;
|
118
120
|
}
|
119
|
-
private handleMouseLeave() {
|
120
|
-
this.
|
121
|
+
private handleMouseLeave(e: any) {
|
122
|
+
this.ishovered = false;
|
121
123
|
}
|
122
124
|
|
125
|
+
|
123
126
|
render(): TemplateResult {
|
124
127
|
const isLink = this.href ? true : false;
|
125
128
|
const tag = isLink ? literal`a` : literal`button`;
|
126
|
-
|
127
129
|
/* eslint-disable lit/binding-positions, lit/no-invalid-html */
|
128
130
|
return html`
|
129
131
|
<${tag}
|
@@ -151,12 +153,13 @@ export class NileIconButton extends NileElement {
|
|
151
153
|
@mouseover=${this.handleMouseOver}
|
152
154
|
@mouseleave=${this.handleMouseLeave}
|
153
155
|
>
|
156
|
+
|
154
157
|
<nile-icon
|
155
158
|
class="icon-button__icon"
|
156
159
|
name=${ifDefined(this.name)}
|
157
160
|
library=${ifDefined(this.library)}
|
158
161
|
src=${ifDefined(this.src)}
|
159
|
-
color=${ifDefined(this.color)}
|
162
|
+
color=${this.ishovered? 'black': ifDefined(this.color) }
|
160
163
|
aria-hidden="true"
|
161
164
|
size="14"
|
162
165
|
></nile-icon>
|
@@ -59,6 +59,7 @@ export interface switchInputType {
|
|
59
59
|
error?: boolean;
|
60
60
|
errorMessage?: string;
|
61
61
|
options?: Array<any>;
|
62
|
+
customAutoCompletions?: any;
|
62
63
|
helperText?: string;
|
63
64
|
multiple?: boolean;
|
64
65
|
noborder?: boolean;
|
@@ -101,14 +102,12 @@ export class NileSwitcher extends NileElement {
|
|
101
102
|
static styles: CSSResultGroup = styles;
|
102
103
|
|
103
104
|
@property({ type: Object }) nileSwitchConfig: switchconfig;
|
104
|
-
|
105
105
|
@property({ type: Number }) current: Number = 0;
|
106
106
|
|
107
107
|
@property({ type: Object }) currentInput: switchInputType;
|
108
108
|
|
109
109
|
connectedCallback() {
|
110
110
|
super.connectedCallback();
|
111
|
-
this.setCurrentInput();
|
112
111
|
this.emit('nile-init');
|
113
112
|
}
|
114
113
|
|
@@ -300,7 +299,7 @@ export class NileSwitcher extends NileElement {
|
|
300
299
|
const {
|
301
300
|
value,
|
302
301
|
multiLine,
|
303
|
-
|
302
|
+
customAutoCompletions,
|
304
303
|
disabled,
|
305
304
|
readonly,
|
306
305
|
errorMessage,
|
@@ -319,7 +318,7 @@ export class NileSwitcher extends NileElement {
|
|
319
318
|
this.handleChange(e, INPUT_TYPE_NAMES.CODE_EDITOR)}"
|
320
319
|
.multiline="${multiLine}"
|
321
320
|
.value="${value}"
|
322
|
-
.customOptions="${
|
321
|
+
.customOptions="${customAutoCompletions}"
|
323
322
|
.showLineNumbers="false"
|
324
323
|
></nile-code-editor> `;
|
325
324
|
}
|
@@ -390,6 +389,9 @@ export class NileSwitcher extends NileElement {
|
|
390
389
|
}
|
391
390
|
|
392
391
|
singleFieldSwitcher() {
|
392
|
+
if (!this.currentInput) {
|
393
|
+
this.setCurrentInput();
|
394
|
+
}
|
393
395
|
return html`
|
394
396
|
${choose(
|
395
397
|
this.currentInput.inputType,
|
@@ -18,7 +18,6 @@ export const styles = css`
|
|
18
18
|
.tag {
|
19
19
|
display: flex;
|
20
20
|
align-items: center;
|
21
|
-
border: solid 2px;
|
22
21
|
line-height: 1;
|
23
22
|
white-space: nowrap;
|
24
23
|
user-select: none;
|
@@ -37,13 +36,11 @@ export const styles = css`
|
|
37
36
|
|
38
37
|
.tag--primary {
|
39
38
|
background: #005EA6;
|
40
|
-
border-color: #005EA6;
|
41
|
-
border: 2px solid #005EA6;
|
42
39
|
color: #FFF;
|
43
40
|
}
|
44
41
|
|
45
42
|
.tag--primary:hover {
|
46
|
-
|
43
|
+
outline: 2px solid rgba(0, 94, 166, 0.50);
|
47
44
|
}
|
48
45
|
|
49
46
|
.tag--primary:active > nile-icon-button {
|
@@ -52,12 +49,11 @@ export const styles = css`
|
|
52
49
|
|
53
50
|
.tag--success {
|
54
51
|
background: #A5F3E1;
|
55
|
-
border: 2px solid #A5F3E1;
|
56
52
|
color: #000;
|
57
53
|
}
|
58
54
|
|
59
55
|
.tag--success:hover {
|
60
|
-
|
56
|
+
outline: 2px solid #43E5C0;
|
61
57
|
}
|
62
58
|
|
63
59
|
.tag--success:active > nile-icon-button {
|
@@ -66,12 +62,11 @@ export const styles = css`
|
|
66
62
|
|
67
63
|
.tag--normal {
|
68
64
|
background: #E5E9EB;
|
69
|
-
border: 2px solid #E5E9EB;
|
70
65
|
color: #000;
|
71
66
|
}
|
72
67
|
|
73
68
|
.tag--normal:hover {
|
74
|
-
|
69
|
+
outline: 2px solid #C7CED4;
|
75
70
|
}
|
76
71
|
|
77
72
|
|
@@ -81,12 +76,11 @@ export const styles = css`
|
|
81
76
|
|
82
77
|
.tag--warning {
|
83
78
|
background: #F3E0A5;
|
84
|
-
border: 2px solid #F3E0A5;
|
85
79
|
color: #000;
|
86
80
|
}
|
87
81
|
|
88
82
|
.tag--warning:hover {
|
89
|
-
|
83
|
+
outline: 2px solid #E5BF43;
|
90
84
|
}
|
91
85
|
|
92
86
|
.tag--warning:active > nile-icon-button {
|
@@ -96,12 +90,11 @@ export const styles = css`
|
|
96
90
|
|
97
91
|
.tag--error {
|
98
92
|
background: #F3A5AA;
|
99
|
-
border: 2px solid #F3A5AA;
|
100
93
|
color: #000;
|
101
94
|
}
|
102
95
|
|
103
96
|
.tag--error:hover {
|
104
|
-
|
97
|
+
outline: 2px solid #E5434D;
|
105
98
|
}
|
106
99
|
|
107
100
|
.tag--error:active > nile-icon-button {
|
@@ -110,12 +103,11 @@ export const styles = css`
|
|
110
103
|
|
111
104
|
.tag--info {
|
112
105
|
background: #A5D3F3;
|
113
|
-
border: 2px solid #A5D3F3;
|
114
106
|
color: #000000;
|
115
107
|
}
|
116
108
|
|
117
109
|
.tag--info:hover {
|
118
|
-
|
110
|
+
outline: 2px solid #42A3E5;
|
119
111
|
}
|
120
112
|
|
121
113
|
.tag--info:active > nile-icon-button {
|
@@ -126,7 +118,7 @@ export const styles = css`
|
|
126
118
|
.tag--medium {
|
127
119
|
font-size: 14px;
|
128
120
|
height: 26px;
|
129
|
-
padding: 0
|
121
|
+
padding: 0 6px;
|
130
122
|
}
|
131
123
|
|
132
124
|
.tag__remove {
|
package/src/nile-tag/nile-tag.ts
CHANGED
@@ -67,7 +67,28 @@ export class NileTag extends NileElement {
|
|
67
67
|
this.emit('nile-remove');
|
68
68
|
}
|
69
69
|
|
70
|
+
getCloseButtonColor() {
|
71
|
+
switch (this.variant) {
|
72
|
+
case 'primary':
|
73
|
+
return '--nile-colors-blue-500';
|
74
|
+
case 'success':
|
75
|
+
return '--nile-colors-green-500';
|
76
|
+
case 'normal':
|
77
|
+
return '--nile-colors-dark-500';
|
78
|
+
case 'warning':
|
79
|
+
return '--nile-colors-yellow-500';
|
80
|
+
case 'error':
|
81
|
+
return '--nile-colors-red-500';
|
82
|
+
case 'info':
|
83
|
+
return '--nile-colors-blue-500';
|
84
|
+
default:
|
85
|
+
return '--nile-colors-dark-500';
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
|
70
90
|
render() {
|
91
|
+
const colorVariable = this.getCloseButtonColor();
|
71
92
|
return html`
|
72
93
|
<span
|
73
94
|
part="base"
|
@@ -90,12 +111,12 @@ export class NileTag extends NileElement {
|
|
90
111
|
// Modifiers
|
91
112
|
'tag--pill': this.pill,
|
92
113
|
'tag--removable': this.removable,
|
114
|
+
|
93
115
|
})}
|
94
116
|
>
|
95
|
-
|
96
117
|
<slot name="prefix" part="prefix" class="tag__prefix"></slot>
|
97
118
|
|
98
|
-
<slot
|
119
|
+
<slot part="content" class="tag__content"></slot>
|
99
120
|
|
100
121
|
${this.removable
|
101
122
|
? html`
|
@@ -108,6 +129,7 @@ export class NileTag extends NileElement {
|
|
108
129
|
class="tag__remove"
|
109
130
|
@click=${this.handleRemoveClick}
|
110
131
|
tabindex="-1"
|
132
|
+
color="var(${colorVariable})"
|
111
133
|
></nile-icon-button>
|
112
134
|
`
|
113
135
|
: ''}
|