@solostylist/ui-kit 2.0.1 → 2.0.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.
Files changed (102) hide show
  1. package/dist/s-animated-gradient-text/index.d.ts +2 -0
  2. package/dist/s-animated-gradient-text/index.js +2 -0
  3. package/dist/s-animated-gradient-text/s-animated-gradient-text.d.ts +64 -0
  4. package/dist/s-animated-gradient-text/s-animated-gradient-text.js +92 -0
  5. package/dist/s-announcement-bar/index.d.ts +2 -0
  6. package/dist/s-announcement-bar/index.js +2 -0
  7. package/dist/s-announcement-bar/s-announcement-bar.d.ts +113 -0
  8. package/dist/s-announcement-bar/s-announcement-bar.js +272 -0
  9. package/dist/s-carousel/s-carousel.d.ts +2 -0
  10. package/dist/s-carousel/s-carousel.js +52 -50
  11. package/dist/s-date-picker/s-date-picker.js +1 -1
  12. package/dist/s-datetime-picker/s-datetime-picker.js +1 -1
  13. package/dist/s-drawer/index.d.ts +3 -0
  14. package/dist/s-drawer/index.js +2 -0
  15. package/dist/s-drawer/s-drawer.d.ts +70 -0
  16. package/dist/s-drawer/s-drawer.js +139 -0
  17. package/dist/s-gradient-blob-pulse/index.d.ts +2 -0
  18. package/dist/s-gradient-blob-pulse/index.js +2 -0
  19. package/dist/s-gradient-blob-pulse/s-gradient-blob-pulse.d.ts +62 -0
  20. package/dist/s-gradient-blob-pulse/s-gradient-blob-pulse.js +236 -0
  21. package/dist/s-gradient-icon/index.d.ts +1 -1
  22. package/dist/s-gradient-icon/s-gradient-icon.d.ts +4 -4
  23. package/dist/s-gradient-icon/s-gradient-icon.js +2 -2
  24. package/dist/s-icon-button/s-icon-button.d.ts +6 -2
  25. package/dist/s-interactive-card/index.d.ts +3 -0
  26. package/dist/s-interactive-card/index.js +2 -0
  27. package/dist/s-interactive-card/s-interactive-card.d.ts +57 -0
  28. package/dist/s-interactive-card/s-interactive-card.js +150 -0
  29. package/dist/s-language-switcher/s-language-switcher.js +66 -71
  30. package/dist/s-list-action-item/index.d.ts +2 -0
  31. package/dist/s-list-action-item/index.js +2 -0
  32. package/dist/s-list-action-item/s-list-action-item.d.ts +89 -0
  33. package/dist/s-list-action-item/s-list-action-item.js +149 -0
  34. package/dist/s-mega-menu/index.d.ts +3 -0
  35. package/dist/s-mega-menu/index.js +2 -0
  36. package/dist/s-mega-menu/mega-menu-panel.d.ts +38 -0
  37. package/dist/s-mega-menu/mega-menu-panel.js +251 -0
  38. package/dist/s-mega-menu/mega-menu-slots.d.ts +65 -0
  39. package/dist/s-mega-menu/mega-menu-slots.js +232 -0
  40. package/dist/s-mega-menu/mega-menu-trigger.d.ts +35 -0
  41. package/dist/s-mega-menu/mega-menu-trigger.js +49 -0
  42. package/dist/s-mega-menu/s-mega-menu.d.ts +23 -0
  43. package/dist/s-mega-menu/s-mega-menu.js +225 -0
  44. package/dist/s-mega-menu/types.d.ts +188 -0
  45. package/dist/s-mega-menu/types.js +0 -0
  46. package/dist/s-mega-menu/utils.d.ts +51 -0
  47. package/dist/s-mega-menu/utils.js +51 -0
  48. package/dist/s-mobile-dock/index.d.ts +3 -0
  49. package/dist/s-mobile-dock/index.js +2 -0
  50. package/dist/s-mobile-dock/s-mobile-dock.d.ts +96 -0
  51. package/dist/s-mobile-dock/s-mobile-dock.js +145 -0
  52. package/dist/s-nav-item/index.d.ts +1 -1
  53. package/dist/s-nav-item/s-nav-item.d.ts +35 -16
  54. package/dist/s-nav-item/s-nav-item.js +55 -77
  55. package/dist/s-nav-items/s-nav-items.js +68 -112
  56. package/dist/s-number-range/index.d.ts +3 -0
  57. package/dist/s-number-range/index.js +2 -0
  58. package/dist/s-number-range/s-number-range.d.ts +109 -0
  59. package/dist/s-number-range/s-number-range.js +250 -0
  60. package/dist/s-popover/index.d.ts +5 -0
  61. package/dist/s-popover/index.js +3 -0
  62. package/dist/s-popover/placement.d.ts +14 -0
  63. package/dist/s-popover/placement.js +65 -0
  64. package/dist/s-popover/s-popover-content.d.ts +22 -0
  65. package/dist/s-popover/s-popover-content.js +21 -0
  66. package/dist/s-popover/s-popover.d.ts +59 -0
  67. package/dist/s-popover/s-popover.js +66 -0
  68. package/dist/s-product-card/index.d.ts +3 -0
  69. package/dist/s-product-card/index.js +2 -0
  70. package/dist/s-product-card/s-product-card.d.ts +216 -0
  71. package/dist/s-product-card/s-product-card.js +499 -0
  72. package/dist/s-product-gallery/index.d.ts +3 -0
  73. package/dist/s-product-gallery/index.js +2 -0
  74. package/dist/s-product-gallery/s-product-gallery.d.ts +116 -0
  75. package/dist/s-product-gallery/s-product-gallery.js +427 -0
  76. package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +1 -1
  77. package/dist/s-segmented-control/index.d.ts +3 -0
  78. package/dist/s-segmented-control/index.js +2 -0
  79. package/dist/s-segmented-control/s-segmented-control.d.ts +94 -0
  80. package/dist/s-segmented-control/s-segmented-control.js +298 -0
  81. package/dist/s-stepper/index.d.ts +3 -0
  82. package/dist/s-stepper/index.js +2 -0
  83. package/dist/s-stepper/s-stepper.d.ts +90 -0
  84. package/dist/s-stepper/s-stepper.js +102 -0
  85. package/dist/s-swatch/index.d.ts +3 -0
  86. package/dist/s-swatch/index.js +2 -0
  87. package/dist/s-swatch/s-swatch.d.ts +235 -0
  88. package/dist/s-swatch/s-swatch.js +218 -0
  89. package/dist/s-text-editor/s-text-editor-toolbar.js +105 -108
  90. package/dist/s-tool-item/s-tool-item.d.ts +10 -6
  91. package/dist/s-tool-item/s-tool-item.js +12 -12
  92. package/dist/theme/component-augmentation.d.ts +65 -1
  93. package/dist/theme/components/drawer.d.ts +1 -0
  94. package/dist/theme/components/drawer.js +4 -1
  95. package/dist/theme/components/slider.js +18 -1
  96. package/dist/theme/components/step-connector.d.ts +0 -3
  97. package/dist/theme/components/step-connector.js +1 -6
  98. package/dist/theme/components/step-icon.d.ts +3 -12
  99. package/dist/theme/components/step-icon.js +3 -14
  100. package/package.json +7 -2
  101. package/dist/theme/components/components.d.ts +0 -2
  102. package/dist/theme/components/slider.d.ts +0 -34
@@ -0,0 +1,216 @@
1
+ import { BoxProps, CardProps, TypographyProps } from '@mui/material';
2
+ import { SIconButtonProps } from '../s-icon-button/s-icon-button';
3
+ import { SLazyImageProps } from '../s-lazy-image/s-lazy-image';
4
+ import { SSwatchVisualProps } from '../s-swatch/s-swatch';
5
+ import { OwnerStateSlotProps as MuiOwnerStateSlotProps } from '../utils/slots';
6
+ import * as React from 'react';
7
+ /** Density preset. All four share one anatomy and differ only in layout and spacing. */
8
+ export type SProductCardVariant = 'grid' | 'list' | 'mini' | 'overlay';
9
+ /** Logical corner of the media the badge is pinned to. Safe in LTR and RTL layouts. */
10
+ export type SProductCardBadgePlacement = 'bottom-end' | 'bottom-start' | 'top-end' | 'top-start';
11
+ /** One valid color or image option summarised in the swatch row. */
12
+ export type SProductCardSwatch = SSwatchVisualProps & {
13
+ /** Optional display and accessible label. */
14
+ label?: string;
15
+ /** Stable key and human-readable option value. */
16
+ value: string;
17
+ };
18
+ /** Stretched primary-action props. Navigation and activation stay owned by the top-level API. */
19
+ export type SProductCardLinkProps = Omit<BoxProps, 'children' | 'component' | 'onClick'> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'download' | 'rel' | 'target'> & {
20
+ /** Disable the MUI touch ripple for the primary action. */
21
+ disableRipple?: boolean;
22
+ /** Enable the keyboard focus ripple. */
23
+ focusRipple?: boolean;
24
+ /** Class applied while the primary action is keyboard-focus-visible. */
25
+ focusVisibleClassName?: string;
26
+ };
27
+ /** Root surface props that do not duplicate SProductCard's interaction API. */
28
+ export type SProductCardRootProps = Omit<CardProps, 'children' | 'component' | 'onClick'>;
29
+ export interface SProductCardSlots {
30
+ /** Trailing cluster of the footer row, holding the favorite toggle and `actions`. */
31
+ actions?: React.ElementType;
32
+ /** Promotional label pinned over the media. */
33
+ badge?: React.ElementType;
34
+ /** Text column below the media. */
35
+ content?: React.ElementType;
36
+ /** Built-in favorite toggle. */
37
+ favoriteButton?: React.ElementType;
38
+ /** Bottom row of the content column. */
39
+ footer?: React.ElementType;
40
+ /** Layer revealed over the media on hover, focus, and on touch devices. */
41
+ hoverActions?: React.ElementType;
42
+ /** Second image cross-faded in on hover. */
43
+ hoverImage?: React.ElementType;
44
+ /** Primary media image. */
45
+ image?: React.ElementType;
46
+ /** Stretched link covering the whole card. */
47
+ link?: React.ElementType;
48
+ /** Media frame that clips the image and positions the badge and hover actions. */
49
+ media?: React.ElementType;
50
+ /** Secondary information row under the title. */
51
+ meta?: React.ElementType;
52
+ /** Price group of the footer row. */
53
+ price?: React.ElementType;
54
+ /** Struck-through original price. */
55
+ originalPrice?: React.ElementType;
56
+ /** Rating row under the title. */
57
+ rating?: React.ElementType;
58
+ /** Card surface. */
59
+ root?: React.ElementType;
60
+ /** Swatch summary row. */
61
+ swatches?: React.ElementType;
62
+ /** Product name. */
63
+ title?: React.ElementType;
64
+ }
65
+ type OwnerStateSlotProps<Props> = MuiOwnerStateSlotProps<Props, SProductCardOwnerState>;
66
+ export interface SProductCardSlotProps {
67
+ /** Props or owner-state callback for the actions slot. */
68
+ actions?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
69
+ /** Props or owner-state callback for the badge slot. */
70
+ badge?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
71
+ /** Props or owner-state callback for the content slot. */
72
+ content?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
73
+ /** Props or owner-state callback for the favorite button slot. */
74
+ favoriteButton?: OwnerStateSlotProps<Omit<SIconButtonProps, 'children'>>;
75
+ /** Props or owner-state callback for the footer slot. */
76
+ footer?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
77
+ /** Props or owner-state callback for the hover actions slot. */
78
+ hoverActions?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
79
+ /** Props or owner-state callback for the hover image slot. */
80
+ hoverImage?: OwnerStateSlotProps<Omit<SLazyImageProps, 'alt' | 'src'>>;
81
+ /** Props or owner-state callback for the image slot. */
82
+ image?: OwnerStateSlotProps<Omit<SLazyImageProps, 'alt' | 'src'>>;
83
+ /** Props or owner-state callback for the stretched link slot. */
84
+ link?: OwnerStateSlotProps<SProductCardLinkProps>;
85
+ /** Props or owner-state callback for the media slot. */
86
+ media?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
87
+ /** Props or owner-state callback for the meta slot. */
88
+ meta?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
89
+ /** Props or owner-state callback for the price slot. */
90
+ price?: OwnerStateSlotProps<Omit<TypographyProps, 'children'>>;
91
+ /** Props or owner-state callback for the original-price slot. */
92
+ originalPrice?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
93
+ /** Props or owner-state callback for the rating slot. */
94
+ rating?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
95
+ /** Props or owner-state callback for the root slot. */
96
+ root?: OwnerStateSlotProps<SProductCardRootProps>;
97
+ /** Props or owner-state callback for the swatches slot. */
98
+ swatches?: OwnerStateSlotProps<Omit<BoxProps, 'children'>>;
99
+ /** Props or owner-state callback for the title slot. */
100
+ title?: OwnerStateSlotProps<Omit<TypographyProps, 'children'>>;
101
+ }
102
+ /**
103
+ * Props for a presentation-only product card. Every region is a `ReactNode` prop
104
+ * with a matching slot, so no commerce model, formatter, or router is involved.
105
+ */
106
+ export interface SProductCardProps extends Omit<CardProps, 'children' | 'component' | 'onClick' | 'title' | 'variant'> {
107
+ /** Action cluster rendered at the trailing end of the footer row. */
108
+ actions?: React.ReactNode;
109
+ /**
110
+ * Alternative text for the built-in image. Empty by default because the
111
+ * primary card action is already labelled by the visible product title.
112
+ */
113
+ alt?: string;
114
+ /** Media aspect ratio, used when `mediaHeight` is not set. */
115
+ aspectRatio?: number | string;
116
+ /** Promotional label rendered over the media — a discount chip, "new", and so on. */
117
+ badge?: React.ReactNode;
118
+ /** Corner of the media the badge is pinned to. */
119
+ badgePlacement?: SProductCardBadgePlacement;
120
+ /** Initial favorite state for uncontrolled usage. */
121
+ defaultFavorite?: boolean;
122
+ /** Disables the primary action and removes all built-in action regions from the tab order. */
123
+ disabled?: boolean;
124
+ /** Keeps the hover border feedback but removes the card translate and scale. */
125
+ disableLift?: boolean;
126
+ /** Favorite state for controlled usage. */
127
+ favorite?: boolean;
128
+ /** Icon of the favorite toggle while favorited. */
129
+ favoriteActiveIcon?: React.ReactNode;
130
+ /** Accessible name of the favorite toggle while favorited. */
131
+ favoriteActiveLabel?: string;
132
+ /** Icon of the favorite toggle while not favorited. */
133
+ favoriteIcon?: React.ReactNode;
134
+ /** Accessible name of the favorite toggle while not favorited. */
135
+ favoriteLabel?: string;
136
+ /** Supplemental content rendered between the price and the trailing actions. */
137
+ footerContent?: React.ReactNode;
138
+ /** Actions revealed over the media on hover and focus. Always visible on touch devices. */
139
+ hoverActions?: React.ReactNode;
140
+ /** Second image URL cross-faded in over the primary image on hover and focus. */
141
+ hoverImage?: string;
142
+ /** Link destination. Renders a stretched anchor that covers the whole card. */
143
+ href?: string;
144
+ /** Primary media image URL, rendered with `SLazyImage`. Ignored when `media` is set. */
145
+ image?: string;
146
+ /** Enables card and media hover/focus effects without changing primary-action semantics. */
147
+ interactive?: boolean;
148
+ /** Accessible name of the stretched link. Defaults to the rendered `title`. */
149
+ linkLabel?: string;
150
+ /** Maximum swatches rendered before the overflow counter. */
151
+ maxSwatches?: number;
152
+ /** Custom media content. Replaces the built-in image and hover image. */
153
+ media?: React.ReactNode;
154
+ /** Fixed media height. Takes precedence over `aspectRatio`. */
155
+ mediaHeight?: number | string;
156
+ /** Media width. Only meaningful for the `list` variant. */
157
+ mediaWidth?: number | string;
158
+ /** Zooms the media image while the card is hovered or focused. */
159
+ mediaZoom?: boolean;
160
+ /** Scale factor of the media zoom. */
161
+ mediaZoomScale?: number;
162
+ /** Secondary information under the title — tags, category, or an option summary. */
163
+ meta?: React.ReactNode;
164
+ /** Called when the card is activated. Used instead of `href` for non-navigating cards. */
165
+ onClick?: React.MouseEventHandler<HTMLElement>;
166
+ /** Called with the next favorite state when the favorite toggle is pressed. */
167
+ onFavoriteChange?: (event: React.MouseEvent<HTMLButtonElement>, favorite: boolean) => void;
168
+ /** Pre-formatted current price. Formatting and currency stay with the consumer. */
169
+ price?: React.ReactNode;
170
+ /** Pre-formatted original price, rendered struck through next to `price`. */
171
+ originalPrice?: React.ReactNode;
172
+ /**
173
+ * Read-only rating. A number renders a read-only `SRating`; any other node is
174
+ * rendered as-is, so a custom rating summary can be injected.
175
+ */
176
+ rating?: React.ReactNode;
177
+ /** Sweeps a light sheen across the card on hover and focus. */
178
+ sheen?: boolean;
179
+ /** Renders the built-in favorite toggle at the start of the footer actions. */
180
+ showFavorite?: boolean;
181
+ /** Props or owner-state callbacks for internal structural slots. */
182
+ slotProps?: SProductCardSlotProps;
183
+ /** Components used for internal structural slots. */
184
+ slots?: SProductCardSlots;
185
+ /** Color or image options summarised under the title. Presentational, never focusable. */
186
+ swatches?: SProductCardSwatch[];
187
+ /** Accessible name of the swatch summary row. */
188
+ swatchesLabel?: string;
189
+ /** Product name. Also labels the primary card action when `linkLabel` is omitted. */
190
+ title: React.ReactNode;
191
+ /** Density preset. Replaces the MUI `Card` variant, which is available via `slotProps.root`. */
192
+ variant?: SProductCardVariant;
193
+ }
194
+ export interface SProductCardOwnerState extends Omit<SProductCardProps, 'slotProps' | 'slots'> {
195
+ alt: string;
196
+ aspectRatio: number | string;
197
+ badgePlacement: SProductCardBadgePlacement;
198
+ clickable: boolean;
199
+ disableLift: boolean;
200
+ disabled: boolean;
201
+ favorite: boolean;
202
+ interactive: boolean;
203
+ maxSwatches: number;
204
+ mediaZoom: boolean;
205
+ mediaZoomScale: number;
206
+ sheen: boolean;
207
+ showFavorite: boolean;
208
+ variant: SProductCardVariant;
209
+ }
210
+ /**
211
+ * Presentation shell for a product card. Media, badge, title, rating, meta,
212
+ * swatches, price, footer and actions are all `ReactNode` props backed by slots,
213
+ * and every hover effect is CSS driven so no animation library is pulled in.
214
+ */
215
+ export declare const SProductCard: React.ForwardRefExoticComponent<Omit<SProductCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
216
+ export default SProductCard;