@sonic-equipment/ui 0.0.80 → 0.0.82

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 (31) hide show
  1. package/dist/index.d.ts +19 -31
  2. package/dist/index.js +780 -670
  3. package/dist/src/buttons/button/button.d.ts +3 -5
  4. package/dist/src/buttons/button/button.stories.d.ts +1 -2
  5. package/dist/src/buttons/icon-button/icon-button.d.ts +2 -2
  6. package/dist/src/buttons/icon-button/icon-button.stories.d.ts +1 -1
  7. package/dist/src/buttons/link/link.d.ts +4 -9
  8. package/dist/src/buttons/link/link.stories.d.ts +1 -1
  9. package/dist/src/cards/category-card/category-card.d.ts +2 -1
  10. package/dist/src/cards/product-card/{connected-product-cart.d.ts → connected-product-card.d.ts} +1 -2
  11. package/dist/src/cards/product-card/product-card.d.ts +4 -5
  12. package/dist/src/carousel/carousel-navigation-button.d.ts +5 -2
  13. package/dist/src/carousel/pagination/pagination.d.ts +14 -0
  14. package/dist/src/carousel/pagination/pagination.stories.d.ts +14 -0
  15. package/dist/src/carousel/pagination/transitions.d.ts +34 -0
  16. package/dist/src/carousel/usp-carousel/product-usp-carousel.d.ts +12 -0
  17. package/dist/src/carousel/usp-carousel/product-usp-carousel.stories.d.ts +27 -0
  18. package/dist/src/carousel/usp-carousel/usp-carousel.d.ts +2 -2
  19. package/dist/src/global-search/categories-grid/categories-grid.stories.d.ts +14 -0
  20. package/dist/src/media/image-lightbox/image-lightbox.d.ts +8 -0
  21. package/dist/src/media/image-lightbox/image-lightbox.stories.d.ts +13 -0
  22. package/dist/src/modals/modal/modal.d.ts +3 -1
  23. package/dist/src/modals/modal/modal.stories.d.ts +11 -0
  24. package/dist/src/pages/product-details-page/components/product-details-images/product-detail-images.d.ts +6 -0
  25. package/dist/src/shared/hooks/use-resize-observer.d.ts +1 -1
  26. package/dist/src/shared/routing/route-button.d.ts +1 -0
  27. package/dist/src/shared/routing/route-link.d.ts +4 -2
  28. package/dist/styles.css +399 -151
  29. package/package.json +3 -3
  30. /package/dist/src/{usp/product-usp.d.ts → carousel/usp-carousel/product-usp-carousel-slide.d.ts} +0 -0
  31. /package/dist/src/pages/product-details-page/components/{product-details-panel.d.ts → product-details-panel/product-details-panel.d.ts} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { ReactElement, MutableRefObject, ReactNode, RefAttributes, MouseEvent, FormEventHandler, KeyboardEvent, ComponentType } from 'react';
2
+ import { ReactElement, MutableRefObject, ReactNode, AnchorHTMLAttributes, MouseEvent, FormEventHandler, KeyboardEvent, ComponentType } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { LinkProps as LinkProps$2, PressEvent } from 'react-aria-components';
5
4
  import { Hit } from '@algolia/client-search';
6
5
  import * as algoliasearch from 'algoliasearch';
7
6
  import { SearchClient } from 'algoliasearch';
@@ -4117,24 +4116,19 @@ declare function RouteProvider({ children, navigate }: RouteProviderProps): reac
4117
4116
  declare function useOnNavigate(callback?: NavigateFn): NavigateFn;
4118
4117
  declare function useNavigate(): NavigateFn;
4119
4118
 
4120
- interface LinkProps$1
4121
- extends LinkProps$2,
4122
- RefAttributes<HTMLAnchorElement> {
4119
+ interface LinkProps$1 extends AnchorHTMLAttributes<HTMLAnchorElement> {
4123
4120
  areaSelected?: boolean
4124
- className?: string
4125
4121
  color?: 'primary' | 'secondary'
4126
4122
  hasUnderline?: boolean
4127
- id?: string
4128
- onClick?(event: MouseEvent): void
4129
- onMouseDown?(event: MouseEvent): void
4130
- onMouseMove?(event: MouseEvent): void
4123
+ isDisabled?: boolean
4131
4124
  role?: 'option'
4132
4125
  }
4133
4126
 
4134
- interface RouteLinkProps extends LinkProps$1 {
4127
+ interface RouteLinkProps extends Omit<LinkProps$1, 'onPress'> {
4128
+ onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
4135
4129
  route?: NavigateOptions;
4136
4130
  }
4137
- declare function RouteLink({ children, onClick: _onClick, ...props }: RouteLinkProps): react_jsx_runtime.JSX.Element;
4131
+ declare function RouteLink({ children, ...props }: RouteLinkProps): react_jsx_runtime.JSX.Element;
4138
4132
 
4139
4133
  interface ButtonProps$1 {
4140
4134
  _pseudo?: 'none' | 'focus' | 'hover' | 'active'
@@ -4142,12 +4136,10 @@ interface ButtonProps$1 {
4142
4136
  className?: string
4143
4137
  color?: 'primary' | 'secondary'
4144
4138
  condensed?: boolean
4145
- href?: string
4146
4139
  icon?: React.ReactNode
4147
4140
  iconPosition?: 'left' | 'right'
4148
4141
  isDisabled?: boolean
4149
- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void
4150
- onPress?: VoidFunction | ((...args: unknown[]) => void)
4142
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void
4151
4143
  size?: 'sm' | 'md' | 'lg'
4152
4144
  type?: 'button' | 'submit' | 'reset'
4153
4145
  variant?: 'solid' | 'outline' | 'ghost'
@@ -4155,6 +4147,7 @@ interface ButtonProps$1 {
4155
4147
  }
4156
4148
 
4157
4149
  interface RouteButtonProps extends ButtonProps$1 {
4150
+ href?: string;
4158
4151
  route?: NavigateOptions;
4159
4152
  }
4160
4153
  declare function RouteButton({ children, onClick, ...props }: RouteButtonProps): react_jsx_runtime.JSX.Element;
@@ -4262,18 +4255,16 @@ interface ButtonProps {
4262
4255
  className?: string;
4263
4256
  color?: 'primary' | 'secondary';
4264
4257
  condensed?: boolean;
4265
- href?: string;
4266
4258
  icon?: React.ReactNode;
4267
4259
  iconPosition?: 'left' | 'right';
4268
4260
  isDisabled?: boolean;
4269
- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
4270
- onPress?: VoidFunction | ((...args: unknown[]) => void);
4261
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
4271
4262
  size?: 'sm' | 'md' | 'lg';
4272
4263
  type?: 'button' | 'submit' | 'reset';
4273
4264
  variant?: 'solid' | 'outline' | 'ghost';
4274
4265
  withArrow?: boolean;
4275
4266
  }
4276
- declare function Button({ _pseudo, children, className, color, condensed, href, icon, iconPosition, isDisabled, onClick: _onClick, onPress, size, type, variant, withArrow, }: ButtonProps): react_jsx_runtime.JSX.Element;
4267
+ declare function Button({ _pseudo, children, className, color, condensed, icon, iconPosition, isDisabled, onClick: _onClick, size, type, variant, withArrow, }: ButtonProps): react_jsx_runtime.JSX.Element;
4277
4268
 
4278
4269
  interface FavoriteButtonProps {
4279
4270
  isDisabled?: boolean;
@@ -4287,24 +4278,20 @@ interface IconButtonProps {
4287
4278
  className?: string;
4288
4279
  color?: 'primary' | 'secondary';
4289
4280
  isDisabled?: boolean;
4290
- onPress?: VoidFunction;
4281
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
4291
4282
  size?: 'md' | 'lg';
4292
4283
  type?: 'button' | 'submit' | 'reset';
4293
4284
  }
4294
- declare function IconButton({ children, className, color, isDisabled, onPress, size, type, }: IconButtonProps): react_jsx_runtime.JSX.Element;
4285
+ declare function IconButton({ children, className, color, isDisabled, onClick, size, type, }: IconButtonProps): react_jsx_runtime.JSX.Element;
4295
4286
 
4296
- interface LinkProps extends LinkProps$2, RefAttributes<HTMLAnchorElement> {
4287
+ interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
4297
4288
  areaSelected?: boolean;
4298
- className?: string;
4299
4289
  color?: 'primary' | 'secondary';
4300
4290
  hasUnderline?: boolean;
4301
- id?: string;
4302
- onClick?(event: MouseEvent): void;
4303
- onMouseDown?(event: MouseEvent): void;
4304
- onMouseMove?(event: MouseEvent): void;
4291
+ isDisabled?: boolean;
4305
4292
  role?: 'option';
4306
4293
  }
4307
- declare function Link({ children, className, color, hasUnderline, onClick: _onClick, ref, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
4294
+ declare function Link({ children, className, color, hasUnderline, isDisabled, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
4308
4295
 
4309
4296
  type AddToCartState = 'initial' | 'spinner' | 'manual-input';
4310
4297
  interface AddToCartButtonProps {
@@ -4327,18 +4314,19 @@ interface ProductPrice$1 {
4327
4314
  price: number
4328
4315
  }
4329
4316
 
4330
- interface ProductCardProps extends LinkProps$1 {
4317
+ interface ProductCardProps {
4331
4318
  addToCartButton: ReactElement;
4332
4319
  favoriteButton?: ReactElement;
4333
4320
  href: string;
4321
+ id: string;
4334
4322
  image: ImageSource;
4335
- onPress?: (e: PressEvent) => void;
4323
+ onClick?: VoidFunction;
4336
4324
  price: ProductPrice$1;
4337
4325
  sku: string;
4338
4326
  tags?: string[];
4339
4327
  title: ReactNode;
4340
4328
  }
4341
- declare function ProductCard({ addToCartButton: AddToCartButton, areaSelected, favoriteButton: FavoriteButton, href, id, image, onClick, onMouseDown, onMouseMove, onPress, price, role, sku, tags, title, }: ProductCardProps): react_jsx_runtime.JSX.Element;
4329
+ declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, id, image, onClick, price, sku, tags, title, }: ProductCardProps): react_jsx_runtime.JSX.Element;
4342
4330
 
4343
4331
  interface CategoryCarouselProps {
4344
4332
  categoryCards: ReactNode[];