@purpurds/icon 6.3.0 → 6.4.0
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/components/activity-level.cjs.js +1 -1
- package/dist/components/activity-level.es.js +1 -1
- package/dist/components/add.cjs.js +1 -1
- package/dist/components/add.es.js +1 -1
- package/dist/components/address-book.cjs.js +1 -1
- package/dist/components/address-book.es.js +1 -1
- package/dist/components/ai-robot.cjs.js +1 -1
- package/dist/components/ai-robot.es.js +1 -1
- package/dist/components/airplay.cjs.js +1 -1
- package/dist/components/airplay.es.js +1 -1
- package/dist/components/alarm-off.cjs.js +1 -1
- package/dist/components/alarm-off.es.js +1 -1
- package/dist/components/alarm-on.cjs.js +1 -1
- package/dist/components/alarm-on.es.js +1 -1
- package/dist/components/alert-filled.cjs.js +1 -1
- package/dist/components/alert-filled.es.js +1 -1
- package/dist/components/alert.cjs.js +1 -1
- package/dist/components/alert.es.js +1 -1
- package/dist/components/android.cjs.js +1 -1
- package/dist/components/android.es.js +1 -1
- package/dist/components/apple.cjs.js +1 -1
- package/dist/components/apple.es.js +1 -1
- package/dist/components/arrow-down.cjs.js +1 -1
- package/dist/components/arrow-down.es.js +1 -1
- package/dist/components/arrow-left.cjs.js +1 -1
- package/dist/components/arrow-left.es.js +1 -1
- package/dist/components/arrow-right.cjs.js +1 -1
- package/dist/components/arrow-right.es.js +1 -1
- package/dist/components/arrow-subdirectory.cjs.js +1 -1
- package/dist/components/arrow-subdirectory.es.js +1 -1
- package/dist/components/arrow-up.cjs.js +1 -1
- package/dist/components/arrow-up.es.js +1 -1
- package/dist/components/attachment.cjs.js +1 -1
- package/dist/components/attachment.es.js +1 -1
- package/dist/components/b2b-customer.cjs.js +1 -1
- package/dist/components/b2b-customer.es.js +1 -1
- package/dist/components/bag.cjs.js +1 -1
- package/dist/components/bag.es.js +1 -1
- package/dist/components/bankid.cjs.js +1 -1
- package/dist/components/bankid.es.js +1 -1
- package/dist/components/bar-chart.cjs.js +1 -1
- package/dist/components/bar-chart.es.js +1 -1
- package/dist/components/basketball.cjs.js +1 -1
- package/dist/components/basketball.es.js +1 -1
- package/dist/components/battery.cjs.js +1 -1
- package/dist/components/battery.es.js +1 -1
- package/dist/components/blood-pressure.cjs.js +1 -1
- package/dist/components/blood-pressure.es.js +1 -1
- package/dist/components/bluetooth.cjs.js +1 -1
- package/dist/components/bluetooth.es.js +1 -1
- package/dist/components/bookmark-filled.cjs.js +1 -1
- package/dist/components/bookmark-filled.es.js +1 -1
- package/dist/components/bookmark.cjs.js +1 -1
- package/dist/components/bookmark.es.js +1 -1
- package/dist/components/box.cjs.js +1 -1
- package/dist/components/box.es.js +1 -1
- package/dist/components/broadband.cjs.js +1 -1
- package/dist/components/broadband.es.js +1 -1
- package/dist/components/broken-phone.cjs.js +1 -1
- package/dist/components/broken-phone.es.js +1 -1
- package/dist/components/bulb.cjs.js +1 -1
- package/dist/components/bulb.es.js +1 -1
- package/dist/components/business-continuity.cjs.js +1 -1
- package/dist/components/business-continuity.es.js +1 -1
- package/dist/components/business-intelligence.cjs.js +1 -1
- package/dist/components/business-intelligence.es.js +1 -1
- package/dist/components/calendar.cjs.js +1 -1
- package/dist/components/calendar.es.js +1 -1
- package/dist/components/camera.cjs.js +1 -1
- package/dist/components/camera.es.js +1 -1
- package/dist/components/card-view.cjs.js +1 -1
- package/dist/components/card-view.es.js +1 -1
- package/dist/components/care.cjs.js +1 -1
- package/dist/components/care.es.js +1 -1
- package/dist/components/cart.cjs.js +1 -1
- package/dist/components/cart.es.js +1 -1
- package/dist/components/cast.cjs.js +1 -1
- package/dist/components/cast.es.js +1 -1
- package/dist/components/chat-filled.cjs.js +1 -1
- package/dist/components/chat-filled.es.js +1 -1
- package/dist/components/chat-robot.cjs.js +1 -1
- package/dist/components/chat-robot.es.js +1 -1
- package/dist/components/chat.cjs.js +1 -1
- package/dist/components/chat.es.js +1 -1
- package/dist/components/check-circle-filled.cjs.js +1 -1
- package/dist/components/check-circle-filled.es.js +1 -1
- package/dist/components/check-circle.cjs.js +1 -1
- package/dist/components/check-circle.es.js +1 -1
- package/dist/components/checkmark-bold.cjs.js +1 -1
- package/dist/components/checkmark-bold.es.js +1 -1
- package/dist/components/checkmark.cjs.js +1 -1
- package/dist/components/checkmark.es.js +1 -1
- package/dist/components/chevron-down.cjs.js +1 -1
- package/dist/components/chevron-down.es.js +1 -1
- package/dist/components/chevron-left.cjs.js +1 -1
- package/dist/components/chevron-left.es.js +1 -1
- package/dist/components/chevron-right.cjs.js +1 -1
- package/dist/components/chevron-right.es.js +1 -1
- package/dist/components/chevron-up.cjs.js +1 -1
- package/dist/components/chevron-up.es.js +1 -1
- package/dist/components/child-1.cjs.js +1 -1
- package/dist/components/child-1.es.js +1 -1
- package/dist/components/child-2.cjs.js +1 -1
- package/dist/components/child-2.es.js +1 -1
- package/dist/components/close-circle.cjs.js +1 -1
- package/dist/components/close-circle.es.js +1 -1
- package/dist/components/close.cjs.js +1 -1
- package/dist/components/close.es.js +1 -1
- package/dist/components/cloud-connect.cjs.js +1 -1
- package/dist/components/cloud-connect.es.js +1 -1
- package/dist/components/cloud.cjs.js +1 -1
- package/dist/components/cloud.es.js +1 -1
- package/dist/components/coffee.cjs.js +1 -1
- package/dist/components/coffee.es.js +1 -1
- package/dist/components/compass.cjs.js +1 -1
- package/dist/components/compass.es.js +1 -1
- package/dist/components/connected-building.cjs.js +1 -1
- package/dist/components/connected-building.es.js +1 -1
- package/dist/components/connected.cjs.js +1 -1
- package/dist/components/connected.es.js +1 -1
- package/dist/components/construction.cjs.js +1 -1
- package/dist/components/construction.es.js +1 -1
- package/dist/components/conversation.cjs.js +1 -1
- package/dist/components/conversation.es.js +1 -1
- package/dist/components/cookie.cjs.js +1 -1
- package/dist/components/cookie.es.js +1 -1
- package/dist/components/copy-filled.cjs.js +1 -1
- package/dist/components/copy-filled.es.js +1 -1
- package/dist/components/copy.cjs.js +1 -1
- package/dist/components/copy.es.js +1 -1
- package/dist/components/core-router.cjs.js +1 -1
- package/dist/components/core-router.es.js +1 -1
- package/dist/components/credit-card.cjs.js +1 -1
- package/dist/components/credit-card.es.js +1 -1
- package/dist/components/customer-dialogue.cjs.js +1 -1
- package/dist/components/customer-dialogue.es.js +1 -1
- package/dist/components/daas-device.cjs.js +1 -1
- package/dist/components/daas-device.es.js +1 -1
- package/dist/components/data-transfer.cjs.js +1 -1
- package/dist/components/data-transfer.es.js +1 -1
- package/dist/components/delivery.cjs.js +1 -1
- package/dist/components/delivery.es.js +1 -1
- package/dist/components/desktop.cjs.js +1 -1
- package/dist/components/desktop.es.js +1 -1
- package/dist/components/devices.cjs.js +1 -1
- package/dist/components/devices.es.js +1 -1
- package/dist/components/dislike.cjs.js +1 -1
- package/dist/components/dislike.es.js +1 -1
- package/dist/components/doc.cjs.js +1 -1
- package/dist/components/doc.es.js +1 -1
- package/dist/components/document-doc.cjs.js +1 -1
- package/dist/components/document-doc.es.js +1 -1
- package/dist/components/document-edit.cjs.js +1 -1
- package/dist/components/document-edit.es.js +1 -1
- package/dist/components/document-pdf.cjs.js +1 -1
- package/dist/components/document-pdf.es.js +1 -1
- package/dist/components/document-ppt.cjs.js +1 -1
- package/dist/components/document-ppt.es.js +1 -1
- package/dist/components/download.cjs.js +1 -1
- package/dist/components/download.es.js +1 -1
- package/dist/components/drone.cjs.js +1 -1
- package/dist/components/drone.es.js +1 -1
- package/dist/components/dsl-hub.cjs.js +1 -1
- package/dist/components/dsl-hub.es.js +1 -1
- package/dist/components/edit.cjs.js +1 -1
- package/dist/components/edit.es.js +1 -1
- package/dist/components/education.cjs.js +1 -1
- package/dist/components/education.es.js +1 -1
- package/dist/components/efficiency.cjs.js +1 -1
- package/dist/components/efficiency.es.js +1 -1
- package/dist/components/email.cjs.js +1 -1
- package/dist/components/email.es.js +1 -1
- package/dist/components/end-user.cjs.js +1 -1
- package/dist/components/end-user.es.js +1 -1
- package/dist/components/entertainment.cjs.js +1 -1
- package/dist/components/entertainment.es.js +1 -1
- package/dist/components/environment.cjs.js +1 -1
- package/dist/components/environment.es.js +1 -1
- package/dist/components/error-filled.cjs.js +1 -1
- package/dist/components/error-filled.es.js +1 -1
- package/dist/components/error.cjs.js +1 -1
- package/dist/components/error.es.js +1 -1
- package/dist/components/esim-simcard.cjs.js +1 -1
- package/dist/components/esim-simcard.es.js +1 -1
- package/dist/components/esim.cjs.js +1 -1
- package/dist/components/esim.es.js +1 -1
- package/dist/components/euro.cjs.js +1 -1
- package/dist/components/euro.es.js +1 -1
- package/dist/components/excel.cjs.js +1 -1
- package/dist/components/excel.es.js +1 -1
- package/dist/components/external.cjs.js +1 -1
- package/dist/components/external.es.js +1 -1
- package/dist/components/face-id.cjs.js +1 -1
- package/dist/components/face-id.es.js +1 -1
- package/dist/components/facebook.cjs.js +1 -1
- package/dist/components/facebook.es.js +1 -1
- package/dist/components/facemask.cjs.js +1 -1
- package/dist/components/facemask.es.js +1 -1
- package/dist/components/fiber.cjs.js +1 -1
- package/dist/components/fiber.es.js +1 -1
- package/dist/components/film.cjs.js +1 -1
- package/dist/components/film.es.js +1 -1
- package/dist/components/filter.cjs.js +1 -1
- package/dist/components/filter.es.js +1 -1
- package/dist/components/fingerprint.cjs.js +1 -1
- package/dist/components/fingerprint.es.js +1 -1
- package/dist/components/fiveg.cjs.js +1 -1
- package/dist/components/fiveg.es.js +1 -1
- package/dist/components/flag.cjs.js +1 -1
- package/dist/components/flag.es.js +1 -1
- package/dist/components/focus.cjs.js +1 -1
- package/dist/components/focus.es.js +1 -1
- package/dist/components/folder-copy.cjs.js +1 -1
- package/dist/components/folder-copy.es.js +1 -1
- package/dist/components/folder-new.cjs.js +1 -1
- package/dist/components/folder-new.es.js +1 -1
- package/dist/components/folder.cjs.js +1 -1
- package/dist/components/folder.es.js +1 -1
- package/dist/components/food.cjs.js +1 -1
- package/dist/components/food.es.js +1 -1
- package/dist/components/fourg.cjs.js +1 -1
- package/dist/components/fourg.es.js +1 -1
- package/dist/components/fraud.cjs.js +1 -1
- package/dist/components/fraud.es.js +1 -1
- package/dist/components/games.cjs.js +1 -1
- package/dist/components/games.es.js +1 -1
- package/dist/components/getting-started.cjs.js +1 -1
- package/dist/components/getting-started.es.js +1 -1
- package/dist/components/gif.cjs.js +1 -1
- package/dist/components/gif.es.js +1 -1
- package/dist/components/google.cjs.js +1 -1
- package/dist/components/google.es.js +1 -1
- package/dist/components/graph.cjs.js +1 -1
- package/dist/components/graph.es.js +1 -1
- package/dist/components/grid-view.cjs.js +1 -1
- package/dist/components/grid-view.es.js +1 -1
- package/dist/components/handshake.cjs.js +1 -1
- package/dist/components/handshake.es.js +1 -1
- package/dist/components/headphones.cjs.js +1 -1
- package/dist/components/headphones.es.js +1 -1
- package/dist/components/heart-filled.cjs.js +1 -1
- package/dist/components/heart-filled.es.js +1 -1
- package/dist/components/heart.cjs.js +1 -1
- package/dist/components/heart.es.js +1 -1
- package/dist/components/help.cjs.js +1 -1
- package/dist/components/help.es.js +1 -1
- package/dist/components/home-care.cjs.js +1 -1
- package/dist/components/home-care.es.js +1 -1
- package/dist/components/home-filled.cjs.js +1 -1
- package/dist/components/home-filled.es.js +1 -1
- package/dist/components/home-installation.cjs.js +1 -1
- package/dist/components/home-installation.es.js +1 -1
- package/dist/components/home.cjs.js +1 -1
- package/dist/components/home.es.js +1 -1
- package/dist/components/hospital.cjs.js +1 -1
- package/dist/components/hospital.es.js +1 -1
- package/dist/components/hourglass.cjs.js +1 -1
- package/dist/components/hourglass.es.js +1 -1
- package/dist/components/image.cjs.js +1 -1
- package/dist/components/image.es.js +1 -1
- package/dist/components/industrial-iot.cjs.js +1 -1
- package/dist/components/industrial-iot.es.js +1 -1
- package/dist/components/industry.cjs.js +1 -1
- package/dist/components/industry.es.js +1 -1
- package/dist/components/infinite.cjs.js +1 -1
- package/dist/components/infinite.es.js +1 -1
- package/dist/components/info-filled.cjs.js +1 -1
- package/dist/components/info-filled.es.js +1 -1
- package/dist/components/info.cjs.js +1 -1
- package/dist/components/info.es.js +1 -1
- package/dist/components/instagram.cjs.js +1 -1
- package/dist/components/instagram.es.js +1 -1
- package/dist/components/internet.cjs.js +1 -1
- package/dist/components/internet.es.js +1 -1
- package/dist/components/invisible.cjs.js +1 -1
- package/dist/components/invisible.es.js +1 -1
- package/dist/components/invoice-filled.cjs.js +1 -1
- package/dist/components/invoice-filled.es.js +1 -1
- package/dist/components/invoice.cjs.js +1 -1
- package/dist/components/invoice.es.js +1 -1
- package/dist/components/it-service.cjs.js +1 -1
- package/dist/components/it-service.es.js +1 -1
- package/dist/components/job-search.cjs.js +1 -1
- package/dist/components/job-search.es.js +1 -1
- package/dist/components/key.cjs.js +1 -1
- package/dist/components/key.es.js +1 -1
- package/dist/components/kontantkort.cjs.js +1 -1
- package/dist/components/kontantkort.es.js +1 -1
- package/dist/components/kr.cjs.js +1 -1
- package/dist/components/kr.es.js +1 -1
- package/dist/components/laptop.cjs.js +1 -1
- package/dist/components/laptop.es.js +1 -1
- package/dist/components/late-payment.cjs.js +1 -1
- package/dist/components/late-payment.es.js +1 -1
- package/dist/components/layers.cjs.js +1 -1
- package/dist/components/layers.es.js +1 -1
- package/dist/components/letter.cjs.js +1 -1
- package/dist/components/letter.es.js +1 -1
- package/dist/components/like.cjs.js +1 -1
- package/dist/components/like.es.js +1 -1
- package/dist/components/link.cjs.js +1 -1
- package/dist/components/link.es.js +1 -1
- package/dist/components/linkedin.cjs.js +1 -1
- package/dist/components/linkedin.es.js +1 -1
- package/dist/components/list-view.cjs.js +1 -1
- package/dist/components/list-view.es.js +1 -1
- package/dist/components/lock-open.cjs.js +1 -1
- package/dist/components/lock-open.es.js +1 -1
- package/dist/components/lock.cjs.js +1 -1
- package/dist/components/lock.es.js +1 -1
- package/dist/components/login.cjs.js +1 -1
- package/dist/components/login.es.js +1 -1
- package/dist/components/logout.cjs.js +1 -1
- package/dist/components/logout.es.js +1 -1
- package/dist/components/map.cjs.js +1 -1
- package/dist/components/map.es.js +1 -1
- package/dist/components/maximize.cjs.js +1 -1
- package/dist/components/maximize.es.js +1 -1
- package/dist/components/measuring-health.cjs.js +1 -1
- package/dist/components/measuring-health.es.js +1 -1
- package/dist/components/media-content.cjs.js +1 -1
- package/dist/components/media-content.es.js +1 -1
- package/dist/components/megaphone.cjs.js +1 -1
- package/dist/components/megaphone.es.js +1 -1
- package/dist/components/menu.cjs.js +1 -1
- package/dist/components/menu.es.js +1 -1
- package/dist/components/microphone.cjs.js +1 -1
- package/dist/components/microphone.es.js +1 -1
- package/dist/components/minimize.cjs.js +1 -1
- package/dist/components/minimize.es.js +1 -1
- package/dist/components/minus-bold.cjs.js +1 -1
- package/dist/components/minus-bold.es.js +1 -1
- package/dist/components/minus.cjs.js +1 -1
- package/dist/components/minus.es.js +1 -1
- package/dist/components/mms.cjs.js +1 -1
- package/dist/components/mms.es.js +1 -1
- package/dist/components/mobile-broadband.cjs.js +1 -1
- package/dist/components/mobile-broadband.es.js +1 -1
- package/dist/components/moisture.cjs.js +1 -1
- package/dist/components/moisture.es.js +1 -1
- package/dist/components/money-back-euro.cjs.js +1 -1
- package/dist/components/money-back-euro.es.js +1 -1
- package/dist/components/money-back-kr.cjs.js +1 -1
- package/dist/components/money-back-kr.es.js +1 -1
- package/dist/components/money-euro.cjs.js +1 -1
- package/dist/components/money-euro.es.js +1 -1
- package/dist/components/money-kr.cjs.js +1 -1
- package/dist/components/money-kr.es.js +1 -1
- package/dist/components/monitoring-iot.cjs.js +1 -1
- package/dist/components/monitoring-iot.es.js +1 -1
- package/dist/components/more-horizontal-filled.cjs.js +1 -1
- package/dist/components/more-horizontal-filled.es.js +1 -1
- package/dist/components/more-horizontal.cjs.js +1 -1
- package/dist/components/more-horizontal.es.js +1 -1
- package/dist/components/more-vertical.cjs.js +1 -1
- package/dist/components/more-vertical.es.js +1 -1
- package/dist/components/music.cjs.js +1 -1
- package/dist/components/music.es.js +1 -1
- package/dist/components/mute.cjs.js +1 -1
- package/dist/components/mute.es.js +1 -1
- package/dist/components/network.cjs.js +1 -1
- package/dist/components/network.es.js +1 -1
- package/dist/components/new-contact.cjs.js +1 -1
- package/dist/components/new-contact.es.js +1 -1
- package/dist/components/new-group.cjs.js +1 -1
- package/dist/components/new-group.es.js +1 -1
- package/dist/components/news.cjs.js +1 -1
- package/dist/components/news.es.js +1 -1
- package/dist/components/offering.cjs.js +1 -1
- package/dist/components/offering.es.js +1 -1
- package/dist/components/offshore.cjs.js +1 -1
- package/dist/components/offshore.es.js +1 -1
- package/dist/components/oneplus.cjs.js +1 -1
- package/dist/components/oneplus.es.js +1 -1
- package/dist/components/optimization.cjs.js +1 -1
- package/dist/components/optimization.es.js +1 -1
- package/dist/components/org-chart.cjs.js +1 -1
- package/dist/components/org-chart.es.js +1 -1
- package/dist/components/parental-guide.cjs.js +1 -1
- package/dist/components/parental-guide.es.js +1 -1
- package/dist/components/password-invisible.cjs.js +1 -1
- package/dist/components/password-invisible.es.js +1 -1
- package/dist/components/password-visible.cjs.js +1 -1
- package/dist/components/password-visible.es.js +1 -1
- package/dist/components/pay-installments-euro.cjs.js +1 -1
- package/dist/components/pay-installments-euro.es.js +1 -1
- package/dist/components/pay-installments-kr.cjs.js +1 -1
- package/dist/components/pay-installments-kr.es.js +1 -1
- package/dist/components/pay-monthly-euro.cjs.js +1 -1
- package/dist/components/pay-monthly-euro.es.js +1 -1
- package/dist/components/pay-monthly-kr.cjs.js +1 -1
- package/dist/components/pay-monthly-kr.es.js +1 -1
- package/dist/components/pay-once-euro.cjs.js +1 -1
- package/dist/components/pay-once-euro.es.js +1 -1
- package/dist/components/pay-once-kr.cjs.js +1 -1
- package/dist/components/pay-once-kr.es.js +1 -1
- package/dist/components/payment-success.cjs.js +1 -1
- package/dist/components/payment-success.es.js +1 -1
- package/dist/components/pebble.cjs.js +1 -1
- package/dist/components/pebble.es.js +1 -1
- package/dist/components/people-hub.cjs.js +1 -1
- package/dist/components/people-hub.es.js +1 -1
- package/dist/components/people.cjs.js +1 -1
- package/dist/components/people.es.js +1 -1
- package/dist/components/pet-dog.cjs.js +1 -1
- package/dist/components/pet-dog.es.js +1 -1
- package/dist/components/phone-recycling.cjs.js +1 -1
- package/dist/components/phone-recycling.es.js +1 -1
- package/dist/components/phone-ringing.cjs.js +1 -1
- package/dist/components/phone-ringing.es.js +1 -1
- package/dist/components/phone.cjs.js +1 -1
- package/dist/components/phone.es.js +1 -1
- package/dist/components/pie-chart.cjs.js +1 -1
- package/dist/components/pie-chart.es.js +1 -1
- package/dist/components/pin.cjs.js +1 -1
- package/dist/components/pin.es.js +1 -1
- package/dist/components/plane.cjs.js +1 -1
- package/dist/components/plane.es.js +1 -1
- package/dist/components/play-filled.cjs.js +1 -1
- package/dist/components/play-filled.es.js +1 -1
- package/dist/components/play.cjs.js +1 -1
- package/dist/components/play.es.js +1 -1
- package/dist/components/player-settings.cjs.js +1 -1
- package/dist/components/player-settings.es.js +1 -1
- package/dist/components/plus-minus.cjs.js +1 -1
- package/dist/components/plus-minus.es.js +1 -1
- package/dist/components/plus.cjs.js +1 -1
- package/dist/components/plus.es.js +1 -1
- package/dist/components/police.cjs.js +1 -1
- package/dist/components/police.es.js +1 -1
- package/dist/components/portal.cjs.js +1 -1
- package/dist/components/portal.es.js +1 -1
- package/dist/components/power-grid.cjs.js +1 -1
- package/dist/components/power-grid.es.js +1 -1
- package/dist/components/premises-datacenter.cjs.js +1 -1
- package/dist/components/premises-datacenter.es.js +1 -1
- package/dist/components/premises-large.cjs.js +1 -1
- package/dist/components/premises-large.es.js +1 -1
- package/dist/components/premises-medium.cjs.js +1 -1
- package/dist/components/premises-medium.es.js +1 -1
- package/dist/components/premises-small.cjs.js +1 -1
- package/dist/components/premises-small.es.js +1 -1
- package/dist/components/premises.cjs.js +1 -1
- package/dist/components/premises.es.js +1 -1
- package/dist/components/present.cjs.js +1 -1
- package/dist/components/present.es.js +1 -1
- package/dist/components/press-button.cjs.js +1 -1
- package/dist/components/press-button.es.js +1 -1
- package/dist/components/price.cjs.js +1 -1
- package/dist/components/price.es.js +1 -1
- package/dist/components/print.cjs.js +1 -1
- package/dist/components/print.es.js +1 -1
- package/dist/components/pulse.cjs.js +1 -1
- package/dist/components/pulse.es.js +1 -1
- package/dist/components/qr-code.cjs.js +1 -1
- package/dist/components/qr-code.es.js +1 -1
- package/dist/components/question-filled.cjs.js +1 -1
- package/dist/components/question-filled.es.js +1 -1
- package/dist/components/question.cjs.js +1 -1
- package/dist/components/question.es.js +1 -1
- package/dist/components/rack.cjs.js +1 -1
- package/dist/components/rack.es.js +1 -1
- package/dist/components/radio.cjs.js +1 -1
- package/dist/components/radio.es.js +1 -1
- package/dist/components/record.cjs.js +1 -1
- package/dist/components/record.es.js +1 -1
- package/dist/components/recycle.cjs.js +1 -1
- package/dist/components/recycle.es.js +1 -1
- package/dist/components/refill-card.cjs.js +1 -1
- package/dist/components/refill-card.es.js +1 -1
- package/dist/components/register.cjs.js +1 -1
- package/dist/components/register.es.js +1 -1
- package/dist/components/remote-control.cjs.js +1 -1
- package/dist/components/remote-control.es.js +1 -1
- package/dist/components/remove-filled.cjs.js +1 -1
- package/dist/components/remove-filled.es.js +1 -1
- package/dist/components/remove.cjs.js +1 -1
- package/dist/components/remove.es.js +1 -1
- package/dist/components/repair.cjs.js +1 -1
- package/dist/components/repair.es.js +1 -1
- package/dist/components/report.cjs.js +1 -1
- package/dist/components/report.es.js +1 -1
- package/dist/components/reservation.cjs.js +1 -1
- package/dist/components/reservation.es.js +1 -1
- package/dist/components/reverse.cjs.js +1 -1
- package/dist/components/reverse.es.js +1 -1
- package/dist/components/roaming.cjs.js +1 -1
- package/dist/components/roaming.es.js +1 -1
- package/dist/components/route.cjs.js +1 -1
- package/dist/components/route.es.js +1 -1
- package/dist/components/router.cjs.js +1 -1
- package/dist/components/router.es.js +1 -1
- package/dist/components/ruler.cjs.js +1 -1
- package/dist/components/ruler.es.js +1 -1
- package/dist/components/samsung.cjs.js +1 -1
- package/dist/components/samsung.es.js +1 -1
- package/dist/components/satellite.cjs.js +1 -1
- package/dist/components/satellite.es.js +1 -1
- package/dist/components/save.cjs.js +1 -1
- package/dist/components/save.es.js +1 -1
- package/dist/components/savings.cjs.js +1 -1
- package/dist/components/savings.es.js +1 -1
- package/dist/components/scan.cjs.js +1 -1
- package/dist/components/scan.es.js +1 -1
- package/dist/components/search.cjs.js +1 -1
- package/dist/components/search.es.js +1 -1
- package/dist/components/secure-device.cjs.js +1 -1
- package/dist/components/secure-device.es.js +1 -1
- package/dist/components/secured-1.cjs.js +1 -1
- package/dist/components/secured-1.es.js +1 -1
- package/dist/components/secured-2.cjs.js +1 -1
- package/dist/components/secured-2.es.js +1 -1
- package/dist/components/security-camera.cjs.js +1 -1
- package/dist/components/security-camera.es.js +1 -1
- package/dist/components/send.cjs.js +1 -1
- package/dist/components/send.es.js +1 -1
- package/dist/components/sense-car.cjs.js +1 -1
- package/dist/components/sense-car.es.js +1 -1
- package/dist/components/server.cjs.js +1 -1
- package/dist/components/server.es.js +1 -1
- package/dist/components/service-device.cjs.js +1 -1
- package/dist/components/service-device.es.js +1 -1
- package/dist/components/service-supervision.cjs.js +1 -1
- package/dist/components/service-supervision.es.js +1 -1
- package/dist/components/services.cjs.js +1 -1
- package/dist/components/services.es.js +1 -1
- package/dist/components/settings.cjs.js +1 -1
- package/dist/components/settings.es.js +1 -1
- package/dist/components/share.cjs.js +1 -1
- package/dist/components/share.es.js +1 -1
- package/dist/components/shopping.cjs.js +1 -1
- package/dist/components/shopping.es.js +1 -1
- package/dist/components/shuffle.cjs.js +1 -1
- package/dist/components/shuffle.es.js +1 -1
- package/dist/components/signature.cjs.js +1 -1
- package/dist/components/signature.es.js +1 -1
- package/dist/components/simcard.cjs.js +1 -1
- package/dist/components/simcard.es.js +1 -1
- package/dist/components/skip-back-10sec.cjs.js +1 -1
- package/dist/components/skip-back-10sec.es.js +1 -1
- package/dist/components/skip-back-30sec.cjs.js +1 -1
- package/dist/components/skip-back-30sec.es.js +1 -1
- package/dist/components/skip-forward-10sec.cjs.js +1 -1
- package/dist/components/skip-forward-10sec.es.js +1 -1
- package/dist/components/skip-forward-30sec.cjs.js +1 -1
- package/dist/components/skip-forward-30sec.es.js +1 -1
- package/dist/components/slow-wifi.cjs.js +1 -1
- package/dist/components/slow-wifi.es.js +1 -1
- package/dist/components/smart-wifi.cjs.js +1 -1
- package/dist/components/smart-wifi.es.js +1 -1
- package/dist/components/smartphone.cjs.js +1 -1
- package/dist/components/smartphone.es.js +1 -1
- package/dist/components/smartwatch.cjs.js +1 -1
- package/dist/components/smartwatch.es.js +1 -1
- package/dist/components/smiley-happy.cjs.js +1 -1
- package/dist/components/smiley-happy.es.js +1 -1
- package/dist/components/smiley-sad.cjs.js +1 -1
- package/dist/components/smiley-sad.es.js +1 -1
- package/dist/components/sms.cjs.js +1 -1
- package/dist/components/sms.es.js +1 -1
- package/dist/components/snapchat.cjs.js +1 -1
- package/dist/components/snapchat.es.js +1 -1
- package/dist/components/snowflake.cjs.js +1 -1
- package/dist/components/snowflake.es.js +1 -1
- package/dist/components/sorter.cjs.js +1 -1
- package/dist/components/sorter.es.js +1 -1
- package/dist/components/speedometer.cjs.js +1 -1
- package/dist/components/speedometer.es.js +1 -1
- package/dist/components/spell-check.cjs.js +1 -1
- package/dist/components/spell-check.es.js +1 -1
- package/dist/components/split.cjs.js +1 -1
- package/dist/components/split.es.js +1 -1
- package/dist/components/spyware.cjs.js +1 -1
- package/dist/components/spyware.es.js +1 -1
- package/dist/components/star-filled.cjs.js +1 -1
- package/dist/components/star-filled.es.js +1 -1
- package/dist/components/star.cjs.js +1 -1
- package/dist/components/star.es.js +1 -1
- package/dist/components/stop.cjs.js +1 -1
- package/dist/components/stop.es.js +1 -1
- package/dist/components/store.cjs.js +1 -1
- package/dist/components/store.es.js +1 -1
- package/dist/components/stream.cjs.js +1 -1
- package/dist/components/stream.es.js +1 -1
- package/dist/components/suitcase.cjs.js +1 -1
- package/dist/components/suitcase.es.js +1 -1
- package/dist/components/summary.cjs.js +1 -1
- package/dist/components/summary.es.js +1 -1
- package/dist/components/support.cjs.js +1 -1
- package/dist/components/support.es.js +1 -1
- package/dist/components/sustainability.cjs.js +1 -1
- package/dist/components/sustainability.es.js +1 -1
- package/dist/components/switch-arrows.cjs.js +1 -1
- package/dist/components/switch-arrows.es.js +1 -1
- package/dist/components/sync.cjs.js +1 -1
- package/dist/components/sync.es.js +1 -1
- package/dist/components/table-view.cjs.js +1 -1
- package/dist/components/table-view.es.js +1 -1
- package/dist/components/tablet.cjs.js +1 -1
- package/dist/components/tablet.es.js +1 -1
- package/dist/components/tag.cjs.js +1 -1
- package/dist/components/tag.es.js +1 -1
- package/dist/components/temperature.cjs.js +1 -1
- package/dist/components/temperature.es.js +1 -1
- package/dist/components/thinking.cjs.js +1 -1
- package/dist/components/thinking.es.js +1 -1
- package/dist/components/time.cjs.js +1 -1
- package/dist/components/time.es.js +1 -1
- package/dist/components/trade-phone.cjs.js +1 -1
- package/dist/components/trade-phone.es.js +1 -1
- package/dist/components/trailer.cjs.js +1 -1
- package/dist/components/trailer.es.js +1 -1
- package/dist/components/train.cjs.js +1 -1
- package/dist/components/train.es.js +1 -1
- package/dist/components/transfer.cjs.js +1 -1
- package/dist/components/transfer.es.js +1 -1
- package/dist/components/troubleshoot.cjs.js +1 -1
- package/dist/components/troubleshoot.es.js +1 -1
- package/dist/components/tv-next.cjs.js +1 -1
- package/dist/components/tv-next.es.js +1 -1
- package/dist/components/tv-pause.cjs.js +1 -1
- package/dist/components/tv-pause.es.js +1 -1
- package/dist/components/tv-previous.cjs.js +1 -1
- package/dist/components/tv-previous.es.js +1 -1
- package/dist/components/tv-stop.cjs.js +1 -1
- package/dist/components/tv-stop.es.js +1 -1
- package/dist/components/tv.cjs.js +1 -1
- package/dist/components/tv.es.js +1 -1
- package/dist/components/undo.cjs.js +1 -1
- package/dist/components/undo.es.js +1 -1
- package/dist/components/upload.cjs.js +1 -1
- package/dist/components/upload.es.js +1 -1
- package/dist/components/usb.cjs.js +1 -1
- package/dist/components/usb.es.js +1 -1
- package/dist/components/user-admin.cjs.js +1 -1
- package/dist/components/user-admin.es.js +1 -1
- package/dist/components/vcard.cjs.js +1 -1
- package/dist/components/vcard.es.js +1 -1
- package/dist/components/video-conference.cjs.js +1 -1
- package/dist/components/video-conference.es.js +1 -1
- package/dist/components/video.cjs.js +1 -1
- package/dist/components/video.es.js +1 -1
- package/dist/components/visible.cjs.js +1 -1
- package/dist/components/visible.es.js +1 -1
- package/dist/components/voice-switch.cjs.js +1 -1
- package/dist/components/voice-switch.es.js +1 -1
- package/dist/components/voicemail.cjs.js +1 -1
- package/dist/components/voicemail.es.js +1 -1
- package/dist/components/volume.cjs.js +1 -1
- package/dist/components/volume.es.js +1 -1
- package/dist/components/wallet.cjs.js +1 -1
- package/dist/components/wallet.es.js +1 -1
- package/dist/components/wallplug.cjs.js +1 -1
- package/dist/components/wallplug.es.js +1 -1
- package/dist/components/warning.cjs.js +1 -1
- package/dist/components/warning.es.js +1 -1
- package/dist/components/wavelength.cjs.js +1 -1
- package/dist/components/wavelength.es.js +1 -1
- package/dist/components/weather.cjs.js +1 -1
- package/dist/components/weather.es.js +1 -1
- package/dist/components/whatsapp.cjs.js +1 -1
- package/dist/components/whatsapp.es.js +1 -1
- package/dist/components/windows.cjs.js +1 -1
- package/dist/components/windows.es.js +1 -1
- package/dist/components/wireless-off.cjs.js +1 -1
- package/dist/components/wireless-off.es.js +1 -1
- package/dist/components/wireless-weak.cjs.js +1 -1
- package/dist/components/wireless-weak.es.js +1 -1
- package/dist/components/wireless.cjs.js +1 -1
- package/dist/components/wireless.es.js +1 -1
- package/dist/components/world-alert.cjs.js +1 -1
- package/dist/components/world-alert.es.js +1 -1
- package/dist/components/world-off.cjs.js +1 -1
- package/dist/components/world-off.es.js +1 -1
- package/dist/components/world-question.cjs.js +1 -1
- package/dist/components/world-question.es.js +1 -1
- package/dist/components/world.cjs.js +1 -1
- package/dist/components/world.es.js +1 -1
- package/dist/components/x.cjs.js +1 -1
- package/dist/components/x.es.js +1 -1
- package/dist/components/xiaomi.cjs.js +1 -1
- package/dist/components/xiaomi.es.js +1 -1
- package/dist/components/youtube.cjs.js +1 -1
- package/dist/components/youtube.es.js +1 -1
- package/dist/components/zoom-out.cjs.js +1 -1
- package/dist/components/zoom-out.es.js +1 -1
- package/dist/components/zoom.cjs.js +1 -1
- package/dist/components/zoom.es.js +1 -1
- package/dist/dynamic-icon.cjs.js +2 -2
- package/dist/dynamic-icon.cjs.js.map +1 -1
- package/dist/dynamic-icon.es.js +98 -101
- package/dist/dynamic-icon.es.js.map +1 -1
- package/dist/icon-CbdbqC3C.mjs +88 -0
- package/dist/{icon-DZLmaPll.mjs.map → icon-CbdbqC3C.mjs.map} +1 -1
- package/dist/icon-D4e38bsf.js +6 -0
- package/dist/{icon-Dwry20Kn.js.map → icon-D4e38bsf.js.map} +1 -1
- package/dist/icon.cjs.js +2 -2
- package/dist/icon.cjs.js.map +1 -1
- package/dist/icon.d.ts.map +1 -1
- package/dist/icon.es.js +49 -46
- package/dist/icon.es.js.map +1 -1
- package/package.json +13 -14
- package/src/icon.stories.tsx +33 -5
- package/dist/icon-DZLmaPll.mjs +0 -85
- package/dist/icon-Dwry20Kn.js +0 -6
- /package/src/{icon.stories.css → icon.story.css} +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
function f(r) {
|
|
3
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
4
|
+
}
|
|
5
|
+
var c = { exports: {} };
|
|
6
|
+
/*!
|
|
7
|
+
Copyright (c) 2018 Jed Watson.
|
|
8
|
+
Licensed under the MIT License (MIT), see
|
|
9
|
+
http://jedwatson.github.io/classnames
|
|
10
|
+
*/
|
|
11
|
+
var p;
|
|
12
|
+
function m() {
|
|
13
|
+
return p || (p = 1, function(r) {
|
|
14
|
+
(function() {
|
|
15
|
+
var e = {}.hasOwnProperty;
|
|
16
|
+
function o() {
|
|
17
|
+
for (var t = "", n = 0; n < arguments.length; n++) {
|
|
18
|
+
var s = arguments[n];
|
|
19
|
+
s && (t = i(t, u.call(this, s)));
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
}
|
|
23
|
+
function u(t) {
|
|
24
|
+
if (typeof t == "string" || typeof t == "number")
|
|
25
|
+
return this && this[t] || t;
|
|
26
|
+
if (typeof t != "object")
|
|
27
|
+
return "";
|
|
28
|
+
if (Array.isArray(t))
|
|
29
|
+
return o.apply(this, t);
|
|
30
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
31
|
+
return t.toString();
|
|
32
|
+
var n = "";
|
|
33
|
+
for (var s in t)
|
|
34
|
+
e.call(t, s) && t[s] && (n = i(n, this && this[s] || s));
|
|
35
|
+
return n;
|
|
36
|
+
}
|
|
37
|
+
function i(t, n) {
|
|
38
|
+
return n ? t ? t + " " + n : t + n : t;
|
|
39
|
+
}
|
|
40
|
+
r.exports ? (o.default = o, r.exports = o) : window.classNames = o;
|
|
41
|
+
})();
|
|
42
|
+
}(c)), c.exports;
|
|
43
|
+
}
|
|
44
|
+
var _ = m();
|
|
45
|
+
const d = /* @__PURE__ */ f(_), v = {
|
|
46
|
+
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
47
|
+
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
48
|
+
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
49
|
+
"purpur-icon--sm": "_purpur-icon--sm_8u1lq_12",
|
|
50
|
+
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
51
|
+
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
52
|
+
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
53
|
+
}, g = d.bind(v), a = "purpur-icon", x = "md", h = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}="${e.value}"`).join(" "), b = ({ content: r = "", title: e } = {}) => {
|
|
54
|
+
const o = [
|
|
55
|
+
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
56
|
+
{ name: "fill", value: "currentColor" },
|
|
57
|
+
{ name: "viewBox", value: "0 0 24 24" },
|
|
58
|
+
e ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
59
|
+
], u = e ? `<title>${e}</title>` : "";
|
|
60
|
+
return `<svg ${h(o)}>${u}${r}</svg>`;
|
|
61
|
+
}, S = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), y = ({
|
|
62
|
+
["data-testid"]: r,
|
|
63
|
+
svg: e,
|
|
64
|
+
allyTitle: o,
|
|
65
|
+
className: u,
|
|
66
|
+
size: i = x,
|
|
67
|
+
...t
|
|
68
|
+
}) => {
|
|
69
|
+
const n = b({
|
|
70
|
+
content: S(e.svg),
|
|
71
|
+
title: o
|
|
72
|
+
}), s = g(u, a, `${a}--${i}`);
|
|
73
|
+
return /* @__PURE__ */ l(
|
|
74
|
+
"span",
|
|
75
|
+
{
|
|
76
|
+
"aria-label": o,
|
|
77
|
+
className: s,
|
|
78
|
+
"data-testid": r,
|
|
79
|
+
dangerouslySetInnerHTML: { __html: n },
|
|
80
|
+
...t
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
y.displayName = "Icon";
|
|
85
|
+
export {
|
|
86
|
+
y as I
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=icon-CbdbqC3C.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-
|
|
1
|
+
{"version":3,"file":"icon-CbdbqC3C.mjs","sources":["../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/icon.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./icon.module.scss\";\nimport type { iconList } from \"./icon-imports\";\nexport declare type IconName = keyof typeof iconList;\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-icon\";\n\nexport const sizes = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\nexport const DEFAULT_SIZE = \"md\" as const;\n\nexport type Size = (typeof sizes)[number];\n\ntype CreateSvg = {\n content?: string;\n title?: string;\n ariaHidden?: boolean;\n};\n\nexport type IconBaseProps = {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: string;\n className?: string;\n};\n\nexport type IconProps = {\n svg: { svg: string; name: string };\n} & IconBaseProps;\n\n// Create string from array of attributes\nconst getAttributesString = (attributeCollection: Record<string, unknown>[]) =>\n attributeCollection\n .filter((attr) => Object.keys(attr).length >= 1) // remove empty object\n .map((item) => `${item.name}=\"${item.value}\"`)\n .join(\" \");\n\nconst createSvg = ({ content = \"\", title }: CreateSvg = {}) => {\n const attributeCollection = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n title ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" },\n ];\n\n const titleElement = title ? `<title>${title}</title>` : \"\";\n return `<svg ${getAttributesString(attributeCollection)}>${titleElement}${content}</svg>`;\n};\n\n// Remove svg tags\nconst getSvgContent = (svg: string): string => svg.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim();\n\nexport const Icon = ({\n [\"data-testid\"]: dataTestid,\n svg,\n allyTitle,\n className,\n size = DEFAULT_SIZE,\n ...props\n}: IconProps) => {\n const svgString = createSvg({\n content: getSvgContent(svg.svg),\n title: allyTitle,\n });\n\n const classes = cx(className, rootClassName, `${rootClassName}--${size}`);\n\n return (\n <span\n aria-label={allyTitle}\n className={classes}\n data-testid={dataTestid}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svgString }}\n {...props}\n />\n );\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","value","newClass","module","cx","c","styles","rootClassName","DEFAULT_SIZE","getAttributesString","attributeCollection","attr","item","createSvg","content","title","titleElement","getSvgContent","svg","Icon","dataTestid","allyTitle","className","size","props","svgString","jsx"],"mappings":";;;;;;;;;;;;;AAOA,KAAC,WAAY;AAGZ,UAAIA,IAAS,CAAA,EAAG;AAEhB,eAASC,IAAc;AAGtB,iBAFIC,IAAU,IAELC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAC1C,cAAIC,IAAM,UAAUD,CAAC;AACrB,UAAIC,MACHF,IAAUG,EAAYH,GAASI,EAAW,KAAK,MAAMF,CAAG,CAAC;AAAA,QAE7D;AAEE,eAAOF;AAAA,MACT;AAEC,eAASI,EAAYF,GAAK;AACzB,YAAI,OAAOA,KAAQ,YAAY,OAAOA,KAAQ;AAC7C,iBAAO,QAAQ,KAAKA,CAAG,KAAKA;AAG7B,YAAI,OAAOA,KAAQ;AAClB,iBAAO;AAGR,YAAI,MAAM,QAAQA,CAAG;AACpB,iBAAOH,EAAW,MAAM,MAAMG,CAAG;AAGlC,YAAIA,EAAI,aAAa,OAAO,UAAU,YAAY,CAACA,EAAI,SAAS,SAAQ,EAAG,SAAS,eAAe;AAClG,iBAAOA,EAAI,SAAU;AAGtB,YAAIF,IAAU;AAEd,iBAASK,KAAOH;AACf,UAAIJ,EAAO,KAAKI,GAAKG,CAAG,KAAKH,EAAIG,CAAG,MACnCL,IAAUG,EAAYH,GAAS,QAAQ,KAAKK,CAAG,KAAKA,CAAG;AAIzD,eAAOL;AAAA,MACT;AAEC,eAASG,EAAaG,GAAOC,GAAU;AACtC,eAAKA,IAIDD,IACIA,IAAQ,MAAMC,IAGfD,IAAQC,IAPPD;AAAA,MAQV;AAEC,MAAqCE,EAAO,WAC3CT,EAAW,UAAUA,GACrBS,YAAiBT,KAOjB,OAAO,aAAaA;AAAA,IAEtB;;;;;;;;;;;;GCrEMU,IAAKC,EAAE,KAAKC,CAAM,GAClBC,IAAgB,eAGTC,IAAe,MAsBtBC,IAAsB,CAACC,MAC3BA,EACG,OAAO,CAACC,MAAS,OAAO,KAAKA,CAAI,EAAE,UAAU,CAAC,EAC9C,IAAI,CAACC,MAAS,GAAGA,EAAK,IAAI,KAAKA,EAAK,KAAK,GAAG,EAC5C,KAAK,GAAG,GAEPC,IAAY,CAAC,EAAE,SAAAC,IAAU,IAAI,OAAAC,EAAM,IAAe,CAAA,MAAO;AAC7D,QAAML,IAAsB;AAAA,IAC1B,EAAE,MAAM,SAAS,OAAO,6BAA6B;AAAA,IACrD,EAAE,MAAM,QAAQ,OAAO,eAAe;AAAA,IACtC,EAAE,MAAM,WAAW,OAAO,YAAY;AAAA,IACtCK,IAAQ,EAAE,MAAM,QAAQ,OAAO,MAAM,IAAI,EAAE,MAAM,eAAe,OAAO,OAAO;AAAA,EAChF,GAEMC,IAAeD,IAAQ,UAAUA,CAAK,aAAa;AACzD,SAAO,QAAQN,EAAoBC,CAAmB,CAAC,IAAIM,CAAY,GAAGF,CAAO;AACnF,GAGMG,IAAgB,CAACC,MAAwBA,EAAI,QAAQ,sBAAsB,EAAE,EAAE,KAAK,GAE7EC,IAAO,CAAC;AAAA,EACnB,CAAC,gBAAgBC;AAAA,EACjB,KAAAF;AAAA,EACA,WAAAG;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAOf;AAAA,EACP,GAAGgB;AACL,MAAiB;AACf,QAAMC,IAAYZ,EAAU;AAAA,IAC1B,SAASI,EAAcC,EAAI,GAAG;AAAA,IAC9B,OAAOG;AAAA,EAAA,CACR,GAEK1B,IAAUS,EAAGkB,GAAWf,GAAe,GAAGA,CAAa,KAAKgB,CAAI,EAAE;AAGtE,SAAA,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAYL;AAAA,MACZ,WAAW1B;AAAA,MACX,eAAayB;AAAA,MAEb,yBAAyB,EAAE,QAAQK,EAAU;AAAA,MAC5C,GAAGD;AAAA,IAAA;AAAA,EACN;AAEJ;AAEAL,EAAK,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";const f=require("react/jsx-runtime");function _(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var c={exports:{}};/*!
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/var p;function m(){return p||(p=1,function(r){(function(){var e={}.hasOwnProperty;function s(){for(var t="",n=0;n<arguments.length;n++){var u=arguments[n];u&&(t=i(t,o.call(this,u)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return this&&this[t]||t;if(typeof t!="object")return"";if(Array.isArray(t))return s.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var n="";for(var u in t)e.call(t,u)&&t[u]&&(n=i(n,this&&this[u]||u));return n}function i(t,n){return n?t?t+" "+n:t+n:t}r.exports?(s.default=s,r.exports=s):window.classNames=s})()}(c)),c.exports}var d=m();const v=_(d),g={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},x=v.bind(g),a="purpur-icon",h="md",b=r=>r.filter(e=>Object.keys(e).length>=1).map(e=>`${e.name}="${e.value}"`).join(" "),S=({content:r="",title:e}={})=>{const s=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},e?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=e?`<title>${e}</title>`:"";return`<svg ${b(s)}>${o}${r}</svg>`},q=r=>r.replace(/<(\/?)svg([^>]*)>/g,"").trim(),l=({["data-testid"]:r,svg:e,allyTitle:s,className:o,size:i=h,...t})=>{const n=S({content:q(e.svg),title:s}),u=x(o,a,`${a}--${i}`);return f.jsx("span",{"aria-label":s,className:u,"data-testid":r,dangerouslySetInnerHTML:{__html:n},...t})};l.displayName="Icon";exports.Icon=l;
|
|
6
|
+
//# sourceMappingURL=icon-D4e38bsf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-
|
|
1
|
+
{"version":3,"file":"icon-D4e38bsf.js","sources":["../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/icon.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./icon.module.scss\";\nimport type { iconList } from \"./icon-imports\";\nexport declare type IconName = keyof typeof iconList;\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-icon\";\n\nexport const sizes = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\nexport const DEFAULT_SIZE = \"md\" as const;\n\nexport type Size = (typeof sizes)[number];\n\ntype CreateSvg = {\n content?: string;\n title?: string;\n ariaHidden?: boolean;\n};\n\nexport type IconBaseProps = {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: string;\n className?: string;\n};\n\nexport type IconProps = {\n svg: { svg: string; name: string };\n} & IconBaseProps;\n\n// Create string from array of attributes\nconst getAttributesString = (attributeCollection: Record<string, unknown>[]) =>\n attributeCollection\n .filter((attr) => Object.keys(attr).length >= 1) // remove empty object\n .map((item) => `${item.name}=\"${item.value}\"`)\n .join(\" \");\n\nconst createSvg = ({ content = \"\", title }: CreateSvg = {}) => {\n const attributeCollection = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n title ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" },\n ];\n\n const titleElement = title ? `<title>${title}</title>` : \"\";\n return `<svg ${getAttributesString(attributeCollection)}>${titleElement}${content}</svg>`;\n};\n\n// Remove svg tags\nconst getSvgContent = (svg: string): string => svg.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim();\n\nexport const Icon = ({\n [\"data-testid\"]: dataTestid,\n svg,\n allyTitle,\n className,\n size = DEFAULT_SIZE,\n ...props\n}: IconProps) => {\n const svgString = createSvg({\n content: getSvgContent(svg.svg),\n title: allyTitle,\n });\n\n const classes = cx(className, rootClassName, `${rootClassName}--${size}`);\n\n return (\n <span\n aria-label={allyTitle}\n className={classes}\n data-testid={dataTestid}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svgString }}\n {...props}\n />\n );\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","value","newClass","module","cx","c","styles","rootClassName","DEFAULT_SIZE","getAttributesString","attributeCollection","attr","item","createSvg","content","title","titleElement","getSvgContent","svg","Icon","dataTestid","allyTitle","className","size","props","svgString","jsx"],"mappings":";;;;iDAOC,UAAY,CAGZ,IAAIA,EAAS,CAAA,EAAG,eAEhB,SAASC,GAAc,CAGtB,QAFIC,EAAU,GAELC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CAC1C,IAAIC,EAAM,UAAUD,CAAC,EACjBC,IACHF,EAAUG,EAAYH,EAASI,EAAW,KAAK,KAAMF,CAAG,CAAC,EAE7D,CAEE,OAAOF,CACT,CAEC,SAASI,EAAYF,EAAK,CACzB,GAAI,OAAOA,GAAQ,UAAY,OAAOA,GAAQ,SAC7C,OAAO,MAAQ,KAAKA,CAAG,GAAKA,EAG7B,GAAI,OAAOA,GAAQ,SAClB,MAAO,GAGR,GAAI,MAAM,QAAQA,CAAG,EACpB,OAAOH,EAAW,MAAM,KAAMG,CAAG,EAGlC,GAAIA,EAAI,WAAa,OAAO,UAAU,UAAY,CAACA,EAAI,SAAS,SAAQ,EAAG,SAAS,eAAe,EAClG,OAAOA,EAAI,SAAU,EAGtB,IAAIF,EAAU,GAEd,QAASK,KAAOH,EACXJ,EAAO,KAAKI,EAAKG,CAAG,GAAKH,EAAIG,CAAG,IACnCL,EAAUG,EAAYH,EAAS,MAAQ,KAAKK,CAAG,GAAKA,CAAG,GAIzD,OAAOL,CACT,CAEC,SAASG,EAAaG,EAAOC,EAAU,CACtC,OAAKA,EAIDD,EACIA,EAAQ,IAAMC,EAGfD,EAAQC,EAPPD,CAQV,CAEsCE,EAAO,SAC3CT,EAAW,QAAUA,EACrBS,UAAiBT,GAOjB,OAAO,WAAaA,CAEtB,wWCrEMU,EAAKC,EAAE,KAAKC,CAAM,EAClBC,EAAgB,cAGTC,EAAe,KAsBtBC,EAAuBC,GAC3BA,EACG,OAAQC,GAAS,OAAO,KAAKA,CAAI,EAAE,QAAU,CAAC,EAC9C,IAAKC,GAAS,GAAGA,EAAK,IAAI,KAAKA,EAAK,KAAK,GAAG,EAC5C,KAAK,GAAG,EAEPC,EAAY,CAAC,CAAE,QAAAC,EAAU,GAAI,MAAAC,CAAM,EAAe,CAAA,IAAO,CAC7D,MAAML,EAAsB,CAC1B,CAAE,KAAM,QAAS,MAAO,4BAA6B,EACrD,CAAE,KAAM,OAAQ,MAAO,cAAe,EACtC,CAAE,KAAM,UAAW,MAAO,WAAY,EACtCK,EAAQ,CAAE,KAAM,OAAQ,MAAO,KAAM,EAAI,CAAE,KAAM,cAAe,MAAO,MAAO,CAChF,EAEMC,EAAeD,EAAQ,UAAUA,CAAK,WAAa,GACzD,MAAO,QAAQN,EAAoBC,CAAmB,CAAC,IAAIM,CAAY,GAAGF,CAAO,QACnF,EAGMG,EAAiBC,GAAwBA,EAAI,QAAQ,qBAAsB,EAAE,EAAE,KAAK,EAE7EC,EAAO,CAAC,CACnB,CAAC,eAAgBC,EACjB,IAAAF,EACA,UAAAG,EACA,UAAAC,EACA,KAAAC,EAAOf,EACP,GAAGgB,CACL,IAAiB,CACf,MAAMC,EAAYZ,EAAU,CAC1B,QAASI,EAAcC,EAAI,GAAG,EAC9B,MAAOG,CAAA,CACR,EAEK1B,EAAUS,EAAGkB,EAAWf,EAAe,GAAGA,CAAa,KAAKgB,CAAI,EAAE,EAGtE,OAAAG,EAAA,IAAC,OAAA,CACC,aAAYL,EACZ,UAAW1B,EACX,cAAayB,EAEb,wBAAyB,CAAE,OAAQK,CAAU,EAC5C,GAAGD,CAAA,CACN,CAEJ,EAEAL,EAAK,YAAc","x_google_ignoreList":[0]}
|
package/dist/icon.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime");function d(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var c={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/(function(r){(function(){var e={}.hasOwnProperty;function s(){for(var t="",n=0;n<arguments.length;n++){var o=arguments[n];o&&(t=i(t,u.call(this,o)))}return t}function u(t){if(typeof t=="string"||typeof t=="number")return this&&this[t]||t;if(typeof t!="object")return"";if(Array.isArray(t))return s.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var n="";for(var o in t)e.call(t,o)&&t[o]&&(n=i(n,this&&this[o]||o));return n}function i(t,n){return n?t?t+" "+n:t+n:t}r.exports?(s.default=s,r.exports=s):window.classNames=s})()}
|
|
5
|
+
*/var p;function _(){return p||(p=1,function(r){(function(){var e={}.hasOwnProperty;function s(){for(var t="",n=0;n<arguments.length;n++){var o=arguments[n];o&&(t=i(t,u.call(this,o)))}return t}function u(t){if(typeof t=="string"||typeof t=="number")return this&&this[t]||t;if(typeof t!="object")return"";if(Array.isArray(t))return s.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var n="";for(var o in t)e.call(t,o)&&t[o]&&(n=i(n,this&&this[o]||o));return n}function i(t,n){return n?t?t+" "+n:t+n:t}r.exports?(s.default=s,r.exports=s):window.classNames=s})()}(c)),c.exports}var v=_();const x=d(v),g={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},h=x.bind(g),l="purpur-icon",S=["xxs","xs","sm","md","lg","xl"],a="md",b=r=>r.filter(e=>Object.keys(e).length>=1).map(e=>`${e.name}="${e.value}"`).join(" "),y=({content:r="",title:e}={})=>{const s=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},e?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],u=e?`<title>${e}</title>`:"";return`<svg ${b(s)}>${u}${r}</svg>`},q=r=>r.replace(/<(\/?)svg([^>]*)>/g,"").trim(),f=({["data-testid"]:r,svg:e,allyTitle:s,className:u,size:i=a,...t})=>{const n=y({content:q(e.svg),title:s}),o=h(u,l,`${l}--${i}`);return m.jsx("span",{"aria-label":s,className:o,"data-testid":r,dangerouslySetInnerHTML:{__html:n},...t})};f.displayName="Icon";exports.DEFAULT_SIZE=a;exports.Icon=f;exports.sizes=S;
|
|
6
6
|
//# sourceMappingURL=icon.cjs.js.map
|
package/dist/icon.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.cjs.js","sources":["../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/icon.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./icon.module.scss\";\nimport type { iconList } from \"./icon-imports\";\nexport declare type IconName = keyof typeof iconList;\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-icon\";\n\nexport const sizes = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\nexport const DEFAULT_SIZE = \"md\" as const;\n\nexport type Size = (typeof sizes)[number];\n\ntype CreateSvg = {\n content?: string;\n title?: string;\n ariaHidden?: boolean;\n};\n\nexport type IconBaseProps = {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: string;\n className?: string;\n};\n\nexport type IconProps = {\n svg: { svg: string; name: string };\n} & IconBaseProps;\n\n// Create string from array of attributes\nconst getAttributesString = (attributeCollection: Record<string, unknown>[]) =>\n attributeCollection\n .filter((attr) => Object.keys(attr).length >= 1) // remove empty object\n .map((item) => `${item.name}=\"${item.value}\"`)\n .join(\" \");\n\nconst createSvg = ({ content = \"\", title }: CreateSvg = {}) => {\n const attributeCollection = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n title ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" },\n ];\n\n const titleElement = title ? `<title>${title}</title>` : \"\";\n return `<svg ${getAttributesString(attributeCollection)}>${titleElement}${content}</svg>`;\n};\n\n// Remove svg tags\nconst getSvgContent = (svg: string): string => svg.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim();\n\nexport const Icon = ({\n [\"data-testid\"]: dataTestid,\n svg,\n allyTitle,\n className,\n size = DEFAULT_SIZE,\n ...props\n}: IconProps) => {\n const svgString = createSvg({\n content: getSvgContent(svg.svg),\n title: allyTitle,\n });\n\n const classes = cx(className, rootClassName, `${rootClassName}--${size}`);\n\n return (\n <span\n aria-label={allyTitle}\n className={classes}\n data-testid={dataTestid}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svgString }}\n {...props}\n />\n );\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","value","newClass","module","cx","c","styles","rootClassName","sizes","DEFAULT_SIZE","getAttributesString","attributeCollection","attr","item","createSvg","content","title","titleElement","getSvgContent","svg","Icon","dataTestid","allyTitle","className","size","props","svgString","jsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"icon.cjs.js","sources":["../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/icon.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./icon.module.scss\";\nimport type { iconList } from \"./icon-imports\";\nexport declare type IconName = keyof typeof iconList;\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-icon\";\n\nexport const sizes = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\nexport const DEFAULT_SIZE = \"md\" as const;\n\nexport type Size = (typeof sizes)[number];\n\ntype CreateSvg = {\n content?: string;\n title?: string;\n ariaHidden?: boolean;\n};\n\nexport type IconBaseProps = {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: string;\n className?: string;\n};\n\nexport type IconProps = {\n svg: { svg: string; name: string };\n} & IconBaseProps;\n\n// Create string from array of attributes\nconst getAttributesString = (attributeCollection: Record<string, unknown>[]) =>\n attributeCollection\n .filter((attr) => Object.keys(attr).length >= 1) // remove empty object\n .map((item) => `${item.name}=\"${item.value}\"`)\n .join(\" \");\n\nconst createSvg = ({ content = \"\", title }: CreateSvg = {}) => {\n const attributeCollection = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n title ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" },\n ];\n\n const titleElement = title ? `<title>${title}</title>` : \"\";\n return `<svg ${getAttributesString(attributeCollection)}>${titleElement}${content}</svg>`;\n};\n\n// Remove svg tags\nconst getSvgContent = (svg: string): string => svg.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim();\n\nexport const Icon = ({\n [\"data-testid\"]: dataTestid,\n svg,\n allyTitle,\n className,\n size = DEFAULT_SIZE,\n ...props\n}: IconProps) => {\n const svgString = createSvg({\n content: getSvgContent(svg.svg),\n title: allyTitle,\n });\n\n const classes = cx(className, rootClassName, `${rootClassName}--${size}`);\n\n return (\n <span\n aria-label={allyTitle}\n className={classes}\n data-testid={dataTestid}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svgString }}\n {...props}\n />\n );\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","value","newClass","module","cx","c","styles","rootClassName","sizes","DEFAULT_SIZE","getAttributesString","attributeCollection","attr","item","createSvg","content","title","titleElement","getSvgContent","svg","Icon","dataTestid","allyTitle","className","size","props","svgString","jsx"],"mappings":";;;;iDAOC,UAAY,CAGZ,IAAIA,EAAS,CAAA,EAAG,eAEhB,SAASC,GAAc,CAGtB,QAFIC,EAAU,GAELC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CAC1C,IAAIC,EAAM,UAAUD,CAAC,EACjBC,IACHF,EAAUG,EAAYH,EAASI,EAAW,KAAK,KAAMF,CAAG,CAAC,EAE7D,CAEE,OAAOF,CACT,CAEC,SAASI,EAAYF,EAAK,CACzB,GAAI,OAAOA,GAAQ,UAAY,OAAOA,GAAQ,SAC7C,OAAO,MAAQ,KAAKA,CAAG,GAAKA,EAG7B,GAAI,OAAOA,GAAQ,SAClB,MAAO,GAGR,GAAI,MAAM,QAAQA,CAAG,EACpB,OAAOH,EAAW,MAAM,KAAMG,CAAG,EAGlC,GAAIA,EAAI,WAAa,OAAO,UAAU,UAAY,CAACA,EAAI,SAAS,SAAQ,EAAG,SAAS,eAAe,EAClG,OAAOA,EAAI,SAAU,EAGtB,IAAIF,EAAU,GAEd,QAASK,KAAOH,EACXJ,EAAO,KAAKI,EAAKG,CAAG,GAAKH,EAAIG,CAAG,IACnCL,EAAUG,EAAYH,EAAS,MAAQ,KAAKK,CAAG,GAAKA,CAAG,GAIzD,OAAOL,CACT,CAEC,SAASG,EAAaG,EAAOC,EAAU,CACtC,OAAKA,EAIDD,EACIA,EAAQ,IAAMC,EAGfD,EAAQC,EAPPD,CAQV,CAEsCE,EAAO,SAC3CT,EAAW,QAAUA,EACrBS,UAAiBT,GAOjB,OAAO,WAAaA,CAEtB,wWCrEMU,EAAKC,EAAE,KAAKC,CAAM,EAClBC,EAAgB,cAETC,EAAQ,CAAC,MAAO,KAAM,KAAM,KAAM,KAAM,IAAI,EAC5CC,EAAe,KAsBtBC,EAAuBC,GAC3BA,EACG,OAAQC,GAAS,OAAO,KAAKA,CAAI,EAAE,QAAU,CAAC,EAC9C,IAAKC,GAAS,GAAGA,EAAK,IAAI,KAAKA,EAAK,KAAK,GAAG,EAC5C,KAAK,GAAG,EAEPC,EAAY,CAAC,CAAE,QAAAC,EAAU,GAAI,MAAAC,CAAM,EAAe,CAAA,IAAO,CAC7D,MAAML,EAAsB,CAC1B,CAAE,KAAM,QAAS,MAAO,4BAA6B,EACrD,CAAE,KAAM,OAAQ,MAAO,cAAe,EACtC,CAAE,KAAM,UAAW,MAAO,WAAY,EACtCK,EAAQ,CAAE,KAAM,OAAQ,MAAO,KAAM,EAAI,CAAE,KAAM,cAAe,MAAO,MAAO,CAChF,EAEMC,EAAeD,EAAQ,UAAUA,CAAK,WAAa,GACzD,MAAO,QAAQN,EAAoBC,CAAmB,CAAC,IAAIM,CAAY,GAAGF,CAAO,QACnF,EAGMG,EAAiBC,GAAwBA,EAAI,QAAQ,qBAAsB,EAAE,EAAE,KAAK,EAE7EC,EAAO,CAAC,CACnB,CAAC,eAAgBC,EACjB,IAAAF,EACA,UAAAG,EACA,UAAAC,EACA,KAAAC,EAAOf,EACP,GAAGgB,CACL,IAAiB,CACf,MAAMC,EAAYZ,EAAU,CAC1B,QAASI,EAAcC,EAAI,GAAG,EAC9B,MAAOG,CAAA,CACR,EAEK3B,EAAUS,EAAGmB,EAAWhB,EAAe,GAAGA,CAAa,KAAKiB,CAAI,EAAE,EAGtE,OAAAG,EAAA,IAAC,OAAA,CACC,aAAYL,EACZ,UAAW3B,EACX,cAAa0B,EAEb,wBAAyB,CAAE,OAAQK,CAAU,EAC5C,GAAGD,CAAA,CACN,CAEJ,EAEAL,EAAK,YAAc","x_google_ignoreList":[0]}
|
package/dist/icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../src/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,MAAM,CAAC,OAAO,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAKrD,eAAO,MAAM,KAAK,gDAAiD,CAAC;AACpE,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../src/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,MAAM,CAAC,OAAO,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAKrD,eAAO,MAAM,KAAK,gDAAiD,CAAC;AACpE,eAAO,MAAM,YAAY,MAAgB,CAAC;AAE1C,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAQ1C,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACpC,GAAG,aAAa,CAAC;AAwBlB,eAAO,MAAM,IAAI;iFAOd,SAAS;;CAkBX,CAAC"}
|
package/dist/icon.es.js
CHANGED
|
@@ -1,45 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
function
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
function f(r) {
|
|
3
3
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
4
4
|
}
|
|
5
|
-
var
|
|
5
|
+
var c = { exports: {} };
|
|
6
6
|
/*!
|
|
7
7
|
Copyright (c) 2018 Jed Watson.
|
|
8
8
|
Licensed under the MIT License (MIT), see
|
|
9
9
|
http://jedwatson.github.io/classnames
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
var p;
|
|
12
|
+
function m() {
|
|
13
|
+
return p || (p = 1, function(r) {
|
|
14
|
+
(function() {
|
|
15
|
+
var e = {}.hasOwnProperty;
|
|
16
|
+
function s() {
|
|
17
|
+
for (var t = "", n = 0; n < arguments.length; n++) {
|
|
18
|
+
var o = arguments[n];
|
|
19
|
+
o && (t = i(t, u.call(this, o)));
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
18
22
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const f = /* @__PURE__ */ a(m), _ = {
|
|
23
|
+
function u(t) {
|
|
24
|
+
if (typeof t == "string" || typeof t == "number")
|
|
25
|
+
return this && this[t] || t;
|
|
26
|
+
if (typeof t != "object")
|
|
27
|
+
return "";
|
|
28
|
+
if (Array.isArray(t))
|
|
29
|
+
return s.apply(this, t);
|
|
30
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
31
|
+
return t.toString();
|
|
32
|
+
var n = "";
|
|
33
|
+
for (var o in t)
|
|
34
|
+
e.call(t, o) && t[o] && (n = i(n, this && this[o] || o));
|
|
35
|
+
return n;
|
|
36
|
+
}
|
|
37
|
+
function i(t, n) {
|
|
38
|
+
return n ? t ? t + " " + n : t + n : t;
|
|
39
|
+
}
|
|
40
|
+
r.exports ? (s.default = s, r.exports = s) : window.classNames = s;
|
|
41
|
+
})();
|
|
42
|
+
}(c)), c.exports;
|
|
43
|
+
}
|
|
44
|
+
var _ = m();
|
|
45
|
+
const d = /* @__PURE__ */ f(_), v = {
|
|
43
46
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
44
47
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
45
48
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -47,27 +50,27 @@ const f = /* @__PURE__ */ a(m), _ = {
|
|
|
47
50
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
48
51
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
49
52
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
50
|
-
},
|
|
53
|
+
}, x = d.bind(v), l = "purpur-icon", w = ["xxs", "xs", "sm", "md", "lg", "xl"], g = "md", h = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}="${e.value}"`).join(" "), b = ({ content: r = "", title: e } = {}) => {
|
|
51
54
|
const s = [
|
|
52
55
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
53
56
|
{ name: "fill", value: "currentColor" },
|
|
54
57
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
55
58
|
e ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
56
59
|
], u = e ? `<title>${e}</title>` : "";
|
|
57
|
-
return `<svg ${
|
|
58
|
-
},
|
|
60
|
+
return `<svg ${h(s)}>${u}${r}</svg>`;
|
|
61
|
+
}, S = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), y = ({
|
|
59
62
|
["data-testid"]: r,
|
|
60
63
|
svg: e,
|
|
61
64
|
allyTitle: s,
|
|
62
65
|
className: u,
|
|
63
|
-
size: i =
|
|
66
|
+
size: i = g,
|
|
64
67
|
...t
|
|
65
68
|
}) => {
|
|
66
|
-
const n =
|
|
67
|
-
content:
|
|
69
|
+
const n = b({
|
|
70
|
+
content: S(e.svg),
|
|
68
71
|
title: s
|
|
69
|
-
}), o =
|
|
70
|
-
return /* @__PURE__ */
|
|
72
|
+
}), o = x(u, l, `${l}--${i}`);
|
|
73
|
+
return /* @__PURE__ */ a(
|
|
71
74
|
"span",
|
|
72
75
|
{
|
|
73
76
|
"aria-label": s,
|
|
@@ -78,10 +81,10 @@ const f = /* @__PURE__ */ a(m), _ = {
|
|
|
78
81
|
}
|
|
79
82
|
);
|
|
80
83
|
};
|
|
81
|
-
|
|
84
|
+
y.displayName = "Icon";
|
|
82
85
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
g as DEFAULT_SIZE,
|
|
87
|
+
y as Icon,
|
|
88
|
+
w as sizes
|
|
86
89
|
};
|
|
87
90
|
//# sourceMappingURL=icon.es.js.map
|
package/dist/icon.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.es.js","sources":["../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/icon.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./icon.module.scss\";\nimport type { iconList } from \"./icon-imports\";\nexport declare type IconName = keyof typeof iconList;\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-icon\";\n\nexport const sizes = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\nexport const DEFAULT_SIZE = \"md\" as const;\n\nexport type Size = (typeof sizes)[number];\n\ntype CreateSvg = {\n content?: string;\n title?: string;\n ariaHidden?: boolean;\n};\n\nexport type IconBaseProps = {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: string;\n className?: string;\n};\n\nexport type IconProps = {\n svg: { svg: string; name: string };\n} & IconBaseProps;\n\n// Create string from array of attributes\nconst getAttributesString = (attributeCollection: Record<string, unknown>[]) =>\n attributeCollection\n .filter((attr) => Object.keys(attr).length >= 1) // remove empty object\n .map((item) => `${item.name}=\"${item.value}\"`)\n .join(\" \");\n\nconst createSvg = ({ content = \"\", title }: CreateSvg = {}) => {\n const attributeCollection = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n title ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" },\n ];\n\n const titleElement = title ? `<title>${title}</title>` : \"\";\n return `<svg ${getAttributesString(attributeCollection)}>${titleElement}${content}</svg>`;\n};\n\n// Remove svg tags\nconst getSvgContent = (svg: string): string => svg.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim();\n\nexport const Icon = ({\n [\"data-testid\"]: dataTestid,\n svg,\n allyTitle,\n className,\n size = DEFAULT_SIZE,\n ...props\n}: IconProps) => {\n const svgString = createSvg({\n content: getSvgContent(svg.svg),\n title: allyTitle,\n });\n\n const classes = cx(className, rootClassName, `${rootClassName}--${size}`);\n\n return (\n <span\n aria-label={allyTitle}\n className={classes}\n data-testid={dataTestid}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svgString }}\n {...props}\n />\n );\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","value","newClass","module","cx","c","styles","rootClassName","sizes","DEFAULT_SIZE","getAttributesString","attributeCollection","attr","item","createSvg","content","title","titleElement","getSvgContent","svg","Icon","dataTestid","allyTitle","className","size","props","svgString","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"icon.es.js","sources":["../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/icon.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React from \"react\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./icon.module.scss\";\nimport type { iconList } from \"./icon-imports\";\nexport declare type IconName = keyof typeof iconList;\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-icon\";\n\nexport const sizes = [\"xxs\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\nexport const DEFAULT_SIZE = \"md\" as const;\n\nexport type Size = (typeof sizes)[number];\n\ntype CreateSvg = {\n content?: string;\n title?: string;\n ariaHidden?: boolean;\n};\n\nexport type IconBaseProps = {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: string;\n className?: string;\n};\n\nexport type IconProps = {\n svg: { svg: string; name: string };\n} & IconBaseProps;\n\n// Create string from array of attributes\nconst getAttributesString = (attributeCollection: Record<string, unknown>[]) =>\n attributeCollection\n .filter((attr) => Object.keys(attr).length >= 1) // remove empty object\n .map((item) => `${item.name}=\"${item.value}\"`)\n .join(\" \");\n\nconst createSvg = ({ content = \"\", title }: CreateSvg = {}) => {\n const attributeCollection = [\n { name: \"xmlns\", value: \"http://www.w3.org/2000/svg\" },\n { name: \"fill\", value: \"currentColor\" },\n { name: \"viewBox\", value: \"0 0 24 24\" },\n title ? { name: \"role\", value: \"img\" } : { name: \"aria-hidden\", value: \"true\" },\n ];\n\n const titleElement = title ? `<title>${title}</title>` : \"\";\n return `<svg ${getAttributesString(attributeCollection)}>${titleElement}${content}</svg>`;\n};\n\n// Remove svg tags\nconst getSvgContent = (svg: string): string => svg.replace(/<(\\/?)svg([^>]*)>/g, \"\").trim();\n\nexport const Icon = ({\n [\"data-testid\"]: dataTestid,\n svg,\n allyTitle,\n className,\n size = DEFAULT_SIZE,\n ...props\n}: IconProps) => {\n const svgString = createSvg({\n content: getSvgContent(svg.svg),\n title: allyTitle,\n });\n\n const classes = cx(className, rootClassName, `${rootClassName}--${size}`);\n\n return (\n <span\n aria-label={allyTitle}\n className={classes}\n data-testid={dataTestid}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svgString }}\n {...props}\n />\n );\n};\n\nIcon.displayName = \"Icon\";\n"],"names":["hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","value","newClass","module","cx","c","styles","rootClassName","sizes","DEFAULT_SIZE","getAttributesString","attributeCollection","attr","item","createSvg","content","title","titleElement","getSvgContent","svg","Icon","dataTestid","allyTitle","className","size","props","svgString","jsx"],"mappings":";;;;;;;;;;;;;AAOA,KAAC,WAAY;AAGZ,UAAIA,IAAS,CAAA,EAAG;AAEhB,eAASC,IAAc;AAGtB,iBAFIC,IAAU,IAELC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AAC1C,cAAIC,IAAM,UAAUD,CAAC;AACrB,UAAIC,MACHF,IAAUG,EAAYH,GAASI,EAAW,KAAK,MAAMF,CAAG,CAAC;AAAA,QAE7D;AAEE,eAAOF;AAAA,MACT;AAEC,eAASI,EAAYF,GAAK;AACzB,YAAI,OAAOA,KAAQ,YAAY,OAAOA,KAAQ;AAC7C,iBAAO,QAAQ,KAAKA,CAAG,KAAKA;AAG7B,YAAI,OAAOA,KAAQ;AAClB,iBAAO;AAGR,YAAI,MAAM,QAAQA,CAAG;AACpB,iBAAOH,EAAW,MAAM,MAAMG,CAAG;AAGlC,YAAIA,EAAI,aAAa,OAAO,UAAU,YAAY,CAACA,EAAI,SAAS,SAAQ,EAAG,SAAS,eAAe;AAClG,iBAAOA,EAAI,SAAU;AAGtB,YAAIF,IAAU;AAEd,iBAASK,KAAOH;AACf,UAAIJ,EAAO,KAAKI,GAAKG,CAAG,KAAKH,EAAIG,CAAG,MACnCL,IAAUG,EAAYH,GAAS,QAAQ,KAAKK,CAAG,KAAKA,CAAG;AAIzD,eAAOL;AAAA,MACT;AAEC,eAASG,EAAaG,GAAOC,GAAU;AACtC,eAAKA,IAIDD,IACIA,IAAQ,MAAMC,IAGfD,IAAQC,IAPPD;AAAA,MAQV;AAEC,MAAqCE,EAAO,WAC3CT,EAAW,UAAUA,GACrBS,YAAiBT,KAOjB,OAAO,aAAaA;AAAA,IAEtB;;;;;;;;;;;;GCrEMU,IAAKC,EAAE,KAAKC,CAAM,GAClBC,IAAgB,eAETC,IAAQ,CAAC,OAAO,MAAM,MAAM,MAAM,MAAM,IAAI,GAC5CC,IAAe,MAsBtBC,IAAsB,CAACC,MAC3BA,EACG,OAAO,CAACC,MAAS,OAAO,KAAKA,CAAI,EAAE,UAAU,CAAC,EAC9C,IAAI,CAACC,MAAS,GAAGA,EAAK,IAAI,KAAKA,EAAK,KAAK,GAAG,EAC5C,KAAK,GAAG,GAEPC,IAAY,CAAC,EAAE,SAAAC,IAAU,IAAI,OAAAC,EAAM,IAAe,CAAA,MAAO;AAC7D,QAAML,IAAsB;AAAA,IAC1B,EAAE,MAAM,SAAS,OAAO,6BAA6B;AAAA,IACrD,EAAE,MAAM,QAAQ,OAAO,eAAe;AAAA,IACtC,EAAE,MAAM,WAAW,OAAO,YAAY;AAAA,IACtCK,IAAQ,EAAE,MAAM,QAAQ,OAAO,MAAM,IAAI,EAAE,MAAM,eAAe,OAAO,OAAO;AAAA,EAChF,GAEMC,IAAeD,IAAQ,UAAUA,CAAK,aAAa;AACzD,SAAO,QAAQN,EAAoBC,CAAmB,CAAC,IAAIM,CAAY,GAAGF,CAAO;AACnF,GAGMG,IAAgB,CAACC,MAAwBA,EAAI,QAAQ,sBAAsB,EAAE,EAAE,KAAK,GAE7EC,IAAO,CAAC;AAAA,EACnB,CAAC,gBAAgBC;AAAA,EACjB,KAAAF;AAAA,EACA,WAAAG;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAOf;AAAA,EACP,GAAGgB;AACL,MAAiB;AACf,QAAMC,IAAYZ,EAAU;AAAA,IAC1B,SAASI,EAAcC,EAAI,GAAG;AAAA,IAC9B,OAAOG;AAAA,EAAA,CACR,GAEK3B,IAAUS,EAAGmB,GAAWhB,GAAe,GAAGA,CAAa,KAAKiB,CAAI,EAAE;AAGtE,SAAA,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAYL;AAAA,MACZ,WAAW3B;AAAA,MACX,eAAa0B;AAAA,MAEb,yBAAyB,EAAE,QAAQK,EAAU;AAAA,MAC5C,GAAGD;AAAA,IAAA;AAAA,EACN;AAEJ;AAEAL,EAAK,cAAc;","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpurds/icon",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/icon.cjs.js",
|
|
6
6
|
"types": "./dist/icon.d.ts",
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
"source": "src/icon.tsx",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"classnames": "~2.5.0",
|
|
43
|
-
"@purpurds/tokens": "6.
|
|
43
|
+
"@purpurds/tokens": "6.4.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@rushstack/eslint-patch": "~1.10.0",
|
|
47
|
-
"@storybook/blocks": "^8.
|
|
48
|
-
"@storybook/react": "^8.
|
|
47
|
+
"@storybook/blocks": "^8.6.4",
|
|
48
|
+
"@storybook/react": "^8.6.4",
|
|
49
49
|
"@telia/base-rig": "~8.2.0",
|
|
50
50
|
"@telia/react-rig": "~3.2.0",
|
|
51
51
|
"@testing-library/dom": "~10.4.0",
|
|
52
52
|
"@testing-library/jest-dom": "~6.4.0",
|
|
53
|
-
"@testing-library/react": "~
|
|
53
|
+
"@testing-library/react": "~16.2.0",
|
|
54
54
|
"@types/fs-extra": "9",
|
|
55
55
|
"@types/node": "20.12.12",
|
|
56
56
|
"@types/react-dom": "^19.0.4",
|
|
@@ -61,27 +61,26 @@
|
|
|
61
61
|
"esbuild": "~0.14.23",
|
|
62
62
|
"eslint-plugin-testing-library": "~6.2.0",
|
|
63
63
|
"eslint": "^8.57.0",
|
|
64
|
-
"glob": "^7.1.6",
|
|
65
64
|
"globby": "^14.0.2",
|
|
66
65
|
"jsdom": "~22.1.0",
|
|
67
66
|
"lint-staged": "~10.5.3",
|
|
68
67
|
"prettier": "~2.8.8",
|
|
69
68
|
"react-dom": "^19.0.0",
|
|
70
69
|
"react": "^19.0.0",
|
|
71
|
-
"storybook": "^8.
|
|
70
|
+
"storybook": "^8.6.4",
|
|
72
71
|
"svgo": "3.2.0",
|
|
73
|
-
"tsx": "
|
|
72
|
+
"tsx": "^4.19.3",
|
|
74
73
|
"typescript": "^5.6.3",
|
|
75
|
-
"vite": "
|
|
74
|
+
"vite": "^6.2.1",
|
|
76
75
|
"vitest-axe": "~0.1.0",
|
|
77
76
|
"vitest": "^2.1.2",
|
|
78
77
|
"vite-plugin-static-copy": "~2.2.0",
|
|
79
|
-
"@purpurds/autocomplete": "6.
|
|
78
|
+
"@purpurds/autocomplete": "6.4.0",
|
|
79
|
+
"@purpurds/listbox": "6.4.0",
|
|
80
80
|
"@purpurds/component-rig": "1.0.0",
|
|
81
|
-
"@purpurds/
|
|
82
|
-
"@purpurds/paragraph": "6.
|
|
83
|
-
"@purpurds/
|
|
84
|
-
"@purpurds/text-field": "6.3.0"
|
|
81
|
+
"@purpurds/heading": "6.4.0",
|
|
82
|
+
"@purpurds/paragraph": "6.4.0",
|
|
83
|
+
"@purpurds/text-field": "6.4.0"
|
|
85
84
|
},
|
|
86
85
|
"peerDependencies": {
|
|
87
86
|
"@types/react": "^18 || ^19",
|
package/src/icon.stories.tsx
CHANGED
|
@@ -10,7 +10,8 @@ import "@purpurds/autocomplete/styles";
|
|
|
10
10
|
import "@purpurds/listbox/styles";
|
|
11
11
|
import "@purpurds/heading/styles";
|
|
12
12
|
import "@purpurds/tokens";
|
|
13
|
-
import "./icon.stories.css";
|
|
13
|
+
// import "./icon.stories.css";
|
|
14
|
+
import "./icon.story.css";
|
|
14
15
|
import { IconHeart } from "./all-icon-components";
|
|
15
16
|
import { DynamicIcon as DynamicIconComponent } from "./dynamic-icon";
|
|
16
17
|
import { Icon, sizes } from "./icon";
|
|
@@ -66,14 +67,28 @@ export const Showcase: Story = {
|
|
|
66
67
|
tags: ["visual:check"],
|
|
67
68
|
render: (props) => (
|
|
68
69
|
<div style={{ display: "flex", gap: 12, flexDirection: "column" }}>
|
|
69
|
-
<div
|
|
70
|
+
<div
|
|
71
|
+
style={{
|
|
72
|
+
display: "flex",
|
|
73
|
+
gap: 12,
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
color: "var(--purpur-color-text-default)",
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
70
78
|
<IconHeart size={props.size} />
|
|
71
79
|
<Heading tag="h2" variant="subsection-100">
|
|
72
80
|
Rendered using prebuild component (recommended)
|
|
73
81
|
</Heading>
|
|
74
82
|
</div>
|
|
75
83
|
<hr style={{ width: "100%" }} />
|
|
76
|
-
<div
|
|
84
|
+
<div
|
|
85
|
+
style={{
|
|
86
|
+
display: "flex",
|
|
87
|
+
gap: 12,
|
|
88
|
+
alignItems: "center",
|
|
89
|
+
color: "var(--purpur-color-text-default)",
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
77
92
|
<Icon {...props} />
|
|
78
93
|
<Heading tag="h2" variant="subsection-100">
|
|
79
94
|
Rendered using Icon + svg
|
|
@@ -111,7 +126,14 @@ export const DynamicIcon: StoryObj<typeof DynamicIconComponent> = {
|
|
|
111
126
|
tags: ["visual:check"],
|
|
112
127
|
render: (props) => (
|
|
113
128
|
<div style={{ display: "flex", gap: 12, flexDirection: "column" }}>
|
|
114
|
-
<div
|
|
129
|
+
<div
|
|
130
|
+
style={{
|
|
131
|
+
display: "flex",
|
|
132
|
+
gap: 12,
|
|
133
|
+
alignItems: "center",
|
|
134
|
+
color: "var(--purpur-color-text-default)",
|
|
135
|
+
}}
|
|
136
|
+
>
|
|
115
137
|
<DynamicIconComponent {...props} />
|
|
116
138
|
<Paragraph>
|
|
117
139
|
name: <b>{props.name}</b>
|
|
@@ -268,7 +290,13 @@ const AllIconsStory = () => {
|
|
|
268
290
|
<div className="icon-grid">
|
|
269
291
|
{z.entries.map((icon) => (
|
|
270
292
|
<div className="icon-wrapper" key={icon.name}>
|
|
271
|
-
<div
|
|
293
|
+
<div
|
|
294
|
+
className="icon-box"
|
|
295
|
+
style={{
|
|
296
|
+
color: "var(--purpur-color-text-default)",
|
|
297
|
+
background: "var(--purpur-color-background-primary)",
|
|
298
|
+
}}
|
|
299
|
+
>
|
|
272
300
|
<Icon svg={icon} size="lg" />
|
|
273
301
|
</div>
|
|
274
302
|
<Paragraph>{icon.name}</Paragraph>
|