@acorex/styles 5.0.37 → 5.0.41

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/styles",
3
- "version": "5.0.37",
3
+ "version": "5.0.41",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -81,7 +81,7 @@
81
81
  @apply ax-ring-2 ax-ring-offset-2 ax-ring-primary-500;
82
82
  }
83
83
  &:active {
84
- @apply ax-bg-primary-700 ax-ring-2 ax-ring-offset-2 ax-ring-primary-700;
84
+ @apply ax-bg-primary-800 ax-ring-2 ax-ring-offset-2 ax-ring-primary-800;
85
85
  }
86
86
  }
87
87
 
@@ -45,6 +45,9 @@
45
45
  &:hover {
46
46
  @apply ax-bg-light-100 dark:ax-bg-white/[0.07];
47
47
  }
48
+ &:focus {
49
+ @apply ax-ring-2 ax-ring-primary-500 ax-outline-none;
50
+ }
48
51
 
49
52
  &.ax-state-disabled {
50
53
  @apply ax-text-light-300 ax-cursor-not-allowed;
@@ -3,6 +3,21 @@
3
3
  .ax-check-box,
4
4
  ax-check-box {
5
5
 
6
+ .ax-state-error {
7
+ @apply ax-text-danger-500;
8
+
9
+ input[type="checkbox"] {
10
+ @apply ax-border-danger-500;
11
+ }
12
+ }
13
+ .ax-state-success {
14
+ @apply ax-text-success-600;
15
+
16
+ input[type="checkbox"] {
17
+ @apply ax-border-success-600;
18
+ }
19
+ }
20
+
6
21
 
7
22
  .ax-wrapper {
8
23
  &.ax-state-disabled {
@@ -42,9 +57,7 @@
42
57
  &.ax-state-disabled {
43
58
  @apply ax-opacity-60;
44
59
  }
45
- &.ax-state-error{
46
- @apply ax-border-danger-500;
47
- }
60
+
48
61
  }
49
62
  }
50
63
  }
@@ -1,5 +1,4 @@
1
1
  @layer components {
2
-
3
2
  ax-drop-down,
4
3
  .ax-drop-down {
5
4
  display: contents;
@@ -18,7 +17,7 @@
18
17
  }
19
18
 
20
19
  .ax-overlay-pane {
21
- @apply ax-bg-white ax-border ax-rounded ax-border-light-300;
20
+ @apply ax-bg-white ax-border ax-rounded ax-border-light-200;
22
21
  @include control-dark("surface");
23
22
 
24
23
  &.ax-overlay-center {
@@ -45,7 +44,10 @@
45
44
  }
46
45
 
47
46
  i {
48
- @apply ax-text-primary-500 ax-cursor-pointer ax-text-xl;
47
+ @apply ax-text-light-300 dark:ax-text-light-200 ax-cursor-pointer ax-text-xl;
48
+ &:hover {
49
+ @apply ax-text-light-500 dark:ax-text-light-100;
50
+ }
49
51
  }
50
52
  }
51
53
 
@@ -193,15 +195,15 @@
193
195
  }
194
196
 
195
197
  &.ax-light-default {
196
- @apply ax-bg-transparent ax-text-light-500 ax-border-transparent;
198
+ @apply ax-bg-transparent ax-text-light-500 ax-border-transparent dark:ax-text-light-200;
197
199
 
198
200
  &:hover,
199
201
  &:focus {
200
- @apply ax-bg-light-50 ax-text-light-600 dark:ax-bg-light-500 dark:ax-text-light-100;
202
+ @apply ax-bg-light-100 ax-text-light-600 dark:ax-bg-light-500 dark:ax-text-light-100;
201
203
  }
202
204
 
203
205
  &:active {
204
- @apply ax-bg-light-100 ax-text-light-700 dark:ax-bg-light-600 dark:ax-text-light-100;
206
+ @apply ax-bg-light-200 ax-text-light-700 dark:ax-bg-light-600 dark:ax-text-light-100;
205
207
  }
206
208
 
207
209
  &.ax-state-selected {
@@ -211,4 +213,4 @@
211
213
  }
212
214
  }
213
215
  }
214
- }
216
+ }
@@ -1,58 +1,84 @@
1
1
  @layer components {
2
2
  .ax-editor-container {
3
3
  height: calc(var(--ax-base-size) * var(--ax-base-ratio));
4
+ line-height: calc(var(--ax-base-size) * var(--ax-base-ratio));
4
5
  @apply ax-flex ax-rounded ax-bg-white ax-shadow-sm ax-border ax-border-solid ax-border-light-300;
5
6
  @include control-dark("editor");
7
+
6
8
  @screen md {
7
9
  @apply ax-text-sm;
8
10
  }
11
+
9
12
  &:focus-within {
10
13
  @apply ax-ring-2 ax-ring-primary-500 ax-ring-opacity-100 ax-border-transparent;
11
14
  }
15
+
12
16
  &.ax-button-icon {
13
17
  @apply ax-px-2;
14
18
  }
19
+
15
20
  &:first-child {
16
21
  }
22
+
17
23
  [class*=" ax-ic-"],
18
24
  [class^="ax-ic-"] {
19
25
  font-size: 1.2rem !important;
20
26
  line-height: 1 !important;
21
27
  }
28
+
22
29
  .ax-input {
23
- min-width: 1%;
24
- @apply ax-flex-1 ax-bg-transparent ax-border-none ax-px-2.5;
30
+ width: 1%;
31
+ text-align: inherit;
32
+ font: inherit;
33
+ @apply ax-flex-1 ax-bg-transparent ax-border-none ax-px-2.5 ax-rounded;
25
34
 
26
35
  &:focus {
27
36
  box-shadow: none;
28
37
  }
29
38
  }
39
+
30
40
  ax-prefix {
31
41
  *,
32
- ax-button {
42
+ ax-button,
43
+ ax-addon {
33
44
  @apply ax-rounded-s;
34
45
  }
35
46
  }
47
+
36
48
  ax-suffix {
37
49
  *,
38
- ax-button {
50
+ ax-button,
51
+ ax-addon {
39
52
  @apply ax-rounded-e;
40
53
  }
41
54
  }
55
+
42
56
  ax-prefix,
43
57
  ax-suffix {
44
58
  * {
45
59
  @apply ax-h-full ax-flex ax-justify-center ax-items-center ax-rounded-none;
46
60
  }
61
+
62
+ ax-icon {
63
+ @apply ax-px-2;
64
+ }
65
+
66
+ ax-addon {
67
+ @apply ax-bg-light-100 ax-text-light-fore ax-px-4;
68
+ }
47
69
  }
70
+
48
71
  ax-button {
49
72
  height: 100% !important;
50
73
  @apply ax-rounded-none;
74
+
51
75
  &:focus {
52
76
  @apply ax-ring-0;
53
77
  }
78
+
54
79
  &.ax-button-icon {
55
80
  min-width: calc(var(--ax-base-size) * var(--ax-base-ratio));
81
+
56
82
  .ax-ic {
57
83
  @apply ax-text-base;
58
84
  }
@@ -60,22 +86,33 @@
60
86
  }
61
87
 
62
88
  &.ax-state-disabled {
63
- background-color: rgb(var(--ax-color-disabled)) !important;
64
- color: rgb(var(--ax-color-disabled-fore)) !important;
65
- @apply ax-cursor-not-allowed;
66
- &:hover {
67
- background-color: rgb(var(--ax-color-disabled)) !important;
68
- }
89
+ @include control-dark("editor-disabled");
69
90
  }
91
+
70
92
  &.ax-state-error {
71
93
  @apply ax-border-danger-500;
94
+
72
95
  .ax-input {
73
96
  @apply ax-placeholder-danger-500;
74
97
  }
98
+
75
99
  &:focus-within {
76
100
  @apply ax-ring-0 ax-ring-transparent;
77
101
  }
78
102
  }
103
+
104
+ &.ax-state-success {
105
+ @apply ax-border-success-600;
106
+
107
+ .ax-input {
108
+ @apply ax-placeholder-success-600;
109
+ }
110
+
111
+ &:focus-within {
112
+ @apply ax-ring-0 ax-ring-transparent;
113
+ }
114
+ }
115
+
79
116
  // &.ax-sm {
80
117
  // height: calc((var(--ax-base-size) * var(--ax-base-ratio)) - var(--ax-base-size)) !important;
81
118
  // .ax-input {
@@ -0,0 +1,8 @@
1
+ @layer components{
2
+ fieldset{
3
+ @apply ax-grid ax-col-span-6 ax-grid-cols-6 ax-gap-4 ax-border ax-border-solid ax-border-gray-300 ax-p-3 ax-rounded;
4
+ legend{
5
+ @apply ax-text-sm ax-px-1;
6
+ }
7
+ }
8
+ }
@@ -2,7 +2,7 @@
2
2
  ax-form-field {
3
3
  @apply ax-mb-2 ax-relative;
4
4
  .ax-error-msg {
5
- @apply ax-text-danger-500 ax-text-xs;
5
+ @apply ax-block ax-text-danger-500 ax-text-xs ax-py-2;
6
6
  }
7
7
  }
8
8
  }
@@ -3,15 +3,10 @@
3
3
  @apply ax-outline-none ax-p-0;
4
4
  font-size:inherit;
5
5
  &:focus {
6
- @apply ax-ring-2 ax-ring-primary-500 ax-ring-opacity-100 ax-border-transparent;
6
+ @apply ax-ring-2 ax-ring-primary-500 ax-ring-opacity-100 ax-border-transparent ax-rounded-md;
7
7
  }
8
8
  &.ax-state-disabled {
9
- background-color: rgb(var(--ax-color-disabled)) !important;
10
- color: rgb(var(--ax-color-disabled-fore)) !important;
11
- @apply ax-cursor-not-allowed;
12
- &:hover {
13
- background-color: rgb(var(--ax-color-disabled)) !important;
14
- }
9
+ @include control-dark("editor-disabled");
15
10
  }
16
11
  }
17
12
  }
@@ -28,9 +28,7 @@
28
28
  }
29
29
 
30
30
  &:hover {
31
- &:not(.ax-state-selected) {
32
- @apply ax-bg-light-100 ax-text-light-fore dark:ax-bg-white/[0.09] dark:ax-text-light-50;
33
- }
31
+ @apply ax-bg-light-100 ax-text-light-fore dark:ax-bg-white/[0.09] dark:ax-text-light-50;
34
32
  }
35
33
  &.ax-state-selected {
36
34
  @apply ax-text-primary-500 ax-font-medium dark:ax-text-primary-50;
@@ -39,7 +37,7 @@
39
37
  &:not(.ax-check-box)
40
38
  {
41
39
  &.ax-state-selected {
42
- @apply ax-bg-primary-50;
40
+ @apply ax-bg-primary-50 dark:ax-bg-white/[0.16];
43
41
  }
44
42
  }
45
43
 
@@ -50,7 +48,7 @@
50
48
  &:focus,
51
49
  &.ax-state-focus {
52
50
  &:not(.ax-state-selected) {
53
- @apply ax-outline-none ax-bg-primary-50 ax-text-primary-500;
51
+ @apply ax-outline-none ax-bg-primary-50 ax-text-primary-500 dark:ax-bg-white/[0.16] dark:ax-text-white;
54
52
  }
55
53
  }
56
54
  }
@@ -1,4 +1,5 @@
1
1
  @layer components {
2
+
2
3
  .ax-loading {
3
4
  }
4
5
 
@@ -38,6 +39,10 @@
38
39
  background: rgba(var(--ax-color-white) 2);
39
40
  }
40
41
 
42
+ ax-loading-spinner{
43
+ @apply ax-flex;
44
+ }
45
+
41
46
  @keyframes pulse2 {
42
47
 
43
48
  0%,
@@ -0,0 +1,17 @@
1
+ @layer components {
2
+
3
+ ax-number-box,
4
+ .ax-number-box {
5
+ .ax-number-box-arrows {
6
+ @apply ax-grid ax-invisible;
7
+ }
8
+
9
+ &:focus,
10
+ &:focus-within,
11
+ &:hover {
12
+ .ax-number-box-arrows {
13
+ @apply ax-visible;
14
+ }
15
+ }
16
+ }
17
+ }
@@ -1,7 +1,7 @@
1
1
  @layer components {
2
-
3
- ax-page-footer {
4
- @apply ax-grid ax-grid-cols-12 ax-gap-2 ax-px-3 ax-py-2 ax-border-t ax-border-solid ax-border-light-300 dark:ax-border-light-700;
2
+ ax-page-footer,
3
+ ax-page-header {
4
+ @apply ax-grid ax-grid-cols-12 ax-gap-2 ax-px-3 ax-py-2 ax-border-solid ax-border-light-300 dark:ax-border-light-700;
5
5
 
6
6
  ax-prefix {
7
7
  @apply ax-flex ax-col-span-6 ax-col-start-1 ax-col-end-7 ax-justify-start;
@@ -12,37 +12,39 @@
12
12
  }
13
13
  }
14
14
 
15
- .ax-popup {
16
- @apply ax-flex ax-flex-col ax-bg-white ax-w-6/12 ax-shadow-lg ax-border ax-border-solid ax-border-light-300 ax-rounded ax-outline-none ax-p-0 ax-max-h-[98vh] ax-min-h-fit;
17
- @include control-dark('surface');
15
+ ax-page-footer {
16
+ @apply ax-border-t;
17
+ }
18
18
 
19
- header {
20
- @apply ax-flex ax-justify-between ax-px-3 ax-py-2;
21
- }
19
+ ax-page-header {
20
+ @apply ax-border-b;
21
+ }
22
22
 
23
- main {
24
- @apply ax-flex-1 ax-overflow-auto;
25
- }
23
+ .ax-popup {
24
+ @apply ax-flex ax-flex-col ax-bg-white ax-w-6/12 ax-shadow-lg ax-border ax-border-solid ax-border-light-300 ax-rounded ax-outline-none ax-p-0 ax-max-h-[98vh] ax-min-h-fit;
25
+ @include control-dark("surface");
26
26
 
27
- footer {
28
- @apply ax-grid ax-grid-cols-12 ax-gap-2 ax-px-3 ax-py-2 ax-border-t ax-border-solid ax-border-light-300 dark:ax-border-white/[0.2];
27
+ .ax-popup-header {
28
+ @apply ax-p-4 ax-border-b ax-border-light-300 dark:ax-border-light-700 ax-flex ax-justify-between ax-items-center ax-cursor-move;
29
29
 
30
- ax-prefix {
31
- @apply ax-flex ax-col-span-6 ax-col-start-1 ax-col-end-7 ax-justify-start;
30
+ span {
31
+ @apply ax-font-medium;
32
32
  }
33
33
 
34
- ax-suffix {
35
- @apply ax-flex ax-col-span-6 ax-col-start-7 ax-col-end-13 ax-justify-end;
34
+ i {
35
+ @apply ax-text-light-300 dark:ax-text-light-200 ax-cursor-pointer ax-text-xl;
36
+ &:hover {
37
+ @apply ax-text-light-500 dark:ax-text-light-100;
38
+ }
36
39
  }
37
40
  }
38
41
 
39
- header,
40
- footer {
41
- >div {
42
- @apply ax-flex ax-items-center;
43
- }
42
+ .ax-popup-main-container {
43
+ @apply ax-overflow-auto ax-flex-1;
44
+ }
45
+ .ax-popup-footer-container{
46
+
44
47
  }
45
-
46
48
  &.ax-popup-full {
47
49
  @apply ax-w-screen ax-h-full ax-max-h-full;
48
50
  }
@@ -69,6 +71,9 @@
69
71
  &.ax-popup-sm {
70
72
  width: 100vw;
71
73
  max-height: 100vh;
74
+ .ax-popup-main {
75
+ @apply ax-h-screen;
76
+ }
72
77
  }
73
78
 
74
79
  &.ax-popup-md {
@@ -84,6 +89,9 @@
84
89
  &.ax-popup-sm {
85
90
  width: 100vw;
86
91
  max-height: 100vh;
92
+ .ax-popup-main {
93
+ @apply ax-h-screen;
94
+ }
87
95
  }
88
96
 
89
97
  &.ax-popup-md {
@@ -100,6 +108,9 @@
100
108
  width: 100vw;
101
109
  height: 100vh;
102
110
  max-height: 100vh;
111
+ .ax-popup-main {
112
+ @apply ax-h-screen;
113
+ }
103
114
  }
104
115
 
105
116
  &.ax-popup-md,
@@ -109,14 +120,16 @@
109
120
  }
110
121
 
111
122
  @media all and (min-width: 0px) and (max-width: 424px) {
112
-
113
123
  &.ax-popup-sm,
114
124
  &.ax-popup-md,
115
125
  &.ax-popup-lg {
116
126
  width: 100vw;
117
- height: 100%;
118
- max-height: 100%;
127
+ height: 100vh;
128
+ max-height: 100vh;
129
+ .ax-popup-main {
130
+ @apply ax-h-screen;
131
+ }
119
132
  }
120
133
  }
121
134
  }
122
- }
135
+ }
@@ -0,0 +1,185 @@
1
+ @layer components {
2
+ .ax-switch {
3
+ label {
4
+ width: calc((var(--ax-base-size) * var(--ax-base-ratio) - 5px));
5
+ height: calc(var(--ax-base-size) * var(--ax-base-ratio) / 2);
6
+ @apply ax-relative ax-inline-block;
7
+ input {
8
+ @apply ax-w-0 ax-h-0 ax-opacity-0;
9
+ }
10
+
11
+ .ax-switch-slider {
12
+ @apply ax-absolute ax-cursor-pointer ax-left-0 ax-right-0 ax-bottom-0 ax-top-0 ax-bg-light-300 ax-rounded-full;
13
+ @include control-dark("editor");
14
+ -webkit-transition: 0.4s;
15
+ transition: 0.4s;
16
+ &::before {
17
+ @apply ax-absolute ax-bg-white ax-rounded-full;
18
+ content: "";
19
+ width: 35%;
20
+ padding-bottom: 35%;
21
+ left: 7%;
22
+ top: 50%;
23
+ transform: translate(0, -50%);
24
+ -webkit-transition: 0.4s;
25
+ transition: 0.4s;
26
+ }
27
+ }
28
+
29
+ input:checked + .ax-switch-slider {
30
+ @apply ax-bg-primary-500;
31
+ }
32
+
33
+ input:focus + .ax-switch-slider {
34
+ @apply ax-ring-2 ax-ring-primary-500 ax-ring-offset-2;
35
+ }
36
+
37
+ input:checked + .ax-switch-slider:before {
38
+ -webkit-transform: translate(140%, -50%);
39
+ -ms-transform: translate(140%, -50%);
40
+ transform: translate(140%, -50%);
41
+ }
42
+
43
+ }
44
+ &.ax-success {
45
+ ax-loading {
46
+ @apply ax-stroke-success-500;
47
+ }
48
+ > input {
49
+ &:checked {
50
+ & + .ax-switch-slider {
51
+ background-color: rgb(var(--ax-color-success));
52
+ }
53
+ }
54
+ }
55
+ input:focus ~ .ax-switch-slider {
56
+ @apply ax-ring-success-500;
57
+ }
58
+ }
59
+ &.ax-secondary {
60
+ ax-loading {
61
+ @apply ax-stroke-secondary-500;
62
+ }
63
+ > input {
64
+ &:checked {
65
+ & + .ax-switch-slider {
66
+ background-color: rgb(var(--ax-color-secondary));
67
+ }
68
+ }
69
+ }
70
+ input:focus ~ .ax-switch-slider {
71
+ @apply ax-ring-secondary-500;
72
+ }
73
+ }
74
+ &.ax-danger {
75
+ ax-loading {
76
+ @apply ax-stroke-danger-500;
77
+ }
78
+ > input {
79
+ &:checked {
80
+ & + .ax-switch-slider {
81
+ background-color: rgb(var(--ax-color-danger));
82
+ }
83
+ }
84
+ }
85
+ input:focus ~ .ax-switch-slider {
86
+ @apply ax-ring-danger-500;
87
+ }
88
+ }
89
+ &.ax-warning {
90
+ ax-loading {
91
+ @apply ax-stroke-warning-500;
92
+ }
93
+ > input {
94
+ &:checked {
95
+ & + .ax-switch-slider {
96
+ background-color: rgb(var(--ax-color-warning));
97
+ }
98
+ }
99
+ }
100
+ input:focus ~ .ax-switch-slider {
101
+ @apply ax-ring-warning-500;
102
+ }
103
+ }
104
+ &.ax-info {
105
+ ax-loading {
106
+ @apply ax-stroke-info-500;
107
+ }
108
+ > input {
109
+ &:checked {
110
+ & + .ax-switch-slider {
111
+ background-color: rgb(var(--ax-color-info));
112
+ }
113
+ }
114
+ }
115
+ input:focus ~ .ax-switch-slider {
116
+ @apply ax-ring-info-500;
117
+ }
118
+ }
119
+ &.ax-light {
120
+ ax-loading {
121
+ @apply ax-stroke-light-500;
122
+ }
123
+ > input {
124
+ &:checked {
125
+ & + .ax-switch-slider {
126
+ background-color: rgb(var(--ax-color-light));
127
+ }
128
+ }
129
+ }
130
+ input:focus ~ .ax-switch-slider {
131
+ @apply ax-ring-light-500;
132
+ }
133
+ }
134
+ &.ax-dark {
135
+ ax-loading {
136
+ @apply ax-stroke-dark-500;
137
+ }
138
+ > input {
139
+ &:checked {
140
+ & + .ax-switch-slider {
141
+ background-color: rgb(var(--ax-color-dark));
142
+ }
143
+ }
144
+ }
145
+ input:focus ~ .ax-switch-slider {
146
+ @apply ax-ring-dark-500;
147
+ }
148
+ }
149
+ &.ax-state-loading {
150
+ label {
151
+ .ax-switch-slider {
152
+ &::before {
153
+ background-image: url("../images/fill-loading.svg");
154
+ background-color: transparent;
155
+ background-size: cover;
156
+ @apply ax-absolute;
157
+ content: "";
158
+ width: 35%;
159
+ padding-bottom: 35%;
160
+ transform: translate(0, -50%);
161
+
162
+ left: 7%;
163
+ top: 18%;
164
+ animation: rotation 0.6s infinite linear;
165
+
166
+ }
167
+ @keyframes rotation {
168
+ from {
169
+ transform: rotate(0deg);
170
+ }
171
+ to {
172
+ transform: rotate(359deg);
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ &.ax-state-disabled {
179
+ @apply ax-opacity-60;
180
+ }
181
+ &.ax-state-readonly {
182
+ @apply ax-opacity-60;
183
+ }
184
+ }
185
+ }