@operato/oops 0.2.46
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/.editorconfig +29 -0
- package/.storybook/main.js +3 -0
- package/.storybook/server.mjs +8 -0
- package/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +75 -0
- package/demo/index.html +42 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/ox-oops-note.d.ts +9 -0
- package/dist/src/ox-oops-note.js +55 -0
- package/dist/src/ox-oops-note.js.map +1 -0
- package/dist/src/ox-oops-spinner.d.ts +5 -0
- package/dist/src/ox-oops-spinner.js +32 -0
- package/dist/src/ox-oops-spinner.js.map +1 -0
- package/dist/src/ox-oops.d.ts +45 -0
- package/dist/src/ox-oops.js +183 -0
- package/dist/src/ox-oops.js.map +1 -0
- package/dist/stories/index.stories.d.ts +33 -0
- package/dist/stories/index.stories.js +31 -0
- package/dist/stories/index.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +71 -0
- package/src/index.ts +3 -0
- package/src/ox-oops-note.ts +43 -0
- package/src/ox-oops-spinner.ts +29 -0
- package/src/ox-oops.ts +226 -0
- package/stories/index.stories.ts +50 -0
- package/tsconfig.json +22 -0
- package/web-dev-server.config.mjs +27 -0
- package/web-test-runner.config.mjs +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-oops.js","sourceRoot":"","sources":["../../src/ox-oops.ts"],"names":[],"mappings":"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","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { render } from 'lit-html'\nimport { customElement, state } from 'lit/decorators.js'\n\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-oops')\nexport class OxOops extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n position: absolute;\n display: none;\n background-color: var(--theme-white-color, #fff);\n z-index: 100;\n padding: 4px 0;\n box-shadow: 2px 3px 10px 5px rgba(0, 0, 0, 0.15);\n box-sizing: border-box;\n min-width: fit-content;\n }\n\n :host([active]) {\n display: block;\n }\n\n :host(*:focus) {\n outline: none;\n }\n ::slotted(*) {\n padding: 5px 10px;\n cursor: pointer;\n }\n\n ::slotted(*:focus) {\n outline: none;\n }\n\n ::slotted([menu][active]),\n ::slotted([menu]:hover) {\n background-color: #f6f6f6;\n }\n\n ::slotted([menu]),\n ::slotted(ox-oops-menuitem) {\n border-left: 3px solid transparent;\n }\n\n ::slotted(ox-oops-menuitem[active]) {\n border-left: 3px solid var(--primary-color, #38a25b);\n font-weight: bold;\n }\n\n ::slotted([separator]) {\n height: 1px;\n width: 100%;\n padding: 0;\n background-color: rgba(0, 0, 0, 0.15);\n }\n ::slotted([menu] > input) {\n border: var(--border-dark-color, 1px solid rgba(0, 0, 0, 0.3));\n }\n `\n ]\n\n @state() _parent?: Element\n\n render() {\n return html` <slot> </slot> `\n }\n\n protected _onfocusout: (e: FocusEvent) => void = function (this: OxOops, e: FocusEvent) {\n const to = e.relatedTarget as HTMLElement\n\n if (!this.contains(to)) {\n /* 분명히 내 범위가 아닌 엘리먼트로 포커스가 옮겨졌다면, ox-oops은 닫혀야 한다. */\n // @ts-ignore for debug\n !window.POPUP_DEBUG && this.close()\n }\n }.bind(this)\n\n protected _onkeydown: (e: KeyboardEvent) => void = function (this: OxOops, e: KeyboardEvent) {\n e.stopPropagation()\n\n switch (e.key) {\n case 'Esc': // for IE/Edge\n case 'Escape':\n this.close()\n break\n }\n }.bind(this)\n\n protected _onkeyup: (e: KeyboardEvent) => void = function (this: OxOops, e: KeyboardEvent) {\n e.stopPropagation()\n }.bind(this)\n\n protected _onclick: (e: MouseEvent) => void = function (this: OxOops, e: MouseEvent) {\n e.stopPropagation()\n }.bind(this)\n\n protected _onclose: (e: Event) => void = function (this: OxOops, e: Event) {\n this.close()\n }.bind(this)\n\n protected _oncollapse: (e: Event) => void = function (this: OxOops, e: Event) {\n e.stopPropagation()\n this.close()\n }.bind(this)\n\n protected _onwindowblur: (e: Event) => void = function (this: OxOops, e: Event) {\n // @ts-ignore for debug\n !window.POPUP_DEBUG && this.close()\n }.bind(this)\n\n connectedCallback() {\n super.connectedCallback()\n\n this.addEventListener('focusout', this._onfocusout)\n this.addEventListener('keydown', this._onkeydown)\n this.addEventListener('keyup', this._onkeyup)\n this.addEventListener('click', this._onclick)\n this.addEventListener('ox-close', this._onclose)\n this.addEventListener('ox-collapse', this._oncollapse)\n\n this.setAttribute('tabindex', '0') // make this element focusable\n this.guaranteeFocus()\n }\n\n /**\n * Configuration for opening ox-oops\n *\n * @typedef {Object} OopsOpenOptions\n * @property {HTMLTemplate} template HTMLTemplate to be displayed inside the oops\n * @property {Number} top The position-top where the pop-up will be displayed\n * @property {Number} left The position-left where the pop-up will be displayed\n * @property {HTMLElement} parent Oops's parent element\n */\n\n /**\n * Open Oops\n *\n * @param {OopsOpenOptions}\n */\n static open({\n template,\n top,\n left,\n right,\n bottom,\n parent\n }: {\n template: unknown\n top?: number\n left?: number\n right?: number\n bottom?: number\n parent?: Element | null\n }) {\n const owner = parent || document.body\n const target = document.createElement('ox-oops') as OxOops\n\n render(template, target)\n\n target._parent = owner\n owner.appendChild(target)\n\n target.open({ top, left, right, bottom })\n }\n\n open({\n left,\n top,\n right,\n bottom,\n silent = false\n }: {\n left?: number\n top?: number\n right?: number\n bottom?: number\n silent?: boolean\n }) {\n if (left !== undefined) this.style.left = `${left}px`\n if (top !== undefined) this.style.top = `${top}px`\n if (right !== undefined) this.style.right = `${right}px`\n if (bottom !== undefined) this.style.bottom = `${bottom}px`\n\n this.setAttribute('active', '')\n\n !silent && this.guaranteeFocus()\n\n /* When the window is out of focus, all pop-ups should disappear. */\n window.addEventListener('blur', this._onwindowblur)\n }\n\n guaranteeFocus() {\n const focusible = this.querySelector(\n ':scope > button, :scope > [href], :scope > input, :scope > select, :scope > textarea, :scope > [tabindex]:not([tabindex=\"-1\"])'\n )\n\n if (focusible) {\n ;(focusible as HTMLElement).focus()\n } else {\n this.focus()\n }\n }\n\n close() {\n this.removeAttribute('active')\n\n window.removeEventListener('blur', this._onwindowblur)\n\n if (this._parent) {\n /* this case is when the oops is opened by OxOops.open(...) */\n this.removeEventListener('focusout', this._onfocusout)\n this.removeEventListener('keydown', this._onkeydown)\n this.removeEventListener('keyup', this._onkeyup)\n this.removeEventListener('click', this._onclick)\n this.removeEventListener('ox-close', this._onclose)\n this.removeEventListener('ox-collapse', this._oncollapse)\n\n this._parent.removeChild(this)\n delete this._parent\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import '../src/ox-oops';
|
|
2
|
+
import { TemplateResult } from 'lit';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
argTypes: {
|
|
7
|
+
title: {
|
|
8
|
+
control: string;
|
|
9
|
+
};
|
|
10
|
+
counter: {
|
|
11
|
+
control: string;
|
|
12
|
+
};
|
|
13
|
+
textColor: {
|
|
14
|
+
control: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
19
|
+
interface Story<T> {
|
|
20
|
+
(args: T): TemplateResult;
|
|
21
|
+
args?: Partial<T>;
|
|
22
|
+
argTypes?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
interface ArgTypes {
|
|
25
|
+
title?: string;
|
|
26
|
+
counter?: number;
|
|
27
|
+
textColor?: string;
|
|
28
|
+
slot?: TemplateResult;
|
|
29
|
+
}
|
|
30
|
+
export declare const Regular: Story<ArgTypes>;
|
|
31
|
+
export declare const CustomTitle: Story<ArgTypes>;
|
|
32
|
+
export declare const CustomCounter: Story<ArgTypes>;
|
|
33
|
+
export declare const SlottedContent: Story<ArgTypes>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import '../src/ox-oops';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'ContextMenu',
|
|
5
|
+
component: 'ox-oops',
|
|
6
|
+
argTypes: {
|
|
7
|
+
title: { control: 'text' },
|
|
8
|
+
counter: { control: 'number' },
|
|
9
|
+
textColor: { control: 'color' }
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const Template = ({ title = 'Hello world', counter = 5, textColor, slot }) => html `
|
|
13
|
+
<ox-oops style="--ox-oops-text-color: ${textColor || 'black'}" .title=${title} .counter=${counter}> ${slot} </ox-oops>
|
|
14
|
+
`;
|
|
15
|
+
export const Regular = Template.bind({});
|
|
16
|
+
export const CustomTitle = Template.bind({});
|
|
17
|
+
CustomTitle.args = {
|
|
18
|
+
title: 'My title'
|
|
19
|
+
};
|
|
20
|
+
export const CustomCounter = Template.bind({});
|
|
21
|
+
CustomCounter.args = {
|
|
22
|
+
counter: 123456
|
|
23
|
+
};
|
|
24
|
+
export const SlottedContent = Template.bind({});
|
|
25
|
+
SlottedContent.args = {
|
|
26
|
+
slot: html `<p>Slotted content</p>`
|
|
27
|
+
};
|
|
28
|
+
SlottedContent.argTypes = {
|
|
29
|
+
slot: { table: { disable: true } }
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../stories/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAA;AAEvB,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9B,SAAS,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KAChC;CACF,CAAA;AAeD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,aAAa,EAAE,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;0CACnE,SAAS,IAAI,OAAO,YAAY,KAAK,aAAa,OAAO,KAAK,IAAI;CAC3G,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAExC,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,WAAW,CAAC,IAAI,GAAG;IACjB,KAAK,EAAE,UAAU;CAClB,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC9C,aAAa,CAAC,IAAI,GAAG;IACnB,OAAO,EAAE,MAAM;CAChB,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC/C,cAAc,CAAC,IAAI,GAAG;IACpB,IAAI,EAAE,IAAI,CAAA,wBAAwB;CACnC,CAAA;AACD,cAAc,CAAC,QAAQ,GAAG;IACxB,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;CACnC,CAAA","sourcesContent":["import '../src/ox-oops'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ContextMenu',\n component: 'ox-oops',\n argTypes: {\n title: { control: 'text' },\n counter: { control: 'number' },\n textColor: { control: 'color' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n title?: string\n counter?: number\n textColor?: string\n slot?: TemplateResult\n}\n\nconst Template: Story<ArgTypes> = ({ title = 'Hello world', counter = 5, textColor, slot }: ArgTypes) => html`\n <ox-oops style=\"--ox-oops-text-color: ${textColor || 'black'}\" .title=${title} .counter=${counter}> ${slot} </ox-oops>\n`\n\nexport const Regular = Template.bind({})\n\nexport const CustomTitle = Template.bind({})\nCustomTitle.args = {\n title: 'My title'\n}\n\nexport const CustomCounter = Template.bind({})\nCustomCounter.args = {\n counter: 123456\n}\n\nexport const SlottedContent = Template.bind({})\nSlottedContent.args = {\n slot: html`<p>Slotted content</p>`\n}\nSlottedContent.argTypes = {\n slot: { table: { disable: true } }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/@types/trusted-types/index.d.ts","../../../node_modules/lit-html/directive.d.ts","../../../node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/lit/index.d.ts","../../../node_modules/@lit/reactive-element/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../../../node_modules/@lit/reactive-element/decorators/property.d.ts","../../../node_modules/@lit/reactive-element/decorators/state.d.ts","../../../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../../../node_modules/@lit/reactive-element/decorators/query.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../../../node_modules/lit/decorators.d.ts","../../styles/dist/src/headroom-styles.d.ts","../../styles/dist/src/scrollbar-styles.d.ts","../../styles/dist/src/spinner-styles.d.ts","../../styles/dist/src/index.d.ts","../src/ox-oops.ts","../../../node_modules/@material/mwc-icon/mwc-icon.d.ts","../src/ox-oops-note.ts","../../../node_modules/lit-element/decorators.d.ts","../../../node_modules/lit-element/index.d.ts","../src/ox-oops-spinner.ts","../src/index.ts","../stories/index.stories.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileInfos":[{"version":"6adbf5efd0e374ff5f427a4f26a5a413e9734eee5067a0e86da69aea41910b52","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75","0c8a56610b08f55e29ffb466cd27626ad6dbe822312a398026e82270c63088e3","1e5743b25a63fd34ffbae89adcbf248ee17db6ed08d90079ffa93803c3e80d2a","7b33ee85f2e96a51c0e3bcee47b247a24515aff37a7d8b5dfe4e18b735d37440","2fcd2d22b1f30555e785105597cd8f57ed50300e213c4f1bbca6ae149f782c38",{"version":"bb4248c7f953233ac52332088fac897d62b82be07244e551d87c5049600b6cf7","affectsGlobalScope":true},"70f04c91d3186b1b10157157887fab664968fc9b88377785a5ee42750c202c6d","06e20da1bc94df355f22ac7a9533c2488816ec4cb9134d9b160a263629a07072","c311ef8d8b159d0c268b415f78c1949498dc2d14455a9891c5b8ef84625b1e41","f07a77a7fb1d49aa2b61cb68bf712a083487acd7130d20223a83de03af0c257d","97c58f6db61d45712d91d2260994817ae2b568bbb37cc280013079b6b5d2232d","ac388c7c7a262213a3700451bc921e382a93fb27c0252c34ccf03540b4ce044b","9bdb35d0b28dcd5d8f0879bd29f0cf07b7eb48aa63be4dd44057e32fcfeb1c83","fb0107c83e2e0e75b77dacd0c3c6c3ab6844e98dce2a8f858c6f0a57c12136a6","84610cf09dee3cefc910555318f1ad7b45f1cba36905a86849324ca4fead2385","a25d1e52291791819032826af5c52987e16ffdb96e8bb69f7f1790f5ab080be6","d660961abada6b5030461f3322ef3a2e1d9fec74167574f8b590a7796cf90a72","707b4eae3d469b2f347d2083037151922f94c370a9456ebd5ac0a4fb7441c7e7","ef509d57201aa4e2e3e2b3d1fafd066a8ce68cd2caea737d539c3544f5a99a67","84c66a77a1302611ea5001dc88d10de1b5d87c6b2f30a48585495217421ce1ac","cf93fb9208a01c80f0fad245c4360356e5de6c2384b7641acf0b9cc2f5c42448","336398b0efaf964124e636a9b29c4edd5870aee79ac64bf87be58a9d66b7c048","571bc65ec37ba124e762bb822e14a2b8502dc684e356be8feaccbd6b9cadd023","0766fae8dbc740ce8a4731666a1537594d7763f71f46bbfef67ed9d7a34cb0cc","a2b2168acf156a2e09e0222c1c559565104652ae4c904aff6bb660fe427103c2",{"version":"27b285e901600242883d62a5fff9f5d262c6fa128b6e6c6963f981f2630a957e","affectsGlobalScope":true},"99341f466b988c5623da195420f334d2c1aa2b52a127e356c10bb11e104c9658","73b7d7df7c0dbc9a4c07c8c0f9bf6b436a0c728884e3425b120a65dd7459584e","3e96c96efad5d403b16c4b3d9cf99b3e86267a046abef94fe37cfa97ec013f23","0ae5472cf0a64ebfc820db6e5d4a46a84a84ce6c5e1226f1c0ba2d1e44771923","42eed1ca428d912eb9cf1843351d0008c4cadce348492d5be4043d5c37f29eaa","a2f54d7978d6f54c821e6bc8f9f75c7ac8c4911bc2affb0c31f051b3c21d7e53","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"9acfe4d1ff027015151ce81d60797b04b52bffe97ad8310bb0ec2e8fd61e1303","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","5533392c50c51b1a5c32b89f13145db929c574ef1c5949cf67a074a05ea107d9","b287b810b5035d5685f1df6e1e418f1ca452a3ed4f59fd5cc081dbf2045f0d9b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"902cd98bf46e95caf4118a0733fb801e9e90eec3edaed6abdad77124afec9ca2","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","cd4854d38f4eb5592afd98ab95ca17389a7dfe38013d9079e802d739bdbcc939","94eed4cc2f5f658d5e229ff1ccd38860bddf4233e347bf78edd2154dee1f2b99",{"version":"bd1a08e30569b0fb2f0b21035eb9b039871f68faa9b98accf847e9c878c5e0a9","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","d7838022c7dab596357a9604b9c6adffe37dc34085ce0779c958ce9545bd7139","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"a7971f9fb2a32ec7788ec6cda9d7a33c02023dfe9a62db2030ad1359649d8050","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4","d88ecca73348e7c337541c4b8b60a50aca5e87384f6b8a422fc6603c637e4c21","badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1cdb8f094b969dcc183745dc88404e2d8fcf2a858c6e7cc2441011476573238e",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./","rootDir":"..","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[115],[43,115],[50,115],[43,50,115],[41,42,115],[49,115],[72,115],[75,115],[76,81,115],[77,87,88,95,104,114,115],[77,78,87,95,115],[79,115],[80,81,88,96,115],[81,104,111,115],[82,84,87,95,115],[83,115],[84,85,115],[86,87,115],[87,115],[87,88,89,104,114,115],[87,88,89,104,115],[90,95,104,114,115],[87,88,90,91,95,104,111,114,115],[90,92,104,111,114,115],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],[87,93,115],[94,114,115],[84,87,95,104,115],[96,115],[97,115],[75,98,115],[99,113,115,119],[100,115],[101,115],[87,102,115],[102,103,115,117],[87,104,105,106,115],[104,106,115],[104,105,115],[107,115],[108,115],[87,109,110,115],[109,110,115],[81,95,111,115],[112,115],[95,113,115],[76,90,101,114,115],[81,115],[104,115,116],[115,117],[115,118],[76,81,87,89,98,104,114,115,117,119],[104,115,120],[44,115],[50,51,52,53,54,55,56,57,58,115],[43,47,48,67,115],[43,47,115],[47,115],[45,46,115],[51,52,53,54,55,56,57,58,115],[43,47,48,115],[40,64,66,69,115],[40,49,59,65,115],[40,49,68,115],[40,47,49,59,63,115],[40,49,64,115],[60,61,62,115]],"referencedMap":[[41,1],[50,2],[51,3],[54,4],[52,4],[56,4],[58,4],[57,4],[55,4],[53,3],[42,1],[43,5],[65,6],[123,1],[72,7],[73,7],[75,8],[76,9],[77,10],[78,11],[79,12],[80,13],[81,14],[82,15],[83,16],[84,17],[85,17],[86,18],[87,19],[88,20],[89,21],[74,1],[121,1],[90,22],[91,23],[92,24],[122,25],[93,26],[94,27],[95,28],[96,29],[97,30],[98,31],[99,32],[100,33],[101,34],[102,35],[103,36],[104,37],[106,38],[105,39],[107,40],[108,41],[109,42],[110,43],[111,44],[112,45],[113,46],[114,47],[115,48],[116,49],[117,50],[118,51],[119,52],[120,53],[45,54],[44,1],[67,55],[68,56],[48,57],[46,58],[47,59],[59,60],[49,61],[40,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[70,62],[66,63],[69,64],[64,65],[71,66],[60,6],[63,67],[61,6],[62,6]],"exportedModulesMap":[[41,1],[50,2],[51,3],[54,4],[52,4],[56,4],[58,4],[57,4],[55,4],[53,3],[42,1],[43,5],[65,6],[123,1],[72,7],[73,7],[75,8],[76,9],[77,10],[78,11],[79,12],[80,13],[81,14],[82,15],[83,16],[84,17],[85,17],[86,18],[87,19],[88,20],[89,21],[74,1],[121,1],[90,22],[91,23],[92,24],[122,25],[93,26],[94,27],[95,28],[96,29],[97,30],[98,31],[99,32],[100,33],[101,34],[102,35],[103,36],[104,37],[106,38],[105,39],[107,40],[108,41],[109,42],[110,43],[111,44],[112,45],[113,46],[114,47],[115,48],[116,49],[117,50],[118,51],[119,52],[120,53],[45,54],[44,1],[67,55],[68,56],[48,57],[46,58],[47,59],[59,60],[49,61],[40,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[38,1],[34,1],[35,1],[36,1],[37,1],[1,1],[39,1],[70,62],[66,63],[69,64],[64,65],[71,66],[60,6],[63,67],[61,6],[62,6]],"semanticDiagnosticsPerFile":[41,50,51,54,52,56,58,57,55,53,42,43,65,123,72,73,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,74,121,90,91,92,122,93,94,95,96,97,98,99,100,101,102,103,104,106,105,107,108,109,110,111,112,113,114,115,116,117,118,119,120,45,44,67,68,48,46,47,59,49,40,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,38,34,35,36,37,1,39,70,66,69,64,71,60,63,61,62]},"version":"4.5.2"}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@operato/oops",
|
|
3
|
+
"description": "Webcomponent oops following open-wc recommendations",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": "heartyoh",
|
|
6
|
+
"version": "0.2.46",
|
|
7
|
+
"main": "dist/src/index.js",
|
|
8
|
+
"module": "dist/src/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/src/index.js"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public",
|
|
14
|
+
"@operato:registry": "https://registry.npmjs.org"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/hatiolab/operato.git",
|
|
19
|
+
"directory": "webcomponents/oops"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"analyze": "cem analyze --litelement",
|
|
23
|
+
"start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
|
|
24
|
+
"build": "tsc && npm run analyze -- --exclude dist",
|
|
25
|
+
"prepublish": "tsc && npm run analyze -- --exclude dist",
|
|
26
|
+
"lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
|
|
27
|
+
"format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
|
|
28
|
+
"test": "tsc && wtr --coverage",
|
|
29
|
+
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
|
|
30
|
+
"storybook": "tsc && npm run analyze -- --exclude dist && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds -c .storybook/server.mjs\"",
|
|
31
|
+
"storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@material/mwc-icon": "^0.25.3",
|
|
35
|
+
"@operato/styles": "^0.2.46",
|
|
36
|
+
"lit": "^2.0.2"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
40
|
+
"@hatiolab/prettier-config": "^1.0.0",
|
|
41
|
+
"@open-wc/eslint-config": "^4.3.0",
|
|
42
|
+
"@open-wc/testing": "next",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
44
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
45
|
+
"@web/dev-server": "^0.1.25",
|
|
46
|
+
"@web/dev-server-storybook": "next",
|
|
47
|
+
"@web/test-runner": "next",
|
|
48
|
+
"concurrently": "^5.3.0",
|
|
49
|
+
"eslint": "^7.32.0",
|
|
50
|
+
"eslint-config-prettier": "^8.3.0",
|
|
51
|
+
"husky": "^4.3.8",
|
|
52
|
+
"lint-staged": "^10.5.4",
|
|
53
|
+
"prettier": "^2.4.1",
|
|
54
|
+
"tslib": "^2.3.1",
|
|
55
|
+
"typescript": "^4.5.2"
|
|
56
|
+
},
|
|
57
|
+
"customElements": "custom-elements.json",
|
|
58
|
+
"prettier": "@hatiolab/prettier-config",
|
|
59
|
+
"husky": {
|
|
60
|
+
"hooks": {
|
|
61
|
+
"pre-commit": "lint-staged"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"lint-staged": {
|
|
65
|
+
"*.ts": [
|
|
66
|
+
"eslint --fix",
|
|
67
|
+
"prettier --write"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"gitHead": "70591a39c0b794a2a7765e9fcddb3e716ae95ecf"
|
|
71
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import '@material/mwc-icon'
|
|
2
|
+
|
|
3
|
+
import { css, html, LitElement } from 'lit'
|
|
4
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
5
|
+
|
|
6
|
+
@customElement('ox-oops-note')
|
|
7
|
+
export class OxOopsNote extends LitElement {
|
|
8
|
+
static styles = css`
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
text-align: center;
|
|
12
|
+
}
|
|
13
|
+
mwc-icon {
|
|
14
|
+
font: var(--oops-note-icon-font);
|
|
15
|
+
color: var(--oops-note-icon-color);
|
|
16
|
+
border: var(--oops-note-icon-border);
|
|
17
|
+
border-radius: var(--oops-note-icon-border-radius);
|
|
18
|
+
padding: var(--oops-note-icon-padding);
|
|
19
|
+
}
|
|
20
|
+
[title] {
|
|
21
|
+
margin: var(--oops-note-title-margin);
|
|
22
|
+
font: var(--oops-note-title-font);
|
|
23
|
+
color: var(--oops-note-title-color);
|
|
24
|
+
text-transform: capitalize;
|
|
25
|
+
}
|
|
26
|
+
[description] {
|
|
27
|
+
font: var(--oops-note-description-font);
|
|
28
|
+
color: var(--oops-note-description-color);
|
|
29
|
+
}
|
|
30
|
+
`
|
|
31
|
+
|
|
32
|
+
@property({ type: String }) icon!: string
|
|
33
|
+
@property({ type: String }) title: string = ''
|
|
34
|
+
@property({ type: String }) description: string = ''
|
|
35
|
+
|
|
36
|
+
render() {
|
|
37
|
+
return html`
|
|
38
|
+
<mwc-icon>${this.icon}</mwc-icon>
|
|
39
|
+
<div title>${this.title}</div>
|
|
40
|
+
<div description>${this.description}</div>
|
|
41
|
+
`
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { css, html, LitElement } from 'lit'
|
|
2
|
+
import { customElement } from 'lit-element'
|
|
3
|
+
|
|
4
|
+
@customElement('ox-oops-spinner')
|
|
5
|
+
export class OxOopsSpinner extends LitElement {
|
|
6
|
+
static styles = css`
|
|
7
|
+
:host {
|
|
8
|
+
width: 70px;
|
|
9
|
+
height: 70px;
|
|
10
|
+
margin: 0 auto;
|
|
11
|
+
background: url(/assets/images/spinner.png) 0 0 no-repeat;
|
|
12
|
+
background-size: 700%;
|
|
13
|
+
animation: spinner steps(6) 2s infinite both;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@keyframes spinner {
|
|
17
|
+
0% {
|
|
18
|
+
background-position: 0%;
|
|
19
|
+
}
|
|
20
|
+
100% {
|
|
21
|
+
background-position: 100%;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`
|
|
25
|
+
|
|
26
|
+
render() {
|
|
27
|
+
return html``
|
|
28
|
+
}
|
|
29
|
+
}
|
package/src/ox-oops.ts
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { css, html, LitElement } from 'lit'
|
|
2
|
+
import { render } from 'lit-html'
|
|
3
|
+
import { customElement, state } from 'lit/decorators.js'
|
|
4
|
+
|
|
5
|
+
import { ScrollbarStyles } from '@operato/styles'
|
|
6
|
+
|
|
7
|
+
@customElement('ox-oops')
|
|
8
|
+
export class OxOops extends LitElement {
|
|
9
|
+
static styles = [
|
|
10
|
+
ScrollbarStyles,
|
|
11
|
+
css`
|
|
12
|
+
:host {
|
|
13
|
+
position: absolute;
|
|
14
|
+
display: none;
|
|
15
|
+
background-color: var(--theme-white-color, #fff);
|
|
16
|
+
z-index: 100;
|
|
17
|
+
padding: 4px 0;
|
|
18
|
+
box-shadow: 2px 3px 10px 5px rgba(0, 0, 0, 0.15);
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
min-width: fit-content;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host([active]) {
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host(*:focus) {
|
|
28
|
+
outline: none;
|
|
29
|
+
}
|
|
30
|
+
::slotted(*) {
|
|
31
|
+
padding: 5px 10px;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
::slotted(*:focus) {
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
::slotted([menu][active]),
|
|
40
|
+
::slotted([menu]:hover) {
|
|
41
|
+
background-color: #f6f6f6;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
::slotted([menu]),
|
|
45
|
+
::slotted(ox-oops-menuitem) {
|
|
46
|
+
border-left: 3px solid transparent;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
::slotted(ox-oops-menuitem[active]) {
|
|
50
|
+
border-left: 3px solid var(--primary-color, #38a25b);
|
|
51
|
+
font-weight: bold;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
::slotted([separator]) {
|
|
55
|
+
height: 1px;
|
|
56
|
+
width: 100%;
|
|
57
|
+
padding: 0;
|
|
58
|
+
background-color: rgba(0, 0, 0, 0.15);
|
|
59
|
+
}
|
|
60
|
+
::slotted([menu] > input) {
|
|
61
|
+
border: var(--border-dark-color, 1px solid rgba(0, 0, 0, 0.3));
|
|
62
|
+
}
|
|
63
|
+
`
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
@state() _parent?: Element
|
|
67
|
+
|
|
68
|
+
render() {
|
|
69
|
+
return html` <slot> </slot> `
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
protected _onfocusout: (e: FocusEvent) => void = function (this: OxOops, e: FocusEvent) {
|
|
73
|
+
const to = e.relatedTarget as HTMLElement
|
|
74
|
+
|
|
75
|
+
if (!this.contains(to)) {
|
|
76
|
+
/* 분명히 내 범위가 아닌 엘리먼트로 포커스가 옮겨졌다면, ox-oops은 닫혀야 한다. */
|
|
77
|
+
// @ts-ignore for debug
|
|
78
|
+
!window.POPUP_DEBUG && this.close()
|
|
79
|
+
}
|
|
80
|
+
}.bind(this)
|
|
81
|
+
|
|
82
|
+
protected _onkeydown: (e: KeyboardEvent) => void = function (this: OxOops, e: KeyboardEvent) {
|
|
83
|
+
e.stopPropagation()
|
|
84
|
+
|
|
85
|
+
switch (e.key) {
|
|
86
|
+
case 'Esc': // for IE/Edge
|
|
87
|
+
case 'Escape':
|
|
88
|
+
this.close()
|
|
89
|
+
break
|
|
90
|
+
}
|
|
91
|
+
}.bind(this)
|
|
92
|
+
|
|
93
|
+
protected _onkeyup: (e: KeyboardEvent) => void = function (this: OxOops, e: KeyboardEvent) {
|
|
94
|
+
e.stopPropagation()
|
|
95
|
+
}.bind(this)
|
|
96
|
+
|
|
97
|
+
protected _onclick: (e: MouseEvent) => void = function (this: OxOops, e: MouseEvent) {
|
|
98
|
+
e.stopPropagation()
|
|
99
|
+
}.bind(this)
|
|
100
|
+
|
|
101
|
+
protected _onclose: (e: Event) => void = function (this: OxOops, e: Event) {
|
|
102
|
+
this.close()
|
|
103
|
+
}.bind(this)
|
|
104
|
+
|
|
105
|
+
protected _oncollapse: (e: Event) => void = function (this: OxOops, e: Event) {
|
|
106
|
+
e.stopPropagation()
|
|
107
|
+
this.close()
|
|
108
|
+
}.bind(this)
|
|
109
|
+
|
|
110
|
+
protected _onwindowblur: (e: Event) => void = function (this: OxOops, e: Event) {
|
|
111
|
+
// @ts-ignore for debug
|
|
112
|
+
!window.POPUP_DEBUG && this.close()
|
|
113
|
+
}.bind(this)
|
|
114
|
+
|
|
115
|
+
connectedCallback() {
|
|
116
|
+
super.connectedCallback()
|
|
117
|
+
|
|
118
|
+
this.addEventListener('focusout', this._onfocusout)
|
|
119
|
+
this.addEventListener('keydown', this._onkeydown)
|
|
120
|
+
this.addEventListener('keyup', this._onkeyup)
|
|
121
|
+
this.addEventListener('click', this._onclick)
|
|
122
|
+
this.addEventListener('ox-close', this._onclose)
|
|
123
|
+
this.addEventListener('ox-collapse', this._oncollapse)
|
|
124
|
+
|
|
125
|
+
this.setAttribute('tabindex', '0') // make this element focusable
|
|
126
|
+
this.guaranteeFocus()
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Configuration for opening ox-oops
|
|
131
|
+
*
|
|
132
|
+
* @typedef {Object} OopsOpenOptions
|
|
133
|
+
* @property {HTMLTemplate} template HTMLTemplate to be displayed inside the oops
|
|
134
|
+
* @property {Number} top The position-top where the pop-up will be displayed
|
|
135
|
+
* @property {Number} left The position-left where the pop-up will be displayed
|
|
136
|
+
* @property {HTMLElement} parent Oops's parent element
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Open Oops
|
|
141
|
+
*
|
|
142
|
+
* @param {OopsOpenOptions}
|
|
143
|
+
*/
|
|
144
|
+
static open({
|
|
145
|
+
template,
|
|
146
|
+
top,
|
|
147
|
+
left,
|
|
148
|
+
right,
|
|
149
|
+
bottom,
|
|
150
|
+
parent
|
|
151
|
+
}: {
|
|
152
|
+
template: unknown
|
|
153
|
+
top?: number
|
|
154
|
+
left?: number
|
|
155
|
+
right?: number
|
|
156
|
+
bottom?: number
|
|
157
|
+
parent?: Element | null
|
|
158
|
+
}) {
|
|
159
|
+
const owner = parent || document.body
|
|
160
|
+
const target = document.createElement('ox-oops') as OxOops
|
|
161
|
+
|
|
162
|
+
render(template, target)
|
|
163
|
+
|
|
164
|
+
target._parent = owner
|
|
165
|
+
owner.appendChild(target)
|
|
166
|
+
|
|
167
|
+
target.open({ top, left, right, bottom })
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
open({
|
|
171
|
+
left,
|
|
172
|
+
top,
|
|
173
|
+
right,
|
|
174
|
+
bottom,
|
|
175
|
+
silent = false
|
|
176
|
+
}: {
|
|
177
|
+
left?: number
|
|
178
|
+
top?: number
|
|
179
|
+
right?: number
|
|
180
|
+
bottom?: number
|
|
181
|
+
silent?: boolean
|
|
182
|
+
}) {
|
|
183
|
+
if (left !== undefined) this.style.left = `${left}px`
|
|
184
|
+
if (top !== undefined) this.style.top = `${top}px`
|
|
185
|
+
if (right !== undefined) this.style.right = `${right}px`
|
|
186
|
+
if (bottom !== undefined) this.style.bottom = `${bottom}px`
|
|
187
|
+
|
|
188
|
+
this.setAttribute('active', '')
|
|
189
|
+
|
|
190
|
+
!silent && this.guaranteeFocus()
|
|
191
|
+
|
|
192
|
+
/* When the window is out of focus, all pop-ups should disappear. */
|
|
193
|
+
window.addEventListener('blur', this._onwindowblur)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
guaranteeFocus() {
|
|
197
|
+
const focusible = this.querySelector(
|
|
198
|
+
':scope > button, :scope > [href], :scope > input, :scope > select, :scope > textarea, :scope > [tabindex]:not([tabindex="-1"])'
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
if (focusible) {
|
|
202
|
+
;(focusible as HTMLElement).focus()
|
|
203
|
+
} else {
|
|
204
|
+
this.focus()
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
close() {
|
|
209
|
+
this.removeAttribute('active')
|
|
210
|
+
|
|
211
|
+
window.removeEventListener('blur', this._onwindowblur)
|
|
212
|
+
|
|
213
|
+
if (this._parent) {
|
|
214
|
+
/* this case is when the oops is opened by OxOops.open(...) */
|
|
215
|
+
this.removeEventListener('focusout', this._onfocusout)
|
|
216
|
+
this.removeEventListener('keydown', this._onkeydown)
|
|
217
|
+
this.removeEventListener('keyup', this._onkeyup)
|
|
218
|
+
this.removeEventListener('click', this._onclick)
|
|
219
|
+
this.removeEventListener('ox-close', this._onclose)
|
|
220
|
+
this.removeEventListener('ox-collapse', this._oncollapse)
|
|
221
|
+
|
|
222
|
+
this._parent.removeChild(this)
|
|
223
|
+
delete this._parent
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import '../src/ox-oops'
|
|
2
|
+
|
|
3
|
+
import { html, TemplateResult } from 'lit'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'ContextMenu',
|
|
7
|
+
component: 'ox-oops',
|
|
8
|
+
argTypes: {
|
|
9
|
+
title: { control: 'text' },
|
|
10
|
+
counter: { control: 'number' },
|
|
11
|
+
textColor: { control: 'color' }
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Story<T> {
|
|
16
|
+
(args: T): TemplateResult
|
|
17
|
+
args?: Partial<T>
|
|
18
|
+
argTypes?: Record<string, unknown>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface ArgTypes {
|
|
22
|
+
title?: string
|
|
23
|
+
counter?: number
|
|
24
|
+
textColor?: string
|
|
25
|
+
slot?: TemplateResult
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const Template: Story<ArgTypes> = ({ title = 'Hello world', counter = 5, textColor, slot }: ArgTypes) => html`
|
|
29
|
+
<ox-oops style="--ox-oops-text-color: ${textColor || 'black'}" .title=${title} .counter=${counter}> ${slot} </ox-oops>
|
|
30
|
+
`
|
|
31
|
+
|
|
32
|
+
export const Regular = Template.bind({})
|
|
33
|
+
|
|
34
|
+
export const CustomTitle = Template.bind({})
|
|
35
|
+
CustomTitle.args = {
|
|
36
|
+
title: 'My title'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const CustomCounter = Template.bind({})
|
|
40
|
+
CustomCounter.args = {
|
|
41
|
+
counter: 123456
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const SlottedContent = Template.bind({})
|
|
45
|
+
SlottedContent.args = {
|
|
46
|
+
slot: html`<p>Slotted content</p>`
|
|
47
|
+
}
|
|
48
|
+
SlottedContent.argTypes = {
|
|
49
|
+
slot: { table: { disable: true } }
|
|
50
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2018",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"noEmitOnError": true,
|
|
7
|
+
"lib": ["es2017", "dom"],
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": false,
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"importHelpers": true,
|
|
13
|
+
"outDir": "dist",
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"inlineSources": true,
|
|
16
|
+
"rootDir": "./",
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"incremental": true,
|
|
19
|
+
"types": ["node", "mocha"]
|
|
20
|
+
},
|
|
21
|
+
"include": ["**/*.ts"]
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
|
|
2
|
+
|
|
3
|
+
/** Use Hot Module replacement by adding --hmr to the start command */
|
|
4
|
+
const hmr = process.argv.includes('--hmr');
|
|
5
|
+
|
|
6
|
+
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
|
|
7
|
+
open: '/demo/',
|
|
8
|
+
/** Use regular watch mode if HMR is not enabled. */
|
|
9
|
+
watch: !hmr,
|
|
10
|
+
/** Resolve bare module imports */
|
|
11
|
+
nodeResolve: {
|
|
12
|
+
exportConditions: ['browser', 'development'],
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
/** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
|
|
16
|
+
// esbuildTarget: 'auto'
|
|
17
|
+
|
|
18
|
+
/** Set appIndex to enable SPA routing */
|
|
19
|
+
// appIndex: 'demo/index.html',
|
|
20
|
+
|
|
21
|
+
plugins: [
|
|
22
|
+
/** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
|
|
23
|
+
// hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
|
|
24
|
+
],
|
|
25
|
+
|
|
26
|
+
// See documentation for all available options
|
|
27
|
+
});
|