@atom63/ui-react 0.2.0-beta.12 → 0.2.0-beta.13

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 (58) hide show
  1. package/README.md +12 -0
  2. package/dist/{button-oVOZ5VpA.d.ts → button-DMnQeAEL.d.ts} +2 -1
  3. package/dist/calendar/index.d.ts +2 -1
  4. package/dist/{chunk-CVKG2VJD.js → chunk-IFBF2IA3.js} +14 -5
  5. package/dist/chunk-IFBF2IA3.js.map +1 -0
  6. package/dist/{chunk-CN4A5CNH.js → chunk-RLF45GBS.js} +149 -49
  7. package/dist/chunk-RLF45GBS.js.map +1 -0
  8. package/dist/{chunk-R67OZVA2.js → chunk-WL27K6MO.js} +3 -2
  9. package/dist/chunk-WL27K6MO.js.map +1 -0
  10. package/dist/{chunk-X5L5DEUZ.js → chunk-ZEY2VU4O.js} +3 -3
  11. package/dist/{chunk-X5L5DEUZ.js.map → chunk-ZEY2VU4O.js.map} +1 -1
  12. package/dist/{destination-link-DMLeR-oF.d.ts → destination-link-BHVQyWry.d.ts} +2 -1
  13. package/dist/{index-B06li5uo.d.ts → index-CbgpSG4j.d.ts} +16 -7
  14. package/dist/index.d.ts +77 -26
  15. package/dist/index.js +239 -86
  16. package/dist/index.js.map +1 -1
  17. package/dist/layout/index.d.ts +2 -1
  18. package/dist/media/index.d.ts +5 -4
  19. package/dist/media/index.js +35 -7
  20. package/dist/media/index.js.map +1 -1
  21. package/dist/media/media-lightbox/parts/index.d.ts +5 -4
  22. package/dist/media/media-lightbox/parts/index.js +2 -2
  23. package/dist/preview/index.d.ts +2 -3
  24. package/dist/preview/index.js +1 -1
  25. package/dist/theme/index.d.ts +3 -2
  26. package/dist/theme/index.js +1 -1
  27. package/dist/{types-Dxe5IzjE.d.ts → types-KQLxlHQZ.d.ts} +21 -0
  28. package/package.json +11 -10
  29. package/src/components/alert/alert.css +18 -15
  30. package/src/components/autocomplete/autocomplete.css +20 -4
  31. package/src/components/chat-typing-indicator/chat-typing-indicator.css +22 -0
  32. package/src/components/command/command.css +20 -0
  33. package/src/components/destination-link/destination-link.css +28 -0
  34. package/src/components/drawer/drawer.css +6 -2
  35. package/src/components/empty/empty.css +2 -4
  36. package/src/components/load-more-trigger/load-more-trigger.css +17 -0
  37. package/src/components/marquee/marquee.css +25 -3
  38. package/src/components/menu/menu.css +36 -1
  39. package/src/components/navigation-menu/navigation-menu.css +22 -4
  40. package/src/components/panel-setting-button/panel-setting-button.css +14 -0
  41. package/src/components/progress/progress.css +24 -2
  42. package/src/components/radio/radio.css +14 -0
  43. package/src/components/rating/rating.css +17 -0
  44. package/src/components/segmented-control/segmented-control.css +14 -0
  45. package/src/components/select/select.css +8 -0
  46. package/src/components/separator/separator.css +3 -1
  47. package/src/components/sheet/sheet.css +8 -4
  48. package/src/components/sidebar/sidebar.css +11 -4
  49. package/src/components/switch/switch.css +16 -1
  50. package/src/components/tabs/tabs.css +10 -0
  51. package/src/components/toggle/toggle.css +14 -8
  52. package/src/components/toggle-group/toggle-group.css +9 -0
  53. package/src/media/media-lightbox/media-lightbox.css +31 -1
  54. package/src/styles/recipes.css +1 -0
  55. package/src/styles/utilities.css +3 -0
  56. package/dist/chunk-CN4A5CNH.js.map +0 -1
  57. package/dist/chunk-CVKG2VJD.js.map +0 -1
  58. package/dist/chunk-R67OZVA2.js.map +0 -1
@@ -266,4 +266,5 @@ interface ReaderLayoutProps {
266
266
  }
267
267
  declare function ReaderLayout({ aside, asideClassName, children, className, contentClassName, reserveAside, }: ReaderLayoutProps): React.JSX.Element;
268
268
 
269
- export { AppView, type AppViewProps, Container, type ContainerChrome, type ContainerMaxWidth, type ContainerPadding, type ContainerProps, DEFAULT_PAGE_SKELETON_COUNT, GRID_CHROME_VARS, GRID_HAIRLINE_CENTER_PX, GRID_HAIRLINE_PX, GridChrome, type GridChromeContextValue, type GridChromeCssVars, type GridChromeLineStyle, type GridChromeProps, type GridChromeStyle, type GridChromeTone, GridCrosshair, GridGuides, type GridGuidesColumns, type GridGuidesProps, GridRule, type GridRuleProps, Page, type PageProps, PageSkeleton, type PageSkeletonProps, ReaderLayout, type ReaderLayoutProps, Section, SectionHeader, type SectionHeaderLevel, type SectionHeaderProps, type SectionHeaderVariant, type SectionProps, containerFrameClassName, containerMaxWidthStyles, gridChromeStyle, pageIndexHeroDescriptionClassName, pageIndexHeroTitleClassName, useGridChrome };
269
+ export { AppView, Container, DEFAULT_PAGE_SKELETON_COUNT, GRID_CHROME_VARS, GRID_HAIRLINE_CENTER_PX, GRID_HAIRLINE_PX, GridChrome, GridCrosshair, GridGuides, GridRule, Page, PageSkeleton, ReaderLayout, Section, SectionHeader, containerFrameClassName, containerMaxWidthStyles, gridChromeStyle, pageIndexHeroDescriptionClassName, pageIndexHeroTitleClassName, useGridChrome };
270
+ export type { AppViewProps, ContainerChrome, ContainerMaxWidth, ContainerPadding, ContainerProps, GridChromeContextValue, GridChromeCssVars, GridChromeLineStyle, GridChromeProps, GridChromeStyle, GridChromeTone, GridGuidesColumns, GridGuidesProps, GridRuleProps, PageProps, PageSkeletonProps, ReaderLayoutProps, SectionHeaderLevel, SectionHeaderProps, SectionHeaderVariant, SectionProps };
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import { ReactElement, PointerEvent, VideoHTMLAttributes, ReactNode } from 'react';
3
- import { M as MediaLightboxLabels, a as MediaLightboxProps, b as MediaLightboxTransition } from '../types-Dxe5IzjE.js';
4
- export { c as MediaLightboxAppearance, d as MediaLightboxItem, e as MediaLightboxItemKind, f as MediaLightboxVideoSource, g as MediaLightboxVideoTrack } from '../types-Dxe5IzjE.js';
3
+ import { M as MediaLightboxLabels, a as MediaLightboxProps, b as MediaLightboxTransition } from '../types-KQLxlHQZ.js';
4
+ export { c as MediaLightboxAppearance, d as MediaLightboxItem, e as MediaLightboxItemKind, f as MediaLightboxVideoSource, g as MediaLightboxVideoTrack } from '../types-KQLxlHQZ.js';
5
5
 
6
6
  declare const clearImageAnimationCache: () => void;
7
7
  type AspectRatio = 'auto' | '1/1' | '4/3' | '3/4' | '16/9' | '9/16' | '2/3' | '3/2' | '5/4' | '21/9' | '9/21';
@@ -45,7 +45,7 @@ declare const DEFAULT_MEDIA_LIGHTBOX_LABELS: MediaLightboxLabels;
45
45
  * pixel of appearance — the glass buttons, the dock, the safe-area padding,
46
46
  * the responsive reveal of the side chevrons — lives here.
47
47
  */
48
- declare function MediaLightbox({ appearance, className, index, items, labels, onAppearanceChange, onExitComplete, onIndexChange, onOpenChange, open, origin, preload, thumbnails, transition, }: MediaLightboxProps): ReactElement | null;
48
+ declare function MediaLightbox({ actions, appearance, className, index, items, labels, onAppearanceChange, onExitComplete, onIndexChange, onOpenChange, open, origin, preload, thumbnails, toolbar, transition, }: MediaLightboxProps): ReactElement | null;
49
49
 
50
50
  type ExcludeRef = {
51
51
  readonly current: HTMLElement | null;
@@ -216,4 +216,5 @@ interface VideoThumbnailProps {
216
216
  }
217
217
  declare function VideoThumbnail({ src, className }: VideoThumbnailProps): React$1.JSX.Element;
218
218
 
219
- export { type AspectRatio, DEFAULT_MEDIA_LIGHTBOX_LABELS, Image, type ImageProps, MediaLightbox, MediaLightboxLabels, MediaLightboxProps, MediaLightboxTransition, MediaLightboxZoomCursor, type UseMediaLightboxOptions, type UseMediaLightboxResult, Video, VideoDialog, type VideoDialogProps, VideoManagerContext, type VideoManagerContextType, VideoManagerProvider, type VideoManagerProviderProps, VideoModal, type VideoModalInteractionMode, type VideoModalProps, type VideoProps, type VideoSource, VideoThumbnail, type VideoThumbnailProps, clearImageAnimationCache, isVideoSrc, useMediaLightbox, useMediaLightboxZoomCursor, useVideoManager };
219
+ export { DEFAULT_MEDIA_LIGHTBOX_LABELS, Image, MediaLightbox, MediaLightboxLabels, MediaLightboxProps, MediaLightboxTransition, MediaLightboxZoomCursor, Video, VideoDialog, VideoManagerContext, VideoManagerProvider, VideoModal, VideoThumbnail, clearImageAnimationCache, isVideoSrc, useMediaLightbox, useMediaLightboxZoomCursor, useVideoManager };
220
+ export type { AspectRatio, ImageProps, UseMediaLightboxOptions, UseMediaLightboxResult, VideoDialogProps, VideoManagerContextType, VideoManagerProviderProps, VideoModalInteractionMode, VideoModalProps, VideoProps, VideoSource, VideoThumbnailProps };
@@ -1,6 +1,6 @@
1
- import { useReducedMotion, Lightbox, revealOrigin, supportsViewTransitions, preferCheapMediaTransition, runMediaViewTransition, useLightboxRefs, useLightboxConfig, useLightboxState, CHROME_IN, CHROME_OUT, CHROME_EXIT_OFFSET, AXIS_LOCK_THRESHOLD } from '../chunk-X5L5DEUZ.js';
2
- export { DEFAULT_MEDIA_LIGHTBOX_LABELS } from '../chunk-X5L5DEUZ.js';
3
- import '../chunk-R67OZVA2.js';
1
+ import { useReducedMotion, Lightbox, revealOrigin, supportsViewTransitions, preferCheapMediaTransition, runMediaViewTransition, useLightboxRefs, useLightboxConfig, useLightboxState, CHROME_IN, CHROME_OUT, CHROME_EXIT_OFFSET, AXIS_LOCK_THRESHOLD } from '../chunk-ZEY2VU4O.js';
2
+ export { DEFAULT_MEDIA_LIGHTBOX_LABELS } from '../chunk-ZEY2VU4O.js';
3
+ import '../chunk-WL27K6MO.js';
4
4
  import '../chunk-UPPHQLZ2.js';
5
5
  import { cn } from '../chunk-AJLHJRK6.js';
6
6
  import { motion, AnimatePresence } from 'motion/react';
@@ -626,9 +626,15 @@ function lightboxIconButtonClassName(tone = "glass") {
626
626
  )
627
627
  );
628
628
  }
629
- function PresetFloatingChrome({ chrome }) {
630
- const { transition } = useLightboxConfig();
629
+ function PresetFloatingChrome({
630
+ chrome,
631
+ toolbar
632
+ }) {
633
+ const { items, transition } = useLightboxConfig();
634
+ const { index } = useLightboxState();
631
635
  const { rootRef } = useLightboxRefs();
636
+ const item = items[index];
637
+ const toolbarContent = item && toolbar ? toolbar(item, index) : null;
632
638
  const viewTransition = transition === "view-transition";
633
639
  const pointerEventsClassName = chrome.visible ? "pointer-events-auto" : "pointer-events-none";
634
640
  return /* @__PURE__ */ jsx(
@@ -660,6 +666,15 @@ function PresetFloatingChrome({ chrome }) {
660
666
  {
661
667
  className: cn("absolute top-4 right-4 flex items-center gap-1.5", pointerEventsClassName),
662
668
  children: [
669
+ toolbarContent != null ? /* @__PURE__ */ jsx(
670
+ "div",
671
+ {
672
+ className: "flex items-center gap-1.5",
673
+ "data-a63-no-drag": "",
674
+ "data-slot": "media-lightbox-toolbar",
675
+ children: toolbarContent
676
+ }
677
+ ) : null,
663
678
  /* @__PURE__ */ jsx(Lightbox.AppearanceToggle, { className: lightboxIconButtonClassName("glass") }),
664
679
  /* @__PURE__ */ jsx(Lightbox.Destination, { className: lightboxIconButtonClassName("glass") }),
665
680
  /* @__PURE__ */ jsxs(
@@ -713,6 +728,7 @@ function PresetFloatingChrome({ chrome }) {
713
728
  );
714
729
  }
715
730
  function Dock({
731
+ actions,
716
732
  chrome,
717
733
  thumbnails
718
734
  }) {
@@ -724,6 +740,7 @@ function Dock({
724
740
  const isAboveSm = useMinWidth(SM_BREAKPOINT_PX);
725
741
  const showThumbnails = thumbnails && itemCount > 1 && isAboveSm;
726
742
  const pointerEventsClassName = chrome.visible ? "pointer-events-auto" : "pointer-events-none";
743
+ const actionsContent = item && actions ? actions(item, index) : null;
727
744
  return /* @__PURE__ */ jsx(
728
745
  "div",
729
746
  {
@@ -784,6 +801,15 @@ function Dock({
784
801
  }
785
802
  ) : null
786
803
  ] }),
804
+ actionsContent != null ? /* @__PURE__ */ jsx(
805
+ "div",
806
+ {
807
+ className: "flex max-w-full items-center justify-start gap-2 overflow-x-auto sm:justify-center",
808
+ "data-a63-no-drag": "",
809
+ "data-slot": "media-lightbox-actions",
810
+ children: actionsContent
811
+ }
812
+ ) : null,
787
813
  showThumbnails ? /* @__PURE__ */ jsx(Lightbox.Thumbnails, { className: "max-w-full min-w-0 justify-start sm:justify-center", children: (thumbnail) => /* @__PURE__ */ jsx(
788
814
  Lightbox.Thumbnail,
789
815
  {
@@ -845,6 +871,7 @@ function revealFor(chrome) {
845
871
  };
846
872
  }
847
873
  function MediaLightbox({
874
+ actions,
848
875
  appearance,
849
876
  className,
850
877
  index,
@@ -858,6 +885,7 @@ function MediaLightbox({
858
885
  origin,
859
886
  preload,
860
887
  thumbnails,
888
+ toolbar,
861
889
  transition = "flip"
862
890
  }) {
863
891
  const chrome = useChromeAutoHide(open);
@@ -905,11 +933,11 @@ function MediaLightbox({
905
933
  /* @__PURE__ */ jsx(SlideCloseArea, { touchRef }),
906
934
  /* @__PURE__ */ jsx(Lightbox.Frame, { className: "sm:rounded-2xl", children: /* @__PURE__ */ jsx(Lightbox.Zoom, { children: /* @__PURE__ */ jsx(Lightbox.Media, {}) }) })
907
935
  ] }, slide.item.id) }),
908
- /* @__PURE__ */ jsx(PresetFloatingChrome, { chrome })
936
+ /* @__PURE__ */ jsx(PresetFloatingChrome, { chrome, toolbar })
909
937
  ]
910
938
  }
911
939
  ),
912
- /* @__PURE__ */ jsx(Dock, { chrome, thumbnails: Boolean(thumbnails) })
940
+ /* @__PURE__ */ jsx(Dock, { actions, chrome, thumbnails: Boolean(thumbnails) })
913
941
  ]
914
942
  }
915
943
  )