@ternarytech-io/gears-ui 0.4.0 → 0.6.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.
package/src/index.ts CHANGED
@@ -1,239 +1,249 @@
1
- // Gears UI: Vue components on Tabler. Import the styles once (`@ternarytech-io/gears-ui/styles.css`), then either
2
- // install the plugin (registers every component globally) or import components one by one.
3
- // Components that need an optional library have their own entry points, so apps that don't use
4
- // them don't need the library: `@ternarytech-io/gears-ui/code-editor` (Monaco) and `@ternarytech-io/gears-ui/plugins` (Tom
5
- // Select, Coloris, Vanilla Calendar Pro, Dropzone, IMask, noUiSlider, SortableJS, HugeRTE).
6
- import type { App } from 'vue'
7
- import TAccentPicker from './components/TAccentPicker.vue'
8
- import TAdvancedTable from './components/TAdvancedTable.vue'
9
- import TAlert from './components/TAlert.vue'
10
- import TAppLayout from './components/TAppLayout.vue'
11
- import TAuthLayout from './components/TAuthLayout.vue'
12
- import TAvatar from './components/TAvatar.vue'
13
- import TBadge from './components/TBadge.vue'
14
- import TButton from './components/TButton.vue'
15
- import TCard from './components/TCard.vue'
16
- import TCheckbox from './components/TCheckbox.vue'
17
- import TCheckboxTree from './components/TCheckboxTree.vue'
18
- import TColorModeButton from './components/TColorModeButton.vue'
19
- import TCommandPalette from './components/TCommandPalette.vue'
20
- import TContainerPicker from './components/TContainerPicker.vue'
21
- import TCopyButton from './components/TCopyButton.vue'
22
- import TDataGrid from './components/TDataGrid.vue'
23
- import TDataGridItem from './components/TDataGridItem.vue'
24
- import TDensityPicker from './components/TDensityPicker.vue'
25
- import TDropdown from './components/TDropdown.vue'
26
- import TEditableTable from './components/TEditableTable.vue'
27
- import TEmpty from './components/TEmpty.vue'
28
- import TFieldGroup from './components/TFieldGroup.vue'
29
- import TFileUpload from './components/TFileUpload.vue'
30
- import TFontPicker from './components/TFontPicker.vue'
31
- import TFormField from './components/TFormField.vue'
32
- import TIcon from './components/TIcon.vue'
33
- import TIconPicker from './components/TIconPicker.vue'
34
- import TImageUpload from './components/TImageUpload.vue'
35
- import TInput from './components/TInput.vue'
36
- import TInputNumber from './components/TInputNumber.vue'
37
- import TInputTags from './components/TInputTags.vue'
38
- import TListBox from './components/TListBox.vue'
39
- import TLogView from './components/TLogView.vue'
40
- import TModal from './components/TModal.vue'
41
- import TNav from './components/TNav.vue'
42
- import TNavPositionPicker from './components/TNavPositionPicker.vue'
43
- import TPage from './components/TPage.vue'
44
- import TPagination from './components/TPagination.vue'
45
- import TPanelList from './components/TPanelList.vue'
46
- import TProgress from './components/TProgress.vue'
47
- import TRadioGroup from './components/TRadioGroup.vue'
48
- import TRadiusPicker from './components/TRadiusPicker.vue'
49
- import TRating from './components/TRating.vue'
50
- import TScaledFrame from './components/TScaledFrame.vue'
51
- import TSearchButton from './components/TSearchButton.vue'
52
- import TSectionLayout from './components/TSectionLayout.vue'
53
- import TSelect from './components/TSelect.vue'
54
- import TSelectMenu from './components/TSelectMenu.vue'
55
- import TSeparator from './components/TSeparator.vue'
56
- import TShell from './components/TShell.vue'
57
- import TSkeleton from './components/TSkeleton.vue'
58
- import TSlideover from './components/TSlideover.vue'
59
- import TSparkline from './components/TSparkline.vue'
60
- import TSpinner from './components/TSpinner.vue'
61
- import TSplitter from './components/TSplitter.vue'
62
- import TStatCard from './components/TStatCard.vue'
63
- import TSteps from './components/TSteps.vue'
64
- import TSwitch from './components/TSwitch.vue'
65
- import TTable from './components/TTable.vue'
66
- import TTabs from './components/TTabs.vue'
67
- import TTextarea from './components/TTextarea.vue'
68
- import TThemeBasePicker from './components/TThemeBasePicker.vue'
69
- import TThemeScope from './components/TThemeScope.vue'
70
- import TToaster from './components/TToaster.vue'
71
- import TTooltip from './components/TTooltip.vue'
72
- import TTopbar from './components/TTopbar.vue'
73
- import TVectorMap from './components/TVectorMap.vue'
74
-
75
- export {
76
- TAccentPicker,
77
- TAdvancedTable,
78
- TAlert,
79
- TAppLayout,
80
- TAuthLayout,
81
- TAvatar,
82
- TBadge,
83
- TButton,
84
- TCard,
85
- TCheckbox,
86
- TCheckboxTree,
87
- TColorModeButton,
88
- TCommandPalette,
89
- TContainerPicker,
90
- TCopyButton,
91
- TDataGrid,
92
- TDataGridItem,
93
- TDensityPicker,
94
- TDropdown,
95
- TEditableTable,
96
- TEmpty,
97
- TFieldGroup,
98
- TFileUpload,
99
- TFontPicker,
100
- TFormField,
101
- TIcon,
102
- TIconPicker,
103
- TImageUpload,
104
- TInput,
105
- TInputNumber,
106
- TInputTags,
107
- TListBox,
108
- TLogView,
109
- TModal,
110
- TNav,
111
- TNavPositionPicker,
112
- TPage,
113
- TPagination,
114
- TPanelList,
115
- TProgress,
116
- TRadioGroup,
117
- TRadiusPicker,
118
- TRating,
119
- TScaledFrame,
120
- TSearchButton,
121
- TSectionLayout,
122
- TSelect,
123
- TSelectMenu,
124
- TSeparator,
125
- TShell,
126
- TSkeleton,
127
- TSlideover,
128
- TSparkline,
129
- TSpinner,
130
- TSplitter,
131
- TStatCard,
132
- TSteps,
133
- TSwitch,
134
- TTable,
135
- TTabs,
136
- TTextarea,
137
- TThemeBasePicker,
138
- TThemeScope,
139
- TToaster,
140
- TTooltip,
141
- TTopbar,
142
- TVectorMap
143
- }
144
-
145
- export * from './types'
146
- export { isCustomAccent, themeAccents, themeBases, themeContainers, themeDensities, themeFonts, themeNavs, themeRadii, themeRadiusSizes } from './theme'
147
- export { useColorMode, type ColorMode } from './composables/useColorMode'
148
- export { useCommandPalette } from './composables/useCommandPalette'
149
- export { useField } from './composables/useField'
150
- export { useToast, type Toast } from './composables/useToast'
151
-
152
- const components = {
153
- TAccentPicker, TAdvancedTable, TAlert, TAppLayout, TAuthLayout, TAvatar, TBadge, TButton, TCard,
154
- TCheckbox, TCheckboxTree, TColorModeButton, TCommandPalette, TContainerPicker, TCopyButton, TDataGrid, TDataGridItem, TDensityPicker,
155
- TDropdown, TEditableTable, TEmpty, TFieldGroup, TFileUpload, TFontPicker, TFormField, TIcon, TIconPicker, TImageUpload,
156
- TInput, TInputNumber, TInputTags, TListBox, TLogView, TModal, TNav, TNavPositionPicker, TPage, TPagination,
157
- TPanelList, TProgress, TRadioGroup, TRadiusPicker, TRating, TScaledFrame, TSearchButton, TSectionLayout,
158
- TSelect, TSelectMenu, TSeparator, TShell, TSkeleton, TSlideover, TSparkline, TSpinner, TSplitter, TStatCard,
159
- TSteps, TSwitch, TTable, TTabs, TTextarea, TThemeBasePicker, TThemeScope, TToaster, TTooltip,
160
- TTopbar, TVectorMap
161
- }
162
-
163
- export default {
164
- install(app: App) {
165
- for (const [name, component] of Object.entries(components)) app.component(name, component)
166
- }
167
- }
168
-
169
- declare module 'vue' {
170
- export interface GlobalComponents {
171
- TAccentPicker: typeof TAccentPicker
172
- TAdvancedTable: typeof TAdvancedTable
173
- TAlert: typeof TAlert
174
- TAppLayout: typeof TAppLayout
175
- TAuthLayout: typeof TAuthLayout
176
- TAvatar: typeof TAvatar
177
- TBadge: typeof TBadge
178
- TButton: typeof TButton
179
- TCard: typeof TCard
180
- TCheckbox: typeof TCheckbox
181
- TCheckboxTree: typeof TCheckboxTree
182
- TColorModeButton: typeof TColorModeButton
183
- TCommandPalette: typeof TCommandPalette
184
- TContainerPicker: typeof TContainerPicker
185
- TCopyButton: typeof TCopyButton
186
- TDataGrid: typeof TDataGrid
187
- TDataGridItem: typeof TDataGridItem
188
- TDensityPicker: typeof TDensityPicker
189
- TDropdown: typeof TDropdown
190
- TEditableTable: typeof TEditableTable
191
- TEmpty: typeof TEmpty
192
- TFieldGroup: typeof TFieldGroup
193
- TFileUpload: typeof TFileUpload
194
- TFontPicker: typeof TFontPicker
195
- TFormField: typeof TFormField
196
- TIcon: typeof TIcon
197
- TIconPicker: typeof TIconPicker
198
- TImageUpload: typeof TImageUpload
199
- TInput: typeof TInput
200
- TInputNumber: typeof TInputNumber
201
- TInputTags: typeof TInputTags
202
- TListBox: typeof TListBox
203
- TLogView: typeof TLogView
204
- TModal: typeof TModal
205
- TNav: typeof TNav
206
- TNavPositionPicker: typeof TNavPositionPicker
207
- TPage: typeof TPage
208
- TPagination: typeof TPagination
209
- TPanelList: typeof TPanelList
210
- TProgress: typeof TProgress
211
- TRadioGroup: typeof TRadioGroup
212
- TRadiusPicker: typeof TRadiusPicker
213
- TRating: typeof TRating
214
- TScaledFrame: typeof TScaledFrame
215
- TSearchButton: typeof TSearchButton
216
- TSectionLayout: typeof TSectionLayout
217
- TSelect: typeof TSelect
218
- TSelectMenu: typeof TSelectMenu
219
- TSeparator: typeof TSeparator
220
- TShell: typeof TShell
221
- TSkeleton: typeof TSkeleton
222
- TSlideover: typeof TSlideover
223
- TSparkline: typeof TSparkline
224
- TSpinner: typeof TSpinner
225
- TSplitter: typeof TSplitter
226
- TStatCard: typeof TStatCard
227
- TSteps: typeof TSteps
228
- TSwitch: typeof TSwitch
229
- TTable: typeof TTable
230
- TTabs: typeof TTabs
231
- TTextarea: typeof TTextarea
232
- TThemeBasePicker: typeof TThemeBasePicker
233
- TThemeScope: typeof TThemeScope
234
- TToaster: typeof TToaster
235
- TTooltip: typeof TTooltip
236
- TTopbar: typeof TTopbar
237
- TVectorMap: typeof TVectorMap
238
- }
239
- }
1
+ // Gears UI: Vue components on Tabler. Import the styles once (`@ternarytech-io/gears-ui/styles.css`), then either
2
+ // install the plugin (registers every component globally) or import components one by one.
3
+ // Components that need an optional library have their own entry points, so apps that don't use
4
+ // them don't need the library: `@ternarytech-io/gears-ui/code-editor` (Monaco) and `@ternarytech-io/gears-ui/plugins` (Tom
5
+ // Select, Coloris, Vanilla Calendar Pro, Dropzone, IMask, noUiSlider, SortableJS, HugeRTE).
6
+ import type { App } from 'vue'
7
+ import TAccentPicker from './components/TAccentPicker.vue'
8
+ import TAdvancedTable from './components/TAdvancedTable.vue'
9
+ import TAlert from './components/TAlert.vue'
10
+ import TAppLayout from './components/TAppLayout.vue'
11
+ import TAuthLayout from './components/TAuthLayout.vue'
12
+ import TAvatar from './components/TAvatar.vue'
13
+ import TBadge from './components/TBadge.vue'
14
+ import TButton from './components/TButton.vue'
15
+ import TButtonGroup from './components/TButtonGroup.vue'
16
+ import TCard from './components/TCard.vue'
17
+ import TCheckbox from './components/TCheckbox.vue'
18
+ import TCheckboxTree from './components/TCheckboxTree.vue'
19
+ import TColorModeButton from './components/TColorModeButton.vue'
20
+ import TCommandPalette from './components/TCommandPalette.vue'
21
+ import TContainerPicker from './components/TContainerPicker.vue'
22
+ import TCopyButton from './components/TCopyButton.vue'
23
+ import TDataGrid from './components/TDataGrid.vue'
24
+ import TDataGridItem from './components/TDataGridItem.vue'
25
+ import TDensityPicker from './components/TDensityPicker.vue'
26
+ import TDropdown from './components/TDropdown.vue'
27
+ import TEditableTable from './components/TEditableTable.vue'
28
+ import TEmpty from './components/TEmpty.vue'
29
+ import TFieldGroup from './components/TFieldGroup.vue'
30
+ import TFileUpload from './components/TFileUpload.vue'
31
+ import TFontPicker from './components/TFontPicker.vue'
32
+ import TFormField from './components/TFormField.vue'
33
+ import TIcon from './components/TIcon.vue'
34
+ import TIconPicker from './components/TIconPicker.vue'
35
+ import TImageUpload from './components/TImageUpload.vue'
36
+ import TInput from './components/TInput.vue'
37
+ import TLightbox from './components/TLightbox.vue'
38
+ import TInputNumber from './components/TInputNumber.vue'
39
+ import TInputTags from './components/TInputTags.vue'
40
+ import TListBox from './components/TListBox.vue'
41
+ import TLogView from './components/TLogView.vue'
42
+ import TModal from './components/TModal.vue'
43
+ import TNav from './components/TNav.vue'
44
+ import TNavPositionPicker from './components/TNavPositionPicker.vue'
45
+ import TPage from './components/TPage.vue'
46
+ import TPagination from './components/TPagination.vue'
47
+ import TPanelList from './components/TPanelList.vue'
48
+ import TProgress from './components/TProgress.vue'
49
+ import TRadioGroup from './components/TRadioGroup.vue'
50
+ import TRadiusPicker from './components/TRadiusPicker.vue'
51
+ import TRating from './components/TRating.vue'
52
+ import TScaledFrame from './components/TScaledFrame.vue'
53
+ import TSearchButton from './components/TSearchButton.vue'
54
+ import TSectionLayout from './components/TSectionLayout.vue'
55
+ import TSelect from './components/TSelect.vue'
56
+ import TSelectMenu from './components/TSelectMenu.vue'
57
+ import TSeparator from './components/TSeparator.vue'
58
+ import TShell from './components/TShell.vue'
59
+ import TSkeleton from './components/TSkeleton.vue'
60
+ import TSlideover from './components/TSlideover.vue'
61
+ import TSparkline from './components/TSparkline.vue'
62
+ import TSpinner from './components/TSpinner.vue'
63
+ import TSplitButton from './components/TSplitButton.vue'
64
+ import TSplitter from './components/TSplitter.vue'
65
+ import TStatCard from './components/TStatCard.vue'
66
+ import TSteps from './components/TSteps.vue'
67
+ import TSwitch from './components/TSwitch.vue'
68
+ import TTable from './components/TTable.vue'
69
+ import TTabs from './components/TTabs.vue'
70
+ import TTextarea from './components/TTextarea.vue'
71
+ import TThemeBasePicker from './components/TThemeBasePicker.vue'
72
+ import TThemeScope from './components/TThemeScope.vue'
73
+ import TToaster from './components/TToaster.vue'
74
+ import TTooltip from './components/TTooltip.vue'
75
+ import TTopbar from './components/TTopbar.vue'
76
+ import TVectorMap from './components/TVectorMap.vue'
77
+
78
+ export {
79
+ TAccentPicker,
80
+ TAdvancedTable,
81
+ TAlert,
82
+ TAppLayout,
83
+ TAuthLayout,
84
+ TAvatar,
85
+ TBadge,
86
+ TButton,
87
+ TButtonGroup,
88
+ TCard,
89
+ TCheckbox,
90
+ TCheckboxTree,
91
+ TColorModeButton,
92
+ TCommandPalette,
93
+ TContainerPicker,
94
+ TCopyButton,
95
+ TDataGrid,
96
+ TDataGridItem,
97
+ TDensityPicker,
98
+ TDropdown,
99
+ TEditableTable,
100
+ TEmpty,
101
+ TFieldGroup,
102
+ TFileUpload,
103
+ TFontPicker,
104
+ TFormField,
105
+ TIcon,
106
+ TIconPicker,
107
+ TImageUpload,
108
+ TInput,
109
+ TInputNumber,
110
+ TLightbox,
111
+ TInputTags,
112
+ TListBox,
113
+ TLogView,
114
+ TModal,
115
+ TNav,
116
+ TNavPositionPicker,
117
+ TPage,
118
+ TPagination,
119
+ TPanelList,
120
+ TProgress,
121
+ TRadioGroup,
122
+ TRadiusPicker,
123
+ TRating,
124
+ TScaledFrame,
125
+ TSearchButton,
126
+ TSectionLayout,
127
+ TSelect,
128
+ TSelectMenu,
129
+ TSeparator,
130
+ TShell,
131
+ TSkeleton,
132
+ TSlideover,
133
+ TSparkline,
134
+ TSpinner,
135
+ TSplitButton,
136
+ TSplitter,
137
+ TStatCard,
138
+ TSteps,
139
+ TSwitch,
140
+ TTable,
141
+ TTabs,
142
+ TTextarea,
143
+ TThemeBasePicker,
144
+ TThemeScope,
145
+ TToaster,
146
+ TTooltip,
147
+ TTopbar,
148
+ TVectorMap
149
+ }
150
+
151
+ export * from './types'
152
+ export type { LightboxImage } from './components/TLightbox.vue'
153
+ export { isCustomAccent, themeAccents, themeBases, themeContainers, themeDensities, themeFonts, themeNavs, themeRadii, themeRadiusSizes } from './theme'
154
+ export { useColorMode, type ColorMode } from './composables/useColorMode'
155
+ export { useCommandPalette } from './composables/useCommandPalette'
156
+ export { useField } from './composables/useField'
157
+ export { useToast, type Toast, type ToastPosition } from './composables/useToast'
158
+
159
+ const components = {
160
+ TAccentPicker, TAdvancedTable, TAlert, TAppLayout, TAuthLayout, TAvatar, TBadge, TButton, TButtonGroup, TCard,
161
+ TCheckbox, TCheckboxTree, TColorModeButton, TCommandPalette, TContainerPicker, TCopyButton, TDataGrid, TDataGridItem, TDensityPicker,
162
+ TDropdown, TEditableTable, TEmpty, TFieldGroup, TFileUpload, TFontPicker, TFormField, TIcon, TIconPicker, TImageUpload,
163
+ TInput, TInputNumber, TInputTags, TLightbox, TListBox, TLogView, TModal, TNav, TNavPositionPicker, TPage, TPagination,
164
+ TPanelList, TProgress, TRadioGroup, TRadiusPicker, TRating, TScaledFrame, TSearchButton, TSectionLayout,
165
+ TSelect, TSelectMenu, TSeparator, TShell, TSkeleton, TSlideover, TSparkline, TSpinner, TSplitButton, TSplitter, TStatCard,
166
+ TSteps, TSwitch, TTable, TTabs, TTextarea, TThemeBasePicker, TThemeScope, TToaster, TTooltip,
167
+ TTopbar, TVectorMap
168
+ }
169
+
170
+ export default {
171
+ install(app: App) {
172
+ for (const [name, component] of Object.entries(components)) app.component(name, component)
173
+ }
174
+ }
175
+
176
+ declare module 'vue' {
177
+ export interface GlobalComponents {
178
+ TAccentPicker: typeof TAccentPicker
179
+ TAdvancedTable: typeof TAdvancedTable
180
+ TAlert: typeof TAlert
181
+ TAppLayout: typeof TAppLayout
182
+ TAuthLayout: typeof TAuthLayout
183
+ TAvatar: typeof TAvatar
184
+ TBadge: typeof TBadge
185
+ TButton: typeof TButton
186
+ TButtonGroup: typeof TButtonGroup
187
+ TCard: typeof TCard
188
+ TCheckbox: typeof TCheckbox
189
+ TCheckboxTree: typeof TCheckboxTree
190
+ TColorModeButton: typeof TColorModeButton
191
+ TCommandPalette: typeof TCommandPalette
192
+ TContainerPicker: typeof TContainerPicker
193
+ TCopyButton: typeof TCopyButton
194
+ TDataGrid: typeof TDataGrid
195
+ TDataGridItem: typeof TDataGridItem
196
+ TDensityPicker: typeof TDensityPicker
197
+ TDropdown: typeof TDropdown
198
+ TEditableTable: typeof TEditableTable
199
+ TEmpty: typeof TEmpty
200
+ TFieldGroup: typeof TFieldGroup
201
+ TFileUpload: typeof TFileUpload
202
+ TFontPicker: typeof TFontPicker
203
+ TFormField: typeof TFormField
204
+ TIcon: typeof TIcon
205
+ TIconPicker: typeof TIconPicker
206
+ TImageUpload: typeof TImageUpload
207
+ TInput: typeof TInput
208
+ TLightbox: typeof TLightbox
209
+ TInputNumber: typeof TInputNumber
210
+ TInputTags: typeof TInputTags
211
+ TListBox: typeof TListBox
212
+ TLogView: typeof TLogView
213
+ TModal: typeof TModal
214
+ TNav: typeof TNav
215
+ TNavPositionPicker: typeof TNavPositionPicker
216
+ TPage: typeof TPage
217
+ TPagination: typeof TPagination
218
+ TPanelList: typeof TPanelList
219
+ TProgress: typeof TProgress
220
+ TRadioGroup: typeof TRadioGroup
221
+ TRadiusPicker: typeof TRadiusPicker
222
+ TRating: typeof TRating
223
+ TScaledFrame: typeof TScaledFrame
224
+ TSearchButton: typeof TSearchButton
225
+ TSectionLayout: typeof TSectionLayout
226
+ TSelect: typeof TSelect
227
+ TSelectMenu: typeof TSelectMenu
228
+ TSeparator: typeof TSeparator
229
+ TShell: typeof TShell
230
+ TSkeleton: typeof TSkeleton
231
+ TSlideover: typeof TSlideover
232
+ TSparkline: typeof TSparkline
233
+ TSpinner: typeof TSpinner
234
+ TSplitButton: typeof TSplitButton
235
+ TSplitter: typeof TSplitter
236
+ TStatCard: typeof TStatCard
237
+ TSteps: typeof TSteps
238
+ TSwitch: typeof TSwitch
239
+ TTable: typeof TTable
240
+ TTabs: typeof TTabs
241
+ TTextarea: typeof TTextarea
242
+ TThemeBasePicker: typeof TThemeBasePicker
243
+ TThemeScope: typeof TThemeScope
244
+ TToaster: typeof TToaster
245
+ TTooltip: typeof TTooltip
246
+ TTopbar: typeof TTopbar
247
+ TVectorMap: typeof TVectorMap
248
+ }
249
+ }
@@ -1,55 +1,62 @@
1
- // Gears UI's plugin components, on the libraries Tabler's plugins use. Each library is an optional
2
- // peer dependency that loads the first time its component is shown. Installing this plugin needs
3
- // all of them; to use only some, import those components from `@ternarytech-io/gears-ui/components/…` instead.
4
- import type { App } from 'vue'
5
- import TAdvancedSelect from '../components/TAdvancedSelect.vue'
6
- import TChart from '../components/TChart.vue'
7
- import TColorPicker from '../components/TColorPicker.vue'
8
- import TDatePicker from '../components/TDatePicker.vue'
9
- import TDropzone from '../components/TDropzone.vue'
10
- import TInputMask from '../components/TInputMask.vue'
11
- import TRangeSlider from '../components/TRangeSlider.vue'
12
- import TRichEditor from '../components/TRichEditor.vue'
13
- import TSortable from '../components/TSortable.vue'
14
- import TSortableTree from '../components/TSortableTree.vue'
15
-
16
- export {
17
- TAdvancedSelect,
18
- TChart,
19
- TColorPicker,
20
- TDatePicker,
21
- TDropzone,
22
- TInputMask,
23
- TRangeSlider,
24
- TRichEditor,
25
- TSortable,
26
- TSortableTree
27
- }
28
-
29
- export type { RichEditorPlugin } from './richEditor'
30
-
31
- const components = {
32
- TAdvancedSelect, TChart, TColorPicker, TDatePicker, TDropzone, TInputMask, TRangeSlider, TRichEditor,
33
- TSortable, TSortableTree
34
- }
35
-
36
- export const GearsUIPlugins = {
37
- install(app: App) {
38
- for (const [name, component] of Object.entries(components)) app.component(name, component)
39
- }
40
- }
41
-
42
- declare module 'vue' {
43
- export interface GlobalComponents {
44
- TAdvancedSelect: typeof TAdvancedSelect
45
- TChart: typeof TChart
46
- TColorPicker: typeof TColorPicker
47
- TDatePicker: typeof TDatePicker
48
- TDropzone: typeof TDropzone
49
- TInputMask: typeof TInputMask
50
- TRangeSlider: typeof TRangeSlider
51
- TRichEditor: typeof TRichEditor
52
- TSortable: typeof TSortable
53
- TSortableTree: typeof TSortableTree
54
- }
55
- }
1
+ // Gears UI's plugin components, on the libraries Tabler's plugins use. Each library is an optional
2
+ // peer dependency that loads the first time its component is shown. Installing this plugin needs
3
+ // all of them; to use only some, import those components from `@ternarytech-io/gears-ui/components/…` instead.
4
+ import type { App } from 'vue'
5
+ import TAdvancedSelect from '../components/TAdvancedSelect.vue'
6
+ import TChart from '../components/TChart.vue'
7
+ import TColorPicker from '../components/TColorPicker.vue'
8
+ import TDatePicker from '../components/TDatePicker.vue'
9
+ import TDropzone from '../components/TDropzone.vue'
10
+ import TInputMask from '../components/TInputMask.vue'
11
+ import TPdfViewer from '../components/TPdfViewer.vue'
12
+ import TRangeSlider from '../components/TRangeSlider.vue'
13
+ import TRichEditor from '../components/TRichEditor.vue'
14
+ import TSortable from '../components/TSortable.vue'
15
+ import TSortableTree from '../components/TSortableTree.vue'
16
+ import TTimeInput from '../components/TTimeInput.vue'
17
+
18
+ export {
19
+ TAdvancedSelect,
20
+ TChart,
21
+ TColorPicker,
22
+ TDatePicker,
23
+ TDropzone,
24
+ TInputMask,
25
+ TPdfViewer,
26
+ TRangeSlider,
27
+ TRichEditor,
28
+ TSortable,
29
+ TSortableTree,
30
+ TTimeInput
31
+ }
32
+
33
+ export type { RichEditorPlugin } from './richEditor'
34
+ export type { PdfZoom } from '../components/TPdfViewer.vue'
35
+
36
+ const components = {
37
+ TAdvancedSelect, TChart, TColorPicker, TDatePicker, TDropzone, TInputMask, TPdfViewer, TRangeSlider, TRichEditor,
38
+ TSortable, TSortableTree, TTimeInput
39
+ }
40
+
41
+ export const GearsUIPlugins = {
42
+ install(app: App) {
43
+ for (const [name, component] of Object.entries(components)) app.component(name, component)
44
+ }
45
+ }
46
+
47
+ declare module 'vue' {
48
+ export interface GlobalComponents {
49
+ TAdvancedSelect: typeof TAdvancedSelect
50
+ TChart: typeof TChart
51
+ TColorPicker: typeof TColorPicker
52
+ TDatePicker: typeof TDatePicker
53
+ TDropzone: typeof TDropzone
54
+ TInputMask: typeof TInputMask
55
+ TPdfViewer: typeof TPdfViewer
56
+ TRangeSlider: typeof TRangeSlider
57
+ TRichEditor: typeof TRichEditor
58
+ TSortable: typeof TSortable
59
+ TSortableTree: typeof TSortableTree
60
+ TTimeInput: typeof TTimeInput
61
+ }
62
+ }
@@ -0,0 +1,12 @@
1
+ // Loads PDF.js (Mozilla, Apache-2.0) the first time a TPdfViewer is shown, with its worker (which
2
+ // reads the PDF off the page's thread). The worker's address comes from the bundler (Vite's `?url`).
3
+ import { once } from './once'
4
+
5
+ export const loadPdfJs = once(async () => {
6
+ const [pdfjs, worker] = await Promise.all([
7
+ import('pdfjs-dist'),
8
+ import('pdfjs-dist/build/pdf.worker.min.mjs?url')
9
+ ])
10
+ pdfjs.GlobalWorkerOptions.workerSrc = worker.default
11
+ return pdfjs
12
+ })
@@ -667,3 +667,8 @@
667
667
  .t-chart { min-height: 1px; }
668
668
  .t-stat-sparkline { display: block; width: 100%; }
669
669
  .t-stat-sparkline svg { width: 100%; height: 2.25rem; }
670
+ /* A stat card that's a button: it lifts on hover and shows focus. */
671
+ .t-stat-clickable { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
672
+ .t-stat-clickable:hover { border-color: var(--tblr-primary); }
673
+ .t-stat-clickable:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; }
674
+ .t-stat-placeholder { height: 2rem; border-radius: var(--tblr-border-radius); }