@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
|
@@ -4,6 +4,7 @@ import { property, query, state } from 'lit/decorators.js';
|
|
|
4
4
|
import { redispatchEvent } from '@/__internal/utils/dispatch-event-utils.js';
|
|
5
5
|
import { spread } from '@/__internal/directive/spread.js';
|
|
6
6
|
|
|
7
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
7
8
|
import BaseInput from '../input/BaseInput.js';
|
|
8
9
|
import styles from './time-picker.scss';
|
|
9
10
|
|
|
@@ -19,15 +20,13 @@ import styles from './time-picker.scss';
|
|
|
19
20
|
* <wc-time-picker label="Time" placeholder="Select a time"></wc-time-picker>
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
23
|
+
@IndividualComponent
|
|
22
24
|
export class TimePicker extends BaseInput {
|
|
23
25
|
static styles = [styles];
|
|
24
26
|
|
|
25
27
|
@property({ type: String })
|
|
26
28
|
value = '';
|
|
27
29
|
|
|
28
|
-
@property({ type: String })
|
|
29
|
-
name: string = '';
|
|
30
|
-
|
|
31
30
|
@property({ type: String }) placeholder = '';
|
|
32
31
|
|
|
33
32
|
@property({ type: String }) label = '';
|
package/src/toolbar/toolbar.scss
CHANGED
|
@@ -81,20 +81,20 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/* Size variants */
|
|
84
|
-
&.size-
|
|
84
|
+
&.size-sm {
|
|
85
85
|
--toolbar-height: 5rem;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
&.size-
|
|
88
|
+
&.size-md {
|
|
89
89
|
--toolbar-height: 6rem;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
&.size-
|
|
92
|
+
&.size-lg {
|
|
93
93
|
--toolbar-height: 7rem;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
&.elevated {
|
|
97
|
-
--toolbar-shadow: var(--elevation-
|
|
97
|
+
--toolbar-shadow: var(--elevation-level3);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
package/src/toolbar/toolbar.ts
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
|
+
import {
|
|
6
|
+
type LegacySize,
|
|
7
|
+
normalizeSize,
|
|
8
|
+
type Size,
|
|
9
|
+
} from '@/__internal/utils/size.js';
|
|
5
10
|
import styles from './toolbar.scss';
|
|
6
11
|
import colorStyles from './toolbar-colors.scss';
|
|
7
12
|
|
|
@@ -83,12 +88,14 @@ export class Toolbar extends LitElement {
|
|
|
83
88
|
|
|
84
89
|
/**
|
|
85
90
|
* Size of the docked toolbar.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
* - `"sm"`: 80dp height (default).
|
|
92
|
+
* - `"md"`: 96dp height.
|
|
93
|
+
* - `"lg"`: 112dp height.
|
|
94
|
+
*
|
|
95
|
+
* The long names `"small"`, `"medium"` and `"large"` still work but are deprecated.
|
|
89
96
|
*/
|
|
90
97
|
@property({ type: String, reflect: true })
|
|
91
|
-
size:
|
|
98
|
+
size: Size | LegacySize = 'sm';
|
|
92
99
|
|
|
93
100
|
/**
|
|
94
101
|
* Whether the toolbar is visually elevated (adds a shadow).
|
|
@@ -101,7 +108,7 @@ export class Toolbar extends LitElement {
|
|
|
101
108
|
toolbar: true,
|
|
102
109
|
[`variant-${this.variant}`]: true,
|
|
103
110
|
[`orientation-${this.orientation}`]: true,
|
|
104
|
-
[`size-${this.size}`]: true,
|
|
111
|
+
[`size-${normalizeSize(this.size, 'sm')}`]: true,
|
|
105
112
|
elevated: this.elevated,
|
|
106
113
|
};
|
|
107
114
|
|
|
@@ -3,6 +3,7 @@ import { property, query, state } from 'lit/decorators.js';
|
|
|
3
3
|
|
|
4
4
|
import { redispatchEvent } from '@/__internal/utils/dispatch-event-utils.js';
|
|
5
5
|
|
|
6
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
6
7
|
import BaseInput from '../input/BaseInput.js';
|
|
7
8
|
import styles from './url-field.scss';
|
|
8
9
|
|
|
@@ -21,15 +22,13 @@ import styles from './url-field.scss';
|
|
|
21
22
|
* ```
|
|
22
23
|
* @tags form
|
|
23
24
|
*/
|
|
25
|
+
@IndividualComponent
|
|
24
26
|
export class UrlField extends BaseInput {
|
|
25
27
|
static styles = [styles];
|
|
26
28
|
|
|
27
29
|
@property({ type: String })
|
|
28
30
|
value: string = '';
|
|
29
31
|
|
|
30
|
-
@property({ type: String })
|
|
31
|
-
name: string = '';
|
|
32
|
-
|
|
33
32
|
@property({ type: String })
|
|
34
33
|
placeholder: string = '';
|
|
35
34
|
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { _ as __decorate, a as i } from './IndividualComponent-Bdwyrvd6.js';
|
|
2
|
-
import { n } from './property-B49QQ8pS.js';
|
|
3
|
-
|
|
4
|
-
class BaseInput extends i {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.disabled = false;
|
|
8
|
-
this.readonly = false;
|
|
9
|
-
this.required = false;
|
|
10
|
-
this.skeleton = false;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
__decorate([
|
|
14
|
-
n({ type: Boolean, reflect: true })
|
|
15
|
-
], BaseInput.prototype, "disabled", void 0);
|
|
16
|
-
__decorate([
|
|
17
|
-
n({ type: Boolean, reflect: true })
|
|
18
|
-
], BaseInput.prototype, "readonly", void 0);
|
|
19
|
-
__decorate([
|
|
20
|
-
n({ type: Boolean, reflect: true })
|
|
21
|
-
], BaseInput.prototype, "required", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
n({ type: Boolean, reflect: true })
|
|
24
|
-
], BaseInput.prototype, "skeleton", void 0);
|
|
25
|
-
|
|
26
|
-
export { BaseInput as B };
|
|
27
|
-
//# sourceMappingURL=BaseInput-CU1zZYKc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput-CU1zZYKc.js","sources":["../../src/input/BaseInput.ts"],"sourcesContent":["import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nexport default abstract class BaseInput extends LitElement {\n value?: any;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n readonly: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n required: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n skeleton = false;\n}\n"],"names":["LitElement","property"],"mappings":";;;AAGc,MAAgB,SAAU,SAAQA,CAAU,CAAA;AAA1D,IAAA,WAAA,GAAA;;QAIE,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAG,KAAK;IAClB;AAAC;AAVC,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAChB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1B,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAChB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1B,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAChB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1B,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;;;;"}
|
package/dist/brand-loader.js
DELETED
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
import { i, _ as __decorate, I as IndividualComponent, a as i$1, w, A, b } from './IndividualComponent-Bdwyrvd6.js';
|
|
2
|
-
import { n } from './property-B49QQ8pS.js';
|
|
3
|
-
import { o } from './style-map-BQD5Et1D.js';
|
|
4
|
-
import './directive-ZPhl09Yt.js';
|
|
5
|
-
|
|
6
|
-
var css_248z = i`* {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
-webkit-tap-highlight-color: transparent;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.screen-reader-only {
|
|
12
|
-
display: none !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
[hidden] {
|
|
16
|
-
display: none !important;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:host {
|
|
20
|
-
display: inline-block;
|
|
21
|
-
vertical-align: middle;
|
|
22
|
-
--brand-loader-size: 4rem;
|
|
23
|
-
--brand-loader-tile-color: #ff0000;
|
|
24
|
-
--brand-loader-mark-color: #ffffff;
|
|
25
|
-
--brand-loader-duration: 2.4s;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.brand-loader {
|
|
29
|
-
position: relative;
|
|
30
|
-
isolation: isolate;
|
|
31
|
-
width: var(--brand-loader-size);
|
|
32
|
-
height: var(--brand-loader-size);
|
|
33
|
-
line-height: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
svg {
|
|
37
|
-
display: block;
|
|
38
|
-
width: 100%;
|
|
39
|
-
height: 100%;
|
|
40
|
-
overflow: visible;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.tile {
|
|
44
|
-
fill: var(--brand-loader-tile-color);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.mark,
|
|
48
|
-
.stem,
|
|
49
|
-
.arm,
|
|
50
|
-
.ghost {
|
|
51
|
-
fill: var(--brand-loader-mark-color);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.trace .mark {
|
|
55
|
-
fill-opacity: 0;
|
|
56
|
-
stroke: var(--brand-loader-mark-color);
|
|
57
|
-
stroke-width: 5;
|
|
58
|
-
stroke-linejoin: round;
|
|
59
|
-
stroke-dasharray: 1 1;
|
|
60
|
-
stroke-dashoffset: 1;
|
|
61
|
-
animation: brand-loader-trace var(--brand-loader-duration) infinite;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@keyframes brand-loader-trace {
|
|
65
|
-
0% {
|
|
66
|
-
stroke-dashoffset: 1;
|
|
67
|
-
fill-opacity: 0;
|
|
68
|
-
animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
|
|
69
|
-
}
|
|
70
|
-
42% {
|
|
71
|
-
stroke-dashoffset: 0;
|
|
72
|
-
fill-opacity: 0;
|
|
73
|
-
animation-timing-function: ease-out;
|
|
74
|
-
}
|
|
75
|
-
56%, 78% {
|
|
76
|
-
stroke-dashoffset: 0;
|
|
77
|
-
fill-opacity: 1;
|
|
78
|
-
animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
|
|
79
|
-
}
|
|
80
|
-
100% {
|
|
81
|
-
stroke-dashoffset: -1;
|
|
82
|
-
fill-opacity: 0;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
.build .stem {
|
|
86
|
-
transform-box: fill-box;
|
|
87
|
-
transform-origin: 50% 100%;
|
|
88
|
-
animation: brand-loader-stem var(--brand-loader-duration) infinite;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.build .arm {
|
|
92
|
-
transform-box: fill-box;
|
|
93
|
-
transform-origin: 9% 40%;
|
|
94
|
-
animation: brand-loader-arm var(--brand-loader-duration) infinite;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@keyframes brand-loader-stem {
|
|
98
|
-
0% {
|
|
99
|
-
transform: scaleY(0);
|
|
100
|
-
animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
101
|
-
}
|
|
102
|
-
24%, 70% {
|
|
103
|
-
transform: scaleY(1);
|
|
104
|
-
animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);
|
|
105
|
-
}
|
|
106
|
-
88%, 100% {
|
|
107
|
-
transform: scaleY(0);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
@keyframes brand-loader-arm {
|
|
111
|
-
0%, 16% {
|
|
112
|
-
transform: rotate(60deg) scale(0);
|
|
113
|
-
animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
114
|
-
}
|
|
115
|
-
44%, 60% {
|
|
116
|
-
transform: rotate(0deg) scale(1);
|
|
117
|
-
animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0);
|
|
118
|
-
}
|
|
119
|
-
74%, 100% {
|
|
120
|
-
transform: rotate(60deg) scale(0);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
.ghost {
|
|
124
|
-
opacity: 0.3;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.fill .mark {
|
|
128
|
-
animation: brand-loader-fill var(--brand-loader-duration) cubic-bezier(0.65, 0, 0.35, 1) infinite;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.progress .mark {
|
|
132
|
-
clip-path: inset(calc((1 - var(--brand-loader-progress, 0)) * 100%) 0 0 0);
|
|
133
|
-
transition: clip-path 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@keyframes brand-loader-fill {
|
|
137
|
-
0% {
|
|
138
|
-
clip-path: inset(100% 0 0 0);
|
|
139
|
-
}
|
|
140
|
-
60%, 72% {
|
|
141
|
-
clip-path: inset(0 0 0 0);
|
|
142
|
-
}
|
|
143
|
-
100% {
|
|
144
|
-
clip-path: inset(0 0 100% 0);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
.pulse svg {
|
|
148
|
-
animation: brand-loader-beat calc(var(--brand-loader-duration) * 0.75) infinite;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.pulse::before {
|
|
152
|
-
content: "";
|
|
153
|
-
position: absolute;
|
|
154
|
-
inset: 0;
|
|
155
|
-
z-index: -1;
|
|
156
|
-
border: calc(var(--brand-loader-size) / 24) solid var(--brand-loader-tile-color);
|
|
157
|
-
opacity: 0;
|
|
158
|
-
animation: brand-loader-ring calc(var(--brand-loader-duration) * 0.75) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
@keyframes brand-loader-beat {
|
|
162
|
-
0%, 40%, 100% {
|
|
163
|
-
transform: scale(1);
|
|
164
|
-
}
|
|
165
|
-
8% {
|
|
166
|
-
transform: scale(0.9);
|
|
167
|
-
}
|
|
168
|
-
16% {
|
|
169
|
-
transform: scale(1.05);
|
|
170
|
-
}
|
|
171
|
-
24% {
|
|
172
|
-
transform: scale(0.95);
|
|
173
|
-
}
|
|
174
|
-
32% {
|
|
175
|
-
transform: scale(1.02);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
@keyframes brand-loader-ring {
|
|
179
|
-
0%, 14% {
|
|
180
|
-
transform: scale(1);
|
|
181
|
-
opacity: 0;
|
|
182
|
-
}
|
|
183
|
-
16% {
|
|
184
|
-
transform: scale(1);
|
|
185
|
-
opacity: 0.5;
|
|
186
|
-
}
|
|
187
|
-
72%, 100% {
|
|
188
|
-
transform: scale(1.7);
|
|
189
|
-
opacity: 0;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
.track,
|
|
193
|
-
.runner {
|
|
194
|
-
fill: none;
|
|
195
|
-
stroke: var(--brand-loader-tile-color);
|
|
196
|
-
stroke-width: 10;
|
|
197
|
-
stroke-linejoin: round;
|
|
198
|
-
stroke-linecap: round;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.track {
|
|
202
|
-
stroke-opacity: 0.16;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.runner {
|
|
206
|
-
stroke-dasharray: 0.04 0.96;
|
|
207
|
-
animation: brand-loader-orbit var(--brand-loader-duration) cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
@keyframes brand-loader-orbit {
|
|
211
|
-
0% {
|
|
212
|
-
stroke-dasharray: 0.04 0.96;
|
|
213
|
-
stroke-dashoffset: 0;
|
|
214
|
-
}
|
|
215
|
-
50% {
|
|
216
|
-
stroke-dasharray: 0.4 0.6;
|
|
217
|
-
stroke-dashoffset: -0.3;
|
|
218
|
-
}
|
|
219
|
-
100% {
|
|
220
|
-
stroke-dasharray: 0.04 0.96;
|
|
221
|
-
stroke-dashoffset: -1;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
@media (prefers-reduced-motion: reduce) {
|
|
225
|
-
:host(:not([full-motion])) .brand-loader *,
|
|
226
|
-
:host(:not([full-motion])) .brand-loader::before {
|
|
227
|
-
animation: none;
|
|
228
|
-
}
|
|
229
|
-
:host(:not([full-motion])) .trace .mark {
|
|
230
|
-
fill-opacity: 1;
|
|
231
|
-
stroke-dashoffset: 0;
|
|
232
|
-
}
|
|
233
|
-
:host(:not([full-motion])) .fill .mark {
|
|
234
|
-
clip-path: none;
|
|
235
|
-
}
|
|
236
|
-
:host(:not([full-motion])) .runner {
|
|
237
|
-
display: none;
|
|
238
|
-
}
|
|
239
|
-
:host(:not([full-motion])) .brand-loader:not(.progress) svg {
|
|
240
|
-
animation: brand-loader-breathe 2s ease-in-out infinite;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
@keyframes brand-loader-breathe {
|
|
244
|
-
50% {
|
|
245
|
-
opacity: 0.55;
|
|
246
|
-
}
|
|
247
|
-
}`;
|
|
248
|
-
|
|
249
|
-
// The r mark, redrawn from the Redvars logo on a 256 tile
|
|
250
|
-
const MARK_PATH = 'M90 84H118L125.5 108C129 98 146 83 162 82H180L178 118H158C144 120 128 130 128 146V224H90Z';
|
|
251
|
-
// The same mark in two pieces, overlapping at the joint, for the build variant
|
|
252
|
-
const STEM_PATH = 'M90 84H118L125.5 108L128 116V224H90Z';
|
|
253
|
-
const ARM_PATH = 'M125.5 108C129 98 146 83 162 82H180L178 118H158C144 120 128 130 128 146H120V108Z';
|
|
254
|
-
// A square track just outside the tile, starting at its top centre, for the orbit variant
|
|
255
|
-
const TRACK_PATH = 'M128 -20H276V276H-20V-20Z';
|
|
256
|
-
/**
|
|
257
|
-
* @label Brand Loader
|
|
258
|
-
* @tag wc-brand-loader
|
|
259
|
-
* @rawTag brand-loader
|
|
260
|
-
* @summary A loading indicator built from the Redvars r mark.
|
|
261
|
-
* @cssprop --brand-loader-size - The edge of the loader.
|
|
262
|
-
* @cssprop --brand-loader-tile-color - The color of the tile.
|
|
263
|
-
* @cssprop --brand-loader-mark-color - The color of the r.
|
|
264
|
-
* @cssprop --brand-loader-duration - The length of one loop.
|
|
265
|
-
* @tags display
|
|
266
|
-
*
|
|
267
|
-
* @example
|
|
268
|
-
* ```html
|
|
269
|
-
* <wc-brand-loader></wc-brand-loader>
|
|
270
|
-
* ```
|
|
271
|
-
*/
|
|
272
|
-
let BrandLoader = class BrandLoader extends i$1 {
|
|
273
|
-
constructor() {
|
|
274
|
-
super(...arguments);
|
|
275
|
-
/** How the mark moves while loading. Ignored once `value` is set. */
|
|
276
|
-
this.variant = 'build';
|
|
277
|
-
/** The accessible name of the loader. */
|
|
278
|
-
this.label = 'Loading';
|
|
279
|
-
/** Plays the full animation even when the system asks for reduced motion. */
|
|
280
|
-
this.fullMotion = false;
|
|
281
|
-
}
|
|
282
|
-
get determinate() {
|
|
283
|
-
return typeof this.value === 'number' && !Number.isNaN(this.value);
|
|
284
|
-
}
|
|
285
|
-
get progress() {
|
|
286
|
-
return Math.min(100, Math.max(0, this.value ?? 0));
|
|
287
|
-
}
|
|
288
|
-
renderMark() {
|
|
289
|
-
if (this.determinate || this.variant === 'fill') {
|
|
290
|
-
return w `
|
|
291
|
-
<path class="ghost" d=${MARK_PATH}></path>
|
|
292
|
-
<path class="mark" d=${MARK_PATH}></path>
|
|
293
|
-
`;
|
|
294
|
-
}
|
|
295
|
-
if (this.variant === 'build') {
|
|
296
|
-
return w `
|
|
297
|
-
<path class="stem" d=${STEM_PATH}></path>
|
|
298
|
-
<path class="arm" d=${ARM_PATH}></path>
|
|
299
|
-
`;
|
|
300
|
-
}
|
|
301
|
-
if (this.variant === 'trace') {
|
|
302
|
-
return w `<path class="mark" pathLength="1" d=${MARK_PATH}></path>`;
|
|
303
|
-
}
|
|
304
|
-
return w `<path class="mark" d=${MARK_PATH}></path>`;
|
|
305
|
-
}
|
|
306
|
-
render() {
|
|
307
|
-
const mode = this.determinate ? 'progress' : this.variant;
|
|
308
|
-
const orbit = mode === 'orbit';
|
|
309
|
-
return b `
|
|
310
|
-
<div
|
|
311
|
-
class="brand-loader ${mode}"
|
|
312
|
-
role="progressbar"
|
|
313
|
-
aria-label=${this.label}
|
|
314
|
-
aria-valuemin=${this.determinate ? 0 : A}
|
|
315
|
-
aria-valuemax=${this.determinate ? 100 : A}
|
|
316
|
-
aria-valuenow=${this.determinate ? this.progress : A}
|
|
317
|
-
style=${o({
|
|
318
|
-
'--brand-loader-progress': this.determinate
|
|
319
|
-
? `${this.progress / 100}`
|
|
320
|
-
: undefined,
|
|
321
|
-
})}
|
|
322
|
-
>
|
|
323
|
-
<svg
|
|
324
|
-
viewBox=${orbit ? '-40 -40 336 336' : '0 0 256 256'}
|
|
325
|
-
aria-hidden="true"
|
|
326
|
-
>
|
|
327
|
-
${orbit
|
|
328
|
-
? w `
|
|
329
|
-
<path class="track" d=${TRACK_PATH}></path>
|
|
330
|
-
<path class="runner" pathLength="1" d=${TRACK_PATH}></path>
|
|
331
|
-
`
|
|
332
|
-
: A}
|
|
333
|
-
<rect class="tile" width="256" height="256"></rect>
|
|
334
|
-
${this.renderMark()}
|
|
335
|
-
</svg>
|
|
336
|
-
</div>
|
|
337
|
-
`;
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
BrandLoader.styles = [css_248z];
|
|
341
|
-
__decorate([
|
|
342
|
-
n({ type: String, reflect: true })
|
|
343
|
-
], BrandLoader.prototype, "variant", void 0);
|
|
344
|
-
__decorate([
|
|
345
|
-
n({ type: Number })
|
|
346
|
-
], BrandLoader.prototype, "value", void 0);
|
|
347
|
-
__decorate([
|
|
348
|
-
n({ type: String })
|
|
349
|
-
], BrandLoader.prototype, "label", void 0);
|
|
350
|
-
__decorate([
|
|
351
|
-
n({ type: Boolean, reflect: true, attribute: 'full-motion' })
|
|
352
|
-
], BrandLoader.prototype, "fullMotion", void 0);
|
|
353
|
-
BrandLoader = __decorate([
|
|
354
|
-
IndividualComponent
|
|
355
|
-
], BrandLoader);
|
|
356
|
-
|
|
357
|
-
export { BrandLoader };
|
|
358
|
-
//# sourceMappingURL=brand-loader.js.map
|
package/dist/brand-loader.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-loader.js","sources":["../../src/brand-loader/brand-loader.ts"],"sourcesContent":["import { html, LitElement, nothing, svg } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nimport styles from './brand-loader.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\nexport type BrandLoaderVariant = 'build' | 'trace' | 'fill' | 'pulse' | 'orbit';\n\n// The r mark, redrawn from the Redvars logo on a 256 tile\nconst MARK_PATH =\n 'M90 84H118L125.5 108C129 98 146 83 162 82H180L178 118H158C144 120 128 130 128 146V224H90Z';\n// The same mark in two pieces, overlapping at the joint, for the build variant\nconst STEM_PATH = 'M90 84H118L125.5 108L128 116V224H90Z';\nconst ARM_PATH =\n 'M125.5 108C129 98 146 83 162 82H180L178 118H158C144 120 128 130 128 146H120V108Z';\n// A square track just outside the tile, starting at its top centre, for the orbit variant\nconst TRACK_PATH = 'M128 -20H276V276H-20V-20Z';\n\n/**\n * @label Brand Loader\n * @tag wc-brand-loader\n * @rawTag brand-loader\n * @summary A loading indicator built from the Redvars r mark.\n * @cssprop --brand-loader-size - The edge of the loader.\n * @cssprop --brand-loader-tile-color - The color of the tile.\n * @cssprop --brand-loader-mark-color - The color of the r.\n * @cssprop --brand-loader-duration - The length of one loop.\n * @tags display\n *\n * @example\n * ```html\n * <wc-brand-loader></wc-brand-loader>\n * ```\n */\n@IndividualComponent\nexport class BrandLoader extends LitElement {\n static styles = [styles];\n\n /** How the mark moves while loading. Ignored once `value` is set. */\n @property({ type: String, reflect: true })\n variant: BrandLoaderVariant = 'build';\n\n /** Progress from 0 to 100. When set, the r fills to this level instead of looping. */\n @property({ type: Number }) value?: number;\n\n /** The accessible name of the loader. */\n @property({ type: String }) label = 'Loading';\n\n /** Plays the full animation even when the system asks for reduced motion. */\n @property({ type: Boolean, reflect: true, attribute: 'full-motion' })\n fullMotion = false;\n\n private get determinate(): boolean {\n return typeof this.value === 'number' && !Number.isNaN(this.value);\n }\n\n private get progress(): number {\n return Math.min(100, Math.max(0, this.value ?? 0));\n }\n\n private renderMark() {\n if (this.determinate || this.variant === 'fill') {\n return svg`\n <path class=\"ghost\" d=${MARK_PATH}></path>\n <path class=\"mark\" d=${MARK_PATH}></path>\n `;\n }\n if (this.variant === 'build') {\n return svg`\n <path class=\"stem\" d=${STEM_PATH}></path>\n <path class=\"arm\" d=${ARM_PATH}></path>\n `;\n }\n if (this.variant === 'trace') {\n return svg`<path class=\"mark\" pathLength=\"1\" d=${MARK_PATH}></path>`;\n }\n return svg`<path class=\"mark\" d=${MARK_PATH}></path>`;\n }\n\n render() {\n const mode = this.determinate ? 'progress' : this.variant;\n const orbit = mode === 'orbit';\n\n return html`\n <div\n class=\"brand-loader ${mode}\"\n role=\"progressbar\"\n aria-label=${this.label}\n aria-valuemin=${this.determinate ? 0 : nothing}\n aria-valuemax=${this.determinate ? 100 : nothing}\n aria-valuenow=${this.determinate ? this.progress : nothing}\n style=${styleMap({\n '--brand-loader-progress': this.determinate\n ? `${this.progress / 100}`\n : undefined,\n })}\n >\n <svg\n viewBox=${orbit ? '-40 -40 336 336' : '0 0 256 256'}\n aria-hidden=\"true\"\n >\n ${orbit\n ? svg`\n <path class=\"track\" d=${TRACK_PATH}></path>\n <path class=\"runner\" pathLength=\"1\" d=${TRACK_PATH}></path>\n `\n : nothing}\n <rect class=\"tile\" width=\"256\" height=\"256\"></rect>\n ${this.renderMark()}\n </svg>\n </div>\n `;\n }\n}\n"],"names":["LitElement","svg","html","nothing","styleMap","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA;AACA,MAAM,SAAS,GACb,2FAA2F;AAC7F;AACA,MAAM,SAAS,GAAG,sCAAsC;AACxD,MAAM,QAAQ,GACZ,kFAAkF;AACpF;AACA,MAAM,UAAU,GAAG,2BAA2B;AAE9C;;;;;;;;;;;;;;;AAeG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQA,GAAU,CAAA;AAApC,IAAA,W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;;;;"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './IndividualComponent-Bdwyrvd6.js';
|
|
2
|
-
import { n } from './property-B49QQ8pS.js';
|
|
3
|
-
|
|
4
|
-
var css_248z = i`* {
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
-webkit-tap-highlight-color: transparent;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.screen-reader-only {
|
|
10
|
-
display: none !important;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[hidden] {
|
|
14
|
-
display: none !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:host {
|
|
18
|
-
display: block;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.compound-expression {
|
|
22
|
-
display: flex;
|
|
23
|
-
padding-top: var(--spacing-200);
|
|
24
|
-
}
|
|
25
|
-
.compound-expression .field-name-container {
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
padding-top: var(--spacing-100);
|
|
29
|
-
padding-right: var(--spacing-200);
|
|
30
|
-
}
|
|
31
|
-
.compound-expression .field-name-container .field-label {
|
|
32
|
-
font-family: var(--typography-label-medium-font-family);
|
|
33
|
-
font-size: var(--typography-label-medium-font-size);
|
|
34
|
-
font-weight: var(--typography-label-medium-font-weight);
|
|
35
|
-
line-height: var(--typography-label-medium-line-height);
|
|
36
|
-
letter-spacing: var(--typography-label-medium-letter-spacing);
|
|
37
|
-
color: var(--color-on-surface-variant);
|
|
38
|
-
text-align: center;
|
|
39
|
-
}
|
|
40
|
-
.compound-expression .field-name-container .field-compound-type {
|
|
41
|
-
flex: 1;
|
|
42
|
-
padding-bottom: var(--spacing-250);
|
|
43
|
-
}
|
|
44
|
-
.compound-expression .conditions {
|
|
45
|
-
flex: 1;
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
gap: 1rem;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.slot-end {
|
|
52
|
-
display: block;
|
|
53
|
-
}`;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @label CB Compound Expression
|
|
57
|
-
* @tag wc-cb-compound-expression
|
|
58
|
-
* @rawTag cb-compound-expression
|
|
59
|
-
* @summary A compound expression group in a condition builder that displays a field label, an optional condition operator divider, and slots for child expressions.
|
|
60
|
-
* @tags condition-builder
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```html
|
|
64
|
-
* <wc-cb-compound-expression field-label="Age" condition-operator="or">
|
|
65
|
-
* <wc-cb-expression>
|
|
66
|
-
* <wc-input placeholder="Enter value"></wc-input>
|
|
67
|
-
* </wc-cb-expression>
|
|
68
|
-
* </wc-cb-compound-expression>
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
let CbCompoundExpression = class CbCompoundExpression extends i$1 {
|
|
72
|
-
constructor() {
|
|
73
|
-
super(...arguments);
|
|
74
|
-
/** The field name for the compound expression. */
|
|
75
|
-
this.fieldName = '';
|
|
76
|
-
/** The display label for the field. */
|
|
77
|
-
this.fieldLabel = '';
|
|
78
|
-
}
|
|
79
|
-
updated() {
|
|
80
|
-
this.__adjustSlotEndPadding();
|
|
81
|
-
}
|
|
82
|
-
__adjustSlotEndPadding() {
|
|
83
|
-
const slotEnd = this.renderRoot.querySelector('.slot-end');
|
|
84
|
-
const fieldNameContainer = this.renderRoot.querySelector('.field-name-container');
|
|
85
|
-
if (slotEnd && fieldNameContainer) {
|
|
86
|
-
slotEnd.style.paddingInlineStart =
|
|
87
|
-
fieldNameContainer.getBoundingClientRect().width + 'px';
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
__renderOperatorDivider() {
|
|
91
|
-
if (!this.conditionOperator)
|
|
92
|
-
return A;
|
|
93
|
-
return b `
|
|
94
|
-
<wc-cb-divider connect-end>
|
|
95
|
-
<wc-tag color="yellow" size="sm">${this.conditionOperator}</wc-tag>
|
|
96
|
-
</wc-cb-divider>
|
|
97
|
-
`;
|
|
98
|
-
}
|
|
99
|
-
render() {
|
|
100
|
-
return b `
|
|
101
|
-
<div class="compound-expression" field-name=${this.fieldName}>
|
|
102
|
-
<div class="field-name-container">
|
|
103
|
-
<span class="field-label">${this.fieldLabel}</span>
|
|
104
|
-
<div class="field-compound-type">
|
|
105
|
-
${this.__renderOperatorDivider()}
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
<div class="conditions">
|
|
109
|
-
<slot></slot>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<div class="slot-end">
|
|
113
|
-
<slot name="end"></slot>
|
|
114
|
-
</div>
|
|
115
|
-
`;
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
CbCompoundExpression.styles = [css_248z];
|
|
119
|
-
__decorate([
|
|
120
|
-
n({ type: String, attribute: 'condition-operator', reflect: true })
|
|
121
|
-
], CbCompoundExpression.prototype, "conditionOperator", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
n({ type: String, attribute: 'field-name' })
|
|
124
|
-
], CbCompoundExpression.prototype, "fieldName", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
n({ type: String, attribute: 'field-label' })
|
|
127
|
-
], CbCompoundExpression.prototype, "fieldLabel", void 0);
|
|
128
|
-
CbCompoundExpression = __decorate([
|
|
129
|
-
IndividualComponent
|
|
130
|
-
], CbCompoundExpression);
|
|
131
|
-
|
|
132
|
-
export { CbCompoundExpression };
|
|
133
|
-
//# sourceMappingURL=cb-compound-expression.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cb-compound-expression.js","sources":["../../src/condition-builder/cb-compound-expression.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './cb-compound-expression.scss';\n\n/**\n * @label CB Compound Expression\n * @tag wc-cb-compound-expression\n * @rawTag cb-compound-expression\n * @summary A compound expression group in a condition builder that displays a field label, an optional condition operator divider, and slots for child expressions.\n * @tags condition-builder\n *\n * @example\n * ```html\n * <wc-cb-compound-expression field-label=\"Age\" condition-operator=\"or\">\n * <wc-cb-expression>\n * <wc-input placeholder=\"Enter value\"></wc-input>\n * </wc-cb-expression>\n * </wc-cb-compound-expression>\n * ```\n */\n@IndividualComponent\nexport class CbCompoundExpression extends LitElement {\n static styles = [styles];\n\n /** The logical operator joining conditions in this group ('and' or 'or'). */\n @property({ type: String, attribute: 'condition-operator', reflect: true })\n conditionOperator?: 'and' | 'or';\n\n /** The field name for the compound expression. */\n @property({ type: String, attribute: 'field-name' })\n fieldName = '';\n\n /** The display label for the field. */\n @property({ type: String, attribute: 'field-label' })\n fieldLabel = '';\n\n override updated() {\n this.__adjustSlotEndPadding();\n }\n\n private __adjustSlotEndPadding() {\n const slotEnd = this.renderRoot.querySelector<HTMLElement>('.slot-end');\n const fieldNameContainer =\n this.renderRoot.querySelector<HTMLElement>('.field-name-container');\n if (slotEnd && fieldNameContainer) {\n slotEnd.style.paddingInlineStart =\n fieldNameContainer.getBoundingClientRect().width + 'px';\n }\n }\n\n private __renderOperatorDivider() {\n if (!this.conditionOperator) return nothing;\n return html`\n <wc-cb-divider connect-end>\n <wc-tag color=\"yellow\" size=\"sm\">${this.conditionOperator}</wc-tag>\n </wc-cb-divider>\n `;\n }\n\n render() {\n return html`\n <div class=\"compound-expression\" field-name=${this.fieldName}>\n <div class=\"field-name-container\">\n <span class=\"field-label\">${this.fieldLabel}</span>\n <div class=\"field-compound-type\">\n ${this.__renderOperatorDivider()}\n </div>\n </div>\n <div class=\"conditions\">\n <slot></slot>\n </div>\n </div>\n <div class=\"slot-end\">\n <slot name=\"end\"></slot>\n </div>\n `;\n }\n}\n"],"names":["LitElement","nothing","html","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;AAeG;AA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