@krak-stack/registry 0.10.20 → 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 +83 -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 +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} +2180 -909
- 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} +2174 -897
- 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} +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} +618 -135
- 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} +778 -256
- 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} +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} +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} +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 +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} +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 +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/{ui/rich-text-editor.js → rich-text-editor/react.js} +521 -100
- 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} +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} +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 -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} +2461 -948
- 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 +863 -295
- 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/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 +697 -181
- 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 +181 -142
- 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/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
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
// ../../src/components/
|
|
1
|
+
// ../../src/components/phone-number-input/react.tsx
|
|
2
2
|
import { useId, useLayoutEffect, useRef as useRef2 } from "react";
|
|
3
3
|
import {
|
|
4
|
-
getCountries,
|
|
5
|
-
|
|
6
|
-
getCountryCallingCode as getCountryCallingCode2,
|
|
7
|
-
parsePhoneNumberFromString as parsePhoneNumberFromString2
|
|
4
|
+
getCountries as getCountries3,
|
|
5
|
+
getCountryCallingCode as getCountryCallingCode3
|
|
8
6
|
} from "libphonenumber-js/max";
|
|
9
7
|
|
|
10
8
|
// ../../src/components/ui/input.tsx
|
|
@@ -24,8 +22,8 @@ function Input({ className, type, ...props }) {
|
|
|
24
22
|
});
|
|
25
23
|
}
|
|
26
24
|
|
|
27
|
-
// ../../src/components/
|
|
28
|
-
import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider";
|
|
25
|
+
// ../../src/components/phone-number-input/react.tsx
|
|
26
|
+
import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider/react";
|
|
29
27
|
|
|
30
28
|
// ../../src/components/ui/button.tsx
|
|
31
29
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
@@ -70,7 +68,7 @@ function Button({
|
|
|
70
68
|
});
|
|
71
69
|
}
|
|
72
70
|
|
|
73
|
-
// ../../src/components/
|
|
71
|
+
// ../../src/components/virtualized-combobox/react.tsx
|
|
74
72
|
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
75
73
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
76
74
|
import { Check, ChevronsUpDown, X } from "lucide-react";
|
|
@@ -125,11 +123,73 @@ function InputGroupInput({
|
|
|
125
123
|
});
|
|
126
124
|
}
|
|
127
125
|
|
|
128
|
-
// ../../src/components/
|
|
129
|
-
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider";
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
var
|
|
126
|
+
// ../../src/components/virtualized-combobox/react.tsx
|
|
127
|
+
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
128
|
+
|
|
129
|
+
// ../../src/components/virtualized-combobox/classes.ts
|
|
130
|
+
var virtualizedComboboxClasses = {
|
|
131
|
+
itemLabel: "min-w-0 truncate"
|
|
132
|
+
};
|
|
133
|
+
var resolveVirtualizedComboboxClasses = (overrides) => ({
|
|
134
|
+
...virtualizedComboboxClasses,
|
|
135
|
+
...overrides
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// ../../src/components/virtualized-combobox/index.ts
|
|
139
|
+
import { Schema as Schema2 } from "effect";
|
|
140
|
+
import { Component, UiSchema } from "effect/ui";
|
|
141
|
+
|
|
142
|
+
// ../../src/components/virtualized-combobox/schema.ts
|
|
143
|
+
import { Schema, Struct } from "effect";
|
|
144
|
+
var VirtualizedComboboxOptionSchema = Schema.Struct({
|
|
145
|
+
value: Schema.String.pipe(Schema.mutableKey),
|
|
146
|
+
label: Schema.String.pipe(Schema.mutableKey)
|
|
147
|
+
}).annotate({ identifier: "VirtualizedComboboxOption" });
|
|
148
|
+
var VirtualizedComboboxLabelsSchema = Schema.Struct({
|
|
149
|
+
clear: Schema.optionalKey(Schema.String),
|
|
150
|
+
search: Schema.optionalKey(Schema.String),
|
|
151
|
+
selectMore: Schema.optionalKey(Schema.String)
|
|
152
|
+
}).annotate({ identifier: "VirtualizedComboboxLabels" });
|
|
153
|
+
var VirtualizedComboboxClassesOverridesSchema = Schema.Record(Schema.Literals(Struct.keys(virtualizedComboboxClasses)), Schema.optionalKey(Schema.String)).annotate({ identifier: "VirtualizedComboboxClassesOverrides" });
|
|
154
|
+
var VirtualizedComboboxSharedPropsSchema = Schema.Struct({
|
|
155
|
+
classes: Schema.optional(VirtualizedComboboxClassesOverridesSchema),
|
|
156
|
+
ariaLabel: Schema.String,
|
|
157
|
+
ariaInvalid: Schema.optionalKey(Schema.Boolean),
|
|
158
|
+
contentClassName: Schema.optionalKey(Schema.String),
|
|
159
|
+
disabled: Schema.optionalKey(Schema.Boolean),
|
|
160
|
+
items: Schema.Array(VirtualizedComboboxOptionSchema),
|
|
161
|
+
locale: Schema.optionalKey(Schema.String),
|
|
162
|
+
open: Schema.optionalKey(Schema.Boolean),
|
|
163
|
+
searchValue: Schema.optionalKey(Schema.String),
|
|
164
|
+
triggerId: Schema.optionalKey(Schema.String)
|
|
165
|
+
}).annotate({ identifier: "VirtualizedComboboxSharedProps" });
|
|
166
|
+
var htmlFields = {
|
|
167
|
+
...VirtualizedComboboxSharedPropsSchema.fields,
|
|
168
|
+
emptyLabel: Schema.String,
|
|
169
|
+
placeholder: Schema.String,
|
|
170
|
+
triggerLabel: Schema.optionalKey(Schema.String),
|
|
171
|
+
filter: Schema.optionalKey(Schema.Literals(["contains", "none"])),
|
|
172
|
+
messages: Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
|
|
173
|
+
...VirtualizedComboboxLabelsSchema.fields,
|
|
174
|
+
selected: Schema.optionalKey(Schema.String)
|
|
175
|
+
})))
|
|
176
|
+
};
|
|
177
|
+
var VirtualizedComboboxPropsSchema = Schema.Union([
|
|
178
|
+
Schema.Struct({
|
|
179
|
+
...htmlFields,
|
|
180
|
+
multiple: Schema.optionalKey(Schema.Literal(false)),
|
|
181
|
+
value: Schema.NullOr(VirtualizedComboboxOptionSchema)
|
|
182
|
+
}),
|
|
183
|
+
Schema.Struct({
|
|
184
|
+
...htmlFields,
|
|
185
|
+
multiple: Schema.Literal(true),
|
|
186
|
+
value: Schema.Array(VirtualizedComboboxOptionSchema)
|
|
187
|
+
})
|
|
188
|
+
]).annotate({ identifier: "VirtualizedComboboxProps" });
|
|
189
|
+
|
|
190
|
+
// ../../src/components/virtualized-combobox/index.ts
|
|
191
|
+
var isText = Schema2.is(Schema2.String);
|
|
192
|
+
var defaultMessages = {
|
|
133
193
|
en: {
|
|
134
194
|
clear: "Clear selection",
|
|
135
195
|
search: "Search...",
|
|
@@ -143,13 +203,96 @@ var messages = {
|
|
|
143
203
|
selectMore: "Sélectionner davantage"
|
|
144
204
|
}
|
|
145
205
|
};
|
|
146
|
-
var virtualizedComboboxMessages = (locale, translations) =>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
206
|
+
var virtualizedComboboxMessages = (locale, translations) => {
|
|
207
|
+
const language = locale.split("-")[0];
|
|
208
|
+
const labels = {
|
|
209
|
+
...defaultMessages[language === "fr" ? "fr" : "en"],
|
|
210
|
+
...translations?.[language ?? locale],
|
|
211
|
+
...translations?.[locale]
|
|
212
|
+
};
|
|
213
|
+
const selected = labels.selected;
|
|
214
|
+
return {
|
|
215
|
+
...labels,
|
|
216
|
+
selected: isText(selected) ? (count) => selected.replaceAll("{count}", String(count)) : selected
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
var selectedLabel = (value, placeholder) => {
|
|
220
|
+
if (!value)
|
|
221
|
+
return placeholder;
|
|
222
|
+
if ("label" in value)
|
|
223
|
+
return value.label;
|
|
224
|
+
return value.length ? value.map(({ label }) => label).join(", ") : placeholder;
|
|
225
|
+
};
|
|
226
|
+
var selectionEntries = (items, selected, groupSelections, labels) => {
|
|
227
|
+
const entries = items.map((item, index) => ({
|
|
228
|
+
kind: "item",
|
|
229
|
+
item,
|
|
230
|
+
index
|
|
231
|
+
}));
|
|
232
|
+
if (!groupSelections || entries.length === 0)
|
|
233
|
+
return entries;
|
|
234
|
+
const chosen = entries.filter(({ item }) => selected.has(item.value));
|
|
235
|
+
return [
|
|
236
|
+
...chosen.length ? [
|
|
237
|
+
{
|
|
238
|
+
kind: "group",
|
|
239
|
+
key: "selected",
|
|
240
|
+
label: labels.selected(selected.size)
|
|
241
|
+
},
|
|
242
|
+
...chosen
|
|
243
|
+
] : [],
|
|
244
|
+
{ kind: "group", key: "available", label: labels.selectMore },
|
|
245
|
+
...entries.filter(({ item }) => !selected.has(item.value))
|
|
246
|
+
];
|
|
247
|
+
};
|
|
248
|
+
var events = {
|
|
249
|
+
OpenChanged: { open: Schema2.Boolean },
|
|
250
|
+
SearchChanged: { searchValue: Schema2.String },
|
|
251
|
+
ValueChanged: {
|
|
252
|
+
value: Schema2.NullOr(Schema2.Union([Schema2.String, Schema2.Array(Schema2.String)]))
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
var VirtualizedComboboxEvents = UiSchema.TaggedEnum(events).annotate({
|
|
256
|
+
identifier: "VirtualizedComboboxEvents"
|
|
150
257
|
});
|
|
258
|
+
var VirtualizedComboboxMessage = UiSchema.TaggedEnum({
|
|
259
|
+
...events,
|
|
260
|
+
Highlighted: { value: Schema2.String }
|
|
261
|
+
}).annotate({ identifier: "VirtualizedComboboxMessage" });
|
|
262
|
+
var virtualizedComboboxOptions = {
|
|
263
|
+
name: "VirtualizedCombobox",
|
|
264
|
+
props: VirtualizedComboboxPropsSchema,
|
|
265
|
+
model: Schema2.Struct({
|
|
266
|
+
open: Schema2.Boolean,
|
|
267
|
+
searchValue: Schema2.String,
|
|
268
|
+
highlight: Schema2.NullOr(Schema2.Struct({ value: Schema2.String, id: Schema2.Int }))
|
|
269
|
+
}).annotate({ identifier: "VirtualizedComboboxModel" }),
|
|
270
|
+
message: VirtualizedComboboxMessage,
|
|
271
|
+
events: VirtualizedComboboxEvents,
|
|
272
|
+
restore: false
|
|
273
|
+
};
|
|
274
|
+
var update = Component.define(virtualizedComboboxOptions).update({
|
|
275
|
+
OpenChanged: ($, { open }) => $.set({
|
|
276
|
+
...$.model,
|
|
277
|
+
open: $.props.open === undefined ? open : $.model.open,
|
|
278
|
+
highlight: open ? $.model.highlight : null
|
|
279
|
+
}).emit(VirtualizedComboboxEvents.OpenChanged({ open })),
|
|
280
|
+
SearchChanged: ($, { searchValue }) => $.evolve({
|
|
281
|
+
searchValue: $.props.searchValue === undefined ? searchValue : $.model.searchValue,
|
|
282
|
+
highlight: null
|
|
283
|
+
}).emit(VirtualizedComboboxEvents.SearchChanged({ searchValue })),
|
|
284
|
+
ValueChanged: ($, { value }) => $.set($.model).emit(VirtualizedComboboxEvents.ValueChanged({ value })),
|
|
285
|
+
Highlighted: ($, { value }) => $.evolve({
|
|
286
|
+
highlight: { value, id: ($.model.highlight?.id ?? 0) + 1 }
|
|
287
|
+
})
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
// ../../src/components/virtualized-combobox/react.tsx
|
|
291
|
+
import { jsx as jsx4, jsxs, Fragment } from "react/jsx-runtime";
|
|
292
|
+
"use client";
|
|
151
293
|
var optionEquals = (item, selected) => item.value === selected.value;
|
|
152
294
|
var VirtualizedComboboxList = ({
|
|
295
|
+
classes,
|
|
153
296
|
emptyLabel,
|
|
154
297
|
groupSelections,
|
|
155
298
|
itemIndexRef,
|
|
@@ -159,31 +302,10 @@ var VirtualizedComboboxList = ({
|
|
|
159
302
|
selectedValues,
|
|
160
303
|
virtualizerRef
|
|
161
304
|
}) => {
|
|
305
|
+
const virtualizedComboboxClasses = resolveVirtualizedComboboxClasses(classes);
|
|
162
306
|
const filteredItems = ComboboxPrimitive.useFilteredItems();
|
|
163
307
|
const labels = virtualizedComboboxMessages(locale, messageOverrides);
|
|
164
|
-
const
|
|
165
|
-
kind: "item",
|
|
166
|
-
item,
|
|
167
|
-
index
|
|
168
|
-
}));
|
|
169
|
-
const selectedEntries = itemEntries.filter(({ item }) => selectedValues.has(item.value));
|
|
170
|
-
const availableEntries = itemEntries.filter(({ item }) => !selectedValues.has(item.value));
|
|
171
|
-
const entries = filteredItems.length === 0 ? [] : groupSelections ? [
|
|
172
|
-
...selectedEntries.length > 0 ? [
|
|
173
|
-
{
|
|
174
|
-
kind: "group",
|
|
175
|
-
key: "selected",
|
|
176
|
-
label: labels.selected(selectedValues.size)
|
|
177
|
-
},
|
|
178
|
-
...selectedEntries
|
|
179
|
-
] : [],
|
|
180
|
-
{
|
|
181
|
-
kind: "group",
|
|
182
|
-
key: "available",
|
|
183
|
-
label: labels.selectMore
|
|
184
|
-
},
|
|
185
|
-
...availableEntries
|
|
186
|
-
] : itemEntries;
|
|
308
|
+
const entries = selectionEntries(filteredItems, selectedValues, groupSelections, labels);
|
|
187
309
|
const scrollRef = useRef(null);
|
|
188
310
|
const virtualizer = useVirtualizer({
|
|
189
311
|
count: entries.length,
|
|
@@ -253,7 +375,7 @@ var VirtualizedComboboxList = ({
|
|
|
253
375
|
value: entry.item,
|
|
254
376
|
children: [
|
|
255
377
|
renderItem?.(entry.item) ?? /* @__PURE__ */ jsx4("span", {
|
|
256
|
-
className:
|
|
378
|
+
className: virtualizedComboboxClasses.itemLabel,
|
|
257
379
|
children: entry.item.label
|
|
258
380
|
}),
|
|
259
381
|
/* @__PURE__ */ jsx4(ComboboxPrimitive.ItemIndicator, {
|
|
@@ -269,6 +391,7 @@ var VirtualizedComboboxList = ({
|
|
|
269
391
|
});
|
|
270
392
|
};
|
|
271
393
|
var VirtualizedComboboxContent = ({
|
|
394
|
+
classes,
|
|
272
395
|
contentClassName,
|
|
273
396
|
emptyLabel,
|
|
274
397
|
groupSelections,
|
|
@@ -300,6 +423,7 @@ var VirtualizedComboboxContent = ({
|
|
|
300
423
|
})
|
|
301
424
|
}),
|
|
302
425
|
/* @__PURE__ */ jsx4(VirtualizedComboboxList, {
|
|
426
|
+
classes,
|
|
303
427
|
emptyLabel,
|
|
304
428
|
groupSelections,
|
|
305
429
|
itemIndexRef,
|
|
@@ -340,12 +464,6 @@ var defaultClear = (label) => /* @__PURE__ */ jsx4(ComboboxPrimitive.Clear, {
|
|
|
340
464
|
className: "size-3.5"
|
|
341
465
|
})
|
|
342
466
|
});
|
|
343
|
-
var selectedLabel = (value, placeholder) => {
|
|
344
|
-
if (value && !("label" in value)) {
|
|
345
|
-
return value.length > 0 ? value.map(({ label }) => label).join(", ") : placeholder;
|
|
346
|
-
}
|
|
347
|
-
return value && "label" in value ? value.label : placeholder;
|
|
348
|
-
};
|
|
349
467
|
var useComboboxVirtualizerRef = (providedRef) => {
|
|
350
468
|
const localRef = useRef(null);
|
|
351
469
|
return providedRef ?? localRef;
|
|
@@ -444,16 +562,42 @@ function VirtualizedCombobox(props) {
|
|
|
444
562
|
});
|
|
445
563
|
}
|
|
446
564
|
|
|
447
|
-
// ../../src/components/ui/
|
|
565
|
+
// ../../src/components/ui/virtualized-combobox.tsx
|
|
566
|
+
"use client";
|
|
567
|
+
|
|
568
|
+
// ../../src/components/phone-number-input/react.tsx
|
|
448
569
|
import { ChevronsUpDown as ChevronsUpDown2 } from "lucide-react";
|
|
449
570
|
|
|
450
|
-
// ../../src/components/
|
|
451
|
-
|
|
571
|
+
// ../../src/components/phone-number-input/classes.ts
|
|
572
|
+
var phoneNumberInputClasses = {
|
|
573
|
+
root: "grid gap-2",
|
|
574
|
+
label: "text-sm font-medium",
|
|
575
|
+
countryPopup: "w-72! max-w-[calc(100vw-2rem)]!",
|
|
576
|
+
numberInput: "min-w-0 flex-1",
|
|
577
|
+
extension: "grid max-w-32 gap-1.5",
|
|
578
|
+
hint: "text-muted-foreground text-xs"
|
|
579
|
+
};
|
|
580
|
+
var resolvePhoneNumberInputClasses = (overrides) => ({
|
|
581
|
+
...phoneNumberInputClasses,
|
|
582
|
+
...overrides
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
// ../../src/components/phone-number-input/index.ts
|
|
586
|
+
import {
|
|
587
|
+
AsYouType,
|
|
588
|
+
getCountries as getCountries2,
|
|
589
|
+
getCountryCallingCode as getCountryCallingCode2,
|
|
590
|
+
parsePhoneNumberFromString as parsePhoneNumberFromString2
|
|
591
|
+
} from "libphonenumber-js/max";
|
|
592
|
+
|
|
593
|
+
// ../../src/components/phone-number-input/schema.ts
|
|
594
|
+
import { Schema as Schema3, Struct as Struct2 } from "effect";
|
|
452
595
|
import {
|
|
453
596
|
getCountryCallingCode,
|
|
597
|
+
getCountries,
|
|
454
598
|
parsePhoneNumberFromString
|
|
455
599
|
} from "libphonenumber-js/max";
|
|
456
|
-
var E164DigitsSchema =
|
|
600
|
+
var E164DigitsSchema = Schema3.String.check(Schema3.isPattern(/^\d*$/), Schema3.isMaxLength(15)).annotate({ identifier: "E164Digits" });
|
|
457
601
|
var getPhoneNumberDigits = (value, country) => {
|
|
458
602
|
if (!value)
|
|
459
603
|
return "";
|
|
@@ -466,10 +610,32 @@ var getPhoneNumberDigits = (value, country) => {
|
|
|
466
610
|
const digits = value.replace(/(?:ext\.?|x|#|;ext=)\s*\d+\s*$/i, "").replace(/\D/g, "");
|
|
467
611
|
return value.trimStart().startsWith("+") ? digits : `${getCountryCallingCode(country)}${digits}`;
|
|
468
612
|
};
|
|
469
|
-
var fitsE164DigitLimit = (value, country) =>
|
|
613
|
+
var fitsE164DigitLimit = (value, country) => Schema3.is(E164DigitsSchema)(getPhoneNumberDigits(value, country));
|
|
614
|
+
var PhoneCountrySchema = Schema3.Literals(getCountries()).annotate({
|
|
615
|
+
identifier: "PhoneCountry"
|
|
616
|
+
});
|
|
617
|
+
var PhoneNumberInputClassesOverridesSchema = Schema3.Record(Schema3.Literals(Struct2.keys(phoneNumberInputClasses)), Schema3.optionalKey(Schema3.String)).annotate({ identifier: "PhoneNumberInputClassesOverrides" });
|
|
618
|
+
var PhoneNumberInputPropsSchema = Schema3.Struct({
|
|
619
|
+
classes: Schema3.optional(PhoneNumberInputClassesOverridesSchema),
|
|
620
|
+
value: Schema3.String,
|
|
621
|
+
country: PhoneCountrySchema,
|
|
622
|
+
countries: Schema3.optional(Schema3.Array(PhoneCountrySchema)),
|
|
623
|
+
label: Schema3.optional(Schema3.String),
|
|
624
|
+
name: Schema3.optional(Schema3.String),
|
|
625
|
+
id: Schema3.optional(Schema3.String),
|
|
626
|
+
locale: Schema3.optional(Schema3.String),
|
|
627
|
+
disabled: Schema3.optional(Schema3.Boolean),
|
|
628
|
+
readOnly: Schema3.optional(Schema3.Boolean),
|
|
629
|
+
required: Schema3.optional(Schema3.Boolean),
|
|
630
|
+
withExtension: Schema3.optional(Schema3.Boolean),
|
|
631
|
+
placeholder: Schema3.optional(Schema3.String),
|
|
632
|
+
autoComplete: Schema3.optional(Schema3.String),
|
|
633
|
+
className: Schema3.optional(Schema3.String),
|
|
634
|
+
containerClassName: Schema3.optional(Schema3.String),
|
|
635
|
+
contentClassName: Schema3.optional(Schema3.String)
|
|
636
|
+
}).annotate({ identifier: "PhoneNumberInputProps" });
|
|
470
637
|
|
|
471
|
-
// ../../src/components/
|
|
472
|
-
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
638
|
+
// ../../src/components/phone-number-input/index.ts
|
|
473
639
|
var normalizePhoneNumber = (value, country) => {
|
|
474
640
|
const phone = parsePhoneNumberFromString2(value, {
|
|
475
641
|
defaultCountry: country,
|
|
@@ -481,12 +647,117 @@ var normalizePhoneNumber = (value, country) => {
|
|
|
481
647
|
country: phone.country ?? null
|
|
482
648
|
} : null;
|
|
483
649
|
};
|
|
650
|
+
var defaultMessages2 = {
|
|
651
|
+
en: {
|
|
652
|
+
label: "Phone number",
|
|
653
|
+
country: "Phone country",
|
|
654
|
+
empty: "No matching countries.",
|
|
655
|
+
extension: "Extension",
|
|
656
|
+
status: "Enter a complete number. Validation does not verify ownership."
|
|
657
|
+
},
|
|
658
|
+
fr: {
|
|
659
|
+
label: "Numéro de téléphone",
|
|
660
|
+
country: "Pays du numéro",
|
|
661
|
+
empty: "Aucun pays correspondant.",
|
|
662
|
+
extension: "Poste",
|
|
663
|
+
status: "Saisissez un numéro complet. La validation ne vérifie pas son propriétaire."
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
var phoneNumberMessages = (locale) => locale.startsWith("fr") ? defaultMessages2.fr : defaultMessages2.en;
|
|
667
|
+
var getPhoneNumberView = ({
|
|
668
|
+
value,
|
|
669
|
+
country,
|
|
670
|
+
countries = getCountries2()
|
|
671
|
+
}, language) => {
|
|
672
|
+
const names = new Intl.DisplayNames([language], { type: "region" });
|
|
673
|
+
const options = [...new Set([country, ...countries])].sort((a, b) => (names.of(a) ?? a).localeCompare(names.of(b) ?? b, language));
|
|
674
|
+
const valid = normalizePhoneNumber(value, country);
|
|
675
|
+
const parsed = parsePhoneNumberFromString2(value, {
|
|
676
|
+
defaultCountry: country,
|
|
677
|
+
extract: false
|
|
678
|
+
});
|
|
679
|
+
const callingCode = value.trim().startsWith("+") ? parsed?.countryCallingCode ?? getCountryCallingCode2(country) : getCountryCallingCode2(country);
|
|
680
|
+
const nationalDraft = value.trim().startsWith(`+${callingCode}`) ? value.trim().slice(callingCode.length + 1).trimStart() : value;
|
|
681
|
+
const extension = parsed?.ext ?? "";
|
|
682
|
+
const nationalDigits = (extension ? nationalDraft.replace(/(?:ext\.?|x|#|;ext=)\s*\d+\s*$/i, "") : nationalDraft).replace(/\D/g, "");
|
|
683
|
+
const formatCountry = parsed?.country ?? country;
|
|
684
|
+
const nationalValue = parsed?.isValid() ? parsed.formatNational({ formatExtension: (number) => number }) : new AsYouType(formatCountry).input(nationalDigits);
|
|
685
|
+
const items = options.map((code) => ({
|
|
686
|
+
value: code,
|
|
687
|
+
label: `${names.of(code)} (${code}) +${getCountryCallingCode2(code)}`
|
|
688
|
+
}));
|
|
689
|
+
return {
|
|
690
|
+
options,
|
|
691
|
+
items,
|
|
692
|
+
valid,
|
|
693
|
+
callingCode,
|
|
694
|
+
extension,
|
|
695
|
+
nationalDigits,
|
|
696
|
+
nationalValue
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
var changeNational = (draft, callingCode, extension, country) => {
|
|
700
|
+
const digits = draft.replace(/\D/g, "");
|
|
701
|
+
const value = digits ? `+${callingCode} ${digits}${extension ? ` ext. ${extension}` : ""}` : "";
|
|
702
|
+
return fitsE164DigitLimit(value, country) ? { value, details: normalizePhoneNumber(value, country) } : undefined;
|
|
703
|
+
};
|
|
704
|
+
var changePhoneDraft = (draft, callingCode, extension, country, options) => {
|
|
705
|
+
const international = draft.trimStart().startsWith("+");
|
|
706
|
+
const pasted = parsePhoneNumberFromString2(draft, {
|
|
707
|
+
defaultCountry: country,
|
|
708
|
+
extract: false
|
|
709
|
+
});
|
|
710
|
+
if (!international && !pasted?.ext) {
|
|
711
|
+
const next = changeNational(draft, callingCode, extension, country);
|
|
712
|
+
return next && { ...next, country, keepCaret: true };
|
|
713
|
+
}
|
|
714
|
+
const digits = draft.replace(/\D/g, "");
|
|
715
|
+
const value = pasted?.isValid() ? `${pasted.number}${pasted.ext ? ` ext. ${pasted.ext}` : ""}` : digits ? `${international ? "+" : `+${callingCode} `}${digits}` : "";
|
|
716
|
+
if (!fitsE164DigitLimit(value, country))
|
|
717
|
+
return;
|
|
718
|
+
const details = normalizePhoneNumber(value, country);
|
|
719
|
+
const nextCountry = international && details?.country && options.includes(details.country) ? details.country : country;
|
|
720
|
+
return { value, details, country: nextCountry, keepCaret: false };
|
|
721
|
+
};
|
|
722
|
+
var formatPhoneOnBlur = (value, country) => parsePhoneNumberFromString2(value, {
|
|
723
|
+
defaultCountry: country,
|
|
724
|
+
extract: false
|
|
725
|
+
})?.formatInternational();
|
|
726
|
+
var phoneDeletion = (value, start, end, key) => {
|
|
727
|
+
if (key !== "Backspace" && key !== "Delete" || start !== end)
|
|
728
|
+
return;
|
|
729
|
+
const direction = key === "Backspace" ? -1 : 1;
|
|
730
|
+
let index = direction === -1 ? start - 1 : start;
|
|
731
|
+
if (index < 0 || index >= value.length || /\d/.test(value[index]))
|
|
732
|
+
return;
|
|
733
|
+
while (index >= 0 && index < value.length && /\D/.test(value[index]))
|
|
734
|
+
index += direction;
|
|
735
|
+
if (index < 0 || index >= value.length)
|
|
736
|
+
return;
|
|
737
|
+
return {
|
|
738
|
+
draft: value.slice(0, index) + value.slice(index + 1),
|
|
739
|
+
digits: value.slice(0, direction === -1 ? index : start).replace(/\D/g, "").length
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
var phoneCaretOffset = (value, digits) => {
|
|
743
|
+
let position = 0;
|
|
744
|
+
while (position < value.length && digits > 0) {
|
|
745
|
+
if (/\d/.test(value[position]))
|
|
746
|
+
digits--;
|
|
747
|
+
position++;
|
|
748
|
+
}
|
|
749
|
+
return position;
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
// ../../src/components/phone-number-input/react.tsx
|
|
753
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
484
754
|
var PhoneNumberInput = ({
|
|
755
|
+
classes: classOverrides,
|
|
485
756
|
value,
|
|
486
757
|
country,
|
|
487
758
|
onCountryChange,
|
|
488
759
|
onValueChange,
|
|
489
|
-
countries =
|
|
760
|
+
countries = getCountries3(),
|
|
490
761
|
locale,
|
|
491
762
|
label,
|
|
492
763
|
id,
|
|
@@ -499,61 +770,47 @@ var PhoneNumberInput = ({
|
|
|
499
770
|
contentClassName,
|
|
500
771
|
...props
|
|
501
772
|
}) => {
|
|
773
|
+
const phoneNumberInputClasses = resolvePhoneNumberInputClasses(classOverrides);
|
|
502
774
|
const generatedId = useId();
|
|
503
775
|
const inputId = id ?? generatedId;
|
|
504
776
|
const language = useKrakstackLocale2(locale);
|
|
505
|
-
const
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
const extension = parsed?.ext ?? "";
|
|
516
|
-
const nationalDigits = (extension ? nationalDraft.replace(/(?:ext\.?|x|#|;ext=)\s*\d+\s*$/i, "") : nationalDraft).replace(/\D/g, "");
|
|
517
|
-
const formatCountry = parsed?.country ?? country;
|
|
518
|
-
const nationalValue = parsed?.isValid() ? parsed.formatNational({ formatExtension: (number) => number }) : new AsYouType(formatCountry).input(nationalDigits);
|
|
777
|
+
const copy = phoneNumberMessages(language);
|
|
778
|
+
const {
|
|
779
|
+
options,
|
|
780
|
+
items,
|
|
781
|
+
valid,
|
|
782
|
+
callingCode,
|
|
783
|
+
extension,
|
|
784
|
+
nationalDigits,
|
|
785
|
+
nationalValue
|
|
786
|
+
} = getPhoneNumberView({ value, country, countries }, language);
|
|
519
787
|
const pendingCaret = useRef2(null);
|
|
520
788
|
useLayoutEffect(() => {
|
|
521
789
|
const pending = pendingCaret.current;
|
|
522
790
|
if (!pending)
|
|
523
791
|
return;
|
|
524
792
|
pendingCaret.current = null;
|
|
525
|
-
|
|
526
|
-
let position = 0;
|
|
527
|
-
while (position < pending.element.value.length && remaining > 0) {
|
|
528
|
-
if (/\d/.test(pending.element.value[position]))
|
|
529
|
-
remaining--;
|
|
530
|
-
position++;
|
|
531
|
-
}
|
|
793
|
+
const position = phoneCaretOffset(pending.element.value, pending.digits);
|
|
532
794
|
pending.element.setSelectionRange(position, position);
|
|
533
795
|
});
|
|
534
796
|
const emitNational = (draft, nextExtension = extension) => {
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
if (!fitsE164DigitLimit(next, country)) {
|
|
797
|
+
const next = changeNational(draft, callingCode, nextExtension, country);
|
|
798
|
+
if (!next) {
|
|
538
799
|
pendingCaret.current = null;
|
|
539
800
|
return;
|
|
540
801
|
}
|
|
541
|
-
onValueChange(next,
|
|
802
|
+
onValueChange(next.value, next.details);
|
|
542
803
|
};
|
|
543
|
-
const countryLabel =
|
|
544
|
-
const items = options.map((code) => ({
|
|
545
|
-
value: code,
|
|
546
|
-
label: `${names.of(code)} (${code}) +${getCountryCallingCode2(code)}`
|
|
547
|
-
}));
|
|
804
|
+
const countryLabel = copy.country;
|
|
548
805
|
return /* @__PURE__ */ jsxs2("div", {
|
|
549
806
|
"data-slot": "phone-number-input",
|
|
550
|
-
className: cn(
|
|
807
|
+
className: cn(phoneNumberInputClasses.root, containerClassName),
|
|
551
808
|
children: [
|
|
552
809
|
/* @__PURE__ */ jsx5("label", {
|
|
553
810
|
"data-slot": "phone-number-label",
|
|
554
811
|
htmlFor: inputId,
|
|
555
|
-
className:
|
|
556
|
-
children: label ??
|
|
812
|
+
className: phoneNumberInputClasses.label,
|
|
813
|
+
children: label ?? copy.label
|
|
557
814
|
}),
|
|
558
815
|
name ? /* @__PURE__ */ jsx5("input", {
|
|
559
816
|
type: "hidden",
|
|
@@ -571,8 +828,8 @@ var PhoneNumberInput = ({
|
|
|
571
828
|
items,
|
|
572
829
|
value: items.find((item) => item.value === country) ?? null,
|
|
573
830
|
placeholder: country,
|
|
574
|
-
emptyLabel:
|
|
575
|
-
contentClassName: cn(
|
|
831
|
+
emptyLabel: copy.empty,
|
|
832
|
+
contentClassName: cn(phoneNumberInputClasses.countryPopup, contentClassName),
|
|
576
833
|
disabled: props.disabled || props.readOnly,
|
|
577
834
|
trigger: /* @__PURE__ */ jsxs2(Button, {
|
|
578
835
|
type: "button",
|
|
@@ -601,11 +858,11 @@ var PhoneNumberInput = ({
|
|
|
601
858
|
const selected = options.find((option) => option === item?.value);
|
|
602
859
|
if (!selected || selected === country)
|
|
603
860
|
return;
|
|
604
|
-
const next = nationalDigits
|
|
605
|
-
if (!
|
|
861
|
+
const next = changeNational(nationalDigits, getCountryCallingCode3(selected), extension, selected);
|
|
862
|
+
if (!next)
|
|
606
863
|
return;
|
|
607
864
|
onCountryChange(selected);
|
|
608
|
-
onValueChange(next,
|
|
865
|
+
onValueChange(next.value, next.details);
|
|
609
866
|
}
|
|
610
867
|
}),
|
|
611
868
|
/* @__PURE__ */ jsx5(Input, {
|
|
@@ -615,33 +872,23 @@ var PhoneNumberInput = ({
|
|
|
615
872
|
type: "tel",
|
|
616
873
|
inputMode: "numeric",
|
|
617
874
|
autoComplete: props.autoComplete ?? "tel-national",
|
|
618
|
-
className: cn(
|
|
875
|
+
className: cn(phoneNumberInputClasses.numberInput, className),
|
|
619
876
|
value: nationalValue,
|
|
620
877
|
"aria-invalid": Boolean(value) && !valid,
|
|
621
878
|
"aria-describedby": `${inputId}-status ${props["aria-describedby"] ?? ""}`,
|
|
622
879
|
onChange: (event) => {
|
|
623
880
|
const draft = event.target.value;
|
|
624
|
-
const
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
});
|
|
629
|
-
if (!international && !pasted?.ext) {
|
|
881
|
+
const next = changePhoneDraft(draft, callingCode, extension, country, options);
|
|
882
|
+
if (!next)
|
|
883
|
+
return;
|
|
884
|
+
if (next.keepCaret)
|
|
630
885
|
pendingCaret.current = {
|
|
631
886
|
element: event.target,
|
|
632
887
|
digits: draft.slice(0, event.target.selectionStart ?? draft.length).replace(/\D/g, "").length
|
|
633
888
|
};
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
const digits = draft.replace(/\D/g, "");
|
|
638
|
-
const next = pasted?.isValid() ? `${pasted.number}${pasted.ext ? ` ext. ${pasted.ext}` : ""}` : digits ? `${international ? "+" : `+${callingCode} `}${digits}` : "";
|
|
639
|
-
if (!fitsE164DigitLimit(next, country))
|
|
640
|
-
return;
|
|
641
|
-
const details = normalizePhoneNumber(next, country);
|
|
642
|
-
if (international && details?.country && options.includes(details.country) && details.country !== country)
|
|
643
|
-
onCountryChange(details.country);
|
|
644
|
-
onValueChange(next, details);
|
|
889
|
+
if (next.country !== country)
|
|
890
|
+
onCountryChange(next.country);
|
|
891
|
+
onValueChange(next.value, next.details);
|
|
645
892
|
},
|
|
646
893
|
onKeyDown: (event) => {
|
|
647
894
|
onKeyDown?.(event);
|
|
@@ -651,34 +898,17 @@ var PhoneNumberInput = ({
|
|
|
651
898
|
event.preventDefault();
|
|
652
899
|
return;
|
|
653
900
|
}
|
|
654
|
-
if (event.key !== "Backspace" && event.key !== "Delete")
|
|
655
|
-
return;
|
|
656
901
|
const element = event.currentTarget;
|
|
657
|
-
const
|
|
658
|
-
if (
|
|
659
|
-
return;
|
|
660
|
-
const direction = event.key === "Backspace" ? -1 : 1;
|
|
661
|
-
let index = direction === -1 ? start - 1 : start;
|
|
662
|
-
if (index < 0 || index >= nationalValue.length || /\d/.test(nationalValue[index]))
|
|
663
|
-
return;
|
|
664
|
-
while (index >= 0 && index < nationalValue.length && /\D/.test(nationalValue[index]))
|
|
665
|
-
index += direction;
|
|
666
|
-
if (index < 0 || index >= nationalValue.length)
|
|
902
|
+
const next = phoneDeletion(nationalValue, element.selectionStart ?? 0, element.selectionEnd, event.key);
|
|
903
|
+
if (!next)
|
|
667
904
|
return;
|
|
668
905
|
event.preventDefault();
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
element,
|
|
672
|
-
digits: nationalValue.slice(0, direction === -1 ? index : start).replace(/\D/g, "").length
|
|
673
|
-
};
|
|
674
|
-
emitNational(next);
|
|
906
|
+
pendingCaret.current = { element, digits: next.digits };
|
|
907
|
+
emitNational(next.draft);
|
|
675
908
|
},
|
|
676
909
|
onBlur: (event) => {
|
|
677
910
|
if (!props.readOnly && !props.disabled && valid) {
|
|
678
|
-
const formatted =
|
|
679
|
-
defaultCountry: country,
|
|
680
|
-
extract: false
|
|
681
|
-
})?.formatInternational();
|
|
911
|
+
const formatted = formatPhoneOnBlur(value, country);
|
|
682
912
|
if (formatted && formatted !== value)
|
|
683
913
|
onValueChange(formatted, valid);
|
|
684
914
|
}
|
|
@@ -689,12 +919,12 @@ var PhoneNumberInput = ({
|
|
|
689
919
|
}),
|
|
690
920
|
withExtension || extension ? /* @__PURE__ */ jsxs2("div", {
|
|
691
921
|
"data-slot": "phone-number-extension",
|
|
692
|
-
className:
|
|
922
|
+
className: phoneNumberInputClasses.extension,
|
|
693
923
|
children: [
|
|
694
924
|
/* @__PURE__ */ jsx5("label", {
|
|
695
925
|
htmlFor: `${inputId}-extension`,
|
|
696
|
-
className:
|
|
697
|
-
children:
|
|
926
|
+
className: phoneNumberInputClasses.hint,
|
|
927
|
+
children: copy.extension
|
|
698
928
|
}),
|
|
699
929
|
/* @__PURE__ */ jsx5(Input, {
|
|
700
930
|
id: `${inputId}-extension`,
|
|
@@ -710,8 +940,8 @@ var PhoneNumberInput = ({
|
|
|
710
940
|
/* @__PURE__ */ jsx5("p", {
|
|
711
941
|
"data-slot": "phone-number-status",
|
|
712
942
|
id: `${inputId}-status`,
|
|
713
|
-
className:
|
|
714
|
-
children: valid ? `${valid.e164}${valid.extension ? ` ext. ${valid.extension}` : ""}` :
|
|
943
|
+
className: phoneNumberInputClasses.hint,
|
|
944
|
+
children: valid ? `${valid.e164}${valid.extension ? ` ext. ${valid.extension}` : ""}` : copy.status
|
|
715
945
|
})
|
|
716
946
|
]
|
|
717
947
|
});
|