@arolariu/components 1.1.0 → 2.0.0
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/CHANGELOG.md +32 -0
- package/dist/components/ui/accordion.js +3 -3
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/accordion_module.css.map +1 -1
- package/dist/components/ui/alert-dialog.js +8 -8
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert-dialog_module.css +1 -1
- package/dist/components/ui/alert-dialog_module.css.map +1 -1
- package/dist/components/ui/alert.js +4 -4
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/alert_module.css.map +1 -1
- package/dist/components/ui/aspect-ratio.js +2 -2
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/aspect-ratio_module.css.map +1 -1
- package/dist/components/ui/async-boundary.js +2 -2
- package/dist/components/ui/async-boundary.js.map +1 -1
- package/dist/components/ui/avatar.js +4 -4
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/avatar_module.css.map +1 -1
- package/dist/components/ui/background-beams.js +3 -3
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/background-beams_module.css.map +1 -1
- package/dist/components/ui/badge.js +2 -2
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/badge_module.css.map +1 -1
- package/dist/components/ui/breadcrumb.js +10 -10
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/breadcrumb_module.css.map +1 -1
- package/dist/components/ui/bubble-background.js +5 -5
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/bubble-background_module.css.map +1 -1
- package/dist/components/ui/button-group.js +6 -6
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button-group_module.css.map +1 -1
- package/dist/components/ui/button.js +4 -4
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/button_module.css.map +1 -1
- package/dist/components/ui/calendar.d.ts +2 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +4 -4
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/calendar_module.css.map +1 -1
- package/dist/components/ui/card-skeleton.js +2 -2
- package/dist/components/ui/card-skeleton.js.map +1 -1
- package/dist/components/ui/card-skeleton_module.css.map +1 -1
- package/dist/components/ui/card.js +8 -8
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/card_module.css.map +1 -1
- package/dist/components/ui/carousel.js +16 -16
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/carousel_module.css +1 -1
- package/dist/components/ui/carousel_module.css.map +1 -1
- package/dist/components/ui/chart.d.ts +6 -3
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +70 -136
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/chart_module.css.map +1 -1
- package/dist/components/ui/checkbox-group.js +2 -2
- package/dist/components/ui/checkbox-group.js.map +1 -1
- package/dist/components/ui/checkbox-group_module.css.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/checkbox_module.css.map +1 -1
- package/dist/components/ui/collapsible.js +4 -4
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/collapsible_module.css.map +1 -1
- package/dist/components/ui/combobox.js +13 -13
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/combobox_module.css.map +1 -1
- package/dist/components/ui/command.js +40 -40
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/command_module.css +1 -1
- package/dist/components/ui/command_module.css.map +1 -1
- package/dist/components/ui/context-menu.js +6 -6
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/context-menu_module.css.map +1 -1
- package/dist/components/ui/copy-button.js +6 -6
- package/dist/components/ui/copy-button.js.map +1 -1
- package/dist/components/ui/copy-button_module.css.map +1 -1
- package/dist/components/ui/counting-number.js +6 -6
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/counting-number_module.css.map +1 -1
- package/dist/components/ui/dialog.js +6 -6
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dialog_module.css +1 -1
- package/dist/components/ui/dialog_module.css.map +1 -1
- package/dist/components/ui/dot-background_module.css.map +1 -1
- package/dist/components/ui/drawer.js +5 -5
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/drawer_module.css.map +1 -1
- package/dist/components/ui/dropdown-menu.js +6 -6
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdown-menu_module.css.map +1 -1
- package/dist/components/ui/dropdrawer.js +52 -52
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/dropdrawer_module.css.map +1 -1
- package/dist/components/ui/empty.js +7 -7
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/empty_module.css.map +1 -1
- package/dist/components/ui/error-boundary.js +2 -2
- package/dist/components/ui/error-boundary.js.map +1 -1
- package/dist/components/ui/error-boundary_module.css.map +1 -1
- package/dist/components/ui/field.js +12 -12
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/field_module.css.map +1 -1
- package/dist/components/ui/fireworks-background.js +6 -6
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/fireworks-background_module.css.map +1 -1
- package/dist/components/ui/flip-button.js +5 -5
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/flip-button_module.css.map +1 -1
- package/dist/components/ui/focus-scope.js +6 -6
- package/dist/components/ui/focus-scope.js.map +1 -1
- package/dist/components/ui/focus-scope_module.css.map +1 -1
- package/dist/components/ui/form-skeleton.js +2 -2
- package/dist/components/ui/form-skeleton.js.map +1 -1
- package/dist/components/ui/form-skeleton_module.css.map +1 -1
- package/dist/components/ui/form.d.ts +3 -3
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +13 -13
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/form_module.css.map +1 -1
- package/dist/components/ui/gradient-background.js +2 -2
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-background_module.css.map +1 -1
- package/dist/components/ui/gradient-text.js +2 -2
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/gradient-text_module.css.map +1 -1
- package/dist/components/ui/highlight-text.js +4 -4
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/highlight-text_module.css.map +1 -1
- package/dist/components/ui/hole-background.js +21 -21
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hole-background_module.css.map +1 -1
- package/dist/components/ui/hover-card.js +3 -3
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/hover-card_module.css.map +1 -1
- package/dist/components/ui/input-group.js +7 -7
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-group_module.css.map +1 -1
- package/dist/components/ui/input-otp.d.ts +3 -3
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +6 -6
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input-otp_module.css.map +1 -1
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/input_module.css.map +1 -1
- package/dist/components/ui/item.js +13 -13
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/item_module.css.map +1 -1
- package/dist/components/ui/kbd.js +3 -3
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/kbd_module.css.map +1 -1
- package/dist/components/ui/label.js +2 -2
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/label_module.css.map +1 -1
- package/dist/components/ui/list-skeleton.js +2 -2
- package/dist/components/ui/list-skeleton.js.map +1 -1
- package/dist/components/ui/list-skeleton_module.css.map +1 -1
- package/dist/components/ui/loading-overlay.js +2 -2
- package/dist/components/ui/loading-overlay.js.map +1 -1
- package/dist/components/ui/loading-overlay_module.css.map +1 -1
- package/dist/components/ui/menubar.js +4 -4
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/menubar_module.css.map +1 -1
- package/dist/components/ui/meter.js +5 -5
- package/dist/components/ui/meter.js.map +1 -1
- package/dist/components/ui/meter_module.css.map +1 -1
- package/dist/components/ui/navigation-menu.js +5 -5
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/navigation-menu_module.css +1 -1
- package/dist/components/ui/navigation-menu_module.css.map +1 -1
- package/dist/components/ui/number-field.js +3 -3
- package/dist/components/ui/number-field.js.map +1 -1
- package/dist/components/ui/number-field_module.css.map +1 -1
- package/dist/components/ui/pagination.js +8 -8
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/pagination_module.css.map +1 -1
- package/dist/components/ui/popover.js +5 -5
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/popover_module.css.map +1 -1
- package/dist/components/ui/progress.js +2 -2
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/progress_module.css.map +1 -1
- package/dist/components/ui/radio-group.js +3 -3
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/radio-group_module.css.map +1 -1
- package/dist/components/ui/resizable.d.ts +13 -29
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +8 -7
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/resizable_module.css.map +1 -1
- package/dist/components/ui/ripple-button.js +9 -9
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/ripple-button_module.css.map +1 -1
- package/dist/components/ui/scratcher_module.css.map +1 -1
- package/dist/components/ui/scroll-area.js +2 -2
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/scroll-area_module.css.map +1 -1
- package/dist/components/ui/select.js +4 -4
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/select_module.css.map +1 -1
- package/dist/components/ui/separator.js +2 -2
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/separator_module.css.map +1 -1
- package/dist/components/ui/sheet.js +6 -6
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sheet_module.css.map +1 -1
- package/dist/components/ui/sidebar.js +36 -36
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/sidebar_module.css.map +1 -1
- package/dist/components/ui/skeleton.js +2 -2
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/skeleton_module.css.map +1 -1
- package/dist/components/ui/slider.js +2 -2
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/slider_module.css.map +1 -1
- package/dist/components/ui/spinner.js +2 -2
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/spinner_module.css.map +1 -1
- package/dist/components/ui/stepper.js +2 -2
- package/dist/components/ui/stepper.js.map +1 -1
- package/dist/components/ui/stepper_module.css.map +1 -1
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/switch_module.css.map +1 -1
- package/dist/components/ui/table-skeleton.js +2 -2
- package/dist/components/ui/table-skeleton.js.map +1 -1
- package/dist/components/ui/table-skeleton_module.css.map +1 -1
- package/dist/components/ui/table.js +9 -9
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/table_module.css.map +1 -1
- package/dist/components/ui/tabs.js +3 -3
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/tabs_module.css.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/textarea_module.css.map +1 -1
- package/dist/components/ui/timeline.js +5 -5
- package/dist/components/ui/timeline.js.map +1 -1
- package/dist/components/ui/timeline_module.css.map +1 -1
- package/dist/components/ui/{sonner.d.ts → toast.d.ts} +10 -2
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/{sonner.js → toast.js} +40 -40
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toast.module.js +34 -0
- package/dist/components/ui/toast.module.js.map +1 -0
- package/dist/components/ui/{sonner_module.css → toast_module.css} +35 -35
- package/dist/components/ui/toast_module.css.map +1 -0
- package/dist/components/ui/toggle-group.js +5 -5
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle-group_module.css.map +1 -1
- package/dist/components/ui/toggle.js +2 -2
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/toggle_module.css.map +1 -1
- package/dist/components/ui/toolbar.js +6 -6
- package/dist/components/ui/toolbar.js.map +1 -1
- package/dist/components/ui/toolbar_module.css.map +1 -1
- package/dist/components/ui/tooltip.js +4 -4
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/tooltip_module.css.map +1 -1
- package/dist/components/ui/typewriter.js +4 -4
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/components/ui/typewriter_module.css.map +1 -1
- package/dist/components/ui/visually-hidden.js +2 -2
- package/dist/components/ui/visually-hidden.js.map +1 -1
- package/dist/components/ui/visually-hidden_module.css.map +1 -1
- package/dist/hooks/useAnnounce.js +5 -5
- package/dist/hooks/useAnnounce.js.map +1 -1
- package/dist/hooks/useClipboard.js +6 -6
- package/dist/hooks/useClipboard.js.map +1 -1
- package/dist/hooks/useControllableState.js +3 -3
- package/dist/hooks/useControllableState.js.map +1 -1
- package/dist/hooks/useDebounce.js +3 -3
- package/dist/hooks/useDebounce.js.map +1 -1
- package/dist/hooks/useEventCallback.js +4 -4
- package/dist/hooks/useEventCallback.js.map +1 -1
- package/dist/hooks/useFocusManager.js +6 -6
- package/dist/hooks/useFocusManager.js.map +1 -1
- package/dist/hooks/useFocusVisible.js +5 -5
- package/dist/hooks/useFocusVisible.js.map +1 -1
- package/dist/hooks/useId.js +4 -4
- package/dist/hooks/useId.js.map +1 -1
- package/dist/hooks/useIntersectionObserver.js +3 -3
- package/dist/hooks/useIntersectionObserver.js.map +1 -1
- package/dist/hooks/useInterval.js +4 -4
- package/dist/hooks/useInterval.js.map +1 -1
- package/dist/hooks/useLocalStorage.js +4 -4
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useMediaQuery.js +3 -3
- package/dist/hooks/useMediaQuery.js.map +1 -1
- package/dist/hooks/useMergedRefs.js +2 -2
- package/dist/hooks/useMergedRefs.js.map +1 -1
- package/dist/hooks/useOnClickOutside.js +2 -2
- package/dist/hooks/useOnClickOutside.js.map +1 -1
- package/dist/hooks/usePrevious.js +3 -3
- package/dist/hooks/usePrevious.js.map +1 -1
- package/dist/hooks/useThrottle.js +7 -7
- package/dist/hooks/useThrottle.js.map +1 -1
- package/dist/hooks/useTimeout.js +4 -4
- package/dist/hooks/useTimeout.js.map +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/motion/Collapse.js +2 -2
- package/dist/motion/Collapse.js.map +1 -1
- package/dist/motion/Collapse_module.css.map +1 -1
- package/package.json +7 -8
- package/src/components/ui/calendar.tsx +2 -1
- package/src/components/ui/chart.tsx +2 -2
- package/src/components/ui/form.tsx +28 -3
- package/src/components/ui/input-otp.tsx +3 -3
- package/src/components/ui/resizable.tsx +15 -18
- package/src/components/ui/{sonner.module.css → toast.module.css} +1 -1
- package/src/components/ui/{sonner.tsx → toast.tsx} +2 -2
- package/src/index.ts +4 -4
- package/dist/components/ui/sonner.d.ts.map +0 -1
- package/dist/components/ui/sonner.js.map +0 -1
- package/dist/components/ui/sonner.module.js +0 -34
- package/dist/components/ui/sonner.module.js.map +0 -1
- package/dist/components/ui/sonner_module.css.map +0 -1
- package/dist/rslib-runtime.js +0 -39
- package/dist/rslib-runtime.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/ripple-button.js","sources":["../../../src/components/ui/ripple-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type HTMLMotionProps, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./ripple-button.module.css\";\r\n\r\ninterface Ripple {\r\n id: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Props accepted by {@link RippleButton}. */\r\nexport interface RippleButtonProps extends HTMLMotionProps<\"button\"> {\r\n /** Button contents rendered above the ripple layer. @default undefined */\r\n children: React.ReactNode;\r\n /** Additional CSS classes merged with each generated ripple. @default undefined */\r\n rippleClassName?: string;\r\n /** Final expansion scale applied to each ripple animation. @default 10 */\r\n scale?: number;\r\n /** Motion timing used for each ripple animation. @default {duration: 0.6, ease: \"easeOut\"} */\r\n transition?: Transition;\r\n}\r\n\r\n/**\r\n * Renders a pressable button that emits animated ripples from the click position.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<button>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <RippleButton>Click me</RippleButton>\r\n * ```\r\n *\r\n * @see {@link RippleButtonProps} for available props\r\n */\r\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\r\n ({children, onClick, className, rippleClassName, scale = 10, transition = {duration: 0.6, ease: \"easeOut\"}, ...props}, ref) => {\r\n // eslint-disable-next-line sonarjs/no-unused-vars -- removing React key avoids implicit key spreading\r\n const {key: _ignoredKey, ...restProps} = props;\r\n const [ripples, setRipples] = React.useState<ReadonlyArray<Ripple>>([]);\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n const timeoutIdsRef = React.useRef<ReadonlyArray<number>>([]);\r\n\r\n React.useImperativeHandle(ref, () => buttonRef.current!, []);\r\n\r\n React.useEffect(\r\n () => () => {\r\n timeoutIdsRef.current.forEach((timeoutId) => {\r\n globalThis.window.clearTimeout(timeoutId);\r\n });\r\n },\r\n [],\r\n );\r\n\r\n const createRipple = React.useCallback((event: React.MouseEvent<HTMLButtonElement>): void => {\r\n const button = buttonRef.current;\r\n if (!button) {\r\n return;\r\n }\r\n\r\n const rect = button.getBoundingClientRect();\r\n const x = event.clientX - rect.left;\r\n const y = event.clientY - rect.top;\r\n\r\n const newRipple: Ripple = {\r\n id: Date.now(),\r\n x,\r\n y,\r\n };\r\n\r\n setRipples((previousRipples) => [...previousRipples, newRipple]);\r\n\r\n const timeoutId = globalThis.window.setTimeout(() => {\r\n setRipples((previousRipples) => previousRipples.filter((ripple) => ripple.id !== newRipple.id));\r\n }, 600);\r\n\r\n timeoutIdsRef.current = [...timeoutIdsRef.current, timeoutId];\r\n }, []);\r\n\r\n const handleClick = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>): void => {\r\n createRipple(event);\r\n onClick?.(event);\r\n },\r\n [createRipple, onClick],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={buttonRef}\r\n onClick={handleClick}\r\n whileTap={{scale: 0.95}}\r\n whileHover={{scale: 1.05}}\r\n className={cn(styles.button, className)}\r\n {...restProps}>\r\n <span className={styles.content}>{children}</span>\r\n {ripples.map((ripple) => (\r\n <motion.span\r\n key={ripple.id}\r\n initial={{scale: 0, opacity: 0.5}}\r\n animate={{scale, opacity: 0}}\r\n transition={transition}\r\n className={cn(styles.ripple, rippleClassName)}\r\n style={{\r\n top: ripple.y - 10,\r\n left: ripple.x - 10,\r\n }}\r\n />\r\n ))}\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nRippleButton.displayName = \"RippleButton\";\r\n\r\nexport {RippleButton};\r\n"],"names":["RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","_ignoredKey","restProps","ripples","setRipples","buttonRef","timeoutIdsRef","timeoutId","globalThis","createRipple","event","button","rect","x","y","newRipple","Date","previousRipples","ripple","handleClick","motion","cn","styles"],"mappings":";;;;;;AA0CA,MAAMA,eAAe,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/ripple-button.js","sources":["../../../src/components/ui/ripple-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type HTMLMotionProps, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./ripple-button.module.css\";\r\n\r\ninterface Ripple {\r\n id: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Props accepted by {@link RippleButton}. */\r\nexport interface RippleButtonProps extends HTMLMotionProps<\"button\"> {\r\n /** Button contents rendered above the ripple layer. @default undefined */\r\n children: React.ReactNode;\r\n /** Additional CSS classes merged with each generated ripple. @default undefined */\r\n rippleClassName?: string;\r\n /** Final expansion scale applied to each ripple animation. @default 10 */\r\n scale?: number;\r\n /** Motion timing used for each ripple animation. @default {duration: 0.6, ease: \"easeOut\"} */\r\n transition?: Transition;\r\n}\r\n\r\n/**\r\n * Renders a pressable button that emits animated ripples from the click position.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<button>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <RippleButton>Click me</RippleButton>\r\n * ```\r\n *\r\n * @see {@link RippleButtonProps} for available props\r\n */\r\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\r\n ({children, onClick, className, rippleClassName, scale = 10, transition = {duration: 0.6, ease: \"easeOut\"}, ...props}, ref) => {\r\n // eslint-disable-next-line sonarjs/no-unused-vars -- removing React key avoids implicit key spreading\r\n const {key: _ignoredKey, ...restProps} = props;\r\n const [ripples, setRipples] = React.useState<ReadonlyArray<Ripple>>([]);\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n const timeoutIdsRef = React.useRef<ReadonlyArray<number>>([]);\r\n\r\n React.useImperativeHandle(ref, () => buttonRef.current!, []);\r\n\r\n React.useEffect(\r\n () => () => {\r\n timeoutIdsRef.current.forEach((timeoutId) => {\r\n globalThis.window.clearTimeout(timeoutId);\r\n });\r\n },\r\n [],\r\n );\r\n\r\n const createRipple = React.useCallback((event: React.MouseEvent<HTMLButtonElement>): void => {\r\n const button = buttonRef.current;\r\n if (!button) {\r\n return;\r\n }\r\n\r\n const rect = button.getBoundingClientRect();\r\n const x = event.clientX - rect.left;\r\n const y = event.clientY - rect.top;\r\n\r\n const newRipple: Ripple = {\r\n id: Date.now(),\r\n x,\r\n y,\r\n };\r\n\r\n setRipples((previousRipples) => [...previousRipples, newRipple]);\r\n\r\n const timeoutId = globalThis.window.setTimeout(() => {\r\n setRipples((previousRipples) => previousRipples.filter((ripple) => ripple.id !== newRipple.id));\r\n }, 600);\r\n\r\n timeoutIdsRef.current = [...timeoutIdsRef.current, timeoutId];\r\n }, []);\r\n\r\n const handleClick = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>): void => {\r\n createRipple(event);\r\n onClick?.(event);\r\n },\r\n [createRipple, onClick],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={buttonRef}\r\n onClick={handleClick}\r\n whileTap={{scale: 0.95}}\r\n whileHover={{scale: 1.05}}\r\n className={cn(styles.button, className)}\r\n {...restProps}>\r\n <span className={styles.content}>{children}</span>\r\n {ripples.map((ripple) => (\r\n <motion.span\r\n key={ripple.id}\r\n initial={{scale: 0, opacity: 0.5}}\r\n animate={{scale, opacity: 0}}\r\n transition={transition}\r\n className={cn(styles.ripple, rippleClassName)}\r\n style={{\r\n top: ripple.y - 10,\r\n left: ripple.x - 10,\r\n }}\r\n />\r\n ))}\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nRippleButton.displayName = \"RippleButton\";\r\n\r\nexport {RippleButton};\r\n"],"names":["RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","_ignoredKey","restProps","ripples","setRipples","buttonRef","timeoutIdsRef","timeoutId","globalThis","createRipple","event","button","rect","x","y","newRipple","Date","previousRipples","ripple","handleClick","motion","cn","styles"],"mappings":";;;;;;AA0CA,MAAMA,eAAe,WAAHA,GAAGC,wBAAAA,UAAgB,CACnC,CAAC,EAACC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,EAAEC,eAAe,EAAEC,QAAQ,EAAE,EAAEC,aAAa;IAAC,UAAU;IAAK,MAAM;AAAS,CAAC,EAAE,GAAGC,OAAM,EAAEC;IAErH,MAAM,EAAC,KAAKC,WAAW,EAAE,GAAGC,WAAU,GAAGH;IACzC,MAAM,CAACI,SAASC,WAAW,GAAGZ,wBAAAA,QAAc,CAAwB,EAAE;IACtE,MAAMa,YAAYb,wBAAAA,MAAY,CAAoB;IAClD,MAAMc,gBAAgBd,wBAAAA,MAAY,CAAwB,EAAE;IAE5DA,wBAAAA,mBAAyB,CAACQ,KAAK,IAAMK,UAAU,OAAO,EAAG,EAAE;IAE3Db,wBAAAA,SAAe,CACb,IAAM;YACJc,cAAc,OAAO,CAAC,OAAO,CAAC,CAACC;gBAC7BC,WAAW,MAAM,CAAC,YAAY,CAACD;YACjC;QACF,GACA,EAAE;IAGJ,MAAME,eAAejB,wBAAAA,WAAiB,CAAC,CAACkB;QACtC,MAAMC,SAASN,UAAU,OAAO;QAChC,IAAI,CAACM,QACH;QAGF,MAAMC,OAAOD,OAAO,qBAAqB;QACzC,MAAME,IAAIH,MAAM,OAAO,GAAGE,KAAK,IAAI;QACnC,MAAME,IAAIJ,MAAM,OAAO,GAAGE,KAAK,GAAG;QAElC,MAAMG,YAAoB;YACxB,IAAIC,KAAK,GAAG;YACZH;YACAC;QACF;QAEAV,WAAW,CAACa,kBAAoB;mBAAIA;gBAAiBF;aAAU;QAE/D,MAAMR,YAAYC,WAAW,MAAM,CAAC,UAAU,CAAC;YAC7CJ,WAAW,CAACa,kBAAoBA,gBAAgB,MAAM,CAAC,CAACC,SAAWA,OAAO,EAAE,KAAKH,UAAU,EAAE;QAC/F,GAAG;QAEHT,cAAc,OAAO,GAAG;eAAIA,cAAc,OAAO;YAAEC;SAAU;IAC/D,GAAG,EAAE;IAEL,MAAMY,cAAc3B,wBAAAA,WAAiB,CACnC,CAACkB;QACCD,aAAaC;QACbhB,UAAUgB;IACZ,GACA;QAACD;QAAcf;KAAQ;IAGzB,OAAO,WAAP,GACE,KAAC0B,OAAO,MAAM;QACZ,KAAKf;QACL,SAASc;QACT,UAAU;YAAC,OAAO;QAAI;QACtB,YAAY;YAAC,OAAO;QAAI;QACxB,WAAWE,GAAGC,qBAAAA,MAAa,EAAE3B;QAC5B,GAAGO,SAAS;;0BACb,IAAC;gBAAK,WAAWoB,qBAAAA,OAAc;0BAAG7B;;YACjCU,QAAQ,GAAG,CAAC,CAACe,SAAAA,WAAAA,GACZ,IAACE,OAAO,IAAI;oBAEV,SAAS;wBAAC,OAAO;wBAAG,SAAS;oBAAG;oBAChC,SAAS;wBAACvB;wBAAO,SAAS;oBAAC;oBAC3B,YAAYC;oBACZ,WAAWuB,GAAGC,qBAAAA,MAAa,EAAE1B;oBAC7B,OAAO;wBACL,KAAKsB,OAAO,CAAC,GAAG;wBAChB,MAAMA,OAAO,CAAC,GAAG;oBACnB;mBARKA,OAAO,EAAE;;;AAaxB;AAGF3B,aAAa,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/ripple-button.module.css","webpack://./src/components/ui/ripple-button.module.css"],"names":[],"mappings":"AAAA;ECCE,6BAA6B;EAC7B,kCAAkC;EAClC,mCAAmC;EACnC,eAAe;EACf,4BAA4B;EAC5B,SAAS;EACT,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;EACpB,kBAAkB;EAClB,gBAAgB;AAClB;;ADf+S;ECkB7S,iCAAiC;EACjC,mBAAmB;AACrB;;ADpByX;ECuBvX,UAAU;EACV,kBAAkB;AACpB;;ADzB8Z;EC4B5Z,wCAAwC;EACxC,oBAAoB;EACpB,qBAAqB;EACrB,cAAc;EACd,eAAe;EACf,kBAAkB;AACpB","sourcesContent":[".button{align-items:center;background:var(--ac-primary);border:0;border-radius:var(--ac-radius-lg);color:var(--ac-primary-foreground);cursor:pointer;display:inline-flex;font-size:var(--ac-text-sm);font-weight:500;height:2.5rem;justify-content:center;overflow:hidden;padding:.5rem 1rem;position:relative}.button:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.content{position:relative;z-index:1}.ripple{background:var(--ac-primary-foreground);border-radius:9999px;height:1.25rem;pointer-events:none;position:absolute;width:1.25rem}",".button {\n background: var(--ac-primary);\n border-radius: var(--ac-radius-lg);\n color: var(--ac-primary-foreground);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n border: 0;\n justify-content: center;\n align-items: center;\n height: 2.5rem;\n padding: .5rem 1rem;\n font-weight: 500;\n display: inline-flex;\n position: relative;\n overflow: hidden;\n}\n\n.button:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.content {\n z-index: 1;\n position: relative;\n}\n\n.ripple {\n background: var(--ac-primary-foreground);\n pointer-events: none;\n border-radius: 9999px;\n width: 1.25rem;\n height: 1.25rem;\n position: absolute;\n}\n"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/scratcher.module.css","webpack://./src/components/ui/scratcher.module.css"],"names":[],"mappings":"AAAA;ECCE,yBAAyB;EACzB,iBAAiB;EACjB,kBAAkB;AACpB;;ADJyC;ECOvC,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".root{position:relative;user-select:none}.canvas{inset:0;position:absolute}",".root {\n -webkit-user-select: none;\n user-select: none;\n position: relative;\n}\n\n.canvas {\n position: absolute;\n inset: 0;\n}\n"],"sourceRoot":""}
|
|
@@ -3,10 +3,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import { forwardRef } from "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import scroll_area_module from "./scroll-area.module.js";
|
|
9
|
-
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
|
+
const scroll_area_ScrollArea = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
10
10
|
const { className, children, render, ...otherProps } = props;
|
|
11
11
|
return /*#__PURE__*/ jsxs(ScrollArea.Root, {
|
|
12
12
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {ScrollArea as BaseScrollArea} from \"@base-ui/react/scroll-area\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./scroll-area.module.css\";\r\n\r\n/**\r\n * Coordinates scroll area layout and scrolling behavior.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollArea>Content</ScrollArea>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nconst ScrollArea = React.forwardRef<React.ComponentRef<typeof BaseScrollArea.Root>, ScrollArea.Props>(\r\n (props: Readonly<ScrollArea.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Root\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.root, className)}, {}),\r\n })}>\r\n <BaseScrollArea.Viewport className={styles.viewport}>\r\n <BaseScrollArea.Content className={styles.content}>{children}</BaseScrollArea.Content>\r\n </BaseScrollArea.Viewport>\r\n <ScrollBar />\r\n <BaseScrollArea.Corner className={styles.corner} />\r\n </BaseScrollArea.Root>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the scroll bar.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollBar>Content</ScrollBar>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nfunction ScrollBar(props: Readonly<ScrollBar.Props>): React.ReactElement {\r\n const {className, orientation = \"vertical\", render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Scrollbar\r\n orientation={orientation}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(styles.scrollbar, orientation === \"vertical\" ? styles.vertical : styles.horizontal, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n <BaseScrollArea.Thumb className={styles.thumb} />\r\n </BaseScrollArea.Scrollbar>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollArea {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;\r\n export type State = BaseScrollArea.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollBar {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;\r\n export type State = BaseScrollArea.Scrollbar.State;\r\n}\r\n\r\nScrollArea.displayName = \"ScrollArea\";\r\nScrollBar.displayName = \"ScrollBar\";\r\n\r\nexport {ScrollArea, ScrollBar};\r\n"],"names":["ScrollArea","React","props","ref","className","children","render","otherProps","BaseScrollArea","useRender","mergeProps","cn","styles","ScrollBar","orientation"],"mappings":";;;;;;;;AAyBA,MAAMA,yBAAa,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {ScrollArea as BaseScrollArea} from \"@base-ui/react/scroll-area\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./scroll-area.module.css\";\r\n\r\n/**\r\n * Coordinates scroll area layout and scrolling behavior.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollArea>Content</ScrollArea>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nconst ScrollArea = React.forwardRef<React.ComponentRef<typeof BaseScrollArea.Root>, ScrollArea.Props>(\r\n (props: Readonly<ScrollArea.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Root\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.root, className)}, {}),\r\n })}>\r\n <BaseScrollArea.Viewport className={styles.viewport}>\r\n <BaseScrollArea.Content className={styles.content}>{children}</BaseScrollArea.Content>\r\n </BaseScrollArea.Viewport>\r\n <ScrollBar />\r\n <BaseScrollArea.Corner className={styles.corner} />\r\n </BaseScrollArea.Root>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the scroll bar.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollBar>Content</ScrollBar>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nfunction ScrollBar(props: Readonly<ScrollBar.Props>): React.ReactElement {\r\n const {className, orientation = \"vertical\", render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Scrollbar\r\n orientation={orientation}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(styles.scrollbar, orientation === \"vertical\" ? styles.vertical : styles.horizontal, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n <BaseScrollArea.Thumb className={styles.thumb} />\r\n </BaseScrollArea.Scrollbar>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollArea {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;\r\n export type State = BaseScrollArea.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollBar {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;\r\n export type State = BaseScrollArea.Scrollbar.State;\r\n}\r\n\r\nScrollArea.displayName = \"ScrollArea\";\r\nScrollBar.displayName = \"ScrollBar\";\r\n\r\nexport {ScrollArea, ScrollBar};\r\n"],"names":["ScrollArea","React","props","ref","className","children","render","otherProps","BaseScrollArea","useRender","mergeProps","cn","styles","ScrollBar","orientation"],"mappings":";;;;;;;;AAyBA,MAAMA,yBAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAACC,OAAmCC;IAClC,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,KAACM,WAAAA,IAAmB;QAClB,KAAKL;QACJ,GAAGI,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,mBAAAA,IAAW,EAAER;YAAU,GAAG,CAAC;QAC9D;;0BACA,IAACI,WAAAA,QAAuB;gBAAC,WAAWI,mBAAAA,QAAe;0BACjD,kBAACJ,WAAAA,OAAsB;oBAAC,WAAWI,mBAAAA,OAAc;8BAAGP;;;0BAEtD,IAACQ,WAASA,CAAAA;0BACV,IAACL,WAAAA,MAAqB;gBAAC,WAAWI,mBAAAA,MAAa;;;;AAGrD;AAkBF,SAASC,UAAUX,KAAgC;IACjD,MAAM,EAACE,SAAS,EAAEU,cAAc,UAAU,EAAER,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErE,OAAO,WAAP,GACE,IAACM,WAAAA,SAAwB;QACvB,aAAaM;QACZ,GAAGP,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WACL;gBACE,WAAWC,GAAGC,mBAAAA,SAAgB,EAAEE,AAAgB,eAAhBA,cAA6BF,mBAAAA,QAAe,GAAGA,mBAAAA,UAAiB,EAAER;YACpG,GACA,CAAC;QAEL;kBACA,kBAACI,WAAAA,KAAoB;YAAC,WAAWI,mBAAAA,KAAY;;;AAGnD;AAcAZ,uBAAW,WAAW,GAAG;AACzBa,UAAU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/scroll-area.module.css","webpack://./src/components/ui/scroll-area.module.css"],"names":[],"mappings":"AAAA;ECCE,kBAAkB;EAClB,gBAAgB;AAClB;;ADHwC;ECMtC,sBAAsB;EACtB,WAAW;EACX,YAAY;AACd;;ADT+F;ECY7F,eAAe;AACjB;;ADbuH;ECgBrH,kBAAkB;EAClB,sDAAsD;EACtD,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;AACf;;ADrBwO;ECwBtO,4BAA4B;EAC5B,cAAc;EACd,YAAY;EACZ,YAAY;AACd;;AD5B0T;EC+BxT,2BAA2B;EAC3B,sBAAsB;EACtB,WAAW;EACX,eAAe;EACf,YAAY;AACd;;ADpCma;ECuCja,kCAAkC;EAClC,oBAAoB;EACpB,OAAO;EACP,kBAAkB;AACpB;;AD3Cyf;EC8Cvf,uBAAuB;AACzB","sourcesContent":[".root{overflow:hidden;position:relative}.viewport{border-radius:inherit;height:100%;width:100%}.content{min-width:100%}.scrollbar{display:flex;touch-action:none;transition:background-color var(--ac-transition-fast);user-select:none}.vertical{border-left:1px solid transparent;height:100%;padding:1px;width:.625rem}.horizontal{border-top:1px solid transparent;flex-direction:column;height:.625rem;padding:1px;width:100%}.thumb{background-color:var(--ac-border);border-radius:999px;flex:1;position:relative}.corner{background-color:transparent}",".root {\n position: relative;\n overflow: hidden;\n}\n\n.viewport {\n border-radius: inherit;\n width: 100%;\n height: 100%;\n}\n\n.content {\n min-width: 100%;\n}\n\n.scrollbar {\n touch-action: none;\n transition: background-color var(--ac-transition-fast);\n -webkit-user-select: none;\n user-select: none;\n display: flex;\n}\n\n.vertical {\n border-left: 1px solid #0000;\n width: .625rem;\n height: 100%;\n padding: 1px;\n}\n\n.horizontal {\n border-top: 1px solid #0000;\n flex-direction: column;\n width: 100%;\n height: .625rem;\n padding: 1px;\n}\n\n.thumb {\n background-color: var(--ac-border);\n border-radius: 999px;\n flex: 1;\n position: relative;\n}\n\n.corner {\n background-color: #0000;\n}\n"],"sourceRoot":""}
|
|
@@ -4,12 +4,12 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
4
4
|
import { Select } from "@base-ui/react/select";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
7
|
-
import { forwardRef, useCallback } from "react";
|
|
8
7
|
import { cn } from "../../lib/utilities.js";
|
|
9
8
|
import select_module from "./select.module.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
10
|
function select_Select(props) {
|
|
11
11
|
const { onValueChange, ...otherProps } = props;
|
|
12
|
-
const handleChange = useCallback((value)=>{
|
|
12
|
+
const handleChange = __rspack_external_react.useCallback((value)=>{
|
|
13
13
|
if (onValueChange && "string" == typeof value) onValueChange(value);
|
|
14
14
|
}, [
|
|
15
15
|
onValueChange
|
|
@@ -24,7 +24,7 @@ const SelectGroup = Select.Group;
|
|
|
24
24
|
SelectGroup.displayName = "SelectGroup";
|
|
25
25
|
const SelectValue = Select.Value;
|
|
26
26
|
SelectValue.displayName = "SelectValue";
|
|
27
|
-
const SelectTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
27
|
+
const SelectTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
28
28
|
const { className, children, render, ...otherProps } = props;
|
|
29
29
|
return /*#__PURE__*/ jsxs(Select.Trigger, {
|
|
30
30
|
ref: ref,
|
|
@@ -82,7 +82,7 @@ function SelectScrollDownButton(props) {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
85
|
-
const SelectContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
85
|
+
const SelectContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
86
86
|
const { className, children, render, sideOffset = 4, ...otherProps } = props;
|
|
87
87
|
return /*#__PURE__*/ jsx(Select.Portal, {
|
|
88
88
|
children: /*#__PURE__*/ jsx(Select.Positioner, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/select.js","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Select as BaseSelect} from \"@base-ui/react/select\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {Check, ChevronDown, ChevronUp} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./select.module.css\";\r\n\r\ninterface SelectProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Root>, \"onValueChange\"> {\r\n /** Called when the selected value changes and resolves to a string. @default undefined */\r\n onValueChange?: (value: string) => void;\r\n}\r\n\r\ninterface SelectTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Trigger>, \"className\"> {\r\n /** Additional CSS classes merged with the select trigger styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectScrollUpButtonProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.ScrollUpArrow>, \"className\"> {\r\n /** Additional CSS classes merged with the scroll-up control styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectScrollDownButtonProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.ScrollDownArrow>, \"className\"> {\r\n /** Additional CSS classes merged with the scroll-down control styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Positioner>, \"className\"> {\r\n /** Additional CSS classes merged with the select popup styles. @default undefined */\r\n className?: string;\r\n /** The offset in pixels between the trigger and the popup. @default 4 */\r\n sideOffset?: number;\r\n}\r\n\r\ninterface SelectLabelProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.GroupLabel>, \"className\"> {\r\n /** Additional CSS classes merged with the group label styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Item>, \"className\"> {\r\n /** Additional CSS classes merged with the select item styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectSeparatorProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Separator>, \"className\"> {\r\n /** Additional CSS classes merged with the separator styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates select state, keyboard navigation, and value management.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default and coordinates descendant select parts\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports composition through descendant `render` props\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Select defaultValue=\"one\">\r\n * <SelectTrigger />\r\n * <SelectContent>\r\n * <SelectItem value=\"one\">One</SelectItem>\r\n * </SelectContent>\r\n * </Select>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction Select(props: Readonly<Select.Props>): React.ReactElement {\r\n const {onValueChange, ...otherProps} = props;\r\n\r\n const handleChange = React.useCallback(\r\n (value: unknown) => {\r\n if (onValueChange && typeof value === \"string\") {\r\n onValueChange(value);\r\n }\r\n },\r\n [onValueChange],\r\n );\r\n\r\n return (\r\n <BaseSelect.Root\r\n onValueChange={handleChange as React.ComponentPropsWithRef<typeof BaseSelect.Root>[\"onValueChange\"]}\r\n {...otherProps}\r\n />\r\n );\r\n}\r\nSelect.displayName = \"Select\";\r\n\r\n/**\r\n * Groups related select items into a shared logical section.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default beyond the underlying grouped option container\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports composition through descendant `render` props\r\n * - Styling via CSS Modules with `--ac-*` custom properties through descendant components\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectGroup>\r\n * <SelectLabel>Team</SelectLabel>\r\n * <SelectItem value=\"one\">One</SelectItem>\r\n * </SelectGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nconst SelectGroup = BaseSelect.Group;\r\nSelectGroup.displayName = \"SelectGroup\";\r\n/**\r\n * Displays the currently selected option inside the trigger.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default beyond the underlying value slot\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports composition through surrounding select trigger rendering\r\n * - Styling via CSS Modules with `--ac-*` custom properties through descendant components\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectValue placeholder=\"Select an option\" />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nconst SelectValue = BaseSelect.Value;\r\nSelectValue.displayName = \"SelectValue\";\r\n\r\n/**\r\n * Opens the select popup and displays the current selected value.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectTrigger>\r\n * <SelectValue />\r\n * </SelectTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nconst SelectTrigger = React.forwardRef<React.ComponentRef<typeof BaseSelect.Trigger>, SelectTrigger.Props>(\r\n (props: Readonly<SelectTrigger.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.trigger, className)}, {}),\r\n })}>\r\n {children}\r\n <BaseSelect.Icon className={styles.icon}>\r\n <ChevronDown className={styles.iconSvg} />\r\n </BaseSelect.Icon>\r\n </BaseSelect.Trigger>\r\n );\r\n },\r\n);\r\nSelectTrigger.displayName = \"SelectTrigger\";\r\n\r\n/**\r\n * Scrolls the select list upward when the popup overflows its viewport.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Pass `children` to override the default `ChevronUp` icon\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectScrollUpButton />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectScrollUpButton(props: Readonly<SelectScrollUpButton.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.ScrollUpArrow\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.scrollButton, className)}, {}),\r\n })}>\r\n {children ?? <ChevronUp className={styles.scrollIcon} />}\r\n </BaseSelect.ScrollUpArrow>\r\n );\r\n}\r\nSelectScrollUpButton.displayName = \"SelectScrollUpButton\";\r\n\r\n/**\r\n * Scrolls the select list downward when the popup overflows its viewport.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Pass `children` to override the default `ChevronDown` icon\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectScrollDownButton />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectScrollDownButton(props: Readonly<SelectScrollDownButton.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.ScrollDownArrow\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.scrollButton, className)}, {}),\r\n })}>\r\n {children ?? <ChevronDown className={styles.scrollIcon} />}\r\n </BaseSelect.ScrollDownArrow>\r\n );\r\n}\r\nSelectScrollDownButton.displayName = \"SelectScrollDownButton\";\r\n\r\n/**\r\n * Portals and positions the select popup with scroll affordances.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectContent>\r\n * <SelectItem value=\"one\">One</SelectItem>\r\n * </SelectContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nconst SelectContent = React.forwardRef<React.ComponentRef<typeof BaseSelect.Popup>, SelectContent.Props>(\r\n (props: Readonly<SelectContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, sideOffset = 4, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.Portal>\r\n <BaseSelect.Positioner\r\n sideOffset={sideOffset}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseSelect.Popup\r\n ref={ref}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, className)}, {}),\r\n })}>\r\n <SelectScrollUpButton />\r\n <BaseSelect.List className={styles.list}>{children}</BaseSelect.List>\r\n <SelectScrollDownButton />\r\n </BaseSelect.Popup>\r\n </BaseSelect.Positioner>\r\n </BaseSelect.Portal>\r\n );\r\n },\r\n);\r\nSelectContent.displayName = \"SelectContent\";\r\n\r\n/**\r\n * Labels a logical group of options inside the select popup.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectLabel>Team</SelectLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectLabel(props: Readonly<SelectLabel.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.GroupLabel\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.label, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseSelect.GroupLabel>\r\n );\r\n}\r\nSelectLabel.displayName = \"SelectLabel\";\r\n\r\n/**\r\n * Renders a selectable option row within the select popup.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectItem value=\"one\">One</SelectItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectItem(props: Readonly<SelectItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.Item\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, className)}, {}),\r\n })}>\r\n <span className={styles.itemIndicatorSlot}>\r\n <BaseSelect.ItemIndicator>\r\n <Check className={styles.itemIndicatorIcon} />\r\n </BaseSelect.ItemIndicator>\r\n </span>\r\n <BaseSelect.ItemText className={styles.itemText}>{children}</BaseSelect.ItemText>\r\n </BaseSelect.Item>\r\n );\r\n}\r\nSelectItem.displayName = \"SelectItem\";\r\n\r\n/**\r\n * Separates groups of options inside the select popup.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectSeparator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectSeparator(props: Readonly<SelectSeparator.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.Separator\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.separator, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\nSelectSeparator.displayName = \"SelectSeparator\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Select {\r\n export type Props = SelectProps;\r\n export type State = BaseSelect.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectTrigger {\r\n export type Props = SelectTriggerProps;\r\n export type State = BaseSelect.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectScrollUpButton {\r\n export type Props = SelectScrollUpButtonProps;\r\n export type State = BaseSelect.ScrollUpArrow.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectScrollDownButton {\r\n export type Props = SelectScrollDownButtonProps;\r\n export type State = BaseSelect.ScrollDownArrow.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectContent {\r\n export type Props = SelectContentProps;\r\n export type State = BaseSelect.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectLabel {\r\n export type Props = SelectLabelProps;\r\n export type State = BaseSelect.GroupLabel.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectItem {\r\n export type Props = SelectItemProps;\r\n export type State = BaseSelect.Item.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectSeparator {\r\n export type Props = SelectSeparatorProps;\r\n export type State = BaseSelect.Separator.State;\r\n}\r\n\r\nexport {\r\n Select,\r\n SelectContent,\r\n SelectGroup,\r\n SelectItem,\r\n SelectLabel,\r\n SelectScrollDownButton,\r\n SelectScrollUpButton,\r\n SelectSeparator,\r\n SelectTrigger,\r\n SelectValue,\r\n};\r\n"],"names":["Select","props","onValueChange","otherProps","handleChange","React","value","BaseSelect","SelectGroup","SelectValue","SelectTrigger","ref","className","children","render","useRender","mergeProps","cn","styles","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","sideOffset","SelectLabel","SelectItem","Check","SelectSeparator"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"components/ui/select.js","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Select as BaseSelect} from \"@base-ui/react/select\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {Check, ChevronDown, ChevronUp} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./select.module.css\";\r\n\r\ninterface SelectProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Root>, \"onValueChange\"> {\r\n /** Called when the selected value changes and resolves to a string. @default undefined */\r\n onValueChange?: (value: string) => void;\r\n}\r\n\r\ninterface SelectTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Trigger>, \"className\"> {\r\n /** Additional CSS classes merged with the select trigger styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectScrollUpButtonProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.ScrollUpArrow>, \"className\"> {\r\n /** Additional CSS classes merged with the scroll-up control styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectScrollDownButtonProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.ScrollDownArrow>, \"className\"> {\r\n /** Additional CSS classes merged with the scroll-down control styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Positioner>, \"className\"> {\r\n /** Additional CSS classes merged with the select popup styles. @default undefined */\r\n className?: string;\r\n /** The offset in pixels between the trigger and the popup. @default 4 */\r\n sideOffset?: number;\r\n}\r\n\r\ninterface SelectLabelProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.GroupLabel>, \"className\"> {\r\n /** Additional CSS classes merged with the group label styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Item>, \"className\"> {\r\n /** Additional CSS classes merged with the select item styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\ninterface SelectSeparatorProps extends Omit<React.ComponentPropsWithRef<typeof BaseSelect.Separator>, \"className\"> {\r\n /** Additional CSS classes merged with the separator styles. @default undefined */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates select state, keyboard navigation, and value management.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default and coordinates descendant select parts\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports composition through descendant `render` props\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Select defaultValue=\"one\">\r\n * <SelectTrigger />\r\n * <SelectContent>\r\n * <SelectItem value=\"one\">One</SelectItem>\r\n * </SelectContent>\r\n * </Select>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction Select(props: Readonly<Select.Props>): React.ReactElement {\r\n const {onValueChange, ...otherProps} = props;\r\n\r\n const handleChange = React.useCallback(\r\n (value: unknown) => {\r\n if (onValueChange && typeof value === \"string\") {\r\n onValueChange(value);\r\n }\r\n },\r\n [onValueChange],\r\n );\r\n\r\n return (\r\n <BaseSelect.Root\r\n onValueChange={handleChange as React.ComponentPropsWithRef<typeof BaseSelect.Root>[\"onValueChange\"]}\r\n {...otherProps}\r\n />\r\n );\r\n}\r\nSelect.displayName = \"Select\";\r\n\r\n/**\r\n * Groups related select items into a shared logical section.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default beyond the underlying grouped option container\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports composition through descendant `render` props\r\n * - Styling via CSS Modules with `--ac-*` custom properties through descendant components\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectGroup>\r\n * <SelectLabel>Team</SelectLabel>\r\n * <SelectItem value=\"one\">One</SelectItem>\r\n * </SelectGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nconst SelectGroup = BaseSelect.Group;\r\nSelectGroup.displayName = \"SelectGroup\";\r\n/**\r\n * Displays the currently selected option inside the trigger.\r\n *\r\n * @remarks\r\n * - Renders no DOM element by default beyond the underlying value slot\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports composition through surrounding select trigger rendering\r\n * - Styling via CSS Modules with `--ac-*` custom properties through descendant components\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectValue placeholder=\"Select an option\" />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nconst SelectValue = BaseSelect.Value;\r\nSelectValue.displayName = \"SelectValue\";\r\n\r\n/**\r\n * Opens the select popup and displays the current selected value.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectTrigger>\r\n * <SelectValue />\r\n * </SelectTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nconst SelectTrigger = React.forwardRef<React.ComponentRef<typeof BaseSelect.Trigger>, SelectTrigger.Props>(\r\n (props: Readonly<SelectTrigger.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.trigger, className)}, {}),\r\n })}>\r\n {children}\r\n <BaseSelect.Icon className={styles.icon}>\r\n <ChevronDown className={styles.iconSvg} />\r\n </BaseSelect.Icon>\r\n </BaseSelect.Trigger>\r\n );\r\n },\r\n);\r\nSelectTrigger.displayName = \"SelectTrigger\";\r\n\r\n/**\r\n * Scrolls the select list upward when the popup overflows its viewport.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Pass `children` to override the default `ChevronUp` icon\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectScrollUpButton />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectScrollUpButton(props: Readonly<SelectScrollUpButton.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.ScrollUpArrow\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.scrollButton, className)}, {}),\r\n })}>\r\n {children ?? <ChevronUp className={styles.scrollIcon} />}\r\n </BaseSelect.ScrollUpArrow>\r\n );\r\n}\r\nSelectScrollUpButton.displayName = \"SelectScrollUpButton\";\r\n\r\n/**\r\n * Scrolls the select list downward when the popup overflows its viewport.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Pass `children` to override the default `ChevronDown` icon\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectScrollDownButton />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectScrollDownButton(props: Readonly<SelectScrollDownButton.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.ScrollDownArrow\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.scrollButton, className)}, {}),\r\n })}>\r\n {children ?? <ChevronDown className={styles.scrollIcon} />}\r\n </BaseSelect.ScrollDownArrow>\r\n );\r\n}\r\nSelectScrollDownButton.displayName = \"SelectScrollDownButton\";\r\n\r\n/**\r\n * Portals and positions the select popup with scroll affordances.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectContent>\r\n * <SelectItem value=\"one\">One</SelectItem>\r\n * </SelectContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nconst SelectContent = React.forwardRef<React.ComponentRef<typeof BaseSelect.Popup>, SelectContent.Props>(\r\n (props: Readonly<SelectContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, sideOffset = 4, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.Portal>\r\n <BaseSelect.Positioner\r\n sideOffset={sideOffset}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseSelect.Popup\r\n ref={ref}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, className)}, {}),\r\n })}>\r\n <SelectScrollUpButton />\r\n <BaseSelect.List className={styles.list}>{children}</BaseSelect.List>\r\n <SelectScrollDownButton />\r\n </BaseSelect.Popup>\r\n </BaseSelect.Positioner>\r\n </BaseSelect.Portal>\r\n );\r\n },\r\n);\r\nSelectContent.displayName = \"SelectContent\";\r\n\r\n/**\r\n * Labels a logical group of options inside the select popup.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectLabel>Team</SelectLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectLabel(props: Readonly<SelectLabel.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.GroupLabel\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.label, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseSelect.GroupLabel>\r\n );\r\n}\r\nSelectLabel.displayName = \"SelectLabel\";\r\n\r\n/**\r\n * Renders a selectable option row within the select popup.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectItem value=\"one\">One</SelectItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectItem(props: Readonly<SelectItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.Item\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, className)}, {}),\r\n })}>\r\n <span className={styles.itemIndicatorSlot}>\r\n <BaseSelect.ItemIndicator>\r\n <Check className={styles.itemIndicatorIcon} />\r\n </BaseSelect.ItemIndicator>\r\n </span>\r\n <BaseSelect.ItemText className={styles.itemText}>{children}</BaseSelect.ItemText>\r\n </BaseSelect.Item>\r\n );\r\n}\r\nSelectItem.displayName = \"SelectItem\";\r\n\r\n/**\r\n * Separates groups of options inside the select popup.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/select | Base UI Select}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <SelectSeparator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/select | Base UI Documentation}\r\n */\r\nfunction SelectSeparator(props: Readonly<SelectSeparator.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSelect.Separator\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.separator, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\nSelectSeparator.displayName = \"SelectSeparator\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Select {\r\n export type Props = SelectProps;\r\n export type State = BaseSelect.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectTrigger {\r\n export type Props = SelectTriggerProps;\r\n export type State = BaseSelect.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectScrollUpButton {\r\n export type Props = SelectScrollUpButtonProps;\r\n export type State = BaseSelect.ScrollUpArrow.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectScrollDownButton {\r\n export type Props = SelectScrollDownButtonProps;\r\n export type State = BaseSelect.ScrollDownArrow.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectContent {\r\n export type Props = SelectContentProps;\r\n export type State = BaseSelect.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectLabel {\r\n export type Props = SelectLabelProps;\r\n export type State = BaseSelect.GroupLabel.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectItem {\r\n export type Props = SelectItemProps;\r\n export type State = BaseSelect.Item.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SelectSeparator {\r\n export type Props = SelectSeparatorProps;\r\n export type State = BaseSelect.Separator.State;\r\n}\r\n\r\nexport {\r\n Select,\r\n SelectContent,\r\n SelectGroup,\r\n SelectItem,\r\n SelectLabel,\r\n SelectScrollDownButton,\r\n SelectScrollUpButton,\r\n SelectSeparator,\r\n SelectTrigger,\r\n SelectValue,\r\n};\r\n"],"names":["Select","props","onValueChange","otherProps","handleChange","React","value","BaseSelect","SelectGroup","SelectValue","SelectTrigger","ref","className","children","render","useRender","mergeProps","cn","styles","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","sideOffset","SelectLabel","SelectItem","Check","SelectSeparator"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/select.module.css","webpack://./src/components/ui/select.module.css"],"names":[],"mappings":"AAAA;ECCE,sCAAsC;EACtC,iCAAiC;EACjC,kCAAkC;EAClC,2BAA2B;EAC3B,eAAe;EACf,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,kCAAkC;EAClC,4BAA4B;EAC5B,uFAAuF;EACvF,aAAa;EACb,8BAA8B;EAC9B,WAAW;EACX,oBAAoB;EACpB,+BAA+B;AACjC;;ADjBqe;ECoBne,iCAAiC;EACjC,mBAAmB;AACrB;;ADtBgjB;ECyB9iB,mBAAmB;EACnB,WAAW;AACb;;AD3BsmB;EC8BpmB,4BAA4B;AAC9B;;AD/B4pB;ECkC1pB,iCAAiC;EACjC,oBAAoB;AACtB;;ADpCutB;ECuCrtB,WAAW;EACX,YAAY;AACd;;ADzCsxB;EC4CpxB,WAAW;AACb;;AD7C6yB;ECgD3yB,mCAAmC;EACnC,kCAAkC;EAClC,kCAAkC;EAClC,mCAAmC;EACnC,mCAAmC;EACnC,gDAAgD;EAChD,yCAAyC;EACzC,qFAAqF;EACrF,gBAAgB;EAChB,uCAAuC;AACzC;;AD1D2sC;EC6DzsC,UAAU;EACV,qBAAqB;AACvB;;AD/DgyC;ECkE9xC,mCAAmC;EACnC,0BAA0B;EAC1B,gBAAgB;AAClB;;ADrEm3C;ECwEj3C,iCAAiC;EACjC,yBAAyB;EACzB,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AD7Ek/C;ECgFh/C,4CAA4C;EAC5C,gBAAgB;AAClB;;ADlFqjD;ECqFnjD,4BAA4B;AAC9B;;ADtF8lD;ECyF5lD,kCAAkC;EAClC,eAAe;EACf,kCAAkC;EAClC,+FAA+F;EAC/F,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;EACb,mBAAmB;EACnB,WAAW;EACX,aAAa;EACb,kBAAkB;AACpB;;ADpGi3D;ECuG/2D,kCAAkC;EAClC,kCAAkC;AACpC;;ADzG68D;EC4G38D,WAAW;EACX,oBAAoB;AACtB;;AD9GigE;ECiH//D,YAAY;EACZ,wBAAwB;EACxB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,oBAAoB;EACpB,kBAAkB;AACpB;;ADxHmpE;EC2HjpE,gBAAgB;AAClB;;AD5H6qE;EC+H3qE,kCAAkC;EAClC,WAAW;EACX,oDAAoD;AACtD","sourcesContent":[".trigger{align-items:center;background-color:var(--ac-background);border:1px solid var(--ac-input);border-radius:var(--ac-radius-md);box-shadow:0 1px 2px rgba(0,0,0,.04);color:var(--ac-foreground);cursor:pointer;display:inline-flex;font-size:var(--ac-text-sm);gap:var(--ac-space-2);justify-content:space-between;min-height:var(--ac-size-default);outline:none;padding:0 var(--ac-space-3);transition:border-color var(--ac-transition-fast),box-shadow var(--ac-transition-fast);width:100%}.trigger:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.trigger[data-disabled]{cursor:not-allowed;opacity:.5}.trigger[data-popup-open]{border-color:var(--ac-ring)}.icon{color:var(--ac-muted-foreground);display:inline-flex}.iconSvg,.itemIndicatorIcon,.scrollIcon{height:1rem;width:1rem}.positioner{z-index:50}.popup{background-color:var(--ac-popover);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);box-shadow:0 16px 40px -16px rgba(0,0,0,.35);color:var(--ac-popover-foreground);max-height:var(--available-height);min-width:min(12rem,var(--anchor-width,12rem));overflow:hidden;transform-origin:var(--transform-origin);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal)}.popup[data-ending-style],.popup[data-starting-style]{opacity:0;transform:scale(.96)}.list{max-height:var(--available-height);overflow-y:auto;padding:var(--ac-space-1)}.scrollButton{align-items:center;color:var(--ac-muted-foreground);display:flex;height:var(--ac-size-md);justify-content:center}.label{font-weight:600;padding:var(--ac-space-1) var(--ac-space-2)}.item,.label{font-size:var(--ac-text-sm)}.item{align-items:center;border-radius:var(--ac-radius-sm);cursor:default;display:flex;min-height:var(--ac-size-default);outline:none;padding:var(--ac-space-1) calc(var(--ac-space-2) + 1.5rem) var(--ac-space-1) var(--ac-space-2);position:relative;user-select:none;width:100%}.item[data-highlighted]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.item[data-disabled]{opacity:.5;pointer-events:none}.itemIndicatorSlot{align-items:center;display:inline-flex;height:1rem;justify-content:center;position:absolute;right:var(--ac-space-2);width:1rem}.itemText{line-height:1.4}.separator{background-color:var(--ac-border);height:1px;margin:var(--ac-space-1) calc(var(--ac-space-1)*-1)}",".trigger {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-input);\n border-radius: var(--ac-radius-md);\n color: var(--ac-foreground);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-2);\n min-height: var(--ac-size-default);\n padding: 0 var(--ac-space-3);\n transition: border-color var(--ac-transition-fast),box-shadow var(--ac-transition-fast);\n outline: none;\n justify-content: space-between;\n width: 100%;\n display: inline-flex;\n box-shadow: 0 1px 2px #0000000a;\n}\n\n.trigger:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.trigger[data-disabled] {\n cursor: not-allowed;\n opacity: .5;\n}\n\n.trigger[data-popup-open] {\n border-color: var(--ac-ring);\n}\n\n.icon {\n color: var(--ac-muted-foreground);\n display: inline-flex;\n}\n\n.iconSvg, .itemIndicatorIcon, .scrollIcon {\n width: 1rem;\n height: 1rem;\n}\n\n.positioner {\n z-index: 50;\n}\n\n.popup {\n background-color: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n color: var(--ac-popover-foreground);\n max-height: var(--available-height);\n min-width: min(12rem,var(--anchor-width, 12rem));\n transform-origin: var(--transform-origin);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n overflow: hidden;\n box-shadow: 0 16px 40px -16px #00000059;\n}\n\n.popup[data-ending-style], .popup[data-starting-style] {\n opacity: 0;\n transform: scale(.96);\n}\n\n.list {\n max-height: var(--available-height);\n padding: var(--ac-space-1);\n overflow-y: auto;\n}\n\n.scrollButton {\n color: var(--ac-muted-foreground);\n height: var(--ac-size-md);\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.label {\n padding: var(--ac-space-1) var(--ac-space-2);\n font-weight: 600;\n}\n\n.item, .label {\n font-size: var(--ac-text-sm);\n}\n\n.item {\n border-radius: var(--ac-radius-sm);\n cursor: default;\n min-height: var(--ac-size-default);\n padding: var(--ac-space-1) calc(var(--ac-space-2) + 1.5rem) var(--ac-space-1) var(--ac-space-2);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n align-items: center;\n width: 100%;\n display: flex;\n position: relative;\n}\n\n.item[data-highlighted] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.item[data-disabled] {\n opacity: .5;\n pointer-events: none;\n}\n\n.itemIndicatorSlot {\n height: 1rem;\n right: var(--ac-space-2);\n justify-content: center;\n align-items: center;\n width: 1rem;\n display: inline-flex;\n position: absolute;\n}\n\n.itemText {\n line-height: 1.4;\n}\n\n.separator {\n background-color: var(--ac-border);\n height: 1px;\n margin: var(--ac-space-1) calc(var(--ac-space-1)*-1);\n}\n"],"sourceRoot":""}
|
|
@@ -3,10 +3,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
4
|
import { Separator as separator_Separator } from "@base-ui/react/separator";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import { forwardRef } from "react";
|
|
7
6
|
import { cn } from "../../lib/utilities.js";
|
|
8
7
|
import separator_module from "./separator.module.js";
|
|
9
|
-
|
|
8
|
+
import * as __rspack_external_react from "react";
|
|
9
|
+
const ui_separator_Separator = /*#__PURE__*/ __rspack_external_react.forwardRef(function(props, forwardedRef) {
|
|
10
10
|
const { className, orientation = "horizontal", render, ...otherProps } = props;
|
|
11
11
|
return /*#__PURE__*/ jsx(separator_Separator, {
|
|
12
12
|
orientation: orientation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/separator.js","sources":["../../../src/components/ui/separator.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Separator as BaseSeparator} from \"@base-ui/react/separator\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./separator.module.css\";\r\n\r\n/**\r\n * Props for the shared separator wrapper.\r\n */\r\nexport interface SeparatorProps extends Omit<React.ComponentPropsWithRef<typeof BaseSeparator>, \"className\"> {\r\n /** Additional CSS classes merged with the separator styles. @default undefined */\r\n className?: string;\r\n /** The visual axis used when rendering the separator line. @default \"horizontal\" */\r\n orientation?: \"horizontal\" | \"vertical\";\r\n /** Legacy compatibility flag retained by the wrapper but not forwarded to Base UI. @default true */\r\n decorative?: boolean;\r\n}\r\n\r\n/**\r\n * Separates adjacent content areas with a horizontal or vertical rule.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/separator | Base UI Separator}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Separator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/separator | Base UI Documentation}\r\n */\r\nconst Separator = React.forwardRef<HTMLDivElement, Separator.Props>(function Separator(props, forwardedRef) {\r\n const {className, orientation = \"horizontal\", render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSeparator\r\n orientation={orientation}\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(styles.separator, orientation === \"horizontal\" ? styles.horizontal : styles.vertical, className),\r\n },\r\n {},\r\n ),\r\n })}\r\n />\r\n );\r\n});\r\nSeparator.displayName = \"Separator\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Separator {\r\n export type Props = SeparatorProps;\r\n export type State = BaseSeparator.State;\r\n}\r\n\r\nexport {Separator};\r\n"],"names":["Separator","React","props","forwardedRef","className","orientation","render","otherProps","BaseSeparator","useRender","mergeProps","cn","styles"],"mappings":";;;;;;;;AAsCA,MAAMA,yBAAY,WAAHA,GAAGC,
|
|
1
|
+
{"version":3,"file":"components/ui/separator.js","sources":["../../../src/components/ui/separator.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {Separator as BaseSeparator} from \"@base-ui/react/separator\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./separator.module.css\";\r\n\r\n/**\r\n * Props for the shared separator wrapper.\r\n */\r\nexport interface SeparatorProps extends Omit<React.ComponentPropsWithRef<typeof BaseSeparator>, \"className\"> {\r\n /** Additional CSS classes merged with the separator styles. @default undefined */\r\n className?: string;\r\n /** The visual axis used when rendering the separator line. @default \"horizontal\" */\r\n orientation?: \"horizontal\" | \"vertical\";\r\n /** Legacy compatibility flag retained by the wrapper but not forwarded to Base UI. @default true */\r\n decorative?: boolean;\r\n}\r\n\r\n/**\r\n * Separates adjacent content areas with a horizontal or vertical rule.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/separator | Base UI Separator}\r\n * - Supports the `render` prop for element composition\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example Basic usage\r\n * ```tsx\r\n * <Separator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/separator | Base UI Documentation}\r\n */\r\nconst Separator = React.forwardRef<HTMLDivElement, Separator.Props>(function Separator(props, forwardedRef) {\r\n const {className, orientation = \"horizontal\", render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseSeparator\r\n orientation={orientation}\r\n {...otherProps}\r\n ref={forwardedRef}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(styles.separator, orientation === \"horizontal\" ? styles.horizontal : styles.vertical, className),\r\n },\r\n {},\r\n ),\r\n })}\r\n />\r\n );\r\n});\r\nSeparator.displayName = \"Separator\";\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Separator {\r\n export type Props = SeparatorProps;\r\n export type State = BaseSeparator.State;\r\n}\r\n\r\nexport {Separator};\r\n"],"names":["Separator","React","props","forwardedRef","className","orientation","render","otherProps","BaseSeparator","useRender","mergeProps","cn","styles"],"mappings":";;;;;;;;AAsCA,MAAMA,yBAAY,WAAHA,GAAGC,wBAAAA,UAAgB,CAAkC,SAAmBC,KAAK,EAAEC,YAAY;IACxG,MAAM,EAACC,SAAS,EAAEC,cAAc,YAAY,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAEvE,OAAO,WAAP,GACE,IAACM,qBAAaA;QACZ,aAAaH;QACZ,GAAGE,UAAU;QACd,KAAKJ;QACL,QAAQM,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WACL;gBACE,WAAWC,GAAGC,iBAAAA,SAAgB,EAAEP,AAAgB,iBAAhBA,cAA+BO,iBAAAA,UAAiB,GAAGA,iBAAAA,QAAe,EAAER;YACtG,GACA,CAAC;QAEL;;AAGN;AACAJ,uBAAU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/separator.module.css","webpack://./src/components/ui/separator.module.css"],"names":[],"mappings":"AAAA;ECCE,kCAAkC;EAClC,cAAc;AAChB;;ADH2D;ECMzD,WAAW;EACX,WAAW;AACb;;ADR6F;ECW3F,UAAU;EACV,YAAY;AACd","sourcesContent":[".separator{background-color:var(--ac-border);flex-shrink:0}.horizontal{height:1px;width:100%}.vertical{height:100%;width:1px}",".separator {\n background-color: var(--ac-border);\n flex-shrink: 0;\n}\n\n.horizontal {\n width: 100%;\n height: 1px;\n}\n\n.vertical {\n width: 1px;\n height: 100%;\n}\n"],"sourceRoot":""}
|
|
@@ -4,9 +4,9 @@ import { Dialog } from "@base-ui/react/dialog";
|
|
|
4
4
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
6
|
import { X } from "lucide-react";
|
|
7
|
-
import { forwardRef, isValidElement } from "react";
|
|
8
7
|
import { cn } from "../../lib/utilities.js";
|
|
9
8
|
import sheet_module from "./sheet.module.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
10
|
function Sheet(props) {
|
|
11
11
|
return /*#__PURE__*/ jsx(Dialog.Root, {
|
|
12
12
|
...props
|
|
@@ -14,9 +14,9 @@ function Sheet(props) {
|
|
|
14
14
|
}
|
|
15
15
|
const SheetPortal = Dialog.Portal;
|
|
16
16
|
const SheetClose = Dialog.Close;
|
|
17
|
-
const SheetTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
17
|
+
const SheetTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
18
18
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
19
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
19
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
20
20
|
return /*#__PURE__*/ jsx(Dialog.Trigger, {
|
|
21
21
|
ref: ref,
|
|
22
22
|
...otherProps,
|
|
@@ -43,7 +43,7 @@ function SheetOverlay(props) {
|
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
const SheetContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
46
|
+
const SheetContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
|
|
47
47
|
const { className, children, render, side = "right", ...otherProps } = props;
|
|
48
48
|
return /*#__PURE__*/ jsxs(SheetPortal, {
|
|
49
49
|
children: [
|
|
@@ -74,7 +74,7 @@ const SheetContent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
74
74
|
});
|
|
75
75
|
function SheetHeader(props) {
|
|
76
76
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
77
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
77
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
78
78
|
return useRender({
|
|
79
79
|
defaultTagName: "div",
|
|
80
80
|
render: renderProp,
|
|
@@ -87,7 +87,7 @@ function SheetHeader(props) {
|
|
|
87
87
|
}
|
|
88
88
|
function SheetFooter(props) {
|
|
89
89
|
const { asChild = false, children, className, render, ...otherProps } = props;
|
|
90
|
-
const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
|
|
90
|
+
const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
|
|
91
91
|
return useRender({
|
|
92
92
|
defaultTagName: "div",
|
|
93
93
|
render: renderProp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/ui/sheet.js","sources":["../../../src/components/ui/sheet.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Dialog as BaseDialog} from \"@base-ui/react/dialog\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {X} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./sheet.module.css\";\r\n\r\nexport type SheetSide = \"top\" | \"right\" | \"bottom\" | \"left\";\r\n\r\ninterface SheetProps extends React.ComponentPropsWithRef<typeof BaseDialog.Root> {}\r\n\r\ninterface SheetTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface SheetOverlayProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Backdrop>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\nexport interface SheetContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Popup>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Controls which side of the viewport the sheet enters from.\r\n * @default \"right\"\r\n */\r\n side?: SheetSide;\r\n}\r\n\r\ninterface SheetHeaderProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface SheetFooterProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface SheetTitleProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Title>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface SheetDescriptionProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Description>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates sheet state and accessibility behavior.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <Sheet>Content</Sheet>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction Sheet(props: Readonly<Sheet.Props>): React.ReactElement {\r\n return <BaseDialog.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Provides the sheet portal container.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetPortal>Content</SheetPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst SheetPortal = BaseDialog.Portal;\r\n/**\r\n * Renders the sheet close.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetClose>Content</SheetClose>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst SheetClose = BaseDialog.Close;\r\n\r\n/**\r\n * Renders the sheet trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetTrigger>Content</SheetTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst SheetTrigger = React.forwardRef<HTMLButtonElement, SheetTrigger.Props>(\r\n (props: Readonly<SheetTrigger.Props>, ref): React.ReactElement => {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseDialog.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseDialog.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the sheet overlay.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetOverlay>Content</SheetOverlay>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetOverlay(props: Readonly<SheetOverlay.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Backdrop\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.backdrop, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders the sheet content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetContent>Content</SheetContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst SheetContent = React.forwardRef<React.ComponentRef<typeof BaseDialog.Popup>, SheetContent.Props>(\r\n (props: Readonly<SheetContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, side = \"right\", ...otherProps} = props;\r\n\r\n return (\r\n <SheetPortal>\r\n <SheetOverlay />\r\n <BaseDialog.Popup\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, styles[side], className)}, {}),\r\n })}>\r\n <BaseDialog.Close\r\n aria-label='Close'\r\n className={styles.close}>\r\n <X className={styles.closeIcon} />\r\n </BaseDialog.Close>\r\n {children}\r\n </BaseDialog.Popup>\r\n </SheetPortal>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the sheet header.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetHeader>Content</SheetHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetHeader(props: Readonly<SheetHeader.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.header, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the sheet footer.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetFooter>Content</SheetFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetFooter(props: Readonly<SheetFooter.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.footer, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the sheet title.\r\n *\r\n * @remarks\r\n * - Renders a `<h2>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetTitle>Content</SheetTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetTitle(props: Readonly<SheetTitle.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Title\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"h2\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.title, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Title>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the sheet description.\r\n *\r\n * @remarks\r\n * - Renders a `<p>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetDescription>Content</SheetDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetDescription(props: Readonly<SheetDescription.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Description\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"p\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.description, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Description>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Sheet {\r\n export type Props = SheetProps;\r\n export type State = BaseDialog.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetTrigger {\r\n export type Props = SheetTriggerProps;\r\n export type State = BaseDialog.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetOverlay {\r\n export type Props = SheetOverlayProps;\r\n export type State = BaseDialog.Backdrop.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetContent {\r\n export type Props = SheetContentProps;\r\n export type State = BaseDialog.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetHeader {\r\n export type Props = SheetHeaderProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetFooter {\r\n export type Props = SheetFooterProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetTitle {\r\n export type Props = SheetTitleProps;\r\n export type State = BaseDialog.Title.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetDescription {\r\n export type Props = SheetDescriptionProps;\r\n export type State = BaseDialog.Description.State;\r\n}\r\n\r\nSheet.displayName = \"Sheet\";\r\nSheetPortal.displayName = \"SheetPortal\";\r\nSheetClose.displayName = \"SheetClose\";\r\nSheetTrigger.displayName = \"SheetTrigger\";\r\nSheetOverlay.displayName = \"SheetOverlay\";\r\nSheetContent.displayName = \"SheetContent\";\r\nSheetHeader.displayName = \"SheetHeader\";\r\nSheetFooter.displayName = \"SheetFooter\";\r\nSheetTitle.displayName = \"SheetTitle\";\r\nSheetDescription.displayName = \"SheetDescription\";\r\n\r\nexport {Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger};\r\n"],"names":["Sheet","props","BaseDialog","SheetPortal","SheetClose","SheetTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","SheetOverlay","cn","styles","SheetContent","side","X","SheetHeader","SheetFooter","SheetTitle","SheetDescription"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"components/ui/sheet.js","sources":["../../../src/components/ui/sheet.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Dialog as BaseDialog} from \"@base-ui/react/dialog\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {X} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./sheet.module.css\";\r\n\r\nexport type SheetSide = \"top\" | \"right\" | \"bottom\" | \"left\";\r\n\r\ninterface SheetProps extends React.ComponentPropsWithRef<typeof BaseDialog.Root> {}\r\n\r\ninterface SheetTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface SheetOverlayProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Backdrop>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\nexport interface SheetContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Popup>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Controls which side of the viewport the sheet enters from.\r\n * @default \"right\"\r\n */\r\n side?: SheetSide;\r\n}\r\n\r\ninterface SheetHeaderProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface SheetFooterProps extends React.ComponentPropsWithRef<\"div\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface SheetTitleProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Title>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface SheetDescriptionProps extends Omit<React.ComponentPropsWithRef<typeof BaseDialog.Description>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\n/**\r\n * Coordinates sheet state and accessibility behavior.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <Sheet>Content</Sheet>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction Sheet(props: Readonly<Sheet.Props>): React.ReactElement {\r\n return <BaseDialog.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Provides the sheet portal container.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetPortal>Content</SheetPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst SheetPortal = BaseDialog.Portal;\r\n/**\r\n * Renders the sheet close.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetClose>Content</SheetClose>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst SheetClose = BaseDialog.Close;\r\n\r\n/**\r\n * Renders the sheet trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<button>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetTrigger>Content</SheetTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst SheetTrigger = React.forwardRef<HTMLButtonElement, SheetTrigger.Props>(\r\n (props: Readonly<SheetTrigger.Props>, ref): React.ReactElement => {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseDialog.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"button\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseDialog.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the sheet overlay.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetOverlay>Content</SheetOverlay>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetOverlay(props: Readonly<SheetOverlay.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Backdrop\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.backdrop, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders the sheet content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetContent>Content</SheetContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nconst SheetContent = React.forwardRef<React.ComponentRef<typeof BaseDialog.Popup>, SheetContent.Props>(\r\n (props: Readonly<SheetContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, side = \"right\", ...otherProps} = props;\r\n\r\n return (\r\n <SheetPortal>\r\n <SheetOverlay />\r\n <BaseDialog.Popup\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.popup, styles[side], className)}, {}),\r\n })}>\r\n <BaseDialog.Close\r\n aria-label='Close'\r\n className={styles.close}>\r\n <X className={styles.closeIcon} />\r\n </BaseDialog.Close>\r\n {children}\r\n </BaseDialog.Popup>\r\n </SheetPortal>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the sheet header.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetHeader>Content</SheetHeader>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetHeader(props: Readonly<SheetHeader.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.header, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the sheet footer.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetFooter>Content</SheetFooter>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetFooter(props: Readonly<SheetFooter.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.footer, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n/**\r\n * Renders the sheet title.\r\n *\r\n * @remarks\r\n * - Renders a `<h2>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetTitle>Content</SheetTitle>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetTitle(props: Readonly<SheetTitle.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Title\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"h2\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.title, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Title>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the sheet description.\r\n *\r\n * @remarks\r\n * - Renders a `<p>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/dialog | Base UI Dialog}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <SheetDescription>Content</SheetDescription>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}\r\n */\r\nfunction SheetDescription(props: Readonly<SheetDescription.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseDialog.Description\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"p\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.description, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseDialog.Description>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace Sheet {\r\n export type Props = SheetProps;\r\n export type State = BaseDialog.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetTrigger {\r\n export type Props = SheetTriggerProps;\r\n export type State = BaseDialog.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetOverlay {\r\n export type Props = SheetOverlayProps;\r\n export type State = BaseDialog.Backdrop.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetContent {\r\n export type Props = SheetContentProps;\r\n export type State = BaseDialog.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetHeader {\r\n export type Props = SheetHeaderProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetFooter {\r\n export type Props = SheetFooterProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetTitle {\r\n export type Props = SheetTitleProps;\r\n export type State = BaseDialog.Title.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace SheetDescription {\r\n export type Props = SheetDescriptionProps;\r\n export type State = BaseDialog.Description.State;\r\n}\r\n\r\nSheet.displayName = \"Sheet\";\r\nSheetPortal.displayName = \"SheetPortal\";\r\nSheetClose.displayName = \"SheetClose\";\r\nSheetTrigger.displayName = \"SheetTrigger\";\r\nSheetOverlay.displayName = \"SheetOverlay\";\r\nSheetContent.displayName = \"SheetContent\";\r\nSheetHeader.displayName = \"SheetHeader\";\r\nSheetFooter.displayName = \"SheetFooter\";\r\nSheetTitle.displayName = \"SheetTitle\";\r\nSheetDescription.displayName = \"SheetDescription\";\r\n\r\nexport {Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger};\r\n"],"names":["Sheet","props","BaseDialog","SheetPortal","SheetClose","SheetTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","SheetOverlay","cn","styles","SheetContent","side","X","SheetHeader","SheetFooter","SheetTitle","SheetDescription"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack
|
|
1
|
+
{"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/sheet.module.css","webpack://./src/components/ui/sheet.module.css"],"names":[],"mappings":"AAAA;ECCE,+CAA+C;EAC/C,WAAW;EACX,2BAA2B;EAC3B,eAAe;EACf,QAAQ;;EDLkH;IAAuC,kBAAA;ECSjK;AACF;;ADVsL;ECapL,UAAU;AACZ;;ADd4P;ECiB1P,sCAAsC;EACtC,2BAA2B;EAC3B,sBAAsB;EACtB,0BAA0B;EAC1B,qFAAqF;EACrF,WAAW;EACX,sBAAsB;EACtB,aAAa;EACb,eAAe;EACf,uCAAuC;AACzC;;AD3BmjB;EC8BjjB,UAAU;AACZ;;AD/BmnB;ECkCjnB,yCAAyC;EACzC,eAAe;AACjB;;ADpCgrB;ECuC9qB,4BAA4B;AAC9B;;ADxC8vB;EC2C5vB,sCAAsC;EACtC,eAAe;AACjB;;AD7C2zB;ECgDzzB,2BAA2B;AAC7B;;ADjD84B;ECoD54B,wCAAwC;EACxC,uBAAuB;EACvB,iBAAiB;AACnB;;ADvDm+B;EC0Dj+B,4BAA4B;AAC9B;;AD3DmjC;EC8DjjC,uCAAuC;EACvC,uBAAuB;EACvB,iBAAiB;AACnB;;ADjEwoC;ECoEtoC,2BAA2B;AAC7B;;ADrEytC;ECwEvtC,kCAAkC;EAClC,iCAAiC;EACjC,eAAe;EACf,eAAe;EACf,wBAAwB;EACxB,sBAAsB;EACtB,gBAAgB;EAChB,YAAY;EACZ,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,oBAAoB;EACpB,kBAAkB;AACpB;;ADtF6/C;ECyF3/C,iCAAiC;EACjC,mBAAmB;AACrB;;AD3FskD;EC8FpkD,WAAW;EACX,YAAY;AACd;;ADhGwmD;ECmGtmD,kBAAkB;EAClB,sBAAsB;AACxB;;ADrGwpD;ECwGtpD,sBAAsB;EACtB,aAAa;AACf;;AD1G2sD;EC6GzsD,8BAA8B;EAC9B,gBAAgB;AAClB;;AD/GiwD;EAAyB;ICmHtxD,gBAAgB;EAClB;;EDpHgzD;ICuH9yD,mBAAmB;IACnB,yBAAyB;EAC3B;AACF;;AD1Hu2D;EC6Hr2D,4BAA4B;EAC5B,gBAAgB;AAClB;;AD/H05D;ECkIx5D,iCAAiC;EACjC,4BAA4B;AAC9B","sourcesContent":[".backdrop{background-color:rgba(0,0,0,.55);inset:0;position:fixed;transition:opacity var(--ac-transition-normal);z-index:50;@supports (-webkit-touch-callout:none){position:absolute}}.backdrop[data-ending-style],.backdrop[data-starting-style]{opacity:0}.popup{background-color:var(--ac-background);box-shadow:0 20px 40px -12px rgba(0,0,0,.35);color:var(--ac-foreground);display:flex;flex-direction:column;gap:var(--ac-space-4);padding:var(--ac-space-6);position:fixed;transition:transform var(--ac-transition-normal),opacity var(--ac-transition-normal);z-index:51}.popup[data-ending-style],.popup[data-starting-style]{opacity:0}.top{border-bottom:1px solid var(--ac-border);inset:0 0 auto}.top[data-ending-style],.top[data-starting-style]{transform:translateY(-1rem)}.bottom{border-top:1px solid var(--ac-border);inset:auto 0 0}.bottom[data-ending-style],.bottom[data-starting-style]{transform:translateY(1rem)}.left{border-right:1px solid var(--ac-border);inset:0 auto 0 0;width:min(24rem,85vw)}.left[data-ending-style],.left[data-starting-style]{transform:translateX(-1rem)}.right{border-left:1px solid var(--ac-border);inset:0 0 0 auto;width:min(24rem,85vw)}.right[data-ending-style],.right[data-starting-style]{transform:translateX(1rem)}.close{align-items:center;background:transparent;border:none;border-radius:var(--ac-radius-sm);color:var(--ac-muted-foreground);cursor:pointer;display:inline-flex;height:1.75rem;justify-content:center;outline:none;position:absolute;right:var(--ac-space-3);top:var(--ac-space-3);width:1.75rem}.close:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.closeIcon{height:1rem;width:1rem}.header{flex-direction:column;text-align:center}.footer,.header{display:flex;gap:var(--ac-space-2)}.footer{flex-direction:column-reverse;margin-top:auto}@media (min-width:640px){.header{text-align:left}.footer{flex-direction:row;justify-content:flex-end}}.title{font-size:var(--ac-text-lg);font-weight:600}.description{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm)}",".backdrop {\n transition: opacity var(--ac-transition-normal);\n z-index: 50;\n background-color: #0000008c;\n position: fixed;\n inset: 0;\n\n @supports (-webkit-touch-callout: none) {\n position: absolute;\n }\n}\n\n.backdrop[data-ending-style], .backdrop[data-starting-style] {\n opacity: 0;\n}\n\n.popup {\n background-color: var(--ac-background);\n color: var(--ac-foreground);\n gap: var(--ac-space-4);\n padding: var(--ac-space-6);\n transition: transform var(--ac-transition-normal),opacity var(--ac-transition-normal);\n z-index: 51;\n flex-direction: column;\n display: flex;\n position: fixed;\n box-shadow: 0 20px 40px -12px #00000059;\n}\n\n.popup[data-ending-style], .popup[data-starting-style] {\n opacity: 0;\n}\n\n.top {\n border-bottom: 1px solid var(--ac-border);\n inset: 0 0 auto;\n}\n\n.top[data-ending-style], .top[data-starting-style] {\n transform: translateY(-1rem);\n}\n\n.bottom {\n border-top: 1px solid var(--ac-border);\n inset: auto 0 0;\n}\n\n.bottom[data-ending-style], .bottom[data-starting-style] {\n transform: translateY(1rem);\n}\n\n.left {\n border-right: 1px solid var(--ac-border);\n width: min(24rem, 85vw);\n inset: 0 auto 0 0;\n}\n\n.left[data-ending-style], .left[data-starting-style] {\n transform: translateX(-1rem);\n}\n\n.right {\n border-left: 1px solid var(--ac-border);\n width: min(24rem, 85vw);\n inset: 0 0 0 auto;\n}\n\n.right[data-ending-style], .right[data-starting-style] {\n transform: translateX(1rem);\n}\n\n.close {\n border-radius: var(--ac-radius-sm);\n color: var(--ac-muted-foreground);\n cursor: pointer;\n height: 1.75rem;\n right: var(--ac-space-3);\n top: var(--ac-space-3);\n background: none;\n border: none;\n outline: none;\n justify-content: center;\n align-items: center;\n width: 1.75rem;\n display: inline-flex;\n position: absolute;\n}\n\n.close:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.closeIcon {\n width: 1rem;\n height: 1rem;\n}\n\n.header {\n text-align: center;\n flex-direction: column;\n}\n\n.footer, .header {\n gap: var(--ac-space-2);\n display: flex;\n}\n\n.footer {\n flex-direction: column-reverse;\n margin-top: auto;\n}\n\n@media (width >= 640px) {\n .header {\n text-align: left;\n }\n\n .footer {\n flex-direction: row;\n justify-content: flex-end;\n }\n}\n\n.title {\n font-size: var(--ac-text-lg);\n font-weight: 600;\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n}\n"],"sourceRoot":""}
|