@povio/ui 3.0.0-rc.3 → 3.1.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/README.md +39 -0
- package/dist/assets/icons/AlignCenter.js +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.d.ts +4 -0
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.d.ts +1 -1
- package/dist/components/Menu/MenuMobile.js +39 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -373
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +186 -492
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -14
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +47 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -7
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +121 -611
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +3 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +120 -338
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +103 -310
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +98 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -286
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -14
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +129 -356
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +45 -88
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +2 -2
- package/dist/components/inputs/File/shared/ProgressBar.js +20 -53
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +38 -0
- package/dist/components/inputs/File/shared/progressBar.cva.js +28 -0
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
- package/dist/components/inputs/Inputs/InputItem.js +14 -69
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -45
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -48
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -217
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -107
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -227
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +3 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -397
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +6 -11
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +36 -67
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.d.ts +1 -2
- package/dist/components/inputs/Slider/Slider.js +76 -265
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
- package/dist/components/inputs/Toggle/Toggle.js +37 -214
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +12 -88
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -28
- package/dist/components/inputs/shared/input.cva.js +4 -38
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +25 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +22 -64
- package/dist/components/overlays/Modal/modal.cva.js +1 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +5 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +28 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +17 -22
- package/dist/components/status/Toast/toast.cva.d.ts +14 -3
- package/dist/components/status/Toast/toast.cva.js +12 -10
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +30 -30
- package/dist/components/table/table.cva.d.ts +7 -0
- package/dist/components/table/table.cva.js +2 -1
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Pill/Pill.d.ts +15 -0
- package/dist/components/text/Pill/Pill.js +44 -0
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +10 -21
- package/dist/config/uiConfig.context.js +18 -69
- package/dist/config/uiOverrides.context.d.ts +10 -20
- package/dist/config/uiOverrides.context.js +14 -54
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useAutosave.d.ts +1 -2
- package/dist/hooks/useAutosave.js +4 -12
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.d.ts +1 -3
- package/dist/hooks/useFormAutosave.js +30 -122
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +7 -16
- package/dist/index.js +6 -13
- package/dist/tw-ui-plugin.js +0 -6
- package/dist/utils/date-time.utils.d.ts +10 -38
- package/dist/utils/date-time.utils.js +22 -136
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -40
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -8
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -37
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -178
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -14
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -43
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -8
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.d.ts +0 -20
- package/dist/hooks/useKeyInteractions.js +0 -54
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -72
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -7,163 +7,49 @@ import { inputSizeDefinition } from "../../shared/input.cva.js";
|
|
|
7
7
|
import { UploadIcon } from "../../../../assets/icons/Upload.js";
|
|
8
8
|
import { inputButtonSizeMapping } from "../inputUpload.types.js";
|
|
9
9
|
import { inputUploadButton, inputUploadDropZone } from "./inputUploadButton.cva.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { clsx } from "clsx";
|
|
13
12
|
import { DropZone, FileTrigger } from "react-aria-components";
|
|
14
13
|
import { useTranslation } from "react-i18next";
|
|
15
14
|
//#region src/components/inputs/File/shared/InputUploadContent.tsx
|
|
16
15
|
var InputUploadContent = (props) => {
|
|
17
|
-
const
|
|
18
|
-
let buttonText;
|
|
19
|
-
let error;
|
|
20
|
-
let isDisabled;
|
|
21
|
-
let placeholder;
|
|
22
|
-
let rest;
|
|
23
|
-
let size;
|
|
24
|
-
let variant;
|
|
25
|
-
if ($[0] !== props) {
|
|
26
|
-
({variant, isDisabled, error, placeholder, buttonText, size, ...rest} = props);
|
|
27
|
-
$[0] = props;
|
|
28
|
-
$[1] = buttonText;
|
|
29
|
-
$[2] = error;
|
|
30
|
-
$[3] = isDisabled;
|
|
31
|
-
$[4] = placeholder;
|
|
32
|
-
$[5] = rest;
|
|
33
|
-
$[6] = size;
|
|
34
|
-
$[7] = variant;
|
|
35
|
-
} else {
|
|
36
|
-
buttonText = $[1];
|
|
37
|
-
error = $[2];
|
|
38
|
-
isDisabled = $[3];
|
|
39
|
-
placeholder = $[4];
|
|
40
|
-
rest = $[5];
|
|
41
|
-
size = $[6];
|
|
42
|
-
variant = $[7];
|
|
43
|
-
}
|
|
16
|
+
const { variant, isDisabled, error, placeholder, buttonText, size, ...rest } = props;
|
|
44
17
|
const { t } = useTranslation("ui");
|
|
45
18
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
let t3;
|
|
50
|
-
if ($[8] !== variant) {
|
|
51
|
-
t3 = inputUploadButton({
|
|
52
|
-
variant,
|
|
53
|
-
className: "group/input-upload"
|
|
54
|
-
});
|
|
55
|
-
$[8] = variant;
|
|
56
|
-
$[9] = t3;
|
|
57
|
-
} else t3 = $[9];
|
|
58
|
-
let t4;
|
|
59
|
-
if ($[10] !== inputSizeCva || $[11] !== size || $[12] !== variant) {
|
|
60
|
-
t4 = clsx(inputUploadDropZone({ variant }), inputSizeCva({ size }));
|
|
61
|
-
$[10] = inputSizeCva;
|
|
62
|
-
$[11] = size;
|
|
63
|
-
$[12] = variant;
|
|
64
|
-
$[13] = t4;
|
|
65
|
-
} else t4 = $[13];
|
|
66
|
-
let t5;
|
|
67
|
-
if ($[14] !== placeholder || $[15] !== t) {
|
|
68
|
-
t5 = placeholder ?? t(_temp);
|
|
69
|
-
$[14] = placeholder;
|
|
70
|
-
$[15] = t;
|
|
71
|
-
$[16] = t5;
|
|
72
|
-
} else t5 = $[16];
|
|
73
|
-
let t6;
|
|
74
|
-
if ($[17] !== t5) {
|
|
75
|
-
t6 = /* @__PURE__ */ jsx(Typography, {
|
|
76
|
-
variant: "default",
|
|
77
|
-
size: "label-1",
|
|
78
|
-
as: "span",
|
|
79
|
-
className: "min-w-0 flex-fill select-none truncate text-text-default-3",
|
|
80
|
-
children: t5
|
|
81
|
-
});
|
|
82
|
-
$[17] = t5;
|
|
83
|
-
$[18] = t6;
|
|
84
|
-
} else t6 = $[18];
|
|
85
|
-
let t7;
|
|
86
|
-
if ($[19] !== buttonText || $[20] !== isDisabled || $[21] !== t || $[22] !== variant) {
|
|
87
|
-
t7 = variant === "nested" && /* @__PURE__ */ jsx(TextButton, {
|
|
88
|
-
isDisabled,
|
|
89
|
-
icon: UploadIcon,
|
|
90
|
-
children: buttonText ?? t(_temp2)
|
|
91
|
-
});
|
|
92
|
-
$[19] = buttonText;
|
|
93
|
-
$[20] = isDisabled;
|
|
94
|
-
$[21] = t;
|
|
95
|
-
$[22] = variant;
|
|
96
|
-
$[23] = t7;
|
|
97
|
-
} else t7 = $[23];
|
|
98
|
-
let t8;
|
|
99
|
-
if ($[24] !== isDisabled || $[25] !== rest || $[26] !== t4 || $[27] !== t6 || $[28] !== t7) {
|
|
100
|
-
t8 = /* @__PURE__ */ jsxs(DropZone, {
|
|
101
|
-
...rest,
|
|
102
|
-
isDisabled,
|
|
103
|
-
className: t4,
|
|
104
|
-
children: [t6, t7]
|
|
105
|
-
});
|
|
106
|
-
$[24] = isDisabled;
|
|
107
|
-
$[25] = rest;
|
|
108
|
-
$[26] = t4;
|
|
109
|
-
$[27] = t6;
|
|
110
|
-
$[28] = t7;
|
|
111
|
-
$[29] = t8;
|
|
112
|
-
} else t8 = $[29];
|
|
113
|
-
let t9;
|
|
114
|
-
if ($[30] !== buttonText || $[31] !== isDisabled || $[32] !== size || $[33] !== t || $[34] !== variant) {
|
|
115
|
-
t9 = variant !== "nested" && /* @__PURE__ */ jsx(Button$1, {
|
|
116
|
-
size: inputButtonSizeMapping[size ?? "default"],
|
|
117
|
-
width: "hug",
|
|
118
|
-
isDisabled,
|
|
119
|
-
className: "truncate",
|
|
120
|
-
children: buttonText ?? t(_temp3)
|
|
121
|
-
});
|
|
122
|
-
$[30] = buttonText;
|
|
123
|
-
$[31] = isDisabled;
|
|
124
|
-
$[32] = size;
|
|
125
|
-
$[33] = t;
|
|
126
|
-
$[34] = variant;
|
|
127
|
-
$[35] = t9;
|
|
128
|
-
} else t9 = $[35];
|
|
129
|
-
let t10;
|
|
130
|
-
if ($[36] !== t0 || $[37] !== t1 || $[38] !== t2 || $[39] !== t3 || $[40] !== t8 || $[41] !== t9) {
|
|
131
|
-
t10 = /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
return /* @__PURE__ */ jsx(FileTrigger, {
|
|
20
|
+
...rest,
|
|
21
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
132
22
|
"data-rac": "",
|
|
133
|
-
"data-disabled":
|
|
134
|
-
"data-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
23
|
+
"data-disabled": isDisabled || void 0,
|
|
24
|
+
"data-invalid": !!error || void 0,
|
|
25
|
+
className: inputUploadButton({
|
|
26
|
+
variant,
|
|
27
|
+
className: "group/input-upload"
|
|
28
|
+
}),
|
|
29
|
+
children: [/* @__PURE__ */ jsxs(DropZone, {
|
|
30
|
+
...rest,
|
|
31
|
+
isDisabled,
|
|
32
|
+
className: clsx(inputUploadDropZone({ variant }), inputSizeCva({ size })),
|
|
33
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
34
|
+
variant: "default",
|
|
35
|
+
size: "label-1",
|
|
36
|
+
as: "span",
|
|
37
|
+
className: "min-w-0 flex-fill select-none truncate text-text-default-3",
|
|
38
|
+
children: placeholder ?? t(($) => $.ui.fileUpload.emptyText)
|
|
39
|
+
}), variant === "nested" && /* @__PURE__ */ jsx(TextButton, {
|
|
40
|
+
isDisabled,
|
|
41
|
+
icon: UploadIcon,
|
|
42
|
+
children: buttonText ?? t(($) => $.ui.fileUpload.upload)
|
|
43
|
+
})]
|
|
44
|
+
}), variant !== "nested" && /* @__PURE__ */ jsx(Button$1, {
|
|
45
|
+
size: inputButtonSizeMapping[size ?? "default"],
|
|
46
|
+
width: "hug",
|
|
47
|
+
isDisabled,
|
|
48
|
+
className: "truncate",
|
|
49
|
+
children: buttonText ?? t(($) => $.ui.fileUpload.uploadFile)
|
|
50
|
+
})]
|
|
51
|
+
})
|
|
52
|
+
});
|
|
158
53
|
};
|
|
159
|
-
function _temp($) {
|
|
160
|
-
return $.ui.fileUpload.emptyText;
|
|
161
|
-
}
|
|
162
|
-
function _temp2($_0) {
|
|
163
|
-
return $_0.ui.fileUpload.upload;
|
|
164
|
-
}
|
|
165
|
-
function _temp3($_1) {
|
|
166
|
-
return $_1.ui.fileUpload.uploadFile;
|
|
167
|
-
}
|
|
168
54
|
//#endregion
|
|
169
55
|
export { InputUploadContent };
|
|
@@ -3,67 +3,26 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
|
3
3
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
5
|
import { inputSizeDefinition } from "../../shared/input.cva.js";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { clsx } from "clsx";
|
|
9
8
|
//#region src/components/inputs/File/shared/InputUploadFilled.tsx
|
|
10
|
-
var InputUploadFilled = (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
let t1;
|
|
15
|
-
if ($[0] !== inputSizeCva || $[1] !== size) {
|
|
16
|
-
t1 = clsx("flex items-center rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle", inputSizeCva({ size }));
|
|
17
|
-
$[0] = inputSizeCva;
|
|
18
|
-
$[1] = size;
|
|
19
|
-
$[2] = t1;
|
|
20
|
-
} else t1 = $[2];
|
|
21
|
-
let t2;
|
|
22
|
-
if ($[3] !== files) {
|
|
23
|
-
t2 = files.map(_temp).join(", ");
|
|
24
|
-
$[3] = files;
|
|
25
|
-
$[4] = t2;
|
|
26
|
-
} else t2 = $[4];
|
|
27
|
-
let t3;
|
|
28
|
-
if ($[5] !== t2) {
|
|
29
|
-
t3 = /* @__PURE__ */ jsx(Typography, {
|
|
9
|
+
var InputUploadFilled = ({ files, onRemove, isDisabled, size }) => {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
className: clsx("flex items-center rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle", UIOverrides.useCva("input.sizeCva", inputSizeDefinition)({ size })),
|
|
12
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
30
13
|
variant: "default",
|
|
31
14
|
size: "label-1",
|
|
32
15
|
as: "span",
|
|
33
16
|
className: "flex-fill select-none truncate text-ellipsis text-text-default-1 input-disabled:text-text-default-3",
|
|
34
|
-
children:
|
|
35
|
-
})
|
|
36
|
-
$[5] = t2;
|
|
37
|
-
$[6] = t3;
|
|
38
|
-
} else t3 = $[6];
|
|
39
|
-
let t4;
|
|
40
|
-
if ($[7] !== isDisabled || $[8] !== onRemove) {
|
|
41
|
-
t4 = /* @__PURE__ */ jsx(InlineIconButton, {
|
|
17
|
+
children: files.map((file) => file.name).join(", ")
|
|
18
|
+
}), /* @__PURE__ */ jsx(InlineIconButton, {
|
|
42
19
|
label: "Remove files",
|
|
43
20
|
color: "secondary",
|
|
44
21
|
icon: CloseIcon,
|
|
45
22
|
isDisabled,
|
|
46
23
|
onPress: onRemove
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
$[8] = onRemove;
|
|
50
|
-
$[9] = t4;
|
|
51
|
-
} else t4 = $[9];
|
|
52
|
-
let t5;
|
|
53
|
-
if ($[10] !== t1 || $[11] !== t3 || $[12] !== t4) {
|
|
54
|
-
t5 = /* @__PURE__ */ jsxs("div", {
|
|
55
|
-
className: t1,
|
|
56
|
-
children: [t3, t4]
|
|
57
|
-
});
|
|
58
|
-
$[10] = t1;
|
|
59
|
-
$[11] = t3;
|
|
60
|
-
$[12] = t4;
|
|
61
|
-
$[13] = t5;
|
|
62
|
-
} else t5 = $[13];
|
|
63
|
-
return t5;
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
64
26
|
};
|
|
65
|
-
function _temp(file) {
|
|
66
|
-
return file.name;
|
|
67
|
-
}
|
|
68
27
|
//#endregion
|
|
69
28
|
export { InputUploadFilled };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { ProgressBarVariantProps } from './progressBar.cva';
|
|
2
|
+
interface ProgressBarProps extends ProgressBarVariantProps {
|
|
2
3
|
progress?: number;
|
|
3
|
-
valueLabel?: "leading" | "trailing" | "none";
|
|
4
4
|
}
|
|
5
5
|
export declare const ProgressBar: ({ progress, valueLabel }: ProgressBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,66 +1,33 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
1
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
|
-
import {
|
|
3
|
+
import { progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition } from "./progressBar.cva.js";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import clsx$1 from "clsx";
|
|
5
5
|
//#region src/components/inputs/File/shared/ProgressBar.tsx
|
|
6
|
-
var ProgressBar = (
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
$[1] = t4;
|
|
17
|
-
} else t4 = $[1];
|
|
18
|
-
let t5;
|
|
19
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
20
|
-
t5 = /* @__PURE__ */ jsx("div", { className: "h-1 w-full shrink-0 rounded-xs bg-input-filled-idle" });
|
|
21
|
-
$[2] = t5;
|
|
22
|
-
} else t5 = $[2];
|
|
23
|
-
const t6 = `${progress}%`;
|
|
24
|
-
let t7;
|
|
25
|
-
if ($[3] !== t6) {
|
|
26
|
-
t7 = /* @__PURE__ */ jsx("div", {
|
|
27
|
-
className: "flex flex-fill flex-col items-start gap-2 py-progress-height-height",
|
|
6
|
+
var ProgressBar = ({ progress = 0, valueLabel = "trailing" }) => {
|
|
7
|
+
const progressBarCva = UIOverrides.useCva("progressBar.cva", progressBarDefinition);
|
|
8
|
+
const progressBarTrackWrapperCva = UIOverrides.useCva("progressBar.trackWrapperCva", progressBarTrackWrapperDefinition);
|
|
9
|
+
const progressBarTrackCva = UIOverrides.useCva("progressBar.trackCva", progressBarTrackDefinition);
|
|
10
|
+
const progressBarFillCva = UIOverrides.useCva("progressBar.fillCva", progressBarFillDefinition);
|
|
11
|
+
const progressBarValueCva = UIOverrides.useCva("progressBar.valueCva", progressBarValueDefinition);
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
className: progressBarCva({ valueLabel }),
|
|
14
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
15
|
+
className: progressBarTrackWrapperCva(),
|
|
28
16
|
children: /* @__PURE__ */ jsxs("div", {
|
|
29
|
-
className:
|
|
30
|
-
children: [
|
|
31
|
-
className:
|
|
32
|
-
style: { width:
|
|
17
|
+
className: progressBarTrackCva({ part: "container" }),
|
|
18
|
+
children: [/* @__PURE__ */ jsx("div", { className: progressBarTrackCva({ part: "background" }) }), /* @__PURE__ */ jsx("div", {
|
|
19
|
+
className: progressBarFillCva(),
|
|
20
|
+
style: { width: `${progress}%` }
|
|
33
21
|
})]
|
|
34
22
|
})
|
|
35
|
-
})
|
|
36
|
-
$[3] = t6;
|
|
37
|
-
$[4] = t7;
|
|
38
|
-
} else t7 = $[4];
|
|
39
|
-
let t8;
|
|
40
|
-
if ($[5] !== progress || $[6] !== valueLabel) {
|
|
41
|
-
t8 = valueLabel !== "none" && /* @__PURE__ */ jsxs(Typography, {
|
|
23
|
+
}), valueLabel !== "none" && /* @__PURE__ */ jsxs(Typography, {
|
|
42
24
|
variant: "default",
|
|
43
25
|
size: "label-2",
|
|
44
26
|
as: "span",
|
|
45
|
-
className:
|
|
27
|
+
className: progressBarValueCva(),
|
|
46
28
|
children: [progress, "%"]
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
$[6] = valueLabel;
|
|
50
|
-
$[7] = t8;
|
|
51
|
-
} else t8 = $[7];
|
|
52
|
-
let t9;
|
|
53
|
-
if ($[8] !== t4 || $[9] !== t7 || $[10] !== t8) {
|
|
54
|
-
t9 = /* @__PURE__ */ jsxs("div", {
|
|
55
|
-
className: t4,
|
|
56
|
-
children: [t7, t8]
|
|
57
|
-
});
|
|
58
|
-
$[8] = t4;
|
|
59
|
-
$[9] = t7;
|
|
60
|
-
$[10] = t8;
|
|
61
|
-
$[11] = t9;
|
|
62
|
-
} else t9 = $[11];
|
|
63
|
-
return t9;
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
64
31
|
};
|
|
65
32
|
//#endregion
|
|
66
33
|
export { ProgressBar };
|
|
@@ -8,7 +8,7 @@ export declare const fileUploadDropZoneDefinition: {
|
|
|
8
8
|
readonly horizontal: ["flex-row justify-between"];
|
|
9
9
|
};
|
|
10
10
|
readonly isContainer: {
|
|
11
|
-
readonly true: ["data-[drop-target]:before:content-['']", "data-[drop-target]:before:absolute", "data-[drop-target]:before:z-
|
|
11
|
+
readonly true: ["data-[drop-target]:before:content-['']", "data-[drop-target]:before:absolute", "data-[drop-target]:before:z-drop-target", "data-[drop-target]:before:width-full", "data-[drop-target]:before:height-full", "data-[drop-target]:before:top-0", "data-[drop-target]:before:left-0", "data-[drop-target]:border data-[drop-target]:border-dashed", "data-[drop-target]:border-elevation-outline-default-2", "data-[drop-target]:before:pointer-events-none data-[drop-target]:before:inset-0", "data-[drop-target]:before:bg-elevation-fill-default-2"];
|
|
12
12
|
readonly false: ["flex items-center", "py-file-upload-container-height-top-bottom", "px-file-upload-container-side-default", "gap-gap-file-upload-content-gap-icon-to-content", "border border-input-outlined-outline-idle border-dashed bg-input-outlined-idle", "hover:border-elevation-outline-default-2 hover:bg-elevation-fill-default-2", "invalid:border invalid:border-input-outlined-outline-error", "data-[drop-target]:border-elevation-outline-default-2 data-[drop-target]:bg-elevation-fill-default-2", "data-[has-files]:border-solid"];
|
|
13
13
|
};
|
|
14
14
|
}>;
|
|
@@ -14,7 +14,7 @@ var fileUploadDropZoneDefinition = UIOverrides.defineConfig({
|
|
|
14
14
|
true: [
|
|
15
15
|
"data-[drop-target]:before:content-['']",
|
|
16
16
|
"data-[drop-target]:before:absolute",
|
|
17
|
-
"data-[drop-target]:before:z-
|
|
17
|
+
"data-[drop-target]:before:z-drop-target",
|
|
18
18
|
"data-[drop-target]:before:width-full",
|
|
19
19
|
"data-[drop-target]:before:height-full",
|
|
20
20
|
"data-[drop-target]:before:top-0",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { UIOverrides } from '../../../../config/uiOverrides.context';
|
|
2
|
+
export declare const progressBarDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly valueLabel: {
|
|
6
|
+
readonly leading: ["flex-row-reverse"];
|
|
7
|
+
readonly trailing: [];
|
|
8
|
+
readonly none: [];
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export type ProgressBarConfig = NonNullable<typeof progressBarDefinition.config>;
|
|
13
|
+
export interface ProgressBarVariantProps extends UIOverrides.VariantProps<ProgressBarConfig> {
|
|
14
|
+
}
|
|
15
|
+
export declare const progressBarTrackWrapperDefinition: {
|
|
16
|
+
base: string[];
|
|
17
|
+
config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
18
|
+
};
|
|
19
|
+
export declare const progressBarTrackDefinition: {
|
|
20
|
+
base: string[];
|
|
21
|
+
config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
22
|
+
readonly part: {
|
|
23
|
+
readonly container: ["relative h-1 w-full"];
|
|
24
|
+
readonly background: ["h-1 w-full shrink-0 rounded-xs bg-input-filled-idle"];
|
|
25
|
+
};
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
28
|
+
export type ProgressBarTrackConfig = NonNullable<typeof progressBarTrackDefinition.config>;
|
|
29
|
+
export interface ProgressBarTrackVariantProps extends UIOverrides.VariantProps<ProgressBarTrackConfig> {
|
|
30
|
+
}
|
|
31
|
+
export declare const progressBarFillDefinition: {
|
|
32
|
+
base: string[];
|
|
33
|
+
config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
34
|
+
};
|
|
35
|
+
export declare const progressBarValueDefinition: {
|
|
36
|
+
base: string[];
|
|
37
|
+
config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
38
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
|
+
//#region src/components/inputs/File/shared/progressBar.cva.ts
|
|
3
|
+
var progressBarDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: ["flex w-full items-center justify-center gap-file-upload-content-gap-progress-actions"],
|
|
5
|
+
config: {
|
|
6
|
+
variants: { valueLabel: {
|
|
7
|
+
leading: ["flex-row-reverse"],
|
|
8
|
+
trailing: [],
|
|
9
|
+
none: []
|
|
10
|
+
} },
|
|
11
|
+
defaultVariants: { valueLabel: "trailing" }
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
var progressBarTrackWrapperDefinition = UIOverrides.defineConfig({ base: ["flex flex-fill flex-col items-start gap-2 py-progress-height-height"] });
|
|
15
|
+
var progressBarTrackDefinition = UIOverrides.defineConfig({
|
|
16
|
+
base: [],
|
|
17
|
+
config: {
|
|
18
|
+
variants: { part: {
|
|
19
|
+
container: ["relative h-1 w-full"],
|
|
20
|
+
background: ["h-1 w-full shrink-0 rounded-xs bg-input-filled-idle"]
|
|
21
|
+
} },
|
|
22
|
+
defaultVariants: { part: "container" }
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
var progressBarFillDefinition = UIOverrides.defineConfig({ base: ["absolute top-0 left-0 h-1 shrink-0 rounded-xs bg-interactive-contained-primary-idle transition-all duration-300"] });
|
|
26
|
+
var progressBarValueDefinition = UIOverrides.defineConfig({ base: ["text-center text-text-default-3"] });
|
|
27
|
+
//#endregion
|
|
28
|
+
export { progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren, Ref } from 'react';
|
|
2
2
|
import { FormFieldErrorProps } from './FormFieldError';
|
|
3
3
|
import { FormFieldHeaderProps } from './FormFieldHeader';
|
|
4
4
|
import { TextInputProps } from '../Input/TextInput/TextInput';
|
|
@@ -13,8 +13,8 @@ interface FormFieldComponentProps extends PropsWithChildren<FormFieldProps> {
|
|
|
13
13
|
labelProps?: FormFieldHeaderProps["labelProps"];
|
|
14
14
|
as?: TextInputProps["as"];
|
|
15
15
|
tabIndex?: number;
|
|
16
|
-
onMouseEnter?:
|
|
17
|
-
onFocusCapture?:
|
|
16
|
+
onMouseEnter?: () => void;
|
|
17
|
+
onFocusCapture?: () => void;
|
|
18
18
|
}
|
|
19
19
|
export declare const FormField: ({ ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, tabIndex, onMouseEnter, onFocusCapture, }: FormFieldComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,127 +1,45 @@
|
|
|
1
1
|
import { FormFieldError } from "./FormFieldError.js";
|
|
2
2
|
import { FormFieldHeader } from "./FormFieldHeader.js";
|
|
3
3
|
import { FormFieldHelper } from "./FormFieldHelper.js";
|
|
4
|
-
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
//#region src/components/inputs/FormField/FormField.tsx
|
|
7
|
-
var FormField = (
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if ($[11] !== helperText || $[12] !== isDisabled || $[13] !== t4 || $[14] !== t5) {
|
|
45
|
-
t6 = {
|
|
46
|
-
helperText,
|
|
47
|
-
isDisabled,
|
|
48
|
-
isHidden: t4,
|
|
49
|
-
hasError: t5
|
|
50
|
-
};
|
|
51
|
-
$[11] = helperText;
|
|
52
|
-
$[12] = isDisabled;
|
|
53
|
-
$[13] = t4;
|
|
54
|
-
$[14] = t5;
|
|
55
|
-
$[15] = t6;
|
|
56
|
-
} else t6 = $[15];
|
|
57
|
-
const helperProps = t6;
|
|
58
|
-
let t7;
|
|
59
|
-
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
60
|
-
t7 = ["filter", "inline"];
|
|
61
|
-
$[16] = t7;
|
|
62
|
-
} else t7 = $[16];
|
|
63
|
-
const t8 = t7.includes(as ?? "");
|
|
64
|
-
let t9;
|
|
65
|
-
if ($[17] !== error || $[18] !== errorClassName || $[19] !== isDisabled || $[20] !== t8) {
|
|
66
|
-
t9 = {
|
|
67
|
-
error,
|
|
68
|
-
isDisabled,
|
|
69
|
-
isHidden: t8,
|
|
70
|
-
className: errorClassName
|
|
71
|
-
};
|
|
72
|
-
$[17] = error;
|
|
73
|
-
$[18] = errorClassName;
|
|
74
|
-
$[19] = isDisabled;
|
|
75
|
-
$[20] = t8;
|
|
76
|
-
$[21] = t9;
|
|
77
|
-
} else t9 = $[21];
|
|
78
|
-
const errorProps = t9;
|
|
79
|
-
let t10;
|
|
80
|
-
if ($[22] !== as || $[23] !== headerProps) {
|
|
81
|
-
t10 = !["filter", "floating"].includes(as ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps });
|
|
82
|
-
$[22] = as;
|
|
83
|
-
$[23] = headerProps;
|
|
84
|
-
$[24] = t10;
|
|
85
|
-
} else t10 = $[24];
|
|
86
|
-
let t11;
|
|
87
|
-
if ($[25] !== helperProps) {
|
|
88
|
-
t11 = /* @__PURE__ */ jsx(FormFieldHelper, { ...helperProps });
|
|
89
|
-
$[25] = helperProps;
|
|
90
|
-
$[26] = t11;
|
|
91
|
-
} else t11 = $[26];
|
|
92
|
-
let t12;
|
|
93
|
-
if ($[27] !== errorProps) {
|
|
94
|
-
t12 = /* @__PURE__ */ jsx(FormFieldError, { ...errorProps });
|
|
95
|
-
$[27] = errorProps;
|
|
96
|
-
$[28] = t12;
|
|
97
|
-
} else t12 = $[28];
|
|
98
|
-
let t13;
|
|
99
|
-
if ($[29] !== children || $[30] !== className || $[31] !== onFocusCapture || $[32] !== onMouseEnter || $[33] !== ref || $[34] !== t10 || $[35] !== t11 || $[36] !== t12 || $[37] !== tabIndex) {
|
|
100
|
-
t13 = /* @__PURE__ */ jsxs("div", {
|
|
101
|
-
ref,
|
|
102
|
-
className,
|
|
103
|
-
tabIndex,
|
|
104
|
-
onMouseEnter,
|
|
105
|
-
onFocusCapture,
|
|
106
|
-
children: [
|
|
107
|
-
t10,
|
|
108
|
-
children,
|
|
109
|
-
t11,
|
|
110
|
-
t12
|
|
111
|
-
]
|
|
112
|
-
});
|
|
113
|
-
$[29] = children;
|
|
114
|
-
$[30] = className;
|
|
115
|
-
$[31] = onFocusCapture;
|
|
116
|
-
$[32] = onMouseEnter;
|
|
117
|
-
$[33] = ref;
|
|
118
|
-
$[34] = t10;
|
|
119
|
-
$[35] = t11;
|
|
120
|
-
$[36] = t12;
|
|
121
|
-
$[37] = tabIndex;
|
|
122
|
-
$[38] = t13;
|
|
123
|
-
} else t13 = $[38];
|
|
124
|
-
return t13;
|
|
6
|
+
var FormField = ({ ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, tabIndex, onMouseEnter, onFocusCapture }) => {
|
|
7
|
+
const headerProps = {
|
|
8
|
+
label,
|
|
9
|
+
tooltipText,
|
|
10
|
+
helperText,
|
|
11
|
+
isRequired,
|
|
12
|
+
rightContent,
|
|
13
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
14
|
+
isDisabled,
|
|
15
|
+
className: headerClassName,
|
|
16
|
+
labelProps
|
|
17
|
+
};
|
|
18
|
+
const helperProps = {
|
|
19
|
+
helperText,
|
|
20
|
+
isDisabled,
|
|
21
|
+
isHidden: !["filter", "floating"].includes(as ?? ""),
|
|
22
|
+
hasError: !!error
|
|
23
|
+
};
|
|
24
|
+
const errorProps = {
|
|
25
|
+
error,
|
|
26
|
+
isDisabled,
|
|
27
|
+
isHidden: ["filter", "inline"].includes(as ?? ""),
|
|
28
|
+
className: errorClassName
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
31
|
+
ref,
|
|
32
|
+
className,
|
|
33
|
+
tabIndex,
|
|
34
|
+
onMouseEnter,
|
|
35
|
+
onFocusCapture,
|
|
36
|
+
children: [
|
|
37
|
+
!["filter", "floating"].includes(as ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps }),
|
|
38
|
+
children,
|
|
39
|
+
/* @__PURE__ */ jsx(FormFieldHelper, { ...helperProps }),
|
|
40
|
+
/* @__PURE__ */ jsx(FormFieldError, { ...errorProps })
|
|
41
|
+
]
|
|
42
|
+
});
|
|
125
43
|
};
|
|
126
44
|
//#endregion
|
|
127
45
|
export { FormField };
|