@stenajs-webui/forms 23.6.0 → 23.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/labelled-select/LabelledSelect.d.ts +1 -1
- package/dist/index.es.js +215 -213
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.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"],"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\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"],"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","contentRightToUse","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"],"mappings":"2pBAOaA,EAAiD,CAAC,CAC7D,MAAAC,EACA,GAAAC,EACA,GAAGC,CACL,IAEIC,EAAAA,IAAC,QAAA,CACE,GAAGD,EACJ,KAAK,SACL,G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CAAE,OAAAuJ,CAAA,EACT,SAAUrF,EACV,MAAA/F,EACA,IAAA8C,EACC,GAAGyI,CAAA,CAAA,CAGV,CACF"}
|
|
1
|
+
{"version":3,"file":"index.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"],"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"],"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","contentRightToUse","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"],"mappings":"2pBAOaA,EAAiD,CAAC,CAC7D,MAAAC,EACA,GAAAC,EACA,GAAGC,CACL,IAEIC,EAAAA,IAAC,QAAA,CACE,GAAGD,EACJ,KAAK,SACL,GAAAD,EACA,MAAAD,EACA,SAAQ,GACR,UAAWI,GAAO,aAAA,CAAA,ECQXC,GAA4D,CAAC,CACxE,MAAAL,EACA,cAAAM,EACA,iBAAAC,EACA,iBAAAC,EACA,QAAAC,EACA,kBAAA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
|
|
2
2
|
"name": "@stenajs-webui/forms",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "mattias800",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"deploy": "gh-pages -d example/build"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@stenajs-webui/core": "23.
|
|
39
|
-
"@stenajs-webui/elements": "23.
|
|
40
|
-
"@stenajs-webui/theme": "23.
|
|
41
|
-
"@stenajs-webui/tooltip": "23.
|
|
38
|
+
"@stenajs-webui/core": "23.7.0",
|
|
39
|
+
"@stenajs-webui/elements": "23.7.0",
|
|
40
|
+
"@stenajs-webui/theme": "23.7.0",
|
|
41
|
+
"@stenajs-webui/tooltip": "23.7.0",
|
|
42
42
|
"classnames": "^2.5.1",
|
|
43
43
|
"date-fns": "4.1.0",
|
|
44
44
|
"lodash-es": "^4.17.21"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"files": [
|
|
77
77
|
"dist"
|
|
78
78
|
],
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "c2b9d829205cf20bf5a41c4f01734997413136a0",
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
}
|