@mohasinac/appkit 3.5.2 → 3.5.3
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/features/homepage/components/CustomCardsSection.js +1 -1
- package/dist/features/homepage/components/SectionCarousel.js +1 -1
- package/dist/seed/addresses-seed-data.js +8 -99
- package/dist/seed/categories-seed-data.js +103 -2082
- package/dist/seed/homepage-sections-seed-data.js +9 -9
- package/dist/seed/products-art-seed-data.d.ts +1 -10
- package/dist/seed/products-art-seed-data.js +13 -122
- package/dist/seed/products-auctions-seed-data.js +39 -747
- package/dist/seed/products-classifieds-seed-data.d.ts +1 -9
- package/dist/seed/products-classifieds-seed-data.js +13 -195
- package/dist/seed/products-digital-codes-seed-data.d.ts +1 -9
- package/dist/seed/products-digital-codes-seed-data.js +13 -202
- package/dist/seed/products-live-items-seed-data.d.ts +1 -12
- package/dist/seed/products-live-items-seed-data.js +13 -188
- package/dist/seed/products-preorders-seed-data.js +18 -149
- package/dist/seed/products-prize-draws-seed-data.d.ts +1 -16
- package/dist/seed/products-prize-draws-seed-data.js +13 -385
- package/dist/seed/products-standard-seed-data.js +152 -1331
- package/dist/seed/products-stickers-seed-data.d.ts +1 -10
- package/dist/seed/products-stickers-seed-data.js +13 -122
- package/dist/seed/site-settings-seed-data.js +106 -108
- package/dist/seed/store-addresses-seed-data.js +14 -46
- package/dist/seed/stores-seed-data.js +13 -205
- package/dist/styles.css +19 -18
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/BulkActionBar.style.css +4 -4
- package/dist/ui/components/Button.style.css +14 -13
- package/dist/ui/components/HorizontalScroller.js +18 -10
- package/dist/ui/components/ListingToolbar.js +4 -4
- package/package.json +1 -1
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
|
|
161
161
|
/* dark */
|
|
162
162
|
.dark .appkit-bulk-bar {
|
|
163
|
-
border-color:
|
|
163
|
+
border-color: color-mix(in srgb, var(--appkit-color-primary) 30%, transparent);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
.dark .appkit-bulk-bar__stripe {
|
|
@@ -168,13 +168,13 @@
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
.dark .appkit-bulk-bar__count-pill {
|
|
171
|
-
border-color:
|
|
172
|
-
background:
|
|
171
|
+
border-color: color-mix(in srgb, var(--appkit-color-primary) 35%, transparent);
|
|
172
|
+
background: color-mix(in srgb, var(--appkit-color-primary) 10%, transparent);
|
|
173
173
|
color: var(--appkit-color-primary-300);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.dark .appkit-bulk-bar__count-pill:hover {
|
|
177
|
-
background:
|
|
177
|
+
background: color-mix(in srgb, var(--appkit-color-primary) 18%, transparent);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.dark .appkit-bulk-bar__picker-trigger {
|
|
@@ -115,60 +115,61 @@
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
.appkit-button.appkit-button--secondary {
|
|
118
|
-
background: var(--appkit-color-
|
|
118
|
+
background: var(--appkit-color-primary-50);
|
|
119
119
|
border-color: var(--appkit-color-primary-700);
|
|
120
120
|
color: var(--appkit-color-primary-700);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.appkit-button.appkit-button--secondary:hover:not(:disabled) {
|
|
124
|
-
background:
|
|
124
|
+
background: var(--appkit-color-primary-100);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.dark .appkit-button.appkit-button--secondary {
|
|
128
|
-
background: transparent;
|
|
128
|
+
background: color-mix(in srgb, var(--appkit-color-secondary) 16%, transparent);
|
|
129
129
|
border-color: var(--appkit-color-secondary);
|
|
130
130
|
color: var(--appkit-color-secondary);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.dark .appkit-button.appkit-button--secondary:hover:not(:disabled) {
|
|
134
|
-
background: color-mix(in srgb, var(--appkit-color-secondary)
|
|
134
|
+
background: color-mix(in srgb, var(--appkit-color-secondary) 26%, transparent);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.appkit-button--outline {
|
|
138
|
-
background: var(--appkit-color-surface);
|
|
139
|
-
border-color: var(--appkit-color-
|
|
138
|
+
background: color-mix(in srgb, var(--appkit-color-primary-700) 6%, var(--appkit-color-surface));
|
|
139
|
+
border-color: var(--appkit-color-primary-300);
|
|
140
140
|
color: var(--appkit-color-text);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
.appkit-button--outline:hover:not(:disabled) {
|
|
144
|
-
background: var(--appkit-color-
|
|
144
|
+
background: color-mix(in srgb, var(--appkit-color-primary-700) 12%, var(--appkit-color-surface));
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
.dark .appkit-button--outline {
|
|
148
|
-
background: transparent;
|
|
149
|
-
border-color: var(--appkit-color-
|
|
148
|
+
background: color-mix(in srgb, var(--appkit-color-secondary) 10%, transparent);
|
|
149
|
+
border-color: color-mix(in srgb, var(--appkit-color-secondary) 40%, transparent);
|
|
150
150
|
color: var(--appkit-color-text);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.dark .appkit-button--outline:hover:not(:disabled) {
|
|
154
|
-
background:
|
|
154
|
+
background: color-mix(in srgb, var(--appkit-color-secondary) 18%, transparent);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.appkit-button--ghost {
|
|
158
|
-
background:
|
|
158
|
+
background: var(--appkit-color-border-subtle);
|
|
159
159
|
color: var(--appkit-color-text);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.appkit-button--ghost:hover:not(:disabled) {
|
|
163
|
-
background: var(--appkit-color-border
|
|
163
|
+
background: var(--appkit-color-border);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
.dark .appkit-button--ghost {
|
|
167
|
+
background: rgba(255, 255, 255, 0.06);
|
|
167
168
|
color: var(--appkit-color-text-muted);
|
|
168
169
|
}
|
|
169
170
|
|
|
170
171
|
.dark .appkit-button--ghost:hover:not(:disabled) {
|
|
171
|
-
background: rgba(
|
|
172
|
+
background: rgba(255, 255, 255, 0.12);
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
.appkit-button.appkit-button--danger {
|
|
@@ -216,27 +216,35 @@ export function HorizontalScroller({ children, className = "", gap = 16, snapToI
|
|
|
216
216
|
updateExtents();
|
|
217
217
|
}, [updateExtents, itemWidth, itemCount]);
|
|
218
218
|
const content = itemsMode ? (rows > 1 ? (
|
|
219
|
-
// Grid mode: group items into slides of (rows × colCount) cards
|
|
219
|
+
// Grid mode: group items into slides of (rows × colCount) cards.
|
|
220
|
+
// Loop mode prepends a clone of the last slide and appends a clone of the
|
|
221
|
+
// first slide; handleGridScrollLoop teleports across a full cycle at the
|
|
222
|
+
// boundary so the strip appears to scroll infinitely.
|
|
220
223
|
(() => {
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
const slideCount = Math.ceil(normalizedItems.length / cardsPerSlide);
|
|
224
|
-
return Array.from({ length: slideCount }, (_, slideIndex) => {
|
|
225
|
-
const slideItems = normalizedItems.slice(slideIndex * cardsPerSlide, (slideIndex + 1) * cardsPerSlide);
|
|
224
|
+
const renderSlide = (slideIndex, key, isClone) => {
|
|
225
|
+
const slideItems = normalizedItems.slice(slideIndex * gridCardsPerSlide, (slideIndex + 1) * gridCardsPerSlide);
|
|
226
226
|
return (_jsx("div", { className: "appkit-hscroller__slide", style: {
|
|
227
227
|
display: "grid",
|
|
228
|
-
gridTemplateColumns: `repeat(${
|
|
228
|
+
gridTemplateColumns: `repeat(${gridCols}, 1fr)`,
|
|
229
229
|
gap: `${gap}px`,
|
|
230
230
|
width: "100%",
|
|
231
231
|
flexShrink: 0,
|
|
232
|
-
}, children: slideItems.map((item, idx) => (_jsx("div", { className: [
|
|
232
|
+
}, "aria-hidden": isClone ? true : undefined, children: slideItems.map((item, idx) => (_jsx("div", { className: [
|
|
233
233
|
"appkit-hscroller__item",
|
|
234
234
|
snapToItems ? "appkit-hscroller__item--snap" : "",
|
|
235
235
|
itemClassName,
|
|
236
236
|
]
|
|
237
237
|
.filter(Boolean)
|
|
238
|
-
.join(" "), style: minItemWidth ? { minWidth: minItemWidth } : undefined, children: renderItem(item, slideIndex *
|
|
239
|
-
}
|
|
238
|
+
.join(" "), style: minItemWidth ? { minWidth: minItemWidth } : undefined, children: renderItem(item, slideIndex * gridCardsPerSlide + idx) }, keyExtractor ? keyExtractor(item, slideIndex * gridCardsPerSlide + idx) : slideIndex * gridCardsPerSlide + idx))) }, key));
|
|
239
|
+
};
|
|
240
|
+
const realSlides = Array.from({ length: gridSlideCount }, (_, slideIndex) => renderSlide(slideIndex, `slide-${slideIndex}`, false));
|
|
241
|
+
if (!gridLoopActive)
|
|
242
|
+
return realSlides;
|
|
243
|
+
return [
|
|
244
|
+
renderSlide(gridSlideCount - 1, "slide-clone-start", true),
|
|
245
|
+
...realSlides,
|
|
246
|
+
renderSlide(0, "slide-clone-end", true),
|
|
247
|
+
];
|
|
240
248
|
})()) : loop && itemCount > 0 ? (
|
|
241
249
|
// Circular loop: fixed (itemCount + 2×loopCloneCount) DOM slots.
|
|
242
250
|
// Each slot maps to a real item via modulo — no array cloning, no list growth.
|
|
@@ -20,7 +20,7 @@ const DEFAULT_LABELS = {
|
|
|
20
20
|
clearSelection: "Clear",
|
|
21
21
|
};
|
|
22
22
|
const VIEW_BTN_BASE = "p-1.5 sm:p-2 transition-colors";
|
|
23
|
-
const VIEW_BTN_ACTIVE = "bg-[var(--appkit-color-primary
|
|
23
|
+
const VIEW_BTN_ACTIVE = "bg-[var(--appkit-color-primary)] text-white";
|
|
24
24
|
const VIEW_BTN_INACTIVE = "text-[var(--appkit-color-text-muted)] hover:bg-zinc-50 hover:bg-[var(--appkit-color-surface-elevated)] text-[var(--appkit-color-text-muted)]";
|
|
25
25
|
export function ListingToolbar({ filterCount = 0, onFiltersClick, searchValue = "", searchPlaceholder = "Search…", onSearchChange, onSearchCommit, onSearchKeyDown, sortValue, sortOptions, onSortChange, view = "grid", onViewChange, hideViewToggle = false, showTableView = false, onResetAll, hasActiveState = false, bulkMode = false, bulkSelectedCount = 0, bulkTotalCount = 0, onBulkSelectAll, onBulkClear, toggles, extra, labels, className = "", }) {
|
|
26
26
|
const l = { ...DEFAULT_LABELS, ...labels };
|
|
@@ -34,8 +34,8 @@ export function ListingToolbar({ filterCount = 0, onFiltersClick, searchValue =
|
|
|
34
34
|
};
|
|
35
35
|
const allSelected = bulkTotalCount > 0 && bulkSelectedCount === bulkTotalCount;
|
|
36
36
|
return (_jsx("div", { "data-testid": "listing-toolbar", className: `sticky top-[var(--header-height,0px)] z-20 border-b border-[var(--appkit-color-border)] bg-white/95 bg-[var(--appkit-color-surface)]/95 backdrop-blur-sm py-2 px-3 sm:py-2.5 sm:px-4 ${className}`, children: _jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-2.5", children: [bulkMode ? (_jsxs("div", { className: "flex flex-1 items-center gap-2", children: [_jsxs("button", { type: "button", onClick: onBulkSelectAll, className: "flex items-center gap-1.5 rounded-lg border border-[var(--appkit-color-border)] px-3 py-1.5 text-sm font-medium text-[var(--appkit-color-text-muted)] hover:bg-zinc-50 hover:bg-[var(--appkit-color-surface-elevated)] transition-colors", children: [allSelected
|
|
37
|
-
? _jsx(CheckSquare, { className: "h-4 w-4 text-[var(--appkit-color-primary
|
|
38
|
-
: _jsx(Square, { className: "h-4 w-4" }), allSelected ? l.deselectAll : l.selectAll(bulkTotalCount)] }), _jsx(Span, { size: "sm", color: "muted", children: l.selected(bulkSelectedCount) }), _jsx("button", { type: "button", onClick: onBulkClear, className: CLS_CLEAR_LINK, children: l.clearSelection })] })) : onSearchChange ? (_jsxs("div", { className: "flex flex-1 items-center overflow-hidden rounded-lg border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] min-w-0", children: [_jsx("input", { type: "text", value: searchValue, onChange: (e) => onSearchChange(e.target.value), onKeyDown: handleKeyDown, placeholder: searchPlaceholder, className: "min-w-0 flex-1 bg-transparent px-3 py-2 text-sm text-[var(--appkit-color-text)] placeholder-zinc-400 outline-none" }), _jsx("button", { type: "button", onClick: onSearchCommit, className: "flex shrink-0 items-center justify-center px-2.5 py-2 text-zinc-400 hover:text-[var(--appkit-color-primary
|
|
39
|
-
? "border-transparent bg-[var(--appkit-color-primary
|
|
37
|
+
? _jsx(CheckSquare, { className: "h-4 w-4 text-[var(--appkit-color-primary)]" })
|
|
38
|
+
: _jsx(Square, { className: "h-4 w-4" }), allSelected ? l.deselectAll : l.selectAll(bulkTotalCount)] }), _jsx(Span, { size: "sm", color: "muted", children: l.selected(bulkSelectedCount) }), _jsx("button", { type: "button", onClick: onBulkClear, className: CLS_CLEAR_LINK, children: l.clearSelection })] })) : onSearchChange ? (_jsxs("div", { className: "flex flex-1 items-center overflow-hidden rounded-lg border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] min-w-0", children: [_jsx("input", { type: "text", value: searchValue, onChange: (e) => onSearchChange(e.target.value), onKeyDown: handleKeyDown, placeholder: searchPlaceholder, className: "min-w-0 flex-1 bg-transparent px-3 py-2 text-sm text-[var(--appkit-color-text)] placeholder-zinc-400 outline-none" }), _jsx("button", { type: "button", onClick: onSearchCommit, className: "flex shrink-0 items-center justify-center px-2.5 py-2 text-zinc-400 hover:text-[var(--appkit-color-primary)] transition-colors", "aria-label": l.search, children: _jsx(Search, { className: "h-4 w-4" }) })] })) : null, _jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2 shrink-0", children: [onFiltersClick && (_jsxs("button", { type: "button", onClick: onFiltersClick, className: "relative flex shrink-0 items-center gap-1.5 rounded-lg border border-[var(--appkit-color-border)] px-2.5 py-1.5 sm:px-3.5 sm:py-2 text-sm font-medium text-[var(--appkit-color-text-muted)] hover:bg-zinc-50 hover:bg-[var(--appkit-color-surface-elevated)] transition-colors", children: [_jsx(SlidersHorizontal, { className: "h-4 w-4" }), _jsx("span", { className: "hidden sm:inline", children: l.filters }), filterCount > 0 && (_jsx(Span, { weight: "bold", className: "absolute -top-1.5 -right-1.5 flex h-4 w-4 items-center justify-center rounded-full bg-[var(--appkit-color-primary)] text-[10px] text-white", children: filterCount }))] })), sortOptions && sortValue !== undefined && onSortChange && (_jsxs(Div, { className: "flex items-center gap-1.5 text-[var(--appkit-color-text-muted)]", children: [_jsx(Span, { size: "xs", className: "hidden md:inline whitespace-nowrap", children: l.sort }), _jsx(SortDropdown, { value: sortValue, onChange: onSortChange, options: sortOptions })] })), !hideViewToggle && onViewChange && (_jsxs("div", { className: "flex items-center rounded-lg border border-[var(--appkit-color-border)] overflow-hidden", children: [_jsx("button", { type: "button", onClick: () => onViewChange("grid"), "aria-label": l.gridView, className: `${VIEW_BTN_BASE} ${view === "grid" ? VIEW_BTN_ACTIVE : VIEW_BTN_INACTIVE}`, children: _jsx(LayoutGrid, { className: "h-4 w-4" }) }), _jsx("button", { type: "button", onClick: () => onViewChange("list"), "aria-label": l.listView, className: `${VIEW_BTN_BASE} ${view === "list" ? VIEW_BTN_ACTIVE : VIEW_BTN_INACTIVE}`, children: _jsx(List, { className: "h-4 w-4" }) }), showTableView && (_jsx("button", { type: "button", onClick: () => onViewChange("table"), "aria-label": l.tableView, className: `${VIEW_BTN_BASE} ${view === "table" ? VIEW_BTN_ACTIVE : VIEW_BTN_INACTIVE}`, children: _jsx(Table2, { className: "h-4 w-4" }) }))] })), onResetAll && hasActiveState && (_jsx("button", { type: "button", onClick: onResetAll, "aria-label": l.resetAll, title: l.resetAll, className: CLS_CLEAR_ICON_BTN, children: _jsx(RotateCcw, { className: "h-4 w-4" }) })), toggles && toggles.length > 0 && (_jsx("div", { className: "flex items-center gap-1", children: toggles.map((t) => (_jsx("button", { type: "button", role: "switch", "aria-checked": t.active, onClick: () => t.onChange(!t.active), className: `rounded-full border px-2.5 py-1 text-xs font-medium transition-colors whitespace-nowrap ${t.active
|
|
39
|
+
? "border-transparent bg-[var(--appkit-color-primary)] text-white"
|
|
40
40
|
: "border-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)] hover:bg-zinc-50 hover:bg-[var(--appkit-color-surface-elevated)]"}`, children: t.label }, t.label))) })), extra] })] }) }));
|
|
41
41
|
}
|