@ship-it-ui/ui 0.0.13 → 0.0.14

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.d.cts CHANGED
@@ -5,7 +5,6 @@ import { useEffect, KeyboardEvent, RefObject, ButtonHTMLAttributes, ReactNode, H
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
6
6
  import { VariantProps } from 'class-variance-authority';
7
7
  import * as RadixCheckbox from '@radix-ui/react-checkbox';
8
- import * as react_jsx_runtime from 'react/jsx-runtime';
9
8
  import * as RadixRadio from '@radix-ui/react-radio-group';
10
9
  import * as RadixSelect from '@radix-ui/react-select';
11
10
  import * as RadixSlider from '@radix-ui/react-slider';
@@ -291,7 +290,7 @@ interface FieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
291
290
  * {(p) => <Input type="email" placeholder="me@org.com" {...p} />}
292
291
  * </Field>
293
292
  */
294
- declare function Field({ label, hint, error, required, className, children, ...props }: FieldProps): react_jsx_runtime.JSX.Element;
293
+ declare function Field({ label, hint, error, required, className, children, ...props }: FieldProps): react.JSX.Element;
295
294
 
296
295
  /**
297
296
  * Display-to-input rename primitive. Renders `value` as a static element until
@@ -504,7 +503,7 @@ interface SelectProps extends Omit<RadixSelect.SelectProps, 'children'> {
504
503
  * One-line Select. For composition (groups, separators), use the lower-level
505
504
  * `SelectRoot/Trigger/Content/Item` exports directly.
506
505
  */
507
- declare function Select({ options, placeholder, size, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...rootProps }: SelectProps): react_jsx_runtime.JSX.Element;
506
+ declare function Select({ options, placeholder, size, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...rootProps }: SelectProps): react.JSX.Element;
508
507
 
509
508
  interface SliderProps extends Omit<RadixSlider.SliderProps, 'asChild' | 'value' | 'defaultValue' | 'onValueChange'> {
510
509
  /** Show the numeric value to the right of the track. */
@@ -944,7 +943,7 @@ interface DialogProps extends RadixDialog.DialogProps {
944
943
  /** When set, content is wrapped in a content frame; omit for full custom layout. */
945
944
  children?: ReactNode;
946
945
  }
947
- declare function Dialog({ title, description, footer, width, children, ...rootProps }: DialogProps): react_jsx_runtime.JSX.Element;
946
+ declare function Dialog({ title, description, footer, width, children, ...rootProps }: DialogProps): react.JSX.Element;
948
947
 
949
948
  type DrawerSide = 'left' | 'right' | 'bottom';
950
949
  interface DrawerProps extends RadixDialog.DialogProps {
@@ -1042,7 +1041,7 @@ interface HoverCardProps extends RadixHoverCard.HoverCardProps {
1042
1041
  content: ReactNode;
1043
1042
  }
1044
1043
  /** Convenience wrapper — pass `trigger` and `content` as props. */
1045
- declare function HoverCard({ trigger, content, ...rootProps }: HoverCardProps): react_jsx_runtime.JSX.Element;
1044
+ declare function HoverCard({ trigger, content, ...rootProps }: HoverCardProps): react.JSX.Element;
1046
1045
 
1047
1046
  declare const PopoverRoot: react.FC<RadixPopover.PopoverProps>;
1048
1047
  declare const PopoverTrigger: react.ForwardRefExoticComponent<RadixPopover.PopoverTriggerProps & react.RefAttributes<HTMLButtonElement>>;
@@ -1086,7 +1085,7 @@ interface ToastContextValue {
1086
1085
  */
1087
1086
  declare function ToastProvider({ children }: {
1088
1087
  children: ReactNode;
1089
- }): react_jsx_runtime.JSX.Element;
1088
+ }): react.JSX.Element;
1090
1089
  declare function useToast(): ToastContextValue;
1091
1090
  interface ToastCardProps {
1092
1091
  toast: ToastEntry;
@@ -1132,7 +1131,7 @@ interface SimpleTooltipProps {
1132
1131
  * (multiple triggers in a list, shared delay config), use the lower-level
1133
1132
  * `Tooltip` + `TooltipTrigger` + `TooltipContent` primitives.
1134
1133
  */
1135
- declare function SimpleTooltip({ content, children, side, delayDuration, }: SimpleTooltipProps): react_jsx_runtime.JSX.Element;
1134
+ declare function SimpleTooltip({ content, children, side, delayDuration, }: SimpleTooltipProps): react.JSX.Element;
1136
1135
 
1137
1136
  /**
1138
1137
  * Alert — inline messaging block. Four tones (accent / ok / warn / err) with a
@@ -1423,7 +1422,7 @@ interface DataTableProps<T> {
1423
1422
  }
1424
1423
  declare function DataTable<T>(props: DataTableProps<T> & {
1425
1424
  ref?: Ref<HTMLTableElement>;
1426
- }): react_jsx_runtime.JSX.Element;
1425
+ }): react.JSX.Element;
1427
1426
 
1428
1427
  /** A `{from, to}` date range used by `Calendar` and `DateRangePicker`. */
1429
1428
  interface DateRange {
@@ -1590,9 +1589,10 @@ interface ListingCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'childre
1590
1589
  /**
1591
1590
  * Wrap the photo carousel past the boundaries (next from the last
1592
1591
  * photo goes to the first). Default `true` — marketplace photo
1593
- * browsing expects looping. Pass `false` to restore stop-at-end.
1592
+ * browsing expects looping. Pass `false` to restore stop-at-end, or
1593
+ * `'circular'` / `'sweep'` to pick the loop variant explicitly.
1594
1594
  */
1595
- loop?: boolean;
1595
+ loop?: boolean | 'circular' | 'sweep';
1596
1596
  /** Listing title — e.g. "Sun-soaked cabin in Marin". */
1597
1597
  title: ReactNode;
1598
1598
  /** Optional eyebrow text above the title (location, listing type). */
@@ -1751,9 +1751,11 @@ interface ListingDetailProps {
1751
1751
  * Wrap the gallery carousel and the fullscreen lightbox past the
1752
1752
  * boundaries (next from the last photo goes to the first). Default
1753
1753
  * `true` — marketplace photo browsing expects looping. One prop
1754
- * drives both surfaces.
1754
+ * drives both surfaces. Pass `'circular'` or `'sweep'` to pick the
1755
+ * gallery's loop variant explicitly; both forward as truthy to the
1756
+ * lightbox.
1755
1757
  */
1756
- loop?: boolean;
1758
+ loop?: boolean | 'circular' | 'sweep';
1757
1759
  /** Listing title — e.g. "Sun-soaked cabin in Marin". */
1758
1760
  title: ReactNode;
1759
1761
  /** Optional eyebrow above the title — listing type, location. */
package/dist/index.d.ts CHANGED
@@ -5,7 +5,6 @@ import { useEffect, KeyboardEvent, RefObject, ButtonHTMLAttributes, ReactNode, H
5
5
  import * as class_variance_authority_types from 'class-variance-authority/types';
6
6
  import { VariantProps } from 'class-variance-authority';
7
7
  import * as RadixCheckbox from '@radix-ui/react-checkbox';
8
- import * as react_jsx_runtime from 'react/jsx-runtime';
9
8
  import * as RadixRadio from '@radix-ui/react-radio-group';
10
9
  import * as RadixSelect from '@radix-ui/react-select';
11
10
  import * as RadixSlider from '@radix-ui/react-slider';
@@ -291,7 +290,7 @@ interface FieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
291
290
  * {(p) => <Input type="email" placeholder="me@org.com" {...p} />}
292
291
  * </Field>
293
292
  */
294
- declare function Field({ label, hint, error, required, className, children, ...props }: FieldProps): react_jsx_runtime.JSX.Element;
293
+ declare function Field({ label, hint, error, required, className, children, ...props }: FieldProps): react.JSX.Element;
295
294
 
296
295
  /**
297
296
  * Display-to-input rename primitive. Renders `value` as a static element until
@@ -504,7 +503,7 @@ interface SelectProps extends Omit<RadixSelect.SelectProps, 'children'> {
504
503
  * One-line Select. For composition (groups, separators), use the lower-level
505
504
  * `SelectRoot/Trigger/Content/Item` exports directly.
506
505
  */
507
- declare function Select({ options, placeholder, size, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...rootProps }: SelectProps): react_jsx_runtime.JSX.Element;
506
+ declare function Select({ options, placeholder, size, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...rootProps }: SelectProps): react.JSX.Element;
508
507
 
509
508
  interface SliderProps extends Omit<RadixSlider.SliderProps, 'asChild' | 'value' | 'defaultValue' | 'onValueChange'> {
510
509
  /** Show the numeric value to the right of the track. */
@@ -944,7 +943,7 @@ interface DialogProps extends RadixDialog.DialogProps {
944
943
  /** When set, content is wrapped in a content frame; omit for full custom layout. */
945
944
  children?: ReactNode;
946
945
  }
947
- declare function Dialog({ title, description, footer, width, children, ...rootProps }: DialogProps): react_jsx_runtime.JSX.Element;
946
+ declare function Dialog({ title, description, footer, width, children, ...rootProps }: DialogProps): react.JSX.Element;
948
947
 
949
948
  type DrawerSide = 'left' | 'right' | 'bottom';
950
949
  interface DrawerProps extends RadixDialog.DialogProps {
@@ -1042,7 +1041,7 @@ interface HoverCardProps extends RadixHoverCard.HoverCardProps {
1042
1041
  content: ReactNode;
1043
1042
  }
1044
1043
  /** Convenience wrapper — pass `trigger` and `content` as props. */
1045
- declare function HoverCard({ trigger, content, ...rootProps }: HoverCardProps): react_jsx_runtime.JSX.Element;
1044
+ declare function HoverCard({ trigger, content, ...rootProps }: HoverCardProps): react.JSX.Element;
1046
1045
 
1047
1046
  declare const PopoverRoot: react.FC<RadixPopover.PopoverProps>;
1048
1047
  declare const PopoverTrigger: react.ForwardRefExoticComponent<RadixPopover.PopoverTriggerProps & react.RefAttributes<HTMLButtonElement>>;
@@ -1086,7 +1085,7 @@ interface ToastContextValue {
1086
1085
  */
1087
1086
  declare function ToastProvider({ children }: {
1088
1087
  children: ReactNode;
1089
- }): react_jsx_runtime.JSX.Element;
1088
+ }): react.JSX.Element;
1090
1089
  declare function useToast(): ToastContextValue;
1091
1090
  interface ToastCardProps {
1092
1091
  toast: ToastEntry;
@@ -1132,7 +1131,7 @@ interface SimpleTooltipProps {
1132
1131
  * (multiple triggers in a list, shared delay config), use the lower-level
1133
1132
  * `Tooltip` + `TooltipTrigger` + `TooltipContent` primitives.
1134
1133
  */
1135
- declare function SimpleTooltip({ content, children, side, delayDuration, }: SimpleTooltipProps): react_jsx_runtime.JSX.Element;
1134
+ declare function SimpleTooltip({ content, children, side, delayDuration, }: SimpleTooltipProps): react.JSX.Element;
1136
1135
 
1137
1136
  /**
1138
1137
  * Alert — inline messaging block. Four tones (accent / ok / warn / err) with a
@@ -1423,7 +1422,7 @@ interface DataTableProps<T> {
1423
1422
  }
1424
1423
  declare function DataTable<T>(props: DataTableProps<T> & {
1425
1424
  ref?: Ref<HTMLTableElement>;
1426
- }): react_jsx_runtime.JSX.Element;
1425
+ }): react.JSX.Element;
1427
1426
 
1428
1427
  /** A `{from, to}` date range used by `Calendar` and `DateRangePicker`. */
1429
1428
  interface DateRange {
@@ -1590,9 +1589,10 @@ interface ListingCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'childre
1590
1589
  /**
1591
1590
  * Wrap the photo carousel past the boundaries (next from the last
1592
1591
  * photo goes to the first). Default `true` — marketplace photo
1593
- * browsing expects looping. Pass `false` to restore stop-at-end.
1592
+ * browsing expects looping. Pass `false` to restore stop-at-end, or
1593
+ * `'circular'` / `'sweep'` to pick the loop variant explicitly.
1594
1594
  */
1595
- loop?: boolean;
1595
+ loop?: boolean | 'circular' | 'sweep';
1596
1596
  /** Listing title — e.g. "Sun-soaked cabin in Marin". */
1597
1597
  title: ReactNode;
1598
1598
  /** Optional eyebrow text above the title (location, listing type). */
@@ -1751,9 +1751,11 @@ interface ListingDetailProps {
1751
1751
  * Wrap the gallery carousel and the fullscreen lightbox past the
1752
1752
  * boundaries (next from the last photo goes to the first). Default
1753
1753
  * `true` — marketplace photo browsing expects looping. One prop
1754
- * drives both surfaces.
1754
+ * drives both surfaces. Pass `'circular'` or `'sweep'` to pick the
1755
+ * gallery's loop variant explicitly; both forward as truthy to the
1756
+ * lightbox.
1755
1757
  */
1756
- loop?: boolean;
1758
+ loop?: boolean | 'circular' | 'sweep';
1757
1759
  /** Listing title — e.g. "Sun-soaked cabin in Marin". */
1758
1760
  title: ReactNode;
1759
1761
  /** Optional eyebrow above the title — listing type, location. */
package/dist/index.js CHANGED
@@ -3111,6 +3111,7 @@ var Carousel = forwardRef44(function Carousel2({
3111
3111
  const internalScrollRef = useRef8(false);
3112
3112
  const goToInProgressRef = useRef8(false);
3113
3113
  const wrapInFlightRef = useRef8(null);
3114
+ const rebaseConsumeRef = useRef8(null);
3114
3115
  const activeIdx = active ?? 0;
3115
3116
  const domIndexFor = useCallback9((real) => isLooping ? real + 1 : real, [isLooping]);
3116
3117
  const goTo = useCallback9(
@@ -3126,6 +3127,7 @@ var Carousel = forwardRef44(function Carousel2({
3126
3127
  const rebaseSlide = node.children[rebaseTarget];
3127
3128
  if (rebaseSlide) {
3128
3129
  internalScrollRef.current = true;
3130
+ rebaseConsumeRef.current = rebaseTarget;
3129
3131
  rebaseSlide.scrollIntoView({
3130
3132
  behavior: "instant",
3131
3133
  block: "nearest",
@@ -3165,6 +3167,10 @@ var Carousel = forwardRef44(function Carousel2({
3165
3167
  if (domIdx !== activeIdx) setActive(domIdx);
3166
3168
  return;
3167
3169
  }
3170
+ if (rebaseConsumeRef.current !== null) {
3171
+ if (domIdx === rebaseConsumeRef.current) return;
3172
+ rebaseConsumeRef.current = null;
3173
+ }
3168
3174
  if (domIdx === 0) {
3169
3175
  if (goToInProgressRef.current && node.scrollLeft > 1) return;
3170
3176
  const realTwin = node.children[N];
@@ -3199,6 +3205,7 @@ var Carousel = forwardRef44(function Carousel2({
3199
3205
  const onPointerDown = () => {
3200
3206
  goToInProgressRef.current = false;
3201
3207
  wrapInFlightRef.current = null;
3208
+ rebaseConsumeRef.current = null;
3202
3209
  };
3203
3210
  node.addEventListener("scroll", onScroll, { passive: true });
3204
3211
  node.addEventListener("pointerdown", onPointerDown, { passive: true });
@@ -5125,7 +5132,7 @@ var ListingDetail = forwardRef52(function ListingDetail2({
5125
5132
  items: photos,
5126
5133
  index: galleryIndex,
5127
5134
  onIndexChange: setGalleryIndex,
5128
- loop,
5135
+ loop: Boolean(loop),
5129
5136
  title: lightboxTitle,
5130
5137
  renderItem: (src, i) => renderPhoto ? renderPhoto(src, i, "lightbox") : /* @__PURE__ */ jsx54("img", { src, alt: "", className: "max-h-[88vh] max-w-[92vw] object-contain" })
5131
5138
  }