@povio/ui 2.2.5 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +3 -1
- package/dist/assets/icons/AlignLeft.js +3 -1
- package/dist/assets/icons/AlignLeftRight.js +3 -1
- package/dist/assets/icons/AlignRight.js +3 -1
- package/dist/assets/icons/ArrowDropDown.js +3 -1
- package/dist/assets/icons/ArrowDropUp.js +3 -1
- package/dist/assets/icons/ArrowLeft.js +3 -1
- package/dist/assets/icons/ArrowRight.js +3 -1
- package/dist/assets/icons/Bold.js +3 -1
- package/dist/assets/icons/BulletedList.js +3 -1
- package/dist/assets/icons/Calendar.js +3 -1
- package/dist/assets/icons/Check.js +3 -1
- package/dist/assets/icons/CheckCircle.js +3 -1
- package/dist/assets/icons/CheckboxCheckmark.js +3 -1
- package/dist/assets/icons/CheckboxIndeterminate.js +3 -1
- package/dist/assets/icons/ChevronDown.js +3 -1
- package/dist/assets/icons/ChevronLeft.js +3 -1
- package/dist/assets/icons/ChevronRight.js +3 -1
- package/dist/assets/icons/ChevronUp.js +3 -1
- package/dist/assets/icons/ChevronsLeft.js +3 -1
- package/dist/assets/icons/ChevronsRight.js +3 -1
- package/dist/assets/icons/Clock.js +3 -1
- package/dist/assets/icons/Close.js +3 -1
- package/dist/assets/icons/DateTime.js +3 -1
- package/dist/assets/icons/DragIndicator.js +3 -1
- package/dist/assets/icons/File.js +3 -1
- package/dist/assets/icons/Highlight.js +3 -1
- package/dist/assets/icons/HighlightOn.js +3 -1
- package/dist/assets/icons/Home.js +3 -1
- package/dist/assets/icons/Info.js +3 -1
- package/dist/assets/icons/Italic.js +3 -1
- package/dist/assets/icons/Link.js +3 -1
- package/dist/assets/icons/Menu.js +3 -1
- package/dist/assets/icons/NumberedList.js +3 -1
- package/dist/assets/icons/PointerHorizontal.js +3 -1
- package/dist/assets/icons/PointerVertical.js +3 -1
- package/dist/assets/icons/Search.js +15 -0
- package/dist/assets/icons/Send.js +3 -1
- package/dist/assets/icons/Strikethrough.js +3 -1
- package/dist/assets/icons/TextColor.js +3 -1
- package/dist/assets/icons/Today.js +3 -1
- package/dist/assets/icons/Underlined.js +3 -1
- package/dist/assets/icons/Upload.js +3 -1
- package/dist/assets/icons/Visibility.js +3 -1
- package/dist/assets/icons/VisibilityOff.js +3 -1
- package/dist/assets/icons/WarningFilled.js +3 -1
- package/dist/assets/locales/en/translation.json.js +1 -0
- package/dist/assets/locales/sl/translation.json.js +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +5 -3
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +7 -5
- package/dist/components/Menu/Menu.js +3 -1
- package/dist/components/Menu/MenuDesktop.js +3 -1
- package/dist/components/Menu/MenuItem.js +3 -1
- package/dist/components/Menu/MenuMobile.js +4 -1
- package/dist/components/Menu/MenuPopover.js +3 -1
- package/dist/components/Menu/menu.cva.js +6 -4
- package/dist/components/buttons/Button/Button.js +3 -1
- package/dist/components/buttons/Button/button.cva.js +7 -5
- package/dist/components/buttons/IconButton/IconButton.js +3 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +3 -1
- package/dist/components/buttons/PillButton/PillButton.js +3 -1
- package/dist/components/buttons/PillButton/pillButton.cva.js +6 -4
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -1
- package/dist/components/buttons/TextButton/TextButton.js +3 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.js +3 -1
- package/dist/components/buttons/shared/ButtonContent.js +3 -1
- package/dist/components/buttons/shared/buttonContent.cva.js +2 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +4 -2
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +3 -1
- package/dist/components/inputs/Checkbox/checkbox.cva.js +7 -4
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +3 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +10 -8
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +3 -1
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +3 -1
- package/dist/components/inputs/DateTime/shared/Calendar.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +5 -3
- package/dist/components/inputs/DateTime/shared/DateField.js +3 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +3 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +4 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +6 -14
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +4 -2
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +3 -1
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimeField.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +3 -1
- package/dist/components/inputs/DateTime/shared/YearPicker.js +3 -1
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +21 -7
- package/dist/components/inputs/File/FileUploadContainer.js +3 -1
- package/dist/components/inputs/File/InputUpload.js +3 -1
- package/dist/components/inputs/File/fileUpload.types.d.ts +11 -1
- package/dist/components/inputs/File/shared/FileCard.js +3 -1
- package/dist/components/inputs/File/shared/FileCardList.js +4 -2
- package/dist/components/inputs/File/shared/FileUploadContent.js +3 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -1
- package/dist/components/inputs/File/shared/FileUploadContentError.js +5 -3
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -4
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +6 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -2
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -1
- package/dist/components/inputs/File/shared/ProgressBar.js +3 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +4 -2
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +6 -3
- package/dist/components/inputs/FormField/FormField.js +11 -1
- package/dist/components/inputs/FormField/FormFieldError.js +5 -3
- package/dist/components/inputs/FormField/FormFieldHeader.js +3 -1
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +4 -2
- package/dist/components/inputs/FormField/FormFieldHelper.d.ts +8 -0
- package/dist/components/inputs/FormField/FormFieldHelper.js +14 -0
- package/dist/components/inputs/FormField/FormFieldLabel.js +4 -1
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +6 -0
- package/dist/components/inputs/FormField/formFieldError.cva.js +11 -0
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +6 -0
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +3 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +4 -2
- package/dist/components/inputs/Input/TextArea/TextArea.js +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +3 -1
- package/dist/components/inputs/Input/shared/InputContent.js +4 -1
- package/dist/components/inputs/Inputs/Form.js +2 -0
- package/dist/components/inputs/Inputs/InputItem.js +2 -0
- package/dist/components/inputs/Inputs/Inputs.js +2 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.js +6 -4
- package/dist/components/inputs/RadioGroup/radio.cva.js +6 -3
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +3 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +3 -1
- package/dist/components/inputs/Selection/Select/Select.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/SelectBase.js +5 -2
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectListBox.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +5 -3
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectMobile.js +19 -13
- package/dist/components/inputs/Selection/shared/select.context.js +20 -18
- package/dist/components/inputs/Selection/shared/useSelectItems.js +6 -4
- package/dist/components/inputs/Slider/Slider.js +3 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +4 -2
- package/dist/components/inputs/TextEditor/textEditor.types.js +3 -1
- package/dist/components/inputs/Toggle/Toggle.js +3 -1
- package/dist/components/inputs/Toggle/toggle.cva.js +5 -2
- package/dist/components/inputs/shared/CheckContent.js +4 -1
- package/dist/components/inputs/shared/InputClear.js +5 -3
- package/dist/components/inputs/shared/TooltipWrapper.js +3 -1
- package/dist/components/inputs/shared/input.cva.js +6 -4
- package/dist/components/inputs/shared/label.cva.js +9 -2
- package/dist/components/navigation/Accordion/Accordion.js +3 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -1
- package/dist/components/navigation/Accordion/accordion.cva.js +12 -10
- package/dist/components/navigation/Stepper/Stepper.js +3 -1
- package/dist/components/navigation/Stepper/StepperItem.js +3 -1
- package/dist/components/navigation/Stepper/StepperSeparator.js +3 -1
- package/dist/components/navigation/Stepper/stepper.cva.js +9 -7
- package/dist/components/outline.clsx.js +4 -2
- package/dist/components/overlays/ActionModal/ActionModal.js +3 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +5 -0
- package/dist/components/overlays/BottomSheet/BottomSheet.js +23 -7
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +13 -0
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +38 -0
- package/dist/components/overlays/Drawer/Drawer.js +3 -1
- package/dist/components/overlays/Modal/Modal.js +4 -2
- package/dist/components/overlays/Modal/modal.cva.js +5 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +7 -10
- package/dist/components/overlays/Tooltip/Tooltip.js +7 -2
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +3 -1
- package/dist/components/overlays/Tooltip/tooltip.cva.js +6 -4
- package/dist/components/segment/Segment.js +3 -1
- package/dist/components/segment/SegmentItem.js +3 -1
- package/dist/components/segment/segment.cva.js +4 -2
- package/dist/components/shared/pagination/Pagination.js +4 -2
- package/dist/components/shared/pagination/PaginationList.js +4 -2
- package/dist/components/shared/pagination/minWidth.cva.js +3 -1
- package/dist/components/shared/popover.cva.js +3 -1
- package/dist/components/status/Alert/Alert.js +3 -1
- package/dist/components/status/Alert/alert.cva.js +3 -1
- package/dist/components/status/Loader/Loader.js +3 -1
- package/dist/components/status/Loader/loader.cva.js +4 -2
- package/dist/components/status/Toast/Toast.js +15 -6
- package/dist/components/status/Toast/toast.cva.js +6 -20
- package/dist/components/status/Toast/useToast.js +3 -1
- package/dist/components/status/shared/status.cva.js +4 -2
- package/dist/components/table/CellText.d.ts +2 -1
- package/dist/components/table/CellText.js +18 -10
- package/dist/components/table/ColumnConfig.js +3 -1
- package/dist/components/table/HeaderText.d.ts +5 -2
- package/dist/components/table/HeaderText.js +17 -7
- package/dist/components/table/InfiniteTable.js +3 -1
- package/dist/components/table/PaginatedTable.js +3 -1
- package/dist/components/table/Table.js +5 -3
- package/dist/components/table/table.cva.d.ts +6 -0
- package/dist/components/table/table.cva.js +9 -5
- package/dist/components/text/Link/Link.js +3 -1
- package/dist/components/text/Link/link.cva.js +3 -1
- package/dist/components/text/Tag/Tag.d.ts +3 -0
- package/dist/components/text/Tag/Tag.js +9 -4
- package/dist/components/text/Tag/tag.cva.js +3 -1
- package/dist/components/text/Typography/Typography.js +3 -1
- package/dist/components/text/Typography/typography.cva.js +3 -1
- package/dist/config/confirmation.context.js +4 -2
- package/dist/config/i18n.js +4 -2
- package/dist/config/link.context.js +3 -1
- package/dist/config/router.context.js +3 -1
- package/dist/config/theme.context.js +8 -6
- package/dist/config/uiConfig.context.d.ts +10 -2
- package/dist/config/uiConfig.context.js +25 -4
- package/dist/config/uiStyle.context.d.ts +9 -1
- package/dist/config/uiStyle.context.js +3 -1
- package/dist/helpers/dynamicColumns.js +4 -2
- package/dist/helpers/dynamicInputs.js +5 -3
- package/dist/hooks/useAutosave.js +2 -0
- package/dist/hooks/useBreakpoint.js +5 -3
- package/dist/hooks/useDebounceCallback.js +2 -0
- package/dist/hooks/useDeepCompare.js +5 -3
- package/dist/hooks/useFilters.js +3 -1
- package/dist/hooks/useForm.js +2 -0
- package/dist/hooks/useFormAutosave.js +2 -0
- package/dist/hooks/useIntersectionObserver.js +3 -1
- package/dist/hooks/useLocalStorage.js +3 -1
- package/dist/hooks/useLongPressRepeat.js +3 -1
- package/dist/hooks/usePagination.js +2 -0
- package/dist/hooks/useScrollableListBox.js +2 -0
- package/dist/hooks/useSorting.js +2 -0
- package/dist/hooks/useStateAndRef.js +3 -1
- package/dist/hooks/useTableColumnConfig.js +2 -0
- package/dist/hooks/useTableNav.js +124 -20
- package/dist/hooks/useTranslationMemo.js +2 -0
- package/dist/index.js +1 -1
- package/dist/tw-ui-plugin.js +4 -2
- package/dist/utils/array.utils.js +3 -1
- package/dist/utils/compoundMapper.js +3 -1
- package/dist/utils/date-time.utils.js +3 -1
- package/dist/utils/date.utils.js +3 -1
- package/dist/utils/dom.utils.js +3 -1
- package/dist/utils/file.utils.d.ts +4 -0
- package/dist/utils/file.utils.js +10 -3
- package/dist/utils/isEqual.js +3 -1
- package/dist/utils/logger.js +3 -1
- package/dist/utils/object.utils.js +3 -1
- package/dist/utils/queries.utils.js +3 -1
- package/dist/utils/rest.utils.js +3 -1
- package/dist/utils/routing.utils.js +3 -1
- package/dist/utils/string.utils.js +3 -1
- package/dist/utils/zod.utils.js +3 -1
- package/package.json +2 -2
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { logger } from "../utils/logger.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Keys
|
|
5
|
-
Keys
|
|
6
|
-
Keys
|
|
7
|
-
Keys
|
|
8
|
-
Keys
|
|
9
|
-
Keys
|
|
10
|
-
Keys
|
|
11
|
-
Keys
|
|
12
|
-
Keys
|
|
13
|
-
Keys
|
|
14
|
-
Keys
|
|
15
|
-
Keys
|
|
16
|
-
Keys
|
|
17
|
-
|
|
2
|
+
//#region src/hooks/useTableNav.ts
|
|
3
|
+
var Keys = /* @__PURE__ */ function(Keys) {
|
|
4
|
+
Keys["Enter"] = "Enter";
|
|
5
|
+
Keys["Escape"] = "Escape";
|
|
6
|
+
Keys["Shift"] = "Shift";
|
|
7
|
+
Keys["Control"] = "Control";
|
|
8
|
+
Keys["Home"] = "Home";
|
|
9
|
+
Keys["End"] = "End";
|
|
10
|
+
Keys["Backspace"] = "Backspace";
|
|
11
|
+
/** Page Keys */
|
|
12
|
+
Keys["PageUp"] = "PageUp";
|
|
13
|
+
Keys["PageDown"] = "PageDown";
|
|
14
|
+
/** Arrow Keys */
|
|
15
|
+
Keys["ArrowLeft"] = "ArrowLeft";
|
|
16
|
+
Keys["ArrowUp"] = "ArrowUp";
|
|
17
|
+
Keys["ArrowRight"] = "ArrowRight";
|
|
18
|
+
Keys["ArrowDown"] = "ArrowDown";
|
|
19
|
+
Keys["F2"] = "F2";
|
|
20
|
+
return Keys;
|
|
18
21
|
}(Keys || {});
|
|
19
22
|
var Selectors = {
|
|
20
23
|
Cell: "[role=\"cell\"],[role=\"gridcell\"],[role=\"columnheader\"],[role=\"rowheader\"],td,th",
|
|
@@ -39,9 +42,17 @@ var DataGridNav = class {
|
|
|
39
42
|
this.debug = debug;
|
|
40
43
|
this.disabled = false;
|
|
41
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Disables the keyboard listener in cases
|
|
47
|
+
* that elements inside the grid need to use
|
|
48
|
+
* arrows keys etc., like select dropdowns
|
|
49
|
+
*/
|
|
42
50
|
disable() {
|
|
43
51
|
this.disabled = true;
|
|
44
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Enables the keyboard listeners
|
|
55
|
+
*/
|
|
45
56
|
enable() {
|
|
46
57
|
this.disabled = false;
|
|
47
58
|
}
|
|
@@ -51,21 +62,48 @@ var DataGridNav = class {
|
|
|
51
62
|
getActiveCell() {
|
|
52
63
|
return this.activeCell;
|
|
53
64
|
}
|
|
65
|
+
/** Used as a keyboard listener for key up */
|
|
54
66
|
tableKeyUp() {
|
|
55
67
|
this.keys = [];
|
|
56
68
|
}
|
|
69
|
+
/** Used as a keyboard listener for key down */
|
|
57
70
|
tableKeyDown(e) {
|
|
58
71
|
if (this.disabled) return;
|
|
72
|
+
/**
|
|
73
|
+
* Avoid page scrolling etc.
|
|
74
|
+
* Enable default behavior for:
|
|
75
|
+
* Tab, Shift + Tab
|
|
76
|
+
* TODO: Actually it will be better to just prevent
|
|
77
|
+
* in ArrowKeys and PageKeys maybe?
|
|
78
|
+
* Or should the consumer stop propagation?!
|
|
79
|
+
* Cannot work with preventDefault as it will
|
|
80
|
+
* first capture the event from an input in cell for example
|
|
81
|
+
*/
|
|
59
82
|
if (Keys.ArrowDown === e.key || Keys.ArrowUp === e.key || Keys.ArrowLeft === e.key || Keys.ArrowRight === e.key) e.preventDefault();
|
|
83
|
+
/**
|
|
84
|
+
* Add key to the stack if it's
|
|
85
|
+
* not the same with the last (long press)
|
|
86
|
+
*/
|
|
60
87
|
if (this.keys.length === 0 || this.keys[this.keys.length - 1] !== e.key) this.keys.push(e.key);
|
|
88
|
+
/**
|
|
89
|
+
* Need to check if we are inside a grid cell
|
|
90
|
+
* or not to enable/disable Grid Navigation
|
|
91
|
+
*/
|
|
61
92
|
if (!(e.target instanceof Element)) return;
|
|
62
93
|
const cell = e.target.parentElement?.closest(`${this.selectors.Cell},${this.selectors.Row}`);
|
|
63
94
|
if (!cell) return;
|
|
64
95
|
if (cell.matches(this.selectors.Cell)) this.cellNavigation(e);
|
|
65
96
|
else this.gridNavigation(e);
|
|
66
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Handles the navigation inside a cell
|
|
100
|
+
*/
|
|
67
101
|
cellNavigation(e) {
|
|
68
102
|
if (!(e.target instanceof Element)) return;
|
|
103
|
+
/**
|
|
104
|
+
* Keys: Escape
|
|
105
|
+
* Restore grid navigation
|
|
106
|
+
*/
|
|
69
107
|
if (e.key === Keys.Escape) {
|
|
70
108
|
const cell = e.target.closest(this.selectors.Cell);
|
|
71
109
|
if (cell && this.isFocusable(cell)) {
|
|
@@ -73,6 +111,13 @@ var DataGridNav = class {
|
|
|
73
111
|
return;
|
|
74
112
|
}
|
|
75
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Keys: ArrowRight, ArrowDown
|
|
116
|
+
* Move to the next focusable cell, or the first one
|
|
117
|
+
*
|
|
118
|
+
* Arrow Down disabled:
|
|
119
|
+
* https://github.com/w3c/aria-practices/issues/2739#issuecomment-1613538972
|
|
120
|
+
*/
|
|
76
121
|
if (e.key === Keys.ArrowRight || e.key === Keys.ArrowDown) {
|
|
77
122
|
const cell = e.target.closest(this.selectors.Cell);
|
|
78
123
|
if (!cell) return;
|
|
@@ -82,6 +127,13 @@ var DataGridNav = class {
|
|
|
82
127
|
if (this.isFocusable(widgetToFocus)) widgetToFocus.focus();
|
|
83
128
|
return;
|
|
84
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Keys: ArrowLeft, ArrowUp
|
|
132
|
+
* Move to the previous focusable cell, or the last one
|
|
133
|
+
*
|
|
134
|
+
* Arrow Up disabled:
|
|
135
|
+
* https://github.com/w3c/aria-practices/issues/2739#issuecomment-1613538972
|
|
136
|
+
*/
|
|
85
137
|
if (e.key === Keys.ArrowLeft || e.key === Keys.ArrowUp) {
|
|
86
138
|
const cell = e.target.closest(this.selectors.Cell);
|
|
87
139
|
if (!cell) return;
|
|
@@ -91,11 +143,20 @@ var DataGridNav = class {
|
|
|
91
143
|
if (this.isFocusable(widgetToFocus)) widgetToFocus.focus();
|
|
92
144
|
}
|
|
93
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Handles the navigation outside a cell
|
|
148
|
+
* on the grid level
|
|
149
|
+
*/
|
|
94
150
|
gridNavigation(e) {
|
|
95
151
|
const { target } = e;
|
|
96
152
|
if (!(e.target instanceof Element)) return;
|
|
97
153
|
if (!(target instanceof Element)) return;
|
|
98
154
|
if (this.keys.length === 1) {
|
|
155
|
+
/**
|
|
156
|
+
* Keys: Enter
|
|
157
|
+
* Should move focus inside the cell to the first focusable element:
|
|
158
|
+
* https://www.w3.org/WAI/ARIA/apg/patterns/grid/#gridNav_inside
|
|
159
|
+
*/
|
|
99
160
|
if (/^[a-zA-Z0-9]$/.test(e.key)) {
|
|
100
161
|
const cell = e.target.querySelector(this.selectors.Focusable);
|
|
101
162
|
if (cell && this.isFocusable(cell) && cell instanceof HTMLInputElement) {
|
|
@@ -129,6 +190,10 @@ var DataGridNav = class {
|
|
|
129
190
|
}
|
|
130
191
|
return;
|
|
131
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* Keys: ArrowLeft, ArrowRight
|
|
195
|
+
* Should move focus to the next/previous cell
|
|
196
|
+
*/
|
|
132
197
|
if (e.key === Keys.ArrowLeft || e.key === Keys.ArrowRight) {
|
|
133
198
|
const direction = e.key === Keys.ArrowLeft ? "prev" : "next";
|
|
134
199
|
const cell = e.target.closest(this.selectors.Cell);
|
|
@@ -140,20 +205,37 @@ var DataGridNav = class {
|
|
|
140
205
|
e.preventDefault();
|
|
141
206
|
}
|
|
142
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Keys: Up,Down
|
|
210
|
+
* Should move focus to the same column of the next/previous row
|
|
211
|
+
*/
|
|
143
212
|
if (e.key === Keys.ArrowDown || e.key === Keys.ArrowUp) {
|
|
144
213
|
this.verticalCellNavigation(e);
|
|
145
214
|
return;
|
|
146
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Keys: PageUp, PageDown
|
|
218
|
+
* Should move focus to the first/last row
|
|
219
|
+
* or a predefined number of rows if user provides a value
|
|
220
|
+
*/
|
|
147
221
|
if (e.key === Keys.PageUp || e.key === Keys.PageDown) {
|
|
148
222
|
this.pageCellNavigation(e);
|
|
149
223
|
return;
|
|
150
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Keys: Home, End
|
|
227
|
+
* Should move focus to the first/last cell of the current row
|
|
228
|
+
*/
|
|
151
229
|
if (e.key === Keys.Home || e.key === Keys.End) {
|
|
152
230
|
const rowChildren = [...e.target.closest(this.selectors.Row)?.children || []];
|
|
153
231
|
if (e.key === Keys.End) rowChildren.reverse();
|
|
154
232
|
this.focusOnFirstCell(rowChildren);
|
|
155
233
|
}
|
|
156
234
|
} else {
|
|
235
|
+
/**
|
|
236
|
+
* Keys: Control + Home, Control + End
|
|
237
|
+
* Should move focus to the first/last cell of the first/last row
|
|
238
|
+
*/
|
|
157
239
|
const [firstKey, secondKey] = this.keys;
|
|
158
240
|
if (firstKey === "Control" && (secondKey === Keys.Home || secondKey === Keys.End)) {
|
|
159
241
|
const siblings = e.target.closest(this.selectors.Row).parentElement?.children;
|
|
@@ -200,34 +282,43 @@ var DataGridNav = class {
|
|
|
200
282
|
const rowPosition = this.getRowIndex(row);
|
|
201
283
|
if (cellPosition === void 0 || rowPosition === void 0) return;
|
|
202
284
|
const direction = e.key === Keys.ArrowUp ? "prev" : "next";
|
|
285
|
+
/** Find previous rowgroup and focus on the proper cell */
|
|
203
286
|
if (rowPosition === 0 && direction === "prev") {
|
|
204
287
|
const currentRowGroup = row.parentElement?.closest(this.selectors.RowGroup);
|
|
205
288
|
const siblingRowGroups = [...currentRowGroup?.parentElement?.children || []];
|
|
206
289
|
const currentRowGroupIdx = siblingRowGroups.findIndex((el) => el === currentRowGroup);
|
|
207
290
|
if (currentRowGroupIdx !== 0) {
|
|
208
291
|
const rows = [...siblingRowGroups[currentRowGroupIdx - 1].querySelectorAll(this.selectors.Row)];
|
|
209
|
-
const child
|
|
210
|
-
if (child
|
|
292
|
+
const child = rows[rows.length - 1].children[cellPosition];
|
|
293
|
+
if (child && this.isFocusable(child)) child.focus();
|
|
211
294
|
return;
|
|
212
295
|
}
|
|
213
296
|
}
|
|
297
|
+
/** Find next rowgroup and focus on the proper cell */
|
|
214
298
|
if (rowPosition === [...row.parentElement?.querySelectorAll(this.selectors.Row) || []].length - 1 && direction === "next") {
|
|
215
299
|
const currentRowGroup = row.parentElement?.closest(this.selectors.RowGroup);
|
|
216
300
|
const siblingRowGroups = [...currentRowGroup?.parentElement?.children || []];
|
|
217
301
|
const currentRowGroupIdx = siblingRowGroups.findIndex((el) => el === currentRowGroup);
|
|
218
302
|
if (currentRowGroupIdx !== siblingRowGroups.length - 1) {
|
|
219
|
-
const child
|
|
220
|
-
if (child
|
|
303
|
+
const child = [...siblingRowGroups[currentRowGroupIdx + 1].querySelectorAll(this.selectors.Row)][0].children[cellPosition];
|
|
304
|
+
if (child && this.isFocusable(child)) child.focus();
|
|
221
305
|
return;
|
|
222
306
|
}
|
|
223
307
|
return;
|
|
224
308
|
}
|
|
309
|
+
/** Navigation in the same rowgroup */
|
|
225
310
|
const destinationRow = this.findUntil(direction, row, this.selectors.Row);
|
|
226
311
|
if (!destinationRow) return;
|
|
227
312
|
const child = destinationRow.children[cellPosition];
|
|
228
313
|
if (child && this.isFocusable(child)) child.focus();
|
|
229
314
|
}
|
|
230
315
|
}
|
|
316
|
+
/**
|
|
317
|
+
* Sending a row `Element` and then the first cell will be focused.
|
|
318
|
+
*
|
|
319
|
+
* If you want to focus the last cell then the row children can be passed in
|
|
320
|
+
* reversed order
|
|
321
|
+
*/
|
|
231
322
|
focusOnFirstCell(el) {
|
|
232
323
|
for (let i = 0; i < el.length; i++) {
|
|
233
324
|
const child = el[i];
|
|
@@ -237,6 +328,10 @@ var DataGridNav = class {
|
|
|
237
328
|
}
|
|
238
329
|
}
|
|
239
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Get the column index of a `cell` based on the first `row` parent.
|
|
333
|
+
* `cellIndex` could be used, but it's not supported in HTML tables.
|
|
334
|
+
*/
|
|
240
335
|
getColumnIndex(cell) {
|
|
241
336
|
let position = 0;
|
|
242
337
|
const siblings = cell?.parentNode?.children;
|
|
@@ -245,6 +340,10 @@ var DataGridNav = class {
|
|
|
245
340
|
if (siblings[position] === void 0) return;
|
|
246
341
|
return position;
|
|
247
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Get the row index of a `row` based
|
|
345
|
+
* on its sibling rows
|
|
346
|
+
*/
|
|
248
347
|
getRowIndex(row) {
|
|
249
348
|
let position = 0;
|
|
250
349
|
const siblings = row?.parentNode?.children;
|
|
@@ -253,6 +352,10 @@ var DataGridNav = class {
|
|
|
253
352
|
if (siblings[position] === void 0) return;
|
|
254
353
|
return position;
|
|
255
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* Equivalent to prevUntil/nextUntil in jQuery
|
|
357
|
+
* https://api.jquery.com/prevUntil/
|
|
358
|
+
*/
|
|
256
359
|
findUntil(direction, el, matchSelector, exitSelector) {
|
|
257
360
|
let element = el;
|
|
258
361
|
const method = direction === "next" ? "nextSibling" : "previousSibling";
|
|
@@ -276,4 +379,5 @@ function useTableNav(options) {
|
|
|
276
379
|
tableNav: nav
|
|
277
380
|
};
|
|
278
381
|
}
|
|
382
|
+
//#endregion
|
|
279
383
|
export { useTableNav };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
+
//#region src/hooks/useTranslationMemo.ts
|
|
3
4
|
function useTranslationMemo(func) {
|
|
4
5
|
const { t } = useTranslation();
|
|
5
6
|
return useMemo(() => {
|
|
@@ -7,4 +8,5 @@ function useTranslationMemo(func) {
|
|
|
7
8
|
return func();
|
|
8
9
|
}, [func, t]);
|
|
9
10
|
}
|
|
11
|
+
//#endregion
|
|
10
12
|
export { useTranslationMemo };
|
package/dist/index.js
CHANGED
|
@@ -55,6 +55,7 @@ import { Button } from "./components/buttons/Button/Button.js";
|
|
|
55
55
|
import { IconButton } from "./components/buttons/IconButton/IconButton.js";
|
|
56
56
|
import { InlineIconButton } from "./components/buttons/InlineIconButton/InlineIconButton.js";
|
|
57
57
|
import { PillButton } from "./components/buttons/PillButton/PillButton.js";
|
|
58
|
+
import { ns, resources } from "./config/i18n.js";
|
|
58
59
|
import { useStateAndRef } from "./hooks/useStateAndRef.js";
|
|
59
60
|
import { DomUtils } from "./utils/dom.utils.js";
|
|
60
61
|
import { BottomSheet } from "./components/overlays/BottomSheet/BottomSheet.js";
|
|
@@ -66,7 +67,6 @@ import { ToggleButton } from "./components/buttons/ToggleButton/ToggleButton.js"
|
|
|
66
67
|
import { Checkbox } from "./components/inputs/Checkbox/Checkbox.js";
|
|
67
68
|
import { useLongPressRepeat } from "./hooks/useLongPressRepeat.js";
|
|
68
69
|
import { useScrollableListBox } from "./hooks/useScrollableListBox.js";
|
|
69
|
-
import { ns, resources } from "./config/i18n.js";
|
|
70
70
|
import { FormField } from "./components/inputs/FormField/FormField.js";
|
|
71
71
|
import { DateTimeUtils } from "./utils/date-time.utils.js";
|
|
72
72
|
import { DatePicker } from "./components/inputs/DateTime/DatePicker/DatePicker.js";
|
package/dist/tw-ui-plugin.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import plugin from "tailwindcss/plugin";
|
|
2
|
-
|
|
2
|
+
//#region src/tw-ui-plugin.ts
|
|
3
|
+
var uiPlugin = plugin(({ addVariant }) => {
|
|
3
4
|
addVariant("input-filled", [
|
|
4
5
|
"&:has(input:not(:placeholder-shown))",
|
|
5
6
|
"&:is(:where(.group\\/input-content):has(:is(input:not(:placeholder-shown))) *)",
|
|
@@ -18,4 +19,5 @@ var tw_ui_plugin_default = plugin(({ addVariant }) => {
|
|
|
18
19
|
"&:is(:where(.group\\/date-picker-content):where([data-rac])[data-disabled] *)"
|
|
19
20
|
].join(", "));
|
|
20
21
|
});
|
|
21
|
-
|
|
22
|
+
//#endregion
|
|
23
|
+
export { uiPlugin as default };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/array.utils.ts
|
|
2
|
+
var ArrayUtils;
|
|
2
3
|
(function(_ArrayUtils) {
|
|
3
4
|
_ArrayUtils.fromCommaSeparatedStr = (str) => {
|
|
4
5
|
if (!str) return [];
|
|
5
6
|
return str.split(",").map((item) => item.trim());
|
|
6
7
|
};
|
|
7
8
|
})(ArrayUtils || (ArrayUtils = {}));
|
|
9
|
+
//#endregion
|
|
8
10
|
export { ArrayUtils };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/compoundMapper.ts
|
|
2
|
+
var compoundMapper = (config) => {
|
|
2
3
|
return (props) => {
|
|
3
4
|
return (config.compoundVariants?.find((v) => {
|
|
4
5
|
return Object.entries(v).filter(([key]) => key !== "value").every(([key, value]) => {
|
|
@@ -8,4 +9,5 @@ const compoundMapper = (config) => {
|
|
|
8
9
|
}))?.value ?? config.default;
|
|
9
10
|
};
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { compoundMapper };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CalendarDate, CalendarDateTime, fromDate, getLocalTimeZone, parseAbsolute, parseAbsoluteToLocal } from "@internationalized/date";
|
|
2
|
-
|
|
2
|
+
//#region src/utils/date-time.utils.ts
|
|
3
|
+
var DateTimeUtils;
|
|
3
4
|
(function(_DateTimeUtils) {
|
|
4
5
|
function fromISOtoZonedDateTime(isoString) {
|
|
5
6
|
return parseAbsoluteToLocal(isoString);
|
|
@@ -47,4 +48,5 @@ let DateTimeUtils;
|
|
|
47
48
|
}
|
|
48
49
|
_DateTimeUtils.formatTextDateToCalendarDateTime = formatTextDateToCalendarDateTime;
|
|
49
50
|
})(DateTimeUtils || (DateTimeUtils = {}));
|
|
51
|
+
//#endregion
|
|
50
52
|
export { DateTimeUtils };
|
package/dist/utils/date.utils.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DateTime } from "luxon";
|
|
2
|
-
|
|
2
|
+
//#region src/utils/date.utils.ts
|
|
3
|
+
var DateUtils;
|
|
3
4
|
(function(_DateUtils) {
|
|
4
5
|
const DATE_FORMAT = "dd/MM/yyyy";
|
|
5
6
|
const DATETIME_FORMAT = "dd/MM/yyyy HH:mm:ss";
|
|
@@ -14,4 +15,5 @@ let DateUtils;
|
|
|
14
15
|
}
|
|
15
16
|
_DateUtils.formatRelativeTime = formatRelativeTime;
|
|
16
17
|
})(DateUtils || (DateUtils = {}));
|
|
18
|
+
//#endregion
|
|
17
19
|
export { DateUtils };
|
package/dist/utils/dom.utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/dom.utils.ts
|
|
2
|
+
var DomUtils;
|
|
2
3
|
(function(_DomUtils) {
|
|
3
4
|
const KEYBOARD_INPUTS = new Set([
|
|
4
5
|
"button",
|
|
@@ -14,4 +15,5 @@ let DomUtils;
|
|
|
14
15
|
return event.nativeEvent instanceof KeyboardEvent;
|
|
15
16
|
};
|
|
16
17
|
})(DomUtils || (DomUtils = {}));
|
|
18
|
+
//#endregion
|
|
17
19
|
export { DomUtils };
|
|
@@ -5,5 +5,9 @@ export declare namespace FileUtils {
|
|
|
5
5
|
const downloadFile: (data: Blob | AxiosResponse<Blob>, fileName?: string, revokeTimeoutMs?: number) => void;
|
|
6
6
|
const isFileTypeAccepted: (file: File, fileTypes?: readonly string[] | string[]) => boolean;
|
|
7
7
|
const getCalculatedFileSize: (file?: File) => string;
|
|
8
|
+
const getFileDisplaySize: (state: {
|
|
9
|
+
file?: File;
|
|
10
|
+
displaySize?: number;
|
|
11
|
+
}) => string;
|
|
8
12
|
const formatBytes: (size: number, decimals?: number) => string;
|
|
9
13
|
}
|
package/dist/utils/file.utils.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RestUtils } from "./rest.utils.js";
|
|
2
|
-
|
|
2
|
+
//#region src/utils/file.utils.ts
|
|
3
|
+
var FileUtils;
|
|
3
4
|
(function(_FileUtils) {
|
|
4
5
|
const getObjectUrl = _FileUtils.getObjectUrl = (data, revokeTimeoutMs = 4e4) => {
|
|
5
6
|
const url = URL.createObjectURL(data instanceof Blob ? data : data.data);
|
|
@@ -26,18 +27,24 @@ let FileUtils;
|
|
|
26
27
|
return file.name.toLowerCase().endsWith(type.toLowerCase());
|
|
27
28
|
});
|
|
28
29
|
};
|
|
29
|
-
_FileUtils.getCalculatedFileSize = (file) => {
|
|
30
|
+
const getCalculatedFileSize = _FileUtils.getCalculatedFileSize = (file) => {
|
|
30
31
|
if (!file) return "";
|
|
31
32
|
if (file.size < 1024) return `${file.size} B`;
|
|
32
33
|
if (file.size < 1024 * 1024) return `${(file.size / 1024).toFixed(2)} KB`;
|
|
33
34
|
if (file.size < 1024 * 1024 * 1024) return `${(file.size / 1024 / 1024).toFixed(2)} MB`;
|
|
34
35
|
return `${(file.size / 1024 / 1024 / 1024).toFixed(2)} GB`;
|
|
35
36
|
};
|
|
36
|
-
_FileUtils.
|
|
37
|
+
_FileUtils.getFileDisplaySize = (state) => {
|
|
38
|
+
if (state.file) return getCalculatedFileSize(state.file);
|
|
39
|
+
if (state.displaySize != null) return formatBytes(state.displaySize);
|
|
40
|
+
return "";
|
|
41
|
+
};
|
|
42
|
+
const formatBytes = _FileUtils.formatBytes = (size, decimals = 2) => {
|
|
37
43
|
if (size < 1024) return `${size} B`;
|
|
38
44
|
if (size < 1024 * 1024) return `${(size / 1024).toFixed(decimals)} KB`;
|
|
39
45
|
if (size < 1024 * 1024 * 1024) return `${(size / 1024 / 1024).toFixed(decimals)} MB`;
|
|
40
46
|
return `${(size / 1024 / 1024 / 1024).toFixed(decimals)} GB`;
|
|
41
47
|
};
|
|
42
48
|
})(FileUtils || (FileUtils = {}));
|
|
49
|
+
//#endregion
|
|
43
50
|
export { FileUtils };
|
package/dist/utils/isEqual.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ObjectUtils } from "./object.utils.js";
|
|
2
|
-
|
|
2
|
+
//#region src/utils/isEqual.ts
|
|
3
|
+
var isEqual = (a, b) => {
|
|
3
4
|
return eq(a, b);
|
|
4
5
|
};
|
|
5
6
|
var eq = (a, b, aStack, bStack) => {
|
|
@@ -54,4 +55,5 @@ var deepEq = (a, b, aStack, bStack) => {
|
|
|
54
55
|
bStack.pop();
|
|
55
56
|
return true;
|
|
56
57
|
};
|
|
58
|
+
//#endregion
|
|
57
59
|
export { isEqual };
|
package/dist/utils/logger.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import log from "loglevel";
|
|
2
2
|
import prefix from "loglevel-plugin-prefix";
|
|
3
|
+
//#region src/utils/logger.ts
|
|
3
4
|
prefix.reg(log);
|
|
4
5
|
prefix.apply(log, {
|
|
5
6
|
template: "[%t] %l:",
|
|
@@ -7,11 +8,12 @@ prefix.apply(log, {
|
|
|
7
8
|
return date.toISOString();
|
|
8
9
|
}
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
+
var logger = {
|
|
11
12
|
info: (...args) => log.info(...args),
|
|
12
13
|
debug: (...args) => log.debug(...args),
|
|
13
14
|
warn: (...args) => log.warn(...args),
|
|
14
15
|
error: (...args) => log.error(...args),
|
|
15
16
|
trace: (...args) => log.trace(...args)
|
|
16
17
|
};
|
|
18
|
+
//#endregion
|
|
17
19
|
export { logger };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/object.utils.ts
|
|
2
|
+
var ObjectUtils;
|
|
2
3
|
(function(_ObjectUtils) {
|
|
3
4
|
_ObjectUtils.isNil = (obj) => {
|
|
4
5
|
return obj === null || obj === void 0;
|
|
@@ -33,4 +34,5 @@ let ObjectUtils;
|
|
|
33
34
|
return output;
|
|
34
35
|
};
|
|
35
36
|
})(ObjectUtils || (ObjectUtils = {}));
|
|
37
|
+
//#endregion
|
|
36
38
|
export { ObjectUtils };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/queries.utils.ts
|
|
2
|
+
var QueriesUtils;
|
|
2
3
|
(function(_QueriesUtils) {
|
|
3
4
|
_QueriesUtils.prefetchMultipleQueries = (queryClient, queries) => {
|
|
4
5
|
return Promise.all(queries.map((query) => query(queryClient)));
|
|
5
6
|
};
|
|
6
7
|
})(QueriesUtils || (QueriesUtils = {}));
|
|
8
|
+
//#endregion
|
|
7
9
|
export { QueriesUtils };
|
package/dist/utils/rest.utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
|
|
3
|
+
//#region src/utils/rest.utils.ts
|
|
4
|
+
var RestUtils;
|
|
4
5
|
(function(_RestUtils) {
|
|
5
6
|
_RestUtils.extractServerResponseCode = (e) => {
|
|
6
7
|
if (e instanceof z.ZodError) return "validation-exception";
|
|
@@ -28,4 +29,5 @@ let RestUtils;
|
|
|
28
29
|
return contentDisposition ? /filename=["']?([^"';]+)/i.exec(contentDisposition)?.[1] : void 0;
|
|
29
30
|
};
|
|
30
31
|
})(RestUtils || (RestUtils = {}));
|
|
32
|
+
//#endregion
|
|
31
33
|
export { RestUtils };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/routing.utils.ts
|
|
2
|
+
var RoutingUtils;
|
|
2
3
|
(function(_RoutingUtils) {
|
|
3
4
|
_RoutingUtils.addQueryParams = (path, params) => {
|
|
4
5
|
const sParams = new URLSearchParams();
|
|
@@ -6,4 +7,5 @@ let RoutingUtils;
|
|
|
6
7
|
return `${path}?${sParams.toString()}`;
|
|
7
8
|
};
|
|
8
9
|
})(RoutingUtils || (RoutingUtils = {}));
|
|
10
|
+
//#endregion
|
|
9
11
|
export { RoutingUtils };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/string.utils.ts
|
|
2
|
+
var StringUtils;
|
|
2
3
|
(function(_StringUtils) {
|
|
3
4
|
_StringUtils.containsCaseInsensitive = (str, substr) => {
|
|
4
5
|
return str.toLowerCase().includes(substr.toLowerCase());
|
|
@@ -7,4 +8,5 @@ let StringUtils;
|
|
|
7
8
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
8
9
|
};
|
|
9
10
|
})(StringUtils || (StringUtils = {}));
|
|
11
|
+
//#endregion
|
|
10
12
|
export { StringUtils };
|
package/dist/utils/zod.utils.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
//#region src/utils/zod.utils.ts
|
|
3
|
+
var ZodUtils;
|
|
3
4
|
(function(_ZodUtils) {
|
|
4
5
|
const unwrapZodType = _ZodUtils.unwrapZodType = (schemaType) => {
|
|
5
6
|
let unwrappedType = schemaType;
|
|
@@ -14,4 +15,5 @@ let ZodUtils;
|
|
|
14
15
|
return unwrappedType instanceof z.ZodObject && hasZodObjectProperty(unwrappedType, "start", z.ZodISODateTime) && hasZodObjectProperty(unwrappedType, "end", z.ZodISODateTime);
|
|
15
16
|
};
|
|
16
17
|
})(ZodUtils || (ZodUtils = {}));
|
|
18
|
+
//#endregion
|
|
17
19
|
export { ZodUtils };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@povio/ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"react-responsive": "^10.0.1",
|
|
48
48
|
"react-stately": "^3.44.0",
|
|
49
49
|
"react-toastify": "^11.0.5",
|
|
50
|
-
"tailwindcss": "^4.1
|
|
50
|
+
"tailwindcss": "^4.2.1",
|
|
51
51
|
"tailwindcss-react-aria-components": "^2.0.1",
|
|
52
52
|
"zod": "^4.3.5"
|
|
53
53
|
},
|