@redvars/peacock 3.10.1 → 3.12.0
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/BaseInput-CV0pZgSb.js +58 -0
- package/dist/BaseInput-CV0pZgSb.js.map +1 -0
- package/dist/app-bar.js +16 -16
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/assets/theme.d.ts +66 -0
- package/dist/assets/theme.js +134 -0
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/tokens.css.map +1 -1
- package/dist/base-progress-CLZTRveO.js +33 -0
- package/dist/base-progress-CLZTRveO.js.map +1 -0
- package/dist/bottom-sheet.js +1 -1
- package/dist/button-group.js +9 -7
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +225 -187
- package/dist/button.js.map +1 -1
- package/dist/cb-divider.js +7 -6
- package/dist/cb-divider.js.map +1 -1
- package/dist/cb-group-base-D9gv7SDY.js +114 -0
- package/dist/cb-group-base-D9gv7SDY.js.map +1 -0
- package/dist/cb-group-base-DsX_2aFl.js +325 -0
- package/dist/cb-group-base-DsX_2aFl.js.map +1 -0
- package/dist/cb-group.js +96 -0
- package/dist/cb-group.js.map +1 -0
- package/dist/cb-rule.js +212 -0
- package/dist/cb-rule.js.map +1 -0
- package/dist/{chart-bar-CapLbc2e.js → chart-bar-D5dGFJfK.js} +2 -2
- package/dist/{chart-bar-CapLbc2e.js.map → chart-bar-D5dGFJfK.js.map} +1 -1
- package/dist/chart-bar.js +1 -1
- package/dist/chart-stacked-bar.js +1 -1
- package/dist/checkbox.js +78 -53
- package/dist/checkbox.js.map +1 -1
- package/dist/chip-set.js +52 -0
- package/dist/chip-set.js.map +1 -0
- package/dist/chip.js +8 -6
- package/dist/chip.js.map +1 -1
- package/dist/circular-progress.js +177 -0
- package/dist/circular-progress.js.map +1 -0
- package/dist/code-editor.js +129 -72
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +2 -38
- package/dist/code-highlighter.js.map +1 -1
- package/dist/color-field.js +309 -0
- package/dist/color-field.js.map +1 -0
- package/dist/color-picker.js +26 -15
- package/dist/color-picker.js.map +1 -1
- package/dist/condition-builder.js +90 -35
- package/dist/condition-builder.js.map +1 -1
- package/dist/copy-to-clipboard-upGx-Ueo.js +39 -0
- package/dist/copy-to-clipboard-upGx-Ueo.js.map +1 -0
- package/dist/custom-elements-jsdocs.json +1140 -398
- package/dist/custom-elements.json +9065 -3989
- package/dist/date-picker.js +241 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/{element-internals-2CMts_0M.js → delegate-py-Ets8N.js} +2 -43
- package/dist/delegate-py-Ets8N.js.map +1 -0
- package/dist/element-internals-QME0yEz4.js +43 -0
- package/dist/element-internals-QME0yEz4.js.map +1 -0
- package/dist/fab.js +51 -49
- package/dist/fab.js.map +1 -1
- package/dist/field.js +27 -0
- package/dist/field.js.map +1 -1
- package/dist/flow.js +5 -5
- package/dist/form-associated-Bhwwr6dT.js +162 -0
- package/dist/form-associated-Bhwwr6dT.js.map +1 -0
- package/dist/{form-associated-BXADnjOB.js → form-submitter-DPI4L6gj.js} +3 -159
- package/dist/form-submitter-DPI4L6gj.js.map +1 -0
- package/dist/html-editor.js +3 -1
- package/dist/html-editor.js.map +1 -1
- package/dist/icon-button.js +195 -156
- package/dist/icon-button.js.map +1 -1
- package/dist/image.js +2 -2
- package/dist/index.js +36 -11
- package/dist/index.js.map +1 -1
- package/dist/input.js +259 -0
- package/dist/input.js.map +1 -0
- package/dist/item.js +2 -1
- package/dist/item.js.map +1 -1
- package/dist/linear-progress.js +192 -0
- package/dist/linear-progress.js.map +1 -0
- package/dist/{list-AdO-PUq_.js → list-item.js} +12 -222
- package/dist/list-item.js.map +1 -0
- package/dist/list.js +225 -6
- package/dist/list.js.map +1 -1
- package/dist/loader-full.js +31 -8
- package/dist/loader-full.js.map +1 -1
- package/dist/loader.js +58 -25
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +5 -3
- package/dist/markdown-editor.js.map +1 -1
- package/dist/menu-item.js +30 -30
- package/dist/navigation-bar-item.js +41 -0
- package/dist/navigation-bar-item.js.map +1 -0
- package/dist/navigation-bar.js +128 -0
- package/dist/navigation-bar.js.map +1 -0
- package/dist/navigation-drawer-item.js +236 -0
- package/dist/navigation-drawer-item.js.map +1 -0
- package/dist/navigation-drawer.js +293 -0
- package/dist/navigation-drawer.js.map +1 -0
- package/dist/navigation-rail.js +1 -1
- package/dist/number-field.js +280 -0
- package/dist/number-field.js.map +1 -0
- package/dist/pagination.js +1 -1
- package/dist/radio-group.js +209 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/radio.js +47 -37
- package/dist/radio.js.map +1 -1
- package/dist/segmented-button-group.js +12 -0
- package/dist/segmented-button-group.js.map +1 -1
- package/dist/segmented-button.js +10 -6
- package/dist/segmented-button.js.map +1 -1
- package/dist/select.js +653 -0
- package/dist/select.js.map +1 -0
- package/dist/side-sheet.js +1 -1
- package/dist/sidebar-menu-item.js +273 -0
- package/dist/sidebar-menu-item.js.map +1 -0
- package/dist/sidebar-menu.js +193 -0
- package/dist/sidebar-menu.js.map +1 -0
- package/dist/sidebar-sub-menu.js +301 -0
- package/dist/sidebar-sub-menu.js.map +1 -0
- package/dist/slider.js +76 -24
- package/dist/slider.js.map +1 -1
- package/dist/snackbar.js +3 -3
- package/dist/snackbar.js.map +1 -1
- package/dist/split-button.js +2 -2
- package/dist/src/__internal/utils/size.d.ts +9 -0
- package/dist/src/button/ButtonTypes.d.ts +1 -1
- package/dist/src/checkbox/checkbox.d.ts +28 -22
- package/dist/src/chip/chip/chip.d.ts +3 -0
- package/dist/src/chip/tag/tag.d.ts +5 -1
- package/dist/src/code-editor/code-editor.d.ts +37 -10
- package/dist/src/color-field/color-field.d.ts +55 -0
- package/dist/src/color-field/index.d.ts +1 -0
- package/dist/src/color-picker/color-picker.d.ts +1 -1
- package/dist/src/condition-builder/cb-divider.d.ts +3 -1
- package/dist/src/condition-builder/cb-drag.d.ts +10 -0
- package/dist/src/condition-builder/cb-group-base.d.ts +59 -0
- package/dist/src/condition-builder/cb-group.d.ts +34 -0
- package/dist/src/condition-builder/cb-rule.d.ts +32 -0
- package/dist/src/condition-builder/cb-types.d.ts +13 -0
- package/dist/src/condition-builder/condition-builder.d.ts +35 -14
- package/dist/src/condition-builder/index.d.ts +3 -3
- package/dist/src/date-picker/date-picker.d.ts +0 -1
- package/dist/src/index.d.ts +6 -4
- package/dist/src/input/BaseInput.d.ts +21 -3
- package/dist/src/input/input.d.ts +15 -7
- package/dist/src/navigation-bar/index.d.ts +2 -0
- package/dist/src/navigation-bar/navigation-bar-item.d.ts +23 -0
- package/dist/src/navigation-bar/navigation-bar.d.ts +44 -0
- package/dist/src/navigation-drawer/index.d.ts +2 -0
- package/dist/src/navigation-drawer/navigation-drawer-item.d.ts +48 -0
- package/dist/src/navigation-drawer/navigation-drawer.d.ts +70 -0
- package/dist/src/number-field/number-field.d.ts +0 -1
- package/dist/src/radio/index.d.ts +1 -0
- package/dist/src/radio/radio-group.d.ts +50 -0
- package/dist/src/radio/radio.d.ts +18 -18
- package/dist/src/segmented-button/segmented-button-group.d.ts +5 -0
- package/dist/src/segmented-button/segmented-button.d.ts +2 -1
- package/dist/src/select/select.d.ts +6 -0
- package/dist/src/slider/slider.d.ts +14 -5
- package/dist/src/switch/switch.d.ts +22 -26
- package/dist/src/tabs/tabs.d.ts +3 -0
- package/dist/src/textarea/textarea.d.ts +0 -1
- package/dist/src/time-picker/time-picker.d.ts +0 -1
- package/dist/src/toolbar/toolbar.d.ts +7 -4
- package/dist/src/url-field/url-field.d.ts +0 -1
- package/dist/svg.js +5 -5
- package/dist/switch.js +413 -0
- package/dist/switch.js.map +1 -0
- package/dist/tab.js +2 -1
- package/dist/tab.js.map +1 -1
- package/dist/tabs.js +10 -8
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +349 -0
- package/dist/tag.js.map +1 -0
- package/dist/test/code-editor.test.d.ts +1 -0
- package/dist/test/color-field.test.d.ts +1 -0
- package/dist/test/color-picker.test.d.ts +1 -0
- package/dist/test/condition-builder.test.d.ts +1 -0
- package/dist/test/field.test.d.ts +1 -0
- package/dist/test/form-controls.test.d.ts +1 -0
- package/dist/test/icon.test.d.ts +1 -1
- package/dist/test/input.test.d.ts +1 -0
- package/dist/test/navigation.test.d.ts +1 -0
- package/dist/test/segmented-button.test.d.ts +1 -0
- package/dist/test/slider.test.d.ts +1 -0
- package/dist/textarea.js +237 -0
- package/dist/textarea.js.map +1 -0
- package/dist/time-picker.js +241 -0
- package/dist/time-picker.js.map +1 -0
- package/dist/toolbar.js +26 -9
- package/dist/toolbar.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/url-field.js +298 -0
- package/dist/url-field.js.map +1 -0
- package/package.json +29 -8
- package/readme.md +2 -2
- package/scss/tokens.css +175 -18
- package/src/__internal/utils/size.ts +23 -0
- package/src/app-bar/app-bar.scss +4 -16
- package/src/bottom-sheet/bottom-sheet.scss +1 -1
- package/src/button/ButtonTypes.ts +2 -0
- package/src/button/button/button-base.scss +84 -84
- package/src/button/button/button-colors.scss +14 -2
- package/src/button/button/button-layers.scss +71 -71
- package/src/button/button/button-shapes.scss +2 -2
- package/src/button/button/button-sizes.scss +35 -35
- package/src/button/button/button.scss +1 -1
- package/src/button/button/button.ts +1 -2
- package/src/button/button-group/button-group.scss +5 -5
- package/src/button/fab/fab-sizes.scss +15 -15
- package/src/button/fab/fab.scss +32 -32
- package/src/button/icon-button/icon-button-sizes.scss +7 -7
- package/src/chart-bar/chart-bar.scss +1 -1
- package/src/checkbox/checkbox.scss +7 -6
- package/src/checkbox/checkbox.ts +92 -40
- package/src/chip/chip/chip.ts +8 -5
- package/src/chip/chip-set/chip-set.ts +2 -0
- package/src/chip/tag/tag-colors.scss +1 -1
- package/src/chip/tag/tag-sizes.scss +9 -0
- package/src/chip/tag/tag.scss +1 -1
- package/src/chip/tag/tag.ts +20 -9
- package/src/code-editor/code-editor.scss +8 -3
- package/src/code-editor/code-editor.ts +148 -79
- package/src/code-highlighter/code-highlighter.scss +1 -1
- package/src/color-field/color-field.scss +48 -0
- package/src/color-field/color-field.ts +239 -0
- package/src/color-field/index.ts +1 -0
- package/src/color-picker/color-picker.scss +33 -15
- package/src/color-picker/color-picker.ts +2 -1
- package/src/condition-builder/cb-divider.scss +4 -5
- package/src/condition-builder/cb-divider.ts +3 -1
- package/src/condition-builder/cb-drag.ts +35 -0
- package/src/condition-builder/cb-group-base.scss +97 -0
- package/src/condition-builder/cb-group-base.ts +335 -0
- package/src/condition-builder/cb-group.scss +21 -0
- package/src/condition-builder/cb-group.ts +72 -0
- package/src/condition-builder/cb-rule.scss +90 -0
- package/src/condition-builder/cb-rule.ts +129 -0
- package/src/condition-builder/cb-types.ts +16 -0
- package/src/condition-builder/condition-builder.scss +12 -9
- package/src/condition-builder/condition-builder.ts +77 -17
- package/src/condition-builder/index.ts +7 -3
- package/src/date-picker/date-picker.ts +2 -3
- package/src/field/field.scss +34 -0
- package/src/flow/flow.scss +5 -5
- package/src/image/image.scss +2 -2
- package/src/index.ts +14 -6
- package/src/input/BaseInput.ts +54 -4
- package/src/input/input.ts +104 -79
- package/src/list/list-item.ts +2 -0
- package/src/loader.ts +34 -19
- package/src/markdown-editor/markdown-editor.scss +2 -2
- package/src/menu/menu-item/menu-item.scss +30 -30
- package/src/navigation-bar/index.ts +2 -0
- package/src/navigation-bar/navigation-bar-item.ts +25 -0
- package/src/navigation-bar/navigation-bar.scss +27 -0
- package/src/navigation-bar/navigation-bar.ts +96 -0
- package/src/navigation-drawer/index.ts +2 -0
- package/src/navigation-drawer/navigation-drawer-item.scss +82 -0
- package/src/navigation-drawer/navigation-drawer-item.ts +133 -0
- package/src/navigation-drawer/navigation-drawer.scss +99 -0
- package/src/navigation-drawer/navigation-drawer.ts +196 -0
- package/src/navigation-rail/navigation-rail.scss +1 -1
- package/src/number-field/number-field.ts +2 -3
- package/src/pagination/pagination.scss +1 -1
- package/src/progress/circular-progress/circular-progress.ts +2 -0
- package/src/progress/linear-progress/linear-progress.ts +2 -0
- package/src/radio/index.ts +1 -0
- package/src/radio/radio-group.scss +39 -0
- package/src/radio/radio-group.ts +167 -0
- package/src/radio/radio.ts +74 -31
- package/src/segmented-button/segmented-button-group.ts +12 -0
- package/src/segmented-button/segmented-button.ts +12 -6
- package/src/select/select.ts +21 -1
- package/src/side-sheet/side-sheet.scss +1 -1
- package/src/sidebar-menu/sidebar-menu-item.scss +1 -1
- package/src/sidebar-menu/sidebar-menu-item.ts +2 -0
- package/src/sidebar-menu/sidebar-menu.ts +2 -0
- package/src/sidebar-menu/sidebar-sub-menu.scss +1 -1
- package/src/sidebar-menu/sidebar-sub-menu.ts +2 -0
- package/src/slider/slider.scss +3 -3
- package/src/slider/slider.ts +119 -31
- package/src/snackbar/snackbar.ts +3 -3
- package/src/split-button/split-button-colors.scss +2 -2
- package/src/svg/svg.scss +5 -5
- package/src/switch/switch.scss +0 -1
- package/src/switch/switch.ts +82 -47
- package/src/tabs/tab.scss +2 -1
- package/src/tabs/tabs.ts +14 -8
- package/src/textarea/textarea.ts +2 -3
- package/src/time-picker/time-picker.ts +2 -3
- package/src/toolbar/toolbar.scss +4 -4
- package/src/toolbar/toolbar.ts +12 -5
- package/src/url-field/url-field.ts +2 -3
- package/dist/BaseInput-CU1zZYKc.js +0 -27
- package/dist/BaseInput-CU1zZYKc.js.map +0 -1
- package/dist/brand-loader.js +0 -358
- package/dist/brand-loader.js.map +0 -1
- package/dist/cb-compound-expression.js +0 -133
- package/dist/cb-compound-expression.js.map +0 -1
- package/dist/cb-expression.js +0 -78
- package/dist/cb-expression.js.map +0 -1
- package/dist/cb-predicate.js +0 -141
- package/dist/cb-predicate.js.map +0 -1
- package/dist/element-internals-2CMts_0M.js.map +0 -1
- package/dist/form-associated-BXADnjOB.js.map +0 -1
- package/dist/list-AdO-PUq_.js.map +0 -1
- package/dist/select-DkyRqUTI.js +0 -3955
- package/dist/select-DkyRqUTI.js.map +0 -1
- package/dist/src/brand-loader/brand-loader.d.ts +0 -33
- package/dist/src/brand-loader/index.d.ts +0 -2
- package/dist/src/condition-builder/cb-compound-expression.d.ts +0 -30
- package/dist/src/condition-builder/cb-expression.d.ts +0 -30
- package/dist/src/condition-builder/cb-predicate.d.ts +0 -29
- package/src/brand-loader/brand-loader.scss +0 -270
- package/src/brand-loader/brand-loader.ts +0 -115
- package/src/brand-loader/index.ts +0 -2
- package/src/condition-builder/cb-compound-expression.scss +0 -41
- package/src/condition-builder/cb-compound-expression.ts +0 -79
- package/src/condition-builder/cb-expression.scss +0 -13
- package/src/condition-builder/cb-expression.ts +0 -48
- package/src/condition-builder/cb-predicate.scss +0 -35
- package/src/condition-builder/cb-predicate.ts +0 -101
- /package/dist/test/{brand-loader.test.d.ts → button.test.d.ts} +0 -0
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
@use "../../scss/mixin";
|
|
2
|
-
|
|
3
|
-
@include mixin.base-styles;
|
|
4
|
-
|
|
5
|
-
:host {
|
|
6
|
-
display: inline-block;
|
|
7
|
-
vertical-align: middle;
|
|
8
|
-
--brand-loader-size: 4rem;
|
|
9
|
-
--brand-loader-tile-color: #ff0000;
|
|
10
|
-
--brand-loader-mark-color: #ffffff;
|
|
11
|
-
--brand-loader-duration: 2.4s;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.brand-loader {
|
|
15
|
-
position: relative;
|
|
16
|
-
isolation: isolate;
|
|
17
|
-
width: var(--brand-loader-size);
|
|
18
|
-
height: var(--brand-loader-size);
|
|
19
|
-
line-height: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
svg {
|
|
23
|
-
display: block;
|
|
24
|
-
width: 100%;
|
|
25
|
-
height: 100%;
|
|
26
|
-
overflow: visible;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.tile {
|
|
30
|
-
fill: var(--brand-loader-tile-color);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.mark,
|
|
34
|
-
.stem,
|
|
35
|
-
.arm,
|
|
36
|
-
.ghost {
|
|
37
|
-
fill: var(--brand-loader-mark-color);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Trace: the outline draws itself, fills, then rubs out in the same direction
|
|
41
|
-
|
|
42
|
-
.trace .mark {
|
|
43
|
-
fill-opacity: 0;
|
|
44
|
-
stroke: var(--brand-loader-mark-color);
|
|
45
|
-
stroke-width: 5;
|
|
46
|
-
stroke-linejoin: round;
|
|
47
|
-
stroke-dasharray: 1 1;
|
|
48
|
-
stroke-dashoffset: 1;
|
|
49
|
-
animation: brand-loader-trace var(--brand-loader-duration) infinite;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@keyframes brand-loader-trace {
|
|
53
|
-
0% {
|
|
54
|
-
stroke-dashoffset: 1;
|
|
55
|
-
fill-opacity: 0;
|
|
56
|
-
animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
|
|
57
|
-
}
|
|
58
|
-
42% {
|
|
59
|
-
stroke-dashoffset: 0;
|
|
60
|
-
fill-opacity: 0;
|
|
61
|
-
animation-timing-function: ease-out;
|
|
62
|
-
}
|
|
63
|
-
56%,
|
|
64
|
-
78% {
|
|
65
|
-
stroke-dashoffset: 0;
|
|
66
|
-
fill-opacity: 1;
|
|
67
|
-
animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
|
|
68
|
-
}
|
|
69
|
-
100% {
|
|
70
|
-
stroke-dashoffset: -1;
|
|
71
|
-
fill-opacity: 0;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Build: the stem rises from the baseline, the arm swings out, then both fold away
|
|
76
|
-
|
|
77
|
-
.build .stem {
|
|
78
|
-
transform-box: fill-box;
|
|
79
|
-
transform-origin: 50% 100%;
|
|
80
|
-
animation: brand-loader-stem var(--brand-loader-duration) infinite;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.build .arm {
|
|
84
|
-
transform-box: fill-box;
|
|
85
|
-
transform-origin: 9% 40%;
|
|
86
|
-
animation: brand-loader-arm var(--brand-loader-duration) infinite;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@keyframes brand-loader-stem {
|
|
90
|
-
0% {
|
|
91
|
-
transform: scaleY(0);
|
|
92
|
-
animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
93
|
-
}
|
|
94
|
-
24%,
|
|
95
|
-
70% {
|
|
96
|
-
transform: scaleY(1);
|
|
97
|
-
animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);
|
|
98
|
-
}
|
|
99
|
-
88%,
|
|
100
|
-
100% {
|
|
101
|
-
transform: scaleY(0);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@keyframes brand-loader-arm {
|
|
106
|
-
0%,
|
|
107
|
-
16% {
|
|
108
|
-
transform: rotate(60deg) scale(0);
|
|
109
|
-
animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
110
|
-
}
|
|
111
|
-
44%,
|
|
112
|
-
60% {
|
|
113
|
-
transform: rotate(0deg) scale(1);
|
|
114
|
-
animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);
|
|
115
|
-
}
|
|
116
|
-
74%,
|
|
117
|
-
100% {
|
|
118
|
-
transform: rotate(60deg) scale(0);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Fill and progress: a faint r with a solid one clipped over it
|
|
123
|
-
|
|
124
|
-
.ghost {
|
|
125
|
-
opacity: 0.3;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.fill .mark {
|
|
129
|
-
animation: brand-loader-fill var(--brand-loader-duration) cubic-bezier(0.65, 0, 0.35, 1) infinite;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.progress .mark {
|
|
133
|
-
clip-path: inset(calc((1 - var(--brand-loader-progress, 0)) * 100%) 0 0 0);
|
|
134
|
-
transition: clip-path 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@keyframes brand-loader-fill {
|
|
138
|
-
0% {
|
|
139
|
-
clip-path: inset(100% 0 0 0);
|
|
140
|
-
}
|
|
141
|
-
60%,
|
|
142
|
-
72% {
|
|
143
|
-
clip-path: inset(0 0 0 0);
|
|
144
|
-
}
|
|
145
|
-
100% {
|
|
146
|
-
clip-path: inset(0 0 100% 0);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Pulse: the tile beats twice and sends out a ring, a little faster than the other loops
|
|
151
|
-
|
|
152
|
-
.pulse svg {
|
|
153
|
-
animation: brand-loader-beat calc(var(--brand-loader-duration) * 0.75) infinite;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.pulse::before {
|
|
157
|
-
content: "";
|
|
158
|
-
position: absolute;
|
|
159
|
-
inset: 0;
|
|
160
|
-
z-index: -1;
|
|
161
|
-
border: calc(var(--brand-loader-size) / 24) solid var(--brand-loader-tile-color);
|
|
162
|
-
opacity: 0;
|
|
163
|
-
animation: brand-loader-ring calc(var(--brand-loader-duration) * 0.75) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
@keyframes brand-loader-beat {
|
|
167
|
-
0%,
|
|
168
|
-
40%,
|
|
169
|
-
100% {
|
|
170
|
-
transform: scale(1);
|
|
171
|
-
}
|
|
172
|
-
8% {
|
|
173
|
-
transform: scale(0.9);
|
|
174
|
-
}
|
|
175
|
-
16% {
|
|
176
|
-
transform: scale(1.05);
|
|
177
|
-
}
|
|
178
|
-
24% {
|
|
179
|
-
transform: scale(0.95);
|
|
180
|
-
}
|
|
181
|
-
32% {
|
|
182
|
-
transform: scale(1.02);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
@keyframes brand-loader-ring {
|
|
187
|
-
0%,
|
|
188
|
-
14% {
|
|
189
|
-
transform: scale(1);
|
|
190
|
-
opacity: 0;
|
|
191
|
-
}
|
|
192
|
-
16% {
|
|
193
|
-
transform: scale(1);
|
|
194
|
-
opacity: 0.5;
|
|
195
|
-
}
|
|
196
|
-
72%,
|
|
197
|
-
100% {
|
|
198
|
-
transform: scale(1.7);
|
|
199
|
-
opacity: 0;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Orbit: the mark holds still while a runner chases round a track outside it
|
|
204
|
-
|
|
205
|
-
.track,
|
|
206
|
-
.runner {
|
|
207
|
-
fill: none;
|
|
208
|
-
stroke: var(--brand-loader-tile-color);
|
|
209
|
-
stroke-width: 10;
|
|
210
|
-
stroke-linejoin: round;
|
|
211
|
-
stroke-linecap: round;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.track {
|
|
215
|
-
stroke-opacity: 0.16;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.runner {
|
|
219
|
-
stroke-dasharray: 0.04 0.96;
|
|
220
|
-
animation: brand-loader-orbit var(--brand-loader-duration) cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
@keyframes brand-loader-orbit {
|
|
224
|
-
0% {
|
|
225
|
-
stroke-dasharray: 0.04 0.96;
|
|
226
|
-
stroke-dashoffset: 0;
|
|
227
|
-
}
|
|
228
|
-
50% {
|
|
229
|
-
stroke-dasharray: 0.4 0.6;
|
|
230
|
-
stroke-dashoffset: -0.3;
|
|
231
|
-
}
|
|
232
|
-
100% {
|
|
233
|
-
stroke-dasharray: 0.04 0.96;
|
|
234
|
-
stroke-dashoffset: -1;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Reduced motion: the whole mark, breathing gently, unless full-motion is set
|
|
239
|
-
|
|
240
|
-
@media (prefers-reduced-motion: reduce) {
|
|
241
|
-
:host(:not([full-motion])) {
|
|
242
|
-
.brand-loader *,
|
|
243
|
-
.brand-loader::before {
|
|
244
|
-
animation: none;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.trace .mark {
|
|
248
|
-
fill-opacity: 1;
|
|
249
|
-
stroke-dashoffset: 0;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.fill .mark {
|
|
253
|
-
clip-path: none;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.runner {
|
|
257
|
-
display: none;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.brand-loader:not(.progress) svg {
|
|
261
|
-
animation: brand-loader-breathe 2s ease-in-out infinite;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
@keyframes brand-loader-breathe {
|
|
267
|
-
50% {
|
|
268
|
-
opacity: 0.55;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { html, LitElement, nothing, svg } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { styleMap } from 'lit/directives/style-map.js';
|
|
4
|
-
|
|
5
|
-
import styles from './brand-loader.scss';
|
|
6
|
-
import IndividualComponent from '@/IndividualComponent.js';
|
|
7
|
-
|
|
8
|
-
export type BrandLoaderVariant = 'build' | 'trace' | 'fill' | 'pulse' | 'orbit';
|
|
9
|
-
|
|
10
|
-
// The r mark, redrawn from the Redvars logo on a 256 tile
|
|
11
|
-
const MARK_PATH =
|
|
12
|
-
'M90 84H118L125.5 108C129 98 146 83 162 82H180L178 118H158C144 120 128 130 128 146V224H90Z';
|
|
13
|
-
// The same mark in two pieces, overlapping at the joint, for the build variant
|
|
14
|
-
const STEM_PATH = 'M90 84H118L125.5 108L128 116V224H90Z';
|
|
15
|
-
const ARM_PATH =
|
|
16
|
-
'M125.5 108C129 98 146 83 162 82H180L178 118H158C144 120 128 130 128 146H120V108Z';
|
|
17
|
-
// A square track just outside the tile, starting at its top centre, for the orbit variant
|
|
18
|
-
const TRACK_PATH = 'M128 -20H276V276H-20V-20Z';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @label Brand Loader
|
|
22
|
-
* @tag wc-brand-loader
|
|
23
|
-
* @rawTag brand-loader
|
|
24
|
-
* @summary A loading indicator built from the Redvars r mark.
|
|
25
|
-
* @cssprop --brand-loader-size - The edge of the loader.
|
|
26
|
-
* @cssprop --brand-loader-tile-color - The color of the tile.
|
|
27
|
-
* @cssprop --brand-loader-mark-color - The color of the r.
|
|
28
|
-
* @cssprop --brand-loader-duration - The length of one loop.
|
|
29
|
-
* @tags display
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```html
|
|
33
|
-
* <wc-brand-loader></wc-brand-loader>
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
@IndividualComponent
|
|
37
|
-
export class BrandLoader extends LitElement {
|
|
38
|
-
static styles = [styles];
|
|
39
|
-
|
|
40
|
-
/** How the mark moves while loading. Ignored once `value` is set. */
|
|
41
|
-
@property({ type: String, reflect: true })
|
|
42
|
-
variant: BrandLoaderVariant = 'build';
|
|
43
|
-
|
|
44
|
-
/** Progress from 0 to 100. When set, the r fills to this level instead of looping. */
|
|
45
|
-
@property({ type: Number }) value?: number;
|
|
46
|
-
|
|
47
|
-
/** The accessible name of the loader. */
|
|
48
|
-
@property({ type: String }) label = 'Loading';
|
|
49
|
-
|
|
50
|
-
/** Plays the full animation even when the system asks for reduced motion. */
|
|
51
|
-
@property({ type: Boolean, reflect: true, attribute: 'full-motion' })
|
|
52
|
-
fullMotion = false;
|
|
53
|
-
|
|
54
|
-
private get determinate(): boolean {
|
|
55
|
-
return typeof this.value === 'number' && !Number.isNaN(this.value);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
private get progress(): number {
|
|
59
|
-
return Math.min(100, Math.max(0, this.value ?? 0));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
private renderMark() {
|
|
63
|
-
if (this.determinate || this.variant === 'fill') {
|
|
64
|
-
return svg`
|
|
65
|
-
<path class="ghost" d=${MARK_PATH}></path>
|
|
66
|
-
<path class="mark" d=${MARK_PATH}></path>
|
|
67
|
-
`;
|
|
68
|
-
}
|
|
69
|
-
if (this.variant === 'build') {
|
|
70
|
-
return svg`
|
|
71
|
-
<path class="stem" d=${STEM_PATH}></path>
|
|
72
|
-
<path class="arm" d=${ARM_PATH}></path>
|
|
73
|
-
`;
|
|
74
|
-
}
|
|
75
|
-
if (this.variant === 'trace') {
|
|
76
|
-
return svg`<path class="mark" pathLength="1" d=${MARK_PATH}></path>`;
|
|
77
|
-
}
|
|
78
|
-
return svg`<path class="mark" d=${MARK_PATH}></path>`;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
render() {
|
|
82
|
-
const mode = this.determinate ? 'progress' : this.variant;
|
|
83
|
-
const orbit = mode === 'orbit';
|
|
84
|
-
|
|
85
|
-
return html`
|
|
86
|
-
<div
|
|
87
|
-
class="brand-loader ${mode}"
|
|
88
|
-
role="progressbar"
|
|
89
|
-
aria-label=${this.label}
|
|
90
|
-
aria-valuemin=${this.determinate ? 0 : nothing}
|
|
91
|
-
aria-valuemax=${this.determinate ? 100 : nothing}
|
|
92
|
-
aria-valuenow=${this.determinate ? this.progress : nothing}
|
|
93
|
-
style=${styleMap({
|
|
94
|
-
'--brand-loader-progress': this.determinate
|
|
95
|
-
? `${this.progress / 100}`
|
|
96
|
-
: undefined,
|
|
97
|
-
})}
|
|
98
|
-
>
|
|
99
|
-
<svg
|
|
100
|
-
viewBox=${orbit ? '-40 -40 336 336' : '0 0 256 256'}
|
|
101
|
-
aria-hidden="true"
|
|
102
|
-
>
|
|
103
|
-
${orbit
|
|
104
|
-
? svg`
|
|
105
|
-
<path class="track" d=${TRACK_PATH}></path>
|
|
106
|
-
<path class="runner" pathLength="1" d=${TRACK_PATH}></path>
|
|
107
|
-
`
|
|
108
|
-
: nothing}
|
|
109
|
-
<rect class="tile" width="256" height="256"></rect>
|
|
110
|
-
${this.renderMark()}
|
|
111
|
-
</svg>
|
|
112
|
-
</div>
|
|
113
|
-
`;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
@use '../../scss/mixin';
|
|
2
|
-
|
|
3
|
-
@include mixin.base-styles;
|
|
4
|
-
|
|
5
|
-
:host {
|
|
6
|
-
display: block;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.compound-expression {
|
|
10
|
-
display: flex;
|
|
11
|
-
padding-top: var(--spacing-200);
|
|
12
|
-
|
|
13
|
-
.field-name-container {
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
padding-top: var(--spacing-100);
|
|
17
|
-
padding-right: var(--spacing-200);
|
|
18
|
-
|
|
19
|
-
.field-label {
|
|
20
|
-
@include mixin.get-typography-not-important(label-medium);
|
|
21
|
-
color: var(--color-on-surface-variant);
|
|
22
|
-
text-align: center;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.field-compound-type {
|
|
26
|
-
flex: 1;
|
|
27
|
-
padding-bottom: var(--spacing-250);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.conditions {
|
|
32
|
-
flex: 1;
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
gap: 1rem;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.slot-end {
|
|
40
|
-
display: block;
|
|
41
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { html, LitElement, nothing } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import IndividualComponent from '@/IndividualComponent.js';
|
|
4
|
-
import styles from './cb-compound-expression.scss';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @label CB Compound Expression
|
|
8
|
-
* @tag wc-cb-compound-expression
|
|
9
|
-
* @rawTag cb-compound-expression
|
|
10
|
-
* @summary A compound expression group in a condition builder that displays a field label, an optional condition operator divider, and slots for child expressions.
|
|
11
|
-
* @tags condition-builder
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```html
|
|
15
|
-
* <wc-cb-compound-expression field-label="Age" condition-operator="or">
|
|
16
|
-
* <wc-cb-expression>
|
|
17
|
-
* <wc-input placeholder="Enter value"></wc-input>
|
|
18
|
-
* </wc-cb-expression>
|
|
19
|
-
* </wc-cb-compound-expression>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
@IndividualComponent
|
|
23
|
-
export class CbCompoundExpression extends LitElement {
|
|
24
|
-
static styles = [styles];
|
|
25
|
-
|
|
26
|
-
/** The logical operator joining conditions in this group ('and' or 'or'). */
|
|
27
|
-
@property({ type: String, attribute: 'condition-operator', reflect: true })
|
|
28
|
-
conditionOperator?: 'and' | 'or';
|
|
29
|
-
|
|
30
|
-
/** The field name for the compound expression. */
|
|
31
|
-
@property({ type: String, attribute: 'field-name' })
|
|
32
|
-
fieldName = '';
|
|
33
|
-
|
|
34
|
-
/** The display label for the field. */
|
|
35
|
-
@property({ type: String, attribute: 'field-label' })
|
|
36
|
-
fieldLabel = '';
|
|
37
|
-
|
|
38
|
-
override updated() {
|
|
39
|
-
this.__adjustSlotEndPadding();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
private __adjustSlotEndPadding() {
|
|
43
|
-
const slotEnd = this.renderRoot.querySelector<HTMLElement>('.slot-end');
|
|
44
|
-
const fieldNameContainer =
|
|
45
|
-
this.renderRoot.querySelector<HTMLElement>('.field-name-container');
|
|
46
|
-
if (slotEnd && fieldNameContainer) {
|
|
47
|
-
slotEnd.style.paddingInlineStart =
|
|
48
|
-
fieldNameContainer.getBoundingClientRect().width + 'px';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private __renderOperatorDivider() {
|
|
53
|
-
if (!this.conditionOperator) return nothing;
|
|
54
|
-
return html`
|
|
55
|
-
<wc-cb-divider connect-end>
|
|
56
|
-
<wc-tag color="yellow" size="sm">${this.conditionOperator}</wc-tag>
|
|
57
|
-
</wc-cb-divider>
|
|
58
|
-
`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
render() {
|
|
62
|
-
return html`
|
|
63
|
-
<div class="compound-expression" field-name=${this.fieldName}>
|
|
64
|
-
<div class="field-name-container">
|
|
65
|
-
<span class="field-label">${this.fieldLabel}</span>
|
|
66
|
-
<div class="field-compound-type">
|
|
67
|
-
${this.__renderOperatorDivider()}
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
<div class="conditions">
|
|
71
|
-
<slot></slot>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="slot-end">
|
|
75
|
-
<slot name="end"></slot>
|
|
76
|
-
</div>
|
|
77
|
-
`;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { html, LitElement } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import IndividualComponent from '@/IndividualComponent.js';
|
|
4
|
-
import styles from './cb-expression.scss';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @label CB Expression
|
|
8
|
-
* @tag wc-cb-expression
|
|
9
|
-
* @rawTag cb-expression
|
|
10
|
-
* @summary An expression row within a condition builder, containing an operator select and a slot for value inputs.
|
|
11
|
-
* @tags condition-builder
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```html
|
|
15
|
-
* <wc-cb-expression>
|
|
16
|
-
* <wc-input placeholder="Enter value"></wc-input>
|
|
17
|
-
* </wc-cb-expression>
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
@IndividualComponent
|
|
21
|
-
export class CbExpression extends LitElement {
|
|
22
|
-
static styles = [styles];
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The list of operator options to display in the operator select.
|
|
26
|
-
* Each item should have at least `label` and `value` properties.
|
|
27
|
-
*/
|
|
28
|
-
@property({ type: Array })
|
|
29
|
-
operators: { label: string; value: string; icon?: string }[] = [];
|
|
30
|
-
|
|
31
|
-
/** The currently selected operator value. */
|
|
32
|
-
@property({ type: String, attribute: 'operator-value' })
|
|
33
|
-
operatorValue = '';
|
|
34
|
-
|
|
35
|
-
render() {
|
|
36
|
-
return html`
|
|
37
|
-
<div class="expression">
|
|
38
|
-
<wc-select
|
|
39
|
-
inline
|
|
40
|
-
.value=${this.operatorValue}
|
|
41
|
-
placeholder="Select Operator"
|
|
42
|
-
.options=${this.operators}
|
|
43
|
-
></wc-select>
|
|
44
|
-
<slot></slot>
|
|
45
|
-
</div>
|
|
46
|
-
`;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
@use '../../scss/mixin';
|
|
2
|
-
|
|
3
|
-
@include mixin.base-styles;
|
|
4
|
-
|
|
5
|
-
:host {
|
|
6
|
-
display: block;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.predicate:not(.vertical) {
|
|
10
|
-
.predicate-body {
|
|
11
|
-
padding-top: var(--spacing-200);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.predicate-condition-operator {
|
|
15
|
-
padding: var(--spacing-200) var(--spacing-400) 0 var(--spacing-400);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.predicate.vertical {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: stretch;
|
|
22
|
-
|
|
23
|
-
.predicate-condition-operator {
|
|
24
|
-
padding: var(--spacing-400) 0 var(--spacing-200) 0;
|
|
25
|
-
padding-inline-end: var(--spacing-200);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.predicate-body {
|
|
29
|
-
flex: 1;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.slot-end {
|
|
34
|
-
display: block;
|
|
35
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { html, LitElement, nothing } from 'lit';
|
|
2
|
-
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
-
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
|
-
import styles from './cb-predicate.scss';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @label CB Predicate
|
|
9
|
-
* @tag wc-cb-predicate
|
|
10
|
-
* @rawTag cb-predicate
|
|
11
|
-
* @summary A predicate container in a condition builder that can display conditions in horizontal or vertical layout with an optional logical operator divider.
|
|
12
|
-
* @tags condition-builder
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```html
|
|
16
|
-
* <wc-cb-predicate condition-operator="and" vertical>
|
|
17
|
-
* <wc-cb-compound-expression field-label="Age">
|
|
18
|
-
* <wc-cb-expression></wc-cb-expression>
|
|
19
|
-
* </wc-cb-compound-expression>
|
|
20
|
-
* </wc-cb-predicate>
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
@IndividualComponent
|
|
24
|
-
export class CbPredicate extends LitElement {
|
|
25
|
-
static styles = [styles];
|
|
26
|
-
|
|
27
|
-
/** The logical operator shown between predicates ('and' or 'or'). */
|
|
28
|
-
@property({ type: String, attribute: 'condition-operator', reflect: true })
|
|
29
|
-
conditionOperator?: 'and' | 'or';
|
|
30
|
-
|
|
31
|
-
/** Whether to render the predicate in vertical layout. */
|
|
32
|
-
@property({ type: Boolean, reflect: true })
|
|
33
|
-
vertical = false;
|
|
34
|
-
|
|
35
|
-
override updated() {
|
|
36
|
-
if (this.vertical) {
|
|
37
|
-
this.__adjustSlotEndPadding();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
private __adjustSlotEndPadding() {
|
|
42
|
-
const slotEnd = this.renderRoot.querySelector<HTMLElement>('.slot-end');
|
|
43
|
-
const operatorElm = this.renderRoot.querySelector<HTMLElement>(
|
|
44
|
-
'.predicate-condition-operator',
|
|
45
|
-
);
|
|
46
|
-
if (slotEnd && operatorElm) {
|
|
47
|
-
slotEnd.style.paddingInlineStart =
|
|
48
|
-
operatorElm.getBoundingClientRect().width + 'px';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private __renderHorizontalOperator() {
|
|
53
|
-
if (!this.conditionOperator) return nothing;
|
|
54
|
-
return html`
|
|
55
|
-
<wc-cb-divider vertical class="predicate-condition-operator">
|
|
56
|
-
<wc-tag color="yellow" size="sm">${this.conditionOperator}</wc-tag>
|
|
57
|
-
</wc-cb-divider>
|
|
58
|
-
`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
private __renderVerticalOperator() {
|
|
62
|
-
if (!this.conditionOperator) return nothing;
|
|
63
|
-
return html`
|
|
64
|
-
<div class="predicate-condition-operator">
|
|
65
|
-
<wc-cb-divider connect-start connect-end>
|
|
66
|
-
<wc-tag color="green" size="sm">${this.conditionOperator}</wc-tag>
|
|
67
|
-
</wc-cb-divider>
|
|
68
|
-
</div>
|
|
69
|
-
`;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
render() {
|
|
73
|
-
const classes = {
|
|
74
|
-
predicate: true,
|
|
75
|
-
vertical: this.vertical,
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
if (this.vertical) {
|
|
79
|
-
return html`
|
|
80
|
-
<div class=${classMap(classes)}>
|
|
81
|
-
${this.__renderVerticalOperator()}
|
|
82
|
-
<div class="predicate-body">
|
|
83
|
-
<slot></slot>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
<div class="slot-end">
|
|
87
|
-
<slot name="end"></slot>
|
|
88
|
-
</div>
|
|
89
|
-
`;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return html`
|
|
93
|
-
<div class=${classMap(classes)}>
|
|
94
|
-
<div class="predicate-body">
|
|
95
|
-
<slot></slot>
|
|
96
|
-
</div>
|
|
97
|
-
${this.__renderHorizontalOperator()}
|
|
98
|
-
</div>
|
|
99
|
-
`;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
File without changes
|