@tylertech/forge 3.4.2 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1157 -132
- package/dist/label-value/forge-label-value.css +2 -0
- package/dist/lib.js +174 -1
- package/dist/lib.js.map +4 -4
- package/dist/list/forge-list.css +1 -0
- package/dist/vscode.css-custom-data.json +156 -0
- package/dist/vscode.html-custom-data.json +142 -0
- package/esm/app-bar/search/app-bar-search.js +1 -1
- package/esm/autocomplete/autocomplete-core.js +4 -2
- package/esm/autocomplete/autocomplete.js +1 -5
- package/esm/button-toggle/button-toggle/button-toggle-core.js +0 -1
- package/esm/chips/chip/chip.js +1 -1
- package/esm/core/utils/a11y-utils.d.ts +20 -1
- package/esm/core/utils/a11y-utils.js +26 -1
- package/esm/file-picker/file-picker-adapter.d.ts +2 -0
- package/esm/file-picker/file-picker-adapter.js +6 -0
- package/esm/file-picker/file-picker-core.js +1 -0
- package/esm/icon-button/icon-button.js +1 -1
- package/esm/index.d.ts +5 -0
- package/esm/index.js +154 -150
- package/esm/key/index.d.ts +7 -0
- package/esm/key/index.js +7 -0
- package/esm/key/key/index.d.ts +7 -0
- package/esm/key/key/index.js +11 -0
- package/esm/key/key/key.d.ts +30 -0
- package/esm/key/key/key.js +43 -0
- package/esm/key/key-item/index.d.ts +7 -0
- package/esm/key/key-item/index.js +11 -0
- package/esm/key/key-item/key-item.d.ts +47 -0
- package/esm/key/key-item/key-item.js +86 -0
- package/esm/label-value/label-value.js +1 -1
- package/esm/list/list-item/list-item.js +1 -1
- package/esm/list-dropdown/list-dropdown-aware.d.ts +1 -0
- package/esm/list-dropdown/list-dropdown-aware.js +11 -0
- package/esm/meter/index.d.ts +7 -0
- package/esm/meter/index.js +7 -0
- package/esm/meter/meter/index.d.ts +7 -0
- package/esm/meter/meter/index.js +11 -0
- package/esm/meter/meter/meter.d.ts +187 -0
- package/esm/meter/meter/meter.js +359 -0
- package/esm/meter/meter-group/index.d.ts +7 -0
- package/esm/meter/meter-group/index.js +11 -0
- package/esm/meter/meter-group/meter-group.d.ts +108 -0
- package/esm/meter/meter-group/meter-group.js +198 -0
- package/esm/select/select/select.d.ts +3 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/package.json +2 -1
- package/sass/core/styles/tokens/app-bar/search/_tokens.scss +1 -1
- package/sass/core/styles/tokens/key/key/_tokens.scss +17 -0
- package/sass/core/styles/tokens/key/key-item/_tokens.scss +22 -0
- package/sass/core/styles/tokens/meter/meter/_tokens.scss +30 -0
- package/sass/core/styles/tokens/meter/meter-group/_tokens.scss +26 -0
- package/sass/core/styles/typography/index.scss +1 -1
- package/sass/icon-button/icon-button.scss +20 -1
- package/sass/key/key/_core.scss +20 -0
- package/sass/key/key/_token-utils.scss +30 -0
- package/sass/key/key/index.scss +6 -0
- package/sass/key/key/key.scss +26 -0
- package/sass/key/key-item/_core.scss +69 -0
- package/sass/key/key-item/_token-utils.scss +30 -0
- package/sass/key/key-item/index.scss +6 -0
- package/sass/key/key-item/key-item.scss +60 -0
- package/sass/label-value/_core.scss +2 -0
- package/sass/list/list-item/_core.scss +3 -0
- package/sass/meter/meter/_core.scss +206 -0
- package/sass/meter/meter/_token-utils.scss +30 -0
- package/sass/meter/meter/index.scss +6 -0
- package/sass/meter/meter/meter.scss +218 -0
- package/sass/meter/meter-group/_core.scss +83 -0
- package/sass/meter/meter-group/_token-utils.scss +30 -0
- package/sass/meter/meter-group/index.scss +6 -0
- package/sass/meter/meter-group/meter-group.scss +111 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { debounce } from '@tylertech/forge-core';
|
|
8
|
+
import { html, LitElement, unsafeCSS } from 'lit';
|
|
9
|
+
import { customElement, property, queryAssignedElements, queryAssignedNodes, state } from 'lit/decorators.js';
|
|
10
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
11
|
+
import { setDefaultAria, toggleState } from '../../core/utils/a11y-utils';
|
|
12
|
+
const styles = ':host{display:inline}.forge-meter-group{--_meter-group-background:var(--forge-meter-group-background, var(--forge-theme-surface-container-low, #ebebeb));--_meter-group-height:var(--forge-meter-group-height, var(--forge-spacing-medium, 16px));--_meter-group-shape:var(--forge-meter-group-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_meter-group-tickmarks:var(--forge-meter-group-tickmarks, 10);--_meter-group-tickmark-color:var(--forge-meter-group-tickmark-color, var(--forge-theme-outline-high, #212121));--_meter-group-tickmark-opacity:var(--forge-meter-group-tickmark-opacity, 54%)}.forge-meter-group{box-sizing:border-box}.forge-meter-group .heading{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);display:flex;align-items:center;justify-content:space-between;line-height:normal}.forge-meter-group .heading.not-empty{margin-bottom:var(--forge-spacing-xxsmall,4px)}.forge-meter-group .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.forge-meter-group .value{color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}.forge-meter-group .track{position:relative;height:var(--_meter-group-height);border-radius:var(--_meter-group-shape);overflow:hidden;background:var(--_meter-group-background)}.forge-meter-group .track.tickmarks::after{content:\"\";position:relative;display:block;z-index:9999;width:100%;height:100%;margin-left:-1px;background:repeating-linear-gradient(90deg,var(--_meter-group-tickmark-color) 0,var(--_meter-group-tickmark-color) 1px,transparent 1px,transparent calc(100% / (var(--_meter-group-tickmarks) + 1) + 0px));opacity:var(--_meter-group-tickmark-opacity);pointer-events:none}.forge-meter-group .track.inner-shape--inherit{--forge-meter-inner-shape:var(--_meter-group-shape)}.forge-meter-group .track.shape--default{--_meter-group-shape:var(--forge-meter-group-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)))}.forge-meter-group .track.shape--rounded{--_meter-group-shape:var(--forge-meter-group-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)))}.forge-meter-group .track.shape--squared{--_meter-group-shape:var(--forge-meter-group-shape, 0)}.forge-meter-group .track.density--small{--_meter-group-height:var(--forge-meter-group-height, var(--forge-spacing-xsmall, 8px))}.forge-meter-group .track.density--medium{--_meter-group-height:var(--forge-meter-group-height, var(--forge-spacing-medium, 16px))}.forge-meter-group .track.density--large{--_meter-group-height:var(--forge-meter-group-height, var(--forge-spacing-large, 24px))}:host(:is(:state(vertical),:--vertical)){display:block}:host(:is(:state(vertical),:--vertical)) .forge-meter-group{display:flex;flex-direction:row-reverse;align-items:end;width:fit-content;height:100%;max-width:100%}:host(:is(:state(vertical),:--vertical)) .forge-meter-group .heading{flex-direction:column;align-items:start}:host(:is(:state(vertical),:--vertical)) .forge-meter-group .heading.not-empty{margin-bottom:0;margin-left:var(--forge-spacing-xsmall,8px)}:host(:is(:state(vertical),:--vertical)) .forge-meter-group .track{width:var(--_meter-group-height);height:100%}:host(:is(:state(vertical),:--vertical)) .forge-meter-group .track.tickmarks::after{margin-top:1px;margin-left:0;background:repeating-linear-gradient(90deg,var(--_meter-group-tickmark-color),true 0,var(--_meter-group-tickmark-color),true 1px,transparent 1px,transparent calc(100% / (var(--_meter-group-tickmarks) + 1) + 0px))}@media (forced-colors:active){.track{border:1px solid CanvasText}}';
|
|
13
|
+
/**
|
|
14
|
+
* @tag forge-meter-group
|
|
15
|
+
*
|
|
16
|
+
* @summary Meter groups display several meters together on one track.
|
|
17
|
+
*
|
|
18
|
+
* @state vertical - Applied when the meter group is oriented vertically.
|
|
19
|
+
*
|
|
20
|
+
* @cssproperty --forge-meter-group-background - The background color of the meter group.
|
|
21
|
+
* @cssproperty --forge-meter-group-height - The block size of the meter group.
|
|
22
|
+
* @cssproperty --forge-meter-group-shape - The border radius of the meter group.
|
|
23
|
+
* @cssproperty --forge-meter-group-tickmarks - The number of tickmarks to display.
|
|
24
|
+
* @cssproperty --forge-meter-group-tickmark-color - The color of the tickmarks.
|
|
25
|
+
* @cssproperty --forge-meter-group-tickmark-opacity - The opacity of the tickmarks.
|
|
26
|
+
*
|
|
27
|
+
* @csspart root - The root container element.
|
|
28
|
+
* @csspart track - The element comprising the meter group's background.
|
|
29
|
+
*
|
|
30
|
+
* @slot - The default slot for grouped `<forge-meter>` elements.
|
|
31
|
+
* @slot label - Positions a label above the meter group.
|
|
32
|
+
* @slot value - A textual representation of the meter's value.
|
|
33
|
+
*/
|
|
34
|
+
let MeterGroupComponent = class MeterGroupComponent extends LitElement {
|
|
35
|
+
get labels() {
|
|
36
|
+
return this._internals.labels;
|
|
37
|
+
}
|
|
38
|
+
get form() {
|
|
39
|
+
return this._internals.form;
|
|
40
|
+
}
|
|
41
|
+
constructor() {
|
|
42
|
+
super();
|
|
43
|
+
/**
|
|
44
|
+
* The minimum value of each meter in the group.
|
|
45
|
+
* @default 0
|
|
46
|
+
* @attribute
|
|
47
|
+
*/
|
|
48
|
+
this.min = 0;
|
|
49
|
+
/**
|
|
50
|
+
* The maximum value of each meter in the group.
|
|
51
|
+
* @default 1
|
|
52
|
+
* @attribute
|
|
53
|
+
*/
|
|
54
|
+
this.max = 1;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to display tickmarks.
|
|
57
|
+
* @default false
|
|
58
|
+
* @attribute
|
|
59
|
+
*/
|
|
60
|
+
this.tickmarks = false;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the meter is oriented horizontally or vertically.
|
|
63
|
+
* @default 'horizontal'
|
|
64
|
+
* @attribute
|
|
65
|
+
*/
|
|
66
|
+
this.direction = 'horizontal';
|
|
67
|
+
/**
|
|
68
|
+
* The density of the meter group.
|
|
69
|
+
* @default 'default'
|
|
70
|
+
* @attribute
|
|
71
|
+
*/
|
|
72
|
+
this.density = 'default';
|
|
73
|
+
/**
|
|
74
|
+
* The shape of the meter group.
|
|
75
|
+
* @default 'default'
|
|
76
|
+
* @attribute
|
|
77
|
+
*/
|
|
78
|
+
this.shape = 'default';
|
|
79
|
+
/**
|
|
80
|
+
* The shape of each meter in the group.
|
|
81
|
+
* @default 'default'
|
|
82
|
+
* @attribute inner-shape
|
|
83
|
+
*/
|
|
84
|
+
this.innerShape = 'default';
|
|
85
|
+
this._hasSlottedHeadingContent = false;
|
|
86
|
+
/**
|
|
87
|
+
* Debounce the handler to reduce the number of times it's called during rapid changes,
|
|
88
|
+
* especially when the component is first connected.
|
|
89
|
+
*/
|
|
90
|
+
this._debounceMeterChange = debounce(this._handleMeterChange.bind(this), 0);
|
|
91
|
+
this._internals = this.attachInternals();
|
|
92
|
+
}
|
|
93
|
+
connectedCallback() {
|
|
94
|
+
super.connectedCallback();
|
|
95
|
+
setDefaultAria(this, this._internals, { role: 'group' });
|
|
96
|
+
}
|
|
97
|
+
willUpdate(changedProperties) {
|
|
98
|
+
const keys = Array.from(changedProperties.keys());
|
|
99
|
+
if (keys.includes('direction')) {
|
|
100
|
+
toggleState(this._internals, 'vertical', this.direction === 'vertical');
|
|
101
|
+
}
|
|
102
|
+
if (keys.some(key => ['direction', 'min', 'max'].includes(key.toString()))) {
|
|
103
|
+
this._syncMeters();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
render() {
|
|
107
|
+
return html `
|
|
108
|
+
<div part="root" class="forge-meter-group" @change=${this._debounceMeterChange}>
|
|
109
|
+
<div class=${classMap({ heading: true, 'not-empty': this._hasSlottedHeadingContent })} @slotchange=${this._handleHeadingSlotChange}>
|
|
110
|
+
<div class="label"><slot name="label"></slot></div>
|
|
111
|
+
<div class="value"><slot name="value"></slot></div>
|
|
112
|
+
</div>
|
|
113
|
+
<div
|
|
114
|
+
part="track"
|
|
115
|
+
class=${classMap({
|
|
116
|
+
track: true,
|
|
117
|
+
tickmarks: this.tickmarks,
|
|
118
|
+
[`density--${this.density}`]: true,
|
|
119
|
+
[`inner-shape--${this.innerShape}`]: true,
|
|
120
|
+
[`shape--${this.shape}`]: true
|
|
121
|
+
})}>
|
|
122
|
+
<slot @slotchange=${this._debounceMeterChange}></slot>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
`;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Applies the min and max values to each meter in the group. These should always be set on the
|
|
129
|
+
* meter group component to ensure that all meters are in sync.
|
|
130
|
+
*/
|
|
131
|
+
_syncMeters() {
|
|
132
|
+
this._meters.forEach(meter => {
|
|
133
|
+
meter.direction = this.direction;
|
|
134
|
+
meter.min = this.min;
|
|
135
|
+
meter.max = this.max;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Handles changes to the meters in the group, updating their arrangement relative to each other.
|
|
140
|
+
*/
|
|
141
|
+
_handleMeterChange(evt) {
|
|
142
|
+
evt.stopPropagation();
|
|
143
|
+
// Iterate through each slotted meter, applying z-indices based on their order and setting an
|
|
144
|
+
// inset equal to the widths of all preceding meters.
|
|
145
|
+
this._meters.reduce((inset, meter, index, meters) => {
|
|
146
|
+
meter.style.setProperty('--_meter-z-index', `${meters.length - index}`);
|
|
147
|
+
meter.style.setProperty('--_meter-inset', `${inset}%`);
|
|
148
|
+
return inset + meter.percentage;
|
|
149
|
+
}, 0);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Checks whether the meter group has any slotted heading content.
|
|
153
|
+
*/
|
|
154
|
+
_handleHeadingSlotChange() {
|
|
155
|
+
const nodes = [...this._labelNodes, ...this._valueNodes].filter(node => !!node.textContent?.trim());
|
|
156
|
+
this._hasSlottedHeadingContent = !!nodes.length;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
/* @ignore */
|
|
160
|
+
MeterGroupComponent.styles = unsafeCSS(styles);
|
|
161
|
+
MeterGroupComponent.formAssociated = true;
|
|
162
|
+
__decorate([
|
|
163
|
+
property({ type: Number })
|
|
164
|
+
], MeterGroupComponent.prototype, "min", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
property({ type: Number })
|
|
167
|
+
], MeterGroupComponent.prototype, "max", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
property({ type: Boolean })
|
|
170
|
+
], MeterGroupComponent.prototype, "tickmarks", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
property()
|
|
173
|
+
], MeterGroupComponent.prototype, "direction", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
property()
|
|
176
|
+
], MeterGroupComponent.prototype, "density", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
property()
|
|
179
|
+
], MeterGroupComponent.prototype, "shape", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
property({ attribute: 'inner-shape' })
|
|
182
|
+
], MeterGroupComponent.prototype, "innerShape", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
state()
|
|
185
|
+
], MeterGroupComponent.prototype, "_hasSlottedHeadingContent", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
queryAssignedNodes({ slot: 'label' })
|
|
188
|
+
], MeterGroupComponent.prototype, "_labelNodes", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
queryAssignedNodes({ slot: 'value' })
|
|
191
|
+
], MeterGroupComponent.prototype, "_valueNodes", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
queryAssignedElements({ selector: 'forge-meter' })
|
|
194
|
+
], MeterGroupComponent.prototype, "_meters", void 0);
|
|
195
|
+
MeterGroupComponent = __decorate([
|
|
196
|
+
customElement('forge-meter-group')
|
|
197
|
+
], MeterGroupComponent);
|
|
198
|
+
export { MeterGroupComponent };
|
|
@@ -29,7 +29,9 @@ declare global {
|
|
|
29
29
|
change: CustomEvent<any>;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
declare const SelectComponent_base: import("../../constants").AbstractConstructor<import("../../core/mixins/form/with-form-associated").WithFormAssociationContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/label/with-label-aware").WithLabelAwarenessContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/focus/with-focusable").WithFocusableContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/internals/with-default-aria").WithDefaultAriaContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/internals/with-element-internals").WithElementInternalsContract> & import("../../constants").AbstractConstructor<import("../../field/base/with-base-field").WithBaseFieldContract> & (abstract new () => BaseSelectComponent<SelectCore>)
|
|
32
|
+
declare const SelectComponent_base: import("../../constants").AbstractConstructor<import("../../core/mixins/form/with-form-associated").WithFormAssociationContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/label/with-label-aware").WithLabelAwarenessContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/focus/with-focusable").WithFocusableContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/internals/with-default-aria").WithDefaultAriaContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/internals/with-element-internals").WithElementInternalsContract> & import("../../constants").AbstractConstructor<import("../../field/base/with-base-field").WithBaseFieldContract> & ((abstract new () => BaseSelectComponent<SelectCore>) & {
|
|
33
|
+
readonly observedAttributes: string[];
|
|
34
|
+
});
|
|
33
35
|
/**
|
|
34
36
|
* @tag forge-select
|
|
35
37
|
*
|
|
@@ -13,7 +13,7 @@ import { SplitViewPanelCore } from './split-view-panel-core';
|
|
|
13
13
|
import { SplitViewPanelAdapter } from './split-view-panel-adapter';
|
|
14
14
|
import { IconComponent, IconRegistry } from '../../icon';
|
|
15
15
|
const template = '<template><div class=\"forge-split-view-panel\" id=\"root\" part=\"root\"><div class=\"forge-split-view-panel__handle\" id=\"handle\" part=\"handle\" role=\"separator\" aria-controls=\"content\" aria-grabbed=\"false\" tabindex=\"0\"><forge-icon class=\"forge-split-view-panel__icon\" id=\"icon\" part=\"icon\"></forge-icon><forge-state-layer target=\"handle\" id=\"state-layer\" exportparts=\"surface:state-layer\"></forge-state-layer><forge-focus-indicator inward target=\"handle\" part=\"focus-indicator\"></forge-focus-indicator></div><div class=\"forge-split-view-panel__content\" id=\"content\" part=\"content\" role=\"group\"><slot></slot></div></div></template>';
|
|
16
|
-
const styles = '.forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:
|
|
16
|
+
const styles = '.forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:ufuft4t;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes ufuft4t{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:ufuft5a;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes ufuft5a{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:ufuft5g;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes ufuft5g{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:ufuft5z;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes ufuft5z{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:ufuft67;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes ufuft67{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:ufuft6a;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes ufuft6a{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:ufuft70;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes ufuft70{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:ufuft75;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes ufuft75{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}';
|
|
17
17
|
import { StateLayerComponent } from '../../state-layer';
|
|
18
18
|
import { FocusIndicatorComponent } from '../../focus-indicator';
|
|
19
19
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tylertech/forge",
|
|
3
3
|
"description": "Tyler Forge™ Web Components library",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.5.1",
|
|
5
5
|
"author": "Tyler Technologies, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@tylertech/forge-core": "^3.1.0",
|
|
18
18
|
"@tylertech/tyler-icons": "^1.12.0",
|
|
19
19
|
"imask": "^6.6.1",
|
|
20
|
+
"lit": "^3.2.1",
|
|
20
21
|
"tslib": "^2.8.1"
|
|
21
22
|
},
|
|
22
23
|
"customElements": "custom-elements.json"
|
|
@@ -16,7 +16,7 @@ $tokens: (
|
|
|
16
16
|
shape: utils.module-val(app-bar-search, shape, shape.variable(small)),
|
|
17
17
|
gap: utils.module-val(app-bar-search, gap, 4px),
|
|
18
18
|
input-placeholder-color: utils.module-ref(app-bar-search, input-placeholder-color, color),
|
|
19
|
-
input-placeholder-opacity: utils.module-val(app-bar-search, input-placeholder-opacity, theme.emphasis(
|
|
19
|
+
input-placeholder-opacity: utils.module-val(app-bar-search, input-placeholder-opacity, theme.emphasis(higher)),
|
|
20
20
|
background-color: utils.module-ref(app-bar-search, background-color, color),
|
|
21
21
|
background-color-opacity: utils.module-val(app-bar-search, background-color-opacity, theme.emphasis(lowest)),
|
|
22
22
|
border-color: utils.module-ref(app-bar-search, border-color, color),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use '../../../spacing';
|
|
8
|
+
@use '../../../utils';
|
|
9
|
+
|
|
10
|
+
$tokens: (
|
|
11
|
+
gap: utils.module-val(key, gap, spacing.variable(medium)),
|
|
12
|
+
direction: utils.module-val(key, direction, row)
|
|
13
|
+
) !default;
|
|
14
|
+
|
|
15
|
+
@function get($key) {
|
|
16
|
+
@return map.get($tokens, $key);
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use '../../../spacing';
|
|
8
|
+
@use '../../../theme';
|
|
9
|
+
@use '../../../typography';
|
|
10
|
+
@use '../../../utils';
|
|
11
|
+
|
|
12
|
+
$tokens: (
|
|
13
|
+
icon-color: utils.module-val(key-item, icon-color, theme.variable(tertiary)),
|
|
14
|
+
label-color: utils.module-val(key-item, label-color, theme.variable(text-high)),
|
|
15
|
+
value-color: utils.module-val(key-item, value-color, theme.variable(text-medium)),
|
|
16
|
+
gap: utils.module-val(key-item, gap, spacing.variable(xsmall)),
|
|
17
|
+
icon-size: utils.module-val(key-item, icon-size, typography.font-size-relative('1000'))
|
|
18
|
+
) !default;
|
|
19
|
+
|
|
20
|
+
@function get($key) {
|
|
21
|
+
@return map.get($tokens, $key);
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use '../../theme/color-emphasis';
|
|
8
|
+
@use '../../../animation';
|
|
9
|
+
@use '../../../elevation';
|
|
10
|
+
@use '../../../shape';
|
|
11
|
+
@use '../../../spacing';
|
|
12
|
+
@use '../../../theme';
|
|
13
|
+
@use '../../../utils';
|
|
14
|
+
|
|
15
|
+
$tokens: (
|
|
16
|
+
background: utils.module-val(meter, background, theme.variable(tertiary-container-low)),
|
|
17
|
+
color: utils.module-val(meter, color, theme.variable(tertiary)),
|
|
18
|
+
height: utils.module-val(meter, height, spacing.variable(medium)),
|
|
19
|
+
shape: utils.module-val(meter, shape, shape.variable(medium)),
|
|
20
|
+
inner-shape: utils.module-val(meter, inner-shape, 0),
|
|
21
|
+
inner-elevation: utils.module-val(meter, inner-elevation, elevation.value(4)),
|
|
22
|
+
tickmarks: utils.module-val(meter, tickmarks, 10),
|
|
23
|
+
tickmark-opacity: utils.module-val(meter, tickmark-opacity, color-emphasis.value(medium)),
|
|
24
|
+
transition-duration: utils.module-val(meter, transition-duration, animation.variable(duration-short4)),
|
|
25
|
+
transition-timing: utils.module-val(meter, transition-timing, animation.variable(easing-standard))
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
@function get($key) {
|
|
29
|
+
@return map.get($tokens, $key);
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use '../../theme/color-emphasis';
|
|
8
|
+
@use '../../../animation';
|
|
9
|
+
@use '../../../elevation';
|
|
10
|
+
@use '../../../shape';
|
|
11
|
+
@use '../../../spacing';
|
|
12
|
+
@use '../../../theme';
|
|
13
|
+
@use '../../../utils';
|
|
14
|
+
|
|
15
|
+
$tokens: (
|
|
16
|
+
background: utils.module-val(meter-group, background, theme.variable(surface-container-low)),
|
|
17
|
+
height: utils.module-val(meter-group, height, spacing.variable(medium)),
|
|
18
|
+
shape: utils.module-val(meter-group, shape, shape.variable(medium)),
|
|
19
|
+
tickmarks: utils.module-val(meter-group, tickmarks, 10),
|
|
20
|
+
tickmark-color: utils.module-val(meter-group, tickmark-color, theme.variable(outline-high)),
|
|
21
|
+
tickmark-opacity: utils.module-val(meter-group, tickmark-opacity, color-emphasis.value(medium))
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
@function get($key) {
|
|
25
|
+
@return map.get($tokens, $key);
|
|
26
|
+
}
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
@use './core' as *;
|
|
7
|
-
@use '../
|
|
7
|
+
@use '../theme';
|
|
8
|
+
@use '../typography';
|
|
8
9
|
@use '../state-layer';
|
|
9
10
|
@use '../focus-indicator';
|
|
11
|
+
@use '../badge';
|
|
10
12
|
@use '../circular-progress';
|
|
11
13
|
|
|
12
14
|
//
|
|
@@ -203,6 +205,23 @@ forge-state-layer {
|
|
|
203
205
|
}
|
|
204
206
|
}
|
|
205
207
|
|
|
208
|
+
:host(:is([dense], [density='small'])) {
|
|
209
|
+
// We reduce the size of the badge when the density is small
|
|
210
|
+
::slotted(forge-badge[slot='badge']) {
|
|
211
|
+
@include typography.provide(
|
|
212
|
+
label1,
|
|
213
|
+
(
|
|
214
|
+
line-height: normal
|
|
215
|
+
)
|
|
216
|
+
);
|
|
217
|
+
@include badge.provide-theme(
|
|
218
|
+
(
|
|
219
|
+
height: auto
|
|
220
|
+
)
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
206
225
|
//
|
|
207
226
|
// Circular progress
|
|
208
227
|
//
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use './token-utils' as *;
|
|
7
|
+
|
|
8
|
+
@forward './token-utils';
|
|
9
|
+
|
|
10
|
+
@mixin host {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin base {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: #{token(direction)};
|
|
18
|
+
gap: #{token(gap)};
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use '../../core/styles/tokens/key/key/tokens';
|
|
7
|
+
@use '../../core/styles/tokens/token-utils';
|
|
8
|
+
|
|
9
|
+
$_module: key;
|
|
10
|
+
$_tokens: tokens.$tokens;
|
|
11
|
+
|
|
12
|
+
@mixin provide-theme($theme) {
|
|
13
|
+
@include token-utils.provide-theme($_module, $_tokens, $theme);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@function token($name, $type: token) {
|
|
17
|
+
@return token-utils.token($_module, $_tokens, $name, $type);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@function declare($token) {
|
|
21
|
+
@return token-utils.declare($_module, $token);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@mixin override($token, $token-or-value, $type: token) {
|
|
25
|
+
@include token-utils.override($_module, $_tokens, $token, $token-or-value, $type);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin tokens($includes: null, $excludes: null) {
|
|
29
|
+
@include token-utils.tokens($_module, $_tokens, $includes, $excludes);
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use './core';
|
|
7
|
+
|
|
8
|
+
//
|
|
9
|
+
// Host
|
|
10
|
+
//
|
|
11
|
+
|
|
12
|
+
:host {
|
|
13
|
+
@include core.host;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//
|
|
17
|
+
// Base
|
|
18
|
+
//
|
|
19
|
+
|
|
20
|
+
.forge-key {
|
|
21
|
+
@include core.tokens;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.forge-key {
|
|
25
|
+
@include core.base;
|
|
26
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use '../../core/styles/theme';
|
|
7
|
+
@use '../../core/styles/typography';
|
|
8
|
+
@use '../../icon';
|
|
9
|
+
@use './token-utils' as *;
|
|
10
|
+
|
|
11
|
+
@forward './token-utils';
|
|
12
|
+
|
|
13
|
+
@mixin host {
|
|
14
|
+
display: inline;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin base {
|
|
18
|
+
@include typography.style(label1);
|
|
19
|
+
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template:
|
|
23
|
+
'icon label'
|
|
24
|
+
'icon value';
|
|
25
|
+
column-gap: #{token(gap)};
|
|
26
|
+
inline-size: fit-content;
|
|
27
|
+
line-height: normal;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@mixin icon {
|
|
31
|
+
@include icon.provide-theme(
|
|
32
|
+
(
|
|
33
|
+
size: #{token(icon-size)}
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
grid-area: icon;
|
|
38
|
+
color: #{token(icon-color)};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin label {
|
|
42
|
+
grid-area: label;
|
|
43
|
+
color: #{token(label-color)};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin value {
|
|
47
|
+
grid-area: value;
|
|
48
|
+
color: #{token(value-color)};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@mixin default-icon {
|
|
52
|
+
// Subtract a pixel from the default icon's size to better match the size of a slotted icon
|
|
53
|
+
block-size: calc(#{token(icon-size)} - 1px);
|
|
54
|
+
inline-size: calc(#{token(icon-size)} - 1px);
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
background: currentColor;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@mixin inline {
|
|
60
|
+
grid-template: 'icon label value';
|
|
61
|
+
grid-template-columns: auto 1fr auto;
|
|
62
|
+
align-items: center;
|
|
63
|
+
inline-size: auto;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@mixin no-value {
|
|
67
|
+
grid-template: 'icon label';
|
|
68
|
+
align-items: center;
|
|
69
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
@use '../../core/styles/tokens/key/key-item/tokens';
|
|
7
|
+
@use '../../core/styles/tokens/token-utils';
|
|
8
|
+
|
|
9
|
+
$_module: key-item;
|
|
10
|
+
$_tokens: tokens.$tokens;
|
|
11
|
+
|
|
12
|
+
@mixin provide-theme($theme) {
|
|
13
|
+
@include token-utils.provide-theme($_module, $_tokens, $theme);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@function token($name, $type: token) {
|
|
17
|
+
@return token-utils.token($_module, $_tokens, $name, $type);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@function declare($token) {
|
|
21
|
+
@return token-utils.declare($_module, $token);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@mixin override($token, $token-or-value, $type: token) {
|
|
25
|
+
@include token-utils.override($_module, $_tokens, $token, $token-or-value, $type);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin tokens($includes: null, $excludes: null) {
|
|
29
|
+
@include token-utils.tokens($_module, $_tokens, $includes, $excludes);
|
|
30
|
+
}
|