@fibery/ui-kit 9.0.1 → 9.1.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/lib/a11y-color.js +12 -10
- package/lib/actions-menu/actions-menu-item.js +1 -1
- package/lib/actions-menu/actions-menu-props.d.ts +2 -0
- package/lib/actions-menu/actions-menu-separator.d.ts +2 -2
- package/lib/actions-menu/actions-menu-sub-command-menu.js +5 -4
- package/lib/actions-menu/actions-menu.d.ts +1 -1
- package/lib/actions-menu/actions-menu.js +2 -1
- package/lib/actions-menu/contexts/actions-menu-context.js +12 -11
- package/lib/actions-menu/index.d.ts +3 -3
- package/lib/ai/max-tokens.js +6 -5
- package/lib/antd/ant-modal.d.ts +1 -1
- package/lib/antd/ant-modal.js +28 -1
- package/lib/antd/ant-upload.d.ts +1 -1
- package/lib/antd/ant-upload.js +23 -18
- package/lib/antd/input-number.js +2 -2
- package/lib/antd/input.js +7 -6
- package/lib/antd/utils.js +2 -1
- package/lib/avatar-colors.js +1 -1
- package/lib/avatar.d.ts +1 -10
- package/lib/avatar.js +48 -38
- package/lib/avatar.wyw-in-js.css +1 -1
- package/lib/banner/banner-action.js +2 -1
- package/lib/board-table-loader.js +1 -1
- package/lib/button/button.js +1 -1
- package/lib/button/icon-button.js +1 -1
- package/lib/canvas-colors.js +2 -2
- package/lib/card-container.d.ts +2 -6
- package/lib/card-container.js +5 -5
- package/lib/color-filter.js +2 -2
- package/lib/color-inspect.js +1 -1
- package/lib/color-picker/color-picker-or-loader.d.ts +2 -2
- package/lib/color-utils.js +1 -1
- package/lib/comment.d.ts +1 -0
- package/lib/comment.js +29 -20
- package/lib/comment.wyw-in-js.css +9 -7
- package/lib/context-menu/index.js +1 -0
- package/lib/context-menu/index.wyw-in-js.css +1 -1
- package/lib/copy-to-clipboard.js +2 -1
- package/lib/date-picker/autocomplete.js +12 -10
- package/lib/date-picker/date-range-input.js +9 -7
- package/lib/date-picker/day-with-start-end-buttons.js +0 -2
- package/lib/date-picker/get-weekends-for-month.js +4 -2
- package/lib/date-picker/relative-date-picker.js +5 -3
- package/lib/date-picker/single-date-input.js +9 -7
- package/lib/date-picker/single-date-picker.d.ts +1 -2
- package/lib/date-picker/single-date-picker.js +2 -1
- package/lib/date-picker/types.d.ts +1 -2
- package/lib/day-select/day-select.js +2 -1
- package/lib/day-select/week-day-select.d.ts +2 -2
- package/lib/day-select/week-day-select.js +4 -3
- package/lib/design-system/alpha.d.ts +6 -0
- package/lib/design-system/alpha.js +11 -7
- package/lib/design-system/colors-charts.d.ts +4 -0
- package/lib/design-system/colors-charts.js +14 -0
- package/lib/design-system/colors-js.d.ts +2 -4
- package/lib/design-system/colors-js.js +8 -10
- package/lib/design-system/fns.enum.js +7 -4
- package/lib/design-system/fns.icon.js +1 -1
- package/lib/design-system/fns.js +7 -4
- package/lib/design-system/theme.d.ts +7 -7
- package/lib/design-system/theme.js +7 -12
- package/lib/design-system/vars.js +1 -2
- package/lib/design-system.d.ts +3 -2
- package/lib/design-system.js +3 -2
- package/lib/emoji-picker/app-icon-picker.d.ts +2 -2
- package/lib/emoji-picker/emoji-picker-content-with-color.d.ts +2 -2
- package/lib/emoji-picker/emoji-picker.d.ts +2 -2
- package/lib/emoji-picker/icon-emoji-picker.d.ts +1 -2
- package/lib/emoji-picker/primitives/content.js +10 -9
- package/lib/emoji-picker/primitives/emoji.js +22 -14
- package/lib/emoji-picker/primitives/emoji.wyw-in-js.css +4 -3
- package/lib/emoji-picker/primitives/grid.js +0 -1
- package/lib/emoji-picker/primitives/preview-provider.js +4 -3
- package/lib/emoji-picker/primitives/root.js +10 -9
- package/lib/emoji-picker/primitives/skin-provider.js +5 -4
- package/lib/emoji-picker/stores/emoji-data-store.d.ts +2 -2
- package/lib/emoji-picker/stores/emoji-data-store.js +8 -8
- package/lib/emoji-picker/stores/static-emoji-data-store.js +2 -1
- package/lib/emoji.js +5 -2
- package/lib/errors.d.ts +2 -3
- package/lib/fibermoji-placeholder.js +5 -7
- package/lib/field-type-icon.js +2 -1
- package/lib/file-item/file-icon.js +2 -1
- package/lib/file-item.js +3 -10
- package/lib/guide-link.js +1 -1
- package/lib/highlight-colors.js +2 -1
- package/lib/hotkey-scope.js +2 -1
- package/lib/icons/ast/build.d.ts +5 -0
- package/lib/icons/ast/build.js +25 -0
- package/lib/icons/ast/index.d.ts +2 -4
- package/lib/icons/ast/index.js +5 -7
- package/lib/icons/ast/spinner.js +8 -15
- package/lib/icons/icon.js +4 -3
- package/lib/icons/react/{plus.d.ts → build.d.ts} +4 -4
- package/lib/icons/react/{plus.js → build.js} +6 -6
- package/lib/icons/react/index.d.ts +2 -4
- package/lib/icons/react/index.js +5 -7
- package/lib/images-gallery/get-gallery-src.js +1 -1
- package/lib/images-gallery/slide-buttons.js +8 -4
- package/lib/images-gallery/thumbnails-mime-types-white-list.js +1 -1
- package/lib/integration-compact-info-button.js +1 -2
- package/lib/is-in-popup.d.ts +1 -2
- package/lib/is-in-popup.js +6 -0
- package/lib/loaders.d.ts +1 -9
- package/lib/loaders.js +2 -39
- package/lib/loaders.wyw-in-js.css +2 -4
- package/lib/loading-sausage.js +7 -6
- package/lib/mobile-drawer.d.ts +2 -1
- package/lib/mobile-drawer.js +24 -12
- package/lib/mobile-drawer.wyw-in-js.css +4 -3
- package/lib/mobile-keyboard-aware-popup.js +6 -5
- package/lib/modal-menu/contexts/modal-menu-context.d.ts +1 -0
- package/lib/modal-menu/modal-menu-content.d.ts +1 -1
- package/lib/modal-menu/modal-menu-content.js +16 -6
- package/lib/modal-menu/modal-menu-drawer-content.d.ts +7 -0
- package/lib/modal-menu/modal-menu-drawer-content.js +13 -0
- package/lib/modal-menu/modal-menu-root.d.ts +2 -1
- package/lib/modal-menu/modal-menu-root.js +24 -21
- package/lib/modal-menu/modal-submenu.js +10 -9
- package/lib/nested-menu-item.d.ts +1 -1
- package/lib/number-input/number-input-inline-with-autosize.d.ts +1 -2
- package/lib/number-input/number-input-inline-with-autosize.js +9 -6
- package/lib/number-input/number-input-inline-with-autosize.wyw-in-js.css +0 -1
- package/lib/number-input/number-input.js +13 -11
- package/lib/number-input/styles.d.ts +1 -9
- package/lib/number-input/styles.js +3 -9
- package/lib/number-input/styles.wyw-in-js.css +2 -3
- package/lib/number-input/text-area-auto-sized.d.ts +1 -2
- package/lib/number-input/text-area-auto-sized.js +2 -2
- package/lib/number-input/text-input-auto-sized.d.ts +1 -2
- package/lib/number-input/text-input-auto-sized.js +2 -2
- package/lib/online-users.js +2 -2
- package/lib/open-popover-tracker.js +7 -6
- package/lib/palettes/neutral.js +1 -1
- package/lib/palettes/warm.js +1 -1
- package/lib/phone.js +1 -1
- package/lib/popover/index.d.ts +9 -12
- package/lib/popover/index.js +66 -75
- package/lib/popover/mobile-popover-context.js +12 -11
- package/lib/popover/mobile-popover.d.ts +2 -2
- package/lib/popover/mobile-popover.js +16 -15
- package/lib/popover/modifiers.js +4 -4
- package/lib/popover/popup-modifiers-context.d.ts +3 -5
- package/lib/preference-setting.js +6 -8
- package/lib/reactions/reaction-button.js +36 -25
- package/lib/reactions/reaction-button.wyw-in-js.css +16 -16
- package/lib/reactions/reaction-picker.js +22 -10
- package/lib/reactions/reaction-picker.wyw-in-js.css +1 -0
- package/lib/reactions/tootltip.js +2 -1
- package/lib/select/components/drop-down-indicator.js +1 -1
- package/lib/select/components/menu-list-virtualized.js +1 -1
- package/lib/select/components/option.js +2 -1
- package/lib/select/index.d.ts +2 -1
- package/lib/select/select-in-popover.js +1 -1
- package/lib/select/select-trigger.d.ts +4 -0
- package/lib/select/select-trigger.js +25 -0
- package/lib/select/select-trigger.wyw-in-js.css +1 -0
- package/lib/select/select.d.ts +6 -2
- package/lib/select/select.js +13 -8
- package/lib/select/styles.js +2 -2
- package/lib/spinner.d.ts +5 -0
- package/lib/spinner.js +17 -0
- package/lib/spinner.wyw-in-js.css +1 -0
- package/lib/tab-nav/tab-nav.d.ts +4 -2
- package/lib/tab-nav/tab-nav.js +2 -2
- package/lib/thematic.js +322 -321
- package/lib/theme-provider.d.ts +1 -3
- package/lib/theme-settings-core.d.ts +13 -1
- package/lib/theme-settings-core.js +37 -1
- package/lib/theme-settings.d.ts +3 -2
- package/lib/theme-settings.js +7 -2
- package/lib/toast/toast-action.js +2 -1
- package/lib/toast/toast-provider.d.ts +1 -2
- package/lib/toast/toast-queue.d.ts +1 -2
- package/lib/toast/toast-queue.js +7 -8
- package/lib/toast/toast.js +7 -6
- package/lib/toggle.js +3 -3
- package/lib/tooltip-if-overflown.js +2 -1
- package/lib/tooltip.js +1 -1
- package/lib/type-badge.d.ts +8 -28
- package/lib/type-badge.js +39 -50
- package/lib/type-badge.wyw-in-js.css +11 -10
- package/lib/unit/container.d.ts +12 -0
- package/lib/unit/container.js +50 -0
- package/lib/unit/context.d.ts +29 -0
- package/lib/unit/context.js +9 -0
- package/lib/unit/index.d.ts +4 -2
- package/lib/unit/index.js +2 -1
- package/lib/unit/nav-button.d.ts +12 -0
- package/lib/unit/nav-button.js +18 -0
- package/lib/unit/styles.d.ts +6 -9
- package/lib/unit/styles.js +13 -16
- package/lib/unit/styles.wyw-in-js.css +10 -16
- package/lib/unit/unit-content-layout.d.ts +4 -3
- package/lib/unit/unit-content-layout.js +9 -9
- package/lib/unit/unit-content.d.ts +6 -5
- package/lib/unit/unit-content.js +83 -18
- package/lib/unit/unit-content.wyw-in-js.css +6 -2
- package/lib/unit/unit.d.ts +38 -5
- package/lib/unit/unit.js +43 -12
- package/lib/use-long-press.d.ts +6 -6
- package/lib/with-data.d.ts +35 -37
- package/lib/with-data.js +23 -22
- package/lib/workflow-progress-icon.js +2 -2
- package/package.json +4 -4
- package/lib/beta-badge.d.ts +0 -8
- package/lib/beta-badge.js +0 -13
- package/lib/beta-badge.wyw-in-js.css +0 -1
- package/lib/checkbox-multi-select.d.ts +0 -21
- package/lib/checkbox-multi-select.js +0 -41
- package/lib/checkbox-multi-select.wyw-in-js.css +0 -3
- package/lib/country-selector.d.ts +0 -9
- package/lib/country-selector.js +0 -21
- package/lib/features.d.ts +0 -8
- package/lib/features.js +0 -15
- package/lib/flags.d.ts +0 -4
- package/lib/flags.js +0 -7
- package/lib/icons/ast/alert-triangle.d.ts +0 -5
- package/lib/icons/ast/alert-triangle.js +0 -25
- package/lib/icons/ast/field-units-large.d.ts +0 -5
- package/lib/icons/ast/field-units-large.js +0 -25
- package/lib/icons/ast/plus.d.ts +0 -5
- package/lib/icons/ast/plus.js +0 -25
- package/lib/icons/react/alert-triangle.d.ts +0 -15
- package/lib/icons/react/alert-triangle.js +0 -21
- package/lib/icons/react/field-units-large.d.ts +0 -15
- package/lib/icons/react/field-units-large.js +0 -21
- package/lib/layout.d.ts +0 -28
- package/lib/layout.js +0 -66
- package/lib/layout.wyw-in-js.css +0 -2
- package/lib/new-card-placeholder.d.ts +0 -26
- package/lib/new-card-placeholder.js +0 -141
- package/lib/new-card-placeholder.wyw-in-js.css +0 -5
- package/lib/unit/primitive.d.ts +0 -5
- package/lib/unit/primitive.js +0 -108
- package/lib/unit/primitive.wyw-in-js.css +0 -3
- package/lib/unit/types.d.ts +0 -34
- package/lib/unit/types.js +0 -0
- package/lib/unit/unit-button-group.d.ts +0 -13
- package/lib/unit/unit-button-group.js +0 -23
package/lib/unit/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { UnitChipProps, UnitSize, UnitTooltipConfig, useUnitContext } from "./context.js";
|
|
2
|
+
import { UnitContainerProps } from "./container.js";
|
|
3
|
+
import { Unit, UnitProps, UnitVariant } from "./unit.js";
|
|
4
|
+
export { Unit, type UnitChipProps, type UnitContainerProps, type UnitProps, type UnitSize, type UnitTooltipConfig, type UnitVariant, useUnitContext };
|
package/lib/unit/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UnitSize } from "./context.js";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
|
+
//#region src/unit/nav-button.d.ts
|
|
4
|
+
type UnitNavButtonProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const getNavButtonSize: (size: UnitSize) => number;
|
|
8
|
+
declare const UnitNavButton: ({ children }: UnitNavButtonProps) => ReactElement<{
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { UnitNavButton, UnitNavButtonProps, getNavButtonSize };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { space } from "../design-system/layout.js";
|
|
2
|
+
import { useUnitContext } from "./context.js";
|
|
3
|
+
import { getHeight } from "./unit-content-layout.js";
|
|
4
|
+
import { Children, cloneElement } from "react";
|
|
5
|
+
//#region src/unit/nav-button.tsx
|
|
6
|
+
var getNavButtonSize = (size) => getHeight(size) + 2 * space.s2;
|
|
7
|
+
var UnitNavButton = ({ children }) => {
|
|
8
|
+
const { size } = useUnitContext();
|
|
9
|
+
const element = Children.only(children);
|
|
10
|
+
const slotSize = getNavButtonSize(size);
|
|
11
|
+
return cloneElement(element, { style: {
|
|
12
|
+
...element.props.style,
|
|
13
|
+
width: slotSize,
|
|
14
|
+
height: slotSize
|
|
15
|
+
} });
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { UnitNavButton, getNavButtonSize };
|
package/lib/unit/styles.d.ts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
//#region src/unit/styles.d.ts
|
|
2
|
-
declare const textEllipsisClassName: import("@linaria/core").LinariaClassName;
|
|
3
2
|
declare const basicUnitClassName: import("@linaria/core").LinariaClassName;
|
|
4
3
|
declare const alignCenterClassName: import("@linaria/core").LinariaClassName;
|
|
5
|
-
declare const
|
|
4
|
+
declare const mediumTextUnitSize: number;
|
|
6
5
|
declare const smallTextUnitSize: number;
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
6
|
+
declare const mediumSizeCss: import("@linaria/core").LinariaClassName;
|
|
7
|
+
declare const mediumSizeMinWidthCss: import("@linaria/core").LinariaClassName;
|
|
8
|
+
declare const smallSizeCss: import("@linaria/core").LinariaClassName;
|
|
9
|
+
declare const smallSizeMinWidthCss: import("@linaria/core").LinariaClassName;
|
|
11
10
|
declare const unitMinHeightClassName: import("@linaria/core").LinariaClassName;
|
|
12
11
|
declare const invalidUnitClassName: import("@linaria/core").LinariaClassName;
|
|
13
12
|
declare const clickableClassName: import("@linaria/core").LinariaClassName;
|
|
14
13
|
declare const borderClassName: import("@linaria/core").LinariaClassName;
|
|
15
|
-
declare const pillRadiusClassName: import("@linaria/core").LinariaClassName;
|
|
16
|
-
declare const fullUnitWrapperClassName: import("@linaria/core").LinariaClassName;
|
|
17
14
|
declare const positionUnitClass: import("@linaria/core").LinariaClassName;
|
|
18
15
|
//#endregion
|
|
19
|
-
export { alignCenterClassName, basicUnitClassName,
|
|
16
|
+
export { alignCenterClassName, basicUnitClassName, borderClassName, clickableClassName, invalidUnitClassName, mediumSizeCss, mediumSizeMinWidthCss, mediumTextUnitSize, positionUnitClass, smallSizeCss, smallSizeMinWidthCss, smallTextUnitSize, unitMinHeightClassName };
|
package/lib/unit/styles.js
CHANGED
|
@@ -3,21 +3,18 @@ import { space } from "../design-system/layout.js";
|
|
|
3
3
|
import { fontSize } from "../design-system/typography.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/unit/styles.ts
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var regularTextUnitSize = fontSize.sm + space.s8;
|
|
6
|
+
var basicUnitClassName = "bnbrrsv-basicUnit";
|
|
7
|
+
var alignCenterClassName = "a60xcpq-alignCenter";
|
|
8
|
+
var mediumTextUnitSize = fontSize.sm + space.s8;
|
|
10
9
|
var smallTextUnitSize = fontSize.xs + space.s8;
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var unitMinHeightClassName = "
|
|
16
|
-
var invalidUnitClassName = "
|
|
17
|
-
var clickableClassName = "
|
|
18
|
-
var borderClassName = "
|
|
19
|
-
var
|
|
20
|
-
var fullUnitWrapperClassName = "f1kzkp39-fullUnitWrapper";
|
|
21
|
-
var positionUnitClass = "prmh9nr-positionUnit";
|
|
10
|
+
var mediumSizeCss = "mu50b8v-mediumSize";
|
|
11
|
+
var mediumSizeMinWidthCss = "m1yn8ezw-mediumSizeMinWidth";
|
|
12
|
+
var smallSizeCss = "s1v5rpy3-smallSize";
|
|
13
|
+
var smallSizeMinWidthCss = "s45fj0l-smallSizeMinWidth";
|
|
14
|
+
var unitMinHeightClassName = "updarf0-unitMinHeight";
|
|
15
|
+
var invalidUnitClassName = "ibaz4qk-invalidUnit";
|
|
16
|
+
var clickableClassName = "c14l2yxo-clickable";
|
|
17
|
+
var borderClassName = "b18mqj2f-border";
|
|
18
|
+
var positionUnitClass = "p4mqgwc-positionUnit";
|
|
22
19
|
//#endregion
|
|
23
|
-
export { alignCenterClassName, basicUnitClassName,
|
|
20
|
+
export { alignCenterClassName, basicUnitClassName, borderClassName, clickableClassName, invalidUnitClassName, mediumSizeCss, mediumSizeMinWidthCss, mediumTextUnitSize, positionUnitClass, smallSizeCss, smallSizeMinWidthCss, smallTextUnitSize, unitMinHeightClassName };
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
3
|
-
.
|
|
4
|
-
.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.ubaz4qk-unitMinHeight{min-height:24px;}
|
|
1
|
+
.bnbrrsv-basicUnit{border-radius:6px;border:none;}
|
|
2
|
+
.a60xcpq-alignCenter{display:flex;align-items:center;justify-content:center;line-height:0;}
|
|
3
|
+
.mu50b8v-mediumSize{font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:14px;line-height:1.5;font-weight:410;color:var(--textColor);text-transform:none;letter-spacing:normal;line-height:22px;}
|
|
4
|
+
.m1yn8ezw-mediumSizeMinWidth{min-width:26px;justify-content:center;}
|
|
5
|
+
.s1v5rpy3-smallSize{font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:12px;line-height:1.5;font-weight:410;color:var(--textColor);text-transform:none;line-height:20px;}
|
|
6
|
+
.s45fj0l-smallSizeMinWidth{min-width:24px;justify-content:center;}
|
|
7
|
+
.updarf0-unitMinHeight{min-height:24px;}
|
|
9
8
|
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
.
|
|
13
|
-
var(--colorBgButtonGhostNeutralHover),
|
|
14
|
-
var(--colorBgButtonGhostNeutralHover)
|
|
15
|
-
);}.p1ebg4ic-pillRadius.c18mqj2f-clickable:hover::before{box-shadow:var(--inputBorderHoverColorThin) inset;}.p1ebg4ic-pillRadius.c18mqj2f-clickable:focus::before{box-shadow:var(--inputBorderFocusColorThin) inset;}
|
|
16
|
-
.f1kzkp39-fullUnitWrapper{display:flex;align-items:center;padding:6px;border-radius:6px;background-color:var(--cardBg);margin-bottom:4px;}
|
|
17
|
-
.prmh9nr-positionUnit{line-height:0;position:relative;}
|
|
9
|
+
.c14l2yxo-clickable{cursor:pointer;}
|
|
10
|
+
.b18mqj2f-border{position:relative;}.b18mqj2f-border:focus{outline:none;}.b18mqj2f-border::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;box-shadow:var(--inputBorderColor) inset;mix-blend-mode:var(--inputBorderBlendMode);border-radius:6px;pointer-events:none;}.b18mqj2f-border.c14l2yxo-clickable:hover::before{box-shadow:var(--inputBorderHoverColor) inset;}.b18mqj2f-border.c14l2yxo-clickable:focus::before{box-shadow:var(--inputBorderFocusColor) inset;}.b18mqj2f-border.ibaz4qk-invalidUnit::before{box-shadow:none;border:1px solid var(--colorBorderButtonOutlineAccentDefault);}.b18mqj2f-border.ibaz4qk-invalidUnit.c14l2yxo-clickable:hover::before{box-shadow:none;border:1px solid var(--colorBorderReactionsSelectedHover);}.b18mqj2f-border.ibaz4qk-invalidUnit.c14l2yxo-clickable:focus::before{box-shadow:var(--inputBorderFocusColor) inset;border:none;}
|
|
11
|
+
.p4mqgwc-positionUnit{line-height:0;position:relative;}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { UnitSize } from "./context.js";
|
|
1
2
|
//#region src/unit/unit-content-layout.d.ts
|
|
2
3
|
type Props = {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
size: UnitSize;
|
|
5
|
+
hasIcon: boolean;
|
|
5
6
|
hasChildren: boolean;
|
|
6
7
|
shrinkable?: boolean;
|
|
7
8
|
};
|
|
8
|
-
declare const getHeight: (
|
|
9
|
+
declare const getHeight: (size: UnitSize) => number;
|
|
9
10
|
declare const UnitContentLayout: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Props>;
|
|
10
11
|
//#endregion
|
|
11
12
|
export { UnitContentLayout, getHeight };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "./unit-content-layout.wyw-in-js.css";
|
|
2
|
-
import {
|
|
2
|
+
import { mediumTextUnitSize, smallTextUnitSize } from "./styles.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { styled } from "@linaria/react";
|
|
5
5
|
//#region src/unit/unit-content-layout.tsx
|
|
6
|
-
var getHeight = (
|
|
7
|
-
return
|
|
6
|
+
var getHeight = (size) => {
|
|
7
|
+
return size === "medium" ? mediumTextUnitSize : smallTextUnitSize;
|
|
8
8
|
};
|
|
9
|
-
var getUnitGridTemplateRows = ({
|
|
10
|
-
if (
|
|
11
|
-
return `minmax(${getHeight(
|
|
9
|
+
var getUnitGridTemplateRows = ({ size, hasIcon }) => {
|
|
10
|
+
if (!hasIcon) return "auto";
|
|
11
|
+
return `minmax(${getHeight(size)}px, max-content)`;
|
|
12
12
|
};
|
|
13
|
-
var getUnitGridTemplateColumns = ({
|
|
13
|
+
var getUnitGridTemplateColumns = ({ size, hasIcon, shrinkable = true, hasChildren }) => {
|
|
14
14
|
const fitContent = "fit-content(200px)";
|
|
15
|
-
if (
|
|
16
|
-
return `
|
|
15
|
+
if (!hasIcon) return shrinkable ? "auto" : fitContent;
|
|
16
|
+
return `minmax(${getHeight(size)}px, max-content) ${hasChildren ? shrinkable ? `minmax(auto, 1fr)` : fitContent : ""}`;
|
|
17
17
|
};
|
|
18
18
|
var _exp2 = () => getUnitGridTemplateRows;
|
|
19
19
|
var _exp3 = () => getUnitGridTemplateColumns;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { KeyboardEvent, ReactNode } from "react";
|
|
2
2
|
//#region src/unit/unit-content.d.ts
|
|
3
3
|
type Props = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
button?: boolean;
|
|
5
|
+
icon?: ReactNode;
|
|
6
6
|
shrinkable?: boolean;
|
|
7
7
|
truncate?: boolean;
|
|
8
|
-
|
|
8
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
9
|
+
onKeyDown?: (e: KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
};
|
|
11
|
-
declare const UnitContent: ({
|
|
12
|
+
declare const UnitContent: ({ button, icon, shrinkable, truncate, onClick, onKeyDown, children }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//#endregion
|
|
13
14
|
export { UnitContent };
|
package/lib/unit/unit-content.js
CHANGED
|
@@ -1,29 +1,94 @@
|
|
|
1
1
|
import "./unit-content.wyw-in-js.css";
|
|
2
|
-
import {
|
|
2
|
+
import { themeVars } from "../theming.generated.js";
|
|
3
|
+
import { Tooltip } from "../tooltip.js";
|
|
4
|
+
import { useTruncated } from "../tooltip-if-overflown.js";
|
|
5
|
+
import "../styles-utils.js";
|
|
6
|
+
import { FieldIcon } from "../field-icon.js";
|
|
7
|
+
import { useUnitContext } from "./context.js";
|
|
8
|
+
import "./styles.js";
|
|
9
|
+
import { UnitContainer } from "./container.js";
|
|
3
10
|
import { UnitContentLayout } from "./unit-content-layout.js";
|
|
4
11
|
/* empty css */
|
|
5
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { forwardRef } from "react";
|
|
6
14
|
import { cx } from "@linaria/core";
|
|
7
15
|
//#region src/unit/unit-content.tsx
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
var resetButtonStylesCss = "r96bd8z-resetButtonStyles";
|
|
17
|
+
var ButtonComponent = forwardRef((props, ref) => {
|
|
18
|
+
return /* @__PURE__ */ jsx("button", {
|
|
19
|
+
ref,
|
|
20
|
+
type: "button",
|
|
21
|
+
...props,
|
|
22
|
+
className: cx(props.className, resetButtonStylesCss)
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
var DivComponent = forwardRef((props, ref) => /* @__PURE__ */ jsx("div", {
|
|
26
|
+
ref,
|
|
27
|
+
...props
|
|
28
|
+
}));
|
|
29
|
+
var contentContainerCss = "ccx18o4-contentContainer";
|
|
30
|
+
var contentCss = "c1l394rk-content";
|
|
31
|
+
var unitDescriptionCss = "u1he4b8w-unitDescription";
|
|
32
|
+
var fullUnitPreviewCss = "fcmj1jm-fullUnitPreview";
|
|
33
|
+
var tooltipTitleCss = "tum1nu9-tooltipTitle";
|
|
34
|
+
var UnitContent = ({ button = false, icon, shrinkable, truncate, onClick, onKeyDown, children }) => {
|
|
35
|
+
const { size, chipProps, tooltip } = useUnitContext();
|
|
36
|
+
const { truncated, setNode } = useTruncated();
|
|
37
|
+
const body = /* @__PURE__ */ jsx(button ? ButtonComponent : DivComponent, {
|
|
38
|
+
onClick,
|
|
39
|
+
onKeyDown,
|
|
40
|
+
children: jsxs(UnitContentLayout, {
|
|
41
|
+
size,
|
|
42
|
+
hasChildren: Boolean(children),
|
|
43
|
+
hasIcon: Boolean(icon),
|
|
44
|
+
shrinkable,
|
|
45
|
+
children: [icon && /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: "a60xcpq-alignCenter",
|
|
47
|
+
children: icon
|
|
48
|
+
}), children && /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: contentContainerCss,
|
|
50
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
51
|
+
ref: tooltip ? setNode : void 0,
|
|
52
|
+
className: cx(contentCss, truncate && "e190sqpi-ellipsis"),
|
|
53
|
+
children
|
|
54
|
+
})
|
|
55
|
+
})]
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
if (!tooltip) return body;
|
|
59
|
+
const { title, fieldIcon, description, hint } = tooltip;
|
|
60
|
+
const tooltipTitle = /* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: tooltipTitleCss,
|
|
62
|
+
children: [fieldIcon && /* @__PURE__ */ jsx(FieldIcon, {
|
|
63
|
+
iconName: fieldIcon,
|
|
64
|
+
iconSize: 14,
|
|
65
|
+
color: themeVars.whiteColor
|
|
66
|
+
}), title]
|
|
67
|
+
});
|
|
68
|
+
const preview = truncated && /* @__PURE__ */ jsx("div", {
|
|
69
|
+
className: fullUnitPreviewCss,
|
|
70
|
+
children: jsx(UnitContainer, {
|
|
71
|
+
...chipProps,
|
|
72
|
+
children: /* @__PURE__ */ jsx(UnitContent, {
|
|
73
|
+
icon,
|
|
24
74
|
children
|
|
25
75
|
})
|
|
26
|
-
})
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
79
|
+
side: "bottom",
|
|
80
|
+
align: "start",
|
|
81
|
+
openOnFocus: false,
|
|
82
|
+
title: tooltipTitle,
|
|
83
|
+
description: (description || preview || hint) && /* @__PURE__ */ jsxs("div", { children: [
|
|
84
|
+
description && /* @__PURE__ */ jsx("div", {
|
|
85
|
+
className: unitDescriptionCss,
|
|
86
|
+
children: description
|
|
87
|
+
}),
|
|
88
|
+
preview,
|
|
89
|
+
hint
|
|
90
|
+
] }),
|
|
91
|
+
children: body
|
|
27
92
|
});
|
|
28
93
|
};
|
|
29
94
|
//#endregion
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
.
|
|
2
|
-
.ccx18o4-
|
|
1
|
+
.r96bd8z-resetButtonStyles{all:unset;background-color:var(--transparent);--input-focus-border:0 0 0 1px var(--colorAccentStrokeFocus) inset;--input-focus-shadow:0 0 0 2px var(--colorAccentStroke);border-radius:6px;}.r96bd8z-resetButtonStyles:focus{outline:none;box-shadow:var(--input-focus-border, 0 0 0 1px var(--colorAccentStroke)),var(--input-focus-shadow)!important;transition:box-shadow 120ms ease-in-out;}.r96bd8z-resetButtonStyles:focus:not(:focus-visible){outline:none;box-shadow:none!important;}.r96bd8z-resetButtonStyles:focus-visible{outline:none;box-shadow:var(--input-focus-border, 0 0 0 1px var(--colorAccentStroke)),var(--input-focus-shadow)!important;transition:box-shadow 120ms ease-in-out;}
|
|
2
|
+
.ccx18o4-contentContainer{overflow:hidden;}
|
|
3
|
+
.c1l394rk-content{padding-left:4px;padding-right:4px;}
|
|
4
|
+
.u1he4b8w-unitDescription{margin-bottom:1px;}
|
|
5
|
+
.fcmj1jm-fullUnitPreview{display:flex;align-items:center;padding:6px;border-radius:6px;background-color:var(--cardBg);margin-top:4px;margin-bottom:4px;}
|
|
6
|
+
.tum1nu9-tooltipTitle{display:flex;align-items:center;gap:4px;}
|
package/lib/unit/unit.d.ts
CHANGED
|
@@ -1,12 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UnitSize } from "./context.js";
|
|
2
|
+
import { UnitContainer } from "./container.js";
|
|
3
|
+
import { UnitNavButton } from "./nav-button.js";
|
|
4
|
+
import { UnitContent } from "./unit-content.js";
|
|
5
|
+
import { KeyboardEvent, ReactNode } from "react";
|
|
2
6
|
//#region src/unit/unit.d.ts
|
|
3
7
|
type UnitVariant = "outlined" | "plain";
|
|
4
|
-
type
|
|
5
|
-
type UnitProps = Omit<UnitPrimitiveProps, "big"> & {
|
|
8
|
+
type UnitProps = {
|
|
6
9
|
variant?: UnitVariant;
|
|
7
10
|
size?: UnitSize;
|
|
8
11
|
readOnly?: boolean;
|
|
12
|
+
overflow?: boolean;
|
|
13
|
+
inline?: boolean;
|
|
14
|
+
button?: boolean;
|
|
15
|
+
multiline?: boolean;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
title?: ReactNode;
|
|
18
|
+
fieldIcon?: string;
|
|
19
|
+
description?: ReactNode;
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
hint?: ReactNode;
|
|
22
|
+
navButton?: ReactNode;
|
|
23
|
+
tooltip?: boolean;
|
|
24
|
+
/** Render the field label above the value (full-size presentation). */
|
|
25
|
+
withLabel?: boolean;
|
|
26
|
+
border?: boolean;
|
|
27
|
+
color?: string;
|
|
28
|
+
bgColor?: string | null;
|
|
29
|
+
fontWeight?: number;
|
|
30
|
+
shrinkable?: boolean;
|
|
31
|
+
clickable?: boolean;
|
|
32
|
+
setMinWidth?: boolean;
|
|
33
|
+
setMinHeight?: boolean;
|
|
34
|
+
onKeyDown?: (e: KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
35
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
36
|
+
invalid?: boolean;
|
|
37
|
+
};
|
|
38
|
+
declare const UnitComponent: ({ variant, size, readOnly, overflow, inline, button, multiline, children, title, fieldIcon, description, hint, icon, navButton, tooltip, withLabel, border, color, bgColor, fontWeight, shrinkable, clickable, setMinWidth, setMinHeight, onClick, onKeyDown, invalid }: UnitProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare const Unit: typeof UnitComponent & {
|
|
40
|
+
Container: typeof UnitContainer;
|
|
41
|
+
Content: typeof UnitContent;
|
|
42
|
+
NavButton: typeof UnitNavButton;
|
|
9
43
|
};
|
|
10
|
-
declare const Unit: ({ variant, size, readOnly, withLabel, invalid, color, bgColor, border, button, clickable, onClick, ...rest }: UnitProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
44
|
//#endregion
|
|
12
|
-
export { Unit, UnitProps, UnitSize, UnitVariant };
|
|
45
|
+
export { Unit, UnitProps, type UnitSize, UnitVariant };
|
package/lib/unit/unit.js
CHANGED
|
@@ -1,22 +1,53 @@
|
|
|
1
1
|
import { themeVars } from "../theming.generated.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { positionUnitClass } from "./styles.js";
|
|
3
|
+
import { UnitContainer } from "./container.js";
|
|
4
|
+
import { LabeledUnit } from "./labeled-unit.js";
|
|
5
|
+
import { UnitNavButton } from "./nav-button.js";
|
|
6
|
+
import { UnitContent } from "./unit-content.js";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
8
|
//#region src/unit/unit.tsx
|
|
5
9
|
var getVariantBgColor = (variant, readOnly) => variant === "outlined" && readOnly ? themeVars.inputDisabledBgColor : themeVars.transparent;
|
|
6
|
-
var
|
|
10
|
+
var UnitComponent = ({ variant = "outlined", size = "small", readOnly = false, overflow = true, inline = true, button, multiline = false, children, title, fieldIcon, description = null, hint = null, icon, navButton, tooltip = true, withLabel = false, border, color = themeVars.textColor, bgColor, fontWeight, shrinkable = true, clickable, setMinWidth = true, setMinHeight = true, onClick, onKeyDown, invalid }) => {
|
|
7
11
|
const interactive = variant === "outlined" && !readOnly;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
border: border ??
|
|
12
|
-
bgColor: bgColor ?? getVariantBgColor(variant, readOnly),
|
|
13
|
-
button: button ?? (interactive || Boolean(onClick)),
|
|
14
|
-
clickable: clickable ?? interactive,
|
|
15
|
-
withLabel,
|
|
12
|
+
const content = /* @__PURE__ */ jsxs(UnitContainer, {
|
|
13
|
+
size,
|
|
14
|
+
inline,
|
|
15
|
+
border: border ?? interactive,
|
|
16
16
|
invalid,
|
|
17
|
+
clickable: clickable ?? interactive,
|
|
18
|
+
setMinWidth,
|
|
19
|
+
setMinHeight,
|
|
17
20
|
color,
|
|
18
|
-
|
|
21
|
+
bgColor: bgColor ?? getVariantBgColor(variant, readOnly),
|
|
22
|
+
fontWeight,
|
|
23
|
+
tooltip: tooltip ? {
|
|
24
|
+
title,
|
|
25
|
+
fieldIcon,
|
|
26
|
+
description,
|
|
27
|
+
hint
|
|
28
|
+
} : void 0,
|
|
29
|
+
children: [/* @__PURE__ */ jsx(UnitContent, {
|
|
30
|
+
button: button ?? (interactive || Boolean(onClick)),
|
|
31
|
+
icon,
|
|
32
|
+
shrinkable,
|
|
33
|
+
truncate: !multiline && overflow,
|
|
34
|
+
onClick,
|
|
35
|
+
onKeyDown,
|
|
36
|
+
children
|
|
37
|
+
}), navButton && /* @__PURE__ */ jsx(UnitNavButton, { children: navButton })]
|
|
38
|
+
});
|
|
39
|
+
return /* @__PURE__ */ jsx("div", {
|
|
40
|
+
className: positionUnitClass,
|
|
41
|
+
children: withLabel ? /* @__PURE__ */ jsx(LabeledUnit, {
|
|
42
|
+
label: title,
|
|
43
|
+
children: content
|
|
44
|
+
}) : content
|
|
19
45
|
});
|
|
20
46
|
};
|
|
47
|
+
var Unit = Object.assign(UnitComponent, {
|
|
48
|
+
Container: UnitContainer,
|
|
49
|
+
Content: UnitContent,
|
|
50
|
+
NavButton: UnitNavButton
|
|
51
|
+
});
|
|
21
52
|
//#endregion
|
|
22
53
|
export { Unit };
|
package/lib/use-long-press.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MouseEvent, TouchEvent } from "react";
|
|
2
2
|
//#region src/use-long-press.d.ts
|
|
3
3
|
declare function off<T extends Window | Document | HTMLElement | EventTarget>(obj: T | null, ...args: Parameters<T["removeEventListener"]> | [string, Function | null, ...any]): void;
|
|
4
4
|
interface Options {
|
|
@@ -6,11 +6,11 @@ interface Options {
|
|
|
6
6
|
delay?: number;
|
|
7
7
|
}
|
|
8
8
|
declare const useLongPress: (callback: (e: TouchEvent | MouseEvent) => void, { isPreventDefault, delay }?: Options) => {
|
|
9
|
-
readonly onMouseDown: (e:
|
|
10
|
-
readonly onTouchStart: (e:
|
|
11
|
-
readonly onMouseUp: (e:
|
|
12
|
-
readonly onMouseLeave: (e:
|
|
13
|
-
readonly onTouchEnd: (e:
|
|
9
|
+
readonly onMouseDown: (e: MouseEvent) => void;
|
|
10
|
+
readonly onTouchStart: (e: TouchEvent) => void;
|
|
11
|
+
readonly onMouseUp: (e: TouchEvent | MouseEvent) => void;
|
|
12
|
+
readonly onMouseLeave: (e: TouchEvent | MouseEvent) => void;
|
|
13
|
+
readonly onTouchEnd: (e: TouchEvent | MouseEvent) => void;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
16
|
export { off, useLongPress };
|
package/lib/with-data.d.ts
CHANGED
|
@@ -1,76 +1,74 @@
|
|
|
1
|
-
import { $TSFixMe } from "./tsfixme.js";
|
|
2
1
|
import { ComponentType } from "react";
|
|
3
2
|
//#region src/with-data.d.ts
|
|
4
|
-
type FetchState = {
|
|
3
|
+
type FetchState<Value = unknown> = {
|
|
5
4
|
fetchState: ":fetch-state/start";
|
|
6
5
|
fetchError: null;
|
|
7
6
|
fetchValue: null;
|
|
8
7
|
} | {
|
|
9
8
|
fetchState: ":fetch-state/success";
|
|
10
|
-
fetchValue:
|
|
9
|
+
fetchValue: Value;
|
|
11
10
|
fetchError: null;
|
|
12
11
|
} | {
|
|
13
12
|
fetchState: ":fetch-state/error";
|
|
14
13
|
fetchError: Error;
|
|
15
14
|
fetchValue: null;
|
|
16
15
|
};
|
|
17
|
-
type
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
type DataSources = Record<string, () => Promise<unknown>>;
|
|
17
|
+
type ProvidedState<Sources extends DataSources> = { [Key in keyof Sources]: FetchState<Awaited<ReturnType<Sources[Key]>>>; };
|
|
18
|
+
declare function provideData<Sources extends DataSources>({ sources }: {
|
|
19
|
+
sources: Sources;
|
|
20
|
+
}): <OwnProps extends object>(Component: ComponentType<OwnProps & ProvidedState<Sources>>) => {
|
|
21
|
+
new (props: OwnProps): {
|
|
22
|
+
state: ProvidedState<Sources>;
|
|
23
|
+
_prefetch: <Key extends keyof Sources>(key: Key, fetch: Sources[Key]) => Promise<void>;
|
|
24
|
+
setSourceState<Key extends keyof Sources>(key: Key, value: ProvidedState<Sources>[Key]): void;
|
|
26
25
|
componentDidMount(): void;
|
|
27
|
-
setStateIfMounted(updater: (prevState: ProvidedState) => ProvidedState): void;
|
|
26
|
+
setStateIfMounted(updater: (prevState: ProvidedState<Sources>) => ProvidedState<Sources>): void;
|
|
28
27
|
componentWillUnmount(): void;
|
|
29
28
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
30
29
|
context: unknown;
|
|
31
|
-
setState<K extends
|
|
30
|
+
setState<K extends keyof Sources>(state: Pick<ProvidedState<Sources>, K> | ProvidedState<Sources> | ((prevState: Readonly<ProvidedState<Sources>>, props: Readonly<OwnProps>) => Pick<ProvidedState<Sources>, K> | ProvidedState<Sources> | null) | null, callback?: (() => void) | undefined): void;
|
|
32
31
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
33
|
-
readonly props: Readonly<
|
|
32
|
+
readonly props: Readonly<OwnProps>;
|
|
34
33
|
refs: {
|
|
35
34
|
[key: string]: import("react").ReactInstance;
|
|
36
35
|
};
|
|
37
|
-
shouldComponentUpdate?(nextProps: Readonly<
|
|
36
|
+
shouldComponentUpdate?(nextProps: Readonly<OwnProps>, nextState: Readonly<ProvidedState<Sources>>, nextContext: any): boolean;
|
|
38
37
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
39
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<
|
|
40
|
-
componentDidUpdate?(prevProps: Readonly<
|
|
38
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<OwnProps>, prevState: Readonly<ProvidedState<Sources>>): any;
|
|
39
|
+
componentDidUpdate?(prevProps: Readonly<OwnProps>, prevState: Readonly<ProvidedState<Sources>>, snapshot?: any): void;
|
|
41
40
|
componentWillMount?(): void;
|
|
42
41
|
UNSAFE_componentWillMount?(): void;
|
|
43
|
-
componentWillReceiveProps?(nextProps: Readonly<
|
|
44
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<
|
|
45
|
-
componentWillUpdate?(nextProps: Readonly<
|
|
46
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<
|
|
42
|
+
componentWillReceiveProps?(nextProps: Readonly<OwnProps>, nextContext: any): void;
|
|
43
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<OwnProps>, nextContext: any): void;
|
|
44
|
+
componentWillUpdate?(nextProps: Readonly<OwnProps>, nextState: Readonly<ProvidedState<Sources>>, nextContext: any): void;
|
|
45
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<OwnProps>, nextState: Readonly<ProvidedState<Sources>>, nextContext: any): void;
|
|
47
46
|
};
|
|
48
|
-
new (props:
|
|
49
|
-
state:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
_prefetch: (key: string, fetch: () => Promise<$TSFixMe>) => Promise<void>;
|
|
47
|
+
new (props: OwnProps, context: any): {
|
|
48
|
+
state: ProvidedState<Sources>;
|
|
49
|
+
_prefetch: <Key extends keyof Sources>(key: Key, fetch: Sources[Key]) => Promise<void>;
|
|
50
|
+
setSourceState<Key extends keyof Sources>(key: Key, value: ProvidedState<Sources>[Key]): void;
|
|
53
51
|
componentDidMount(): void;
|
|
54
|
-
setStateIfMounted(updater: (prevState: ProvidedState) => ProvidedState): void;
|
|
52
|
+
setStateIfMounted(updater: (prevState: ProvidedState<Sources>) => ProvidedState<Sources>): void;
|
|
55
53
|
componentWillUnmount(): void;
|
|
56
54
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
57
55
|
context: unknown;
|
|
58
|
-
setState<K extends
|
|
56
|
+
setState<K extends keyof Sources>(state: Pick<ProvidedState<Sources>, K> | ProvidedState<Sources> | ((prevState: Readonly<ProvidedState<Sources>>, props: Readonly<OwnProps>) => Pick<ProvidedState<Sources>, K> | ProvidedState<Sources> | null) | null, callback?: (() => void) | undefined): void;
|
|
59
57
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
60
|
-
readonly props: Readonly<
|
|
58
|
+
readonly props: Readonly<OwnProps>;
|
|
61
59
|
refs: {
|
|
62
60
|
[key: string]: import("react").ReactInstance;
|
|
63
61
|
};
|
|
64
|
-
shouldComponentUpdate?(nextProps: Readonly<
|
|
62
|
+
shouldComponentUpdate?(nextProps: Readonly<OwnProps>, nextState: Readonly<ProvidedState<Sources>>, nextContext: any): boolean;
|
|
65
63
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
66
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<
|
|
67
|
-
componentDidUpdate?(prevProps: Readonly<
|
|
64
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<OwnProps>, prevState: Readonly<ProvidedState<Sources>>): any;
|
|
65
|
+
componentDidUpdate?(prevProps: Readonly<OwnProps>, prevState: Readonly<ProvidedState<Sources>>, snapshot?: any): void;
|
|
68
66
|
componentWillMount?(): void;
|
|
69
67
|
UNSAFE_componentWillMount?(): void;
|
|
70
|
-
componentWillReceiveProps?(nextProps: Readonly<
|
|
71
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<
|
|
72
|
-
componentWillUpdate?(nextProps: Readonly<
|
|
73
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<
|
|
68
|
+
componentWillReceiveProps?(nextProps: Readonly<OwnProps>, nextContext: any): void;
|
|
69
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<OwnProps>, nextContext: any): void;
|
|
70
|
+
componentWillUpdate?(nextProps: Readonly<OwnProps>, nextState: Readonly<ProvidedState<Sources>>, nextContext: any): void;
|
|
71
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<OwnProps>, nextState: Readonly<ProvidedState<Sources>>, nextContext: any): void;
|
|
74
72
|
};
|
|
75
73
|
contextType?: import("react").Context<any> | undefined;
|
|
76
74
|
};
|