Skip to content

Commit ab8112d

Browse files
committed
Export all components
1 parent 5a49ae4 commit ab8112d

File tree

1 file changed

+70
-3
lines changed

1 file changed

+70
-3
lines changed

src/index.ts

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,75 @@ export * from './types'
1717
export { useUtils, useConfig, useClient, useAuth, useMetadata, useFiles, useFormatters, css }
1818

1919
// Import components (this will be excluded from type generation)
20-
import * as components from './components'
21-
const componentsList: any = components?.default || {}
20+
import _components from './components'
21+
22+
// Export all components as named exports
23+
export const Components = _components
24+
export const {
25+
Alert,
26+
AlertSuccess,
27+
ErrorSummary,
28+
InputDescription,
29+
Icon,
30+
Loading,
31+
32+
OutlineButton,
33+
PrimaryButton,
34+
SecondaryButton,
35+
TextLink,
36+
37+
Breadcrumbs,
38+
Breadcrumb,
39+
NavList,
40+
NavListItem,
41+
42+
AutoQueryGrid,
43+
SettingsIcons,
44+
FilterViews,
45+
FilterColumn,
46+
QueryPrefs,
47+
EnsureAccess,
48+
EnsureAccessDialog,
49+
50+
TextInput,
51+
TextareaInput,
52+
SelectInput,
53+
CheckboxInput,
54+
TagInput,
55+
FileInput,
56+
Autocomplete,
57+
Combobox,
58+
DynamicInput,
59+
LookupInput,
60+
61+
AutoFormFields,
62+
AutoForm,
63+
AutoCreateForm,
64+
AutoEditForm,
65+
AutoViewForm,
66+
ConfirmDelete,
67+
FormLoading,
68+
69+
DataGrid,
70+
CellFormat,
71+
PreviewFormat,
72+
HtmlFormat,
73+
MarkupFormat,
74+
MarkupModel,
75+
76+
CloseButton,
77+
SlideOver,
78+
ModalDialog,
79+
ModalLookup,
80+
Tabs,
81+
82+
DarkModeToggle,
83+
SignIn,
84+
MarkdownInput,
85+
SidebarLayout,
86+
} = _components
87+
88+
const componentsList: any = _components || {}
2289
export default {
2390
install(app:App) {
2491
Object.keys(componentsList).forEach(name => {
@@ -45,5 +112,5 @@ export default {
45112
return Sole.components[name] || componentsList[name] || null
46113
}
47114
return Sole.components[name] = component
48-
}
115+
},
49116
}

0 commit comments

Comments
 (0)