stalefish 7.3.0 → 7.4.1
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.
|
@@ -12,7 +12,7 @@ const styles = css`
|
|
|
12
12
|
z-index: 20000;
|
|
13
13
|
width: ${width}px;
|
|
14
14
|
height: 100vh;
|
|
15
|
-
background-color:
|
|
15
|
+
background-color: rgba(0,0,0,0.9);
|
|
16
16
|
color: white;
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -34,7 +34,7 @@ const styles = css`
|
|
|
34
34
|
|
|
35
35
|
export default ({ on, topPadding, closeIcon, closeAction, content }) => html`
|
|
36
36
|
<div class="${styles.sideDrawer}"
|
|
37
|
-
style="opacity: ${on ?
|
|
37
|
+
style="opacity: ${on ? 1 : 0};left: ${on ? '0px' : `calc(-1 * (${width}px + 10px))`};${topPadding ? `padding-top: ${topPadding}` : ''}">
|
|
38
38
|
<div style="width: 100%; position: relative;">
|
|
39
39
|
<div class="${styles.closeButton}"
|
|
40
40
|
onclick=${e => closeAction && closeAction(e)}>${closeIcon}
|
package/components/textarea.mjs
CHANGED
|
@@ -65,7 +65,7 @@ class Textarea extends Component {
|
|
|
65
65
|
this.onchange = args.onchange
|
|
66
66
|
this.oninput = args.oninput
|
|
67
67
|
|
|
68
|
-
let { holdingPen, label, placeholder, property, required, pattern, onkeyup, autofocus, permanentTopPlaceholder = false, permanentTopLabel = false, disabled } = args
|
|
68
|
+
let { holdingPen, label, placeholder, property, required, pattern, onkeyup, autofocus, permanentTopPlaceholder = false, permanentTopLabel = false, disabled, darkBackground } = args
|
|
69
69
|
|
|
70
70
|
let input = html`<textarea data-gramm="false" style="${this.height ? `height: ${this.height}` : ''}" class="${styles.textarea} ${fieldIsTouched(holdingPen, property) === true ? styles.touched : ''}" onkeyup=${e => onkeyup && onkeyup(e)} ${required ? { required: 'required' } : ''} onchange=${e => { change({ e, holdingPen, property, label: styles.label }); this.onchange && this.onchange(e) }} oninput=${e => { this.height = window.getComputedStyle(this.element.querySelector('textarea')).height; change({ e, holdingPen, property, label: styles.label }); this.oninput && this.oninput(e) }} onblur=${formField(holdingPen, property)} placeholder="${placeholder || ''}${required ? ' *' : ''}" ${pattern ? { pattern } : ''}>${holdingPen[property] || ''}</textarea>`
|
|
71
71
|
|
|
@@ -74,7 +74,7 @@ class Textarea extends Component {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
return html`
|
|
77
|
-
<label ${disabled ? { disabled } : ''} style="${disabled ? 'cursor: not-allowed; opacity: 0.3;' : ''}width: 100%; text-align: left; display: inline-block;"><span class="${styles.label}" style="opacity: ${holdingPen[property] === 0 || holdingPen[property] || (permanentTopPlaceholder || permanentTopLabel) ? 1 : 0}; font-size: 16px; font-weight: normal; color: #999; margin-left: 5px; padding: 9px; background-color: rgba(255,255,255
|
|
77
|
+
<label ${disabled ? { disabled } : ''} style="${disabled ? 'cursor: not-allowed; opacity: 0.3;' : ''}width: 100%; text-align: left; display: inline-block;"><span class="${styles.label}" style="opacity: ${holdingPen[property] === 0 || holdingPen[property] || (permanentTopPlaceholder || permanentTopLabel) ? 1 : 0}; font-size: 16px; font-weight: normal; color: #999; margin-left: 5px; padding: 9px; background-color: rgba(255,255,255,${darkBackground ? 1 : 0.8}); ">${label}${required ? ' *' : ''}</span>${input}</label>
|
|
78
78
|
`
|
|
79
79
|
}
|
|
80
80
|
|
package/components/textfield.mjs
CHANGED
|
@@ -105,7 +105,7 @@ class Textfield extends Component {
|
|
|
105
105
|
this.oninput = args.oninput
|
|
106
106
|
this.onchange = args.onchange
|
|
107
107
|
|
|
108
|
-
let { highlightBorder = false, wrapperStyle = null, holdingPen, label, placeholder, property, required, pattern, type, autofocus, valueContext, permanentTopPlaceholder = false, permanentTopLabel = false, disabled, maxCharacters, maxNumber, minNumber } = args
|
|
108
|
+
let { highlightBorder = false, wrapperStyle = null, holdingPen, label, placeholder, property, required, pattern, type, autofocus, valueContext, permanentTopPlaceholder = false, permanentTopLabel = false, disabled, maxCharacters, maxNumber, minNumber, darkBackground } = args
|
|
109
109
|
|
|
110
110
|
let input = html`<input data-gramm="false" ${disabled ? { disabled } : ''} ${maxNumber ? { max: maxNumber } : ''} ${minNumber ? { min: minNumber } : ''} ${maxCharacters ? { maxlength: maxCharacters } : ''} style="${disabled ? 'cursor: not-allowed; opacity: 0.3;' : ''}" class="${styles.textfield} ${fieldIsTouched(holdingPen, property) === true ? styles.touched : ''} ${highlightBorder ? styles.highlight : ''}" value="${holdingPen[property] !== undefined && holdingPen[property] !== null ? holdingPen[property] : ''}" onkeyup=${e => this.onkeyup && this.onkeyup(e)} ${required ? { required: 'required' } : ''} onchange=${e => { change({ e, holdingPen, property, label: styles.label }); this.onchange && this.onchange(e) }} oninput=${e => { change({ e, holdingPen, property, label: styles.label }); this.oninput && this.oninput(e) }} onblur=${formField(holdingPen, property)} placeholder="${placeholder || ''}${required ? ' *' : ''}" type="${determineType(type)}" ${pattern ? { pattern } : ''} ${type.toLowerCase() === 'number' ? { step: determineStep(type) } : ''} />`
|
|
111
111
|
|
|
@@ -117,7 +117,7 @@ class Textfield extends Component {
|
|
|
117
117
|
<div ${wrapperStyle ? { 'class': wrapperStyle } : ''} style="display: inline-block; width: calc(100% - 10px); margin: ${label ? '40' : '5'}px 5px 5px 5px;">
|
|
118
118
|
<label style="width: 100%; text-align: left; position: relative; padding: 0;">
|
|
119
119
|
${valueContext ? html`<div class="${styles.valueContext}">${valueContext}</div>` : ''}
|
|
120
|
-
${label ? html`<span class="${styles.label}" style="opacity: ${holdingPen[property] === 0 || holdingPen[property] || (permanentTopPlaceholder || permanentTopLabel) ? 1 : 0}; font-size: 16px; font-weight: normal; color: #999; margin-left: 5px; padding: 9px; background-color: rgba(255,255,255
|
|
120
|
+
${label ? html`<span class="${styles.label}" style="opacity: ${holdingPen[property] === 0 || holdingPen[property] || (permanentTopPlaceholder || permanentTopLabel) ? 1 : 0}; font-size: 16px; font-weight: normal; color: #999; margin-left: 5px; padding: 9px; background-color: rgba(255,255,255,${darkBackground ? 1 : 0.8}); ">${label}${required ? ' *' : ''}</span>` : ''}
|
|
121
121
|
${input}
|
|
122
122
|
</label>
|
|
123
123
|
</div>
|