@frontify/fondue-icons 0.5.0 → 0.5.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.
- package/dist/fondue-icons2.js.map +1 -1
- package/dist/icons/adobe-creative-cloud.d.ts +1 -1
- package/dist/icons/adobe-in-design.d.ts +1 -1
- package/dist/icons/anchor.d.ts +1 -1
- package/dist/icons/annotation-lines.d.ts +1 -1
- package/dist/icons/annotation-numbers.d.ts +1 -1
- package/dist/icons/archive.d.ts +1 -1
- package/dist/icons/arrow-align-down.d.ts +1 -1
- package/dist/icons/arrow-align-horizontal-centre.d.ts +1 -1
- package/dist/icons/arrow-align-left.d.ts +1 -1
- package/dist/icons/arrow-align-right.d.ts +1 -1
- package/dist/icons/arrow-align-up.d.ts +1 -1
- package/dist/icons/arrow-align-vertical-centre.d.ts +1 -1
- package/dist/icons/arrow-bidirectional-horizontal.d.ts +1 -1
- package/dist/icons/arrow-bidirectional.d.ts +1 -1
- package/dist/icons/arrow-bottom-to-top.d.ts +1 -1
- package/dist/icons/arrow-circle-down.d.ts +1 -1
- package/dist/icons/arrow-circle-up.d.ts +1 -1
- package/dist/icons/arrow-down.d.ts +1 -1
- package/dist/icons/arrow-expand.d.ts +1 -1
- package/dist/icons/arrow-fit-bottom-left.d.ts +1 -1
- package/dist/icons/arrow-fit-bottom-right.d.ts +1 -1
- package/dist/icons/arrow-fit-top-left.d.ts +1 -1
- package/dist/icons/arrow-fit-top-right.d.ts +1 -1
- package/dist/icons/arrow-hook.d.ts +1 -1
- package/dist/icons/arrow-left-to-right.d.ts +1 -1
- package/dist/icons/arrow-left.d.ts +1 -1
- package/dist/icons/arrow-minimize.d.ts +1 -1
- package/dist/icons/arrow-move.d.ts +1 -1
- package/dist/icons/arrow-out-external.d.ts +1 -1
- package/dist/icons/arrow-out-logout.d.ts +1 -1
- package/dist/icons/arrow-out-share.d.ts +1 -1
- package/dist/icons/arrow-right-to-left.d.ts +1 -1
- package/dist/icons/arrow-right.d.ts +1 -1
- package/dist/icons/arrow-round-anti-clockwise.d.ts +1 -1
- package/dist/icons/arrow-round-clockwise.d.ts +1 -1
- package/dist/icons/arrow-scale-horizontal.d.ts +1 -1
- package/dist/icons/arrow-scale-vertical.d.ts +1 -1
- package/dist/icons/arrow-stretch-box.d.ts +1 -1
- package/dist/icons/arrow-swap.d.ts +1 -1
- package/dist/icons/arrow-sync.d.ts +1 -1
- package/dist/icons/arrow-top-to-bottom.d.ts +1 -1
- package/dist/icons/arrow-up.d.ts +1 -1
- package/dist/icons/bar-narrow.d.ts +1 -1
- package/dist/icons/bar.d.ts +1 -1
- package/dist/icons/basketball.d.ts +1 -1
- package/dist/icons/bell.d.ts +1 -1
- package/dist/icons/bookmark-filled.d.ts +1 -1
- package/dist/icons/bookmark.d.ts +1 -1
- package/dist/icons/box.d.ts +1 -1
- package/dist/icons/brackets-curly.d.ts +1 -1
- package/dist/icons/building-block.d.ts +1 -1
- package/dist/icons/buildings.d.ts +1 -1
- package/dist/icons/button.d.ts +1 -1
- package/dist/icons/calendar-checked.d.ts +1 -1
- package/dist/icons/calendar.d.ts +1 -1
- package/dist/icons/camera.d.ts +1 -1
- package/dist/icons/cap.d.ts +1 -1
- package/dist/icons/card-layout-large.d.ts +1 -1
- package/dist/icons/card-layout-medium.d.ts +1 -1
- package/dist/icons/card-layout-small.d.ts +1 -1
- package/dist/icons/card.d.ts +1 -1
- package/dist/icons/caret-down.d.ts +1 -1
- package/dist/icons/caret-left-double.d.ts +1 -1
- package/dist/icons/caret-left.d.ts +1 -1
- package/dist/icons/caret-right-double.d.ts +1 -1
- package/dist/icons/caret-right.d.ts +1 -1
- package/dist/icons/caret-up.d.ts +1 -1
- package/dist/icons/carousel.d.ts +1 -1
- package/dist/icons/chart-bars.d.ts +1 -1
- package/dist/icons/chart-line.d.ts +1 -1
- package/dist/icons/chart-pie.d.ts +1 -1
- package/dist/icons/check-mark-circle-filled.d.ts +1 -1
- package/dist/icons/check-mark-circle.d.ts +1 -1
- package/dist/icons/check-mark.d.ts +1 -1
- package/dist/icons/checkbox.d.ts +1 -1
- package/dist/icons/checkmark-circle-box.d.ts +1 -1
- package/dist/icons/circle.d.ts +1 -1
- package/dist/icons/clipboard-at.d.ts +1 -1
- package/dist/icons/clipboard-out.d.ts +1 -1
- package/dist/icons/clipboard.d.ts +1 -1
- package/dist/icons/clock-alternative.d.ts +1 -1
- package/dist/icons/clock-list.d.ts +1 -1
- package/dist/icons/clock.d.ts +1 -1
- package/dist/icons/cloud-arrow-down.d.ts +1 -1
- package/dist/icons/cloud-arrow-up.d.ts +1 -1
- package/dist/icons/code-box.d.ts +1 -1
- package/dist/icons/code-frame.d.ts +1 -1
- package/dist/icons/code.d.ts +1 -1
- package/dist/icons/cog.d.ts +1 -1
- package/dist/icons/color-fan.d.ts +1 -1
- package/dist/icons/command-line-box.d.ts +1 -1
- package/dist/icons/content-block.d.ts +1 -1
- package/dist/icons/context-search.d.ts +1 -1
- package/dist/icons/controller.d.ts +1 -1
- package/dist/icons/country.d.ts +1 -1
- package/dist/icons/crop.d.ts +1 -1
- package/dist/icons/cross-circle-box.d.ts +1 -1
- package/dist/icons/cross-circle-filled.d.ts +1 -1
- package/dist/icons/cross-circle.d.ts +1 -1
- package/dist/icons/cross.d.ts +1 -1
- package/dist/icons/cursor-click.d.ts +1 -1
- package/dist/icons/curve-easing.d.ts +1 -1
- package/dist/icons/diagram-tree.d.ts +1 -1
- package/dist/icons/divider-blank.d.ts +1 -1
- package/dist/icons/divider-dashed.d.ts +1 -1
- package/dist/icons/divider-dotted.d.ts +1 -1
- package/dist/icons/divider-solid.d.ts +1 -1
- package/dist/icons/do-and-dont-box.d.ts +1 -1
- package/dist/icons/do-and-dont.d.ts +1 -1
- package/dist/icons/document-arrow-right.d.ts +1 -1
- package/dist/icons/document-badge.d.ts +1 -1
- package/dist/icons/document-check.d.ts +1 -1
- package/dist/icons/document-code.d.ts +1 -1
- package/dist/icons/document-list.d.ts +1 -1
- package/dist/icons/document-stack.d.ts +1 -1
- package/dist/icons/document-text.d.ts +1 -1
- package/dist/icons/document.d.ts +1 -1
- package/dist/icons/dots-horizontal.d.ts +1 -1
- package/dist/icons/dots-vertical.d.ts +1 -1
- package/dist/icons/droplet.d.ts +1 -1
- package/dist/icons/drops.d.ts +1 -1
- package/dist/icons/edge-all.d.ts +1 -1
- package/dist/icons/edge-bottom.d.ts +1 -1
- package/dist/icons/edge-left.d.ts +1 -1
- package/dist/icons/edge-right.d.ts +1 -1
- package/dist/icons/edge-top.d.ts +1 -1
- package/dist/icons/envelope.d.ts +1 -1
- package/dist/icons/eraser.d.ts +1 -1
- package/dist/icons/exclamation-mark-circle-filled.d.ts +1 -1
- package/dist/icons/exclamation-mark-circle.d.ts +1 -1
- package/dist/icons/exclamation-mark-triangle.d.ts +1 -1
- package/dist/icons/exclamation-mark.d.ts +1 -1
- package/dist/icons/eye-off.d.ts +1 -1
- package/dist/icons/eye.d.ts +1 -1
- package/dist/icons/face-extra-happy.d.ts +1 -1
- package/dist/icons/face-happy-filled.d.ts +1 -1
- package/dist/icons/face-happy.d.ts +1 -1
- package/dist/icons/face-neutral-filled.d.ts +1 -1
- package/dist/icons/face-neutral.d.ts +1 -1
- package/dist/icons/face-sad-filled.d.ts +1 -1
- package/dist/icons/face-sad.d.ts +1 -1
- package/dist/icons/fixed-height.d.ts +1 -1
- package/dist/icons/fixed-width.d.ts +1 -1
- package/dist/icons/flag.d.ts +1 -1
- package/dist/icons/focal-point.d.ts +1 -1
- package/dist/icons/folder-arrow-right.d.ts +1 -1
- package/dist/icons/folder-arrow-up.d.ts +1 -1
- package/dist/icons/folder.d.ts +1 -1
- package/dist/icons/footer.d.ts +1 -1
- package/dist/icons/funnel.d.ts +1 -1
- package/dist/icons/grab-handle.d.ts +1 -1
- package/dist/icons/gradient.d.ts +1 -1
- package/dist/icons/grid-regular-filled.d.ts +1 -1
- package/dist/icons/grid-regular.d.ts +1 -1
- package/dist/icons/h.d.ts +1 -1
- package/dist/icons/heading.d.ts +1 -1
- package/dist/icons/heart-circle-stack.d.ts +1 -1
- package/dist/icons/heart-circle.d.ts +1 -1
- package/dist/icons/highlighter.d.ts +1 -1
- package/dist/icons/home.d.ts +1 -1
- package/dist/icons/hub.d.ts +1 -1
- package/dist/icons/icon-shape.d.ts +1 -1
- package/dist/icons/icon.d.ts +1 -1
- package/dist/icons/image-stack-plus.d.ts +1 -1
- package/dist/icons/image-stack.d.ts +1 -1
- package/dist/icons/image-with-text.d.ts +1 -1
- package/dist/icons/image.d.ts +1 -1
- package/dist/icons/info.d.ts +1 -1
- package/dist/icons/intercom.d.ts +1 -1
- package/dist/icons/johanna.d.ts +1 -1
- package/dist/icons/label.d.ts +1 -1
- package/dist/icons/language.d.ts +1 -1
- package/dist/icons/layers-single.d.ts +1 -1
- package/dist/icons/layers.d.ts +1 -1
- package/dist/icons/leaf.d.ts +1 -1
- package/dist/icons/lightbulb.d.ts +1 -1
- package/dist/icons/lightning-filled.d.ts +1 -1
- package/dist/icons/lightning.d.ts +1 -1
- package/dist/icons/lines-triangular.d.ts +1 -1
- package/dist/icons/lines.d.ts +1 -1
- package/dist/icons/link-box.d.ts +1 -1
- package/dist/icons/link-open.d.ts +1 -1
- package/dist/icons/link.d.ts +1 -1
- package/dist/icons/list-bullet.d.ts +1 -1
- package/dist/icons/list-check.d.ts +1 -1
- package/dist/icons/list-indented.d.ts +1 -1
- package/dist/icons/list-numbers.d.ts +1 -1
- package/dist/icons/lock-closed.d.ts +1 -1
- package/dist/icons/lock-open-filled.d.ts +1 -1
- package/dist/icons/lock-open.d.ts +1 -1
- package/dist/icons/lollipop.d.ts +1 -1
- package/dist/icons/magnifier-plus.d.ts +1 -1
- package/dist/icons/magnifier.d.ts +1 -1
- package/dist/icons/map-pointer.d.ts +1 -1
- package/dist/icons/mark-area.d.ts +1 -1
- package/dist/icons/market.d.ts +1 -1
- package/dist/icons/masonry.d.ts +1 -1
- package/dist/icons/media-object-icon.d.ts +1 -1
- package/dist/icons/media-object-image.d.ts +1 -1
- package/dist/icons/media-object-ratio-1-to-1.d.ts +1 -1
- package/dist/icons/media-object-ratio-1-to-2.d.ts +1 -1
- package/dist/icons/media-object-ratio-1-to-3.d.ts +1 -1
- package/dist/icons/media-object-ratio-2-to-1.d.ts +1 -1
- package/dist/icons/media-object-ratio-3-to-1.d.ts +1 -1
- package/dist/icons/media-object-text-bottom.d.ts +1 -1
- package/dist/icons/media-object-text-left.d.ts +1 -1
- package/dist/icons/media-object-text-right.d.ts +1 -1
- package/dist/icons/media-object-text-top.d.ts +1 -1
- package/dist/icons/media-object-video.d.ts +1 -1
- package/dist/icons/media-object.d.ts +1 -1
- package/dist/icons/mega-menu.d.ts +1 -1
- package/dist/icons/megaphone.d.ts +1 -1
- package/dist/icons/microphone.d.ts +1 -1
- package/dist/icons/minus-circle.d.ts +1 -1
- package/dist/icons/minus.d.ts +1 -1
- package/dist/icons/money-circle-filled.d.ts +1 -1
- package/dist/icons/money.d.ts +1 -1
- package/dist/icons/move-to.d.ts +1 -1
- package/dist/icons/music-note.d.ts +1 -1
- package/dist/icons/nook.d.ts +1 -1
- package/dist/icons/orientation-boxes.d.ts +1 -1
- package/dist/icons/paintbrush.d.ts +1 -1
- package/dist/icons/paperclip.d.ts +1 -1
- package/dist/icons/paperplane.d.ts +1 -1
- package/dist/icons/pause-filled.d.ts +1 -1
- package/dist/icons/pause.d.ts +1 -1
- package/dist/icons/pen.d.ts +1 -1
- package/dist/icons/people.d.ts +1 -1
- package/dist/icons/person-anonymous.d.ts +1 -1
- package/dist/icons/person-lock.d.ts +1 -1
- package/dist/icons/person-slash.d.ts +1 -1
- package/dist/icons/person.d.ts +1 -1
- package/dist/icons/pills.d.ts +1 -1
- package/dist/icons/pin-filled.d.ts +1 -1
- package/dist/icons/pin.d.ts +1 -1
- package/dist/icons/play-box.d.ts +1 -1
- package/dist/icons/play-circle.d.ts +1 -1
- package/dist/icons/play-filled.d.ts +1 -1
- package/dist/icons/play-frame.d.ts +1 -1
- package/dist/icons/play.d.ts +1 -1
- package/dist/icons/plus-box-stack.d.ts +1 -1
- package/dist/icons/plus-circle.d.ts +1 -1
- package/dist/icons/plus-frame.d.ts +1 -1
- package/dist/icons/plus.d.ts +1 -1
- package/dist/icons/pointout.d.ts +1 -1
- package/dist/icons/polygon.d.ts +1 -1
- package/dist/icons/puzzle.d.ts +1 -1
- package/dist/icons/question-mark-circle.d.ts +1 -1
- package/dist/icons/question-mark.d.ts +1 -1
- package/dist/icons/radius-bottom-left.d.ts +1 -1
- package/dist/icons/radius-bottom-right.d.ts +1 -1
- package/dist/icons/radius-top-left.d.ts +1 -1
- package/dist/icons/radius-top-right.d.ts +1 -1
- package/dist/icons/rectangle-landscape.d.ts +1 -1
- package/dist/icons/rectangle-portrait-square.d.ts +1 -1
- package/dist/icons/report.d.ts +1 -1
- package/dist/icons/rocket.d.ts +1 -1
- package/dist/icons/ruler.d.ts +1 -1
- package/dist/icons/scale-large.d.ts +1 -1
- package/dist/icons/scale-small.d.ts +1 -1
- package/dist/icons/scissors.d.ts +1 -1
- package/dist/icons/sidebar-left-hide-filled.d.ts +1 -1
- package/dist/icons/sidebar-left-hide.d.ts +1 -1
- package/dist/icons/sidebar-left-show-filled.d.ts +1 -1
- package/dist/icons/sidebar-left-show.d.ts +1 -1
- package/dist/icons/sidebar-left.d.ts +1 -1
- package/dist/icons/sidebar-right-hide-filled.d.ts +1 -1
- package/dist/icons/sidebar-right-hide.d.ts +1 -1
- package/dist/icons/sidebar-right-show-filled.d.ts +1 -1
- package/dist/icons/sidebar-right-show.d.ts +1 -1
- package/dist/icons/sidebar-right.d.ts +1 -1
- package/dist/icons/sketch.d.ts +1 -1
- package/dist/icons/skip-5-seconds-backward.d.ts +1 -1
- package/dist/icons/skip-5-seconds-forward.d.ts +1 -1
- package/dist/icons/sound-wave.d.ts +1 -1
- package/dist/icons/sparks-filled.d.ts +1 -1
- package/dist/icons/sparks.d.ts +1 -1
- package/dist/icons/speaker-off.d.ts +1 -1
- package/dist/icons/speaker.d.ts +1 -1
- package/dist/icons/speech-bubble-dots.d.ts +1 -1
- package/dist/icons/speech-bubble-empty.d.ts +1 -1
- package/dist/icons/speech-bubble-quote.d.ts +1 -1
- package/dist/icons/speech-bubble-stack.d.ts +1 -1
- package/dist/icons/square.d.ts +1 -1
- package/dist/icons/stack-horizontal-alt-four.d.ts +1 -1
- package/dist/icons/stack-horizontal-alt-three.d.ts +1 -1
- package/dist/icons/stack-horizontal-alt-two.d.ts +1 -1
- package/dist/icons/stack-horizontal.d.ts +1 -1
- package/dist/icons/stack-vertical.d.ts +1 -1
- package/dist/icons/star-filled.d.ts +1 -1
- package/dist/icons/star.d.ts +1 -1
- package/dist/icons/storybook.d.ts +1 -1
- package/dist/icons/strikethrough-box.d.ts +1 -1
- package/dist/icons/subscript.d.ts +1 -1
- package/dist/icons/suitcase-tag.d.ts +1 -1
- package/dist/icons/suitcase.d.ts +1 -1
- package/dist/icons/superscript.d.ts +1 -1
- package/dist/icons/table.d.ts +1 -1
- package/dist/icons/target.d.ts +1 -1
- package/dist/icons/text-alignment-centre.d.ts +1 -1
- package/dist/icons/text-alignment-justify.d.ts +1 -1
- package/dist/icons/text-alignment-left.d.ts +1 -1
- package/dist/icons/text-alignment-right.d.ts +1 -1
- package/dist/icons/text-box-stack.d.ts +1 -1
- package/dist/icons/text-brackets.d.ts +1 -1
- package/dist/icons/text-column-break.d.ts +1 -1
- package/dist/icons/text-columns.d.ts +1 -1
- package/dist/icons/text-format-bold.d.ts +1 -1
- package/dist/icons/text-format-italic.d.ts +1 -1
- package/dist/icons/text-format-strikethrough.d.ts +1 -1
- package/dist/icons/text-format-underline.d.ts +1 -1
- package/dist/icons/text-indent.d.ts +1 -1
- package/dist/icons/text-outdent.d.ts +1 -1
- package/dist/icons/thumbs-down-filled.d.ts +1 -1
- package/dist/icons/thumbs-down.d.ts +1 -1
- package/dist/icons/thumbs-up-filled.d.ts +1 -1
- package/dist/icons/thumbs-up.d.ts +1 -1
- package/dist/icons/trash-bin.d.ts +1 -1
- package/dist/icons/triangle.d.ts +1 -1
- package/dist/icons/twitter.d.ts +1 -1
- package/dist/icons/typography-box.d.ts +1 -1
- package/dist/icons/typography-case.d.ts +1 -1
- package/dist/icons/typography-multiple.d.ts +1 -1
- package/dist/icons/typography.d.ts +1 -1
- package/dist/icons/vimeo.d.ts +1 -1
- package/dist/icons/wand.d.ts +1 -1
- package/dist/icons/workflow-lanes.d.ts +1 -1
- package/dist/icons/workflow-shapes.d.ts +1 -1
- package/package.json +27 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-icons2.js","sources":["../src/createFondueIcon.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n createElement,\n forwardRef,\n type ForwardRefExoticComponent,\n type ReactSVG,\n type RefAttributes,\n type SVGProps,\n} from 'react';\n\nimport { defaultAttributes } from './constants';\nimport { htmlKeysToJsxKeys } from './utilities/jsxKeyFormat';\nimport { kebabCase } from './utilities/stringCasing';\n\nexport type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>, children?: IconNode][];\n\nexport type SVGAttributes = Partial<SVGProps<SVGSVGElement>>;\ntype ComponentAttributes = RefAttributes<SVGSVGElement> & SVGAttributes;\n\ntype IconSizeAsNumber = 12 | 16 | 20 | 24 | 32;\n\n/**\n * @deprecated Use a string or number instead\n */\nexport enum IconSize {\n Size12 = 'Size12',\n Size16 = 'Size16',\n Size20 = 'Size20',\n Size24 = 'Size24',\n Size32 = 'Size32',\n}\n\nexport type FondueIconProps = ComponentAttributes & {\n size?: `${IconSizeAsNumber}` | IconSizeAsNumber | IconSize;\n};\n\nexport type FondueIcon = ForwardRefExoticComponent<FondueIconProps>;\n\nconst iconSizeToNumber: Record<Exclude<FondueIconProps['size'], undefined>, IconSizeAsNumber> = {\n [IconSize.Size12]: 12,\n [IconSize.Size16]: 16,\n [IconSize.Size20]: 20,\n [IconSize.Size24]: 24,\n [IconSize.Size32]: 32,\n 12: 12,\n 16: 16,\n 20: 20,\n 24: 24,\n 32: 32,\n};\n\nconst renderIconNode = (iconNode: IconNode, iconName: string): ReturnType<typeof createElement>[] => {\n return iconNode.map(([tagName, attributes, children]) =>\n createElement(\n tagName,\n {\n key: `${iconName}-${tagName}`,\n ...(attributes ? htmlKeysToJsxKeys(attributes) : {}),\n },\n Array.isArray(children) && children.length > 0\n ? children.map((item) => renderIconNode([item], `${iconName}-${tagName}`))\n : [],\n ),\n );\n};\n\nexport const createFondueIcon = (iconName: string, iconNode: IconNode): FondueIcon => {\n const Component = forwardRef<SVGSVGElement, FondueIconProps>(\n ({ color = 'currentColor', size = 24, className = '', children, ...rest }, ref) => {\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n color,\n width: iconSizeToNumber[size],\n height: iconSizeToNumber[size],\n className: ['fondue', `fondue-${kebabCase(iconName)}`, className].filter(Boolean).join(' '),\n 'data-test-id': `fondue-icons-${kebabCase(iconName)}`,\n key: `fondue-icons-${kebabCase(iconName)}`,\n ...rest,\n },\n [\n ...renderIconNode(iconNode, kebabCase(iconName)),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n );\n\n Component.displayName = `Icon${iconName}`;\n\n return Component;\n};\n"],"names":["IconSize","iconSizeToNumber","renderIconNode","iconNode","iconName","tagName","attributes","children","createElement","htmlKeysToJsxKeys","item","createFondueIcon","Component","forwardRef","color","size","className","rest","ref","defaultAttributes","kebabCase"],"mappings":";;;;AAyBY,IAAAA,sBAAAA,OACRA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,SAAS,UALDA,IAAAA,KAAA,CAAA,CAAA;AAcZ,MAAMC,IAA0F;AAAA,EAC3F,QAAkB;AAAA,EAClB,QAAkB;AAAA,EAClB,QAAkB;AAAA,EAClB,QAAkB;AAAA,EAClB,QAAkB;AAAA,EACnB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACR,GAEMC,IAAiB,CAACC,GAAoBC,MACjCD,EAAS;AAAA,EAAI,CAAC,CAACE,GAASC,GAAYC,CAAQ,MAC/CC;AAAA,IACIH;AAAA,IACA;AAAA,MACI,KAAK,GAAGD,CAAQ,IAAIC,CAAO;AAAA,MAC3B,GAAIC,IAAaG,EAAkBH,CAAU,IAAI,
|
|
1
|
+
{"version":3,"file":"fondue-icons2.js","sources":["../src/createFondueIcon.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n createElement,\n forwardRef,\n type ForwardRefExoticComponent,\n type ReactSVG,\n type RefAttributes,\n type SVGProps,\n} from 'react';\n\nimport { defaultAttributes } from './constants';\nimport { htmlKeysToJsxKeys } from './utilities/jsxKeyFormat';\nimport { kebabCase } from './utilities/stringCasing';\n\nexport type IconNode = [elementName: keyof ReactSVG, attrs: Record<string, string>, children?: IconNode][];\n\nexport type SVGAttributes = Partial<SVGProps<SVGSVGElement>>;\ntype ComponentAttributes = RefAttributes<SVGSVGElement> & SVGAttributes;\n\ntype IconSizeAsNumber = 12 | 16 | 20 | 24 | 32;\n\n/**\n * @deprecated Use a string or number instead\n */\nexport enum IconSize {\n Size12 = 'Size12',\n Size16 = 'Size16',\n Size20 = 'Size20',\n Size24 = 'Size24',\n Size32 = 'Size32',\n}\n\nexport type FondueIconProps = ComponentAttributes & {\n size?: `${IconSizeAsNumber}` | IconSizeAsNumber | IconSize;\n};\n\nexport type FondueIcon = ForwardRefExoticComponent<FondueIconProps>;\n\nconst iconSizeToNumber: Record<Exclude<FondueIconProps['size'], undefined>, IconSizeAsNumber> = {\n [IconSize.Size12]: 12,\n [IconSize.Size16]: 16,\n [IconSize.Size20]: 20,\n [IconSize.Size24]: 24,\n [IconSize.Size32]: 32,\n 12: 12,\n 16: 16,\n 20: 20,\n 24: 24,\n 32: 32,\n};\n\nconst renderIconNode = (iconNode: IconNode, iconName: string): ReturnType<typeof createElement>[] => {\n return iconNode.map(([tagName, attributes, children]) =>\n createElement(\n tagName,\n {\n key: `${iconName}-${tagName}`,\n ...(attributes ? htmlKeysToJsxKeys(attributes) : {}),\n },\n Array.isArray(children) && children.length > 0\n ? children.map((item) => renderIconNode([item], `${iconName}-${tagName}`))\n : [],\n ),\n );\n};\n\nexport const createFondueIcon = (iconName: string, iconNode: IconNode): FondueIcon => {\n const Component = forwardRef<SVGSVGElement, FondueIconProps>(\n ({ color = 'currentColor', size = 24, className = '', children, ...rest }, ref) => {\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n color,\n width: iconSizeToNumber[size],\n height: iconSizeToNumber[size],\n className: ['fondue', `fondue-${kebabCase(iconName)}`, className].filter(Boolean).join(' '),\n 'data-test-id': `fondue-icons-${kebabCase(iconName)}`,\n key: `fondue-icons-${kebabCase(iconName)}`,\n ...rest,\n },\n [\n ...renderIconNode(iconNode, kebabCase(iconName)),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n );\n\n Component.displayName = `Icon${iconName}`;\n\n return Component;\n};\n"],"names":["IconSize","iconSizeToNumber","renderIconNode","iconNode","iconName","tagName","attributes","children","createElement","htmlKeysToJsxKeys","item","createFondueIcon","Component","forwardRef","color","size","className","rest","ref","defaultAttributes","kebabCase"],"mappings":";;;;AAyBY,IAAAA,sBAAAA,OACRA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,SAAS,UALDA,IAAAA,KAAA,CAAA,CAAA;AAcZ,MAAMC,IAA0F;AAAA,EAC3F,QAAkB;AAAA,EAClB,QAAkB;AAAA,EAClB,QAAkB;AAAA,EAClB,QAAkB;AAAA,EAClB,QAAkB;AAAA,EACnB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACR,GAEMC,IAAiB,CAACC,GAAoBC,MACjCD,EAAS;AAAA,EAAI,CAAC,CAACE,GAASC,GAAYC,CAAQ,MAC/CC;AAAA,IACIH;AAAA,IACA;AAAA,MACI,KAAK,GAAGD,CAAQ,IAAIC,CAAO;AAAA,MAC3B,GAAIC,IAAaG,EAAkBH,CAAU,IAAI,CAAA;AAAA,IACrD;AAAA,IACA,MAAM,QAAQC,CAAQ,KAAKA,EAAS,SAAS,IACvCA,EAAS,IAAI,CAACG,MAASR,EAAe,CAACQ,CAAI,GAAG,GAAGN,CAAQ,IAAIC,CAAO,EAAE,CAAC,IACvE,CAAA;AAAA,EAAC;AAEf,GAGSM,IAAmB,CAACP,GAAkBD,MAAmC;AAClF,QAAMS,IAAYC;AAAA,IACd,CAAC,EAAE,OAAAC,IAAQ,gBAAgB,MAAAC,IAAO,IAAI,WAAAC,IAAY,IAAI,UAAAT,GAAU,GAAGU,EAAK,GAAGC,MAChEV;AAAA,MACH;AAAA,MACA;AAAA,QACI,KAAAU;AAAA,QACA,GAAGC;AAAA,QACH,OAAAL;AAAA,QACA,OAAOb,EAAiBc,CAAI;AAAA,QAC5B,QAAQd,EAAiBc,CAAI;AAAA,QAC7B,WAAW,CAAC,UAAU,UAAUK,EAAUhB,CAAQ,CAAC,IAAIY,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,QAC1F,gBAAgB,gBAAgBI,EAAUhB,CAAQ,CAAC;AAAA,QACnD,KAAK,gBAAgBgB,EAAUhB,CAAQ,CAAC;AAAA,QACxC,GAAGa;AAAA,MACP;AAAA,MACA;AAAA,QACI,GAAGf,EAAeC,GAAUiB,EAAUhB,CAAQ,CAAC;AAAA;AAAA,QAE/C,GAAI,MAAM,QAAQG,CAAQ,IAAIA,IAAW,CAACA,CAAQ;AAAA,MAAA;AAAA,IAE1D;AAAA,EAER;AAEU,SAAAK,EAAA,cAAc,OAAOR,CAAQ,IAEhCQ;AACX;"}
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:adobe-creative-cloud
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconAdobeCreativeCloud: import('
|
|
7
|
+
export declare const IconAdobeCreativeCloud: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:adobe-in-design
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconAdobeInDesign: import('
|
|
7
|
+
export declare const IconAdobeInDesign: import('..').FondueIcon;
|
package/dist/icons/anchor.d.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:anchor
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconAnchor: import('
|
|
7
|
+
export declare const IconAnchor: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:annotation-lines
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconAnnotationLines: import('
|
|
7
|
+
export declare const IconAnnotationLines: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:annotation-numbers
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconAnnotationNumbers: import('
|
|
7
|
+
export declare const IconAnnotationNumbers: import('..').FondueIcon;
|
package/dist/icons/archive.d.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:archive
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArchive: import('
|
|
7
|
+
export declare const IconArchive: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-align-down
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowAlignDown: import('
|
|
7
|
+
export declare const IconArrowAlignDown: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-align-horizontal-centre
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowAlignHorizontalCentre: import('
|
|
7
|
+
export declare const IconArrowAlignHorizontalCentre: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-align-left
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowAlignLeft: import('
|
|
7
|
+
export declare const IconArrowAlignLeft: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-align-right
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowAlignRight: import('
|
|
7
|
+
export declare const IconArrowAlignRight: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-align-up
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowAlignUp: import('
|
|
7
|
+
export declare const IconArrowAlignUp: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-align-vertical-centre
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowAlignVerticalCentre: import('
|
|
7
|
+
export declare const IconArrowAlignVerticalCentre: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-bidirectional-horizontal
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowBidirectionalHorizontal: import('
|
|
7
|
+
export declare const IconArrowBidirectionalHorizontal: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-bidirectional
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowBidirectional: import('
|
|
7
|
+
export declare const IconArrowBidirectional: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-bottom-to-top
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowBottomToTop: import('
|
|
7
|
+
export declare const IconArrowBottomToTop: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-circle-down
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowCircleDown: import('
|
|
7
|
+
export declare const IconArrowCircleDown: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-circle-up
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowCircleUp: import('
|
|
7
|
+
export declare const IconArrowCircleUp: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-down
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowDown: import('
|
|
7
|
+
export declare const IconArrowDown: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-expand
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowExpand: import('
|
|
7
|
+
export declare const IconArrowExpand: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-fit-bottom-left
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowFitBottomLeft: import('
|
|
7
|
+
export declare const IconArrowFitBottomLeft: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-fit-bottom-right
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowFitBottomRight: import('
|
|
7
|
+
export declare const IconArrowFitBottomRight: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-fit-top-left
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowFitTopLeft: import('
|
|
7
|
+
export declare const IconArrowFitTopLeft: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-fit-top-right
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowFitTopRight: import('
|
|
7
|
+
export declare const IconArrowFitTopRight: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-hook
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowHook: import('
|
|
7
|
+
export declare const IconArrowHook: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-left-to-right
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowLeftToRight: import('
|
|
7
|
+
export declare const IconArrowLeftToRight: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-left
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowLeft: import('
|
|
7
|
+
export declare const IconArrowLeft: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-minimize
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowMinimize: import('
|
|
7
|
+
export declare const IconArrowMinimize: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-move
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowMove: import('
|
|
7
|
+
export declare const IconArrowMove: import('..').FondueIcon;
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @preview  - https://fondue-components.frontify.com/?path=/story/icons_icons--default&args=iconName:arrow-out-external
|
|
5
5
|
* @see https://fondue-components.frontify.com/?path=/story/icons_icons--default - Documentation
|
|
6
6
|
*/
|
|
7
|
-
export declare const IconArrowOutExternal: import('
|
|
7
|
+
export declare const IconArrowOutExternal: import('..').FondueIcon;
|