@stenajs-webui/forms 23.11.1 → 23.11.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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/components/ui/read-only-numeric-input/ReadOnlyNumericInput.tsx","../src/components/ui/amount-stepper-buttons/AmountStepperButtons.tsx","../src/components/ui/switch/Switch.tsx","../src/components/ui/switch/SwitchWithLabel.tsx","../src/components/ui/checkbox/Checkbox.tsx","../src/components/ui/checkbox/CheckboxWithLabel.tsx","../src/components/ui/radio/RadioButton.tsx","../src/components/ui/radio/RadioButtonBox.tsx","../src/components/ui/radio/RadioButtonWithLabel.tsx","../src/hooks/UseKeyboardNavigation.ts","../src/hooks/UseSelectAllOnMount.ts","../src/hooks/UseTextInput.ts","../src/components/ui/text-input/TextInputIcon.tsx","../src/components/ui/text-input/TextInput.tsx","../src/utils/NumericHelpers.ts","../src/components/ui/numeric-text-input/NumericTextInput.tsx","../src/components/ui/numeric-text-input/hooks/UseNumericInputValue.ts","../src/utils/NumberComparator.ts","../src/components/ui/numeric-stepper/NumericStepper.tsx","../src/components/ui/password-input/PasswordInput.tsx","../src/components/ui/input-label/InputLabelText.tsx","../src/components/ui/input-label/InputLabel.tsx","../src/components/ui/labelled-select/LabelledSelect.tsx","../src/components/ui/labelled-text-input/LabelledTextInput.tsx","../src/components/ui/text-input/TextInputBox.tsx","../src/components/ui/text-area/TextArea.tsx","../src/components/copy-to-clipboard-button/CopyToClipboardButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport styles from \"./ReadOnlyNumericInput.module.css\";\nimport { NumericTextInputProps } from \"../numeric-text-input/NumericTextInput\";\n\ninterface ReadInputProps\n extends Omit<NumericTextInputProps, \"readOnly\" | \"hideBorder\" | \"style\"> {}\n\nexport const ReadOnlyNumericInput: React.FC<ReadInputProps> = ({\n value,\n id,\n ...props\n}) => {\n return (\n <input\n {...props}\n type=\"number\"\n id={id}\n value={value}\n readOnly\n className={styles.readOnlyInput}\n />\n );\n};\n","import { Row } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\nimport {\n ButtonSize,\n PrimaryButton,\n stenaMinus,\n stenaPlus,\n} from \"@stenajs-webui/elements\";\nimport { ReadOnlyNumericInput } from \"../read-only-numeric-input/ReadOnlyNumericInput\";\n\nexport interface AmountStepperButtonsProps {\n value: number;\n inputId: string;\n size?: ButtonSize;\n ariaLabelIncrease: string;\n ariaLabelDecrease: string;\n onValueChange?: (value: number) => void;\n decreaseDisabled?: boolean;\n increaseDisabled?: boolean;\n textValueAriaLabel?: string;\n increaseTestId?: string;\n decreaseTestId?: string;\n onDecrease?: () => void;\n onIncrease?: () => void;\n}\n\nexport const AmountStepperButtons: React.FC<AmountStepperButtonsProps> = ({\n value,\n onValueChange,\n decreaseDisabled,\n increaseDisabled,\n inputId,\n ariaLabelDecrease,\n ariaLabelIncrease,\n textValueAriaLabel,\n increaseTestId,\n decreaseTestId,\n onIncrease,\n onDecrease,\n size,\n}) => {\n const onClickPlus = useCallback(() => {\n onIncrease?.();\n onValueChange?.(value + 1);\n }, [onIncrease, onValueChange, value]);\n\n const onClickMinus = useCallback(() => {\n onDecrease?.();\n onValueChange?.(value - 1);\n }, [onDecrease, onValueChange, value]);\n\n return (\n <Row alignItems={\"center\"}>\n <PrimaryButton\n size={size}\n aria-label={ariaLabelDecrease}\n leftIcon={stenaMinus}\n data-testid={decreaseTestId ?? \"decrease\"}\n disabled={decreaseDisabled}\n onClick={onClickMinus}\n />\n <ReadOnlyNumericInput\n id={inputId}\n data-testid=\"amountStepperValue\"\n value={value.toString()}\n aria-label={textValueAriaLabel}\n />\n <PrimaryButton\n size={size}\n leftIcon={stenaPlus}\n aria-label={ariaLabelIncrease}\n data-testid={increaseTestId ?? \"increase\"}\n disabled={increaseDisabled}\n onClick={onClickPlus}\n />\n </Row>\n );\n};\n","import { Ref } from \"react\";\nimport * as React from \"react\";\nimport { ButtonElementProps } from \"@stenajs-webui/core\";\nimport { ValueAndOnValueChangeProps } from \"../types\";\nimport styles from \"./Switch.module.css\";\n\nexport interface SwitchProps\n extends Omit<ButtonElementProps, \"value\">,\n ValueAndOnValueChangeProps<boolean> {\n wrapperRef?: Ref<HTMLDivElement>;\n}\n\nconst styleChecked = `${styles.switch} ${styles.checked}`;\n\nexport const Switch: React.FC<SwitchProps> = ({\n value,\n disabled,\n onValueChange,\n className,\n wrapperRef,\n ...restProps\n}) => {\n return (\n <div className={className} ref={wrapperRef}>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={value}\n className={value ? styleChecked : styles.switch}\n disabled={disabled}\n onClick={() => onValueChange && onValueChange(!value)}\n {...restProps}\n >\n <div className={styles.filler} />\n <div className={styles.knob} />\n </button>\n </div>\n );\n};\n","import { Box, ScreenReaderOnlyText, Space, Text } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { Switch, SwitchProps } from \"./Switch\";\n\nexport interface SwitchWithLabelProps extends SwitchProps {\n label: string;\n /**\n * If set, this label is used by screen readers instead of label prop.\n * For example, label could be \"male\", while screenReaderLabel is \"Gender male\".\n * If not set, screen readers will use label prop.\n */\n screenReaderLabel?: string;\n textColor?: string;\n}\n\nexport const SwitchWithLabel: React.FC<SwitchWithLabelProps> = ({\n label,\n disabled,\n textColor,\n wrapperRef,\n screenReaderLabel,\n ...switchProps\n}) => {\n return (\n <div ref={wrapperRef}>\n <label>\n <Box row alignItems={\"center\"}>\n <Switch disabled={disabled} {...switchProps} />\n <Space />\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <Text\n color={textColor}\n aria-hidden={Boolean(screenReaderLabel)}\n userSelect={\"none\"}\n >\n {label}\n </Text>\n </Box>\n </label>\n </div>\n );\n};\n","import * as React from \"react\";\nimport {\n ChangeEvent,\n ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n} from \"react\";\nimport { FullOnChangeProps } from \"../types\";\nimport cx from \"classnames\";\nimport styles from \"./Checkbox.module.css\";\n\nexport type CheckboxSize = \"standard\" | \"small\";\n\nexport interface CheckboxProps\n extends FullOnChangeProps<boolean, ChangeEvent<HTMLInputElement>>,\n Omit<ComponentPropsWithoutRef<\"input\">, \"size\" | \"value\"> {\n indeterminate?: boolean;\n size?: CheckboxSize;\n disabled?: boolean;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n indeterminate = false,\n onChange,\n onValueChange,\n value = false,\n size = \"standard\",\n className,\n ...inputProps\n },\n ref,\n ) => {\n const localRef = useRef<HTMLInputElement>(null);\n\n const setRef = (element: HTMLInputElement) => {\n localRef.current = element;\n if (localRef.current) {\n localRef.current.indeterminate = Boolean(indeterminate);\n }\n if (ref) {\n if (typeof ref === \"function\") {\n ref(element);\n } else {\n ref.current = element;\n }\n }\n };\n\n const handleInputChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(ev);\n }\n if (onValueChange) {\n onValueChange(ev.target.checked);\n }\n },\n [onChange, onValueChange],\n );\n\n useEffect(() => {\n if (localRef.current) {\n localRef.current.indeterminate = Boolean(indeterminate);\n }\n }, [indeterminate, localRef]);\n\n return (\n <input\n type={\"checkbox\"}\n className={cx(styles.checkbox, styles[size], className)}\n checked={value}\n onChange={handleInputChange}\n ref={setRef}\n {...inputProps}\n />\n );\n },\n);\n","import { Row, ScreenReaderOnlyText, Space, Text } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { Ref } from \"react\";\nimport { Checkbox, CheckboxProps } from \"./Checkbox\";\n\nexport interface CheckboxWithLabelProps extends CheckboxProps {\n label: string;\n /**\n * If set, this label is used by screen readers instead of label prop.\n * For example, label could be \"male\", while screenReaderLabel is \"Gender male\".\n * If not set, screen readers will use label prop.\n */\n screenReaderLabel?: string;\n textColor?: string;\n wrapperRef?: Ref<HTMLDivElement>;\n inputRef?: Ref<HTMLInputElement>;\n}\n\nexport const CheckboxWithLabel: React.FC<CheckboxWithLabelProps> = ({\n children,\n label,\n inputRef,\n wrapperRef,\n textColor,\n screenReaderLabel,\n ...checkboxProps\n}) => {\n return (\n <div ref={wrapperRef}>\n <label>\n <Row alignItems={\"center\"}>\n <Checkbox {...checkboxProps} ref={inputRef} />\n <Space />\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <Text\n color={textColor}\n aria-hidden={Boolean(screenReaderLabel)}\n userSelect={\"none\"}\n >\n {label}\n </Text>\n {children}\n </Row>\n </label>\n </div>\n );\n};\n","import * as React from \"react\";\nimport {\n ChangeEvent,\n ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n} from \"react\";\nimport { FullOnChangeProps } from \"../types\";\nimport styles from \"./RadioButton.module.css\";\nimport cx from \"classnames\";\n\nexport type RadioButtonSize = \"standard\" | \"small\";\n\nexport interface RadioButtonProps\n extends FullOnChangeProps<string, ChangeEvent<HTMLInputElement>>,\n Omit<ComponentPropsWithoutRef<\"input\">, \"size\" | \"value\"> {\n size?: RadioButtonSize;\n}\n\nexport const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(\n (\n {\n onChange,\n onValueChange,\n size = \"standard\",\n name,\n className,\n ...inputProps\n },\n ref,\n ) => {\n const handleInputChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(ev);\n }\n if (onValueChange) {\n onValueChange(ev.target.value);\n }\n },\n [onChange, onValueChange],\n );\n\n return (\n <input\n type={\"radio\"}\n name={name}\n className={cx(styles.radiobutton, styles[size], className)}\n onChange={handleInputChange}\n ref={ref}\n {...inputProps}\n />\n );\n },\n);\n","import { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport { Row, ScreenReaderOnlyText, Space, Text } from \"@stenajs-webui/core\";\nimport { Icon } from \"@stenajs-webui/elements\";\nimport cx from \"classnames\";\nimport * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./RadioButtonBox.module.css\";\nimport { RadioButton, RadioButtonProps } from \"./RadioButton\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\nexport type RadioButtonBoxVariant = \"normal\" | \"danger\";\nexport type RadioButtonBoxSizeVariant = \"medium\" | \"large\";\n\nexport type RadioButtonBoxProps =\n | RadioButtonBoxNoRightProps\n | RadioButtonBoxIconProps\n | RadioButtonBoxContentRightProps;\n\nexport interface RadioButtonBoxCommonProps\n extends Omit<RadioButtonProps, \"size\"> {\n label?: string;\n /**\n * If set, this label is used by screen readers instead of label prop.\n * For example, label could be \"male\", while screenReaderLabel is \"Gender male\".\n * If not set, screen readers will use label prop.\n */\n screenReaderLabel?: string;\n variant?: RadioButtonBoxVariant;\n size?: RadioButtonBoxSizeVariant;\n radioButtonClassName?: string;\n}\n\nexport interface RadioButtonBoxNoRightProps extends RadioButtonBoxCommonProps {\n icon?: never;\n contentRight?: never;\n}\n\nexport interface RadioButtonBoxIconProps extends RadioButtonBoxCommonProps {\n icon?: IconDefinition;\n contentRight?: never;\n}\n\nexport interface RadioButtonBoxContentRightProps\n extends RadioButtonBoxCommonProps {\n icon?: never;\n contentRight?: ReactNode;\n}\n\nexport const RadioButtonBox: React.FC<RadioButtonBoxProps> = ({\n label,\n screenReaderLabel,\n variant = \"normal\",\n size = \"medium\",\n className,\n icon,\n contentRight,\n style,\n disabled,\n radioButtonClassName,\n ...radioButtonProps\n}) => {\n const textColor = disabled\n ? cssColor(\"--swui-text-disabled-color\")\n : undefined;\n\n return (\n <label\n className={cx(\n styles.radioButtonBox,\n styles[variant],\n styles[size],\n className,\n )}\n style={style}\n >\n <Row justifyContent={\"space-between\"} flexGrow={1}>\n <Row alignItems={\"center\"}>\n <RadioButton\n {...radioButtonProps}\n disabled={disabled}\n className={radioButtonClassName}\n />\n <Space />\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <Text color={textColor} aria-hidden={Boolean(screenReaderLabel)}>\n {label}\n </Text>\n </Row>\n <Row\n alignItems={\"center\"}\n width={icon ? \"48px\" : undefined}\n justifyContent={\"center\"}\n >\n {icon && <Icon icon={icon} size={24} color={textColor} />}\n {!icon && contentRight}\n </Row>\n </Row>\n </label>\n );\n};\n","import { Row, ScreenReaderOnlyText, Space, Text } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { Ref } from \"react\";\nimport { RadioButton, RadioButtonProps } from \"./RadioButton\";\n\nexport interface RadioButtonWithLabelProps extends RadioButtonProps {\n label: string;\n /**\n * If set, this label is used by screen readers instead of label prop.\n * For example, label could be \"male\", while screenReaderLabel is \"Gender male\".\n * If not set, screen readers will use label prop.\n */\n screenReaderLabel?: string;\n textColor?: string;\n wrapperRef?: Ref<HTMLDivElement>;\n inputRef?: Ref<HTMLInputElement>;\n}\n\nexport const RadioButtonWithLabel: React.FC<RadioButtonWithLabelProps> = ({\n label,\n inputRef,\n wrapperRef,\n textColor,\n screenReaderLabel,\n ...radioButtonProps\n}) => {\n return (\n <div ref={wrapperRef}>\n <label>\n <Row alignItems={\"center\"}>\n <RadioButton ref={inputRef} {...radioButtonProps} />\n <Space />\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <Text\n color={textColor}\n aria-hidden={Boolean(screenReaderLabel)}\n userSelect={\"none\"}\n >\n {label}\n </Text>\n </Row>\n </label>\n </div>\n );\n};\n","import {\n FocusEventHandler,\n KeyboardEvent,\n KeyboardEventHandler,\n RefObject,\n useCallback,\n useRef,\n} from \"react\";\n\nexport type MoveDirection = \"right\" | \"left\" | \"down\" | \"up\";\nexport type TextInputElement = HTMLTextAreaElement | HTMLInputElement;\n\nexport const useKeyboardNavigation = <TElement extends TextInputElement>(\n ref: RefObject<TElement | null>,\n /**\n * User-provided onKeyDown. Internal handler should forward calls to this.\n * */\n onKeyDown: KeyboardEventHandler<TElement> | undefined,\n onEnter: (() => void) | undefined,\n onEsc: (() => void) | undefined,\n /**\n * onMove callback, triggered when user tries to move outside of field using arrow keys, tab or shift+tab.\n * */\n onMove: ((direction: MoveDirection) => void) | undefined,\n onDone: ((value: string) => void) | undefined,\n onBlur: FocusEventHandler<TElement> | undefined,\n onFocus: FocusEventHandler<TElement> | undefined,\n) => {\n const wasHandled = useRef(false);\n\n const onBlurHandler: FocusEventHandler<TElement> = (ev) => {\n if (!wasHandled.current) {\n onDone?.(ev.target.value ?? \"\");\n }\n onBlur?.(ev);\n };\n\n const onFocusHandler: FocusEventHandler<TElement> = (ev) => {\n wasHandled.current = false;\n onFocus?.(ev);\n };\n\n const onKeyDownHandler: KeyboardEventHandler<TElement> = useCallback(\n (ev) => {\n const { key } = ev;\n if (key === \"Enter\") {\n wasHandled.current = true;\n onEnter?.();\n onDone?.(ev.currentTarget.value ?? \"\");\n } else if (key === \"Escape\") {\n wasHandled.current = true;\n onEsc?.();\n ev.preventDefault();\n ev.stopPropagation();\n } else if (onMove) {\n const blurMoveAndCancel = (\n direction: MoveDirection,\n e: KeyboardEvent<TElement>,\n ) => {\n wasHandled.current = true;\n ref.current!.blur();\n onMove(direction);\n e.preventDefault();\n e.stopPropagation();\n };\n\n if (ev.shiftKey && key === \"Tab\") {\n blurMoveAndCancel(\"left\", ev);\n } else if (key === \"Tab\") {\n blurMoveAndCancel(\"right\", ev);\n } else if (key === \"ArrowUp\") {\n blurMoveAndCancel(\"up\", ev);\n } else if (key === \"ArrowDown\") {\n blurMoveAndCancel(\"down\", ev);\n } else if (key === \"ArrowRight\") {\n if (ref.current!.value.length === ref.current!.selectionStart) {\n blurMoveAndCancel(\"right\", ev);\n }\n } else if (key === \"ArrowLeft\") {\n if (ref.current!.selectionStart === 0) {\n blurMoveAndCancel(\"left\", ev);\n }\n }\n }\n\n if (onKeyDown) {\n onKeyDown(ev);\n }\n },\n [onEsc, onMove, onKeyDown, ref, onEnter, onDone],\n );\n\n return {\n onKeyDownHandler,\n onBlurHandler,\n onFocusHandler,\n };\n};\n","import { RefObject, useEffect } from \"react\";\nimport { TextInputElement } from \"./UseKeyboardNavigation\";\n\nexport function elementHasSelectionRange(element: TextInputElement): boolean {\n if (element.tagName === \"TEXTAREA\") {\n return true;\n }\n\n if (\n element.tagName === \"INPUT\" &&\n (element.type === \"text\" ||\n element.type === \"search\" ||\n element.type === \"url\" ||\n element.type === \"tel\" ||\n element.type === \"password\")\n ) {\n return true;\n }\n\n return false;\n}\n\nexport const useSelectAllOnMount = (\n ref: RefObject<TextInputElement | null>,\n moveCursorToEnd: boolean,\n enabled: boolean,\n) => {\n useEffect(() => {\n if (!ref.current) {\n return;\n }\n\n /*\n `selectionStart`, `selectionEnd` properties and `setSelectionRange` method apply only to inputs of types text, search, URL, tel and password.\n Chrome, starting from version 33, throws an exception while accessing those properties and method on the rest of input types.\n https://html.spec.whatwg.org/multipage/input.html#concept-input-apply\n */\n if (!elementHasSelectionRange(ref.current)) {\n return;\n }\n\n if (enabled) {\n ref.current.setSelectionRange(0, ref.current.value.length);\n } else if (moveCursorToEnd) {\n ref.current.setSelectionRange(\n ref.current.value.length,\n ref.current.value.length,\n );\n }\n }, [moveCursorToEnd, ref, enabled]);\n};\n","import {\n ChangeEvent,\n ChangeEventHandler,\n CSSProperties,\n FocusEventHandler,\n KeyboardEventHandler,\n RefObject,\n useCallback,\n} from \"react\";\nimport { TextInputVariant } from \"../components/ui/text-input/TextInput\";\nimport {\n MoveDirection,\n TextInputElement,\n useKeyboardNavigation,\n} from \"./UseKeyboardNavigation\";\nimport { useSelectAllOnMount } from \"./UseSelectAllOnMount\";\nimport { FullOnChangeProps } from \"../components/ui/types\";\n\ninterface UseTextInputOptions<TElement extends TextInputElement>\n extends FullOnChangeProps<string, ChangeEvent<TElement>> {\n wrapperStyle?: CSSProperties;\n wrapperClassName?: string;\n variant?: TextInputVariant;\n hideBorder?: boolean;\n selectAllOnMount?: boolean;\n moveCursorToEndOnMount?: boolean;\n onDone?: (value: string) => void;\n onEnter?: () => void;\n onEsc?: () => void;\n autoFocus?: boolean;\n /** onMove callback, triggered when user tries to move outside of field using arrow keys, tab or shift+tab. */\n onMove?: (direction: MoveDirection) => void;\n onFocus?: FocusEventHandler<TElement>;\n onBlur?: FocusEventHandler<TElement>;\n onKeyDown?: KeyboardEventHandler<TElement>;\n}\n\ninterface UseTextInputHookResult<TElement extends TextInputElement> {\n autoFocus?: boolean;\n onChange: ChangeEventHandler<TElement>;\n onFocus: FocusEventHandler<TElement>;\n onBlur: FocusEventHandler<TElement>;\n onKeyDown: KeyboardEventHandler<TElement>;\n}\n\nexport const useTextInput = <TElement extends TextInputElement>(\n ref: RefObject<TElement | null>,\n {\n onEnter,\n onEsc,\n onChange,\n onValueChange,\n selectAllOnMount,\n moveCursorToEndOnMount,\n onDone,\n onMove,\n onFocus,\n onBlur,\n onKeyDown,\n autoFocus,\n }: UseTextInputOptions<TElement>,\n): UseTextInputHookResult<TElement> => {\n useSelectAllOnMount(ref, !!moveCursorToEndOnMount, !!selectAllOnMount);\n\n const { onKeyDownHandler, onFocusHandler, onBlurHandler } =\n useKeyboardNavigation<TElement>(\n ref,\n onKeyDown,\n onEnter,\n onEsc,\n onMove,\n onDone,\n onBlur,\n onFocus,\n );\n\n const onChangeHandler = useCallback<ChangeEventHandler<TElement>>(\n (ev) => {\n onChange?.(ev);\n onValueChange?.(ev.target.value);\n },\n [onChange, onValueChange],\n );\n\n return {\n onBlur: onBlurHandler,\n onChange: onChangeHandler,\n onFocus: onFocusHandler,\n onKeyDown: onKeyDownHandler,\n autoFocus: selectAllOnMount || autoFocus,\n };\n};\n","import { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport { Space } from \"@stenajs-webui/core\";\nimport cx from \"classnames\";\nimport * as React from \"react\";\nimport styles from \"./TextInput.module.css\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nexport interface TextInputIconProps {\n iconClassName?: string;\n content?: React.ReactNode;\n button?: React.ReactNode;\n icon?: IconDefinition;\n spaceOnRight?: boolean;\n spaceOnLeft?: boolean;\n disableContentPadding?: boolean;\n disableContentPaddingLeft?: boolean;\n disableContentPaddingRight?: boolean;\n}\n\nexport const TextInputIcon: React.FC<TextInputIconProps> = ({\n button,\n icon,\n iconClassName,\n content,\n spaceOnLeft,\n spaceOnRight,\n disableContentPadding,\n disableContentPaddingLeft,\n disableContentPaddingRight,\n}) => {\n if (!content && !icon && !button) {\n return null;\n }\n\n if (button) {\n return (\n <>\n {spaceOnLeft ? <Space num={0.25} /> : null}\n {button}\n {spaceOnRight ? <Space num={0.25} /> : null}\n </>\n );\n }\n\n if (content) {\n return (\n <>\n {spaceOnLeft &&\n !(disableContentPadding || disableContentPaddingLeft) ? (\n <Space />\n ) : null}\n {content || null}\n {spaceOnRight &&\n !(disableContentPadding || disableContentPaddingRight) ? (\n <Space />\n ) : null}\n </>\n );\n }\n\n return (\n <>\n {spaceOnLeft ? <Space /> : null}\n {icon && (\n <FontAwesomeIcon\n icon={icon}\n className={cx(styles.icon, iconClassName)}\n />\n )}\n {spaceOnRight ? <Space /> : null}\n </>\n );\n};\n","import { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport { InputProps } from \"@stenajs-webui/core\";\nimport {\n InputSpinner,\n stenaCheck,\n stenaExclamationTriangle,\n} from \"@stenajs-webui/elements\";\nimport cx from \"classnames\";\nimport * as React from \"react\";\nimport { ChangeEvent, CSSProperties, useRef } from \"react\";\nimport { MoveDirection } from \"../../../hooks/UseKeyboardNavigation\";\nimport { useTextInput } from \"../../../hooks/UseTextInput\";\nimport { FullOnChangeProps } from \"../types\";\nimport styles from \"./TextInput.module.css\";\nimport { TextInputIcon } from \"./TextInputIcon\";\n\nexport type TextInputBorderVariant =\n | \"normalBorder\"\n | \"onlyTop\"\n | \"onlyBottom\"\n | \"onlyLeft\"\n | \"onlyRight\";\n\nexport type TextInputVariant =\n | \"standard\"\n | \"loading\"\n | \"warning\"\n | \"error\"\n | \"modified\"\n | \"success\";\n\ninterface ExtraContent {\n /** React node to put to the left. Left icon is ignored if this is set. */\n contentLeft?: React.ReactNode;\n /** React node to put to the right. Right icon is ignored if this is set. */\n contentRight?: React.ReactNode;\n /** TextInputButton to the left. Left icon and content is ignored if this is set. */\n buttonLeft?: React.ReactNode;\n /** React node to put to the right. Right icon and content is ignored if this is set. */\n buttonRight?: React.ReactNode;\n /** If true, there will be no padding between contentLeft/contentRight and the border. */\n disableContentPadding?: boolean;\n /** If true, there will be no padding between contentLeft and the border. */\n disableContentPaddingLeft?: boolean;\n /** If true, there will be no padding between contentRight and the border. */\n disableContentPaddingRight?: boolean;\n /** Icon on the left side. */\n iconLeft?: IconDefinition;\n /** Icon on the right side. */\n iconRight?: IconDefinition;\n}\n\nexport interface TextInputProps\n extends FullOnChangeProps<string, ChangeEvent<HTMLInputElement>>,\n InputProps,\n ExtraContent {\n wrapperStyle?: CSSProperties;\n wrapperClassName?: string;\n variant?: TextInputVariant;\n hideBorder?: boolean;\n selectAllOnMount?: boolean;\n moveCursorToEndOnMount?: boolean;\n onDone?: (value: string) => void;\n onEnter?: () => void;\n onEsc?: () => void;\n autoFocus?: boolean;\n /** onMove callback, triggered when user tries to move outside of field using arrow keys, tab or shift+tab. */\n onMove?: (direction: MoveDirection) => void;\n borderRadiusVariant?: TextInputBorderVariant;\n alwaysShowPlaceholder?: boolean;\n}\n\nexport const TextInput: React.FC<TextInputProps> = (props) => {\n const {\n variant = \"standard\",\n inputRef,\n disabled,\n className,\n buttonLeft,\n buttonRight,\n contentLeft,\n contentRight,\n disableContentPadding,\n disableContentPaddingLeft,\n disableContentPaddingRight,\n iconLeft,\n iconRight,\n moveCursorToEndOnMount,\n selectAllOnMount,\n autoFocus,\n onValueChange,\n wrapperClassName,\n wrapperStyle,\n onDone,\n onEnter,\n onEsc,\n onMove,\n onChange,\n onKeyDown,\n hideBorder,\n onFocus,\n onBlur,\n borderRadiusVariant = \"normalBorder\",\n width,\n alwaysShowPlaceholder,\n ...inputProps\n } = props;\n const localRef = useRef<HTMLInputElement>(null);\n const refToUse = inputRef ?? localRef;\n const hookProps = useTextInput<HTMLInputElement>(refToUse, {\n onEnter,\n onEsc,\n onChange,\n onValueChange,\n selectAllOnMount,\n moveCursorToEndOnMount,\n onDone,\n onMove,\n onFocus,\n onBlur,\n onKeyDown,\n autoFocus,\n });\n\n const currentIconRight =\n variant === \"success\"\n ? stenaCheck\n : variant === \"warning\" || variant === \"error\"\n ? stenaExclamationTriangle\n : iconRight;\n\n const currentContentRight =\n variant === \"loading\" ? <InputSpinner /> : contentRight;\n\n return (\n <div\n className={cx(\n styles.textInput,\n styles[variant],\n styles[borderRadiusVariant],\n {\n [styles.disabled]: disabled,\n },\n {\n [styles.hideBorder]: hideBorder,\n },\n wrapperClassName,\n )}\n style={{ width, ...wrapperStyle }}\n >\n <TextInputIcon\n content={contentLeft}\n disableContentPadding={disableContentPadding}\n disableContentPaddingLeft={disableContentPaddingLeft}\n disableContentPaddingRight={disableContentPaddingRight}\n icon={iconLeft}\n spaceOnLeft\n button={buttonLeft}\n />\n <input\n className={cx(\n styles.input,\n {\n [styles.alwaysShowPlaceholder]: alwaysShowPlaceholder,\n },\n className,\n )}\n type={\"text\"}\n disabled={disabled}\n ref={refToUse}\n autoFocus={autoFocus}\n {...inputProps}\n {...hookProps}\n />\n <TextInputIcon\n content={currentContentRight}\n disableContentPadding={disableContentPadding}\n disableContentPaddingLeft={disableContentPaddingLeft}\n disableContentPaddingRight={disableContentPaddingRight}\n icon={currentIconRight}\n spaceOnRight\n button={buttonRight}\n />\n </div>\n );\n};\n","import { parseFloatElseUndefined } from \"@stenajs-webui/core\";\n\nexport const onStepValueChange = ({\n onValueChange,\n value,\n numSteps,\n min,\n max,\n}: {\n onValueChange: ((value: string) => void) | undefined;\n value: string | undefined;\n numSteps: number;\n min: number | undefined;\n max: number | undefined;\n}) => {\n if (onValueChange) {\n if (!value) {\n onValueChange(String(limitWithinRange(numSteps, min, max)));\n } else {\n const parsedValue = parseFloatElseUndefined(value);\n const newValue = (parsedValue || 0) + numSteps;\n onValueChange(String(limitWithinRange(newValue, min, max)));\n }\n }\n};\n\nexport const onTextValueChange = ({\n onValueChange,\n newValue,\n min,\n max,\n}: {\n onValueChange: ((value: string) => void) | undefined;\n newValue: string;\n min: number | undefined;\n max: number | undefined;\n}) => {\n if (onValueChange) {\n if (newValue === \"\") {\n onValueChange(\"\");\n } else {\n const parsedValue = parseFloatElseUndefined(newValue);\n const value = parsedValue || 0;\n onValueChange(String(limitWithinRange(value, min, max)));\n }\n }\n};\n\nconst limitWithinRange = (\n value: number,\n min?: number,\n max?: number,\n): number => {\n let v = value;\n if (min != null) {\n v = Math.max(min, v);\n }\n if (max != null) {\n v = Math.min(max, v);\n }\n return v;\n};\n","import { Omit, Space } from \"@stenajs-webui/core\";\nimport { UpDownButtons } from \"@stenajs-webui/elements\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { TextInput, TextInputProps } from \"../text-input/TextInput\";\nimport styles from \"./NumericTextInput.module.css\";\nimport cx from \"classnames\";\nimport {\n onStepValueChange,\n onTextValueChange,\n} from \"../../../utils/NumericHelpers\";\n\nexport interface NumericTextInputProps\n extends Omit<\n TextInputProps,\n | \"onChange\" // Omit onChange, since up down buttons don't generate HTMLInput event.\n | \"selectAllOnMount\" // Not supported by browser when input type='number'\n | \"moveCursorToEndOnMount\" // Not supported by browser when input type='number'\n > {\n max?: number;\n min?: number;\n step?: number;\n hideButtons?: boolean;\n}\n\n/**\n * @deprecated Please use NumericStepper instead.\n * This is used internally, and should not be used by apps.\n */\nexport const NumericTextInput: React.FC<NumericTextInputProps> = ({\n value,\n onValueChange,\n max,\n min,\n step = 1,\n contentRight,\n disabled,\n className,\n hideButtons,\n ...restProps\n}) => {\n const onClick = useCallback(\n (numSteps: number) => {\n onStepValueChange({ onValueChange, value, numSteps, min, max });\n },\n [value, max, min, onValueChange],\n );\n const onChange = useCallback(\n (newValue: string) => {\n onTextValueChange({ onValueChange, newValue, min, max });\n },\n [max, min, onValueChange],\n );\n\n const contentRightToUse = hideButtons ? (\n contentRight\n ) : (\n <>\n {contentRight && (\n <>\n {contentRight}\n <Space />\n </>\n )}\n <UpDownButtons\n onClickUp={disabled ? undefined : () => onClick(step)}\n onClickDown={disabled ? undefined : () => onClick(-step)}\n iconColor={\"var(--swui-textinput-text-color)\"}\n disabled={disabled}\n />\n </>\n );\n\n return (\n <TextInput\n contentRight={contentRightToUse}\n value={value}\n onValueChange={onChange}\n disableContentPaddingRight={!hideButtons}\n type={\"number\"}\n min={min}\n max={max}\n step={step}\n className={cx(styles.numericTextInputInput, className)}\n disabled={disabled}\n {...restProps}\n />\n );\n};\n","import { useCallback, useMemo } from \"react\";\nimport { ValueAndOnValueChangeProps } from \"../../types\";\nimport { NumericTextInputProps } from \"../NumericTextInput\";\nimport { parseFloatElseUndefined } from \"@stenajs-webui/core\";\n\nexport type NumericInputValueProps = ValueAndOnValueChangeProps<\n number | undefined\n>;\n\nexport const useNumericInputValue = (\n value: number | undefined,\n onValueChange?: (value: number | undefined) => void,\n): Partial<NumericTextInputProps> => {\n const onValueChangeString = useCallback(\n (newValue: string) => {\n if (onValueChange) {\n if (!newValue) {\n onValueChange(undefined);\n } else {\n const n = parseFloatElseUndefined(newValue);\n if (n !== undefined) {\n onValueChange(n);\n }\n }\n }\n },\n [onValueChange],\n );\n\n const valueString = useMemo(() => {\n if (value === undefined) {\n return \"\";\n }\n return String(value);\n }, [value]);\n\n return {\n onValueChange: onValueChangeString,\n value: valueString,\n };\n};\n","import { isNil } from \"lodash-es\";\nimport { parseFloatElseUndefined } from \"@stenajs-webui/core\";\n\nexport const isMinReached = (\n value: string | undefined,\n min: number | undefined,\n) => {\n if (!isNil(value)) {\n const numericValue = parseFloatElseUndefined(value);\n return !isNil(numericValue) && !isNil(min) && numericValue <= min;\n } else {\n return false;\n }\n};\n\nexport const isMaxReached = (\n value: string | undefined,\n max: number | undefined,\n) => {\n if (!isNil(value)) {\n const numericValue = parseFloatElseUndefined(value);\n return !isNil(numericValue) && !isNil(max) && numericValue >= max;\n } else {\n return false;\n }\n};\n","import { Omit, Row, Space } from \"@stenajs-webui/core\";\nimport { FlatButton, stenaPlus, stenaMinus } from \"@stenajs-webui/elements\";\nimport * as React from \"react\";\nimport {\n NumericTextInput,\n NumericTextInputProps,\n} from \"../numeric-text-input/NumericTextInput\";\nimport { useCallback } from \"react\";\nimport { isMaxReached, isMinReached } from \"../../../utils/NumberComparator\";\nimport {\n onStepValueChange,\n onTextValueChange,\n} from \"../../../utils/NumericHelpers\";\n\nexport interface NumericStepperProps\n extends Omit<NumericTextInputProps, \"hideButtons\"> {}\n\nexport const NumericStepper: React.FC<NumericStepperProps> = ({\n disabled,\n onValueChange,\n value,\n max,\n min,\n step = 1,\n ...restProps\n}) => {\n const onClick = useCallback(\n (numSteps: number) => {\n onStepValueChange({ onValueChange, value, numSteps, min, max });\n },\n [value, max, min, onValueChange],\n );\n const onChange = useCallback(\n (newValue: string) => {\n onTextValueChange({ onValueChange, newValue, min, max });\n },\n [max, min, onValueChange],\n );\n\n return (\n <Row role={\"group\"}>\n <FlatButton\n leftIcon={stenaMinus}\n aria-label={\"Decrease\"}\n disabled={disabled || isMinReached(value, min)}\n onClick={() => onClick(-step)}\n />\n <Space />\n <NumericTextInput\n hideButtons\n onValueChange={onChange}\n value={value}\n max={max}\n min={min}\n step={step}\n disabled={disabled}\n {...restProps}\n />\n <Space />\n <FlatButton\n leftIcon={stenaPlus}\n aria-label={\"Increase\"}\n disabled={disabled || isMaxReached(value, max)}\n onClick={() => onClick(step)}\n />\n </Row>\n );\n};\n","import * as React from \"react\";\nimport { useState } from \"react\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport { TextInput, TextInputProps } from \"../text-input/TextInput\";\nimport {\n stenaEyeHide,\n stenaEyeShow,\n TextInputButton,\n} from \"@stenajs-webui/elements\";\n\nexport interface PasswordInputProps extends TextInputProps {\n visibleIcon?: IconDefinition;\n hiddenIcon?: IconDefinition;\n}\n\nexport const PasswordInput: React.FC<PasswordInputProps> = ({\n hiddenIcon = stenaEyeShow,\n visibleIcon = stenaEyeHide,\n ...props\n}) => {\n const [isPassword, setIsPassword] = useState(true);\n\n return (\n <TextInput\n buttonRight={\n <TextInputButton\n icon={isPassword ? hiddenIcon : visibleIcon}\n onClick={() => setIsPassword((x) => !x)}\n />\n }\n type={isPassword ? \"password\" : \"text\"}\n {...props}\n />\n );\n};\n","import { getDataProps, Text } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\nexport interface InputLabelTextProps {\n disabled?: boolean;\n text?: string;\n}\n\nexport const InputLabelText: React.FC<InputLabelTextProps> = ({\n disabled,\n text,\n ...props\n}) => {\n return (\n <Text\n variant={\"bold\"}\n color={cssColor(disabled ? \"--silver\" : \"--tjara\")}\n size={\"small\"}\n {...getDataProps(props)}\n >\n {text}\n </Text>\n );\n};\n","import * as React from \"react\";\nimport { InputLabelText } from \"./InputLabelText\";\nimport { ScreenReaderOnlyText } from \"@stenajs-webui/core\";\n\nexport interface InputLabelProps {\n htmlFor?: string;\n label?: string;\n screenReaderLabel?: string;\n className?: string;\n disabled?: boolean;\n}\n\nexport const InputLabel: React.FC<InputLabelProps> = ({\n htmlFor,\n screenReaderLabel,\n label,\n disabled,\n className,\n}) => {\n return (\n <label htmlFor={htmlFor} className={className}>\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <InputLabelText\n aria-hidden={Boolean(screenReaderLabel)}\n text={label}\n disabled={disabled}\n />\n </label>\n );\n};\n","import * as React from \"react\";\nimport { ChangeEvent, PropsWithChildren, useCallback, useId } from \"react\";\nimport { Icon, stenaAngleDown } from \"@stenajs-webui/elements\";\nimport cx from \"classnames\";\nimport { InputLabel } from \"../input-label/InputLabel\";\nimport styles from \"./LabelledSelect.module.css\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport { ValueAndOnValueChangeProps } from \"../types\";\nimport { SelectElementProps } from \"@stenajs-webui/core\";\n\nexport type SelectBorderVariant =\n | \"normalBorder\"\n | \"onlyTopBorder\"\n | \"onlyBottomBorder\"\n | \"onlyLeftBorder\"\n | \"onlyRightBorder\";\n\nexport interface LabelledSelectProps\n extends ValueAndOnValueChangeProps<string>,\n PropsWithChildren,\n Omit<SelectElementProps, \"value\" | \"size\"> {\n id?: string;\n name: string;\n label?: string;\n screenReaderLabel?: string;\n borderVariant?: SelectBorderVariant;\n variant?: LabelledSelectVariant;\n size?: LabelledSelectSize;\n}\n\nexport type LabelledSelectVariant = \"normal\" | \"error\";\nexport type LabelledSelectSize = \"medium\" | \"large\";\n\nexport const LabelledSelect: React.FC<LabelledSelectProps> = ({\n onChange,\n onValueChange,\n id,\n label,\n screenReaderLabel,\n borderVariant = \"normalBorder\",\n variant = \"normal\",\n size = \"medium\",\n children,\n ...inputProps\n}) => {\n const hookId = useId();\n\n const activeId = id ?? hookId;\n\n const onChangeHandler = useCallback(\n (e: ChangeEvent<HTMLSelectElement>) => {\n onChange?.(e);\n onValueChange?.(e.target.value);\n },\n [onChange, onValueChange],\n );\n\n return (\n <div\n className={cx(\n styles.labelledSelect,\n styles[variant],\n styles[size],\n styles[borderVariant],\n )}\n >\n <InputLabel\n htmlFor={activeId}\n className={styles.label}\n label={label}\n screenReaderLabel={screenReaderLabel}\n />\n <select\n id={activeId}\n onChange={onChangeHandler}\n className={cx(styles.select, styles[variant], styles[size])}\n {...inputProps}\n >\n {children}\n </select>\n\n <div className={cx(styles.iconWrapper)}>\n <Icon\n icon={stenaAngleDown}\n size={24}\n color={cssColor(\"--modern-blue\")}\n />\n </div>\n </div>\n );\n};\n","import * as React from \"react\";\nimport { ChangeEventHandler, useCallback, useId } from \"react\";\nimport cx from \"classnames\";\nimport { InputLabel } from \"../input-label/InputLabel\";\nimport styles from \"./LabelledTextInput.module.css\";\nimport { InputElementProps } from \"@stenajs-webui/core\";\nimport { ValueAndOnValueChangeProps } from \"../types\";\n\nexport type LabelledTextInputVariant = \"normal\" | \"error\";\nexport type LabelledTextInputSize = \"medium\" | \"large\";\n\nexport type LabelledTextInputBorderVariant =\n | \"normalBorder\"\n | \"onlyTop\"\n | \"onlyBottom\"\n | \"onlyLeft\"\n | \"onlyRight\";\n\nexport interface LabelledTextInputProps\n extends Omit<InputElementProps, \"value\" | \"size\">,\n ValueAndOnValueChangeProps<string> {\n id?: string;\n label?: string;\n size?: LabelledTextInputSize;\n screenReaderLabel?: string;\n pattern?: string;\n borderRadiusVariant?: LabelledTextInputBorderVariant;\n variant?: LabelledTextInputVariant;\n}\n\nexport const LabelledTextInput = React.forwardRef<\n HTMLInputElement,\n LabelledTextInputProps\n>(\n (\n {\n autoComplete = \"off\",\n label,\n id,\n screenReaderLabel,\n size = \"medium\",\n value,\n onChange,\n disabled,\n onValueChange,\n borderRadiusVariant = \"normalBorder\",\n variant = \"normal\",\n width,\n ...inputProps\n },\n ref,\n ) => {\n const hookId = useId();\n\n const activeId = id ?? hookId;\n\n const onChangeHandler = useCallback<ChangeEventHandler<HTMLInputElement>>(\n (ev) => {\n onChange?.(ev);\n onValueChange?.(ev.target.value);\n },\n [onChange, onValueChange],\n );\n\n return (\n <div\n className={cx(\n styles.labelledTextInput,\n styles[variant],\n styles[borderRadiusVariant],\n styles[size],\n disabled && styles.disabled,\n )}\n style={width ? { width } : undefined}\n >\n <InputLabel\n htmlFor={activeId}\n screenReaderLabel={screenReaderLabel}\n label={label}\n />\n <input\n ref={ref}\n id={activeId}\n autoComplete={autoComplete}\n type={\"text\"}\n value={value}\n onChange={onChangeHandler}\n disabled={disabled}\n {...inputProps}\n />\n </div>\n );\n },\n);\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./TextInput.module.css\";\nimport cx from \"classnames\";\nimport { TextInputProps } from \"./TextInput\";\nimport { TextInputIcon } from \"./TextInputIcon\";\nimport {\n InputSpinner,\n stenaCheck,\n stenaExclamationTriangle,\n TextInputButton,\n} from \"@stenajs-webui/elements\";\nimport { ButtonElementProps, Row } from \"@stenajs-webui/core\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\nexport interface TextInputBoxProps\n extends Pick<\n TextInputProps,\n | \"variant\"\n | \"wrapperClassName\"\n | \"disabled\"\n | \"wrapperStyle\"\n | \"contentLeft\"\n | \"contentRight\"\n | \"disableContentPadding\"\n | \"disableContentPaddingLeft\"\n | \"disableContentPaddingRight\"\n > {\n children?: ReactNode;\n iconRight?: IconDefinition;\n iconLeft?: IconDefinition;\n onClickLeft?: ButtonElementProps[\"onClick\"];\n onClickRight?: ButtonElementProps[\"onClick\"];\n}\n\nexport const TextInputBox: React.FC<TextInputBoxProps> = ({\n variant = \"standard\",\n disabled,\n wrapperClassName,\n wrapperStyle,\n contentLeft,\n contentRight,\n disableContentPadding,\n disableContentPaddingLeft,\n disableContentPaddingRight,\n iconRight,\n iconLeft,\n onClickLeft,\n onClickRight,\n children,\n}) => {\n const currentIconRight =\n variant === \"success\"\n ? stenaCheck\n : variant === \"warning\" || variant === \"error\"\n ? stenaExclamationTriangle\n : iconRight;\n\n const currentContentRight =\n variant === \"loading\" ? <InputSpinner /> : contentRight;\n\n return (\n <div\n className={cx(\n styles.textInput,\n styles.inputContainer,\n styles[variant],\n {\n [styles.disabled]: disabled,\n },\n wrapperClassName,\n )}\n style={wrapperStyle}\n >\n <TextInputIcon\n content={contentLeft}\n disableContentPadding={disableContentPadding}\n disableContentPaddingLeft={disableContentPaddingLeft}\n disableContentPaddingRight={disableContentPaddingRight}\n spaceOnLeft\n button={\n iconLeft ? (\n <TextInputButton onClick={onClickLeft} icon={iconLeft} />\n ) : undefined\n }\n />\n <Row alignItems={\"center\"}>{children}</Row>\n <TextInputIcon\n content={currentContentRight}\n disableContentPadding={disableContentPadding}\n disableContentPaddingLeft={disableContentPaddingLeft}\n disableContentPaddingRight={disableContentPaddingRight}\n spaceOnRight\n button={\n currentIconRight ? (\n <TextInputButton onClick={onClickRight} icon={currentIconRight} />\n ) : undefined\n }\n />\n </div>\n );\n};\n","import * as React from \"react\";\nimport {\n ChangeEvent,\n ChangeEventHandler,\n ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n} from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./TextArea.module.css\";\nimport { FullOnChangeProps } from \"../types\";\n\ntype Resize =\n | \"none\"\n | \"both\"\n | \"horizontal\"\n | \"vertical\"\n | \"inherit\"\n | \"initial\"\n | \"revert\"\n | \"unset\";\n\nexport interface TextAreaProps\n extends Omit<ComponentPropsWithoutRef<\"textarea\">, \"value\">,\n FullOnChangeProps<string, ChangeEvent<HTMLTextAreaElement>> {\n resize?: Resize;\n readOnly?: boolean;\n rows?: number;\n disabled?: boolean;\n}\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n className,\n value,\n onValueChange,\n onChange,\n resize = \"none\",\n readOnly = false,\n rows,\n disabled,\n ...textAreaProps\n },\n ref,\n ) => {\n const onChangeHandler: ChangeEventHandler<HTMLTextAreaElement> =\n useCallback(\n (ev) => {\n if (onChange) {\n onChange(ev);\n }\n if (onValueChange) {\n onValueChange(ev.target.value);\n }\n },\n [onChange, onValueChange],\n );\n\n return (\n <textarea\n disabled={disabled}\n rows={rows}\n readOnly={readOnly}\n className={cx(styles.textArea, className)}\n style={{ resize }}\n onChange={onChangeHandler}\n value={value}\n ref={ref}\n {...textAreaProps}\n />\n );\n },\n);\n","import { useTimeoutState } from \"@stenajs-webui/core\";\nimport {\n FlatButton,\n FlatButtonProps,\n stenaCopy,\n} from \"@stenajs-webui/elements\";\nimport { Tooltip } from \"@stenajs-webui/tooltip\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\n\nexport interface CopyToClipboardButtonProps {\n value?: string;\n tooltipLabel?: string;\n size?: FlatButtonProps[\"size\"];\n}\n\nexport function CopyToClipboardButton({\n value,\n tooltipLabel = \"Copied to clipboard!\",\n size = \"small\",\n}: CopyToClipboardButtonProps) {\n const [visible, setVisible] = useTimeoutState(false, 2000);\n\n const onClick = useCallback(async () => {\n if (value != null) {\n await navigator.clipboard.writeText(value);\n setVisible(true);\n }\n }, [setVisible, value]);\n\n return (\n <Tooltip visible={visible} label={tooltipLabel}>\n <FlatButton\n size={size}\n onClick={onClick}\n leftIcon={stenaCopy}\n disabled={value == null}\n />\n </Tooltip>\n );\n}\n"],"names":["ReadOnlyNumericInput","value","id","props","jsx","styles","AmountStepperButtons","onValueChange","decreaseDisabled","increaseDisabled","inputId","ariaLabelDecrease","ariaLabelIncrease","textValueAriaLabel","increaseTestId","decreaseTestId","onIncrease","onDecrease","size","onClickPlus","useCallback","onClickMinus","jsxs","Row","PrimaryButton","stenaMinus","stenaPlus","styleChecked","Switch","disabled","className","wrapperRef","restProps","SwitchWithLabel","label","textColor","screenReaderLabel","switchProps","Box","Space","ScreenReaderOnlyText","Text","Checkbox","forwardRef","indeterminate","onChange","inputProps","ref","localRef","useRef","setRef","element","handleInputChange","ev","useEffect","cx","CheckboxWithLabel","children","inputRef","checkboxProps","RadioButton","name","RadioButtonBox","variant","icon","contentRight","style","radioButtonClassName","radioButtonProps","cssColor","Icon","RadioButtonWithLabel","useKeyboardNavigation","onKeyDown","onEnter","onEsc","onMove","onDone","onBlur","onFocus","wasHandled","onBlurHandler","onFocusHandler","key","blurMoveAndCancel","direction","e","elementHasSelectionRange","useSelectAllOnMount","moveCursorToEnd","enabled","useTextInput","selectAllOnMount","moveCursorToEndOnMount","autoFocus","onKeyDownHandler","onChangeHandler","TextInputIcon","button","iconClassName","content","spaceOnLeft","spaceOnRight","disableContentPadding","disableContentPaddingLeft","disableContentPaddingRight","Fragment","FontAwesomeIcon","TextInput","buttonLeft","buttonRight","contentLeft","iconLeft","iconRight","wrapperClassName","wrapperStyle","hideBorder","borderRadiusVariant","width","alwaysShowPlaceholder","refToUse","hookProps","currentIconRight","stenaCheck","stenaExclamationTriangle","currentContentRight","InputSpinner","onStepValueChange","numSteps","min","max","limitWithinRange","newValue","parseFloatElseUndefined","onTextValueChange","v","NumericTextInput","step","hideButtons","onClick","UpDownButtons","useNumericInputValue","onValueChangeString","n","valueString","useMemo","isMinReached","isNil","numericValue","isMaxReached","NumericStepper","FlatButton","PasswordInput","hiddenIcon","stenaEyeShow","visibleIcon","stenaEyeHide","isPassword","setIsPassword","useState","TextInputButton","x","InputLabelText","text","getDataProps","InputLabel","htmlFor","LabelledSelect","borderVariant","hookId","useId","activeId","stenaAngleDown","LabelledTextInput","React","autoComplete","TextInputBox","onClickLeft","onClickRight","TextArea","resize","readOnly","rows","textAreaProps","CopyToClipboardButton","tooltipLabel","visible","setVisible","useTimeoutState","Tooltip","stenaCopy"],"mappings":";;;;;;;;;;;;GAOaA,KAAiD,CAAC;AAAA,EAC7D,OAAAC;AAAA,EACA,IAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACE,GAAGD;AAAA,IACJ,MAAK;AAAA,IACL,IAAAD;AAAA,IACA,OAAAD;AAAA,IACA,UAAQ;AAAA,IACR,WAAWI,GAAO;AAAA,EAAA;AAAA,GCQXC,KAA4D,CAAC;AAAA,EACxE,OAAAL;AAAA,EACA,eAAAM;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC;AACF,MAAM;AACJ,QAAMC,IAAcC,EAAY,MAAM;AACpC,IAAAJ,IAAA,GACAT,IAAgBN,IAAQ,CAAC;AAAA,EAC3B,GAAG,CAACe,GAAYT,GAAeN,CAAK,CAAC,GAE/BoB,IAAeD,EAAY,MAAM;AACrC,IAAAH,IAAA,GACAV,IAAgBN,IAAQ,CAAC;AAAA,EAC3B,GAAG,CAACgB,GAAYV,GAAeN,CAAK,C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,SAASC,GAAsB;AAAA,EACpC,OAAAvL;AAAA,EACA,cAAAwL,IAAe;AAAA,EACf,MAAAvK,IAAO;AACT,GAA+B;AAC7B,QAAM,CAACwK,GAASC,CAAU,IAAIC,GAAgB,IAAO,GAAI,GAEnDjD,IAAUvH,EAAY,YAAY;AACtC,IAAInB,KAAS,SACX,MAAM,UAAU,UAAU,UAAUA,CAAK,GACzC0L,EAAW,EAAI;AAAA,EAEnB,GAAG,CAACA,GAAY1L,CAAK,CAAC;AAEtB,SACE,gBAAAG,EAACyL,IAAA,EAAQ,SAAAH,GAAkB,OAAOD,GAChC,UAAA,gBAAArL;AAAA,IAACmJ;AAAA,IAAA;AAAA,MACC,MAAArI;AAAA,MACA,SAAAyH;AAAA,MACA,UAAUmD;AAAA,MACV,UAAU7L,KAAS;AAAA,IAAA;AAAA,EAAA,GAEvB;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/components/ui/read-only-numeric-input/ReadOnlyNumericInput.tsx","../src/components/ui/amount-stepper-buttons/AmountStepperButtons.tsx","../src/components/ui/switch/Switch.tsx","../src/components/ui/switch/SwitchWithLabel.tsx","../src/components/ui/checkbox/Checkbox.tsx","../src/components/ui/checkbox/CheckboxWithLabel.tsx","../src/components/ui/radio/RadioButton.tsx","../src/components/ui/radio/RadioButtonBox.tsx","../src/components/ui/radio/RadioButtonWithLabel.tsx","../src/hooks/UseKeyboardNavigation.ts","../src/hooks/UseSelectAllOnMount.ts","../src/hooks/UseTextInput.ts","../src/components/ui/text-input/TextInputIcon.tsx","../src/components/ui/text-input/TextInput.tsx","../src/utils/NumericHelpers.ts","../src/components/ui/numeric-text-input/NumericTextInput.tsx","../src/components/ui/numeric-text-input/hooks/UseNumericInputValue.ts","../src/utils/NumberComparator.ts","../src/components/ui/numeric-stepper/NumericStepper.tsx","../src/components/ui/password-input/PasswordInput.tsx","../src/components/ui/input-label/InputLabelText.tsx","../src/components/ui/input-label/InputLabel.tsx","../src/components/ui/labelled-select/LabelledSelect.tsx","../src/components/ui/labelled-text-input/LabelledTextInput.tsx","../src/components/ui/text-input/TextInputBox.tsx","../src/components/ui/text-area/TextArea.tsx","../src/components/copy-to-clipboard-button/CopyToClipboardButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport styles from \"./ReadOnlyNumericInput.module.css\";\nimport { NumericTextInputProps } from \"../numeric-text-input/NumericTextInput\";\n\ninterface ReadInputProps\n extends Omit<NumericTextInputProps, \"readOnly\" | \"hideBorder\" | \"style\"> {}\n\nexport const ReadOnlyNumericInput: React.FC<ReadInputProps> = ({\n value,\n id,\n ...props\n}) => {\n return (\n <input\n {...props}\n type=\"number\"\n id={id}\n value={value}\n readOnly\n className={styles.readOnlyInput}\n />\n );\n};\n","import { Row } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\nimport {\n ButtonSize,\n ButtonVariant,\n PrimaryButton,\n stenaMinus,\n stenaPlus,\n} from \"@stenajs-webui/elements\";\nimport { ReadOnlyNumericInput } from \"../read-only-numeric-input/ReadOnlyNumericInput\";\n\nexport interface AmountStepperButtonsProps {\n value: number;\n variant?: ButtonVariant;\n inputId: string;\n size?: ButtonSize;\n ariaLabelIncrease: string;\n ariaLabelDecrease: string;\n onValueChange?: (value: number) => void;\n decreaseDisabled?: boolean;\n increaseDisabled?: boolean;\n textValueAriaLabel?: string;\n increaseTestId?: string;\n decreaseTestId?: string;\n onDecrease?: () => void;\n onIncrease?: () => void;\n}\n\nexport const AmountStepperButtons: React.FC<AmountStepperButtonsProps> = ({\n value,\n onValueChange,\n variant,\n decreaseDisabled,\n increaseDisabled,\n inputId,\n ariaLabelDecrease,\n ariaLabelIncrease,\n textValueAriaLabel,\n increaseTestId,\n decreaseTestId,\n onIncrease,\n onDecrease,\n size,\n}) => {\n const onClickPlus = useCallback(() => {\n onIncrease?.();\n onValueChange?.(value + 1);\n }, [onIncrease, onValueChange, value]);\n\n const onClickMinus = useCallback(() => {\n onDecrease?.();\n onValueChange?.(value - 1);\n }, [onDecrease, onValueChange, value]);\n\n return (\n <Row alignItems={\"center\"}>\n <PrimaryButton\n size={size}\n aria-label={ariaLabelDecrease}\n variant={variant}\n leftIcon={stenaMinus}\n data-testid={decreaseTestId ?? \"decrease\"}\n disabled={decreaseDisabled}\n onClick={onClickMinus}\n />\n <ReadOnlyNumericInput\n id={inputId}\n data-testid=\"amountStepperValue\"\n value={value.toString()}\n aria-label={textValueAriaLabel}\n />\n <PrimaryButton\n size={size}\n leftIcon={stenaPlus}\n variant={variant}\n aria-label={ariaLabelIncrease}\n data-testid={increaseTestId ?? \"increase\"}\n disabled={increaseDisabled}\n onClick={onClickPlus}\n />\n </Row>\n );\n};\n","import { Ref } from \"react\";\nimport * as React from \"react\";\nimport { ButtonElementProps } from \"@stenajs-webui/core\";\nimport { ValueAndOnValueChangeProps } from \"../types\";\nimport styles from \"./Switch.module.css\";\n\nexport interface SwitchProps\n extends Omit<ButtonElementProps, \"value\">,\n ValueAndOnValueChangeProps<boolean> {\n wrapperRef?: Ref<HTMLDivElement>;\n}\n\nconst styleChecked = `${styles.switch} ${styles.checked}`;\n\nexport const Switch: React.FC<SwitchProps> = ({\n value,\n disabled,\n onValueChange,\n className,\n wrapperRef,\n ...restProps\n}) => {\n return (\n <div className={className} ref={wrapperRef}>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={value}\n className={value ? styleChecked : styles.switch}\n disabled={disabled}\n onClick={() => onValueChange && onValueChange(!value)}\n {...restProps}\n >\n <div className={styles.filler} />\n <div className={styles.knob} />\n </button>\n </div>\n );\n};\n","import { Box, ScreenReaderOnlyText, Space, Text } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { Switch, SwitchProps } from \"./Switch\";\n\nexport interface SwitchWithLabelProps extends SwitchProps {\n label: string;\n /**\n * If set, this label is used by screen readers instead of label prop.\n * For example, label could be \"male\", while screenReaderLabel is \"Gender male\".\n * If not set, screen readers will use label prop.\n */\n screenReaderLabel?: string;\n textColor?: string;\n}\n\nexport const SwitchWithLabel: React.FC<SwitchWithLabelProps> = ({\n label,\n disabled,\n textColor,\n wrapperRef,\n screenReaderLabel,\n ...switchProps\n}) => {\n return (\n <div ref={wrapperRef}>\n <label>\n <Box row alignItems={\"center\"}>\n <Switch disabled={disabled} {...switchProps} />\n <Space />\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <Text\n color={textColor}\n aria-hidden={Boolean(screenReaderLabel)}\n userSelect={\"none\"}\n >\n {label}\n </Text>\n </Box>\n </label>\n </div>\n );\n};\n","import * as React from \"react\";\nimport {\n ChangeEvent,\n ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n} from \"react\";\nimport { FullOnChangeProps } from \"../types\";\nimport cx from \"classnames\";\nimport styles from \"./Checkbox.module.css\";\n\nexport type CheckboxSize = \"standard\" | \"small\";\n\nexport interface CheckboxProps\n extends FullOnChangeProps<boolean, ChangeEvent<HTMLInputElement>>,\n Omit<ComponentPropsWithoutRef<\"input\">, \"size\" | \"value\"> {\n indeterminate?: boolean;\n size?: CheckboxSize;\n disabled?: boolean;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n (\n {\n indeterminate = false,\n onChange,\n onValueChange,\n value = false,\n size = \"standard\",\n className,\n ...inputProps\n },\n ref,\n ) => {\n const localRef = useRef<HTMLInputElement>(null);\n\n const setRef = (element: HTMLInputElement) => {\n localRef.current = element;\n if (localRef.current) {\n localRef.current.indeterminate = Boolean(indeterminate);\n }\n if (ref) {\n if (typeof ref === \"function\") {\n ref(element);\n } else {\n ref.current = element;\n }\n }\n };\n\n const handleInputChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(ev);\n }\n if (onValueChange) {\n onValueChange(ev.target.checked);\n }\n },\n [onChange, onValueChange],\n );\n\n useEffect(() => {\n if (localRef.current) {\n localRef.current.indeterminate = Boolean(indeterminate);\n }\n }, [indeterminate, localRef]);\n\n return (\n <input\n type={\"checkbox\"}\n className={cx(styles.checkbox, styles[size], className)}\n checked={value}\n onChange={handleInputChange}\n ref={setRef}\n {...inputProps}\n />\n );\n },\n);\n","import { Row, ScreenReaderOnlyText, Space, Text } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { Ref } from \"react\";\nimport { Checkbox, CheckboxProps } from \"./Checkbox\";\n\nexport interface CheckboxWithLabelProps extends CheckboxProps {\n label: string;\n /**\n * If set, this label is used by screen readers instead of label prop.\n * For example, label could be \"male\", while screenReaderLabel is \"Gender male\".\n * If not set, screen readers will use label prop.\n */\n screenReaderLabel?: string;\n textColor?: string;\n wrapperRef?: Ref<HTMLDivElement>;\n inputRef?: Ref<HTMLInputElement>;\n}\n\nexport const CheckboxWithLabel: React.FC<CheckboxWithLabelProps> = ({\n children,\n label,\n inputRef,\n wrapperRef,\n textColor,\n screenReaderLabel,\n ...checkboxProps\n}) => {\n return (\n <div ref={wrapperRef}>\n <label>\n <Row alignItems={\"center\"}>\n <Checkbox {...checkboxProps} ref={inputRef} />\n <Space />\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <Text\n color={textColor}\n aria-hidden={Boolean(screenReaderLabel)}\n userSelect={\"none\"}\n >\n {label}\n </Text>\n {children}\n </Row>\n </label>\n </div>\n );\n};\n","import * as React from \"react\";\nimport {\n ChangeEvent,\n ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n} from \"react\";\nimport { FullOnChangeProps } from \"../types\";\nimport styles from \"./RadioButton.module.css\";\nimport cx from \"classnames\";\n\nexport type RadioButtonSize = \"standard\" | \"small\";\n\nexport interface RadioButtonProps\n extends FullOnChangeProps<string, ChangeEvent<HTMLInputElement>>,\n Omit<ComponentPropsWithoutRef<\"input\">, \"size\" | \"value\"> {\n size?: RadioButtonSize;\n}\n\nexport const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(\n (\n {\n onChange,\n onValueChange,\n size = \"standard\",\n name,\n className,\n ...inputProps\n },\n ref,\n ) => {\n const handleInputChange = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(ev);\n }\n if (onValueChange) {\n onValueChange(ev.target.value);\n }\n },\n [onChange, onValueChange],\n );\n\n return (\n <input\n type={\"radio\"}\n name={name}\n className={cx(styles.radiobutton, styles[size], className)}\n onChange={handleInputChange}\n ref={ref}\n {...inputProps}\n />\n );\n },\n);\n","import { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport { Row, ScreenReaderOnlyText, Space, Text } from \"@stenajs-webui/core\";\nimport { Icon } from \"@stenajs-webui/elements\";\nimport cx from \"classnames\";\nimport * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./RadioButtonBox.module.css\";\nimport { RadioButton, RadioButtonProps } from \"./RadioButton\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\nexport type RadioButtonBoxVariant = \"normal\" | \"danger\";\nexport type RadioButtonBoxSizeVariant = \"medium\" | \"large\";\n\nexport type RadioButtonBoxProps =\n | RadioButtonBoxNoRightProps\n | RadioButtonBoxIconProps\n | RadioButtonBoxContentRightProps;\n\nexport interface RadioButtonBoxCommonProps\n extends Omit<RadioButtonProps, \"size\"> {\n label?: string;\n /**\n * If set, this label is used by screen readers instead of label prop.\n * For example, label could be \"male\", while screenReaderLabel is \"Gender male\".\n * If not set, screen readers will use label prop.\n */\n screenReaderLabel?: string;\n variant?: RadioButtonBoxVariant;\n size?: RadioButtonBoxSizeVariant;\n radioButtonClassName?: string;\n}\n\nexport interface RadioButtonBoxNoRightProps extends RadioButtonBoxCommonProps {\n icon?: never;\n contentRight?: never;\n}\n\nexport interface RadioButtonBoxIconProps extends RadioButtonBoxCommonProps {\n icon?: IconDefinition;\n contentRight?: never;\n}\n\nexport interface RadioButtonBoxContentRightProps\n extends RadioButtonBoxCommonProps {\n icon?: never;\n contentRight?: ReactNode;\n}\n\nexport const RadioButtonBox: React.FC<RadioButtonBoxProps> = ({\n label,\n screenReaderLabel,\n variant = \"normal\",\n size = \"medium\",\n className,\n icon,\n contentRight,\n style,\n disabled,\n radioButtonClassName,\n ...radioButtonProps\n}) => {\n const textColor = disabled\n ? cssColor(\"--swui-text-disabled-color\")\n : undefined;\n\n return (\n <label\n className={cx(\n styles.radioButtonBox,\n styles[variant],\n styles[size],\n className,\n )}\n style={style}\n >\n <Row justifyContent={\"space-between\"} flexGrow={1}>\n <Row alignItems={\"center\"}>\n <RadioButton\n {...radioButtonProps}\n disabled={disabled}\n className={radioButtonClassName}\n />\n <Space />\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <Text color={textColor} aria-hidden={Boolean(screenReaderLabel)}>\n {label}\n </Text>\n </Row>\n <Row\n alignItems={\"center\"}\n width={icon ? \"48px\" : undefined}\n justifyContent={\"center\"}\n >\n {icon && <Icon icon={icon} size={24} color={textColor} />}\n {!icon && contentRight}\n </Row>\n </Row>\n </label>\n );\n};\n","import { Row, ScreenReaderOnlyText, Space, Text } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { Ref } from \"react\";\nimport { RadioButton, RadioButtonProps } from \"./RadioButton\";\n\nexport interface RadioButtonWithLabelProps extends RadioButtonProps {\n label: string;\n /**\n * If set, this label is used by screen readers instead of label prop.\n * For example, label could be \"male\", while screenReaderLabel is \"Gender male\".\n * If not set, screen readers will use label prop.\n */\n screenReaderLabel?: string;\n textColor?: string;\n wrapperRef?: Ref<HTMLDivElement>;\n inputRef?: Ref<HTMLInputElement>;\n}\n\nexport const RadioButtonWithLabel: React.FC<RadioButtonWithLabelProps> = ({\n label,\n inputRef,\n wrapperRef,\n textColor,\n screenReaderLabel,\n ...radioButtonProps\n}) => {\n return (\n <div ref={wrapperRef}>\n <label>\n <Row alignItems={\"center\"}>\n <RadioButton ref={inputRef} {...radioButtonProps} />\n <Space />\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <Text\n color={textColor}\n aria-hidden={Boolean(screenReaderLabel)}\n userSelect={\"none\"}\n >\n {label}\n </Text>\n </Row>\n </label>\n </div>\n );\n};\n","import {\n FocusEventHandler,\n KeyboardEvent,\n KeyboardEventHandler,\n RefObject,\n useCallback,\n useRef,\n} from \"react\";\n\nexport type MoveDirection = \"right\" | \"left\" | \"down\" | \"up\";\nexport type TextInputElement = HTMLTextAreaElement | HTMLInputElement;\n\nexport const useKeyboardNavigation = <TElement extends TextInputElement>(\n ref: RefObject<TElement | null>,\n /**\n * User-provided onKeyDown. Internal handler should forward calls to this.\n * */\n onKeyDown: KeyboardEventHandler<TElement> | undefined,\n onEnter: (() => void) | undefined,\n onEsc: (() => void) | undefined,\n /**\n * onMove callback, triggered when user tries to move outside of field using arrow keys, tab or shift+tab.\n * */\n onMove: ((direction: MoveDirection) => void) | undefined,\n onDone: ((value: string) => void) | undefined,\n onBlur: FocusEventHandler<TElement> | undefined,\n onFocus: FocusEventHandler<TElement> | undefined,\n) => {\n const wasHandled = useRef(false);\n\n const onBlurHandler: FocusEventHandler<TElement> = (ev) => {\n if (!wasHandled.current) {\n onDone?.(ev.target.value ?? \"\");\n }\n onBlur?.(ev);\n };\n\n const onFocusHandler: FocusEventHandler<TElement> = (ev) => {\n wasHandled.current = false;\n onFocus?.(ev);\n };\n\n const onKeyDownHandler: KeyboardEventHandler<TElement> = useCallback(\n (ev) => {\n const { key } = ev;\n if (key === \"Enter\") {\n wasHandled.current = true;\n onEnter?.();\n onDone?.(ev.currentTarget.value ?? \"\");\n } else if (key === \"Escape\") {\n wasHandled.current = true;\n onEsc?.();\n ev.preventDefault();\n ev.stopPropagation();\n } else if (onMove) {\n const blurMoveAndCancel = (\n direction: MoveDirection,\n e: KeyboardEvent<TElement>,\n ) => {\n wasHandled.current = true;\n ref.current!.blur();\n onMove(direction);\n e.preventDefault();\n e.stopPropagation();\n };\n\n if (ev.shiftKey && key === \"Tab\") {\n blurMoveAndCancel(\"left\", ev);\n } else if (key === \"Tab\") {\n blurMoveAndCancel(\"right\", ev);\n } else if (key === \"ArrowUp\") {\n blurMoveAndCancel(\"up\", ev);\n } else if (key === \"ArrowDown\") {\n blurMoveAndCancel(\"down\", ev);\n } else if (key === \"ArrowRight\") {\n if (ref.current!.value.length === ref.current!.selectionStart) {\n blurMoveAndCancel(\"right\", ev);\n }\n } else if (key === \"ArrowLeft\") {\n if (ref.current!.selectionStart === 0) {\n blurMoveAndCancel(\"left\", ev);\n }\n }\n }\n\n if (onKeyDown) {\n onKeyDown(ev);\n }\n },\n [onEsc, onMove, onKeyDown, ref, onEnter, onDone],\n );\n\n return {\n onKeyDownHandler,\n onBlurHandler,\n onFocusHandler,\n };\n};\n","import { RefObject, useEffect } from \"react\";\nimport { TextInputElement } from \"./UseKeyboardNavigation\";\n\nexport function elementHasSelectionRange(element: TextInputElement): boolean {\n if (element.tagName === \"TEXTAREA\") {\n return true;\n }\n\n if (\n element.tagName === \"INPUT\" &&\n (element.type === \"text\" ||\n element.type === \"search\" ||\n element.type === \"url\" ||\n element.type === \"tel\" ||\n element.type === \"password\")\n ) {\n return true;\n }\n\n return false;\n}\n\nexport const useSelectAllOnMount = (\n ref: RefObject<TextInputElement | null>,\n moveCursorToEnd: boolean,\n enabled: boolean,\n) => {\n useEffect(() => {\n if (!ref.current) {\n return;\n }\n\n /*\n `selectionStart`, `selectionEnd` properties and `setSelectionRange` method apply only to inputs of types text, search, URL, tel and password.\n Chrome, starting from version 33, throws an exception while accessing those properties and method on the rest of input types.\n https://html.spec.whatwg.org/multipage/input.html#concept-input-apply\n */\n if (!elementHasSelectionRange(ref.current)) {\n return;\n }\n\n if (enabled) {\n ref.current.setSelectionRange(0, ref.current.value.length);\n } else if (moveCursorToEnd) {\n ref.current.setSelectionRange(\n ref.current.value.length,\n ref.current.value.length,\n );\n }\n }, [moveCursorToEnd, ref, enabled]);\n};\n","import {\n ChangeEvent,\n ChangeEventHandler,\n CSSProperties,\n FocusEventHandler,\n KeyboardEventHandler,\n RefObject,\n useCallback,\n} from \"react\";\nimport { TextInputVariant } from \"../components/ui/text-input/TextInput\";\nimport {\n MoveDirection,\n TextInputElement,\n useKeyboardNavigation,\n} from \"./UseKeyboardNavigation\";\nimport { useSelectAllOnMount } from \"./UseSelectAllOnMount\";\nimport { FullOnChangeProps } from \"../components/ui/types\";\n\ninterface UseTextInputOptions<TElement extends TextInputElement>\n extends FullOnChangeProps<string, ChangeEvent<TElement>> {\n wrapperStyle?: CSSProperties;\n wrapperClassName?: string;\n variant?: TextInputVariant;\n hideBorder?: boolean;\n selectAllOnMount?: boolean;\n moveCursorToEndOnMount?: boolean;\n onDone?: (value: string) => void;\n onEnter?: () => void;\n onEsc?: () => void;\n autoFocus?: boolean;\n /** onMove callback, triggered when user tries to move outside of field using arrow keys, tab or shift+tab. */\n onMove?: (direction: MoveDirection) => void;\n onFocus?: FocusEventHandler<TElement>;\n onBlur?: FocusEventHandler<TElement>;\n onKeyDown?: KeyboardEventHandler<TElement>;\n}\n\ninterface UseTextInputHookResult<TElement extends TextInputElement> {\n autoFocus?: boolean;\n onChange: ChangeEventHandler<TElement>;\n onFocus: FocusEventHandler<TElement>;\n onBlur: FocusEventHandler<TElement>;\n onKeyDown: KeyboardEventHandler<TElement>;\n}\n\nexport const useTextInput = <TElement extends TextInputElement>(\n ref: RefObject<TElement | null>,\n {\n onEnter,\n onEsc,\n onChange,\n onValueChange,\n selectAllOnMount,\n moveCursorToEndOnMount,\n onDone,\n onMove,\n onFocus,\n onBlur,\n onKeyDown,\n autoFocus,\n }: UseTextInputOptions<TElement>,\n): UseTextInputHookResult<TElement> => {\n useSelectAllOnMount(ref, !!moveCursorToEndOnMount, !!selectAllOnMount);\n\n const { onKeyDownHandler, onFocusHandler, onBlurHandler } =\n useKeyboardNavigation<TElement>(\n ref,\n onKeyDown,\n onEnter,\n onEsc,\n onMove,\n onDone,\n onBlur,\n onFocus,\n );\n\n const onChangeHandler = useCallback<ChangeEventHandler<TElement>>(\n (ev) => {\n onChange?.(ev);\n onValueChange?.(ev.target.value);\n },\n [onChange, onValueChange],\n );\n\n return {\n onBlur: onBlurHandler,\n onChange: onChangeHandler,\n onFocus: onFocusHandler,\n onKeyDown: onKeyDownHandler,\n autoFocus: selectAllOnMount || autoFocus,\n };\n};\n","import { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport { Space } from \"@stenajs-webui/core\";\nimport cx from \"classnames\";\nimport * as React from \"react\";\nimport styles from \"./TextInput.module.css\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nexport interface TextInputIconProps {\n iconClassName?: string;\n content?: React.ReactNode;\n button?: React.ReactNode;\n icon?: IconDefinition;\n spaceOnRight?: boolean;\n spaceOnLeft?: boolean;\n disableContentPadding?: boolean;\n disableContentPaddingLeft?: boolean;\n disableContentPaddingRight?: boolean;\n}\n\nexport const TextInputIcon: React.FC<TextInputIconProps> = ({\n button,\n icon,\n iconClassName,\n content,\n spaceOnLeft,\n spaceOnRight,\n disableContentPadding,\n disableContentPaddingLeft,\n disableContentPaddingRight,\n}) => {\n if (!content && !icon && !button) {\n return null;\n }\n\n if (button) {\n return (\n <>\n {spaceOnLeft ? <Space num={0.25} /> : null}\n {button}\n {spaceOnRight ? <Space num={0.25} /> : null}\n </>\n );\n }\n\n if (content) {\n return (\n <>\n {spaceOnLeft &&\n !(disableContentPadding || disableContentPaddingLeft) ? (\n <Space />\n ) : null}\n {content || null}\n {spaceOnRight &&\n !(disableContentPadding || disableContentPaddingRight) ? (\n <Space />\n ) : null}\n </>\n );\n }\n\n return (\n <>\n {spaceOnLeft ? <Space /> : null}\n {icon && (\n <FontAwesomeIcon\n icon={icon}\n className={cx(styles.icon, iconClassName)}\n />\n )}\n {spaceOnRight ? <Space /> : null}\n </>\n );\n};\n","import { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport { InputProps } from \"@stenajs-webui/core\";\nimport {\n InputSpinner,\n stenaCheck,\n stenaExclamationTriangle,\n} from \"@stenajs-webui/elements\";\nimport cx from \"classnames\";\nimport * as React from \"react\";\nimport { ChangeEvent, CSSProperties, useRef } from \"react\";\nimport { MoveDirection } from \"../../../hooks/UseKeyboardNavigation\";\nimport { useTextInput } from \"../../../hooks/UseTextInput\";\nimport { FullOnChangeProps } from \"../types\";\nimport styles from \"./TextInput.module.css\";\nimport { TextInputIcon } from \"./TextInputIcon\";\n\nexport type TextInputBorderVariant =\n | \"normalBorder\"\n | \"onlyTop\"\n | \"onlyBottom\"\n | \"onlyLeft\"\n | \"onlyRight\";\n\nexport type TextInputVariant =\n | \"standard\"\n | \"loading\"\n | \"warning\"\n | \"error\"\n | \"modified\"\n | \"success\";\n\ninterface ExtraContent {\n /** React node to put to the left. Left icon is ignored if this is set. */\n contentLeft?: React.ReactNode;\n /** React node to put to the right. Right icon is ignored if this is set. */\n contentRight?: React.ReactNode;\n /** TextInputButton to the left. Left icon and content is ignored if this is set. */\n buttonLeft?: React.ReactNode;\n /** React node to put to the right. Right icon and content is ignored if this is set. */\n buttonRight?: React.ReactNode;\n /** If true, there will be no padding between contentLeft/contentRight and the border. */\n disableContentPadding?: boolean;\n /** If true, there will be no padding between contentLeft and the border. */\n disableContentPaddingLeft?: boolean;\n /** If true, there will be no padding between contentRight and the border. */\n disableContentPaddingRight?: boolean;\n /** Icon on the left side. */\n iconLeft?: IconDefinition;\n /** Icon on the right side. */\n iconRight?: IconDefinition;\n}\n\nexport interface TextInputProps\n extends FullOnChangeProps<string, ChangeEvent<HTMLInputElement>>,\n InputProps,\n ExtraContent {\n wrapperStyle?: CSSProperties;\n wrapperClassName?: string;\n variant?: TextInputVariant;\n hideBorder?: boolean;\n selectAllOnMount?: boolean;\n moveCursorToEndOnMount?: boolean;\n onDone?: (value: string) => void;\n onEnter?: () => void;\n onEsc?: () => void;\n autoFocus?: boolean;\n /** onMove callback, triggered when user tries to move outside of field using arrow keys, tab or shift+tab. */\n onMove?: (direction: MoveDirection) => void;\n borderRadiusVariant?: TextInputBorderVariant;\n alwaysShowPlaceholder?: boolean;\n}\n\nexport const TextInput: React.FC<TextInputProps> = (props) => {\n const {\n variant = \"standard\",\n inputRef,\n disabled,\n className,\n buttonLeft,\n buttonRight,\n contentLeft,\n contentRight,\n disableContentPadding,\n disableContentPaddingLeft,\n disableContentPaddingRight,\n iconLeft,\n iconRight,\n moveCursorToEndOnMount,\n selectAllOnMount,\n autoFocus,\n onValueChange,\n wrapperClassName,\n wrapperStyle,\n onDone,\n onEnter,\n onEsc,\n onMove,\n onChange,\n onKeyDown,\n hideBorder,\n onFocus,\n onBlur,\n borderRadiusVariant = \"normalBorder\",\n width,\n alwaysShowPlaceholder,\n ...inputProps\n } = props;\n const localRef = useRef<HTMLInputElement>(null);\n const refToUse = inputRef ?? localRef;\n const hookProps = useTextInput<HTMLInputElement>(refToUse, {\n onEnter,\n onEsc,\n onChange,\n onValueChange,\n selectAllOnMount,\n moveCursorToEndOnMount,\n onDone,\n onMove,\n onFocus,\n onBlur,\n onKeyDown,\n autoFocus,\n });\n\n const currentIconRight =\n variant === \"success\"\n ? stenaCheck\n : variant === \"warning\" || variant === \"error\"\n ? stenaExclamationTriangle\n : iconRight;\n\n const currentContentRight =\n variant === \"loading\" ? <InputSpinner /> : contentRight;\n\n return (\n <div\n className={cx(\n styles.textInput,\n styles[variant],\n styles[borderRadiusVariant],\n {\n [styles.disabled]: disabled,\n },\n {\n [styles.hideBorder]: hideBorder,\n },\n wrapperClassName,\n )}\n style={{ width, ...wrapperStyle }}\n >\n <TextInputIcon\n content={contentLeft}\n disableContentPadding={disableContentPadding}\n disableContentPaddingLeft={disableContentPaddingLeft}\n disableContentPaddingRight={disableContentPaddingRight}\n icon={iconLeft}\n spaceOnLeft\n button={buttonLeft}\n />\n <input\n className={cx(\n styles.input,\n {\n [styles.alwaysShowPlaceholder]: alwaysShowPlaceholder,\n },\n className,\n )}\n type={\"text\"}\n disabled={disabled}\n ref={refToUse}\n autoFocus={autoFocus}\n {...inputProps}\n {...hookProps}\n />\n <TextInputIcon\n content={currentContentRight}\n disableContentPadding={disableContentPadding}\n disableContentPaddingLeft={disableContentPaddingLeft}\n disableContentPaddingRight={disableContentPaddingRight}\n icon={currentIconRight}\n spaceOnRight\n button={buttonRight}\n />\n </div>\n );\n};\n","import { parseFloatElseUndefined } from \"@stenajs-webui/core\";\n\nexport const onStepValueChange = ({\n onValueChange,\n value,\n numSteps,\n min,\n max,\n}: {\n onValueChange: ((value: string) => void) | undefined;\n value: string | undefined;\n numSteps: number;\n min: number | undefined;\n max: number | undefined;\n}) => {\n if (onValueChange) {\n if (!value) {\n onValueChange(String(limitWithinRange(numSteps, min, max)));\n } else {\n const parsedValue = parseFloatElseUndefined(value);\n const newValue = (parsedValue || 0) + numSteps;\n onValueChange(String(limitWithinRange(newValue, min, max)));\n }\n }\n};\n\nexport const onTextValueChange = ({\n onValueChange,\n newValue,\n min,\n max,\n}: {\n onValueChange: ((value: string) => void) | undefined;\n newValue: string;\n min: number | undefined;\n max: number | undefined;\n}) => {\n if (onValueChange) {\n if (newValue === \"\") {\n onValueChange(\"\");\n } else {\n const parsedValue = parseFloatElseUndefined(newValue);\n const value = parsedValue || 0;\n onValueChange(String(limitWithinRange(value, min, max)));\n }\n }\n};\n\nconst limitWithinRange = (\n value: number,\n min?: number,\n max?: number,\n): number => {\n let v = value;\n if (min != null) {\n v = Math.max(min, v);\n }\n if (max != null) {\n v = Math.min(max, v);\n }\n return v;\n};\n","import { Omit, Space } from \"@stenajs-webui/core\";\nimport { UpDownButtons } from \"@stenajs-webui/elements\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\nimport { TextInput, TextInputProps } from \"../text-input/TextInput\";\nimport styles from \"./NumericTextInput.module.css\";\nimport cx from \"classnames\";\nimport {\n onStepValueChange,\n onTextValueChange,\n} from \"../../../utils/NumericHelpers\";\n\nexport interface NumericTextInputProps\n extends Omit<\n TextInputProps,\n | \"onChange\" // Omit onChange, since up down buttons don't generate HTMLInput event.\n | \"selectAllOnMount\" // Not supported by browser when input type='number'\n | \"moveCursorToEndOnMount\" // Not supported by browser when input type='number'\n > {\n max?: number;\n min?: number;\n step?: number;\n hideButtons?: boolean;\n}\n\n/**\n * @deprecated Please use NumericStepper instead.\n * This is used internally, and should not be used by apps.\n */\nexport const NumericTextInput: React.FC<NumericTextInputProps> = ({\n value,\n onValueChange,\n max,\n min,\n step = 1,\n contentRight,\n disabled,\n className,\n hideButtons,\n ...restProps\n}) => {\n const onClick = useCallback(\n (numSteps: number) => {\n onStepValueChange({ onValueChange, value, numSteps, min, max });\n },\n [value, max, min, onValueChange],\n );\n const onChange = useCallback(\n (newValue: string) => {\n onTextValueChange({ onValueChange, newValue, min, max });\n },\n [max, min, onValueChange],\n );\n\n const contentRightToUse = hideButtons ? (\n contentRight\n ) : (\n <>\n {contentRight && (\n <>\n {contentRight}\n <Space />\n </>\n )}\n <UpDownButtons\n onClickUp={disabled ? undefined : () => onClick(step)}\n onClickDown={disabled ? undefined : () => onClick(-step)}\n iconColor={\"var(--swui-textinput-text-color)\"}\n disabled={disabled}\n />\n </>\n );\n\n return (\n <TextInput\n contentRight={contentRightToUse}\n value={value}\n onValueChange={onChange}\n disableContentPaddingRight={!hideButtons}\n type={\"number\"}\n min={min}\n max={max}\n step={step}\n className={cx(styles.numericTextInputInput, className)}\n disabled={disabled}\n {...restProps}\n />\n );\n};\n","import { useCallback, useMemo } from \"react\";\nimport { ValueAndOnValueChangeProps } from \"../../types\";\nimport { NumericTextInputProps } from \"../NumericTextInput\";\nimport { parseFloatElseUndefined } from \"@stenajs-webui/core\";\n\nexport type NumericInputValueProps = ValueAndOnValueChangeProps<\n number | undefined\n>;\n\nexport const useNumericInputValue = (\n value: number | undefined,\n onValueChange?: (value: number | undefined) => void,\n): Partial<NumericTextInputProps> => {\n const onValueChangeString = useCallback(\n (newValue: string) => {\n if (onValueChange) {\n if (!newValue) {\n onValueChange(undefined);\n } else {\n const n = parseFloatElseUndefined(newValue);\n if (n !== undefined) {\n onValueChange(n);\n }\n }\n }\n },\n [onValueChange],\n );\n\n const valueString = useMemo(() => {\n if (value === undefined) {\n return \"\";\n }\n return String(value);\n }, [value]);\n\n return {\n onValueChange: onValueChangeString,\n value: valueString,\n };\n};\n","import { isNil } from \"lodash-es\";\nimport { parseFloatElseUndefined } from \"@stenajs-webui/core\";\n\nexport const isMinReached = (\n value: string | undefined,\n min: number | undefined,\n) => {\n if (!isNil(value)) {\n const numericValue = parseFloatElseUndefined(value);\n return !isNil(numericValue) && !isNil(min) && numericValue <= min;\n } else {\n return false;\n }\n};\n\nexport const isMaxReached = (\n value: string | undefined,\n max: number | undefined,\n) => {\n if (!isNil(value)) {\n const numericValue = parseFloatElseUndefined(value);\n return !isNil(numericValue) && !isNil(max) && numericValue >= max;\n } else {\n return false;\n }\n};\n","import { Omit, Row, Space } from \"@stenajs-webui/core\";\nimport { FlatButton, stenaPlus, stenaMinus } from \"@stenajs-webui/elements\";\nimport * as React from \"react\";\nimport {\n NumericTextInput,\n NumericTextInputProps,\n} from \"../numeric-text-input/NumericTextInput\";\nimport { useCallback } from \"react\";\nimport { isMaxReached, isMinReached } from \"../../../utils/NumberComparator\";\nimport {\n onStepValueChange,\n onTextValueChange,\n} from \"../../../utils/NumericHelpers\";\n\nexport interface NumericStepperProps\n extends Omit<NumericTextInputProps, \"hideButtons\"> {}\n\nexport const NumericStepper: React.FC<NumericStepperProps> = ({\n disabled,\n onValueChange,\n value,\n max,\n min,\n step = 1,\n ...restProps\n}) => {\n const onClick = useCallback(\n (numSteps: number) => {\n onStepValueChange({ onValueChange, value, numSteps, min, max });\n },\n [value, max, min, onValueChange],\n );\n const onChange = useCallback(\n (newValue: string) => {\n onTextValueChange({ onValueChange, newValue, min, max });\n },\n [max, min, onValueChange],\n );\n\n return (\n <Row role={\"group\"}>\n <FlatButton\n leftIcon={stenaMinus}\n aria-label={\"Decrease\"}\n disabled={disabled || isMinReached(value, min)}\n onClick={() => onClick(-step)}\n />\n <Space />\n <NumericTextInput\n hideButtons\n onValueChange={onChange}\n value={value}\n max={max}\n min={min}\n step={step}\n disabled={disabled}\n {...restProps}\n />\n <Space />\n <FlatButton\n leftIcon={stenaPlus}\n aria-label={\"Increase\"}\n disabled={disabled || isMaxReached(value, max)}\n onClick={() => onClick(step)}\n />\n </Row>\n );\n};\n","import * as React from \"react\";\nimport { useState } from \"react\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\nimport { TextInput, TextInputProps } from \"../text-input/TextInput\";\nimport {\n stenaEyeHide,\n stenaEyeShow,\n TextInputButton,\n} from \"@stenajs-webui/elements\";\n\nexport interface PasswordInputProps extends TextInputProps {\n visibleIcon?: IconDefinition;\n hiddenIcon?: IconDefinition;\n}\n\nexport const PasswordInput: React.FC<PasswordInputProps> = ({\n hiddenIcon = stenaEyeShow,\n visibleIcon = stenaEyeHide,\n ...props\n}) => {\n const [isPassword, setIsPassword] = useState(true);\n\n return (\n <TextInput\n buttonRight={\n <TextInputButton\n icon={isPassword ? hiddenIcon : visibleIcon}\n onClick={() => setIsPassword((x) => !x)}\n />\n }\n type={isPassword ? \"password\" : \"text\"}\n {...props}\n />\n );\n};\n","import { getDataProps, Text } from \"@stenajs-webui/core\";\nimport * as React from \"react\";\nimport { cssColor } from \"@stenajs-webui/theme\";\n\nexport interface InputLabelTextProps {\n disabled?: boolean;\n text?: string;\n}\n\nexport const InputLabelText: React.FC<InputLabelTextProps> = ({\n disabled,\n text,\n ...props\n}) => {\n return (\n <Text\n variant={\"bold\"}\n color={cssColor(disabled ? \"--silver\" : \"--tjara\")}\n size={\"small\"}\n {...getDataProps(props)}\n >\n {text}\n </Text>\n );\n};\n","import * as React from \"react\";\nimport { InputLabelText } from \"./InputLabelText\";\nimport { ScreenReaderOnlyText } from \"@stenajs-webui/core\";\n\nexport interface InputLabelProps {\n htmlFor?: string;\n label?: string;\n screenReaderLabel?: string;\n className?: string;\n disabled?: boolean;\n}\n\nexport const InputLabel: React.FC<InputLabelProps> = ({\n htmlFor,\n screenReaderLabel,\n label,\n disabled,\n className,\n}) => {\n return (\n <label htmlFor={htmlFor} className={className}>\n {screenReaderLabel ? (\n <ScreenReaderOnlyText>{screenReaderLabel}</ScreenReaderOnlyText>\n ) : null}\n <InputLabelText\n aria-hidden={Boolean(screenReaderLabel)}\n text={label}\n disabled={disabled}\n />\n </label>\n );\n};\n","import * as React from \"react\";\nimport { ChangeEvent, PropsWithChildren, useCallback, useId } from \"react\";\nimport { Icon, stenaAngleDown } from \"@stenajs-webui/elements\";\nimport cx from \"classnames\";\nimport { InputLabel } from \"../input-label/InputLabel\";\nimport styles from \"./LabelledSelect.module.css\";\nimport { cssColor } from \"@stenajs-webui/theme\";\nimport { ValueAndOnValueChangeProps } from \"../types\";\nimport { SelectElementProps } from \"@stenajs-webui/core\";\n\nexport type SelectBorderVariant =\n | \"normalBorder\"\n | \"onlyTopBorder\"\n | \"onlyBottomBorder\"\n | \"onlyLeftBorder\"\n | \"onlyRightBorder\";\n\nexport interface LabelledSelectProps\n extends ValueAndOnValueChangeProps<string>,\n PropsWithChildren,\n Omit<SelectElementProps, \"value\" | \"size\"> {\n id?: string;\n name: string;\n label?: string;\n screenReaderLabel?: string;\n borderVariant?: SelectBorderVariant;\n variant?: LabelledSelectVariant;\n size?: LabelledSelectSize;\n}\n\nexport type LabelledSelectVariant = \"normal\" | \"error\";\nexport type LabelledSelectSize = \"medium\" | \"large\";\n\nexport const LabelledSelect: React.FC<LabelledSelectProps> = ({\n onChange,\n onValueChange,\n id,\n label,\n screenReaderLabel,\n borderVariant = \"normalBorder\",\n variant = \"normal\",\n size = \"medium\",\n children,\n ...inputProps\n}) => {\n const hookId = useId();\n\n const activeId = id ?? hookId;\n\n const onChangeHandler = useCallback(\n (e: ChangeEvent<HTMLSelectElement>) => {\n onChange?.(e);\n onValueChange?.(e.target.value);\n },\n [onChange, onValueChange],\n );\n\n return (\n <div\n className={cx(\n styles.labelledSelect,\n styles[variant],\n styles[size],\n styles[borderVariant],\n )}\n >\n <InputLabel\n htmlFor={activeId}\n className={styles.label}\n label={label}\n screenReaderLabel={screenReaderLabel}\n />\n <select\n id={activeId}\n onChange={onChangeHandler}\n className={cx(styles.select, styles[variant], styles[size])}\n {...inputProps}\n >\n {children}\n </select>\n\n <div className={cx(styles.iconWrapper)}>\n <Icon\n icon={stenaAngleDown}\n size={24}\n color={cssColor(\"--modern-blue\")}\n />\n </div>\n </div>\n );\n};\n","import * as React from \"react\";\nimport { ChangeEventHandler, useCallback, useId } from \"react\";\nimport cx from \"classnames\";\nimport { InputLabel } from \"../input-label/InputLabel\";\nimport styles from \"./LabelledTextInput.module.css\";\nimport { InputElementProps } from \"@stenajs-webui/core\";\nimport { ValueAndOnValueChangeProps } from \"../types\";\n\nexport type LabelledTextInputVariant = \"normal\" | \"error\";\nexport type LabelledTextInputSize = \"medium\" | \"large\";\n\nexport type LabelledTextInputBorderVariant =\n | \"normalBorder\"\n | \"onlyTop\"\n | \"onlyBottom\"\n | \"onlyLeft\"\n | \"onlyRight\";\n\nexport interface LabelledTextInputProps\n extends Omit<InputElementProps, \"value\" | \"size\">,\n ValueAndOnValueChangeProps<string> {\n id?: string;\n label?: string;\n size?: LabelledTextInputSize;\n screenReaderLabel?: string;\n pattern?: string;\n borderRadiusVariant?: LabelledTextInputBorderVariant;\n variant?: LabelledTextInputVariant;\n}\n\nexport const LabelledTextInput = React.forwardRef<\n HTMLInputElement,\n LabelledTextInputProps\n>(\n (\n {\n autoComplete = \"off\",\n label,\n id,\n screenReaderLabel,\n size = \"medium\",\n value,\n onChange,\n disabled,\n onValueChange,\n borderRadiusVariant = \"normalBorder\",\n variant = \"normal\",\n width,\n ...inputProps\n },\n ref,\n ) => {\n const hookId = useId();\n\n const activeId = id ?? hookId;\n\n const onChangeHandler = useCallback<ChangeEventHandler<HTMLInputElement>>(\n (ev) => {\n onChange?.(ev);\n onValueChange?.(ev.target.value);\n },\n [onChange, onValueChange],\n );\n\n return (\n <div\n className={cx(\n styles.labelledTextInput,\n styles[variant],\n styles[borderRadiusVariant],\n styles[size],\n disabled && styles.disabled,\n )}\n style={width ? { width } : undefined}\n >\n <InputLabel\n htmlFor={activeId}\n screenReaderLabel={screenReaderLabel}\n label={label}\n />\n <input\n ref={ref}\n id={activeId}\n autoComplete={autoComplete}\n type={\"text\"}\n value={value}\n onChange={onChangeHandler}\n disabled={disabled}\n {...inputProps}\n />\n </div>\n );\n },\n);\n","import * as React from \"react\";\nimport { ReactNode } from \"react\";\nimport styles from \"./TextInput.module.css\";\nimport cx from \"classnames\";\nimport { TextInputProps } from \"./TextInput\";\nimport { TextInputIcon } from \"./TextInputIcon\";\nimport {\n InputSpinner,\n stenaCheck,\n stenaExclamationTriangle,\n TextInputButton,\n} from \"@stenajs-webui/elements\";\nimport { ButtonElementProps, Row } from \"@stenajs-webui/core\";\nimport { IconDefinition } from \"@fortawesome/fontawesome-svg-core\";\n\nexport interface TextInputBoxProps\n extends Pick<\n TextInputProps,\n | \"variant\"\n | \"wrapperClassName\"\n | \"disabled\"\n | \"wrapperStyle\"\n | \"contentLeft\"\n | \"contentRight\"\n | \"disableContentPadding\"\n | \"disableContentPaddingLeft\"\n | \"disableContentPaddingRight\"\n > {\n children?: ReactNode;\n iconRight?: IconDefinition;\n iconLeft?: IconDefinition;\n onClickLeft?: ButtonElementProps[\"onClick\"];\n onClickRight?: ButtonElementProps[\"onClick\"];\n}\n\nexport const TextInputBox: React.FC<TextInputBoxProps> = ({\n variant = \"standard\",\n disabled,\n wrapperClassName,\n wrapperStyle,\n contentLeft,\n contentRight,\n disableContentPadding,\n disableContentPaddingLeft,\n disableContentPaddingRight,\n iconRight,\n iconLeft,\n onClickLeft,\n onClickRight,\n children,\n}) => {\n const currentIconRight =\n variant === \"success\"\n ? stenaCheck\n : variant === \"warning\" || variant === \"error\"\n ? stenaExclamationTriangle\n : iconRight;\n\n const currentContentRight =\n variant === \"loading\" ? <InputSpinner /> : contentRight;\n\n return (\n <div\n className={cx(\n styles.textInput,\n styles.inputContainer,\n styles[variant],\n {\n [styles.disabled]: disabled,\n },\n wrapperClassName,\n )}\n style={wrapperStyle}\n >\n <TextInputIcon\n content={contentLeft}\n disableContentPadding={disableContentPadding}\n disableContentPaddingLeft={disableContentPaddingLeft}\n disableContentPaddingRight={disableContentPaddingRight}\n spaceOnLeft\n button={\n iconLeft ? (\n <TextInputButton onClick={onClickLeft} icon={iconLeft} />\n ) : undefined\n }\n />\n <Row alignItems={\"center\"}>{children}</Row>\n <TextInputIcon\n content={currentContentRight}\n disableContentPadding={disableContentPadding}\n disableContentPaddingLeft={disableContentPaddingLeft}\n disableContentPaddingRight={disableContentPaddingRight}\n spaceOnRight\n button={\n currentIconRight ? (\n <TextInputButton onClick={onClickRight} icon={currentIconRight} />\n ) : undefined\n }\n />\n </div>\n );\n};\n","import * as React from \"react\";\nimport {\n ChangeEvent,\n ChangeEventHandler,\n ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n} from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./TextArea.module.css\";\nimport { FullOnChangeProps } from \"../types\";\n\ntype Resize =\n | \"none\"\n | \"both\"\n | \"horizontal\"\n | \"vertical\"\n | \"inherit\"\n | \"initial\"\n | \"revert\"\n | \"unset\";\n\nexport interface TextAreaProps\n extends Omit<ComponentPropsWithoutRef<\"textarea\">, \"value\">,\n FullOnChangeProps<string, ChangeEvent<HTMLTextAreaElement>> {\n resize?: Resize;\n readOnly?: boolean;\n rows?: number;\n disabled?: boolean;\n}\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n (\n {\n className,\n value,\n onValueChange,\n onChange,\n resize = \"none\",\n readOnly = false,\n rows,\n disabled,\n ...textAreaProps\n },\n ref,\n ) => {\n const onChangeHandler: ChangeEventHandler<HTMLTextAreaElement> =\n useCallback(\n (ev) => {\n if (onChange) {\n onChange(ev);\n }\n if (onValueChange) {\n onValueChange(ev.target.value);\n }\n },\n [onChange, onValueChange],\n );\n\n return (\n <textarea\n disabled={disabled}\n rows={rows}\n readOnly={readOnly}\n className={cx(styles.textArea, className)}\n style={{ resize }}\n onChange={onChangeHandler}\n value={value}\n ref={ref}\n {...textAreaProps}\n />\n );\n },\n);\n","import { useTimeoutState } from \"@stenajs-webui/core\";\nimport {\n FlatButton,\n FlatButtonProps,\n stenaCopy,\n} from \"@stenajs-webui/elements\";\nimport { Tooltip } from \"@stenajs-webui/tooltip\";\nimport * as React from \"react\";\nimport { useCallback } from \"react\";\n\nexport interface CopyToClipboardButtonProps {\n value?: string;\n tooltipLabel?: string;\n size?: FlatButtonProps[\"size\"];\n}\n\nexport function CopyToClipboardButton({\n value,\n tooltipLabel = \"Copied to clipboard!\",\n size = \"small\",\n}: CopyToClipboardButtonProps) {\n const [visible, setVisible] = useTimeoutState(false, 2000);\n\n const onClick = useCallback(async () => {\n if (value != null) {\n await navigator.clipboard.writeText(value);\n setVisible(true);\n }\n }, [setVisible, value]);\n\n return (\n <Tooltip visible={visible} label={tooltipLabel}>\n <FlatButton\n size={size}\n onClick={onClick}\n leftIcon={stenaCopy}\n disabled={value == null}\n />\n </Tooltip>\n );\n}\n"],"names":["ReadOnlyNumericInput","value","id","props","jsx","styles","AmountStepperButtons","onValueChange","variant","decreaseDisabled","increaseDisabled","inputId","ariaLabelDecrease","ariaLabelIncrease","textValueAriaLabel","increaseTestId","decreaseTestId","onIncrease","onDecrease","size","onClickPlus","useCallback","onClickMinus","jsxs","Row","PrimaryButton","stenaMinus","stenaPlus","styleChecked","Switch","disabled","className","wrapperRef","restProps","SwitchWithLabel","label","textColor","screenReaderLabel","switchProps","Box","Space","ScreenReaderOnlyText","Text","Checkbox","forwardRef","indeterminate","onChange","inputProps","ref","localRef","useRef","setRef","element","handleInputChange","ev","useEffect","cx","CheckboxWithLabel","children","inputRef","checkboxProps","RadioButton","name","RadioButtonBox","icon","contentRight","style","radioButtonClassName","radioButtonProps","cssColor","Icon","RadioButtonWithLabel","useKeyboardNavigation","onKeyDown","onEnter","onEsc","onMove","onDone","onBlur","onFocus","wasHandled","onBlurHandler","onFocusHandler","key","blurMoveAndCancel","direction","e","elementHasSelectionRange","useSelectAllOnMount","moveCursorToEnd","enabled","useTextInput","selectAllOnMount","moveCursorToEndOnMount","autoFocus","onKeyDownHandler","onChangeHandler","TextInputIcon","button","iconClassName","content","spaceOnLeft","spaceOnRight","disableContentPadding","disableContentPaddingLeft","disableContentPaddingRight","Fragment","FontAwesomeIcon","TextInput","buttonLeft","buttonRight","contentLeft","iconLeft","iconRight","wrapperClassName","wrapperStyle","hideBorder","borderRadiusVariant","width","alwaysShowPlaceholder","refToUse","hookProps","currentIconRight","stenaCheck","stenaExclamationTriangle","currentContentRight","InputSpinner","onStepValueChange","numSteps","min","max","limitWithinRange","newValue","parseFloatElseUndefined","onTextValueChange","v","NumericTextInput","step","hideButtons","onClick","UpDownButtons","useNumericInputValue","onValueChangeString","n","valueString","useMemo","isMinReached","isNil","numericValue","isMaxReached","NumericStepper","FlatButton","PasswordInput","hiddenIcon","stenaEyeShow","visibleIcon","stenaEyeHide","isPassword","setIsPassword","useState","TextInputButton","x","InputLabelText","text","getDataProps","InputLabel","htmlFor","LabelledSelect","borderVariant","hookId","useId","activeId","stenaAngleDown","LabelledTextInput","React","autoComplete","TextInputBox","onClickLeft","onClickRight","TextArea","resize","readOnly","rows","textAreaProps","CopyToClipboardButton","tooltipLabel","visible","setVisible","useTimeoutState","Tooltip","stenaCopy"],"mappings":";;;;;;;;;;;;GAOaA,KAAiD,CAAC;AAAA,EAC7D,OAAAC;AAAA,EACA,IAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACE,GAAGD;AAAA,IACJ,MAAK;AAAA,IACL,IAAAD;AAAA,IACA,OAAAD;AAAA,IACA,UAAQ;AAAA,IACR,WAAWI,GAAO;AAAA,EAAA;AAAA,GCUXC,KAA4D,CAAC;AAAA,EACxE,OAAAL;AAAA,EACA,eAAAM;AAAA,EACA,SAAAC;AAAA,EACA,kBAAA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3E;AAAA,MACE,CAACiC,MAAO;AACN,QAAIR,KACFA,EAASQ,CAAE,GAET/C,KACFA,EAAc+C,EAAG,OAAO,KAAK;AAAA,MAEjC;AAAA,MACA,CAACR,GAAUvC,CAAa;AAAA,IAAA;AAG5B,WACE,gBAAAH;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,UAAA0B;AAAA,QACA,MAAAwJ;AAAA,QACA,UAAAD;AAAA,QACA,WAAW7H,EAAGnD,GAAO,UAAU0B,CAAS;AAAA,QACxC,OAAO,EAAE,QAAAqJ,EAAA;AAAA,QACT,UAAUpF;AAAA,QACV,OAAA/F;AAAA,QACA,KAAA+C;AAAA,QACC,GAAGuI;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;ACzDO,SAASC,GAAsB;AAAA,EACpC,OAAAvL;AAAA,EACA,cAAAwL,IAAe;AAAA,EACf,MAAAtK,IAAO;AACT,GAA+B;AAC7B,QAAM,CAACuK,GAASC,CAAU,IAAIC,GAAgB,IAAO,GAAI,GAEnDjD,IAAUtH,EAAY,YAAY;AACtC,IAAIpB,KAAS,SACX,MAAM,UAAU,UAAU,UAAUA,CAAK,GACzC0L,EAAW,EAAI;AAAA,EAEnB,GAAG,CAACA,GAAY1L,CAAK,CAAC;AAEtB,SACE,gBAAAG,EAACyL,IAAA,EAAQ,SAAAH,GAAkB,OAAOD,GAChC,UAAA,gBAAArL;AAAA,IAACmJ;AAAA,IAAA;AAAA,MACC,MAAApI;AAAA,MACA,SAAAwH;AAAA,MACA,UAAUmD;AAAA,MACV,UAAU7L,KAAS;AAAA,IAAA;AAAA,EAAA,GAEvB;AAEJ;"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('._readOnlyInput_7bzmw_1{background-color:transparent;line-height:var(--swui-line-height);text-align:center;-moz-appearance:textfield;margin:0;padding:0;color:var(--swui-text-primary-color);font-size:var(--swui-font-size-medium);width:60px;font-weight:var(--swui-font-weight-text-bold);font-family:var(--swui-font-primary);border:none;outline:none}._readOnlyInput_7bzmw_1::-webkit-inner-spin-button,._readOnlyInput_7bzmw_1::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._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_1t23r_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_1t23r_1._standard_1t23r_40{width:var(--swui-checkbox-height);height:var(--swui-checkbox-height)}._checkbox_1t23r_1._standard_1t23r_40:after{width:3px;height:6px;left:9px;top:6px}._checkbox_1t23r_1._small_1t23r_52{width:var(--swui-checkbox-height-small);height:var(--swui-checkbox-height-small)}._checkbox_1t23r_1._small_1t23r_52:after{width:3px;height:6px;left:5px;top:2px}._checkbox_1t23r_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_1t23r_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_1t23r_1:checked:after{--current-checkbox-icon-color: var(--swui-checkbox-icon-color)}._checkbox_1t23r_1:disabled:not(:checked){--current-bg-color: var(--swui-checkbox-disabled-bg-color);--current-border-color: var(--swui-checkbox-disabled-border-color)}._checkbox_1t23r_1:disabled:not(:checked):after{--current-checkbox-icon-color: --swui-checkbox-unchecked-icon-color}._checkbox_1t23r_1:disabled:checked{--current-bg-color: var(--swui-checkbox-disabled-checked-bg-color);--current-border-color: var(--swui-checkbox-disabled-border-color)}._checkbox_1t23r_1:disabled:checked:after{--current-checkbox-icon-color: var(--swui-checkbox-disabled-icon-color)}._checkbox_1t23r_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_1t23r_1:indeterminate:after{--current-checkbox-icon-color: var(--swui-checkbox-icon-color);border-right:0;transform:rotate(0);width:6px}._checkbox_1t23r_1:indeterminate._standard_1t23r_40:after{top:4px;left:8px}._checkbox_1t23r_1:indeterminate._small_1t23r_52:after{top:0;left:4px}._checkbox_1t23r_1:indeterminate:disabled:after{--current-checkbox-icon-color: var(--swui-checkbox-disabled-icon-color)}._checkbox_1t23r_1:hover:not(:checked):not(:disabled){--current-border-color: var(--swui-checkbox-border-hover-color)}._checkbox_1t23r_1:focus-visible{outline:var(--swui-focus-outline)}._checkbox_1t23r_1+label{font-size:1.4rem;line-height:var(--swui-checkbox-height);display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}._radiobutton_a19yk_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_a19yk_1._standard_a19yk_46{height:var(--swui-radiobutton-size-standard);width:var(--swui-radiobutton-size-standard)}._radiobutton_a19yk_1._standard_a19yk_46:after{left:7px;top:7px}._radiobutton_a19yk_1._small_a19yk_56{height:var(--swui-radiobutton-size-small);width:var(--swui-radiobutton-size-small)}._radiobutton_a19yk_1._small_a19yk_56:after{left:3px;top:3px}._radiobutton_a19yk_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_a19yk_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_a19yk_1:checked:after{--current-icon-color: var(--swui-radiobutton-icon-color)}._radiobutton_a19yk_1:disabled{--current-bg-color: var(--swui-radiobutton-unchecked-disabled-bg-color);--current-border-color: var(--swui-radiobutton-disabled-border-color)}._radiobutton_a19yk_1:disabled:checked{--current-bg-color: var(--swui-radiobutton-checked-disabled-bg-color)}._radiobutton_a19yk_1:disabled:checked:after{--current-icon-color: var(--swui-radiobutton-disabled-icon-color)}._radiobutton_a19yk_1:hover:not(:checked):not(:disabled){--current-border-color: var( --swui-radiobutton-unchecked-hover-border-color )}._radiobutton_a19yk_1:focus-visible{outline:var(--swui-focus-outline)}._radiobutton_a19yk_1+label{font-size:1.4rem;line-height:var(--swui-radiobutton-size-standard);display:inline-block;vertical-align:top;cursor:pointer;margin-left:4px}._radioButtonBox_yl38n_1{box-sizing:border-box;background-color:var(--lhds-color-ui-200);position:relative;border:1px solid var(--silver-ui);width:100%;border-radius:16px;font-size:var(--swui-font-size-inputs);align-items:center;display:flex;cursor:pointer;outline:none}._radioButtonBox_yl38n_1._medium_yl38n_14{padding:0 var(--swui-metrics-space);height:42px}._radioButtonBox_yl38n_1._large_yl38n_19{height:48px;padding:0 calc(var(--swui-metrics-space) * 2)}._radioButtonBox_yl38n_1:hover{border-color:var(--hav)}._radioButtonBox_yl38n_1._danger_yl38n_28{background-color:var(--snackskal-light);border-color:var(--snackskal-light)}._radioButtonBox_yl38n_1._danger_yl38n_28:hover{border-color:var(--lhds-color-red-500)}@media (max-width: 768px){._radioButtonWrapper_yl38n_39{width:100%}}._textInput_1qe61_1{display:flex;height:var(--swui-field-height);width:100%;align-items:center;background:var(--swui-field-bg-enabled);border:1px solid var(--swui-field-border-color);border-radius:var(--swui-field-border-radius);outline:none}._textInput_1qe61_1._textInput_1qe61_1._onlyTop_1qe61_11{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-color:transparent}._textInput_1qe61_1._textInput_1qe61_1._onlyTop_1qe61_11:focus-within:not(._disabled_1qe61_15){z-index:1}._textInput_1qe61_1._textInput_1qe61_1._onlyBottom_1qe61_20{border-top-left-radius:0;border-top-right-radius:0}._textInput_1qe61_1._textInput_1qe61_1._onlyBottom_1qe61_20:focus-within:not(._disabled_1qe61_15){z-index:1}._textInput_1qe61_1._textInput_1qe61_1._onlyLeft_1qe61_28{border-bottom-right-radius:0;border-top-right-radius:0;border-right-color:transparent}._textInput_1qe61_1._textInput_1qe61_1._onlyLeft_1qe61_28:focus-within:not(._disabled_1qe61_15){z-index:1}._textInput_1qe61_1._textInput_1qe61_1._onlyRight_1qe61_37{border-top-left-radius:0;border-bottom-left-radius:0}._textInput_1qe61_1._textInput_1qe61_1._onlyRight_1qe61_37:focus-within:not(._disabled_1qe61_15){z-index:1}._textInput_1qe61_1._textInput_1qe61_1:focus-within:not(._disabled_1qe61_15){outline:var(--swui-focus-outline);border-color:transparent}._textInput_1qe61_1 ._input_1qe61_50{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_1qe61_1 ._input_1qe61_50:disabled{color:var(--swui-field-text-color-disabled)}._textInput_1qe61_1 ._input_1qe61_50::placeholder{color:var(--swui-field-placeholder-color);font-weight:var(--swui-field-placeholder-font-weight)}._textInput_1qe61_1 ._input_1qe61_50:not(._alwaysShowPlaceholder_1qe61_74):focus::placeholder{opacity:0}._textInput_1qe61_1 ._input_1qe61_50::-webkit-calendar-picker-indicator{display:none}._textInput_1qe61_1 ._icon_1qe61_85{transition:color var(--swui-animation-time-medium);color:var(--swui-field-icon-color);font-size:var(--swui-field-icon-size)}._textInput_1qe61_1._standard_1qe61_95:hover:not(:focus-within):not(._disabled_1qe61_15),._textInput_1qe61_1._success_1qe61_96:hover:not(:focus-within):not(._disabled_1qe61_15){border-color:var(--swui-field-border-color-hover)}._textInput_1qe61_1._success_1qe61_96 ._icon_1qe61_85{color:var(--swui-state-success-color)}._textInput_1qe61_1._loading_1qe61_108{background:var(--swui-state-loading-light-color);border-color:var(--swui-state-loading-color)}._textInput_1qe61_1._modified_1qe61_113{background:var(--swui-state-modified-light-color);border-color:var(--swui-state-modified-light-color)}._textInput_1qe61_1._modified_1qe61_113 ._icon_1qe61_85{color:var(--lhds-color-blue-300)}._textInput_1qe61_1._error_1qe61_122{background:var(--swui-state-error-light-color);border-color:var(--swui-state-error-light-color)}._textInput_1qe61_1._error_1qe61_122 ._icon_1qe61_85{color:var(--swui-state-error-light-color)}._textInput_1qe61_1._warning_1qe61_131{background:var(--swui-state-alert-light-color);border-color:var(--swui-state-alert-light-color)}._textInput_1qe61_1._warning_1qe61_131 ._icon_1qe61_85{color:var(--swui-state-alert-light-color)}._textInput_1qe61_1._disabled_1qe61_15{background:var(--swui-field-bg-disabled);border-color:var(--swui-field-bg-disabled)}._textInput_1qe61_1._textInput_1qe61_1._hideBorder_1qe61_145{border:none;box-shadow:none;background:none;outline:none}._textInput_1qe61_1 ._clickable_1qe61_152:hover{cursor:pointer}._textInput_1qe61_1 ._clickable_1qe61_152:hover ._icon_1qe61_85{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_vs9pj_1{border:1px solid var(--swui-field-border-color);position:relative;overflow:hidden;cursor:pointer}._labelledSelect_vs9pj_1._medium_vs9pj_7{border-radius:var(--swui-border-radius)}._labelledSelect_vs9pj_1._large_vs9pj_11{border-radius:var(--swui-border-radius-large)}._labelledSelect_vs9pj_1._error_vs9pj_15{border-color:var(--snackskal);background-color:var(--snackskal)}._labelledSelect_vs9pj_1._normal_vs9pj_20{border-color:var(--swui-field-border-color);background-color:var(--moln)}._labelledSelect_vs9pj_1._labelledSelect_vs9pj_1._onlyTopBorder_vs9pj_25{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-color:transparent}._labelledSelect_vs9pj_1._onlyBottomBorder_vs9pj_31{border-top-left-radius:0;border-top-right-radius:0}._labelledSelect_vs9pj_1._onlyLeftBorder_vs9pj_36{border-top-right-radius:0;border-bottom-right-radius:0;border-right-color:transparent}._labelledSelect_vs9pj_1._onlyRightBorder_vs9pj_42{border-top-left-radius:0;border-bottom-left-radius:0}._labelledSelect_vs9pj_1._labelledSelect_vs9pj_1:focus-within{border-color:var(--swui-field-border-color-hover);outline:var(--swui-focus-outline);outline-offset:0;z-index:10}._labelledSelect_vs9pj_1._labelledSelect_vs9pj_1:hover{border-color:var(--swui-field-border-color-hover)}._labelledSelect_vs9pj_1 ._label_vs9pj_1{display:flex;cursor:pointer;padding:calc(var(--swui-metrics-space) * 1) calc(var(--swui-metrics-space) * 2) 0}._labelledSelect_vs9pj_1 ._select_vs9pj_65{color:var(--swui-text-primary-color);display:block;margin:0;width:100%;-webkit-appearance:none;appearance:none;border:none;outline:none;line-height:1.5;box-sizing:border-box;cursor:pointer}._labelledSelect_vs9pj_1 ._select_vs9pj_65._error_vs9pj_15{background-color:var(--snackskal)}._labelledSelect_vs9pj_1 ._select_vs9pj_65._normal_vs9pj_20{background-color:var(--moln)}._labelledSelect_vs9pj_1 ._select_vs9pj_65._medium_vs9pj_7{font-size:var(--swui-font-size-inputs);padding:calc(var(--swui-metrics-space) * .5) calc(var(--swui-metrics-space) * 2) calc(var(--swui-metrics-space) * 1)}._labelledSelect_vs9pj_1 ._select_vs9pj_65._large_vs9pj_11{font-size:var(--swui-font-size-inputs-large);padding:calc(var(--swui-metrics-space) * 1.5) calc(var(--swui-metrics-space) * 8) calc(var(--swui-metrics-space) * 2) calc(var(--swui-metrics-space) * 2)}._labelledSelect_vs9pj_1 ._iconWrapper_vs9pj_99{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_1uyc3_1{position:relative;background:var(--moln);overflow:hidden;cursor:text;border:1px solid var(--silver-light);border-radius:var(--swui-border-radius)}._labelledTextInput_1uyc3_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_1uyc3_1._labelledTextInput_1uyc3_1._onlyTop_1uyc3_21{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-color:transparent}._labelledTextInput_1uyc3_1._labelledTextInput_1uyc3_1._onlyBottom_1uyc3_27{border-top-left-radius:0;border-top-right-radius:0}._labelledTextInput_1uyc3_1._labelledTextInput_1uyc3_1._onlyLeft_1uyc3_32{border-bottom-right-radius:0;border-top-right-radius:0;border-right-color:transparent}._labelledTextInput_1uyc3_1._labelledTextInput_1uyc3_1._onlyRight_1uyc3_38{border-top-left-radius:0;border-bottom-left-radius:0}._labelledTextInput_1uyc3_1:focus-within{outline:var(--swui-focus-outline);outline-offset:-1px;border-color:transparent}._labelledTextInput_1uyc3_1:hover:not(:focus-within){border-color:var(--hav)}._labelledTextInput_1uyc3_1._disabled_1uyc3_53{background-color:var(--silver-lighter)}._labelledTextInput_1uyc3_1._disabled_1uyc3_53 input{color:var(--silver)}._labelledTextInput_1uyc3_1._medium_1uyc3_61:focus-within{outline-width:2px}._labelledTextInput_1uyc3_1._medium_1uyc3_61 input{font-size:var(--swui-font-size-inputs);padding:calc(var(--swui-metrics-space) * .5) calc(var(--swui-metrics-space) * 2) calc(var(--swui-metrics-space) * 1)}._labelledTextInput_1uyc3_1._large_1uyc3_73{border-radius:var(--swui-border-radius-large)}._labelledTextInput_1uyc3_1._large_1uyc3_73:focus-within{outline-width:3px}._labelledTextInput_1uyc3_1._large_1uyc3_73 input{font-size:var(--swui-font-size-inputs-large);padding:calc(var(--swui-metrics-space) * 1) calc(var(--swui-metrics-space) * 2) calc(var(--swui-metrics-space) * 2)}._labelledTextInput_1uyc3_1._error_1uyc3_87{border-color:var(--swui-state-error-light-color);background-color:var(--swui-state-error-light-color)}._labelledTextInput_1uyc3_1._error_1uyc3_87:hover:not(:focus-within){border-color:var(--modern-red)}._labelledTextInput_1uyc3_1 label{display:flex;padding:calc(var(--swui-metrics-space) * 1) calc(var(--swui-metrics-space) * 2) 0;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(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),a=require("@stenajs-webui/core"),_=require("react"),f=require("@stenajs-webui/elements"),b=require("classnames"),q=require("@stenajs-webui/theme"),xe=require("@fortawesome/react-fontawesome"),S=require("lodash-es"),he=require("@stenajs-webui/tooltip");function ye(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const fe=ye(_),je="_readOnlyInput_7bzmw_1",be={readOnlyInput:je},H=({value:e,id:t,...o})=>n.jsx("input",{...o,type:"number",id:t,value:e,readOnly:!0,className:be.readOnlyInput}),me=({value:e,onValueChange:t,decreaseDisabled:o,increaseDisabled:s,inputId:r,ariaLabelDecrease:l,ariaLabelIncrease:i,textValueAriaLabel:u,increaseTestId:c,decreaseTestId:x,onIncrease:h,onDecrease:p,size:d})=>{const y=_.useCallback(()=>{h?.(),t?.(e+1)},[h,t,e]),j=_.useCallback(()=>{p?.(),t?.(e-1)},[p,t,e]);return n.jsxs(a.Row,{alignItems:"center",children:[n.jsx(f.PrimaryButton,{size:d,"aria-label":l,leftIcon:f.stenaMinus,"data-testid":x??"decrease",disabled:o,onClick:j}),n.jsx(H,{id:r,"data-testid":"amountStepperValue",value:e.toString(),"aria-label":u}),n.jsx(f.PrimaryButton,{size:d,leftIcon:f.stenaPlus,"aria-label":i,"data-testid":c??"increase",disabled:s,onClick:y})]})},ge="_knob_1d6s8_56",Be="_filler_1d6s8_61",Ie="_checked_1d6s8_75",T={switch:"_switch_1d6s8_1",knob:ge,filler:Be,checked:Ie},we=`${T.switch} ${T.checked}`,W=({value:e,disabled:t,onValueChange:o,className:s,wrapperRef:r,...l})=>n.jsx("div",{className:s,ref:r,children:n.jsxs("button",{type:"button",role:"switch","aria-checked":e,className:e?we:T.switch,disabled:t,onClick:()=>o&&o(!e),...l,children:[n.jsx("div",{className:T.filler}),n.jsx("div",{className:T.knob})]})}),Se=({label:e,disabled:t,textColor:o,wrapperRef:s,screenReaderLabel:r,...l})=>n.jsx("div",{ref:s,children:n.jsx("label",{children:n.jsxs(a.Box,{row:!0,alignItems:"center",children:[n.jsx(W,{disabled:t,...l}),n.jsx(a.Space,{}),r?n.jsx(a.ScreenReaderOnlyText,{children:r}):null,n.jsx(a.Text,{color:o,"aria-hidden":!!r,userSelect:"none",children:e})]})})}),ke="_checkbox_1t23r_1",Te="_standard_1t23r_40",Re="_small_1t23r_52",E={checkbox:ke,standard:Te,small:Re},M=_.forwardRef(({indeterminate:e=!1,onChange:t,onValueChange:o,value:s=!1,size:r="standard",className:l,...i},u)=>{const c=_.useRef(null),x=p=>{c.current=p,c.current&&(c.current.indeterminate=!!e),u&&(typeof u=="function"?u(p):u.current=p)},h=_.useCallback(p=>{t&&t(p),o&&o(p.target.checked)},[t,o]);return _.useEffect(()=>{c.current&&(c.current.indeterminate=!!e)},[e,c]),n.jsx("input",{type:"checkbox",className:b(E.checkbox,E[r],l),checked:s,onChange:h,ref:x,...i})}),Ce=({children:e,label:t,inputRef:o,wrapperRef:s,textColor:r,screenReaderLabel:l,...i})=>n.jsx("div",{ref:s,children:n.jsx("label",{children:n.jsxs(a.Row,{alignItems:"center",children:[n.jsx(M,{...i,ref:o}),n.jsx(a.Space,{}),l?n.jsx(a.ScreenReaderOnlyText,{children:l}):null,n.jsx(a.Text,{color:r,"aria-hidden":!!l,userSelect:"none",children:t}),e]})})}),Ne="_radiobutton_a19yk_1",qe="_standard_a19yk_46",$e="_small_a19yk_56",L={radiobutton:Ne,standard:qe,small:$e},$=_.forwardRef(({onChange:e,onValueChange:t,size:o="standard",name:s,className:r,...l},i)=>{const u=_.useCallback(c=>{e&&e(c),t&&t(c.target.value)},[e,t]);return n.jsx("input",{type:"radio",name:s,className:b(L.radiobutton,L[o],r),onChange:u,ref:i,...l})}),Fe="_radioButtonBox_yl38n_1",Pe="_medium_yl38n_14",ve="_large_yl38n_19",Oe="_danger_yl38n_28",Ae="_radioButtonWrapper_yl38n_39",C={radioButtonBox:Fe,medium:Pe,large:ve,danger:Oe,radioButtonWrapper:Ae},Ee=({label:e,screenReaderLabel:t,variant:o="normal",size:s="medium",className:r,icon:l,contentRight:i,style:u,disabled:c,radioButtonClassName:x,...h})=>{const p=c?q.cssColor("--swui-text-disabled-color"):void 0;return n.jsx("label",{className:b(C.radioButtonBox,C[o],C[s],r),style:u,children:n.jsxs(a.Row,{justifyContent:"space-between",flexGrow:1,children:[n.jsxs(a.Row,{alignItems:"center",children:[n.jsx($,{...h,disabled:c,className:x}),n.jsx(a.Space,{}),t?n.jsx(a.ScreenReaderOnlyText,{children:t}):null,n.jsx(a.Text,{color:p,"aria-hidden":!!t,children:e})]}),n.jsxs(a.Row,{alignItems:"center",width:l?"48px":void 0,justifyContent:"center",children:[l&&n.jsx(f.Icon,{icon:l,size:24,color:p}),!l&&i]})]})})},Le=({label:e,inputRef:t,wrapperRef:o,textColor:s,screenReaderLabel:r,...l})=>n.jsx("div",{ref:o,children:n.jsx("label",{children:n.jsxs(a.Row,{alignItems:"center",children:[n.jsx($,{ref:t,...l}),n.jsx(a.Space,{}),r?n.jsx(a.ScreenReaderOnlyText,{children:r}):null,n.jsx(a.Text,{color:s,"aria-hidden":!!r,userSelect:"none",children:e})]})})}),D=(e,t,o,s,r,l,i,u)=>{const c=_.useRef(!1),x=d=>{c.current||l?.(d.target.value??""),i?.(d)},h=d=>{c.current=!1,u?.(d)};return{onKeyDownHandler:_.useCallback(d=>{const{key:y}=d;if(y==="Enter")c.current=!0,o?.(),l?.(d.currentTarget.value??"");else if(y==="Escape")c.current=!0,s?.(),d.preventDefault(),d.stopPropagation();else if(r){const j=(g,B)=>{c.current=!0,e.current.blur(),r(g),B.preventDefault(),B.stopPropagation()};d.shiftKey&&y==="Tab"?j("left",d):y==="Tab"?j("right",d):y==="ArrowUp"?j("up",d):y==="ArrowDown"?j("down",d):y==="ArrowRight"?e.current.value.length===e.current.selectionStart&&j("right",d):y==="ArrowLeft"&&e.current.selectionStart===0&&j("left",d)}t&&t(d)},[s,r,t,e,o,l]),onBlurHandler:x,onFocusHandler:h}};function U(e){return e.tagName==="TEXTAREA"||e.tagName==="INPUT"&&(e.type==="text"||e.type==="search"||e.type==="url"||e.type==="tel"||e.type==="password")}const K=(e,t,o)=>{_.useEffect(()=>{e.current&&U(e.current)&&(o?e.current.setSelectionRange(0,e.current.value.length):t&&e.current.setSelectionRange(e.current.value.length,e.current.value.length))},[t,e,o])},z=(e,{onEnter:t,onEsc:o,onChange:s,onValueChange:r,selectAllOnMount:l,moveCursorToEndOnMount:i,onDone:u,onMove:c,onFocus:x,onBlur:h,onKeyDown:p,autoFocus:d})=>{K(e,!!i,!!l);const{onKeyDownHandler:y,onFocusHandler:j,onBlurHandler:g}=D(e,p,t,o,c,u,h,x),B=_.useCallback(w=>{s?.(w),r?.(w.target.value)},[s,r]);return{onBlur:g,onChange:B,onFocus:j,onKeyDown:y,autoFocus:l||d}},He="_textInput_1qe61_1",We="_onlyTop_1qe61_11",Me="_disabled_1qe61_15",De="_onlyBottom_1qe61_20",Ue="_onlyLeft_1qe61_28",Ke="_onlyRight_1qe61_37",ze="_input_1qe61_50",Ge="_alwaysShowPlaceholder_1qe61_74",Xe="_icon_1qe61_85",Je="_standard_1qe61_95",Qe="_success_1qe61_96",Ye="_loading_1qe61_108",Ze="_modified_1qe61_113",Ve="_error_1qe61_122",et="_warning_1qe61_131",tt="_hideBorder_1qe61_145",nt="_clickable_1qe61_152",m={textInput:He,onlyTop:We,disabled:Me,onlyBottom:De,onlyLeft:Ue,onlyRight:Ke,input:ze,alwaysShowPlaceholder:Ge,icon:Xe,standard:Je,success:Qe,loading:Ye,modified:Ze,error:Ve,warning:et,hideBorder:tt,clickable:nt},R=({button:e,icon:t,iconClassName:o,content:s,spaceOnLeft:r,spaceOnRight:l,disableContentPadding:i,disableContentPaddingLeft:u,disableContentPaddingRight:c})=>!s&&!t&&!e?null:e?n.jsxs(n.Fragment,{children:[r?n.jsx(a.Space,{num:.25}):null,e,l?n.jsx(a.Space,{num:.25}):null]}):s?n.jsxs(n.Fragment,{children:[r&&!(i||u)?n.jsx(a.Space,{}):null,s||null,l&&!(i||c)?n.jsx(a.Space,{}):null]}):n.jsxs(n.Fragment,{children:[r?n.jsx(a.Space,{}):null,t&&n.jsx(xe.FontAwesomeIcon,{icon:t,className:b(m.icon,o)}),l?n.jsx(a.Space,{}):null]}),F=e=>{const{variant:t="standard",inputRef:o,disabled:s,className:r,buttonLeft:l,buttonRight:i,contentLeft:u,contentRight:c,disableContentPadding:x,disableContentPaddingLeft:h,disableContentPaddingRight:p,iconLeft:d,iconRight:y,moveCursorToEndOnMount:j,selectAllOnMount:g,autoFocus:B,onValueChange:w,wrapperClassName:J,wrapperStyle:Q,onDone:Y,onEnter:Z,onEsc:V,onMove:ee,onChange:te,onKeyDown:ne,hideBorder:oe,onFocus:se,onBlur:re,borderRadiusVariant:le="normalBorder",width:ce,alwaysShowPlaceholder:ae,...ie}=e,ue=_.useRef(null),A=o??ue,de=z(A,{onEnter:Z,onEsc:V,onChange:te,onValueChange:w,selectAllOnMount:g,moveCursorToEndOnMount:j,onDone:Y,onMove:ee,onFocus:se,onBlur:re,onKeyDown:ne,autoFocus:B}),pe=t==="success"?f.stenaCheck:t==="warning"||t==="error"?f.stenaExclamationTriangle:y,_e=t==="loading"?n.jsx(f.InputSpinner,{}):c;return n.jsxs("div",{className:b(m.textInput,m[t],m[le],{[m.disabled]:s},{[m.hideBorder]:oe},J),style:{width:ce,...Q},children:[n.jsx(R,{content:u,disableContentPadding:x,disableContentPaddingLeft:h,disableContentPaddingRight:p,icon:d,spaceOnLeft:!0,button:l}),n.jsx("input",{className:b(m.input,{[m.alwaysShowPlaceholder]:ae},r),type:"text",disabled:s,ref:A,autoFocus:B,...ie,...de}),n.jsx(R,{content:_e,disableContentPadding:x,disableContentPaddingLeft:h,disableContentPaddingRight:p,icon:pe,spaceOnRight:!0,button:i})]})},ot="_numericTextInputInput_1tnr6_1",st={numericTextInputInput:ot},P=({onValueChange:e,value:t,numSteps:o,min:s,max:r})=>{if(e)if(!t)e(String(N(o,s,r)));else{const i=(a.parseFloatElseUndefined(t)||0)+o;e(String(N(i,s,r)))}},v=({onValueChange:e,newValue:t,min:o,max:s})=>{if(e)if(t==="")e("");else{const l=a.parseFloatElseUndefined(t)||0;e(String(N(l,o,s)))}},N=(e,t,o)=>{let s=e;return t!=null&&(s=Math.max(t,s)),o!=null&&(s=Math.min(o,s)),s},G=({value:e,onValueChange:t,max:o,min:s,step:r=1,contentRight:l,disabled:i,className:u,hideButtons:c,...x})=>{const h=_.useCallback(y=>{P({onValueChange:t,value:e,numSteps:y,min:s,max:o})},[e,o,s,t]),p=_.useCallback(y=>{v({onValueChange:t,newValue:y,min:s,max:o})},[o,s,t]),d=c?l:n.jsxs(n.Fragment,{children:[l&&n.jsxs(n.Fragment,{children:[l,n.jsx(a.Space,{})]}),n.jsx(f.UpDownButtons,{onClickUp:i?void 0:()=>h(r),onClickDown:i?void 0:()=>h(-r),iconColor:"var(--swui-textinput-text-color)",disabled:i})]});return n.jsx(F,{contentRight:d,value:e,onValueChange:p,disableContentPaddingRight:!c,type:"number",min:s,max:o,step:r,className:b(st.numericTextInputInput,u),disabled:i,...x})},rt=(e,t)=>{const o=_.useCallback(r=>{if(t)if(!r)t(void 0);else{const l=a.parseFloatElseUndefined(r);l!==void 0&&t(l)}},[t]),s=_.useMemo(()=>e===void 0?"":String(e),[e]);return{onValueChange:o,value:s}},lt=(e,t)=>{if(S.isNil(e))return!1;{const o=a.parseFloatElseUndefined(e);return!S.isNil(o)&&!S.isNil(t)&&o<=t}},ct=(e,t)=>{if(S.isNil(e))return!1;{const o=a.parseFloatElseUndefined(e);return!S.isNil(o)&&!S.isNil(t)&&o>=t}},at=({disabled:e,onValueChange:t,value:o,max:s,min:r,step:l=1,...i})=>{const u=_.useCallback(x=>{P({onValueChange:t,value:o,numSteps:x,min:r,max:s})},[o,s,r,t]),c=_.useCallback(x=>{v({onValueChange:t,newValue:x,min:r,max:s})},[s,r,t]);return n.jsxs(a.Row,{role:"group",children:[n.jsx(f.FlatButton,{leftIcon:f.stenaMinus,"aria-label":"Decrease",disabled:e||lt(o,r),onClick:()=>u(-l)}),n.jsx(a.Space,{}),n.jsx(G,{hideButtons:!0,onValueChange:c,value:o,max:s,min:r,step:l,disabled:e,...i}),n.jsx(a.Space,{}),n.jsx(f.FlatButton,{leftIcon:f.stenaPlus,"aria-label":"Increase",disabled:e||ct(o,s),onClick:()=>u(l)})]})},it=({hiddenIcon:e=f.stenaEyeShow,visibleIcon:t=f.stenaEyeHide,...o})=>{const[s,r]=_.useState(!0);return n.jsx(F,{buttonRight:n.jsx(f.TextInputButton,{icon:s?e:t,onClick:()=>r(l=>!l)}),type:s?"password":"text",...o})},X=({disabled:e,text:t,...o})=>n.jsx(a.Text,{variant:"bold",color:q.cssColor(e?"--silver":"--tjara"),size:"small",...a.getDataProps(o),children:t}),O=({htmlFor:e,screenReaderLabel:t,label:o,disabled:s,className:r})=>n.jsxs("label",{htmlFor:e,className:r,children:[t?n.jsx(a.ScreenReaderOnlyText,{children:t}):null,n.jsx(X,{"aria-hidden":!!t,text:o,disabled:s})]}),ut="_labelledSelect_vs9pj_1",dt="_medium_vs9pj_7",pt="_large_vs9pj_11",_t="_error_vs9pj_15",xt="_normal_vs9pj_20",ht="_onlyTopBorder_vs9pj_25",yt="_onlyBottomBorder_vs9pj_31",ft="_onlyLeftBorder_vs9pj_36",jt="_onlyRightBorder_vs9pj_42",bt="_label_vs9pj_1",mt="_select_vs9pj_65",gt="_iconWrapper_vs9pj_99",I={labelledSelect:ut,medium:dt,large:pt,error:_t,normal:xt,onlyTopBorder:ht,onlyBottomBorder:yt,onlyLeftBorder:ft,onlyRightBorder:jt,label:bt,select:mt,iconWrapper:gt},Bt=({onChange:e,onValueChange:t,id:o,label:s,screenReaderLabel:r,borderVariant:l="normalBorder",variant:i="normal",size:u="medium",children:c,...x})=>{const h=_.useId(),p=o??h,d=_.useCallback(y=>{e?.(y),t?.(y.target.value)},[e,t]);return n.jsxs("div",{className:b(I.labelledSelect,I[i],I[u],I[l]),children:[n.jsx(O,{htmlFor:p,className:I.label,label:s,screenReaderLabel:r}),n.jsx("select",{id:p,onChange:d,className:b(I.select,I[i],I[u]),...x,children:c}),n.jsx("div",{className:b(I.iconWrapper),children:n.jsx(f.Icon,{icon:f.stenaAngleDown,size:24,color:q.cssColor("--modern-blue")})})]})},It="_labelledTextInput_1uyc3_1",wt="_onlyTop_1uyc3_21",St="_onlyBottom_1uyc3_27",kt="_onlyLeft_1uyc3_32",Tt="_onlyRight_1uyc3_38",Rt="_disabled_1uyc3_53",Ct="_medium_1uyc3_61",Nt="_large_1uyc3_73",qt="_error_1uyc3_87",k={labelledTextInput:It,onlyTop:wt,onlyBottom:St,onlyLeft:kt,onlyRight:Tt,disabled:Rt,medium:Ct,large:Nt,error:qt},$t=fe.forwardRef(({autoComplete:e="off",label:t,id:o,screenReaderLabel:s,size:r="medium",value:l,onChange:i,disabled:u,onValueChange:c,borderRadiusVariant:x="normalBorder",variant:h="normal",width:p,...d},y)=>{const j=_.useId(),g=o??j,B=_.useCallback(w=>{i?.(w),c?.(w.target.value)},[i,c]);return n.jsxs("div",{className:b(k.labelledTextInput,k[h],k[x],k[r],u&&k.disabled),style:p?{width:p}:void 0,children:[n.jsx(O,{htmlFor:g,screenReaderLabel:s,label:t}),n.jsx("input",{ref:y,id:g,autoComplete:e,type:"text",value:l,onChange:B,disabled:u,...d})]})}),Ft=({variant:e="standard",disabled:t,wrapperClassName:o,wrapperStyle:s,contentLeft:r,contentRight:l,disableContentPadding:i,disableContentPaddingLeft:u,disableContentPaddingRight:c,iconRight:x,iconLeft:h,onClickLeft:p,onClickRight:d,children:y})=>{const j=e==="success"?f.stenaCheck:e==="warning"||e==="error"?f.stenaExclamationTriangle:x,g=e==="loading"?n.jsx(f.InputSpinner,{}):l;return n.jsxs("div",{className:b(m.textInput,m.inputContainer,m[e],{[m.disabled]:t},o),style:s,children:[n.jsx(R,{content:r,disableContentPadding:i,disableContentPaddingLeft:u,disableContentPaddingRight:c,spaceOnLeft:!0,button:h?n.jsx(f.TextInputButton,{onClick:p,icon:h}):void 0}),n.jsx(a.Row,{alignItems:"center",children:y}),n.jsx(R,{content:g,disableContentPadding:i,disableContentPaddingLeft:u,disableContentPaddingRight:c,spaceOnRight:!0,button:j?n.jsx(f.TextInputButton,{onClick:d,icon:j}):void 0})]})},Pt="_textArea_6n6nc_1",vt={textArea:Pt},Ot=_.forwardRef(({className:e,value:t,onValueChange:o,onChange:s,resize:r="none",readOnly:l=!1,rows:i,disabled:u,...c},x)=>{const h=_.useCallback(p=>{s&&s(p),o&&o(p.target.value)},[s,o]);return n.jsx("textarea",{disabled:u,rows:i,readOnly:l,className:b(vt.textArea,e),style:{resize:r},onChange:h,value:t,ref:x,...c})});function At({value:e,tooltipLabel:t="Copied to clipboard!",size:o="small"}){const[s,r]=a.useTimeoutState(!1,2e3),l=_.useCallback(async()=>{e!=null&&(await navigator.clipboard.writeText(e),r(!0))},[r,e]);return n.jsx(he.Tooltip,{visible:s,label:t,children:n.jsx(f.FlatButton,{size:o,onClick:l,leftIcon:f.stenaCopy,disabled:e==null})})}exports.AmountStepperButtons=me;exports.Checkbox=M;exports.CheckboxWithLabel=Ce;exports.CopyToClipboardButton=At;exports.InputLabel=O;exports.InputLabelText=X;exports.LabelledSelect=Bt;exports.LabelledTextInput=$t;exports.NumericStepper=at;exports.NumericTextInput=G;exports.PasswordInput=it;exports.RadioButton=$;exports.RadioButtonBox=Ee;exports.RadioButtonWithLabel=Le;exports.ReadOnlyNumericInput=H;exports.Switch=W;exports.SwitchWithLabel=Se;exports.TextArea=Ot;exports.TextInput=F;exports.TextInputBox=Ft;exports.elementHasSelectionRange=U;exports.onStepValueChange=P;exports.onTextValueChange=v;exports.useKeyboardNavigation=D;exports.useNumericInputValue=rt;exports.useSelectAllOnMount=K;exports.useTextInput=z;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),a=require("@stenajs-webui/core"),_=require("react"),y=require("@stenajs-webui/elements"),b=require("classnames"),q=require("@stenajs-webui/theme"),xe=require("@fortawesome/react-fontawesome"),S=require("lodash-es"),he=require("@stenajs-webui/tooltip");function ye(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const fe=ye(_),je="_readOnlyInput_7bzmw_1",be={readOnlyInput:je},H=({value:e,id:t,...o})=>n.jsx("input",{...o,type:"number",id:t,value:e,readOnly:!0,className:be.readOnlyInput}),me=({value:e,onValueChange:t,variant:o,decreaseDisabled:s,increaseDisabled:r,inputId:l,ariaLabelDecrease:i,ariaLabelIncrease:u,textValueAriaLabel:c,increaseTestId:x,decreaseTestId:f,onIncrease:p,onDecrease:d,size:h})=>{const j=_.useCallback(()=>{p?.(),t?.(e+1)},[p,t,e]),m=_.useCallback(()=>{d?.(),t?.(e-1)},[d,t,e]);return n.jsxs(a.Row,{alignItems:"center",children:[n.jsx(y.PrimaryButton,{size:h,"aria-label":i,variant:o,leftIcon:y.stenaMinus,"data-testid":f??"decrease",disabled:s,onClick:m}),n.jsx(H,{id:l,"data-testid":"amountStepperValue",value:e.toString(),"aria-label":c}),n.jsx(y.PrimaryButton,{size:h,leftIcon:y.stenaPlus,variant:o,"aria-label":u,"data-testid":x??"increase",disabled:r,onClick:j})]})},ge="_knob_1d6s8_56",Be="_filler_1d6s8_61",Ie="_checked_1d6s8_75",T={switch:"_switch_1d6s8_1",knob:ge,filler:Be,checked:Ie},we=`${T.switch} ${T.checked}`,W=({value:e,disabled:t,onValueChange:o,className:s,wrapperRef:r,...l})=>n.jsx("div",{className:s,ref:r,children:n.jsxs("button",{type:"button",role:"switch","aria-checked":e,className:e?we:T.switch,disabled:t,onClick:()=>o&&o(!e),...l,children:[n.jsx("div",{className:T.filler}),n.jsx("div",{className:T.knob})]})}),Se=({label:e,disabled:t,textColor:o,wrapperRef:s,screenReaderLabel:r,...l})=>n.jsx("div",{ref:s,children:n.jsx("label",{children:n.jsxs(a.Box,{row:!0,alignItems:"center",children:[n.jsx(W,{disabled:t,...l}),n.jsx(a.Space,{}),r?n.jsx(a.ScreenReaderOnlyText,{children:r}):null,n.jsx(a.Text,{color:o,"aria-hidden":!!r,userSelect:"none",children:e})]})})}),ke="_checkbox_1t23r_1",Te="_standard_1t23r_40",Re="_small_1t23r_52",E={checkbox:ke,standard:Te,small:Re},M=_.forwardRef(({indeterminate:e=!1,onChange:t,onValueChange:o,value:s=!1,size:r="standard",className:l,...i},u)=>{const c=_.useRef(null),x=p=>{c.current=p,c.current&&(c.current.indeterminate=!!e),u&&(typeof u=="function"?u(p):u.current=p)},f=_.useCallback(p=>{t&&t(p),o&&o(p.target.checked)},[t,o]);return _.useEffect(()=>{c.current&&(c.current.indeterminate=!!e)},[e,c]),n.jsx("input",{type:"checkbox",className:b(E.checkbox,E[r],l),checked:s,onChange:f,ref:x,...i})}),Ce=({children:e,label:t,inputRef:o,wrapperRef:s,textColor:r,screenReaderLabel:l,...i})=>n.jsx("div",{ref:s,children:n.jsx("label",{children:n.jsxs(a.Row,{alignItems:"center",children:[n.jsx(M,{...i,ref:o}),n.jsx(a.Space,{}),l?n.jsx(a.ScreenReaderOnlyText,{children:l}):null,n.jsx(a.Text,{color:r,"aria-hidden":!!l,userSelect:"none",children:t}),e]})})}),Ne="_radiobutton_a19yk_1",qe="_standard_a19yk_46",$e="_small_a19yk_56",L={radiobutton:Ne,standard:qe,small:$e},$=_.forwardRef(({onChange:e,onValueChange:t,size:o="standard",name:s,className:r,...l},i)=>{const u=_.useCallback(c=>{e&&e(c),t&&t(c.target.value)},[e,t]);return n.jsx("input",{type:"radio",name:s,className:b(L.radiobutton,L[o],r),onChange:u,ref:i,...l})}),Fe="_radioButtonBox_yl38n_1",Pe="_medium_yl38n_14",Oe="_large_yl38n_19",ve="_danger_yl38n_28",Ae="_radioButtonWrapper_yl38n_39",C={radioButtonBox:Fe,medium:Pe,large:Oe,danger:ve,radioButtonWrapper:Ae},Ee=({label:e,screenReaderLabel:t,variant:o="normal",size:s="medium",className:r,icon:l,contentRight:i,style:u,disabled:c,radioButtonClassName:x,...f})=>{const p=c?q.cssColor("--swui-text-disabled-color"):void 0;return n.jsx("label",{className:b(C.radioButtonBox,C[o],C[s],r),style:u,children:n.jsxs(a.Row,{justifyContent:"space-between",flexGrow:1,children:[n.jsxs(a.Row,{alignItems:"center",children:[n.jsx($,{...f,disabled:c,className:x}),n.jsx(a.Space,{}),t?n.jsx(a.ScreenReaderOnlyText,{children:t}):null,n.jsx(a.Text,{color:p,"aria-hidden":!!t,children:e})]}),n.jsxs(a.Row,{alignItems:"center",width:l?"48px":void 0,justifyContent:"center",children:[l&&n.jsx(y.Icon,{icon:l,size:24,color:p}),!l&&i]})]})})},Le=({label:e,inputRef:t,wrapperRef:o,textColor:s,screenReaderLabel:r,...l})=>n.jsx("div",{ref:o,children:n.jsx("label",{children:n.jsxs(a.Row,{alignItems:"center",children:[n.jsx($,{ref:t,...l}),n.jsx(a.Space,{}),r?n.jsx(a.ScreenReaderOnlyText,{children:r}):null,n.jsx(a.Text,{color:s,"aria-hidden":!!r,userSelect:"none",children:e})]})})}),D=(e,t,o,s,r,l,i,u)=>{const c=_.useRef(!1),x=d=>{c.current||l?.(d.target.value??""),i?.(d)},f=d=>{c.current=!1,u?.(d)};return{onKeyDownHandler:_.useCallback(d=>{const{key:h}=d;if(h==="Enter")c.current=!0,o?.(),l?.(d.currentTarget.value??"");else if(h==="Escape")c.current=!0,s?.(),d.preventDefault(),d.stopPropagation();else if(r){const j=(m,B)=>{c.current=!0,e.current.blur(),r(m),B.preventDefault(),B.stopPropagation()};d.shiftKey&&h==="Tab"?j("left",d):h==="Tab"?j("right",d):h==="ArrowUp"?j("up",d):h==="ArrowDown"?j("down",d):h==="ArrowRight"?e.current.value.length===e.current.selectionStart&&j("right",d):h==="ArrowLeft"&&e.current.selectionStart===0&&j("left",d)}t&&t(d)},[s,r,t,e,o,l]),onBlurHandler:x,onFocusHandler:f}};function U(e){return e.tagName==="TEXTAREA"||e.tagName==="INPUT"&&(e.type==="text"||e.type==="search"||e.type==="url"||e.type==="tel"||e.type==="password")}const K=(e,t,o)=>{_.useEffect(()=>{e.current&&U(e.current)&&(o?e.current.setSelectionRange(0,e.current.value.length):t&&e.current.setSelectionRange(e.current.value.length,e.current.value.length))},[t,e,o])},z=(e,{onEnter:t,onEsc:o,onChange:s,onValueChange:r,selectAllOnMount:l,moveCursorToEndOnMount:i,onDone:u,onMove:c,onFocus:x,onBlur:f,onKeyDown:p,autoFocus:d})=>{K(e,!!i,!!l);const{onKeyDownHandler:h,onFocusHandler:j,onBlurHandler:m}=D(e,p,t,o,c,u,f,x),B=_.useCallback(w=>{s?.(w),r?.(w.target.value)},[s,r]);return{onBlur:m,onChange:B,onFocus:j,onKeyDown:h,autoFocus:l||d}},He="_textInput_1qe61_1",We="_onlyTop_1qe61_11",Me="_disabled_1qe61_15",De="_onlyBottom_1qe61_20",Ue="_onlyLeft_1qe61_28",Ke="_onlyRight_1qe61_37",ze="_input_1qe61_50",Ge="_alwaysShowPlaceholder_1qe61_74",Xe="_icon_1qe61_85",Je="_standard_1qe61_95",Qe="_success_1qe61_96",Ye="_loading_1qe61_108",Ze="_modified_1qe61_113",Ve="_error_1qe61_122",et="_warning_1qe61_131",tt="_hideBorder_1qe61_145",nt="_clickable_1qe61_152",g={textInput:He,onlyTop:We,disabled:Me,onlyBottom:De,onlyLeft:Ue,onlyRight:Ke,input:ze,alwaysShowPlaceholder:Ge,icon:Xe,standard:Je,success:Qe,loading:Ye,modified:Ze,error:Ve,warning:et,hideBorder:tt,clickable:nt},R=({button:e,icon:t,iconClassName:o,content:s,spaceOnLeft:r,spaceOnRight:l,disableContentPadding:i,disableContentPaddingLeft:u,disableContentPaddingRight:c})=>!s&&!t&&!e?null:e?n.jsxs(n.Fragment,{children:[r?n.jsx(a.Space,{num:.25}):null,e,l?n.jsx(a.Space,{num:.25}):null]}):s?n.jsxs(n.Fragment,{children:[r&&!(i||u)?n.jsx(a.Space,{}):null,s||null,l&&!(i||c)?n.jsx(a.Space,{}):null]}):n.jsxs(n.Fragment,{children:[r?n.jsx(a.Space,{}):null,t&&n.jsx(xe.FontAwesomeIcon,{icon:t,className:b(g.icon,o)}),l?n.jsx(a.Space,{}):null]}),F=e=>{const{variant:t="standard",inputRef:o,disabled:s,className:r,buttonLeft:l,buttonRight:i,contentLeft:u,contentRight:c,disableContentPadding:x,disableContentPaddingLeft:f,disableContentPaddingRight:p,iconLeft:d,iconRight:h,moveCursorToEndOnMount:j,selectAllOnMount:m,autoFocus:B,onValueChange:w,wrapperClassName:J,wrapperStyle:Q,onDone:Y,onEnter:Z,onEsc:V,onMove:ee,onChange:te,onKeyDown:ne,hideBorder:oe,onFocus:se,onBlur:re,borderRadiusVariant:le="normalBorder",width:ce,alwaysShowPlaceholder:ae,...ie}=e,ue=_.useRef(null),A=o??ue,de=z(A,{onEnter:Z,onEsc:V,onChange:te,onValueChange:w,selectAllOnMount:m,moveCursorToEndOnMount:j,onDone:Y,onMove:ee,onFocus:se,onBlur:re,onKeyDown:ne,autoFocus:B}),pe=t==="success"?y.stenaCheck:t==="warning"||t==="error"?y.stenaExclamationTriangle:h,_e=t==="loading"?n.jsx(y.InputSpinner,{}):c;return n.jsxs("div",{className:b(g.textInput,g[t],g[le],{[g.disabled]:s},{[g.hideBorder]:oe},J),style:{width:ce,...Q},children:[n.jsx(R,{content:u,disableContentPadding:x,disableContentPaddingLeft:f,disableContentPaddingRight:p,icon:d,spaceOnLeft:!0,button:l}),n.jsx("input",{className:b(g.input,{[g.alwaysShowPlaceholder]:ae},r),type:"text",disabled:s,ref:A,autoFocus:B,...ie,...de}),n.jsx(R,{content:_e,disableContentPadding:x,disableContentPaddingLeft:f,disableContentPaddingRight:p,icon:pe,spaceOnRight:!0,button:i})]})},ot="_numericTextInputInput_1tnr6_1",st={numericTextInputInput:ot},P=({onValueChange:e,value:t,numSteps:o,min:s,max:r})=>{if(e)if(!t)e(String(N(o,s,r)));else{const i=(a.parseFloatElseUndefined(t)||0)+o;e(String(N(i,s,r)))}},O=({onValueChange:e,newValue:t,min:o,max:s})=>{if(e)if(t==="")e("");else{const l=a.parseFloatElseUndefined(t)||0;e(String(N(l,o,s)))}},N=(e,t,o)=>{let s=e;return t!=null&&(s=Math.max(t,s)),o!=null&&(s=Math.min(o,s)),s},G=({value:e,onValueChange:t,max:o,min:s,step:r=1,contentRight:l,disabled:i,className:u,hideButtons:c,...x})=>{const f=_.useCallback(h=>{P({onValueChange:t,value:e,numSteps:h,min:s,max:o})},[e,o,s,t]),p=_.useCallback(h=>{O({onValueChange:t,newValue:h,min:s,max:o})},[o,s,t]),d=c?l:n.jsxs(n.Fragment,{children:[l&&n.jsxs(n.Fragment,{children:[l,n.jsx(a.Space,{})]}),n.jsx(y.UpDownButtons,{onClickUp:i?void 0:()=>f(r),onClickDown:i?void 0:()=>f(-r),iconColor:"var(--swui-textinput-text-color)",disabled:i})]});return n.jsx(F,{contentRight:d,value:e,onValueChange:p,disableContentPaddingRight:!c,type:"number",min:s,max:o,step:r,className:b(st.numericTextInputInput,u),disabled:i,...x})},rt=(e,t)=>{const o=_.useCallback(r=>{if(t)if(!r)t(void 0);else{const l=a.parseFloatElseUndefined(r);l!==void 0&&t(l)}},[t]),s=_.useMemo(()=>e===void 0?"":String(e),[e]);return{onValueChange:o,value:s}},lt=(e,t)=>{if(S.isNil(e))return!1;{const o=a.parseFloatElseUndefined(e);return!S.isNil(o)&&!S.isNil(t)&&o<=t}},ct=(e,t)=>{if(S.isNil(e))return!1;{const o=a.parseFloatElseUndefined(e);return!S.isNil(o)&&!S.isNil(t)&&o>=t}},at=({disabled:e,onValueChange:t,value:o,max:s,min:r,step:l=1,...i})=>{const u=_.useCallback(x=>{P({onValueChange:t,value:o,numSteps:x,min:r,max:s})},[o,s,r,t]),c=_.useCallback(x=>{O({onValueChange:t,newValue:x,min:r,max:s})},[s,r,t]);return n.jsxs(a.Row,{role:"group",children:[n.jsx(y.FlatButton,{leftIcon:y.stenaMinus,"aria-label":"Decrease",disabled:e||lt(o,r),onClick:()=>u(-l)}),n.jsx(a.Space,{}),n.jsx(G,{hideButtons:!0,onValueChange:c,value:o,max:s,min:r,step:l,disabled:e,...i}),n.jsx(a.Space,{}),n.jsx(y.FlatButton,{leftIcon:y.stenaPlus,"aria-label":"Increase",disabled:e||ct(o,s),onClick:()=>u(l)})]})},it=({hiddenIcon:e=y.stenaEyeShow,visibleIcon:t=y.stenaEyeHide,...o})=>{const[s,r]=_.useState(!0);return n.jsx(F,{buttonRight:n.jsx(y.TextInputButton,{icon:s?e:t,onClick:()=>r(l=>!l)}),type:s?"password":"text",...o})},X=({disabled:e,text:t,...o})=>n.jsx(a.Text,{variant:"bold",color:q.cssColor(e?"--silver":"--tjara"),size:"small",...a.getDataProps(o),children:t}),v=({htmlFor:e,screenReaderLabel:t,label:o,disabled:s,className:r})=>n.jsxs("label",{htmlFor:e,className:r,children:[t?n.jsx(a.ScreenReaderOnlyText,{children:t}):null,n.jsx(X,{"aria-hidden":!!t,text:o,disabled:s})]}),ut="_labelledSelect_vs9pj_1",dt="_medium_vs9pj_7",pt="_large_vs9pj_11",_t="_error_vs9pj_15",xt="_normal_vs9pj_20",ht="_onlyTopBorder_vs9pj_25",yt="_onlyBottomBorder_vs9pj_31",ft="_onlyLeftBorder_vs9pj_36",jt="_onlyRightBorder_vs9pj_42",bt="_label_vs9pj_1",mt="_select_vs9pj_65",gt="_iconWrapper_vs9pj_99",I={labelledSelect:ut,medium:dt,large:pt,error:_t,normal:xt,onlyTopBorder:ht,onlyBottomBorder:yt,onlyLeftBorder:ft,onlyRightBorder:jt,label:bt,select:mt,iconWrapper:gt},Bt=({onChange:e,onValueChange:t,id:o,label:s,screenReaderLabel:r,borderVariant:l="normalBorder",variant:i="normal",size:u="medium",children:c,...x})=>{const f=_.useId(),p=o??f,d=_.useCallback(h=>{e?.(h),t?.(h.target.value)},[e,t]);return n.jsxs("div",{className:b(I.labelledSelect,I[i],I[u],I[l]),children:[n.jsx(v,{htmlFor:p,className:I.label,label:s,screenReaderLabel:r}),n.jsx("select",{id:p,onChange:d,className:b(I.select,I[i],I[u]),...x,children:c}),n.jsx("div",{className:b(I.iconWrapper),children:n.jsx(y.Icon,{icon:y.stenaAngleDown,size:24,color:q.cssColor("--modern-blue")})})]})},It="_labelledTextInput_1uyc3_1",wt="_onlyTop_1uyc3_21",St="_onlyBottom_1uyc3_27",kt="_onlyLeft_1uyc3_32",Tt="_onlyRight_1uyc3_38",Rt="_disabled_1uyc3_53",Ct="_medium_1uyc3_61",Nt="_large_1uyc3_73",qt="_error_1uyc3_87",k={labelledTextInput:It,onlyTop:wt,onlyBottom:St,onlyLeft:kt,onlyRight:Tt,disabled:Rt,medium:Ct,large:Nt,error:qt},$t=fe.forwardRef(({autoComplete:e="off",label:t,id:o,screenReaderLabel:s,size:r="medium",value:l,onChange:i,disabled:u,onValueChange:c,borderRadiusVariant:x="normalBorder",variant:f="normal",width:p,...d},h)=>{const j=_.useId(),m=o??j,B=_.useCallback(w=>{i?.(w),c?.(w.target.value)},[i,c]);return n.jsxs("div",{className:b(k.labelledTextInput,k[f],k[x],k[r],u&&k.disabled),style:p?{width:p}:void 0,children:[n.jsx(v,{htmlFor:m,screenReaderLabel:s,label:t}),n.jsx("input",{ref:h,id:m,autoComplete:e,type:"text",value:l,onChange:B,disabled:u,...d})]})}),Ft=({variant:e="standard",disabled:t,wrapperClassName:o,wrapperStyle:s,contentLeft:r,contentRight:l,disableContentPadding:i,disableContentPaddingLeft:u,disableContentPaddingRight:c,iconRight:x,iconLeft:f,onClickLeft:p,onClickRight:d,children:h})=>{const j=e==="success"?y.stenaCheck:e==="warning"||e==="error"?y.stenaExclamationTriangle:x,m=e==="loading"?n.jsx(y.InputSpinner,{}):l;return n.jsxs("div",{className:b(g.textInput,g.inputContainer,g[e],{[g.disabled]:t},o),style:s,children:[n.jsx(R,{content:r,disableContentPadding:i,disableContentPaddingLeft:u,disableContentPaddingRight:c,spaceOnLeft:!0,button:f?n.jsx(y.TextInputButton,{onClick:p,icon:f}):void 0}),n.jsx(a.Row,{alignItems:"center",children:h}),n.jsx(R,{content:m,disableContentPadding:i,disableContentPaddingLeft:u,disableContentPaddingRight:c,spaceOnRight:!0,button:j?n.jsx(y.TextInputButton,{onClick:d,icon:j}):void 0})]})},Pt="_textArea_6n6nc_1",Ot={textArea:Pt},vt=_.forwardRef(({className:e,value:t,onValueChange:o,onChange:s,resize:r="none",readOnly:l=!1,rows:i,disabled:u,...c},x)=>{const f=_.useCallback(p=>{s&&s(p),o&&o(p.target.value)},[s,o]);return n.jsx("textarea",{disabled:u,rows:i,readOnly:l,className:b(Ot.textArea,e),style:{resize:r},onChange:f,value:t,ref:x,...c})});function At({value:e,tooltipLabel:t="Copied to clipboard!",size:o="small"}){const[s,r]=a.useTimeoutState(!1,2e3),l=_.useCallback(async()=>{e!=null&&(await navigator.clipboard.writeText(e),r(!0))},[r,e]);return n.jsx(he.Tooltip,{visible:s,label:t,children:n.jsx(y.FlatButton,{size:o,onClick:l,leftIcon:y.stenaCopy,disabled:e==null})})}exports.AmountStepperButtons=me;exports.Checkbox=M;exports.CheckboxWithLabel=Ce;exports.CopyToClipboardButton=At;exports.InputLabel=v;exports.InputLabelText=X;exports.LabelledSelect=Bt;exports.LabelledTextInput=$t;exports.NumericStepper=at;exports.NumericTextInput=G;exports.PasswordInput=it;exports.RadioButton=$;exports.RadioButtonBox=Ee;exports.RadioButtonWithLabel=Le;exports.ReadOnlyNumericInput=H;exports.Switch=W;exports.SwitchWithLabel=Se;exports.TextArea=vt;exports.TextInput=F;exports.TextInputBox=Ft;exports.elementHasSelectionRange=U;exports.onStepValueChange=P;exports.onTextValueChange=O;exports.useKeyboardNavigation=D;exports.useNumericInputValue=rt;exports.useSelectAllOnMount=K;exports.useTextInput=z;
|
|
3
3
|
//# sourceMappingURL=index.js.map
|