@superblocksteam/library 2.0.0-next.11 → 2.0.0-next.111

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 (125) hide show
  1. package/dist/{allPaths-DXE_RTrt.js → allPaths-C9t-oueG.js} +2 -2
  2. package/dist/{allPaths-DXE_RTrt.js.map → allPaths-C9t-oueG.js.map} +1 -1
  3. package/dist/{allPaths-h7bsheRo.js → allPaths-v-9aWvcC.js} +2 -2
  4. package/dist/{allPaths-h7bsheRo.js.map → allPaths-v-9aWvcC.js.map} +1 -1
  5. package/dist/{allPathsLoader-16QM90xQ.js → allPathsLoader-C12f21WG.js} +3 -3
  6. package/dist/{allPathsLoader-BWX35Jie.js.map → allPathsLoader-C12f21WG.js.map} +1 -1
  7. package/dist/{allPathsLoader-BWX35Jie.js → allPathsLoader-ptt7LSRI.js} +3 -3
  8. package/dist/{allPathsLoader-16QM90xQ.js.map → allPathsLoader-ptt7LSRI.js.map} +1 -1
  9. package/dist/{index-tdErpvtu.js → index-Dmuv9J5-.js} +27437 -20439
  10. package/dist/{index-tdErpvtu.js.map → index-Dmuv9J5-.js.map} +1 -1
  11. package/dist/index.css +2 -1
  12. package/dist/index.js +2 -2
  13. package/dist/{splitPathsBySizeLoader-wQWCogRx.js → splitPathsBySizeLoader-C9M7hrZo.js} +2 -2
  14. package/dist/{splitPathsBySizeLoader-wQWCogRx.js.map → splitPathsBySizeLoader-C9M7hrZo.js.map} +1 -1
  15. package/dist/{splitPathsBySizeLoader-7yhv4gcq.js → splitPathsBySizeLoader-yx8MCpqw.js} +2 -2
  16. package/dist/{splitPathsBySizeLoader-7yhv4gcq.js.map → splitPathsBySizeLoader-yx8MCpqw.js.map} +1 -1
  17. package/dist-types/edit-mode/create-component.d.ts +3 -1
  18. package/dist-types/edit-mode/default-table-data.d.ts +71 -0
  19. package/dist-types/edit-mode/dnd/grid-store.d.ts +29 -4
  20. package/dist-types/edit-mode/dnd/utils.d.ts +11 -10
  21. package/dist-types/edit-mode/features/connection-manager.d.ts +1 -2
  22. package/dist-types/edit-mode/features/interaction-layer-manager.d.ts +10 -4
  23. package/dist-types/edit-mode/features/operation-store.d.ts +12 -2
  24. package/dist-types/edit-mode/features/properties-panel-manager.d.ts +4 -4
  25. package/dist-types/edit-mode/features/resizing-store.d.ts +1 -0
  26. package/dist-types/edit-mode/interaction-utils.d.ts +4 -0
  27. package/dist-types/edit-mode/source-update-api.d.ts +3 -20
  28. package/dist-types/internal-testing/components/form.d.ts +1 -0
  29. package/dist-types/lib/internal-details/component-suspense-style-context.d.ts +10 -0
  30. package/dist-types/lib/internal-details/css-constants.d.ts +4 -0
  31. package/dist-types/lib/internal-details/identifier-normalizer.d.ts +0 -1
  32. package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +7 -5
  33. package/dist-types/lib/internal-details/lib/evaluator/compute-engines.d.ts +2 -1
  34. package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +12 -1
  35. package/dist-types/lib/internal-details/lib/features/api-store.d.ts +1 -0
  36. package/dist-types/lib/internal-details/lib/features/api-utils.d.ts +0 -1
  37. package/dist-types/lib/internal-details/lib/suspense/suspense-fallback.d.ts +10 -0
  38. package/dist-types/lib/internal-details/lib/types.d.ts +5 -0
  39. package/dist-types/lib/internal-details/reactive-component.d.ts +4 -3
  40. package/dist-types/lib/internal-details/remove-bindings.d.ts +1 -0
  41. package/dist-types/lib/internal-details/scope/global.d.ts +1 -0
  42. package/dist-types/lib/user-facing/component-base/components/button.d.ts +3 -4
  43. package/dist-types/lib/user-facing/component-base/components/video.d.ts +19 -0
  44. package/dist-types/lib/user-facing/component-base/styles/button-styles.d.ts +3 -11
  45. package/dist-types/lib/user-facing/component-base/utils/input-validation.d.ts +11 -8
  46. package/dist-types/lib/user-facing/components/button/index.d.ts +2 -2
  47. package/dist-types/lib/user-facing/components/button/props.d.ts +5 -11
  48. package/dist-types/lib/user-facing/components/checkbox/index.d.ts +1 -1
  49. package/dist-types/lib/user-facing/components/checkbox/props.d.ts +1 -1
  50. package/dist-types/lib/user-facing/components/column/index.d.ts +9 -21
  51. package/dist-types/lib/user-facing/components/column/props.d.ts +9 -20
  52. package/dist-types/lib/user-facing/components/container/index.d.ts +13 -24
  53. package/dist-types/lib/user-facing/components/container/props.d.ts +8 -22
  54. package/dist-types/lib/user-facing/components/date-picker/date-picker-component.d.ts +3 -3
  55. package/dist-types/lib/user-facing/components/date-picker/index.d.ts +6 -1
  56. package/dist-types/lib/user-facing/components/date-picker/props.d.ts +6 -1
  57. package/dist-types/lib/user-facing/components/date-picker/types.d.ts +3 -0
  58. package/dist-types/lib/user-facing/components/date-picker/utils.d.ts +1 -1
  59. package/dist-types/lib/user-facing/components/dropdown/dropdown-component.d.ts +1 -1
  60. package/dist-types/lib/user-facing/components/dropdown/index.d.ts +3 -3
  61. package/dist-types/lib/user-facing/components/dropdown/props.d.ts +5 -6
  62. package/dist-types/lib/user-facing/components/dropdown/types.d.ts +1 -1
  63. package/dist-types/lib/user-facing/components/grid/index.d.ts +8 -8
  64. package/dist-types/lib/user-facing/components/icon/index.d.ts +1 -1
  65. package/dist-types/lib/user-facing/components/icon/props.d.ts +1 -1
  66. package/dist-types/lib/user-facing/components/image/index.d.ts +2 -2
  67. package/dist-types/lib/user-facing/components/image/props.d.ts +2 -2
  68. package/dist-types/lib/user-facing/components/input/derived-properties.d.ts +1 -1
  69. package/dist-types/lib/user-facing/components/input/index.d.ts +15 -21
  70. package/dist-types/lib/user-facing/components/input/props.d.ts +16 -21
  71. package/dist-types/lib/user-facing/components/key-value/props.d.ts +1 -0
  72. package/dist-types/lib/user-facing/components/modal/index.d.ts +11 -15
  73. package/dist-types/lib/user-facing/components/modal/modal-component.d.ts +2 -2
  74. package/dist-types/lib/user-facing/components/modal/props.d.ts +11 -15
  75. package/dist-types/lib/user-facing/components/page/index.d.ts +3 -0
  76. package/dist-types/lib/user-facing/components/page/props.d.ts +3 -0
  77. package/dist-types/lib/user-facing/components/pixel-input/index.d.ts +7 -0
  78. package/dist-types/lib/user-facing/components/section/index.d.ts +3 -2
  79. package/dist-types/lib/user-facing/components/section/props.d.ts +3 -2
  80. package/dist-types/lib/user-facing/components/slideout/props.d.ts +5 -1
  81. package/dist-types/lib/user-facing/components/stack/index.d.ts +5 -3
  82. package/dist-types/lib/user-facing/components/switch/index.d.ts +1 -1
  83. package/dist-types/lib/user-facing/components/switch/props.d.ts +1 -1
  84. package/dist-types/lib/user-facing/components/table/column-properties-panel.d.ts +72 -76
  85. package/dist-types/lib/user-facing/components/table/components/autotooltip-component.d.ts +2 -2
  86. package/dist-types/lib/user-facing/components/table/components/boolean-value-icons.d.ts +5 -5
  87. package/dist-types/lib/user-facing/components/table/components/edit-cell.d.ts +2 -2
  88. package/dist-types/lib/user-facing/components/table/components/edit-checkbox-cell.d.ts +2 -2
  89. package/dist-types/lib/user-facing/components/table/components/edit-date-cell.d.ts +2 -2
  90. package/dist-types/lib/user-facing/components/table/components/edit-input-cell.d.ts +2 -2
  91. package/dist-types/lib/user-facing/components/table/components/edit-multi-select-cell.d.ts +2 -2
  92. package/dist-types/lib/user-facing/components/table/components/edit-single-select-cell.d.ts +2 -2
  93. package/dist-types/lib/user-facing/components/table/components/edit-utils.d.ts +2 -2
  94. package/dist-types/lib/user-facing/components/table/components/editable-link-cell.d.ts +2 -2
  95. package/dist-types/lib/user-facing/components/table/components/popover-video.d.ts +1 -1
  96. package/dist-types/lib/user-facing/components/table/components/table-data-download.d.ts +2 -2
  97. package/dist-types/lib/user-facing/components/table/components/table-footer.d.ts +4 -4
  98. package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +3 -3
  99. package/dist-types/lib/user-facing/components/table/components/table-loading-state.d.ts +3 -3
  100. package/dist-types/lib/user-facing/components/table/components/table-pagination.d.ts +3 -3
  101. package/dist-types/lib/user-facing/components/table/components/table-tag.d.ts +5 -5
  102. package/dist-types/lib/user-facing/components/table/constants.d.ts +4 -24
  103. package/dist-types/lib/user-facing/components/table/derived-properties.d.ts +0 -1
  104. package/dist-types/lib/user-facing/components/table/index.d.ts +92 -96
  105. package/dist-types/lib/user-facing/components/table/props.d.ts +94 -99
  106. package/dist-types/lib/user-facing/components/table/table-component.d.ts +4 -4
  107. package/dist-types/lib/user-facing/components/table/table-styles.d.ts +3 -8
  108. package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +25 -20
  109. package/dist-types/lib/user-facing/components/table/table-widget.d.ts +2 -2
  110. package/dist-types/lib/user-facing/components/table/types.d.ts +47 -73
  111. package/dist-types/lib/user-facing/components/table/utils.d.ts +2 -2
  112. package/dist-types/lib/user-facing/components/text/index.d.ts +9 -8
  113. package/dist-types/lib/user-facing/components/text/props.d.ts +18 -15
  114. package/dist-types/lib/user-facing/components/text/utils.d.ts +6 -6
  115. package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +1 -0
  116. package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +4 -8
  117. package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +4 -4
  118. package/dist-types/lib/user-facing/properties-panel/mixins/layout-section.d.ts +15 -14
  119. package/dist-types/lib/user-facing/properties-panel/mixins/loading.d.ts +2 -0
  120. package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +6 -4
  121. package/dist-types/lib/user-facing/properties-panel/validators.d.ts +2 -1
  122. package/dist-types/lib/user-facing/state/sb-computed.d.ts +1 -1
  123. package/dist-types/lib/user-facing/themes/constants.d.ts +4 -2
  124. package/dist-types/lib/user-facing/themes/utils.d.ts +1 -2
  125. package/package.json +5 -3
@@ -1,11 +1,7 @@
1
1
  import type { IconPosition } from "../../icons/constants";
2
2
  import type { Dim, DimModes } from "@superblocksteam/library-shared";
3
3
  import type { TextStyleWithVariant, UserAccessibleTheme, PerCornerBorderRadius, PerSideBorder } from "@superblocksteam/library-shared/types";
4
- export declare enum PaginationTypes {
5
- NONE = "NONE",
6
- CLIENT_SIDE = "CLIENT_SIDE",
7
- SERVER_SIDE = "SERVER_SIDE"
8
- }
4
+ export type PaginationType = "none" | "client-side" | "server-side";
9
5
  export interface TableFilters {
10
6
  byColumn?: {
11
7
  [column: string]: ColumnFilter;
@@ -59,30 +55,25 @@ interface Condition2 {
59
55
  param1: any;
60
56
  param2: any;
61
57
  }
62
- export declare const CompactMode: {
63
- readonly SHORT: "SHORT";
64
- readonly DEFAULT: "DEFAULT";
65
- readonly TALL: "TALL";
66
- readonly VERY_SHORT: "VERY_SHORT";
58
+ export declare const RowDensity: {
59
+ readonly "extra-small": "extra-small";
60
+ readonly small: "small";
61
+ readonly medium: "medium";
62
+ readonly large: "large";
67
63
  };
68
- export type CompactMode = (typeof CompactMode)[keyof typeof CompactMode];
69
- export declare enum CellAlignmentTypes {
70
- LEFT = "LEFT",
71
- RIGHT = "RIGHT",
72
- CENTER = "CENTER"
73
- }
74
- export declare enum VerticalAlignmentTypes {
75
- TOP = "TOP",
76
- BOTTOM = "BOTTOM",
77
- CENTER = "CENTER"
78
- }
79
- export declare enum TextSizes {
80
- HEADING1 = "HEADING1",
81
- HEADING2 = "HEADING2",
82
- HEADING3 = "HEADING3",
83
- PARAGRAPH = "PARAGRAPH",
84
- PARAGRAPH2 = "PARAGRAPH2"
85
- }
64
+ export type RowDensity = (typeof RowDensity)[keyof typeof RowDensity];
65
+ export declare const HorizontalAlignment: {
66
+ readonly left: "left";
67
+ readonly right: "right";
68
+ readonly center: "center";
69
+ };
70
+ export type HorizontalAlignment = (typeof HorizontalAlignment)[keyof typeof HorizontalAlignment];
71
+ export declare const VerticalAlignment: {
72
+ readonly top: "top";
73
+ readonly bottom: "bottom";
74
+ readonly center: "center";
75
+ };
76
+ export type VerticalAlignment = (typeof VerticalAlignment)[keyof typeof VerticalAlignment];
86
77
  export declare enum EditInputType {
87
78
  Text = "TEXT",
88
79
  Number = "NUMBER",
@@ -91,12 +82,7 @@ export declare enum EditInputType {
91
82
  Checkbox = "CHECKBOX",
92
83
  Date = "DATE"
93
84
  }
94
- export declare enum BooleanStyleFalse {
95
- EMPTY = "EMPTY",
96
- CLOSE = "CLOSE",
97
- MINUS = "MINUS",
98
- EMPTY_CHECKBOX = "EMPTY_CHECKBOX"
99
- }
85
+ export type BooleanStyleFalse = "empty" | "close" | "minus" | "empty_checkbox";
100
86
  export declare enum ImageSize {
101
87
  Fixed = "FIXED",
102
88
  Fit = "FIT",
@@ -178,27 +164,18 @@ export declare const ColumnType: {
178
164
  export type ColumnType = (typeof ColumnType)[keyof typeof ColumnType];
179
165
  export interface TableStyles {
180
166
  cellBackground?: string;
181
- textColor?: string;
182
- textSize?: TextSize;
183
- fontStyle?: string;
184
- horizontalAlign?: CellAlignment;
167
+ horizontalAlign?: HorizontalAlignment;
185
168
  verticalAlign?: VerticalAlignment;
186
169
  }
187
- export type Pagination = keyof typeof PaginationTypes;
188
- type CellAlignment = keyof typeof CellAlignmentTypes;
189
- type VerticalAlignment = keyof typeof VerticalAlignmentTypes;
190
- type TextSize = keyof typeof TextSizes;
191
170
  export type SingleCellProperties = ColumnPropertiesForEditing & {
192
- horizontalAlign?: CellAlignment;
171
+ horizontalAlign?: HorizontalAlignment;
193
172
  verticalAlign?: VerticalAlignment;
194
- textSize?: TextSize;
195
- fontStyle?: string;
196
- textColor?: string;
197
173
  cellTextStyle?: TextStyleWithVariant;
198
174
  cellBackground?: string;
199
175
  buttonBackgroundColor?: string;
176
+ buttonBorder?: PerSideBorder;
200
177
  buttonVariant?: string;
201
- buttonLabelColor?: string;
178
+ buttonTextStyle?: TextStyleWithVariant;
202
179
  buttonLabel?: string;
203
180
  cellIcon?: string;
204
181
  cellIconPosition?: IconPosition;
@@ -208,8 +185,9 @@ export type SingleCellProperties = ColumnPropertiesForEditing & {
208
185
  isDisabled?: boolean;
209
186
  displayedValue?: string;
210
187
  textWrap?: boolean;
188
+ tagsWrap?: boolean;
211
189
  dropdownIcon?: string;
212
- imageBorderRadius?: Dim<DimModes>;
190
+ imageBorderRadius?: PerCornerBorderRadius;
213
191
  imageSize?: ImageSize;
214
192
  openImageUrl?: boolean;
215
193
  inputFormat?: string;
@@ -251,17 +229,13 @@ interface ColumnPropertiesForEditing {
251
229
  export type TagDisplayConfig = {
252
230
  color: string;
253
231
  };
254
- export type ColumnPropertyFunctionArgs = {
255
- onComplete?: () => void;
256
- context: ColumnContext | Record<string, unknown>;
257
- };
258
232
  export type ColumnPropertyFunctions = {
259
- onClick?: (args: ColumnPropertyFunctionArgs) => void;
260
- onDropdownSearchTextChanged?: (args: ColumnPropertyFunctionArgs) => void;
261
- onOptionChange?: (args: ColumnPropertyFunctionArgs) => void;
262
- onFocusOut?: (args: ColumnPropertyFunctionArgs) => void;
263
- onDateSelected?: (args: ColumnPropertyFunctionArgs) => void;
264
- onCheckChange?: (args: ColumnPropertyFunctionArgs) => void;
233
+ onClick?: (args: RowContext) => Promise<void>;
234
+ onDropdownSearchTextChanged?: () => void;
235
+ onOptionChange?: () => void;
236
+ onFocusOut?: () => void;
237
+ onDateSelected?: () => void;
238
+ onCheckChange?: () => void;
265
239
  };
266
240
  export interface ColumnProperties extends ColumnEditConfigs, ColumnPropertiesForEditing, ColumnPropertyFunctions {
267
241
  id: string;
@@ -273,11 +247,8 @@ export interface ColumnProperties extends ColumnEditConfigs, ColumnPropertiesFor
273
247
  index: number;
274
248
  width: number;
275
249
  cellBackground?: string;
276
- horizontalAlign?: CellAlignment;
250
+ horizontalAlign?: HorizontalAlignment;
277
251
  verticalAlign?: VerticalAlignment;
278
- textSize?: TextSize;
279
- fontStyle?: string;
280
- textColor?: string;
281
252
  cellProps?: {
282
253
  textStyle: TextStyleWithVariant;
283
254
  };
@@ -287,11 +258,14 @@ export interface ColumnProperties extends ColumnEditConfigs, ColumnPropertiesFor
287
258
  computedValue: string | string[];
288
259
  displayedValue?: string | string[];
289
260
  buttonLabel?: string;
290
- buttonStyle?: string;
261
+ buttonBackgroundColor?: string;
262
+ buttonBorder?: PerSideBorder;
291
263
  buttonVariant?: string;
292
- buttonLabelColor?: string;
264
+ buttonTextStyle?: TextStyleWithVariant;
293
265
  cellIcon?: string;
294
266
  cellIconPosition?: IconPosition;
267
+ buttonIcon?: string;
268
+ buttonIconPosition?: IconPosition;
295
269
  isDisabled?: boolean;
296
270
  linkUrl?: string;
297
271
  linkLabel?: string;
@@ -300,12 +274,13 @@ export interface ColumnProperties extends ColumnEditConfigs, ColumnPropertiesFor
300
274
  isEditable?: boolean | string;
301
275
  isFrozen?: boolean;
302
276
  textWrap?: boolean;
277
+ tagsWrap?: boolean;
303
278
  tagDisplayConfig: Record<string, TagDisplayConfig>;
304
279
  imageSize?: ImageSize;
305
- imageBorderRadius?: Dim<DimModes>;
280
+ imageBorderRadius?: PerCornerBorderRadius;
306
281
  openImageUrl?: boolean;
307
- outputFormat?: string | string[];
308
- inputFormat?: string | string[];
282
+ outputFormat?: string;
283
+ inputFormat?: string;
309
284
  }
310
285
  export type EditProps = ColumnEditConfigs & {
311
286
  handleEditStart: () => void;
@@ -366,7 +341,7 @@ type ColumnEditConfigs = {
366
341
  export type UnknownRow = Record<string, unknown>;
367
342
  export type UnknownRows = Array<UnknownRow>;
368
343
  export interface TableSortColumn {
369
- column: string;
344
+ column?: string;
370
345
  asc: boolean;
371
346
  }
372
347
  export interface TagsColorAssignment {
@@ -377,11 +352,10 @@ export interface TableWidgetProps extends TableFunctions {
377
352
  sourceId: string;
378
353
  widgetName: string;
379
354
  isLoading: boolean;
380
- defaultSearchText: string;
381
355
  searchPlaceholder: string;
382
356
  pageSize: number;
383
357
  configuredPageSize?: number;
384
- pageType: Pagination;
358
+ paginationType: PaginationType;
385
359
  multiRowSelection?: boolean;
386
360
  columnOrder?: string[];
387
361
  columnSizeMap?: {
@@ -393,10 +367,9 @@ export interface TableWidgetProps extends TableFunctions {
393
367
  isDownloadable: boolean;
394
368
  isFilterable: boolean;
395
369
  showColumnBorders: boolean;
396
- defaultFilters: string;
397
370
  isSearchable: boolean;
398
- tableHeader: string;
399
- compactMode: CompactMode;
371
+ header: string;
372
+ rowDensity: RowDensity;
400
373
  enableRowDeletion: boolean;
401
374
  enableRowInsertion: boolean;
402
375
  maxLinesPerRow?: number;
@@ -427,6 +400,7 @@ export interface TableWidgetProps extends TableFunctions {
427
400
  theme: UserAccessibleTheme;
428
401
  border: PerSideBorder;
429
402
  disableNudge: (disable: boolean) => void;
403
+ disableDrag: (disable: boolean) => void;
430
404
  filteredTableData?: UnknownRows;
431
405
  filteredOrderMap?: Array<number>;
432
406
  editedRows?: {
@@ -1,2 +1,2 @@
1
- import { CompactMode } from "./types.js";
2
- export declare const getCompactMode: (compactMode: unknown) => CompactMode;
1
+ import { RowDensity } from "./types.js";
2
+ export declare const getRowDensity: (rowDensity: unknown) => RowDensity;
@@ -5,27 +5,28 @@ export declare const SbText: import("react").FC<import("../../properties-panel/p
5
5
  }>;
6
6
  appearance: import("../../properties-panel/props-builder.js").Section<Record<string, import("../../properties-panel/props-builder.js").Prop<any, any>> & ({
7
7
  textStyle: import("../../properties-panel/props-builder.js").Prop<import("@superblocksteam/library-shared/types").TextStyleWithVariant, true>;
8
- textAlign: import("../../properties-panel/props-builder.js").Prop<import("@superblocksteam/library-shared/props").TextAlign, true>;
8
+ horizontalAlign: import("../../properties-panel/props-builder.js").Prop<import("@superblocksteam/library-shared/props").HorizontalAlign, true>;
9
9
  verticalAlign: import("../../properties-panel/props-builder.js").Prop<import("./props.js").VerticalAlign, true>;
10
10
  wrapText: import("../../properties-panel/props-builder.js").Prop<boolean, true>;
11
- animateLoading: import("../../properties-panel/props-builder.js").Prop<boolean, false>;
11
+ loading: import("../../properties-panel/props-builder.js").Prop<boolean, true>;
12
12
  shouldScroll: import("../../properties-panel/props-builder.js").Prop<boolean, false>;
13
13
  icon: import("../../properties-panel/props-builder.js").Prop<string, false>;
14
+ iconPosition: import("../../properties-panel/props-builder.js").Prop<import("../../icons/constants.js").IconPosition, true>;
14
15
  } & (Omit<{
15
16
  textType: import("../../properties-panel/props-builder.js").Prop<"number" | "time" | "text" | "date" | "currency", false>;
16
17
  }, "textType" | "dateInputFormat" | "dateOutputFormat"> & ({
17
- minimumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number, true>;
18
- maximumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number, true>;
18
+ minDecimals: import("../../properties-panel/props-builder.js").Prop<number, false>;
19
+ maxDecimals: import("../../properties-panel/props-builder.js").Prop<number, false>;
19
20
  textType: import("../../properties-panel/props-builder.js").Prop<"currency", true>;
20
21
  currency: import("../../properties-panel/props-builder.js").Prop<string, true>;
21
- notation: import("../../properties-panel/props-builder.js").Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
22
+ numberFormat: import("../../properties-panel/props-builder.js").Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
22
23
  dateInputFormat?: undefined;
23
24
  dateOutputFormat?: undefined;
24
25
  } | {
25
- minimumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number, true>;
26
- maximumFractionDigits: import("../../properties-panel/props-builder.js").Prop<number, true>;
26
+ minDecimals: import("../../properties-panel/props-builder.js").Prop<number, false>;
27
+ maxDecimals: import("../../properties-panel/props-builder.js").Prop<number, false>;
27
28
  textType: import("../../properties-panel/props-builder.js").Prop<"number", true>;
28
- notation: import("../../properties-panel/props-builder.js").Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
29
+ numberFormat: import("../../properties-panel/props-builder.js").Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
29
30
  dateInputFormat?: undefined;
30
31
  dateOutputFormat?: undefined;
31
32
  } | {
@@ -1,5 +1,7 @@
1
1
  import { Prop, Section } from "../../properties-panel/props-builder.js";
2
- import type { TextAlign } from "@superblocksteam/library-shared/props";
2
+ import type { IconPosition } from "../../icons/constants.js";
3
+ import type { Dim } from "@superblocksteam/library-shared";
4
+ import type { HorizontalAlign } from "@superblocksteam/library-shared/props";
3
5
  import type { Typographies } from "@superblocksteam/library-shared/types";
4
6
  /**
5
7
  * TODO:
@@ -14,27 +16,28 @@ export declare const propertiesDefinition: {
14
16
  }>;
15
17
  appearance: Section<Record<string, Prop<any, any>> & ({
16
18
  textStyle: Prop<import("@superblocksteam/library-shared/types").TextStyleWithVariant, true>;
17
- textAlign: Prop<TextAlign, true>;
19
+ horizontalAlign: Prop<HorizontalAlign, true>;
18
20
  verticalAlign: Prop<VerticalAlign, true>;
19
21
  wrapText: Prop<boolean, true>;
20
- animateLoading: Prop<boolean, false>;
22
+ loading: Prop<boolean, true>;
21
23
  shouldScroll: Prop<boolean, false>;
22
24
  icon: Prop<string, false>;
25
+ iconPosition: Prop<IconPosition, true>;
23
26
  } & (Omit<{
24
27
  textType: Prop<"number" | "time" | "text" | "date" | "currency", false>;
25
28
  }, "textType" | "dateInputFormat" | "dateOutputFormat"> & ({
26
- minimumFractionDigits: Prop<number, true>;
27
- maximumFractionDigits: Prop<number, true>;
29
+ minDecimals: Prop<number, false>;
30
+ maxDecimals: Prop<number, false>;
28
31
  textType: Prop<"currency", true>;
29
32
  currency: Prop<string, true>;
30
- notation: Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
33
+ numberFormat: Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
31
34
  dateInputFormat?: undefined;
32
35
  dateOutputFormat?: undefined;
33
36
  } | {
34
- minimumFractionDigits: Prop<number, true>;
35
- maximumFractionDigits: Prop<number, true>;
37
+ minDecimals: Prop<number, false>;
38
+ maxDecimals: Prop<number, false>;
36
39
  textType: Prop<"number", true>;
37
- notation: Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
40
+ numberFormat: Prop<"compact" | "standard" | "scientific" | "engineering" | "unformatted", true>;
38
41
  dateInputFormat?: undefined;
39
42
  dateOutputFormat?: undefined;
40
43
  } | {
@@ -43,12 +46,12 @@ export declare const propertiesDefinition: {
43
46
  dateOutputFormat: Prop<string, false>;
44
47
  })))>;
45
48
  layout: Section<Record<string, Prop<any, any>> & {
46
- maxHeight?: Prop<import("@superblocksteam/library-shared").Dim<import("@superblocksteam/library-shared").DimModes>, false> | undefined;
47
- minHeight?: Prop<import("@superblocksteam/library-shared").Dim<import("@superblocksteam/library-shared").DimModes>, false> | undefined;
48
- maxWidth?: Prop<import("@superblocksteam/library-shared").Dim<import("@superblocksteam/library-shared").DimModes>, false> | undefined;
49
- minWidth?: Prop<import("@superblocksteam/library-shared").Dim<import("@superblocksteam/library-shared").DimModes>, false> | undefined;
50
- width: Prop<import("@superblocksteam/library-shared").Dim<import("@superblocksteam/library-shared").DimModes>, false>;
51
- height: Prop<import("@superblocksteam/library-shared").Dim<import("@superblocksteam/library-shared").DimModes>, false>;
49
+ maxHeight?: Prop<Dim<import("@superblocksteam/library-shared").DimModes>, false> | undefined;
50
+ minHeight?: Prop<Dim<import("@superblocksteam/library-shared").DimModes>, false> | undefined;
51
+ maxWidth?: Prop<Dim<import("@superblocksteam/library-shared").DimModes>, false> | undefined;
52
+ minWidth?: Prop<Dim<import("@superblocksteam/library-shared").DimModes>, false> | undefined;
53
+ width: Prop<Dim<import("@superblocksteam/library-shared").DimModes>, false>;
54
+ height: Prop<Dim<import("@superblocksteam/library-shared").DimModes>, false>;
52
55
  } & {
53
56
  margin: Prop<unknown, true>;
54
57
  } & {
@@ -1,16 +1,16 @@
1
1
  import type { propertiesDefinition } from "./props.js";
2
2
  import type { InternalProps } from "../../properties-panel/props-builder.js";
3
- import type { TextAlign } from "@superblocksteam/library-shared/props";
3
+ import type { HorizontalAlign } from "@superblocksteam/library-shared/props";
4
4
  import type { TextStyleWithVariant, Typographies, UserAccessibleTheme } from "@superblocksteam/library-shared/types";
5
5
  type TextWidgetProps = InternalProps<typeof propertiesDefinition>;
6
- export declare const useText: ({ text, notation, minimumFractionDigits, maximumFractionDigits, textType, currency, dateInputFormat, dateOutputFormat, }: Pick<TextWidgetProps, "text" | "notation" | "minimumFractionDigits" | "maximumFractionDigits" | "textType" | "currency" | "dateInputFormat" | "dateOutputFormat">) => string | undefined;
6
+ export declare const useText: ({ text, numberFormat, minDecimals, maxDecimals, textType, currency, dateInputFormat, dateOutputFormat, }: Pick<TextWidgetProps, "text" | "numberFormat" | "minDecimals" | "maxDecimals" | "textType" | "currency" | "dateInputFormat" | "dateOutputFormat">) => string | undefined;
7
7
  export declare const useTextClassName: ({ textStyleVariant, isLoading, }: {
8
8
  textStyleVariant: keyof Typographies;
9
9
  isLoading?: boolean;
10
10
  }) => string;
11
11
  export declare const getFontSizePx: (textStyle: TextStyleWithVariant, theme: UserAccessibleTheme) => number;
12
- export declare const useIcon: ({ textStyleWithVariant, }: {
13
- textStyleWithVariant: TextStyleWithVariant;
12
+ export declare const useIcon: ({ textStyle }: {
13
+ textStyle: TextStyleWithVariant;
14
14
  }) => {
15
15
  iconGap: {
16
16
  gap: string;
@@ -18,8 +18,8 @@ export declare const useIcon: ({ textStyleWithVariant, }: {
18
18
  iconSize: number;
19
19
  };
20
20
  export declare const useStyle: (props: TextWidgetProps) => any;
21
- export declare const useIconContainerStyles: ({ iconGap, textAlign, }: {
21
+ export declare const useIconContainerStyles: ({ iconGap, horizontalAlign, }: {
22
22
  iconGap: any;
23
- textAlign: TextAlign;
23
+ horizontalAlign: HorizontalAlign;
24
24
  }) => any;
25
25
  export {};
@@ -21,3 +21,4 @@ export declare const textStyleProp: ({ baseProp, propertiesPanel, }?: {
21
21
  }) => Prop<TextStyleWithVariant>;
22
22
  export declare const colorProp: (schema: Omit<Partial<PropertiesPanelDisplay<string, "COLOR_PICKER">>, "controlType">) => Prop<string, false>;
23
23
  export declare const labelTextStyle: () => Prop<TextStyleWithVariant, true>;
24
+ export declare const inputTextStyle: () => Prop<TextStyleWithVariant, true>;
@@ -1,12 +1,8 @@
1
- import { Dim } from "@superblocksteam/library-shared";
2
1
  import { Prop } from "../props-builder.js";
2
+ import type { Dim } from "@superblocksteam/library-shared";
3
3
  import type { PropertiesPanelDisplay } from "@superblocksteam/library-shared/props";
4
- import type { PerCornerBorderRadius, PerSideBorder } from "@superblocksteam/library-shared/types";
5
- export declare const perSideBorderDef: () => import("../props-builder.js").CompositeProp<{
6
- color: Prop<string, false>;
7
- width: Prop<Dim<import("@superblocksteam/library-shared").DimModes>, false>;
8
- style: Prop<string, false>;
9
- }>;
10
- export declare const border: (propertiesPanelConfig?: Partial<Partial<PropertiesPanelDisplay<"unknown", "BORDER_CONTROL">>>) => Prop<PerSideBorder, true>;
4
+ import type { BorderStyleBlock, PerCornerBorderRadius, PerSideBorder } from "@superblocksteam/library-shared/types";
5
+ export declare const createPerSideBorder: (border: BorderStyleBlock) => PerSideBorder;
6
+ export declare const border: (propertiesPanelConfig?: Partial<Partial<PropertiesPanelDisplay<PerSideBorder, "BORDER_CONTROL">>>) => Prop<PerSideBorder, false>;
11
7
  export declare const createBorderRadiusObject: (borderRadius: Dim<"px" | "%">) => PerCornerBorderRadius;
12
8
  export declare const borderRadius: (propertiesPanelConfig?: Partial<Partial<PropertiesPanelDisplay<PerCornerBorderRadius, "BORDER_RADIUS_CONTROL">>>) => Prop<PerCornerBorderRadius, true>;
@@ -8,7 +8,7 @@ export declare const customValidationProperties: {
8
8
  customValidationRule: Prop<string, true>;
9
9
  customErrorMessage: Prop<string, true>;
10
10
  };
11
- export declare const labelPosition: Prop<"left" | "top", true>;
11
+ export declare const labelPosition: () => Prop<"left" | "top", true>;
12
12
  export declare const getTypographyOptions: () => {
13
13
  label: string;
14
14
  value: {
@@ -33,12 +33,12 @@ export declare const getCustomValidationProperties: ({ errorMessagePlacementSche
33
33
  customErrorMessageSchema?: Omit<Partial<PropertiesPanelDisplay<string, "INPUT_TEXT">>, "controlType" | "options">;
34
34
  }) => {
35
35
  errorMessagePlacement: Prop<ErrorMessagePlacement, true>;
36
- customValidationRule: Prop<string, true>;
36
+ customValidationRule: Prop<any, false>;
37
37
  customErrorMessage: Prop<string, true>;
38
38
  };
39
39
  export declare const getFractionDigitsProperties: ({ schema, }?: {
40
40
  schema?: Omit<Partial<PropertiesPanelDisplay<number, "INPUT_TEXT">>, "controlType">;
41
41
  }) => {
42
- minimumFractionDigits: Prop<number, true>;
43
- maximumFractionDigits: Prop<number, true>;
42
+ minDecimals: Prop<number, false>;
43
+ maxDecimals: Prop<number, false>;
44
44
  };
@@ -40,6 +40,9 @@ export declare const size: ({ defaults, defaultsOnAdd, hasMinWidth, hasMaxWidth,
40
40
  width: Prop<Dim<DimModes>, false>;
41
41
  height: Prop<Dim<DimModes>, false>;
42
42
  };
43
+ export declare const widthWithoutFit: () => {
44
+ width: Prop<Dim<"px" | "fill" | "%" | "rows" | "columns">, false>;
45
+ };
43
46
  export declare const shouldScrollContents: (defaultValue?: boolean) => {
44
47
  shouldScrollContents: Prop<boolean, true>;
45
48
  };
@@ -52,7 +55,7 @@ export declare const spacing: (options?: {
52
55
  spacing: Prop<Dim<"px">, true>;
53
56
  };
54
57
  export declare const padding: (options?: {
55
- default?: Padding;
58
+ default?: Padding | ((this: any) => Padding);
56
59
  } & Partial<PropertiesPanelDisplay<Padding, "PADDING_CONTROL">>) => {
57
60
  padding: Prop<import("@superblocksteam/library-shared/types").Spacing, true>;
58
61
  };
@@ -63,14 +66,9 @@ export declare const getAlignmentProps: <LayoutType extends "vertical" | "horizo
63
66
  verticalAlign: Prop<VerticalAlignment<LayoutType>, true>;
64
67
  horizontalAlign: Prop<HorizontalAlignment<LayoutType>, true>;
65
68
  };
66
- export declare const containerLayout: () => import("../props-builder.js").UnionProp<{
69
+ export declare const containerLayout: (sizeProps?: Record<string, Prop<any, any>>) => import("../props-builder.js").UnionProp<{
67
70
  layout: Prop<ContainerLayout, true>;
68
71
  }, [{
69
- readonly layout: Prop<"freeform", true>;
70
- readonly columns: Prop<number, true>;
71
- readonly rows: Prop<number, false>;
72
- readonly rowSize: Prop<number, false>;
73
- }, {
74
72
  readonly verticalAlign: Prop<"center" | "space-around" | "space-between" | "bottom" | "top", true>;
75
73
  readonly horizontalAlign: Prop<"center" | "left" | "right", true>;
76
74
  readonly layout: Prop<"vertical", true>;
@@ -78,14 +76,11 @@ export declare const containerLayout: () => import("../props-builder.js").UnionP
78
76
  readonly verticalAlign: Prop<"center" | "bottom" | "top", true>;
79
77
  readonly horizontalAlign: Prop<"center" | "space-around" | "space-between" | "left" | "right", true>;
80
78
  readonly layout: Prop<"horizontal", true>;
81
- }], ({
82
- layout: Prop<ContainerLayout, true>;
83
- } & {
84
- readonly layout: Prop<"freeform", true>;
79
+ }, {
85
80
  readonly columns: Prop<number, true>;
86
- readonly rows: Prop<number, false>;
87
- readonly rowSize: Prop<number, false>;
88
- }) | ({
81
+ readonly rowHeight: Prop<Dim<"px">, true>;
82
+ readonly layout: Prop<"freeform", true>;
83
+ }], ({
89
84
  layout: Prop<ContainerLayout, true>;
90
85
  } & {
91
86
  readonly verticalAlign: Prop<"center" | "space-around" | "space-between" | "bottom" | "top", true>;
@@ -97,6 +92,12 @@ export declare const containerLayout: () => import("../props-builder.js").UnionP
97
92
  readonly verticalAlign: Prop<"center" | "bottom" | "top", true>;
98
93
  readonly horizontalAlign: Prop<"center" | "space-around" | "space-between" | "left" | "right", true>;
99
94
  readonly layout: Prop<"horizontal", true>;
95
+ }) | ({
96
+ layout: Prop<ContainerLayout, true>;
97
+ } & {
98
+ readonly columns: Prop<number, true>;
99
+ readonly rowHeight: Prop<Dim<"px">, true>;
100
+ readonly layout: Prop<"freeform", true>;
100
101
  })>;
101
102
  export declare const basicLayout: () => Section<Record<string, Prop<any, any>> & {
102
103
  maxHeight?: Prop<Dim<DimModes>, false> | undefined;
@@ -0,0 +1,2 @@
1
+ import { Prop } from "../props-builder.js";
2
+ export declare const loading: () => Prop<boolean, true>;
@@ -14,6 +14,7 @@ export type SideEffectCallback = (params: {
14
14
  updates: Record<string, PropertyInfo<unknown>>;
15
15
  widgetMeta: RuntimeWidgetMeta;
16
16
  widgetState: Entity | ScopedState | undefined;
17
+ propertiesDefinition: PropertiesDefinition;
17
18
  }) => Record<SbElement, {
18
19
  meta?: Record<string, unknown>;
19
20
  props?: Record<string, PropertyInfo<unknown>>;
@@ -99,13 +100,13 @@ type EntityProps<Definition extends PropertiesDefinition, MergedSections = Merge
99
100
  * - Properties are fully evaluated to their final types
100
101
  */
101
102
  type InternalProps<Definition extends PropertiesDefinition, FlattenedProps = EntityProps<Definition>, BaseProps = Omit<SbComponentProps, keyof FlattenedProps>> = FlattenedProps & BaseProps;
102
- type MakeOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
103
+ type MakeOptional<T, K extends string> = Omit<T, K & keyof T> & Partial<Pick<T, K & keyof T>>;
103
104
  type CleanProps<T> = {
104
105
  [K in keyof T as string extends K ? never : K]: T[K];
105
106
  };
106
- type InternalPropsWithOptional<Definition extends PropertiesDefinition, OptionalProps extends keyof CleanProps<InternalPropsWithDefinition>, InternalPropsWithDefinition = InternalProps<Definition>> = MakeOptional<CleanProps<InternalPropsWithDefinition>, OptionalProps> & {
107
+ type InternalPropsWithOptional<Definition extends PropertiesDefinition, OptionalProps extends string, InternalPropsWithDefinition = InternalProps<Definition>> = InternalPropsWithDefinition extends infer U ? U extends any ? MakeOptional<CleanProps<U>, OptionalProps> & {
107
108
  [key: string]: any;
108
- };
109
+ } : never : never;
109
110
  /**
110
111
  * External props exposed to component consumers
111
112
  * - All properties are optional regardless of defaults
@@ -131,7 +132,7 @@ declare class Section<T extends Record<string, Prop<any, any>> = Record<string,
131
132
  }[number] : never : INP>(props: INP): Section<T & OUT>;
132
133
  add: <INP extends Record<string, Prop<any, any>> | CompositeProp<any> | UnionProp<any, any>, OUT extends INP extends CompositeProp<infer CU> ? CU : INP extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: MergeUnionVariant<SHARED, VARIANTS[I]>; }[number] : never : INP>(props: INP) => Section<T & OUT>;
133
134
  propertiesPanel(config: Omit<SectionDefinition<any>, "props">): this;
134
- get name(): "Content" | "Routing" | "Interaction" | "Layout" | "Appearance" | "Permissions" | "Event handlers" | "Uncategorized";
135
+ get name(): "Content" | "Routing" | "Interaction" | "Layout" | "Appearance" | "Permissions" | "Uncategorized" | "Event handlers";
135
136
  }
136
137
  declare class Prop<Type extends DataType, _HasDefault extends boolean = false> {
137
138
  protected prop: ManagedProp<Type>;
@@ -141,6 +142,7 @@ declare class Prop<Type extends DataType, _HasDefault extends boolean = false> {
141
142
  */
142
143
  protected relations: Relation[][];
143
144
  protected constructor(typeString: DataTypeString, defaultValidator?: ValidateFn<Type | undefined>);
145
+ static unset(): Prop<undefined>;
144
146
  static string<T extends string>(): Prop<T>;
145
147
  static number<T extends number>(): Prop<T>;
146
148
  static boolean<T extends boolean>(): Prop<T>;
@@ -2,13 +2,14 @@ import type { Entity } from "../../internal-details/lib/evaluator/base-entity-ma
2
2
  type ValidationResult<T = any> = {
3
3
  valid: false;
4
4
  message: string;
5
+ invalidValue: any;
5
6
  } | {
6
7
  valid: true;
7
8
  result: T;
8
9
  };
9
10
  type ValidateFn<T> = (value: any, entity: Entity) => ValidationResult<T>;
10
11
  declare const Valid: <T>(result: T) => ValidationResult<T>;
11
- declare const Invalid: <T>(message?: string) => ValidationResult<T>;
12
+ declare const Invalid: <T>(message: string | undefined, invalidValue: any) => ValidationResult<T>;
12
13
  type VALIDATION_TYPES = {
13
14
  TEXT: ValidateFn<string | undefined>;
14
15
  TEXT_EMPTY_NULL: ValidateFn<string | undefined | null>;
@@ -1,2 +1,2 @@
1
1
  import type { ComputedProperty } from "@superblocksteam/library-shared";
2
- export declare function sbComputed<T>(fn: (...args: any[]) => T): ComputedProperty<T>;
2
+ export declare function sbComputed<T = any>(fn: (...args: any[]) => T): ComputedProperty<T>;
@@ -5,6 +5,7 @@ export declare const LIGHT_APP_BG: "#F9FAFB";
5
5
  export declare const DARK_APP_BG = "#131516";
6
6
  export declare const noBorder: (theme: UserAccessibleTheme) => Border;
7
7
  export declare const noBorderOject: (theme: UserAccessibleTheme) => PerSideBorder;
8
+ export declare const onePixelTransparentBorderObject: () => PerSideBorder;
8
9
  export declare const EMPTY_RADIUS: PerCornerBorderRadius;
9
10
  export declare const DEFAULT_SYSTEM_RADIUS: PerCornerBorderRadius;
10
11
  export declare const defaultContainerBorderObject: (theme: UserAccessibleTheme) => PerSideBorder;
@@ -58,13 +59,13 @@ export declare const BOX_SHADOWS: {
58
59
  };
59
60
  };
60
61
  export declare const BUTTON_PADDING: Padding;
61
- export declare const DROPDOWN_PADDING: {
62
+ export declare const INPUT_PADDING: {
62
63
  left: Dim<"px">;
63
64
  right: Dim<"px">;
64
65
  top: Dim<"px">;
65
66
  bottom: Dim<"px">;
66
67
  };
67
- export declare const INPUT_PADDING: {
68
+ export declare const DROPDOWN_PADDING: {
68
69
  left: Dim<"px">;
69
70
  right: Dim<"px">;
70
71
  top: Dim<"px">;
@@ -77,4 +78,5 @@ export declare const KEY_VALUE_PADDING: {
77
78
  bottom: Dim<"px">;
78
79
  };
79
80
  export declare const KEY_VALUE_SPACING: Dim<"px">;
81
+ export declare const DEFAULT_GRID_ROW_SIZE = 12;
80
82
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { Dim, DimModes } from "@superblocksteam/library-shared";
2
- import type { Padding, TextStyleWithVariant } from "@superblocksteam/library-shared/types";
2
+ import type { Padding } from "@superblocksteam/library-shared/types";
3
3
  import type React from "react";
4
4
  export declare const getCustomTypographyAccessor: (typographyKey: string) => string;
5
5
  export declare const getCustomTypographyNameFromAccessor: (accessor: string) => string;
@@ -8,7 +8,6 @@ export declare const getTextCssClassFromVariant: (textStyleVariant?: string) =>
8
8
  export declare const camelCaseToSentenceCase: (input: string) => string;
9
9
  export declare const extractPixels: (pxValue: string | number) => number;
10
10
  export declare const getLineHeightInPixels: (lineHeight: string | number, fontSize: number) => number;
11
- export declare const mergeTextStyles: (base: TextStyleWithVariant | undefined, override: TextStyleWithVariant | undefined) => TextStyleWithVariant | undefined;
12
11
  export declare const isColorToken: (value?: string) => boolean;
13
12
  export declare function getDefaultTypographies(themeVersion?: number): import("@superblocksteam/library-shared/types").Typographies;
14
13
  export declare function generatePaddingStyle(padding: Padding): string;