@redvars/peacock 3.2.10 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PeacockComponent-CxJc63xj.js → IndividualComponent-tDnXrOLV.js} +3 -3
- package/dist/IndividualComponent-tDnXrOLV.js.map +1 -0
- package/dist/assets/components.css +1 -1
- package/dist/assets/components.css.map +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/button-group-DA7xoziD.js +292 -0
- package/dist/button-group-DA7xoziD.js.map +1 -0
- package/dist/button-group.js +6 -107
- package/dist/button-group.js.map +1 -1
- package/dist/{button-DaL4va7Q.js → button-trIfcqC7.js} +21 -35
- package/dist/button-trIfcqC7.js.map +1 -0
- package/dist/button.js +5 -5
- package/dist/chart-donut.js +307 -0
- package/dist/chart-donut.js.map +1 -0
- package/dist/chart-doughnut.js +307 -0
- package/dist/chart-doughnut.js.map +1 -0
- package/dist/chart-pie.js +259 -0
- package/dist/chart-pie.js.map +1 -0
- package/dist/{class-map-BvQRv7eW.js → class-map-hJdvjl-W.js} +9 -3
- package/dist/class-map-hJdvjl-W.js.map +1 -0
- package/dist/clock.js +5 -6
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +38 -25
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +10 -14
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +8144 -3654
- package/dist/custom-elements.json +7925 -3901
- package/dist/{dispatch-event-utils-vbdiOSeC.js → dispatch-event-utils-B4odODQf.js} +2 -15
- package/dist/dispatch-event-utils-B4odODQf.js.map +1 -0
- package/dist/index.js +13 -10
- package/dist/index.js.map +1 -1
- package/dist/number-counter.js +12 -10
- package/dist/number-counter.js.map +1 -1
- package/dist/{observe-theme-change-NneLARW8.js → observe-theme-change-BISF-Gl5.js} +2 -2
- package/dist/{observe-theme-change-NneLARW8.js.map → observe-theme-change-BISF-Gl5.js.map} +1 -1
- package/dist/peacock-loader.js +94 -502
- package/dist/peacock-loader.js.map +1 -1
- package/dist/query-QBcUV-L_.js +15 -0
- package/dist/query-QBcUV-L_.js.map +1 -0
- package/dist/src/IndividualComponent.d.ts +1 -0
- package/dist/src/accordion/{accordion-item/accordion-item.d.ts → accordion-item.d.ts} +5 -4
- package/dist/src/accordion/{accordion/accordion.d.ts → accordion.d.ts} +6 -6
- package/dist/src/accordion/{accordion-item/index.d.ts → index.d.ts} +1 -0
- package/dist/src/avatar/avatar.d.ts +2 -2
- package/dist/src/badge/badge.d.ts +2 -2
- package/dist/src/breadcrumb/breadcrumb/breadcrumb.d.ts +9 -8
- package/dist/src/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +4 -3
- package/dist/src/button/button/button.d.ts +2 -2
- package/dist/src/button/button-group/button-group.d.ts +9 -5
- package/dist/src/button/icon-button/icon-button.d.ts +2 -2
- package/dist/src/chart-donut/chart-donut.d.ts +53 -0
- package/dist/src/chart-donut/index.d.ts +1 -0
- package/dist/src/chart-doughnut/chart-doughnut.d.ts +53 -0
- package/dist/src/chart-doughnut/index.d.ts +1 -0
- package/dist/src/chart-pie/chart-pie.d.ts +50 -0
- package/dist/src/chart-pie/index.d.ts +1 -0
- package/dist/src/checkbox/checkbox.d.ts +3 -6
- package/dist/src/chip/chip/chip.d.ts +4 -4
- package/dist/src/chip/tag/tag.d.ts +3 -3
- package/dist/src/clock/clock.d.ts +3 -4
- package/dist/src/code-editor/code-editor.d.ts +13 -10
- package/dist/src/code-highlighter/code-highlighter.d.ts +4 -7
- package/dist/src/container/container.d.ts +6 -11
- package/dist/src/date-picker/date-picker.d.ts +3 -3
- package/dist/src/divider/divider.d.ts +2 -2
- package/dist/src/elevation/elevation.d.ts +2 -2
- package/dist/src/empty-state/empty-state.d.ts +9 -2
- package/dist/src/field/field.d.ts +17 -0
- package/dist/src/focus-ring/focus-ring.d.ts +1 -1
- package/dist/src/icon/icon.d.ts +2 -2
- package/dist/src/image/image.d.ts +4 -12
- package/dist/src/index.d.ts +9 -1
- package/dist/src/input/input.d.ts +2 -2
- package/dist/src/link/link.d.ts +4 -5
- package/dist/src/menu/index.d.ts +3 -0
- package/dist/src/menu/menu/MenuSurfaceController.d.ts +18 -0
- package/dist/src/menu/menu/menu.d.ts +66 -8
- package/dist/src/menu/menu-item/menu-item.d.ts +24 -5
- package/dist/src/menu/sub-menu/sub-menu.d.ts +36 -0
- package/dist/src/number-counter/number-counter.d.ts +9 -7
- package/dist/src/number-field/number-field.d.ts +1 -1
- package/dist/src/pagination/index.d.ts +1 -0
- package/dist/src/pagination/pagination.d.ts +38 -0
- package/dist/src/popover/PopoverController.d.ts +4 -1
- package/dist/src/popover/index.d.ts +1 -1
- package/dist/src/progress/circular-progress/circular-progress.d.ts +3 -3
- package/dist/src/progress/linear-progress/linear-progress.d.ts +3 -3
- package/dist/src/ripple/ripple.d.ts +60 -4
- package/dist/src/skeleton/skeleton.d.ts +6 -5
- package/dist/src/slider/index.d.ts +1 -0
- package/dist/src/slider/slider.d.ts +52 -0
- package/dist/src/spinner/spinner.d.ts +2 -2
- package/dist/src/switch/switch.d.ts +2 -2
- package/dist/src/table/index.d.ts +1 -0
- package/dist/src/table/table.d.ts +110 -0
- package/dist/src/tabs/index.d.ts +4 -0
- package/dist/src/tabs/tab-group.d.ts +45 -0
- package/dist/src/tabs/tab-panel.d.ts +22 -0
- package/dist/src/tabs/tab.d.ts +59 -0
- package/dist/src/tabs/tabs.d.ts +29 -0
- package/dist/src/textarea/textarea.d.ts +3 -3
- package/dist/src/time-picker/time-picker.d.ts +3 -3
- package/dist/src/{popover/tooltip → tooltip}/tooltip.d.ts +4 -3
- package/dist/src/tree-view/index.d.ts +2 -0
- package/dist/src/tree-view/tree-node.d.ts +69 -0
- package/dist/src/tree-view/tree-view.d.ts +40 -0
- package/dist/src/tree-view/wc-tree-view.d.ts +6 -0
- package/dist/{style-map-B8xgVEc9.js → style-map-CfNHEkQp.js} +2 -2
- package/dist/{style-map-B8xgVEc9.js.map → style-map-CfNHEkQp.js.map} +1 -1
- package/dist/test/icon.test.d.ts +1 -1
- package/dist/test/menu.test.d.ts +1 -0
- package/dist/test/sub-menu.test.d.ts +1 -0
- package/dist/test/tree-view.test.d.ts +1 -0
- package/dist/transform-DRuHEvar.js +3312 -0
- package/dist/transform-DRuHEvar.js.map +1 -0
- package/dist/{image-v3BujlY5.js → tree-view-CLolVlU0.js} +4088 -672
- package/dist/tree-view-CLolVlU0.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-B-dV3Jps.js → unsafe-html-CV6Je6HL.js} +2 -2
- package/dist/{unsafe-html-B-dV3Jps.js.map → unsafe-html-CV6Je6HL.js.map} +1 -1
- package/package.json +3 -1
- package/readme.md +40 -40
- package/src/{PeacockComponent.ts → IndividualComponent.ts} +1 -1
- package/src/accordion/{accordion-item/accordion-item.scss → accordion-item.scss} +1 -1
- package/src/accordion/{accordion-item/accordion-item.ts → accordion-item.ts} +7 -6
- package/src/accordion/{accordion/accordion.scss → accordion.scss} +2 -1
- package/src/accordion/{accordion/accordion.ts → accordion.ts} +6 -6
- package/src/accordion/{accordion-item/index.ts → index.ts} +2 -0
- package/src/avatar/avatar.ts +2 -2
- package/src/badge/badge.ts +2 -2
- package/src/breadcrumb/breadcrumb/breadcrumb.ts +10 -8
- package/src/breadcrumb/breadcrumb-item/breadcrumb-item.ts +4 -3
- package/src/button/BaseButton.ts +1 -1
- package/src/button/button/button.scss +9 -23
- package/src/button/button/button.ts +8 -8
- package/src/button/button-group/button-group.ts +13 -7
- package/src/button/icon-button/icon-button.ts +8 -8
- package/src/chart-donut/chart-donut.scss +37 -0
- package/src/chart-donut/chart-donut.ts +287 -0
- package/src/chart-donut/demo/index.html +51 -0
- package/src/chart-donut/index.ts +1 -0
- package/src/chart-doughnut/chart-donut.scss +37 -0
- package/src/chart-doughnut/chart-doughnut.ts +287 -0
- package/src/chart-doughnut/demo/index.html +51 -0
- package/src/chart-doughnut/index.ts +1 -0
- package/src/chart-pie/chart-pie.scss +27 -0
- package/src/chart-pie/chart-pie.ts +256 -0
- package/src/chart-pie/demo/index.html +51 -0
- package/src/chart-pie/index.ts +1 -0
- package/src/checkbox/checkbox.ts +3 -6
- package/src/chip/chip/chip.ts +6 -6
- package/src/chip/tag/tag.ts +6 -6
- package/src/clock/clock.ts +5 -6
- package/src/code-editor/code-editor.scss +3 -5
- package/src/code-editor/code-editor.ts +32 -16
- package/src/code-highlighter/code-highlighter.ts +8 -11
- package/src/container/container.ts +6 -11
- package/src/date-picker/date-picker.ts +7 -7
- package/src/divider/divider.scss +2 -2
- package/src/divider/divider.ts +2 -2
- package/src/elevation/elevation.ts +2 -2
- package/src/empty-state/empty-state.scss +1 -1
- package/src/empty-state/empty-state.ts +10 -3
- package/src/field/field.scss +4 -4
- package/src/field/field.ts +19 -2
- package/src/focus-ring/focus-ring.scss +2 -1
- package/src/focus-ring/focus-ring.ts +1 -1
- package/src/icon/icon.ts +2 -2
- package/src/icon/p-icon.ts +1 -1
- package/src/image/image.ts +4 -12
- package/src/index.ts +11 -3
- package/src/input/input.ts +6 -6
- package/src/link/link.ts +4 -5
- package/src/menu/index.ts +3 -0
- package/src/menu/menu/MenuSurfaceController.ts +61 -0
- package/src/menu/{menu-list/menu-list.scss → menu/menu.scss} +19 -4
- package/src/menu/menu/menu.ts +401 -77
- package/src/menu/menu-item/menu-item-colors.scss +2 -2
- package/src/menu/menu-item/menu-item.ts +128 -37
- package/src/menu/sub-menu/sub-menu.scss +7 -0
- package/src/menu/sub-menu/sub-menu.ts +243 -0
- package/src/number-counter/demo/index.html +1 -1
- package/src/number-counter/number-counter.ts +11 -9
- package/src/number-field/number-field.ts +7 -7
- package/src/pagination/index.ts +1 -0
- package/src/pagination/pagination.scss +59 -0
- package/src/pagination/pagination.ts +135 -0
- package/src/peacock-loader.ts +92 -51
- package/src/popover/PopoverController.ts +13 -7
- package/src/popover/index.ts +1 -1
- package/src/progress/circular-progress/circular-progress.scss +1 -1
- package/src/progress/circular-progress/circular-progress.ts +3 -3
- package/src/progress/linear-progress/linear-progress.ts +3 -3
- package/src/ripple/ripple.ts +478 -94
- package/src/skeleton/skeleton.ts +6 -5
- package/src/slider/index.ts +1 -0
- package/src/slider/slider.scss +130 -0
- package/src/slider/slider.ts +178 -0
- package/src/spinner/spinner.ts +2 -2
- package/src/switch/switch.ts +4 -4
- package/src/table/index.ts +1 -0
- package/src/table/table.scss +174 -0
- package/src/table/table.ts +475 -0
- package/src/tabs/index.ts +4 -0
- package/src/tabs/tab-group.scss +10 -0
- package/src/tabs/tab-group.ts +143 -0
- package/src/tabs/tab-panel.scss +12 -0
- package/src/tabs/tab-panel.ts +29 -0
- package/src/tabs/tab.scss +157 -0
- package/src/tabs/tab.ts +243 -0
- package/src/tabs/tabs.scss +19 -0
- package/src/tabs/tabs.ts +66 -0
- package/src/text/text.css-component.scss +6 -3
- package/src/textarea/textarea.ts +5 -5
- package/src/time-picker/time-picker.ts +7 -7
- package/src/{popover/tooltip → tooltip}/tooltip.scss +17 -14
- package/src/{popover/tooltip → tooltip}/tooltip.ts +12 -10
- package/src/tree-view/demo/index.html +57 -0
- package/src/tree-view/index.ts +2 -0
- package/src/tree-view/tree-node.scss +101 -0
- package/src/tree-view/tree-node.ts +268 -0
- package/src/tree-view/tree-view.scss +12 -0
- package/src/tree-view/tree-view.ts +182 -0
- package/src/tree-view/wc-tree-view.ts +9 -0
- package/dist/PeacockComponent-CxJc63xj.js.map +0 -1
- package/dist/button-DaL4va7Q.js.map +0 -1
- package/dist/class-map-BvQRv7eW.js.map +0 -1
- package/dist/dispatch-event-utils-vbdiOSeC.js.map +0 -1
- package/dist/image-v3BujlY5.js.map +0 -1
- package/dist/src/PeacockComponent.d.ts +0 -1
- package/dist/src/accordion/accordion/index.d.ts +0 -1
- package/dist/src/avatar/p-avatar.d.ts +0 -3
- package/dist/src/badge/p-badge.d.ts +0 -3
- package/dist/src/menu/menu-list/menu-list.d.ts +0 -7
- package/dist/state-B09bP3XH.js +0 -10
- package/dist/state-B09bP3XH.js.map +0 -1
- package/src/accordion/accordion/index.ts +0 -1
- package/src/avatar/p-avatar.ts +0 -5
- package/src/badge/p-badge.ts +0 -5
- package/src/menu/menu-list/menu-list.ts +0 -33
package/dist/clock.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i, _ as __decorate, n,
|
|
1
|
+
import { i, _ as __decorate, n, I as IndividualComponent, a as i$1, b } from './IndividualComponent-tDnXrOLV.js';
|
|
2
2
|
|
|
3
3
|
class ClockController {
|
|
4
4
|
constructor(host, timeout = 1000) {
|
|
@@ -44,19 +44,18 @@ var css_248z = i`* {
|
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* @label Clock
|
|
47
|
-
* @tag
|
|
47
|
+
* @tag wc-clock
|
|
48
48
|
* @rawTag clock
|
|
49
|
-
*
|
|
50
49
|
* @summary Displays the current time in a given timezone.
|
|
51
50
|
* @overview
|
|
52
51
|
* - Clocks are used to display the current time in a specified timezone.
|
|
53
52
|
* - They can be displayed in various formats, including 12-hour and 24-hour time.
|
|
53
|
+
* @tags display
|
|
54
54
|
*
|
|
55
55
|
* @example
|
|
56
56
|
* ```html
|
|
57
|
-
* <
|
|
57
|
+
* <wc-clock></wc-clock>
|
|
58
58
|
* ```
|
|
59
|
-
* @tags display
|
|
60
59
|
*/
|
|
61
60
|
let Clock = class Clock extends i$1 {
|
|
62
61
|
constructor() {
|
|
@@ -78,7 +77,7 @@ __decorate([
|
|
|
78
77
|
n()
|
|
79
78
|
], Clock.prototype, "timezone", void 0);
|
|
80
79
|
Clock = __decorate([
|
|
81
|
-
|
|
80
|
+
IndividualComponent
|
|
82
81
|
], Clock);
|
|
83
82
|
|
|
84
83
|
export { Clock };
|
package/dist/clock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clock.js","sources":["../../src/clock/ClockController.ts","../../src/clock/clock.ts"],"sourcesContent":["import { ReactiveController, ReactiveControllerHost } from 'lit';\n\nexport class ClockController implements ReactiveController {\n host: ReactiveControllerHost;\n\n value = new Date();\n\n timeout: number;\n\n private _timerID?: any;\n\n constructor(host: ReactiveControllerHost, timeout = 1000) {\n this.host = host;\n this.host.addController(this);\n this.timeout = timeout;\n }\n\n hostConnected() {\n // Start a timer when the host is connected\n this._timerID = setInterval(() => {\n this.value = new Date();\n // Update the host with new value\n this.host.requestUpdate();\n }, this.timeout);\n }\n\n hostDisconnected() {\n // Clear the timer when the host is disconnected\n clearInterval(this._timerID);\n this._timerID = undefined;\n }\n}\n","import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport
|
|
1
|
+
{"version":3,"file":"clock.js","sources":["../../src/clock/ClockController.ts","../../src/clock/clock.ts"],"sourcesContent":["import { ReactiveController, ReactiveControllerHost } from 'lit';\n\nexport class ClockController implements ReactiveController {\n host: ReactiveControllerHost;\n\n value = new Date();\n\n timeout: number;\n\n private _timerID?: any;\n\n constructor(host: ReactiveControllerHost, timeout = 1000) {\n this.host = host;\n this.host.addController(this);\n this.timeout = timeout;\n }\n\n hostConnected() {\n // Start a timer when the host is connected\n this._timerID = setInterval(() => {\n this.value = new Date();\n // Update the host with new value\n this.host.requestUpdate();\n }, this.timeout);\n }\n\n hostDisconnected() {\n // Clear the timer when the host is disconnected\n clearInterval(this._timerID);\n this._timerID = undefined;\n }\n}\n","import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport IndividualComponent from 'src/IndividualComponent.js';\nimport { ClockController } from './ClockController.js';\n\nimport styles from './clock.scss';\n\n/**\n * @label Clock\n * @tag wc-clock\n * @rawTag clock\n * @summary Displays the current time in a given timezone.\n * @overview\n * - Clocks are used to display the current time in a specified timezone.\n * - They can be displayed in various formats, including 12-hour and 24-hour time.\n * @tags display\n *\n * @example\n * ```html\n * <wc-clock></wc-clock>\n * ```\n */\n@IndividualComponent\nexport class Clock extends LitElement {\n static styles = [styles];\n\n clockController = new ClockController(this, 100);\n\n @property() timezone?: string;\n\n __formatDate(date: Date) {\n return date.toLocaleTimeString('en-US', {\n timeZone: this.timezone,\n });\n }\n\n render() {\n const currentDate = this.__formatDate(this.clockController.value);\n return html`<div class=\"current-time\">${currentDate}</div>`;\n }\n}\n"],"names":["LitElement","html","styles","property"],"mappings":";;MAEa,eAAe,CAAA;AAS1B,IAAA,WAAA,CAAY,IAA4B,EAAE,OAAO,GAAG,IAAI,EAAA;AANxD,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,IAAI,EAAE;AAOhB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;AAC7B,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;IACxB;IAEA,aAAa,GAAA;;AAEX,QAAA,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,MAAK;AAC/B,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,EAAE;;AAEvB,YAAA,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;AAC3B,QAAA,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC;IAClB;IAEA,gBAAgB,GAAA;;AAEd,QAAA,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC5B,QAAA,IAAI,CAAC,QAAQ,GAAG,SAAS;IAC3B;AACD;;;;;;;;;;;;;;;;;;;;;;ACxBD;;;;;;;;;;;;;;AAcG;AAEI,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQA,GAAU,CAAA;AAA9B,IAAA,WAAA,GAAA;;QAGL,IAAA,CAAA,eAAe,GAAG,IAAI,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC;IAclD;AAVE,IAAA,YAAY,CAAC,IAAU,EAAA;AACrB,QAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;YACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,SAAA,CAAC;IACJ;IAEA,MAAM,GAAA;AACJ,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;AACjE,QAAA,OAAOC,CAAI,CAAA,CAAA,0BAAA,EAA6B,WAAW,QAAQ;IAC7D;;AAfO,KAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAIZ,UAAA,CAAA;AAAX,IAAAC,CAAQ;AAAqB,CAAA,EAAA,KAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AALnB,KAAK,GAAA,UAAA,CAAA;IADjB;AACY,CAAA,EAAA,KAAK,CAiBjB;;;;"}
|
package/dist/code-editor.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i, _ as __decorate, n,
|
|
2
|
-
import { r } from './
|
|
3
|
-
import { e
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { i, _ as __decorate, n, I as IndividualComponent, A, b } from './IndividualComponent-tDnXrOLV.js';
|
|
2
|
+
import { r, e as e$1 } from './class-map-hJdvjl-W.js';
|
|
3
|
+
import { e } from './query-QBcUV-L_.js';
|
|
4
|
+
import { B as BaseInput, o as observeThemeChange } from './observe-theme-change-BISF-Gl5.js';
|
|
5
|
+
import { a as isDarkMode, r as redispatchEvent } from './dispatch-event-utils-B4odODQf.js';
|
|
6
6
|
import './directive-Cuw6h7YA.js';
|
|
7
7
|
|
|
8
8
|
// src/util.ts
|
|
@@ -43650,8 +43650,7 @@ var css_248z = i`@charset "UTF-8";
|
|
|
43650
43650
|
:host {
|
|
43651
43651
|
display: block;
|
|
43652
43652
|
height: 100%;
|
|
43653
|
-
--code-editor-
|
|
43654
|
-
--code-editor-border-radius: var(--shape-corner-small);
|
|
43653
|
+
--code-editor-height: 300px;
|
|
43655
43654
|
}
|
|
43656
43655
|
|
|
43657
43656
|
.code-editor-loader {
|
|
@@ -43670,11 +43669,10 @@ var css_248z = i`@charset "UTF-8";
|
|
|
43670
43669
|
display: block;
|
|
43671
43670
|
height: 100%;
|
|
43672
43671
|
position: relative;
|
|
43673
|
-
--field-height:
|
|
43674
|
-
min-height: 5rem;
|
|
43672
|
+
--field-height: var(--code-editor-height);
|
|
43675
43673
|
}
|
|
43676
43674
|
.code-editor-component .editor {
|
|
43677
|
-
height: var(--
|
|
43675
|
+
height: var(--code-editor-height);
|
|
43678
43676
|
}
|
|
43679
43677
|
.code-editor-component .monaco-editor {
|
|
43680
43678
|
--vscode-editor-background: transparent;
|
|
@@ -43688,6 +43686,18 @@ var css_248z = i`@charset "UTF-8";
|
|
|
43688
43686
|
top: var(--spacing-200);
|
|
43689
43687
|
}`;
|
|
43690
43688
|
|
|
43689
|
+
/**
|
|
43690
|
+
* @label Code Editor
|
|
43691
|
+
* @tag wc-code-editor
|
|
43692
|
+
* @rawTag code-editor
|
|
43693
|
+
* @summary A code editor component using Monaco Editor.
|
|
43694
|
+
* @tags input
|
|
43695
|
+
*
|
|
43696
|
+
* @example
|
|
43697
|
+
* ```html
|
|
43698
|
+
* <wc-code-editor language="javascript"></wc-code-editor>
|
|
43699
|
+
* ```
|
|
43700
|
+
*/
|
|
43691
43701
|
// At module level, outside the class
|
|
43692
43702
|
// @ts-ignore
|
|
43693
43703
|
// At module level, outside the class
|
|
@@ -43706,23 +43716,26 @@ self.MonacoEnvironment = {
|
|
|
43706
43716
|
};
|
|
43707
43717
|
/**
|
|
43708
43718
|
* @label Code Editor
|
|
43709
|
-
* @tag code-editor
|
|
43719
|
+
* @tag wc-code-editor
|
|
43710
43720
|
* @rawTag code-editor
|
|
43711
43721
|
*
|
|
43712
|
-
* @summary
|
|
43722
|
+
* @summary A Monaco-based code editing component with syntax highlighting and theming.
|
|
43713
43723
|
* @overview
|
|
43714
|
-
* -
|
|
43715
|
-
* -
|
|
43724
|
+
* - CodeEditor wraps Monaco Editor as a web component.
|
|
43725
|
+
* - Supports JS/JSON/HTML languages, read-only mode, line numbers, minimap, and dark/light theme.
|
|
43726
|
+
* - Emits `change` when content is edited and updates value from property changes.
|
|
43716
43727
|
*
|
|
43717
43728
|
* @example
|
|
43718
43729
|
* ```html
|
|
43719
|
-
* <code-
|
|
43720
|
-
*
|
|
43721
|
-
*
|
|
43722
|
-
* }
|
|
43723
|
-
*
|
|
43730
|
+
* <wc-code-editor
|
|
43731
|
+
* language="javascript"
|
|
43732
|
+
* style="width: 100%; --code-editor-height: 10rem;"
|
|
43733
|
+
* value="function hello() { console.log('Hello'); }"
|
|
43734
|
+
* lineNumbers="on"
|
|
43735
|
+
* minimap="false">
|
|
43736
|
+
* </wc-code-editor>
|
|
43724
43737
|
* ```
|
|
43725
|
-
* @tags
|
|
43738
|
+
* @tags input, editor
|
|
43726
43739
|
*/
|
|
43727
43740
|
let CodeEditor = class CodeEditor extends BaseInput {
|
|
43728
43741
|
constructor() {
|
|
@@ -43812,7 +43825,7 @@ let CodeEditor = class CodeEditor extends BaseInput {
|
|
|
43812
43825
|
async setBlur() { this.editorMonacoInstance?.trigger('keyboard', 'type', ''); /* Focus hack or use blur if available */ }
|
|
43813
43826
|
render() {
|
|
43814
43827
|
return b `
|
|
43815
|
-
<
|
|
43828
|
+
<wc-field
|
|
43816
43829
|
?required=${this.required}
|
|
43817
43830
|
?disabled=${this.disabled}
|
|
43818
43831
|
?readonly=${this.readonly}
|
|
@@ -43825,15 +43838,15 @@ let CodeEditor = class CodeEditor extends BaseInput {
|
|
|
43825
43838
|
})}"
|
|
43826
43839
|
>
|
|
43827
43840
|
${(this.disabled || this.readonly)
|
|
43828
|
-
? b `<
|
|
43841
|
+
? b `<wc-tag class="read-only-tag" color="red">Read Only</wc-tag>`
|
|
43829
43842
|
: A}
|
|
43830
43843
|
<div class="editor"></div>
|
|
43831
43844
|
${!this.editorMonacoInstance ? b `
|
|
43832
43845
|
<div class="code-editor-loader">
|
|
43833
|
-
<
|
|
43846
|
+
<wc-spinner></wc-spinner> Loading...
|
|
43834
43847
|
</div>
|
|
43835
43848
|
` : A}
|
|
43836
|
-
</
|
|
43849
|
+
</wc-field>
|
|
43837
43850
|
`;
|
|
43838
43851
|
}
|
|
43839
43852
|
};
|
|
@@ -43869,7 +43882,7 @@ __decorate([
|
|
|
43869
43882
|
e('.editor')
|
|
43870
43883
|
], CodeEditor.prototype, "editorElement", void 0);
|
|
43871
43884
|
CodeEditor = __decorate([
|
|
43872
|
-
|
|
43885
|
+
IndividualComponent
|
|
43873
43886
|
], CodeEditor);
|
|
43874
43887
|
var CodeEditor_default = CodeEditor;
|
|
43875
43888
|
|