@kusena/wui-single 18.0.1

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 (117) hide show
  1. package/README.md +24 -0
  2. package/esm2022/kusena-wui-single.mjs +5 -0
  3. package/esm2022/lib/components/app/app.component.mjs +63 -0
  4. package/esm2022/lib/components/app-bar/app-bar.component.mjs +16 -0
  5. package/esm2022/lib/components/avatar/avatar.component.mjs +35 -0
  6. package/esm2022/lib/components/dialog/dialog.component.mjs +54 -0
  7. package/esm2022/lib/components/drawer/drawer-item.component.mjs +41 -0
  8. package/esm2022/lib/components/drawer/drawer.component.mjs +82 -0
  9. package/esm2022/lib/components/drawer/drawer.directive.mjs +22 -0
  10. package/esm2022/lib/components/form-field/wui-form-field.component.mjs +63 -0
  11. package/esm2022/lib/components/form-field/wui-input.directive.mjs +68 -0
  12. package/esm2022/lib/components/icon/icon.component.mjs +22 -0
  13. package/esm2022/lib/components/list/list.component.mjs +31 -0
  14. package/esm2022/lib/components/loading/loading.component.mjs +60 -0
  15. package/esm2022/lib/components/loading-dialog/loading-dialog.component.mjs +24 -0
  16. package/esm2022/lib/components/menu/menu.component.mjs +134 -0
  17. package/esm2022/lib/components/modal/modal-host.component.mjs +21 -0
  18. package/esm2022/lib/components/modal/modal-overlay.mjs +63 -0
  19. package/esm2022/lib/components/modal/modal.component.mjs +38 -0
  20. package/esm2022/lib/components/nav/nav.component.mjs +85 -0
  21. package/esm2022/lib/components/page/page-host.component.mjs +21 -0
  22. package/esm2022/lib/components/page/page-overlay.service.mjs +63 -0
  23. package/esm2022/lib/components/page/page.component.mjs +23 -0
  24. package/esm2022/lib/components/snackbar/snackbar.component.mjs +65 -0
  25. package/esm2022/lib/components/toggle/toggle.component.mjs +79 -0
  26. package/esm2022/lib/directives/menu.directive.mjs +79 -0
  27. package/esm2022/lib/directives/nav.directive.mjs +78 -0
  28. package/esm2022/lib/directives/num-input.directive.mjs +105 -0
  29. package/esm2022/lib/directives/page-header.directive.mjs +48 -0
  30. package/esm2022/lib/directives/ripple.directive.mjs +87 -0
  31. package/esm2022/lib/directives/scroll-end.directive.mjs +27 -0
  32. package/esm2022/lib/directives/sortable.directive.mjs +99 -0
  33. package/esm2022/lib/index.mjs +39 -0
  34. package/esm2022/lib/services/message.service.mjs +22 -0
  35. package/esm2022/lib/services/modal.service.mjs +26 -0
  36. package/esm2022/lib/services/nav.service.mjs +55 -0
  37. package/esm2022/lib/services/page.service.mjs +38 -0
  38. package/esm2022/lib/services/router.service.mjs +42 -0
  39. package/esm2022/lib/services/wui.service.mjs +43 -0
  40. package/esm2022/lib/wui-single.component.mjs +19 -0
  41. package/esm2022/lib/wui.providers.mjs +20 -0
  42. package/esm2022/public-api.mjs +5 -0
  43. package/fesm2022/kusena-wui-single.mjs +1841 -0
  44. package/fesm2022/kusena-wui-single.mjs.map +1 -0
  45. package/index.d.ts +5 -0
  46. package/lib/components/app/app.component.d.ts +16 -0
  47. package/lib/components/app-bar/app-bar.component.d.ts +5 -0
  48. package/lib/components/avatar/avatar.component.d.ts +10 -0
  49. package/lib/components/dialog/dialog.component.d.ts +9 -0
  50. package/lib/components/drawer/drawer-item.component.d.ts +8 -0
  51. package/lib/components/drawer/drawer.component.d.ts +21 -0
  52. package/lib/components/drawer/drawer.directive.d.ts +7 -0
  53. package/lib/components/form-field/wui-form-field.component.d.ts +13 -0
  54. package/lib/components/form-field/wui-input.directive.d.ts +17 -0
  55. package/lib/components/icon/icon.component.d.ts +7 -0
  56. package/lib/components/list/list.component.d.ts +9 -0
  57. package/lib/components/loading/loading.component.d.ts +9 -0
  58. package/lib/components/loading-dialog/loading-dialog.component.d.ts +8 -0
  59. package/lib/components/menu/menu.component.d.ts +27 -0
  60. package/lib/components/modal/modal-host.component.d.ts +10 -0
  61. package/lib/components/modal/modal-overlay.d.ts +25 -0
  62. package/lib/components/modal/modal.component.d.ts +11 -0
  63. package/lib/components/nav/nav.component.d.ts +17 -0
  64. package/lib/components/page/page-host.component.d.ts +10 -0
  65. package/lib/components/page/page-overlay.service.d.ts +25 -0
  66. package/lib/components/page/page.component.d.ts +5 -0
  67. package/lib/components/snackbar/snackbar.component.d.ts +18 -0
  68. package/lib/components/toggle/toggle.component.d.ts +21 -0
  69. package/lib/directives/menu.directive.d.ts +17 -0
  70. package/lib/directives/nav.directive.d.ts +30 -0
  71. package/lib/directives/num-input.directive.d.ts +27 -0
  72. package/lib/directives/page-header.directive.d.ts +13 -0
  73. package/lib/directives/ripple.directive.d.ts +16 -0
  74. package/lib/directives/scroll-end.directive.d.ts +9 -0
  75. package/lib/directives/sortable.directive.d.ts +19 -0
  76. package/lib/index.d.ts +33 -0
  77. package/lib/services/message.service.d.ts +9 -0
  78. package/lib/services/modal.service.d.ts +13 -0
  79. package/lib/services/nav.service.d.ts +14 -0
  80. package/lib/services/page.service.d.ts +16 -0
  81. package/lib/services/router.service.d.ts +16 -0
  82. package/lib/services/wui.service.d.ts +16 -0
  83. package/lib/wui-single.component.d.ts +5 -0
  84. package/lib/wui.providers.d.ts +2 -0
  85. package/package.json +25 -0
  86. package/public-api.d.ts +1 -0
  87. package/scss/screen/appbar.scss +71 -0
  88. package/scss/screen/avatar.scss +17 -0
  89. package/scss/screen/backdrop.scss +15 -0
  90. package/scss/screen/box.scss +67 -0
  91. package/scss/screen/breadcrumb.scss +34 -0
  92. package/scss/screen/buttons.scss +177 -0
  93. package/scss/screen/core.scss +103 -0
  94. package/scss/screen/drawer.scss +273 -0
  95. package/scss/screen/formfields.scss +288 -0
  96. package/scss/screen/icon.scss +33 -0
  97. package/scss/screen/list.scss +90 -0
  98. package/scss/screen/loading.scss +169 -0
  99. package/scss/screen/menu.scss +120 -0
  100. package/scss/screen/modal.scss +238 -0
  101. package/scss/screen/normalize.scss +340 -0
  102. package/scss/screen/page.scss +115 -0
  103. package/scss/screen/pagination.scss +46 -0
  104. package/scss/screen/ripple.scss +18 -0
  105. package/scss/screen/scrollbar.scss +108 -0
  106. package/scss/screen/searchbox.scss +40 -0
  107. package/scss/screen/selection.scss +190 -0
  108. package/scss/screen/snackbar.scss +25 -0
  109. package/scss/screen/sortable.scss +10 -0
  110. package/scss/screen/table.scss +199 -0
  111. package/scss/screen/tabs.scss +71 -0
  112. package/scss/screen/toogle.scss +79 -0
  113. package/scss/screen/tooltip.scss +16 -0
  114. package/scss/screen/utils.scss +140 -0
  115. package/scss/variables/colors.scss +180 -0
  116. package/scss/variables/defaults.scss +0 -0
  117. package/scss/wui.scss +2 -0
@@ -0,0 +1,79 @@
1
+ .wui-toggle {
2
+ padding-top: 0;
3
+ padding-bottom: 0;
4
+ height: 2.25rem;
5
+ margin-bottom: 1.25rem;
6
+ }
7
+
8
+ wui-toggle {
9
+ display: inline-flex;
10
+ align-items: center;
11
+ height: 2.5rem;
12
+ margin-bottom: 1.25rem;
13
+ padding-top: .5rem;
14
+ padding-bottom: .5rem;
15
+
16
+ &:focus, &:hover {
17
+ .wui-toggle-switch {
18
+ outline-width: .5rem;
19
+ }
20
+ }
21
+
22
+ &.wui-toggle-checked {
23
+ .wui-toggle-switch {
24
+ left: 100%;
25
+ background-color: var(--wui-color-primary);
26
+ box-shadow: 0 0.125rem 0.125rem 0.075rem rgba(25, 118, 210, 0.25);
27
+
28
+ &-outer {
29
+ background-color: rgba(25, 118, 210, 0.2);
30
+ }
31
+ }
32
+ }
33
+
34
+ .wui-toggle {
35
+ &-switch {
36
+ width: 1.5rem;
37
+ height: 1.5rem;
38
+ border-radius: 0.75rem;
39
+ transition: outline linear .1s, left linear .2s;
40
+ outline: 0 solid rgba(25, 118, 210, 0.2);
41
+ position: absolute;
42
+ left: 0;
43
+ transform: translate(-50%, -50%);
44
+ background-color: white;
45
+ box-shadow: 0 0.125rem 0.125rem 0.075rem rgba(0, 0, 0, 0.25);
46
+ }
47
+
48
+ &-switch-outer {
49
+ width: 2.5rem;
50
+ height: 1.5rem;
51
+ border-radius: 0.75rem;
52
+ background-color: #EFEFEF;
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ }
57
+
58
+ &-switch-track {
59
+ position: relative;
60
+ height: 0;
61
+ width: 1rem;
62
+ overflow: visible;
63
+ }
64
+ }
65
+
66
+ &[disabled] {
67
+ .wui-toggle {
68
+ &-switch {
69
+ background-color: rgba(var(--wui-color-primary-rgb), 0.5);
70
+ box-shadow: 0 0.125rem 0.125rem 0.075rem rgba(200, 200, 200, 0.35);
71
+ outline: none;
72
+ }
73
+
74
+ &-switch-outer {
75
+ background-color: #EFEFEF;
76
+ }
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,16 @@
1
+ .tooltip {
2
+ position: fixed;
3
+ z-index: 999999;
4
+ transform: translateX(-50%);
5
+ font-size: .75rem;
6
+ font-weight: normal;
7
+ padding: .25rem .375rem;
8
+ background-color: rgba(0,0,0,0.6);
9
+ color: white;
10
+ border-radius: .25rem;
11
+ display: none;
12
+
13
+ &.show {
14
+ display: block;
15
+ }
16
+ }
@@ -0,0 +1,140 @@
1
+ h1, h2, h3, h4, h5, h6 {
2
+ display:block;
3
+ line-height: 1.5;
4
+ }
5
+
6
+ h1{
7
+ font-size: 2.5rem;
8
+ font-weight: normal;
9
+ }
10
+
11
+ h2{
12
+ font-size: 2rem;
13
+ }
14
+
15
+ h3{
16
+ font-size: 1.75rem;
17
+ }
18
+
19
+ h4{
20
+ font-size: 1.5rem;
21
+ }
22
+
23
+ h5{
24
+ font-size: 1.25rem;
25
+ }
26
+
27
+ h6{
28
+ font-size: 1rem;
29
+ }
30
+
31
+ .title {
32
+ font-size: 1rem;
33
+ }
34
+
35
+ .sub-title {
36
+ font-size: .875rem;
37
+ color: $theme-light-text;
38
+ }
39
+
40
+ @mixin font-weight($breakpoint: null) {
41
+ .font-weight {
42
+ &#{if($breakpoint != null, "-" + $breakpoint, "")} {
43
+ &-100 { font-weight: 100; }
44
+ &-200 { font-weight: 200; }
45
+ &-300 { font-weight: 300; }
46
+ &-400, &-normal { font-weight: 400; }
47
+ &-500 { font-weight: 500; }
48
+ &-600 { font-weight: 600; }
49
+ &-700, &-bold { font-weight: 700; }
50
+ }
51
+ }
52
+ }
53
+
54
+ @include font-weight;
55
+ @media screen and (max-width: 575px) { @include font-weight("sm"); }
56
+ @media screen and (min-width: 576px) { @include font-weight("md"); }
57
+ @media screen and (min-width: 992px) { @include font-weight("lg"); }
58
+ @media screen and (min-width: 1200px) { @include font-weight("xl"); }
59
+
60
+ @mixin font-sizes($breakpoint: null) {
61
+ .font {
62
+ &#{if($breakpoint != null, "-" + $breakpoint, "")} {
63
+ &-12 { font-size: .75rem; }
64
+ &-14 { font-size: .875rem; }
65
+ &-16 { font-size: 1rem; }
66
+ &-18 { font-size: 1.125rem; }
67
+ &-20 { font-size: 1.25rem; }
68
+ &-24 { font-size: 1.5rem; }
69
+ &-28 { font-size: 1.75rem; }
70
+ &-32 { font-size: 2rem; }
71
+ &-48 { font-size: 3rem; }
72
+ &-64 { font-size: 4rem; }
73
+ }
74
+ }
75
+ }
76
+
77
+ @include font-sizes;
78
+ @media screen and (max-width: 575px){ @include font-sizes("sm"); }
79
+ @media screen and (min-width: 576px) { @include font-sizes("md"); }
80
+ @media screen and (min-width: 992px) { @include font-sizes("lg"); }
81
+ @media screen and (min-width: 1200px) { @include font-sizes("xl"); }
82
+
83
+ @mixin max-width($breakpoint: null) {
84
+ .mw {
85
+ &#{if($breakpoint != null, "-" + $breakpoint, "")} {
86
+ &-400 { max-width: 400px; }
87
+ &-500 { max-width: 500px; }
88
+ &-600 { max-width: 600px; }
89
+ &-700 { max-width: 700px; }
90
+ &-800 { max-width: 800px; }
91
+ }
92
+ }
93
+ }
94
+
95
+ @include max-width;
96
+ @media screen and (max-width: 575px){ @include max-width("sm"); }
97
+ @media screen and (min-width: 576px) { @include max-width("md"); }
98
+ @media screen and (min-width: 992px) { @include max-width("lg"); }
99
+ @media screen and (min-width: 1200px) { @include max-width("xl"); }
100
+
101
+
102
+ .wui-label {
103
+ font-size: .75rem;
104
+ padding: .25rem;
105
+ border: 1px solid $theme-text;
106
+ border-radius: .25rem;
107
+ display: inline-block;
108
+
109
+ &-success {
110
+ color: #28a745;
111
+ border-color: #28a745;
112
+ }
113
+
114
+ &-danger {
115
+ color: #dc3545;
116
+ border-color: #dc3545;
117
+ }
118
+ }
119
+
120
+ .wui-box {
121
+ background-color: white;
122
+ padding: 1rem;
123
+ border-radius: .5rem;
124
+ width: 100%;
125
+ height: 500px;
126
+ }
127
+
128
+ .wui-edge-fix {
129
+ width: calc(100% + 3rem);
130
+ margin-left: -1.5rem;
131
+ margin-right: -1.5rem;
132
+ }
133
+
134
+ @media screen and (max-width: 768px) {
135
+ .wui-edge-fix {
136
+ width: calc(100% + 2rem);
137
+ margin-left: -1rem;
138
+ margin-right: -1rem;
139
+ }
140
+ }
@@ -0,0 +1,180 @@
1
+ $wui-colors: (
2
+ "blue": (
3
+ "50": #e3f2fd,
4
+ "100": #bbdefb,
5
+ "200": #90caf9,
6
+ "300": #64b5f6,
7
+ "400": #42a5f5,
8
+ "500": #2196f3,
9
+ "600": #1e88e5,
10
+ "700": #1976d2,
11
+ "800": #1565c0,
12
+ "900": #0d47a1,
13
+ ),
14
+ "blueGrey": (
15
+ "50": #eceff1,
16
+ "100": #cfd8dc,
17
+ "200": #b0bec5,
18
+ "300": #90a4ae,
19
+ "400": #78909c,
20
+ "500": #607d8b,
21
+ "600": #546e7a,
22
+ "700": #455a64,
23
+ "800": #37474f,
24
+ "900": #263238,
25
+ ),
26
+ "green": (
27
+ "50": #e8f5e9,
28
+ "100": #c8e6c9,
29
+ "200": #a5d6a7,
30
+ "300": #81c784,
31
+ "400": #66bb6a,
32
+ "500": #4caf50,
33
+ "600": #43a047,
34
+ "700": #388e3c,
35
+ "800": #2e7d32,
36
+ "900": #1b5e20,
37
+ ),
38
+ "red": (
39
+ "50": #ffebee,
40
+ "100": #ffcdd2,
41
+ "200": #ef9a9a,
42
+ "300": #e57373,
43
+ "400": #ef5350,
44
+ "500": #f44336,
45
+ "600": #e53935,
46
+ "700": #d32f2f,
47
+ "800": #c62828,
48
+ "900": #b71c1c,
49
+ ),
50
+ "orange": (
51
+ "50": #fff3e0,
52
+ "100": #ffe0b2,
53
+ "200": #ffcc80,
54
+ "300": #ffb74d,
55
+ "400": #ffa726,
56
+ "500": #ff9800,
57
+ "600": #fb8c00,
58
+ "700": #f57c00,
59
+ "800": #ef6c00,
60
+ "900": #e65100,
61
+ )
62
+ ) !default;
63
+
64
+ @if variable-exists(wui-additional-colors) {
65
+ $wui-colors: map-merge($wui-colors, $wui-additional-colors);
66
+ }
67
+
68
+ :root {
69
+ @each $name, $variants in $wui-colors {
70
+ @each $variant, $color in $variants {
71
+ --wui-color-#{$name}-#{$variant}: #{$color};
72
+ }
73
+ }
74
+ }
75
+
76
+ @each $name, $variants in $wui-colors {
77
+ @each $variant, $color in $variants {
78
+ .text-#{$name}-#{$variant} {
79
+ color: #{$color};
80
+ }
81
+
82
+ .bg-#{$name}-#{$variant} {
83
+ background-color: #{$color};
84
+ }
85
+
86
+ .border-#{$name}-#{$variant} {
87
+ border-color: #{$color}
88
+ }
89
+ }
90
+ }
91
+
92
+ $theme: (
93
+ "50" : #E3F2FD,
94
+ "100" : #BBDEFB,
95
+ "200" : #90CAF9,
96
+ "300" : #64B5F6,
97
+ "400" : #42A5F5,
98
+ "500" : #2196F3,
99
+ "600" : #1E88E5,
100
+ "700" : #1976D2,
101
+ "800" : #1565C0,
102
+ "900" : #0D47A1,
103
+ "secondary" : #222
104
+ );
105
+
106
+ $theme-text: rgba(0, 0, 0, 0.87) !default;
107
+ $theme-primary: map-get($theme, "700") !default;
108
+ $theme-secondary: #212121 !default;
109
+ $theme-danger: #B00020 !default;
110
+ $theme-light: rgba(125,125,125, .12) !default;
111
+ $theme-backdrop: rgba(0,0,0,0.5) !default;
112
+
113
+ $theme-button-hover-bg: darken($theme-light, 50%);
114
+ $theme-button-focus-bg: darken($theme-button-hover-bg, 100%);
115
+
116
+ $theme-light-bg: #FFF;
117
+ $theme-light-text: rgba(0, 0, 0, 0.67);
118
+
119
+ $theme-dark-bg: rgba(0, 0, 0, 0.87);
120
+ $theme-dark-text: rgba(255,255,255,0.67);
121
+
122
+ $theme-dark-button-text: rgba(255,255,255,0.67);
123
+ $theme-dark-button-bg: transparent;
124
+
125
+ $theme-dark-button-hover-text: #FFF;
126
+ $theme-dark-button-hover-bg: rgba(255,255,255,.16);
127
+
128
+ $theme-button-text: $theme-text;
129
+ $theme-button-bg: $theme-light;
130
+ $theme-button-hover-text: darken($theme-text, 5%);
131
+ $theme-button-focus-text: darken($theme-text, 5%);
132
+ $theme-button-smooth-text: $theme-text;
133
+ $theme-button-smooth-hover-bg: lighten($theme-light, 3%);
134
+ $theme-button-smooth-focus-bg: lighten($theme-light, 5%);
135
+
136
+ $theme-button-primary-text: #FFF;
137
+ $theme-button-primary-bg: $theme-primary;
138
+ $theme-button-primary-hover-text: #FFF;
139
+ $theme-button-primary-hover-bg: lighten($theme-primary, 5%);
140
+ $theme-button-primary-focus-text: #FFF;
141
+ $theme-button-primary-focus-bg: lighten($theme-primary, 10%);
142
+ $theme-button-primary-smooth-text: $theme-primary;
143
+ $theme-button-primary-smooth-hover-bg: rgba($theme-primary, 10%);
144
+ $theme-button-primary-smooth-focus-bg: rgba($theme-primary, 20%);
145
+
146
+ $theme-button-secondary-text: #FFF;
147
+ $theme-button-secondary-bg: $theme-secondary;
148
+ $theme-button-secondary-hover-text: #FFF;
149
+ $theme-button-secondary-hover-bg: lighten($theme-secondary, 5%);
150
+ $theme-button-secondary-focus-text: #FFF;
151
+ $theme-button-secondary-focus-bg: lighten($theme-secondary, 10%);
152
+ $theme-button-secondary-smooth-text: $theme-secondary;
153
+ $theme-button-secondary-smooth-hover-bg: rgba($theme-secondary, 10%);
154
+ $theme-button-secondary-smooth-focus-bg: rgba($theme-secondary, 20%);
155
+
156
+ $theme-button-danger-text: #FFF;
157
+ $theme-button-danger-bg: $theme-danger;
158
+ $theme-button-danger-hover-text: #FFF;
159
+ $theme-button-danger-hover-bg: lighten($theme-danger, 5%);
160
+ $theme-button-danger-focus-text: #FFF;
161
+ $theme-button-danger-focus-bg: lighten($theme-danger, 10%);
162
+ $theme-button-danger-smooth-text: $theme-danger;
163
+ $theme-button-danger-smooth-hover-bg: rgba($theme-danger, 10%);
164
+ $theme-button-danger-smooth-focus-bg: rgba($theme-danger, 20%);
165
+
166
+ $theme-list-item-selected-bg: rgba($theme-primary, 15%);
167
+ $theme-list-item-selected-text: $theme-primary;
168
+
169
+ $theme-avatar-bg: rgba(#000, 12%);
170
+ $theme-checkbox: rgba(#000, 38%);
171
+ $theme-toggle-track-bg: rgba(#000, 12%);
172
+
173
+ $theme-border: rgba(0, 0, 0, 0.08);
174
+ $theme-text: rgba(0, 0, 0, 0.67);
175
+ $theme-black: (
176
+ "87": rgba(0, 0, 0, 0.87),
177
+ "77": rgba(0, 0, 0, 0.77),
178
+ "67": rgba(0, 0, 0, 0.67),
179
+ "54": rgba(0, 0, 0, 0.54)
180
+ )
File without changes
package/scss/wui.scss ADDED
@@ -0,0 +1,2 @@
1
+ @import '@angular/cdk/overlay-prebuilt.css';
2
+ @import "screen/core.scss";