@web-atoms/web-controls 2.3.136 → 2.3.138

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 (132) hide show
  1. package/dist/basic/AtomChips.d.ts.map +1 -1
  2. package/dist/basic/AtomChips.js.map +1 -1
  3. package/dist/basic/AtomRepeater.d.ts.map +1 -1
  4. package/dist/basic/AtomRepeater.js.map +1 -1
  5. package/dist/basic/AtomSuggestions.d.ts.map +1 -1
  6. package/dist/basic/AtomSuggestions.js.map +1 -1
  7. package/dist/basic/Button.d.ts.map +1 -1
  8. package/dist/basic/Button.js +41 -10
  9. package/dist/basic/Button.js.map +1 -1
  10. package/dist/basic/Calendar.d.ts.map +1 -1
  11. package/dist/basic/Calendar.js.map +1 -1
  12. package/dist/basic/CheckBoxList.d.ts.map +1 -1
  13. package/dist/basic/CheckBoxList.js.map +1 -1
  14. package/dist/basic/Checkbox.d.ts.map +1 -1
  15. package/dist/basic/Checkbox.js.map +1 -1
  16. package/dist/basic/Chip.d.ts.map +1 -1
  17. package/dist/basic/Chip.js.map +1 -1
  18. package/dist/basic/DataGrid.d.ts.map +1 -1
  19. package/dist/basic/DataGrid.js.map +1 -1
  20. package/dist/basic/DateField.d.ts.map +1 -1
  21. package/dist/basic/DateField.js.map +1 -1
  22. package/dist/basic/DropDown.d.ts.map +1 -1
  23. package/dist/basic/DropDown.js.map +1 -1
  24. package/dist/basic/Expander.d.ts.map +1 -1
  25. package/dist/basic/Expander.js.map +1 -1
  26. package/dist/basic/FormField.d.ts.map +1 -1
  27. package/dist/basic/FormField.js.map +1 -1
  28. package/dist/basic/InlinePopup.d.ts.map +1 -1
  29. package/dist/basic/InlinePopup.js.map +1 -1
  30. package/dist/basic/InlinePopupControl.d.ts.map +1 -1
  31. package/dist/basic/InlinePopupControl.js.map +1 -1
  32. package/dist/basic/MaskedInput.d.ts.map +1 -1
  33. package/dist/basic/MaskedInput.js.map +1 -1
  34. package/dist/basic/PopupButton.d.ts.map +1 -1
  35. package/dist/basic/PopupButton.js.map +1 -1
  36. package/dist/basic/RadioButtonList.d.ts.map +1 -1
  37. package/dist/basic/RadioButtonList.js.map +1 -1
  38. package/dist/basic/Swipe.d.ts.map +1 -1
  39. package/dist/basic/Swipe.js.map +1 -1
  40. package/dist/basic/Switch.d.ts.map +1 -1
  41. package/dist/basic/Switch.js.map +1 -1
  42. package/dist/basic/TableRepeater.d.ts.map +1 -1
  43. package/dist/basic/TableRepeater.js.map +1 -1
  44. package/dist/basic/TitleEditor.d.ts.map +1 -1
  45. package/dist/basic/TitleEditor.js.map +1 -1
  46. package/dist/basic/ToggleButtonBar.d.ts.map +1 -1
  47. package/dist/basic/ToggleButtonBar.js.map +1 -1
  48. package/dist/basic/Tooltip.d.ts.map +1 -1
  49. package/dist/basic/Tooltip.js.map +1 -1
  50. package/dist/button-bar/AtomButtonBar.d.ts.map +1 -1
  51. package/dist/button-bar/AtomButtonBar.js +29 -12
  52. package/dist/button-bar/AtomButtonBar.js.map +1 -1
  53. package/dist/desktop-app/DesktopApp.d.ts.map +1 -1
  54. package/dist/desktop-app/DesktopApp.js +58 -9
  55. package/dist/desktop-app/DesktopApp.js.map +1 -1
  56. package/dist/html-editor/AtomHtmlEditor.d.ts +1 -2
  57. package/dist/html-editor/AtomHtmlEditor.d.ts.map +1 -1
  58. package/dist/html-editor/AtomHtmlEditor.js +69 -11
  59. package/dist/html-editor/AtomHtmlEditor.js.map +1 -1
  60. package/dist/html-editor/commands/AddLink.d.ts.map +1 -1
  61. package/dist/html-editor/commands/AddLink.js +9 -7
  62. package/dist/html-editor/commands/AddLink.js.map +1 -1
  63. package/dist/html-editor/commands/ChangeColor.d.ts.map +1 -1
  64. package/dist/html-editor/commands/ChangeColor.js +28 -7
  65. package/dist/html-editor/commands/ChangeColor.js.map +1 -1
  66. package/dist/html-editor/commands/ChangeFont.d.ts.map +1 -1
  67. package/dist/html-editor/commands/ChangeFont.js +8 -7
  68. package/dist/html-editor/commands/ChangeFont.js.map +1 -1
  69. package/dist/html-editor/commands/Separator.d.ts.map +1 -1
  70. package/dist/html-editor/commands/Separator.js +14 -10
  71. package/dist/html-editor/commands/Separator.js.map +1 -1
  72. package/dist/html-editor/commands/Source.d.ts.map +1 -1
  73. package/dist/html-editor/commands/Source.js +10 -7
  74. package/dist/html-editor/commands/Source.js.map +1 -1
  75. package/dist/mobile-app/MobileApp.d.ts.map +1 -1
  76. package/dist/mobile-app/MobileApp.js.map +1 -1
  77. package/dist/player/AtomVideoPlayer.d.ts.map +1 -1
  78. package/dist/player/AtomVideoPlayer.js +1 -0
  79. package/dist/player/AtomVideoPlayer.js.map +1 -1
  80. package/dist/player/TrackProgress.d.ts.map +1 -1
  81. package/dist/player/TrackProgress.js +12 -7
  82. package/dist/player/TrackProgress.js.map +1 -1
  83. package/dist/toggle-view/AtomToggleView.d.ts.map +1 -1
  84. package/dist/toggle-view/AtomToggleView.js.map +1 -1
  85. package/dist/tsconfig.tsbuildinfo +1 -1
  86. package/package.json +1 -1
  87. package/src/basic/AtomChips.tsx +0 -7
  88. package/src/basic/AtomRepeater.tsx +0 -4
  89. package/src/basic/AtomSuggestions.tsx +0 -2
  90. package/src/basic/Button.tsx +37 -38
  91. package/src/basic/Calendar.tsx +0 -4
  92. package/src/basic/CheckBoxList.tsx +0 -25
  93. package/src/basic/Checkbox.tsx +0 -3
  94. package/src/basic/Chip.tsx +0 -3
  95. package/src/basic/DataGrid.tsx +0 -35
  96. package/src/basic/DateField.tsx +0 -7
  97. package/src/basic/DropDown.tsx +0 -6
  98. package/src/basic/Expander.tsx +0 -5
  99. package/src/basic/FormField.tsx +1 -6
  100. package/src/basic/InlinePopup.tsx +0 -16
  101. package/src/basic/InlinePopupControl.tsx +1 -4
  102. package/src/basic/MaskedInput.tsx +0 -2
  103. package/src/basic/PopupButton.tsx +1 -3
  104. package/src/basic/RadioButtonList.tsx +0 -6
  105. package/src/basic/Swipe.tsx +0 -2
  106. package/src/basic/Switch.tsx +0 -2
  107. package/src/basic/TableRepeater.tsx +1 -4
  108. package/src/basic/TitleEditor.tsx +0 -3
  109. package/src/basic/ToggleButtonBar.tsx +0 -3
  110. package/src/basic/Tooltip.tsx +2 -6
  111. package/src/button-bar/AtomButtonBar.tsx +26 -24
  112. package/src/desktop-app/DesktopApp.tsx +55 -49
  113. package/src/html-editor/AtomHtmlEditor.tsx +67 -50
  114. package/src/html-editor/commands/AddLink.tsx +6 -8
  115. package/src/html-editor/commands/ChangeColor.tsx +25 -23
  116. package/src/html-editor/commands/ChangeFont.tsx +5 -17
  117. package/src/html-editor/commands/Separator.tsx +10 -12
  118. package/src/html-editor/commands/Source.tsx +7 -8
  119. package/src/mobile-app/MobileApp.tsx +4 -27
  120. package/src/player/AtomVideoPlayer.tsx +1 -3
  121. package/src/player/TrackProgress.tsx +9 -10
  122. package/src/toggle-view/AtomToggleView.tsx +0 -4
  123. package/dist/basic/OldForm.d.ts +0 -79
  124. package/dist/basic/OldForm.d.ts.map +0 -1
  125. package/dist/basic/OldForm.js +0 -318
  126. package/dist/basic/OldForm.js.map +0 -1
  127. package/dist/basic/in-built/InBuiltStyles.d.ts +0 -34
  128. package/dist/basic/in-built/InBuiltStyles.d.ts.map +0 -1
  129. package/dist/basic/in-built/InBuiltStyles.js +0 -49
  130. package/dist/basic/in-built/InBuiltStyles.js.map +0 -1
  131. package/src/basic/OldForm.tsx +0 -424
  132. package/src/basic/in-built/InBuiltStyles.ts +0 -41
@@ -1,12 +1,7 @@
1
1
  import Bind from "@web-atoms/core/dist/core/Bind";
2
2
  import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
3
- import Colors from "@web-atoms/core/dist/core/Colors";
4
- import { StringHelper } from "@web-atoms/core/dist/core/StringHelper";
5
3
  import { CancelToken } from "@web-atoms/core/dist/core/types";
6
- import WatchProperty from "@web-atoms/core/dist/core/WatchProperty";
7
4
  import XNode from "@web-atoms/core/dist/core/XNode";
8
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
9
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
10
5
  import AtomRepeater, { getParentRepeaterItem, SelectorCheckBox } from "./AtomRepeater";
11
6
  import { EditableInput, getPropertyInfo, IPropertyInfo } from "./Editable";
12
7
  import TableRepeater from "./TableRepeater";
@@ -125,36 +120,6 @@ export type IDataGridColumn = IDataGridColumnWithLabel | IDataGridColumnWithLabe
125
120
 
126
121
  // }
127
122
 
128
- // CSS(StyleRule()
129
- // .child(StyleRule("thead")
130
- // .child(StyleRule("tr[data-header=header]")
131
- // .child(StyleRule("th")
132
- // .child(StyleRule("i[data-sort]")
133
- // .marginRight(5)
134
- // .marginLeft(3)
135
- // .opacity("0.5")
136
- // )
137
- // .child(StyleRule("input[type=checkbox]")
138
- // .margin(5)
139
- // )
140
- // )
141
- // )
142
- // )
143
- // .child(StyleRule("tbody")
144
- // .child(StyleRule("tr[data-item-index]")
145
- // .hoverBackgroundColor(Colors.lightSkyBlue.withAlphaPercent(0.3))
146
- // .and(StyleRule("[data-selected-item=true]")
147
- // .backgroundColor(Colors.lightGray.withAlphaPercent(0.4))
148
- // )
149
- // .child(StyleRule("td[data-ellipsis]")
150
- // .maxWidth("200px")
151
- // .overflow("hidden")
152
- // .textOverflow("ellipsis")
153
- // .whiteSpace("nowrap")
154
- // )
155
- // )
156
- // )
157
- // , "table[data-data-grid=data-grid]");
158
123
 
159
124
  export const SelectAllColumn: IDataGridColumn = {
160
125
  header: "Select All",
@@ -1,17 +1,10 @@
1
1
  import Bind from "@web-atoms/core/dist/core/Bind";
2
2
  import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
3
- import Colors from "@web-atoms/core/dist/core/Colors";
4
3
  import XNode from "@web-atoms/core/dist/core/XNode";
5
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
6
4
  import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
7
- import { PopupWindow } from "@web-atoms/core/dist/web/services/PopupService";
8
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
9
5
  import DateTime from "@web-atoms/date-time/dist/DateTime";
10
6
  import Calendar, { ICalendarDate } from "./Calendar";
11
- import ComboBox from "./ComboBox";
12
7
  import InlinePopup, { InlinePopupButton } from "./InlinePopup";
13
- import PopupButton from "./PopupButton";
14
- import ToggleButtonBar from "./ToggleButtonBar";
15
8
  import TimeEditor from "./TimeEditor";
16
9
  import TimeSpan from "@web-atoms/date-time/dist/TimeSpan";
17
10
 
@@ -1,11 +1,5 @@
1
- import Bind from "@web-atoms/core/dist/core/Bind";
2
1
  import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
3
- import { CancelToken, IDisposable } from "@web-atoms/core/dist/core/types";
4
2
  import XNode from "@web-atoms/core/dist/core/XNode";
5
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
6
- import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
7
- import { PopupWindow } from "@web-atoms/core/dist/web/services/PopupService";
8
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
9
3
  import AtomRepeater, { askSuggestion, askSuggestionPopup,
10
4
  disposeChildren, Match, MatchAnyCaseInsensitive } from "./AtomRepeater";
11
5
 
@@ -1,9 +1,4 @@
1
- import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
2
- import Colors from "@web-atoms/core/dist/core/Colors";
3
1
  import XNode from "@web-atoms/core/dist/core/XNode";
4
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
5
- import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
6
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
7
2
 
8
3
  import "./styles/expander-style";
9
4
 
@@ -1,14 +1,9 @@
1
1
  import type { App } from "@web-atoms/core/dist/App";
2
2
  import Bind from "@web-atoms/core/dist/core/Bind";
3
- import Colors from "@web-atoms/core/dist/core/Colors";
4
3
  import FormattedString from "@web-atoms/core/dist/core/FormattedString";
5
- import { CancelToken } from "@web-atoms/core/dist/core/types";
6
4
  import XNode from "@web-atoms/core/dist/core/XNode";
7
5
  import { NavigationService } from "@web-atoms/core/dist/services/NavigationService";
8
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
9
- import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
10
- import PopupService, { PopupWindow } from "@web-atoms/core/dist/web/services/PopupService";
11
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
6
+ import { PopupWindow } from "@web-atoms/core/dist/web/services/PopupService";
12
7
  import "./styles/form-field-style";
13
8
 
14
9
  export interface IFormField {
@@ -1,13 +1,9 @@
1
1
  import { App } from "@web-atoms/core/dist/App";
2
2
  import { AtomDisposableList } from "@web-atoms/core/dist/core/AtomDisposableList";
3
- import Colors from "@web-atoms/core/dist/core/Colors";
4
3
  import sleep from "@web-atoms/core/dist/core/sleep";
5
- import { CancelToken } from "@web-atoms/core/dist/core/types";
6
4
  import XNode from "@web-atoms/core/dist/core/XNode";
7
- import StyleRule, { ContentAlignType } from "@web-atoms/core/dist/style/StyleRule";
8
5
  import { AtomControl, ElementValueSetters } from "@web-atoms/core/dist/web/controls/AtomControl";
9
6
  import { IPopupOptions } from "@web-atoms/core/dist/web/services/PopupService";
10
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
11
7
  import IElement from "./IElement";
12
8
 
13
9
  import "./styles/inline-popup-style";
@@ -205,18 +201,6 @@ export interface IInlinePopupButtonOptions extends IElement {
205
201
  popup?: PopupFactory;
206
202
  }
207
203
 
208
- // CSS(StyleRule()
209
- // .flexLayout({ alignItems: "center", inline: true, justifyContent: "center"})
210
- // .flexWrap("wrap")
211
- // .padding(3)
212
- // .paddingLeft(5)
213
- // .paddingRight(5)
214
- // .and(StyleRule("[data-has-border=false]")
215
- // .border("none")
216
- // .backgroundColor(Colors.transparent)
217
- // )
218
- // , "*[data-inline-popup-button=inline-popup-button]");
219
-
220
204
  export type PopupFactory = (data) => XNode;
221
205
 
222
206
  document.body.addEventListener("click", (e) => {
@@ -1,8 +1,5 @@
1
- import { App } from "@web-atoms/core/dist/App";
2
- import Colors from "@web-atoms/core/dist/core/Colors";
3
1
  import XNode from "@web-atoms/core/dist/core/XNode";
4
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
5
- import { AtomControl, ElementValueSetters } from "@web-atoms/core/dist/web/controls/AtomControl";
2
+ import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
6
3
  import { IPopupOptions, PopupControl } from "@web-atoms/core/dist/web/services/PopupService";
7
4
 
8
5
  export default class InlinePopupControl extends PopupControl {
@@ -1,6 +1,4 @@
1
1
  import XNode from "@web-atoms/core/dist/core/XNode";
2
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
3
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
4
2
  import IElement from "./IElement";
5
3
 
6
4
  import "./styles/masked-input-style";
@@ -1,7 +1,5 @@
1
1
  import XNode from "@web-atoms/core/dist/core/XNode";
2
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
3
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
4
- import InlinePopup, { IInlinePopupButtonOptions, InlinePopupButton } from "./InlinePopup";
2
+ import { IInlinePopupButtonOptions, InlinePopupButton } from "./InlinePopup";
5
3
 
6
4
  import "./styles/popup-button-style";
7
5
 
@@ -1,10 +1,4 @@
1
- import Bind from "@web-atoms/core/dist/core/Bind";
2
- import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
3
- import Colors from "@web-atoms/core/dist/core/Colors";
4
1
  import XNode from "@web-atoms/core/dist/core/XNode";
5
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
6
- import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
7
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
8
2
  import AtomRepeater from "./AtomRepeater";
9
3
 
10
4
  import "./styles/radio-button-list-style";
@@ -1,6 +1,4 @@
1
1
  import XNode from "@web-atoms/core/dist/core/XNode";
2
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
3
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
4
2
  import "./styles/swipe-style";
5
3
 
6
4
  interface ISwipeStart {
@@ -1,6 +1,4 @@
1
1
  import XNode from "@web-atoms/core/dist/core/XNode";
2
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
3
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
4
2
  import IElement from "./IElement";
5
3
 
6
4
  import "./styles/switch-style";
@@ -1,8 +1,5 @@
1
- import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
2
1
  import XNode from "@web-atoms/core/dist/core/XNode";
3
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
4
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
5
- import AtomRepeater, { disposeChildren } from "./AtomRepeater";
2
+ import AtomRepeater from "./AtomRepeater";
6
3
 
7
4
  export default class TableRepeater extends AtomRepeater {
8
5
 
@@ -1,8 +1,5 @@
1
1
  import XNode from "@web-atoms/core/dist/core/XNode";
2
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
3
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
4
2
  import IElement from "./IElement";
5
- import { InlinePopupButton } from "./InlinePopup";
6
3
 
7
4
  import "./styles/title-editor-style";
8
5
 
@@ -1,8 +1,5 @@
1
1
  import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
2
- import Colors from "@web-atoms/core/dist/core/Colors";
3
2
  import XNode from "@web-atoms/core/dist/core/XNode";
4
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
5
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
6
3
  import AtomRepeater from "./AtomRepeater";
7
4
 
8
5
  import "./styles/toggle-button-bar-style";
@@ -1,11 +1,7 @@
1
- import Colors from "@web-atoms/core/dist/core/Colors";
2
1
  import { CancelToken } from "@web-atoms/core/dist/core/types";
3
- import XNode, { xnodeSymbol } from "@web-atoms/core/dist/core/XNode";
4
- import StyleRule, { AnimationType } from "@web-atoms/core/dist/style/StyleRule";
2
+ import XNode from "@web-atoms/core/dist/core/XNode";
5
3
  import { AtomControl, ElementValueSetters } from "@web-atoms/core/dist/web/controls/AtomControl";
6
- import PopupService, { IPopup, PopupControl } from "@web-atoms/core/dist/web/services/PopupService";
7
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
8
- import AtomRepeater, { getParentRepeaterItem } from "./AtomRepeater";
4
+ import { getParentRepeaterItem } from "./AtomRepeater";
9
5
  import InlinePopup from "./InlinePopup";
10
6
 
11
7
  import "./styles/tooltip-style";
@@ -1,30 +1,32 @@
1
- import Colors from "@web-atoms/core/dist/core/Colors";
2
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
1
+ import styled from "@web-atoms/core/dist/style/styled";
3
2
  import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
4
3
  import { AtomItemsControl } from "@web-atoms/core/dist/web/controls/AtomItemsControl";
5
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
6
4
 
7
- CSS(StyleRule()
8
- .flexLayout({ inline: true, gap: 0 })
9
- .border("solid 1px lightblue")
10
- .borderRadius(10)
11
- .child(StyleRule("*")
12
- .borderRadius(10)
13
- .padding(5)
14
- .cursor("pointer")
15
- .and(StyleRule(":first-child")
16
- .borderTopRightRadius(0)
17
- .borderBottomRightRadius(0)
18
- )
19
- .and(StyleRule(":last-child")
20
- .borderTopLeftRadius(0)
21
- .borderBottomLeftRadius(0)
22
- )
23
- )
24
- .child(StyleRule("*[data-item=selected-item]")
25
- .backgroundColor(Colors.lightBlue)
26
- )
27
- , "*[data-button-bar=button-bar]");
5
+ styled.css `
6
+ display: inline-flex;
7
+ gap: 0;
8
+ align-items: center;
9
+ border: solid 1px lightblue;
10
+ border-radius: 10px;
11
+ padding-left: 10px;
12
+ padding-right: 10px;
13
+ & > * {
14
+ border-radius: 10px;
15
+ padding: 5px;
16
+ cursor: pointer;
17
+ &:first-child {
18
+ border-top-right-radius: 0;
19
+ border-bottom-right-radius:0;
20
+ }
21
+ &:last-child {
22
+ border-top-left-radius: 0;
23
+ border-bottom-left-radius: 0;
24
+ }
25
+ &[data-item=selected-item] {
26
+ background-color: lightblue;
27
+ }
28
+ }
29
+ `.installGlobal("*[data-button-bar=button-bar]");
28
30
 
29
31
  export default class AtomButtonBar extends AtomItemsControl {
30
32
 
@@ -1,58 +1,64 @@
1
1
  import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
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
4
  import { ChildEnumerator } from "@web-atoms/core/dist/web/core/AtomUI";
6
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
7
5
  import MobileApp, { Drawer } from "../mobile-app/MobileApp";
6
+ import styled from "@web-atoms/core/dist/style/styled";
8
7
 
9
- CSS(StyleRule()
10
- .position("relative")
11
- .overflow("hidden")
12
- .display("grid")
13
- .minWidth(900)
14
- .gridTemplateRows("1fr auto")
15
- .gridTemplateColumns("auto 1fr auto")
16
- .child(StyleRule("[data-page-element=app]")
17
- .gridRow("1")
18
- .gridColumn("2")
19
- .position("inherit")
20
- )
21
- .child(StyleRule("[data-page-element=menu-renderer]")
22
- .gridRow("1")
23
- .gridColumn("1")
24
- .overflowX("hidden")
25
- .overflowY("auto")
26
- )
27
- .child(StyleRule("[data-page-element=side-bar]")
28
- .gridRow("1")
29
- .gridColumn("3")
30
- .overflowX("hidden")
31
- .overflowY("auto")
32
- )
33
- .child(StyleRule("[data-page-element=status-bar]")
34
- .gridRow("2")
35
- .gridColumn("1 / span 3")
36
- .padding(5)
37
- .marginTop(2)
38
- .borderTop("solid 1px lightgray")
39
- .overflow("hidden")
40
- )
41
- , "*[data-desktop-app=desktop-app]");
42
-
43
- CSS(StyleRule()
44
- .width("100%")
45
- .height("100%")
46
- , "html,body");
47
-
48
- CSS(StyleRule()
49
- .overflow("hidden")
50
- .display("flex")
51
- .justifyContent("space-around")
52
- .alignItems("stretch")
53
- .alignContent("stretch")
54
- .flexDirection("row")
55
- , "body");
8
+ styled.css `
9
+
10
+ html, body {
11
+ width: 100%;
12
+ height: 100%;
13
+ }
14
+
15
+ body {
16
+ overflow: hidden;
17
+ display: flex;
18
+ justify-content: space-around;
19
+ align-items: stretch;
20
+ align-content: stretch;
21
+ flex-direction: row;
22
+ }
23
+
24
+ *[data-desktop-app=desktop-app] {
25
+ position: relative;
26
+ overflow: hidden;
27
+ display: grid;
28
+ min-width: 900px;
29
+ grid-template-rows: 1fr auto;
30
+ grid-template-columns: auto 1fr auto;
31
+
32
+ & > [data-page-element=app] {
33
+ grid-row: 1;
34
+ grid-column: 2;
35
+ position: inherit;
36
+ }
37
+
38
+ & > [data-page-element=menu-renderer] {
39
+ grid-row: 1;
40
+ grid-column: 1;
41
+ overflow-x: hidden;
42
+ overflow-y: auto;
43
+ }
44
+
45
+ & > [data-page-element=side-bar] {
46
+ grid-row: 1;
47
+ grid-column: 3;
48
+ overflow-x: hidden;
49
+ overflow-y: auto;
50
+ }
51
+
52
+ & > [data-page-element=status-bar] {
53
+ grid-row: 2;
54
+ grid-column: 1 / span 3;
55
+ padding: 5px;
56
+ margin-top: 2px;
57
+ border-top: solid 1px lightgray;
58
+ overflow: hidden;
59
+ }
60
+ }
61
+ `.withId("*[data-desktop-app=desktop-app]").installGlobal();
56
62
 
57
63
  export default class DesktopApp extends AtomControl {
58
64
 
@@ -1,11 +1,8 @@
1
1
  import { AtomBinder } from "@web-atoms/core/dist/core/AtomBinder";
2
2
  import Bind from "@web-atoms/core/dist/core/Bind";
3
3
  import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
4
- import Colors from "@web-atoms/core/dist/core/Colors";
5
4
  import XNode from "@web-atoms/core/dist/core/XNode";
6
- import StyleRule, { AtomStyleRules } from "@web-atoms/core/dist/style/StyleRule";
7
5
  import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
8
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
9
6
  import AtomRepeater from "../basic/AtomRepeater";
10
7
  import AddImage, { showImageDialog } from "./commands/AddImage";
11
8
  import AddLink from "./commands/AddLink";
@@ -29,6 +26,7 @@ import Underline from "./commands/Underline";
29
26
  import Unlink from "./commands/Unlink";
30
27
  import UnorderedList from "./commands/UnorderedList";
31
28
  import Toolbar from "./commands/Toolbar";
29
+ import styled from "@web-atoms/core/dist/style/styled";
32
30
  export { default as Toolbar} from "./commands/Toolbar";
33
31
 
34
32
  const link = document.createElement("link");
@@ -41,52 +39,71 @@ link.onload = () => {
41
39
  };
42
40
  document.head.appendChild(link);
43
41
 
44
- const css = CSS(StyleRule()
45
- .display("flex")
46
- .flexDirection("column")
47
- .minHeight(500)
48
- .child(StyleRule("iframe")
49
- .flexStretch()
50
- )
51
- .child(StyleRule(".files")
52
- .child(StyleRule(".file")
53
- .flexLayout({ inline: true })
54
- .borderColor(Colors.lightGray.withAlphaPercent(0.5))
55
- .borderWidth(1)
56
- .borderStyle("solid")
57
- .borderRadius(15)
58
- .paddingLeft(10)
59
- .paddingRight(10)
60
- .child(StyleRule("label")
61
- .maxWidth(100)
62
- .textEllipsis()
63
- )
64
- )
65
- )
66
- .nested(StyleRule(".toolbar")
67
- .display("flex")
68
- .flexWrap("wrap")
69
- .alignItems("center")
70
- .child(StyleRule(".command")
71
- .display("inline-flex")
72
- .alignItems("center")
73
- .justifyContent("space-evenly" as any)
74
- .border("none")
75
- .cursor("pointer")
76
- .backgroundColor(Colors.transparent)
77
- .hoverBackgroundColor(Colors.lightGreen)
78
- .minWidth(28)
79
- .height(28)
80
- .and(StyleRule(".pressed")
81
- .backgroundColor(Colors.lightGray)
82
- .hoverBackgroundColor(Colors.lightGreen)
83
- )
84
- .nested(StyleRule(".ri-bold")
85
- .fontWeight("bold")
86
- )
87
- )
88
- )
89
- );
42
+ const css = styled.css `
43
+
44
+ display: flex;
45
+ flex-direction: column;
46
+ min-height: 500px;
47
+
48
+ & > iframe {
49
+ flex: 1 1 100%;
50
+ }
51
+
52
+ & > .files > .file {
53
+ flex-direction: row;
54
+ align-items: center;
55
+ justify-content: space-around;
56
+ gap: 4px;
57
+ display: inline-flex;
58
+ border-color: rgba(211,211,211,0.5);
59
+ border-width: 1px;
60
+ border-style: solid;
61
+ border-radius: 15px;
62
+ padding-left: 10px;
63
+ padding-right: 10px;
64
+
65
+ & > label {
66
+ max-width: 100px;
67
+ overflow: hidden;
68
+ white-space: nowrap;
69
+ text-overflow: ellipsis;
70
+ }
71
+ }
72
+
73
+
74
+ & .toolbar {
75
+ display: flex;
76
+ flex-wrap: wrap;
77
+ align-items: center;
78
+
79
+ & > .command {
80
+ display: inline-flex;
81
+ align-items: center;
82
+ justify-content: space-evenly;
83
+ border: none;
84
+ cursor: pointer;
85
+ background-color: #00000000;
86
+ min-width: 28px;
87
+ height: 28px;
88
+
89
+ &:hover {
90
+ background-color: #90ee90;
91
+ }
92
+
93
+ &.pressed {
94
+ background-color: #d3d3d3;
95
+
96
+ &:hover {
97
+ background-color: #90ee90;
98
+ }
99
+ }
100
+
101
+ & .ri-bold {
102
+ font-weight: bold;
103
+ }
104
+ }
105
+ }
106
+ `.installLocal();
90
107
 
91
108
  function preventLinkClick(e: Event, editor: HTMLElement, doc: Document) {
92
109
  let target = e.target as HTMLElement;
@@ -212,7 +229,7 @@ export interface IEditorCommand {
212
229
 
213
230
  export interface ITagCommand<T = any> {
214
231
  name: string;
215
- style: AtomStyleRules;
232
+ style: any;
216
233
  handler: (ce: CustomEvent<{ target: HTMLElement, data: T}>) => any
217
234
  }
218
235
 
@@ -1,15 +1,13 @@
1
1
  import Bind from "@web-atoms/core/dist/core/Bind";
2
2
  import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
3
- import { CancelToken } from "@web-atoms/core/dist/core/types";
4
3
  import XNode from "@web-atoms/core/dist/core/XNode";
5
- import StyleRule from "@web-atoms/core/dist/style/StyleRule";
6
4
  import { AtomToggleButtonBar } from "@web-atoms/core/dist/web/controls/AtomToggleButtonBar";
7
5
  import PopupService, { PopupWindow } from "@web-atoms/core/dist/web/services/PopupService";
8
- import CSS from "@web-atoms/core/dist/web/styles/CSS";
9
6
  import FormField from "../../basic/FormField";
10
7
  import type AtomHtmlEditor from "../AtomHtmlEditor";
11
8
  import CommandButton, { notSet } from "./CommandButton";
12
9
  import HtmlCommands from "./HtmlCommands";
10
+ import styled from "@web-atoms/core/dist/style/styled";
13
11
 
14
12
  const linkTypes = [
15
13
  {
@@ -30,11 +28,11 @@ const linkTypes = [
30
28
  }
31
29
  ];
32
30
 
33
- const linkDialogCss = CSS(StyleRule()
34
- .display("flex")
35
- .flexDirection("column")
36
- .gap(5)
37
- );
31
+ const linkDialogCss = styled.css `
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 5px;
35
+ `.installLocal();
38
36
 
39
37
  class LinkDialog extends PopupWindow {
40
38