@krak-stack/registry 0.10.19 → 0.11.1
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 +105 -0
- package/README.md +28 -7
- package/dist/components/agent/index.d.ts +454 -0
- package/dist/components/agent/react.d.ts +55 -0
- package/dist/components/agent/react.js +2594 -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/animated-list/react.js +711 -0
- 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 +278 -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 +378 -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} +2195 -918
- 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/code-block/react.js +493 -0
- 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 +388 -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/copy-value/react.js +682 -0
- 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/danger-confirmation/react.js +550 -0
- 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} +2189 -906
- 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 +499 -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} +70 -17
- 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} +309 -83
- 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/email-composer/react.js +1354 -0
- 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 -19
- 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} +1057 -712
- 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/error-component/react.js +744 -0
- 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} +4 -4
- package/dist/components/{ui/form.js → form/react.js} +314 -84
- 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} +459 -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 +802 -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} +502 -141
- 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 +546 -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} +130 -30
- 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 +293 -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 +679 -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/rich-text-editor/react.js +1175 -0
- 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} +290 -31
- 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} +134 -29
- 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} +353 -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 +1252 -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} +493 -106
- 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 -70
- package/dist/components/ui/search-menu.d.ts +1 -36
- package/dist/components/ui/select.js +159 -0
- 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} +2475 -956
- 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 +358 -73
- package/dist/lib/docs.js +861 -293
- package/dist/lib/docs.server.js +342 -57
- package/dist/lib/documentation-toolkit.d.ts +4 -4
- package/dist/lib/documentation-toolkit.js +354 -69
- 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/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/index.js +110 -0
- package/dist/lib/email-composer/schema.d.ts +14 -0
- package/dist/lib/email-composer/schema.js +13 -0
- package/dist/lib/email-document/legacy-rich-text/editor.d.ts +70 -0
- package/dist/lib/email-document/legacy-rich-text/model.d.ts +19 -0
- package/dist/lib/email-document/legacy-rich-text/schema.d.ts +65 -0
- package/dist/lib/email-document/legacy-rich-text/tiptap.d.ts +39 -0
- package/dist/lib/email-document/model.d.ts +1 -1
- package/dist/lib/email-document/model.js +2 -2
- package/dist/lib/email-document/render.js +2 -2
- package/dist/lib/email-document/schema.js +1 -1
- 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 -19
- package/dist/lib/rich-text/model.js +79 -111
- package/dist/lib/rich-text/schema.d.ts +5 -55
- package/dist/lib/rich-text/schema.js +17 -36
- package/dist/lib/rich-text/tiptap.d.ts +12 -0
- package/dist/lib/webfetch-toolkit.d.ts +1 -1
- package/dist/services/agent/client/index.js +695 -179
- 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 +199 -137
- package/dist/components/support-dialog.js +0 -881
- package/dist/components/support.js +0 -881
- package/dist/components/ui/animated-list.js +0 -414
- 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/code-block.js +0 -221
- 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/copy-value.js +0 -352
- 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/danger-confirmation.js +0 -398
- 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/error-component.js +0 -387
- 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/rich-text-editor.js +0 -1135
- 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/lib/rich-text/dom.d.ts +0 -40
- 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,113 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Command, Component, UiSchema } from "effect/ui";
|
|
3
|
+
import { DangerConfirmationSharedProps } from "./schema.js";
|
|
4
|
+
export type DangerConfirmationMessages = {
|
|
5
|
+
confirm: string;
|
|
6
|
+
cancel: string;
|
|
7
|
+
typeToConfirm: string;
|
|
8
|
+
pending: string;
|
|
9
|
+
error: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const getDangerConfirmationMessages: (locale?: string, messages?: DangerConfirmationSharedProps["messages"]) => DangerConfirmationMessages;
|
|
12
|
+
export declare const matchesConfirmation: (confirmation: string | undefined, text: string) => boolean;
|
|
13
|
+
export declare const DangerConfirmationMessage: UiSchema.TaggedEnum<{
|
|
14
|
+
readonly Confirmed: Schema.TaggedStruct<"Confirmed", {}>;
|
|
15
|
+
readonly Dismissed: Schema.TaggedStruct<"Dismissed", {}>;
|
|
16
|
+
readonly Edited: Schema.TaggedStruct<"Edited", {
|
|
17
|
+
readonly text: Schema.String;
|
|
18
|
+
}>;
|
|
19
|
+
readonly Finished: Schema.TaggedStruct<"Finished", {
|
|
20
|
+
readonly success: Schema.Boolean;
|
|
21
|
+
}>;
|
|
22
|
+
readonly Opened: Schema.TaggedStruct<"Opened", {}>;
|
|
23
|
+
}>;
|
|
24
|
+
declare const RunConfirmation_base: Command.Service<RunConfirmation, "danger-confirmation/RunConfirmation", {}, UiSchema.TaggedEnum<{
|
|
25
|
+
readonly Confirmed: Schema.TaggedStruct<"Confirmed", {}>;
|
|
26
|
+
readonly Dismissed: Schema.TaggedStruct<"Dismissed", {}>;
|
|
27
|
+
readonly Edited: Schema.TaggedStruct<"Edited", {
|
|
28
|
+
readonly text: Schema.String;
|
|
29
|
+
}>;
|
|
30
|
+
readonly Finished: Schema.TaggedStruct<"Finished", {
|
|
31
|
+
readonly success: Schema.Boolean;
|
|
32
|
+
}>;
|
|
33
|
+
readonly Opened: Schema.TaggedStruct<"Opened", {}>;
|
|
34
|
+
}>, false, Schema.Never, never>;
|
|
35
|
+
export declare class RunConfirmation extends RunConfirmation_base {
|
|
36
|
+
static layerFromConfirm: (confirm: () => Promise<void>) => import("effect/Layer").Layer<RunConfirmation, never, never>;
|
|
37
|
+
}
|
|
38
|
+
export declare const dangerConfirmationOptions: {
|
|
39
|
+
readonly name: "DangerConfirmation";
|
|
40
|
+
readonly props: Schema.Struct<{
|
|
41
|
+
readonly classes: Schema.optional<Schema.$Record<Schema.Literals<"confirmationField"[]>, Schema.optionalKey<Schema.String>>>;
|
|
42
|
+
readonly confirmation: Schema.optionalKey<Schema.String>;
|
|
43
|
+
readonly locale: Schema.optionalKey<Schema.String>;
|
|
44
|
+
readonly messages: Schema.optionalKey<Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Struct<{
|
|
45
|
+
readonly confirm: Schema.optionalKey<Schema.String>;
|
|
46
|
+
readonly cancel: Schema.optionalKey<Schema.String>;
|
|
47
|
+
readonly typeToConfirm: Schema.optionalKey<Schema.String>;
|
|
48
|
+
readonly pending: Schema.optionalKey<Schema.String>;
|
|
49
|
+
readonly error: Schema.optionalKey<Schema.String>;
|
|
50
|
+
}>>>>;
|
|
51
|
+
readonly className: Schema.optionalKey<Schema.String>;
|
|
52
|
+
readonly initiallyOpen: Schema.optionalKey<Schema.Boolean>;
|
|
53
|
+
}>;
|
|
54
|
+
readonly model: Schema.Struct<{
|
|
55
|
+
readonly open: Schema.Boolean;
|
|
56
|
+
readonly text: Schema.String;
|
|
57
|
+
readonly status: Schema.Literals<readonly ["idle", "pending", "failed", "succeeded"]>;
|
|
58
|
+
}>;
|
|
59
|
+
readonly message: UiSchema.TaggedEnum<{
|
|
60
|
+
readonly Confirmed: Schema.TaggedStruct<"Confirmed", {}>;
|
|
61
|
+
readonly Dismissed: Schema.TaggedStruct<"Dismissed", {}>;
|
|
62
|
+
readonly Edited: Schema.TaggedStruct<"Edited", {
|
|
63
|
+
readonly text: Schema.String;
|
|
64
|
+
}>;
|
|
65
|
+
readonly Finished: Schema.TaggedStruct<"Finished", {
|
|
66
|
+
readonly success: Schema.Boolean;
|
|
67
|
+
}>;
|
|
68
|
+
readonly Opened: Schema.TaggedStruct<"Opened", {}>;
|
|
69
|
+
}>;
|
|
70
|
+
readonly restore: false;
|
|
71
|
+
};
|
|
72
|
+
type Model = typeof dangerConfirmationOptions.model.Type;
|
|
73
|
+
type Message = typeof DangerConfirmationMessage.Type;
|
|
74
|
+
type Props = typeof dangerConfirmationOptions.props.Type;
|
|
75
|
+
export declare const dangerConfirmationBehaviours: {
|
|
76
|
+
init: ({ props }: Component.Init<Model, Message, never, Props>) => Model;
|
|
77
|
+
update: (context: Component.Update<Model, Message, never, Props>, message: Message) => Model | Component.Step<Model, Message, never, RunConfirmation>;
|
|
78
|
+
};
|
|
79
|
+
export declare const DangerConfirmationModel: Component.Component<"DangerConfirmation", {
|
|
80
|
+
readonly classes?: {
|
|
81
|
+
readonly confirmationField?: string | undefined;
|
|
82
|
+
} | undefined;
|
|
83
|
+
readonly confirmation?: string | undefined;
|
|
84
|
+
readonly locale?: string | undefined;
|
|
85
|
+
readonly messages?: {
|
|
86
|
+
readonly [x: string]: {
|
|
87
|
+
readonly confirm?: string | undefined;
|
|
88
|
+
readonly cancel?: string | undefined;
|
|
89
|
+
readonly typeToConfirm?: string | undefined;
|
|
90
|
+
readonly pending?: string | undefined;
|
|
91
|
+
readonly error?: string | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
readonly className?: string | undefined;
|
|
95
|
+
readonly initiallyOpen?: boolean | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
readonly open: boolean;
|
|
98
|
+
readonly text: string;
|
|
99
|
+
readonly status: "failed" | "idle" | "pending" | "succeeded";
|
|
100
|
+
}, {
|
|
101
|
+
readonly _tag: "Opened";
|
|
102
|
+
} | {
|
|
103
|
+
readonly _tag: "Confirmed";
|
|
104
|
+
} | {
|
|
105
|
+
readonly _tag: "Dismissed";
|
|
106
|
+
} | {
|
|
107
|
+
readonly _tag: "Edited";
|
|
108
|
+
readonly text: string;
|
|
109
|
+
} | {
|
|
110
|
+
readonly _tag: "Finished";
|
|
111
|
+
readonly success: boolean;
|
|
112
|
+
}, never, RunConfirmation, never, {}, never>;
|
|
113
|
+
export {};
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
typeToConfirm: string;
|
|
6
|
-
pending: string;
|
|
7
|
-
error: string;
|
|
8
|
-
};
|
|
9
|
-
export type DangerConfirmationProps = {
|
|
2
|
+
import type { DangerConfirmationSharedProps } from "./schema.js";
|
|
3
|
+
export type { DangerConfirmationMessages } from "./index.js";
|
|
4
|
+
export type DangerConfirmationProps = DangerConfirmationSharedProps & {
|
|
10
5
|
open: boolean;
|
|
11
6
|
onOpenChange: (open: boolean) => void;
|
|
12
7
|
title: ReactNode;
|
|
13
8
|
description: ReactNode;
|
|
14
|
-
confirmation?: string;
|
|
15
9
|
onConfirm: () => Promise<void>;
|
|
16
|
-
locale?: string;
|
|
17
|
-
messages?: Partial<Record<string, Partial<DangerConfirmationMessages>>>;
|
|
18
|
-
className?: string;
|
|
19
10
|
};
|
|
20
11
|
/** Confirmation is a UI safeguard, never an authorization boundary. */
|
|
21
12
|
export declare const DangerConfirmation: (props: DangerConfirmationProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
// ../../src/components/danger-confirmation/react.tsx
|
|
2
|
+
import { Component as Component2 } from "effect/ui";
|
|
3
|
+
import {
|
|
4
|
+
useEffect as useEffect2,
|
|
5
|
+
useId,
|
|
6
|
+
useLayoutEffect as useLayoutEffect2,
|
|
7
|
+
useRef as useRef2,
|
|
8
|
+
useState as useState2
|
|
9
|
+
} from "react";
|
|
10
|
+
|
|
11
|
+
// ../../src/components/ui/alert-dialog.tsx
|
|
12
|
+
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
13
|
+
|
|
14
|
+
// ../../src/lib/utils.ts
|
|
15
|
+
import { cn } from "cn";
|
|
16
|
+
|
|
17
|
+
// ../../src/components/ui/button.tsx
|
|
18
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
19
|
+
import { cva } from "class-variance-authority";
|
|
20
|
+
import { jsx } from "react/jsx-runtime";
|
|
21
|
+
var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
25
|
+
outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
26
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
27
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
28
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
29
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
33
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
34
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
35
|
+
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
36
|
+
icon: "size-9",
|
|
37
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
38
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
39
|
+
"icon-lg": "size-10"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "default",
|
|
44
|
+
size: "default"
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
function Button({
|
|
48
|
+
className,
|
|
49
|
+
variant = "default",
|
|
50
|
+
size = "default",
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
54
|
+
"data-slot": "button",
|
|
55
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ../../src/components/ui/alert-dialog.tsx
|
|
61
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
62
|
+
"use client";
|
|
63
|
+
function AlertDialog({ ...props }) {
|
|
64
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Root, {
|
|
65
|
+
"data-slot": "alert-dialog",
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function AlertDialogPortal({ ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Portal, {
|
|
71
|
+
"data-slot": "alert-dialog-portal",
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function AlertDialogOverlay({
|
|
76
|
+
className,
|
|
77
|
+
...props
|
|
78
|
+
}) {
|
|
79
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Backdrop, {
|
|
80
|
+
"data-slot": "alert-dialog-overlay",
|
|
81
|
+
className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function AlertDialogContent({
|
|
86
|
+
className,
|
|
87
|
+
size = "default",
|
|
88
|
+
...props
|
|
89
|
+
}) {
|
|
90
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, {
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx2(AlertDialogOverlay, {}),
|
|
93
|
+
/* @__PURE__ */ jsx2(AlertDialogPrimitive.Popup, {
|
|
94
|
+
"data-slot": "alert-dialog-content",
|
|
95
|
+
"data-size": size,
|
|
96
|
+
className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
97
|
+
...props
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function AlertDialogHeader({
|
|
103
|
+
className,
|
|
104
|
+
...props
|
|
105
|
+
}) {
|
|
106
|
+
return /* @__PURE__ */ jsx2("div", {
|
|
107
|
+
"data-slot": "alert-dialog-header",
|
|
108
|
+
className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function AlertDialogFooter({
|
|
113
|
+
className,
|
|
114
|
+
...props
|
|
115
|
+
}) {
|
|
116
|
+
return /* @__PURE__ */ jsx2("div", {
|
|
117
|
+
"data-slot": "alert-dialog-footer",
|
|
118
|
+
className: cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function AlertDialogTitle({
|
|
123
|
+
className,
|
|
124
|
+
...props
|
|
125
|
+
}) {
|
|
126
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Title, {
|
|
127
|
+
"data-slot": "alert-dialog-title",
|
|
128
|
+
className: cn("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
129
|
+
...props
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function AlertDialogDescription({
|
|
133
|
+
className,
|
|
134
|
+
...props
|
|
135
|
+
}) {
|
|
136
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Description, {
|
|
137
|
+
"data-slot": "alert-dialog-description",
|
|
138
|
+
className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
139
|
+
...props
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function AlertDialogCancel({
|
|
143
|
+
className,
|
|
144
|
+
variant = "outline",
|
|
145
|
+
size = "default",
|
|
146
|
+
...props
|
|
147
|
+
}) {
|
|
148
|
+
return /* @__PURE__ */ jsx2(AlertDialogPrimitive.Close, {
|
|
149
|
+
"data-slot": "alert-dialog-cancel",
|
|
150
|
+
className: cn(className),
|
|
151
|
+
render: /* @__PURE__ */ jsx2(Button, {
|
|
152
|
+
variant,
|
|
153
|
+
size
|
|
154
|
+
}),
|
|
155
|
+
...props
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// ../../src/components/ui/input.tsx
|
|
160
|
+
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
161
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
162
|
+
function Input({ className, type, ...props }) {
|
|
163
|
+
return /* @__PURE__ */ jsx3(InputPrimitive, {
|
|
164
|
+
type,
|
|
165
|
+
"data-slot": "input",
|
|
166
|
+
className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
167
|
+
...props
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ../../src/components/ui/label.tsx
|
|
172
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
173
|
+
"use client";
|
|
174
|
+
function Label({ className, ...props }) {
|
|
175
|
+
return /* @__PURE__ */ jsx4("label", {
|
|
176
|
+
"data-slot": "label",
|
|
177
|
+
className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
178
|
+
...props
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ../../src/components/danger-confirmation/react.tsx
|
|
183
|
+
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
184
|
+
|
|
185
|
+
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
186
|
+
import { MessageLog as MessageLog2 } from "effect/ui";
|
|
187
|
+
import {
|
|
188
|
+
createContext,
|
|
189
|
+
useCallback,
|
|
190
|
+
useContext,
|
|
191
|
+
useEffect,
|
|
192
|
+
useLayoutEffect,
|
|
193
|
+
useRef,
|
|
194
|
+
useState,
|
|
195
|
+
useSyncExternalStore
|
|
196
|
+
} from "react";
|
|
197
|
+
|
|
198
|
+
// ../../src/lib/effect-ui-adapter/model-runtime.ts
|
|
199
|
+
import { MessageLog, Renderer, View } from "effect/ui";
|
|
200
|
+
import { BrowserHost, Html } from "effect/ui/html";
|
|
201
|
+
import { Cause, Effect, Fiber } from "effect";
|
|
202
|
+
var node = () => ({ children: [] });
|
|
203
|
+
var modelHost = (commit) => {
|
|
204
|
+
const remove = (child) => {
|
|
205
|
+
if (!child.parent)
|
|
206
|
+
return;
|
|
207
|
+
child.parent.children.splice(child.parent.children.indexOf(child), 1);
|
|
208
|
+
delete child.parent;
|
|
209
|
+
};
|
|
210
|
+
return {
|
|
211
|
+
createElement: node,
|
|
212
|
+
createText: node,
|
|
213
|
+
setText: () => {},
|
|
214
|
+
setAttr: () => {},
|
|
215
|
+
setProp: () => {},
|
|
216
|
+
setEvents: () => {},
|
|
217
|
+
insertBefore: (parent, child, before) => {
|
|
218
|
+
if (child === before)
|
|
219
|
+
return;
|
|
220
|
+
remove(child);
|
|
221
|
+
const index = before ? parent.children.indexOf(before) : parent.children.length;
|
|
222
|
+
parent.children.splice(index, 0, child);
|
|
223
|
+
child.parent = parent;
|
|
224
|
+
},
|
|
225
|
+
remove,
|
|
226
|
+
parentOf: (child) => child.parent,
|
|
227
|
+
nextOf: (child) => child.parent?.children[child.parent.children.indexOf(child) + 1],
|
|
228
|
+
elements: ["html"],
|
|
229
|
+
controlled: new Set,
|
|
230
|
+
runsMounts: false,
|
|
231
|
+
commit
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
var mountModel = (component, props, publishSnapshot, messageLog, onEmit) => {
|
|
235
|
+
let currentProps = props;
|
|
236
|
+
let root;
|
|
237
|
+
let active = true;
|
|
238
|
+
let failure;
|
|
239
|
+
const publish = () => {
|
|
240
|
+
if (!active)
|
|
241
|
+
return;
|
|
242
|
+
if (failure) {
|
|
243
|
+
publishSnapshot({ error: failure });
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const current = root?.model();
|
|
247
|
+
if (current !== undefined)
|
|
248
|
+
publishSnapshot({ model: current });
|
|
249
|
+
};
|
|
250
|
+
const fiber = Effect.runFork(Effect.scoped(Effect.gen(function* () {
|
|
251
|
+
const mounted = yield* Renderer.mount(component, Effect.succeed(props), node(), {
|
|
252
|
+
head: false,
|
|
253
|
+
onEmit,
|
|
254
|
+
fallback: ({ cause }) => {
|
|
255
|
+
failure = new Error("Effect UI root failed", {
|
|
256
|
+
cause: Cause.squash(cause)
|
|
257
|
+
});
|
|
258
|
+
return View.text("");
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
if (!active)
|
|
262
|
+
return;
|
|
263
|
+
root = mounted;
|
|
264
|
+
if (props !== currentProps)
|
|
265
|
+
mounted.setProps(currentProps);
|
|
266
|
+
publish();
|
|
267
|
+
return yield* Effect.never;
|
|
268
|
+
}).pipe(Effect.provide(Renderer.layer(modelHost(publish))), Effect.provideService(Html.Host, BrowserHost.htmlHost), Effect.provideService(MessageLog.MessageLog, messageLog))));
|
|
269
|
+
return {
|
|
270
|
+
send: (message) => {
|
|
271
|
+
root?.send(message);
|
|
272
|
+
publish();
|
|
273
|
+
},
|
|
274
|
+
setProps: (next) => {
|
|
275
|
+
currentProps = next;
|
|
276
|
+
root?.setProps(next);
|
|
277
|
+
},
|
|
278
|
+
dispose: () => {
|
|
279
|
+
active = false;
|
|
280
|
+
root = undefined;
|
|
281
|
+
Effect.runFork(Fiber.interrupt(fiber));
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
287
|
+
"use client";
|
|
288
|
+
var ModelMessageLogContext = createContext(undefined);
|
|
289
|
+
var useModel = (component, props, options = {}) => {
|
|
290
|
+
const contextLog = useContext(ModelMessageLogContext);
|
|
291
|
+
const messageLog = options.messageLog ?? (contextLog === undefined ? MessageLog2.noop : contextLog);
|
|
292
|
+
const [store] = useState(() => {
|
|
293
|
+
const initial = { model: component.init(props).model };
|
|
294
|
+
let snapshot = initial;
|
|
295
|
+
const listeners = new Set;
|
|
296
|
+
return {
|
|
297
|
+
subscribe: (listener) => {
|
|
298
|
+
listeners.add(listener);
|
|
299
|
+
return () => {
|
|
300
|
+
listeners.delete(listener);
|
|
301
|
+
};
|
|
302
|
+
},
|
|
303
|
+
getSnapshot: () => snapshot,
|
|
304
|
+
getServerSnapshot: () => initial,
|
|
305
|
+
publish: (next) => {
|
|
306
|
+
if ("model" in snapshot && "model" in next && Object.is(snapshot.model, next.model))
|
|
307
|
+
return;
|
|
308
|
+
if ("error" in snapshot && "error" in next && snapshot.error === next.error)
|
|
309
|
+
return;
|
|
310
|
+
snapshot = next;
|
|
311
|
+
listeners.forEach((listener) => listener());
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);
|
|
316
|
+
const committed = useRef(props);
|
|
317
|
+
const onEmit = useRef(options.onEmit);
|
|
318
|
+
const runtime = useRef(undefined);
|
|
319
|
+
const send = useCallback((message) => runtime.current?.send(message), []);
|
|
320
|
+
useLayoutEffect(() => {
|
|
321
|
+
onEmit.current = options.onEmit;
|
|
322
|
+
committed.current = props;
|
|
323
|
+
runtime.current?.setProps(props);
|
|
324
|
+
}, [props, options.onEmit]);
|
|
325
|
+
useEffect(() => {
|
|
326
|
+
if (messageLog === null)
|
|
327
|
+
return;
|
|
328
|
+
const mounted = mountModel(component, committed.current, store.publish, messageLog, (event) => onEmit.current?.(event));
|
|
329
|
+
runtime.current = mounted;
|
|
330
|
+
return () => {
|
|
331
|
+
runtime.current = undefined;
|
|
332
|
+
mounted.dispose();
|
|
333
|
+
};
|
|
334
|
+
}, [component, messageLog, store]);
|
|
335
|
+
if ("error" in snapshot)
|
|
336
|
+
throw snapshot.error;
|
|
337
|
+
return { model: snapshot.model, send };
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
// ../../src/components/danger-confirmation/classes.ts
|
|
341
|
+
var dangerConfirmationClasses = {
|
|
342
|
+
confirmationField: "grid gap-2"
|
|
343
|
+
};
|
|
344
|
+
var resolveDangerConfirmationClasses = (overrides) => ({
|
|
345
|
+
...dangerConfirmationClasses,
|
|
346
|
+
...overrides
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
// ../../src/components/danger-confirmation/index.ts
|
|
350
|
+
import { Effect as Effect2, Schema as Schema2 } from "effect";
|
|
351
|
+
import { Command, Component, UiSchema, View as View2 } from "effect/ui";
|
|
352
|
+
|
|
353
|
+
// ../../src/components/danger-confirmation/schema.ts
|
|
354
|
+
import { Schema, Struct } from "effect";
|
|
355
|
+
var MessageOverrides = Schema.Struct({
|
|
356
|
+
confirm: Schema.optionalKey(Schema.String),
|
|
357
|
+
cancel: Schema.optionalKey(Schema.String),
|
|
358
|
+
typeToConfirm: Schema.optionalKey(Schema.String),
|
|
359
|
+
pending: Schema.optionalKey(Schema.String),
|
|
360
|
+
error: Schema.optionalKey(Schema.String)
|
|
361
|
+
}).annotate({ identifier: "DangerConfirmationMessageOverrides" });
|
|
362
|
+
var DangerConfirmationClassesOverridesSchema = Schema.Record(Schema.Literals(Struct.keys(dangerConfirmationClasses)), Schema.optionalKey(Schema.String)).annotate({ identifier: "DangerConfirmationClassesOverrides" });
|
|
363
|
+
var DangerConfirmationSharedProps = Schema.Struct({
|
|
364
|
+
classes: Schema.optional(DangerConfirmationClassesOverridesSchema),
|
|
365
|
+
confirmation: Schema.optionalKey(Schema.String),
|
|
366
|
+
locale: Schema.optionalKey(Schema.String),
|
|
367
|
+
messages: Schema.optionalKey(Schema.Record(Schema.String, Schema.UndefinedOr(MessageOverrides))),
|
|
368
|
+
className: Schema.optionalKey(Schema.String)
|
|
369
|
+
}).annotate({ identifier: "DangerConfirmationSharedProps" });
|
|
370
|
+
var DangerConfirmationHtmlProps = Schema.Struct({
|
|
371
|
+
...DangerConfirmationSharedProps.fields,
|
|
372
|
+
title: Schema.String,
|
|
373
|
+
description: Schema.String,
|
|
374
|
+
triggerLabel: Schema.String
|
|
375
|
+
}).annotate({ identifier: "DangerConfirmationHtmlProps" });
|
|
376
|
+
|
|
377
|
+
// ../../src/components/danger-confirmation/index.ts
|
|
378
|
+
var labels = {
|
|
379
|
+
en: {
|
|
380
|
+
confirm: "Confirm deletion",
|
|
381
|
+
cancel: "Cancel",
|
|
382
|
+
typeToConfirm: "Type the following text to confirm",
|
|
383
|
+
pending: "Deleting…",
|
|
384
|
+
error: "Could not complete the action. Check its status before trying again."
|
|
385
|
+
},
|
|
386
|
+
fr: {
|
|
387
|
+
confirm: "Confirmer la suppression",
|
|
388
|
+
cancel: "Annuler",
|
|
389
|
+
typeToConfirm: "Saisissez le texte suivant pour confirmer",
|
|
390
|
+
pending: "Suppression…",
|
|
391
|
+
error: "Impossible de terminer l’action. Vérifiez son état avant de réessayer."
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
var getDangerConfirmationMessages = (locale = "en", messages) => ({
|
|
395
|
+
...locale.startsWith("fr") ? labels.fr : labels.en,
|
|
396
|
+
...messages?.[locale.split("-")[0] ?? locale],
|
|
397
|
+
...messages?.[locale]
|
|
398
|
+
});
|
|
399
|
+
var matchesConfirmation = (confirmation, text) => confirmation === undefined || text === confirmation;
|
|
400
|
+
var DangerConfirmationMessage = UiSchema.TaggedEnum({
|
|
401
|
+
Opened: {},
|
|
402
|
+
Dismissed: {},
|
|
403
|
+
Edited: { text: Schema2.String },
|
|
404
|
+
Confirmed: {},
|
|
405
|
+
Finished: { success: Schema2.Boolean }
|
|
406
|
+
}).annotate({ identifier: "DangerConfirmationMessage" });
|
|
407
|
+
|
|
408
|
+
class RunConfirmation extends Command.Service()("danger-confirmation/RunConfirmation", { args: {}, success: DangerConfirmationMessage }) {
|
|
409
|
+
static layerFromConfirm = (confirm) => RunConfirmation.toLayer(() => Effect2.tryPromise(async () => confirm()).pipe(Effect2.match({
|
|
410
|
+
onSuccess: () => DangerConfirmationMessage.Finished({ success: true }),
|
|
411
|
+
onFailure: () => DangerConfirmationMessage.Finished({ success: false })
|
|
412
|
+
})));
|
|
413
|
+
}
|
|
414
|
+
var dangerConfirmationOptions = {
|
|
415
|
+
name: "DangerConfirmation",
|
|
416
|
+
props: Schema2.Struct({
|
|
417
|
+
...DangerConfirmationSharedProps.fields,
|
|
418
|
+
initiallyOpen: Schema2.optionalKey(Schema2.Boolean)
|
|
419
|
+
}).annotate({ identifier: "DangerConfirmationModelProps" }),
|
|
420
|
+
model: Schema2.Struct({
|
|
421
|
+
open: Schema2.Boolean,
|
|
422
|
+
text: Schema2.String,
|
|
423
|
+
status: Schema2.Literals(["idle", "pending", "failed", "succeeded"])
|
|
424
|
+
}).annotate({ identifier: "DangerConfirmationModel" }),
|
|
425
|
+
message: DangerConfirmationMessage,
|
|
426
|
+
restore: false
|
|
427
|
+
};
|
|
428
|
+
var initial = { open: false, text: "", status: "idle" };
|
|
429
|
+
var Definition = Component.define(dangerConfirmationOptions);
|
|
430
|
+
var updateDangerConfirmation = Definition.update({
|
|
431
|
+
Opened: ($) => $.model.open ? $.model : $.evolve({ ...initial, open: true }),
|
|
432
|
+
Dismissed: ($) => $.model.status === "pending" ? $.model : initial,
|
|
433
|
+
Edited: ($, { text }) => $.model.open && $.model.status !== "pending" ? $.evolve({ text }) : $.model,
|
|
434
|
+
Confirmed: ($) => $.model.open && $.model.status !== "pending" && matchesConfirmation($.props.confirmation, $.model.text) ? $.evolve({ status: "pending" }).run(RunConfirmation.make({})) : $.model,
|
|
435
|
+
Finished: ($, { success }) => $.model.status !== "pending" ? $.model : success ? $.evolve({ ...initial, status: "succeeded" }) : $.evolve({ status: "failed" })
|
|
436
|
+
});
|
|
437
|
+
var dangerConfirmationBehaviours = {
|
|
438
|
+
init: ({ props }) => ({
|
|
439
|
+
...initial,
|
|
440
|
+
open: props.initiallyOpen ?? false
|
|
441
|
+
}),
|
|
442
|
+
update: updateDangerConfirmation
|
|
443
|
+
};
|
|
444
|
+
var DangerConfirmationModel = Definition.make({
|
|
445
|
+
...dangerConfirmationBehaviours,
|
|
446
|
+
view: () => View2.text("")
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
// ../../src/components/danger-confirmation/react.tsx
|
|
450
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
451
|
+
"use client";
|
|
452
|
+
var DangerConfirmation = (props) => {
|
|
453
|
+
const dangerConfirmationClasses = resolveDangerConfirmationClasses(props.classes);
|
|
454
|
+
const { open, onOpenChange, onConfirm, title, description, confirmation } = props;
|
|
455
|
+
const copy = getDangerConfirmationMessages(useKrakstackLocale(props.locale), props.messages);
|
|
456
|
+
const id = useId();
|
|
457
|
+
const confirm = useRef2(onConfirm);
|
|
458
|
+
useLayoutEffect2(() => {
|
|
459
|
+
confirm.current = onConfirm;
|
|
460
|
+
}, [onConfirm]);
|
|
461
|
+
const [component] = useState2(() => DangerConfirmationModel.pipe(Component2.provide(RunConfirmation.layerFromConfirm(() => confirm.current()))));
|
|
462
|
+
const { model, send } = useModel(component, {
|
|
463
|
+
initiallyOpen: open,
|
|
464
|
+
...confirmation !== undefined ? { confirmation } : {}
|
|
465
|
+
});
|
|
466
|
+
const { status, text } = model;
|
|
467
|
+
const pending = status === "pending";
|
|
468
|
+
useEffect2(() => {
|
|
469
|
+
if (status === "succeeded")
|
|
470
|
+
onOpenChange(false);
|
|
471
|
+
if (open && !model.open)
|
|
472
|
+
send(DangerConfirmationMessage.Opened());
|
|
473
|
+
if (!open && (model.open || status === "succeeded"))
|
|
474
|
+
send(DangerConfirmationMessage.Dismissed());
|
|
475
|
+
}, [model.open, onOpenChange, open, send, status]);
|
|
476
|
+
return /* @__PURE__ */ jsx5(AlertDialog, {
|
|
477
|
+
open,
|
|
478
|
+
onOpenChange: (next, event) => {
|
|
479
|
+
if (!next && pending) {
|
|
480
|
+
event.cancel();
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
onOpenChange(next);
|
|
484
|
+
},
|
|
485
|
+
children: /* @__PURE__ */ jsxs2(AlertDialogContent, {
|
|
486
|
+
"data-component": "danger-confirmation",
|
|
487
|
+
className: props.className,
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ jsxs2(AlertDialogHeader, {
|
|
490
|
+
children: [
|
|
491
|
+
/* @__PURE__ */ jsx5(AlertDialogTitle, {
|
|
492
|
+
children: title
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ jsx5(AlertDialogDescription, {
|
|
495
|
+
children: description
|
|
496
|
+
})
|
|
497
|
+
]
|
|
498
|
+
}),
|
|
499
|
+
confirmation !== undefined ? /* @__PURE__ */ jsxs2("div", {
|
|
500
|
+
className: dangerConfirmationClasses.confirmationField,
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ jsx5(Label, {
|
|
503
|
+
htmlFor: id,
|
|
504
|
+
children: copy.typeToConfirm
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ jsx5("code", {
|
|
507
|
+
id: `${id}-phrase`,
|
|
508
|
+
className: "text-sm break-all",
|
|
509
|
+
children: confirmation
|
|
510
|
+
}),
|
|
511
|
+
/* @__PURE__ */ jsx5(Input, {
|
|
512
|
+
id,
|
|
513
|
+
"aria-describedby": `${id}-phrase`,
|
|
514
|
+
value: text,
|
|
515
|
+
onChange: (event) => send(DangerConfirmationMessage.Edited({ text: event.target.value })),
|
|
516
|
+
disabled: pending,
|
|
517
|
+
autoComplete: "off",
|
|
518
|
+
spellCheck: false
|
|
519
|
+
})
|
|
520
|
+
]
|
|
521
|
+
}) : null,
|
|
522
|
+
/* @__PURE__ */ jsxs2(AlertDialogFooter, {
|
|
523
|
+
children: [
|
|
524
|
+
/* @__PURE__ */ jsx5(AlertDialogCancel, {
|
|
525
|
+
type: "button",
|
|
526
|
+
disabled: pending,
|
|
527
|
+
children: copy.cancel
|
|
528
|
+
}),
|
|
529
|
+
/* @__PURE__ */ jsx5(Button, {
|
|
530
|
+
type: "button",
|
|
531
|
+
variant: "destructive",
|
|
532
|
+
disabled: pending || !matchesConfirmation(confirmation, text),
|
|
533
|
+
"aria-busy": pending,
|
|
534
|
+
onClick: () => send(DangerConfirmationMessage.Confirmed()),
|
|
535
|
+
children: pending ? copy.pending : copy.confirm
|
|
536
|
+
})
|
|
537
|
+
]
|
|
538
|
+
}),
|
|
539
|
+
status === "failed" && /* @__PURE__ */ jsx5("p", {
|
|
540
|
+
role: "status",
|
|
541
|
+
className: "text-destructive text-sm",
|
|
542
|
+
children: copy.error
|
|
543
|
+
})
|
|
544
|
+
]
|
|
545
|
+
})
|
|
546
|
+
});
|
|
547
|
+
};
|
|
548
|
+
export {
|
|
549
|
+
DangerConfirmation
|
|
550
|
+
};
|