vanilla-jui 1.7.31 → 1.7.33

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 (44) hide show
  1. package/dist/index.d.ts +24 -4
  2. package/dist/index.js +1 -1
  3. package/dist/index.umd.js +1 -1
  4. package/dist/style.css +1 -1
  5. package/package.json +1 -1
  6. package/src/components/accordion.ts +22 -8
  7. package/src/components/flow.ts +1 -1
  8. package/src/components/form.ts +1 -1
  9. package/src/components/modal.ts +1 -1
  10. package/src/components/offcanvas.ts +2 -2
  11. package/src/components/pagination.ts +5 -5
  12. package/src/components/tabs.ts +132 -16
  13. package/src/css/animation.css +7 -3
  14. package/src/css/card.css +10 -10
  15. package/src/css/font.css +3 -6
  16. package/src/css/icon.css +3 -20
  17. package/src/css/layout.css +11 -18
  18. package/src/css/status.css +39 -3
  19. package/src/css/themes/default/accordion.css +13 -45
  20. package/src/css/themes/default/avatar.css +2 -3
  21. package/src/css/themes/default/badge.css +14 -22
  22. package/src/css/themes/default/breadcrumb.css +11 -12
  23. package/src/css/themes/default/button.css +85 -162
  24. package/src/css/themes/default/editor.css +36 -36
  25. package/src/css/themes/default/flow.css +4 -4
  26. package/src/css/themes/default/form.css +110 -217
  27. package/src/css/themes/default/loading.css +48 -63
  28. package/src/css/themes/default/menu.css +17 -17
  29. package/src/css/themes/default/modal.css +9 -9
  30. package/src/css/themes/default/offcanvas.css +3 -3
  31. package/src/css/themes/default/swiper.css +18 -18
  32. package/src/css/themes/default/tabs.css +38 -24
  33. package/src/css/themes/default/theme-palette.css +22 -18
  34. package/src/css/themes/default/tip.css +24 -13
  35. package/src/css/themes/default/toast.css +66 -46
  36. package/src/css/themes/default/toolbar.css +2 -2
  37. package/src/css/themes/default/tooltip.css +2 -3
  38. package/src/css/tokens.css +89 -59
  39. package/src/css/tokens_/345/211/257/346/234/254.css +4 -4
  40. package/src/icons/index.ts +9 -7
  41. package/src/locales/index.ts +3 -1
  42. package/src/primitives/theme.ts +7 -10
  43. package/src/primitives/toast.ts +191 -107
  44. package/src/utilities/browser.ts +1 -1
@@ -9,16 +9,17 @@
9
9
  * - hidden
10
10
  */
11
11
  @layer status {
12
+
12
13
  /* sad mode */
13
14
  .is-sad {
14
15
  filter: grayscale(100%);
15
16
  }
16
17
 
17
18
  /* readonly */
18
- [readonly] {
19
+ /* [readonly] {
19
20
  opacity: var(--opacity-readonly);
20
21
  cursor: default;
21
- }
22
+ } */
22
23
 
23
24
  /* data-action */
24
25
  [data-action] {
@@ -56,4 +57,39 @@
56
57
  [hidden] {
57
58
  display: none;
58
59
  }
59
- }
60
+
61
+ /* flex direction */
62
+ .is-horizontal {
63
+ --flex-direction: row;
64
+ }
65
+
66
+ .is-vertical {
67
+ --flex-direction: column;
68
+ }
69
+
70
+ /* element */
71
+ .el-text {
72
+ position: relative;
73
+ }
74
+
75
+ /* height size */
76
+ .is-xs {
77
+ --el-height: var(--el-height-xs);
78
+ }
79
+
80
+ .is-sm {
81
+ --el-height: var(--el-height-sm);
82
+ }
83
+
84
+ .is-md {
85
+ --el-height: var(--el-height-md);
86
+ }
87
+
88
+ .is-lg {
89
+ --el-height: var(--el-height-lg);
90
+ }
91
+
92
+ .is-xl {
93
+ --el-height: var(--el-height-xl);
94
+ }
95
+ }
@@ -1,18 +1,14 @@
1
1
  @layer components {
2
2
  .j-accordion {
3
- --accordion-border: 1px solid var(--ui-border-subtle);
3
+ --accordion-border: 1px solid var(--ui-border-soft);
4
4
  --accordion-icon-transform: rotate(0deg);
5
5
 
6
6
  display: flex;
7
- flex-direction: column;
8
- }
9
-
10
- .j-accordion[data-direction='horizontal'] {
11
- flex-direction: row;
7
+ flex-direction: var(--flex-direction, column);
12
8
  }
13
9
 
14
10
  .j-accordion .accordion-header {
15
- padding: var(--s2) var(--s3);
11
+ padding: 8px 12px;
16
12
  margin: 0;
17
13
  font-weight: var(--font-medium);
18
14
  font-size: var(--font-size-md);
@@ -24,14 +20,13 @@
24
20
  user-select: none;
25
21
  }
26
22
 
27
- .j-accordion[data-direction='horizontal'] .accordion-header {
28
- gap: var(--space);
23
+ .j-accordion.is-horizontal .accordion-header {
24
+ gap: 4px;
29
25
  border-bottom: 0;
30
26
  border-right: var(--accordion-border);
31
27
  }
32
28
 
33
- .j-accordion[data-direction='horizontal']
34
- .accordion-header[aria-expanded='true'] {
29
+ .j-accordion.is-horizontal .accordion-header[aria-expanded='true'] {
35
30
  border-right: 0;
36
31
  }
37
32
 
@@ -39,8 +34,7 @@
39
34
  background: var(--ui-bg-subtle);
40
35
  }
41
36
 
42
- .j-accordion[data-direction='horizontal']
43
- .accordion-header[aria-expanded='false']:nth-last-child(2) {
37
+ .j-accordion.is-horizontal .accordion-header[aria-expanded='false']:nth-last-child(2) {
44
38
  border-right: 0;
45
39
  }
46
40
 
@@ -49,31 +43,8 @@
49
43
  text-align: left;
50
44
  }
51
45
 
52
- .j-accordion .accordion-header .header-arrow {
53
- transform: var(--accordion-icon-transform);
54
-
55
- display: flex;
56
- justify-content: center;
57
- align-items: center;
58
- transition: transform 0.3s ease-out;
59
- }
60
-
61
46
  .j-accordion .accordion-header .header-arrow svg {
62
- width: var(--font-size-lg);
63
- }
64
-
65
- .j-accordion[data-direction='horizontal'] .accordion-header .header-arrow {
66
- --accordion-icon-transform: rotate(-90deg);
67
- }
68
-
69
- .j-accordion .accordion-header[aria-expanded='true'] .header-arrow {
70
- --accordion-icon-transform: rotate(180deg);
71
- }
72
-
73
- .j-accordion[data-direction='horizontal']
74
- .accordion-header[aria-expanded='true']
75
- .header-arrow {
76
- --accordion-icon-transform: rotate(90deg);
47
+ width: var(--accordion-icon-size, var(--font-size-md));
77
48
  }
78
49
 
79
50
  .j-accordion .accordion-panel {
@@ -88,8 +59,7 @@
88
59
  min-height: 2rem;
89
60
  }
90
61
 
91
- .j-accordion[data-direction='horizontal']
92
- .accordion-panel[aria-hidden='false'] {
62
+ .j-accordion.is-horizontal .accordion-panel[aria-hidden='false'] {
93
63
  border-right: var(--accordion-border);
94
64
  border-bottom: 0;
95
65
  flex: 1;
@@ -102,24 +72,22 @@
102
72
  border-bottom: 0;
103
73
  }
104
74
 
105
- .j-accordion[data-direction='horizontal'] .accordion-panel:last-child {
75
+ .j-accordion.is-horizontal .accordion-panel:last-child {
106
76
  border-right: 0;
107
77
  }
108
78
 
109
79
  .j-accordion .accordion-panel .panel-content {
110
80
  margin: 0;
111
- padding: 0 var(--s3) var(--s2);
81
+ padding: 0 12px 8px;
112
82
 
113
83
  position: relative;
114
84
  min-height: inherit;
115
85
  }
116
86
 
117
- .j-accordion[data-direction='horizontal']
118
- .accordion-panel[aria-hidden='false']
119
- .panel-content {
87
+ .j-accordion.is-horizontal .accordion-panel[aria-hidden='false'] .panel-content {
120
88
  display: flex;
121
89
  flex-direction: column;
122
90
  justify-content: center;
123
91
  height: 100%;
124
92
  }
125
- }
93
+ }
@@ -77,8 +77,7 @@
77
77
  }
78
78
 
79
79
  .j-avatar-group .j-avatar:not(:first-child) {
80
- /* margin-inline-start: calc(var(--s3) * -1); */
81
- margin-left: calc(var(--s3) * -1);
80
+ margin-left: -12px;
82
81
  }
83
82
 
84
83
  .j-avatar-group .j-avatar:last-child {
@@ -86,4 +85,4 @@
86
85
  --avatar-bg: var(--ui-bg);
87
86
  --avatar-box-shadow: var(--shadow-sm);
88
87
  }
89
- }
88
+ }
@@ -1,24 +1,15 @@
1
1
  @layer components {
2
2
  .j-badge {
3
- --badge-padding: 0 var(--s1d5);
4
- --badge-min-width: 1.25rem;
5
- --badge-height: 1.25rem;
6
- --badge-font-size: var(--font-size-sm);
7
- --badge-border-color: var(--ui-border);
8
- --badge-fg: var(--ui-fg);
9
- --badge-bg: var(--ui-bg);
10
- --badge-gap: 4px;
11
-
12
- gap: var(--badge-gap);
13
- padding: var(--badge-padding);
14
- min-width: var(--badge-min-width);
15
- height: var(--badge-height);
16
- font-size: var(--badge-font-size);
3
+ gap: var(--badge-gap, 4px);
4
+ padding: var(--badge-padding, 0 6px);
5
+ min-width: var(--badge-min-width, 1.25rem);
6
+ height: var(--badge-height, 1.25rem);
7
+ font-size: var(--badge-font-size, var(--font-size-sm));
17
8
  font-weight: var(--font-medium);
18
9
  border-radius: 48px;
19
- border: 1px solid var(--badge-border-color);
20
- color: var(--badge-fg);
21
- background-color: var(--badge-bg);
10
+ border: 1px solid var(--badge-border-color, var(--ui-border));
11
+ color: var(--badge-fg, var(--ui-fg));
12
+ background-color: var(--badge-bg, var(--ui-bg));
22
13
  box-shadow: none;
23
14
 
24
15
  display: inline-flex;
@@ -36,7 +27,7 @@
36
27
  }
37
28
 
38
29
  .j-badge.is-sm {
39
- --badge-padding: 0 var(--space);
30
+ --badge-padding: 0 4px;
40
31
  --badge-min-width: 1rem;
41
32
  --badge-height: 1rem;
42
33
  --badge-font-size: var(--font-size-xs);
@@ -46,6 +37,7 @@
46
37
  .j-badge.is-reverse {
47
38
  --badge-fg: var(--ui-bg);
48
39
  --badge-bg: var(--ui-fg);
40
+ --badge-border-color: var(--ui-fg);
49
41
  }
50
42
 
51
43
  .j-badge.is-solid {
@@ -69,24 +61,24 @@
69
61
  .j-badge.is-info {
70
62
  --badge-fg: var(--state-info-text);
71
63
  --badge-bg: var(--state-info-soft);
72
- --badge-border-color: var(--state-info-border);
64
+ --badge-border-color: var(--state-info-muted);
73
65
  }
74
66
 
75
67
  .j-badge.is-success {
76
68
  --badge-fg: var(--state-success-text);
77
69
  --badge-bg: var(--state-success-soft);
78
- --badge-border-color: var(--state-success-border);
70
+ --badge-border-color: var(--state-success-muted);
79
71
  }
80
72
 
81
73
  .j-badge.is-warning {
82
74
  --badge-fg: var(--state-warning-text);
83
75
  --badge-bg: var(--state-warning-soft);
84
- --badge-border-color: var(--state-warning-border);
76
+ --badge-border-color: var(--state-warning-muted);
85
77
  }
86
78
 
87
79
  .j-badge.is-error {
88
80
  --badge-fg: var(--state-error-text);
89
81
  --badge-bg: var(--state-error-subtle);
90
- --badge-border-color: var(--state-error-subtle);
82
+ --badge-border-color: var(--state-error-muted);
91
83
  }
92
84
  }
@@ -11,8 +11,8 @@
11
11
  user-select: none;
12
12
  }
13
13
 
14
- .j-breadcrumb > ol,
15
- .j-breadcrumb > ul {
14
+ .j-breadcrumb>ol,
15
+ .j-breadcrumb>ul {
16
16
  display: flex;
17
17
  flex-wrap: wrap;
18
18
  justify-content: flex-start;
@@ -21,26 +21,26 @@
21
21
  padding: 0;
22
22
  }
23
23
 
24
- .j-breadcrumb > ol li,
25
- .j-breadcrumb > ul li {
24
+ .j-breadcrumb>ol li,
25
+ .j-breadcrumb>ul li {
26
26
  display: flex;
27
27
  align-items: center;
28
28
  justify-content: center;
29
29
  }
30
30
 
31
- .j-breadcrumb li + li::before {
31
+ .j-breadcrumb li+li::before {
32
32
  content: '/';
33
33
  }
34
34
 
35
- .j-breadcrumb.is-dot li + li::before {
35
+ .j-breadcrumb.is-dot li+li::before {
36
36
  content: '•';
37
37
  }
38
38
 
39
- .j-breadcrumb.is-arrow li + li::before {
39
+ .j-breadcrumb.is-arrow li+li::before {
40
40
  content: '>';
41
41
  }
42
42
 
43
- .j-breadcrumb.is-dash li + li::before {
43
+ .j-breadcrumb.is-dash li+li::before {
44
44
  content: '–';
45
45
  }
46
46
 
@@ -60,7 +60,7 @@
60
60
  }
61
61
 
62
62
  .j-breadcrumb a {
63
- gap: var(--space);
63
+ gap: 4px;
64
64
  color: var(--breadcrumb-link-fg);
65
65
  padding: 0 var(--s2);
66
66
 
@@ -80,7 +80,7 @@
80
80
  justify-content: center;
81
81
  }
82
82
 
83
- .j-breadcrumb li + li::before {
83
+ .j-breadcrumb li+li::before {
84
84
  color: var(--ui-fg-soft);
85
85
  }
86
86
 
@@ -92,7 +92,6 @@
92
92
  }
93
93
 
94
94
  .j-breadcrumb li:first-child a {
95
- /* padding-inline-start: 0; */
96
95
  padding-left: 0;
97
96
  }
98
97
 
@@ -105,4 +104,4 @@
105
104
  .j-breadcrumb.is-right ol {
106
105
  justify-content: flex-end;
107
106
  }
108
- }
107
+ }