@stenajs-webui/forms 19.0.0-next.7 → 19.0.0-next.71

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