@povio/ui 2.2.0 → 2.2.1
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 +1 -1
- package/dist/{rolldown_runtime.js → _virtual/rolldown:runtime.js} +17 -2
- package/dist/{HighlightOn.js → assets/icons/HighlightOn.js} +1 -1
- package/dist/{TextColor.js → assets/icons/TextColor.js} +1 -1
- package/dist/{Breadcrumbs.js → components/Breadcrumbs/Breadcrumbs.js} +6 -6
- package/dist/components/Menu/Menu.d.ts +0 -1
- package/dist/{Menu2.js → components/Menu/Menu.js} +1 -1
- package/dist/components/Menu/MenuDesktop.d.ts +1 -1
- package/dist/components/Menu/MenuDesktop.js +12 -0
- package/dist/{MenuItem.js → components/Menu/MenuItem.js} +3 -3
- package/dist/{MenuMobile.js → components/Menu/MenuMobile.js} +4 -4
- package/dist/{MenuPopover.js → components/Menu/MenuPopover.js} +2 -2
- package/dist/components/buttons/Button/Button.d.ts +3 -3
- package/dist/components/buttons/Button/Button.js +48 -0
- package/dist/{button.cva.js → components/buttons/Button/button.cva.js} +3 -12
- package/dist/components/buttons/IconButton/IconButton.d.ts +1 -1
- package/dist/components/buttons/IconButton/IconButton.js +17 -0
- package/dist/{InlineIconButton.js → components/buttons/InlineIconButton/InlineIconButton.js} +2 -2
- package/dist/components/buttons/PillButton/PillButton.d.ts +3 -2
- package/dist/components/buttons/PillButton/PillButton.js +33 -0
- package/dist/{pillButton.cva.js → components/buttons/PillButton/pillButton.cva.js} +4 -4
- package/dist/{SplitButton.js → components/buttons/SplitButton/SplitButton.js} +5 -5
- package/dist/components/buttons/TextButton/TextButton.d.ts +0 -1
- package/dist/{TextButton.js → components/buttons/TextButton/TextButton.js} +2 -3
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +0 -1
- package/dist/{ToggleButton.js → components/buttons/ToggleButton/ToggleButton.js} +2 -3
- package/dist/components/buttons/shared/ButtonContent.d.ts +3 -5
- package/dist/components/buttons/shared/ButtonContent.js +35 -0
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +4 -0
- package/dist/components/buttons/shared/buttonContent.cva.js +36 -0
- package/dist/{Checkbox.js → components/inputs/Checkbox/Checkbox.js} +7 -7
- package/dist/{CheckboxCheckmark2.js → components/inputs/Checkbox/CheckboxCheckmark.js} +4 -4
- package/dist/{checkbox.cva.js → components/inputs/Checkbox/checkbox.cva.js} +2 -2
- package/dist/{DatePicker.js → components/inputs/DateTime/DatePicker/DatePicker.js} +11 -11
- package/dist/{DateRangePicker.js → components/inputs/DateTime/DateRangePicker/DateRangePicker.js} +13 -13
- package/dist/{DateTimePicker.js → components/inputs/DateTime/DateTimePicker/DateTimePicker.js} +11 -11
- package/dist/{TimePicker.js → components/inputs/DateTime/TimePicker/TimePicker.js} +10 -10
- package/dist/{Calendar2.js → components/inputs/DateTime/shared/Calendar.js} +1 -1
- package/dist/{CalendarCell.js → components/inputs/DateTime/shared/CalendarCell.js} +2 -2
- package/dist/{CalendarGrid.js → components/inputs/DateTime/shared/CalendarGrid.js} +2 -2
- package/dist/{CalendarHeader.js → components/inputs/DateTime/shared/CalendarHeader.js} +5 -5
- package/dist/{CalendarSelectHeader.js → components/inputs/DateTime/shared/CalendarSelectHeader.js} +9 -9
- package/dist/{DateField.js → components/inputs/DateTime/shared/DateField.js} +1 -1
- package/dist/{DatePickerInput.js → components/inputs/DateTime/shared/DatePickerInput.js} +11 -11
- package/dist/{DateTimeDialog.js → components/inputs/DateTime/shared/DateTimeDialog.js} +4 -4
- package/dist/{DateTimeDialogFooter.js → components/inputs/DateTime/shared/DateTimeDialogFooter.js} +2 -2
- package/dist/{MonthPicker.js → components/inputs/DateTime/shared/MonthPicker.js} +1 -1
- package/dist/{TimePickerForm.js → components/inputs/DateTime/shared/TimePickerForm.js} +6 -6
- package/dist/{TimePickerInput.js → components/inputs/DateTime/shared/TimePickerInput.js} +8 -8
- package/dist/{YearPicker.js → components/inputs/DateTime/shared/YearPicker.js} +2 -2
- package/dist/{FileUpload.js → components/inputs/File/FileUpload.js} +10 -10
- package/dist/{InputUpload.js → components/inputs/File/InputUpload.js} +7 -7
- package/dist/{FileUploadContent.js → components/inputs/File/shared/FileUploadContent.js} +1 -1
- package/dist/{FileUploadContentEmpty.js → components/inputs/File/shared/FileUploadContentEmpty.js} +4 -4
- package/dist/{FileUploadContentError.js → components/inputs/File/shared/FileUploadContentError.js} +7 -7
- package/dist/{FileUploadContentFilled.js → components/inputs/File/shared/FileUploadContentFilled.js} +8 -8
- package/dist/{FileUploadContentLoading.js → components/inputs/File/shared/FileUploadContentLoading.js} +7 -7
- package/dist/{InputUploadContent.js → components/inputs/File/shared/InputUploadContent.js} +8 -8
- package/dist/{InputUploadFilled.js → components/inputs/File/shared/InputUploadFilled.js} +5 -5
- package/dist/{ProgressBar.js → components/inputs/File/shared/ProgressBar.js} +1 -1
- package/dist/{fileUpload.cva.js → components/inputs/File/shared/fileUpload.cva.js} +1 -1
- package/dist/{inputUploadButton.cva.js → components/inputs/File/shared/inputUploadButton.cva.js} +1 -1
- package/dist/{FormFieldError.js → components/inputs/FormField/FormFieldError.js} +1 -1
- package/dist/{FormFieldHeader.js → components/inputs/FormField/FormFieldHeader.js} +3 -3
- package/dist/{FormFieldHeaderClose.js → components/inputs/FormField/FormFieldHeaderClose.js} +2 -2
- package/dist/{FormFieldLabel.js → components/inputs/FormField/FormFieldLabel.js} +4 -4
- package/dist/{NumberInput.js → components/inputs/Input/NumberInput/NumberInput.js} +7 -7
- package/dist/{PasswordInput.js → components/inputs/Input/PasswordInput/PasswordInput.js} +4 -4
- package/dist/{TextArea.js → components/inputs/Input/TextArea/TextArea.js} +9 -9
- package/dist/{TextInput.js → components/inputs/Input/TextInput/TextInput.js} +7 -7
- package/dist/{InputContent.js → components/inputs/Input/shared/InputContent.js} +7 -7
- package/dist/{Form.js → components/inputs/Inputs/Form.js} +4 -4
- package/dist/{InputItem.js → components/inputs/Inputs/InputItem.js} +15 -15
- package/dist/{RadioGroup.js → components/inputs/RadioGroup/RadioGroup.js} +6 -6
- package/dist/{radio.cva.js → components/inputs/RadioGroup/radio.cva.js} +2 -2
- package/dist/{Autocomplete.js → components/inputs/Selection/Autocomplete/Autocomplete.js} +2 -2
- package/dist/{QueryAutocomplete.js → components/inputs/Selection/Autocomplete/QueryAutocomplete.js} +1 -1
- package/dist/{Select.js → components/inputs/Selection/Select/Select.js} +2 -2
- package/dist/{SelectBase.js → components/inputs/Selection/shared/SelectBase.js} +2 -2
- package/dist/{SelectDesktop.js → components/inputs/Selection/shared/SelectDesktop.js} +6 -5
- package/dist/{SelectInput.js → components/inputs/Selection/shared/SelectInput.js} +8 -8
- package/dist/{SelectInputTags.js → components/inputs/Selection/shared/SelectInputTags.js} +1 -1
- package/dist/{SelectListBox.js → components/inputs/Selection/shared/SelectListBox.js} +1 -1
- package/dist/{SelectListBoxItem.js → components/inputs/Selection/shared/SelectListBoxItem.js} +2 -2
- package/dist/{SelectListBoxItemSelectAll.js → components/inputs/Selection/shared/SelectListBoxItemSelectAll.js} +2 -2
- package/dist/{SelectListBoxLoadingItem.js → components/inputs/Selection/shared/SelectListBoxLoadingItem.js} +3 -3
- package/dist/{SelectListBoxSelectionBar.js → components/inputs/Selection/shared/SelectListBoxSelectionBar.js} +2 -2
- package/dist/{SelectMobile.js → components/inputs/Selection/shared/SelectMobile.js} +6 -6
- package/dist/{select.context.js → components/inputs/Selection/shared/select.context.js} +2 -2
- package/dist/{Slider.js → components/inputs/Slider/Slider.js} +6 -6
- package/dist/{TextEditor.js → components/inputs/TextEditor/TextEditor.js} +6 -6
- package/dist/{ColorPickerDropdown.js → components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js} +3 -3
- package/dist/{HyperlinkAction.js → components/inputs/TextEditor/Toolbar/HyperlinkAction.js} +6 -6
- package/dist/{TextAlignSelect.js → components/inputs/TextEditor/Toolbar/TextAlignSelect.js} +6 -6
- package/dist/{TextColorSelect.js → components/inputs/TextEditor/Toolbar/TextColorSelect.js} +2 -2
- package/dist/{TextHighlightSelect.js → components/inputs/TextEditor/Toolbar/TextHighlightSelect.js} +3 -3
- package/dist/{TextListActions.js → components/inputs/TextEditor/Toolbar/TextListActions.js} +4 -4
- package/dist/{TextMarksActions.js → components/inputs/TextEditor/Toolbar/TextMarksActions.js} +6 -6
- package/dist/{TextStyleSelect.js → components/inputs/TextEditor/Toolbar/TextStyleSelect.js} +3 -3
- package/dist/{Toggle.js → components/inputs/Toggle/Toggle.js} +6 -6
- package/dist/{toggle.cva.js → components/inputs/Toggle/toggle.cva.js} +2 -2
- package/dist/{CheckContent.js → components/inputs/shared/CheckContent.js} +3 -3
- package/dist/{InputClear.js → components/inputs/shared/InputClear.js} +3 -3
- package/dist/{TooltipWrapper.js → components/inputs/shared/TooltipWrapper.js} +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +4 -4
- package/dist/{input.cva.js → components/inputs/shared/input.cva.js} +4 -4
- package/dist/components/inputs/shared/label.cva.d.ts +2 -2
- package/dist/{label.cva.js → components/inputs/shared/label.cva.js} +1 -1
- package/dist/{Accordion.js → components/navigation/Accordion/Accordion.js} +1 -1
- package/dist/{AccordionItem.js → components/navigation/Accordion/AccordionItem.js} +3 -3
- package/dist/{Stepper.js → components/navigation/Stepper/Stepper.js} +1 -1
- package/dist/{StepperItem.js → components/navigation/Stepper/StepperItem.js} +3 -3
- package/dist/{StepperSeparator.js → components/navigation/Stepper/StepperSeparator.js} +1 -1
- package/dist/{ActionModal.js → components/overlays/ActionModal/ActionModal.js} +4 -4
- package/dist/{BottomSheet.js → components/overlays/BottomSheet/BottomSheet.js} +7 -7
- package/dist/{Drawer.js → components/overlays/Drawer/Drawer.js} +1 -1
- package/dist/{Modal.js → components/overlays/Modal/Modal.js} +4 -4
- package/dist/{ResponsivePopover.js → components/overlays/ResponsivePopover/ResponsivePopover.js} +4 -4
- package/dist/{Tooltip.js → components/overlays/Tooltip/Tooltip.js} +7 -6
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +3 -2
- package/dist/{TooltipEllipsis.js → components/overlays/Tooltip/TooltipEllipsis.js} +2 -1
- package/dist/{Segment.js → components/segment/Segment.js} +4 -4
- package/dist/{SegmentItem.js → components/segment/SegmentItem.js} +3 -3
- package/dist/{Pagination.js → components/shared/pagination/Pagination.js} +3 -3
- package/dist/{PaginationList.js → components/shared/pagination/PaginationList.js} +6 -6
- package/dist/{Alert.js → components/status/Alert/Alert.js} +4 -4
- package/dist/{Loader.js → components/status/Loader/Loader.js} +1 -1
- package/dist/{Toast.js → components/status/Toast/Toast.js} +6 -6
- package/dist/{toast.cva.js → components/status/Toast/toast.cva.js} +1 -1
- package/dist/{CellText.js → components/table/CellText.js} +1 -1
- package/dist/{ColumnConfig.js → components/table/ColumnConfig.js} +5 -5
- package/dist/{HeaderText.js → components/table/HeaderText.js} +1 -1
- package/dist/{InfiniteTable.js → components/table/InfiniteTable.js} +3 -3
- package/dist/{PaginatedTable.js → components/table/PaginatedTable.js} +2 -2
- package/dist/{Table.js → components/table/Table.js} +9 -9
- package/dist/{table.cva.js → components/table/table.cva.js} +1 -1
- package/dist/{Link2.js → components/text/Link/Link.js} +3 -3
- package/dist/{link.cva.js → components/text/Link/link.cva.js} +1 -1
- package/dist/components/text/Tag/Tag.d.ts +3 -1
- package/dist/components/text/Tag/Tag.js +38 -0
- package/dist/{tag.cva.js → components/text/Tag/tag.cva.js} +1 -1
- package/dist/{Typography.js → components/text/Typography/Typography.js} +2 -2
- package/dist/{confirmation.context.js → config/confirmation.context.js} +1 -1
- package/dist/config/i18n.js +8 -0
- package/dist/{theme.context.js → config/theme.context.js} +1 -1
- package/dist/{uiConfig.context.js → config/uiConfig.context.js} +2 -2
- package/dist/{dynamicColumns.js → helpers/dynamicColumns.js} +3 -3
- package/dist/{dynamicInputs.js → helpers/dynamicInputs.js} +2 -2
- package/dist/{useAutosave.js → hooks/useAutosave.js} +2 -2
- package/dist/{useDeepCompare.js → hooks/useDeepCompare.js} +1 -1
- package/dist/{useFilters.js → hooks/useFilters.js} +1 -1
- package/dist/{useForm.js → hooks/useForm.js} +1 -1
- package/dist/{useFormAutosave.js → hooks/useFormAutosave.js} +2 -2
- package/dist/{usePagination.js → hooks/usePagination.js} +1 -1
- package/dist/{useSorting.js → hooks/useSorting.js} +1 -1
- package/dist/{useStateAndRef.js → hooks/useStateAndRef.js} +1 -1
- package/dist/{useTableNav.js → hooks/useTableNav.js} +1 -1
- package/dist/index.js +137 -137
- package/dist/node_modules/.pnpm/motion@12.23.28_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/motion/dist/es/react.js +10 -0
- package/dist/text-editor.js +1 -1
- package/package.json +1 -1
- package/dist/Button.js +0 -54
- package/dist/ButtonContent.js +0 -28
- package/dist/IconButton.js +0 -12
- package/dist/MenuDesktop.js +0 -54
- package/dist/PillButton.js +0 -37
- package/dist/Tag.js +0 -42
- package/dist/buttonContent.cva.js +0 -10
- package/dist/i18n.js +0 -8
- package/dist/react.js +0 -6
- /package/dist/{AlignCenter.js → assets/icons/AlignCenter.js} +0 -0
- /package/dist/{AlignLeft.js → assets/icons/AlignLeft.js} +0 -0
- /package/dist/{AlignLeftRight.js → assets/icons/AlignLeftRight.js} +0 -0
- /package/dist/{AlignRight.js → assets/icons/AlignRight.js} +0 -0
- /package/dist/{ArrowDropDown.js → assets/icons/ArrowDropDown.js} +0 -0
- /package/dist/{ArrowDropUp.js → assets/icons/ArrowDropUp.js} +0 -0
- /package/dist/{ArrowLeft.js → assets/icons/ArrowLeft.js} +0 -0
- /package/dist/{ArrowRight.js → assets/icons/ArrowRight.js} +0 -0
- /package/dist/{Bold.js → assets/icons/Bold.js} +0 -0
- /package/dist/{BulletedList.js → assets/icons/BulletedList.js} +0 -0
- /package/dist/{Calendar.js → assets/icons/Calendar.js} +0 -0
- /package/dist/{Check.js → assets/icons/Check.js} +0 -0
- /package/dist/{CheckCircle.js → assets/icons/CheckCircle.js} +0 -0
- /package/dist/{CheckboxCheckmark.js → assets/icons/CheckboxCheckmark.js} +0 -0
- /package/dist/{CheckboxIndeterminate.js → assets/icons/CheckboxIndeterminate.js} +0 -0
- /package/dist/{ChevronDown.js → assets/icons/ChevronDown.js} +0 -0
- /package/dist/{ChevronLeft.js → assets/icons/ChevronLeft.js} +0 -0
- /package/dist/{ChevronRight.js → assets/icons/ChevronRight.js} +0 -0
- /package/dist/{ChevronUp.js → assets/icons/ChevronUp.js} +0 -0
- /package/dist/{ChevronsLeft.js → assets/icons/ChevronsLeft.js} +0 -0
- /package/dist/{ChevronsRight.js → assets/icons/ChevronsRight.js} +0 -0
- /package/dist/{Clock.js → assets/icons/Clock.js} +0 -0
- /package/dist/{Close.js → assets/icons/Close.js} +0 -0
- /package/dist/{DateTime.js → assets/icons/DateTime.js} +0 -0
- /package/dist/{DragIndicator.js → assets/icons/DragIndicator.js} +0 -0
- /package/dist/{File.js → assets/icons/File.js} +0 -0
- /package/dist/{Highlight.js → assets/icons/Highlight.js} +0 -0
- /package/dist/{Home.js → assets/icons/Home.js} +0 -0
- /package/dist/{Info.js → assets/icons/Info.js} +0 -0
- /package/dist/{Italic.js → assets/icons/Italic.js} +0 -0
- /package/dist/{Link.js → assets/icons/Link.js} +0 -0
- /package/dist/{Menu.js → assets/icons/Menu.js} +0 -0
- /package/dist/{NumberedList.js → assets/icons/NumberedList.js} +0 -0
- /package/dist/{PointerHorizontal.js → assets/icons/PointerHorizontal.js} +0 -0
- /package/dist/{PointerVertical.js → assets/icons/PointerVertical.js} +0 -0
- /package/dist/{Send.js → assets/icons/Send.js} +0 -0
- /package/dist/{Strikethrough.js → assets/icons/Strikethrough.js} +0 -0
- /package/dist/{Today.js → assets/icons/Today.js} +0 -0
- /package/dist/{Underlined.js → assets/icons/Underlined.js} +0 -0
- /package/dist/{Upload.js → assets/icons/Upload.js} +0 -0
- /package/dist/{Visibility.js → assets/icons/Visibility.js} +0 -0
- /package/dist/{VisibilityOff.js → assets/icons/VisibilityOff.js} +0 -0
- /package/dist/{WarningFilled.js → assets/icons/WarningFilled.js} +0 -0
- /package/dist/{translation.js → assets/locales/en/translation.json.js} +0 -0
- /package/dist/{translation2.js → assets/locales/sl/translation.json.js} +0 -0
- /package/dist/{breadcrumbs.cva.js → components/Breadcrumbs/breadcrumbs.cva.js} +0 -0
- /package/dist/{menu.cva.js → components/Menu/menu.cva.js} +0 -0
- /package/dist/{DateSegmentItem.js → components/inputs/DateTime/shared/DateSegmentItem.js} +0 -0
- /package/dist/{RangeCalendar.js → components/inputs/DateTime/shared/RangeCalendar.js} +0 -0
- /package/dist/{TimeField.js → components/inputs/DateTime/shared/TimeField.js} +0 -0
- /package/dist/{FileUploadContainer.js → components/inputs/File/FileUploadContainer.js} +0 -0
- /package/dist/{FileCard.js → components/inputs/File/shared/FileCard.js} +0 -0
- /package/dist/{FileCardList.js → components/inputs/File/shared/FileCardList.js} +0 -0
- /package/dist/{FormField.js → components/inputs/FormField/FormField.js} +0 -0
- /package/dist/{Inputs.js → components/inputs/Inputs/Inputs.js} +0 -0
- /package/dist/{useSelectItems.js → components/inputs/Selection/shared/useSelectItems.js} +0 -0
- /package/dist/{ColorPicker.js → components/inputs/TextEditor/Toolbar/ColorPicker.js} +0 -0
- /package/dist/{TextEditorToolbar.js → components/inputs/TextEditor/Toolbar/TextEditorToolbar.js} +0 -0
- /package/dist/{textEditor.types.js → components/inputs/TextEditor/textEditor.types.js} +0 -0
- /package/dist/{accordion.cva.js → components/navigation/Accordion/accordion.cva.js} +0 -0
- /package/dist/{stepper.cva.js → components/navigation/Stepper/stepper.cva.js} +0 -0
- /package/dist/{outline.clsx.js → components/outline.clsx.js} +0 -0
- /package/dist/{modal.cva.js → components/overlays/Modal/modal.cva.js} +0 -0
- /package/dist/{tooltip.cva.js → components/overlays/Tooltip/tooltip.cva.js} +0 -0
- /package/dist/{segment.cva.js → components/segment/segment.cva.js} +0 -0
- /package/dist/{minWidth.cva.js → components/shared/pagination/minWidth.cva.js} +0 -0
- /package/dist/{alert.cva.js → components/status/Alert/alert.cva.js} +0 -0
- /package/dist/{loader.cva.js → components/status/Loader/loader.cva.js} +0 -0
- /package/dist/{useToast.js → components/status/Toast/useToast.js} +0 -0
- /package/dist/{status.cva.js → components/status/shared/status.cva.js} +0 -0
- /package/dist/{typography.cva.js → components/text/Typography/typography.cva.js} +0 -0
- /package/dist/{link.context.js → config/link.context.js} +0 -0
- /package/dist/{router.context.js → config/router.context.js} +0 -0
- /package/dist/{uiStyle.context.js → config/uiStyle.context.js} +0 -0
- /package/dist/{useBreakpoint.js → hooks/useBreakpoint.js} +0 -0
- /package/dist/{useDebounceCallback.js → hooks/useDebounceCallback.js} +0 -0
- /package/dist/{useIntersectionObserver.js → hooks/useIntersectionObserver.js} +0 -0
- /package/dist/{useLocalStorage.js → hooks/useLocalStorage.js} +0 -0
- /package/dist/{useLongPressRepeat.js → hooks/useLongPressRepeat.js} +0 -0
- /package/dist/{useScrollableListBox.js → hooks/useScrollableListBox.js} +0 -0
- /package/dist/{useTableColumnConfig.js → hooks/useTableColumnConfig.js} +0 -0
- /package/dist/{useTranslationMemo.js → hooks/useTranslationMemo.js} +0 -0
- /package/dist/{array.utils.js → utils/array.utils.js} +0 -0
- /package/dist/{compoundMapper.js → utils/compoundMapper.js} +0 -0
- /package/dist/{date-time.utils.js → utils/date-time.utils.js} +0 -0
- /package/dist/{date.utils.js → utils/date.utils.js} +0 -0
- /package/dist/{dom.utils.js → utils/dom.utils.js} +0 -0
- /package/dist/{file.utils.js → utils/file.utils.js} +0 -0
- /package/dist/{isEqual.js → utils/isEqual.js} +0 -0
- /package/dist/{logger.js → utils/logger.js} +0 -0
- /package/dist/{object.utils.js → utils/object.utils.js} +0 -0
- /package/dist/{queries.utils.js → utils/queries.utils.js} +0 -0
- /package/dist/{rest.utils.js → utils/rest.utils.js} +0 -0
- /package/dist/{routing.utils.js → utils/routing.utils.js} +0 -0
- /package/dist/{string.utils.js → utils/string.utils.js} +0 -0
- /package/dist/{zod.utils.js → utils/zod.utils.js} +0 -0
package/README.md
CHANGED
|
@@ -2,6 +2,15 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (all, symbols) => {
|
|
6
|
+
let target = {};
|
|
7
|
+
for (var name in all) __defProp(target, name, {
|
|
8
|
+
get: all[name],
|
|
9
|
+
enumerable: true
|
|
10
|
+
});
|
|
11
|
+
if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
12
|
+
return target;
|
|
13
|
+
};
|
|
5
14
|
var __copyProps = (to, from, except, desc) => {
|
|
6
15
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
7
16
|
key = keys[i];
|
|
@@ -12,5 +21,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
12
21
|
}
|
|
13
22
|
return to;
|
|
14
23
|
};
|
|
15
|
-
var __reExport = (target, mod, secondTarget
|
|
16
|
-
|
|
24
|
+
var __reExport = (target, mod, secondTarget, symbols) => {
|
|
25
|
+
if (symbols) {
|
|
26
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
27
|
+
secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
|
|
28
|
+
}
|
|
29
|
+
__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
|
|
30
|
+
};
|
|
31
|
+
export { __export, __reExport };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const HighlightOnIcon = ({ highlightColor
|
|
2
|
+
const HighlightOnIcon = ({ highlightColor, ...props }) => /* @__PURE__ */ jsx("svg", {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
fill: "none",
|
|
5
5
|
viewBox: "0 0 24 24",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
const TextColorIcon = ({ textColor
|
|
2
|
+
const TextColorIcon = ({ textColor, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
fill: "none",
|
|
5
5
|
viewBox: "0 0 25 24",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChevronRightIcon } from "
|
|
1
|
+
import { ChevronRightIcon } from "../../assets/icons/ChevronRight.js";
|
|
2
2
|
import { breadcrumbChevron, breadcrumbIcon, breadcrumbItem, breadcrumbSegment, breadcrumbsCva } from "./breadcrumbs.cva.js";
|
|
3
|
-
import { UIStyle } from "
|
|
4
|
-
import { MenuDesktop } from "
|
|
5
|
-
import { Typography } from "
|
|
6
|
-
import { Tooltip as Tooltip$1 } from "
|
|
7
|
-
import { LinkContext } from "
|
|
3
|
+
import { UIStyle } from "../../config/uiStyle.context.js";
|
|
4
|
+
import { MenuDesktop } from "../Menu/MenuDesktop.js";
|
|
5
|
+
import { Typography } from "../text/Typography/Typography.js";
|
|
6
|
+
import { Tooltip as Tooltip$1 } from "../overlays/Tooltip/Tooltip.js";
|
|
7
|
+
import { LinkContext } from "../../config/link.context.js";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
10
|
import { useLayoutEffect, useRef, useState } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MenuDesktop } from "./MenuDesktop.js";
|
|
2
2
|
import { MenuMobile } from "./MenuMobile.js";
|
|
3
|
-
import { useBreakpoint } from "
|
|
3
|
+
import { useBreakpoint } from "../../hooks/useBreakpoint.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const Menu = (props) => {
|
|
6
6
|
if (useBreakpoint("md")) return /* @__PURE__ */ jsx(MenuDesktop, { ...props });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MenuProps } from './Menu';
|
|
2
|
-
export declare const MenuDesktop: ({ trigger, items,
|
|
2
|
+
export declare const MenuDesktop: ({ trigger, items, onAction, ...props }: MenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MenuPopover } from "./MenuPopover.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { MenuTrigger } from "react-aria-components";
|
|
4
|
+
const MenuDesktop = ({ trigger, items, onAction, ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsxs(MenuTrigger, { children: [trigger, /* @__PURE__ */ jsx(MenuPopover, {
|
|
6
|
+
...props,
|
|
7
|
+
offset: 0,
|
|
8
|
+
items,
|
|
9
|
+
onAction
|
|
10
|
+
})] });
|
|
11
|
+
};
|
|
12
|
+
export { MenuDesktop };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ArrowRightIcon } from "
|
|
1
|
+
import { ArrowRightIcon } from "../../assets/icons/ArrowRight.js";
|
|
2
2
|
import { menuItemCva } from "./menu.cva.js";
|
|
3
|
-
import { UIStyle } from "
|
|
3
|
+
import { UIStyle } from "../../config/uiStyle.context.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { MenuItem } from "react-aria-components";
|
|
7
|
-
const MenuItem$1 = ({ label, content, children, className
|
|
7
|
+
const MenuItem$1 = ({ label, content, children, className, ...item }) => {
|
|
8
8
|
const hasSubmenu = !!children && children?.length > 0;
|
|
9
9
|
const menuItemCva$1 = UIStyle.useConfig()?.menu?.itemCva ?? menuItemCva;
|
|
10
10
|
return /* @__PURE__ */ jsxs(MenuItem, {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ArrowLeftIcon } from "
|
|
1
|
+
import { ArrowLeftIcon } from "../../assets/icons/ArrowLeft.js";
|
|
2
2
|
import { menuCva, menuItemCva } from "./menu.cva.js";
|
|
3
|
-
import { UIStyle } from "
|
|
3
|
+
import { UIStyle } from "../../config/uiStyle.context.js";
|
|
4
4
|
import { MenuItem as MenuItem$1 } from "./MenuItem.js";
|
|
5
|
-
import { BottomSheet } from "
|
|
5
|
+
import { BottomSheet } from "../overlays/BottomSheet/BottomSheet.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { useRef, useState } from "react";
|
|
9
9
|
import { Button, Menu } from "react-aria-components";
|
|
10
|
-
const MenuMobile = ({ trigger, items, onAction
|
|
10
|
+
const MenuMobile = ({ trigger, items, onAction, ...props }) => {
|
|
11
11
|
const uiStyle = UIStyle.useConfig();
|
|
12
12
|
const menuItemCva$1 = uiStyle?.menu?.itemCva ?? menuItemCva;
|
|
13
13
|
const menuCva$1 = uiStyle?.menu?.cva ?? menuCva;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { menuCva, menuPopoverCva, menuPopoverWrapperCva } from "./menu.cva.js";
|
|
2
|
-
import { UIStyle } from "
|
|
2
|
+
import { UIStyle } from "../../config/uiStyle.context.js";
|
|
3
3
|
import { MenuItem as MenuItem$1 } from "./MenuItem.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { useRef } from "react";
|
|
7
7
|
import { Menu, Popover, SubmenuTrigger } from "react-aria-components";
|
|
8
|
-
const MenuPopover = ({ items, className, onAction
|
|
8
|
+
const MenuPopover = ({ items, className, onAction, ...props }) => {
|
|
9
9
|
const lastEventRef = useRef(null);
|
|
10
10
|
const uiStyle = UIStyle.useConfig();
|
|
11
11
|
const menuPopoverCva$1 = uiStyle?.menu?.popoverCva ?? menuPopoverCva;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, ReactElement, SVGProps } from 'react';
|
|
1
|
+
import { FC, ReactElement, Ref, SVGProps } from 'react';
|
|
2
2
|
import { ButtonProps as AriaButtonProps, ToggleButtonProps as AriaToggleButtonProps } from 'react-aria-components';
|
|
3
3
|
import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
|
|
4
4
|
import { LinkNavigationProps } from '../../text/Link/Link';
|
|
@@ -22,7 +22,7 @@ export type ButtonProps<IconOnly extends boolean = false> = ButtonVariantProps &
|
|
|
22
22
|
link?: LinkNavigationProps;
|
|
23
23
|
noDisableWhenLoading?: boolean;
|
|
24
24
|
iconClassName?: string;
|
|
25
|
-
|
|
25
|
+
contentRef?: Ref<HTMLElement>;
|
|
26
26
|
};
|
|
27
|
-
export declare const Button: <IconOnly extends boolean = false>({ icon: Icon, iconPosition, children, isLoading, className, link, iconClassName, noDisableWhenLoading,
|
|
27
|
+
export declare const Button: <IconOnly extends boolean = false>({ icon: Icon, iconPosition, children, isLoading, className, link, iconClassName, noDisableWhenLoading, contentRef, ...props }: ButtonProps<IconOnly>) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
|
+
import { LinkContext } from "../../../config/link.context.js";
|
|
3
|
+
import { ButtonContent } from "../shared/ButtonContent.js";
|
|
4
|
+
import { button, buttonContent, buttonIconSize, buttonSize, buttonTypography } from "./button.cva.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
import { Button, Link, ToggleButton } from "react-aria-components";
|
|
8
|
+
const Button$1 = ({ icon: Icon, iconPosition, children, isLoading, className, link, iconClassName, noDisableWhenLoading, contentRef, ...props }) => {
|
|
9
|
+
const linkContext = LinkContext.useLinkContext();
|
|
10
|
+
const uiStyle = UIStyle.useConfig();
|
|
11
|
+
const buttonCva = uiStyle?.button?.cva ?? button;
|
|
12
|
+
const buttonSizeCva = uiStyle?.button?.sizeCva ?? buttonSize;
|
|
13
|
+
const buttonContentCva = uiStyle?.button?.contentCva ?? buttonContent;
|
|
14
|
+
const buttonIconSizeCva = uiStyle?.button?.iconSize ?? buttonIconSize;
|
|
15
|
+
const typographyMap = uiStyle?.button?.typography ?? buttonTypography;
|
|
16
|
+
const Component = (() => {
|
|
17
|
+
if (link) return linkContext?.LinkComponent ?? Link;
|
|
18
|
+
if (props.toggle != null) return ToggleButton;
|
|
19
|
+
return Button;
|
|
20
|
+
})();
|
|
21
|
+
if (link && !link.to && link.href) link.to = link.href;
|
|
22
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
23
|
+
...props,
|
|
24
|
+
...link,
|
|
25
|
+
isDisabled: props.isDisabled || isLoading && !noDisableWhenLoading,
|
|
26
|
+
className: clsx(buttonCva({
|
|
27
|
+
...props,
|
|
28
|
+
className
|
|
29
|
+
}), buttonSizeCva({ ...props }), buttonContentCva({
|
|
30
|
+
...props,
|
|
31
|
+
iconPosition: !Icon ? "none" : iconPosition
|
|
32
|
+
})),
|
|
33
|
+
children: /* @__PURE__ */ jsx(ButtonContent, {
|
|
34
|
+
ref: contentRef,
|
|
35
|
+
isLoading,
|
|
36
|
+
icon: Icon,
|
|
37
|
+
text: children,
|
|
38
|
+
hideText: props.iconOnly,
|
|
39
|
+
iconPosition,
|
|
40
|
+
iconClassName: buttonIconSizeCva({
|
|
41
|
+
...props,
|
|
42
|
+
className: iconClassName
|
|
43
|
+
}),
|
|
44
|
+
typography: typographyMap({ ...props })
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
export { Button$1 as Button };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uiOutlineClass } from "
|
|
2
|
-
import { compoundMapper } from "
|
|
1
|
+
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
2
|
+
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
const button = cva([
|
|
5
5
|
"group inline-flex items-center justify-center border border-solid",
|
|
@@ -584,19 +584,10 @@ const buttonContent = cva("", {
|
|
|
584
584
|
none: ""
|
|
585
585
|
},
|
|
586
586
|
iconOnly: {
|
|
587
|
-
true: "
|
|
587
|
+
true: "",
|
|
588
588
|
false: ""
|
|
589
589
|
}
|
|
590
590
|
},
|
|
591
|
-
compoundVariants: [{
|
|
592
|
-
iconOnly: false,
|
|
593
|
-
iconPosition: "left",
|
|
594
|
-
className: "pr-button-side-button-content"
|
|
595
|
-
}, {
|
|
596
|
-
iconOnly: false,
|
|
597
|
-
iconPosition: "right",
|
|
598
|
-
className: "pl-button-side-button-content"
|
|
599
|
-
}],
|
|
600
591
|
defaultVariants: {
|
|
601
592
|
size: "m",
|
|
602
593
|
iconPosition: "left",
|
|
@@ -8,4 +8,4 @@ export interface IconButtonProps extends ButtonVariantProps, Omit<AriaButtonProp
|
|
|
8
8
|
link?: LinkNavigationProps;
|
|
9
9
|
disableTooltip?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare const IconButton: ({ label, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const IconButton: ({ label, disableTooltip, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
2
|
+
import { Button } from "../Button/Button.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
const IconButton = ({ label, disableTooltip, ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
6
|
+
text: label,
|
|
7
|
+
placement: "bottom",
|
|
8
|
+
hidden: !label || disableTooltip,
|
|
9
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
10
|
+
...props,
|
|
11
|
+
iconOnly: true,
|
|
12
|
+
width: "hug",
|
|
13
|
+
children: label
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export { IconButton };
|
package/dist/{InlineIconButton.js → components/buttons/InlineIconButton/InlineIconButton.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button } from "
|
|
1
|
+
import { Button } from "../Button/Button.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
const InlineIconButton = ({ label
|
|
3
|
+
const InlineIconButton = ({ label, ...props }) => {
|
|
4
4
|
return /* @__PURE__ */ jsx(Button, {
|
|
5
5
|
...props,
|
|
6
6
|
iconOnly: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC, SVGProps } from 'react';
|
|
1
|
+
import { FC, Ref, SVGProps } from 'react';
|
|
2
2
|
import { ButtonProps as AriaButtonProps, ToggleButtonProps as AriaToggleButtonProps } from 'react-aria-components';
|
|
3
3
|
import { PillButtonVariants } from './pillButton.cva';
|
|
4
4
|
import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
|
|
@@ -7,5 +7,6 @@ export interface PillButtonProps extends AriaButtonProps, Omit<AriaToggleButtonP
|
|
|
7
7
|
dismissable?: boolean;
|
|
8
8
|
toggle?: boolean;
|
|
9
9
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
10
|
+
contentRef?: Ref<HTMLElement>;
|
|
10
11
|
}
|
|
11
|
-
export declare const PillButton: ({ children, dismissable, toggle, icon, iconPosition, ...props }: PillButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const PillButton: ({ children, dismissable, toggle, icon, iconPosition, contentRef, ...props }: PillButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
2
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
3
|
+
import { ButtonContent } from "../shared/ButtonContent.js";
|
|
4
|
+
import { pillButton, pillButtonContent, pillButtonIconSize, pillButtonTypography } from "./pillButton.cva.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
import { Button, ToggleButton } from "react-aria-components";
|
|
8
|
+
const PillButton = ({ children, dismissable, toggle, icon, iconPosition, contentRef, ...props }) => {
|
|
9
|
+
const uiStyle = UIStyle.useConfig();
|
|
10
|
+
const pillButtonCva = uiStyle?.pillButton?.cva ?? pillButton;
|
|
11
|
+
const pillButtonTypographyMap = uiStyle?.pillButton?.typography ?? pillButtonTypography;
|
|
12
|
+
const Component = toggle ? ToggleButton : Button;
|
|
13
|
+
const getIconPosition = () => {
|
|
14
|
+
if (dismissable) return "right";
|
|
15
|
+
return icon ? iconPosition : "none";
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
18
|
+
...props,
|
|
19
|
+
className: clsx(pillButtonCva({
|
|
20
|
+
...props,
|
|
21
|
+
className: props.className
|
|
22
|
+
}), pillButtonContent({ iconPosition: getIconPosition() })),
|
|
23
|
+
children: /* @__PURE__ */ jsx(ButtonContent, {
|
|
24
|
+
ref: contentRef,
|
|
25
|
+
text: children,
|
|
26
|
+
icon: dismissable ? CloseIcon : icon,
|
|
27
|
+
iconPosition: dismissable ? "right" : iconPosition,
|
|
28
|
+
iconClassName: pillButtonIconSize,
|
|
29
|
+
typography: pillButtonTypographyMap({ ...props })
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export { PillButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uiOutlineClass } from "
|
|
2
|
-
import { compoundMapper } from "
|
|
1
|
+
import { uiOutlineClass } from "../../outline.clsx.js";
|
|
2
|
+
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
const pillButton = cva([
|
|
@@ -240,8 +240,8 @@ const pillButton = cva([
|
|
|
240
240
|
});
|
|
241
241
|
const pillButtonContent = cva("", {
|
|
242
242
|
variants: { iconPosition: {
|
|
243
|
-
left: "gap-button-gap-icon-to-label
|
|
244
|
-
right: "gap-button-gap-icon-to-label
|
|
243
|
+
left: "gap-button-gap-icon-to-label",
|
|
244
|
+
right: "gap-button-gap-icon-to-label",
|
|
245
245
|
none: "gap-button-gap-icon-to-label"
|
|
246
246
|
} },
|
|
247
247
|
defaultVariants: { iconPosition: "left" }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChevronDownIcon } from "
|
|
2
|
-
import { Button } from "
|
|
3
|
-
import { IconButton } from "
|
|
4
|
-
import { Menu } from "
|
|
1
|
+
import { ChevronDownIcon } from "../../../assets/icons/ChevronDown.js";
|
|
2
|
+
import { Button } from "../Button/Button.js";
|
|
3
|
+
import { IconButton } from "../IconButton/IconButton.js";
|
|
4
|
+
import { Menu } from "../../Menu/Menu.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
|
-
const SplitButton = ({ variant, color, width, size, label, labelRight, link, items, className, isLoading
|
|
7
|
+
const SplitButton = ({ variant, color, width, size, label, labelRight, link, items, className, isLoading, ...props }) => {
|
|
8
8
|
return /* @__PURE__ */ jsxs("div", {
|
|
9
9
|
className: "group/split flex items-center",
|
|
10
10
|
"data-split": "",
|
|
@@ -7,6 +7,5 @@ export type TextButtonProps = Omit<ButtonVariantProps, "variant"> & ButtonConten
|
|
|
7
7
|
children: string;
|
|
8
8
|
isLoading?: boolean;
|
|
9
9
|
link?: LinkNavigationProps;
|
|
10
|
-
disableTooltip?: boolean;
|
|
11
10
|
};
|
|
12
11
|
export declare const TextButton: ({ children, ...props }: TextButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Button } from "
|
|
1
|
+
import { Button } from "../Button/Button.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
const TextButton = ({ children
|
|
3
|
+
const TextButton = ({ children, ...props }) => {
|
|
4
4
|
return /* @__PURE__ */ jsx(Button, {
|
|
5
5
|
...props,
|
|
6
6
|
variant: "text",
|
|
7
7
|
size: "none",
|
|
8
8
|
width: props.width ?? "hug",
|
|
9
|
-
disableTooltip: props.disableTooltip,
|
|
10
9
|
children
|
|
11
10
|
});
|
|
12
11
|
};
|
|
@@ -4,6 +4,5 @@ import { ButtonVariantProps } from '../Button/button.cva';
|
|
|
4
4
|
import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
|
|
5
5
|
export type ToggleButtonProps = ButtonVariantProps & ButtonContentVariantProps & AriaToggleButtonProps & ButtonIconProps<true | false> & {
|
|
6
6
|
children: string;
|
|
7
|
-
disableTooltip?: boolean;
|
|
8
7
|
};
|
|
9
8
|
export declare const ToggleButton: ({ children, ...props }: ToggleButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Button } from "
|
|
1
|
+
import { Button } from "../Button/Button.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
const ToggleButton = ({ children
|
|
3
|
+
const ToggleButton = ({ children, ...props }) => {
|
|
4
4
|
return /* @__PURE__ */ jsx(Button, {
|
|
5
5
|
...props,
|
|
6
6
|
toggle: true,
|
|
7
7
|
variant: "outlined",
|
|
8
8
|
color: "primary",
|
|
9
|
-
disableTooltip: props.disableTooltip,
|
|
10
9
|
children
|
|
11
10
|
});
|
|
12
11
|
};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { FC, ReactElement, Ref, SVGProps } from 'react';
|
|
2
|
-
import { ButtonVariantProps } from '../Button/button.cva';
|
|
3
2
|
import { ButtonContentVariantProps } from './buttonContent.cva';
|
|
4
3
|
import { TypographyVariantProps } from '../../text/Typography/typography.cva';
|
|
5
|
-
interface ButtonContentProps extends ButtonContentVariantProps
|
|
6
|
-
ref?: Ref<
|
|
4
|
+
interface ButtonContentProps extends ButtonContentVariantProps {
|
|
5
|
+
ref?: Ref<HTMLElement>;
|
|
7
6
|
text: string;
|
|
8
7
|
isLoading?: boolean;
|
|
9
|
-
className?: string;
|
|
10
8
|
icon?: FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
11
9
|
iconClassName?: string;
|
|
12
10
|
hideText?: boolean;
|
|
13
11
|
typography?: TypographyVariantProps;
|
|
14
12
|
}
|
|
15
|
-
export declare const ButtonContent: ({ ref, text, isLoading,
|
|
13
|
+
export declare const ButtonContent: ({ ref, text, isLoading, icon: Icon, iconClassName, hideText, iconPosition, typography: typographyOverrides, }: ButtonContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
14
|
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
|
+
import { typography } from "../../text/Typography/typography.cva.js";
|
|
3
|
+
import { buttonContentLabel } from "./buttonContent.cva.js";
|
|
4
|
+
import { Loader } from "../../status/Loader/Loader.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { clsx } from "clsx";
|
|
7
|
+
import { isValidElement } from "react";
|
|
8
|
+
const ButtonContent = ({ ref, text, isLoading, icon: Icon, iconClassName, hideText, iconPosition = "left", typography: typographyOverrides }) => {
|
|
9
|
+
const typographyCva = UIStyle.useConfig()?.typography?.cva ?? typography;
|
|
10
|
+
let iconOrLoader = null;
|
|
11
|
+
if (isLoading) iconOrLoader = /* @__PURE__ */ jsx(Loader, { className: "shrink-0" });
|
|
12
|
+
else if (Icon) if (isValidElement(Icon)) iconOrLoader = Icon;
|
|
13
|
+
else iconOrLoader = /* @__PURE__ */ jsx(Icon, { className: clsx("shrink-0", iconClassName) });
|
|
14
|
+
const resolvedTypography = {
|
|
15
|
+
size: "label-2",
|
|
16
|
+
variant: "prominent-1",
|
|
17
|
+
...typographyOverrides
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
iconOrLoader && iconPosition === "left" && iconOrLoader,
|
|
21
|
+
/* @__PURE__ */ jsx("span", {
|
|
22
|
+
className: clsx(typographyCva({
|
|
23
|
+
...resolvedTypography,
|
|
24
|
+
sizeMobile: resolvedTypography.sizeMobile ?? resolvedTypography.size
|
|
25
|
+
}), buttonContentLabel({
|
|
26
|
+
iconPosition: iconOrLoader ? iconPosition : "none",
|
|
27
|
+
hideText: !!hideText
|
|
28
|
+
})),
|
|
29
|
+
ref,
|
|
30
|
+
children: text
|
|
31
|
+
}),
|
|
32
|
+
iconOrLoader && iconPosition === "right" && iconOrLoader
|
|
33
|
+
] });
|
|
34
|
+
};
|
|
35
|
+
export { ButtonContent };
|
|
@@ -2,5 +2,9 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
export declare const buttonContent: (props?: ({
|
|
3
3
|
iconPosition?: "none" | "left" | "right" | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export declare const buttonContentLabel: (props?: ({
|
|
6
|
+
iconPosition?: "none" | "left" | "right" | null | undefined;
|
|
7
|
+
hideText?: boolean | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
9
|
export interface ButtonContentVariantProps extends VariantProps<typeof buttonContent> {
|
|
6
10
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
cva("flex w-full items-center justify-center", {
|
|
3
|
+
variants: { iconPosition: {
|
|
4
|
+
left: "flex-row",
|
|
5
|
+
right: "flex-row-reverse",
|
|
6
|
+
none: "flex-row"
|
|
7
|
+
} },
|
|
8
|
+
defaultVariants: { iconPosition: "left" }
|
|
9
|
+
});
|
|
10
|
+
const buttonContentLabel = cva("hyphens-auto md:truncate", {
|
|
11
|
+
variants: {
|
|
12
|
+
iconPosition: {
|
|
13
|
+
left: "",
|
|
14
|
+
right: "",
|
|
15
|
+
none: ""
|
|
16
|
+
},
|
|
17
|
+
hideText: {
|
|
18
|
+
true: "sr-only",
|
|
19
|
+
false: ""
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
compoundVariants: [{
|
|
23
|
+
iconPosition: "left",
|
|
24
|
+
hideText: false,
|
|
25
|
+
className: "mr-button-side-button-content"
|
|
26
|
+
}, {
|
|
27
|
+
iconPosition: "right",
|
|
28
|
+
hideText: false,
|
|
29
|
+
className: "ml-button-side-button-content"
|
|
30
|
+
}],
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
iconPosition: "none",
|
|
33
|
+
hideText: false
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export { buttonContentLabel };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { UIStyle } from "
|
|
1
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
2
|
import { checkboxIndicatorClass, checkboxTypography } from "./checkbox.cva.js";
|
|
3
|
-
import { FormFieldError } from "
|
|
4
|
-
import { CheckContent } from "
|
|
5
|
-
import { UIConfig } from "
|
|
6
|
-
import { CheckboxCheckmark } from "./
|
|
3
|
+
import { FormFieldError } from "../FormField/FormFieldError.js";
|
|
4
|
+
import { CheckContent } from "../shared/CheckContent.js";
|
|
5
|
+
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
6
|
+
import { CheckboxCheckmark } from "./CheckboxCheckmark.js";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { clsx } from "clsx";
|
|
9
9
|
import { Checkbox } from "react-aria-components";
|
|
@@ -12,7 +12,7 @@ import { Controller } from "react-hook-form";
|
|
|
12
12
|
var CheckboxBase = (props) => {
|
|
13
13
|
const ui = UIConfig.useConfig();
|
|
14
14
|
const checkboxTypographyMap = UIStyle.useConfig()?.checkbox?.typography ?? checkboxTypography;
|
|
15
|
-
const { className, children, isDisabled, error, variant = ui.checkbox.variant, hideLabel = ui.input.hideLabel
|
|
15
|
+
const { className, children, isDisabled, error, variant = ui.checkbox.variant, hideLabel = ui.input.hideLabel, ...rest } = props;
|
|
16
16
|
const formFieldErrorProps = {
|
|
17
17
|
error,
|
|
18
18
|
isDisabled
|
|
@@ -39,7 +39,7 @@ var CheckboxBase = (props) => {
|
|
|
39
39
|
};
|
|
40
40
|
const Checkbox$1 = (props) => {
|
|
41
41
|
if ("formControl" in props && props.formControl) {
|
|
42
|
-
const { formControl, ref
|
|
42
|
+
const { formControl, ref, ...innerProps } = props;
|
|
43
43
|
return /* @__PURE__ */ jsx(Controller, {
|
|
44
44
|
control: formControl.control,
|
|
45
45
|
name: formControl.name,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CheckboxCheckmarkIcon } from "
|
|
2
|
-
import { CheckboxIndeterminateIcon } from "
|
|
3
|
-
import { UIStyle } from "
|
|
1
|
+
import { CheckboxCheckmarkIcon } from "../../../assets/icons/CheckboxCheckmark.js";
|
|
2
|
+
import { CheckboxIndeterminateIcon } from "../../../assets/icons/CheckboxIndeterminate.js";
|
|
3
|
+
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
4
4
|
import { checkbox, checkboxIcon } from "./checkbox.cva.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
const CheckboxCheckmark = ({ variant, className, selectedIcon: SelectedIcon = CheckboxCheckmarkIcon, indeterminateIcon: IndeterminateIcon = CheckboxIndeterminateIcon
|
|
6
|
+
const CheckboxCheckmark = ({ variant, className, selectedIcon: SelectedIcon = CheckboxCheckmarkIcon, indeterminateIcon: IndeterminateIcon = CheckboxIndeterminateIcon, ...props }) => {
|
|
7
7
|
const uiStyle = UIStyle.useConfig();
|
|
8
8
|
const checkboxCva = uiStyle?.checkbox?.cva ?? checkbox;
|
|
9
9
|
const checkboxIconCva = uiStyle?.checkbox?.iconCva ?? checkboxIcon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uiGroupOutlineClass } from "
|
|
2
|
-
import { compoundMapper } from "
|
|
1
|
+
import { uiGroupOutlineClass } from "../../outline.clsx.js";
|
|
2
|
+
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
const checkbox = cva([
|
|
5
5
|
"flex items-center justify-center border-2",
|