UNPKG

@blueprintjs/icons

Version:

Components, fonts, icons, and css files for creating and displaying icons.

31 lines 4.82 kB
/* * Copyright 2024 Palantir Technologies, Inc. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import * as React from "react"; import { IconSize } from "../../iconTypes"; import { SVGIconContainer } from "../../svgIconContainer"; export const ZoomToFit = React.forwardRef((props, ref) => { const isLarge = props.size >= IconSize.LARGE; const pixelGridSize = isLarge ? IconSize.LARGE : IconSize.STANDARD; const translation = `${-1 * pixelGridSize / 0.05 / 2}`; const style = { transformOrigin: "center" }; return (React.createElement(SVGIconContainer, { iconName: "zoom-to-fit", ref: ref, ...props }, React.createElement("path", { d: isLarge ? "M20 260C31 260 40 269 40 280V360H120C131 360 140 369 140 380C140 391 131 400 120 400H20C9 400 0 391 0 380V280C0 269 9 260 20 260zM120 240C120 251 111 260 100 260C94.4 260 89.4 257.8 85.8 254.2L45.8 214.2C42.2 210.6 40 205.6 40 200C40 194.4 42.2 189.4 45.8 185.8L85.8 145.8C89.4 142.2 94.4 140 100 140C111 140 120 149 120 160C120 165.6 117.8 170.6 114.2 174.2L88.2 200L114 225.8C117.8 229.4 120 234.4 120 240zM160 280C165.6 280 170.6 282.2 174.2 285.8L200 311.8L225.8 286C229.4 282.2 234.4 280 240 280C251 280 260 289 260 300C260 305.6 257.8 310.6 254.2 314.2L214.2 354.2C210.6 357.8 205.6 360 200 360S189.4 357.8 185.8 354.2L145.8 314.2C142.2 310.6 140 305.6 140 300C140 289 149 280 160 280zM120 40H40V120C40 131 31 140 20 140S0 131 0 120V20C0 9 9 0 20 0H120C131 0 140 9 140 20C140 31 131 40 120 40zM280 160C280 149 289 140 300 140C305.6 140 310.6 142.2 314.2000000000001 145.8L354.2000000000001 185.8C357.8 189.4 360 194.4 360 200C360 205.6 357.8 210.6 354.2000000000001 214.2L314.2000000000001 254.2C310.6 257.8 305.6 260 300 260C289 260 280 251 280 240C280 234.4 282.2 229.4 285.8 225.8L311.8 200L286 174.2C282.2 170.6 280 165.6 280 160zM380 400H280C269 400 260 391 260 380C260 369 269 360 280 360H360V280C360 269 369 260 380 260S400 269 400 280V380C400 391 391 400 380 400zM240 120C234.4 120 229.4 117.8 225.8 114.2000000000001L200 88.2L174.2 114C170.6 117.8 165.6 120 160 120C149 120 140 111 140 100C140 94.4 142.2 89.4 145.8 85.8L185.8 45.8C189.4 42.2 194.4 40 200 40S210.6 42.2 214.2 45.8L254.2 85.8C257.8 89.4 260 94.4 260 100C260 111 251 120 240 120zM380 140C369 140 360 131 360 120V40H280C269 40 260 31 260 20C260 9 269 0 280 0H380C391 0 400 9 400 20V120C400 131 391 140 380 140z" : "M220 120C220 109 229 100 240 100C245.6 100 250.6 102.2 254.2 105.8L294.2000000000001 145.8C297.8 149.4 300 154.4 300 160C300 165.6 297.8 170.6 294.2000000000001 174.2L254.2 214.2C250.6 217.8 245.6 220 240 220C229 220 220 211 220 200C220 194.4 222.2 189.4 225.8 185.8L251.8 160L226 134.2C222.2 130.6 220 125.6 220 120zM20 220C31 220 40 229 40 240V280H80C91 280 100 289 100 300C100 311 91 320 80 320H20C9 320 0 311 0 300V240C0 229 9 220 20 220zM100 200C100 211 91 220 80 220C74.4 220 69.4 217.8 65.8 214.2L25.8 174.2C22.2 170.6 20 165.6 20 160C20 154.4 22.2 149.4 25.8 145.8L65.8 105.8C69.4 102.2 74.4 100 80 100C91 100 100 109 100 120C100 125.6 97.8 130.6 94.2 134.2L68.2 160L94 185.8C97.8 189.4 100 194.4 100 200zM120 220C125.6 220 130.6 222.2 134.2 225.8L160 251.8L185.8 226C189.4 222.2 194.4 220 200 220C211 220 220 229 220 240C220 245.6 217.8 250.6 214.2 254.2L174.2 294.2C170.6 297.8 165.6 300 160 300S149.4 297.8 145.8 294.2L105.8 254.2C102.2 250.6 100 245.6 100 240C100 229 109 220 120 220zM300 100C289 100 280 91 280 80V40H240C229 40 220 31 220 20C220 9 229 0 240 0H300C311 0 320 9 320 20V80C320 91 311 100 300 100zM300 320H240C229 320 220 311 220 300C220 289 229 280 240 280H280V240C280 229 289 220 300 220S320 229 320 240V300C320 311 311 320 300 320zM80 40H40V80C40 91 31 100 20 100S0 91 0 80V20C0 9 9 0 20 0H80C91 0 100 9 100 20C100 31 91 40 80 40zM200 100C194.4 100 189.4 97.8 185.8 94.2L160 68.2L134.2 94C130.6 97.8 125.6 100 120 100C109 100 100 91 100 80C100 74.4 102.2 69.4 105.8 65.8L145.8 25.8C149.4 22.2 154.4 20 160 20S170.6 22.2 174.2 25.8L214.2 65.8C217.8 69.4 220 74.4 220 80C220 91 211 100 200 100z", fillRule: "evenodd", transform: `scale(0.05, -0.05) translate(${translation}, ${translation})`, style: style }))); }); ZoomToFit.defaultProps = { size: IconSize.STANDARD, }; ZoomToFit.displayName = `Blueprint5.Icon.ZoomToFit`; export default ZoomToFit; //# sourceMappingURL=zoom-to-fit.js.map