godown 1.1.4 → 1.1.6

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 (179) hide show
  1. package/README.md +35 -35
  2. package/conf.d.ts +18 -18
  3. package/conf.js +22 -22
  4. package/deps.d.ts +7 -7
  5. package/deps.js +7 -7
  6. package/effect/index.d.ts +3 -3
  7. package/effect/index.js +3 -3
  8. package/effect/ov-effect.d.ts +23 -23
  9. package/effect/ov-effect.d.ts.map +1 -1
  10. package/effect/ov-effect.js +299 -275
  11. package/effect/ro-effect.d.ts +19 -19
  12. package/effect/ro-effect.d.ts.map +1 -1
  13. package/effect/ro-effect.js +125 -120
  14. package/effect/std.d.ts +3 -3
  15. package/effect/std.d.ts.map +1 -1
  16. package/effect/std.js +3 -3
  17. package/effect/tw-effect.d.ts +21 -21
  18. package/effect/tw-effect.d.ts.map +1 -1
  19. package/effect/tw-effect.js +108 -107
  20. package/glob.d.ts +8 -8
  21. package/glob.d.ts.map +1 -1
  22. package/glob.js +25 -24
  23. package/group/avatar-group.d.ts +20 -20
  24. package/group/avatar-group.d.ts.map +1 -1
  25. package/group/avatar-group.js +112 -88
  26. package/group/button-group.d.ts +12 -12
  27. package/group/button-group.d.ts.map +1 -1
  28. package/group/button-group.js +79 -74
  29. package/group/details-group.d.ts +16 -16
  30. package/group/details-group.d.ts.map +1 -1
  31. package/group/details-group.js +55 -53
  32. package/group/index.d.ts +3 -3
  33. package/group/index.js +3 -3
  34. package/group/std.d.ts +3 -3
  35. package/group/std.d.ts.map +1 -1
  36. package/group/std.js +3 -3
  37. package/index.d.ts +7 -7
  38. package/index.js +7 -7
  39. package/input-form/base-input.d.ts +32 -32
  40. package/input-form/base-input.d.ts.map +1 -1
  41. package/input-form/base-input.js +229 -226
  42. package/input-form/exp-input.d.ts +22 -22
  43. package/input-form/exp-input.d.ts.map +1 -1
  44. package/input-form/exp-input.js +218 -205
  45. package/input-form/index.d.ts +8 -8
  46. package/input-form/index.js +8 -8
  47. package/input-form/label-input.d.ts +21 -21
  48. package/input-form/label-input.d.ts.map +1 -1
  49. package/input-form/label-input.js +150 -137
  50. package/input-form/search-input.d.ts +36 -36
  51. package/input-form/search-input.d.ts.map +1 -1
  52. package/input-form/search-input.js +311 -297
  53. package/input-form/select-input.d.ts +31 -31
  54. package/input-form/select-input.d.ts.map +1 -1
  55. package/input-form/select-input.js +354 -330
  56. package/input-form/sign-form.d.ts +25 -23
  57. package/input-form/sign-form.d.ts.map +1 -1
  58. package/input-form/sign-form.js +165 -160
  59. package/input-form/split-input.d.ts +26 -26
  60. package/input-form/split-input.d.ts.map +1 -1
  61. package/input-form/split-input.js +181 -173
  62. package/input-form/std.d.ts +19 -19
  63. package/input-form/std.d.ts.map +1 -1
  64. package/input-form/std.js +72 -68
  65. package/input-form/switch-input.d.ts +22 -22
  66. package/input-form/switch-input.d.ts.map +1 -1
  67. package/input-form/switch-input.js +181 -175
  68. package/items/alert-item.d.ts +16 -16
  69. package/items/alert-item.d.ts.map +1 -1
  70. package/items/alert-item.js +143 -142
  71. package/items/avatar-anchor.d.ts +19 -19
  72. package/items/avatar-anchor.d.ts.map +1 -1
  73. package/items/avatar-anchor.js +150 -148
  74. package/items/base-button.d.ts +16 -16
  75. package/items/base-button.d.ts.map +1 -1
  76. package/items/base-button.js +170 -167
  77. package/items/dialog-item.d.ts +24 -24
  78. package/items/dialog-item.d.ts.map +1 -1
  79. package/items/dialog-item.js +157 -156
  80. package/items/index.d.ts +7 -7
  81. package/items/index.js +7 -7
  82. package/items/link-a.d.ts +19 -19
  83. package/items/link-a.d.ts.map +1 -1
  84. package/items/link-a.js +98 -97
  85. package/items/load-track.d.ts +20 -20
  86. package/items/load-track.d.ts.map +1 -1
  87. package/items/load-track.js +115 -109
  88. package/items/std.d.ts +3 -3
  89. package/items/std.d.ts.map +1 -1
  90. package/items/std.js +3 -3
  91. package/items/super-a.d.ts +15 -15
  92. package/items/super-a.d.ts.map +1 -1
  93. package/items/super-a.js +99 -88
  94. package/layout/div-line.d.ts +15 -15
  95. package/layout/div-line.d.ts.map +1 -1
  96. package/layout/div-line.js +71 -65
  97. package/layout/drag-box.d.ts +25 -25
  98. package/layout/drag-box.d.ts.map +1 -1
  99. package/layout/drag-box.js +95 -94
  100. package/layout/flex-flow.d.ts +13 -13
  101. package/layout/flex-flow.d.ts.map +1 -1
  102. package/layout/flex-flow.js +39 -34
  103. package/layout/index.d.ts +5 -5
  104. package/layout/index.js +5 -5
  105. package/layout/nav-aside.d.ts +13 -13
  106. package/layout/nav-aside.d.ts.map +1 -1
  107. package/layout/nav-aside.js +61 -54
  108. package/layout/nav-layout.d.ts +16 -16
  109. package/layout/nav-layout.d.ts.map +1 -1
  110. package/layout/nav-layout.js +167 -146
  111. package/layout/std.d.ts +4 -4
  112. package/layout/std.d.ts.map +1 -1
  113. package/layout/std.js +10 -8
  114. package/package.json +48 -40
  115. package/react/effect.d.ts +9 -9
  116. package/react/effect.d.ts.map +1 -1
  117. package/react/effect.js +33 -33
  118. package/react/group.d.ts +4 -4
  119. package/react/group.d.ts.map +1 -1
  120. package/react/group.js +19 -19
  121. package/react/index.d.ts +7 -7
  122. package/react/index.d.ts.map +1 -1
  123. package/react/index.js +7 -7
  124. package/react/input-form.d.ts +32 -32
  125. package/react/input-form.d.ts.map +1 -1
  126. package/react/input-form.js +65 -65
  127. package/react/items.d.ts +8 -8
  128. package/react/items.d.ts.map +1 -1
  129. package/react/items.js +39 -39
  130. package/react/layout.d.ts +6 -6
  131. package/react/layout.d.ts.map +1 -1
  132. package/react/layout.js +29 -29
  133. package/react/view.d.ts +6 -6
  134. package/react/view.d.ts.map +1 -1
  135. package/react/view.js +29 -29
  136. package/view/details-expand.d.ts +18 -18
  137. package/view/details-expand.d.ts.map +1 -1
  138. package/view/details-expand.js +85 -80
  139. package/view/down-drop.d.ts +18 -18
  140. package/view/down-drop.d.ts.map +1 -1
  141. package/view/down-drop.js +98 -94
  142. package/view/index.d.ts +5 -5
  143. package/view/index.js +5 -5
  144. package/view/menu-list.d.ts +16 -16
  145. package/view/menu-list.d.ts.map +1 -1
  146. package/view/menu-list.js +77 -72
  147. package/view/route-view.d.ts +57 -57
  148. package/view/route-view.d.ts.map +1 -1
  149. package/view/route-view.js +261 -258
  150. package/view/scroll-x.d.ts +14 -14
  151. package/view/scroll-x.d.ts.map +1 -1
  152. package/view/scroll-x.js +77 -72
  153. package/view/std.d.ts +4 -4
  154. package/view/std.d.ts.map +1 -1
  155. package/view/std.js +37 -37
  156. package/with.d.ts +27 -27
  157. package/with.d.ts.map +1 -1
  158. package/with.js +77 -78
  159. package/view/react/effect.d.ts +0 -10
  160. package/view/react/effect.d.ts.map +0 -1
  161. package/view/react/effect.js +0 -32
  162. package/view/react/group.d.ts +0 -5
  163. package/view/react/group.d.ts.map +0 -1
  164. package/view/react/group.js +0 -18
  165. package/view/react/index.d.ts +0 -7
  166. package/view/react/index.d.ts.map +0 -1
  167. package/view/react/index.js +0 -6
  168. package/view/react/input-form.d.ts +0 -33
  169. package/view/react/input-form.d.ts.map +0 -1
  170. package/view/react/input-form.js +0 -64
  171. package/view/react/items.d.ts +0 -9
  172. package/view/react/items.d.ts.map +0 -1
  173. package/view/react/items.js +0 -38
  174. package/view/react/layout.d.ts +0 -7
  175. package/view/react/layout.d.ts.map +0 -1
  176. package/view/react/layout.js +0 -28
  177. package/view/react/view.d.ts +0 -7
  178. package/view/react/view.d.ts.map +0 -1
  179. package/view/react/view.js +0 -28
@@ -1,173 +1,181 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, css, property, query, queryAll, define, cssvar } from '../deps.js';
8
- import STD from './std.js';
9
- let SplitInput = class SplitInput extends STD {
10
- constructor() {
11
- super(...arguments);
12
- this.name = "";
13
- this.value = "";
14
- this.max = 6;
15
- this.index = -1;
16
- this.autofocus = false;
17
- this.current = 0;
18
- this.currentValue = [];
19
- }
20
- render() {
21
- return html `<main><div>
22
- ${Array(this.max).fill(0).map(() => html `<span><i></i></span>`)}
23
- <input @input=${this._handleInput} value=" ">
24
- </div></main>`;
25
- }
26
- firstUpdated() {
27
- this._focusCheck();
28
- this.currentValue = this.value.split('').concat(Array(this.max - this.value.length).fill(null));
29
- this.current = (this.index < 0 || this.index > this.max) ? this.currentValue.indexOf(null) : this.index;
30
- this._spans.forEach((span, index) => {
31
- span.addEventListener('click', () => {
32
- this.current = index;
33
- this.focusAt();
34
- this._input.focus();
35
- });
36
- });
37
- document.addEventListener('click', (e) => {
38
- if (!this.contains(e.target)) {
39
- this.blur();
40
- }
41
- });
42
- }
43
- _handleInput(e) {
44
- if (e.data === null) {
45
- if (this.currentValue[this.current] !== null) {
46
- this.currentValue[this.current] = null;
47
- this.current = this.current;
48
- }
49
- else {
50
- this.currentValue[this.current - 1] = null;
51
- this.current = this.current - 1 < 0 ? 0 : this.current - 1;
52
- }
53
- }
54
- else {
55
- this.currentValue[this.current] = e.data;
56
- if (this.current + 1 >= this.max) {
57
- this.current = this.currentValue.indexOf(null);
58
- if (this.current === -1) {
59
- this.blur();
60
- }
61
- }
62
- else {
63
- this.current += 1;
64
- }
65
- }
66
- this.focus();
67
- this._spans.forEach((span, index) => {
68
- span.querySelector('i').innerText = this.currentValue[index] || '';
69
- });
70
- this.value = this.currentValue.join('');
71
- this.dispatchEvent(new CustomEvent('input', { detail: this.value, bubbles: true, composed: true }));
72
- this.dispatchEvent(new CustomEvent('change', { detail: this.value, composed: true }));
73
- }
74
- focus() {
75
- this.focusAt();
76
- }
77
- focusAt(i = this.current) {
78
- var _a;
79
- this._spans.forEach((span) => {
80
- span.classList.remove('focus');
81
- });
82
- (_a = this._spans[i]) === null || _a === void 0 ? void 0 : _a.classList.add('focus');
83
- this._input.value = " ";
84
- }
85
- blur(i = this.current) {
86
- var _a;
87
- (_a = this._spans[i]) === null || _a === void 0 ? void 0 : _a.classList.remove('focus');
88
- this._input.blur();
89
- }
90
- reset() {
91
- this.currentValue = Array(this.max).fill(null);
92
- this.current = 0;
93
- this._spans.forEach((span) => {
94
- span.querySelector('i').innerText = '';
95
- });
96
- this.value = '';
97
- this.dispatchEvent(new CustomEvent('change', { detail: this.value }));
98
- }
99
- };
100
- SplitInput.styles = [STD.styles, css `:host{
101
- display: inline-block;
102
- width: fit-content;
103
- }
104
- main{
105
- display:flex;
106
- }
107
- *{
108
- font-size: 1em;
109
- }
110
- div {
111
- vertical-align:top;
112
- position: relative;
113
- display:inline-flex;
114
- font-size: 116%;
115
- }
116
- span {
117
- box-sizing: content-box;
118
- vertical-align: top;
119
- display: inline-flex;
120
- width: 1.0275em;
121
- padding: 0.1em;
122
- height: 1.0275em;
123
- pointer-events: all;
124
- }
125
- i {
126
- height: inherit;
127
- width: 100%;
128
- z-index: 1;
129
- background-color: var(${cssvar}--input-false);
130
- font-style: normal;
131
- text-align: center;
132
- font-size: 80%;
133
- line-height: 1.09;
134
- }
135
- input {
136
- border:0;
137
- opacity: 0;
138
- left: 0;
139
- position: absolute;
140
- background-color: tan;
141
- right: 0;
142
- top: 0;
143
- bottom: 0;
144
- }
145
- .focus i {
146
- outline: .12em solid var(${cssvar}--input-true);
147
- }`];
148
- __decorate([
149
- property()
150
- ], SplitInput.prototype, "name", void 0);
151
- __decorate([
152
- property()
153
- ], SplitInput.prototype, "value", void 0);
154
- __decorate([
155
- property({ type: Number })
156
- ], SplitInput.prototype, "max", void 0);
157
- __decorate([
158
- property({ type: Number })
159
- ], SplitInput.prototype, "index", void 0);
160
- __decorate([
161
- property({ type: Boolean })
162
- ], SplitInput.prototype, "autofocus", void 0);
163
- __decorate([
164
- query('input')
165
- ], SplitInput.prototype, "_input", void 0);
166
- __decorate([
167
- queryAll('span')
168
- ], SplitInput.prototype, "_spans", void 0);
169
- SplitInput = __decorate([
170
- define('split-input')
171
- ], SplitInput);
172
- export { SplitInput };
173
- export default SplitInput;
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, css, property, query, queryAll, define, cssvar } from "../deps.js";
8
+ import STD from "./std.js";
9
+ let SplitInput = class SplitInput extends STD {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.name = "";
13
+ this.value = "";
14
+ this.max = 6;
15
+ this.index = -1;
16
+ this.autofocus = false;
17
+ this.current = 0;
18
+ this.currentValue = [];
19
+ }
20
+ render() {
21
+ return html `<main>
22
+ <div>
23
+ ${Array(this.max)
24
+ .fill(0)
25
+ .map(() => html `<span><i></i></span>`)}
26
+ <input @input=${this._handleInput} value=" " />
27
+ </div>
28
+ </main>`;
29
+ }
30
+ firstUpdated() {
31
+ this._focusCheck();
32
+ this.currentValue = this.value.split("").concat(Array(this.max - this.value.length).fill(null));
33
+ this.current = this.index < 0 || this.index > this.max ? this.currentValue.indexOf(null) : this.index;
34
+ this._spans.forEach((span, index) => {
35
+ span.addEventListener("click", () => {
36
+ this.current = index;
37
+ this.focusAt();
38
+ this._input.focus();
39
+ });
40
+ });
41
+ document.addEventListener("click", (e) => {
42
+ if (!this.contains(e.target)) {
43
+ this.blur();
44
+ }
45
+ });
46
+ }
47
+ _handleInput(e) {
48
+ if (e.data === null) {
49
+ if (this.currentValue[this.current] !== null) {
50
+ this.currentValue[this.current] = null;
51
+ }
52
+ else {
53
+ this.currentValue[this.current - 1] = null;
54
+ this.current = this.current - 1 < 0 ? 0 : this.current - 1;
55
+ }
56
+ }
57
+ else {
58
+ this.currentValue[this.current] = e.data;
59
+ if (this.current + 1 >= this.max) {
60
+ this.current = this.currentValue.indexOf(null);
61
+ if (this.current === -1) {
62
+ this.blur();
63
+ }
64
+ }
65
+ else {
66
+ this.current += 1;
67
+ }
68
+ }
69
+ this.focus();
70
+ this._spans.forEach((span, index) => {
71
+ span.querySelector("i").innerText = this.currentValue[index] || "";
72
+ });
73
+ this.value = this.currentValue.join("");
74
+ this.dispatchEvent(new CustomEvent("input", { detail: this.value, bubbles: true, composed: true }));
75
+ this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
76
+ }
77
+ focus() {
78
+ this.focusAt();
79
+ }
80
+ focusAt(i = this.current) {
81
+ var _a;
82
+ this._spans.forEach((span) => {
83
+ span.classList.remove("focus");
84
+ });
85
+ (_a = this._spans[i]) === null || _a === void 0 ? void 0 : _a.classList.add("focus");
86
+ this._input.value = " ";
87
+ }
88
+ blur(i = this.current) {
89
+ var _a;
90
+ (_a = this._spans[i]) === null || _a === void 0 ? void 0 : _a.classList.remove("focus");
91
+ this._input.blur();
92
+ }
93
+ reset() {
94
+ this.currentValue = Array(this.max).fill(null);
95
+ this.current = 0;
96
+ this._spans.forEach((span) => {
97
+ span.querySelector("i").innerText = "";
98
+ });
99
+ this.value = "";
100
+ this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
101
+ }
102
+ };
103
+ SplitInput.styles = [
104
+ STD.styles,
105
+ css `
106
+ :host {
107
+ display: inline-block;
108
+ width: fit-content;
109
+ }
110
+ main {
111
+ display: flex;
112
+ }
113
+ * {
114
+ font-size: 1em;
115
+ }
116
+ div {
117
+ vertical-align: top;
118
+ position: relative;
119
+ display: inline-flex;
120
+ font-size: 116%;
121
+ }
122
+ span {
123
+ box-sizing: content-box;
124
+ vertical-align: top;
125
+ display: inline-flex;
126
+ width: 1.0275em;
127
+ padding: 0.1em;
128
+ height: 1.0275em;
129
+ pointer-events: all;
130
+ }
131
+ i {
132
+ height: inherit;
133
+ width: 100%;
134
+ z-index: 1;
135
+ background-color: var(${cssvar}--input-false);
136
+ font-style: normal;
137
+ text-align: center;
138
+ font-size: 80%;
139
+ line-height: 1.09;
140
+ }
141
+ input {
142
+ border: 0;
143
+ opacity: 0;
144
+ left: 0;
145
+ position: absolute;
146
+ background-color: tan;
147
+ right: 0;
148
+ top: 0;
149
+ bottom: 0;
150
+ }
151
+ .focus i {
152
+ outline: 0.12em solid var(${cssvar}--input-true);
153
+ }
154
+ `,
155
+ ];
156
+ __decorate([
157
+ property()
158
+ ], SplitInput.prototype, "name", void 0);
159
+ __decorate([
160
+ property()
161
+ ], SplitInput.prototype, "value", void 0);
162
+ __decorate([
163
+ property({ type: Number })
164
+ ], SplitInput.prototype, "max", void 0);
165
+ __decorate([
166
+ property({ type: Number })
167
+ ], SplitInput.prototype, "index", void 0);
168
+ __decorate([
169
+ property({ type: Boolean })
170
+ ], SplitInput.prototype, "autofocus", void 0);
171
+ __decorate([
172
+ query("input")
173
+ ], SplitInput.prototype, "_input", void 0);
174
+ __decorate([
175
+ queryAll("span")
176
+ ], SplitInput.prototype, "_spans", void 0);
177
+ SplitInput = __decorate([
178
+ define("split-input")
179
+ ], SplitInput);
180
+ export { SplitInput };
181
+ export default SplitInput;
@@ -1,20 +1,20 @@
1
- import { GLOBSTD } from "../deps.js";
2
- export default class InputFormSTD extends GLOBSTD {
3
- name: string;
4
- value: any;
5
- def: string;
6
- _input: HTMLInputElement;
7
- compositing: boolean;
8
- autofocus: boolean;
9
- static styles: import("@lit/reactive-element/css-tag.js").CSSResultGroup[];
10
- namevalue(): any[];
11
- reset(): void;
12
- _handleInput(e: any): void;
13
- _handleChange(): void;
14
- connectedCallback(): void;
15
- _compositionCheck(): void;
16
- _focusCheck(): void;
17
- focus(options?: FocusOptions): void;
18
- firstUpdated(): void;
19
- }
1
+ import { GLOBSTD } from "../deps.js";
2
+ export default class InputFormSTD extends GLOBSTD {
3
+ name: string;
4
+ value: any;
5
+ def: string;
6
+ _input: HTMLInputElement;
7
+ compositing: boolean;
8
+ autofocus: boolean;
9
+ static styles: import("@lit/reactive-element/css-tag.js").CSSResultGroup[];
10
+ namevalue(): [string, any];
11
+ reset(): void;
12
+ _handleInput(e: any): void;
13
+ _handleChange(): void;
14
+ connectedCallback(): void;
15
+ _compositionCheck(): void;
16
+ _focusCheck(): void;
17
+ focus(options?: FocusOptions): void;
18
+ firstUpdated(): void;
19
+ }
20
20
  //# sourceMappingURL=std.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../src/input-form/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,YAAY,CAAC;AAClD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,MAAM,8DAgBZ;IACD,SAAS;IAGT,KAAK;IAIL,YAAY,CAAC,CAAC,EAAE,GAAG;IAOnB,aAAa;IAGb,iBAAiB;IAKjB,iBAAiB;IAUjB,WAAW;IAKX,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAG5B,YAAY;CAIb"}
1
+ {"version":3,"file":"std.d.ts","sourceRoot":"","sources":["../../src/input-form/std.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,YAAY,CAAC;AAClD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,OAAO;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,MAAM,8DAmBX;IACF,SAAS,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;IAG1B,KAAK;IAIL,YAAY,CAAC,CAAC,EAAE,GAAG;IAOnB,aAAa;IAGb,iBAAiB;IAKjB,iBAAiB;IASjB,WAAW;IAKX,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAG5B,YAAY;CAIb"}
package/input-form/std.js CHANGED
@@ -1,68 +1,72 @@
1
- import { GLOBSTD, css, cssvar } from "../deps.js";
2
- export default class InputFormSTD extends GLOBSTD {
3
- namevalue() {
4
- return [this.name, this.value];
5
- }
6
- reset() {
7
- this.value = this.def;
8
- this._input.value = this.def;
9
- }
10
- _handleInput(e) {
11
- e.stopPropagation();
12
- this.value = e.target.value;
13
- if (this.compositing)
14
- return;
15
- this.dispatchEvent(new CustomEvent("input", { detail: this.value, bubbles: true, composed: true }));
16
- this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
17
- }
18
- _handleChange() {
19
- this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
20
- }
21
- connectedCallback() {
22
- super.connectedCallback();
23
- if (!this.def)
24
- this.def = this.value || "";
25
- if (!this.value)
26
- this.value = this.def;
27
- }
28
- _compositionCheck() {
29
- var _a, _b;
30
- (_a = this._input) === null || _a === void 0 ? void 0 : _a.addEventListener("compositionstart", () => {
31
- this.compositing = true;
32
- });
33
- (_b = this._input) === null || _b === void 0 ? void 0 : _b.addEventListener("compositionend", (e) => {
34
- this.compositing = false;
35
- this._handleInput(e);
36
- });
37
- }
38
- _focusCheck() {
39
- if (this.autofocus) {
40
- this.focus();
41
- }
42
- }
43
- focus(options) {
44
- var _a;
45
- (_a = this._input) === null || _a === void 0 ? void 0 : _a.focus(options);
46
- }
47
- firstUpdated() {
48
- this._focusCheck();
49
- this._compositionCheck();
50
- }
51
- }
52
- InputFormSTD.styles = [GLOBSTD.styles, css `
53
- :host{
54
- ${cssvar}--text:rgb(240 240 240);
55
- ${cssvar}--input-outline: rgb(25 130 180);
56
- ${cssvar}--input-outline-focus: rgb(29 155 180);
57
- ${cssvar}--input-background: rgb(24 24 24);
58
- ${cssvar}--input-background-hover: rgb(42 42 42);
59
- ${cssvar}--input-control:rgb(244 244 244);
60
- ${cssvar}--input-true: rgb(47 129 237);
61
- ${cssvar}--input-false: rgb(204 204 204);
62
- ${cssvar}--input-width: 10.6rem;
63
- }
64
- ::-webkit-calendar-picker-indicator {
65
- background-color: var(${cssvar}--input-true);
66
- border-radius: .1rem;
67
- }
68
- `];
1
+ import { GLOBSTD, css, cssvar } from "../deps.js";
2
+ class InputFormSTD extends GLOBSTD {
3
+ namevalue() {
4
+ return [this.name, this.value];
5
+ }
6
+ reset() {
7
+ this.value = this.def;
8
+ this._input.value = this.def;
9
+ }
10
+ _handleInput(e) {
11
+ e.stopPropagation();
12
+ this.value = e.target.value;
13
+ if (this.compositing)
14
+ return;
15
+ this.dispatchEvent(new CustomEvent("input", { detail: this.value, bubbles: true, composed: true }));
16
+ this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
17
+ }
18
+ _handleChange() {
19
+ this.dispatchEvent(new CustomEvent("change", { detail: this.value, composed: true }));
20
+ }
21
+ connectedCallback() {
22
+ super.connectedCallback();
23
+ if (!this.def)
24
+ this.def = this.value || "";
25
+ if (!this.value)
26
+ this.value = this.def;
27
+ }
28
+ _compositionCheck() {
29
+ var _a, _b;
30
+ (_a = this._input) === null || _a === void 0 ? void 0 : _a.addEventListener("compositionstart", () => {
31
+ this.compositing = true;
32
+ });
33
+ (_b = this._input) === null || _b === void 0 ? void 0 : _b.addEventListener("compositionend", (e) => {
34
+ this.compositing = false;
35
+ this._handleInput(e);
36
+ });
37
+ }
38
+ _focusCheck() {
39
+ if (this.autofocus) {
40
+ this.focus();
41
+ }
42
+ }
43
+ focus(options) {
44
+ var _a;
45
+ (_a = this._input) === null || _a === void 0 ? void 0 : _a.focus(options);
46
+ }
47
+ firstUpdated() {
48
+ this._focusCheck();
49
+ this._compositionCheck();
50
+ }
51
+ }
52
+ InputFormSTD.styles = [
53
+ GLOBSTD.styles,
54
+ css `
55
+ :host {
56
+ ${cssvar}--text:rgb(240 240 240);
57
+ ${cssvar}--input-outline: rgb(25 130 180);
58
+ ${cssvar}--input-outline-focus: rgb(29 155 180);
59
+ ${cssvar}--input-background: rgb(24 24 24);
60
+ ${cssvar}--input-background-hover: rgb(42 42 42);
61
+ ${cssvar}--input-control:rgb(244 244 244);
62
+ ${cssvar}--input-true: rgb(47 129 237);
63
+ ${cssvar}--input-false: rgb(204 204 204);
64
+ ${cssvar}--input-width: 10.6rem;
65
+ }
66
+ ::-webkit-calendar-picker-indicator {
67
+ background-color: var(${cssvar}--input-true);
68
+ border-radius: 0.1rem;
69
+ }
70
+ `,
71
+ ];
72
+ export default InputFormSTD;
@@ -1,23 +1,23 @@
1
- import STD from './std.js';
2
- export declare class SwitchInput extends STD {
3
- static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
4
- checked: boolean;
5
- disabled: boolean;
6
- base: "fat" | "rect";
7
- def: string;
8
- name: string;
9
- value: string;
10
- _input: HTMLInputElement;
11
- render(): import("lit").TemplateResult<1>;
12
- reset(): void;
13
- connectedCallback(): void;
14
- _handleChange(): void;
15
- namevalue(): (string | boolean)[];
16
- }
17
- export default SwitchInput;
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- "switch-input": SwitchInput;
21
- }
22
- }
1
+ import STD from "./std.js";
2
+ export declare class SwitchInput extends STD {
3
+ static styles: (import("lit").CSSResult | import("@lit/reactive-element/css-tag.js").CSSResultGroup[])[];
4
+ checked: boolean;
5
+ disabled: boolean;
6
+ base: "fat" | "rect";
7
+ def: string;
8
+ name: string;
9
+ value: string;
10
+ _input: HTMLInputElement;
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ reset(): void;
13
+ connectedCallback(): void;
14
+ _handleChange(): void;
15
+ namevalue(): [string, boolean];
16
+ }
17
+ export default SwitchInput;
18
+ declare global {
19
+ interface HTMLElementTagNameMap {
20
+ "switch-input": SwitchInput;
21
+ }
22
+ }
23
23
  //# sourceMappingURL=switch-input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch-input.d.ts","sourceRoot":"","sources":["../../src/input-form/switch-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,qBACa,WAAY,SAAQ,GAAG;IAClC,MAAM,CAAC,MAAM,4FAmGP;IACuB,OAAO,UAAS;IAChB,QAAQ,UAAS;IAClC,IAAI,EAAE,KAAK,GAAG,MAAM,CAAU;IAC9B,GAAG,SAAW;IACd,IAAI,SAAc;IAClB,KAAK,SAAQ;IACT,MAAM,EAAE,gBAAgB,CAAC;IACzC,MAAM;IASN,KAAK;IAIL,iBAAiB;IAQjB,aAAa;IAKb,SAAS;CAGV;AACD,eAAe,WAAW,CAAC;AAC3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
1
+ {"version":3,"file":"switch-input.d.ts","sourceRoot":"","sources":["../../src/input-form/switch-input.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,qBACa,WAAY,SAAQ,GAAG;IAClC,MAAM,CAAC,MAAM,4FAwGX;IAC2B,OAAO,UAAS;IAChB,QAAQ,UAAS;IAClC,IAAI,EAAE,KAAK,GAAG,MAAM,CAAU;IAC9B,GAAG,SAAW;IACd,IAAI,SAAc;IAClB,KAAK,SAAQ;IACT,MAAM,EAAE,gBAAgB,CAAC;IACzC,MAAM;IAUN,KAAK;IAIL,iBAAiB;IAQjB,aAAa;IAKb,SAAS,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;CAG/B;AACD,eAAe,WAAW,CAAC;AAC3B,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}