brix-runtime-sdk-api-web 1.0.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 (135) hide show
  1. package/dist/index.js +190 -0
  2. package/dist/types/api-exports.test.d.ts +33 -0
  3. package/dist/types/api-exports.test.d.ts.map +1 -0
  4. package/dist/types/context/RuntimeContext.d.ts +69 -0
  5. package/dist/types/context/RuntimeContext.d.ts.map +1 -0
  6. package/dist/types/context/index.d.ts +23 -0
  7. package/dist/types/context/index.d.ts.map +1 -0
  8. package/dist/types/index.d.ts +52 -0
  9. package/dist/types/index.d.ts.map +1 -0
  10. package/dist/types/types/auth.d.ts +405 -0
  11. package/dist/types/types/auth.d.ts.map +1 -0
  12. package/dist/types/types/capability.d.ts +218 -0
  13. package/dist/types/types/capability.d.ts.map +1 -0
  14. package/dist/types/types/common.d.ts +99 -0
  15. package/dist/types/types/common.d.ts.map +1 -0
  16. package/dist/types/types/config.d.ts +85 -0
  17. package/dist/types/types/config.d.ts.map +1 -0
  18. package/dist/types/types/event.d.ts +658 -0
  19. package/dist/types/types/event.d.ts.map +1 -0
  20. package/dist/types/types/http.d.ts +132 -0
  21. package/dist/types/types/http.d.ts.map +1 -0
  22. package/dist/types/types/i18n.d.ts +327 -0
  23. package/dist/types/types/i18n.d.ts.map +1 -0
  24. package/dist/types/types/index.d.ts +61 -0
  25. package/dist/types/types/index.d.ts.map +1 -0
  26. package/dist/types/types/layout.d.ts +301 -0
  27. package/dist/types/types/layout.d.ts.map +1 -0
  28. package/dist/types/types/module.d.ts +78 -0
  29. package/dist/types/types/module.d.ts.map +1 -0
  30. package/dist/types/types/navigation.d.ts +295 -0
  31. package/dist/types/types/navigation.d.ts.map +1 -0
  32. package/dist/types/types/plugin-loader-capability.d.ts +142 -0
  33. package/dist/types/types/plugin-loader-capability.d.ts.map +1 -0
  34. package/dist/types/types/plugin.d.ts +250 -0
  35. package/dist/types/types/plugin.d.ts.map +1 -0
  36. package/dist/types/types/state.d.ts +306 -0
  37. package/dist/types/types/state.d.ts.map +1 -0
  38. package/dist/types/types/theme.d.ts +279 -0
  39. package/dist/types/types/theme.d.ts.map +1 -0
  40. package/dist/types/types/ui/adapter.d.ts +181 -0
  41. package/dist/types/types/ui/adapter.d.ts.map +1 -0
  42. package/dist/types/types/ui/avatar.d.ts +102 -0
  43. package/dist/types/types/ui/avatar.d.ts.map +1 -0
  44. package/dist/types/types/ui/badge.d.ts +101 -0
  45. package/dist/types/types/ui/badge.d.ts.map +1 -0
  46. package/dist/types/types/ui/button.d.ts +135 -0
  47. package/dist/types/types/ui/button.d.ts.map +1 -0
  48. package/dist/types/types/ui/card.d.ts +105 -0
  49. package/dist/types/types/ui/card.d.ts.map +1 -0
  50. package/dist/types/types/ui/common.d.ts +29 -0
  51. package/dist/types/types/ui/common.d.ts.map +1 -0
  52. package/dist/types/types/ui/icon.d.ts +78 -0
  53. package/dist/types/types/ui/icon.d.ts.map +1 -0
  54. package/dist/types/types/ui/index.d.ts +59 -0
  55. package/dist/types/types/ui/index.d.ts.map +1 -0
  56. package/dist/types/types/ui/input.d.ts +200 -0
  57. package/dist/types/types/ui/input.d.ts.map +1 -0
  58. package/dist/types/types/ui/menu.d.ts +211 -0
  59. package/dist/types/types/ui/menu.d.ts.map +1 -0
  60. package/dist/types/types/ui/message.d.ts +121 -0
  61. package/dist/types/types/ui/message.d.ts.map +1 -0
  62. package/dist/types/types/ui/modal.d.ts +167 -0
  63. package/dist/types/types/ui/modal.d.ts.map +1 -0
  64. package/dist/types/types/ui/select.d.ts +213 -0
  65. package/dist/types/types/ui/select.d.ts.map +1 -0
  66. package/dist/types/types/ui/theme-tokens.d.ts +226 -0
  67. package/dist/types/types/ui/theme-tokens.d.ts.map +1 -0
  68. package/dist/types/types/ui/tooltip.d.ts +98 -0
  69. package/dist/types/types/ui/tooltip.d.ts.map +1 -0
  70. package/dist/types/types/ui.d.ts +49 -0
  71. package/dist/types/types/ui.d.ts.map +1 -0
  72. package/package.json +34 -0
  73. package/src/api-exports.test.ts +199 -0
  74. package/src/context/RuntimeContext.d.ts +69 -0
  75. package/src/context/RuntimeContext.d.ts.map +1 -0
  76. package/src/context/RuntimeContext.ts +75 -0
  77. package/src/context/index.d.ts +23 -0
  78. package/src/context/index.d.ts.map +1 -0
  79. package/src/context/index.ts +23 -0
  80. package/src/index.d.ts +52 -0
  81. package/src/index.d.ts.map +1 -0
  82. package/src/index.ts +59 -0
  83. package/src/types/auth.d.ts +146 -0
  84. package/src/types/auth.d.ts.map +1 -0
  85. package/src/types/auth.ts +479 -0
  86. package/src/types/capability.d.ts +218 -0
  87. package/src/types/capability.d.ts.map +1 -0
  88. package/src/types/capability.ts +302 -0
  89. package/src/types/common.d.ts +99 -0
  90. package/src/types/common.d.ts.map +1 -0
  91. package/src/types/common.ts +115 -0
  92. package/src/types/config.d.ts +64 -0
  93. package/src/types/config.d.ts.map +1 -0
  94. package/src/types/config.ts +96 -0
  95. package/src/types/event.d.ts +206 -0
  96. package/src/types/event.d.ts.map +1 -0
  97. package/src/types/event.ts +776 -0
  98. package/src/types/http.d.ts +132 -0
  99. package/src/types/http.d.ts.map +1 -0
  100. package/src/types/http.ts +156 -0
  101. package/src/types/i18n.ts +420 -0
  102. package/src/types/index.d.ts +50 -0
  103. package/src/types/index.d.ts.map +1 -0
  104. package/src/types/index.ts +120 -0
  105. package/src/types/layout.ts +394 -0
  106. package/src/types/module.d.ts +78 -0
  107. package/src/types/module.d.ts.map +1 -0
  108. package/src/types/module.ts +92 -0
  109. package/src/types/navigation.d.ts +101 -0
  110. package/src/types/navigation.d.ts.map +1 -0
  111. package/src/types/navigation.ts +361 -0
  112. package/src/types/plugin-loader-capability.ts +159 -0
  113. package/src/types/plugin.d.ts +250 -0
  114. package/src/types/plugin.d.ts.map +1 -0
  115. package/src/types/plugin.ts +344 -0
  116. package/src/types/state.d.ts +119 -0
  117. package/src/types/state.d.ts.map +1 -0
  118. package/src/types/state.ts +366 -0
  119. package/src/types/theme.ts +378 -0
  120. package/src/types/ui/adapter.ts +222 -0
  121. package/src/types/ui/avatar.ts +113 -0
  122. package/src/types/ui/badge.ts +112 -0
  123. package/src/types/ui/button.ts +148 -0
  124. package/src/types/ui/card.ts +116 -0
  125. package/src/types/ui/common.ts +29 -0
  126. package/src/types/ui/icon.ts +85 -0
  127. package/src/types/ui/index.ts +78 -0
  128. package/src/types/ui/input.ts +225 -0
  129. package/src/types/ui/menu.ts +237 -0
  130. package/src/types/ui/message.ts +135 -0
  131. package/src/types/ui/modal.ts +188 -0
  132. package/src/types/ui/select.ts +239 -0
  133. package/src/types/ui/theme-tokens.ts +357 -0
  134. package/src/types/ui/tooltip.ts +120 -0
  135. package/src/types/ui.ts +49 -0
@@ -0,0 +1,188 @@
1
+ /**
2
+ * Copyright 2026 Brix Platform Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * @file Modal Component Type Definitions
18
+ * @description Defines types for the Modal component in the UI adapter system
19
+ * @module @brix/runtime-sdk-api-web/types/ui/modal
20
+ * @version 3.2.0
21
+ */
22
+
23
+ import type { ReactNode, CSSProperties } from 'react';
24
+
25
+ /**
26
+ * Modal Size Variants
27
+ */
28
+ export type ModalSize = 'small' | 'medium' | 'large' | 'fullscreen';
29
+
30
+ /**
31
+ * Modal Component Props
32
+ *
33
+ * Dialog/modal component for displaying content in an overlay.
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * <Modal
38
+ * open={isOpen}
39
+ * title="Confirm Action"
40
+ * onClose={handleClose}
41
+ * onConfirm={handleConfirm}
42
+ * >
43
+ * <p>Are you sure you want to proceed?</p>
44
+ * </Modal>
45
+ * ```
46
+ */
47
+ export interface ModalProps {
48
+ /**
49
+ * Open State
50
+ *
51
+ * Whether the modal is visible.
52
+ */
53
+ open: boolean;
54
+
55
+ /**
56
+ * Modal Title
57
+ */
58
+ title?: ReactNode;
59
+
60
+ /**
61
+ * Modal Size
62
+ *
63
+ * @default 'medium'
64
+ */
65
+ size?: ModalSize;
66
+
67
+ /**
68
+ * Close on Overlay Click
69
+ *
70
+ * When true, clicking the overlay backdrop closes the modal.
71
+ * @default true
72
+ */
73
+ closeOnOverlayClick?: boolean;
74
+
75
+ /**
76
+ * Close on Escape Key
77
+ *
78
+ * When true, pressing Escape closes the modal.
79
+ * @default true
80
+ */
81
+ closeOnEscape?: boolean;
82
+
83
+ /**
84
+ * Show Close Button
85
+ *
86
+ * When true, displays a close button in the header.
87
+ * @default true
88
+ */
89
+ showCloseButton?: boolean;
90
+
91
+ /**
92
+ * Centered Position
93
+ *
94
+ * When true, centers the modal vertically.
95
+ * @default true
96
+ */
97
+ centered?: boolean;
98
+
99
+ /**
100
+ * Custom Width
101
+ *
102
+ * Custom width override (CSS value).
103
+ */
104
+ width?: string | number;
105
+
106
+ /**
107
+ * Footer Content
108
+ *
109
+ * Custom footer content. Set to null to hide footer.
110
+ */
111
+ footer?: ReactNode;
112
+
113
+ /**
114
+ * Confirm Button Text
115
+ *
116
+ * Text for the default confirm button.
117
+ * @default 'OK'
118
+ */
119
+ confirmText?: string;
120
+
121
+ /**
122
+ * Cancel Button Text
123
+ *
124
+ * Text for the default cancel button.
125
+ * @default 'Cancel'
126
+ */
127
+ cancelText?: string;
128
+
129
+ /**
130
+ * Confirm Button Loading
131
+ *
132
+ * When true, the confirm button shows loading state.
133
+ * @default false
134
+ */
135
+ confirmLoading?: boolean;
136
+
137
+ /**
138
+ * Close Handler
139
+ *
140
+ * Callback fired when the modal requests to be closed.
141
+ */
142
+ onClose: () => void;
143
+
144
+ /**
145
+ * Confirm Handler
146
+ *
147
+ * Callback fired when the confirm button is clicked.
148
+ */
149
+ onConfirm?: () => void;
150
+
151
+ /**
152
+ * Cancel Handler
153
+ *
154
+ * Callback fired when the cancel button is clicked.
155
+ */
156
+ onCancel?: () => void;
157
+
158
+ /**
159
+ * After Open Handler
160
+ *
161
+ * Callback fired after the modal has opened.
162
+ */
163
+ afterOpen?: () => void;
164
+
165
+ /**
166
+ * After Close Handler
167
+ *
168
+ * Callback fired after the modal has closed.
169
+ */
170
+ afterClose?: () => void;
171
+
172
+ /**
173
+ * Custom Inline Styles
174
+ *
175
+ * Styles applied to the modal content container.
176
+ */
177
+ style?: CSSProperties;
178
+
179
+ /**
180
+ * Custom CSS Class Name
181
+ */
182
+ className?: string;
183
+
184
+ /**
185
+ * Modal Content
186
+ */
187
+ children?: ReactNode;
188
+ }
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Copyright 2026 Brix Platform Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * @file Select Component Type Definitions
18
+ * @description Defines types for the Select component in the UI adapter system
19
+ * @module @brix/runtime-sdk-api-web/types/ui/select
20
+ * @version 3.2.0
21
+ */
22
+
23
+ import type { ReactNode, CSSProperties } from 'react';
24
+ import type { ComponentSize } from './common';
25
+
26
+ /**
27
+ * Select Option Item
28
+ *
29
+ * Represents a single option in the select dropdown.
30
+ */
31
+ export interface SelectOption {
32
+ /**
33
+ * Option Value
34
+ *
35
+ * The value submitted when this option is selected.
36
+ */
37
+ value: string | number;
38
+
39
+ /**
40
+ * Display Label
41
+ *
42
+ * The text displayed to the user.
43
+ */
44
+ label: string;
45
+
46
+ /**
47
+ * Disabled State
48
+ *
49
+ * When true, this option cannot be selected.
50
+ */
51
+ disabled?: boolean;
52
+
53
+ /**
54
+ * Icon Name
55
+ *
56
+ * Optional icon displayed before the label.
57
+ */
58
+ icon?: string;
59
+
60
+ /**
61
+ * Group Label
62
+ *
63
+ * If specified, indicates this item is a group header.
64
+ */
65
+ group?: string;
66
+ }
67
+
68
+ /**
69
+ * Select Component Props
70
+ *
71
+ * UI library agnostic select/dropdown properties. Supports single and
72
+ * multiple selection modes with search functionality.
73
+ *
74
+ * @example
75
+ * ```tsx
76
+ * <Select
77
+ * label="Country"
78
+ * options={countries}
79
+ * value={selectedCountry}
80
+ * onChange={(value) => setSelectedCountry(value)}
81
+ * searchable
82
+ * placeholder="Select a country"
83
+ * />
84
+ * ```
85
+ */
86
+ export interface SelectProps {
87
+ /**
88
+ * Options List
89
+ *
90
+ * Array of selectable options.
91
+ */
92
+ options: SelectOption[];
93
+
94
+ /**
95
+ * Current Value
96
+ *
97
+ * The selected value(s). Array for multiple mode.
98
+ */
99
+ value?: string | number | Array<string | number>;
100
+
101
+ /**
102
+ * Default Value
103
+ *
104
+ * Initial value for uncontrolled usage.
105
+ */
106
+ defaultValue?: string | number | Array<string | number>;
107
+
108
+ /**
109
+ * Placeholder Text
110
+ *
111
+ * Text displayed when no option is selected.
112
+ */
113
+ placeholder?: string;
114
+
115
+ /**
116
+ * Field Label
117
+ *
118
+ * Accessible label displayed above the select.
119
+ */
120
+ label?: string;
121
+
122
+ /**
123
+ * Helper Text
124
+ *
125
+ * Descriptive text displayed below the select.
126
+ */
127
+ helperText?: string;
128
+
129
+ /**
130
+ * Error State
131
+ *
132
+ * When true, displays error styling.
133
+ * @default false
134
+ */
135
+ error?: boolean;
136
+
137
+ /**
138
+ * Disabled State
139
+ *
140
+ * When true, the select is non-interactive.
141
+ * @default false
142
+ */
143
+ disabled?: boolean;
144
+
145
+ /**
146
+ * Required Field
147
+ *
148
+ * When true, displays required indicator.
149
+ * @default false
150
+ */
151
+ required?: boolean;
152
+
153
+ /**
154
+ * Select Size
155
+ *
156
+ * Controls dimensions and font size.
157
+ * @default 'medium'
158
+ */
159
+ size?: ComponentSize;
160
+
161
+ /**
162
+ * Full Width Mode
163
+ *
164
+ * When true, fills container width.
165
+ * @default false
166
+ */
167
+ fullWidth?: boolean;
168
+
169
+ /**
170
+ * Multiple Selection Mode
171
+ *
172
+ * When true, allows selecting multiple options.
173
+ * @default false
174
+ */
175
+ multiple?: boolean;
176
+
177
+ /**
178
+ * Searchable Mode
179
+ *
180
+ * When true, enables search/filter input.
181
+ * @default false
182
+ */
183
+ searchable?: boolean;
184
+
185
+ /**
186
+ * Clearable Mode
187
+ *
188
+ * When true, shows a clear button.
189
+ * @default false
190
+ */
191
+ clearable?: boolean;
192
+
193
+ /**
194
+ * Field Name
195
+ *
196
+ * HTML name attribute for form submission.
197
+ */
198
+ name?: string;
199
+
200
+ /**
201
+ * Loading State
202
+ *
203
+ * When true, shows loading indicator.
204
+ * @default false
205
+ */
206
+ loading?: boolean;
207
+
208
+ /**
209
+ * Empty Text
210
+ *
211
+ * Text displayed when no options match search.
212
+ */
213
+ emptyText?: ReactNode;
214
+
215
+ /**
216
+ * Change Event Handler
217
+ *
218
+ * Callback fired on selection change.
219
+ * The value type depends on multiple mode.
220
+ */
221
+ onChange?: (value: string | number | Array<string | number>) => void;
222
+
223
+ /**
224
+ * Search Event Handler
225
+ *
226
+ * Callback fired when search input changes (only in searchable mode).
227
+ */
228
+ onSearch?: (searchText: string) => void;
229
+
230
+ /**
231
+ * Custom Inline Styles
232
+ */
233
+ style?: CSSProperties;
234
+
235
+ /**
236
+ * Custom CSS Class Name
237
+ */
238
+ className?: string;
239
+ }