@snacky/ui 0.9.1 → 0.11.0

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/index.cjs CHANGED
@@ -45,6 +45,7 @@ __export(index_exports, {
45
45
  NotificationListItem: () => NotificationListItem,
46
46
  OrderListItem: () => OrderListItem,
47
47
  OtpField: () => OtpField,
48
+ PageIndicator: () => PageIndicator,
48
49
  PointBalanceBanner: () => PointBalanceBanner,
49
50
  ProductCard: () => ProductCard,
50
51
  ProductChip: () => ProductChip,
@@ -153,141 +154,6 @@ var IconButton = (0, import_react2.forwardRef)(function IconButton2({ variant =
153
154
 
154
155
  // src/components/IconButton/UploadButton.tsx
155
156
  var import_react3 = require("react");
156
- var import_jsx_runtime3 = require("react/jsx-runtime");
157
- var UploadButton = (0, import_react3.forwardRef)(function UploadButton2({ icon: icon3, ariaLabel = "Upload image", className, ...rest }, ref) {
158
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { ref, type: "button", "aria-label": ariaLabel, className: cx("snacky-upload", className), ...rest, children: icon3 });
159
- });
160
-
161
- // src/components/Input/TextField.tsx
162
- var import_react4 = require("react");
163
- var import_jsx_runtime4 = require("react/jsx-runtime");
164
- var TextField = (0, import_react4.forwardRef)(function TextField2({
165
- value,
166
- onChange,
167
- label,
168
- leadingIcon,
169
- trailingIcon,
170
- trailingIconRotated = false,
171
- error,
172
- disabled,
173
- className,
174
- id,
175
- ...rest
176
- }, ref) {
177
- const autoId = (0, import_react4.useId)();
178
- const fieldId = id ?? autoId;
179
- const errorMessage = typeof error === "string" ? error : void 0;
180
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className, children: [
181
- label && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("label", { className: "snacky-field-label", htmlFor: fieldId, children: label }),
182
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
183
- "div",
184
- {
185
- className: cx("snacky-field", !!error && "snacky-field--error", disabled && "snacky-field--disabled"),
186
- children: [
187
- leadingIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "snacky-field__icon", children: leadingIcon }),
188
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
189
- "input",
190
- {
191
- ref,
192
- id: fieldId,
193
- className: "snacky-field__input",
194
- value,
195
- onChange: (e) => onChange(e.target.value),
196
- disabled,
197
- ...rest
198
- }
199
- ),
200
- trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
201
- "span",
202
- {
203
- className: "snacky-field__icon",
204
- style: trailingIconRotated ? { transform: "rotate(180deg)" } : void 0,
205
- children: trailingIcon
206
- }
207
- )
208
- ]
209
- }
210
- ),
211
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "snacky-field-error", children: errorMessage })
212
- ] });
213
- });
214
-
215
- // src/components/Input/SearchField.tsx
216
- var import_react5 = require("react");
217
- var import_jsx_runtime5 = require("react/jsx-runtime");
218
- var SearchField = (0, import_react5.forwardRef)(function SearchField2({ value, onChange, searchIcon, onClear, className, placeholder = "Search products...", ...rest }, ref) {
219
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cx("snacky-search", className), children: [
220
- searchIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "snacky-search__icon", children: searchIcon }),
221
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
222
- "input",
223
- {
224
- ref,
225
- className: "snacky-search__input",
226
- value,
227
- placeholder,
228
- onChange: (e) => onChange(e.target.value),
229
- ...rest
230
- }
231
- ),
232
- value && onClear && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "snacky-search__clear", onClick: onClear, "aria-label": "Clear search", children: "\u2715" })
233
- ] });
234
- });
235
-
236
- // src/components/Input/OtpField.tsx
237
- var import_react6 = require("react");
238
- var import_jsx_runtime6 = require("react/jsx-runtime");
239
- function OtpField({ value, onChange, length = 6, disabled }) {
240
- const cellRefs = (0, import_react6.useRef)([]);
241
- const digits = Array.from({ length }, (_, i) => value[i] ?? "");
242
- function setDigit(index, digit) {
243
- const next = digits.slice();
244
- next[index] = digit;
245
- onChange(next.join(""));
246
- if (digit && index < length - 1) cellRefs.current[index + 1]?.focus();
247
- }
248
- function handleKeyDown(index, e) {
249
- if (e.key === "Backspace" && !digits[index] && index > 0) {
250
- cellRefs.current[index - 1]?.focus();
251
- }
252
- }
253
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "snacky-otp", children: digits.map((digit, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
254
- "input",
255
- {
256
- ref: (el) => {
257
- cellRefs.current[i] = el;
258
- },
259
- className: "snacky-otp__cell",
260
- inputMode: "numeric",
261
- maxLength: 1,
262
- value: digit,
263
- disabled,
264
- onChange: (e) => setDigit(i, e.target.value.replace(/\D/g, "").slice(-1)),
265
- onKeyDown: (e) => handleKeyDown(i, e),
266
- "aria-label": `Digit ${i + 1}`
267
- },
268
- i
269
- )) });
270
- }
271
-
272
- // src/components/Input/CopyField.tsx
273
- var import_react7 = require("react");
274
- var import_jsx_runtime7 = require("react/jsx-runtime");
275
- function CopyField({ value, onCopy, className }) {
276
- const [copied, setCopied] = (0, import_react7.useState)(false);
277
- async function handleCopy() {
278
- try {
279
- await navigator.clipboard.writeText(value);
280
- } catch {
281
- }
282
- onCopy?.(value);
283
- setCopied(true);
284
- setTimeout(() => setCopied(false), 2e3);
285
- }
286
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cx("snacky-copy", className), children: [
287
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "snacky-copy__value", children: value }),
288
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: cx("snacky-copy__action", copied && "snacky-copy__action--copied"), onClick: handleCopy, children: copied ? "Copied" : "Copy" })
289
- ] });
290
- }
291
157
 
292
158
  // src/icons/outline.tsx
293
159
  var outline_exports = {};
@@ -335,10 +201,10 @@ __export(outline_exports, {
335
201
  truck: () => truck,
336
202
  unsent: () => unsent
337
203
  });
338
- var import_jsx_runtime8 = require("react/jsx-runtime");
204
+ var import_jsx_runtime3 = require("react/jsx-runtime");
339
205
  function icon(viewBox, paths) {
340
206
  return function SnackyIcon({ width = viewBox, height = viewBox, color = "currentColor", ...rest }) {
341
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width, height, viewBox: `0 0 ${viewBox} ${viewBox}`, fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: paths.map(([d, fillRule], i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
207
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width, height, viewBox: `0 0 ${viewBox} ${viewBox}`, fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: paths.map(([d, fillRule], i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
342
208
  "path",
343
209
  {
344
210
  d,
@@ -512,6 +378,143 @@ var unsent = icon(24, [
512
378
  ["M11.9999 7C11.7788 7 11.5669 7.0878 11.4106 7.24408C11.2543 7.40036 11.1665 7.61232 11.1665 7.83333V11.4375L8.35735 13.1975C8.16949 13.3148 8.03594 13.502 7.98609 13.7179C7.93624 13.9337 7.97416 14.1605 8.09152 14.3483C8.20888 14.5362 8.39606 14.6697 8.61188 14.7196C8.8277 14.7694 9.05449 14.7315 9.24235 14.6142L12.4424 12.6142C12.5633 12.5384 12.6627 12.4329 12.7311 12.3077C12.7996 12.1825 12.8347 12.0418 12.8332 11.8992V7.83333C12.8332 7.61232 12.7454 7.40036 12.5891 7.24408C12.4328 7.0878 12.2209 7 11.9999 7Z", "nonzero"]
513
379
  ]);
514
380
 
381
+ // src/components/IconButton/UploadButton.tsx
382
+ var import_jsx_runtime4 = require("react/jsx-runtime");
383
+ var UploadButton = (0, import_react3.forwardRef)(function UploadButton2({ icon: icon3 = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(camera, {}), ariaLabel = "Upload image", className, ...rest }, ref) {
384
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { ref, type: "button", "aria-label": ariaLabel, className: cx("snacky-upload", className), ...rest, children: icon3 });
385
+ });
386
+
387
+ // src/components/Input/TextField.tsx
388
+ var import_react4 = require("react");
389
+ var import_jsx_runtime5 = require("react/jsx-runtime");
390
+ var TextField = (0, import_react4.forwardRef)(function TextField2({
391
+ value,
392
+ onChange,
393
+ label,
394
+ leadingIcon,
395
+ trailingIcon,
396
+ trailingIconRotated = false,
397
+ error,
398
+ disabled,
399
+ className,
400
+ id,
401
+ ...rest
402
+ }, ref) {
403
+ const autoId = (0, import_react4.useId)();
404
+ const fieldId = id ?? autoId;
405
+ const errorMessage = typeof error === "string" ? error : void 0;
406
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className, children: [
407
+ label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { className: "snacky-field-label", htmlFor: fieldId, children: label }),
408
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
409
+ "div",
410
+ {
411
+ className: cx("snacky-field", !!error && "snacky-field--error", disabled && "snacky-field--disabled"),
412
+ children: [
413
+ leadingIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "snacky-field__icon", children: leadingIcon }),
414
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
415
+ "input",
416
+ {
417
+ ref,
418
+ id: fieldId,
419
+ className: "snacky-field__input",
420
+ value,
421
+ onChange: (e) => onChange(e.target.value),
422
+ disabled,
423
+ ...rest
424
+ }
425
+ ),
426
+ trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
427
+ "span",
428
+ {
429
+ className: "snacky-field__icon",
430
+ style: trailingIconRotated ? { transform: "rotate(180deg)" } : void 0,
431
+ children: trailingIcon
432
+ }
433
+ )
434
+ ]
435
+ }
436
+ ),
437
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "snacky-field-error", children: errorMessage })
438
+ ] });
439
+ });
440
+
441
+ // src/components/Input/SearchField.tsx
442
+ var import_react5 = require("react");
443
+ var import_jsx_runtime6 = require("react/jsx-runtime");
444
+ var SearchField = (0, import_react5.forwardRef)(function SearchField2({ value, onChange, searchIcon, onClear, className, placeholder = "Search products...", ...rest }, ref) {
445
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cx("snacky-search", className), children: [
446
+ searchIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "snacky-search__icon", children: searchIcon }),
447
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
448
+ "input",
449
+ {
450
+ ref,
451
+ className: "snacky-search__input",
452
+ value,
453
+ placeholder,
454
+ onChange: (e) => onChange(e.target.value),
455
+ ...rest
456
+ }
457
+ ),
458
+ value && onClear && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: "snacky-search__clear", onClick: onClear, "aria-label": "Clear search", children: "\u2715" })
459
+ ] });
460
+ });
461
+
462
+ // src/components/Input/OtpField.tsx
463
+ var import_react6 = require("react");
464
+ var import_jsx_runtime7 = require("react/jsx-runtime");
465
+ function OtpField({ value, onChange, length = 6, disabled }) {
466
+ const cellRefs = (0, import_react6.useRef)([]);
467
+ const digits = Array.from({ length }, (_, i) => value[i] ?? "");
468
+ function setDigit(index, digit) {
469
+ const next = digits.slice();
470
+ next[index] = digit;
471
+ onChange(next.join(""));
472
+ if (digit && index < length - 1) cellRefs.current[index + 1]?.focus();
473
+ }
474
+ function handleKeyDown(index, e) {
475
+ if (e.key === "Backspace" && !digits[index] && index > 0) {
476
+ cellRefs.current[index - 1]?.focus();
477
+ }
478
+ }
479
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "snacky-otp", children: digits.map((digit, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
480
+ "input",
481
+ {
482
+ ref: (el) => {
483
+ cellRefs.current[i] = el;
484
+ },
485
+ className: "snacky-otp__cell",
486
+ inputMode: "numeric",
487
+ maxLength: 1,
488
+ value: digit,
489
+ disabled,
490
+ onChange: (e) => setDigit(i, e.target.value.replace(/\D/g, "").slice(-1)),
491
+ onKeyDown: (e) => handleKeyDown(i, e),
492
+ "aria-label": `Digit ${i + 1}`
493
+ },
494
+ i
495
+ )) });
496
+ }
497
+
498
+ // src/components/Input/CopyField.tsx
499
+ var import_react7 = require("react");
500
+ var import_jsx_runtime8 = require("react/jsx-runtime");
501
+ function CopyField({ value, onCopy, className }) {
502
+ const [copied, setCopied] = (0, import_react7.useState)(false);
503
+ async function handleCopy() {
504
+ try {
505
+ await navigator.clipboard.writeText(value);
506
+ } catch {
507
+ }
508
+ onCopy?.(value);
509
+ setCopied(true);
510
+ setTimeout(() => setCopied(false), 2e3);
511
+ }
512
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cx("snacky-copy", className), children: [
513
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "snacky-copy__value", children: value }),
514
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: cx("snacky-copy__action", copied && "snacky-copy__action--copied"), onClick: handleCopy, children: copied ? "Copied" : "Copy" })
515
+ ] });
516
+ }
517
+
515
518
  // src/components/Input/ChatInput.tsx
516
519
  var import_jsx_runtime9 = require("react/jsx-runtime");
517
520
  function ChatInput({ value, onChange, onSend, sendIcon, className, placeholder = "Write your message here", ...rest }) {
@@ -702,6 +705,7 @@ function TabRow({ tabs, selected, onSelect, className }) {
702
705
  var solid_exports = {};
703
706
  __export(solid_exports, {
704
707
  account: () => account2,
708
+ angleSmallRight: () => angleSmallRight,
705
709
  balance: () => balance2,
706
710
  bell: () => bell2,
707
711
  cart: () => cart2,
@@ -732,6 +736,9 @@ var account2 = icon2(20, [
732
736
  ["M10 10C12.7614 10 15 7.76142 15 5C15 2.23858 12.7614 0 10 0C7.23858 0 5 2.23858 5 5C5 7.76142 7.23858 10 10 10Z", "nonzero"],
733
737
  ["M10 11.6659C5.85977 11.6705 2.50461 15.0257 2.5 19.1659C2.5 19.6261 2.87309 19.9992 3.33332 19.9992H16.6666C17.1269 19.9992 17.5 19.6261 17.5 19.1659C17.4954 15.0257 14.1402 11.6705 10 11.6659Z", "nonzero"]
734
738
  ]);
739
+ var angleSmallRight = icon2(24, [
740
+ ["M15.75 9.525L11.164 4.939C10.8827 4.65774 10.5011 4.49978 10.1032 4.49988C9.70534 4.49997 9.32381 4.65811 9.04255 4.9395C8.76129 5.2209 8.60333 5.6025 8.60342 6.00036C8.60352 6.39822 8.76166 6.77974 9.04305 7.061L13.629 11.646C13.6756 11.6925 13.7125 11.7476 13.7378 11.8084C13.763 11.8691 13.7759 11.9342 13.7759 12C13.7759 12.0658 13.763 12.1309 13.7378 12.1916C13.7125 12.2524 13.6756 12.3076 13.629 12.354L9.04305 16.939C8.76166 17.2203 8.60352 17.6018 8.60342 17.9997C8.60333 18.3975 8.76129 18.7791 9.04255 19.0605C9.32381 19.3419 9.70534 19.5 10.1032 19.5001C10.5011 19.5002 10.8827 19.3423 11.164 19.061L15.75 14.475C16.4053 13.818 16.7732 12.9279 16.7732 12C16.7732 11.0721 16.4053 10.182 15.75 9.525Z", "nonzero"]
741
+ ]);
735
742
  var balance2 = icon2(24, [
736
743
  ["M19 4.00031H5C3.67441 4.00189 2.40356 4.52919 1.46622 5.46653C0.528882 6.40386 0.00158786 7.67471 0 9.00031L0 15.0003C0.00158786 16.3259 0.528882 17.5967 1.46622 18.5341C2.40356 19.4714 3.67441 19.9987 5 20.0003H19C20.3256 19.9987 21.5964 19.4714 22.5338 18.5341C23.4711 17.5967 23.9984 16.3259 24 15.0003V9.00031C23.9984 7.67471 23.4711 6.40386 22.5338 5.46653C21.5964 4.52919 20.3256 4.00189 19 4.00031ZM4 17.0003C3.80222 17.0003 3.60888 16.9417 3.44443 16.8318C3.27998 16.7219 3.15181 16.5657 3.07612 16.383C3.00043 16.2003 2.98063 15.9992 3.01921 15.8052C3.0578 15.6112 3.15304 15.4331 3.29289 15.2932C3.43275 15.1533 3.61093 15.0581 3.80491 15.0195C3.99889 14.9809 4.19996 15.0007 4.38268 15.0764C4.56541 15.1521 4.72159 15.2803 4.83147 15.4447C4.94135 15.6092 5 15.8025 5 16.0003C5 16.2655 4.89464 16.5199 4.70711 16.7074C4.51957 16.8949 4.26522 17.0003 4 17.0003ZM4 9.00031C3.80222 9.00031 3.60888 8.94166 3.44443 8.83177C3.27998 8.72189 3.15181 8.56571 3.07612 8.38299C3.00043 8.20026 2.98063 7.9992 3.01921 7.80521C3.0578 7.61123 3.15304 7.43305 3.29289 7.2932C3.43275 7.15335 3.61093 7.0581 3.80491 7.01952C3.99889 6.98093 4.19996 7.00074 4.38268 7.07643C4.56541 7.15211 4.72159 7.28029 4.83147 7.44474C4.94135 7.60918 5 7.80252 5 8.00031C5 8.26552 4.89464 8.51988 4.70711 8.70741C4.51957 8.89495 4.26522 9.00031 4 9.00031ZM12 16.0003C11.2089 16.0003 10.4355 15.7657 9.77772 15.3262C9.11992 14.8867 8.60723 14.2619 8.30448 13.531C8.00173 12.8001 7.92252 11.9959 8.07686 11.2199C8.2312 10.444 8.61216 9.73129 9.17157 9.17188C9.73098 8.61247 10.4437 8.2315 11.2196 8.07716C11.9956 7.92282 12.7998 8.00204 13.5307 8.30479C14.2616 8.60754 14.8864 9.12023 15.3259 9.77802C15.7654 10.4358 16 11.2092 16 12.0003C16 13.0612 15.5786 14.0786 14.8284 14.8287C14.0783 15.5789 13.0609 16.0003 12 16.0003ZM20 17.0003C19.8022 17.0003 19.6089 16.9417 19.4444 16.8318C19.28 16.7219 19.1518 16.5657 19.0761 16.383C19.0004 16.2003 18.9806 15.9992 19.0192 15.8052C19.0578 15.6112 19.153 15.4331 19.2929 15.2932C19.4327 15.1533 19.6109 15.0581 19.8049 15.0195C19.9989 14.9809 20.2 15.0007 20.3827 15.0764C20.5654 15.1521 20.7216 15.2803 20.8315 15.4447C20.9414 15.6092 21 15.8025 21 16.0003C21 16.2655 20.8946 16.5199 20.7071 16.7074C20.5196 16.8949 20.2652 17.0003 20 17.0003ZM20 9.00031C19.8022 9.00031 19.6089 8.94166 19.4444 8.83177C19.28 8.72189 19.1518 8.56571 19.0761 8.38299C19.0004 8.20026 18.9806 7.9992 19.0192 7.80521C19.0578 7.61123 19.153 7.43305 19.2929 7.2932C19.4327 7.15335 19.6109 7.0581 19.8049 7.01952C19.9989 6.98093 20.2 7.00074 20.3827 7.07643C20.5654 7.15211 20.7216 7.28029 20.8315 7.44474C20.9414 7.60918 21 7.80252 21 8.00031C21 8.26552 20.8946 8.51988 20.7071 8.70741C20.5196 8.89495 20.2652 9.00031 20 9.00031ZM14 12.0003C14 12.3959 13.8827 12.7825 13.6629 13.1114C13.4432 13.4403 13.1308 13.6967 12.7654 13.8481C12.3999 13.9994 11.9978 14.039 11.6098 13.9619C11.2219 13.8847 10.8655 13.6942 10.5858 13.4145C10.3061 13.1348 10.1156 12.7784 10.0384 12.3905C9.96126 12.0025 10.0009 11.6004 10.1522 11.2349C10.3036 10.8695 10.56 10.5571 10.8889 10.3374C11.2178 10.1176 11.6044 10.0003 12 10.0003C12.5304 10.0003 13.0391 10.211 13.4142 10.5861C13.7893 10.9612 14 11.4699 14 12.0003Z", "nonzero"]
737
744
  ]);
@@ -831,43 +838,64 @@ function AlertBanner({ message, countdown, className }) {
831
838
  ] });
832
839
  }
833
840
 
834
- // src/components/Badge/Badge.tsx
841
+ // src/components/PageIndicator/PageIndicator.tsx
835
842
  var import_jsx_runtime21 = require("react/jsx-runtime");
843
+ function PageIndicator({ count, activeIndex, ariaLabel, className }) {
844
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
845
+ "div",
846
+ {
847
+ className: cx("snacky-page-indicator", className),
848
+ role: "status",
849
+ "aria-label": ariaLabel ?? `Page ${activeIndex + 1} of ${count}`,
850
+ children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
851
+ "span",
852
+ {
853
+ "aria-hidden": "true",
854
+ className: cx("snacky-page-indicator__dot", i === activeIndex && "snacky-page-indicator__dot--active")
855
+ },
856
+ i
857
+ ))
858
+ }
859
+ );
860
+ }
861
+
862
+ // src/components/Badge/Badge.tsx
863
+ var import_jsx_runtime22 = require("react/jsx-runtime");
836
864
  function NotificationBadge({ count, max = 99, children, className }) {
837
- if (count <= 0) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children });
838
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: cx("snacky-badge-wrap", className), children: [
865
+ if (count <= 0) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children });
866
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: cx("snacky-badge-wrap", className), children: [
839
867
  children,
840
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "snacky-badge-notification", children: count > max ? `${max}+` : count })
868
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "snacky-badge-notification", children: count > max ? `${max}+` : count })
841
869
  ] });
842
870
  }
843
871
  function DiscountTag({ label, className }) {
844
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: cx("snacky-discount-tag", className), children: label });
872
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: cx("snacky-discount-tag", className), children: label });
845
873
  }
846
874
  function SoldOutBadge({ className }) {
847
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: cx("snacky-soldout-badge", className), children: "Sold Out" });
875
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: cx("snacky-soldout-badge", className), children: "Sold Out" });
848
876
  }
849
877
  function InfoBadge({ label, icon: icon3, className }) {
850
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: cx("snacky-info-badge", className), children: [
851
- icon3 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "snacky-info-badge__icon", children: icon3 }),
878
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: cx("snacky-info-badge", className), children: [
879
+ icon3 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "snacky-info-badge__icon", children: icon3 }),
852
880
  label
853
881
  ] });
854
882
  }
855
883
  var VariantBadge = InfoBadge;
856
884
 
857
885
  // src/components/Callout/Callout.tsx
858
- var import_jsx_runtime22 = require("react/jsx-runtime");
886
+ var import_jsx_runtime23 = require("react/jsx-runtime");
859
887
  function Callout({ message, timestamp, variant, statusIcon, className }) {
860
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx("snacky-callout", `snacky-callout--${variant}`, className), children: [
861
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "snacky-callout__message", children: message }),
862
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "snacky-callout__meta", children: [
888
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cx("snacky-callout", `snacky-callout--${variant}`, className), children: [
889
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "snacky-callout__message", children: message }),
890
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "snacky-callout__meta", children: [
863
891
  timestamp,
864
- statusIcon && variant !== "received" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "snacky-callout__meta-icon", children: statusIcon })
892
+ statusIcon && variant !== "received" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "snacky-callout__meta-icon", children: statusIcon })
865
893
  ] })
866
894
  ] });
867
895
  }
868
896
 
869
897
  // src/components/List/List.tsx
870
- var import_jsx_runtime23 = require("react/jsx-runtime");
898
+ var import_jsx_runtime24 = require("react/jsx-runtime");
871
899
  var STATUS_LABEL = {
872
900
  waiting: "Waiting for Payment",
873
901
  process: "Order Processing",
@@ -895,7 +923,7 @@ function OrderListItem({
895
923
  }) {
896
924
  const action = actionLabel ?? STATUS_ACTION[status];
897
925
  const isCod = status === "processCod";
898
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
926
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
899
927
  "div",
900
928
  {
901
929
  className: cx("snacky-order-item", className),
@@ -904,32 +932,32 @@ function OrderListItem({
904
932
  onClick,
905
933
  onKeyDown: onClick ? (e) => (e.key === "Enter" || e.key === " ") && onClick() : void 0,
906
934
  children: [
907
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "snacky-order-item__top", children: [
908
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "snacky-order-item__thumb-box", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { className: "snacky-order-item__thumb", src: productImage, alt: "" }) }),
909
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "snacky-order-item__info", children: [
910
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
935
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "snacky-order-item__top", children: [
936
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "snacky-order-item__thumb-box", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("img", { className: "snacky-order-item__thumb", src: productImage, alt: "" }) }),
937
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "snacky-order-item__info", children: [
938
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
911
939
  "span",
912
940
  {
913
941
  className: cx("snacky-order-item__status", status === "cancelled" && "snacky-order-item__status--cancelled"),
914
942
  children: STATUS_LABEL[status]
915
943
  }
916
944
  ),
917
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "snacky-order-item__name", children: productName })
945
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "snacky-order-item__name", children: productName })
918
946
  ] })
919
947
  ] }),
920
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "snacky-order-item__details", children: [
921
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "snacky-order-item__count", children: itemsSummary }),
922
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: cx("snacky-order-item__total", isCod && "snacky-order-item__total--cod"), children: [
948
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "snacky-order-item__details", children: [
949
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "snacky-order-item__count", children: itemsSummary }),
950
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: cx("snacky-order-item__total", isCod && "snacky-order-item__total--cod"), children: [
923
951
  "Order Total: ",
924
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("b", { children: total })
952
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("b", { children: total })
925
953
  ] }),
926
- isCod && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "snacky-order-item__cod", children: "COD" })
954
+ isCod && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "snacky-order-item__cod", children: "COD" })
927
955
  ] }),
928
- status === "waiting" && paymentDeadline && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "snacky-order-item__deadline", children: [
956
+ status === "waiting" && paymentDeadline && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "snacky-order-item__deadline", children: [
929
957
  "Pay before ",
930
958
  paymentDeadline
931
959
  ] }),
932
- action && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "snacky-order-item__action-row", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
960
+ action && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "snacky-order-item__action-row", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
933
961
  Button,
934
962
  {
935
963
  variant: "primary",
@@ -945,7 +973,7 @@ function OrderListItem({
945
973
  );
946
974
  }
947
975
  function NotificationListItem({ title, message, unread = false, onClick, className }) {
948
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
976
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
949
977
  "div",
950
978
  {
951
979
  className: cx("snacky-notif-item", unread && "snacky-notif-item--unread", className),
@@ -954,8 +982,8 @@ function NotificationListItem({ title, message, unread = false, onClick, classNa
954
982
  onClick,
955
983
  onKeyDown: onClick ? (e) => (e.key === "Enter" || e.key === " ") && onClick() : void 0,
956
984
  children: [
957
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "snacky-notif-item__title", children: title }),
958
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "snacky-notif-item__message", children: message })
985
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "snacky-notif-item__title", children: title }),
986
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "snacky-notif-item__message", children: message })
959
987
  ]
960
988
  }
961
989
  );
@@ -963,12 +991,12 @@ function NotificationListItem({ title, message, unread = false, onClick, classNa
963
991
 
964
992
  // src/components/Accordion/Accordion.tsx
965
993
  var import_react10 = require("react");
966
- var import_jsx_runtime24 = require("react/jsx-runtime");
994
+ var import_jsx_runtime25 = require("react/jsx-runtime");
967
995
  function Accordion({ title, leadingIcon, children, defaultOpen = false, className }) {
968
996
  const [open, setOpen] = (0, import_react10.useState)(defaultOpen);
969
997
  const panelId = (0, import_react10.useId)();
970
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cx("snacky-accordion", !!leadingIcon && "snacky-accordion--icon", className), children: [
971
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
998
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: cx("snacky-accordion", !!leadingIcon && "snacky-accordion--icon", className), children: [
999
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
972
1000
  "button",
973
1001
  {
974
1002
  type: "button",
@@ -977,27 +1005,27 @@ function Accordion({ title, leadingIcon, children, defaultOpen = false, classNam
977
1005
  "aria-controls": panelId,
978
1006
  onClick: () => setOpen((v) => !v),
979
1007
  children: [
980
- leadingIcon && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "snacky-accordion__icon", children: leadingIcon }),
981
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "snacky-accordion__title", children: title }),
982
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1008
+ leadingIcon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "snacky-accordion__icon", children: leadingIcon }),
1009
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "snacky-accordion__title", children: title }),
1010
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
983
1011
  "svg",
984
1012
  {
985
1013
  className: cx("snacky-accordion__chevron", open && "snacky-accordion__chevron--open"),
986
1014
  viewBox: "0 0 20 20",
987
1015
  fill: "none",
988
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M5 7.5L10 12.5L15 7.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
1016
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M5 7.5L10 12.5L15 7.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
989
1017
  }
990
1018
  )
991
1019
  ]
992
1020
  }
993
1021
  ),
994
- open && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { id: panelId, className: "snacky-accordion__panel", children })
1022
+ open && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { id: panelId, className: "snacky-accordion__panel", children })
995
1023
  ] });
996
1024
  }
997
1025
 
998
1026
  // src/components/Modal/BottomSheet.tsx
999
1027
  var import_react11 = require("react");
1000
- var import_jsx_runtime25 = require("react/jsx-runtime");
1028
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1001
1029
  function BottomSheet({ open, onDismiss, children, showHandle = false, className }) {
1002
1030
  (0, import_react11.useEffect)(() => {
1003
1031
  if (!open) return;
@@ -1008,7 +1036,7 @@ function BottomSheet({ open, onDismiss, children, showHandle = false, className
1008
1036
  return () => window.removeEventListener("keydown", onKeyDown);
1009
1037
  }, [open, onDismiss]);
1010
1038
  if (!open) return null;
1011
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "snacky-sheet-overlay", onClick: onDismiss, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1039
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "snacky-sheet-overlay", onClick: onDismiss, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1012
1040
  "div",
1013
1041
  {
1014
1042
  className: cx("snacky-sheet", className),
@@ -1016,7 +1044,7 @@ function BottomSheet({ open, onDismiss, children, showHandle = false, className
1016
1044
  "aria-modal": "true",
1017
1045
  onClick: (e) => e.stopPropagation(),
1018
1046
  children: [
1019
- showHandle && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "snacky-sheet__handle" }),
1047
+ showHandle && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "snacky-sheet__handle" }),
1020
1048
  children
1021
1049
  ]
1022
1050
  }
@@ -1024,29 +1052,29 @@ function BottomSheet({ open, onDismiss, children, showHandle = false, className
1024
1052
  }
1025
1053
 
1026
1054
  // src/components/Section/Section.tsx
1027
- var import_jsx_runtime26 = require("react/jsx-runtime");
1055
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1028
1056
  function Section({ title, onAction, children, className }) {
1029
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("section", { className: cx("snacky-section", className), children: [
1030
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "snacky-section__header", children: [
1031
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className: "snacky-section__title", children: title }),
1032
- onAction && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("button", { type: "button", className: "snacky-section__action", onClick: onAction, "aria-label": `See more: ${title}`, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("svg", { viewBox: "0 0 16 16", fill: "none", width: "16", height: "16", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M6 3.5L10.5 8L6 12.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
1057
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("section", { className: cx("snacky-section", className), children: [
1058
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "snacky-section__header", children: [
1059
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className: "snacky-section__title", children: title }),
1060
+ onAction && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconButton, { size: "small", icon: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(angleSmallRight, {}), onClick: onAction, ariaLabel: `See more: ${title}` })
1033
1061
  ] }),
1034
1062
  children
1035
1063
  ] });
1036
1064
  }
1037
1065
 
1038
1066
  // src/components/Stepper/Stepper.tsx
1039
- var import_jsx_runtime27 = require("react/jsx-runtime");
1067
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1040
1068
  function Stepper({ steps, className }) {
1041
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("ol", { className: cx("snacky-stepper", className), children: steps.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1069
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("ol", { className: cx("snacky-stepper", className), children: steps.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1042
1070
  "li",
1043
1071
  {
1044
1072
  className: cx("snacky-stepper__step", i === steps.length - 1 && "snacky-stepper__step--last"),
1045
1073
  children: [
1046
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: cx("snacky-stepper__dot", `snacky-stepper__dot--${step.state}`), children: step.state === "cancelled" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(close, { width: 12, height: 12 }) }),
1047
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "snacky-stepper__body", children: [
1048
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: cx("snacky-stepper__label", `snacky-stepper__label--${step.state}`), children: step.label }),
1049
- step.timestamp && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "snacky-stepper__time", children: step.timestamp })
1074
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: cx("snacky-stepper__dot", `snacky-stepper__dot--${step.state}`), children: step.state === "cancelled" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(close, { width: 12, height: 12 }) }),
1075
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "snacky-stepper__body", children: [
1076
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: cx("snacky-stepper__label", `snacky-stepper__label--${step.state}`), children: step.label }),
1077
+ step.timestamp && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "snacky-stepper__time", children: step.timestamp })
1050
1078
  ] })
1051
1079
  ]
1052
1080
  },
@@ -1055,7 +1083,7 @@ function Stepper({ steps, className }) {
1055
1083
  }
1056
1084
 
1057
1085
  // src/components/Calendar/Calendar.tsx
1058
- var import_jsx_runtime28 = require("react/jsx-runtime");
1086
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1059
1087
  var WEEKDAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
1060
1088
  var MONTHS = [
1061
1089
  "January",
@@ -1102,39 +1130,39 @@ function Calendar({
1102
1130
  const [lo, hi] = range ? [range[0], range[1]].sort((a, b) => a.getTime() - b.getTime()) : [null, null];
1103
1131
  const isEnd = (d) => single && sameDay(d, single) || lo && hi && (sameDay(d, lo) || sameDay(d, hi));
1104
1132
  const isInRange = (d) => lo && hi && d > lo && d < hi;
1105
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cx("snacky-calendar", className), children: [
1106
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "snacky-calendar__header", children: [
1107
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1133
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: cx("snacky-calendar", className), children: [
1134
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "snacky-calendar__header", children: [
1135
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1108
1136
  "button",
1109
1137
  {
1110
1138
  type: "button",
1111
1139
  className: "snacky-calendar__nav",
1112
1140
  onClick: onPrevMonth,
1113
1141
  "aria-label": "Previous month",
1114
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(back, { width: 24, height: 24 })
1142
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(back, { width: 24, height: 24 })
1115
1143
  }
1116
1144
  ),
1117
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "snacky-calendar__label", children: [
1145
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "snacky-calendar__label", children: [
1118
1146
  MONTHS[month.getMonth()],
1119
1147
  " ",
1120
1148
  month.getFullYear()
1121
1149
  ] }),
1122
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1150
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1123
1151
  "button",
1124
1152
  {
1125
1153
  type: "button",
1126
1154
  className: "snacky-calendar__nav snacky-calendar__nav--next",
1127
1155
  onClick: onNextMonth,
1128
1156
  "aria-label": "Next month",
1129
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(back, { width: 24, height: 24 })
1157
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(back, { width: 24, height: 24 })
1130
1158
  }
1131
1159
  )
1132
1160
  ] }),
1133
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "snacky-calendar__grid", children: [
1134
- WEEKDAYS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "snacky-calendar__weekday", children: d }, d)),
1161
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "snacky-calendar__grid", children: [
1162
+ WEEKDAYS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "snacky-calendar__weekday", children: d }, d)),
1135
1163
  days.map((d, i) => {
1136
1164
  const outside = d.getMonth() !== month.getMonth();
1137
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1165
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
1138
1166
  "button",
1139
1167
  {
1140
1168
  type: "button",
@@ -1148,26 +1176,26 @@ function Calendar({
1148
1176
  disabled: outside,
1149
1177
  "aria-current": isEnd(d) ? "date" : void 0,
1150
1178
  children: [
1151
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "snacky-calendar__day-number", children: d.getDate() }),
1152
- marked.some((m) => sameDay(m, d)) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "snacky-calendar__marker" })
1179
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "snacky-calendar__day-number", children: d.getDate() }),
1180
+ marked.some((m) => sameDay(m, d)) && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "snacky-calendar__marker" })
1153
1181
  ]
1154
1182
  },
1155
1183
  i
1156
1184
  );
1157
1185
  })
1158
1186
  ] }),
1159
- onAction && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button, { onClick: onAction, style: { width: "100%" }, children: actionLabel })
1187
+ onAction && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { onClick: onAction, style: { width: "100%" }, children: actionLabel })
1160
1188
  ] });
1161
1189
  }
1162
1190
 
1163
1191
  // src/components/Avatar/Avatar.tsx
1164
- var import_jsx_runtime29 = require("react/jsx-runtime");
1192
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1165
1193
  function Avatar({ src, alt, size = "md", className }) {
1166
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { src, alt, className: cx("snacky-avatar", `snacky-avatar--${size}`, className) });
1194
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src, alt, className: cx("snacky-avatar", `snacky-avatar--${size}`, className) });
1167
1195
  }
1168
1196
 
1169
1197
  // src/components/Illustration/Illustration.tsx
1170
- var import_jsx_runtime30 = require("react/jsx-runtime");
1198
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1171
1199
  var SIZE = {
1172
1200
  empty: { width: 268, height: 200 },
1173
1201
  createAccount: { width: 360, height: 240 },
@@ -1177,54 +1205,54 @@ var SIZE = {
1177
1205
  };
1178
1206
  function Illustration({ variant, src, alt, className }) {
1179
1207
  const { width, height } = SIZE[variant];
1180
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src, alt, width, height, className: cx("snacky-illustration", className) });
1208
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("img", { src, alt, width, height, className: cx("snacky-illustration", className) });
1181
1209
  }
1182
1210
 
1183
1211
  // src/components/ProductImage/ProductImage.tsx
1184
- var import_jsx_runtime31 = require("react/jsx-runtime");
1212
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1185
1213
  function ProductImage({ src, alt, usage, sold = false, className }) {
1186
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: cx("snacky-product-image-wrap", `snacky-product-image-wrap--${usage}`, className), children: [
1187
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("img", { src, alt, className: cx("snacky-product-image", `snacky-product-image--${usage}`) }),
1188
- sold && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "snacky-product-image-sold-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "snacky-product-image-sold-label", children: "Sold Out" }) })
1214
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: cx("snacky-product-image-wrap", `snacky-product-image-wrap--${usage}`, className), children: [
1215
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("img", { src, alt, className: cx("snacky-product-image", `snacky-product-image--${usage}`) }),
1216
+ sold && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-image-sold-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-image-sold-label", children: "Sold Out" }) })
1189
1217
  ] });
1190
1218
  }
1191
1219
 
1192
1220
  // src/components/ProductCard/ProductCard.tsx
1193
- var import_jsx_runtime32 = require("react/jsx-runtime");
1221
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1194
1222
  function ProductCard(props) {
1195
1223
  if (props.variant === "details") {
1196
1224
  const { productName: productName2, imageUrl: imageUrl2, price: price2, rating: rating2, originalPrice: originalPrice2, discountLabel: discountLabel2, ratingCount, favorited, onFavoriteClick, onShareClick, onChatClick, sold, ratingIcon: ratingIcon2, favoriteIcon, shareIcon, chatIcon, onClick: onClick2, className: className2 } = props;
1197
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cx("snacky-product-card", "snacky-product-card--details", className2), children: [
1198
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "snacky-product-card__image-block", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "snacky-product-card__image-wrap", onClick: onClick2, children: [
1199
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("img", { className: "snacky-product-card__image", src: imageUrl2, alt: productName2 }),
1200
- sold && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-card__sold-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SoldOutBadge, {}) })
1225
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cx("snacky-product-card", "snacky-product-card--details", className2), children: [
1226
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "snacky-product-card__image-block", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "snacky-product-card__image-wrap", onClick: onClick2, children: [
1227
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { className: "snacky-product-card__image", src: imageUrl2, alt: productName2 }),
1228
+ sold && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "snacky-product-card__sold-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SoldOutBadge, {}) })
1201
1229
  ] }) }),
1202
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "snacky-product-card__details-body", children: [
1203
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "snacky-product-card__name", children: productName2 }),
1204
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "snacky-product-card__price-row", children: [
1205
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-card__price", children: price2 }),
1206
- originalPrice2 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-card__original-price", children: originalPrice2 }),
1207
- discountLabel2 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DiscountTag, { label: discountLabel2 })
1230
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "snacky-product-card__details-body", children: [
1231
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "snacky-product-card__name", children: productName2 }),
1232
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "snacky-product-card__price-row", children: [
1233
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "snacky-product-card__price", children: price2 }),
1234
+ originalPrice2 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "snacky-product-card__original-price", children: originalPrice2 }),
1235
+ discountLabel2 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DiscountTag, { label: discountLabel2 })
1208
1236
  ] }),
1209
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "snacky-product-card__footer-row", children: [
1210
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "snacky-product-card__rating", children: [
1211
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-card__rating-icon", children: ratingIcon2 ?? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(star, { width: 16, height: 16 }) }),
1237
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "snacky-product-card__footer-row", children: [
1238
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "snacky-product-card__rating", children: [
1239
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "snacky-product-card__rating-icon", children: ratingIcon2 ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(star, { width: 16, height: 16 }) }),
1212
1240
  rating2,
1213
1241
  " (",
1214
1242
  ratingCount,
1215
1243
  ")"
1216
1244
  ] }),
1217
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "snacky-product-card__actions snacky-product-card__actions--details", children: [
1218
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconButton, { variant: "secondary", icon: favoriteIcon ?? (favorited ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(heart2, { width: 20, height: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(heart, { width: 20, height: 20 })), selected: favorited, onClick: onFavoriteClick, ariaLabel: "Favorite" }),
1219
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconButton, { variant: "secondary", icon: shareIcon ?? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(share, { width: 20, height: 20 }), onClick: onShareClick, ariaLabel: "Share" }),
1220
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconButton, { variant: "secondary", icon: chatIcon ?? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(chat, { width: 20, height: 20 }), onClick: onChatClick, ariaLabel: "Chat with seller" })
1245
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "snacky-product-card__actions snacky-product-card__actions--details", children: [
1246
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconButton, { variant: "secondary", icon: favoriteIcon ?? (favorited ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(heart2, { width: 20, height: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(heart, { width: 20, height: 20 })), selected: favorited, onClick: onFavoriteClick, ariaLabel: "Favorite" }),
1247
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconButton, { variant: "secondary", icon: shareIcon ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(share, { width: 20, height: 20 }), onClick: onShareClick, ariaLabel: "Share" }),
1248
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconButton, { variant: "secondary", icon: chatIcon ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(chat, { width: 20, height: 20 }), onClick: onChatClick, ariaLabel: "Chat with seller" })
1221
1249
  ] })
1222
1250
  ] })
1223
1251
  ] })
1224
1252
  ] });
1225
1253
  }
1226
1254
  const { productName, imageUrl, price, rating, originalPrice, discountLabel, onAddToCart, cartIcon, ratingIcon, onClick, className } = props;
1227
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1255
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1228
1256
  "div",
1229
1257
  {
1230
1258
  className: cx("snacky-product-card", "snacky-product-card--list", className),
@@ -1233,25 +1261,25 @@ function ProductCard(props) {
1233
1261
  onClick,
1234
1262
  onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && onClick?.(),
1235
1263
  children: [
1236
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "snacky-product-card__image-wrap", children: [
1237
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("img", { className: "snacky-product-card__image", src: imageUrl, alt: productName }),
1238
- discountLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-card__discount", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DiscountTag, { label: discountLabel }) })
1264
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "snacky-product-card__image-wrap", children: [
1265
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { className: "snacky-product-card__image", src: imageUrl, alt: productName }),
1266
+ discountLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "snacky-product-card__discount", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DiscountTag, { label: discountLabel }) })
1239
1267
  ] }),
1240
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "snacky-product-card__name", children: productName }),
1241
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "snacky-product-card__price-row", children: [
1242
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-card__price", children: price }),
1243
- originalPrice && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-card__original-price", children: originalPrice })
1268
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "snacky-product-card__name", children: productName }),
1269
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "snacky-product-card__price-row", children: [
1270
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "snacky-product-card__price", children: price }),
1271
+ originalPrice && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "snacky-product-card__original-price", children: originalPrice })
1244
1272
  ] }),
1245
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "snacky-product-card__footer-row", children: [
1246
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "snacky-product-card__rating", children: [
1247
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "snacky-product-card__rating-icon", children: ratingIcon ?? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(star, { width: 16, height: 16 }) }),
1273
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "snacky-product-card__footer-row", children: [
1274
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "snacky-product-card__rating", children: [
1275
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "snacky-product-card__rating-icon", children: ratingIcon ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(star, { width: 16, height: 16 }) }),
1248
1276
  rating
1249
1277
  ] }),
1250
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1278
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1251
1279
  IconButton,
1252
1280
  {
1253
1281
  variant: "primary",
1254
- icon: cartIcon ?? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(cartAdd, { width: 16, height: 16 }),
1282
+ icon: cartIcon ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(cartAdd, { width: 16, height: 16 }),
1255
1283
  onClick: (e) => {
1256
1284
  e.stopPropagation();
1257
1285
  onAddToCart();
@@ -1266,17 +1294,17 @@ function ProductCard(props) {
1266
1294
  }
1267
1295
 
1268
1296
  // src/components/ImagePlaceholder/ImagePlaceholder.tsx
1269
- var import_jsx_runtime33 = require("react/jsx-runtime");
1297
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1270
1298
  function ImagePlaceholder({ width, height, className }) {
1271
1299
  const iconSize = Math.round(Math.min(width, height) * 0.32);
1272
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1300
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1273
1301
  "div",
1274
1302
  {
1275
1303
  className: cx("snacky-image-placeholder", className),
1276
1304
  style: { width, height },
1277
1305
  role: "img",
1278
1306
  "aria-label": "No image",
1279
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1307
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
1280
1308
  "svg",
1281
1309
  {
1282
1310
  width: iconSize,
@@ -1288,9 +1316,9 @@ function ImagePlaceholder({ width, height, className }) {
1288
1316
  strokeLinecap: "round",
1289
1317
  strokeLinejoin: "round",
1290
1318
  children: [
1291
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
1292
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5", fill: "currentColor", stroke: "none" }),
1293
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("polyline", { points: "21 15 16 10 5 21" })
1319
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
1320
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("circle", { cx: "8.5", cy: "8.5", r: "1.5", fill: "currentColor", stroke: "none" }),
1321
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("polyline", { points: "21 15 16 10 5 21" })
1294
1322
  ]
1295
1323
  }
1296
1324
  )
@@ -1324,6 +1352,7 @@ function ImagePlaceholder({ width, height, className }) {
1324
1352
  NotificationListItem,
1325
1353
  OrderListItem,
1326
1354
  OtpField,
1355
+ PageIndicator,
1327
1356
  PointBalanceBanner,
1328
1357
  ProductCard,
1329
1358
  ProductChip,