@web-atoms/web-controls 2.3.109 → 2.3.110
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/dist/animations/Animations.d.ts.map +1 -1
- package/dist/animations/Animations.js +34 -8
- package/dist/animations/Animations.js.map +1 -1
- package/dist/basic/Form.d.ts +29 -73
- package/dist/basic/Form.d.ts.map +1 -1
- package/dist/basic/Form.js +85 -283
- package/dist/basic/Form.js.map +1 -1
- package/dist/basic/FormField.d.ts +1 -0
- package/dist/basic/FormField.d.ts.map +1 -1
- package/dist/basic/FormField.js +3 -14
- package/dist/basic/FormField.js.map +1 -1
- package/dist/basic/InlinePopup.d.ts +1 -0
- package/dist/basic/InlinePopup.d.ts.map +1 -1
- package/dist/basic/InlinePopup.js +2 -4
- package/dist/basic/InlinePopup.js.map +1 -1
- package/dist/basic/ListRepeater.d.ts +1 -0
- package/dist/basic/ListRepeater.d.ts.map +1 -1
- package/dist/basic/ListRepeater.js +3 -8
- package/dist/basic/ListRepeater.js.map +1 -1
- package/dist/basic/MaskedInput.d.ts +1 -0
- package/dist/basic/MaskedInput.d.ts.map +1 -1
- package/dist/basic/MaskedInput.js +3 -8
- package/dist/basic/MaskedInput.js.map +1 -1
- package/dist/basic/MaskedInputDiv.d.ts +1 -0
- package/dist/basic/MaskedInputDiv.d.ts.map +1 -1
- package/dist/basic/MaskedInputDiv.js +3 -16
- package/dist/basic/MaskedInputDiv.js.map +1 -1
- package/dist/basic/OldForm.d.ts +79 -0
- package/dist/basic/OldForm.d.ts.map +1 -0
- package/dist/basic/OldForm.js +318 -0
- package/dist/basic/OldForm.js.map +1 -0
- package/dist/basic/PasswordBox.d.ts +1 -0
- package/dist/basic/PasswordBox.d.ts.map +1 -1
- package/dist/basic/PasswordBox.js +3 -8
- package/dist/basic/PasswordBox.js.map +1 -1
- package/dist/basic/PinchZoomView.d.ts +1 -0
- package/dist/basic/PinchZoomView.d.ts.map +1 -1
- package/dist/basic/PinchZoomView.js +3 -13
- package/dist/basic/PinchZoomView.js.map +1 -1
- package/dist/basic/PopupButton.d.ts +1 -0
- package/dist/basic/PopupButton.d.ts.map +1 -1
- package/dist/basic/PopupButton.js +3 -13
- package/dist/basic/PopupButton.js.map +1 -1
- package/dist/basic/RadioButtonList.d.ts +1 -0
- package/dist/basic/RadioButtonList.d.ts.map +1 -1
- package/dist/basic/RadioButtonList.js +4 -17
- package/dist/basic/RadioButtonList.js.map +1 -1
- package/dist/basic/Swipe.d.ts +1 -0
- package/dist/basic/Swipe.d.ts.map +1 -1
- package/dist/basic/Swipe.js +3 -9
- package/dist/basic/Swipe.js.map +1 -1
- package/dist/basic/Switch.d.ts +4 -0
- package/dist/basic/Switch.d.ts.map +1 -1
- package/dist/basic/Switch.js +4 -23
- package/dist/basic/Switch.js.map +1 -1
- package/dist/basic/TableRepeater.d.ts.map +1 -1
- package/dist/basic/TableRepeater.js +2 -7
- package/dist/basic/TableRepeater.js.map +1 -1
- package/dist/basic/TimeEditor.d.ts +1 -0
- package/dist/basic/TimeEditor.d.ts.map +1 -1
- package/dist/basic/TimeEditor.js +3 -13
- package/dist/basic/TimeEditor.js.map +1 -1
- package/dist/basic/TitleEditor.d.ts +1 -0
- package/dist/basic/TitleEditor.d.ts.map +1 -1
- package/dist/basic/TitleEditor.js +3 -8
- package/dist/basic/TitleEditor.js.map +1 -1
- package/dist/basic/ToggleButtonBar.d.ts +1 -0
- package/dist/basic/ToggleButtonBar.d.ts.map +1 -1
- package/dist/basic/ToggleButtonBar.js +3 -10
- package/dist/basic/ToggleButtonBar.js.map +1 -1
- package/dist/basic/Tooltip.d.ts +1 -0
- package/dist/basic/Tooltip.d.ts.map +1 -1
- package/dist/basic/Tooltip.js +3 -8
- package/dist/basic/Tooltip.js.map +1 -1
- package/dist/basic/styles/form-field-style.d.ts +2 -0
- package/dist/basic/styles/form-field-style.d.ts.map +1 -0
- package/dist/basic/styles/form-field-style.js +146 -0
- package/dist/basic/styles/form-field-style.js.map +1 -0
- package/dist/basic/styles/inline-popup-style.d.ts +2 -0
- package/dist/basic/styles/inline-popup-style.d.ts.map +1 -0
- package/dist/basic/styles/inline-popup-style.js +28 -0
- package/dist/basic/styles/inline-popup-style.js.map +1 -0
- package/dist/basic/styles/list-repeater-style.d.ts +2 -0
- package/dist/basic/styles/list-repeater-style.d.ts.map +1 -0
- package/dist/basic/styles/list-repeater-style.js +36 -0
- package/dist/basic/styles/list-repeater-style.js.map +1 -0
- package/dist/basic/styles/masked-input-div.d.ts +2 -0
- package/dist/basic/styles/masked-input-div.d.ts.map +1 -0
- package/dist/basic/styles/masked-input-div.js +52 -0
- package/dist/basic/styles/masked-input-div.js.map +1 -0
- package/dist/basic/styles/masked-input-style.d.ts +2 -0
- package/dist/basic/styles/masked-input-style.d.ts.map +1 -0
- package/dist/basic/styles/masked-input-style.js +19 -0
- package/dist/basic/styles/masked-input-style.js.map +1 -0
- package/dist/basic/styles/password-box-style.d.ts +2 -0
- package/dist/basic/styles/password-box-style.d.ts.map +1 -0
- package/dist/basic/styles/password-box-style.js +35 -0
- package/dist/basic/styles/password-box-style.js.map +1 -0
- package/dist/basic/styles/pinch-zoom-view-style.d.ts +2 -0
- package/dist/basic/styles/pinch-zoom-view-style.d.ts.map +1 -0
- package/dist/basic/styles/pinch-zoom-view-style.js +61 -0
- package/dist/basic/styles/pinch-zoom-view-style.js.map +1 -0
- package/dist/basic/styles/popup-button-style.d.ts +2 -0
- package/dist/basic/styles/popup-button-style.d.ts.map +1 -0
- package/dist/basic/styles/popup-button-style.js +40 -0
- package/dist/basic/styles/popup-button-style.js.map +1 -0
- package/dist/basic/styles/radio-button-list-style.d.ts +2 -0
- package/dist/basic/styles/radio-button-list-style.d.ts.map +1 -0
- package/dist/basic/styles/radio-button-list-style.js +44 -0
- package/dist/basic/styles/radio-button-list-style.js.map +1 -0
- package/dist/basic/styles/swipe-style.d.ts +2 -0
- package/dist/basic/styles/swipe-style.d.ts.map +1 -0
- package/dist/basic/styles/swipe-style.js +32 -0
- package/dist/basic/styles/swipe-style.js.map +1 -0
- package/dist/basic/styles/switch-style.d.ts +2 -0
- package/dist/basic/styles/switch-style.d.ts.map +1 -0
- package/dist/basic/styles/switch-style.js +127 -0
- package/dist/basic/styles/switch-style.js.map +1 -0
- package/dist/basic/styles/time-editor-style.d.ts +2 -0
- package/dist/basic/styles/time-editor-style.d.ts.map +1 -0
- package/dist/basic/styles/time-editor-style.js +64 -0
- package/dist/basic/styles/time-editor-style.js.map +1 -0
- package/dist/basic/styles/title-editor-style.d.ts +2 -0
- package/dist/basic/styles/title-editor-style.d.ts.map +1 -0
- package/dist/basic/styles/title-editor-style.js +45 -0
- package/dist/basic/styles/title-editor-style.js.map +1 -0
- package/dist/basic/styles/toggle-button-bar-style.d.ts +2 -0
- package/dist/basic/styles/toggle-button-bar-style.d.ts.map +1 -0
- package/dist/basic/styles/toggle-button-bar-style.js +48 -0
- package/dist/basic/styles/toggle-button-bar-style.js.map +1 -0
- package/dist/basic/styles/toggle-view-style.d.ts +2 -0
- package/dist/basic/styles/toggle-view-style.d.ts.map +1 -0
- package/dist/basic/styles/toggle-view-style.js +91 -0
- package/dist/basic/styles/toggle-view-style.js.map +1 -0
- package/dist/basic/styles/tooltip-style.d.ts +2 -0
- package/dist/basic/styles/tooltip-style.d.ts.map +1 -0
- package/dist/basic/styles/tooltip-style.js +21 -0
- package/dist/basic/styles/tooltip-style.js.map +1 -0
- package/dist/html-editor/InlineHtmlEditor.d.ts.map +1 -1
- package/dist/html-editor/InlineHtmlEditor.js +29 -7
- package/dist/html-editor/InlineHtmlEditor.js.map +1 -1
- package/dist/mobile-app/BottomPopup.d.ts.map +1 -1
- package/dist/mobile-app/BottomPopup.js +76 -14
- package/dist/mobile-app/BottomPopup.js.map +1 -1
- package/dist/mobile-app/MobileApp.d.ts.map +1 -1
- package/dist/mobile-app/MobileApp.js +226 -26
- package/dist/mobile-app/MobileApp.js.map +1 -1
- package/dist/player/AtomVideoPlayer.d.ts.map +1 -1
- package/dist/player/AtomVideoPlayer.js +160 -13
- package/dist/player/AtomVideoPlayer.js.map +1 -1
- package/dist/toggle-view/AtomToggleView.d.ts +1 -0
- package/dist/toggle-view/AtomToggleView.d.ts.map +1 -1
- package/dist/toggle-view/AtomToggleView.js +3 -16
- package/dist/toggle-view/AtomToggleView.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/animations/Animations.ts +32 -28
- package/src/basic/Form.tsx +89 -383
- package/src/basic/FormField.tsx +1 -117
- package/src/basic/InlinePopup.tsx +1 -16
- package/src/basic/ListRepeater.tsx +1 -26
- package/src/basic/MaskedInput.tsx +2 -17
- package/src/basic/MaskedInputDiv.tsx +2 -41
- package/src/basic/OldForm.tsx +424 -0
- package/src/basic/PasswordBox.tsx +1 -22
- package/src/basic/PinchZoomView.tsx +2 -41
- package/src/basic/PopupButton.tsx +1 -19
- package/src/basic/RadioButtonList.tsx +1 -17
- package/src/basic/Swipe.tsx +1 -21
- package/src/basic/Switch.tsx +2 -83
- package/src/basic/TableRepeater.tsx +0 -3
- package/src/basic/TimeEditor.tsx +2 -40
- package/src/basic/TitleEditor.tsx +1 -28
- package/src/basic/ToggleButtonBar.tsx +1 -30
- package/src/basic/Tooltip.tsx +2 -5
- package/src/basic/styles/form-field-style.ts +136 -0
- package/src/basic/styles/inline-popup-style.ts +19 -0
- package/src/basic/styles/list-repeater-style.ts +25 -0
- package/src/basic/styles/masked-input-div.ts +41 -0
- package/src/basic/styles/masked-input-style.ts +8 -0
- package/src/basic/styles/password-box-style.ts +24 -0
- package/src/basic/styles/pinch-zoom-view-style.ts +50 -0
- package/src/basic/styles/popup-button-style.ts +30 -0
- package/src/basic/styles/radio-button-list-style.ts +34 -0
- package/src/basic/styles/swipe-style.ts +22 -0
- package/src/basic/styles/switch-style.ts +116 -0
- package/src/basic/styles/time-editor-style.ts +53 -0
- package/src/basic/styles/title-editor-style.ts +34 -0
- package/src/basic/styles/toggle-button-bar-style.ts +37 -0
- package/src/basic/styles/toggle-view-style.ts +80 -0
- package/src/basic/styles/tooltip-style.ts +10 -0
- package/src/html-editor/InlineHtmlEditor.tsx +26 -16
- package/src/mobile-app/BottomPopup.tsx +73 -68
- package/src/mobile-app/MobileApp.tsx +227 -174
- package/src/player/AtomVideoPlayer.tsx +157 -141
- package/src/toggle-view/AtomToggleView.tsx +3 -53
- package/dist/basic/Form2.d.ts +0 -27
- package/dist/basic/Form2.d.ts.map +0 -1
- package/dist/basic/Form2.js +0 -120
- package/dist/basic/Form2.js.map +0 -1
- package/dist/basic/FormDialog.d.ts +0 -4
- package/dist/basic/FormDialog.d.ts.map +0 -1
- package/dist/basic/FormDialog.js +0 -32
- package/dist/basic/FormDialog.js.map +0 -1
- package/dist/basic/Input.d.ts +0 -5
- package/dist/basic/Input.d.ts.map +0 -1
- package/dist/basic/Input.js +0 -30
- package/dist/basic/Input.js.map +0 -1
- package/dist/basic/Mix.d.ts +0 -10
- package/dist/basic/Mix.d.ts.map +0 -1
- package/dist/basic/Mix.js +0 -31
- package/dist/basic/Mix.js.map +0 -1
- package/dist/basic/Panel.d.ts +0 -6
- package/dist/basic/Panel.d.ts.map +0 -1
- package/dist/basic/Panel.js +0 -37
- package/dist/basic/Panel.js.map +0 -1
- package/dist/basic/Row.d.ts +0 -15
- package/dist/basic/Row.d.ts.map +0 -1
- package/dist/basic/Row.js +0 -43
- package/dist/basic/Row.js.map +0 -1
- package/dist/switch/AtomSwitch.d.ts +0 -7
- package/dist/switch/AtomSwitch.d.ts.map +0 -1
- package/dist/switch/AtomSwitch.js +0 -42
- package/dist/switch/AtomSwitch.js.map +0 -1
- package/dist/switch/AtomSwitchStyle.d.ts +0 -8
- package/dist/switch/AtomSwitchStyle.d.ts.map +0 -1
- package/dist/switch/AtomSwitchStyle.js +0 -80
- package/dist/switch/AtomSwitchStyle.js.map +0 -1
- package/src/basic/Form2.tsx +0 -121
- package/src/basic/FormDialog.tsx +0 -28
- package/src/basic/Input.tsx +0 -30
- package/src/basic/Mix.tsx +0 -25
- package/src/basic/Panel.tsx +0 -43
- package/src/basic/Row.tsx +0 -49
- package/src/switch/AtomSwitch.tsx +0 -24
- package/src/switch/AtomSwitchStyle.ts +0 -71
package/src/basic/Swipe.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
2
2
|
import StyleRule from "@web-atoms/core/dist/style/StyleRule";
|
|
3
3
|
import CSS from "@web-atoms/core/dist/web/styles/CSS";
|
|
4
|
+
import "./styles/swipe-style";
|
|
4
5
|
|
|
5
6
|
interface ISwipeStart {
|
|
6
7
|
element: HTMLElement;
|
|
@@ -9,27 +10,6 @@ interface ISwipeStart {
|
|
|
9
10
|
|
|
10
11
|
let swipeStart: ISwipeStart = null;
|
|
11
12
|
|
|
12
|
-
CSS(StyleRule()
|
|
13
|
-
.display("grid")
|
|
14
|
-
.child(StyleRule("*")
|
|
15
|
-
.gridRow("1")
|
|
16
|
-
.gridColumn("1")
|
|
17
|
-
)
|
|
18
|
-
, "[data-swipe]");
|
|
19
|
-
|
|
20
|
-
CSS(StyleRule()
|
|
21
|
-
.child(StyleRule("*")
|
|
22
|
-
.alignSelf("center")
|
|
23
|
-
.justifySelf("end" as any)
|
|
24
|
-
.zIndex(2)
|
|
25
|
-
.and(StyleRule(":first-child")
|
|
26
|
-
.alignSelf("stretch")
|
|
27
|
-
.justifySelf("stretch" as any)
|
|
28
|
-
.zIndex(10)
|
|
29
|
-
)
|
|
30
|
-
)
|
|
31
|
-
, "[data-swipe=left]");
|
|
32
|
-
|
|
33
13
|
|
|
34
14
|
document.body.addEventListener("touchstart", (e: TouchEvent) => {
|
|
35
15
|
let element = e.target as HTMLElement;
|
package/src/basic/Switch.tsx
CHANGED
|
@@ -3,93 +3,12 @@ import StyleRule from "@web-atoms/core/dist/style/StyleRule";
|
|
|
3
3
|
import CSS from "@web-atoms/core/dist/web/styles/CSS";
|
|
4
4
|
import IElement from "./IElement";
|
|
5
5
|
|
|
6
|
+
import "./styles/switch-style";
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* Original source = https://www.htmllion.com/css3-toggle-switch-button.html
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
|
-
const css = CSS(StyleRule()
|
|
11
|
-
.position("relative")
|
|
12
|
-
.display("inline-block")
|
|
13
|
-
.verticalAlign("top")
|
|
14
|
-
.minWidth(70)
|
|
15
|
-
.height(30)
|
|
16
|
-
.padding(3)
|
|
17
|
-
.margin(0)
|
|
18
|
-
.background("linear-gradient(to bottom, #eeeeee, #FFFFFF 25px)" as any)
|
|
19
|
-
.backgroundImage("-webkit-linear-gradient(top, #eeeeee, #FFFFFF 25px)")
|
|
20
|
-
.borderRadius(18)
|
|
21
|
-
.boxShadow("inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05)")
|
|
22
|
-
.cursor("pointer")
|
|
23
|
-
.boxSizing("content-box")
|
|
24
|
-
.child(StyleRule(".switch-input")
|
|
25
|
-
.absolutePosition({ top: 0, left: 0})
|
|
26
|
-
.opacity(0 as any)
|
|
27
|
-
.boxSizing("content-box")
|
|
28
|
-
)
|
|
29
|
-
.child(StyleRule(".switch-label")
|
|
30
|
-
.position("relative")
|
|
31
|
-
.display("block")
|
|
32
|
-
.height("inherit")
|
|
33
|
-
// .fontSize(12)
|
|
34
|
-
// .textTransform("uppercase")
|
|
35
|
-
.backgroundColor("#eceeef")
|
|
36
|
-
.borderRadius("inherit")
|
|
37
|
-
.boxShadow("inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15)")
|
|
38
|
-
.boxSizing("content-box")
|
|
39
|
-
.and(StyleRule(":before, .switch-label:after")
|
|
40
|
-
.position("absolute")
|
|
41
|
-
.top("50%")
|
|
42
|
-
.marginTop("-.5em")
|
|
43
|
-
.lineHeight("1")
|
|
44
|
-
.webkitTransition("inherit")
|
|
45
|
-
.transition("inherit")
|
|
46
|
-
.boxSizing("content-box")
|
|
47
|
-
)
|
|
48
|
-
.and(StyleRule(":before")
|
|
49
|
-
.content("attr(data-off)" as any)
|
|
50
|
-
.right(11)
|
|
51
|
-
.color("#aaaaaa")
|
|
52
|
-
.textShadow("0 1px rgba(255, 255, 255, 0.5)")
|
|
53
|
-
)
|
|
54
|
-
.and(StyleRule(":after")
|
|
55
|
-
.content("attr(data-on)" as any)
|
|
56
|
-
.left(11)
|
|
57
|
-
.color("#FFFFFF")
|
|
58
|
-
.textShadow("0 1px rgba(0, 0, 0, 0.2)")
|
|
59
|
-
.opacity("0")
|
|
60
|
-
)
|
|
61
|
-
)
|
|
62
|
-
.child(StyleRule(".switch-input:checked ~ .switch-label")
|
|
63
|
-
.backgroundColor("#E1B42B")
|
|
64
|
-
.boxShadow("inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2)")
|
|
65
|
-
)
|
|
66
|
-
.child(StyleRule(".switch-input:checked ~ .switch-label:before")
|
|
67
|
-
.opacity("0")
|
|
68
|
-
)
|
|
69
|
-
.child(StyleRule(".switch-input:checked ~ .switch-label:after")
|
|
70
|
-
.opacity("1")
|
|
71
|
-
)
|
|
72
|
-
.child(StyleRule(".switch-handle")
|
|
73
|
-
.absolutePosition({top: 4, left: 4, width: 28, height: 28})
|
|
74
|
-
.background("linear-gradient(to bottom, #FFFFFF 40%, #f0f0f0)" as any)
|
|
75
|
-
.borderRadius("100%")
|
|
76
|
-
.boxShadow("1px 1px 5px rgba(0, 0, 0, 0.2)")
|
|
77
|
-
.and(StyleRule(":before")
|
|
78
|
-
.content("")
|
|
79
|
-
.absolutePosition({ top: "50%", left: "50%", width: 12, height: 12 })
|
|
80
|
-
.background("linear-gradient(to bottom, #eeeeee, #FFFFFF)" as any)
|
|
81
|
-
.borderRadius(6)
|
|
82
|
-
.boxShadow("inset 0 1px rgba(0, 0, 0, 0.02)")
|
|
83
|
-
)
|
|
84
|
-
)
|
|
85
|
-
.child(StyleRule(".switch-input:checked ~ .switch-handle")
|
|
86
|
-
.left(44)
|
|
87
|
-
.boxShadow("-1px 1px 5px rgba(0, 0, 0, 0.2)")
|
|
88
|
-
)
|
|
89
|
-
.child(StyleRule(".switch-label, .switch-handle")
|
|
90
|
-
.transition("All 0.3s ease")
|
|
91
|
-
)
|
|
92
|
-
, "*[data-ui-switch=ui-switch]");
|
|
93
12
|
|
|
94
13
|
export interface ISwitch extends IElement {
|
|
95
14
|
checked;
|
|
@@ -4,9 +4,6 @@ import StyleRule from "@web-atoms/core/dist/style/StyleRule";
|
|
|
4
4
|
import CSS from "@web-atoms/core/dist/web/styles/CSS";
|
|
5
5
|
import AtomRepeater, { disposeChildren } from "./AtomRepeater";
|
|
6
6
|
|
|
7
|
-
CSS(StyleRule()
|
|
8
|
-
, "table[data-table-repeater=table-repeater]");
|
|
9
|
-
|
|
10
7
|
export default class TableRepeater extends AtomRepeater {
|
|
11
8
|
|
|
12
9
|
constructor(app, e = document.createElement("table")) {
|
package/src/basic/TimeEditor.tsx
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AtomBinder } from "@web-atoms/core/dist/core/AtomBinder";
|
|
2
2
|
import XNode from "@web-atoms/core/dist/core/XNode";
|
|
3
|
-
import StyleRule from "@web-atoms/core/dist/style/StyleRule";
|
|
4
3
|
import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
|
|
5
|
-
import { descendentElementIterator } from "@web-atoms/core/dist/web/core/AtomUI";
|
|
6
|
-
import CSS from "@web-atoms/core/dist/web/styles/CSS";
|
|
7
4
|
import TimeSpan from "@web-atoms/date-time/dist/TimeSpan";
|
|
8
5
|
import Select from "./Select";
|
|
9
6
|
import Bind from "@web-atoms/core/dist/core/Bind";
|
|
10
7
|
|
|
8
|
+
import "./styles/time-editor-style";
|
|
9
|
+
|
|
11
10
|
function hours() {
|
|
12
11
|
return [
|
|
13
12
|
{ label: "01", value: 1 },
|
|
@@ -36,43 +35,6 @@ function minutes() {
|
|
|
36
35
|
return items;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
CSS(StyleRule()
|
|
40
|
-
.paddingLeft(5)
|
|
41
|
-
.gridRow("2")
|
|
42
|
-
.flexLayout({ direction: "row", alignItems: "center", justifyContent: "start" as any, gap: 0})
|
|
43
|
-
.child(StyleRule("[data-element=hour]")
|
|
44
|
-
.marginLeft(5)
|
|
45
|
-
.marginRight(5)
|
|
46
|
-
)
|
|
47
|
-
.child(StyleRule("[data-element=minute]")
|
|
48
|
-
.marginRight(5)
|
|
49
|
-
)
|
|
50
|
-
.child(StyleRule("[data-element=pm]")
|
|
51
|
-
.marginRight(5)
|
|
52
|
-
)
|
|
53
|
-
.child(StyleRule("button")
|
|
54
|
-
.borderRadius(9999)
|
|
55
|
-
.outline("none")
|
|
56
|
-
.border("none")
|
|
57
|
-
.backgroundColor("transparent")
|
|
58
|
-
.and(StyleRule("[data-selected=true]")
|
|
59
|
-
.backgroundColor("var(--accent-color, blue)")
|
|
60
|
-
.color("var(--accent-text-color, white)")
|
|
61
|
-
)
|
|
62
|
-
)
|
|
63
|
-
.child(StyleRule("button[data-element=am]")
|
|
64
|
-
.borderTopRightRadius(0)
|
|
65
|
-
.borderBottomRightRadius(0)
|
|
66
|
-
)
|
|
67
|
-
.child(StyleRule("button[data-element=pm]")
|
|
68
|
-
.borderTopLeftRadius(0)
|
|
69
|
-
.borderBottomLeftRadius(0)
|
|
70
|
-
)
|
|
71
|
-
.child(StyleRule("select")
|
|
72
|
-
.border("none")
|
|
73
|
-
.outline("none")
|
|
74
|
-
),"[data-time-editor]");
|
|
75
|
-
|
|
76
38
|
export default class TimeEditor extends AtomControl {
|
|
77
39
|
|
|
78
40
|
// private time: TimeSpan;
|
|
@@ -4,34 +4,7 @@ import CSS from "@web-atoms/core/dist/web/styles/CSS";
|
|
|
4
4
|
import IElement from "./IElement";
|
|
5
5
|
import { InlinePopupButton } from "./InlinePopup";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
.display("inline-grid")
|
|
9
|
-
.gridTemplateRows("1fr auto")
|
|
10
|
-
.gridTemplateColumns("1fr 40px")
|
|
11
|
-
.columnGap("5px")
|
|
12
|
-
.child(StyleRule("input")
|
|
13
|
-
.gridRow("1 / span 2")
|
|
14
|
-
.gridColumn("1")
|
|
15
|
-
)
|
|
16
|
-
.child(StyleRule("i")
|
|
17
|
-
.gridRow("1")
|
|
18
|
-
.gridColumn("2")
|
|
19
|
-
.fontSize("smaller")
|
|
20
|
-
.paddingLeft(5)
|
|
21
|
-
.paddingRight(5)
|
|
22
|
-
.alignSelf("stretch")
|
|
23
|
-
.justifySelf("stretch")
|
|
24
|
-
.textAlign("center")
|
|
25
|
-
)
|
|
26
|
-
.child(StyleRule("span")
|
|
27
|
-
.gridRow("2")
|
|
28
|
-
.gridColumn("2")
|
|
29
|
-
.fontSize("xx-small")
|
|
30
|
-
.alignSelf("stretch")
|
|
31
|
-
.justifySelf("stretch")
|
|
32
|
-
.textAlign("center")
|
|
33
|
-
)
|
|
34
|
-
, "[data-title-editor=title-editor]");
|
|
7
|
+
import "./styles/title-editor-style";
|
|
35
8
|
|
|
36
9
|
export type Capitalize = "none" | "off" | "on" | "sentences" | "words" | "characters";
|
|
37
10
|
|
|
@@ -5,36 +5,7 @@ import StyleRule from "@web-atoms/core/dist/style/StyleRule";
|
|
|
5
5
|
import CSS from "@web-atoms/core/dist/web/styles/CSS";
|
|
6
6
|
import AtomRepeater from "./AtomRepeater";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
.display("inline-grid")
|
|
10
|
-
.gridAutoFlow("column")
|
|
11
|
-
.alignContent("center")
|
|
12
|
-
.justifyItems("stretch")
|
|
13
|
-
.textAlign("center")
|
|
14
|
-
.borderStyle("solid")
|
|
15
|
-
.borderWidth(1)
|
|
16
|
-
.borderColor(Colors.lightGray)
|
|
17
|
-
.borderRadius(9999)
|
|
18
|
-
.child(StyleRule("[data-item-type=toggle-button]")
|
|
19
|
-
.padding(5)
|
|
20
|
-
.backgroundColor(Colors.white)
|
|
21
|
-
.cursor("pointer")
|
|
22
|
-
.and(StyleRule(":first-child")
|
|
23
|
-
.paddingLeft(10)
|
|
24
|
-
.borderTopLeftRadius(9999)
|
|
25
|
-
.borderBottomLeftRadius(9999)
|
|
26
|
-
)
|
|
27
|
-
.and(StyleRule(":last-child")
|
|
28
|
-
.borderTopRightRadius(9999)
|
|
29
|
-
.borderBottomRightRadius(9999)
|
|
30
|
-
.paddingRight(10)
|
|
31
|
-
)
|
|
32
|
-
.and(StyleRule("[data-selected-item=true]")
|
|
33
|
-
.backgroundColor(`var(--accent-color, black)`)
|
|
34
|
-
.color(Colors.white)
|
|
35
|
-
)
|
|
36
|
-
)
|
|
37
|
-
, "*[data-button-bar=button-bar]");
|
|
8
|
+
import "./styles/toggle-button-bar-style";
|
|
38
9
|
|
|
39
10
|
export default class ToggleButtonBar extends AtomRepeater {
|
|
40
11
|
|
package/src/basic/Tooltip.tsx
CHANGED
|
@@ -8,6 +8,8 @@ import CSS from "@web-atoms/core/dist/web/styles/CSS";
|
|
|
8
8
|
import AtomRepeater, { getParentRepeaterItem } from "./AtomRepeater";
|
|
9
9
|
import InlinePopup from "./InlinePopup";
|
|
10
10
|
|
|
11
|
+
import "./styles/tooltip-style";
|
|
12
|
+
|
|
11
13
|
const tooltips = new Map<HTMLElement, [{control: any, tooltip: CancelToken}, typeof InlinePopup]>();
|
|
12
14
|
|
|
13
15
|
ElementValueSetters.tooltip = (control: AtomControl, e: HTMLElement, value: any) => {
|
|
@@ -36,11 +38,6 @@ document.body.addEventListener("pointerleave", (ev) => {
|
|
|
36
38
|
}, 250);
|
|
37
39
|
}, true);
|
|
38
40
|
|
|
39
|
-
CSS(StyleRule()
|
|
40
|
-
.verticalFlexLayout({})
|
|
41
|
-
.padding(10),
|
|
42
|
-
"div[data-tooltip=tooltip]");
|
|
43
|
-
|
|
44
41
|
export default class Tooltip extends InlinePopup {
|
|
45
42
|
|
|
46
43
|
public static showTooltip(start: HTMLElement) {
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
|
|
3
|
+
styled.css `
|
|
4
|
+
|
|
5
|
+
display: grid;
|
|
6
|
+
align-items: center;
|
|
7
|
+
grid-template-columns: auto 1fr auto auto;
|
|
8
|
+
grid-template-rows: auto auto auto;
|
|
9
|
+
|
|
10
|
+
& > [data-element=label] {
|
|
11
|
+
grid-row: 1;
|
|
12
|
+
grid-column: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
& > [data-element=content] {
|
|
16
|
+
grid-row-start: 2;
|
|
17
|
+
grid-column-start: 1;
|
|
18
|
+
grid-column-end: span 2;
|
|
19
|
+
margin-top: 5px;
|
|
20
|
+
margin-bottom: 5px; }
|
|
21
|
+
|
|
22
|
+
&[data-border=true] input {
|
|
23
|
+
border: none;
|
|
24
|
+
outline: none; }
|
|
25
|
+
|
|
26
|
+
&[data-border=true] textarea {
|
|
27
|
+
border: none;
|
|
28
|
+
outline: none; }
|
|
29
|
+
|
|
30
|
+
&[data-border=true] select {
|
|
31
|
+
border: none; }
|
|
32
|
+
|
|
33
|
+
& > i[data-border=border] {
|
|
34
|
+
grid-column-start: 1;
|
|
35
|
+
grid-column-end: span 3;
|
|
36
|
+
grid-row-start: 3;
|
|
37
|
+
align-self: flex-end;
|
|
38
|
+
border-bottom-style: solid;
|
|
39
|
+
border-bottom-width: 1px;
|
|
40
|
+
border-bottom-color: #d3d3d3;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&[data-focused=true] > i[data-border=border] {
|
|
44
|
+
border-bottom-color: #000000;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& > i[data-help=help] {
|
|
48
|
+
grid-row-start: 2;
|
|
49
|
+
grid-column-start: 3;
|
|
50
|
+
padding: 5px;
|
|
51
|
+
font-size: x-large;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
margin-left: auto;
|
|
54
|
+
color: #90ee90;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
& > .field-error {
|
|
58
|
+
grid-row-start: 4;
|
|
59
|
+
grid-column-start: 1;
|
|
60
|
+
grid-column-end: span 3;
|
|
61
|
+
padding: 5px;
|
|
62
|
+
margin: 5px;
|
|
63
|
+
border-radius: 9999px;
|
|
64
|
+
background-color: #ff0000;
|
|
65
|
+
color: #ffffff;
|
|
66
|
+
font-size: smaller;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
& > .field-error:empty {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& > span[data-required=required] {
|
|
74
|
+
grid-column-start: 2;
|
|
75
|
+
grid-row: 1;
|
|
76
|
+
visibility: hidden;
|
|
77
|
+
color: #ff0000;
|
|
78
|
+
|
|
79
|
+
&.true {
|
|
80
|
+
visibility: visible;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&[data-layout=horizontal] {
|
|
85
|
+
|
|
86
|
+
grid-template-columns: auto auto 1fr auto;
|
|
87
|
+
grid-template-rows: auto auto;
|
|
88
|
+
|
|
89
|
+
& > label.label {
|
|
90
|
+
grid-row-start: 2;
|
|
91
|
+
margin-right: 5px;
|
|
92
|
+
margin-bottom: 5px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
& > [data-content=content] {
|
|
96
|
+
grid-row-start: 2;
|
|
97
|
+
grid-column-start: 3;
|
|
98
|
+
margin-top: 0px;
|
|
99
|
+
margin-bottom: 5px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
& > i[data-help=help] {
|
|
103
|
+
grid-row-start: 2;
|
|
104
|
+
grid-column-start: 4;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
& > .field-error {
|
|
108
|
+
grid-row-start: 4;
|
|
109
|
+
grid-column-start: 1;
|
|
110
|
+
grid-column-end: span 3;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
& > span[data-required=required] {
|
|
114
|
+
grid-row-start: 2;
|
|
115
|
+
grid-column-start: 2;
|
|
116
|
+
margin-right: 5px;
|
|
117
|
+
display: none;
|
|
118
|
+
color: #ff0000;
|
|
119
|
+
|
|
120
|
+
&.true {
|
|
121
|
+
display: inline;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
`.installGlobal("[data-wa-form-field=wa-form-field]");
|
|
127
|
+
|
|
128
|
+
styled.css `
|
|
129
|
+
overflow: auto;
|
|
130
|
+
padding: 10px;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: flex-start;
|
|
135
|
+
gap: 4px;
|
|
136
|
+
`.installGlobal("[data-form-field-help=help-window]");
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
|
|
3
|
+
styled.css `
|
|
4
|
+
position: absolute;
|
|
5
|
+
border-radius: 5px;
|
|
6
|
+
padding: 5px;
|
|
7
|
+
box-shadow: rgba(50, 50, 105, 0.07) 0px 2px 5px 0px, rgba(0, 0, 0, 0.03) 0px 1px 1px 0px;
|
|
8
|
+
border: solid 1px rgba(0, 0, 0, 0.05);
|
|
9
|
+
z-index: 5000;
|
|
10
|
+
background-color: var(--primary-bg, white);
|
|
11
|
+
color: var(--primary-color, darkgray);
|
|
12
|
+
left: 0;
|
|
13
|
+
`.installGlobal("*[data-inline-popup=inline-popup]");
|
|
14
|
+
|
|
15
|
+
styled.css `
|
|
16
|
+
right: 0;
|
|
17
|
+
left: unset;
|
|
18
|
+
`.installGlobal("*[data-alignment=bottom-right] > [data-inline-popup=inline-popup]");
|
|
19
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
|
|
3
|
+
styled.css `
|
|
4
|
+
|
|
5
|
+
& > *[data-item-index] {
|
|
6
|
+
padding: 5px;
|
|
7
|
+
border-radius: 5px;
|
|
8
|
+
background-color: var(--list-bg-color);
|
|
9
|
+
color: var(--list-color);
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
background-color: var(--list-selected-bg-color-hover, lightgreen);
|
|
13
|
+
color: var(--list-selected-color-hover, inherit);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
& > td {
|
|
17
|
+
padding : 5px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&[data-selected-item=true] {
|
|
21
|
+
background-color: var(--list-selected-bg-color, lightgray);
|
|
22
|
+
color: var(--list-selected-color, inherit);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`.installGlobal("*[data-list-repeater=list-repeater]");
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
|
|
3
|
+
styled.css `
|
|
4
|
+
display: inline;
|
|
5
|
+
position: relative;
|
|
6
|
+
padding-left: 2px;
|
|
7
|
+
padding-top: 2px;
|
|
8
|
+
font-family: monospace;
|
|
9
|
+
|
|
10
|
+
&::before {
|
|
11
|
+
position: absolute;
|
|
12
|
+
left: 2px;
|
|
13
|
+
top: 2px;
|
|
14
|
+
content: attr(data-label);
|
|
15
|
+
font-family: inherit;
|
|
16
|
+
font-weight: inherit;
|
|
17
|
+
font-size: inherit;
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::after {
|
|
22
|
+
position: absolute;
|
|
23
|
+
left: 2px;
|
|
24
|
+
top: 2px;
|
|
25
|
+
content: attr(data-mask);
|
|
26
|
+
font-family: inherit;
|
|
27
|
+
font-weight: inherit;
|
|
28
|
+
font-size: inherit;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
opacity: 0.2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
* > input {
|
|
34
|
+
color: transparent;
|
|
35
|
+
caret-color: gray;
|
|
36
|
+
font-family: inherit;
|
|
37
|
+
font-weight: inherit;
|
|
38
|
+
font-size: inherit;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
`.installGlobal();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
|
|
3
|
+
styled.css `
|
|
4
|
+
|
|
5
|
+
display: inline-grid;
|
|
6
|
+
grid-template-columns: 1fr 20px;
|
|
7
|
+
|
|
8
|
+
& > input {
|
|
9
|
+
grid-row: 1;
|
|
10
|
+
grid-column: 1 / span 2;
|
|
11
|
+
|
|
12
|
+
&::-ms-reveal {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
& > i {
|
|
18
|
+
grid-row: 1;
|
|
19
|
+
grid-column: 1;
|
|
20
|
+
align-self: center;
|
|
21
|
+
justify-self: center;
|
|
22
|
+
z-index: 2;
|
|
23
|
+
}
|
|
24
|
+
`.installGlobal("div[data-password-box=password-box]");
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
|
|
3
|
+
styled.css `
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
cursor: grab;
|
|
7
|
+
|
|
8
|
+
&[data-state=grabbing] {
|
|
9
|
+
cursor: grabbing;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
& > .scale {
|
|
13
|
+
position: absolute;
|
|
14
|
+
right: 10px;
|
|
15
|
+
top: 10px;
|
|
16
|
+
border: solid 2px darkgray;
|
|
17
|
+
border-radius: 4px;
|
|
18
|
+
background-color: white;
|
|
19
|
+
padding: 4px;
|
|
20
|
+
color: black;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
& > .image-container {
|
|
24
|
+
position: absolute;
|
|
25
|
+
left: 0;
|
|
26
|
+
top: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
display: grid;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
& > .spinner {
|
|
37
|
+
position: absolute;
|
|
38
|
+
left: 0;
|
|
39
|
+
top: 0;
|
|
40
|
+
right: 0;
|
|
41
|
+
bottom: 0;
|
|
42
|
+
display: inline-grid;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-items: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& > .hide {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
`.installGlobal("div[data-pinch-zoom]");
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
|
|
3
|
+
styled.css `
|
|
4
|
+
padding: 5px;
|
|
5
|
+
border-radius: 5px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: flex-start;
|
|
11
|
+
gap: 4px;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
|
|
14
|
+
&:hover {
|
|
15
|
+
background-color: lightgreen;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
& > * {
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
`.installGlobal("*[data-menu-item=menu-item]");
|
|
23
|
+
|
|
24
|
+
styled.css `
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: stretch;
|
|
28
|
+
justify-content: stretch;
|
|
29
|
+
gap: 4px;
|
|
30
|
+
`.installGlobal("*[data-menu-items=menu-items]");
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import styled from "@web-atoms/core/dist/style/styled";
|
|
2
|
+
|
|
3
|
+
styled.css `
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: flex-start;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
gap: 4px;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
`.installGlobal("*[data-radio-button-list=radio-button-list]");
|
|
11
|
+
|
|
12
|
+
styled.css `
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
justify-content: flex-start;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 4px;
|
|
18
|
+
margin-right: 5px;
|
|
19
|
+
|
|
20
|
+
& > span {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&[data-selected-item=true] {
|
|
25
|
+
& > i.fa-circle {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
&[data-selected-item=false] {
|
|
30
|
+
& > i.fa-dot-circle {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
`.installGlobal("div[data-item-type=radio]");
|