@sonic-equipment/ui 132.0.0 → 133.0.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 (82) hide show
  1. package/dist/address/address.d.ts +2 -13
  2. package/dist/buttons/add-to-cart-button/connected-add-to-cart-button.js +1 -1
  3. package/dist/buttons/button/button.js +2 -1
  4. package/dist/delivery-time/delivery-time.js +6 -5
  5. package/dist/display/info-display/info-display.d.ts +7 -0
  6. package/dist/display/info-display/info-display.js +8 -0
  7. package/dist/display/info-display/info-display.module.css.js +3 -0
  8. package/dist/exports.d.ts +13 -5
  9. package/dist/forms/input/input.d.ts +1 -0
  10. package/dist/forms/input/input.js +5 -3
  11. package/dist/forms/input/input.module.css.js +1 -1
  12. package/dist/forms/switch/switch.d.ts +2 -1
  13. package/dist/forms/switch/switch.js +2 -2
  14. package/dist/forms/text-field/password-reveal-toggle/password-reveal-toggle.d.ts +10 -0
  15. package/dist/forms/text-field/password-reveal-toggle/password-reveal-toggle.js +18 -0
  16. package/dist/forms/text-field/password-reveal-toggle/password-reveal-toggle.module.css.js +3 -0
  17. package/dist/forms/text-field/text-field.d.ts +3 -3
  18. package/dist/forms/text-field/text-field.js +9 -2
  19. package/dist/icons/stroke/stroke-dehashed-icon.js +7 -0
  20. package/dist/icons/stroke/stroke-hashed-icon.js +7 -0
  21. package/dist/index.js +14 -6
  22. package/dist/intl/translation-id.d.ts +1 -1
  23. package/dist/pages/checkout/cart-page/cart-page.js +6 -9
  24. package/dist/pages/checkout/cart-page/components/empty-cart-page.d.ts +1 -0
  25. package/dist/pages/checkout/cart-page/components/empty-cart-page.js +11 -0
  26. package/dist/pages/checkout/components/billing-and-invoice-information.d.ts +7 -0
  27. package/dist/pages/checkout/components/billing-and-invoice-information.js +12 -0
  28. package/dist/pages/checkout/components/billing-and-invoice-information.module.css.js +3 -0
  29. package/dist/pages/checkout/constants.d.ts +8 -0
  30. package/dist/pages/checkout/constants.js +10 -0
  31. package/dist/pages/checkout/layouts/checkout-page-layout/components/checkout-page-section.module.css.js +1 -1
  32. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page.d.ts +4 -0
  33. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page.js +115 -0
  34. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page.module.css.js +3 -0
  35. package/dist/{checkout → pages/checkout/payment-page/components}/adyen-payment.js +5 -5
  36. package/dist/pages/checkout/payment-page/components/adyen-payment.module.css.js +3 -0
  37. package/dist/{checkout → pages/checkout/payment-page/components}/payment.d.ts +4 -2
  38. package/dist/{checkout → pages/checkout/payment-page/components}/payment.js +74 -44
  39. package/dist/pages/checkout/payment-page/components/payment.module.css.js +3 -0
  40. package/dist/pages/checkout/payment-page/payment-page.js +16 -10
  41. package/dist/{checkout → pages/checkout/payment-page/utils}/parse-amount.js +1 -1
  42. package/dist/pages/checkout/shipping-page/components/edit-address.js +8 -4
  43. package/dist/pages/checkout/shipping-page/hooks/use-patch-shipping-details.d.ts +12 -0
  44. package/dist/pages/checkout/shipping-page/hooks/use-patch-shipping-details.js +21 -0
  45. package/dist/pages/checkout/shipping-page/shipping-page.js +37 -51
  46. package/dist/pages/checkout/shipping-page/shipping-page.module.css.js +1 -1
  47. package/dist/pages/components/page/page.d.ts +3 -2
  48. package/dist/pages/components/page/page.js +3 -2
  49. package/dist/pages/components/page-meta-data/page-meta-data.d.ts +3 -4
  50. package/dist/pages/components/page-meta-data/page-meta-data.js +2 -2
  51. package/dist/pages/product/product-details-page/product-details-page.js +2 -10
  52. package/dist/pages/product/product-details-page/product-details.js +10 -4
  53. package/dist/pages/product/product-listing-page/product-listing-page-data-types.d.ts +1 -1
  54. package/dist/pages/product/product-listing-page/product-listing-page.js +2 -10
  55. package/dist/pages/product/product-listing-page/product-listing.js +8 -1
  56. package/dist/pages/product/search-result-page/search-results-page.js +4 -7
  57. package/dist/shared/api/bff/model/bff.model.d.ts +4 -4
  58. package/dist/shared/api/bff/services/bff-service.js +1 -4
  59. package/dist/shared/api/storefront/hooks/cart/use-fetch-cart-by-id.d.ts +8 -0
  60. package/dist/shared/api/storefront/hooks/cart/use-fetch-cart-by-id.js +20 -0
  61. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-count.d.ts +1 -1
  62. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart-count.js +3 -3
  63. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.d.ts +2 -5
  64. package/dist/shared/api/storefront/hooks/cart/use-fetch-current-cart.js +3 -16
  65. package/dist/shared/api/storefront/hooks/cart/use-patch-cart.js +11 -8
  66. package/dist/shared/api/storefront/hooks/cart/use-place-order.js +2 -2
  67. package/dist/shared/model/address.d.ts +13 -0
  68. package/dist/shared/providers/react-query-container.d.ts +2 -1
  69. package/dist/shared/providers/react-query-container.js +2 -2
  70. package/dist/shared/utils/date.d.ts +2 -0
  71. package/dist/shared/utils/date.js +11 -1
  72. package/dist/styles.css +331 -261
  73. package/dist/tooltip/tooltip.js +10 -5
  74. package/package.json +1 -1
  75. package/dist/checkout/adyen-payment.module.css.js +0 -3
  76. package/dist/checkout/payment.module.css.js +0 -3
  77. /package/dist/{checkout → pages/checkout/payment-page/components}/adyen-payment.d.ts +0 -0
  78. /package/dist/{checkout → pages/checkout/payment-page/hooks}/use-get-adyen-redirect-result.d.ts +0 -0
  79. /package/dist/{checkout → pages/checkout/payment-page/hooks}/use-get-adyen-redirect-result.js +0 -0
  80. /package/dist/{checkout → pages/checkout/payment-page/hooks}/use-has-returned-from-adyen.d.ts +0 -0
  81. /package/dist/{checkout → pages/checkout/payment-page/hooks}/use-has-returned-from-adyen.js +0 -0
  82. /package/dist/{checkout → pages/checkout/payment-page/utils}/parse-amount.d.ts +0 -0
@@ -1,5 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useRef, useMemo, cloneElement } from 'react';
3
+ import { usePress } from 'react-aria';
3
4
  import { DialogTrigger, Popover, OverlayArrow, Dialog } from 'react-aria-components';
4
5
  import { IconButton } from '../buttons/icon-button/icon-button.js';
5
6
  import { StrokeInformationIcon } from '../icons/stroke/stroke-information-icon.js';
@@ -9,13 +10,17 @@ import styles from './tooltip.module.css.js';
9
10
  function InfoIcon(props) {
10
11
  return (jsx(IconButton, { ...props, className: styles.trigger, children: jsx(StrokeInformationIcon, {}) }));
11
12
  }
13
+ function TriggerButton({ buttonRef, trigger, }) {
14
+ const { pressProps } = usePress({ ref: buttonRef });
15
+ const triggerWithHandler = useMemo(() => cloneElement(trigger, {
16
+ ...pressProps,
17
+ }), [trigger, pressProps]);
18
+ return (jsx("div", { ref: buttonRef, className: styles['trigger-wrapper'], children: triggerWithHandler }));
19
+ }
12
20
  function Tooltip({ offset, placement = 'bottom', text, trigger = jsx(InfoIcon, {}), }) {
13
- const { isOpen, setIsOpen, toggle } = useDisclosure();
21
+ const { isOpen, setIsOpen } = useDisclosure();
14
22
  const triggerRef = useRef(null);
15
- const triggerWithHandler = useMemo(() => cloneElement(trigger, {
16
- onClick: toggle,
17
- }), [trigger, toggle]);
18
- return (jsxs(DialogTrigger, { isOpen: isOpen, onOpenChange: setIsOpen, children: [jsx("div", { ref: triggerRef, className: styles['trigger-wrapper'], children: triggerWithHandler }), jsxs(Popover, { className: styles.popover, offset: offset, placement: placement, triggerRef: triggerRef, children: [jsx(OverlayArrow, { className: styles.arrow, children: jsx("svg", { height: 12, viewBox: "0 0 12 12", width: 12, children: jsx("path", { d: "M0 0 L6 6 L12 0" }) }) }), jsx(Dialog, { className: styles.dialog, children: text })] })] }));
23
+ return (jsxs(DialogTrigger, { isOpen: isOpen, onOpenChange: setIsOpen, children: [jsx(TriggerButton, { buttonRef: triggerRef, trigger: trigger }), jsxs(Popover, { className: styles.popover, offset: offset, placement: placement, triggerRef: triggerRef, children: [jsx(OverlayArrow, { className: styles.arrow, children: jsx("svg", { height: 12, viewBox: "0 0 12 12", width: 12, children: jsx("path", { d: "M0 0 L6 6 L12 0" }) }) }), jsx(Dialog, { className: styles.dialog, children: text })] })] }));
19
24
  }
20
25
 
21
26
  export { Tooltip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "132.0.0",
3
+ "version": "133.0.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,3 +0,0 @@
1
- var styles = {"loading":"adyen-payment-module-liZWP"};
2
-
3
- export { styles as default };
@@ -1,3 +0,0 @@
1
- var styles = {"error-message":"payment-module-cF0-P","payment-form":"payment-module-XsBSV","delivery-date":"payment-module-yoZKM","asap-checkbox":"payment-module-iKZK1","invoice-and-shipping":"payment-module-RHQBy","content":"payment-module-3hHuC","section":"payment-module-Vdgdo","label":"payment-module-Hpq8j"};
2
-
3
- export { styles as default };