@simplysm/angular 14.0.23 → 14.0.24
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/package.json +6 -7
- package/README.md +0 -310
- package/docs/core.md +0 -909
- package/docs/features.md +0 -402
- package/docs/styling.md +0 -309
- package/docs/ui-data.md +0 -249
- package/docs/ui-form.md +0 -421
- package/docs/ui-layout.md +0 -216
- package/docs/ui-navigation.md +0 -243
- package/docs/ui-overlay.md +0 -330
- package/docs/ui-visual.md +0 -131
package/docs/ui-data.md
DELETED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
# UI Data
|
|
2
|
-
|
|
3
|
-
Data display components: lists and spreadsheet-style sheets.
|
|
4
|
-
|
|
5
|
-
## `SdListControl`
|
|
6
|
-
|
|
7
|
-
Simple list container.
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
@Component({ selector: "sd-list" })
|
|
11
|
-
class SdListControl {
|
|
12
|
-
inset = input(false, { transform: booleanAttribute });
|
|
13
|
-
}
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
| Input | Type | Default | Description |
|
|
17
|
-
|-------|------|---------|-------------|
|
|
18
|
-
| `inset` | `boolean` | `false` | Makes background transparent |
|
|
19
|
-
|
|
20
|
-
## `SdListItemControl`
|
|
21
|
-
|
|
22
|
-
List item with optional accordion/flat layout, selection state, and tool slot.
|
|
23
|
-
|
|
24
|
-
```typescript
|
|
25
|
-
@Component({ selector: "sd-list-item" })
|
|
26
|
-
class SdListItemControl {
|
|
27
|
-
layout = input<"accordion" | "flat">("accordion");
|
|
28
|
-
open = model(false);
|
|
29
|
-
selected = input(false, { transform: booleanAttribute });
|
|
30
|
-
selectedIcon = input<string>();
|
|
31
|
-
readonly = input(false, { transform: booleanAttribute });
|
|
32
|
-
contentStyle = input<string>();
|
|
33
|
-
contentClass = input<string>();
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
| Input | Type | Default | Description |
|
|
38
|
-
|-------|------|---------|-------------|
|
|
39
|
-
| `layout` | `"accordion" \| "flat"` | `"accordion"` | Child display mode |
|
|
40
|
-
| `open` | `boolean` | `false` | Accordion open state (two-way) |
|
|
41
|
-
| `selected` | `boolean` | `false` | Selected visual state |
|
|
42
|
-
| `selectedIcon` | `string \| undefined` | — | Icon shown when selected (no children) |
|
|
43
|
-
| `readonly` | `boolean` | `false` | Disables click interaction |
|
|
44
|
-
| `contentStyle` | `string \| undefined` | — | Inline style for content |
|
|
45
|
-
| `contentClass` | `string \| undefined` | — | CSS class for content |
|
|
46
|
-
|
|
47
|
-
Content template: `#toolTpl` — optional tool area.
|
|
48
|
-
|
|
49
|
-
## `SdSheetControl`
|
|
50
|
-
|
|
51
|
-
Full-featured data grid/spreadsheet with sorting, tree expansion, selection, pagination, column resizing, and config persistence.
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
@Component({ selector: "sd-sheet" })
|
|
55
|
-
class SdSheetControl<T> {
|
|
56
|
-
// Inputs
|
|
57
|
-
key = input<string>();
|
|
58
|
-
items = input<T[]>([]);
|
|
59
|
-
trackByFn = input<(item: T, index: number) => unknown>();
|
|
60
|
-
selectMode = input<"single" | "multi">();
|
|
61
|
-
autoSelect = input<"click" | "focus">();
|
|
62
|
-
getItemSelectableFn = input<(item: T) => boolean | string>();
|
|
63
|
-
getChildrenFn = input<(item: T, index: number) => T[] | undefined>();
|
|
64
|
-
useAutoSort = input(false, { transform: booleanAttribute });
|
|
65
|
-
visiblePageCount = input(10);
|
|
66
|
-
totalPageCount = input(0);
|
|
67
|
-
itemsPerPage = input(0);
|
|
68
|
-
focusMode = input<"row" | "cell">("cell");
|
|
69
|
-
inset = input(false, { transform: booleanAttribute });
|
|
70
|
-
contentStyle = input<string>();
|
|
71
|
-
getItemCellClassFn = input<(item: T, colKey: string) => string>();
|
|
72
|
-
getItemCellStyleFn = input<(item: T, colKey: string) => string | undefined>();
|
|
73
|
-
hideConfigBar = input(false, { transform: booleanAttribute });
|
|
74
|
-
|
|
75
|
-
// Models
|
|
76
|
-
selectedItems = model<T[]>([]);
|
|
77
|
-
expandedItems = model<T[]>([]);
|
|
78
|
-
sorts = model<ISortingDef[]>([]);
|
|
79
|
-
currentPage = model(0);
|
|
80
|
-
|
|
81
|
-
// Outputs
|
|
82
|
-
itemKeydown = output<ISdSheetItemKeydownEventParam<T>>();
|
|
83
|
-
cellKeydown = output<ISdSheetItemKeydownEventParam<T>>();
|
|
84
|
-
}
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
| Input | Type | Default | Description |
|
|
88
|
-
|-------|------|---------|-------------|
|
|
89
|
-
| `key` | `string \| undefined` | — | Enables column config persistence |
|
|
90
|
-
| `items` | `T[]` | `[]` | Data items to display |
|
|
91
|
-
| `trackByFn` | `((item, index) => unknown) \| undefined` | — | Identity function for change detection |
|
|
92
|
-
| `selectMode` | `"single" \| "multi" \| undefined` | — | Selection mode |
|
|
93
|
-
| `autoSelect` | `"click" \| "focus" \| undefined` | — | Auto-select trigger |
|
|
94
|
-
| `getItemSelectableFn` | `((item) => boolean \| string) \| undefined` | — | Per-item selectability; string = disabled reason |
|
|
95
|
-
| `getChildrenFn` | `((item, index) => T[] \| undefined) \| undefined` | — | Enables tree mode |
|
|
96
|
-
| `useAutoSort` | `boolean` | `false` | Client-side auto-sort |
|
|
97
|
-
| `focusMode` | `"row" \| "cell"` | `"cell"` | Keyboard focus granularity |
|
|
98
|
-
| `inset` | `boolean` | `false` | Removes outer border |
|
|
99
|
-
| `hideConfigBar` | `boolean` | `false` | Hides config button |
|
|
100
|
-
|
|
101
|
-
Content children: `SdSheetColumnDirective`.
|
|
102
|
-
|
|
103
|
-
## `SdSheetColumnDirective`
|
|
104
|
-
|
|
105
|
-
Column definition directive for `SdSheetControl`.
|
|
106
|
-
|
|
107
|
-
```typescript
|
|
108
|
-
@Directive({ selector: "sd-sheet-column" })
|
|
109
|
-
class SdSheetColumnDirective {
|
|
110
|
-
key = input.required<string>();
|
|
111
|
-
header = input<string | string[]>("");
|
|
112
|
-
width = input<string>();
|
|
113
|
-
fixed = input(false, { transform: booleanAttribute });
|
|
114
|
-
hidden = input(false, { transform: booleanAttribute });
|
|
115
|
-
collapse = input(false, { transform: booleanAttribute });
|
|
116
|
-
disableSorting = input(false, { transform: booleanAttribute });
|
|
117
|
-
disableResizing = input(false, { transform: booleanAttribute });
|
|
118
|
-
ordering = input(0);
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
| Input | Type | Default | Description |
|
|
123
|
-
|-------|------|---------|-------------|
|
|
124
|
-
| `key` | `string` | — | Column identifier (required) |
|
|
125
|
-
| `header` | `string \| string[]` | `""` | Header text; array for hierarchical headers |
|
|
126
|
-
| `width` | `string \| undefined` | — | CSS width |
|
|
127
|
-
| `fixed` | `boolean` | `false` | Sticky left column |
|
|
128
|
-
| `hidden` | `boolean` | `false` | Hidden column |
|
|
129
|
-
| `collapse` | `boolean` | `false` | Collapsible column |
|
|
130
|
-
| `disableSorting` | `boolean` | `false` | Disable sort on this column |
|
|
131
|
-
| `disableResizing` | `boolean` | `false` | Disable resize on this column |
|
|
132
|
-
| `ordering` | `number` | `0` | Display order |
|
|
133
|
-
|
|
134
|
-
Content templates: `#cellTpl` (cell content), `#summaryTpl` (footer summary).
|
|
135
|
-
|
|
136
|
-
## `SdSheetConfigModal`
|
|
137
|
-
|
|
138
|
-
Modal for configuring sheet columns (visibility, order, fixed, width). Implements `ISdModal<ISdSheetConfig | undefined>`.
|
|
139
|
-
|
|
140
|
-
```typescript
|
|
141
|
-
@Component({ selector: "sd-sheet-config-modal" })
|
|
142
|
-
class SdSheetConfigModal implements ISdModal<ISdSheetConfig | undefined> {
|
|
143
|
-
controls = input.required<readonly SdSheetColumnDirective[]>();
|
|
144
|
-
config = input.required<ISdSheetConfig | undefined>();
|
|
145
|
-
close = output<ISdSheetConfig | undefined>();
|
|
146
|
-
initialized = signal(true);
|
|
147
|
-
}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## `ISdSheetColumnDef`
|
|
151
|
-
|
|
152
|
-
Runtime column definition used internally by `SdSheetControl`.
|
|
153
|
-
|
|
154
|
-
```typescript
|
|
155
|
-
interface ISdSheetColumnDef {
|
|
156
|
-
key: string;
|
|
157
|
-
header: string | string[];
|
|
158
|
-
width: string | undefined;
|
|
159
|
-
fixed: boolean;
|
|
160
|
-
hidden: boolean;
|
|
161
|
-
collapse: boolean;
|
|
162
|
-
disableSorting: boolean;
|
|
163
|
-
disableResizing: boolean;
|
|
164
|
-
ordering: number;
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
| Field | Type | Description |
|
|
169
|
-
|-------|------|-------------|
|
|
170
|
-
| `key` | `string` | Column identifier |
|
|
171
|
-
| `header` | `string \| string[]` | Header text |
|
|
172
|
-
| `width` | `string \| undefined` | CSS width |
|
|
173
|
-
| `fixed` | `boolean` | Sticky left |
|
|
174
|
-
| `hidden` | `boolean` | Hidden |
|
|
175
|
-
| `collapse` | `boolean` | Collapsible |
|
|
176
|
-
| `disableSorting` | `boolean` | Sorting disabled |
|
|
177
|
-
| `disableResizing` | `boolean` | Resizing disabled |
|
|
178
|
-
| `ordering` | `number` | Display order |
|
|
179
|
-
|
|
180
|
-
## `ISdSheetHeaderDef`
|
|
181
|
-
|
|
182
|
-
Header cell definition for multi-row headers.
|
|
183
|
-
|
|
184
|
-
```typescript
|
|
185
|
-
interface ISdSheetHeaderDef {
|
|
186
|
-
text: string;
|
|
187
|
-
colspan: number;
|
|
188
|
-
rowspan: number;
|
|
189
|
-
isLastRow: boolean;
|
|
190
|
-
colDef: ISdSheetColumnDef | undefined;
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
| Field | Type | Description |
|
|
195
|
-
|-------|------|-------------|
|
|
196
|
-
| `text` | `string` | Header text |
|
|
197
|
-
| `colspan` | `number` | Column span |
|
|
198
|
-
| `rowspan` | `number` | Row span |
|
|
199
|
-
| `isLastRow` | `boolean` | Whether this is the bottom header row |
|
|
200
|
-
| `colDef` | `ISdSheetColumnDef \| undefined` | Associated column definition |
|
|
201
|
-
|
|
202
|
-
## `ISdSheetConfig`
|
|
203
|
-
|
|
204
|
-
Persisted user configuration for a sheet.
|
|
205
|
-
|
|
206
|
-
```typescript
|
|
207
|
-
interface ISdSheetConfig {
|
|
208
|
-
columnRecord: Record<string, {
|
|
209
|
-
width?: string;
|
|
210
|
-
hidden?: boolean;
|
|
211
|
-
fixed?: boolean;
|
|
212
|
-
ordering?: number;
|
|
213
|
-
}>;
|
|
214
|
-
}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
## `ISdSheetItemKeydownEventParam`
|
|
218
|
-
|
|
219
|
-
Payload for the `itemKeydown` output on `SdSheetControl`.
|
|
220
|
-
|
|
221
|
-
```typescript
|
|
222
|
-
interface ISdSheetItemKeydownEventParam<T> {
|
|
223
|
-
item: T;
|
|
224
|
-
event: KeyboardEvent;
|
|
225
|
-
}
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
| Field | Type | Description |
|
|
229
|
-
|-------|------|-------------|
|
|
230
|
-
| `item` | `T` | The data item for the row |
|
|
231
|
-
| `event` | `KeyboardEvent` | Original keyboard event |
|
|
232
|
-
|
|
233
|
-
## `ISdSheetCellKeydownEventParam`
|
|
234
|
-
|
|
235
|
-
Payload for the `cellKeydown` output on `SdSheetControl`.
|
|
236
|
-
|
|
237
|
-
```typescript
|
|
238
|
-
interface ISdSheetCellKeydownEventParam<T> {
|
|
239
|
-
item: T;
|
|
240
|
-
key: string;
|
|
241
|
-
event: KeyboardEvent;
|
|
242
|
-
}
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
| Field | Type | Description |
|
|
246
|
-
|-------|------|-------------|
|
|
247
|
-
| `item` | `T` | The data item for the row |
|
|
248
|
-
| `key` | `string` | Column key identifying which cell |
|
|
249
|
-
| `event` | `KeyboardEvent` | Original keyboard event |
|
package/docs/ui-form.md
DELETED
|
@@ -1,421 +0,0 @@
|
|
|
1
|
-
# UI Form
|
|
2
|
-
|
|
3
|
-
Form controls: buttons, text inputs, checkboxes, select dropdowns, editors, and form containers.
|
|
4
|
-
|
|
5
|
-
## `SdButtonControl`
|
|
6
|
-
|
|
7
|
-
Themed button with ripple effect.
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
@Component({ selector: "sd-button" })
|
|
11
|
-
class SdButtonControl {
|
|
12
|
-
type = input<"button" | "submit">("button");
|
|
13
|
-
theme = input<"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray" | "link" | "link-primary" | "link-secondary" | "link-info" | "link-success" | "link-warning" | "link-danger" | "link-gray" | "link-blue-gray" | "link-rev">();
|
|
14
|
-
inline = input(false, { transform: booleanAttribute });
|
|
15
|
-
inset = input(false, { transform: booleanAttribute });
|
|
16
|
-
size = input<"sm" | "lg">();
|
|
17
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
18
|
-
buttonStyle = input<string>();
|
|
19
|
-
buttonClass = input<string>();
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## `SdAnchorControl`
|
|
24
|
-
|
|
25
|
-
Inline anchor/link-style clickable element.
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
@Component({ selector: "sd-anchor" })
|
|
29
|
-
class SdAnchorControl {
|
|
30
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
31
|
-
theme = input<"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray">("primary");
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## `SdAdditionalButtonControl`
|
|
36
|
-
|
|
37
|
-
Layout component that renders main content and button/anchor slots side by side.
|
|
38
|
-
|
|
39
|
-
```typescript
|
|
40
|
-
@Component({ selector: "sd-additional-button" })
|
|
41
|
-
class SdAdditionalButtonControl {
|
|
42
|
-
size = input<"sm" | "lg">();
|
|
43
|
-
inset = input(false, { transform: booleanAttribute });
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## `SdModalSelectButtonControl`
|
|
48
|
-
|
|
49
|
-
Button that opens a selection modal. Manages value/selectedItems state.
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
@Component({ selector: "sd-modal-select-button" })
|
|
53
|
-
class SdModalSelectButtonControl {
|
|
54
|
-
selectMode = input<"single" | "multi">("single");
|
|
55
|
-
value = model<TSelectModeValue<any>>();
|
|
56
|
-
selectedItems = model<Record<string, unknown>[]>([]);
|
|
57
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
58
|
-
required = input(false, { transform: booleanAttribute });
|
|
59
|
-
modal = input<TSdSelectModalInfo<any>>();
|
|
60
|
-
modalOptions = input<ISdModalOptions>();
|
|
61
|
-
size = input<"sm" | "lg">();
|
|
62
|
-
inset = input(false, { transform: booleanAttribute });
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## `ISdSelectModal`
|
|
67
|
-
|
|
68
|
-
Contract for modal components used with select buttons. Extends `ISdModal`.
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
interface ISdSelectModal<T> extends ISdModal<ISelectModalOutputResult<T>> {
|
|
72
|
-
selectMode: InputSignal<"single" | "multi">;
|
|
73
|
-
selectedItemKeys: InputSignal<T[]>;
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## `ISelectModalOutputResult`
|
|
78
|
-
|
|
79
|
-
```typescript
|
|
80
|
-
interface ISelectModalOutputResult<T> {
|
|
81
|
-
selectedItemKeys: T[];
|
|
82
|
-
selectedItems: Record<string, unknown>[];
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
| Field | Type | Description |
|
|
87
|
-
|-------|------|-------------|
|
|
88
|
-
| `selectedItemKeys` | `T[]` | Selected item keys |
|
|
89
|
-
| `selectedItems` | `Record<string, unknown>[]` | Selected item objects |
|
|
90
|
-
|
|
91
|
-
## `TSdSelectModalInfo`
|
|
92
|
-
|
|
93
|
-
Type alias for `ISdModalInfo` with `selectMode`/`selectedItemKeys` omitted from inputs.
|
|
94
|
-
|
|
95
|
-
```typescript
|
|
96
|
-
type TSdSelectModalInfo<T extends ISdSelectModal<any>> = ISdModalInfo<T>; // with selectMode/selectedItemKeys excluded
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## `SdTextfieldControl`
|
|
100
|
-
|
|
101
|
-
Versatile text input supporting multiple types (text, number, date, datetime, color, etc.).
|
|
102
|
-
|
|
103
|
-
```typescript
|
|
104
|
-
@Component({ selector: "sd-textfield" })
|
|
105
|
-
class SdTextfieldControl<K extends keyof TSdTextfieldTypes> {
|
|
106
|
-
value = model<TSdTextfieldTypes[K]>();
|
|
107
|
-
type = input.required<K>();
|
|
108
|
-
placeholder = input<string>();
|
|
109
|
-
title = input<string>();
|
|
110
|
-
inputStyle = input<string>();
|
|
111
|
-
inputClass = input<string>();
|
|
112
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
113
|
-
readonly = input(false, { transform: booleanAttribute });
|
|
114
|
-
required = input(false, { transform: booleanAttribute });
|
|
115
|
-
min = input<TSdTextfieldTypes[K]>();
|
|
116
|
-
max = input<TSdTextfieldTypes[K]>();
|
|
117
|
-
minlength = input<number>();
|
|
118
|
-
maxlength = input<number>();
|
|
119
|
-
pattern = input<string>();
|
|
120
|
-
validatorFn = input<(value: TSdTextfieldTypes[K] | undefined) => string | undefined>();
|
|
121
|
-
format = input<string>();
|
|
122
|
-
step = input<number>();
|
|
123
|
-
autocomplete = input<string>();
|
|
124
|
-
useNumberComma = input(true, { transform: booleanAttribute });
|
|
125
|
-
minDigits = input<number>();
|
|
126
|
-
inline = input(false, { transform: booleanAttribute });
|
|
127
|
-
inset = input(false, { transform: booleanAttribute });
|
|
128
|
-
size = input<"sm" | "lg">();
|
|
129
|
-
theme = input<"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray">();
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## `TSdTextfieldTypes`
|
|
134
|
-
|
|
135
|
-
Maps type keys to their value types.
|
|
136
|
-
|
|
137
|
-
```typescript
|
|
138
|
-
type TSdTextfieldTypes = {
|
|
139
|
-
"number": number;
|
|
140
|
-
"text": string;
|
|
141
|
-
"password": string;
|
|
142
|
-
"color": string;
|
|
143
|
-
"email": string;
|
|
144
|
-
"format": string;
|
|
145
|
-
"date": DateOnly;
|
|
146
|
-
"month": DateOnly;
|
|
147
|
-
"year": DateOnly;
|
|
148
|
-
"datetime": DateTime;
|
|
149
|
-
"datetime-sec": DateTime;
|
|
150
|
-
"time": Time;
|
|
151
|
-
"time-sec": Time;
|
|
152
|
-
};
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
## `sdTextfieldTypes`
|
|
156
|
-
|
|
157
|
-
Ordered array of all textfield type keys.
|
|
158
|
-
|
|
159
|
-
```typescript
|
|
160
|
-
const sdTextfieldTypes: (keyof TSdTextfieldTypes)[];
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## `SdTextareaControl`
|
|
164
|
-
|
|
165
|
-
Multi-line text input with auto-growing row count.
|
|
166
|
-
|
|
167
|
-
```typescript
|
|
168
|
-
@Component({ selector: "sd-textarea" })
|
|
169
|
-
class SdTextareaControl {
|
|
170
|
-
value = model<string>();
|
|
171
|
-
placeholder = input<string>();
|
|
172
|
-
title = input<string>();
|
|
173
|
-
minRows = input<number>(1);
|
|
174
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
175
|
-
readonly = input(false, { transform: booleanAttribute });
|
|
176
|
-
required = input(false, { transform: booleanAttribute });
|
|
177
|
-
inline = input(false, { transform: booleanAttribute });
|
|
178
|
-
inset = input(false, { transform: booleanAttribute });
|
|
179
|
-
size = input<"sm" | "lg">();
|
|
180
|
-
validatorFn = input<(value: string | undefined) => string | undefined>();
|
|
181
|
-
theme = input<"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray">();
|
|
182
|
-
inputStyle = input<string>();
|
|
183
|
-
inputClass = input<string>();
|
|
184
|
-
}
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## `SdNumpadControl`
|
|
188
|
-
|
|
189
|
-
Numeric keypad with on-screen buttons for digit input.
|
|
190
|
-
|
|
191
|
-
```typescript
|
|
192
|
-
@Component({ selector: "sd-numpad" })
|
|
193
|
-
class SdNumpadControl {
|
|
194
|
-
value = model<number>();
|
|
195
|
-
text = signal<string | undefined>(undefined);
|
|
196
|
-
placeholder = input<string>();
|
|
197
|
-
required = input(false, { transform: booleanAttribute });
|
|
198
|
-
inputDisabled = input(false, { transform: booleanAttribute });
|
|
199
|
-
useEnterButton = input(false, { transform: booleanAttribute });
|
|
200
|
-
useMinusButton = input(false, { transform: booleanAttribute });
|
|
201
|
-
enterButtonClick = output();
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## `SdRangeControl`
|
|
206
|
-
|
|
207
|
-
From/to range input using two `SdTextfieldControl` instances. The `to` field's `min` is automatically bound to `from`.
|
|
208
|
-
|
|
209
|
-
```typescript
|
|
210
|
-
@Component({ selector: "sd-range" })
|
|
211
|
-
class SdRangeControl<K extends keyof TSdTextfieldTypes> {
|
|
212
|
-
from = model<TSdTextfieldTypes[K]>();
|
|
213
|
-
to = model<TSdTextfieldTypes[K]>();
|
|
214
|
-
type = input.required<K>();
|
|
215
|
-
inputStyle = input<string>();
|
|
216
|
-
required = input(false, { transform: booleanAttribute });
|
|
217
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
218
|
-
}
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
## `SdDateRangePicker`
|
|
222
|
-
|
|
223
|
-
Date range picker with period type selector (day/month/range).
|
|
224
|
-
|
|
225
|
-
```typescript
|
|
226
|
-
@Component({ selector: "sd-date-range-picker" })
|
|
227
|
-
class SdDateRangePicker {
|
|
228
|
-
periodType = model<"일" | "월" | "범위">("범위");
|
|
229
|
-
from = model<DateOnly>();
|
|
230
|
-
to = model<DateOnly>();
|
|
231
|
-
required = input(false, { transform: booleanAttribute });
|
|
232
|
-
}
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
## `SdStatePresetControl`
|
|
236
|
-
|
|
237
|
-
Save/restore named state presets via system config.
|
|
238
|
-
|
|
239
|
-
```typescript
|
|
240
|
-
@Component({ selector: "sd-state-preset" })
|
|
241
|
-
class SdStatePresetControl {
|
|
242
|
-
key = input.required<string>();
|
|
243
|
-
state = model<any>();
|
|
244
|
-
size = input<"sm" | "lg">();
|
|
245
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
## `ISdStatePreset`
|
|
249
|
-
|
|
250
|
-
```typescript
|
|
251
|
-
interface ISdStatePreset {
|
|
252
|
-
name: string;
|
|
253
|
-
state: any;
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
| Field | Type | Description |
|
|
258
|
-
|-------|------|-------------|
|
|
259
|
-
| `name` | `string` | Preset display name |
|
|
260
|
-
| `state` | `any` | Serialized state data |
|
|
261
|
-
|
|
262
|
-
## `SdCheckboxControl`
|
|
263
|
-
|
|
264
|
-
Checkbox with optional radio style, theming, and async change guard.
|
|
265
|
-
|
|
266
|
-
```typescript
|
|
267
|
-
@Component({ selector: "sd-checkbox" })
|
|
268
|
-
class SdCheckboxControl {
|
|
269
|
-
value = model(false);
|
|
270
|
-
canChangeFn = input<(item: boolean) => boolean | Promise<boolean>>(() => true);
|
|
271
|
-
icon = input(tablerCheck);
|
|
272
|
-
radio = input(false, { transform: booleanAttribute });
|
|
273
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
274
|
-
size = input<"sm" | "lg">();
|
|
275
|
-
inline = input(false, { transform: booleanAttribute });
|
|
276
|
-
inset = input(false, { transform: booleanAttribute });
|
|
277
|
-
theme = input<"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray" | "white">();
|
|
278
|
-
contentStyle = input<string>();
|
|
279
|
-
}
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
## `SdSwitchControl`
|
|
283
|
-
|
|
284
|
-
Toggle switch.
|
|
285
|
-
|
|
286
|
-
```typescript
|
|
287
|
-
@Component({ selector: "sd-switch" })
|
|
288
|
-
class SdSwitchControl {
|
|
289
|
-
value = model(false);
|
|
290
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
291
|
-
inline = input(false, { transform: booleanAttribute });
|
|
292
|
-
inset = input(false, { transform: booleanAttribute });
|
|
293
|
-
size = input<"sm" | "lg">();
|
|
294
|
-
theme = input<"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray">();
|
|
295
|
-
}
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
## `SdCheckboxGroupControl`
|
|
299
|
-
|
|
300
|
-
Container for a group of checkbox items. Manages a `T[]` value.
|
|
301
|
-
|
|
302
|
-
```typescript
|
|
303
|
-
@Component({ selector: "sd-checkbox-group" })
|
|
304
|
-
class SdCheckboxGroupControl<T> {
|
|
305
|
-
value = model<T[]>([]);
|
|
306
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
307
|
-
}
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## `SdCheckboxGroupItemControl`
|
|
311
|
-
|
|
312
|
-
Individual item within a `SdCheckboxGroupControl`. Toggles its value in the parent group's array.
|
|
313
|
-
|
|
314
|
-
```typescript
|
|
315
|
-
@Component({ selector: "sd-checkbox-group-item" })
|
|
316
|
-
class SdCheckboxGroupItemControl<T> {
|
|
317
|
-
value = input.required<T>();
|
|
318
|
-
inline = input(false, { transform: booleanAttribute });
|
|
319
|
-
isSelected = computed(/* whether value is in parent group */);
|
|
320
|
-
}
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
## `SdTiptapEditorControl`
|
|
324
|
-
|
|
325
|
-
Rich text editor powered by TipTap. Supports formatting commands, color picker, and custom extensions.
|
|
326
|
-
|
|
327
|
-
```typescript
|
|
328
|
-
@Component({ selector: "sd-tiptap-editor" })
|
|
329
|
-
class SdTiptapEditorControl {
|
|
330
|
-
value = model<string>();
|
|
331
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
332
|
-
readonly = input(false, { transform: booleanAttribute });
|
|
333
|
-
required = input(false, { transform: booleanAttribute });
|
|
334
|
-
placeholder = input<string>();
|
|
335
|
-
validatorFn = input<(value: string | undefined) => string | undefined>();
|
|
336
|
-
extensions = input<AnyExtension[]>();
|
|
337
|
-
|
|
338
|
-
colorPresets: string[];
|
|
339
|
-
editor: WritableSignal<Editor | undefined>;
|
|
340
|
-
execCmd(cmd: string): void;
|
|
341
|
-
toggleColorPicker(mode: "text" | "bg"): void;
|
|
342
|
-
applyColor(color: string | undefined): void;
|
|
343
|
-
}
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
Available commands for `execCmd`: `"bold"`, `"italic"`, `"underline"`, `"strike"`, `"h1"`, `"h2"`, `"bulletList"`, `"orderedList"`, `"indent"`, `"outdent"`, `"blockquote"`, `"codeBlock"`, `"alignLeft"`, `"alignCenter"`, `"alignRight"`, `"alignJustify"`, `"clean"`.
|
|
347
|
-
|
|
348
|
-
## `SdSelectControl`
|
|
349
|
-
|
|
350
|
-
Dropdown select with single/multi mode, tree hierarchy, and programmatic item rendering.
|
|
351
|
-
|
|
352
|
-
```typescript
|
|
353
|
-
@Component({ selector: "sd-select" })
|
|
354
|
-
class SdSelectControl<T> {
|
|
355
|
-
value = model<TSelectModeValue<T>>();
|
|
356
|
-
selectMode = input<"single" | "multi">("single");
|
|
357
|
-
placeholder = input<string>();
|
|
358
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
359
|
-
inline = input(false, { transform: booleanAttribute });
|
|
360
|
-
inset = input(false, { transform: booleanAttribute });
|
|
361
|
-
size = input<"sm" | "lg">();
|
|
362
|
-
required = input(false, { transform: booleanAttribute });
|
|
363
|
-
hideSelectAll = input(false, { transform: booleanAttribute });
|
|
364
|
-
multiSelectionDisplayDirection = input<"vertical">();
|
|
365
|
-
items = input<T[]>();
|
|
366
|
-
getChildrenFn = input<(item: T) => T[] | undefined>();
|
|
367
|
-
contentClass = input<string>();
|
|
368
|
-
contentStyle = input<string>();
|
|
369
|
-
|
|
370
|
-
selectItem(itemValue: T): void;
|
|
371
|
-
toggleItem(itemValue: T): void;
|
|
372
|
-
onSelectAll(): void;
|
|
373
|
-
onDeselectAll(): void;
|
|
374
|
-
closeDropdown(): void;
|
|
375
|
-
openDropdown(): void;
|
|
376
|
-
}
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
Content templates: `#headerTpl`, `#beforeTpl`, `SdItemOfTemplateDirective`.
|
|
380
|
-
|
|
381
|
-
## `TSelectModeValue`
|
|
382
|
-
|
|
383
|
-
```typescript
|
|
384
|
-
type TSelectModeValue<T> = T | T[] | undefined;
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
## `SdSelectItemControl`
|
|
388
|
-
|
|
389
|
-
Individual option within `SdSelectControl`.
|
|
390
|
-
|
|
391
|
-
```typescript
|
|
392
|
-
@Component({ selector: "sd-select-item" })
|
|
393
|
-
class SdSelectItemControl<T> {
|
|
394
|
-
value = input.required<T>();
|
|
395
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
396
|
-
hidden = input(false, { transform: booleanAttribute });
|
|
397
|
-
isSelected = computed(/* whether value matches parent select's value */);
|
|
398
|
-
}
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
## `SdSelectButtonControl`
|
|
402
|
-
|
|
403
|
-
Slot-projected button rendered inside `sd-select` beside the trigger.
|
|
404
|
-
|
|
405
|
-
```typescript
|
|
406
|
-
@Component({ selector: "sd-select-button" })
|
|
407
|
-
class SdSelectButtonControl { }
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
## `SdFormControl`
|
|
411
|
-
|
|
412
|
-
Form container with submit/invalid event handling.
|
|
413
|
-
|
|
414
|
-
```typescript
|
|
415
|
-
@Component({ selector: "sd-form" })
|
|
416
|
-
class SdFormControl {
|
|
417
|
-
formSubmit = output<SubmitEvent>();
|
|
418
|
-
formInvalid = output();
|
|
419
|
-
requestSubmit(): void;
|
|
420
|
-
}
|
|
421
|
-
```
|