@gridui/popover 1.2.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/README.md CHANGED
@@ -1,17 +1,34 @@
1
1
  # @gridui/popover
2
2
 
3
- Core family. Public API: `Popover`, `PopoverAnchor`, `PopoverAnchorProps`, `PopoverClose`, `PopoverCloseProps`, `PopoverPanel`, `PopoverPanelProps`, `PopoverProps`, `PopoverTrigger`, `PopoverTriggerProps`.
3
+ Overlays family. Public API: `Popover`, `PopoverAnchor`, `PopoverAnchorProps`, `PopoverClose`, `PopoverCloseProps`, `PopoverPanel`, `PopoverPanelProps`, `PopoverProps`, `PopoverTrigger`, `PopoverTriggerProps`.
4
4
 
5
5
  Import components from `@gridui/popover` and load `@gridui/popover/styles.css` after Theme.
6
- Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
6
+ Applications own routes, labels, state persistence, and branding.
7
7
 
8
- See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/popover/.changeset/history).
8
+ ## Styles
9
9
 
10
- Surface motion uses `@gridui/overlay`; load `@gridui/overlay/styles.css` after Theme and before this family.
10
+ Load Theme once. Use `@gridui/popover/styled` for automatic component CSS in
11
+ CSS-aware bundlers, or keep the CSS-free root import and load `@gridui/popover/styles.css`.
12
+ Both entries expose the same root API. The standalone stylesheet includes component
13
+ dependency styles; Theme/reset remain separate. See the
14
+ [integration guide](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/integration.md)
15
+ for static HTML loading, SSR limits, and avoiding duplicate CSS.
16
+
17
+
18
+ See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-overlays/popover/.changeset/history).
19
+
20
+ Surface motion uses `@gridui/overlay`; its styles are included.
11
21
 
12
22
  [Component reference](docs/reference/README.md) contains focused API pages for each public component.
13
23
 
14
24
  Shared animation policy and tempo come from `MotionConfig` in `@gridui/motion`.
15
25
  Disabled or reduced-motion policy settles decoration without disabling interaction.
16
- See the [motion guide](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/motion)
26
+ See the [motion guide](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-foundation/motion)
17
27
  for CSS scopes, portal behavior, and specialized timing contracts.
28
+
29
+ ## Sizing and density
30
+
31
+ PopoverPanel accepts CSS width with available-space constraints. PopoverTrigger uses the medium Button default and supports explicit Button sizes. A trigger size never implicitly selects panel width or content density.
32
+
33
+ See the [shared sizing contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/sizing.md)
34
+ for native attributes, scope precedence, tokens and target behavior.
package/dist/index.js CHANGED
@@ -186,6 +186,8 @@ var PopoverPanel = (props) => {
186
186
  const motionStyle = useMotionStyle();
187
187
  const {
188
188
  className,
189
+ width,
190
+ container,
189
191
  ref: forwardedRef,
190
192
  forceMount,
191
193
  align = "start",
@@ -245,12 +247,13 @@ var PopoverPanel = (props) => {
245
247
  interaction?.dismiss();
246
248
  }
247
249
  },
248
- style: { ...props.style, ...motionStyle }
250
+ style: { width, ...props.style, ...motionStyle }
249
251
  }
250
252
  );
251
253
  return /* @__PURE__ */ jsx4(
252
254
  Primitive4.Portal,
253
255
  {
256
+ container,
254
257
  forceMount,
255
258
  children: forceMount ? /* @__PURE__ */ jsx4(RetainedLayer, { children: content }) : content
256
259
  }
@@ -269,7 +272,6 @@ import { useContext as useContext2 } from "react";
269
272
  import { jsx as jsx5 } from "react/jsx-runtime";
270
273
  var PopoverTrigger = (props) => {
271
274
  const {
272
- size = "small",
273
275
  className,
274
276
  onPointerEnter,
275
277
  onPointerLeave,
@@ -290,7 +292,6 @@ var PopoverTrigger = (props) => {
290
292
  Button,
291
293
  {
292
294
  ...buttonProps,
293
- size,
294
295
  className: cn3(popoverTriggerStyles(), className),
295
296
  onPointerEnter: (event) => {
296
297
  onPointerEnter?.(event);
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/shared/context.ts", "../src/popover/hover-intent.ts", "../src/popover/popover.tsx", "../src/popover-anchor/popover-anchor.tsx", "../src/popover-close/popover-close.tsx", "../src/popover-panel/popover-panel.tsx", "../src/popover-panel/style.ts", "../src/popover-trigger/style.ts", "../src/popover-trigger/popover-trigger.tsx"],
4
- "sourcesContent": ["/**\n * @author WMXPY\n * @package Popover\n * @namespace Shared\n * @description Context\n */\n\nimport { createContext, type PointerEvent } from \"react\";\n\nexport type NavigationInteraction = {\n readonly hoverOpened: {\n current: boolean;\n };\n readonly enter: (event: PointerEvent<HTMLElement>) => void;\n readonly leave: (event: PointerEvent<HTMLElement>) => void;\n readonly activate: () => void;\n readonly dismiss: () => void;\n};\n\nexport const Interaction = createContext<NavigationInteraction | null>(null);\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace Popover\n * @description Hover Intent\n */\n\nexport const createHoverIntent = (open: () => void, close: () => void) => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let dismissed = false;\n const cancel = (): void => {\n clearTimeout(timer);\n timer = undefined;\n };\n return {\n enter(alreadyOpen: boolean): void {\n cancel();\n if (!dismissed && !alreadyOpen) {\n timer = setTimeout(open, 150);\n }\n },\n leave(shouldClose: boolean): void {\n cancel();\n dismissed = false;\n if (shouldClose) {\n timer = setTimeout(close, 250);\n }\n },\n dismiss(): void {\n cancel();\n dismissed = true;\n },\n cancel,\n };\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace Popover\n * @description Popover\n */\n\nimport { Interaction, type NavigationInteraction } from \"../shared/context\";\nimport { createHoverIntent } from \"./hover-intent\";\nimport { OverlayOpen, useOverlayState } from \"@gridui/overlay\";\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport { type ComponentPropsWithRef, type FC, useEffect, useMemo, useRef } from \"react\";\n\nexport type PopoverProps = ComponentPropsWithRef<typeof Primitive.Root> & {\n readonly hoverEnabled?: boolean;\n};\n\nexport const Popover: FC<PopoverProps> = (props: PopoverProps) => {\n const {\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n hoverEnabled = true,\n ...restProps\n } = props;\n const { open, onOpenChange: change } = useOverlayState({\n open: controlledOpen,\n defaultOpen,\n onOpenChange,\n });\n const hoverOpened = useRef(false);\n const openRef = useRef(open);\n const changeRef = useRef(change);\n const hoverTarget = useRef<HTMLElement | null>(null);\n useEffect(() => {\n openRef.current = open;\n changeRef.current = change;\n }, [\n open,\n change,\n ]);\n const intent = useMemo(() => {\n return createHoverIntent(() => {\n if (!hoverTarget.current?.isConnected || hoverTarget.current.matches(\":disabled, [aria-disabled='true']\")) {\n return;\n }\n hoverOpened.current = true;\n changeRef.current(true);\n }, () => {\n changeRef.current(false);\n });\n }, []);\n useEffect(() => {\n return intent.cancel;\n }, [intent]);\n useEffect(() => {\n if (!hoverEnabled) {\n intent.cancel();\n }\n }, [\n hoverEnabled,\n intent,\n ]);\n useEffect(() => {\n if (!open) {\n intent.cancel();\n }\n }, [\n intent,\n open,\n ]);\n const interaction: NavigationInteraction = {\n hoverOpened,\n enter(event) {\n if (hoverEnabled && event.pointerType === \"mouse\" && !event.currentTarget.matches(\":disabled, [aria-disabled='true']\")\n && window.matchMedia(\"(hover: hover) and (pointer: fine)\").matches) {\n hoverTarget.current = event.currentTarget;\n intent.enter(openRef.current);\n }\n },\n leave(event) {\n const focused = event.currentTarget.contains(document.activeElement);\n intent.leave(hoverOpened.current && !focused);\n },\n activate() {\n intent.cancel();\n hoverOpened.current = false;\n },\n dismiss() {\n intent.dismiss();\n hoverOpened.current = false;\n },\n };\n return (<Interaction.Provider\n value={interaction}\n >\n <OverlayOpen.Provider\n value={open}\n >\n <Primitive.Root\n {...restProps}\n open={open}\n onOpenChange={(next) => {\n if (!next) {\n interaction.dismiss();\n }\n change(next);\n }}\n />\n </OverlayOpen.Provider>\n </Interaction.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverAnchor\n * @description Popover Anchor\n */\n\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type PopoverAnchorProps = ComponentPropsWithRef<typeof Primitive.Anchor>;\n\nexport const PopoverAnchor: FC<PopoverAnchorProps> = (props: PopoverAnchorProps) => {\n return (<Primitive.Anchor\n {...props}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverClose\n * @description Popover Close\n */\n\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type PopoverCloseProps = ComponentPropsWithRef<typeof Primitive.Close>;\n\nexport const PopoverClose: FC<PopoverCloseProps> = (props: PopoverCloseProps) => {\n return (<Primitive.Close\n {...props}\n />);\n};\n", "import { useMotionStyle } from \"@gridui/motion/policy\";\n/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverPanel\n * @description Popover Panel\n */\n\nimport { Interaction } from \"../shared/context\";\nimport { menuPanelStyles } from \"./style\";\nimport { interactionLayerProps, RetainedLayer, useInteractionOutline, useScrollbars } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport { type ComponentPropsWithRef, type FC, useContext } from \"react\";\n\nexport type PopoverPanelProps = ComponentPropsWithRef<typeof Primitive.Content>;\n\nexport const PopoverPanel: FC<PopoverPanelProps> = (props: PopoverPanelProps) => {\n const motionStyle = useMotionStyle();\n const {\n className,\n ref: forwardedRef,\n forceMount,\n align = \"start\",\n sideOffset = 8,\n collisionPadding = 16,\n onPointerEnter,\n onPointerLeave,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n ...restProps\n } = props;\n const interaction = useContext(Interaction);\n const scrollbarRef = useScrollbars({ ref: forwardedRef });\n const ref = useInteractionOutline({\n ref: scrollbarRef,\n selector: 'a[href], button, input, select, textarea, summary, [tabindex], [role=\"option\"]',\n });\n const content = (<Primitive.Content\n {...interactionLayerProps}\n {...restProps}\n ref={ref}\n forceMount={forceMount}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(menuPanelStyles(), className)}\n onPointerEnter={(event) => {\n onPointerEnter?.(event);\n if (!event.defaultPrevented) {\n interaction?.enter(event);\n }\n }}\n onPointerLeave={(event) => {\n onPointerLeave?.(event);\n if (!event.defaultPrevented) {\n interaction?.leave(event);\n }\n }}\n onOpenAutoFocus={(event) => {\n onOpenAutoFocus?.(event);\n if (interaction?.hoverOpened.current) {\n event.preventDefault();\n }\n }}\n onCloseAutoFocus={(event) => {\n onCloseAutoFocus?.(event);\n if (interaction?.hoverOpened.current) {\n event.preventDefault();\n }\n }}\n onEscapeKeyDown={(event) => {\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented) {\n interaction?.dismiss();\n }\n }}\n style={{ ...(props.style), ...motionStyle }}\n />);\n return (<Primitive.Portal\n forceMount={forceMount}\n >\n {forceMount ? (<RetainedLayer>\n {content}\n </RetainedLayer>) : content}\n </Primitive.Portal>);\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverPanel\n * @description Style\n */\n\nimport { overlaySurfaceStyles } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const menuPanelStyles = cva(cn(\n overlaySurfaceStyles(),\n \"gridui-menu-panel\",\n \"gridui-u-popover--z-(--gridui-z-popover) gridui-u-popover--box-border gridui-u-popover--p-gridui-24 gridui-u-popover--type-supporting gridui-u-popover--overflow-y-auto gridui-u-popover--overscroll-contain gridui-u-popover--w-3xl gridui-u-popover--max-w-[min(calc(100vw-2*var(--gridui-page-gutter)),var(--radix-popover-content-available-width))] gridui-u-popover--max-h-(--radix-popover-content-available-height) gridui-u-popover--rounded-control\",\n));\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverTrigger\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const popoverTriggerStyles = cva(\"gridui-menu-trigger gridui-u-popover--data-[state=open]:bg-surface\");\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverTrigger\n * @description Popover Trigger\n */\n\nimport { Interaction } from \"../shared/context\";\nimport { popoverTriggerStyles } from \"./style\";\nimport { Button, type ButtonProps } from \"@gridui/button\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport { type FC, useContext } from \"react\";\n\nexport type PopoverTriggerProps = ButtonProps;\n\nexport const PopoverTrigger: FC<PopoverTriggerProps> = (props: PopoverTriggerProps) => {\n const {\n size = \"small\",\n className,\n onPointerEnter,\n onPointerLeave,\n onPointerDown,\n onKeyDown,\n ...restProps\n } = props;\n const interaction = useContext(Interaction);\n const buttonProps: ButtonProps = restProps.variant === undefined ? {\n ...restProps,\n variant: \"quiet\",\n } : restProps;\n return (<Primitive.Trigger\n asChild\n >\n <Button\n {...buttonProps}\n size={size}\n className={cn(popoverTriggerStyles(), className)}\n onPointerEnter={(event) => {\n onPointerEnter?.(event);\n if (!restProps.disabled\n && !restProps.loading\n && !event.defaultPrevented) {\n interaction?.enter(event);\n }\n }}\n onPointerLeave={(event) => {\n onPointerLeave?.(event);\n if (!event.defaultPrevented) {\n interaction?.leave(event);\n }\n }}\n onPointerDown={(event) => {\n onPointerDown?.(event);\n if (!event.defaultPrevented) {\n interaction?.activate();\n }\n }}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n if (!event.defaultPrevented && (event.key === \"Enter\" || event.key === \" \")) {\n interaction?.activate();\n }\n }}\n />\n </Primitive.Trigger>);\n};\n"],
5
- "mappings": ";AAOA,SAAS,qBAAwC;AAY1C,IAAM,cAAc,cAA4C,IAAI;;;ACZpE,IAAM,oBAAoB,CAAC,MAAkB,UAAsB;AACtE,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,SAAS,MAAY;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B,UAAU,YAAY,SAAY;AAAA,IAC/D,GAAG;AAAA,IACH,SAAS;AAAA,EACb,IAAI;AACJ,SAAQ,gBAAAC;AAAA,IAAW;AAAA,IAAV;AAAA,MACL,SAAO;AAAA,MAEP,0BAAAA;AAAA,QAAC;AAAA;AAAA,UACI,GAAG;AAAA,UACJ;AAAA,UACA,WAAWH,IAAG,qBAAqB,GAAG,SAAS;AAAA,UAC/C,gBAAgB,CAAC,UAAU;AACvB,6BAAiB,KAAK;AACtB,gBAAI,CAAC,UAAU,YACJ,CAAC,UAAU,WACX,CAAC,MAAM,kBAAkB;AAChC,2BAAa,MAAM,KAAK;AAAA,YAC5B;AAAA,UACJ;AAAA,UACA,gBAAgB,CAAC,UAAU;AACvB,6BAAiB,KAAK;AACtB,gBAAI,CAAC,MAAM,kBAAkB;AACzB,2BAAa,MAAM,KAAK;AAAA,YAC5B;AAAA,UACJ;AAAA,UACA,eAAe,CAAC,UAAU;AACtB,4BAAgB,KAAK;AACrB,gBAAI,CAAC,MAAM,kBAAkB;AACzB,2BAAa,SAAS;AAAA,YAC1B;AAAA,UACJ;AAAA,UACA,WAAW,CAAC,UAAU;AAClB,wBAAY,KAAK;AACjB,gBAAI,CAAC,MAAM,qBAAqB,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;AACzE,2BAAa,SAAS;AAAA,YAC1B;AAAA,UACJ;AAAA;AAAA,MACJ;AAAA;AAAA,EACJ;AACJ;",
4
+ "sourcesContent": ["/**\n * @author WMXPY\n * @package Popover\n * @namespace Shared\n * @description Context\n */\n\nimport { createContext, type PointerEvent } from \"react\";\n\nexport type NavigationInteraction = {\n readonly hoverOpened: {\n current: boolean;\n };\n readonly enter: (event: PointerEvent<HTMLElement>) => void;\n readonly leave: (event: PointerEvent<HTMLElement>) => void;\n readonly activate: () => void;\n readonly dismiss: () => void;\n};\n\nexport const Interaction = createContext<NavigationInteraction | null>(null);\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace Popover\n * @description Hover Intent\n */\n\nexport const createHoverIntent = (open: () => void, close: () => void) => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n let dismissed = false;\n const cancel = (): void => {\n clearTimeout(timer);\n timer = undefined;\n };\n return {\n enter(alreadyOpen: boolean): void {\n cancel();\n if (!dismissed && !alreadyOpen) {\n timer = setTimeout(open, 150);\n }\n },\n leave(shouldClose: boolean): void {\n cancel();\n dismissed = false;\n if (shouldClose) {\n timer = setTimeout(close, 250);\n }\n },\n dismiss(): void {\n cancel();\n dismissed = true;\n },\n cancel,\n };\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace Popover\n * @description Popover\n */\n\nimport { Interaction, type NavigationInteraction } from \"../shared/context\";\nimport { createHoverIntent } from \"./hover-intent\";\nimport { OverlayOpen, useOverlayState } from \"@gridui/overlay\";\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport { type ComponentPropsWithRef, type FC, useEffect, useMemo, useRef } from \"react\";\n\nexport type PopoverProps = ComponentPropsWithRef<typeof Primitive.Root> & {\n readonly hoverEnabled?: boolean;\n};\n\nexport const Popover: FC<PopoverProps> = (props: PopoverProps) => {\n const {\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n hoverEnabled = true,\n ...restProps\n } = props;\n const { open, onOpenChange: change } = useOverlayState({\n open: controlledOpen,\n defaultOpen,\n onOpenChange,\n });\n const hoverOpened = useRef(false);\n const openRef = useRef(open);\n const changeRef = useRef(change);\n const hoverTarget = useRef<HTMLElement | null>(null);\n useEffect(() => {\n openRef.current = open;\n changeRef.current = change;\n }, [\n open,\n change,\n ]);\n const intent = useMemo(() => {\n return createHoverIntent(() => {\n if (!hoverTarget.current?.isConnected || hoverTarget.current.matches(\":disabled, [aria-disabled='true']\")) {\n return;\n }\n hoverOpened.current = true;\n changeRef.current(true);\n }, () => {\n changeRef.current(false);\n });\n }, []);\n useEffect(() => {\n return intent.cancel;\n }, [intent]);\n useEffect(() => {\n if (!hoverEnabled) {\n intent.cancel();\n }\n }, [\n hoverEnabled,\n intent,\n ]);\n useEffect(() => {\n if (!open) {\n intent.cancel();\n }\n }, [\n intent,\n open,\n ]);\n const interaction: NavigationInteraction = {\n hoverOpened,\n enter(event) {\n if (hoverEnabled && event.pointerType === \"mouse\" && !event.currentTarget.matches(\":disabled, [aria-disabled='true']\")\n && window.matchMedia(\"(hover: hover) and (pointer: fine)\").matches) {\n hoverTarget.current = event.currentTarget;\n intent.enter(openRef.current);\n }\n },\n leave(event) {\n const focused = event.currentTarget.contains(document.activeElement);\n intent.leave(hoverOpened.current && !focused);\n },\n activate() {\n intent.cancel();\n hoverOpened.current = false;\n },\n dismiss() {\n intent.dismiss();\n hoverOpened.current = false;\n },\n };\n return (<Interaction.Provider\n value={interaction}\n >\n <OverlayOpen.Provider\n value={open}\n >\n <Primitive.Root\n {...restProps}\n open={open}\n onOpenChange={(next) => {\n if (!next) {\n interaction.dismiss();\n }\n change(next);\n }}\n />\n </OverlayOpen.Provider>\n </Interaction.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverAnchor\n * @description Popover Anchor\n */\n\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type PopoverAnchorProps = ComponentPropsWithRef<typeof Primitive.Anchor>;\n\nexport const PopoverAnchor: FC<PopoverAnchorProps> = (props: PopoverAnchorProps) => {\n return (<Primitive.Anchor\n {...props}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverClose\n * @description Popover Close\n */\n\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type PopoverCloseProps = ComponentPropsWithRef<typeof Primitive.Close>;\n\nexport const PopoverClose: FC<PopoverCloseProps> = (props: PopoverCloseProps) => {\n return (<Primitive.Close\n {...props}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverPanel\n * @description Popover Panel\n */\n\nimport type { CSSProperties } from \"react\";\nimport { useMotionStyle } from \"@gridui/motion/policy\";\n/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverPanel\n * @description Popover Panel\n */\n\nimport { Interaction } from \"../shared/context\";\nimport { menuPanelStyles } from \"./style\";\nimport { interactionLayerProps, RetainedLayer, useInteractionOutline, useScrollbars } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport { type ComponentPropsWithRef, type FC, useContext } from \"react\";\n\nexport type PopoverPanelProps = ComponentPropsWithRef<typeof Primitive.Content> & {\n readonly width?: CSSProperties[\"width\"];\n readonly container?: ComponentPropsWithRef<typeof Primitive.Portal>[\"container\"];\n};\n\nexport const PopoverPanel: FC<PopoverPanelProps> = (props: PopoverPanelProps) => {\n const motionStyle = useMotionStyle();\n const {\n className,\n width,\n container,\n ref: forwardedRef,\n forceMount,\n align = \"start\",\n sideOffset = 8,\n collisionPadding = 16,\n onPointerEnter,\n onPointerLeave,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n ...restProps\n } = props;\n const interaction = useContext(Interaction);\n const scrollbarRef = useScrollbars({ ref: forwardedRef });\n const ref = useInteractionOutline({\n ref: scrollbarRef,\n selector: 'a[href], button, input, select, textarea, summary, [tabindex], [role=\"option\"]',\n });\n const content = (<Primitive.Content\n {...interactionLayerProps}\n {...restProps}\n ref={ref}\n forceMount={forceMount}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n className={cn(menuPanelStyles(), className)}\n onPointerEnter={(event) => {\n onPointerEnter?.(event);\n if (!event.defaultPrevented) {\n interaction?.enter(event);\n }\n }}\n onPointerLeave={(event) => {\n onPointerLeave?.(event);\n if (!event.defaultPrevented) {\n interaction?.leave(event);\n }\n }}\n onOpenAutoFocus={(event) => {\n onOpenAutoFocus?.(event);\n if (interaction?.hoverOpened.current) {\n event.preventDefault();\n }\n }}\n onCloseAutoFocus={(event) => {\n onCloseAutoFocus?.(event);\n if (interaction?.hoverOpened.current) {\n event.preventDefault();\n }\n }}\n onEscapeKeyDown={(event) => {\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented) {\n interaction?.dismiss();\n }\n }}\n style={{ width, ...(props.style), ...motionStyle }}\n />);\n return (<Primitive.Portal\n container={container}\n forceMount={forceMount}\n >\n {forceMount ? (<RetainedLayer>\n {content}\n </RetainedLayer>) : content}\n </Primitive.Portal>);\n};\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverPanel\n * @description Style\n */\n\nimport { overlaySurfaceStyles } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const menuPanelStyles = cva(cn(\n overlaySurfaceStyles(),\n \"gridui-menu-panel\",\n \"gridui-u-popover--z-(--gridui-z-popover) gridui-u-popover--box-border gridui-u-popover--p-gridui-24 gridui-u-popover--type-supporting gridui-u-popover--overflow-y-auto gridui-u-popover--overscroll-contain gridui-u-popover--w-3xl gridui-u-popover--max-w-[min(calc(100vw-2*var(--gridui-page-gutter)),var(--radix-popover-content-available-width))] gridui-u-popover--max-h-(--radix-popover-content-available-height) gridui-u-popover--rounded-control\",\n));\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverTrigger\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const popoverTriggerStyles = cva(\"gridui-menu-trigger gridui-u-popover--data-[state=open]:bg-surface\");\n", "/**\n * @author WMXPY\n * @package Popover\n * @namespace PopoverTrigger\n * @description Popover Trigger\n */\n\nimport { Interaction } from \"../shared/context\";\nimport { popoverTriggerStyles } from \"./style\";\nimport { Button, type ButtonProps } from \"@gridui/button\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Primitive from \"@radix-ui/react-popover\";\nimport { type FC, useContext } from \"react\";\n\nexport type PopoverTriggerProps = ButtonProps;\n\nexport const PopoverTrigger: FC<PopoverTriggerProps> = (props: PopoverTriggerProps) => {\n const {\n className,\n onPointerEnter,\n onPointerLeave,\n onPointerDown,\n onKeyDown,\n ...restProps\n } = props;\n const interaction = useContext(Interaction);\n const buttonProps: ButtonProps = restProps.variant === undefined ? {\n ...restProps,\n variant: \"quiet\",\n } : restProps;\n return (<Primitive.Trigger\n asChild\n >\n <Button\n {...buttonProps}\n className={cn(popoverTriggerStyles(), className)}\n onPointerEnter={(event) => {\n onPointerEnter?.(event);\n if (!restProps.disabled\n && !restProps.loading\n && !event.defaultPrevented) {\n interaction?.enter(event);\n }\n }}\n onPointerLeave={(event) => {\n onPointerLeave?.(event);\n if (!event.defaultPrevented) {\n interaction?.leave(event);\n }\n }}\n onPointerDown={(event) => {\n onPointerDown?.(event);\n if (!event.defaultPrevented) {\n interaction?.activate();\n }\n }}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n if (!event.defaultPrevented && (event.key === \"Enter\" || event.key === \" \")) {\n interaction?.activate();\n }\n }}\n />\n </Primitive.Trigger>);\n};\n"],
5
+ "mappings": ";AAOA,SAAS,qBAAwC;AAY1C,IAAM,cAAc,cAA4C,IAAI;;;ACZpE,IAAM,oBAAoB,CAAC,MAAkB,UAAsB;AACtE,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,SAAS,MAAY;AACvB,iBAAa,KAAK;AAClB,YAAQ;AAAA,EACZ;AACA,SAAO;AAAA,IACH,MAAM,aAA4B;AAC9B,aAAO;AACP,UAAI,CAAC,aAAa,CAAC,aAAa;AAC5B,gBAAQ,WAAW,MAAM,GAAG;AAAA,MAChC;AAAA,IACJ;AAAA,IACA,MAAM,aAA4B;AAC9B,aAAO;AACP,kBAAY;AACZ,UAAI,aAAa;AACb,gBAAQ,WAAW,OAAO,GAAG;AAAA,MACjC;AAAA,IACJ;AAAA,IACA,UAAgB;AACZ,aAAO;AACP,kBAAY;AAAA,IAChB;AAAA,IACA;AAAA,EACJ;AACJ;;;ACzBA,SAAS,aAAa,uBAAuB;AAC7C,YAAY,eAAe;AAC3B,SAA8C,WAAW,SAAS,cAAc;AAwFpE;AAlFL,IAA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AI,CAAC,MAAM,kBAAkB;AACzB,2BAAa,MAAM,KAAK;AAAA,YAC5B;AAAA,UACJ;AAAA,UACA,eAAe,CAAC,UAAU;AACtB,4BAAgB,KAAK;AACrB,gBAAI,CAAC,MAAM,kBAAkB;AACzB,2BAAa,SAAS;AAAA,YAC1B;AAAA,UACJ;AAAA,UACA,WAAW,CAAC,UAAU;AAClB,wBAAY,KAAK;AACjB,gBAAI,CAAC,MAAM,qBAAqB,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;AACzE,2BAAa,SAAS;AAAA,YAC1B;AAAA,UACJ;AAAA;AAAA,MACJ;AAAA;AAAA,EACJ;AACJ;",
6
6
  "names": ["Primitive", "jsx", "Primitive", "jsx", "cn", "Primitive", "jsx", "cva", "cn", "Primitive", "useContext", "jsx"]
7
7
  }
@@ -1,4 +1,14 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @package Popover
4
+ * @namespace PopoverPanel
5
+ * @description Popover Panel
6
+ */
7
+ import type { CSSProperties } from "react";
1
8
  import * as Primitive from "@radix-ui/react-popover";
2
9
  import { type ComponentPropsWithRef, type FC } from "react";
3
- export type PopoverPanelProps = ComponentPropsWithRef<typeof Primitive.Content>;
10
+ export type PopoverPanelProps = ComponentPropsWithRef<typeof Primitive.Content> & {
11
+ readonly width?: CSSProperties["width"];
12
+ readonly container?: ComponentPropsWithRef<typeof Primitive.Portal>["container"];
13
+ };
4
14
  export declare const PopoverPanel: FC<PopoverPanelProps>;
package/dist/styled.js ADDED
@@ -0,0 +1,4 @@
1
+ import "@gridui/button/styled";
2
+ import "@gridui/overlay/styled";
3
+ import "./styles.local.css";
4
+ export * from "./index.js";
package/dist/styles.css CHANGED
@@ -1,3 +1,587 @@
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer utilities {
5
+ .gridui-u-button--pointer-events-none {
6
+ pointer-events: none;
7
+ }
8
+ .gridui-u-button--inline-flex {
9
+ display: inline-flex;
10
+ }
11
+ .gridui-u-button--size-\(--_gridui-button-min\) {
12
+ width: var(--_gridui-button-min);
13
+ height: var(--_gridui-button-min);
14
+ }
15
+ .gridui-u-button--h-full {
16
+ height: 100%;
17
+ }
18
+ .gridui-u-button--w-fit {
19
+ width: fit-content;
20
+ }
21
+ .gridui-u-button--w-full {
22
+ width: 100%;
23
+ }
24
+ .gridui-u-button--w-gridui-64 {
25
+ width: var(--gridui-space-64);
26
+ }
27
+ .gridui-u-button--w-gridui-control-large {
28
+ width: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
29
+ }
30
+ .gridui-u-button--w-gridui-control-medium {
31
+ width: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
32
+ }
33
+ .gridui-u-button--w-gridui-control-small {
34
+ width: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
35
+ }
36
+ .gridui-u-button--max-w-full {
37
+ max-width: 100%;
38
+ }
39
+ .gridui-u-button--min-w-0 {
40
+ min-width: 0px;
41
+ }
42
+ .gridui-u-button--min-w-gridui-24 {
43
+ min-width: var(--gridui-space-24);
44
+ }
45
+ .gridui-u-button--flex-1 {
46
+ flex: 1;
47
+ }
48
+ .gridui-u-button--shrink-0 {
49
+ flex-shrink: 0;
50
+ }
51
+ .gridui-u-button--cursor-pointer {
52
+ cursor: pointer;
53
+ }
54
+ .gridui-u-button--flex-col {
55
+ flex-direction: column;
56
+ }
57
+ .gridui-u-button--items-center {
58
+ align-items: center;
59
+ }
60
+ .gridui-u-button--items-stretch {
61
+ align-items: stretch;
62
+ }
63
+ .gridui-u-button--justify-between {
64
+ justify-content: space-between;
65
+ }
66
+ .gridui-u-button--justify-center {
67
+ justify-content: center;
68
+ }
69
+ .gridui-u-button--justify-start {
70
+ justify-content: flex-start;
71
+ }
72
+ .gridui-u-button--gap-0 {
73
+ gap: 0px;
74
+ }
75
+ .gridui-u-button--gap-gridui-8 {
76
+ gap: var(--gridui-space-8);
77
+ }
78
+ .gridui-u-button--gap-gridui-32 {
79
+ gap: var(--gridui-space-32);
80
+ }
81
+ .gridui-u-button--self-stretch {
82
+ align-self: stretch;
83
+ }
84
+ .gridui-u-button--rounded-control {
85
+ border-radius: var(--gridui-control-radius);
86
+ }
87
+ .gridui-u-button--rounded-none {
88
+ border-radius: 0;
89
+ }
90
+ .gridui-u-button--border-0 {
91
+ border-style: var(--tw-border-style);
92
+ border-width: 0px;
93
+ }
94
+ .gridui-u-button--border-b {
95
+ border-bottom-style: var(--tw-border-style);
96
+ border-bottom-width: 1px;
97
+ }
98
+ .gridui-u-button--border-accent-background {
99
+ border-color: var(--gridui-accent-background);
100
+ }
101
+ .gridui-u-button--border-control-border {
102
+ border-color: var(--gridui-control-border);
103
+ }
104
+ .gridui-u-button--border-foreground {
105
+ border-color: var(--gridui-foreground);
106
+ }
107
+ .gridui-u-button--bg-accent-background {
108
+ background-color: var(--gridui-accent-background);
109
+ }
110
+ .gridui-u-button--bg-selection-background {
111
+ background-color: var(--gridui-selection-background);
112
+ }
113
+ .gridui-u-button--bg-transparent {
114
+ background-color: transparent;
115
+ }
116
+ .gridui-u-button--p-0 {
117
+ padding: 0px;
118
+ }
119
+ .gridui-u-button--px-0 {
120
+ padding-inline: 0px;
121
+ }
122
+ .gridui-u-button--px-gridui-8 {
123
+ padding-inline: var(--gridui-space-8);
124
+ }
125
+ .gridui-u-button--px-gridui-16 {
126
+ padding-inline: var(--gridui-space-16);
127
+ }
128
+ .gridui-u-button--px-gridui-24 {
129
+ padding-inline: var(--gridui-space-24);
130
+ }
131
+ .gridui-u-button--py-gridui-4 {
132
+ padding-block: var(--gridui-space-4);
133
+ }
134
+ .gridui-u-button--py-gridui-8 {
135
+ padding-block: var(--gridui-space-8);
136
+ }
137
+ .gridui-u-button--py-gridui-16 {
138
+ padding-block: var(--gridui-space-16);
139
+ }
140
+ .gridui-u-button--text-center {
141
+ text-align: center;
142
+ }
143
+ .gridui-u-button--text-left {
144
+ text-align: left;
145
+ }
146
+ .gridui-u-button--text-start {
147
+ text-align: start;
148
+ }
149
+ .gridui-u-button--type-supporting {
150
+ font: var(--gridui-type-supporting);
151
+ font-family: var(--gridui-font-body);
152
+ letter-spacing: normal;
153
+ }
154
+ .gridui-u-button--type-ui {
155
+ font: var(--gridui-type-ui);
156
+ font-family: var(--gridui-font-body);
157
+ letter-spacing: normal;
158
+ }
159
+ .gridui-u-button--wrap-anywhere {
160
+ overflow-wrap: anywhere;
161
+ }
162
+ .gridui-u-button--text-accent-foreground {
163
+ color: var(--gridui-accent-foreground);
164
+ }
165
+ .gridui-u-button--text-foreground {
166
+ color: var(--gridui-foreground);
167
+ }
168
+ .gridui-u-button--no-underline {
169
+ text-decoration-line: none;
170
+ }
171
+ .gridui-u-button--\[transition-property\:var\(--gridui-motion-transition\,color\,background-color\,border-color\,text-decoration-color\,fill\,stroke\)\] {
172
+ transition-property: var(--gridui-motion-transition,color,background-color,border-color,text-decoration-color,fill,stroke);
173
+ }
174
+ .gridui-u-button--duration-\[calc\(var\(--gridui-motion-duration-quick\)\*var\(--gridui-motion-factor\,1\)\)\] {
175
+ --tw-duration: calc(var(--gridui-motion-duration-quick) * var(--gridui-motion-factor,1));
176
+ transition-duration: calc(var(--gridui-motion-duration-quick) * var(--gridui-motion-factor,1));
177
+ }
178
+ .gridui-u-button--ease-\(--gridui-motion-ease-out\) {
179
+ --tw-ease: var(--gridui-motion-ease-out);
180
+ transition-timing-function: var(--gridui-motion-ease-out);
181
+ }
182
+ .gridui-u-button--\[--gridui-button-icon-size\:var\(--gridui-icon-size\)\] {
183
+ --gridui-button-icon-size: var(--gridui-icon-size);
184
+ }
185
+ .gridui-u-button--\[--gridui-button-icon-size\:var\(--gridui-icon-size-large\)\] {
186
+ --gridui-button-icon-size: var(--gridui-icon-size-large);
187
+ }
188
+ .gridui-u-button--\[--gridui-button-icon-size\:var\(--gridui-space-32\)\] {
189
+ --gridui-button-icon-size: var(--gridui-space-32);
190
+ }
191
+ .gridui-u-button--\[--gridui-button-icon-size\:var\(--gridui-space-48\)\] {
192
+ --gridui-button-icon-size: var(--gridui-space-48);
193
+ }
194
+ @media (hover: hover) {
195
+ .gridui-u-button--not-disabled\:not-aria-disabled\:not-data-disabled\:hover\:bg-accent-hover:not(:disabled):not([aria-disabled="true"]):not([data-disabled]):hover {
196
+ background-color: var(--gridui-accent-hover);
197
+ }
198
+ }
199
+ .gridui-u-button--not-disabled\:not-aria-disabled\:not-data-disabled\:active\:bg-accent-pressed:not(:disabled):not([aria-disabled="true"]):not([data-disabled]):active {
200
+ background-color: var(--gridui-accent-pressed);
201
+ }
202
+ .gridui-u-button--not-disabled\:not-aria-disabled\:not-data-disabled\:active\:bg-surface-pressed:not(:disabled):not([aria-disabled="true"]):not([data-disabled]):active {
203
+ background-color: var(--gridui-surface-pressed);
204
+ }
205
+ .gridui-u-button--disabled\:cursor-not-allowed:disabled {
206
+ cursor: not-allowed;
207
+ }
208
+ .gridui-u-button--aria-disabled\:cursor-not-allowed[aria-disabled="true"] {
209
+ cursor: not-allowed;
210
+ }
211
+ .gridui-u-button--data-disabled\:cursor-not-allowed[data-disabled] {
212
+ cursor: not-allowed;
213
+ }
214
+ .gridui-u-button--data-gridui-busy\:cursor-wait[data-gridui-busy] {
215
+ cursor: wait;
216
+ }
217
+ @media (prefers-reduced-motion: reduce) {
218
+ .gridui-u-button--motion-reduce\:transition-none {
219
+ transition-property: none;
220
+ }
221
+ }
222
+ .gridui-u-button--\[\&_\>_span\]\:whitespace-nowrap > span {
223
+ white-space: nowrap;
224
+ }
225
+ .gridui-u-button--\[\&_\>_span\]\:\[writing-mode\:vertical-rl\] > span {
226
+ writing-mode: vertical-rl;
227
+ }
228
+ .gridui-u-button--\[\&_svg\]\:pointer-events-none svg {
229
+ pointer-events: none;
230
+ }
231
+ .gridui-u-button--\[\&_svg\]\:h-\(--gridui-button-icon-size\) svg {
232
+ height: var(--gridui-button-icon-size);
233
+ }
234
+ .gridui-u-button--\[\&_svg\]\:w-\(--gridui-button-icon-size\) svg {
235
+ width: var(--gridui-button-icon-size);
236
+ }
237
+ .gridui-u-button--\[\&_svg\]\:shrink-0 svg {
238
+ flex-shrink: 0;
239
+ }
240
+ }
241
+ @layer components {
242
+ .gridui-button {
243
+ min-height: var(--_gridui-button-min);
244
+ border: 1px solid transparent;
245
+ }
246
+ .gridui-button-cell {
247
+ border: 0;
248
+ }
249
+ .gridui-button-label-content {
250
+ display: inline-flex;
251
+ min-width: 0;
252
+ flex-direction: inherit;
253
+ align-items: inherit;
254
+ justify-content: inherit;
255
+ gap: inherit;
256
+ }
257
+ .gridui-button-body {
258
+ display: inline-flex;
259
+ flex: 1;
260
+ min-width: 0;
261
+ flex-direction: inherit;
262
+ align-items: inherit;
263
+ justify-content: inherit;
264
+ gap: inherit;
265
+ }
266
+ .gridui-button:is(:disabled, [aria-disabled="true"]:not([data-gridui-busy]), [data-disabled]) > .gridui-button-content, .gridui-button:is(:disabled, [aria-disabled="true"]:not([data-gridui-busy]), [data-disabled]) > .gridui-button-start-region > .gridui-button-content, .gridui-button:is(:disabled, [aria-disabled="true"]:not([data-gridui-busy]), [data-disabled]) > .gridui-button-end-region > .gridui-button-content {
267
+ opacity: 0.5;
268
+ }
269
+ .gridui-button-start-region {
270
+ min-width: calc(var(--gridui-button-icon-size) + var(--gridui-space-16));
271
+ border-inline-end: 1px solid;
272
+ border-color: inherit;
273
+ }
274
+ .gridui-button-end-region {
275
+ border-inline-start: 1px solid;
276
+ border-color: inherit;
277
+ }
278
+ @media (prefers-reduced-motion: no-preference) {
279
+ .gridui-button-icon-motion-outward:not(:disabled, [aria-disabled="true"]:not([data-gridui-busy]), [data-disabled], [aria-readonly="true"], [data-readonly], [readonly]) .gridui-button-end-icon {
280
+ transition: var(--gridui-motion-transition, transform calc(var(--gridui-motion-duration-quick) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-out));
281
+ }
282
+ .gridui-button-icon-motion-outward:not(:disabled, [aria-disabled="true"]:not([data-gridui-busy]), [data-disabled], [aria-readonly="true"], [data-readonly], [readonly]):hover .gridui-button-end-icon {
283
+ transform: var(--gridui-motion-transform, translate(var(--gridui-space-4), calc(-1 * var(--gridui-space-4))));
284
+ }
285
+ .gridui-button-icon-motion-outward:not(:disabled, [aria-disabled="true"]:not([data-gridui-busy]), [data-disabled], [aria-readonly="true"], [data-readonly], [readonly]):dir(rtl):hover .gridui-button-end-icon {
286
+ transform: var(--gridui-motion-transform, translate(calc(-1 * var(--gridui-space-4)), calc(-1 * var(--gridui-space-4))));
287
+ }
288
+ }
289
+ .gridui-button-medium {
290
+ --_gridui-button-min: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
291
+ padding-block: var(--gridui-space-8);
292
+ padding-inline: var(--gridui-space-16);
293
+ }
294
+ .gridui-button-small {
295
+ --_gridui-button-min: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
296
+ padding-block: var(--gridui-space-4);
297
+ padding-inline: var(--gridui-space-8);
298
+ }
299
+ .gridui-button-large {
300
+ --_gridui-button-min: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
301
+ padding-block: var(--gridui-space-8);
302
+ padding-inline: var(--gridui-space-24);
303
+ }
304
+ .gridui-button-extra-large {
305
+ --_gridui-button-min: max(var(--gridui-control-min-height-extra-large), var(--gridui-target-min-size));
306
+ padding-block: var(--gridui-space-16);
307
+ padding-inline: var(--gridui-space-24);
308
+ }
309
+ .gridui-button-group {
310
+ container: gridui-button-group / inline-size;
311
+ min-width: 0;
312
+ }
313
+ .gridui-button-group-items {
314
+ display: grid;
315
+ grid-auto-flow: column;
316
+ grid-auto-columns: minmax(0, 1fr);
317
+ align-items: stretch;
318
+ }
319
+ .gridui-button-group-items[data-layout="standard"] {
320
+ gap: var(--gridui-space-8);
321
+ }
322
+ .gridui-button-group-items[data-layout="cells"] > [data-gridui-button-group-item]:not([hidden]) ~ [data-gridui-button-group-item]:not([hidden])::before {
323
+ position: absolute;
324
+ inset-block: 0;
325
+ inset-inline-start: 0;
326
+ width: 1px;
327
+ background: var(--gridui-button-group-border, var(--gridui-border));
328
+ pointer-events: none;
329
+ content: "";
330
+ }
331
+ @container gridui-button-group (max-width: 20rem) {
332
+ .gridui-button-group-items {
333
+ grid-auto-flow: row;
334
+ grid-auto-rows: 1fr;
335
+ }
336
+ .gridui-button-group-items[data-layout="cells"] > [data-gridui-button-group-item]:not([hidden]) ~ [data-gridui-button-group-item]:not([hidden])::before {
337
+ inset-block: 0 auto;
338
+ inset-inline: 0;
339
+ width: auto;
340
+ height: 1px;
341
+ }
342
+ }
343
+ }
344
+ @layer utilities {
345
+ .gridui-button-group-items > [data-gridui-button-group-item] {
346
+ position: relative;
347
+ width: 100%;
348
+ height: 100%;
349
+ min-width: 0;
350
+ }
351
+ .gridui-button-group-items[data-layout="cells"] > [data-gridui-button-group-item] {
352
+ padding-block: var(--gridui-button-group-padding-block, var(--_gridui-button-group-block, var(--gridui-space-8)));
353
+ border: 0;
354
+ border-radius: 0;
355
+ }
356
+ }
357
+ @layer components {
358
+ .gridui-button-group-items > [data-size="small"] {
359
+ --_gridui-button-group-block: var(--gridui-space-4);
360
+ }
361
+ .gridui-button-group-items > [data-size="extra-large"] {
362
+ --_gridui-button-group-block: var(--gridui-space-16);
363
+ }
364
+ }
365
+ @property --tw-border-style {
366
+ syntax: "*";
367
+ inherits: false;
368
+ initial-value: solid;
369
+ }
370
+ @property --tw-duration {
371
+ syntax: "*";
372
+ inherits: false;
373
+ }
374
+ @property --tw-ease {
375
+ syntax: "*";
376
+ inherits: false;
377
+ }
378
+ @layer properties {
379
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
380
+ *, ::before, ::after, ::backdrop {
381
+ --tw-border-style: solid;
382
+ --tw-duration: initial;
383
+ --tw-ease: initial;
384
+ }
385
+ }
386
+ }
387
+
388
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
389
+ @layer properties;
390
+ @layer theme, base, components, utilities;
391
+ @layer utilities {
392
+ .gridui-u-overlay--z-\(--gridui-z-popover\) {
393
+ z-index: var(--gridui-z-popover);
394
+ }
395
+ .gridui-u-overlay--flex {
396
+ display: flex;
397
+ }
398
+ .gridui-u-overlay--inline-flex {
399
+ display: inline-flex;
400
+ }
401
+ .gridui-u-overlay--size-gridui-16 {
402
+ width: var(--gridui-space-16);
403
+ height: var(--gridui-space-16);
404
+ }
405
+ .gridui-u-overlay--min-w-0 {
406
+ min-width: 0px;
407
+ }
408
+ .gridui-u-overlay--shrink-0 {
409
+ flex-shrink: 0;
410
+ }
411
+ .gridui-u-overlay--cursor-pointer {
412
+ cursor: pointer;
413
+ }
414
+ .gridui-u-overlay--items-center {
415
+ align-items: center;
416
+ }
417
+ .gridui-u-overlay--justify-center {
418
+ justify-content: center;
419
+ }
420
+ .gridui-u-overlay--gap-gridui-8 {
421
+ gap: var(--gridui-space-8);
422
+ }
423
+ .gridui-u-overlay--rounded-control {
424
+ border-radius: var(--gridui-control-radius);
425
+ }
426
+ .gridui-u-overlay--border {
427
+ border-style: var(--tw-border-style);
428
+ border-width: 1px;
429
+ }
430
+ .gridui-u-overlay--border-solid {
431
+ --tw-border-style: solid;
432
+ border-style: solid;
433
+ }
434
+ .gridui-u-overlay--border-border {
435
+ border-color: var(--gridui-border);
436
+ }
437
+ .gridui-u-overlay--bg-background {
438
+ background-color: var(--gridui-background);
439
+ }
440
+ .gridui-u-overlay--p-0 {
441
+ padding: 0px;
442
+ }
443
+ .gridui-u-overlay--px-gridui-8 {
444
+ padding-inline: var(--gridui-space-8);
445
+ }
446
+ .gridui-u-overlay--type-data {
447
+ font: var(--gridui-type-data);
448
+ font-family: var(--gridui-font-body);
449
+ letter-spacing: normal;
450
+ font-variant-numeric: tabular-nums;
451
+ }
452
+ .gridui-u-overlay--type-caption {
453
+ font: var(--gridui-type-caption);
454
+ font-family: var(--gridui-font-body);
455
+ letter-spacing: normal;
456
+ }
457
+ .gridui-u-overlay--wrap-anywhere {
458
+ overflow-wrap: anywhere;
459
+ }
460
+ .gridui-u-overlay--whitespace-normal {
461
+ white-space: normal;
462
+ }
463
+ .gridui-u-overlay--text-foreground {
464
+ color: var(--gridui-foreground);
465
+ }
466
+ .gridui-u-overlay--text-inherit {
467
+ color: inherit;
468
+ }
469
+ .gridui-u-overlay--text-muted {
470
+ color: var(--gridui-muted);
471
+ }
472
+ .gridui-u-overlay--no-underline {
473
+ text-decoration-line: none;
474
+ }
475
+ .gridui-u-overlay--aria-selected\:bg-selection-background[aria-selected="true"] {
476
+ background-color: var(--gridui-selection-background);
477
+ }
478
+ .gridui-u-overlay--aria-\[current\=page\]\:bg-selection-background[aria-current="page"] {
479
+ background-color: var(--gridui-selection-background);
480
+ }
481
+ .gridui-u-overlay--data-disabled\:pointer-events-none[data-disabled] {
482
+ pointer-events: none;
483
+ }
484
+ .gridui-u-overlay--data-disabled\:opacity-50[data-disabled] {
485
+ opacity: 50%;
486
+ }
487
+ .gridui-u-overlay--data-\[state\=checked\]\:bg-selection-background[data-state="checked"] {
488
+ background-color: var(--gridui-selection-background);
489
+ }
490
+ }
491
+ @layer components {
492
+ .gridui-overlay-surface {
493
+ --gridui-surface-offset-x: 0px;
494
+ --gridui-surface-offset-y: 0px;
495
+ --gridui-overlay-enter-duration: var(--gridui-motion-duration-normal);
496
+ --gridui-overlay-fill-mode: both;
497
+ transform-origin: var(--gridui-overlay-origin, center);
498
+ }
499
+ .gridui-overlay-dialog {
500
+ --gridui-overlay-fill-mode: none;
501
+ transform-origin: center;
502
+ }
503
+ .gridui-overlay-tooltip {
504
+ --gridui-overlay-enter-duration: var(--gridui-motion-duration-quick);
505
+ }
506
+ .gridui-overlay-floating[data-side="bottom"] {
507
+ --gridui-surface-offset-y: calc(-1 * var(--gridui-motion-distance));
508
+ }
509
+ .gridui-overlay-floating[data-side="top"] {
510
+ --gridui-surface-offset-y: var(--gridui-motion-distance);
511
+ }
512
+ .gridui-overlay-floating[data-side="left"] {
513
+ --gridui-surface-offset-x: var(--gridui-motion-distance);
514
+ }
515
+ .gridui-overlay-floating[data-side="right"] {
516
+ --gridui-surface-offset-x: calc(-1 * var(--gridui-motion-distance));
517
+ }
518
+ .gridui-overlay-surface[data-state="closed"] {
519
+ pointer-events: none;
520
+ }
521
+ .gridui-overlay-surface:not([data-side="none"]):is([data-state="open"], [data-state="delayed-open"], [data-state="instant-open"]) {
522
+ animation: var(--gridui-motion-animation, gridui-surface-enter calc(var(--gridui-overlay-enter-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-out) var(--gridui-overlay-fill-mode));
523
+ }
524
+ .gridui-overlay-surface:not([data-side="none"])[data-state="closed"] {
525
+ animation: var(--gridui-motion-animation, gridui-surface-exit calc(var(--gridui-motion-duration-quick) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-in) var(--gridui-overlay-fill-mode));
526
+ }
527
+ .gridui-overlay-backdrop {
528
+ background: var(--gridui-backdrop);
529
+ @supports (color: color-mix(in lab, red, red)) {
530
+ background: color-mix(in srgb, var(--gridui-backdrop) var(--gridui-backdrop-opacity), transparent);
531
+ }
532
+ --gridui-overlay-enter-duration: var(--gridui-motion-duration-normal);
533
+ --gridui-overlay-exit-duration: var(--gridui-motion-duration-quick);
534
+ --gridui-overlay-fill-mode: none;
535
+ }
536
+ .gridui-overlay-backdrop-deliberate {
537
+ --gridui-overlay-enter-duration: var(--gridui-motion-duration-deliberate);
538
+ --gridui-overlay-exit-duration: var(--gridui-motion-duration-normal);
539
+ --gridui-overlay-fill-mode: both;
540
+ }
541
+ .gridui-overlay-backdrop[data-state="open"] {
542
+ animation: var(--gridui-motion-animation, gridui-fade-enter calc(var(--gridui-overlay-enter-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-out) var(--gridui-overlay-fill-mode));
543
+ }
544
+ .gridui-overlay-backdrop[data-state="closed"] {
545
+ animation: var(--gridui-motion-animation, gridui-fade-exit calc(var(--gridui-overlay-exit-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-in) var(--gridui-overlay-fill-mode));
546
+ }
547
+ @media (prefers-reduced-motion: reduce) {
548
+ .gridui-overlay-surface:not([data-side="none"])[data-state], .gridui-overlay-backdrop[data-state] {
549
+ animation: none;
550
+ }
551
+ }
552
+ .gridui-overlay-list {
553
+ --gridui-overlay-row-min: var(--gridui-control-min-height-medium);
554
+ --gridui-overlay-row-padding: var(--gridui-space-8);
555
+ }
556
+ .gridui-overlay-density-compact {
557
+ --gridui-overlay-row-min: var(--gridui-control-min-height-small);
558
+ --gridui-overlay-row-padding: var(--gridui-space-4);
559
+ }
560
+ .gridui-overlay-density-comfortable {
561
+ --gridui-overlay-row-min: var(--gridui-control-min-height-medium);
562
+ --gridui-overlay-row-padding: var(--gridui-space-8);
563
+ }
564
+ .gridui-overlay-list-item {
565
+ min-block-size: max(var(--gridui-overlay-row-min, var(--gridui-control-min-height-medium)), var(--gridui-target-min-size));
566
+ padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
567
+ }
568
+ .gridui-overlay-list-label {
569
+ padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
570
+ }
571
+ }
572
+ @property --tw-border-style {
573
+ syntax: "*";
574
+ inherits: false;
575
+ initial-value: solid;
576
+ }
577
+ @layer properties {
578
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
579
+ *, ::before, ::after, ::backdrop {
580
+ --tw-border-style: solid;
581
+ }
582
+ }
583
+ }
584
+
1
585
  /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
586
  @layer theme, base, components, utilities;
3
587
  @layer theme {
@@ -0,0 +1,49 @@
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
+ @layer theme, base, components, utilities;
3
+ @layer theme {
4
+ :root, :host {
5
+ --container-3xl: 48rem;
6
+ }
7
+ }
8
+ @layer utilities {
9
+ .gridui-u-popover--z-\(--gridui-z-popover\) {
10
+ z-index: var(--gridui-z-popover);
11
+ }
12
+ .gridui-u-popover--box-border {
13
+ box-sizing: border-box;
14
+ }
15
+ .gridui-u-popover--max-h-\(--radix-popover-content-available-height\) {
16
+ max-height: var(--radix-popover-content-available-height);
17
+ }
18
+ .gridui-u-popover--w-3xl {
19
+ width: var(--container-3xl);
20
+ }
21
+ .gridui-u-popover--max-w-\[min\(calc\(100vw-2\*var\(--gridui-page-gutter\)\)\,var\(--radix-popover-content-available-width\)\)\] {
22
+ max-width: min(calc(100vw - 2 * var(--gridui-page-gutter)), var(--radix-popover-content-available-width));
23
+ }
24
+ .gridui-u-popover--overflow-y-auto {
25
+ overflow-y: auto;
26
+ }
27
+ .gridui-u-popover--overscroll-contain {
28
+ overscroll-behavior: contain;
29
+ }
30
+ .gridui-u-popover--rounded-control {
31
+ border-radius: var(--gridui-control-radius);
32
+ }
33
+ .gridui-u-popover--p-gridui-24 {
34
+ padding: var(--gridui-space-24);
35
+ }
36
+ .gridui-u-popover--type-supporting {
37
+ font: var(--gridui-type-supporting);
38
+ font-family: var(--gridui-font-body);
39
+ letter-spacing: normal;
40
+ }
41
+ .gridui-u-popover--data-\[state\=open\]\:bg-surface[data-state="open"] {
42
+ background-color: var(--gridui-surface);
43
+ }
44
+ }
45
+ @layer components {
46
+ .gridui-menu-panel {
47
+ --gridui-overlay-origin: var(--radix-popover-content-transform-origin);
48
+ }
49
+ }
package/docs/catalog.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/popover",
4
- "version": "1.2.0",
5
- "category": "core",
4
+ "version": "2.0.0",
5
+ "category": "overlays",
6
6
  "description": "GridUI React popover",
7
- "usage": "Surface motion uses `@gridui/overlay`; load `@gridui/overlay/styles.css` after Theme and before this family.",
7
+ "usage": "Surface motion uses `@gridui/overlay`; its styles are included.",
8
8
  "documentation": [
9
9
  "README.md",
10
10
  "docs/reference/README.md",
@@ -72,10 +72,11 @@
72
72
  "@gridui/overlay/styles.css",
73
73
  "@gridui/popover/styles.css"
74
74
  ],
75
+ "styledImport": "@gridui/popover/styled",
75
76
  "examples": [
76
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/stories/contextual-panels.mdx",
77
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/stories/getting-started.mdx",
78
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/stories/hover-panels.mdx",
79
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/stories/popover.stories.tsx"
77
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/stories/contextual-panels.mdx",
78
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/stories/getting-started.mdx",
79
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/stories/hover-panels.mdx",
80
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/stories/popover.stories.tsx"
80
81
  ]
81
82
  }
@@ -11,7 +11,7 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/popover/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
16
  ## API
17
17
 
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/popover/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/stories/popover.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/stories/popover.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
@@ -1,7 +1,7 @@
1
1
  <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
2
  # PopoverPanel
3
3
 
4
- Compose PopoverPanel with Popover inside the same @gridui/popover component family.
4
+ Compose PopoverPanel with ResponsiveNavigationMenu inside the same @gridui/popover component family.
5
5
 
6
6
  Import from ``@gridui/popover`` and load Theme before this family's stylesheet.
7
7
 
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/popover/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/stories/popover.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/responsive-navigation/stories/navigation-menu.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
@@ -167,3 +167,11 @@ Default: ``16``
167
167
 
168
168
  ``("always" | "optimized") | undefined`` · Optional
169
169
 
170
+ ### width
171
+
172
+ ``Property.Width<string | number> | undefined`` · Optional
173
+
174
+ ### container
175
+
176
+ ``Element | DocumentFragment | null | undefined`` · Optional
177
+
@@ -1,7 +1,7 @@
1
1
  <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
2
  # PopoverTrigger
3
3
 
4
- Compose PopoverTrigger with Popover inside the same @gridui/popover component family.
4
+ Compose PopoverTrigger with ResponsiveNavigationMenu inside the same @gridui/popover component family.
5
5
 
6
6
  Import from ``@gridui/popover`` and load Theme before this family's stylesheet.
7
7
 
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/popover/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/stories/popover.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/responsive-navigation/stories/navigation-menu.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
@@ -55,17 +55,15 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
55
55
 
56
56
  Called when the corresponding interaction occurs; inspect the arguments in Actions.
57
57
 
58
- ### size
59
-
60
- ``"small" | "standard" | "large" | "extra-large" | null | undefined`` · Optional
58
+ ### iconMotion
61
59
 
62
- Default: ``"small"``
60
+ ``"none" | "outward" | null | undefined`` · Optional
63
61
 
64
- Component size preset.
62
+ ### size
65
63
 
66
- ### iconMotion
64
+ ``ActionSize | undefined`` · Optional
67
65
 
68
- ``"none" | "outward" | null | undefined`` · Optional
66
+ Component size preset.
69
67
 
70
68
  ### variant
71
69
 
@@ -89,7 +87,7 @@ Layout within the containing region.
89
87
 
90
88
  ### startIconSize
91
89
 
92
- ``"standard" | "large" | "extra-large" | undefined`` · Optional
90
+ ``"medium" | "large" | "extra-large" | undefined`` · Optional
93
91
 
94
92
  ### endIcon
95
93
 
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/popover/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/popover/stories/popover.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-overlays/popover/stories/popover.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/popover",
3
- "version": "1.2.0",
3
+ "version": "2.0.0",
4
4
  "description": "GridUI React popover",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -10,14 +10,19 @@
10
10
  "docs"
11
11
  ],
12
12
  "sideEffects": [
13
- "**/*.css"
13
+ "**/*.css",
14
+ "./dist/styled.js"
14
15
  ],
15
16
  "exports": {
16
17
  ".": {
17
18
  "types": "./dist/index.d.ts",
18
19
  "import": "./dist/index.js"
19
20
  },
20
- "./styles.css": "./dist/styles.css"
21
+ "./styles.css": "./dist/styles.css",
22
+ "./styled": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/styled.js"
25
+ }
21
26
  },
22
27
  "publishConfig": {
23
28
  "access": "public"
@@ -27,13 +32,13 @@
27
32
  "react-dom": "^19.2.0"
28
33
  },
29
34
  "dependencies": {
30
- "@gridui/button": "^5.1.0",
31
- "@gridui/overlay": "^2.3.0",
32
- "@gridui/style-utils": "^4.0.0",
33
- "@gridui/theme": "^3.0.0",
35
+ "@gridui/button": "^6.0.0",
36
+ "@gridui/motion": "^1.0.3",
37
+ "@gridui/overlay": "^2.5.0",
38
+ "@gridui/style-utils": "^4.1.0",
39
+ "@gridui/theme": "^5.0.0",
34
40
  "@radix-ui/react-popover": "1.3.1",
35
- "class-variance-authority": "0.7.1",
36
- "@gridui/motion": "^1.0.1"
41
+ "class-variance-authority": "0.7.1"
37
42
  },
38
43
  "devDependencies": {
39
44
  "@gridui-internal/configuration": "0.0.0-internal",