@mohasinac/appkit 4.11.3 → 4.12.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.
Files changed (103) hide show
  1. package/dist/_internal/server/features/checkout/actions.d.ts +36 -3
  2. package/dist/_internal/server/features/checkout/actions.js +122 -44
  3. package/dist/_internal/server/features/orders/adapters.js +13 -0
  4. package/dist/_internal/server/features/products/list-public.d.ts +28 -0
  5. package/dist/_internal/server/features/products/list-public.js +92 -0
  6. package/dist/_internal/server/jobs/core/auctionSettlement.js +5 -2
  7. package/dist/_internal/shared/checkout/lanes.d.ts +20 -0
  8. package/dist/_internal/shared/checkout/lanes.js +28 -0
  9. package/dist/_internal/shared/features/checkout/config.d.ts +4 -0
  10. package/dist/_internal/shared/features/checkout/config.js +8 -0
  11. package/dist/_internal/shared/fees/calculator.d.ts +34 -2
  12. package/dist/_internal/shared/fees/calculator.js +45 -1
  13. package/dist/client.d.ts +7 -1
  14. package/dist/client.js +4 -1
  15. package/dist/constants/api-endpoints.d.ts +6 -0
  16. package/dist/constants/api-endpoints.js +2 -0
  17. package/dist/features/admin/components/AdminAddressesView.js +18 -10
  18. package/dist/features/admin/components/AdminArtView.d.ts +9 -0
  19. package/dist/features/admin/components/AdminArtView.js +11 -35
  20. package/dist/features/admin/components/AdminClassifiedView.d.ts +9 -0
  21. package/dist/features/admin/components/AdminClassifiedView.js +11 -35
  22. package/dist/features/admin/components/AdminDigitalCodesView.d.ts +9 -0
  23. package/dist/features/admin/components/AdminDigitalCodesView.js +11 -42
  24. package/dist/features/admin/components/AdminLiveView.d.ts +9 -0
  25. package/dist/features/admin/components/AdminLiveView.js +11 -41
  26. package/dist/features/admin/components/AdminOrderEditorView.d.ts +8 -1
  27. package/dist/features/admin/components/AdminOrderEditorView.js +4 -3
  28. package/dist/features/admin/components/AdminOrdersView.js +14 -1
  29. package/dist/features/admin/components/AdminPaymentMethodsView.js +15 -10
  30. package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
  31. package/dist/features/admin/components/AdminSiteSettingsView.js +4 -2
  32. package/dist/features/admin/components/AdminStickersView.d.ts +9 -0
  33. package/dist/features/admin/components/AdminStickersView.js +11 -35
  34. package/dist/features/admin/hooks/useAdminListing.js +7 -2
  35. package/dist/features/admin/schemas/firestore.d.ts +5 -0
  36. package/dist/features/admin/schemas/firestore.js +1 -0
  37. package/dist/features/auctions/actions/bid-actions.js +2 -2
  38. package/dist/features/cart/components/CartDrawer.d.ts +9 -1
  39. package/dist/features/cart/components/CartDrawer.js +4 -3
  40. package/dist/features/cart/components/CartPriceBreakdown.d.ts +61 -0
  41. package/dist/features/cart/components/CartPriceBreakdown.js +25 -0
  42. package/dist/features/cart/components/StoreAddonsPicker.d.ts +47 -0
  43. package/dist/features/cart/components/StoreAddonsPicker.js +21 -0
  44. package/dist/features/cart/components/index.d.ts +4 -0
  45. package/dist/features/cart/components/index.js +2 -0
  46. package/dist/features/cart/repository/cart.repository.d.ts +20 -2
  47. package/dist/features/cart/repository/cart.repository.js +49 -0
  48. package/dist/features/cart/schemas/firestore.d.ts +26 -0
  49. package/dist/features/layout/BottomActions.js +37 -4
  50. package/dist/features/layout/BottomActionsContext.d.ts +12 -0
  51. package/dist/features/layout/BottomActionsContext.js +5 -0
  52. package/dist/features/layout/hooks/useBottomActions.d.ts +6 -0
  53. package/dist/features/layout/hooks/useBottomActions.js +11 -1
  54. package/dist/features/orders/components/OrderAddonBadges.d.ts +36 -0
  55. package/dist/features/orders/components/OrderAddonBadges.js +28 -0
  56. package/dist/features/orders/components/index.d.ts +1 -0
  57. package/dist/features/orders/components/index.js +1 -0
  58. package/dist/features/orders/repository/orders.repository.d.ts +32 -0
  59. package/dist/features/orders/repository/orders.repository.js +14 -0
  60. package/dist/features/orders/types/index.d.ts +22 -0
  61. package/dist/features/products/components/ArtStickersListView.js +5 -4
  62. package/dist/features/products/components/PrizeDrawsListingView.js +18 -33
  63. package/dist/features/products/components/ProductsIndexListing.js +87 -11
  64. package/dist/features/products/components/ProductsIndexPageView.js +14 -2
  65. package/dist/features/products/config/listing-type-listing-config.d.ts +31 -0
  66. package/dist/features/products/config/listing-type-listing-config.js +74 -0
  67. package/dist/features/products/hooks/useProducts.js +14 -0
  68. package/dist/features/products/types/index.d.ts +15 -0
  69. package/dist/features/seller/components/SellerOrdersView.js +2 -1
  70. package/dist/features/stores/components/StoreArtStickersPageView.d.ts +21 -0
  71. package/dist/features/stores/components/StoreArtStickersPageView.js +30 -0
  72. package/dist/features/stores/components/StoreAuctionsPageView.d.ts +4 -1
  73. package/dist/features/stores/components/StoreAuctionsPageView.js +17 -17
  74. package/dist/features/stores/components/StoreClassifiedsListing.js +7 -0
  75. package/dist/features/stores/components/StoreClassifiedsPageView.d.ts +4 -1
  76. package/dist/features/stores/components/StoreClassifiedsPageView.js +16 -12
  77. package/dist/features/stores/components/StoreDetailLayoutView.js +4 -3
  78. package/dist/features/stores/components/StoreDigitalCodesListing.js +5 -0
  79. package/dist/features/stores/components/StoreDigitalCodesPageView.d.ts +4 -1
  80. package/dist/features/stores/components/StoreDigitalCodesPageView.js +16 -12
  81. package/dist/features/stores/components/StoreLiveItemsListing.js +7 -0
  82. package/dist/features/stores/components/StoreLiveItemsPageView.d.ts +4 -1
  83. package/dist/features/stores/components/StoreLiveItemsPageView.js +16 -12
  84. package/dist/features/stores/components/StorePreOrdersPageView.d.ts +4 -1
  85. package/dist/features/stores/components/StorePreOrdersPageView.js +17 -17
  86. package/dist/features/stores/components/StorePrizeDrawsPageView.d.ts +4 -8
  87. package/dist/features/stores/components/StorePrizeDrawsPageView.js +17 -22
  88. package/dist/features/stores/components/StoreProductsListing.d.ts +7 -1
  89. package/dist/features/stores/components/StoreProductsListing.js +3 -2
  90. package/dist/features/stores/components/StoreProductsPageView.d.ts +1 -1
  91. package/dist/features/stores/components/StoreProductsPageView.js +16 -21
  92. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +602 -0
  93. package/dist/next/routing/route-map.d.ts +2 -0
  94. package/dist/next/routing/route-map.js +5 -0
  95. package/dist/seed/reviews-seed-data.js +52 -0
  96. package/dist/server-entry.d.ts +1 -0
  97. package/dist/server-entry.js +1 -0
  98. package/dist/styles.css +12 -1
  99. package/dist/tailwind-utilities.css +1 -1
  100. package/dist/ui/components/Checkbox.d.ts +10 -1
  101. package/dist/ui/components/Checkbox.js +14 -2
  102. package/dist/ui/components/Checkbox.style.css +11 -0
  103. package/package.json +1 -1
@@ -12,5 +12,14 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
12
12
  * (border, padding, hover state) and just need the underlying control.
13
13
  */
14
14
  bare?: boolean;
15
+ /**
16
+ * Classes for the OUTER wrapper `<div>` — the element that is the real flex
17
+ * child when this checkbox sits inside a `<Row>`/flex container. `className`
18
+ * only ever reaches the inner `<input>`, so sizing/flex utilities passed
19
+ * there are silently inert (Recurrent Root Cause #29 — same defect `Select`
20
+ * ships `wrapperClassName` for). Use this for `flex-shrink-0`, `min-w-*`,
21
+ * margins, alignment — anything positioning the control within its parent.
22
+ */
23
+ wrapperClassName?: string;
15
24
  }
16
- export declare function Checkbox({ label, suffix, error, indeterminate, type, bare, className, checked, disabled, id, ...props }: CheckboxProps): React.JSX.Element;
25
+ export declare function Checkbox({ label, suffix, error, indeterminate, type, bare, className, wrapperClassName, checked, disabled, id, ...props }: CheckboxProps): React.JSX.Element;
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { Label, Span, Text } from "./Typography";
5
+ const UI_CHECKBOX_INLINE = "appkit-checkbox--inline";
5
6
  const UI_CHECKBOX = {
6
7
  base: "appkit-checkbox",
7
8
  label: "appkit-checkbox__label",
@@ -14,7 +15,7 @@ const UI_CHECKBOX = {
14
15
  text: "appkit-checkbox__text",
15
16
  error: "appkit-checkbox__error",
16
17
  };
17
- export function Checkbox({ label, suffix, error, indeterminate = false, type = "checkbox", bare = false, className = "", checked, disabled, id, ...props }) {
18
+ export function Checkbox({ label, suffix, error, indeterminate = false, type = "checkbox", bare = false, className = "", wrapperClassName = "", checked, disabled, id, ...props }) {
18
19
  const generatedId = React.useId();
19
20
  const inputId = id ?? generatedId;
20
21
  const inputRef = React.useRef(null);
@@ -26,7 +27,18 @@ export function Checkbox({ label, suffix, error, indeterminate = false, type = "
26
27
  if (bare) {
27
28
  return (_jsx("input", { ...props, ref: inputRef, id: inputId, type: type, checked: checked, disabled: disabled, "aria-invalid": error ? "true" : undefined, className: className }));
28
29
  }
29
- return (_jsxs("div", { className: UI_CHECKBOX.base, "data-section": "checkbox-div-467", children: [_jsxs(Label, { htmlFor: inputId, className: [
30
+ // A checkbox with no label/suffix has no text to lay out beside the box, so
31
+ // the default `width: 100%` on the root serves no purpose and actively harms
32
+ // it: as a flex child it claims the whole row and squeezes its siblings to
33
+ // zero. `--inline` makes it size to its content instead.
34
+ const isInline = !label && !suffix;
35
+ return (_jsxs("div", { className: [
36
+ UI_CHECKBOX.base,
37
+ isInline ? UI_CHECKBOX_INLINE : "",
38
+ wrapperClassName,
39
+ ]
40
+ .filter(Boolean)
41
+ .join(" "), "data-section": "checkbox-div-467", children: [_jsxs(Label, { htmlFor: inputId, className: [
30
42
  UI_CHECKBOX.label,
31
43
  disabled ? UI_CHECKBOX.labelDisabled : "",
32
44
  ]
@@ -4,6 +4,17 @@
4
4
  width: 100%;
5
5
  }
6
6
 
7
+ /*
8
+ * Label-less checkbox: size to the control, never claim the parent's width.
9
+ * Applied automatically by Checkbox.tsx when there is no label/suffix — a bare
10
+ * box inside a <Row> is a flex child, and `width: 100%` there starves its
11
+ * siblings (Recurrent Root Cause #29).
12
+ */
13
+ .appkit-checkbox--inline {
14
+ width: auto;
15
+ flex-shrink: 0;
16
+ }
17
+
7
18
  .appkit-checkbox__label {
8
19
  display: inline-flex;
9
20
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "4.11.3",
3
+ "version": "4.12.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"