@acorex/styles 5.0.42 → 5.0.43

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.42",
3
+ "version": "5.0.43",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  opacity: 1;
12
12
  }
13
13
  .ax-alert-icon {
14
- @apply ax-text-xl ax-self-baseline;
14
+ @apply ax-text-xl ax-self-baseline ax-me-2;
15
15
 
16
16
  }
17
17
  .ax-alert-body {
@@ -31,7 +31,7 @@
31
31
 
32
32
  input[type="checkbox"] {
33
33
  @apply ax-w-4 ax-h-4 ax-border-solid ax-border ax-border-light-300 ax-rounded ax-bg-white ax-text-primary-500 ax-m-0 ax-outline-none ax-align-middle ax-appearance-none;
34
- @include control-dark("editor");
34
+ @include control-states("editor");
35
35
 
36
36
  &:checked,
37
37
  &:indeterminate {
@@ -1,7 +1,7 @@
1
1
  @layer components {
2
2
  .ax-dialog {
3
3
  @apply ax-grid ax-grid-cols-12 ax-gap-4 ax-px-6 ax-py-5 ax-relative ax-bg-white ax-shadow-md ax-border ax-border-solid ax-border-light-300 ax-rounded-lg ax-outline-none ax-overflow-hidden;
4
- @include control-dark('surface');
4
+ @include control-states('surface');
5
5
  @screen sm {
6
6
  width: 98vw;
7
7
  }
@@ -5,6 +5,9 @@
5
5
 
6
6
  .ax-dropdown-content {
7
7
  @apply ax-flex ax-flex-auto ax-text-sm ax-overflow-y-hidden ax-overscroll-x-auto;
8
+ &.ax-state-disabled {
9
+ @include control-states("editor-disabled");
10
+ }
8
11
  }
9
12
  }
10
13
 
@@ -17,8 +20,15 @@
17
20
  }
18
21
 
19
22
  .ax-overlay-pane {
20
- @apply ax-bg-white ax-border ax-rounded ax-border-light-200;
21
- @include control-dark("surface");
23
+ @apply ax-bg-white ax-border ax-rounded ax-border-light-300;
24
+ @include control-states("surface");
25
+
26
+
27
+ // &:focus,
28
+ // &:focus-within
29
+ // {
30
+ // @apply ax-ring-2 ax-ring-primary-500 ax-ring-opacity-50 ax-border-transparent;
31
+ // }
22
32
 
23
33
  &.ax-overlay-center {
24
34
  @apply ax-h-fit;
@@ -3,7 +3,7 @@
3
3
  height: calc(var(--ax-base-size) * var(--ax-base-ratio));
4
4
  line-height: calc(var(--ax-base-size) * var(--ax-base-ratio));
5
5
  @apply ax-flex ax-rounded ax-bg-white ax-shadow-sm ax-border ax-border-solid ax-border-light-300;
6
- @include control-dark("editor");
6
+ @include control-states("editor");
7
7
 
8
8
  @screen md {
9
9
  @apply ax-text-sm;
@@ -17,6 +17,13 @@
17
17
  @apply ax-px-2;
18
18
  }
19
19
 
20
+ .ax-placeholder
21
+ {
22
+ @apply ax-flex ax-mx-2;
23
+ --tw-placeholder-opacity: 1;
24
+ color: rgb(var(--ax-color-placeholder) / var(--tw-placeholder-opacity));
25
+ }
26
+
20
27
  &:first-child {
21
28
  }
22
29
 
@@ -36,7 +43,16 @@
36
43
  box-shadow: none;
37
44
  }
38
45
  }
46
+ .ax-textarea{
47
+ width: 1%;
48
+ text-align: inherit;
49
+ font: inherit;
50
+ @apply ax-w-full ax-flex-1 ax-bg-transparent ax-border-none ax-p-2.5 ax-rounded;
39
51
 
52
+ &:focus {
53
+ box-shadow: none;
54
+ }
55
+ }
40
56
  ax-prefix {
41
57
  *,
42
58
  ax-button,
@@ -86,7 +102,7 @@
86
102
  }
87
103
 
88
104
  &.ax-state-disabled {
89
- @include control-dark("editor-disabled");
105
+ @include control-states("editor-disabled");
90
106
  }
91
107
 
92
108
  &.ax-state-error {
@@ -113,17 +129,11 @@
113
129
  }
114
130
  }
115
131
 
116
- // &.ax-sm {
117
- // height: calc((var(--ax-base-size) * var(--ax-base-ratio)) - var(--ax-base-size)) !important;
118
- // .ax-input {
119
- // @apply ax-text-xs;
120
- // }
121
- // }
122
- // &.ax-lg {
123
- // height: calc((var(--ax-base-size) * var(--ax-base-ratio)) + var(--ax-base-size)) !important;
124
- // .ax-input {
125
- // @apply ax-text-lg;
126
- // }
127
- // }
132
+ ax-button {
133
+ &.ax-state-disabled {
134
+ @apply ax-bg-light-100 ax-text-light-fore ax-opacity-100 #{!important};
135
+ }
136
+ }
128
137
  }
138
+
129
139
  }
@@ -1,12 +1,14 @@
1
1
  @layer components {
2
- .ax-input {
2
+ .ax-input,
3
+ .ax-textarea {
3
4
  @apply ax-outline-none ax-p-0;
4
- font-size:inherit;
5
+ font-size: inherit;
5
6
  &:focus {
6
7
  @apply ax-ring-2 ax-ring-primary-500 ax-ring-opacity-100 ax-border-transparent ax-rounded-md;
7
8
  }
8
9
  &.ax-state-disabled {
9
- @include control-dark("editor-disabled");
10
+ @include control-states("editor-disabled");
10
11
  }
11
12
  }
12
- }
13
+
14
+ }
@@ -20,24 +20,21 @@
20
20
 
21
21
  .ax-list-item {
22
22
  height: calc(var(--ax-base-size) * var(--ax-base-ratio)) !important;
23
- @apply ax-text-sm ax-flex ax-items-center ax-px-3;
23
+ @apply ax-text-sm ax-flex ax-items-center ax-px-3 ax-text-light-700;
24
24
 
25
25
  &:focus,
26
26
  &:focus-visible {
27
27
  @apply ax-outline-none;
28
28
  }
29
-
30
- &:hover {
31
- @apply ax-bg-light-100 ax-text-light-fore dark:ax-bg-white/[0.09] dark:ax-text-light-50;
32
- }
29
+
33
30
  &.ax-state-selected {
34
- @apply ax-text-primary-500 ax-font-medium dark:ax-text-primary-50;
31
+ @apply ax-bg-light-200 ax-text-light-900 ax-font-medium dark:ax-text-primary-50;
35
32
  }
36
33
 
37
34
  &:not(.ax-check-box)
38
35
  {
39
36
  &.ax-state-selected {
40
- @apply ax-bg-primary-50 dark:ax-bg-white/[0.16];
37
+ @apply ax-bg-light-200 ax-text-light-900 dark:ax-bg-white/[0.16];
41
38
  }
42
39
  }
43
40
 
@@ -46,9 +43,10 @@
46
43
  }
47
44
 
48
45
  &:focus,
46
+ &:hover,
49
47
  &.ax-state-focus {
50
48
  &:not(.ax-state-selected) {
51
- @apply ax-outline-none ax-bg-primary-50 ax-text-primary-500 dark:ax-bg-white/[0.16] dark:ax-text-white;
49
+ @apply ax-outline-none ax-bg-light-100 dark:ax-bg-white/[0.16] dark:ax-text-white;
52
50
  }
53
51
  }
54
52
  }
@@ -0,0 +1,43 @@
1
+ @layer components {
2
+
3
+ ax-menu,
4
+ .ax-menu {
5
+ >ul {
6
+ @apply ax-border ax-border-solid ax-border-light-200 ax-flex ax-flex-col ax-text-sm;
7
+
8
+ li {
9
+ @apply ax-cursor-pointer ax-p-1;
10
+
11
+ a {
12
+ @apply ax-no-underline ax-flex ax-justify-between ax-items-center ax-p-2 ax-animate-fadeIn ax-animate-faster;
13
+
14
+ &.active {
15
+ @apply ax-bg-primary-100 ax-text-primary-500;
16
+ }
17
+
18
+ .active-icon {
19
+ @apply ax--rotate-90
20
+ }
21
+
22
+ &:hover {
23
+ @apply ax-text-primary-500
24
+ }
25
+
26
+ ax-icon {
27
+ @apply ax--rotate-180
28
+ }
29
+ }
30
+
31
+ ul {
32
+ @apply ax-ps-3;
33
+
34
+ }
35
+ }
36
+ }
37
+
38
+ }
39
+
40
+
41
+
42
+
43
+ }
@@ -22,7 +22,7 @@
22
22
 
23
23
  .ax-popup {
24
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");
25
+ @include control-states("surface");
26
26
 
27
27
  .ax-popup-header {
28
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;
@@ -4,7 +4,7 @@
4
4
 
5
5
  .ax-radio {
6
6
  @apply ax-w-4 ax-h-4 ax-border-solid ax-border ax-border-light-300 ax-rounded-full ax-bg-white ax-text-primary-500 ax-m-0 ax-outline-none ax-align-middle ax-appearance-none;
7
- @include control-dark('editor');
7
+ @include control-states('editor');
8
8
 
9
9
  &:checked {
10
10
  @apply ax-border-primary-500 ax-bg-no-repeat ax-bg-current ax-bg-contain;
@@ -1,5 +1,4 @@
1
1
  @layer utilities {
2
- $shine-color: #eeeeee;
3
2
  .ax-skeleton {
4
3
  @apply ax-relative ax-overflow-hidden ax-bg-light-200 dark:ax-bg-light-700;
5
4
  &.ax-skeleton-animate {
@@ -7,7 +6,7 @@
7
6
  content: "";
8
7
  @apply ax-block ax-absolute ax-top-0 ax-h-full ax-w-52;
9
8
  left: -200px;
10
- background: linear-gradient(to right, transparent 0%, $shine-color 50%, transparent 100%);
9
+ background: linear-gradient(to right, transparent 0%, rgb(var(--ax-color-light-300)) 50%, transparent 100%);
11
10
  animation: load 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
12
11
  }
13
12
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  .ax-switch-slider {
12
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");
13
+ @include control-states("editor");
14
14
  -webkit-transition: 0.4s;
15
15
  transition: 0.4s;
16
16
  &::before {
@@ -1,20 +1,53 @@
1
- .ax-table {
2
- @apply ax-w-full;
3
- table {
4
- border-collapse: collapse;
5
- @apply ax-w-full;
6
- }
7
- td,
8
- th {
9
- @apply ax-p-4 ax-border ax-border-solid ax-border;
10
- text-align: inherit;
11
- }
12
- &.ax-alternative {
13
- tr {
14
- @apply ax-bg-white;
15
- &:nth-child(even) {
16
- @apply ax-bg-light-50;
1
+ @layer components {
2
+ .ax-table {
3
+ @apply ax-w-full ax-rounded-md ax-border-collapse ax-border ax-border-light-200 dark:ax-border-dark-400;
4
+ th {
5
+ @apply ax-py-3 ax-px-6 ax-bg-light-200 dark:ax-bg-dark-400/50 ax-text-start ax-font-normal ax-text-sm;
6
+ }
7
+
8
+ tr,
9
+ th,
10
+ td {
11
+ @apply ax-border-b ax-border-light-200 dark:ax-border-dark-400 ax-px-6 ax-py-4 ax-text-sm;
12
+ }
13
+ &.ax-table-alternate {
14
+ tr {
15
+ &:nth-child(even) {
16
+ @apply ax-bg-light-100 dark:ax-bg-dark-400/20;
17
+ }
18
+ }
19
+ }
20
+ &.ax-table-responsive {
21
+ @media screen and (max-width: 640px) {
22
+ @apply ax-border-none #{!important};
23
+ thead tr {
24
+ @apply ax-absolute ax-top-[-9999em] ax-left-[-9999em];
25
+ }
26
+
27
+ tr {
28
+ @apply ax-block ax-border ax-border-light-200 dark:ax-border-dark-400 ax-p-0;
29
+ }
30
+
31
+ tr + tr {
32
+ @apply ax-mt-6;
33
+ }
34
+ /* Get table cells to act like rows */
35
+
36
+ td {
37
+ padding-inline-start: 50%;
38
+ @apply ax-relative ax-flex ax-justify-start ax-items-center ax-border-b ax-border-light-200 dark:ax-border-dark-400 last:ax-border-0;
39
+ &:before {
40
+ @apply ax-font-normal ax-text-sm ax-inline-block ax-w-full ax-relative ax-z-10 ax-truncate;
41
+ content: attr(data-label);
42
+ margin-left: -100%;
43
+ }
44
+
45
+ &:after {
46
+ @apply ax-bg-light-200 ax-absolute ax-start-0 ax-top-0 ax-z-0 ax-w-[45%] ax-h-full ax-border-b ax-border-white;
47
+ content: "";
48
+ }
49
+ }
17
50
  }
18
51
  }
19
52
  }
20
- }
53
+ }
@@ -46,11 +46,11 @@
46
46
  &.ax-horizontal {
47
47
  &.ax-look-default {
48
48
  @apply ax-border ax-border-solid ax-border-light-300 ax-shadow-sm ax-rounded;
49
- @include control-dark("editor");
49
+ @include control-states("editor");
50
50
 
51
51
  ax-tab-item {
52
52
  @apply ax-bg-white ax-border-r ax-border-b-2 ax-border-solid ax-border-light-300 dark:ax-text-light-200;
53
- @include control-dark("editor");
53
+ @include control-states("editor");
54
54
 
55
55
  border-bottom-color: transparent !important;
56
56
 
@@ -151,7 +151,7 @@
151
151
 
152
152
  &.ax-look-default {
153
153
  @apply ax-border ax-border-solid ax-border-light-300 ax-shadow-sm ax-rounded;
154
- @include control-dark("editor");
154
+ @include control-states("editor");
155
155
 
156
156
  ax-tab-item {
157
157
  @apply ax-bg-white ax-border-s ax-border-solid ax-border-light-300 ax-border-b-0 dark:ax-text-light-200 ax-mb-1;
@@ -0,0 +1,41 @@
1
+ @layer components {
2
+ ax-textarea,
3
+ .ax-textarea {
4
+ min-height: calc(var(--ax-base-size) * var(--ax-base-ratio));
5
+ @apply ax-relative ax-flex ax-flex-col ax-rounded ax-bg-white ax-shadow-sm ax-border ax-border-solid ax-border-light-300 ax-overflow-hidden ax-w-full;
6
+ &:focus-within {
7
+ @apply ax-ring-2 ax-ring-primary-500 ax-ring-opacity-100 ax-border-transparent;
8
+ }
9
+ textarea {
10
+ min-height: calc(var(--ax-base-size) * var(--ax-base-ratio)) !important;
11
+ height: fit-content;
12
+ @apply ax-w-full ax-text-sm ax-p-1.5;
13
+ @include control-states("editor");
14
+ &:has(ax-prefix) {
15
+ bacground-color: #f00 !important;
16
+ }
17
+ &:focus {
18
+ @apply ax-outline-transparent;
19
+ }
20
+ }
21
+ > ax-prefix,
22
+ > ax-suffix {
23
+ @apply ax-mb-2 ax-p-1.5 ax-absolute;
24
+ @include control-states("editor");
25
+ ax-button {
26
+ @apply ax-text-sm;
27
+ --ax-base-size: 5px;
28
+ }
29
+ }
30
+ > ax-prefix {
31
+ @apply ax-top-0 ax-end-0;
32
+ }
33
+ > ax-suffix {
34
+ @apply ax-bottom-0 ax-end-0;
35
+ }
36
+
37
+ &.ax-state-disabled {
38
+ @include control-states("editor-disabled");
39
+ }
40
+ }
41
+ }
@@ -1,7 +1,7 @@
1
1
  @layer components {
2
2
  .ax-toast {
3
3
  @apply ax-grid ax-grid-cols-12 ax-gap-4 ax-relative ax-bg-white ax-shadow-md ax-border-light-300 ax-border ax-border-solid ax-rounded-lg ax-px-4 ax-py-2 ax-overflow-hidden ax-items-center;
4
- @include control-dark('surface');
4
+ @include control-states('surface');
5
5
  @screen sm {
6
6
  width: 98vw;
7
7
  }
@@ -0,0 +1,23 @@
1
+ @layer components {
2
+ ax-tree-view,
3
+ .ax-tree-view {
4
+ > ul {
5
+ li {
6
+ @apply ax-text-sm ax-relative;
7
+ // &::before {
8
+ // content: "";
9
+ // height: 1px;
10
+ // transform: translateY(-50%);
11
+ // @apply ax-absolute ax-start-8 ax-top-1/2 ax-bg-light-200 ax-w-8;
12
+ // }
13
+
14
+ span {
15
+ @apply ax-flex ax-items-center ax-my-1;
16
+ }
17
+ ul {
18
+ @apply ax-ps-8 ax-border-s ax-border-light-200 dark:ax-border-dark-400;
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
@@ -17,6 +17,7 @@
17
17
  @import "./list";
18
18
  @import "./numberbox";
19
19
  @import "./loading";
20
+ @import "./menu";
20
21
  @import "./popup";
21
22
  @import "./radio";
22
23
  @import "./range-slider";
@@ -27,5 +28,7 @@
27
28
  @import "./switch";
28
29
  @import "./table";
29
30
  @import "./tabs";
31
+ @import "./textarea";
30
32
  @import "./toast";
31
- @import "./tooltip";
33
+ @import "./tooltip";
34
+ @import "./treeview";
@@ -37,14 +37,14 @@
37
37
  }
38
38
  }
39
39
 
40
- @mixin control-dark($type) {
40
+ @mixin control-states($type) {
41
41
 
42
42
  @if($type == "editor"){
43
43
  @apply dark:ax-border-white/[0.06] dark:ax-bg-white/[0.06] dark:ax-backdrop-blur-3xl;
44
44
  }
45
-
46
45
  @if($type == "editor-disabled"){
47
46
  @apply ax-bg-light-100 ax-text-light-fore dark:ax-border-white/[0.06] dark:ax-bg-white/[0.-04] dark:ax-text-opacity-60 ax-cursor-not-allowed;
47
+
48
48
  }
49
49
  @if($type == "surface"){
50
50
  @apply dark:ax-bg-default-background dark:ax-border-white/[0.16] dark:ax-shadow-md;
@@ -52,3 +52,4 @@
52
52
 
53
53
 
54
54
  }
55
+