@krizaka/ui 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-feed.d.ts +199 -0
- package/dist/activity-feed.js +155 -0
- package/dist/activity-feed.js.map +1 -0
- package/dist/argument-card.js +3 -3
- package/dist/{chunk-I5RVM5CW.js → chunk-2FRWNSRO.js} +2 -6
- package/dist/chunk-2FRWNSRO.js.map +1 -0
- package/dist/chunk-7Z4KHPFC.js +42 -0
- package/dist/chunk-7Z4KHPFC.js.map +1 -0
- package/dist/chunk-BTMFZ66D.js +135 -0
- package/dist/chunk-BTMFZ66D.js.map +1 -0
- package/dist/chunk-C2BRIFJG.js +13 -0
- package/dist/chunk-C2BRIFJG.js.map +1 -0
- package/dist/chunk-KDXRYUD3.js +39 -0
- package/dist/chunk-KDXRYUD3.js.map +1 -0
- package/dist/{chunk-2PUDI7JS.js → chunk-ZKVQGXLD.js} +5 -3
- package/dist/{chunk-2PUDI7JS.js.map → chunk-ZKVQGXLD.js.map} +1 -1
- package/dist/command.js +1 -1
- package/dist/confirm-button.js +1 -1
- package/dist/data-table.js +101 -133
- package/dist/data-table.js.map +1 -1
- package/dist/date-picker.d.ts +3 -1
- package/dist/date-picker.js +13 -13
- package/dist/date-picker.js.map +1 -1
- package/dist/description-list.d.ts +105 -0
- package/dist/description-list.js +49 -0
- package/dist/description-list.js.map +1 -0
- package/dist/dropdown-menu.js +1 -1
- package/dist/filter-bar.js +3 -2
- package/dist/form.d.ts +23 -12
- package/dist/form.js +11 -47
- package/dist/form.js.map +1 -1
- package/dist/glow-card.js +1 -1
- package/dist/image-cropper.js +3 -1
- package/dist/image-cropper.js.map +1 -1
- package/dist/index.js +13 -66
- package/dist/index.js.map +1 -1
- package/dist/kanban.d.ts +132 -0
- package/dist/kanban.js +187 -0
- package/dist/kanban.js.map +1 -0
- package/dist/list.d.ts +153 -0
- package/dist/list.js +130 -0
- package/dist/list.js.map +1 -0
- package/dist/map.d.ts +463 -0
- package/dist/map.js +952 -0
- package/dist/map.js.map +1 -0
- package/dist/marquee.js +1 -1
- package/dist/motion.css +12 -1
- package/dist/native/form.d.ts +60 -15
- package/dist/native/form.js +103 -42
- package/dist/native/form.js.map +1 -1
- package/dist/native/map.d.ts +200 -0
- package/dist/native/map.js +673 -0
- package/dist/native/map.js.map +1 -0
- package/dist/native/media-picker.d.ts +58 -0
- package/dist/native/media-picker.js +63 -0
- package/dist/native/media-picker.js.map +1 -0
- package/dist/native.d.ts +772 -6
- package/dist/native.js +2493 -741
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.js +1 -1
- package/dist/page-hero.js +3 -3
- package/dist/popover.js +1 -1
- package/dist/radio-group.d.ts +66 -32
- package/dist/radio-group.js +54 -10
- package/dist/radio-group.js.map +1 -1
- package/dist/slider.d.ts +96 -35
- package/dist/slider.js +67 -13
- package/dist/slider.js.map +1 -1
- package/dist/stat.d.ts +31 -2
- package/dist/stat.js +21 -4
- package/dist/stat.js.map +1 -1
- package/dist/terminal-replay.js +34 -60
- package/dist/terminal-replay.js.map +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/tree-view.d.ts +111 -0
- package/dist/tree-view.js +154 -0
- package/dist/tree-view.js.map +1 -0
- package/dist/video-player.js +3 -1
- package/dist/video-player.js.map +1 -1
- package/package.json +148 -11
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/action-sheet.json +121 -0
- package/registry/activity-feed.json +468 -0
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +58 -3
- package/registry/badge.json +1 -1
- package/registry/button.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +226 -4
- package/registry/command.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +18 -4
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +232 -0
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +75 -4
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/action-sheet/native/video-actions.d.ts +4 -0
- package/registry/examples/action-sheet/native/video-actions.dark.png +0 -0
- package/registry/examples/action-sheet/native/video-actions.js +30 -0
- package/registry/examples/action-sheet/native/video-actions.light.png +0 -0
- package/registry/examples/action-sheet/native/video-actions.tsx +24 -0
- package/registry/examples/activity-feed/job-activity.d.ts +4 -0
- package/registry/examples/activity-feed/job-activity.js +21 -0
- package/registry/examples/activity-feed/job-activity.tsx +17 -0
- package/registry/examples/activity-feed/live.d.ts +4 -0
- package/registry/examples/activity-feed/live.js +23 -0
- package/registry/examples/activity-feed/live.tsx +24 -0
- package/registry/examples/activity-feed/native/notifications.d.ts +4 -0
- package/registry/examples/activity-feed/native/notifications.dark.png +0 -0
- package/registry/examples/activity-feed/native/notifications.js +18 -0
- package/registry/examples/activity-feed/native/notifications.light.png +0 -0
- package/registry/examples/activity-feed/native/notifications.tsx +18 -0
- package/registry/examples/activity-feed/timeline.d.ts +4 -0
- package/registry/examples/activity-feed/timeline.js +25 -0
- package/registry/examples/activity-feed/timeline.tsx +19 -0
- package/registry/examples/avatar/native/presence.d.ts +4 -0
- package/registry/examples/avatar/native/presence.dark.png +0 -0
- package/registry/examples/avatar/native/presence.js +18 -0
- package/registry/examples/avatar/native/presence.light.png +0 -0
- package/registry/examples/avatar/native/presence.tsx +15 -0
- package/registry/examples/combobox/native/multiple.d.ts +4 -0
- package/registry/examples/combobox/native/multiple.dark.png +0 -0
- package/registry/examples/combobox/native/multiple.js +15 -0
- package/registry/examples/combobox/native/multiple.light.png +0 -0
- package/registry/examples/combobox/native/multiple.tsx +15 -0
- package/registry/examples/combobox/native/search.d.ts +4 -0
- package/registry/examples/combobox/native/search.dark.png +0 -0
- package/registry/examples/combobox/native/search.js +15 -0
- package/registry/examples/combobox/native/search.light.png +0 -0
- package/registry/examples/combobox/native/search.tsx +15 -0
- package/registry/examples/description-list/job-details.d.ts +4 -0
- package/registry/examples/description-list/job-details.js +23 -0
- package/registry/examples/description-list/job-details.tsx +17 -0
- package/registry/examples/description-list/key-value-grid.d.ts +4 -0
- package/registry/examples/description-list/key-value-grid.js +22 -0
- package/registry/examples/description-list/key-value-grid.tsx +16 -0
- package/registry/examples/description-list/native/job-details.d.ts +4 -0
- package/registry/examples/description-list/native/job-details.dark.png +0 -0
- package/registry/examples/description-list/native/job-details.js +33 -0
- package/registry/examples/description-list/native/job-details.light.png +0 -0
- package/registry/examples/description-list/native/job-details.tsx +24 -0
- package/registry/examples/description-list/receipt.d.ts +4 -0
- package/registry/examples/description-list/receipt.js +23 -0
- package/registry/examples/description-list/receipt.tsx +17 -0
- package/registry/examples/dialog/native/sheet.d.ts +4 -0
- package/registry/examples/dialog/native/sheet.dark.png +0 -0
- package/registry/examples/dialog/native/sheet.js +21 -0
- package/registry/examples/dialog/native/sheet.light.png +0 -0
- package/registry/examples/dialog/native/sheet.tsx +18 -0
- package/registry/examples/fab/native/extended.d.ts +4 -0
- package/registry/examples/fab/native/extended.dark.png +0 -0
- package/registry/examples/fab/native/extended.js +18 -0
- package/registry/examples/fab/native/extended.light.png +0 -0
- package/registry/examples/fab/native/extended.tsx +23 -0
- package/registry/examples/field/native/select.d.ts +4 -0
- package/registry/examples/field/native/select.dark.png +0 -0
- package/registry/examples/field/native/select.js +29 -0
- package/registry/examples/field/native/select.light.png +0 -0
- package/registry/examples/field/native/select.tsx +25 -0
- package/registry/examples/form/native/audience.dark.png +0 -0
- package/registry/examples/form/native/audience.light.png +0 -0
- package/registry/examples/form/native/profile.dark.png +0 -0
- package/registry/examples/form/native/profile.light.png +0 -0
- package/registry/examples/form/native/settings.dark.png +0 -0
- package/registry/examples/form/native/settings.light.png +0 -0
- package/registry/examples/form/native/sign-up.dark.png +0 -0
- package/registry/examples/form/native/sign-up.light.png +0 -0
- package/registry/examples/form/native/upload.dark.png +0 -0
- package/registry/examples/form/native/upload.light.png +0 -0
- package/registry/examples/header/native/large-title.d.ts +4 -0
- package/registry/examples/header/native/large-title.dark.png +0 -0
- package/registry/examples/header/native/large-title.js +23 -0
- package/registry/examples/header/native/large-title.light.png +0 -0
- package/registry/examples/header/native/large-title.tsx +31 -0
- package/registry/examples/image-viewer/native/gallery.d.ts +4 -0
- package/registry/examples/image-viewer/native/gallery.dark.png +0 -0
- package/registry/examples/image-viewer/native/gallery.js +22 -0
- package/registry/examples/image-viewer/native/gallery.light.png +0 -0
- package/registry/examples/image-viewer/native/gallery.tsx +21 -0
- package/registry/examples/kanban/moderation.d.ts +4 -0
- package/registry/examples/kanban/moderation.js +35 -0
- package/registry/examples/kanban/moderation.tsx +37 -0
- package/registry/examples/list/jobs.d.ts +4 -0
- package/registry/examples/list/jobs.js +35 -0
- package/registry/examples/list/jobs.tsx +33 -0
- package/registry/examples/list/selectable.d.ts +4 -0
- package/registry/examples/list/selectable.js +33 -0
- package/registry/examples/list/selectable.tsx +30 -0
- package/registry/examples/list/virtualized.d.ts +4 -0
- package/registry/examples/list/virtualized.js +22 -0
- package/registry/examples/list/virtualized.tsx +17 -0
- package/registry/examples/loader/native/block.d.ts +4 -0
- package/registry/examples/loader/native/block.dark.png +0 -0
- package/registry/examples/loader/native/block.js +12 -0
- package/registry/examples/loader/native/block.light.png +0 -0
- package/registry/examples/loader/native/block.tsx +11 -0
- package/registry/examples/loader/native/job-wait.d.ts +4 -0
- package/registry/examples/loader/native/job-wait.dark.png +0 -0
- package/registry/examples/loader/native/job-wait.js +17 -0
- package/registry/examples/loader/native/job-wait.light.png +0 -0
- package/registry/examples/loader/native/job-wait.tsx +14 -0
- package/registry/examples/map/cluster.d.ts +4 -0
- package/registry/examples/map/cluster.js +16 -0
- package/registry/examples/map/cluster.tsx +18 -0
- package/registry/examples/map/location-picker.d.ts +4 -0
- package/registry/examples/map/location-picker.js +24 -0
- package/registry/examples/map/location-picker.tsx +22 -0
- package/registry/examples/map/native/location-picker.d.ts +4 -0
- package/registry/examples/map/native/location-picker.dark.png +0 -0
- package/registry/examples/map/native/location-picker.js +14 -0
- package/registry/examples/map/native/location-picker.light.png +0 -0
- package/registry/examples/map/native/location-picker.tsx +13 -0
- package/registry/examples/map/native/places.d.ts +4 -0
- package/registry/examples/map/native/places.dark.png +0 -0
- package/registry/examples/map/native/places.js +25 -0
- package/registry/examples/map/native/places.light.png +0 -0
- package/registry/examples/map/native/places.tsx +27 -0
- package/registry/examples/map/places.d.ts +4 -0
- package/registry/examples/map/places.js +28 -0
- package/registry/examples/map/places.tsx +28 -0
- package/registry/examples/map/static.d.ts +4 -0
- package/registry/examples/map/static.js +22 -0
- package/registry/examples/map/static.tsx +18 -0
- package/registry/examples/media-picker/native/story.d.ts +4 -0
- package/registry/examples/media-picker/native/story.dark.png +0 -0
- package/registry/examples/media-picker/native/story.js +30 -0
- package/registry/examples/media-picker/native/story.light.png +0 -0
- package/registry/examples/media-picker/native/story.tsx +26 -0
- package/registry/examples/meter/native/credits.d.ts +4 -0
- package/registry/examples/meter/native/credits.dark.png +0 -0
- package/registry/examples/meter/native/credits.js +15 -0
- package/registry/examples/meter/native/credits.light.png +0 -0
- package/registry/examples/meter/native/credits.tsx +12 -0
- package/registry/examples/meter/native/split-ring.d.ts +4 -0
- package/registry/examples/meter/native/split-ring.dark.png +0 -0
- package/registry/examples/meter/native/split-ring.js +24 -0
- package/registry/examples/meter/native/split-ring.light.png +0 -0
- package/registry/examples/meter/native/split-ring.tsx +19 -0
- package/registry/examples/number-ticker/native/balance.d.ts +4 -0
- package/registry/examples/number-ticker/native/balance.dark.png +0 -0
- package/registry/examples/number-ticker/native/balance.js +18 -0
- package/registry/examples/number-ticker/native/balance.light.png +0 -0
- package/registry/examples/number-ticker/native/balance.tsx +17 -0
- package/registry/examples/onboarding/native/first-launch.d.ts +4 -0
- package/registry/examples/onboarding/native/first-launch.dark.png +0 -0
- package/registry/examples/onboarding/native/first-launch.js +23 -0
- package/registry/examples/onboarding/native/first-launch.light.png +0 -0
- package/registry/examples/onboarding/native/first-launch.tsx +19 -0
- package/registry/examples/otp-input/native/invalid.d.ts +4 -0
- package/registry/examples/otp-input/native/invalid.dark.png +0 -0
- package/registry/examples/otp-input/native/invalid.js +15 -0
- package/registry/examples/otp-input/native/invalid.light.png +0 -0
- package/registry/examples/otp-input/native/invalid.tsx +14 -0
- package/registry/examples/otp-input/native/verify.d.ts +4 -0
- package/registry/examples/otp-input/native/verify.dark.png +0 -0
- package/registry/examples/otp-input/native/verify.js +17 -0
- package/registry/examples/otp-input/native/verify.light.png +0 -0
- package/registry/examples/otp-input/native/verify.tsx +14 -0
- package/registry/examples/permission-prompt/native/blocked.d.ts +4 -0
- package/registry/examples/permission-prompt/native/blocked.dark.png +0 -0
- package/registry/examples/permission-prompt/native/blocked.js +25 -0
- package/registry/examples/permission-prompt/native/blocked.light.png +0 -0
- package/registry/examples/permission-prompt/native/blocked.tsx +21 -0
- package/registry/examples/permission-prompt/native/camera.d.ts +4 -0
- package/registry/examples/permission-prompt/native/camera.dark.png +0 -0
- package/registry/examples/permission-prompt/native/camera.js +25 -0
- package/registry/examples/permission-prompt/native/camera.light.png +0 -0
- package/registry/examples/permission-prompt/native/camera.tsx +21 -0
- package/registry/examples/pull-to-refresh/native/feed.d.ts +4 -0
- package/registry/examples/pull-to-refresh/native/feed.dark.png +0 -0
- package/registry/examples/pull-to-refresh/native/feed.js +14 -0
- package/registry/examples/pull-to-refresh/native/feed.light.png +0 -0
- package/registry/examples/pull-to-refresh/native/feed.tsx +19 -0
- package/registry/examples/radio-group/buttons.d.ts +4 -0
- package/registry/examples/radio-group/buttons.js +17 -0
- package/registry/examples/radio-group/buttons.tsx +21 -0
- package/registry/examples/radio-group/cards.js +1 -1
- package/registry/examples/radio-group/cards.tsx +2 -2
- package/registry/examples/radio-group/native/buttons.d.ts +4 -0
- package/registry/examples/radio-group/native/buttons.dark.png +0 -0
- package/registry/examples/radio-group/native/buttons.js +25 -0
- package/registry/examples/radio-group/native/buttons.light.png +0 -0
- package/registry/examples/radio-group/native/buttons.tsx +21 -0
- package/registry/examples/radio-group/native/cards.d.ts +4 -0
- package/registry/examples/radio-group/native/cards.dark.png +0 -0
- package/registry/examples/radio-group/native/cards.js +23 -0
- package/registry/examples/radio-group/native/cards.light.png +0 -0
- package/registry/examples/radio-group/native/cards.tsx +19 -0
- package/registry/examples/radio-group/native/list.d.ts +4 -0
- package/registry/examples/radio-group/native/list.dark.png +0 -0
- package/registry/examples/radio-group/native/list.js +24 -0
- package/registry/examples/radio-group/native/list.light.png +0 -0
- package/registry/examples/radio-group/native/list.tsx +20 -0
- package/registry/examples/radio-group/native/segmented.d.ts +4 -0
- package/registry/examples/radio-group/native/segmented.dark.png +0 -0
- package/registry/examples/radio-group/native/segmented.js +24 -0
- package/registry/examples/radio-group/native/segmented.light.png +0 -0
- package/registry/examples/radio-group/native/segmented.tsx +20 -0
- package/registry/examples/radio-group/segmented.d.ts +4 -0
- package/registry/examples/radio-group/segmented.js +15 -0
- package/registry/examples/radio-group/segmented.tsx +12 -0
- package/registry/examples/search-field/native/cancel.d.ts +4 -0
- package/registry/examples/search-field/native/cancel.dark.png +0 -0
- package/registry/examples/search-field/native/cancel.js +14 -0
- package/registry/examples/search-field/native/cancel.light.png +0 -0
- package/registry/examples/search-field/native/cancel.tsx +13 -0
- package/registry/examples/slider/floating.d.ts +4 -0
- package/registry/examples/slider/floating.js +11 -0
- package/registry/examples/slider/floating.tsx +12 -0
- package/registry/examples/slider/native/default.d.ts +4 -0
- package/registry/examples/slider/native/default.dark.png +0 -0
- package/registry/examples/slider/native/default.js +14 -0
- package/registry/examples/slider/native/default.light.png +0 -0
- package/registry/examples/slider/native/default.tsx +13 -0
- package/registry/examples/slider/native/range.d.ts +4 -0
- package/registry/examples/slider/native/range.dark.png +0 -0
- package/registry/examples/slider/native/range.js +12 -0
- package/registry/examples/slider/native/range.light.png +0 -0
- package/registry/examples/slider/native/range.tsx +11 -0
- package/registry/examples/slider/native/stepped.d.ts +4 -0
- package/registry/examples/slider/native/stepped.dark.png +0 -0
- package/registry/examples/slider/native/stepped.js +28 -0
- package/registry/examples/slider/native/stepped.light.png +0 -0
- package/registry/examples/slider/native/stepped.tsx +24 -0
- package/registry/examples/slider/native/vertical.d.ts +4 -0
- package/registry/examples/slider/native/vertical.dark.png +0 -0
- package/registry/examples/slider/native/vertical.js +16 -0
- package/registry/examples/slider/native/vertical.light.png +0 -0
- package/registry/examples/slider/native/vertical.tsx +13 -0
- package/registry/examples/slider/price-range.d.ts +4 -0
- package/registry/examples/slider/price-range.js +29 -0
- package/registry/examples/slider/price-range.tsx +27 -0
- package/registry/examples/slider/stepped.d.ts +4 -0
- package/registry/examples/slider/stepped.js +28 -0
- package/registry/examples/slider/stepped.tsx +24 -0
- package/registry/examples/slider/vertical.d.ts +4 -0
- package/registry/examples/slider/vertical.js +15 -0
- package/registry/examples/slider/vertical.tsx +14 -0
- package/registry/examples/stat/grid.d.ts +4 -0
- package/registry/examples/stat/grid.js +17 -0
- package/registry/examples/stat/grid.tsx +14 -0
- package/registry/examples/stepper/native/run.d.ts +4 -0
- package/registry/examples/stepper/native/run.dark.png +0 -0
- package/registry/examples/stepper/native/run.js +24 -0
- package/registry/examples/stepper/native/run.light.png +0 -0
- package/registry/examples/stepper/native/run.tsx +20 -0
- package/registry/examples/swipeable-row/native/conversation.d.ts +4 -0
- package/registry/examples/swipeable-row/native/conversation.dark.png +0 -0
- package/registry/examples/swipeable-row/native/conversation.js +30 -0
- package/registry/examples/swipeable-row/native/conversation.light.png +0 -0
- package/registry/examples/swipeable-row/native/conversation.tsx +27 -0
- package/registry/examples/switch/native/default.d.ts +4 -0
- package/registry/examples/switch/native/default.dark.png +0 -0
- package/registry/examples/switch/native/default.js +16 -0
- package/registry/examples/switch/native/default.light.png +0 -0
- package/registry/examples/switch/native/default.tsx +13 -0
- package/registry/examples/switch/native/settings.d.ts +4 -0
- package/registry/examples/switch/native/settings.dark.png +0 -0
- package/registry/examples/switch/native/settings.js +20 -0
- package/registry/examples/switch/native/settings.light.png +0 -0
- package/registry/examples/switch/native/settings.tsx +17 -0
- package/registry/examples/tab-bar/native/main-sections.d.ts +4 -0
- package/registry/examples/tab-bar/native/main-sections.dark.png +0 -0
- package/registry/examples/tab-bar/native/main-sections.js +29 -0
- package/registry/examples/tab-bar/native/main-sections.light.png +0 -0
- package/registry/examples/tab-bar/native/main-sections.tsx +30 -0
- package/registry/examples/tabs/native/sections.d.ts +4 -0
- package/registry/examples/tabs/native/sections.dark.png +0 -0
- package/registry/examples/tabs/native/sections.js +23 -0
- package/registry/examples/tabs/native/sections.light.png +0 -0
- package/registry/examples/tabs/native/sections.tsx +19 -0
- package/registry/examples/tabs/native/segmented.d.ts +4 -0
- package/registry/examples/tabs/native/segmented.dark.png +0 -0
- package/registry/examples/tabs/native/segmented.js +22 -0
- package/registry/examples/tabs/native/segmented.light.png +0 -0
- package/registry/examples/tabs/native/segmented.tsx +18 -0
- package/registry/examples/toast/native/snackbar.d.ts +4 -0
- package/registry/examples/toast/native/snackbar.dark.png +0 -0
- package/registry/examples/toast/native/snackbar.js +23 -0
- package/registry/examples/toast/native/snackbar.light.png +0 -0
- package/registry/examples/toast/native/snackbar.tsx +21 -0
- package/registry/examples/tree-view/docs.d.ts +4 -0
- package/registry/examples/tree-view/docs.js +24 -0
- package/registry/examples/tree-view/docs.tsx +22 -0
- package/registry/examples/tree-view/lazy.d.ts +4 -0
- package/registry/examples/tree-view/lazy.js +21 -0
- package/registry/examples/tree-view/lazy.tsx +19 -0
- package/registry/fab.json +122 -0
- package/registry/field.json +16 -4
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +1 -1
- package/registry/form.json +252 -44
- package/registry/gallery-page.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/header.json +137 -0
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/image-viewer.json +107 -0
- package/registry/index.json +322 -44
- package/registry/iso.json +1 -1
- package/registry/kanban.json +253 -0
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +367 -30
- package/registry/loader.json +157 -4
- package/registry/longform-page.json +1 -1
- package/registry/map.json +1368 -0
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-picker.json +129 -0
- package/registry/meter.json +136 -4
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +96 -4
- package/registry/onboarding.json +95 -0
- package/registry/otp-input.json +150 -0
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/permission-prompt.json +172 -0
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +2 -2
- package/registry/promise-card.json +1 -1
- package/registry/pull-to-refresh.json +74 -0
- package/registry/radio-group.json +228 -16
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +30 -3
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/slider.json +315 -14
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +68 -5
- package/registry/status-page.json +1 -1
- package/registry/stepper.json +75 -4
- package/registry/swipeable-row.json +124 -0
- package/registry/switch.json +116 -4
- package/registry/tab-bar.json +115 -0
- package/registry/tabs.json +96 -6
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +8 -1
- package/registry/toast.json +17 -3
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +291 -0
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/skills/choice-controls/SKILL.md +39 -0
- package/skills/form/SKILL.md +3 -0
- package/skills/map/SKILL.md +35 -0
- package/dist/chunk-I5RVM5CW.js.map +0 -1
- package/dist/chunk-RUPRYJ45.js +0 -82
- package/dist/chunk-RUPRYJ45.js.map +0 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const descriptionList: tailwind_variants.TVReturnType<{
|
|
5
|
+
layout: {
|
|
6
|
+
stacked: {
|
|
7
|
+
root: string;
|
|
8
|
+
details: string;
|
|
9
|
+
};
|
|
10
|
+
inline: {
|
|
11
|
+
root: string;
|
|
12
|
+
pair: string;
|
|
13
|
+
term: string;
|
|
14
|
+
details: string;
|
|
15
|
+
};
|
|
16
|
+
grid: {
|
|
17
|
+
root: string;
|
|
18
|
+
pair: string;
|
|
19
|
+
term: string;
|
|
20
|
+
details: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
root: string;
|
|
25
|
+
pair: string;
|
|
26
|
+
term: string;
|
|
27
|
+
details: string;
|
|
28
|
+
hint: string;
|
|
29
|
+
}, undefined, {
|
|
30
|
+
layout: {
|
|
31
|
+
stacked: {
|
|
32
|
+
root: string;
|
|
33
|
+
details: string;
|
|
34
|
+
};
|
|
35
|
+
inline: {
|
|
36
|
+
root: string;
|
|
37
|
+
pair: string;
|
|
38
|
+
term: string;
|
|
39
|
+
details: string;
|
|
40
|
+
};
|
|
41
|
+
grid: {
|
|
42
|
+
root: string;
|
|
43
|
+
pair: string;
|
|
44
|
+
term: string;
|
|
45
|
+
details: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
root: string;
|
|
50
|
+
pair: string;
|
|
51
|
+
term: string;
|
|
52
|
+
details: string;
|
|
53
|
+
hint: string;
|
|
54
|
+
}, tailwind_variants.TVReturnTypeLike<{
|
|
55
|
+
layout: {
|
|
56
|
+
stacked: {
|
|
57
|
+
root: string;
|
|
58
|
+
details: string;
|
|
59
|
+
};
|
|
60
|
+
inline: {
|
|
61
|
+
root: string;
|
|
62
|
+
pair: string;
|
|
63
|
+
term: string;
|
|
64
|
+
details: string;
|
|
65
|
+
};
|
|
66
|
+
grid: {
|
|
67
|
+
root: string;
|
|
68
|
+
pair: string;
|
|
69
|
+
term: string;
|
|
70
|
+
details: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
}, {
|
|
74
|
+
root: string;
|
|
75
|
+
pair: string;
|
|
76
|
+
term: string;
|
|
77
|
+
details: string;
|
|
78
|
+
hint: string;
|
|
79
|
+
}>>;
|
|
80
|
+
type DescriptionItem = {
|
|
81
|
+
/** The term (“Status”, “Credits”) — passed translated. */
|
|
82
|
+
term: React.ReactNode;
|
|
83
|
+
/** The value: text, a `Badge`, a link. */
|
|
84
|
+
details: React.ReactNode;
|
|
85
|
+
/** A line under the value (a date, a unit). */
|
|
86
|
+
hint?: React.ReactNode;
|
|
87
|
+
/** A stable key, when the terms are not unique strings. */
|
|
88
|
+
id?: string;
|
|
89
|
+
};
|
|
90
|
+
type DescriptionListProps = Omit<React.ComponentProps<"dl">, "children"> & {
|
|
91
|
+
/** The pairs, in reading order. */
|
|
92
|
+
items: readonly DescriptionItem[];
|
|
93
|
+
/** stacked (default: a details panel) · inline (term left, value right: a receipt, a summary) · grid (cards). */
|
|
94
|
+
layout?: "stacked" | "inline" | "grid";
|
|
95
|
+
};
|
|
96
|
+
/** Term and value pairs — a job's details, a payout's breakdown — stacked, inline like a receipt, or as cards. */
|
|
97
|
+
declare function DescriptionList({ items, layout, className, ...props }: DescriptionListProps): React.JSX.Element;
|
|
98
|
+
type KeyValueGridProps = Omit<DescriptionListProps, "layout"> & {
|
|
99
|
+
/** The narrowest a card may be before the grid wraps, in rem. Default 10. */
|
|
100
|
+
minWidth?: number;
|
|
101
|
+
};
|
|
102
|
+
/** Key figures as a grid of cards that wraps with the width: a job's numbers, an account's limits. */
|
|
103
|
+
declare function KeyValueGrid({ minWidth, style, ...props }: KeyValueGridProps): React.JSX.Element;
|
|
104
|
+
|
|
105
|
+
export { type DescriptionItem, DescriptionList, type DescriptionListProps, KeyValueGrid, type KeyValueGridProps, descriptionList };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// src/description-list/description-list.tsx
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var descriptionList = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: "m-0 w-full",
|
|
7
|
+
pair: "min-w-0",
|
|
8
|
+
term: "text-xs font-semibold text-fg-secondary",
|
|
9
|
+
details: "m-0 min-w-0 break-words text-sm text-fg",
|
|
10
|
+
hint: "mt-0.5 block text-xs text-fg-secondary"
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
layout: {
|
|
14
|
+
stacked: { root: "flex flex-col gap-4", details: "mt-1" },
|
|
15
|
+
inline: {
|
|
16
|
+
root: "divide-y divide-border-subtle",
|
|
17
|
+
pair: "flex flex-wrap items-baseline justify-between gap-x-6 gap-y-1 py-2.5 first:pt-0 last:pb-0",
|
|
18
|
+
term: "text-sm font-normal",
|
|
19
|
+
details: "text-right font-medium tabular-nums"
|
|
20
|
+
},
|
|
21
|
+
grid: {
|
|
22
|
+
root: "grid grid-cols-[repeat(auto-fill,minmax(var(--kz-kv-min,10rem),1fr))] gap-3",
|
|
23
|
+
pair: "rounded-xl border border-border-default bg-surface-1 px-4 py-3",
|
|
24
|
+
term: "uppercase tracking-wider",
|
|
25
|
+
details: "mt-1 font-display text-lg font-bold tabular-nums"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: { layout: "stacked" }
|
|
30
|
+
});
|
|
31
|
+
function DescriptionList({ items, layout, className, ...props }) {
|
|
32
|
+
const s = descriptionList({ layout });
|
|
33
|
+
return /* @__PURE__ */ jsx("dl", { className: s.root({ className }), ...props, children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { className: s.pair(), children: [
|
|
34
|
+
/* @__PURE__ */ jsx("dt", { className: s.term(), children: item.term }),
|
|
35
|
+
/* @__PURE__ */ jsxs("dd", { className: s.details(), children: [
|
|
36
|
+
item.details,
|
|
37
|
+
item.hint ? /* @__PURE__ */ jsx("span", { className: s.hint(), children: item.hint }) : null
|
|
38
|
+
] })
|
|
39
|
+
] }, item.id ?? (typeof item.term === "string" ? item.term : i))) });
|
|
40
|
+
}
|
|
41
|
+
function KeyValueGrid({ minWidth = 10, style, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx(DescriptionList, { layout: "grid", style: { ...style, ["--kz-kv-min"]: `${minWidth}rem` }, ...props });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
DescriptionList,
|
|
46
|
+
KeyValueGrid,
|
|
47
|
+
descriptionList
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=description-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/description-list/description-list.tsx"],"sourcesContent":["// Server-safe. Facts about one thing, as term and value: a job's details, a payout's breakdown, a profile. A real\n// `<dl>` (each pair in a `<div>`, as HTML allows): stacked, inline (term beside its value) or a grid of cards\n// (`KeyValueGrid`). Every word is a prop.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const descriptionList = tv({\n slots: {\n root: \"m-0 w-full\",\n pair: \"min-w-0\",\n term: \"text-xs font-semibold text-fg-secondary\",\n details: \"m-0 min-w-0 break-words text-sm text-fg\",\n hint: \"mt-0.5 block text-xs text-fg-secondary\",\n },\n variants: {\n layout: {\n stacked: { root: \"flex flex-col gap-4\", details: \"mt-1\" },\n inline: {\n root: \"divide-y divide-border-subtle\",\n pair: \"flex flex-wrap items-baseline justify-between gap-x-6 gap-y-1 py-2.5 first:pt-0 last:pb-0\",\n term: \"text-sm font-normal\",\n details: \"text-right font-medium tabular-nums\",\n },\n grid: {\n root: \"grid grid-cols-[repeat(auto-fill,minmax(var(--kz-kv-min,10rem),1fr))] gap-3\",\n pair: \"rounded-xl border border-border-default bg-surface-1 px-4 py-3\",\n term: \"uppercase tracking-wider\",\n details: \"mt-1 font-display text-lg font-bold tabular-nums\",\n },\n },\n },\n defaultVariants: { layout: \"stacked\" },\n});\n\nexport type DescriptionItem = {\n /** The term (“Status”, “Credits”) — passed translated. */\n term: React.ReactNode;\n /** The value: text, a `Badge`, a link. */\n details: React.ReactNode;\n /** A line under the value (a date, a unit). */\n hint?: React.ReactNode;\n /** A stable key, when the terms are not unique strings. */\n id?: string;\n};\n\nexport type DescriptionListProps = Omit<React.ComponentProps<\"dl\">, \"children\"> & {\n /** The pairs, in reading order. */\n items: readonly DescriptionItem[];\n /** stacked (default: a details panel) · inline (term left, value right: a receipt, a summary) · grid (cards). */\n layout?: \"stacked\" | \"inline\" | \"grid\";\n};\n\n/** Term and value pairs — a job's details, a payout's breakdown — stacked, inline like a receipt, or as cards. */\nexport function DescriptionList({ items, layout, className, ...props }: DescriptionListProps) {\n const s = descriptionList({ layout });\n return (\n <dl className={s.root({ className })} {...props}>\n {items.map((item, i) => (\n <div key={item.id ?? (typeof item.term === \"string\" ? item.term : i)} className={s.pair()}>\n <dt className={s.term()}>{item.term}</dt>\n <dd className={s.details()}>\n {item.details}\n {item.hint ? <span className={s.hint()}>{item.hint}</span> : null}\n </dd>\n </div>\n ))}\n </dl>\n );\n}\n\nexport type KeyValueGridProps = Omit<DescriptionListProps, \"layout\"> & {\n /** The narrowest a card may be before the grid wraps, in rem. Default 10. */\n minWidth?: number;\n};\n\n/** Key figures as a grid of cards that wraps with the width: a job's numbers, an account's limits. */\nexport function KeyValueGrid({ minWidth = 10, style, ...props }: KeyValueGridProps) {\n return <DescriptionList layout=\"grid\" style={{ ...style, [\"--kz-kv-min\" as string]: `${minWidth}rem` }} {...props} />;\n}\n"],"mappings":";AAIA,SAAS,UAAU;AAuDT,cACA,YADA;AArDH,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,SAAS,EAAE,MAAM,uBAAuB,SAAS,OAAO;AAAA,MACxD,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,QAAQ,UAAU;AACvC,CAAC;AAqBM,SAAS,gBAAgB,EAAE,OAAO,QAAQ,WAAW,GAAG,MAAM,GAAyB;AAC5F,QAAM,IAAI,gBAAgB,EAAE,OAAO,CAAC;AACpC,SACE,oBAAC,QAAG,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACvC,gBAAM,IAAI,CAAC,MAAM,MAChB,qBAAC,SAAqE,WAAW,EAAE,KAAK,GACtF;AAAA,wBAAC,QAAG,WAAW,EAAE,KAAK,GAAI,eAAK,MAAK;AAAA,IACpC,qBAAC,QAAG,WAAW,EAAE,QAAQ,GACtB;AAAA,WAAK;AAAA,MACL,KAAK,OAAO,oBAAC,UAAK,WAAW,EAAE,KAAK,GAAI,eAAK,MAAK,IAAU;AAAA,OAC/D;AAAA,OALQ,KAAK,OAAO,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO,EAMlE,CACD,GACH;AAEJ;AAQO,SAAS,aAAa,EAAE,WAAW,IAAI,OAAO,GAAG,MAAM,GAAsB;AAClF,SAAO,oBAAC,mBAAgB,QAAO,QAAO,OAAO,EAAE,GAAG,OAAO,CAAC,aAAuB,GAAG,GAAG,QAAQ,MAAM,GAAI,GAAG,OAAO;AACrH;","names":[]}
|
package/dist/dropdown-menu.js
CHANGED
package/dist/filter-bar.js
CHANGED
|
@@ -5,9 +5,10 @@ import {
|
|
|
5
5
|
filterBar,
|
|
6
6
|
readFilterParams,
|
|
7
7
|
writeFilterParams
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZKVQGXLD.js";
|
|
9
9
|
import "./chunk-YH4LMWRU.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-J3NC6ER4.js";
|
|
11
|
+
import "./chunk-2FRWNSRO.js";
|
|
11
12
|
import "./chunk-CPA5CF35.js";
|
|
12
13
|
export {
|
|
13
14
|
FilterBar,
|
package/dist/form.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ButtonProps } from '@krizaka/ui/button';
|
|
|
4
4
|
import { ComboboxOption, ComboboxLabels } from '@krizaka/ui/combobox';
|
|
5
5
|
import { DatePickerLabels } from '@krizaka/ui/date-picker';
|
|
6
6
|
import { Dropzone } from '@krizaka/ui/file-upload';
|
|
7
|
+
import { SliderMark } from '@krizaka/ui/slider';
|
|
7
8
|
import { TagInputProps } from '@krizaka/ui/tag-input';
|
|
8
9
|
|
|
9
10
|
/** A part of a typed date. */
|
|
@@ -347,8 +348,12 @@ type FormOption = {
|
|
|
347
348
|
type RadioGroupProps = Base & {
|
|
348
349
|
/** The choices, all visible (two to five). */
|
|
349
350
|
options: readonly FormOption[];
|
|
350
|
-
/**
|
|
351
|
-
|
|
351
|
+
/**
|
|
352
|
+
* `list` (a dot and its words, default), `cards` (a whole card is the radio: an amount, a plan, an audience),
|
|
353
|
+
* `buttons` (tactile keys that press in: a size, a tip; `description` is the key's second line) or `segmented`
|
|
354
|
+
* (two to four short choices on one line).
|
|
355
|
+
*/
|
|
356
|
+
variant?: "list" | "cards" | "buttons" | "segmented";
|
|
352
357
|
/** `vertical` (default) or `horizontal`. */
|
|
353
358
|
orientation?: "vertical" | "horizontal";
|
|
354
359
|
};
|
|
@@ -379,19 +384,21 @@ type ComboboxProps = Base & {
|
|
|
379
384
|
/** A choice among many, typed to filter or fetched: one value (`string`) or several (`string[]`). */
|
|
380
385
|
declare function Combobox({ name, label, hint, disabled, className, options, onSearch, multiple, creatable, placeholder, labels }: ComboboxProps): React.JSX.Element;
|
|
381
386
|
type DateFieldProps = Base & {
|
|
382
|
-
/**
|
|
383
|
-
*
|
|
384
|
-
|
|
385
|
-
|
|
387
|
+
/**
|
|
388
|
+
* `calendar` (default: a date near today — a publication, an appointment), `parts` (day · month · year typed: a
|
|
389
|
+
* memorable date, a birth date) or `wheel` (three wheels bounded by `min` / `max`: a birth date on a phone).
|
|
390
|
+
*/
|
|
391
|
+
entry?: "calendar" | "parts" | "wheel";
|
|
392
|
+
/** The earliest date (ISO), for the calendar and the wheels. */
|
|
386
393
|
min?: string;
|
|
387
|
-
/** The latest date (ISO), for the calendar (`latestBirthDate(18)` for an age gate). */
|
|
394
|
+
/** The latest date (ISO), for the calendar and the wheels (`latestBirthDate(18)` for an age gate). */
|
|
388
395
|
max?: string;
|
|
389
|
-
/** The words of the calendar, or the names of the
|
|
396
|
+
/** The words of the calendar, or the names of the parts (`day`, `month`, `year`), passed translated. */
|
|
390
397
|
labels?: Partial<DatePickerLabels> & Partial<Record<DatePart, string>>;
|
|
391
|
-
/** `bday` for a date of birth. */
|
|
398
|
+
/** `bday` for a date of birth: typed boxes are autofilled; the wheels rest on 1 January 2000 until turned. */
|
|
392
399
|
autoComplete?: "bday" | "off";
|
|
393
400
|
};
|
|
394
|
-
/** A date of the form (`YYYY-MM-DD`, `""` for none): a calendar,
|
|
401
|
+
/** A date of the form (`YYYY-MM-DD`, `""` for none): a calendar, day · month · year typed, or wheels. */
|
|
395
402
|
declare function DateField({ name, label, hint, disabled, className, entry, min, max, labels, autoComplete }: DateFieldProps): React.JSX.Element;
|
|
396
403
|
type TagsProps = Base & Pick<TagInputProps, "suggestions" | "normalize" | "max" | "separators" | "placeholder" | "labels">;
|
|
397
404
|
/** Free words of the form as chips (`string[]`): tags, keywords. */
|
|
@@ -437,9 +444,13 @@ type SliderProps = Base & {
|
|
|
437
444
|
formatValue?: (value: number) => string;
|
|
438
445
|
/** For a range (`[number, number]`): each thumb's name, passed translated. */
|
|
439
446
|
thumbLabels?: [string, string];
|
|
447
|
+
/** A graduation per step (`true`) or at the values given. */
|
|
448
|
+
ticks?: boolean | readonly number[];
|
|
449
|
+
/** Words under the track at some values. */
|
|
450
|
+
marks?: readonly SliderMark[];
|
|
440
451
|
};
|
|
441
|
-
/** A number (or a range) of the form, chosen by feel: a share, a volume, a price range. */
|
|
442
|
-
declare function Slider({ name, label, hint, disabled, className, min, max, step, formatValue, thumbLabels }: SliderProps): React.JSX.Element;
|
|
452
|
+
/** A number (or a range) of the form, chosen by feel: a share, a volume, a price range — the value floats while it is touched. */
|
|
453
|
+
declare function Slider({ name, label, hint, disabled, className, min, max, step, formatValue, thumbLabels, ticks, marks }: SliderProps): React.JSX.Element;
|
|
443
454
|
type FormFieldProps<T = unknown> = {
|
|
444
455
|
/** The field's name in the schema (typed by the form). */
|
|
445
456
|
name: string;
|
package/dist/form.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/date-picker/parts.ts
|
|
4
|
-
var DATE_PART_LENGTH = { day: 2, month: 2, year: 4 };
|
|
5
4
|
function datePartsOrder(locale) {
|
|
6
5
|
try {
|
|
7
6
|
const parts = new Intl.DateTimeFormat(locale, { day: "2-digit", month: "2-digit", year: "numeric" }).formatToParts(new Date(2001, 10, 22));
|
|
@@ -16,10 +15,6 @@ function composeDate(parts) {
|
|
|
16
15
|
const pad = (v) => v.length === 1 ? `0${v}` : v;
|
|
17
16
|
return `${parts.year}-${pad(parts.month)}-${pad(parts.day)}`;
|
|
18
17
|
}
|
|
19
|
-
function splitDate(value) {
|
|
20
|
-
const m = /^(\d*)-(\d*)-(\d*)$/.exec(value ?? "");
|
|
21
|
-
return m ? { year: m[1], month: m[2], day: m[3] } : { day: "", month: "", year: "" };
|
|
22
|
-
}
|
|
23
18
|
function isRealDate(value) {
|
|
24
19
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return false;
|
|
25
20
|
const date = /* @__PURE__ */ new Date(`${value}T00:00:00Z`);
|
|
@@ -408,7 +403,7 @@ import { Alert } from "@krizaka/ui/alert";
|
|
|
408
403
|
import { Button } from "@krizaka/ui/button";
|
|
409
404
|
import { Checkbox as CheckboxControl } from "@krizaka/ui/checkbox";
|
|
410
405
|
import { Combobox as ComboboxControl } from "@krizaka/ui/combobox";
|
|
411
|
-
import { DatePicker } from "@krizaka/ui/date-picker";
|
|
406
|
+
import { DateField as DatePartsControl, DatePicker, DateWheel } from "@krizaka/ui/date-picker";
|
|
412
407
|
import { Field, Input, Select as SelectControl, Textarea } from "@krizaka/ui/field";
|
|
413
408
|
import { Dropzone, formatBytes } from "@krizaka/ui/file-upload";
|
|
414
409
|
import { RadioGroup as RadioGroupControl } from "@krizaka/ui/radio-group";
|
|
@@ -528,12 +523,13 @@ function RadioGroup({ name, label, hint, disabled, className, options, variant =
|
|
|
528
523
|
invalid: Boolean(f.error),
|
|
529
524
|
"aria-describedby": ids(f, hint),
|
|
530
525
|
name,
|
|
531
|
-
|
|
526
|
+
variant,
|
|
527
|
+
className: variant === "segmented" ? "self-start" : void 0,
|
|
532
528
|
children: options.map(
|
|
533
529
|
(o) => variant === "cards" ? /* @__PURE__ */ jsxs(RadioGroupControl.Card, { value: o.value, disabled: o.disabled, children: [
|
|
534
530
|
/* @__PURE__ */ jsx2("span", { className: "font-semibold", children: o.label }),
|
|
535
531
|
o.description ? /* @__PURE__ */ jsx2("span", { className: "text-xs text-fg-secondary", children: o.description }) : null
|
|
536
|
-
] }, o.value) : /* @__PURE__ */ jsxs(RadioGroupControl.Item, { value: o.value, disabled: o.disabled, children: [
|
|
532
|
+
] }, o.value) : variant === "buttons" ? /* @__PURE__ */ jsx2(RadioGroupControl.Button, { value: o.value, disabled: o.disabled, hint: o.description, children: o.label }, o.value) : variant === "segmented" ? /* @__PURE__ */ jsx2(RadioGroupControl.Segment, { value: o.value, disabled: o.disabled, children: o.label }, o.value) : /* @__PURE__ */ jsxs(RadioGroupControl.Item, { value: o.value, disabled: o.disabled, children: [
|
|
537
533
|
o.label,
|
|
538
534
|
o.description ? /* @__PURE__ */ jsx2("span", { className: "block text-xs text-fg-secondary", children: o.description }) : null
|
|
539
535
|
] }, o.value)
|
|
@@ -583,46 +579,14 @@ function Combobox({ name, label, hint, disabled, className, options = [], onSear
|
|
|
583
579
|
}
|
|
584
580
|
) });
|
|
585
581
|
}
|
|
586
|
-
var PART_NAMES = { day: "Day", month: "Month", year: "Year" };
|
|
587
582
|
function DateField({ name, label, hint, disabled, className, entry = "calendar", min, max, labels, autoComplete }) {
|
|
588
583
|
const f = useKrizakaField(name);
|
|
584
|
+
const onBlur = (e) => !e.currentTarget.contains(e.relatedTarget) && f.onBlur();
|
|
589
585
|
if (entry === "calendar")
|
|
590
|
-
return /* @__PURE__ */ jsx2("div", { className, onBlur
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
const order = React2.useMemo(() => datePartsOrder(f.locale), [f.locale]);
|
|
595
|
-
const [parts, setParts] = React2.useState(() => splitDate(f.value));
|
|
596
|
-
if ((f.value ?? "") !== composeDate(parts) && composeDate(splitDate(f.value)) === (f.value ?? "")) setParts(splitDate(f.value));
|
|
597
|
-
const refs = { day: React2.useRef(null), month: React2.useRef(null), year: React2.useRef(null) };
|
|
598
|
-
return /* @__PURE__ */ jsxs("fieldset", { className: className ?? "flex flex-col gap-1.5", "aria-describedby": ids(f, hint), onBlur: (e) => !e.currentTarget.contains(e.relatedTarget) && f.onBlur(), children: [
|
|
599
|
-
/* @__PURE__ */ jsx2("legend", { className: "mb-1.5 text-xs font-semibold text-fg-secondary", children: label }),
|
|
600
|
-
/* @__PURE__ */ jsx2("div", { className: "flex gap-2", children: order.map((part) => /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1 text-xs text-fg-secondary", children: [
|
|
601
|
-
names[part],
|
|
602
|
-
/* @__PURE__ */ jsx2(
|
|
603
|
-
Input,
|
|
604
|
-
{
|
|
605
|
-
ref: refs[part],
|
|
606
|
-
inputMode: "numeric",
|
|
607
|
-
autoComplete: autoComplete === "bday" ? `bday-${part}` : "off",
|
|
608
|
-
maxLength: DATE_PART_LENGTH[part],
|
|
609
|
-
value: parts[part],
|
|
610
|
-
disabled,
|
|
611
|
-
invalid: Boolean(f.error),
|
|
612
|
-
className: part === "year" ? "w-20 text-center tabular-nums" : "w-14 text-center tabular-nums",
|
|
613
|
-
onChange: (e) => {
|
|
614
|
-
const digits = e.target.value.replace(/\D/g, "").slice(0, DATE_PART_LENGTH[part]);
|
|
615
|
-
const next = { ...parts, [part]: digits };
|
|
616
|
-
setParts(next);
|
|
617
|
-
f.setValue(composeDate(next));
|
|
618
|
-
const following = order[order.indexOf(part) + 1];
|
|
619
|
-
if (digits.length === DATE_PART_LENGTH[part] && following) refs[following].current?.focus();
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
)
|
|
623
|
-
] }, part)) }),
|
|
624
|
-
/* @__PURE__ */ jsx2(Caption, { field: f, hint })
|
|
625
|
-
] });
|
|
586
|
+
return /* @__PURE__ */ jsx2("div", { className, onBlur, children: /* @__PURE__ */ jsx2(DatePicker, { label, hint, error: f.error, disabled, name, locale: f.locale, min, max, labels, value: f.value || null, onValueChange: (v) => f.setValue(v ?? "") }) });
|
|
587
|
+
if (entry === "wheel")
|
|
588
|
+
return /* @__PURE__ */ jsx2("div", { className, onBlur, children: /* @__PURE__ */ jsx2(DateWheel, { label, hint, error: f.error, disabled, name, locale: f.locale, min, max, labels, defaultView: autoComplete === "bday" ? "2000-01-01" : void 0, value: f.value || null, onValueChange: (v) => f.setValue(v) }) });
|
|
589
|
+
return /* @__PURE__ */ jsx2(DatePartsControl, { label, hint, error: f.error, disabled, name, locale: f.locale, labels, autoComplete, className, value: f.value ?? "", onValueChange: (v) => f.setValue(v), onBlur: f.onBlur });
|
|
626
590
|
}
|
|
627
591
|
function TagInput({ name, label, hint, disabled, className, ...props }) {
|
|
628
592
|
const f = useKrizakaField(name);
|
|
@@ -698,10 +662,10 @@ function Money({ name, label, hint, disabled, className, currency, placeholder }
|
|
|
698
662
|
/* @__PURE__ */ jsx2(Caption, { field: f, hint })
|
|
699
663
|
] });
|
|
700
664
|
}
|
|
701
|
-
function Slider({ name, label, hint, disabled, className, min, max, step, formatValue, thumbLabels }) {
|
|
665
|
+
function Slider({ name, label, hint, disabled, className, min, max, step, formatValue, thumbLabels, ticks, marks }) {
|
|
702
666
|
const f = useKrizakaField(name);
|
|
703
667
|
return /* @__PURE__ */ jsxs("div", { className: className ?? "flex flex-col gap-1.5", children: [
|
|
704
|
-
/* @__PURE__ */ jsx2(SliderControl, { label, showLabel: true, value: f.value, min, max, step, disabled, formatValue, thumbLabels, "aria-describedby": ids(f, hint), onValueChange: (v) => f.setValue(v), onValueCommit: () => f.onBlur() }),
|
|
668
|
+
/* @__PURE__ */ jsx2(SliderControl, { label, showLabel: true, floatingValue: true, value: f.value, min, max, step, ticks, marks, disabled, formatValue, thumbLabels, "aria-describedby": ids(f, hint), onValueChange: (v) => f.setValue(v), onValueCommit: () => f.onBlur() }),
|
|
705
669
|
/* @__PURE__ */ jsx2(Caption, { field: f, hint })
|
|
706
670
|
] });
|
|
707
671
|
}
|