qaema-ui 0.0.61 → 0.0.63
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/components/Badge.js +1 -1
- package/dist/components/PackageCard.d.ts +34 -0
- package/dist/components/PackageCard.js +277 -53
- package/dist/components/PageHeader.js +4 -4
- package/dist/components/PriceCard.d.ts +9 -0
- package/dist/components/PriceCard.js +153 -139
- package/dist/components/SearchBar.js +10 -9
- package/dist/components/Sidemenu.js +58 -51
- package/dist/components/StatCard.js +1 -1
- package/dist/components/Table/Table.js +104 -100
- package/dist/components/Table/Table.styles.d.ts +4 -2
- package/dist/components/Table/Table.styles.js +49 -36
- package/dist/components/Table/Table.types.d.ts +1 -0
- package/dist/node_modules/react-icons/fi/index.js +5 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import r, { css as
|
|
1
|
+
import r, { css as e } from "styled-components";
|
|
2
2
|
import { Scrollbar as s } from "../../styles/Scrollbar.styles.js";
|
|
3
3
|
r.button`
|
|
4
4
|
background: none;
|
|
@@ -52,7 +52,7 @@ const a = r.div`
|
|
|
52
52
|
color: ${({ theme: o }) => o.colors.grey.n600};
|
|
53
53
|
|
|
54
54
|
&:hover {
|
|
55
|
-
background-color: ${({ theme: o, $disabled:
|
|
55
|
+
background-color: ${({ theme: o, $disabled: n }) => n ? "transparent" : o.colors.primary.purple.n100};
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
svg {
|
|
@@ -62,7 +62,7 @@ const a = r.div`
|
|
|
62
62
|
width: 100%;
|
|
63
63
|
position: relative;
|
|
64
64
|
border-radius: ${({ theme: o }) => o.borderRadius.md};
|
|
65
|
-
box-shadow: ${({ theme: o }) => o.boxShadow.s2};
|
|
65
|
+
/* box-shadow: ${({ theme: o }) => o.boxShadow.s2}; */
|
|
66
66
|
background-color: ${({ theme: o }) => o.colors.grey.n50};
|
|
67
67
|
overflow-x: hidden;
|
|
68
68
|
overflow-y: auto;
|
|
@@ -79,7 +79,7 @@ r(s)`
|
|
|
79
79
|
-webkit-overflow-scrolling: touch;
|
|
80
80
|
`;
|
|
81
81
|
const u = r.thead`
|
|
82
|
-
${({ $sticky: o }) => o &&
|
|
82
|
+
${({ $sticky: o }) => o && e`
|
|
83
83
|
top: 0;
|
|
84
84
|
`}
|
|
85
85
|
`, $ = r.tr`
|
|
@@ -99,61 +99,73 @@ const u = r.thead`
|
|
|
99
99
|
height: 3.5rem;
|
|
100
100
|
|
|
101
101
|
/* Apply sticky positioning for first and last columns */
|
|
102
|
-
${({ $isFirstColumn: o }) => o &&
|
|
102
|
+
${({ $isFirstColumn: o }) => o && e`
|
|
103
103
|
left: 0;
|
|
104
104
|
/* z-index: 2; */
|
|
105
105
|
`}
|
|
106
106
|
|
|
107
|
-
${({ $isLastColumn: o }) => o &&
|
|
107
|
+
${({ $isLastColumn: o }) => o && e`
|
|
108
108
|
right: 0;
|
|
109
109
|
/* z-index: 2; */
|
|
110
110
|
text-align: end;
|
|
111
111
|
`}
|
|
112
|
-
${({ $isActionCell: o }) => o &&
|
|
113
|
-
padding: ${({ theme:
|
|
112
|
+
${({ $isActionCell: o }) => o && e`
|
|
113
|
+
padding: ${({ theme: n }) => n.spacing.sm} 0;
|
|
114
114
|
text-align: center;
|
|
115
115
|
`}
|
|
116
116
|
|
|
117
117
|
&:hover {
|
|
118
|
-
${({ $sortable: o }) => o &&
|
|
119
|
-
background-color: ${({ theme:
|
|
118
|
+
${({ $sortable: o }) => o && e`
|
|
119
|
+
background-color: ${({ theme: n }) => n.colors.grey.n150};
|
|
120
120
|
`}
|
|
121
121
|
}
|
|
122
|
-
`, y = r.tbody``,
|
|
123
|
-
background-color: ${({ theme: o, $selected:
|
|
122
|
+
`, y = r.tbody``, m = r.tr`
|
|
123
|
+
background-color: ${({ theme: o, $selected: n }) => n ? o.colors.primary.purple.n100 : o.colors.grey.n50};
|
|
124
124
|
height: 3.5rem;
|
|
125
|
-
|
|
125
|
+
transition: background-color 0.2s;
|
|
126
|
+
|
|
127
|
+
${({ $disabled: o }) => o && e`
|
|
126
128
|
opacity: 0.6;
|
|
127
129
|
pointer-events: none;
|
|
128
130
|
`}
|
|
129
131
|
|
|
130
|
-
${({ $clickable: o }) => o &&
|
|
132
|
+
${({ $clickable: o }) => o && e`
|
|
131
133
|
cursor: pointer;
|
|
132
134
|
`}
|
|
133
|
-
|
|
135
|
+
|
|
136
|
+
&:hover {
|
|
137
|
+
${({ $disabled: o }) => !o && e`
|
|
138
|
+
background-color: ${({ theme: n }) => n.colors.grey.n100};
|
|
139
|
+
|
|
140
|
+
td {
|
|
141
|
+
background-color: ${({ theme: n }) => n.colors.grey.n100};
|
|
142
|
+
}
|
|
143
|
+
`}
|
|
144
|
+
}
|
|
145
|
+
`, x = r.td`
|
|
134
146
|
padding: ${({ theme: o }) => o.spacing.s} ${({ theme: o }) => o.spacing.sm};
|
|
135
147
|
text-align: ${({ $align: o }) => o ?? "left"};
|
|
136
|
-
|
|
148
|
+
border-bottom: 1px solid ${({ theme: o }) => o.colors.grey.n150};
|
|
137
149
|
color: ${({ theme: o }) => o.colors.grey.n700};
|
|
138
150
|
/* min-height: 3.5rem;
|
|
139
151
|
max-height: 3.5rem; */
|
|
140
152
|
background-color: ${({ theme: o }) => o.colors.grey.n50};
|
|
141
153
|
/* height: 3.5rem; */
|
|
142
154
|
/* Apply sticky positioning for first and last columns */
|
|
143
|
-
${({ $isFirstColumn: o }) => o &&
|
|
155
|
+
${({ $isFirstColumn: o }) => o && e`
|
|
144
156
|
z-index: 1;
|
|
145
157
|
left: 0;
|
|
146
158
|
`}
|
|
147
159
|
|
|
148
|
-
${({ $isLastColumn: o }) => o &&
|
|
160
|
+
${({ $isLastColumn: o }) => o && e`
|
|
149
161
|
right: 0;
|
|
150
162
|
width: 0px;
|
|
151
163
|
z-index: 1;
|
|
152
164
|
background-color: transparent;
|
|
153
165
|
`}
|
|
154
166
|
|
|
155
|
-
${({ $isActionCell: o }) => o &&
|
|
156
|
-
padding: 0 ${({ theme:
|
|
167
|
+
${({ $isActionCell: o }) => o && e`
|
|
168
|
+
padding: 0 ${({ theme: n }) => n.spacing.sm};
|
|
157
169
|
`}
|
|
158
170
|
`;
|
|
159
171
|
r.span`
|
|
@@ -161,7 +173,7 @@ r.span`
|
|
|
161
173
|
align-items: center;
|
|
162
174
|
margin-left: ${({ theme: o }) => o.spacing.xxs};
|
|
163
175
|
`;
|
|
164
|
-
const
|
|
176
|
+
const h = r.div`
|
|
165
177
|
display: flex;
|
|
166
178
|
justify-content: center;
|
|
167
179
|
align-items: center;
|
|
@@ -192,30 +204,30 @@ r.span`
|
|
|
192
204
|
font-size: ${({ theme: o }) => o.typography.sizes.s2};
|
|
193
205
|
font-weight: ${({ theme: o }) => o.typography.weights.semiBold};
|
|
194
206
|
|
|
195
|
-
${({ theme: o, $variant:
|
|
196
|
-
switch (
|
|
207
|
+
${({ theme: o, $variant: n }) => {
|
|
208
|
+
switch (n) {
|
|
197
209
|
case "primary":
|
|
198
|
-
return
|
|
210
|
+
return e`
|
|
199
211
|
background-color: ${o.colors.primary.purple.n100};
|
|
200
212
|
color: ${o.colors.primary.purple.n500};
|
|
201
213
|
`;
|
|
202
214
|
case "success":
|
|
203
|
-
return
|
|
215
|
+
return e`
|
|
204
216
|
background-color: ${o.colors.state.success.n100};
|
|
205
217
|
color: ${o.colors.state.success.n500};
|
|
206
218
|
`;
|
|
207
219
|
case "warning":
|
|
208
|
-
return
|
|
220
|
+
return e`
|
|
209
221
|
background-color: ${o.colors.secondary.yellow.n200};
|
|
210
222
|
color: ${o.colors.secondary.yellow.n600};
|
|
211
223
|
`;
|
|
212
224
|
case "error":
|
|
213
|
-
return
|
|
225
|
+
return e`
|
|
214
226
|
background-color: ${o.colors.state.error.n100};
|
|
215
227
|
color: ${o.colors.state.error.n500};
|
|
216
228
|
`;
|
|
217
229
|
default:
|
|
218
|
-
return
|
|
230
|
+
return e`
|
|
219
231
|
background-color: ${o.colors.grey.n200};
|
|
220
232
|
color: ${o.colors.grey.n600};
|
|
221
233
|
`;
|
|
@@ -228,8 +240,8 @@ r.span`
|
|
|
228
240
|
height: 0.5rem;
|
|
229
241
|
border-radius: 50%;
|
|
230
242
|
margin-right: ${({ theme: o }) => o.spacing.xxs};
|
|
231
|
-
background-color: ${({ theme: o, $status:
|
|
232
|
-
switch (
|
|
243
|
+
background-color: ${({ theme: o, $status: n }) => {
|
|
244
|
+
switch (n) {
|
|
233
245
|
case "success":
|
|
234
246
|
return o.colors.state.success.n500;
|
|
235
247
|
case "warning":
|
|
@@ -245,9 +257,11 @@ const k = r.div`
|
|
|
245
257
|
display: flex;
|
|
246
258
|
position: relative;
|
|
247
259
|
width: 100%;
|
|
260
|
+
gap: 0;
|
|
248
261
|
`, v = r(s)`
|
|
249
262
|
flex: 1 1 auto;
|
|
250
263
|
overflow-x: auto;
|
|
264
|
+
overflow-y: hidden;
|
|
251
265
|
min-width: 0;
|
|
252
266
|
&::-webkit-scrollbar {
|
|
253
267
|
height: ${({ theme: o }) => o.spacing.s};
|
|
@@ -256,12 +270,11 @@ const k = r.div`
|
|
|
256
270
|
height: ${({ theme: o }) => o.spacing.s};
|
|
257
271
|
}
|
|
258
272
|
`, T = r(t)`
|
|
259
|
-
/* position: sticky;
|
|
260
|
-
right: 0; */
|
|
261
273
|
flex: 0 0 auto;
|
|
262
|
-
width:
|
|
274
|
+
width: auto;
|
|
263
275
|
table-layout: fixed;
|
|
264
276
|
background-color: ${({ theme: o }) => o.colors.grey.n50};
|
|
277
|
+
margin-bottom: ${({ theme: o, $hasScrollbar: n }) => n ? o.spacing.s : "0"};
|
|
265
278
|
`;
|
|
266
279
|
export {
|
|
267
280
|
T as ActionsTable,
|
|
@@ -275,11 +288,11 @@ export {
|
|
|
275
288
|
t as StyledTable,
|
|
276
289
|
u as StyledTableHead,
|
|
277
290
|
y as TableBody,
|
|
278
|
-
|
|
291
|
+
x as TableCellContainer,
|
|
279
292
|
g as TableContainer,
|
|
280
|
-
|
|
293
|
+
h as TableFooter,
|
|
281
294
|
b as TableHeaderCell,
|
|
282
295
|
$ as TableHeaderRow,
|
|
283
|
-
|
|
296
|
+
m as TableRow,
|
|
284
297
|
k as TablesWrapper
|
|
285
298
|
};
|
|
@@ -50,6 +50,7 @@ export type TableProps<T> = {
|
|
|
50
50
|
onItemsPerPageChange?: (itemsPerPage: number) => void;
|
|
51
51
|
};
|
|
52
52
|
onRowClick?: (row: T) => void;
|
|
53
|
+
onClickView?: (row: T) => void;
|
|
53
54
|
rowClassName?: (row: T, index: number) => string;
|
|
54
55
|
isRowDisabled?: (row: T) => boolean;
|
|
55
56
|
breakpoint?: string;
|
|
@@ -22,6 +22,9 @@ function u(t) {
|
|
|
22
22
|
return r({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "line", attr: { x1: "12", y1: "5", x2: "12", y2: "19" }, child: [] }, { tag: "line", attr: { x1: "5", y1: "12", x2: "19", y2: "12" }, child: [] }] })(t);
|
|
23
23
|
}
|
|
24
24
|
function s(t) {
|
|
25
|
+
return r({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "11", cy: "11", r: "8" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }, child: [] }] })(t);
|
|
26
|
+
}
|
|
27
|
+
function h(t) {
|
|
25
28
|
return r({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "line", attr: { x1: "18", y1: "6", x2: "6", y2: "18" }, child: [] }, { tag: "line", attr: { x1: "6", y1: "6", x2: "18", y2: "18" }, child: [] }] })(t);
|
|
26
29
|
}
|
|
27
30
|
export {
|
|
@@ -32,5 +35,6 @@ export {
|
|
|
32
35
|
a as FiMinus,
|
|
33
36
|
d as FiMoreHorizontal,
|
|
34
37
|
u as FiPlus,
|
|
35
|
-
s as
|
|
38
|
+
s as FiSearch,
|
|
39
|
+
h as FiX
|
|
36
40
|
};
|