@redvars/peacock 3.5.1 → 3.6.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/{BaseButton-DuASuVth.js → BaseButton-BNFAYn-S.js} +2 -2
- package/dist/{BaseButton-DuASuVth.js.map → BaseButton-BNFAYn-S.js.map} +1 -1
- package/dist/BaseInput-14YmcfK7.js +27 -0
- package/dist/BaseInput-14YmcfK7.js.map +1 -0
- package/dist/banner.js +2 -3
- package/dist/banner.js.map +1 -1
- package/dist/{button-DouvOfEU.js → button-colors-Ccys3hvS.js} +5 -294
- package/dist/button-colors-Ccys3hvS.js.map +1 -0
- package/dist/button-group.js +226 -6
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +294 -8
- package/dist/button.js.map +1 -1
- package/dist/calendar-column-view.js +634 -0
- package/dist/calendar-column-view.js.map +1 -0
- package/dist/calendar-event-BrQ_SEKD.js +199 -0
- package/dist/calendar-event-BrQ_SEKD.js.map +1 -0
- package/dist/calendar-month-view.js +376 -0
- package/dist/calendar-month-view.js.map +1 -0
- package/dist/calendar.js +339 -0
- package/dist/calendar.js.map +1 -0
- package/dist/canvas.js +361 -0
- package/dist/canvas.js.map +1 -0
- package/dist/cb-compound-expression.js +125 -0
- package/dist/cb-compound-expression.js.map +1 -0
- package/dist/cb-divider.js +150 -0
- package/dist/cb-divider.js.map +1 -0
- package/dist/cb-expression.js +75 -0
- package/dist/cb-expression.js.map +1 -0
- package/dist/cb-predicate.js +137 -0
- package/dist/cb-predicate.js.map +1 -0
- package/dist/code-editor.js +2 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +1 -1
- package/dist/code-highlighter.js.map +1 -1
- package/dist/condition-builder.js +58 -0
- package/dist/condition-builder.js.map +1 -0
- package/dist/custom-elements-jsdocs.json +8479 -3965
- package/dist/custom-elements.json +15228 -7544
- package/dist/dropdown-button.js +216 -0
- package/dist/dropdown-button.js.map +1 -0
- package/dist/event-manager-D-QCmUgR.js +113 -0
- package/dist/event-manager-D-QCmUgR.js.map +1 -0
- package/dist/fab.js +1 -1
- package/dist/flow-designer-DvTUrDp5.js +1656 -0
- package/dist/flow-designer-DvTUrDp5.js.map +1 -0
- package/dist/flow-designer-node-BWrPuxAR.js +548 -0
- package/dist/flow-designer-node-BWrPuxAR.js.map +1 -0
- package/dist/flow-designer-node.js +4 -0
- package/dist/flow-designer-node.js.map +1 -0
- package/dist/flow-designer.js +16 -0
- package/dist/flow-designer.js.map +1 -0
- package/dist/html-editor.js +27516 -0
- package/dist/html-editor.js.map +1 -0
- package/dist/icon-button-CK1ZuE-2.js +247 -0
- package/dist/icon-button-CK1ZuE-2.js.map +1 -0
- package/dist/index.js +29 -6
- package/dist/index.js.map +1 -1
- package/dist/{is-dark-mode-DicqGkCJ.js → is-dark-mode-DOcaw4Yq.js} +2 -27
- package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -0
- package/dist/modal.js +412 -0
- package/dist/modal.js.map +1 -0
- package/dist/{navigation-rail-Lxetd5-Z.js → navigation-rail-DTTkqohi.js} +1049 -2391
- package/dist/navigation-rail-DTTkqohi.js.map +1 -0
- package/dist/notification-manager.js +268 -0
- package/dist/notification-manager.js.map +1 -0
- package/dist/peacock-loader.js +93 -8
- package/dist/peacock-loader.js.map +1 -1
- package/dist/popover-NC7b1lTq.js +1971 -0
- package/dist/popover-NC7b1lTq.js.map +1 -0
- package/dist/popover-content.js +125 -0
- package/dist/popover-content.js.map +1 -0
- package/dist/popover.js +4 -0
- package/dist/popover.js.map +1 -0
- package/dist/split-button.js +388 -0
- package/dist/split-button.js.map +1 -0
- package/dist/src/__controllers/floating-controller.d.ts +35 -0
- package/dist/src/calendar/base-event.d.ts +10 -0
- package/dist/src/calendar/calendar-column-view.d.ts +41 -0
- package/dist/src/calendar/calendar-event.d.ts +7 -0
- package/dist/src/calendar/calendar-month-view.d.ts +31 -0
- package/dist/src/calendar/calendar.d.ts +65 -0
- package/dist/src/calendar/event-manager.d.ts +17 -0
- package/dist/src/calendar/index.d.ts +4 -0
- package/dist/src/calendar/types.d.ts +13 -0
- package/dist/src/calendar/utils.d.ts +31 -0
- package/dist/src/canvas/canvas.d.ts +92 -0
- package/dist/src/canvas/index.d.ts +2 -0
- package/dist/src/condition-builder/cb-compound-expression.d.ts +31 -0
- package/dist/src/condition-builder/cb-divider.d.ts +26 -0
- package/dist/src/condition-builder/cb-expression.d.ts +31 -0
- package/dist/src/condition-builder/cb-predicate.d.ts +30 -0
- package/dist/src/condition-builder/condition-builder.d.ts +27 -0
- package/dist/src/condition-builder/index.d.ts +5 -0
- package/dist/src/dropdown-button/dropdown-button.d.ts +68 -0
- package/dist/src/dropdown-button/index.d.ts +1 -0
- package/dist/src/flow-designer/commands.d.ts +66 -0
- package/dist/src/flow-designer/flow-designer-node.d.ts +46 -0
- package/dist/src/flow-designer/flow-designer.d.ts +133 -0
- package/dist/src/flow-designer/index.d.ts +7 -0
- package/dist/src/flow-designer/layout.d.ts +30 -0
- package/dist/src/flow-designer/types.d.ts +142 -0
- package/dist/src/flow-designer/validation.d.ts +43 -0
- package/dist/src/flow-designer/workflow-utils.d.ts +40 -0
- package/dist/src/html-editor/html-editor.d.ts +89 -0
- package/dist/src/html-editor/index.d.ts +2 -0
- package/dist/src/index.d.ts +15 -0
- package/dist/src/list/index.d.ts +2 -0
- package/dist/src/list/list-item.d.ts +35 -0
- package/dist/src/list/list.d.ts +28 -0
- package/dist/src/menu/menu/menu.d.ts +5 -7
- package/dist/src/menu/menu-item/menu-item.d.ts +14 -13
- package/dist/src/modal/index.d.ts +1 -0
- package/dist/src/modal/modal.d.ts +57 -0
- package/dist/src/navigation-rail/navigation-rail.d.ts +3 -7
- package/dist/src/notification-manager/index.d.ts +1 -0
- package/dist/src/notification-manager/notification-manager.d.ts +44 -0
- package/dist/src/number-field/number-field.d.ts +2 -2
- package/dist/src/popover/index.d.ts +2 -0
- package/dist/src/popover/popover-content.d.ts +29 -0
- package/dist/src/popover/popover.d.ts +62 -0
- package/dist/src/split-button/index.d.ts +1 -0
- package/dist/src/split-button/split-button.d.ts +72 -0
- package/dist/src/svg/index.d.ts +1 -0
- package/dist/src/svg/svg.d.ts +38 -0
- package/dist/src/toolbar/toolbar.d.ts +3 -3
- package/dist/src/tooltip/tooltip.d.ts +2 -15
- package/dist/test/flow-designer.test.d.ts +1 -0
- package/dist/toolbar.js +3 -3
- package/dist/toolbar.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -2
- package/readme.md +3 -3
- package/src/__controllers/floating-controller.ts +237 -0
- package/src/banner/banner.scss +2 -3
- package/src/button/button/button.ts +1 -0
- package/src/calendar/base-event.ts +49 -0
- package/src/calendar/calendar-column-view.scss +326 -0
- package/src/calendar/calendar-column-view.ts +392 -0
- package/src/calendar/calendar-event.ts +20 -0
- package/src/calendar/calendar-month-view.scss +192 -0
- package/src/calendar/calendar-month-view.ts +244 -0
- package/src/calendar/calendar.scss +71 -0
- package/src/calendar/calendar.ts +298 -0
- package/src/calendar/event-manager.ts +117 -0
- package/src/calendar/index.ts +4 -0
- package/src/calendar/types.ts +14 -0
- package/src/calendar/utils.ts +180 -0
- package/src/canvas/canvas.scss +60 -0
- package/src/canvas/canvas.ts +391 -0
- package/src/canvas/index.ts +2 -0
- package/src/code-highlighter/code-highlighter.ts +1 -1
- package/src/condition-builder/cb-compound-expression.scss +37 -0
- package/src/condition-builder/cb-compound-expression.ts +80 -0
- package/src/condition-builder/cb-divider.scss +93 -0
- package/src/condition-builder/cb-divider.ts +56 -0
- package/src/condition-builder/cb-expression.scss +14 -0
- package/src/condition-builder/cb-expression.ts +49 -0
- package/src/condition-builder/cb-predicate.scss +35 -0
- package/src/condition-builder/cb-predicate.ts +102 -0
- package/src/condition-builder/condition-builder.scss +13 -0
- package/src/condition-builder/condition-builder.ts +38 -0
- package/src/condition-builder/index.ts +5 -0
- package/src/dropdown-button/demo/index.html +110 -0
- package/src/dropdown-button/dropdown-button.scss +22 -0
- package/src/dropdown-button/dropdown-button.ts +206 -0
- package/src/dropdown-button/index.ts +1 -0
- package/src/flow-designer/DEMO.md +239 -0
- package/src/flow-designer/commands.ts +278 -0
- package/src/flow-designer/flow-designer-node.ts +172 -0
- package/src/flow-designer/flow-designer.scss +457 -0
- package/src/flow-designer/flow-designer.ts +611 -0
- package/src/flow-designer/index.ts +41 -0
- package/src/flow-designer/layout.ts +357 -0
- package/src/flow-designer/types.ts +166 -0
- package/src/flow-designer/validation.ts +284 -0
- package/src/flow-designer/workflow-utils.ts +282 -0
- package/src/html-editor/html-editor.scss +188 -0
- package/src/html-editor/html-editor.ts +491 -0
- package/src/html-editor/index.ts +3 -0
- package/src/index.ts +27 -1
- package/src/list/index.ts +2 -0
- package/src/list/list-item.scss +111 -0
- package/src/list/list-item.ts +175 -0
- package/src/list/list.scss +24 -0
- package/src/list/list.ts +51 -0
- package/src/menu/menu/menu.scss +2 -2
- package/src/menu/menu/menu.ts +91 -101
- package/src/menu/menu-item/menu-item.scss +4 -0
- package/src/menu/menu-item/menu-item.ts +82 -78
- package/src/modal/index.ts +1 -0
- package/src/modal/modal.scss +206 -0
- package/src/modal/modal.ts +195 -0
- package/src/navigation-rail/navigation-rail-item.scss +7 -38
- package/src/navigation-rail/navigation-rail-item.ts +1 -2
- package/src/navigation-rail/navigation-rail.scss +17 -21
- package/src/navigation-rail/navigation-rail.ts +6 -9
- package/src/notification-manager/index.ts +1 -0
- package/src/notification-manager/notification-manager.scss +113 -0
- package/src/notification-manager/notification-manager.ts +199 -0
- package/src/number-field/number-field.ts +2 -2
- package/src/peacock-loader.ts +83 -0
- package/src/popover/index.ts +2 -0
- package/src/popover/popover-content.scss +69 -0
- package/src/popover/popover-content.ts +51 -0
- package/src/popover/popover.scss +7 -0
- package/src/popover/popover.ts +170 -0
- package/src/split-button/index.ts +1 -0
- package/src/split-button/split-button-colors.scss +56 -0
- package/src/split-button/split-button-sizes.scss +28 -0
- package/src/split-button/split-button.scss +79 -0
- package/src/split-button/split-button.ts +236 -0
- package/src/svg/index.ts +1 -0
- package/src/svg/svg.scss +91 -0
- package/src/svg/svg.ts +160 -0
- package/src/table/table.ts +2 -2
- package/src/toolbar/toolbar.ts +3 -3
- package/src/tooltip/tooltip.scss +4 -3
- package/src/tooltip/tooltip.ts +46 -104
- package/dist/button-DouvOfEU.js.map +0 -1
- package/dist/button-group-CEdMwvJJ.js +0 -464
- package/dist/button-group-CEdMwvJJ.js.map +0 -1
- package/dist/is-dark-mode-DicqGkCJ.js.map +0 -1
- package/dist/navigation-rail-Lxetd5-Z.js.map +0 -1
- package/dist/src/menu/menu/MenuSurfaceController.d.ts +0 -18
- package/src/menu/menu/MenuSurfaceController.ts +0 -61
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { a as i, _ as __decorate, I as IndividualComponent, i as i$1, b } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
import { e } from './class-map-YU7g0o3B.js';
|
|
4
|
+
import './directive-ZPhl09Yt.js';
|
|
5
|
+
|
|
6
|
+
var css_248z = i`* {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.screen-reader-only {
|
|
11
|
+
display: none !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host {
|
|
15
|
+
display: block;
|
|
16
|
+
height: 100%;
|
|
17
|
+
width: 100%;
|
|
18
|
+
--cb-divider-line-color: var(--color-outline-variant);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.divider {
|
|
22
|
+
display: flex;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.divider:not(.vertical) {
|
|
26
|
+
height: 100%;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
padding-bottom: var(--spacing-200);
|
|
31
|
+
}
|
|
32
|
+
.divider:not(.vertical) .line {
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
.divider:not(.vertical).connect-start .line-start {
|
|
36
|
+
width: 1rem;
|
|
37
|
+
margin-left: 1rem;
|
|
38
|
+
border-inline-start: 1px solid var(--cb-divider-line-color);
|
|
39
|
+
border-top: 1px solid var(--cb-divider-line-color);
|
|
40
|
+
border-radius: var(--shape-corner-extra-small) 0 0 0;
|
|
41
|
+
}
|
|
42
|
+
.divider:not(.vertical):not(.connect-start) .line-start {
|
|
43
|
+
border-inline-start: 1px solid var(--cb-divider-line-color);
|
|
44
|
+
}
|
|
45
|
+
.divider:not(.vertical).connect-end .line-end {
|
|
46
|
+
width: 1rem;
|
|
47
|
+
margin-left: 1rem;
|
|
48
|
+
border-inline-start: 1px solid var(--cb-divider-line-color);
|
|
49
|
+
border-bottom: 1px solid var(--cb-divider-line-color);
|
|
50
|
+
border-radius: 0 0 0 var(--shape-corner-extra-small);
|
|
51
|
+
}
|
|
52
|
+
.divider:not(.vertical):not(.connect-end) .line-end {
|
|
53
|
+
border-inline-start: 1px solid var(--cb-divider-line-color);
|
|
54
|
+
}
|
|
55
|
+
.divider:not(.vertical) .content {
|
|
56
|
+
padding: var(--spacing-050) 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.divider.vertical {
|
|
60
|
+
width: 100%;
|
|
61
|
+
flex-direction: row;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
}
|
|
65
|
+
.divider.vertical .line {
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
.divider.vertical.connect-start .line-start {
|
|
69
|
+
height: 1rem;
|
|
70
|
+
margin-top: 1rem;
|
|
71
|
+
border-top: 1px solid var(--cb-divider-line-color);
|
|
72
|
+
border-left: 1px solid var(--cb-divider-line-color);
|
|
73
|
+
border-radius: var(--shape-corner-extra-small) 0 0 0;
|
|
74
|
+
}
|
|
75
|
+
.divider.vertical:not(.connect-start) .line-start {
|
|
76
|
+
border-top: 1px solid var(--cb-divider-line-color);
|
|
77
|
+
}
|
|
78
|
+
.divider.vertical.connect-end .line-end {
|
|
79
|
+
height: 1rem;
|
|
80
|
+
margin-top: 1rem;
|
|
81
|
+
border-top: 1px solid var(--cb-divider-line-color);
|
|
82
|
+
border-right: 1px solid var(--cb-divider-line-color);
|
|
83
|
+
border-radius: 0 var(--shape-corner-extra-small) 0 0;
|
|
84
|
+
}
|
|
85
|
+
.divider.vertical:not(.connect-end) .line-end {
|
|
86
|
+
border-top: 1px solid var(--cb-divider-line-color);
|
|
87
|
+
}
|
|
88
|
+
.divider.vertical .content {
|
|
89
|
+
padding: 0 var(--spacing-050);
|
|
90
|
+
}`;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @label CB Divider
|
|
94
|
+
* @tag wc-cb-divider
|
|
95
|
+
* @rawTag cb-divider
|
|
96
|
+
* @summary A divider line used within a condition builder to visually connect expressions with operator tags.
|
|
97
|
+
* @tags condition-builder
|
|
98
|
+
* @parentRawTag compound-builder
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```html
|
|
102
|
+
* <wc-cb-divider>
|
|
103
|
+
* <wc-tag color="green">and</wc-tag>
|
|
104
|
+
* </wc-cb-divider>
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
let CbDivider = class CbDivider extends i$1 {
|
|
108
|
+
constructor() {
|
|
109
|
+
super(...arguments);
|
|
110
|
+
/** Whether to render the divider vertically instead of horizontally. */
|
|
111
|
+
this.vertical = false;
|
|
112
|
+
/** Whether to render a connecting line at the start. */
|
|
113
|
+
this.connectStart = false;
|
|
114
|
+
/** Whether to render a connecting line at the end. */
|
|
115
|
+
this.connectEnd = false;
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
const classes = {
|
|
119
|
+
divider: true,
|
|
120
|
+
'connect-start': this.connectStart,
|
|
121
|
+
'connect-end': this.connectEnd,
|
|
122
|
+
vertical: this.vertical,
|
|
123
|
+
};
|
|
124
|
+
return b `
|
|
125
|
+
<div class=${e(classes)}>
|
|
126
|
+
<div class="line line-start"></div>
|
|
127
|
+
<div class="content">
|
|
128
|
+
<slot></slot>
|
|
129
|
+
</div>
|
|
130
|
+
<div class="line line-end"></div>
|
|
131
|
+
</div>
|
|
132
|
+
`;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
CbDivider.styles = [css_248z];
|
|
136
|
+
__decorate([
|
|
137
|
+
n({ type: Boolean, reflect: true })
|
|
138
|
+
], CbDivider.prototype, "vertical", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
n({ type: Boolean, reflect: true, attribute: 'connect-start' })
|
|
141
|
+
], CbDivider.prototype, "connectStart", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
n({ type: Boolean, reflect: true, attribute: 'connect-end' })
|
|
144
|
+
], CbDivider.prototype, "connectEnd", void 0);
|
|
145
|
+
CbDivider = __decorate([
|
|
146
|
+
IndividualComponent
|
|
147
|
+
], CbDivider);
|
|
148
|
+
|
|
149
|
+
export { CbDivider };
|
|
150
|
+
//# sourceMappingURL=cb-divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cb-divider.js","sources":["../../src/condition-builder/cb-divider.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './cb-divider.scss';\n\n/**\n * @label CB Divider\n * @tag wc-cb-divider\n * @rawTag cb-divider\n * @summary A divider line used within a condition builder to visually connect expressions with operator tags.\n * @tags condition-builder\n * @parentRawTag compound-builder\n *\n * @example\n * ```html\n * <wc-cb-divider>\n * <wc-tag color=\"green\">and</wc-tag>\n * </wc-cb-divider>\n * ```\n */\n@IndividualComponent\nexport class CbDivider extends LitElement {\n static styles = [styles];\n\n /** Whether to render the divider vertically instead of horizontally. */\n @property({ type: Boolean, reflect: true })\n vertical = false;\n\n /** Whether to render a connecting line at the start. */\n @property({ type: Boolean, reflect: true, attribute: 'connect-start' })\n connectStart = false;\n\n /** Whether to render a connecting line at the end. */\n @property({ type: Boolean, reflect: true, attribute: 'connect-end' })\n connectEnd = false;\n\n render() {\n const classes = {\n divider: true,\n 'connect-start': this.connectStart,\n 'connect-end': this.connectEnd,\n vertical: this.vertical,\n };\n\n return html`\n <div class=${classMap(classes)}>\n <div class=\"line line-start\"></div>\n <div class=\"content\">\n <slot></slot>\n </div>\n <div class=\"line line-end\"></div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;AAcG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQA,GAAU,CAAA;AAAlC,IAAA,WAAA,GAAA;;;QAKL,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAIhB,IAAA,CAAA,YAAY,GAAG,KAAK;;QAIpB,IAAA,CAAA,UAAU,GAAG,KAAK;IAoBpB;IAlBE,MAAM,GAAA;AACJ,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,OAAO,EAAE,IAAI;YACb,eAAe,EAAE,IAAI,CAAC,YAAY;YAClC,aAAa,EAAE,IAAI,CAAC,UAAU;YAC9B,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB;AAED,QAAA,OAAOC,CAAI,CAAA;mBACIC,CAAQ,CAAC,OAAO,CAAC,CAAA;;;;;;;KAO/B;IACH;;AA/BO,SAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAIxB,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAIjB,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE;AACjD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAIrB,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE;AACjD,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAbR,SAAS,GAAA,UAAA,CAAA;IADrB;AACY,CAAA,EAAA,SAAS,CAiCrB;;;;"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { a as i, _ as __decorate, I as IndividualComponent, i as i$1, b } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
|
|
4
|
+
var css_248z = i`* {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.screen-reader-only {
|
|
9
|
+
display: none !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host {
|
|
13
|
+
display: block;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.expression {
|
|
17
|
+
display: flex;
|
|
18
|
+
gap: var(--spacing-100);
|
|
19
|
+
align-items: center;
|
|
20
|
+
padding-bottom: var(--spacing-200);
|
|
21
|
+
}`;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @label CB Expression
|
|
25
|
+
* @tag wc-cb-expression
|
|
26
|
+
* @rawTag cb-expression
|
|
27
|
+
* @summary An expression row within a condition builder, containing an operator select and a slot for value inputs.
|
|
28
|
+
* @tags condition-builder
|
|
29
|
+
* @parentRawTag compound-builder
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```html
|
|
33
|
+
* <wc-cb-expression>
|
|
34
|
+
* <wc-input placeholder="Enter value"></wc-input>
|
|
35
|
+
* </wc-cb-expression>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
let CbExpression = class CbExpression extends i$1 {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
|
+
/**
|
|
42
|
+
* The list of operator options to display in the operator select.
|
|
43
|
+
* Each item should have at least `label` and `value` properties.
|
|
44
|
+
*/
|
|
45
|
+
this.operators = [];
|
|
46
|
+
/** The currently selected operator value. */
|
|
47
|
+
this.operatorValue = '';
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
return b `
|
|
51
|
+
<div class="expression">
|
|
52
|
+
<wc-select
|
|
53
|
+
inline
|
|
54
|
+
.value=${this.operatorValue}
|
|
55
|
+
placeholder="Select Operator"
|
|
56
|
+
.options=${this.operators}
|
|
57
|
+
></wc-select>
|
|
58
|
+
<slot></slot>
|
|
59
|
+
</div>
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
CbExpression.styles = [css_248z];
|
|
64
|
+
__decorate([
|
|
65
|
+
n({ type: Array })
|
|
66
|
+
], CbExpression.prototype, "operators", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
n({ type: String, attribute: 'operator-value' })
|
|
69
|
+
], CbExpression.prototype, "operatorValue", void 0);
|
|
70
|
+
CbExpression = __decorate([
|
|
71
|
+
IndividualComponent
|
|
72
|
+
], CbExpression);
|
|
73
|
+
|
|
74
|
+
export { CbExpression };
|
|
75
|
+
//# sourceMappingURL=cb-expression.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cb-expression.js","sources":["../../src/condition-builder/cb-expression.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './cb-expression.scss';\n\n/**\n * @label CB Expression\n * @tag wc-cb-expression\n * @rawTag cb-expression\n * @summary An expression row within a condition builder, containing an operator select and a slot for value inputs.\n * @tags condition-builder\n * @parentRawTag compound-builder\n *\n * @example\n * ```html\n * <wc-cb-expression>\n * <wc-input placeholder=\"Enter value\"></wc-input>\n * </wc-cb-expression>\n * ```\n */\n@IndividualComponent\nexport class CbExpression extends LitElement {\n static styles = [styles];\n\n /**\n * The list of operator options to display in the operator select.\n * Each item should have at least `label` and `value` properties.\n */\n @property({ type: Array })\n operators: { label: string; value: string; icon?: string }[] = [];\n\n /** The currently selected operator value. */\n @property({ type: String, attribute: 'operator-value' })\n operatorValue = '';\n\n render() {\n return html`\n <div class=\"expression\">\n <wc-select\n inline\n .value=${this.operatorValue}\n placeholder=\"Select Operator\"\n .options=${this.operators}\n ></wc-select>\n <slot></slot>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;AAcG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQA,GAAU,CAAA;AAArC,IAAA,WAAA,GAAA;;AAGL;;;AAGG;QAEH,IAAA,CAAA,SAAS,GAAsD,EAAE;;QAIjE,IAAA,CAAA,aAAa,GAAG,EAAE;IAepB;IAbE,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA;;;;AAII,iBAAA,EAAA,IAAI,CAAC,aAAa;;AAEhB,mBAAA,EAAA,IAAI,CAAC,SAAS;;;;KAI9B;IACH;;AAzBO,YAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAOxB,UAAA,CAAA;AADC,IAAAC,CAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE;AACyC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAIlE,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE;AACpC,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAZR,YAAY,GAAA,UAAA,CAAA;IADxB;AACY,CAAA,EAAA,YAAY,CA2BxB;;;;"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { a as i, _ as __decorate, I as IndividualComponent, i as i$1, A, b } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
import { e } from './class-map-YU7g0o3B.js';
|
|
4
|
+
import './directive-ZPhl09Yt.js';
|
|
5
|
+
|
|
6
|
+
var css_248z = i`* {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.screen-reader-only {
|
|
11
|
+
display: none !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.predicate:not(.vertical) .predicate-body {
|
|
19
|
+
padding-top: var(--spacing-200);
|
|
20
|
+
}
|
|
21
|
+
.predicate:not(.vertical) .predicate-condition-operator {
|
|
22
|
+
padding: var(--spacing-200) var(--spacing-400) 0 var(--spacing-400);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.predicate.vertical {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: stretch;
|
|
28
|
+
}
|
|
29
|
+
.predicate.vertical .predicate-condition-operator {
|
|
30
|
+
padding: var(--spacing-400) 0 var(--spacing-200) 0;
|
|
31
|
+
padding-inline-end: var(--spacing-200);
|
|
32
|
+
}
|
|
33
|
+
.predicate.vertical .predicate-body {
|
|
34
|
+
flex: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.slot-end {
|
|
38
|
+
display: block;
|
|
39
|
+
}`;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @label CB Predicate
|
|
43
|
+
* @tag wc-cb-predicate
|
|
44
|
+
* @rawTag cb-predicate
|
|
45
|
+
* @summary A predicate container in a condition builder that can display conditions in horizontal or vertical layout with an optional logical operator divider.
|
|
46
|
+
* @tags condition-builder
|
|
47
|
+
* @parentRawTag compound-expression
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```html
|
|
51
|
+
* <wc-cb-predicate condition-operator="and" vertical>
|
|
52
|
+
* <wc-cb-compound-expression field-label="Age">
|
|
53
|
+
* <wc-cb-expression></wc-cb-expression>
|
|
54
|
+
* </wc-cb-compound-expression>
|
|
55
|
+
* </wc-cb-predicate>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
let CbPredicate = class CbPredicate extends i$1 {
|
|
59
|
+
constructor() {
|
|
60
|
+
super(...arguments);
|
|
61
|
+
/** Whether to render the predicate in vertical layout. */
|
|
62
|
+
this.vertical = false;
|
|
63
|
+
}
|
|
64
|
+
updated() {
|
|
65
|
+
if (this.vertical) {
|
|
66
|
+
this.__adjustSlotEndPadding();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
__adjustSlotEndPadding() {
|
|
70
|
+
const slotEnd = this.renderRoot.querySelector('.slot-end');
|
|
71
|
+
const operatorElm = this.renderRoot.querySelector('.predicate-condition-operator');
|
|
72
|
+
if (slotEnd && operatorElm) {
|
|
73
|
+
slotEnd.style.paddingInlineStart =
|
|
74
|
+
operatorElm.getBoundingClientRect().width + 'px';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
__renderHorizontalOperator() {
|
|
78
|
+
if (!this.conditionOperator)
|
|
79
|
+
return A;
|
|
80
|
+
return b `
|
|
81
|
+
<wc-cb-divider vertical class="predicate-condition-operator">
|
|
82
|
+
<wc-tag color="yellow" size="sm">${this.conditionOperator}</wc-tag>
|
|
83
|
+
</wc-cb-divider>
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
__renderVerticalOperator() {
|
|
87
|
+
if (!this.conditionOperator)
|
|
88
|
+
return A;
|
|
89
|
+
return b `
|
|
90
|
+
<div class="predicate-condition-operator">
|
|
91
|
+
<wc-cb-divider connect-start connect-end>
|
|
92
|
+
<wc-tag color="green" size="sm">${this.conditionOperator}</wc-tag>
|
|
93
|
+
</wc-cb-divider>
|
|
94
|
+
</div>
|
|
95
|
+
`;
|
|
96
|
+
}
|
|
97
|
+
render() {
|
|
98
|
+
const classes = {
|
|
99
|
+
predicate: true,
|
|
100
|
+
vertical: this.vertical,
|
|
101
|
+
};
|
|
102
|
+
if (this.vertical) {
|
|
103
|
+
return b `
|
|
104
|
+
<div class=${e(classes)}>
|
|
105
|
+
${this.__renderVerticalOperator()}
|
|
106
|
+
<div class="predicate-body">
|
|
107
|
+
<slot></slot>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="slot-end">
|
|
111
|
+
<slot name="end"></slot>
|
|
112
|
+
</div>
|
|
113
|
+
`;
|
|
114
|
+
}
|
|
115
|
+
return b `
|
|
116
|
+
<div class=${e(classes)}>
|
|
117
|
+
<div class="predicate-body">
|
|
118
|
+
<slot></slot>
|
|
119
|
+
</div>
|
|
120
|
+
${this.__renderHorizontalOperator()}
|
|
121
|
+
</div>
|
|
122
|
+
`;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
CbPredicate.styles = [css_248z];
|
|
126
|
+
__decorate([
|
|
127
|
+
n({ type: String, attribute: 'condition-operator', reflect: true })
|
|
128
|
+
], CbPredicate.prototype, "conditionOperator", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
n({ type: Boolean, reflect: true })
|
|
131
|
+
], CbPredicate.prototype, "vertical", void 0);
|
|
132
|
+
CbPredicate = __decorate([
|
|
133
|
+
IndividualComponent
|
|
134
|
+
], CbPredicate);
|
|
135
|
+
|
|
136
|
+
export { CbPredicate };
|
|
137
|
+
//# sourceMappingURL=cb-predicate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cb-predicate.js","sources":["../../src/condition-builder/cb-predicate.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './cb-predicate.scss';\n\n/**\n * @label CB Predicate\n * @tag wc-cb-predicate\n * @rawTag cb-predicate\n * @summary A predicate container in a condition builder that can display conditions in horizontal or vertical layout with an optional logical operator divider.\n * @tags condition-builder\n * @parentRawTag compound-expression\n *\n * @example\n * ```html\n * <wc-cb-predicate condition-operator=\"and\" vertical>\n * <wc-cb-compound-expression field-label=\"Age\">\n * <wc-cb-expression></wc-cb-expression>\n * </wc-cb-compound-expression>\n * </wc-cb-predicate>\n * ```\n */\n@IndividualComponent\nexport class CbPredicate extends LitElement {\n static styles = [styles];\n\n /** The logical operator shown between predicates ('and' or 'or'). */\n @property({ type: String, attribute: 'condition-operator', reflect: true })\n conditionOperator?: 'and' | 'or';\n\n /** Whether to render the predicate in vertical layout. */\n @property({ type: Boolean, reflect: true })\n vertical = false;\n\n override updated() {\n if (this.vertical) {\n this.__adjustSlotEndPadding();\n }\n }\n\n private __adjustSlotEndPadding() {\n const slotEnd = this.renderRoot.querySelector<HTMLElement>('.slot-end');\n const operatorElm = this.renderRoot.querySelector<HTMLElement>(\n '.predicate-condition-operator',\n );\n if (slotEnd && operatorElm) {\n slotEnd.style.paddingInlineStart =\n operatorElm.getBoundingClientRect().width + 'px';\n }\n }\n\n private __renderHorizontalOperator() {\n if (!this.conditionOperator) return nothing;\n return html`\n <wc-cb-divider vertical class=\"predicate-condition-operator\">\n <wc-tag color=\"yellow\" size=\"sm\">${this.conditionOperator}</wc-tag>\n </wc-cb-divider>\n `;\n }\n\n private __renderVerticalOperator() {\n if (!this.conditionOperator) return nothing;\n return html`\n <div class=\"predicate-condition-operator\">\n <wc-cb-divider connect-start connect-end>\n <wc-tag color=\"green\" size=\"sm\">${this.conditionOperator}</wc-tag>\n </wc-cb-divider>\n </div>\n `;\n }\n\n render() {\n const classes = {\n predicate: true,\n vertical: this.vertical,\n };\n\n if (this.vertical) {\n return html`\n <div class=${classMap(classes)}>\n ${this.__renderVerticalOperator()}\n <div class=\"predicate-body\">\n <slot></slot>\n </div>\n </div>\n <div class=\"slot-end\">\n <slot name=\"end\"></slot>\n </div>\n `;\n }\n\n return html`\n <div class=${classMap(classes)}>\n <div class=\"predicate-body\">\n <slot></slot>\n </div>\n ${this.__renderHorizontalOperator()}\n </div>\n `;\n }\n}\n"],"names":["LitElement","nothing","html","classMap","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;AAgBG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQA,GAAU,CAAA;AAApC,IAAA,WAAA,GAAA;;;QASL,IAAA,CAAA,QAAQ,GAAG,KAAK;IAoElB;IAlEW,OAAO,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,sBAAsB,EAAE;QAC/B;IACF;IAEQ,sBAAsB,GAAA;QAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAc,WAAW,CAAC;QACvE,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAC/C,+BAA+B,CAChC;AACD,QAAA,IAAI,OAAO,IAAI,WAAW,EAAE;YAC1B,OAAO,CAAC,KAAK,CAAC,kBAAkB;AAC9B,gBAAA,WAAW,CAAC,qBAAqB,EAAE,CAAC,KAAK,GAAG,IAAI;QACpD;IACF;IAEQ,0BAA0B,GAAA;QAChC,IAAI,CAAC,IAAI,CAAC,iBAAiB;AAAE,YAAA,OAAOC,CAAO;AAC3C,QAAA,OAAOC,CAAI,CAAA;;AAE4B,yCAAA,EAAA,IAAI,CAAC,iBAAiB,CAAA;;KAE5D;IACH;IAEQ,wBAAwB,GAAA;QAC9B,IAAI,CAAC,IAAI,CAAC,iBAAiB;AAAE,YAAA,OAAOD,CAAO;AAC3C,QAAA,OAAOC,CAAI,CAAA;;;AAG6B,0CAAA,EAAA,IAAI,CAAC,iBAAiB,CAAA;;;KAG7D;IACH;IAEA,MAAM,GAAA;AACJ,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB;AAED,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,OAAOA,CAAI,CAAA;qBACIC,CAAQ,CAAC,OAAO,CAAC,CAAA;YAC1B,IAAI,CAAC,wBAAwB,EAAE;;;;;;;;OAQpC;QACH;AAEA,QAAA,OAAOD,CAAI,CAAA;mBACIC,CAAQ,CAAC,OAAO,CAAC,CAAA;;;;UAI1B,IAAI,CAAC,0BAA0B,EAAE;;KAEtC;IACH;;AA3EO,WAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAIxB,UAAA,CAAA;AADC,IAAAC,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE;AACzC,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,MAAA,CAAA;AAIjC,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AATN,WAAW,GAAA,UAAA,CAAA;IADvB;AACY,CAAA,EAAA,WAAW,CA6EvB;;;;"}
|
package/dist/code-editor.js
CHANGED
|
@@ -3,7 +3,8 @@ import { n } from './property-1psGvXOq.js';
|
|
|
3
3
|
import { r } from './state-DwbEjqVk.js';
|
|
4
4
|
import { e } from './query-QBcUV-L_.js';
|
|
5
5
|
import { e as e$1 } from './class-map-YU7g0o3B.js';
|
|
6
|
-
import { B as BaseInput
|
|
6
|
+
import { B as BaseInput } from './BaseInput-14YmcfK7.js';
|
|
7
|
+
import { i as isDarkMode, o as observeThemeChange } from './is-dark-mode-DOcaw4Yq.js';
|
|
7
8
|
import { r as redispatchEvent } from './dispatch-event-utils-CuEqjlPT.js';
|
|
8
9
|
import './directive-ZPhl09Yt.js';
|
|
9
10
|
|