@sanity/ui 4.0.0-next.5 → 4.0.0-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/{arrow-BG0EMNiC.js → arrow-BaxgKzOL.js} +8 -6
  2. package/dist/{arrow-BG0EMNiC.js.map → arrow-BaxgKzOL.js.map} +1 -1
  3. package/dist/autocomplete.d.ts +4 -4
  4. package/dist/autocomplete.d.ts.map +1 -1
  5. package/dist/autocomplete.js +18 -11
  6. package/dist/autocomplete.js.map +1 -1
  7. package/dist/breadcrumbs.d.ts +1 -1
  8. package/dist/breadcrumbs.d.ts.map +1 -1
  9. package/dist/breadcrumbs.js +8 -4
  10. package/dist/breadcrumbs.js.map +1 -1
  11. package/dist/{button-DZkAQOL2.js → button-BDLRd1Rr.js} +3 -3
  12. package/dist/button-BDLRd1Rr.js.map +1 -0
  13. package/dist/{button-BzoZs3Sl.d.ts → button-dnqMFkWg.d.ts} +2 -2
  14. package/dist/{button-BzoZs3Sl.d.ts.map → button-dnqMFkWg.d.ts.map} +1 -1
  15. package/dist/{hotkeys-B08HIKNu.js → hotkeys-aHdaZFAl.js} +11 -5
  16. package/dist/{hotkeys-B08HIKNu.js.map → hotkeys-aHdaZFAl.js.map} +1 -1
  17. package/dist/index.d.ts +28 -28
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +172 -73
  20. package/dist/index.js.map +1 -1
  21. package/dist/{layer-BQfdK7rt.d.ts → layer-ChlP9Ik6.d.ts} +2 -2
  22. package/dist/{layer-BQfdK7rt.d.ts.map → layer-ChlP9Ik6.d.ts.map} +1 -1
  23. package/dist/{layer-BdkSGATt.js → layer-DeCVQfUb.js} +10 -5
  24. package/dist/layer-DeCVQfUb.js.map +1 -0
  25. package/dist/menu.d.ts +4 -4
  26. package/dist/menu.d.ts.map +1 -1
  27. package/dist/menu.js +18 -6
  28. package/dist/menu.js.map +1 -1
  29. package/dist/{popover-DmmmSNzL.d.ts → popover-CMlQeKn0.d.ts} +3 -3
  30. package/dist/{popover-DmmmSNzL.d.ts.map → popover-CMlQeKn0.d.ts.map} +1 -1
  31. package/dist/{popover-Iy6EZEmv.js → popover-DfXz9lUl.js} +19 -8
  32. package/dist/popover-DfXz9lUl.js.map +1 -0
  33. package/dist/popover.d.ts +1 -1
  34. package/dist/popover.js +1 -1
  35. package/dist/styles.css +28 -1
  36. package/dist/styles.d.ts +3 -0
  37. package/dist/styles.d.ts.map +1 -0
  38. package/dist/styles.js +4 -0
  39. package/dist/styles.js.map +1 -0
  40. package/dist/{textInput-IbiDH7Jc.js → textInput-DhCo-b3N.js} +24 -18
  41. package/dist/{textInput-IbiDH7Jc.js.map → textInput-DhCo-b3N.js.map} +1 -1
  42. package/dist/toast.js +1 -1
  43. package/dist/tooltip.d.ts +2 -2
  44. package/dist/tooltip.d.ts.map +1 -1
  45. package/dist/tooltip.js +22 -8
  46. package/dist/tooltip.js.map +1 -1
  47. package/package.json +5 -2
  48. package/dist/button-DZkAQOL2.js.map +0 -1
  49. package/dist/layer-BdkSGATt.js.map +0 -1
  50. package/dist/popover-Iy6EZEmv.js.map +0 -1
@@ -3,7 +3,7 @@ import { _ as useTheme_v2, i as usePrefersReducedMotion, n as LayerProvider, o a
3
3
  import { t as Flex } from "./flex-BYRpBTOc.js";
4
4
  import { t as useElementSize } from "./useElementSize-BJvbGHq8.js";
5
5
  import { n as AnimateActivity, r as origin, t as getElementRef } from "./getElementRef-5HZQ-Owu.js";
6
- import { a as useBoundaryElement, n as Portal, t as Arrow } from "./arrow-BG0EMNiC.js";
6
+ import { a as useBoundaryElement, n as Portal, t as Arrow } from "./arrow-BaxgKzOL.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import { Activity, cloneElement, useEffect, useImperativeHandle, useRef, useState } from "react";
9
9
  import { styled } from "styled-components";
@@ -107,11 +107,15 @@ function calcMaxWidth(params) {
107
107
  }
108
108
  const MotionCard = styled(motion.create(Card)).withConfig({
109
109
  displayName: "MotionCard",
110
- componentId: "sc-go15t4-0"
110
+ componentId: "sc-huutzt-0"
111
111
  })`&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;`, MotionFlex = styled(motion.create(Flex)).withConfig({
112
112
  displayName: "MotionFlex",
113
- componentId: "sc-go15t4-1"
114
- })`will-change:opacity;`, PopoverCard = function PopoverCard(props) {
113
+ componentId: "sc-huutzt-1"
114
+ })`will-change:opacity;`;
115
+ /**
116
+ * @internal
117
+ */
118
+ function PopoverCard(props) {
115
119
  let $ = c(67), animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, ref, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
116
120
  $[0] === props ? (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], ref = $[14], restProps = $[15], scheme = $[16], shadow = $[17], strategy = $[18], style = $[19], tone = $[20], width = $[21], xProp = $[22], yProp = $[23]) : ({__unstable_margins: marginsProp, animate, arrow, arrowRef, arrowX, arrowY, children, padding, placement, originX, originY, overflow, radius, ref, scheme, shadow, strategy, style, tone, width, x: xProp, y: yProp, ...restProps} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = ref, $[15] = restProps, $[16] = scheme, $[17] = shadow, $[18] = strategy, $[19] = style, $[20] = tone, $[21] = width, $[22] = xProp, $[23] = yProp);
117
121
  let { zIndex } = useLayer(), margins = marginsProp || DEFAULT_POPOVER_MARGINS, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], t0 = animate ? "transform" : void 0, t1;
@@ -183,7 +187,8 @@ const MotionCard = styled(motion.create(Card)).withConfig({
183
187
  exit: t8,
184
188
  children: [t10, t11]
185
189
  }), $[53] = placement, $[54] = radius, $[55] = ref, $[56] = rootStyle, $[57] = scheme, $[58] = shadow, $[59] = t10, $[60] = t11, $[61] = t5, $[62] = t6, $[63] = t7, $[64] = t8, $[65] = tone, $[66] = t12) : t12 = $[66], t12;
186
- }, ViewportOverlay = () => {
190
+ }
191
+ const ViewportOverlay = () => {
187
192
  let $ = c(2), { zIndex } = useLayer(), t0;
188
193
  return $[0] === zIndex ? t0 = $[1] : (t0 = /* @__PURE__ */ jsx("div", { style: {
189
194
  height: "100vh",
@@ -192,7 +197,13 @@ const MotionCard = styled(motion.create(Card)).withConfig({
192
197
  width: "100vw",
193
198
  zIndex
194
199
  } }), $[0] = zIndex, $[1] = t0), t0;
195
- }, Popover = function Popover(props) {
200
+ };
201
+ /**
202
+ * The `Popover` component is used to display some content on top of another.
203
+ *
204
+ * @public
205
+ */
206
+ function Popover(props) {
196
207
  let $ = c(126), { container, layer } = useTheme_v2(), boundaryElementContext = useBoundaryElement(), _fallbackPlacements, _floatingBoundary, _referenceBoundary, _zOffsetProp, childProp, content, disabled, forwardedRef, matchReferenceWidth, modal, open, paddingProp, portal, referenceElement, restProps, scheme, t0, t1, t10, t11, t2, t3, t4, t5, t6, t7, t8, t9, updateRef;
197
208
  if ($[0] !== props) {
198
209
  let { __unstable_margins: t12, animate: t13, arrow: t14, children: t15, constrainSize: t16, content: t17, disabled: t18, fallbackPlacements: t19, matchReferenceWidth: t20, floatingBoundary: t21, modal: t22, onActivate, open: t23, overflow: t24, padding: t25, placement: t26, placementStrategy: t27, portal: t28, preventOverflow: t29, radius: t30, ref: t31, referenceBoundary: t32, referenceElement: t33, scheme: t34, shadow: t35, tone: t36, width: t37, zOffset: t38, updateRef: t39, ...t40 } = props;
@@ -345,7 +356,7 @@ const MotionCard = styled(motion.create(Card)).withConfig({
345
356
  }), $[119] = animate, $[120] = open, $[121] = popoverNode, $[122] = t39) : t39 = $[122];
346
357
  let t40;
347
358
  return $[123] !== child || $[124] !== t39 ? (t40 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t39, child] }), $[123] = child, $[124] = t39, $[125] = t40) : t40 = $[125], t40;
348
- };
359
+ }
349
360
  function useMiddleware(t0) {
350
361
  let $ = c(42), { animate, arrowProp, arrowRef, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, maxWidthRef, placementProp, placementStrategy, preventOverflow, referenceBoundary, referenceWidthRef, rootBoundary, setReferenceWidth, widthRef } = t0, ret;
351
362
  if ($[0] !== animate || $[1] !== arrowProp || $[2] !== arrowRef || $[3] !== constrainSize || $[4] !== fallbackPlacements || $[5] !== floatingBoundary || $[6] !== margins || $[7] !== matchReferenceWidth || $[8] !== maxWidthRef || $[9] !== placementProp || $[10] !== placementStrategy || $[11] !== preventOverflow || $[12] !== referenceBoundary || $[13] !== referenceWidthRef || $[14] !== rootBoundary || $[15] !== setReferenceWidth || $[16] !== widthRef) {
@@ -403,4 +414,4 @@ function useMiddleware(t0) {
403
414
  }
404
415
  export { Popover as t };
405
416
 
406
- //# sourceMappingURL=popover-Iy6EZEmv.js.map
417
+ //# sourceMappingURL=popover-DfXz9lUl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover-DfXz9lUl.js","names":["Placement","PopoverMargins","DEFAULT_POPOVER_DISTANCE","DEFAULT_POPOVER_PADDING","DEFAULT_POPOVER_ARROW_WIDTH","DEFAULT_POPOVER_ARROW_HEIGHT","DEFAULT_POPOVER_ARROW_RADIUS","DEFAULT_POPOVER_MARGINS","DEFAULT_FALLBACK_PLACEMENTS","Record","detectOverflow","Middleware","PopoverMargins","size","options","boundaryElement","HTMLElement","constrainSize","margins","matchReferenceWidth","maxWidthRef","React","RefObject","padding","referenceWidthRef","setReferenceWidth","referenceWidth","widthRef","name","fn","args","elements","placement","platform","rects","floating","reference","overflow","altBoundary","boundary","undefined","elementContext","rootBoundary","maxWidth","Infinity","maxHeight","floatingW","width","floatingH","height","includes","left","right","top","bottom","availableWidth","availableHeight","current","style","Math","min","nextDimensions","getDimensions","targetH","targetW","reset","DEFAULT_POPOVER_PADDING","PopoverWidth","calcCurrentWidth","params","mediaIndex","container","width","w","currentWidth","undefined","length","calcMaxWidth","boundaryWidth","Math","min","Infinity","Strategy","motion","MotionProps","React","CSSProperties","useMemo","styled","ThemeColorSchemeKey","POPOVER_MOTION_PROPS","BoxOverflow","CardTone","Placement","PopoverMargins","Radius","Arrow","useLayer","Card","CardProps","Flex","DEFAULT_POPOVER_ARROW_HEIGHT","DEFAULT_POPOVER_ARROW_RADIUS","DEFAULT_POPOVER_ARROW_WIDTH","DEFAULT_POPOVER_MARGINS","MotionCard","create","MotionFlex","PopoverCard","props","$","_c","animate","arrow","arrowRef","arrowX","arrowY","children","marginsProp","originX","originY","overflow","padding","placement","radius","ref","restProps","scheme","shadow","strategy","style","tone","width","xProp","yProp","__unstable_margins","x","y","zIndex","margins","t0","undefined","t1","left","position","top","willChange","rootStyle","t2","t3","t4","right","bottom","arrowStyle","t5","t6","t7","t8","t9","t10","transition","t11","t12","card","arrow","autoPlacement","autoUpdate","flip","hide","Middleware","offset","RootBoundary","shift","useFloating","Activity","cloneElement","Ref","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","ThemeColorSchemeKey","useElementSize","useMediaIndex","usePrefersReducedMotion","origin","_getArrayProp","useTheme_v2","BoxOverflow","CardTone","Placement","PopoverMargins","AnimateActivity","useBoundaryElement","getElementRef","LayerProps","LayerProvider","useLayer","Portal","ResponsiveRadiusProps","ResponsiveShadowProps","DEFAULT_FALLBACK_PLACEMENTS","DEFAULT_POPOVER_DISTANCE","DEFAULT_POPOVER_MARGINS","DEFAULT_POPOVER_PADDING","size","calcCurrentWidth","calcMaxWidth","PopoverCard","PopoverUpdateCallback","PopoverWidth","PopoverProps","Omit","__unstable_margins","animate","boundaryElement","children","React","JSX","Element","constrainSize","content","ReactNode","disabled","fallbackPlacements","floatingBoundary","HTMLElement","matchReferenceWidth","modal","open","overflow","padding","placement","placementStrategy","portal","preventOverflow","referenceBoundary","referenceElement","scheme","tone","updateRef","width","ViewportOverlay","$","_c","zIndex","t0","height","inset","position","Popover","props","container","layer","boundaryElementContext","_fallbackPlacements","_floatingBoundary","_referenceBoundary","_zOffsetProp","childProp","forwardedRef","paddingProp","restProps","t1","t10","t11","t2","t3","t4","t5","t6","t7","t8","t9","t12","t13","t14","t15","t16","t17","t18","t19","t20","t21","t22","onActivate","t23","t24","t25","t26","t27","t28","t29","radius","t30","ref","t31","t32","t33","t34","shadow","t35","t36","t37","zOffset","t38","t39","t40","margins","undefined","_animate","arrowProp","placementProp","radiusProp","shadowProp","widthProp","element","zOffsetProp","popover","prefersReducedMotion","boundarySize","border","widthArrayProp","arrowRef","Symbol","for","current","mediaIndex","boundaryWidth","widthRef","currentWidth","maxWidth","maxWidthRef","referenceWidthRef","floatingElement","referenceWidth","style","referenceWidth_0","setReferenceWidth","rootBoundary","middleware","useMiddleware","reference","whileElementsMounted","elements","x","y","middlewareData","refs","strategy","update","referenceHidden","arrowX","arrowY","originX","originY","arrowEl","setArrow","node","setFloating","bb0","setReference","child","popoverNode","ret","allowedPlacements","concat","push","boundary","mainAxis"],"sources":["../src/core/primitives/popover/constants.ts","../src/core/primitives/popover/floating-ui/size.ts","../src/core/primitives/popover/helpers.ts","../src/core/primitives/popover/popoverCard.tsx","../src/core/primitives/popover/popover.tsx"],"sourcesContent":["import {Placement} from '../../types/placement'\nimport {PopoverMargins} from '../../types/popover'\n\nexport const DEFAULT_POPOVER_DISTANCE = 4\nexport const DEFAULT_POPOVER_PADDING = 4\nexport const DEFAULT_POPOVER_ARROW_WIDTH = 19\nexport const DEFAULT_POPOVER_ARROW_HEIGHT = 8\nexport const DEFAULT_POPOVER_ARROW_RADIUS = 2\nexport const DEFAULT_POPOVER_MARGINS: PopoverMargins = [0, 0, 0, 0]\nexport const DEFAULT_FALLBACK_PLACEMENTS: Record<Placement, Placement[]> = {\n 'top': ['bottom', 'left', 'right'],\n 'top-start': ['bottom-start', 'left-start', 'right-start'],\n 'top-end': ['bottom-end', 'left-end', 'right-end'],\n 'bottom': ['top', 'left', 'right'],\n 'bottom-start': ['top-start', 'left-start', 'right-start'],\n 'bottom-end': ['top-end', 'left-end', 'right-end'],\n 'left': ['right', 'top', 'bottom'],\n 'left-start': ['right-start', 'top-start', 'bottom-start'],\n 'left-end': ['right-end', 'top-end', 'bottom-end'],\n 'right': ['left', 'top', 'bottom'],\n 'right-start': ['left-start', 'top-start', 'bottom-start'],\n 'right-end': ['left-end', 'top-end', 'bottom-end'],\n}\n","import {detectOverflow, Middleware} from '@floating-ui/react-dom'\n\nimport {PopoverMargins} from '../../../types/popover'\n\nexport function size(options: {\n boundaryElement?: HTMLElement | null\n constrainSize: boolean\n margins: PopoverMargins\n matchReferenceWidth?: boolean\n maxWidthRef: React.RefObject<number | undefined>\n padding?: number\n referenceWidthRef: React.RefObject<number | undefined>\n setReferenceWidth: (referenceWidth: number) => void\n widthRef: React.RefObject<number | undefined>\n}): Middleware {\n const {\n constrainSize,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n padding = 0,\n referenceWidthRef,\n setReferenceWidth,\n widthRef,\n } = options\n\n return {\n name: '@sanity/ui/size',\n async fn(args) {\n const {elements, placement, platform, rects} = args\n const {floating, reference} = rects\n\n const overflow = await detectOverflow(args, {\n altBoundary: true,\n boundary: options.boundaryElement || undefined,\n elementContext: 'floating',\n padding,\n rootBoundary: 'viewport',\n })\n\n let maxWidth = Infinity\n let maxHeight = Infinity\n\n const floatingW = floating.width\n const floatingH = floating.height\n\n if (placement.includes('top')) {\n maxWidth = floatingW - (overflow.left + overflow.right)\n maxHeight = floatingH - overflow.top\n }\n\n if (placement.includes('right')) {\n maxWidth = floatingW - overflow.right\n maxHeight = floatingH - (overflow.top + overflow.bottom)\n }\n\n if (placement.includes('bottom')) {\n maxWidth = floatingW - (overflow.left + overflow.right)\n maxHeight = floatingH - overflow.bottom\n }\n\n if (placement.includes('left')) {\n maxWidth = floatingW - overflow.left\n maxHeight = floatingH - (overflow.top + overflow.bottom)\n }\n\n // IMPORTANT – APPLY ELEMENT STYLES HERE\n // Elements need to be resized BEFORE the `platform.getDimensions` call below\n const availableWidth = maxWidth - margins[1] - margins[3]\n const availableHeight = maxHeight - margins[0] - margins[2]\n const referenceWidth = reference.width - margins[1] - margins[3]\n referenceWidthRef.current = referenceWidth\n setReferenceWidth(referenceWidth)\n\n if (matchReferenceWidth) {\n elements.floating.style.width = `${referenceWidth}px`\n } else if (widthRef.current !== undefined) {\n elements.floating.style.width = `${widthRef.current}px`\n }\n\n if (constrainSize) {\n elements.floating.style.maxWidth = `${Math.min(availableWidth, maxWidthRef.current ?? Infinity)}px`\n\n elements.floating.style.maxHeight = `${availableHeight}px`\n }\n\n const nextDimensions = await platform.getDimensions(elements.floating)\n\n const targetH = nextDimensions.height\n const targetW = nextDimensions.width\n\n if (floatingW !== targetW || floatingH !== targetH) {\n return {reset: {rects: true}}\n }\n\n return {}\n },\n }\n}\n","import {DEFAULT_POPOVER_PADDING} from './constants'\nimport {PopoverWidth} from './types'\n\nexport function calcCurrentWidth(params: {\n mediaIndex: number\n container: number[]\n width: PopoverWidth[]\n}): number | undefined {\n const {container, mediaIndex, width} = params\n\n const w = width[mediaIndex]\n const currentWidth: PopoverWidth | undefined = w === undefined ? width[width.length - 1] : w\n\n return typeof currentWidth === 'number' ? container[currentWidth] : undefined\n}\n\nexport function calcMaxWidth(params: {\n boundaryWidth: number | undefined\n currentWidth: number | undefined\n}): number | undefined {\n const {boundaryWidth, currentWidth} = params\n\n if (currentWidth === undefined && boundaryWidth === undefined) {\n return undefined\n }\n\n return Math.min(\n currentWidth ?? Infinity,\n (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2,\n )\n}\n","import {Strategy} from '@floating-ui/react-dom'\nimport {motion, type MotionProps} from 'motion/react'\nimport React, {CSSProperties, useMemo} from 'react'\nimport {styled} from 'styled-components'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {POPOVER_MOTION_PROPS} from '../../constants'\nimport {BoxOverflow} from '../../types/box'\nimport {CardTone} from '../../types/card'\nimport {Placement} from '../../types/placement'\nimport {PopoverMargins} from '../../types/popover'\nimport {Radius} from '../../types/radius'\nimport {Arrow} from '../../utils/arrow/arrow'\nimport {useLayer} from '../../utils/layer/useLayer'\nimport {Card, CardProps} from '../card/card'\nimport {Flex} from '../flex/flex'\nimport {\n DEFAULT_POPOVER_ARROW_HEIGHT,\n DEFAULT_POPOVER_ARROW_RADIUS,\n DEFAULT_POPOVER_ARROW_WIDTH,\n DEFAULT_POPOVER_MARGINS,\n} from './constants'\n\nconst MotionCard = styled(motion.create(Card))`\n &:not([hidden]) {\n display: flex;\n }\n flex-direction: column;\n width: max-content;\n min-width: min-content;\n will-change: transform;\n`\n\nconst MotionFlex = styled(motion.create(Flex))`\n will-change: opacity;\n`\n\n/**\n * @internal\n */\nexport function PopoverCard(\n props: {\n /** @beta*/\n __unstable_margins?: PopoverMargins\n animate?: boolean\n arrow: boolean\n arrowRef: React.Ref<HTMLDivElement>\n arrowX?: number\n arrowY?: number\n originX?: number\n originY?: number\n overflow?: BoxOverflow\n padding?: number | number[]\n placement: Placement\n radius?: Radius | Radius[]\n scheme?: ThemeColorSchemeKey\n shadow?: number | number[]\n strategy: Strategy\n tone: CardTone\n width: number | undefined\n x: number | null\n y: number | null\n } & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'width'>,\n) {\n const {\n __unstable_margins: marginsProp,\n animate,\n arrow,\n arrowRef,\n arrowX,\n arrowY,\n children,\n padding,\n placement,\n originX,\n originY,\n overflow,\n radius,\n ref,\n scheme,\n shadow,\n strategy,\n style,\n tone,\n width,\n x: xProp,\n y: yProp,\n ...restProps\n } = props\n\n const {zIndex} = useLayer()\n\n // Get margins: [top, right, bottom, left]\n const margins: PopoverMargins = useMemo(\n () => marginsProp || DEFAULT_POPOVER_MARGINS,\n [marginsProp],\n )\n\n // Translate according to margins\n const x = (xProp ?? 0) + margins[3]\n const y = (yProp ?? 0) + margins[0]\n\n const rootStyle: CSSProperties = useMemo(\n () => ({\n left: x,\n originX,\n originY,\n position: strategy,\n top: y,\n width,\n zIndex,\n willChange: animate ? 'transform' : undefined,\n ...style,\n }),\n [animate, originX, originY, strategy, style, width, x, y, zIndex],\n )\n\n const arrowStyle: CSSProperties = useMemo(\n () => ({\n left: arrowX !== null ? arrowX : undefined,\n top: arrowY !== null ? arrowY : undefined,\n right: undefined,\n bottom: undefined,\n }),\n [arrowX, arrowY],\n )\n\n return (\n <MotionCard\n data-ui=\"Popover\"\n // oxlint-disable-next-line no-unsafe-type-assertion\n {...(restProps as CardProps & MotionProps)}\n data-placement={placement}\n radius={radius}\n ref={ref}\n scheme={scheme}\n shadow={shadow}\n sizing=\"border\"\n style={rootStyle}\n tone={tone}\n variants={POPOVER_MOTION_PROPS.card}\n transition={POPOVER_MOTION_PROPS.transition}\n initial={animate ? ['hidden', 'initial'] : undefined}\n animate={animate ? ['visible', 'scaleIn'] : undefined}\n exit={animate ? ['hidden', 'scaleOut'] : undefined}\n >\n <MotionFlex\n data-ui=\"Popover__wrapper\"\n direction=\"column\"\n flex={1}\n overflow={overflow}\n variants={POPOVER_MOTION_PROPS.children}\n transition={POPOVER_MOTION_PROPS.transition}\n >\n <Flex direction=\"column\" flex={1} padding={padding}>\n {children}\n </Flex>\n </MotionFlex>\n\n {arrow && (\n <Arrow\n ref={arrowRef}\n style={arrowStyle}\n width={DEFAULT_POPOVER_ARROW_WIDTH}\n height={DEFAULT_POPOVER_ARROW_HEIGHT}\n radius={DEFAULT_POPOVER_ARROW_RADIUS}\n />\n )}\n </MotionCard>\n )\n}\n","import {\n arrow,\n autoPlacement,\n autoUpdate,\n flip,\n hide,\n Middleware,\n offset,\n RootBoundary,\n shift,\n useFloating,\n} from '@floating-ui/react-dom'\nimport {\n Activity,\n cloneElement,\n type Ref,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {useElementSize} from '../../hooks/useElementSize'\nimport {useMediaIndex} from '../../hooks/useMediaIndex/useMediaIndex'\nimport {usePrefersReducedMotion} from '../../hooks/usePrefersReducedMotion'\nimport {origin} from '../../middleware/origin'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {useTheme_v2} from '../../theme/useTheme'\nimport {BoxOverflow} from '../../types/box'\nimport {CardTone} from '../../types/card'\nimport {Placement} from '../../types/placement'\nimport {PopoverMargins} from '../../types/popover'\nimport {AnimateActivity} from '../../utils/animateActivity'\nimport {useBoundaryElement} from '../../utils/boundaryElement/useBoundaryElement'\nimport {getElementRef} from '../../utils/getElementRef'\nimport {LayerProps} from '../../utils/layer/layer'\nimport {LayerProvider} from '../../utils/layer/layerProvider'\nimport {useLayer} from '../../utils/layer/useLayer'\nimport {Portal} from '../../utils/portal/portal'\nimport {ResponsiveRadiusProps, ResponsiveShadowProps} from '../types'\nimport {\n DEFAULT_FALLBACK_PLACEMENTS,\n DEFAULT_POPOVER_DISTANCE,\n DEFAULT_POPOVER_MARGINS,\n DEFAULT_POPOVER_PADDING,\n} from './constants'\nimport {size} from './floating-ui/size'\nimport {calcCurrentWidth, calcMaxWidth} from './helpers'\nimport {PopoverCard} from './popoverCard'\nimport {PopoverUpdateCallback, PopoverWidth} from './types'\n\n/** @public */\nexport interface PopoverProps\n extends Omit<LayerProps, 'as'>, ResponsiveRadiusProps, ResponsiveShadowProps {\n /** @beta */\n __unstable_margins?: PopoverMargins\n /**\n * Whether the popover should animate in and out.\n *\n * @beta\n * @defaultValue false\n */\n animate?: boolean\n arrow?: boolean\n /** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */\n boundaryElement?: never\n children?: React.JSX.Element\n /**\n * When `true`, prevent overflow within the current boundary:\n * - by flipping on its side axis\n * - by resizing\n /*\n * Note that:\n * - setting `preventOverflow` to `true` also prevents overflow on its side axis\n * - setting `matchReferenceWidth` to `true` also causes the popover to resize\n *\n * @defaultValue false\n */\n constrainSize?: boolean\n content?: React.ReactNode\n disabled?: boolean\n fallbackPlacements?: Placement[]\n floatingBoundary?: HTMLElement | null\n /**\n * When `true`, set the maximum width to match the reference element, and also prevent overflow within\n * the current boundary by resizing.\n *\n * Note that setting `constrainSize` to `true` also causes the popover to resize\n *\n * @defaultValue false\n */\n matchReferenceWidth?: boolean\n /**\n * When true, blocks all pointer interaction with elements beneath the popover until closed.\n *\n * @beta\n * @defaultValue false\n */\n modal?: boolean\n open?: boolean\n overflow?: BoxOverflow\n padding?: number | number[]\n placement?: Placement\n /**\n * When 'flip' (default), the placement is determined from the initial placement and the\n * fallback placements in order. Whichever fits in the viewport first.\n *\n * When 'autoPlacement', the initial placement and all fallback placements are evaluated\n * and the placement with the most viewport space available.\n *\n * Option is only relevant if either `constrainSize` or `preventOverflow` is `true`\n */\n placementStrategy?: 'flip' | 'autoPlacement'\n /** Whether or not to render the popover in a portal element. */\n portal?: boolean | string\n preventOverflow?: boolean\n referenceBoundary?: HTMLElement | null\n /**\n * When defined, the popover will be positioned relative to this element.\n * The children of the popover won't be rendered.\n */\n referenceElement?: HTMLElement | null\n scheme?: ThemeColorSchemeKey\n tone?: CardTone\n /** @beta */\n updateRef?: Ref<PopoverUpdateCallback | undefined>\n width?: PopoverWidth | PopoverWidth[]\n}\n\nconst ViewportOverlay = () => {\n const {zIndex} = useLayer()\n\n return <div style={{height: '100vh', inset: 0, position: 'fixed', width: '100vw', zIndex}} />\n}\n\n/**\n * The `Popover` component is used to display some content on top of another.\n *\n * @public\n */\nexport function Popover(\n props: PopoverProps &\n Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'width'>,\n): React.JSX.Element {\n const {container, layer} = useTheme_v2()\n const boundaryElementContext = useBoundaryElement()\n\n const {\n __unstable_margins: margins = DEFAULT_POPOVER_MARGINS,\n animate: _animate = false,\n arrow: arrowProp = false,\n children: childProp,\n constrainSize = false,\n content,\n disabled,\n fallbackPlacements: _fallbackPlacements,\n matchReferenceWidth,\n floatingBoundary: _floatingBoundary,\n modal,\n // oxlint-disable-next-line no-unused-vars\n onActivate,\n open,\n overflow = 'hidden',\n padding: paddingProp,\n placement: placementProp = 'bottom',\n placementStrategy = 'flip',\n portal,\n preventOverflow = true,\n radius: radiusProp = 3,\n ref: forwardedRef,\n referenceBoundary: _referenceBoundary,\n referenceElement,\n scheme,\n shadow: shadowProp = 3,\n tone = 'inherit',\n width: widthProp = 'auto',\n zOffset: _zOffsetProp,\n updateRef,\n ...restProps\n } = props\n const fallbackPlacements =\n _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? 'bottom']\n const floatingBoundary = _floatingBoundary ?? boundaryElementContext.element\n const referenceBoundary = _referenceBoundary ?? boundaryElementContext.element\n // Max-width uses BoundaryElementProvider when present; otherwise the floating\n // boundary (same element the old `boundaryElement` prop used for both).\n const boundaryElement = boundaryElementContext.element ?? floatingBoundary\n const zOffsetProp = _zOffsetProp ?? layer.popover.zOffset\n const prefersReducedMotion = usePrefersReducedMotion()\n const animate = prefersReducedMotion ? false : _animate\n const boundarySize = useElementSize(boundaryElement)?.border\n const padding = _getArrayProp(paddingProp)\n const radius = _getArrayProp(radiusProp)\n const shadow = _getArrayProp(shadowProp)\n const widthArrayProp = _getArrayProp(widthProp)\n const zOffset = _getArrayProp(zOffsetProp)\n const ref = useRef<HTMLDivElement | null>(null)\n const arrowRef = useRef<HTMLDivElement | null>(null)\n const rootBoundary: RootBoundary = 'viewport'\n\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current)\n\n const mediaIndex = useMediaIndex()\n const boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : undefined\n\n // Update width when\n // - media index changes\n // - `width` property changes\n const width = calcCurrentWidth({\n container,\n mediaIndex,\n width: widthArrayProp,\n })\n const widthRef = useRef(width)\n\n useEffect(() => {\n widthRef.current = width\n }, [width])\n\n // Update max width when\n // - boundary width changes\n // - `width` property changes\n const maxWidth = calcMaxWidth({boundaryWidth, currentWidth: width})\n const maxWidthRef = useRef(maxWidth)\n\n useEffect(() => {\n maxWidthRef.current = maxWidth\n }, [maxWidth])\n\n // Keep track of reference element width (see `size` middleware below)\n const referenceWidthRef = useRef<number>(undefined)\n\n // Force apply width & max width to floating element\n useEffect(() => {\n const floatingElement = ref.current\n\n if (!open || !floatingElement) return\n\n const referenceWidth = referenceWidthRef.current\n\n if (matchReferenceWidth) {\n if (referenceWidth !== undefined) {\n floatingElement.style.width = `${referenceWidth}px`\n }\n } else if (width !== undefined) {\n floatingElement.style.width = `${width}px`\n }\n\n if (typeof maxWidth === 'number') {\n floatingElement.style.maxWidth = `${maxWidth}px`\n }\n }, [width, matchReferenceWidth, maxWidth, open])\n\n const [referenceWidth, setReferenceWidth] = useState<number | undefined>(undefined)\n const middleware = useMiddleware({\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n })\n\n const {x, y, middlewareData, placement, refs, strategy, update} = useFloating({\n middleware,\n placement: placementProp,\n whileElementsMounted: autoUpdate,\n elements: referenceElement\n ? {\n reference: referenceElement,\n }\n : undefined,\n })\n\n const referenceHidden = middlewareData.hide?.referenceHidden\n\n const arrowX = middlewareData.arrow?.x\n const arrowY = middlewareData.arrow?.y\n\n const originX = middlewareData['@sanity/ui/origin']?.originX\n const originY = middlewareData['@sanity/ui/origin']?.originY\n\n const setArrow = useCallback((arrowEl: HTMLDivElement | null) => {\n arrowRef.current = arrowEl\n }, [])\n\n const setFloating = useCallback(\n (node: HTMLDivElement | null) => {\n ref.current = node\n refs.setFloating(node)\n },\n [refs],\n )\n\n // If there's a child then we need to set the reference element to the cloned child ref\n // and if child changes we make sure to update or remove the reference element.\n useImperativeHandle(childProp ? getElementRef(childProp) : null, () => refs.reference.current)\n\n const child = useMemo(() => {\n // If a reference element is defined, we don't need to clone the child\n if (referenceElement) return childProp\n\n if (!childProp) return null\n\n return cloneElement(childProp, {ref: refs.setReference})\n }, [childProp, referenceElement, refs.setReference])\n\n useImperativeHandle(updateRef, () => update, [update])\n\n if (disabled) {\n return childProp || <></>\n }\n\n const popover = (\n <LayerProvider zOffset={zOffset}>\n {/* Optional transparent blocking overlay at the top-most z-index layer. Must be positioned before the below popover card. */}\n {modal && <ViewportOverlay />}\n\n <PopoverCard\n {...restProps}\n __unstable_margins={margins}\n animate={animate}\n arrow={arrowProp}\n arrowRef={setArrow}\n arrowX={arrowX}\n arrowY={arrowY}\n hidden={referenceHidden}\n overflow={overflow}\n padding={padding}\n placement={placement}\n radius={radius}\n ref={setFloating}\n scheme={scheme}\n shadow={shadow}\n originX={originX}\n originY={originY}\n strategy={strategy}\n tone={tone}\n width={matchReferenceWidth ? referenceWidth : width}\n x={x}\n y={y}\n >\n {content}\n </PopoverCard>\n </LayerProvider>\n )\n\n const popoverNode = portal ? (\n <Portal __unstable_name={typeof portal === 'string' ? portal : undefined}>{popover}</Portal>\n ) : (\n popover\n )\n\n return (\n <>\n {/* the popover */}\n {animate ? (\n <AnimateActivity layoutMode=\"default\" mode={open ? 'visible' : 'hidden'}>\n {popoverNode}\n </AnimateActivity>\n ) : (\n <Activity mode={open ? 'visible' : 'hidden'}>{popoverNode}</Activity>\n )}\n\n {/* the referred element */}\n {child}\n </>\n )\n}\n\nfunction useMiddleware({\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n}: {\n animate: boolean\n arrowProp: boolean\n arrowRef: React.RefObject<HTMLDivElement | null>\n constrainSize: boolean\n fallbackPlacements: Placement[]\n floatingBoundary: HTMLElement | null\n margins: PopoverMargins\n matchReferenceWidth: boolean | undefined\n maxWidthRef: React.RefObject<number | undefined>\n placementProp: Placement\n placementStrategy: 'flip' | 'autoPlacement'\n preventOverflow: boolean\n referenceBoundary: HTMLElement | null\n referenceWidthRef: React.RefObject<number | undefined>\n rootBoundary: RootBoundary\n setReferenceWidth: (referenceWidth: number) => void\n widthRef: React.RefObject<number | undefined>\n}) {\n return useMemo(() => {\n const ret: Middleware[] = []\n\n // Flip the floating element when leaving the boundary box\n if (constrainSize || preventOverflow) {\n if (placementStrategy === 'autoPlacement') {\n ret.push(\n autoPlacement({\n allowedPlacements: [placementProp].concat(fallbackPlacements),\n }),\n )\n } else {\n ret.push(\n flip({\n boundary: floatingBoundary || undefined,\n fallbackPlacements,\n padding: DEFAULT_POPOVER_PADDING,\n rootBoundary,\n }),\n )\n }\n }\n\n // Define distance between reference and floating element\n ret.push(offset({mainAxis: DEFAULT_POPOVER_DISTANCE}))\n\n // Track sizes\n if (constrainSize || matchReferenceWidth) {\n ret.push(\n size({\n boundaryElement: floatingBoundary || undefined,\n constrainSize,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n padding: DEFAULT_POPOVER_PADDING,\n referenceWidthRef,\n setReferenceWidth,\n widthRef,\n }),\n )\n }\n\n // Shift the popover so its sits within the boundary element\n if (preventOverflow) {\n ret.push(\n shift({\n boundary: floatingBoundary || undefined,\n rootBoundary,\n padding: DEFAULT_POPOVER_PADDING,\n }),\n )\n }\n\n // Place arrow\n if (arrowProp) {\n ret.push(\n arrow({\n element: arrowRef,\n padding: DEFAULT_POPOVER_PADDING,\n }),\n )\n }\n\n // Determine the origin to scale from.\n // Must be placed after `@sanity/ui/size` and `shift` middleware.\n if (animate) {\n ret.push(origin)\n }\n\n ret.push(\n hide({\n boundary: referenceBoundary || undefined,\n padding: DEFAULT_POPOVER_PADDING,\n strategy: 'referenceHidden',\n }),\n )\n\n return ret\n }, [\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n ])\n}\n"],"mappings":";;;;;;;;;;;;AAQA,MAAaO,0BAA0C;CAAC;CAAG;CAAG;CAAG;AAAC,GACrDC,8BAA8D;CACzE,KAAO;EAAC;EAAU;EAAQ;CAAO;CACjC,aAAa;EAAC;EAAgB;EAAc;CAAa;CACzD,WAAW;EAAC;EAAc;EAAY;CAAW;CACjD,QAAU;EAAC;EAAO;EAAQ;CAAO;CACjC,gBAAgB;EAAC;EAAa;EAAc;CAAa;CACzD,cAAc;EAAC;EAAW;EAAY;CAAW;CACjD,MAAQ;EAAC;EAAS;EAAO;CAAQ;CACjC,cAAc;EAAC;EAAe;EAAa;CAAc;CACzD,YAAY;EAAC;EAAa;EAAW;CAAY;CACjD,OAAS;EAAC;EAAQ;EAAO;CAAQ;CACjC,eAAe;EAAC;EAAc;EAAa;CAAc;CACzD,aAAa;EAAC;EAAY;EAAW;CAAY;AACnD;AClBA,SAAgBK,KAAKC,SAUN;CACb,IAAM,EACJG,eACAC,SACAC,qBACAC,aACAG,UAAU,GACVC,mBACAC,mBACAE,aACEb;CAEJ,OAAO;EACLc,MAAM;EACN,MAAMC,GAAGC,MAAM;GACb,IAAM,EAACC,UAAUC,WAAWC,UAAUC,UAASJ,MACzC,EAACK,UAAUC,cAAaF,OAExBG,WAAW,MAAM3B,eAAeoB,MAAM;IAC1CQ,aAAa;IACbC,UAAUzB,QAAQC,mBAAmByB,KAAAA;IACrCC,gBAAgB;IAChBlB;IACAmB,cAAc;GAChB,CAAC,GAEGC,WAAWC,UACXC,YAAYD,UAEVE,YAAYX,SAASY,OACrBC,YAAYb,SAASc;GAiB3B,AAfIjB,UAAUkB,SAAS,KAAK,MAC1BP,WAAWG,aAAaT,SAASc,OAAOd,SAASe,QACjDP,YAAYG,YAAYX,SAASgB,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A,MAAAV,mBAAAU,EAAA,MAAAR,iBAAAQ,EAAA,MAAAP,mBAAAO,EAAA,MAAA0F,mBAAA1F,EAAA,MAAAgG,cAAAhG,EAAA,MAAA+F,mBAAA/F,EAAA,MAAAsF,UAAAtF,EAAA,MAAAyH;CAAA,OAAAA,MAAAzH,EAAA;CAAA,OAEDyH;AAAU"}
package/dist/popover.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as PopoverMargins, i as PopoverWidth, n as PopoverProps, r as PopoverUpdateCallback, t as Popover } from "./popover-DmmmSNzL.js";
1
+ import { a as PopoverMargins, i as PopoverWidth, n as PopoverProps, r as PopoverUpdateCallback, t as Popover } from "./popover-CMlQeKn0.js";
2
2
  export { Popover, type PopoverMargins, type PopoverProps, type PopoverUpdateCallback, type PopoverWidth };
package/dist/popover.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as Popover } from "./popover-Iy6EZEmv.js";
2
+ import { t as Popover } from "./popover-DfXz9lUl.js";
3
3
  export { Popover };
package/dist/styles.css CHANGED
@@ -1 +1,28 @@
1
- .elmvdc0{white-space:nowrap;text-overflow:ellipsis;display:block;overflow:clip}@keyframes _1b6o2se0{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._1b6o2se1{animation:.5s linear infinite _1b6o2se0}._1omd6w40{width:0;height:0;display:block;position:absolute;overflow:clip}
1
+ .elmvdc0 {
2
+ white-space: nowrap;
3
+ text-overflow: ellipsis;
4
+ display: block;
5
+ overflow: clip;
6
+ }
7
+
8
+ @keyframes _1b6o2se0 {
9
+ from {
10
+ transform: rotate(0);
11
+ }
12
+
13
+ to {
14
+ transform: rotate(360deg);
15
+ }
16
+ }
17
+
18
+ ._1b6o2se1 {
19
+ animation: .5s linear infinite _1b6o2se0;
20
+ }
21
+
22
+ ._1omd6w40 {
23
+ width: 0;
24
+ height: 0;
25
+ display: block;
26
+ position: absolute;
27
+ overflow: clip;
28
+ }
@@ -0,0 +1,3 @@
1
+ declare const styles: void;
2
+ export { styles as default };
3
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","names":[],"sources":["../src/exports/styles.ts"],"mappings":"AACA,cAAM"}
package/dist/styles.js ADDED
@@ -0,0 +1,4 @@
1
+ const styles = void 0;
2
+ export { styles as default };
3
+
4
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":[],"sources":["../src/exports/styles.ts"],"sourcesContent":["// Type-only entry point for `@sanity/ui/styles.css`.\nconst styles: void = undefined\n\nexport default styles\n"],"mappings":"AACA,MAAM,SAAe,KAAA"}
@@ -3,7 +3,7 @@ import { a as isHTMLElement, c as isHTMLTextAreaElement, i as isHTMLButtonElemen
3
3
  import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
4
4
  import { l as useRootTheme, m as focusRingStyle, p as focusRingBorderStyle, s as Card, v as responsiveRadiusStyle, y as Box } from "./useLayer-9Pz-GG0r.js";
5
5
  import { n as Text } from "./stack-C5WV-BRh.js";
6
- import { t as Button } from "./button-DZkAQOL2.js";
6
+ import { t as Button } from "./button-BDLRd1Rr.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import { isValidElement, useEffect, useImperativeHandle, useRef } from "react";
9
9
  import { css, styled } from "styled-components";
@@ -148,35 +148,41 @@ function textInputRepresentationStyle(props) {
148
148
  }
149
149
  const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */ styled(Card).attrs({ forwardedAs: "span" }).withConfig({
150
150
  displayName: "StyledTextInput",
151
- componentId: "sc-jgyv6p-0"
151
+ componentId: "sc-ceualg-0"
152
152
  })(textInputRootStyle), InputRoot = styled.span.withConfig({
153
153
  displayName: "InputRoot",
154
- componentId: "sc-jgyv6p-1"
154
+ componentId: "sc-ceualg-1"
155
155
  })`flex:1;min-width:0;display:block;position:relative;`, Prefix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
156
156
  displayName: "Prefix",
157
- componentId: "sc-jgyv6p-2"
157
+ componentId: "sc-ceualg-2"
158
158
  })`border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}`, Suffix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
159
159
  displayName: "Suffix",
160
- componentId: "sc-jgyv6p-3"
160
+ componentId: "sc-ceualg-3"
161
161
  })`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`, Input = /* @__PURE__ */ styled.input.withConfig({
162
162
  displayName: "Input",
163
- componentId: "sc-jgyv6p-4"
163
+ componentId: "sc-ceualg-4"
164
164
  })(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.span.withConfig({
165
165
  displayName: "Presentation",
166
- componentId: "sc-jgyv6p-5"
166
+ componentId: "sc-ceualg-5"
167
167
  })(responsiveRadiusStyle, textInputRepresentationStyle), LeftBox = styled(Box).withConfig({
168
168
  displayName: "LeftBox",
169
- componentId: "sc-jgyv6p-6"
169
+ componentId: "sc-ceualg-6"
170
170
  })`position:absolute;top:0;left:0;`, RightBox = styled(Box).withConfig({
171
171
  displayName: "RightBox",
172
- componentId: "sc-jgyv6p-7"
172
+ componentId: "sc-ceualg-7"
173
173
  })`position:absolute;top:0;right:0;`, RightCard = styled(Card).withConfig({
174
174
  displayName: "RightCard",
175
- componentId: "sc-jgyv6p-8"
175
+ componentId: "sc-ceualg-8"
176
176
  })`background-color:transparent;position:absolute;top:0;right:0;`, TextInputClearButton = /* @__PURE__ */ styled(Button).withConfig({
177
177
  displayName: "TextInputClearButton",
178
- componentId: "sc-jgyv6p-9"
179
- })({ "&:not([hidden])": { display: "block" } }), TextInput = function TextInput(props) {
178
+ componentId: "sc-ceualg-9"
179
+ })({ "&:not([hidden])": { display: "block" } });
180
+ /**
181
+ * Single line text input.
182
+ *
183
+ * @public
184
+ */
185
+ function TextInput(props) {
180
186
  let $ = c(93), IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, forwardedRef, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
181
187
  $[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], forwardedRef = $[6], onClear = $[7], prefix = $[8], readOnly = $[9], restProps = $[10], suffix = $[11], t0 = $[12], t1 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], weight = $[19]) : ({__unstable_disableFocusRing, border: t0, clearButton, disabled: t1, fontSize: t2, gap: t3, icon: IconComponent, iconRight: IconRightComponent, onClear, padding: t4, prefix, radius: t5, readOnly, ref: forwardedRef, suffix, customValidity, type: t6, weight, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] = forwardedRef, $[7] = onClear, $[8] = prefix, $[9] = readOnly, $[10] = restProps, $[11] = suffix, $[12] = t0, $[13] = t1, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = weight);
182
188
  let border = t0 === void 0 || t0, disabled = t1 !== void 0 && t1, fontSizeProp = t2 === void 0 ? 2 : t2, gap = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, radiusProp = t5 === void 0 ? 2 : t5, type = t6 === void 0 ? "text" : t6, ref = useRef(null), rootTheme = useRootTheme(), t7;
@@ -300,16 +306,16 @@ const CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */
300
306
  suffixNode
301
307
  ]
302
308
  }), $[88] = prefixNode, $[89] = rootTheme.tone, $[90] = suffixNode, $[91] = t24, $[92] = t25) : t25 = $[92], t25;
303
- };
304
- function _temp(event) {
305
- event.preventDefault(), event.stopPropagation();
309
+ }
310
+ function _temp3(v_0) {
311
+ return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
306
312
  }
307
313
  function _temp2(v) {
308
314
  return v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2;
309
315
  }
310
- function _temp3(v_0) {
311
- return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
316
+ function _temp(event) {
317
+ event.preventDefault(), event.stopPropagation();
312
318
  }
313
319
  export { textInputRootStyle as a, useCustomValidity as c, focusFirstDescendant as d, focusLastDescendant as f, _raf2 as h, textInputRepresentationStyle as i, _hasFocus as l, _raf as m, textInputBaseStyle as n, responsiveInputPaddingIconRightStyle as o, isFocusable as p, textInputFontSizeStyle as r, responsiveInputPaddingStyle as s, TextInput as t, attemptFocus as u };
314
320
 
315
- //# sourceMappingURL=textInput-IbiDH7Jc.js.map
321
+ //# sourceMappingURL=textInput-DhCo-b3N.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textInput-IbiDH7Jc.js","names":["_raf","fn","frameId","requestAnimationFrame","cancelAnimationFrame","_raf2","innerDispose","outerDispose","isHTMLAnchorElement","isHTMLButtonElement","isHTMLElement","isHTMLInputElement","isHTMLSelectElement","isHTMLTextAreaElement","_hasFocus","element","HTMLElement","Boolean","document","activeElement","contains","isFocusable","tabIndex","getAttribute","href","rel","type","disabled","attemptFocus","focus","focusFirstDescendant","i","childNodes","length","child","focusLastDescendant","useEffect","useCustomValidity","ref","customValidity","$","_c","t0","t1","current","setCustomValidity","CSSObject","getTheme_v2","_responsive","rem","ThemeProps","TextInputResponsivePaddingStyleProps","$fontSize","$iconLeft","$iconRight","$padding","$space","responsiveInputPaddingStyle","props","font","media","space","theme","len","Math","max","length","_padding","_space","_fontSize","i","undefined","_","size","text","sizes","emSize","lineHeight","ascenderHeight","descenderHeight","p","s","styles","paddingTop","paddingRight","paddingBottom","paddingLeft","responsiveInputPaddingIconRightStyle","css","ThemeColorSchemeKey","CSSObject","ThemeFontWeightKey","getTheme_v2","CardTone","focusRingBorderStyle","focusRingStyle","_responsive","rem","ThemeProps","TextInputInputStyleProps","$fontSize","$scheme","$tone","$weight","TextInputRepresentationStyleProps","$hasPrefix","$hasSuffix","$unstableDisableFocusRing","ROOT_STYLE","textInputRootStyle","ReturnType","textInputBaseStyle","props","color","font","theme","text","family","weights","regular","input","default","enabled","fg","placeholder","disabled","invalid","readOnly","textInputFontSizeStyle","media","sizeIndex","size","sizes","fontSize","lineHeight","textInputRepresentationStyle","undefined","bg","border","width","focusRing","hovered","CloseIcon","isValidElement","useCallback","useImperativeHandle","useMemo","useRef","isValidElementType","styled","ThemeFontWeightKey","EMPTY_RECORD","useCustomValidity","_getArrayProp","responsiveInputPaddingStyle","TextInputResponsivePaddingStyleProps","textInputBaseStyle","textInputFontSizeStyle","TextInputInputStyleProps","textInputRepresentationStyle","TextInputRepresentationStyleProps","textInputRootStyle","responsiveRadiusStyle","ResponsiveRadiusStyleProps","useRootTheme","Radius","Box","Button","ButtonOwnProps","Card","Text","TextInputClearButtonProps","Omit","React","HTMLProps","HTMLButtonElement","TextInputType","TextInputProps","__unstable_disableFocusRing","border","clearButton","customValidity","fontSize","icon","ElementType","ReactNode","iconRight","onClear","padding","prefix","radius","space","gap","suffix","type","weight","CLEAR_BUTTON_BOX_STYLE","CSSProperties","zIndex","StyledTextInput","attrs","forwardedAs","InputRoot","span","Prefix","Suffix","Input","input","Presentation","LeftBox","RightBox","RightCard","TextInputClearButton","display","TextInput","props","$","_c","IconComponent","IconRightComponent","forwardedRef","readOnly","restProps","t0","t1","t2","t3","t4","t5","t6","disabled","ref","undefined","fontSizeProp","paddingProp","radiusProp","rootTheme","t7","t8","t9","t10","$hasClearButton","Boolean","$hasIcon","$hasIconRight","$hasSuffix","$hasPrefix","t11","Symbol","for","current","handleClearMouseDown","_temp","t12","event_0","event","preventDefault","stopPropagation","focus","handleClearClick","t13","prefixNode","t14","t15","t16","t17","scheme","tone","presentationNode","t18","map","_temp2","clearButtonBoxPadding","t19","_temp3","clearButtonPadding","clearButtonProps","t20","clearButtonNode","t21","suffixNode","t22","t23","t24","t25","v","v_0"],"sources":["../src/core/helpers/animation.ts","../src/core/helpers/focus.ts","../src/core/hooks/useCustomValidity.ts","../src/core/styles/input/responsiveInputPaddingStyle.ts","../src/core/styles/input/textInputStyle.ts","../src/core/primitives/textInput/textInput.tsx"],"sourcesContent":["/**\n * @internal\n */\nexport function _raf(fn: () => void): () => void {\n const frameId = requestAnimationFrame(fn)\n\n return () => {\n cancelAnimationFrame(frameId)\n }\n}\n\n/**\n * @internal\n */\nexport function _raf2(fn: () => void): () => void {\n let innerDispose: (() => void) | null = null\n\n const outerDispose = _raf(() => {\n innerDispose = _raf(fn)\n })\n\n return () => {\n if (innerDispose) innerDispose()\n\n outerDispose()\n }\n}\n","import {\n isHTMLAnchorElement,\n isHTMLButtonElement,\n isHTMLElement,\n isHTMLInputElement,\n isHTMLSelectElement,\n isHTMLTextAreaElement,\n} from './element'\n\n// export const globalFocusState = {\n// IgnoreUtilFocusChanges: false,\n// }\n\n/**\n * @internal\n */\nexport function _hasFocus(element: HTMLElement): boolean {\n return Boolean(document.activeElement) && element.contains(document.activeElement)\n}\n\n/**\n * @internal\n */\nexport function isFocusable(element: HTMLElement): boolean {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n\n if (isHTMLAnchorElement(element)) {\n return Boolean(element.href) && element.rel !== 'ignore'\n }\n\n if (isHTMLInputElement(element)) {\n return element.type !== 'hidden' && element.type !== 'file' && !element.disabled\n }\n\n if (\n isHTMLButtonElement(element) ||\n isHTMLSelectElement(element) ||\n isHTMLTextAreaElement(element)\n ) {\n return !element.disabled\n }\n\n return false\n}\n\n/**\n * @internal\n */\nexport function attemptFocus(element: HTMLElement): boolean {\n if (!isFocusable(element)) {\n return false\n }\n\n // globalFocusState.IgnoreUtilFocusChanges = true\n\n try {\n element.focus()\n } catch {\n // ignore\n }\n\n // globalFocusState.IgnoreUtilFocusChanges = false\n\n return document.activeElement === element\n}\n\n/**\n * @internal\n */\nexport function focusFirstDescendant(element: HTMLElement): boolean {\n for (let i = 0; i < element.childNodes.length; i++) {\n const child = element.childNodes[i]\n\n if (isHTMLElement(child) && (attemptFocus(child) || focusFirstDescendant(child))) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @internal\n */\nexport function focusLastDescendant(element: HTMLElement): boolean {\n for (let i = element.childNodes.length - 1; i >= 0; i--) {\n const child = element.childNodes[i]\n\n if (isHTMLElement(child) && (attemptFocus(child) || focusLastDescendant(child))) {\n return true\n }\n }\n\n return false\n}\n","import {useEffect} from 'react'\n\n/**\n * @beta\n */\nexport function useCustomValidity(\n ref: {current: null | {setCustomValidity: (validity: string) => void}},\n customValidity: string | undefined,\n): void {\n useEffect(() => {\n ref.current?.setCustomValidity(customValidity || '')\n }, [customValidity, ref])\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\n\nexport interface TextInputResponsivePaddingStyleProps {\n $fontSize: number[]\n $iconLeft?: boolean\n $iconRight?: boolean\n $padding: number[]\n $space: number[]\n}\n\nexport function responsiveInputPaddingStyle(\n props: TextInputResponsivePaddingStyleProps & ThemeProps,\n): CSSObject[] {\n const {$fontSize, $iconLeft, $iconRight, $padding, $space} = props\n const {font, media, space} = getTheme_v2(props.theme)\n const len = Math.max($padding.length, $space.length, $fontSize.length)\n const _padding: number[] = []\n const _space: number[] = []\n const _fontSize: number[] = []\n\n for (let i = 0; i < len; i += 1) {\n _fontSize[i] = $fontSize[i] === undefined ? _fontSize[i - 1] : $fontSize[i]\n _padding[i] = $padding[i] === undefined ? _padding[i - 1] : $padding[i]\n _space[i] = $space[i] === undefined ? _space[i - 1] : $space[i]\n }\n\n return _responsive(media, _padding, (_, i) => {\n const size = font.text.sizes[_fontSize[i]] || font.text.sizes[2]\n const emSize = size.lineHeight - size.ascenderHeight - size.descenderHeight\n const p = space[_padding[i]]\n const s = space[_space[i]]\n\n const styles = {\n paddingTop: rem(p - size.ascenderHeight),\n paddingRight: rem(p),\n paddingBottom: rem(p - size.descenderHeight),\n paddingLeft: rem(p),\n }\n\n if ($iconRight) styles.paddingRight = rem(p + emSize + s)\n if ($iconLeft) styles.paddingLeft = rem(p + emSize + s)\n\n return styles\n })\n}\n\nexport function responsiveInputPaddingIconRightStyle(\n props: {\n $fontSize: number[]\n $padding: number[]\n $space: number[]\n } & ThemeProps,\n): CSSObject[] {\n return responsiveInputPaddingStyle({...props, $iconRight: true})\n}\n","import {css} from 'styled-components'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {CSSObject} from '../../../theme/system/css'\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {CardTone} from '../../types/card'\nimport {focusRingBorderStyle, focusRingStyle} from '../focusRing'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\n\n/**\n * @internal\n */\nexport interface TextInputInputStyleProps {\n $fontSize: number[]\n $scheme: ThemeColorSchemeKey\n $tone: CardTone\n $weight?: ThemeFontWeightKey\n}\n\n/**\n * @internal\n */\nexport interface TextInputRepresentationStyleProps {\n $hasPrefix?: boolean\n $hasSuffix?: boolean\n $scheme: ThemeColorSchemeKey\n $tone: CardTone\n $unstableDisableFocusRing?: boolean\n}\n\nconst ROOT_STYLE = css`\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n`\n\nexport function textInputRootStyle(): ReturnType<typeof css> {\n return ROOT_STYLE\n}\n\nexport function textInputBaseStyle(\n props: TextInputInputStyleProps & ThemeProps,\n): ReturnType<typeof css> {\n const {$scheme, $tone, $weight} = props\n const {color, font} = getTheme_v2(props.theme)\n\n return css`\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ${font.text.family};\n font-weight: ${($weight && font.text.weights[$weight]) || font.text.weights.regular};\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome’s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='${$scheme}'][data-tone='${$tone}'] {\n --input-fg-color: ${color.input.default.enabled.fg};\n --input-placeholder-color: ${color.input.default.enabled.placeholder};\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ${color.input.default.enabled.fg};\n --input-placeholder-color: ${color.input.default.enabled.placeholder};\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ${color.input.default.disabled.fg};\n --input-placeholder-color: ${color.input.default.disabled.placeholder};\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ${color.input.invalid.enabled.fg};\n --input-placeholder-color: ${color.input.invalid.enabled.placeholder};\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ${color.input.default.readOnly.fg};\n --input-placeholder-color: ${color.input.default.readOnly.placeholder};\n }\n }\n `\n}\n\nexport function textInputFontSizeStyle(props: TextInputInputStyleProps & ThemeProps): CSSObject[] {\n const {font, media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$fontSize, (sizeIndex) => {\n const size = font.text.sizes[sizeIndex] || font.text.sizes[2]\n\n return {\n fontSize: rem(size.fontSize),\n lineHeight: `${size.lineHeight / size.fontSize}`,\n }\n })\n}\n\nexport function textInputRepresentationStyle(\n props: TextInputRepresentationStyleProps & ThemeProps,\n): ReturnType<typeof css> {\n const {$hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing} = props\n const {color, input} = getTheme_v2(props.theme)\n\n return css`\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ${$hasPrefix ? 0 : undefined};\n border-bottom-left-radius: ${$hasPrefix ? 0 : undefined};\n border-top-right-radius: ${$hasSuffix ? 0 : undefined};\n border-bottom-right-radius: ${$hasSuffix ? 0 : undefined};\n\n &[data-scheme='${$scheme}'][data-tone='${$tone}'] {\n --card-bg-color: ${color.input.default.enabled.bg};\n --card-fg-color: ${color.input.default.enabled.fg};\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.enabled.border,\n width: input.border.width,\n })};\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ${color.input.invalid.enabled.bg};\n --card-fg-color: ${color.input.invalid.enabled.fg};\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.enabled.border,\n width: input.border.width,\n })};\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ${\n $unstableDisableFocusRing\n ? undefined\n : focusRingStyle({\n border: {color: color.input.default.enabled.border, width: input.border.width},\n focusRing: input.text.focusRing,\n })\n };\n }\n\n &:not([data-border]) {\n --input-box-shadow: ${\n $unstableDisableFocusRing\n ? undefined\n : focusRingStyle({focusRing: input.text.focusRing})\n };\n }\n }\n\n /* disabled */\n *:not(:invalid):disabled + & {\n --card-bg-color: ${color.input.default.disabled.bg} !important;\n --card-fg-color: ${color.input.default.disabled.fg} !important;\n --card-icon-color: ${color.input.default.disabled.fg} !important;\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.disabled.border,\n width: input.border.width,\n })};\n }\n }\n\n *:invalid:disabled + & {\n --card-bg-color: ${color.input.invalid.disabled.bg} !important;\n --card-fg-color: ${color.input.invalid.disabled.fg} !important;\n --card-icon-color: ${color.input.invalid.disabled.fg} !important;\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.disabled.border,\n width: input.border.width,\n })};\n }\n }\n\n /* readOnly */\n *:not(:invalid):read-only + & {\n --card-bg-color: ${color.input.default.readOnly.bg} !important;\n --card-fg-color: ${color.input.default.readOnly.fg} !important;\n }\n\n *:invalid:read-only + & {\n --card-bg-color: ${color.input.invalid.readOnly.bg} !important;\n --card-fg-color: ${color.input.invalid.readOnly.fg} !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ${color.input.default.hovered.bg};\n --card-fg-color: ${color.input.default.hovered.fg};\n }\n\n *:invalid:not(:disabled):not(:read-only):hover + & {\n --card-bg-color: ${color.input.invalid.hovered.bg};\n --card-fg-color: ${color.input.invalid.hovered.fg};\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.hovered.border,\n width: input.border.width,\n })};\n }\n\n *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.hovered.border,\n width: input.border.width,\n })};\n }\n }\n }\n `\n}\n","import {CloseIcon} from '@sanity/icons/Close'\nimport {isValidElement, useCallback, useImperativeHandle, useMemo, useRef} from 'react'\nimport {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {EMPTY_RECORD} from '../../constants'\nimport {useCustomValidity} from '../../hooks/useCustomValidity'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {\n responsiveInputPaddingStyle,\n TextInputResponsivePaddingStyleProps,\n} from '../../styles/input/responsiveInputPaddingStyle'\nimport {\n textInputBaseStyle,\n textInputFontSizeStyle,\n TextInputInputStyleProps,\n textInputRepresentationStyle,\n TextInputRepresentationStyleProps,\n textInputRootStyle,\n} from '../../styles/input/textInputStyle'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {useRootTheme} from '../../theme/useRootTheme'\nimport {Radius} from '../../types/radius'\nimport {Box} from '../box/box'\nimport {Button, ButtonOwnProps} from '../button/button'\nimport {Card} from '../card/card'\nimport {Text} from '../text/text'\n\n/**\n * @public\n */\nexport type TextInputClearButtonProps = ButtonOwnProps &\n Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>\n\n/**\n * @public\n */\nexport type TextInputType =\n | 'search'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'url'\n | 'month'\n | 'number'\n | 'password'\n | 'tel'\n | 'time'\n | 'text'\n | 'week'\n | 'color'\n\n/**\n * @public\n */\nexport interface TextInputProps {\n /**\n * @beta\n */\n __unstable_disableFocusRing?: boolean\n border?: boolean\n /**\n * @beta\n */\n clearButton?: boolean | TextInputClearButtonProps\n customValidity?: string\n fontSize?: number | number[]\n // oxlint-disable-next-line no-redundant-type-constituents\n icon?: React.ElementType | React.ReactNode\n // oxlint-disable-next-line no-redundant-type-constituents\n iconRight?: React.ElementType | React.ReactNode\n /**\n * @beta\n */\n onClear?: () => void\n padding?: number | number[]\n prefix?: React.ReactNode\n radius?: Radius | Radius[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n gap?: number | number[]\n suffix?: React.ReactNode\n type?: TextInputType\n weight?: ThemeFontWeightKey\n}\n\nconst CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {zIndex: 2}\n\nconst StyledTextInput = styled(Card).attrs({forwardedAs: 'span'})(textInputRootStyle)\n\nconst InputRoot = styled.span`\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n`\n\nconst Prefix = styled(Card).attrs({forwardedAs: 'span'})`\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n`\n\nconst Suffix = styled(Card).attrs({forwardedAs: 'span'})`\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n`\n\nconst Input = styled.input<TextInputResponsivePaddingStyleProps & TextInputInputStyleProps>(\n responsiveInputPaddingStyle,\n textInputBaseStyle,\n textInputFontSizeStyle,\n)\n\nconst Presentation = styled.span<ResponsiveRadiusStyleProps & TextInputRepresentationStyleProps>(\n responsiveRadiusStyle,\n textInputRepresentationStyle,\n)\n\nconst LeftBox = styled(Box)`\n position: absolute;\n top: 0;\n left: 0;\n`\n\nconst RightBox = styled(Box)`\n position: absolute;\n top: 0;\n right: 0;\n`\n\nconst RightCard = styled(Card)`\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n`\n\nconst TextInputClearButton = styled(Button)({\n '&:not([hidden])': {\n display: 'block',\n },\n})\n\n/**\n * Single line text input.\n *\n * @public\n */\nexport const TextInput = function TextInput(\n props: TextInputProps & Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'prefix' | 'type'>,\n) {\n const {\n __unstable_disableFocusRing,\n border = true,\n clearButton,\n disabled = false,\n fontSize: fontSizeProp = 2,\n gap = 3,\n icon: IconComponent,\n iconRight: IconRightComponent,\n onClear,\n padding: paddingProp = 3,\n prefix,\n radius: radiusProp = 2,\n readOnly,\n ref: forwardedRef,\n suffix,\n customValidity,\n type = 'text',\n weight,\n ...restProps\n } = props\n const ref = useRef<HTMLInputElement | null>(null)\n\n const rootTheme = useRootTheme()\n\n const fontSize = _getArrayProp(fontSizeProp)\n const padding = _getArrayProp(paddingProp)\n const radius = _getArrayProp(radiusProp)\n const space = _getArrayProp(gap)\n\n // Transient properties\n const $hasClearButton = Boolean(clearButton)\n const $hasIcon = Boolean(IconComponent)\n const $hasIconRight = Boolean(IconRightComponent)\n const $hasSuffix = Boolean(suffix)\n const $hasPrefix = Boolean(prefix)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => ref.current,\n )\n\n useCustomValidity(ref, customValidity)\n\n // Prevent the clear button from taking the focus away from the input\n const handleClearMouseDown = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n }, [])\n\n const handleClearClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (onClear) onClear()\n\n // Focus the input, in case focus has been lost when clicking the clear button\n ref.current?.focus()\n },\n [onClear, ref],\n )\n\n // Render prefix (memoized)\n const prefixNode = useMemo(\n () =>\n prefix && (\n <Prefix borderTop borderLeft borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{prefix}</span>\n </Prefix>\n ),\n [prefix, radius],\n )\n\n // Render presentation (memoized)\n const presentationNode = useMemo(\n () => (\n <Presentation\n $hasPrefix={$hasPrefix}\n $unstableDisableFocusRing={__unstable_disableFocusRing}\n $hasSuffix={$hasSuffix}\n $radius={radius}\n $scheme={rootTheme.scheme}\n $tone={rootTheme.tone}\n data-border={border ? '' : undefined}\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n >\n {IconComponent && (\n <LeftBox padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </LeftBox>\n )}\n\n {!$hasClearButton && IconRightComponent && (\n <RightBox padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </RightBox>\n )}\n </Presentation>\n ),\n [\n __unstable_disableFocusRing,\n border,\n fontSize,\n IconComponent,\n IconRightComponent,\n padding,\n radius,\n rootTheme,\n $hasClearButton,\n $hasPrefix,\n $hasSuffix,\n ],\n )\n\n // Render clear button (memoized)\n const clearButtonBoxPadding = useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n }),\n [padding],\n )\n const clearButtonPadding = useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n }),\n [padding],\n )\n const clearButtonProps: TextInputClearButtonProps = useMemo(\n () => (typeof clearButton === 'object' ? clearButton : EMPTY_RECORD),\n [clearButton],\n )\n const clearButtonNode = useMemo(\n () =>\n !disabled &&\n !readOnly &&\n clearButton && (\n <RightCard\n forwardedAs=\"span\"\n padding={clearButtonBoxPadding}\n style={CLEAR_BUTTON_BOX_STYLE}\n tone={customValidity ? 'critical' : 'inherit'}\n >\n <TextInputClearButton\n aria-label=\"Clear\"\n data-qa=\"clear-button\"\n fontSize={fontSize}\n icon={CloseIcon}\n mode=\"bleed\"\n padding={clearButtonPadding}\n radius={radius}\n {...clearButtonProps}\n onClick={handleClearClick}\n onMouseDown={handleClearMouseDown}\n />\n </RightCard>\n ),\n [\n clearButton,\n clearButtonBoxPadding,\n clearButtonPadding,\n clearButtonProps,\n customValidity,\n disabled,\n fontSize,\n handleClearClick,\n handleClearMouseDown,\n radius,\n readOnly,\n ],\n )\n\n // Render suffix (memoized)\n const suffixNode = useMemo(\n () =>\n suffix && (\n <Suffix borderTop borderRight borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{suffix}</span>\n </Suffix>\n ),\n [radius, suffix],\n )\n\n return (\n <StyledTextInput data-ui=\"TextInput\" tone={rootTheme.tone}>\n {prefixNode}\n\n <InputRoot>\n <Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />\n\n {presentationNode}\n {clearButtonNode}\n </InputRoot>\n\n {suffixNode}\n </StyledTextInput>\n )\n}\n"],"mappings":";;;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AA9D,EAAA,MAAAoD,kBAAApD,EAAA,MAAAkE,KAAAlE,EAAA,MAAAmE,OAAAA,MAAAnE,EAAA;CAAA,IAAAoE;CAGI,OAHJpE,EAAA,QAAA6C,cAAA7C,EAAA,QAAAoB,UAAA+B,QAAAnD,EAAA,QAAAgE,cAAAhE,EAAA,QAAAmE,OAzBdC,MAAA,qBAAC,iBAAD;EAAyB,WAAA;EAAkB,MAAAhD,UAAS+B;EAApD,UAAA;GACGN;GAEDsB;GAwBCH;EA3Ba;KA4BEhE,EAAA,MAAA6C,YAAA7C,EAAA,MAAAoB,UAAA+B,MAAAnD,EAAA,MAAAgE,YAAAhE,EAAA,MAAAmE,KAAAnE,EAAA,MAAAoE,OAAAA,MAAApE,EAAA,KA5BlBoE;AA4BkB;AAxOG,SAAAhC,MAAAG,OAAA;CAkDrBA,AADAA,MAAKC,eAAgB,GACrBD,MAAKE,gBAAiB;AAAC;AAlDF,SAAAc,OAAAc,GAAA;CAmII,OAFjBA,MAAM,IAAU,IAChBA,MAAM,KACNA,MAAM,IAAU,IAEbA,IAAI;AAAC;AArIK,SAAAX,OAAAY,KAAA;CA8II,OAFjBD,QAAM,KACNA,QAAM,IAAU,IAChBA,QAAM,IAAU,IAEbA,MAAI;AAAC"}
1
+ {"version":3,"file":"textInput-DhCo-b3N.js","names":["_raf","fn","frameId","requestAnimationFrame","cancelAnimationFrame","_raf2","innerDispose","outerDispose","isHTMLAnchorElement","isHTMLButtonElement","isHTMLElement","isHTMLInputElement","isHTMLSelectElement","isHTMLTextAreaElement","_hasFocus","element","HTMLElement","Boolean","document","activeElement","contains","isFocusable","tabIndex","getAttribute","href","rel","type","disabled","attemptFocus","focus","focusFirstDescendant","i","childNodes","length","child","focusLastDescendant","useEffect","useCustomValidity","ref","customValidity","$","_c","t0","t1","current","setCustomValidity","CSSObject","getTheme_v2","_responsive","rem","ThemeProps","TextInputResponsivePaddingStyleProps","$fontSize","$iconLeft","$iconRight","$padding","$space","responsiveInputPaddingStyle","props","font","media","space","theme","len","Math","max","length","_padding","_space","_fontSize","i","undefined","_","size","text","sizes","emSize","lineHeight","ascenderHeight","descenderHeight","p","s","styles","paddingTop","paddingRight","paddingBottom","paddingLeft","responsiveInputPaddingIconRightStyle","css","ThemeColorSchemeKey","CSSObject","ThemeFontWeightKey","getTheme_v2","CardTone","focusRingBorderStyle","focusRingStyle","_responsive","rem","ThemeProps","TextInputInputStyleProps","$fontSize","$scheme","$tone","$weight","TextInputRepresentationStyleProps","$hasPrefix","$hasSuffix","$unstableDisableFocusRing","ROOT_STYLE","textInputRootStyle","ReturnType","textInputBaseStyle","props","color","font","theme","text","family","weights","regular","input","default","enabled","fg","placeholder","disabled","invalid","readOnly","textInputFontSizeStyle","media","sizeIndex","size","sizes","fontSize","lineHeight","textInputRepresentationStyle","undefined","bg","border","width","focusRing","hovered","CloseIcon","isValidElement","useCallback","useImperativeHandle","useMemo","useRef","isValidElementType","styled","ThemeFontWeightKey","EMPTY_RECORD","useCustomValidity","_getArrayProp","responsiveInputPaddingStyle","TextInputResponsivePaddingStyleProps","textInputBaseStyle","textInputFontSizeStyle","TextInputInputStyleProps","textInputRepresentationStyle","TextInputRepresentationStyleProps","textInputRootStyle","responsiveRadiusStyle","ResponsiveRadiusStyleProps","useRootTheme","Radius","Box","Button","ButtonOwnProps","Card","Text","TextInputClearButtonProps","Omit","React","HTMLProps","HTMLButtonElement","TextInputType","TextInputProps","__unstable_disableFocusRing","border","clearButton","customValidity","fontSize","icon","ElementType","ReactNode","iconRight","onClear","padding","prefix","radius","space","gap","suffix","type","weight","CLEAR_BUTTON_BOX_STYLE","CSSProperties","zIndex","StyledTextInput","attrs","forwardedAs","InputRoot","span","Prefix","Suffix","Input","input","Presentation","LeftBox","RightBox","RightCard","TextInputClearButton","display","TextInput","props","$","_c","IconComponent","IconRightComponent","forwardedRef","readOnly","restProps","t0","t1","t2","t3","t4","t5","t6","disabled","ref","undefined","fontSizeProp","paddingProp","radiusProp","rootTheme","t7","t8","t9","t10","$hasClearButton","Boolean","$hasIcon","$hasIconRight","$hasSuffix","$hasPrefix","t11","Symbol","for","current","handleClearMouseDown","_temp","t12","event_0","event","preventDefault","stopPropagation","focus","handleClearClick","t13","prefixNode","t14","t15","t16","t17","scheme","tone","presentationNode","t18","map","_temp2","clearButtonBoxPadding","t19","_temp3","clearButtonPadding","clearButtonProps","t20","clearButtonNode","t21","suffixNode","t22","t23","t24","t25","v_0","v"],"sources":["../src/core/helpers/animation.ts","../src/core/helpers/focus.ts","../src/core/hooks/useCustomValidity.ts","../src/core/styles/input/responsiveInputPaddingStyle.ts","../src/core/styles/input/textInputStyle.ts","../src/core/primitives/textInput/textInput.tsx"],"sourcesContent":["/**\n * @internal\n */\nexport function _raf(fn: () => void): () => void {\n const frameId = requestAnimationFrame(fn)\n\n return () => {\n cancelAnimationFrame(frameId)\n }\n}\n\n/**\n * @internal\n */\nexport function _raf2(fn: () => void): () => void {\n let innerDispose: (() => void) | null = null\n\n const outerDispose = _raf(() => {\n innerDispose = _raf(fn)\n })\n\n return () => {\n if (innerDispose) innerDispose()\n\n outerDispose()\n }\n}\n","import {\n isHTMLAnchorElement,\n isHTMLButtonElement,\n isHTMLElement,\n isHTMLInputElement,\n isHTMLSelectElement,\n isHTMLTextAreaElement,\n} from './element'\n\n// export const globalFocusState = {\n// IgnoreUtilFocusChanges: false,\n// }\n\n/**\n * @internal\n */\nexport function _hasFocus(element: HTMLElement): boolean {\n return Boolean(document.activeElement) && element.contains(document.activeElement)\n}\n\n/**\n * @internal\n */\nexport function isFocusable(element: HTMLElement): boolean {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n\n if (isHTMLAnchorElement(element)) {\n return Boolean(element.href) && element.rel !== 'ignore'\n }\n\n if (isHTMLInputElement(element)) {\n return element.type !== 'hidden' && element.type !== 'file' && !element.disabled\n }\n\n if (\n isHTMLButtonElement(element) ||\n isHTMLSelectElement(element) ||\n isHTMLTextAreaElement(element)\n ) {\n return !element.disabled\n }\n\n return false\n}\n\n/**\n * @internal\n */\nexport function attemptFocus(element: HTMLElement): boolean {\n if (!isFocusable(element)) {\n return false\n }\n\n // globalFocusState.IgnoreUtilFocusChanges = true\n\n try {\n element.focus()\n } catch {\n // ignore\n }\n\n // globalFocusState.IgnoreUtilFocusChanges = false\n\n return document.activeElement === element\n}\n\n/**\n * @internal\n */\nexport function focusFirstDescendant(element: HTMLElement): boolean {\n for (let i = 0; i < element.childNodes.length; i++) {\n const child = element.childNodes[i]\n\n if (isHTMLElement(child) && (attemptFocus(child) || focusFirstDescendant(child))) {\n return true\n }\n }\n\n return false\n}\n\n/**\n * @internal\n */\nexport function focusLastDescendant(element: HTMLElement): boolean {\n for (let i = element.childNodes.length - 1; i >= 0; i--) {\n const child = element.childNodes[i]\n\n if (isHTMLElement(child) && (attemptFocus(child) || focusLastDescendant(child))) {\n return true\n }\n }\n\n return false\n}\n","import {useEffect} from 'react'\n\n/**\n * @beta\n */\nexport function useCustomValidity(\n ref: {current: null | {setCustomValidity: (validity: string) => void}},\n customValidity: string | undefined,\n): void {\n useEffect(() => {\n ref.current?.setCustomValidity(customValidity || '')\n }, [customValidity, ref])\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\n\nexport interface TextInputResponsivePaddingStyleProps {\n $fontSize: number[]\n $iconLeft?: boolean\n $iconRight?: boolean\n $padding: number[]\n $space: number[]\n}\n\nexport function responsiveInputPaddingStyle(\n props: TextInputResponsivePaddingStyleProps & ThemeProps,\n): CSSObject[] {\n const {$fontSize, $iconLeft, $iconRight, $padding, $space} = props\n const {font, media, space} = getTheme_v2(props.theme)\n const len = Math.max($padding.length, $space.length, $fontSize.length)\n const _padding: number[] = []\n const _space: number[] = []\n const _fontSize: number[] = []\n\n for (let i = 0; i < len; i += 1) {\n _fontSize[i] = $fontSize[i] === undefined ? _fontSize[i - 1] : $fontSize[i]\n _padding[i] = $padding[i] === undefined ? _padding[i - 1] : $padding[i]\n _space[i] = $space[i] === undefined ? _space[i - 1] : $space[i]\n }\n\n return _responsive(media, _padding, (_, i) => {\n const size = font.text.sizes[_fontSize[i]] || font.text.sizes[2]\n const emSize = size.lineHeight - size.ascenderHeight - size.descenderHeight\n const p = space[_padding[i]]\n const s = space[_space[i]]\n\n const styles = {\n paddingTop: rem(p - size.ascenderHeight),\n paddingRight: rem(p),\n paddingBottom: rem(p - size.descenderHeight),\n paddingLeft: rem(p),\n }\n\n if ($iconRight) styles.paddingRight = rem(p + emSize + s)\n if ($iconLeft) styles.paddingLeft = rem(p + emSize + s)\n\n return styles\n })\n}\n\nexport function responsiveInputPaddingIconRightStyle(\n props: {\n $fontSize: number[]\n $padding: number[]\n $space: number[]\n } & ThemeProps,\n): CSSObject[] {\n return responsiveInputPaddingStyle({...props, $iconRight: true})\n}\n","import {css} from 'styled-components'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {CSSObject} from '../../../theme/system/css'\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {CardTone} from '../../types/card'\nimport {focusRingBorderStyle, focusRingStyle} from '../focusRing'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\n\n/**\n * @internal\n */\nexport interface TextInputInputStyleProps {\n $fontSize: number[]\n $scheme: ThemeColorSchemeKey\n $tone: CardTone\n $weight?: ThemeFontWeightKey\n}\n\n/**\n * @internal\n */\nexport interface TextInputRepresentationStyleProps {\n $hasPrefix?: boolean\n $hasSuffix?: boolean\n $scheme: ThemeColorSchemeKey\n $tone: CardTone\n $unstableDisableFocusRing?: boolean\n}\n\nconst ROOT_STYLE = css`\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n`\n\nexport function textInputRootStyle(): ReturnType<typeof css> {\n return ROOT_STYLE\n}\n\nexport function textInputBaseStyle(\n props: TextInputInputStyleProps & ThemeProps,\n): ReturnType<typeof css> {\n const {$scheme, $tone, $weight} = props\n const {color, font} = getTheme_v2(props.theme)\n\n return css`\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ${font.text.family};\n font-weight: ${($weight && font.text.weights[$weight]) || font.text.weights.regular};\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome’s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='${$scheme}'][data-tone='${$tone}'] {\n --input-fg-color: ${color.input.default.enabled.fg};\n --input-placeholder-color: ${color.input.default.enabled.placeholder};\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ${color.input.default.enabled.fg};\n --input-placeholder-color: ${color.input.default.enabled.placeholder};\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ${color.input.default.disabled.fg};\n --input-placeholder-color: ${color.input.default.disabled.placeholder};\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ${color.input.invalid.enabled.fg};\n --input-placeholder-color: ${color.input.invalid.enabled.placeholder};\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ${color.input.default.readOnly.fg};\n --input-placeholder-color: ${color.input.default.readOnly.placeholder};\n }\n }\n `\n}\n\nexport function textInputFontSizeStyle(props: TextInputInputStyleProps & ThemeProps): CSSObject[] {\n const {font, media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$fontSize, (sizeIndex) => {\n const size = font.text.sizes[sizeIndex] || font.text.sizes[2]\n\n return {\n fontSize: rem(size.fontSize),\n lineHeight: `${size.lineHeight / size.fontSize}`,\n }\n })\n}\n\nexport function textInputRepresentationStyle(\n props: TextInputRepresentationStyleProps & ThemeProps,\n): ReturnType<typeof css> {\n const {$hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing} = props\n const {color, input} = getTheme_v2(props.theme)\n\n return css`\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ${$hasPrefix ? 0 : undefined};\n border-bottom-left-radius: ${$hasPrefix ? 0 : undefined};\n border-top-right-radius: ${$hasSuffix ? 0 : undefined};\n border-bottom-right-radius: ${$hasSuffix ? 0 : undefined};\n\n &[data-scheme='${$scheme}'][data-tone='${$tone}'] {\n --card-bg-color: ${color.input.default.enabled.bg};\n --card-fg-color: ${color.input.default.enabled.fg};\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.enabled.border,\n width: input.border.width,\n })};\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ${color.input.invalid.enabled.bg};\n --card-fg-color: ${color.input.invalid.enabled.fg};\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.enabled.border,\n width: input.border.width,\n })};\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ${\n $unstableDisableFocusRing\n ? undefined\n : focusRingStyle({\n border: {color: color.input.default.enabled.border, width: input.border.width},\n focusRing: input.text.focusRing,\n })\n };\n }\n\n &:not([data-border]) {\n --input-box-shadow: ${\n $unstableDisableFocusRing\n ? undefined\n : focusRingStyle({focusRing: input.text.focusRing})\n };\n }\n }\n\n /* disabled */\n *:not(:invalid):disabled + & {\n --card-bg-color: ${color.input.default.disabled.bg} !important;\n --card-fg-color: ${color.input.default.disabled.fg} !important;\n --card-icon-color: ${color.input.default.disabled.fg} !important;\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.disabled.border,\n width: input.border.width,\n })};\n }\n }\n\n *:invalid:disabled + & {\n --card-bg-color: ${color.input.invalid.disabled.bg} !important;\n --card-fg-color: ${color.input.invalid.disabled.fg} !important;\n --card-icon-color: ${color.input.invalid.disabled.fg} !important;\n\n &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.disabled.border,\n width: input.border.width,\n })};\n }\n }\n\n /* readOnly */\n *:not(:invalid):read-only + & {\n --card-bg-color: ${color.input.default.readOnly.bg} !important;\n --card-fg-color: ${color.input.default.readOnly.fg} !important;\n }\n\n *:invalid:read-only + & {\n --card-bg-color: ${color.input.invalid.readOnly.bg} !important;\n --card-fg-color: ${color.input.invalid.readOnly.fg} !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ${color.input.default.hovered.bg};\n --card-fg-color: ${color.input.default.hovered.fg};\n }\n\n *:invalid:not(:disabled):not(:read-only):hover + & {\n --card-bg-color: ${color.input.invalid.hovered.bg};\n --card-fg-color: ${color.input.invalid.hovered.fg};\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.default.hovered.border,\n width: input.border.width,\n })};\n }\n\n *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {\n --input-box-shadow: ${focusRingBorderStyle({\n color: color.input.invalid.hovered.border,\n width: input.border.width,\n })};\n }\n }\n }\n `\n}\n","import {CloseIcon} from '@sanity/icons/Close'\nimport {isValidElement, useCallback, useImperativeHandle, useMemo, useRef} from 'react'\nimport {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {EMPTY_RECORD} from '../../constants'\nimport {useCustomValidity} from '../../hooks/useCustomValidity'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {\n responsiveInputPaddingStyle,\n TextInputResponsivePaddingStyleProps,\n} from '../../styles/input/responsiveInputPaddingStyle'\nimport {\n textInputBaseStyle,\n textInputFontSizeStyle,\n TextInputInputStyleProps,\n textInputRepresentationStyle,\n TextInputRepresentationStyleProps,\n textInputRootStyle,\n} from '../../styles/input/textInputStyle'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {useRootTheme} from '../../theme/useRootTheme'\nimport {Radius} from '../../types/radius'\nimport {Box} from '../box/box'\nimport {Button, ButtonOwnProps} from '../button/button'\nimport {Card} from '../card/card'\nimport {Text} from '../text/text'\n\n/**\n * @public\n */\nexport type TextInputClearButtonProps = ButtonOwnProps &\n Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>\n\n/**\n * @public\n */\nexport type TextInputType =\n | 'search'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'url'\n | 'month'\n | 'number'\n | 'password'\n | 'tel'\n | 'time'\n | 'text'\n | 'week'\n | 'color'\n\n/**\n * @public\n */\nexport interface TextInputProps {\n /**\n * @beta\n */\n __unstable_disableFocusRing?: boolean\n border?: boolean\n /**\n * @beta\n */\n clearButton?: boolean | TextInputClearButtonProps\n customValidity?: string\n fontSize?: number | number[]\n // oxlint-disable-next-line no-redundant-type-constituents\n icon?: React.ElementType | React.ReactNode\n // oxlint-disable-next-line no-redundant-type-constituents\n iconRight?: React.ElementType | React.ReactNode\n /**\n * @beta\n */\n onClear?: () => void\n padding?: number | number[]\n prefix?: React.ReactNode\n radius?: Radius | Radius[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n gap?: number | number[]\n suffix?: React.ReactNode\n type?: TextInputType\n weight?: ThemeFontWeightKey\n}\n\nconst CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {zIndex: 2}\n\nconst StyledTextInput = styled(Card).attrs({forwardedAs: 'span'})(textInputRootStyle)\n\nconst InputRoot = styled.span`\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n`\n\nconst Prefix = styled(Card).attrs({forwardedAs: 'span'})`\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n`\n\nconst Suffix = styled(Card).attrs({forwardedAs: 'span'})`\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n`\n\nconst Input = styled.input<TextInputResponsivePaddingStyleProps & TextInputInputStyleProps>(\n responsiveInputPaddingStyle,\n textInputBaseStyle,\n textInputFontSizeStyle,\n)\n\nconst Presentation = styled.span<ResponsiveRadiusStyleProps & TextInputRepresentationStyleProps>(\n responsiveRadiusStyle,\n textInputRepresentationStyle,\n)\n\nconst LeftBox = styled(Box)`\n position: absolute;\n top: 0;\n left: 0;\n`\n\nconst RightBox = styled(Box)`\n position: absolute;\n top: 0;\n right: 0;\n`\n\nconst RightCard = styled(Card)`\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n`\n\nconst TextInputClearButton = styled(Button)({\n '&:not([hidden])': {\n display: 'block',\n },\n})\n\n/**\n * Single line text input.\n *\n * @public\n */\nexport function TextInput(\n props: TextInputProps & Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'prefix' | 'type'>,\n) {\n const {\n __unstable_disableFocusRing,\n border = true,\n clearButton,\n disabled = false,\n fontSize: fontSizeProp = 2,\n gap = 3,\n icon: IconComponent,\n iconRight: IconRightComponent,\n onClear,\n padding: paddingProp = 3,\n prefix,\n radius: radiusProp = 2,\n readOnly,\n ref: forwardedRef,\n suffix,\n customValidity,\n type = 'text',\n weight,\n ...restProps\n } = props\n const ref = useRef<HTMLInputElement | null>(null)\n\n const rootTheme = useRootTheme()\n\n const fontSize = _getArrayProp(fontSizeProp)\n const padding = _getArrayProp(paddingProp)\n const radius = _getArrayProp(radiusProp)\n const space = _getArrayProp(gap)\n\n // Transient properties\n const $hasClearButton = Boolean(clearButton)\n const $hasIcon = Boolean(IconComponent)\n const $hasIconRight = Boolean(IconRightComponent)\n const $hasSuffix = Boolean(suffix)\n const $hasPrefix = Boolean(prefix)\n\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(\n forwardedRef,\n () => ref.current,\n )\n\n useCustomValidity(ref, customValidity)\n\n // Prevent the clear button from taking the focus away from the input\n const handleClearMouseDown = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n }, [])\n\n const handleClearClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n event.preventDefault()\n event.stopPropagation()\n\n if (onClear) onClear()\n\n // Focus the input, in case focus has been lost when clicking the clear button\n ref.current?.focus()\n },\n [onClear, ref],\n )\n\n // Render prefix (memoized)\n const prefixNode = useMemo(\n () =>\n prefix && (\n <Prefix borderTop borderLeft borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{prefix}</span>\n </Prefix>\n ),\n [prefix, radius],\n )\n\n // Render presentation (memoized)\n const presentationNode = useMemo(\n () => (\n <Presentation\n $hasPrefix={$hasPrefix}\n $unstableDisableFocusRing={__unstable_disableFocusRing}\n $hasSuffix={$hasSuffix}\n $radius={radius}\n $scheme={rootTheme.scheme}\n $tone={rootTheme.tone}\n data-border={border ? '' : undefined}\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n >\n {IconComponent && (\n <LeftBox padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n </LeftBox>\n )}\n\n {!$hasClearButton && IconRightComponent && (\n <RightBox padding={padding}>\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n </RightBox>\n )}\n </Presentation>\n ),\n [\n __unstable_disableFocusRing,\n border,\n fontSize,\n IconComponent,\n IconRightComponent,\n padding,\n radius,\n rootTheme,\n $hasClearButton,\n $hasPrefix,\n $hasSuffix,\n ],\n )\n\n // Render clear button (memoized)\n const clearButtonBoxPadding = useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 1\n if (v === 2) return 1\n\n return v - 2\n }),\n [padding],\n )\n const clearButtonPadding = useMemo(\n () =>\n padding.map((v) => {\n if (v === 0) return 0\n if (v === 1) return 0\n if (v === 2) return 1\n\n return v - 1\n }),\n [padding],\n )\n const clearButtonProps: TextInputClearButtonProps = useMemo(\n () => (typeof clearButton === 'object' ? clearButton : EMPTY_RECORD),\n [clearButton],\n )\n const clearButtonNode = useMemo(\n () =>\n !disabled &&\n !readOnly &&\n clearButton && (\n <RightCard\n forwardedAs=\"span\"\n padding={clearButtonBoxPadding}\n style={CLEAR_BUTTON_BOX_STYLE}\n tone={customValidity ? 'critical' : 'inherit'}\n >\n <TextInputClearButton\n aria-label=\"Clear\"\n data-qa=\"clear-button\"\n fontSize={fontSize}\n icon={CloseIcon}\n mode=\"bleed\"\n padding={clearButtonPadding}\n radius={radius}\n {...clearButtonProps}\n onClick={handleClearClick}\n onMouseDown={handleClearMouseDown}\n />\n </RightCard>\n ),\n [\n clearButton,\n clearButtonBoxPadding,\n clearButtonPadding,\n clearButtonProps,\n customValidity,\n disabled,\n fontSize,\n handleClearClick,\n handleClearMouseDown,\n radius,\n readOnly,\n ],\n )\n\n // Render suffix (memoized)\n const suffixNode = useMemo(\n () =>\n suffix && (\n <Suffix borderTop borderRight borderBottom radius={radius} sizing=\"border\" tone=\"inherit\">\n <span>{suffix}</span>\n </Suffix>\n ),\n [radius, suffix],\n )\n\n return (\n <StyledTextInput data-ui=\"TextInput\" tone={rootTheme.tone}>\n {prefixNode}\n\n <InputRoot>\n <Input\n data-as=\"input\"\n data-scheme={rootTheme.scheme}\n data-tone={rootTheme.tone}\n {...restProps}\n $fontSize={fontSize}\n $iconLeft={$hasIcon}\n $iconRight={$hasIconRight || $hasClearButton}\n $padding={padding}\n $scheme={rootTheme.scheme}\n $space={space}\n $tone={rootTheme.tone}\n $weight={weight}\n disabled={disabled}\n readOnly={readOnly}\n ref={ref}\n type={type}\n />\n\n {presentationNode}\n {clearButtonNode}\n </InputRoot>\n\n {suffixNode}\n </StyledTextInput>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,SAAgBA,KAAKC,IAA4B;CAC/C,IAAMC,UAAUC,sBAAsBF,EAAE;CAExC,aAAa;EACXG,qBAAqBF,OAAO;CAC9B;AACF;;;;AAKA,SAAgBG,MAAMJ,IAA4B;CAChD,IAAIK,eAAoC,MAElCC,eAAeP,WAAW;EAC9BM,eAAeN,KAAKC,EAAE;CACxB,CAAC;CAED,aAAa;EAGXM,AAFID,gBAAcA,aAAa,GAE/BC,aAAa;CACf;AACF;;;;ACVA,SAAgBO,UAAUC,SAA+B;CACvD,OAAOE,EAAQC,SAASC,iBAAkBJ,QAAQK,SAASF,SAASC,aAAa;AACnF;;;;AAKA,SAAgBE,YAAYN,SAA+B;CAwBzD,OAtBEA,QAAQO,WAAW,KAClBP,QAAQO,aAAa,KAAKP,QAAQQ,aAAa,UAAU,MAAM,OAEzD,KAGLf,oBAAoBO,OAAO,IACtBE,EAAQF,QAAQS,QAAST,QAAQU,QAAQ,WAG9Cd,mBAAmBI,OAAO,IACrBA,QAAQW,SAAS,YAAYX,QAAQW,SAAS,UAAU,CAACX,QAAQY,WAIxElB,oBAAoBM,OAAO,KAC3BH,oBAAoBG,OAAO,KAC3BF,sBAAsBE,OAAO,IAEtB,CAACA,QAAQY,WAGX;AACT;;;;AAKA,SAAgBC,aAAab,SAA+B;CAC1D,IAAI,CAACM,YAAYN,OAAO,GACtB,OAAO;CAKT,IAAI;EACFA,QAAQc,MAAM;CAChB,QAAQ,CACN;CAKF,OAAOX,SAASC,kBAAkBJ;AACpC;;;;AAKA,SAAgBe,qBAAqBf,SAA+B;C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AA,MAAArB,QAAAqB,EAAA,MAAAkE,OAAAA,MAAAlE,EAAA;CAAA,IAAAmE;CAAA,AAAAnE,EAAA,QAAA8D,mBAAA9D,EAAA,QAAAoD,oBAAApD,EAAA,QAAAkE,OAlBJC,MAAA,qBAAC,WAAD,EAAA,UAAA;EACED;EAmBCd;EACAU;CArBO,EAAA,CAAA,GAsBE9D,EAAA,MAAA8D,iBAAA9D,EAAA,MAAAoD,kBAAApD,EAAA,MAAAkE,KAAAlE,EAAA,MAAAmE,OAAAA,MAAAnE,EAAA;CAAA,IAAAoE;CAGI,OAHJpE,EAAA,QAAA6C,cAAA7C,EAAA,QAAAoB,UAAA+B,QAAAnD,EAAA,QAAAgE,cAAAhE,EAAA,QAAAmE,OAzBdC,MAAA,qBAAC,iBAAD;EAAyB,WAAA;EAAkB,MAAAhD,UAAS+B;EAApD,UAAA;GACGN;GAEDsB;GAwBCH;EA3Ba;KA4BEhE,EAAA,MAAA6C,YAAA7C,EAAA,MAAAoB,UAAA+B,MAAAnD,EAAA,MAAAgE,YAAAhE,EAAA,MAAAmE,KAAAnE,EAAA,MAAAoE,OAAAA,MAAApE,EAAA,KA5BlBoE;AA4BkB;AAxOf,SAAAV,OAAAW,KAAA;CA8IsB,OAFjBC,QAAM,KACNA,QAAM,IAAU,IAChBA,QAAM,IAAU,IAEbA,MAAI;AAAC;AAhJb,SAAAf,OAAAe,GAAA;CAmIsB,OAFjBA,MAAM,IAAU,IAChBA,MAAM,KACNA,MAAM,IAAU,IAEbA,IAAI;AAAC;AArIb,SAAAlC,MAAAG,OAAA;CAkDHA,AADAA,MAAKC,eAAgB,GACrBD,MAAKE,gBAAiB;AAAC"}
package/dist/toast.js CHANGED
@@ -3,7 +3,7 @@ import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
3
3
  import { d as createGlobalScopedContext, i as usePrefersReducedMotion, n as LayerProvider, r as isRecord, s as Card, t as useLayer, y as Box } from "./useLayer-9Pz-GG0r.js";
4
4
  import { t as Flex } from "./flex-BYRpBTOc.js";
5
5
  import { n as Text, t as Stack } from "./stack-C5WV-BRh.js";
6
- import { t as Button } from "./button-DZkAQOL2.js";
6
+ import { t as Button } from "./button-BDLRd1Rr.js";
7
7
  import { t as Grid } from "./grid-D88j-N7f.js";
8
8
  import { c } from "react/compiler-runtime";
9
9
  import { startTransition, useContext, useState, useSyncExternalStore } from "react";
package/dist/tooltip.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as Delay, n as LayerProps, r as Placement } from "./layer-BQfdK7rt.js";
1
+ import { i as Delay, n as LayerProps, r as Placement } from "./layer-ChlP9Ik6.js";
2
2
  import { s as ThemeColorSchemeKey } from "./_system-CTe2lb5l.js";
3
3
  /**
4
4
  * @public
@@ -43,7 +43,7 @@ interface TooltipProps extends Omit<LayerProps, 'as'> {
43
43
  *
44
44
  * @public
45
45
  */
46
- declare const Tooltip: (props: TooltipProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content'>) => import("react").JSX.Element;
46
+ declare function Tooltip(props: TooltipProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content'>): import("react").JSX.Element;
47
47
  /**
48
48
  * @beta
49
49
  */
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","names":[],"sources":["../src/core/primitives/tooltip/tooltip.tsx","../src/core/primitives/tooltip/tooltipDelayGroup/types.ts","../src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx","../src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx","../src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts"],"mappings":";;;;;UAuDiB,qBAAqB,KAAK;;EAEzC;EACA;EACA,kBAAkB;EAClB,WAAW,MAAM,IAAI;EACrB,UAAU,MAAM;EAChB;EACA,qBAAqB;EACrB;EACA,YAAY;;EAEZ;EACA;EACA,SAAS;EACT;;;;;;;;;;;EAWA,QAAQ;;;;;;;EAOR;;;;;;;cAYW,UAAO,OACX,eAAe,KAAK,MAAM,UAAU,oEAA+C,IAAA;;;;UClG3E;EAEf,mBAAmB,WAAW,MAAM,yBAAyB;EAE7D,mBAAmB,uBAAuB;EAC1C;EACA;EACA;;;;;cCJW,0CAAwB,QAAA;;;;UCIpB;EACf,WAAW,MAAM;;;;;;;;;;EAUjB,OAAO;;;;;;;iBAQO,0BACd,OAAO,iCACN,MAAM,IAAI;;;;iBCvBG,wBAAwB"}
1
+ {"version":3,"file":"tooltip.d.ts","names":[],"sources":["../src/core/primitives/tooltip/tooltip.tsx","../src/core/primitives/tooltip/tooltipDelayGroup/types.ts","../src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx","../src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx","../src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts"],"mappings":";;;;;UAuDiB,qBAAqB,KAAK;;EAEzC;EACA;EACA,kBAAkB;EAClB,WAAW,MAAM,IAAI;EACrB,UAAU,MAAM;EAChB;EACA,qBAAqB;EACrB;EACA,YAAY;;EAEZ;EACA;EACA,SAAS;EACT;;;;;;;;;;;EAWA,QAAQ;;;;;;;EAOR;;;;;;;iBAYc,QACd,OAAO,eAAe,KAAK,MAAM,UAAU,kEAA+C,IAAA;;;;UClG3E;EAEf,mBAAmB,WAAW,MAAM,yBAAyB;EAE7D,mBAAmB,uBAAuB;EAC1C;EACA;EACA;;;;;cCJW,0CAAwB,QAAA;;;;UCIpB;EACf,WAAW,MAAM;;;;;;;;;;EAUjB,OAAO;;;;;;;iBAQO,0BACd,OAAO,iCACN,MAAM,IAAI;;;;iBCvBG,wBAAwB"}