@phuong-tran-redoc/document-engine-angular 0.0.12 → 0.0.14
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/README.md +3 -1
- package/fesm2022/phuong-tran-redoc-document-engine-angular.mjs +6264 -4
- package/fesm2022/phuong-tran-redoc-document-engine-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/src/lib/styles/button.scss +214 -0
- package/src/lib/styles/checkbox.scss +67 -0
- package/src/lib/styles/color-picker.scss +109 -0
- package/src/lib/styles/document-editor.scss +19 -0
- package/src/lib/styles/error-message.scss +7 -0
- package/src/lib/styles/footer.scss +40 -0
- package/src/lib/styles/icon.scss +12 -0
- package/src/lib/styles/index.scss +34 -0
- package/src/lib/styles/input.scss +62 -0
- package/src/lib/styles/label.scss +23 -0
- package/src/lib/styles/page-break.scss +35 -0
- package/src/lib/styles/select.scss +144 -0
- package/src/lib/styles/toggle-button.scss +53 -0
- package/src/lib/styles/toolbar.scss +58 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
.document-engine-select {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
min-width: 3.5rem;
|
|
5
|
+
|
|
6
|
+
&__trigger {
|
|
7
|
+
appearance: none;
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
gap: 0.25rem;
|
|
12
|
+
// min-width: 4rem;
|
|
13
|
+
// height: 2rem;
|
|
14
|
+
padding: 0.375rem 0.5rem;
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
// border: 1px solid var(--border, #e5e7eb);
|
|
17
|
+
border-radius: 0.375rem;
|
|
18
|
+
font-size: 0.875rem;
|
|
19
|
+
color: var(--foreground, #000);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: all 0.15s ease;
|
|
22
|
+
|
|
23
|
+
&:hover:not(&--disabled) {
|
|
24
|
+
background-color: var(--accent, #f3f4f6);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:focus {
|
|
28
|
+
outline: none;
|
|
29
|
+
border-color: var(--ring, #3b82f6);
|
|
30
|
+
box-shadow: 0 0 0 1px var(--ring, #3b82f6);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--open {
|
|
34
|
+
border-color: var(--ring, #3b82f6);
|
|
35
|
+
box-shadow: 0 0 0 1px var(--ring, #3b82f6);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--disabled {
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__value {
|
|
45
|
+
flex: 1;
|
|
46
|
+
text-align: left;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
// justify-content: center;
|
|
53
|
+
min-height: 20px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&__icon {
|
|
57
|
+
width: 1rem;
|
|
58
|
+
height: 1rem;
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
color: var(--muted-foreground, #9ca3af);
|
|
61
|
+
transition: transform 0.15s ease;
|
|
62
|
+
|
|
63
|
+
.document-engine-select__trigger--open & {
|
|
64
|
+
transform: rotate(180deg);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__dropdown {
|
|
69
|
+
position: absolute;
|
|
70
|
+
z-index: 1000;
|
|
71
|
+
min-width: 3.5rem;
|
|
72
|
+
max-height: 20rem;
|
|
73
|
+
overflow: auto;
|
|
74
|
+
background-color: var(--card, #fff);
|
|
75
|
+
border: 1px solid var(--border, #e5e7eb);
|
|
76
|
+
border-radius: 0.375rem;
|
|
77
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
78
|
+
animation: document-engine-select-dropdown-fade-in 0.15s ease;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// &__options {
|
|
82
|
+
// padding: 0.25rem;
|
|
83
|
+
// width: max-content;
|
|
84
|
+
// }
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Option styles
|
|
88
|
+
.document-engine-select-option {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 0.5rem;
|
|
92
|
+
|
|
93
|
+
width: 100%;
|
|
94
|
+
padding: 0.5rem 0.75rem;
|
|
95
|
+
background-color: transparent;
|
|
96
|
+
border: none;
|
|
97
|
+
border-radius: 0.25rem;
|
|
98
|
+
font-size: 0.875rem;
|
|
99
|
+
color: var(--foreground, #000);
|
|
100
|
+
text-align: left;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
transition: background-color 0.15s ease;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
|
|
105
|
+
&:hover:not(&--disabled) {
|
|
106
|
+
background-color: var(--accent, #f3f4f6);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&--selected {
|
|
110
|
+
background-color: var(--accent, #f3f4f6);
|
|
111
|
+
font-weight: 500;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--disabled {
|
|
115
|
+
opacity: 0.5;
|
|
116
|
+
cursor: not-allowed;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Outline variant - affects options only
|
|
121
|
+
.document-engine-select--outline {
|
|
122
|
+
width: 100%;
|
|
123
|
+
|
|
124
|
+
.document-engine-select__trigger {
|
|
125
|
+
border: 1px solid var(--border, #e5e7eb);
|
|
126
|
+
width: 100%;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.document-engine-select__dropdown {
|
|
130
|
+
width: 100%;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Animation
|
|
135
|
+
@keyframes document-engine-select-dropdown-fade-in {
|
|
136
|
+
from {
|
|
137
|
+
opacity: 0;
|
|
138
|
+
transform: translateY(-4px);
|
|
139
|
+
}
|
|
140
|
+
to {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
transform: translateY(0);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.document-engine-toggle-group {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
border-radius: 0.375rem;
|
|
4
|
+
border: 1px solid var(--border);
|
|
5
|
+
background-color: var(--background);
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.document-engine-toggle-option {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
padding: 0.5rem 0.75rem;
|
|
14
|
+
font-size: 0.875rem;
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
color: var(--foreground);
|
|
17
|
+
background-color: transparent;
|
|
18
|
+
border: none;
|
|
19
|
+
border-right: 1px solid var(--border);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: background-color 0.2s, color 0.2s;
|
|
22
|
+
outline: none;
|
|
23
|
+
|
|
24
|
+
&:last-child {
|
|
25
|
+
border-right: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:hover:not(:disabled):not(.document-engine-toggle-option--active) {
|
|
29
|
+
background-color: var(--accent);
|
|
30
|
+
color: var(--accent-foreground);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:focus-visible {
|
|
34
|
+
z-index: 1;
|
|
35
|
+
outline: 2px solid var(--ring);
|
|
36
|
+
outline-offset: -2px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:disabled {
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
opacity: 0.5;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.document-engine-toggle-option--active {
|
|
46
|
+
background-color: var(--primary);
|
|
47
|
+
color: var(--primary-foreground);
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
background-color: var(--primary);
|
|
51
|
+
color: var(--primary-foreground);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.document-engine-document-editor__toolbar {
|
|
2
|
+
padding: 0.5rem 1rem;
|
|
3
|
+
background-color: var(--card);
|
|
4
|
+
|
|
5
|
+
border-top-left-radius: 0.75rem;
|
|
6
|
+
border-top-right-radius: 0.75rem;
|
|
7
|
+
border: 1px solid var(--border);
|
|
8
|
+
|
|
9
|
+
&-content {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
gap: 0.5rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-left {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
flex: 1;
|
|
22
|
+
gap: 0;
|
|
23
|
+
// max-width: 90%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-right {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 0.5rem;
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-group {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 0.5rem;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
|
|
39
|
+
// Auto-add divider after each group (except the last one)
|
|
40
|
+
// Divider appears between groups automatically
|
|
41
|
+
// The divider is positioned with margin to create spacing
|
|
42
|
+
&:not(:last-child)::after {
|
|
43
|
+
content: '';
|
|
44
|
+
width: 1px;
|
|
45
|
+
height: 1.25rem;
|
|
46
|
+
margin-left: 0.5rem;
|
|
47
|
+
margin-right: 1rem;
|
|
48
|
+
background-color: var(--muted-foreground, #9ca3af);
|
|
49
|
+
align-self: center;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Legacy divider class (kept for backward compatibility, but not needed anymore)
|
|
55
|
+
&-divider {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
}
|