@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.
Files changed (236) hide show
  1. package/dist/animations/Animations.d.ts.map +1 -1
  2. package/dist/animations/Animations.js +34 -8
  3. package/dist/animations/Animations.js.map +1 -1
  4. package/dist/basic/Form.d.ts +29 -73
  5. package/dist/basic/Form.d.ts.map +1 -1
  6. package/dist/basic/Form.js +85 -283
  7. package/dist/basic/Form.js.map +1 -1
  8. package/dist/basic/FormField.d.ts +1 -0
  9. package/dist/basic/FormField.d.ts.map +1 -1
  10. package/dist/basic/FormField.js +3 -14
  11. package/dist/basic/FormField.js.map +1 -1
  12. package/dist/basic/InlinePopup.d.ts +1 -0
  13. package/dist/basic/InlinePopup.d.ts.map +1 -1
  14. package/dist/basic/InlinePopup.js +2 -4
  15. package/dist/basic/InlinePopup.js.map +1 -1
  16. package/dist/basic/ListRepeater.d.ts +1 -0
  17. package/dist/basic/ListRepeater.d.ts.map +1 -1
  18. package/dist/basic/ListRepeater.js +3 -8
  19. package/dist/basic/ListRepeater.js.map +1 -1
  20. package/dist/basic/MaskedInput.d.ts +1 -0
  21. package/dist/basic/MaskedInput.d.ts.map +1 -1
  22. package/dist/basic/MaskedInput.js +3 -8
  23. package/dist/basic/MaskedInput.js.map +1 -1
  24. package/dist/basic/MaskedInputDiv.d.ts +1 -0
  25. package/dist/basic/MaskedInputDiv.d.ts.map +1 -1
  26. package/dist/basic/MaskedInputDiv.js +3 -16
  27. package/dist/basic/MaskedInputDiv.js.map +1 -1
  28. package/dist/basic/OldForm.d.ts +79 -0
  29. package/dist/basic/OldForm.d.ts.map +1 -0
  30. package/dist/basic/OldForm.js +318 -0
  31. package/dist/basic/OldForm.js.map +1 -0
  32. package/dist/basic/PasswordBox.d.ts +1 -0
  33. package/dist/basic/PasswordBox.d.ts.map +1 -1
  34. package/dist/basic/PasswordBox.js +3 -8
  35. package/dist/basic/PasswordBox.js.map +1 -1
  36. package/dist/basic/PinchZoomView.d.ts +1 -0
  37. package/dist/basic/PinchZoomView.d.ts.map +1 -1
  38. package/dist/basic/PinchZoomView.js +3 -13
  39. package/dist/basic/PinchZoomView.js.map +1 -1
  40. package/dist/basic/PopupButton.d.ts +1 -0
  41. package/dist/basic/PopupButton.d.ts.map +1 -1
  42. package/dist/basic/PopupButton.js +3 -13
  43. package/dist/basic/PopupButton.js.map +1 -1
  44. package/dist/basic/RadioButtonList.d.ts +1 -0
  45. package/dist/basic/RadioButtonList.d.ts.map +1 -1
  46. package/dist/basic/RadioButtonList.js +4 -17
  47. package/dist/basic/RadioButtonList.js.map +1 -1
  48. package/dist/basic/Swipe.d.ts +1 -0
  49. package/dist/basic/Swipe.d.ts.map +1 -1
  50. package/dist/basic/Swipe.js +3 -9
  51. package/dist/basic/Swipe.js.map +1 -1
  52. package/dist/basic/Switch.d.ts +4 -0
  53. package/dist/basic/Switch.d.ts.map +1 -1
  54. package/dist/basic/Switch.js +4 -23
  55. package/dist/basic/Switch.js.map +1 -1
  56. package/dist/basic/TableRepeater.d.ts.map +1 -1
  57. package/dist/basic/TableRepeater.js +2 -7
  58. package/dist/basic/TableRepeater.js.map +1 -1
  59. package/dist/basic/TimeEditor.d.ts +1 -0
  60. package/dist/basic/TimeEditor.d.ts.map +1 -1
  61. package/dist/basic/TimeEditor.js +3 -13
  62. package/dist/basic/TimeEditor.js.map +1 -1
  63. package/dist/basic/TitleEditor.d.ts +1 -0
  64. package/dist/basic/TitleEditor.d.ts.map +1 -1
  65. package/dist/basic/TitleEditor.js +3 -8
  66. package/dist/basic/TitleEditor.js.map +1 -1
  67. package/dist/basic/ToggleButtonBar.d.ts +1 -0
  68. package/dist/basic/ToggleButtonBar.d.ts.map +1 -1
  69. package/dist/basic/ToggleButtonBar.js +3 -10
  70. package/dist/basic/ToggleButtonBar.js.map +1 -1
  71. package/dist/basic/Tooltip.d.ts +1 -0
  72. package/dist/basic/Tooltip.d.ts.map +1 -1
  73. package/dist/basic/Tooltip.js +3 -8
  74. package/dist/basic/Tooltip.js.map +1 -1
  75. package/dist/basic/styles/form-field-style.d.ts +2 -0
  76. package/dist/basic/styles/form-field-style.d.ts.map +1 -0
  77. package/dist/basic/styles/form-field-style.js +146 -0
  78. package/dist/basic/styles/form-field-style.js.map +1 -0
  79. package/dist/basic/styles/inline-popup-style.d.ts +2 -0
  80. package/dist/basic/styles/inline-popup-style.d.ts.map +1 -0
  81. package/dist/basic/styles/inline-popup-style.js +28 -0
  82. package/dist/basic/styles/inline-popup-style.js.map +1 -0
  83. package/dist/basic/styles/list-repeater-style.d.ts +2 -0
  84. package/dist/basic/styles/list-repeater-style.d.ts.map +1 -0
  85. package/dist/basic/styles/list-repeater-style.js +36 -0
  86. package/dist/basic/styles/list-repeater-style.js.map +1 -0
  87. package/dist/basic/styles/masked-input-div.d.ts +2 -0
  88. package/dist/basic/styles/masked-input-div.d.ts.map +1 -0
  89. package/dist/basic/styles/masked-input-div.js +52 -0
  90. package/dist/basic/styles/masked-input-div.js.map +1 -0
  91. package/dist/basic/styles/masked-input-style.d.ts +2 -0
  92. package/dist/basic/styles/masked-input-style.d.ts.map +1 -0
  93. package/dist/basic/styles/masked-input-style.js +19 -0
  94. package/dist/basic/styles/masked-input-style.js.map +1 -0
  95. package/dist/basic/styles/password-box-style.d.ts +2 -0
  96. package/dist/basic/styles/password-box-style.d.ts.map +1 -0
  97. package/dist/basic/styles/password-box-style.js +35 -0
  98. package/dist/basic/styles/password-box-style.js.map +1 -0
  99. package/dist/basic/styles/pinch-zoom-view-style.d.ts +2 -0
  100. package/dist/basic/styles/pinch-zoom-view-style.d.ts.map +1 -0
  101. package/dist/basic/styles/pinch-zoom-view-style.js +61 -0
  102. package/dist/basic/styles/pinch-zoom-view-style.js.map +1 -0
  103. package/dist/basic/styles/popup-button-style.d.ts +2 -0
  104. package/dist/basic/styles/popup-button-style.d.ts.map +1 -0
  105. package/dist/basic/styles/popup-button-style.js +40 -0
  106. package/dist/basic/styles/popup-button-style.js.map +1 -0
  107. package/dist/basic/styles/radio-button-list-style.d.ts +2 -0
  108. package/dist/basic/styles/radio-button-list-style.d.ts.map +1 -0
  109. package/dist/basic/styles/radio-button-list-style.js +44 -0
  110. package/dist/basic/styles/radio-button-list-style.js.map +1 -0
  111. package/dist/basic/styles/swipe-style.d.ts +2 -0
  112. package/dist/basic/styles/swipe-style.d.ts.map +1 -0
  113. package/dist/basic/styles/swipe-style.js +32 -0
  114. package/dist/basic/styles/swipe-style.js.map +1 -0
  115. package/dist/basic/styles/switch-style.d.ts +2 -0
  116. package/dist/basic/styles/switch-style.d.ts.map +1 -0
  117. package/dist/basic/styles/switch-style.js +127 -0
  118. package/dist/basic/styles/switch-style.js.map +1 -0
  119. package/dist/basic/styles/time-editor-style.d.ts +2 -0
  120. package/dist/basic/styles/time-editor-style.d.ts.map +1 -0
  121. package/dist/basic/styles/time-editor-style.js +64 -0
  122. package/dist/basic/styles/time-editor-style.js.map +1 -0
  123. package/dist/basic/styles/title-editor-style.d.ts +2 -0
  124. package/dist/basic/styles/title-editor-style.d.ts.map +1 -0
  125. package/dist/basic/styles/title-editor-style.js +45 -0
  126. package/dist/basic/styles/title-editor-style.js.map +1 -0
  127. package/dist/basic/styles/toggle-button-bar-style.d.ts +2 -0
  128. package/dist/basic/styles/toggle-button-bar-style.d.ts.map +1 -0
  129. package/dist/basic/styles/toggle-button-bar-style.js +48 -0
  130. package/dist/basic/styles/toggle-button-bar-style.js.map +1 -0
  131. package/dist/basic/styles/toggle-view-style.d.ts +2 -0
  132. package/dist/basic/styles/toggle-view-style.d.ts.map +1 -0
  133. package/dist/basic/styles/toggle-view-style.js +91 -0
  134. package/dist/basic/styles/toggle-view-style.js.map +1 -0
  135. package/dist/basic/styles/tooltip-style.d.ts +2 -0
  136. package/dist/basic/styles/tooltip-style.d.ts.map +1 -0
  137. package/dist/basic/styles/tooltip-style.js +21 -0
  138. package/dist/basic/styles/tooltip-style.js.map +1 -0
  139. package/dist/html-editor/InlineHtmlEditor.d.ts.map +1 -1
  140. package/dist/html-editor/InlineHtmlEditor.js +29 -7
  141. package/dist/html-editor/InlineHtmlEditor.js.map +1 -1
  142. package/dist/mobile-app/BottomPopup.d.ts.map +1 -1
  143. package/dist/mobile-app/BottomPopup.js +76 -14
  144. package/dist/mobile-app/BottomPopup.js.map +1 -1
  145. package/dist/mobile-app/MobileApp.d.ts.map +1 -1
  146. package/dist/mobile-app/MobileApp.js +226 -26
  147. package/dist/mobile-app/MobileApp.js.map +1 -1
  148. package/dist/player/AtomVideoPlayer.d.ts.map +1 -1
  149. package/dist/player/AtomVideoPlayer.js +160 -13
  150. package/dist/player/AtomVideoPlayer.js.map +1 -1
  151. package/dist/toggle-view/AtomToggleView.d.ts +1 -0
  152. package/dist/toggle-view/AtomToggleView.d.ts.map +1 -1
  153. package/dist/toggle-view/AtomToggleView.js +3 -16
  154. package/dist/toggle-view/AtomToggleView.js.map +1 -1
  155. package/dist/tsconfig.tsbuildinfo +1 -1
  156. package/package.json +2 -2
  157. package/src/animations/Animations.ts +32 -28
  158. package/src/basic/Form.tsx +89 -383
  159. package/src/basic/FormField.tsx +1 -117
  160. package/src/basic/InlinePopup.tsx +1 -16
  161. package/src/basic/ListRepeater.tsx +1 -26
  162. package/src/basic/MaskedInput.tsx +2 -17
  163. package/src/basic/MaskedInputDiv.tsx +2 -41
  164. package/src/basic/OldForm.tsx +424 -0
  165. package/src/basic/PasswordBox.tsx +1 -22
  166. package/src/basic/PinchZoomView.tsx +2 -41
  167. package/src/basic/PopupButton.tsx +1 -19
  168. package/src/basic/RadioButtonList.tsx +1 -17
  169. package/src/basic/Swipe.tsx +1 -21
  170. package/src/basic/Switch.tsx +2 -83
  171. package/src/basic/TableRepeater.tsx +0 -3
  172. package/src/basic/TimeEditor.tsx +2 -40
  173. package/src/basic/TitleEditor.tsx +1 -28
  174. package/src/basic/ToggleButtonBar.tsx +1 -30
  175. package/src/basic/Tooltip.tsx +2 -5
  176. package/src/basic/styles/form-field-style.ts +136 -0
  177. package/src/basic/styles/inline-popup-style.ts +19 -0
  178. package/src/basic/styles/list-repeater-style.ts +25 -0
  179. package/src/basic/styles/masked-input-div.ts +41 -0
  180. package/src/basic/styles/masked-input-style.ts +8 -0
  181. package/src/basic/styles/password-box-style.ts +24 -0
  182. package/src/basic/styles/pinch-zoom-view-style.ts +50 -0
  183. package/src/basic/styles/popup-button-style.ts +30 -0
  184. package/src/basic/styles/radio-button-list-style.ts +34 -0
  185. package/src/basic/styles/swipe-style.ts +22 -0
  186. package/src/basic/styles/switch-style.ts +116 -0
  187. package/src/basic/styles/time-editor-style.ts +53 -0
  188. package/src/basic/styles/title-editor-style.ts +34 -0
  189. package/src/basic/styles/toggle-button-bar-style.ts +37 -0
  190. package/src/basic/styles/toggle-view-style.ts +80 -0
  191. package/src/basic/styles/tooltip-style.ts +10 -0
  192. package/src/html-editor/InlineHtmlEditor.tsx +26 -16
  193. package/src/mobile-app/BottomPopup.tsx +73 -68
  194. package/src/mobile-app/MobileApp.tsx +227 -174
  195. package/src/player/AtomVideoPlayer.tsx +157 -141
  196. package/src/toggle-view/AtomToggleView.tsx +3 -53
  197. package/dist/basic/Form2.d.ts +0 -27
  198. package/dist/basic/Form2.d.ts.map +0 -1
  199. package/dist/basic/Form2.js +0 -120
  200. package/dist/basic/Form2.js.map +0 -1
  201. package/dist/basic/FormDialog.d.ts +0 -4
  202. package/dist/basic/FormDialog.d.ts.map +0 -1
  203. package/dist/basic/FormDialog.js +0 -32
  204. package/dist/basic/FormDialog.js.map +0 -1
  205. package/dist/basic/Input.d.ts +0 -5
  206. package/dist/basic/Input.d.ts.map +0 -1
  207. package/dist/basic/Input.js +0 -30
  208. package/dist/basic/Input.js.map +0 -1
  209. package/dist/basic/Mix.d.ts +0 -10
  210. package/dist/basic/Mix.d.ts.map +0 -1
  211. package/dist/basic/Mix.js +0 -31
  212. package/dist/basic/Mix.js.map +0 -1
  213. package/dist/basic/Panel.d.ts +0 -6
  214. package/dist/basic/Panel.d.ts.map +0 -1
  215. package/dist/basic/Panel.js +0 -37
  216. package/dist/basic/Panel.js.map +0 -1
  217. package/dist/basic/Row.d.ts +0 -15
  218. package/dist/basic/Row.d.ts.map +0 -1
  219. package/dist/basic/Row.js +0 -43
  220. package/dist/basic/Row.js.map +0 -1
  221. package/dist/switch/AtomSwitch.d.ts +0 -7
  222. package/dist/switch/AtomSwitch.d.ts.map +0 -1
  223. package/dist/switch/AtomSwitch.js +0 -42
  224. package/dist/switch/AtomSwitch.js.map +0 -1
  225. package/dist/switch/AtomSwitchStyle.d.ts +0 -8
  226. package/dist/switch/AtomSwitchStyle.d.ts.map +0 -1
  227. package/dist/switch/AtomSwitchStyle.js +0 -80
  228. package/dist/switch/AtomSwitchStyle.js.map +0 -1
  229. package/src/basic/Form2.tsx +0 -121
  230. package/src/basic/FormDialog.tsx +0 -28
  231. package/src/basic/Input.tsx +0 -30
  232. package/src/basic/Mix.tsx +0 -25
  233. package/src/basic/Panel.tsx +0 -43
  234. package/src/basic/Row.tsx +0 -49
  235. package/src/switch/AtomSwitch.tsx +0 -24
  236. package/src/switch/AtomSwitchStyle.ts +0 -71
@@ -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;
@@ -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")) {
@@ -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
- CSS(StyleRule()
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
- CSS(StyleRule()
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
 
@@ -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,8 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ styled.css `
4
+ position: relative;
5
+ padding-left: 2px;
6
+ padding-top: 1px;
7
+ font-family: monospace;
8
+ `.installGlobal("input[data-mask]");
@@ -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]");