aplance-ui 1.0.2 → 1.1.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.
- package/dist/api.d.ts +3 -1
- package/dist/api.js +97 -23
- package/dist/api.js.map +1 -1
- package/dist/index.js +97 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/registry/components/primitives/modal/modal.tsx +4 -4
- package/registry/components/primitives/popover/popover.module.css +16 -21
- package/registry/components/primitives/popover/popover.tsx +3 -3
- package/registry/components/ui/avatar/avatar.tsx +2 -4
- package/registry/components/ui/badge/badge.tsx +15 -4
- package/registry/components/ui/button/button.module.css +3 -9
- package/registry/components/ui/button/button.tsx +1 -1
- package/registry/components/ui/data-table/data-table.module.css +4 -6
- package/registry/components/ui/data-table/data-table.tsx +57 -43
- package/registry/components/ui/data-table/filter-bar.tsx +11 -11
- package/registry/components/ui/data-table/pagination-bar.tsx +16 -16
- package/registry/components/ui/empty-state/empty-state.tsx +1 -1
- package/registry/components/ui/input-fields/common/input-field-common.module.css +39 -65
- package/registry/components/ui/input-fields/date-picker/calendar.module.css +2 -6
- package/registry/components/ui/input-fields/date-picker/date-picker.module.css +47 -3
- package/registry/components/ui/input-fields/date-picker/date-picker.tsx +12 -12
- package/registry/components/ui/tabs/tabs.tsx +1 -1
- package/registry/components/ui/tooltip/tooltip.tsx +1 -1
- package/registry/registry.json +163 -20
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/* contains form field (with label) and field message (errors info etc.) */
|
|
4
|
-
.container {
|
|
1
|
+
.container {
|
|
5
2
|
width: 100%;
|
|
6
3
|
min-width: fit-content;
|
|
7
4
|
display: flex;
|
|
@@ -17,8 +14,7 @@
|
|
|
17
14
|
}
|
|
18
15
|
}
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
.field_container {
|
|
17
|
+
.field_container {
|
|
22
18
|
width: 100%;
|
|
23
19
|
display: flex;
|
|
24
20
|
flex-direction: column;
|
|
@@ -35,8 +31,7 @@
|
|
|
35
31
|
gap: var(--spacing-2);
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
&.inline {
|
|
34
|
+
&.inline {
|
|
40
35
|
flex-direction: row;
|
|
41
36
|
align-items: center;
|
|
42
37
|
gap: var(--spacing-3);
|
|
@@ -44,17 +39,13 @@
|
|
|
44
39
|
|
|
45
40
|
.label {
|
|
46
41
|
flex-direction: column;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
/* due to reverse direction it will become flex-end */
|
|
55
|
-
justify-content: flex-end;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.rev {
|
|
45
|
+
flex-direction: row-reverse;
|
|
46
|
+
justify-content: flex-end;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
58
49
|
|
|
59
50
|
/* layout: centered - column-stacked with horizontally centered control + label. */
|
|
60
51
|
&.centered {
|
|
@@ -66,8 +57,7 @@
|
|
|
66
57
|
}
|
|
67
58
|
}
|
|
68
59
|
|
|
69
|
-
|
|
70
|
-
&.inline_justify {
|
|
60
|
+
&.inline_justify {
|
|
71
61
|
flex-direction: row;
|
|
72
62
|
align-items: center;
|
|
73
63
|
gap: var(--spacing-3);
|
|
@@ -83,8 +73,7 @@
|
|
|
83
73
|
/* margin-inline: unset; */
|
|
84
74
|
}
|
|
85
75
|
|
|
86
|
-
|
|
87
|
-
&.rev {
|
|
76
|
+
&.rev {
|
|
88
77
|
flex-direction: row-reverse;
|
|
89
78
|
|
|
90
79
|
.field_wrapper {
|
|
@@ -115,8 +104,7 @@
|
|
|
115
104
|
align-self: center;
|
|
116
105
|
}
|
|
117
106
|
|
|
118
|
-
|
|
119
|
-
.field_wrapper {
|
|
107
|
+
.field_wrapper {
|
|
120
108
|
--field-content-color: var(--color-foreground);
|
|
121
109
|
--field-placeholder-color: var(--color-muted-foreground);
|
|
122
110
|
--field-icon-color: var(--color-secondary-foreground);
|
|
@@ -125,12 +113,11 @@
|
|
|
125
113
|
position: relative;
|
|
126
114
|
display: inline-flex;
|
|
127
115
|
|
|
128
|
-
|
|
129
|
-
--action-
|
|
130
|
-
--action-
|
|
131
|
-
--action-
|
|
132
|
-
|
|
133
|
-
}
|
|
116
|
+
--action-inset: var(--spacing-5);
|
|
117
|
+
--action-icon: var(--spacing-8);
|
|
118
|
+
--action-gap: var(--spacing-2);
|
|
119
|
+
--action-clearance: var(--spacing-3);
|
|
120
|
+
}
|
|
134
121
|
|
|
135
122
|
.field_wrapper_variant {
|
|
136
123
|
--field-content-color: var(--button-fg, var(--color-foreground));
|
|
@@ -141,8 +128,7 @@
|
|
|
141
128
|
--field-icon-color: var(--button-icon, var(--field-content-color));
|
|
142
129
|
}
|
|
143
130
|
|
|
144
|
-
|
|
145
|
-
.icon_start {
|
|
131
|
+
.icon_start {
|
|
146
132
|
width: fit-content;
|
|
147
133
|
position: absolute;
|
|
148
134
|
top: 50%;
|
|
@@ -156,8 +142,7 @@
|
|
|
156
142
|
color: var(--field-icon-color);
|
|
157
143
|
}
|
|
158
144
|
|
|
159
|
-
|
|
160
|
-
.action_end_wrapper {
|
|
145
|
+
.action_end_wrapper {
|
|
161
146
|
width: fit-content;
|
|
162
147
|
display: flex;
|
|
163
148
|
align-items: center;
|
|
@@ -169,34 +154,26 @@
|
|
|
169
154
|
flex-shrink: 0;
|
|
170
155
|
--icon-color: var(--field-icon-color);
|
|
171
156
|
color: var(--field-icon-color);
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
/* typography */
|
|
183
|
-
font-family: var(--font-family-1);
|
|
184
|
-
font-size: var(--font-size-sm);
|
|
185
|
-
color: var(--field-content-color);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.field_default {
|
|
160
|
+
width: 100%;
|
|
161
|
+
min-height: var(--spacing-11);
|
|
162
|
+
|
|
163
|
+
font-family: var(--font-family-1);
|
|
164
|
+
font-size: var(--font-size-sm);
|
|
165
|
+
color: var(--field-content-color);
|
|
186
166
|
text-align: start;
|
|
187
167
|
vertical-align: middle;
|
|
188
168
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
padding-
|
|
194
|
-
padding-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
/* display */
|
|
199
|
-
display: flex;
|
|
169
|
+
line-height: 1.125;
|
|
170
|
+
|
|
171
|
+
padding-top: var(--spacing-3);
|
|
172
|
+
padding-bottom: var(--spacing-3);
|
|
173
|
+
padding-left: var(--spacing-6);
|
|
174
|
+
padding-right: var(--spacing-6);
|
|
175
|
+
|
|
176
|
+
display: flex;
|
|
200
177
|
align-items: center;
|
|
201
178
|
justify-content: flex-start;
|
|
202
179
|
gap: var(--spacing-4);
|
|
@@ -206,8 +183,7 @@
|
|
|
206
183
|
outline: none;
|
|
207
184
|
background-color: var(--color-muted);
|
|
208
185
|
|
|
209
|
-
|
|
210
|
-
transition:
|
|
186
|
+
transition:
|
|
211
187
|
border-color var(--transition-base),
|
|
212
188
|
box-shadow var(--transition-base),
|
|
213
189
|
background-color var(--transition-base);
|
|
@@ -231,9 +207,7 @@
|
|
|
231
207
|
cursor: not-allowed;
|
|
232
208
|
opacity: 0.5;
|
|
233
209
|
}
|
|
234
|
-
|
|
235
|
-
/* we need to adjust paddings of input or select fields inline dynamically due to icons at start and ends */
|
|
236
|
-
}
|
|
210
|
+
}
|
|
237
211
|
|
|
238
212
|
.field_button_variant {
|
|
239
213
|
color: var(--field-content-color);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
.calendar {
|
|
1
|
+
.calendar {
|
|
3
2
|
--calendar-cell-size: var(--spacing-11);
|
|
4
3
|
--calendar-cell-radius: var(--radius-md);
|
|
5
4
|
--calendar-row-gap: var(--spacing-1);
|
|
@@ -44,10 +43,7 @@
|
|
|
44
43
|
pointer-events: auto;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.chevron {
|
|
46
|
+
.chevron {
|
|
51
47
|
width: var(--spacing-8);
|
|
52
48
|
height: var(--spacing-8);
|
|
53
49
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* date-picker.module.css – clean, premium layout with no hacks */
|
|
2
1
|
.popover_menu {
|
|
3
2
|
max-width: calc(100vw - var(--spacing-11)) !important;
|
|
4
3
|
}
|
|
@@ -6,6 +5,8 @@
|
|
|
6
5
|
.menu_content {
|
|
7
6
|
display: flex;
|
|
8
7
|
flex-direction: column;
|
|
8
|
+
width: fit-content;
|
|
9
|
+
max-width: 100%;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.manual_panel {
|
|
@@ -17,23 +18,55 @@
|
|
|
17
18
|
display: flex;
|
|
18
19
|
flex-direction: row;
|
|
19
20
|
gap: var(--spacing-4);
|
|
21
|
+
min-width: 0;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.calendar_wrap {
|
|
23
25
|
display: flex;
|
|
24
26
|
justify-content: center;
|
|
25
27
|
padding: var(--spacing-4);
|
|
28
|
+
width: 100%;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
max-width: 100%;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
.range_calendars {
|
|
29
34
|
display: flex;
|
|
30
35
|
align-items: flex-start;
|
|
31
36
|
gap: var(--spacing-4);
|
|
37
|
+
width: fit-content;
|
|
38
|
+
max-width: 100%;
|
|
32
39
|
}
|
|
33
40
|
|
|
34
|
-
@media (width
|
|
35
|
-
.
|
|
41
|
+
@media (max-width: 48rem) {
|
|
42
|
+
.manual_panel,
|
|
43
|
+
.calendar_wrap,
|
|
44
|
+
.time_panel {
|
|
45
|
+
padding: var(--spacing-3);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.manual_grid {
|
|
36
49
|
flex-direction: column;
|
|
50
|
+
gap: var(--spacing-3);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.calendar_wrap {
|
|
54
|
+
justify-content: flex-start;
|
|
55
|
+
overflow-x: auto;
|
|
56
|
+
overscroll-behavior-x: contain;
|
|
57
|
+
scrollbar-width: thin;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.range_calendars {
|
|
61
|
+
width: max-content;
|
|
62
|
+
max-width: none;
|
|
63
|
+
flex-shrink: 0;
|
|
64
|
+
gap: var(--spacing-3);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.range_time_grid {
|
|
68
|
+
grid-template-columns: minmax(0, 1fr);
|
|
69
|
+
gap: var(--spacing-3);
|
|
37
70
|
}
|
|
38
71
|
}
|
|
39
72
|
|
|
@@ -55,3 +88,14 @@
|
|
|
55
88
|
gap: var(--spacing-4);
|
|
56
89
|
}
|
|
57
90
|
|
|
91
|
+
@media (max-width: 36rem) {
|
|
92
|
+
.popover_menu {
|
|
93
|
+
max-width: calc(100vw - var(--spacing-4)) !important;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (max-width: 23rem) {
|
|
98
|
+
.calendar {
|
|
99
|
+
--calendar-cell-size: min(var(--spacing-11), calc((100vw - var(--spacing-10)) / 7));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -56,10 +56,10 @@ export { Calendar } from "./calendar";
|
|
|
56
56
|
export type { CalendarProps } from "./calendar";
|
|
57
57
|
export * from "./types";
|
|
58
58
|
|
|
59
|
-
const DEFAULT_START_PLACEHOLDER = "Start date";
|
|
60
|
-
const DEFAULT_END_PLACEHOLDER = "End date";
|
|
61
|
-
|
|
62
|
-
export const DatePicker = (props: DatePickerProps) => {
|
|
59
|
+
const DEFAULT_START_PLACEHOLDER = "Start date";
|
|
60
|
+
const DEFAULT_END_PLACEHOLDER = "End date";
|
|
61
|
+
|
|
62
|
+
export const DatePicker = (props: DatePickerProps) => {
|
|
63
63
|
const {
|
|
64
64
|
label,
|
|
65
65
|
className,
|
|
@@ -629,9 +629,9 @@ export const DatePicker = (props: DatePickerProps) => {
|
|
|
629
629
|
[timePickerPopover?.align, timePickerPopover?.position],
|
|
630
630
|
);
|
|
631
631
|
|
|
632
|
-
const isIndependentRangeMonths = isRange && resolvedRangeMonthCount > 1;
|
|
633
|
-
|
|
634
|
-
return (
|
|
632
|
+
const isIndependentRangeMonths = isRange && resolvedRangeMonthCount > 1;
|
|
633
|
+
|
|
634
|
+
return (
|
|
635
635
|
<div className={clsx(sCommon.container, className)} style={style}>
|
|
636
636
|
{label && (
|
|
637
637
|
<div
|
|
@@ -758,11 +758,11 @@ export const DatePicker = (props: DatePickerProps) => {
|
|
|
758
758
|
</div>
|
|
759
759
|
)}
|
|
760
760
|
|
|
761
|
-
<div className={s.calendar_wrap}>
|
|
762
|
-
{isRange ? (
|
|
763
|
-
isIndependentRangeMonths ? (
|
|
764
|
-
<div className={s.range_calendars}>
|
|
765
|
-
{Array.from({ length: resolvedRangeMonthCount }, (_, index) => {
|
|
761
|
+
<div className={s.calendar_wrap}>
|
|
762
|
+
{isRange ? (
|
|
763
|
+
isIndependentRangeMonths ? (
|
|
764
|
+
<div className={s.range_calendars}>
|
|
765
|
+
{Array.from({ length: resolvedRangeMonthCount }, (_, index) => {
|
|
766
766
|
const month =
|
|
767
767
|
rangeCalendarMonths[index] ??
|
|
768
768
|
addMonthOffset(
|