@vobs/ui 0.3.0 → 1.1.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/LICENSE +1 -1
- package/README.md +60 -0
- package/package.json +52 -110
- package/src/activity-rail.ts +125 -0
- package/src/alert.ts +65 -0
- package/src/assets/icons/alert-circle.svg +1 -0
- package/src/assets/icons/alert-triangle.svg +1 -0
- package/src/assets/icons/alert.d27e24.svg +1 -0
- package/src/assets/icons/alert.svg +1 -0
- package/src/assets/icons/apple.svg +1 -0
- package/src/assets/icons/arrow-down.svg +1 -0
- package/src/assets/icons/arrow-expand.svg +1 -0
- package/src/assets/icons/arrow-left.svg +1 -0
- package/src/assets/icons/arrow-minimize.svg +1 -0
- package/src/assets/icons/arrow-right-to-line.svg +1 -0
- package/src/assets/icons/arrow-right.svg +1 -0
- package/src/assets/icons/arrow-up-right.svg +1 -0
- package/src/assets/icons/arrow-up.0c0c0d.svg +1 -0
- package/src/assets/icons/arrow-up.svg +1 -0
- package/src/assets/icons/at.svg +1 -0
- package/src/assets/icons/atom.0c0c0d.svg +1 -0
- package/src/assets/icons/atom.svg +1 -0
- package/src/assets/icons/bar.svg +1 -0
- package/src/assets/icons/bell.svg +1 -0
- package/src/assets/icons/box.svg +1 -0
- package/src/assets/icons/bug.svg +1 -0
- package/src/assets/icons/calendar.svg +1 -0
- package/src/assets/icons/check-circle.33c192.svg +1 -0
- package/src/assets/icons/check-circle.svg +1 -0
- package/src/assets/icons/check.d1d3db.svg +1 -0
- package/src/assets/icons/check.svg +1 -0
- package/src/assets/icons/chevron-down.svg +1 -0
- package/src/assets/icons/chevron-right.svg +1 -0
- package/src/assets/icons/chevron-up.svg +1 -0
- package/src/assets/icons/circle.svg +1 -0
- package/src/assets/icons/clock.svg +1 -0
- package/src/assets/icons/cmd.svg +1 -0
- package/src/assets/icons/code.svg +1 -0
- package/src/assets/icons/columns.svg +1 -0
- package/src/assets/icons/copy.svg +1 -0
- package/src/assets/icons/cpu.svg +1 -0
- package/src/assets/icons/dashboard.0c0c0d.svg +1 -0
- package/src/assets/icons/dashboard.svg +1 -0
- package/src/assets/icons/dollar.svg +1 -0
- package/src/assets/icons/download.svg +1 -0
- package/src/assets/icons/edit.svg +1 -0
- package/src/assets/icons/extensions.svg +1 -0
- package/src/assets/icons/external.svg +1 -0
- package/src/assets/icons/eye.svg +1 -0
- package/src/assets/icons/file-text.svg +1 -0
- package/src/assets/icons/file.svg +1 -0
- package/src/assets/icons/files.svg +1 -0
- package/src/assets/icons/filter.svg +1 -0
- package/src/assets/icons/folder.svg +1 -0
- package/src/assets/icons/gear.svg +1 -0
- package/src/assets/icons/git.svg +1 -0
- package/src/assets/icons/github.svg +1 -0
- package/src/assets/icons/globe.svg +1 -0
- package/src/assets/icons/grid-2x2.svg +1 -0
- package/src/assets/icons/hash.svg +1 -0
- package/src/assets/icons/heart.svg +1 -0
- package/src/assets/icons/help.svg +1 -0
- package/src/assets/icons/home.svg +1 -0
- package/src/assets/icons/image.svg +1 -0
- package/src/assets/icons/info-circle.svg +1 -0
- package/src/assets/icons/info-square.svg +1 -0
- package/src/assets/icons/info.387bff.svg +1 -0
- package/src/assets/icons/info.svg +1 -0
- package/src/assets/icons/key.svg +1 -0
- package/src/assets/icons/layers.svg +1 -0
- package/src/assets/icons/layout.svg +1 -0
- package/src/assets/icons/link.svg +1 -0
- package/src/assets/icons/list.svg +1 -0
- package/src/assets/icons/lock.svg +1 -0
- package/src/assets/icons/log-out.svg +1 -0
- package/src/assets/icons/logo.svg +1 -0
- package/src/assets/icons/mail.svg +1 -0
- package/src/assets/icons/menu.svg +1 -0
- package/src/assets/icons/message-circle.svg +1 -0
- package/src/assets/icons/message-plus.svg +1 -0
- package/src/assets/icons/message-square.svg +1 -0
- package/src/assets/icons/mic.svg +1 -0
- package/src/assets/icons/minus.svg +1 -0
- package/src/assets/icons/moon.svg +1 -0
- package/src/assets/icons/more-h.svg +1 -0
- package/src/assets/icons/mouse.svg +1 -0
- package/src/assets/icons/palette.svg +1 -0
- package/src/assets/icons/panel-bottom.svg +1 -0
- package/src/assets/icons/pause.svg +1 -0
- package/src/assets/icons/play.svg +1 -0
- package/src/assets/icons/plug.svg +1 -0
- package/src/assets/icons/plus.0c0c0d.svg +1 -0
- package/src/assets/icons/plus.svg +1 -0
- package/src/assets/icons/refresh.svg +1 -0
- package/src/assets/icons/ruler.svg +1 -0
- package/src/assets/icons/scroll-text.svg +1 -0
- package/src/assets/icons/search-menu.svg +1 -0
- package/src/assets/icons/search.svg +1 -0
- package/src/assets/icons/send.0c0c0d.svg +1 -0
- package/src/assets/icons/send.svg +1 -0
- package/src/assets/icons/settings.0c0c0d.svg +1 -0
- package/src/assets/icons/settings.svg +1 -0
- package/src/assets/icons/shield.svg +1 -0
- package/src/assets/icons/sidebar-left.svg +1 -0
- package/src/assets/icons/sidebar-right.svg +1 -0
- package/src/assets/icons/sliders.svg +1 -0
- package/src/assets/icons/sparkles.32f08c.svg +1 -0
- package/src/assets/icons/sparkles.svg +1 -0
- package/src/assets/icons/square.svg +1 -0
- package/src/assets/icons/star.svg +1 -0
- package/src/assets/icons/sun.svg +1 -0
- package/src/assets/icons/terminal.svg +1 -0
- package/src/assets/icons/trash.svg +1 -0
- package/src/assets/icons/trending-down.svg +1 -0
- package/src/assets/icons/trending-up.svg +1 -0
- package/src/assets/icons/type.svg +1 -0
- package/src/assets/icons/upload.svg +1 -0
- package/src/assets/icons/user-circle.svg +1 -0
- package/src/assets/icons/user.svg +1 -0
- package/src/assets/icons/users.svg +1 -0
- package/src/assets/icons/wrench.svg +1 -0
- package/src/assets/icons/x-circle.svg +1 -0
- package/src/assets/icons/x.svg +1 -0
- package/src/assets/icons/zap.0c0c0d.svg +1 -0
- package/src/assets/icons/zap.svg +1 -0
- package/src/avatar.ts +64 -0
- package/src/button.ts +88 -0
- package/src/card.ts +59 -0
- package/src/chat-composer.ts +156 -0
- package/src/dialog.ts +127 -0
- package/src/drawer.ts +131 -0
- package/src/editor-tabs.ts +184 -0
- package/src/file-tree.ts +214 -0
- package/src/forms.ts +270 -0
- package/src/icon.ts +118 -0
- package/src/icons.js +165 -0
- package/src/index.test.ts +213 -0
- package/src/index.ts +94 -0
- package/src/kbd.ts +72 -0
- package/src/menu.ts +119 -0
- package/src/nav-list.ts +157 -0
- package/src/overlay.test.ts +66 -0
- package/src/overlay.ts +205 -0
- package/src/page-header.ts +97 -0
- package/src/pagination.ts +163 -0
- package/src/second-batch.test.ts +205 -0
- package/src/stat-card.ts +92 -0
- package/src/status-bar.ts +108 -0
- package/src/styles/base.css +240 -0
- package/src/styles/components.css +1234 -0
- package/{dist → src/styles}/styles.css +2 -0
- package/src/styles/toast.css +57 -0
- package/src/styles/tokens.css +438 -0
- package/src/styles/vui.css +47 -0
- package/src/table.ts +191 -0
- package/src/tabs.ts +100 -0
- package/src/tag.ts +33 -0
- package/src/third-batch.test.ts +137 -0
- package/src/toast.test.ts +55 -0
- package/src/toast.ts +79 -0
- package/src/types.ts +25 -0
- package/src/utils.ts +221 -0
- package/src/workbench-titlebar.ts +137 -0
- package/dist/app-shell-dom.d.ts +0 -30
- package/dist/app-shell-dom.js +0 -913
- package/dist/app-shell.d.ts +0 -235
- package/dist/app-shell.js +0 -415
- package/dist/base.css +0 -51
- package/dist/calendar-picker.d.ts +0 -45
- package/dist/calendar-picker.js +0 -217
- package/dist/calendar.d.ts +0 -95
- package/dist/calendar.js +0 -194
- package/dist/complex-inputs.d.ts +0 -300
- package/dist/complex-inputs.js +0 -866
- package/dist/components.css +0 -4756
- package/dist/data-display.d.ts +0 -1094
- package/dist/data-display.js +0 -2341
- package/dist/dialog.d.ts +0 -26
- package/dist/dialog.js +0 -94
- package/dist/feedback.d.ts +0 -88
- package/dist/feedback.js +0 -281
- package/dist/forms.d.ts +0 -378
- package/dist/forms.js +0 -1019
- package/dist/icons-config.d.ts +0 -25
- package/dist/icons-config.js +0 -14
- package/dist/icons.d.ts +0 -41
- package/dist/icons.js +0 -185
- package/dist/index.d.ts +0 -31
- package/dist/index.js +0 -40
- package/dist/locale/en-US.d.ts +0 -31
- package/dist/locale/en-US.js +0 -20
- package/dist/locale/zh-CN.d.ts +0 -31
- package/dist/locale/zh-CN.js +0 -20
- package/dist/navigation.d.ts +0 -609
- package/dist/navigation.js +0 -1707
- package/dist/overlay.d.ts +0 -308
- package/dist/overlay.js +0 -974
- package/dist/page-state.d.ts +0 -23
- package/dist/page-state.js +0 -96
- package/dist/primitives.d.ts +0 -268
- package/dist/primitives.js +0 -764
- package/dist/theme-data.d.ts +0 -394
- package/dist/theme-data.js +0 -417
- package/dist/theme.d.ts +0 -97
- package/dist/theme.js +0 -301
- package/dist/tokens.css +0 -570
- package/dist/tree.d.ts +0 -144
- package/dist/tree.js +0 -475
- package/dist/virtual-list.d.ts +0 -190
- package/dist/virtual-list.js +0 -538
- package/dist/workbench.d.ts +0 -136
- package/dist/workbench.js +0 -156
package/dist/forms.d.ts
DELETED
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
/** @license MIT
|
|
2
|
-
* Copyright (c) 2026 vobsjs
|
|
3
|
-
* @vobs/ui
|
|
4
|
-
*/
|
|
5
|
-
import { type FormFieldRenderControl, type FormFieldSchemaRecord, type FormFieldViewItem, type FormInstance, type FormRenderer, type FormRendererOptions, type FormSchema, type FormValues, type FormView } from '@vobs/forms';
|
|
6
|
-
import { type UiAttributes, type UiDomPlan } from './primitives.js';
|
|
7
|
-
export type UiInputSelectionOrientation = 'horizontal' | 'vertical';
|
|
8
|
-
export type UiSliderMode = 'range' | 'single';
|
|
9
|
-
export interface UiSliderMark {
|
|
10
|
-
readonly value: number;
|
|
11
|
-
readonly label?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface UiSliderPlanOptions {
|
|
14
|
-
readonly id: string;
|
|
15
|
-
readonly name?: string;
|
|
16
|
-
readonly label?: string;
|
|
17
|
-
readonly value: number | readonly [number, number];
|
|
18
|
-
readonly min?: number;
|
|
19
|
-
readonly max?: number;
|
|
20
|
-
readonly step?: number;
|
|
21
|
-
readonly disabled?: boolean;
|
|
22
|
-
readonly readonly?: boolean;
|
|
23
|
-
readonly valueText?: string | readonly [string, string];
|
|
24
|
-
readonly marks?: readonly UiSliderMark[];
|
|
25
|
-
readonly orientation?: UiInputSelectionOrientation;
|
|
26
|
-
readonly className?: string;
|
|
27
|
-
readonly attrs?: UiAttributes;
|
|
28
|
-
}
|
|
29
|
-
export interface UiSliderPlans {
|
|
30
|
-
readonly root: UiDomPlan<'div'>;
|
|
31
|
-
readonly track: UiDomPlan<'div'>;
|
|
32
|
-
readonly range: UiDomPlan<'span'>;
|
|
33
|
-
readonly thumbs: readonly UiDomPlan<'input'>[];
|
|
34
|
-
readonly marks: readonly UiDomPlan<'span'>[];
|
|
35
|
-
}
|
|
36
|
-
export type UiSliderTooltipVisibilityState = 'hidden' | 'partial' | 'visible';
|
|
37
|
-
export type UiSliderFormatState = 'formatted' | 'raw';
|
|
38
|
-
export type UiSliderFilterSummaryState = 'empty' | 'ready';
|
|
39
|
-
export interface UiSliderTooltipFormatterStateContractOptions {
|
|
40
|
-
readonly id: string;
|
|
41
|
-
readonly value: number | readonly [number, number];
|
|
42
|
-
readonly min?: number;
|
|
43
|
-
readonly max?: number;
|
|
44
|
-
readonly tooltipVisible?: boolean | readonly [boolean, boolean];
|
|
45
|
-
readonly formattedValue?: string | readonly [string, string];
|
|
46
|
-
readonly filterSummary?: string;
|
|
47
|
-
}
|
|
48
|
-
export interface UiSliderTooltipFormatterThumbContract {
|
|
49
|
-
readonly id: string;
|
|
50
|
-
readonly value: number;
|
|
51
|
-
readonly formattedValue: string;
|
|
52
|
-
readonly tooltipVisible: boolean;
|
|
53
|
-
readonly attrs: UiAttributes;
|
|
54
|
-
readonly tooltipAttrs: UiAttributes;
|
|
55
|
-
}
|
|
56
|
-
export interface UiSliderTooltipFormatterStateContract {
|
|
57
|
-
readonly mode: UiSliderMode;
|
|
58
|
-
readonly tooltipState: UiSliderTooltipVisibilityState;
|
|
59
|
-
readonly formatState: UiSliderFormatState;
|
|
60
|
-
readonly filterSummaryState: UiSliderFilterSummaryState;
|
|
61
|
-
readonly tooltipVisibleCount: number;
|
|
62
|
-
readonly formattedValues: readonly [string, string];
|
|
63
|
-
readonly valueText: string | readonly [string, string];
|
|
64
|
-
readonly filterSummary: string;
|
|
65
|
-
readonly attrs: UiAttributes;
|
|
66
|
-
readonly thumbs: readonly UiSliderTooltipFormatterThumbContract[];
|
|
67
|
-
}
|
|
68
|
-
export interface UiSelectionOption {
|
|
69
|
-
readonly id: string;
|
|
70
|
-
readonly label: string;
|
|
71
|
-
readonly value: string;
|
|
72
|
-
readonly description?: string;
|
|
73
|
-
readonly disabled?: boolean;
|
|
74
|
-
readonly icon?: boolean;
|
|
75
|
-
}
|
|
76
|
-
export interface UiSegmentedPlanOptions {
|
|
77
|
-
readonly id: string;
|
|
78
|
-
readonly options: readonly UiSelectionOption[];
|
|
79
|
-
readonly value?: string;
|
|
80
|
-
readonly label?: string;
|
|
81
|
-
readonly orientation?: UiInputSelectionOrientation;
|
|
82
|
-
readonly disabled?: boolean;
|
|
83
|
-
readonly className?: string;
|
|
84
|
-
readonly attrs?: UiAttributes;
|
|
85
|
-
}
|
|
86
|
-
export interface UiSegmentedPlans {
|
|
87
|
-
readonly root: UiDomPlan<'div'>;
|
|
88
|
-
readonly items: readonly UiDomPlan<'button'>[];
|
|
89
|
-
readonly icons: readonly (UiDomPlan<'span'> | undefined)[];
|
|
90
|
-
}
|
|
91
|
-
export type UiSegmentedOverflowState = 'empty' | 'expanded' | 'overflow';
|
|
92
|
-
export type UiSegmentedWrapState = 'nowrap' | 'wrapped';
|
|
93
|
-
export interface UiSegmentedResponsiveStateContractOptions {
|
|
94
|
-
readonly options: readonly UiSelectionOption[];
|
|
95
|
-
readonly iconIds?: readonly string[];
|
|
96
|
-
readonly visibleIds?: readonly string[];
|
|
97
|
-
readonly overflowIds?: readonly string[];
|
|
98
|
-
readonly wrapped?: boolean;
|
|
99
|
-
}
|
|
100
|
-
export interface UiSegmentedResponsiveItemContract {
|
|
101
|
-
readonly id: string;
|
|
102
|
-
readonly option: UiSelectionOption;
|
|
103
|
-
readonly icon: boolean;
|
|
104
|
-
readonly visible: boolean;
|
|
105
|
-
readonly overflow: boolean;
|
|
106
|
-
readonly attrs: UiAttributes;
|
|
107
|
-
}
|
|
108
|
-
export interface UiSegmentedResponsiveStateContract {
|
|
109
|
-
readonly overflowState: UiSegmentedOverflowState;
|
|
110
|
-
readonly wrapState: UiSegmentedWrapState;
|
|
111
|
-
readonly itemCount: number;
|
|
112
|
-
readonly iconCount: number;
|
|
113
|
-
readonly visibleCount: number;
|
|
114
|
-
readonly overflowCount: number;
|
|
115
|
-
readonly iconIds: readonly string[];
|
|
116
|
-
readonly visibleIds: readonly string[];
|
|
117
|
-
readonly overflowIds: readonly string[];
|
|
118
|
-
readonly attrs: UiAttributes;
|
|
119
|
-
readonly items: readonly UiSegmentedResponsiveItemContract[];
|
|
120
|
-
}
|
|
121
|
-
export interface UiChoiceGroupPlanOptions {
|
|
122
|
-
readonly id: string;
|
|
123
|
-
readonly name: string;
|
|
124
|
-
readonly legend: string;
|
|
125
|
-
readonly options: readonly UiSelectionOption[];
|
|
126
|
-
readonly value?: string;
|
|
127
|
-
readonly values?: ReadonlySet<string> | readonly string[];
|
|
128
|
-
readonly indeterminateValues?: ReadonlySet<string> | readonly string[];
|
|
129
|
-
readonly orientation?: UiInputSelectionOrientation;
|
|
130
|
-
readonly disabled?: boolean;
|
|
131
|
-
readonly className?: string;
|
|
132
|
-
readonly attrs?: UiAttributes;
|
|
133
|
-
}
|
|
134
|
-
export interface UiChoiceGroupPlans {
|
|
135
|
-
readonly root: UiDomPlan<'fieldset'>;
|
|
136
|
-
readonly legend: UiDomPlan<'legend'>;
|
|
137
|
-
readonly options: readonly UiDomPlan<'label'>[];
|
|
138
|
-
readonly inputs: readonly UiDomPlan<'input'>[];
|
|
139
|
-
readonly descriptions: readonly (UiDomPlan<'span'> | undefined)[];
|
|
140
|
-
}
|
|
141
|
-
export type UiChoiceGroupCardState = 'cards' | 'empty' | 'partial' | 'plain';
|
|
142
|
-
export type UiChoiceGroupCardOptionState = 'disabled' | 'idle' | 'selected';
|
|
143
|
-
export type UiChoiceGroupCardActionState = 'disabled' | 'hidden' | 'ready';
|
|
144
|
-
export type UiChoiceGroupCardDescriptionState = 'hidden' | 'visible';
|
|
145
|
-
export interface UiChoiceGroupCardOptionStateContractOptions {
|
|
146
|
-
readonly type: 'checkbox' | 'radio';
|
|
147
|
-
readonly options: readonly UiSelectionOption[];
|
|
148
|
-
readonly value?: string;
|
|
149
|
-
readonly values?: ReadonlySet<string> | readonly string[];
|
|
150
|
-
readonly cardIds?: readonly string[];
|
|
151
|
-
readonly selectedEmphasisIds?: readonly string[];
|
|
152
|
-
readonly disabledEmphasisIds?: readonly string[];
|
|
153
|
-
readonly descriptionIds?: readonly string[];
|
|
154
|
-
readonly actionIds?: readonly string[];
|
|
155
|
-
readonly actionDisabledIds?: readonly string[];
|
|
156
|
-
}
|
|
157
|
-
export interface UiChoiceGroupCardOptionContract {
|
|
158
|
-
readonly id: string;
|
|
159
|
-
readonly option: UiSelectionOption;
|
|
160
|
-
readonly state: UiChoiceGroupCardOptionState;
|
|
161
|
-
readonly actionState: UiChoiceGroupCardActionState;
|
|
162
|
-
readonly descriptionState: UiChoiceGroupCardDescriptionState;
|
|
163
|
-
readonly card: boolean;
|
|
164
|
-
readonly selectedEmphasis: boolean;
|
|
165
|
-
readonly disabledEmphasis: boolean;
|
|
166
|
-
readonly attrs: UiAttributes;
|
|
167
|
-
readonly actionAttrs: UiAttributes;
|
|
168
|
-
}
|
|
169
|
-
export interface UiChoiceGroupCardOptionStateContract {
|
|
170
|
-
readonly type: 'checkbox' | 'radio';
|
|
171
|
-
readonly state: UiChoiceGroupCardState;
|
|
172
|
-
readonly optionCount: number;
|
|
173
|
-
readonly cardCount: number;
|
|
174
|
-
readonly selectedEmphasisCount: number;
|
|
175
|
-
readonly disabledEmphasisCount: number;
|
|
176
|
-
readonly descriptionCount: number;
|
|
177
|
-
readonly actionCount: number;
|
|
178
|
-
readonly actionDisabledCount: number;
|
|
179
|
-
readonly cardIds: readonly string[];
|
|
180
|
-
readonly selectedEmphasisIds: readonly string[];
|
|
181
|
-
readonly disabledEmphasisIds: readonly string[];
|
|
182
|
-
readonly descriptionIds: readonly string[];
|
|
183
|
-
readonly actionIds: readonly string[];
|
|
184
|
-
readonly actionDisabledIds: readonly string[];
|
|
185
|
-
readonly attrs: UiAttributes;
|
|
186
|
-
readonly items: readonly UiChoiceGroupCardOptionContract[];
|
|
187
|
-
}
|
|
188
|
-
export type UiChoiceGroupBulkSelectionState = 'all' | 'disabled' | 'empty' | 'none' | 'partial';
|
|
189
|
-
export type UiChoiceGroupBulkSelectAllState = 'checked' | 'disabled' | 'mixed' | 'unchecked';
|
|
190
|
-
export interface UiChoiceGroupBulkSelectionContractOptions {
|
|
191
|
-
readonly id: string;
|
|
192
|
-
readonly type: 'checkbox' | 'radio';
|
|
193
|
-
readonly options: readonly UiSelectionOption[];
|
|
194
|
-
readonly value?: string;
|
|
195
|
-
readonly values?: ReadonlySet<string> | readonly string[];
|
|
196
|
-
readonly indeterminateValues?: ReadonlySet<string> | readonly string[];
|
|
197
|
-
readonly disabled?: boolean;
|
|
198
|
-
readonly disabledReason?: string;
|
|
199
|
-
readonly selectAllLabel?: string;
|
|
200
|
-
}
|
|
201
|
-
export interface UiChoiceGroupBulkSelectionOptionContract {
|
|
202
|
-
readonly id: string;
|
|
203
|
-
readonly value: string;
|
|
204
|
-
readonly checked: boolean;
|
|
205
|
-
readonly indeterminate: boolean;
|
|
206
|
-
readonly disabled: boolean;
|
|
207
|
-
readonly attrs: UiAttributes;
|
|
208
|
-
}
|
|
209
|
-
export interface UiChoiceGroupBulkSelectionContract {
|
|
210
|
-
readonly type: 'checkbox' | 'radio';
|
|
211
|
-
readonly state: UiChoiceGroupBulkSelectionState;
|
|
212
|
-
readonly selectAllState: UiChoiceGroupBulkSelectAllState;
|
|
213
|
-
readonly totalCount: number;
|
|
214
|
-
readonly enabledCount: number;
|
|
215
|
-
readonly checkedCount: number;
|
|
216
|
-
readonly indeterminateCount: number;
|
|
217
|
-
readonly checkedIds: readonly string[];
|
|
218
|
-
readonly indeterminateIds: readonly string[];
|
|
219
|
-
readonly nextCheckedIds: readonly string[];
|
|
220
|
-
readonly disabledReason: string;
|
|
221
|
-
readonly canSelectAll: boolean;
|
|
222
|
-
readonly attrs: UiAttributes;
|
|
223
|
-
readonly selectAllAttrs: UiAttributes;
|
|
224
|
-
readonly optionContracts: readonly UiChoiceGroupBulkSelectionOptionContract[];
|
|
225
|
-
}
|
|
226
|
-
export interface UiFormOptions<Fields extends FormFieldSchemaRecord> {
|
|
227
|
-
readonly id: string;
|
|
228
|
-
readonly initialValues?: Partial<FormValues<Fields>>;
|
|
229
|
-
readonly renderer?: FormRendererOptions<Fields>;
|
|
230
|
-
readonly descriptions?: Partial<Record<keyof Fields & string, string>>;
|
|
231
|
-
}
|
|
232
|
-
export interface UiForm<Fields extends FormFieldSchemaRecord> {
|
|
233
|
-
readonly form: FormInstance<Fields>;
|
|
234
|
-
readonly renderer: FormRenderer<Fields>;
|
|
235
|
-
readonly view: FormView<Fields>;
|
|
236
|
-
readonly root: UiDomPlan<'form'>;
|
|
237
|
-
readonly fields: readonly UiFormFieldPlan[];
|
|
238
|
-
readonly errorSummary: UiErrorSummaryPlan;
|
|
239
|
-
submit(callback: (values: FormValues<Fields>) => void | Promise<void>): Promise<boolean>;
|
|
240
|
-
}
|
|
241
|
-
export interface UiFormFieldPlan {
|
|
242
|
-
readonly name: string;
|
|
243
|
-
readonly label: string;
|
|
244
|
-
readonly control: FormFieldRenderControl;
|
|
245
|
-
readonly root: UiDomPlan<'div'>;
|
|
246
|
-
readonly labelPlan: UiDomPlan<'label'>;
|
|
247
|
-
readonly description?: UiDomPlan<'p'>;
|
|
248
|
-
readonly descriptionText?: string;
|
|
249
|
-
readonly controlPlan: UiDomPlan;
|
|
250
|
-
readonly error: UiDomPlan<'p'>;
|
|
251
|
-
readonly errorText: string;
|
|
252
|
-
}
|
|
253
|
-
export interface UiErrorSummaryPlan {
|
|
254
|
-
readonly root: UiDomPlan<'div'>;
|
|
255
|
-
readonly title: UiDomPlan<'h2'>;
|
|
256
|
-
readonly items: readonly UiErrorSummaryItemPlan[];
|
|
257
|
-
}
|
|
258
|
-
export interface UiErrorSummaryItemPlan {
|
|
259
|
-
readonly id: string;
|
|
260
|
-
readonly href: string;
|
|
261
|
-
readonly controlId: string;
|
|
262
|
-
readonly message: string;
|
|
263
|
-
}
|
|
264
|
-
export type UiServerErrors<Fields extends FormFieldSchemaRecord> = Partial<Record<keyof Fields & string, string | readonly string[]>>;
|
|
265
|
-
export type UiFormDrawerSubmissionMode = 'create' | 'edit';
|
|
266
|
-
export type UiFormDrawerSubmissionState = 'dirty' | 'disabled' | 'idle' | 'invalid' | 'server-error' | 'submitting' | 'success';
|
|
267
|
-
export interface UiFormDrawerSubmissionContractOptions<Fields extends FormFieldSchemaRecord> {
|
|
268
|
-
readonly view: FormView<Fields>;
|
|
269
|
-
readonly drawerId: string;
|
|
270
|
-
readonly mode?: UiFormDrawerSubmissionMode;
|
|
271
|
-
readonly open?: boolean;
|
|
272
|
-
readonly dirty?: boolean;
|
|
273
|
-
readonly disabled?: boolean;
|
|
274
|
-
readonly submitting?: boolean;
|
|
275
|
-
readonly success?: boolean;
|
|
276
|
-
readonly serverErrorCount?: number;
|
|
277
|
-
readonly submitIntent?: string;
|
|
278
|
-
readonly cancelIntent?: string;
|
|
279
|
-
}
|
|
280
|
-
export interface UiFormDrawerSubmissionContract {
|
|
281
|
-
readonly drawerId: string;
|
|
282
|
-
readonly mode: UiFormDrawerSubmissionMode;
|
|
283
|
-
readonly state: UiFormDrawerSubmissionState;
|
|
284
|
-
readonly open: boolean;
|
|
285
|
-
readonly dirty: boolean;
|
|
286
|
-
readonly disabled: boolean;
|
|
287
|
-
readonly submitting: boolean;
|
|
288
|
-
readonly invalid: boolean;
|
|
289
|
-
readonly success: boolean;
|
|
290
|
-
readonly errorCount: number;
|
|
291
|
-
readonly serverErrorCount: number;
|
|
292
|
-
readonly canSubmit: boolean;
|
|
293
|
-
readonly focusTarget: string;
|
|
294
|
-
readonly attrs: UiAttributes;
|
|
295
|
-
readonly submitAttrs: UiAttributes;
|
|
296
|
-
readonly cancelAttrs: UiAttributes;
|
|
297
|
-
}
|
|
298
|
-
export declare function createFormDrawerSubmissionContract<Fields extends FormFieldSchemaRecord>(options: UiFormDrawerSubmissionContractOptions<Fields>): UiFormDrawerSubmissionContract;
|
|
299
|
-
export declare function createSliderPlans(options: UiSliderPlanOptions): UiSliderPlans;
|
|
300
|
-
export declare function getNextSliderValue(value: number, key: string, options?: Pick<UiSliderPlanOptions, 'max' | 'min' | 'step'>): number;
|
|
301
|
-
export declare function createSliderTooltipFormatterStateContract(options: UiSliderTooltipFormatterStateContractOptions): UiSliderTooltipFormatterStateContract;
|
|
302
|
-
export declare function createSegmentedPlans(options: UiSegmentedPlanOptions): UiSegmentedPlans;
|
|
303
|
-
export declare function getNextSegmentedValue(options: readonly UiSelectionOption[], value: string | undefined, key: string, orientation?: UiInputSelectionOrientation): string | undefined;
|
|
304
|
-
export declare function createSegmentedResponsiveStateContract(options: UiSegmentedResponsiveStateContractOptions): UiSegmentedResponsiveStateContract;
|
|
305
|
-
export declare function createRadioGroupPlans(options: UiChoiceGroupPlanOptions): UiChoiceGroupPlans;
|
|
306
|
-
export declare function createCheckboxGroupPlans(options: UiChoiceGroupPlanOptions): UiChoiceGroupPlans;
|
|
307
|
-
export declare function getNextRadioGroupValue(options: readonly UiSelectionOption[], value: string | undefined, key: string, orientation?: UiInputSelectionOrientation): string | undefined;
|
|
308
|
-
export declare function toggleCheckboxGroupValue(values: ReadonlySet<string>, value: string): ReadonlySet<string>;
|
|
309
|
-
export declare function createChoiceGroupCardOptionStateContract(options: UiChoiceGroupCardOptionStateContractOptions): UiChoiceGroupCardOptionStateContract;
|
|
310
|
-
export declare function createChoiceGroupBulkSelectionContract(options: UiChoiceGroupBulkSelectionContractOptions): UiChoiceGroupBulkSelectionContract;
|
|
311
|
-
export declare function createFormUi<const Fields extends FormFieldSchemaRecord>(schema: FormSchema<Fields>, options: UiFormOptions<Fields>): UiForm<Fields>;
|
|
312
|
-
export declare function createFormUiFromView<const Fields extends FormFieldSchemaRecord>(view: FormView<Fields>, options: Pick<UiFormOptions<Fields>, 'descriptions' | 'id'>): UiForm<Fields>;
|
|
313
|
-
export declare function applyFormServerErrors<Fields extends FormFieldSchemaRecord>(view: FormView<Fields>, errors: UiServerErrors<Fields>): void;
|
|
314
|
-
export declare function readFirstErrorFocusTarget<Fields extends FormFieldSchemaRecord>(view: FormView<Fields>): string | undefined;
|
|
315
|
-
export declare function createFormRootPlan<Fields extends FormFieldSchemaRecord>(view: FormView<Fields>): UiDomPlan<'form'>;
|
|
316
|
-
export declare function createErrorSummaryPlan<Fields extends FormFieldSchemaRecord>(view: FormView<Fields>): UiErrorSummaryPlan;
|
|
317
|
-
export declare function createFormFieldPlan(item: FormFieldViewItem, description: string | undefined): UiFormFieldPlan;
|
|
318
|
-
/**
|
|
319
|
-
* Setting Row plans — settings panel: groups (label + panel); each row = title/description + control.
|
|
320
|
-
* Spec source: UIStyle/preview/component-setting-row.html (ds-settingrow).
|
|
321
|
-
*/
|
|
322
|
-
export type SettingRowControlKind = 'select' | 'button' | 'icon-button';
|
|
323
|
-
export interface SettingRowPlanOptions {
|
|
324
|
-
readonly id: string;
|
|
325
|
-
readonly title: string;
|
|
326
|
-
readonly description?: string;
|
|
327
|
-
/** Control kind (default 'select'). */
|
|
328
|
-
readonly control?: SettingRowControlKind;
|
|
329
|
-
/** Control text (shown on select/button). */
|
|
330
|
-
readonly controlLabel?: string;
|
|
331
|
-
/** Danger button (btn--danger style). */
|
|
332
|
-
readonly danger?: boolean;
|
|
333
|
-
readonly disabled?: boolean;
|
|
334
|
-
readonly className?: string;
|
|
335
|
-
readonly attrs?: UiAttributes;
|
|
336
|
-
}
|
|
337
|
-
export interface SettingRowPlans {
|
|
338
|
-
readonly root: UiDomPlan<'div'>;
|
|
339
|
-
readonly main: UiDomPlan<'div'>;
|
|
340
|
-
readonly title: UiDomPlan<'span'>;
|
|
341
|
-
readonly description: UiDomPlan<'span'>;
|
|
342
|
-
/** Control: select shape (button + chevron) or a plain button. */
|
|
343
|
-
readonly control: UiDomPlan<'button'>;
|
|
344
|
-
}
|
|
345
|
-
export interface SettingRowGroupInput {
|
|
346
|
-
readonly id: string;
|
|
347
|
-
readonly label: string;
|
|
348
|
-
readonly rows: readonly SettingRowPlanOptions[];
|
|
349
|
-
}
|
|
350
|
-
export interface SettingRowGroupPlans extends UiDomPlan<'div'> {
|
|
351
|
-
readonly groupId: string;
|
|
352
|
-
readonly groupLabel: UiDomPlan<'span'>;
|
|
353
|
-
readonly panel: UiDomPlan<'div'>;
|
|
354
|
-
readonly rows: readonly SettingRowPlans[];
|
|
355
|
-
}
|
|
356
|
-
export declare function createSettingRowPlans(options: SettingRowPlanOptions): SettingRowPlans;
|
|
357
|
-
export declare function createSettingRowGroupPlans(options: SettingRowGroupInput): SettingRowGroupPlans;
|
|
358
|
-
/**
|
|
359
|
-
* Rate plans — star-rating input.
|
|
360
|
-
* Spec source: common enterprise-backend component set (no UIStyle spec, this is an out-of-spec component).
|
|
361
|
-
*/
|
|
362
|
-
export interface RatePlans {
|
|
363
|
-
readonly root: UiDomPlan<'div'>;
|
|
364
|
-
/** Star buttons (max items), with data-index + data-state (active/disabled). */
|
|
365
|
-
readonly stars: readonly UiDomPlan<'button'>[];
|
|
366
|
-
}
|
|
367
|
-
export interface RatePlanOptions {
|
|
368
|
-
readonly id: string;
|
|
369
|
-
/** Current value (1..max). */
|
|
370
|
-
readonly value?: number;
|
|
371
|
-
/** Star count (default 5). */
|
|
372
|
-
readonly max?: number;
|
|
373
|
-
readonly disabled?: boolean;
|
|
374
|
-
readonly readonly?: boolean;
|
|
375
|
-
readonly className?: string;
|
|
376
|
-
readonly attrs?: UiAttributes;
|
|
377
|
-
}
|
|
378
|
-
export declare function createRatePlans(options: RatePlanOptions): RatePlans;
|