@bpmn-io/form-js-playground 1.8.3 → 1.8.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 CHANGED
@@ -1,50 +1,47 @@
1
- # @bpmn-io/form-js-playground
2
-
3
- [![CI](https://github.com/bpmn-io/form-js/workflows/CI/badge.svg)](https://github.com/bpmn-io/form-js/actions?query=workflow%3ACI)
4
-
5
- A tool to try out and explore [@bpmn-io/form-js](../form-js) in a playful manner.
6
-
7
- ![Playground Screenshot](./resources/screenshot.png)
8
-
9
-
10
- ## Usage
11
-
12
- Integrate the playground into your application:
13
-
14
- ```javascript
15
- import { Playground } from '@bpmn-io/form-js-playground';
16
-
17
- const playground = new Playground({
18
- container: document.querySelector('#container'),
19
- schema,
20
- data
21
- });
22
-
23
- const {
24
- schema,
25
- data
26
- } = playground.getState();
27
- ```
28
-
29
- ## Styling
30
-
31
- For proper styling include the necessary stylesheets, and font used:
32
-
33
- ```html
34
- <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400&display=swap" rel="stylesheet">
35
- <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap" rel="stylesheet">
36
-
37
- <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js.css">
38
- <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js-editor.css">
39
- <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js-playground.css">
40
- ```
41
-
42
- ## Resources
43
-
44
- * [Demo](https://demo.bpmn.io/form)
45
- * [Issues](https://github.com/bpmn-io/form-js/issues)
46
-
47
-
48
- ## License
49
-
50
- Use under the terms of the [bpmn.io license](http://bpmn.io/license).
1
+ # @bpmn-io/form-js-playground
2
+
3
+ [![CI](https://github.com/bpmn-io/form-js/workflows/CI/badge.svg)](https://github.com/bpmn-io/form-js/actions?query=workflow%3ACI)
4
+
5
+ A tool to try out and explore [@bpmn-io/form-js](../form-js) in a playful manner.
6
+
7
+ ![Playground Screenshot](./resources/screenshot.png)
8
+
9
+ ## Usage
10
+
11
+ Integrate the playground into your application:
12
+
13
+ ```javascript
14
+ import { Playground } from '@bpmn-io/form-js-playground';
15
+
16
+ const playground = new Playground({
17
+ container: document.querySelector('#container'),
18
+ schema,
19
+ data,
20
+ });
21
+
22
+ const { schema, data } = playground.getState();
23
+ ```
24
+
25
+ ## Styling
26
+
27
+ For proper styling include the necessary stylesheets, and font used:
28
+
29
+ ```html
30
+ <link
31
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400&display=swap"
32
+ rel="stylesheet" />
33
+ <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap" rel="stylesheet" />
34
+
35
+ <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js.css" />
36
+ <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js-editor.css" />
37
+ <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js-playground.css" />
38
+ ```
39
+
40
+ ## Resources
41
+
42
+ - [Demo](https://demo.bpmn.io/form)
43
+ - [Issues](https://github.com/bpmn-io/form-js/issues)
44
+
45
+ ## License
46
+
47
+ Use under the terms of the [bpmn.io license](http://bpmn.io/license).
@@ -1,260 +1,261 @@
1
- /**
2
- * file-drop.css
3
- */
4
- .drop-overlay {
5
- position: fixed;
6
- top: 0;
7
- left: 0;
8
- bottom: 0;
9
- right: 0;
10
-
11
- padding: 50px;
12
-
13
- background: rgba(255, 255, 255, .9);
14
-
15
- z-index: 1000;
16
- }
17
-
18
- .drop-overlay .box {
19
- text-align: center;
20
- border: dashed 4px #CCC;
21
- height: 100%;
22
- width: 100%;
23
- display: table;
24
- }
25
-
26
- .drop-overlay .label {
27
- font-size: 26px;
28
- color: #888;
29
- margin: auto;
30
-
31
- display: table-cell;
32
- vertical-align: middle;
33
- }
34
- .fjs-pgl-root {
35
- --color-button-hover: var(--color-grey-225-10-95);
36
-
37
- --color-section-border: var(--color-grey-225-10-55);
38
- --color-section-header-background: var(--color-grey-225-10-95);
39
- --color-section-header-border-bottom: var(--color-grey-225-10-75);
40
-
41
- --color-palette-container-background: var(--color-grey-225-10-97);
42
- --color-palette-container-border: var(--color-grey-225-10-80);
43
-
44
- --color-properties-container-background: var(--color-white);
45
-
46
- --color-text: var(--color-grey-225-10-15);
47
-
48
- --font-family: 'IBM Plex Sans', sans-serif;
49
- --font-family-monospace: 'IBM Plex Mono', monospace;
50
-
51
- --modal-zindex: 100;
52
- }
53
-
54
- .fjs-pgl-root {
55
- width: 100%;
56
- height: 100%;
57
-
58
- position: relative;
59
- display: flex;
60
-
61
- font-family: var(--font-family);
62
- }
63
-
64
- .fjs-pgl-main {
65
- width: calc(100% - 450px);
66
- height: 100%;
67
-
68
- display: grid;
69
- grid-template-columns: 50% 50%;
70
- grid-template-rows: 70% 30%;
71
- }
72
-
73
- /**
74
- * Palette
75
- */
76
- .fjs-pgl-palette-container {
77
- height: 100%;
78
- background-color: var(--color-palette-container-background);
79
- border-right: solid 1px var(--color-palette-container-border);
80
- overflow-y: auto;
81
- flex-shrink: 0;
82
- }
83
-
84
- .fjs-pgl-palette-container .fjs-palette-container {
85
- height: 100%;
86
- border-right: none;
87
- }
88
-
89
- /**
90
- * Properties Panel
91
- */
92
- .fjs-pgl-properties-container {
93
- position: relative;
94
- display: flex;
95
- height: 100%;
96
- width: 250px;
97
- overflow-y: auto;
98
- background-color: var(--color-properties-container-background);
99
- }
100
-
101
- .fjs-pgl-properties-container .fjs-properties-container {
102
- --properties-panel-width: 250px;
103
- }
104
-
105
- .fjs-pgl-properties-container .bio-properties-panel {
106
- --font-family: var(--font-family);
107
- }
108
-
109
- /**
110
- * Section
111
- */
112
- .fjs-pgl-section {
113
- display: flex;
114
- flex-direction: column;
115
- justify-content: stretch;
116
- }
117
-
118
- .fjs-pgl-section:nth-child(1),
119
- .fjs-pgl-section:nth-child(2) {
120
- border-bottom: double 3px var(--color-section-border);
121
- }
122
-
123
- .fjs-pgl-section:nth-child(1),
124
- .fjs-pgl-section:nth-child(3) {
125
- border-right: double 3px var(--color-section-border);
126
- }
127
-
128
- .fjs-pgl-section .header {
129
- background: var(--color-section-header-background);
130
- font-size: 1rem;
131
- margin: 0;
132
- line-height: 2em;
133
- padding: .2em .5em;
134
- border-bottom: solid 1px var(--color-section-header-border-bottom);
135
- }
136
-
137
- .fjs-pgl-section .header-items {
138
- float: right;
139
- }
140
-
141
- .fjs-pgl-section .body {
142
- flex: 1;
143
- overflow: hidden;
144
- }
145
-
146
- .fjs-pgl-modal {
147
- z-index: var(--modal-zindex);
148
- }
149
-
150
- .fjs-pgl-modal .fjs-pgl-modal-backdrop {
151
- background: rgba(0 0 0 / .5);
152
- position: absolute;
153
- top: 0;
154
- left: 0;
155
- bottom: 0;
156
- right: 0;
157
- z-index: var(--modal-zindex);
158
- }
159
-
160
- .fjs-pgl-modal-content {
161
- position: absolute;
162
- top: 50%;
163
- left: 50%;
164
- max-width: 100%;
165
- width: 500px;
166
- overflow-y: auto;
167
- max-height: 80%;
168
- transform: translate(-40%, -50%);
169
- z-index: var(--modal-zindex);
170
-
171
- font-size: 14px;
172
-
173
- padding: 20px;
174
-
175
- background: var(--color-white);
176
- }
177
-
178
- .fjs-pgl-modal-content textarea {
179
- width: 100%;
180
- height: 300px;
181
- overflow: auto;
182
- }
183
-
184
- .fjs-pgl-modal-footer {
185
- margin-top: 20px;
186
-
187
- text-align: right;
188
- }
189
-
190
- .fjs-pgl-form-container {
191
- height: 100%;
192
- width: 100%;
193
- overflow: hidden;
194
- }
195
-
196
- .fjs-pgl-form-container .fjs-container .cds--grid .cds--row {
197
- margin-left: -1rem;
198
- margin-right: -1rem;
199
- }
200
-
201
- .fjs-pgl-form-container .fjs-form-editor {
202
- width: 100%;
203
- }
204
-
205
- .fjs-pgl-text-container {
206
- height: 100%;
207
- width: 100%;
208
- box-sizing: border-box;
209
- border: none;
210
- border-radius: 0;
211
- position: relative;
212
- }
213
-
214
- .fjs-pgl-text-container > .cm-editor {
215
- font-size: .9em;
216
- height: 100%;
217
- position: absolute !important;
218
- top: 0;
219
- left: 0;
220
- right: 0;
221
- bottom: 0;
222
- }
223
-
224
- .fjs-pgl-text-container > .cm-editor > .cm-scroller {
225
- font-family: var(--font-family-monospace);
226
- overflow: auto !important;
227
- }
228
-
229
- .fjs-pgl-form-container > .fjs-container {
230
- overflow: auto;
231
- }
232
-
233
- .fjs-pgl-button {
234
- color: var(--color-text);
235
- background-color: var(--color-white);
236
-
237
- border-width: 1px;
238
- border-style: solid;
239
- border-radius: 3px;
240
-
241
- font-family: var(--font-family);
242
- }
243
-
244
- .fjs-pgl-button-default {
245
- padding: 7px 10px;
246
- }
247
-
248
- .fjs-pgl-button:hover {
249
- background-color: var(--color-button-hover);
250
- }
251
-
252
- .fjs-pgl-button + .fjs-pgl-button {
253
- margin-left: 1em;
254
- }
255
-
256
- .fjs-pgl-parent {
257
- width: 100%;
258
- height: 100%;
259
- }
1
+ /**
2
+ * file-drop.css
3
+ */
4
+ .drop-overlay {
5
+ position: fixed;
6
+ top: 0;
7
+ left: 0;
8
+ bottom: 0;
9
+ right: 0;
10
+
11
+ padding: 50px;
12
+
13
+ background: rgba(255, 255, 255, 0.9);
14
+
15
+ z-index: 1000;
16
+ }
17
+
18
+ .drop-overlay .box {
19
+ text-align: center;
20
+ border: dashed 4px #ccc;
21
+ height: 100%;
22
+ width: 100%;
23
+ display: table;
24
+ }
25
+
26
+ .drop-overlay .label {
27
+ font-size: 26px;
28
+ color: #888;
29
+ margin: auto;
30
+
31
+ display: table-cell;
32
+ vertical-align: middle;
33
+ }
34
+
35
+ .fjs-pgl-root {
36
+ --color-button-hover: var(--color-grey-225-10-95);
37
+
38
+ --color-section-border: var(--color-grey-225-10-55);
39
+ --color-section-header-background: var(--color-grey-225-10-95);
40
+ --color-section-header-border-bottom: var(--color-grey-225-10-75);
41
+
42
+ --color-palette-container-background: var(--color-grey-225-10-97);
43
+ --color-palette-container-border: var(--color-grey-225-10-80);
44
+
45
+ --color-properties-container-background: var(--color-white);
46
+
47
+ --color-text: var(--color-grey-225-10-15);
48
+
49
+ --font-family: 'IBM Plex Sans', sans-serif;
50
+ --font-family-monospace: 'IBM Plex Mono', monospace;
51
+
52
+ --modal-zindex: 100;
53
+ }
54
+
55
+ .fjs-pgl-root {
56
+ width: 100%;
57
+ height: 100%;
58
+
59
+ position: relative;
60
+ display: flex;
61
+
62
+ font-family: var(--font-family);
63
+ }
64
+
65
+ .fjs-pgl-main {
66
+ width: calc(100% - 450px);
67
+ height: 100%;
68
+
69
+ display: grid;
70
+ grid-template-columns: 50% 50%;
71
+ grid-template-rows: 70% 30%;
72
+ }
73
+
74
+ /**
75
+ * Palette
76
+ */
77
+ .fjs-pgl-palette-container {
78
+ height: 100%;
79
+ background-color: var(--color-palette-container-background);
80
+ border-right: solid 1px var(--color-palette-container-border);
81
+ overflow-y: auto;
82
+ flex-shrink: 0;
83
+ }
84
+
85
+ .fjs-pgl-palette-container .fjs-palette-container {
86
+ height: 100%;
87
+ border-right: none;
88
+ }
89
+
90
+ /**
91
+ * Properties Panel
92
+ */
93
+ .fjs-pgl-properties-container {
94
+ position: relative;
95
+ display: flex;
96
+ height: 100%;
97
+ width: 250px;
98
+ overflow-y: auto;
99
+ background-color: var(--color-properties-container-background);
100
+ }
101
+
102
+ .fjs-pgl-properties-container .fjs-properties-container {
103
+ --properties-panel-width: 250px;
104
+ }
105
+
106
+ .fjs-pgl-properties-container .bio-properties-panel {
107
+ --font-family: var(--font-family);
108
+ }
109
+
110
+ /**
111
+ * Section
112
+ */
113
+ .fjs-pgl-section {
114
+ display: flex;
115
+ flex-direction: column;
116
+ justify-content: stretch;
117
+ }
118
+
119
+ .fjs-pgl-section:nth-child(1),
120
+ .fjs-pgl-section:nth-child(2) {
121
+ border-bottom: double 3px var(--color-section-border);
122
+ }
123
+
124
+ .fjs-pgl-section:nth-child(1),
125
+ .fjs-pgl-section:nth-child(3) {
126
+ border-right: double 3px var(--color-section-border);
127
+ }
128
+
129
+ .fjs-pgl-section .header {
130
+ background: var(--color-section-header-background);
131
+ font-size: 1rem;
132
+ margin: 0;
133
+ line-height: 2em;
134
+ padding: 0.2em 0.5em;
135
+ border-bottom: solid 1px var(--color-section-header-border-bottom);
136
+ }
137
+
138
+ .fjs-pgl-section .header-items {
139
+ float: right;
140
+ }
141
+
142
+ .fjs-pgl-section .body {
143
+ flex: 1;
144
+ overflow: hidden;
145
+ }
146
+
147
+ .fjs-pgl-modal {
148
+ z-index: var(--modal-zindex);
149
+ }
150
+
151
+ .fjs-pgl-modal .fjs-pgl-modal-backdrop {
152
+ background: rgba(0 0 0 / 0.5);
153
+ position: absolute;
154
+ top: 0;
155
+ left: 0;
156
+ bottom: 0;
157
+ right: 0;
158
+ z-index: var(--modal-zindex);
159
+ }
160
+
161
+ .fjs-pgl-modal-content {
162
+ position: absolute;
163
+ top: 50%;
164
+ left: 50%;
165
+ max-width: 100%;
166
+ width: 500px;
167
+ overflow-y: auto;
168
+ max-height: 80%;
169
+ transform: translate(-40%, -50%);
170
+ z-index: var(--modal-zindex);
171
+
172
+ font-size: 14px;
173
+
174
+ padding: 20px;
175
+
176
+ background: var(--color-white);
177
+ }
178
+
179
+ .fjs-pgl-modal-content textarea {
180
+ width: 100%;
181
+ height: 300px;
182
+ overflow: auto;
183
+ }
184
+
185
+ .fjs-pgl-modal-footer {
186
+ margin-top: 20px;
187
+
188
+ text-align: right;
189
+ }
190
+
191
+ .fjs-pgl-form-container {
192
+ height: 100%;
193
+ width: 100%;
194
+ overflow: hidden;
195
+ }
196
+
197
+ .fjs-pgl-form-container .fjs-container .cds--grid .cds--row {
198
+ margin-left: -1rem;
199
+ margin-right: -1rem;
200
+ }
201
+
202
+ .fjs-pgl-form-container .fjs-form-editor {
203
+ width: 100%;
204
+ }
205
+
206
+ .fjs-pgl-text-container {
207
+ height: 100%;
208
+ width: 100%;
209
+ box-sizing: border-box;
210
+ border: none;
211
+ border-radius: 0;
212
+ position: relative;
213
+ }
214
+
215
+ .fjs-pgl-text-container > .cm-editor {
216
+ font-size: 0.9em;
217
+ height: 100%;
218
+ position: absolute !important;
219
+ top: 0;
220
+ left: 0;
221
+ right: 0;
222
+ bottom: 0;
223
+ }
224
+
225
+ .fjs-pgl-text-container > .cm-editor > .cm-scroller {
226
+ font-family: var(--font-family-monospace);
227
+ overflow: auto !important;
228
+ }
229
+
230
+ .fjs-pgl-form-container > .fjs-container {
231
+ overflow: auto;
232
+ }
233
+
234
+ .fjs-pgl-button {
235
+ color: var(--color-text);
236
+ background-color: var(--color-white);
237
+
238
+ border-width: 1px;
239
+ border-style: solid;
240
+ border-radius: 3px;
241
+
242
+ font-family: var(--font-family);
243
+ }
244
+
245
+ .fjs-pgl-button-default {
246
+ padding: 7px 10px;
247
+ }
248
+
249
+ .fjs-pgl-button:hover {
250
+ background-color: var(--color-button-hover);
251
+ }
252
+
253
+ .fjs-pgl-button + .fjs-pgl-button {
254
+ margin-left: 1em;
255
+ }
256
+
257
+ .fjs-pgl-parent {
258
+ width: 100%;
259
+ height: 100%;
260
+ }
260
261