forked from SolidOS/solid-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.js
More file actions
152 lines (126 loc) · 11.4 KB
/
Copy pathstyle.js
File metadata and controls
152 lines (126 loc) · 11.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// Common readable consistent stylesheet
// to avoid using style sheets which are document-global
// and make programmable style toggling with selection, drag over, etc easier
// These must all end with semicolon so they can be appended to.
const formBorderColor = '#888888' // Mid-grey
const lowProfileLinkColor = '#3B5998' // Grey-blue, e.g., for field labels linking to ontology
const formFieldNameBoxWidth = '8em' // The fixed amount to get form fields to line up
// The latter we put in when switching awy from using tables. Getting allignment between
// fields in different groups though is hard problem.
export const style = { // styleModule
checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',
checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',
fieldLabelStyle: 'color: #3B5998; text-decoration: none;',
formSelectSTyle:
'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
textInputStyle:
'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
textInputStyleUneditable: // Color difference only
'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',
textInputSize: 20, // Default text input size in characters roughly
buttonStyle:
'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;', // 'background-color: #eef;
commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',
iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',
smallButtonStyle: 'margin: 0.2em; width: 1em; height:1em;',
classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;', // combine with buttonStyle
confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',
tabBorderRadius: '0.2em',
messageBodyStyle:
'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',
pendingeditModifier: 'color: #bbb;',
highlightColor: '#7C4DFF', // Solid lavendar https://design.inrupt.com/atomic-core/?cat=Core
// Contacts
personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',
searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',
autocompleteRowStyle: 'border: 0.2em solid straw;',
// Login buttons
signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;', // was 0.5em radius
// Forms
heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;', // originally was brown; now grey
heading2Style: 'font-size: 130%; font-weight: bold; color: #888888; padding: 0.4em; margin: 0.7em 0.0em;', // originally was brown; now grey
heading3Style: 'font-size: 120%; font-weight: bold; color: #888888; padding: 0.3em; margin: 0.7em 0.0em;', // For example, in large forms or before a small form
heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // Lowest level used by default in small things
formBorderColor, // originally was brown; now grey
formHeadingColor: '#888888', // originally was brown; now grey
formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;', // originally was brown; now grey
formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;', // originally used this
formGroupStyle: [`padding-left: 0em; border: 0.0em solid ${formBorderColor}; border-radius: 0.2em;`, // weight 0
`padding-left: 2em; border: 0.05em solid ${formBorderColor}; border-radius: 0.2em;`,
`padding-left: 2em; border: 0.1em solid ${formBorderColor}; border-radius: 0.2em;`,
`padding-left: 2em; border: 0.2em solid ${formBorderColor}; border-radius: 0.2em;` // @@ pink
],
formFieldLabelStyle: `'color: ${lowProfileLinkColor}; text-decoration: none;'`,
formFieldNameBoxWidth,
formFieldNameBoxStyle: `padding: 0.3em; vertical-align: middle; width:${formFieldNameBoxWidth};`,
textInputBackgroundColor: '#eef',
textInputBackgroundColorUneditable: '#fff',
textInputColor: '#000',
textInputColorPending: '#888',
multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' +
' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',
// Buttons
renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',
imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',
linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',
// ACL
aclControlBoxContainer: 'margin: 1em',
aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',
aclControlBoxStatus: 'display: none; margin: 1rem 0',
aclControlBoxStatusRevealed: 'display: block',
aclGroupContent: 'maxWidth: 650',
accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',
accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',
defaultsController: 'display: flex',
defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',
bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',
group: 'color: #888',
group1: 'color: green',
group2: 'color: #cc0',
group3: 'color: orange',
group5: 'color: red',
group9: 'color: blue',
group13: 'color: purple',
trustedAppAddApplicationsTable: 'background-color: #eee',
trustedAppCancelButton: 'float: right',
trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',
temporaryStatusInit: 'background: green',
temporaryStatusEnd: 'background: transparent; transition: background 5s linear',
// header
headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none',
headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',
headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',
headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',
headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
headerUserMenuList: 'list-style: none; margin: 0; padding: 0',
headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',
headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',
headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',
headerUserMenuListItem: 'border-bottom: solid 1px #000000',
headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',
headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',
headerBannerLink: 'display: block',
headerBannerRightMenu: 'display: flex',
headerBannerLogin: 'margin-left: auto',
allChildrenVisible: 'display:true',
headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',
headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',
headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',
headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important', // may just be 65px round($icon-size * 352 / 322);
// footer
footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',
// buttons
primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out'
}
style.setStyle = function setStyle (ele, styleName) {
ele.style = style[styleName]
}
module.exports = style // @@ No way to do this in ESM