@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.
Files changed (50) hide show
  1. package/lib/blocks/lens/components/LensFormFilterCondition.vue +2 -1
  2. package/lib/blocks/lens/components/LensFormFilterGroup.vue +1 -1
  3. package/lib/blocks/lens/components/{LensAvatarInput.vue → LensInputAvatar.vue} +5 -3
  4. package/lib/blocks/lens/components/LensInputDropdown.vue +102 -0
  5. package/lib/blocks/lens/components/LensSheetAvatarField.vue +2 -2
  6. package/lib/blocks/lens/components/LensTableEditableCell.vue +5 -4
  7. package/lib/blocks/lens/fields/AvatarField.ts +2 -2
  8. package/lib/blocks/lens/fields/Field.ts +10 -6
  9. package/lib/blocks/lens/filter-inputs/SelectFilterInput.ts +2 -1
  10. package/lib/components/SButton.vue +2 -10
  11. package/lib/components/SControlInputSearch.vue +6 -3
  12. package/lib/components/SDescPill.vue +3 -2
  13. package/lib/components/SDescState.vue +3 -2
  14. package/lib/components/SInputAddon.vue +4 -2
  15. package/lib/components/SInputAsyncDropdown.vue +761 -0
  16. package/lib/components/SInputBase.vue +1 -3
  17. package/lib/components/SInputCheckbox.vue +10 -18
  18. package/lib/components/SInputCheckboxes.vue +16 -33
  19. package/lib/components/SInputDate.vue +10 -20
  20. package/lib/components/SInputDropdown.vue +22 -43
  21. package/lib/components/SInputDropdownItem.vue +10 -27
  22. package/lib/components/SInputFile.vue +10 -18
  23. package/lib/components/SInputFileUpload.vue +12 -34
  24. package/lib/components/SInputFileUploadItem.vue +7 -21
  25. package/lib/components/SInputHMS.vue +6 -7
  26. package/lib/components/SInputImage.vue +11 -16
  27. package/lib/components/SInputNumber.vue +1 -3
  28. package/lib/components/SInputRadio.vue +9 -19
  29. package/lib/components/SInputRadios.vue +18 -40
  30. package/lib/components/SInputSegments.vue +15 -26
  31. package/lib/components/SInputSegmentsOption.vue +7 -7
  32. package/lib/components/SInputSelect.vue +14 -19
  33. package/lib/components/SInputSwitch.vue +10 -19
  34. package/lib/components/SInputSwitches.vue +16 -30
  35. package/lib/components/SInputText.vue +1 -4
  36. package/lib/components/SInputTextarea.vue +0 -2
  37. package/lib/components/SInputYMD.vue +6 -7
  38. package/lib/components/SPagination.vue +1 -1
  39. package/lib/components/SPill.vue +2 -2
  40. package/lib/components/SState.vue +2 -2
  41. package/lib/components/STableCellPill.vue +3 -2
  42. package/lib/components/STableCellState.vue +3 -2
  43. package/lib/composables/Table.ts +8 -15
  44. package/lib/support/Color.ts +4 -0
  45. package/lib/support/InputBase.ts +5 -0
  46. package/lib/support/InputDropdown.ts +15 -0
  47. package/lib/support/InputFileUpload.ts +22 -0
  48. package/lib/support/InputOption.ts +8 -0
  49. package/lib/support/InputText.ts +6 -0
  50. package/package.json +1 -1
@@ -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?: 'left' | 'center' | 'right'
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?: 'left' | 'center' | 'right'
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 = ColorModes | 'soft'
135
+ export type TableCellValueColor = ColorMode | 'soft'
143
136
 
144
137
  export interface TableCellDay extends TableCellBase {
145
138
  type: 'day'
146
- align?: 'left' | 'center' | 'right'
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 = ColorModes
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?: ColorModes
203
+ mode?: ColorMode
211
204
  }
212
205
 
213
206
  export interface TableCellIndicator extends TableCellBase {
@@ -0,0 +1,4 @@
1
+ // The semantic color modes shared by the colored components (SButton, SPill,
2
+ // SState, SInputSegments, and table cells).
3
+
4
+ export type ColorMode = 'default' | 'mute' | 'neutral' | 'info' | 'success' | 'warning' | 'danger'
@@ -0,0 +1,5 @@
1
+ // The size and color scales shared by SInputBase and every input built on it.
2
+
3
+ export type Size = 'sm' | 'md' | 'mini' | 'small' | 'medium'
4
+
5
+ export type Color = 'neutral' | 'mute' | 'info' | 'success' | 'warning' | 'danger'
@@ -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,8 @@
1
+ // The label + value option shape shared by the choice-list inputs (SInputSelect,
2
+ // SInputCheckboxes, SInputRadios, SInputSegments, SInputSwitches).
3
+
4
+ export interface Option<T = any> {
5
+ label: string
6
+ value: T
7
+ disabled?: boolean
8
+ }
@@ -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'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
- "version": "4.56.0",
3
+ "version": "4.58.0",
4
4
  "description": "Vue Components for Global Brain Design System.",
5
5
  "keywords": [
6
6
  "components",