@descope/web-components-ui 1.0.365 → 1.0.366

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,56 @@
1
+ import globals from '../../globals';
2
+ import { getThemeRefs, createHelperVars, useVar } from '../../../helpers/themeHelpers';
3
+ import { ListClass, componentName } from '../../../components/descope-list/ListClass';
4
+
5
+ const globalRefs = getThemeRefs(globals);
6
+
7
+ const compVars = ListClass.cssVarList;
8
+
9
+ const [helperTheme, helperRefs, helperVars] = createHelperVars(
10
+ { shadowColor: '#00000020' },
11
+ componentName
12
+ );
13
+
14
+ const { shadowColor } = helperRefs;
15
+
16
+ const list = {
17
+ ...helperTheme,
18
+
19
+ [compVars.hostWidth]: '100%',
20
+ [compVars.backgroundColor]: globalRefs.colors.surface.main,
21
+ [compVars.fontFamily]: globalRefs.fonts.font1.family,
22
+ [compVars.borderColor]: globalRefs.colors.surface.light,
23
+ [compVars.borderStyle]: 'solid',
24
+ [compVars.borderWidth]: globalRefs.border.xs,
25
+ [compVars.borderRadius]: globalRefs.radius.sm,
26
+ [compVars.gap]: globalRefs.spacing.md,
27
+ [compVars.verticalPadding]: globalRefs.spacing.lg,
28
+ [compVars.horizontalPadding]: globalRefs.spacing.lg,
29
+ [compVars.boxShadow]: `${globalRefs.shadow.wide.sm} ${shadowColor}, ${globalRefs.shadow.narrow.sm} ${shadowColor}`,
30
+ [compVars.maxHeight]: '100%',
31
+ [compVars.hostDirection]: globalRefs.direction,
32
+ [compVars.minItemsWidth]: '150px',
33
+
34
+ _empty: {
35
+ [compVars.minHeight]: '150px',
36
+ [compVars.emptyStateTextColor]: globalRefs.colors.surface.dark,
37
+ [compVars.emptyStateTextFontFamily]: globalRefs.fonts.font1.family,
38
+ },
39
+
40
+ variant: {
41
+ tiles: {
42
+ [compVars.gridTemplateColumns]: `repeat(auto-fit, minmax(min(${useVar(
43
+ compVars.minItemsWidth
44
+ )}, 100%), 1fr))`,
45
+ [compVars.maxItemsWidth]: '200px',
46
+ [compVars.itemsHorizontalAlign]: 'center',
47
+ },
48
+ },
49
+ };
50
+
51
+ export default list;
52
+
53
+ export const vars = {
54
+ ...compVars,
55
+ ...helperVars,
56
+ };
@@ -0,0 +1,41 @@
1
+ import globals from '../../globals';
2
+ import { getThemeRefs } from '../../../helpers/themeHelpers';
3
+ import { ListItemClass } from '../../../components/descope-list/ListItemClass';
4
+
5
+ const globalRefs = getThemeRefs(globals);
6
+
7
+ export const vars = ListItemClass.cssVarList;
8
+
9
+ const list = {
10
+ [vars.backgroundColor]: globalRefs.colors.surface.main,
11
+ [vars.padding]: globalRefs.spacing.lg,
12
+ [vars.gap]: globalRefs.spacing.md,
13
+ [vars.borderStyle]: 'solid',
14
+ [vars.borderWidth]: globalRefs.border.xs,
15
+ [vars.borderColor]: globalRefs.colors.surface.main,
16
+ [vars.borderRadius]: globalRefs.radius.sm,
17
+ [vars.cursor]: 'pointer',
18
+ [vars.alignItems]: 'center',
19
+ [vars.flexDirection]: 'row',
20
+ [vars.transition]: 'border-color 0.2s, background-color 0.2s',
21
+
22
+ variant: {
23
+ tile: {
24
+ [vars.alignItems]: 'flex-start',
25
+ [vars.flexDirection]: 'column',
26
+ [vars.borderColor]: globalRefs.colors.surface.light,
27
+ },
28
+ },
29
+
30
+ _hover: {
31
+ [vars.backgroundColor]: globalRefs.colors.surface.highlight,
32
+ },
33
+
34
+ _active: {
35
+ [vars.backgroundColor]: globalRefs.colors.surface.main,
36
+ [vars.borderColor]: globalRefs.colors.primary.light,
37
+ [vars.outline]: `1px solid ${globalRefs.colors.primary.light}`,
38
+ },
39
+ };
40
+
41
+ export default list;