@povio/ui 2.2.0 → 2.2.2
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 +9 -2
- package/dist/{rolldown_runtime.js → _virtual/rolldown:runtime.js} +17 -2
- package/dist/{HighlightOn.js → assets/icons/HighlightOn.js} +1 -1
- package/dist/{TextColor.js → assets/icons/TextColor.js} +1 -1
- package/dist/{Breadcrumbs.js → components/Breadcrumbs/Breadcrumbs.js} +11 -12
- package/dist/components/Menu/Menu.d.ts +0 -1
- package/dist/{Menu2.js → components/Menu/Menu.js} +1 -1
- package/dist/components/Menu/MenuDesktop.d.ts +1 -1
- package/dist/components/Menu/MenuDesktop.js +12 -0
- package/dist/{MenuItem.js → components/Menu/MenuItem.js} +4 -4
- package/dist/{MenuMobile.js → components/Menu/MenuMobile.js} +6 -7
- package/dist/{MenuPopover.js → components/Menu/MenuPopover.js} +10 -9
- package/dist/components/buttons/Button/Button.d.ts +3 -3
- package/dist/components/buttons/Button/Button.js +64 -0
- package/dist/{button.cva.js → components/buttons/Button/button.cva.js} +3 -12
- package/dist/components/buttons/IconButton/IconButton.d.ts +1 -1
- package/dist/components/buttons/IconButton/IconButton.js +17 -0
- package/dist/{InlineIconButton.js → components/buttons/InlineIconButton/InlineIconButton.js} +2 -2
- package/dist/components/buttons/PillButton/PillButton.d.ts +3 -2
- package/dist/components/buttons/PillButton/PillButton.js +32 -0
- package/dist/{pillButton.cva.js → components/buttons/PillButton/pillButton.cva.js} +4 -4
- package/dist/{SplitButton.js → components/buttons/SplitButton/SplitButton.js} +5 -5
- package/dist/components/buttons/TextButton/TextButton.d.ts +0 -1
- package/dist/{TextButton.js → components/buttons/TextButton/TextButton.js} +2 -3
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +0 -1
- package/dist/{ToggleButton.js → components/buttons/ToggleButton/ToggleButton.js} +2 -3
- package/dist/components/buttons/shared/ButtonContent.d.ts +3 -5
- package/dist/components/buttons/shared/ButtonContent.js +35 -0
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +4 -0
- package/dist/components/buttons/shared/buttonContent.cva.js +36 -0
- package/dist/{Checkbox.js → components/inputs/Checkbox/Checkbox.js} +8 -8
- package/dist/{CheckboxCheckmark2.js → components/inputs/Checkbox/CheckboxCheckmark.js} +6 -7
- package/dist/{checkbox.cva.js → components/inputs/Checkbox/checkbox.cva.js} +2 -2
- package/dist/{DatePicker.js → components/inputs/DateTime/DatePicker/DatePicker.js} +13 -17
- package/dist/{DateRangePicker.js → components/inputs/DateTime/DateRangePicker/DateRangePicker.js} +16 -23
- package/dist/{DateTimePicker.js → components/inputs/DateTime/DateTimePicker/DateTimePicker.js} +12 -14
- package/dist/{TimePicker.js → components/inputs/DateTime/TimePicker/TimePicker.js} +10 -10
- package/dist/{Calendar2.js → components/inputs/DateTime/shared/Calendar.js} +1 -1
- package/dist/{CalendarCell.js → components/inputs/DateTime/shared/CalendarCell.js} +2 -2
- package/dist/{CalendarGrid.js → components/inputs/DateTime/shared/CalendarGrid.js} +2 -2
- package/dist/{CalendarHeader.js → components/inputs/DateTime/shared/CalendarHeader.js} +5 -5
- package/dist/{CalendarSelectHeader.js → components/inputs/DateTime/shared/CalendarSelectHeader.js} +9 -9
- package/dist/{DateField.js → components/inputs/DateTime/shared/DateField.js} +1 -1
- package/dist/{DatePickerInput.js → components/inputs/DateTime/shared/DatePickerInput.js} +73 -88
- package/dist/{DateTimeDialog.js → components/inputs/DateTime/shared/DateTimeDialog.js} +4 -4
- package/dist/{DateTimeDialogFooter.js → components/inputs/DateTime/shared/DateTimeDialogFooter.js} +2 -2
- package/dist/{MonthPicker.js → components/inputs/DateTime/shared/MonthPicker.js} +1 -1
- package/dist/{TimePickerForm.js → components/inputs/DateTime/shared/TimePickerForm.js} +6 -6
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +88 -0
- package/dist/{YearPicker.js → components/inputs/DateTime/shared/YearPicker.js} +2 -2
- package/dist/{FileUpload.js → components/inputs/File/FileUpload.js} +10 -10
- package/dist/{InputUpload.js → components/inputs/File/InputUpload.js} +7 -7
- package/dist/{FileUploadContent.js → components/inputs/File/shared/FileUploadContent.js} +1 -1
- package/dist/{FileUploadContentEmpty.js → components/inputs/File/shared/FileUploadContentEmpty.js} +4 -4
- package/dist/{FileUploadContentError.js → components/inputs/File/shared/FileUploadContentError.js} +7 -7
- package/dist/{FileUploadContentFilled.js → components/inputs/File/shared/FileUploadContentFilled.js} +8 -8
- package/dist/{FileUploadContentLoading.js → components/inputs/File/shared/FileUploadContentLoading.js} +7 -7
- package/dist/{InputUploadContent.js → components/inputs/File/shared/InputUploadContent.js} +9 -9
- package/dist/{InputUploadFilled.js → components/inputs/File/shared/InputUploadFilled.js} +6 -6
- package/dist/{ProgressBar.js → components/inputs/File/shared/ProgressBar.js} +1 -1
- package/dist/{fileUpload.cva.js → components/inputs/File/shared/fileUpload.cva.js} +1 -1
- package/dist/{inputUploadButton.cva.js → components/inputs/File/shared/inputUploadButton.cva.js} +1 -1
- package/dist/{FormField.js → components/inputs/FormField/FormField.js} +1 -1
- package/dist/components/inputs/FormField/FormFieldError.js +11 -0
- package/dist/{FormFieldHeader.js → components/inputs/FormField/FormFieldHeader.js} +3 -3
- package/dist/{FormFieldHeaderClose.js → components/inputs/FormField/FormFieldHeaderClose.js} +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +25 -0
- package/dist/{NumberInput.js → components/inputs/Input/NumberInput/NumberInput.js} +35 -32
- package/dist/{PasswordInput.js → components/inputs/Input/PasswordInput/PasswordInput.js} +4 -4
- package/dist/{TextArea.js → components/inputs/Input/TextArea/TextArea.js} +23 -15
- package/dist/{TextInput.js → components/inputs/Input/TextInput/TextInput.js} +36 -33
- package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -2
- package/dist/components/inputs/Input/shared/InputContent.js +74 -0
- package/dist/{Form.js → components/inputs/Inputs/Form.js} +4 -4
- package/dist/{InputItem.js → components/inputs/Inputs/InputItem.js} +15 -15
- package/dist/{RadioGroup.js → components/inputs/RadioGroup/RadioGroup.js} +8 -9
- package/dist/{radio.cva.js → components/inputs/RadioGroup/radio.cva.js} +2 -2
- package/dist/{Autocomplete.js → components/inputs/Selection/Autocomplete/Autocomplete.js} +2 -2
- package/dist/{QueryAutocomplete.js → components/inputs/Selection/Autocomplete/QueryAutocomplete.js} +1 -1
- package/dist/{Select.js → components/inputs/Selection/Select/Select.js} +2 -2
- package/dist/{SelectBase.js → components/inputs/Selection/shared/SelectBase.js} +2 -2
- package/dist/{SelectDesktop.js → components/inputs/Selection/shared/SelectDesktop.js} +21 -9
- package/dist/{SelectInput.js → components/inputs/Selection/shared/SelectInput.js} +31 -48
- package/dist/{SelectInputTags.js → components/inputs/Selection/shared/SelectInputTags.js} +1 -1
- package/dist/{SelectListBox.js → components/inputs/Selection/shared/SelectListBox.js} +1 -1
- package/dist/{SelectListBoxItem.js → components/inputs/Selection/shared/SelectListBoxItem.js} +2 -2
- package/dist/{SelectListBoxItemSelectAll.js → components/inputs/Selection/shared/SelectListBoxItemSelectAll.js} +2 -2
- package/dist/{SelectListBoxLoadingItem.js → components/inputs/Selection/shared/SelectListBoxLoadingItem.js} +3 -3
- package/dist/{SelectListBoxSelectionBar.js → components/inputs/Selection/shared/SelectListBoxSelectionBar.js} +2 -2
- package/dist/{SelectMobile.js → components/inputs/Selection/shared/SelectMobile.js} +6 -6
- package/dist/{select.context.js → components/inputs/Selection/shared/select.context.js} +2 -2
- package/dist/{Slider.js → components/inputs/Slider/Slider.js} +6 -6
- package/dist/{TextEditor.js → components/inputs/TextEditor/TextEditor.js} +14 -7
- package/dist/{ColorPickerDropdown.js → components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js} +3 -3
- package/dist/{HyperlinkAction.js → components/inputs/TextEditor/Toolbar/HyperlinkAction.js} +6 -6
- package/dist/{TextAlignSelect.js → components/inputs/TextEditor/Toolbar/TextAlignSelect.js} +6 -6
- package/dist/{TextColorSelect.js → components/inputs/TextEditor/Toolbar/TextColorSelect.js} +2 -2
- package/dist/{TextHighlightSelect.js → components/inputs/TextEditor/Toolbar/TextHighlightSelect.js} +3 -3
- package/dist/{TextListActions.js → components/inputs/TextEditor/Toolbar/TextListActions.js} +4 -4
- package/dist/{TextMarksActions.js → components/inputs/TextEditor/Toolbar/TextMarksActions.js} +6 -6
- package/dist/{TextStyleSelect.js → components/inputs/TextEditor/Toolbar/TextStyleSelect.js} +3 -3
- package/dist/{Toggle.js → components/inputs/Toggle/Toggle.js} +8 -9
- package/dist/{toggle.cva.js → components/inputs/Toggle/toggle.cva.js} +2 -2
- package/dist/{CheckContent.js → components/inputs/shared/CheckContent.js} +4 -4
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +19 -0
- package/dist/{TooltipWrapper.js → components/inputs/shared/TooltipWrapper.js} +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +4 -4
- package/dist/{input.cva.js → components/inputs/shared/input.cva.js} +38 -29
- package/dist/components/inputs/shared/label.cva.d.ts +2 -2
- package/dist/components/inputs/shared/label.cva.js +64 -0
- package/dist/{Accordion.js → components/navigation/Accordion/Accordion.js} +2 -2
- package/dist/{AccordionItem.js → components/navigation/Accordion/AccordionItem.js} +12 -13
- package/dist/{Stepper.js → components/navigation/Stepper/Stepper.js} +2 -2
- package/dist/{StepperItem.js → components/navigation/Stepper/StepperItem.js} +8 -9
- package/dist/{StepperSeparator.js → components/navigation/Stepper/StepperSeparator.js} +2 -2
- package/dist/{outline.clsx.js → components/outline.clsx.js} +1 -1
- package/dist/components/overlays/ActionModal/ActionModal.d.ts +6 -1
- package/dist/{ActionModal.js → components/overlays/ActionModal/ActionModal.js} +10 -9
- package/dist/{BottomSheet.js → components/overlays/BottomSheet/BottomSheet.js} +7 -7
- package/dist/{Drawer.js → components/overlays/Drawer/Drawer.js} +1 -1
- package/dist/components/overlays/Modal/Modal.d.ts +2 -1
- package/dist/{Modal.js → components/overlays/Modal/Modal.js} +9 -9
- package/dist/{ResponsivePopover.js → components/overlays/ResponsivePopover/ResponsivePopover.js} +4 -4
- package/dist/{Tooltip.js → components/overlays/Tooltip/Tooltip.js} +11 -11
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +3 -2
- package/dist/{TooltipEllipsis.js → components/overlays/Tooltip/TooltipEllipsis.js} +2 -1
- package/dist/{Segment.js → components/segment/Segment.js} +5 -6
- package/dist/{SegmentItem.js → components/segment/SegmentItem.js} +4 -4
- package/dist/{Pagination.js → components/shared/pagination/Pagination.js} +3 -3
- package/dist/{PaginationList.js → components/shared/pagination/PaginationList.js} +6 -6
- package/dist/{Alert.js → components/status/Alert/Alert.js} +7 -8
- package/dist/{Loader.js → components/status/Loader/Loader.js} +1 -1
- package/dist/{Toast.js → components/status/Toast/Toast.js} +10 -11
- package/dist/{toast.cva.js → components/status/Toast/toast.cva.js} +1 -1
- package/dist/{CellText.js → components/table/CellText.js} +1 -1
- package/dist/{ColumnConfig.js → components/table/ColumnConfig.js} +5 -5
- package/dist/{HeaderText.js → components/table/HeaderText.js} +1 -1
- package/dist/{InfiniteTable.js → components/table/InfiniteTable.js} +3 -3
- package/dist/{PaginatedTable.js → components/table/PaginatedTable.js} +2 -2
- package/dist/{Table.js → components/table/Table.js} +25 -20
- package/dist/{table.cva.js → components/table/table.cva.js} +1 -1
- package/dist/{Link2.js → components/text/Link/Link.js} +4 -4
- package/dist/{link.cva.js → components/text/Link/link.cva.js} +1 -1
- package/dist/components/text/Tag/Tag.d.ts +3 -1
- package/dist/components/text/Tag/Tag.js +38 -0
- package/dist/{tag.cva.js → components/text/Tag/tag.cva.js} +1 -1
- package/dist/components/text/Typography/Typography.d.ts +1 -1
- package/dist/{Typography.js → components/text/Typography/Typography.js} +3 -3
- package/dist/{confirmation.context.js → config/confirmation.context.js} +1 -1
- package/dist/config/i18n.js +8 -0
- package/dist/{theme.context.js → config/theme.context.js} +1 -1
- package/dist/config/uiConfig.context.d.ts +4 -0
- package/dist/{uiConfig.context.js → config/uiConfig.context.js} +13 -2
- package/dist/config/uiStyle.context.d.ts +7 -3
- package/dist/config/uiStyle.context.js +28 -0
- package/dist/{dynamicColumns.js → helpers/dynamicColumns.js} +3 -3
- package/dist/{dynamicInputs.js → helpers/dynamicInputs.js} +2 -2
- package/dist/{useAutosave.js → hooks/useAutosave.js} +2 -2
- package/dist/{useDeepCompare.js → hooks/useDeepCompare.js} +1 -1
- package/dist/{useFilters.js → hooks/useFilters.js} +1 -1
- package/dist/{useForm.js → hooks/useForm.js} +1 -1
- package/dist/{useFormAutosave.js → hooks/useFormAutosave.js} +2 -2
- package/dist/{usePagination.js → hooks/usePagination.js} +1 -1
- package/dist/{useSorting.js → hooks/useSorting.js} +1 -1
- package/dist/{useStateAndRef.js → hooks/useStateAndRef.js} +1 -1
- package/dist/{useTableNav.js → hooks/useTableNav.js} +1 -1
- package/dist/index.js +137 -137
- package/dist/node_modules/.pnpm/motion@12.23.28_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/motion/dist/es/react.js +10 -0
- package/dist/text-editor.js +1 -1
- package/dist/tw-ui-plugin.d.ts +3 -0
- package/dist/utils/compoundMapper.d.ts +1 -1
- package/package.json +25 -26
- package/dist/Button.js +0 -54
- package/dist/ButtonContent.js +0 -28
- package/dist/FormFieldError.js +0 -11
- package/dist/FormFieldLabel.js +0 -32
- package/dist/IconButton.js +0 -12
- package/dist/InputClear.js +0 -19
- package/dist/InputContent.js +0 -94
- package/dist/MenuDesktop.js +0 -54
- package/dist/PillButton.js +0 -37
- package/dist/Tag.js +0 -42
- package/dist/TimePickerInput.js +0 -105
- package/dist/buttonContent.cva.js +0 -10
- package/dist/i18n.js +0 -8
- package/dist/label.cva.js +0 -92
- package/dist/react.js +0 -6
- package/dist/uiStyle.context.js +0 -16
- /package/dist/{AlignCenter.js → assets/icons/AlignCenter.js} +0 -0
- /package/dist/{AlignLeft.js → assets/icons/AlignLeft.js} +0 -0
- /package/dist/{AlignLeftRight.js → assets/icons/AlignLeftRight.js} +0 -0
- /package/dist/{AlignRight.js → assets/icons/AlignRight.js} +0 -0
- /package/dist/{ArrowDropDown.js → assets/icons/ArrowDropDown.js} +0 -0
- /package/dist/{ArrowDropUp.js → assets/icons/ArrowDropUp.js} +0 -0
- /package/dist/{ArrowLeft.js → assets/icons/ArrowLeft.js} +0 -0
- /package/dist/{ArrowRight.js → assets/icons/ArrowRight.js} +0 -0
- /package/dist/{Bold.js → assets/icons/Bold.js} +0 -0
- /package/dist/{BulletedList.js → assets/icons/BulletedList.js} +0 -0
- /package/dist/{Calendar.js → assets/icons/Calendar.js} +0 -0
- /package/dist/{Check.js → assets/icons/Check.js} +0 -0
- /package/dist/{CheckCircle.js → assets/icons/CheckCircle.js} +0 -0
- /package/dist/{CheckboxCheckmark.js → assets/icons/CheckboxCheckmark.js} +0 -0
- /package/dist/{CheckboxIndeterminate.js → assets/icons/CheckboxIndeterminate.js} +0 -0
- /package/dist/{ChevronDown.js → assets/icons/ChevronDown.js} +0 -0
- /package/dist/{ChevronLeft.js → assets/icons/ChevronLeft.js} +0 -0
- /package/dist/{ChevronRight.js → assets/icons/ChevronRight.js} +0 -0
- /package/dist/{ChevronUp.js → assets/icons/ChevronUp.js} +0 -0
- /package/dist/{ChevronsLeft.js → assets/icons/ChevronsLeft.js} +0 -0
- /package/dist/{ChevronsRight.js → assets/icons/ChevronsRight.js} +0 -0
- /package/dist/{Clock.js → assets/icons/Clock.js} +0 -0
- /package/dist/{Close.js → assets/icons/Close.js} +0 -0
- /package/dist/{DateTime.js → assets/icons/DateTime.js} +0 -0
- /package/dist/{DragIndicator.js → assets/icons/DragIndicator.js} +0 -0
- /package/dist/{File.js → assets/icons/File.js} +0 -0
- /package/dist/{Highlight.js → assets/icons/Highlight.js} +0 -0
- /package/dist/{Home.js → assets/icons/Home.js} +0 -0
- /package/dist/{Info.js → assets/icons/Info.js} +0 -0
- /package/dist/{Italic.js → assets/icons/Italic.js} +0 -0
- /package/dist/{Link.js → assets/icons/Link.js} +0 -0
- /package/dist/{Menu.js → assets/icons/Menu.js} +0 -0
- /package/dist/{NumberedList.js → assets/icons/NumberedList.js} +0 -0
- /package/dist/{PointerHorizontal.js → assets/icons/PointerHorizontal.js} +0 -0
- /package/dist/{PointerVertical.js → assets/icons/PointerVertical.js} +0 -0
- /package/dist/{Send.js → assets/icons/Send.js} +0 -0
- /package/dist/{Strikethrough.js → assets/icons/Strikethrough.js} +0 -0
- /package/dist/{Today.js → assets/icons/Today.js} +0 -0
- /package/dist/{Underlined.js → assets/icons/Underlined.js} +0 -0
- /package/dist/{Upload.js → assets/icons/Upload.js} +0 -0
- /package/dist/{Visibility.js → assets/icons/Visibility.js} +0 -0
- /package/dist/{VisibilityOff.js → assets/icons/VisibilityOff.js} +0 -0
- /package/dist/{WarningFilled.js → assets/icons/WarningFilled.js} +0 -0
- /package/dist/{translation.js → assets/locales/en/translation.json.js} +0 -0
- /package/dist/{translation2.js → assets/locales/sl/translation.json.js} +0 -0
- /package/dist/{breadcrumbs.cva.js → components/Breadcrumbs/breadcrumbs.cva.js} +0 -0
- /package/dist/{menu.cva.js → components/Menu/menu.cva.js} +0 -0
- /package/dist/{DateSegmentItem.js → components/inputs/DateTime/shared/DateSegmentItem.js} +0 -0
- /package/dist/{RangeCalendar.js → components/inputs/DateTime/shared/RangeCalendar.js} +0 -0
- /package/dist/{TimeField.js → components/inputs/DateTime/shared/TimeField.js} +0 -0
- /package/dist/{FileUploadContainer.js → components/inputs/File/FileUploadContainer.js} +0 -0
- /package/dist/{FileCard.js → components/inputs/File/shared/FileCard.js} +0 -0
- /package/dist/{FileCardList.js → components/inputs/File/shared/FileCardList.js} +0 -0
- /package/dist/{Inputs.js → components/inputs/Inputs/Inputs.js} +0 -0
- /package/dist/{useSelectItems.js → components/inputs/Selection/shared/useSelectItems.js} +0 -0
- /package/dist/{ColorPicker.js → components/inputs/TextEditor/Toolbar/ColorPicker.js} +0 -0
- /package/dist/{TextEditorToolbar.js → components/inputs/TextEditor/Toolbar/TextEditorToolbar.js} +0 -0
- /package/dist/{textEditor.types.js → components/inputs/TextEditor/textEditor.types.js} +0 -0
- /package/dist/{accordion.cva.js → components/navigation/Accordion/accordion.cva.js} +0 -0
- /package/dist/{stepper.cva.js → components/navigation/Stepper/stepper.cva.js} +0 -0
- /package/dist/{modal.cva.js → components/overlays/Modal/modal.cva.js} +0 -0
- /package/dist/{tooltip.cva.js → components/overlays/Tooltip/tooltip.cva.js} +0 -0
- /package/dist/{segment.cva.js → components/segment/segment.cva.js} +0 -0
- /package/dist/{minWidth.cva.js → components/shared/pagination/minWidth.cva.js} +0 -0
- /package/dist/{alert.cva.js → components/status/Alert/alert.cva.js} +0 -0
- /package/dist/{loader.cva.js → components/status/Loader/loader.cva.js} +0 -0
- /package/dist/{useToast.js → components/status/Toast/useToast.js} +0 -0
- /package/dist/{status.cva.js → components/status/shared/status.cva.js} +0 -0
- /package/dist/{typography.cva.js → components/text/Typography/typography.cva.js} +0 -0
- /package/dist/{link.context.js → config/link.context.js} +0 -0
- /package/dist/{router.context.js → config/router.context.js} +0 -0
- /package/dist/{useBreakpoint.js → hooks/useBreakpoint.js} +0 -0
- /package/dist/{useDebounceCallback.js → hooks/useDebounceCallback.js} +0 -0
- /package/dist/{useIntersectionObserver.js → hooks/useIntersectionObserver.js} +0 -0
- /package/dist/{useLocalStorage.js → hooks/useLocalStorage.js} +0 -0
- /package/dist/{useLongPressRepeat.js → hooks/useLongPressRepeat.js} +0 -0
- /package/dist/{useScrollableListBox.js → hooks/useScrollableListBox.js} +0 -0
- /package/dist/{useTableColumnConfig.js → hooks/useTableColumnConfig.js} +0 -0
- /package/dist/{useTranslationMemo.js → hooks/useTranslationMemo.js} +0 -0
- /package/dist/{array.utils.js → utils/array.utils.js} +0 -0
- /package/dist/{compoundMapper.js → utils/compoundMapper.js} +0 -0
- /package/dist/{date-time.utils.js → utils/date-time.utils.js} +0 -0
- /package/dist/{date.utils.js → utils/date.utils.js} +0 -0
- /package/dist/{dom.utils.js → utils/dom.utils.js} +0 -0
- /package/dist/{file.utils.js → utils/file.utils.js} +0 -0
- /package/dist/{isEqual.js → utils/isEqual.js} +0 -0
- /package/dist/{logger.js → utils/logger.js} +0 -0
- /package/dist/{object.utils.js → utils/object.utils.js} +0 -0
- /package/dist/{queries.utils.js → utils/queries.utils.js} +0 -0
- /package/dist/{rest.utils.js → utils/rest.utils.js} +0 -0
- /package/dist/{routing.utils.js → utils/routing.utils.js} +0 -0
- /package/dist/{string.utils.js → utils/string.utils.js} +0 -0
- /package/dist/{zod.utils.js → utils/zod.utils.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { UIStyle } from "
|
|
1
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
|
+
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
2
3
|
import { checkboxIndicatorClass, checkboxTypography } from "./checkbox.cva.js";
|
|
3
|
-
import { FormFieldError } from "
|
|
4
|
-
import { CheckContent } from "
|
|
5
|
-
import {
|
|
6
|
-
import { CheckboxCheckmark } from "./CheckboxCheckmark2.js";
|
|
4
|
+
import { FormFieldError } from "../FormField/FormFieldError.js";
|
|
5
|
+
import { CheckContent } from "../shared/CheckContent.js";
|
|
6
|
+
import { CheckboxCheckmark } from "./CheckboxCheckmark.js";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { clsx } from "clsx";
|
|
9
9
|
import { Checkbox } from "react-aria-components";
|
|
@@ -11,8 +11,8 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
11
11
|
import { Controller } from "react-hook-form";
|
|
12
12
|
var CheckboxBase = (props) => {
|
|
13
13
|
const ui = UIConfig.useConfig();
|
|
14
|
-
const checkboxTypographyMap = UIStyle.
|
|
15
|
-
const { className, children, isDisabled, error, variant = ui.checkbox.variant, hideLabel = ui.input.hideLabel
|
|
14
|
+
const checkboxTypographyMap = UIStyle.useMapper("checkbox.typography", checkboxTypography);
|
|
15
|
+
const { className, children, isDisabled, error, variant = ui.checkbox.variant, hideLabel = ui.input.hideLabel, ...rest } = props;
|
|
16
16
|
const formFieldErrorProps = {
|
|
17
17
|
error,
|
|
18
18
|
isDisabled
|
|
@@ -39,7 +39,7 @@ var CheckboxBase = (props) => {
|
|
|
39
39
|
};
|
|
40
40
|
const Checkbox$1 = (props) => {
|
|
41
41
|
if ("formControl" in props && props.formControl) {
|
|
42
|
-
const { formControl, ref
|
|
42
|
+
const { formControl, ref, ...innerProps } = props;
|
|
43
43
|
return /* @__PURE__ */ jsx(Controller, {
|
|
44
44
|
control: formControl.control,
|
|
45
45
|
name: formControl.name,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { CheckboxCheckmarkIcon } from "
|
|
2
|
-
import { CheckboxIndeterminateIcon } from "
|
|
3
|
-
import { UIStyle } from "
|
|
1
|
+
import { CheckboxCheckmarkIcon } from "../../../assets/icons/CheckboxCheckmark.js";
|
|
2
|
+
import { CheckboxIndeterminateIcon } from "../../../assets/icons/CheckboxIndeterminate.js";
|
|
3
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
4
4
|
import { checkbox, checkboxIcon } from "./checkbox.cva.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
const CheckboxCheckmark = ({ variant, className, selectedIcon: SelectedIcon = CheckboxCheckmarkIcon, indeterminateIcon: IndeterminateIcon = CheckboxIndeterminateIcon
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const checkboxIconCva = uiStyle?.checkbox?.iconCva ?? checkboxIcon;
|
|
6
|
+
const CheckboxCheckmark = ({ variant, className, selectedIcon: SelectedIcon = CheckboxCheckmarkIcon, indeterminateIcon: IndeterminateIcon = CheckboxIndeterminateIcon, ...props }) => {
|
|
7
|
+
const checkboxCva = UIStyle.useCva("checkbox.cva", checkbox);
|
|
8
|
+
const checkboxIconCva = UIStyle.useCva("checkbox.iconCva", checkboxIcon);
|
|
10
9
|
return /* @__PURE__ */ jsxs("div", {
|
|
11
10
|
className: checkboxCva({
|
|
12
11
|
variant,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uiGroupOutlineClass } from "
|
|
2
|
-
import { compoundMapper } from "
|
|
1
|
+
import { uiGroupOutlineClass } from "../../outline.clsx.js";
|
|
2
|
+
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
const checkbox = cva([
|
|
5
5
|
"flex items-center justify-center border-2",
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { UIConfig } from "
|
|
2
|
-
import { Calendar } from "
|
|
3
|
-
import { DatePickerInput } from "
|
|
4
|
-
import { DateTimeDialog } from "
|
|
5
|
-
import { DateTimeDialogFooter } from "
|
|
6
|
-
import { FormField } from "
|
|
7
|
-
import { TooltipWrapper } from "
|
|
8
|
-
import { DateTimeUtils } from "
|
|
1
|
+
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
|
+
import { Calendar } from "../shared/Calendar.js";
|
|
3
|
+
import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
4
|
+
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
5
|
+
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
6
|
+
import { FormField } from "../../FormField/FormField.js";
|
|
7
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
8
|
+
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { clsx } from "clsx";
|
|
11
11
|
import { useImperativeHandle, useMemo, useRef } from "react";
|
|
12
12
|
import { useDatePicker, useLocale } from "react-aria";
|
|
13
13
|
import { mergeRefs } from "@react-aria/utils";
|
|
14
14
|
import { Controller } from "react-hook-form";
|
|
15
|
-
import {
|
|
15
|
+
import { createCalendar, getLocalTimeZone, toCalendarDate, today } from "@internationalized/date";
|
|
16
16
|
import { DateTime } from "luxon";
|
|
17
17
|
import { useCalendarState, useDatePickerState } from "react-stately";
|
|
18
|
-
var PLACEHOLDER_VALUE = new CalendarDate(2024, 1, 1);
|
|
19
18
|
var DatePickerBase = (props) => {
|
|
20
19
|
const ui = UIConfig.useConfig();
|
|
21
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, className, placeholder, as = ui.input.as, hideLabel = ui.input.hideLabel, variant = ui.input.variant, size = ui.input.size, isClearable = ui.input.isClearable, todayIcon = ui.dateInput.todayIcon, shouldForceLeadingZeros = ui.dateInput.shouldForceLeadingZeros, disableManualEntry = ui.dateInput.disableManualEntry
|
|
20
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, className, placeholder, as = ui.input.as, hideLabel = ui.input.hideLabel, variant = ui.input.variant, size = ui.input.size, isClearable = ui.input.isClearable, todayIcon = ui.dateInput.todayIcon, shouldForceLeadingZeros = ui.dateInput.shouldForceLeadingZeros, disableManualEntry = ui.dateInput.disableManualEntry, ...rest } = props;
|
|
22
21
|
const formFieldProps = {
|
|
23
22
|
error,
|
|
24
23
|
label,
|
|
@@ -114,10 +113,7 @@ var DatePickerBase = (props) => {
|
|
|
114
113
|
ref: mergeRefs(ref, datePickerInputRef),
|
|
115
114
|
as,
|
|
116
115
|
groupProps,
|
|
117
|
-
fieldProps
|
|
118
|
-
...fieldProps,
|
|
119
|
-
placeholderValue: PLACEHOLDER_VALUE
|
|
120
|
-
},
|
|
116
|
+
fieldProps,
|
|
121
117
|
buttonProps,
|
|
122
118
|
isDirty,
|
|
123
119
|
isDisabled,
|
|
@@ -152,7 +148,7 @@ var DatePickerBase = (props) => {
|
|
|
152
148
|
})
|
|
153
149
|
});
|
|
154
150
|
};
|
|
155
|
-
const DatePicker = ({ fullIso = true, minValue, maxValue
|
|
151
|
+
const DatePicker = ({ fullIso = true, minValue, maxValue, ...props }) => {
|
|
156
152
|
const formatCalendarDate = (calendarDate) => {
|
|
157
153
|
if (calendarDate === null) return null;
|
|
158
154
|
if (fullIso) return DateTimeUtils.fromCalendarDateToUTCISO(calendarDate);
|
|
@@ -170,7 +166,7 @@ const DatePicker = ({ fullIso = true, minValue, maxValue,...props }) => {
|
|
|
170
166
|
maxValue: typeof maxValue === "string" ? parseCalendarDate(maxValue) : maxValue
|
|
171
167
|
};
|
|
172
168
|
if ("formControl" in props && props.formControl) {
|
|
173
|
-
const { formControl, ref
|
|
169
|
+
const { formControl, ref, ...innerProps } = props;
|
|
174
170
|
return /* @__PURE__ */ jsx(Controller, {
|
|
175
171
|
control: formControl.control,
|
|
176
172
|
name: formControl.name,
|
package/dist/{DateRangePicker.js → components/inputs/DateTime/DateRangePicker/DateRangePicker.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Typography } from "
|
|
2
|
-
import { UIConfig } from "
|
|
3
|
-
import { ns } from "
|
|
4
|
-
import { DatePickerInput } from "
|
|
5
|
-
import { DateTimeDialog } from "
|
|
6
|
-
import { DateTimeDialogFooter } from "
|
|
7
|
-
import { FormField } from "
|
|
8
|
-
import { TooltipWrapper } from "
|
|
9
|
-
import { DateTimeUtils } from "
|
|
10
|
-
import { RangeCalendar } from "
|
|
1
|
+
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
|
+
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
|
+
import { ns } from "../../../../config/i18n.js";
|
|
4
|
+
import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
5
|
+
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
6
|
+
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
7
|
+
import { FormField } from "../../FormField/FormField.js";
|
|
8
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
9
|
+
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
10
|
+
import { RangeCalendar } from "../shared/RangeCalendar.js";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { clsx } from "clsx";
|
|
13
13
|
import { useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -15,15 +15,14 @@ import { Button } from "react-aria-components";
|
|
|
15
15
|
import { useDateRangePicker, useLocale as useLocale$1 } from "react-aria";
|
|
16
16
|
import { mergeRefs } from "@react-aria/utils";
|
|
17
17
|
import { Controller } from "react-hook-form";
|
|
18
|
-
import {
|
|
18
|
+
import { createCalendar, endOfMonth, endOfWeek, endOfYear, getLocalTimeZone, startOfMonth, startOfWeek, startOfYear, toCalendarDate, today } from "@internationalized/date";
|
|
19
19
|
import { DateTime } from "luxon";
|
|
20
20
|
import { useDateRangePickerState, useRangeCalendarState } from "react-stately";
|
|
21
21
|
import { useTranslation } from "react-i18next";
|
|
22
|
-
var PLACEHOLDER_VALUE = new CalendarDate(2024, 1, 1);
|
|
23
22
|
var DateRangePickerBase = (props) => {
|
|
24
23
|
const ui = UIConfig.useConfig();
|
|
25
24
|
const { t } = useTranslation();
|
|
26
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, className, hideSidebar, placeholder, hideLabel = ui.input.hideLabel, variant = ui.input.variant, as = ui.input.as, size = ui.input.size, isClearable = ui.input.isClearable, todayIcon = ui.dateInput.todayIcon, shouldForceLeadingZeros = ui.dateInput.shouldForceLeadingZeros, disableManualEntry = ui.dateInput.disableManualEntry
|
|
25
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, className, hideSidebar, placeholder, hideLabel = ui.input.hideLabel, variant = ui.input.variant, as = ui.input.as, size = ui.input.size, isClearable = ui.input.isClearable, todayIcon = ui.dateInput.todayIcon, shouldForceLeadingZeros = ui.dateInput.shouldForceLeadingZeros, disableManualEntry = ui.dateInput.disableManualEntry, ...rest } = props;
|
|
27
26
|
const [validationRangeError, setValidationRangeError] = useState();
|
|
28
27
|
const datePickerInputRef = useRef(null);
|
|
29
28
|
const dateRangePickerRef = useMemo(() => ({ get current() {
|
|
@@ -464,14 +463,8 @@ var DateRangePickerBase = (props) => {
|
|
|
464
463
|
ref: mergeRefs(ref, datePickerInputRef),
|
|
465
464
|
as,
|
|
466
465
|
groupProps,
|
|
467
|
-
fieldProps:
|
|
468
|
-
|
|
469
|
-
placeholderValue: PLACEHOLDER_VALUE
|
|
470
|
-
},
|
|
471
|
-
endFieldProps: {
|
|
472
|
-
...endFieldProps,
|
|
473
|
-
placeholderValue: PLACEHOLDER_VALUE
|
|
474
|
-
},
|
|
466
|
+
fieldProps: startFieldProps,
|
|
467
|
+
endFieldProps,
|
|
475
468
|
buttonProps,
|
|
476
469
|
isDisabled,
|
|
477
470
|
isInvalid: !!error,
|
|
@@ -534,7 +527,7 @@ var DateRangePickerBase = (props) => {
|
|
|
534
527
|
})
|
|
535
528
|
});
|
|
536
529
|
};
|
|
537
|
-
const DateRangePicker = ({ fullIso = true, minValue, maxValue
|
|
530
|
+
const DateRangePicker = ({ fullIso = true, minValue, maxValue, ...props }) => {
|
|
538
531
|
const formatDateRange = (range) => {
|
|
539
532
|
if (!range?.start || !range?.end) return null;
|
|
540
533
|
if (fullIso) return {
|
|
@@ -574,7 +567,7 @@ const DateRangePicker = ({ fullIso = true, minValue, maxValue,...props }) => {
|
|
|
574
567
|
maxValue: typeof maxValue === "string" ? parseCalendarDate(maxValue) : maxValue
|
|
575
568
|
};
|
|
576
569
|
if ("formControl" in props && props.formControl) {
|
|
577
|
-
const { formControl, ref
|
|
570
|
+
const { formControl, ref, ...innerProps } = props;
|
|
578
571
|
return /* @__PURE__ */ jsx(Controller, {
|
|
579
572
|
control: formControl.control,
|
|
580
573
|
name: formControl.name,
|
package/dist/{DateTimePicker.js → components/inputs/DateTime/DateTimePicker/DateTimePicker.js}
RENAMED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { UIConfig } from "
|
|
2
|
-
import { Calendar } from "
|
|
3
|
-
import { DatePickerInput } from "
|
|
4
|
-
import { DateTimeDialog } from "
|
|
5
|
-
import { DateTimeDialogFooter } from "
|
|
6
|
-
import { FormField } from "
|
|
7
|
-
import { TooltipWrapper } from "
|
|
8
|
-
import { DateTimeUtils } from "
|
|
1
|
+
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
|
+
import { Calendar } from "../shared/Calendar.js";
|
|
3
|
+
import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
4
|
+
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
5
|
+
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
6
|
+
import { FormField } from "../../FormField/FormField.js";
|
|
7
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
8
|
+
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useEffect, useImperativeHandle, useMemo, useRef } from "react";
|
|
11
11
|
import { useDatePicker, useLocale } from "react-aria";
|
|
12
12
|
import { mergeRefs } from "@react-aria/utils";
|
|
13
13
|
import { Controller } from "react-hook-form";
|
|
14
|
-
import {
|
|
14
|
+
import { Time, createCalendar, getLocalTimeZone, now, toCalendarDateTime, today } from "@internationalized/date";
|
|
15
15
|
import { useCalendarState, useDatePickerState } from "react-stately";
|
|
16
|
-
var PLACEHOLDER_VALUE = new CalendarDateTime(2024, 1, 1);
|
|
17
16
|
var DateTimePickerBase = (props) => {
|
|
18
17
|
const ui = UIConfig.useConfig();
|
|
19
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, isTimeOptional, placeholder, hideLabel = ui.input.hideLabel, variant = ui.input.variant, as = ui.input.as, size = ui.input.size, isClearable = ui.input.isClearable, todayIcon = ui.dateInput.todayIcon, shouldForceLeadingZeros = ui.dateInput.shouldForceLeadingZeros, disableManualEntry = ui.dateInput.disableManualEntry
|
|
18
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, isTimeOptional, placeholder, hideLabel = ui.input.hideLabel, variant = ui.input.variant, as = ui.input.as, size = ui.input.size, isClearable = ui.input.isClearable, todayIcon = ui.dateInput.todayIcon, shouldForceLeadingZeros = ui.dateInput.shouldForceLeadingZeros, disableManualEntry = ui.dateInput.disableManualEntry, ...rest } = props;
|
|
20
19
|
const formFieldProps = {
|
|
21
20
|
error,
|
|
22
21
|
label,
|
|
@@ -129,7 +128,6 @@ var DateTimePickerBase = (props) => {
|
|
|
129
128
|
groupProps,
|
|
130
129
|
fieldProps: {
|
|
131
130
|
...fieldProps,
|
|
132
|
-
placeholderValue: PLACEHOLDER_VALUE,
|
|
133
131
|
onBlur: (e) => {
|
|
134
132
|
fieldProps.onBlur?.(e);
|
|
135
133
|
onInputBlur(e);
|
|
@@ -173,7 +171,7 @@ var DateTimePickerBase = (props) => {
|
|
|
173
171
|
})
|
|
174
172
|
});
|
|
175
173
|
};
|
|
176
|
-
const DateTimePicker = ({ fullIso = true
|
|
174
|
+
const DateTimePicker = ({ fullIso = true, ...props }) => {
|
|
177
175
|
const formatDateValue = (dateValue) => {
|
|
178
176
|
if (dateValue === null) return null;
|
|
179
177
|
if (fullIso) return DateTimeUtils.fromCalendarDateTimeToUTCISO(dateValue);
|
|
@@ -184,7 +182,7 @@ const DateTimePicker = ({ fullIso = true,...props }) => {
|
|
|
184
182
|
return DateTimeUtils.fromUTCISOToCalendarDateTime(isoString);
|
|
185
183
|
};
|
|
186
184
|
if ("formControl" in props && props.formControl) {
|
|
187
|
-
const { formControl, ref
|
|
185
|
+
const { formControl, ref, ...innerProps } = props;
|
|
188
186
|
return /* @__PURE__ */ jsx(Controller, {
|
|
189
187
|
control: formControl.control,
|
|
190
188
|
name: formControl.name,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { UIConfig } from "
|
|
2
|
-
import { TimePickerForm } from "
|
|
3
|
-
import { DateTimeDialog } from "
|
|
4
|
-
import { DateTimeDialogFooter } from "
|
|
5
|
-
import { FormField } from "
|
|
6
|
-
import { TooltipWrapper } from "
|
|
7
|
-
import { DateTimeUtils } from "
|
|
8
|
-
import { TimePickerInput } from "
|
|
1
|
+
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
|
+
import { TimePickerForm } from "../shared/TimePickerForm.js";
|
|
3
|
+
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
4
|
+
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
5
|
+
import { FormField } from "../../FormField/FormField.js";
|
|
6
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
7
|
+
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
8
|
+
import { TimePickerInput } from "../shared/TimePickerInput.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useEffect, useRef, useState } from "react";
|
|
11
11
|
import { useLocale, useTimeField } from "react-aria";
|
|
@@ -16,7 +16,7 @@ import { DateTime } from "luxon";
|
|
|
16
16
|
import { useTimeFieldState } from "react-stately";
|
|
17
17
|
var TimePickerBase = (props) => {
|
|
18
18
|
const ui = UIConfig.useConfig();
|
|
19
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, placeholder, variant = ui.input.variant, as = ui.input.as, size = ui.input.size, hideLabel = ui.input.hideLabel, isClearable = ui.input.isClearable, disableManualEntry = ui.dateInput.disableManualEntry
|
|
19
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, value, disableDropdown, placeholder, variant = ui.input.variant, as = ui.input.as, size = ui.input.size, hideLabel = ui.input.hideLabel, isClearable = ui.input.isClearable, disableManualEntry = ui.dateInput.disableManualEntry, ...rest } = props;
|
|
20
20
|
const formFieldProps = {
|
|
21
21
|
error,
|
|
22
22
|
label,
|
|
@@ -134,7 +134,7 @@ const TimePicker = (props) => {
|
|
|
134
134
|
return toTime(DateTimeUtils.fromISOtoZonedDateTime(isoString));
|
|
135
135
|
};
|
|
136
136
|
if ("formControl" in props && props.formControl) {
|
|
137
|
-
const { formControl, ref
|
|
137
|
+
const { formControl, ref, ...innerProps } = props;
|
|
138
138
|
return /* @__PURE__ */ jsx(Controller, {
|
|
139
139
|
control: formControl.control,
|
|
140
140
|
name: formControl.name,
|
|
@@ -7,7 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { useState } from "react";
|
|
9
9
|
import { useCalendar } from "@react-aria/calendar";
|
|
10
|
-
const Calendar = ({ className, includesTime, datePickerState, hourCycle, onApply
|
|
10
|
+
const Calendar = ({ className, includesTime, datePickerState, hourCycle, onApply, ...props }) => {
|
|
11
11
|
const [toggleState, setToggleState] = useState(null);
|
|
12
12
|
const { calendarProps, prevButtonProps, nextButtonProps } = useCalendar(props.calendarProps, props.state);
|
|
13
13
|
const handleDateChange = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Typography } from "
|
|
1
|
+
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { useCallback, useMemo, useRef } from "react";
|
|
@@ -9,7 +9,7 @@ import { useFocusRing } from "@react-aria/focus";
|
|
|
9
9
|
var isRange = (state) => {
|
|
10
10
|
return "highlightedRange" in state;
|
|
11
11
|
};
|
|
12
|
-
const CalendarCell = ({ state, onApply, shouldCloseOnSelect = true, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation
|
|
12
|
+
const CalendarCell = ({ state, onApply, shouldCloseOnSelect = true, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, ...props }) => {
|
|
13
13
|
const ref = useRef(null);
|
|
14
14
|
const { cellProps, buttonProps, formattedDate, isSelected, isDisabled, isOutsideVisibleRange } = useCalendarCell(props, state, ref);
|
|
15
15
|
const { focusProps } = useFocusRing();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Typography } from "
|
|
1
|
+
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
2
|
import { CalendarCell } from "./CalendarCell.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { clsx } from "clsx";
|
|
@@ -11,7 +11,7 @@ var WEEK_INDICES = [
|
|
|
11
11
|
4,
|
|
12
12
|
5
|
|
13
13
|
];
|
|
14
|
-
const CalendarGrid = ({ state, onApply, shouldCloseOnSelect, offset = {}, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, className, calendarSide
|
|
14
|
+
const CalendarGrid = ({ state, onApply, shouldCloseOnSelect, offset = {}, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, className, calendarSide, ...props }) => {
|
|
15
15
|
const { gridProps, headerProps, weekDays } = useCalendarGrid({
|
|
16
16
|
...props,
|
|
17
17
|
weekdayStyle: "short"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ArrowDropDownIcon } from "
|
|
2
|
-
import { ArrowDropUpIcon } from "
|
|
3
|
-
import { ChevronLeftIcon } from "
|
|
4
|
-
import { ChevronRightIcon } from "
|
|
5
|
-
import { PillButton } from "
|
|
1
|
+
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
|
+
import { ArrowDropUpIcon } from "../../../../assets/icons/ArrowDropUp.js";
|
|
3
|
+
import { ChevronLeftIcon } from "../../../../assets/icons/ChevronLeft.js";
|
|
4
|
+
import { ChevronRightIcon } from "../../../../assets/icons/ChevronRight.js";
|
|
5
|
+
import { PillButton } from "../../../buttons/PillButton/PillButton.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { Button, ToggleButtonGroup } from "react-aria-components";
|
package/dist/{CalendarSelectHeader.js → components/inputs/DateTime/shared/CalendarSelectHeader.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ArrowDropDownIcon } from "
|
|
2
|
-
import { ChevronLeftIcon } from "
|
|
3
|
-
import { ChevronRightIcon } from "
|
|
4
|
-
import { ChevronsLeftIcon } from "
|
|
5
|
-
import { ChevronsRightIcon } from "
|
|
6
|
-
import { InlineIconButton } from "
|
|
7
|
-
import { PillButton } from "
|
|
8
|
-
import { ns } from "
|
|
9
|
-
import { Select } from "
|
|
1
|
+
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
|
+
import { ChevronLeftIcon } from "../../../../assets/icons/ChevronLeft.js";
|
|
3
|
+
import { ChevronRightIcon } from "../../../../assets/icons/ChevronRight.js";
|
|
4
|
+
import { ChevronsLeftIcon } from "../../../../assets/icons/ChevronsLeft.js";
|
|
5
|
+
import { ChevronsRightIcon } from "../../../../assets/icons/ChevronsRight.js";
|
|
6
|
+
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
7
|
+
import { PillButton } from "../../../buttons/PillButton/PillButton.js";
|
|
8
|
+
import { ns } from "../../../../config/i18n.js";
|
|
9
|
+
import { Select } from "../../Selection/Select/Select.js";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useMemo } from "react";
|
|
12
12
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
@@ -5,7 +5,7 @@ import { useEffect, useImperativeHandle, useRef } from "react";
|
|
|
5
5
|
import { useDateField, useLocale } from "react-aria";
|
|
6
6
|
import { createCalendar } from "@internationalized/date";
|
|
7
7
|
import { useDateFieldState } from "react-stately";
|
|
8
|
-
const DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry
|
|
8
|
+
const DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, ...props }) => {
|
|
9
9
|
const { locale } = useLocale();
|
|
10
10
|
const state = useDateFieldState({
|
|
11
11
|
...props,
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { CalendarIcon } from "
|
|
2
|
-
import { DateTimeIcon } from "
|
|
3
|
-
import { UIStyle } from "
|
|
4
|
-
import { Typography } from "
|
|
5
|
-
import { IconButton } from "
|
|
6
|
-
import { InlineIconButton } from "
|
|
7
|
-
import { TodayIcon } from "
|
|
1
|
+
import { CalendarIcon } from "../../../../assets/icons/Calendar.js";
|
|
2
|
+
import { DateTimeIcon } from "../../../../assets/icons/DateTime.js";
|
|
3
|
+
import { UIStyle } from "../../../../config/uiStyle.context.js";
|
|
4
|
+
import { Typography } from "../../../text/Typography/Typography.js";
|
|
5
|
+
import { IconButton } from "../../../buttons/IconButton/IconButton.js";
|
|
6
|
+
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
7
|
+
import { TodayIcon } from "../../../../assets/icons/Today.js";
|
|
8
8
|
import { DateField } from "./DateField.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
10
|
+
import { InputClear } from "../../shared/InputClear.js";
|
|
11
|
+
import { inputBase, inputSize } from "../../shared/input.cva.js";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { clsx } from "clsx";
|
|
14
|
-
import { useCallback, useImperativeHandle,
|
|
14
|
+
import { useCallback, useImperativeHandle, useRef, useState } from "react";
|
|
15
15
|
import { Button } from "react-aria-components";
|
|
16
16
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
17
17
|
import { getLocalTimeZone, now, toCalendarDateTime, today } from "@internationalized/date";
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const inputSideCva = UIStyle.useConfig()?.input?.sideCva ?? inputSide;
|
|
18
|
+
const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, isDirty, isRequired, disableManualEntry, placeholder, onOpenDropdown, ...props }) => {
|
|
19
|
+
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
20
|
+
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
22
21
|
const [canClear, setCanClear] = useState(false);
|
|
23
22
|
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
24
23
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -33,8 +32,6 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, butto
|
|
|
33
32
|
const dateFieldRef = useRef(null);
|
|
34
33
|
const endDateFieldRef = useRef(null);
|
|
35
34
|
const containerRef = useRef(null);
|
|
36
|
-
const [labelContentRef, { width: labelWidth }] = useMeasure();
|
|
37
|
-
const [trailingContentRef, { width: trailingWidth }] = useMeasure();
|
|
38
35
|
useImperativeHandle(ref, () => ({
|
|
39
36
|
clear: () => {
|
|
40
37
|
dateFieldRef.current?.clearField();
|
|
@@ -66,30 +63,11 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, butto
|
|
|
66
63
|
}
|
|
67
64
|
};
|
|
68
65
|
const hidePlaceholder = as === "floating" && !fieldProps.value && !isFocused;
|
|
69
|
-
const style = useMemo(() => {
|
|
70
|
-
return {
|
|
71
|
-
paddingLeft: as === "filter" ? `calc(var(${inputSideCva({
|
|
72
|
-
size,
|
|
73
|
-
type: "var"
|
|
74
|
-
})}) + ${labelWidth}px)` : "0px",
|
|
75
|
-
paddingRight: `calc(var(${inputSideCva({
|
|
76
|
-
size,
|
|
77
|
-
type: "var"
|
|
78
|
-
})}) + ${trailingWidth}px)`
|
|
79
|
-
};
|
|
80
|
-
}, [
|
|
81
|
-
labelWidth,
|
|
82
|
-
trailingWidth,
|
|
83
|
-
as,
|
|
84
|
-
size,
|
|
85
|
-
inputSideCva
|
|
86
|
-
]);
|
|
87
66
|
return /* @__PURE__ */ jsxs("div", {
|
|
88
67
|
ref: containerRef,
|
|
89
|
-
className:
|
|
68
|
+
className: inputBaseCva({
|
|
90
69
|
variant,
|
|
91
70
|
as,
|
|
92
|
-
size,
|
|
93
71
|
...props,
|
|
94
72
|
className: clsx("group/date-picker-content relative flex min-w-input-width-min-width items-center justify-between gap-2")
|
|
95
73
|
}),
|
|
@@ -107,63 +85,70 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, butto
|
|
|
107
85
|
...groupProps,
|
|
108
86
|
...focusWithinProps,
|
|
109
87
|
...hoverProps,
|
|
110
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
88
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
89
|
+
className: clsx(inputSizeCva({
|
|
90
|
+
size,
|
|
91
|
+
as
|
|
92
|
+
}), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!"),
|
|
93
|
+
children: [as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
94
|
+
as,
|
|
95
|
+
...headerProps
|
|
96
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
97
|
+
className: "flex items-center gap-input-gap-input-text-to-elements",
|
|
98
|
+
children: [
|
|
99
|
+
disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
100
|
+
onPress: onOpenDropdown,
|
|
101
|
+
className: "absolute inset-0 z-0",
|
|
102
|
+
isDisabled
|
|
103
|
+
}),
|
|
104
|
+
todayIcon && /* @__PURE__ */ jsx(IconButton, {
|
|
105
|
+
label: "",
|
|
106
|
+
icon: TodayIcon,
|
|
107
|
+
size: "none",
|
|
108
|
+
onPress: onToday,
|
|
109
|
+
className: "relative z-1"
|
|
110
|
+
}),
|
|
111
|
+
disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
|
|
112
|
+
size: "label-1",
|
|
113
|
+
className: "text-text-default-3",
|
|
114
|
+
children: placeholder
|
|
115
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateField, {
|
|
116
|
+
ref: dateFieldRef,
|
|
117
|
+
...fieldProps,
|
|
118
|
+
isDisabled,
|
|
119
|
+
isInvalid,
|
|
120
|
+
onClearChange,
|
|
121
|
+
hidePlaceholder,
|
|
122
|
+
disableManualEntry
|
|
123
|
+
}), endFieldProps && /* @__PURE__ */ jsxs(Fragment, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
|
|
124
|
+
className: clsx("pointer-events-none select-none", isDisabled && "text-interactive-text-secondary-disabled"),
|
|
125
|
+
children: "–"
|
|
126
|
+
}), /* @__PURE__ */ jsx(DateField, {
|
|
127
|
+
ref: endDateFieldRef,
|
|
128
|
+
...endFieldProps,
|
|
129
|
+
isDisabled,
|
|
130
|
+
isInvalid,
|
|
131
|
+
onClearChange,
|
|
132
|
+
hidePlaceholder,
|
|
133
|
+
disableManualEntry
|
|
134
|
+
})] })] })
|
|
135
|
+
]
|
|
136
|
+
})]
|
|
114
137
|
}), /* @__PURE__ */ jsxs("div", {
|
|
115
|
-
className:
|
|
116
|
-
style,
|
|
117
|
-
children: [
|
|
118
|
-
disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
119
|
-
onPress: onOpenDropdown,
|
|
120
|
-
className: "absolute inset-0 z-0",
|
|
121
|
-
isDisabled
|
|
122
|
-
}),
|
|
123
|
-
todayIcon && /* @__PURE__ */ jsx(IconButton, {
|
|
124
|
-
label: "",
|
|
125
|
-
icon: TodayIcon,
|
|
126
|
-
size: "none",
|
|
127
|
-
onPress: onToday,
|
|
128
|
-
className: "relative z-1"
|
|
129
|
-
}),
|
|
130
|
-
disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
|
|
131
|
-
size: "label-1",
|
|
132
|
-
className: "text-text-default-3",
|
|
133
|
-
children: placeholder
|
|
134
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateField, {
|
|
135
|
-
ref: dateFieldRef,
|
|
136
|
-
...fieldProps,
|
|
137
|
-
isDisabled,
|
|
138
|
-
isInvalid,
|
|
139
|
-
onClearChange,
|
|
140
|
-
hidePlaceholder,
|
|
141
|
-
disableManualEntry
|
|
142
|
-
}), endFieldProps && /* @__PURE__ */ jsxs(Fragment, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
|
|
143
|
-
className: clsx("pointer-events-none select-none", isDisabled && "text-interactive-text-secondary-disabled"),
|
|
144
|
-
children: "–"
|
|
145
|
-
}), /* @__PURE__ */ jsx(DateField, {
|
|
146
|
-
ref: endDateFieldRef,
|
|
147
|
-
...endFieldProps,
|
|
148
|
-
isDisabled,
|
|
149
|
-
isInvalid,
|
|
150
|
-
onClearChange,
|
|
151
|
-
hidePlaceholder,
|
|
152
|
-
disableManualEntry
|
|
153
|
-
})] })] })
|
|
154
|
-
]
|
|
155
|
-
})] }), /* @__PURE__ */ jsxs("div", {
|
|
156
|
-
ref: trailingContentRef,
|
|
157
|
-
className: clsx("absolute top-1/2 flex -translate-y-1/2 items-center gap-2", inputSideCva({
|
|
138
|
+
className: clsx(inputSizeCva({
|
|
158
139
|
size,
|
|
159
|
-
|
|
160
|
-
})),
|
|
161
|
-
children: [isClearable &&
|
|
140
|
+
as
|
|
141
|
+
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!"),
|
|
142
|
+
children: [isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
143
|
+
onClear,
|
|
144
|
+
show: canClear
|
|
145
|
+
}), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
162
146
|
label: "",
|
|
163
147
|
color: "secondary",
|
|
164
148
|
...buttonProps,
|
|
165
149
|
icon: isDateTime ? DateTimeIcon : CalendarIcon,
|
|
166
|
-
isDisabled
|
|
150
|
+
isDisabled,
|
|
151
|
+
className: "border-0!"
|
|
167
152
|
})]
|
|
168
153
|
})]
|
|
169
154
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BottomSheet } from "
|
|
2
|
-
import { useBreakpoint } from "
|
|
3
|
-
import { FormFieldHeader } from "
|
|
4
|
-
import { FormFieldHeaderClose } from "
|
|
1
|
+
import { BottomSheet } from "../../../overlays/BottomSheet/BottomSheet.js";
|
|
2
|
+
import { useBreakpoint } from "../../../../hooks/useBreakpoint.js";
|
|
3
|
+
import { FormFieldHeader } from "../../FormField/FormFieldHeader.js";
|
|
4
|
+
import { FormFieldHeaderClose } from "../../FormField/FormFieldHeaderClose.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Dialog, Popover } from "react-aria-components";
|
|
7
7
|
const DateTimeDialog = ({ hideSidebar, children, footer, sidebar, label, isOpen, triggerRef, dialogProps, onOpenChange }) => {
|
package/dist/{DateTimeDialogFooter.js → components/inputs/DateTime/shared/DateTimeDialogFooter.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TextButton } from "
|
|
2
|
-
import { ns } from "
|
|
1
|
+
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
2
|
+
import { ns } from "../../../../config/i18n.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|