stalefish 7.1.0 → 7.2.0

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.
@@ -5,7 +5,7 @@ jobs:
5
5
  parallelism: 1
6
6
  shell: /bin/bash --login
7
7
  docker:
8
- - image: circleci/node:12.10.0
8
+ - image: cimg/node:18.12.1
9
9
  steps:
10
10
  - checkout
11
11
  - run: export PATH="~/lorengreenfield/stalefish/node_modules/.bin:$PATH"
@@ -10,44 +10,49 @@ import clone from 'fast-clone'
10
10
  let cache = new LRU(300)
11
11
 
12
12
  let styles = css`
13
- .panel h3 {
14
- font-weight: bold;
15
- }
16
-
17
- .wrapper {
18
- width: 100%;
19
- display: flex;
20
- justify-content: center;
21
- padding: 10px;
22
- box-sizing: border-box;
23
- }
24
-
25
- .innerWrapper {
26
- width: 100%;
27
- max-width: 600px;
28
- }
29
-
30
- .header {
31
- display: flex;
32
- justify-content: left;
33
- background-color: #F9F9F9;
34
- align-content: center;
35
- user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;
36
- cursor: default;
37
- }
13
+ .panel h3 {
14
+ font-weight: bold;
15
+ }
16
+
17
+ .wrapper {
18
+ width: 100%;
19
+ display: flex;
20
+ justify-content: center;
21
+ padding: 10px;
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ .innerWrapper {
26
+ width: 100%;
27
+ max-width: 600px;
28
+ }
29
+
30
+ .header {
31
+ display: flex;
32
+ justify-content: left;
33
+ background-color: #F9F9F9;
34
+ align-content: center;
35
+ user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none;
36
+ cursor: default;
37
+ }
38
38
  `
39
39
 
40
40
  class Panel extends Component {
41
41
  createElement (args) {
42
42
  this.args = clone(args)
43
43
  this.headerAction = args.headerAction
44
+ this.dragStartAction = args.dragStartAction
45
+ this.dragOverAction = args.dragOverAction
46
+ this.dragEndAction = args.dragEndAction
47
+ this.dragLeaveAction = args.dragLeaveAction
48
+ this.draggable = args.draggable
44
49
  this.collapseToggleAction = args.collapseToggleAction
45
50
  this.closeAction = args.closeAction
46
51
 
47
52
  let { chevronStyle = null, on = true, content, heading = '', collapsed = false, thinBorder = false, light = false, optionsMenu } = args
48
53
 
49
54
  return on ? html`<div class="${styles.panel}" style='box-sizing: border-box; position: relative; top: 0; left: 0; text-align: left; box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); border: solid ${thinBorder ? '3px' : '5px'} ${light ? '#DDD' : '#4371AD'}; background-color: #FBFBFB;'>
50
- <div style="position: relative;">
55
+ <div style="position: relative;" ondragleave="${e => this.dragLeaveAction && this.dragLeaveAction(e)}" ondragend="${e => this.dragEndAction && this.dragEndAction(e)}" ondragover="${e => this.dragOverAction && this.dragOverAction(e)}" ondragstart="${e => this.dragStartAction && this.dragStartAction(e)}" draggable="${this.draggable ? 'true' : ''}" >
51
56
  ${heading ? html`<div class="${styles.header}" onclick=${e => this.headerAction && this.headerAction(e)}>
52
57
  <h3 style="margin: 12px; color: ${light ? '#555' : '#22487e'}">${heading}</h3>
53
58
 
@@ -98,7 +98,7 @@ class Selectbox extends Component {
98
98
  } else {
99
99
  optionValue = option
100
100
  }
101
- return html`<option value="${optionValue}" ${holdingPen[property] == optionValue ? { selected: 'true' } : ''}>${optionName || optionValue}</option>`
101
+ return html`<option value="${optionValue}" ${holdingPen[property] == optionValue ? { selected: 'true' } : ''}>${optionName || optionValue}</option>` // eslint-disable-line
102
102
  })}
103
103
  </select>
104
104
  </label>
@@ -1,5 +1,5 @@
1
1
  import { html, css, fieldIsTouched, Component, LRU } from 'halfcab'
2
- import raw from 'nanohtml/raw'
2
+ import raw from 'nanohtml/raw.js'
3
3
  import * as deepDiff from 'deep-object-diff'
4
4
  import clone from 'fast-clone'
5
5
  import uploadIcon from './icons/upload.mjs'
@@ -26,7 +26,6 @@ let styles = css`
26
26
  padding: 5px 10px;
27
27
  z-index: 30;
28
28
  border-radius: 3px;
29
- position: absolute;
30
29
  right: 54px;
31
30
  top: 0px;
32
31
  }
@@ -39,7 +38,6 @@ let styles = css`
39
38
  top: -6px;
40
39
  font-size: 2em;
41
40
  z-index: 30;
42
- position: absolute;
43
41
  }
44
42
 
45
43
  .frame {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stalefish",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "Simple function based component library for halfcab tagged template literals",
5
5
  "main": "index.mjs",
6
6
  "module": "index.mjs",