@uxf/ui 11.31.0 → 11.33.0
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/file-input-base.js +4 -3
- package/_input-with-popover/input-with-popover.js +2 -2
- package/alert-bubble/alert-bubble.stories.js +3 -5
- package/avatar/avatar.js +1 -1
- package/avatar/avatar.stories.js +1 -2
- package/avatar-file-input/avatar-file-input.js +3 -2
- package/avatar-file-input/avatar-file-input.stories.js +4 -5
- package/badge/badge.js +1 -1
- package/badge/badge.stories.js +2 -4
- package/button/button.d.ts +1 -3
- package/button/button.js +2 -2
- package/button/button.stories.js +15 -11
- package/button/next-link.d.ts +0 -1
- package/button-group/button-group.stories.d.ts +1 -1
- package/button-group/button-group.stories.js +9 -10
- package/button-list/button-list.d.ts +1 -0
- package/button-list/button-list.js +10 -9
- package/button-list/button-list.stories.d.ts +1 -1
- package/button-list/button-list.stories.js +14 -14
- package/calendar/calendar-day-cell.js +1 -1
- package/calendar/calendar-navigation.js +1 -1
- package/calendar/calendar.js +5 -5
- package/calendar/calendar.stories.js +3 -6
- package/checkbox/checkbox.stories.js +5 -6
- package/checkbox-button/checkbox-button.stories.js +4 -5
- package/checkbox-input/checkbox-input.js +3 -3
- package/checkbox-input/checkbox-input.stories.js +6 -7
- package/chip/chip.js +5 -4
- package/chip/chip.stories.js +2 -3
- package/color-radio/color-radio.js +3 -3
- package/color-radio/color-radio.stories.js +8 -9
- package/color-radio-group/color-radio-group.js +1 -1
- package/color-radio-group/color-radio-group.stories.js +4 -4
- package/color-scheme/get-color-scheme-class-name.js +1 -2
- package/color-scheme/get-color-scheme.js +1 -2
- package/color-scheme/use-color-scheme.js +1 -2
- package/color-scheme/use-handle-color-scheme.js +1 -2
- package/color-scheme/use-toggle-color-scheme.js +1 -2
- package/combobox/combobox.js +7 -7
- package/combobox/combobox.stories.js +8 -9
- package/context/context.d.ts +0 -1
- package/context/use-component-context.d.ts +1 -1
- package/create-component-preview-page/create-component-preview-page.js +3 -3
- package/css/button-list.css +1 -1
- package/css/checkbox-button.css +2 -6
- package/css/checkbox.css +1 -3
- package/css/color-radio-group.css +1 -2
- package/css/colors.css +5 -0
- package/css/dialog.css +1 -0
- package/css/input.css +1 -1
- package/css/list-item.css +1 -3
- package/css/modal-header.css +4 -4
- package/css/pagination.css +1 -2
- package/css/radio-group.css +2 -4
- package/css/radio.css +1 -2
- package/date-picker/date-picker-decade.js +6 -5
- package/date-picker/date-picker-month.js +8 -7
- package/date-picker/date-picker-year.js +7 -6
- package/date-picker/date-picker.stories.js +6 -8
- package/date-picker-input/date-picker-input.js +1 -1
- package/date-picker-input/date-picker-input.stories.js +3 -5
- package/date-range-picker/date-range-picker-decade.js +6 -5
- package/date-range-picker/date-range-picker-month.js +6 -6
- package/date-range-picker/date-range-picker-year.js +8 -7
- package/date-range-picker/date-range-picker.d.ts +1 -1
- package/date-range-picker/date-range-picker.stories.js +4 -6
- package/date-range-picker-input/date-range-picker-input.js +2 -2
- package/date-range-picker-input/date-range-picker-input.stories.js +8 -10
- package/datetime-picker/datetime-picker.js +3 -3
- package/datetime-picker/datetime-picker.stories.js +5 -8
- package/datetime-picker-input/datetime-picker-input.js +1 -2
- package/datetime-picker-input/datetime-picker-input.stories.js +3 -5
- package/datetime-picker-input/get-datetime-string.js +1 -2
- package/dialog/dialog.js +1 -1
- package/dialog/dialog.stories.js +1 -2
- package/dropdown/dropdown.stories.js +4 -6
- package/dropzone/dropzone-list.js +2 -2
- package/dropzone/dropzone.stories.js +10 -11
- package/dropzone/index.d.ts +0 -1
- package/error-message/error-message.js +1 -1
- package/error-message/error-message.stories.js +1 -2
- package/file-input/file-input.js +3 -3
- package/file-input/file-input.stories.js +6 -8
- package/flash-messages/flash-messages-service.d.ts +0 -1
- package/flash-messages/flash-messages-service.js +2 -3
- package/flash-messages/flash-messages.js +4 -4
- package/flash-messages/flash-messages.stories.js +1 -2
- package/form-component/form-component.js +2 -2
- package/form-component/form-component.stories.js +5 -6
- package/hooks/use-async-loading.js +1 -2
- package/hooks/use-dropdown.d.ts +1 -2
- package/hooks/use-dropdown.js +1 -2
- package/hooks/use-input-submit.js +1 -2
- package/icon/icon.js +2 -2
- package/icon/icon.stories.js +10 -11
- package/image-gallery/components/gallery.js +3 -3
- package/image-gallery/context.d.ts +0 -1
- package/image-gallery/image-gallery.js +1 -1
- package/image-gallery/image-gallery.stories.js +3 -4
- package/image-gallery/image.js +1 -1
- package/image-gallery/index.d.ts +0 -1
- package/image-gallery/use-image.js +1 -2
- package/input/index.d.ts +0 -1
- package/input/input-arrow-icon.js +1 -2
- package/input/input-element.js +1 -1
- package/input/input.js +1 -1
- package/input/input.stories.js +13 -14
- package/label/label.stories.js +1 -2
- package/layout/layout.js +6 -6
- package/layout/layout.stories.js +1 -2
- package/layout/uxf-logo.js +3 -3
- package/list-item/list-item.stories.js +3 -4
- package/loader/loader.js +1 -1
- package/loader/loader.stories.js +1 -2
- package/lozenge/lozenge.js +1 -1
- package/lozenge/lozenge.stories.js +1 -2
- package/message/message-content.js +1 -1
- package/message/message-service.d.ts +0 -1
- package/message/message.js +1 -1
- package/message/message.stories.js +1 -2
- package/modal/modal-service.d.ts +0 -1
- package/modal/modal-service.js +3 -4
- package/modal/modal.js +1 -1
- package/modal/modal.stories.js +1 -2
- package/modal-dialog/modal-dialog.js +1 -2
- package/modal-dialog/modal-dialog.stories.js +11 -12
- package/modal-header/modal-header.js +3 -4
- package/modal-header/modal-header.stories.js +6 -6
- package/multi-combobox/multi-combobox.js +9 -8
- package/multi-combobox/multi-combobox.stories.js +8 -9
- package/multi-select/multi-select.js +6 -5
- package/multi-select/multi-select.stories.d.ts +1 -1
- package/multi-select/multi-select.stories.js +9 -10
- package/package.json +9 -9
- package/pagination/pagination.stories.js +6 -7
- package/paper/paper.js +1 -1
- package/paper/paper.stories.js +1 -2
- package/radio/radio.stories.js +9 -10
- package/radio-group/radio-group.js +1 -1
- package/radio-group/radio-group.stories.js +9 -10
- package/raster-image/empty-image.js +1 -2
- package/raster-image/img-sources.js +6 -7
- package/raster-image/raster-image.js +3 -4
- package/raster-image/raster-image.stories.js +2 -3
- package/raster-image/responsive-img-sources.js +1 -2
- package/readmes.d.ts +0 -1
- package/select/select.js +3 -4
- package/select/select.stories.js +15 -16
- package/tabs/components/tabs-button-list.js +3 -3
- package/tabs/components/tabs-button.js +3 -3
- package/tabs/components/tabs-panel.js +1 -2
- package/tabs/components/tabs-panels.js +1 -2
- package/tabs/components/tabs-root.js +1 -2
- package/tabs/panel.js +2 -2
- package/tabs/tabs.js +4 -2
- package/tabs/tabs.stories.js +20 -21
- package/text-input/text-input.stories.js +9 -10
- package/text-link/text-link.stories.js +1 -2
- package/textarea/textarea.js +1 -1
- package/textarea/textarea.stories.js +6 -8
- package/time-picker/time-picker-hours.js +1 -1
- package/time-picker/time-picker-minutes.js +1 -1
- package/time-picker/time-picker.d.ts +1 -1
- package/time-picker/time-picker.js +2 -2
- package/time-picker/time-picker.stories.js +4 -7
- package/time-picker-input/time-picker-input.js +1 -1
- package/time-picker-input/time-picker-input.stories.js +4 -5
- package/toggle/toggle.js +1 -1
- package/toggle/toggle.stories.js +6 -7
- package/tooltip/tooltip.js +2 -2
- package/tooltip/tooltip.stories.js +1 -2
- package/tooltip/use-tooltip.d.ts +7 -7
- package/tooltip/use-tooltip.js +1 -2
- package/types/file-response.d.ts +1 -1
- package/typography/typography.stories.js +1 -2
- package/utils/action.js +1 -2
- package/utils/files/get-file-icon.js +1 -2
- package/utils/files/get-file-url.js +1 -2
- package/utils/get-dropzone-state.js +3 -3
- package/utils/mocks/upload-file.mock.js +1 -2
- package/utils/snap-test.js +4 -4
- package/utils/storybook-config.d.ts +1 -1
- package/utils/storybook-config.js +3 -3
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Default =
|
|
26
|
+
exports.Default = Default;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const action_1 = require("../utils/action");
|
|
29
29
|
const index_1 = require("./index");
|
|
@@ -36,8 +36,7 @@ function Default() {
|
|
|
36
36
|
const onChange = (0, action_1.action)("onChange", () => setChecked((prev) => !prev));
|
|
37
37
|
return (react_1.default.createElement("div", { className: "flex" },
|
|
38
38
|
react_1.default.createElement("div", { className: "flex flex-col gap-4 p-20" },
|
|
39
|
-
react_1.default.createElement(index_1.CheckboxButton, { label: "Opravdu?", onChange: onChange, value: checked
|
|
40
|
-
react_1.default.createElement(index_1.CheckboxButton, { label: "Opravdu?",
|
|
41
|
-
react_1.default.createElement(index_1.CheckboxButton, { label: "Opravdu?",
|
|
39
|
+
react_1.default.createElement(index_1.CheckboxButton, { label: "Opravdu?", name: "checkbox-button", onChange: onChange, value: checked }),
|
|
40
|
+
react_1.default.createElement(index_1.CheckboxButton, { isDisabled: true, label: "Opravdu?", name: "checkbox-button-disabled", onChange: onChange, value: checked }),
|
|
41
|
+
react_1.default.createElement(index_1.CheckboxButton, { isInvalid: true, label: "Opravdu?", name: "checkbox-button-invalid", onChange: onChange, value: checked }))));
|
|
42
42
|
}
|
|
43
|
-
exports.Default = Default;
|
|
@@ -33,10 +33,10 @@ exports.CheckboxInput = (0, react_2.forwardRef)((props, ref) => {
|
|
|
33
33
|
const id = (_a = props.id) !== null && _a !== void 0 ? _a : generatedId;
|
|
34
34
|
const errorId = props.isInvalid ? `${id}--error-message` : undefined;
|
|
35
35
|
return (react_2.default.createElement(react_1.Switch.Group, null,
|
|
36
|
-
react_2.default.createElement("div", { className: `uxf-checkbox-input__wrapper ${(_b = props.className) !== null && _b !== void 0 ? _b : ""}`,
|
|
37
|
-
react_2.default.createElement(react_1.Switch, { as: react_2.Fragment, checked: props.value, name: props.name, onChange: props.onChange }, ({ checked }) => (react_2.default.createElement(checkbox_1.Checkbox, { className: "uxf-checkbox-input", id: props.id, indeterminate: props.indeterminate, isDisabled: props.isDisabled, isFocused: props.isFocused, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, onChange: props.onChange, ref: ref, size: props.size, value: checked
|
|
36
|
+
react_2.default.createElement("div", { className: `uxf-checkbox-input__wrapper ${(_b = props.className) !== null && _b !== void 0 ? _b : ""}`, "data-name": props.name, style: props.style },
|
|
37
|
+
react_2.default.createElement(react_1.Switch, { as: react_2.Fragment, checked: props.value, name: props.name, onChange: props.onChange }, ({ checked }) => (react_2.default.createElement(checkbox_1.Checkbox, { className: "uxf-checkbox-input", id: props.id, indeterminate: props.indeterminate, isDisabled: props.isDisabled, isFocused: props.isFocused, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, name: props.name, onChange: props.onChange, ref: ref, size: props.size, value: checked }))),
|
|
38
38
|
react_2.default.createElement(react_1.Switch.Label, { className: `uxf-checkbox-input__label ${props.hiddenLabel ? "uxf-checkbox-input__label--hidden" : ""}` },
|
|
39
39
|
react_2.default.createElement("span", { className: "uxf-checkbox-input__label--text" }, props.label),
|
|
40
|
-
react_2.default.createElement("span", {
|
|
40
|
+
react_2.default.createElement("span", { className: "uxf-checkbox-input__label--subtitle", id: errorId }, props.helperText)))));
|
|
41
41
|
});
|
|
42
42
|
exports.CheckboxInput.displayName = "UxfUiCheckboxInput";
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Default =
|
|
26
|
+
exports.Default = Default;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const action_1 = require("../utils/action");
|
|
29
29
|
const checkbox_input_1 = require("./checkbox-input");
|
|
@@ -35,12 +35,11 @@ function Default() {
|
|
|
35
35
|
const [checked, setChecked] = (0, react_1.useState)(true);
|
|
36
36
|
const onChange = (0, action_1.action)("onChange", () => setChecked((prev) => !prev));
|
|
37
37
|
const checkboxes = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
|
-
react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: "Opravdu?", onChange: onChange, value: checked
|
|
39
|
-
react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: "Opravdu?",
|
|
40
|
-
react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: "Opravdu?",
|
|
41
|
-
react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: "Opravdu? (size lg)",
|
|
42
|
-
react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: "hidden label",
|
|
38
|
+
react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: "Opravdu?", name: "checkbox-input", onChange: onChange, value: checked }),
|
|
39
|
+
react_1.default.createElement(checkbox_input_1.CheckboxInput, { isDisabled: true, label: "Opravdu?", name: "checkbox-input-disabled", onChange: onChange, value: checked }),
|
|
40
|
+
react_1.default.createElement(checkbox_input_1.CheckboxInput, { isInvalid: true, label: "Opravdu?", name: "checkbox-input-invalid", onChange: onChange, value: checked }),
|
|
41
|
+
react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: "Opravdu? (size lg)", name: "checkbox-input-lg", onChange: onChange, size: "lg", value: checked }),
|
|
42
|
+
react_1.default.createElement(checkbox_input_1.CheckboxInput, { hiddenLabel: true, label: "hidden label", name: "checkbox-input-hidden-label-lg", onChange: onChange, size: "lg", value: checked })));
|
|
43
43
|
return (react_1.default.createElement("div", { className: "flex" },
|
|
44
44
|
react_1.default.createElement("div", { className: "flex flex-col gap-4 p-20" }, checkboxes)));
|
|
45
45
|
}
|
|
46
|
-
exports.Default = Default;
|
package/chip/chip.js
CHANGED
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Chip = void 0;
|
|
27
27
|
const use_anchor_props_1 = require("@uxf/core-react/hooks/use-anchor-props");
|
|
28
28
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
29
|
+
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
|
29
30
|
const react_1 = __importStar(require("react"));
|
|
30
31
|
const CloseButton = (props) => {
|
|
31
32
|
const onClose = (e) => {
|
|
@@ -36,13 +37,13 @@ const CloseButton = (props) => {
|
|
|
36
37
|
};
|
|
37
38
|
return (react_1.default.createElement("button", { className: "uxf-chip__button", onClick: onClose, tabIndex: props.suppressFocus ? -1 : undefined, type: "button" },
|
|
38
39
|
react_1.default.createElement("span", { className: "uxf-chip__button-label" }, "Odebrat polo\u017Eku"),
|
|
39
|
-
react_1.default.createElement("svg", { className: "uxf-chip__button-icon",
|
|
40
|
-
react_1.default.createElement("path", { strokeLinecap: "round", strokeWidth: "1.5"
|
|
40
|
+
react_1.default.createElement("svg", { className: "uxf-chip__button-icon", fill: "none", stroke: "currentColor", viewBox: "0 0 8 8" },
|
|
41
|
+
react_1.default.createElement("path", { d: "M1 1l6 6m0-6L1 7", strokeLinecap: "round", strokeWidth: "1.5" }))));
|
|
41
42
|
};
|
|
42
43
|
exports.Chip = (0, react_1.forwardRef)((props, ref) => {
|
|
43
44
|
var _a, _b, _c;
|
|
44
45
|
const { children, className, onClose, suppressFocus, tabIndex, ...restProps } = props;
|
|
45
|
-
const chipClassName = (0, cx_1.cx)("uxf-chip", `uxf-chip--color-${(_a = props.color) !== null && _a !== void 0 ? _a : "default"}`, `uxf-chip--size-${(_b = props.size) !== null && _b !== void 0 ? _b : "default"}`, `uxf-chip--variant-${(_c = props.variant) !== null && _c !== void 0 ? _c : "default"}`, onClose && "has-button", className);
|
|
46
|
+
const chipClassName = (0, cx_1.cx)("uxf-chip", `uxf-chip--color-${(_a = props.color) !== null && _a !== void 0 ? _a : "default"}`, `uxf-chip--size-${(_b = props.size) !== null && _b !== void 0 ? _b : "default"}`, `uxf-chip--variant-${(_c = props.variant) !== null && _c !== void 0 ? _c : "default"}`, (0, is_not_nil_1.isNotNil)(onClose) && "has-button", className);
|
|
46
47
|
const anchorProps = (0, use_anchor_props_1.useAnchorProps)({
|
|
47
48
|
className: (0, cx_1.cx)(chipClassName),
|
|
48
49
|
tabIndex: suppressFocus ? -1 : tabIndex,
|
|
@@ -50,6 +51,6 @@ exports.Chip = (0, react_1.forwardRef)((props, ref) => {
|
|
|
50
51
|
});
|
|
51
52
|
return (react_1.default.createElement("a", { ref: ref, ...anchorProps },
|
|
52
53
|
typeof children === "string" ? react_1.default.createElement("span", { className: "uxf-chip__text" }, children) : children,
|
|
53
|
-
|
|
54
|
+
(0, is_not_nil_1.isNotNil)(onClose) && react_1.default.createElement(CloseButton, { onClose: onClose })));
|
|
54
55
|
});
|
|
55
56
|
exports.Chip.displayName = "UxfChip";
|
package/chip/chip.stories.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Default =
|
|
26
|
+
exports.Default = Default;
|
|
27
27
|
const chip_1 = require("@uxf/ui/chip");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
const storybook_config_1 = require("../utils/storybook-config");
|
|
@@ -44,7 +44,7 @@ const getChipsForSize = (colors) => {
|
|
|
44
44
|
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" },
|
|
45
45
|
react_1.default.createElement("div", { className: "grid grid-cols-3 gap-4", key: size }, variants.map((variant) => (react_1.default.createElement("div", { className: "flex flex-col gap-2", key: `${size}${variant}` }, colors.map((color) => (react_1.default.createElement("div", { className: "flex flex-col items-start space-y-2", key: `${size}${variant}${color}` },
|
|
46
46
|
react_1.default.createElement(chip_1.Chip, { color: color, size: size, variant: variant }, color),
|
|
47
|
-
react_1.default.createElement(chip_1.Chip, { color: color,
|
|
47
|
+
react_1.default.createElement(chip_1.Chip, { color: color, onClose: () => null, size: size, variant: variant }, color),
|
|
48
48
|
react_1.default.createElement(chip_1.Chip, { color: color, href: "https://uxf.cz", onClose: () => null, size: size, target: "_blank", variant: variant },
|
|
49
49
|
"#",
|
|
50
50
|
color))))))))))));
|
|
@@ -54,4 +54,3 @@ function Default() {
|
|
|
54
54
|
return (react_1.default.createElement("div", { className: "flex lg:flex-row" },
|
|
55
55
|
react_1.default.createElement("div", { className: "space-y-4 rounded p-10" }, getChipsForSize(config.colors))));
|
|
56
56
|
}
|
|
57
|
-
exports.Default = Default;
|
|
@@ -37,10 +37,10 @@ function readableColorIsBlack(bgColor) {
|
|
|
37
37
|
return r * 0.299 + g * 0.587 + b * 0.114 > 146;
|
|
38
38
|
}
|
|
39
39
|
exports.ColorRadio = (0, react_1.forwardRef)((props, ref) => {
|
|
40
|
-
var _a, _b
|
|
40
|
+
var _a, _b;
|
|
41
41
|
const colorRadioStyle = {
|
|
42
42
|
"--bg-color": props.color,
|
|
43
|
-
...
|
|
43
|
+
...props.style,
|
|
44
44
|
};
|
|
45
45
|
const onChange = props.onChange;
|
|
46
46
|
const onClick = onChange ? () => onChange(props.value) : undefined;
|
|
@@ -60,6 +60,6 @@ exports.ColorRadio = (0, react_1.forwardRef)((props, ref) => {
|
|
|
60
60
|
});
|
|
61
61
|
const innerClassName = `uxf-color-radio__inner ${readableColorIsBlack(props.color) ? "uxf-color-radio__inner--dark" : ""}`;
|
|
62
62
|
return (react_1.default.createElement("div", { ...clickableProps, ref: ref },
|
|
63
|
-
react_1.default.createElement("span", { className: "uxf-color-radio__color-label" }, props.colorLabel), (
|
|
63
|
+
react_1.default.createElement("span", { className: "uxf-color-radio__color-label" }, props.colorLabel), (_b = (_a = props.renderContent) === null || _a === void 0 ? void 0 : _a.call(props, innerClassName, props.checked, props.colorLabel, props.value)) !== null && _b !== void 0 ? _b : (react_1.default.createElement(icon_1.Icon, { className: innerClassName, name: "check" }))));
|
|
64
64
|
});
|
|
65
65
|
exports.ColorRadio.displayName = "UxfUiColorRadio";
|
|
@@ -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
|
-
exports.Default =
|
|
6
|
+
exports.Default = Default;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const color_radio_1 = require("./color-radio");
|
|
9
9
|
exports.default = {
|
|
@@ -14,17 +14,16 @@ function Default() {
|
|
|
14
14
|
const radios = (react_1.default.createElement("div", { className: "dark:text-white" },
|
|
15
15
|
react_1.default.createElement("div", { className: "mb-2 mt-4 font-semibold" }, "Default"),
|
|
16
16
|
react_1.default.createElement("div", { className: "flex flex-row gap-4" },
|
|
17
|
-
react_1.default.createElement(color_radio_1.ColorRadio, { checked: false, color: "#ff0000", colorLabel: "Red",
|
|
18
|
-
react_1.default.createElement(color_radio_1.ColorRadio, { checked: true, color: "#cc0000", colorLabel: "Red",
|
|
17
|
+
react_1.default.createElement(color_radio_1.ColorRadio, { checked: false, color: "#ff0000", colorLabel: "Red", name: "value-1", value: 1 }),
|
|
18
|
+
react_1.default.createElement(color_radio_1.ColorRadio, { checked: true, color: "#cc0000", colorLabel: "Red", name: "value-2", value: 2 })),
|
|
19
19
|
react_1.default.createElement("div", { className: "mb-2 mt-4 font-semibold" }, "Invalid"),
|
|
20
20
|
react_1.default.createElement("div", { className: "flex flex-row gap-4" },
|
|
21
|
-
react_1.default.createElement(color_radio_1.ColorRadio, { checked: false, color: "#ff0000", colorLabel: "Red", isInvalid: true,
|
|
22
|
-
react_1.default.createElement(color_radio_1.ColorRadio, { checked: true, color: "#ff0000", colorLabel: "Red", isInvalid: true,
|
|
21
|
+
react_1.default.createElement(color_radio_1.ColorRadio, { checked: false, color: "#ff0000", colorLabel: "Red", isInvalid: true, name: "value-1", value: 1 }),
|
|
22
|
+
react_1.default.createElement(color_radio_1.ColorRadio, { checked: true, color: "#ff0000", colorLabel: "Red", isInvalid: true, name: "value-2", value: 2 })),
|
|
23
23
|
react_1.default.createElement("div", { className: "mb-2 mt-4 font-semibold" }, "Disabled"),
|
|
24
24
|
react_1.default.createElement("div", { className: "flex flex-row gap-4" },
|
|
25
|
-
react_1.default.createElement(color_radio_1.ColorRadio, { checked: false, color: "#ff0000", colorLabel: "Red", isDisabled: true,
|
|
26
|
-
react_1.default.createElement(color_radio_1.ColorRadio, { checked: true, color: "#ff0000", colorLabel: "Red", isDisabled: true,
|
|
25
|
+
react_1.default.createElement(color_radio_1.ColorRadio, { checked: false, color: "#ff0000", colorLabel: "Red", isDisabled: true, name: "value-1", value: 1 }),
|
|
26
|
+
react_1.default.createElement(color_radio_1.ColorRadio, { checked: true, color: "#ff0000", colorLabel: "Red", isDisabled: true, name: "value-2", value: 2 }))));
|
|
27
27
|
return (react_1.default.createElement("div", { className: "flex" },
|
|
28
|
-
react_1.default.createElement("div", { className: "p-20
|
|
28
|
+
react_1.default.createElement("div", { className: "p-20" }, radios)));
|
|
29
29
|
}
|
|
30
|
-
exports.Default = Default;
|
|
@@ -42,7 +42,7 @@ exports.ColorRadioGroup = (0, react_2.forwardRef)((props, ref) => {
|
|
|
42
42
|
react_2.default.createElement("div", { className: "uxf-form-component__input" },
|
|
43
43
|
react_2.default.createElement("div", { className: "uxf-color-radio-group__options-wrapper" }, props.options.map((option) => {
|
|
44
44
|
const optionStyle = { "--option-color": option.value };
|
|
45
|
-
return (react_2.default.createElement(react_1.RadioGroup.Option, { className: (0, cx_1.cx)("uxf-color-radio-group__option", props.isDisabled && classes_1.CLASSES.IS_DISABLED), key: option.value.toString(), value: option.value
|
|
45
|
+
return (react_2.default.createElement(react_1.RadioGroup.Option, { className: (0, cx_1.cx)("uxf-color-radio-group__option", props.isDisabled && classes_1.CLASSES.IS_DISABLED), key: option.value.toString(), style: optionStyle, value: option.value }, (o) => (react_2.default.createElement(color_radio_1.ColorRadio, { checked: o.checked, color: option.value, colorLabel: option.label, isDisabled: props.isDisabled || o.disabled, name: props.name, ref: o.checked ? innerRef : undefined, value: option.value }))));
|
|
46
46
|
})),
|
|
47
47
|
props.helperText && (react_2.default.createElement("div", { className: (0, cx_1.cx)("uxf-helper-text", props.isInvalid && classes_1.CLASSES.IS_INVALID), id: errorId }, props.helperText)))));
|
|
48
48
|
});
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Default =
|
|
26
|
+
exports.Default = Default;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const action_1 = require("../utils/action");
|
|
29
29
|
const index_1 = require("./index");
|
|
@@ -70,10 +70,10 @@ const options = [
|
|
|
70
70
|
},
|
|
71
71
|
];
|
|
72
72
|
function Default() {
|
|
73
|
-
|
|
73
|
+
var _a, _b;
|
|
74
|
+
const [value, setValue] = (0, react_1.useState)((_b = (_a = options.at(0)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : null);
|
|
74
75
|
const onChange = (0, action_1.action)("onChange", setValue);
|
|
75
76
|
return (react_1.default.createElement("div", { className: "flex" },
|
|
76
77
|
react_1.default.createElement("div", { className: "w-1/2 p-20" },
|
|
77
|
-
react_1.default.createElement(index_1.ColorRadioGroup, { id: "radiogroup", label: "Light Color Radio group", onChange: onChange, options: options, value: value
|
|
78
|
+
react_1.default.createElement(index_1.ColorRadioGroup, { id: "radiogroup", label: "Light Color Radio group", name: "color-radio-button", onChange: onChange, options: options, value: value }))));
|
|
78
79
|
}
|
|
79
|
-
exports.Default = Default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getColorSchemeClassName =
|
|
3
|
+
exports.getColorSchemeClassName = getColorSchemeClassName;
|
|
4
4
|
function getColorSchemeClassName(colorScheme) {
|
|
5
5
|
switch (colorScheme) {
|
|
6
6
|
case "dark":
|
|
@@ -11,4 +11,3 @@ function getColorSchemeClassName(colorScheme) {
|
|
|
11
11
|
return "light";
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
exports.getColorSchemeClassName = getColorSchemeClassName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getColorScheme =
|
|
3
|
+
exports.getColorScheme = getColorScheme;
|
|
4
4
|
const isServer_1 = require("@uxf/core/utils/isServer");
|
|
5
5
|
function getColorScheme() {
|
|
6
6
|
if (isServer_1.isServer) {
|
|
@@ -14,4 +14,3 @@ function getColorScheme() {
|
|
|
14
14
|
return "dark";
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
exports.getColorScheme = getColorScheme;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useColorScheme =
|
|
4
|
+
exports.useColorScheme = useColorScheme;
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const get_color_scheme_1 = require("./get-color-scheme");
|
|
7
7
|
function useColorScheme() {
|
|
@@ -13,4 +13,3 @@ function useColorScheme() {
|
|
|
13
13
|
}, []);
|
|
14
14
|
return colorScheme;
|
|
15
15
|
}
|
|
16
|
-
exports.useColorScheme = useColorScheme;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useHandleColorScheme =
|
|
3
|
+
exports.useHandleColorScheme = useHandleColorScheme;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const color_scheme_defaults_1 = require("./color-scheme-defaults");
|
|
6
6
|
function useHandleColorScheme(props) {
|
|
@@ -21,4 +21,3 @@ function useHandleColorScheme(props) {
|
|
|
21
21
|
}
|
|
22
22
|
}, [defaultColorScheme, getUserSettings, respectSystemSetting, respectUserSettings, setUserSettings]);
|
|
23
23
|
}
|
|
24
|
-
exports.useHandleColorScheme = useHandleColorScheme;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useToggleColorScheme =
|
|
3
|
+
exports.useToggleColorScheme = useToggleColorScheme;
|
|
4
4
|
const isServer_1 = require("@uxf/core/utils/isServer");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const context_1 = require("../context");
|
|
@@ -27,4 +27,3 @@ function useToggleColorScheme() {
|
|
|
27
27
|
}
|
|
28
28
|
}, [getUserSettings, respectSystemSetting, respectUserSettings, setUserSettings]);
|
|
29
29
|
}
|
|
30
|
-
exports.useToggleColorScheme = useToggleColorScheme;
|
package/combobox/combobox.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Combobox =
|
|
26
|
+
exports.Combobox = Combobox;
|
|
27
27
|
const react_1 = require("@floating-ui/react");
|
|
28
28
|
const react_2 = require("@headlessui/react");
|
|
29
29
|
const show_1 = require("@uxf/core-react/components/show");
|
|
@@ -31,6 +31,7 @@ const use_input_focus_1 = require("@uxf/core-react/hooks/use-input-focus");
|
|
|
31
31
|
const use_on_unmount_1 = require("@uxf/core-react/hooks/use-on-unmount");
|
|
32
32
|
const compose_refs_1 = require("@uxf/core-react/utils/compose-refs");
|
|
33
33
|
const classes_1 = require("@uxf/core/constants/classes");
|
|
34
|
+
const empty_array_1 = require("@uxf/core/constants/empty-array");
|
|
34
35
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
35
36
|
const is_empty_1 = require("@uxf/core/utils/is-empty");
|
|
36
37
|
const is_not_empty_1 = require("@uxf/core/utils/is-not-empty");
|
|
@@ -60,13 +61,13 @@ function Combobox(props) {
|
|
|
60
61
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
61
62
|
const isAsync = (0, is_not_nil_1.isNotNil)(props.loadOptions);
|
|
62
63
|
const [query, setQuery] = (0, react_3.useState)("");
|
|
63
|
-
const options = (0, use_async_loading_1.useAsyncLoading)(query, (_a = props.options) !== null && _a !== void 0 ? _a :
|
|
64
|
+
const options = (0, use_async_loading_1.useAsyncLoading)(query, (_a = props.options) !== null && _a !== void 0 ? _a : empty_array_1.EMPTY_ARRAY, props.loadOptions);
|
|
64
65
|
const filteredData = (0, is_empty_1.isEmpty)(query) || isAsync ? options : options.filter((item) => (0, slugify_1.slugify)(item.label).includes((0, slugify_1.slugify)(query)));
|
|
65
66
|
const emptyMessage = (0, is_empty_1.isEmpty)(query)
|
|
66
|
-
? (_b = props.noQueryMessage) !== null && _b !== void 0 ? _b : "Pro zobrazení možností začněte psát"
|
|
67
|
+
? ((_b = props.noQueryMessage) !== null && _b !== void 0 ? _b : "Pro zobrazení možností začněte psát")
|
|
67
68
|
: (0, is_empty_1.isEmpty)(options)
|
|
68
|
-
? (_c = props.noOptionsMessage) !== null && _c !== void 0 ? _c : "Nabídka neosahuje žádné položky"
|
|
69
|
-
: (_d = props.notFoundMessage) !== null && _d !== void 0 ? _d : "Nic nenalezeno";
|
|
69
|
+
? ((_c = props.noOptionsMessage) !== null && _c !== void 0 ? _c : "Nabídka neosahuje žádné položky")
|
|
70
|
+
: ((_d = props.notFoundMessage) !== null && _d !== void 0 ? _d : "Nic nenalezeno");
|
|
70
71
|
const clearQuery = () => setQuery("");
|
|
71
72
|
const onChange = (v) => props.onChange(v);
|
|
72
73
|
const onInputChange = (event) => setQuery(event.target.value);
|
|
@@ -84,7 +85,7 @@ function Combobox(props) {
|
|
|
84
85
|
react_3.default.createElement("div", { className: "uxf-form-component__label" },
|
|
85
86
|
react_3.default.createElement(react_2.Combobox.Label, { as: label_1.Label, isHidden: props.hiddenLabel, onClick: isNotInteractive ? undefined : input.focus }, props.label)),
|
|
86
87
|
react_3.default.createElement("div", { className: "uxf-form-component__input" },
|
|
87
|
-
react_3.default.createElement(react_2.Combobox.Button, {
|
|
88
|
+
react_3.default.createElement(react_2.Combobox.Button, { "aria-describedby": errorId, "aria-invalid": props.isInvalid, as: input_1.Input, className: (0, cx_1.cx)("uxf-combobox__button", dropdown.placement === "bottom" && `${classes_1.CLASSES.IS_OPEN}--bottom`, dropdown.placement === "top" && `${classes_1.CLASSES.IS_OPEN}--top`, renderProps.open && classes_1.CLASSES.IS_OPEN), customInputElementDisplayName: react_2.Combobox.Input.displayName, inputFocus: input, inputGroupRef: stableRef, inputWrapperRef: props.inputWrapperRef, isDisabled: props.isDisabled, isFocused: renderProps.open, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, ref: props.inputRef, size: props.size, variant: props.variant },
|
|
88
89
|
props.leftAddon && react_3.default.createElement(input_1.Input.LeftAddon, null, props.leftAddon),
|
|
89
90
|
props.leftElement && react_3.default.createElement(input_1.Input.LeftElement, null, props.leftElement),
|
|
90
91
|
react_3.default.createElement(react_2.Combobox.Input, { autoComplete: "off", className: "uxf-input__element", displayValue: displayValue, onBlur: props.onBlur, onChange: onInputChange, placeholder: props.placeholder, type: "text" }),
|
|
@@ -99,5 +100,4 @@ function Combobox(props) {
|
|
|
99
100
|
react_3.default.createElement(show_1.Show, { when: Boolean(props.helperText) },
|
|
100
101
|
react_3.default.createElement("div", { className: (0, cx_1.cx)("uxf-helper-text", props.isInvalid && classes_1.CLASSES.IS_INVALID), id: errorId }, props.helperText)))))));
|
|
101
102
|
}
|
|
102
|
-
exports.Combobox = Combobox;
|
|
103
103
|
Combobox.displayName = "UxfUiCombobox";
|
|
@@ -26,7 +26,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.Default = Default;
|
|
30
|
+
exports.Async = Async;
|
|
31
|
+
exports.ComponentStructure = ComponentStructure;
|
|
30
32
|
const react_1 = __importStar(require("react"));
|
|
31
33
|
const action_1 = require("../utils/action");
|
|
32
34
|
const component_structure_analyzer_1 = __importDefault(require("../utils/component-structure-analyzer"));
|
|
@@ -52,15 +54,14 @@ function Default() {
|
|
|
52
54
|
react_1.default.createElement(index_1.Combobox, { id: "combobox-1", label: "Combobox", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
53
55
|
react_1.default.createElement(index_1.Combobox, { helperText: "Start typing to see options...", id: "combobox-1", label: "Combobox with helper text", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
54
56
|
react_1.default.createElement(index_1.Combobox, { helperText: "Error message", id: "combobox-1", isInvalid: true, isRequired: true, label: "Combobox invalid", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
55
|
-
react_1.default.createElement(index_1.Combobox, { dropdownPlacement: "top", id: "combobox-1", label: "Combobox with dropdown top", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...",
|
|
56
|
-
react_1.default.createElement(index_1.Combobox, { id: "combobox-render", label: "RenderOption", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...",
|
|
57
|
+
react_1.default.createElement(index_1.Combobox, { dropdownPlacement: "top", id: "combobox-1", isClearable: true, label: "Combobox with dropdown top", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
58
|
+
react_1.default.createElement(index_1.Combobox, { id: "combobox-render", isClearable: true, label: "RenderOption", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", renderOption: (option, isSelected) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
57
59
|
"Option: ",
|
|
58
60
|
option.label,
|
|
59
|
-
isSelected && " (selected)")) })));
|
|
61
|
+
isSelected && " (selected)")), value: value })));
|
|
60
62
|
return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
|
|
61
63
|
react_1.default.createElement("div", { className: "space-y-2 p-20 lg:w-1/2" }, storyComboboxes)));
|
|
62
64
|
}
|
|
63
|
-
exports.Default = Default;
|
|
64
65
|
function Async() {
|
|
65
66
|
const [value, setValue] = (0, react_1.useState)(null);
|
|
66
67
|
const onChange = (0, action_1.action)("onChange", (v) => {
|
|
@@ -70,14 +71,12 @@ function Async() {
|
|
|
70
71
|
});
|
|
71
72
|
const loadOptions = (query) => Promise.resolve(options.filter((option) => !query || option.label.toLowerCase().includes(query.toLowerCase())));
|
|
72
73
|
const storyComboboxes = (react_1.default.createElement("div", { className: "space-y-8" },
|
|
73
|
-
react_1.default.createElement(index_1.Combobox, { id: "combobox-1", label: "Combobox", name: "combobox", onChange: onChange,
|
|
74
|
+
react_1.default.createElement(index_1.Combobox, { id: "combobox-1", label: "Combobox", loadOptions: loadOptions, name: "combobox", onChange: onChange, placeholder: "Vyberte...", value: value })));
|
|
74
75
|
return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
|
|
75
76
|
react_1.default.createElement("div", { className: "space-y-2 p-20 lg:w-1/2" }, storyComboboxes)));
|
|
76
77
|
}
|
|
77
|
-
exports.Async = Async;
|
|
78
78
|
function ComponentStructure() {
|
|
79
79
|
const [value, onChange] = (0, react_1.useState)(null);
|
|
80
80
|
return (react_1.default.createElement(component_structure_analyzer_1.default, null,
|
|
81
|
-
react_1.default.createElement(index_1.Combobox, {
|
|
81
|
+
react_1.default.createElement(index_1.Combobox, { helperText: "Start typing to see options...", id: "combobox-structure", label: "Combobox with helper text", name: "combobox", onChange: onChange, options: options, value: value })));
|
|
82
82
|
}
|
|
83
|
-
exports.ComponentStructure = ComponentStructure;
|
package/context/context.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UiContextType } from "./context";
|
|
2
2
|
export type UiContextComponent = keyof UiContextType;
|
|
3
|
-
export declare const useComponentContext: <T extends
|
|
3
|
+
export declare const useComponentContext: <T extends UiContextComponent>(componentName: T) => UiContextType[T];
|
|
@@ -3,7 +3,8 @@ 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
|
-
exports.createComponentPreviewPage =
|
|
6
|
+
exports.createComponentPreviewPage = createComponentPreviewPage;
|
|
7
|
+
const empty_array_1 = require("@uxf/core/constants/empty-array");
|
|
7
8
|
const is_nil_1 = require("@uxf/core/utils/is-nil");
|
|
8
9
|
const react_1 = __importDefault(require("react"));
|
|
9
10
|
const components_1 = require("../components");
|
|
@@ -32,9 +33,8 @@ function createComponentPreviewPage() {
|
|
|
32
33
|
};
|
|
33
34
|
component.getInitialProps = (ctx) => {
|
|
34
35
|
var _a;
|
|
35
|
-
const [componentName, storyName] = (_a = ctx.query.slug) !== null && _a !== void 0 ? _a :
|
|
36
|
+
const [componentName, storyName] = (_a = ctx.query.slug) !== null && _a !== void 0 ? _a : empty_array_1.EMPTY_ARRAY;
|
|
36
37
|
return { componentName, storyName };
|
|
37
38
|
};
|
|
38
39
|
return component;
|
|
39
40
|
}
|
|
40
|
-
exports.createComponentPreviewPage = createComponentPreviewPage;
|
package/css/button-list.css
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
&__menu-button {
|
|
27
|
-
@apply is-hoverable:
|
|
27
|
+
@apply is-hoverable:cursor-pointer flex space-x-3 px-3 py-2 text-sm text-black hover:text-gray-800;
|
|
28
28
|
|
|
29
29
|
:root .dark & {
|
|
30
30
|
@apply text-white hover:text-gray-200;
|
package/css/checkbox-button.css
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
.uxf-checkbox-button {
|
|
2
|
-
@apply focus-visible:ring-primary relative inline-flex shrink-0 items-center justify-between space-x-4 rounded-lg bg-gray-200 px-4
|
|
3
|
-
py-3 outline-none transition before:absolute before:inset-0 before:rounded-lg
|
|
4
|
-
before:border before:border-transparent before:transition
|
|
5
|
-
focus-visible:ring-2 focus-visible:ring-offset-2;
|
|
2
|
+
@apply focus-visible:ring-primary relative inline-flex shrink-0 items-center justify-between space-x-4 rounded-lg bg-gray-200 px-4 py-3 outline-none transition before:absolute before:inset-0 before:rounded-lg before:border before:border-transparent before:transition focus-visible:ring-2 focus-visible:ring-offset-2;
|
|
6
3
|
|
|
7
4
|
&__icon {
|
|
8
|
-
@apply relative h-5 w-5 rounded bg-white p-1 text-transparent before:absolute before:inset-0 before:rounded
|
|
9
|
-
before:border before:transition;
|
|
5
|
+
@apply relative h-5 w-5 rounded bg-white p-1 text-transparent before:absolute before:inset-0 before:rounded before:border before:transition;
|
|
10
6
|
}
|
|
11
7
|
|
|
12
8
|
@apply focus-visible:ring-primary bg-gray-200;
|
package/css/checkbox.css
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
.uxf-checkbox {
|
|
2
|
-
@apply focus-visible:before:border-primary relative flex shrink-0 items-center justify-center rounded border border-gray-400
|
|
3
|
-
bg-white outline-none transition focus-visible:before:absolute
|
|
4
|
-
focus-visible:before:inset-[-5px] focus-visible:before:rounded-lg focus-visible:before:border-2;
|
|
2
|
+
@apply focus-visible:before:border-primary relative flex shrink-0 items-center justify-center rounded border border-gray-400 bg-white outline-none transition focus-visible:before:absolute focus-visible:before:inset-[-5px] focus-visible:before:rounded-lg focus-visible:before:border-2;
|
|
5
3
|
|
|
6
4
|
:root .dark & {
|
|
7
5
|
@apply focus-visible:before:border-primary border-gray-400 bg-gray-900;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.uxf-color-radio-group {
|
|
2
2
|
&__option {
|
|
3
|
-
@apply is-disabled:pointer-events-none rounded-full outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--option-color)]
|
|
4
|
-
focus-visible:ring-offset-2 focus-visible:ring-offset-white;
|
|
3
|
+
@apply is-disabled:pointer-events-none rounded-full outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--option-color)] focus-visible:ring-offset-2 focus-visible:ring-offset-white;
|
|
5
4
|
|
|
6
5
|
:root .dark & {
|
|
7
6
|
@apply focus-visible:ring-[color:var(--option-color)] focus-visible:ring-offset-gray-900;
|
package/css/colors.css
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
--uxf-color-base-border-border: #e5e7eb;
|
|
6
6
|
--uxf-color-base-surface-main: #fff;
|
|
7
7
|
--uxf-color-base-surface-main-hover: #f3f4f6;
|
|
8
|
+
--uxf-color-base-surface-background: #f9fafb;
|
|
8
9
|
--uxf-color-base-surface-input-disabled: #f3f4f6;
|
|
9
10
|
--uxf-color-base-surface-disabled: #d2d6db;
|
|
10
11
|
--uxf-color-base-surface-inverted-main: #ffffff14;
|
|
@@ -50,8 +51,10 @@
|
|
|
50
51
|
/** base */
|
|
51
52
|
--uxf-color-base-border-inverted: #3842501f;
|
|
52
53
|
--uxf-color-base-border-input: #384250;
|
|
54
|
+
--uxf-color-base-border-border: #e5e7eb1f;
|
|
53
55
|
--uxf-color-base-surface-main: #111927;
|
|
54
56
|
--uxf-color-base-surface-main-hover: #1f2a37;
|
|
57
|
+
--uxf-color-base-surface-background: #1f2a37;
|
|
55
58
|
--uxf-color-base-surface-input-disabled: #4d5761;
|
|
56
59
|
--uxf-color-base-surface-disabled: #d2d6db;
|
|
57
60
|
--uxf-color-base-surface-inverted-main: #20293914;
|
|
@@ -84,6 +87,8 @@
|
|
|
84
87
|
--uxf-color-warning-border: #dc6803;
|
|
85
88
|
--uxf-color-warning-surface-default: #fdb022;
|
|
86
89
|
--uxf-color-warning-surface-default-hover: #fec84b;
|
|
90
|
+
--uxf-color-warning-surface-muted: #93370c;
|
|
91
|
+
--uxf-color-warning-icon-on-muted: #fec84b;
|
|
87
92
|
|
|
88
93
|
/** info */
|
|
89
94
|
--uxf-color-info-text: #b3b8db;
|
package/css/dialog.css
CHANGED
package/css/input.css
CHANGED
package/css/list-item.css
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
.uxf-list-item {
|
|
2
|
-
@apply is-hoverable:opacity-75 focus-visible:before:border-primary relative flex min-h-[64px] grow justify-between space-x-3 px-5
|
|
3
|
-
py-4 outline-none transition-opacity before:absolute before:inset-0 before:rounded-lg
|
|
4
|
-
focus-visible:before:border-2;
|
|
2
|
+
@apply is-hoverable:opacity-75 focus-visible:before:border-primary relative flex min-h-[64px] grow justify-between space-x-3 px-5 py-4 outline-none transition-opacity before:absolute before:inset-0 before:rounded-lg focus-visible:before:border-2;
|
|
5
3
|
|
|
6
4
|
:root .dark & {
|
|
7
5
|
@apply focus-visible:before:border-primary;
|
package/css/modal-header.css
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
/** modal header variables */
|
|
3
|
-
--uxf-modal-header-background-color: var(--uxf-color-base-surface-main);
|
|
4
|
-
--uxf-modal-header-border-color: var(--uxf-color-base-border-border);
|
|
5
3
|
--uxf-modal-header-border-width: theme("borderWidth.DEFAULT");
|
|
6
4
|
--uxf-modal-header-description-font-size: theme("fontSize.caption");
|
|
7
5
|
--uxf-modal-header-description-font-weight: theme("fontWeight.normal");
|
|
8
|
-
--uxf-modal-header-description-text-color: var(--uxf-color-base-text-low-emphasis);
|
|
9
6
|
--uxf-modal-header-title-font-size: 18px;
|
|
10
7
|
--uxf-modal-header-title-font-weight: theme("fontWeight.semibold");
|
|
11
8
|
--uxf-modal-header-title-line-height: 1.3333;
|
|
12
|
-
--uxf-modal-header-title-text-color: var(--uxf-color-base-text-high-emphasis);
|
|
13
9
|
}
|
|
14
10
|
|
|
15
11
|
.uxf-modal-header {
|
|
12
|
+
--uxf-modal-header-background-color: var(--uxf-color-base-surface-main);
|
|
13
|
+
--uxf-modal-header-border-color: var(--uxf-color-base-border-border);
|
|
14
|
+
--uxf-modal-header-description-text-color: var(--uxf-color-base-text-low-emphasis);
|
|
15
|
+
--uxf-modal-header-title-text-color: var(--uxf-color-base-text-high-emphasis);
|
|
16
16
|
--uxf-icon-color: var(--uxf-modal-header-title-text-color);
|
|
17
17
|
|
|
18
18
|
background-color: var(--uxf-modal-header-background-color);
|
package/css/pagination.css
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
@apply isolate inline-flex -space-x-px rounded-md;
|
|
3
3
|
|
|
4
4
|
&__button {
|
|
5
|
-
@apply relative inline-flex cursor-pointer items-center border border-gray-300 bg-white text-sm
|
|
6
|
-
font-medium text-gray-500 hover:bg-gray-50 focus:z-10;
|
|
5
|
+
@apply relative inline-flex cursor-pointer items-center border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-10;
|
|
7
6
|
|
|
8
7
|
:root .dark & {
|
|
9
8
|
@apply border-gray-600 bg-gray-900 text-gray-200 hover:bg-gray-800;
|
package/css/radio-group.css
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.uxf-radio-group {
|
|
2
2
|
&__option {
|
|
3
|
-
@apply focus-visible:ring-primary outline-none focus-visible:rounded-lg focus-visible:ring-2
|
|
4
|
-
focus-visible:ring-offset-2 focus-visible:ring-offset-white;
|
|
3
|
+
@apply focus-visible:ring-primary outline-none focus-visible:rounded-lg focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white;
|
|
5
4
|
|
|
6
5
|
:root .dark & {
|
|
7
6
|
@apply focus-visible:ring-primary focus-visible:ring-offset-gray-900;
|
|
@@ -78,8 +77,7 @@
|
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
.uxf-radio-group__option-wrapper {
|
|
81
|
-
@apply relative min-w-[112px] flex-col-reverse p-3
|
|
82
|
-
before:pointer-events-none before:absolute before:inset-0 before:rounded-lg before:border before:border-gray-400;
|
|
80
|
+
@apply relative min-w-[112px] flex-col-reverse p-3 before:pointer-events-none before:absolute before:inset-0 before:rounded-lg before:border before:border-gray-400;
|
|
83
81
|
|
|
84
82
|
:root .dark & {
|
|
85
83
|
@apply border-gray-400;
|
package/css/radio.css
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.uxf-radio {
|
|
2
|
-
@apply focus-visible:ring-primary flex shrink-0 items-center justify-center rounded-full border border-gray-400
|
|
3
|
-
transition focus-visible:ring-2;
|
|
2
|
+
@apply focus-visible:ring-primary flex shrink-0 items-center justify-center rounded-full border border-gray-400 transition focus-visible:ring-2;
|
|
4
3
|
|
|
5
4
|
:root .dark & {
|
|
6
5
|
@apply focus-visible:ring-primary border-gray-400 focus-visible:ring-offset-gray-900;
|