react-feedback-surveys 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +223 -91
- package/dist/index.css +1 -1
- package/dist/index.d.ts +98 -11
- package/dist/index.js +2891 -2734
- package/package.json +7 -3
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root,:host{--_color-text:var(--ft-color-text,30 8% 14%);--_color-bg:var(--ft-color-bg,0 0% 100%);--_color-muted:var(--ft-color-muted,222 11% 46%);--_color-error:var(--ft-color-error,32 95% 44%);--_color-border:var(--ft-color-border,214 14% 83%);--_color-outline:var(--ft-color-outline,218 14% 65%);--_color-shadow:var(--ft-color-shadow,0 0% 0%);--_color-control:var(--ft-color-control,214 20% 96%);--_popup-z-index:var(--ft-popup-z-index,49);--_popup-head-offset:var(--ft-popup-head-offset,0);--_surface-padding:var(--ft-surface-padding,24px);--_surface-padding-mobile:var(--ft-surface-padding-mobile,20px);--_surface-radius:var(--ft-surface-radius,8px)}._base_d5qlz_1{padding:var(--_surface-padding);background-color:hsl(var(--_color-bg)/100%);border-radius:var(--_surface-radius);box-shadow:0 0 10px hsl(var(--_color-shadow)/20%);display:block;position:relative;overflow:auto}@media (width<=399px){._base_d5qlz_1{padding:var(--_surface-padding-mobile)}}._base_1vr2h_1{--_popup-head-offset:32px;z-index:var(--_popup-z-index);box-sizing:border-box;max-width:calc(100vw - var(--_surface-padding) * 2);max-height:calc(100vh - var(--_surface-padding) * 2);transform-origin:50% 100%;margin:0;display:flex;position:fixed}@media (width<=399px){._base_1vr2h_1{max-width:calc(100vw - var(--_surface-padding-mobile) * 2);max-height:calc(100vh - var(--_surface-padding-mobile) * 2)}}._animated_1vr2h_19{opacity:0;animation:.12s ease-in-out forwards _fadeForward_1vr2h_1}@keyframes _fadeForward_1vr2h_1{0%{opacity:0;transform:translateY(8px)scale(.92)}to{opacity:1;transform:translateY(0)scale(1)}}._topLeft_1vr2h_34{top:var(--_surface-padding);left:var(--_surface-padding)}@media (width<=399px){._topLeft_1vr2h_34{top:var(--_surface-padding-mobile);left:var(--_surface-padding-mobile)}}._topRight_1vr2h_45{top:var(--_surface-padding);right:var(--_surface-padding)}@media (width<=399px){._topRight_1vr2h_45{top:var(--_surface-padding-mobile);right:var(--_surface-padding-mobile)}}._bottomRight_1vr2h_56{right:var(--_surface-padding);bottom:var(--_surface-padding)}@media (width<=399px){._bottomRight_1vr2h_56{right:var(--_surface-padding-mobile);bottom:var(--_surface-padding-mobile)}}._bottomLeft_1vr2h_67{bottom:var(--_surface-padding);left:var(--_surface-padding)}@media (width<=399px){._bottomLeft_1vr2h_67{bottom:var(--_surface-padding-mobile);left:var(--_surface-padding-mobile)}}._close_1vr2h_78{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._close_1vr2h_78:disabled{cursor:default}._close_1vr2h_78{top:var(--_surface-padding);width:24px;height:24px;color:hsl(var(--_color-outline)/100%);transition:color .15s;position:absolute;inset-inline-end:var(--_surface-padding)}._close_1vr2h_78:hover{color:hsl(var(--_color-text)/100%)}._close_1vr2h_78:before,._close_1vr2h_78:after{content:"";background-color:currentColor;border-radius:1px;position:absolute;top:50%;left:50%;transform:rotate(45deg)}._close_1vr2h_78:before{width:16px;height:2px;margin:-1px 0 0 -8px}._close_1vr2h_78:after{width:2px;height:16px;margin:-8px 0 0 -1px}@media (width<=399px){._close_1vr2h_78{top:var(--_surface-padding-mobile);inset-inline-end:var(--_surface-padding-mobile)}}._sr_clg7k_1{white-space:nowrap;clip-path:inset(50%);border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._subtext_clg7k_13{margin:0 0 16px;line-height:1.25}._input_clg7k_18{box-sizing:border-box;width:100%;color:hsl(var(--_color-text)/100%);background-color:hsl(var(--_color-bg)/100%);border:1px solid hsl(var(--_color-border)/100%);border-radius:var(--_surface-radius);outline:0 solid hsl(var(--_color-outline)/14%);padding:4px 12px;font-family:inherit;font-size:16px;line-height:1.5;transition:background-color .15s,border-color .15s,outline-width .2s}._input_clg7k_18:focus{outline:4px solid hsl(var(--_color-outline)/14%)}._input_clg7k_18._invalid_clg7k_35{border-color:hsl(var(--_color-error)/100%)}._input_clg7k_18._invalid_clg7k_35:focus{outline-color:hsl(var(--_color-error)/14%)}._submit_clg7k_42{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._submit_clg7k_42:disabled{cursor:default}._submit_clg7k_42{text-align:center;color:hsl(var(--_color-bg)/100%);background-color:hsl(var(--_color-text)/100%);border-radius:var(--_surface-radius);padding:8px 32px;font-size:16px;font-weight:400;transition:opacity .2s}._submit_clg7k_42:hover{opacity:.85}._submit_clg7k_42{width:100%;margin-top:16px}._skip_clg7k_74{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._skip_clg7k_74:disabled{cursor:default}._skip_clg7k_74{text-align:center;width:100%;color:hsl(var(--_color-muted)/100%);cursor:pointer;margin-top:8px;padding:4px;font-size:16px;font-weight:500;line-height:1.5;display:block}._skip_clg7k_74:hover{color:hsl(var(--_color-text)/100%)}._choices_nhux3_1{margin:0 0 12px}._choice_nhux3_1{display:flex}._choice_nhux3_1+._choice_nhux3_1{margin-top:12px}._label_nhux3_12{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:flex-start;gap:8px;display:inline-flex;position:relative}._sr_nhux3_21{white-space:nowrap;clip-path:inset(50%);border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._checkbox_nhux3_33{white-space:nowrap;clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}._check_nhux3_33{border:1px solid hsl(var(--_color-border)/100%);border-radius:4px;min-width:20px;height:20px}._label_nhux3_12:hover ._check_nhux3_33{border-color:hsl(var(--_color-text)/100%)}._checkbox_nhux3_33:focus-visible+._check_nhux3_33{outline:4px solid hsl(var(--_color-outline)/14%)}._checkbox_nhux3_33:checked+._check_nhux3_33{background-color:hsl(var(--_color-text)/100%);border-color:hsl(var(--_color-text)/100%);position:relative}._checkbox_nhux3_33:checked+._check_nhux3_33:after{content:"";border:2px solid;border-color:transparent transparent hsl(var(--_color-bg)/100%) hsl(var(--_color-bg)/100%);pointer-events:none;width:10px;height:4px;position:absolute;top:50%;left:50%;transform:translate(-45%,-75%)rotate(-45deg)}._input_nhux3_74{margin-top:8px;padding:4px 12px}._textarea_nhux3_79{height:120px;padding:8px 12px}._input_nhux3_74,._textarea_nhux3_79{box-sizing:border-box;width:100%;color:hsl(var(--_color-text)/100%);background-color:hsl(var(--_color-bg)/100%);border:1px solid hsl(var(--_color-border)/100%);border-radius:var(--_surface-radius);outline:0 solid hsl(var(--_color-outline)/14%);resize:none;font-family:inherit;font-size:16px;line-height:1.5;transition:background-color .15s,border-color .15s,outline-width .2s}._input_nhux3_74:focus,._textarea_nhux3_79:focus{outline:4px solid hsl(var(--_color-outline)/14%)}._submit_nhux3_104{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._submit_nhux3_104:disabled{cursor:default}._submit_nhux3_104{text-align:center;color:hsl(var(--_color-bg)/100%);background-color:hsl(var(--_color-text)/100%);border-radius:var(--_surface-radius);padding:8px 32px;font-size:16px;font-weight:400;transition:opacity .2s}._submit_nhux3_104:hover{opacity:.85}._submit_nhux3_104{width:100%;margin-top:16px}._skip_nhux3_136{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._skip_nhux3_136:disabled{cursor:default}._skip_nhux3_136{text-align:center;width:100%;color:hsl(var(--_color-muted)/100%);cursor:pointer;margin-top:8px;padding:4px;font-size:16px;font-weight:500;line-height:1.5;display:block}._skip_nhux3_136:hover{color:hsl(var(--_color-text)/100%)}._success_nhux3_166{text-align:center;padding:16px 0 32px;font-size:16px;font-weight:600;line-height:1.5}._base_1ilpx_1{text-align:center;padding:0 24px}._icon_1ilpx_6{display:inline-block}._base_1xpqq_1{color:hsl(var(--_color-text)/100%);padding:0;font-family:Helvetica Neue,Arial Nova,Helvetica,Arial,sans-serif}._head_1xpqq_7{padding-block:0 20px;padding-inline:0 var(--_popup-head-offset);gap:8px;display:flex}._title_1xpqq_14{flex:1 0;font-family:inherit;font-size:16px;font-style:normal;font-weight:500;line-height:1.4}._base_nswpf_1{margin:12px 0 0;display:flex}._label_nswpf_6{box-sizing:border-box;max-width:50%;color:hsl(var(--_color-muted)/100%);flex:0 0 50%;font-size:14px;line-height:1.4286}._between_nswpf_15{justify-content:space-between}._between_nswpf_15 ._label_nswpf_6{flex:0 0 50%;max-width:50%}._between_nswpf_15 ._label_nswpf_6:first-child{text-align:start}._between_nswpf_15 ._label_nswpf_6:last-child{text-align:end}._center_nswpf_29 ._label_nswpf_6{flex:0 0 50%;max-width:50%}._center_nswpf_29 ._label_nswpf_6:first-child{text-align:end;padding-right:8px}._center_nswpf_29 ._label_nswpf_6:last-child{text-align:start;padding-left:8px}._center_nswpf_29 ._text_nswpf_41{text-align:center;min-width:56px;display:inline-block}@media (width<=599px){._center_nswpf_29 ._text_nswpf_41{min-width:48px}}._list_grany_1{justify-content:center;gap:16px;display:flex}._icon_grany_7{transition:transform .12s;transform:scale(1)}._button_grany_12{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_grany_12:disabled{cursor:default}._button_grany_12{background-color:hsl(var(--_color-control)/100%);border-radius:50%;justify-content:center;align-items:center;width:56px;height:56px;display:flex}._button_grany_12:hover ._icon_grany_7{transform:scale(1.15)}._button_grany_12:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}@media (width<=399px){._button_grany_12{width:48px;height:48px}}._list_1yzyr_1{justify-content:center;gap:16px;display:flex}._icon_1yzyr_7{transition:transform .12s;transform:scale(1)}._button_1yzyr_12{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_1yzyr_12:disabled{cursor:default}._button_1yzyr_12{background-color:hsl(var(--_color-control)/100%);border-radius:50%;justify-content:center;align-items:center;width:56px;height:56px;display:flex}._button_1yzyr_12:hover ._icon_1yzyr_7{transform:scale(1.15)}._button_1yzyr_12:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._base_1nccq_1{max-width:100%}._rating_1nccq_5,._feedback_1nccq_6,._contact_1nccq_7,._success_1nccq_8{width:280px}@media (width<=399px){._rating_1nccq_5,._feedback_1nccq_6,._contact_1nccq_7,._success_1nccq_8{width:100%}}._list_1vfe4_1{justify-content:space-between;display:flex}._icon_1vfe4_6{transition:transform .12s;transform:scale(1)}._button_1vfe4_11{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_1vfe4_11:disabled{cursor:default}._button_1vfe4_11{background-color:hsl(var(--_color-control)/100%);border-radius:50%;justify-content:center;align-items:center;width:56px;height:56px;display:flex}._button_1vfe4_11:hover ._icon_1vfe4_6{transform:scale(1.15)}._button_1vfe4_11:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}@media (width<=399px){._button_1vfe4_11{width:48px;height:48px}}._list_16sag_1{justify-content:space-between;display:flex}._button_16sag_6{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_16sag_6:disabled{cursor:default}._button_16sag_6{width:40px;height:40px;color:hsl(var(--_color-muted)/100%);background-color:hsl(var(--_color-control)/100%);box-shadow:0 0 0 0 hsl(var(--_color-control)/100%);border-radius:50%;justify-content:center;align-items:center;font-size:18px;font-weight:700;transition:color .12s,box-shadow .12s;display:flex}._button_16sag_6:hover{color:hsl(var(--_color-text)/100%);box-shadow:0 0 0 2px hsl(var(--_color-control)/100%)}._button_16sag_6:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._list_1kpxu_1{justify-content:space-between;display:flex}._icon_1kpxu_6{transition:transform .12s;transform:scale(1)}._button_1kpxu_11{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_1kpxu_11:disabled{cursor:default}._button_1kpxu_11{justify-content:center;align-items:center;width:40px;height:40px;display:flex}._button_1kpxu_11:hover ._icon_1kpxu_6{transform:scale(1.1)}._button_1kpxu_11:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._base_sfbnw_1{max-width:100%}._rating_sfbnw_5,._feedback_sfbnw_6,._contact_sfbnw_7,._success_sfbnw_8{width:320px}@media (width<=399px){._rating_sfbnw_5,._feedback_sfbnw_6,._contact_sfbnw_7,._success_sfbnw_8{width:100%}}._list_whbas_1{justify-content:space-between;gap:6px;display:flex}@media (width<=599px){._list_whbas_1{flex-direction:column-reverse;gap:4px}}._button_whbas_13{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_whbas_13:disabled{cursor:default}._button_whbas_13{text-align:center;width:40px;height:40px;color:hsl(var(--_color-muted)/100%);background-color:hsl(var(--_color-control)/100%);box-shadow:0 0 0 0 hsl(var(--_color-control)/100%);border-radius:50%;font-size:18px;font-weight:700;transition:color .12s,box-shadow .12s;display:inline-block}._button_whbas_13:hover{color:hsl(var(--_color-text)/100%);box-shadow:0 0 0 2px hsl(var(--_color-control)/100%)}@media (width<=599px){._button_whbas_13:hover{box-shadow:none}}._button_whbas_13:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._button_whbas_13 ._score_whbas_52{display:inline}._button_whbas_13 ._label_whbas_55{display:none}@media (width<=599px){._button_whbas_13 ._label_whbas_55{display:inline}._button_whbas_13{border-radius:6px;width:100%;height:auto;padding:6px;font-size:14px;line-height:20px}._labels_whbas_75{display:none}}._base_tj93m_1{max-width:100%}._rating_tj93m_5{width:340px}@media (width<=599px){._rating_tj93m_5{width:280px}}@media (width<=399px){._rating_tj93m_5{width:100%}}._feedback_tj93m_19,._contact_tj93m_20,._success_tj93m_21{width:280px}@media (width<=599px){._feedback_tj93m_19,._contact_tj93m_20,._success_tj93m_21{width:100%}}._list_divjm_1{justify-content:space-between;gap:6px;display:flex}@media (width<=599px){._list_divjm_1{flex-direction:column-reverse;gap:4px}}._button_divjm_13{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_divjm_13:disabled{cursor:default}._button_divjm_13{text-align:center;width:40px;height:40px;color:hsl(var(--_color-muted)/100%);background-color:hsl(var(--_color-control)/100%);box-shadow:0 0 0 0 hsl(var(--_color-control)/100%);border-radius:50%;font-size:18px;font-weight:700;transition:color .12s,box-shadow .12s;display:block}._button_divjm_13:hover{color:hsl(var(--_color-text)/100%);box-shadow:0 0 0 2px hsl(var(--_color-control)/100%)}@media (width<=599px){._button_divjm_13:hover{box-shadow:none}}._button_divjm_13:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._button_divjm_13 ._score_divjm_52{display:inline}._button_divjm_13 ._label_divjm_55{display:none}@media (width<=599px){._button_divjm_13 ._label_divjm_55{display:inline}._button_divjm_13{border-radius:6px;width:100%;height:auto;padding:6px;font-size:14px;line-height:20px}._labels_divjm_75{display:none}}._base_kj5ew_1{max-width:100%}._rating_kj5ew_5{width:520px}@media (width<=599px){._rating_kj5ew_5{width:320px}}@media (width<=399px){._rating_kj5ew_5{width:100%}}._feedback_kj5ew_19,._contact_kj5ew_20,._success_kj5ew_21{width:280px}@media (width<=599px){._feedback_kj5ew_19,._contact_kj5ew_20,._success_kj5ew_21{width:100%}}
|
|
1
|
+
:root,:host{--_color-text:var(--ft-color-text,30 8% 14%);--_color-bg:var(--ft-color-bg,0 0% 100%);--_color-muted:var(--ft-color-muted,222 11% 46%);--_color-error:var(--ft-color-error,32 95% 44%);--_color-error-text:var(--ft-color-error-text,32 95% 32%);--_color-border:var(--ft-color-border,214 14% 83%);--_color-outline:var(--ft-color-outline,218 14% 65%);--_color-shadow:var(--ft-color-shadow,0 0% 0%);--_color-control:var(--ft-color-control,214 20% 96%);--_popup-z-index:var(--ft-popup-z-index,49);--_popup-head-offset:var(--ft-popup-head-offset,0);--_surface-padding:var(--ft-surface-padding,20px);--_surface-padding-mobile:var(--ft-surface-padding-mobile,20px);--_surface-radius:var(--ft-surface-radius,8px);--_font-family:var(--ft-font-family,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);font-family:var(--_font-family)}input,textarea,select{font:inherit}._base_d5qlz_1{padding:var(--_surface-padding);background-color:hsl(var(--_color-bg)/100%);border-radius:var(--_surface-radius);box-shadow:0 0 10px hsl(var(--_color-shadow)/20%);display:block;position:relative;overflow:auto}@media (width<=399px){._base_d5qlz_1{padding:var(--_surface-padding-mobile)}}._base_1vr2h_1{--_popup-head-offset:32px;z-index:var(--_popup-z-index);box-sizing:border-box;max-width:calc(100vw - var(--_surface-padding) * 2);max-height:calc(100vh - var(--_surface-padding) * 2);transform-origin:50% 100%;margin:0;display:flex;position:fixed}@media (width<=399px){._base_1vr2h_1{max-width:calc(100vw - var(--_surface-padding-mobile) * 2);max-height:calc(100vh - var(--_surface-padding-mobile) * 2)}}._animated_1vr2h_19{opacity:0;animation:.12s ease-in-out forwards _fadeForward_1vr2h_1}@keyframes _fadeForward_1vr2h_1{0%{opacity:0;transform:translateY(8px)scale(.92)}to{opacity:1;transform:translateY(0)scale(1)}}._topLeft_1vr2h_34{top:var(--_surface-padding);left:var(--_surface-padding)}@media (width<=399px){._topLeft_1vr2h_34{top:var(--_surface-padding-mobile);left:var(--_surface-padding-mobile)}}._topRight_1vr2h_45{top:var(--_surface-padding);right:var(--_surface-padding)}@media (width<=399px){._topRight_1vr2h_45{top:var(--_surface-padding-mobile);right:var(--_surface-padding-mobile)}}._bottomRight_1vr2h_56{right:var(--_surface-padding);bottom:var(--_surface-padding)}@media (width<=399px){._bottomRight_1vr2h_56{right:var(--_surface-padding-mobile);bottom:var(--_surface-padding-mobile)}}._bottomLeft_1vr2h_67{bottom:var(--_surface-padding);left:var(--_surface-padding)}@media (width<=399px){._bottomLeft_1vr2h_67{bottom:var(--_surface-padding-mobile);left:var(--_surface-padding-mobile)}}._close_1vr2h_78{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._close_1vr2h_78:disabled{cursor:default}._close_1vr2h_78{top:var(--_surface-padding);width:24px;height:24px;color:hsl(var(--_color-outline)/100%);transition:color .15s;position:absolute;inset-inline-end:var(--_surface-padding)}._close_1vr2h_78:hover{color:hsl(var(--_color-text)/100%)}._close_1vr2h_78:before,._close_1vr2h_78:after{content:"";background-color:currentColor;border-radius:1px;position:absolute;top:50%;left:50%;transform:rotate(45deg)}._close_1vr2h_78:before{width:16px;height:2px;margin:-1px 0 0 -8px}._close_1vr2h_78:after{width:2px;height:16px;margin:-8px 0 0 -1px}@media (width<=399px){._close_1vr2h_78{top:var(--_surface-padding-mobile);inset-inline-end:var(--_surface-padding-mobile)}}._sr_1t62n_1{white-space:nowrap;clip-path:inset(50%);border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._subtext_1t62n_13{margin:0 0 16px;line-height:1.25}._input_1t62n_18{box-sizing:border-box;width:100%;color:hsl(var(--_color-text)/100%);background-color:hsl(var(--_color-bg)/100%);border:1px solid hsl(var(--_color-border)/100%);border-radius:var(--_surface-radius);outline:0 solid hsl(var(--_color-outline)/14%);padding:8px 12px;font-family:inherit;font-size:16px;line-height:1.5;transition:background-color .15s,border-color .15s,outline-width .2s}._input_1t62n_18:focus{outline:4px solid hsl(var(--_color-outline)/14%)}._input_1t62n_18._invalid_1t62n_35{border-color:hsl(var(--_color-error)/100%)}._input_1t62n_18._invalid_1t62n_35:focus{outline-color:hsl(var(--_color-error)/14%)}._actions_1t62n_42{gap:8px;margin-top:16px;display:flex}._submit_1t62n_48{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._submit_1t62n_48:disabled{cursor:default}._submit_1t62n_48{text-align:center;color:hsl(var(--_color-bg)/100%);background-color:hsl(var(--_color-text)/100%);border-radius:var(--_surface-radius);padding:8px 32px;font-size:14px;font-weight:400;transition:opacity .2s}._submit_1t62n_48:hover:not(:disabled){opacity:.85}._submit_1t62n_48:disabled{opacity:.6}._submit_1t62n_48{flex:1}._skip_1t62n_82{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._skip_1t62n_82:disabled{cursor:default}._skip_1t62n_82{background-color:hsl(var(--_color-control)/100%);transition:background-color .15s}._skip_1t62n_82:hover:not(:disabled){background-color:hsl(var(--_color-border)/50%)}._skip_1t62n_82:disabled{opacity:.6}._skip_1t62n_82{text-align:center;color:hsl(var(--_color-text)/100%);border-radius:var(--_surface-radius);flex:1;padding:8px 32px;font-size:14px;font-weight:500}._attachment_5p8tj_1{align-items:center;column-gap:8px;width:100%;display:flex}._attachmentPreview_5p8tj_8{flex:1;align-items:center;column-gap:8px;min-width:0;text-decoration:none;display:flex}._attachmentThumbnail_5p8tj_17{box-sizing:border-box;object-fit:cover;border:1px solid hsl(var(--_color-border)/100%);border-radius:4px;flex-shrink:0;width:32px;height:32px;display:block}._attachmentCaption_5p8tj_28{flex-direction:column;min-width:0;display:flex}._attachmentName_5p8tj_34,._attachmentSize_5p8tj_35{text-overflow:ellipsis;white-space:nowrap;line-height:1.15;display:block;overflow:hidden}._attachmentName_5p8tj_34{color:hsl(var(--_color-text)/100%);font-size:13px}._attachmentSize_5p8tj_35{color:hsl(var(--_color-muted)/100%);font-size:11px}._attachmentRemove_5p8tj_53{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._attachmentRemove_5p8tj_53:disabled{cursor:default}._attachmentRemove_5p8tj_53{background-color:hsl(var(--_color-control)/100%);transition:background-color .15s}._attachmentRemove_5p8tj_53:hover:not(:disabled){background-color:hsl(var(--_color-border)/50%)}._attachmentRemove_5p8tj_53:disabled{opacity:.6}._attachmentRemove_5p8tj_53{width:24px;height:24px;color:hsl(var(--_color-text)/100%);border-radius:50%;flex-shrink:0;position:relative}._attachmentRemove_5p8tj_53:before,._attachmentRemove_5p8tj_53:after{content:"";background-color:currentColor;border-radius:1px;position:absolute;top:50%;left:50%;transform:rotate(45deg)}._attachmentRemove_5p8tj_53:before{width:12px;height:1.5px;margin:-1px 0 0 -6px}._attachmentRemove_5p8tj_53:after{width:1.5px;height:12px;margin:-6px 0 0 -1px}._choices_iatib_1{margin:0 0 12px}._choice_iatib_1{display:flex}._choice_iatib_1+._choice_iatib_1{margin-top:12px}._label_iatib_12{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:flex-start;gap:8px;display:inline-flex;position:relative}._sr_iatib_21{white-space:nowrap;clip-path:inset(50%);border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._checkbox_iatib_33{white-space:nowrap;clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}._check_iatib_33{border:1px solid hsl(var(--_color-border)/100%);border-radius:4px;min-width:20px;height:20px}._label_iatib_12:hover ._check_iatib_33{border-color:hsl(var(--_color-text)/100%)}._checkbox_iatib_33:focus-visible+._check_iatib_33{outline:4px solid hsl(var(--_color-outline)/14%)}._checkbox_iatib_33:checked+._check_iatib_33{background-color:hsl(var(--_color-text)/100%);border-color:hsl(var(--_color-text)/100%);position:relative}._checkbox_iatib_33:checked+._check_iatib_33:after{content:"";border:2px solid;border-color:transparent transparent hsl(var(--_color-bg)/100%) hsl(var(--_color-bg)/100%);pointer-events:none;width:10px;height:4px;position:absolute;top:50%;left:50%;transform:translate(-45%,-75%)rotate(-45deg)}._fieldWrapper_iatib_74{display:flex;position:relative}._input_iatib_79{margin-top:8px;padding:8px 12px}._textarea_iatib_84{height:120px;padding:8px 12px 40px}._input_iatib_79,._textarea_iatib_84{box-sizing:border-box;width:100%;color:hsl(var(--_color-text)/100%);background-color:hsl(var(--_color-bg)/100%);border:1px solid hsl(var(--_color-border)/100%);border-radius:var(--_surface-radius);outline:0 solid hsl(var(--_color-outline)/14%);resize:none;font-family:inherit;font-size:16px;line-height:1.5;transition:background-color .15s,border-color .15s,outline-width .2s}._input_iatib_79:focus,._textarea_iatib_84:focus{outline:4px solid hsl(var(--_color-outline)/14%)}._input_iatib_79._invalid_iatib_108,._textarea_iatib_84._invalid_iatib_108{border-color:hsl(var(--_color-error)/100%)}._input_iatib_79._invalid_iatib_108:focus,._textarea_iatib_84._invalid_iatib_108:focus{outline-color:hsl(var(--_color-error)/14%)}._attachTriggers_iatib_117{gap:6px;display:flex;position:absolute;bottom:8px;right:8px}._attachTrigger_iatib_117{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._attachTrigger_iatib_117:disabled{cursor:default}._attachTrigger_iatib_117{background-color:hsl(var(--_color-control)/100%);transition:background-color .15s}._attachTrigger_iatib_117:hover:not(:disabled){background-color:hsl(var(--_color-border)/50%)}._attachTrigger_iatib_117:disabled{opacity:.6}._attachTrigger_iatib_117{box-sizing:border-box;width:28px;height:28px;color:hsl(var(--_color-muted)/100%);border-radius:var(--_surface-radius);justify-content:center;align-items:center;transition:color .15s,background-color .15s;display:flex}._attachTrigger_iatib_117:hover:not(:disabled){color:hsl(var(--_color-text)/100%)}._attachments_iatib_164{flex-direction:column;gap:12px;margin-top:12px;display:flex}._attachmentList_iatib_171{flex-direction:column;gap:8px;display:flex}._attachmentError_iatib_177{color:hsl(var(--_color-error-text)/100%);font-size:14px}._actions_iatib_182{gap:8px;margin-top:12px;display:flex}._submit_iatib_188{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._submit_iatib_188:disabled{cursor:default}._submit_iatib_188{text-align:center;color:hsl(var(--_color-bg)/100%);background-color:hsl(var(--_color-text)/100%);border-radius:var(--_surface-radius);padding:8px 32px;font-size:14px;font-weight:400;transition:opacity .2s}._submit_iatib_188:hover:not(:disabled){opacity:.85}._submit_iatib_188:disabled{opacity:.6}._submit_iatib_188{flex:1}._skip_iatib_222{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._skip_iatib_222:disabled{cursor:default}._skip_iatib_222{background-color:hsl(var(--_color-control)/100%);transition:background-color .15s}._skip_iatib_222:hover:not(:disabled){background-color:hsl(var(--_color-border)/50%)}._skip_iatib_222:disabled{opacity:.6}._skip_iatib_222{text-align:center;color:hsl(var(--_color-text)/100%);border-radius:var(--_surface-radius);flex:1;padding:8px 32px;font-size:14px;font-weight:500}._base_1ilpx_1{text-align:center;padding:0 24px}._icon_1ilpx_6{display:inline-block}._base_onxlf_1{color:hsl(var(--_color-text)/100%);padding:0;font-family:Helvetica Neue,Arial Nova,Helvetica,Arial,sans-serif}._head_onxlf_7{padding-block:0 12px;padding-inline:0 var(--_popup-head-offset);gap:8px;display:flex}._title_onxlf_14{flex:1 0;font-family:inherit;font-size:16px;font-style:normal;font-weight:500;line-height:1.4}._base_nswpf_1{margin:12px 0 0;display:flex}._label_nswpf_6{box-sizing:border-box;max-width:50%;color:hsl(var(--_color-muted)/100%);flex:0 0 50%;font-size:14px;line-height:1.4286}._between_nswpf_15{justify-content:space-between}._between_nswpf_15 ._label_nswpf_6{flex:0 0 50%;max-width:50%}._between_nswpf_15 ._label_nswpf_6:first-child{text-align:start}._between_nswpf_15 ._label_nswpf_6:last-child{text-align:end}._center_nswpf_29 ._label_nswpf_6{flex:0 0 50%;max-width:50%}._center_nswpf_29 ._label_nswpf_6:first-child{text-align:end;padding-right:8px}._center_nswpf_29 ._label_nswpf_6:last-child{text-align:start;padding-left:8px}._center_nswpf_29 ._text_nswpf_41{text-align:center;min-width:56px;display:inline-block}@media (width<=599px){._center_nswpf_29 ._text_nswpf_41{min-width:48px}}._list_1vfe4_1{justify-content:space-between;display:flex}._icon_1vfe4_6{transition:transform .12s;transform:scale(1)}._button_1vfe4_11{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_1vfe4_11:disabled{cursor:default}._button_1vfe4_11{background-color:hsl(var(--_color-control)/100%);border-radius:50%;justify-content:center;align-items:center;width:56px;height:56px;display:flex}._button_1vfe4_11:hover ._icon_1vfe4_6{transform:scale(1.15)}._button_1vfe4_11:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}@media (width<=399px){._button_1vfe4_11{width:48px;height:48px}}._list_16sag_1{justify-content:space-between;display:flex}._button_16sag_6{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_16sag_6:disabled{cursor:default}._button_16sag_6{width:40px;height:40px;color:hsl(var(--_color-muted)/100%);background-color:hsl(var(--_color-control)/100%);box-shadow:0 0 0 0 hsl(var(--_color-control)/100%);border-radius:50%;justify-content:center;align-items:center;font-size:18px;font-weight:700;transition:color .12s,box-shadow .12s;display:flex}._button_16sag_6:hover{color:hsl(var(--_color-text)/100%);box-shadow:0 0 0 2px hsl(var(--_color-control)/100%)}._button_16sag_6:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._list_1kpxu_1{justify-content:space-between;display:flex}._icon_1kpxu_6{transition:transform .12s;transform:scale(1)}._button_1kpxu_11{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_1kpxu_11:disabled{cursor:default}._button_1kpxu_11{justify-content:center;align-items:center;width:40px;height:40px;display:flex}._button_1kpxu_11:hover ._icon_1kpxu_6{transform:scale(1.1)}._button_1kpxu_11:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._list_grany_1{justify-content:center;gap:16px;display:flex}._icon_grany_7{transition:transform .12s;transform:scale(1)}._button_grany_12{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_grany_12:disabled{cursor:default}._button_grany_12{background-color:hsl(var(--_color-control)/100%);border-radius:50%;justify-content:center;align-items:center;width:56px;height:56px;display:flex}._button_grany_12:hover ._icon_grany_7{transform:scale(1.15)}._button_grany_12:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}@media (width<=399px){._button_grany_12{width:48px;height:48px}}._list_1yzyr_1{justify-content:center;gap:16px;display:flex}._icon_1yzyr_7{transition:transform .12s;transform:scale(1)}._button_1yzyr_12{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_1yzyr_12:disabled{cursor:default}._button_1yzyr_12{background-color:hsl(var(--_color-control)/100%);border-radius:50%;justify-content:center;align-items:center;width:56px;height:56px;display:flex}._button_1yzyr_12:hover ._icon_1yzyr_7{transform:scale(1.15)}._button_1yzyr_12:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._list_whbas_1{justify-content:space-between;gap:6px;display:flex}@media (width<=599px){._list_whbas_1{flex-direction:column-reverse;gap:4px}}._button_whbas_13{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_whbas_13:disabled{cursor:default}._button_whbas_13{text-align:center;width:40px;height:40px;color:hsl(var(--_color-muted)/100%);background-color:hsl(var(--_color-control)/100%);box-shadow:0 0 0 0 hsl(var(--_color-control)/100%);border-radius:50%;font-size:18px;font-weight:700;transition:color .12s,box-shadow .12s;display:inline-block}._button_whbas_13:hover{color:hsl(var(--_color-text)/100%);box-shadow:0 0 0 2px hsl(var(--_color-control)/100%)}@media (width<=599px){._button_whbas_13:hover{box-shadow:none}}._button_whbas_13:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._button_whbas_13 ._score_whbas_52{display:inline}._button_whbas_13 ._label_whbas_55{display:none}@media (width<=599px){._button_whbas_13 ._label_whbas_55{display:inline}._button_whbas_13{border-radius:6px;width:100%;height:auto;padding:6px;font-size:14px;line-height:20px}._labels_whbas_75{display:none}}._list_divjm_1{justify-content:space-between;gap:6px;display:flex}@media (width<=599px){._list_divjm_1{flex-direction:column-reverse;gap:4px}}._button_divjm_13{appearance:none;text-align:center;box-shadow:none;cursor:pointer;background-color:#0000;border:none;margin:0;padding:0;font-family:inherit}._button_divjm_13:disabled{cursor:default}._button_divjm_13{text-align:center;width:40px;height:40px;color:hsl(var(--_color-muted)/100%);background-color:hsl(var(--_color-control)/100%);box-shadow:0 0 0 0 hsl(var(--_color-control)/100%);border-radius:50%;font-size:18px;font-weight:700;transition:color .12s,box-shadow .12s;display:block}._button_divjm_13:hover{color:hsl(var(--_color-text)/100%);box-shadow:0 0 0 2px hsl(var(--_color-control)/100%)}@media (width<=599px){._button_divjm_13:hover{box-shadow:none}}._button_divjm_13:focus-visible{outline:2px solid hsl(var(--_color-outline)/100%)}._button_divjm_13 ._score_divjm_52{display:inline}._button_divjm_13 ._label_divjm_55{display:none}@media (width<=599px){._button_divjm_13 ._label_divjm_55{display:inline}._button_divjm_13{border-radius:6px;width:100%;height:auto;padding:6px;font-size:14px;line-height:20px}._labels_divjm_75{display:none}}._base_171s9_1{max-width:100%}._ratingCsat5_171s9_5,._feedbackCsat5_171s9_6,._contactCsat5_171s9_7,._successCsat5_171s9_8{width:320px}@media (width<=399px){._ratingCsat5_171s9_5,._feedbackCsat5_171s9_6,._contactCsat5_171s9_7,._successCsat5_171s9_8{width:100%}}._ratingCsat2_171s9_20,._feedbackCsat2_171s9_21,._contactCsat2_171s9_22,._successCsat2_171s9_23{width:280px}@media (width<=399px){._ratingCsat2_171s9_20,._feedbackCsat2_171s9_21,._contactCsat2_171s9_22,._successCsat2_171s9_23{width:100%}}._ratingCes_171s9_35{width:340px}@media (width<=599px){._ratingCes_171s9_35{width:280px}}@media (width<=399px){._ratingCes_171s9_35{width:100%}}._feedbackCes_171s9_49,._contactCes_171s9_50,._successCes_171s9_51{width:280px}@media (width<=599px){._feedbackCes_171s9_49,._contactCes_171s9_50,._successCes_171s9_51{width:100%}}._ratingNps_171s9_62{width:520px}@media (width<=599px){._ratingNps_171s9_62{width:320px}}@media (width<=399px){._ratingNps_171s9_62{width:100%}}._feedbackNps_171s9_76,._contactNps_171s9_77,._successNps_171s9_78{width:280px}@media (width<=599px){._feedbackNps_171s9_76,._contactNps_171s9_77,._successNps_171s9_78{width:100%}}._feedbackGeneral_171s9_89,._contactGeneral_171s9_90,._successGeneral_171s9_91{width:280px}@media (width<=599px){._feedbackGeneral_171s9_89,._contactGeneral_171s9_90,._successGeneral_171s9_91{width:100%}}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/** Customer Effort Score survey, rated on a fixed 7-point scale */
|
|
4
|
+
export declare interface CesSurveyProps extends SharedSurveyProps {
|
|
5
|
+
/** Survey methodology */
|
|
6
|
+
type: 'ces';
|
|
6
7
|
/** Visual style for the rating scale */
|
|
7
8
|
scaleStyle: 'numbers';
|
|
8
9
|
}
|
|
@@ -26,23 +27,40 @@ export declare interface ContactSubmitPayload {
|
|
|
26
27
|
email: string;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
/** Customer Satisfaction survey, rated on a 2-point scale */
|
|
31
|
+
export declare interface CsatSurveyProps2 extends SharedSurveyProps {
|
|
32
|
+
/** Survey methodology */
|
|
33
|
+
type: 'csat';
|
|
34
|
+
/** Number of points on the rating scale */
|
|
35
|
+
points: 2;
|
|
32
36
|
/** Visual style for the rating scale */
|
|
33
37
|
scaleStyle: 'emoji' | 'thumbs';
|
|
34
38
|
}
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
/** Customer Satisfaction survey, rated on a 5-point scale */
|
|
41
|
+
export declare interface CsatSurveyProps5 extends SharedSurveyProps {
|
|
42
|
+
/** Survey methodology */
|
|
43
|
+
type: 'csat';
|
|
44
|
+
/** Number of points on the rating scale */
|
|
45
|
+
points: 5;
|
|
39
46
|
/** Visual style for the rating scale */
|
|
40
47
|
scaleStyle: 'emoji' | 'numbers' | 'stars';
|
|
41
48
|
}
|
|
42
49
|
|
|
43
|
-
|
|
50
|
+
/** General feedback survey — no rating scale, collects text feedback and an optional screenshot */
|
|
51
|
+
export declare interface GeneralSurveyProps extends Omit<SharedSurveyProps, 'question' | 'responseType'> {
|
|
52
|
+
/** Survey methodology */
|
|
53
|
+
type: 'general';
|
|
54
|
+
/** Unused — general surveys have no rating screen to show it on */
|
|
55
|
+
question?: string;
|
|
56
|
+
/** Type of feedback collection. The text feedback step is the whole survey, so it's never skippable. @default 'text' */
|
|
57
|
+
responseType?: 'text' | 'choices';
|
|
58
|
+
}
|
|
44
59
|
|
|
45
|
-
|
|
60
|
+
/** Net Promoter Score survey, rated on a fixed 0–10 scale */
|
|
61
|
+
export declare interface NpsSurveyProps extends SharedSurveyProps {
|
|
62
|
+
/** Survey methodology */
|
|
63
|
+
type: 'nps';
|
|
46
64
|
/** Visual style for the rating scale */
|
|
47
65
|
scaleStyle: 'numbers';
|
|
48
66
|
}
|
|
@@ -57,6 +75,8 @@ export declare interface PopupProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
57
75
|
close?: string;
|
|
58
76
|
};
|
|
59
77
|
placement?: 'topLeft' | 'topRight' | 'bottomRight' | 'bottomLeft';
|
|
78
|
+
/** Close button label, used for both its aria-label and title. @default 'Close survey' */
|
|
79
|
+
closeLabel?: string;
|
|
60
80
|
onClose?: () => void;
|
|
61
81
|
}
|
|
62
82
|
|
|
@@ -113,12 +133,16 @@ export declare interface SharedSurveyProps {
|
|
|
113
133
|
};
|
|
114
134
|
/** Text direction for RTL/LTR support */
|
|
115
135
|
dir?: 'ltr' | 'rtl' | 'auto';
|
|
136
|
+
/** Overrides for the library's own aria-labels and other screen-reader-only text. See `SurveyStrings`. */
|
|
137
|
+
strings?: SurveyStrings;
|
|
116
138
|
/** Main survey question (screen 1) */
|
|
117
139
|
question: string;
|
|
118
140
|
/** Left label for the rating scale */
|
|
119
141
|
minLabel?: string;
|
|
120
142
|
/** Right label for the rating scale */
|
|
121
143
|
maxLabel?: string;
|
|
144
|
+
/** Builds the visible text appended after the first/last numbered scale button when it carries `minLabel`/`maxLabel`. @default (label) => ` - ${label}` */
|
|
145
|
+
getScoreLabelSuffix?: (label: string) => string;
|
|
122
146
|
/** Type of feedback collection */
|
|
123
147
|
responseType?: null | 'text' | 'choices';
|
|
124
148
|
/** Follow-up feedback question (screen 2) */
|
|
@@ -129,6 +153,16 @@ export declare interface SharedSurveyProps {
|
|
|
129
153
|
textButtonSkipLabel?: string;
|
|
130
154
|
/** Optional predefined choices for feedback */
|
|
131
155
|
choiceOptions?: string[] | null;
|
|
156
|
+
/** Placeholder for the free-text input next to choice checkboxes. @default 'Other' */
|
|
157
|
+
otherPlaceholder?: string;
|
|
158
|
+
/** Label for the screenshot-attachment control */
|
|
159
|
+
screenshotButtonLabel?: string;
|
|
160
|
+
/** Shown to the respondent when `onCaptureScreenshot` fails. @default 'Failed to capture screenshot' */
|
|
161
|
+
screenshotErrorMessage?: string;
|
|
162
|
+
/** Maximum number of attachments a respondent may confirm, across every attachment source. @default 1 */
|
|
163
|
+
maxAttachments?: number;
|
|
164
|
+
/** Visible caption under an attachment thumbnail, also used as its image alt text. @default 'Screenshot' */
|
|
165
|
+
attachmentCaption?: string;
|
|
132
166
|
/** Success message text */
|
|
133
167
|
thankYouMessage: string;
|
|
134
168
|
/** Enables an optional email collection step before the success screen. Skipped when `userId` is already provided */
|
|
@@ -147,6 +181,8 @@ export declare interface SharedSurveyProps {
|
|
|
147
181
|
onScoreSubmit?: SurveyCallback;
|
|
148
182
|
/** Callback when survey data is submitted */
|
|
149
183
|
onFeedbackSubmit?: SurveyCallback;
|
|
184
|
+
/** Enables an optional screenshot-attachment control on the feedback step. Hidden unless provided — bring your own capture function, see README */
|
|
185
|
+
onCaptureScreenshot?: () => string | Blob | Promise<string | Blob>;
|
|
150
186
|
/** Callback when contact is submitted */
|
|
151
187
|
onContactSubmit?: ContactCallback;
|
|
152
188
|
}
|
|
@@ -155,6 +191,24 @@ export declare const Surface: React.FC<SurfaceProps>;
|
|
|
155
191
|
|
|
156
192
|
export declare type SurfaceProps = React.HTMLAttributes<HTMLDivElement>;
|
|
157
193
|
|
|
194
|
+
export declare const Survey: default_2.FC<SurveyProps>;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A single attachment confirmed by the respondent
|
|
198
|
+
*/
|
|
199
|
+
export declare interface SurveyAttachment {
|
|
200
|
+
/** Discriminates the source that produced this attachment (not its content type — use `mimeType` for that) */
|
|
201
|
+
kind: 'screenshot';
|
|
202
|
+
/** Raw attachment data, as returned by the source */
|
|
203
|
+
data: string | Blob;
|
|
204
|
+
/** Original filename, when known (e.g. from a native `File`) */
|
|
205
|
+
name?: string;
|
|
206
|
+
/** MIME type, when known and not already carried by a `File`'s own `.type` */
|
|
207
|
+
mimeType?: string;
|
|
208
|
+
/** Size in bytes, when known (unavailable when `data` is an already-hosted URL string) */
|
|
209
|
+
size?: number;
|
|
210
|
+
}
|
|
211
|
+
|
|
158
212
|
/**
|
|
159
213
|
* Callback function for survey submission
|
|
160
214
|
* @param payload - The survey data to submit
|
|
@@ -162,6 +216,8 @@ export declare type SurfaceProps = React.HTMLAttributes<HTMLDivElement>;
|
|
|
162
216
|
*/
|
|
163
217
|
export declare type SurveyCallback = (payload: SurveySubmitPayload) => void | Promise<void>;
|
|
164
218
|
|
|
219
|
+
export declare type SurveyProps = CsatSurveyProps5 | CsatSurveyProps2 | CesSurveyProps | NpsSurveyProps | GeneralSurveyProps;
|
|
220
|
+
|
|
165
221
|
/**
|
|
166
222
|
* Available screens in survey flow
|
|
167
223
|
*/
|
|
@@ -175,6 +231,35 @@ export declare type SurveyScreen =
|
|
|
175
231
|
/** Final "thanks" message screen */
|
|
176
232
|
| 'success';
|
|
177
233
|
|
|
234
|
+
/**
|
|
235
|
+
* Overrides for the library's own aria-labels and other screen-reader-only text. Never visible
|
|
236
|
+
* UI copy — that's `question`, `thankYouMessage`, `otherPlaceholder`, `attachmentCaption`, etc.,
|
|
237
|
+
* always authored by you alongside the rest of the survey content, sitting directly on
|
|
238
|
+
* `SharedSurveyProps`. Every key here is announced to assistive tech only, useful to override
|
|
239
|
+
* e.g. when localizing a survey for a non-English audience. Each key merges over its English
|
|
240
|
+
* default; omit a key to keep that default.
|
|
241
|
+
*/
|
|
242
|
+
export declare interface SurveyStrings {
|
|
243
|
+
/** aria-label for the feedback step's form/region. @default 'Feedback form' */
|
|
244
|
+
feedbackFormLabel?: string;
|
|
245
|
+
/** Label for the free-text input shown alongside choice checkboxes. @default 'Additional feedback' */
|
|
246
|
+
additionalFeedbackLabel?: string;
|
|
247
|
+
/** Label for the open-ended feedback textarea shown when there are no predefined choices. @default 'Your feedback' */
|
|
248
|
+
yourFeedbackLabel?: string;
|
|
249
|
+
/** aria-label for the contact step's form/region. @default 'Contact form' */
|
|
250
|
+
contactFormLabel?: string;
|
|
251
|
+
/** Label for the email input on the contact collection screen. @default 'Email address' */
|
|
252
|
+
emailLabel?: string;
|
|
253
|
+
/** aria-label for opening an attachment thumbnail in a new tab. @default 'Open screenshot in a new tab' */
|
|
254
|
+
attachmentOpenLabel?: string;
|
|
255
|
+
/** aria-label/title for removing an attachment. @default 'Remove screenshot' */
|
|
256
|
+
attachmentRemoveLabel?: string;
|
|
257
|
+
/** Builds the aria-label for a numbered scale button. @default (score) => `Score ${score}` */
|
|
258
|
+
getScoreLabel?: (score: number) => string;
|
|
259
|
+
/** Builds the aria-label for a star rating button. @default (score) => `${score} ${score > 1 ? 'stars' : 'star'}` */
|
|
260
|
+
getStarsLabel?: (score: number) => string;
|
|
261
|
+
}
|
|
262
|
+
|
|
178
263
|
/**
|
|
179
264
|
* Payload sent when submitting survey data
|
|
180
265
|
*/
|
|
@@ -183,6 +268,8 @@ export declare interface SurveySubmitPayload {
|
|
|
183
268
|
value?: number;
|
|
184
269
|
/** Optional text or array of selected choices */
|
|
185
270
|
text?: string | string[];
|
|
271
|
+
/** Attachments (e.g. a screenshot) confirmed by the respondent */
|
|
272
|
+
attachments?: SurveyAttachment[];
|
|
186
273
|
}
|
|
187
274
|
|
|
188
275
|
export { }
|