solid-ui 2.4.27-80358ddf → 2.4.27-9c4debb1

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.
Files changed (56) hide show
  1. package/dist/main.js +5648 -458
  2. package/dist/main.js.map +1 -1
  3. package/lib/acl/access-controller.d.ts +3 -2
  4. package/lib/acl/access-controller.d.ts.map +1 -1
  5. package/lib/acl/access-controller.js +15 -17
  6. package/lib/acl/access-controller.js.map +1 -1
  7. package/lib/acl/access-groups.d.ts.map +1 -1
  8. package/lib/acl/access-groups.js +8 -78
  9. package/lib/acl/access-groups.js.map +1 -1
  10. package/lib/acl/acl-control.d.ts.map +1 -1
  11. package/lib/acl/acl-control.js +11 -10
  12. package/lib/acl/acl-control.js.map +1 -1
  13. package/lib/acl/acl.d.ts +1 -1
  14. package/lib/acl/acl.js +1 -1
  15. package/lib/acl/acl.js.map +1 -1
  16. package/lib/acl/add-agent-buttons.d.ts.map +1 -1
  17. package/lib/acl/add-agent-buttons.js +3 -4
  18. package/lib/acl/add-agent-buttons.js.map +1 -1
  19. package/lib/acl/styles.d.ts +90 -0
  20. package/lib/acl/styles.d.ts.map +1 -0
  21. package/lib/acl/styles.js +98 -0
  22. package/lib/acl/styles.js.map +1 -0
  23. package/lib/footer/index.d.ts.map +1 -1
  24. package/lib/footer/index.js +1 -5
  25. package/lib/footer/index.js.map +1 -1
  26. package/lib/footer/styleMap.d.ts +8 -0
  27. package/lib/footer/styleMap.d.ts.map +1 -0
  28. package/lib/footer/styleMap.js +15 -0
  29. package/lib/footer/styleMap.js.map +1 -0
  30. package/lib/header/index.d.ts.map +1 -1
  31. package/lib/header/index.js +20 -33
  32. package/lib/header/index.js.map +1 -1
  33. package/lib/header/styleMap.d.ts +117 -0
  34. package/lib/header/styleMap.d.ts.map +1 -0
  35. package/lib/header/styleMap.js +139 -0
  36. package/lib/header/styleMap.js.map +1 -0
  37. package/lib/jss/index.d.ts +20 -0
  38. package/lib/jss/index.d.ts.map +1 -0
  39. package/lib/jss/index.js +47 -0
  40. package/lib/jss/index.js.map +1 -0
  41. package/lib/login/login.js +11 -11
  42. package/lib/login/login.js.map +1 -1
  43. package/lib/style.js +2 -57
  44. package/lib/style.js.map +1 -1
  45. package/lib/utils/headerFooterHelpers.d.ts +4 -0
  46. package/lib/utils/headerFooterHelpers.d.ts.map +1 -1
  47. package/lib/utils/headerFooterHelpers.js +27 -0
  48. package/lib/utils/headerFooterHelpers.js.map +1 -1
  49. package/lib/versionInfo.js +2 -2
  50. package/lib/versionInfo.js.map +1 -1
  51. package/lib/widgets/buttons.d.ts.map +1 -1
  52. package/lib/widgets/buttons.js +49 -43
  53. package/lib/widgets/buttons.js.map +1 -1
  54. package/lib/widgets/forms.js +8 -4
  55. package/lib/widgets/forms.js.map +1 -1
  56. package/package.json +3 -1
@@ -0,0 +1,117 @@
1
+ export declare const styleMap: {
2
+ 'header-user-menu': {};
3
+ 'header-user-menu__link': {
4
+ background: string;
5
+ border: string;
6
+ color: string;
7
+ cursor: string;
8
+ display: string;
9
+ fontFamily: string;
10
+ fontSize: string;
11
+ textAlign: string;
12
+ padding: string;
13
+ width: string;
14
+ '&:focus, &:hover': {
15
+ backgroundColor: string;
16
+ };
17
+ a: {
18
+ textDecoration: string;
19
+ };
20
+ };
21
+ 'header-user-menu__trigger': {
22
+ background: string;
23
+ border: string;
24
+ cursor: string;
25
+ width: string;
26
+ height: string;
27
+ img: {
28
+ borderRadius: string;
29
+ height: string;
30
+ width: string;
31
+ };
32
+ };
33
+ 'header-user-menu__button': {
34
+ background: string;
35
+ border: string;
36
+ color: string;
37
+ cursor: string;
38
+ display: string;
39
+ fontFamily: string;
40
+ fontSize: string;
41
+ textAlign: string;
42
+ padding: string;
43
+ width: string;
44
+ '&:focus, &:hover': {
45
+ backgroundColor: string;
46
+ };
47
+ };
48
+ 'header-user-menu__list': {
49
+ listStyle: string;
50
+ margin: string;
51
+ padding: string;
52
+ };
53
+ 'header-user-menu__navigation-menu': {
54
+ background: string;
55
+ border: string;
56
+ borderRight: string;
57
+ position: string;
58
+ right: string;
59
+ top: string;
60
+ width: string;
61
+ 'z-index': string;
62
+ '&[aria-hidden = true]': {
63
+ display: string;
64
+ };
65
+ };
66
+ 'header-user-menu__list-item': {
67
+ borderBottom: string;
68
+ '&:last-child': {
69
+ border: string;
70
+ };
71
+ };
72
+ 'header-user-menu__photo': {
73
+ borderRadius: string;
74
+ backgroundPosition: string;
75
+ backgroundRepeat: string;
76
+ backgroundSize: string;
77
+ height: string;
78
+ width: string;
79
+ };
80
+ 'header-banner': {
81
+ boxShadow: string;
82
+ display: string;
83
+ justifyContent: string;
84
+ padding: string;
85
+ marginBottom: string;
86
+ };
87
+ 'header-banner__link': {
88
+ display: string;
89
+ };
90
+ 'header-banner__right-menu': {
91
+ display: string;
92
+ };
93
+ 'header-banner__login': {
94
+ marginLeft: string;
95
+ input: {
96
+ margin: string;
97
+ padding: string;
98
+ };
99
+ };
100
+ 'header-banner__user-menu': {
101
+ borderLeft: string;
102
+ marginLeft: string;
103
+ };
104
+ 'header-banner__help-menu': {
105
+ borderLeft: string;
106
+ marginLeft: string;
107
+ };
108
+ 'header-banner__icon': {
109
+ backgroundSize: string;
110
+ height: string;
111
+ width: string;
112
+ };
113
+ 'header-banner__help-icon': {
114
+ width: string;
115
+ };
116
+ };
117
+ //# sourceMappingURL=styleMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleMap.d.ts","sourceRoot":"","sources":["../../src/header/styleMap.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsHpB,CAAA"}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.styleMap = void 0;
7
+ var styleMap = {
8
+ 'header-user-menu': {},
9
+ 'header-user-menu__link': {
10
+ background: 'none',
11
+ border: '0',
12
+ color: 'black',
13
+ cursor: 'pointer',
14
+ display: 'block',
15
+ fontFamily: 'Arial',
16
+ fontSize: '1em',
17
+ textAlign: 'left',
18
+ padding: '1em',
19
+ width: '100%',
20
+ '&:focus, &:hover': {
21
+ backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'
22
+ // backgroundColor: '#eee'
23
+ },
24
+
25
+ a: {
26
+ textDecoration: 'none'
27
+ }
28
+ },
29
+ 'header-user-menu__trigger': {
30
+ background: 'none',
31
+ border: '0',
32
+ cursor: 'pointer',
33
+ width: '60px',
34
+ // defined in mashlib as a SASS variable $icon_size
35
+ height: '60px',
36
+ // defined in mashlib as a SASS variable $icon_size
37
+ img: {
38
+ borderRadius: '50%',
39
+ height: '56px',
40
+ // defined in mashlib as a SASS variable $icon_size - 4px
41
+ width: '56px'
42
+ }
43
+ },
44
+ 'header-user-menu__button': {
45
+ background: 'none',
46
+ border: '0',
47
+ color: 'black',
48
+ cursor: 'pointer',
49
+ display: 'block',
50
+ fontFamily: 'Arial',
51
+ fontSize: '1em',
52
+ textAlign: 'left',
53
+ padding: '1em',
54
+ width: '100%',
55
+ '&:focus, &:hover': {
56
+ backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'
57
+ }
58
+ },
59
+ 'header-user-menu__list': {
60
+ listStyle: 'none',
61
+ margin: '0',
62
+ padding: '0'
63
+ },
64
+ 'header-user-menu__navigation-menu': {
65
+ background: 'white',
66
+ border: 'solid 1px #000000',
67
+ // the color was defined in mashlib as a SASS variable $divider_color
68
+ borderRight: '0',
69
+ position: 'absolute',
70
+ right: '0',
71
+ top: '60px',
72
+ // defined in mashlib as a SASS variable $icon_size
73
+ width: '200px',
74
+ 'z-index': '1',
75
+ '&[aria-hidden = true]': {
76
+ display: 'none'
77
+ }
78
+ },
79
+ 'header-user-menu__list-item': {
80
+ borderBottom: 'solid 1px #000000',
81
+ // the color was defined in mashlib as a SASS variable $divider_color
82
+ '&:last-child': {
83
+ border: '0'
84
+ }
85
+ },
86
+ 'header-user-menu__photo': {
87
+ borderRadius: '50%',
88
+ backgroundPosition: 'center',
89
+ backgroundRepeat: 'no-repeat',
90
+ backgroundSize: 'cover',
91
+ height: '50px',
92
+ // $icon-size - $image-margin * 2 image-margin was 5px in mashlib and icon size 60px
93
+ width: '50px'
94
+ },
95
+ 'header-banner': {
96
+ boxShadow: '0px 1px 4px #000000',
97
+ // the color was defined in mashlib as a SASS variable $divider_color
98
+ display: 'flex',
99
+ justifyContent: 'space-between',
100
+ padding: '0 1.5em',
101
+ marginBottom: '4px'
102
+ },
103
+ 'header-banner__link': {
104
+ display: 'block'
105
+ },
106
+ 'header-banner__right-menu': {
107
+ display: 'flex'
108
+ },
109
+ 'header-banner__login': {
110
+ marginLeft: 'auto',
111
+ input: {
112
+ // hacks to override the default style of login and signup button from solid-ui
113
+ margin: '0.75em 0 0.75em 0.5em !important',
114
+ padding: '0.5em !important'
115
+ }
116
+ },
117
+ 'header-banner__user-menu': {
118
+ borderLeft: 'solid 1px #000000',
119
+ // the color was defined in mashlib as a SASS variable $divider_color
120
+ marginLeft: 'auto'
121
+ },
122
+ 'header-banner__help-menu': {
123
+ borderLeft: 'solid 1px #000000',
124
+ // the color was defined in mashlib as a SASS variable $divider_color
125
+ marginLeft: 'auto'
126
+ },
127
+ 'header-banner__icon': {
128
+ backgroundSize: '65px 60px',
129
+ height: '60px !important',
130
+ // this is the icon size
131
+ width: '65px !important' // may just be 65px round($icon-size * 352 / 322);
132
+ },
133
+
134
+ 'header-banner__help-icon': {
135
+ width: '28px !important'
136
+ }
137
+ };
138
+ exports.styleMap = styleMap;
139
+ //# sourceMappingURL=styleMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleMap.js","names":["styleMap","background","border","color","cursor","display","fontFamily","fontSize","textAlign","padding","width","backgroundColor","a","textDecoration","height","img","borderRadius","listStyle","margin","borderRight","position","right","top","borderBottom","backgroundPosition","backgroundRepeat","backgroundSize","boxShadow","justifyContent","marginBottom","marginLeft","input","borderLeft","exports"],"sources":["../../src/header/styleMap.ts"],"sourcesContent":["export const styleMap = {\n 'header-user-menu': {\n },\n 'header-user-menu__link': {\n background: 'none',\n border: '0',\n color: 'black',\n cursor: 'pointer',\n display: 'block',\n fontFamily: 'Arial',\n fontSize: '1em',\n textAlign: 'left',\n padding: '1em',\n width: '100%',\n '&:focus, &:hover': {\n backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'\n // backgroundColor: '#eee'\n },\n a: {\n textDecoration: 'none'\n }\n },\n 'header-user-menu__trigger': {\n background: 'none',\n border: '0',\n cursor: 'pointer',\n width: '60px', // defined in mashlib as a SASS variable $icon_size\n height: '60px', // defined in mashlib as a SASS variable $icon_size\n img: {\n borderRadius: '50%',\n height: '56px', // defined in mashlib as a SASS variable $icon_size - 4px\n width: '56px'\n }\n },\n 'header-user-menu__button': {\n background: 'none',\n border: '0',\n color: 'black',\n cursor: 'pointer',\n display: 'block',\n fontFamily: 'Arial',\n fontSize: '1em',\n textAlign: 'left',\n padding: '1em',\n width: '100%',\n '&:focus, &:hover': {\n backgroundColor: 'linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)'\n }\n },\n 'header-user-menu__list': {\n listStyle: 'none',\n margin: '0',\n padding: '0'\n },\n 'header-user-menu__navigation-menu': {\n background: 'white',\n border: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n borderRight: '0',\n position: 'absolute',\n right: '0',\n top: '60px', // defined in mashlib as a SASS variable $icon_size\n width: '200px',\n 'z-index': '1',\n '&[aria-hidden = true]': {\n display: 'none'\n }\n },\n 'header-user-menu__list-item': {\n borderBottom: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n '&:last-child': {\n border: '0'\n }\n },\n 'header-user-menu__photo': {\n borderRadius: '50%',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: '50px', // $icon-size - $image-margin * 2 image-margin was 5px in mashlib and icon size 60px\n width: '50px'\n },\n 'header-banner': {\n boxShadow: '0px 1px 4px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n display: 'flex',\n justifyContent: 'space-between',\n padding: '0 1.5em',\n marginBottom: '4px'\n },\n 'header-banner__link': {\n display: 'block'\n },\n 'header-banner__right-menu': {\n display: 'flex'\n },\n 'header-banner__login': {\n marginLeft: 'auto',\n input: {\n // hacks to override the default style of login and signup button from solid-ui\n margin: '0.75em 0 0.75em 0.5em !important',\n padding: '0.5em !important'\n }\n },\n 'header-banner__user-menu': {\n borderLeft: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n marginLeft: 'auto'\n },\n 'header-banner__help-menu': {\n borderLeft: 'solid 1px #000000', // the color was defined in mashlib as a SASS variable $divider_color\n marginLeft: 'auto'\n },\n 'header-banner__icon': {\n backgroundSize: '65px 60px',\n height: '60px !important', // this is the icon size\n width: '65px !important' // may just be 65px round($icon-size * 352 / 322);\n },\n 'header-banner__help-icon': {\n width: '28px !important'\n }\n}\n"],"mappings":"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"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Contains [[getClasses]] and [[getStylesheet]] functions,
3
+ * usable as wrappers around JSS (A CSS authoring tool).
4
+ * See https://cssinjs.org/
5
+ * @packageDocumentation
6
+ */
7
+ import { Jss, Styles, StyleSheet } from 'jss';
8
+ /**
9
+ * returns a StyleSheet object.
10
+ * See https://cssinjs.org/ for more info about JSS.
11
+ * (despite the name, see https://github.com/solidos/solid-ui/issues/199)
12
+ */
13
+ export declare function getClasses(insertionPoint: HTMLElement, styles: Partial<Styles>): StyleSheet;
14
+ /**
15
+ * returns a JSS object.
16
+ * See https://cssinjs.org/ for more info about JSS.
17
+ * (despite the name, see https://github.com/solidos/solid-ui/issues/199)
18
+ */
19
+ export declare function getStylesheet(insertionPoint: HTMLElement): Jss;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jss/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAKrD;;;;GAIG;AACH,wBAAgB,UAAU,CAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,UAAU,CAG5F;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAE,cAAc,EAAE,WAAW,GAAG,GAAG,CAW/D"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getClasses = getClasses;
8
+ exports.getStylesheet = getStylesheet;
9
+ var _jss = require("jss");
10
+ var _jssPresetDefault = _interopRequireDefault(require("jss-preset-default"));
11
+ /**
12
+ * Contains [[getClasses]] and [[getStylesheet]] functions,
13
+ * usable as wrappers around JSS (A CSS authoring tool).
14
+ * See https://cssinjs.org/
15
+ * @packageDocumentation
16
+ */
17
+
18
+ var stylesheetsMap = new Map();
19
+
20
+ /**
21
+ * returns a StyleSheet object.
22
+ * See https://cssinjs.org/ for more info about JSS.
23
+ * (despite the name, see https://github.com/solidos/solid-ui/issues/199)
24
+ */
25
+ function getClasses(insertionPoint, styles) {
26
+ var stylesheet = getStylesheet(insertionPoint);
27
+ return stylesheet.createStyleSheet(styles).attach();
28
+ }
29
+
30
+ /**
31
+ * returns a JSS object.
32
+ * See https://cssinjs.org/ for more info about JSS.
33
+ * (despite the name, see https://github.com/solidos/solid-ui/issues/199)
34
+ */
35
+ function getStylesheet(insertionPoint) {
36
+ var cachedStylesheet = stylesheetsMap.get(insertionPoint);
37
+ if (cachedStylesheet) {
38
+ return cachedStylesheet;
39
+ }
40
+ var stylesheet = (0, _jss.create)({
41
+ insertionPoint: insertionPoint,
42
+ plugins: (0, _jssPresetDefault["default"])().plugins
43
+ });
44
+ stylesheetsMap.set(insertionPoint, stylesheet);
45
+ return stylesheet;
46
+ }
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_jss","require","_jssPresetDefault","_interopRequireDefault","stylesheetsMap","Map","getClasses","insertionPoint","styles","stylesheet","getStylesheet","createStyleSheet","attach","cachedStylesheet","get","create","plugins","preset","set"],"sources":["../../src/jss/index.ts"],"sourcesContent":["/**\n * Contains [[getClasses]] and [[getStylesheet]] functions,\n * usable as wrappers around JSS (A CSS authoring tool).\n * See https://cssinjs.org/\n * @packageDocumentation\n */\n\nimport { create, Jss, Styles, StyleSheet } from 'jss'\nimport preset from 'jss-preset-default'\n\nconst stylesheetsMap = new Map<HTMLElement, Jss>()\n\n/**\n * returns a StyleSheet object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getClasses (insertionPoint: HTMLElement, styles: Partial<Styles>): StyleSheet {\n const stylesheet = getStylesheet(insertionPoint)\n return stylesheet.createStyleSheet(styles).attach()\n}\n\n/**\n * returns a JSS object.\n * See https://cssinjs.org/ for more info about JSS.\n * (despite the name, see https://github.com/solidos/solid-ui/issues/199)\n */\nexport function getStylesheet (insertionPoint: HTMLElement): Jss {\n const cachedStylesheet = stylesheetsMap.get(insertionPoint)\n if (cachedStylesheet) {\n return cachedStylesheet\n }\n const stylesheet = create({\n insertionPoint,\n plugins: preset().plugins\n })\n stylesheetsMap.set(insertionPoint, stylesheet)\n return stylesheet\n}\n"],"mappings":";;;;;;;;AAOA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;;AAKA,IAAMG,cAAc,GAAG,IAAIC,GAAG,EAAoB;;AAElD;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAEC,cAA2B,EAAEC,MAAuB,EAAc;EAC5F,IAAMC,UAAU,GAAGC,aAAa,CAACH,cAAc,CAAC;EAChD,OAAOE,UAAU,CAACE,gBAAgB,CAACH,MAAM,CAAC,CAACI,MAAM,EAAE;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASF,aAAaA,CAAEH,cAA2B,EAAO;EAC/D,IAAMM,gBAAgB,GAAGT,cAAc,CAACU,GAAG,CAACP,cAAc,CAAC;EAC3D,IAAIM,gBAAgB,EAAE;IACpB,OAAOA,gBAAgB;EACzB;EACA,IAAMJ,UAAU,GAAG,IAAAM,WAAM,EAAC;IACxBR,cAAc,EAAdA,cAAc;IACdS,OAAO,EAAE,IAAAC,4BAAM,GAAE,CAACD;EACpB,CAAC,CAAC;EACFZ,cAAc,CAACc,GAAG,CAACX,cAAc,EAAEE,UAAU,CAAC;EAC9C,OAAOA,UAAU;AACnB"}
@@ -24,10 +24,10 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
24
24
  var _rdflib = require("rdflib");
25
25
  var _solidLogic = require("solid-logic");
26
26
  var debug = _interopRequireWildcard(require("../debug"));
27
- var style = _interopRequireWildcard(require("../style"));
28
27
  var _log = require("../log");
29
28
  var ns = _interopRequireWildcard(require("../ns.js"));
30
29
  var _signup = require("../signup/signup.js");
30
+ var _style = require("../style");
31
31
  var utils = _interopRequireWildcard(require("../utils"));
32
32
  var widgets = _interopRequireWildcard(require("../widgets"));
33
33
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -576,7 +576,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
576
576
  box.appendChild(signInPopUpButton);
577
577
  signInPopUpButton.setAttribute('type', 'button');
578
578
  signInPopUpButton.setAttribute('value', 'Log in');
579
- signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;").concat(style.headerBannerLoginInput));
579
+ signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;"));
580
580
  _solidLogic.authSession.onLogin(function () {
581
581
  var me = _solidLogic.authn.currentUser();
582
582
  // const sessionInfo = authSession.info
@@ -1008,12 +1008,12 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1008
1008
  box.appendChild(dom.createElement('hr')); // @@
1009
1009
 
1010
1010
  var p = box.appendChild(dom.createElement('p'));
1011
- p.setAttribute('style', style.commentStyle);
1011
+ p.style = _style.commentStyle;
1012
1012
  p.textContent = "Where would you like to store the data for the ".concat(noun, "?\n Give the URL of the folder where you would like the data stored.\n It can be anywhere in solid world - this URI is just an idea.");
1013
1013
  // @@ TODO Remove the need to cast baseField to any
1014
1014
  var baseField = box.appendChild(dom.createElement('input'));
1015
1015
  baseField.setAttribute('type', 'text');
1016
- baseField.setAttribute('style', style.textInputStyle);
1016
+ baseField.style = _style.textInputStyle;
1017
1017
  baseField.size = 80; // really a string
1018
1018
  baseField.label = 'base URL';
1019
1019
  baseField.autocomplete = 'on';
@@ -1025,7 +1025,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1025
1025
  box.appendChild(dom.createElement('br')); // @@
1026
1026
 
1027
1027
  var button = box.appendChild(dom.createElement('button'));
1028
- button.setAttribute('style', style.buttonStyle);
1028
+ button.style = _style.buttonStyle;
1029
1029
  button.textContent = "Start new ".concat(noun, " at this URI");
1030
1030
  button.addEventListener('click', function (_event) {
1031
1031
  var newBase = baseField.value.replace(' ', '%20'); // do not re-encode in general, as % encodings may exist
@@ -1043,7 +1043,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1043
1043
  // Ignore master workspaces
1044
1044
  ns.space('MasterWorkspace'));
1045
1045
  });
1046
- var col1, col2, col3, tr, ws, localStyle, comment;
1046
+ var col1, col2, col3, tr, ws, style, comment;
1047
1047
  var cellStyle = 'height: 3em; margin: 1em; padding: 1em white; border-radius: 0.3em;';
1048
1048
  var deselectedStyle = "".concat(cellStyle, "border: 0px;");
1049
1049
  // const selectedStyle = cellStyle + 'border: 1px solid black;'
@@ -1058,8 +1058,8 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1058
1058
  tr.appendChild(col1);
1059
1059
  }
1060
1060
  col2 = dom.createElement('td');
1061
- localStyle = _solidLogic.solidLogicSingleton.store.anyValue(ws, ns.ui('style'));
1062
- if (!localStyle) {
1061
+ style = _solidLogic.solidLogicSingleton.store.anyValue(ws, ns.ui('style'));
1062
+ if (!style) {
1063
1063
  // Otherwise make up arbitrary colour
1064
1064
  var hash = function hash(x) {
1065
1065
  return x.split('').reduce(function (a, b) {
@@ -1068,9 +1068,9 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1068
1068
  }, 0);
1069
1069
  };
1070
1070
  var bgcolor = "#".concat((hash(ws.uri) & 0xffffff | 0xc0c0c0).toString(16)); // c0c0c0 forces pale
1071
- localStyle = "color: black ; background-color: ".concat(bgcolor, ";");
1071
+ style = "color: black ; background-color: ".concat(bgcolor, ";");
1072
1072
  }
1073
- col2.setAttribute('style', deselectedStyle + localStyle);
1073
+ col2.setAttribute('style', deselectedStyle + style);
1074
1074
  tr.target = ws.uri;
1075
1075
  var label = _solidLogic.solidLogicSingleton.store.any(ws, ns.rdfs('label'));
1076
1076
  if (!label) {
@@ -1090,7 +1090,7 @@ function selectWorkspace(dom, appDetails, callbackWS) {
1090
1090
  comment = comment ? comment.value : 'Use this workspace';
1091
1091
  col2.addEventListener('click', function (_event) {
1092
1092
  col3.textContent = comment ? comment.value : '';
1093
- col3.setAttribute('style', deselectedStyle + localStyle);
1093
+ col3.setAttribute('style', deselectedStyle + style);
1094
1094
  var button = dom.createElement('button');
1095
1095
  button.textContent = 'Continue';
1096
1096
  // button.setAttribute('style', style);