@uxf/ui 10.0.0-beta.79 → 10.0.0-beta.80
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/_file-input-base/index.d.ts +1 -1
- package/_input-with-popover/input-with-popover.d.ts +4 -3
- package/_input-with-popover/input-with-popover.js +26 -26
- package/_select-base/_select-base.d.ts +1 -1
- package/_select-base/index.d.ts +1 -1
- package/alert-bubble/alert-bubble.js +1 -1
- package/alert-bubble/alert-bubble.spec.js +1 -1
- package/alert-bubble/index.d.ts +1 -1
- package/avatar/index.d.ts +1 -1
- package/avatar-file-input/avatar-file-input.js +4 -4
- package/avatar-file-input/avatar-file-input.stories.js +5 -5
- package/avatar-file-input/index.d.ts +1 -1
- package/badge/badge.d.ts +1 -1
- package/badge/badge.stories.js +1 -1
- package/badge/index.d.ts +1 -1
- package/button/index.d.ts +1 -1
- package/button-group/button-group.js +1 -1
- package/button-group/button-group.stories.js +1 -1
- package/button-group/index.d.ts +1 -1
- package/button-list/button-list.d.ts +1 -1
- package/button-list/button-list.js +22 -22
- package/button-list/index.d.ts +1 -1
- package/calendar/calendar-day-cell.d.ts +2 -2
- package/calendar/calendar-day-cell.js +4 -4
- package/calendar/calendar-provider.js +1 -1
- package/calendar/calendar.d.ts +1 -1
- package/calendar/calendar.js +1 -1
- package/calendar/calendar.stories.js +1 -1
- package/checkbox/checkbox.stories.js +1 -1
- package/checkbox/index.d.ts +1 -1
- package/checkbox-button/checkbox-button.js +2 -2
- package/checkbox-button/checkbox-button.stories.js +1 -1
- package/checkbox-button/index.d.ts +1 -1
- package/checkbox-input/checkbox-input.d.ts +1 -1
- package/checkbox-input/checkbox-input.stories.js +1 -1
- package/checkbox-input/index.d.ts +1 -1
- package/chip/chip.d.ts +1 -1
- package/chip/chip.js +1 -1
- package/chip/chip.stories.js +1 -1
- package/chip/index.d.ts +2 -2
- package/color-radio/color-radio.js +1 -1
- package/color-radio/index.d.ts +1 -1
- package/color-radio-group/color-radio-group.js +3 -3
- package/color-radio-group/color-radio-group.stories.js +1 -1
- package/color-radio-group/index.d.ts +1 -1
- package/combobox/combobox.stories.js +1 -1
- package/combobox/index.d.ts +1 -1
- package/content/types.d.ts +1 -1
- package/context/provider.js +1 -1
- package/date-picker/date-picker-content.js +2 -2
- package/date-picker/date-picker-decade.js +4 -4
- package/date-picker/date-picker.d.ts +1 -1
- package/date-picker/date-picker.js +1 -1
- package/date-picker/index.d.ts +1 -1
- package/date-picker-input/date-picker-input.js +3 -3
- package/date-picker-input/date-picker-input.stories.js +1 -1
- package/date-picker-input/index.d.ts +1 -1
- package/date-picker-input/index.js +3 -3
- package/date-range-picker/date-range-picker-content.js +2 -2
- package/date-range-picker/date-range-picker-decade.js +4 -4
- package/date-range-picker/date-range-picker-month.js +1 -1
- package/date-range-picker/date-range-picker-year.js +1 -1
- package/date-range-picker/date-range-picker.js +1 -1
- package/date-range-picker/index.d.ts +1 -1
- package/date-range-picker-input/index.d.ts +1 -1
- package/datetime-picker/datetime-picker.js +3 -3
- package/datetime-picker/index.d.ts +1 -1
- package/datetime-picker/index.js +2 -2
- package/datetime-picker-input/datetime-picker-input.js +3 -3
- package/datetime-picker-input/datetime-picker-input.stories.js +1 -1
- package/datetime-picker-input/index.d.ts +1 -1
- package/datetime-picker-input/index.js +2 -2
- package/dialog/dialog.stories.js +1 -1
- package/dialog/index.d.ts +1 -1
- package/dropdown/dropdown.stories.js +2 -2
- package/dropdown/index.d.ts +1 -1
- package/dropzone/dropzone.stories.js +7 -7
- package/error-message/error-message.stories.js +1 -1
- package/file-input/file-input.js +1 -1
- package/file-input/file-input.stories.js +5 -5
- package/file-input/index.d.ts +1 -1
- package/flash-messages/flash-message.d.ts +1 -1
- package/flash-messages/flash-messages.js +22 -22
- package/flash-messages/index.d.ts +2 -2
- package/flash-messages/index.js +4 -4
- package/form-component/index.d.ts +1 -1
- package/hooks/use-dropdown.d.ts +14 -6
- package/icon/icon.stories.js +1 -1
- package/icon/index.d.ts +1 -1
- package/image-gallery/components/gallery.js +2 -2
- package/image-gallery/image-gallery.js +1 -1
- package/image-gallery/image-gallery.stories.js +1 -1
- package/image-gallery/image.d.ts +1 -1
- package/image-gallery/image.js +1 -1
- package/image-gallery/use-image.js +1 -1
- package/input/input-element.d.ts +1 -0
- package/input/input-element.js +1 -1
- package/input/input.d.ts +2 -2
- package/input/input.js +3 -3
- package/input/input.stories.js +3 -3
- package/label/index.d.ts +1 -1
- package/label/label.stories.js +1 -1
- package/layout/index.d.ts +1 -1
- package/layout/layout.js +28 -28
- package/list-item/index.d.ts +1 -1
- package/list-item/list-item.stories.js +1 -1
- package/loader/index.d.ts +1 -1
- package/message/index.d.ts +1 -1
- package/message/message-content.js +1 -1
- package/message/message.d.ts +1 -1
- package/message/message.js +1 -1
- package/message/message.spec.js +1 -1
- package/message/message.stories.js +1 -1
- package/modal/index.d.ts +2 -2
- package/multi-combobox/README.md +10 -1
- package/multi-combobox/_multi-combobox-base.js +28 -28
- package/multi-combobox/multi-combobox.js +1 -1
- package/multi-combobox/multi-combobox.stories.js +1 -1
- package/multi-combobox/types.d.ts +1 -1
- package/multi-select/README.md +11 -1
- package/multi-select/_multi-select-base.js +20 -20
- package/multi-select/index.d.ts +1 -1
- package/multi-select/multi-select.js +1 -1
- package/multi-select/multi-select.stories.js +1 -1
- package/multi-select/types.d.ts +1 -1
- package/package.json +14 -9
- package/pagination/README.md +31 -1
- package/pagination/index.d.ts +1 -1
- package/pagination/pagination.d.ts +1 -1
- package/pagination/pagination.js +2 -2
- package/pagination/pagination.stories.d.ts +0 -3
- package/pagination/pagination.stories.js +14 -30
- package/paper/README.md +7 -1
- package/paper/index.d.ts +1 -1
- package/paper/paper.stories.js +1 -1
- package/radio/README.md +7 -1
- package/radio/index.d.ts +1 -1
- package/radio/radio.stories.js +1 -1
- package/radio-group/README.md +8 -1
- package/radio-group/index.d.ts +1 -1
- package/radio-group/radio-group.stories.js +1 -1
- package/raster-image/README.md +7 -1
- package/raster-image/index.d.ts +1 -1
- package/scripts/generate-tw-tokens.js +40 -32
- package/select/README.md +11 -1
- package/select/index.d.ts +1 -1
- package/select/select.js +1 -1
- package/select/select.stories.js +1 -1
- package/tabs/README.md +7 -1
- package/tabs/index.d.ts +1 -1
- package/text-input/README.md +10 -1
- package/text-input/index.d.ts +1 -1
- package/text-input/text-input.d.ts +1 -0
- package/text-input/text-input.js +2 -2
- package/text-link/README.md +7 -22
- package/text-link/index.d.ts +1 -1
- package/text-link/text-link.d.ts +1 -1
- package/textarea/README.md +9 -1
- package/textarea/index.d.ts +1 -1
- package/textarea/textarea.stories.js +1 -1
- package/time-picker/README.md +8 -1
- package/time-picker/index.d.ts +1 -1
- package/time-picker/time-picker-hour.js +3 -3
- package/time-picker/time-picker-hours.js +1 -1
- package/time-picker/time-picker-minute.js +3 -3
- package/time-picker/time-picker-minutes.js +1 -1
- package/time-picker/time-picker.d.ts +1 -1
- package/time-picker/time-picker.js +4 -4
- package/time-picker-input/README.md +9 -1
- package/time-picker-input/index.d.ts +1 -1
- package/time-picker-input/index.js +3 -3
- package/time-picker-input/time-picker-input.js +4 -4
- package/time-picker-input/time-picker-input.stories.js +1 -1
- package/toggle/README.md +7 -1
- package/toggle/index.d.ts +1 -1
- package/toggle/toggle.js +8 -8
- package/toggle/toggle.stories.js +1 -1
- package/tooltip/README.md +7 -1
- package/tooltip/index.d.ts +2 -2
- package/tooltip/tooltip.js +11 -11
- package/tooltip/tooltip.stories.js +1 -1
- package/tooltip/use-tooltip.d.ts +15 -7
- package/tooltip/use-tooltip.js +15 -15
- package/tw-tokens/tw-colors.d.ts +283 -282
- package/tw-tokens/tw-colors.js +283 -282
- package/tw-tokens/tw-line-height.d.ts +8 -8
- package/tw-tokens/tw-line-height.js +8 -8
- package/tw-tokens/tw-spacing.d.ts +34 -34
- package/tw-tokens/tw-spacing.js +34 -34
- package/tw-tokens/tw-z-index.d.ts +7 -7
- package/tw-tokens/tw-z-index.js +7 -7
- package/types/index.d.ts +1 -1
- package/types/index.js +1 -1
- package/typography/README.md +7 -1
- package/utils/snap-test.js +1 -1
- package/utils/storybook-config.d.ts +3 -3
- package/utils/tailwind-config.js +2 -1
- /package/utils/mocks/{uploadFIle.mock.d.ts → upload-file.mock.d.ts} +0 -0
- /package/utils/mocks/{uploadFIle.mock.js → upload-file.mock.js} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Clearable, FormControlProps } from "../types";
|
|
2
|
-
import { InputProps } from "../input";
|
|
3
|
-
import React, { MutableRefObject, ReactElement, ReactNode } from "react";
|
|
4
1
|
import { Placement, Strategy } from "@floating-ui/react";
|
|
2
|
+
import React, { MutableRefObject, ReactElement, ReactNode } from "react";
|
|
3
|
+
import { InputProps } from "../input";
|
|
4
|
+
import { Clearable, FormControlProps } from "../types";
|
|
5
5
|
export interface InputWithPopoverProps<ValueType = string> extends FormControlProps<ValueType>, Pick<InputProps, "size" | "variant">, Clearable {
|
|
6
|
+
autoFocus?: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
children: (args: {
|
|
8
9
|
close: (focusableElement?: HTMLElement | MutableRefObject<HTMLElement | null>) => void;
|
|
@@ -24,15 +24,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports._InputWithPopover = void 0;
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const useInputFocus_1 = require("@uxf/core/hooks/useInputFocus");
|
|
30
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
27
|
+
const react_1 = require("@floating-ui/react");
|
|
28
|
+
const react_2 = require("@headlessui/react");
|
|
31
29
|
const classes_1 = require("@uxf/core/constants/classes");
|
|
32
|
-
const
|
|
30
|
+
const useInputFocus_1 = require("@uxf/core/hooks/useInputFocus");
|
|
33
31
|
const composeRefs_1 = require("@uxf/core/utils/composeRefs");
|
|
32
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
33
|
+
const react_3 = __importStar(require("react"));
|
|
34
34
|
const form_component_1 = require("../form-component");
|
|
35
|
-
const
|
|
35
|
+
const input_1 = require("../input");
|
|
36
36
|
function useErrorProps(error, id, isInvalid) {
|
|
37
37
|
const errorId = isInvalid ? `${id}--error-message` : undefined;
|
|
38
38
|
return {
|
|
@@ -42,20 +42,20 @@ function useErrorProps(error, id, isInvalid) {
|
|
|
42
42
|
ariaInvalid: !!error,
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
exports._InputWithPopover = (0,
|
|
45
|
+
exports._InputWithPopover = (0, react_3.forwardRef)((props, ref) => {
|
|
46
46
|
var _a, _b, _c;
|
|
47
|
-
const generatedId = (0,
|
|
47
|
+
const generatedId = (0, react_3.useId)();
|
|
48
48
|
const id = (_a = props.id) !== null && _a !== void 0 ? _a : generatedId;
|
|
49
|
-
const innerRef = (0,
|
|
49
|
+
const innerRef = (0, react_3.useRef)(null);
|
|
50
50
|
const input = (0, useInputFocus_1.useInputFocus)(innerRef, props.onBlur, props.onFocus);
|
|
51
51
|
const error = useErrorProps(props.error, id, props.isInvalid);
|
|
52
52
|
const rootClassName = (0, cx_1.cx)("uxf-input-with-popover", ((_b = props.isFocused) !== null && _b !== void 0 ? _b : input.focused) && classes_1.CLASSES.IS_FOCUSED, props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.isRequired && classes_1.CLASSES.IS_REQUIRED, props.className);
|
|
53
|
-
const floatingPopover = (0,
|
|
53
|
+
const floatingPopover = (0, react_1.useFloating)({
|
|
54
54
|
placement: (_c = props.popoverPlacement) !== null && _c !== void 0 ? _c : "bottom",
|
|
55
55
|
middleware: [
|
|
56
|
-
(0,
|
|
57
|
-
(0,
|
|
58
|
-
(0,
|
|
56
|
+
(0, react_1.flip)(),
|
|
57
|
+
(0, react_1.shift)(),
|
|
58
|
+
(0, react_1.size)({
|
|
59
59
|
apply({ availableHeight, availableWidth, elements }) {
|
|
60
60
|
Object.assign(elements.floating.style, {
|
|
61
61
|
maxHeight: Math.max(50, availableHeight) + "px",
|
|
@@ -65,25 +65,25 @@ exports._InputWithPopover = (0, react_1.forwardRef)((props, ref) => {
|
|
|
65
65
|
}),
|
|
66
66
|
],
|
|
67
67
|
strategy: props.popoverStrategy,
|
|
68
|
-
whileElementsMounted: (reference, floating, update) => (0,
|
|
68
|
+
whileElementsMounted: (reference, floating, update) => (0, react_1.autoUpdate)(reference, floating, update, {
|
|
69
69
|
elementResize: typeof ResizeObserver !== "undefined",
|
|
70
70
|
}),
|
|
71
71
|
});
|
|
72
72
|
const isInteractive = !props.isDisabled && !props.isReadOnly;
|
|
73
73
|
const showRemoveButton = !!(props.value && isInteractive && props.isClearable);
|
|
74
|
-
return (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
props.leftAddon &&
|
|
78
|
-
props.leftElement &&
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
showRemoveButton &&
|
|
82
|
-
|
|
74
|
+
return (react_3.default.createElement(form_component_1.FormComponent, { className: rootClassName, errorId: error.errorId, form: props.form, helperText: props.helperText, hiddenLabel: props.hiddenLabel, inputId: id, isRequired: props.isRequired, label: props.label },
|
|
75
|
+
react_3.default.createElement(react_2.Popover, { as: react_3.Fragment }, (renderProps) => (react_3.default.createElement(react_3.default.Fragment, null,
|
|
76
|
+
react_3.default.createElement(input_1.Input, { inputFocus: input, size: props.size, variant: props.variant, wrapperRef: floatingPopover.refs.setReference },
|
|
77
|
+
props.leftAddon && react_3.default.createElement(input_1.Input.LeftAddon, null, props.leftAddon),
|
|
78
|
+
props.leftElement && react_3.default.createElement(input_1.Input.LeftElement, null, props.leftElement),
|
|
79
|
+
react_3.default.createElement(input_1.Input.Element, { "aria-describedby": error.ariaDescribedby, "aria-errormessage": error.ariaErrormessage, "aria-invalid": error.ariaInvalid, "aria-live": "polite", autoComplete: "off", autoFocus: props.autoFocus, form: props.form, id: id, isDisabled: props.isDisabled, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, name: props.name, onChange: props.onChange, placeholder: props.placeholder, ref: (0, composeRefs_1.composeRefs)(innerRef, ref), type: "text", value: props.value }),
|
|
80
|
+
react_3.default.createElement(input_1.Input.RightElement, null,
|
|
81
|
+
showRemoveButton && react_3.default.createElement(input_1.Input.RemoveButton, { onChange: () => props.onChange("") }),
|
|
82
|
+
react_3.default.createElement(react_2.Popover.Button, { className: "uxf-input-with-popover__trigger-element" }, props.triggerElement),
|
|
83
83
|
props.rightElement),
|
|
84
|
-
props.rightAddon &&
|
|
85
|
-
isInteractive && renderProps.open && (
|
|
86
|
-
|
|
84
|
+
props.rightAddon && react_3.default.createElement(input_1.Input.RightAddon, null, props.rightAddon)),
|
|
85
|
+
isInteractive && renderProps.open && (react_3.default.createElement(react_1.FloatingPortal, null,
|
|
86
|
+
react_3.default.createElement(react_2.Popover.Panel, { className: (0, cx_1.cx)("uxf-input-with-popover__panel", floatingPopover.placement === "bottom" &&
|
|
87
87
|
"uxf-input-with-popover__panel--bottom", floatingPopover.placement === "top" && "uxf-input-with-popover__panel--top"), ref: floatingPopover.refs.setFloating, static: true, style: floatingPopover.floatingStyles }, props.children))))))));
|
|
88
88
|
});
|
|
89
89
|
exports._InputWithPopover.displayName = "UxfUiInputWithPopover";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Placement, Strategy } from "@floating-ui/react";
|
|
2
2
|
import type { Combobox as HUICombobox, Listbox as HUIListbox } from "@headlessui/react";
|
|
3
3
|
import { IconsSet } from "@uxf/ui/icon/theme";
|
|
4
|
+
import { InputGroupSizes, InputGroupVariants } from "@uxf/ui/input/theme";
|
|
4
5
|
import { Clearable, FormControlProps } from "@uxf/ui/types";
|
|
5
6
|
import React, { ReactElement, ReactNode, Ref } from "react";
|
|
6
|
-
import { InputGroupSizes, InputGroupVariants } from "@uxf/ui/input/theme";
|
|
7
7
|
export type SelectBaseValueId = number | string;
|
|
8
8
|
export type SelectBaseValue<ValueId = SelectBaseValueId> = {
|
|
9
9
|
id: ValueId;
|
package/_select-base/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AlertBubble = void 0;
|
|
7
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const icon_1 = require("../icon");
|
|
9
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
10
10
|
const ICON = {
|
|
11
11
|
default: "triangle-exclamation",
|
|
12
12
|
error: "xmark",
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
6
7
|
const snap_test_1 = require("../utils/snap-test");
|
|
7
8
|
const alert_bubble_stories_1 = require("./alert-bubble.stories");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
9
|
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(alert_bubble_stories_1.Default, null));
|
package/alert-bubble/index.d.ts
CHANGED
package/avatar/index.d.ts
CHANGED
|
@@ -27,13 +27,12 @@ exports.AvatarFileInput = void 0;
|
|
|
27
27
|
const classes_1 = require("@uxf/core/constants/classes");
|
|
28
28
|
const useInputFocus_1 = require("@uxf/core/hooks/useInputFocus");
|
|
29
29
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
30
|
-
const
|
|
30
|
+
const file_1 = require("@uxf/core/utils/file");
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
const _file_input_base_1 = require("../_file-input-base");
|
|
33
|
-
const icon_1 = require("../icon");
|
|
34
33
|
const avatar_1 = require("../avatar");
|
|
35
|
-
const
|
|
36
|
-
exports.AvatarFileInput = (0,
|
|
34
|
+
const icon_1 = require("../icon");
|
|
35
|
+
exports.AvatarFileInput = (0, react_1.forwardRef)((props, ref) => {
|
|
37
36
|
var _a, _b;
|
|
38
37
|
const generatedId = (0, react_1.useId)();
|
|
39
38
|
const id = props.id || generatedId;
|
|
@@ -51,3 +50,4 @@ exports.AvatarFileInput = (0, forwardRef_1.forwardRef)("UxfUiAvatarFileInput", (
|
|
|
51
50
|
react_1.default.createElement(_file_input_base_1._FileInputBase, { accept: props.accept, "aria-describedby": errorId, "aria-invalid": props.isInvalid, className: "uxf-avatar-file-input__input", form: props.form, id: id, isDisabled: props.isDisabled, isFocused: props.isFocused, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, name: props.name, onBlur: input.onBlur, onChange: props.onChange, onFocus: input.onFocus, onUploadError: props.onUploadError, onUploadFile: props.onUploadFile, ref: ref, value: props.value }),
|
|
52
51
|
props.helperText && (react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-helper-text", errorId && classes_1.CLASSES.IS_INVALID), id: errorId }, props.helperText))));
|
|
53
52
|
});
|
|
53
|
+
exports.AvatarFileInput.displayName = "UxfUiAvatarFileInput";
|
|
@@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Default = void 0;
|
|
27
|
-
const
|
|
27
|
+
const upload_file_mock_1 = require("@uxf/ui/utils/mocks/upload-file.mock");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
|
-
const index_1 = require("./index");
|
|
30
29
|
const action_1 = require("../utils/action");
|
|
30
|
+
const index_1 = require("./index");
|
|
31
31
|
exports.default = {
|
|
32
32
|
title: "UI/AvatarFileInput",
|
|
33
33
|
component: index_1.AvatarFileInput,
|
|
@@ -46,9 +46,9 @@ function Default() {
|
|
|
46
46
|
console.log("Upload error", err);
|
|
47
47
|
};
|
|
48
48
|
const storyAvatarFileInputs = (react_1.default.createElement("div", { className: "space-y-8" },
|
|
49
|
-
react_1.default.createElement(index_1.AvatarFileInput, { label: "Nahrajte fotku", onChange: onChange, onUploadError: onUploadError, onUploadFile:
|
|
50
|
-
react_1.default.createElement(index_1.AvatarFileInput, { isDisabled: true, onChange: onChange, onUploadError: onUploadError, onUploadFile:
|
|
51
|
-
react_1.default.createElement(index_1.AvatarFileInput, { id: "afi", isInvalid: true, label: "Vyberte Avatar", onChange: onChange, onUploadError: onUploadError, onUploadFile:
|
|
49
|
+
react_1.default.createElement(index_1.AvatarFileInput, { label: "Nahrajte fotku", onChange: onChange, onUploadError: onUploadError, onUploadFile: upload_file_mock_1.uploadFile, value: value, variant: "square" }),
|
|
50
|
+
react_1.default.createElement(index_1.AvatarFileInput, { isDisabled: true, onChange: onChange, onUploadError: onUploadError, onUploadFile: upload_file_mock_1.uploadFile, value: value, variant: "square" }),
|
|
51
|
+
react_1.default.createElement(index_1.AvatarFileInput, { id: "afi", isInvalid: true, label: "Vyberte Avatar", onChange: onChange, onUploadError: onUploadError, onUploadFile: upload_file_mock_1.uploadFile, value: value })));
|
|
52
52
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
53
53
|
react_1.default.createElement("div", { className: "light space-y-2 p-20" }, storyAvatarFileInputs),
|
|
54
54
|
react_1.default.createElement("div", { className: "dark space-y-2 bg-gray-900 p-20" }, storyAvatarFileInputs)));
|
package/badge/badge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from "react";
|
|
2
1
|
import { BadgeSizes } from "@uxf/ui/badge/theme";
|
|
2
|
+
import React, { HTMLAttributes } from "react";
|
|
3
3
|
export type BadgeSize = keyof BadgeSizes;
|
|
4
4
|
export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
size?: BadgeSize;
|
package/badge/badge.stories.js
CHANGED
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Default = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const badge_1 = require("./badge");
|
|
9
8
|
const icon_1 = require("../icon");
|
|
9
|
+
const badge_1 = require("./badge");
|
|
10
10
|
exports.default = {
|
|
11
11
|
title: "UI/Badge",
|
|
12
12
|
component: badge_1.Badge,
|
package/badge/index.d.ts
CHANGED
package/button/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ButtonGroup = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
7
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const ButtonGroup = (props) => {
|
|
10
10
|
return (react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-button-group", props.className), style: props.style }, props.children));
|
|
11
11
|
};
|
|
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Default = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const index_1 = require("./index");
|
|
9
8
|
const button_1 = require("../button");
|
|
10
9
|
const icon_1 = require("../icon");
|
|
11
10
|
const tooltip_1 = require("../tooltip");
|
|
11
|
+
const index_1 = require("./index");
|
|
12
12
|
exports.default = {
|
|
13
13
|
title: "UI/ButtonGroup",
|
|
14
14
|
component: index_1.ButtonGroup,
|
package/button-group/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { Placement, Strategy } from "@floating-ui/react";
|
|
1
2
|
import { FC, ReactNode } from "react";
|
|
2
3
|
import { ButtonProps } from "../button";
|
|
3
4
|
import { IconName } from "../icon/types";
|
|
4
|
-
import { Placement, Strategy } from "@floating-ui/react";
|
|
5
5
|
type SingleButtonProps = Omit<ButtonProps, "children"> & {
|
|
6
6
|
icon?: IconName | null;
|
|
7
7
|
label?: ReactNode;
|
|
@@ -24,24 +24,24 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ButtonList = void 0;
|
|
27
|
-
const react_1 =
|
|
27
|
+
const react_1 = require("@floating-ui/react");
|
|
28
28
|
const react_2 = require("@headlessui/react");
|
|
29
|
-
const button_1 = require("../button");
|
|
30
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
31
|
-
const icon_1 = require("../icon");
|
|
32
29
|
const useAnchorProps_1 = require("@uxf/core/hooks/useAnchorProps");
|
|
30
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
31
|
+
const react_3 = __importStar(require("react"));
|
|
32
|
+
const button_1 = require("../button");
|
|
33
33
|
const use_dropdown_1 = require("../hooks/use-dropdown");
|
|
34
|
-
const
|
|
35
|
-
const MenuButton = (0,
|
|
34
|
+
const icon_1 = require("../icon");
|
|
35
|
+
const MenuButton = (0, react_3.forwardRef)((props, ref) => {
|
|
36
36
|
// eslint-disable-next-line react/destructuring-assignment,@typescript-eslint/no-unused-vars
|
|
37
37
|
const { variant, color, isIconButton, isFullWidth, size, icon, label, className, ...restProps } = props;
|
|
38
38
|
const anchorProps = (0, useAnchorProps_1.useAnchorProps)({
|
|
39
39
|
...restProps,
|
|
40
40
|
className: (0, cx_1.cx)("uxf-button-list__menu-button", className),
|
|
41
41
|
});
|
|
42
|
-
return (
|
|
43
|
-
icon &&
|
|
44
|
-
label &&
|
|
42
|
+
return (react_3.default.createElement("a", { ref: ref, ...anchorProps },
|
|
43
|
+
icon && react_3.default.createElement(icon_1.Icon, { name: icon, className: "uxf-button-list__menu-button-icon" }),
|
|
44
|
+
label && react_3.default.createElement("span", { className: "uxf-button-list__menu-button-label" }, label)));
|
|
45
45
|
});
|
|
46
46
|
MenuButton.displayName = "MenuButton";
|
|
47
47
|
const ButtonList = (props) => {
|
|
@@ -51,25 +51,25 @@ const ButtonList = (props) => {
|
|
|
51
51
|
const openButtonIcon = ((_a = props.openButton) === null || _a === void 0 ? void 0 : _a.icon) === null ? null : (_c = (_b = props.openButton) === null || _b === void 0 ? void 0 : _b.icon) !== null && _c !== void 0 ? _c : "ellipsis-vertical";
|
|
52
52
|
const openButtonLabel = (_e = (_d = props.openButton) === null || _d === void 0 ? void 0 : _d.label) !== null && _e !== void 0 ? _e : null;
|
|
53
53
|
const dropdown = (0, use_dropdown_1.useDropdown)((_f = props.menuPlacement) !== null && _f !== void 0 ? _f : "bottom-start", false, props.menuStrategy);
|
|
54
|
-
return (
|
|
54
|
+
return (react_3.default.createElement("div", { className: (0, cx_1.cx)("uxf-button-list", props.className) },
|
|
55
55
|
buttonsToRender.map((button, index) => {
|
|
56
56
|
var _a, _b, _c;
|
|
57
57
|
const { icon, label, ...restProps } = button;
|
|
58
|
-
return (
|
|
59
|
-
icon &&
|
|
60
|
-
label &&
|
|
58
|
+
return (react_3.default.createElement(button_1.Button, { key: index, ...restProps, color: (_a = restProps.color) !== null && _a !== void 0 ? _a : props.color, size: (_b = restProps.size) !== null && _b !== void 0 ? _b : props.size, variant: (_c = restProps.variant) !== null && _c !== void 0 ? _c : props.variant, className: (0, cx_1.cx)(restProps.className, "uxf-button-list__button") },
|
|
59
|
+
icon && react_3.default.createElement(icon_1.Icon, { name: icon, className: "uxf-button-list__button-icon" }),
|
|
60
|
+
label && react_3.default.createElement("span", { className: "uxf-button-list__button-label" }, label)));
|
|
61
61
|
}),
|
|
62
|
-
restButtons.length > 0 && (
|
|
62
|
+
restButtons.length > 0 && (react_3.default.createElement(react_2.Menu, { as: "div", className: "uxf-button-list__menu" }, ({ open }) => {
|
|
63
63
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
64
|
-
return (
|
|
65
|
-
|
|
66
|
-
openButtonIcon && (
|
|
67
|
-
openButtonLabel && (
|
|
68
|
-
open && (
|
|
69
|
-
|
|
64
|
+
return (react_3.default.createElement(react_3.default.Fragment, null,
|
|
65
|
+
react_3.default.createElement(react_2.Menu.Button, { as: button_1.Button, ...props.openButton, color: (_b = (_a = props.openButton) === null || _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : props.color, size: (_d = (_c = props.openButton) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : props.size, variant: (_f = (_e = props.openButton) === null || _e === void 0 ? void 0 : _e.variant) !== null && _f !== void 0 ? _f : props.variant, className: (0, cx_1.cx)((_g = props.openButton) === null || _g === void 0 ? void 0 : _g.className, "uxf-button-list__open-button"), isIconButton: !!openButtonIcon && !openButtonLabel, ref: dropdown.refs.setReference },
|
|
66
|
+
openButtonIcon && (react_3.default.createElement(icon_1.Icon, { name: openButtonIcon, className: "uxf-button-list__open-button-icon" })),
|
|
67
|
+
openButtonLabel && (react_3.default.createElement("span", { className: "uxf-button-list__open-button-label" }, openButtonLabel))),
|
|
68
|
+
open && (react_3.default.createElement(react_1.FloatingPortal, null,
|
|
69
|
+
react_3.default.createElement(react_2.Menu.Items, { className: "uxf-button-list__menu-items", ref: dropdown.refs.setFloating, style: dropdown.floatingStyles }, restButtons.map((button, index) => {
|
|
70
70
|
var _a, _b, _c;
|
|
71
|
-
return (
|
|
72
|
-
|
|
71
|
+
return (react_3.default.createElement(react_2.Menu.Item, { key: index },
|
|
72
|
+
react_3.default.createElement(MenuButton, { ...button, color: (_a = button.color) !== null && _a !== void 0 ? _a : props.color, size: (_b = button.size) !== null && _b !== void 0 ? _b : props.size, variant: (_c = button.variant) !== null && _c !== void 0 ? _c : props.variant })));
|
|
73
73
|
}))))));
|
|
74
74
|
}))));
|
|
75
75
|
};
|
package/button-list/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CalendarDay } from "@uxf/datepicker/utils/get-days";
|
|
3
1
|
import { UseDatePickerReturnType } from "@uxf/datepicker/hooks/use-date-picker";
|
|
4
2
|
import { UseDateRangePickerReturnType } from "@uxf/datepicker/hooks/use-date-range-picker";
|
|
3
|
+
import { CalendarDay } from "@uxf/datepicker/utils/get-days";
|
|
4
|
+
import React from "react";
|
|
5
5
|
interface CalendarDayProps {
|
|
6
6
|
day: CalendarDay;
|
|
7
7
|
datePickerProps: UseDatePickerReturnType | UseDateRangePickerReturnType;
|
|
@@ -24,12 +24,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.CalendarDayCell = void 0;
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
|
-
const use_day_1 = require("@uxf/datepicker/hooks/use-day");
|
|
29
|
-
const composeRefs_1 = require("@uxf/core/utils/composeRefs");
|
|
30
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
31
27
|
const classes_1 = require("@uxf/core/constants/classes");
|
|
32
28
|
const useOnMount_1 = require("@uxf/core/hooks/useOnMount");
|
|
29
|
+
const composeRefs_1 = require("@uxf/core/utils/composeRefs");
|
|
30
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
31
|
+
const use_day_1 = require("@uxf/datepicker/hooks/use-day");
|
|
32
|
+
const react_1 = __importStar(require("react"));
|
|
33
33
|
exports.CalendarDayCell = (0, react_1.memo)((props) => {
|
|
34
34
|
const dayCellRef = (0, react_1.useRef)(null);
|
|
35
35
|
const innerRef = (0, react_1.useRef)(null);
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CalendarProvider = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
7
|
const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
|
|
9
8
|
const use_date_picker_1 = require("@uxf/datepicker/hooks/use-date-picker");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
10
|
const calendar_1 = require("./calendar");
|
|
11
11
|
const CalendarProvider = (props) => {
|
|
12
12
|
var _a;
|
package/calendar/calendar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { UseDatePickerReturnType } from "@uxf/datepicker/hooks/use-date-picker";
|
|
3
2
|
import { UseDateRangePickerReturnType } from "@uxf/datepicker/hooks/use-date-range-picker";
|
|
3
|
+
import React from "react";
|
|
4
4
|
export interface CalendarProps {
|
|
5
5
|
datePickerProps: UseDatePickerReturnType | UseDateRangePickerReturnType;
|
|
6
6
|
className?: string;
|
package/calendar/calendar.js
CHANGED
|
@@ -28,9 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.Calendar = void 0;
|
|
30
30
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
31
|
-
const react_1 = __importStar(require("react"));
|
|
32
31
|
const use_month_1 = require("@uxf/datepicker/hooks/use-month");
|
|
33
32
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
33
|
+
const react_1 = __importStar(require("react"));
|
|
34
34
|
const calendar_day_cell_1 = require("./calendar-day-cell");
|
|
35
35
|
exports.Calendar = (0, react_1.forwardRef)((props, ref) => {
|
|
36
36
|
var _a, _b;
|
|
@@ -26,8 +26,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Default = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const action_1 = require("../utils/action");
|
|
29
|
-
const calendar_provider_1 = require("./calendar-provider");
|
|
30
29
|
const calendar_1 = require("./calendar");
|
|
30
|
+
const calendar_provider_1 = require("./calendar-provider");
|
|
31
31
|
exports.default = {
|
|
32
32
|
title: "UI/Calendar",
|
|
33
33
|
component: calendar_1.Calendar,
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Default = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
-
const checkbox_1 = require("./checkbox");
|
|
29
28
|
const action_1 = require("../utils/action");
|
|
29
|
+
const checkbox_1 = require("./checkbox");
|
|
30
30
|
exports.default = {
|
|
31
31
|
title: "UI/Checkbox",
|
|
32
32
|
component: checkbox_1.Checkbox,
|
package/checkbox/index.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.CheckboxButton = void 0;
|
|
27
27
|
const react_1 = require("@headlessui/react");
|
|
28
|
-
const react_2 = __importStar(require("react"));
|
|
29
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
30
28
|
const classes_1 = require("@uxf/core/constants/classes");
|
|
29
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
30
|
+
const react_2 = __importStar(require("react"));
|
|
31
31
|
const icon_1 = require("../icon");
|
|
32
32
|
exports.CheckboxButton = (0, react_2.forwardRef)((props, ref) => {
|
|
33
33
|
return (react_2.default.createElement(react_1.Switch, { checked: props.value, className: (0, cx_1.cx)("uxf-checkbox-button", props.className, props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.value && classes_1.CLASSES.IS_SELECTED), disabled: props.isDisabled, id: props.id, name: props.name, onChange: props.onChange, ref: ref, style: props.style },
|
|
@@ -24,9 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Default = void 0;
|
|
27
|
-
const index_1 = require("./index");
|
|
28
27
|
const react_1 = __importStar(require("react"));
|
|
29
28
|
const action_1 = require("../utils/action");
|
|
29
|
+
const index_1 = require("./index");
|
|
30
30
|
exports.default = {
|
|
31
31
|
title: "UI/CheckboxButton",
|
|
32
32
|
component: index_1.CheckboxButton,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from "react";
|
|
2
|
-
import { FormControlProps } from "../types";
|
|
3
2
|
import { CheckboxSize } from "../checkbox";
|
|
3
|
+
import { FormControlProps } from "../types";
|
|
4
4
|
export interface CheckboxInputProps extends FormControlProps<boolean | undefined> {
|
|
5
5
|
className?: string;
|
|
6
6
|
id?: string;
|
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Default = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
|
-
const checkbox_input_1 = require("./checkbox-input");
|
|
29
28
|
const action_1 = require("../utils/action");
|
|
29
|
+
const checkbox_input_1 = require("./checkbox-input");
|
|
30
30
|
exports.default = {
|
|
31
31
|
title: "UI/CheckboxInput",
|
|
32
32
|
component: checkbox_input_1.CheckboxInput,
|
package/chip/chip.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { UseAnchorProps } from "@uxf/core/hooks/useAnchorProps";
|
|
1
2
|
import { ChipColor, ChipSize, ChipVariant } from "@uxf/ui/chip/theme";
|
|
2
3
|
import React, { AnchorHTMLAttributes, MouseEventHandler } from "react";
|
|
3
|
-
import { UseAnchorProps } from "@uxf/core/hooks/useAnchorProps";
|
|
4
4
|
export interface ChipProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color" | "type">, UseAnchorProps {
|
|
5
5
|
color?: ChipColor;
|
|
6
6
|
onClose?: MouseEventHandler;
|
package/chip/chip.js
CHANGED
|
@@ -24,9 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Chip = void 0;
|
|
27
|
+
const useAnchorProps_1 = require("@uxf/core/hooks/useAnchorProps");
|
|
27
28
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
28
29
|
const react_1 = __importStar(require("react"));
|
|
29
|
-
const useAnchorProps_1 = require("@uxf/core/hooks/useAnchorProps");
|
|
30
30
|
const CloseButton = (props) => {
|
|
31
31
|
const onClose = (e) => {
|
|
32
32
|
var _a;
|
package/chip/chip.stories.js
CHANGED
|
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Default = void 0;
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
27
|
const chip_1 = require("@uxf/ui/chip");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
29
|
const storybook_config_1 = require("../utils/storybook-config");
|
|
30
30
|
exports.default = {
|
|
31
31
|
title: "UI/Chip",
|
package/chip/index.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ColorRadio = void 0;
|
|
27
27
|
const classes_1 = require("@uxf/core/constants/classes");
|
|
28
|
+
const useClickableProps_1 = require("@uxf/core/hooks/useClickableProps");
|
|
28
29
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
29
30
|
const react_1 = __importStar(require("react"));
|
|
30
|
-
const useClickableProps_1 = require("@uxf/core/hooks/useClickableProps");
|
|
31
31
|
const icon_1 = require("../icon");
|
|
32
32
|
function readableColorIsBlack(bgColor) {
|
|
33
33
|
const color = bgColor.substring(1, 7);
|
package/color-radio/index.d.ts
CHANGED
|
@@ -25,12 +25,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ColorRadioGroup = void 0;
|
|
27
27
|
const react_1 = require("@headlessui/react");
|
|
28
|
+
const classes_1 = require("@uxf/core/constants/classes");
|
|
29
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
28
30
|
const react_2 = __importStar(require("react"));
|
|
31
|
+
const color_radio_1 = require("../color-radio");
|
|
29
32
|
const use_input_submit_1 = require("../hooks/use-input-submit");
|
|
30
33
|
const label_1 = require("../label");
|
|
31
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
32
|
-
const classes_1 = require("@uxf/core/constants/classes");
|
|
33
|
-
const color_radio_1 = require("../color-radio");
|
|
34
34
|
exports.ColorRadioGroup = (0, react_2.forwardRef)((props, ref) => {
|
|
35
35
|
const innerRef = (0, react_2.useRef)(null);
|
|
36
36
|
(0, use_input_submit_1.useInputSubmit)(innerRef, "radio-group", props.isDisabled);
|