Skip to content

Commit c1a5fcc

Browse files
committed
Config - Add VueUiCarouselTable config
1 parent ca65db6 commit c1a5fcc

File tree

1 file changed

+107
-4
lines changed

1 file changed

+107
-4
lines changed

src/useConfig.js

Lines changed: 107 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ export function useConfig() {
8989
labels = false,
9090
fullscreen = false,
9191
sort = false,
92-
stack = false
92+
stack = false,
93+
animation = false
9394
}) => {
9495

9596
const buttonTitles = {
@@ -103,7 +104,8 @@ export function useConfig() {
103104
labels: 'Toggle labels',
104105
fullscreen: 'Toggle fullscreen',
105106
sort: "Toggle sort",
106-
stack: "Toggle stack mode"
107+
stack: "Toggle stack mode",
108+
animation: "Toggle animation"
107109
}
108110

109111
if (!tooltip) delete buttonTitles.tooltip
@@ -115,6 +117,7 @@ export function useConfig() {
115117
if (!fullscreen) delete buttonTitles.fullscreen
116118
if (!sort) delete buttonTitles.sort
117119
if (!stack) delete buttonTitles.stack
120+
if (!animation) delete buttonTitles.animation
118121

119122
return {
120123
show: true,
@@ -127,7 +130,8 @@ export function useConfig() {
127130
labels,
128131
fullscreen,
129132
sort,
130-
stack
133+
stack,
134+
animation
131135
},
132136
buttonTitles
133137
}
@@ -4247,6 +4251,104 @@ export function useConfig() {
42474251
}
42484252
}
42494253

4254+
const vue_ui_carousel_table = {
4255+
responsiveBreakpoint: 400,
4256+
userOptions: USER_OPTIONS({
4257+
tooltip: false,
4258+
pdf: true,
4259+
csv: true,
4260+
img: true,
4261+
table: false,
4262+
labels: false,
4263+
fullscreen: true,
4264+
stack: false,
4265+
animation: true
4266+
}),
4267+
animation: {
4268+
use: true,
4269+
speedMs: 1000,
4270+
pauseOnHover: true,
4271+
},
4272+
style: {
4273+
backgroundColor: COLOR_WHITE,
4274+
color: COLOR_BLACK,
4275+
fontFamily: 'inherit',
4276+
},
4277+
border: {
4278+
size: 0,
4279+
color: COLOR_BLACK
4280+
},
4281+
caption: {
4282+
text: '',
4283+
padding: PADDING([12, 12, 12, 12]),
4284+
style: {
4285+
backgroundColor: COLOR_WHITE,
4286+
color: COLOR_BLACK,
4287+
fontSize: `${FONT._16}px`,
4288+
fontWeight: 'bold',
4289+
textAlign: 'left'
4290+
}
4291+
},
4292+
thead: {
4293+
style: {
4294+
verticalAlign: 'middle',
4295+
},
4296+
tr: {
4297+
height: 32,
4298+
border: {
4299+
size: 0,
4300+
color: COLOR_BLACK
4301+
},
4302+
style: {
4303+
backgroundColor: COLOR_WHITE,
4304+
color: COLOR_BLACK,
4305+
boxShadow: `0px 6px 12px -6px ${COLOR_BLACK}50`
4306+
},
4307+
th: {
4308+
border: {
4309+
size: 0,
4310+
color: COLOR_BLACK
4311+
},
4312+
padding: PADDING([0, 12, 0, 0]),
4313+
style: {
4314+
borderSpacing: 0,
4315+
border: 'none',
4316+
textAlign: 'right',
4317+
fontVariantNumeric: 'tabular-nums',
4318+
}
4319+
}
4320+
},
4321+
},
4322+
tbody: {
4323+
tr: {
4324+
visible: 5,
4325+
height: 32,
4326+
border: {
4327+
size: 0,
4328+
color: COLOR_BLACK,
4329+
},
4330+
style: {
4331+
backgroundColor: COLOR_WHITE,
4332+
color: COLOR_BLACK
4333+
},
4334+
td: {
4335+
alternateColor: true,
4336+
alternateOpacity: 0.5,
4337+
border: {
4338+
size: 0,
4339+
color: COLOR_BLACK,
4340+
},
4341+
padding: PADDING([0, 12, 0, 0]),
4342+
style: {
4343+
fontVariantNumeric: 'tabular-nums',
4344+
textAlign: 'right',
4345+
backgroundColor: COLOR_GREY_LIGHT
4346+
}
4347+
}
4348+
}
4349+
}
4350+
}
4351+
42504352
return {
42514353
vue_ui_xy,
42524354
vue_ui_donut,
@@ -4289,6 +4391,7 @@ export function useConfig() {
42894391
vue_ui_flow,
42904392
vue_ui_parallel_coordinate_plot,
42914393
vue_ui_timer,
4394+
vue_ui_carousel_table,
42924395
// non chart components
42934396
vue_ui_cursor,
42944397
vue_ui_accordion,
@@ -4301,6 +4404,6 @@ export function useConfig() {
43014404
vue_ui_skeleton,
43024405
vue_ui_screenshot,
43034406
vue_ui_table,
4304-
vue_ui_digits
4407+
vue_ui_digits,
43054408
}
43064409
}

0 commit comments

Comments
 (0)