@web-atoms/web-controls 2.3.107 → 2.3.109

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 (136) hide show
  1. package/dist/basic/AtomChips.d.ts +2 -0
  2. package/dist/basic/AtomChips.d.ts.map +1 -1
  3. package/dist/basic/AtomChips.js +3 -16
  4. package/dist/basic/AtomChips.js.map +1 -1
  5. package/dist/basic/AtomRepeater.d.ts +3 -0
  6. package/dist/basic/AtomRepeater.d.ts.map +1 -1
  7. package/dist/basic/AtomRepeater.js +6 -22
  8. package/dist/basic/AtomRepeater.js.map +1 -1
  9. package/dist/basic/AtomSuggestions.d.ts +1 -0
  10. package/dist/basic/AtomSuggestions.d.ts.map +1 -1
  11. package/dist/basic/AtomSuggestions.js +3 -13
  12. package/dist/basic/AtomSuggestions.js.map +1 -1
  13. package/dist/basic/Button.d.ts.map +1 -1
  14. package/dist/basic/Button.js +1 -0
  15. package/dist/basic/Button.js.map +1 -1
  16. package/dist/basic/Calendar.d.ts +1 -0
  17. package/dist/basic/Calendar.d.ts.map +1 -1
  18. package/dist/basic/Calendar.js +3 -10
  19. package/dist/basic/Calendar.js.map +1 -1
  20. package/dist/basic/CheckBoxList.d.ts +1 -0
  21. package/dist/basic/CheckBoxList.d.ts.map +1 -1
  22. package/dist/basic/CheckBoxList.js +3 -16
  23. package/dist/basic/CheckBoxList.js.map +1 -1
  24. package/dist/basic/Checkbox.d.ts +1 -0
  25. package/dist/basic/Checkbox.d.ts.map +1 -1
  26. package/dist/basic/Checkbox.js +5 -11
  27. package/dist/basic/Checkbox.js.map +1 -1
  28. package/dist/basic/Chip.d.ts +1 -0
  29. package/dist/basic/Chip.d.ts.map +1 -1
  30. package/dist/basic/Chip.js +4 -12
  31. package/dist/basic/Chip.js.map +1 -1
  32. package/dist/basic/DataGrid.d.ts +1 -0
  33. package/dist/basic/DataGrid.d.ts.map +1 -1
  34. package/dist/basic/DataGrid.js +3 -10
  35. package/dist/basic/DataGrid.js.map +1 -1
  36. package/dist/basic/DateField.d.ts +1 -0
  37. package/dist/basic/DateField.d.ts.map +1 -1
  38. package/dist/basic/DateField.js +3 -14
  39. package/dist/basic/DateField.js.map +1 -1
  40. package/dist/basic/DropDown.d.ts +1 -0
  41. package/dist/basic/DropDown.d.ts.map +1 -1
  42. package/dist/basic/DropDown.js +3 -11
  43. package/dist/basic/DropDown.js.map +1 -1
  44. package/dist/basic/Expander.d.ts +1 -0
  45. package/dist/basic/Expander.d.ts.map +1 -1
  46. package/dist/basic/Expander.js +3 -9
  47. package/dist/basic/Expander.js.map +1 -1
  48. package/dist/basic/styles/calendar-style.d.ts +2 -0
  49. package/dist/basic/styles/calendar-style.d.ts.map +1 -0
  50. package/dist/basic/styles/calendar-style.js +93 -0
  51. package/dist/basic/styles/calendar-style.js.map +1 -0
  52. package/dist/basic/styles/check-box-list-style.d.ts +2 -0
  53. package/dist/basic/styles/check-box-list-style.d.ts.map +1 -0
  54. package/dist/basic/styles/check-box-list-style.js +66 -0
  55. package/dist/basic/styles/check-box-list-style.js.map +1 -0
  56. package/dist/basic/styles/checkbox-style.d.ts +2 -0
  57. package/dist/basic/styles/checkbox-style.d.ts.map +1 -0
  58. package/dist/basic/styles/checkbox-style.js +33 -0
  59. package/dist/basic/styles/checkbox-style.js.map +1 -0
  60. package/dist/basic/styles/chip-style.d.ts +2 -0
  61. package/dist/basic/styles/chip-style.d.ts.map +1 -0
  62. package/dist/basic/styles/chip-style.js +84 -0
  63. package/dist/basic/styles/chip-style.js.map +1 -0
  64. package/dist/basic/styles/chips-style.d.ts +2 -0
  65. package/dist/basic/styles/chips-style.d.ts.map +1 -0
  66. package/dist/basic/styles/chips-style.js +50 -0
  67. package/dist/basic/styles/chips-style.js.map +1 -0
  68. package/dist/basic/styles/data-grid-style.d.ts +2 -0
  69. package/dist/basic/styles/data-grid-style.d.ts.map +1 -0
  70. package/dist/basic/styles/data-grid-style.js +46 -0
  71. package/dist/basic/styles/data-grid-style.js.map +1 -0
  72. package/dist/basic/styles/date-field-style.d.ts +2 -0
  73. package/dist/basic/styles/date-field-style.d.ts.map +1 -0
  74. package/dist/basic/styles/date-field-style.js +80 -0
  75. package/dist/basic/styles/date-field-style.js.map +1 -0
  76. package/dist/basic/styles/drop-down-style.d.ts +2 -0
  77. package/dist/basic/styles/drop-down-style.d.ts.map +1 -0
  78. package/dist/basic/styles/drop-down-style.js +24 -0
  79. package/dist/basic/styles/drop-down-style.js.map +1 -0
  80. package/dist/basic/styles/expander-style.d.ts +2 -0
  81. package/dist/basic/styles/expander-style.d.ts.map +1 -0
  82. package/dist/basic/styles/expander-style.js +138 -0
  83. package/dist/basic/styles/expander-style.js.map +1 -0
  84. package/dist/basic/styles/item-suggestion-style.d.ts +2 -0
  85. package/dist/basic/styles/item-suggestion-style.d.ts.map +1 -0
  86. package/dist/basic/styles/item-suggestion-style.js +51 -0
  87. package/dist/basic/styles/item-suggestion-style.js.map +1 -0
  88. package/dist/basic/styles/popup-style.d.ts +2 -0
  89. package/dist/basic/styles/popup-style.d.ts.map +1 -0
  90. package/dist/basic/styles/popup-style.js +34 -0
  91. package/dist/basic/styles/popup-style.js.map +1 -0
  92. package/dist/basic/styles/repeater-style.d.ts +2 -0
  93. package/dist/basic/styles/repeater-style.d.ts.map +1 -0
  94. package/dist/basic/styles/repeater-style.js +62 -0
  95. package/dist/basic/styles/repeater-style.js.map +1 -0
  96. package/dist/basic/styles/suggestion-popup.d.ts +2 -0
  97. package/dist/basic/styles/suggestion-popup.d.ts.map +1 -0
  98. package/dist/basic/styles/suggestion-popup.js +36 -0
  99. package/dist/basic/styles/suggestion-popup.js.map +1 -0
  100. package/dist/basic/styles/suggestion-style.d.ts +2 -0
  101. package/dist/basic/styles/suggestion-style.d.ts.map +1 -0
  102. package/dist/basic/styles/suggestion-style.js +50 -0
  103. package/dist/basic/styles/suggestion-style.js.map +1 -0
  104. package/dist/basic/styles/ui-display-none-style.d.ts +2 -0
  105. package/dist/basic/styles/ui-display-none-style.d.ts.map +1 -0
  106. package/dist/basic/styles/ui-display-none-style.js +16 -0
  107. package/dist/basic/styles/ui-display-none-style.js.map +1 -0
  108. package/dist/tsconfig.tsbuildinfo +1 -1
  109. package/package.json +2 -2
  110. package/src/basic/AtomChips.tsx +2 -64
  111. package/src/basic/AtomRepeater.tsx +5 -75
  112. package/src/basic/AtomSuggestions.tsx +1 -30
  113. package/src/basic/Button.tsx +2 -0
  114. package/src/basic/Calendar.tsx +2 -64
  115. package/src/basic/CheckBoxList.tsx +22 -20
  116. package/src/basic/Checkbox.tsx +2 -26
  117. package/src/basic/Chip.tsx +2 -61
  118. package/src/basic/DataGrid.tsx +32 -30
  119. package/src/basic/DateField.tsx +1 -54
  120. package/src/basic/DropDown.tsx +1 -6
  121. package/src/basic/Expander.tsx +2 -115
  122. package/src/basic/styles/calendar-style.ts +82 -0
  123. package/src/basic/styles/check-box-list-style.ts +58 -0
  124. package/src/basic/styles/checkbox-style.ts +22 -0
  125. package/src/basic/styles/chip-style.ts +73 -0
  126. package/src/basic/styles/chips-style.ts +39 -0
  127. package/src/basic/styles/data-grid-style.ts +35 -0
  128. package/src/basic/styles/date-field-style.ts +69 -0
  129. package/src/basic/styles/drop-down-style.ts +13 -0
  130. package/src/basic/styles/expander-style.ts +128 -0
  131. package/src/basic/styles/item-suggestion-style.ts +40 -0
  132. package/src/basic/styles/popup-style.ts +23 -0
  133. package/src/basic/styles/repeater-style.ts +51 -0
  134. package/src/basic/styles/suggestion-popup.ts +28 -0
  135. package/src/basic/styles/suggestion-style.ts +39 -0
  136. package/src/basic/styles/ui-display-none-style.ts +5 -0
@@ -10,6 +10,8 @@ import AtomRepeater from "./AtomRepeater";
10
10
  import ComboBox from "./ComboBox";
11
11
  import Select from "./Select";
12
12
 
13
+ import "./styles/calendar-style";
14
+
13
15
  const start = DateTime.now;
14
16
 
15
17
  const getWeekDays = (locale, type: "short" | "long") => {
@@ -60,70 +62,6 @@ export const months = {
60
62
  }
61
63
  };
62
64
 
63
- CSS(StyleRule()
64
- .display("inline-grid")
65
- .gridTemplateRows("auto auto auto")
66
- .gridTemplateColumns("auto auto auto auto")
67
- .child(StyleRule(".fa-solid")
68
- .padding(5)
69
- .paddingLeft(10)
70
- .paddingRight(10)
71
- .cursor("pointer")
72
- .hoverColor(Colors.blueViolet)
73
- )
74
- .child(StyleRule("select")
75
- .border("none")
76
- )
77
- .child(StyleRule(".week")
78
- .gridColumnStart("1")
79
- .gridColumnEnd("span 4")
80
- .gridRowStart("2")
81
- .display("inline-grid")
82
- .gridTemplateColumns("1fr 1fr 1fr 1fr 1fr 1fr 1fr")
83
- .gap(0)
84
- .child(StyleRule("*")
85
- .fontSize("smaller")
86
- .padding("5")
87
- .paddingLeft("10")
88
- .paddingRight("10")
89
- .cursor("default")
90
- .alignSelf("center")
91
- .justifySelf("center")
92
- )
93
- )
94
- .child(StyleRule(".dates")
95
- .gridColumnStart("1")
96
- .gridColumnEnd("span 4")
97
- .gridRowStart("3")
98
- .display("inline-grid")
99
- .gap(0)
100
- .child(StyleRule("[data-item-index]")
101
- .alignSelf("stretch")
102
- .justifySelf("stretch")
103
- .padding(7)
104
- .cursor("pointer")
105
- .textAlign("center")
106
- .hoverBackgroundColor(Colors.lightGray.withAlphaPercent(0.5))
107
- .and(StyleRule("[data-is-today=true]")
108
- .backgroundColor(Colors.lightGreen)
109
- )
110
- .and(StyleRule("[data-is-weekend=true]")
111
- .backgroundColor(Colors.lightGray.withAlphaPercent(0.3))
112
- )
113
- .and(StyleRule("[data-is-other-month=true]")
114
- .opacity("0.5")
115
- )
116
- .and(StyleRule("[data-disabled=true]")
117
- .textDecoration("line-through")
118
- )
119
- .and(StyleRule("[data-selected-item=true]")
120
- .backgroundColor(Colors.blueViolet)
121
- .color(Colors.white)
122
- )
123
- )
124
- )
125
- , "*[data-calendar=calendar]");
126
-
127
65
  export interface ICalendarDate {
128
66
  label: string;
129
67
  type: string;
@@ -5,27 +5,29 @@ 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, { SameObjectValue } from "./AtomRepeater";
7
7
 
8
- CSS(StyleRule()
9
- .flexLayout({ inline: true, justifyContent: "flex-start"})
10
- .flexFlow("wrap"),
11
- "div[data-checkbox-list=checkbox-list]");
8
+ import "./styles/check-box-list-style";
12
9
 
13
- CSS(StyleRule()
14
- .flexLayout({ justifyContent: "flex-start" })
15
- .marginRight(5)
16
- .child(StyleRule("span")
17
- .cursor("pointer")
18
- )
19
- .and(StyleRule("[data-selected-item=true]")
20
- .color(Colors.blue)
21
- )
22
- .displayNone("[data-selected-item=true][data-deleted=none] > i.far")
23
- .displayNone("[data-selected-item=false][data-deleted=none] > i.fas")
24
- .displayNone("[data-selected-item=false][data-deleted=false] > i.fas")
25
- .displayNone("[data-selected-item=true][data-deleted=true] > i.fas")
26
- .displayNone("[data-selected-item=true][data-deleted=false] > i.far")
27
- .displayNone("[data-selected-item=false][data-deleted=true] > i.fas")
28
- , "div[data-item-type=checkbox]");
10
+ // CSS(StyleRule()
11
+ // .flexLayout({ inline: true, justifyContent: "flex-start"})
12
+ // .flexFlow("wrap"),
13
+ // "div[data-checkbox-list=checkbox-list]");
14
+
15
+ // CSS(StyleRule()
16
+ // .flexLayout({ justifyContent: "flex-start" })
17
+ // .marginRight(5)
18
+ // .child(StyleRule("span")
19
+ // .cursor("pointer")
20
+ // )
21
+ // .and(StyleRule("[data-selected-item=true]")
22
+ // .color(Colors.blue)
23
+ // )
24
+ // .displayNone("[data-selected-item=true][data-deleted=none] > i.far")
25
+ // .displayNone("[data-selected-item=true][data-deleted=true] > i.fas")
26
+ // .displayNone("[data-selected-item=true][data-deleted=false] > i.far")
27
+ // .displayNone("[data-selected-item=false][data-deleted=none] > i.fas")
28
+ // .displayNone("[data-selected-item=false][data-deleted=false] > i.fas")
29
+ // .displayNone("[data-selected-item=false][data-deleted=true] > i.fas")
30
+ // , "div[data-item-type=checkbox]");
29
31
 
30
32
  export default class CheckBoxList extends AtomRepeater {
31
33
 
@@ -3,31 +3,7 @@ import XNode from "@web-atoms/core/dist/core/XNode";
3
3
  import StyleRule from "@web-atoms/core/dist/style/StyleRule";
4
4
  import CSS from "@web-atoms/core/dist/web/styles/CSS";
5
5
 
6
- const css = CSS(
7
- StyleRule("check-box")
8
- .display("inline-block")
9
- .child(
10
- StyleRule("label")
11
- .display("flex")
12
- .paddingLeft(5)
13
- .paddingRight(5)
14
- .child(
15
-
16
- StyleRule("input[type=checkbox]")
17
- .borderRadius(3)
18
- .margin(0)
19
- .padding(0)
20
- .alignSelf("center")
21
- )
22
- .child(
23
- StyleRule("span")
24
- .alignSelf("center")
25
- .whiteSpace("nowrap")
26
- .marginLeft(5)
27
- .flexStretch()
28
-
29
- ))
30
- );
6
+ import "./styles/checkbox-style";
31
7
 
32
8
  export default function Checkbox({
33
9
  checked,
@@ -36,7 +12,7 @@ export default function Checkbox({
36
12
  checked: any,
37
13
  text: string
38
14
  }) {
39
- return <div class={css}>
15
+ return <div data-check-box="check-box">
40
16
  <label>
41
17
  <input
42
18
  type="checkbox"
@@ -4,6 +4,8 @@ import StyleRule from "@web-atoms/core/dist/style/StyleRule";
4
4
  import CSS from "@web-atoms/core/dist/web/styles/CSS";
5
5
  import IElement from "./IElement";
6
6
 
7
+ import "./styles/chip-style";
8
+
7
9
  export interface IChip extends IElement {
8
10
  icon?: string;
9
11
  header?: string;
@@ -15,67 +17,6 @@ export interface IChip extends IElement {
15
17
  deleted?: boolean;
16
18
  }
17
19
 
18
- CSS(StyleRule()
19
- .padding(1)
20
- .paddingLeft(5)
21
- .paddingRight(5)
22
- .borderRadius(10)
23
- .display("grid")
24
- .alignItems("center")
25
- .gridTemplateRows("auto 1fr")
26
- .gridTemplateColumns("auto 1fr auto")
27
- .child(StyleRule("[data-content]")
28
- .gridRowStart("2")
29
- .gridColumnStart("2")
30
- )
31
- .child(StyleRule(".icon")
32
- .gridColumnStart("1")
33
- .gridRowStart("1")
34
- .gridRowEnd("span 2")
35
- .padding(2)
36
- .paddingRight(4)
37
- .alignSelf("center")
38
- )
39
- .child(StyleRule(".delete")
40
- .gridColumnStart("3")
41
- .gridRowStart("1")
42
- .gridRowEnd("span 2")
43
- .alignSelf("center")
44
- .fontSize("small")
45
- .backgroundColor(Colors.transparent)
46
- .borderRadius(4)
47
- .padding(2)
48
- .paddingLeft(4)
49
- .color(Colors.gray)
50
- .hover(StyleRule()
51
- .backgroundColor(Colors.lightGray)
52
- .color(Colors.red)
53
- )
54
- )
55
- .child(StyleRule(".header")
56
- .fontSize("x-small")
57
- .gridRowStart("1")
58
- .gridColumnStart("2")
59
- )
60
- .child(StyleRule(".label")
61
- .gridRowStart("2")
62
- .gridColumnStart("2")
63
- )
64
- .child(StyleRule(".delete-strike")
65
- .gridRow("1 / span 2")
66
- .gridColumn("1 / span 2")
67
- .height(2)
68
- .backgroundColor(Colors.red)
69
- .alignSelf("center")
70
- )
71
- .and(StyleRule("[data-deleted=false] > .delete-strike")
72
- .display("none")
73
- ).and(StyleRule("[data-deleted=true]")
74
- .border("solid 1px red")
75
- .backgroundImage(`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><path d='M100 0 L0 100 ' stroke='red' stroke-width='1'/><path d='M0 0 L100 100 ' stroke='red' stroke-width='1'/></svg>")`)
76
- )
77
- , "*[data-item-chip]");
78
-
79
20
  export default function Chip(
80
21
  {
81
22
  icon,
@@ -11,6 +11,8 @@ import AtomRepeater, { getParentRepeaterItem, SelectorCheckBox } from "./AtomRep
11
11
  import { EditableInput, getPropertyInfo, IPropertyInfo } from "./Editable";
12
12
  import TableRepeater from "./TableRepeater";
13
13
 
14
+ import "./styles/data-grid-style";
15
+
14
16
  const cellEventName = Symbol("cell-event-name");
15
17
  const headerEventName = Symbol("header-event-name");
16
18
  const footerEventName = Symbol("footer-event-name");
@@ -123,36 +125,36 @@ export type IDataGridColumn = IDataGridColumnWithLabel | IDataGridColumnWithLabe
123
125
 
124
126
  // }
125
127
 
126
- CSS(StyleRule()
127
- .child(StyleRule("thead")
128
- .child(StyleRule("tr[data-header=header]")
129
- .child(StyleRule("th")
130
- .child(StyleRule("i[data-sort]")
131
- .marginRight(5)
132
- .marginLeft(3)
133
- .opacity("0.5")
134
- )
135
- .child(StyleRule("input[type=checkbox]")
136
- .margin(5)
137
- )
138
- )
139
- )
140
- )
141
- .child(StyleRule("tbody")
142
- .child(StyleRule("tr[data-item-index]")
143
- .hoverBackgroundColor(Colors.lightSkyBlue.withAlphaPercent(0.3))
144
- .and(StyleRule("[data-selected-item=true]")
145
- .backgroundColor(Colors.lightGray.withAlphaPercent(0.4))
146
- )
147
- .child(StyleRule("td[data-ellipsis]")
148
- .maxWidth("200px")
149
- .overflow("hidden")
150
- .textOverflow("ellipsis")
151
- .whiteSpace("nowrap")
152
- )
153
- )
154
- )
155
- , "table[data-data-grid=data-grid]");
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]");
156
158
 
157
159
  export const SelectAllColumn: IDataGridColumn = {
158
160
  header: "Select All",
@@ -15,60 +15,7 @@ import ToggleButtonBar from "./ToggleButtonBar";
15
15
  import TimeEditor from "./TimeEditor";
16
16
  import TimeSpan from "@web-atoms/date-time/dist/TimeSpan";
17
17
 
18
- CSS(StyleRule()
19
- .display("inline-block")
20
- .cursor("pointer")
21
- .textAlign("left")
22
- .hover(StyleRule()
23
- .textDecoration("underline")
24
- .color(Colors.blue)
25
- )
26
- .nested(StyleRule(".calendar-popup")
27
- .display("grid")
28
- .gridTemplateColumns("1fr auto")
29
- .gridTemplateRows("1fr auto auto")
30
- .gap(7)
31
- .child(StyleRule("[data-calendar]")
32
- .gridRow("1")
33
- .gridColumn("1 / span 2")
34
- )
35
- .child(StyleRule(".time-editor")
36
- .paddingLeft(5)
37
- .gridRow("2")
38
- .flexLayout({ direction: "row", alignItems: "center", justifyContent: "start" as any})
39
- .nested(StyleRule("[data-item-index]")
40
- .paddingTop(0)
41
- .paddingBottom(0)
42
- )
43
- .nested(StyleRule("select")
44
- .border("none")
45
- .outline("none")
46
- )
47
- )
48
- .child(StyleRule(".clear")
49
- .gridColumn("1")
50
- .gridRow("3")
51
- .justifySelf("start")
52
- .border("none")
53
- .outline("none")
54
- .backgroundColor(Colors.transparent)
55
- .color("var(--accent-color, blue)")
56
- .paddingLeft(5)
57
- .marginLeft(0)
58
- )
59
- .child(StyleRule(".today")
60
- .gridRow("3")
61
- .gridColumn("2")
62
- .justifySelf("end")
63
- .border("none")
64
- .outline("none")
65
- .backgroundColor(Colors.transparent)
66
- .color("var(--accent-color, blue)")
67
- .paddingLeft(5)
68
- .marginLeft(0)
69
- )
70
- )
71
- , "*[data-date-field=date-field]");
18
+ import "./styles/date-field-style";
72
19
 
73
20
  function hours() {
74
21
  return [
@@ -9,12 +9,7 @@ import CSS from "@web-atoms/core/dist/web/styles/CSS";
9
9
  import AtomRepeater, { askSuggestion, askSuggestionPopup,
10
10
  disposeChildren, Match, MatchAnyCaseInsensitive } from "./AtomRepeater";
11
11
 
12
- CSS(StyleRule()
13
- .flexLayout({ inline: true, justifyContent: "stretch" as any})
14
- .nested(StyleRule("[data-white-space=nowrap]")
15
- .whiteSpace("nowrap")
16
- )
17
- , "div[data-drop-down=drop-down]");
12
+ import "./styles/drop-down-style";
18
13
 
19
14
  export default class DropDown<T = any> extends AtomRepeater<T> {
20
15
 
@@ -5,6 +5,8 @@ import StyleRule from "@web-atoms/core/dist/style/StyleRule";
5
5
  import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
6
6
  import CSS from "@web-atoms/core/dist/web/styles/CSS";
7
7
 
8
+ import "./styles/expander-style";
9
+
8
10
  export interface IExpander {
9
11
  icon?: string | string[];
10
12
  isExpanded: boolean;
@@ -13,56 +15,6 @@ export interface IExpander {
13
15
  [key: string]: any;
14
16
  }
15
17
 
16
- CSS(StyleRule()
17
- .display("grid")
18
- .gridTemplateRows("auto 1fr")
19
- .gridTemplateColumns("auto 1fr auto")
20
- .alignItems("center")
21
- .child(StyleRule("[data-element=icon]")
22
- .gridColumnStart("1")
23
- .gridRowStart("1")
24
- .padding(5)
25
- .marginRight(5)
26
- .alignSelf("center")
27
- .justifySelf("center")
28
- )
29
- .child(StyleRule("[data-element=header]")
30
- .gridRowStart("1")
31
- .gridColumnStart("2")
32
- )
33
- .child(StyleRule("[data-element=caret]")
34
- .gridRowStart("1")
35
- .gridColumnStart("3")
36
- .padding(5)
37
- .marginLeft(5)
38
- )
39
- .child(StyleRule("[data-element=detail]")
40
- .gridRowStart("2")
41
- .gridColumnStart("1")
42
- .gridColumnEnd("span 3")
43
- .marginTop(5)
44
- )
45
- .and(StyleRule("[data-is-expanded=true]")
46
- .child(StyleRule("[data-element=caret]")
47
- .overflow("hidden")
48
- .transform("rotate(-180deg)" as any)
49
- .transition("transform 150ms ease")
50
- .transformOrigin("center center")
51
- )
52
- )
53
- .and(StyleRule("[data-is-expanded=false]")
54
- .child(StyleRule("[data-element=caret]")
55
- .overflow("hidden")
56
- .transform("rotate(-360deg)" as any)
57
- .transformOrigin("center center")
58
- .transition("transform 150ms ease")
59
- )
60
- .child(StyleRule("*[data-element=detail]")
61
- .display("none")
62
- )
63
- )
64
- , "*[data-is-expander=expander]");
65
-
66
18
  document.body.addEventListener("click", (e: MouseEvent) => {
67
19
  if (e.defaultPrevented) {
68
20
  return;
@@ -143,71 +95,6 @@ export default function Expander(
143
95
  </div>;
144
96
  }
145
97
 
146
- CSS(StyleRule()
147
- .display("grid")
148
- .gridTemplateColumns("auto auto 1fr auto")
149
- .alignItems("center")
150
- .gap(0)
151
- .child(StyleRule("[data-element=icon]")
152
- .gridColumnStart("1")
153
- .gridColumnEnd("span 2")
154
- .gridRowStart("1")
155
- .padding(5)
156
- .alignSelf("center")
157
- .justifySelf("center")
158
- )
159
- .child(StyleRule("[data-element=header]")
160
- .gridRowStart("1")
161
- .gridColumnStart("3")
162
- )
163
- .child(StyleRule("[data-element=caret]")
164
- .gridRowStart("1")
165
- .gridColumnStart("4")
166
- .padding(5)
167
- .marginLeft(5)
168
- )
169
- .child(StyleRule("[data-element=detail]")
170
- .gridRowStart("2")
171
- .gridColumnStart("2")
172
- .gridColumnEnd("span 3")
173
- .paddingLeft(20)
174
- .paddingTop(5)
175
- .borderLeftStyle("solid")
176
- .borderLeftWidth(1)
177
- .borderLeftColor("var(--border-color, lightgray)")
178
- .borderTopLeftRadius(0)
179
- .borderBottomLeftRadius(0)
180
- .borderBottomWidth(0)
181
- .borderTopWidth(0)
182
- .marginTop(0)
183
- .marginBottom(0)
184
- .and(StyleRule("[data-selected=true]")
185
- .fontWeight("bold")
186
- .borderLeftColor("var(--accent-color, darkgray)")
187
- .borderLeftWidth("medium")
188
- )
189
- )
190
- .and(StyleRule("[data-is-expanded=true]")
191
- .child(StyleRule("[data-element=caret]")
192
- .overflow("hidden")
193
- .transform("rotate(-180deg)" as any)
194
- .transition("transform 150ms ease")
195
- .transformOrigin("center center")
196
- )
197
- )
198
- .and(StyleRule("[data-is-expanded=false]")
199
- .child(StyleRule("[data-element=caret]")
200
- .overflow("hidden")
201
- .transform("rotate(-360deg)" as any)
202
- .transformOrigin("center center")
203
- .transition("transform 150ms ease")
204
- )
205
- .child(StyleRule("*[data-element=detail]")
206
- .display("none")
207
- )
208
- )
209
- , "*[data-is-expander=menu]");
210
-
211
98
  export function ExpanderMenu({
212
99
  icon,
213
100
  isExpanded,
@@ -0,0 +1,82 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ styled.css `
4
+
5
+ & {
6
+ display: inline-grid;
7
+ grid-template-rows: auto auto auto;
8
+ grid-template-columns: auto auto auto auto;
9
+ }
10
+
11
+ & > .fa-solid {
12
+ padding: 5px;
13
+ padding-left: 10px;
14
+ padding-right: 10px;
15
+ cursor: pointer;
16
+ }
17
+
18
+ & > .fa-solid:hover {
19
+ color: blueviolet;
20
+ }
21
+ & > select {
22
+ border: none;
23
+ }
24
+
25
+ & > .week {
26
+ grid-column-start: 1;
27
+ grid-column-end: span 4;
28
+ grid-row-start: 2;
29
+ display: inline-grid;
30
+ grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
31
+ gap: 0px;
32
+
33
+ & > * {
34
+ font-size: smaller;
35
+ padding: 5;
36
+ padding-left: 10;
37
+ padding-right: 10;
38
+ cursor: default;
39
+ align-self: center;
40
+ justify-self: center;
41
+ }
42
+ }
43
+
44
+ & > .dates {
45
+ grid-column-start: 1;
46
+ grid-column-end: span 4;
47
+ grid-row-start: 3;
48
+ display: inline-grid;
49
+ gap: 0px;
50
+
51
+ & > [data-item-index] {
52
+ align-self: stretch;
53
+ justify-self: stretch;
54
+ padding: 7px;
55
+ cursor: pointer;
56
+ text-align: center;
57
+
58
+ &:hover {
59
+ background-color: rgba(211,211,211,0.5);
60
+ }
61
+
62
+ &[data-is-today=true] {
63
+ background-color: lightgreen;
64
+ }
65
+
66
+ &[data-is-weekend=true] {
67
+ background-color: rgba(211,211,211,0.3);
68
+ }
69
+
70
+ &[data-is-other-month=true] {
71
+ opacity: 0.5;
72
+ }
73
+ &[data-is-disabled] {
74
+ text-decoration: line-through;
75
+ }
76
+ &[data-selected-item=true] {
77
+ background-color: blueviolet;
78
+ color: white;
79
+ }
80
+ }
81
+ }
82
+ `.installGlobal("*[data-calendar=calendar]");
@@ -0,0 +1,58 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+
4
+ styled.css `
5
+
6
+ display: inline-flex;
7
+ flex-direction: row;
8
+ align-items: center;
9
+ justify-content: flex-start;
10
+ gap: 4px;
11
+ flex-flow: wrap;
12
+
13
+ `.installGlobal("div[data-checkbox-list=checkbox-list]");
14
+
15
+ styled.css `
16
+
17
+ display: flex;
18
+ flex-direction: row;
19
+ align-items: center;
20
+ justify-content: flex-start;
21
+ gap: 4px;
22
+
23
+ margin-right: 5px;
24
+
25
+ & > span {
26
+ cursor: pointer;
27
+ }
28
+
29
+ &[data-selected-item=true] {
30
+ color: blue;
31
+
32
+ &[data-deleted=none] > i.far {
33
+ display: none;
34
+ }
35
+ &[data-deleted=true] > i.fas {
36
+ display: none;
37
+ }
38
+ &[data-deleted=false] > i.far {
39
+ display: none;
40
+ }
41
+ }
42
+
43
+ &[data-selected-item=false] {
44
+ &[data-deleted=none] > i.fas {
45
+ display: none;
46
+ }
47
+ &[data-deleted=false] > i.fas {
48
+ display: none;
49
+ }
50
+ &[data-deleted=true] > i.fas {
51
+ display: none;
52
+ }
53
+ }
54
+
55
+
56
+
57
+ `.installGlobal("div[data-item-type=checkbox]");
58
+