fwtoolkit 0.1.0-alpha.2 → 0.1.0-alpha.5
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/README.md +24 -8
- package/css/add_remove_dialog.css +18 -0
- package/css/alerts.css +69 -0
- package/css/buttons.css +373 -0
- package/css/colors.css +118 -0
- package/css/common.css +183 -0
- package/css/content_menu.css +105 -0
- package/css/data_table.css +191 -0
- package/css/dialog.css +151 -0
- package/css/dialog_table.css +125 -0
- package/css/faq_dialog.css +16 -0
- package/css/file_selector.css +25 -0
- package/css/forms.css +112 -0
- package/css/loader.css +38 -0
- package/css/overview_menu.css +187 -0
- package/css/pulldown.css +114 -0
- package/css/ui_dialogs.css +144 -0
- package/css/ui_tabs.css +61 -0
- package/package.json +3 -2
- package/src/basic.js +3 -3
- package/src/datatable_bulk.js +2 -2
- package/src/dialog.js +1 -1
- package/src/faq_dialog.js +3 -3
- package/src/file/dialog.js +6 -6
- package/src/file/index.js +4 -4
- package/src/file/new_folder_dialog.js +2 -2
- package/src/file/selector.js +2 -2
- package/src/file/templates.js +1 -1
- package/src/file/tools.js +2 -2
- package/src/index.js +17 -17
- package/src/network.js +1 -1
- package/src/overview_menu.js +1 -1
- package/src/templates.js +2 -2
- package/src/user.js +1 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
.ui-widget-overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
left: 0;
|
|
4
|
+
top: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
background-color: rgb(var(--overlay-color));
|
|
8
|
+
z-index: 100;
|
|
9
|
+
backdrop-filter: blur(2px);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ui-widget-overlay.no-blur {
|
|
13
|
+
backdrop-filter: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ui-dialog {
|
|
17
|
+
position: absolute;
|
|
18
|
+
padding: 19px;
|
|
19
|
+
background-color: var(--cs-light-background);
|
|
20
|
+
border: solid 1px var(--cs-light-border);
|
|
21
|
+
box-shadow: 0 0 10px var(--cs-light-box-shadow);
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
outline: 0;
|
|
26
|
+
z-index: 1000; /* Ensure dialog stays on top */
|
|
27
|
+
user-select: none; /* Prevent interaction with background content */
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ui-dialog-titlebar {
|
|
31
|
+
position: relative;
|
|
32
|
+
padding: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ui-dialog-title {
|
|
36
|
+
font-size: 16px;
|
|
37
|
+
font-weight: 700;
|
|
38
|
+
text-transform: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ui-dialog-buttonpane {
|
|
42
|
+
padding-top: 20px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ui-button {
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
line-height: 1em;
|
|
48
|
+
border: none;
|
|
49
|
+
background: none;
|
|
50
|
+
padding: 0;
|
|
51
|
+
margin: 0;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ui-dialog-titlebar-close,
|
|
56
|
+
.ui-dialog-titlebar-help {
|
|
57
|
+
position: absolute;
|
|
58
|
+
right: 0.3em;
|
|
59
|
+
top: 50%;
|
|
60
|
+
width: 20px;
|
|
61
|
+
margin: -10px 0 0;
|
|
62
|
+
padding: 1px;
|
|
63
|
+
height: 20px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ui-button-icon-only {
|
|
67
|
+
width: 2em;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
text-indent: -9999px;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ui-button-icon-only .ui-icon {
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 50%;
|
|
76
|
+
left: 50%;
|
|
77
|
+
margin-top: -8px;
|
|
78
|
+
margin-left: -8px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ui-button-icon-only .ui-icon::before {
|
|
82
|
+
text-indent: 5019px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Style for the close button specifically */
|
|
86
|
+
.ui-dialog-titlebar-close {
|
|
87
|
+
order: 99; /* Push to end of flex container */
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ui-dialog-titlebar-close:hover,
|
|
91
|
+
.ui-dialog-titlebar-help:hover {
|
|
92
|
+
color: var(--cs-dark-hover);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ui-icon-closethick::before {
|
|
96
|
+
width: 0.7em;
|
|
97
|
+
height: 1em;
|
|
98
|
+
padding-top: 5px;
|
|
99
|
+
content: "\f00d";
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ui-icon-help::before {
|
|
103
|
+
width: 0.7em;
|
|
104
|
+
height: 1em;
|
|
105
|
+
padding-top: 5px;
|
|
106
|
+
content: "\f128";
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ui-dialog-content {
|
|
110
|
+
position: relative;
|
|
111
|
+
margin-top: 24px;
|
|
112
|
+
overflow: auto;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.ui-dialog-buttonset {
|
|
116
|
+
position: relative;
|
|
117
|
+
text-align: right;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ui-dialog-buttonset .fw-button {
|
|
121
|
+
margin-left: 6px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Make focus visible on all focusable elements */
|
|
125
|
+
.ui-dialog *:focus {
|
|
126
|
+
outline: 2px solid var(--cs-dark-background);
|
|
127
|
+
outline-offset: 2px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Style the title bar buttons specifically */
|
|
131
|
+
.ui-dialog-titlebar .ui-button-icon-only {
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 50%;
|
|
134
|
+
transform: translateY(-50%);
|
|
135
|
+
padding: 8px;
|
|
136
|
+
background: transparent;
|
|
137
|
+
border: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ui-dialog-titlebar .ui-button-icon-only:focus {
|
|
141
|
+
outline: 2px solid var(--cs-dark-text);
|
|
142
|
+
outline-offset: 2px;
|
|
143
|
+
border-radius: 4px;
|
|
144
|
+
}
|
package/css/ui_tabs.css
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.ui-tabs-nav {
|
|
2
|
+
display: flex;
|
|
3
|
+
border-bottom: 2px solid var(--tabs-border-color);
|
|
4
|
+
margin-bottom: 16px;
|
|
5
|
+
height: auto;
|
|
6
|
+
width: auto;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.ui-tabs-nav > li {
|
|
10
|
+
position: relative;
|
|
11
|
+
padding: 6px 18px;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
color: var(--tabs-text-inactive);
|
|
15
|
+
border-bottom: 3px solid transparent;
|
|
16
|
+
margin-bottom: -2px;
|
|
17
|
+
transition: color 0.15s, border-color 0.15s;
|
|
18
|
+
float: none;
|
|
19
|
+
margin-right: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ui-tabs-nav > li:hover {
|
|
23
|
+
color: var(--tabs-text-active);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ui-tabs-nav .fw-button {
|
|
27
|
+
color: var(--tabs-text-inactive);
|
|
28
|
+
border: none;
|
|
29
|
+
background: transparent;
|
|
30
|
+
padding: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ui-tabs-nav .ui-tabs-active,
|
|
34
|
+
.ui-tabs-nav .current-tab {
|
|
35
|
+
color: var(--tabs-text-active);
|
|
36
|
+
border-bottom-color: var(--tabs-indicator-color);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ui-tabs-nav .ui-tabs-active .fw-button,
|
|
40
|
+
.ui-tabs-nav .current-tab .fw-button {
|
|
41
|
+
color: var(--tabs-text-active);
|
|
42
|
+
background: transparent;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ui-tabs-nav > li:hover .fw-button {
|
|
46
|
+
color: var(--tabs-text-active);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ui-tabs-panel {
|
|
50
|
+
height: auto;
|
|
51
|
+
overflow: auto;
|
|
52
|
+
min-height: 220px;
|
|
53
|
+
padding: 0;
|
|
54
|
+
margin-top: 24px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tab-link-inner {
|
|
58
|
+
display: block;
|
|
59
|
+
margin-left: 20px;
|
|
60
|
+
color: var(--cs-light-text-secondary);
|
|
61
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fwtoolkit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
4
|
-
"description": "Fidus Writer Toolkit — reusable utilities
|
|
3
|
+
"version": "0.1.0-alpha.5",
|
|
4
|
+
"description": "Fidus Writer Toolkit — reusable utilities, UI helpers and styles for Fidus Writer and other applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "LGPL-3.0-or-later",
|
|
7
7
|
"repository": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"author": "Johannes Wilm",
|
|
12
12
|
"files": [
|
|
13
13
|
"src/",
|
|
14
|
+
"css/",
|
|
14
15
|
"README.md",
|
|
15
16
|
"LICENSE"
|
|
16
17
|
],
|
package/src/basic.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {keyName} from "w3c-keyname"
|
|
2
2
|
|
|
3
|
-
import {ContentMenu} from "./content_menu"
|
|
4
|
-
import {Dialog} from "./dialog"
|
|
5
|
-
import {isActivationEvent} from "./events"
|
|
3
|
+
import {ContentMenu} from "./content_menu.js"
|
|
4
|
+
import {Dialog} from "./dialog.js"
|
|
5
|
+
import {isActivationEvent} from "./events.js"
|
|
6
6
|
|
|
7
7
|
/** Creates a styled select with a contentmenu from a select tag.
|
|
8
8
|
* @param select The select-tag which is to be replaced.
|
package/src/datatable_bulk.js
CHANGED
package/src/dialog.js
CHANGED
package/src/faq_dialog.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {escapeText} from "./basic"
|
|
2
|
-
import {Dialog} from "./dialog"
|
|
3
|
-
import {ensureCSS} from "./network"
|
|
1
|
+
import {escapeText} from "./basic.js"
|
|
2
|
+
import {Dialog} from "./dialog.js"
|
|
3
|
+
import {ensureCSS} from "./network.js"
|
|
4
4
|
|
|
5
5
|
const faqTemplate = ({escapedQuestions}) =>
|
|
6
6
|
`<div class="faq">
|
package/src/file/dialog.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {Dialog} from "../dialog"
|
|
2
|
-
import {FileSelector} from "./selector"
|
|
3
|
-
import {addAlert} from "../basic"
|
|
4
|
-
import {NewFolderDialog} from "./new_folder_dialog"
|
|
5
|
-
import {moveTemplate} from "./templates"
|
|
6
|
-
import {moveFile, shortFileTitle} from "./tools"
|
|
1
|
+
import {Dialog} from "../dialog.js"
|
|
2
|
+
import {FileSelector} from "./selector.js"
|
|
3
|
+
import {addAlert} from "../basic.js"
|
|
4
|
+
import {NewFolderDialog} from "./new_folder_dialog.js"
|
|
5
|
+
import {moveTemplate} from "./templates.js"
|
|
6
|
+
import {moveFile, shortFileTitle} from "./tools.js"
|
|
7
7
|
/**
|
|
8
8
|
* Functions for the document move dialog.
|
|
9
9
|
*/
|
package/src/file/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export {FileDialog} from "./dialog"
|
|
2
|
-
export {FileSelector} from "./selector"
|
|
1
|
+
export {FileDialog} from "./dialog.js"
|
|
2
|
+
export {FileSelector} from "./selector.js"
|
|
3
3
|
export {
|
|
4
4
|
cleanPath,
|
|
5
5
|
moveFile,
|
|
6
6
|
shortFileTitle,
|
|
7
7
|
longFilePath
|
|
8
|
-
} from "./tools"
|
|
9
|
-
export {NewFolderDialog} from "./new_folder_dialog"
|
|
8
|
+
} from "./tools.js"
|
|
9
|
+
export {NewFolderDialog} from "./new_folder_dialog.js"
|
package/src/file/selector.js
CHANGED
package/src/file/templates.js
CHANGED
package/src/file/tools.js
CHANGED
package/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {OverviewMenuView} from "./overview_menu"
|
|
1
|
+
export {OverviewMenuView} from "./overview_menu.js"
|
|
2
2
|
export {
|
|
3
3
|
dropdownSelect,
|
|
4
4
|
setCheckableLabel,
|
|
@@ -17,13 +17,13 @@ export {
|
|
|
17
17
|
whenReady,
|
|
18
18
|
setDocTitle,
|
|
19
19
|
showSystemMessage
|
|
20
|
-
} from "./basic"
|
|
20
|
+
} from "./basic.js"
|
|
21
21
|
|
|
22
|
-
export {convertDataURIToBlob} from "./blob"
|
|
22
|
+
export {convertDataURIToBlob} from "./blob.js"
|
|
23
23
|
|
|
24
|
-
export {isActivationEvent} from "./events"
|
|
24
|
+
export {isActivationEvent} from "./events.js"
|
|
25
25
|
|
|
26
|
-
export {getFocusIndex, setFocusIndex} from "./focus"
|
|
26
|
+
export {getFocusIndex, setFocusIndex} from "./focus.js"
|
|
27
27
|
|
|
28
28
|
export {
|
|
29
29
|
get,
|
|
@@ -33,19 +33,19 @@ export {
|
|
|
33
33
|
postBare,
|
|
34
34
|
ensureCSS,
|
|
35
35
|
getCookie
|
|
36
|
-
} from "./network"
|
|
36
|
+
} from "./network.js"
|
|
37
37
|
export {
|
|
38
38
|
setLanguage,
|
|
39
39
|
avatarTemplate
|
|
40
|
-
} from "./user"
|
|
41
|
-
export {Dialog} from "./dialog"
|
|
42
|
-
export {ContentMenu} from "./content_menu"
|
|
43
|
-
export {makeWorker} from "./worker"
|
|
44
|
-
export {baseBodyTemplate} from "./templates"
|
|
45
|
-
export {WebSocketConnector} from "./ws"
|
|
46
|
-
export {filterPrimaryEmail} from "./user_util"
|
|
47
|
-
export {DatatableBulk} from "./datatable_bulk"
|
|
48
|
-
export {faqDialog} from "./faq_dialog"
|
|
40
|
+
} from "./user.js"
|
|
41
|
+
export {Dialog} from "./dialog.js"
|
|
42
|
+
export {ContentMenu} from "./content_menu.js"
|
|
43
|
+
export {makeWorker} from "./worker.js"
|
|
44
|
+
export {baseBodyTemplate} from "./templates.js"
|
|
45
|
+
export {WebSocketConnector} from "./ws.js"
|
|
46
|
+
export {filterPrimaryEmail} from "./user_util.js"
|
|
47
|
+
export {DatatableBulk} from "./datatable_bulk.js"
|
|
48
|
+
export {faqDialog} from "./faq_dialog.js"
|
|
49
49
|
export {
|
|
50
50
|
FileDialog,
|
|
51
51
|
FileSelector,
|
|
@@ -54,8 +54,8 @@ export {
|
|
|
54
54
|
shortFileTitle,
|
|
55
55
|
longFilePath,
|
|
56
56
|
NewFolderDialog
|
|
57
|
-
} from "./file"
|
|
57
|
+
} from "./file/index.js"
|
|
58
58
|
export {
|
|
59
59
|
initSettings,
|
|
60
60
|
getSettings
|
|
61
|
-
} from "./settings"
|
|
61
|
+
} from "./settings.js"
|
package/src/network.js
CHANGED
package/src/overview_menu.js
CHANGED
package/src/templates.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {avatarTemplate} from "./user"
|
|
2
|
-
import {filterPrimaryEmail} from "./user_util"
|
|
1
|
+
import {avatarTemplate} from "./user.js"
|
|
2
|
+
import {filterPrimaryEmail} from "./user_util.js"
|
|
3
3
|
|
|
4
4
|
export const baseBodyTemplate = ({user, contents, hasOverview, app}) => `
|
|
5
5
|
<div id="wait">
|
package/src/user.js
CHANGED