shirkasoft-ui-components 1.13.18 → 2.0.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/README.md +415 -42
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +367 -73
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +976 -0
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1624 -1400
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +484 -293
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +1141 -0
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-knob.mjs +395 -180
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -303
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +517 -277
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +1014 -814
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +1918 -1676
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -177
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +177 -51
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -369
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +466 -0
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs +147 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -215
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +205 -128
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +97 -125
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -166
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components.mjs +0 -9
- package/package.json +37 -7
- package/src/baseline.css +2472 -0
- package/src/theme.css +15 -543
- package/src/themes/ocean.css +56 -0
- package/src/themes/sunset.css +55 -0
- package/src/themes/violet.css +25 -0
- package/src/tokens.css +612 -0
- package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
- package/types/shirkasoft-ui-components-button.d.ts +142 -49
- package/types/shirkasoft-ui-components-chart.d.ts +59 -44
- package/types/shirkasoft-ui-components-config.d.ts +357 -0
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -65
- package/types/shirkasoft-ui-components-date-picker.d.ts +527 -373
- package/types/shirkasoft-ui-components-fieldset.d.ts +135 -59
- package/types/shirkasoft-ui-components-file-upload.d.ts +176 -106
- package/types/shirkasoft-ui-components-icons.d.ts +1430 -0
- package/types/shirkasoft-ui-components-knob.d.ts +151 -64
- package/types/shirkasoft-ui-components-loading.d.ts +155 -64
- package/types/shirkasoft-ui-components-modal.d.ts +134 -132
- package/types/shirkasoft-ui-components-notification.d.ts +63 -58
- package/types/shirkasoft-ui-components-price-input.d.ts +198 -85
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
- package/types/shirkasoft-ui-components-select.d.ts +301 -192
- package/types/shirkasoft-ui-components-sidebar.d.ts +198 -92
- package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
- package/types/shirkasoft-ui-components-table.d.ts +849 -649
- package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
- package/types/shirkasoft-ui-components-tag.d.ts +54 -23
- package/types/shirkasoft-ui-components-text-field.d.ts +231 -111
- package/types/shirkasoft-ui-components-theme-picker.d.ts +117 -0
- package/types/shirkasoft-ui-components-theme.d.ts +80 -0
- package/types/shirkasoft-ui-components-timeline.d.ts +326 -150
- package/types/shirkasoft-ui-components-toggle.d.ts +76 -45
- package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
- package/types/shirkasoft-ui-components-utils.d.ts +26 -17
- package/types/shirkasoft-ui-components-wizard.d.ts +236 -86
- package/types/shirkasoft-ui-components.d.ts +1 -2
- package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
|
@@ -1,160 +1,245 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, forwardRef, input, model, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
var KnobComponent = class KnobComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.value = model(0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
7
|
+
this.min = input(0, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
8
|
+
this.max = input(100, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
9
|
+
this.step = input(1, ...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
|
|
10
|
+
this.size = input(100, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
11
|
+
this.strokeWidth = input(14, ...ngDevMode ? [{ debugName: "strokeWidth" }] : /* istanbul ignore next */ []);
|
|
12
|
+
this.valueColor = input("var(--shk-primary-600)", ...ngDevMode ? [{ debugName: "valueColor" }] : /* istanbul ignore next */ []);
|
|
13
|
+
this.rangeColor = input("var(--shk-surface-200)", ...ngDevMode ? [{ debugName: "rangeColor" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this.showValue = input(true, ...ngDevMode ? [{ debugName: "showValue" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.readonly = input(false, ...ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
18
|
+
this.change = output();
|
|
19
|
+
this.end = output();
|
|
20
|
+
this.touch = output();
|
|
21
|
+
this.knobSvg = viewChild("knobSvg", ...ngDevMode ? [{ debugName: "knobSvg" }] : /* istanbul ignore next */ []);
|
|
22
|
+
this.onChange = () => {};
|
|
23
|
+
this.onTouched = () => {};
|
|
24
|
+
this.dragging = false;
|
|
25
|
+
this.formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
26
|
+
this.effectiveDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
|
|
27
|
+
this.effectiveMin = computed(() => this.min() ?? 0, ...ngDevMode ? [{ debugName: "effectiveMin" }] : /* istanbul ignore next */ []);
|
|
28
|
+
this.effectiveMax = computed(() => this.max() ?? 100, ...ngDevMode ? [{ debugName: "effectiveMax" }] : /* istanbul ignore next */ []);
|
|
29
|
+
this.r = computed(() => (this.size() - this.strokeWidth()) / 2, ...ngDevMode ? [{ debugName: "r" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.center = computed(() => this.size() / 2, ...ngDevMode ? [{ debugName: "center" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.fraction = computed(() => {
|
|
32
|
+
const range = this.effectiveMax() - this.effectiveMin();
|
|
33
|
+
if (range <= 0) return 0;
|
|
34
|
+
return Math.max(0, Math.min(1, (this.value() - this.effectiveMin()) / range));
|
|
35
|
+
}, ...ngDevMode ? [{ debugName: "fraction" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.rangeArc = computed(() => this.getArcPath(135, 405), ...ngDevMode ? [{ debugName: "rangeArc" }] : /* istanbul ignore next */ []);
|
|
37
|
+
this.valueArc = computed(() => this.getArcPath(135, 135 + 270 * this.fraction()), ...ngDevMode ? [{ debugName: "valueArc" }] : /* istanbul ignore next */ []);
|
|
38
|
+
}
|
|
39
|
+
writeValue(value) {
|
|
40
|
+
const numeric = value === null || value === void 0 || value === "" ? NaN : Number(value);
|
|
41
|
+
this.value.set(this.clamp(Number.isFinite(numeric) ? numeric : this.effectiveMin()));
|
|
42
|
+
}
|
|
43
|
+
registerOnChange(fn) {
|
|
44
|
+
this.onChange = fn;
|
|
45
|
+
}
|
|
46
|
+
registerOnTouched(fn) {
|
|
47
|
+
this.onTouched = fn;
|
|
48
|
+
}
|
|
49
|
+
onBlur() {
|
|
50
|
+
this.onTouched();
|
|
51
|
+
this.touch.emit();
|
|
52
|
+
}
|
|
53
|
+
setDisabledState(isDisabled) {
|
|
54
|
+
this.formDisabled.set(isDisabled);
|
|
55
|
+
}
|
|
56
|
+
onPointerDown(event) {
|
|
57
|
+
if (this.effectiveDisabled() || this.readonly()) return;
|
|
58
|
+
this.dragging = true;
|
|
59
|
+
this.knobSvg()?.nativeElement.setPointerCapture(event.pointerId);
|
|
60
|
+
this.applyEvent(event);
|
|
61
|
+
}
|
|
62
|
+
onPointerMove(event) {
|
|
63
|
+
if (!this.dragging) return;
|
|
64
|
+
this.applyEvent(event);
|
|
65
|
+
}
|
|
66
|
+
onPointerUp(event) {
|
|
67
|
+
if (!this.dragging) return;
|
|
68
|
+
this.dragging = false;
|
|
69
|
+
try {
|
|
70
|
+
this.knobSvg()?.nativeElement.releasePointerCapture(event.pointerId);
|
|
71
|
+
} catch {}
|
|
72
|
+
this.change.emit(this.value());
|
|
73
|
+
this.end.emit(this.value());
|
|
74
|
+
}
|
|
75
|
+
updateByKey(step) {
|
|
76
|
+
if (this.effectiveDisabled() || this.readonly()) return;
|
|
77
|
+
this.setValue(this.value() + step);
|
|
78
|
+
this.onTouched();
|
|
79
|
+
}
|
|
80
|
+
applyEvent(event) {
|
|
81
|
+
const svg = this.knobSvg()?.nativeElement;
|
|
82
|
+
if (!svg) return;
|
|
83
|
+
const rect = svg.getBoundingClientRect();
|
|
84
|
+
const cx = rect.left + rect.width / 2;
|
|
85
|
+
const cy = rect.top + rect.height / 2;
|
|
86
|
+
let t = (Math.atan2(event.clientY - cy, event.clientX - cx) * 180 / Math.PI + 360) % 360 - 135;
|
|
87
|
+
if (t < 0) t += 360;
|
|
88
|
+
let fraction;
|
|
89
|
+
if (t > 270) fraction = 360 - t < t - 270 ? 0 : 1;
|
|
90
|
+
else fraction = t / 270;
|
|
91
|
+
const raw = this.effectiveMin() + fraction * (this.effectiveMax() - this.effectiveMin());
|
|
92
|
+
this.setValue(raw);
|
|
93
|
+
this.onTouched();
|
|
94
|
+
}
|
|
95
|
+
setValue(raw) {
|
|
96
|
+
const rounded = Math.round(raw / this.step()) * this.step();
|
|
97
|
+
const clamped = this.clamp(rounded);
|
|
98
|
+
this.value.set(clamped);
|
|
99
|
+
this.onChange(clamped);
|
|
100
|
+
}
|
|
101
|
+
clamp(value) {
|
|
102
|
+
return Math.max(this.effectiveMin(), Math.min(this.effectiveMax(), value));
|
|
103
|
+
}
|
|
104
|
+
getArcPath(startDeg, endDeg) {
|
|
105
|
+
const cx = this.center();
|
|
106
|
+
const cy = this.center();
|
|
107
|
+
const r = this.r();
|
|
108
|
+
const start = this.anglePoint(cx, cy, r, startDeg);
|
|
109
|
+
const end = this.anglePoint(cx, cy, r, endDeg);
|
|
110
|
+
const largeArc = endDeg - startDeg > 180 ? "1" : "0";
|
|
111
|
+
return `M ${start.x.toFixed(2)} ${start.y.toFixed(2)} A ${r.toFixed(2)} ${r.toFixed(2)} 0 ${largeArc} 1 ${end.x.toFixed(2)} ${end.y.toFixed(2)}`;
|
|
112
|
+
}
|
|
113
|
+
anglePoint(cx, cy, r, angleDeg) {
|
|
114
|
+
const rad = Math.PI * angleDeg / 180;
|
|
115
|
+
return {
|
|
116
|
+
x: cx + r * Math.cos(rad),
|
|
117
|
+
y: cy + r * Math.sin(rad)
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
static {
|
|
121
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
122
|
+
minVersion: "12.0.0",
|
|
123
|
+
version: "22.3.2",
|
|
124
|
+
ngImport: i0,
|
|
125
|
+
type: KnobComponent,
|
|
126
|
+
deps: [],
|
|
127
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
static {
|
|
131
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
132
|
+
minVersion: "17.0.0",
|
|
133
|
+
version: "22.3.2",
|
|
134
|
+
type: KnobComponent,
|
|
135
|
+
isStandalone: true,
|
|
136
|
+
selector: "shk-knob",
|
|
137
|
+
inputs: {
|
|
138
|
+
value: {
|
|
139
|
+
classPropertyName: "value",
|
|
140
|
+
publicName: "value",
|
|
141
|
+
isSignal: true,
|
|
142
|
+
isRequired: false,
|
|
143
|
+
transformFunction: null
|
|
144
|
+
},
|
|
145
|
+
min: {
|
|
146
|
+
classPropertyName: "min",
|
|
147
|
+
publicName: "min",
|
|
148
|
+
isSignal: true,
|
|
149
|
+
isRequired: false,
|
|
150
|
+
transformFunction: null
|
|
151
|
+
},
|
|
152
|
+
max: {
|
|
153
|
+
classPropertyName: "max",
|
|
154
|
+
publicName: "max",
|
|
155
|
+
isSignal: true,
|
|
156
|
+
isRequired: false,
|
|
157
|
+
transformFunction: null
|
|
158
|
+
},
|
|
159
|
+
step: {
|
|
160
|
+
classPropertyName: "step",
|
|
161
|
+
publicName: "step",
|
|
162
|
+
isSignal: true,
|
|
163
|
+
isRequired: false,
|
|
164
|
+
transformFunction: null
|
|
165
|
+
},
|
|
166
|
+
size: {
|
|
167
|
+
classPropertyName: "size",
|
|
168
|
+
publicName: "size",
|
|
169
|
+
isSignal: true,
|
|
170
|
+
isRequired: false,
|
|
171
|
+
transformFunction: null
|
|
172
|
+
},
|
|
173
|
+
strokeWidth: {
|
|
174
|
+
classPropertyName: "strokeWidth",
|
|
175
|
+
publicName: "strokeWidth",
|
|
176
|
+
isSignal: true,
|
|
177
|
+
isRequired: false,
|
|
178
|
+
transformFunction: null
|
|
179
|
+
},
|
|
180
|
+
valueColor: {
|
|
181
|
+
classPropertyName: "valueColor",
|
|
182
|
+
publicName: "valueColor",
|
|
183
|
+
isSignal: true,
|
|
184
|
+
isRequired: false,
|
|
185
|
+
transformFunction: null
|
|
186
|
+
},
|
|
187
|
+
rangeColor: {
|
|
188
|
+
classPropertyName: "rangeColor",
|
|
189
|
+
publicName: "rangeColor",
|
|
190
|
+
isSignal: true,
|
|
191
|
+
isRequired: false,
|
|
192
|
+
transformFunction: null
|
|
193
|
+
},
|
|
194
|
+
showValue: {
|
|
195
|
+
classPropertyName: "showValue",
|
|
196
|
+
publicName: "showValue",
|
|
197
|
+
isSignal: true,
|
|
198
|
+
isRequired: false,
|
|
199
|
+
transformFunction: null
|
|
200
|
+
},
|
|
201
|
+
disabled: {
|
|
202
|
+
classPropertyName: "disabled",
|
|
203
|
+
publicName: "disabled",
|
|
204
|
+
isSignal: true,
|
|
205
|
+
isRequired: false,
|
|
206
|
+
transformFunction: null
|
|
207
|
+
},
|
|
208
|
+
readonly: {
|
|
209
|
+
classPropertyName: "readonly",
|
|
210
|
+
publicName: "readonly",
|
|
211
|
+
isSignal: true,
|
|
212
|
+
isRequired: false,
|
|
213
|
+
transformFunction: null
|
|
214
|
+
},
|
|
215
|
+
ariaLabel: {
|
|
216
|
+
classPropertyName: "ariaLabel",
|
|
217
|
+
publicName: "ariaLabel",
|
|
218
|
+
isSignal: true,
|
|
219
|
+
isRequired: false,
|
|
220
|
+
transformFunction: null
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
outputs: {
|
|
224
|
+
value: "valueChange",
|
|
225
|
+
change: "change",
|
|
226
|
+
end: "end",
|
|
227
|
+
touch: "touch"
|
|
228
|
+
},
|
|
229
|
+
providers: [{
|
|
230
|
+
provide: NG_VALUE_ACCESSOR,
|
|
231
|
+
useExisting: forwardRef(() => KnobComponent),
|
|
232
|
+
multi: true
|
|
233
|
+
}],
|
|
234
|
+
viewQueries: [{
|
|
235
|
+
propertyName: "knobSvg",
|
|
236
|
+
first: true,
|
|
237
|
+
predicate: ["knobSvg"],
|
|
238
|
+
descendants: true,
|
|
239
|
+
isSignal: true
|
|
240
|
+
}],
|
|
241
|
+
ngImport: i0,
|
|
242
|
+
template: `
|
|
158
243
|
<div
|
|
159
244
|
class="shk-knob"
|
|
160
245
|
[class.shk-knob-disabled]="effectiveDisabled()"
|
|
@@ -169,11 +254,12 @@ class KnobComponent {
|
|
|
169
254
|
role="slider"
|
|
170
255
|
tabindex="0"
|
|
171
256
|
[attr.aria-label]="ariaLabel() || 'Valor'"
|
|
172
|
-
[attr.aria-valuemin]="
|
|
173
|
-
[attr.aria-valuemax]="
|
|
257
|
+
[attr.aria-valuemin]="effectiveMin()"
|
|
258
|
+
[attr.aria-valuemax]="effectiveMax()"
|
|
174
259
|
[attr.aria-valuenow]="value()"
|
|
175
260
|
[class.shk-knob-svg-focusable]="!effectiveDisabled()"
|
|
176
261
|
(pointerdown)="onPointerDown($event)"
|
|
262
|
+
(blur)="onBlur()"
|
|
177
263
|
(pointermove)="onPointerMove($event)"
|
|
178
264
|
(pointerup)="onPointerUp($event)"
|
|
179
265
|
(pointercancel)="onPointerUp($event)"
|
|
@@ -201,11 +287,24 @@ class KnobComponent {
|
|
|
201
287
|
<div class="shk-knob-label">{{ value() }}</div>
|
|
202
288
|
}
|
|
203
289
|
</div>
|
|
204
|
-
`,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
290
|
+
`,
|
|
291
|
+
isInline: true,
|
|
292
|
+
styles: [".shk-knob{position:relative;display:inline-block}.shk-knob-svg{display:block;touch-action:none}.shk-knob-svg-focusable{cursor:pointer;outline:none}.shk-knob-svg-focusable:focus-visible{border-radius:9999px;outline:2px solid var(--shk-primary-400);outline-offset:2px}.shk-knob-disabled{opacity:.55}.shk-knob-disabled .shk-knob-svg{cursor:not-allowed}.shk-knob-label{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:1.125rem;font-weight:600;color:var(--shk-surface-800);pointer-events:none;-webkit-user-select:none;user-select:none}\n"],
|
|
293
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
298
|
+
minVersion: "12.0.0",
|
|
299
|
+
version: "22.3.2",
|
|
300
|
+
ngImport: i0,
|
|
301
|
+
type: KnobComponent,
|
|
302
|
+
decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{
|
|
305
|
+
selector: "shk-knob",
|
|
306
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
307
|
+
template: `
|
|
209
308
|
<div
|
|
210
309
|
class="shk-knob"
|
|
211
310
|
[class.shk-knob-disabled]="effectiveDisabled()"
|
|
@@ -220,11 +319,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
220
319
|
role="slider"
|
|
221
320
|
tabindex="0"
|
|
222
321
|
[attr.aria-label]="ariaLabel() || 'Valor'"
|
|
223
|
-
[attr.aria-valuemin]="
|
|
224
|
-
[attr.aria-valuemax]="
|
|
322
|
+
[attr.aria-valuemin]="effectiveMin()"
|
|
323
|
+
[attr.aria-valuemax]="effectiveMax()"
|
|
225
324
|
[attr.aria-valuenow]="value()"
|
|
226
325
|
[class.shk-knob-svg-focusable]="!effectiveDisabled()"
|
|
227
326
|
(pointerdown)="onPointerDown($event)"
|
|
327
|
+
(blur)="onBlur()"
|
|
228
328
|
(pointermove)="onPointerMove($event)"
|
|
229
329
|
(pointerup)="onPointerUp($event)"
|
|
230
330
|
(pointercancel)="onPointerUp($event)"
|
|
@@ -252,18 +352,133 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
252
352
|
<div class="shk-knob-label">{{ value() }}</div>
|
|
253
353
|
}
|
|
254
354
|
</div>
|
|
255
|
-
`,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
355
|
+
`,
|
|
356
|
+
providers: [{
|
|
357
|
+
provide: NG_VALUE_ACCESSOR,
|
|
358
|
+
useExisting: forwardRef(() => KnobComponent),
|
|
359
|
+
multi: true
|
|
360
|
+
}],
|
|
361
|
+
styles: [".shk-knob{position:relative;display:inline-block}.shk-knob-svg{display:block;touch-action:none}.shk-knob-svg-focusable{cursor:pointer;outline:none}.shk-knob-svg-focusable:focus-visible{border-radius:9999px;outline:2px solid var(--shk-primary-400);outline-offset:2px}.shk-knob-disabled{opacity:.55}.shk-knob-disabled .shk-knob-svg{cursor:not-allowed}.shk-knob-label{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:1.125rem;font-weight:600;color:var(--shk-surface-800);pointer-events:none;-webkit-user-select:none;user-select:none}\n"]
|
|
362
|
+
}]
|
|
363
|
+
}],
|
|
364
|
+
propDecorators: {
|
|
365
|
+
value: [{
|
|
366
|
+
type: i0.Input,
|
|
367
|
+
args: [{
|
|
368
|
+
isSignal: true,
|
|
369
|
+
alias: "value",
|
|
370
|
+
required: false
|
|
371
|
+
}]
|
|
372
|
+
}, {
|
|
373
|
+
type: i0.Output,
|
|
374
|
+
args: ["valueChange"]
|
|
375
|
+
}],
|
|
376
|
+
min: [{
|
|
377
|
+
type: i0.Input,
|
|
378
|
+
args: [{
|
|
379
|
+
isSignal: true,
|
|
380
|
+
alias: "min",
|
|
381
|
+
required: false
|
|
382
|
+
}]
|
|
383
|
+
}],
|
|
384
|
+
max: [{
|
|
385
|
+
type: i0.Input,
|
|
386
|
+
args: [{
|
|
387
|
+
isSignal: true,
|
|
388
|
+
alias: "max",
|
|
389
|
+
required: false
|
|
390
|
+
}]
|
|
391
|
+
}],
|
|
392
|
+
step: [{
|
|
393
|
+
type: i0.Input,
|
|
394
|
+
args: [{
|
|
395
|
+
isSignal: true,
|
|
396
|
+
alias: "step",
|
|
397
|
+
required: false
|
|
398
|
+
}]
|
|
399
|
+
}],
|
|
400
|
+
size: [{
|
|
401
|
+
type: i0.Input,
|
|
402
|
+
args: [{
|
|
403
|
+
isSignal: true,
|
|
404
|
+
alias: "size",
|
|
405
|
+
required: false
|
|
406
|
+
}]
|
|
407
|
+
}],
|
|
408
|
+
strokeWidth: [{
|
|
409
|
+
type: i0.Input,
|
|
410
|
+
args: [{
|
|
411
|
+
isSignal: true,
|
|
412
|
+
alias: "strokeWidth",
|
|
413
|
+
required: false
|
|
414
|
+
}]
|
|
415
|
+
}],
|
|
416
|
+
valueColor: [{
|
|
417
|
+
type: i0.Input,
|
|
418
|
+
args: [{
|
|
419
|
+
isSignal: true,
|
|
420
|
+
alias: "valueColor",
|
|
421
|
+
required: false
|
|
422
|
+
}]
|
|
423
|
+
}],
|
|
424
|
+
rangeColor: [{
|
|
425
|
+
type: i0.Input,
|
|
426
|
+
args: [{
|
|
427
|
+
isSignal: true,
|
|
428
|
+
alias: "rangeColor",
|
|
429
|
+
required: false
|
|
430
|
+
}]
|
|
431
|
+
}],
|
|
432
|
+
showValue: [{
|
|
433
|
+
type: i0.Input,
|
|
434
|
+
args: [{
|
|
435
|
+
isSignal: true,
|
|
436
|
+
alias: "showValue",
|
|
437
|
+
required: false
|
|
438
|
+
}]
|
|
439
|
+
}],
|
|
440
|
+
disabled: [{
|
|
441
|
+
type: i0.Input,
|
|
442
|
+
args: [{
|
|
443
|
+
isSignal: true,
|
|
444
|
+
alias: "disabled",
|
|
445
|
+
required: false
|
|
446
|
+
}]
|
|
447
|
+
}],
|
|
448
|
+
readonly: [{
|
|
449
|
+
type: i0.Input,
|
|
450
|
+
args: [{
|
|
451
|
+
isSignal: true,
|
|
452
|
+
alias: "readonly",
|
|
453
|
+
required: false
|
|
454
|
+
}]
|
|
455
|
+
}],
|
|
456
|
+
ariaLabel: [{
|
|
457
|
+
type: i0.Input,
|
|
458
|
+
args: [{
|
|
459
|
+
isSignal: true,
|
|
460
|
+
alias: "ariaLabel",
|
|
461
|
+
required: false
|
|
462
|
+
}]
|
|
463
|
+
}],
|
|
464
|
+
change: [{
|
|
465
|
+
type: i0.Output,
|
|
466
|
+
args: ["change"]
|
|
467
|
+
}],
|
|
468
|
+
end: [{
|
|
469
|
+
type: i0.Output,
|
|
470
|
+
args: ["end"]
|
|
471
|
+
}],
|
|
472
|
+
touch: [{
|
|
473
|
+
type: i0.Output,
|
|
474
|
+
args: ["touch"]
|
|
475
|
+
}],
|
|
476
|
+
knobSvg: [{
|
|
477
|
+
type: i0.ViewChild,
|
|
478
|
+
args: ["knobSvg", { isSignal: true }]
|
|
479
|
+
}]
|
|
480
|
+
}
|
|
481
|
+
});
|
|
268
482
|
export { KnobComponent };
|
|
269
|
-
|
|
483
|
+
|
|
484
|
+
//# sourceMappingURL=shirkasoft-ui-components-knob.mjs.map
|