@kahitsan/ksui 0.48.0 → 0.50.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/README.md +2 -2
- package/package.json +24 -7
- package/src/components/base/ActionMenu.test.tsx +1 -1
- package/src/components/base/ActionMenu.tsx +1 -1
- package/src/components/base/AddAttachmentTile.tsx +3 -3
- package/src/components/base/CameraCapture.tsx +2 -2
- package/src/components/base/CopyButton.tsx +2 -2
- package/src/components/base/DataTable.tsx +8 -8
- package/src/components/base/DatePicker.tsx +6 -6
- package/src/components/base/Dropdown.tsx +2 -2
- package/src/components/base/ExistingAttachmentTile.tsx +4 -4
- package/src/components/base/ImageCropper.tsx +1 -1
- package/src/components/base/ImageViewer.tsx +1 -1
- package/src/components/base/ModalHeader.tsx +1 -1
- package/src/components/base/MonthCalendar.tsx +2 -2
- package/src/components/base/ProgressBar.tsx +1 -1
- package/src/components/base/SegmentedFilter.test.tsx +1 -1
- package/src/components/base/SocialLinksBar.tsx +2 -2
- package/src/components/base/ThemeToggle.tsx +3 -3
- package/src/components/composite/ComboBox.tsx +6 -6
- package/src/components/composite/CustomRenderer.tsx +1 -1
- package/src/components/composite/FileField.tsx +4 -4
- package/src/components/composite/FlowGraph.tsx +12 -12
- package/src/components/composite/FormAdvancedSection.tsx +1 -1
- package/src/components/composite/LiveTimer.tsx +5 -5
- package/src/components/composite/MentionTextarea.tsx +2 -2
- package/src/components/composite/MultiPeriodPicker.tsx +5 -5
- package/src/components/composite/NotFound.tsx +2 -2
- package/src/components/composite/PaymentAccountPicker.tsx +2 -2
- package/src/components/composite/SalesBodyEditor.tsx +5 -5
- package/src/components/composite/SearchableSelect.tsx +2 -2
- package/src/components/composite/SecretReveal.tsx +1 -1
- package/src/components/composite/TransactionForm.tsx +9 -9
- package/src/components/composite/TransactionPayableFields.tsx +1 -1
- package/src/components/composite/TransferAccountsPicker.tsx +2 -2
- package/src/components/composite/TransferFeeChip.tsx +1 -1
- package/src/components/composite/VoucherPicker.tsx +5 -5
- package/src/components/composite/resource/ResourcePage.tsx +5 -5
- package/src/icons/README.md +29 -0
- package/src/icons/activity.tsx +4 -0
- package/src/icons/alert-circle.tsx +1 -0
- package/src/icons/alert-triangle.tsx +1 -0
- package/src/icons/app-window.tsx +4 -0
- package/src/icons/archive-restore.tsx +4 -0
- package/src/icons/archive.tsx +4 -0
- package/src/icons/arrow-down-left.tsx +4 -0
- package/src/icons/arrow-down.tsx +4 -0
- package/src/icons/arrow-left-right.tsx +4 -0
- package/src/icons/arrow-left.tsx +4 -0
- package/src/icons/arrow-right-left.tsx +4 -0
- package/src/icons/arrow-right.tsx +4 -0
- package/src/icons/arrow-up-down.tsx +4 -0
- package/src/icons/arrow-up-right.tsx +4 -0
- package/src/icons/arrow-up.tsx +4 -0
- package/src/icons/artwork/activity.ts +2 -0
- package/src/icons/artwork/app-window.png +0 -0
- package/src/icons/artwork/app-window.ts +3 -0
- package/src/icons/artwork/archive-restore.ts +2 -0
- package/src/icons/artwork/archive.ts +2 -0
- package/src/icons/artwork/arrow-down.ts +2 -0
- package/src/icons/artwork/arrow-left-right.ts +2 -0
- package/src/icons/artwork/at-sign.png +0 -0
- package/src/icons/artwork/at-sign.ts +3 -0
- package/src/icons/artwork/ban.png +0 -0
- package/src/icons/artwork/ban.ts +3 -0
- package/src/icons/artwork/banknote.ts +2 -0
- package/src/icons/artwork/bell.ts +2 -0
- package/src/icons/artwork/bir-form-0619-e.png +0 -0
- package/src/icons/artwork/bir-form-0619-e.ts +3 -0
- package/src/icons/artwork/bir-form-1601-eq.png +0 -0
- package/src/icons/artwork/bir-form-1601-eq.ts +3 -0
- package/src/icons/artwork/bir-form-2307.png +0 -0
- package/src/icons/artwork/bir-form-2307.ts +3 -0
- package/src/icons/artwork/bir-office.ts +2 -0
- package/src/icons/artwork/blocks.png +0 -0
- package/src/icons/artwork/blocks.ts +3 -0
- package/src/icons/artwork/book-open.ts +2 -0
- package/src/icons/artwork/boxes.ts +2 -0
- package/src/icons/artwork/briefcase.png +0 -0
- package/src/icons/artwork/briefcase.ts +3 -0
- package/src/icons/artwork/building-2.ts +2 -0
- package/src/icons/artwork/building.png +0 -0
- package/src/icons/artwork/building.ts +3 -0
- package/src/icons/artwork/calculator.png +0 -0
- package/src/icons/artwork/calculator.ts +3 -0
- package/src/icons/artwork/calendar-clock.png +0 -0
- package/src/icons/artwork/calendar-clock.ts +3 -0
- package/src/icons/artwork/calendar.png +0 -0
- package/src/icons/artwork/calendar.ts +3 -0
- package/src/icons/artwork/camera.ts +2 -0
- package/src/icons/artwork/chart-bar.ts +2 -0
- package/src/icons/artwork/chart-column.ts +2 -0
- package/src/icons/artwork/check-bold.ts +2 -0
- package/src/icons/artwork/check-check.ts +2 -0
- package/src/icons/artwork/check.ts +2 -0
- package/src/icons/artwork/chevron-right.ts +2 -0
- package/src/icons/artwork/chevrons-up-down.ts +2 -0
- package/src/icons/artwork/circle-alert.ts +2 -0
- package/src/icons/artwork/circle-check-bold.png +0 -0
- package/src/icons/artwork/circle-check-bold.ts +3 -0
- package/src/icons/artwork/circle-check.png +0 -0
- package/src/icons/artwork/circle-check.ts +3 -0
- package/src/icons/artwork/circle-dot.ts +2 -0
- package/src/icons/artwork/circle-question-mark.png +0 -0
- package/src/icons/artwork/circle-question-mark.ts +3 -0
- package/src/icons/artwork/circle-x.ts +2 -0
- package/src/icons/artwork/circle.ts +2 -0
- package/src/icons/artwork/clipboard-list.ts +2 -0
- package/src/icons/artwork/clock.png +0 -0
- package/src/icons/artwork/clock.ts +3 -0
- package/src/icons/artwork/cloud-download.ts +2 -0
- package/src/icons/artwork/coins.ts +2 -0
- package/src/icons/artwork/compass.png +0 -0
- package/src/icons/artwork/compass.ts +3 -0
- package/src/icons/artwork/copy.png +0 -0
- package/src/icons/artwork/copy.ts +3 -0
- package/src/icons/artwork/corner-down-right.ts +2 -0
- package/src/icons/artwork/credit-card.png +0 -0
- package/src/icons/artwork/credit-card.ts +3 -0
- package/src/icons/artwork/crown.ts +2 -0
- package/src/icons/artwork/database.png +0 -0
- package/src/icons/artwork/database.ts +3 -0
- package/src/icons/artwork/dollar-sign.ts +2 -0
- package/src/icons/artwork/door-open.png +0 -0
- package/src/icons/artwork/door-open.ts +3 -0
- package/src/icons/artwork/download.ts +2 -0
- package/src/icons/artwork/ellipsis.ts +2 -0
- package/src/icons/artwork/equal.ts +2 -0
- package/src/icons/artwork/external-link.ts +2 -0
- package/src/icons/artwork/eye-off.ts +2 -0
- package/src/icons/artwork/eye.ts +2 -0
- package/src/icons/artwork/file-spreadsheet.png +0 -0
- package/src/icons/artwork/file-spreadsheet.ts +3 -0
- package/src/icons/artwork/file-text.png +0 -0
- package/src/icons/artwork/file-text.ts +3 -0
- package/src/icons/artwork/file.ts +2 -0
- package/src/icons/artwork/funnel.ts +2 -0
- package/src/icons/artwork/git-branch.ts +2 -0
- package/src/icons/artwork/github.ts +2 -0
- package/src/icons/artwork/globe.png +0 -0
- package/src/icons/artwork/globe.ts +3 -0
- package/src/icons/artwork/grip-vertical.ts +2 -0
- package/src/icons/artwork/history.png +0 -0
- package/src/icons/artwork/history.ts +3 -0
- package/src/icons/artwork/house.ts +2 -0
- package/src/icons/artwork/image-off.png +0 -0
- package/src/icons/artwork/image-off.ts +3 -0
- package/src/icons/artwork/inbox.ts +2 -0
- package/src/icons/artwork/info.ts +2 -0
- package/src/icons/artwork/key.ts +2 -0
- package/src/icons/artwork/landmark.ts +2 -0
- package/src/icons/artwork/layers.png +0 -0
- package/src/icons/artwork/layers.ts +3 -0
- package/src/icons/artwork/layout-dashboard.ts +2 -0
- package/src/icons/artwork/layout-grid.ts +2 -0
- package/src/icons/artwork/layout-list.png +0 -0
- package/src/icons/artwork/layout-list.ts +3 -0
- package/src/icons/artwork/link-2.ts +2 -0
- package/src/icons/artwork/list.ts +2 -0
- package/src/icons/artwork/loader-circle.ts +2 -0
- package/src/icons/artwork/lock-keyhole.ts +2 -0
- package/src/icons/artwork/lock.ts +2 -0
- package/src/icons/artwork/log-in.ts +2 -0
- package/src/icons/artwork/log-out.ts +2 -0
- package/src/icons/artwork/mail-open.ts +2 -0
- package/src/icons/artwork/mail.ts +2 -0
- package/src/icons/artwork/map-pin.ts +2 -0
- package/src/icons/artwork/megaphone.ts +2 -0
- package/src/icons/artwork/menu.ts +2 -0
- package/src/icons/artwork/message-square.ts +2 -0
- package/src/icons/artwork/minus.ts +2 -0
- package/src/icons/artwork/moon.ts +2 -0
- package/src/icons/artwork/mouse-pointer-click.ts +2 -0
- package/src/icons/artwork/move.ts +2 -0
- package/src/icons/artwork/package.ts +2 -0
- package/src/icons/artwork/palette.png +0 -0
- package/src/icons/artwork/palette.ts +3 -0
- package/src/icons/artwork/panel-left-close.ts +2 -0
- package/src/icons/artwork/panel-left.png +0 -0
- package/src/icons/artwork/panel-left.ts +3 -0
- package/src/icons/artwork/paperclip.png +0 -0
- package/src/icons/artwork/paperclip.ts +3 -0
- package/src/icons/artwork/pause.ts +2 -0
- package/src/icons/artwork/pencil.ts +2 -0
- package/src/icons/artwork/phone-call.png +0 -0
- package/src/icons/artwork/phone-call.ts +3 -0
- package/src/icons/artwork/phone.ts +2 -0
- package/src/icons/artwork/piggy-bank.ts +2 -0
- package/src/icons/artwork/play.ts +2 -0
- package/src/icons/artwork/plus.ts +2 -0
- package/src/icons/artwork/power.ts +2 -0
- package/src/icons/artwork/radio.png +0 -0
- package/src/icons/artwork/radio.ts +3 -0
- package/src/icons/artwork/receipt.ts +2 -0
- package/src/icons/artwork/refresh-cw.ts +2 -0
- package/src/icons/artwork/rotate-ccw.ts +2 -0
- package/src/icons/artwork/rss.ts +2 -0
- package/src/icons/artwork/sales.ts +2 -0
- package/src/icons/artwork/save.ts +2 -0
- package/src/icons/artwork/search.ts +2 -0
- package/src/icons/artwork/settings.ts +2 -0
- package/src/icons/artwork/shield-alert.ts +2 -0
- package/src/icons/artwork/shield-check.ts +2 -0
- package/src/icons/artwork/shield-off.ts +2 -0
- package/src/icons/artwork/shield.ts +2 -0
- package/src/icons/artwork/shopping-bag.png +0 -0
- package/src/icons/artwork/shopping-bag.ts +3 -0
- package/src/icons/artwork/shopping-cart.ts +2 -0
- package/src/icons/artwork/shuffle.ts +2 -0
- package/src/icons/artwork/sliders-horizontal.ts +2 -0
- package/src/icons/artwork/smartphone.ts +2 -0
- package/src/icons/artwork/sparkles.ts +2 -0
- package/src/icons/artwork/square.ts +2 -0
- package/src/icons/artwork/star-filled.ts +2 -0
- package/src/icons/artwork/star.ts +2 -0
- package/src/icons/artwork/sticky-note.png +0 -0
- package/src/icons/artwork/sticky-note.ts +3 -0
- package/src/icons/artwork/store.png +0 -0
- package/src/icons/artwork/store.ts +3 -0
- package/src/icons/artwork/sun.ts +2 -0
- package/src/icons/artwork/tag.ts +2 -0
- package/src/icons/artwork/target.png +0 -0
- package/src/icons/artwork/target.ts +3 -0
- package/src/icons/artwork/tax-document.ts +2 -0
- package/src/icons/artwork/ticket.png +0 -0
- package/src/icons/artwork/ticket.ts +3 -0
- package/src/icons/artwork/timer.ts +2 -0
- package/src/icons/artwork/trash-2.png +0 -0
- package/src/icons/artwork/trash-2.ts +3 -0
- package/src/icons/artwork/trending-up.ts +2 -0
- package/src/icons/artwork/triangle-alert.ts +2 -0
- package/src/icons/artwork/trophy.ts +2 -0
- package/src/icons/artwork/undo-2.ts +2 -0
- package/src/icons/artwork/upload.ts +2 -0
- package/src/icons/artwork/user-check.png +0 -0
- package/src/icons/artwork/user-check.ts +3 -0
- package/src/icons/artwork/user-plus.ts +2 -0
- package/src/icons/artwork/user.ts +2 -0
- package/src/icons/artwork/users.ts +2 -0
- package/src/icons/artwork/volume-2.ts +2 -0
- package/src/icons/artwork/volume-x.ts +2 -0
- package/src/icons/artwork/wallet.ts +2 -0
- package/src/icons/artwork/workflow.ts +2 -0
- package/src/icons/artwork/x.ts +2 -0
- package/src/icons/artwork/zap.ts +2 -0
- package/src/icons/artwork/zoom-in.png +0 -0
- package/src/icons/artwork/zoom-in.ts +3 -0
- package/src/icons/asset-modules.d.ts +4 -0
- package/src/icons/at-sign.tsx +4 -0
- package/src/icons/ban.tsx +4 -0
- package/src/icons/banknote.tsx +4 -0
- package/src/icons/bar-chart-3.tsx +1 -0
- package/src/icons/bar-chart3.tsx +1 -0
- package/src/icons/bell.tsx +4 -0
- package/src/icons/bir-form-0619-e.tsx +4 -0
- package/src/icons/bir-form-1601-eq.tsx +4 -0
- package/src/icons/bir-form-2307.tsx +4 -0
- package/src/icons/bir-office.tsx +4 -0
- package/src/icons/blocks.tsx +4 -0
- package/src/icons/book-open.tsx +4 -0
- package/src/icons/boxes.tsx +4 -0
- package/src/icons/briefcase.tsx +4 -0
- package/src/icons/building-2.tsx +4 -0
- package/src/icons/building.tsx +4 -0
- package/src/icons/building2.tsx +1 -0
- package/src/icons/calculator.tsx +4 -0
- package/src/icons/calendar-clock.tsx +4 -0
- package/src/icons/calendar-days.tsx +4 -0
- package/src/icons/calendar.tsx +4 -0
- package/src/icons/camera.tsx +4 -0
- package/src/icons/chart-bar.tsx +4 -0
- package/src/icons/chart-column.tsx +4 -0
- package/src/icons/check-bold.tsx +4 -0
- package/src/icons/check-check.tsx +4 -0
- package/src/icons/check-circle-2.tsx +1 -0
- package/src/icons/check-circle.tsx +1 -0
- package/src/icons/check.tsx +5 -0
- package/src/icons/chevron-down.tsx +4 -0
- package/src/icons/chevron-left.tsx +4 -0
- package/src/icons/chevron-right.tsx +4 -0
- package/src/icons/chevron-up.tsx +4 -0
- package/src/icons/chevrons-up-down.tsx +4 -0
- package/src/icons/circle-alert.tsx +4 -0
- package/src/icons/circle-check-big.tsx +5 -0
- package/src/icons/circle-check-bold.tsx +4 -0
- package/src/icons/circle-check.tsx +5 -0
- package/src/icons/circle-dot.tsx +4 -0
- package/src/icons/circle-help.tsx +1 -0
- package/src/icons/circle-question-mark.tsx +4 -0
- package/src/icons/circle-slash.tsx +4 -0
- package/src/icons/circle-x.tsx +4 -0
- package/src/icons/circle.tsx +4 -0
- package/src/icons/clipboard-list.tsx +4 -0
- package/src/icons/clock.tsx +4 -0
- package/src/icons/cloud-download.tsx +4 -0
- package/src/icons/cloud-upload.tsx +4 -0
- package/src/icons/coins.tsx +4 -0
- package/src/icons/compass.tsx +4 -0
- package/src/icons/copy.tsx +4 -0
- package/src/icons/corner-down-right.tsx +4 -0
- package/src/icons/create-artwork-icon.test.tsx +123 -0
- package/src/icons/create-artwork-icon.tsx +139 -0
- package/src/icons/credit-card.tsx +4 -0
- package/src/icons/crown.tsx +4 -0
- package/src/icons/database.tsx +4 -0
- package/src/icons/dollar-sign.tsx +4 -0
- package/src/icons/door-open.tsx +4 -0
- package/src/icons/download-cloud.tsx +1 -0
- package/src/icons/download.tsx +4 -0
- package/src/icons/ellipsis-vertical.tsx +4 -0
- package/src/icons/ellipsis.tsx +4 -0
- package/src/icons/equal.tsx +4 -0
- package/src/icons/external-link.tsx +4 -0
- package/src/icons/eye-off.tsx +4 -0
- package/src/icons/eye.tsx +4 -0
- package/src/icons/file-spreadsheet.tsx +4 -0
- package/src/icons/file-text.tsx +4 -0
- package/src/icons/file.tsx +4 -0
- package/src/icons/filter.tsx +1 -0
- package/src/icons/funnel.tsx +4 -0
- package/src/icons/git-branch.tsx +4 -0
- package/src/icons/github.tsx +4 -0
- package/src/icons/globe.tsx +4 -0
- package/src/icons/grip-vertical.tsx +4 -0
- package/src/icons/history.tsx +4 -0
- package/src/icons/house.tsx +4 -0
- package/src/icons/image-off.tsx +4 -0
- package/src/icons/inbox.tsx +4 -0
- package/src/icons/index.ts +184 -0
- package/src/icons/info.tsx +4 -0
- package/src/icons/key-round.tsx +4 -0
- package/src/icons/key.tsx +4 -0
- package/src/icons/landmark.tsx +4 -0
- package/src/icons/layers.tsx +4 -0
- package/src/icons/layout-dashboard.tsx +4 -0
- package/src/icons/layout-grid.tsx +4 -0
- package/src/icons/layout-list.tsx +4 -0
- package/src/icons/link-2.tsx +4 -0
- package/src/icons/list.tsx +4 -0
- package/src/icons/loader-2.tsx +1 -0
- package/src/icons/loader-circle.tsx +4 -0
- package/src/icons/lock-keyhole.tsx +4 -0
- package/src/icons/lock.tsx +4 -0
- package/src/icons/log-in.tsx +4 -0
- package/src/icons/log-out.tsx +4 -0
- package/src/icons/mail-open.tsx +4 -0
- package/src/icons/mail.tsx +4 -0
- package/src/icons/map-pin.tsx +4 -0
- package/src/icons/megaphone.tsx +4 -0
- package/src/icons/menu.tsx +4 -0
- package/src/icons/message-square.tsx +4 -0
- package/src/icons/minus.tsx +4 -0
- package/src/icons/moon.tsx +4 -0
- package/src/icons/more-horizontal.tsx +1 -0
- package/src/icons/more-vertical.tsx +1 -0
- package/src/icons/mouse-pointer-click.tsx +4 -0
- package/src/icons/move.tsx +4 -0
- package/src/icons/package.tsx +4 -0
- package/src/icons/palette.tsx +4 -0
- package/src/icons/panel-left-close.tsx +4 -0
- package/src/icons/panel-left.tsx +4 -0
- package/src/icons/paperclip.tsx +4 -0
- package/src/icons/pause.tsx +4 -0
- package/src/icons/pencil.tsx +4 -0
- package/src/icons/phone-call.tsx +4 -0
- package/src/icons/phone.tsx +4 -0
- package/src/icons/piggy-bank.tsx +4 -0
- package/src/icons/play.tsx +4 -0
- package/src/icons/plus.tsx +4 -0
- package/src/icons/power.tsx +4 -0
- package/src/icons/radio.tsx +4 -0
- package/src/icons/receipt.tsx +4 -0
- package/src/icons/refresh-cw.tsx +4 -0
- package/src/icons/registry.ts +202 -0
- package/src/icons/rotate-ccw.tsx +4 -0
- package/src/icons/rss.tsx +4 -0
- package/src/icons/sales.tsx +4 -0
- package/src/icons/save.tsx +4 -0
- package/src/icons/search.tsx +4 -0
- package/src/icons/settings-2.tsx +4 -0
- package/src/icons/settings.tsx +4 -0
- package/src/icons/settings2.tsx +1 -0
- package/src/icons/shield-alert.tsx +4 -0
- package/src/icons/shield-check.tsx +4 -0
- package/src/icons/shield-off.tsx +4 -0
- package/src/icons/shield.tsx +4 -0
- package/src/icons/shopping-bag.tsx +4 -0
- package/src/icons/shopping-cart.tsx +4 -0
- package/src/icons/shuffle.tsx +4 -0
- package/src/icons/sliders-horizontal.tsx +4 -0
- package/src/icons/smartphone.tsx +4 -0
- package/src/icons/sparkles.tsx +4 -0
- package/src/icons/square.tsx +4 -0
- package/src/icons/star-filled.tsx +4 -0
- package/src/icons/star.tsx +5 -0
- package/src/icons/sticky-note.tsx +4 -0
- package/src/icons/store.tsx +4 -0
- package/src/icons/sun.tsx +4 -0
- package/src/icons/tag.tsx +4 -0
- package/src/icons/target.tsx +4 -0
- package/src/icons/tax-document.tsx +4 -0
- package/src/icons/ticket.tsx +4 -0
- package/src/icons/timer.tsx +4 -0
- package/src/icons/trash-2.tsx +4 -0
- package/src/icons/trash2.tsx +1 -0
- package/src/icons/trending-up.tsx +4 -0
- package/src/icons/triangle-alert.tsx +4 -0
- package/src/icons/trophy.tsx +4 -0
- package/src/icons/undo-2.tsx +4 -0
- package/src/icons/upload.tsx +4 -0
- package/src/icons/user-check.tsx +4 -0
- package/src/icons/user-plus.tsx +4 -0
- package/src/icons/user-round.tsx +4 -0
- package/src/icons/user.tsx +4 -0
- package/src/icons/users-round.tsx +4 -0
- package/src/icons/users.tsx +4 -0
- package/src/icons/volume-2.tsx +4 -0
- package/src/icons/volume-x.tsx +4 -0
- package/src/icons/wallet.tsx +4 -0
- package/src/icons/workflow.tsx +4 -0
- package/src/icons/x-circle.tsx +1 -0
- package/src/icons/x.tsx +4 -0
- package/src/icons/zap.tsx +4 -0
- package/src/icons/zoom-in.tsx +4 -0
- package/src/index.ts +3 -3
- package/src/utils/account-icons.ts +12 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./building-2";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./circle-check";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./circle-check-big";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Generated by scripts/build-icon-assets.mjs.
|
|
2
|
+
import { createArtworkIcon } from "./create-artwork-icon";
|
|
3
|
+
import { artwork } from "./artwork/check";
|
|
4
|
+
import { artwork as bold } from "./artwork/check-bold";
|
|
5
|
+
export default /* @__PURE__ */ createArtworkIcon("check", artwork, { bold });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Generated by scripts/build-icon-assets.mjs.
|
|
2
|
+
import { createArtworkIcon } from "./create-artwork-icon";
|
|
3
|
+
import { artwork } from "./artwork/circle-check";
|
|
4
|
+
import { artwork as bold } from "./artwork/circle-check-bold";
|
|
5
|
+
export default /* @__PURE__ */ createArtworkIcon("circle-check-big", artwork, { bold });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Generated by scripts/build-icon-assets.mjs.
|
|
2
|
+
import { createArtworkIcon } from "./create-artwork-icon";
|
|
3
|
+
import { artwork } from "./artwork/circle-check";
|
|
4
|
+
import { artwork as bold } from "./artwork/circle-check-bold";
|
|
5
|
+
export default /* @__PURE__ */ createArtworkIcon("circle-check", artwork, { bold });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./circle-question-mark";
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { cleanup, render } from "@solidjs/testing-library";
|
|
2
|
+
import { createSignal } from "solid-js";
|
|
3
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
4
|
+
import { createArtworkIcon } from "./create-artwork-icon";
|
|
5
|
+
|
|
6
|
+
const regular = "data:image/png;base64,regular";
|
|
7
|
+
const bold = "data:image/png;base64,bold";
|
|
8
|
+
const filled = "data:image/png;base64,filled";
|
|
9
|
+
const Glyph = createArtworkIcon("sample", regular, { bold, filled });
|
|
10
|
+
afterEach(cleanup);
|
|
11
|
+
|
|
12
|
+
describe("original artwork icon contract", () => {
|
|
13
|
+
it("rotates shared source geometry without changing caller SVG transforms or children", () => {
|
|
14
|
+
const Oriented = createArtworkIcon("left", "M72 12v120", { rotation: 90 });
|
|
15
|
+
const view = render(() => <Oriented transform="translate(2 3)"><desc>Previous page</desc></Oriented>);
|
|
16
|
+
expect(view.container.querySelector("svg")?.getAttribute("transform")).toBe("translate(2 3)");
|
|
17
|
+
expect(view.container.querySelector("path")?.parentElement?.getAttribute("transform")).toBe("rotate(90 72 72)");
|
|
18
|
+
expect(view.container.querySelector("desc")?.parentElement?.tagName.toLowerCase()).toBe("svg");
|
|
19
|
+
});
|
|
20
|
+
it("keeps accessible titles in the SVG namespace without changing the document title", () => {
|
|
21
|
+
const previousTitle = document.title;
|
|
22
|
+
document.title = "Application";
|
|
23
|
+
try {
|
|
24
|
+
const view = render(() => <Glyph title="Search" />);
|
|
25
|
+
const title = view.container.querySelector("title");
|
|
26
|
+
expect(title?.namespaceURI).toBe("http://www.w3.org/2000/svg");
|
|
27
|
+
expect(view.getByRole("img", { name: "Search" })).toBeTruthy();
|
|
28
|
+
expect(document.title).toBe("Application");
|
|
29
|
+
} finally {
|
|
30
|
+
document.title = previousTitle;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("uses an emitted image URL without mistaking it for vector geometry", () => {
|
|
35
|
+
const External = createArtworkIcon("external", { image: "/assets/original.png" });
|
|
36
|
+
const view = render(() => <External title="Original image" />);
|
|
37
|
+
expect(view.container.querySelector("path")).toBeNull();
|
|
38
|
+
expect(view.container.querySelector("image")?.getAttribute("href")).toBe("/assets/original.png");
|
|
39
|
+
expect(view.getByRole("img", { name: "Original image" })).toBeTruthy();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("changes delivery format when a reactive weight selects different artwork", () => {
|
|
43
|
+
const Mixed = createArtworkIcon("mixed", regular, {
|
|
44
|
+
bold: "M12 12h120v120H12z",
|
|
45
|
+
});
|
|
46
|
+
const [weight, setWeight] = createSignal(2);
|
|
47
|
+
const view = render(() => <Mixed strokeWidth={weight()} />);
|
|
48
|
+
expect(view.container.querySelector("image")).not.toBeNull();
|
|
49
|
+
setWeight(3);
|
|
50
|
+
expect(view.container.querySelector("image")).toBeNull();
|
|
51
|
+
expect(view.container.querySelector("path")).not.toBeNull();
|
|
52
|
+
});
|
|
53
|
+
it("renders verified vector artwork without creating image requests", () => {
|
|
54
|
+
const Vector = createArtworkIcon("vector", "M12 12h120v120H12z");
|
|
55
|
+
const view = render(() => (
|
|
56
|
+
<Vector aria-label="Vector sample" style={{ color: "red" }} />
|
|
57
|
+
));
|
|
58
|
+
expect(view.getByRole("img", { name: "Vector sample" })).toBeTruthy();
|
|
59
|
+
expect(view.container.querySelector("image")).toBeNull();
|
|
60
|
+
expect(view.container.querySelector("path")?.getAttribute("fill")).toBe(
|
|
61
|
+
"currentColor"
|
|
62
|
+
);
|
|
63
|
+
});
|
|
64
|
+
it("retains SVG refs, attributes and reactive dimensions", () => {
|
|
65
|
+
const [size, setSize] = createSignal(16);
|
|
66
|
+
let element: SVGSVGElement | undefined;
|
|
67
|
+
const view = render(() => (
|
|
68
|
+
<Glyph
|
|
69
|
+
ref={element}
|
|
70
|
+
size={size()}
|
|
71
|
+
class="indicator"
|
|
72
|
+
aria-label="Saved"
|
|
73
|
+
data-testid="glyph"
|
|
74
|
+
/>
|
|
75
|
+
));
|
|
76
|
+
const svg = view.getByTestId("glyph");
|
|
77
|
+
expect(element).toBe(svg);
|
|
78
|
+
expect(svg.tagName.toLowerCase()).toBe("svg");
|
|
79
|
+
expect(svg.getAttribute("width")).toBe("16");
|
|
80
|
+
expect(svg.getAttribute("role")).toBe("img");
|
|
81
|
+
expect(svg.hasAttribute("aria-hidden")).toBe(false);
|
|
82
|
+
setSize(24);
|
|
83
|
+
expect(svg.getAttribute("width")).toBe("24");
|
|
84
|
+
expect(svg.getAttribute("class")).toContain("indicator");
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("uses independent alpha masks and connected accessible titles", () => {
|
|
88
|
+
const view = render(() => (
|
|
89
|
+
<>
|
|
90
|
+
<Glyph title="Search" />
|
|
91
|
+
<Glyph />
|
|
92
|
+
</>
|
|
93
|
+
));
|
|
94
|
+
const svg = view.container.querySelectorAll("svg");
|
|
95
|
+
const masks = [...view.container.querySelectorAll("mask")];
|
|
96
|
+
expect(new Set(masks.map((mask) => mask.id)).size).toBe(masks.length);
|
|
97
|
+
expect(masks.every((mask) => mask.style.maskType === "alpha")).toBe(true);
|
|
98
|
+
expect(svg[0].getAttribute("aria-labelledby")).toBe(
|
|
99
|
+
svg[0].querySelector("title")?.id
|
|
100
|
+
);
|
|
101
|
+
expect(svg[1].getAttribute("aria-hidden")).toBe("true");
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("selects supplied bold artwork and preserves inherited filled artwork", () => {
|
|
105
|
+
const [weight, setWeight] = createSignal(2);
|
|
106
|
+
const view = render(() => (
|
|
107
|
+
<Glyph strokeWidth={weight()} fill="currentColor" />
|
|
108
|
+
));
|
|
109
|
+
const images = view.container.querySelectorAll("image");
|
|
110
|
+
expect(images[0].getAttribute("href")).toBe(regular);
|
|
111
|
+
setWeight(3);
|
|
112
|
+
expect(images[0].getAttribute("href")).toBe(bold);
|
|
113
|
+
expect(images[1].getAttribute("href")).toBe(filled);
|
|
114
|
+
expect(view.container.querySelector("svg")?.getAttribute("fill")).toBe(
|
|
115
|
+
"currentColor"
|
|
116
|
+
);
|
|
117
|
+
expect(
|
|
118
|
+
[...view.container.querySelectorAll("rect")].some(
|
|
119
|
+
(rect) => rect.getAttribute("fill") === "inherit"
|
|
120
|
+
)
|
|
121
|
+
).toBe(true);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/// <reference path="./asset-modules.d.ts" />
|
|
2
|
+
import {
|
|
3
|
+
Show,
|
|
4
|
+
createUniqueId,
|
|
5
|
+
splitProps,
|
|
6
|
+
type Component,
|
|
7
|
+
type JSX,
|
|
8
|
+
} from "solid-js";
|
|
9
|
+
|
|
10
|
+
export type IconProps = JSX.SvgSVGAttributes<SVGSVGElement> & {
|
|
11
|
+
size?: number | string;
|
|
12
|
+
transform?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
strokeWidth?: number | string;
|
|
15
|
+
absoluteStrokeWidth?: boolean;
|
|
16
|
+
weight?: "regular" | "bold";
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type ArtworkIconComponent = Component<IconProps>;
|
|
20
|
+
|
|
21
|
+
export type ArtworkSource = string | { readonly image: string };
|
|
22
|
+
|
|
23
|
+
export interface ArtworkVariants {
|
|
24
|
+
bold?: ArtworkSource;
|
|
25
|
+
filled?: ArtworkSource;
|
|
26
|
+
/** Intrinsic source orientation; native SVG transforms remain caller-controlled. */
|
|
27
|
+
rotation?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function ArtworkLayer(props: { source: ArtworkSource; id: string; fill: string }) {
|
|
31
|
+
const imageSource = () => typeof props.source === "string" ? props.source : props.source.image;
|
|
32
|
+
return (
|
|
33
|
+
<Show
|
|
34
|
+
when={typeof props.source !== "string" || props.source.startsWith("data:")}
|
|
35
|
+
fallback={
|
|
36
|
+
<path
|
|
37
|
+
d={typeof props.source === "string" ? props.source : ""}
|
|
38
|
+
fill={props.fill}
|
|
39
|
+
fill-rule="evenodd"
|
|
40
|
+
stroke="none"
|
|
41
|
+
/>
|
|
42
|
+
}
|
|
43
|
+
>
|
|
44
|
+
<defs>
|
|
45
|
+
<mask
|
|
46
|
+
id={props.id}
|
|
47
|
+
x="0"
|
|
48
|
+
y="0"
|
|
49
|
+
width="144"
|
|
50
|
+
height="144"
|
|
51
|
+
maskUnits="userSpaceOnUse"
|
|
52
|
+
style={{ "mask-type": "alpha" }}
|
|
53
|
+
>
|
|
54
|
+
<image href={imageSource()} x="0" y="0" width="144" height="144" />
|
|
55
|
+
</mask>
|
|
56
|
+
</defs>
|
|
57
|
+
<rect
|
|
58
|
+
width="144"
|
|
59
|
+
height="144"
|
|
60
|
+
fill={props.fill}
|
|
61
|
+
stroke="none"
|
|
62
|
+
mask={`url(#${props.id})`}
|
|
63
|
+
/>
|
|
64
|
+
</Show>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function accessibility(props: IconProps, titleId: string) {
|
|
69
|
+
const labelled = Boolean(
|
|
70
|
+
props.title || props["aria-label"] || props["aria-labelledby"]
|
|
71
|
+
);
|
|
72
|
+
return {
|
|
73
|
+
role: props.role ?? (labelled ? "img" : undefined),
|
|
74
|
+
"aria-label": props["aria-label"],
|
|
75
|
+
"aria-labelledby":
|
|
76
|
+
props["aria-labelledby"] ?? (props.title ? titleId : undefined),
|
|
77
|
+
"aria-hidden": props["aria-hidden"] ?? (labelled ? undefined : true),
|
|
78
|
+
} as const;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Render original generated artwork while retaining native SVG component props. */
|
|
82
|
+
export function createArtworkIcon(
|
|
83
|
+
name: string,
|
|
84
|
+
source: ArtworkSource,
|
|
85
|
+
variants: ArtworkVariants = {}
|
|
86
|
+
): ArtworkIconComponent {
|
|
87
|
+
return function ArtworkIcon(props) {
|
|
88
|
+
const [local, rest] = splitProps(props, [
|
|
89
|
+
"size",
|
|
90
|
+
"width",
|
|
91
|
+
"height",
|
|
92
|
+
"title",
|
|
93
|
+
"children",
|
|
94
|
+
"fill",
|
|
95
|
+
"role",
|
|
96
|
+
"aria-hidden",
|
|
97
|
+
"aria-label",
|
|
98
|
+
"aria-labelledby",
|
|
99
|
+
"strokeWidth",
|
|
100
|
+
"stroke-width",
|
|
101
|
+
"absoluteStrokeWidth",
|
|
102
|
+
"weight",
|
|
103
|
+
]);
|
|
104
|
+
const id = `artwork-${createUniqueId()}`;
|
|
105
|
+
const titleId = `${id}-title`;
|
|
106
|
+
const artwork = () => {
|
|
107
|
+
const width = Number(local.strokeWidth ?? local["stroke-width"] ?? 2);
|
|
108
|
+
return variants.bold && (local.weight === "bold" || width >= 2.6)
|
|
109
|
+
? variants.bold
|
|
110
|
+
: source;
|
|
111
|
+
};
|
|
112
|
+
return (
|
|
113
|
+
<svg
|
|
114
|
+
{...rest}
|
|
115
|
+
{...accessibility(local, titleId)}
|
|
116
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
117
|
+
viewBox="0 0 144 144"
|
|
118
|
+
width={local.width ?? local.size ?? 24}
|
|
119
|
+
height={local.height ?? local.size ?? 24}
|
|
120
|
+
fill={local.fill ?? "none"}
|
|
121
|
+
stroke="none"
|
|
122
|
+
data-icon={name}
|
|
123
|
+
>
|
|
124
|
+
<title id={titleId}>{local.title}</title>
|
|
125
|
+
{local.children}
|
|
126
|
+
<g transform={variants.rotation ? `rotate(${variants.rotation} 72 72)` : undefined}>
|
|
127
|
+
<ArtworkLayer source={artwork()} id={id} fill="currentColor" />
|
|
128
|
+
{variants.filled && (
|
|
129
|
+
<ArtworkLayer
|
|
130
|
+
source={variants.filled}
|
|
131
|
+
id={`${id}-filled`}
|
|
132
|
+
fill="inherit"
|
|
133
|
+
/>
|
|
134
|
+
)}
|
|
135
|
+
</g>
|
|
136
|
+
</svg>
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./cloud-download";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./funnel";
|