@stenajs-webui/forms 20.7.2 → 20.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +144 -131
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('._switch_1d6s8_1{--swui-switch-width: 50px;--swui-switch-height: var(--swui-field-box-size-medium);--swui-switch-animation-time: var(--swui-animation-time-medium);--swui-switch-selected-highlight-color: var(--lhds-color-blue-500);--swui-switch-knob-width: calc(var(--swui-switch-height) - 2px);--swui-switch-knob-bg-color-enabled: var(--swui-handle-bg-enabled-color);--swui-switch-knob-bg-color-disabled: var(--swui-handle-bg-disabled-color);--swui-switch-container-bg-color-enabled: var(--swui-field-bg-enabled);--swui-switch-container-bg-color-disabled: var(--swui-field-bg-disabled);--swui-switch-knob-border-color-enabled: var(--swui-separator-color);--swui-switch-container-border-color: var(--swui-field-border-color);--swui-switch-container-border-color-hover: var( --swui-field-border-color-hover );--swui-switch-container-border-color-disabled: var( --swui-field-border-color-disabled );--swui-switch-knob-shadow-color: var(--swui-field-shadow-color);display:flex;flex-direction:row;border:1px solid var(--swui-switch-container-border-color);box-sizing:border-box;background-color:var(--swui-switch-container-bg-color-enabled);height:var(--swui-switch-height);width:var(--swui-switch-width);border-radius:calc(var(--swui-switch-height) / 2);padding:0;margin:0;cursor:pointer;transition:background-color var(--swui-switch-animation-time)}._switch_1d6s8_1:focus{outline:0}._switch_1d6s8_1:focus-visible{outline:var(--swui-focus-outline);outline-offset:2px;border:1px solid var(--swui-switch-selected-highlight-color)}._switch_1d6s8_1:hover{border:1px solid var(--swui-switch-selected-highlight-color)}._switch_1d6s8_1:disabled{cursor:default;background-color:var(--swui-switch-container-bg-color-disabled);border:1px solid var(--swui-switch-container-border-color-disabled)}._switch_1d6s8_1:disabled ._knob_1d6s8_56{background-color:var(--swui-switch-knob-bg-color-disabled)}._switch_1d6s8_1 ._filler_1d6s8_61{flex:none;transition:flex var(--swui-switch-animation-time)}._switch_1d6s8_1 ._knob_1d6s8_56{width:var(--swui-switch-knob-width);height:var(--swui-switch-knob-width);border-radius:50%;background-color:var(--swui-switch-knob-bg-color-enabled);box-shadow:var(--swui-switch-knob-shadow-color) 0 0 4px 1px}._checked_1d6s8_75{border:1px solid var(--swui-switch-selected-highlight-color);background-color:var(--swui-switch-selected-highlight-color)}._checked_1d6s8_75 ._filler_1d6s8_61{flex:1}._checkbox_1ndou_1{--swui-checkbox-height: var(--swui-field-box-size-medium);--swui-checkbox-height-small: var(--swui-field-box-size-small);--swui-checkbox-border-radius: var(--swui-field-border-radius);--swui-checkbox-animation-time: var(--swui-animation-time-medium);--swui-checkbox-icon-color: var(--swui-field-indicator-active-color);--swui-checkbox-disabled-icon-color: var(--swui-text-disabled-color);--swui-checkbox-unchecked-icon-color: var( --swui-field-indicator-inactive-color );--swui-checkbox-unchecked-bg-color: var(--swui-white);--swui-checkbox-checked-bg-color: var(--lhds-color-blue-500);--swui-checkbox-disabled-bg-color: var(--swui-field-bg-disabled);--swui-checkbox-disabled-checked-bg-color: var(--swui-field-bg-disabled);--swui-checkbox-border-color: var(--swui-field-border-color);--swui-checkbox-border-hover-color: var(--swui-field-border-color-hover);--swui-checkbox-disabled-border-color: var(--swui-checkbox-disabled-bg-color);-webkit-appearance:none;-moz-appearance:none;border-radius:var(--swui-checkbox-border-radius);outline:none;display:inline-block;vertical-align:top;position:relative;margin:0;cursor:pointer;border:1px solid var(--current-border-color, var(--swui-checkbox-border-color));background:var(--current-bg-color, var(--swui-checkbox-unchecked-bg-color));transition:background var(--swui-checkbox-animation-time),border-color var(--swui-checkbox-animation-time);flex-shrink:0}._checkbox_1ndou_1._standard_1ndou_39{width:var(--swui-checkbox-height);height:var(--swui-checkbox-height)}._checkbox_1ndou_1._standard_1ndou_39:after{width:3px;height:6px;left:9px;top:6px}._checkbox_1ndou_1._small_1ndou_51{width:var(--swui-checkbox-height-small);height:var(--swui-checkbox-height-small)}._checkbox_1ndou_1._small_1ndou_51:after{width:3px;height:6px;left:5px;top:2px}._checkbox_1ndou_1:after{content:"";display:block;position:absolute;transition:transform var(--swui-checkbox-animation-time) var(--d-t-e, ease),opacity var(--swui-checkbox-animation-time),width var(--swui-checkbox-animation-time),top var(--swui-checkbox-animation-time);border:2px solid var( --current-checkbox-icon-color, var(--swui-checkbox-unchecked-icon-color) );border-top:0;border-left:0;transform:rotate(var(--current-check-rotation, 20deg));box-sizing:content-box}._checkbox_1ndou_1:checked{--current-check-rotation: 43deg;--current-bg-color: var(--swui-checkbox-checked-bg-color);--current-border-color: var(--swui-checkbox-checked-bg-color);--d-t-e: cubic-bezier(.2, .85, .32, 1.2)}._checkbox_1ndou_1:checked:after{--current-checkbox-icon-color: var(--swui-checkbox-icon-color)}._checkbox_1ndou_1:disabled:not(:checked){--current-bg-color: var(--swui-checkbox-disabled-bg-color);--current-border-color: var(--swui-checkbox-disabled-border-color)}._checkbox_1ndou_1:disabled:not(:checked):after{--current-checkbox-icon-color: --swui-checkbox-unchecked-icon-color}._checkbox_1ndou_1:disabled:checked{--current-bg-color: var(--swui-checkbox-disabled-checked-bg-color);--current-border-color: var(--swui-checkbox-disabled-border-color)}._checkbox_1ndou_1:disabled:checked:after{--current-checkbox-icon-color: var(--swui-checkbox-disabled-icon-color)}._checkbox_1ndou_1:indeterminate{--current-check-rotation: 43deg;--current-bg-color: var(--swui-checkbox-checked-bg-color);--current-border-color: var(--swui-checkbox-checked-bg-color);--d-t-e: cubic-bezier(.2, .85, .32, 1.2)}._checkbox_1ndou_1:indeterminate:after{--current-checkbox-icon-color: var(--swui-checkbox-icon-color);border-right:0;transform:rotate(0);width:6px}._checkbox_1ndou_1:indeterminate._standard_1ndou_39:after{top:4px;left:8px}._checkbox_1ndou_1:indeterminate._small_1ndou_51:after{top:0;left:4px}._checkbox_1ndou_1:indeterminate:disabled:after{--current-checkbox-icon-color: var(--swui-checkbox-disabled-icon-color)}._checkbox_1ndou_1:hover:not(:checked):not(:disabled){--current-border-color: var(--swui-checkbox-border-hover-color)}._checkbox_1ndou_1:focus-visible{outline:var(--swui-focus-outline)}._checkbox_1ndou_1+label{font-size:1.4rem;line-height:var(--swui-checkbox-height);display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}._radiobutton_foy83_1{--swui-radiobutton-size-standard: var(--swui-field-box-size-medium);--swui-radiobutton-size-small: var(--swui-field-box-size-small);--swui-radiobutton-animation-time: var(--swui-animation-time-medium);--swui-radiobutton-icon-color: var(--swui-field-indicator-active-color);--swui-radiobutton-disabled-icon-color: var(--swui-field-text-color-disabled);--swui-radiobutton-unchecked-icon-color: var( --swui-field-indicator-inactive-color );--swui-radiobutton-checked-bg-color: var(--lhds-color-blue-500);--swui-radiobutton-checked-disabled-bg-color: var(--swui-field-bg-disabled);--swui-radiobutton-unchecked-bg-color: var(--swui-white);--swui-radiobutton-unchecked-disabled-bg-color: var(--swui-field-bg-disabled);--swui-radiobutton-unchecked-border-color: var(--swui-field-border-color);--swui-radiobutton-unchecked-hover-border-color: var( --swui-field-border-color-hover );--swui-radiobutton-disabled-border-color: var( --swui-radiobutton-checked-disabled-bg-color );-webkit-appearance:none;-moz-appearance:none;outline:none;display:inline-block;vertical-align:top;position:relative;margin:0;flex:none;cursor:pointer;border:1px solid var(--current-border-color, var(--swui-radiobutton-unchecked-border-color));border-radius:50%;background:var( --current-bg-color, var(--swui-radiobutton-unchecked-bg-color) );transition:background var(--swui-radiobutton-animation-time),border-color var(--swui-radiobutton-animation-time)}._radiobutton_foy83_1._standard_foy83_45{height:var(--swui-radiobutton-size-standard);width:var(--swui-radiobutton-size-standard)}._radiobutton_foy83_1._standard_foy83_45:after{left:7px;top:7px}._radiobutton_foy83_1._small_foy83_55{height:var(--swui-radiobutton-size-small);width:var(--swui-radiobutton-size-small)}._radiobutton_foy83_1._small_foy83_55:after{left:3px;top:3px}._radiobutton_foy83_1:after{content:"";display:block;position:absolute;transition:transform var(--current-transform-time, var(--swui-radiobutton-animation-time)) var(--current-transform-type, ease),opacity var(--current-opacity-time, var(--swui-radiobutton-animation-time)) var(--current-transform-type, ease);transform:scale(var(--current-scale, 0));width:8px;height:8px;border-radius:50%;background:var( --current-icon-color, var(--swui-radiobutton-unchecked-icon-color) );opacity:var(--current-opacity, 0)}._radiobutton_foy83_1:checked{--current-bg-color: var(--swui-radiobutton-checked-bg-color);--current-border-color: var(--swui-radiobutton-checked-bg-color);--current-opacity-time: var(--swui-radiobutton-animation-time);--current-transform-time: .6s;--current-transform-type: cubic-bezier(.2, .85, .32, 1.2);--current-opacity: 1;--current-scale: 1}._radiobutton_foy83_1:checked:after{--current-icon-color: var(--swui-radiobutton-icon-color)}._radiobutton_foy83_1:disabled{--current-bg-color: var(--swui-radiobutton-unchecked-disabled-bg-color);--current-border-color: var(--swui-radiobutton-disabled-border-color)}._radiobutton_foy83_1:disabled:checked{--current-bg-color: var(--swui-radiobutton-checked-disabled-bg-color)}._radiobutton_foy83_1:disabled:checked:after{--current-icon-color: var(--swui-radiobutton-disabled-icon-color)}._radiobutton_foy83_1:hover:not(:checked):not(:disabled){--current-border-color: var( --swui-radiobutton-unchecked-hover-border-color )}._radiobutton_foy83_1:focus-visible{outline:var(--swui-focus-outline)}._radiobutton_foy83_1+label{font-size:1.4rem;line-height:var(--swui-radiobutton-size-standard);display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}._radioButtonBox_vpn6v_1{box-sizing:border-box;background-color:var(--lhds-color-ui-200);position:relative;border:1px solid var(--silver-ui);width:100%;border-radius:16px;padding:var(--swui-metrics-space);font-size:var(--swui-font-size-inputs);align-items:center;display:flex;cursor:pointer;outline:none}._radioButtonBox_vpn6v_1:hover{border-color:var(--hav)}._radioButtonBox_vpn6v_1._danger_vpn6v_19{background-color:var(--snackskal-light);border-color:var(--snackskal-light)}._radioButtonBox_vpn6v_1._danger_vpn6v_19:hover{border-color:var(--lhds-color-red-500)}@media (max-width: 768px){._radioButtonWrapper_vpn6v_30{width:100%}}._textInput_1jb3g_1{display:flex;height:var(--swui-field-height);width:100%;align-items:center;background:var(--swui-field-bg-enabled);border:1px solid var(--swui-field-border-color);border-radius:var(--swui-field-border-radius);outline:none}._textInput_1jb3g_1._textInput_1jb3g_1:focus-within:not(._disabled_1jb3g_11){outline:var(--swui-focus-outline);border-color:transparent}._textInput_1jb3g_1 ._input_1jb3g_16{letter-spacing:var(--swui-field-letter-spacing);line-height:var(--swui-field-text-line-height);width:100%;padding:2px var(--swui-metrics-indent);color:var(--swui-field-text-color);font-size:var(--swui-font-size-inputs);font-family:var(--swui-font-input);font-weight:var(--swui-font-weight-inputs);background:var(--swui-hidden);border:none;min-width:0;margin:0;outline:none}._textInput_1jb3g_1 ._input_1jb3g_16:disabled{color:var(--swui-field-text-color-disabled)}._textInput_1jb3g_1 ._input_1jb3g_16::placeholder{color:var(--swui-field-placeholder-color);font-weight:var(--swui-field-placeholder-font-weight)}._textInput_1jb3g_1 ._input_1jb3g_16:focus::placeholder{opacity:0}._textInput_1jb3g_1 ._input_1jb3g_16::-webkit-calendar-picker-indicator{display:none}._textInput_1jb3g_1 ._icon_1jb3g_49{transition:color var(--swui-animation-time-medium);color:var(--swui-field-icon-color);font-size:var(--swui-field-icon-size)}._textInput_1jb3g_1._standard_1jb3g_59:hover:not(:focus-within):not(._disabled_1jb3g_11),._textInput_1jb3g_1._success_1jb3g_60:hover:not(:focus-within):not(._disabled_1jb3g_11){border-color:var(--swui-field-border-color-hover)}._textInput_1jb3g_1._success_1jb3g_60 ._icon_1jb3g_49{color:var(--swui-state-success-color)}._textInput_1jb3g_1._loading_1jb3g_72{background:var(--swui-state-loading-light-color);border-color:var(--swui-state-loading-color)}._textInput_1jb3g_1._modified_1jb3g_77{background:var(--swui-state-modified-light-color);border-color:var(--swui-state-modified-light-color)}._textInput_1jb3g_1._modified_1jb3g_77 ._icon_1jb3g_49{color:var(--lhds-color-blue-300)}._textInput_1jb3g_1._error_1jb3g_86{background:var(--swui-state-error-light-color);border-color:var(--swui-state-error-light-color)}._textInput_1jb3g_1._error_1jb3g_86 ._icon_1jb3g_49{color:var(--swui-state-error-light-color)}._textInput_1jb3g_1._warning_1jb3g_95{background:var(--swui-state-alert-light-color);border-color:var(--swui-state-alert-light-color)}._textInput_1jb3g_1._warning_1jb3g_95 ._icon_1jb3g_49{color:var(--swui-state-alert-light-color)}._textInput_1jb3g_1._disabled_1jb3g_11{background:var(--swui-field-bg-disabled);border-color:var(--swui-field-bg-disabled)}._textInput_1jb3g_1._textInput_1jb3g_1._hideBorder_1jb3g_109{border:none;box-shadow:none;background:none;outline:none}._textInput_1jb3g_1 ._clickable_1jb3g_116:hover{cursor:pointer}._textInput_1jb3g_1 ._clickable_1jb3g_116:hover ._icon_1jb3g_49{color:var(--swui-primary-action-color)}._numericTextInputInput_1tnr6_1{-moz-appearance:textfield}._numericTextInputInput_1tnr6_1::-webkit-outer-spin-button,._numericTextInputInput_1tnr6_1::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._labelledSelect_1evxo_1{border:1px solid var(--swui-field-border-color);border-radius:var(--swui-border-radius-large);position:relative;overflow:hidden;cursor:pointer}._labelledSelect_1evxo_1._labelledSelect_1evxo_1._onlyTopBorder_1evxo_8{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-color:transparent}._labelledSelect_1evxo_1._onlyBottomBorder_1evxo_14{border-top-left-radius:0;border-top-right-radius:0}._labelledSelect_1evxo_1._error_1evxo_19{border-color:var(--snackskal);background-color:var(--snackskal)}._labelledSelect_1evxo_1._normal_1evxo_24{border-color:var(--swui-field-border-color);background-color:var(--moln)}._labelledSelect_1evxo_1._labelledSelect_1evxo_1:focus-within{border-color:var(--swui-field-border-color-hover);outline:var(--swui-focus-outline);outline-offset:0;z-index:10}._labelledSelect_1evxo_1._labelledSelect_1evxo_1:hover{border-color:var(--swui-field-border-color-hover)}._labelledSelect_1evxo_1 ._label_1evxo_1{display:flex;position:absolute;top:var(--swui-metrics-space);left:calc(var(--swui-metrics-space) * 2);cursor:pointer}._labelledSelect_1evxo_1 ._select_1evxo_48{color:var(--swui-text-primary-color);display:block;margin:0;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;outline:none;font-size:var(--swui-font-size-inputs-large);line-height:1.5;box-sizing:border-box;cursor:pointer;padding:calc(var(--swui-metrics-space) * 5) calc(var(--swui-metrics-space) * 8) calc(var(--swui-metrics-space) * 2) calc(var(--swui-metrics-space) * 2)}._labelledSelect_1evxo_1 ._select_1evxo_48._error_1evxo_19{background-color:var(--snackskal)}._labelledSelect_1evxo_1 ._select_1evxo_48._normal_1evxo_24{background-color:var(--moln)}._labelledSelect_1evxo_1 ._iconWrapper_1evxo_73{border-radius:var(--swui-max-border-radius);width:40px;height:40px;display:flex;flex-direction:column;align-items:center;justify-content:center;position:absolute;top:0;bottom:0;right:calc(var(--swui-metrics-space) * 2);margin-top:auto;margin-bottom:auto;padding:0;background:var(--silver-lighter);pointer-events:none}._labelledTextInput_lnht8_1{position:relative;background:var(--moln);overflow:hidden;cursor:text;border:1px solid var(--silver-light);border-radius:var(--swui-border-radius)}._labelledTextInput_lnht8_1 input{outline:none;border:none;margin:0;color:var(--swui-text-primary-color);background-color:transparent;line-height:var(--swui-line-height);width:100%;box-sizing:border-box;cursor:text}._labelledTextInput_lnht8_1._labelledTextInput_lnht8_1._onlyTop_lnht8_21{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-color:transparent}._labelledTextInput_lnht8_1._labelledTextInput_lnht8_1._onlyBottom_lnht8_27{border-top-left-radius:0;border-top-right-radius:0}._labelledTextInput_lnht8_1:focus-within{outline:var(--swui-focus-outline);outline-offset:-1px;border-color:transparent}._labelledTextInput_lnht8_1:hover:not(:focus-within){border-color:var(--hav)}._labelledTextInput_lnht8_1._disabled_lnht8_42{background-color:var(--silver-lighter)}._labelledTextInput_lnht8_1._disabled_lnht8_42 input{color:var(--silver)}._labelledTextInput_lnht8_1._medium_lnht8_50:focus-within{outline-width:2px}._labelledTextInput_lnht8_1._medium_lnht8_50 input{font-size:var(--swui-font-size-inputs);padding:calc(var(--swui-metrics-space) * 4) calc(var(--swui-metrics-space) * 2) calc(var(--swui-metrics-space) * 1)}._labelledTextInput_lnht8_1._large_lnht8_62{border-radius:var(--swui-border-radius-large)}._labelledTextInput_lnht8_1._large_lnht8_62:focus-within{outline-width:3px}._labelledTextInput_lnht8_1._large_lnht8_62 input{font-size:var(--swui-font-size-inputs-large);padding:calc(var(--swui-metrics-space) * 5) calc(var(--swui-metrics-space) * 2) calc(var(--swui-metrics-space) * 2)}._labelledTextInput_lnht8_1._error_lnht8_76{border-color:var(--swui-state-error-light-color)}._labelledTextInput_lnht8_1._error_lnht8_76:hover:not(:focus-within){border-color:var(--modern-red)}._labelledTextInput_lnht8_1._error_lnht8_76 input{background-color:var(--swui-state-error-light-color)}._labelledTextInput_lnht8_1 label{display:flex;position:absolute;top:var(--swui-metrics-space);left:calc(var(--swui-metrics-space) * 2);cursor:text}._textArea_6n6nc_1{--swui-textarea-text-color: var(--swui-field-text-color);--swui-textarea-text-color-disabled: var(--swui-field-text-color-disabled);--swui-textarea-letter-spacing: var(--swui-field-letter-spacing);--swui-textarea-line-height: var(--swui-field-text-line-height);--swui-textarea-indent: var(--swui-metrics-indent);--swui-textarea-font-size: var(--swui-font-size-inputs);--swui-textarea-font-family: var(--swui-font-input);--swui-textarea-font-weight: var(--swui-font-weight-inputs);--swui-textarea-placeholder-color: var(--swui-text-disabled-color);--swui-textarea-animation-time: var(--swui-animation-time-medium);--swui-textarea-icon-color: var(--swui-field-border-color-disabled);--swui-textarea-icon-size: var(--swui-field-icon-size);--swui-textarea-icon-color-success: var(--swui-state-success-color);--swui-textarea-bg-loading: var(--swui-state-loading-light-color);--swui-textarea-border-color-loading: var(--swui-state-loading-color);--swui-textarea-bg-modified: var(--swui-state-modified-light-color);--swui-textarea-border-color-modified: var(--swui-state-modified-color);--swui-textarea-bg-warning: var(--swui-state-alert-light-color);--swui-textarea-border-color-warning: var(--swui-state-alert-color);--swui-textarea-bg-error: var(--swui-state-error-light-color);--swui-textarea-border-color-error: var(--swui-state-error-color);--swui-textarea-bg-color: var(--swui-field-bg-enabled);--swui-textarea-bg-color-disabled: var(--swui-field-bg-disabled);--swui-textarea-border-radius: var(--swui-field-border-radius);--swui-textarea-border-color: var(--swui-field-border-color);--swui-textarea-border-color-hover: var(--swui-field-border-color-hover);--swui-textarea-border-color-disabled: var( --swui-field-border-color-disabled );max-width:100%;letter-spacing:var(--swui-textarea-letter-spacing);line-height:var(--swui-textarea-line-height);padding:2px var(--swui-textarea-indent);color:var(--swui-textarea-text-color);font-size:var(--swui-textarea-font-size);font-family:var(--swui-textarea-font-family);font-weight:var(--swui-textarea-font-weight);background:var(--current-bg, var(--swui-textarea-bg-color));border:1px solid var(--current-border-color, var(--swui-textarea-border-color));border-radius:var(--swui-textarea-border-radius);transition:border var(--swui-textarea-animation-time);--current-icon-color: var(--swui-textarea-icon-color)}._textArea_6n6nc_1:focus:not(:focus-visible){outline:none}._textArea_6n6nc_1:focus{--current-border-color: var(--swui-textarea-border-color-hover);--current-bg: var(--swui-textarea-bg-color)}._textArea_6n6nc_1:focus-visible{outline:var(--swui-focus-outline)}._textArea_6n6nc_1:disabled{color:var(--swui-textarea-text-color-disabled);--current-bg: var(--swui-textarea-bg-color-disabled);--current-border-color: var(--swui-textarea-border-color-disabled)}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
import { jsx as o, jsxs as
|
|
3
|
-
import { Box as pt, Space as x, Text as N, Row as T, ScreenReaderOnlyText as
|
|
2
|
+
import { jsx as o, jsxs as m, Fragment as v } from "react/jsx-runtime";
|
|
3
|
+
import { Box as pt, Space as x, Text as N, Row as T, ScreenReaderOnlyText as z, parseFloatElseUndefined as W, getDataProps as ft } from "@stenajs-webui/core";
|
|
4
4
|
import * as mt from "react";
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import
|
|
7
|
-
import { Icon as
|
|
5
|
+
import { forwardRef as P, useRef as U, useCallback as g, useEffect as O, useMemo as ht, useState as bt, useId as D } from "react";
|
|
6
|
+
import b from "classnames";
|
|
7
|
+
import { Icon as $, stenaCheck as E, stenaExclamationTriangle as G, InputSpinner as X, UpDownButtons as xt, TextInputButton as A, stenaEyeShow as yt, stenaEyeHide as It, stenaAngleDown as gt } from "@stenajs-webui/elements";
|
|
8
8
|
import { FontAwesomeIcon as wt } from "@fortawesome/react-fontawesome";
|
|
9
9
|
import { cssColor as q } from "@stenajs-webui/theme";
|
|
10
|
-
const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
10
|
+
const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75", S = {
|
|
11
11
|
switch: "_switch_1d6s8_1",
|
|
12
12
|
knob: Bt,
|
|
13
13
|
filler: Tt,
|
|
14
14
|
checked: kt
|
|
15
|
-
},
|
|
15
|
+
}, vt = `${S.switch} ${S.checked}`, St = ({
|
|
16
16
|
value: t,
|
|
17
17
|
disabled: e,
|
|
18
18
|
onValueChange: n,
|
|
19
19
|
className: r,
|
|
20
20
|
wrapperRef: c,
|
|
21
21
|
...s
|
|
22
|
-
}) => /* @__PURE__ */ o("div", { className: r, ref: c, children: /* @__PURE__ */
|
|
22
|
+
}) => /* @__PURE__ */ o("div", { className: r, ref: c, children: /* @__PURE__ */ m(
|
|
23
23
|
"button",
|
|
24
24
|
{
|
|
25
25
|
type: "button",
|
|
26
26
|
role: "switch",
|
|
27
27
|
"aria-checked": t,
|
|
28
|
-
className: t ?
|
|
28
|
+
className: t ? vt : S.switch,
|
|
29
29
|
disabled: e,
|
|
30
30
|
onClick: () => n && n(!t),
|
|
31
31
|
...s,
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ o("div", { className:
|
|
34
|
-
/* @__PURE__ */ o("div", { className:
|
|
33
|
+
/* @__PURE__ */ o("div", { className: S.filler }),
|
|
34
|
+
/* @__PURE__ */ o("div", { className: S.knob })
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
) }), Re = ({
|
|
@@ -40,15 +40,15 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
40
40
|
textColor: n,
|
|
41
41
|
wrapperRef: r,
|
|
42
42
|
...c
|
|
43
|
-
}) => /* @__PURE__ */ o("div", { ref: r, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */ o(
|
|
43
|
+
}) => /* @__PURE__ */ o("div", { ref: r, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */ m(pt, { row: !0, alignItems: "center", children: [
|
|
44
|
+
/* @__PURE__ */ o(St, { disabled: e, ...c }),
|
|
45
45
|
/* @__PURE__ */ o(x, {}),
|
|
46
46
|
/* @__PURE__ */ o(N, { userSelect: "none", color: n, children: t })
|
|
47
|
-
] }) }) }), Nt = "_checkbox_1ndou_1", Rt = "_standard_1ndou_39", jt = "_small_1ndou_51",
|
|
47
|
+
] }) }) }), Nt = "_checkbox_1ndou_1", Rt = "_standard_1ndou_39", jt = "_small_1ndou_51", L = {
|
|
48
48
|
checkbox: Nt,
|
|
49
49
|
standard: Rt,
|
|
50
50
|
small: jt
|
|
51
|
-
}, $t =
|
|
51
|
+
}, $t = P(
|
|
52
52
|
({
|
|
53
53
|
indeterminate: t = !1,
|
|
54
54
|
onChange: e,
|
|
@@ -57,22 +57,22 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
57
57
|
size: c = "standard",
|
|
58
58
|
className: s,
|
|
59
59
|
...i
|
|
60
|
-
},
|
|
61
|
-
const l =
|
|
62
|
-
l.current = u, l.current && (l.current.indeterminate = !!t),
|
|
60
|
+
}, d) => {
|
|
61
|
+
const l = U(), f = (u) => {
|
|
62
|
+
l.current = u, l.current && (l.current.indeterminate = !!t), d && (typeof d == "function" ? d(u) : d.current = u);
|
|
63
63
|
}, _ = g(
|
|
64
64
|
(u) => {
|
|
65
65
|
e && e(u), n && n(u.target.checked);
|
|
66
66
|
},
|
|
67
67
|
[e, n]
|
|
68
68
|
);
|
|
69
|
-
return
|
|
69
|
+
return O(() => {
|
|
70
70
|
l.current && (l.current.indeterminate = !!t);
|
|
71
71
|
}, [t, l]), /* @__PURE__ */ o(
|
|
72
72
|
"input",
|
|
73
73
|
{
|
|
74
74
|
type: "checkbox",
|
|
75
|
-
className:
|
|
75
|
+
className: b(L.checkbox, L[c], s),
|
|
76
76
|
checked: r,
|
|
77
77
|
onChange: _,
|
|
78
78
|
ref: f,
|
|
@@ -87,16 +87,16 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
87
87
|
wrapperRef: r,
|
|
88
88
|
textColor: c,
|
|
89
89
|
...s
|
|
90
|
-
}) => /* @__PURE__ */ o("div", { ref: r, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */
|
|
90
|
+
}) => /* @__PURE__ */ o("div", { ref: r, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */ m(T, { alignItems: "center", children: [
|
|
91
91
|
/* @__PURE__ */ o($t, { ...s, ref: n }),
|
|
92
92
|
/* @__PURE__ */ o(x, {}),
|
|
93
93
|
e && /* @__PURE__ */ o(N, { userSelect: "none", color: c, children: e }),
|
|
94
94
|
t
|
|
95
|
-
] }) }) }), At = "_radiobutton_foy83_1", Ht = "_standard_foy83_45", Wt = "_small_foy83_55",
|
|
95
|
+
] }) }) }), At = "_radiobutton_foy83_1", Ht = "_standard_foy83_45", Wt = "_small_foy83_55", K = {
|
|
96
96
|
radiobutton: At,
|
|
97
97
|
standard: Ht,
|
|
98
98
|
small: Wt
|
|
99
|
-
}, J =
|
|
99
|
+
}, J = P(
|
|
100
100
|
({
|
|
101
101
|
onChange: t,
|
|
102
102
|
onValueChange: e,
|
|
@@ -105,7 +105,7 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
105
105
|
className: c,
|
|
106
106
|
...s
|
|
107
107
|
}, i) => {
|
|
108
|
-
const
|
|
108
|
+
const d = g(
|
|
109
109
|
(l) => {
|
|
110
110
|
t && t(l), e && e(l.target.value);
|
|
111
111
|
},
|
|
@@ -116,14 +116,14 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
116
116
|
{
|
|
117
117
|
type: "radio",
|
|
118
118
|
name: r,
|
|
119
|
-
className:
|
|
120
|
-
onChange:
|
|
119
|
+
className: b(K.radiobutton, K[n], c),
|
|
120
|
+
onChange: d,
|
|
121
121
|
ref: i,
|
|
122
122
|
...s
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
|
-
), Pt = "_radioButtonBox_vpn6v_1", Ut = "_danger_vpn6v_19", Ft = "_radioButtonWrapper_vpn6v_30",
|
|
126
|
+
), Pt = "_radioButtonBox_vpn6v_1", Ut = "_danger_vpn6v_19", Ft = "_radioButtonWrapper_vpn6v_30", M = {
|
|
127
127
|
radioButtonBox: Pt,
|
|
128
128
|
danger: Ut,
|
|
129
129
|
radioButtonWrapper: Ft
|
|
@@ -135,21 +135,34 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
135
135
|
icon: c,
|
|
136
136
|
contentRight: s,
|
|
137
137
|
style: i,
|
|
138
|
-
radioButtonClassName:
|
|
138
|
+
radioButtonClassName: d,
|
|
139
139
|
...l
|
|
140
140
|
}) => /* @__PURE__ */ o(
|
|
141
141
|
"label",
|
|
142
142
|
{
|
|
143
|
-
className:
|
|
143
|
+
className: b(M.radioButtonBox, M[n], r),
|
|
144
144
|
style: i,
|
|
145
|
-
children: /* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
145
|
+
children: /* @__PURE__ */ m(T, { justifyContent: "space-between", flexGrow: 1, children: [
|
|
146
|
+
/* @__PURE__ */ m(T, { alignItems: "center", children: [
|
|
147
|
+
/* @__PURE__ */ o(J, { ...l, className: d }),
|
|
148
|
+
/* @__PURE__ */ o(x, {}),
|
|
149
|
+
e ? /* @__PURE__ */ o(z, { children: e }) : null,
|
|
150
|
+
/* @__PURE__ */ o(N, { "aria-hidden": !!e, children: t }),
|
|
151
|
+
c && /* @__PURE__ */ o(T, { alignItems: "center", width: "48px", justifyContent: "center", children: /* @__PURE__ */ o($, { icon: c, size: 24 }) })
|
|
152
|
+
] }),
|
|
153
|
+
/* @__PURE__ */ m(
|
|
154
|
+
T,
|
|
155
|
+
{
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
width: c ? "48px" : void 0,
|
|
158
|
+
justifyContent: "center",
|
|
159
|
+
children: [
|
|
160
|
+
c && /* @__PURE__ */ o($, { icon: c, size: 24 }),
|
|
161
|
+
s
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] })
|
|
153
166
|
}
|
|
154
167
|
), Ae = ({
|
|
155
168
|
label: t,
|
|
@@ -157,31 +170,31 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
157
170
|
wrapperRef: n,
|
|
158
171
|
textColor: r,
|
|
159
172
|
...c
|
|
160
|
-
}) => /* @__PURE__ */ o("div", { ref: n, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */
|
|
173
|
+
}) => /* @__PURE__ */ o("div", { ref: n, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */ m(T, { alignItems: "center", children: [
|
|
161
174
|
/* @__PURE__ */ o(J, { ref: e, ...c }),
|
|
162
175
|
/* @__PURE__ */ o(x, {}),
|
|
163
176
|
/* @__PURE__ */ o(N, { color: r, userSelect: "none", children: t })
|
|
164
|
-
] }) }) }), Lt = (t, e, n, r, c, s, i,
|
|
165
|
-
const l =
|
|
166
|
-
l.current || s == null || s(
|
|
167
|
-
}, _ = (
|
|
168
|
-
l.current = !1,
|
|
177
|
+
] }) }) }), Lt = (t, e, n, r, c, s, i, d) => {
|
|
178
|
+
const l = U(!1), f = (a) => {
|
|
179
|
+
l.current || s == null || s(a.target.value ?? ""), i == null || i(a);
|
|
180
|
+
}, _ = (a) => {
|
|
181
|
+
l.current = !1, d == null || d(a);
|
|
169
182
|
};
|
|
170
183
|
return {
|
|
171
184
|
onKeyDownHandler: g(
|
|
172
|
-
(
|
|
173
|
-
const { key: p } =
|
|
185
|
+
(a) => {
|
|
186
|
+
const { key: p } = a;
|
|
174
187
|
if (p === "Enter")
|
|
175
|
-
l.current = !0, n == null || n(), s == null || s(
|
|
188
|
+
l.current = !0, n == null || n(), s == null || s(a.currentTarget.value ?? "");
|
|
176
189
|
else if (p === "Escape")
|
|
177
|
-
l.current = !0, r == null || r(),
|
|
190
|
+
l.current = !0, r == null || r(), a.preventDefault(), a.stopPropagation();
|
|
178
191
|
else if (c) {
|
|
179
|
-
const
|
|
192
|
+
const h = (w, y) => {
|
|
180
193
|
l.current = !0, t.current.blur(), c(w), y.preventDefault(), y.stopPropagation();
|
|
181
194
|
};
|
|
182
|
-
|
|
195
|
+
a.shiftKey && p === "Tab" ? h("left", a) : p === "Tab" ? h("right", a) : p === "ArrowUp" ? h("up", a) : p === "ArrowDown" ? h("down", a) : p === "ArrowRight" ? t.current.value.length === t.current.selectionStart && h("right", a) : p === "ArrowLeft" && t.current.selectionStart === 0 && h("left", a);
|
|
183
196
|
}
|
|
184
|
-
e && e(
|
|
197
|
+
e && e(a);
|
|
185
198
|
},
|
|
186
199
|
[r, c, e, t, n, s]
|
|
187
200
|
),
|
|
@@ -193,7 +206,7 @@ function Kt(t) {
|
|
|
193
206
|
return t.tagName === "TEXTAREA" || t.tagName === "INPUT" && (t.type === "text" || t.type === "search" || t.type === "url" || t.type === "tel" || t.type === "password");
|
|
194
207
|
}
|
|
195
208
|
const Mt = (t, e, n) => {
|
|
196
|
-
|
|
209
|
+
O(() => {
|
|
197
210
|
t.current && Kt(t.current) && (n ? t.current.setSelectionRange(0, t.current.value.length) : e && t.current.setSelectionRange(
|
|
198
211
|
t.current.value.length,
|
|
199
212
|
t.current.value.length
|
|
@@ -206,21 +219,21 @@ const Mt = (t, e, n) => {
|
|
|
206
219
|
onValueChange: c,
|
|
207
220
|
selectAllOnMount: s,
|
|
208
221
|
moveCursorToEndOnMount: i,
|
|
209
|
-
onDone:
|
|
222
|
+
onDone: d,
|
|
210
223
|
onMove: l,
|
|
211
224
|
onFocus: f,
|
|
212
225
|
onBlur: _,
|
|
213
226
|
onKeyDown: u,
|
|
214
|
-
autoFocus:
|
|
227
|
+
autoFocus: a
|
|
215
228
|
}) => {
|
|
216
229
|
Mt(t, !!i, !!s);
|
|
217
|
-
const { onKeyDownHandler: p, onFocusHandler:
|
|
230
|
+
const { onKeyDownHandler: p, onFocusHandler: h, onBlurHandler: w } = Lt(
|
|
218
231
|
t,
|
|
219
232
|
u,
|
|
220
233
|
e,
|
|
221
234
|
n,
|
|
222
235
|
l,
|
|
223
|
-
|
|
236
|
+
d,
|
|
224
237
|
_,
|
|
225
238
|
f
|
|
226
239
|
), y = g(
|
|
@@ -232,9 +245,9 @@ const Mt = (t, e, n) => {
|
|
|
232
245
|
return {
|
|
233
246
|
onBlur: w,
|
|
234
247
|
onChange: y,
|
|
235
|
-
onFocus:
|
|
248
|
+
onFocus: h,
|
|
236
249
|
onKeyDown: p,
|
|
237
|
-
autoFocus: s ||
|
|
250
|
+
autoFocus: s || a
|
|
238
251
|
};
|
|
239
252
|
}, Ot = "_textInput_1jb3g_1", Dt = "_disabled_1jb3g_11", Et = "_input_1jb3g_16", Gt = "_icon_1jb3g_49", Xt = "_standard_1jb3g_59", qt = "_success_1jb3g_60", Jt = "_loading_1jb3g_72", Qt = "_modified_1jb3g_77", Yt = "_error_1jb3g_86", Zt = "_warning_1jb3g_95", Ct = "_hideBorder_1jb3g_109", Vt = "_clickable_1jb3g_116", I = {
|
|
240
253
|
textInput: Ot,
|
|
@@ -257,23 +270,23 @@ const Mt = (t, e, n) => {
|
|
|
257
270
|
spaceOnLeft: c,
|
|
258
271
|
spaceOnRight: s,
|
|
259
272
|
disableContentPadding: i,
|
|
260
|
-
disableContentPaddingLeft:
|
|
273
|
+
disableContentPaddingLeft: d,
|
|
261
274
|
disableContentPaddingRight: l
|
|
262
|
-
}) => !r && !e && !t ? null : t ? /* @__PURE__ */
|
|
275
|
+
}) => !r && !e && !t ? null : t ? /* @__PURE__ */ m(v, { children: [
|
|
263
276
|
c ? /* @__PURE__ */ o(x, { num: 0.25 }) : null,
|
|
264
277
|
t,
|
|
265
278
|
s ? /* @__PURE__ */ o(x, { num: 0.25 }) : null
|
|
266
|
-
] }) : r ? /* @__PURE__ */
|
|
267
|
-
c && !(i ||
|
|
279
|
+
] }) : r ? /* @__PURE__ */ m(v, { children: [
|
|
280
|
+
c && !(i || d) ? /* @__PURE__ */ o(x, {}) : null,
|
|
268
281
|
r || null,
|
|
269
282
|
s && !(i || l) ? /* @__PURE__ */ o(x, {}) : null
|
|
270
|
-
] }) : /* @__PURE__ */
|
|
283
|
+
] }) : /* @__PURE__ */ m(v, { children: [
|
|
271
284
|
c ? /* @__PURE__ */ o(x, {}) : null,
|
|
272
285
|
e && /* @__PURE__ */ o(
|
|
273
286
|
wt,
|
|
274
287
|
{
|
|
275
288
|
icon: e,
|
|
276
|
-
className:
|
|
289
|
+
className: b(I.icon, n)
|
|
277
290
|
}
|
|
278
291
|
),
|
|
279
292
|
s ? /* @__PURE__ */ o(x, {}) : null
|
|
@@ -285,14 +298,14 @@ const Mt = (t, e, n) => {
|
|
|
285
298
|
className: c,
|
|
286
299
|
buttonLeft: s,
|
|
287
300
|
buttonRight: i,
|
|
288
|
-
contentLeft:
|
|
301
|
+
contentLeft: d,
|
|
289
302
|
contentRight: l,
|
|
290
303
|
disableContentPadding: f,
|
|
291
304
|
disableContentPaddingLeft: _,
|
|
292
305
|
disableContentPaddingRight: u,
|
|
293
|
-
iconLeft:
|
|
306
|
+
iconLeft: a,
|
|
294
307
|
iconRight: p,
|
|
295
|
-
moveCursorToEndOnMount:
|
|
308
|
+
moveCursorToEndOnMount: h,
|
|
296
309
|
selectAllOnMount: w,
|
|
297
310
|
autoFocus: y,
|
|
298
311
|
onValueChange: R,
|
|
@@ -308,13 +321,13 @@ const Mt = (t, e, n) => {
|
|
|
308
321
|
onFocus: st,
|
|
309
322
|
onBlur: lt,
|
|
310
323
|
...it
|
|
311
|
-
} = t,
|
|
324
|
+
} = t, dt = U(null), F = n ?? dt, at = zt(F, {
|
|
312
325
|
onEnter: tt,
|
|
313
326
|
onEsc: et,
|
|
314
327
|
onChange: nt,
|
|
315
328
|
onValueChange: R,
|
|
316
329
|
selectAllOnMount: w,
|
|
317
|
-
moveCursorToEndOnMount:
|
|
330
|
+
moveCursorToEndOnMount: h,
|
|
318
331
|
onDone: V,
|
|
319
332
|
onMove: rt,
|
|
320
333
|
onFocus: st,
|
|
@@ -322,10 +335,10 @@ const Mt = (t, e, n) => {
|
|
|
322
335
|
onKeyDown: ot,
|
|
323
336
|
autoFocus: y
|
|
324
337
|
}), ut = e === "success" ? E : e === "warning" || e === "error" ? G : p, _t = e === "loading" ? /* @__PURE__ */ o(X, {}) : l;
|
|
325
|
-
return /* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ m(
|
|
326
339
|
"div",
|
|
327
340
|
{
|
|
328
|
-
className:
|
|
341
|
+
className: b(
|
|
329
342
|
I.textInput,
|
|
330
343
|
I[e],
|
|
331
344
|
{
|
|
@@ -341,11 +354,11 @@ const Mt = (t, e, n) => {
|
|
|
341
354
|
/* @__PURE__ */ o(
|
|
342
355
|
j,
|
|
343
356
|
{
|
|
344
|
-
content:
|
|
357
|
+
content: d,
|
|
345
358
|
disableContentPadding: f,
|
|
346
359
|
disableContentPaddingLeft: _,
|
|
347
360
|
disableContentPaddingRight: u,
|
|
348
|
-
icon:
|
|
361
|
+
icon: a,
|
|
349
362
|
spaceOnLeft: !0,
|
|
350
363
|
button: s
|
|
351
364
|
}
|
|
@@ -353,13 +366,13 @@ const Mt = (t, e, n) => {
|
|
|
353
366
|
/* @__PURE__ */ o(
|
|
354
367
|
"input",
|
|
355
368
|
{
|
|
356
|
-
className:
|
|
369
|
+
className: b(I.input, c),
|
|
357
370
|
type: "text",
|
|
358
371
|
disabled: r,
|
|
359
|
-
ref:
|
|
372
|
+
ref: F,
|
|
360
373
|
autoFocus: y,
|
|
361
374
|
...it,
|
|
362
|
-
...
|
|
375
|
+
...at
|
|
363
376
|
}
|
|
364
377
|
),
|
|
365
378
|
/* @__PURE__ */ o(
|
|
@@ -388,10 +401,10 @@ const Mt = (t, e, n) => {
|
|
|
388
401
|
}) => {
|
|
389
402
|
if (t)
|
|
390
403
|
if (!e)
|
|
391
|
-
t(String(
|
|
404
|
+
t(String(H(n, r, c)));
|
|
392
405
|
else {
|
|
393
|
-
const i = (
|
|
394
|
-
t(String(
|
|
406
|
+
const i = (W(e) || 0) + n;
|
|
407
|
+
t(String(H(i, r, c)));
|
|
395
408
|
}
|
|
396
409
|
}, ne = ({
|
|
397
410
|
onValueChange: t,
|
|
@@ -403,10 +416,10 @@ const Mt = (t, e, n) => {
|
|
|
403
416
|
if (e === "")
|
|
404
417
|
t("");
|
|
405
418
|
else {
|
|
406
|
-
const s =
|
|
407
|
-
t(String(
|
|
419
|
+
const s = W(e) || 0;
|
|
420
|
+
t(String(H(s, n, r)));
|
|
408
421
|
}
|
|
409
|
-
},
|
|
422
|
+
}, H = (t, e, n) => {
|
|
410
423
|
let r = t;
|
|
411
424
|
return e != null && (r = Math.max(e, r)), n != null && (r = Math.min(n, r)), r;
|
|
412
425
|
}, He = ({
|
|
@@ -417,7 +430,7 @@ const Mt = (t, e, n) => {
|
|
|
417
430
|
step: c = 1,
|
|
418
431
|
contentRight: s,
|
|
419
432
|
disabled: i,
|
|
420
|
-
className:
|
|
433
|
+
className: d,
|
|
421
434
|
hideButtons: l,
|
|
422
435
|
...f
|
|
423
436
|
}) => {
|
|
@@ -435,8 +448,8 @@ const Mt = (t, e, n) => {
|
|
|
435
448
|
return /* @__PURE__ */ o(
|
|
436
449
|
Q,
|
|
437
450
|
{
|
|
438
|
-
contentRight: l ? s : /* @__PURE__ */
|
|
439
|
-
s && /* @__PURE__ */
|
|
451
|
+
contentRight: l ? s : /* @__PURE__ */ m(v, { children: [
|
|
452
|
+
s && /* @__PURE__ */ m(v, { children: [
|
|
440
453
|
s,
|
|
441
454
|
/* @__PURE__ */ o(x, {})
|
|
442
455
|
] }),
|
|
@@ -457,7 +470,7 @@ const Mt = (t, e, n) => {
|
|
|
457
470
|
min: r,
|
|
458
471
|
max: n,
|
|
459
472
|
step: c,
|
|
460
|
-
className:
|
|
473
|
+
className: b(ee.numericTextInputInput, d),
|
|
461
474
|
disabled: i,
|
|
462
475
|
...f
|
|
463
476
|
}
|
|
@@ -469,12 +482,12 @@ const Mt = (t, e, n) => {
|
|
|
469
482
|
if (!c)
|
|
470
483
|
e(void 0);
|
|
471
484
|
else {
|
|
472
|
-
const s =
|
|
485
|
+
const s = W(c);
|
|
473
486
|
s !== void 0 && e(s);
|
|
474
487
|
}
|
|
475
488
|
},
|
|
476
489
|
[e]
|
|
477
|
-
), r =
|
|
490
|
+
), r = ht(() => t === void 0 ? "" : String(t), [t]);
|
|
478
491
|
return {
|
|
479
492
|
onValueChange: n,
|
|
480
493
|
value: r
|
|
@@ -484,12 +497,12 @@ const Mt = (t, e, n) => {
|
|
|
484
497
|
visibleIcon: e = It,
|
|
485
498
|
...n
|
|
486
499
|
}) => {
|
|
487
|
-
const [r, c] =
|
|
500
|
+
const [r, c] = bt(!0);
|
|
488
501
|
return /* @__PURE__ */ o(
|
|
489
502
|
Q,
|
|
490
503
|
{
|
|
491
504
|
buttonRight: /* @__PURE__ */ o(
|
|
492
|
-
|
|
505
|
+
A,
|
|
493
506
|
{
|
|
494
507
|
icon: r ? t : e,
|
|
495
508
|
onClick: () => c((s) => !s)
|
|
@@ -518,8 +531,8 @@ const Mt = (t, e, n) => {
|
|
|
518
531
|
label: n,
|
|
519
532
|
disabled: r,
|
|
520
533
|
className: c
|
|
521
|
-
}) => /* @__PURE__ */
|
|
522
|
-
e ? /* @__PURE__ */ o(
|
|
534
|
+
}) => /* @__PURE__ */ m("label", { htmlFor: t, className: c, children: [
|
|
535
|
+
e ? /* @__PURE__ */ o(z, { children: e }) : null,
|
|
523
536
|
/* @__PURE__ */ o(
|
|
524
537
|
oe,
|
|
525
538
|
{
|
|
@@ -528,13 +541,13 @@ const Mt = (t, e, n) => {
|
|
|
528
541
|
disabled: r
|
|
529
542
|
}
|
|
530
543
|
)
|
|
531
|
-
] }), ce = "_labelledSelect_1evxo_1", se = "_onlyTopBorder_1evxo_8", le = "_onlyBottomBorder_1evxo_14", ie = "_error_1evxo_19",
|
|
544
|
+
] }), ce = "_labelledSelect_1evxo_1", se = "_onlyTopBorder_1evxo_8", le = "_onlyBottomBorder_1evxo_14", ie = "_error_1evxo_19", de = "_normal_1evxo_24", ae = "_label_1evxo_1", ue = "_select_1evxo_48", _e = "_iconWrapper_1evxo_73", B = {
|
|
532
545
|
labelledSelect: ce,
|
|
533
546
|
onlyTopBorder: se,
|
|
534
547
|
onlyBottomBorder: le,
|
|
535
548
|
error: ie,
|
|
536
|
-
normal:
|
|
537
|
-
label:
|
|
549
|
+
normal: de,
|
|
550
|
+
label: ae,
|
|
538
551
|
select: ue,
|
|
539
552
|
iconWrapper: _e
|
|
540
553
|
}, Ue = ({
|
|
@@ -545,19 +558,19 @@ const Mt = (t, e, n) => {
|
|
|
545
558
|
screenReaderLabel: c,
|
|
546
559
|
borderVariant: s = "normalBorder",
|
|
547
560
|
variant: i = "normal",
|
|
548
|
-
children:
|
|
561
|
+
children: d,
|
|
549
562
|
...l
|
|
550
563
|
}) => {
|
|
551
|
-
const f =
|
|
552
|
-
(
|
|
553
|
-
t == null || t(
|
|
564
|
+
const f = D(), _ = n ?? f, u = g(
|
|
565
|
+
(a) => {
|
|
566
|
+
t == null || t(a), e == null || e(a.target.value);
|
|
554
567
|
},
|
|
555
568
|
[t, e]
|
|
556
569
|
);
|
|
557
|
-
return /* @__PURE__ */
|
|
570
|
+
return /* @__PURE__ */ m(
|
|
558
571
|
"div",
|
|
559
572
|
{
|
|
560
|
-
className:
|
|
573
|
+
className: b(
|
|
561
574
|
B.labelledSelect,
|
|
562
575
|
B[i],
|
|
563
576
|
B[s]
|
|
@@ -577,13 +590,13 @@ const Mt = (t, e, n) => {
|
|
|
577
590
|
{
|
|
578
591
|
id: _,
|
|
579
592
|
onChange: u,
|
|
580
|
-
className:
|
|
593
|
+
className: b(B.select, B[i]),
|
|
581
594
|
...l,
|
|
582
|
-
children:
|
|
595
|
+
children: d
|
|
583
596
|
}
|
|
584
597
|
),
|
|
585
|
-
/* @__PURE__ */ o("div", { className:
|
|
586
|
-
|
|
598
|
+
/* @__PURE__ */ o("div", { className: b(B.iconWrapper), children: /* @__PURE__ */ o(
|
|
599
|
+
$,
|
|
587
600
|
{
|
|
588
601
|
icon: gt,
|
|
589
602
|
size: 24,
|
|
@@ -593,12 +606,12 @@ const Mt = (t, e, n) => {
|
|
|
593
606
|
]
|
|
594
607
|
}
|
|
595
608
|
);
|
|
596
|
-
}, pe = "_labelledTextInput_lnht8_1", fe = "_onlyTop_lnht8_21", me = "_onlyBottom_lnht8_27",
|
|
609
|
+
}, pe = "_labelledTextInput_lnht8_1", fe = "_onlyTop_lnht8_21", me = "_onlyBottom_lnht8_27", he = "_disabled_lnht8_42", be = "_medium_lnht8_50", xe = "_large_lnht8_62", ye = "_error_lnht8_76", k = {
|
|
597
610
|
labelledTextInput: pe,
|
|
598
611
|
onlyTop: fe,
|
|
599
612
|
onlyBottom: me,
|
|
600
|
-
disabled:
|
|
601
|
-
medium:
|
|
613
|
+
disabled: he,
|
|
614
|
+
medium: be,
|
|
602
615
|
large: xe,
|
|
603
616
|
error: ye
|
|
604
617
|
}, Fe = mt.forwardRef(
|
|
@@ -610,33 +623,33 @@ const Mt = (t, e, n) => {
|
|
|
610
623
|
size: c = "medium",
|
|
611
624
|
value: s,
|
|
612
625
|
onChange: i,
|
|
613
|
-
disabled:
|
|
626
|
+
disabled: d,
|
|
614
627
|
onValueChange: l,
|
|
615
628
|
borderRadiusVariant: f = "normalBorder",
|
|
616
629
|
variant: _ = "normal",
|
|
617
630
|
...u
|
|
618
|
-
},
|
|
619
|
-
const p =
|
|
631
|
+
}, a) => {
|
|
632
|
+
const p = D(), h = n ?? p, w = g(
|
|
620
633
|
(y) => {
|
|
621
634
|
i == null || i(y), l == null || l(y.target.value);
|
|
622
635
|
},
|
|
623
636
|
[i, l]
|
|
624
637
|
);
|
|
625
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ m(
|
|
626
639
|
"div",
|
|
627
640
|
{
|
|
628
|
-
className:
|
|
641
|
+
className: b(
|
|
629
642
|
k.labelledTextInput,
|
|
630
643
|
k[_],
|
|
631
644
|
k[f],
|
|
632
645
|
k[c],
|
|
633
|
-
|
|
646
|
+
d && k.disabled
|
|
634
647
|
),
|
|
635
648
|
children: [
|
|
636
649
|
/* @__PURE__ */ o(
|
|
637
650
|
Y,
|
|
638
651
|
{
|
|
639
|
-
htmlFor:
|
|
652
|
+
htmlFor: h,
|
|
640
653
|
screenReaderLabel: r,
|
|
641
654
|
label: e
|
|
642
655
|
}
|
|
@@ -644,13 +657,13 @@ const Mt = (t, e, n) => {
|
|
|
644
657
|
/* @__PURE__ */ o(
|
|
645
658
|
"input",
|
|
646
659
|
{
|
|
647
|
-
ref:
|
|
648
|
-
id:
|
|
660
|
+
ref: a,
|
|
661
|
+
id: h,
|
|
649
662
|
autoComplete: t,
|
|
650
663
|
type: "text",
|
|
651
664
|
value: s,
|
|
652
665
|
onChange: w,
|
|
653
|
-
disabled:
|
|
666
|
+
disabled: d,
|
|
654
667
|
...u
|
|
655
668
|
}
|
|
656
669
|
)
|
|
@@ -666,19 +679,19 @@ const Mt = (t, e, n) => {
|
|
|
666
679
|
contentLeft: c,
|
|
667
680
|
contentRight: s,
|
|
668
681
|
disableContentPadding: i,
|
|
669
|
-
disableContentPaddingLeft:
|
|
682
|
+
disableContentPaddingLeft: d,
|
|
670
683
|
disableContentPaddingRight: l,
|
|
671
684
|
iconRight: f,
|
|
672
685
|
iconLeft: _,
|
|
673
686
|
onClickLeft: u,
|
|
674
|
-
onClickRight:
|
|
687
|
+
onClickRight: a,
|
|
675
688
|
children: p
|
|
676
689
|
}) => {
|
|
677
|
-
const
|
|
678
|
-
return /* @__PURE__ */
|
|
690
|
+
const h = t === "success" ? E : t === "warning" || t === "error" ? G : f, w = t === "loading" ? /* @__PURE__ */ o(X, {}) : s;
|
|
691
|
+
return /* @__PURE__ */ m(
|
|
679
692
|
"div",
|
|
680
693
|
{
|
|
681
|
-
className:
|
|
694
|
+
className: b(
|
|
682
695
|
I.textInput,
|
|
683
696
|
I.inputContainer,
|
|
684
697
|
I[t],
|
|
@@ -694,10 +707,10 @@ const Mt = (t, e, n) => {
|
|
|
694
707
|
{
|
|
695
708
|
content: c,
|
|
696
709
|
disableContentPadding: i,
|
|
697
|
-
disableContentPaddingLeft:
|
|
710
|
+
disableContentPaddingLeft: d,
|
|
698
711
|
disableContentPaddingRight: l,
|
|
699
712
|
spaceOnLeft: !0,
|
|
700
|
-
button: _ ? /* @__PURE__ */ o(
|
|
713
|
+
button: _ ? /* @__PURE__ */ o(A, { onClick: u, icon: _ }) : void 0
|
|
701
714
|
}
|
|
702
715
|
),
|
|
703
716
|
/* @__PURE__ */ o(T, { alignItems: "center", children: p }),
|
|
@@ -706,10 +719,10 @@ const Mt = (t, e, n) => {
|
|
|
706
719
|
{
|
|
707
720
|
content: w,
|
|
708
721
|
disableContentPadding: i,
|
|
709
|
-
disableContentPaddingLeft:
|
|
722
|
+
disableContentPaddingLeft: d,
|
|
710
723
|
disableContentPaddingRight: l,
|
|
711
724
|
spaceOnRight: !0,
|
|
712
|
-
button:
|
|
725
|
+
button: h ? /* @__PURE__ */ o(A, { onClick: a, icon: h }) : void 0
|
|
713
726
|
}
|
|
714
727
|
)
|
|
715
728
|
]
|
|
@@ -717,7 +730,7 @@ const Mt = (t, e, n) => {
|
|
|
717
730
|
);
|
|
718
731
|
}, Ie = "_textArea_6n6nc_1", ge = {
|
|
719
732
|
textArea: Ie
|
|
720
|
-
}, Ke =
|
|
733
|
+
}, Ke = P(
|
|
721
734
|
({
|
|
722
735
|
className: t,
|
|
723
736
|
value: e,
|
|
@@ -726,7 +739,7 @@ const Mt = (t, e, n) => {
|
|
|
726
739
|
resize: c = "none",
|
|
727
740
|
readOnly: s = !1,
|
|
728
741
|
rows: i,
|
|
729
|
-
disabled:
|
|
742
|
+
disabled: d,
|
|
730
743
|
...l
|
|
731
744
|
}, f) => {
|
|
732
745
|
const _ = g(
|
|
@@ -738,10 +751,10 @@ const Mt = (t, e, n) => {
|
|
|
738
751
|
return /* @__PURE__ */ o(
|
|
739
752
|
"textarea",
|
|
740
753
|
{
|
|
741
|
-
disabled:
|
|
754
|
+
disabled: d,
|
|
742
755
|
rows: i,
|
|
743
756
|
readOnly: s,
|
|
744
|
-
className:
|
|
757
|
+
className: b(ge.textArea, t),
|
|
745
758
|
style: { resize: c },
|
|
746
759
|
onChange: _,
|
|
747
760
|
value: e,
|
|
@@ -763,7 +776,7 @@ export {
|
|
|
763
776
|
J as RadioButton,
|
|
764
777
|
$e as RadioButtonBox,
|
|
765
778
|
Ae as RadioButtonWithLabel,
|
|
766
|
-
|
|
779
|
+
St as Switch,
|
|
767
780
|
Re as SwitchWithLabel,
|
|
768
781
|
Ke as TextArea,
|
|
769
782
|
Q as TextInput,
|