@web-atoms/web-controls 2.3.107 → 2.3.108

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 (66) 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/styles/calendar-style.d.ts +2 -0
  21. package/dist/basic/styles/calendar-style.d.ts.map +1 -0
  22. package/dist/basic/styles/calendar-style.js +93 -0
  23. package/dist/basic/styles/calendar-style.js.map +1 -0
  24. package/dist/basic/styles/chips-style.d.ts +2 -0
  25. package/dist/basic/styles/chips-style.d.ts.map +1 -0
  26. package/dist/basic/styles/chips-style.js +50 -0
  27. package/dist/basic/styles/chips-style.js.map +1 -0
  28. package/dist/basic/styles/item-suggestion-style.d.ts +2 -0
  29. package/dist/basic/styles/item-suggestion-style.d.ts.map +1 -0
  30. package/dist/basic/styles/item-suggestion-style.js +51 -0
  31. package/dist/basic/styles/item-suggestion-style.js.map +1 -0
  32. package/dist/basic/styles/popup-style.d.ts +2 -0
  33. package/dist/basic/styles/popup-style.d.ts.map +1 -0
  34. package/dist/basic/styles/popup-style.js +34 -0
  35. package/dist/basic/styles/popup-style.js.map +1 -0
  36. package/dist/basic/styles/repeater-style.d.ts +2 -0
  37. package/dist/basic/styles/repeater-style.d.ts.map +1 -0
  38. package/dist/basic/styles/repeater-style.js +62 -0
  39. package/dist/basic/styles/repeater-style.js.map +1 -0
  40. package/dist/basic/styles/suggestion-popup.d.ts +2 -0
  41. package/dist/basic/styles/suggestion-popup.d.ts.map +1 -0
  42. package/dist/basic/styles/suggestion-popup.js +36 -0
  43. package/dist/basic/styles/suggestion-popup.js.map +1 -0
  44. package/dist/basic/styles/suggestion-style.d.ts +2 -0
  45. package/dist/basic/styles/suggestion-style.d.ts.map +1 -0
  46. package/dist/basic/styles/suggestion-style.js +50 -0
  47. package/dist/basic/styles/suggestion-style.js.map +1 -0
  48. package/dist/basic/styles/ui-display-none-style.d.ts +2 -0
  49. package/dist/basic/styles/ui-display-none-style.d.ts.map +1 -0
  50. package/dist/basic/styles/ui-display-none-style.js +16 -0
  51. package/dist/basic/styles/ui-display-none-style.js.map +1 -0
  52. package/dist/tsconfig.tsbuildinfo +1 -1
  53. package/package.json +2 -2
  54. package/src/basic/AtomChips.tsx +2 -64
  55. package/src/basic/AtomRepeater.tsx +5 -75
  56. package/src/basic/AtomSuggestions.tsx +1 -30
  57. package/src/basic/Button.tsx +2 -0
  58. package/src/basic/Calendar.tsx +2 -64
  59. package/src/basic/styles/calendar-style.ts +82 -0
  60. package/src/basic/styles/chips-style.ts +39 -0
  61. package/src/basic/styles/item-suggestion-style.ts +40 -0
  62. package/src/basic/styles/popup-style.ts +23 -0
  63. package/src/basic/styles/repeater-style.ts +51 -0
  64. package/src/basic/styles/suggestion-popup.ts +28 -0
  65. package/src/basic/styles/suggestion-style.ts +39 -0
  66. 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;
@@ -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,39 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ styled.css `
4
+ flex-direction: row;
5
+ align-items: center;
6
+ justify-content: stretch;
7
+ gap: 4px;
8
+ display: flex;
9
+ flex-flow: wrap;
10
+
11
+ & > .search {
12
+ border: none;
13
+ outline: none;
14
+ flex: 1 1;
15
+ }
16
+
17
+ & > .footer {
18
+ margin-left: auto;
19
+ }
20
+
21
+ & > .presenter {
22
+ flex-direction: row;
23
+ align-items: center;
24
+ justify-content: flex-start;
25
+ gap: 4px;
26
+ display: inline-flex;
27
+ flex-flow: wrap;
28
+ & > * {
29
+ background-color: rgba(211,211,211,0.3);
30
+ }
31
+ }
32
+
33
+ &[data-mode=search] {
34
+ & > .search {
35
+ padding-left: 20px;
36
+ background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' class='bi bi-search' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'%3E%3C/path%3E%3C/svg%3E") no-repeat 1px center;
37
+ }
38
+ }
39
+ `.installGlobal("div[data-atom-chips]");
@@ -0,0 +1,40 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ styled.css `
4
+ padding: 1px;
5
+ padding-left: 5px;
6
+ padding-right: 5px;
7
+ border-radius: 10px;
8
+ display: grid;
9
+ align-items: center;
10
+ grid-template-rows: auto 1fr;
11
+ grid-template-columns: auto 1fr auto;
12
+
13
+ & > [data-content] {
14
+ grid-row-start: 2;
15
+ grid-column-start: 2;
16
+ }
17
+ & > .icon {
18
+ grid-column-start: 1;
19
+ grid-row-start: 1;
20
+ grid-row-end: span 2;
21
+ align-self: center;
22
+ margin-right: 5px;
23
+ }
24
+ & > .delete {
25
+ grid-column-start: 3;
26
+ grid-row-start: 1;
27
+ grid-row-end: span 2;
28
+ align-self: center;
29
+ color: #ff0000;
30
+ }
31
+ & > .header {
32
+ font-size: x-small;
33
+ grid-row-start: 1;
34
+ grid-column-start: 2;
35
+ }
36
+ & > .label {
37
+ grid-row-start: 2;
38
+ grid-column-start: 2;
39
+ }
40
+ `.installGlobal("*[data-item-suggestion]");
@@ -0,0 +1,23 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ export const repeaterPopupCss = styled.css `
4
+ min-width: 200px;
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ justify-content: space-around;
9
+ gap: 4px;
10
+
11
+ & > .items {
12
+ flex: 1 1 100%;
13
+ overflow: auto;
14
+ & > .presenter {
15
+ & > * {
16
+ padding: 5px;
17
+ }
18
+ & > [data-selected-item=true] {
19
+ background-color: lightgreen;
20
+ }
21
+ }
22
+ }
23
+ `.installLocal();
@@ -0,0 +1,51 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ styled.css `
4
+
5
+ *[data-selected-item] {
6
+ & i[data-click-event] {
7
+ padding: 5px;
8
+ }
9
+ & [data-no-wrap=true] {
10
+ white-space: nowrap;
11
+ }
12
+ }
13
+
14
+ *[data-selected-item=true] {
15
+ & i[data-click-event=item-select] {
16
+ padding: 5px;
17
+ }
18
+ & i[data-click-event=item-select] {
19
+ display: none;
20
+ }
21
+ }
22
+
23
+ *[data-selected-item=false] {
24
+ & i[data-click-event=item-deselect] {
25
+ display: none;
26
+ }
27
+ }
28
+
29
+ *[data-select-all=select-all] {
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: flex-start;
33
+ margin: 0;
34
+ & i[data-ui-type] {
35
+ padding: 5px;
36
+ }
37
+ & [data-no-wrap=true] {
38
+ white-space: nowrap;
39
+ }
40
+ &[data-is-selected=true] {
41
+ & i[data-ui-type=item-select] {
42
+ display: none;
43
+ }
44
+ }
45
+ &[data-is-selected=false] {
46
+ & i[data-ui-type=item-deselect] {
47
+ display: none;
48
+ }
49
+ }
50
+ }
51
+ `.withId("repeater-styles").installGlobal();
@@ -0,0 +1,28 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ const hasMoreHeight = (window.screen.availHeight / 2) > 250
4
+ ? `height: 250px;`
5
+ : `max-height: 80px;`;
6
+
7
+ styled.css `
8
+ ${hasMoreHeight}
9
+ min-width: 80px;
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ justify-content: space-around;
14
+ gap: 4px;
15
+
16
+ & > .items {
17
+ flex: 1 1 100%;
18
+ overflow: auto;
19
+ & > .presenter {
20
+ & > * {
21
+ padding: 5px;
22
+ }
23
+ & > [data-selected-item=true] {
24
+ background-color: lightgreen;
25
+ }
26
+ }
27
+ }
28
+ `.installGlobal("*[data-suggestion-popup=suggestion-popup]");
@@ -0,0 +1,39 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ styled.css `
4
+ margin: 5px;
5
+ display: flex;
6
+ flex-direction: row;
7
+ justify-content: space-around;
8
+ gap: 4px;
9
+ overflow: hidden;
10
+ & > .header {
11
+ color: darkorange;
12
+ white-space: nowrap;
13
+ }
14
+ & > .items {
15
+ flex: 1 1 100%;
16
+ display: flex;
17
+ flex-direction: row;
18
+ justify-content: flex-start;
19
+ align-items: center;
20
+ gap: 0;
21
+ overflow: hidden;
22
+ & > * {
23
+ white-space: nowrap;
24
+ padding: 3px;
25
+ cursor: pointer;
26
+ &:hover {
27
+ color: blue;
28
+ text-decoration: underline;
29
+ }
30
+ }
31
+ }
32
+ & > .more {
33
+ font-size: smaller;
34
+ color: blue;
35
+ text-transform: lowercase;
36
+ text-decoration: underline;
37
+ cursor: pointer;
38
+ }
39
+ `.installGlobal("*[data-suggestions=suggestions]");
@@ -0,0 +1,5 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+
3
+ styled.css `
4
+ display: none;
5
+ `.installGlobal("[data-ui-display=none]");