@povio/ui 2.2.5 → 2.2.7
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/assets/icons/AlignCenter.js +3 -1
- package/dist/assets/icons/AlignLeft.js +3 -1
- package/dist/assets/icons/AlignLeftRight.js +3 -1
- package/dist/assets/icons/AlignRight.js +3 -1
- package/dist/assets/icons/ArrowDropDown.js +3 -1
- package/dist/assets/icons/ArrowDropUp.js +3 -1
- package/dist/assets/icons/ArrowLeft.js +3 -1
- package/dist/assets/icons/ArrowRight.js +3 -1
- package/dist/assets/icons/Bold.js +3 -1
- package/dist/assets/icons/BulletedList.js +3 -1
- package/dist/assets/icons/Calendar.js +3 -1
- package/dist/assets/icons/Check.js +3 -1
- package/dist/assets/icons/CheckCircle.js +3 -1
- package/dist/assets/icons/CheckboxCheckmark.js +3 -1
- package/dist/assets/icons/CheckboxIndeterminate.js +3 -1
- package/dist/assets/icons/ChevronDown.js +3 -1
- package/dist/assets/icons/ChevronLeft.js +3 -1
- package/dist/assets/icons/ChevronRight.js +3 -1
- package/dist/assets/icons/ChevronUp.js +3 -1
- package/dist/assets/icons/ChevronsLeft.js +3 -1
- package/dist/assets/icons/ChevronsRight.js +3 -1
- package/dist/assets/icons/Clock.js +3 -1
- package/dist/assets/icons/Close.js +3 -1
- package/dist/assets/icons/DateTime.js +3 -1
- package/dist/assets/icons/DragIndicator.js +3 -1
- package/dist/assets/icons/File.js +3 -1
- package/dist/assets/icons/Highlight.js +3 -1
- package/dist/assets/icons/HighlightOn.js +3 -1
- package/dist/assets/icons/Home.js +3 -1
- package/dist/assets/icons/Info.js +3 -1
- package/dist/assets/icons/Italic.js +3 -1
- package/dist/assets/icons/Link.js +3 -1
- package/dist/assets/icons/Menu.js +3 -1
- package/dist/assets/icons/NumberedList.js +3 -1
- package/dist/assets/icons/PointerHorizontal.js +3 -1
- package/dist/assets/icons/PointerVertical.js +3 -1
- package/dist/assets/icons/Search.js +15 -0
- package/dist/assets/icons/Send.js +3 -1
- package/dist/assets/icons/Strikethrough.js +3 -1
- package/dist/assets/icons/TextColor.js +3 -1
- package/dist/assets/icons/Today.js +3 -1
- package/dist/assets/icons/Underlined.js +3 -1
- package/dist/assets/icons/Upload.js +3 -1
- package/dist/assets/icons/Visibility.js +3 -1
- package/dist/assets/icons/VisibilityOff.js +3 -1
- package/dist/assets/icons/WarningFilled.js +3 -1
- package/dist/assets/locales/en/translation.json.js +1 -0
- package/dist/assets/locales/sl/translation.json.js +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +5 -3
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +7 -5
- package/dist/components/Menu/Menu.js +3 -1
- package/dist/components/Menu/MenuDesktop.js +3 -1
- package/dist/components/Menu/MenuItem.js +3 -1
- package/dist/components/Menu/MenuMobile.js +4 -1
- package/dist/components/Menu/MenuPopover.js +3 -1
- package/dist/components/Menu/menu.cva.js +6 -4
- package/dist/components/buttons/Button/Button.js +3 -1
- package/dist/components/buttons/Button/button.cva.js +7 -5
- package/dist/components/buttons/IconButton/IconButton.js +3 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +3 -1
- package/dist/components/buttons/PillButton/PillButton.js +3 -1
- package/dist/components/buttons/PillButton/pillButton.cva.js +6 -4
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -1
- package/dist/components/buttons/TextButton/TextButton.js +3 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.js +3 -1
- package/dist/components/buttons/shared/ButtonContent.js +3 -1
- package/dist/components/buttons/shared/buttonContent.cva.js +2 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +4 -2
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +3 -1
- package/dist/components/inputs/Checkbox/checkbox.cva.js +7 -4
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +3 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +10 -8
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +3 -1
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +3 -1
- package/dist/components/inputs/DateTime/shared/Calendar.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +5 -3
- package/dist/components/inputs/DateTime/shared/DateField.js +3 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +3 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +4 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +6 -14
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +4 -2
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +3 -1
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimeField.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +3 -1
- package/dist/components/inputs/DateTime/shared/YearPicker.js +3 -1
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +21 -7
- package/dist/components/inputs/File/FileUploadContainer.js +3 -1
- package/dist/components/inputs/File/InputUpload.js +3 -1
- package/dist/components/inputs/File/fileUpload.types.d.ts +11 -1
- package/dist/components/inputs/File/shared/FileCard.js +3 -1
- package/dist/components/inputs/File/shared/FileCardList.js +4 -2
- package/dist/components/inputs/File/shared/FileUploadContent.js +3 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -1
- package/dist/components/inputs/File/shared/FileUploadContentError.js +5 -3
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -4
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +6 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -2
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -1
- package/dist/components/inputs/File/shared/ProgressBar.js +3 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +4 -2
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +6 -3
- package/dist/components/inputs/FormField/FormField.js +11 -1
- package/dist/components/inputs/FormField/FormFieldError.js +5 -3
- package/dist/components/inputs/FormField/FormFieldHeader.js +3 -1
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +4 -2
- package/dist/components/inputs/FormField/FormFieldHelper.d.ts +8 -0
- package/dist/components/inputs/FormField/FormFieldHelper.js +14 -0
- package/dist/components/inputs/FormField/FormFieldLabel.js +4 -1
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +6 -0
- package/dist/components/inputs/FormField/formFieldError.cva.js +11 -0
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +6 -0
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +3 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +4 -2
- package/dist/components/inputs/Input/TextArea/TextArea.js +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +3 -1
- package/dist/components/inputs/Input/shared/InputContent.js +4 -1
- package/dist/components/inputs/Inputs/Form.js +2 -0
- package/dist/components/inputs/Inputs/InputItem.js +2 -0
- package/dist/components/inputs/Inputs/Inputs.js +2 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.js +6 -4
- package/dist/components/inputs/RadioGroup/radio.cva.js +6 -3
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +3 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +3 -1
- package/dist/components/inputs/Selection/Select/Select.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/SelectBase.js +5 -2
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectListBox.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +5 -3
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectMobile.js +19 -13
- package/dist/components/inputs/Selection/shared/select.context.js +20 -18
- package/dist/components/inputs/Selection/shared/useSelectItems.js +6 -4
- package/dist/components/inputs/Slider/Slider.js +3 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +4 -2
- package/dist/components/inputs/TextEditor/textEditor.types.js +3 -1
- package/dist/components/inputs/Toggle/Toggle.js +3 -1
- package/dist/components/inputs/Toggle/toggle.cva.js +5 -2
- package/dist/components/inputs/shared/CheckContent.js +4 -1
- package/dist/components/inputs/shared/InputClear.js +5 -3
- package/dist/components/inputs/shared/TooltipWrapper.js +3 -1
- package/dist/components/inputs/shared/input.cva.js +6 -4
- package/dist/components/inputs/shared/label.cva.js +9 -2
- package/dist/components/navigation/Accordion/Accordion.js +3 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -1
- package/dist/components/navigation/Accordion/accordion.cva.js +12 -10
- package/dist/components/navigation/Stepper/Stepper.js +3 -1
- package/dist/components/navigation/Stepper/StepperItem.js +3 -1
- package/dist/components/navigation/Stepper/StepperSeparator.js +3 -1
- package/dist/components/navigation/Stepper/stepper.cva.js +9 -7
- package/dist/components/outline.clsx.js +4 -2
- package/dist/components/overlays/ActionModal/ActionModal.js +3 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +5 -0
- package/dist/components/overlays/BottomSheet/BottomSheet.js +23 -7
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +13 -0
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +38 -0
- package/dist/components/overlays/Drawer/Drawer.js +3 -1
- package/dist/components/overlays/Modal/Modal.js +4 -2
- package/dist/components/overlays/Modal/modal.cva.js +5 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +7 -10
- package/dist/components/overlays/Tooltip/Tooltip.js +7 -2
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +3 -1
- package/dist/components/overlays/Tooltip/tooltip.cva.js +6 -4
- package/dist/components/segment/Segment.js +3 -1
- package/dist/components/segment/SegmentItem.js +3 -1
- package/dist/components/segment/segment.cva.js +4 -2
- package/dist/components/shared/pagination/Pagination.js +4 -2
- package/dist/components/shared/pagination/PaginationList.js +4 -2
- package/dist/components/shared/pagination/minWidth.cva.js +3 -1
- package/dist/components/shared/popover.cva.js +3 -1
- package/dist/components/status/Alert/Alert.js +3 -1
- package/dist/components/status/Alert/alert.cva.js +3 -1
- package/dist/components/status/Loader/Loader.js +3 -1
- package/dist/components/status/Loader/loader.cva.js +4 -2
- package/dist/components/status/Toast/Toast.js +15 -6
- package/dist/components/status/Toast/toast.cva.js +6 -20
- package/dist/components/status/Toast/useToast.js +3 -1
- package/dist/components/status/shared/status.cva.js +4 -2
- package/dist/components/table/CellText.d.ts +2 -1
- package/dist/components/table/CellText.js +18 -10
- package/dist/components/table/ColumnConfig.js +3 -1
- package/dist/components/table/HeaderText.d.ts +5 -2
- package/dist/components/table/HeaderText.js +17 -7
- package/dist/components/table/InfiniteTable.js +3 -1
- package/dist/components/table/PaginatedTable.js +3 -1
- package/dist/components/table/Table.js +5 -3
- package/dist/components/table/table.cva.d.ts +6 -0
- package/dist/components/table/table.cva.js +9 -5
- package/dist/components/text/Link/Link.js +3 -1
- package/dist/components/text/Link/link.cva.js +3 -1
- package/dist/components/text/Tag/Tag.d.ts +3 -0
- package/dist/components/text/Tag/Tag.js +9 -4
- package/dist/components/text/Tag/tag.cva.js +3 -1
- package/dist/components/text/Typography/Typography.js +3 -1
- package/dist/components/text/Typography/typography.cva.js +3 -1
- package/dist/config/confirmation.context.js +4 -2
- package/dist/config/i18n.js +4 -2
- package/dist/config/link.context.js +3 -1
- package/dist/config/router.context.js +3 -1
- package/dist/config/theme.context.js +8 -6
- package/dist/config/uiConfig.context.d.ts +10 -2
- package/dist/config/uiConfig.context.js +25 -4
- package/dist/config/uiStyle.context.d.ts +9 -1
- package/dist/config/uiStyle.context.js +3 -1
- package/dist/helpers/dynamicColumns.js +4 -2
- package/dist/helpers/dynamicInputs.js +5 -3
- package/dist/hooks/useAutosave.js +2 -0
- package/dist/hooks/useBreakpoint.js +5 -3
- package/dist/hooks/useDebounceCallback.js +2 -0
- package/dist/hooks/useDeepCompare.js +5 -3
- package/dist/hooks/useFilters.js +3 -1
- package/dist/hooks/useForm.js +2 -0
- package/dist/hooks/useFormAutosave.js +2 -0
- package/dist/hooks/useIntersectionObserver.js +3 -1
- package/dist/hooks/useLocalStorage.js +3 -1
- package/dist/hooks/useLongPressRepeat.js +3 -1
- package/dist/hooks/usePagination.js +2 -0
- package/dist/hooks/useScrollableListBox.js +2 -0
- package/dist/hooks/useSorting.js +2 -0
- package/dist/hooks/useStateAndRef.js +3 -1
- package/dist/hooks/useTableColumnConfig.js +2 -0
- package/dist/hooks/useTableNav.js +124 -20
- package/dist/hooks/useTranslationMemo.js +2 -0
- package/dist/index.js +1 -1
- package/dist/tw-ui-plugin.js +4 -2
- package/dist/utils/array.utils.js +3 -1
- package/dist/utils/compoundMapper.js +3 -1
- package/dist/utils/date-time.utils.js +3 -1
- package/dist/utils/date.utils.js +3 -1
- package/dist/utils/dom.utils.js +3 -1
- package/dist/utils/file.utils.d.ts +4 -0
- package/dist/utils/file.utils.js +10 -3
- package/dist/utils/isEqual.js +3 -1
- package/dist/utils/logger.js +3 -1
- package/dist/utils/object.utils.js +3 -1
- package/dist/utils/queries.utils.js +3 -1
- package/dist/utils/rest.utils.js +3 -1
- package/dist/utils/routing.utils.js +3 -1
- package/dist/utils/string.utils.js +3 -1
- package/dist/utils/zod.utils.js +3 -1
- package/package.json +2 -2
|
@@ -4,7 +4,8 @@ import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
|
4
4
|
import { UploadIcon } from "../../../../assets/icons/Upload.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
|
-
|
|
7
|
+
//#region src/components/inputs/File/shared/FileUploadContentEmpty.tsx
|
|
8
|
+
var FileUploadContentEmpty = ({ variant, as, isDisabled, title, browseText, uploadText, singleFile, hideButton = false, className }) => {
|
|
8
9
|
return /* @__PURE__ */ jsxs("div", {
|
|
9
10
|
className: clsx("flex w-full items-center gap-file-upload-content-gap-text-to-text", className, {
|
|
10
11
|
"flex-col": variant === "vertical",
|
|
@@ -51,4 +52,5 @@ const FileUploadContentEmpty = ({ variant, as, isDisabled, title, browseText, up
|
|
|
51
52
|
})]
|
|
52
53
|
});
|
|
53
54
|
};
|
|
55
|
+
//#endregion
|
|
54
56
|
export { FileUploadContentEmpty };
|
|
@@ -2,14 +2,15 @@ import { CloseIcon } from "../../../../assets/icons/Close.js";
|
|
|
2
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
3
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
|
+
import "../../../../config/i18n.js";
|
|
5
6
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
6
|
-
import { ns } from "../../../../config/i18n.js";
|
|
7
7
|
import { WarningFilledIcon } from "../../../../assets/icons/WarningFilled.js";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
10
|
import { FileTrigger } from "react-aria-components";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
|
-
|
|
12
|
+
//#region src/components/inputs/File/shared/FileUploadContentError.tsx
|
|
13
|
+
var FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove }) => {
|
|
13
14
|
const { t } = useTranslation("ui");
|
|
14
15
|
return /* @__PURE__ */ jsx("div", {
|
|
15
16
|
className: clsx("flex w-full flex-fill flex-col items-start"),
|
|
@@ -36,7 +37,7 @@ const FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fi
|
|
|
36
37
|
size: "label-1",
|
|
37
38
|
as: "span",
|
|
38
39
|
className: clsx("self-stretch truncate text-text-default-1", { "text-center": variant === "vertical" }),
|
|
39
|
-
children: state.file.
|
|
40
|
+
children: state.file?.name ?? state.displayName ?? ""
|
|
40
41
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
41
42
|
variant: "default",
|
|
42
43
|
size: singleFile ? "label-2" : "label-3",
|
|
@@ -106,4 +107,5 @@ const FileUploadContentError = ({ variant, as, isDisabled, state, browseText, fi
|
|
|
106
107
|
})
|
|
107
108
|
});
|
|
108
109
|
};
|
|
110
|
+
//#endregion
|
|
109
111
|
export { FileUploadContentError };
|
|
@@ -2,15 +2,16 @@ import { CloseIcon } from "../../../../assets/icons/Close.js";
|
|
|
2
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
3
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
|
+
import "../../../../config/i18n.js";
|
|
5
6
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
6
|
-
import { ns } from "../../../../config/i18n.js";
|
|
7
7
|
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
8
8
|
import { CheckCircleIcon } from "../../../../assets/icons/CheckCircle.js";
|
|
9
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { clsx } from "clsx";
|
|
11
11
|
import { FileTrigger } from "react-aria-components";
|
|
12
12
|
import { useTranslation } from "react-i18next";
|
|
13
|
-
|
|
13
|
+
//#region src/components/inputs/File/shared/FileUploadContentFilled.tsx
|
|
14
|
+
var FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon = false, singleFile, onRemove }) => {
|
|
14
15
|
const { t } = useTranslation("ui");
|
|
15
16
|
return /* @__PURE__ */ jsx("div", {
|
|
16
17
|
className: clsx("flex w-full flex-fill flex-col items-start"),
|
|
@@ -37,13 +38,13 @@ const FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, f
|
|
|
37
38
|
size: "label-1",
|
|
38
39
|
as: "span",
|
|
39
40
|
className: "self-stretch truncate text-center text-text-default-1",
|
|
40
|
-
children: state.file.
|
|
41
|
+
children: state.file?.name ?? state.displayName ?? ""
|
|
41
42
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
42
43
|
variant: "default",
|
|
43
44
|
size: singleFile ? "label-2" : "label-3",
|
|
44
45
|
as: "span",
|
|
45
46
|
className: "text-text-default-2",
|
|
46
|
-
children: FileUtils.
|
|
47
|
+
children: FileUtils.getFileDisplaySize(state)
|
|
47
48
|
})]
|
|
48
49
|
})]
|
|
49
50
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -109,4 +110,5 @@ const FileUploadContentFilled = ({ variant, as, isDisabled, state, browseText, f
|
|
|
109
110
|
})
|
|
110
111
|
});
|
|
111
112
|
};
|
|
113
|
+
//#endregion
|
|
112
114
|
export { FileUploadContentFilled };
|
|
@@ -2,14 +2,15 @@ import { CloseIcon } from "../../../../assets/icons/Close.js";
|
|
|
2
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
3
|
import { Button } from "../../../buttons/Button/Button.js";
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
|
-
import
|
|
5
|
+
import "../../../../config/i18n.js";
|
|
6
6
|
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
7
7
|
import { FileIcon } from "../../../../assets/icons/File.js";
|
|
8
8
|
import { ProgressBar } from "./ProgressBar.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { clsx } from "clsx";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
|
-
|
|
12
|
+
//#region src/components/inputs/File/shared/FileUploadContentLoading.tsx
|
|
13
|
+
var FileUploadContentLoading = ({ index, variant, as, state, isDisabled, singleFile, onCancel }) => {
|
|
13
14
|
const { t } = useTranslation("ui");
|
|
14
15
|
return /* @__PURE__ */ jsxs("div", {
|
|
15
16
|
className: clsx("flex w-full flex-col items-center", {
|
|
@@ -38,13 +39,13 @@ const FileUploadContentLoading = ({ index, variant, as, state, isDisabled, singl
|
|
|
38
39
|
size: "label-1",
|
|
39
40
|
as: "span",
|
|
40
41
|
className: "self-stretch truncate text-center text-text-default-1",
|
|
41
|
-
children: state.file.
|
|
42
|
+
children: state.file?.name ?? state.displayName ?? ""
|
|
42
43
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
43
44
|
variant: "default",
|
|
44
45
|
size: singleFile ? "label-2" : "label-3",
|
|
45
46
|
as: "span",
|
|
46
47
|
className: "text-text-default-2",
|
|
47
|
-
children: FileUtils.
|
|
48
|
+
children: FileUtils.getFileDisplaySize(state)
|
|
48
49
|
})]
|
|
49
50
|
})]
|
|
50
51
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -73,4 +74,5 @@ const FileUploadContentLoading = ({ index, variant, as, state, isDisabled, singl
|
|
|
73
74
|
})]
|
|
74
75
|
});
|
|
75
76
|
};
|
|
77
|
+
//#endregion
|
|
76
78
|
export { FileUploadContentLoading };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UIStyle } from "../../../../config/uiStyle.context.js";
|
|
2
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
3
|
import { Button as Button$1 } from "../../../buttons/Button/Button.js";
|
|
4
|
+
import "../../../../config/i18n.js";
|
|
4
5
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
5
|
-
import { ns } from "../../../../config/i18n.js";
|
|
6
6
|
import { inputSize } from "../../shared/input.cva.js";
|
|
7
7
|
import { UploadIcon } from "../../../../assets/icons/Upload.js";
|
|
8
8
|
import { inputUploadButton, inputUploadDropZone } from "./inputUploadButton.cva.js";
|
|
@@ -10,7 +10,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
import { clsx } from "clsx";
|
|
11
11
|
import { DropZone, FileTrigger } from "react-aria-components";
|
|
12
12
|
import { useTranslation } from "react-i18next";
|
|
13
|
-
|
|
13
|
+
//#region src/components/inputs/File/shared/InputUploadContent.tsx
|
|
14
|
+
var InputUploadContent = (props) => {
|
|
14
15
|
const { variant, isDisabled, error, placeholder, buttonText, ...rest } = props;
|
|
15
16
|
const { t } = useTranslation("ui");
|
|
16
17
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
@@ -49,4 +50,5 @@ const InputUploadContent = (props) => {
|
|
|
49
50
|
})
|
|
50
51
|
});
|
|
51
52
|
};
|
|
53
|
+
//#endregion
|
|
52
54
|
export { InputUploadContent };
|
|
@@ -5,7 +5,8 @@ import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconBu
|
|
|
5
5
|
import { inputSize } from "../../shared/input.cva.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
|
-
|
|
8
|
+
//#region src/components/inputs/File/shared/InputUploadFilled.tsx
|
|
9
|
+
var InputUploadFilled = ({ files, onRemove, isDisabled }) => {
|
|
9
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
10
11
|
className: clsx("flex items-center rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle", UIStyle.useCva("input.sizeCva", inputSize)({ size: "default" })),
|
|
11
12
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
@@ -23,4 +24,5 @@ const InputUploadFilled = ({ files, onRemove, isDisabled }) => {
|
|
|
23
24
|
})]
|
|
24
25
|
});
|
|
25
26
|
};
|
|
27
|
+
//#endregion
|
|
26
28
|
export { InputUploadFilled };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import clsx$1 from "clsx";
|
|
4
|
-
|
|
4
|
+
//#region src/components/inputs/File/shared/ProgressBar.tsx
|
|
5
|
+
var ProgressBar = ({ progress = 0, valueLabel = "trailing" }) => {
|
|
5
6
|
return /* @__PURE__ */ jsxs("div", {
|
|
6
7
|
className: clsx$1("flex w-full items-center justify-center gap-file-upload-content-gap-progress-actions", valueLabel === "leading" && "flex-row-reverse"),
|
|
7
8
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -22,4 +23,5 @@ const ProgressBar = ({ progress = 0, valueLabel = "trailing" }) => {
|
|
|
22
23
|
})]
|
|
23
24
|
});
|
|
24
25
|
};
|
|
26
|
+
//#endregion
|
|
25
27
|
export { ProgressBar };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
|
|
3
|
+
//#region src/components/inputs/File/shared/fileUpload.cva.ts
|
|
4
|
+
var fileUploadDropZoneBase = cva(["relative w-full rounded-file-upload-container-rounding-default"], {
|
|
4
5
|
variants: {
|
|
5
6
|
variant: {
|
|
6
7
|
vertical: ["flex-col justify-center"],
|
|
@@ -35,7 +36,7 @@ const fileUploadDropZoneBase = cva(["relative w-full rounded-file-upload-contain
|
|
|
35
36
|
},
|
|
36
37
|
defaultVariants: { variant: "vertical" }
|
|
37
38
|
});
|
|
38
|
-
|
|
39
|
+
var fileUploadDropZone = (props) => {
|
|
39
40
|
const { className, ...rest } = props;
|
|
40
41
|
return clsx(fileUploadDropZoneBase(rest), className);
|
|
41
42
|
};
|
|
@@ -46,4 +47,5 @@ cva(["flex gap-3"], {
|
|
|
46
47
|
} },
|
|
47
48
|
defaultVariants: { variant: "vertical" }
|
|
48
49
|
});
|
|
50
|
+
//#endregion
|
|
49
51
|
export { fileUploadDropZone };
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
|
|
3
|
+
//#region src/components/inputs/File/shared/inputUploadButton.cva.ts
|
|
4
|
+
var inputUploadButtonBase = cva(["flex w-full items-center justify-between gap-input-gap-input-to-button-gap"], {
|
|
4
5
|
variants: { variant: {
|
|
5
6
|
default: [],
|
|
6
7
|
nested: []
|
|
7
8
|
} },
|
|
8
9
|
defaultVariants: { variant: "default" }
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
+
var inputUploadButton = (props) => {
|
|
11
12
|
const { className, ...rest } = props;
|
|
12
13
|
return clsx(inputUploadButtonBase(rest), className);
|
|
13
14
|
};
|
|
14
|
-
|
|
15
|
+
var inputUploadDropZone = cva([
|
|
16
|
+
"relative",
|
|
15
17
|
"min-w-0 flex-1",
|
|
16
18
|
"flex items-center",
|
|
17
19
|
"group-invalid/input-upload:border group-invalid/input-upload:border-input-outlined-outline-error",
|
|
@@ -24,4 +26,5 @@ const inputUploadDropZone = cva([
|
|
|
24
26
|
} },
|
|
25
27
|
defaultVariants: { variant: "default" }
|
|
26
28
|
});
|
|
29
|
+
//#endregion
|
|
27
30
|
export { inputUploadButton, inputUploadDropZone };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { FormFieldError } from "./FormFieldError.js";
|
|
2
2
|
import { FormFieldHeader } from "./FormFieldHeader.js";
|
|
3
|
+
import { FormFieldHelper } from "./FormFieldHelper.js";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
+
//#region src/components/inputs/FormField/FormField.tsx
|
|
6
|
+
var FormField = ({ ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, tabIndex, onMouseEnter, onFocusCapture }) => {
|
|
5
7
|
const headerProps = {
|
|
6
8
|
label,
|
|
7
9
|
tooltipText,
|
|
@@ -13,6 +15,12 @@ const FormField = ({ ref, as, label, tooltipText, helperText, isRequired, rightC
|
|
|
13
15
|
className: headerClassName,
|
|
14
16
|
labelProps
|
|
15
17
|
};
|
|
18
|
+
const helperProps = {
|
|
19
|
+
helperText,
|
|
20
|
+
isDisabled,
|
|
21
|
+
isHidden: !["filter", "floating"].includes(as ?? ""),
|
|
22
|
+
hasError: !!error
|
|
23
|
+
};
|
|
16
24
|
const errorProps = {
|
|
17
25
|
error,
|
|
18
26
|
isDisabled,
|
|
@@ -28,8 +36,10 @@ const FormField = ({ ref, as, label, tooltipText, helperText, isRequired, rightC
|
|
|
28
36
|
children: [
|
|
29
37
|
!["filter", "floating"].includes(as ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps }),
|
|
30
38
|
children,
|
|
39
|
+
/* @__PURE__ */ jsx(FormFieldHelper, { ...helperProps }),
|
|
31
40
|
/* @__PURE__ */ jsx(FormFieldError, { ...errorProps })
|
|
32
41
|
]
|
|
33
42
|
});
|
|
34
43
|
};
|
|
44
|
+
//#endregion
|
|
35
45
|
export { FormField };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
|
-
import {
|
|
2
|
+
import { formFieldError } from "./formFieldError.cva.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
|
-
|
|
5
|
+
//#region src/components/inputs/FormField/FormFieldError.tsx
|
|
6
|
+
var FormFieldError = ({ error, isDisabled, isHidden, className }) => {
|
|
6
7
|
return /* @__PURE__ */ jsx("p", {
|
|
7
|
-
className: clsx(UIStyle.useCva("
|
|
8
|
+
className: clsx(UIStyle.useCva("formField.errorLabelCva", formFieldError)({ visible: !!error && !isDisabled && !isHidden }), className),
|
|
8
9
|
children: error
|
|
9
10
|
});
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { FormFieldError };
|
|
@@ -5,7 +5,8 @@ import { FormFieldLabel } from "./FormFieldLabel.js";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { Focusable } from "react-aria-components";
|
|
8
|
-
|
|
8
|
+
//#region src/components/inputs/FormField/FormFieldHeader.tsx
|
|
9
|
+
var FormFieldHeader = ({ label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, isDisabled, className, labelProps }) => {
|
|
9
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
10
11
|
className: clsx(isHeaderHidden ? "sr-only" : "mb-1", className),
|
|
11
12
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -33,4 +34,5 @@ const FormFieldHeader = ({ label, tooltipText, helperText, isRequired, rightCont
|
|
|
33
34
|
})]
|
|
34
35
|
});
|
|
35
36
|
};
|
|
37
|
+
//#endregion
|
|
36
38
|
export { FormFieldHeader };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
2
|
-
import
|
|
2
|
+
import "../../../config/i18n.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Button } from "react-aria-components";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
|
-
|
|
6
|
+
//#region src/components/inputs/FormField/FormFieldHeaderClose.tsx
|
|
7
|
+
var FormFieldHeaderClose = ({ onClose }) => {
|
|
7
8
|
const { t } = useTranslation("ui");
|
|
8
9
|
return /* @__PURE__ */ jsx(Button, {
|
|
9
10
|
onPress: onClose,
|
|
@@ -12,4 +13,5 @@ const FormFieldHeaderClose = ({ onClose }) => {
|
|
|
12
13
|
children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-6 text-interactive-text-secondary-idle" })
|
|
13
14
|
});
|
|
14
15
|
};
|
|
16
|
+
//#endregion
|
|
15
17
|
export { FormFieldHeaderClose };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface FormFieldHelperProps {
|
|
2
|
+
helperText?: string;
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
isHidden?: boolean;
|
|
5
|
+
hasError?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const FormFieldHelper: ({ helperText, isDisabled, isHidden, hasError, className }: FormFieldHelperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
|
+
import { formFieldHelper } from "./formFieldHelper.cva.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
//#region src/components/inputs/FormField/FormFieldHelper.tsx
|
|
6
|
+
var FormFieldHelper = ({ helperText, isDisabled, isHidden, hasError, className }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx("p", {
|
|
8
|
+
className: clsx(UIStyle.useCva("formField.helperLabelCva", formFieldHelper)({ visible: !!helperText && !isDisabled && !isHidden && !hasError }), className),
|
|
9
|
+
slot: "description",
|
|
10
|
+
children: helperText
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { FormFieldHelper };
|
|
@@ -4,7 +4,8 @@ import { labelBase, labelTypography } from "../shared/label.cva.js";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { Label } from "react-aria-components";
|
|
7
|
-
|
|
7
|
+
//#region src/components/inputs/FormField/FormFieldLabel.tsx
|
|
8
|
+
var FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, className }) => {
|
|
8
9
|
const typographyCva = UIStyle.useCva("typography.cva", typography);
|
|
9
10
|
const labelTypographyMap = UIStyle.useMapper("label.typography", labelTypography);
|
|
10
11
|
const labelBaseCva = UIStyle.useCva("label.cva", labelBase);
|
|
@@ -13,6 +14,7 @@ const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, cl
|
|
|
13
14
|
ref,
|
|
14
15
|
className: clsx(typographyCva({
|
|
15
16
|
size: "label-2",
|
|
17
|
+
sizeMobile: "label-2",
|
|
16
18
|
variant: "prominent-1",
|
|
17
19
|
...labelTypographyMap({ as })
|
|
18
20
|
}), labelBaseCva({ as }), className, labelProps?.className),
|
|
@@ -22,4 +24,5 @@ const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, cl
|
|
|
22
24
|
})]
|
|
23
25
|
});
|
|
24
26
|
};
|
|
27
|
+
//#endregion
|
|
25
28
|
export { FormFieldLabel };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const formFieldError: (props?: ({
|
|
3
|
+
visible?: boolean | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export interface FormFieldErrorVariantProps extends VariantProps<typeof formFieldError> {
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
//#region src/components/inputs/FormField/formFieldError.cva.ts
|
|
3
|
+
var formFieldError = cva("text-label-3 text-text-error-1", {
|
|
4
|
+
variants: { visible: {
|
|
5
|
+
true: "mt-1-5",
|
|
6
|
+
false: "sr-only"
|
|
7
|
+
} },
|
|
8
|
+
defaultVariants: { visible: false }
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { formFieldError };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const formFieldHelper: (props?: ({
|
|
3
|
+
visible?: boolean | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export interface FormFieldHelperVariantProps extends VariantProps<typeof formFieldHelper> {
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
//#region src/components/inputs/FormField/formFieldHelper.cva.ts
|
|
3
|
+
var formFieldHelper = cva("text-label-3 text-text-default-2", {
|
|
4
|
+
variants: { visible: {
|
|
5
|
+
true: "mt-1-5",
|
|
6
|
+
false: "sr-only"
|
|
7
|
+
} },
|
|
8
|
+
defaultVariants: { visible: false }
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { formFieldHelper };
|
|
@@ -12,6 +12,7 @@ import { useFocusVisible, useNumberField } from "react-aria";
|
|
|
12
12
|
import { mergeRefs } from "@react-aria/utils";
|
|
13
13
|
import { Controller } from "react-hook-form";
|
|
14
14
|
import { useNumberFieldState } from "react-stately";
|
|
15
|
+
//#region src/components/inputs/Input/NumberInput/NumberInput.tsx
|
|
15
16
|
var NumberInputBase = (props) => {
|
|
16
17
|
const ui = UIConfig.useConfig();
|
|
17
18
|
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
@@ -112,7 +113,7 @@ var NumberInputBase = (props) => {
|
|
|
112
113
|
})
|
|
113
114
|
});
|
|
114
115
|
};
|
|
115
|
-
|
|
116
|
+
var NumberInput = (props) => {
|
|
116
117
|
if ("formControl" in props && props.formControl) {
|
|
117
118
|
const { formControl, ref, ...innerProps } = props;
|
|
118
119
|
return /* @__PURE__ */ jsx(Controller, {
|
|
@@ -132,4 +133,5 @@ const NumberInput = (props) => {
|
|
|
132
133
|
}
|
|
133
134
|
return /* @__PURE__ */ jsx(NumberInputBase, { ...props }, props.value === null || props.value === void 0 ? "empty" : "filled");
|
|
134
135
|
};
|
|
136
|
+
//#endregion
|
|
135
137
|
export { NumberInput };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { VisibilityIcon } from "../../../../assets/icons/Visibility.js";
|
|
2
2
|
import { VisibilityOffIcon } from "../../../../assets/icons/VisibilityOff.js";
|
|
3
|
-
import
|
|
3
|
+
import "../../../../config/i18n.js";
|
|
4
4
|
import { TextInput } from "../TextInput/TextInput.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
8
|
-
|
|
8
|
+
//#region src/components/inputs/Input/PasswordInput/PasswordInput.tsx
|
|
9
|
+
var PasswordInput = (props) => {
|
|
9
10
|
const { t } = useTranslation("ui");
|
|
10
11
|
const [isRevealed, setIsRevealed] = useState(false);
|
|
11
12
|
return /* @__PURE__ */ jsx(TextInput, {
|
|
@@ -18,4 +19,5 @@ const PasswordInput = (props) => {
|
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
21
|
};
|
|
22
|
+
//#endregion
|
|
21
23
|
export { PasswordInput };
|
|
@@ -12,6 +12,7 @@ import { TextArea } from "react-aria-components";
|
|
|
12
12
|
import { useTextField } from "react-aria";
|
|
13
13
|
import { mergeRefs } from "@react-aria/utils";
|
|
14
14
|
import { Controller } from "react-hook-form";
|
|
15
|
+
//#region src/components/inputs/Input/TextArea/TextArea.tsx
|
|
15
16
|
var TextAreaBase = (props) => {
|
|
16
17
|
const ui = UIConfig.useConfig();
|
|
17
18
|
const inputCva = useInputCva();
|
|
@@ -105,7 +106,7 @@ var TextAreaBase = (props) => {
|
|
|
105
106
|
})
|
|
106
107
|
});
|
|
107
108
|
};
|
|
108
|
-
|
|
109
|
+
var TextArea$1 = (props) => {
|
|
109
110
|
if ("formControl" in props && props.formControl) {
|
|
110
111
|
const { formControl, ref, ...innerProps } = props;
|
|
111
112
|
return /* @__PURE__ */ jsx(Controller, {
|
|
@@ -125,4 +126,5 @@ const TextArea$1 = (props) => {
|
|
|
125
126
|
}
|
|
126
127
|
return /* @__PURE__ */ jsx(TextAreaBase, { ...props });
|
|
127
128
|
};
|
|
129
|
+
//#endregion
|
|
128
130
|
export { TextArea$1 as TextArea };
|
|
@@ -11,6 +11,7 @@ import { Input } from "react-aria-components";
|
|
|
11
11
|
import { useFocusVisible, useTextField } from "react-aria";
|
|
12
12
|
import { mergeRefs } from "@react-aria/utils";
|
|
13
13
|
import { Controller } from "react-hook-form";
|
|
14
|
+
//#region src/components/inputs/Input/TextInput/TextInput.tsx
|
|
14
15
|
var TextInputBase = (props) => {
|
|
15
16
|
const ui = UIConfig.useConfig();
|
|
16
17
|
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
@@ -105,7 +106,7 @@ var TextInputBase = (props) => {
|
|
|
105
106
|
})
|
|
106
107
|
});
|
|
107
108
|
};
|
|
108
|
-
|
|
109
|
+
var TextInput = (props) => {
|
|
109
110
|
if ("formControl" in props && props.formControl) {
|
|
110
111
|
const { formControl, ref, ...innerProps } = props;
|
|
111
112
|
return /* @__PURE__ */ jsx(Controller, {
|
|
@@ -125,4 +126,5 @@ const TextInput = (props) => {
|
|
|
125
126
|
}
|
|
126
127
|
return /* @__PURE__ */ jsx(TextInputBase, { ...props });
|
|
127
128
|
};
|
|
129
|
+
//#endregion
|
|
128
130
|
export { TextInput };
|
|
@@ -8,7 +8,8 @@ import { inputSize } from "../../shared/input.cva.js";
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
10
|
import { isValidElement } from "react";
|
|
11
|
-
|
|
11
|
+
//#region src/components/inputs/Input/shared/InputContent.tsx
|
|
12
|
+
var InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, value, onChange, onBlur, children, headerProps, as, size }) => {
|
|
12
13
|
const typographyCva = UIStyle.useCva("typography.cva", typography);
|
|
13
14
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
14
15
|
const isLeadingIconElement = LeadingIcon && isValidElement(LeadingIcon);
|
|
@@ -48,6 +49,7 @@ const InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, un
|
|
|
48
49
|
unit && /* @__PURE__ */ jsx("span", {
|
|
49
50
|
className: typographyCva({
|
|
50
51
|
size: "label-2",
|
|
52
|
+
sizeMobile: "label-2",
|
|
51
53
|
variant: "prominent-1",
|
|
52
54
|
className: "text-text-default-3"
|
|
53
55
|
}),
|
|
@@ -71,4 +73,5 @@ const InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, un
|
|
|
71
73
|
})]
|
|
72
74
|
});
|
|
73
75
|
};
|
|
76
|
+
//#endregion
|
|
74
77
|
export { InputContent };
|
|
@@ -5,6 +5,7 @@ import { getDefaultInputComponentType } from "../../../helpers/dynamicInputs.js"
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { useMemo } from "react";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
+
//#region src/components/inputs/Inputs/Form.tsx
|
|
8
9
|
var createFieldComponent = (field, schemaKeyType, form) => {
|
|
9
10
|
return function FieldComponent({ inputType, label, placeholder, ...inputProps }) {
|
|
10
11
|
return /* @__PURE__ */ jsx(InputItem, {
|
|
@@ -39,4 +40,5 @@ function Form({ form, schema, onSubmit, onError, className, children }) {
|
|
|
39
40
|
children: children(components)
|
|
40
41
|
});
|
|
41
42
|
}
|
|
43
|
+
//#endregion
|
|
42
44
|
export { Form };
|
|
@@ -14,6 +14,7 @@ import { Slider } from "../Slider/Slider.js";
|
|
|
14
14
|
import { Toggle } from "../Toggle/Toggle.js";
|
|
15
15
|
import { Segment } from "../../segment/Segment.js";
|
|
16
16
|
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
//#region src/components/inputs/Inputs/InputItem.tsx
|
|
17
18
|
var componentRegistry = {
|
|
18
19
|
toggle: Toggle,
|
|
19
20
|
checkbox: Checkbox,
|
|
@@ -51,4 +52,5 @@ function InputItem({ form, inputDef }) {
|
|
|
51
52
|
});
|
|
52
53
|
return inputWrapper ? inputWrapper(inputComponent, label) : inputComponent;
|
|
53
54
|
}
|
|
55
|
+
//#endregion
|
|
54
56
|
export { InputItem };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputItem } from "./InputItem.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/inputs/Inputs/Inputs.tsx
|
|
3
4
|
function Inputs({ form, inputDefs, children }) {
|
|
4
5
|
if (!children) return inputDefs.map((inputDef) => /* @__PURE__ */ jsx(InputItem, {
|
|
5
6
|
form,
|
|
@@ -12,4 +13,5 @@ function Inputs({ form, inputDefs, children }) {
|
|
|
12
13
|
});
|
|
13
14
|
return children(childrenParams);
|
|
14
15
|
}
|
|
16
|
+
//#endregion
|
|
15
17
|
export { Inputs };
|
|
@@ -4,10 +4,11 @@ import { CheckContent } from "../shared/CheckContent.js";
|
|
|
4
4
|
import { FormField } from "../FormField/FormField.js";
|
|
5
5
|
import { radio, radioIndicatorClass, radioTypography } from "./radio.cva.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import clsx
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
8
|
import { Radio, RadioGroup } from "react-aria-components";
|
|
9
9
|
import { mergeRefs } from "@react-aria/utils";
|
|
10
10
|
import { Controller } from "react-hook-form";
|
|
11
|
+
//#region src/components/inputs/RadioGroup/RadioGroup.tsx
|
|
11
12
|
var RadioGroupBase = (props) => {
|
|
12
13
|
const ui = UIConfig.useConfig();
|
|
13
14
|
const radioCva = UIStyle.useCva("radio.cva", radio);
|
|
@@ -36,10 +37,10 @@ var RadioGroupBase = (props) => {
|
|
|
36
37
|
children: /* @__PURE__ */ jsx(FormField, {
|
|
37
38
|
...formFieldProps,
|
|
38
39
|
children: /* @__PURE__ */ jsx("div", {
|
|
39
|
-
className: clsx
|
|
40
|
+
className: clsx("flex flex-col", inputClassName),
|
|
40
41
|
children: options.map((option) => /* @__PURE__ */ jsxs(Radio, {
|
|
41
42
|
value: option.value,
|
|
42
|
-
className: radioIndicatorClass,
|
|
43
|
+
className: clsx("relative", radioIndicatorClass),
|
|
43
44
|
children: [/* @__PURE__ */ jsx("div", { className: radioCva({
|
|
44
45
|
variant,
|
|
45
46
|
...rest
|
|
@@ -56,7 +57,7 @@ var RadioGroupBase = (props) => {
|
|
|
56
57
|
})
|
|
57
58
|
});
|
|
58
59
|
};
|
|
59
|
-
|
|
60
|
+
var RadioGroup$1 = (props) => {
|
|
60
61
|
if ("formControl" in props && props.formControl) {
|
|
61
62
|
const { formControl, ref, ...innerProps } = props;
|
|
62
63
|
return /* @__PURE__ */ jsx(Controller, {
|
|
@@ -77,4 +78,5 @@ const RadioGroup$1 = (props) => {
|
|
|
77
78
|
}
|
|
78
79
|
return /* @__PURE__ */ jsx(RadioGroupBase, { ...props });
|
|
79
80
|
};
|
|
81
|
+
//#endregion
|
|
80
82
|
export { RadioGroup$1 as RadioGroup };
|