@krak-stack/registry 0.10.20 → 0.11.2
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/CHANGELOG.md +89 -3
- package/README.md +11 -8
- package/dist/components/agent/index.d.ts +454 -0
- package/dist/components/agent/react.d.ts +55 -0
- package/dist/components/agent/react.js +2440 -0
- package/dist/components/agent/schema.d.ts +55 -0
- package/dist/components/animated-list/classes.d.ts +9 -0
- package/dist/components/animated-list/html.d.ts +11 -0
- package/dist/components/animated-list/html.js +533 -0
- package/dist/components/animated-list/index.d.ts +205 -0
- package/dist/components/animated-list/react.d.ts +11 -0
- package/dist/components/{ui/animated-list.js → animated-list/react.js} +199 -54
- package/dist/components/animated-list/schema.d.ts +44 -0
- package/dist/components/animated-number/html.d.ts +19 -0
- package/dist/components/animated-number/html.js +101 -0
- package/dist/components/animated-number/index.d.ts +80 -0
- package/dist/components/{ui/animated-number.d.ts → animated-number/react.d.ts} +2 -7
- package/dist/components/animated-number/react.js +124 -0
- package/dist/components/animated-number/schema.d.ts +9 -0
- package/dist/components/app-brand/classes.d.ts +11 -0
- package/dist/components/app-brand/html.d.ts +26 -0
- package/dist/components/app-brand/html.js +78 -0
- package/dist/components/app-brand/react.d.ts +12 -0
- package/dist/components/app-brand/react.js +86 -0
- package/dist/components/app-brand/schema.d.ts +36 -0
- package/dist/components/app-switcher/classes.d.ts +15 -0
- package/dist/components/app-switcher/html.d.ts +72 -0
- package/dist/components/app-switcher/html.js +327 -0
- package/dist/components/app-switcher/index.d.ts +47 -0
- package/dist/components/app-switcher/react.d.ts +12 -0
- package/dist/components/{ui/app-switcher.js → app-switcher/react.js} +84 -15
- package/dist/components/app-switcher/schema.d.ts +39 -0
- package/dist/components/async-action-button/classes.d.ts +11 -0
- package/dist/components/async-action-button/html.d.ts +46 -0
- package/dist/components/async-action-button/html.js +266 -0
- package/dist/components/async-action-button/index.d.ts +73 -0
- package/dist/components/async-action-button/react.d.ts +10 -0
- package/dist/components/async-action-button/react.js +224 -0
- package/dist/components/async-action-button/schema.d.ts +28 -0
- package/dist/{services/events/client/audit-log-table.d.ts → components/audit-log-table/react.d.ts} +2 -2
- package/dist/{services/events/client/audit-log-table.js → components/audit-log-table/react.js} +1964 -847
- package/dist/components/auto-height/html.d.ts +8 -0
- package/dist/components/auto-height/html.js +81 -0
- package/dist/components/auto-height/index.d.ts +2 -0
- package/dist/components/{ui/auto-height.d.ts → auto-height/react.d.ts} +2 -4
- package/dist/components/auto-height/react.js +75 -0
- package/dist/components/auto-height/schema.d.ts +7 -0
- package/dist/components/bulk-list-input/classes.d.ts +7 -0
- package/dist/components/bulk-list-input/html.d.ts +41 -0
- package/dist/components/bulk-list-input/html.js +265 -0
- package/dist/components/bulk-list-input/index.d.ts +76 -0
- package/dist/components/bulk-list-input/react.d.ts +12 -0
- package/dist/components/{ui/bulk-list-input.js → bulk-list-input/react.js} +71 -4
- package/dist/components/bulk-list-input/schema.d.ts +33 -0
- package/dist/components/choice-cards/classes.d.ts +19 -0
- package/dist/components/choice-cards/html.d.ts +76 -0
- package/dist/components/choice-cards/html.js +237 -0
- package/dist/components/choice-cards/index.d.ts +1 -0
- package/dist/components/choice-cards/react.d.ts +21 -0
- package/dist/components/{ui/choice-cards.js → choice-cards/react.js} +29 -10
- package/dist/components/choice-cards/schema.d.ts +100 -0
- package/dist/components/code-block/classes.d.ts +13 -0
- package/dist/components/code-block/html.d.ts +21 -0
- package/dist/components/code-block/html.js +381 -0
- package/dist/components/code-block/index.d.ts +4 -0
- package/dist/components/code-block/react.d.ts +4 -0
- package/dist/components/{ui/code-block.js → code-block/react.js} +168 -50
- package/dist/components/code-block/schema.d.ts +29 -0
- package/dist/components/color-input/classes.d.ts +9 -0
- package/dist/components/color-input/html.d.ts +48 -0
- package/dist/components/color-input/html.js +187 -0
- package/dist/components/color-input/index.d.ts +88 -0
- package/dist/components/color-input/react.d.ts +7 -0
- package/dist/components/{ui/color-picker.js → color-input/react.js} +165 -233
- package/dist/components/color-input/schema.d.ts +40 -0
- package/dist/components/copy-button/html.d.ts +48 -0
- package/dist/components/copy-button/html.js +266 -0
- package/dist/components/copy-button/index.d.ts +73 -0
- package/dist/components/copy-button/react.d.ts +12 -0
- package/dist/components/copy-button/react.js +234 -0
- package/dist/components/copy-button/schema.d.ts +37 -0
- package/dist/components/copy-value/html.d.ts +37 -0
- package/dist/components/copy-value/html.js +426 -0
- package/dist/components/copy-value/index.d.ts +57 -0
- package/dist/components/copy-value/react.d.ts +9 -0
- package/dist/components/{ui/copy-value.js → copy-value/react.js} +243 -65
- package/dist/components/copy-value/schema.d.ts +45 -0
- package/dist/components/cron-input/classes.d.ts +25 -0
- package/dist/components/cron-input/html.d.ts +36 -0
- package/dist/components/cron-input/html.js +204 -0
- package/dist/components/cron-input/index.d.ts +59 -0
- package/dist/components/cron-input/react.d.ts +7 -0
- package/dist/components/{ui/cron-expression-editor.js → cron-input/react.js} +126 -54
- package/dist/components/cron-input/schema.d.ts +24 -0
- package/dist/components/danger-confirmation/classes.d.ts +7 -0
- package/dist/components/danger-confirmation/html.d.ts +39 -0
- package/dist/components/danger-confirmation/html.js +227 -0
- package/dist/components/danger-confirmation/index.d.ts +113 -0
- package/dist/components/{ui/danger-confirmation.d.ts → danger-confirmation/react.d.ts} +3 -12
- package/dist/components/{ui/danger-confirmation.js → danger-confirmation/react.js} +203 -205
- package/dist/components/danger-confirmation/schema.d.ts +34 -0
- package/dist/components/data-table/classes.d.ts +63 -0
- package/dist/components/data-table/html.d.ts +1938 -0
- package/dist/components/data-table/html.js +2682 -0
- package/dist/components/data-table/index.d.ts +2686 -0
- package/dist/components/data-table/react.d.ts +578 -0
- package/dist/components/{ui/data-table.js → data-table/react.js} +1958 -835
- package/dist/components/data-table/schema.d.ts +3012 -0
- package/dist/components/date-input/classes.d.ts +17 -0
- package/dist/components/date-input/html.d.ts +60 -0
- package/dist/components/date-input/html.js +418 -0
- package/dist/components/date-input/index.d.ts +91 -0
- package/dist/components/date-input/react.d.ts +10 -0
- package/dist/components/{ui/date-picker.js → date-input/react.js} +233 -79
- package/dist/components/date-input/schema.d.ts +41 -0
- package/dist/components/editable-text/classes.d.ts +17 -0
- package/dist/components/editable-text/html.d.ts +51 -0
- package/dist/components/editable-text/html.js +370 -0
- package/dist/components/editable-text/index.d.ts +143 -0
- package/dist/components/editable-text/react.d.ts +6 -0
- package/dist/components/editable-text/react.js +345 -0
- package/dist/components/editable-text/schema.d.ts +31 -0
- package/dist/components/editing-locale-switcher/classes.d.ts +7 -0
- package/dist/components/editing-locale-switcher/html.d.ts +27 -0
- package/dist/components/editing-locale-switcher/html.js +250 -0
- package/dist/components/editing-locale-switcher/index.d.ts +52 -0
- package/dist/components/editing-locale-switcher/react.d.ts +7 -0
- package/dist/components/{ui/editing-locale-switcher.js → editing-locale-switcher/react.js} +63 -10
- package/dist/components/editing-locale-switcher/schema.d.ts +16 -0
- package/dist/components/{ui/effect-form.d.ts → effect-form/react.d.ts} +2 -2
- package/dist/components/{ui/effect-form.js → effect-form/react.js} +302 -76
- package/dist/components/effectcn/alert-dialog.d.ts +13 -0
- package/dist/components/effectcn/button.d.ts +31 -0
- package/dist/components/effectcn/calendar.d.ts +12 -0
- package/dist/components/effectcn/checkbox.d.ts +10 -0
- package/dist/components/effectcn/combobox.d.ts +25 -0
- package/dist/components/effectcn/dialog.d.ts +19 -0
- package/dist/components/effectcn/field.d.ts +11 -0
- package/dist/components/effectcn/file-drop.d.ts +8 -0
- package/dist/components/effectcn/input.d.ts +26 -0
- package/dist/components/effectcn/menu.d.ts +85 -0
- package/dist/components/effectcn/menubar.d.ts +8 -0
- package/dist/components/effectcn/popover.d.ts +18 -0
- package/dist/components/effectcn/scroll-area.d.ts +12 -0
- package/dist/components/effectcn/select.d.ts +68 -0
- package/dist/components/effectcn/toast.d.ts +29 -0
- package/dist/components/email-composer/index.d.ts +229 -0
- package/dist/components/email-composer/labels.d.ts +12 -0
- package/dist/components/email-composer/react.d.ts +5 -0
- package/dist/components/{ui/email-composer.js → email-composer/react.js} +461 -127
- package/dist/components/email-composer/schema.d.ts +42 -0
- package/dist/components/email-editor/classes.d.ts +21 -0
- package/dist/components/email-editor/html.d.ts +360 -0
- package/dist/components/email-editor/html.js +1706 -0
- package/dist/components/email-editor/index.d.ts +693 -0
- package/dist/components/{ui/email-editor.d.ts → email-editor/labels.d.ts} +1 -21
- package/dist/components/email-editor/legacy-editor.html.d.ts +160 -0
- package/dist/components/email-editor/react.d.ts +11 -0
- package/dist/components/{ui/email-editor.js → email-editor/react.js} +600 -230
- package/dist/components/email-editor/schema.d.ts +162 -0
- package/dist/components/error-component/classes.d.ts +7 -0
- package/dist/components/error-component/html.d.ts +120 -0
- package/dist/components/error-component/html.js +346 -0
- package/dist/components/error-component/index.d.ts +69 -0
- package/dist/components/error-component/react.d.ts +8 -0
- package/dist/components/{ui/error-component.js → error-component/react.js} +281 -78
- package/dist/components/error-component/schema.d.ts +56 -0
- package/dist/components/file-input/classes.d.ts +7 -0
- package/dist/components/file-input/html.d.ts +95 -0
- package/dist/components/file-input/html.js +368 -0
- package/dist/components/file-input/index.d.ts +99 -0
- package/dist/components/file-input/react.d.ts +11 -0
- package/dist/components/{ui/file-picker.js → file-input/react.js} +122 -19
- package/dist/components/file-input/schema.d.ts +37 -0
- package/dist/components/{ui/form.d.ts → form/react.d.ts} +7 -7
- package/dist/components/{ui/form.js → form/react.js} +300 -74
- package/dist/components/icon-input/html.d.ts +55 -0
- package/dist/components/icon-input/html.js +538 -0
- package/dist/components/icon-input/index.d.ts +143 -0
- package/dist/components/icon-input/react.d.ts +6 -0
- package/dist/components/{ui/icon-input.js → icon-input/react.js} +305 -89
- package/dist/components/icon-input/schema.d.ts +23 -0
- package/dist/components/image-crop-editor/classes.d.ts +19 -0
- package/dist/components/image-crop-editor/html.d.ts +66 -0
- package/dist/components/image-crop-editor/html.js +561 -0
- package/dist/components/image-crop-editor/index.d.ts +183 -0
- package/dist/components/image-crop-editor/react.d.ts +8 -0
- package/dist/components/image-crop-editor/react.js +648 -0
- package/dist/components/image-crop-editor/schema.d.ts +54 -0
- package/dist/components/krakstack-provider/html.d.ts +17 -0
- package/dist/components/krakstack-provider/html.js +37 -0
- package/dist/components/krakstack-provider/index.d.ts +7 -0
- package/dist/components/krakstack-provider/react.d.ts +8 -0
- package/dist/components/{ui/krakstack-provider.js → krakstack-provider/react.js} +14 -5
- package/dist/components/krakstack-provider/schema.d.ts +6 -0
- package/dist/components/loading/classes.d.ts +5 -0
- package/dist/components/loading/html.d.ts +18 -0
- package/dist/components/loading/html.js +166 -0
- package/dist/components/loading/index.d.ts +6 -0
- package/dist/components/loading/react.d.ts +4 -0
- package/dist/components/loading/react.js +51 -0
- package/dist/components/loading/schema.d.ts +23 -0
- package/dist/components/locale-switcher/html.d.ts +22 -0
- package/dist/components/locale-switcher/html.js +264 -0
- package/dist/components/locale-switcher/index.d.ts +50 -0
- package/dist/components/locale-switcher/react.d.ts +7 -0
- package/dist/components/{ui/locale-switcher.js → locale-switcher/react.js} +55 -22
- package/dist/components/locale-switcher/schema.d.ts +12 -0
- package/dist/components/map-menu/classes.d.ts +13 -0
- package/dist/components/map-menu/google-maps.d.ts +80 -0
- package/dist/components/map-menu/google-viewport.d.ts +7 -0
- package/dist/components/map-menu/html.d.ts +274 -0
- package/dist/components/map-menu/html.js +934 -0
- package/dist/components/map-menu/index.d.ts +246 -0
- package/dist/components/map-menu/map.d.ts +47 -0
- package/dist/components/map-menu/react.d.ts +40 -0
- package/dist/components/{ui/map-menu.js → map-menu/react.js} +321 -83
- package/dist/components/map-menu/schema.d.ts +132 -0
- package/dist/components/markdown/classes.d.ts +1 -0
- package/dist/components/markdown/html.d.ts +23 -0
- package/dist/components/markdown/html.js +510 -0
- package/dist/components/markdown/index.d.ts +6 -0
- package/dist/components/markdown/react.d.ts +3 -0
- package/dist/components/markdown/react.js +392 -0
- package/dist/components/markdown/schema.d.ts +20 -0
- package/dist/components/notification-menu/classes.d.ts +11 -0
- package/dist/components/notification-menu/html.d.ts +67 -0
- package/dist/components/notification-menu/html.js +425 -0
- package/dist/components/notification-menu/index.d.ts +132 -0
- package/dist/components/notification-menu/react.d.ts +57 -0
- package/dist/components/notification-menu/react.js +829 -0
- package/dist/components/notification-menu/schema.d.ts +59 -0
- package/dist/components/pagination/classes.d.ts +19 -0
- package/dist/components/pagination/html.d.ts +49 -0
- package/dist/components/pagination/html.js +387 -0
- package/dist/components/pagination/index.d.ts +109 -0
- package/dist/components/pagination/react.d.ts +9 -0
- package/dist/components/{ui/pagination.js → pagination/react.js} +123 -23
- package/dist/components/pagination/schema.d.ts +36 -0
- package/dist/components/phone-number-input/classes.d.ts +17 -0
- package/dist/components/phone-number-input/html.d.ts +52 -0
- package/dist/components/phone-number-input/html.js +655 -0
- package/dist/components/phone-number-input/index.d.ts +59 -0
- package/dist/components/phone-number-input/react.d.ts +11 -0
- package/dist/components/{ui/phone-number-input.js → phone-number-input/react.js} +368 -138
- package/dist/components/phone-number-input/schema.d.ts +31 -0
- package/dist/components/presence-transition/html.d.ts +13 -0
- package/dist/components/presence-transition/html.js +128 -0
- package/dist/components/presence-transition/index.d.ts +57 -0
- package/dist/components/{ui/presence-transition.d.ts → presence-transition/react.d.ts} +3 -5
- package/dist/components/presence-transition/react.js +139 -0
- package/dist/components/presence-transition/schema.d.ts +7 -0
- package/dist/components/registry-previews/component-example.d.ts +31 -0
- package/dist/components/registry-previews/component-example.js +525 -0
- package/dist/components/registry-previews/html-preview.d.ts +17 -0
- package/dist/components/registry-previews/html-preview.js +83 -0
- package/dist/components/rich-text-editor/classes.d.ts +15 -0
- package/dist/components/rich-text-editor/engine.d.ts +9 -0
- package/dist/components/rich-text-editor/html.d.ts +246 -0
- package/dist/components/rich-text-editor/html.js +830 -0
- package/dist/components/rich-text-editor/index.d.ts +453 -0
- package/dist/components/rich-text-editor/labels.d.ts +42 -0
- package/dist/components/rich-text-editor/react.d.ts +19 -0
- package/dist/components/{ui/rich-text-editor.js → rich-text-editor/react.js} +365 -96
- package/dist/components/rich-text-editor/schema.d.ts +116 -0
- package/dist/components/search-menu/classes.d.ts +9 -0
- package/dist/components/search-menu/html.d.ts +127 -0
- package/dist/components/search-menu/html.js +432 -0
- package/dist/components/search-menu/index.d.ts +85 -0
- package/dist/components/search-menu/react.d.ts +18 -0
- package/dist/components/{ui/search-menu.js → search-menu/react.js} +128 -23
- package/dist/components/search-menu/schema.d.ts +78 -0
- package/dist/components/select-with-custom-input/classes.d.ts +17 -0
- package/dist/components/select-with-custom-input/html.d.ts +60 -0
- package/dist/components/select-with-custom-input/html.js +238 -0
- package/dist/components/select-with-custom-input/index.d.ts +114 -0
- package/dist/components/select-with-custom-input/react.d.ts +7 -0
- package/dist/components/{ui/select-with-custom-input.js → select-with-custom-input/react.js} +127 -22
- package/dist/components/select-with-custom-input/schema.d.ts +54 -0
- package/dist/components/sidebar-layout/classes.d.ts +21 -0
- package/dist/components/sidebar-layout/html.d.ts +97 -0
- package/dist/components/sidebar-layout/html.js +361 -0
- package/dist/components/sidebar-layout/index.d.ts +57 -0
- package/dist/components/sidebar-layout/react.d.ts +30 -0
- package/dist/components/{ui/sidebar-layout.js → sidebar-layout/react.js} +199 -39
- package/dist/components/sidebar-layout/schema.d.ts +54 -0
- package/dist/components/stats-card/classes.d.ts +11 -0
- package/dist/components/stats-card/html.d.ts +15 -0
- package/dist/components/stats-card/html.js +55 -0
- package/dist/components/stats-card/react.d.ts +7 -0
- package/dist/components/{ui/stats-card.js → stats-card/react.js} +19 -15
- package/dist/components/stats-card/schema.d.ts +14 -0
- package/dist/components/stepper/classes.d.ts +39 -0
- package/dist/components/stepper/html.d.ts +107 -0
- package/dist/components/stepper/html.js +397 -0
- package/dist/components/stepper/index.d.ts +83 -0
- package/dist/components/stepper/react.d.ts +17 -0
- package/dist/components/{ui/stepper.js → stepper/react.js} +120 -21
- package/dist/components/stepper/schema.d.ts +52 -0
- package/dist/components/support/classes.d.ts +55 -0
- package/dist/components/support/form.d.ts +19 -0
- package/dist/components/support/html.d.ts +266 -0
- package/dist/components/support/html.js +604 -0
- package/dist/components/support/index.d.ts +226 -0
- package/dist/components/support/multipart.d.ts +21 -0
- package/dist/components/support/react.d.ts +54 -0
- package/dist/components/support/react.js +1098 -0
- package/dist/components/support/schema.d.ts +69 -0
- package/dist/components/support.d.ts +1 -66
- package/dist/components/theme-switcher/html.d.ts +28 -0
- package/dist/components/theme-switcher/html.js +288 -0
- package/dist/components/theme-switcher/index.d.ts +59 -0
- package/dist/components/{ui/theme-switcher.d.ts → theme-switcher/react.d.ts} +4 -12
- package/dist/components/{ui/theme-switcher.js → theme-switcher/react.js} +69 -35
- package/dist/components/theme-switcher/schema.d.ts +33 -0
- package/dist/components/time-input/classes.d.ts +23 -0
- package/dist/components/time-input/html.d.ts +75 -0
- package/dist/components/time-input/html.js +571 -0
- package/dist/components/time-input/index.d.ts +164 -0
- package/dist/components/time-input/react.d.ts +7 -0
- package/dist/components/{ui/time-picker.js → time-input/react.js} +286 -114
- package/dist/components/time-input/schema.d.ts +96 -0
- package/dist/components/timezone-input/classes.d.ts +13 -0
- package/dist/components/timezone-input/html.d.ts +58 -0
- package/dist/components/timezone-input/html.js +804 -0
- package/dist/components/timezone-input/index.d.ts +170 -0
- package/dist/components/timezone-input/react.d.ts +9 -0
- package/dist/components/{ui/timezone-select.js → timezone-input/react.js} +337 -104
- package/dist/components/timezone-input/schema.d.ts +43 -0
- package/dist/components/toast/classes.d.ts +7 -0
- package/dist/components/toast/html.d.ts +34 -0
- package/dist/components/toast/html.js +280 -0
- package/dist/components/toast/index.d.ts +10 -0
- package/dist/components/toast/react.d.ts +9 -0
- package/dist/components/{ui/toast.js → toast/react.js} +35 -15
- package/dist/components/toast/schema.d.ts +24 -0
- package/dist/{services/events/client/tracking-notice.d.ts → components/tracking-notice/react.d.ts} +7 -1
- package/dist/{services/events/client/tracking-notice.js → components/tracking-notice/react.js} +13 -7
- package/dist/components/ui/animated-list.d.ts +1 -21
- package/dist/components/ui/app-brand.d.ts +1 -33
- package/dist/components/ui/async-action-button.d.ts +1 -17
- package/dist/components/ui/code-block.d.ts +1 -14
- package/dist/components/ui/copy-button.d.ts +1 -21
- package/dist/components/ui/data-table.d.ts +1 -584
- package/dist/components/ui/krakstack-provider.d.ts +1 -9
- package/dist/components/ui/loading.d.ts +1 -13
- package/dist/components/ui/pagination.d.ts +1 -47
- package/dist/components/ui/rich-text-editor.d.ts +1 -72
- package/dist/components/ui/search-menu.d.ts +1 -36
- package/dist/components/ui/sidebar-layout.d.ts +1 -40
- package/dist/components/ui/virtualized-combobox.d.ts +1 -59
- package/dist/components/unsaved-changes-guard/html.d.ts +34 -0
- package/dist/components/unsaved-changes-guard/html.js +172 -0
- package/dist/components/unsaved-changes-guard/index.d.ts +56 -0
- package/dist/components/unsaved-changes-guard/react.d.ts +4 -0
- package/dist/components/{ui/unsaved-changes-guard.js → unsaved-changes-guard/react.js} +74 -11
- package/dist/components/unsaved-changes-guard/schema.d.ts +37 -0
- package/dist/components/upload-attachment/classes.d.ts +11 -0
- package/dist/components/upload-attachment/html.d.ts +84 -0
- package/dist/components/upload-attachment/html.js +312 -0
- package/dist/components/upload-attachment/index.d.ts +72 -0
- package/dist/components/upload-attachment/react.d.ts +9 -0
- package/dist/components/{ui/upload-attachment.js → upload-attachment/react.js} +114 -17
- package/dist/components/upload-attachment/schema.d.ts +53 -0
- package/dist/components/virtualized-combobox/classes.d.ts +7 -0
- package/dist/components/virtualized-combobox/html.d.ts +97 -0
- package/dist/components/virtualized-combobox/html.js +310 -0
- package/dist/components/virtualized-combobox/index.d.ts +182 -0
- package/dist/components/virtualized-combobox/react.d.ts +31 -0
- package/dist/components/{ui/virtualized-combobox.js → virtualized-combobox/react.js} +160 -40
- package/dist/components/virtualized-combobox/schema.d.ts +92 -0
- package/dist/components/webhook-delivery-table/html.d.ts +216 -0
- package/dist/components/webhook-delivery-table/html.js +3008 -0
- package/dist/components/webhook-delivery-table/index.d.ts +405 -0
- package/dist/components/webhook-delivery-table/react.d.ts +13 -0
- package/dist/{services/webhooks/client/delivery-table.js → components/webhook-delivery-table/react.js} +2278 -917
- package/dist/components/webhook-delivery-table/schema.d.ts +134 -0
- package/dist/lib/docs.d.ts +17 -1
- package/dist/lib/docs.integrations.server.js +341 -75
- package/dist/lib/docs.js +715 -299
- package/dist/lib/docs.server.js +325 -59
- package/dist/lib/documentation-toolkit.d.ts +4 -4
- package/dist/lib/documentation-toolkit.js +337 -71
- package/dist/lib/effect-ui-adapter/model-runtime.d.ts +17 -0
- package/dist/lib/effect-ui-adapter/use-model.d.ts +9 -0
- package/dist/lib/effect-ui-adapter/use-model.js +158 -0
- package/dist/lib/effectcn-form.d.ts +3 -0
- package/dist/lib/effectcn-form.js +54 -0
- package/dist/lib/email-composer/index.d.ts +12 -0
- package/dist/lib/email-composer/schema.d.ts +14 -0
- package/dist/lib/httpapi-toolkit.d.ts +1 -1
- package/dist/lib/lucide-effect.d.ts +39 -0
- package/dist/lib/markdown/content.d.ts +1 -12
- package/dist/lib/rich-text/model.d.ts +5 -0
- package/dist/lib/webfetch-toolkit.d.ts +1 -1
- package/dist/services/agent/client/index.js +530 -168
- package/dist/services/agent/client/widget.d.ts +1 -55
- package/dist/services/notification/client/index.js +138 -27
- package/dist/services/notification/client/notification-menu.d.ts +1 -85
- package/dist/services/notification/public.js +138 -27
- package/dist/services/opentelemetry/browser.js +15 -9
- package/dist/services/webhooks/index.d.ts +4 -3
- package/package.json +185 -142
- package/dist/components/support-dialog.js +0 -881
- package/dist/components/support.js +0 -881
- package/dist/components/ui/animated-number.js +0 -75
- package/dist/components/ui/app-brand.js +0 -126
- package/dist/components/ui/app-switcher.d.ts +0 -26
- package/dist/components/ui/async-action-button.js +0 -149
- package/dist/components/ui/auto-height.js +0 -86
- package/dist/components/ui/bulk-list-input.d.ts +0 -25
- package/dist/components/ui/choice-cards.d.ts +0 -33
- package/dist/components/ui/color-picker.d.ts +0 -31
- package/dist/components/ui/copy-button.js +0 -138
- package/dist/components/ui/copy-value.d.ts +0 -24
- package/dist/components/ui/cron-expression-editor.d.ts +0 -16
- package/dist/components/ui/cron-expression-editor.schema.d.ts +0 -7
- package/dist/components/ui/date-picker.d.ts +0 -33
- package/dist/components/ui/date-picker.schema.d.ts +0 -9
- package/dist/components/ui/editable-text.d.ts +0 -19
- package/dist/components/ui/editable-text.js +0 -341
- package/dist/components/ui/editing-locale-switcher.d.ts +0 -11
- package/dist/components/ui/error-component.d.ts +0 -34
- package/dist/components/ui/file-picker.d.ts +0 -37
- package/dist/components/ui/icon-input.d.ts +0 -58
- package/dist/components/ui/image-crop-editor.d.ts +0 -41
- package/dist/components/ui/image-crop-editor.js +0 -417
- package/dist/components/ui/loading.js +0 -39
- package/dist/components/ui/locale-switcher.d.ts +0 -11
- package/dist/components/ui/map-menu-map.d.ts +0 -115
- package/dist/components/ui/map-menu.d.ts +0 -87
- package/dist/components/ui/phone-number-input.d.ts +0 -22
- package/dist/components/ui/phone-number-input.schema.d.ts +0 -7
- package/dist/components/ui/presence-transition.js +0 -94
- package/dist/components/ui/select-with-custom-input.d.ts +0 -36
- package/dist/components/ui/stats-card.d.ts +0 -12
- package/dist/components/ui/stepper.d.ts +0 -37
- package/dist/components/ui/time-picker.d.ts +0 -50
- package/dist/components/ui/time-picker.schema.d.ts +0 -28
- package/dist/components/ui/timezone-select.d.ts +0 -57
- package/dist/components/ui/timezone-select.schema.d.ts +0 -9
- package/dist/components/ui/toast.d.ts +0 -18
- package/dist/components/ui/unsaved-changes-guard.d.ts +0 -16
- package/dist/components/ui/upload-attachment.d.ts +0 -39
- package/dist/services/notification/persistence/drizzle.d.ts +0 -868
- package/dist/services/notification/persistence/drizzle.js +0 -214
- package/dist/services/notification/persistence/index.d.ts +0 -2
- package/dist/services/notification/persistence/index.js +0 -227
- package/dist/services/notification/persistence/schema.d.ts +0 -143
- package/dist/services/notification/persistence/schema.js +0 -118
- package/dist/services/webhooks/client/delivery-table.d.ts +0 -62
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Component } from "effect/ui";
|
|
3
|
+
import { Html } from "effect/ui/html";
|
|
4
|
+
export type { StepperContentProps } from "./schema.js";
|
|
5
|
+
declare const Step: Schema.Struct<{
|
|
6
|
+
readonly id: Schema.String;
|
|
7
|
+
readonly label: Schema.String;
|
|
8
|
+
readonly description: Schema.optional<Schema.String>;
|
|
9
|
+
readonly state: Schema.optional<Schema.Literals<readonly ["upcoming", "completed", "error"]>>;
|
|
10
|
+
readonly disabled: Schema.optional<Schema.Boolean>;
|
|
11
|
+
readonly disabledReason: Schema.optional<Schema.String>;
|
|
12
|
+
readonly icon: Schema.optional<Schema.mutable<Schema.$Array<Schema.mutable<Schema.Tuple<readonly [Schema.String, Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Union<readonly [Schema.String, Schema.Number]>>>]>>>>>;
|
|
13
|
+
}>;
|
|
14
|
+
declare const props: Schema.Struct<{
|
|
15
|
+
readonly classes: Schema.optional<Schema.$Record<Schema.Literals<("currentStep" | "labelledActiveIndicator" | "labelledCompletedIndicator" | "labelledErrorIndicator" | "labelledStepPadding" | "responsiveStepAlignment" | "responsiveStepLabel" | "responsiveStepTrigger" | "selectableStep" | "stepTitle" | "stepTrigger" | "steps" | "underlineSteps" | "verticalStepTrigger")[]>, Schema.optionalKey<Schema.String>>>;
|
|
16
|
+
readonly currentStep: Schema.String;
|
|
17
|
+
readonly variant: Schema.optional<Schema.Literals<readonly ["labelled", "segmented", "underline"]>>;
|
|
18
|
+
readonly orientation: Schema.optional<Schema.Literals<readonly ["horizontal", "vertical", "responsive"]>>;
|
|
19
|
+
readonly locale: Schema.optional<Schema.String>;
|
|
20
|
+
readonly className: Schema.optional<Schema.String>;
|
|
21
|
+
readonly "aria-label": Schema.optional<Schema.String>;
|
|
22
|
+
readonly messages: Schema.optional<Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Struct<{
|
|
23
|
+
readonly label: Schema.optional<Schema.String>;
|
|
24
|
+
readonly completed: Schema.optional<Schema.String>;
|
|
25
|
+
readonly error: Schema.optional<Schema.String>;
|
|
26
|
+
}>>>>;
|
|
27
|
+
readonly steps: Schema.$Array<Schema.Struct<{
|
|
28
|
+
readonly id: Schema.String;
|
|
29
|
+
readonly label: Schema.String;
|
|
30
|
+
readonly description: Schema.optional<Schema.String>;
|
|
31
|
+
readonly state: Schema.optional<Schema.Literals<readonly ["upcoming", "completed", "error"]>>;
|
|
32
|
+
readonly disabled: Schema.optional<Schema.Boolean>;
|
|
33
|
+
readonly disabledReason: Schema.optional<Schema.String>;
|
|
34
|
+
readonly icon: Schema.optional<Schema.mutable<Schema.$Array<Schema.mutable<Schema.Tuple<readonly [Schema.String, Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Union<readonly [Schema.String, Schema.Number]>>>]>>>>>;
|
|
35
|
+
}>>;
|
|
36
|
+
readonly selectable: Schema.optional<Schema.Boolean>;
|
|
37
|
+
}>;
|
|
38
|
+
export type StepperStep = typeof Step.Type;
|
|
39
|
+
export type StepperProps = typeof props.Type;
|
|
40
|
+
export declare const Stepper: Component.Component<"Stepper", {
|
|
41
|
+
readonly classes?: {
|
|
42
|
+
readonly currentStep?: string | undefined;
|
|
43
|
+
readonly labelledActiveIndicator?: string | undefined;
|
|
44
|
+
readonly labelledCompletedIndicator?: string | undefined;
|
|
45
|
+
readonly labelledErrorIndicator?: string | undefined;
|
|
46
|
+
readonly labelledStepPadding?: string | undefined;
|
|
47
|
+
readonly responsiveStepAlignment?: string | undefined;
|
|
48
|
+
readonly responsiveStepLabel?: string | undefined;
|
|
49
|
+
readonly responsiveStepTrigger?: string | undefined;
|
|
50
|
+
readonly selectableStep?: string | undefined;
|
|
51
|
+
readonly stepTitle?: string | undefined;
|
|
52
|
+
readonly stepTrigger?: string | undefined;
|
|
53
|
+
readonly steps?: string | undefined;
|
|
54
|
+
readonly underlineSteps?: string | undefined;
|
|
55
|
+
readonly verticalStepTrigger?: string | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
readonly currentStep: string;
|
|
58
|
+
readonly variant?: "labelled" | "segmented" | "underline" | undefined;
|
|
59
|
+
readonly orientation?: "horizontal" | "responsive" | "vertical" | undefined;
|
|
60
|
+
readonly locale?: string | undefined;
|
|
61
|
+
readonly className?: string | undefined;
|
|
62
|
+
readonly "aria-label"?: string | undefined;
|
|
63
|
+
readonly messages?: {
|
|
64
|
+
readonly [x: string]: {
|
|
65
|
+
readonly label?: string | undefined;
|
|
66
|
+
readonly completed?: string | undefined;
|
|
67
|
+
readonly error?: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
readonly steps: readonly {
|
|
71
|
+
readonly id: string;
|
|
72
|
+
readonly label: string;
|
|
73
|
+
readonly description?: string | undefined;
|
|
74
|
+
readonly state?: "completed" | "error" | "upcoming" | undefined;
|
|
75
|
+
readonly disabled?: boolean | undefined;
|
|
76
|
+
readonly disabledReason?: string | undefined;
|
|
77
|
+
readonly icon?: [string, {
|
|
78
|
+
readonly [x: string]: string | number | undefined;
|
|
79
|
+
}][] | undefined;
|
|
80
|
+
}[];
|
|
81
|
+
readonly selectable?: boolean | undefined;
|
|
82
|
+
}, null, {
|
|
83
|
+
readonly _tag: "Select";
|
|
84
|
+
readonly id: string;
|
|
85
|
+
}, {
|
|
86
|
+
readonly _tag: "StepSelected";
|
|
87
|
+
readonly step: {
|
|
88
|
+
readonly id: string;
|
|
89
|
+
readonly label: string;
|
|
90
|
+
readonly description?: string | undefined;
|
|
91
|
+
readonly state?: "completed" | "error" | "upcoming" | undefined;
|
|
92
|
+
readonly disabled?: boolean | undefined;
|
|
93
|
+
readonly disabledReason?: string | undefined;
|
|
94
|
+
};
|
|
95
|
+
}, never, Html.Elements, {}, never>;
|
|
96
|
+
export declare const StepperContent: Component.Component<"StepperContent", {
|
|
97
|
+
readonly classes?: {
|
|
98
|
+
readonly transitionContent?: string | undefined;
|
|
99
|
+
readonly transitionOverlay?: string | undefined;
|
|
100
|
+
readonly transitionRoot?: string | undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
readonly step: string;
|
|
103
|
+
readonly direction?: "backward" | "forward" | "none" | undefined;
|
|
104
|
+
readonly animate?: boolean | undefined;
|
|
105
|
+
readonly focusTarget?: string | undefined;
|
|
106
|
+
readonly className?: string | undefined;
|
|
107
|
+
}, null, never, never, never, Html.Elements, {}, "content">;
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
// ../../src/components/stepper/html.ts
|
|
2
|
+
import { Effect, Schema as Schema3, Stream } from "effect";
|
|
3
|
+
import { Component as Component2, Mount, View } from "effect/ui";
|
|
4
|
+
import { Html } from "effect/ui/html";
|
|
5
|
+
import { CircleAlert } from "lucide";
|
|
6
|
+
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
7
|
+
|
|
8
|
+
// ../../src/lib/lucide-effect.ts
|
|
9
|
+
import {
|
|
10
|
+
ArrowDown as arrowDown,
|
|
11
|
+
ArrowUp as arrowUp,
|
|
12
|
+
ListFilter as listFilter,
|
|
13
|
+
Check as check,
|
|
14
|
+
ChevronLeft as chevronLeft,
|
|
15
|
+
ChevronDown as chevronDown,
|
|
16
|
+
ChevronRight as chevronRight,
|
|
17
|
+
ChevronsLeft as chevronsLeft,
|
|
18
|
+
ChevronsRight as chevronsRight,
|
|
19
|
+
ChevronsUpDown as chevronsUpDown,
|
|
20
|
+
Copy as copy,
|
|
21
|
+
Download as download,
|
|
22
|
+
Eye as eye,
|
|
23
|
+
EyeOff as eyeOff,
|
|
24
|
+
Ellipsis as ellipsis,
|
|
25
|
+
FileJson as fileJson,
|
|
26
|
+
FileText as fileText,
|
|
27
|
+
GripVertical as gripVertical,
|
|
28
|
+
Image as image,
|
|
29
|
+
LayoutGrid as layoutGrid,
|
|
30
|
+
LoaderCircle as loaderCircle,
|
|
31
|
+
Mail as mail,
|
|
32
|
+
Paperclip as paperclip,
|
|
33
|
+
RefreshCw as refreshCw,
|
|
34
|
+
RotateCcw as rotateCcw,
|
|
35
|
+
Rows3 as rows3,
|
|
36
|
+
Search as search,
|
|
37
|
+
Settings2 as settings2,
|
|
38
|
+
TriangleAlert as triangleAlert,
|
|
39
|
+
X as x
|
|
40
|
+
} from "lucide";
|
|
41
|
+
var createLucideIcon = (icon) => (h, {
|
|
42
|
+
size = 24,
|
|
43
|
+
color = "currentColor",
|
|
44
|
+
strokeWidth = 2,
|
|
45
|
+
className
|
|
46
|
+
} = {}) => h.svg.attrs({
|
|
47
|
+
class: className,
|
|
48
|
+
width: String(size),
|
|
49
|
+
height: String(size),
|
|
50
|
+
viewBox: "0 0 24 24",
|
|
51
|
+
fill: "none",
|
|
52
|
+
stroke: color,
|
|
53
|
+
"stroke-width": String(strokeWidth),
|
|
54
|
+
"stroke-linecap": "round",
|
|
55
|
+
"stroke-linejoin": "round",
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}).children(...icon.map(([tag, attributes]) => {
|
|
58
|
+
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
59
|
+
switch (tag) {
|
|
60
|
+
case "path":
|
|
61
|
+
return h.path.attrs(attrs);
|
|
62
|
+
case "circle":
|
|
63
|
+
return h.circle.attrs(attrs);
|
|
64
|
+
case "ellipse":
|
|
65
|
+
return h.ellipse.attrs(attrs);
|
|
66
|
+
case "line":
|
|
67
|
+
return h.line.attrs(attrs);
|
|
68
|
+
case "polyline":
|
|
69
|
+
return h.polyline.attrs(attrs);
|
|
70
|
+
case "polygon":
|
|
71
|
+
return h.polygon.attrs(attrs);
|
|
72
|
+
case "rect":
|
|
73
|
+
return h.rect.attrs(attrs);
|
|
74
|
+
default:
|
|
75
|
+
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
var Check = createLucideIcon(check);
|
|
79
|
+
var ArrowDown = createLucideIcon(arrowDown);
|
|
80
|
+
var ArrowUp = createLucideIcon(arrowUp);
|
|
81
|
+
var ListFilter = createLucideIcon(listFilter);
|
|
82
|
+
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
83
|
+
var ChevronDown = createLucideIcon(chevronDown);
|
|
84
|
+
var ChevronRight = createLucideIcon(chevronRight);
|
|
85
|
+
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
86
|
+
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
87
|
+
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
88
|
+
var Copy = createLucideIcon(copy);
|
|
89
|
+
var Download = createLucideIcon(download);
|
|
90
|
+
var Eye = createLucideIcon(eye);
|
|
91
|
+
var EyeOff = createLucideIcon(eyeOff);
|
|
92
|
+
var Ellipsis = createLucideIcon(ellipsis);
|
|
93
|
+
var FileJson = createLucideIcon(fileJson);
|
|
94
|
+
var FileText = createLucideIcon(fileText);
|
|
95
|
+
var GripVertical = createLucideIcon(gripVertical);
|
|
96
|
+
var Image = createLucideIcon(image);
|
|
97
|
+
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
98
|
+
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
99
|
+
var Mail = createLucideIcon(mail);
|
|
100
|
+
var Paperclip = createLucideIcon(paperclip);
|
|
101
|
+
var RefreshCw = createLucideIcon(refreshCw);
|
|
102
|
+
var RotateCcw = createLucideIcon(rotateCcw);
|
|
103
|
+
var Rows3 = createLucideIcon(rows3);
|
|
104
|
+
var Search = createLucideIcon(search);
|
|
105
|
+
var Settings2 = createLucideIcon(settings2);
|
|
106
|
+
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
107
|
+
var X = createLucideIcon(x);
|
|
108
|
+
|
|
109
|
+
// ../../src/lib/utils.ts
|
|
110
|
+
import { cn } from "cn";
|
|
111
|
+
|
|
112
|
+
// ../../src/components/stepper/classes.ts
|
|
113
|
+
var stepperClasses = {
|
|
114
|
+
steps: "flex gap-2",
|
|
115
|
+
stepTitle: "min-w-0 break-words",
|
|
116
|
+
stepTrigger: "text-muted-foreground flex min-h-11 w-full min-w-0 items-center rounded-md text-sm",
|
|
117
|
+
responsiveStepTrigger: "flex-col gap-2 text-center sm:flex-row sm:gap-3 sm:text-left",
|
|
118
|
+
verticalStepTrigger: "gap-3 text-left",
|
|
119
|
+
transitionContent: "flow-root min-w-0",
|
|
120
|
+
transitionRoot: "relative min-w-0",
|
|
121
|
+
transitionOverlay: "pointer-events-none absolute inset-0 overflow-hidden",
|
|
122
|
+
underlineSteps: "flex-wrap gap-x-6 gap-y-1",
|
|
123
|
+
labelledStepPadding: "px-2 py-2",
|
|
124
|
+
responsiveStepAlignment: "justify-center lg:justify-start",
|
|
125
|
+
currentStep: "text-foreground font-medium",
|
|
126
|
+
selectableStep: "focus-visible:ring-ring hover:bg-muted/50 focus-visible:ring-2 focus-visible:outline-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60",
|
|
127
|
+
labelledCompletedIndicator: "border-primary/30 bg-primary/10 text-primary",
|
|
128
|
+
labelledActiveIndicator: "border-primary bg-primary text-primary-foreground",
|
|
129
|
+
labelledErrorIndicator: "border-destructive text-destructive",
|
|
130
|
+
responsiveStepLabel: "sr-only lg:not-sr-only"
|
|
131
|
+
};
|
|
132
|
+
var resolveStepperClasses = (overrides) => ({
|
|
133
|
+
...stepperClasses,
|
|
134
|
+
...overrides
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// ../../src/components/stepper/index.ts
|
|
138
|
+
import { Schema as Schema2 } from "effect";
|
|
139
|
+
import { Component, UiSchema } from "effect/ui";
|
|
140
|
+
|
|
141
|
+
// ../../src/components/stepper/schema.ts
|
|
142
|
+
import { Schema, Struct } from "effect";
|
|
143
|
+
var text = Schema.optional(Schema.String);
|
|
144
|
+
var StepperStepSchema = Schema.Struct({
|
|
145
|
+
id: Schema.String,
|
|
146
|
+
label: Schema.String,
|
|
147
|
+
description: text,
|
|
148
|
+
state: Schema.optional(Schema.Literals(["upcoming", "completed", "error"])),
|
|
149
|
+
disabled: Schema.optional(Schema.Boolean),
|
|
150
|
+
disabledReason: text
|
|
151
|
+
}).annotate({ identifier: "StepperStep" });
|
|
152
|
+
var Labels = Schema.Struct({ label: text, completed: text, error: text });
|
|
153
|
+
var contentSlots = [
|
|
154
|
+
"transitionRoot",
|
|
155
|
+
"transitionContent",
|
|
156
|
+
"transitionOverlay"
|
|
157
|
+
];
|
|
158
|
+
var StepperClassesOverridesSchema = Schema.Record(Schema.Literals(Struct.keys(Struct.omit(stepperClasses, contentSlots))), Schema.optionalKey(Schema.String)).annotate({ identifier: "StepperClassesOverrides" });
|
|
159
|
+
var StepperContentClassesOverridesSchema = Schema.Record(Schema.Literals(Struct.keys(Struct.pick(stepperClasses, contentSlots))), Schema.optionalKey(Schema.String)).annotate({ identifier: "StepperContentClassesOverrides" });
|
|
160
|
+
var StepperPropsSchema = Schema.Struct({
|
|
161
|
+
classes: Schema.optional(StepperClassesOverridesSchema),
|
|
162
|
+
steps: Schema.Array(StepperStepSchema),
|
|
163
|
+
currentStep: Schema.String,
|
|
164
|
+
variant: Schema.optional(Schema.Literals(["labelled", "segmented", "underline"])),
|
|
165
|
+
orientation: Schema.optional(Schema.Literals(["horizontal", "vertical", "responsive"])),
|
|
166
|
+
locale: text,
|
|
167
|
+
className: text,
|
|
168
|
+
"aria-label": text,
|
|
169
|
+
messages: Schema.optional(Schema.Record(Schema.String, Schema.UndefinedOr(Labels)))
|
|
170
|
+
}).annotate({ identifier: "StepperProps" });
|
|
171
|
+
var StepperContentPropsSchema = Schema.Struct({
|
|
172
|
+
classes: Schema.optional(StepperContentClassesOverridesSchema),
|
|
173
|
+
step: Schema.String,
|
|
174
|
+
direction: Schema.optional(Schema.Literals(["forward", "backward", "none"])),
|
|
175
|
+
animate: Schema.optional(Schema.Boolean),
|
|
176
|
+
focusTarget: text,
|
|
177
|
+
className: text
|
|
178
|
+
}).annotate({ identifier: "StepperContentProps" });
|
|
179
|
+
|
|
180
|
+
// ../../src/components/stepper/index.ts
|
|
181
|
+
var defaults = {
|
|
182
|
+
en: {
|
|
183
|
+
label: "Progress",
|
|
184
|
+
progress: (current, total) => `Step ${current} of ${total}`,
|
|
185
|
+
completed: "Completed",
|
|
186
|
+
error: "Needs attention"
|
|
187
|
+
},
|
|
188
|
+
fr: {
|
|
189
|
+
label: "Progression",
|
|
190
|
+
progress: (current, total) => `Étape ${current} sur ${total}`,
|
|
191
|
+
completed: "Terminée",
|
|
192
|
+
error: "À vérifier"
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
var stepperMessages = (locale = "en", messages) => {
|
|
196
|
+
const base = locale.split("-")[0] ?? locale;
|
|
197
|
+
return {
|
|
198
|
+
...base === "fr" ? defaults.fr : defaults.en,
|
|
199
|
+
...messages?.[base],
|
|
200
|
+
...messages?.[locale]
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
var canSelectStep = (step, current) => !step.disabled && step.id !== current;
|
|
204
|
+
var StepperMessage = UiSchema.TaggedEnum({
|
|
205
|
+
Select: { id: Schema2.String }
|
|
206
|
+
}).annotate({ identifier: "StepperMessage" });
|
|
207
|
+
var Events = UiSchema.TaggedEnum({
|
|
208
|
+
StepSelected: { step: StepperStepSchema }
|
|
209
|
+
}).annotate({ identifier: "StepperEvents" });
|
|
210
|
+
var stepperOptions = {
|
|
211
|
+
name: "Stepper",
|
|
212
|
+
props: StepperPropsSchema,
|
|
213
|
+
model: Schema2.Null,
|
|
214
|
+
message: StepperMessage,
|
|
215
|
+
events: Events,
|
|
216
|
+
restore: false
|
|
217
|
+
};
|
|
218
|
+
var update = Component.define(stepperOptions).update({
|
|
219
|
+
Select: ($, { id }) => {
|
|
220
|
+
const step = $.props.steps.find((step) => step.id === id);
|
|
221
|
+
return step && canSelectStep(step, $.props.currentStep) ? $.set(null).emit(Events.StepSelected({ step })) : null;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
var stepperBehaviours = {
|
|
225
|
+
init: () => null,
|
|
226
|
+
update
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
// ../../src/components/stepper/html.ts
|
|
230
|
+
var ErrorIcon = createLucideIcon(CircleAlert);
|
|
231
|
+
var IconNode = Schema3.mutable(Schema3.Array(Schema3.mutable(Schema3.Tuple([
|
|
232
|
+
Schema3.String,
|
|
233
|
+
Schema3.Record(Schema3.String, Schema3.UndefinedOr(Schema3.Union([Schema3.String, Schema3.Number])))
|
|
234
|
+
]))));
|
|
235
|
+
var Step = StepperStepSchema.mapFields((fields) => ({
|
|
236
|
+
...fields,
|
|
237
|
+
icon: Schema3.optional(IconNode)
|
|
238
|
+
}));
|
|
239
|
+
var props = StepperPropsSchema.mapFields((fields) => ({
|
|
240
|
+
...fields,
|
|
241
|
+
steps: Schema3.Array(Step),
|
|
242
|
+
selectable: Schema3.optional(Schema3.Boolean)
|
|
243
|
+
}));
|
|
244
|
+
var Stepper = Html.component({
|
|
245
|
+
...stepperOptions,
|
|
246
|
+
props,
|
|
247
|
+
reads: { localeConfig: krakstackLocaleRead }
|
|
248
|
+
}).make({
|
|
249
|
+
...stepperBehaviours,
|
|
250
|
+
view: (h) => {
|
|
251
|
+
const stepperClasses = resolveStepperClasses(h.props.classes);
|
|
252
|
+
const {
|
|
253
|
+
steps,
|
|
254
|
+
currentStep,
|
|
255
|
+
variant = "labelled",
|
|
256
|
+
orientation = "horizontal",
|
|
257
|
+
selectable,
|
|
258
|
+
messages,
|
|
259
|
+
locale,
|
|
260
|
+
className
|
|
261
|
+
} = h.props;
|
|
262
|
+
const copy = stepperMessages(locale ?? h.reads.localeConfig?.locale, messages);
|
|
263
|
+
const currentIndex = steps.findIndex((step) => step.id === currentStep);
|
|
264
|
+
if (currentIndex < 0)
|
|
265
|
+
return View.text("");
|
|
266
|
+
return h.nav.attrs({
|
|
267
|
+
"aria-label": h.props["aria-label"] ?? copy.label,
|
|
268
|
+
"data-slot": "stepper",
|
|
269
|
+
"data-variant": variant,
|
|
270
|
+
"data-orientation": orientation
|
|
271
|
+
}).class(cn("min-w-0", className)).children(h.p.attrs({ "aria-live": "polite", "aria-atomic": "true" }).class("sr-only").children(copy.progress(currentIndex + 1, steps.length)), h.ol.attr("data-slot", "stepper-list").class(cn(stepperClasses.steps, variant === "underline" && stepperClasses.underlineSteps, variant === "underline" && orientation === "horizontal" && "justify-center", orientation === "vertical" && "flex-col", orientation === "responsive" && "lg:flex-col")).children(...steps.map((step, index) => {
|
|
272
|
+
const active = step.id === currentStep;
|
|
273
|
+
const state = step.state ?? "upcoming";
|
|
274
|
+
const trigger = selectable ? h.button.attrs({
|
|
275
|
+
type: "button",
|
|
276
|
+
"aria-disabled": step.disabled ? "true" : undefined,
|
|
277
|
+
title: step.disabledReason ?? step.label
|
|
278
|
+
}).on("click", StepperMessage.Select({ id: step.id })) : h.div;
|
|
279
|
+
return h.li.key(step.id).attrs({ "data-slot": "stepper-item", "data-state": state }).class(cn("min-w-0", variant !== "underline" && "flex-1")).children(trigger.attrs({
|
|
280
|
+
"data-slot": "stepper-trigger",
|
|
281
|
+
"aria-current": active ? "step" : undefined
|
|
282
|
+
}).class(cn(stepperClasses.stepTrigger, variant === "labelled" && orientation === "horizontal" ? stepperClasses.responsiveStepTrigger : stepperClasses.verticalStepTrigger, variant === "labelled" && stepperClasses.labelledStepPadding, orientation === "responsive" && stepperClasses.responsiveStepAlignment, variant === "underline" && "w-auto justify-start rounded-none border-b-2 border-transparent py-3 text-left", variant === "underline" && active && "border-foreground", active && stepperClasses.currentStep, state === "error" && "text-destructive", selectable && stepperClasses.selectableStep)).children(variant !== "underline" && h.span.attrs({
|
|
283
|
+
"data-slot": "stepper-indicator",
|
|
284
|
+
"aria-hidden": "true"
|
|
285
|
+
}).class(cn(variant === "segmented" ? "bg-muted block h-1.5 w-full rounded-full" : "flex size-8 shrink-0 items-center justify-center rounded-full border text-xs font-medium", state === "completed" && (variant === "segmented" ? "bg-primary/50" : stepperClasses.labelledCompletedIndicator), active && (variant === "segmented" ? "bg-primary" : stepperClasses.labelledActiveIndicator), state === "error" && (variant === "segmented" ? "bg-destructive" : stepperClasses.labelledErrorIndicator))).children(variant === "labelled" && (state === "error" ? ErrorIcon(h, { size: 16 }) : state === "completed" && !active ? Check(h, { size: 16 }) : step.icon ? createLucideIcon(step.icon)(h, {
|
|
286
|
+
size: 16
|
|
287
|
+
}) : String(index + 1))), h.span.class(cn(stepperClasses.stepTitle, variant === "segmented" && "sr-only", variant === "labelled" && orientation === "responsive" && stepperClasses.responsiveStepLabel)).children(h.span.attr("data-slot", "stepper-label").class("block").children(step.label), step.description && h.span.attr("data-slot", "stepper-description").class("text-muted-foreground block text-xs").children(step.description), state !== "upcoming" && h.span.class("sr-only").children(` — ${copy[state]}`), step.disabledReason && h.span.class("text-muted-foreground block text-xs").children(step.disabledReason))));
|
|
288
|
+
})));
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
var AnimateStep = Mount.make("StepperContent/Animate", { args: StepperContentPropsSchema.fields }, (wrapper, initial, changes) => {
|
|
292
|
+
const panel = wrapper.querySelector("[data-slot=stepper-panel]");
|
|
293
|
+
const exit = wrapper.querySelector("[data-slot=stepper-exit]");
|
|
294
|
+
if (!panel || !exit)
|
|
295
|
+
return Effect.succeed(Component2.noop);
|
|
296
|
+
let previousStep = initial.step;
|
|
297
|
+
let animation;
|
|
298
|
+
let exitAnimation;
|
|
299
|
+
let snapshot;
|
|
300
|
+
const remember = () => {
|
|
301
|
+
if (wrapper.dataset.step !== previousStep || !wrapper.hasAttribute("data-animate"))
|
|
302
|
+
return;
|
|
303
|
+
const copy = panel.cloneNode(true);
|
|
304
|
+
if (copy instanceof HTMLElement)
|
|
305
|
+
snapshot = copy;
|
|
306
|
+
};
|
|
307
|
+
const clear = () => {
|
|
308
|
+
animation?.cancel();
|
|
309
|
+
exitAnimation?.cancel();
|
|
310
|
+
exit.replaceChildren();
|
|
311
|
+
};
|
|
312
|
+
return Effect.gen(function* () {
|
|
313
|
+
const observer = new MutationObserver(remember);
|
|
314
|
+
observer.observe(panel, {
|
|
315
|
+
subtree: true,
|
|
316
|
+
childList: true,
|
|
317
|
+
attributes: true,
|
|
318
|
+
characterData: true
|
|
319
|
+
});
|
|
320
|
+
panel.addEventListener("input", remember);
|
|
321
|
+
panel.addEventListener("change", remember);
|
|
322
|
+
remember();
|
|
323
|
+
yield* Effect.addFinalizer(() => Effect.sync(() => {
|
|
324
|
+
observer.disconnect();
|
|
325
|
+
panel.removeEventListener("input", remember);
|
|
326
|
+
panel.removeEventListener("change", remember);
|
|
327
|
+
clear();
|
|
328
|
+
}));
|
|
329
|
+
yield* Stream.runForEach(changes, (next) => Effect.sync(() => {
|
|
330
|
+
if (previousStep === next.step) {
|
|
331
|
+
remember();
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
previousStep = next.step;
|
|
335
|
+
const outgoing = snapshot;
|
|
336
|
+
snapshot = undefined;
|
|
337
|
+
clear();
|
|
338
|
+
if (next.focusTarget)
|
|
339
|
+
panel.querySelector(next.focusTarget)?.focus({ preventScroll: true });
|
|
340
|
+
if (next.animate && next.direction && next.direction !== "none" && panel.animate && !globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches) {
|
|
341
|
+
const options = {
|
|
342
|
+
duration: 500,
|
|
343
|
+
easing: "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
344
|
+
};
|
|
345
|
+
const forward = next.direction === "forward";
|
|
346
|
+
animation = panel.animate([
|
|
347
|
+
{ transform: `translateX(${forward ? "100%" : "-100%"})` },
|
|
348
|
+
{ transform: "translateX(0)" }
|
|
349
|
+
], options);
|
|
350
|
+
if (outgoing) {
|
|
351
|
+
outgoing.dataset.slot = "stepper-exiting-panel";
|
|
352
|
+
for (const node of outgoing.querySelectorAll("[id], [name]")) {
|
|
353
|
+
node.removeAttribute("id");
|
|
354
|
+
node.removeAttribute("name");
|
|
355
|
+
}
|
|
356
|
+
for (const control of outgoing.querySelectorAll("button, input, select, textarea"))
|
|
357
|
+
control.setAttribute("disabled", "");
|
|
358
|
+
exit.replaceChildren(outgoing);
|
|
359
|
+
exitAnimation = panel.animate.call(outgoing, [
|
|
360
|
+
{ transform: "translateX(0)" },
|
|
361
|
+
{ transform: `translateX(${forward ? "-100%" : "100%"})` }
|
|
362
|
+
], { ...options, fill: "forwards" });
|
|
363
|
+
exitAnimation.onfinish = () => exit.replaceChildren();
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
remember();
|
|
367
|
+
}));
|
|
368
|
+
return Component2.noop;
|
|
369
|
+
}).pipe(Effect.scoped);
|
|
370
|
+
});
|
|
371
|
+
var StepperContent = Html.component({
|
|
372
|
+
name: "StepperContent",
|
|
373
|
+
props: StepperContentPropsSchema,
|
|
374
|
+
model: Schema3.Null,
|
|
375
|
+
message: Schema3.Never,
|
|
376
|
+
slots: ["content"],
|
|
377
|
+
restore: false
|
|
378
|
+
}).make({
|
|
379
|
+
init: () => null,
|
|
380
|
+
update: () => null,
|
|
381
|
+
view: (h) => {
|
|
382
|
+
const stepperClasses = resolveStepperClasses(h.props.classes);
|
|
383
|
+
return h.div.attrs({
|
|
384
|
+
"data-slot": "stepper-content",
|
|
385
|
+
"data-step": h.props.step,
|
|
386
|
+
"data-animate": h.props.animate ? "" : undefined
|
|
387
|
+
}).class(cn(stepperClasses.transitionRoot, h.props.animate && "overflow-x-clip", h.props.className)).onMount(AnimateStep(h.props)).children(h.div.attrs({
|
|
388
|
+
"data-slot": "stepper-exit",
|
|
389
|
+
inert: "",
|
|
390
|
+
"aria-hidden": "true"
|
|
391
|
+
}).class(stepperClasses.transitionOverlay), h.div.attr("data-slot", "stepper-panel").class(stepperClasses.transitionContent).children(h.slots.content));
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
export {
|
|
395
|
+
Stepper,
|
|
396
|
+
StepperContent
|
|
397
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Component, UiSchema } from "effect/ui";
|
|
3
|
+
import { StepperPropsSchema, type StepperLabels, type StepperStep } from "./schema.js";
|
|
4
|
+
export type StepperMessages = Required<StepperLabels> & {
|
|
5
|
+
progress: (current: number, total: number) => string;
|
|
6
|
+
};
|
|
7
|
+
export type StepperMessageTranslations = Partial<Record<string, Partial<StepperMessages>>>;
|
|
8
|
+
export declare const stepperMessages: (locale?: string, messages?: StepperMessageTranslations) => {
|
|
9
|
+
label: string;
|
|
10
|
+
progress: (current: number, total: number) => string;
|
|
11
|
+
completed: string;
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const canSelectStep: (step: StepperStep, current: string) => boolean;
|
|
15
|
+
export declare const StepperMessage: UiSchema.TaggedEnum<{
|
|
16
|
+
readonly Select: Schema.TaggedStruct<"Select", {
|
|
17
|
+
readonly id: Schema.String;
|
|
18
|
+
}>;
|
|
19
|
+
}>;
|
|
20
|
+
declare const Events: UiSchema.TaggedEnum<{
|
|
21
|
+
readonly StepSelected: Schema.TaggedStruct<"StepSelected", {
|
|
22
|
+
readonly step: Schema.Struct<{
|
|
23
|
+
readonly id: Schema.String;
|
|
24
|
+
readonly label: Schema.String;
|
|
25
|
+
readonly description: Schema.optional<Schema.String>;
|
|
26
|
+
readonly state: Schema.optional<Schema.Literals<readonly ["upcoming", "completed", "error"]>>;
|
|
27
|
+
readonly disabled: Schema.optional<Schema.Boolean>;
|
|
28
|
+
readonly disabledReason: Schema.optional<Schema.String>;
|
|
29
|
+
}>;
|
|
30
|
+
}>;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const stepperOptions: {
|
|
33
|
+
readonly name: "Stepper";
|
|
34
|
+
readonly props: Schema.Struct<{
|
|
35
|
+
readonly classes: Schema.optional<Schema.$Record<Schema.Literals<("currentStep" | "labelledActiveIndicator" | "labelledCompletedIndicator" | "labelledErrorIndicator" | "labelledStepPadding" | "responsiveStepAlignment" | "responsiveStepLabel" | "responsiveStepTrigger" | "selectableStep" | "stepTitle" | "stepTrigger" | "steps" | "underlineSteps" | "verticalStepTrigger")[]>, Schema.optionalKey<Schema.String>>>;
|
|
36
|
+
readonly steps: Schema.$Array<Schema.Struct<{
|
|
37
|
+
readonly id: Schema.String;
|
|
38
|
+
readonly label: Schema.String;
|
|
39
|
+
readonly description: Schema.optional<Schema.String>;
|
|
40
|
+
readonly state: Schema.optional<Schema.Literals<readonly ["upcoming", "completed", "error"]>>;
|
|
41
|
+
readonly disabled: Schema.optional<Schema.Boolean>;
|
|
42
|
+
readonly disabledReason: Schema.optional<Schema.String>;
|
|
43
|
+
}>>;
|
|
44
|
+
readonly currentStep: Schema.String;
|
|
45
|
+
readonly variant: Schema.optional<Schema.Literals<readonly ["labelled", "segmented", "underline"]>>;
|
|
46
|
+
readonly orientation: Schema.optional<Schema.Literals<readonly ["horizontal", "vertical", "responsive"]>>;
|
|
47
|
+
readonly locale: Schema.optional<Schema.String>;
|
|
48
|
+
readonly className: Schema.optional<Schema.String>;
|
|
49
|
+
readonly "aria-label": Schema.optional<Schema.String>;
|
|
50
|
+
readonly messages: Schema.optional<Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Struct<{
|
|
51
|
+
readonly label: Schema.optional<Schema.String>;
|
|
52
|
+
readonly completed: Schema.optional<Schema.String>;
|
|
53
|
+
readonly error: Schema.optional<Schema.String>;
|
|
54
|
+
}>>>>;
|
|
55
|
+
}>;
|
|
56
|
+
readonly model: Schema.Null;
|
|
57
|
+
readonly message: UiSchema.TaggedEnum<{
|
|
58
|
+
readonly Select: Schema.TaggedStruct<"Select", {
|
|
59
|
+
readonly id: Schema.String;
|
|
60
|
+
}>;
|
|
61
|
+
}>;
|
|
62
|
+
readonly events: UiSchema.TaggedEnum<{
|
|
63
|
+
readonly StepSelected: Schema.TaggedStruct<"StepSelected", {
|
|
64
|
+
readonly step: Schema.Struct<{
|
|
65
|
+
readonly id: Schema.String;
|
|
66
|
+
readonly label: Schema.String;
|
|
67
|
+
readonly description: Schema.optional<Schema.String>;
|
|
68
|
+
readonly state: Schema.optional<Schema.Literals<readonly ["upcoming", "completed", "error"]>>;
|
|
69
|
+
readonly disabled: Schema.optional<Schema.Boolean>;
|
|
70
|
+
readonly disabledReason: Schema.optional<Schema.String>;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
73
|
+
}>;
|
|
74
|
+
readonly restore: false;
|
|
75
|
+
};
|
|
76
|
+
type Message = typeof StepperMessage.Type;
|
|
77
|
+
type Event = typeof Events.Type;
|
|
78
|
+
type Props = typeof StepperPropsSchema.Type;
|
|
79
|
+
export declare const stepperBehaviours: {
|
|
80
|
+
init: () => null;
|
|
81
|
+
update: (context: Component.Update<null, Message, Event, Props>, message: Message) => null | Component.Step<null, Message, Event>;
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { type StepperMessageTranslations } from "./index.js";
|
|
3
|
+
import type { StepperProps as SharedProps, StepperStep as SharedStep, StepperContentProps as SharedContent } from "./schema.js";
|
|
4
|
+
export type { StepperMessages, StepperMessageTranslations } from "./index.js";
|
|
5
|
+
export type StepperStep = SharedStep & {
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type StepperProps = Omit<ComponentProps<"nav">, "children"> & Omit<SharedProps, "steps" | "messages"> & {
|
|
9
|
+
steps: readonly StepperStep[];
|
|
10
|
+
onStepSelect?: (step: StepperStep) => void;
|
|
11
|
+
messages?: StepperMessageTranslations;
|
|
12
|
+
};
|
|
13
|
+
/** Controlled progress navigation, not a form or workflow engine. */
|
|
14
|
+
export declare const Stepper: ({ classes: classOverrides, steps, currentStep, onStepSelect, variant, orientation, locale: localeOverride, messages, className, "aria-label": ariaLabel, ...props }: StepperProps) => import("react").JSX.Element | null;
|
|
15
|
+
export type StepperContentProps = ComponentProps<"div"> & SharedContent;
|
|
16
|
+
/** Keeps content mounted; callers own field state and route transitions. */
|
|
17
|
+
export declare const StepperContent: ({ classes: classOverrides, step, direction, animate, focusTarget, children, className, ...props }: StepperContentProps) => import("react").JSX.Element;
|