@emuanalytics/flow-rdf-ui 4.0.18 → 4.1.0-preview.2
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/components/alert/alert.styles.mjs +4 -4
- package/dist/components/avatar/avatar.styles.mjs +4 -2
- package/dist/components/badge/badge.styles.mjs +24 -19
- package/dist/components/base-control/base-control.component.mjs +188 -0
- package/dist/components/base-control/base-control.mjs +5 -0
- package/dist/components/base-control/base-control.styles.mjs +39 -0
- package/dist/components/button/button.component.mjs +3 -3
- package/dist/components/button/button.styles.mjs +53 -36
- package/dist/components/calendar/calendar.component.mjs +4 -0
- package/dist/components/calendar/calendar.styles.mjs +5 -11
- package/dist/components/card/card.styles.mjs +8 -4
- package/dist/components/checkbox/checkbox.component.mjs +9 -18
- package/dist/components/checkbox/checkbox.styles.mjs +29 -71
- package/dist/components/checkbox-group/checkbox-group.component.mjs +290 -0
- package/dist/components/checkbox-group/checkbox-group.mjs +5 -0
- package/dist/components/checkbox-group/checkbox-group.styles.mjs +73 -0
- package/dist/components/color-mapper/color-mapper.component.mjs +8 -2
- package/dist/components/color-mapper/color-mapper.styles.mjs +9 -11
- package/dist/components/color-picker/color-picker.styles.mjs +18 -12
- package/dist/components/color-stop/color-stop.styles.mjs +7 -12
- package/dist/components/date-time-picker/date-time-picker.component.mjs +48 -33
- package/dist/components/date-time-picker/date-time-picker.styles.mjs +59 -47
- package/dist/components/details/details.styles.mjs +27 -5
- package/dist/components/dialog/dialog.component.mjs +74 -29
- package/dist/components/dialog/dialog.styles.mjs +21 -6
- package/dist/components/drawer/drawer.styles.mjs +1 -1
- package/dist/components/form-group/form-group.component.mjs +132 -0
- package/dist/components/form-group/form-group.mjs +5 -0
- package/dist/components/form-group/form-group.styles.mjs +81 -0
- package/dist/components/gauge/gauge.component.mjs +6 -9
- package/dist/components/gauge/gauge.styles.mjs +7 -7
- package/dist/components/icon/library.system.mjs +2 -1
- package/dist/components/input/input.component.mjs +50 -35
- package/dist/components/input/input.styles.mjs +56 -187
- package/dist/components/menu/menu.styles.mjs +12 -2
- package/dist/components/menu-item/menu-item.component.mjs +9 -5
- package/dist/components/menu-item/menu-item.styles.mjs +4 -4
- package/dist/components/option/option.styles.mjs +7 -7
- package/dist/components/panel/panel.styles.mjs +1 -5
- package/dist/components/panel-header/panel-header.component.mjs +3 -3
- package/dist/components/panel-header/panel-header.styles.mjs +2 -2
- package/dist/components/popup/popup.styles.mjs +1 -1
- package/dist/components/progress-bar/progress-bar.component.mjs +1 -1
- package/dist/components/query-builder/default-value-templates.mjs +6 -0
- package/dist/components/query-builder/query-builder.component.mjs +132 -86
- package/dist/components/query-builder/query-builder.styles.mjs +56 -13
- package/dist/components/radio/radio.component.mjs +5 -5
- package/dist/components/radio/radio.styles.mjs +20 -64
- package/dist/components/radio-group/radio-group.component.mjs +23 -20
- package/dist/components/radio-group/radio-group.styles.mjs +35 -11
- package/dist/components/range/range.component.mjs +82 -63
- package/dist/components/range/range.styles.mjs +57 -65
- package/dist/components/select/select.component.mjs +79 -48
- package/dist/components/select/select.styles.mjs +94 -143
- package/dist/components/split-view-divider/split-view-divider.styles.mjs +2 -8
- package/dist/components/stepper/stepper.component.mjs +2 -1
- package/dist/components/stepper/stepper.styles.mjs +3 -2
- package/dist/components/stepper-panel/stepper-panel.component.mjs +0 -4
- package/dist/components/switch/switch.component.mjs +67 -33
- package/dist/components/switch/switch.styles.mjs +48 -102
- package/dist/components/tab/tab.component.mjs +3 -0
- package/dist/components/tab-group/tab-group.component.mjs +38 -33
- package/dist/components/tab-group/tab-group.styles.mjs +2 -9
- package/dist/components/tab-panel/tab-panel.styles.mjs +0 -4
- package/dist/components/tag/tag.styles.mjs +57 -70
- package/dist/components/textarea/textarea.component.mjs +12 -12
- package/dist/components/textarea/textarea.styles.mjs +41 -34
- package/dist/components/timer/timer.styles.mjs +2 -2
- package/dist/components/tool-button/tool-button.styles.mjs +8 -8
- package/dist/components/tool-button-group/tool-button-group.styles.mjs +6 -6
- package/dist/custom-elements.json +3471 -2059
- package/dist/index.d.mts +553 -258
- package/dist/index.d.ts +553 -258
- package/dist/index.mjs +3 -0
- package/dist/internal/computed-style.mjs +13 -0
- package/dist/internal/flow-ui-rdf-element.mjs +16 -1
- package/dist/internal/string.mjs +11 -3
- package/dist/package.json.mjs +1 -1
- package/dist/styles/form-control.styles.mjs +155 -33
- package/dist/utilities/register-components.mjs +6 -0
- package/dist/vscode.html-custom-data.json +288 -101
- package/package.json +2 -1
- package/themes/dark-new.css +723 -0
- package/themes/dark-new.styles.js +745 -0
- package/themes/dark.css +174 -117
- package/themes/dark.styles.js +188 -119
- package/themes/light.css +215 -121
- package/themes/light.styles.js +229 -123
|
@@ -15,15 +15,15 @@ const styles = css`
|
|
|
15
15
|
position: relative;
|
|
16
16
|
display: flex;
|
|
17
17
|
align-items: stretch;
|
|
18
|
-
background-color: var(--flow-ui-
|
|
19
|
-
border: solid var(--flow-ui-
|
|
20
|
-
border-top-width: calc(var(--flow-ui-
|
|
18
|
+
background-color: var(--flow-ui-alert-background-color);
|
|
19
|
+
border: solid var(--flow-ui-alert-border-width) var(--flow-ui-alert-border-color);
|
|
20
|
+
border-top-width: calc(var(--flow-ui-alert-border-width) * 3);
|
|
21
21
|
border-radius: var(--flow-ui-border-radius-medium);
|
|
22
22
|
font-family: var(--flow-ui-font-sans);
|
|
23
23
|
font-size: var(--flow-ui-font-size-small);
|
|
24
24
|
font-weight: var(--flow-ui-font-weight-normal);
|
|
25
25
|
line-height: 1.6;
|
|
26
|
-
color: var(--flow-ui-color
|
|
26
|
+
color: var(--flow-ui-alert-color);
|
|
27
27
|
margin: inherit;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -8,6 +8,8 @@ const styles = css`
|
|
|
8
8
|
display: inline-block;
|
|
9
9
|
|
|
10
10
|
--size: 3rem;
|
|
11
|
+
--background-color: var(--flow-ui-avatar-background-color, var(--flow-ui-color-neutral-600));
|
|
12
|
+
--color: var(--flow-ui-avatar-color, var(--flow-ui-color-neutral-200));
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
.avatar {
|
|
@@ -17,11 +19,11 @@ const styles = css`
|
|
|
17
19
|
position: relative;
|
|
18
20
|
width: var(--size);
|
|
19
21
|
height: var(--size);
|
|
20
|
-
background-color: var(--
|
|
22
|
+
background-color: var(--background-color);
|
|
21
23
|
font-family: var(--flow-ui-font-sans);
|
|
22
24
|
font-size: calc(var(--size) * 0.5);
|
|
23
25
|
font-weight: var(--flow-ui-font-weight-normal);
|
|
24
|
-
color: var(--
|
|
26
|
+
color: var(--color);
|
|
25
27
|
user-select: none;
|
|
26
28
|
vertical-align: middle;
|
|
27
29
|
}
|
|
@@ -6,6 +6,8 @@ const styles = css`
|
|
|
6
6
|
|
|
7
7
|
:host {
|
|
8
8
|
display: inline-flex;
|
|
9
|
+
--color: var(--flow-ui-color-primary-contrast);
|
|
10
|
+
--background-color: var(--flow-ui-color-primary-500);
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
.badge {
|
|
@@ -17,42 +19,45 @@ const styles = css`
|
|
|
17
19
|
letter-spacing: var(--flow-ui-letter-spacing-normal);
|
|
18
20
|
line-height: 1;
|
|
19
21
|
border-radius: var(--flow-ui-border-radius-small);
|
|
20
|
-
border: solid 1px var(--
|
|
22
|
+
border: solid 1px var(--background-color);
|
|
21
23
|
white-space: nowrap;
|
|
22
24
|
padding: 0.35em 0.6em;
|
|
23
25
|
user-select: none;
|
|
24
26
|
cursor: inherit;
|
|
27
|
+
|
|
28
|
+
background-color: var(--background-color);
|
|
29
|
+
color: var(--color);
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
/* Variant modifiers */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
color: var(--flow-ui-color-
|
|
33
|
+
:host([variant='primary']) {
|
|
34
|
+
--color: var(--flow-ui-color-primary-contrast);
|
|
35
|
+
--background-color: var(--flow-ui-color-primary-500);
|
|
31
36
|
}
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
color: var(--flow-ui-color-
|
|
38
|
+
:host([variant='secondary']) {
|
|
39
|
+
--color: var(--flow-ui-color-secondary-contrast);
|
|
40
|
+
--background-color: var(--flow-ui-color-secondary-500);
|
|
36
41
|
}
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
color: var(--flow-ui-color-
|
|
43
|
+
:host([variant='success']) {
|
|
44
|
+
--color: var(--flow-ui-color-success-contrast);
|
|
45
|
+
--background-color: var(--flow-ui-color-success-500);
|
|
41
46
|
}
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
color: var(--flow-ui-color-neutral-
|
|
48
|
+
:host([variant='neutral']) {
|
|
49
|
+
--color: var(--flow-ui-color-neutral-contrast);
|
|
50
|
+
--background-color: var(--flow-ui-color-neutral-500);
|
|
46
51
|
}
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
color: var(--flow-ui-color-
|
|
53
|
+
:host([variant='warning']) {
|
|
54
|
+
--color: var(--flow-ui-color-warning-contrast);
|
|
55
|
+
--background-color: var(--flow-ui-color-warning-500);
|
|
51
56
|
}
|
|
52
57
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
color: var(--flow-ui-color-
|
|
58
|
+
:host([variant='danger']) {
|
|
59
|
+
--color: var(--flow-ui-color-danger-contrast);
|
|
60
|
+
--background-color: var(--flow-ui-color-danger-500);
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
/* Pill modifier */
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { html, nothing } from 'lit';
|
|
2
|
+
import { query, state, property } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { boolean } from '../../internal/boolean.mjs';
|
|
5
|
+
import { FlowRdfFormControl } from '../../internal/flow-ui-rdf-element.mjs';
|
|
6
|
+
import { FormControlController } from '../../internal/form.mjs';
|
|
7
|
+
import { HasSlotController } from '../../internal/slot.mjs';
|
|
8
|
+
import { watch } from '../../internal/watch.mjs';
|
|
9
|
+
import styles from './base-control.styles.mjs';
|
|
10
|
+
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
14
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
15
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
16
|
+
if (decorator = decorators[i])
|
|
17
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
18
|
+
if (kind && result)
|
|
19
|
+
__defProp(target, key, result);
|
|
20
|
+
return result;
|
|
21
|
+
};
|
|
22
|
+
class FlowUiBaseControl extends FlowRdfFormControl {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.formControlController = new FormControlController(this, {
|
|
26
|
+
assumeInteractionOn: ["flow-ui-blur", "flow-ui-input"]
|
|
27
|
+
});
|
|
28
|
+
this.hasSlotController = new HasSlotController(this, "help-text", "label");
|
|
29
|
+
this.hasFocus = false;
|
|
30
|
+
this.size = "medium";
|
|
31
|
+
this.filled = false;
|
|
32
|
+
this.pill = false;
|
|
33
|
+
this.label = "";
|
|
34
|
+
this.helpText = "";
|
|
35
|
+
this.disabled = false;
|
|
36
|
+
this.form = "";
|
|
37
|
+
this.required = false;
|
|
38
|
+
this.inline = false;
|
|
39
|
+
this.divider = false;
|
|
40
|
+
}
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
super.connectedCallback();
|
|
43
|
+
this.disabled = boolean(this.disabled, true);
|
|
44
|
+
this.required = boolean(this.required, true);
|
|
45
|
+
}
|
|
46
|
+
/** Gets the validity state object */
|
|
47
|
+
get validity() {
|
|
48
|
+
return this.input.validity;
|
|
49
|
+
}
|
|
50
|
+
/** Gets the validation message */
|
|
51
|
+
get validationMessage() {
|
|
52
|
+
return this.input.validationMessage;
|
|
53
|
+
}
|
|
54
|
+
firstUpdated() {
|
|
55
|
+
this.formControlController.updateValidity();
|
|
56
|
+
}
|
|
57
|
+
handleBlur() {
|
|
58
|
+
this.hasFocus = false;
|
|
59
|
+
this.emit("flow-ui-blur");
|
|
60
|
+
}
|
|
61
|
+
handleFocus() {
|
|
62
|
+
this.hasFocus = true;
|
|
63
|
+
this.emit("flow-ui-focus");
|
|
64
|
+
}
|
|
65
|
+
handleDisabledChange() {
|
|
66
|
+
this.formControlController.setValidity(this.disabled);
|
|
67
|
+
}
|
|
68
|
+
/** Sets focus on the input. */
|
|
69
|
+
focus(options) {
|
|
70
|
+
this.input.focus(options);
|
|
71
|
+
}
|
|
72
|
+
/** Removes focus from the input. */
|
|
73
|
+
blur() {
|
|
74
|
+
this.input.blur();
|
|
75
|
+
}
|
|
76
|
+
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
77
|
+
checkValidity() {
|
|
78
|
+
return this.input.checkValidity();
|
|
79
|
+
}
|
|
80
|
+
/** Gets the associated form, if one exists. */
|
|
81
|
+
getForm() {
|
|
82
|
+
return this.formControlController.getForm();
|
|
83
|
+
}
|
|
84
|
+
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
85
|
+
reportValidity() {
|
|
86
|
+
return this.input.reportValidity();
|
|
87
|
+
}
|
|
88
|
+
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
89
|
+
setCustomValidity(message) {
|
|
90
|
+
this.input.setCustomValidity(message);
|
|
91
|
+
this.formControlController.updateValidity();
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
const hasLabelSlot = this.hasSlotController.test("label");
|
|
95
|
+
const hasHelpTextSlot = this.hasSlotController.test("help-text");
|
|
96
|
+
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
97
|
+
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
98
|
+
return html`
|
|
99
|
+
<div
|
|
100
|
+
part="form-control"
|
|
101
|
+
class=${classMap({
|
|
102
|
+
"form-control": true,
|
|
103
|
+
"form-control--small": this.size === "small",
|
|
104
|
+
"form-control--medium": this.size === "medium",
|
|
105
|
+
"form-control--large": this.size === "large",
|
|
106
|
+
"form-control--inline": this.inline,
|
|
107
|
+
"form-control--disabled": this.disabled,
|
|
108
|
+
"form-control--focused": this.hasFocus,
|
|
109
|
+
"form-control--has-label": hasLabel,
|
|
110
|
+
"form-control--has-help-text": hasHelpText,
|
|
111
|
+
"form-control--has-divider": this.divider,
|
|
112
|
+
"form-control--filled": this.filled,
|
|
113
|
+
"form-control--pill": this.pill
|
|
114
|
+
})}
|
|
115
|
+
>
|
|
116
|
+
<label
|
|
117
|
+
part="form-control-label"
|
|
118
|
+
class="form-control__label"
|
|
119
|
+
for="input"
|
|
120
|
+
aria-hidden=${hasLabel ? "false" : "true"}
|
|
121
|
+
>
|
|
122
|
+
<slot name="label">${this.label}</slot>
|
|
123
|
+
</label>
|
|
124
|
+
|
|
125
|
+
<slot
|
|
126
|
+
name="help-text"
|
|
127
|
+
part="form-control-help-text"
|
|
128
|
+
id="help-text"
|
|
129
|
+
class="form-control__help-text"
|
|
130
|
+
aria-hidden=${hasHelpText ? "false" : "true"}
|
|
131
|
+
>
|
|
132
|
+
${this.helpText}
|
|
133
|
+
</slot>
|
|
134
|
+
|
|
135
|
+
<div part="form-control-input" class=${classMap({
|
|
136
|
+
"form-control__input": true
|
|
137
|
+
})}>
|
|
138
|
+
<input class="input__control" placeholder="Enter text" ?disabled=${this.disabled} ?required=${this.required} @focus=${this.handleFocus} @blur=${this.handleBlur}></input>
|
|
139
|
+
</div>
|
|
140
|
+
${this.divider ? this.renderDivider() : nothing}
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
</div>
|
|
144
|
+
`;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
FlowUiBaseControl.styles = styles;
|
|
148
|
+
__decorateClass([
|
|
149
|
+
query(".input__control")
|
|
150
|
+
], FlowUiBaseControl.prototype, "input", 2);
|
|
151
|
+
__decorateClass([
|
|
152
|
+
state()
|
|
153
|
+
], FlowUiBaseControl.prototype, "hasFocus", 2);
|
|
154
|
+
__decorateClass([
|
|
155
|
+
property({ reflect: true })
|
|
156
|
+
], FlowUiBaseControl.prototype, "size", 2);
|
|
157
|
+
__decorateClass([
|
|
158
|
+
property({ type: Boolean, reflect: true })
|
|
159
|
+
], FlowUiBaseControl.prototype, "filled", 2);
|
|
160
|
+
__decorateClass([
|
|
161
|
+
property({ type: Boolean, reflect: true })
|
|
162
|
+
], FlowUiBaseControl.prototype, "pill", 2);
|
|
163
|
+
__decorateClass([
|
|
164
|
+
property()
|
|
165
|
+
], FlowUiBaseControl.prototype, "label", 2);
|
|
166
|
+
__decorateClass([
|
|
167
|
+
property({ attribute: "help-text" })
|
|
168
|
+
], FlowUiBaseControl.prototype, "helpText", 2);
|
|
169
|
+
__decorateClass([
|
|
170
|
+
property({ type: Boolean, reflect: true })
|
|
171
|
+
], FlowUiBaseControl.prototype, "disabled", 2);
|
|
172
|
+
__decorateClass([
|
|
173
|
+
property({ reflect: true })
|
|
174
|
+
], FlowUiBaseControl.prototype, "form", 2);
|
|
175
|
+
__decorateClass([
|
|
176
|
+
property({ type: Boolean, reflect: true })
|
|
177
|
+
], FlowUiBaseControl.prototype, "required", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
property({ type: Boolean, reflect: true })
|
|
180
|
+
], FlowUiBaseControl.prototype, "inline", 2);
|
|
181
|
+
__decorateClass([
|
|
182
|
+
property({ type: Boolean, reflect: true })
|
|
183
|
+
], FlowUiBaseControl.prototype, "divider", 2);
|
|
184
|
+
__decorateClass([
|
|
185
|
+
watch("disabled", { waitUntilFirstUpdate: true })
|
|
186
|
+
], FlowUiBaseControl.prototype, "handleDisabledChange", 1);
|
|
187
|
+
|
|
188
|
+
export { FlowUiBaseControl as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
3
|
+
import formControlStyles from '../../styles/form-control.styles.mjs';
|
|
4
|
+
|
|
5
|
+
const styles = css`
|
|
6
|
+
${componentStyles}
|
|
7
|
+
${formControlStyles}
|
|
8
|
+
|
|
9
|
+
:host {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.form-control__input {
|
|
14
|
+
padding-inline: var(--control-spacing);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.form-control__input input {
|
|
18
|
+
flex: 1;
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
font-size: inherit;
|
|
21
|
+
font-weight: inherit;
|
|
22
|
+
height: 100%;
|
|
23
|
+
color: var(--control-color);
|
|
24
|
+
border: none;
|
|
25
|
+
background: none;
|
|
26
|
+
box-shadow: none;
|
|
27
|
+
padding: 0;
|
|
28
|
+
margin: 0;
|
|
29
|
+
cursor: inherit;
|
|
30
|
+
outline: none;
|
|
31
|
+
-webkit-appearance: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.form-control.form-control--inline input {
|
|
35
|
+
min-width: 15ch;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
export { styles as default };
|
|
@@ -38,7 +38,7 @@ class FlowUiButton extends FlowRdfFormControl {
|
|
|
38
38
|
this.hasSlotController = new HasSlotController(this, "[default]", "prefix", "suffix");
|
|
39
39
|
this.localize = new LocalizeController(this);
|
|
40
40
|
this.hasFocus = false;
|
|
41
|
-
this.
|
|
41
|
+
this.label = "";
|
|
42
42
|
this.variant = "default";
|
|
43
43
|
this.size = "medium";
|
|
44
44
|
this.caret = false;
|
|
@@ -199,7 +199,7 @@ class FlowUiButton extends FlowRdfFormControl {
|
|
|
199
199
|
})}
|
|
200
200
|
?disabled=${ifDefined(isLink ? void 0 : this.disabled)}
|
|
201
201
|
type=${ifDefined(isLink ? void 0 : this.type)}
|
|
202
|
-
title=${this.
|
|
202
|
+
title=${this.label}
|
|
203
203
|
name=${ifDefined(isLink ? void 0 : this.name)}
|
|
204
204
|
value=${ifDefined(isLink ? void 0 : this.value)}
|
|
205
205
|
href=${ifDefined(isLink ? this.href : void 0)}
|
|
@@ -236,7 +236,7 @@ __decorateClass([
|
|
|
236
236
|
], FlowUiButton.prototype, "hasFocus", 2);
|
|
237
237
|
__decorateClass([
|
|
238
238
|
property()
|
|
239
|
-
], FlowUiButton.prototype, "
|
|
239
|
+
], FlowUiButton.prototype, "label", 2);
|
|
240
240
|
__decorateClass([
|
|
241
241
|
property({ reflect: true })
|
|
242
242
|
], FlowUiButton.prototype, "variant", 2);
|
|
@@ -17,8 +17,8 @@ const buttonStyles = css`
|
|
|
17
17
|
justify-content: center;
|
|
18
18
|
width: 100%;
|
|
19
19
|
border-style: solid;
|
|
20
|
-
border-width: var(--flow-ui-
|
|
21
|
-
font-family: var(--flow-ui-
|
|
20
|
+
border-width: var(--flow-ui-control-border-width);
|
|
21
|
+
font-family: var(--flow-ui-control-font-family);
|
|
22
22
|
font-weight: var(--flow-ui-font-weight-semibold);
|
|
23
23
|
text-decoration: none;
|
|
24
24
|
text-transform: var(--flow-ui-button-text-transform, uppercase);
|
|
@@ -64,7 +64,6 @@ const buttonStyles = css`
|
|
|
64
64
|
align-items: center;
|
|
65
65
|
pointer-events: none;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
67
|
.button__label {
|
|
69
68
|
display: inline-block;
|
|
70
69
|
}
|
|
@@ -79,7 +78,7 @@ const buttonStyles = css`
|
|
|
79
78
|
|
|
80
79
|
/* Default */
|
|
81
80
|
.button--standard.button--default {
|
|
82
|
-
background-color: var(--flow-ui-color-
|
|
81
|
+
background-color: var(--flow-ui-color-background);
|
|
83
82
|
border-color: var(--flow-ui-color-neutral-300);
|
|
84
83
|
color: var(--flow-ui-color-neutral-700);
|
|
85
84
|
}
|
|
@@ -228,13 +227,13 @@ const buttonStyles = css`
|
|
|
228
227
|
.button--outline.button--default.button--checked:not(.button--disabled) {
|
|
229
228
|
border-color: var(--flow-ui-color-primary-500);
|
|
230
229
|
background-color: var(--flow-ui-color-primary-500);
|
|
231
|
-
color: var(--flow-ui-color-
|
|
230
|
+
color: var(--flow-ui-color-background);
|
|
232
231
|
}
|
|
233
232
|
|
|
234
233
|
.button--outline.button--default:active:not(.button--disabled) {
|
|
235
234
|
border-color: var(--flow-ui-color-primary-600);
|
|
236
235
|
background-color: var(--flow-ui-color-primary-600);
|
|
237
|
-
color: var(--flow-ui-color-
|
|
236
|
+
color: var(--flow-ui-color-background);
|
|
238
237
|
}
|
|
239
238
|
|
|
240
239
|
/* Primary */
|
|
@@ -246,13 +245,31 @@ const buttonStyles = css`
|
|
|
246
245
|
.button--outline.button--primary:hover:not(.button--disabled),
|
|
247
246
|
.button--outline.button--primary.button--checked:not(.button--disabled) {
|
|
248
247
|
background-color: var(--flow-ui-color-primary-500);
|
|
249
|
-
color: var(--flow-ui-color-
|
|
248
|
+
color: var(--flow-ui-color-background);
|
|
250
249
|
}
|
|
251
250
|
|
|
252
251
|
.button--outline.button--primary:active:not(.button--disabled) {
|
|
253
252
|
border-color: var(--flow-ui-color-primary-600);
|
|
254
253
|
background-color: var(--flow-ui-color-primary-600);
|
|
255
|
-
color: var(--flow-ui-color-
|
|
254
|
+
color: var(--flow-ui-color-background);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* Secondary */
|
|
258
|
+
.button--outline.button--secondary {
|
|
259
|
+
border-color: var(--flow-ui-color-secondary-500);
|
|
260
|
+
color: var(--flow-ui-color-secondary-500);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.button--outline.button--secondary:hover:not(.button--disabled),
|
|
264
|
+
.button--outline.button--secondary.button--checked:not(.button--disabled) {
|
|
265
|
+
background-color: var(--flow-ui-color-secondary-500);
|
|
266
|
+
color: var(--flow-ui-color-background);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.button--outline.button--secondary:active:not(.button--disabled) {
|
|
270
|
+
border-color: var(--flow-ui-color-secondary-600);
|
|
271
|
+
background-color: var(--flow-ui-color-secondary-600);
|
|
272
|
+
color: var(--flow-ui-color-background);
|
|
256
273
|
}
|
|
257
274
|
|
|
258
275
|
/* Success */
|
|
@@ -264,13 +281,13 @@ const buttonStyles = css`
|
|
|
264
281
|
.button--outline.button--success:hover:not(.button--disabled),
|
|
265
282
|
.button--outline.button--success.button--checked:not(.button--disabled) {
|
|
266
283
|
background-color: var(--flow-ui-color-success-600);
|
|
267
|
-
color: var(--flow-ui-color-
|
|
284
|
+
color: var(--flow-ui-color-background);
|
|
268
285
|
}
|
|
269
286
|
|
|
270
287
|
.button--outline.button--success:active:not(.button--disabled) {
|
|
271
288
|
border-color: var(--flow-ui-color-success-700);
|
|
272
289
|
background-color: var(--flow-ui-color-success-700);
|
|
273
|
-
color: var(--flow-ui-color-
|
|
290
|
+
color: var(--flow-ui-color-background);
|
|
274
291
|
}
|
|
275
292
|
|
|
276
293
|
/* Neutral */
|
|
@@ -282,13 +299,13 @@ const buttonStyles = css`
|
|
|
282
299
|
.button--outline.button--neutral:hover:not(.button--disabled),
|
|
283
300
|
.button--outline.button--neutral.button--checked:not(.button--disabled) {
|
|
284
301
|
background-color: var(--flow-ui-color-neutral-600);
|
|
285
|
-
color: var(--flow-ui-color-
|
|
302
|
+
color: var(--flow-ui-color-background);
|
|
286
303
|
}
|
|
287
304
|
|
|
288
305
|
.button--outline.button--neutral:active:not(.button--disabled) {
|
|
289
306
|
border-color: var(--flow-ui-color-neutral-700);
|
|
290
307
|
background-color: var(--flow-ui-color-neutral-700);
|
|
291
|
-
color: var(--flow-ui-color-
|
|
308
|
+
color: var(--flow-ui-color-background);
|
|
292
309
|
}
|
|
293
310
|
|
|
294
311
|
/* Warning */
|
|
@@ -300,13 +317,13 @@ const buttonStyles = css`
|
|
|
300
317
|
.button--outline.button--warning:hover:not(.button--disabled),
|
|
301
318
|
.button--outline.button--warning.button--checked:not(.button--disabled) {
|
|
302
319
|
background-color: var(--flow-ui-color-warning-600);
|
|
303
|
-
color: var(--flow-ui-color-
|
|
320
|
+
color: var(--flow-ui-color-background);
|
|
304
321
|
}
|
|
305
322
|
|
|
306
323
|
.button--outline.button--warning:active:not(.button--disabled) {
|
|
307
324
|
border-color: var(--flow-ui-color-warning-700);
|
|
308
325
|
background-color: var(--flow-ui-color-warning-700);
|
|
309
|
-
color: var(--flow-ui-color-
|
|
326
|
+
color: var(--flow-ui-color-background);
|
|
310
327
|
}
|
|
311
328
|
|
|
312
329
|
/* Danger */
|
|
@@ -318,13 +335,13 @@ const buttonStyles = css`
|
|
|
318
335
|
.button--outline.button--danger:hover:not(.button--disabled),
|
|
319
336
|
.button--outline.button--danger.button--checked:not(.button--disabled) {
|
|
320
337
|
background-color: var(--flow-ui-color-danger-600);
|
|
321
|
-
color: var(--flow-ui-color-
|
|
338
|
+
color: var(--flow-ui-color-background);
|
|
322
339
|
}
|
|
323
340
|
|
|
324
341
|
.button--outline.button--danger:active:not(.button--disabled) {
|
|
325
342
|
border-color: var(--flow-ui-color-danger-700);
|
|
326
343
|
background-color: var(--flow-ui-color-danger-700);
|
|
327
|
-
color: var(--flow-ui-color-
|
|
344
|
+
color: var(--flow-ui-color-background);
|
|
328
345
|
}
|
|
329
346
|
|
|
330
347
|
@media (forced-colors: active) {
|
|
@@ -367,34 +384,34 @@ const buttonStyles = css`
|
|
|
367
384
|
|
|
368
385
|
.button--x-small {
|
|
369
386
|
height: auto;
|
|
370
|
-
min-height: var(--flow-ui-
|
|
387
|
+
min-height: var(--flow-ui-control-height-small);
|
|
371
388
|
font-size: var(--flow-ui-button-font-size-x-small);
|
|
372
|
-
line-height: calc(var(--flow-ui-
|
|
373
|
-
border-radius: var(--flow-ui-
|
|
389
|
+
line-height: calc(var(--flow-ui-control-height-small) - var(--flow-ui-control-border-width) * 2);
|
|
390
|
+
border-radius: var(--flow-ui-control-border-radius-small);
|
|
374
391
|
}
|
|
375
392
|
|
|
376
393
|
.button--small {
|
|
377
394
|
height: auto;
|
|
378
|
-
min-height: var(--flow-ui-
|
|
395
|
+
min-height: var(--flow-ui-control-height-small);
|
|
379
396
|
font-size: var(--flow-ui-button-font-size-small);
|
|
380
|
-
line-height: calc(var(--flow-ui-
|
|
381
|
-
border-radius: var(--flow-ui-
|
|
397
|
+
line-height: calc(var(--flow-ui-control-height-small) - var(--flow-ui-control-border-width) * 2);
|
|
398
|
+
border-radius: var(--flow-ui-control-border-radius-small);
|
|
382
399
|
}
|
|
383
400
|
|
|
384
401
|
.button--medium {
|
|
385
402
|
height: auto;
|
|
386
|
-
min-height: var(--flow-ui-
|
|
403
|
+
min-height: var(--flow-ui-control-height-medium);
|
|
387
404
|
font-size: var(--flow-ui-button-font-size-medium);
|
|
388
|
-
line-height: calc(var(--flow-ui-
|
|
389
|
-
border-radius: var(--flow-ui-
|
|
405
|
+
line-height: calc(var(--flow-ui-control-height-medium) - var(--flow-ui-control-border-width) * 2);
|
|
406
|
+
border-radius: var(--flow-ui-control-border-radius-medium);
|
|
390
407
|
}
|
|
391
408
|
|
|
392
409
|
.button--large {
|
|
393
410
|
height: auto;
|
|
394
|
-
min-height: var(--flow-ui-
|
|
411
|
+
min-height: var(--flow-ui-control-height-large);
|
|
395
412
|
font-size: var(--flow-ui-button-font-size-large);
|
|
396
|
-
line-height: calc(var(--flow-ui-
|
|
397
|
-
border-radius: var(--flow-ui-
|
|
413
|
+
line-height: calc(var(--flow-ui-control-height-large) - var(--flow-ui-control-border-width) * 2);
|
|
414
|
+
border-radius: var(--flow-ui-control-border-radius-large);
|
|
398
415
|
}
|
|
399
416
|
|
|
400
417
|
/*
|
|
@@ -402,15 +419,15 @@ const buttonStyles = css`
|
|
|
402
419
|
*/
|
|
403
420
|
|
|
404
421
|
.button--pill.button--small {
|
|
405
|
-
border-radius: var(--flow-ui-
|
|
422
|
+
border-radius: var(--flow-ui-control-height-small);
|
|
406
423
|
}
|
|
407
424
|
|
|
408
425
|
.button--pill.button--medium {
|
|
409
|
-
border-radius: var(--flow-ui-
|
|
426
|
+
border-radius: var(--flow-ui-control-height-medium);
|
|
410
427
|
}
|
|
411
428
|
|
|
412
429
|
.button--pill.button--large {
|
|
413
|
-
border-radius: var(--flow-ui-
|
|
430
|
+
border-radius: var(--flow-ui-control-height-large);
|
|
414
431
|
}
|
|
415
432
|
|
|
416
433
|
/*
|
|
@@ -428,19 +445,19 @@ const buttonStyles = css`
|
|
|
428
445
|
}
|
|
429
446
|
|
|
430
447
|
.button--fab.button--small {
|
|
431
|
-
width: var(--flow-ui-
|
|
448
|
+
width: var(--flow-ui-control-height-small);
|
|
432
449
|
box-shadow: var(--flow-ui-shadow-small);
|
|
433
450
|
font-size: var(--flow-ui-font-size-medium);
|
|
434
451
|
}
|
|
435
452
|
|
|
436
453
|
.button--fab.button--medium {
|
|
437
|
-
width: var(--flow-ui-
|
|
454
|
+
width: var(--flow-ui-control-height-medium);
|
|
438
455
|
box-shadow: var(--flow-ui-shadow-medium);
|
|
439
456
|
font-size: var(--flow-ui-font-size-large);
|
|
440
457
|
}
|
|
441
458
|
|
|
442
459
|
.button--fab.button--large {
|
|
443
|
-
width: var(--flow-ui-
|
|
460
|
+
width: var(--flow-ui-control-height-large);
|
|
444
461
|
box-shadow: var(--flow-ui-shadow-large);
|
|
445
462
|
font-size: var(--flow-ui-font-size-large);
|
|
446
463
|
}
|
|
@@ -629,7 +646,7 @@ const buttonStyles = css`
|
|
|
629
646
|
:host(
|
|
630
647
|
.flow-ui-button-group__button:not(.flow-ui-button-group__button--vertical, .flow-ui-button-group__button--first)
|
|
631
648
|
) {
|
|
632
|
-
margin-inline-start: calc(-1 * var(--flow-ui-
|
|
649
|
+
margin-inline-start: calc(-1 * var(--flow-ui-control-border-width));
|
|
633
650
|
}
|
|
634
651
|
|
|
635
652
|
/* Add a visual separator between solid buttons */
|
|
@@ -668,7 +685,7 @@ const buttonStyles = css`
|
|
|
668
685
|
}
|
|
669
686
|
|
|
670
687
|
:host(.flow-ui-button-group__button--vertical:not(.flow-ui-button-group__button--first)) {
|
|
671
|
-
margin-block-start: calc(-1 * var(--flow-ui-
|
|
688
|
+
margin-block-start: calc(-1 * var(--flow-ui-control-border-width));
|
|
672
689
|
}
|
|
673
690
|
|
|
674
691
|
/* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
|
|
@@ -124,6 +124,8 @@ class FlowUiCalendar extends FlowRdfElement {
|
|
|
124
124
|
@click=${() => this.stepDisplayDate({ month: -1 })}
|
|
125
125
|
></flow-ui-icon-button>
|
|
126
126
|
<flow-ui-select
|
|
127
|
+
inline
|
|
128
|
+
sync="width"
|
|
127
129
|
class="calendar__month-select calendar__header-select"
|
|
128
130
|
value=${this._displayDate.month}
|
|
129
131
|
@flow-ui-change=${this.handleHeaderSelectChange}
|
|
@@ -135,6 +137,8 @@ class FlowUiCalendar extends FlowRdfElement {
|
|
|
135
137
|
)}
|
|
136
138
|
</flow-ui-select>
|
|
137
139
|
<flow-ui-select
|
|
140
|
+
inline
|
|
141
|
+
sync="width"
|
|
138
142
|
class="calendar__year-select calendar__header-select"
|
|
139
143
|
value=${this._displayDate.year}
|
|
140
144
|
@flow-ui-change=${this.handleHeaderSelectChange}
|
|
@@ -88,19 +88,13 @@ const styles = css`
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.calendar__day--selected {
|
|
91
|
-
color: var(--flow-ui-color-
|
|
91
|
+
color: var(--flow-ui-color-background);
|
|
92
92
|
background-color: var(--flow-ui-color-primary-500);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.calendar__header
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
min-height: auto;
|
|
99
|
-
gap: var(--flow-ui-spacing-x-small);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.calendar__header-select::part(expand-icon) {
|
|
103
|
-
margin: 0;
|
|
95
|
+
.calendar__header {
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
padding-inline: var(--flow-ui-spacing-small);
|
|
104
98
|
}
|
|
105
99
|
|
|
106
100
|
.calendar__header-select::part(listbox) {
|
|
@@ -117,7 +111,7 @@ const styles = css`
|
|
|
117
111
|
flex: 1;
|
|
118
112
|
/* Allow the input to shrink to accommodate narrow calendars in sidebars */
|
|
119
113
|
min-width: 0;
|
|
120
|
-
--flow-ui-
|
|
114
|
+
--flow-ui-control-spacing-medium: var(--flow-ui-spacing-small);
|
|
121
115
|
}
|
|
122
116
|
|
|
123
117
|
.calendar__time-input::part(input) {
|