@povio/ui 2.2.6 → 2.2.8-rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- 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 +3 -1
- 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 +3 -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 +3 -1
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +3 -1
- package/dist/components/inputs/Checkbox/checkbox.cva.js +6 -4
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +63 -4
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +98 -10
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +63 -4
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +64 -6
- 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 +4 -2
- 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 +3 -1
- 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.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +6 -5
- package/dist/components/inputs/DateTime/shared/YearPicker.js +3 -1
- package/dist/components/inputs/File/FileUpload.js +6 -4
- package/dist/components/inputs/File/FileUploadContainer.js +3 -1
- package/dist/components/inputs/File/InputUpload.js +3 -1
- package/dist/components/inputs/File/shared/FileCard.js +3 -1
- package/dist/components/inputs/File/shared/FileCardList.js +3 -1
- 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 +4 -2
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +4 -2
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -2
- 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 +3 -1
- package/dist/components/inputs/FormField/FormFieldError.js +3 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +3 -1
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +4 -2
- package/dist/components/inputs/FormField/FormFieldHelper.js +3 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +3 -1
- package/dist/components/inputs/FormField/formFieldError.cva.js +3 -1
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +3 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +82 -8
- 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.d.ts +1 -0
- package/dist/components/inputs/Input/TextInput/TextInput.js +85 -8
- package/dist/components/inputs/Input/shared/InputContent.js +3 -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 +3 -1
- package/dist/components/inputs/RadioGroup/radio.cva.js +5 -3
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +64 -2
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +3 -1
- package/dist/components/inputs/Selection/Select/Select.js +65 -2
- package/dist/components/inputs/Selection/shared/SelectBase.js +3 -1
- 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 +3 -1
- 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 +4 -2
- package/dist/components/inputs/shared/CheckContent.js +3 -1
- package/dist/components/inputs/shared/InputClear.js +5 -3
- package/dist/components/inputs/shared/StaticInput.d.ts +18 -0
- package/dist/components/inputs/shared/StaticInput.js +69 -0
- 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 +4 -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.js +3 -1
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -2
- 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 +3 -1
- 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.js +3 -1
- package/dist/components/table/ColumnConfig.js +3 -1
- package/dist/components/table/HeaderText.js +3 -1
- package/dist/components/table/InfiniteTable.js +3 -1
- package/dist/components/table/PaginatedTable.js +3 -1
- package/dist/components/table/Table.js +4 -2
- package/dist/components/table/table.cva.js +8 -6
- 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 +5 -0
- package/dist/config/uiConfig.context.js +10 -2
- 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/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.d.ts +10 -0
- package/dist/utils/date-time.utils.js +85 -2
- package/dist/utils/date.utils.js +3 -1
- package/dist/utils/dom.utils.js +3 -1
- package/dist/utils/file.utils.js +3 -1
- 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,9 +1,10 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
|
-
import
|
|
2
|
+
import "../../../../config/i18n.js";
|
|
3
3
|
import { Select } from "../../Selection/Select/Select.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
|
-
|
|
6
|
+
//#region src/components/inputs/TextEditor/Toolbar/TextStyleSelect.tsx
|
|
7
|
+
var TextStyleSelect = ({ editor }) => {
|
|
7
8
|
const { t } = useTranslation("ui");
|
|
8
9
|
if (!!!editor.extensionManager.extensions.find((extension) => extension.name === "heading")) return null;
|
|
9
10
|
const getItem = (level) => {
|
|
@@ -49,4 +50,5 @@ const TextStyleSelect = ({ editor }) => {
|
|
|
49
50
|
isDisabled: !editor.isEditable
|
|
50
51
|
});
|
|
51
52
|
};
|
|
53
|
+
//#endregion
|
|
52
54
|
export { TextStyleSelect };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/components/inputs/TextEditor/textEditor.types.ts
|
|
2
|
+
var defaultColors = [
|
|
2
3
|
"#000000",
|
|
3
4
|
"#e60000",
|
|
4
5
|
"#ff9900",
|
|
@@ -35,4 +36,5 @@ const defaultColors = [
|
|
|
35
36
|
"#002966",
|
|
36
37
|
"#3d1466"
|
|
37
38
|
];
|
|
39
|
+
//#endregion
|
|
38
40
|
export { defaultColors };
|
|
@@ -8,6 +8,7 @@ import { clsx } from "clsx";
|
|
|
8
8
|
import { Switch } from "react-aria-components";
|
|
9
9
|
import { mergeRefs } from "@react-aria/utils";
|
|
10
10
|
import { Controller } from "react-hook-form";
|
|
11
|
+
//#region src/components/inputs/Toggle/Toggle.tsx
|
|
11
12
|
var ToggleBase = (props) => {
|
|
12
13
|
const ui = UIConfig.useConfig();
|
|
13
14
|
const toggleCva = UIStyle.useCva("toggle.cva", toggle);
|
|
@@ -35,7 +36,7 @@ var ToggleBase = (props) => {
|
|
|
35
36
|
})]
|
|
36
37
|
}), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
+
var Toggle = (props) => {
|
|
39
40
|
if ("formControl" in props && props.formControl) {
|
|
40
41
|
const { formControl, ref, ...innerProps } = props;
|
|
41
42
|
return /* @__PURE__ */ jsx(Controller, {
|
|
@@ -56,4 +57,5 @@ const Toggle = (props) => {
|
|
|
56
57
|
}
|
|
57
58
|
return /* @__PURE__ */ jsx(ToggleBase, { ...props });
|
|
58
59
|
};
|
|
60
|
+
//#endregion
|
|
59
61
|
export { Toggle };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { uiGroupOutlineClass } from "../../outline.clsx.js";
|
|
2
2
|
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
|
|
4
|
+
//#region src/components/inputs/Toggle/toggle.cva.ts
|
|
5
|
+
var toggle = cva(["h-6 w-10 rounded-full before:m-0-5 before:block before:aspect-square before:h-5 before:rounded-full before:transition-transform before:content-[''] group-selected:before:translate-x-4", uiGroupOutlineClass], {
|
|
5
6
|
variants: { variant: { default: [
|
|
6
7
|
"bg-interactive-contained-secondary-idle",
|
|
7
8
|
"group-disabled:bg-interactive-contained-secondary-disabled",
|
|
@@ -20,9 +21,10 @@ const toggle = cva(["h-6 w-10 rounded-full before:m-0-5 before:block before:aspe
|
|
|
20
21
|
] } },
|
|
21
22
|
defaultVariants: { variant: "default" }
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
var toggleTypography = compoundMapper({ default: {
|
|
24
25
|
size: "label-1",
|
|
25
26
|
sizeMobile: "label-1",
|
|
26
27
|
variant: "default"
|
|
27
28
|
} });
|
|
29
|
+
//#endregion
|
|
28
30
|
export { toggle, toggleTypography };
|
|
@@ -2,7 +2,8 @@ import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
|
2
2
|
import { typography } from "../../text/Typography/typography.cva.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import clsx$1 from "clsx";
|
|
5
|
-
|
|
5
|
+
//#region src/components/inputs/shared/CheckContent.tsx
|
|
6
|
+
var CheckContent = ({ children, className, ...props }) => {
|
|
6
7
|
return /* @__PURE__ */ jsx("div", {
|
|
7
8
|
className: clsx$1(UIStyle.useCva("typography.cva", typography)({
|
|
8
9
|
size: "label-1",
|
|
@@ -14,4 +15,5 @@ const CheckContent = ({ children, className, ...props }) => {
|
|
|
14
15
|
children
|
|
15
16
|
});
|
|
16
17
|
};
|
|
18
|
+
//#endregion
|
|
17
19
|
export { CheckContent };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
2
2
|
import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
|
|
3
|
-
import
|
|
3
|
+
import "../../../config/i18n.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
|
-
|
|
7
|
+
//#region src/components/inputs/shared/InputClear.tsx
|
|
8
|
+
var InputClear = ({ onClear, className, style, show }) => {
|
|
8
9
|
const { t } = useTranslation("ui");
|
|
9
10
|
return /* @__PURE__ */ jsx(InlineIconButton, {
|
|
10
11
|
color: "secondary",
|
|
11
|
-
className: clsx("invisible flex items-center", "group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", !show && "invisible!", className),
|
|
12
|
+
className: clsx("invisible relative z-1 flex items-center", "group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", !show && "invisible!", className),
|
|
12
13
|
label: t(($) => $.ui.clearAlt),
|
|
13
14
|
icon: CloseIcon,
|
|
14
15
|
onPress: onClear,
|
|
@@ -16,4 +17,5 @@ const InputClear = ({ onClear, className, style, show }) => {
|
|
|
16
17
|
style
|
|
17
18
|
});
|
|
18
19
|
};
|
|
20
|
+
//#endregion
|
|
19
21
|
export { InputClear };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FormFieldProps } from '../FormField/FormField';
|
|
3
|
+
import { TextInputProps } from '../Input/TextInput/TextInput';
|
|
4
|
+
import { InputSizeProps, InputVariantProps } from './input.cva';
|
|
5
|
+
interface StaticInputProps extends FormFieldProps {
|
|
6
|
+
onInteract: (shouldFocus: boolean) => void;
|
|
7
|
+
as?: TextInputProps["as"];
|
|
8
|
+
size?: InputSizeProps["size"];
|
|
9
|
+
variant?: InputVariantProps["variant"];
|
|
10
|
+
placeholder?: ReactNode;
|
|
11
|
+
displayValue?: ReactNode;
|
|
12
|
+
isEmpty?: boolean;
|
|
13
|
+
leadingVisual?: ReactNode;
|
|
14
|
+
trailingVisual?: ReactNode;
|
|
15
|
+
inputClassName?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const StaticInput: ({ onInteract, as, size, variant, placeholder, displayValue, isEmpty, leadingVisual, trailingVisual, inputClassName, className, ...formFieldProps }: StaticInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
|
+
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
3
|
+
import { inputBase, inputSize } from "./input.cva.js";
|
|
4
|
+
import { FormField } from "../FormField/FormField.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
//#region src/components/inputs/shared/StaticInput.tsx
|
|
8
|
+
var StaticInput = ({ onInteract, as, size, variant, placeholder, displayValue, isEmpty, leadingVisual, trailingVisual, inputClassName, className, ...formFieldProps }) => {
|
|
9
|
+
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
10
|
+
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
11
|
+
let hasValue = !!displayValue;
|
|
12
|
+
if (isEmpty != null) hasValue = !isEmpty;
|
|
13
|
+
let staticDisplayContent = placeholder;
|
|
14
|
+
if (hasValue) staticDisplayContent = displayValue;
|
|
15
|
+
else if (as === "floating") staticDisplayContent = null;
|
|
16
|
+
const shouldRenderFloatingLineSpacer = as === "floating" && !hasValue;
|
|
17
|
+
return /* @__PURE__ */ jsx(FormField, {
|
|
18
|
+
...formFieldProps,
|
|
19
|
+
as,
|
|
20
|
+
className,
|
|
21
|
+
onMouseEnter: () => onInteract(false),
|
|
22
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
23
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
tabIndex: formFieldProps.isDisabled ? -1 : 0,
|
|
25
|
+
onFocus: () => onInteract(true),
|
|
26
|
+
onClick: () => onInteract(true),
|
|
27
|
+
onPointerDown: () => onInteract(true),
|
|
28
|
+
"data-is-empty": !hasValue || void 0,
|
|
29
|
+
"data-disabled": formFieldProps.isDisabled || void 0,
|
|
30
|
+
"data-is-disabled": formFieldProps.isDisabled || void 0,
|
|
31
|
+
"data-has-selection": hasValue || void 0,
|
|
32
|
+
"data-rac": "",
|
|
33
|
+
className: clsx("group/static-input group/input-content group/select-content relative flex min-w-input-width-min-width items-center justify-between gap-input-gap-input-text-to-elements", inputBaseCva({
|
|
34
|
+
as,
|
|
35
|
+
variant
|
|
36
|
+
}), inputClassName),
|
|
37
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
38
|
+
className: clsx(inputSizeCva({
|
|
39
|
+
size,
|
|
40
|
+
as
|
|
41
|
+
}), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!"),
|
|
42
|
+
children: [leadingVisual && /* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: "pointer-events-none shrink-0",
|
|
44
|
+
children: leadingVisual
|
|
45
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
46
|
+
className: clsx("flex w-full truncate", as === "floating" && "flex-col", as === "filter" && "gap-input-gap-input-text-to-elements"),
|
|
47
|
+
children: [as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
48
|
+
as,
|
|
49
|
+
size,
|
|
50
|
+
label: formFieldProps.label,
|
|
51
|
+
isRequired: formFieldProps.isRequired,
|
|
52
|
+
isDisabled: formFieldProps.isDisabled
|
|
53
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
54
|
+
className: clsx("truncate", !hasValue && "text-text-default-3"),
|
|
55
|
+
children: [staticDisplayContent, shouldRenderFloatingLineSpacer && /* @__PURE__ */ jsx(Fragment, { children: "\xA0" })]
|
|
56
|
+
})]
|
|
57
|
+
})]
|
|
58
|
+
}), trailingVisual && /* @__PURE__ */ jsx("div", {
|
|
59
|
+
className: clsx(inputSizeCva({
|
|
60
|
+
size,
|
|
61
|
+
as
|
|
62
|
+
}), "pointer-events-none flex items-center gap-input-gap-trailing-elements py-0! pl-0!"),
|
|
63
|
+
children: trailingVisual
|
|
64
|
+
})]
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { StaticInput };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
//#region src/components/inputs/shared/TooltipWrapper.tsx
|
|
4
|
+
var TooltipWrapper = (props) => {
|
|
4
5
|
if (props.as !== "inline") return props.children;
|
|
5
6
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
6
7
|
text: props.error || void 0,
|
|
@@ -16,4 +17,5 @@ const TooltipWrapper = (props) => {
|
|
|
16
17
|
})
|
|
17
18
|
});
|
|
18
19
|
};
|
|
20
|
+
//#endregion
|
|
19
21
|
export { TooltipWrapper };
|
|
@@ -2,7 +2,8 @@ import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
|
2
2
|
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
|
|
5
|
+
//#region src/components/inputs/shared/input.cva.ts
|
|
6
|
+
var inputBase = cva([uiOutlineClass, "flex w-full not-[textarea]:truncate"], {
|
|
6
7
|
variants: {
|
|
7
8
|
variant: {
|
|
8
9
|
outlined: "",
|
|
@@ -127,7 +128,7 @@ const inputBase = cva([uiOutlineClass, "flex w-full not-[textarea]:truncate"], {
|
|
|
127
128
|
as: "default"
|
|
128
129
|
}
|
|
129
130
|
});
|
|
130
|
-
|
|
131
|
+
var inputSize = cva("", {
|
|
131
132
|
variants: {
|
|
132
133
|
size: {
|
|
133
134
|
"extra-small": "text-label-1",
|
|
@@ -190,7 +191,7 @@ const inputSize = cva("", {
|
|
|
190
191
|
as: "default"
|
|
191
192
|
}
|
|
192
193
|
});
|
|
193
|
-
|
|
194
|
+
var inputSide = cva("", {
|
|
194
195
|
variants: {
|
|
195
196
|
size: {
|
|
196
197
|
"extra-small": "",
|
|
@@ -268,11 +269,12 @@ const inputSide = cva("", {
|
|
|
268
269
|
],
|
|
269
270
|
defaultVariants: { size: "default" }
|
|
270
271
|
});
|
|
271
|
-
|
|
272
|
+
var useInputCva = () => {
|
|
272
273
|
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
273
274
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
274
275
|
return ({ className, ...rest }) => {
|
|
275
276
|
return clsx(inputBaseCva(rest), inputSizeCva(rest), className);
|
|
276
277
|
};
|
|
277
278
|
};
|
|
279
|
+
//#endregion
|
|
278
280
|
export { inputBase, inputSide, inputSize, useInputCva };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
|
|
3
|
+
//#region src/components/inputs/shared/label.cva.ts
|
|
4
|
+
var labelBase = cva("", {
|
|
4
5
|
variants: { as: {
|
|
5
6
|
default: ["flex items-start gap-1 text-text-default-1"],
|
|
6
7
|
filter: ["text-text-default-1"],
|
|
@@ -24,7 +25,7 @@ const labelBase = cva("", {
|
|
|
24
25
|
} },
|
|
25
26
|
defaultVariants: { as: "default" }
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
var labelTypography = compoundMapper({
|
|
28
29
|
compoundVariants: [
|
|
29
30
|
{
|
|
30
31
|
as: "default",
|
|
@@ -66,4 +67,5 @@ const labelTypography = compoundMapper({
|
|
|
66
67
|
},
|
|
67
68
|
defaultVariants: { as: "default" }
|
|
68
69
|
});
|
|
70
|
+
//#endregion
|
|
69
71
|
export { labelBase, labelTypography };
|
|
@@ -4,7 +4,8 @@ import { AccordionItem } from "./AccordionItem.js";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { DisclosureGroup } from "react-aria-components";
|
|
7
|
-
|
|
7
|
+
//#region src/components/navigation/Accordion/Accordion.tsx
|
|
8
|
+
var Accordion = ({ items, variant = "filled", actionPosition = "right", allowsMultipleExpanded = false, expandedKeys, defaultExpandedKeys, onExpandedChange, className, disabled }) => {
|
|
8
9
|
return /* @__PURE__ */ jsx(DisclosureGroup, {
|
|
9
10
|
allowsMultipleExpanded,
|
|
10
11
|
expandedKeys,
|
|
@@ -29,4 +30,5 @@ const Accordion = ({ items, variant = "filled", actionPosition = "right", allows
|
|
|
29
30
|
}, item.id))
|
|
30
31
|
});
|
|
31
32
|
};
|
|
33
|
+
//#endregion
|
|
32
34
|
export { Accordion };
|
|
@@ -4,7 +4,8 @@ import { Typography } from "../../text/Typography/Typography.js";
|
|
|
4
4
|
import { accordionChevronCva, accordionHeadingCva, accordionHeadingSubtitleCva, accordionHeadingTitleCva, accordionIconCva, accordionItemCva, accordionPanelContentCva, accordionPanelCva, accordionTriggerCva } from "./accordion.cva.js";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Button, Disclosure, DisclosurePanel, Heading } from "react-aria-components";
|
|
7
|
-
|
|
7
|
+
//#region src/components/navigation/Accordion/AccordionItem.tsx
|
|
8
|
+
var AccordionItem = ({ id, disabled, heading, subheading, children, icon: Icon, variant = "filled", actionPosition = "right", isSingle }) => {
|
|
8
9
|
const itemCva = UIStyle.useCva("accordion.itemCva", accordionItemCva);
|
|
9
10
|
const triggerCva = UIStyle.useCva("accordion.triggerCva", accordionTriggerCva);
|
|
10
11
|
const headingCva = UIStyle.useCva("accordion.headingCva", accordionHeadingCva);
|
|
@@ -58,4 +59,5 @@ const AccordionItem = ({ id, disabled, heading, subheading, children, icon: Icon
|
|
|
58
59
|
})] })
|
|
59
60
|
});
|
|
60
61
|
};
|
|
62
|
+
//#endregion
|
|
61
63
|
export { AccordionItem };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/navigation/Accordion/accordion.cva.ts
|
|
3
|
+
var accordionCva = cva("flex w-full flex-col", {
|
|
3
4
|
variants: {
|
|
4
5
|
variant: {
|
|
5
6
|
filled: "gap-1",
|
|
@@ -20,7 +21,7 @@ const accordionCva = cva("flex w-full flex-col", {
|
|
|
20
21
|
className: "rounded-global-rounding-s border border-elevation-outline-default-1"
|
|
21
22
|
}]
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
var accordionItemCva = cva("flex w-full flex-col", {
|
|
24
25
|
variants: {
|
|
25
26
|
variant: {
|
|
26
27
|
filled: "rounded-accordion-rounding-filled bg-elevation-fill-default-2",
|
|
@@ -45,7 +46,7 @@ const accordionItemCva = cva("flex w-full flex-col", {
|
|
|
45
46
|
className: "not-last:border-elevation-outline-default-1 not-last:border-b"
|
|
46
47
|
}]
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
+
var accordionTriggerCva = cva([
|
|
49
50
|
"group flex w-full items-center gap-accordion-gap-content-to-arrow",
|
|
50
51
|
"px-accordion-side-accordion py-accordion-height-accordion",
|
|
51
52
|
"outline-none focus-visible:ring-2 focus-visible:ring-interactive-contained-primary-focus"
|
|
@@ -66,32 +67,33 @@ const accordionTriggerCva = cva([
|
|
|
66
67
|
actionPosition: "right"
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
|
-
|
|
70
|
+
var accordionHeadingCva = cva("flex flex-1 items-center justify-between gap-accordion-gap-content-to-arrow", {
|
|
70
71
|
variants: {},
|
|
71
72
|
defaultVariants: {}
|
|
72
73
|
});
|
|
73
|
-
|
|
74
|
+
var accordionHeadingTitleCva = cva("flex-1 text-left text-text-default-1", {
|
|
74
75
|
variants: {},
|
|
75
76
|
defaultVariants: {}
|
|
76
77
|
});
|
|
77
|
-
|
|
78
|
+
var accordionHeadingSubtitleCva = cva("flex-1 text-left text-text-default-2", {
|
|
78
79
|
variants: {},
|
|
79
80
|
defaultVariants: {}
|
|
80
81
|
});
|
|
81
|
-
|
|
82
|
+
var accordionChevronCva = cva("size-6 shrink-0 text-interactive-text-secondary-idle transition-transform duration-200", {
|
|
82
83
|
variants: { isExpanded: {
|
|
83
84
|
true: "rotate-180",
|
|
84
85
|
false: "rotate-0"
|
|
85
86
|
} },
|
|
86
87
|
defaultVariants: { isExpanded: false }
|
|
87
88
|
});
|
|
88
|
-
|
|
89
|
+
var accordionIconCva = cva("size-6 shrink-0 text-text-default-3", {
|
|
89
90
|
variants: {},
|
|
90
91
|
defaultVariants: {}
|
|
91
92
|
});
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
var accordionPanelCva = cva("", { variants: { isExpanded: { true: "px-accordion-side-accordion pt-0 pb-accordion-height-accordion" } } });
|
|
94
|
+
var accordionPanelContentCva = cva("py-accordion-height-content", {
|
|
94
95
|
variants: {},
|
|
95
96
|
defaultVariants: {}
|
|
96
97
|
});
|
|
98
|
+
//#endregion
|
|
97
99
|
export { accordionChevronCva, accordionCva, accordionHeadingCva, accordionHeadingSubtitleCva, accordionHeadingTitleCva, accordionIconCva, accordionItemCva, accordionPanelContentCva, accordionPanelCva, accordionTriggerCva };
|
|
@@ -4,7 +4,8 @@ import { StepperItem } from "./StepperItem.js";
|
|
|
4
4
|
import { StepperSeparator } from "./StepperSeparator.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Fragment as Fragment$1 } from "react";
|
|
7
|
-
|
|
7
|
+
//#region src/components/navigation/Stepper/Stepper.tsx
|
|
8
|
+
var Stepper = ({ steps, currentStep, orientation = "horizontal", contentOrientation = "horizontal", iconsOnly, titlesOnly, onStepClick, className }) => {
|
|
8
9
|
return /* @__PURE__ */ jsx("div", {
|
|
9
10
|
className: UIStyle.useCva("stepper.cva", stepperCva)({
|
|
10
11
|
orientation,
|
|
@@ -29,4 +30,5 @@ const Stepper = ({ steps, currentStep, orientation = "horizontal", contentOrient
|
|
|
29
30
|
})
|
|
30
31
|
});
|
|
31
32
|
};
|
|
33
|
+
//#endregion
|
|
32
34
|
export { Stepper };
|
|
@@ -5,7 +5,8 @@ import { stepperIconCva, stepperItemCva, stepperNumberCva, stepperSubtextCva, st
|
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { Button } from "react-aria-components";
|
|
8
|
-
|
|
8
|
+
//#region src/components/navigation/Stepper/StepperItem.tsx
|
|
9
|
+
var StepperItem = ({ step, stepNumber, status, contentOrientation, iconsOnly, titlesOnly, onPress }) => {
|
|
9
10
|
const stepperItemCva$1 = UIStyle.useCva("stepper.itemCva", stepperItemCva);
|
|
10
11
|
const stepperIconCva$1 = UIStyle.useCva("stepper.iconCva", stepperIconCva);
|
|
11
12
|
const stepperNumberCva$1 = UIStyle.useCva("stepper.numberCva", stepperNumberCva);
|
|
@@ -48,4 +49,5 @@ const StepperItem = ({ step, stepNumber, status, contentOrientation, iconsOnly,
|
|
|
48
49
|
children: content
|
|
49
50
|
});
|
|
50
51
|
};
|
|
52
|
+
//#endregion
|
|
51
53
|
export { StepperItem };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
2
|
import { stepperSeparatorCva } from "./stepper.cva.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
//#region src/components/navigation/Stepper/StepperSeparator.tsx
|
|
5
|
+
var StepperSeparator = ({ orientation, contentOrientation }) => {
|
|
5
6
|
return /* @__PURE__ */ jsx("div", { className: UIStyle.useCva("stepper.separatorCva", stepperSeparatorCva)({
|
|
6
7
|
orientation,
|
|
7
8
|
contentOrientation
|
|
8
9
|
}) });
|
|
9
10
|
};
|
|
11
|
+
//#endregion
|
|
10
12
|
export { StepperSeparator };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/navigation/Stepper/stepper.cva.ts
|
|
3
|
+
var stepperCva = cva("", {
|
|
3
4
|
variants: { orientation: {
|
|
4
5
|
horizontal: "flex flex-row items-center gap-stepper-gap-step-to-line-horizontal",
|
|
5
6
|
vertical: "inline-flex flex-col gap-stepper-gap-step-to-line-vertical"
|
|
6
7
|
} },
|
|
7
8
|
defaultVariants: { orientation: "horizontal" }
|
|
8
9
|
});
|
|
9
|
-
|
|
10
|
+
var stepperItemCva = cva("flex shrink-0", {
|
|
10
11
|
variants: { contentOrientation: {
|
|
11
12
|
horizontal: "flex-row items-center gap-stepper-gap-icon-to-text-horizontal text-left",
|
|
12
13
|
vertical: "flex-col items-center gap-stepper-gap-icon-to-text-vertical text-center"
|
|
13
14
|
} },
|
|
14
15
|
defaultVariants: { contentOrientation: "horizontal" }
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
+
var stepperIconCva = cva("inline-flex size-5 shrink-0 items-center justify-center rounded-stepper-rounding-icon", {
|
|
17
18
|
variants: { status: {
|
|
18
19
|
completed: [
|
|
19
20
|
"border border-interactive-outlined-primary-outline-idle border-solid bg-interactive-contained-primary-idle",
|
|
@@ -25,7 +26,7 @@ const stepperIconCva = cva("inline-flex size-5 shrink-0 items-center justify-cen
|
|
|
25
26
|
} },
|
|
26
27
|
defaultVariants: { status: "todo" }
|
|
27
28
|
});
|
|
28
|
-
|
|
29
|
+
var stepperNumberCva = cva("text-center align-middle", {
|
|
29
30
|
variants: { status: {
|
|
30
31
|
completed: "",
|
|
31
32
|
active: "text-interactive-outlined-primary-on-idle",
|
|
@@ -33,7 +34,7 @@ const stepperNumberCva = cva("text-center align-middle", {
|
|
|
33
34
|
} },
|
|
34
35
|
defaultVariants: { status: "todo" }
|
|
35
36
|
});
|
|
36
|
-
|
|
37
|
+
var stepperTitleCva = cva("", {
|
|
37
38
|
variants: { status: {
|
|
38
39
|
completed: [
|
|
39
40
|
"text-interactive-text-secondary-idle",
|
|
@@ -45,7 +46,7 @@ const stepperTitleCva = cva("", {
|
|
|
45
46
|
} },
|
|
46
47
|
defaultVariants: { status: "todo" }
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
+
var stepperSubtextCva = cva("", {
|
|
49
50
|
variants: { status: {
|
|
50
51
|
completed: [
|
|
51
52
|
"text-interactive-text-secondary-idle",
|
|
@@ -57,7 +58,7 @@ const stepperSubtextCva = cva("", {
|
|
|
57
58
|
} },
|
|
58
59
|
defaultVariants: { status: "todo" }
|
|
59
60
|
});
|
|
60
|
-
|
|
61
|
+
var stepperSeparatorCva = cva("bg-elevation-outline-default-1", {
|
|
61
62
|
variants: {
|
|
62
63
|
orientation: {
|
|
63
64
|
horizontal: "h-px min-w-4 flex-1",
|
|
@@ -90,4 +91,5 @@ const stepperSeparatorCva = cva("bg-elevation-outline-default-1", {
|
|
|
90
91
|
}
|
|
91
92
|
]
|
|
92
93
|
});
|
|
94
|
+
//#endregion
|
|
93
95
|
export { stepperCva, stepperIconCva, stepperItemCva, stepperNumberCva, stepperSeparatorCva, stepperSubtextCva, stepperTitleCva };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { clsx } from "clsx";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
//#region src/components/outline.clsx.ts
|
|
3
|
+
var uiOutlineClass = clsx("focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2", "has-focus-visible:outline has-focus-visible:outline-2 has-focus-visible:outline-solid has-focus-visible:outline-offset-2");
|
|
4
|
+
var uiGroupOutlineClass = clsx("group-focus:outline-none group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-solid group-focus-visible:outline-offset-2");
|
|
5
|
+
//#endregion
|
|
4
6
|
export { uiGroupOutlineClass, uiOutlineClass };
|
|
@@ -4,12 +4,13 @@ import { Button } from "../../buttons/Button/Button.js";
|
|
|
4
4
|
import { Modal } from "../Modal/Modal.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
|
+
//#region src/components/overlays/ActionModal/ActionModal.tsx
|
|
7
8
|
var textAlignClassMap = {
|
|
8
9
|
left: "text-left",
|
|
9
10
|
center: "text-center",
|
|
10
11
|
right: "text-right"
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
var ActionModal = ({ heading, description, primaryAction, secondaryAction, buttonSize = "m", textAlign = "left", modalClassName, titleTypography, titleClassName, descriptionTypography, descriptionClassName, ...modalProps }) => {
|
|
13
14
|
const ui = UIConfig.useConfig();
|
|
14
15
|
const textAlignClass = textAlignClassMap[textAlign];
|
|
15
16
|
return /* @__PURE__ */ jsxs(Modal, {
|
|
@@ -49,4 +50,5 @@ const ActionModal = ({ heading, description, primaryAction, secondaryAction, but
|
|
|
49
50
|
})]
|
|
50
51
|
});
|
|
51
52
|
};
|
|
53
|
+
//#endregion
|
|
52
54
|
export { ActionModal };
|
|
@@ -8,6 +8,7 @@ import { useEffect, useMemo, useRef, useState } from "react";
|
|
|
8
8
|
import { Dialog, DialogTrigger, Modal, ModalOverlay } from "react-aria-components";
|
|
9
9
|
import { useResizeObserver, useViewportSize } from "@react-aria/utils";
|
|
10
10
|
import { AnimatePresence, animate, motion, useDragControls, useMotionValue } from "motion/react";
|
|
11
|
+
//#region src/components/overlays/BottomSheet/BottomSheet.tsx
|
|
11
12
|
var MotionModal = motion.create(Modal);
|
|
12
13
|
var MotionModalOverlay = motion.create(ModalOverlay);
|
|
13
14
|
var inertiaTransition = {
|
|
@@ -196,7 +197,7 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
|
|
|
196
197
|
})]
|
|
197
198
|
}) });
|
|
198
199
|
};
|
|
199
|
-
|
|
200
|
+
var BottomSheet = ({ isOpen, portalContainerRef, onOpenChange, trigger, children, ...rest }) => {
|
|
200
201
|
const [isSheetOpen, setIsSheetOpen] = useState(!!isOpen);
|
|
201
202
|
const hasTrigger = !!trigger;
|
|
202
203
|
useEffect(() => {
|
|
@@ -227,4 +228,5 @@ const BottomSheet = ({ isOpen, portalContainerRef, onOpenChange, trigger, childr
|
|
|
227
228
|
children
|
|
228
229
|
});
|
|
229
230
|
};
|
|
231
|
+
//#endregion
|
|
230
232
|
export { BottomSheet };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
2
2
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
3
|
-
import
|
|
3
|
+
import "../../../config/i18n.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { Button } from "react-aria-components";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
8
|
-
|
|
8
|
+
//#region src/components/overlays/BottomSheet/BottomSheetHeader.tsx
|
|
9
|
+
var BottomSheetHeader = ({ label, dragControls, isDismissable, hideThumb, hideHeader, headerTypography, onClose }) => {
|
|
9
10
|
const { t } = useTranslation("ui");
|
|
10
11
|
return /* @__PURE__ */ jsxs("div", {
|
|
11
12
|
className: clsx("pb-list-height-title-bottom", !isDismissable && "pt-list-height-title-top"),
|
|
@@ -33,4 +34,5 @@ const BottomSheetHeader = ({ label, dragControls, isDismissable, hideThumb, hide
|
|
|
33
34
|
})]
|
|
34
35
|
});
|
|
35
36
|
};
|
|
37
|
+
//#endregion
|
|
36
38
|
export { BottomSheetHeader };
|
|
@@ -2,7 +2,8 @@ import { modalOverlay } from "../Modal/modal.cva.js";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { Dialog, DialogTrigger, Modal, ModalOverlay } from "react-aria-components";
|
|
5
|
-
|
|
5
|
+
//#region src/components/overlays/Drawer/Drawer.tsx
|
|
6
|
+
var Drawer = ({ label, isOpen, portalContainerRef, onOpenChange, trigger, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside }) => {
|
|
6
7
|
if (trigger) return /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
7
8
|
isOpen,
|
|
8
9
|
onOpenChange,
|
|
@@ -48,4 +49,5 @@ var DrawerOverlay = ({ label, isOpen, onOpenChange, portalContainerRef, children
|
|
|
48
49
|
})
|
|
49
50
|
});
|
|
50
51
|
};
|
|
52
|
+
//#endregion
|
|
51
53
|
export { Drawer };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
2
2
|
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
3
3
|
import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
|
|
4
|
-
import
|
|
4
|
+
import "../../../config/i18n.js";
|
|
5
5
|
import { modalContent, modalMain, modalOverlay } from "./modal.cva.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { Dialog, Modal, ModalOverlay } from "react-aria-components";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
|
-
|
|
10
|
+
//#region src/components/overlays/Modal/Modal.tsx
|
|
11
|
+
var Modal$1 = ({ isOpen, portalContainerRef, onClose, aside, children, modalClassName, closeIconClassName, overlayClassName, showCloseIcon, isDismissable = true, isKeyboardDismissable, shouldCloseOnInteractOutside }) => {
|
|
11
12
|
const { t } = useTranslation("ui");
|
|
12
13
|
const modalMainCva = UIStyle.useCva("modal.mainCva", modalMain);
|
|
13
14
|
const modalContentCva = UIStyle.useCva("modal.contentCva", modalContent);
|
|
@@ -50,4 +51,5 @@ const Modal$1 = ({ isOpen, portalContainerRef, onClose, aside, children, modalCl
|
|
|
50
51
|
})
|
|
51
52
|
});
|
|
52
53
|
};
|
|
54
|
+
//#endregion
|
|
53
55
|
export { Modal$1 as Modal };
|