@veevarts/design-system 2.0.0-alpha.55 → 2.0.0-alpha.57

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/README.md CHANGED
@@ -211,7 +211,13 @@ For `mode="datetime"`, the design system does not convert timezones. The consumi
211
211
  </HeroUIProvider>
212
212
  ```
213
213
 
214
- **Readable toasts (`ToastProvider`).** The `ToastProvider` exported here wraps HeroUI's: same props, same `addToast` queue. Titles wrap instead of truncating to one line, and the animation is off when the OS or the POS (`data-pos-reduce-motion`) asks for reduced motion, unless you pass `disableAnimation`. A `toastProps.classNames.title` you pass is merged after the default. HeroUI replaces the provider `classNames` with a per-toast `addToast({ classNames })` as a whole object, so a per-toast `classNames` without a `title` key truncates that toast again.
214
+ **Readable toasts (`ToastProvider`).** The `ToastProvider` exported here wraps HeroUI's: same props, same `addToast` queue. Titles wrap instead of truncating to one line, and the animation is off when the OS or the POS (`data-pos-reduce-motion`) asks for reduced motion, unless you pass `disableAnimation`.
215
+
216
+ From `sm` up a toast takes the width its text needs, between HeroUI's 356px and `min(32rem, 100vw - 11rem)`, instead of a fixed 356px: both bounds are `rem`, so it keeps up when the root font grows (the POS Text size setting, or a larger browser default). The close button sits inside the toast beside the title, always visible, as a 44px (`2.75rem`) target, instead of HeroUI's hover-only circle on the corner. A short toast at the default text size is the same 356px as before.
217
+
218
+ A `toastProps.classNames` you pass is merged after these defaults, slot by slot (`base`, `closeButton`, `closeIcon`, `title`, `description`). HeroUI replaces the provider `classNames` with a per-toast `addToast({ classNames })` as a whole object, so a per-toast `classNames` drops these defaults for that toast.
219
+
220
+ **Still skeletons (`Skeleton`).** The `Skeleton` exported here wraps HeroUI's: same props. HeroUI draws the shimmer on the block's `::before`, so `motion-reduce:animate-none` on the block never stops it. This one adds `motion-reduce:before:animate-none` (and the transition equivalents), so under the OS "reduce motion" setting the block is a plain grey shape at the same size; with motion allowed nothing changes. `EntityListSkeleton` and the other DS skeletons draw their blocks with it.
215
221
 
216
222
  ```tsx
217
223
  <HeroUIProvider>
@@ -0,0 +1,37 @@
1
+ import { SkeletonProps as HeroUISkeletonProps } from '@heroui/react';
2
+ export type SkeletonProps = HeroUISkeletonProps;
3
+ /**
4
+ * What HeroUI's own `disableAnimation` adds to the skeleton, applied only while
5
+ * the OS asks for reduced motion (`prefers-reduced-motion: reduce`).
6
+ *
7
+ * HeroUI draws the shimmer on the block's `::before` (`before:animate-shimmer`),
8
+ * so `motion-reduce:animate-none` on the block never reaches it: the sweep kept
9
+ * running for anyone who had turned motion off. Each pseudo-element and
10
+ * property needs its own utility:
11
+ *
12
+ * - `before:animate-none` stops the shimmer. The `::before` stays parked at
13
+ * `-translate-x-full`, outside the block, so what is left is the plain grey
14
+ * block, at the same size and in the same place.
15
+ * - `animate-none` stops an animation on the block itself (a caller's
16
+ * `animate-pulse`, for one).
17
+ * - `transition-none`, `before:transition-none` and `after:transition-none`
18
+ * drop the fade HeroUI runs when `isLoaded` flips.
19
+ *
20
+ * Every utility sits behind `motion-reduce:`, so with motion allowed the class
21
+ * list resolves exactly as before and the shimmer is unchanged. Tailwind emits
22
+ * the `motion-reduce` rules after the plain `before:` ones, so they win at
23
+ * equal specificity.
24
+ */
25
+ export declare const SKELETON_REDUCED_MOTION_CLASS = "motion-reduce:animate-none motion-reduce:transition-none motion-reduce:before:animate-none motion-reduce:before:transition-none motion-reduce:after:transition-none";
26
+ /**
27
+ * HeroUI `Skeleton` that holds still under reduced motion. Every HeroUI prop is
28
+ * kept, and an explicit `disableAnimation` still turns the shimmer off for
29
+ * everyone.
30
+ *
31
+ * The defaults go first in `classNames.base`, ahead of the caller's
32
+ * `classNames.base` and `className`, so a caller can still override any of
33
+ * them. Every DS skeleton (`EntityListSkeleton`, `OfferCardSkeleton`,
34
+ * `RevenueDistributionSkeleton`, `InstallmentScheduleSkeleton`,
35
+ * `InstallmentFundAssignmentSkeleton`) draws its blocks with this component.
36
+ */
37
+ export declare const Skeleton: import('react').ForwardRefExoticComponent<Omit<HeroUISkeletonProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { Skeleton } from './Skeleton';
2
+ export type { SkeletonProps } from './Skeleton';
@@ -23,6 +23,8 @@ export { Modal } from './Modal';
23
23
  export type { ModalProps } from './Modal';
24
24
  export { Select } from './Select';
25
25
  export type { SelectProps } from './Select';
26
+ export { Skeleton } from './Skeleton';
27
+ export type { SkeletonProps } from './Skeleton';
26
28
  export { Table } from './Table';
27
29
  export type { TableProps } from './Table';
28
30
  export { RedeemCodeInput } from './RedeemCodeInput';