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CAlB,WAAkB,4HCAlB,WAAkB,kDCAlB,WAAkB,kQCAlB,WAAkB","sources":["webpack://_N_E/?b485","webpack://_N_E/./node_modules/.pnpm/hex-to-hsl@1.0.2/node_modules/hex-to-hsl/index.js","webpack://_N_E/./node_modules/.pnpm/hex-to-rgb@1.0.1/node_modules/hex-to-rgb/index.js","webpack://_N_E/../../src/icons/x.ts","webpack://_N_E/./src/components/DotGrid/DotGrid.tsx","webpack://_N_E/./src/components/DotGrid/index.ts","webpack://_N_E/./src/components/Goodies/ShadowPalette/Logo.js","webpack://_N_E/./src/components/Goodies/ShadowPalette/ShadowPalette.helpers.js","webpack://_N_E/./src/components/Goodies/ShadowPalette/Example.js","webpack://_N_E/./src/components/Goodies/ShadowPalette/ShadowDemo.js","webpack://_N_E/./src/components/Controls/ToggleControl.tsx","webpack://_N_E/./src/components/Controls/BigColorControl.tsx","webpack://_N_E/./src/components/Controls/XYControl/XYPad.js","webpack://_N_E/./src/components/Controls/XYControl/XYControl.js","webpack://_N_E/./src/components/Controls/XYControl/index.js","webpack://_N_E/./src/components/Goodies/ShadowPalette/Controls.js","webpack://_N_E/./src/components/Goodies/ShadowPalette/ShadowPalette.constants.ts","webpack://_N_E/./src/components/Goodies/ShadowPalette/index.tsx","webpack://_N_E/./src/components/Toggle/Toggle.tsx","webpack://_N_E/./src/components/Toggle/index.ts","webpack://_N_E/./src/hooks/use-toggle.ts","webpack://_N_E/./node_modules/.pnpm/next@15.1.3_@babel+core@7.24.6_react-dom@19.0.0-rc-f994737d14-20240522_react@19.0.0-rc-f99473_henqbhbmro4if2cwhftw2bam2a/node_modules/next/dist/api/image.js","webpack://_N_E/../../src/shared/lib/image-external.tsx","webpack://_N_E/./node_modules/.pnpm/rgb-to-hsl@0.0.2/node_modules/rgb-to-hsl/index.js","webpack://_N_E/./src/app/(goodies)/shadow-palette/shadow-palette-fonts.css","webpack://_N_E/./src/components/Controls/BigColorControl.linaria.module.css","webpack://_N_E/./src/components/Controls/XYControl/XYControl.linaria.module.css","webpack://_N_E/./src/components/Controls/XYControl/XYPad.linaria.module.css","webpack://_N_E/./src/components/DotGrid/DotGrid.linaria.module.css","webpack://_N_E/./src/components/Goodies/ShadowPalette/Controls.linaria.module.css","webpack://_N_E/./src/components/Goodies/ShadowPalette/Example.linaria.module.css","webpack://_N_E/./src/components/Goodies/ShadowPalette/Logo.linaria.module.css","webpack://_N_E/./src/components/Goodies/ShadowPalette/ShadowDemo.linaria.module.css","webpack://_N_E/./src/components/Goodies/ShadowPalette/index.linaria.module.css","webpack://_N_E/./src/components/Toggle/Toggle.linaria.module.css"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/vercel/path0/src/components/CodeSnippet/AnnotatedContainer.linaria.module.css\");\n;\nimport(/* webpackMode: \"eager\" */ \"/vercel/path0/src/components/CodeSnippet/CodeWrapper.linaria.module.css\");\n;\nimport(/* webpackMode: \"eager\" */ \"/vercel/path0/src/app/(goodies)/shadow-palette/shadow-palette-fonts.css\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"default\"] */ \"/vercel/path0/src/components/CodeSnippet/SnippetJuggler.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"default\"] */ \"/vercel/path0/src/components/CodeSnippet/WithCopyButton.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"default\"] */ \"/vercel/path0/src/components/Goodies/ShadowPalette/index.tsx\");\n","\nvar rgbToHsl = require('rgb-to-hsl');\nvar hexToRgb = require('hex-to-rgb');\n\nmodule.exports = function (hex) {\n\tvar hsl = rgbToHsl.apply(rgbToHsl, hexToRgb(hex));\n\treturn [hsl[0], parseInt(hsl[1], 10), parseInt(hsl[2], 10)];\n};\n","module.exports = function hexToRgb (hex) {\n\n if (hex.charAt && hex.charAt(0) === '#') {\n hex = removeHash(hex)\n }\n\n if (hex.length === 3) {\n hex = expand(hex)\n }\n\n var bigint = parseInt(hex, 16)\n var r = (bigint >> 16) & 255\n var g = (bigint >> 8) & 255\n var b = bigint & 255\n\n return [r, g, b]\n}\n\nfunction removeHash (hex) {\n\n var arr = hex.split('')\n arr.shift()\n return arr.join('')\n}\n\nfunction expand (hex) {\n\n return hex\n .split('')\n .reduce(function (accum, value) {\n\n return accum.concat([value, value])\n }, [])\n .join('')\n}\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name X\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggNiA2IDE4IiAvPgogIDxwYXRoIGQ9Im02IDYgMTIgMTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst X = createLucideIcon('X', [\n ['path', { d: 'M18 6 6 18', key: '1bl5f8' }],\n ['path', { d: 'm6 6 12 12', key: 'd8bk6v' }],\n]);\n\nexport default X;\n","import React from 'react';\nimport { styled } from '@linaria/react';\n\nimport { range } from '@/utils';\n\ninterface Props extends React.HTMLAttributes {\n width: number;\n height: number;\n dotSize: number;\n fill: string;\n}\n\nconst DotGrid = ({\n width,\n height,\n dotSize,\n fill,\n ...delegated\n}: Props) => {\n const r = dotSize / 2;\n\n const effectiveWidth = width - dotSize;\n const effectiveHeight = height - dotSize;\n\n return (\n
\n \n {range(0, effectiveHeight + 1, dotSize * 2).map((y) =>\n range(0, effectiveWidth + 1, dotSize * 2).map((x) => (\n \n ))\n )}\n \n
\n );\n};\n\nconst Svg = styled.svg`\n display: block;\n`;\n\nexport default React.memo(DotGrid);\n","export { default } from './DotGrid';\n","import React from 'react';\nimport { styled } from '@linaria/react';\nimport { useSpring, animated } from 'react-spring';\n\nimport { normalize } from '@/utils';\n\nimport DotGrid from '@/components/DotGrid';\n\nconst ICON_SIZE = 48;\nconst MAX_SHADOW_OFFSET = 20;\n\nfunction Logo() {\n const [hoveringShape, setHoveringShape] = React.useState(null);\n\n const config = {\n tension: 300,\n friction: 16,\n };\n\n const squareStyles = useSpring({\n transform:\n hoveringShape === 'square'\n ? 'translate(6px, 10px)'\n : 'translate(0px, 0px)',\n config,\n });\n const circleStyles = useSpring({\n transform:\n hoveringShape === 'circle'\n ? 'translate(6px, 10px)'\n : 'translate(0px, 0px)',\n config,\n });\n\n return (\n \n {\n setHoveringShape('square');\n }}\n onMouseLeave={() => {\n setHoveringShape(null);\n }}\n >\n \n \n \n \n \n {\n setHoveringShape('circle');\n }}\n onMouseLeave={() => {\n setHoveringShape(null);\n }}\n >\n \n \n \n \n \n \n );\n}\n\nconst Wrapper = styled.div`\n display: flex;\n gap: 24px;\n`;\n\nconst IconWrapper = styled.div`\n position: relative;\n`;\n\nconst Square = styled(animated.div)`\n position: relative;\n width: ${ICON_SIZE}px;\n height: ${ICON_SIZE}px;\n border: 2px solid var(--color-gray-300);\n background: var(--color-background);\n border-radius: 2px;\n will-change: transform;\n`;\n\nconst ShadowWrapper = styled.div`\n position: absolute;\n transform: translate(6px, 10px);\n`;\n\nconst Circle = styled(Square)`\n border-radius: 50%;\n`;\n\nconst CircleShadowWrapper = styled(ShadowWrapper)`\n border-radius: 50%;\n overflow: hidden;\n`;\n\nexport default Logo;\n","import hexToHsl from 'hex-to-hsl';\n\nimport {\n range,\n normalize,\n clamp,\n clampedNormalize,\n roundTo,\n getValuesForBezierCurve,\n} from '@/utils';\n\nexport function formatHslValues(hue, sat, lit) {\n return `${hue}deg ${sat}% ${lit}%`;\n}\n\nexport function formatHslString(hue, sat, lit) {\n return `hsl(${formatHslValues(hue, sat, lit)})`;\n}\n\nfunction calculateShadowOffsets({\n size,\n oomph,\n crispy,\n layerIndex,\n lightSource,\n numOfLayers,\n}) {\n const maxOffsetBySize = {\n small: normalize(oomph, 0, 1, 3, 5),\n medium: normalize(oomph, 0, 1, 15, 25),\n large: normalize(oomph, 0, 1, 50, 150),\n };\n\n // We don't want to use linear interpolation here because we want\n // the shadows to cluster near the front and fall off. Otherwise,\n // the most opaque part of the shadow is in the middle of the\n // group, rather than being near the element.\n // We'll use a bezier curve and pluck points along it.\n const curve = {\n startPoint: [0, 1],\n endPoint: [1, 0],\n controlPoint1: [\n normalize(crispy, 0, 1, 0.25, 0),\n normalize(crispy, 0, 1, 0.25, 0),\n ],\n controlPoint2: [\n normalize(crispy, 0, 1, 0.25, 0),\n normalize(crispy, 0, 1, 0.25, 0),\n ],\n };\n const t = layerIndex / (numOfLayers - 1);\n const [ratio] = getValuesForBezierCurve(curve, t);\n\n const max = maxOffsetBySize[size];\n\n // Now, for x/y offset... we have this lightSource value, with\n // X and Y from -1 to 1.\n const xOffsetMin = normalize(lightSource.x, -1, 1, 1, -1);\n const xOffsetMax = normalize(lightSource.x, -1, 1, max, max * -1);\n const yOffsetMin = normalize(lightSource.y, -1, 1, 1, -1);\n const yOffsetMax = normalize(lightSource.y, -1, 1, max, max * -1);\n\n const x = roundTo(\n normalize(ratio, 0, 1, xOffsetMin, xOffsetMax),\n 1\n );\n const y = roundTo(\n normalize(ratio, 0, 1, yOffsetMin, yOffsetMax),\n 1\n );\n\n return { x, y };\n}\n\nfunction calculateBlurRadius({\n x,\n y,\n size,\n oomph,\n crispy,\n layerIndex,\n numOfLayers,\n}) {\n // The blur radius should depend on the x/y offset.\n // Calculate the hypothenuse length and use it as the blur radius?\n const hypothenuse = (x ** 2 + y ** 2) ** 0.5;\n\n const radius = normalize(\n crispy,\n 0,\n 1,\n hypothenuse * 1.5,\n hypothenuse * 0.75\n );\n\n return roundTo(radius, 1);\n}\n\nfunction calculateShadowOpacity({\n oomph,\n crispy,\n tintShadows,\n layerIndex,\n numOfLayers,\n minLayers,\n maxLayers,\n}) {\n const baseOpacity = normalize(oomph, 0, 1, 0.4, 1.25);\n\n const initialOpacityMultiplier = normalize(crispy, 0, 1, 0, 1);\n const finalOpacityMultiplier = normalize(crispy, 0, 1, 1, 0);\n\n // Crispy determines which shadows are more visible, and\n // which shadows are less visible.\n const layerOpacityMultiplier = normalize(\n layerIndex,\n 0,\n numOfLayers,\n initialOpacityMultiplier,\n finalOpacityMultiplier\n );\n\n let opacity = baseOpacity * layerOpacityMultiplier;\n\n // So, here's the problem.\n // The `resolution` param lets us change how many layers are\n // generated. Every additional layer should reduce the opacity\n // of all layers, so that \"resolution\" doesn't change the\n // perceived opacity.\n const averageLayers = (minLayers + maxLayers) / 2;\n const ratio = averageLayers / numOfLayers;\n\n let layerOpacity = opacity * ratio;\n\n // This is the opacity if we're using color-tinted shadows.\n // If NOT, though, we want the shadows to be WAY less opaque!\n if (!tintShadows) {\n layerOpacity *= 0.3;\n }\n\n return clamp(roundTo(layerOpacity, 2), 0, 1);\n}\n\nfunction calculateSpread({ oomph, crispy, layerIndex, numOfLayers }) {\n // return 0;\n\n if (layerIndex === 0) {\n return 0;\n }\n\n const maxReduction = normalize(crispy, 0, 1, 0, -5);\n const actualReduction = normalize(\n layerIndex + 1,\n 1,\n numOfLayers,\n 0,\n maxReduction\n );\n\n return roundTo(actualReduction, 1);\n}\n\n/**\n * We'll generate a set of 3 shadows: small, medium, large.\n * Each shadow will have multiple layers, depending on the size.\n * A small shadow might only have 2 shadows, a large might have 6.\n * Though, this is affected by the `layers` property\n */\nexport function generateShadows({\n lightSource,\n resolution,\n oomph,\n crispy,\n tintShadows,\n}) {\n let output = [];\n\n const SHADOW_LAYER_LIMITS = {\n small: {\n min: 2,\n max: 3,\n },\n medium: {\n min: 2,\n max: 5,\n },\n large: {\n min: 3,\n max: 10,\n },\n };\n\n for (const size of ['small', 'medium', 'large']) {\n const numOfLayers = Math.round(\n normalize(\n resolution,\n 0,\n 1,\n SHADOW_LAYER_LIMITS[size].min,\n SHADOW_LAYER_LIMITS[size].max\n )\n );\n\n let layersForSize = [];\n\n range(numOfLayers).map((layerIndex) => {\n const opacity = calculateShadowOpacity({\n oomph,\n crispy,\n tintShadows,\n layerIndex,\n numOfLayers,\n minLayers: SHADOW_LAYER_LIMITS[size].min,\n maxLayers: SHADOW_LAYER_LIMITS[size].max,\n });\n\n const { x, y } = calculateShadowOffsets({\n size,\n oomph,\n crispy,\n lightSource,\n layerIndex,\n numOfLayers,\n });\n\n const blurRadius = calculateBlurRadius({\n x,\n y,\n size,\n oomph,\n crispy,\n layerIndex,\n numOfLayers,\n });\n\n const spread = calculateSpread({\n oomph,\n crispy,\n layerIndex,\n numOfLayers,\n });\n const spreadString = spread !== 0 ? `${spread}px ` : '';\n\n layersForSize.push([\n `${x}px ${y}px ${blurRadius}px ${spreadString}hsl(var(--shadow-color) / ${opacity})`,\n ]);\n });\n\n output.push(layersForSize);\n }\n\n return output;\n}\n\nexport function getShadowBackgroundHslValues(\n backgroundHsl,\n oomph,\n tintShadows\n) {\n if (!tintShadows) {\n return '0deg 0% 0%';\n }\n\n let [hue, sat, lit] = backgroundHsl;\n\n const maxLightness = normalize(oomph, 0, 1, 85, 50);\n\n const saturationEnhancement = normalize(lit, 50, 100, 1, 0.25);\n\n sat = Math.round(clamp(sat * saturationEnhancement, 0, 100));\n // lit = Math.round(clamp(lit - 35, 0, 100));\n lit = Math.round(\n clamp(normalize(lit, 0, 100, 0, maxLightness) - 5, 0, 100)\n );\n\n return formatHslValues(hue, sat, lit);\n}\n\nexport function formatShadowsAsDropShadow(shadows) {\n return shadows.map((shadowsForSize) => {\n const reducedString = shadowsForSize.reduce(\n (acc, shadowString) => `${acc} drop-shadow(${shadowString})`,\n ''\n );\n\n return reducedString.trim();\n });\n}\n\nexport function formatShadowsAsBoxShadow(shadows) {\n return shadows.map((shadowsForSize) => {\n const reducedString = shadowsForSize.reduce(\n (acc, shadowString) => {\n if (!acc) {\n return shadowString;\n }\n return `${acc},\\n${shadowString}`;\n },\n ''\n );\n\n return reducedString.trim();\n });\n}\n\nfunction getContrastYIQ(hexcolor) {\n const r = parseInt(hexcolor.substr(0, 2), 16);\n const g = parseInt(hexcolor.substr(2, 2), 16);\n const b = parseInt(hexcolor.substr(4, 2), 16);\n const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n return yiq >= 128;\n}\n\nexport function getCaptionColor(backgroundColor) {\n const hexWithoutHash = backgroundColor.slice(1);\n const requiresDarkerText = getContrastYIQ(hexWithoutHash);\n\n const [hue, sat, lit] = hexToHsl(backgroundColor);\n\n if (requiresDarkerText) {\n // const newLit = clamp(lit * 0.75 - 25, 0, 100);\n const newLit = clamp(normalize(lit, 100, 0, 52, -45), 0, 100);\n return formatHslString(hue, sat * 0.75, newLit);\n } else {\n const newLit = clamp(normalize(lit, 100, 0, 150, 50), 0, 100);\n return formatHslString(hue, sat / 2, newLit);\n }\n}\n\nexport function generateCode(shadows, shadowBackgroundValues) {\n const [low, medium, high] = shadows;\n\n function renderShadowLayers(layers) {\n return layers.join(',\\n ');\n }\n\n let code = `\n:root {\n --shadow-color: ${shadowBackgroundValues};\n --shadow-elevation-low:\n ${renderShadowLayers(low)};\n --shadow-elevation-medium:\n ${renderShadowLayers(medium)};\n --shadow-elevation-high:\n ${renderShadowLayers(high)};\n}`;\n\n code = code.trim();\n return code;\n}\n","import { styled } from '@linaria/react';\n\nimport { BREAKPOINTS } from '@/constants';\nimport { normalize } from '@/utils';\n\nfunction Example({ index, boxShadow, captionColor, children }) {\n const width = normalize(index, 1, 3, 180, 260);\n const borderRadius = normalize(index, 1, 3, 6, 10);\n const height = width * (100 / 220);\n\n return (\n \n \n \n \n Fig. {index} — {children}\n \n \n \n \n );\n}\n\nconst Wrapper = styled.figure`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n`;\n\nconst Caption = styled.figcaption`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n transform: translateY(calc(-100% - 8px));\n text-align: center;\n font-family: 'Crimson Text', serif;\n font-size: 0.875rem;\n font-style: italic;\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n line-height: 1;\n`;\n\nconst DemoWrapper = styled.div`\n width: max-content;\n\n @media ${BREAKPOINTS.mdAndSmaller} {\n width: 100%;\n }\n`;\n\nconst Shape = styled.div`\n background: #fff;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n filter: var(--filter-shadow);\n box-shadow: var(--box-shadow);\n`;\n\nconst Rectangle = styled(Shape)`\n width: var(--width);\n height: var(--height);\n border-radius: var(--radius);\n\n @media ${BREAKPOINTS.mdAndSmaller} {\n width: auto;\n height: 150px;\n }\n`;\n\nexport default Example;\n","import React from 'react';\nimport { styled } from '@linaria/react';\n\nimport { BREAKPOINTS } from '@/constants';\n\nimport { getCaptionColor } from './ShadowPalette.helpers';\nimport Example from './Example';\n\nfunction ShadowDemo({\n shadowFilterArray,\n shadowBoxArray,\n backgroundColor,\n}) {\n const captionColor = React.useMemo(() => {\n return getCaptionColor(backgroundColor);\n }, [backgroundColor]);\n\n return (\n \n \n \n High Elevation\n \n \n\n \n \n Medium Elevation\n \n \n \n \n Low Elevation\n \n \n \n );\n}\n\nconst Wrapper = styled.div`\n display: flex;\n /*\n We use column-reverse so that the bottom box with the largest\n blur radius is below the middle box , so that its shadow doesn't\n spill over.\n */\n flex-direction: column-reverse;\n justify-content: space-around;\n align-items: center;\n gap: 48px;\n\n @media ${BREAKPOINTS.mdAndSmaller} {\n display: flex;\n flex-direction: row;\n justify-content: unset;\n align-items: unset;\n width: 100%;\n gap: 24px;\n padding: 48px 24px;\n overflow: auto;\n scroll-snap-type: x mandatory;\n }\n`;\n\nconst ExampleWrapper = styled.div`\n @media ${BREAKPOINTS.mdAndSmaller} {\n min-width: calc(100% - 32px);\n scroll-snap-align: center;\n }\n`;\n\nexport default ShadowDemo;\n","import React from 'react';\n\nimport { THUMB_FOCUS_GRADIENT } from '@/constants';\n\nimport Toggle from '@/components/Toggle';\n\nimport ControlWrapper from './ControlWrapper';\n\nexport interface Props {\n id: string;\n label: string;\n value: boolean;\n toggleValue: (value: React.MouseEvent) => void;\n gridArea?: string;\n}\n\nfunction ToggleControl({\n id,\n label,\n value,\n toggleValue,\n gridArea,\n}: Props) {\n return (\n \n }\n />\n );\n}\n\nexport default ToggleControl;\n","import React from 'react';\nimport { styled } from '@linaria/react';\n\nimport ControlWrapper from './ControlWrapper';\nimport ValuePreview from './ValuePreview';\n\nimport type { Props as ControlWrapperProps } from './ControlWrapper';\n\ninterface Props extends ControlWrapperProps {\n value: string;\n setValue: (value: string) => void;\n previewRenderer?: (value: string | number) => React.ReactNode;\n}\n\nfunction BigColorControl({\n id,\n value,\n setValue,\n previewRenderer,\n ...delegated\n}: Props) {\n return (\n \n }\n {...delegated}\n >\n \n setValue(ev.target.value)}\n />\n \n \n \n );\n}\n\nconst InputWrapper = styled.div`\n position: relative;\n height: 100px;\n border: 3px solid var(--color-gray-300);\n border-radius: 6px;\n`;\n\nconst ColorInput = styled.input`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n /* Necessary for iOS foolishness */\n font-size: 1rem;\n`;\n\nconst VisibleColor = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 4px;\n border: 2px solid var(--color-background);\n pointer-events: none;\n\n ${ColorInput}:focus-visible ~ & {\n outline: 2px solid white;\n outline-offset: 6px;\n }\n`;\n\nexport default BigColorControl;\n","import React from 'react';\nimport { styled } from '@linaria/react';\nimport { THUMB_FOCUS_GRADIENT } from '@/constants';\nimport { clamp, clampedNormalize } from '@/utils';\n\nimport Background from '../DottedControlBackground';\n\nconst CONTROL_RADIUS = 24;\n\nconst XYPad = ({\n id,\n box,\n x,\n y,\n numOfRows,\n numOfCols,\n borderWidth = 0,\n onChange,\n}) => {\n const [isDragging, setIsDragging] = React.useState(false);\n\n const { width, height } = box;\n\n const xInPixels = clampedNormalize(x, -1, 1, 0, width);\n const yInPixels = clampedNormalize(y, -1, 1, 0, height);\n\n React.useEffect(() => {\n if (!isDragging) {\n return;\n }\n\n function handleMouseUp(ev) {\n setIsDragging(false);\n }\n\n function handleMouseMove(ev) {\n // For some funky reason, a mousemove event is triggered on\n // iOS Safari when the user stops dragging and taps another\n // element.\n //\n // HACK: Bail if we're doing this on an iOS device, according\n // to the UA.\n const isMobileSafari =\n navigator.userAgent.match(/iPad/i) ||\n navigator.userAgent.match(/iPhone/i);\n\n if (isMobileSafari) {\n return;\n }\n const [x, y] = [ev.clientX, ev.clientY];\n\n const relativeX = x - box.left;\n const relativeY = y - box.top;\n\n onChange({\n x: clampedNormalize(relativeX, 0, box.width, -1, 1),\n y: clampedNormalize(relativeY, 0, box.height, -1, 1),\n });\n }\n\n window.addEventListener('mouseup', handleMouseUp);\n window.addEventListener('mousemove', handleMouseMove);\n\n return () => {\n window.removeEventListener('mouseup', handleMouseUp);\n window.removeEventListener('mousemove', handleMouseMove);\n };\n }, [isDragging, box, onChange]);\n\n function handleStartGrabbing() {\n setIsDragging(true);\n }\n\n function handleMouseDownInEmptySpace(ev) {\n const relativeX = ev.clientX - box.left;\n const relativeY = ev.clientY - box.top;\n\n onChange({\n x: clampedNormalize(relativeX, 0, box.width, -1, 1),\n y: clampedNormalize(relativeY, 0, box.height, -1, 1),\n });\n\n setIsDragging(true);\n }\n\n function handleTouchMove(ev) {\n ev.preventDefault();\n const touch = ev.touches[0];\n const [x, y] = [touch.clientX, touch.clientY];\n\n const relativeX = x - box.left;\n const relativeY = y - box.top;\n\n onChange({\n x: clampedNormalize(relativeX, 0, box.width, -1, 1),\n y: clampedNormalize(relativeY, 0, box.height, -1, 1),\n });\n }\n\n function handleKeyDown(ev) {\n if (ev.key === 'ArrowUp') {\n // Don't allow the page to scroll up/down\n ev.preventDefault();\n\n onChange({\n x,\n y: clamp(y - 0.05, -1, 1),\n });\n } else if (ev.key === 'ArrowLeft') {\n onChange({\n x: clamp(x - 0.05, -1, 1),\n y,\n });\n } else if (ev.key === 'ArrowRight') {\n onChange({\n x: clamp(x + 0.05, -1, 1),\n y,\n });\n } else if (ev.key === 'ArrowDown') {\n // Don't allow the page to scroll up/down\n ev.preventDefault();\n onChange({\n x,\n y: clamp(y + 0.05, -1, 1),\n });\n }\n }\n\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nconst Wrapper = styled.div`\n position: relative;\n height: 100%;\n border: var(--border-width) solid var(--color-gray-300);\n border-radius: 6px;\n cursor: var(--cursor);\n touch-action: none;\n`;\n\nconst BackgroundWrapper = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n`;\n\nconst HandleButton = styled.button`\n position: absolute;\n width: ${CONTROL_RADIUS + 4}px;\n height: ${CONTROL_RADIUS + 4}px;\n cursor: var(--cursor);\n\n &:focus {\n outline: none;\n }\n`;\nconst Handle = styled.div`\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background: white;\n border: 2px solid var(--color-background);\n /* Center the button around the top-left corner of the container */\n transform: translate(-50%, -50%);\n\n ${HandleButton}:focus &, ${HandleButton}[data-is-dragging=\"true\"] & {\n background: ${THUMB_FOCUS_GRADIENT};\n }\n ${HandleButton}:focus-visible & {\n outline: 2px solid white;\n outline-offset: 2px;\n }\n`;\n\nexport default React.memo(XYPad);\n","/*\n TODO Dedupe from Demo/SliderControl?\n*/\nimport React from 'react';\nimport { styled } from '@linaria/react';\nimport useBoundingBox from '@/hooks/use-bounding-box';\n\nimport ControlWrapper from '../ControlWrapper';\nimport XYPad from './XYPad';\n\nconst NUM_OF_ROWS = 12;\nconst NUM_OF_COLS = 12;\n\nfunction XYControl({\n id,\n value,\n setValue,\n maxWidth,\n style = {},\n ...delegated\n}) {\n const wrapperRef = React.useRef();\n\n const box = useBoundingBox(wrapperRef);\n\n const onChange = React.useCallback(\n ({ x, y }) => {\n setValue({ x, y });\n },\n [setValue]\n );\n\n return (\n \n \n \n {box && (\n \n )}\n \n \n \n );\n}\n\nconst Wrapper = styled.div`\n max-width: var(--max-width);\n`;\n\nconst XYWrapper = styled.div`\n width: 100%;\n aspect-ratio: ${NUM_OF_COLS} / ${NUM_OF_ROWS};\n\n @supports not (aspect-ratio: ${NUM_OF_COLS} / ${NUM_OF_ROWS}) {\n height: 250px;\n }\n`;\n\nexport default XYControl;\n","export { default } from './XYControl';\n","import { styled } from '@linaria/react';\n\nimport SliderControl from '@/components/Controls/SliderControl';\nimport ToggleControl from '@/components/Controls/ToggleControl';\nimport BigColorControl from '@/components/Controls/BigColorControl';\nimport XYControl from '@/components/Controls/XYControl';\n\nfunction Controls({\n lightSource,\n resolution,\n oomph,\n crispy,\n backgroundColor,\n tintShadows,\n setLightSource,\n setResolution,\n setOomph,\n setCrispy,\n setBackgroundColor,\n toggleTintShadows,\n}) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nconst Wrapper = styled.div`\n display: grid;\n grid-template-columns: 1fr;\n grid-template-areas:\n 'oomph'\n 'crispy'\n 'light'\n 'colors'\n 'resolution';\n gap: 32px;\n\n @container (min-width: 590px) {\n grid-template-columns: 1fr 1fr;\n grid-template-areas:\n 'oomph crispy'\n 'light colors'\n 'light resolution';\n min-width: revert;\n }\n`;\n\nconst Cell = styled.div`\n grid-area: ${(p) => p.area};\n`;\n\nconst BackgroundColorCell = styled(Cell)`\n display: flex;\n flex-direction: column;\n gap: 16px;\n`;\n\nconst ResolutionCell = styled(Cell)`\n align-self: end;\n`;\n\nexport default Controls;\n","export const INITIAL_LIGHT_SOURCE = {\n x: -0.25,\n y: -0.5,\n};\n\nexport const INITIAL_RESOLUTION = 0.75;\nexport const INITIAL_OOMPH = 0.5;\nexport const INITIAL_CRISPY = 0.5;\nexport const INITIAL_BACKGROUND_COLOR = '#F1CFFC';\nexport const INITIAL_TINT_SHADOWS = true;\n","'use client';\n\nimport React from 'react';\nimport { styled } from '@linaria/react';\nimport hexToHsl from 'hex-to-hsl';\nimport Image from 'next/image';\n\nimport useToggle from '@/hooks/use-toggle';\nimport {\n DARK_COLORS,\n BREAKPOINTS,\n THUMB_FOCUS_GRADIENT,\n} from '@/constants';\n\nimport Spacer from '@/components/Spacer';\nimport SiteFooter from '@/components/SiteFooter';\nimport ColorModeContainer from '@/components/ColorModeContainer';\nimport GeneratorHeader from '@/components/Goodies/shared/GeneratorHeader';\nimport GeneratorNewsletterSignup from '@/components/Goodies/shared/GeneratorNewsletterSignup';\nimport OverscrollColor from '@/components/OverscrollColor';\nimport CodeSnippetProvider from '@/components/CodeSnippet/CodeSnippetProvider';\n\nimport Logo from './Logo';\nimport ShadowDemo from './ShadowDemo';\nimport Controls from './Controls';\nimport {\n INITIAL_LIGHT_SOURCE,\n INITIAL_RESOLUTION,\n INITIAL_OOMPH,\n INITIAL_CRISPY,\n INITIAL_BACKGROUND_COLOR,\n INITIAL_TINT_SHADOWS,\n} from './ShadowPalette.constants';\nimport {\n formatHslString,\n generateShadows,\n getShadowBackgroundHslValues,\n formatShadowsAsDropShadow,\n formatShadowsAsBoxShadow,\n generateCode,\n} from './ShadowPalette.helpers';\n\nfunction ShadowPalette({\n codeOutput,\n}: {\n codeOutput: React.ReactNode;\n}) {\n const [lightSource, setLightSource] = React.useState(\n INITIAL_LIGHT_SOURCE\n );\n const [resolution, setResolution] = React.useState(\n INITIAL_RESOLUTION\n );\n const [oomph, setOomph] = React.useState(INITIAL_OOMPH);\n const [crispy, setCrispy] = React.useState(INITIAL_CRISPY);\n\n const [backgroundColor, setBackgroundColor] = React.useState(\n INITIAL_BACKGROUND_COLOR\n );\n const [tintShadows, toggleTintShadows] = useToggle(\n INITIAL_TINT_SHADOWS\n );\n\n const backgroundHslArray = hexToHsl(backgroundColor);\n\n const shadows = generateShadows({\n lightSource,\n resolution,\n oomph,\n crispy,\n tintShadows,\n });\n\n const shadowBackgroundValues = getShadowBackgroundHslValues(\n backgroundHslArray,\n oomph,\n tintShadows\n );\n\n const backgroundHsl = formatHslString(...backgroundHslArray);\n\n const shadowFilterArray = formatShadowsAsDropShadow(shadows);\n const shadowBoxArray = formatShadowsAsBoxShadow(shadows);\n\n const deferredShadows = React.useDeferredValue(shadows);\n const deferredShadowBackgroundValues = React.useDeferredValue(\n shadowBackgroundValues\n );\n\n return (\n \n \n\n \n \n \n\n \n\n \n \n \n \n
\n \n

Shadow Palette Generator

\n \n Create a set of lush, realistic CSS shadows.\n \n
\n\n \n \n \n \n \n Your tokens:\n \n \n \n {codeOutput}\n \n \n \n
\n\n \n\n \n \n \n\n \n \n );\n}\n\nconst Wrapper = styled(ColorModeContainer)`\n --background-values: 210deg 30% 8%;\n --color-background: hsl(var(--background-values));\n\n position: relative;\n min-height: 100vh;\n background: var(--color-background);\n isolation: isolate;\n /* IMPORTANT: This stops the page scroll position from jumping around wildly when the controls are tweaked, causing the height of the code snippet to get bigger/smaller. */\n overflow-anchor: none !important;\n\n @media ${BREAKPOINTS.mdAndSmaller} {\n --background-values: 0deg 0% 0%;\n }\n\n && {\n border-radius: 0px;\n }\n`;\n\nconst InnerWrapper = styled.div`\n display: grid;\n grid-gap: 64px 48px;\n grid-template-columns: minmax(350px, 1fr) 1.25fr;\n grid-template-areas:\n 'demo header'\n 'demo controls'\n 'demo code';\n max-width: 1500px;\n margin: 0 auto;\n padding: 32px;\n padding-bottom: 128px;\n\n @media ${BREAKPOINTS.mdAndSmaller} {\n grid-template-columns: 1fr;\n grid-template-areas:\n 'header'\n 'demo'\n 'controls'\n 'code';\n padding: 16px;\n padding-bottom: 128px;\n }\n`;\n\nconst DemoWrapper = styled.div`\n grid-area: demo;\n position: sticky;\n z-index: 3;\n top: 32px;\n align-self: stretch;\n display: flex;\n justify-content: center;\n min-height: 450px;\n max-height: min(860px, calc(100vh - 32px * 2));\n padding: 64px 0;\n background-color: var(--background);\n border-radius: 16px;\n /* Crop the shadows from spilling out */\n overflow: hidden;\n filter: drop-shadow(0px 0px 16px var(--color-background));\n\n @media ${BREAKPOINTS.mdAndSmaller} {\n top: 8px;\n padding: 0px;\n min-height: unset;\n max-height: unset;\n /* We don't want to see the content scrolling by in the 8px gap above. We can cover this space with an outline */\n outline: 8px solid var(--color-background);\n border-radius: 8px;\n margin-left: -16px;\n margin-right: -16px;\n box-shadow:\n 0px 0px 2px hsl(var(--background-values) / 0.2),\n 0px 0px 4px hsl(var(--background-values) / 0.2),\n 0px 0px 8px hsl(var(--background-values) / 0.2),\n 0px 0px 16px hsl(var(--background-values) / 0.2),\n 0px 0px 32px hsl(var(--background-values) / 0.2),\n 0px 0px 64px hsl(var(--background-values) / 0.3),\n 0px 0px 96px hsl(var(--background-values) / 0.3);\n }\n`;\n\nconst Header = styled.header`\n position: relative;\n z-index: 3;\n grid-area: header;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n padding-top: 32px;\n isolation: isolate;\n\n h1 {\n position: relative;\n z-index: 2;\n font-size: 2rem;\n font-weight: var(--font-weight-bold);\n line-height: 1.2;\n color: initial;\n background-color: #ffb23e;\n background-image: ${THUMB_FOCUS_GRADIENT};\n background-size: 100%;\n background-clip: text;\n -webkit-background-clip: text;\n -moz-background-clip: text;\n -webkit-text-fill-color: transparent;\n -moz-text-fill-color: transparent;\n margin-top: 32px;\n /* prettier-ignore */\n filter:\n drop-shadow(0px 0px 2px hsl(var(--background-values) / 0.5))\n drop-shadow(0px 0px 4px hsl(var(--background-values) / 0.5))\n drop-shadow(0px 0px 8px hsl(var(--background-values) / 0.5))\n drop-shadow(0px 0px 16px hsl(var(--background-values) / 0.5))\n drop-shadow(0px 0px 32px hsl(var(--background-values) / 0.5))\n drop-shadow(0px 0px 64px hsl(var(--background-values) / 0.5));\n }\n`;\n\nconst Subtitle = styled.p`\n position: relative;\n z-index: 3;\n font-size: 1.25rem;\n text-align: center;\n max-width: 400px;\n margin: 8px auto 0;\n color: var(--color-gray-700);\n`;\n\nconst ControlsWrapper = styled.div`\n grid-area: controls;\n container-type: inline-size;\n position: relative;\n z-index: 1;\n`;\nconst OutputWrapper = styled.div`\n --scrollbar-bg: var(--syntax-bg);\n --scrollbar-thumb: var(--color-gray-300);\n grid-area: code;\n position: relative;\n z-index: 1;\n min-width: 0px;\n`;\nconst OutputHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n margin-bottom: 8px;\n user-select: none;\n`;\nconst OutputLabel = styled.div`\n font-weight: var(--font-weight-medium);\n`;\nconst CodeWrapper = styled.div`\n background: var(--color-background);\n outline: 1px solid var(--color-content-outline);\n border-radius: 8px;\n`;\n\nconst SlopesWrapper = styled.div`\n position: absolute;\n left: 0;\n right: 0;\n bottom: 60px;\n width: 100%;\n opacity: 0.75;\n filter: blur(5px);\n\n @media ${BREAKPOINTS.mdAndSmaller} {\n /* The image needs to be pushed up further so that the email input has high-enough contrast, and isn't over a purple mountain. */\n bottom: 256px;\n\n /*\n On mobile, the background becomes solid black, and there's an awkward edge behind the footer, between the bottom of the slopes image and the page background. Add a gradient to smooth this out.\n */\n &::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 200px;\n background: linear-gradient(\n to bottom,\n transparent,\n var(--color-background)\n );\n }\n }\n`;\n\nconst Slopes = styled(Image)`\n object-fit: cover;\n object-position: bottom center;\n`;\n\nconst FooterWrapper = styled.footer`\n padding-bottom: 32px;\n`;\n\nexport default ShadowPalette;\n","import React from 'react';\nimport { styled } from '@linaria/react';\nimport { animated, useSpring } from 'react-spring';\n\nconst DEFAULT_FOCUS_BACKGROUND = `linear-gradient(\n 0deg,\n hsl(230deg, 100%, 50%),\n hsl(240deg, 100%, 70%)\n)`;\n\nexport interface Props\n extends React.HTMLAttributes {\n active: boolean;\n handleToggle: (event: React.MouseEvent) => void;\n // Subtle but key detail: there should be a 2px gap between the ball and the track. We fake this by giving the ball a 2px outline matching the color of the background. By default it uses --color-background, but I can specify an override:\n // NOTE: This was previously called `backdropColor`.\n backgroundColor?: string;\n handleFocusColor?: string | null;\n handleColor?: string;\n handleSize?: number;\n}\n\nconst Toggle = ({\n active,\n handleToggle,\n backgroundColor,\n handleFocusColor = DEFAULT_FOCUS_BACKGROUND,\n handleColor = 'var(--color-text)',\n handleSize = 16,\n style = {},\n ...delegated\n}: Props) => {\n const borderWidth = 2;\n const handleBoxSize = handleSize + borderWidth * 2;\n\n const padding = handleBoxSize * 0.1;\n const width = handleBoxSize * 2 + padding * 2;\n\n const wrapperStyle = {\n width,\n padding,\n '--radius': handleBoxSize * 0.25 + 'px',\n ...style,\n };\n\n const ballStyle = useSpring({\n width: handleBoxSize,\n height: handleBoxSize,\n transform: active ? `translateX(100%)` : `translateX(0%)`,\n config: {\n tension: 370,\n friction: 16,\n mass: 0.75,\n },\n });\n\n return (\n \n \n \n );\n};\n\nconst Wrapper = styled(animated.button)`\n border: none;\n background: transparent;\n cursor: pointer;\n position: relative;\n\n &:before {\n content: '';\n position: absolute;\n z-index: 0;\n top: -8px;\n left: -8px;\n right: -8px;\n bottom: -8px;\n }\n\n &:after {\n content: '';\n position: absolute;\n z-index: 1;\n top: 0;\n left: var(--radius);\n right: var(--radius);\n bottom: 0;\n margin: auto;\n height: 3px;\n background: var(--color-gray-300);\n border-radius: 10px;\n }\n\n &:focus-visible {\n outline: 2px auto var(--color-text);\n outline-offset: 2px;\n }\n\n &:focus:not(:focus-visible) {\n outline: none;\n }\n`;\n\nconst Ball = styled(animated.div)`\n position: relative;\n z-index: 2;\n border-radius: 50%;\n background: var(--handle-color);\n outline: 2px solid var(--outline-color, var(--color-background));\n\n ${Wrapper}:focus-visible & {\n background: var(--handle-focus-color);\n }\n`;\n\nexport default Toggle;\n","export { default } from './Toggle';\nexport type { Props } from './Toggle';\n","import React from 'react';\n\ntype ToggleFn = (newVal?: any) => void;\n\nexport default function useToggle(\n initialValue: boolean = false\n): [boolean, ToggleFn] {\n const [value, setValue] = React.useState(initialValue);\n\n const toggle = React.useCallback((newVal: any) => {\n setValue((v) => {\n // The main use case for this function is to be called without any arguments, which flips the `value` between true/false.\n // However, the user can supply a new boolean value if they want to explicitly turn it on or off.\n // The trick here is that we want to ignore any non-boolean values. This becomes relevant when the `toggle` function is passed as a callback function to an event handler; we want to ignore the MouseEvent or whatever that is automatically passed in.\n if (typeof newVal === 'boolean') {\n return newVal;\n }\n\n return !v;\n });\n }, []);\n\n return [value, toggle];\n}\n","export { default } from '../shared/lib/image-external';\nexport * from '../shared/lib/image-external';\n\n//# sourceMappingURL=image.js.map","import type { ImageConfigComplete, ImageLoaderProps } from './image-config'\nimport type { ImageProps, ImageLoader, StaticImageData } from './get-img-props'\n\nimport { getImgProps } from './get-img-props'\nimport { Image } from '../../client/image-component'\n\n// @ts-ignore - This is replaced by webpack alias\nimport defaultLoader from 'next/dist/shared/lib/image-loader'\n\n/**\n * For more advanced use cases, you can call `getImageProps()`\n * to get the props that would be passed to the underlying `` element,\n * and instead pass to them to another component, style, canvas, etc.\n *\n * Read more: [Next.js docs: `getImageProps`](https://nextjs.org/docs/app/api-reference/components/image#getimageprops)\n */\nexport function getImageProps(imgProps: ImageProps) {\n const { props } = getImgProps(imgProps, {\n defaultLoader,\n // This is replaced by webpack define plugin\n imgConf: process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete,\n })\n // Normally we don't care about undefined props because we pass to JSX,\n // but this exported function could be used by the end user for anything\n // so we delete undefined props to clean it up a little.\n for (const [key, value] of Object.entries(props)) {\n if (value === undefined) {\n delete props[key as keyof typeof props]\n }\n }\n return { props }\n}\n\nexport default Image\n\nexport type { ImageProps, ImageLoaderProps, ImageLoader, StaticImageData }\n","(function() {\n module.exports = function(r, g, b) {\n var d, h, l, max, min, s;\n r /= 255;\n g /= 255;\n b /= 255;\n max = Math.max(r, g, b);\n min = Math.min(r, g, b);\n h = 0;\n s = 0;\n l = (max + min) / 2;\n if (max === min) {\n h = s = 0;\n } else {\n d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n }\n h /= 6;\n }\n h = Math.ceil(h * 360);\n s = (Math.ceil(s * 100)) + \"%\";\n l = (Math.ceil(l * 100)) + \"%\";\n return [h, s, l];\n };\n\n}).call(this);\n","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin\nmodule.exports = {\"i1omztik\":\"i1omztik\",\"cb2c7mf\":\"cb2c7mf\",\"vfiyrz8\":\"vfiyrz8\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"w312s3o\":\"w312s3o\",\"xtv1ayl\":\"xtv1ayl\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"w1q5xl4e\":\"w1q5xl4e\",\"b1u1hpaf\":\"b1u1hpaf\",\"h1pjhvqd\":\"h1pjhvqd\",\"h1jyfhux\":\"h1jyfhux\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"sdygqqw\":\"sdygqqw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"w1qaj5l9\":\"w1qaj5l9\",\"c1bulpa3\":\"c1bulpa3\",\"bhtkizv\":\"bhtkizv\",\"rippch7\":\"rippch7\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"w1c6p617\":\"w1c6p617\",\"c130g642\":\"c130g642\",\"d7xutfq\":\"d7xutfq\",\"szomtil\":\"szomtil\",\"r9u3ffa\":\"r9u3ffa\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"w1u8l05x\":\"w1u8l05x\",\"ie38ah5\":\"ie38ah5\",\"sre5oms\":\"sre5oms\",\"s12dh2hl\":\"s12dh2hl\",\"cf5y163\":\"cf5y163\",\"c617eoa\":\"c617eoa\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"w2r9mit\":\"w2r9mit\",\"e1dtomo4\":\"e1dtomo4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"w1r769h3\":\"w1r769h3\",\"i15dqz5n\":\"i15dqz5n\",\"d13vdt4p\":\"d13vdt4p\",\"hx528er\":\"hx528er\",\"stwawm1\":\"stwawm1\",\"cxrodxk\":\"cxrodxk\",\"o1t6espw\":\"o1t6espw\",\"o6nfpny\":\"o6nfpny\",\"o1dsfits\":\"o1dsfits\",\"cl1obe4\":\"cl1obe4\",\"sq3js75\":\"sq3js75\",\"sgo55is\":\"sgo55is\",\"f1i2u439\":\"f1i2u439\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"w1o3yz26\":\"w1o3yz26\",\"bl5hz2w\":\"bl5hz2w\"};"],"names":["Svg","styled","name","class","propsAsIs","React","DotGrid","width","height","dotSize","fill","delegated","effectiveWidth","effectiveHeight","padding","r","range","map","x","y","Wrapper","IconWrapper","Square","_exp","animated","div","ShadowWrapper","Circle","_exp4","CircleShadowWrapper","_exp5","Logo","hoveringShape","setHoveringShape","config","tension","friction","squareStyles","useSpring","circleStyles","ICON_SIZE","formatHslValues","hue","sat","lit","formatHslString","Caption","DemoWrapper","Shape","Rectangle","_exp2","Example","boxShadow","captionColor","children","normalize","index","borderRadius","color","ExampleWrapper","ShadowDemo","shadowFilterArray","shadowBoxArray","backgroundColor","getCaptionColor","requiresDarkerText","getContrastYIQ","hexWithoutHash","parseInt","hexcolor","substr","yiq","g","b","slice","hexToHsl","clamp","newLit","ToggleControl","id","label","value","toggleValue","gridArea","ControlWrapper","cornerContents","Toggle","active","handleToggle","handleFocusColor","THUMB_FOCUS_GRADIENT","InputWrapper","ColorInput","VisibleColor","BigColorControl","setValue","previewRenderer","ev","target","BackgroundWrapper","HandleButton","Handle","XYPad","box","numOfRows","numOfCols","borderWidth","onChange","isDragging","setIsDragging","xInPixels","clampedNormalize","yInPixels","handleStartGrabbing","window","addEventListener","handleMouseUp","handleMouseMove","removeEventListener","navigator","isMobileSafari","userAgent","match","relativeX","left","relativeY","top","undefined","handleMouseDownInEmptySpace","handleTouchMove","touch","clientX","clientY","transform","handleKeyDown","preventDefault","XYWrapper","XYControl","maxWidth","style","wrapperRef","useBoundingBox","NUM_OF_ROWS","NUM_OF_COLS","Cell","vars","p","area","BackgroundColorCell","ResolutionCell","_exp3","Controls","lightSource","resolution","oomph","crispy","tintShadows","setLightSource","setResolution","setOomph","setCrispy","setBackgroundColor","toggleTintShadows","INITIAL_LIGHT_SOURCE","ColorModeContainer","InnerWrapper","Header","Subtitle","ControlsWrapper","OutputWrapper","OutputHeader","OutputLabel","CodeWrapper","SlopesWrapper","Slopes","Image","FooterWrapper","ShadowPalette","codeOutput","INITIAL_RESOLUTION","useToggle","backgroundHslArray","shadows","generateShadows","output","SHADOW_LAYER_LIMITS","small","min","max","medium","large","size","numOfLayers","Math","round","layersForSize","opacity","calculateShadowOpacity","layerIndex","minLayers","maxLayers","baseOpacity","initialOpacityMultiplier","finalOpacityMultiplier","layerOpacity","layerOpacityMultiplier","averageLayers","roundTo","calculateShadowOffsets","maxOffsetBySize","curve","startPoint","endPoint","controlPoint1","controlPoint2","ratio","getValuesForBezierCurve","t","xOffsetMin","xOffsetMax","yOffsetMin","yOffsetMax","blurRadius","calculateBlurRadius","hypothenuse","radius","spread","calculateSpread","maxReduction","actualReduction","spreadString","push","shadowBackgroundValues","getShadowBackgroundHslValues","backgroundHsl","maxLightness","saturationEnhancement","shadowsForSize","reducedString","reduce","formatShadowsAsDropShadow","acc","shadowString","trim","formatShadowsAsBoxShadow","deferredShadows","deferredShadowBackgroundValues","generateCode","low","high","renderShadowLayers","layers","join","code","DARK_COLORS","button","Ball","DEFAULT_FOCUS_BACKGROUND","handleColor","handleSize","handleBoxSize","mass","ballStyle","initialValue","v","newVal","getImageProps","imgProps","props","getImgProps","defaultLoader","imgConf","process","key","Object","entries"],"sourceRoot":"","ignoreList":[1,2,21,23]}