@ship-it-ui/ui 0.0.8 → 0.0.9
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/dist/index.cjs +213 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -12
- package/dist/index.d.ts +38 -12
- package/dist/index.js +239 -89
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -585,7 +585,7 @@ declare const AccordionContent: react.ForwardRefExoticComponent<RadixAccordion.A
|
|
|
585
585
|
|
|
586
586
|
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
587
587
|
type AvatarStatus = 'ok' | 'warn' | 'err' | 'off';
|
|
588
|
-
interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
588
|
+
interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
589
589
|
/** Display name. Used to derive initials and a deterministic background color. */
|
|
590
590
|
name?: string;
|
|
591
591
|
/** Image source. Falls back to initials if loading fails. */
|
|
@@ -596,6 +596,11 @@ interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
596
596
|
status?: AvatarStatus;
|
|
597
597
|
/** Override the auto-generated initials (e.g., for non-Latin scripts). */
|
|
598
598
|
initials?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Override the hash-derived fallback background with a literal CSS color value.
|
|
601
|
+
* Only applies when the initials fallback is shown; image avatars are unaffected.
|
|
602
|
+
*/
|
|
603
|
+
color?: string;
|
|
599
604
|
}
|
|
600
605
|
/**
|
|
601
606
|
* Person/entity avatar. Auto-generates initials and a stable background color from
|
|
@@ -622,11 +627,21 @@ declare const badgeStyles: (props?: ({
|
|
|
622
627
|
variant?: "outline" | "err" | "pink" | "purple" | "solid" | "warn" | "ok" | "accent" | "neutral" | null | undefined;
|
|
623
628
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
624
629
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
625
|
-
|
|
630
|
+
/**
|
|
631
|
+
* Variant path: use one of the DS semantic variants.
|
|
632
|
+
* <Badge variant="ok">Done</Badge>
|
|
633
|
+
*
|
|
634
|
+
* Color path (escape hatch): pass an arbitrary CSS color. When both are set,
|
|
635
|
+
* `color` wins at runtime.
|
|
636
|
+
* <Badge color="#7c3aed">VIP</Badge>
|
|
637
|
+
*/
|
|
638
|
+
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof badgeStyles> {
|
|
626
639
|
/** Show a colored leading dot. */
|
|
627
640
|
dot?: boolean;
|
|
628
641
|
/** Optional leading icon (defers to children). */
|
|
629
642
|
icon?: ReactNode;
|
|
643
|
+
/** Arbitrary CSS color override. When set, replaces the `variant` tint. */
|
|
644
|
+
color?: string;
|
|
630
645
|
}
|
|
631
646
|
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
632
647
|
|
|
@@ -709,7 +724,7 @@ interface StatCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
709
724
|
*/
|
|
710
725
|
declare const StatCard: react.ForwardRefExoticComponent<StatCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
711
726
|
|
|
712
|
-
interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
727
|
+
interface ChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
713
728
|
/** Pill-style leading icon (typically a glyph or `@`/`#`). */
|
|
714
729
|
icon?: ReactNode;
|
|
715
730
|
/**
|
|
@@ -722,13 +737,10 @@ interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
722
737
|
* `'touch'` swaps to a roomier 32px chip with larger text for mobile filter strips.
|
|
723
738
|
*/
|
|
724
739
|
density?: 'comfortable' | 'touch';
|
|
740
|
+
/** Arbitrary CSS color. When set, the default neutral tint is replaced with this color. */
|
|
741
|
+
color?: string;
|
|
725
742
|
children: ReactNode;
|
|
726
743
|
}
|
|
727
|
-
/**
|
|
728
|
-
* Pill-shaped filter chip. Used in command palette tag rows, search filter strips,
|
|
729
|
-
* and AI suggestion lists. Differs from `Tag` by being pill-shaped (full radius)
|
|
730
|
-
* and slightly more decorative.
|
|
731
|
-
*/
|
|
732
744
|
declare const Chip: react.ForwardRefExoticComponent<ChipProps & react.RefAttributes<HTMLSpanElement>>;
|
|
733
745
|
|
|
734
746
|
type KbdProps = HTMLAttributes<HTMLElement>;
|
|
@@ -746,7 +758,7 @@ declare const Kbd: react.ForwardRefExoticComponent<KbdProps & react.RefAttribute
|
|
|
746
758
|
* ratings step in whole units only — half-step input is uncommon UX and the
|
|
747
759
|
* keyboard model (radiogroup) doesn't map cleanly to it.
|
|
748
760
|
*/
|
|
749
|
-
interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'role'> {
|
|
761
|
+
interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'onChange' | 'defaultValue' | 'role'> {
|
|
750
762
|
/** Current rating (controlled). Range `0` … `max`. */
|
|
751
763
|
value?: number;
|
|
752
764
|
/** Default rating (uncontrolled). */
|
|
@@ -766,6 +778,8 @@ interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' |
|
|
|
766
778
|
readOnly?: boolean;
|
|
767
779
|
/** Accessible label. For read-only this overrides the auto-generated "X out of Y stars" label. */
|
|
768
780
|
'aria-label'?: string;
|
|
781
|
+
/** Override the filled-star color. Accepts any CSS color. */
|
|
782
|
+
color?: string;
|
|
769
783
|
}
|
|
770
784
|
declare const Rating: react.ForwardRefExoticComponent<RatingProps & react.RefAttributes<HTMLDivElement>>;
|
|
771
785
|
|
|
@@ -848,9 +862,19 @@ interface SkeletonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
848
862
|
declare const SkeletonGroup: react.ForwardRefExoticComponent<SkeletonGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
849
863
|
|
|
850
864
|
type StatusState = 'ok' | 'warn' | 'err' | 'off' | 'sync' | 'accent';
|
|
851
|
-
|
|
852
|
-
|
|
865
|
+
/**
|
|
866
|
+
* State path: use a semantic state.
|
|
867
|
+
* <StatusDot state="ok" />
|
|
868
|
+
*
|
|
869
|
+
* Color path (escape hatch): pass an arbitrary CSS color. When both are set,
|
|
870
|
+
* `color` wins at runtime.
|
|
871
|
+
* <StatusDot color="#7c3aed" />
|
|
872
|
+
*/
|
|
873
|
+
interface StatusDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
874
|
+
/** Semantic state. Default `'ok'`. */
|
|
853
875
|
state?: StatusState;
|
|
876
|
+
/** Arbitrary CSS color override. When set, replaces the state-derived color. */
|
|
877
|
+
color?: string;
|
|
854
878
|
/** Optional label rendered next to the dot. */
|
|
855
879
|
label?: ReactNode;
|
|
856
880
|
/** Pulse the dot — used for `sync` state to indicate live activity. */
|
|
@@ -860,13 +884,15 @@ interface StatusDotProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
860
884
|
}
|
|
861
885
|
declare const StatusDot: react.ForwardRefExoticComponent<StatusDotProps & react.RefAttributes<HTMLSpanElement>>;
|
|
862
886
|
|
|
863
|
-
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
887
|
+
interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
864
888
|
/** Optional close button. When provided, a `×` rendered on the right calls it. */
|
|
865
889
|
onRemove?: () => void;
|
|
866
890
|
/** Optional leading icon. */
|
|
867
891
|
icon?: ReactNode;
|
|
868
892
|
/** Pixel height. Defaults to 22px. */
|
|
869
893
|
size?: number;
|
|
894
|
+
/** Arbitrary CSS color. When set, the default neutral tint is replaced with this color. */
|
|
895
|
+
color?: string;
|
|
870
896
|
children: ReactNode;
|
|
871
897
|
}
|
|
872
898
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -585,7 +585,7 @@ declare const AccordionContent: react.ForwardRefExoticComponent<RadixAccordion.A
|
|
|
585
585
|
|
|
586
586
|
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
587
587
|
type AvatarStatus = 'ok' | 'warn' | 'err' | 'off';
|
|
588
|
-
interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
588
|
+
interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
589
589
|
/** Display name. Used to derive initials and a deterministic background color. */
|
|
590
590
|
name?: string;
|
|
591
591
|
/** Image source. Falls back to initials if loading fails. */
|
|
@@ -596,6 +596,11 @@ interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
596
596
|
status?: AvatarStatus;
|
|
597
597
|
/** Override the auto-generated initials (e.g., for non-Latin scripts). */
|
|
598
598
|
initials?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Override the hash-derived fallback background with a literal CSS color value.
|
|
601
|
+
* Only applies when the initials fallback is shown; image avatars are unaffected.
|
|
602
|
+
*/
|
|
603
|
+
color?: string;
|
|
599
604
|
}
|
|
600
605
|
/**
|
|
601
606
|
* Person/entity avatar. Auto-generates initials and a stable background color from
|
|
@@ -622,11 +627,21 @@ declare const badgeStyles: (props?: ({
|
|
|
622
627
|
variant?: "outline" | "err" | "pink" | "purple" | "solid" | "warn" | "ok" | "accent" | "neutral" | null | undefined;
|
|
623
628
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
624
629
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
625
|
-
|
|
630
|
+
/**
|
|
631
|
+
* Variant path: use one of the DS semantic variants.
|
|
632
|
+
* <Badge variant="ok">Done</Badge>
|
|
633
|
+
*
|
|
634
|
+
* Color path (escape hatch): pass an arbitrary CSS color. When both are set,
|
|
635
|
+
* `color` wins at runtime.
|
|
636
|
+
* <Badge color="#7c3aed">VIP</Badge>
|
|
637
|
+
*/
|
|
638
|
+
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof badgeStyles> {
|
|
626
639
|
/** Show a colored leading dot. */
|
|
627
640
|
dot?: boolean;
|
|
628
641
|
/** Optional leading icon (defers to children). */
|
|
629
642
|
icon?: ReactNode;
|
|
643
|
+
/** Arbitrary CSS color override. When set, replaces the `variant` tint. */
|
|
644
|
+
color?: string;
|
|
630
645
|
}
|
|
631
646
|
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
632
647
|
|
|
@@ -709,7 +724,7 @@ interface StatCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
709
724
|
*/
|
|
710
725
|
declare const StatCard: react.ForwardRefExoticComponent<StatCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
711
726
|
|
|
712
|
-
interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
727
|
+
interface ChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
713
728
|
/** Pill-style leading icon (typically a glyph or `@`/`#`). */
|
|
714
729
|
icon?: ReactNode;
|
|
715
730
|
/**
|
|
@@ -722,13 +737,10 @@ interface ChipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
722
737
|
* `'touch'` swaps to a roomier 32px chip with larger text for mobile filter strips.
|
|
723
738
|
*/
|
|
724
739
|
density?: 'comfortable' | 'touch';
|
|
740
|
+
/** Arbitrary CSS color. When set, the default neutral tint is replaced with this color. */
|
|
741
|
+
color?: string;
|
|
725
742
|
children: ReactNode;
|
|
726
743
|
}
|
|
727
|
-
/**
|
|
728
|
-
* Pill-shaped filter chip. Used in command palette tag rows, search filter strips,
|
|
729
|
-
* and AI suggestion lists. Differs from `Tag` by being pill-shaped (full radius)
|
|
730
|
-
* and slightly more decorative.
|
|
731
|
-
*/
|
|
732
744
|
declare const Chip: react.ForwardRefExoticComponent<ChipProps & react.RefAttributes<HTMLSpanElement>>;
|
|
733
745
|
|
|
734
746
|
type KbdProps = HTMLAttributes<HTMLElement>;
|
|
@@ -746,7 +758,7 @@ declare const Kbd: react.ForwardRefExoticComponent<KbdProps & react.RefAttribute
|
|
|
746
758
|
* ratings step in whole units only — half-step input is uncommon UX and the
|
|
747
759
|
* keyboard model (radiogroup) doesn't map cleanly to it.
|
|
748
760
|
*/
|
|
749
|
-
interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'role'> {
|
|
761
|
+
interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'onChange' | 'defaultValue' | 'role'> {
|
|
750
762
|
/** Current rating (controlled). Range `0` … `max`. */
|
|
751
763
|
value?: number;
|
|
752
764
|
/** Default rating (uncontrolled). */
|
|
@@ -766,6 +778,8 @@ interface RatingProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' |
|
|
|
766
778
|
readOnly?: boolean;
|
|
767
779
|
/** Accessible label. For read-only this overrides the auto-generated "X out of Y stars" label. */
|
|
768
780
|
'aria-label'?: string;
|
|
781
|
+
/** Override the filled-star color. Accepts any CSS color. */
|
|
782
|
+
color?: string;
|
|
769
783
|
}
|
|
770
784
|
declare const Rating: react.ForwardRefExoticComponent<RatingProps & react.RefAttributes<HTMLDivElement>>;
|
|
771
785
|
|
|
@@ -848,9 +862,19 @@ interface SkeletonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
848
862
|
declare const SkeletonGroup: react.ForwardRefExoticComponent<SkeletonGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
849
863
|
|
|
850
864
|
type StatusState = 'ok' | 'warn' | 'err' | 'off' | 'sync' | 'accent';
|
|
851
|
-
|
|
852
|
-
|
|
865
|
+
/**
|
|
866
|
+
* State path: use a semantic state.
|
|
867
|
+
* <StatusDot state="ok" />
|
|
868
|
+
*
|
|
869
|
+
* Color path (escape hatch): pass an arbitrary CSS color. When both are set,
|
|
870
|
+
* `color` wins at runtime.
|
|
871
|
+
* <StatusDot color="#7c3aed" />
|
|
872
|
+
*/
|
|
873
|
+
interface StatusDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
874
|
+
/** Semantic state. Default `'ok'`. */
|
|
853
875
|
state?: StatusState;
|
|
876
|
+
/** Arbitrary CSS color override. When set, replaces the state-derived color. */
|
|
877
|
+
color?: string;
|
|
854
878
|
/** Optional label rendered next to the dot. */
|
|
855
879
|
label?: ReactNode;
|
|
856
880
|
/** Pulse the dot — used for `sync` state to indicate live activity. */
|
|
@@ -860,13 +884,15 @@ interface StatusDotProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
860
884
|
}
|
|
861
885
|
declare const StatusDot: react.ForwardRefExoticComponent<StatusDotProps & react.RefAttributes<HTMLSpanElement>>;
|
|
862
886
|
|
|
863
|
-
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
887
|
+
interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
864
888
|
/** Optional close button. When provided, a `×` rendered on the right calls it. */
|
|
865
889
|
onRemove?: () => void;
|
|
866
890
|
/** Optional leading icon. */
|
|
867
891
|
icon?: ReactNode;
|
|
868
892
|
/** Pixel height. Defaults to 22px. */
|
|
869
893
|
size?: number;
|
|
894
|
+
/** Arbitrary CSS color. When set, the default neutral tint is replaced with this color. */
|
|
895
|
+
color?: string;
|
|
870
896
|
children: ReactNode;
|
|
871
897
|
}
|
|
872
898
|
/**
|