@povio/ui 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +21 -0
- package/dist/assets/icons/AlignLeft.js +21 -0
- package/dist/assets/icons/AlignLeftRight.js +21 -0
- package/dist/assets/icons/AlignRight.js +21 -0
- package/dist/assets/icons/ArrowDropDown.js +21 -0
- package/dist/assets/icons/ArrowDropUp.js +21 -0
- package/dist/assets/icons/ArrowLeft.js +21 -0
- package/dist/assets/icons/ArrowRight.js +21 -0
- package/dist/assets/icons/Bold.js +21 -0
- package/dist/assets/icons/BulletedList.js +21 -0
- package/dist/assets/icons/Calendar.js +23 -0
- package/dist/assets/icons/Check.js +23 -0
- package/dist/assets/icons/CheckCircle.js +21 -0
- package/dist/assets/icons/CheckboxCheckmark.js +24 -0
- package/dist/assets/icons/CheckboxIndeterminate.js +24 -0
- package/dist/assets/icons/ChevronDown.js +23 -0
- package/dist/assets/icons/ChevronLeft.js +23 -0
- package/dist/assets/icons/ChevronRight.js +23 -0
- package/dist/assets/icons/ChevronUp.js +23 -0
- package/dist/assets/icons/ChevronsLeft.js +23 -0
- package/dist/assets/icons/ChevronsRight.js +23 -0
- package/dist/assets/icons/Clock.js +21 -0
- package/dist/assets/icons/Close.js +21 -0
- package/dist/assets/icons/DateTime.js +32 -0
- package/dist/assets/icons/Drag.js +21 -0
- package/dist/assets/icons/File.js +23 -0
- package/dist/assets/icons/Highlight.js +21 -0
- package/dist/assets/icons/HighlightOn.js +30 -0
- package/dist/assets/icons/Info.js +32 -0
- package/dist/assets/icons/Italic.js +21 -0
- package/dist/assets/icons/Link.js +21 -0
- package/dist/assets/icons/Menu.js +21 -0
- package/dist/assets/icons/NumberedList.js +21 -0
- package/dist/assets/icons/PointerHorizontal.js +21 -0
- package/dist/assets/icons/PointerVertical.js +21 -0
- package/dist/assets/icons/Send.js +23 -0
- package/dist/assets/icons/Strikethrough.js +21 -0
- package/dist/assets/icons/TextColor.js +30 -0
- package/dist/assets/icons/Today.js +21 -0
- package/dist/assets/icons/Underlined.js +23 -0
- package/dist/assets/icons/Upload.js +30 -0
- package/dist/assets/icons/View.js +18 -0
- package/dist/assets/icons/ViewOff.js +18 -0
- package/dist/assets/icons/WarningFilled.js +23 -0
- package/dist/assets/locales/en/translation.json.js +14 -0
- package/dist/assets/locales/sl/translation.json.js +14 -0
- package/dist/components/Menu/Menu.js +14 -0
- package/{src → dist}/components/Menu/MenuDesktop.d.ts +1 -1
- package/dist/components/Menu/MenuDesktop.js +68 -0
- package/{src → dist}/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Menu/MenuItem.js +33 -0
- package/{src → dist}/components/Menu/MenuMobile.d.ts +1 -1
- package/dist/components/Menu/MenuMobile.js +78 -0
- package/{src → dist}/components/Menu/MenuPopover.d.ts +1 -1
- package/dist/components/Menu/MenuPopover.js +38 -0
- package/{src → dist}/components/buttons/Button/Button.d.ts +1 -1
- package/dist/components/buttons/Button/Button.js +68 -0
- package/{src → dist}/components/buttons/Button/button.cva.d.ts +1 -1
- package/dist/components/buttons/Button/button.cva.js +672 -0
- package/{src → dist}/components/buttons/IconButton/IconButton.d.ts +1 -1
- package/dist/components/buttons/IconButton/IconButton.js +17 -0
- package/{src → dist}/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +18 -0
- package/{src → dist}/components/buttons/PillButton/PillButton.d.ts +2 -2
- package/dist/components/buttons/PillButton/PillButton.js +44 -0
- package/{src → dist}/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/PillButton/pillButton.cva.js +86 -0
- package/{src → dist}/components/buttons/SplitButton/SplitButton.d.ts +2 -2
- package/dist/components/buttons/SplitButton/SplitButton.js +62 -0
- package/{src → dist}/components/buttons/TextButton/TextButton.d.ts +3 -3
- package/dist/components/buttons/TextButton/TextButton.js +18 -0
- package/{src → dist}/components/buttons/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/components/buttons/ToggleButton/ToggleButton.js +21 -0
- package/{src → dist}/components/buttons/shared/ButtonContent.d.ts +3 -3
- package/dist/components/buttons/shared/ButtonContent.js +53 -0
- package/dist/components/buttons/shared/buttonContent.cva.js +16 -0
- package/{src → dist}/components/inputs/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/inputs/Checkbox/Checkbox.js +81 -0
- package/{src → dist}/components/inputs/Checkbox/CheckboxCheckmark.d.ts +1 -1
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +49 -0
- package/{src → dist}/components/inputs/Checkbox/checkbox.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/checkbox.cva.js +47 -0
- package/{src → dist}/components/inputs/DateTime/DatePicker/DatePicker.d.ts +3 -3
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +237 -0
- package/{src → dist}/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +674 -0
- package/{src → dist}/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +3 -3
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +251 -0
- package/{src → dist}/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +224 -0
- package/dist/components/inputs/DateTime/shared/Calendar.js +85 -0
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +160 -0
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +67 -0
- package/{src → dist}/components/inputs/DateTime/shared/CalendarHeader.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +89 -0
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +203 -0
- package/dist/components/inputs/DateTime/shared/DateField.js +62 -0
- package/{src → dist}/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +174 -0
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +55 -0
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +76 -0
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +41 -0
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +82 -0
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +131 -0
- package/dist/components/inputs/DateTime/shared/TimeField.js +26 -0
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +186 -0
- package/{src → dist}/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +114 -0
- package/dist/components/inputs/DateTime/shared/YearPicker.js +89 -0
- package/dist/components/inputs/File/FileUpload.js +254 -0
- package/dist/components/inputs/File/FileUploadContainer.js +17 -0
- package/dist/components/inputs/File/InputUpload.js +176 -0
- package/{src → dist}/components/inputs/File/fileUpload.types.d.ts +3 -3
- package/{src → dist}/components/inputs/File/inputUpload.types.d.ts +2 -2
- package/{src → dist}/components/inputs/File/shared/FileCard.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +67 -0
- package/{src → dist}/components/inputs/File/shared/FileCardList.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCardList.js +20 -0
- package/dist/components/inputs/File/shared/FileProgressBar.js +32 -0
- package/{src → dist}/components/inputs/File/shared/FileUploadContent.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileUploadContent.js +92 -0
- package/{src → dist}/components/inputs/File/shared/FileUploadContentEmpty.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +92 -0
- package/{src → dist}/components/inputs/File/shared/FileUploadContentError.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentError.js +167 -0
- package/{src → dist}/components/inputs/File/shared/FileUploadContentFilled.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +176 -0
- package/{src → dist}/components/inputs/File/shared/FileUploadContentLoading.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +128 -0
- package/{src → dist}/components/inputs/File/shared/InputUploadContent.d.ts +1 -1
- package/dist/components/inputs/File/shared/InputUploadContent.js +74 -0
- package/dist/components/inputs/File/shared/InputUploadFilled.js +45 -0
- package/dist/components/inputs/File/shared/fileUpload.cva.js +58 -0
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +49 -0
- package/{src → dist}/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +54 -0
- package/dist/components/inputs/FormField/FormFieldError.js +16 -0
- package/dist/components/inputs/FormField/FormFieldHeader.js +57 -0
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +20 -0
- package/{src → dist}/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +37 -0
- package/{src → dist}/components/inputs/Input/NumberInput/NumberInput.d.ts +4 -4
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +157 -0
- package/{src → dist}/components/inputs/Input/PasswordInput/PasswordInput.d.ts +2 -2
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +26 -0
- package/{src → dist}/components/inputs/Input/TextArea/TextArea.d.ts +3 -3
- package/dist/components/inputs/Input/TextArea/TextArea.js +146 -0
- package/{src → dist}/components/inputs/Input/TextInput/TextInput.d.ts +4 -4
- package/dist/components/inputs/Input/TextInput/TextInput.js +170 -0
- package/{src → dist}/components/inputs/Input/shared/InputContent.d.ts +3 -3
- package/dist/components/inputs/Input/shared/InputContent.js +114 -0
- package/{src → dist}/components/inputs/Inputs/Form.d.ts +2 -2
- package/dist/components/inputs/Inputs/Form.js +68 -0
- package/{src → dist}/components/inputs/Inputs/InputItem.d.ts +16 -16
- package/dist/components/inputs/Inputs/InputItem.js +63 -0
- package/dist/components/inputs/Inputs/Inputs.js +32 -0
- package/{src → dist}/components/inputs/RadioGroup/RadioGroup.d.ts +3 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +113 -0
- package/{src → dist}/components/inputs/RadioGroup/radio.cva.d.ts +1 -1
- package/dist/components/inputs/RadioGroup/radio.cva.js +47 -0
- package/{src → dist}/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +3 -3
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +39 -0
- package/{src → dist}/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +25 -0
- package/{src → dist}/components/inputs/Selection/Select/Select.d.ts +3 -3
- package/dist/components/inputs/Selection/Select/Select.js +32 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectBase.d.ts +3 -3
- package/dist/components/inputs/Selection/shared/SelectBase.js +25 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +211 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectInput.d.ts +4 -4
- package/dist/components/inputs/Selection/shared/SelectInput.js +231 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectInputTags.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +22 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +108 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectListBoxItem.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +78 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +45 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +47 -0
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +42 -0
- package/{src → dist}/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +161 -0
- package/{src → dist}/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +244 -0
- package/{src → dist}/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/{src → dist}/components/inputs/Selection/shared/useSelectItems.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/useSelectItems.js +94 -0
- package/{src → dist}/components/inputs/Slider/Slider.d.ts +2 -2
- package/dist/components/inputs/Slider/Slider.js +137 -0
- package/{src → dist}/components/inputs/TextEditor/TextEditor.d.ts +2 -2
- package/dist/components/inputs/TextEditor/TextEditor.js +223 -0
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +34 -0
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +80 -0
- package/{src → dist}/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +92 -0
- package/{src → dist}/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +56 -0
- package/{src → dist}/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +33 -0
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +31 -0
- package/{src → dist}/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +37 -0
- package/{src → dist}/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +51 -0
- package/{src → dist}/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +73 -0
- package/{src → dist}/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +61 -0
- package/dist/components/inputs/TextEditor/textEditor.types.js +40 -0
- package/{src → dist}/components/inputs/Toggle/Toggle.d.ts +3 -3
- package/dist/components/inputs/Toggle/Toggle.js +65 -0
- package/{src → dist}/components/inputs/Toggle/toggle.cva.d.ts +1 -1
- package/dist/components/inputs/Toggle/toggle.cva.js +44 -0
- package/{src → dist}/components/inputs/shared/CheckContent.d.ts +1 -1
- package/dist/components/inputs/shared/CheckContent.js +22 -0
- package/dist/components/inputs/shared/InputClear.js +27 -0
- package/dist/components/inputs/shared/input.cva.js +168 -0
- package/{src → dist}/components/inputs/shared/label.cva.d.ts +1 -1
- package/dist/components/inputs/shared/label.cva.js +133 -0
- package/dist/components/outline.clsx.js +11 -0
- package/{src → dist}/components/overlays/ActionModal/ActionModal.d.ts +2 -2
- package/dist/components/overlays/ActionModal/ActionModal.js +80 -0
- package/dist/components/overlays/BottomSheet/BottomSheet.js +261 -0
- package/dist/components/overlays/Drawer/Drawer.js +84 -0
- package/{src → dist}/components/overlays/Modal/Modal.d.ts +1 -1
- package/dist/components/overlays/Modal/Modal.js +53 -0
- package/dist/components/overlays/Modal/modal.cva.js +53 -0
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +71 -0
- package/{src → dist}/components/overlays/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +70 -0
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +27 -0
- package/dist/components/overlays/Tooltip/tooltip.cva.js +60 -0
- package/dist/components/segment/Segment.js +119 -0
- package/dist/components/segment/SegmentItem.js +43 -0
- package/{src → dist}/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +75 -0
- package/{src → dist}/components/shared/pagination/PaginationList.d.ts +1 -1
- package/dist/components/shared/pagination/PaginationList.js +145 -0
- package/dist/components/shared/pagination/minWidth.cva.js +15 -0
- package/{src → dist}/components/status/Alert/Alert.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +41 -0
- package/dist/components/status/Alert/alert.cva.js +64 -0
- package/{src → dist}/components/status/Loader/Loader.d.ts +1 -1
- package/dist/components/status/Loader/Loader.js +37 -0
- package/dist/components/status/Loader/loader.cva.js +27 -0
- package/{src → dist}/components/status/Toast/Toast.d.ts +1 -1
- package/dist/components/status/Toast/Toast.js +64 -0
- package/{src → dist}/components/status/Toast/toast.cva.d.ts +1 -1
- package/dist/components/status/Toast/toast.cva.js +150 -0
- package/dist/components/status/Toast/useToast.js +83 -0
- package/dist/components/status/shared/status.cva.js +62 -0
- package/dist/components/table/CellText.js +18 -0
- package/dist/components/table/ColumnConfig.js +124 -0
- package/dist/components/table/HeaderText.js +15 -0
- package/dist/components/table/InfiniteTable.js +40 -0
- package/dist/components/table/PaginatedTable.js +33 -0
- package/dist/components/table/Table.js +370 -0
- package/dist/components/table/table.cva.js +63 -0
- package/{src → dist}/components/text/Link/Link.d.ts +1 -1
- package/dist/components/text/Link/Link.js +18 -0
- package/dist/components/text/Link/link.cva.js +18 -0
- package/{src → dist}/components/text/Tag/Tag.d.ts +1 -1
- package/dist/components/text/Tag/Tag.js +49 -0
- package/dist/components/text/Tag/tag.cva.js +59 -0
- package/{src → dist}/components/text/Typography/Typography.d.ts +1 -1
- package/dist/components/text/Typography/Typography.js +22 -0
- package/dist/components/text/Typography/typography.cva.js +100 -0
- package/{src → dist}/config/confirmation.context.d.ts +1 -1
- package/dist/config/confirmation.context.js +107 -0
- package/dist/config/i18n.js +15 -0
- package/dist/config/router.context.js +43 -0
- package/{src → dist}/config/uiConfig.context.d.ts +8 -8
- package/dist/config/uiConfig.context.js +67 -0
- package/{src → dist}/config/uiStyle.context.d.ts +14 -14
- package/dist/config/uiStyle.context.js +16 -0
- package/dist/helpers/dynamicColumns.js +359 -0
- package/{src → dist}/helpers/dynamicInputs.d.ts +2 -2
- package/dist/helpers/dynamicInputs.js +216 -0
- package/dist/hooks/useAutosave.js +83 -0
- package/dist/hooks/useBreakpoint.js +20 -0
- package/dist/hooks/useDebounceCallback.js +29 -0
- package/dist/hooks/useDeepCompare.js +25 -0
- package/dist/hooks/useFilters.js +120 -0
- package/dist/hooks/useForm.js +22 -0
- package/{src → dist}/hooks/useFormAutosave.d.ts +2 -2
- package/dist/hooks/useFormAutosave.js +67 -0
- package/dist/hooks/useIntersectionObserver.js +27 -0
- package/dist/hooks/useLocalStorage.js +63 -0
- package/dist/hooks/useLongPressRepeat.js +33 -0
- package/dist/hooks/usePagination.js +35 -0
- package/dist/hooks/useScrollableListBox.js +30 -0
- package/dist/hooks/useSorting.js +30 -0
- package/dist/hooks/useStateAndRef.js +17 -0
- package/dist/hooks/useTableColumnConfig.js +63 -0
- package/dist/hooks/useTableNav.js +409 -0
- package/dist/hooks/useTranslationMemo.js +14 -0
- package/dist/index.js +284 -0
- package/{src → dist}/types/react-query.d.ts +1 -1
- package/dist/utils/array.utils.js +12 -0
- package/dist/utils/compoundMapper.js +14 -0
- package/dist/utils/date-time.utils.js +77 -0
- package/dist/utils/date.utils.js +12 -0
- package/dist/utils/dom.utils.js +13 -0
- package/dist/utils/file.utils.js +63 -0
- package/dist/utils/isEqual.js +95 -0
- package/dist/utils/logger.js +19 -0
- package/dist/utils/object.utils.js +53 -0
- package/dist/utils/queries.utils.js +9 -0
- package/dist/utils/rest.utils.js +51 -0
- package/dist/utils/routing.utils.js +15 -0
- package/dist/utils/string.utils.js +12 -0
- package/{src → dist}/utils/vendor/acl/AclGuard.d.ts +1 -1
- package/dist/utils/vendor/acl/AclGuard.js +15 -0
- package/dist/utils/vendor/acl/Can.js +18 -0
- package/dist/utils/vendor/acl/ability.context.js +37 -0
- package/dist/utils/vendor/auth/AuthGuard.js +26 -0
- package/dist/utils/vendor/auth/auth.context.js +36 -0
- package/{src → dist}/utils/vendor/auth/withPrivateAuthGuard.d.ts +1 -1
- package/dist/utils/vendor/auth/withPrivateAuthGuard.js +17 -0
- package/dist/utils/vendor/error-handling.js +119 -0
- package/dist/utils/vendor/rest-interceptor.js +21 -0
- package/dist/utils/zod.utils.js +25 -0
- package/package.json +57 -5
- package/index.js +0 -62585
- package/povio-ui-0.0.8.tgz +0 -0
- package/vite.config.d.ts +0 -2
- /package/{src → dist}/assets/icons/AlignCenter.d.ts +0 -0
- /package/{src → dist}/assets/icons/AlignLeft.d.ts +0 -0
- /package/{src → dist}/assets/icons/AlignLeftRight.d.ts +0 -0
- /package/{src → dist}/assets/icons/AlignRight.d.ts +0 -0
- /package/{src → dist}/assets/icons/ArrowDropDown.d.ts +0 -0
- /package/{src → dist}/assets/icons/ArrowDropUp.d.ts +0 -0
- /package/{src → dist}/assets/icons/ArrowLeft.d.ts +0 -0
- /package/{src → dist}/assets/icons/ArrowRight.d.ts +0 -0
- /package/{src → dist}/assets/icons/Bold.d.ts +0 -0
- /package/{src → dist}/assets/icons/BulletedList.d.ts +0 -0
- /package/{src → dist}/assets/icons/Calendar.d.ts +0 -0
- /package/{src → dist}/assets/icons/Check.d.ts +0 -0
- /package/{src → dist}/assets/icons/CheckCircle.d.ts +0 -0
- /package/{src → dist}/assets/icons/CheckboxCheckmark.d.ts +0 -0
- /package/{src → dist}/assets/icons/CheckboxIndeterminate.d.ts +0 -0
- /package/{src → dist}/assets/icons/ChevronDown.d.ts +0 -0
- /package/{src → dist}/assets/icons/ChevronLeft.d.ts +0 -0
- /package/{src → dist}/assets/icons/ChevronRight.d.ts +0 -0
- /package/{src → dist}/assets/icons/ChevronUp.d.ts +0 -0
- /package/{src → dist}/assets/icons/ChevronsLeft.d.ts +0 -0
- /package/{src → dist}/assets/icons/ChevronsRight.d.ts +0 -0
- /package/{src → dist}/assets/icons/Clock.d.ts +0 -0
- /package/{src → dist}/assets/icons/Close.d.ts +0 -0
- /package/{src → dist}/assets/icons/DateTime.d.ts +0 -0
- /package/{src → dist}/assets/icons/Drag.d.ts +0 -0
- /package/{src → dist}/assets/icons/File.d.ts +0 -0
- /package/{src → dist}/assets/icons/Highlight.d.ts +0 -0
- /package/{src → dist}/assets/icons/HighlightOn.d.ts +0 -0
- /package/{src → dist}/assets/icons/Info.d.ts +0 -0
- /package/{src → dist}/assets/icons/Italic.d.ts +0 -0
- /package/{src → dist}/assets/icons/Link.d.ts +0 -0
- /package/{src → dist}/assets/icons/Menu.d.ts +0 -0
- /package/{src → dist}/assets/icons/NumberedList.d.ts +0 -0
- /package/{src → dist}/assets/icons/PointerHorizontal.d.ts +0 -0
- /package/{src → dist}/assets/icons/PointerVertical.d.ts +0 -0
- /package/{src → dist}/assets/icons/Send.d.ts +0 -0
- /package/{src → dist}/assets/icons/Strikethrough.d.ts +0 -0
- /package/{src → dist}/assets/icons/TextColor.d.ts +0 -0
- /package/{src → dist}/assets/icons/Today.d.ts +0 -0
- /package/{src → dist}/assets/icons/Underlined.d.ts +0 -0
- /package/{src → dist}/assets/icons/Upload.d.ts +0 -0
- /package/{src → dist}/assets/icons/View.d.ts +0 -0
- /package/{src → dist}/assets/icons/ViewOff.d.ts +0 -0
- /package/{src → dist}/assets/icons/WarningFilled.d.ts +0 -0
- /package/{src → dist}/components/Menu/Menu.d.ts +0 -0
- /package/{src → dist}/components/buttons/shared/buttonContent.cva.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/Calendar.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/DateField.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/TimeField.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -0
- /package/{src → dist}/components/inputs/DateTime/shared/YearPicker.d.ts +0 -0
- /package/{src → dist}/components/inputs/File/FileUpload.d.ts +0 -0
- /package/{src → dist}/components/inputs/File/FileUploadContainer.d.ts +0 -0
- /package/{src → dist}/components/inputs/File/InputUpload.d.ts +0 -0
- /package/{src → dist}/components/inputs/File/index.d.ts +0 -0
- /package/{src → dist}/components/inputs/File/shared/FileProgressBar.d.ts +0 -0
- /package/{src → dist}/components/inputs/File/shared/InputUploadFilled.d.ts +0 -0
- /package/{src → dist}/components/inputs/File/shared/fileUpload.cva.d.ts +0 -0
- /package/{src → dist}/components/inputs/File/shared/inputUploadButton.cva.d.ts +0 -0
- /package/{src → dist}/components/inputs/FormField/FormFieldError.d.ts +0 -0
- /package/{src → dist}/components/inputs/FormField/FormFieldHeader.d.ts +0 -0
- /package/{src → dist}/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -0
- /package/{src → dist}/components/inputs/Inputs/Inputs.d.ts +0 -0
- /package/{src → dist}/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -0
- /package/{src → dist}/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -0
- /package/{src → dist}/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -0
- /package/{src → dist}/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -0
- /package/{src → dist}/components/inputs/TextEditor/textEditor.types.d.ts +0 -0
- /package/{src → dist}/components/inputs/shared/InputClear.d.ts +0 -0
- /package/{src → dist}/components/inputs/shared/form.types.d.ts +0 -0
- /package/{src → dist}/components/inputs/shared/input.cva.d.ts +0 -0
- /package/{src → dist}/components/outline.clsx.d.ts +0 -0
- /package/{src → dist}/components/overlays/BottomSheet/BottomSheet.d.ts +0 -0
- /package/{src → dist}/components/overlays/Drawer/Drawer.d.ts +0 -0
- /package/{src → dist}/components/overlays/Modal/modal.cva.d.ts +0 -0
- /package/{src → dist}/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +0 -0
- /package/{src → dist}/components/overlays/Tooltip/TooltipEllipsis.d.ts +0 -0
- /package/{src → dist}/components/overlays/Tooltip/tooltip.cva.d.ts +0 -0
- /package/{src → dist}/components/segment/Segment.d.ts +0 -0
- /package/{src → dist}/components/segment/SegmentItem.d.ts +0 -0
- /package/{src → dist}/components/shared/pagination/Pagination.d.ts +0 -0
- /package/{src → dist}/components/shared/pagination/minWidth.cva.d.ts +0 -0
- /package/{src → dist}/components/status/Alert/alert.cva.d.ts +0 -0
- /package/{src → dist}/components/status/Loader/loader.cva.d.ts +0 -0
- /package/{src → dist}/components/status/Toast/useToast.d.ts +0 -0
- /package/{src → dist}/components/status/shared/status.cva.d.ts +0 -0
- /package/{src → dist}/components/table/CellText.d.ts +0 -0
- /package/{src → dist}/components/table/ColumnConfig.d.ts +0 -0
- /package/{src → dist}/components/table/HeaderText.d.ts +0 -0
- /package/{src → dist}/components/table/InfiniteTable.d.ts +0 -0
- /package/{src → dist}/components/table/PaginatedTable.d.ts +0 -0
- /package/{src → dist}/components/table/Table.d.ts +0 -0
- /package/{src → dist}/components/table/table.cva.d.ts +0 -0
- /package/{src → dist}/components/text/Link/link.cva.d.ts +0 -0
- /package/{src → dist}/components/text/Tag/tag.cva.d.ts +0 -0
- /package/{src → dist}/components/text/Typography/typography.cva.d.ts +0 -0
- /package/{src → dist}/config/i18n.d.ts +0 -0
- /package/{src → dist}/config/router.context.d.ts +0 -0
- /package/{src → dist}/helpers/dynamicColumns.d.ts +0 -0
- /package/{src → dist}/hooks/useAutosave.d.ts +0 -0
- /package/{src → dist}/hooks/useBreakpoint.d.ts +0 -0
- /package/{src → dist}/hooks/useDebounceCallback.d.ts +0 -0
- /package/{src → dist}/hooks/useDeepCompare.d.ts +0 -0
- /package/{src → dist}/hooks/useFilters.d.ts +0 -0
- /package/{src → dist}/hooks/useForm.d.ts +0 -0
- /package/{src → dist}/hooks/useIntersectionObserver.d.ts +0 -0
- /package/{src → dist}/hooks/useLocalStorage.d.ts +0 -0
- /package/{src → dist}/hooks/useLongPressRepeat.d.ts +0 -0
- /package/{src → dist}/hooks/usePagination.d.ts +0 -0
- /package/{src → dist}/hooks/useScrollableListBox.d.ts +0 -0
- /package/{src → dist}/hooks/useSorting.d.ts +0 -0
- /package/{src → dist}/hooks/useStateAndRef.d.ts +0 -0
- /package/{src → dist}/hooks/useTableColumnConfig.d.ts +0 -0
- /package/{src → dist}/hooks/useTableNav.d.ts +0 -0
- /package/{src → dist}/hooks/useTranslationMemo.d.ts +0 -0
- /package/{src → dist}/index.d.ts +0 -0
- /package/{styles → dist/styles}/editor.css +0 -0
- /package/{styles → dist/styles}/index.css +0 -0
- /package/{src → dist}/types/common.d.ts +0 -0
- /package/{src → dist}/utils/array.utils.d.ts +0 -0
- /package/{src → dist}/utils/array.utils.spec.d.ts +0 -0
- /package/{src → dist}/utils/compoundMapper.d.ts +0 -0
- /package/{src → dist}/utils/compoundMapper.spec.d.ts +0 -0
- /package/{src → dist}/utils/date-time.utils.d.ts +0 -0
- /package/{src → dist}/utils/date-time.utils.spec.d.ts +0 -0
- /package/{src → dist}/utils/date.utils.d.ts +0 -0
- /package/{src → dist}/utils/date.utils.spec.d.ts +0 -0
- /package/{src → dist}/utils/dom.utils.d.ts +0 -0
- /package/{src → dist}/utils/file.utils.d.ts +0 -0
- /package/{src → dist}/utils/isEqual.d.ts +0 -0
- /package/{src → dist}/utils/logger.d.ts +0 -0
- /package/{src → dist}/utils/object.utils.d.ts +0 -0
- /package/{src → dist}/utils/queries.utils.d.ts +0 -0
- /package/{src → dist}/utils/rest.utils.d.ts +0 -0
- /package/{src → dist}/utils/routing.utils.d.ts +0 -0
- /package/{src → dist}/utils/string.utils.d.ts +0 -0
- /package/{src → dist}/utils/vendor/acl/Can.d.ts +0 -0
- /package/{src → dist}/utils/vendor/acl/ability.context.d.ts +0 -0
- /package/{src → dist}/utils/vendor/acl/appAbility.types.d.ts +0 -0
- /package/{src → dist}/utils/vendor/auth/AuthGuard.d.ts +0 -0
- /package/{src → dist}/utils/vendor/auth/auth.context.d.ts +0 -0
- /package/{src → dist}/utils/vendor/error-handling.d.ts +0 -0
- /package/{src → dist}/utils/vendor/rest-client.types.d.ts +0 -0
- /package/{src → dist}/utils/vendor/rest-interceptor.d.ts +0 -0
- /package/{src → dist}/utils/zod.utils.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonProps as AriaButtonProps } from 'react-aria-components';
|
|
2
|
-
import { TagVariantProps } from '
|
|
2
|
+
import { TagVariantProps } from './tag.cva';
|
|
3
3
|
export interface TagProps extends TagVariantProps, AriaButtonProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
children: string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { Button } from "react-aria-components";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
6
|
+
import { TooltipEllipsis } from "../../overlays/Tooltip/TooltipEllipsis.js";
|
|
7
|
+
import { tag } from "./tag.cva.js";
|
|
8
|
+
import { Typography } from "../Typography/Typography.js";
|
|
9
|
+
import { ns } from "../../../config/i18n.js";
|
|
10
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
11
|
+
const Tag = ({ color, className, children, dismissable, isDisabled, onDismiss, ...props }) => {
|
|
12
|
+
const uiStyle = UIStyle.useConfig();
|
|
13
|
+
const tagCva = uiStyle?.tag?.cva ?? tag;
|
|
14
|
+
const { t } = useTranslation(ns);
|
|
15
|
+
const buttonProps = { isDisabled, onPress: onDismiss, label: t(($) => $.ui.tag.dismiss), ...props };
|
|
16
|
+
return /* @__PURE__ */ jsx(TooltipEllipsis, { text: children, children: (onContentRef) => /* @__PURE__ */ jsxs(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: tagCva({
|
|
20
|
+
color,
|
|
21
|
+
className: clsx("pointer-events-none", className)
|
|
22
|
+
}),
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
Typography,
|
|
26
|
+
{
|
|
27
|
+
ref: onContentRef,
|
|
28
|
+
variant: "default",
|
|
29
|
+
size: "label-2",
|
|
30
|
+
as: "span",
|
|
31
|
+
className: "truncate",
|
|
32
|
+
children
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
dismissable && /* @__PURE__ */ jsx(
|
|
36
|
+
Button,
|
|
37
|
+
{
|
|
38
|
+
...buttonProps,
|
|
39
|
+
className: "pointer-events-auto shrink-0",
|
|
40
|
+
children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-4" })
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
) });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
Tag
|
|
49
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
3
|
+
const tag = cva(
|
|
4
|
+
[
|
|
5
|
+
uiOutlineClass,
|
|
6
|
+
"inline-flex items-center gap-list-gap-icon-to-label",
|
|
7
|
+
"p-pill-height-default px-1-5",
|
|
8
|
+
"rounded-pill-rounding-default",
|
|
9
|
+
"overflow-hidden",
|
|
10
|
+
"disabled:cursor-default"
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
color: {
|
|
15
|
+
primary: [
|
|
16
|
+
"bg-interactive-subtle-primary-idle text-interactive-subtle-primary-on-idle",
|
|
17
|
+
"hover:bg-interactive-subtle-primary-hover hover:text-interactive-subtle-primary-on-hover",
|
|
18
|
+
"pressed:bg-interactive-subtle-primary-pressed pressed:text-interactive-subtle-primary-on-pressed",
|
|
19
|
+
"disabled:bg-interactive-subtle-primary-disabled disabled:text-interactive-subtle-primary-on-disabled",
|
|
20
|
+
"focus-visible:outline-interactive-contained-primary-focus"
|
|
21
|
+
],
|
|
22
|
+
secondary: [
|
|
23
|
+
"bg-interactive-subtle-secondary-idle text-interactive-subtle-secondary-on-idle",
|
|
24
|
+
"hover:bg-interactive-subtle-secondary-hover hover:text-interactive-subtle-secondary-on-hover",
|
|
25
|
+
"pressed:bg-interactive-subtle-secondary-pressed pressed:text-interactive-subtle-secondary-on-pressed",
|
|
26
|
+
"disabled:bg-interactive-subtle-secondary-disabled disabled:text-interactive-subtle-secondary-on-disabled",
|
|
27
|
+
"focus-visible:outline-interactive-contained-primary-focus"
|
|
28
|
+
],
|
|
29
|
+
success: [
|
|
30
|
+
"bg-interactive-subtle-success-idle text-interactive-subtle-success-on-idle",
|
|
31
|
+
"hover:bg-interactive-subtle-success-hover hover:text-interactive-subtle-success-on-hover",
|
|
32
|
+
"pressed:bg-interactive-subtle-success-pressed pressed:text-interactive-subtle-success-on-pressed",
|
|
33
|
+
"disabled:bg-interactive-subtle-success-disabled disabled:text-interactive-subtle-success-on-disabled",
|
|
34
|
+
"focus-visible:outline-interactive-contained-primary-focus"
|
|
35
|
+
],
|
|
36
|
+
warning: [
|
|
37
|
+
"bg-interactive-subtle-warning-idle text-interactive-subtle-warning-on-idle",
|
|
38
|
+
"hover:bg-interactive-subtle-warning-hover hover:text-interactive-subtle-warning-on-hover",
|
|
39
|
+
"pressed:bg-interactive-subtle-warning-pressed pressed:text-interactive-subtle-warning-on-pressed",
|
|
40
|
+
"disabled:bg-interactive-subtle-warning-disabled disabled:text-interactive-subtle-warning-on-disabled",
|
|
41
|
+
"focus-visible:outline-interactive-contained-primary-focus"
|
|
42
|
+
],
|
|
43
|
+
error: [
|
|
44
|
+
"bg-interactive-subtle-error-idle text-interactive-subtle-error-on-idle",
|
|
45
|
+
"hover:bg-interactive-subtle-error-hover hover:text-interactive-subtle-error-on-hover",
|
|
46
|
+
"pressed:bg-interactive-subtle-error-pressed pressed:text-interactive-subtle-error-on-pressed",
|
|
47
|
+
"disabled:bg-interactive-subtle-error-disabled disabled:text-interactive-subtle-error-on-disabled",
|
|
48
|
+
"focus-visible:outline-interactive-contained-primary-focus"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
color: "primary"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
export {
|
|
58
|
+
tag
|
|
59
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, Ref } from 'react';
|
|
2
|
-
import { TypographyVariantProps } from '
|
|
2
|
+
import { TypographyVariantProps } from './typography.cva';
|
|
3
3
|
type TypographyTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div";
|
|
4
4
|
interface TypographyPropsCva extends Omit<TypographyVariantProps, "size">, Required<Pick<TypographyVariantProps, "size">> {
|
|
5
5
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { typography } from "./typography.cva.js";
|
|
3
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
4
|
+
const Typography = ({ as = "p", className, ...props }) => {
|
|
5
|
+
const uiStyle = UIStyle.useConfig();
|
|
6
|
+
const typographyCva = uiStyle?.typography?.cva ?? typography;
|
|
7
|
+
const Tag = as;
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
Tag,
|
|
10
|
+
{
|
|
11
|
+
className: typographyCva({
|
|
12
|
+
...props,
|
|
13
|
+
sizeMobile: props.sizeMobile ?? props.size,
|
|
14
|
+
className
|
|
15
|
+
}),
|
|
16
|
+
...props
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
Typography
|
|
22
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const typography = cva("", {
|
|
3
|
+
variants: {
|
|
4
|
+
size: {
|
|
5
|
+
"headline-1": "md:text-desktop-headline-1",
|
|
6
|
+
"title-1": "md:text-desktop-title-1",
|
|
7
|
+
"title-2": "md:text-desktop-title-2",
|
|
8
|
+
"title-3": "md:text-desktop-title-3",
|
|
9
|
+
"title-4": "md:text-desktop-title-4",
|
|
10
|
+
"title-5": "md:text-desktop-title-5",
|
|
11
|
+
"title-6": "md:text-desktop-title-6",
|
|
12
|
+
"body-1": "md:text-desktop-body-1",
|
|
13
|
+
"body-2": "md:text-desktop-body-2",
|
|
14
|
+
"body-3": "md:text-desktop-body-3",
|
|
15
|
+
"body-4": "md:text-desktop-body-4",
|
|
16
|
+
"label-1": "md:text-label-1",
|
|
17
|
+
"label-2": "md:text-label-2",
|
|
18
|
+
"label-3": "md:text-label-3"
|
|
19
|
+
},
|
|
20
|
+
sizeMobile: {
|
|
21
|
+
"headline-1": "text-mobile-headline-1",
|
|
22
|
+
"title-1": "text-mobile-title-1",
|
|
23
|
+
"title-2": "text-mobile-title-2",
|
|
24
|
+
"title-3": "text-mobile-title-3",
|
|
25
|
+
"title-4": "text-mobile-title-4",
|
|
26
|
+
"title-5": "text-mobile-title-5",
|
|
27
|
+
"title-6": "text-mobile-title-6",
|
|
28
|
+
"body-1": "text-mobile-body-1",
|
|
29
|
+
"body-2": "text-mobile-body-2",
|
|
30
|
+
"body-3": "text-mobile-body-3",
|
|
31
|
+
"body-4": "text-mobile-body-4",
|
|
32
|
+
"label-1": "text-label-1",
|
|
33
|
+
"label-2": "text-label-2",
|
|
34
|
+
"label-3": "text-label-3"
|
|
35
|
+
},
|
|
36
|
+
variant: {
|
|
37
|
+
default: "",
|
|
38
|
+
"prominent-1": "",
|
|
39
|
+
"default-italic": "italic",
|
|
40
|
+
"prominent-1-italic": "italic",
|
|
41
|
+
"prominent-2": "",
|
|
42
|
+
"prominent-2-italic": "italic"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
compoundVariants: [
|
|
46
|
+
{
|
|
47
|
+
size: ["headline-1", "title-1", "title-2", "title-3", "title-4", "title-5", "title-6"],
|
|
48
|
+
className: "font-geist"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
size: ["body-1", "body-2", "body-3", "body-4", "label-1", "label-2", "label-3"],
|
|
52
|
+
className: "font-inter"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
size: [
|
|
56
|
+
"headline-1",
|
|
57
|
+
"title-1",
|
|
58
|
+
"title-2",
|
|
59
|
+
"title-3",
|
|
60
|
+
"title-4",
|
|
61
|
+
"title-5",
|
|
62
|
+
"title-6",
|
|
63
|
+
"label-1",
|
|
64
|
+
"label-2",
|
|
65
|
+
"label-3"
|
|
66
|
+
],
|
|
67
|
+
variant: ["default", "default-italic"],
|
|
68
|
+
className: "font-medium"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
size: [
|
|
72
|
+
"headline-1",
|
|
73
|
+
"title-1",
|
|
74
|
+
"title-2",
|
|
75
|
+
"title-3",
|
|
76
|
+
"title-4",
|
|
77
|
+
"title-5",
|
|
78
|
+
"title-6",
|
|
79
|
+
"label-1",
|
|
80
|
+
"label-2",
|
|
81
|
+
"label-3"
|
|
82
|
+
],
|
|
83
|
+
variant: ["prominent-1", "prominent-1-italic"],
|
|
84
|
+
className: "font-semibold"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
size: ["body-1", "body-2", "body-3", "body-4"],
|
|
88
|
+
variant: ["prominent-1", "prominent-1-italic"],
|
|
89
|
+
className: "font-medium"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
size: ["body-1", "body-2", "body-3", "body-4"],
|
|
93
|
+
variant: ["prominent-2", "prominent-2-italic"],
|
|
94
|
+
className: "font-semibold"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
});
|
|
98
|
+
export {
|
|
99
|
+
typography
|
|
100
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { ActionModalProps } from '
|
|
2
|
+
import { ActionModalProps } from '../components/overlays/ActionModal/ActionModal';
|
|
3
3
|
export declare namespace Confirmation {
|
|
4
4
|
type ContextState = Pick<ActionModalProps, "heading" | "description" | "buttonSize" | "textAlign" | "primaryAction" | "secondaryAction" | "modalClassName"> & {
|
|
5
5
|
isOpen: boolean;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useState, useCallback, useMemo, use } from "react";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { ActionModal } from "../components/overlays/ActionModal/ActionModal.js";
|
|
5
|
+
import { ns } from "./i18n.js";
|
|
6
|
+
var Confirmation;
|
|
7
|
+
((Confirmation2) => {
|
|
8
|
+
const DEFAULT_STATE = {
|
|
9
|
+
heading: "",
|
|
10
|
+
description: "",
|
|
11
|
+
isOpen: false,
|
|
12
|
+
primaryAction: {
|
|
13
|
+
label: "",
|
|
14
|
+
onPress: () => {
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
secondaryAction: {
|
|
18
|
+
label: "",
|
|
19
|
+
onPress: () => {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const Context = createContext(null);
|
|
24
|
+
Confirmation2.Provider = ({ children }) => {
|
|
25
|
+
const [state, setState] = useState(DEFAULT_STATE);
|
|
26
|
+
const { t } = useTranslation(ns);
|
|
27
|
+
const onCancel = () => setState(DEFAULT_STATE);
|
|
28
|
+
const confirm = useCallback(
|
|
29
|
+
async ({
|
|
30
|
+
heading,
|
|
31
|
+
description,
|
|
32
|
+
buttonSize,
|
|
33
|
+
textAlign,
|
|
34
|
+
modalClassName,
|
|
35
|
+
cancelLabel = t(($) => $.ui.confirmation.cancel),
|
|
36
|
+
confirmLabel = t(($) => $.ui.confirmation.confirm),
|
|
37
|
+
confirmVariant,
|
|
38
|
+
confirmColor,
|
|
39
|
+
cancelVariant,
|
|
40
|
+
cancelColor
|
|
41
|
+
}) => {
|
|
42
|
+
return new Promise((resolve) => {
|
|
43
|
+
setState({
|
|
44
|
+
heading,
|
|
45
|
+
description,
|
|
46
|
+
buttonSize,
|
|
47
|
+
textAlign,
|
|
48
|
+
modalClassName,
|
|
49
|
+
primaryAction: {
|
|
50
|
+
label: confirmLabel,
|
|
51
|
+
onPress() {
|
|
52
|
+
setState({
|
|
53
|
+
...state,
|
|
54
|
+
isOpen: false,
|
|
55
|
+
heading: "",
|
|
56
|
+
description: ""
|
|
57
|
+
});
|
|
58
|
+
resolve(true);
|
|
59
|
+
},
|
|
60
|
+
variant: confirmVariant,
|
|
61
|
+
color: confirmColor
|
|
62
|
+
},
|
|
63
|
+
secondaryAction: {
|
|
64
|
+
label: cancelLabel,
|
|
65
|
+
onPress() {
|
|
66
|
+
onCancel();
|
|
67
|
+
resolve(false);
|
|
68
|
+
},
|
|
69
|
+
variant: cancelVariant,
|
|
70
|
+
color: cancelColor
|
|
71
|
+
},
|
|
72
|
+
isOpen: !state.isOpen
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
[state, t]
|
|
77
|
+
);
|
|
78
|
+
const value = useMemo(
|
|
79
|
+
() => ({
|
|
80
|
+
confirm
|
|
81
|
+
}),
|
|
82
|
+
[confirm]
|
|
83
|
+
);
|
|
84
|
+
return /* @__PURE__ */ jsxs(Context.Provider, { value, children: [
|
|
85
|
+
/* @__PURE__ */ jsx(
|
|
86
|
+
ActionModal,
|
|
87
|
+
{
|
|
88
|
+
...state,
|
|
89
|
+
onClose: state.secondaryAction?.onPress ?? onCancel,
|
|
90
|
+
primaryAction: state.primaryAction,
|
|
91
|
+
secondaryAction: state.secondaryAction
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
children
|
|
95
|
+
] });
|
|
96
|
+
};
|
|
97
|
+
Confirmation2.useConfirmation = () => {
|
|
98
|
+
const context = use(Context);
|
|
99
|
+
if (!context) {
|
|
100
|
+
throw new Error("Confirmation.useConfirmation must be used within a Confirmation.Provider");
|
|
101
|
+
}
|
|
102
|
+
return context;
|
|
103
|
+
};
|
|
104
|
+
})(Confirmation || (Confirmation = {}));
|
|
105
|
+
export {
|
|
106
|
+
Confirmation
|
|
107
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import translationEN from "../assets/locales/en/translation.json.js";
|
|
2
|
+
import translationSL from "../assets/locales/sl/translation.json.js";
|
|
3
|
+
const ns = "ui";
|
|
4
|
+
const resources = {
|
|
5
|
+
en: {
|
|
6
|
+
[ns]: translationEN
|
|
7
|
+
},
|
|
8
|
+
sl: {
|
|
9
|
+
[ns]: translationSL
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
ns,
|
|
14
|
+
resources
|
|
15
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, use } from "react";
|
|
3
|
+
import { RouterProvider } from "react-aria";
|
|
4
|
+
var UIRouter;
|
|
5
|
+
((UIRouter2) => {
|
|
6
|
+
const UIRouterContext = createContext(null);
|
|
7
|
+
UIRouter2.UIRouterProvider = ({
|
|
8
|
+
children,
|
|
9
|
+
pathname,
|
|
10
|
+
push,
|
|
11
|
+
query,
|
|
12
|
+
replace
|
|
13
|
+
}) => {
|
|
14
|
+
const searchParams = new URLSearchParams();
|
|
15
|
+
for (const [k, v] of Object.entries(query)) {
|
|
16
|
+
if (Array.isArray(v)) {
|
|
17
|
+
for (const item of v) {
|
|
18
|
+
searchParams.append(k, item);
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
searchParams.set(k, v);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const value = {
|
|
25
|
+
searchParams,
|
|
26
|
+
pathname,
|
|
27
|
+
push,
|
|
28
|
+
query,
|
|
29
|
+
replace
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ jsx(UIRouterContext, { value, children: /* @__PURE__ */ jsx(RouterProvider, { navigate: (href) => push(href), children }) });
|
|
32
|
+
};
|
|
33
|
+
UIRouter2.useUIRouter = () => {
|
|
34
|
+
const context = use(UIRouterContext);
|
|
35
|
+
if (!context) {
|
|
36
|
+
throw new Error("useUIRouter must be used within a UIRouterContext");
|
|
37
|
+
}
|
|
38
|
+
return context;
|
|
39
|
+
};
|
|
40
|
+
})(UIRouter || (UIRouter = {}));
|
|
41
|
+
export {
|
|
42
|
+
UIRouter
|
|
43
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { CheckboxProps } from '
|
|
3
|
-
import { DatePickerProps } from '
|
|
4
|
-
import { NumberInputProps } from '
|
|
5
|
-
import { TextInputProps } from '
|
|
6
|
-
import { RadioGroupProps } from '
|
|
7
|
-
import { SelectBaseProps } from '
|
|
8
|
-
import { SliderProps } from '
|
|
9
|
-
import { ToggleProps } from '
|
|
2
|
+
import { CheckboxProps } from '../components/inputs/Checkbox/Checkbox';
|
|
3
|
+
import { DatePickerProps } from '../components/inputs/DateTime/DatePicker/DatePicker';
|
|
4
|
+
import { NumberInputProps } from '../components/inputs/Input/NumberInput/NumberInput';
|
|
5
|
+
import { TextInputProps } from '../components/inputs/Input/TextInput/TextInput';
|
|
6
|
+
import { RadioGroupProps } from '../components/inputs/RadioGroup/RadioGroup';
|
|
7
|
+
import { SelectBaseProps } from '../components/inputs/Selection/shared/SelectBase';
|
|
8
|
+
import { SliderProps } from '../components/inputs/Slider/Slider';
|
|
9
|
+
import { ToggleProps } from '../components/inputs/Toggle/Toggle';
|
|
10
10
|
export declare namespace UIConfig {
|
|
11
11
|
type DeepRequired<T> = {
|
|
12
12
|
[P in keyof T]-?: T[P] extends object ? DeepRequired<T[P]> : Exclude<T[P], null | undefined>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, use } from "react";
|
|
3
|
+
import { useDeepCompareMemo } from "../hooks/useDeepCompare.js";
|
|
4
|
+
import { ObjectUtils } from "../utils/object.utils.js";
|
|
5
|
+
var UIConfig;
|
|
6
|
+
((UIConfig2) => {
|
|
7
|
+
const DEFAULT_CONFIG = {
|
|
8
|
+
input: {
|
|
9
|
+
variant: "outlined",
|
|
10
|
+
as: "default",
|
|
11
|
+
size: "default",
|
|
12
|
+
isClearable: false,
|
|
13
|
+
hideLabel: false
|
|
14
|
+
},
|
|
15
|
+
numberInput: {
|
|
16
|
+
formatOptions: {
|
|
17
|
+
minimumFractionDigits: 0,
|
|
18
|
+
maximumFractionDigits: 3
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
radioGroup: {
|
|
22
|
+
variant: "default",
|
|
23
|
+
hideLabel: false
|
|
24
|
+
},
|
|
25
|
+
checkbox: {
|
|
26
|
+
variant: "default"
|
|
27
|
+
},
|
|
28
|
+
select: {
|
|
29
|
+
selectionMode: "single",
|
|
30
|
+
isSearchable: false,
|
|
31
|
+
selectedTagsType: "list"
|
|
32
|
+
},
|
|
33
|
+
toggle: {
|
|
34
|
+
variant: "default"
|
|
35
|
+
},
|
|
36
|
+
slider: {
|
|
37
|
+
minValue: 0,
|
|
38
|
+
maxValue: 100
|
|
39
|
+
},
|
|
40
|
+
dateInput: {
|
|
41
|
+
todayIcon: false,
|
|
42
|
+
shouldForceLeadingZeros: false
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const Context = createContext(DEFAULT_CONFIG);
|
|
46
|
+
UIConfig2.Provider = ({ config = {}, children }) => {
|
|
47
|
+
const parentConfig = use(Context) || DEFAULT_CONFIG;
|
|
48
|
+
const value = useDeepCompareMemo(() => {
|
|
49
|
+
return ObjectUtils.deepConditionalMerge(
|
|
50
|
+
parentConfig,
|
|
51
|
+
config,
|
|
52
|
+
(val) => val !== null && val !== void 0
|
|
53
|
+
);
|
|
54
|
+
}, [config, parentConfig]);
|
|
55
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
56
|
+
};
|
|
57
|
+
UIConfig2.useConfig = () => {
|
|
58
|
+
const context = use(Context);
|
|
59
|
+
if (!context) {
|
|
60
|
+
throw new Error("UIConfig.useConfig must be used within a UIConfig.Provider");
|
|
61
|
+
}
|
|
62
|
+
return context;
|
|
63
|
+
};
|
|
64
|
+
})(UIConfig || (UIConfig = {}));
|
|
65
|
+
export {
|
|
66
|
+
UIConfig
|
|
67
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import { ButtonVariantProps } from '
|
|
4
|
-
import { PillButtonVariants } from '
|
|
5
|
-
import { CheckboxVariantProps } from '
|
|
6
|
-
import { RadioVariantProps } from '
|
|
7
|
-
import { InputBaseProps, InputSideProps, InputSizeProps } from '
|
|
8
|
-
import { LabelBaseProps } from '
|
|
9
|
-
import { ToggleVariantProps } from '
|
|
10
|
-
import { AlertVariantProps } from '
|
|
11
|
-
import { ToastVariantProps } from '
|
|
12
|
-
import { TableDataVariantProps, TableHeadDataVariantProps, TableHeadRowVariantProps, TableRowVariantProps } from '
|
|
13
|
-
import { LinkVariantProps } from '
|
|
14
|
-
import { TagVariantProps } from '
|
|
15
|
-
import { TypographyVariantProps } from '
|
|
16
|
-
import { CompoundMapper } from '
|
|
3
|
+
import { ButtonVariantProps } from '../components/buttons/Button/button.cva';
|
|
4
|
+
import { PillButtonVariants } from '../components/buttons/PillButton/pillButton.cva';
|
|
5
|
+
import { CheckboxVariantProps } from '../components/inputs/Checkbox/checkbox.cva';
|
|
6
|
+
import { RadioVariantProps } from '../components/inputs/RadioGroup/radio.cva';
|
|
7
|
+
import { InputBaseProps, InputSideProps, InputSizeProps } from '../components/inputs/shared/input.cva';
|
|
8
|
+
import { LabelBaseProps } from '../components/inputs/shared/label.cva';
|
|
9
|
+
import { ToggleVariantProps } from '../components/inputs/Toggle/toggle.cva';
|
|
10
|
+
import { AlertVariantProps } from '../components/status/Alert/alert.cva';
|
|
11
|
+
import { ToastVariantProps } from '../components/status/Toast/toast.cva';
|
|
12
|
+
import { TableDataVariantProps, TableHeadDataVariantProps, TableHeadRowVariantProps, TableRowVariantProps } from '../components/table/table.cva';
|
|
13
|
+
import { LinkVariantProps } from '../components/text/Link/link.cva';
|
|
14
|
+
import { TagVariantProps } from '../components/text/Tag/tag.cva';
|
|
15
|
+
import { TypographyVariantProps } from '../components/text/Typography/typography.cva';
|
|
16
|
+
import { CompoundMapper } from '../utils/compoundMapper';
|
|
17
17
|
export declare namespace UIStyle {
|
|
18
18
|
export type Cva<T> = (props: T & ClassProp) => string;
|
|
19
19
|
interface Options {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, use } from "react";
|
|
3
|
+
var UIStyle;
|
|
4
|
+
((UIStyle2) => {
|
|
5
|
+
const Context = createContext(null);
|
|
6
|
+
UIStyle2.Provider = ({ children, config }) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value: config, children });
|
|
8
|
+
};
|
|
9
|
+
UIStyle2.useConfig = () => {
|
|
10
|
+
const context = use(Context);
|
|
11
|
+
return context;
|
|
12
|
+
};
|
|
13
|
+
})(UIStyle || (UIStyle = {}));
|
|
14
|
+
export {
|
|
15
|
+
UIStyle
|
|
16
|
+
};
|