@stenajs-webui/forms 20.17.1 → 20.17.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/components/ui/checkbox/CheckboxWithLabel.d.ts +7 -1
- package/dist/components/ui/radio/RadioButtonWithLabel.d.ts +6 -0
- package/dist/components/ui/switch/SwitchWithLabel.d.ts +6 -0
- package/dist/index.es.js +270 -240
- 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,113 +1,133 @@
|
|
|
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_yl38n_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;font-size:var(--swui-font-size-inputs);align-items:center;display:flex;cursor:pointer;outline:none}._radioButtonBox_yl38n_1._medium_yl38n_14{padding:0 var(--swui-metrics-space);height:42px}._radioButtonBox_yl38n_1._large_yl38n_19{height:48px;padding:0 calc(var(--swui-metrics-space) * 2)}._radioButtonBox_yl38n_1:hover{border-color:var(--hav)}._radioButtonBox_yl38n_1._danger_yl38n_28{background-color:var(--snackskal-light);border-color:var(--snackskal-light)}._radioButtonBox_yl38n_1._danger_yl38n_28:hover{border-color:var(--lhds-color-red-500)}@media (max-width: 768px){._radioButtonWrapper_yl38n_39{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_1wih5_1{position:relative;background:var(--moln);overflow:hidden;cursor:text;border:1px solid var(--silver-light);border-radius:var(--swui-border-radius)}._labelledTextInput_1wih5_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_1wih5_1._labelledTextInput_1wih5_1._onlyTop_1wih5_21{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-color:transparent}._labelledTextInput_1wih5_1._labelledTextInput_1wih5_1._onlyBottom_1wih5_27{border-top-left-radius:0;border-top-right-radius:0}._labelledTextInput_1wih5_1._labelledTextInput_1wih5_1._onlyLeft_1wih5_32{border-bottom-right-radius:0;border-top-right-radius:0;border-right-color:transparent}._labelledTextInput_1wih5_1._labelledTextInput_1wih5_1._onlyRight_1wih5_38{border-top-left-radius:0;border-bottom-left-radius:0}._labelledTextInput_1wih5_1:focus-within{outline:var(--swui-focus-outline);outline-offset:-1px;border-color:transparent}._labelledTextInput_1wih5_1:hover:not(:focus-within){border-color:var(--hav)}._labelledTextInput_1wih5_1._disabled_1wih5_53{background-color:var(--silver-lighter)}._labelledTextInput_1wih5_1._disabled_1wih5_53 input{color:var(--silver)}._labelledTextInput_1wih5_1._medium_1wih5_61:focus-within{outline-width:2px}._labelledTextInput_1wih5_1._medium_1wih5_61 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_1wih5_1._large_1wih5_73{border-radius:var(--swui-border-radius-large)}._labelledTextInput_1wih5_1._large_1wih5_73:focus-within{outline-width:3px}._labelledTextInput_1wih5_1._large_1wih5_73 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_1wih5_1._error_1wih5_87{border-color:var(--swui-state-error-light-color)}._labelledTextInput_1wih5_1._error_1wih5_87:hover:not(:focus-within){border-color:var(--modern-red)}._labelledTextInput_1wih5_1._error_1wih5_87 input{background-color:var(--swui-state-error-light-color)}._labelledTextInput_1wih5_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(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { jsx as o, jsxs as m, Fragment as
|
|
3
|
-
import { Box as pt, Space as y,
|
|
2
|
+
import { jsx as o, jsxs as m, Fragment as N } from "react/jsx-runtime";
|
|
3
|
+
import { Box as pt, Space as y, ScreenReaderOnlyText as R, Text as $, Row as k, parseFloatElseUndefined as P, getDataProps as ft } from "@stenajs-webui/core";
|
|
4
4
|
import * as mt from "react";
|
|
5
|
-
import { forwardRef as
|
|
5
|
+
import { forwardRef as U, useRef as F, useCallback as w, useEffect as L, useMemo as ht, useState as bt, useId as O } from "react";
|
|
6
6
|
import b from "classnames";
|
|
7
|
-
import { Icon as D, stenaCheck as E, stenaExclamationTriangle as G, InputSpinner as X, UpDownButtons as yt, TextInputButton as
|
|
7
|
+
import { Icon as D, stenaCheck as E, stenaExclamationTriangle as G, InputSpinner as X, UpDownButtons as yt, TextInputButton as H, stenaEyeShow as xt, stenaEyeHide as gt, stenaAngleDown as wt } from "@stenajs-webui/elements";
|
|
8
8
|
import { FontAwesomeIcon as It } 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", v = {
|
|
11
11
|
switch: "_switch_1d6s8_1",
|
|
12
12
|
knob: Bt,
|
|
13
13
|
filler: Tt,
|
|
14
14
|
checked: kt
|
|
15
|
-
},
|
|
15
|
+
}, St = `${v.switch} ${v.checked}`, Nt = ({
|
|
16
16
|
value: t,
|
|
17
17
|
disabled: e,
|
|
18
|
-
onValueChange:
|
|
19
|
-
className:
|
|
18
|
+
onValueChange: r,
|
|
19
|
+
className: n,
|
|
20
20
|
wrapperRef: c,
|
|
21
21
|
...s
|
|
22
|
-
}) => /* @__PURE__ */ o("div", { className:
|
|
22
|
+
}) => /* @__PURE__ */ o("div", { className: n, 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 ? St : v.switch,
|
|
29
29
|
disabled: e,
|
|
30
|
-
onClick: () =>
|
|
30
|
+
onClick: () => r && r(!t),
|
|
31
31
|
...s,
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ o("div", { className:
|
|
34
|
-
/* @__PURE__ */ o("div", { className:
|
|
33
|
+
/* @__PURE__ */ o("div", { className: v.filler }),
|
|
34
|
+
/* @__PURE__ */ o("div", { className: v.knob })
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
) }), He = ({
|
|
38
38
|
label: t,
|
|
39
39
|
disabled: e,
|
|
40
|
-
textColor:
|
|
41
|
-
wrapperRef:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
textColor: r,
|
|
41
|
+
wrapperRef: n,
|
|
42
|
+
screenReaderLabel: c,
|
|
43
|
+
...s
|
|
44
|
+
}) => /* @__PURE__ */ o("div", { ref: n, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */ m(pt, { row: !0, alignItems: "center", children: [
|
|
45
|
+
/* @__PURE__ */ o(Nt, { disabled: e, ...s }),
|
|
45
46
|
/* @__PURE__ */ o(y, {}),
|
|
46
|
-
/* @__PURE__ */ o(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
c ? /* @__PURE__ */ o(R, { children: c }) : null,
|
|
48
|
+
/* @__PURE__ */ o(
|
|
49
|
+
$,
|
|
50
|
+
{
|
|
51
|
+
color: r,
|
|
52
|
+
"aria-hidden": !!c,
|
|
53
|
+
userSelect: "none",
|
|
54
|
+
children: t
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] }) }) }), vt = "_checkbox_1ndou_1", Rt = "_standard_1ndou_39", $t = "_small_1ndou_51", M = {
|
|
58
|
+
checkbox: vt,
|
|
59
|
+
standard: Rt,
|
|
50
60
|
small: $t
|
|
51
|
-
}, jt =
|
|
61
|
+
}, jt = U(
|
|
52
62
|
({
|
|
53
63
|
indeterminate: t = !1,
|
|
54
64
|
onChange: e,
|
|
55
|
-
onValueChange:
|
|
56
|
-
value:
|
|
65
|
+
onValueChange: r,
|
|
66
|
+
value: n = !1,
|
|
57
67
|
size: c = "standard",
|
|
58
68
|
className: s,
|
|
59
|
-
...
|
|
69
|
+
...l
|
|
60
70
|
}, d) => {
|
|
61
|
-
const
|
|
62
|
-
|
|
71
|
+
const i = F(), p = (u) => {
|
|
72
|
+
i.current = u, i.current && (i.current.indeterminate = !!t), d && (typeof d == "function" ? d(u) : d.current = u);
|
|
63
73
|
}, _ = w(
|
|
64
74
|
(u) => {
|
|
65
|
-
e && e(u),
|
|
75
|
+
e && e(u), r && r(u.target.checked);
|
|
66
76
|
},
|
|
67
|
-
[e,
|
|
77
|
+
[e, r]
|
|
68
78
|
);
|
|
69
|
-
return
|
|
70
|
-
|
|
71
|
-
}, [t,
|
|
79
|
+
return L(() => {
|
|
80
|
+
i.current && (i.current.indeterminate = !!t);
|
|
81
|
+
}, [t, i]), /* @__PURE__ */ o(
|
|
72
82
|
"input",
|
|
73
83
|
{
|
|
74
84
|
type: "checkbox",
|
|
75
|
-
className: b(
|
|
76
|
-
checked:
|
|
85
|
+
className: b(M.checkbox, M[c], s),
|
|
86
|
+
checked: n,
|
|
77
87
|
onChange: _,
|
|
78
88
|
ref: p,
|
|
79
|
-
...
|
|
89
|
+
...l
|
|
80
90
|
}
|
|
81
91
|
);
|
|
82
92
|
}
|
|
83
93
|
), We = ({
|
|
84
94
|
children: t,
|
|
85
95
|
label: e,
|
|
86
|
-
inputRef:
|
|
87
|
-
wrapperRef:
|
|
96
|
+
inputRef: r,
|
|
97
|
+
wrapperRef: n,
|
|
88
98
|
textColor: c,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
99
|
+
screenReaderLabel: s,
|
|
100
|
+
...l
|
|
101
|
+
}) => /* @__PURE__ */ o("div", { ref: n, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */ m(k, { alignItems: "center", children: [
|
|
102
|
+
/* @__PURE__ */ o(jt, { ...l, ref: r }),
|
|
92
103
|
/* @__PURE__ */ o(y, {}),
|
|
93
|
-
|
|
104
|
+
s ? /* @__PURE__ */ o(R, { children: s }) : null,
|
|
105
|
+
/* @__PURE__ */ o(
|
|
106
|
+
$,
|
|
107
|
+
{
|
|
108
|
+
color: c,
|
|
109
|
+
"aria-hidden": !!s,
|
|
110
|
+
userSelect: "none",
|
|
111
|
+
children: e
|
|
112
|
+
}
|
|
113
|
+
),
|
|
94
114
|
t
|
|
95
|
-
] }) }) }), At = "_radiobutton_foy83_1", Ht = "_standard_foy83_45", Wt = "_small_foy83_55",
|
|
115
|
+
] }) }) }), At = "_radiobutton_foy83_1", Ht = "_standard_foy83_45", Wt = "_small_foy83_55", z = {
|
|
96
116
|
radiobutton: At,
|
|
97
117
|
standard: Ht,
|
|
98
118
|
small: Wt
|
|
99
|
-
}, J =
|
|
119
|
+
}, J = U(
|
|
100
120
|
({
|
|
101
121
|
onChange: t,
|
|
102
122
|
onValueChange: e,
|
|
103
|
-
size:
|
|
104
|
-
name:
|
|
123
|
+
size: r = "standard",
|
|
124
|
+
name: n,
|
|
105
125
|
className: c,
|
|
106
126
|
...s
|
|
107
|
-
},
|
|
127
|
+
}, l) => {
|
|
108
128
|
const d = w(
|
|
109
|
-
(
|
|
110
|
-
t && t(
|
|
129
|
+
(i) => {
|
|
130
|
+
t && t(i), e && e(i.target.value);
|
|
111
131
|
},
|
|
112
132
|
[t, e]
|
|
113
133
|
);
|
|
@@ -115,47 +135,47 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
115
135
|
"input",
|
|
116
136
|
{
|
|
117
137
|
type: "radio",
|
|
118
|
-
name:
|
|
119
|
-
className: b(
|
|
138
|
+
name: n,
|
|
139
|
+
className: b(z.radiobutton, z[r], c),
|
|
120
140
|
onChange: d,
|
|
121
|
-
ref:
|
|
141
|
+
ref: l,
|
|
122
142
|
...s
|
|
123
143
|
}
|
|
124
144
|
);
|
|
125
145
|
}
|
|
126
|
-
),
|
|
127
|
-
radioButtonBox:
|
|
128
|
-
medium:
|
|
129
|
-
large:
|
|
130
|
-
danger:
|
|
131
|
-
radioButtonWrapper:
|
|
132
|
-
},
|
|
146
|
+
), Pt = "_radioButtonBox_yl38n_1", Ut = "_medium_yl38n_14", Ft = "_large_yl38n_19", Kt = "_danger_yl38n_28", Mt = "_radioButtonWrapper_yl38n_39", A = {
|
|
147
|
+
radioButtonBox: Pt,
|
|
148
|
+
medium: Ut,
|
|
149
|
+
large: Ft,
|
|
150
|
+
danger: Kt,
|
|
151
|
+
radioButtonWrapper: Mt
|
|
152
|
+
}, Pe = ({
|
|
133
153
|
label: t,
|
|
134
154
|
screenReaderLabel: e,
|
|
135
|
-
variant:
|
|
136
|
-
size:
|
|
155
|
+
variant: r = "normal",
|
|
156
|
+
size: n = "medium",
|
|
137
157
|
className: c,
|
|
138
158
|
icon: s,
|
|
139
|
-
contentRight:
|
|
159
|
+
contentRight: l,
|
|
140
160
|
style: d,
|
|
141
|
-
radioButtonClassName:
|
|
161
|
+
radioButtonClassName: i,
|
|
142
162
|
...p
|
|
143
163
|
}) => /* @__PURE__ */ o(
|
|
144
164
|
"label",
|
|
145
165
|
{
|
|
146
166
|
className: b(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
167
|
+
A.radioButtonBox,
|
|
168
|
+
A[r],
|
|
169
|
+
A[n],
|
|
150
170
|
c
|
|
151
171
|
),
|
|
152
172
|
style: d,
|
|
153
173
|
children: /* @__PURE__ */ m(k, { justifyContent: "space-between", flexGrow: 1, children: [
|
|
154
174
|
/* @__PURE__ */ m(k, { alignItems: "center", children: [
|
|
155
|
-
/* @__PURE__ */ o(J, { ...p, className:
|
|
175
|
+
/* @__PURE__ */ o(J, { ...p, className: i }),
|
|
156
176
|
/* @__PURE__ */ o(y, {}),
|
|
157
|
-
e ? /* @__PURE__ */ o(
|
|
158
|
-
/* @__PURE__ */ o(
|
|
177
|
+
e ? /* @__PURE__ */ o(R, { children: e }) : null,
|
|
178
|
+
/* @__PURE__ */ o($, { "aria-hidden": !!e, children: t })
|
|
159
179
|
] }),
|
|
160
180
|
/* @__PURE__ */ m(
|
|
161
181
|
k,
|
|
@@ -165,89 +185,99 @@ const Bt = "_knob_1d6s8_56", Tt = "_filler_1d6s8_61", kt = "_checked_1d6s8_75",
|
|
|
165
185
|
justifyContent: "center",
|
|
166
186
|
children: [
|
|
167
187
|
s && /* @__PURE__ */ o(D, { icon: s, size: 24 }),
|
|
168
|
-
!s &&
|
|
188
|
+
!s && l
|
|
169
189
|
]
|
|
170
190
|
}
|
|
171
191
|
)
|
|
172
192
|
] })
|
|
173
193
|
}
|
|
174
|
-
),
|
|
194
|
+
), Ue = ({
|
|
175
195
|
label: t,
|
|
176
196
|
inputRef: e,
|
|
177
|
-
wrapperRef:
|
|
178
|
-
textColor:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
197
|
+
wrapperRef: r,
|
|
198
|
+
textColor: n,
|
|
199
|
+
screenReaderLabel: c,
|
|
200
|
+
...s
|
|
201
|
+
}) => /* @__PURE__ */ o("div", { ref: r, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */ m(k, { alignItems: "center", children: [
|
|
202
|
+
/* @__PURE__ */ o(J, { ref: e, ...s }),
|
|
182
203
|
/* @__PURE__ */ o(y, {}),
|
|
183
|
-
/* @__PURE__ */ o(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
204
|
+
c ? /* @__PURE__ */ o(R, { children: c }) : null,
|
|
205
|
+
/* @__PURE__ */ o(
|
|
206
|
+
$,
|
|
207
|
+
{
|
|
208
|
+
color: n,
|
|
209
|
+
"aria-hidden": !!c,
|
|
210
|
+
userSelect: "none",
|
|
211
|
+
children: t
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
] }) }) }), zt = (t, e, r, n, c, s, l, d) => {
|
|
215
|
+
const i = F(!1), p = (a) => {
|
|
216
|
+
i.current || s == null || s(a.target.value ?? ""), l == null || l(a);
|
|
187
217
|
}, _ = (a) => {
|
|
188
|
-
|
|
218
|
+
i.current = !1, d == null || d(a);
|
|
189
219
|
};
|
|
190
220
|
return {
|
|
191
221
|
onKeyDownHandler: w(
|
|
192
222
|
(a) => {
|
|
193
223
|
const { key: f } = a;
|
|
194
224
|
if (f === "Enter")
|
|
195
|
-
|
|
225
|
+
i.current = !0, r == null || r(), s == null || s(a.currentTarget.value ?? "");
|
|
196
226
|
else if (f === "Escape")
|
|
197
|
-
|
|
227
|
+
i.current = !0, n == null || n(), a.preventDefault(), a.stopPropagation();
|
|
198
228
|
else if (c) {
|
|
199
229
|
const h = (x, I) => {
|
|
200
|
-
|
|
230
|
+
i.current = !0, t.current.blur(), c(x), I.preventDefault(), I.stopPropagation();
|
|
201
231
|
};
|
|
202
232
|
a.shiftKey && f === "Tab" ? h("left", a) : f === "Tab" ? h("right", a) : f === "ArrowUp" ? h("up", a) : f === "ArrowDown" ? h("down", a) : f === "ArrowRight" ? t.current.value.length === t.current.selectionStart && h("right", a) : f === "ArrowLeft" && t.current.selectionStart === 0 && h("left", a);
|
|
203
233
|
}
|
|
204
234
|
e && e(a);
|
|
205
235
|
},
|
|
206
|
-
[
|
|
236
|
+
[n, c, e, t, r, s]
|
|
207
237
|
),
|
|
208
238
|
onBlurHandler: p,
|
|
209
239
|
onFocusHandler: _
|
|
210
240
|
};
|
|
211
241
|
};
|
|
212
|
-
function
|
|
242
|
+
function Lt(t) {
|
|
213
243
|
return t.tagName === "TEXTAREA" || t.tagName === "INPUT" && (t.type === "text" || t.type === "search" || t.type === "url" || t.type === "tel" || t.type === "password");
|
|
214
244
|
}
|
|
215
|
-
const Ot = (t, e,
|
|
216
|
-
|
|
217
|
-
t.current &&
|
|
245
|
+
const Ot = (t, e, r) => {
|
|
246
|
+
L(() => {
|
|
247
|
+
t.current && Lt(t.current) && (r ? t.current.setSelectionRange(0, t.current.value.length) : e && t.current.setSelectionRange(
|
|
218
248
|
t.current.value.length,
|
|
219
249
|
t.current.value.length
|
|
220
250
|
));
|
|
221
|
-
}, [e, t,
|
|
251
|
+
}, [e, t, r]);
|
|
222
252
|
}, Dt = (t, {
|
|
223
253
|
onEnter: e,
|
|
224
|
-
onEsc:
|
|
225
|
-
onChange:
|
|
254
|
+
onEsc: r,
|
|
255
|
+
onChange: n,
|
|
226
256
|
onValueChange: c,
|
|
227
257
|
selectAllOnMount: s,
|
|
228
|
-
moveCursorToEndOnMount:
|
|
258
|
+
moveCursorToEndOnMount: l,
|
|
229
259
|
onDone: d,
|
|
230
|
-
onMove:
|
|
260
|
+
onMove: i,
|
|
231
261
|
onFocus: p,
|
|
232
262
|
onBlur: _,
|
|
233
263
|
onKeyDown: u,
|
|
234
264
|
autoFocus: a
|
|
235
265
|
}) => {
|
|
236
|
-
Ot(t, !!
|
|
237
|
-
const { onKeyDownHandler: f, onFocusHandler: h, onBlurHandler: x } =
|
|
266
|
+
Ot(t, !!l, !!s);
|
|
267
|
+
const { onKeyDownHandler: f, onFocusHandler: h, onBlurHandler: x } = zt(
|
|
238
268
|
t,
|
|
239
269
|
u,
|
|
240
270
|
e,
|
|
241
|
-
|
|
242
|
-
|
|
271
|
+
r,
|
|
272
|
+
i,
|
|
243
273
|
d,
|
|
244
274
|
_,
|
|
245
275
|
p
|
|
246
276
|
), I = w(
|
|
247
277
|
(B) => {
|
|
248
|
-
|
|
278
|
+
n == null || n(B), c == null || c(B.target.value);
|
|
249
279
|
},
|
|
250
|
-
[
|
|
280
|
+
[n, c]
|
|
251
281
|
);
|
|
252
282
|
return {
|
|
253
283
|
onBlur: x,
|
|
@@ -269,44 +299,44 @@ const Ot = (t, e, n) => {
|
|
|
269
299
|
warning: Vt,
|
|
270
300
|
hideBorder: te,
|
|
271
301
|
clickable: ee
|
|
272
|
-
},
|
|
302
|
+
}, j = ({
|
|
273
303
|
button: t,
|
|
274
304
|
icon: e,
|
|
275
|
-
iconClassName:
|
|
276
|
-
content:
|
|
305
|
+
iconClassName: r,
|
|
306
|
+
content: n,
|
|
277
307
|
spaceOnLeft: c,
|
|
278
308
|
spaceOnRight: s,
|
|
279
|
-
disableContentPadding:
|
|
309
|
+
disableContentPadding: l,
|
|
280
310
|
disableContentPaddingLeft: d,
|
|
281
|
-
disableContentPaddingRight:
|
|
282
|
-
}) => !
|
|
311
|
+
disableContentPaddingRight: i
|
|
312
|
+
}) => !n && !e && !t ? null : t ? /* @__PURE__ */ m(N, { children: [
|
|
283
313
|
c ? /* @__PURE__ */ o(y, { num: 0.25 }) : null,
|
|
284
314
|
t,
|
|
285
315
|
s ? /* @__PURE__ */ o(y, { num: 0.25 }) : null
|
|
286
|
-
] }) :
|
|
287
|
-
c && !(
|
|
288
|
-
|
|
289
|
-
s && !(
|
|
290
|
-
] }) : /* @__PURE__ */ m(
|
|
316
|
+
] }) : n ? /* @__PURE__ */ m(N, { children: [
|
|
317
|
+
c && !(l || d) ? /* @__PURE__ */ o(y, {}) : null,
|
|
318
|
+
n || null,
|
|
319
|
+
s && !(l || i) ? /* @__PURE__ */ o(y, {}) : null
|
|
320
|
+
] }) : /* @__PURE__ */ m(N, { children: [
|
|
291
321
|
c ? /* @__PURE__ */ o(y, {}) : null,
|
|
292
322
|
e && /* @__PURE__ */ o(
|
|
293
323
|
It,
|
|
294
324
|
{
|
|
295
325
|
icon: e,
|
|
296
|
-
className: b(g.icon,
|
|
326
|
+
className: b(g.icon, r)
|
|
297
327
|
}
|
|
298
328
|
),
|
|
299
329
|
s ? /* @__PURE__ */ o(y, {}) : null
|
|
300
330
|
] }), Q = (t) => {
|
|
301
331
|
const {
|
|
302
332
|
variant: e = "standard",
|
|
303
|
-
inputRef:
|
|
304
|
-
disabled:
|
|
333
|
+
inputRef: r,
|
|
334
|
+
disabled: n,
|
|
305
335
|
className: c,
|
|
306
336
|
buttonLeft: s,
|
|
307
|
-
buttonRight:
|
|
337
|
+
buttonRight: l,
|
|
308
338
|
contentLeft: d,
|
|
309
|
-
contentRight:
|
|
339
|
+
contentRight: i,
|
|
310
340
|
disableContentPadding: p,
|
|
311
341
|
disableContentPaddingLeft: _,
|
|
312
342
|
disableContentPaddingRight: u,
|
|
@@ -321,27 +351,27 @@ const Ot = (t, e, n) => {
|
|
|
321
351
|
onDone: V,
|
|
322
352
|
onEnter: tt,
|
|
323
353
|
onEsc: et,
|
|
324
|
-
onMove:
|
|
325
|
-
onChange:
|
|
354
|
+
onMove: nt,
|
|
355
|
+
onChange: rt,
|
|
326
356
|
onKeyDown: ot,
|
|
327
357
|
hideBorder: ct,
|
|
328
358
|
onFocus: st,
|
|
329
359
|
onBlur: lt,
|
|
330
360
|
...it
|
|
331
|
-
} = t, dt =
|
|
361
|
+
} = t, dt = F(null), K = r ?? dt, at = Dt(K, {
|
|
332
362
|
onEnter: tt,
|
|
333
363
|
onEsc: et,
|
|
334
|
-
onChange:
|
|
364
|
+
onChange: rt,
|
|
335
365
|
onValueChange: B,
|
|
336
366
|
selectAllOnMount: x,
|
|
337
367
|
moveCursorToEndOnMount: h,
|
|
338
368
|
onDone: V,
|
|
339
|
-
onMove:
|
|
369
|
+
onMove: nt,
|
|
340
370
|
onFocus: st,
|
|
341
371
|
onBlur: lt,
|
|
342
372
|
onKeyDown: ot,
|
|
343
373
|
autoFocus: I
|
|
344
|
-
}), ut = e === "success" ? E : e === "warning" || e === "error" ? G : f, _t = e === "loading" ? /* @__PURE__ */ o(X, {}) :
|
|
374
|
+
}), ut = e === "success" ? E : e === "warning" || e === "error" ? G : f, _t = e === "loading" ? /* @__PURE__ */ o(X, {}) : i;
|
|
345
375
|
return /* @__PURE__ */ m(
|
|
346
376
|
"div",
|
|
347
377
|
{
|
|
@@ -349,7 +379,7 @@ const Ot = (t, e, n) => {
|
|
|
349
379
|
g.textInput,
|
|
350
380
|
g[e],
|
|
351
381
|
{
|
|
352
|
-
[g.disabled]:
|
|
382
|
+
[g.disabled]: n
|
|
353
383
|
},
|
|
354
384
|
{
|
|
355
385
|
[g.hideBorder]: ct
|
|
@@ -359,7 +389,7 @@ const Ot = (t, e, n) => {
|
|
|
359
389
|
style: C,
|
|
360
390
|
children: [
|
|
361
391
|
/* @__PURE__ */ o(
|
|
362
|
-
|
|
392
|
+
j,
|
|
363
393
|
{
|
|
364
394
|
content: d,
|
|
365
395
|
disableContentPadding: p,
|
|
@@ -375,15 +405,15 @@ const Ot = (t, e, n) => {
|
|
|
375
405
|
{
|
|
376
406
|
className: b(g.input, c),
|
|
377
407
|
type: "text",
|
|
378
|
-
disabled:
|
|
379
|
-
ref:
|
|
408
|
+
disabled: n,
|
|
409
|
+
ref: K,
|
|
380
410
|
autoFocus: I,
|
|
381
411
|
...it,
|
|
382
412
|
...at
|
|
383
413
|
}
|
|
384
414
|
),
|
|
385
415
|
/* @__PURE__ */ o(
|
|
386
|
-
|
|
416
|
+
j,
|
|
387
417
|
{
|
|
388
418
|
content: _t,
|
|
389
419
|
disableContentPadding: p,
|
|
@@ -391,161 +421,161 @@ const Ot = (t, e, n) => {
|
|
|
391
421
|
disableContentPaddingRight: u,
|
|
392
422
|
icon: ut,
|
|
393
423
|
spaceOnRight: !0,
|
|
394
|
-
button:
|
|
424
|
+
button: l
|
|
395
425
|
}
|
|
396
426
|
)
|
|
397
427
|
]
|
|
398
428
|
}
|
|
399
429
|
);
|
|
400
|
-
},
|
|
401
|
-
numericTextInputInput:
|
|
430
|
+
}, ne = "_numericTextInputInput_1tnr6_1", re = {
|
|
431
|
+
numericTextInputInput: ne
|
|
402
432
|
}, oe = ({
|
|
403
433
|
onValueChange: t,
|
|
404
434
|
value: e,
|
|
405
|
-
numSteps:
|
|
406
|
-
min:
|
|
435
|
+
numSteps: r,
|
|
436
|
+
min: n,
|
|
407
437
|
max: c
|
|
408
438
|
}) => {
|
|
409
439
|
if (t)
|
|
410
440
|
if (!e)
|
|
411
|
-
t(String(
|
|
441
|
+
t(String(W(r, n, c)));
|
|
412
442
|
else {
|
|
413
|
-
const
|
|
414
|
-
t(String(
|
|
443
|
+
const l = (P(e) || 0) + r;
|
|
444
|
+
t(String(W(l, n, c)));
|
|
415
445
|
}
|
|
416
446
|
}, ce = ({
|
|
417
447
|
onValueChange: t,
|
|
418
448
|
newValue: e,
|
|
419
|
-
min:
|
|
420
|
-
max:
|
|
449
|
+
min: r,
|
|
450
|
+
max: n
|
|
421
451
|
}) => {
|
|
422
452
|
if (t)
|
|
423
453
|
if (e === "")
|
|
424
454
|
t("");
|
|
425
455
|
else {
|
|
426
|
-
const s =
|
|
427
|
-
t(String(
|
|
456
|
+
const s = P(e) || 0;
|
|
457
|
+
t(String(W(s, r, n)));
|
|
428
458
|
}
|
|
429
|
-
},
|
|
430
|
-
let
|
|
431
|
-
return e != null && (
|
|
432
|
-
},
|
|
459
|
+
}, W = (t, e, r) => {
|
|
460
|
+
let n = t;
|
|
461
|
+
return e != null && (n = Math.max(e, n)), r != null && (n = Math.min(r, n)), n;
|
|
462
|
+
}, Fe = ({
|
|
433
463
|
value: t,
|
|
434
464
|
onValueChange: e,
|
|
435
|
-
max:
|
|
436
|
-
min:
|
|
465
|
+
max: r,
|
|
466
|
+
min: n,
|
|
437
467
|
step: c = 1,
|
|
438
468
|
contentRight: s,
|
|
439
|
-
disabled:
|
|
469
|
+
disabled: l,
|
|
440
470
|
className: d,
|
|
441
|
-
hideButtons:
|
|
471
|
+
hideButtons: i,
|
|
442
472
|
...p
|
|
443
473
|
}) => {
|
|
444
474
|
const _ = w(
|
|
445
475
|
(f) => {
|
|
446
|
-
oe({ onValueChange: e, value: t, numSteps: f, min:
|
|
476
|
+
oe({ onValueChange: e, value: t, numSteps: f, min: n, max: r });
|
|
447
477
|
},
|
|
448
|
-
[t,
|
|
478
|
+
[t, r, n, e]
|
|
449
479
|
), u = w(
|
|
450
480
|
(f) => {
|
|
451
|
-
ce({ onValueChange: e, newValue: f, min:
|
|
481
|
+
ce({ onValueChange: e, newValue: f, min: n, max: r });
|
|
452
482
|
},
|
|
453
|
-
[
|
|
483
|
+
[r, n, e]
|
|
454
484
|
);
|
|
455
485
|
return /* @__PURE__ */ o(
|
|
456
486
|
Q,
|
|
457
487
|
{
|
|
458
|
-
contentRight:
|
|
459
|
-
s && /* @__PURE__ */ m(
|
|
488
|
+
contentRight: i ? s : /* @__PURE__ */ m(N, { children: [
|
|
489
|
+
s && /* @__PURE__ */ m(N, { children: [
|
|
460
490
|
s,
|
|
461
491
|
/* @__PURE__ */ o(y, {})
|
|
462
492
|
] }),
|
|
463
493
|
/* @__PURE__ */ o(
|
|
464
494
|
yt,
|
|
465
495
|
{
|
|
466
|
-
onClickUp:
|
|
467
|
-
onClickDown:
|
|
496
|
+
onClickUp: l ? void 0 : () => _(c),
|
|
497
|
+
onClickDown: l ? void 0 : () => _(-c),
|
|
468
498
|
iconColor: "var(--swui-textinput-text-color)",
|
|
469
|
-
disabled:
|
|
499
|
+
disabled: l
|
|
470
500
|
}
|
|
471
501
|
)
|
|
472
502
|
] }),
|
|
473
503
|
value: t,
|
|
474
504
|
onValueChange: u,
|
|
475
|
-
disableContentPaddingRight: !
|
|
505
|
+
disableContentPaddingRight: !i,
|
|
476
506
|
type: "number",
|
|
477
|
-
min:
|
|
478
|
-
max:
|
|
507
|
+
min: n,
|
|
508
|
+
max: r,
|
|
479
509
|
step: c,
|
|
480
|
-
className: b(
|
|
481
|
-
disabled:
|
|
510
|
+
className: b(re.numericTextInputInput, d),
|
|
511
|
+
disabled: l,
|
|
482
512
|
...p
|
|
483
513
|
}
|
|
484
514
|
);
|
|
485
|
-
},
|
|
486
|
-
const
|
|
515
|
+
}, Ke = (t, e) => {
|
|
516
|
+
const r = w(
|
|
487
517
|
(c) => {
|
|
488
518
|
if (e)
|
|
489
519
|
if (!c)
|
|
490
520
|
e(void 0);
|
|
491
521
|
else {
|
|
492
|
-
const s =
|
|
522
|
+
const s = P(c);
|
|
493
523
|
s !== void 0 && e(s);
|
|
494
524
|
}
|
|
495
525
|
},
|
|
496
526
|
[e]
|
|
497
|
-
),
|
|
527
|
+
), n = ht(() => t === void 0 ? "" : String(t), [t]);
|
|
498
528
|
return {
|
|
499
|
-
onValueChange:
|
|
500
|
-
value:
|
|
529
|
+
onValueChange: r,
|
|
530
|
+
value: n
|
|
501
531
|
};
|
|
502
|
-
},
|
|
532
|
+
}, Me = ({
|
|
503
533
|
hiddenIcon: t = xt,
|
|
504
534
|
visibleIcon: e = gt,
|
|
505
|
-
...
|
|
535
|
+
...r
|
|
506
536
|
}) => {
|
|
507
|
-
const [
|
|
537
|
+
const [n, c] = bt(!0);
|
|
508
538
|
return /* @__PURE__ */ o(
|
|
509
539
|
Q,
|
|
510
540
|
{
|
|
511
541
|
buttonRight: /* @__PURE__ */ o(
|
|
512
|
-
|
|
542
|
+
H,
|
|
513
543
|
{
|
|
514
|
-
icon:
|
|
544
|
+
icon: n ? t : e,
|
|
515
545
|
onClick: () => c((s) => !s)
|
|
516
546
|
}
|
|
517
547
|
),
|
|
518
|
-
type:
|
|
519
|
-
...
|
|
548
|
+
type: n ? "password" : "text",
|
|
549
|
+
...r
|
|
520
550
|
}
|
|
521
551
|
);
|
|
522
552
|
}, se = ({
|
|
523
553
|
disabled: t,
|
|
524
554
|
text: e,
|
|
525
|
-
...
|
|
555
|
+
...r
|
|
526
556
|
}) => /* @__PURE__ */ o(
|
|
527
|
-
|
|
557
|
+
$,
|
|
528
558
|
{
|
|
529
559
|
variant: "bold",
|
|
530
560
|
color: q(t ? "--silver" : "--tjara"),
|
|
531
561
|
size: "small",
|
|
532
|
-
...ft(
|
|
562
|
+
...ft(r),
|
|
533
563
|
children: e
|
|
534
564
|
}
|
|
535
565
|
), Y = ({
|
|
536
566
|
htmlFor: t,
|
|
537
567
|
screenReaderLabel: e,
|
|
538
|
-
label:
|
|
539
|
-
disabled:
|
|
568
|
+
label: r,
|
|
569
|
+
disabled: n,
|
|
540
570
|
className: c
|
|
541
571
|
}) => /* @__PURE__ */ m("label", { htmlFor: t, className: c, children: [
|
|
542
|
-
e ? /* @__PURE__ */ o(
|
|
572
|
+
e ? /* @__PURE__ */ o(R, { children: e }) : null,
|
|
543
573
|
/* @__PURE__ */ o(
|
|
544
574
|
se,
|
|
545
575
|
{
|
|
546
576
|
"aria-hidden": !!e,
|
|
547
|
-
text:
|
|
548
|
-
disabled:
|
|
577
|
+
text: r,
|
|
578
|
+
disabled: n
|
|
549
579
|
}
|
|
550
580
|
)
|
|
551
581
|
] }), le = "_labelledSelect_1evxo_1", ie = "_onlyTopBorder_1evxo_8", de = "_onlyBottomBorder_1evxo_14", ae = "_error_1evxo_19", ue = "_normal_1evxo_24", _e = "_label_1evxo_1", pe = "_select_1evxo_48", fe = "_iconWrapper_1evxo_73", T = {
|
|
@@ -557,18 +587,18 @@ const Ot = (t, e, n) => {
|
|
|
557
587
|
label: _e,
|
|
558
588
|
select: pe,
|
|
559
589
|
iconWrapper: fe
|
|
560
|
-
},
|
|
590
|
+
}, ze = ({
|
|
561
591
|
onChange: t,
|
|
562
592
|
onValueChange: e,
|
|
563
|
-
id:
|
|
564
|
-
label:
|
|
593
|
+
id: r,
|
|
594
|
+
label: n,
|
|
565
595
|
screenReaderLabel: c,
|
|
566
596
|
borderVariant: s = "normalBorder",
|
|
567
|
-
variant:
|
|
597
|
+
variant: l = "normal",
|
|
568
598
|
children: d,
|
|
569
|
-
...
|
|
599
|
+
...i
|
|
570
600
|
}) => {
|
|
571
|
-
const p = O(), _ =
|
|
601
|
+
const p = O(), _ = r ?? p, u = w(
|
|
572
602
|
(a) => {
|
|
573
603
|
t == null || t(a), e == null || e(a.target.value);
|
|
574
604
|
},
|
|
@@ -579,7 +609,7 @@ const Ot = (t, e, n) => {
|
|
|
579
609
|
{
|
|
580
610
|
className: b(
|
|
581
611
|
T.labelledSelect,
|
|
582
|
-
T[
|
|
612
|
+
T[l],
|
|
583
613
|
T[s]
|
|
584
614
|
),
|
|
585
615
|
children: [
|
|
@@ -588,7 +618,7 @@ const Ot = (t, e, n) => {
|
|
|
588
618
|
{
|
|
589
619
|
htmlFor: _,
|
|
590
620
|
className: T.label,
|
|
591
|
-
label:
|
|
621
|
+
label: n,
|
|
592
622
|
screenReaderLabel: c
|
|
593
623
|
}
|
|
594
624
|
),
|
|
@@ -597,8 +627,8 @@ const Ot = (t, e, n) => {
|
|
|
597
627
|
{
|
|
598
628
|
id: _,
|
|
599
629
|
onChange: u,
|
|
600
|
-
className: b(T.select, T[
|
|
601
|
-
...
|
|
630
|
+
className: b(T.select, T[l]),
|
|
631
|
+
...i,
|
|
602
632
|
children: d
|
|
603
633
|
}
|
|
604
634
|
),
|
|
@@ -613,7 +643,7 @@ const Ot = (t, e, n) => {
|
|
|
613
643
|
]
|
|
614
644
|
}
|
|
615
645
|
);
|
|
616
|
-
}, me = "_labelledTextInput_1wih5_1", he = "_onlyTop_1wih5_21", be = "_onlyBottom_1wih5_27", ye = "_onlyLeft_1wih5_32", xe = "_onlyRight_1wih5_38", ge = "_disabled_1wih5_53", we = "_medium_1wih5_61", Ie = "_large_1wih5_73", Be = "_error_1wih5_87",
|
|
646
|
+
}, me = "_labelledTextInput_1wih5_1", he = "_onlyTop_1wih5_21", be = "_onlyBottom_1wih5_27", ye = "_onlyLeft_1wih5_32", xe = "_onlyRight_1wih5_38", ge = "_disabled_1wih5_53", we = "_medium_1wih5_61", Ie = "_large_1wih5_73", Be = "_error_1wih5_87", S = {
|
|
617
647
|
labelledTextInput: me,
|
|
618
648
|
onlyTop: he,
|
|
619
649
|
onlyBottom: be,
|
|
@@ -623,37 +653,37 @@ const Ot = (t, e, n) => {
|
|
|
623
653
|
medium: we,
|
|
624
654
|
large: Ie,
|
|
625
655
|
error: Be
|
|
626
|
-
},
|
|
656
|
+
}, Le = mt.forwardRef(
|
|
627
657
|
({
|
|
628
658
|
autoComplete: t = "off",
|
|
629
659
|
label: e,
|
|
630
|
-
id:
|
|
631
|
-
screenReaderLabel:
|
|
660
|
+
id: r,
|
|
661
|
+
screenReaderLabel: n,
|
|
632
662
|
size: c = "medium",
|
|
633
663
|
value: s,
|
|
634
|
-
onChange:
|
|
664
|
+
onChange: l,
|
|
635
665
|
disabled: d,
|
|
636
|
-
onValueChange:
|
|
666
|
+
onValueChange: i,
|
|
637
667
|
borderRadiusVariant: p = "normalBorder",
|
|
638
668
|
variant: _ = "normal",
|
|
639
669
|
width: u,
|
|
640
670
|
...a
|
|
641
671
|
}, f) => {
|
|
642
|
-
const h = O(), x =
|
|
672
|
+
const h = O(), x = r ?? h, I = w(
|
|
643
673
|
(B) => {
|
|
644
|
-
|
|
674
|
+
l == null || l(B), i == null || i(B.target.value);
|
|
645
675
|
},
|
|
646
|
-
[
|
|
676
|
+
[l, i]
|
|
647
677
|
);
|
|
648
678
|
return /* @__PURE__ */ m(
|
|
649
679
|
"div",
|
|
650
680
|
{
|
|
651
681
|
className: b(
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
d &&
|
|
682
|
+
S.labelledTextInput,
|
|
683
|
+
S[_],
|
|
684
|
+
S[p],
|
|
685
|
+
S[c],
|
|
686
|
+
d && S.disabled
|
|
657
687
|
),
|
|
658
688
|
style: u ? { width: u } : void 0,
|
|
659
689
|
children: [
|
|
@@ -661,7 +691,7 @@ const Ot = (t, e, n) => {
|
|
|
661
691
|
Y,
|
|
662
692
|
{
|
|
663
693
|
htmlFor: x,
|
|
664
|
-
screenReaderLabel:
|
|
694
|
+
screenReaderLabel: n,
|
|
665
695
|
label: e
|
|
666
696
|
}
|
|
667
697
|
),
|
|
@@ -685,13 +715,13 @@ const Ot = (t, e, n) => {
|
|
|
685
715
|
), Oe = ({
|
|
686
716
|
variant: t = "standard",
|
|
687
717
|
disabled: e,
|
|
688
|
-
wrapperClassName:
|
|
689
|
-
wrapperStyle:
|
|
718
|
+
wrapperClassName: r,
|
|
719
|
+
wrapperStyle: n,
|
|
690
720
|
contentLeft: c,
|
|
691
721
|
contentRight: s,
|
|
692
|
-
disableContentPadding:
|
|
722
|
+
disableContentPadding: l,
|
|
693
723
|
disableContentPaddingLeft: d,
|
|
694
|
-
disableContentPaddingRight:
|
|
724
|
+
disableContentPaddingRight: i,
|
|
695
725
|
iconRight: p,
|
|
696
726
|
iconLeft: _,
|
|
697
727
|
onClickLeft: u,
|
|
@@ -709,31 +739,31 @@ const Ot = (t, e, n) => {
|
|
|
709
739
|
{
|
|
710
740
|
[g.disabled]: e
|
|
711
741
|
},
|
|
712
|
-
|
|
742
|
+
r
|
|
713
743
|
),
|
|
714
|
-
style:
|
|
744
|
+
style: n,
|
|
715
745
|
children: [
|
|
716
746
|
/* @__PURE__ */ o(
|
|
717
|
-
|
|
747
|
+
j,
|
|
718
748
|
{
|
|
719
749
|
content: c,
|
|
720
|
-
disableContentPadding:
|
|
750
|
+
disableContentPadding: l,
|
|
721
751
|
disableContentPaddingLeft: d,
|
|
722
|
-
disableContentPaddingRight:
|
|
752
|
+
disableContentPaddingRight: i,
|
|
723
753
|
spaceOnLeft: !0,
|
|
724
|
-
button: _ ? /* @__PURE__ */ o(
|
|
754
|
+
button: _ ? /* @__PURE__ */ o(H, { onClick: u, icon: _ }) : void 0
|
|
725
755
|
}
|
|
726
756
|
),
|
|
727
757
|
/* @__PURE__ */ o(k, { alignItems: "center", children: f }),
|
|
728
758
|
/* @__PURE__ */ o(
|
|
729
|
-
|
|
759
|
+
j,
|
|
730
760
|
{
|
|
731
761
|
content: x,
|
|
732
|
-
disableContentPadding:
|
|
762
|
+
disableContentPadding: l,
|
|
733
763
|
disableContentPaddingLeft: d,
|
|
734
|
-
disableContentPaddingRight:
|
|
764
|
+
disableContentPaddingRight: i,
|
|
735
765
|
spaceOnRight: !0,
|
|
736
|
-
button: h ? /* @__PURE__ */ o(
|
|
766
|
+
button: h ? /* @__PURE__ */ o(H, { onClick: a, icon: h }) : void 0
|
|
737
767
|
}
|
|
738
768
|
)
|
|
739
769
|
]
|
|
@@ -741,36 +771,36 @@ const Ot = (t, e, n) => {
|
|
|
741
771
|
);
|
|
742
772
|
}, Te = "_textArea_6n6nc_1", ke = {
|
|
743
773
|
textArea: Te
|
|
744
|
-
}, De =
|
|
774
|
+
}, De = U(
|
|
745
775
|
({
|
|
746
776
|
className: t,
|
|
747
777
|
value: e,
|
|
748
|
-
onValueChange:
|
|
749
|
-
onChange:
|
|
778
|
+
onValueChange: r,
|
|
779
|
+
onChange: n,
|
|
750
780
|
resize: c = "none",
|
|
751
781
|
readOnly: s = !1,
|
|
752
|
-
rows:
|
|
782
|
+
rows: l,
|
|
753
783
|
disabled: d,
|
|
754
|
-
...
|
|
784
|
+
...i
|
|
755
785
|
}, p) => {
|
|
756
786
|
const _ = w(
|
|
757
787
|
(u) => {
|
|
758
|
-
|
|
788
|
+
n && n(u), r && r(u.target.value);
|
|
759
789
|
},
|
|
760
|
-
[
|
|
790
|
+
[n, r]
|
|
761
791
|
);
|
|
762
792
|
return /* @__PURE__ */ o(
|
|
763
793
|
"textarea",
|
|
764
794
|
{
|
|
765
795
|
disabled: d,
|
|
766
|
-
rows:
|
|
796
|
+
rows: l,
|
|
767
797
|
readOnly: s,
|
|
768
798
|
className: b(ke.textArea, t),
|
|
769
799
|
style: { resize: c },
|
|
770
800
|
onChange: _,
|
|
771
801
|
value: e,
|
|
772
802
|
ref: p,
|
|
773
|
-
...
|
|
803
|
+
...i
|
|
774
804
|
}
|
|
775
805
|
);
|
|
776
806
|
}
|
|
@@ -780,23 +810,23 @@ export {
|
|
|
780
810
|
We as CheckboxWithLabel,
|
|
781
811
|
Y as InputLabel,
|
|
782
812
|
se as InputLabelText,
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
813
|
+
ze as LabelledSelect,
|
|
814
|
+
Le as LabelledTextInput,
|
|
815
|
+
Fe as NumericTextInput,
|
|
816
|
+
Me as PasswordInput,
|
|
787
817
|
J as RadioButton,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
818
|
+
Pe as RadioButtonBox,
|
|
819
|
+
Ue as RadioButtonWithLabel,
|
|
820
|
+
Nt as Switch,
|
|
791
821
|
He as SwitchWithLabel,
|
|
792
822
|
De as TextArea,
|
|
793
823
|
Q as TextInput,
|
|
794
824
|
Oe as TextInputBox,
|
|
795
|
-
|
|
825
|
+
Lt as elementHasSelectionRange,
|
|
796
826
|
oe as onStepValueChange,
|
|
797
827
|
ce as onTextValueChange,
|
|
798
|
-
|
|
799
|
-
|
|
828
|
+
zt as useKeyboardNavigation,
|
|
829
|
+
Ke as useNumericInputValue,
|
|
800
830
|
Ot as useSelectAllOnMount,
|
|
801
831
|
Dt as useTextInput
|
|
802
832
|
};
|