@sanity/ui 4.1.1 → 4.2.1

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 (44) hide show
  1. package/dist/{arrow-DKn5YKdy.js → arrow-D-raLuvE.js} +57 -49
  2. package/dist/arrow-D-raLuvE.js.map +1 -0
  3. package/dist/autocomplete.d.ts.map +1 -1
  4. package/dist/autocomplete.js +118 -122
  5. package/dist/autocomplete.js.map +1 -1
  6. package/dist/breadcrumbs.js +10 -5
  7. package/dist/breadcrumbs.js.map +1 -1
  8. package/dist/{button-Dh_M2fYx.js → button-D8Ge5vTw.js} +6 -5
  9. package/dist/button-D8Ge5vTw.js.map +1 -0
  10. package/dist/{flex-DmbDG2ks.js → flex-JVQRW_e_.js} +2 -2
  11. package/dist/{flex-DmbDG2ks.js.map → flex-JVQRW_e_.js.map} +1 -1
  12. package/dist/{grid-6JSgMj1O.js → grid-Dw7q0_YV.js} +2 -2
  13. package/dist/{grid-6JSgMj1O.js.map → grid-Dw7q0_YV.js.map} +1 -1
  14. package/dist/{hotkeys-uSArGPzR.js → hotkeys-DTjEz_u3.js} +9 -6
  15. package/dist/hotkeys-DTjEz_u3.js.map +1 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +168 -250
  18. package/dist/index.js.map +1 -1
  19. package/dist/{layer-BfwisMR6.js → layer-dwv5h6E7.js} +3 -3
  20. package/dist/{layer-BfwisMR6.js.map → layer-dwv5h6E7.js.map} +1 -1
  21. package/dist/menu.js +5 -5
  22. package/dist/{popover-myCXZV_F.js → popover-BngOa-um.js} +14 -11
  23. package/dist/popover-BngOa-um.js.map +1 -0
  24. package/dist/popover-CMlQeKn0.d.ts.map +1 -1
  25. package/dist/popover.js +1 -1
  26. package/dist/{stack-rsNFPq2-.js → stack-Bue-701Y.js} +2 -2
  27. package/dist/{stack-rsNFPq2-.js.map → stack-Bue-701Y.js.map} +1 -1
  28. package/dist/styles.css +156 -36
  29. package/dist/{textInput-DAaORuky.js → textInput-C83gG7N5.js} +23 -19
  30. package/dist/textInput-C83gG7N5.js.map +1 -0
  31. package/dist/toast.js +38 -43
  32. package/dist/toast.js.map +1 -1
  33. package/dist/tooltip.js +53 -49
  34. package/dist/tooltip.js.map +1 -1
  35. package/dist/useClickOutsideEvent-wGLGWBZN.js.map +1 -1
  36. package/dist/{useLayer-D1usxIE0.js → useLayer-ONr7wTUN.js} +52 -31
  37. package/dist/useLayer-ONr7wTUN.js.map +1 -0
  38. package/package.json +11 -10
  39. package/dist/arrow-DKn5YKdy.js.map +0 -1
  40. package/dist/button-Dh_M2fYx.js.map +0 -1
  41. package/dist/hotkeys-uSArGPzR.js.map +0 -1
  42. package/dist/popover-myCXZV_F.js.map +0 -1
  43. package/dist/textInput-DAaORuky.js.map +0 -1
  44. package/dist/useLayer-D1usxIE0.js.map +0 -1
@@ -1,9 +1,10 @@
1
- import { _ as useTheme_v2, d as createGlobalScopedContext, f as globalScope, r as isRecord } from "./useLayer-D1usxIE0.js";
1
+ import { _ as useTheme_v2, d as createGlobalScopedContext, f as globalScope, r as isRecord } from "./useLayer-ONr7wTUN.js";
2
2
  import { c } from "react/compiler-runtime";
3
- import { useContext } from "react";
4
- import { css, styled } from "styled-components";
3
+ import { clsx } from "clsx/lite";
4
+ import { useContext, useId } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { createPortal } from "react-dom";
7
+ import { assignInlineVars } from "@vanilla-extract/dynamic";
7
8
  const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null), DEFAULT_VALUE = {
8
9
  version: 0,
9
10
  element: null
@@ -78,22 +79,13 @@ function getRoundedCommands(points) {
78
79
  function compileCommands(cmds) {
79
80
  return cmds.map((n, idx) => n.type === "point" ? `${idx === 0 ? "M" : "L"} ${n.x} ${n.y}` : n.type === "curve" ? `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}` : "").join(" ");
80
81
  }
81
- const StyledArrow = /* @__PURE__ */ styled.div.withConfig({
82
- displayName: "StyledArrow",
83
- componentId: "sc-q06uyo-0"
84
- })(({ $w: w }) => css`position:absolute;width:${w}px;height:${w}px;:empty + &{display:none;}& > svg{display:block;line-height:0;transform-origin:${w / 2}px ${w / 2}px;}[data-placement^='top'] > &{bottom:-${w}px;& > svg{transform:rotate(0);}}[data-placement^='right'] > &{left:-${w}px;& > svg{transform:rotate(90deg);}}[data-placement^='left'] > &{right:-${w}px;& > svg{transform:rotate(-90deg);}}[data-placement^='bottom'] > &{top:-${w}px;& > svg{transform:rotate(180deg);}}`), StrokePath = styled.path.withConfig({
85
- displayName: "StrokePath",
86
- componentId: "sc-q06uyo-1"
87
- })`stroke:var(--card-shadow-outline-color);`, ShapePath = styled.path.withConfig({
88
- displayName: "ShapePath",
89
- componentId: "sc-q06uyo-2"
90
- })`fill:var(--card-bg-color);`;
82
+ var arrow = "_62mlcb1", arrowShape = "_62mlcb3", arrowSize = "var(--_62mlcb0)", arrowStroke = "_62mlcb2";
91
83
  /** @internal */
92
84
  function Arrow(props) {
93
- let $ = c(30), h, ref, restProps, t0, w;
94
- $[0] === props ? (h = $[1], ref = $[2], restProps = $[3], t0 = $[4], w = $[5]) : ({width: w, height: h, radius: t0, ref, ...restProps} = props, $[0] = props, $[1] = h, $[2] = ref, $[3] = restProps, $[4] = t0, $[5] = w);
95
- let radius = t0 === void 0 ? 0 : t0, { card } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, t1;
96
- $[6] !== center || $[7] !== h || $[8] !== radius || $[9] !== w ? (t1 = compileCommands(getRoundedCommands([
85
+ let $ = c(44), className, h, ref, restProps, style, t0, w;
86
+ $[0] === props ? (className = $[1], h = $[2], ref = $[3], restProps = $[4], style = $[5], t0 = $[6], w = $[7]) : ({className, width: w, height: h, radius: t0, ref, style, ...restProps} = props, $[0] = props, $[1] = className, $[2] = h, $[3] = ref, $[4] = restProps, $[5] = style, $[6] = t0, $[7] = w);
87
+ let radius = t0 === void 0 ? 0 : t0, { card } = useTheme_v2(), strokeMaskId = `stroke-mask-${useId()}`, strokeWidth = card.shadow.outline, center = w / 2, t1;
88
+ $[8] !== center || $[9] !== h || $[10] !== radius || $[11] !== w ? (t1 = compileCommands(getRoundedCommands([
97
89
  {
98
90
  x: 0,
99
91
  y: 0
@@ -117,46 +109,62 @@ function Arrow(props) {
117
109
  x: w,
118
110
  y: 0
119
111
  }
120
- ])), $[6] = center, $[7] = h, $[8] = radius, $[9] = w, $[10] = t1) : t1 = $[10];
121
- let path = t1, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`, t2 = `0 0 ${w} ${w}`, t3;
122
- $[11] !== strokeWidth || $[12] !== w ? (t3 = /* @__PURE__ */ jsx("mask", {
123
- id: "stroke-mask",
124
- children: /* @__PURE__ */ jsx("rect", {
125
- x: 0,
126
- y: strokeWidth,
127
- width: w,
128
- height: w,
129
- fill: "white"
130
- })
131
- }), $[11] = strokeWidth, $[12] = w, $[13] = t3) : t3 = $[13];
132
- let t4 = strokeWidth * 2, t5;
133
- $[14] !== strokePath || $[15] !== t4 ? (t5 = /* @__PURE__ */ jsx(StrokePath, {
112
+ ])), $[8] = center, $[9] = h, $[10] = radius, $[11] = w, $[12] = t1) : t1 = $[12];
113
+ let path = t1, strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`, t2;
114
+ $[13] === className ? t2 = $[14] : (t2 = clsx(arrow, className), $[13] = className, $[14] = t2);
115
+ let t3 = `${w}px`, t4;
116
+ $[15] === t3 ? t4 = $[16] : (t4 = assignInlineVars({ [arrowSize]: t3 }), $[15] = t3, $[16] = t4);
117
+ let t5;
118
+ $[17] !== style || $[18] !== t4 ? (t5 = {
119
+ ...style,
120
+ ...t4
121
+ }, $[17] = style, $[18] = t4, $[19] = t5) : t5 = $[19];
122
+ let t6 = `0 0 ${w} ${w}`, t7;
123
+ $[20] !== strokeWidth || $[21] !== w ? (t7 = /* @__PURE__ */ jsx("rect", {
124
+ x: 0,
125
+ y: strokeWidth,
126
+ width: w,
127
+ height: w,
128
+ fill: "white"
129
+ }), $[20] = strokeWidth, $[21] = w, $[22] = t7) : t7 = $[22];
130
+ let t8;
131
+ $[23] !== strokeMaskId || $[24] !== t7 ? (t8 = /* @__PURE__ */ jsx("mask", {
132
+ id: strokeMaskId,
133
+ children: t7
134
+ }), $[23] = strokeMaskId, $[24] = t7, $[25] = t8) : t8 = $[25];
135
+ let t9 = `url(#${strokeMaskId})`, t10 = strokeWidth * 2, t11;
136
+ $[26] !== strokePath || $[27] !== t10 || $[28] !== t9 ? (t11 = /* @__PURE__ */ jsx("path", {
137
+ className: arrowStroke,
134
138
  d: strokePath,
135
- mask: "url(#stroke-mask)",
136
- strokeWidth: t4
137
- }), $[14] = strokePath, $[15] = t4, $[16] = t5) : t5 = $[16];
138
- let t6;
139
- $[17] === fillPath ? t6 = $[18] : (t6 = /* @__PURE__ */ jsx(ShapePath, { d: fillPath }), $[17] = fillPath, $[18] = t6);
140
- let t7;
141
- $[19] !== t2 || $[20] !== t3 || $[21] !== t5 || $[22] !== t6 || $[23] !== w ? (t7 = /* @__PURE__ */ jsxs("svg", {
139
+ mask: t9,
140
+ strokeWidth: t10
141
+ }), $[26] = strokePath, $[27] = t10, $[28] = t9, $[29] = t11) : t11 = $[29];
142
+ let t12;
143
+ $[30] === fillPath ? t12 = $[31] : (t12 = /* @__PURE__ */ jsx("path", {
144
+ className: arrowShape,
145
+ d: fillPath
146
+ }), $[30] = fillPath, $[31] = t12);
147
+ let t13;
148
+ $[32] !== t11 || $[33] !== t12 || $[34] !== t6 || $[35] !== t8 || $[36] !== w ? (t13 = /* @__PURE__ */ jsxs("svg", {
142
149
  width: w,
143
150
  height: w,
144
- viewBox: t2,
151
+ viewBox: t6,
145
152
  children: [
146
- t3,
147
- t5,
148
- t6
153
+ t8,
154
+ t11,
155
+ t12
149
156
  ]
150
- }), $[19] = t2, $[20] = t3, $[21] = t5, $[22] = t6, $[23] = w, $[24] = t7) : t7 = $[24];
151
- let t8;
152
- return $[25] !== ref || $[26] !== restProps || $[27] !== t7 || $[28] !== w ? (t8 = /* @__PURE__ */ jsx(StyledArrow, {
157
+ }), $[32] = t11, $[33] = t12, $[34] = t6, $[35] = t8, $[36] = w, $[37] = t13) : t13 = $[37];
158
+ let t14;
159
+ return $[38] !== ref || $[39] !== restProps || $[40] !== t13 || $[41] !== t2 || $[42] !== t5 ? (t14 = /* @__PURE__ */ jsx("div", {
153
160
  "data-ui": "Arrow",
154
161
  ...restProps,
155
- $w: w,
162
+ className: t2,
156
163
  ref,
157
- children: t7
158
- }), $[25] = ref, $[26] = restProps, $[27] = t7, $[28] = w, $[29] = t8) : t8 = $[29], t8;
164
+ style: t5,
165
+ children: t13
166
+ }), $[38] = ref, $[39] = restProps, $[40] = t13, $[41] = t2, $[42] = t5, $[43] = t14) : t14 = $[43], t14;
159
167
  }
160
168
  export { useBoundaryElement as a, PortalContext as i, Portal as n, BoundaryElementContext as o, usePortal as r, Arrow as t };
161
169
 
162
- //# sourceMappingURL=arrow-DKn5YKdy.js.map
170
+ //# sourceMappingURL=arrow-D-raLuvE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-D-raLuvE.js","names":["createPortal(children, portalElement)","radius = 0","compileCommands(cmds)","clsx(arrow, className)","assignInlineVars({[arrowSize]: `${w}px`})","`${w}px`","{...style, ...assignInlineVars({[arrowSize]: `${w}px`})}","<rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />","<mask id={strokeMaskId}>\n <rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />\n </mask>","<path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />","strokeWidth * 2","`url(#${strokeMaskId})`","<path className={arrowShape} d={fillPath} />","<svg width={w} height={w} viewBox={`0 0 ${w} ${w}`}>\n <mask id={strokeMaskId}>\n <rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />\n </mask>\n <path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />\n <path className={arrowShape} d={fillPath} />\n </svg>","`0 0 ${w} ${w}`","<div\n data-ui=\"Arrow\"\n {...restProps}\n className={clsx(arrow, className)}\n ref={ref}\n style={{...style, ...assignInlineVars({[arrowSize]: `${w}px`})}}\n >\n <svg width={w} height={w} viewBox={`0 0 ${w} ${w}`}>\n <mask id={strokeMaskId}>\n <rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />\n </mask>\n <path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />\n <path className={arrowShape} d={fillPath} />\n </svg>\n </div>"],"sources":["../src/core/utils/boundaryElement/boundaryElementContext.ts","../src/core/utils/boundaryElement/useBoundaryElement.ts","../src/core/utils/portal/portalContext.ts","../src/core/utils/portal/usePortal.ts","../src/core/utils/portal/portal.ts","../src/core/utils/arrow/cmds.ts","../src/core/utils/arrow/arrow.css.ts","../src/core/utils/arrow/arrow.tsx"],"sourcesContent":["import {createGlobalScopedContext} from '../../lib/createGlobalScopedContext'\nimport {BoundaryElementContextValue} from './types'\n\nexport const BoundaryElementContext = createGlobalScopedContext<BoundaryElementContextValue | null>(\n '@sanity/ui/context/boundaryElement',\n null,\n)\n","import {useContext} from 'react'\n\nimport {isRecord} from '../../lib/isRecord'\nimport {BoundaryElementContext} from './boundaryElementContext'\nimport {BoundaryElementContextValue} from './types'\n\nconst DEFAULT_VALUE: BoundaryElementContextValue = {\n version: 0.0,\n element: null,\n}\n\n/**\n * @public\n */\nexport function useBoundaryElement(): BoundaryElementContextValue {\n const value = useContext(BoundaryElementContext)\n\n // NOTE: This check is for future-compatiblity\n // - If the value is not an object, it’s not compatible with the current version\n // - If the value is an object, but doesn’t have `version: 0.0`, it’s not compatible with the current version\n if (value && (!isRecord(value) || value.version !== 0.0)) {\n throw new Error('useBoundaryElement(): the context value is not compatible')\n }\n\n return value || DEFAULT_VALUE\n}\n","import {createGlobalScopedContext} from '../../lib/createGlobalScopedContext'\nimport {globalScope} from '../../lib/globalScope'\nimport {PortalContextValue} from './types'\n\nconst key = '@sanity/ui/context/portal'\nconst elementKey = Symbol.for(`${key}/element`)\n\nglobalScope[elementKey] = null\n\nconst defaultContextValue: PortalContextValue = {\n version: 0.0,\n boundaryElement: null,\n get element() {\n if (typeof document === 'undefined') {\n return null\n }\n\n if (globalScope[elementKey]) {\n return globalScope[elementKey]\n }\n\n globalScope[elementKey] = document.createElement('div')\n globalScope[elementKey].setAttribute('data-portal', '')\n\n document.body.appendChild(globalScope[elementKey])\n\n return globalScope[elementKey]\n },\n}\n\nexport const PortalContext = createGlobalScopedContext<PortalContextValue>(key, defaultContextValue)\n","import {useContext} from 'react'\n\nimport {isRecord} from '../../lib/isRecord'\nimport {PortalContext} from './portalContext'\nimport {PortalContextValue} from './types'\n\n/**\n * @public\n */\nexport function usePortal(): PortalContextValue {\n const value = useContext(PortalContext)\n\n if (!value) {\n throw new Error('usePortal(): missing context value')\n }\n\n // NOTE: This check is for future-compatiblity\n // - If the value is not an object, it’s not compatible with the current version\n // - If the value is an object, but doesn’t have `version: 0.0`, it’s not compatible with the current version\n if (!isRecord(value) || value.version !== 0.0) {\n throw new Error('usePortal(): the context value is not compatible')\n }\n\n return value\n}\n","import {createPortal} from 'react-dom'\n\nimport {usePortal} from './usePortal'\n\n/**\n * @public\n */\nexport interface PortalProps {\n children: React.ReactNode\n /**\n * @beta This API might change. DO NOT USE IN PRODUCTION.\n */\n __unstable_name?: string\n}\n\n/**\n * @public\n */\nexport function Portal(props: PortalProps): React.ReactPortal | null {\n const {children, __unstable_name: name} = props\n const portal = usePortal()\n const portalElement =\n (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default\n\n if (!portalElement) {\n return null\n }\n\n return createPortal(children, portalElement)\n}\n","interface PointCmd {\n type: 'point'\n x: number\n y: number\n radius?: number\n}\n\ninterface CurveCmd {\n type: 'curve'\n startControl: Point\n endControl: Point\n curveEnd: Point\n}\n\nexport type Cmd = PointCmd | CurveCmd\n\nexport interface Point {\n x: number\n y: number\n radius?: number\n}\n\nfunction moveTowardsLength(movingPoint: Point, targetPoint: Point, amount: number) {\n const width = targetPoint.x - movingPoint.x\n const height = targetPoint.y - movingPoint.y\n\n const distance = Math.sqrt(width * width + height * height)\n\n return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance))\n}\n\nfunction moveTowardsFractional(movingPoint: Point, targetPoint: Point, fraction: number): Point {\n return {\n x: movingPoint.x + (targetPoint.x - movingPoint.x) * fraction,\n y: movingPoint.y + (targetPoint.y - movingPoint.y) * fraction,\n }\n}\n\nexport function getRoundedCommands(points: Point[]): Cmd[] {\n const len = points.length\n\n const cmds: Cmd[] = []\n\n for (let i = 0; i < len; i += 1) {\n const point = points[i]\n const prevPoint = points[i - 1]\n const nextPoint = points[i + 1]\n\n if (prevPoint && point.radius) {\n const curveStart = moveTowardsLength(point, prevPoint, point.radius)\n const curveEnd = moveTowardsLength(point, nextPoint, point.radius)\n const startControl = moveTowardsFractional(curveStart, point, 0.5)\n const endControl = moveTowardsFractional(point, curveEnd, 0.5)\n\n cmds.push({\n type: 'point',\n ...curveStart,\n })\n\n cmds.push({\n type: 'curve',\n curveEnd,\n startControl,\n endControl,\n })\n } else {\n cmds.push({\n type: 'point',\n ...point,\n })\n }\n }\n\n return cmds\n}\n\nexport function compileCommands(cmds: Cmd[]): string {\n return cmds\n .map((n, idx) => {\n if (n.type === 'point') {\n return `${idx === 0 ? 'M' : 'L'} ${n.x} ${n.y}`\n }\n\n if (n.type === 'curve') {\n return `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}`\n }\n\n return ``\n })\n .join(' ')\n}\n","import {createVar, globalStyle, style} from '@vanilla-extract/css'\n\nexport const arrowSize = createVar()\n\nexport const arrow = style({\n position: 'absolute',\n width: arrowSize,\n height: arrowSize,\n selectors: {\n ':empty + &': {display: 'none'},\n \"[data-placement^='top'] > &\": {bottom: `calc(-1 * ${arrowSize})`},\n \"[data-placement^='right'] > &\": {left: `calc(-1 * ${arrowSize})`},\n \"[data-placement^='left'] > &\": {right: `calc(-1 * ${arrowSize})`},\n \"[data-placement^='bottom'] > &\": {top: `calc(-1 * ${arrowSize})`},\n },\n})\n\nglobalStyle(`${arrow} > svg`, {\n display: 'block',\n lineHeight: 0,\n transformOrigin: `calc(${arrowSize} / 2) calc(${arrowSize} / 2)`,\n})\n\nglobalStyle(`[data-placement^='top'] > ${arrow} > svg`, {transform: 'rotate(0)'})\nglobalStyle(`[data-placement^='right'] > ${arrow} > svg`, {transform: 'rotate(90deg)'})\nglobalStyle(`[data-placement^='left'] > ${arrow} > svg`, {transform: 'rotate(-90deg)'})\nglobalStyle(`[data-placement^='bottom'] > ${arrow} > svg`, {transform: 'rotate(180deg)'})\n\nexport const arrowStroke = style({\n stroke: 'var(--card-shadow-outline-color)',\n})\n\nexport const arrowShape = style({\n fill: 'var(--card-bg-color)',\n})\n","import {assignInlineVars} from '@vanilla-extract/dynamic'\nimport {clsx} from 'clsx/lite'\nimport {HTMLProps, useId} from 'react'\n\nimport {useTheme_v2} from '../../theme/useTheme'\nimport {compileCommands, getRoundedCommands, Point} from './cmds'\n\nimport {arrow, arrowShape, arrowSize, arrowStroke} from './arrow.css'\n\n/** @internal */\nexport function Arrow(\n props: {width: number; height: number; radius?: number} & Omit<\n HTMLProps<HTMLDivElement>,\n 'width' | 'height'\n >,\n): React.JSX.Element {\n const {className, width: w, height: h, radius = 0, ref, style, ...restProps} = props\n const {card} = useTheme_v2()\n const strokeMaskId = `stroke-mask-${useId()}`\n const strokeWidth = card.shadow.outline\n\n const center = w / 2\n\n const points: Point[] = [\n {\n x: 0,\n y: 0,\n },\n {\n x: radius,\n y: 0,\n radius,\n },\n {\n x: center,\n y: h - 1,\n radius,\n },\n {\n x: w - radius,\n y: 0,\n radius,\n },\n {\n x: w,\n y: 0,\n },\n ]\n\n const cmds = getRoundedCommands(points)\n const path = compileCommands(cmds)\n\n // oxlint-disable-next-line no-unnecessary-template-expression\n const strokePath = `${path}`\n const fillPath = `${path} M ${w} -1 M 0 -1 Z`\n\n return (\n <div\n data-ui=\"Arrow\"\n {...restProps}\n className={clsx(arrow, className)}\n ref={ref}\n style={{...style, ...assignInlineVars({[arrowSize]: `${w}px`})}}\n >\n <svg width={w} height={w} viewBox={`0 0 ${w} ${w}`}>\n <mask id={strokeMaskId}>\n <rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />\n </mask>\n <path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />\n <path className={arrowShape} d={fillPath} />\n </svg>\n </div>\n )\n}\n"],"mappings":";;;;;;;AAGA,MAAa,yBAAyB,0BACpC,sCACA,IACF,GCAM,gBAA6C;CACjD,SAAS;CACT,SAAS;AACX;;;;AAKA,SAAgB,qBAAkD;CAChE,IAAM,QAAQ,WAAW,sBAAsB;CAK/C,IAAI,UAAU,CAAC,SAAS,KAAK,KAAK,MAAM,YAAY,IAClD,MAAU,MAAM,2DAA2D;CAG7E,OAAO,SAAS;AAClB;ACrBA,MAAM,MAAM,6BACN,aAAa,OAAO,IAAI,GAAG,IAAI,SAAS;AAE9C,YAAY,cAAc;AAuB1B,MAAa,gBAAgB,0BAA8C,KAAK;CApB9E,SAAS;CACT,iBAAiB;CACjB,IAAI,UAAU;EAcZ,OAbI,OAAO,WAAa,MACf,OAGL,YAAY,cACP,YAAY,eAGrB,YAAY,cAAc,SAAS,cAAc,KAAK,GACtD,YAAY,WAAW,CAAC,aAAa,eAAe,EAAE,GAEtD,SAAS,KAAK,YAAY,YAAY,WAAW,GAE1C,YAAY;CACrB;AAG8E,CAAmB;;;;ACrBnG,SAAgB,YAAgC;CAC9C,IAAM,QAAQ,WAAW,aAAa;CAEtC,IAAI,CAAC,OACH,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VlCC,IAAAA;CAIEJ,AAAAA,EAAAA,QAAAA,OAAAA,EAAAA,QAMAG,OAAAA,EAAAA,QAViCE,MAAAA,EAAAA,QACjCN,MAAAA,EAAAA,QADU,KAAZ,MAAA,qBAAC,OAAD;EAAK,OAAO;EAAG,QAAQ;EAAG,SAASM;EAAnC,UAAA;GACEN;GAGAC;GAMAG;EACG;KAPHH,EAAAA,MAAAA,KAMAG,EAAAA,MAAAA,KAViCE,EAAAA,MAAAA,IACjCN,EAAAA,MAAAA,IADU,EAAA,MAAA;CAPdO,IAAAA;CADF,OAKS,EAAA,QAAA,OAAA,EAAA,QAFD,aAAA,EAAA,QAKJF,OAAAA,EAAAA,QAJWV,MAAAA,EAAAA,QAEJG,MALT,MAAA,oBAAC,OAAD;EACE,WAAQ;EACR,GAAI;EACJ,WAAWH;EACN;EACL,OAAOG;EAEPO,UAAAA;CAYG,CAAA,GAfE,EAAA,MAAA,KAFD,EAAA,MAAA,WAKJA,EAAAA,MAAAA,KAJWV,EAAAA,MAAAA,IAEJG,EAAAA,MAAAA,gCALTS;AAqBJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/core/components/autocomplete/types.ts","../src/core/components/autocomplete/autocomplete.tsx"],"mappings":";;;;;;;KAKY,8BAA8B,iBACxC,KAAK,MAAM,UAAU;;;;UAKN;EACf;;;;;UAMe;EACf;EACA;EACA;EACA;EACA;;;;;UAMe;EACf;;;;;UAMe;EACf;;;;;UAMe;EACf;;;;;UAMe;EACf;EACA;;;;;UAMe;EACf;EACA;EACA;;;;;UAMe;EACf;EACA;;;;;UAMe;EACf;EACA;;;;;UAMe;EACf;;;;;UAMe;EACf;EACA;;;;;KAMU,kBACR,0BACA,2BACA,4BACA,0BACA,oCACA,oCACA,6BACA,6BACA;;;;UCzDa,kBAAkB,eAAe,yBAAyB;EACzE;EACA;EACA,gBAAgB,eAAe,QAAQ;EACvC;EAEA,OAAO,cAAc;EACrB;;EAEA,UAAU;EACV;EACA,YAAY;EACZ,iBAAiB;EACjB,YAAY;;EAEZ,uBAAuB;;EAEvB;;EAEA,UAAU;EACV;EACA,UAAU,KAAK,sEACb,KAAK,UAAU;EACjB,SAAS;EACT,SAAS,SAAS;;EAElB,kBAAkB;;EAElB,gBAAgB,QAAQ,WAAW,MAAM,IAAI;;EAE7C,iBACE;IACE,SAAS,MAAM,IAAI;IACnB;IACA,cAAc;IACd;IACA;KAEF,KAAK,IAAI,oBACN;EACL,eAAe,eAAe,SAAS;EACvC,SAAS;;EAET;;;;;;;;wBAec,aAAa,eAAe,wBAC1C,OAAO,kBAAkB,UACvB,KACE,UAAU,gSAmBX,IAAA"}
1
+ {"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/core/components/autocomplete/types.ts","../src/core/components/autocomplete/autocomplete.tsx"],"mappings":";;;;;;;KAKY,8BAA8B,iBACxC,KAAK,MAAM,UAAU;;;;UAKN;EACf;;;;;UAMe;EACf;EACA;EACA;EACA;EACA;;;;;UAMe;EACf;;;;;UAMe;EACf;;;;;UAMe;EACf;;;;;UAMe;EACf;EACA;;;;;UAMe;EACf;EACA;EACA;;;;;UAMe;EACf;EACA;;;;;UAMe;EACf;EACA;;;;;UAMe;EACf;;;;;UAMe;EACf;EACA;;;;;KAMU,kBACR,0BACA,2BACA,4BACA,0BACA,oCACA,oCACA,6BACA,6BACA;;;;UC1Da,kBAAkB,eAAe,yBAAyB;EACzE;EACA;EACA,gBAAgB,eAAe,QAAQ;EACvC;EAEA,OAAO,cAAc;EACrB;;EAEA,UAAU;EACV;EACA,YAAY;EACZ,iBAAiB;EACjB,YAAY;;EAEZ,uBAAuB;;EAEvB;;EAEA,UAAU;EACV;EACA,UAAU,KAAK,sEACb,KAAK,UAAU;EACjB,SAAS;EACT,SAAS,SAAS;;EAElB,kBAAkB;;EAElB,gBAAgB,QAAQ,WAAW,MAAM,IAAI;;EAE7C,iBACE;IACE,SAAS,MAAM,IAAI;IACnB;IACA,cAAc;IACd;IACA;KAEF,KAAK,IAAI,oBACN;EACL,eAAe,eAAe,SAAS;EACvC,SAAS;;EAET;;;;;;;;wBAec,aAAa,eAAe,wBAC1C,OAAO,kBAAkB,UACvB,KACE,UAAU,gSAmBX,IAAA"}