@uxf/ui 11.45.1 → 11.47.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/alert-bubble/alert-bubble.stories.d.ts +0 -5
- package/alert-bubble/alert-bubble.stories.js +0 -4
- package/badge/badge.stories.d.ts +0 -5
- package/badge/badge.stories.js +0 -4
- package/button-group/button-group.stories.d.ts +0 -5
- package/button-group/button-group.stories.js +0 -4
- package/button-list/button-list.stories.d.ts +0 -5
- package/button-list/button-list.stories.js +0 -4
- package/calendar/calendar.stories.d.ts +0 -8
- package/calendar/calendar.stories.js +0 -10
- package/checkbox/checkbox.stories.d.ts +0 -5
- package/checkbox/checkbox.stories.js +0 -4
- package/checkbox-button/checkbox-button.stories.d.ts +0 -5
- package/checkbox-button/checkbox-button.stories.js +0 -4
- package/checkbox-input/checkbox-input.stories.d.ts +0 -5
- package/checkbox-input/checkbox-input.stories.js +0 -4
- package/chip/chip.stories.d.ts +0 -8
- package/chip/chip.stories.js +0 -9
- package/color-radio/color-radio.stories.d.ts +0 -5
- package/color-radio/color-radio.stories.js +0 -4
- package/color-radio-group/color-radio-group.stories.d.ts +0 -5
- package/color-radio-group/color-radio-group.stories.js +0 -4
- package/components.d.ts +5 -0
- package/components.js +5 -0
- package/create-component-preview-page/create-component-preview-page.d.ts +9 -4
- package/create-component-preview-page/create-component-preview-page.js +22 -19
- package/css/info-box.css +74 -0
- package/css/input.css +14 -0
- package/css/layout.css +66 -20
- package/date-picker/date-picker.stories.d.ts +0 -5
- package/date-picker/date-picker.stories.js +0 -4
- package/date-picker-input/date-picker-input.stories.d.ts +0 -5
- package/date-picker-input/date-picker-input.stories.js +0 -4
- package/date-range-picker/date-range-picker.stories.d.ts +0 -5
- package/date-range-picker/date-range-picker.stories.js +0 -4
- package/date-range-picker-input/date-range-picker-input.stories.d.ts +0 -8
- package/date-range-picker-input/date-range-picker-input.stories.js +0 -9
- package/datetime-picker/datetime-picker.stories.d.ts +0 -5
- package/datetime-picker/datetime-picker.stories.js +0 -4
- package/datetime-picker-input/datetime-picker-input.stories.d.ts +0 -5
- package/datetime-picker-input/datetime-picker-input.stories.js +0 -4
- package/dialog/dialog.d.ts +23 -6
- package/dialog/dialog.js +44 -7
- package/dialog/dialog.stories.js +10 -31
- package/dialog/theme.d.ts +8 -0
- package/dropdown/dropdown.stories.d.ts +0 -8
- package/dropdown/dropdown.stories.js +0 -4
- package/dropzone/dropzone.stories.d.ts +0 -7
- package/dropzone/dropzone.stories.js +0 -4
- package/error-message/error-message.stories.d.ts +0 -5
- package/error-message/error-message.stories.js +0 -4
- package/file-input/file-input.stories.d.ts +0 -5
- package/file-input/file-input.stories.js +0 -4
- package/flash-messages/flash-messages.stories.d.ts +0 -5
- package/flash-messages/flash-messages.stories.js +0 -5
- package/form-component/form-component.stories.d.ts +0 -10
- package/form-component/form-component.stories.js +0 -5
- package/icon/icon.stories.d.ts +0 -8
- package/icon/icon.stories.js +0 -9
- package/icons-config.js +20 -0
- package/image-gallery/image-gallery.stories.d.ts +0 -12
- package/image-gallery/image-gallery.stories.js +0 -5
- package/info-box/README.md +28 -0
- package/info-box/index.d.ts +2 -0
- package/info-box/index.js +5 -0
- package/info-box/info-box.d.ts +15 -0
- package/info-box/info-box.js +59 -0
- package/info-box/info-box.spec.d.ts +1 -0
- package/info-box/info-box.spec.js +9 -0
- package/info-box/info-box.stories.d.ts +2 -0
- package/info-box/info-box.stories.js +19 -0
- package/info-box/theme.d.ts +15 -0
- package/info-box/theme.js +2 -0
- package/info-box/types.d.ts +3 -0
- package/info-box/types.js +2 -0
- package/input/input.stories.d.ts +0 -13
- package/input/input.stories.js +0 -4
- package/label/label.stories.d.ts +0 -5
- package/label/label.stories.js +0 -4
- package/layout/layout.d.ts +7 -5
- package/layout/layout.js +17 -35
- package/layout/layout.stories.d.ts +0 -6
- package/layout/layout.stories.js +3 -8
- package/list-item/list-item.stories.d.ts +0 -5
- package/list-item/list-item.stories.js +0 -4
- package/loader/loader.stories.d.ts +0 -5
- package/loader/loader.stories.js +0 -4
- package/message/message.js +10 -7
- package/modal/modal.d.ts +1 -1
- package/modal/modal.js +18 -13
- package/modal/modal.stories.d.ts +0 -5
- package/modal/modal.stories.js +2 -6
- package/multi-combobox/multi-combobox.stories.d.ts +0 -6
- package/multi-combobox/multi-combobox.stories.js +0 -4
- package/multi-select/multi-select.stories.d.ts +0 -6
- package/multi-select/multi-select.stories.js +0 -4
- package/package.json +4 -4
- package/pagination/pagination.stories.d.ts +0 -5
- package/pagination/pagination.stories.js +0 -4
- package/paper/paper.stories.d.ts +0 -5
- package/paper/paper.stories.js +0 -4
- package/radio/radio.stories.d.ts +0 -5
- package/radio/radio.stories.js +0 -4
- package/radio-group/radio-group.stories.d.ts +0 -5
- package/radio-group/radio-group.stories.js +0 -4
- package/raster-image/raster-image.stories.d.ts +0 -6
- package/raster-image/raster-image.stories.js +0 -4
- package/readmes.d.ts +1 -0
- package/readmes.js +56 -54
- package/tabs/components/tabs-button.d.ts +1 -1
- package/tabs/components/tabs-root.d.ts +1 -1
- package/tabs/index.d.ts +1 -0
- package/tabs/index.js +1 -0
- package/tabs/tabs.d.ts +1 -1
- package/tabs/theme.d.ts +0 -1
- package/tabs/types.d.ts +2 -0
- package/tabs/types.js +2 -0
- package/text-link/text-link.stories.d.ts +0 -5
- package/text-link/text-link.stories.js +0 -4
- package/textarea/textarea.stories.d.ts +0 -5
- package/textarea/textarea.stories.js +0 -4
- package/time-picker/time-picker.stories.d.ts +0 -5
- package/time-picker/time-picker.stories.js +0 -4
- package/toggle/toggle.stories.d.ts +0 -5
- package/toggle/toggle.stories.js +0 -4
- package/tooltip/tooltip.stories.d.ts +0 -5
- package/tooltip/tooltip.stories.js +0 -4
- package/typography/typography.stories.d.ts +0 -5
- package/typography/typography.stories.js +0 -4
- package/utils/files/get-file-icon.test.d.ts +1 -0
- package/utils/files/get-file-icon.test.js +22 -0
- package/utils/files/get-file-url.test.d.ts +1 -0
- package/utils/files/get-file-url.test.js +44 -0
- package/utils/get-dropzone-state.test.d.ts +1 -0
- package/utils/get-dropzone-state.test.js +88 -0
- package/utils/mocks/upload-file.mock.test.d.ts +1 -0
- package/utils/mocks/upload-file.mock.test.js +34 -0
|
@@ -27,10 +27,6 @@ exports.Default = Default;
|
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const storybook_config_1 = require("../utils/storybook-config");
|
|
29
29
|
const alert_bubble_1 = require("./alert-bubble");
|
|
30
|
-
exports.default = {
|
|
31
|
-
title: "UI/AlertBubble",
|
|
32
|
-
component: alert_bubble_1.AlertBubble,
|
|
33
|
-
};
|
|
34
30
|
function Default() {
|
|
35
31
|
const config = (0, storybook_config_1.useStorybookConfig)("AlertBubble");
|
|
36
32
|
const storyAlertBubbles = config.colors.map((color) => (react_1.default.createElement(react_1.Fragment, { key: color }, config.sizes.map((size) => (react_1.default.createElement("div", { className: "space-y-2 pb-4", key: `${size}${color}` },
|
package/badge/badge.stories.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./badge").BadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
2
|
export declare function Default(): React.JSX.Element;
|
package/badge/badge.stories.js
CHANGED
|
@@ -7,10 +7,6 @@ exports.Default = Default;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const icon_1 = require("../icon");
|
|
9
9
|
const badge_1 = require("./badge");
|
|
10
|
-
exports.default = {
|
|
11
|
-
title: "UI/Badge",
|
|
12
|
-
component: badge_1.Badge,
|
|
13
|
-
};
|
|
14
10
|
function Default() {
|
|
15
11
|
const testBadges = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
12
|
react_1.default.createElement(badge_1.Badge, { size: "small" }, "5"),
|
|
@@ -9,10 +9,6 @@ const button_1 = require("../button");
|
|
|
9
9
|
const icon_1 = require("../icon");
|
|
10
10
|
const tooltip_1 = require("../tooltip");
|
|
11
11
|
const index_1 = require("./index");
|
|
12
|
-
exports.default = {
|
|
13
|
-
title: "UI/ButtonGroup",
|
|
14
|
-
component: index_1.ButtonGroup,
|
|
15
|
-
};
|
|
16
12
|
function Default() {
|
|
17
13
|
// eslint-disable-next-line no-console
|
|
18
14
|
const onClick = console.log;
|
|
@@ -7,10 +7,6 @@ exports.Default = Default;
|
|
|
7
7
|
const empty_object_1 = require("@uxf/core/constants/empty-object");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const index_1 = require("./index");
|
|
10
|
-
exports.default = {
|
|
11
|
-
title: "UI/ButtonList",
|
|
12
|
-
component: index_1.ButtonList,
|
|
13
|
-
};
|
|
14
10
|
function Default() {
|
|
15
11
|
const component = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
16
12
|
react_1.default.createElement(index_1.ButtonList, { buttons: [
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./calendar").CalendarProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
parameters: {
|
|
6
|
-
docs: {};
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
2
|
export declare function Default(): React.JSX.Element;
|
|
@@ -26,17 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Default = Default;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const action_1 = require("../utils/action");
|
|
29
|
-
const calendar_1 = require("./calendar");
|
|
30
29
|
const calendar_provider_1 = require("./calendar-provider");
|
|
31
|
-
exports.default = {
|
|
32
|
-
title: "UI/Calendar",
|
|
33
|
-
component: calendar_1.Calendar,
|
|
34
|
-
parameters: {
|
|
35
|
-
docs: {
|
|
36
|
-
// page: Docs,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
30
|
function Default() {
|
|
41
31
|
const [date, setDate] = (0, react_1.useState)(null);
|
|
42
32
|
const onChange = (0, action_1.action)("onChange", setDate);
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./checkbox").CheckboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
2
|
export declare function Default(): React.JSX.Element;
|
|
@@ -27,10 +27,6 @@ exports.Default = Default;
|
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const action_1 = require("../utils/action");
|
|
29
29
|
const checkbox_1 = require("./checkbox");
|
|
30
|
-
exports.default = {
|
|
31
|
-
title: "UI/Checkbox",
|
|
32
|
-
component: checkbox_1.Checkbox,
|
|
33
|
-
};
|
|
34
30
|
function Default() {
|
|
35
31
|
const [checked, setChecked] = (0, react_1.useState)(true);
|
|
36
32
|
const onChange = (0, action_1.action)("onChange", () => setChecked((prev) => !prev));
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./checkbox-button").CheckboxButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
2
|
export declare function Default(): React.JSX.Element;
|
|
@@ -27,10 +27,6 @@ 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");
|
|
30
|
-
exports.default = {
|
|
31
|
-
title: "UI/CheckboxButton",
|
|
32
|
-
component: index_1.CheckboxButton,
|
|
33
|
-
};
|
|
34
30
|
function Default() {
|
|
35
31
|
const [checked, setChecked] = (0, react_1.useState)(true);
|
|
36
32
|
const onChange = (0, action_1.action)("onChange", () => setChecked((prev) => !prev));
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./checkbox-input").CheckboxInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
2
|
export declare function Default(): React.JSX.Element;
|
|
@@ -27,10 +27,6 @@ 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");
|
|
30
|
-
exports.default = {
|
|
31
|
-
title: "UI/CheckboxInput",
|
|
32
|
-
component: checkbox_input_1.CheckboxInput,
|
|
33
|
-
};
|
|
34
30
|
function Default() {
|
|
35
31
|
const [checked, setChecked] = (0, react_1.useState)(true);
|
|
36
32
|
const onChange = (0, action_1.action)("onChange", () => setChecked((prev) => !prev));
|
package/chip/chip.stories.d.ts
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("@uxf/ui/chip").ChipProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
5
|
-
parameters: {
|
|
6
|
-
docs: {};
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
2
|
export declare function Default(): React.JSX.Element;
|
package/chip/chip.stories.js
CHANGED
|
@@ -27,15 +27,6 @@ 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");
|
|
30
|
-
exports.default = {
|
|
31
|
-
title: "UI/Chip",
|
|
32
|
-
component: chip_1.Chip,
|
|
33
|
-
parameters: {
|
|
34
|
-
docs: {
|
|
35
|
-
// page: Docs,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
30
|
const getChipsForSize = (colors) => {
|
|
40
31
|
const sizes = ["small", "default", "large"];
|
|
41
32
|
const variants = ["low", "medium", "default"];
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./color-radio").ColorRadioProps<string | number> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
2
|
export declare function Default(): React.JSX.Element;
|
|
@@ -6,10 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Default = Default;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const color_radio_1 = require("./color-radio");
|
|
9
|
-
exports.default = {
|
|
10
|
-
title: "UI/ColorRadio",
|
|
11
|
-
component: color_radio_1.ColorRadio,
|
|
12
|
-
};
|
|
13
9
|
function Default() {
|
|
14
10
|
const radios = (react_1.default.createElement("div", { className: "dark:text-white" },
|
|
15
11
|
react_1.default.createElement("div", { className: "mb-2 mt-4 font-semibold" }, "Default"),
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./color-radio-group").ColorRadioGroupProps & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
2
|
export declare function Default(): React.JSX.Element;
|
|
@@ -27,10 +27,6 @@ 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");
|
|
30
|
-
exports.default = {
|
|
31
|
-
title: "UI/ColorRadioGroup",
|
|
32
|
-
component: index_1.ColorRadioGroup,
|
|
33
|
-
};
|
|
34
30
|
const options = [
|
|
35
31
|
{
|
|
36
32
|
value: "#ff0000",
|
package/components.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import * as formComponentStories from "./form-component/form-component.stories";
|
|
|
29
29
|
import * as iconStories from "./icon/icon.stories";
|
|
30
30
|
import * as iconButtonStories from "./icon-button/icon-button.stories";
|
|
31
31
|
import * as imageGalleryStories from "./image-gallery/image-gallery.stories";
|
|
32
|
+
import * as infoboxStories from "./info-box/info-box.stories";
|
|
32
33
|
import * as inputStories from "./input/input.stories";
|
|
33
34
|
import * as labelStories from "./label/label.stories";
|
|
34
35
|
import * as layoutStories from "./layout/layout.stories";
|
|
@@ -181,6 +182,10 @@ export declare const components: {
|
|
|
181
182
|
readonly title: "ImageGallery";
|
|
182
183
|
readonly stories: typeof imageGalleryStories;
|
|
183
184
|
};
|
|
185
|
+
readonly infobox: {
|
|
186
|
+
readonly title: "Infobox";
|
|
187
|
+
readonly stories: typeof infoboxStories;
|
|
188
|
+
};
|
|
184
189
|
readonly input: {
|
|
185
190
|
readonly title: "Input";
|
|
186
191
|
readonly stories: typeof inputStories;
|
package/components.js
CHANGED
|
@@ -56,6 +56,7 @@ const formComponentStories = __importStar(require("./form-component/form-compone
|
|
|
56
56
|
const iconStories = __importStar(require("./icon/icon.stories"));
|
|
57
57
|
const iconButtonStories = __importStar(require("./icon-button/icon-button.stories"));
|
|
58
58
|
const imageGalleryStories = __importStar(require("./image-gallery/image-gallery.stories"));
|
|
59
|
+
const infoboxStories = __importStar(require("./info-box/info-box.stories"));
|
|
59
60
|
const inputStories = __importStar(require("./input/input.stories"));
|
|
60
61
|
const labelStories = __importStar(require("./label/label.stories"));
|
|
61
62
|
const layoutStories = __importStar(require("./layout/layout.stories"));
|
|
@@ -208,6 +209,10 @@ exports.components = {
|
|
|
208
209
|
title: "ImageGallery",
|
|
209
210
|
stories: imageGalleryStories
|
|
210
211
|
},
|
|
212
|
+
"infobox": {
|
|
213
|
+
title: "Infobox",
|
|
214
|
+
stories: infoboxStories
|
|
215
|
+
},
|
|
211
216
|
"input": {
|
|
212
217
|
title: "Input",
|
|
213
218
|
stories: inputStories
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { components } from "../components";
|
|
3
|
+
type Components = typeof components;
|
|
4
|
+
interface CreateComponentPreviewPageProps {
|
|
5
|
+
componentName: keyof Components | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function CreateComponentPreviewPage(props: CreateComponentPreviewPageProps): React.JSX.Element;
|
|
8
|
+
export declare function getServerSideProps(ctx: any): {
|
|
9
|
+
props: {
|
|
5
10
|
componentName: any;
|
|
6
|
-
storyName: any;
|
|
7
11
|
};
|
|
8
12
|
};
|
|
13
|
+
export {};
|
|
@@ -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.
|
|
6
|
+
exports.CreateComponentPreviewPage = CreateComponentPreviewPage;
|
|
7
|
+
exports.getServerSideProps = getServerSideProps;
|
|
7
8
|
const empty_array_1 = require("@uxf/core/constants/empty-array");
|
|
8
9
|
const is_nil_1 = require("@uxf/core/utils/is-nil");
|
|
9
10
|
const react_1 = __importDefault(require("react"));
|
|
@@ -16,25 +17,27 @@ function ComponentPreview(props) {
|
|
|
16
17
|
return react_1.default.createElement(Story, { key: key });
|
|
17
18
|
})));
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return (react_1.default.createElement("div", { style: { padding: 32 } }, Object.entries(components_1.components).map(([key, config]) => (react_1.default.createElement("div", { key: key, style: { marginTop: 32, marginBottom: 32 } },
|
|
20
|
+
function CreateComponentPreviewPage(props) {
|
|
21
|
+
if ((0, is_nil_1.isNil)(props.componentName)) {
|
|
22
|
+
return (react_1.default.createElement("div", { style: { padding: 32 } }, Object.entries(components_1.components).map(([key, config]) => {
|
|
23
|
+
return (react_1.default.createElement("div", { key: key, style: { marginTop: 32, marginBottom: 32 } },
|
|
24
24
|
react_1.default.createElement("h2", null, config.title),
|
|
25
25
|
react_1.default.createElement("div", { style: { border: "2px dashed gray", padding: 32, borderRadius: 4 } },
|
|
26
|
-
react_1.default.createElement(ComponentPreview, { stories: config.stories }))))
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
react_1.default.createElement(ComponentPreview, { stories: config.stories }))));
|
|
27
|
+
})));
|
|
28
|
+
}
|
|
29
|
+
const componentConfig = components_1.components[props.componentName];
|
|
30
|
+
if ((0, is_nil_1.isNil)(componentConfig)) {
|
|
31
|
+
return react_1.default.createElement("div", null, "component not found");
|
|
32
|
+
}
|
|
33
|
+
return react_1.default.createElement(ComponentPreview, { stories: componentConfig.stories });
|
|
34
|
+
}
|
|
35
|
+
function getServerSideProps(ctx) {
|
|
36
|
+
var _a;
|
|
37
|
+
const [componentName] = (_a = ctx.query.slug) !== null && _a !== void 0 ? _a : empty_array_1.EMPTY_ARRAY;
|
|
38
|
+
return {
|
|
39
|
+
props: {
|
|
40
|
+
componentName: componentName || null,
|
|
41
|
+
},
|
|
38
42
|
};
|
|
39
|
-
return component;
|
|
40
43
|
}
|
package/css/info-box.css
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.uxf-infobox {
|
|
2
|
+
--infobox-bg-color: transparent;
|
|
3
|
+
--infobox-border-color: transparent;
|
|
4
|
+
--i-w: theme("spacing.5");
|
|
5
|
+
--i-h: theme("spacing.5");
|
|
6
|
+
|
|
7
|
+
@apply transition;
|
|
8
|
+
|
|
9
|
+
background-color: var(--infobox-bg-color);
|
|
10
|
+
border: 1px solid var(--infobox-border-color);
|
|
11
|
+
border-radius: theme("borderRadius.lg");
|
|
12
|
+
color: theme("colors.base_text_high_emphasis");
|
|
13
|
+
display: flex;
|
|
14
|
+
font-size: theme("fontSize.sm");
|
|
15
|
+
font-weight: theme("fontWeight.medium");
|
|
16
|
+
gap: theme("spacing.2");
|
|
17
|
+
padding: theme("spacing.2");
|
|
18
|
+
|
|
19
|
+
&__text-wrapper {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: 6px;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
min-height: theme("height.8");
|
|
25
|
+
|
|
26
|
+
.uxf-info-box__title {
|
|
27
|
+
font-size: theme("fontSize.medium");
|
|
28
|
+
font-weight: theme("fontWeight.semibold");
|
|
29
|
+
margin-top: 6px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.uxf-info-box__text {
|
|
33
|
+
font-weight: theme("fontWeight.normal");
|
|
34
|
+
margin-right: theme("spacing.2");
|
|
35
|
+
padding: theme("spacing.1") 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--brand {
|
|
40
|
+
--uxf-icon-color: theme("colors.brand_icon_on_muted");
|
|
41
|
+
--infobox-bg-color: theme("colors.brand_surface_muted");
|
|
42
|
+
--infobox-border-color: theme("colors.brand_border");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--info {
|
|
46
|
+
--uxf-icon-color: theme("colors.info_icon_on_muted");
|
|
47
|
+
--infobox-bg-color: theme("colors.info_surface_muted");
|
|
48
|
+
--infobox-border-color: theme("colors.info_border");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&--negative {
|
|
52
|
+
--uxf-icon-color: theme("colors.negative_icon_on_muted");
|
|
53
|
+
--infobox-bg-color: theme("colors.negative_surface_muted");
|
|
54
|
+
--infobox-border-color: theme("colors.negative_border");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&--neutral {
|
|
58
|
+
--uxf-icon-color: theme("colors.neutral_icon_on_muted");
|
|
59
|
+
--infobox-bg-color: theme("colors.neutral_surface_muted");
|
|
60
|
+
--infobox-border-color: theme("colors.neutral_border");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--positive {
|
|
64
|
+
--uxf-icon-color: theme("colors.positive_icon_on_muted");
|
|
65
|
+
--infobox-bg-color: theme("colors.positive_surface_muted");
|
|
66
|
+
--infobox-border-color: theme("colors.positive_border");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&--warning {
|
|
70
|
+
--uxf-icon-color: theme("colors.warning_icon_on_muted");
|
|
71
|
+
--infobox-bg-color: theme("colors.warning_surface_muted");
|
|
72
|
+
--infobox-border-color: theme("colors.warning_border");
|
|
73
|
+
}
|
|
74
|
+
}
|
package/css/input.css
CHANGED
|
@@ -253,3 +253,17 @@
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
+
|
|
257
|
+
.uxf-input--no-spin-buttons {
|
|
258
|
+
.uxf-input__element {
|
|
259
|
+
&::-webkit-outer-spin-button,
|
|
260
|
+
&::-webkit-inner-spin-button {
|
|
261
|
+
appearance: none;
|
|
262
|
+
margin: 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&[type="number"] {
|
|
266
|
+
appearance: textfield;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
package/css/layout.css
CHANGED
|
@@ -1,47 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
:root {
|
|
2
|
+
--uxf-layout-overlay-z-index: 1;
|
|
3
|
+
|
|
4
|
+
/* sidebar */
|
|
5
|
+
--uxf-layout-sidebar-width: theme("spacing.64");
|
|
6
|
+
--uxf-layout-sidebar-border-color: theme("colors.neutral.200");
|
|
7
|
+
--uxf-layout-sidebar-border-width: 1px;
|
|
8
|
+
--uxf-layout-sidebar-background-color: theme("colors.white");
|
|
9
|
+
--uxf-layout-sidebar-z-index: 2;
|
|
10
|
+
|
|
11
|
+
/* appbar */
|
|
12
|
+
--uxf-layout-app-bar-height: theme("spacing.14");
|
|
13
|
+
--uxf-layout-app-bar-border-color: theme("colors.neutral.200");
|
|
14
|
+
--uxf-layout-app-bar-border-width: 1px;
|
|
15
|
+
--uxf-layout-app-bar-background-color: theme("colors.white");
|
|
3
16
|
}
|
|
4
17
|
|
|
5
18
|
.uxf-layout {
|
|
6
19
|
&__content {
|
|
7
|
-
|
|
20
|
+
display: flex;
|
|
21
|
+
flex: 1;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
padding-top: var(--uxf-layout-app-bar-height);
|
|
24
|
+
|
|
25
|
+
@screen md {
|
|
26
|
+
padding-left: var(--uxf-layout-sidebar-width);
|
|
27
|
+
}
|
|
8
28
|
}
|
|
9
29
|
}
|
|
10
30
|
|
|
11
31
|
.uxf-app-bar {
|
|
12
|
-
|
|
32
|
+
background-color: theme("colors.white");
|
|
33
|
+
border-bottom: var(--uxf-layout-app-bar-border-width) solid var(--uxf-layout-app-bar-border-color);
|
|
34
|
+
display: flex;
|
|
35
|
+
height: var(--uxf-layout-app-bar-height);
|
|
36
|
+
position: fixed;
|
|
37
|
+
right: 0;
|
|
38
|
+
top: 0;
|
|
39
|
+
width: 100%;
|
|
13
40
|
|
|
14
|
-
|
|
15
|
-
|
|
41
|
+
@screen md {
|
|
42
|
+
width: calc(100% - var(--uxf-layout-sidebar-width));
|
|
16
43
|
}
|
|
17
44
|
|
|
18
45
|
&__menu-button {
|
|
19
|
-
|
|
46
|
+
--uxf-button-height: var(--uxf-layout-app-bar-height);
|
|
47
|
+
|
|
48
|
+
border: 0;
|
|
49
|
+
border-radius: 0;
|
|
50
|
+
border-right: var(--uxf-layout-app-bar-border-width) solid var(--uxf-layout-sidebar-border-color);
|
|
51
|
+
|
|
52
|
+
@screen md {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
20
55
|
}
|
|
21
56
|
|
|
22
|
-
&
|
|
23
|
-
|
|
57
|
+
&__content {
|
|
58
|
+
flex-grow: 1;
|
|
24
59
|
}
|
|
25
60
|
}
|
|
26
61
|
|
|
27
62
|
.uxf-sidebar {
|
|
28
|
-
|
|
63
|
+
background-color: theme("colors.white");
|
|
64
|
+
border-right: var(--uxf-layout-sidebar-border-width) solid var(--uxf-layout-sidebar-border-color);
|
|
65
|
+
bottom: 0;
|
|
66
|
+
display: none;
|
|
67
|
+
height: 100vh;
|
|
68
|
+
left: 0;
|
|
69
|
+
position: fixed;
|
|
70
|
+
top: 0;
|
|
71
|
+
width: var(--uxf-layout-sidebar-width);
|
|
72
|
+
z-index: var(--uxf-layout-sidebar-z-index);
|
|
29
73
|
|
|
30
|
-
|
|
31
|
-
|
|
74
|
+
&--is-open {
|
|
75
|
+
display: block;
|
|
32
76
|
}
|
|
33
77
|
|
|
34
|
-
|
|
35
|
-
|
|
78
|
+
@screen md {
|
|
79
|
+
display: block;
|
|
36
80
|
}
|
|
37
|
-
}
|
|
38
81
|
|
|
39
|
-
.uxf-drawer {
|
|
40
82
|
&__content {
|
|
41
|
-
|
|
83
|
+
height: 100%;
|
|
84
|
+
overflow-y: auto;
|
|
42
85
|
}
|
|
86
|
+
}
|
|
43
87
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
88
|
+
.uxf-sidebar-overlay {
|
|
89
|
+
background-color: #0003;
|
|
90
|
+
inset: 0;
|
|
91
|
+
position: fixed;
|
|
92
|
+
z-index: var(--uxf-layout-overlay-z-index);
|
|
47
93
|
}
|
|
@@ -31,10 +31,6 @@ const dayjs_1 = __importDefault(require("dayjs"));
|
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
const action_1 = require("../utils/action");
|
|
33
33
|
const date_picker_1 = require("./date-picker");
|
|
34
|
-
exports.default = {
|
|
35
|
-
title: "UI/DatePicker",
|
|
36
|
-
component: date_picker_1.DatePicker,
|
|
37
|
-
};
|
|
38
34
|
const today = (0, dayjs_1.default)();
|
|
39
35
|
const unavailableDates = [
|
|
40
36
|
today.toDate(),
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./date-picker-input").DatePickerInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
7
2
|
export declare function Default(): React.JSX.Element;
|
|
@@ -28,10 +28,6 @@ const react_1 = __importStar(require("react"));
|
|
|
28
28
|
const icon_1 = require("../icon");
|
|
29
29
|
const action_1 = require("../utils/action");
|
|
30
30
|
const date_picker_input_1 = require("./date-picker-input");
|
|
31
|
-
exports.default = {
|
|
32
|
-
title: "UI/DatePickerInput",
|
|
33
|
-
component: date_picker_input_1.DatePickerInput,
|
|
34
|
-
};
|
|
35
31
|
function Default() {
|
|
36
32
|
const [date, setDate] = (0, react_1.useState)(null);
|
|
37
33
|
const onChange = (0, action_1.action)("onChange", setDate);
|
|
@@ -28,10 +28,6 @@ const noop_1 = require("@uxf/core/utils/noop");
|
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
const action_1 = require("../utils/action");
|
|
30
30
|
const date_range_picker_1 = require("./date-range-picker");
|
|
31
|
-
exports.default = {
|
|
32
|
-
title: "UI/DateRangePicker",
|
|
33
|
-
component: date_range_picker_1.DateRangePicker,
|
|
34
|
-
};
|
|
35
31
|
function Default() {
|
|
36
32
|
const [value, setValue] = (0, react_1.useState)(null);
|
|
37
33
|
const onChange = (0, action_1.action)("onChange", setValue);
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("./date-range-picker-input").DateRangePickerInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
-
parameters: {
|
|
6
|
-
docs: {};
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
2
|
export declare function Default(): React.JSX.Element;
|