@kahitsan/ksui 0.47.3 → 0.49.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 +23 -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.test.tsx +15 -0
- package/src/components/composite/VoucherPicker.tsx +18 -8
- package/src/components/composite/resource/ResourcePage.tsx +5 -5
- package/src/icons/README.md +23 -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.ts +2 -0
- package/src/icons/artwork/archive-restore.ts +2 -0
- package/src/icons/artwork/archive.ts +2 -0
- package/src/icons/artwork/arrow-down-left.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/arrow-left.ts +2 -0
- package/src/icons/artwork/arrow-right-left.ts +2 -0
- package/src/icons/artwork/arrow-right.ts +2 -0
- package/src/icons/artwork/arrow-up-down.ts +2 -0
- package/src/icons/artwork/arrow-up-right.ts +2 -0
- package/src/icons/artwork/arrow-up.ts +2 -0
- package/src/icons/artwork/at-sign.ts +2 -0
- package/src/icons/artwork/ban.ts +2 -0
- package/src/icons/artwork/banknote.ts +2 -0
- package/src/icons/artwork/bell.ts +2 -0
- package/src/icons/artwork/blocks.ts +2 -0
- package/src/icons/artwork/book-open.ts +2 -0
- package/src/icons/artwork/boxes.ts +2 -0
- package/src/icons/artwork/briefcase.ts +2 -0
- package/src/icons/artwork/building-2.ts +2 -0
- package/src/icons/artwork/building.ts +2 -0
- package/src/icons/artwork/calculator.ts +2 -0
- package/src/icons/artwork/calendar-clock.ts +2 -0
- package/src/icons/artwork/calendar-days.ts +2 -0
- package/src/icons/artwork/calendar.ts +2 -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-down.ts +2 -0
- package/src/icons/artwork/chevron-left.ts +2 -0
- package/src/icons/artwork/chevron-right.ts +2 -0
- package/src/icons/artwork/chevron-up.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-big.ts +2 -0
- package/src/icons/artwork/circle-check-bold.ts +2 -0
- package/src/icons/artwork/circle-check.ts +2 -0
- package/src/icons/artwork/circle-dot.ts +2 -0
- package/src/icons/artwork/circle-question-mark.ts +2 -0
- package/src/icons/artwork/circle-slash.ts +2 -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.ts +2 -0
- package/src/icons/artwork/cloud-download.ts +2 -0
- package/src/icons/artwork/cloud-upload.ts +2 -0
- package/src/icons/artwork/coins.ts +2 -0
- package/src/icons/artwork/compass.ts +2 -0
- package/src/icons/artwork/copy.ts +2 -0
- package/src/icons/artwork/corner-down-right.ts +2 -0
- package/src/icons/artwork/credit-card.ts +2 -0
- package/src/icons/artwork/crown.ts +2 -0
- package/src/icons/artwork/database.ts +2 -0
- package/src/icons/artwork/dollar-sign.ts +2 -0
- package/src/icons/artwork/door-open.ts +2 -0
- package/src/icons/artwork/download.ts +2 -0
- package/src/icons/artwork/ellipsis-vertical.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.ts +2 -0
- package/src/icons/artwork/file-text.ts +2 -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.ts +2 -0
- package/src/icons/artwork/grip-vertical.ts +2 -0
- package/src/icons/artwork/history.ts +2 -0
- package/src/icons/artwork/house.ts +2 -0
- package/src/icons/artwork/image-off.ts +2 -0
- package/src/icons/artwork/inbox.ts +2 -0
- package/src/icons/artwork/info.ts +2 -0
- package/src/icons/artwork/key-round.ts +2 -0
- package/src/icons/artwork/key.ts +2 -0
- package/src/icons/artwork/landmark.ts +2 -0
- package/src/icons/artwork/layers.ts +2 -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.ts +2 -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.ts +2 -0
- package/src/icons/artwork/panel-left-close.ts +2 -0
- package/src/icons/artwork/panel-left.ts +2 -0
- package/src/icons/artwork/paperclip.ts +2 -0
- package/src/icons/artwork/pause.ts +2 -0
- package/src/icons/artwork/pencil.ts +2 -0
- package/src/icons/artwork/phone-call.ts +2 -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.ts +2 -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/save.ts +2 -0
- package/src/icons/artwork/search.ts +2 -0
- package/src/icons/artwork/settings-2.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.ts +2 -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.ts +2 -0
- package/src/icons/artwork/store.ts +2 -0
- package/src/icons/artwork/sun.ts +2 -0
- package/src/icons/artwork/tag.ts +2 -0
- package/src/icons/artwork/target.ts +2 -0
- package/src/icons/artwork/tax-document.ts +2 -0
- package/src/icons/artwork/ticket.ts +2 -0
- package/src/icons/artwork/timer.ts +2 -0
- package/src/icons/artwork/trash-2.ts +2 -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.ts +2 -0
- package/src/icons/artwork/user-plus.ts +2 -0
- package/src/icons/artwork/user-round.ts +2 -0
- package/src/icons/artwork/user.ts +2 -0
- package/src/icons/artwork/users-round.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.ts +2 -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/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 +4 -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 +94 -0
- package/src/icons/create-artwork-icon.tsx +130 -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 +179 -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 +197 -0
- package/src/icons/rotate-ccw.tsx +4 -0
- package/src/icons/rss.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
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ There are two ways to use KSUI.
|
|
|
32
32
|
own copy.
|
|
33
33
|
|
|
34
34
|
One honest note so nothing surprises you. Every component is self-contained: the
|
|
35
|
-
library depends only on `solid-js` and
|
|
35
|
+
library depends only on `solid-js` and includes original icon artwork and injects its own CSS, so
|
|
36
36
|
there is no host UI kit and no Tailwind to wire up. A handful of components (the
|
|
37
37
|
voucher and payment account pickers, the attachment tiles) call a backend that
|
|
38
38
|
answers certain requests, so they shine inside an app built the KahitSan way, but
|
|
@@ -124,7 +124,7 @@ One thing this library expects from the app around it:
|
|
|
124
124
|
|
|
125
125
|
That is the whole setup. There is no host UI kit, no Tailwind, and no app-provided
|
|
126
126
|
primitives to wire up — every component injects its own CSS and depends only on
|
|
127
|
-
`solid-js`
|
|
127
|
+
`solid-js` and the included original icons. A few components can do *more* when the surrounding
|
|
128
128
|
app feeds them context (a permission check, the active workspace id) through the
|
|
129
129
|
optional `configurePermissions` / `configureActiveWorkspace` helpers, but they
|
|
130
130
|
degrade gracefully when those are not configured.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kahitsan/ksui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.49.0",
|
|
4
|
+
"description": "Standalone SolidJS UI components with original owned icon artwork. Ships source for the consumer compiler and has no runtime dependency beyond solid-js.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
7
7
|
"types": "./src/index.ts",
|
|
@@ -24,7 +24,22 @@
|
|
|
24
24
|
"development": "./src/utils/*.ts",
|
|
25
25
|
"import": "./src/utils/*.ts"
|
|
26
26
|
},
|
|
27
|
-
"./tailwind": "./tailwind.js"
|
|
27
|
+
"./tailwind": "./tailwind.js",
|
|
28
|
+
"./icons": {
|
|
29
|
+
"solid": "./src/icons/index.ts",
|
|
30
|
+
"types": "./src/icons/index.ts",
|
|
31
|
+
"import": "./src/icons/index.ts"
|
|
32
|
+
},
|
|
33
|
+
"./icons/registry": {
|
|
34
|
+
"solid": "./src/icons/registry.ts",
|
|
35
|
+
"types": "./src/icons/registry.ts",
|
|
36
|
+
"import": "./src/icons/registry.ts"
|
|
37
|
+
},
|
|
38
|
+
"./icons/*": {
|
|
39
|
+
"solid": "./src/icons/*.tsx",
|
|
40
|
+
"types": "./src/icons/*.tsx",
|
|
41
|
+
"import": "./src/icons/*.tsx"
|
|
42
|
+
}
|
|
28
43
|
},
|
|
29
44
|
"files": [
|
|
30
45
|
"src",
|
|
@@ -42,10 +57,8 @@
|
|
|
42
57
|
"dev:e2e": "vite --config e2e/vite.config.ts",
|
|
43
58
|
"changeset": "changeset",
|
|
44
59
|
"version": "changeset version",
|
|
45
|
-
"release": "changeset publish"
|
|
46
|
-
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"lucide-solid": "^1.7.0"
|
|
60
|
+
"release": "changeset publish",
|
|
61
|
+
"build:icons": "node scripts/build-icon-assets.mjs"
|
|
49
62
|
},
|
|
50
63
|
"peerDependencies": {
|
|
51
64
|
"solid-js": "^1.9.0",
|
|
@@ -61,7 +74,10 @@
|
|
|
61
74
|
"@playwright/test": "^1.50.0",
|
|
62
75
|
"@solidjs/testing-library": "^0.8.0",
|
|
63
76
|
"jsdom": "^26.0.0",
|
|
77
|
+
"potrace": "^2.1.8",
|
|
78
|
+
"sharp": "^0.35.5",
|
|
64
79
|
"solid-js": "^1.9.0",
|
|
80
|
+
"svgo": "^4.1.0",
|
|
65
81
|
"typescript": "^5.6.0",
|
|
66
82
|
"vite": "^6.0.0",
|
|
67
83
|
"vite-plugin-solid": "^2.11.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fireEvent, render, screen } from "@solidjs/testing-library";
|
|
2
2
|
import { describe, expect, it, vi } from "vitest";
|
|
3
|
-
import Pencil from "
|
|
3
|
+
import Pencil from "../../icons/pencil";
|
|
4
4
|
import ActionMenu, { RowMenu } from "./ActionMenu";
|
|
5
5
|
|
|
6
6
|
const items = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { For, Show, createSignal, createUniqueId, onCleanup, onMount, type Component, type JSX } from "solid-js";
|
|
2
2
|
import { Dynamic, Portal } from "solid-js/web";
|
|
3
|
-
import MoreHorizontal from "
|
|
3
|
+
import MoreHorizontal from "../../icons/more-horizontal";
|
|
4
4
|
import { injectCSS } from "../../utils/inject-css";
|
|
5
5
|
import { usePopoverMount } from "../../utils/modal-layer";
|
|
6
6
|
import { useTopLayer } from "../../utils/top-layer";
|
|
@@ -5,9 +5,9 @@ import { createSignal, onCleanup, onMount, Show } from "solid-js";
|
|
|
5
5
|
import { Portal } from "solid-js/web";
|
|
6
6
|
import { useTopLayer } from "../../utils/top-layer";
|
|
7
7
|
import { usePopoverMount } from "../../utils/modal-layer";
|
|
8
|
-
import Plus from "
|
|
9
|
-
import Camera from "
|
|
10
|
-
import FileIcon from "
|
|
8
|
+
import Plus from "../../icons/plus";
|
|
9
|
+
import Camera from "../../icons/camera";
|
|
10
|
+
import FileIcon from "../../icons/file";
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
13
|
uploading: boolean;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import { createSignal, onCleanup, onMount, Show } from "solid-js";
|
|
5
5
|
import Button from "./Button";
|
|
6
|
-
import Camera from "
|
|
7
|
-
import X from "
|
|
6
|
+
import Camera from "../../icons/camera";
|
|
7
|
+
import X from "../../icons/x";
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
10
|
onCapture: (file: File) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSignal, onCleanup, type JSX } from "solid-js";
|
|
2
|
-
import Copy from "
|
|
3
|
-
import Check from "
|
|
2
|
+
import Copy from "../../icons/copy";
|
|
3
|
+
import Check from "../../icons/check";
|
|
4
4
|
|
|
5
5
|
interface CopyButtonProps {
|
|
6
6
|
/** The text written to the clipboard on click. Caller owns the value. */
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// names. Surface / border / accent colors read from CSS custom properties
|
|
12
12
|
// (`--ksui-dt-*`) with the host's dark zinc + amber values as fallbacks, so a
|
|
13
13
|
// consumer can retint without forking. The component depends only on solid-js +
|
|
14
|
-
//
|
|
14
|
+
// owned icons plus ksui's own DatePicker — the same self-contained calendar
|
|
15
15
|
// popover the host DataTable used for its date filter (single + range), so the
|
|
16
16
|
// library carries no host primitive and no native `<input type="date">`.
|
|
17
17
|
//
|
|
@@ -38,13 +38,13 @@ import {
|
|
|
38
38
|
type JSX,
|
|
39
39
|
type ParentComponent,
|
|
40
40
|
} from "solid-js";
|
|
41
|
-
import Search from "
|
|
42
|
-
import Filter from "
|
|
43
|
-
import ChevronLeft from "
|
|
44
|
-
import ChevronRight from "
|
|
45
|
-
import ChevronDown from "
|
|
46
|
-
import ChevronUp from "
|
|
47
|
-
import ChevronsUpDown from "
|
|
41
|
+
import Search from "../../icons/search";
|
|
42
|
+
import Filter from "../../icons/filter";
|
|
43
|
+
import ChevronLeft from "../../icons/chevron-left";
|
|
44
|
+
import ChevronRight from "../../icons/chevron-right";
|
|
45
|
+
import ChevronDown from "../../icons/chevron-down";
|
|
46
|
+
import ChevronUp from "../../icons/chevron-up";
|
|
47
|
+
import ChevronsUpDown from "../../icons/chevrons-up-down";
|
|
48
48
|
import DatePicker from "./DatePicker";
|
|
49
49
|
import { injectCSS } from "../../utils/inject-css";
|
|
50
50
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// fallback after each `var(...)` is the host's exact zinc + amber value.
|
|
16
16
|
//
|
|
17
17
|
// The host's `DatePickerURLSync` child (which read `?date=` via @solidjs/router)
|
|
18
|
-
// is intentionally dropped: ksui depends only on solid-js
|
|
18
|
+
// is intentionally dropped: ksui depends only on solid-js and owned icon artwork, never
|
|
19
19
|
// the router. Callers that want URL persistence wire it from the outside.
|
|
20
20
|
|
|
21
21
|
import {
|
|
@@ -29,11 +29,11 @@ import {
|
|
|
29
29
|
onCleanup,
|
|
30
30
|
} from "solid-js";
|
|
31
31
|
import { Portal } from "solid-js/web";
|
|
32
|
-
import Calendar from "
|
|
33
|
-
import ChevronLeft from "
|
|
34
|
-
import ChevronRight from "
|
|
35
|
-
import Clock from "
|
|
36
|
-
import X from "
|
|
32
|
+
import Calendar from "../../icons/calendar";
|
|
33
|
+
import ChevronLeft from "../../icons/chevron-left";
|
|
34
|
+
import ChevronRight from "../../icons/chevron-right";
|
|
35
|
+
import Clock from "../../icons/clock";
|
|
36
|
+
import X from "../../icons/x";
|
|
37
37
|
import {
|
|
38
38
|
parseDateInput,
|
|
39
39
|
formatDateDisplay,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createSignal, For, onCleanup, onMount, Show, type Component, type JSX } from "solid-js";
|
|
2
2
|
import { Dynamic } from "solid-js/web";
|
|
3
|
-
import ChevronDown from "
|
|
3
|
+
import ChevronDown from "../../icons/chevron-down";
|
|
4
4
|
|
|
5
|
-
/** A
|
|
5
|
+
/** A owned icons icon component (or any component taking size/class). */
|
|
6
6
|
type IconComponent = Component<{ size?: number; class?: string }>;
|
|
7
7
|
|
|
8
8
|
/** The status of a dropdown item, used to render a small leading colored dot
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
// ignored for rendering; a spinner shows while the bytes stream.
|
|
12
12
|
|
|
13
13
|
import { Show, createEffect, createSignal, onCleanup, type Component } from "solid-js";
|
|
14
|
-
import Paperclip from "
|
|
15
|
-
import X from "
|
|
16
|
-
import TriangleAlert from "
|
|
17
|
-
import Loader2 from "
|
|
14
|
+
import Paperclip from "../../icons/paperclip";
|
|
15
|
+
import X from "../../icons/x";
|
|
16
|
+
import TriangleAlert from "../../icons/triangle-alert";
|
|
17
|
+
import Loader2 from "../../icons/loader-2";
|
|
18
18
|
import { confirm } from "../../utils/confirm";
|
|
19
19
|
import { attachmentUrl, isResolvableAttachment } from "../../utils/attachments";
|
|
20
20
|
import ImageViewer from "./ImageViewer";
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { createSignal, onCleanup, onMount, Show } from "solid-js";
|
|
11
11
|
import Modal from "./Modal";
|
|
12
12
|
import Button from "./Button";
|
|
13
|
-
import X from "
|
|
13
|
+
import X from "../../icons/x";
|
|
14
14
|
|
|
15
15
|
interface ImageCropperProps {
|
|
16
16
|
file: File;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// (wrap in `<Show when={…}>`).
|
|
15
15
|
|
|
16
16
|
import { createSignal, onCleanup, onMount } from "solid-js";
|
|
17
|
-
import X from "
|
|
17
|
+
import X from "../../icons/x";
|
|
18
18
|
import { lockPullToRefresh, unlockPullToRefresh } from "../../utils/dom";
|
|
19
19
|
import { injectCSS } from "../../utils/inject-css";
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { For, createMemo, createUniqueId, type JSX } from "solid-js";
|
|
2
|
-
import ChevronLeft from "
|
|
3
|
-
import ChevronRight from "
|
|
2
|
+
import ChevronLeft from "../../icons/chevron-left";
|
|
3
|
+
import ChevronRight from "../../icons/chevron-right";
|
|
4
4
|
import { injectCSS } from "../../utils/inject-css";
|
|
5
5
|
import {
|
|
6
6
|
addCivilMonths,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Source: archive/pillar app/pillar-ui/base/ProgressBar/ProgressBar.tsx
|
|
2
2
|
// Ported into the library so the counter cards can reuse the same realtime
|
|
3
3
|
// progress visualization the session manager uses on the home page.
|
|
4
|
-
// Adapted to the library's TS +
|
|
4
|
+
// Adapted to the library's TS + shared icon conventions.
|
|
5
5
|
|
|
6
6
|
import type { Component, JSX } from "solid-js";
|
|
7
7
|
import { createMemo, splitProps, Show } from "solid-js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { render, fireEvent } from "@solidjs/testing-library";
|
|
3
|
-
import List from "
|
|
3
|
+
import List from "../../icons/list";
|
|
4
4
|
import SegmentedFilter, { type SegmentedFilterOption } from "./SegmentedFilter";
|
|
5
5
|
|
|
6
6
|
// Back-compat: bare-string options are still accepted alongside the object
|
|
@@ -2,13 +2,13 @@ import { For, type Component, type JSX } from "solid-js";
|
|
|
2
2
|
import { injectCSS } from "../../utils/inject-css";
|
|
3
3
|
|
|
4
4
|
/** Icon component shape: any component that accepts a numeric `size`
|
|
5
|
-
* (
|
|
5
|
+
* (owned icons satisfy this, as does any custom SVG component). */
|
|
6
6
|
export type SocialIcon = Component<{ size?: number }>;
|
|
7
7
|
|
|
8
8
|
export interface SocialLink {
|
|
9
9
|
/** Destination URL. Opened in a new tab with rel="noopener noreferrer". */
|
|
10
10
|
href: string;
|
|
11
|
-
/** Icon component rendered inside the button (e.g.
|
|
11
|
+
/** Icon component rendered inside the button (e.g. an owned icon). */
|
|
12
12
|
icon: SocialIcon;
|
|
13
13
|
/** Accessible label, used for `aria-label` and `title`. */
|
|
14
14
|
label: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// + its CSS in src/assets/css/button.css (.ks-theme-toggle*).
|
|
3
3
|
// Extracted as a domain-free, controlled primitive: the theme state is lifted
|
|
4
4
|
// to props (`value` + `onToggle`) so it carries no dependency on kahitsan's
|
|
5
|
-
// ~/lib/theme. Only solid-js
|
|
5
|
+
// ~/lib/theme. Only solid-js and owned icon artwork.
|
|
6
6
|
//
|
|
7
7
|
// ksui ships no sibling .css and no sidecar CSS in the published package, so
|
|
8
8
|
// the custom track/thumb/icon styles (transitions, the sliding ::after thumb)
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
import type { JSX } from "solid-js";
|
|
13
13
|
import { splitProps } from "solid-js";
|
|
14
|
-
import Sun from "
|
|
15
|
-
import Moon from "
|
|
14
|
+
import Sun from "../../icons/sun";
|
|
15
|
+
import Moon from "../../icons/moon";
|
|
16
16
|
import { injectCSS } from "../../utils/inject-css";
|
|
17
17
|
|
|
18
18
|
const THEME_TOGGLE_STYLE_ID = "ks-theme-toggle-inline-style";
|
|
@@ -24,11 +24,11 @@ import { createEffect, createSignal, For, onCleanup, onMount, Show, type JSX } f
|
|
|
24
24
|
import { useTopLayer } from "../../utils/top-layer";
|
|
25
25
|
import { usePopoverMount } from "../../utils/modal-layer";
|
|
26
26
|
import { highlightMatch } from "../../utils/highlight";
|
|
27
|
-
import UserPlus from "
|
|
28
|
-
import Search from "
|
|
29
|
-
import Star from "
|
|
30
|
-
import X from "
|
|
31
|
-
import Loader2 from "
|
|
27
|
+
import UserPlus from "../../icons/user-plus";
|
|
28
|
+
import Search from "../../icons/search";
|
|
29
|
+
import Star from "../../icons/star";
|
|
30
|
+
import X from "../../icons/x";
|
|
31
|
+
import Loader2 from "../../icons/loader-2";
|
|
32
32
|
import { createPickerPopup } from "./picker-engine";
|
|
33
33
|
|
|
34
34
|
interface ComboBoxCommonProps<T> {
|
|
@@ -48,7 +48,7 @@ interface ComboBoxCommonProps<T> {
|
|
|
48
48
|
/** Optional muted secondary line under the label in results. */
|
|
49
49
|
secondaryOf?: (item: T) => string | null;
|
|
50
50
|
|
|
51
|
-
/** Leading icon component
|
|
51
|
+
/** Leading icon component, e.g. Store / UserRound. */
|
|
52
52
|
icon: (p: { size?: number; class?: string }) => JSX.Element;
|
|
53
53
|
/** Singular noun for UI copy: "payee", "client". */
|
|
54
54
|
noun: string;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { Component } from "solid-js";
|
|
11
11
|
import { Show, createMemo } from "solid-js";
|
|
12
12
|
import { Dynamic } from "solid-js/web";
|
|
13
|
-
import AlertTriangle from "
|
|
13
|
+
import AlertTriangle from "../../icons/triangle-alert";
|
|
14
14
|
import {
|
|
15
15
|
getRenderer,
|
|
16
16
|
validateConsumes,
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
import type { Component, JSX } from "solid-js";
|
|
17
17
|
import { Match, Show, Switch, createSignal } from "solid-js";
|
|
18
|
-
import UploadCloud from "
|
|
19
|
-
import FileIcon from "
|
|
20
|
-
import ImageOff from "
|
|
21
|
-
import X from "
|
|
18
|
+
import UploadCloud from "../../icons/cloud-upload";
|
|
19
|
+
import FileIcon from "../../icons/file";
|
|
20
|
+
import ImageOff from "../../icons/image-off";
|
|
21
|
+
import X from "../../icons/x";
|
|
22
22
|
import { injectCSS } from "../../utils/inject-css";
|
|
23
23
|
|
|
24
24
|
/** The opaque asset handle the field stores as its value (§11). */
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
import type { Component, JSX } from "solid-js";
|
|
15
15
|
import { Dynamic } from "solid-js/web";
|
|
16
16
|
import { For, Show, createEffect, createMemo, createSignal } from "solid-js";
|
|
17
|
-
import Database from "
|
|
18
|
-
import MousePointerClick from "
|
|
19
|
-
import AppWindow from "
|
|
20
|
-
import DownloadCloud from "
|
|
21
|
-
import ArrowLeftRight from "
|
|
22
|
-
import Calculator from "
|
|
23
|
-
import GitBranch from "
|
|
24
|
-
import Save from "
|
|
25
|
-
import Radio from "
|
|
26
|
-
import Sparkles from "
|
|
27
|
-
import CircleCheck from "
|
|
28
|
-
import Circle from "
|
|
17
|
+
import Database from "../../icons/database";
|
|
18
|
+
import MousePointerClick from "../../icons/mouse-pointer-click";
|
|
19
|
+
import AppWindow from "../../icons/app-window";
|
|
20
|
+
import DownloadCloud from "../../icons/download-cloud";
|
|
21
|
+
import ArrowLeftRight from "../../icons/arrow-left-right";
|
|
22
|
+
import Calculator from "../../icons/calculator";
|
|
23
|
+
import GitBranch from "../../icons/git-branch";
|
|
24
|
+
import Save from "../../icons/save";
|
|
25
|
+
import Radio from "../../icons/radio";
|
|
26
|
+
import Sparkles from "../../icons/sparkles";
|
|
27
|
+
import CircleCheck from "../../icons/circle-check-big";
|
|
28
|
+
import Circle from "../../icons/circle";
|
|
29
29
|
import {
|
|
30
30
|
layoutGraph,
|
|
31
31
|
type GraphDirection,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// are a verbatim subset of TransactionFormProps.
|
|
7
7
|
|
|
8
8
|
import { For, Show } from "solid-js";
|
|
9
|
-
import Lock from "
|
|
9
|
+
import Lock from "../../icons/lock";
|
|
10
10
|
import FormField from "../base/FormField";
|
|
11
11
|
import SegmentedFilter from "../base/SegmentedFilter";
|
|
12
12
|
import { formatPHP } from "../../utils/formatPHP";
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
import type { Component, JSX } from "solid-js";
|
|
8
8
|
import { Show, createMemo, createSignal, onCleanup, splitProps } from "solid-js";
|
|
9
|
-
import Clock from "
|
|
10
|
-
import Play from "
|
|
11
|
-
import AlertTriangle from "
|
|
12
|
-
import Check from "
|
|
13
|
-
import Calendar from "
|
|
9
|
+
import Clock from "../../icons/clock";
|
|
10
|
+
import Play from "../../icons/play";
|
|
11
|
+
import AlertTriangle from "../../icons/triangle-alert";
|
|
12
|
+
import Check from "../../icons/check";
|
|
13
|
+
import Calendar from "../../icons/calendar";
|
|
14
14
|
import ProgressBar, { type ProgressColor } from "../base/ProgressBar";
|
|
15
15
|
|
|
16
16
|
export interface LiveTimerProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "class"> {
|
|
@@ -10,8 +10,8 @@ import { Portal } from "solid-js/web";
|
|
|
10
10
|
import { useTopLayer } from "../../utils/top-layer";
|
|
11
11
|
import { usePopoverMount } from "../../utils/modal-layer";
|
|
12
12
|
import { createEffect, createSignal, createUniqueId, For, onCleanup, onMount, Show, type JSX } from "solid-js";
|
|
13
|
-
import UserRound from "
|
|
14
|
-
import Loader2 from "
|
|
13
|
+
import UserRound from "../../icons/user-round";
|
|
14
|
+
import Loader2 from "../../icons/loader-2";
|
|
15
15
|
|
|
16
16
|
const POPUP_MAX_HEIGHT = 240;
|
|
17
17
|
const POPUP_MIN_WIDTH = 280;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createMemo, createSignal, For, Show, type JSX } from "solid-js";
|
|
2
2
|
import { Portal } from "solid-js/web";
|
|
3
|
-
import CalendarDays from "
|
|
4
|
-
import ChevronDown from "
|
|
5
|
-
import ChevronLeft from "
|
|
6
|
-
import ChevronRight from "
|
|
7
|
-
import X from "
|
|
3
|
+
import CalendarDays from "../../icons/calendar-days";
|
|
4
|
+
import ChevronDown from "../../icons/chevron-down";
|
|
5
|
+
import ChevronLeft from "../../icons/chevron-left";
|
|
6
|
+
import ChevronRight from "../../icons/chevron-right";
|
|
7
|
+
import X from "../../icons/x";
|
|
8
8
|
import { injectCSS } from "../../utils/inject-css";
|
|
9
9
|
|
|
10
10
|
export type MultiPeriodGranularity = "day" | "week" | "month" | "year";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// is hard-coded.
|
|
6
6
|
//
|
|
7
7
|
// Unlike the host-owned Button, this is a standalone primitive: it imports only
|
|
8
|
-
// solid-js and
|
|
8
|
+
// solid-js and owned icons, never the host UI kit or a router. The default
|
|
9
9
|
// action renders a plain, self-styled button. Navigation is left to the caller
|
|
10
10
|
// via `onButtonClick` (or `href`, which renders an anchor instead). Callers who
|
|
11
11
|
// want the host Button can pass it through the `action` slot, which fully
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import type { JSX } from "solid-js";
|
|
15
15
|
import { Show, splitProps } from "solid-js";
|
|
16
|
-
import { ArrowLeft } from "
|
|
16
|
+
import { ArrowLeft } from "../../icons/index";
|
|
17
17
|
|
|
18
18
|
export interface NotFoundProps
|
|
19
19
|
extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
Show,
|
|
12
12
|
type JSX,
|
|
13
13
|
} from "solid-js";
|
|
14
|
-
import Banknote from "
|
|
15
|
-
import Loader2 from "
|
|
14
|
+
import Banknote from "../../icons/banknote";
|
|
15
|
+
import Loader2 from "../../icons/loader-2";
|
|
16
16
|
import AccountAvatar from "../base/AccountAvatar";
|
|
17
17
|
|
|
18
18
|
export interface PaymentAccountOption {
|
|
@@ -18,8 +18,8 @@ import ComboBox from "./ComboBox";
|
|
|
18
18
|
import type { ClientOption } from "./picker-types";
|
|
19
19
|
import VoucherPicker, { calculateDiscount } from "./VoucherPicker";
|
|
20
20
|
import type { VoucherOption } from "./VoucherPicker";
|
|
21
|
-
import UserRound from "
|
|
22
|
-
import Plus from "
|
|
21
|
+
import UserRound from "../../icons/user-round";
|
|
22
|
+
import Plus from "../../icons/plus";
|
|
23
23
|
|
|
24
24
|
// Client data-wiring for the generic ComboBox engine. Search/create hit the
|
|
25
25
|
// host app's /api/clients endpoint directly. Degrades gracefully when that
|
|
@@ -61,9 +61,9 @@ async function createClient(name: string): Promise<ClientOption> {
|
|
|
61
61
|
function clientSecondary(c: ClientOption): string | null {
|
|
62
62
|
return [c.email, c.phone].filter(Boolean).join(" · ") || null;
|
|
63
63
|
}
|
|
64
|
-
import Minus from "
|
|
65
|
-
import Trash2 from "
|
|
66
|
-
import PackageIcon from "
|
|
64
|
+
import Minus from "../../icons/minus";
|
|
65
|
+
import Trash2 from "../../icons/trash-2";
|
|
66
|
+
import PackageIcon from "../../icons/package";
|
|
67
67
|
|
|
68
68
|
interface Variant {
|
|
69
69
|
id: number;
|
|
@@ -2,8 +2,8 @@ import { createEffect, createMemo, createSignal, For, onCleanup, Show, type JSX
|
|
|
2
2
|
import { Portal } from "solid-js/web";
|
|
3
3
|
import { useTopLayer } from "../../utils/top-layer";
|
|
4
4
|
import { usePopoverMount } from "../../utils/modal-layer";
|
|
5
|
-
import ChevronsUpDown from "
|
|
6
|
-
import X from "
|
|
5
|
+
import ChevronsUpDown from "../../icons/chevrons-up-down";
|
|
6
|
+
import X from "../../icons/x";
|
|
7
7
|
|
|
8
8
|
export interface SearchableOption {
|
|
9
9
|
value: string | number;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import type { Component } from "solid-js";
|
|
9
9
|
import { Show, createSignal, splitProps } from "solid-js";
|
|
10
|
-
import Copy from "
|
|
10
|
+
import Copy from "../../icons/copy";
|
|
11
11
|
|
|
12
12
|
export interface SecretRevealProps {
|
|
13
13
|
/** The secret string to display and copy. */
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
// value and never needs EWT/sharing (e.g. a "record my own expense" surface).
|
|
9
9
|
|
|
10
10
|
import { batch, createEffect, createSignal, Show, For } from "solid-js";
|
|
11
|
-
import X from "
|
|
12
|
-
import Upload from "
|
|
13
|
-
import FileIcon from "
|
|
14
|
-
import CalendarDays from "
|
|
15
|
-
import Paperclip from "
|
|
16
|
-
import Store from "
|
|
17
|
-
import ArrowDownLeft from "
|
|
18
|
-
import ArrowUpRight from "
|
|
19
|
-
import ArrowRightLeft from "
|
|
11
|
+
import X from "../../icons/x";
|
|
12
|
+
import Upload from "../../icons/upload";
|
|
13
|
+
import FileIcon from "../../icons/file";
|
|
14
|
+
import CalendarDays from "../../icons/calendar-days";
|
|
15
|
+
import Paperclip from "../../icons/paperclip";
|
|
16
|
+
import Store from "../../icons/store";
|
|
17
|
+
import ArrowDownLeft from "../../icons/arrow-down-left";
|
|
18
|
+
import ArrowUpRight from "../../icons/arrow-up-right";
|
|
19
|
+
import ArrowRightLeft from "../../icons/arrow-right-left";
|
|
20
20
|
|
|
21
21
|
import FormAdvancedSection from "./FormAdvancedSection";
|
|
22
22
|
import SalesBodyEditor, { type SalesLine } from "./SalesBodyEditor";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { For, Show } from "solid-js";
|
|
2
|
-
import CalendarDays from "
|
|
2
|
+
import CalendarDays from "../../icons/calendar-days";
|
|
3
3
|
import FormField from "../base/FormField";
|
|
4
4
|
import DatePicker from "../base/DatePicker";
|
|
5
5
|
import SegmentedFilter from "../base/SegmentedFilter";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Show, type JSX } from "solid-js";
|
|
2
|
-
import ArrowRightLeft from "
|
|
3
|
-
import Plus from "
|
|
2
|
+
import ArrowRightLeft from "../../icons/arrow-right-left";
|
|
3
|
+
import Plus from "../../icons/plus";
|
|
4
4
|
import AccountAvatar from "../base/AccountAvatar";
|
|
5
5
|
import FormField from "../base/FormField";
|
|
6
6
|
import AccountRadioPicker from "./AccountRadioPicker";
|
|
@@ -720,3 +720,18 @@ describe("VoucherPicker dialog", () => {
|
|
|
720
720
|
document.removeEventListener("keydown", ancestorEsc);
|
|
721
721
|
});
|
|
722
722
|
});
|
|
723
|
+
|
|
724
|
+
describe("VoucherPicker applyOnSelect", () => {
|
|
725
|
+
it("applies on tap, closes, and shows no Apply footer", async () => {
|
|
726
|
+
mockPagedFetch([voucher({ id: 1, code: "TAP_ME" })]);
|
|
727
|
+
const onChange = vi.fn();
|
|
728
|
+
const { getByTestId, queryByTestId, findByTestId } = render(() => (
|
|
729
|
+
<VoucherPicker selected={null} onChange={onChange} subtotal={100} packageIds={[]} applyOnSelect />
|
|
730
|
+
));
|
|
731
|
+
fireEvent.click(getByTestId("voucher-picker-trigger"));
|
|
732
|
+
expect(queryByTestId("voucher-picker-confirm")).toBeNull();
|
|
733
|
+
fireEvent.click(await findByTestId("voucher-picker-result-1"));
|
|
734
|
+
expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ id: 1 }));
|
|
735
|
+
await waitFor(() => expect(queryByTestId("voucher-picker-popup")).toBeNull());
|
|
736
|
+
});
|
|
737
|
+
});
|