@stenajs-webui/forms 17.13.2 → 17.13.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 +511 -642
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -1,686 +1,555 @@
|
|
|
1
|
-
(function(){ try {var elementStyle = document.createElement('style'); elementStyle.appendChild(document.createTextNode("._switch_ven48_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(--swui-primary-action-color);--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_ven48_1:focus{outline:0;border:1px solid var(--swui-switch-selected-highlight-color);box-shadow:inset var(--swui-switch-selected-highlight-color) 0 0 4px 0}._switch_ven48_1:hover{border:1px solid var(--swui-switch-selected-highlight-color)}._switch_ven48_1:disabled{cursor:default;background-color:var(--swui-switch-container-bg-color-disabled);border:1px solid var(--swui-switch-container-border-color-disabled)}._switch_ven48_1:disabled ._knob_ven48_52{background-color:var(--swui-switch-knob-bg-color-disabled)}._switch_ven48_1 ._filler_ven48_57{flex:none;transition:flex var(--swui-switch-animation-time)}._switch_ven48_1 ._knob_ven48_52{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_ven48_71{border:1px solid var(--swui-switch-selected-highlight-color);background-color:var(--swui-switch-selected-highlight-color)}._checked_ven48_71 ._filler_ven48_57{flex:1}._checkbox_pf7pg_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-field-border-color-disabled);--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(--swui-primary-action-color);--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-field-border-color-disabled );--swui-checkbox-checked-focus-shadow: var(--swui-field-focus-shadow-inverted);--swui-checkbox-unchecked-focus-shadow: var(--swui-field-focus-shadow);-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),box-shadow var(--swui-checkbox-animation-time);flex-shrink:0}._checkbox_pf7pg_1._standard_pf7pg_44{width:var(--swui-checkbox-height);height:var(--swui-checkbox-height)}._checkbox_pf7pg_1._standard_pf7pg_44:after{width:3px;height:6px;left:9px;top:6px}._checkbox_pf7pg_1._small_pf7pg_56{width:var(--swui-checkbox-height-small);height:var(--swui-checkbox-height-small)}._checkbox_pf7pg_1._small_pf7pg_56:after{width:3px;height:6px;left:5px;top:2px}._checkbox_pf7pg_1:after{content:\"\";display:block;position:absolute;transition:opacity var(--swui-checkbox-animation-time),width var(--swui-checkbox-animation-time),top var(--swui-checkbox-animation-time),-webkit-transform var(--swui-checkbox-animation-time) var(--d-t-e, ease);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);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),-webkit-transform var(--swui-checkbox-animation-time) var(--d-t-e, ease);border:2px solid var( --current-checkbox-icon-color, var(--swui-checkbox-unchecked-icon-color) );border-top:0;border-left:0;-webkit-transform:rotate(var(--current-check-rotation, 20deg));transform:rotate(var(--current-check-rotation, 20deg));box-sizing:content-box}._checkbox_pf7pg_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_pf7pg_1:checked:after{--current-checkbox-icon-color: var(--swui-checkbox-icon-color)}._checkbox_pf7pg_1:disabled:not(:checked){--current-bg-color: var(--swui-checkbox-disabled-bg-color);--current-border-color: var(--swui-checkbox-disabled-border-color)}._checkbox_pf7pg_1:disabled:not(:checked):after{--current-checkbox-icon-color: --swui-checkbox-unchecked-icon-color}._checkbox_pf7pg_1:disabled:checked{--current-bg-color: var(--swui-checkbox-disabled-checked-bg-color);--current-border-color: var(--swui-checkbox-disabled-border-color)}._checkbox_pf7pg_1:disabled:checked:after{--current-checkbox-icon-color: var(--swui-checkbox-disabled-icon-color)}._checkbox_pf7pg_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_pf7pg_1:indeterminate:after{--current-checkbox-icon-color: var(--swui-checkbox-icon-color);border-right:0;-webkit-transform:rotate(0deg);transform:rotate(0);width:6px}._checkbox_pf7pg_1:indeterminate._standard_pf7pg_44:after{top:4px;left:8px}._checkbox_pf7pg_1:indeterminate._small_pf7pg_56:after{top:0;left:4px}._checkbox_pf7pg_1:indeterminate:disabled:after{--current-checkbox-icon-color: var(--swui-checkbox-disabled-icon-color)}._checkbox_pf7pg_1:hover:not(:checked):not(:disabled){--current-border-color: var(--swui-checkbox-border-hover-color)}._checkbox_pf7pg_1:focus:checked{box-shadow:var(--swui-checkbox-checked-focus-shadow)}._checkbox_pf7pg_1:focus:not(:checked){box-shadow:var(--swui-checkbox-unchecked-focus-shadow)}._checkbox_pf7pg_1+label{font-size:1.4rem;line-height:var(--swui-checkbox-height);display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}._radiobutton_qxvf5_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-separator-color);--swui-radiobutton-unchecked-icon-color: var( --swui-field-indicator-inactive-color );--swui-radiobutton-checked-bg-color: var(--swui-primary-action-color);--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-field-border-color-disabled );--swui-radiobutton-checked-focus-shadow: var( --swui-field-focus-shadow-inverted );--swui-radiobutton-unchecked-focus-shadow: var(--swui-field-focus-shadow);-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),box-shadow var(--swui-radiobutton-animation-time)}._radiobutton_qxvf5_1._standard_qxvf5_51{height:var(--swui-radiobutton-size-standard);width:var(--swui-radiobutton-size-standard)}._radiobutton_qxvf5_1._standard_qxvf5_51:after{left:7px;top:7px}._radiobutton_qxvf5_1._small_qxvf5_61{height:var(--swui-radiobutton-size-small);width:var(--swui-radiobutton-size-small)}._radiobutton_qxvf5_1._small_qxvf5_61:after{left:3px;top:3px}._radiobutton_qxvf5_1:after{content:\"\";display:block;position:absolute;transition:opacity var(--current-opacity-time, var(--swui-radiobutton-animation-time)) var(--current-transform-type, ease),-webkit-transform var(--current-transform-time, var(--swui-radiobutton-animation-time)) var(--current-transform-type, ease);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);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),-webkit-transform var(--current-transform-time, var(--swui-radiobutton-animation-time)) var(--current-transform-type, ease);-webkit-transform:scale(var(--current-scale, 0));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_qxvf5_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_qxvf5_1:checked:after{--current-icon-color: var(--swui-radiobutton-icon-color)}._radiobutton_qxvf5_1:disabled{--current-bg-color: var(--swui-radiobutton-unchecked-disabled-bg-color);--current-border-color: var(--swui-radiobutton-disabled-border-color)}._radiobutton_qxvf5_1:disabled:checked{--current-bg-color: var(--swui-radiobutton-checked-disabled-bg-color)}._radiobutton_qxvf5_1:disabled:checked:after{--current-icon-color: var(--swui-radiobutton-disabled-icon-color)}._radiobutton_qxvf5_1:hover:not(:checked):not(:disabled){--current-border-color: var( --swui-radiobutton-unchecked-hover-border-color )}._radiobutton_qxvf5_1:focus:checked{box-shadow:var(--swui-radiobutton-checked-focus-shadow)}._radiobutton_qxvf5_1:focus:not(:checked){box-shadow:var(--swui-radiobutton-unchecked-focus-shadow)}._radiobutton_qxvf5_1+label{font-size:1.4rem;line-height:var(--swui-radiobutton-size-standard);display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}._textInput_ijduv_1{--swui-textinput-text-color: var(--swui-field-text-color);--swui-textinput-text-color-disabled: var(--swui-field-text-color-disabled);--swui-textinput-letter-spacing: var(--swui-field-letter-spacing);--swui-textinput-line-height: var(--swui-field-text-line-height);--swui-textinput-indent: var(--swui-metrics-indent);--swui-textinput-spacing: calc(var(--swui-field-text-spacing) - 1px);--swui-textinput-font-size: var(--swui-font-size-inputs);--swui-textinput-font-family: var(--swui-font-input);--swui-textinput-font-weight: var(--swui-font-weight-inputs);--swui-textinput-placeholder-color: var(--swui-field-placeholder-color);--swui-textinput-animation-time: var(--swui-animation-time-medium);--swui-textinput-icon-color: var(--swui-field-border-color-disabled);--swui-textinput-icon-hover-color: var(--swui-primary-action-color);--swui-textinput-icon-size: var(--swui-field-icon-size);--swui-textinput-icon-color-success: var(--swui-state-success-color);--swui-textinput-bg-loading: var(--swui-state-loading-light-color);--swui-textinput-border-color-loading: var(--swui-state-loading-color);--swui-textinput-bg-modified: var(--swui-state-modified-light-color);--swui-textinput-border-color-modified: var(--swui-state-modified-color);--swui-textinput-bg-warning: var(--swui-state-alert-light-color);--swui-textinput-border-color-warning: var(--swui-state-alert-color);--swui-textinput-bg-error: var(--swui-state-error-light-color);--swui-textinput-border-color-error: var(--swui-state-error-color);--swui-textinput-bg-color: var(--swui-field-bg-enabled);--swui-textinput-bg-color-disabled: var(--swui-field-bg-disabled);--swui-textinput-border-radius: var(--swui-field-border-radius);--swui-textinput-border-color: var(--swui-field-border-color);--swui-textinput-border-color-hover: var(--swui-field-border-color-hover);--swui-textinput-border-color-disabled: var( --swui-field-border-color-disabled );--swui-textinput-focus-shadow: var(--swui-field-focus-shadow);--current-bg: var(--swui-textinput-bg-color);--current-border-color: var(--swui-textinput-border-color);--current-icon-color: var(--swui-textinput-icon-color);display:flex;width:100%;align-items:center;background:var(--current-bg);border:1px solid var(--current-border-color);border-radius:var(--swui-textinput-border-radius);transition:all var(--swui-textinput-animation-time)}._textInput_ijduv_1._textInput_ijduv_1:focus-within:not(._disabled_ijduv_61){box-shadow:var(--swui-textinput-focus-shadow);--current-border-color: var(--swui-textinput-border-color-hover);--current-bg: var(--swui-textinput-bg-color)}._textInput_ijduv_1 ._input_ijduv_67{letter-spacing:var(--swui-textinput-letter-spacing);line-height:var(--swui-textinput-line-height);width:100%;padding:var(--swui-textinput-spacing) var(--swui-textinput-indent);color:var(--swui-textinput-text-color);font-size:var(--swui-textinput-font-size);font-family:var(--swui-textinput-font-family);font-weight:var(--swui-textinput-font-weight);background:var(--swui-hidden);border:none;min-width:0;margin:0}._textInput_ijduv_1 ._input_ijduv_67:disabled{color:var(--swui-textinput-text-color-disabled)}._textInput_ijduv_1 ._input_ijduv_67::-webkit-input-placeholder{color:var(--swui-textinput-placeholder-color)}._textInput_ijduv_1 ._input_ijduv_67:-ms-input-placeholder{color:var(--swui-textinput-placeholder-color)}._textInput_ijduv_1 ._input_ijduv_67::placeholder{color:var(--swui-textinput-placeholder-color)}._textInput_ijduv_1 ._input_ijduv_67:focus{outline:none}._textInput_ijduv_1 ._input_ijduv_67::-webkit-calendar-picker-indicator{display:none}._textInput_ijduv_1._standard_ijduv_102:hover:not(._disabled_ijduv_61),._textInput_ijduv_1._success_ijduv_103:hover:not(._disabled_ijduv_61){--current-border-color: var(--swui-textinput-border-color-hover)}._textInput_ijduv_1._success_ijduv_103{--current-icon-color: var(--swui-textinput-icon-color-success)}._textInput_ijduv_1._loading_ijduv_115{--current-bg: var(--swui-textinput-bg-loading);--current-border-color: var(--swui-textinput-border-color-loading)}._textInput_ijduv_1._modified_ijduv_120{--current-bg: var(--swui-textinput-bg-modified);--current-border-color: var(--swui-textinput-border-color-modified);--current-icon-color: var(--lhds-color-blue-300)}._textInput_ijduv_1._error_ijduv_126{--current-bg: var(--swui-textinput-bg-error);--current-border-color: var(--swui-textinput-border-color-error);--current-icon-color: var(--swui-textinput-border-color-error)}._textInput_ijduv_1._warning_ijduv_132{--current-bg: var(--swui-textinput-bg-warning);--current-border-color: var(--swui-textinput-border-color-warning);--current-icon-color: var(--swui-textinput-border-color-warning)}._textInput_ijduv_1._disabled_ijduv_61{--current-bg: var(--swui-textinput-bg-color-disabled);--current-border-color: var(--swui-textinput-border-color-disabled)}._textInput_ijduv_1._textInput_ijduv_1._hideBorder_ijduv_143{border:none;box-shadow:none;background:none}._textInput_ijduv_1 ._clickable_ijduv_149:hover{--current-icon-color: var(--swui-textinput-icon-hover-color);cursor:pointer}._textInput_ijduv_1 ._icon_ijduv_154{transition:color var(--swui-textinput-animation-time);color:var(--current-icon-color);font-size:var(--swui-textinput-icon-size)}._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}._textArea_1ta4a_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-spacing: calc(var(--swui-field-text-spacing) - 1px);--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 );--swui-textarea-focus-shadow: var(--swui-field-focus-shadow);max-width:100%;letter-spacing:var(--swui-textarea-letter-spacing);line-height:var(--swui-textarea-line-height);padding:var(--swui-textarea-spacing) 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_1ta4a_1:focus{outline:none;box-shadow:var(--swui-textarea-focus-shadow);--current-border-color: var(--swui-textarea-border-color-hover);--current-bg: var(--swui-textarea-bg-color)}._textArea_1ta4a_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(elementStyle);} catch(e) {console.error('vite-plugin-css-injected-by-js', e);} })();import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
className,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
className:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
(function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._switch_ven48_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(--swui-primary-action-color);--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_ven48_1:focus{outline:0;border:1px solid var(--swui-switch-selected-highlight-color);box-shadow:inset var(--swui-switch-selected-highlight-color) 0 0 4px 0}._switch_ven48_1:hover{border:1px solid var(--swui-switch-selected-highlight-color)}._switch_ven48_1:disabled{cursor:default;background-color:var(--swui-switch-container-bg-color-disabled);border:1px solid var(--swui-switch-container-border-color-disabled)}._switch_ven48_1:disabled ._knob_ven48_52{background-color:var(--swui-switch-knob-bg-color-disabled)}._switch_ven48_1 ._filler_ven48_57{flex:none;transition:flex var(--swui-switch-animation-time)}._switch_ven48_1 ._knob_ven48_52{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_ven48_71{border:1px solid var(--swui-switch-selected-highlight-color);background-color:var(--swui-switch-selected-highlight-color)}._checked_ven48_71 ._filler_ven48_57{flex:1}._checkbox_pf7pg_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-field-border-color-disabled);--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(--swui-primary-action-color);--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-field-border-color-disabled );--swui-checkbox-checked-focus-shadow: var(--swui-field-focus-shadow-inverted);--swui-checkbox-unchecked-focus-shadow: var(--swui-field-focus-shadow);-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),box-shadow var(--swui-checkbox-animation-time);flex-shrink:0}._checkbox_pf7pg_1._standard_pf7pg_44{width:var(--swui-checkbox-height);height:var(--swui-checkbox-height)}._checkbox_pf7pg_1._standard_pf7pg_44:after{width:3px;height:6px;left:9px;top:6px}._checkbox_pf7pg_1._small_pf7pg_56{width:var(--swui-checkbox-height-small);height:var(--swui-checkbox-height-small)}._checkbox_pf7pg_1._small_pf7pg_56:after{width:3px;height:6px;left:5px;top:2px}._checkbox_pf7pg_1:after{content:"";display:block;position:absolute;transition:opacity var(--swui-checkbox-animation-time),width var(--swui-checkbox-animation-time),top var(--swui-checkbox-animation-time),-webkit-transform var(--swui-checkbox-animation-time) var(--d-t-e, ease);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);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),-webkit-transform var(--swui-checkbox-animation-time) var(--d-t-e, ease);border:2px solid var( --current-checkbox-icon-color, var(--swui-checkbox-unchecked-icon-color) );border-top:0;border-left:0;-webkit-transform:rotate(var(--current-check-rotation, 20deg));transform:rotate(var(--current-check-rotation, 20deg));box-sizing:content-box}._checkbox_pf7pg_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_pf7pg_1:checked:after{--current-checkbox-icon-color: var(--swui-checkbox-icon-color)}._checkbox_pf7pg_1:disabled:not(:checked){--current-bg-color: var(--swui-checkbox-disabled-bg-color);--current-border-color: var(--swui-checkbox-disabled-border-color)}._checkbox_pf7pg_1:disabled:not(:checked):after{--current-checkbox-icon-color: --swui-checkbox-unchecked-icon-color}._checkbox_pf7pg_1:disabled:checked{--current-bg-color: var(--swui-checkbox-disabled-checked-bg-color);--current-border-color: var(--swui-checkbox-disabled-border-color)}._checkbox_pf7pg_1:disabled:checked:after{--current-checkbox-icon-color: var(--swui-checkbox-disabled-icon-color)}._checkbox_pf7pg_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_pf7pg_1:indeterminate:after{--current-checkbox-icon-color: var(--swui-checkbox-icon-color);border-right:0;-webkit-transform:rotate(0deg);transform:rotate(0);width:6px}._checkbox_pf7pg_1:indeterminate._standard_pf7pg_44:after{top:4px;left:8px}._checkbox_pf7pg_1:indeterminate._small_pf7pg_56:after{top:0;left:4px}._checkbox_pf7pg_1:indeterminate:disabled:after{--current-checkbox-icon-color: var(--swui-checkbox-disabled-icon-color)}._checkbox_pf7pg_1:hover:not(:checked):not(:disabled){--current-border-color: var(--swui-checkbox-border-hover-color)}._checkbox_pf7pg_1:focus:checked{box-shadow:var(--swui-checkbox-checked-focus-shadow)}._checkbox_pf7pg_1:focus:not(:checked){box-shadow:var(--swui-checkbox-unchecked-focus-shadow)}._checkbox_pf7pg_1+label{font-size:1.4rem;line-height:var(--swui-checkbox-height);display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}._radiobutton_qxvf5_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-separator-color);--swui-radiobutton-unchecked-icon-color: var( --swui-field-indicator-inactive-color );--swui-radiobutton-checked-bg-color: var(--swui-primary-action-color);--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-field-border-color-disabled );--swui-radiobutton-checked-focus-shadow: var( --swui-field-focus-shadow-inverted );--swui-radiobutton-unchecked-focus-shadow: var(--swui-field-focus-shadow);-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),box-shadow var(--swui-radiobutton-animation-time)}._radiobutton_qxvf5_1._standard_qxvf5_51{height:var(--swui-radiobutton-size-standard);width:var(--swui-radiobutton-size-standard)}._radiobutton_qxvf5_1._standard_qxvf5_51:after{left:7px;top:7px}._radiobutton_qxvf5_1._small_qxvf5_61{height:var(--swui-radiobutton-size-small);width:var(--swui-radiobutton-size-small)}._radiobutton_qxvf5_1._small_qxvf5_61:after{left:3px;top:3px}._radiobutton_qxvf5_1:after{content:"";display:block;position:absolute;transition:opacity var(--current-opacity-time, var(--swui-radiobutton-animation-time)) var(--current-transform-type, ease),-webkit-transform var(--current-transform-time, var(--swui-radiobutton-animation-time)) var(--current-transform-type, ease);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);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),-webkit-transform var(--current-transform-time, var(--swui-radiobutton-animation-time)) var(--current-transform-type, ease);-webkit-transform:scale(var(--current-scale, 0));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_qxvf5_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_qxvf5_1:checked:after{--current-icon-color: var(--swui-radiobutton-icon-color)}._radiobutton_qxvf5_1:disabled{--current-bg-color: var(--swui-radiobutton-unchecked-disabled-bg-color);--current-border-color: var(--swui-radiobutton-disabled-border-color)}._radiobutton_qxvf5_1:disabled:checked{--current-bg-color: var(--swui-radiobutton-checked-disabled-bg-color)}._radiobutton_qxvf5_1:disabled:checked:after{--current-icon-color: var(--swui-radiobutton-disabled-icon-color)}._radiobutton_qxvf5_1:hover:not(:checked):not(:disabled){--current-border-color: var( --swui-radiobutton-unchecked-hover-border-color )}._radiobutton_qxvf5_1:focus:checked{box-shadow:var(--swui-radiobutton-checked-focus-shadow)}._radiobutton_qxvf5_1:focus:not(:checked){box-shadow:var(--swui-radiobutton-unchecked-focus-shadow)}._radiobutton_qxvf5_1+label{font-size:1.4rem;line-height:var(--swui-radiobutton-size-standard);display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}._textInput_ijduv_1{--swui-textinput-text-color: var(--swui-field-text-color);--swui-textinput-text-color-disabled: var(--swui-field-text-color-disabled);--swui-textinput-letter-spacing: var(--swui-field-letter-spacing);--swui-textinput-line-height: var(--swui-field-text-line-height);--swui-textinput-indent: var(--swui-metrics-indent);--swui-textinput-spacing: calc(var(--swui-field-text-spacing) - 1px);--swui-textinput-font-size: var(--swui-font-size-inputs);--swui-textinput-font-family: var(--swui-font-input);--swui-textinput-font-weight: var(--swui-font-weight-inputs);--swui-textinput-placeholder-color: var(--swui-field-placeholder-color);--swui-textinput-animation-time: var(--swui-animation-time-medium);--swui-textinput-icon-color: var(--swui-field-border-color-disabled);--swui-textinput-icon-hover-color: var(--swui-primary-action-color);--swui-textinput-icon-size: var(--swui-field-icon-size);--swui-textinput-icon-color-success: var(--swui-state-success-color);--swui-textinput-bg-loading: var(--swui-state-loading-light-color);--swui-textinput-border-color-loading: var(--swui-state-loading-color);--swui-textinput-bg-modified: var(--swui-state-modified-light-color);--swui-textinput-border-color-modified: var(--swui-state-modified-color);--swui-textinput-bg-warning: var(--swui-state-alert-light-color);--swui-textinput-border-color-warning: var(--swui-state-alert-color);--swui-textinput-bg-error: var(--swui-state-error-light-color);--swui-textinput-border-color-error: var(--swui-state-error-color);--swui-textinput-bg-color: var(--swui-field-bg-enabled);--swui-textinput-bg-color-disabled: var(--swui-field-bg-disabled);--swui-textinput-border-radius: var(--swui-field-border-radius);--swui-textinput-border-color: var(--swui-field-border-color);--swui-textinput-border-color-hover: var(--swui-field-border-color-hover);--swui-textinput-border-color-disabled: var( --swui-field-border-color-disabled );--swui-textinput-focus-shadow: var(--swui-field-focus-shadow);--current-bg: var(--swui-textinput-bg-color);--current-border-color: var(--swui-textinput-border-color);--current-icon-color: var(--swui-textinput-icon-color);display:flex;width:100%;align-items:center;background:var(--current-bg);border:1px solid var(--current-border-color);border-radius:var(--swui-textinput-border-radius);transition:all var(--swui-textinput-animation-time)}._textInput_ijduv_1._textInput_ijduv_1:focus-within:not(._disabled_ijduv_61){box-shadow:var(--swui-textinput-focus-shadow);--current-border-color: var(--swui-textinput-border-color-hover);--current-bg: var(--swui-textinput-bg-color)}._textInput_ijduv_1 ._input_ijduv_67{letter-spacing:var(--swui-textinput-letter-spacing);line-height:var(--swui-textinput-line-height);width:100%;padding:var(--swui-textinput-spacing) var(--swui-textinput-indent);color:var(--swui-textinput-text-color);font-size:var(--swui-textinput-font-size);font-family:var(--swui-textinput-font-family);font-weight:var(--swui-textinput-font-weight);background:var(--swui-hidden);border:none;min-width:0;margin:0}._textInput_ijduv_1 ._input_ijduv_67:disabled{color:var(--swui-textinput-text-color-disabled)}._textInput_ijduv_1 ._input_ijduv_67::-webkit-input-placeholder{color:var(--swui-textinput-placeholder-color)}._textInput_ijduv_1 ._input_ijduv_67:-ms-input-placeholder{color:var(--swui-textinput-placeholder-color)}._textInput_ijduv_1 ._input_ijduv_67::placeholder{color:var(--swui-textinput-placeholder-color)}._textInput_ijduv_1 ._input_ijduv_67:focus{outline:none}._textInput_ijduv_1 ._input_ijduv_67::-webkit-calendar-picker-indicator{display:none}._textInput_ijduv_1._standard_ijduv_102:hover:not(._disabled_ijduv_61),._textInput_ijduv_1._success_ijduv_103:hover:not(._disabled_ijduv_61){--current-border-color: var(--swui-textinput-border-color-hover)}._textInput_ijduv_1._success_ijduv_103{--current-icon-color: var(--swui-textinput-icon-color-success)}._textInput_ijduv_1._loading_ijduv_115{--current-bg: var(--swui-textinput-bg-loading);--current-border-color: var(--swui-textinput-border-color-loading)}._textInput_ijduv_1._modified_ijduv_120{--current-bg: var(--swui-textinput-bg-modified);--current-border-color: var(--swui-textinput-border-color-modified);--current-icon-color: var(--lhds-color-blue-300)}._textInput_ijduv_1._error_ijduv_126{--current-bg: var(--swui-textinput-bg-error);--current-border-color: var(--swui-textinput-border-color-error);--current-icon-color: var(--swui-textinput-border-color-error)}._textInput_ijduv_1._warning_ijduv_132{--current-bg: var(--swui-textinput-bg-warning);--current-border-color: var(--swui-textinput-border-color-warning);--current-icon-color: var(--swui-textinput-border-color-warning)}._textInput_ijduv_1._disabled_ijduv_61{--current-bg: var(--swui-textinput-bg-color-disabled);--current-border-color: var(--swui-textinput-border-color-disabled)}._textInput_ijduv_1._textInput_ijduv_1._hideBorder_ijduv_143{border:none;box-shadow:none;background:none}._textInput_ijduv_1 ._clickable_ijduv_149:hover{--current-icon-color: var(--swui-textinput-icon-hover-color);cursor:pointer}._textInput_ijduv_1 ._icon_ijduv_154{transition:color var(--swui-textinput-animation-time);color:var(--current-icon-color);font-size:var(--swui-textinput-icon-size)}._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}._textArea_1ta4a_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-spacing: calc(var(--swui-field-text-spacing) - 1px);--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 );--swui-textarea-focus-shadow: var(--swui-field-focus-shadow);max-width:100%;letter-spacing:var(--swui-textarea-letter-spacing);line-height:var(--swui-textarea-line-height);padding:var(--swui-textarea-spacing) 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_1ta4a_1:focus{outline:none;box-shadow:var(--swui-textarea-focus-shadow);--current-border-color: var(--swui-textarea-border-color-hover);--current-bg: var(--swui-textarea-bg-color)}._textArea_1ta4a_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(r)}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
+
import { jsx as s, jsxs as m, Fragment as R } from "react/jsx-runtime";
|
|
3
|
+
import { Box as nt, Space as b, Text as N, Row as j, parseFloatElseUndefined as A } from "@stenajs-webui/core";
|
|
4
|
+
import { forwardRef as B, useRef as H, useCallback as k, useEffect as U, useMemo as rt, useState as ct } from "react";
|
|
5
|
+
import I from "classnames";
|
|
6
|
+
import { FlatButton as st, stenaCheck as F, stenaExclamationTriangle as it, InputSpinner as K, UpDownButtons as ot } from "@stenajs-webui/elements";
|
|
7
|
+
import { FontAwesomeIcon as lt } from "@fortawesome/react-fontawesome";
|
|
8
|
+
import { faEye as at } from "@fortawesome/free-solid-svg-icons/faEye";
|
|
9
|
+
import { faEyeSlash as ut } from "@fortawesome/free-solid-svg-icons/faEyeSlash";
|
|
10
|
+
import { faExclamationTriangle as dt } from "@fortawesome/free-solid-svg-icons/faExclamationTriangle";
|
|
11
|
+
const ft = "_knob_ven48_52", pt = "_filler_ven48_57", _t = "_checked_ven48_71", v = {
|
|
12
|
+
switch: "_switch_ven48_1",
|
|
13
|
+
knob: ft,
|
|
14
|
+
filler: pt,
|
|
15
|
+
checked: _t
|
|
16
|
+
}, ht = `${v.switch} ${v.checked}`, gt = ({
|
|
17
|
+
value: t,
|
|
18
|
+
disabled: e,
|
|
19
|
+
onValueChange: n,
|
|
20
|
+
className: r,
|
|
21
|
+
wrapperRef: c,
|
|
22
|
+
...i
|
|
23
|
+
}) => /* @__PURE__ */ s("div", {
|
|
24
|
+
className: r,
|
|
25
|
+
ref: c,
|
|
26
|
+
children: /* @__PURE__ */ m("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
role: "switch",
|
|
29
|
+
"aria-checked": t,
|
|
30
|
+
className: t ? ht : v.switch,
|
|
31
|
+
disabled: e,
|
|
32
|
+
onClick: () => n && n(!t),
|
|
33
|
+
...i,
|
|
34
|
+
children: [/* @__PURE__ */ s("div", {
|
|
35
|
+
className: v.filler
|
|
36
|
+
}), /* @__PURE__ */ s("div", {
|
|
37
|
+
className: v.knob
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
40
|
+
}), ne = ({
|
|
41
|
+
label: t,
|
|
42
|
+
disabled: e,
|
|
43
|
+
textColor: n,
|
|
44
|
+
wrapperRef: r,
|
|
45
|
+
...c
|
|
46
|
+
}) => /* @__PURE__ */ s("div", {
|
|
47
|
+
ref: r,
|
|
48
|
+
children: /* @__PURE__ */ s("label", {
|
|
49
|
+
children: /* @__PURE__ */ m(nt, {
|
|
50
|
+
row: !0,
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
children: [/* @__PURE__ */ s(gt, {
|
|
53
|
+
disabled: e,
|
|
54
|
+
...c
|
|
55
|
+
}), /* @__PURE__ */ s(b, {}), /* @__PURE__ */ s(N, {
|
|
56
|
+
userSelect: "none",
|
|
57
|
+
color: n,
|
|
58
|
+
children: t
|
|
43
59
|
})]
|
|
44
60
|
})
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
children: label
|
|
67
|
-
})]
|
|
68
|
-
})
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
const checkbox = "_checkbox_pf7pg_1";
|
|
73
|
-
const standard$2 = "_standard_pf7pg_44";
|
|
74
|
-
const small$1 = "_small_pf7pg_56";
|
|
75
|
-
var styles$4 = {
|
|
76
|
-
checkbox,
|
|
77
|
-
standard: standard$2,
|
|
78
|
-
small: small$1
|
|
79
|
-
};
|
|
80
|
-
const Checkbox = forwardRef(({
|
|
81
|
-
indeterminate = false,
|
|
82
|
-
onChange,
|
|
83
|
-
onValueChange,
|
|
84
|
-
value = false,
|
|
85
|
-
size = "standard",
|
|
86
|
-
...inputProps
|
|
87
|
-
}, ref) => {
|
|
88
|
-
const localRef = useRef();
|
|
89
|
-
const setRef = (element) => {
|
|
90
|
-
localRef.current = element;
|
|
91
|
-
if (localRef.current) {
|
|
92
|
-
localRef.current.indeterminate = Boolean(indeterminate);
|
|
93
|
-
}
|
|
94
|
-
if (ref) {
|
|
95
|
-
if (typeof ref === "function") {
|
|
96
|
-
ref(element);
|
|
97
|
-
} else {
|
|
98
|
-
ref.current = element;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const handleInputChange = useCallback((ev) => {
|
|
103
|
-
if (onChange) {
|
|
104
|
-
onChange(ev);
|
|
105
|
-
}
|
|
106
|
-
if (onValueChange) {
|
|
107
|
-
onValueChange(ev.target.checked);
|
|
108
|
-
}
|
|
109
|
-
}, [onChange, onValueChange]);
|
|
110
|
-
useEffect(() => {
|
|
111
|
-
if (localRef.current) {
|
|
112
|
-
localRef.current.indeterminate = Boolean(indeterminate);
|
|
113
|
-
}
|
|
114
|
-
}, [indeterminate, localRef]);
|
|
115
|
-
return /* @__PURE__ */ jsx("input", {
|
|
61
|
+
})
|
|
62
|
+
}), mt = "_checkbox_pf7pg_1", xt = "_standard_pf7pg_44", bt = "_small_pf7pg_56", L = {
|
|
63
|
+
checkbox: mt,
|
|
64
|
+
standard: xt,
|
|
65
|
+
small: bt
|
|
66
|
+
}, kt = B(({
|
|
67
|
+
indeterminate: t = !1,
|
|
68
|
+
onChange: e,
|
|
69
|
+
onValueChange: n,
|
|
70
|
+
value: r = !1,
|
|
71
|
+
size: c = "standard",
|
|
72
|
+
...i
|
|
73
|
+
}, o) => {
|
|
74
|
+
const l = H(), a = (f) => {
|
|
75
|
+
l.current = f, l.current && (l.current.indeterminate = Boolean(t)), o && (typeof o == "function" ? o(f) : o.current = f);
|
|
76
|
+
}, p = k((f) => {
|
|
77
|
+
e && e(f), n && n(f.target.checked);
|
|
78
|
+
}, [e, n]);
|
|
79
|
+
return U(() => {
|
|
80
|
+
l.current && (l.current.indeterminate = Boolean(t));
|
|
81
|
+
}, [t, l]), /* @__PURE__ */ s("input", {
|
|
116
82
|
type: "checkbox",
|
|
117
|
-
className:
|
|
118
|
-
checked:
|
|
119
|
-
onChange:
|
|
120
|
-
ref:
|
|
121
|
-
...
|
|
83
|
+
className: I(L.checkbox, L[c]),
|
|
84
|
+
checked: r,
|
|
85
|
+
onChange: p,
|
|
86
|
+
ref: a,
|
|
87
|
+
...i
|
|
122
88
|
});
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
children: /* @__PURE__ */
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
children: label
|
|
144
|
-
}), children]
|
|
145
|
-
})
|
|
89
|
+
}), re = ({
|
|
90
|
+
children: t,
|
|
91
|
+
label: e,
|
|
92
|
+
inputRef: n,
|
|
93
|
+
wrapperRef: r,
|
|
94
|
+
textColor: c,
|
|
95
|
+
...i
|
|
96
|
+
}) => /* @__PURE__ */ s("div", {
|
|
97
|
+
ref: r,
|
|
98
|
+
children: /* @__PURE__ */ s("label", {
|
|
99
|
+
children: /* @__PURE__ */ m(j, {
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
children: [/* @__PURE__ */ s(kt, {
|
|
102
|
+
...i,
|
|
103
|
+
ref: n
|
|
104
|
+
}), /* @__PURE__ */ s(b, {}), e && /* @__PURE__ */ s(N, {
|
|
105
|
+
userSelect: "none",
|
|
106
|
+
color: c,
|
|
107
|
+
children: e
|
|
108
|
+
}), t]
|
|
146
109
|
})
|
|
147
|
-
})
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}, ref) => {
|
|
164
|
-
const handleInputChange = useCallback((ev) => {
|
|
165
|
-
if (onChange) {
|
|
166
|
-
onChange(ev);
|
|
167
|
-
}
|
|
168
|
-
if (onValueChange) {
|
|
169
|
-
onValueChange(ev.target.value);
|
|
170
|
-
}
|
|
171
|
-
}, [onChange, onValueChange]);
|
|
172
|
-
return /* @__PURE__ */ jsx("input", {
|
|
110
|
+
})
|
|
111
|
+
}), wt = "_radiobutton_qxvf5_1", It = "_standard_qxvf5_51", yt = "_small_qxvf5_61", P = {
|
|
112
|
+
radiobutton: wt,
|
|
113
|
+
standard: It,
|
|
114
|
+
small: yt
|
|
115
|
+
}, Rt = B(({
|
|
116
|
+
onChange: t,
|
|
117
|
+
onValueChange: e,
|
|
118
|
+
size: n = "standard",
|
|
119
|
+
name: r,
|
|
120
|
+
...c
|
|
121
|
+
}, i) => {
|
|
122
|
+
const o = k((l) => {
|
|
123
|
+
t && t(l), e && e(l.target.value);
|
|
124
|
+
}, [t, e]);
|
|
125
|
+
return /* @__PURE__ */ s("input", {
|
|
173
126
|
type: "radio",
|
|
174
|
-
name,
|
|
175
|
-
className:
|
|
176
|
-
onChange:
|
|
177
|
-
ref,
|
|
178
|
-
...
|
|
127
|
+
name: r,
|
|
128
|
+
className: P.radiobutton + " " + P[n],
|
|
129
|
+
onChange: o,
|
|
130
|
+
ref: i,
|
|
131
|
+
...c
|
|
179
132
|
});
|
|
180
|
-
})
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
children: /* @__PURE__ */
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
children: label
|
|
200
|
-
})]
|
|
201
|
-
})
|
|
133
|
+
}), ce = ({
|
|
134
|
+
label: t,
|
|
135
|
+
inputRef: e,
|
|
136
|
+
wrapperRef: n,
|
|
137
|
+
textColor: r,
|
|
138
|
+
...c
|
|
139
|
+
}) => /* @__PURE__ */ s("div", {
|
|
140
|
+
ref: n,
|
|
141
|
+
children: /* @__PURE__ */ s("label", {
|
|
142
|
+
children: /* @__PURE__ */ m(j, {
|
|
143
|
+
alignItems: "center",
|
|
144
|
+
children: [/* @__PURE__ */ s(Rt, {
|
|
145
|
+
ref: e,
|
|
146
|
+
...c
|
|
147
|
+
}), /* @__PURE__ */ s(b, {}), /* @__PURE__ */ s(N, {
|
|
148
|
+
color: r,
|
|
149
|
+
userSelect: "none",
|
|
150
|
+
children: t
|
|
151
|
+
})]
|
|
202
152
|
})
|
|
203
|
-
})
|
|
204
|
-
}
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
onDone == null ? void 0 : onDone((_a = ev.target.value) != null ? _a : "");
|
|
211
|
-
}
|
|
212
|
-
onBlur == null ? void 0 : onBlur(ev);
|
|
213
|
-
};
|
|
214
|
-
const onFocusHandler = (ev) => {
|
|
215
|
-
wasHandled.current = false;
|
|
216
|
-
onFocus == null ? void 0 : onFocus(ev);
|
|
153
|
+
})
|
|
154
|
+
}), vt = (t, e, n, r, c, i, o, l) => {
|
|
155
|
+
const a = H(!1), p = (u) => {
|
|
156
|
+
var d;
|
|
157
|
+
a.current || i == null || i((d = u.target.value) != null ? d : ""), o == null || o(u);
|
|
158
|
+
}, f = (u) => {
|
|
159
|
+
a.current = !1, l == null || l(u);
|
|
217
160
|
};
|
|
218
|
-
const onKeyDownHandler = useCallback((ev) => {
|
|
219
|
-
var _a;
|
|
220
|
-
const { key } = ev;
|
|
221
|
-
if (key === "Enter") {
|
|
222
|
-
wasHandled.current = true;
|
|
223
|
-
onEnter == null ? void 0 : onEnter();
|
|
224
|
-
onDone == null ? void 0 : onDone((_a = ev.currentTarget.value) != null ? _a : "");
|
|
225
|
-
} else if (key === "Escape") {
|
|
226
|
-
wasHandled.current = true;
|
|
227
|
-
onEsc == null ? void 0 : onEsc();
|
|
228
|
-
ev.preventDefault();
|
|
229
|
-
ev.stopPropagation();
|
|
230
|
-
} else if (onMove) {
|
|
231
|
-
const blurMoveAndCancel = (direction, e) => {
|
|
232
|
-
wasHandled.current = true;
|
|
233
|
-
ref.current.blur();
|
|
234
|
-
onMove(direction);
|
|
235
|
-
e.preventDefault();
|
|
236
|
-
e.stopPropagation();
|
|
237
|
-
};
|
|
238
|
-
if (ev.shiftKey && key === "Tab") {
|
|
239
|
-
blurMoveAndCancel("left", ev);
|
|
240
|
-
} else if (key === "Tab") {
|
|
241
|
-
blurMoveAndCancel("right", ev);
|
|
242
|
-
} else if (key === "ArrowUp") {
|
|
243
|
-
blurMoveAndCancel("up", ev);
|
|
244
|
-
} else if (key === "ArrowDown") {
|
|
245
|
-
blurMoveAndCancel("down", ev);
|
|
246
|
-
} else if (key === "ArrowRight") {
|
|
247
|
-
if (ref.current.value.length === ref.current.selectionStart) {
|
|
248
|
-
blurMoveAndCancel("right", ev);
|
|
249
|
-
}
|
|
250
|
-
} else if (key === "ArrowLeft") {
|
|
251
|
-
if (ref.current.selectionStart === 0) {
|
|
252
|
-
blurMoveAndCancel("left", ev);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
if (onKeyDown) {
|
|
257
|
-
onKeyDown(ev);
|
|
258
|
-
}
|
|
259
|
-
}, [onEsc, onMove, onKeyDown, ref, onEnter, onDone]);
|
|
260
161
|
return {
|
|
261
|
-
onKeyDownHandler
|
|
262
|
-
|
|
263
|
-
|
|
162
|
+
onKeyDownHandler: k(
|
|
163
|
+
(u) => {
|
|
164
|
+
var x;
|
|
165
|
+
const { key: d } = u;
|
|
166
|
+
if (d === "Enter")
|
|
167
|
+
a.current = !0, n == null || n(), i == null || i((x = u.currentTarget.value) != null ? x : "");
|
|
168
|
+
else if (d === "Escape")
|
|
169
|
+
a.current = !0, r == null || r(), u.preventDefault(), u.stopPropagation();
|
|
170
|
+
else if (c) {
|
|
171
|
+
const _ = (y, w) => {
|
|
172
|
+
a.current = !0, t.current.blur(), c(y), w.preventDefault(), w.stopPropagation();
|
|
173
|
+
};
|
|
174
|
+
u.shiftKey && d === "Tab" ? _("left", u) : d === "Tab" ? _("right", u) : d === "ArrowUp" ? _("up", u) : d === "ArrowDown" ? _("down", u) : d === "ArrowRight" ? t.current.value.length === t.current.selectionStart && _("right", u) : d === "ArrowLeft" && t.current.selectionStart === 0 && _("left", u);
|
|
175
|
+
}
|
|
176
|
+
e && e(u);
|
|
177
|
+
},
|
|
178
|
+
[r, c, e, t, n, i]
|
|
179
|
+
),
|
|
180
|
+
onBlurHandler: p,
|
|
181
|
+
onFocusHandler: f
|
|
264
182
|
};
|
|
265
183
|
};
|
|
266
|
-
function
|
|
267
|
-
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
if (element.tagName === "INPUT" && (element.type === "text" || element.type === "search" || element.type === "url" || element.type === "tel" || element.type === "password")) {
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
return false;
|
|
184
|
+
function Tt(t) {
|
|
185
|
+
return t.tagName === "TEXTAREA" || t.tagName === "INPUT" && (t.type === "text" || t.type === "search" || t.type === "url" || t.type === "tel" || t.type === "password");
|
|
274
186
|
}
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
selectAllOnMount,
|
|
296
|
-
moveCursorToEndOnMount,
|
|
297
|
-
onDone,
|
|
298
|
-
onMove,
|
|
299
|
-
onFocus,
|
|
300
|
-
onBlur,
|
|
301
|
-
onKeyDown,
|
|
302
|
-
autoFocus
|
|
187
|
+
const St = (t, e, n) => {
|
|
188
|
+
U(() => {
|
|
189
|
+
!t.current || !Tt(t.current) || (n ? t.current.setSelectionRange(0, t.current.value.length) : e && t.current.setSelectionRange(
|
|
190
|
+
t.current.value.length,
|
|
191
|
+
t.current.value.length
|
|
192
|
+
));
|
|
193
|
+
}, [e, t, n]);
|
|
194
|
+
}, Nt = (t, {
|
|
195
|
+
onEnter: e,
|
|
196
|
+
onEsc: n,
|
|
197
|
+
onChange: r,
|
|
198
|
+
onValueChange: c,
|
|
199
|
+
selectAllOnMount: i,
|
|
200
|
+
moveCursorToEndOnMount: o,
|
|
201
|
+
onDone: l,
|
|
202
|
+
onMove: a,
|
|
203
|
+
onFocus: p,
|
|
204
|
+
onBlur: f,
|
|
205
|
+
onKeyDown: h,
|
|
206
|
+
autoFocus: u
|
|
303
207
|
}) => {
|
|
304
|
-
|
|
305
|
-
const { onKeyDownHandler, onFocusHandler, onBlurHandler } =
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
208
|
+
St(t, !!o, !!i);
|
|
209
|
+
const { onKeyDownHandler: d, onFocusHandler: x, onBlurHandler: _ } = vt(
|
|
210
|
+
t,
|
|
211
|
+
h,
|
|
212
|
+
e,
|
|
213
|
+
n,
|
|
214
|
+
a,
|
|
215
|
+
l,
|
|
216
|
+
f,
|
|
217
|
+
p
|
|
218
|
+
), y = k(
|
|
219
|
+
(w) => {
|
|
220
|
+
r == null || r(w), c == null || c(w.target.value);
|
|
221
|
+
},
|
|
222
|
+
[r, c]
|
|
223
|
+
);
|
|
310
224
|
return {
|
|
311
|
-
onBlur:
|
|
312
|
-
onChange:
|
|
313
|
-
onFocus:
|
|
314
|
-
onKeyDown:
|
|
315
|
-
autoFocus:
|
|
225
|
+
onBlur: _,
|
|
226
|
+
onChange: y,
|
|
227
|
+
onFocus: x,
|
|
228
|
+
onKeyDown: d,
|
|
229
|
+
autoFocus: i || u
|
|
316
230
|
};
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
})
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
children: [spaceOnLeft && !(disableContentPadding || disableContentPaddingLeft) ? /* @__PURE__ */ jsx(Space, {}) : null, onClick ? /* @__PURE__ */ jsx("span", {
|
|
361
|
-
onClick,
|
|
362
|
-
className: styles$2.clickable,
|
|
363
|
-
children: content || null
|
|
364
|
-
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
365
|
-
children: content || null
|
|
366
|
-
}), spaceOnRight && !(disableContentPadding || disableContentPaddingRight) ? /* @__PURE__ */ jsx(Space, {}) : null]
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
370
|
-
children: [spaceOnLeft ? /* @__PURE__ */ jsx(Space, {}) : null, icon2 && /* @__PURE__ */ jsx(Fragment, {
|
|
371
|
-
children: onClick ? /* @__PURE__ */ jsx(FlatButton, {
|
|
372
|
-
onClick,
|
|
373
|
-
leftIcon: icon2,
|
|
374
|
-
size: "small"
|
|
375
|
-
}) : /* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
376
|
-
icon: icon2,
|
|
377
|
-
className: cx(styles$2.icon, iconClassName)
|
|
378
|
-
})
|
|
379
|
-
}), spaceOnRight ? /* @__PURE__ */ jsx(Space, {}) : null]
|
|
380
|
-
});
|
|
381
|
-
};
|
|
382
|
-
const TextInput = (props) => {
|
|
231
|
+
}, jt = "_textInput_ijduv_1", At = "_disabled_ijduv_61", Bt = "_input_ijduv_67", Ht = "_standard_ijduv_102", $t = "_success_ijduv_103", Lt = "_loading_ijduv_115", Pt = "_modified_ijduv_120", Ut = "_error_ijduv_126", Ft = "_warning_ijduv_132", Kt = "_hideBorder_ijduv_143", Mt = "_clickable_ijduv_149", Ot = "_icon_ijduv_154", g = {
|
|
232
|
+
textInput: jt,
|
|
233
|
+
disabled: At,
|
|
234
|
+
input: Bt,
|
|
235
|
+
standard: Ht,
|
|
236
|
+
success: $t,
|
|
237
|
+
loading: Lt,
|
|
238
|
+
modified: Pt,
|
|
239
|
+
error: Ut,
|
|
240
|
+
warning: Ft,
|
|
241
|
+
hideBorder: Kt,
|
|
242
|
+
clickable: Mt,
|
|
243
|
+
icon: Ot
|
|
244
|
+
}, T = ({
|
|
245
|
+
icon: t,
|
|
246
|
+
iconClassName: e,
|
|
247
|
+
content: n,
|
|
248
|
+
spaceOnLeft: r,
|
|
249
|
+
spaceOnRight: c,
|
|
250
|
+
disableContentPadding: i,
|
|
251
|
+
disableContentPaddingLeft: o,
|
|
252
|
+
disableContentPaddingRight: l,
|
|
253
|
+
onClick: a
|
|
254
|
+
}) => !n && !t ? null : n ? /* @__PURE__ */ m(R, {
|
|
255
|
+
children: [r && !(i || o) ? /* @__PURE__ */ s(b, {}) : null, a ? /* @__PURE__ */ s("span", {
|
|
256
|
+
onClick: a,
|
|
257
|
+
className: g.clickable,
|
|
258
|
+
children: n || null
|
|
259
|
+
}) : /* @__PURE__ */ s(R, {
|
|
260
|
+
children: n || null
|
|
261
|
+
}), c && !(i || l) ? /* @__PURE__ */ s(b, {}) : null]
|
|
262
|
+
}) : /* @__PURE__ */ m(R, {
|
|
263
|
+
children: [r ? /* @__PURE__ */ s(b, {}) : null, t && /* @__PURE__ */ s(R, {
|
|
264
|
+
children: a ? /* @__PURE__ */ s(st, {
|
|
265
|
+
onClick: a,
|
|
266
|
+
leftIcon: t,
|
|
267
|
+
size: "small"
|
|
268
|
+
}) : /* @__PURE__ */ s(lt, {
|
|
269
|
+
icon: t,
|
|
270
|
+
className: I(g.icon, e)
|
|
271
|
+
})
|
|
272
|
+
}), c ? /* @__PURE__ */ s(b, {}) : null]
|
|
273
|
+
}), M = (t) => {
|
|
383
274
|
const {
|
|
384
|
-
variant = "standard",
|
|
385
|
-
inputRef,
|
|
386
|
-
disabled:
|
|
387
|
-
className,
|
|
388
|
-
contentLeft,
|
|
389
|
-
contentRight,
|
|
390
|
-
disableContentPadding,
|
|
391
|
-
disableContentPaddingLeft,
|
|
392
|
-
disableContentPaddingRight,
|
|
393
|
-
iconLeft,
|
|
394
|
-
iconRight,
|
|
395
|
-
onClickLeft,
|
|
396
|
-
onClickRight,
|
|
397
|
-
moveCursorToEndOnMount,
|
|
398
|
-
selectAllOnMount,
|
|
399
|
-
autoFocus,
|
|
400
|
-
onValueChange,
|
|
401
|
-
wrapperClassName,
|
|
402
|
-
wrapperStyle,
|
|
403
|
-
onDone,
|
|
404
|
-
onEnter,
|
|
405
|
-
onEsc,
|
|
406
|
-
onMove,
|
|
407
|
-
onChange,
|
|
408
|
-
onKeyDown,
|
|
409
|
-
hideBorder:
|
|
410
|
-
onFocus,
|
|
411
|
-
onBlur,
|
|
412
|
-
...
|
|
413
|
-
} =
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
const currentIconRight = variant === "success" ? stenaCheck : variant === "warning" || variant === "error" ? stenaExclamationTriangle : iconRight;
|
|
431
|
-
const currentContentRight = variant === "loading" ? /* @__PURE__ */ jsx(InputSpinner, {}) : contentRight;
|
|
432
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
433
|
-
className: cx(styles$2.textInput, styles$2[variant], {
|
|
434
|
-
[styles$2.disabled]: disabled2
|
|
275
|
+
variant: e = "standard",
|
|
276
|
+
inputRef: n,
|
|
277
|
+
disabled: r,
|
|
278
|
+
className: c,
|
|
279
|
+
contentLeft: i,
|
|
280
|
+
contentRight: o,
|
|
281
|
+
disableContentPadding: l,
|
|
282
|
+
disableContentPaddingLeft: a,
|
|
283
|
+
disableContentPaddingRight: p,
|
|
284
|
+
iconLeft: f,
|
|
285
|
+
iconRight: h,
|
|
286
|
+
onClickLeft: u,
|
|
287
|
+
onClickRight: d,
|
|
288
|
+
moveCursorToEndOnMount: x,
|
|
289
|
+
selectAllOnMount: _,
|
|
290
|
+
autoFocus: y,
|
|
291
|
+
onValueChange: w,
|
|
292
|
+
wrapperClassName: O,
|
|
293
|
+
wrapperStyle: W,
|
|
294
|
+
onDone: q,
|
|
295
|
+
onEnter: C,
|
|
296
|
+
onEsc: E,
|
|
297
|
+
onMove: z,
|
|
298
|
+
onChange: X,
|
|
299
|
+
onKeyDown: G,
|
|
300
|
+
hideBorder: J,
|
|
301
|
+
onFocus: Q,
|
|
302
|
+
onBlur: Y,
|
|
303
|
+
...Z
|
|
304
|
+
} = t, D = H(null), $ = n != null ? n : D, V = Nt($, {
|
|
305
|
+
onEnter: C,
|
|
306
|
+
onEsc: E,
|
|
307
|
+
onChange: X,
|
|
308
|
+
onValueChange: w,
|
|
309
|
+
selectAllOnMount: _,
|
|
310
|
+
moveCursorToEndOnMount: x,
|
|
311
|
+
onDone: q,
|
|
312
|
+
onMove: z,
|
|
313
|
+
onFocus: Q,
|
|
314
|
+
onBlur: Y,
|
|
315
|
+
onKeyDown: G,
|
|
316
|
+
autoFocus: y
|
|
317
|
+
}), tt = e === "success" ? F : e === "warning" || e === "error" ? it : h, et = e === "loading" ? /* @__PURE__ */ s(K, {}) : o;
|
|
318
|
+
return /* @__PURE__ */ m("div", {
|
|
319
|
+
className: I(g.textInput, g[e], {
|
|
320
|
+
[g.disabled]: r
|
|
435
321
|
}, {
|
|
436
|
-
[
|
|
437
|
-
},
|
|
438
|
-
style:
|
|
439
|
-
children: [/* @__PURE__ */
|
|
440
|
-
content:
|
|
441
|
-
disableContentPadding,
|
|
442
|
-
disableContentPaddingLeft,
|
|
443
|
-
disableContentPaddingRight,
|
|
444
|
-
icon:
|
|
445
|
-
spaceOnLeft:
|
|
446
|
-
onClick:
|
|
447
|
-
}), /* @__PURE__ */
|
|
448
|
-
className:
|
|
322
|
+
[g.hideBorder]: J
|
|
323
|
+
}, O),
|
|
324
|
+
style: W,
|
|
325
|
+
children: [/* @__PURE__ */ s(T, {
|
|
326
|
+
content: i,
|
|
327
|
+
disableContentPadding: l,
|
|
328
|
+
disableContentPaddingLeft: a,
|
|
329
|
+
disableContentPaddingRight: p,
|
|
330
|
+
icon: f,
|
|
331
|
+
spaceOnLeft: !0,
|
|
332
|
+
onClick: u
|
|
333
|
+
}), /* @__PURE__ */ s("input", {
|
|
334
|
+
className: I(g.input, c),
|
|
449
335
|
type: "text",
|
|
450
|
-
disabled:
|
|
451
|
-
ref:
|
|
452
|
-
autoFocus,
|
|
453
|
-
...
|
|
454
|
-
...
|
|
455
|
-
}), /* @__PURE__ */
|
|
456
|
-
content:
|
|
457
|
-
disableContentPadding,
|
|
458
|
-
disableContentPaddingLeft,
|
|
459
|
-
disableContentPaddingRight,
|
|
460
|
-
icon:
|
|
461
|
-
spaceOnRight:
|
|
462
|
-
onClick:
|
|
336
|
+
disabled: r,
|
|
337
|
+
ref: $,
|
|
338
|
+
autoFocus: y,
|
|
339
|
+
...Z,
|
|
340
|
+
...V
|
|
341
|
+
}), /* @__PURE__ */ s(T, {
|
|
342
|
+
content: et,
|
|
343
|
+
disableContentPadding: l,
|
|
344
|
+
disableContentPaddingLeft: a,
|
|
345
|
+
disableContentPaddingRight: p,
|
|
346
|
+
icon: tt,
|
|
347
|
+
spaceOnRight: !0,
|
|
348
|
+
onClick: d
|
|
463
349
|
})]
|
|
464
350
|
});
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
numSteps,
|
|
474
|
-
min,
|
|
475
|
-
max
|
|
351
|
+
}, Wt = "_numericTextInputInput_1tnr6_1", qt = {
|
|
352
|
+
numericTextInputInput: Wt
|
|
353
|
+
}, Ct = ({
|
|
354
|
+
onValueChange: t,
|
|
355
|
+
value: e,
|
|
356
|
+
numSteps: n,
|
|
357
|
+
min: r,
|
|
358
|
+
max: c
|
|
476
359
|
}) => {
|
|
477
|
-
if (
|
|
478
|
-
if (!
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
onValueChange(String(limitWithinRange(newValue, min, max)));
|
|
360
|
+
if (t)
|
|
361
|
+
if (!e)
|
|
362
|
+
t(String(S(n, r, c)));
|
|
363
|
+
else {
|
|
364
|
+
const o = (A(e) || 0) + n;
|
|
365
|
+
t(String(S(o, r, c)));
|
|
484
366
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
min,
|
|
491
|
-
max
|
|
367
|
+
}, Et = ({
|
|
368
|
+
onValueChange: t,
|
|
369
|
+
newValue: e,
|
|
370
|
+
min: n,
|
|
371
|
+
max: r
|
|
492
372
|
}) => {
|
|
493
|
-
if (
|
|
494
|
-
if (
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
onValueChange(String(limitWithinRange(value, min, max)));
|
|
373
|
+
if (t)
|
|
374
|
+
if (e === "")
|
|
375
|
+
t("");
|
|
376
|
+
else {
|
|
377
|
+
const i = A(e) || 0;
|
|
378
|
+
t(String(S(i, n, r)));
|
|
500
379
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
onValueChange,
|
|
516
|
-
max,
|
|
517
|
-
min,
|
|
518
|
-
step = 1,
|
|
519
|
-
contentRight,
|
|
520
|
-
disabled: disabled2,
|
|
521
|
-
className,
|
|
522
|
-
hideButtons,
|
|
523
|
-
...restProps
|
|
380
|
+
}, S = (t, e, n) => {
|
|
381
|
+
let r = t;
|
|
382
|
+
return e != null && (r = Math.max(e, r)), n != null && (r = Math.min(n, r)), r;
|
|
383
|
+
}, se = ({
|
|
384
|
+
value: t,
|
|
385
|
+
onValueChange: e,
|
|
386
|
+
max: n,
|
|
387
|
+
min: r,
|
|
388
|
+
step: c = 1,
|
|
389
|
+
contentRight: i,
|
|
390
|
+
disabled: o,
|
|
391
|
+
className: l,
|
|
392
|
+
hideButtons: a,
|
|
393
|
+
...p
|
|
524
394
|
}) => {
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
onValueChange,
|
|
528
|
-
value,
|
|
529
|
-
numSteps,
|
|
530
|
-
min,
|
|
531
|
-
max
|
|
395
|
+
const f = k((d) => {
|
|
396
|
+
Ct({
|
|
397
|
+
onValueChange: e,
|
|
398
|
+
value: t,
|
|
399
|
+
numSteps: d,
|
|
400
|
+
min: r,
|
|
401
|
+
max: n
|
|
532
402
|
});
|
|
533
|
-
}, [
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
max
|
|
403
|
+
}, [t, n, r, e]), h = k((d) => {
|
|
404
|
+
Et({
|
|
405
|
+
onValueChange: e,
|
|
406
|
+
newValue: d,
|
|
407
|
+
min: r,
|
|
408
|
+
max: n
|
|
540
409
|
});
|
|
541
|
-
}, [
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
children: [
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
disableContentPaddingRight: !hideButtons,
|
|
410
|
+
}, [n, r, e]);
|
|
411
|
+
return /* @__PURE__ */ s(M, {
|
|
412
|
+
contentRight: a ? i : /* @__PURE__ */ m(R, {
|
|
413
|
+
children: [i && /* @__PURE__ */ m(R, {
|
|
414
|
+
children: [i, /* @__PURE__ */ s(b, {})]
|
|
415
|
+
}), /* @__PURE__ */ s(ot, {
|
|
416
|
+
onClickUp: o ? void 0 : () => f(c),
|
|
417
|
+
onClickDown: o ? void 0 : () => f(-c),
|
|
418
|
+
iconColor: "var(--swui-textinput-text-color)",
|
|
419
|
+
disabled: o
|
|
420
|
+
})]
|
|
421
|
+
}),
|
|
422
|
+
value: t,
|
|
423
|
+
onValueChange: h,
|
|
424
|
+
disableContentPaddingRight: !a,
|
|
557
425
|
type: "number",
|
|
558
|
-
min,
|
|
559
|
-
max,
|
|
560
|
-
step,
|
|
561
|
-
className:
|
|
562
|
-
disabled:
|
|
563
|
-
...
|
|
426
|
+
min: r,
|
|
427
|
+
max: n,
|
|
428
|
+
step: c,
|
|
429
|
+
className: I(qt.numericTextInputInput, l),
|
|
430
|
+
disabled: o,
|
|
431
|
+
...p
|
|
564
432
|
});
|
|
565
|
-
}
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
onValueChange(n);
|
|
433
|
+
}, ie = (t, e) => {
|
|
434
|
+
const n = k(
|
|
435
|
+
(c) => {
|
|
436
|
+
if (e)
|
|
437
|
+
if (!c)
|
|
438
|
+
e(void 0);
|
|
439
|
+
else {
|
|
440
|
+
const i = A(c);
|
|
441
|
+
i !== void 0 && e(i);
|
|
575
442
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
const valueString = useMemo(() => {
|
|
580
|
-
if (value === void 0) {
|
|
581
|
-
return "";
|
|
582
|
-
}
|
|
583
|
-
return String(value);
|
|
584
|
-
}, [value]);
|
|
443
|
+
},
|
|
444
|
+
[e]
|
|
445
|
+
), r = rt(() => t === void 0 ? "" : String(t), [t]);
|
|
585
446
|
return {
|
|
586
|
-
onValueChange:
|
|
587
|
-
value:
|
|
447
|
+
onValueChange: n,
|
|
448
|
+
value: r
|
|
588
449
|
};
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
...props
|
|
450
|
+
}, oe = ({
|
|
451
|
+
hiddenIcon: t = at,
|
|
452
|
+
visibleIcon: e = ut,
|
|
453
|
+
...n
|
|
594
454
|
}) => {
|
|
595
|
-
const [
|
|
596
|
-
return /* @__PURE__ */
|
|
597
|
-
iconRight:
|
|
598
|
-
onClickRight: () =>
|
|
599
|
-
type:
|
|
600
|
-
...
|
|
455
|
+
const [r, c] = ct(!0);
|
|
456
|
+
return /* @__PURE__ */ s(M, {
|
|
457
|
+
iconRight: r ? t : e,
|
|
458
|
+
onClickRight: () => c((i) => !i),
|
|
459
|
+
type: r ? "password" : "text",
|
|
460
|
+
...n
|
|
601
461
|
});
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
children
|
|
462
|
+
}, le = ({
|
|
463
|
+
variant: t = "standard",
|
|
464
|
+
disabled: e,
|
|
465
|
+
wrapperClassName: n,
|
|
466
|
+
wrapperStyle: r,
|
|
467
|
+
contentLeft: c,
|
|
468
|
+
contentRight: i,
|
|
469
|
+
disableContentPadding: o,
|
|
470
|
+
disableContentPaddingLeft: l,
|
|
471
|
+
disableContentPaddingRight: a,
|
|
472
|
+
iconRight: p,
|
|
473
|
+
iconLeft: f,
|
|
474
|
+
onClickLeft: h,
|
|
475
|
+
onClickRight: u,
|
|
476
|
+
children: d
|
|
618
477
|
}) => {
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
}), /* @__PURE__ */ jsx(Row, {
|
|
478
|
+
const x = t === "success" ? F : t === "warning" || t === "error" ? dt : p, _ = t === "loading" ? /* @__PURE__ */ s(K, {}) : i;
|
|
479
|
+
return /* @__PURE__ */ m("div", {
|
|
480
|
+
className: I(g.textInput, g.inputContainer, g[t], {
|
|
481
|
+
[g.disabled]: e
|
|
482
|
+
}, n),
|
|
483
|
+
style: r,
|
|
484
|
+
children: [/* @__PURE__ */ s(T, {
|
|
485
|
+
content: c,
|
|
486
|
+
disableContentPadding: o,
|
|
487
|
+
disableContentPaddingLeft: l,
|
|
488
|
+
disableContentPaddingRight: a,
|
|
489
|
+
icon: f,
|
|
490
|
+
spaceOnLeft: !0,
|
|
491
|
+
onClick: h
|
|
492
|
+
}), /* @__PURE__ */ s(j, {
|
|
635
493
|
alignItems: "center",
|
|
636
|
-
children
|
|
637
|
-
}), /* @__PURE__ */
|
|
638
|
-
content:
|
|
639
|
-
disableContentPadding,
|
|
640
|
-
disableContentPaddingLeft,
|
|
641
|
-
disableContentPaddingRight,
|
|
642
|
-
icon:
|
|
643
|
-
spaceOnRight:
|
|
644
|
-
onClick:
|
|
494
|
+
children: d
|
|
495
|
+
}), /* @__PURE__ */ s(T, {
|
|
496
|
+
content: _,
|
|
497
|
+
disableContentPadding: o,
|
|
498
|
+
disableContentPaddingLeft: l,
|
|
499
|
+
disableContentPaddingRight: a,
|
|
500
|
+
icon: x,
|
|
501
|
+
spaceOnRight: !0,
|
|
502
|
+
onClick: u
|
|
645
503
|
})]
|
|
646
504
|
});
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
},
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
onValueChange(ev.target.value);
|
|
669
|
-
}
|
|
670
|
-
}, [onChange, onValueChange]);
|
|
671
|
-
return /* @__PURE__ */ jsx("textarea", {
|
|
672
|
-
disabled: disabled2,
|
|
673
|
-
rows,
|
|
674
|
-
readOnly,
|
|
675
|
-
className: cx(styles.textArea, className),
|
|
505
|
+
}, zt = "_textArea_1ta4a_1", Xt = {
|
|
506
|
+
textArea: zt
|
|
507
|
+
}, ae = B(({
|
|
508
|
+
className: t,
|
|
509
|
+
value: e,
|
|
510
|
+
onValueChange: n,
|
|
511
|
+
onChange: r,
|
|
512
|
+
resize: c = "none",
|
|
513
|
+
readOnly: i = !1,
|
|
514
|
+
rows: o,
|
|
515
|
+
disabled: l,
|
|
516
|
+
...a
|
|
517
|
+
}, p) => {
|
|
518
|
+
const f = k((h) => {
|
|
519
|
+
r && r(h), n && n(h.target.value);
|
|
520
|
+
}, [r, n]);
|
|
521
|
+
return /* @__PURE__ */ s("textarea", {
|
|
522
|
+
disabled: l,
|
|
523
|
+
rows: o,
|
|
524
|
+
readOnly: i,
|
|
525
|
+
className: I(Xt.textArea, t),
|
|
676
526
|
style: {
|
|
677
|
-
resize
|
|
527
|
+
resize: c
|
|
678
528
|
},
|
|
679
|
-
onChange:
|
|
680
|
-
value,
|
|
681
|
-
ref,
|
|
682
|
-
...
|
|
529
|
+
onChange: f,
|
|
530
|
+
value: e,
|
|
531
|
+
ref: p,
|
|
532
|
+
...a
|
|
683
533
|
});
|
|
684
534
|
});
|
|
685
|
-
export {
|
|
535
|
+
export {
|
|
536
|
+
kt as Checkbox,
|
|
537
|
+
re as CheckboxWithLabel,
|
|
538
|
+
se as NumericTextInput,
|
|
539
|
+
oe as PasswordInput,
|
|
540
|
+
Rt as RadioButton,
|
|
541
|
+
ce as RadioButtonWithLabel,
|
|
542
|
+
gt as Switch,
|
|
543
|
+
ne as SwitchWithLabel,
|
|
544
|
+
ae as TextArea,
|
|
545
|
+
M as TextInput,
|
|
546
|
+
le as TextInputBox,
|
|
547
|
+
Tt as elementHasSelectionRange,
|
|
548
|
+
Ct as onStepValueChange,
|
|
549
|
+
Et as onTextValueChange,
|
|
550
|
+
vt as useKeyboardNavigation,
|
|
551
|
+
ie as useNumericInputValue,
|
|
552
|
+
St as useSelectAllOnMount,
|
|
553
|
+
Nt as useTextInput
|
|
554
|
+
};
|
|
686
555
|
//# sourceMappingURL=index.es.js.map
|