@purpurds/icon 6.12.5 → 7.1.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 +1 -1
- package/dist/dynamic-icon.cjs.js.map +1 -1
- package/dist/dynamic-icon.es.js +0 -1
- package/dist/dynamic-icon.es.js.map +1 -1
- package/dist/{icon-D4e38bsf.js → icon-B-zR9urs.js} +2 -2
- package/dist/{icon-D4e38bsf.js.map → icon-B-zR9urs.js.map} +1 -1
- package/dist/{icon-CbdbqC3C.mjs → icon-BqK8slmm.mjs} +9 -10
- package/dist/{icon-CbdbqC3C.mjs.map → icon-BqK8slmm.mjs.map} +1 -1
- package/dist/icon.cjs.js +1 -1
- package/dist/icon.cjs.js.map +1 -1
- package/dist/icon.d.ts.map +1 -1
- package/dist/icon.es.js +5 -6
- package/dist/icon.es.js.map +1 -1
- package/package.json +5 -5
- package/src/icon.stories.tsx +0 -8
- package/src/icon.test.tsx +0 -6
- package/src/icon.tsx +0 -2
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
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),
|
|
6
|
-
//# sourceMappingURL=icon-
|
|
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),l="purpur-icon",h="md",y=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 ${y(s)}>${o}${r}</svg>`},b=r=>r.replace(/<(\/?)svg([^>]*)>/g,"").trim(),a=({["data-testid"]:r,svg:e,allyTitle:s,className:o,size:i=h,...t})=>{const n=S({content:b(e.svg),title:s}),u=x(o,l,`${l}--${i}`);return f.jsx("span",{className:u,"data-testid":r,dangerouslySetInnerHTML:{__html:n},...t})};a.displayName="Icon";exports.Icon=a;
|
|
6
|
+
//# sourceMappingURL=icon-B-zR9urs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-
|
|
1
|
+
{"version":3,"file":"icon-B-zR9urs.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 = React.HTMLAttributes<HTMLSpanElement> & {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: 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 className={classes}\n data-testid={dataTestid}\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,KA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kB,EAAWf,EAAe,GAAGA,CAAa,KAAKgB,CAAI,EAAE,EAGtE,OAAAG,EAAA,IAAC,OAAA,CACC,UAAW/B,EACX,cAAayB,EACb,wBAAyB,CAAE,OAAQK,CAAU,EAC5C,GAAGD,CAAA,CACN,CAEJ,EAEAL,EAAK,YAAc","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
function f(r) {
|
|
3
3
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
4
4
|
}
|
|
@@ -50,7 +50,7 @@ const d = /* @__PURE__ */ f(_), v = {
|
|
|
50
50
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
51
51
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
52
52
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
53
|
-
}, g = d.bind(v),
|
|
53
|
+
}, g = d.bind(v), l = "purpur-icon", x = "md", h = (r) => r.filter((e) => Object.keys(e).length >= 1).map((e) => `${e.name}="${e.value}"`).join(" "), y = ({ content: r = "", title: e } = {}) => {
|
|
54
54
|
const o = [
|
|
55
55
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
56
56
|
{ name: "fill", value: "currentColor" },
|
|
@@ -58,7 +58,7 @@ const d = /* @__PURE__ */ f(_), v = {
|
|
|
58
58
|
e ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
59
59
|
], u = e ? `<title>${e}</title>` : "";
|
|
60
60
|
return `<svg ${h(o)}>${u}${r}</svg>`;
|
|
61
|
-
}, S = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
61
|
+
}, S = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), b = ({
|
|
62
62
|
["data-testid"]: r,
|
|
63
63
|
svg: e,
|
|
64
64
|
allyTitle: o,
|
|
@@ -66,14 +66,13 @@ const d = /* @__PURE__ */ f(_), v = {
|
|
|
66
66
|
size: i = x,
|
|
67
67
|
...t
|
|
68
68
|
}) => {
|
|
69
|
-
const n =
|
|
69
|
+
const n = y({
|
|
70
70
|
content: S(e.svg),
|
|
71
71
|
title: o
|
|
72
|
-
}), s = g(u,
|
|
73
|
-
return /* @__PURE__ */
|
|
72
|
+
}), s = g(u, l, `${l}--${i}`);
|
|
73
|
+
return /* @__PURE__ */ a(
|
|
74
74
|
"span",
|
|
75
75
|
{
|
|
76
|
-
"aria-label": o,
|
|
77
76
|
className: s,
|
|
78
77
|
"data-testid": r,
|
|
79
78
|
dangerouslySetInnerHTML: { __html: n },
|
|
@@ -81,8 +80,8 @@ const d = /* @__PURE__ */ f(_), v = {
|
|
|
81
80
|
}
|
|
82
81
|
);
|
|
83
82
|
};
|
|
84
|
-
|
|
83
|
+
b.displayName = "Icon";
|
|
85
84
|
export {
|
|
86
|
-
|
|
85
|
+
b as I
|
|
87
86
|
};
|
|
88
|
-
//# sourceMappingURL=icon-
|
|
87
|
+
//# sourceMappingURL=icon-BqK8slmm.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-
|
|
1
|
+
{"version":3,"file":"icon-BqK8slmm.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 = React.HTMLAttributes<HTMLSpanElement> & {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: 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 className={classes}\n data-testid={dataTestid}\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,IA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AM,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,WAAW/B;AAAA,MACX,eAAayB;AAAA,MACb,yBAAyB,EAAE,QAAQK,EAAU;AAAA,MAC5C,GAAGD;AAAA,IAAA;AAAA,EACN;AAEJ;AAEAL,EAAK,cAAc;","x_google_ignoreList":[0]}
|
package/dist/icon.cjs.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var
|
|
5
|
+
*/var l;function _(){return l||(l=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),p="purpur-icon",S=["xxs","xs","sm","md","lg","xl"],a="md",y=r=>r.filter(e=>Object.keys(e).length>=1).map(e=>`${e.name}="${e.value}"`).join(" "),b=({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 ${y(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=b({content:q(e.svg),title:s}),o=h(u,p,`${p}--${i}`);return m.jsx("span",{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 = React.HTMLAttributes<HTMLSpanElement> & {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: 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
|
|
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 = React.HTMLAttributes<HTMLSpanElement> & {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: 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 className={classes}\n data-testid={dataTestid}\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,KAq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B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B,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;;CAgBX,CAAC"}
|
package/dist/icon.es.js
CHANGED
|
@@ -50,7 +50,7 @@ const d = /* @__PURE__ */ f(_), v = {
|
|
|
50
50
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
51
51
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
52
52
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
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(" "),
|
|
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(" "), y = ({ content: r = "", title: e } = {}) => {
|
|
54
54
|
const s = [
|
|
55
55
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
56
56
|
{ name: "fill", value: "currentColor" },
|
|
@@ -58,7 +58,7 @@ const d = /* @__PURE__ */ f(_), v = {
|
|
|
58
58
|
e ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
59
59
|
], u = e ? `<title>${e}</title>` : "";
|
|
60
60
|
return `<svg ${h(s)}>${u}${r}</svg>`;
|
|
61
|
-
}, S = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(),
|
|
61
|
+
}, S = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), b = ({
|
|
62
62
|
["data-testid"]: r,
|
|
63
63
|
svg: e,
|
|
64
64
|
allyTitle: s,
|
|
@@ -66,14 +66,13 @@ const d = /* @__PURE__ */ f(_), v = {
|
|
|
66
66
|
size: i = g,
|
|
67
67
|
...t
|
|
68
68
|
}) => {
|
|
69
|
-
const n =
|
|
69
|
+
const n = y({
|
|
70
70
|
content: S(e.svg),
|
|
71
71
|
title: s
|
|
72
72
|
}), o = x(u, l, `${l}--${i}`);
|
|
73
73
|
return /* @__PURE__ */ a(
|
|
74
74
|
"span",
|
|
75
75
|
{
|
|
76
|
-
"aria-label": s,
|
|
77
76
|
className: o,
|
|
78
77
|
"data-testid": r,
|
|
79
78
|
dangerouslySetInnerHTML: { __html: n },
|
|
@@ -81,10 +80,10 @@ const d = /* @__PURE__ */ f(_), v = {
|
|
|
81
80
|
}
|
|
82
81
|
);
|
|
83
82
|
};
|
|
84
|
-
|
|
83
|
+
b.displayName = "Icon";
|
|
85
84
|
export {
|
|
86
85
|
g as DEFAULT_SIZE,
|
|
87
|
-
|
|
86
|
+
b as Icon,
|
|
88
87
|
w as sizes
|
|
89
88
|
};
|
|
90
89
|
//# 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 = React.HTMLAttributes<HTMLSpanElement> & {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: 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
|
|
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 = React.HTMLAttributes<HTMLSpanElement> & {\n size?: Size;\n allyTitle?: string;\n [\"data-testid\"]?: 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 className={classes}\n data-testid={dataTestid}\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,E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S,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,WAAWhC;AAAA,MACX,eAAa0B;AAAA,MACb,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": "
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/icon.cjs.js",
|
|
6
6
|
"types": "./dist/icon.d.ts",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"source": "src/icon.tsx",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"classnames": "~2.5.0",
|
|
43
|
-
"@purpurds/tokens": "
|
|
43
|
+
"@purpurds/tokens": "7.1.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@storybook/blocks": "^8.6.4",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
"vite": "^6.2.1",
|
|
72
72
|
"vitest-axe": "~0.1.0",
|
|
73
73
|
"vitest": "^3.1.2",
|
|
74
|
-
"@purpurds/
|
|
75
|
-
"@purpurds/
|
|
76
|
-
"@purpurds/
|
|
74
|
+
"@purpurds/paragraph": "7.1.0",
|
|
75
|
+
"@purpurds/component-rig": "1.0.0",
|
|
76
|
+
"@purpurds/heading": "7.1.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@types/react": "^18 || ^19",
|
package/src/icon.stories.tsx
CHANGED
|
@@ -209,14 +209,6 @@ const DiscoHeading = ({ children, ...headingProps }: { children: ReactNode } & H
|
|
|
209
209
|
};
|
|
210
210
|
|
|
211
211
|
const AllIconsStory = () => {
|
|
212
|
-
const options = sortedResult.flatMap(({ entries }) =>
|
|
213
|
-
entries.map(({ name }) => ({ id: name, label: name }))
|
|
214
|
-
);
|
|
215
|
-
const optionsWithDisco = [
|
|
216
|
-
...options.slice(0, 3),
|
|
217
|
-
{ id: "disco", label: "disco (⚠️ Flash alert 🕺)" },
|
|
218
|
-
...options.slice(3),
|
|
219
|
-
];
|
|
220
212
|
const [searchValue, setSearchValue] = useState("");
|
|
221
213
|
|
|
222
214
|
const disco = searchValue.startsWith("disco");
|
package/src/icon.test.tsx
CHANGED
|
@@ -28,12 +28,6 @@ describe("Icon", () => {
|
|
|
28
28
|
expect(icon).toContainHTML('<path d="M10 10 H 90 V 90 H 10 L 10 10" />');
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
it("renders with correct allyTitle", () => {
|
|
32
|
-
render(<Icon data-testid="icon" svg={svg} allyTitle="test title" />);
|
|
33
|
-
const icon = screen.getByTestId("icon");
|
|
34
|
-
expect(icon).toHaveAttribute("aria-label", "test title");
|
|
35
|
-
});
|
|
36
|
-
|
|
37
31
|
it.each(sizes)("renders with %s size", (size) => {
|
|
38
32
|
render(<Icon data-testid="icon" svg={svg} size={size} />);
|
|
39
33
|
const icon = screen.getByTestId("icon");
|
package/src/icon.tsx
CHANGED