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,78 @@
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 Icon Component Type Definitions
18
+ * @description Defines types for the Icon component in the UI adapter system
19
+ * @module @brix/runtime-sdk-api-web/types/ui/icon
20
+ * @version 3.2.0
21
+ */
22
+ import type { MouseEvent, CSSProperties } from 'react';
23
+ import type { ComponentSize } from './common';
24
+ /**
25
+ * Icon Component Props
26
+ *
27
+ * Name-based icon lookup component. The actual icon rendering
28
+ * is handled by the UI adapter implementation (MUI icons, SVG icons, etc.).
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * <Icon name="dashboard" size="medium" color="#1976d2" />
33
+ * <Icon name="settings" size={24} />
34
+ * ```
35
+ */
36
+ export interface IconProps {
37
+ /**
38
+ * Icon Name
39
+ *
40
+ * Name/identifier of the icon to display.
41
+ * The name is resolved by the UI adapter's icon mapping.
42
+ */
43
+ name: string;
44
+ /**
45
+ * Icon Size
46
+ *
47
+ * Predefined size or custom pixel value.
48
+ * @default 'medium'
49
+ */
50
+ size?: ComponentSize | number;
51
+ /**
52
+ * Icon Color
53
+ *
54
+ * Custom color override (CSS color value).
55
+ */
56
+ color?: string;
57
+ /**
58
+ * Custom Inline Styles
59
+ */
60
+ style?: CSSProperties;
61
+ /**
62
+ * Custom CSS Class Name
63
+ */
64
+ className?: string;
65
+ /**
66
+ * Accessible Label
67
+ *
68
+ * ARIA label for screen readers.
69
+ */
70
+ 'aria-label'?: string;
71
+ /**
72
+ * Click Handler
73
+ *
74
+ * Optional click handler for interactive icons.
75
+ */
76
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
77
+ }
78
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/types/ui/icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IAE9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACpD"}
@@ -0,0 +1,59 @@
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 UI Adapter Type Definitions Barrel Export
18
+ * @description Unified export for all UI adapter type definitions
19
+ * @module @brix/runtime-sdk-api-web/types/ui
20
+ * @version 3.2.0
21
+ *
22
+ * [v3.2.0 Refactoring]
23
+ * Split the original 2100+ line ui.ts into component-specific modules:
24
+ * - common.ts: Shared types (ComponentSize)
25
+ * - button.ts: Button component types
26
+ * - input.ts: Input component types
27
+ * - select.ts: Select component types
28
+ * - card.ts: Card component types
29
+ * - avatar.ts: Avatar component types
30
+ * - badge.ts: Badge component types
31
+ * - tooltip.ts: Tooltip component types
32
+ * - menu.ts: Menu and MenuItem component types
33
+ * - modal.ts: Modal component types
34
+ * - message.ts: Message API types
35
+ * - theme-tokens.ts: Theme tokens and preset values
36
+ * - icon.ts: Icon component types
37
+ * - adapter.ts: UIAdapter interface and capability symbol
38
+ *
39
+ * [Design Principles]
40
+ * - Each file has a single responsibility
41
+ * - Facilitates on-demand imports for tree-shaking
42
+ * - Easy to maintain and extend
43
+ * - Full backward compatibility via this barrel export
44
+ */
45
+ export * from './common';
46
+ export * from './button';
47
+ export * from './input';
48
+ export * from './select';
49
+ export * from './card';
50
+ export * from './avatar';
51
+ export * from './badge';
52
+ export * from './tooltip';
53
+ export * from './menu';
54
+ export * from './modal';
55
+ export * from './message';
56
+ export * from './theme-tokens';
57
+ export * from './icon';
58
+ export * from './adapter';
59
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,cAAc,UAAU,CAAC;AAKzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAK1B,cAAc,gBAAgB,CAAC;AAK/B,cAAc,QAAQ,CAAC;AAKvB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,200 @@
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 Input Component Type Definitions
18
+ * @description Defines types for the Input component in the UI adapter system
19
+ * @module @brix/runtime-sdk-api-web/types/ui/input
20
+ * @version 3.2.0
21
+ */
22
+ import type { ChangeEvent, KeyboardEvent, FocusEvent, CSSProperties } from 'react';
23
+ import type { ComponentSize } from './common';
24
+ /**
25
+ * Input Field Type
26
+ *
27
+ * HTML input type attribute values supported by the Input component.
28
+ */
29
+ export type InputType = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search';
30
+ /**
31
+ * Input Component Props
32
+ *
33
+ * UI library agnostic input field properties. Supports all standard
34
+ * text input use cases with validation and accessibility features.
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * <Input
39
+ * label="Email"
40
+ * type="email"
41
+ * placeholder="Enter your email"
42
+ * value={email}
43
+ * onChange={(e) => setEmail(e.target.value)}
44
+ * error={!isValidEmail}
45
+ * helperText={!isValidEmail ? 'Invalid email format' : ''}
46
+ * />
47
+ * ```
48
+ */
49
+ export interface InputProps {
50
+ /**
51
+ * Input Field Type
52
+ *
53
+ * Determines the input behavior and keyboard on mobile devices.
54
+ * @default 'text'
55
+ */
56
+ type?: InputType;
57
+ /**
58
+ * Current Value
59
+ *
60
+ * The controlled value of the input field.
61
+ */
62
+ value?: string;
63
+ /**
64
+ * Default Value
65
+ *
66
+ * The initial value for uncontrolled input usage.
67
+ */
68
+ defaultValue?: string;
69
+ /**
70
+ * Placeholder Text
71
+ *
72
+ * Hint text displayed when the input is empty.
73
+ */
74
+ placeholder?: string;
75
+ /**
76
+ * Field Label
77
+ *
78
+ * Accessible label displayed above or beside the input.
79
+ */
80
+ label?: string;
81
+ /**
82
+ * Helper Text
83
+ *
84
+ * Descriptive text displayed below the input for guidance.
85
+ */
86
+ helperText?: string;
87
+ /**
88
+ * Error State
89
+ *
90
+ * When true, displays the input in an error state with visual feedback.
91
+ * @default false
92
+ */
93
+ error?: boolean;
94
+ /**
95
+ * Disabled State
96
+ *
97
+ * When true, the input is non-interactive and visually dimmed.
98
+ * @default false
99
+ */
100
+ disabled?: boolean;
101
+ /**
102
+ * Read-Only State
103
+ *
104
+ * When true, the input value can be selected but not modified.
105
+ * @default false
106
+ */
107
+ readOnly?: boolean;
108
+ /**
109
+ * Required Field Indicator
110
+ *
111
+ * When true, displays a required field indicator.
112
+ * @default false
113
+ */
114
+ required?: boolean;
115
+ /**
116
+ * Input Size
117
+ *
118
+ * Controls the input dimensions and font size.
119
+ * @default 'medium'
120
+ */
121
+ size?: ComponentSize;
122
+ /**
123
+ * Full Width Mode
124
+ *
125
+ * When true, the input expands to fill its container width.
126
+ * @default false
127
+ */
128
+ fullWidth?: boolean;
129
+ /**
130
+ * Start Adornment Icon
131
+ *
132
+ * Icon name displayed at the start of the input.
133
+ */
134
+ startAdornment?: string;
135
+ /**
136
+ * End Adornment Icon
137
+ *
138
+ * Icon name displayed at the end of the input.
139
+ * Commonly used for clear button or visibility toggle.
140
+ */
141
+ endAdornment?: string;
142
+ /**
143
+ * Maximum Character Length
144
+ *
145
+ * Maximum number of characters allowed in the input.
146
+ */
147
+ maxLength?: number;
148
+ /**
149
+ * HTML Name Attribute
150
+ *
151
+ * Form field name for form submission.
152
+ */
153
+ name?: string;
154
+ /**
155
+ * Auto Focus
156
+ *
157
+ * When true, the input receives focus on mount.
158
+ * @default false
159
+ */
160
+ autoFocus?: boolean;
161
+ /**
162
+ * Auto Complete Hint
163
+ *
164
+ * Browser autocomplete hint for the input field.
165
+ */
166
+ autoComplete?: string;
167
+ /**
168
+ * Change Event Handler
169
+ *
170
+ * Callback fired when the input value changes.
171
+ */
172
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
173
+ /**
174
+ * Focus Event Handler
175
+ *
176
+ * Callback fired when the input receives focus.
177
+ */
178
+ onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
179
+ /**
180
+ * Blur Event Handler
181
+ *
182
+ * Callback fired when the input loses focus.
183
+ */
184
+ onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
185
+ /**
186
+ * Key Down Event Handler
187
+ *
188
+ * Callback fired on key down events.
189
+ */
190
+ onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
191
+ /**
192
+ * Custom Inline Styles
193
+ */
194
+ style?: CSSProperties;
195
+ /**
196
+ * Custom CSS Class Name
197
+ */
198
+ className?: string;
199
+ }
200
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/types/ui/input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE5F;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IAErB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE1D;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAExD;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEvD;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,211 @@
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 Menu Component Type Definitions
18
+ * @description Defines types for the Menu and MenuItem components in the UI adapter system
19
+ * @module @brix/runtime-sdk-api-web/types/ui/menu
20
+ * @version 3.2.0
21
+ *
22
+ * [Architectural Note]
23
+ * These are ATOMIC navigation components for Shell layer assembly.
24
+ * Sidebar and Header are assembled at Shell layer using these components.
25
+ */
26
+ import type { ReactNode, MouseEvent, CSSProperties } from 'react';
27
+ /**
28
+ * Menu Item Definition
29
+ *
30
+ * Represents a navigation item in the menu hierarchy.
31
+ * Used by both the Menu component and Shell layout components.
32
+ */
33
+ export interface MenuItem {
34
+ /**
35
+ * Unique Item Key
36
+ *
37
+ * Unique identifier for the menu item. Used for selection tracking.
38
+ */
39
+ key: string;
40
+ /**
41
+ * Display Label
42
+ *
43
+ * The text displayed for this menu item.
44
+ */
45
+ label: ReactNode;
46
+ /**
47
+ * Icon Name
48
+ *
49
+ * Optional icon displayed before the label.
50
+ */
51
+ icon?: string;
52
+ /**
53
+ * Navigation Path
54
+ *
55
+ * The URL path this item navigates to.
56
+ */
57
+ path?: string;
58
+ /**
59
+ * Child Items
60
+ *
61
+ * Nested submenu items.
62
+ */
63
+ children?: MenuItem[];
64
+ /**
65
+ * Hidden State
66
+ *
67
+ * When true, the item is not rendered.
68
+ */
69
+ hidden?: boolean;
70
+ /**
71
+ * Sort Order
72
+ *
73
+ * Numeric weight for sorting. Lower values appear first.
74
+ */
75
+ order?: number;
76
+ /**
77
+ * Disabled State
78
+ *
79
+ * When true, the item is non-interactive.
80
+ */
81
+ disabled?: boolean;
82
+ /**
83
+ * Badge Count
84
+ *
85
+ * Optional notification count displayed on the item.
86
+ */
87
+ badge?: number;
88
+ }
89
+ /**
90
+ * Menu Component Props
91
+ *
92
+ * Atomic navigation menu component. This is a presentation component
93
+ * used by Shell layer to assemble layout components like Sidebar.
94
+ *
95
+ * **Architectural Note:** This is an atomic component.
96
+ * Sidebar and Header are assembled at Shell layer using this component.
97
+ *
98
+ * @example
99
+ * ```tsx
100
+ * <Menu
101
+ * items={menuItems}
102
+ * selectedKey={currentPath}
103
+ * onSelect={(key, item) => navigate(item.path)}
104
+ * collapsed={sidebarCollapsed}
105
+ * />
106
+ * ```
107
+ */
108
+ export interface MenuProps {
109
+ /**
110
+ * Menu Items
111
+ *
112
+ * Array of menu items to render.
113
+ */
114
+ items: MenuItem[];
115
+ /**
116
+ * Selected Item Key
117
+ *
118
+ * Key of the currently selected item for highlight.
119
+ */
120
+ selectedKey?: string;
121
+ /**
122
+ * Expanded Keys
123
+ *
124
+ * Keys of expanded submenu items.
125
+ */
126
+ expandedKeys?: string[];
127
+ /**
128
+ * Default Expanded Keys
129
+ *
130
+ * Initially expanded submenu keys for uncontrolled usage.
131
+ */
132
+ defaultExpandedKeys?: string[];
133
+ /**
134
+ * Selection Handler
135
+ *
136
+ * Callback fired when a menu item is selected.
137
+ */
138
+ onSelect?: (key: string, item: MenuItem) => void;
139
+ /**
140
+ * Expand Handler
141
+ *
142
+ * Callback fired when submenu expand state changes.
143
+ */
144
+ onExpand?: (expandedKeys: string[]) => void;
145
+ /**
146
+ * Collapsed Mode
147
+ *
148
+ * When true, displays the menu in collapsed icon-only mode.
149
+ * @default false
150
+ */
151
+ collapsed?: boolean;
152
+ /**
153
+ * Inline Mode
154
+ *
155
+ * When true, submenus expand inline. When false, submenus popup.
156
+ * @default true
157
+ */
158
+ inlineMode?: boolean;
159
+ /**
160
+ * Custom Inline Styles
161
+ */
162
+ style?: CSSProperties;
163
+ /**
164
+ * Custom CSS Class Name
165
+ */
166
+ className?: string;
167
+ }
168
+ /**
169
+ * Menu Item Component Props
170
+ *
171
+ * Individual menu item component props. Used for custom menu item rendering.
172
+ */
173
+ export interface MenuItemProps {
174
+ /**
175
+ * Item Data
176
+ *
177
+ * The menu item data object.
178
+ */
179
+ item: MenuItem;
180
+ /**
181
+ * Selected State
182
+ *
183
+ * Whether this item is currently selected.
184
+ */
185
+ selected?: boolean;
186
+ /**
187
+ * Depth Level
188
+ *
189
+ * Nesting depth for indentation (0 = root level).
190
+ */
191
+ depth?: number;
192
+ /**
193
+ * Collapsed Mode
194
+ *
195
+ * Whether the parent menu is in collapsed mode.
196
+ */
197
+ collapsed?: boolean;
198
+ /**
199
+ * Click Handler
200
+ */
201
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
202
+ /**
203
+ * Custom Inline Styles
204
+ */
205
+ style?: CSSProperties;
206
+ /**
207
+ * Custom CSS Class Name
208
+ */
209
+ className?: string;
210
+ }
211
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/types/ui/menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAElE;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;OAIG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,KAAK,EAAE,QAAQ,EAAE,CAAC;IAElB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAEjD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAE5C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAEnD;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,121 @@
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 Message API Type Definitions
18
+ * @description Defines types for the Toast/Snackbar Message API in the UI adapter system
19
+ * @module @brix/runtime-sdk-api-web/types/ui/message
20
+ * @version 3.2.0
21
+ */
22
+ import type { ReactNode } from 'react';
23
+ /**
24
+ * Message Type Variants
25
+ */
26
+ export type MessageType = 'success' | 'error' | 'warning' | 'info' | 'loading';
27
+ /**
28
+ * Message Configuration Options
29
+ */
30
+ export interface MessageOptions {
31
+ /**
32
+ * Message Content
33
+ */
34
+ content: ReactNode;
35
+ /**
36
+ * Display Duration (ms)
37
+ *
38
+ * Duration before auto-dismiss. 0 means manual dismiss only.
39
+ * @default 3000
40
+ */
41
+ duration?: number;
42
+ /**
43
+ * Closable
44
+ *
45
+ * When true, displays a close button.
46
+ * @default false
47
+ */
48
+ closable?: boolean;
49
+ /**
50
+ * Unique Key
51
+ *
52
+ * Unique key for updating or closing specific messages.
53
+ */
54
+ key?: string;
55
+ /**
56
+ * Close Callback
57
+ *
58
+ * Callback fired when the message is closed.
59
+ */
60
+ onClose?: () => void;
61
+ }
62
+ /**
63
+ * Message Destroy Function
64
+ *
65
+ * Function returned by message calls to manually dismiss the message.
66
+ */
67
+ export type MessageDestroy = () => void;
68
+ /**
69
+ * Message API Interface
70
+ *
71
+ * Imperative API for displaying toast/snackbar messages.
72
+ * This is a stateless API - implementations manage message state internally.
73
+ *
74
+ * @example
75
+ * ```tsx
76
+ * // Using the message API from UIAdapter
77
+ * const { message } = useUI();
78
+ *
79
+ * message.success({ content: 'Saved successfully!' });
80
+ * message.error({ content: 'Operation failed', duration: 5000 });
81
+ *
82
+ * // With loading state
83
+ * const destroy = message.loading({ content: 'Processing...' });
84
+ * await doAsyncOperation();
85
+ * destroy();
86
+ * message.success({ content: 'Done!' });
87
+ * ```
88
+ */
89
+ export interface MessageAPI {
90
+ /**
91
+ * Success Message
92
+ */
93
+ success: (options: MessageOptions | string) => MessageDestroy;
94
+ /**
95
+ * Error Message
96
+ */
97
+ error: (options: MessageOptions | string) => MessageDestroy;
98
+ /**
99
+ * Warning Message
100
+ */
101
+ warning: (options: MessageOptions | string) => MessageDestroy;
102
+ /**
103
+ * Info Message
104
+ */
105
+ info: (options: MessageOptions | string) => MessageDestroy;
106
+ /**
107
+ * Loading Message
108
+ */
109
+ loading: (options: MessageOptions | string) => MessageDestroy;
110
+ /**
111
+ * Destroy Specific Message
112
+ *
113
+ * Destroys a message by its key.
114
+ */
115
+ destroy: (key?: string) => void;
116
+ /**
117
+ * Destroy All Messages
118
+ */
119
+ destroyAll: () => void;
120
+ }
121
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/types/ui/message.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IAEnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,KAAK,cAAc,CAAC;IAE9D;;OAEG;IACH,KAAK,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,KAAK,cAAc,CAAC;IAE5D;;OAEG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,KAAK,cAAc,CAAC;IAE9D;;OAEG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,KAAK,cAAc,CAAC;IAE3D;;OAEG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,KAAK,cAAc,CAAC;IAE9D;;;;OAIG;IACH,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhC;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB"}