@haiyue/ui 0.1.1 → 0.2.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/CHANGELOG.md +56 -0
- package/README.md +504 -1
- package/dist/adapters/web/controls.d.ts +19 -0
- package/dist/adapters/web/controls.js +284 -0
- package/dist/adapters/web/dom.d.ts +10 -0
- package/dist/adapters/web/dom.js +98 -0
- package/dist/adapters/web/index.d.ts +3 -0
- package/dist/adapters/web/index.js +3 -0
- package/dist/adapters/web/renderer.d.ts +18 -0
- package/dist/adapters/web/renderer.js +545 -0
- package/dist/adapters/web/styles.d.ts +3 -0
- package/dist/adapters/web/styles.js +62 -0
- package/dist/adapters/web/types.d.ts +46 -0
- package/dist/adapters/web/types.js +2 -0
- package/dist/affix.d.ts +35 -0
- package/dist/affix.js +137 -0
- package/dist/badge.d.ts +45 -0
- package/dist/badge.js +168 -0
- package/dist/border-beam.js +3 -1
- package/dist/breadcrumb.d.ts +37 -0
- package/dist/breadcrumb.js +210 -0
- package/dist/button-group.d.ts +12 -0
- package/dist/button-group.js +72 -0
- package/dist/button.d.ts +15 -1
- package/dist/button.js +101 -12
- package/dist/cascader.d.ts +65 -0
- package/dist/cascader.js +479 -0
- package/dist/collapse.d.ts +55 -0
- package/dist/collapse.js +261 -0
- package/dist/core/actions.d.ts +32 -0
- package/dist/core/actions.js +145 -0
- package/dist/core/data.d.ts +4 -0
- package/dist/core/data.js +27 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +6 -0
- package/dist/core/platform-view.d.ts +17 -0
- package/dist/core/platform-view.js +84 -0
- package/dist/core/selection.d.ts +14 -0
- package/dist/core/selection.js +93 -0
- package/dist/core/text.d.ts +31 -0
- package/dist/core/text.js +154 -0
- package/dist/core/types.d.ts +250 -0
- package/dist/core/types.js +2 -0
- package/dist/core/validation.d.ts +24 -0
- package/dist/core/validation.js +238 -0
- package/dist/date-picker.d.ts +60 -0
- package/dist/date-picker.js +355 -0
- package/dist/dialog.d.ts +4 -0
- package/dist/dialog.js +23 -5
- package/dist/divider.d.ts +33 -0
- package/dist/divider.js +113 -0
- package/dist/draggable.d.ts +78 -0
- package/dist/draggable.js +255 -0
- package/dist/expandable.d.ts +32 -0
- package/dist/expandable.js +136 -0
- package/dist/index.d.ts +47 -1
- package/dist/index.js +69 -0
- package/dist/input.d.ts +30 -1
- package/dist/input.js +166 -54
- package/dist/portable/index.d.ts +4 -0
- package/dist/portable/index.js +3 -0
- package/dist/portable/page.d.ts +38 -0
- package/dist/portable/page.js +361 -0
- package/dist/portable/theme.d.ts +19 -0
- package/dist/portable/theme.js +40 -0
- package/dist/portable/tree.d.ts +10 -0
- package/dist/portable/tree.js +96 -0
- package/dist/range.d.ts +3 -0
- package/dist/range.js +16 -5
- package/dist/rate.d.ts +46 -0
- package/dist/rate.js +193 -0
- package/dist/resizable.d.ts +97 -0
- package/dist/resizable.js +426 -0
- package/dist/skeleton.d.ts +41 -0
- package/dist/skeleton.js +141 -0
- package/dist/steps.d.ts +45 -0
- package/dist/steps.js +203 -0
- package/dist/table.d.ts +106 -0
- package/dist/table.js +689 -0
- package/dist/tabs.d.ts +7 -0
- package/dist/tabs.js +90 -16
- package/dist/tag.d.ts +55 -0
- package/dist/tag.js +225 -0
- package/dist/time-picker.d.ts +62 -0
- package/dist/time-picker.js +298 -0
- package/dist/timeline.d.ts +48 -0
- package/dist/timeline.js +201 -0
- package/dist/toast.d.ts +55 -0
- package/dist/toast.js +224 -0
- package/dist/tour.d.ts +89 -0
- package/dist/tour.js +306 -0
- package/dist/virtual-keyboard.d.ts +95 -0
- package/dist/virtual-keyboard.js +432 -0
- package/dist/virtual-list.js +12 -10
- package/dist/virtual-mouse.d.ts +82 -0
- package/dist/virtual-mouse.js +358 -0
- package/dist/watermark.d.ts +44 -0
- package/dist/watermark.js +148 -0
- package/package.json +135 -7
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
const HANDLES = ['n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw'];
|
|
2
|
+
const DEFAULT_CANCEL = 'input, textarea, select, button, a, [contenteditable="true"], [data-no-move]';
|
|
3
|
+
function finiteNumber(value, fallback) {
|
|
4
|
+
if (value === null || value === undefined || value === '')
|
|
5
|
+
return fallback;
|
|
6
|
+
const number = Number(value);
|
|
7
|
+
return Number.isFinite(number) ? number : fallback;
|
|
8
|
+
}
|
|
9
|
+
function positiveNumber(value, fallback) {
|
|
10
|
+
return Math.max(0, finiteNumber(value, fallback));
|
|
11
|
+
}
|
|
12
|
+
function safeMatches(element, selector) {
|
|
13
|
+
try {
|
|
14
|
+
return element.matches(selector);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/** Eight-handle resize frame that can also move its slotted content. */
|
|
21
|
+
export class HYResizable extends HTMLElement {
|
|
22
|
+
_frame = document.createElement('div');
|
|
23
|
+
_content = document.createElement('div');
|
|
24
|
+
_handles = new Map();
|
|
25
|
+
_x = 0;
|
|
26
|
+
_y = 0;
|
|
27
|
+
_width = 200;
|
|
28
|
+
_height = 120;
|
|
29
|
+
_initialRect = null;
|
|
30
|
+
_boundsTarget = null;
|
|
31
|
+
_reflecting = false;
|
|
32
|
+
_pointerId = null;
|
|
33
|
+
_activeHandle = 'move';
|
|
34
|
+
_origin = { x: 0, y: 0, width: 200, height: 120 };
|
|
35
|
+
_pointerX = 0;
|
|
36
|
+
_pointerY = 0;
|
|
37
|
+
_dragAbort = null;
|
|
38
|
+
static get observedAttributes() {
|
|
39
|
+
return [
|
|
40
|
+
'x', 'y', 'width', 'height', 'min-width', 'min-height', 'max-width', 'max-height',
|
|
41
|
+
'grid', 'aspect-ratio', 'bounds', 'disabled', 'movable', 'keyboard', 'cancel', 'aria-label',
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
constructor() {
|
|
45
|
+
super();
|
|
46
|
+
const root = this.attachShadow({ mode: 'open' });
|
|
47
|
+
const style = document.createElement('style');
|
|
48
|
+
const slot = document.createElement('slot');
|
|
49
|
+
style.textContent = `
|
|
50
|
+
:host {
|
|
51
|
+
position: absolute;
|
|
52
|
+
display: block;
|
|
53
|
+
left: 0;
|
|
54
|
+
top: 0;
|
|
55
|
+
width: var(--_hy-resizable-width, 200px);
|
|
56
|
+
height: var(--_hy-resizable-height, 120px);
|
|
57
|
+
min-width: 0;
|
|
58
|
+
min-height: 0;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
translate: var(--_hy-resizable-x, 0px) var(--_hy-resizable-y, 0px);
|
|
61
|
+
}
|
|
62
|
+
.frame { position: relative; width: 100%; height: 100%; box-sizing: border-box; outline: none; }
|
|
63
|
+
.frame::after {
|
|
64
|
+
position: absolute;
|
|
65
|
+
z-index: 2;
|
|
66
|
+
inset: 0;
|
|
67
|
+
border: var(--hy-resizable-border-width, 1px) var(--hy-resizable-border-style, solid) var(--hy-resizable-border-color, var(--hy-accent-color, #79a8ff));
|
|
68
|
+
border-radius: var(--hy-resizable-radius, 5px);
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
content: '';
|
|
71
|
+
}
|
|
72
|
+
.frame:focus-visible { outline: 2px solid var(--hy-focus-border-color, #79a8ff); outline-offset: 3px; }
|
|
73
|
+
.content { width: 100%; height: 100%; overflow: var(--hy-resizable-content-overflow, hidden); border-radius: var(--hy-resizable-radius, 5px); }
|
|
74
|
+
:host(:not([disabled])) .content { cursor: var(--hy-resizable-move-cursor, move); }
|
|
75
|
+
:host([movable="false"]) .content, :host([disabled]) .content { cursor: default; }
|
|
76
|
+
.handle { position: absolute; z-index: 3; box-sizing: border-box; touch-action: none; outline: none; }
|
|
77
|
+
.handle:focus-visible { filter: drop-shadow(0 0 3px var(--hy-focus-border-color, #79a8ff)); }
|
|
78
|
+
.handle.n, .handle.s { left: var(--hy-resizable-corner-size, 10px); right: var(--hy-resizable-corner-size, 10px); height: var(--hy-resizable-edge-size, 8px); cursor: ns-resize; }
|
|
79
|
+
.handle.e, .handle.w { top: var(--hy-resizable-corner-size, 10px); bottom: var(--hy-resizable-corner-size, 10px); width: var(--hy-resizable-edge-size, 8px); cursor: ew-resize; }
|
|
80
|
+
.handle.n { top: calc(var(--hy-resizable-edge-size, 8px) / -2); }
|
|
81
|
+
.handle.s { bottom: calc(var(--hy-resizable-edge-size, 8px) / -2); }
|
|
82
|
+
.handle.e { right: calc(var(--hy-resizable-edge-size, 8px) / -2); }
|
|
83
|
+
.handle.w { left: calc(var(--hy-resizable-edge-size, 8px) / -2); }
|
|
84
|
+
.handle.ne, .handle.se, .handle.sw, .handle.nw {
|
|
85
|
+
width: var(--hy-resizable-corner-hit-size, 18px);
|
|
86
|
+
height: var(--hy-resizable-corner-hit-size, 18px);
|
|
87
|
+
}
|
|
88
|
+
.handle.ne, .handle.sw { cursor: nesw-resize; }
|
|
89
|
+
.handle.se, .handle.nw { cursor: nwse-resize; }
|
|
90
|
+
.handle.ne { top: -9px; right: -9px; }
|
|
91
|
+
.handle.se { right: -9px; bottom: -9px; }
|
|
92
|
+
.handle.sw { bottom: -9px; left: -9px; }
|
|
93
|
+
.handle.nw { top: -9px; left: -9px; }
|
|
94
|
+
.handle::after {
|
|
95
|
+
position: absolute;
|
|
96
|
+
width: var(--hy-resizable-corner-size, 10px);
|
|
97
|
+
height: var(--hy-resizable-corner-size, 10px);
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
border: 1px solid var(--hy-resizable-handle-border-color, #dbeeff);
|
|
100
|
+
border-radius: var(--hy-resizable-handle-radius, 2px);
|
|
101
|
+
background: var(--hy-resizable-handle-color, var(--hy-accent-color, #79a8ff));
|
|
102
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
|
|
103
|
+
content: '';
|
|
104
|
+
}
|
|
105
|
+
.handle.n::after, .handle.s::after { left: 50%; top: 50%; translate: -50% -50%; }
|
|
106
|
+
.handle.e::after, .handle.w::after { left: 50%; top: 50%; translate: -50% -50%; }
|
|
107
|
+
.handle.ne::after, .handle.se::after, .handle.sw::after, .handle.nw::after { inset: 50% auto auto 50%; translate: -50% -50%; }
|
|
108
|
+
:host([disabled]) .handle { display: none; }
|
|
109
|
+
:host([resizing]) { z-index: var(--hy-resizable-active-z-index, 20); user-select: none; }
|
|
110
|
+
::slotted(*) { box-sizing: border-box; }
|
|
111
|
+
`;
|
|
112
|
+
this._frame.className = 'frame';
|
|
113
|
+
this._frame.part.add('frame');
|
|
114
|
+
this._content.className = 'content';
|
|
115
|
+
this._content.part.add('content');
|
|
116
|
+
this._content.append(slot);
|
|
117
|
+
this._frame.append(this._content);
|
|
118
|
+
for (const handle of HANDLES) {
|
|
119
|
+
const element = document.createElement('span');
|
|
120
|
+
element.className = `handle ${handle}`;
|
|
121
|
+
element.dataset.resizeHandle = handle;
|
|
122
|
+
element.part.add('handle', `handle-${handle}`);
|
|
123
|
+
element.setAttribute('role', 'separator');
|
|
124
|
+
element.setAttribute('aria-label', `${handle.toUpperCase()} resize handle`);
|
|
125
|
+
this._handles.set(handle, element);
|
|
126
|
+
this._frame.append(element);
|
|
127
|
+
}
|
|
128
|
+
root.append(style, this._frame);
|
|
129
|
+
this._frame.addEventListener('pointerdown', event => this._startPointer(event));
|
|
130
|
+
this._frame.addEventListener('keydown', event => this._handleKeydown(event));
|
|
131
|
+
}
|
|
132
|
+
connectedCallback() {
|
|
133
|
+
this._readRectAttributes();
|
|
134
|
+
this._initialRect ??= this.rect;
|
|
135
|
+
this._sync();
|
|
136
|
+
this._syncAccessibility();
|
|
137
|
+
}
|
|
138
|
+
disconnectedCallback() { this._cancelDrag(true); }
|
|
139
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
140
|
+
if (oldValue === newValue)
|
|
141
|
+
return;
|
|
142
|
+
if (!this._reflecting && ['x', 'y', 'width', 'height'].includes(name)) {
|
|
143
|
+
this._readRectAttributes();
|
|
144
|
+
this._sync();
|
|
145
|
+
}
|
|
146
|
+
if (name === 'disabled' && this.disabled)
|
|
147
|
+
this._cancelDrag(true);
|
|
148
|
+
if (name === 'disabled' || name === 'keyboard' || name === 'aria-label')
|
|
149
|
+
this._syncAccessibility();
|
|
150
|
+
}
|
|
151
|
+
get x() { return this._x; }
|
|
152
|
+
set x(value) { this.setRect({ ...this.rect, x: finiteNumber(value, this._x) }); }
|
|
153
|
+
get y() { return this._y; }
|
|
154
|
+
set y(value) { this.setRect({ ...this.rect, y: finiteNumber(value, this._y) }); }
|
|
155
|
+
get width() { return this._width; }
|
|
156
|
+
set width(value) { this.setRect({ ...this.rect, width: positiveNumber(value, this._width) }); }
|
|
157
|
+
get height() { return this._height; }
|
|
158
|
+
set height(value) { this.setRect({ ...this.rect, height: positiveNumber(value, this._height) }); }
|
|
159
|
+
get rect() { return { x: this._x, y: this._y, width: this._width, height: this._height }; }
|
|
160
|
+
get minWidth() { return positiveNumber(this.getAttribute('min-width'), 32); }
|
|
161
|
+
set minWidth(value) { this.setAttribute('min-width', String(positiveNumber(value, 32))); }
|
|
162
|
+
get minHeight() { return positiveNumber(this.getAttribute('min-height'), 32); }
|
|
163
|
+
set minHeight(value) { this.setAttribute('min-height', String(positiveNumber(value, 32))); }
|
|
164
|
+
get maxWidth() { return positiveNumber(this.getAttribute('max-width'), Number.POSITIVE_INFINITY); }
|
|
165
|
+
set maxWidth(value) { this._setFiniteLimit('max-width', value); }
|
|
166
|
+
get maxHeight() { return positiveNumber(this.getAttribute('max-height'), Number.POSITIVE_INFINITY); }
|
|
167
|
+
set maxHeight(value) { this._setFiniteLimit('max-height', value); }
|
|
168
|
+
get grid() { return Math.max(1, positiveNumber(this.getAttribute('grid'), 1)); }
|
|
169
|
+
set grid(value) { this.setAttribute('grid', String(Math.max(1, positiveNumber(value, 1)))); }
|
|
170
|
+
get aspectRatio() { const value = positiveNumber(this.getAttribute('aspect-ratio'), 0); return value > 0 ? value : null; }
|
|
171
|
+
set aspectRatio(value) { if (value && value > 0)
|
|
172
|
+
this.setAttribute('aspect-ratio', String(value));
|
|
173
|
+
else
|
|
174
|
+
this.removeAttribute('aspect-ratio'); }
|
|
175
|
+
get bounds() { return this._boundsTarget ?? this.boundsMode; }
|
|
176
|
+
set bounds(value) {
|
|
177
|
+
if (value instanceof HTMLElement) {
|
|
178
|
+
this._boundsTarget = value;
|
|
179
|
+
this.setAttribute('bounds', 'parent');
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
this._boundsTarget = null;
|
|
183
|
+
this.setAttribute('bounds', value === 'parent' || value === 'viewport' ? value : 'none');
|
|
184
|
+
}
|
|
185
|
+
this.refresh();
|
|
186
|
+
}
|
|
187
|
+
get boundsMode() { const value = this.getAttribute('bounds'); return value === 'parent' || value === 'viewport' ? value : 'none'; }
|
|
188
|
+
get disabled() { return this.hasAttribute('disabled'); }
|
|
189
|
+
set disabled(value) { this.toggleAttribute('disabled', Boolean(value)); }
|
|
190
|
+
get movable() { return this.getAttribute('movable') !== 'false'; }
|
|
191
|
+
set movable(value) { this.setAttribute('movable', String(Boolean(value))); }
|
|
192
|
+
get keyboard() { return this.getAttribute('keyboard') !== 'false'; }
|
|
193
|
+
set keyboard(value) { this.setAttribute('keyboard', String(Boolean(value))); }
|
|
194
|
+
get cancel() { return this.getAttribute('cancel')?.trim() || DEFAULT_CANCEL; }
|
|
195
|
+
set cancel(value) { const normalized = String(value).trim(); if (normalized)
|
|
196
|
+
this.setAttribute('cancel', normalized);
|
|
197
|
+
else
|
|
198
|
+
this.removeAttribute('cancel'); }
|
|
199
|
+
get resizing() { return this._pointerId !== null; }
|
|
200
|
+
setRect(rect) { return this._applyRect(rect, 'move', 'api'); }
|
|
201
|
+
moveTo(x, y) { return this._applyRect({ ...this.rect, x, y }, 'move', 'api'); }
|
|
202
|
+
moveBy(deltaX, deltaY) { return this.moveTo(this._x + finiteNumber(deltaX, 0), this._y + finiteNumber(deltaY, 0)); }
|
|
203
|
+
resizeTo(width, height) { return this._applyRect({ ...this.rect, width, height }, 'se', 'api'); }
|
|
204
|
+
reset() { return this._applyRect(this._initialRect ?? { x: 0, y: 0, width: 200, height: 120 }, 'move', 'api'); }
|
|
205
|
+
refresh() { return this._applyRect(this.rect, 'move', 'api'); }
|
|
206
|
+
_startPointer(event) {
|
|
207
|
+
if (this.disabled || event.button !== 0 || this._pointerId !== null)
|
|
208
|
+
return;
|
|
209
|
+
const handle = this._resolveHandle(event);
|
|
210
|
+
if (handle === 'move' && (!this.movable || this._isCancelledTarget(event)))
|
|
211
|
+
return;
|
|
212
|
+
const start = new CustomEvent('resize-start', {
|
|
213
|
+
detail: { ...this.rect, handle, source: 'pointer' }, bubbles: true, composed: true, cancelable: true,
|
|
214
|
+
});
|
|
215
|
+
if (!this.dispatchEvent(start))
|
|
216
|
+
return;
|
|
217
|
+
event.preventDefault();
|
|
218
|
+
this._frame.focus({ preventScroll: true });
|
|
219
|
+
this._frame.setPointerCapture(event.pointerId);
|
|
220
|
+
this._pointerId = event.pointerId;
|
|
221
|
+
this._activeHandle = handle;
|
|
222
|
+
this._origin = this.rect;
|
|
223
|
+
this._pointerX = event.clientX;
|
|
224
|
+
this._pointerY = event.clientY;
|
|
225
|
+
this.toggleAttribute('resizing', true);
|
|
226
|
+
const abort = new AbortController();
|
|
227
|
+
this._dragAbort = abort;
|
|
228
|
+
this._frame.addEventListener('pointermove', move => this._handlePointerMove(move), { signal: abort.signal });
|
|
229
|
+
this._frame.addEventListener('pointerup', up => this._finishPointer(up.pointerId, false), { signal: abort.signal });
|
|
230
|
+
this._frame.addEventListener('pointercancel', cancel => this._finishPointer(cancel.pointerId, true), { signal: abort.signal });
|
|
231
|
+
this._frame.addEventListener('lostpointercapture', () => this._cancelDrag(true), { signal: abort.signal });
|
|
232
|
+
}
|
|
233
|
+
_handlePointerMove(event) {
|
|
234
|
+
if (event.pointerId !== this._pointerId)
|
|
235
|
+
return;
|
|
236
|
+
event.preventDefault();
|
|
237
|
+
const deltaX = event.clientX - this._pointerX;
|
|
238
|
+
const deltaY = event.clientY - this._pointerY;
|
|
239
|
+
this._applyRect(this._rectFromDelta(this._origin, this._activeHandle, deltaX, deltaY), this._activeHandle, 'pointer');
|
|
240
|
+
}
|
|
241
|
+
_finishPointer(pointerId, cancelled) {
|
|
242
|
+
if (pointerId !== this._pointerId)
|
|
243
|
+
return;
|
|
244
|
+
const handle = this._activeHandle;
|
|
245
|
+
this._dragAbort?.abort();
|
|
246
|
+
this._dragAbort = null;
|
|
247
|
+
this._pointerId = null;
|
|
248
|
+
this.toggleAttribute('resizing', false);
|
|
249
|
+
if (this._frame.hasPointerCapture(pointerId))
|
|
250
|
+
this._frame.releasePointerCapture(pointerId);
|
|
251
|
+
this.dispatchEvent(new CustomEvent('resize-end', {
|
|
252
|
+
detail: { ...this.rect, handle, source: 'pointer', cancelled }, bubbles: true, composed: true,
|
|
253
|
+
}));
|
|
254
|
+
}
|
|
255
|
+
_cancelDrag(cancelled) {
|
|
256
|
+
if (this._pointerId !== null)
|
|
257
|
+
this._finishPointer(this._pointerId, cancelled);
|
|
258
|
+
}
|
|
259
|
+
_handleKeydown(event) {
|
|
260
|
+
if (this.disabled || !this.keyboard)
|
|
261
|
+
return;
|
|
262
|
+
const handle = event.composedPath().find((node) => node instanceof HTMLElement && Boolean(node.dataset.resizeHandle))?.dataset.resizeHandle ?? 'move';
|
|
263
|
+
const step = this.grid * (event.shiftKey ? 10 : 1);
|
|
264
|
+
let deltaX = 0;
|
|
265
|
+
let deltaY = 0;
|
|
266
|
+
if (event.key === 'ArrowLeft')
|
|
267
|
+
deltaX = -step;
|
|
268
|
+
else if (event.key === 'ArrowRight')
|
|
269
|
+
deltaX = step;
|
|
270
|
+
else if (event.key === 'ArrowUp')
|
|
271
|
+
deltaY = -step;
|
|
272
|
+
else if (event.key === 'ArrowDown')
|
|
273
|
+
deltaY = step;
|
|
274
|
+
else if (event.key === 'Home' && handle === 'move') {
|
|
275
|
+
event.preventDefault();
|
|
276
|
+
this.reset();
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
else
|
|
280
|
+
return;
|
|
281
|
+
if (handle !== 'move') {
|
|
282
|
+
if (!handle.includes('e') && !handle.includes('w'))
|
|
283
|
+
deltaX = 0;
|
|
284
|
+
if (!handle.includes('n') && !handle.includes('s'))
|
|
285
|
+
deltaY = 0;
|
|
286
|
+
}
|
|
287
|
+
if (deltaX === 0 && deltaY === 0)
|
|
288
|
+
return;
|
|
289
|
+
event.preventDefault();
|
|
290
|
+
this._applyRect(this._rectFromDelta(this.rect, handle, deltaX, deltaY), handle, 'keyboard');
|
|
291
|
+
}
|
|
292
|
+
_rectFromDelta(origin, handle, deltaX, deltaY) {
|
|
293
|
+
if (handle === 'move')
|
|
294
|
+
return { ...origin, x: origin.x + deltaX, y: origin.y + deltaY };
|
|
295
|
+
let left = origin.x;
|
|
296
|
+
let top = origin.y;
|
|
297
|
+
let right = origin.x + origin.width;
|
|
298
|
+
let bottom = origin.y + origin.height;
|
|
299
|
+
if (handle.includes('w'))
|
|
300
|
+
left += deltaX;
|
|
301
|
+
if (handle.includes('e'))
|
|
302
|
+
right += deltaX;
|
|
303
|
+
if (handle.includes('n'))
|
|
304
|
+
top += deltaY;
|
|
305
|
+
if (handle.includes('s'))
|
|
306
|
+
bottom += deltaY;
|
|
307
|
+
return { x: left, y: top, width: right - left, height: bottom - top };
|
|
308
|
+
}
|
|
309
|
+
_applyRect(candidate, handle, source) {
|
|
310
|
+
const old = this.rect;
|
|
311
|
+
const next = this._normalizeRect(candidate, handle);
|
|
312
|
+
if (next.x === old.x && next.y === old.y && next.width === old.width && next.height === old.height)
|
|
313
|
+
return old;
|
|
314
|
+
this._x = next.x;
|
|
315
|
+
this._y = next.y;
|
|
316
|
+
this._width = next.width;
|
|
317
|
+
this._height = next.height;
|
|
318
|
+
this._sync();
|
|
319
|
+
this._reflectRect();
|
|
320
|
+
this.dispatchEvent(new CustomEvent('resize', {
|
|
321
|
+
detail: { ...next, handle, source }, bubbles: true, composed: true,
|
|
322
|
+
}));
|
|
323
|
+
return this.rect;
|
|
324
|
+
}
|
|
325
|
+
_normalizeRect(candidate, handle) {
|
|
326
|
+
const snap = (value) => Math.round(finiteNumber(value, 0) / this.grid) * this.grid;
|
|
327
|
+
const originRight = candidate.x + candidate.width;
|
|
328
|
+
const originBottom = candidate.y + candidate.height;
|
|
329
|
+
let x = handle === 'move' ? snap(candidate.x) : finiteNumber(candidate.x, this._x);
|
|
330
|
+
let y = handle === 'move' ? snap(candidate.y) : finiteNumber(candidate.y, this._y);
|
|
331
|
+
let width = Math.max(this.minWidth, Math.min(this.maxWidth, snap(candidate.width)));
|
|
332
|
+
let height = Math.max(this.minHeight, Math.min(this.maxHeight, snap(candidate.height)));
|
|
333
|
+
if (handle.includes('w'))
|
|
334
|
+
x = originRight - width;
|
|
335
|
+
if (handle.includes('n'))
|
|
336
|
+
y = originBottom - height;
|
|
337
|
+
const ratio = this.aspectRatio;
|
|
338
|
+
if (ratio && handle !== 'move') {
|
|
339
|
+
if (handle === 'n' || handle === 's')
|
|
340
|
+
width = Math.max(this.minWidth, Math.min(this.maxWidth, snap(height * ratio)));
|
|
341
|
+
else
|
|
342
|
+
height = Math.max(this.minHeight, Math.min(this.maxHeight, snap(width / ratio)));
|
|
343
|
+
if (handle.includes('w'))
|
|
344
|
+
x = originRight - width;
|
|
345
|
+
if (handle.includes('n'))
|
|
346
|
+
y = originBottom - height;
|
|
347
|
+
}
|
|
348
|
+
const bounds = this._relativeBounds();
|
|
349
|
+
if (bounds) {
|
|
350
|
+
width = Math.min(width, bounds.right - bounds.left);
|
|
351
|
+
height = Math.min(height, bounds.bottom - bounds.top);
|
|
352
|
+
x = Math.min(bounds.right - width, Math.max(bounds.left, x));
|
|
353
|
+
y = Math.min(bounds.bottom - height, Math.max(bounds.top, y));
|
|
354
|
+
}
|
|
355
|
+
return { x, y, width, height };
|
|
356
|
+
}
|
|
357
|
+
_relativeBounds() {
|
|
358
|
+
if (!this.isConnected)
|
|
359
|
+
return null;
|
|
360
|
+
const target = this._boundsTarget ?? (this.boundsMode === 'parent' ? this.parentElement : null);
|
|
361
|
+
const targetRect = target?.getBoundingClientRect();
|
|
362
|
+
const viewport = this.boundsMode === 'viewport' && !this._boundsTarget;
|
|
363
|
+
const bounds = target && targetRect
|
|
364
|
+
? { left: targetRect.left + target.clientLeft, top: targetRect.top + target.clientTop, right: targetRect.left + target.clientLeft + target.clientWidth, bottom: targetRect.top + target.clientTop + target.clientHeight }
|
|
365
|
+
: viewport ? { left: 0, top: 0, right: window.innerWidth, bottom: window.innerHeight } : null;
|
|
366
|
+
if (!bounds)
|
|
367
|
+
return null;
|
|
368
|
+
const rect = this.getBoundingClientRect();
|
|
369
|
+
const baseLeft = rect.left - this._x;
|
|
370
|
+
const baseTop = rect.top - this._y;
|
|
371
|
+
return { left: bounds.left - baseLeft, top: bounds.top - baseTop, right: bounds.right - baseLeft, bottom: bounds.bottom - baseTop };
|
|
372
|
+
}
|
|
373
|
+
_resolveHandle(event) {
|
|
374
|
+
const element = event.composedPath().find((node) => node instanceof HTMLElement && Boolean(node.dataset.resizeHandle));
|
|
375
|
+
return element?.dataset.resizeHandle ?? 'move';
|
|
376
|
+
}
|
|
377
|
+
_isCancelledTarget(event) {
|
|
378
|
+
return event.composedPath().some(node => node instanceof Element && node !== this._frame && node !== this && safeMatches(node, this.cancel));
|
|
379
|
+
}
|
|
380
|
+
_readRectAttributes() {
|
|
381
|
+
this._x = finiteNumber(this.getAttribute('x'), this._x);
|
|
382
|
+
this._y = finiteNumber(this.getAttribute('y'), this._y);
|
|
383
|
+
this._width = positiveNumber(this.getAttribute('width'), this._width);
|
|
384
|
+
this._height = positiveNumber(this.getAttribute('height'), this._height);
|
|
385
|
+
}
|
|
386
|
+
_sync() {
|
|
387
|
+
this.style.setProperty('--_hy-resizable-x', `${this._x}px`);
|
|
388
|
+
this.style.setProperty('--_hy-resizable-y', `${this._y}px`);
|
|
389
|
+
this.style.setProperty('--_hy-resizable-width', `${this._width}px`);
|
|
390
|
+
this.style.setProperty('--_hy-resizable-height', `${this._height}px`);
|
|
391
|
+
for (const [handle, element] of this._handles) {
|
|
392
|
+
const horizontal = handle.includes('e') || handle.includes('w');
|
|
393
|
+
element.setAttribute('aria-orientation', horizontal ? 'vertical' : 'horizontal');
|
|
394
|
+
element.setAttribute('aria-valuenow', String(horizontal ? Math.round(this._width) : Math.round(this._height)));
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
_reflectRect() {
|
|
398
|
+
this._reflecting = true;
|
|
399
|
+
for (const [name, value] of Object.entries(this.rect)) {
|
|
400
|
+
const normalized = String(Math.round(value * 1000) / 1000);
|
|
401
|
+
if (this.getAttribute(name) !== normalized)
|
|
402
|
+
this.setAttribute(name, normalized);
|
|
403
|
+
}
|
|
404
|
+
this._reflecting = false;
|
|
405
|
+
}
|
|
406
|
+
_syncAccessibility() {
|
|
407
|
+
this._frame.tabIndex = this.keyboard && !this.disabled ? 0 : -1;
|
|
408
|
+
this._frame.setAttribute('role', 'group');
|
|
409
|
+
this._frame.setAttribute('aria-label', this.getAttribute('aria-label') || 'Resizable container');
|
|
410
|
+
this._frame.setAttribute('aria-disabled', String(this.disabled));
|
|
411
|
+
for (const element of this._handles.values())
|
|
412
|
+
element.tabIndex = this.keyboard && !this.disabled ? 0 : -1;
|
|
413
|
+
}
|
|
414
|
+
_setFiniteLimit(name, value) {
|
|
415
|
+
const normalized = Number(value);
|
|
416
|
+
if (Number.isFinite(normalized) && normalized >= 0)
|
|
417
|
+
this.setAttribute(name, String(normalized));
|
|
418
|
+
else
|
|
419
|
+
this.removeAttribute(name);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
export function defineResizableComponents() {
|
|
423
|
+
if (!customElements.get('hy-resizable'))
|
|
424
|
+
customElements.define('hy-resizable', HYResizable);
|
|
425
|
+
}
|
|
426
|
+
//# sourceMappingURL=resizable.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type HYSkeletonAvatarShape = 'circle' | 'square';
|
|
2
|
+
export type HYSkeletonSize = 'small' | 'medium' | 'large';
|
|
3
|
+
/** Theme-aware loading placeholder that swaps to slotted content when ready. */
|
|
4
|
+
export declare class HYSkeleton extends HTMLElement {
|
|
5
|
+
private readonly _placeholder;
|
|
6
|
+
private readonly _content;
|
|
7
|
+
private readonly _slot;
|
|
8
|
+
private _paragraphWidths;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
constructor();
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
attributeChangedCallback(): void;
|
|
13
|
+
/** Defaults to true. Set to false to reveal the default slot. */
|
|
14
|
+
get loading(): boolean;
|
|
15
|
+
set loading(value: boolean);
|
|
16
|
+
get active(): boolean;
|
|
17
|
+
set active(value: boolean);
|
|
18
|
+
get avatar(): boolean;
|
|
19
|
+
set avatar(value: boolean);
|
|
20
|
+
get avatarShape(): HYSkeletonAvatarShape;
|
|
21
|
+
set avatarShape(value: HYSkeletonAvatarShape);
|
|
22
|
+
get avatarSize(): number;
|
|
23
|
+
set avatarSize(value: number);
|
|
24
|
+
get showTitle(): boolean;
|
|
25
|
+
set showTitle(value: boolean);
|
|
26
|
+
get titleWidth(): string;
|
|
27
|
+
set titleWidth(value: string);
|
|
28
|
+
get showParagraph(): boolean;
|
|
29
|
+
set showParagraph(value: boolean);
|
|
30
|
+
get rows(): number;
|
|
31
|
+
set rows(value: number);
|
|
32
|
+
get round(): boolean;
|
|
33
|
+
set round(value: boolean);
|
|
34
|
+
get size(): HYSkeletonSize;
|
|
35
|
+
set size(value: HYSkeletonSize);
|
|
36
|
+
get paragraphWidths(): readonly string[];
|
|
37
|
+
set paragraphWidths(value: readonly string[]);
|
|
38
|
+
private _render;
|
|
39
|
+
private _rowWidth;
|
|
40
|
+
}
|
|
41
|
+
export declare function defineSkeletonComponents(): void;
|
package/dist/skeleton.js
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
function clampInteger(value, fallback, min, max) {
|
|
2
|
+
const number = Math.floor(Number(value));
|
|
3
|
+
return Number.isFinite(number) ? Math.min(max, Math.max(min, number)) : fallback;
|
|
4
|
+
}
|
|
5
|
+
function normalizeWidth(value, fallback) {
|
|
6
|
+
const text = String(value ?? '').trim();
|
|
7
|
+
return /^\d+(?:\.\d+)?(?:%|px|rem|em|ch|vw)$/u.test(text) ? text : fallback;
|
|
8
|
+
}
|
|
9
|
+
/** Theme-aware loading placeholder that swaps to slotted content when ready. */
|
|
10
|
+
export class HYSkeleton extends HTMLElement {
|
|
11
|
+
_placeholder = document.createElement('div');
|
|
12
|
+
_content = document.createElement('div');
|
|
13
|
+
_slot = document.createElement('slot');
|
|
14
|
+
_paragraphWidths = [];
|
|
15
|
+
static get observedAttributes() {
|
|
16
|
+
return ['loading', 'active', 'avatar', 'avatar-shape', 'avatar-size', 'show-title', 'title-width', 'show-paragraph', 'rows', 'round', 'size', 'aria-label'];
|
|
17
|
+
}
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
const root = this.attachShadow({ mode: 'open' });
|
|
21
|
+
const style = document.createElement('style');
|
|
22
|
+
style.textContent = `
|
|
23
|
+
:host { display: block; min-width: 0; font: 12px/1.4 system-ui, sans-serif; }
|
|
24
|
+
.placeholder { display: flex; min-width: 0; align-items: flex-start; gap: var(--hy-skeleton-gap, 14px); }
|
|
25
|
+
.placeholder[hidden], .content[hidden] { display: none; }
|
|
26
|
+
.body { flex: 1; min-width: 0; padding-top: var(--hy-skeleton-body-offset, 2px); }
|
|
27
|
+
.block { position: relative; overflow: hidden; background: var(--hy-skeleton-color, color-mix(in srgb, var(--hy-text-color, #eef3ff) 11%, transparent)); }
|
|
28
|
+
.avatar { flex: 0 0 auto; width: var(--_avatar-size); height: var(--_avatar-size); border-radius: 50%; }
|
|
29
|
+
:host([avatar-shape="square"]) .avatar { border-radius: var(--hy-skeleton-avatar-radius, 7px); }
|
|
30
|
+
.title { height: var(--hy-skeleton-title-height, 15px); margin-bottom: var(--hy-skeleton-title-gap, 17px); border-radius: var(--hy-skeleton-radius, 5px); }
|
|
31
|
+
.paragraph { display: grid; gap: var(--hy-skeleton-row-gap, 11px); }
|
|
32
|
+
.row { height: var(--hy-skeleton-row-height, 11px); border-radius: var(--hy-skeleton-radius, 5px); }
|
|
33
|
+
:host([round]) .title, :host([round]) .row { border-radius: 999px; }
|
|
34
|
+
:host([size="small"]) { --hy-skeleton-title-height: 12px; --hy-skeleton-row-height: 8px; --hy-skeleton-row-gap: 9px; --hy-skeleton-gap: 11px; }
|
|
35
|
+
:host([size="large"]) { --hy-skeleton-title-height: 18px; --hy-skeleton-row-height: 14px; --hy-skeleton-row-gap: 13px; --hy-skeleton-gap: 17px; }
|
|
36
|
+
:host([active]) .block::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, var(--hy-skeleton-highlight-color, color-mix(in srgb, var(--hy-text-color, #eef3ff) 12%, transparent)) 45%, transparent 85%); content: ''; transform: translateX(-100%); animation: hy-skeleton-wave var(--hy-skeleton-duration, 1.5s) ease-in-out infinite; }
|
|
37
|
+
@keyframes hy-skeleton-wave { to { transform: translateX(100%); } }
|
|
38
|
+
@media (prefers-reduced-motion: reduce) { :host([active]) .block::after { animation: none; } }
|
|
39
|
+
`;
|
|
40
|
+
this._placeholder.className = 'placeholder';
|
|
41
|
+
this._placeholder.part.add('placeholder');
|
|
42
|
+
this._placeholder.setAttribute('aria-hidden', 'true');
|
|
43
|
+
this._content.className = 'content';
|
|
44
|
+
this._content.part.add('content');
|
|
45
|
+
this._content.append(this._slot);
|
|
46
|
+
root.append(style, this._placeholder, this._content);
|
|
47
|
+
}
|
|
48
|
+
connectedCallback() { this._render(); }
|
|
49
|
+
attributeChangedCallback() { this._render(); }
|
|
50
|
+
/** Defaults to true. Set to false to reveal the default slot. */
|
|
51
|
+
get loading() { return this.getAttribute('loading') !== 'false'; }
|
|
52
|
+
set loading(value) { this.setAttribute('loading', String(Boolean(value))); }
|
|
53
|
+
get active() { return this.hasAttribute('active'); }
|
|
54
|
+
set active(value) { this.toggleAttribute('active', Boolean(value)); }
|
|
55
|
+
get avatar() { return this.hasAttribute('avatar'); }
|
|
56
|
+
set avatar(value) { this.toggleAttribute('avatar', Boolean(value)); }
|
|
57
|
+
get avatarShape() { return this.getAttribute('avatar-shape') === 'square' ? 'square' : 'circle'; }
|
|
58
|
+
set avatarShape(value) { this.setAttribute('avatar-shape', value === 'square' ? 'square' : 'circle'); }
|
|
59
|
+
get avatarSize() { return clampInteger(this.getAttribute('avatar-size'), 44, 16, 160); }
|
|
60
|
+
set avatarSize(value) { this.setAttribute('avatar-size', String(clampInteger(value, 44, 16, 160))); }
|
|
61
|
+
get showTitle() { return this.getAttribute('show-title') !== 'false'; }
|
|
62
|
+
set showTitle(value) { this.setAttribute('show-title', String(Boolean(value))); }
|
|
63
|
+
get titleWidth() { return normalizeWidth(this.getAttribute('title-width'), '38%'); }
|
|
64
|
+
set titleWidth(value) { this.setAttribute('title-width', normalizeWidth(value, '38%')); }
|
|
65
|
+
get showParagraph() { return this.getAttribute('show-paragraph') !== 'false'; }
|
|
66
|
+
set showParagraph(value) { this.setAttribute('show-paragraph', String(Boolean(value))); }
|
|
67
|
+
get rows() { return clampInteger(this.getAttribute('rows'), 3, 0, 20); }
|
|
68
|
+
set rows(value) { this.setAttribute('rows', String(clampInteger(value, 3, 0, 20))); }
|
|
69
|
+
get round() { return this.hasAttribute('round'); }
|
|
70
|
+
set round(value) { this.toggleAttribute('round', Boolean(value)); }
|
|
71
|
+
get size() {
|
|
72
|
+
const value = this.getAttribute('size');
|
|
73
|
+
return value === 'small' || value === 'large' ? value : 'medium';
|
|
74
|
+
}
|
|
75
|
+
set size(value) { this.setAttribute('size', value === 'small' || value === 'large' ? value : 'medium'); }
|
|
76
|
+
get paragraphWidths() { return this._paragraphWidths; }
|
|
77
|
+
set paragraphWidths(value) {
|
|
78
|
+
this._paragraphWidths = Array.isArray(value) ? value.map(width => normalizeWidth(width, '100%')) : [];
|
|
79
|
+
this._render();
|
|
80
|
+
}
|
|
81
|
+
_render() {
|
|
82
|
+
const loading = this.loading;
|
|
83
|
+
this.setAttribute('aria-busy', String(loading));
|
|
84
|
+
this.setAttribute('role', 'status');
|
|
85
|
+
if (!this.hasAttribute('aria-live'))
|
|
86
|
+
this.setAttribute('aria-live', 'polite');
|
|
87
|
+
if (!this.hasAttribute('aria-label'))
|
|
88
|
+
this.setAttribute('aria-label', 'Loading');
|
|
89
|
+
this._placeholder.hidden = !loading;
|
|
90
|
+
this._content.hidden = loading;
|
|
91
|
+
if (!loading) {
|
|
92
|
+
this._placeholder.replaceChildren();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const body = document.createElement('div');
|
|
96
|
+
body.className = 'body';
|
|
97
|
+
body.part.add('body');
|
|
98
|
+
if (this.showTitle) {
|
|
99
|
+
const title = document.createElement('div');
|
|
100
|
+
title.className = 'block title';
|
|
101
|
+
title.part.add('title');
|
|
102
|
+
title.style.width = this.titleWidth;
|
|
103
|
+
body.append(title);
|
|
104
|
+
}
|
|
105
|
+
if (this.showParagraph && this.rows > 0) {
|
|
106
|
+
const paragraph = document.createElement('div');
|
|
107
|
+
paragraph.className = 'paragraph';
|
|
108
|
+
paragraph.part.add('paragraph');
|
|
109
|
+
for (let index = 0; index < this.rows; index += 1) {
|
|
110
|
+
const row = document.createElement('div');
|
|
111
|
+
row.className = 'block row';
|
|
112
|
+
row.part.add('row');
|
|
113
|
+
row.style.width = this._rowWidth(index);
|
|
114
|
+
paragraph.append(row);
|
|
115
|
+
}
|
|
116
|
+
body.append(paragraph);
|
|
117
|
+
}
|
|
118
|
+
const children = [];
|
|
119
|
+
if (this.avatar) {
|
|
120
|
+
const avatar = document.createElement('div');
|
|
121
|
+
avatar.className = 'block avatar';
|
|
122
|
+
avatar.part.add('avatar');
|
|
123
|
+
avatar.style.setProperty('--_avatar-size', `${this.avatarSize}px`);
|
|
124
|
+
children.push(avatar);
|
|
125
|
+
}
|
|
126
|
+
if (body.childElementCount)
|
|
127
|
+
children.push(body);
|
|
128
|
+
this._placeholder.replaceChildren(...children);
|
|
129
|
+
}
|
|
130
|
+
_rowWidth(index) {
|
|
131
|
+
const configured = this._paragraphWidths[index];
|
|
132
|
+
if (configured)
|
|
133
|
+
return configured;
|
|
134
|
+
return index === this.rows - 1 && this.rows > 1 ? '68%' : '100%';
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
export function defineSkeletonComponents() {
|
|
138
|
+
if (!customElements.get('hy-skeleton'))
|
|
139
|
+
customElements.define('hy-skeleton', HYSkeleton);
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=skeleton.js.map
|
package/dist/steps.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type HYStepsDirection = 'horizontal' | 'vertical';
|
|
2
|
+
export type HYStepsSize = 'medium' | 'small';
|
|
3
|
+
export type HYStepStatus = 'wait' | 'process' | 'finish' | 'error';
|
|
4
|
+
export interface HYStepItem {
|
|
5
|
+
readonly key?: string | number;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly description?: string;
|
|
8
|
+
readonly subtitle?: string;
|
|
9
|
+
readonly status?: HYStepStatus;
|
|
10
|
+
readonly icon?: string;
|
|
11
|
+
readonly disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface HYStepsChangeDetail {
|
|
14
|
+
readonly current: number;
|
|
15
|
+
readonly previous: number;
|
|
16
|
+
readonly item: HYStepItem;
|
|
17
|
+
}
|
|
18
|
+
/** Responsive horizontal or vertical progress steps with optional navigation. */
|
|
19
|
+
export declare class HYSteps extends HTMLElement {
|
|
20
|
+
private readonly _list;
|
|
21
|
+
private _items;
|
|
22
|
+
private _itemsAssigned;
|
|
23
|
+
private _current;
|
|
24
|
+
static get observedAttributes(): string[];
|
|
25
|
+
constructor();
|
|
26
|
+
connectedCallback(): void;
|
|
27
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
28
|
+
get items(): readonly HYStepItem[];
|
|
29
|
+
set items(value: readonly HYStepItem[]);
|
|
30
|
+
get current(): number;
|
|
31
|
+
set current(value: number);
|
|
32
|
+
get direction(): HYStepsDirection;
|
|
33
|
+
set direction(value: HYStepsDirection);
|
|
34
|
+
get size(): HYStepsSize;
|
|
35
|
+
set size(value: HYStepsSize);
|
|
36
|
+
get clickable(): boolean;
|
|
37
|
+
set clickable(value: boolean);
|
|
38
|
+
private _readItemsAttribute;
|
|
39
|
+
private _resolvedCurrent;
|
|
40
|
+
private _status;
|
|
41
|
+
private _render;
|
|
42
|
+
private _createStep;
|
|
43
|
+
private _select;
|
|
44
|
+
}
|
|
45
|
+
export declare function defineStepsComponents(): void;
|