@globalbrain/sefirot 4.56.0 → 4.58.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/lib/blocks/lens/components/LensFormFilterCondition.vue +2 -1
- package/lib/blocks/lens/components/LensFormFilterGroup.vue +1 -1
- package/lib/blocks/lens/components/{LensAvatarInput.vue → LensInputAvatar.vue} +5 -3
- package/lib/blocks/lens/components/LensInputDropdown.vue +102 -0
- package/lib/blocks/lens/components/LensSheetAvatarField.vue +2 -2
- package/lib/blocks/lens/components/LensTableEditableCell.vue +5 -4
- package/lib/blocks/lens/fields/AvatarField.ts +2 -2
- package/lib/blocks/lens/fields/Field.ts +10 -6
- package/lib/blocks/lens/filter-inputs/SelectFilterInput.ts +2 -1
- package/lib/components/SButton.vue +2 -10
- package/lib/components/SControlInputSearch.vue +6 -3
- package/lib/components/SDescPill.vue +3 -2
- package/lib/components/SDescState.vue +3 -2
- package/lib/components/SInputAddon.vue +4 -2
- package/lib/components/SInputAsyncDropdown.vue +761 -0
- package/lib/components/SInputBase.vue +1 -3
- package/lib/components/SInputCheckbox.vue +10 -18
- package/lib/components/SInputCheckboxes.vue +16 -33
- package/lib/components/SInputDate.vue +10 -20
- package/lib/components/SInputDropdown.vue +22 -43
- package/lib/components/SInputDropdownItem.vue +10 -27
- package/lib/components/SInputFile.vue +10 -18
- package/lib/components/SInputFileUpload.vue +12 -34
- package/lib/components/SInputFileUploadItem.vue +7 -21
- package/lib/components/SInputHMS.vue +6 -7
- package/lib/components/SInputImage.vue +11 -16
- package/lib/components/SInputNumber.vue +1 -3
- package/lib/components/SInputRadio.vue +9 -19
- package/lib/components/SInputRadios.vue +18 -40
- package/lib/components/SInputSegments.vue +15 -26
- package/lib/components/SInputSegmentsOption.vue +7 -7
- package/lib/components/SInputSelect.vue +14 -19
- package/lib/components/SInputSwitch.vue +10 -19
- package/lib/components/SInputSwitches.vue +16 -30
- package/lib/components/SInputText.vue +1 -4
- package/lib/components/SInputTextarea.vue +0 -2
- package/lib/components/SInputYMD.vue +6 -7
- package/lib/components/SPagination.vue +1 -1
- package/lib/components/SPill.vue +2 -2
- package/lib/components/SState.vue +2 -2
- package/lib/components/STableCellPill.vue +3 -2
- package/lib/components/STableCellState.vue +3 -2
- package/lib/composables/Table.ts +8 -15
- package/lib/support/Color.ts +4 -0
- package/lib/support/InputBase.ts +5 -0
- package/lib/support/InputDropdown.ts +15 -0
- package/lib/support/InputFileUpload.ts +22 -0
- package/lib/support/InputOption.ts +8 -0
- package/lib/support/InputText.ts +6 -0
- package/package.json +1 -1
package/lib/composables/Table.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type Component, type MaybeRef, type MaybeRefOrGetter } from 'vue'
|
|
2
2
|
import { type Mode as ButtonMode } from '../components/SButton.vue'
|
|
3
3
|
import { type State as IndicatorState } from '../components/SIndicator.vue'
|
|
4
|
+
import { type ColorMode } from '../support/Color'
|
|
4
5
|
import { type Day } from '../support/Day'
|
|
6
|
+
import { type Align } from '../support/InputText'
|
|
5
7
|
import { type DropdownSection } from './Dropdown'
|
|
6
8
|
import { type Position } from './Tooltip'
|
|
7
9
|
|
|
@@ -85,22 +87,13 @@ export type TableCellType =
|
|
|
85
87
|
| 'component'
|
|
86
88
|
| 'actions'
|
|
87
89
|
|
|
88
|
-
export type ColorModes =
|
|
89
|
-
| 'default'
|
|
90
|
-
| 'mute'
|
|
91
|
-
| 'neutral'
|
|
92
|
-
| 'info'
|
|
93
|
-
| 'success'
|
|
94
|
-
| 'warning'
|
|
95
|
-
| 'danger'
|
|
96
|
-
|
|
97
90
|
export interface TableCellBase {
|
|
98
91
|
type: TableCellType
|
|
99
92
|
}
|
|
100
93
|
|
|
101
94
|
export interface TableCellText<V = any, R = any> extends TableCellBase {
|
|
102
95
|
type: 'text'
|
|
103
|
-
align?:
|
|
96
|
+
align?: Align
|
|
104
97
|
icon?: Component
|
|
105
98
|
value?: string | null
|
|
106
99
|
link?: string | null
|
|
@@ -111,7 +104,7 @@ export interface TableCellText<V = any, R = any> extends TableCellBase {
|
|
|
111
104
|
|
|
112
105
|
export interface TableCellNumber<V = any, R = any> extends TableCellBase {
|
|
113
106
|
type: 'number'
|
|
114
|
-
align?:
|
|
107
|
+
align?: Align
|
|
115
108
|
icon?: Component
|
|
116
109
|
value?: number | null
|
|
117
110
|
separator?: boolean
|
|
@@ -139,11 +132,11 @@ export interface TableCellPathSegment {
|
|
|
139
132
|
onClick?(): void
|
|
140
133
|
}
|
|
141
134
|
|
|
142
|
-
export type TableCellValueColor =
|
|
135
|
+
export type TableCellValueColor = ColorMode | 'soft'
|
|
143
136
|
|
|
144
137
|
export interface TableCellDay extends TableCellBase {
|
|
145
138
|
type: 'day'
|
|
146
|
-
align?:
|
|
139
|
+
align?: Align
|
|
147
140
|
value?: Day | null
|
|
148
141
|
format?: string
|
|
149
142
|
color?: 'neutral' | 'soft' | 'mute'
|
|
@@ -155,7 +148,7 @@ export interface TableCellPill extends TableCellBase {
|
|
|
155
148
|
color?: TableCellPillColor
|
|
156
149
|
}
|
|
157
150
|
|
|
158
|
-
export type TableCellPillColor =
|
|
151
|
+
export type TableCellPillColor = ColorMode
|
|
159
152
|
|
|
160
153
|
export interface TableCellPills extends TableCellBase {
|
|
161
154
|
type: 'pills'
|
|
@@ -207,7 +200,7 @@ export interface TableCellComponent extends TableCellBase {
|
|
|
207
200
|
export interface TableCellState extends TableCellBase {
|
|
208
201
|
type: 'state'
|
|
209
202
|
label: string
|
|
210
|
-
mode?:
|
|
203
|
+
mode?: ColorMode
|
|
211
204
|
}
|
|
212
205
|
|
|
213
206
|
export interface TableCellIndicator extends TableCellBase {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// The dropdown option (text or avatar row) shared by SInputDropdown and
|
|
2
|
+
// SInputAsyncDropdown — the base choice option (InputOption) plus a render type.
|
|
3
|
+
|
|
4
|
+
import { type Option as BaseOption } from './InputOption'
|
|
5
|
+
|
|
6
|
+
export type Option<T = any> = OptionText<T> | OptionAvatar<T>
|
|
7
|
+
|
|
8
|
+
export interface OptionText<T = any> extends BaseOption<T> {
|
|
9
|
+
type?: 'text'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface OptionAvatar<T = any> extends BaseOption<T> {
|
|
13
|
+
type: 'avatar'
|
|
14
|
+
image?: string | null
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// The file/action shapes shared by SInputFileUpload and its item child.
|
|
2
|
+
|
|
3
|
+
import { type Component } from 'vue'
|
|
4
|
+
import { type Mode as ButtonMode } from '../components/SButton.vue'
|
|
5
|
+
import { type State as IndicatorState } from '../components/SIndicator.vue'
|
|
6
|
+
|
|
7
|
+
export interface FileObject {
|
|
8
|
+
file: File
|
|
9
|
+
indicatorState?: IndicatorState | null
|
|
10
|
+
canRemove?: boolean
|
|
11
|
+
action?: Action | null
|
|
12
|
+
errorMessage?: string | null
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Action {
|
|
16
|
+
mode?: ButtonMode
|
|
17
|
+
icon?: Component
|
|
18
|
+
leadIcon?: Component
|
|
19
|
+
trailIcon?: Component
|
|
20
|
+
label?: string
|
|
21
|
+
onClick(): void
|
|
22
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// The text alignment and color scales shared by SInputText / SInputNumber (and
|
|
2
|
+
// anything that mirrors them, e.g. SPagination's align).
|
|
3
|
+
|
|
4
|
+
export type Align = 'left' | 'center' | 'right'
|
|
5
|
+
|
|
6
|
+
export type TextColor = 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|